vendor: 6,272 bytes, lines 1-9
1function Uwe(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ud(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Kp(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var _re={exports:{}},nk={},Ire={exports:{}},zr={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var BP=Symbol.for("react.element"),zwe=Symbol.for("react.portal"),Vwe=Symbol.for("react.fragment"),Gwe=Symbol.for("react.strict_mode"),Wwe=Symbol.for("react.profiler"),jwe=Symbol.for("react.provider"),qwe=Symbol.for("react.context"),Ywe=Symbol.for("react.forward_ref"),Xwe=Symbol.for("react.suspense"),Kwe=Symbol.for("react.memo"),Qwe=Symbol.for("react.lazy"),w7=Symbol.iterator;function Zwe(t){return t===null||typeof t!="object"?null:(t=w7&&t[w7]||t["@@iterator"],typeof t=="function"?t:null)}var Pre={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rre=Object.assign,Ore={};function Hx(t,e,n){this.props=t,this.context=e,this.refs=Ore,this.updater=n||Pre}Hx.prototype.isReactComponent={};Hx.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Hx.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Nre(){}Nre.prototype=Hx.prototype;function nV(t,e,n){this.props=t,this.context=e,this.refs=Ore,this.updater=n||Pre}var rV=nV.prototype=new Nre;rV.constructor=nV;Rre(rV,Hx.prototype);rV.isPureReactComponent=!0;var A7=Array.isArray,Mre=Object.prototype.hasOwnProperty,oV={current:null},Dre={key:!0,ref:!0,__self:!0,__source:!0};function Lre(t,e,n){var r,o={},i=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(i=""+e.key),e)Mre.call(e,r)&&!Dre.hasOwnProperty(r)&&(o[r]=e[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:BP,type:t,key:i,ref:s,props:o,_owner:oV.current}}function Jwe(t,e){return{$$typeof:BP,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function iV(t){return typeof t=="object"&&t!==null&&t.$$typeof===BP}function eAe(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var T7=/\/+/g;function H$(t,e){return typeof t=="object"&&t!==null&&t.key!=null?eAe(""+t.key):e.toString(36)}function PM(t,e,n,r,o){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case BP:case zwe:s=!0}}if(s)return s=t,o=o(s),t=r===""?"."+H$(s,0):r,A7(o)?(n="",t!=null&&(n=t.replace(T7,"$&/")+"/"),PM(o,e,n,"",function(c){return c})):o!=null&&(iV(o)&&(o=Jwe(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(T7,"$&/")+"/")+t)),e.push(o)),1;if(s=0,r=r===""?".":r+":",A7(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+H$(i,a);s+=PM(i,e,n,l,o)}else if(l=Zwe(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+H$(i,a++),s+=PM(i,e,n,l,o);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return s}function XO(t,e,n){if(t==null)return t;var r=[],o=0;return PM(t,r,"","",function(i){return e.call(n,i,o++)}),r}function tAe(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Nc={current:null},RM={transition:null},nAe={ReactCurrentDispatcher:Nc,ReactCurrentBatchConfig:RM,ReactCurrentOwner:oV};function kre(){throw Error("act(...) is not supported in production builds of React.")}zr.Children={map:XO,forEach:function(t,e,n){XO(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return XO(t,function(){e++}),e},toArray:function(t){return XO(t,function(e){return e})||[]},only:function(t){if(!iV(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};zr.Component=Hx;zr.Fragment=Vwe;zr.Profiler=Wwe;zr.PureComponent=nV;zr.StrictMode=Gwe;zr.Suspense=Xwe;
vendor: 5,274 bytes, lines 9-25
9zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nAe;zr.act=kre;zr.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Rre({},t.props),o=t.key,i=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,s=oV.current),e.key!==void 0&&(o=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Mre.call(e,l)&&!Dre.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:BP,type:t.type,key:o,ref:i,props:r,_owner:s}};zr.createContext=function(t){return t={$$typeof:qwe,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:jwe,_context:t},t.Consumer=t};zr.createElement=Lre;zr.createFactory=function(t){var e=Lre.bind(null,t);return e.type=t,e};zr.createRef=function(){return{current:null}};zr.forwardRef=function(t){return{$$typeof:Ywe,render:t}};zr.isValidElement=iV;zr.lazy=function(t){return{$$typeof:Qwe,_payload:{_status:-1,_result:t},_init:tAe}};zr.memo=function(t,e){return{$$typeof:Kwe,type:t,compare:e===void 0?null:e}};zr.startTransition=function(t){var e=RM.transition;RM.transition={};try{t()}finally{RM.transition=e}};zr.unstable_act=kre;zr.useCallback=function(t,e){return Nc.current.useCallback(t,e)};zr.useContext=function(t){return Nc.current.useContext(t)};zr.useDebugValue=function(){};zr.useDeferredValue=function(t){return Nc.current.useDeferredValue(t)};zr.useEffect=function(t,e){return Nc.current.useEffect(t,e)};zr.useId=function(){return Nc.current.useId()};zr.useImperativeHandle=function(t,e,n){return Nc.current.useImperativeHandle(t,e,n)};zr.useInsertionEffect=function(t,e){return Nc.current.useInsertionEffect(t,e)};zr.useLayoutEffect=function(t,e){return Nc.current.useLayoutEffect(t,e)};zr.useMemo=function(t,e){return Nc.current.useMemo(t,e)};zr.useReducer=function(t,e,n){return Nc.current.useReducer(t,e,n)};zr.useRef=function(t){return Nc.current.useRef(t)};zr.useState=function(t){return Nc.current.useState(t)};zr.useSyncExternalStore=function(t,e,n){return Nc.current.useSyncExternalStore(t,e,n)};zr.useTransition=function(){return Nc.current.useTransition()};zr.version="18.3.1";Ire.exports=zr;var C=Ire.exports;const qt=ud(C),fC=Uwe({__proto__:null,default:qt},[C]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var rAe=C,oAe=Symbol.for("react.element"),iAe=Symbol.for("react.fragment"),sAe=Object.prototype.hasOwnProperty,aAe=rAe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lAe={key:!0,ref:!0,__self:!0,__source:!0};function Fre(t,e,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)sAe.call(e,r)&&!lAe.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:oAe,type:t,key:i,ref:s,props:o,_owner:aAe.current}}nk.Fragment=iAe;nk.jsx=Fre;nk.jsxs=Fre;_re.exports=nk;var sV=_re.exports;const gr=sV.Fragment,g=sV.jsx,K=sV.jsxs,cAe=Object.freeze(Object.defineProperty({__proto__:null,Fragment:gr,jsx:g,jsxs:K},Symbol.toStringTag,{value:"Module"}));var _U={},Bre={exports:{}},dd={},$re={exports:{}},Hre={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(H,V){var q=H.length;H.push(V);e:for(;0<q;){var J=q-1>>>1,Q=H[J];if(0<o(Q,V))H[J]=V,H[q]=Q,q=J;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var V=H[0],q=H.pop();if(q!==V){H[0]=q;e:for(var J=0,Q=H.length,se=Q>>>1;J<se;){var oe=2*(J+1)-1,ie=H[oe],ee=oe+1,re=H[ee];if(0>o(ie,q))ee<Q&&0>o(re,ie)?(H[J]=re,H[ee]=q,J=ee):(H[J]=ie,H[oe]=q,J=oe);else if(ee<Q&&0>o(re,q))H[J]=re,H[ee]=q,J=ee;else break e}}return V}function o(H,V){var q=H.sortIndex-V.sortIndex;return q!==0?q:H.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,h=3,f=!1,p=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(H){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=H)r(c),V.sortIndex=V.expirationTime,e(l,V);else break;V=n(c)}}function w(H){if(m=!1,S(H),!p)if(n(l)!==null)p=!0,k(A);else{var V=n(c);V!==null&&U(w,V.startTime-H)}}function A(H,V){p=!1,m&&(m=!1,v(R),R=-1),f=!0;var q=h;try{for(S(V),d=n(l);d!==null&&(!(d.expirationTime>V)||H&&!M());){var J=d.callback;
vendor: 9,178 bytes, lines 25-34
25if(typeof J=="function"){d.callback=null,h=d.priorityLevel;var Q=J(d.expirationTime<=V);V=t.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(l)&&r(l),S(V)}else r(l);d=n(l)}if(d!==null)var se=!0;else{var oe=n(c);oe!==null&&U(w,oe.startTime-V),se=!1}return se}finally{d=null,h=q,f=!1}}var _=!1,P=null,R=-1,O=5,N=-1;function M(){return!(t.unstable_now()-N<O)}function L(){if(P!==null){var H=t.unstable_now();N=H;var V=!0;try{V=P(!0,H)}finally{V?F():(_=!1,P=null)}}else _=!1}var F;if(typeof b=="function")F=function(){b(L)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,D=$.port2;$.port1.onmessage=L,F=function(){D.postMessage(null)}}else F=function(){y(L,0)};function k(H){P=H,_||(_=!0,F())}function U(H,V){R=y(function(){H(t.unstable_now())},V)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_continueExecution=function(){p||f||(p=!0,k(A))},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(H){switch(h){case 1:case 2:case 3:var V=3;break;default:V=h}var q=h;h=V;try{return H()}finally{h=q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(H,V){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var q=h;h=H;try{return V()}finally{h=q}},t.unstable_scheduleCallback=function(H,V,q){var J=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?J+q:J):q=J,H){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=q+Q,H={id:u++,callback:V,priorityLevel:H,startTime:q,expirationTime:Q,sortIndex:-1},q>J?(H.sortIndex=q,e(c,H),n(l)===null&&H===n(c)&&(m?(v(R),R=-1):m=!0,U(w,q-J))):(H.sortIndex=Q,e(l,H),p||f||(p=!0,k(A))),H},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(H){var V=h;return function(){var q=h;h=V;try{return H.apply(this,arguments)}finally{h=q}}}})(Hre);$re.exports=Hre;var h_=$re.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var uAe=C,od=h_;function Nt(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ure=new Set,rI={};function YC(t,e){O1(t,e),O1(t+"Capture",e)}function O1(t,e){for(rI[t]=e,t=0;t<e.length;t++)Ure.add(e[t])}var hm=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),IU=Object.prototype.hasOwnProperty,dAe=/^[: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]*$/,_7={},I7={};function hAe(t){return IU.call(I7,t)?!0:IU.call(_7,t)?!1:dAe.test(t)?I7[t]=!0:(_7[t]=!0,!1)}function fAe(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function pAe(t,e,n,r){if(e===null||typeof e>"u"||fAe(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Mc(t,e,n,r,o,i,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=s}var Rl={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Rl[t]=new Mc(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Rl[e]=new Mc(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Rl[t]=new Mc(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Rl[t]=new Mc(t,2,!1,t,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(t){Rl[t]=new Mc(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Rl[t]=new Mc(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Rl[t]=new Mc(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Rl[t]=new Mc(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Rl[t]=new Mc(t,5,!1,t.toLowerCase(),null,!1,!1)});var aV=/[\-:]([a-z])/g;function lV(t){return t[1].toUpperCase()}"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(t){var e=t.replace(aV,lV);Rl[e]=new Mc(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(aV,lV);Rl[e]=new Mc(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(aV,lV);Rl[e]=new Mc(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Rl[t]=new Mc(t,1,!1,t.toLowerCase(),null,!1,!1)});Rl.xlinkHref=new Mc("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Rl[t]=new Mc(t,1,!1,t.toLowerCase(),null,!0,!0)});function cV(t,e,n,r){var o=Rl.hasOwnProperty(e)?Rl[e]:null;(o!==null?o.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(pAe(e,n,o,r)&&(n=null),r||o===null?hAe(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):o.mustUseProperty?t[o.propertyName]=n===null?o.type===3?!1:"":n:(e=o.attributeName,r=o.attributeNamespace,n===null?t.removeAttribute(e):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var _m=uAe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,KO=Symbol.for("react.element"),ME=Symbol.for("react.portal"),DE=Symbol.for("react.fragment"),uV=Symbol.for("react.strict_mode"),PU=Symbol.for("react.profiler"),zre=Symbol.for("react.provider"),Vre=Symbol.for("react.context"),dV=Symbol.for("react.forward_ref"),RU=Symbol.for("react.suspense"),OU=Symbol.for("react.suspense_list"),hV=Symbol.for("react.memo"),Dy=Symbol.for("react.lazy"),Gre=Symbol.for("react.offscreen"),P7=Symbol.iterator;function VA(t){return t===null||typeof t!="object"?null:(t=P7&&t[P7]||t["@@iterator"],typeof t=="function"?t:null)}var es=Object.assign,U$;function NT(t){if(U$===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);U$=e&&e[1]||""}return` 34`+U$+t}var z$=!1;function V$(t,e){if(!t||z$)return"";z$=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 8,507 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(` 35`),i=r.stack.split(` 36`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=` 37`+o[s].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{z$=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?NT(t):""}function gAe(t){switch(t.tag){case 5:return NT(t.type);case 16:return NT("Lazy");case 13:return NT("Suspense");case 19:return NT("SuspenseList");case 0:case 2:case 15:return t=V$(t.type,!1),t;case 11:return t=V$(t.type.render,!1),t;case 1:return t=V$(t.type,!0),t;default:return""}}function NU(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case DE:return"Fragment";case ME:return"Portal";case PU:return"Profiler";case uV:return"StrictMode";case RU:return"Suspense";case OU:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Vre:return(t.displayName||"Context")+".Consumer";case zre:return(t._context.displayName||"Context")+".Provider";case dV:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case hV:return e=t.displayName||null,e!==null?e:NU(t.type)||"Memo";case Dy:e=t._payload,t=t._init;try{return NU(t(e))}catch{}}return null}function mAe(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return NU(e);case 8:return e===uV?"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(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Nv(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Wre(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function yAe(t){var e=Wre(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function QO(t){t._valueTracker||(t._valueTracker=yAe(t))}function jre(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Wre(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function wD(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function MU(t,e){var n=e.checked;return es({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function R7(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Nv(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function qre(t,e){e=e.checked,e!=null&&cV(t,"checked",e,!1)}function DU(t,e){qre(t,e);var n=Nv(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?LU(t,e.type,n):e.hasOwnProperty("defaultValue")&&LU(t,e.type,Nv(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function O7(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function LU(t,e,n){(e!=="number"||wD(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var MT=Array.isArray;function l1(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Nv(n),e=null,o=0;o<t.length;o++){if(t[o].value===n){t[o].selected=!0,r&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function kU(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Nt(91));return es({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function N7(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(Nt(92));if(MT(n)){if(1<n.length)throw Error(Nt(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Nv(n)}}function Yre(t,e){var n=Nv(e.value),r=Nv(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function M7(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Xre(t){switch(t){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 FU(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Xre(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ZO,Kre=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,o)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(ZO=ZO||document.createElement("div"),ZO.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ZO.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function oI(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var f_={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},vAe=["Webkit","ms","Moz","O"];Object.keys(f_).forEach(function(t){vAe.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),f_[e]=f_[t]})});function Qre(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||f_.hasOwnProperty(t)&&f_[t]?(""+e).trim():e+"px"}function Zre(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Qre(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}var bAe=es({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 BU(t,e){if(e){if(bAe[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Nt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Nt(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Nt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Nt(62))}}function $U(t,e){if(t.indexOf("-")===-1)return typeof e.is=="str
37ing";switch(t){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 HU=null;function fV(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var UU=null,c1=null,u1=null;function D7(t){if(t=UP(t)){if(typeof UU!="function")throw Error(Nt(280));var e=t.stateNode;e&&(e=ak(e),UU(t.stateNode,t.type,e))}}function Jre(t){c1?u1?u1.push(t):u1=[t]:c1=t}function eoe(){if(c1){var t=c1,e=u1;if(u1=c1=null,D7(t),e)for(t=0;t<e.length;t++)D7(e[t])}}function toe(t,e){return t(e)}function noe(){}var G$=!1;function roe(t,e,n){if(G$)return t(e,n);G$=!0;try{return toe(t,e,n)}finally{G$=!1,(c1!==null||u1!==null)&&(noe(),eoe())}}function iI(t,e){var n=t.stateNode;if(n===null)return null;var r=ak(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(Nt(231,e,typeof n));return n}var zU=!1;if(hm)try{var GA={};Object.defineProperty(GA,"passive",{get:function(){zU=!0}}),window.addEventListener("test",GA,GA),window.removeEventListener("test",GA,GA)}catch{zU=!1}function CAe(t,e,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var p_=!1,AD=null,TD=!1,VU=null,SAe={onError:function(t){p_=!0,AD=t}};function EAe(t,e,n,r,o,i,s,a,l){p_=!1,AD=null,CAe.apply(SAe,arguments)}function xAe(t,e,n,r,o,i,s,a,l){if(EAe.apply(this,arguments),p_){if(p_){var c=AD;p_=!1,AD=null}else throw Error(Nt(198));TD||(TD=!0,VU=c)}}function XC(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function ooe(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function L7(t){if(XC(t)!==t)throw Error(Nt(188))}function wAe(t){var e=t.alternate;if(!e){if(e=XC(t),e===null)throw Error(Nt(188));return e!==t?null:t}for(var n=t,r=e;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return L7(o),t;if(i===r)return L7(o),e;i=i.sibling}throw Error(Nt(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(Nt(189))}}if(n.alternate!==r)throw Error(Nt(190))}if(n.tag!==3)throw Error(Nt(188));return n.stateNode.current===n?t:e}function ioe(t){return t=wAe(t),t!==null?soe(t):null}function soe(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=soe(t);if(e!==null)return e;t=t.sibling}return null}var aoe=od.unstable_scheduleCallback,k7=od.unstable_cancelCallback,AAe=od.unstable_shouldYield,TAe=od.unstable_requestPaint,Ns=od.unstable_now,_Ae=od.unstable_getCurrentPriorityLevel,pV=od.unstable_ImmediatePriority,loe=od.unstable_UserBlockingPriority,_D=od.unstable_NormalPriority,IAe=od.unstable_LowPriority,coe=od.unstable_IdlePriority,rk=null,_p=null;function PAe(t){if(_p&&typeof _p.onCommitFiberRoot=="function")try{_p.onCommitFiberRoot(rk,t,void 0,(t.current.flags&128)===128)}catch{}}var uf=Math.clz32?Math.clz32:NAe,RAe=Math.log,OAe=Math.LN2;function NAe(t){return t>>>=0,t===0?32:31-(RAe(t)/OAe|0)|0}var JO=64,eN=4194304;function DT(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ID(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,o=t.suspendedLanes,i=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=DT(a):(i&=s,i!==0&&(r=DT(i)))}else s=n&~o,s!==0?r=DT(s):i!==0&&(r=DT(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&o)&&(o=r&-r,i=e&-e,o>=i||o===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-uf(e),o=1<<n,r|=t[n],e&=~o;return r}function MAe(t,e){switch(t){case 1:case 2:case 4:return e+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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DAe(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,o=t.expirationTimes,i=t.pendingLanes;0<i;){var s=31-uf(i),a=1<<s,l=o[s];l===-1?(!(a&n)||a&r)&&(o[s]=MAe(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function GU(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function uoe(){var t=JO;return JO<<=1,!(JO&4194240)&&(JO=64),t}function W$(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function $P(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-uf(e),t[e]=n}function LAe(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var o=31-uf(n),i=1<<o;e[o]=0,r[o]=-1,t[o]=-1,n&=~i}}function gV(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-uf(n),o=1<<r;o&e|t[r]&e&&(t[r]|=e),n&=~o}}var Mo=0;function doe(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var hoe,mV,foe,poe,goe,WU=!1,tN=[],cv=null,uv=null,dv=null,sI=new Map,aI=new Map,z
vendor: 2,003 bytes, line 37
37y=[],kAe="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 F7(t,e){switch(t){case"focusin":case"focusout":cv=null;break;case"dragenter":case"dragleave":uv=null;break;case"mouseover":case"mouseout":dv=null;break;case"pointerover":case"pointerout":sI.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":aI.delete(e.pointerId)}}function WA(t,e,n,r,o,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},e!==null&&(e=UP(e),e!==null&&mV(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function FAe(t,e,n,r,o){switch(e){case"focusin":return cv=WA(cv,t,e,n,r,o),!0;case"dragenter":return uv=WA(uv,t,e,n,r,o),!0;case"mouseover":return dv=WA(dv,t,e,n,r,o),!0;case"pointerover":var i=o.pointerId;return sI.set(i,WA(sI.get(i)||null,t,e,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,aI.set(i,WA(aI.get(i)||null,t,e,n,r,o)),!0}return!1}function moe(t){var e=Db(t.target);if(e!==null){var n=XC(e);if(n!==null){if(e=n.tag,e===13){if(e=ooe(n),e!==null){t.blockedOn=e,goe(t.priority,function(){foe(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function OM(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=jU(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);HU=r,n.target.dispatchEvent(r),HU=null}else return e=UP(n),e!==null&&mV(e),t.blockedOn=n,!1;e.shift()}return!0}function B7(t,e,n){OM(t)&&n.delete(e)}function BAe(){WU=!1,cv!==null&&OM(cv)&&(cv=null),uv!==null&&OM(uv)&&(uv=null),dv!==null&&OM(dv)&&(dv=null),sI.forEach(B7),aI.forEac
vendor: 4,515 bytes, line 37
37h(B7)}function jA(t,e){t.blockedOn===e&&(t.blockedOn=null,WU||(WU=!0,od.unstable_scheduleCallback(od.unstable_NormalPriority,BAe)))}function lI(t){function e(o){return jA(o,t)}if(0<tN.length){jA(tN[0],t);for(var n=1;n<tN.length;n++){var r=tN[n];r.blockedOn===t&&(r.blockedOn=null)}}for(cv!==null&&jA(cv,t),uv!==null&&jA(uv,t),dv!==null&&jA(dv,t),sI.forEach(e),aI.forEach(e),n=0;n<zy.length;n++)r=zy[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<zy.length&&(n=zy[0],n.blockedOn===null);)moe(n),n.blockedOn===null&&zy.shift()}var d1=_m.ReactCurrentBatchConfig,PD=!0;function $Ae(t,e,n,r){var o=Mo,i=d1.transition;d1.transition=null;try{Mo=1,yV(t,e,n,r)}finally{Mo=o,d1.transition=i}}function HAe(t,e,n,r){var o=Mo,i=d1.transition;d1.transition=null;try{Mo=4,yV(t,e,n,r)}finally{Mo=o,d1.transition=i}}function yV(t,e,n,r){if(PD){var o=jU(t,e,n,r);if(o===null)tH(t,e,r,RD,n),F7(t,r);else if(FAe(o,t,e,n,r))r.stopPropagation();else if(F7(t,r),e&4&&-1<kAe.indexOf(t)){for(;o!==null;){var i=UP(o);if(i!==null&&hoe(i),i=jU(t,e,n,r),i===null&&tH(t,e,r,RD,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else tH(t,e,r,null,n)}}var RD=null;function jU(t,e,n,r){if(RD=null,t=fV(r),t=Db(t),t!==null)if(e=XC(t),e===null)t=null;else if(n=e.tag,n===13){if(t=ooe(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return RD=t,null}function yoe(t){switch(t){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(_Ae()){case pV:return 1;case loe:return 4;case _D:case IAe:return 16;case coe:return 536870912;default:return 16}default:return 16}}var Qy=null,vV=null,NM=null;function voe(){if(NM)return NM;var t,e=vV,n=e.length,r,o="value"in Qy?Qy.value:Qy.textContent,i=o.length;for(t=0;t<n&&e[t]===o[t];t++);var s=n-t;for(r=1;r<=s&&e[n-r]===o[i-r];r++);return NM=o.slice(t,1<r?1-r:void 0)}function MM(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function nN(){return!0}function $7(){return!1}function hd(t){function e(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?nN:$7,this.isPropagationStopped=$7,this}return es(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=nN)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=nN)},persist:function(){},isPersistent:nN}),e}var Ux={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bV=hd(Ux),HP=es({},Ux,{view:0,detail:0}),UAe=hd(HP),j$,q$,qA,ok=es({},HP,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:CV,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==qA&&(qA&&t.type==="mousemove"?(j$=t.screenX-qA.screenX,q$=t.screenY-qA.screenY):q$
vendor: 9,697 bytes, line 37
37=j$=0,qA=t),j$)},movementY:function(t){return"movementY"in t?t.movementY:q$}}),H7=hd(ok),zAe=es({},ok,{dataTransfer:0}),VAe=hd(zAe),GAe=es({},HP,{relatedTarget:0}),Y$=hd(GAe),WAe=es({},Ux,{animationName:0,elapsedTime:0,pseudoElement:0}),jAe=hd(WAe),qAe=es({},Ux,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),YAe=hd(qAe),XAe=es({},Ux,{data:0}),U7=hd(XAe),KAe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QAe={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"},ZAe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JAe(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=ZAe[t])?!!e[t]:!1}function CV(){return JAe}var eTe=es({},HP,{key:function(t){if(t.key){var e=KAe[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=MM(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?QAe[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:CV,charCode:function(t){return t.type==="keypress"?MM(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?MM(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),tTe=hd(eTe),nTe=es({},ok,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z7=hd(nTe),rTe=es({},HP,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:CV}),oTe=hd(rTe),iTe=es({},Ux,{propertyName:0,elapsedTime:0,pseudoElement:0}),sTe=hd(iTe),aTe=es({},ok,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),lTe=hd(aTe),cTe=[9,13,27,32],SV=hm&&"CompositionEvent"in window,g_=null;hm&&"documentMode"in document&&(g_=document.documentMode);var uTe=hm&&"TextEvent"in window&&!g_,boe=hm&&(!SV||g_&&8<g_&&11>=g_),V7=String.fromCharCode(32),G7=!1;function Coe(t,e){switch(t){case"keyup":return cTe.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Soe(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var LE=!1;function dTe(t,e){switch(t){case"compositionend":return Soe(e);case"keypress":return e.which!==32?null:(G7=!0,V7);case"textInput":return t=e.data,t===V7&&G7?null:t;default:return null}}function hTe(t,e){if(LE)return t==="compositionend"||!SV&&Coe(t,e)?(t=voe(),NM=vV=Qy=null,LE=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return boe&&e.locale!=="ko"?null:e.data;default:return null}}var fTe={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 W7(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!fTe[t.type]:e==="textarea"}function Eoe(t,e,n,r){Jre(r),e=OD(e,"onChange"),0<e.length&&(n=new bV("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var m_=null,cI=null;function pTe(t){Moe(t,0)}function ik(t){var e=BE(t);if(jre(e))return t}function gTe(t,e){if(t==="change")return e}var xoe=!1;if(hm){var X$;if(hm){var K$="oninput"in document;if(!K$){var j7=document.createElement("div");j7.setAttribute("oninput","return;"),K$=typeof j7.oninput=="function"}X$=K$}else X$=!1;xoe=X$&&(!document.documentMode||9<document.documentMode)}function q7(){m_&&(m_.detachEvent("onpropertychange",woe),cI=m_=null)}function woe(t){if(t.propertyName==="value"&&ik(cI)){var e=[];Eoe(e,cI,t,fV(t)),roe(pTe,e)}}function mTe(t,e,n){t==="focusin"?(q7(),m_=e,cI=n,m_.attachEvent("onpropertychange",woe)):t==="focusout"&&q7()}function yTe(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ik(cI)}function vTe(t,e){if(t==="click")return ik(e)}function bTe(t,e){if(t==="input"||t==="change")return ik(e)}function CTe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var bf=typeof Object.is=="function"?Object.is:CTe;function uI(t,e){if(bf(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!IU.call(e,o)||!bf(t[o],e[o]))return!1}return!0}function Y7(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function X7(t,e){var n=Y7(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Y7(n)}}function Aoe(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Aoe(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Toe(){for(var t=window,e=wD();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=wD(t.document)}return e}function EV(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function STe(t){var e=Toe(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Aoe(n.ownerDocument.documentElement,n)){if(r!==null&&EV(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!t.extend&&i>r&&(o=r,r=i,i=o),o=X7(n,i);var s=X7(n,r);o&&s&&(t.rangeCount!==1||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var ETe=hm&&"documentMode"in document&&11>=document.documentMode,kE=null,qU=null,y_=null,YU=!1;function K7(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;YU||kE==null||kE!==wD(r)||(r=kE,"selectionStart"in r&&EV(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),y_&&uI(y_,r)||(y_=r,r=OD(qU,"onSelect"),0<r.length&&(e=new bV("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=kE)))}function rN(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var FE={animationend:rN("Animation","AnimationEnd"),animationiteration:rN("Animation","AnimationIteration"),animationstart:rN("Animation","AnimationStart"),transitionend:rN("Transition","TransitionEnd")},Q$={},_oe={};hm&&(_oe=document.createElement("div").style,"AnimationEvent"in window||(delete FE.animationend.animation,delete FE.animationiteration.animation,delete FE.animationstart.animation),"TransitionEvent"in window||delete FE.transitionend.transition);function sk(t){if(Q$[t])return Q$[t];if(!FE[t])return t;var e=FE[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in _oe)return Q$[t]=e[n];return t}var Ioe=sk("animationend"),Poe=sk("animationiteration"),Roe=sk("animationstart"),Ooe=sk("transitionend"),Noe=new Map,Q7="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 s0(t,e){Noe.set(t,e),YC(e,[t])}for(var Z$=0;Z$<Q7.length;Z$++){var J$=Q7[Z$],xTe=J$.toLowerCase(),wTe=J$[0].toUpperCase()+J$.slice(1);s0(xTe,"on"+wTe)}s0(Ioe,"onAnimationEnd");s0(Poe,"onAnimationIteration");s0(Roe,"onAnimationStart");s0("dblclick","onDoubleClick");s0("focusin","onFocus");s0("focusout","onBlur");s0(Ooe,"onTransitionEnd");O1("onMouseEnter",["mouseout","mouseover"]);O1("onMouseLeave",["mouseout","mouseover"]);O1("onPointerEnter",["pointerout","pointerover"]);O1("onPointerLeave",["pointerout","pointerover"]);YC("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,795 bytes, line 37
37YC("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));YC("onBeforeInput",["compositionend","keypress","textInput","paste"]);YC("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));YC("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));YC("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var LT="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(" "),ATe=new Set("cancel close invalid load scroll toggle".split(" ").concat(LT));function Z7(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,xAe(r,e,void 0,t),t.currentTarget=null}function Moe(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],o=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Z7(o,a,c),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Z7(o,a,c),i=l}}}if(TD)throw t=VU,TD=!1,VU=null,t}function wi(t,e){var n=e[JU];n===void 0&&(n=e[JU]=new Set);var r=t+"__bubble";n.has(r)||(Doe(e,t,2,!1),n.add(r))}function eH(t,e,n){var r=0;e&&(r|=4),Doe(n,t,r,e)}var oN="_reactListening"+Math.random().toString(36).slice(2);function dI(t){if(!t[oN]){t[oN]=!0,Ure.forEach(function(n){n!=="selectionchange"&&(ATe.has(n)||eH(n,!1,t),eH(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[oN]||(e[oN]=!0,eH("selectionchange",!1,e))}}function Doe(t,e,n,r){switch(yoe(e)){case 1:var o=$Ae;break;case 4:o=HAe;break;default:o=yV}n=o.bind(null,e,n,t),o=void 0,!zU||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),r?o!==void 0?t.addEventListener(e,n,{capture:!0,passive:o}):t.addEventListener(e,n,!0):o!==void 0?t.addEventListener(e,n,{passive:o}):t.addEventListener(e,n,!1)}function tH(t,e,n,r,o){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Db(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}roe(function(){var c=i,u=fV(n),d=[];e:{var h=Noe.get(t);if(h!==void 0){var f=bV,p=t;switch(t){case"keypress":if(MM(n)===0)break e;case"keydown":case"keyup":f=tTe;break;case"focusin":p="focus",f=Y$;break;case"focusout":p="blur",f=Y$;break;case"beforeblur":case"afterblur":f=Y$;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=H7;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=VAe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=oTe;break;case Ioe:case Poe:case Roe:f=jAe;break;case Ooe:f=sTe;break;case"scroll":f=UAe;break;case"wheel":f=lTe;break;case"copy":case"cut":case"paste":f=YAe;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=z7}var m=(e&4)!==0,y=!m&&t==="scroll",v=m?h!==null?h+"Capture":null:h;m=[];for(var b=c,S;b!==null;){S=b;var w=S.stateNode;if(S.tag===5&&w!==null&&(S=w,v!==null&&(w=iI(b,v),w!=null&&m.push(hI(b,w,S)))),y)break;b=b.return}0<m.length&&(h=new f(h,p,null,n,u),d.push({event:h,listeners:m}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",h&&n!==HU&&(p=n.relatedTarget||n.fromElement)&&(Db(p)||p[fm]))break e;if((f||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,f?(p=n.relatedTarget||n.toElement,f=c,p=p?Db(p):null,p!==null&&(y=XC(p),p!==y||p.tag!==5&&p.tag!==6)&&(p=null)):(f=null,p=c),f!==p)){if(m=H7,w="onMouseLeave",v="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(m=z7,w="onPointerLeave",v="onPointerEnter",b="pointer"),y=f==null?h:BE(f),S=p==null?h:BE(p),h=new m(w,b+"leave",f,n,u),h.target=y,h.relatedTarget=S,w=null,Db(u)===c&&(m=new m(v,b+"enter",p,n,u),m.target=S,m.relatedTarget=y,w=m),y=w,f&&p)t:{for(m=f,v=p,b=0,S=m;S;S=nE(S))b++;for(S=0,w=v;w;w=nE(w))S++;for(;0<b-S;)m=nE(m),b--;for(;0<S-b;)v=nE(v),S--;for(;b--;){if(m===v||v!==null&&m===v.alternate)break t;m=nE(m),v=nE(v)}m=null}else m=null;f!==null&&J7(d,h,f,m,!1),p!==null&&y!==null&&J7(d,y,p,m,!0)}}
vendor: 5,610 bytes, lines 37-38
37e:{if(h=c?BE(c):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var A=gTe;else if(W7(h))if(xoe)A=bTe;else{A=yTe;var _=mTe}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(A=vTe);if(A&&(A=A(t,c))){Eoe(d,A,n,u);break e}_&&_(t,h,c),t==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&LU(h,"number",h.value)}switch(_=c?BE(c):window,t){case"focusin":(W7(_)||_.contentEditable==="true")&&(kE=_,qU=c,y_=null);break;case"focusout":y_=qU=kE=null;break;case"mousedown":YU=!0;break;case"contextmenu":case"mouseup":case"dragend":YU=!1,K7(d,n,u);break;case"selectionchange":if(ETe)break;case"keydown":case"keyup":K7(d,n,u)}var P;if(SV)e:{switch(t){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else LE?Coe(t,n)&&(R="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(boe&&n.locale!=="ko"&&(LE||R!=="onCompositionStart"?R==="onCompositionEnd"&&LE&&(P=voe()):(Qy=u,vV="value"in Qy?Qy.value:Qy.textContent,LE=!0)),_=OD(c,R),0<_.length&&(R=new U7(R,t,null,n,u),d.push({event:R,listeners:_}),P?R.data=P:(P=Soe(n),P!==null&&(R.data=P)))),(P=uTe?dTe(t,n):hTe(t,n))&&(c=OD(c,"onBeforeInput"),0<c.length&&(u=new U7("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=P))}Moe(d,e)})}function hI(t,e,n){return{instance:t,listener:e,currentTarget:n}}function OD(t,e){for(var n=e+"Capture",r=[];t!==null;){var o=t,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=iI(t,n),i!=null&&r.unshift(hI(t,i,o)),i=iI(t,e),i!=null&&r.push(hI(t,i,o))),t=t.return}return r}function nE(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function J7(t,e,n,r,o){for(var i=e._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=iI(n,i),l!=null&&s.unshift(hI(n,l,a))):o||(l=iI(n,i),l!=null&&s.push(hI(n,l,a)))),n=n.return}s.length!==0&&t.push({event:e,listeners:s})}var TTe=/\r\n?/g,_Te=/\u0000|\uFFFD/g;function eq(t){return(typeof t=="string"?t:""+t).replace(TTe,` 38`).replace(_Te,"")}function iN(t,e,n){if(e=eq(e),eq(t)!==e&&n)throw Error(Nt(425))}function ND(){}var XU=null,KU=null;function QU(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var ZU=typeof setTimeout=="function"?setTimeout:void 0,ITe=typeof clearTimeout=="function"?clearTimeout:void 0,tq=typeof Promise=="function"?Promise:void 0,PTe=typeof queueMicrotask=="function"?queueMicrotask:typeof tq<"u"?function(t){return tq.resolve(null).then(t).catch(RTe)}:ZU;function RTe(t){setTimeout(function(){throw t})}function nH(t,e){var n=e,r=0;do{var o=n.nextSibling;if(t.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){t.removeChild(o),lI(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);lI(e)}function hv(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function nq(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var zx=Math.random().toString(36).slice(2),bp="__reactFiber$"+zx,fI="__reactProps$"+zx,fm="__reactContainer$"+zx,JU="__reactEvents$"+zx,OTe="__reactListeners$"+zx,NTe="__reactHandles$"+zx;function Db(t){var e=t[bp];if(e)return e;for(var n=t.parentNode;n;){if(e=n[fm]||n[bp]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=nq(t);t!==null;){if(n=t[bp])return n;t=nq(t)}return e}t=n,n=t.parentNode}return null}function UP(t){return t=t[bp]||t[fm],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function BE(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Nt(33))}function ak(t){return t[fI]||null}var e3=[],$E=-1;function a0(t){return{current:t}}function Mi(t){0>$E||(t.current=e3[$E],e3[$E]=null,$E--)}function gi(t,e){$E++,e3[$E]=t.current,t.current=e}var Mv={},nc=a0(Mv),gu=a0(!1),pC=Mv;function N1(t,e){var n=t.type.contextTypes;if(!n)return Mv;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function mu(t){return t=t.childContextTypes,t!=null}function MD(){Mi(gu),Mi(nc)}function rq(t,e,n){if(nc.current!==Mv)throw Error(Nt(168));gi(nc,e),gi(gu,n)}function Loe(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(Nt(108,mAe(t)||"Unknown",o));return es({},n,r)}function DD(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Mv,pC=nc.current,gi(nc,t),gi(gu,gu.current),!0}function oq(t,e,n){var r=t.stateNode;if(!r)throw Error(Nt(169));n?(t=Loe(t,e,pC),r.__reactInternalMemoizedMergedChildContext=t,Mi(gu),Mi(nc),gi(nc,t)):Mi(gu),gi(gu,n)}var $g=null,lk=!1,rH=!1;function koe(t){$g===null?$g=[t]:$g.push(t)}function MTe(t){lk=!0,koe(t)}function l0(){if(!rH&&$g!==null){rH=!0;var t=0,e=Mo;try{var n=$g;for(Mo=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}$g=null,lk=!1}catch(o){throw $g!==null&&($g=$g.slice(t+1)),aoe(pV,l0),o}finally{Mo=e,rH=!1}}return null}
vendor: 4,160 bytes, line 38
38var HE=[],UE=0,LD=null,kD=0,th=[],nh=0,gC=null,Xg=1,Kg="";function bb(t,e){HE[UE++]=kD,HE[UE++]=LD,LD=t,kD=e}function Foe(t,e,n){th[nh++]=Xg,th[nh++]=Kg,th[nh++]=gC,gC=t;var r=Xg;t=Kg;var o=32-uf(r)-1;r&=~(1<<o),n+=1;var i=32-uf(e)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Xg=1<<32-uf(e)+o|n<<o|r,Kg=i+t}else Xg=1<<i|n<<o|r,Kg=t}function xV(t){t.return!==null&&(bb(t,1),Foe(t,1,0))}function wV(t){for(;t===LD;)LD=HE[--UE],HE[UE]=null,kD=HE[--UE],HE[UE]=null;for(;t===gC;)gC=th[--nh],th[nh]=null,Kg=th[--nh],th[nh]=null,Xg=th[--nh],th[nh]=null}var ed=null,Qu=null,Vi=!1,nf=null;function Boe(t,e){var n=lh(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function iq(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,ed=t,Qu=hv(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,ed=t,Qu=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=gC!==null?{id:Xg,overflow:Kg}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=lh(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,ed=t,Qu=null,!0):!1;default:return!1}}function t3(t){return(t.mode&1)!==0&&(t.flags&128)===0}function n3(t){if(Vi){var e=Qu;if(e){var n=e;if(!iq(t,e)){if(t3(t))throw Error(Nt(418));e=hv(n.nextSibling);var r=ed;e&&iq(t,e)?Boe(r,n):(t.flags=t.flags&-4097|2,Vi=!1,ed=t)}}else{if(t3(t))throw Error(Nt(418));t.flags=t.flags&-4097|2,Vi=!1,ed=t}}}function sq(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;ed=t}function sN(t){if(t!==ed)return!1;if(!Vi)return sq(t),Vi=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!QU(t.type,t.memoizedProps)),e&&(e=Qu)){if(t3(t))throw $oe(),Error(Nt(418));for(;e;)Boe(t,e),e=hv(e.nextSibling)}if(sq(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Nt(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Qu=hv(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Qu=null}}else Qu=ed?hv(t.stateNode.nextSibling):null;return!0}function $oe(){for(var t=Qu;t;)t=hv(t.nextSibling)}function M1(){Qu=ed=null,Vi=!1}function AV(t){nf===null?nf=[t]:nf.push(t)}var DTe=_m.ReactCurrentBatchConfig;function YA(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Nt(309));var r=n.stateNode}if(!r)throw Error(Nt(147,t));var o=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},e._stringRef=i,e)}if(typeof t!="string")throw Error(Nt(284));if(!n._owner)throw Error(Nt(290,t))}return t}function aN(t,e){throw t=Object.prototype.toString.call(e),Error(Nt(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function aq(t){var e=t._init;return e(t._payload)}function Hoe(t){function e(v,b){if(t){var S=v.deletions;S===null?(v.deletions=[b],v.flags|=16):S.push(b)}}function n(v,b){if(!t)return null;for(;b!==null;)e(v,b),b=b.sibling;return null}function r(v,b){for(v=new Map;b!==null;)b.key!==null?v.set(b.key,b):v.set(b.index,b),b=b.sibling;return v}function o(v,b){return v=mv(v,b),v.index=0,v.sibling=null,v}function i(v,b,S){return v.index=S,t?(S=v.alternate,S!==null?(S=S.index,S<b?(v.flags|=2,b):S):(v.flags|=2,b)):(v.flags|=1048576,b)}function s(v){return t&&v.alternate===null&&(v.flags|=2),v}function a(v,b,S,w){return b===null||b.tag!==6?(b=uH(S,v.mode,w),b.return=v,b):(b=o(b,S),b.return=v,b)}function l(v,b,S,w){var A=S.type;return A===DE?u(v,b,S.props.children,w,S.key):b!==null&&(b.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Dy&&aq(A)===b.type)?(w=o(b,S.props),w.ref=YA(v,b,S),w.return=v,w):(w=HM(S.type,S.key,S.props,null,v.mode,w),w.ref=YA(v,b,S),w.return=v,w)}function c(v,b,S,w){return b===null||b.tag!==4||b.stateNode.containerInfo!==S.containerInfo||b.stateNode.implementation!==S.implementation?(b=dH(S,v.mode,w
vendor: 7,913 bytes, line 38
38),b.return=v,b):(b=o(b,S.children||[]),b.return=v,b)}function u(v,b,S,w,A){return b===null||b.tag!==7?(b=Jb(S,v.mode,w,A),b.return=v,b):(b=o(b,S),b.return=v,b)}function d(v,b,S){if(typeof b=="string"&&b!==""||typeof b=="number")return b=uH(""+b,v.mode,S),b.return=v,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case KO:return S=HM(b.type,b.key,b.props,null,v.mode,S),S.ref=YA(v,null,b),S.return=v,S;case ME:return b=dH(b,v.mode,S),b.return=v,b;case Dy:var w=b._init;return d(v,w(b._payload),S)}if(MT(b)||VA(b))return b=Jb(b,v.mode,S,null),b.return=v,b;aN(v,b)}return null}function h(v,b,S,w){var A=b!==null?b.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return A!==null?null:a(v,b,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case KO:return S.key===A?l(v,b,S,w):null;case ME:return S.key===A?c(v,b,S,w):null;case Dy:return A=S._init,h(v,b,A(S._payload),w)}if(MT(S)||VA(S))return A!==null?null:u(v,b,S,w,null);aN(v,S)}return null}function f(v,b,S,w,A){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(S)||null,a(b,v,""+w,A);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case KO:return v=v.get(w.key===null?S:w.key)||null,l(b,v,w,A);case ME:return v=v.get(w.key===null?S:w.key)||null,c(b,v,w,A);case Dy:var _=w._init;return f(v,b,S,_(w._payload),A)}if(MT(w)||VA(w))return v=v.get(S)||null,u(b,v,w,A,null);aN(b,w)}return null}function p(v,b,S,w){for(var A=null,_=null,P=b,R=b=0,O=null;P!==null&&R<S.length;R++){P.index>R?(O=P,P=null):O=P.sibling;var N=h(v,P,S[R],w);if(N===null){P===null&&(P=O);break}t&&P&&N.alternate===null&&e(v,P),b=i(N,b,R),_===null?A=N:_.sibling=N,_=N,P=O}if(R===S.length)return n(v,P),Vi&&bb(v,R),A;if(P===null){for(;R<S.length;R++)P=d(v,S[R],w),P!==null&&(b=i(P,b,R),_===null?A=P:_.sibling=P,_=P);return Vi&&bb(v,R),A}for(P=r(v,P);R<S.length;R++)O=f(P,v,R,S[R],w),O!==null&&(t&&O.alternate!==null&&P.delete(O.key===null?R:O.key),b=i(O,b,R),_===null?A=O:_.sibling=O,_=O);return t&&P.forEach(function(M){return e(v,M)}),Vi&&bb(v,R),A}function m(v,b,S,w){var A=VA(S);if(typeof A!="function")throw Error(Nt(150));if(S=A.call(S),S==null)throw Error(Nt(151));for(var _=A=null,P=b,R=b=0,O=null,N=S.next();P!==null&&!N.done;R++,N=S.next()){P.index>R?(O=P,P=null):O=P.sibling;var M=h(v,P,N.value,w);if(M===null){P===null&&(P=O);break}t&&P&&M.alternate===null&&e(v,P),b=i(M,b,R),_===null?A=M:_.sibling=M,_=M,P=O}if(N.done)return n(v,P),Vi&&bb(v,R),A;if(P===null){for(;!N.done;R++,N=S.next())N=d(v,N.value,w),N!==null&&(b=i(N,b,R),_===null?A=N:_.sibling=N,_=N);return Vi&&bb(v,R),A}for(P=r(v,P);!N.done;R++,N=S.next())N=f(P,v,R,N.value,w),N!==null&&(t&&N.alternate!==null&&P.delete(N.key===null?R:N.key),b=i(N,b,R),_===null?A=N:_.sibling=N,_=N);return t&&P.forEach(function(L){return e(v,L)}),Vi&&bb(v,R),A}function y(v,b,S,w){if(typeof S=="object"&&S!==null&&S.type===DE&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case KO:e:{for(var A=S.key,_=b;_!==null;){if(_.key===A){if(A=S.type,A===DE){if(_.tag===7){n(v,_.sibling),b=o(_,S.props.children),b.return=v,v=b;break e}}else if(_.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Dy&&aq(A)===_.type){n(v,_.sibling),b=o(_,S.props),b.ref=YA(v,_,S),b.return=v,v=b;break e}n(v,_);break}else e(v,_);_=_.sibling}S.type===DE?(b=Jb(S.props.children,v.mode,w,S.key),b.return=v,v=b):(w=HM(S.type,S.key,S.props,null,v.mode,w),w.ref=YA(v,b,S),w.return=v,v=w)}return s(v);case ME:e:{for(_=S.key;b!==null;){if(b.key===_)if(b.tag===4&&b.stateNode.containerInfo===S.containerInfo&&b.stateNode.implementation===S.implementation){n(v,b.sibling),b=o(b,S.children||[]),b.return=v,v=b;break e}else{n(v,b);break}else e(v,b);b=b.sibling}b=dH(S,v.mode,w),b.return=v,v=b}return s(v);case Dy:return _=S._init,y(v,b,_(S._payload),w)}if(MT(S))return p(v,b,S,w);if(VA(S))return m(v,b,S,w);aN(v,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,b!==null&&b.tag===6?(n(v,b.sibling),b=o(b,S),b.return=v,v=b):(n(v,b),b=uH(S,v.mode,w),b.return=v,v=b),s(v)):n(v,b)}return y}var D1=Hoe(!0),Uoe=Hoe(!1),FD=a0(null),BD=null,zE=null,TV=null;function _V(){TV=zE=BD=null}function IV(t){var e=FD.current;Mi(FD),t._currentValue=e}function r3(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function h1(t,e){BD=t,TV=zE=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(cu=!0),t.firstContext=null)}function vh(t){var e=t._currentValue;if(TV!==t)if(t={context:t,memoizedValue:e,next:null},zE===null){if(BD===null)throw Error(Nt(308));zE=t,BD.dependencies={lanes:0,firstContext:t}}else zE=zE.next=t;return e}var Lb=null;function PV(t){Lb===null?Lb=[t]:Lb.push(t)}function zoe(t,e,n,r){var o=e.interleaved;return o===null?(n.next=n,PV(e)):(n.next=o.next,o.next=n),e.interleaved=n,pm(t,r)}function pm(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Ly=!1;function RV(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Voe(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function nm(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function fv(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,io&2){var o=r.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),r.pending=e,pm(t,n)}return o=r.interleaved,o===null?(e.next=e,PV(r)):(e.next=o.next,o.next=e),r.interleaved=e,pm(t,n)}function DM(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,gV(t,n)}}function lq(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=e:i=i.next=e}else o=i=e;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function $D(t,e,n,r){var o=t.updateQueue;Ly=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,u=c=l=null,a=i;do{var h=a.lane,f=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,m=a;switch(h=e,f=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,h=typeof p=="function"?p.call(f,d,h):p,h==null)break e;d=es({},d,h);break e;case 2:Ly=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,s|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(1);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,e=o.shared.interleaved,e!==null){o=e;do s|=o.lane,o=o.next;while(o!==e)}else i===null&&(o.shared.lanes=0);yC|=s,t.lanes=s,t.memoizedState=d}}function cq(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],o=r.callback;
vendor: 15,688 bytes, lines 38-40
38if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(Nt(191,o));o.call(r)}}}var zP={},Ip=a0(zP),pI=a0(zP),gI=a0(zP);function kb(t){if(t===zP)throw Error(Nt(174));return t}function OV(t,e){switch(gi(gI,e),gi(pI,t),gi(Ip,zP),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:FU(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=FU(e,t)}Mi(Ip),gi(Ip,e)}function L1(){Mi(Ip),Mi(pI),Mi(gI)}function Goe(t){kb(gI.current);var e=kb(Ip.current),n=FU(e,t.type);e!==n&&(gi(pI,t),gi(Ip,n))}function NV(t){pI.current===t&&(Mi(Ip),Mi(pI))}var Xi=a0(0);function HD(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var oH=[];function MV(){for(var t=0;t<oH.length;t++)oH[t]._workInProgressVersionPrimary=null;oH.length=0}var LM=_m.ReactCurrentDispatcher,iH=_m.ReactCurrentBatchConfig,mC=0,Zi=null,fa=null,Ga=null,UD=!1,v_=!1,mI=0,LTe=0;function $l(){throw Error(Nt(321))}function DV(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!bf(t[n],e[n]))return!1;return!0}function LV(t,e,n,r,o,i){if(mC=i,Zi=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,LM.current=t===null||t.memoizedState===null?$Te:HTe,t=n(r,o),v_){i=0;do{if(v_=!1,mI=0,25<=i)throw Error(Nt(301));i+=1,Ga=fa=null,e.updateQueue=null,LM.current=UTe,t=n(r,o)}while(v_)}if(LM.current=zD,e=fa!==null&&fa.next!==null,mC=0,Ga=fa=Zi=null,UD=!1,e)throw Error(Nt(300));return t}function kV(){var t=mI!==0;return mI=0,t}function lp(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ga===null?Zi.memoizedState=Ga=t:Ga=Ga.next=t,Ga}function bh(){if(fa===null){var t=Zi.alternate;t=t!==null?t.memoizedState:null}else t=fa.next;var e=Ga===null?Zi.memoizedState:Ga.next;if(e!==null)Ga=e,fa=t;else{if(t===null)throw Error(Nt(310));fa=t,t={memoizedState:fa.memoizedState,baseState:fa.baseState,baseQueue:fa.baseQueue,queue:fa.queue,next:null},Ga===null?Zi.memoizedState=Ga=t:Ga=Ga.next=t}return Ga}function yI(t,e){return typeof e=="function"?e(t):e}function sH(t){var e=bh(),n=e.queue;if(n===null)throw Error(Nt(311));n.lastRenderedReducer=t;var r=fa,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((mC&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,Zi.lanes|=u,yC|=u}c=c.next}while(c!==null&&c!==i);l===null?s=r:l.next=a,bf(r,e.memoizedState)||(cu=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){o=t;do i=o.lane,Zi.lanes|=i,yC|=i,o=o.next;while(o!==t)}else o===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function aH(t){var e=bh(),n=e.queue;if(n===null)throw Error(Nt(311));n.lastRenderedReducer=t;var r=n.dispatch,o=n.pending,i=e.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=t(i,s.action),s=s.next;while(s!==o);bf(i,e.memoizedState)||(cu=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function Woe(){}function joe(t,e){var n=Zi,r=bh(),o=e(),i=!bf(r.memoizedState,o);if(i&&(r.memoizedState=o,cu=!0),r=r.queue,FV(Xoe.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||Ga!==null&&Ga.memoizedState.tag&1){if(n.flags|=2048,vI(9,Yoe.bind(null,n,r,o,e),void 0,null),Xa===null)throw Error(Nt(349));mC&30||qoe(n,e,o)}return o}function qoe(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Zi.updateQueue,e===null?(e={lastEffect:null,stores:null},Zi.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Yoe(t,e,n,r){e.value=n,e.getSnapshot=r,Koe(e)&&Qoe(t)}function Xoe(t,e,n){return n(function(){Koe(e)&&Qoe(t)})}function Koe(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!bf(t,n)}catch{return!0}}function Qoe(t){var e=pm(t,1);e!==null&&df(e,t,1,-1)}function uq(t){var e=lp();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yI,lastRenderedState:t},e.queue=t,t=t.dispatch=BTe.bind(null,Zi,t),[e.memoizedState,t]}function vI(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Zi.updateQueue,e===null?(e={lastEffect:null,stores:null},Zi.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function Zoe(){return bh().memoizedState}function kM(t,e,n,r){var o=lp();Zi.flags|=t,o.memoizedState=vI(1|e,n,void 0,r===void 0?null:r)}function ck(t,e,n,r){var o=bh();r=r===void 0?null:r;var i=void 0;if(fa!==null){var s=fa.memoizedState;if(i=s.destroy,r!==null&&DV(r,s.deps)){o.memoizedState=vI(e,n,i,r);return}}Zi.flags|=t,o.memoizedState=vI(1|e,n,i,r)}function dq(t,e){return kM(8390656,8,t,e)}function FV(t,e){return ck(2048,8,t,e)}function Joe(t,e){return ck(4,2,t,e)}function eie(t,e){return ck(4,4,t,e)}function tie(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function nie(t,e,n){return n=n!=null?n.concat([t]):null,ck(4,4,tie.bind(null,e,t),n)}function BV(){}function rie(t,e){var n=bh();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&DV(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function oie(t,e){var n=bh();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&DV(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function iie(t,e,n){return mC&21?(bf(n,e)||(n=uoe(),Zi.lanes|=n,yC|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,cu=!0),t.memoizedState=n)}function kTe(t,e){var n=Mo;Mo=n!==0&&4>n?n:4,t(!0);var r=iH.transition;iH.transition={};try{t(!1),e()}finally{Mo=n,iH.transition=r}}function sie(){return bh().memoizedState}function FTe(t,e,n){var r=gv(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},aie(t))lie(e,n);else if(n=zoe(t,e,n,r),n!==null){var o=Rc();df(n,t,r,o),cie(n,e,r)}}function BTe(t,e,n){var r=gv(t),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(aie(t))lie(e,o);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var s=e.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,bf(a,s)){var l=e.interleaved;l===null?(o.next=o,PV(e)):(o.next=l.next,l.next=o),e.interleaved=o;return}}catch{}finally{}n=zoe(t,e,o,r),n!==null&&(o=Rc(),df(n,t,r,o),cie(n,e,r))}}function aie(t){var e=t.alternate;return t===Zi||e!==null&&e===Zi}function lie(t,e){v_=UD=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function cie(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,gV(t,n)}}var zD={readContext:vh,useCallback:$l,useContext:$l,useEffect:$l,useImperativeHandle:$l,useInsertionEffect:$l,useLayoutEffect:$l,useMemo:$l,useReducer:$l,useRef:$l,useState:$l,useDebugValue:$l,useDeferredValue:$l,useTransition:$l,useMutableSource:$l,useSyncExternalStore:$l,useId:$l,unstable_isNewReconciler:!1},$Te={readContext:vh,useCallback:function(t,e){return lp().memoizedState=[t,e===void 0?null:e],t},useContext:vh,useEffect:dq,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,kM(4194308,4,tie.bind(null,e,t),n)},useLayoutEffect:function(t,e){return kM(4194308,4,t,e)},useInsertionEffect:function(t,e){return kM(4,2,t,e)},useMemo:function(t,e){var n=lp();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=lp();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=FTe.bind(null,Zi,t),[r.memoizedState,t]},useRef:function(t){var e=lp();return t={current:t},e.memoizedState=t},useState:uq,useDebugValue:BV,useDeferredValue:function(t){return lp().memoizedState=t},useTransition:function(){var t=uq(!1),e=t[0];return t=kTe.bind(null,t[1]),lp().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Zi,o=lp();if(Vi){if(n===void 0)throw Error(Nt(407));n=n()}else{if(n=e(),Xa===null)throw Error(Nt(349));mC&30||qoe(r,e,n)}o.memoizedState=n;var i={value:n,getSnapshot:e};return o.queue=i,dq(Xoe.bind(null,r,i,t),[t]),r.flags|=2048,vI(9,Yoe.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=lp(),e=Xa.identifierPrefix;if(Vi){var n=Kg,r=Xg;n=(r&~(1<<32-uf(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=mI++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=LTe++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},HTe={readContext:vh,useCallback:rie,useContext:vh,useEffect:FV,useImperativeHandle:nie,useInsertionEffect:Joe,useLayoutEffect:eie,useMemo:oie,useReducer:sH,useRef:Zoe,useState:function(){return sH(yI)},useDebugValue:BV,useDeferredValue:function(t){var e=bh();return iie(e,fa.memoizedState,t)},useTransition:function(){var t=sH(yI)[0],e=bh().memoizedState;return[t,e]},useMutableSource:Woe,useSyncExternalStore:joe,useId:sie,unstable_isNewReconciler:!1},UTe={readContext:vh,useCallback:rie,useContext:vh,useEffect:FV,useImperativeHandle:nie,useInsertionEffect:Joe,useLayoutEffect:eie,useMemo:oie,useReducer:aH,useRef:Zoe,useState:function(){return aH(yI)},useDebugValue:BV,useDeferredValue:function(t){var e=bh();return fa===null?e.memoizedState=t:iie(e,fa.memoizedState,t)},useTransition:function(){var t=aH(yI)[0],e=bh().memoizedState;return[t,e]},useMutableSource:Woe,useSyncExternalStore:joe,useId:sie,unstable_isNewReconciler:!1};function Kh(t,e){if(t&&t.defaultProps){e=es({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function o3(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:es({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var uk={isMounted:function(t){return(t=t._reactInternals)?XC(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Rc(),o=gv(t),i=nm(r,o);i.payload=e,n!=null&&(i.callback=n),e=fv(t,i,o),e!==null&&(df(e,t,o,r),DM(e,t,o))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Rc(),o=gv(t),i=nm(r,o);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=fv(t,i,o),e!==null&&(df(e,t,o,r),DM(e,t,o))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Rc(),r=gv(t),o=nm(n,r);o.tag=2,e!=null&&(o.callback=e),e=fv(t,o,r),e!==null&&(df(e,t,r,n),DM(e,t,r))}};function hq(t,e,n,r,o,i,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,s):e.prototype&&e.prototype.isPureReactComponent?!uI(n,r)||!uI(o,i):!0}function uie(t,e,n){var r=!1,o=Mv,i=e.contextType;return typeof i=="object"&&i!==null?i=vh(i):(o=mu(e)?pC:nc.current,r=e.contextTypes,i=(r=r!=null)?N1(t,o):Mv),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=uk,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=o,t.__reactInternalMemoizedMaskedChildContext=i),e}function fq(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&uk.enqueueReplaceState(e,e.state,null)}function i3(t,e,n,r){var o=t.stateNode;o.props=n,o.state=t.memoizedState,o.refs={},RV(t);var i=e.contextType;typeof i=="object"&&i!==null?o.context=vh(i):(i=mu(e)?pC:nc.current,o.context=N1(t,i)),o.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(o3(t,e,i,n),o.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(e=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),e!==o.state&&uk.enqueueReplaceState(o,o.state,null),$D(t,n,o,r),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308)}function k1(t,e){try{var n="",r=e;do n+=gAe(r),r=r.return;while(r);var o=n}catch(i){o=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:o,digest:null}}function lH(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function s3(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var zTe=typeof WeakMap=="function"?WeakMap:Map;function die(t,e,n){n=nm(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){GD||(GD=!0,m3=r),s3(t,e)},n}function hie(t,e,n){n=nm(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var o=e.value;n.payload=function(){return r(o)},n.callback=function(){s3(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){s3(t,e),typeof r!="function"&&(pv===null?pv=new Set([this]):pv.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function pq(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new zTe;var o=new Set;r.set(e,o)}else o=r.get(e),o===void 0&&(o=new Set,r.set(e,o));o.has(n)||(o.add(n),t=n_e.bind(null,t,e,n),e.then(t,t))}function gq(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function mq(t,e,n,r,o){return t.mode&1?(t.flags|=65536,t.lanes=o,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=nm(-1,1),e.tag=2,fv(n,e,1))),n.lanes|=1),t)}var VTe=_m.ReactCurrentOwner,cu=!1;function Cc(t,e,n,r){e.child=t===null?Uoe(e,null,n,r):D1(e,t.child,n,r)}function yq(t,e,n,r,o){n=n.render;var i=e.ref;return h1(e,o),r=LV(t,e,n,r,i,o),n=kV(),t!==null&&!cu?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~o,gm(t,e,o)):(Vi&&n&&xV(e),e.flags|=1,Cc(t,e,r,o),e.child)}function vq(t,e,n,r,o){if(t===null){var i=n.type;return typeof i=="function"&&!jV(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,fie(t,e,i,r,o)):(t=HM(n.type,null,r,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:uI,n(s,r)&&t.ref===e.ref)return gm(t,e,o)}return e.flags|=1,t=mv(i,r),t.ref=e.ref,t.return=e,e.child=t}function fie(t,e,n,r,o){if(t!==null){var i=t.memoizedProps;if(uI(i,r)&&t.ref===e.ref)if(cu=!1,e.pendingProps=r=i,(t.lanes&o)!==0)t.flags&131072&&(cu=!0);else return e.lanes=t.lanes,gm(t,e,o)}return a3(t,e,n,r,o)}function pie(t,e,n){var r=e.pendingProps,o=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},gi(GE,Wu),Wu|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,gi(GE,Wu),Wu|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,gi(GE,Wu),Wu|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,gi(GE,Wu),Wu|=r;return Cc(t,e,o,n),e.child}function gie(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,578 bytes, line 40
40function a3(t,e,n,r,o){var i=mu(n)?pC:nc.current;return i=N1(e,i),h1(e,o),n=LV(t,e,n,r,i,o),r=kV(),t!==null&&!cu?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~o,gm(t,e,o)):(Vi&&r&&xV(e),e.flags|=1,Cc(t,e,n,o),e.child)}function bq(t,e,n,r,o){if(mu(n)){var i=!0;DD(e)}else i=!1;if(h1(e,o),e.stateNode===null)FM(t,e),uie(e,n,r),i3(e,n,r,o),r=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=vh(c):(c=mu(n)?pC:nc.current,c=N1(e,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&fq(e,s,r,c),Ly=!1;var h=e.memoizedState;s.state=h,$D(e,r,s,o),l=e.memoizedState,a!==r||h!==l||gu.current||Ly?(typeof u=="function"&&(o3(e,n,u,r),l=e.memoizedState),(a=Ly||hq(e,n,a,r,h,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,Voe(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Kh(e.type,a),s.props=c,d=e.pendingProps,h=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=vh(l):(l=mu(n)?pC:nc.current,l=N1(e,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||h!==l)&&fq(e,s,r,l),Ly=!1,h=e.memoizedState,s.state=h,$D(e,r,s,o);var p=e.memoizedState;a!==d||h!==p||gu.current||Ly?(typeof f=="function"&&(o3(e,n,f,r),p=e.memoizedState),(c=Ly||hq(e,n,c,r,h,p,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),s.props=r,s.state=p,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return l3(t,e,n,r,i,o)}function l3(t,e,n,r,o,i){gie(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return o&&oq(e,n,!1),gm(t,e,i);r=e.stateNode,VTe.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=D1(e,t.child,null,i),e.child=D1(e,null,a,i)):Cc(t,e,a,i),e.memoizedState=r.state,o&&oq(e,n,!0),e.child}function mie(t){var e=t.stateNode;e.pendingContext?rq(t,e.pendingContext,e.pendingContext!==e.context):e.context&&rq(t,e.context,!1),OV(t,e.containerInfo)}function Cq(t,e,n,r,o){return M1(),AV(o),e.flags|=256,Cc(t,e,n,r),e.child}var c3={dehydrated:null,treeContext:null,retryLane:0};function u3(t){return{baseLanes:t,cachePool:null,transitions:null}}function yie(t,e,n){var r=e.pendingProps,o=Xi.current,i=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(o&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(o|=1),gi(Xi,o&1),t===null)return n3(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,i?(r=e.mode,i=e.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=fk(s,r,0,null),t=Jb(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=u3(n),e.memoizedState=c3,t):$V(e,s));if(o=t.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return GTe(t,e,s,r,a,o,n);if(i){i=r.fallback,s=e.mode,o=t.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&e.child!==o?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=mv(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=mv
vendor: 8,362 bytes, line 40
40(a,i):(i=Jb(i,s,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,s=t.child.memoizedState,s=s===null?u3(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=t.childLanes&~n,e.memoizedState=c3,r}return i=t.child,t=i.sibling,r=mv(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function $V(t,e){return e=fk({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function lN(t,e,n,r){return r!==null&&AV(r),D1(e,t.child,null,n),t=$V(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function GTe(t,e,n,r,o,i,s){if(n)return e.flags&256?(e.flags&=-257,r=lH(Error(Nt(422))),lN(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,o=e.mode,r=fk({mode:"visible",children:r.children},o,0,null),i=Jb(i,o,s,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&D1(e,t.child,null,s),e.child.memoizedState=u3(s),e.memoizedState=c3,i);if(!(e.mode&1))return lN(t,e,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(Nt(419)),r=lH(i,r,void 0),lN(t,e,s,r)}if(a=(s&t.childLanes)!==0,cu||a){if(r=Xa,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,pm(t,o),df(r,t,o,-1))}return WV(),r=lH(Error(Nt(421))),lN(t,e,s,r)}return o.data==="$?"?(e.flags|=128,e.child=t.child,e=r_e.bind(null,t),o._reactRetry=e,null):(t=i.treeContext,Qu=hv(o.nextSibling),ed=e,Vi=!0,nf=null,t!==null&&(th[nh++]=Xg,th[nh++]=Kg,th[nh++]=gC,Xg=t.id,Kg=t.overflow,gC=e),e=$V(e,r.children),e.flags|=4096,e)}function Sq(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),r3(t.return,e,n)}function cH(t,e,n,r,o){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function vie(t,e,n){var r=e.pendingProps,o=r.revealOrder,i=r.tail;if(Cc(t,e,r.children,n),r=Xi.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Sq(t,n,e);else if(t.tag===19)Sq(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(gi(Xi,r),!(e.mode&1))e.memoizedState=null;else switch(o){case"forwards":for(n=e.child,o=null;n!==null;)t=n.alternate,t!==null&&HD(t)===null&&(o=n),n=n.sibling;n=o,n===null?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),cH(e,!1,o,n,i);break;case"backwards":for(n=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&HD(t)===null){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=t}cH(e,!0,n,null,i);break;case"together":cH(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function FM(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function gm(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),yC|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Nt(153));if(e.child!==null){for(t=e.child,n=mv(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=mv(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function WTe(t,e,n){switch(e.tag){case 3:mie(e),M1();break;case 5:Goe(e);break;case 1:mu(e.type)&&DD(e);break;case 4:OV(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,o=e.memoizedProps.value;gi(FD,r._currentValue),r._currentValue=o;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(gi(Xi,Xi.current&1),e.flags|=128,null):n&e.child.childLanes?yie(t,e,n):(gi(Xi,Xi.current&1),t=gm(t,e,n),t!==null?t.sibling:null);gi(Xi,Xi.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return vie(t,e,n);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),gi(Xi,Xi.current),r)break;return null;case 22:case 23:return e.lanes=0,pie(t,e,n)}return gm(t,e,n)}var bie,d3,Cie,Sie;bie=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};d3=function(){};Cie=function(t,e,n,r){var o=t.memoizedProps;if(o!==r){t=e.stateNode,kb(Ip.current);var i=null;switch(n){case"input":o=MU(t,o),r=MU(t,r),i=[];break;case"select":o=es({},o,{value:void 0}),r=es({},r,{value:void 0}),i=[];break;case"textarea":o=kU(t,o),r=kU(t,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=ND)}BU(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(rI.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=o?.[c],r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(rI.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&wi("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};Sie=function(t,e,n,r){n!==r&&(e.flags|=4)};function XA(t,e){if(!Vi)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Hl(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var o=t.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function jTe(t,e,n){var r=e.pendingProps;switch(wV(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hl(e),null;case 1:return mu(e.type)&&MD(),Hl(e),null;case 3:return r=e.stateNode,L1(),Mi(gu),Mi(nc),MV(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(sN(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,nf!==null&&(b3(nf),nf=null))),d3(t,e),Hl(e),null;case 5:NV(e);var o=kb(gI.current);if(n=e.type,t!==null&&e.stateNode!=null)Cie(t,e,n,r,o),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Nt(166));return Hl(e),null}if(t=kb(Ip.current),sN(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[bp]=e,r[fI]=i,t=(e.mode&1)!==0,n){case"dialog":wi("cancel",r),wi("close",r);break;case"iframe":case"object":case"embed":wi("load",r);break;case"video":case"audio":for(o=0;o<LT.length;o++)wi(LT[o],r);break;case"source":wi("error",r);break;case"img":case"image":case"link":wi("error",r),wi("load",r);break;case"details":wi("toggle",r);break;case"input":R7(r,i),wi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},wi("invalid",r);break;case"textarea":N7(r,i),wi("invalid",r)}BU(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];
vendor: 9,380 bytes, line 40
40s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&iN(r.textContent,a,t),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&iN(r.textContent,a,t),o=["children",""+a]):rI.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&wi("scroll",r)}switch(n){case"input":QO(r),O7(r,i,!0);break;case"textarea":QO(r),M7(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ND)}r=o,e.updateQueue=r,r!==null&&(e.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Xre(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[bp]=e,t[fI]=r,bie(t,e,!1,!1),e.stateNode=t;e:{switch(s=$U(n,r),n){case"dialog":wi("cancel",t),wi("close",t),o=r;break;case"iframe":case"object":case"embed":wi("load",t),o=r;break;case"video":case"audio":for(o=0;o<LT.length;o++)wi(LT[o],t);o=r;break;case"source":wi("error",t),o=r;break;case"img":case"image":case"link":wi("error",t),wi("load",t),o=r;break;case"details":wi("toggle",t),o=r;break;case"input":R7(t,r),o=MU(t,r),wi("invalid",t);break;case"option":o=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},o=es({},r,{value:void 0}),wi("invalid",t);break;case"textarea":N7(t,r),o=kU(t,r),wi("invalid",t);break;default:o=r}BU(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Zre(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Kre(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&oI(t,l):typeof l=="number"&&oI(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(rI.hasOwnProperty(i)?l!=null&&i==="onScroll"&&wi("scroll",t):l!=null&&cV(t,i,l,s))}switch(n){case"input":QO(t),O7(t,r,!1);break;case"textarea":QO(t),M7(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Nv(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?l1(t,!!r.multiple,i,!1):r.defaultValue!=null&&l1(t,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(t.onclick=ND)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Hl(e),null;case 6:if(t&&e.stateNode!=null)Sie(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(Nt(166));if(n=kb(gI.current),kb(Ip.current),sN(e)){if(r=e.stateNode,n=e.memoizedProps,r[bp]=e,(i=r.nodeValue!==n)&&(t=ed,t!==null))switch(t.tag){case 3:iN(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&iN(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[bp]=e,e.stateNode=r}return Hl(e),null;case 13:if(Mi(Xi),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Vi&&Qu!==null&&e.mode&1&&!(e.flags&128))$oe(),M1(),e.flags|=98560,i=!1;else if(i=sN(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(Nt(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Nt(317));i[bp]=e}else M1(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Hl(e),i=!1}else nf!==null&&(b3(nf),nf=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Xi.current&1?ba===0&&(ba=3):WV())),e.updateQueue!==null&&(e.flags|=4),Hl(e),null);case 4:return L1(),d3(t,e),t===null&&dI(e.stateNode.containerInfo),Hl(e),null;case 10:return IV(e.type._context),Hl(e),null;case 17:return mu(e.type)&&MD(),Hl(e),null;case 19:if(Mi(Xi),i=e.memoizedState,i===null)return Hl(e),null;if(r=(e.flags&128)!==0,s=i.rendering,s===null)if(r)XA(i,!1);else{if(ba!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=HD(t),s!==null){for(e.flags|=128,XA(i,!1),r=s.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,t=s.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return gi(Xi,Xi.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ns()>F1&&(e.flags|=128,r=!0,XA(i,!1),e.lanes=4194304)}else{if(!r)if(t=HD(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),XA(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Vi)return Hl(e),null}else 2*Ns()-i.renderingStartTime>F1&&n!==1073741824&&(e.flags|=128,r=!0,XA(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(n=i.last,n!==null?n.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ns(),e.sibling=null,n=Xi.current,gi(Xi,r?n&1|2:n&1),e):(Hl(e),null);case 22:case 23:return GV(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Wu&1073741824&&(Hl(e),e.subtreeFlags&6&&(e.flags|=8192)):Hl(e),null;case 24:return null;case 25:return null}throw Error(Nt(156,e.tag))}function qTe(t,e){switch(wV(e),e.tag){case 1:return mu(e.type)&&MD(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return L1(),Mi(gu),Mi(nc),MV(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return NV(e),null;case 13:if(Mi(Xi),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Nt(340));M1()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Mi(Xi),null;case 4:return L1(),null;case 10:return IV(e.type._context),null;case 22:case 23:return GV(),null;case 24:return null;default:return null}}var cN=!1,jl=!1,YTe=typeof WeakSet=="function"?WeakSet:Set,bn=null;function VE(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fs(t,e,r)}else n.current=null}function h3(t,e,n){try{n()}catch(r){fs(t,e,r)}}var Eq=!1;function XTe(t,e){if(XU=PD,t=Toe(),EV(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=t,h=null;t:for(;;){for(var f;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===t)break t;if(h===n&&++c===o&&(a=s),h===i&&++u===r&&(l=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(KU={focusedElem:t,selectionRange:n},PD=!1,bn=e;bn!==null;)if(e=bn,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,bn=t;else for(;bn!==null;){e=bn;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,y=p.memoizedState,v=e.stateNode,b=v.getSnapshotBeforeUpdate(e.elementType===e.type?m:Kh(e.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Nt(163))}}catch(w){fs(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,bn=t;break}bn=e.return}return p=Eq,Eq=!1,p}function b_(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var i=o.destroy;o.destroy=void 0,i!==void 0&&h3(e,n,i)}o=o.next}while(o!==r)}}function dk(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function f3(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Eie(t){var e=t.alternate;e!==null&&(t.alternate=null,Eie(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[bp],delete e[fI],delete e[JU],delete e[OTe],delete e[NTe])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function xie(t){return t.tag===5||t.tag===3||t.tag===4}function xq(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xie(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function p3(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.a
vendor: 2,379 bytes, line 40
40ppendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ND));else if(r!==4&&(t=t.child,t!==null))for(p3(t,e,n),t=t.sibling;t!==null;)p3(t,e,n),t=t.sibling}function g3(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(g3(t,e,n),t=t.sibling;t!==null;)g3(t,e,n),t=t.sibling}var pl=null,ef=!1;function xy(t,e,n){for(n=n.child;n!==null;)wie(t,e,n),n=n.sibling}function wie(t,e,n){if(_p&&typeof _p.onCommitFiberUnmount=="function")try{_p.onCommitFiberUnmount(rk,n)}catch{}switch(n.tag){case 5:jl||VE(n,e);case 6:var r=pl,o=ef;pl=null,xy(t,e,n),pl=r,ef=o,pl!==null&&(ef?(t=pl,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):pl.removeChild(n.stateNode));break;case 18:pl!==null&&(ef?(t=pl,n=n.stateNode,t.nodeType===8?nH(t.parentNode,n):t.nodeType===1&&nH(t,n),lI(t)):nH(pl,n.stateNode));break;case 4:r=pl,o=ef,pl=n.stateNode.containerInfo,ef=!0,xy(t,e,n),pl=r,ef=o;break;case 0:case 11:case 14:case 15:if(!jl&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&h3(n,e,s),o=o.next}while(o!==r)}xy(t,e,n);break;case 1:if(!jl&&(VE(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){fs(n,e,a)}xy(t,e,n);break;case 21:xy(t,e,n);break;case 22:n.mode&1?(jl=(r=jl)||n.memoizedState!==null,xy(t,e,n),jl=r):xy(t,e,n);break;default:xy(t,e,n)}}function wq(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new YTe),e.forEach(function(r){var o=o_e.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function jh(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=t,s=e,a=s;e:for(;a!==null;){switch(a.tag){case 5:pl=a.stateNode,ef=!1;break e;case 3:pl=a.stateNode.containerInfo,ef=!0;break e;case 4:pl=a.stateNode.containerInfo,ef=!0;break e}a=a.return}if(pl===null)throw Error(Nt(160));wie(i,s,o),pl=null,ef=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){fs(o,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Aie(e,t),e=e.sibling}function Aie(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(jh(e,t),ep(t),r&4){try{b_(3,t,t.return),dk(3,t)}catch(m){fs(t,t.return,m)}
vendor: 5,919 bytes, line 40
40try{b_(5,t,t.return)}catch(m){fs(t,t.return,m)}}break;case 1:jh(e,t),ep(t),r&512&&n!==null&&VE(n,n.return);break;case 5:if(jh(e,t),ep(t),r&512&&n!==null&&VE(n,n.return),t.flags&32){var o=t.stateNode;try{oI(o,"")}catch(m){fs(t,t.return,m)}}if(r&4&&(o=t.stateNode,o!=null)){var i=t.memoizedProps,s=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&qre(o,i),$U(a,s);var c=$U(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?Zre(o,d):u==="dangerouslySetInnerHTML"?Kre(o,d):u==="children"?oI(o,d):cV(o,u,d,c)}switch(a){case"input":DU(o,i);break;case"textarea":Yre(o,i);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?l1(o,!!i.multiple,f,!1):h!==!!i.multiple&&(i.defaultValue!=null?l1(o,!!i.multiple,i.defaultValue,!0):l1(o,!!i.multiple,i.multiple?[]:"",!1))}o[fI]=i}catch(m){fs(t,t.return,m)}}break;case 6:if(jh(e,t),ep(t),r&4){if(t.stateNode===null)throw Error(Nt(162));o=t.stateNode,i=t.memoizedProps;try{o.nodeValue=i}catch(m){fs(t,t.return,m)}}break;case 3:if(jh(e,t),ep(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{lI(e.containerInfo)}catch(m){fs(t,t.return,m)}break;case 4:jh(e,t),ep(t);break;case 13:jh(e,t),ep(t),o=t.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(zV=Ns())),r&4&&wq(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(jl=(c=jl)||u,jh(e,t),jl=c):jh(e,t),ep(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(bn=t,u=t.child;u!==null;){for(d=bn=u;bn!==null;){switch(h=bn,f=h.child,h.tag){case 0:case 11:case 14:case 15:b_(4,h,h.return);break;case 1:VE(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(m){fs(r,n,m)}}break;case 5:VE(h,h.return);break;case 22:if(h.memoizedState!==null){Tq(d);continue}}f!==null?(f.return=h,bn=f):Tq(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Qre("display",s))}catch(m){fs(t,t.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){fs(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:jh(e,t),ep(t),r&4&&wq(t);break;case 21:break;default:jh(e,t),ep(t)}}function ep(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(xie(n)){var r=n;break e}n=n.return}throw Error(Nt(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(oI(o,""),r.flags&=-33);var i=xq(t);g3(t,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=xq(t);p3(t,a,s);break;default:throw Error(Nt(161))}}catch(l){fs(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function KTe(t,e,n){bn=t,Tie(t)}function Tie(t,e,n){for(var r=(t.mode&1)!==0;bn!==null;){var o=bn,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||cN;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||jl;a=cN;var c=jl;if(cN=s,(jl=l)&&!c)for(bn=o;bn!==null;)s=bn,l=s.child,s.tag===22&&s.memoizedState!==null?_q(o):l!==null?(l.return=s,bn=l):_q(o);for(;i!==null;)bn=i,Tie(i),i=i.sibling;bn=o,cN=a,jl=c}Aq(t)}else o.subtreeFlags&8772&&i!==null?(i.return=o,bn=i):Aq(t)}}function Aq(t){for(;bn!==null;){var e=bn;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:jl||dk(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!jl)if(n===null)r.componentDidMount();else{var o=e.elementType===e.type?n.memoizedProps:Kh(e.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&cq(e,i,r);break;case 3:var s=e.updateQueue;if(s!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}cq(e,s,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.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:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&lI(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Nt(163))}jl||e.flags&512&&f3(e)}catch(h){fs(e,e.return,h)}}if(e===t){bn=null;break}if(n=e.sibling,n!==null){n.return=e.return,bn=n;break}bn=e.return}}function Tq(t){for(;bn!==null;){var e=bn;if(e===t){bn=null;break}var n=e.sibling;if(n!==null){n.return=e.return,bn=n;break}bn=e.return}}function _q(t){for(;bn!==null;){var e=bn;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{dk(4,e)}catch(l){fs(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var o=e.return;try{r.componentDidMount()}catch(l){fs(e,o,l)}}var i=e.return;try{f3(e)}catch(l){fs(e,i,l)}break;case 5:var s=e.return;try{f3(e)}catch(l){fs(e,s,l)}}}catch(l){fs(e,e.return,l)}if(e===t){bn=null;break}var a=e.sibling;if(a!==null){a.return=e.return,bn=a;break}bn=e.return}}var QTe=Math.ceil,VD=_m.ReactCurrentDispatcher,HV=_m.ReactCurrentOwner,ph=_m.ReactCurrentBatchConfig,io=0,Xa=null,Ys=null,_l=0,Wu=0,GE=a0(0),ba=0,bI=null,yC=0,hk=0,UV=0,C_=null,au=null,zV=0,F1=1/0,Lg=null,GD=!1,m3=null,pv=null,uN=!1,Zy=null,WD=0,S_=0,y3=null,BM=-1,$M=0;function Rc(){return io&6?Ns():BM!==-1?BM:BM=Ns()}
vendor: 10,331 bytes, line 40
40function gv(t){return t.mode&1?io&2&&_l!==0?_l&-_l:DTe.transition!==null?($M===0&&($M=uoe()),$M):(t=Mo,t!==0||(t=window.event,t=t===void 0?16:yoe(t.type)),t):1}function df(t,e,n,r){if(50<S_)throw S_=0,y3=null,Error(Nt(185));$P(t,n,r),(!(io&2)||t!==Xa)&&(t===Xa&&(!(io&2)&&(hk|=n),ba===4&&Vy(t,_l)),yu(t,r),n===1&&io===0&&!(e.mode&1)&&(F1=Ns()+500,lk&&l0()))}function yu(t,e){var n=t.callbackNode;DAe(t,e);var r=ID(t,t===Xa?_l:0);if(r===0)n!==null&&k7(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&k7(n),e===1)t.tag===0?MTe(Iq.bind(null,t)):koe(Iq.bind(null,t)),PTe(function(){!(io&6)&&l0()}),n=null;else{switch(doe(r)){case 1:n=pV;break;case 4:n=loe;break;case 16:n=_D;break;case 536870912:n=coe;break;default:n=_D}n=Die(n,_ie.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function _ie(t,e){if(BM=-1,$M=0,io&6)throw Error(Nt(327));var n=t.callbackNode;if(f1()&&t.callbackNode!==n)return null;var r=ID(t,t===Xa?_l:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=jD(t,r);else{e=r;var o=io;io|=2;var i=Pie();(Xa!==t||_l!==e)&&(Lg=null,F1=Ns()+500,Zb(t,e));do try{e_e();break}catch(a){Iie(t,a)}while(1);_V(),VD.current=i,io=o,Ys!==null?e=0:(Xa=null,_l=0,e=ba)}if(e!==0){if(e===2&&(o=GU(t),o!==0&&(r=o,e=v3(t,o))),e===1)throw n=bI,Zb(t,0),Vy(t,r),yu(t,Ns()),n;if(e===6)Vy(t,r);else{if(o=t.current.alternate,!(r&30)&&!ZTe(o)&&(e=jD(t,r),e===2&&(i=GU(t),i!==0&&(r=i,e=v3(t,i))),e===1))throw n=bI,Zb(t,0),Vy(t,r),yu(t,Ns()),n;switch(t.finishedWork=o,t.finishedLanes=r,e){case 0:case 1:throw Error(Nt(345));case 2:Cb(t,au,Lg);break;case 3:if(Vy(t,r),(r&130023424)===r&&(e=zV+500-Ns(),10<e)){if(ID(t,0)!==0)break;if(o=t.suspendedLanes,(o&r)!==r){Rc(),t.pingedLanes|=t.suspendedLanes&o;break}t.timeoutHandle=ZU(Cb.bind(null,t,au,Lg),e);break}Cb(t,au,Lg);break;case 4:if(Vy(t,r),(r&4194240)===r)break;for(e=t.eventTimes,o=-1;0<r;){var s=31-uf(r);i=1<<s,s=e[s],s>o&&(o=s),r&=~i}if(r=o,r=Ns()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QTe(r/1960))-r,10<r){t.timeoutHandle=ZU(Cb.bind(null,t,au,Lg),r);break}Cb(t,au,Lg);break;case 5:Cb(t,au,Lg);break;default:throw Error(Nt(329))}}}return yu(t,Ns()),t.callbackNode===n?_ie.bind(null,t):null}function v3(t,e){var n=C_;return t.current.memoizedState.isDehydrated&&(Zb(t,e).flags|=256),t=jD(t,e),t!==2&&(e=au,au=n,e!==null&&b3(e)),t}function b3(t){au===null?au=t:au.push.apply(au,t)}function ZTe(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!bf(i(),o))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Vy(t,e){for(e&=~UV,e&=~hk,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-uf(e),r=1<<n;t[n]=-1,e&=~r}}function Iq(t){if(io&6)throw Error(Nt(327));f1();var e=ID(t,0);if(!(e&1))return yu(t,Ns()),null;var n=jD(t,e);if(t.tag!==0&&n===2){var r=GU(t);r!==0&&(e=r,n=v3(t,r))}if(n===1)throw n=bI,Zb(t,0),Vy(t,e),yu(t,Ns()),n;if(n===6)throw Error(Nt(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Cb(t,au,Lg),yu(t,Ns()),null}function VV(t,e){var n=io;io|=1;try{return t(e)}finally{io=n,io===0&&(F1=Ns()+500,lk&&l0())}}function vC(t){Zy!==null&&Zy.tag===0&&!(io&6)&&f1();var e=io;io|=1;var n=ph.transition,r=Mo;try{if(ph.transition=null,Mo=1,t)return t()}finally{Mo=r,ph.transition=n,io=e,!(io&6)&&l0()}}function GV(){Wu=GE.current,Mi(GE)}function Zb(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,ITe(n)),Ys!==null)for(n=Ys.return;n!==null;){var r=n;switch(wV(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&MD();break;case 3:L1(),Mi(gu),Mi(nc),MV();break;case 5:NV(r);break;case 4:L1();break;case 13:Mi(Xi);break;case 19:Mi(Xi);break;case 10:IV(r.type._context);break;case 22:case 23:GV()}n=n.return}if(Xa=t,Ys=t=mv(t.current,null),_l=Wu=e,ba=0,bI=null,UV=hk=yC=0,au=C_=null,Lb!==null){for(e=0;e<Lb.length;e++)if(n=Lb[e],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Lb=null}return t}function Iie(t,e){do{var n=Ys;try{if(_V(),LM.current=zD,UD){for(var r=Zi.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}UD=!1}if(mC=0,Ga=fa=Zi=null,v_=!1,mI=0,HV.current=null,n===null||n.return===null){ba=1,bI=e,Ys=null;break}e:{var i=t,s=n.return,a=n,l=e;if(e=_l,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=gq(s);if(f!==null){f.flags&=-257,mq(f,s,a,i,e),f.mode&1&&pq(i,c,e),e=f,l=c;var p=e.updateQueue;if(p===null){var m=new Set;m.add(l),e.updateQueue=m}else p.add(l);break e}else{if(!(e&1)){pq(i,c,e),WV();break e}l=Error(Nt(426))}}else if(Vi&&a.mode&1){var y=gq(s);if(y!==null){!(y.flags&65536)&&(y.flags|=256),mq(y,s,a,i,e),AV(k1(l,a));break e}}i=l=k1(l,a),ba!==4&&(ba=2),C_===null?C_=[i]:C_.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var v=die(i,l,e);lq(i,v);break e;case 1:a=l;var b=i.type,S=i.stateNode;if(!(i.flags&128)&&(typeof b.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(pv===null||!pv.has(S)))){i.flags|=65536,e&=-e,i.lanes|=e;var w=hie(i,a,e);lq(i,w);break e}}i=i.return}while(i!==null)}Oie(n)}catch(A){e=A,Ys===n&&n!==null&&(Ys=n=n.return);continue}break}while(1)}function Pie(){var t=VD.current;return VD.current=zD,t===null?zD:t}function WV(){(ba===0||ba===3||ba===2)&&(ba=4),Xa===null||!(yC&268435455)&&!(hk&268435455)||Vy(Xa,_l)}function jD(t,e){var n=io;io|=2;var r=Pie();(Xa!==t||_l!==e)&&(Lg=null,Zb(t,e));do try{JTe();break}catch(o){Iie(t,o)}while(1);if(_V(),io=n,VD.current=r,Ys!==null)throw Error(Nt(261));return Xa=null,_l=0,ba}function JTe(){for(;Ys!==null;)Rie(Ys)}function e_e(){for(;Ys!==null&&!AAe();)Rie(Ys)}function Rie(t){var e=Mie(t.alternate,t,Wu);t.memoizedProps=t.pendingProps,e===null?Oie(t):Ys=e,HV.current=null}function Oie(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=qTe(n,e),n!==null){n.flags&=32767,Ys=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ba=6,Ys=null;return}}else if(n=jTe(n,e,Wu),n!==null){Ys=n;return}if(e=e.sibling,e!==null){Ys=e;return}Ys=e=t}while(e!==null);ba===0&&(ba=5)}function Cb(t,e,n){var r=Mo,o=ph.transition;try{ph.transition=null,Mo=1,t_e(t,e,n,r)}finally{ph.transition=o,Mo=r}return null}function t_e(t,e,n,r){do f1();while(Zy!==null);if(io&6)throw Error(Nt(327));n=t.finishedWork;var o=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(Nt(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(LAe(t,i),t===Xa&&(Ys=Xa=null,_l=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||uN||(uN=!0,Die(_D,function(){return f1(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ph.transition,ph.transition=null;var s=Mo;Mo=1;var a=io;io|=4,HV.current=null,XTe(t,n),Aie(n,t),STe(KU),PD=!!XU,KU=XU=null,t.current=n,KTe(n),TAe(),io=a,Mo=s,ph.transition=i}else t.current=n;if(uN&&(uN=!1,Zy=t,WD=o),i=t.pendingLanes,i===0&&(pv=null),PAe(n.stateNode),yu(t,Ns()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)o=e[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(GD)throw GD=!1,t=m3,m3=null,t;return WD&1&&t.tag!==0&&f1(),i=t.pendingLanes,i&1?t===y3?S_++:(S_=0,y3=t):S_=0,l0(),null}function f1(){if(Zy!==null){var t=doe(WD),e=ph.transition,n=Mo;try{if(ph.transition=null,Mo=16>t?16:t,Zy===null)var r=!1;else{if(t=Zy,Zy=null,WD=0,io&6)throw Error(Nt(331));var o=io;for(io|=4,bn=t.current;bn!==null;){var i=bn,s=i.child;if(bn.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(bn=c;bn!==null;){var u=bn;switch(u.tag){case 0:case 11:case 15:b_(8,u,i)}var d=u.child;if(d!==null)d.return=u,bn=d;else for(;bn!==null;){u=bn;var h=u.sibling,f=u.return;if(Eie(u),u===c){bn=null;break}if(h!==null){h.return=f,bn=h;break}bn=f}}}var p=i.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}bn=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,bn=s;else e:for(;bn!==null;){if(i=bn,i.flags&2048)switch(i.tag){case 0:case 11:case 15:b_(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,bn=v;break e}bn=i.return}}var b=t.current;for(bn=b;bn!==null;){s=bn;var S=s.child;if(s.subtreeFlags&2064&&S!==null)S.return=s,bn=S;else e:for(s=b;bn!==null;){if(a=bn,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:dk(9,a)}}catch(A){fs(a,a.return,A)}if(a===s){bn=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,bn=w;break e}bn=a.return}}if(io=o,l0(),_p&&typeof _p.onPostCommitFiberRoot=="function")try{_p.onPostCommitFiberRoot(rk,t)}catch{}r=!0}return r}finally{Mo=n,ph.transition=e}}return!1}function Pq(t,e,n){e=k1(n,e),e=die(t,e,1),t=fv(t,e,1),e=Rc(),t!==null&&($P(t,1,e),yu(t,e))}function fs(t,e,n){if(t.tag===3)Pq(t,t,n);else for(;e!==null;){if(e.tag===3){Pq(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(pv===null||!pv.has(r))){t=k1(n,t),t=hie(e,t,1),e=fv(e,t,1),t=Rc(),e!==null&&($P(e,1,t),yu(e,t));break}}e=e.return}}function n_e(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Rc(),t.pingedLanes|=t.suspendedLanes&n,Xa===t&&(_l&n)===n&&(ba===4||ba===3&&(_l&130023424)===_l&&500>Ns()-zV?Zb(t,0):UV|=n),yu(t,e)}function Nie(t,e){e===0&&(t.mode&1?(e=eN,eN<<=1,!(eN&130023424)&&(eN=4194304)):e=1);var n=Rc();t=pm(t,e),t!==null&&($P(t,e,n),yu(t,n))}function r_e(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Nie(t,n)}function o_e(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Nt(314))}r!==null&&r.delete(e),Nie(t,n)}var Mie;Mie=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||gu.current)cu=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return cu=!1,WTe(t,e,n);cu=!!(t.flags&131072)}
vendor: 4,634 bytes, line 40
40else cu=!1,Vi&&e.flags&1048576&&Foe(e,kD,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;FM(t,e),t=e.pendingProps;var o=N1(e,nc.current);h1(e,n),o=LV(null,e,r,t,o,n);var i=kV();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,mu(r)?(i=!0,DD(e)):i=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,RV(e),o.updater=uk,e.stateNode=o,o._reactInternals=e,i3(e,r,t,n),e=l3(null,e,r,!0,i,n)):(e.tag=0,Vi&&i&&xV(e),Cc(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(FM(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=s_e(r),t=Kh(r,t),o){case 0:e=a3(null,e,r,t,n);break e;case 1:e=bq(null,e,r,t,n);break e;case 11:e=yq(null,e,r,t,n);break e;case 14:e=vq(null,e,r,Kh(r.type,t),n);break e}throw Error(Nt(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Kh(r,o),a3(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Kh(r,o),bq(t,e,r,o,n);case 3:e:{if(mie(e),t===null)throw Error(Nt(387));r=e.pendingProps,i=e.memoizedState,o=i.element,Voe(t,e),$D(e,r,null,n);var s=e.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){o=k1(Error(Nt(423)),e),e=Cq(t,e,r,n,o);break e}else if(r!==o){o=k1(Error(Nt(424)),e),e=Cq(t,e,r,n,o);break e}else for(Qu=hv(e.stateNode.containerInfo.firstChild),ed=e,Vi=!0,nf=null,n=Uoe(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M1(),r===o){e=gm(t,e,n);break e}Cc(t,e,r,n)}e=e.child}return e;case 5:return Goe(e),t===null&&n3(e),r=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,s=o.children,QU(r,o)?s=null:i!==null&&QU(r,i)&&(e.flags|=32),gie(t,e),Cc(t,e,s,n),e.child;case 6:return t===null&&n3(e),null;case 13:return yie(t,e,n);case 4:return OV(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=D1(e,null,r,n):Cc(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Kh(r,o),yq(t,e,r,o,n);case 7:return Cc(t,e,e.pendingProps,n),e.child;case 8:return Cc(t,e,e.pendingProps.children,n),e.child;case 12:return Cc(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,i=e.memoizedProps,s=o.value,gi(FD,r._currentValue),r._currentValue=s,i!==null)if(bf(i.value,s)){if(i.children===o.children&&!gu.current){e=gm(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=nm(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),r3(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===e.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(Nt(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),r3(s,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Cc(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,h1(e,n),o=vh(o),r=r(o),e.flags|=1,Cc(t,e,r,n),e.child;case 14:return r=e.type,o=Kh(r,e.pendingProps),o=Kh(r.type,o),vq(t,e,r,o,n);case 15:return fie(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Kh(r,o),FM(t,e),e.tag=1,mu(r)?(t=!0,DD(e)):t=!1,h1(e,n),uie(e,r,o),i3(e,r,o,n),l3(null,e,r,!0,t,n);case 19:return vie(t,e,n);case 22:return pie(t,e,n)}throw Error(Nt(156,e.tag))};function Die(t,e){return aoe(t,e)}function i_e(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 lh(t,e,n,r){return new i_e(t,e,n,r)}function jV(t){return t=t.prototype,!(!t||!t.isReactComponent)}function s_e(t){if(typeof t=="function")return jV(t)?1:0;if(t!=null){if(t=t.$$typeof,t===dV)return 11;if(t===hV)return 14}return 2}function mv(t,e){var n=t.alternate;return n===null?(n=lh(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 6,863 bytes, line 40
40ons=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function HM(t,e,n,r,o,i){var s=2;if(r=t,typeof t=="function")jV(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case DE:return Jb(n.children,o,i,e);case uV:s=8,o|=8;break;case PU:return t=lh(12,n,e,o|2),t.elementType=PU,t.lanes=i,t;case RU:return t=lh(13,n,e,o),t.elementType=RU,t.lanes=i,t;case OU:return t=lh(19,n,e,o),t.elementType=OU,t.lanes=i,t;case Gre:return fk(n,o,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case zre:s=10;break e;case Vre:s=9;break e;case dV:s=11;break e;case hV:s=14;break e;case Dy:s=16,r=null;break e}throw Error(Nt(130,t==null?t:typeof t,""))}return e=lh(s,n,e,o),e.elementType=t,e.type=r,e.lanes=i,e}function Jb(t,e,n,r){return t=lh(7,t,r,e),t.lanes=n,t}function fk(t,e,n,r){return t=lh(22,t,r,e),t.elementType=Gre,t.lanes=n,t.stateNode={isHidden:!1},t}function uH(t,e,n){return t=lh(6,t,null,e),t.lanes=n,t}function dH(t,e,n){return e=lh(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function a_e(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=W$(0),this.expirationTimes=W$(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=W$(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function qV(t,e,n,r,o,i,s,a,l){return t=new a_e(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=lh(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},RV(i),t}function l_e(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ME,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function Lie(t){if(!t)return Mv;t=t._reactInternals;e:{if(XC(t)!==t||t.tag!==1)throw Error(Nt(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(mu(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Nt(171))}if(t.tag===1){var n=t.type;if(mu(n))return Loe(t,n,e)}return e}function kie(t,e,n,r,o,i,s,a,l){return t=qV(n,r,!0,t,o,i,s,a,l),t.context=Lie(null),n=t.current,r=Rc(),o=gv(n),i=nm(r,o),i.callback=e??null,fv(n,i,o),t.current.lanes=o,$P(t,o,r),yu(t,r),t}function pk(t,e,n,r){var o=e.current,i=Rc(),s=gv(o);return n=Lie(n),e.context===null?e.context=n:e.pendingContext=n,e=nm(i,s),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=fv(o,e,s),t!==null&&(df(t,o,s,i),DM(t,o,s)),s}function qD(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Rq(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function YV(t,e){Rq(t,e),(t=t.alternate)&&Rq(t,e)}function c_e(){return null}var Fie=typeof reportError=="function"?reportError:function(t){console.error(t)};function XV(t){this._internalRoot=t}gk.prototype.render=XV.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Nt(409));pk(t,e,null,null)};gk.prototype.unmount=XV.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;vC(function(){pk(null,t,null,null)}),e[fm]=null}};function gk(t){this._internalRoot=t}gk.prototype.unstable_scheduleHydration=function(t){if(t){var e=poe();t={blockedOn:null,target:t,priority:e};for(var n=0;n<zy.length&&e!==0&&e<zy[n].priority;n++);zy.splice(n,0,t),n===0&&moe(t)}};function KV(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function mk(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Oq(){}function u_e(t,e,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=qD(s);i.call(c)}}var s=kie(e,r,t,0,null,!1,!1,"",Oq);return t._reactRootContainer=s,t[fm]=s.current,dI(t.nodeType===8?t.parentNode:t),vC(),s}for(;o=t.lastChild;)t.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=qD(l);a.call(c)}}var l=qV(t,0,!1,null,null,!1,!1,"",Oq);return t._reactRootContainer=l,t[fm]=l.current,dI(t.nodeType===8?t.parentNode:t),vC(function(){pk(e,l,n,r)}),l}function yk(t,e,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=qD(s);a.call(l)}}pk(e,s,t,o)}else s=u_e(n,e,t,o,r);return qD(s)}hoe=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=DT(e.pendingLanes);n!==0&&(gV(e,n|1),yu(e,Ns()),!(io&6)&&(F1=Ns()+500,l0()))}break;case 13:vC(function(){var r=pm(t,1);if(r!==null){var o=Rc();df(r,t,1,o)}}),YV(t,1)}};mV=function(t){if(t.tag===13){var e=pm(t,134217728);if(e!==null){var n=Rc();df(e,t,134217728,n)}YV(t,134217728)}};foe=function(t){if(t.tag===13){var e=gv(t),n=pm(t,e);if(n!==null){var r=Rc();df(n,t,e,r)}YV(t,e)}};poe=function(){return Mo};goe=function(t,e){var n=Mo;try{return Mo=t,e()}finally{Mo=n}};UU=function(t,e,n){switch(e){case"input":if(DU(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var o=ak(r);if(!o)throw Error(Nt(90));jre(r),DU(r,o)}}}break;case"textarea":Yre(t,n);break;case"select":e=n.value,e!=null&&l1(t,!!n.multiple,e,!1)}};toe=VV;noe=vC;var d_e={usingClientEntryPoint:!1,Events:[UP,BE,ak,Jre,eoe,VV]},KA={findFiberByHostInstance:Db,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},h_e={bundleType:KA.bundleType,version:KA.version,rendererPackageName:KA.rendererPackageName,rendererConfig:KA.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_m.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=ioe(t),t===null?null:t.stateNode},findFiberByHostInstance:KA.findFiberByHostInstance||c_e,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dN=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dN.isDisabled&&dN.supportsFiber)try{rk=dN.inject(h_e),_p=dN}catch{}}dd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d_e;dd.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!KV(e))throw Error(Nt(200));return l_e(t,e,null,n)};dd.createRoot=function(t,e){if(!KV(t))throw Error(Nt(299));var n=!1,r="",o=Fie;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=qV(t,1,!1,null,null,n,!1,r,o),t[fm]=e.current,dI(t.nodeType===8?t.parentNode:t),new XV(e)};dd.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Nt(188)):(t=Object.keys(t).join(","),Error(Nt(268,t)));return t=ioe(e),t=t===null?null:t.stateNode,t};dd.flushSync=function(t){return vC(t)};dd.hydrate=function(t,e,n){if(!mk(e))throw Error(Nt(200));return yk(null,t,e,!0,n)};dd.hydrateRoot=function(t,e,n){if(!KV(t))throw Error(Nt(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=Fie;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),e=kie(e,null,t,1,n??null,o,!1,i,s),t[fm]=e.current,dI(t),r)for(t=0;t<r.length;t++)n=r[t],o=n._getVersion,o=o(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,o]:e.mutableSourceEagerHydrationData.push(n,o);return new gk(e)};dd.render=function(t,e,n){if(!mk(e))throw Error(Nt(200));return yk(null,t,e,!1,n)};dd.unmountComponentAtNode=function(t){if(!mk(t))throw Error(Nt(40));return t._reactRootContainer?(vC(function(){yk(null,null,t,!1,function(){t._reactRootContainer=null,t[fm]=null})}),!0):!1};dd.unstable_batchedUpdates=VV;dd.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!mk(n))throw Error(Nt(200));if(t==null||t._reactInternals===void 0)throw Error(Nt(38));return yk(t,e,n,!1,r)};dd.version="18.3.1-next-f1338f8080-20240426";function Bie(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bie)}catch(t){console.error(t)}}Bie(),Bre.exports=dd;var Vx=Bre.exports;const hN=ud(Vx);var Nq=Vx;_U.createRoot=Nq.createRoot,_U.hydrateRoot=Nq.hydrateRoot;/** 41 * @remix-run/router v1.16.1 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */function CI(){return CI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},CI.apply(this,arguments)}var Jy;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Jy||(Jy={}));const Mq="popstate";function f_e(t){t===void 0&&(t={});function e(r,o){let{pathname:i,search:s,hash:a}=r.location;return C3("",{pathname:i,search:s,hash:a},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Hie(o)}return g_e(e,n,null,t)}function Ea(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function $ie(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function p_e(){return Math.random().toString(36).substr(2,8)}function Dq(t,e){return{usr:t.state,key:t.key,idx:e}}function C3(t,e,n,r){return n===void 0&&(n=null),CI({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Gx(e):e,{state:n,key:e&&e.key||r||p_e()})}function Hie(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Gx(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function g_e(t,e,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Jy.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(CI({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=Jy.Pop;let y=u(),v=y==null?null:y-c;c=y,l&&l({action:a,location:m.location,delta:v})}function h(y,v){a=Jy.Push;let b=C3(m.location,y,v);n&&n(b,y),c=u()+1;let S=Dq(b,c),w=m.createHref(b);
vendor: 3,227 bytes, line 49
49try{s.pushState(S,"",w)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;o.location.assign(w)}i&&l&&l({action:a,location:m.location,delta:1})}function f(y,v){a=Jy.Replace;let b=C3(m.location,y,v);n&&n(b,y),c=u();let S=Dq(b,c),w=m.createHref(b);s.replaceState(S,"",w),i&&l&&l({action:a,location:m.location,delta:0})}function p(y){let v=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof y=="string"?y:Hie(y);return b=b.replace(/ $/,"%20"),Ea(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let m={get action(){return a},get location(){return t(o,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Mq,d),l=y,()=>{o.removeEventListener(Mq,d),l=null}},createHref(y){return e(o,y)},createURL:p,encodeLocation(y){let v=p(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:f,go(y){return s.go(y)}};return m}var Lq;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Lq||(Lq={}));function m_e(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?Gx(e):e,o=Vie(r.pathname||"/",n);if(o==null)return null;let i=Uie(t);y_e(i);let s=null;for(let a=0;s==null&&a<i.length;++a){let l=P_e(o);s=T_e(i[a],l)}return s}function Uie(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,s,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Ea(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=eC([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Ea(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Uie(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:w_e(c,i.index),routesMeta:u})};return t.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of zie(i.path))o(i,s,l)}),e}function zie(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=zie(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function y_e(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:A_e(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const v_e=/^:[\w-]+$/,b_e=3,C_e=2,S_e=1,E_e=10,x_e=-2,kq=t=>t==="*";function w_e(t,e){let n=t.split("/"),r=n.length;return n.some(kq)&&(r+=x_e),e&&(r+=C_e),n.filter(o=>!kq(o)).reduce((o,i)=>o+(v_e.test(i)?b_e:i===""?S_e:E_e),r)}function A_e(t,e){return t.length===e.length&&t.slice(0,-1).every((r,o)=>r===e[o])?t[t.length-1]-e[e.length-1]:0}function T_e(t,e){let{routesMeta:n}=t,r={},o="/",i=[];for(let s=0;s<n.length;++s){let a=n[s],l=s===n.length-1,c=o==="/"?e:e.slice(o.length)||"/",u=__e({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!u)return null;
vendor: 14,500 bytes, lines 49-83
49Object.assign(r,u.params);let d=a.route;i.push({params:r,pathname:eC([o,u.pathname]),pathnameBase:L_e(eC([o,u.pathnameBase])),route:d}),u.pathnameBase!=="/"&&(o=eC([o,u.pathnameBase]))}return i}function __e(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=I_e(t.path,t.caseSensitive,t.end),o=e.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:f}=u;if(h==="*"){let m=a[d]||"";s=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[d];return f&&!p?c[h]=void 0:c[h]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:t}}function I_e(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),$ie(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),r]}function P_e(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return $ie(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Vie(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function R_e(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:o=""}=typeof t=="string"?Gx(t):t;return{pathname:n?n.startsWith("/")?n:O_e(n,e):e,search:k_e(r),hash:F_e(o)}}function O_e(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function hH(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function N_e(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function M_e(t,e){let n=N_e(t);return e?n.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function D_e(t,e,n,r){r===void 0&&(r=!1);let o;typeof t=="string"?o=Gx(t):(o=CI({},t),Ea(!o.pathname||!o.pathname.includes("?"),hH("?","pathname","search",o)),Ea(!o.pathname||!o.pathname.includes("#"),hH("#","pathname","hash",o)),Ea(!o.search||!o.search.includes("#"),hH("#","search","hash",o)));let i=t===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=n;else{let d=e.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}a=d>=0?e[d]:"/"}let l=R_e(o,a),c=s&&s!=="/"&&s.endsWith("/"),u=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const eC=t=>t.join("/").replace(/\/\/+/g,"/"),L_e=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),k_e=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,F_e=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function B_e(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Gie=["post","put","patch","delete"];new Set(Gie);const $_e=["get",...Gie];new Set($_e);/** 50 * React Router v6.23.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */function SI(){return SI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},SI.apply(this,arguments)}const QV=C.createContext(null),H_e=C.createContext(null),vk=C.createContext(null),bk=C.createContext(null),c0=C.createContext({outlet:null,matches:[],isDataRoute:!1}),Wie=C.createContext(null);function Ck(){return C.useContext(bk)!=null}function u0(){return Ck()||Ea(!1),C.useContext(bk).location}function jie(t){C.useContext(vk).static||C.useLayoutEffect(t)}function Za(){let{isDataRoute:t}=C.useContext(c0);return t?tIe():U_e()}function U_e(){Ck()||Ea(!1);let t=C.useContext(QV),{basename:e,future:n,navigator:r}=C.useContext(vk),{matches:o}=C.useContext(c0),{pathname:i}=u0(),s=JSON.stringify(M_e(o,n.v7_relativeSplatPath)),a=C.useRef(!1);return jie(()=>{a.current=!0}),C.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=D_e(c,JSON.parse(s),i,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:eC([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,s,i,t])}const z_e=C.createContext(null);function V_e(t){let e=C.useContext(c0).outlet;return e&&C.createElement(z_e.Provider,{value:t},e)}function Wx(){let{matches:t}=C.useContext(c0),e=t[t.length-1];return e?e.params:{}}function G_e(t,e){return W_e(t,e)}function W_e(t,e,n,r){Ck()||Ea(!1);let{navigator:o}=C.useContext(vk),{matches:i}=C.useContext(c0),s=i[i.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=u0(),u;if(e){var d;let y=typeof e=="string"?Gx(e):e;l==="/"||(d=y.pathname)!=null&&d.startsWith(l)||Ea(!1),u=y}else u=c;let h=u.pathname||"/",f=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=m_e(t,{pathname:f}),m=K_e(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:eC([l,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:eC([l,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return e&&m?C.createElement(bk.Provider,{value:{location:SI({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Jy.Pop}},m):m}function j_e(){let t=eIe(),e=B_e(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),n?C.createElement("pre",{style:o},n):null,i)}const q_e=C.createElement(j_e,null);class Y_e extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?C.createElement(c0.Provider,{value:this.props.routeContext},C.createElement(Wie.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function X_e(t){let{routeContext:e,match:n,children:r}=t,o=C.useContext(QV);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(c0.Provider,{value:e},r)}function K_e(t,e,n,r){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let s=t,a=(o=n)==null?void 0:o.errors;if(a!=null){let u=s.findIndex(d=>d.route.id&&a?.[d.route.id]!==void 0);u>=0||Ea(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<s.length;u++){let d=s[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:f}=n,p=d.route.loader&&h[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||p){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,h)=>{let f,p=!1,m=null,y=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||q_e,l&&(c<0&&h===0?(nIe("route-fallback",!1),p=!0,y=null):c===h&&(p=!0,y=d.route.hydrateFallbackElement||null)));let v=e.concat(s.slice(0,h+1)),b=()=>{let S;return f?S=m:p?S=y:d.route.Component?S=C.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=u,C.createElement(X_e,{match:d,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?C.createElement(Y_e,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var qie=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(qie||{}),YD=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(YD||{});function Q_e(t){let e=C.useContext(QV);return e||Ea(!1),e}function Z_e(t){let e=C.useContext(H_e);return e||Ea(!1),e}function J_e(t){let e=C.useContext(c0);return e||Ea(!1),e}function Yie(t){let e=J_e(),n=e.matches[e.matches.length-1];return n.route.id||Ea(!1),n.route.id}function eIe(){var t;let e=C.useContext(Wie),n=Z_e(YD.UseRouteError),r=Yie(YD.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function tIe(){let{router:t}=Q_e(qie.UseNavigateStable),e=Yie(YD.UseNavigateStable),n=C.useRef(!1);return jie(()=>{n.current=!0}),C.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,SI({fromRouteId:e},i)))},[t,e])}const Fq={};function nIe(t,e,n){!e&&!Fq[t]&&(Fq[t]=!0)}function ZV(t){return V_e(t.context)}function Ua(t){Ea(!1)}function rIe(t){let{basename:e="/",children:n=null,location:r,navigationType:o=Jy.Pop,navigator:i,static:s=!1,future:a}=t;Ck()&&Ea(!1);let l=e.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:l,navigator:i,static:s,future:SI({v7_relativeSplatPath:!1},a)}),[l,a,i,s]);typeof r=="string"&&(r=Gx(r));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:p="default"}=r,m=C.useMemo(()=>{let y=Vie(u,l);return y==null?null:{location:{pathname:y,search:d,hash:h,state:f,key:p},navigationType:o}},[l,u,d,h,f,p,o]);return m==null?null:C.createElement(vk.Provider,{value:c},C.createElement(bk.Provider,{children:n,value:m}))}function oIe(t){let{children:e,location:n}=t;return G_e(S3(e),n)}new Promise(()=>{});function S3(t,e){e===void 0&&(e=[]);let n=[];return C.Children.forEach(t,(r,o)=>{if(!C.isValidElement(r))return;let i=[...e,o];if(r.type===C.Fragment){n.push.apply(n,S3(r.props.children,i));return}r.type!==Ua&&Ea(!1),!r.props.index||!r.props.children||Ea(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=S3(r.props.children,i)),n.push(s)}),n}/** 59 * React Router DOM v6.23.1 60 * 61 * Copyright (c) Remix Software Inc. 62 * 63 * This source code is licensed under the MIT license found in the 64 * LICENSE.md file in the root directory of this source tree. 65 * 66 * @license MIT 67 */const iIe="6";try{window.__reactRouterVersion=iIe}catch{}const sIe="startTransition",Bq=fC[sIe];function aIe(t){let{basename:e,children:n,future:r,window:o}=t,i=C.useRef();i.current==null&&(i.current=f_e({window:o,v5Compat:!0}));let s=i.current,[a,l]=C.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=C.useCallback(d=>{c&&Bq?Bq(()=>l(d)):l(d)},[l,c]);return C.useLayoutEffect(()=>s.listen(u),[s,u]),C.createElement(rIe,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var $q;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})($q||($q={}));var Hq;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Hq||(Hq={}));var Xie={exports:{}},Kie={};/** 68 * @license React 69 * use-sync-external-store-shim.production.min.js 70 * 71 * Copyright (c) Facebook, Inc. and its affiliates. 72 * 73 * This source code is licensed under the MIT license found in the 74 * LICENSE file in the root directory of this source tree. 75 */var B1=C;function lIe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var cIe=typeof Object.is=="function"?Object.is:lIe,uIe=B1.useState,dIe=B1.useEffect,hIe=B1.useLayoutEffect,fIe=B1.useDebugValue;function pIe(t,e){var n=e(),r=uIe({inst:{value:n,getSnapshot:e}}),o=r[0].inst,i=r[1];return hIe(function(){o.value=n,o.getSnapshot=e,fH(o)&&i({inst:o})},[t,n,e]),dIe(function(){return fH(o)&&i({inst:o}),t(function(){fH(o)&&i({inst:o})})},[t]),fIe(n),n}function fH(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!cIe(t,n)}catch{return!0}}function gIe(t,e){return e()}var mIe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?gIe:pIe;Kie.useSyncExternalStore=B1.useSyncExternalStore!==void 0?B1.useSyncExternalStore:mIe;Xie.exports=Kie;var Sk=Xie.exports,Qie={exports:{}},Zie={};/** 76 * @license React 77 * use-sync-external-store-shim/with-selector.production.min.js 78 * 79 * Copyright (c) Facebook, Inc. and its affiliates. 80 * 81 * This source code is licensed under the MIT license found in the 82 * LICENSE file in the root directory of this source tree. 83 */var Ek=C,yIe=Sk;function vIe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}
83var bIe=typeof Object.is=="function"?Object.is:vIe,CIe=yIe.useSyncExternalStore,SIe=Ek.useRef,EIe=Ek.useEffect,xIe=Ek.useMemo,wIe=Ek.useDebugValue;Zie.useSyncExternalStoreWithSelector=function(t,e,n,r,o){var i=SIe(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=xIe(function(){function l(f){if(!c){if(c=!0,u=f,f=r(f),o!==void 0&&s.hasValue){var p=s.value;if(o(p,f))return d=p}return d=f}if(p=d,bIe(u,f))return p;var m=r(f);return o!==void 0&&o(p,m)?p:(u=f,d=m)}var c=!1,u,d,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,o]);var a=CIe(t,i[0],i[1]);return EIe(function(){s.hasValue=!0,s.value=a},[a]),wIe(a),a};Qie.exports=Zie;var AIe=Qie.exports;function TIe(t){t()}let Jie=TIe;const _Ie=t=>Jie=t,IIe=()=>Jie,Uq=Symbol.for("react-redux-context"),zq=typeof globalThis<"u"?globalThis:{};function PIe(){var t;if(!C.createContext)return{};const e=(t=zq[Uq])!=null?t:zq[Uq]=new Map;let n=e.get(C.createContext);return n||(n=C.createContext(null),e.set(C.createContext,n)),n}const Dv=PIe();function JV(t=Dv){return function(){return C.useContext(t)}}const ese=JV(),RIe=()=>{throw new Error("uSES not initialized!")};let tse=RIe;const OIe=t=>{tse=t},NIe=(t,e)=>t===e;function MIe(t=Dv){const e=t===Dv?ese:JV(t);return function(r,o={}){const{equalityFn:i=NIe,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:c,getServerState:u,stabilityCheck:d,noopCheck:h}=e();C.useRef(!0);const f=C.useCallback({[r.name](m){return r(m)}}[r.name],[r,d,s]),p=tse(c.addNestedSub,l.getState,u||l.getState,f,i);return C.useDebugValue(p),p}}const nse=MIe();function X(){return X=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},X.apply(null,arguments)}function at(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var rse={exports:{}},Do={};/** @license React v16.13.1 84 * react-is.production.min.js 85 * 86 * Copyright (c) Facebook, Inc. and its affiliates. 87 * 88 * This source code is licensed under the MIT license found in the 89 * LICENSE file in the root directory of this source tree. 90 */var Ja=typeof Symbol=="function"&&Symbol.for,eG=Ja?Symbol.for("react.element"):60103,tG=Ja?Symbol.for("react.portal"):60106,xk=Ja?Symbol.for("react.fragment"):60107,wk=Ja?Symbol.for("react.strict_mode"):60108,Ak=Ja?Symbol.for("react.profiler"):60114,Tk=Ja?Symbol.for("react.provider"):60109,_k=Ja?Symbol.for("react.context"):60110,nG=Ja?Symbol.for("react.async_mode"):60111,Ik=Ja?Symbol.for("react.concurrent_mode"):60111,Pk=Ja?Symbol.for("react.forward_ref"):60112,Rk=Ja?Symbol.for("react.suspense"):60113,DIe=Ja?Symbol.for("react.suspense_list"):60120,Ok=Ja?Symbol.for("react.memo"):60115,Nk=Ja?Symbol.for("react.lazy"):60116,LIe=Ja?Symbol.for("react.block"):60121,kIe=Ja?Symbol.for("react.fundamental"):60117,FIe=Ja?Symbol.for("react.responder"):60118,BIe=Ja?Symbol.for("react.scope"):60119;function fd(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case eG:switch(t=t.type,t){case nG:case Ik:case xk:case Ak:case wk:case Rk:return t;default:switch(t=t&&t.$$typeof,t){case _k:case Pk:case Nk:case Ok:case Tk:return t;default:return e}}case tG:return e}}}function ose(t){return fd(t)===Ik}Do.AsyncMode=nG;Do.ConcurrentMode=Ik;Do.ContextConsumer=_k;Do.ContextProvider=Tk;Do.Element=eG;Do.ForwardRef=Pk;Do.Fragment=xk;Do.Lazy=Nk;Do.Memo=Ok;Do.Portal=tG;Do.Profiler=Ak;Do.StrictMode=wk;Do.Suspense=Rk;Do.isAsyncMode=function(t){return ose(t)||fd(t)===nG};Do.isConcurrentMode=ose;Do.isContextConsumer=function(t){return fd(t)===_k};Do.isContextProvider=function(t){return fd(t)===Tk};Do.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===eG};Do.isForwardRef=function(t){return fd(t)===Pk};Do.isFragment=function(t){return fd(t)===xk};Do.isLazy=function(t){return fd(t)===Nk};Do.isMemo=function(t){return fd(t)===Ok};Do.isPortal=function(t){return fd(t)===tG};Do.isProfiler=function(t){return fd(t)===Ak};Do.isStrictMode=function(t){return fd(t)===wk};Do.isSuspense=function(t){return fd(t)===Rk};Do.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===xk||t===Ik||t===Ak||t===wk||t===Rk||t===DIe||typeof t=="object"&&t!==null&&(t.$$typeof===Nk||t.$$typeof===Ok||t.$$typeof===Tk||t.$$typeof===_k||t.$$typeof===Pk||t.$$typeof===kIe||t.$$typeof===FIe||t.$$typeof===BIe||t.$$typeof===LIe)};Do.typeOf=fd;rse.exports=Do;
90var $Ie=rse.exports,ise=$Ie,HIe={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},UIe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sse={};sse[ise.ForwardRef]=HIe;sse[ise.Memo]=UIe;var ase={exports:{}},Lo={};/** 91 * @license React 92 * react-is.production.min.js 93 * 94 * Copyright (c) Facebook, Inc. and its affiliates. 95 * 96 * This source code is licensed under the MIT license found in the 97 * LICENSE file in the root directory of this source tree. 98 */var rG=Symbol.for("react.element"),oG=Symbol.for("react.portal"),Mk=Symbol.for("react.fragment"),Dk=Symbol.for("react.strict_mode"),Lk=Symbol.for("react.profiler"),kk=Symbol.for("react.provider"),Fk=Symbol.for("react.context"),zIe=Symbol.for("react.server_context"),Bk=Symbol.for("react.forward_ref"),$k=Symbol.for("react.suspense"),Hk=Symbol.for("react.suspense_list"),Uk=Symbol.for("react.memo"),zk=Symbol.for("react.lazy"),VIe=Symbol.for("react.offscreen"),lse;lse=Symbol.for("react.module.reference");function Ph(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case rG:switch(t=t.type,t){case Mk:case Lk:case Dk:case $k:case Hk:return t;default:switch(t=t&&t.$$typeof,t){case zIe:case Fk:case Bk:case zk:case Uk:case kk:return t;default:return e}}case oG:return e}}}Lo.ContextConsumer=Fk;Lo.ContextProvider=kk;Lo.Element=rG;Lo.ForwardRef=Bk;Lo.Fragment=Mk;Lo.Lazy=zk;Lo.Memo=Uk;Lo.Portal=oG;Lo.Profiler=Lk;Lo.StrictMode=Dk;Lo.Suspense=$k;Lo.SuspenseList=Hk;Lo.isAsyncMode=function(){return!1};Lo.isConcurrentMode=function(){return!1};Lo.isContextConsumer=function(t){return Ph(t)===Fk};Lo.isContextProvider=function(t){return Ph(t)===kk};Lo.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===rG};Lo.isForwardRef=function(t){return Ph(t)===Bk};Lo.isFragment=function(t){return Ph(t)===Mk};Lo.isLazy=function(t){return Ph(t)===zk};Lo.isMemo=function(t){return Ph(t)===Uk};Lo.isPortal=function(t){return Ph(t)===oG};Lo.isProfiler=function(t){return Ph(t)===Lk};Lo.isStrictMode=function(t){return Ph(t)===Dk};Lo.isSuspense=function(t){return Ph(t)===$k};Lo.isSuspenseList=function(t){return Ph(t)===Hk};Lo.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Mk||t===Lk||t===Dk||t===$k||t===Hk||t===VIe||typeof t=="object"&&t!==null&&(t.$$typeof===zk||t.$$typeof===Uk||t.$$typeof===kk||t.$$typeof===Fk||t.$$typeof===Bk||t.$$typeof===lse||t.getModuleId!==void 0)};Lo.typeOf=Ph;ase.exports=Lo;var Vq=ase.exports;function GIe(){const t=IIe();let e=null,n=null;return{clear(){e=null,n=null},notify(){t(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=e;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:e=i,function(){!o||e===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}const Gq={notify(){},get:()=>[]};function WIe(t,e){let n,r=Gq,o=0,i=!1;function s(m){u();const y=r.subscribe(m);let v=!1;return()=>{v||(v=!0,y(),d())}}function a(){r.notify()}function l(){p.onStateChange&&p.onStateChange()}function c(){return i}function u(){o++,n||(n=e?e.addNestedSub(l):t.subscribe(l),r=GIe())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Gq)}function h(){i||(i=!0,u())}function f(){i&&(i=!1,d())}const p={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:h,tryUnsubscribe:f,getListeners:()=>r};return p}const jIe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qIe=jIe?C.useLayoutEffect:C.useEffect;function Wq(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function XD(t,e){if(Wq(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(e,n[o])||!Wq(t[n[o]],e[n[o]]))return!1;return!0}function YIe({store:t,context:e,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){const s=C.useMemo(()=>{const c=WIe(t);return{store:t,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[t,r,o,i]),a=C.useMemo(()=>t.getState(),[t]);qIe(()=>{const{subscription:c}=s;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),a!==t.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[s,a]);const l=e||Dv;return C.createElement(l.Provider,{value:s},n)}function cse(t=Dv){const e=t===Dv?ese:JV(t);return function(){const{store:r}=e();return r}}const use=cse();function XIe(t=Dv){const e=t===Dv?use:cse(t);return function(){return e().dispatch}}const VP=XIe();OIe(AIe.useSyncExternalStoreWithSelector);_Ie(Vx.unstable_batchedUpdates);function wl(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Cf(t){return!!t&&!!t[Ii]}function Sf(t){var e;return!!t&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===oPe}(t)||Array.isArray(t)||!!t[E_]||!!(!((e=t.constructor)===null||e===void 0)&&e[E_])||Vk(t)||Gk(t))}function KIe(t){return Cf(t)||wl(23,t),t[Ii].t}function Lv(t,e,n){n===void 0&&(n=!1),kv(t)===0?(n?Object.keys:p1)(t).forEach(function(r){n&&typeof r=="symbol"||e(r,t[r],t)}):t.forEach(function(r,o){return e(o,r,t)})}function kv(t){var e=t[Ii];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Vk(t)?2:Gk(t)?3:0}function yv(t,e){return kv(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function UM(t,e){return kv(t)===2?t.get(e):t[e]}function dse(t,e,n){var r=kv(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function hse(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Vk(t){return nPe&&t instanceof Map}function Gk(t){return rPe&&t instanceof Set}function Sb(t){return t.o||t.t}function iG(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=pse(t);delete e[Ii];for(var n=p1(e),r=0;r<n.length;r++){var o=n[r],i=e[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]})}return Object.create(Object.getPrototypeOf(t),e)}function sG(t,e){return e===void 0&&(e=!1),aG(t)||Cf(t)||!Sf(t)||(kv(t)>1&&(t.set=t.add=t.clear=t.delete=QIe),Object.freeze(t),e&&Lv(t,function(n,r){return sG(r,!0)},!0)),t}function QIe(){wl(2)}function aG(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Pp(t){var e=A3[t];return e||wl(18,t),e}function fse(t,e){A3[t]||(A3[t]=e)}function E3(){return EI}function pH(t,e){e&&(Pp("Patches"),t.u=[],t.s=[],t.v=e)}function KD(t){x3(t),t.p.forEach(ZIe),t.p=null}function x3(t){t===EI&&(EI=t.l)}function jq(t){return EI={p:[],l:EI,h:t,m:!0,_:0}}function ZIe(t){var e=t[Ii];e.i===0||e.i===1?e.j():e.g=!0}function gH(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.O||Pp("ES5").S(e,t,r),r?(n[Ii].P&&(KD(e),wl(4)),Sf(t)&&(t=QD(e,t),e.l||ZD(e,t)),e.u&&Pp("Patches").M(n[Ii].t,t,e.u,e.s)):t=QD(e,n,[]),KD(e),e.u&&e.v(e.u,e.
98s),t!==cG?t:void 0}function QD(t,e,n){if(aG(e))return e;var r=e[Ii];if(!r)return Lv(e,function(a,l){return qq(t,r,e,a,l,n)},!0),e;if(r.A!==t)return e;if(!r.P)return ZD(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=iG(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Lv(i,function(a,l){return qq(t,r,o,a,l,n,s)}),ZD(t,o,!1),n&&t.u&&Pp("Patches").N(r,n,t.u,t.s)}return r.o}function qq(t,e,n,r,o,i,s){if(Cf(o)){var a=QD(t,o,i&&e&&e.i!==3&&!yv(e.R,r)?i.concat(r):void 0);if(dse(n,r,a),!Cf(a))return;t.m=!1}else s&&n.add(o);if(Sf(o)&&!aG(o)){if(!t.h.D&&t._<1)return;QD(t,o),e&&e.A.l||ZD(t,o)}}function ZD(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&sG(e,n)}function mH(t,e){var n=t[Ii];return(n?Sb(n):t)[e]}function Yq(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Gy(t){t.P||(t.P=!0,t.l&&Gy(t.l))}function yH(t){t.o||(t.o=iG(t.t))}function w3(t,e,n){var r=Vk(e)?Pp("MapSet").F(e,n):Gk(e)?Pp("MapSet").T(e,n):t.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:E3(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,c=xI;s&&(l=[a],c=kT);var u=Proxy.revocable(l,c),d=u.revoke,h=u.proxy;return a.k=h,a.j=d,h}(e,n):Pp("ES5").J(e,n);return(n?n.A:E3()).p.push(r),r}function JIe(t){return Cf(t)||wl(22,t),function e(n){if(!Sf(n))return n;var r,o=n[Ii],i=kv(n);if(o){if(!o.P&&(o.i<4||!Pp("ES5").K(o)))return o.t;o.I=!0,r=Xq(n,i),o.I=!1}else r=Xq(n,i);return Lv(r,function(s,a){o&&UM(o.t,s)===a||dse(r,s,e(a))}),i===3?new Set(r):r}(t)}function Xq(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return iG(t)}function ePe(){function t(i,s){var a=o[i];return a?a.enumerable=s:o[i]=a={configurable:!0,enumerable:s,get:function(){var l=this[Ii];return xI.get(l,i)},set:function(l){var c=this[Ii];xI.set(c,i,l)}},a}function e(i){for(var s=i.length-1;s>=0;s--){var a=i[s][Ii];if(!a.P)switch(a.i){case 5:r(a)&&Gy(a);break;case 4:n(a)&&Gy(a)}}}function n(i){for(var s=i.t,a=i.k,l=p1(a),c=l.length-1;c>=0;c--){var u=l[c];if(u!==Ii){var d=s[u];if(d===void 0&&!yv(s,u))return!0;var h=a[u],f=h&&h[Ii];if(f?f.t!==d:!hse(h,d))return!0}}var p=!!s[Ii];return l.length!==p1(s).length+(p?0:1)}function r(i){var s=i.k;if(s.length!==i.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l<s.length;l++)if(!s.hasOwnProperty(l))return!0;return!1}var o={};fse("ES5",{J:function(i,s){var a=Array.isArray(i),l=function(u,d){if(u){for(var h=Array(d.length),f=0;f<d.length;f++)Object.defineProperty(h,""+f,t(f,!0));return h}var p=pse(d);delete p[Ii];for(var m=p1(p),y=0;y<m.length;y++){var v=m[y];p[v]=t(v,u||!!p[v].enumerable)}return Object.create(Object.getPrototypeOf(d),p)}(a,i),c={i:a?5:4,A:s?s.A:E3(),P:!1,I:!1,R:{},l:s,t:i,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,Ii,{value:c,writable:!0}),l},S:function(i,s,a){a?Cf(s)&&s[Ii].A===i&&e(i.p):(i.u&&function l(c){if(c&&typeof c=="object"){var u=c[Ii];if(u){var d=u.t,h=u.k,f=u.R,p=u.i;if(p===4)Lv(h,function(S){S!==Ii&&(d[S]!==void 0||yv(d,S)?f[S]||l(h[S]):(f[S]=!0,Gy(u)))}),Lv(d,function(S){h[S]!==void 0||yv(h,S)||(f[S]=!1,Gy(u))});else if(p===5){if(r(u)&&(Gy(u),f.length=!0),h.length<d.length)for(var m=h.length;m<d.length;m++)f[m]=!1;else for(var y=d.length;y<h.length;y++)f[y]=!0;for(var v=Math.min(h.length,d.length),b=0;b<v;b++)h.hasOwnProperty(b)||(f[b]=!0),f[b]===void 0&&l(h[b])}}}}(i.p[0]),e(i.p))},K:function(i){return i.i===4?n(i):r(i)}})}function tPe(){function t(r){if(!Sf(r))return r;if(Array.isArray(r))return r.map(t);if(Vk(r))return new Map(Array.from(r.entries()).map(function(s){return[s[0],t(s[1])]}));if(Gk(r))return new Set(Array.from(r).map(t));var o=Object.create(Object.getPrototypeOf(r));for(var i in r)o[i]=t(r[i]);return yv(r,E_)&&(o[E_]=r[E_]),o}function e(r){return Cf(r)?t(r):r}var n="add";fse("Patches",{$:function(r,o){return o.forEach(function(i){for(var s=i.path,a=i.op,l=r,c=0;c<s.length-1;c++){var u=kv(l),d=s[c];typeof d!="string"&&typeof d!="number"&&(d=""+d),u!==0&&u!==1||d!=="__proto__"&&d!=="constructor"||wl(24),typeof l=="function"&&d==="prototype"&&wl(24),typeof(l=UM(l,d))!="object"&&wl(15,s.join("/"))}var h=kv(l),f=t(i.value),p=s[s.length-1];switch(a){case"replace":switch(h){case 2:return l.set(p,f);case 3:wl(16);default:return l[p]=f}case n:switch(h){case 1:return p==="-"?l.push(f):l.splice(p,0,f);case 2:return l.set(p,f);case 3:return l.add(f);default:return l[p]=f}case"remove":switch(h){case 1:return l.splice(p,1);case 2:return l.delete(p);case 3:return l.delete(i.value);default:return delete l[p]}default:wl(17,a)}}),r},N:function(r,o,i,s){switch(r.i){case 0:case 4:case 2:return function(a,l,c,u){var d=a.t,h=a.o;Lv(a.R,function(f,p){var m=UM(d,f),y=UM(h,f),v=p?yv(d,f)?"replace":n:"remove";if(m!==y||v!=="replace"){var b=l.concat(f);c.push(v==="remove"?{op:v,path:b}:{op:v,path:b,value:y}),u.push(v===n?{op:"remove",path:b}:v==="remove"?{op:n,path:b,value:e(m)}:{op:"replace",path:b,value:e(m)})}})}(r,o,i,s);case 5:case 1:return function(a,l,c,u){var d=a.t,h=a.R,f=a.o;
98if(f.length<d.length){var p=[f,d];d=p[0],f=p[1];var m=[u,c];c=m[0],u=m[1]}for(var y=0;y<d.length;y++)if(h[y]&&f[y]!==d[y]){var v=l.concat([y]);c.push({op:"replace",path:v,value:e(f[y])}),u.push({op:"replace",path:v,value:e(d[y])})}for(var b=d.length;b<f.length;b++){var S=l.concat([b]);c.push({op:n,path:S,value:e(f[b])})}d.length<f.length&&u.push({op:"replace",path:l.concat(["length"]),value:d.length})}(r,o,i,s);case 3:return function(a,l,c,u){var d=a.t,h=a.o,f=0;d.forEach(function(p){if(!h.has(p)){var m=l.concat([f]);c.push({op:"remove",path:m,value:p}),u.unshift({op:n,path:m,value:p})}f++}),f=0,h.forEach(function(p){if(!d.has(p)){var m=l.concat([f]);c.push({op:n,path:m,value:p}),u.unshift({op:"remove",path:m,value:p})}f++})}(r,o,i,s)}},M:function(r,o,i,s){i.push({op:"replace",path:[],value:o===cG?void 0:o}),s.push({op:"replace",path:[],value:r})}})}var Kq,EI,lG=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",nPe=typeof Map<"u",rPe=typeof Set<"u",Qq=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",cG=lG?Symbol.for("immer-nothing"):((Kq={})["immer-nothing"]=!0,Kq),E_=lG?Symbol.for("immer-draftable"):"__$immer_draftable",Ii=lG?Symbol.for("immer-state"):"__$immer_state",oPe=""+Object.prototype.constructor,p1=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,pse=Object.getOwnPropertyDescriptors||function(t){var e={};return p1(t).forEach(function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)}),e},A3={},xI={get:function(t,e){if(e===Ii)return t;var n=Sb(t);if(!yv(n,e))return function(o,i,s){var a,l=Yq(i,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(o.k):void 0}(t,n,e);var r=n[e];return t.I||!Sf(r)?r:r===mH(t.t,e)?(yH(t),t.o[e]=w3(t.A.h,r,t)):r},has:function(t,e){return e in Sb(t)},ownKeys:function(t){return Reflect.ownKeys(Sb(t))},set:function(t,e,n){var r=Yq(Sb(t),e);if(r?.set)return r.set.call(t.k,n),!0;if(!t.P){var o=mH(Sb(t),e),i=o?.[Ii];if(i&&i.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(hse(n,o)&&(n!==void 0||yv(t.t,e)))return!0;yH(t),Gy(t)}return t.o[e]===n&&(n!==void 0||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return mH(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,yH(t),Gy(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Sb(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty:function(){wl(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){wl(12)}},kT={};Lv(xI,function(t,e){kT[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),kT.deleteProperty=function(t,e){return kT.set.call(this,t,e,void 0)},kT.set=function(t,e,n){return xI.set.call(this,t[0],e,n,t[0])};var iPe=function(){function t(n){var r=this;this.O=Qq,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(m){var y=this;m===void 0&&(m=a);for(var v=arguments.length,b=Array(v>1?v-1:0),S=1;S<v;S++)b[S-1]=arguments[S];return l.produce(m,function(w){var A;return(A=i).call.apply(A,[y,w].concat(b))})}}var c;if(typeof i!="function"&&wl(6),s!==void 0&&typeof s!="function"&&wl(7),Sf(o)){var u=jq(r),d=w3(r,o,void 0),h=!0;try{c=i(d),h=!1}finally{h?KD(u):x3(u)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(m){return pH(u,s),gH(m,u)},function(m){throw KD(u),m}):(pH(u,s),gH(c,u))}if(!o||typeof o!="object"){if((c=i(o))===void 0&&(c=o),c===cG&&(c=void 0),r.D&&sG(c,!0),s){var f=[],p=[];Pp("Patches").M(o,c,f,p),s(f,p)}return c}wl(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),h=1;h<u;h++)d[h-1]=arguments[h];return r.produceWithPatches(c,function(f){return o.apply(void 0,[f].concat(d))})};var s,a,l=r.produce(o,i,function(c,u){s=c,a=u});return typeof Promise<"u"&&l instanceof Promise?l.then(function(c){return[c,s,a]}):[l,s,a]},typeof n?.useProxies=="boolean"&&this.setUseProxies(n.useProxies),typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze)}
98var e=t.prototype;return e.createDraft=function(n){Sf(n)||wl(8),Cf(n)&&(n=JIe(n));var r=jq(this),o=w3(this,n,void 0);return o[Ii].C=!0,x3(r),o},e.finishDraft=function(n,r){var o=n&&n[Ii],i=o.A;return pH(i,r),gH(void 0,i)},e.setAutoFreeze=function(n){this.D=n},e.setUseProxies=function(n){n&&!Qq&&wl(20),this.O=n},e.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=Pp("Patches").$;return Cf(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},t}(),id=new iPe,GP=id.produce,gse=id.produceWithPatches.bind(id);id.setAutoFreeze.bind(id);id.setUseProxies.bind(id);var Zq=id.applyPatches.bind(id);id.createDraft.bind(id);id.finishDraft.bind(id);function wI(t){"@babel/helpers - typeof";return wI=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wI(t)}function sPe(t,e){if(wI(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(wI(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function aPe(t){var e=sPe(t,"string");return wI(e)=="symbol"?e:e+""}function lPe(t,e,n){return(e=aPe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function eY(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jq(Object(n),!0).forEach(function(r){lPe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jq(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gl(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var tY=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),vH=function(){return Math.random().toString(36).substring(7).split("").join(".")},JD={INIT:"@@redux/INIT"+vH(),REPLACE:"@@redux/REPLACE"+vH(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+vH()}};function cPe(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function mse(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Gl(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Gl(1));return n(mse)(t,e)}if(typeof t!="function")throw new Error(Gl(2));var o=t,i=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(Gl(3));return i}function d(m){if(typeof m!="function")throw new Error(Gl(4));if(l)throw new Error(Gl(5));var y=!0;return c(),a.push(m),function(){if(y){if(l)throw new Error(Gl(6));y=!1,c();var b=a.indexOf(m);a.splice(b,1),s=null}}}function h(m){if(!cPe(m))throw new Error(Gl(7));if(typeof m.type>"u")throw new Error(Gl(8));if(l)throw new Error(Gl(9));try{l=!0,i=o(i,m)}finally{l=!1}for(var y=s=a,v=0;v<y.length;v++){var b=y[v];b()}return m}function f(m){if(typeof m!="function")throw new Error(Gl(10));o=m,h({type:JD.REPLACE})}function p(){var m,y=d;return m={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(Gl(11));function S(){b.next&&b.next(u())}S();var w=y(S);return{unsubscribe:w}}},m[tY]=function(){return this},m}return h({type:JD.INIT}),r={dispatch:h,subscribe:d,getState:u,replaceReducer:f},r[tY]=p,r}function uPe(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:JD.INIT});if(typeof r>"u")throw new Error(Gl(12));if(typeof n(void 0,{type:JD.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Gl(13))})}function yse(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var o=e[r];
98typeof t[o]=="function"&&(n[o]=t[o])}var i=Object.keys(n),s;try{uPe(n)}catch(a){s=a}return function(l,c){if(l===void 0&&(l={}),s)throw s;for(var u=!1,d={},h=0;h<i.length;h++){var f=i[h],p=n[f],m=l[f],y=p(m,c);if(typeof y>"u")throw c&&c.type,new Error(Gl(14));d[f]=y,u=u||y!==m}return u=u||i.length!==Object.keys(l).length,u?d:l}}function eL(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?function(r){return r}:e.length===1?e[0]:e.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function dPe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Gl(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return i=eL.apply(void 0,a)(o.dispatch),eY(eY({},o),{},{dispatch:i})}}}var tL="NOT_FOUND";function hPe(t){var e;return{get:function(r){return e&&t(e.key,r)?e.value:tL},put:function(r,o){e={key:r,value:o}},getEntries:function(){return e?[e]:[]},clear:function(){e=void 0}}}function fPe(t,e){var n=[];function r(a){var l=n.findIndex(function(u){return e(a,u.key)});if(l>-1){var c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return tL}function o(a,l){r(a)===tL&&(n.unshift({key:a,value:l}),n.length>t&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var pPe=function(e,n){return e===n};function gPe(t){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i<o;i++)if(!t(n[i],r[i]))return!1;return!0}}function T3(t,e){var n=typeof e=="object"?e:{equalityCheck:e},r=n.equalityCheck,o=r===void 0?pPe:r,i=n.maxSize,s=i===void 0?1:i,a=n.resultEqualityCheck,l=gPe(o),c=s===1?hPe(l):fPe(s,l);function u(){var d=c.get(arguments);if(d===tL){if(d=t.apply(null,arguments),a){var h=c.getEntries(),f=h.find(function(p){return a(p.value,d)});f&&(d=f.value)}c.put(arguments,d)}return d}return u.clearCache=function(){return c.clear()},u}function mPe(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every(function(r){return typeof r=="function"})){var n=e.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return e}function yPe(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];var c=0,u,d={memoizeOptions:void 0},h=a.pop();if(typeof h=="object"&&(d=h,h=a.pop()),typeof h!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof h+"]");var f=d,p=f.memoizeOptions,m=p===void 0?n:p,y=Array.isArray(m)?m:[m],v=mPe(a),b=t.apply(void 0,[function(){return c++,h.apply(null,arguments)}].concat(y)),S=t(function(){for(var A=[],_=v.length,P=0;P<_;P++)A.push(v[P].apply(null,arguments));return u=b.apply(null,A),u});return Object.assign(S,{resultFunc:h,memoizedResultFunc:b,dependencies:v,lastResult:function(){return u},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),S};return o}var x_=yPe(T3);function vse(t){var e=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,t):s(a)}}};return e}var bse=vse();bse.withExtraArgument=vse;const nY=bse;var Cse=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vPe=globalThis&&globalThis.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},$1=globalThis&&globalThis.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},bPe=Object.defineProperty,CPe=Object.defineProperties,SPe=Object.getOwnPropertyDescriptors,rY=Object.getOwnPropertySymbols,EPe=Object.prototype.hasOwnProperty,xPe=Object.prototype.propertyIsEnumerable,oY=function(t,e,n){return e in t?bPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},vv=function(t,e){for(var n in e||(e={}))EPe.call(e,n)&&oY(t,n,e[n]);if(rY)for(var r=0,o=rY(e);r<o.length;r++){var n=o[r];xPe.call(e,n)&&oY(t,n,e[n])}return t},bH=function(t,e){return CPe(t,SPe(e))},wPe=function(t,e,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(c){o(c)}},s=function(l){try{a(n.throw(l))}catch(c){o(c)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(t,e)).next())})},APe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?eL:eL.apply(null,arguments)};function Fv(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var n=e;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return e===n}var TPe=function(t){return t&&typeof t.match=="function"};function vu(t,e){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(e){var i=e.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return vv(vv({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:r[0]}}return n.toString=function(){return""+t},n.type=t,n.match=function(r){return r.type===t},n}var _Pe=function(t){Cse(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];
98var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.prototype.concat.apply(this,n)},e.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(e.bind.apply(e,$1([void 0],n[0].concat(this)))):new(e.bind.apply(e,$1([void 0],n.concat(this))))},e}(Array),IPe=function(t){Cse(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.prototype.concat.apply(this,n)},e.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(e.bind.apply(e,$1([void 0],n[0].concat(this)))):new(e.bind.apply(e,$1([void 0],n.concat(this))))},e}(Array);function _3(t){return Sf(t)?GP(t,function(){}):t}function PPe(t){return typeof t=="boolean"}function RPe(){return function(e){return OPe(e)}}function OPe(t){t===void 0&&(t={});var e=t.thunk,n=e===void 0?!0:e;t.immutableCheck,t.serializableCheck,t.actionCreatorCheck;var r=new _Pe;return n&&(PPe(n)?r.push(nY):r.push(nY.withExtraArgument(n.extraArgument))),r}var NPe=!0;function MPe(t){var e=RPe(),n=t||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?e():i,a=n.devTools,l=a===void 0?!0:a,c=n.preloadedState,u=c===void 0?void 0:c,d=n.enhancers,h=d===void 0?void 0:d,f;if(typeof o=="function")f=o;else if(Fv(o))f=yse(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var p=s;typeof p=="function"&&(p=p(e));var m=dPe.apply(void 0,p),y=eL;l&&(y=APe(vv({trace:!NPe},typeof l=="object"&&l)));var v=new IPe(m),b=v;Array.isArray(h)?b=$1([m],h):typeof h=="function"&&(b=h(v));var S=y.apply(void 0,b);return mse(f,u,S)}function Sse(t){var e={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,o},addMatcher:function(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase:function(i){return r=i,o}};return t(o),[e,n,r]}function DPe(t){return typeof t=="function"}function LPe(t,e,n,r){n===void 0&&(n=[]);var o=typeof e=="function"?Sse(e):[e,n,r],i=o[0],s=o[1],a=o[2],l;if(DPe(t))l=function(){return _3(t())};else{var c=_3(t);l=function(){return c}}function u(d,h){d===void 0&&(d=l());var f=$1([i[h.type]],s.filter(function(p){var m=p.matcher;return m(h)}).map(function(p){var m=p.reducer;return m}));return f.filter(function(p){return!!p}).length===0&&(f=[a]),f.reduce(function(p,m){if(m)if(Cf(p)){var y=p,v=m(y,h);return v===void 0?p:v}else{if(Sf(p))return GP(p,function(b){return m(b,h)});var v=m(p,h);if(v===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}return p},d)}return u.getInitialState=l,u}function kPe(t,e){return t+"/"+e}function rf(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof t.initialState=="function"?t.initialState:_3(t.initialState),r=t.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(u){var d=r[u],h=kPe(e,u),f,p;"reducer"in d?(f=d.reducer,p=d.prepare):f=d,i[u]=f,s[h]=f,a[u]=p?vu(h,p):vu(h)});function l(){var u=typeof t.extraReducers=="function"?Sse(t.extraReducers):[t.extraReducers],d=u[0],h=d===void 0?{}:d,f=u[1],p=f===void 0?[]:f,m=u[2],y=m===void 0?void 0:m,v=vv(vv({},h),s);return LPe(n,function(b){for(var S in v)b.addCase(S,v[S]);for(var w=0,A=p;w<A.length;w++){var _=A[w];b.addMatcher(_.matcher,_.reducer)}y&&b.addDefaultCase(y)})}var c;return{name:e,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:i,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var FPe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ese=function(t){t===void 0&&(t=21);for(var e="",n=t;n--;)e+=FPe[Math.random()*64|0];return e},BPe=["name","message","stack","code"],CH=function(){function t(e,n){this.payload=e,this.meta=n}return t}(),iY=function(){function t(e,n){this.payload=e,this.meta=n}return t}(),$Pe=function(t){if(typeof t=="object"&&t!==null){for(var e={},n=0,r=BPe;n<r.length;n++){var o=r[n];typeof t[o]=="string"&&(e[o]=t[o])}return e}return{message:String(t)}},sY=function(){function t(e,n,r){var o=vu(e+"/fulfilled",function(c,u,d,h){return{payload:c,meta:bH(vv({},h||{}),{arg:d,requestId:u,requestStatus:"fulfilled"})}}),i=vu(e+"/pending",function(c,u,d){return{payload:void 0,meta:bH(vv({},d||{}),{arg:u,requestId:c,requestStatus:"pending"})}}),s=vu(e+"/rejected",function(c,u,d,h,f){return{payload:h,error:(r&&r.serializeError||$Pe)(c||"Rejected"),meta:bH(vv({},f||{}),{arg:d,requestId:u,rejectedWithValue:!!h,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"})}}),a=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function l(c){return function(u,d,h){var f=r?.idGenerator?r.idGenerator(c):Ese(),p=new a,m;function y(b){m=b,p.abort()}var v=function(){return wPe(this,null,function(){var b,S,w,A,_,P,R;return vPe(this,function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),A=(b=r?.condition)==null?void 0:b.call(r,c,{get
98State:d,extra:h}),UPe(A)?[4,A]:[3,2];case 1:A=O.sent(),O.label=2;case 2:if(A===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=new Promise(function(N,M){return p.signal.addEventListener("abort",function(){return M({name:"AbortError",message:m||"Aborted"})})}),u(i(f,c,(S=r?.getPendingMeta)==null?void 0:S.call(r,{requestId:f,arg:c},{getState:d,extra:h}))),[4,Promise.race([_,Promise.resolve(n(c,{dispatch:u,getState:d,extra:h,requestId:f,signal:p.signal,abort:y,rejectWithValue:function(N,M){return new CH(N,M)},fulfillWithValue:function(N,M){return new iY(N,M)}})).then(function(N){if(N instanceof CH)throw N;return N instanceof iY?o(N.payload,f,c,N.meta):o(N,f,c)})])];case 3:return w=O.sent(),[3,5];case 4:return P=O.sent(),w=P instanceof CH?s(null,f,c,P.payload,P.meta):s(P,f,c),[3,5];case 5:return R=r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition,R||u(w),[2,w]}})})}();return Object.assign(v,{abort:y,requestId:f,arg:c,unwrap:function(){return v.then(HPe)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:o,typePrefix:e})}return t.withTypes=function(){return t},t}();function HPe(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function UPe(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var xse=function(t,e){return TPe(t)?t.match(e):t(e)};function jx(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(n){return t.some(function(r){return xse(r,n)})}}function w_(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(n){return t.every(function(r){return xse(r,n)})}}function Wk(t,e){if(!t||!t.meta)return!1;var n=typeof t.meta.requestId=="string",r=e.indexOf(t.meta.requestStatus)>-1;return n&&r}function WP(t){return typeof t[0]=="function"&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function uG(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length===0?function(n){return Wk(n,["pending"])}:WP(t)?function(n){var r=t.map(function(i){return i.pending}),o=jx.apply(void 0,r);return o(n)}:uG()(t[0])}function AI(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length===0?function(n){return Wk(n,["rejected"])}:WP(t)?function(n){var r=t.map(function(i){return i.rejected}),o=jx.apply(void 0,r);return o(n)}:AI()(t[0])}function jk(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(r){return r&&r.meta&&r.meta.rejectedWithValue};return t.length===0?function(r){var o=w_(AI.apply(void 0,t),n);return o(r)}:WP(t)?function(r){var o=w_(AI.apply(void 0,t),n);return o(r)}:jk()(t[0])}function KC(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length===0?function(n){return Wk(n,["fulfilled"])}:WP(t)?function(n){var r=t.map(function(i){return i.fulfilled}),o=jx.apply(void 0,r);return o(n)}:KC()(t[0])}function I3(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length===0?function(n){return Wk(n,["pending","fulfilled","rejected"])}:WP(t)?function(n){for(var r=[],o=0,i=t;o<i.length;o++){var s=i[o];r.push(s.pending,s.rejected,s.fulfilled)}var a=jx.apply(void 0,r);return a(n)}:I3()(t[0])}var dG="listenerMiddleware";vu(dG+"/add");vu(dG+"/removeAll");vu(dG+"/remove");var FT="RTK_autoBatch",QA=function(){return function(t){var e;return{payload:t,meta:(e={},e[FT]=!0,e)}}},aY;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis);ePe();var nL=globalThis&&globalThis.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},rL=globalThis&&globalThis.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},zPe=Object.defineProperty,VPe=Object.defineProperties,GPe=Object.getOwnPropertyDescriptors,oL=Object.getOwnPropertySymbols,wse=Object.prototype.hasOwnProperty,Ase=Object.prototype.propertyIsEnumerable,lY=function(t,e,n){return e in t?zPe
98(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},ms=function(t,e){for(var n in e||(e={}))wse.call(e,n)&&lY(t,n,e[n]);if(oL)for(var r=0,o=oL(e);r<o.length;r++){var n=o[r];Ase.call(e,n)&&lY(t,n,e[n])}return t},wp=function(t,e){return VPe(t,GPe(e))},cY=function(t,e){var n={};for(var r in t)wse.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&oL)for(var o=0,i=oL(t);o<i.length;o++){var r=i[o];e.indexOf(r)<0&&Ase.call(t,r)&&(n[r]=t[r])}return n},iL=function(t,e,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(c){o(c)}},s=function(l){try{a(n.throw(l))}catch(c){o(c)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(t,e)).next())})},Hi;(function(t){t.uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected"})(Hi||(Hi={}));function WPe(t){return{status:t,isUninitialized:t===Hi.uninitialized,isLoading:t===Hi.pending,isSuccess:t===Hi.fulfilled,isError:t===Hi.rejected}}function jPe(t){return new RegExp("(^|:)//").test(t)}var qPe=function(t){return t.replace(/\/$/,"")},YPe=function(t){return t.replace(/^\//,"")};function XPe(t,e){if(!t)return e;if(!e)return t;if(jPe(e))return e;var n=t.endsWith("/")||!e.startsWith("?")?"/":"";return t=qPe(t),e=YPe(e),""+t+n+e}var uY=function(t){return[].concat.apply([],t)};function KPe(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}function QPe(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}var dY=Fv;function Tse(t,e){if(t===e||!(dY(t)&&dY(e)||Array.isArray(t)&&Array.isArray(e)))return e;for(var n=Object.keys(e),r=Object.keys(t),o=n.length===r.length,i=Array.isArray(e)?[]:{},s=0,a=n;s<a.length;s++){var l=a[s];i[l]=Tse(t[l],e[l]),o&&(o=t[l]===i[l])}return o?t:i}var hY=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return fetch.apply(void 0,t)},ZPe=function(t){return t.status>=200&&t.status<=299},JPe=function(t){return/ion\/(vnd\.api\+)?json/.test(t.get("content-type")||"")};function fY(t){if(!Fv(t))return t;for(var e=ms({},t),n=0,r=Object.entries(e);n<r.length;n++){var o=r[n],i=o[0],s=o[1];s===void 0&&delete e[i]}return e}function eRe(t){var e=this;t===void 0&&(t={});var n=t,r=n.baseUrl,o=n.prepareHeaders,i=o===void 0?function(S){return S}:o,s=n.fetchFn,a=s===void 0?hY:s,l=n.paramsSerializer,c=n.isJsonContentType,u=c===void 0?JPe:c,d=n.jsonContentType,h=d===void 0?"application/json":d,f=n.jsonReplacer,p=n.timeout,m=n.responseHandler,y=n.validateStatus,v=cY(n,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","jsonReplacer","timeout","responseHandler","validateStatus"]);return typeof fetch>"u"&&a===hY&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(S,w){return iL(e,null,function(){var A,_,P,R,O,N,M,L,F,$,D,k,U,H,V,q,J,Q,se,oe,ie,ee,re,fe,we,xe,ve,Re,pe,Be,ke,Ne,ot,ce,Ae,be;return nL(this,function(Se){switch(Se.label){case 0:return A=w.signal,_=w.getState,P=w.extra,R=w.endpoint,O=w.forced,N=w.type,L=typeof S=="string"?{url:S}:S,F=L.url,$=L.headers,D=$===void 0?new Headers(v.headers):$,k=L.params,U=k===void 0?void 0:k,H=L.responseHandler,V=H===void 0?m??"json":H,q=L.validateStatus,J=q===void 0?y??ZPe:q,Q=L.timeout,se=Q===void 0?p:Q,oe=cY(L,["url","headers","params","responseHandler","validateStatus","timeout"]),ie=ms(wp(ms({},v),{signal:A}),oe),D=new Headers(fY(D)),ee=ie,[4,i(D,{getState:_,extra:P,endpoint:R,forced:O,type:N})];case 1:ee.headers=Se.sent()||D,re=function(Pe){return typeof Pe=="object"&&(Fv(Pe)||Array.isArray(Pe)||typeof Pe.toJSON=="function")},!ie.headers.has("content-type")&&re(ie.body)&&ie.headers.set("content-type",h),re(ie.body)&&u(ie.headers)&&(ie.body=JSON.stringify(ie.body,f)),U&&(fe=~F.indexOf("?")?"&":"?",we=l?l(U):new URLSearchParams(fY(U)),F+=fe+we),F=XPe(r,F),xe=new Request(F,ie),ve=new Request(F,ie),M={request:ve},pe=!1,Be=se&&setTimeout(function(){pe=!0,w.abort()},se),Se.label=2;case 2:return Se.trys.push([2,4,5,6]),[4,a(xe)];case 3:return Re=Se.sent(),[3,6];case 4:return ke=Se.sent(),[2,{error:{status:pe?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(ke)},meta:M}];case 5:return Be&&clearTimeout(Be),[7];case 6:Ne=Re.clone(),M.response=Ne,ce="",Se.label=7;case 7:return Se.trys.push([7,9,,10]),[4,Promise.all([b(Re,V).then(function(Pe){return ot=Pe},function(Pe){return Ae=Pe}),Ne.text().then(function(Pe){return ce=Pe},function(){})])];case 8:if(Se.sent(),Ae)throw Ae;return[3,10];case 9:return be=Se.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:Re.status,data:ce,error:String(be)},meta:M}];case 10:return[2,J(Re,ot)?{data:ot,meta:M}:{error:{status:Re.status,data:ot},meta:M}]}})})};function b(S,w){return iL(this,null,function(){var A;return nL(this,function(_){switch(_.label){case 0:return typeof w=="function"?[2,w(S)]:(w==="content-type"&&(w=u(S.headers)?"json":"text"),w!=="json"?[3,2]:[4,S.text()]);case 1:return A=_.sent(),[2,A.length?JSON.parse(A):null];case 2:return[2,S.text()]}})})}}var pY=function(){function t(e,n){n===void 0&&(n=void 0),this.value=e,this.meta=n}return t}(),TI=vu("__rtkq/focused"),sL=vu("__rtkq/unfocused"),_I=vu("__rtkq/online"),aL=vu("__rtkq/offline"),SH=!1;function tRe(t,e){function n(){var r=function(){return t(TI())},o=function(){return t(sL())},i=function(){return t(_I())},s=function(){return t(aL())},a=function(){window.document.visibilityState==="visible"?r():o()};SH||typeof window<"u"&&window.addEventListener&&(window.addEventListener("visibilitychange",a,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),SH=!0);var l=function(){window.removeEventListener("focus",r),window.removeEventListener("visibilitychange",a),window.removeEventListener("online",i),window.removeEventListener("offline",s),SH=!1};return l}return e?e(t,{onFocus:TI,onFocusLost:sL,onOffline:aL,onOnline:_I}):n()}var Bp;(function(t){t.query="query",t.mutation="mutation"})(Bp||(Bp={}));function _se(t){return t.type===Bp.query}function nRe(t){return t.type===Bp.mutation}function hG(t,e,n,r,o,i){return rRe(t)?t(e,n,r,o).map(P3).map(i):Array.isArray(t)?t.map(P3).map(i):[]}function rRe(t){return typeof t=="function"}function P3(t){return typeof t=="string"?{type:t}:t}function EH(t){return t!=null}var II=Symbol("forceQueryFn"),R3=function(t){return typeof t[II]=="function"};function oRe(t){var e=t.serializeQueryArgs,n=t.queryThunk,r=t.mutationThunk,o=t.api,i=t.context,s=new Map,a=new Map,l=o.internalActions,c=l.unsubscribeQueryResult,u=l.removeMutationResult,d=l.updateSubscriptionOptions;return{buildInitiateQuery:b,buildInitiateMutation:S,getRunningQueryThunk:p,getRunningMutationThunk:m,getRunningQueriesThunk:y,getRunningMutationsThunk:v,getRunningOperationPromises:f,removalWarning:h};function h(){throw new Error(`This method had to be removed due to a conceptual bug in RTK. 99 Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details. 100 See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}function f(){typeof process<"u";var w=function(A){return Array.from(A.values()).flatMap(function(_){return _?Object.values(_):[]})};return rL(rL([],w(s)),w(a)).filter(EH)}function p(w,A){return function(_){var P,R=i.endpointDefinitions[w],O=e({queryArgs:A,endpointDefinition:R,endpointName:w});return(P=s.get(_))==null?void 0:P[O]}}function m(w,A){return function(_){var P;return(P=a.get(_))==null?void 0:P[A]}}function y(){return function(w){return Object.values(s.get(w)||{}).filter(EH)}}function v(){return function(w){return Object.values(a.get(w)||{}).filter(EH)}}function b(w,A){var _=function(P,R){var O=R===void 0?{}:R,N=O.subscribe,M=N===void 0?!0:N,L=O.forceRefetch,F=O.subscriptionOptions,$=II,D=O[$];return function(k,U){var H,V,q=e({queryArgs:P,endpointDefinition:A,endpointName:w}),J=n((H={type:"query",subscribe:M,forceRefetch:L,subscriptionOptions:F,endpointName:w,originalArgs:P,queryCacheKey:q},H[II]=D,H)),Q=o.endpoints[w].select(P),se=k(J),oe=Q(U()),ie=se.requestId,ee=se.abort,re=oe.requestId!==ie,fe=(V=s.get(k))==null?void 0:V[q],we=function(){return Q(U())},xe=Object.assign(D?se.then(we):re&&!fe?Promise.resolve(oe):Promise.all([fe,se]).then(we),{arg:P,requestId:ie,subscriptionOptions:F,queryCacheKey:q,abort:ee,unwrap:function(){return iL(this,null,function(){var Re;return nL(this,function(pe){switch(pe.label){case 0:return[4,xe];case 1:if(Re=pe.sent(),Re.isError)throw Re.error;return[2,Re.data]}})})},refetch:function(){return k(_(P,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){M&&k(c({queryCacheKey:q,requestId:ie}))},updateSubscriptionOptions:function(Re){xe.subscriptionOptions=Re,k(d({endpointName:w,requestId:ie,queryCacheKey:q,options:Re}))}});
100if(!fe&&!re&&!D){var ve=s.get(k)||{};ve[q]=xe,s.set(k,ve),xe.then(function(){delete ve[q],Object.keys(ve).length||s.delete(k)})}return xe}};return _}function S(w){return function(A,_){var P=_===void 0?{}:_,R=P.track,O=R===void 0?!0:R,N=P.fixedCacheKey;return function(M,L){var F=r({type:"mutation",endpointName:w,originalArgs:A,track:O,fixedCacheKey:N}),$=M(F),D=$.requestId,k=$.abort,U=$.unwrap,H=$.unwrap().then(function(Q){return{data:Q}}).catch(function(Q){return{error:Q}}),V=function(){M(u({requestId:D,fixedCacheKey:N}))},q=Object.assign(H,{arg:$.arg,requestId:D,abort:k,unwrap:U,unsubscribe:V,reset:V}),J=a.get(M)||{};return a.set(M,J),J[D]=q,q.then(function(){delete J[D],Object.keys(J).length||a.delete(M)}),N&&(J[N]=q,q.then(function(){J[N]===q&&(delete J[N],Object.keys(J).length||a.delete(M))})),q}}}}function gY(t){return t}function iRe(t){var e=this,n=t.reducerPath,r=t.baseQuery,o=t.context.endpointDefinitions,i=t.serializeQueryArgs,s=t.api,a=t.assertTagType,l=function(w,A,_,P){return function(R,O){var N=o[w],M=i({queryArgs:A,endpointDefinition:N,endpointName:w});if(R(s.internalActions.queryResultPatched({queryCacheKey:M,patches:_})),!!P){var L=s.endpoints[w].select(A)(O()),F=hG(N.providesTags,L.data,void 0,A,{},a);R(s.internalActions.updateProvidedBy({queryCacheKey:M,providedTags:F}))}}},c=function(w,A,_,P){return P===void 0&&(P=!0),function(R,O){var N,M,L=s.endpoints[w],F=L.select(A)(O()),$={patches:[],inversePatches:[],undo:function(){return R(s.util.patchQueryData(w,A,$.inversePatches,P))}};if(F.status===Hi.uninitialized)return $;var D;if("data"in F)if(Sf(F.data)){var k=gse(F.data,_),U=k[0],H=k[1],V=k[2];(N=$.patches).push.apply(N,H),(M=$.inversePatches).push.apply(M,V),D=U}else D=_(F.data),$.patches.push({op:"replace",path:[],value:D}),$.inversePatches.push({op:"replace",path:[],value:F.data});return R(s.util.patchQueryData(w,A,$.patches,P)),$}},u=function(w,A,_){return function(P){var R;return P(s.endpoints[w].initiate(A,(R={subscribe:!1,forceRefetch:!0},R[II]=function(){return{data:_}},R)))}},d=function(w,A){return iL(e,[w,A],function(_,P){var R,O,N,M,L,F,$,D,k,U,H,V,q,J,Q,se,oe,ie,ee=P.signal,re=P.abort,fe=P.rejectWithValue,we=P.fulfillWithValue,xe=P.dispatch,ve=P.getState,Re=P.extra;return nL(this,function(pe){switch(pe.label){case 0:R=o[_.endpointName],pe.label=1;case 1:return pe.trys.push([1,8,,13]),O=gY,N=void 0,M={signal:ee,abort:re,dispatch:xe,getState:ve,extra:Re,endpoint:_.endpointName,type:_.type,forced:_.type==="query"?h(_,ve()):void 0},L=_.type==="query"?_[II]:void 0,L?(N=L(),[3,6]):[3,2];case 2:return R.query?[4,r(R.query(_.originalArgs),M,R.extraOptions)]:[3,4];case 3:return N=pe.sent(),R.transformResponse&&(O=R.transformResponse),[3,6];case 4:return[4,R.queryFn(_.originalArgs,M,R.extraOptions,function(Be){return r(Be,M,R.extraOptions)})];case 5:N=pe.sent(),pe.label=6;case 6:if(typeof process<"u",N.error)throw new pY(N.error,N.meta);return H=we,[4,O(N.data,N.meta,_.originalArgs)];case 7:return[2,H.apply(void 0,[pe.sent(),(oe={fulfilledTimeStamp:Date.now(),baseQueryMeta:N.meta},oe[FT]=!0,oe)])];case 8:if(V=pe.sent(),q=V,!(q instanceof pY))return[3,12];J=gY,R.query&&R.transformErrorResponse&&(J=R.transformErrorResponse),pe.label=9;case 9:return pe.trys.push([9,11,,12]),Q=fe,[4,J(q.value,q.meta,_.originalArgs)];case 10:return[2,Q.apply(void 0,[pe.sent(),(ie={baseQueryMeta:q.meta},ie[FT]=!0,ie)])];case 11:return se=pe.sent(),q=se,[3,12];case 12:throw typeof process<"u",console.error(q),q;case 13:return[2]}})})};function h(w,A){var _,P,R,O,N=(P=(_=A[n])==null?void 0:_.queries)==null?void 0:P[w.queryCacheKey],M=(R=A[n])==null?void 0:R.config.refetchOnMountOrArgChange,L=N?.fulfilledTimeStamp,F=(O=w.forceRefetch)!=null?O:w.subscribe&&M;return F?F===!0||(Number(new Date)-Number(L))/1e3>=F:!1}var f=sY(n+"/executeQuery",d,{getPendingMeta:function(){var w;return w={startedTimeStamp:Date.now()},w[FT]=!0,w},condition:function(w,A){var _=A.getState,P,R,O,N=_(),M=(R=(P=N[n])==null?void 0:P.queries)==null?void 0:R[w.queryCacheKey],L=M?.fulfilledTimeStamp,F=w.originalArgs,$=M?.originalArgs,D=o[w.endpointName];
100return R3(w)?!0:M?.status==="pending"?!1:h(w,N)||_se(D)&&((O=D?.forceRefetch)!=null&&O.call(D,{currentArg:F,previousArg:$,endpointState:M,state:N}))?!0:!L},dispatchConditionRejection:!0}),p=sY(n+"/executeMutation",d,{getPendingMeta:function(){var w;return w={startedTimeStamp:Date.now()},w[FT]=!0,w}}),m=function(w){return"force"in w},y=function(w){return"ifOlderThan"in w},v=function(w,A,_){return function(P,R){var O=m(_)&&_.force,N=y(_)&&_.ifOlderThan,M=function(D){return D===void 0&&(D=!0),s.endpoints[w].initiate(A,{forceRefetch:D})},L=s.endpoints[w].select(A)(R());if(O)P(M());else if(N){var F=L?.fulfilledTimeStamp;if(!F){P(M());return}var $=(Number(new Date)-Number(new Date(F)))/1e3>=N;$&&P(M())}else P(M(!1))}};function b(w){return function(A){var _,P;return((P=(_=A?.meta)==null?void 0:_.arg)==null?void 0:P.endpointName)===w}}function S(w,A){return{matchPending:w_(uG(w),b(A)),matchFulfilled:w_(KC(w),b(A)),matchRejected:w_(AI(w),b(A))}}return{queryThunk:f,mutationThunk:p,prefetch:v,updateQueryData:c,upsertQueryData:u,patchQueryData:l,buildMatchThunkActions:S}}function Ise(t,e,n,r){return hG(n[t.meta.arg.endpointName][e],KC(t)?t.payload:void 0,jk(t)?t.payload:void 0,t.meta.arg.originalArgs,"baseQueryMeta"in t.meta?t.meta.baseQueryMeta:void 0,r)}function fN(t,e,n){var r=t[e];r&&n(r)}function PI(t){var e;return(e="arg"in t?t.arg.fixedCacheKey:t.fixedCacheKey)!=null?e:t.requestId}function mY(t,e,n){var r=t[PI(e)];r&&n(r)}var ZA={};function sRe(t){var e=t.reducerPath,n=t.queryThunk,r=t.mutationThunk,o=t.context,i=o.endpointDefinitions,s=o.apiUid,a=o.extractRehydrationInfo,l=o.hasRehydrationInfo,c=t.assertTagType,u=t.config,d=vu(e+"/resetApiState"),h=rf({name:e+"/queries",initialState:ZA,reducers:{removeQueryResult:{reducer:function(A,_){var P=_.payload.queryCacheKey;delete A[P]},prepare:QA()},queryResultPatched:{reducer:function(A,_){var P=_.payload,R=P.queryCacheKey,O=P.patches;fN(A,R,function(N){N.data=Zq(N.data,O.concat())})},prepare:QA()}},extraReducers:function(A){A.addCase(n.pending,function(_,P){var R=P.meta,O=P.meta.arg,N,M,L=R3(O);(O.subscribe||L)&&((M=_[N=O.queryCacheKey])!=null||(_[N]={status:Hi.uninitialized,endpointName:O.endpointName})),fN(_,O.queryCacheKey,function(F){F.status=Hi.pending,F.requestId=L&&F.requestId?F.requestId:R.requestId,O.originalArgs!==void 0&&(F.originalArgs=O.originalArgs),F.startedTimeStamp=R.startedTimeStamp})}).addCase(n.fulfilled,function(_,P){var R=P.meta,O=P.payload;fN(_,R.arg.queryCacheKey,function(N){var M;if(!(N.requestId!==R.requestId&&!R3(R.arg))){var L=i[R.arg.endpointName].merge;if(N.status=Hi.fulfilled,L)if(N.data!==void 0){var F=R.fulfilledTimeStamp,$=R.arg,D=R.baseQueryMeta,k=R.requestId,U=GP(N.data,function(H){return L(H,O,{arg:$.originalArgs,baseQueryMeta:D,fulfilledTimeStamp:F,requestId:k})});N.data=U}else N.data=O;else N.data=(M=i[R.arg.endpointName].structuralSharing)==null||M?Tse(Cf(N.data)?KIe(N.data):N.data,O):O;delete N.error,N.fulfilledTimeStamp=R.fulfilledTimeStamp}})}).addCase(n.rejected,function(_,P){var R=P.meta,O=R.condition,N=R.arg,M=R.requestId,L=P.error,F=P.payload;fN(_,N.queryCacheKey,function($){if(!O){if($.requestId!==M)return;$.status=Hi.rejected,$.error=F??L}})}).addMatcher(l,function(_,P){for(var R=a(P).queries,O=0,N=Object.entries(R);O<N.length;O++){var M=N[O],L=M[0],F=M[1];(F?.status===Hi.fulfilled||F?.status===Hi.rejected)&&(_[L]=F)}})}}),f=rf({name:e+"/mutations",initialState:ZA,reducers:{removeMutationResult:{reducer:function(A,_){var P=_.payload,R=PI(P);R in A&&delete A[R]},prepare:QA()}},extraReducers:function(A){A.addCase(r.pending,function(_,P){var R=P.meta,O=P.meta,N=O.requestId,M=O.arg,L=O.startedTimeStamp;M.track&&(_[PI(R)]={requestId:N,status:Hi.pending,endpointName:M.endpointName,startedTimeStamp:L})}).addCase(r.fulfilled,function(_,P){var R=P.payload,O=P.meta;O.arg.track&&mY(_,O,function(N){N.requestId===O.requestId&&(N.status=Hi.fulfilled,N.data=R,N.fulfilledTimeStamp=O.fulfilledTimeStamp)})}).addCase(r.rejected,function(_,P){var R=P.payload,O=P.error,N=P.meta;N.arg.track&&mY(_,N,function(M){M.requestId===N.requestId&&(M.status=Hi.rejected,M.error=R??O)})}).addMatcher(l,function(_,P){for(var R=a(P).mutations,O=0,N=Object.entries(R);O<N.length;O++){var M=N[O],L=M[0],F=M[1];(F?.status===Hi.fulfilled||F?.status===Hi.rejected)&&L!==F?.requestId&&(_[L]=F)}})}}),p=rf({name:e+"/invalidation",initialState:ZA,reducers:{updateProvidedBy:{reducer:function(A,_){for(var P,R,O,N,M=_.payload,L=M.queryCacheKey,F=M.providedTags,$=0,D=Object.values(A);$<D.length;$++)for(var k=D[$],U=0,H=Object.values(k);U<H.length;U++){var V=H[U],q=V.indexOf(L);q!==-1&&V.splice(q,1)}for(var J=0,Q=F;J<Q.length;J++){var se=Q[J],oe=se.type,ie=se.id,ee=(N=(R=(P=A[oe])!=null?P:A[oe]={})[O=ie||"__internal_without_id"])!=null?N:R[O]=[],re=ee.includes(L);re||ee.push(L)}},prepare:QA()}},extraReducers:function(A){A.addCase(h.actions.removeQueryResult,function(_,P){for(var R=P.payload.queryCacheKey,O=0,N=Object.values(_);O<N.length;O++)for(var M=N[O],L=0,F=Object.values(M);L<F.length;L++){var $=F[L],D=$.indexOf(R);D!==-1&&$.splice(D,1)}}).addMatcher(l,function(_,P){for(var R,O,N,M,L=a(P).provided,F=0,$=Object.entries(L);F<$.length;F++)for(var D=$[F],k=D[0],U=D[1],H=0,V=Object.entries(U);H<V.length;H++)for(var q=V[H],J=q[0],Q=q[1],se=(M=(O=(R=_[k])!=null?R:_[k]={})[N=J||"__internal_without_id"])!=null?M:O[N]=[],oe=0,ie=Q;oe<ie.length;oe++){var ee=ie[oe],re=se.includes(ee);re||se.push(ee)}}).addMatcher(jx(KC(n),jk(n)),function(_,P){var R=Ise(P,"providesTags",i,c),O=P.meta.arg.queryCacheKey;p.caseReducers.updateProvidedBy(_,p.actions.updateProvidedBy({queryCacheKey:O,providedTags:R}))})}}),m=rf({name:e+"/subscriptions",initialState:ZA,reducers:{updateSubscriptionOptions:function(A,_){},unsubscribeQueryResult:function(A,_){},internal_probeSubscription:function(A,_){}}}),y=rf({name:e+"/internalSubscriptions",initialState:ZA,reducers:{subscriptionsUpdated:{reducer:function(A,_){return Zq(A,_.payload)},prepare:QA()}}}),v=rf({name:e+"/config",initialState:ms({online:KPe(),focused:QPe(),middlewareRegistered:!1},u),reducers:{middlewareRegistered:function(A,_){var P=_.payload;A.middlewareRegistered=A.middlewareRegistered==="conflict"||s!==P?"conflict":!0}},extraReducers:function(A){A.addCase(_I,function(_){_.online=!0}).addCase(aL,function(_){_.online=!1}).addCase(TI,function(_){_.focused=!0}).addCase(sL,function(_){_.focused=!1}).addMatcher(l,function(_){return ms({},_)})}}),b=yse({queries:h.reducer,mutations:f.reducer,provided:p.reducer,subscriptions:y.reducer,config:v.reducer}),S=function(A,_){return b(d.match(_)?void 0:A,_)},w=wp(ms(ms(ms(ms(ms(ms({},v.actions),h.actions),m.actions),y.actions),f.actions),p.actions),{unsubscribeMutationResult:f.actions.removeMutationResult,resetApiState:d});return{reducer:S,actions:w}}var Fb=Symbol.for("RTKQ/skipToken"),Pse={status:Hi.uninitialized},yY=GP(Pse,function(){}),vY=GP(Pse,function(){});function aRe(t){var e=t.serializeQueryArgs,n=t.reducerPath,r=function(u){return yY},o=function(u){return vY};return{buildQuerySelector:a,buildMutationSelector:l,selectInvalidatedBy:c};function i(u){return ms(ms({},u),WPe(u.status))}function s(u){var d=u[n];return d}function a(u,d){return function(h){var f=e({queryArgs:h,endpointDefinition:d,endpointName:u}),p=function(y){var v,b,S;return(S=(b=(v=s(y))==null?void 0:v.queries)==null?void 0:b[f])!=null?S:yY},m=h===Fb?r:p;return x_(m,i)}}function l(){return function(u){var d,h;typeof u=="object"?h=(d=PI(u))!=null?d:Fb:h=u;var f=function(m){var y,v,b;return(b=(v=(y=s(m))==null?void 0:y.mutations)==null?void 0:v[h])!=null?b:vY},p=h===Fb?o:f;return x_(p,i)}}function c(u,d){for(var h,f=u[n],p=new Set,m=0,y=d.map(P3);m<y.length;m++){var v=y[m],b=f.provided[v.type];if(b)for(var S=(h=v.id!==void 0?b[v.id]:uY(Object.values(b)))!=null?h:[],w=0,A=S;w<A.length;w++){var _=A[w];p.add(_)}}return uY(Array.from(p.values()).map(function(P){var R=f.queries[P];return R?[{queryCacheKey:P,endpointName:R.endpointName,originalArgs:R.originalArgs}]:[]}))}}var pN=WeakMap?new WeakMap:void 0,bY=function(t){var e=t.endpointName,n=t.queryArgs,r="",o=pN?.get(n);
100if(typeof o=="string")r=o;else{var i=JSON.stringify(n,function(s,a){return Fv(a)?Object.keys(a).sort().reduce(function(l,c){return l[c]=a[c],l},{}):a});Fv(n)&&pN?.set(n,i),r=i}return e+"("+r+")"};function lRe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){var o=T3(function(u){var d,h;return(h=r.extractRehydrationInfo)==null?void 0:h.call(r,u,{reducerPath:(d=r.reducerPath)!=null?d:"api"})}),i=wp(ms({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},r),{extractRehydrationInfo:o,serializeQueryArgs:function(u){var d=bY;if("serializeQueryArgs"in u.endpointDefinition){var h=u.endpointDefinition.serializeQueryArgs;d=function(f){var p=h(f);return typeof p=="string"?p:bY(wp(ms({},f),{queryArgs:p}))}}else r.serializeQueryArgs&&(d=r.serializeQueryArgs);return d(u)},tagTypes:rL([],r.tagTypes||[])}),s={endpointDefinitions:{},batch:function(u){u()},apiUid:Ese(),extractRehydrationInfo:o,hasRehydrationInfo:T3(function(u){return o(u)!=null})},a={injectEndpoints:c,enhanceEndpoints:function(u){var d=u.addTagTypes,h=u.endpoints;if(d)for(var f=0,p=d;f<p.length;f++){var m=p[f];i.tagTypes.includes(m)||i.tagTypes.push(m)}if(h)for(var y=0,v=Object.entries(h);y<v.length;y++){var b=v[y],S=b[0],w=b[1];typeof w=="function"?w(s.endpointDefinitions[S]):Object.assign(s.endpointDefinitions[S]||{},w)}return a}},l=t.map(function(u){return u.init(a,i,s)});function c(u){for(var d=u.endpoints({query:function(w){return wp(ms({},w),{type:Bp.query})},mutation:function(w){return wp(ms({},w),{type:Bp.mutation})}}),h=0,f=Object.entries(d);h<f.length;h++){var p=f[h],m=p[0],y=p[1];if(!u.overrideExisting&&m in s.endpointDefinitions){typeof process<"u";continue}s.endpointDefinitions[m]=y;for(var v=0,b=l;v<b.length;v++){var S=b[v];S.injectEndpoint(m,y)}}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function cRe(t){for(var e in t)return!1;return!0}var uRe=2147483647/1e3-1,dRe=function(t){var e=t.reducerPath,n=t.api,r=t.context,o=t.internalState,i=n.internalActions,s=i.removeQueryResult,a=i.unsubscribeQueryResult;function l(h){var f=o.currentSubscriptions[h];return!!f&&!cRe(f)}var c={},u=function(h,f,p){var m;if(a.match(h)){var y=f.getState()[e],v=h.payload.queryCacheKey;d(v,(m=y.queries[v])==null?void 0:m.endpointName,f,y.config)}if(n.util.resetApiState.match(h))for(var b=0,S=Object.entries(c);b<S.length;b++){var w=S[b],A=w[0],_=w[1];_&&clearTimeout(_),delete c[A]}if(r.hasRehydrationInfo(h))for(var y=f.getState()[e],P=r.extractRehydrationInfo(h).queries,R=0,O=Object.entries(P);R<O.length;R++){var N=O[R],v=N[0],M=N[1];d(v,M?.endpointName,f,y.config)}};function d(h,f,p,m){var y,v=r.endpointDefinitions[f],b=(y=v?.keepUnusedDataFor)!=null?y:m.keepUnusedDataFor;if(b!==1/0){var S=Math.max(0,Math.min(b,uRe));if(!l(h)){var w=c[h];w&&clearTimeout(w),c[h]=setTimeout(function(){l(h)||p.dispatch(s({queryCacheKey:h})),delete c[h]},S*1e3)}}}return u},hRe=function(t){var e=t.reducerPath,n=t.context,r=t.context.endpointDefinitions,o=t.mutationThunk,i=t.api,s=t.assertTagType,a=t.refetchQuery,l=i.internalActions.removeQueryResult,c=jx(KC(o),jk(o)),u=function(h,f){c(h)&&d(Ise(h,"invalidatesTags",r,s),f),i.util.invalidateTags.match(h)&&d(hG(h.payload,void 0,void 0,void 0,void 0,s),f)};function d(h,f){var p=f.getState(),m=p[e],y=i.util.selectInvalidatedBy(p,h);n.batch(function(){for(var v,b=Array.from(y.values()),S=0,w=b;S<w.length;S++){var A=w[S].queryCacheKey,_=m.queries[A],P=(v=m.subscriptions[A])!=null?v:{};_&&(Object.keys(P).length===0?f.dispatch(l({queryCacheKey:A})):_.status!==Hi.uninitialized&&f.dispatch(a(_,A)))}})}return u},fRe=function(t){var e=t.reducerPath,n=t.queryThunk,r=t.api,o=t.refetchQuery,i=t.internalState,s={},a=function(f,p){(r.internalActions.updateSubscriptionOptions.match(f)||r.internalActions.unsubscribeQueryResult.match(f))&&c(f.payload,p),(n.pending.match(f)||n.rejected.match(f)&&f.meta.condition)&&c(f.meta.arg,p),(n.fulfilled.match(f)||n.rejected.match(f)&&!f.meta.condition)&&l(f.meta.arg,p),r.util.resetApiState.match(f)&&d()};function l(f,p){var m=f.queryCacheKey,y=p.getState()[e],v=y.queries[m],b=i.currentSubscriptions[m];if(!(!v||v.status===Hi.uninitialized)){var S=h(b);if(Number.isFinite(S)){var w=s[m];w?.timeout&&(clearTimeout(w.timeout),w.timeout=void 0);var A=Date.now()+S,_=s[m]={nextPollTimestamp:A,pollingInterval:S,timeout:setTimeout(function(){_.timeout=void 0,p.dispatch(o(v,m))},S)}}}}function c(f,p){var m=f.queryCacheKey,y=p.getState()[e],v=y.queries[m],b=i.currentSubscriptions[m];if(!(!v||v.status===Hi.uninitialized)){var S=h(b);if(!Number.isFinite(S)){u(m);return}var w=s[m],A=Date.now()+S;(!w||A<w.nextPollTimestamp)&&l({queryCacheKey:m},p)}}function u(f){var p=s[f];p?.timeout&&clearTimeout(p.timeout),delete s[f]}function d(){for(var f=0,p=Object.keys(s);f<p.length;f++){var m=p[f];u(m)}}function h(f){f===void 0&&(f={});var p=Number.POSITIVE_INFINITY;for(var m in f)f[m].pollingInterval&&(p=Math.min(f[m].pollingInterval,p));return p}return a},pRe=function(t){var e=t.reducerPath,n=t.context,r=t.api,o=t.refetchQuery,i=t.internalState,s=r.internalActions.removeQueryResult,a=function(c,u){TI.match(c)&&l(u,"refetchOnFocus"),_I.match(c)&&l(u,"refetchOnReconnect")};function l(c,u){var d=c.getState()[e],h=d.queries,f=i.currentSubscriptions;n.batch(function(){for(var p=0,m=Object.keys(f);p<m.length;p++){var y=m[p],v=h[y],b=f[y];if(!(!b||!v)){var S=Object.values(b).some(function(w){return w[u]===!0})||Object.values(b).every(function(w){return w[u]===void 0})&&d.config[u];S&&(Object.keys(b).length===0?c.dispatch(s({queryCacheKey:y})):v.status!==Hi.uninitialized&&c.dispatch(o(v,y)))}}})}return a},CY=new Error("Promise never resolved before cacheEntryRemoved."),gRe=function(t){var e=t.api,n=t.reducerPath,r=t.context,o=t.queryThunk,i=t.mutationThunk;t.internalState;var s=I3(o),a=I3(i),l=KC(o,i),c={},u=function(f,p,m){var y=d(f);if(o.pending.match(f)){var v=m[n].queries[y],b=p.getState()[n].queries[y];!v&&b&&h(f.meta.arg.endpointName,f.meta.arg.originalArgs,y,p,f.meta.requestId)}else if(i.pending.match(f)){var b=p.getState()[n].mutations[y];b&&h(f.meta.arg.endpointName,f.meta.arg.originalArgs,y,p,f.meta.requestId)}else if(l(f)){var S=c[y];S?.valueResolved&&(S.valueResolved({data:f.payload,meta:f.meta.baseQueryMeta}),delete S.valueResolved)}else if(e.internalActions.removeQueryResult.match(f)||e.internalActions.removeMutationResult.match(f)){var S=c[y];S&&(delete c[y],S.cacheEntryRemoved())}else if(e.util.resetApiState.match(f))for(var w=0,A=Object.entries(c);w<A.length;w++){var _=A[w],P=_[0],S=_[1];delete c[P],S.cacheEntryRemoved()}};function d(f){return s(f)?f.meta.arg.queryCacheKey:a(f)?f.meta.requestId:e.internalActions.removeQueryResult.match(f)?f.payload.queryCacheKey:e.internalActions.removeMutationResult.match(f)?PI(f.payload):""}function h(f,p,m,y,v){var b=r.endpointDefinitions[f],S=b?.onCacheEntryAdded;if(S){var w={},A=new Promise(function(M){w.cacheEntryRemoved=M}),_=Promise.race([new Promise(function(M){w.valueResolved=M}),A.then(function(){throw CY})]);_.catch(function(){}),c[m]=w;var P=e.endpoints[f].select(b.type===Bp.query?p:m),R=y.dispatch(function(M,L,F){return F}),O=wp(ms({},y),{getCacheEntry:function(){return P(y.getState())},requestId:v,extra:R,updateCachedData:b.type===Bp.query?function(M){return y.dispatch(e.util.updateQueryData(f,p,M))}:void 0,cacheDataLoaded:_,cacheEntryRemoved:A}),N=S(p,O);Promise.resolve(N).catch(function(M){if(M!==CY)throw M})}}return u},mRe=function(t){var e=t.api,n=t.context,r=t.queryThunk,o=t.mutationThunk,i=uG(r,o),s=AI(r,o),a=KC(r,o),l={},c=function(u,d){var h,f,p;if(i(u)){var m=u.meta,y=m.requestId,v=m.arg,b=v.endpointName,S=v.originalArgs,w=n.endpointDefinitions[b],A=w?.onQueryStarted;if(A){var _={},P=new Promise(function(D,k){_.resolve=D,_.reject=k});P.catch(function(){}),l[y]=_;var R=e.endpoints[b].select(w.type===Bp.query?S:y),O=d.dispatch(function(D,k,U){return U}),N=wp(ms({},d),{getCacheEntry:function(){return R(d.getState())},requestId:y,extra:O,updateCachedData:w.type===Bp.query?function(D){return d.dispatch(e.util.updateQueryData(b,S,D))}:void 0,queryFulfilled:P});A(S,N)}}else if(a(u)){var M=u.meta,y=M.requestId,L=M.baseQueryMeta;(h=l[y])==null||h.resolve({data:u.payload,meta:L}),delete l[y]}else if(s(u)){var F=u.meta,y=F.requestId,$=F.rejectedWithValue,L=F.baseQueryMeta;(p=l[y])==null||p.reject({error:(f=u.payload)!=null?f:u.error,isUnhandledError:!$,meta:L}),delete l[y]}};return c},yRe=function(t){var e=t.api,n=t.context.apiUid,r=t.reducerPath;return function(o,i){var s,a;e.util.resetApiState.match(o)&&i.dispatch(e.internalActions.middlewareRegistered(n)),typeof process<"u"}},SY,vRe=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(SY||(SY=Promise.resolve())).then(t).cat
100ch(function(e){return setTimeout(function(){throw e},0)})},bRe=function(t){var e=t.api,n=t.queryThunk,r=t.internalState,o=e.reducerPath+"/subscriptions",i=null,s=!1,a=e.internalActions,l=a.updateSubscriptionOptions,c=a.unsubscribeQueryResult,u=function(d,h){var f,p,m,y,v,b,S,w,A;if(l.match(h)){var _=h.payload,P=_.queryCacheKey,R=_.requestId,O=_.options;return(f=d?.[P])!=null&&f[R]&&(d[P][R]=O),!0}if(c.match(h)){var N=h.payload,P=N.queryCacheKey,R=N.requestId;return d[P]&&delete d[P][R],!0}if(e.internalActions.removeQueryResult.match(h))return delete d[h.payload.queryCacheKey],!0;if(n.pending.match(h)){var M=h.meta,L=M.arg,R=M.requestId;if(L.subscribe){var F=(m=d[p=L.queryCacheKey])!=null?m:d[p]={};return F[R]=(v=(y=L.subscriptionOptions)!=null?y:F[R])!=null?v:{},!0}}if(n.rejected.match(h)){var $=h.meta,D=$.condition,L=$.arg,R=$.requestId;if(D&&L.subscribe){var F=(S=d[b=L.queryCacheKey])!=null?S:d[b]={};return F[R]=(A=(w=L.subscriptionOptions)!=null?w:F[R])!=null?A:{},!0}}return!1};return function(d,h){var f,p;if(i||(i=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(d))return i=r.currentSubscriptions={},[!0,!1];if(e.internalActions.internal_probeSubscription.match(d)){var m=d.payload,y=m.queryCacheKey,v=m.requestId,b=!!((f=r.currentSubscriptions[y])!=null&&f[v]);return[!1,b]}var S=u(r.currentSubscriptions,d);if(S){s||(vRe(function(){var P=JSON.parse(JSON.stringify(r.currentSubscriptions)),R=gse(i,function(){return P}),O=R[1];h.next(e.internalActions.subscriptionsUpdated(O)),i=P,s=!1}),s=!0);var w=!!((p=d.type)!=null&&p.startsWith(o)),A=n.rejected.match(d)&&d.meta.condition&&!!d.meta.arg.subscribe,_=!w&&!A;return[_,!1]}return[!0,!1]}};function CRe(t){var e=t.reducerPath,n=t.queryThunk,r=t.api,o=t.context,i=o.apiUid,s={invalidateTags:vu(e+"/invalidateTags")},a=function(d){return!!d&&typeof d.type=="string"&&d.type.startsWith(e+"/")},l=[yRe,dRe,hRe,fRe,gRe,mRe],c=function(d){var h=!1,f={currentSubscriptions:{}},p=wp(ms({},t),{internalState:f,refetchQuery:u}),m=l.map(function(b){return b(p)}),y=bRe(p),v=pRe(p);return function(b){return function(S){h||(h=!0,d.dispatch(r.internalActions.middlewareRegistered(i)));var w=wp(ms({},d),{next:b}),A=d.getState(),_=y(S,w,A),P=_[0],R=_[1],O;if(P?O=b(S):O=R,d.getState()[e]&&(v(S,w,A),a(S)||o.hasRehydrationInfo(S)))for(var N=0,M=m;N<M.length;N++){var L=M[N];L(S,w,A)}return O}}};return{middleware:c,actions:s};function u(d,h,f){return f===void 0&&(f={}),n(ms({type:"query",endpointName:d.endpointName,originalArgs:d.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:h},f))}}function wy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];Object.assign.apply(Object,rL([t],e))}var EY=Symbol(),SRe=function(){return{name:EY,init:function(t,e,n){var r=e.baseQuery,o=e.tagTypes,i=e.reducerPath,s=e.serializeQueryArgs,a=e.keepUnusedDataFor,l=e.refetchOnMountOrArgChange,c=e.refetchOnFocus,u=e.refetchOnReconnect;tPe();var d=function(se){return typeof process<"u",se};Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:_I,onOffline:aL,onFocus:TI,onFocusLost:sL},util:{}});var h=iRe({baseQuery:r,reducerPath:i,context:n,api:t,serializeQueryArgs:s,assertTagType:d}),f=h.queryThunk,p=h.mutationThunk,m=h.patchQueryData,y=h.updateQueryData,v=h.upsertQueryData,b=h.prefetch,S=h.buildMatchThunkActions,w=sRe({context:n,queryThunk:f,mutationThunk:p,reducerPath:i,assertTagType:d,config:{refetchOnFocus:c,refetchOnReconnect:u,refetchOnMountOrArgChange:l,keepUnusedDataFor:a,reducerPath:i}}),A=w.reducer,_=w.actions;wy(t.util,{patchQueryData:m,updateQueryData:y,upsertQueryData:v,prefetch:b,resetApiState:_.resetApiState}),wy(t.internalActions,_);var P=CRe({reducerPath:i,context:n,queryThunk:f,mutationThunk:p,api:t,assertTagType:d}),R=P.middleware,O=P.actions;wy(t.util,O),wy(t,{reducer:A,middleware:R});var N=aRe({serializeQueryArgs:s,reducerPath:i}),M=N.buildQuerySelector,L=N.buildMutationSelector,F=N.selectInvalidatedBy;wy(t.util,{selectInvalidatedBy:F});var $=oRe({queryThunk:f,mutationThunk:p,api:t,serializeQueryArgs:s,context:n}),D=$.buildInitiateQuery,k=$.buildInitiateMutation,U=$.getRunningMutationThunk,H=$.getRunningMutationsThunk,V=$.getRunningQueriesThunk,q=$.getRunningQueryThunk,J=$.getRunningOperationPromises,Q=$.removalWarning;return wy(t.util,{getRunningOperationPromises:J,getRunningOperationPromise:Q,getRunningMutationThunk:U,getRunningMutationsThunk:H,getRunningQueryThunk:q,getRunningQueriesThunk:V}),{name:EY,injectEndpoint:function(se,oe){var ie,ee,re=t;(ee=(ie=re.endpoints)[se])!=null||(ie[se]={}),_se(oe)?wy(re.endpoints[se],{name:se,select:M(se,oe),initiate:D(se,oe)},S(f,se)):nRe(oe)&&wy(re.endpoints[se],{name:se,select:L(),initiate:k(se)},S(p,se))}}}}},ERe=globalThis&&globalThis.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},xRe=Object.defineProperty,wRe=Object.defineProperties,ARe=Object.getOwnPropertyDescriptors,xY=Object.getOwnPropertySymbols,TRe=Object.prototype.hasOwnProperty,_Re=Object.prototype.propertyIsEnumerable,wY=function(t,e,n){return e in t?xRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},Pg=function(t,e){for(var n in e||(e={}))TRe.call(e,n)&&wY(t,n,e[n]);if(xY)for(var r=0,o=xY(e);r<o.length;r++){var n=o[r];_Re.call(e,n)&&wY(t,n,e[n])}return t},zM=function(t,e){return wRe(t,ARe(e))};function AY(t,e,n,r){var o=C.useMemo(function(){return{queryArgs:t,serialized:typeof t=="object"?e({queryArgs:t,endpointDefinition:n,endpointName:r}):t}},[t,e,n,r]),i=C.useRef(o);return C.useEffect(function(){i.current.serialized!==o.serialized&&(i.current=o)},[o]),i.current.serialized===o.serialized?i.current.queryArgs:t}var xH=Symbol();function wH(t){var e=C.useRef(t);return C.useEffect(function(){XD(e.current,t)||(e.current=t)},[t]),XD(e.current,t)?e.current:t}var gN=WeakMap?new WeakMap:void 0,IRe=function(t){var e=t.endpointName,n=t.queryArgs,r="",o=gN?.get(n);
100if(typeof o=="string")r=o;else{var i=JSON.stringify(n,function(s,a){return Fv(a)?Object.keys(a).sort().reduce(function(l,c){return l[c]=a[c],l},{}):a});Fv(n)&&gN?.set(n,i),r=i}return e+"("+r+")"},PRe=typeof window<"u"&&window.document&&window.document.createElement?C.useLayoutEffect:C.useEffect,RRe=function(t){return t},ORe=function(t){return t.isUninitialized?zM(Pg({},t),{isUninitialized:!1,isFetching:!0,isLoading:t.data===void 0,status:Hi.pending}):t};function NRe(t){var e=t.api,n=t.moduleOptions,r=n.batch,o=n.useDispatch,i=n.useSelector,s=n.useStore,a=n.unstable__sideEffectsInRender,l=t.serializeQueryArgs,c=t.context,u=a?function(m){return m()}:C.useEffect;return{buildQueryHooks:f,buildMutationHook:p,usePrefetch:h};function d(m,y,v){if(y?.endpointName&&m.isUninitialized){var b=y.endpointName,S=c.endpointDefinitions[b];l({queryArgs:y.originalArgs,endpointDefinition:S,endpointName:b})===l({queryArgs:v,endpointDefinition:S,endpointName:b})&&(y=void 0)}var w=m.isSuccess?m.data:y?.data;w===void 0&&(w=m.data);var A=w!==void 0,_=m.isLoading,P=!A&&_,R=m.isSuccess||_&&A;return zM(Pg({},m),{data:w,currentData:m.data,isFetching:_,isLoading:P,isSuccess:R})}function h(m,y){var v=o(),b=wH(y);return C.useCallback(function(S,w){return v(e.util.prefetch(m,S,Pg(Pg({},b),w)))},[m,v,b])}function f(m){var y=function(S,w){var A=w===void 0?{}:w,_=A.refetchOnReconnect,P=A.refetchOnFocus,R=A.refetchOnMountOrArgChange,O=A.skip,N=O===void 0?!1:O,M=A.pollingInterval,L=M===void 0?0:M,F=e.endpoints[m].initiate,$=o(),D=AY(N?Fb:S,IRe,c.endpointDefinitions[m],m),k=wH({refetchOnReconnect:_,refetchOnFocus:P,pollingInterval:L}),U=C.useRef(!1),H=C.useRef(),V=H.current||{},q=V.queryCacheKey,J=V.requestId,Q=!1;if(q&&J){var se=$(e.internalActions.internal_probeSubscription({queryCacheKey:q,requestId:J}));Q=!!se}var oe=!Q&&U.current;return u(function(){U.current=Q}),u(function(){oe&&(H.current=void 0)},[oe]),u(function(){var ie,ee=H.current;if(typeof process<"u",D===Fb){ee?.unsubscribe(),H.current=void 0;return}var re=(ie=H.current)==null?void 0:ie.subscriptionOptions;if(!ee||ee.arg!==D){ee?.unsubscribe();var fe=$(F(D,{subscriptionOptions:k,forceRefetch:R}));H.current=fe}else k!==re&&ee.updateSubscriptionOptions(k)},[$,F,R,D,k,oe]),C.useEffect(function(){return function(){var ie;(ie=H.current)==null||ie.unsubscribe(),H.current=void 0}},[]),C.useMemo(function(){return{refetch:function(){var ie;if(!H.current)throw new Error("Cannot refetch a query that has not been started yet.");return(ie=H.current)==null?void 0:ie.refetch()}}},[])},v=function(S){var w=S===void 0?{}:S,A=w.refetchOnReconnect,_=w.refetchOnFocus,P=w.pollingInterval,R=P===void 0?0:P,O=e.endpoints[m].initiate,N=o(),M=C.useState(xH),L=M[0],F=M[1],$=C.useRef(),D=wH({refetchOnReconnect:A,refetchOnFocus:_,pollingInterval:R});u(function(){var H,V,q=(H=$.current)==null?void 0:H.subscriptionOptions;D!==q&&((V=$.current)==null||V.updateSubscriptionOptions(D))},[D]);var k=C.useRef(D);u(function(){k.current=D},[D]);var U=C.useCallback(function(H,V){V===void 0&&(V=!1);var q;return r(function(){var J;(J=$.current)==null||J.unsubscribe(),$.current=q=N(O(H,{subscriptionOptions:k.current,forceRefetch:!V})),F(H)}),q},[N,O]);return C.useEffect(function(){return function(){var H;(H=$?.current)==null||H.unsubscribe()}},[]),C.useEffect(function(){L!==xH&&!$.current&&U(L,!0)},[L,U]),C.useMemo(function(){return[U,L]},[U,L])},b=function(S,w){var A=w===void 0?{}:w,_=A.skip,P=_===void 0?!1:_,R=A.selectFromResult,O=e.endpoints[m].select,N=AY(P?Fb:S,l,c.endpointDefinitions[m],m),M=C.useRef(),L=C.useMemo(function(){return x_([O(N),function(U,H){return H},function(U){return N}],d)},[O,N]),F=C.useMemo(function(){return R?x_([L],R):L},[L,R]),$=i(function(U){return F(U,M.current)},XD),D=s(),k=L(D.getState(),M.current);return PRe(function(){M.current=k},[k]),$};return{useQueryState:b,useQuerySubscription:y,useLazyQuerySubscription:v,useLazyQuery:function(S){var w=v(S),A=w[0],_=w[1],P=b(_,zM(Pg({},S),{skip:_===xH})),R=C.useMemo(function(){return{lastArg:_}},[_]);return C.useMemo(function(){return[A,P,R]},[A,P,R])},useQuery:function(S,w){var A=y(S,w),_=b(S,Pg({selectFromResult:S===Fb||w?.skip?void 0:ORe},w)),P=_.data,R=_.status,O=_.isLoading,N=_.isSuccess,M=_.isError,L=_.error;return C.useDebugValue({data:P,status:R,isLoading:O,isSuccess:N,isError:M,error:L}),C.useMemo(function(){return Pg(Pg({},_),A)},[_,A])}}}function p(m){return function(y){var v=y===void 0?{}
100:y,b=v.selectFromResult,S=b===void 0?RRe:b,w=v.fixedCacheKey,A=e.endpoints[m],_=A.select,P=A.initiate,R=o(),O=C.useState(),N=O[0],M=O[1];C.useEffect(function(){return function(){N?.arg.fixedCacheKey||N?.reset()}},[N]);var L=C.useCallback(function(ee){var re=R(P(ee,{fixedCacheKey:w}));return M(re),re},[R,P,w]),F=(N||{}).requestId,$=C.useMemo(function(){return x_([_({fixedCacheKey:w,requestId:N?.requestId})],S)},[_,N,S,w]),D=i($,XD),k=w==null?N?.arg.originalArgs:void 0,U=C.useCallback(function(){r(function(){N&&M(void 0),w&&R(e.internalActions.removeMutationResult({requestId:F,fixedCacheKey:w}))})},[R,w,N,F]),H=D.endpointName,V=D.data,q=D.status,J=D.isLoading,Q=D.isSuccess,se=D.isError,oe=D.error;C.useDebugValue({endpointName:H,data:V,status:q,isLoading:J,isSuccess:Q,isError:se,error:oe});var ie=C.useMemo(function(){return zM(Pg({},D),{originalArgs:k,reset:U})},[D,k,U]);return C.useMemo(function(){return[L,ie]},[L,ie])}}}var lL;(function(t){t.query="query",t.mutation="mutation"})(lL||(lL={}));function MRe(t){return t.type===lL.query}function DRe(t){return t.type===lL.mutation}function AH(t){return t.replace(t[0],t[0].toUpperCase())}function mN(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];Object.assign.apply(Object,ERe([t],e))}var LRe=Symbol(),kRe=function(t){var e=t===void 0?{}:t,n=e.batch,r=n===void 0?Vx.unstable_batchedUpdates:n,o=e.useDispatch,i=o===void 0?VP:o,s=e.useSelector,a=s===void 0?nse:s,l=e.useStore,c=l===void 0?use:l,u=e.unstable__sideEffectsInRender,d=u===void 0?!1:u;return{name:LRe,init:function(h,f,p){var m=f.serializeQueryArgs,y=h,v=NRe({api:h,moduleOptions:{batch:r,useDispatch:i,useSelector:a,useStore:c,unstable__sideEffectsInRender:d},serializeQueryArgs:m,context:p}),b=v.buildQueryHooks,S=v.buildMutationHook,w=v.usePrefetch;return mN(y,{usePrefetch:w}),mN(p,{batch:r}),{injectEndpoint:function(A,_){if(MRe(_)){var P=b(A),R=P.useQuery,O=P.useLazyQuery,N=P.useLazyQuerySubscription,M=P.useQueryState,L=P.useQuerySubscription;mN(y.endpoints[A],{useQuery:R,useLazyQuery:O,useLazyQuerySubscription:N,useQueryState:M,useQuerySubscription:L}),h["use"+AH(A)+"Query"]=R,h["useLazy"+AH(A)+"Query"]=O}else if(DRe(_)){var F=S(A);mN(y.endpoints[A],{useMutation:F}),h["use"+AH(A)+"Mutation"]=F}}}}}},FRe=lRe(SRe(),kRe()),mm=(t=>(t[t.EXTERNAL=0]="EXTERNAL",t[t.INTERNAL=1]="INTERNAL",t[t.ADMIN=2]="ADMIN",t))(mm||{}),pp=(t=>(t[t.ADMIN=1]="ADMIN",t[t.USER=2]="USER",t[t.VIEWER=3]="VIEWER",t[t.GROUP_ADMIN=4]="GROUP_ADMIN",t))(pp||{});const BRe=[1,2],rh={isAdmin:t=>t===pp.ADMIN,isGroupAdmin:t=>t===pp.GROUP_ADMIN,isAdminGroup:t=>BRe.includes(t),isUserInternal:t=>t===mm.ADMIN||t===mm.INTERNAL};var pr=(t=>(t[t.INTEGRATION=0]="INTEGRATION",t[t.NCNOC=1]="NCNOC",t[t.CNOC=2]="CNOC",t))(pr||{});const Wg={getProjectsFilterTypes:()=>{const t=[pr.INTEGRATION,pr.NCNOC,pr.CNOC],e=localStorage.getItem("projectsFilterTypes");return e?JSON.parse(e):t},setValueByKey:(t,e)=>{const n=typeof e=="string"?e:JSON.stringify(e);localStorage.setItem(t,n)},clearStoredValues:()=>{localStorage.clear()}},$Re={id:0,firstName:"",lastName:"",email:"",otp:"",resetHash:"",deleted:!1,groupId:0,roleId:0,settings:{ui:{theme:"light"}},role:{id:0,name:""},group:{id:0,name:"",canDownloadRTL:!1,deleted:!1,settings:{}},activated:!1},TH={user:$Re,token:null,date:""},HRe=rf({name:"auth",initialState:TH,reducers:{setCredentials:(t,e)=>{const{user:n,token:r}=e.payload;n&&(t.user=n),r&&(t.token=r),t.date=new Date().toString()},updateToken:(t,e)=>{t.token=e.payload},logout:t=>{t.user=TH.user,t.token=TH.token,t.date=new Date().toString(),Wg.clearStoredValues()},toggleTheme:(t,e)=>{t.user.settings.ui.theme=e.payload}}}),{actions:{setCredentials:bC,updateToken:Ujt,logout:qk,toggleTheme:zjt},reducer:URe}=HRe,Dc=t=>t.auth.user,jP=t=>t.auth.user.group,fG=t=>t.auth.user.group.id,qP=t=>t.auth.user.id,Yk=t=>!!t.auth.token,zRe=t=>t.auth.date,Rse=t=>t.auth.user.settings.ui.theme,qx=t=>rh.isAdmin(t.auth.user.role.id),Ose=t=>rh.isGroupAdmin(t.auth.user.role.id),VRe=t=>rh.isUserInternal(t.auth.user.group.type),g1={environment:"production",baseUrl:"https://inoculator.ai",isProd:!0,local:!1,supportPortalUrl:"https://signatureip.ai/Contact",termsOfServiceUrl:"https://signatureip.ai",privacyPolicyUrl:"https://signatureip.ai",productBrief:"https://signatureip.ai/INOCulator",learnMore:"https://signatureip.ai/INOCulator"},GRe=g1.baseUrl,hn="api/v1/",dt={baseUrl:GRe,version:`${hn}version`,login:`${hn}login`,loginToken:`${hn}login-token`,logout:`${hn}logout`,changePassword:`${hn}change-password`,resetPassword:`${hn}reset-password`,verifyAccessToken:`${hn}verify-access-token`,activateUser:`${hn}activate-user`,refresh:`${hn}refresh-token`,persistLogin:`${hn}persist-login`,groups:`${hn}groups`,groupFtpCredential:`${hn}group-ftp-credentials`,groupCollaboration:`${hn}group-collaboration`,users:`${hn}users`,assignProjectsAndDeleteUser:`${hn}users/assign-projects`,groupUsers:`${hn}group-users`,invite:`${hn}invite`,roles:`${hn}roles`,project:`${hn}project`,projectCreate:`${hn}project/create`,projectClone:`${hn}project/clone`,projectAllOwnedByUser:`${hn}project/all`,projectAllOwnedByUserCount:`${hn}project/count`,projectAllSharedToUser:`${hn}project/shared`,projectAllSharedToUserCount:`${hn}project/shared-count`,projectUploadExcelFile:`${hn}project/create-by-file`,projectsByIntegrationId:`${hn}project/integration`,projectConnections:`${hn}project-connections`,projectComponents:{base:`${hn}project-components`,componentAndConnection:"component-and-connection",multipleComponents:"multiple-components"},projectMacros:`${hn}project-macros`,projectMacroInstances:`${hn}project-macro-instances`,projectSharing:`${hn}project-sharing`,sharedProjectsGroupUsers:"shared-projects",sharedProject:`${hn}shared-projects`,projectTask:`${hn}project-tasks`,projectTaskAutoRoute:`${hn}project-tasks/autoroute`,projectTaskGenerate:`${hn}project-tasks/generate`,projectTaskSimulate:`${hn}project-tasks/simulate`,projectTaskExport:`${hn}project-tasks/export`,projectTaskDownloadJSON:`${hn}project-tasks/json`,projectTaskDownloadResult:`${hn}project-tasks/s3-link`,projectComponentsTree:`${hn}project-components-tree`,projectComponentsReachability:`${hn}project-components-reachability`,projectNcnocOverview:`${hn}project-ncnoc-overview`,projectNcnocPhysicalConnectivity:`${hn}project-ncnoc-physical-connectivity`,projectCnocSystem:`${hn}project-cnoc-system`,projectNcnocSystem:`${hn}project-ncnoc-system`,projectCnocSubtopology:`${hn}project-cnoc-subtopology`,projectComponentCnocRouter:`${hn}project-component-cnoc-router`,projectConnectionCnocRouter:`${hn}project-connection-cnoc-router`,projectComponentCnocDevice:`${hn}project-component-cnoc-device`,projectComponentCnocBridge:`${hn}project-component-cnoc-bridges`,projectCnocInterleaving:`${hn}project-cnoc-interleavings`,projectNcnocRegisters:`${hn}project-registers/ncnoc`,projectCnocRegisters:`${hn}project-registers/cnoc`,projectCnocAddress:`${hn}project-cnoc-addresses`,projectNcnocAddress:`${hn}project-ncnoc-addresses`,projectIntegrationTopologyNode:`${hn}project-integration-topology-nodes`,componentsMatrix:`${hn}
100project-components-matrix`,exceptionEmail:`${hn}error-email`,validateProject:`${hn}project-validator`,performanceProject:`${hn}project-performance`,projectRoutes:`${hn}project-routes`,routingTable:`${hn}routing-table`,userLocation:`${hn}user-locations`,rtlBranch:`${hn}rtl-branches`,projectComponentNcnocRouters:`${hn}project-component-ncnoc-routers`,projectComponentNcnocInitiators:`${hn}project-component-ncnoc-initiators`,projectComponentNcnocTargets:`${hn}project-component-ncnoc-targets`,projectComponentNcnocBridges:`${hn}project-component-ncnoc-bridges`,projectNcnocConnections:`${hn}project-ncnoc-connections`},WRe={fields:{}},jRe=rf({name:"error",initialState:WRe,reducers:{setFieldError:(t,e)=>{Array.isArray(e.payload.field)?e.payload.field.forEach(n=>{t.fields[n]=`invalid ${n}`}):t.fields[e.payload.field]=e.payload.message},clearFieldError:(t,e)=>{t.fields[e.payload]&&delete t.fields[e.payload]},clearFieldErrors:(t,e)=>{t.fields={}}}}),{actions:{setFieldError:A_,clearFieldError:CC,clearFieldErrors:Bv},reducer:qRe}=jRe,Yx=t=>t.error.fields;function Nse(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Nse(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function ev(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=Nse(t))&&(r&&(r+=" "),r+=e);return r}const T_=t=>typeof t=="number"&&!isNaN(t),SC=t=>typeof t=="string",uu=t=>typeof t=="function",VM=t=>SC(t)||uu(t)?t:null,_H=t=>C.isValidElement(t)||SC(t)||uu(t)||T_(t);function YRe(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=t;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,n)})})}function Xk(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=t;return function(s){let{children:a,position:l,preventExitTransition:c,done:u,nodeRef:d,isIn:h}=s;const f=r?`${e}--${l}`:e,p=r?`${n}--${l}`:n,m=C.useRef(0);return C.useLayoutEffect(()=>{const y=d.current,v=f.split(" "),b=S=>{S.target===d.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),m.current===0&&S.type!=="animationcancel"&&y.classList.remove(...v))};y.classList.add(...v),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),C.useEffect(()=>{const y=d.current,v=()=>{y.removeEventListener("animationend",v),o?YRe(y,u,i):u()};h||(c?v():(m.current=1,y.className+=` ${p}`,y.addEventListener("animationend",v)))},[h]),qt.createElement(qt.Fragment,null,a)}}function TY(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const Qd={list:new Map,emitQueue:new Map,on(t,e){return this.list.has(t)||this.list.set(t,[]),this.list.get(t).push(e),this},off(t,e){if(e){const n=this.list.get(t).filter(r=>r!==e);return this.list.set(t,n),this}return this.list.delete(t),this},cancelEmit(t){const e=this.emitQueue.get(t);return e&&(e.forEach(clearTimeout),this.emitQueue.delete(t)),this},emit(t){this.list.has(t)&&this.list.get(t).forEach(e=>{const n=setTimeout(()=>{e(...[].slice.call(arguments,1))},0);this.emitQueue.has(t)||this.emitQueue.set(t,[]),this.emitQueue.get(t).push(n)})}},yN=t=>{let{theme:e,type:n,...r}=t;return qt.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},IH={info:function(t){return qt.createElement(yN,{...t},qt.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return qt.createElement(yN,{...t},qt.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return qt.createElement(yN,{...t},qt.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return qt.createElement(yN,{...t},qt.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return qt.createElement("div",{className:"Toastify__spinner"})}};function XRe(t){const[,e]=C.useReducer(f=>f+1,0),[n,r]=C.useState([]),o=C.useRef(null),i=C.useRef(new Map).current,s=f=>n.indexOf(f)!==-1,a=C.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:t,containerId:null,isToastActive:s,getToast:f=>i.get(f)}).current;function l(f){let{containerId:p}=f;const{limit:m}=a.props;!m||p&&a.containerId!==p||(a.count-=a.queue.length,a.queue=[])}function c(f){r(p=>f==null?[]:p.filter(m=>m!==f))}function u(){const{toastContent:f,toastProps:p,staleId:m}=a.queue.shift();h(f,p,m)}function d(f,p){let{delay:m,staleId:y,...v}=p;if(!_H(f)||function(L){return!o.current||a.props.enableMultiContainer&&L.containerId!==a.props.containerId||i.has(L.toastId)&&L.updateId==null}(v))return;const{toastId:b,updateId:S,data:w}=v,{props:A}=a,_=()=>c(b),P=S==null;P&&a.count++;const R={...A,style:A.toastStyle,key:a.toastKey++,...Object.fromEntries(Object.entries(v).filter(L=>{let[F,$]=L;return $!=null})),toastId:b,updateId:S,data:w,closeToast:_,isIn:!1,className:VM(v.className||A.toastClassName),bodyClassName:VM(v.bodyClassName||A.bodyClassName),progressClassName:VM(v.progressClassName||A.progressClassName),autoClose:!v.isLoading&&(O=v.autoClose,N=A.autoClose,O===!1||T_(O)&&O>0?O:N),deleteToast(){const L=TY(i.get(b),"removed");i.delete(b),Qd.emit(4,L);const F=a.queue.length;if(a.count=b==null?a.count-a.displayedToast:a.count-1,a.count<0&&(a.count=0),F>0){const $=b==null?a.props.limit:1;if(F===1||$===1)a.displayedToast++,u();else{const D=$>F?F:$;a.displayedToast=D;for(let k=0;k<D;k++)u()}}else e()}};var O,N;R.iconOut=function(L){let{theme:F,type:$,isLoading:D,icon:k}=L,U=null;const H={theme:F,type:$};return k===!1||(uu(k)?U=k(H):C.isValidElement(k)?U=C.cloneElement(k,H):SC(k)||T_(k)?U=k:D?U=IH.spinner():(V=>V in IH)($)&&(U=IH[$](H))),U}(R),uu(v.onOpen)&&(R.onOpen=v.onOpen),uu(v.onClose)&&(R.onClose=v.onClose),R.closeButton=A.closeButton,v.closeButton===!1||_H(v.closeButton)?R.closeButton=v.closeButton:v.closeButton===!0&&(R.closeButton=!_H(A.closeButton)||A.closeButton);let M=f;C.isValidElement(f)&&!SC(f.type)?M=C.cloneElement(f,{closeToast:_,toastProps:R,data:w}):uu(f)&&(M=f({closeToast:_,toastProps:R,data:w})),A.limit&&A.limit>0&&a.count>A.limit&&P?a.queue.push({toastContent:M,toastProps:R,staleId:y}):T_(m)?setTimeout(()=>{h(M,R,y)},m):h(M,R,y)}function h(f,p,m){const{toastId:y}=p;m&&i.delete(m);const v={content:f,props:p};i.set(y,v),r(b=>[...b,y].filter(S=>S!==m)),Qd.emit(4,TY(v,v.props.updateId==null?"added":"updated"))}return C.useEffect(()=>(a.containerId=t.containerId,Qd.cancelEmit(3).on(0,d).on(1,f=>o.current&&c(f)).on(5,l).emit(2,a),()=>{i.clear(),Qd.emit(3,a)}),[]),C.useEffect(()=>{a.props=t,a.isToastActive=s,a.displayedToast=n.length}),{getToastToRender:function(f){const p=new Map,m=Array.from(i.values());return t.newestOnTop&&m.reverse(),m.forEach(y=>{const{position:v}=y.props;p.has(v)||p.set(v,[]),p.get(v).push(y)}),Array.from(p,y=>f(y[0],y[1]))},containerRef:o,isToastActive:s}}function _Y(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientX:t.clientX}function IY(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientY:t.clientY}function KRe(t){const[e,n]=C.useState(!1),[r,o]=C.useState(!1),i=C.useRef(null),s=C.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,a=C.useRef(t),{autoClose:l,pauseOnHover:c,closeToast:u,onClick:d,closeOnClick:h}=t;function f(w){if(t.draggable){w.nativeEvent.type==="touchstart"&&w.nativeEvent.preventDefault(),s.didMove=!1,document.addEventListener("mousemove",v),document.addEventListener("mouseup",b),document.addEventListener("touchmove",v),document.addEventListener("touchend",b);const A=i.current;s.canCloseOnClick=!0,s.canDrag=!0,s.boundingRect=A.getBoundingClientRect(),A.style.transition="",s.x=_Y(w.nativeEvent),s.y=IY(w.nativeEvent),t.draggableDirection==="x"?(s.start=s.x,s.removalDistance=A.offsetWidth*(t.draggablePercent/100)):(s.start=s.y,s.removalDistance=A.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent/100))}}function p(w){if(s.boundingRect){const{top:A,bottom:_,left:P,right:R}=s.boundingRect;w.nativeEvent.type!=="touchend"&&t.pauseOnHover&&s.x>=P&&s.x<=R&&s.y>=A&&s.y<=_?y():m()}}function m(){n(!0)}function y(){n(!1)}function v(w){const A=i.current;s.canDrag&&A&&(s.didMove=!0,e&&y(),s.x=_Y(w),s.y=IY(w),s.delta=t.draggableDirection==="x"?s.x-s.start:s.y-s.start,s.start!==s.x&&(s.canCloseOnClick=!1),A.style.transform=`translate${t.draggableDirection}(${s.delta}px)`,A.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function b(){document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",b);const w=i.current;if(s.canDrag&&s.didMove&&w){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),void t.closeToast();w.style.transition="transform 0.2s, opacity 0.2s",w.style.transform=`translate${t.draggableDirection}(0)`,w.style.opacity="1"}}C.useEffect(()=>{a.current=t}),C.useEffect(()=>(i.current&&i.current.addEventListener("d",m,{once:!0}),uu(t.onOpen)&&t.onOpen(C.isValidElement(t.children)&&t.children.props),()=>{const w=a.current;uu(w.onClose)&&w.onClose(C.isValidElement(w.children)&&w.children.props)}),[]),C.useEffect(()=>(t.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",m),window.addEventListener("blur",y)),()=>{t.pauseOnFocusLoss&&(window.removeEventListener("focus",m),window.removeEventListener("blur",y))}),[t.pauseOnFocusLoss]);const S={onMouseDown:f,onTouchStart:f,onMouseUp:p,onTouchEnd:p};return l&&c&&(S.onMouseEnter=y,S.onMouseLeave=m),h&&(S.onClick=w=>{d&&d(w),s.canCloseOnClick&&u()}),{playToast:m,pauseToast:y,isRunning:e,preventExitTransition:r,toastRef:i,eventHandlers:S}}function Mse(t){let{closeToast:e,theme:n,ariaLabel:r="close"}=t;return qt.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:o=>{o.stopPropagation(),e(o)},"aria-label":r},qt.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},qt.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function QRe(t){let{delay:e,isRunning:n,closeToast:r,type:o="default",hide:i,className:s,style:a,controlledProgress:l,progress:c,rtl:u,isIn:d,theme:h}=t;const f=i||l&&c===0,p={...a,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused",opacity:f?0:1};l&&(p.transform=`scaleX(${c})`);const m=ev("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),y=uu(s)?s({rtl:u,type:o,defaultClassName:m}):ev(m,s);return qt.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:y,style:p,[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{d&&r()}})}const ZRe=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:o}=KRe(t),{closeButton:i,children:s,autoClose:a,onClick:l,type:c,hideProgressBar:u,closeToast:d,transition:h,position:f,className:p,style:m,bodyClassName:y,bodyStyle:v,progressClassName:b,progressStyle:S,updateId:w,role:A,progress:_,rtl:P,toastId:R,deleteToast:O,isIn:N,isLoading:M,iconOut:L,closeOnClick:F,theme:$}=t,D=ev("Toastify__toast",`Toastify__toast-theme--${$}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":F}),k=uu(p)?p({rtl:P,position:f,type:c,defaultClassName:D}):ev(D,p),U=!!_||!a,H={closeToast:d,type:c,theme:$};let V=null;return i===!1||(V=uu(i)?i(H):C.isValidElement(i)?C.cloneElement(i,H):Mse(H)),qt.createElement(h,{isIn:N,done:O,position:f,preventExitTransition:n,nodeRef:r},qt.createElement("div",{id:R,onClick:l,className:k,...o,style:m,ref:r},qt.createElement("div",{...N&&{role:A},className:uu(y)?y({type:c}):ev("Toastify__toast-body",y),style:v},L!=null&&qt.createElement("div",{className:ev("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter"
100:!M})},L),qt.createElement("div",null,s)),V,qt.createElement(QRe,{...w&&!U?{key:`pb-${w}`}:{},rtl:P,theme:$,delay:a,isRunning:e,isIn:N,closeToast:d,hide:u,type:c,style:S,className:b,controlledProgress:U,progress:_||0})))},Kk=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},JRe=Xk(Kk("bounce",!0));Xk(Kk("slide",!0));Xk(Kk("zoom"));Xk(Kk("flip"));const O3=C.forwardRef((t,e)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=XRe(t),{className:i,style:s,rtl:a,containerId:l}=t;function c(u){const d=ev("Toastify__toast-container",`Toastify__toast-container--${u}`,{"Toastify__toast-container--rtl":a});return uu(i)?i({position:u,rtl:a,defaultClassName:d}):ev(d,VM(i))}return C.useEffect(()=>{e&&(e.current=r.current)},[]),qt.createElement("div",{ref:r,className:"Toastify",id:l},n((u,d)=>{const h=d.length?{...s}:{...s,pointerEvents:"none"};return qt.createElement("div",{className:c(u),style:h,key:`container-${u}`},d.map((f,p)=>{let{content:m,props:y}=f;return qt.createElement(ZRe,{...y,isIn:o(y.toastId),style:{...y.style,"--nth":p+1,"--len":d.length},key:`toast-${y.key}`},m)}))}))});O3.displayName="ToastContainer",O3.defaultProps={position:"top-right",transition:JRe,autoClose:5e3,closeButton:Mse,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let PH,Eb=new Map,BT=[],eOe=1;function Dse(){return""+eOe++}function tOe(t){return t&&(SC(t.toastId)||T_(t.toastId))?t.toastId:Dse()}function __(t,e){return Eb.size>0?Qd.emit(0,t,e):BT.push({content:t,options:e}),e.toastId}function cL(t,e){return{...e,type:e&&e.type||t,toastId:tOe(e)}}function vN(t){return(e,n)=>__(e,cL(t,n))}function ln(t,e){return __(t,cL("default",e))}ln.loading=(t,e)=>__(t,cL("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),ln.promise=function(t,e,n){let r,{pending:o,error:i,success:s}=e;o&&(r=SC(o)?ln.loading(o,n):ln.loading(o.render,{...n,...o}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,d,h)=>{if(d==null)return void ln.dismiss(r);const f={type:u,...a,...n,data:h},p=SC(d)?{render:d}:d;return r?ln.update(r,{...f,...p}):ln(p.render,{...f,...p}),h},c=uu(t)?t():t;return c.then(u=>l("success",s,u)).catch(u=>l("error",i,u)),c},ln.success=vN("success"),ln.info=vN("info"),ln.error=vN("error"),ln.warning=vN("warning"),ln.warn=ln.warning,ln.dark=(t,e)=>__(t,cL("default",{theme:"dark",...e})),ln.dismiss=t=>{Eb.size>0?Qd.emit(1,t):BT=BT.filter(e=>t!=null&&e.options.toastId!==t)},ln.clearWaitingQueue=function(t){return t===void 0&&(t={}),Qd.emit(5,t)},ln.isActive=t=>{let e=!1;return Eb.forEach(n=>{n.isToastActive&&n.isToastActive(t)&&(e=!0)}),e},ln.update=function(t,e){e===void 0&&(e={}),setTimeout(()=>{const n=function(r,o){let{containerId:i}=o;const s=Eb.get(i||PH);return s&&s.getToast(r)}(t,e);if(n){const{props:r,content:o}=n,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:Dse()};i.toastId!==t&&(i.staleId=t);const s=i.render||o;delete i.render,__(s,i)}},0)},ln.done=t=>{ln.update(t,{progress:1})},ln.onChange=t=>(Qd.on(4,t),()=>{Qd.off(4,t)}),ln.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ln.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Qd.on(2,t=>{PH=t.containerId||t,Eb.set(PH,t),BT.forEach(e=>{Qd.emit(0,e.content,e.options)}),BT=[]}).on(3,t=>{Eb.delete(t.containerId||t),Eb.size===0&&Qd.off(0).off(1).off(5)});var H1=(t=>(t.SECURITY_POLICY="securityPolicy",t))(H1||{}),m1=(t=>(t.WRITE_ONLY="WRITE_ONLY",t.READ_ONLY="READ_ONLY",t.READ_WRITE="READ_WRITE",t))(m1||{}),Wy=(t=>(t.SINGLE="SINGLE",t.SHORT="SHORT",t.LONG="LONG",t.MAX="MAX",t.ANY="ANY",t))(Wy||{}),wt=(t=>(t.AXI="AXI",t.AHB="AHB",t.APB="APB",t.SIG_NATIVE="SIG_NATIVE",t.SRAM="SRAM",t.SEC="SEC",t))(wt||{}),Ui=(t=>(t.FULL="Full",t.LITE="Lite",t.STREAM="Stream",t))(Ui||{}),Co=(t=>(t[t.THREE=3]="THREE",t[t.FOUR=4]="FOUR",t[t.FIVE=5]="FIVE",t))(Co||{}),Bb=(t=>(t.REQUEST="request",t.RESPONSE="response",t))(Bb||{}),qn=(t=>(t[t.PARAMETERS=0]="PARAMETERS",t[t.TIMING=1]="TIMING",t[t.TRAFFIC_PATTERN=2]="TRAFFIC_PATTERN",t[t.SECURITY=3]="SECURITY",t[t.OTHERS=4]="OTHERS",t[t.ROUTER=5]="ROUTER",t[t.ROUTING_TABLE=6]="ROUTING_TABLE",t[t.PIPELINES=7]="PIPELINES",t[t.QP_CHANNEL=8]="QP_CHANNEL",t[t.PIPELINE=9]="PIPELINE",t[t.INTERLEAVING=10]="INTERLEAVING",t))(qn||{}),Fe=(t=>(t.INITIATORS="initiators",t.TARGETS="targets",t.ROUTERS="routers",t.TOPOLOGIES="topologies",t.BRIDGES="bridges",t.VIRTUAL_TARGETS="virtualTargets",t))(Fe||{}),Yt=(t=>(t.ROUTER="router",t.INITIATOR="initiator",t.TARGET="target",t.DEFAULT_TARGET="defaultTarget",t.BRIDGE="bridge",t))(Yt||{}),pi=(t=>(t.INITIATORS="initiators",t.TARGETS="targets",t.ROUTERS="routers",t.CROUTERS="cRouters",t.CTARGETS="cTargets",t.BRIDGES="bridges",t))(pi||{}),tv=(t=>(t.SINGLE="Single",t.DUAL="Dual_1R1W",t.NOT_AVAILABLE="Not_Available",t))(tv||{}),We=(t=>(t.Project="Project",t.Projects="Projects",t.ProjectsCount="ProjectsCount",t.ProjectsShared="ProjectsShared",t.ProjectsSharedCount="ProjectsSharedCount",t.ProjectsByIntegrationId="ProjectByIntegrationid",t.ProjectTask="ProjectTask",t.ProjectComponentCnocRouter="ProjectComponentCnocRouter",t.ProjectComponentCnocDevice="ProjectComponentCnocDevice",t.ProjectConnectionCnocRouter="ProjectConnectionCnocRouter",t.ProjectCnocSubtopology="ProjectCnocSubtopology",t.ProjectCnocSystem="ProjectCnocSystem",t.ProjectNcnocSystem="ProjectNcnocSystem",t.ProjectSharing="ProjectSharing",t.SharedProject="SharedProject",t.ProjectRegister="ProjectRegister",t.ProjectCnocAddress="ProjectCnocAddress",t.ProjectComponentCnocBridges="ProjectComponentCnocBridges",t.ProjectNcnocAddress="ProjectNcnocAddress",t.ProjectValidator="ProjectValidator",t.ProjectCnocInterleaving="ProjectCnocInterleavings",t.ProjectIntegrationTopologyNodes="ProjectIntegrationTopologyNodes",t.GroupFtpCredential="GroupFtpCredentials",t.GroupCollaboration="GroupCollaborations",t.User="Users",t.UserLocation="UserLocations",t.RtlBranch="RtlBranches",t.EmailInvite="EmailInvites",t.ProjectComponents="ProjectComponents",t.ProjectRoutes="ProjectRoutes",t.RoutingTable="RoutingTable",t.ProjectComponentsTree="ProjectComponentsTree",t.ProjectComponentNcnocRouters="ProjectComponentNcnocRouters",t.ProjectComponentNcnocInitiators="ProjectComponentNcnocInitiators",t.Connections="Connections",t.ProjectComponentNcnocTargets="ProjectComponentNcnocTargets",t.ProjectComponentsReachability="ProjectComponentsReachability",t.ProjectComponentNcnocBridges="ProjectComponentNcnocBridges",t.ProjectNcnocPhysicalConnectivity="ProjectNcnocPhysicalConnectivity",t.ProjectNcnocConnections="ProjectNcnocConnections",t))(We||{}),nn=(t=>
100(t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t))(nn||{}),Lse=(t=>(t.OPTIONAL="optional",t))(Lse||{}),tC=(t=>(t.SIEMENS="siemens",t.SYNOPSYS="synopsys",t.CADENCE="cadence",t))(tC||{}),N3=(t=>(t.CELL="cell",t.TECH="tech",t))(N3||{}),GM=(t=>(t.SLOW="slow",t.TYPICAL="typical",t.FAST="fast",t))(GM||{}),Qg=(t=>(t.LEF="lef",t.LIB="lib",t.RLC="rlc",t.DEF="def",t))(Qg||{}),WM=(t=>(t.SLOW="slow",t.TYPICAL="typical",t.FAST="fast",t))(WM||{}),ql=(t=>(t.READ_BANDWIDTH="readBandwidth",t.WRITE_BANDWIDTH="writeBandwidth",t.READ_LATENCY="readLatency",t.WRITE_LATENCY="writeLatency",t))(ql||{}),RI=(t=>(t.FAST="FAST",t.SLOW="SLOW",t))(RI||{}),OI=(t=>(t.FAST="FAST",t.SLOW="SLOW",t))(OI||{}),ps=(t=>(t.TARGETS="targets",t.GROUPS="groups",t.GROUP_COLLABORATION="groupCollaboration",t.USERS="users",t.SHARE_WITH_USERS="shareWithUsers",t.TASKS="tasks",t.MATRIX="matrix",t.PERFORMANCE_MATRIX="performanceMatrix",t.ACCESS_MAP="accessMap",t.ADDRESS_MAP="addressMap",t.REGISTER_MAP="registerMap",t.USER_ACTIVITY="userActivity",t))(ps||{});const nOe=({data:t,severity:e="success",content:n=""})=>{const r=t?t.error.severity:e,o=t?t.error.message:n;switch(r){case"error":ln.error(o||"unhandled");break;case"success":ln.success(o||"unhandled");break;case"warn":ln.warn(o||"unhandled");break;case"info":ln.info(o||"unhandled");break}},RH=eRe({baseUrl:dt.baseUrl,credentials:"include",withCredentials:!0,sameSite:"lax",prepareHeaders:(t,{getState:e})=>{const n=e().auth.token;return n&&t.set("Authorization",`Bearer ${n}`),t}}),rOe=async(t,e,n)=>{let r=await RH(t,e,n);if(r?.error?.originalStatus===401||r?.error?.statusCode===401||r?.error?.data?.statusCode===401||r?.result?.message==="Not authorized."||r?.error?.status==="Not authorized."||r?.data?.message==="Not authorized."||r?.error?.data?.message==="Not authorized."){const o=await RH({url:dt.refresh,method:"GET"},e,n);o?.data?.token&&o?.data?.user?(e.dispatch(bC({token:o.data.token,data:o.data.user})),r=await RH(t,e,n)):(nOe({data:o.data}),e.dispatch(qk()))}return r?.data?.message?{error:{message:r?.data?.message}}:r?.data?.error?(r.data.error.field&&e.dispatch(A_({field:r.data.error.field,message:r.data.error.message})),{error:{[r.data.error?.field||"unhandled"]:r?.data.error.text||"unhandled error"}}):(r?.data?.token&&r?.data?.user&&e.dispatch(bC({token:r.data.token,data:r.data.user})),r)},Nr=FRe({baseQuery:rOe,tagTypes:["User","Users","Groups","Roles",We.Project,We.Projects,We.ProjectsCount,We.ProjectsByIntegrationId,We.ProjectsShared,We.ProjectsSharedCount,We.ProjectSharing,We.ProjectTask,"Connections","ProjectComponents",We.ProjectCnocSubtopology,We.ProjectComponentCnocRouter,We.ProjectComponentCnocDevice,We.ProjectComponentCnocBridges,We.ProjectConnectionCnocRouter,We.ProjectCnocSystem,We.ProjectNcnocSystem,We.ProjectRegister,We.ProjectCnocAddress,We.ProjectNcnocAddress,We.ProjectIntegrationTopologyNodes,"ProjectComponentsTree","ProjectComponentsMatrix","ProjectComponentsReachability",We.ProjectNcnocPhysicalConnectivity,"ProjectValidator",We.SharedProject,"SharedProjectsUsers","ProjectRoutes","Version","RoutingTable","ProjectMacros","ProjectMacroInstances",We.ProjectCnocInterleaving,We.GroupFtpCredential,We.GroupCollaboration,We.UserLocation,We.RtlBranch,We.EmailInvite,We.ProjectComponentNcnocRouters,We.ProjectComponentNcnocInitiators,We.ProjectComponentNcnocTargets,We.ProjectComponentNcnocBridges,We.ProjectNcnocConnections],endpoints:()=>({})}),oOe={[Nr.reducerPath]:Nr.reducer};Nr.middleware;const iOe={groups:[],roles:[],permissions:[],activeGroupId:0,activeGroupCollaborationId:"",activeRoleId:null},sOe=rf({name:"admin",initialState:iOe,reducers:{setGroups:(t,e)=>{t.groups=e.payload},setRoles:(t,e)=>{t.roles=e.payload},setActiveGroupId:(t,e)=>{t.activeGroupId=e.payload},setActiveGroupCollaborationId:(t,e)=>{t.activeGroupCollaborationId=e.payload},setActiveRoleId:(t,e)=>{t.activeRoleId=e.payload}}}),{actions:{setGroups:Vjt,setRoles:Gjt,setActiveGroupId:Qk,setActiveGroupCollaborationId:M3,setActiveRoleId:kse},reducer:aOe}=sOe,Xx=t=>t.admin.activeGroupId,pG=t=>t.admin.activeGroupCollaborationId;let bN;const lOe=new Uint8Array(16);function cOe(){if(!bN&&(bN=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bN))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bN(lOe)}const hl=[];for(let t=0;t<256;++t)hl.push((t+256).toString(16).slice(1));function uOe(t,e=0){return hl[t[e+0]]+hl[t[e+1]]+hl[t[e+2]]+hl[t[e+3]]+"-"+hl[t[e+4]]+hl[t[e+5]]+"-"+hl[t[e+6]]+hl[t[e+7]]+"-"+hl[t[e+8]]+hl[t[e+9]]+"-"+hl[t[e+10]]+hl[t[e+11]]+hl[t[e+12]]+hl[t[e+13]]+hl[t[e+14]]+hl[t[e+15]]}const dOe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PY={randomUUID:dOe};function Uo(t,e,n){if(PY.randomUUID&&!e&&!t)return PY.randomUUID();t=t||{};const r=t.random||(t.rng||cOe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=r[o];return e}return uOe(r)}const hOe={min:.5,max:1.5},fOe={min:0,max:1.5},$T={parameters:{noc:{addressWidth:[{key:32,value:32},{key:64,value:64}]}},type:"noc",powerDomainName:"VCC",groundDomainName:"GND",primaryPower:hOe,primaryGround:fOe,autoAddressMap:!1,disableFrequency:!1,reposition:!1,topMacroId:""},Eo={deepCopy:t=>JSON.parse(JSON.stringify(t)),getLocalStorage:t=>window.localStorage.getItem(t),setLocalStorage:(t,e)=>{window.localStorage.setItem(t,JSON.stringify(e))},getDarkerLighterHexColors:(t,e=.2,n=.2)=>{const r=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16),s=Math.min(r+(255-r)*e,255),a=Math.min(o+(255-o)*e,255),l=Math.min(i+(255-i)*e,255),c=Math.max(r-r*n,0),u=Math.max(o-o*n,0),d=Math.max(i-i*n,0),h=`#${Math.round(s).toString(16).padStart(2,"0")}${Math.round(a).toString(16).padStart(2,"0")}${Math.round(l).toString(16).padStart(2,"0")}`,f=`#${Math.round(c).toString(16).padStart(2,"0")}${Math.round(u).toString(16).padStart(2,"0")}${Math.round(d).toString(16).padStart(2,"0")}`;return{main:t,lighter:h,darker:f}},openInNewTab:t=>{window.open(t,"_blank","noreferrer")},preloadImages:t=>Promise.all(t.map(e=>new Promise((n,r)=>{const o=new Image;o.src=e,o.onload=n,o.onerror=r})))},uL=4,RY=0,dL=[{key:1,value:1},{key:2,value:2},{key:4,value:4},{key:8,value:8},{key:16,value:16},{key:32,value:32},{key:64,value:64},{key:128,value:128},{key:256,value:256}],pOe="Read Reorder Buffer Size",gOe="Write Reorder Buffer Size";var zo=(t=>(t.SECURE="Secure",t.NON_SECURE="Non-secure",t))(zo||{}),kr=(t=>(t.PASSTHROUGH="Passthrough",t.BLOCKED="Blocked",t.PROGRAMMABLE="Programmable",t.FIXED_SECURE="Fixed Secure",t))(kr||{}),Xl=(t=>(t.PASSTHROUGH="Passthrough",t.BLOCKED="Blocked",t.PROGRAMMABLE_SECURE="Programmable: Secure",t.PROGRAMMABLE_NON_SECURE="Programmable: Non-secure",t.FIXED_SECURE="Fixed Secure",t))(Xl||{});const Fse="Security Policy";H1.SECURITY_POLICY,H1.SECURITY_POLICY;const D3="Default",mOe="No connection";H1.SECURITY_POLICY+"";const L3={[Xl.PASSTHROUGH]:"mediumseagreen",[Xl.BLOCKED]:"#c96851",[Xl.PROGRAMMABLE_NON_SECURE]:"#fcc736",[Xl.PROGRAMMABLE_SECURE]:"#30F2F2",[Xl.FIXED_SECURE]:"dodgerblue",[D3]:"darkgray"},NI={passthrough:kr.PASSTHROUGH,blocked:kr.BLOCKED,programmable:kr.PROGRAMMABLE,fixed_secure:kr.FIXED_SECURE,"Fixed-Secure":kr.FIXED_SECURE,secure:zo.SECURE,non_secure:zo.NON_SECURE,unsecure:zo.NON_SECURE,[kr.PASSTHROUGH]:kr.PASSTHROUGH,[kr.BLOCKED]:kr.BLOCKED,[kr.PROGRAMMABLE]:kr.PROGRAMMABLE,[kr.FIXED_SECURE]:kr.FIXED_SECURE,[zo.SECURE]:zo.SECURE,[zo.NON_SECURE]:zo.NON_SECURE},Bse=[{key:kr.PASSTHROUGH+zo.SECURE,value:Xl.PASSTHROUGH},{key:kr.BLOCKED+zo.SECURE,value:Xl.BLOCKED},{key:kr.PROGRAMMABLE+zo.SECURE,value:Xl.PROGRAMMABLE_SECURE},{key:kr.PROGRAMMABLE+zo.NON_SECURE,value:Xl.PROGRAMMABLE_NON_SECURE},{key:kr.FIXED_SECURE+zo.SECURE,value:Xl.FIXED_SECURE}],OY={[Xl.PASSTHROUGH]:{rootPolicy:kr.PASSTHROUGH,interfacePolicy:zo.SECURE},[Xl.BLOCKED]:{rootPolicy:kr.BLOCKED,interfacePolicy:zo.SECURE},[Xl.PROGRAMMABLE_NON_SECURE]:{rootPolicy:kr.PROGRAMMABLE,interfacePolicy:zo.NON_SECURE},[Xl.PROGRAMMABLE_SECURE]:{rootPolicy:kr.PROGRAMMABLE,interfacePolicy:zo.SECURE},[Xl.FIXED_SECURE]:{rootPolicy:kr.FIXED_SECURE,interfacePolicy:zo.SECURE}},gG=[{key:kr.PASSTHROUGH,value:kr.PASSTHROUGH},{key:kr.BLOCKED,value:kr.BLOCKED},{key:kr.PROGRAMMABLE,value:kr.PROGRAMMABLE},{key:kr.FIXED_SECURE,value:kr.FIXED_SECURE}],mG=[{key:zo.SECURE,value:zo.SECURE},{key:zo.NON_SECURE,value:zo.NON_SECURE}],WE=8,jE=4,nv=16,$se=4,NY=[{key:8,value:8},{key:16,value:16},{key:32,value:32},{key:64,value:64},{key:128,value:128},{key:256,value:256}],yOe=[{key:wt.AXI,value:wt.AXI,displayName:"AXI Slave"},{key:wt.AHB,value:wt.AHB,displayName:"AHB Slave"},{key:wt.APB,value:wt.APB,displayName:"APB Slave"},{key:wt.SIG_NATIVE,value:wt.SIG_NATIVE}],vOe=[{key:wt.AXI,value:wt.AXI,displayName:"AXI Master"},{key:wt.AHB,value:wt.AHB,displayName:"AHB Master"},{key:wt.APB,value:wt.APB,displayName:"APB Master"},{key:wt.SIG_NATIVE,value:wt.SIG_NATIVE},{key:wt.SRAM,value:wt.SRAM}],MY={min:2,max:4096},DY={min:1,max:4096},LY={min:1,max:32},kY={min:1,max:32},bOe={min:1,max:256},HT={frequency:{min:0,max:Number.POSITIVE_INFINITY},powerDomainName:"VCC",groundDomainName:"GND",primaryPower:1,useParentPowerDomain:!0},UT={bus:{protocols:yOe,versions:{AXI:[{key:Co.THREE,value:Co.THREE},{key:Co.FOUR,value:Co.FOUR}],AHB:[{key:Co.THREE,value:Co.THREE},{key:Co.FIVE,value:Co.FIVE}],APB:[{key:Co.THREE,value:Co.THREE},{key:Co.FIVE,value:Co.FIVE}],SIG_NATIVE:[{key:0,value:0}]},variants:{AXI:{[Co.FOUR]:[{key:Ui.FULL,value:Ui.FULL},{key:Ui.LITE,value:Ui.LITE},{key:Ui.STREAM,value:Ui.STREAM}],[Co.THREE]:[{key:"",value:""}]},AHB:{[Co.THREE]:[{key:Ui.LITE,value:Ui.LITE}],[Co.FIVE]:[{key:"",value:""}]},APB:{[Co.THREE]:[{key:"",value:""}],[Co.FIVE]:[{key:"",value:""}]},SIG_NATIVE:{0:[{key:"",value:""}]}}},portDataWidth:[{key:32,value:32},{key:64,value:64},{key:128,value:128},{key:256,value:256},{key:512,value:512},{key:1024,value:1024}]},COe={...Eo.deepCopy(UT),outstandingWrite:MY,outstandingRead:MY,flitPacketSize:NY,flitBufferSize:NY,writeTransactionWidth:LY,readTransactionWidth:LY,rootPolicies:Eo.deepCopy(gG),accessPolicies:Eo.deepCopy(mG),readReorderBufferSize:dL,writeReorderBufferSize:dL},SOe={...Eo.deepCopy(UT),bus:{...Eo.deepCopy(UT.bus),protocols:vOe,versions:{...Eo.deepCopy(UT.bus.versions),SRAM:[{key:0,value:0}],SEC:[{key:0,value:0}]},variants:{...Eo.deepCopy(UT.bus.variants),SRAM:{0:[{key:"",value:""}]},SEC:{0:[{key:"",value:""}]}}},maxOutstandingWrite:DY,maxOutstandingRead:DY,writeTransactionWidth:kY,readTransactionWidth:kY,readDataDelay:[{key:1,value:1},{key:2,value:2}],baseAddress:"",limitAddress:"",channel:[{key:tv.SINGLE,displayName:"1RW",value:tv.SINGLE},{key:tv.DUAL,displayName:"1R1W",value:tv.DUAL}],exclusiveAccessLutSize:bOe},EOe={powerManagementEnabled:!1},xOe={comment:"",dataWidth:[{key:256,value:256},{key:512,value:512},{key:1024,value:1024}],frequency:HT.frequency.min,physicalContainerId:""},En={routers:EOe,initiators:COe,targets:SOe,topologies:xOe},Hse=4,Use=2,Kx=16,y1="0",js="0x",wOe="24px",hL="30px",U1="210px",zse="105px";var bv=(t=>(t[t.B=0]="B",t[t.kiB=1]="kiB",t[t.MiB=2]="MiB",t[t.GiB=3]="GiB",t[t.TiB=4]="TiB",t[t.PiB=5]="PiB",t[t.EiB=6]="EiB",t))(bv||{});const EC=t=>t.replace(/_/g,""),AOe=t=>EC(t).replaceAll(/^0+/g,""),Vse=t=>t.length?BigInt(js+EC(t)).toString(Kx).toUpperCase():t,TOe=(t,e)=>!t||!e?!1:k3(EC(t))>k3(EC(e)),_Oe=(t,e)=>t?EC(t).padStart(e,"0").split("").reverse().join("").replace(/(.{4})/g,"$1_").split("").reverse().join("").replace(/^_/,""):"",fL=t=>(t=EC(t),t.startsWith(js)?BigInt(t):BigInt(js+t)),IOe=t=>{const e=new RegExp(/[^0-9a-fA-F]+/);return!t.match(e)},POe=(t,e)=>Vse(t).length<=e,Gse=t=>Math.ceil(t/Hse),ROe=(t,e)=>t?t.length>Gse(e):!1,OOe=(t,e)=>t.toString(Use).padStart(e,y1),NOe=t=>t.toString(Kx).toUpperCase(),Wse=t=>t.toString(Kx).toUpperCase(),MOe=(t,e)=>parseInt(t,Use).toString(Kx).padStart(e,y1).toUpperCase(),k3=t=>t.startsWith(js)?BigInt(t):BigInt(js+t),DOe=(t,e)=>!t||!e,LOe=t=>js+t,F3="~",kOe=1024,pL=1024n,gL=6,CN=10n**BigInt(gL),jse=(t,e)=>{if(!t.length||!e.length)return{value:"",unit:bv.B};const n=fL(t),r=fL(e);if(r<n)return{value:"~0",unit:bv.B};const o=r-n+1n,i=Object.keys(bv).length-1;let s=1n,a=0;for(;o>=s*pL&&a<i;)s*=pL,a++;
100const l=o*CN/s,c=o*CN%s!==0n,u=l/CN,d=l%CN,h=d===0n?u.toString():`${u}.${d.toString().padStart(4,"0").replace(/0+$/,"")}`;return{value:`${c?F3:""}${h}`,unit:a}},B3=t=>t.replace(/[^\d.]/g,""),FOe=(t,e)=>{if(t.value.includes(F3)!==e.value.includes(F3))return!1;const n=B3(t.value),r=B3(e.value),o=a=>{const[l,c=""]=a.split(".");return BigInt(l+c.padEnd(gL,"0").slice(0,gL))},i=o(n)*pL**BigInt(t.unit),s=o(r)*pL**BigInt(e.unit);return i===s},BOe=(t,e)=>{const{value:n,unit:r}=jse(t,e);return n.length?`${n}${bv[r]}`:""},$Oe=(t,e,n)=>{const r="";if(!t.length||!e.length)return r;const o=fL(t),i=Math.ceil(Number(e)*kOe**n);if(!i)return r;const s=o+BigInt(i)-1n;return Wse(s)},_t={getAddressWithoutUnderscore:EC,getAddressWithoutUnderscoreAndLeadingZeroes:AOe,getAddressWithoutLeadingZeroesExceptLastZero:Vse,getHasBaseExceededLimitAddress:TOe,getZeroPaddedAddressWithUnderscores:_Oe,getConvertedStrAddressToBigInt:fL,getIsValidHex:IOe,getIsAddressValidForWidth:POe,getMaxAddressLengthByAddressWidth:Gse,getHasExceededAddressWidth:ROe,getNumberToBinary:OOe,getNumberToHex:NOe,getBigIntToHex:Wse,getBinaryToHex:MOe,getHexToBigInt:k3,hasBlankAddress:DOe,getAddressWithPrefixHexadecimal:LOe,SIZE_VALUE_PRECISION:gL,getSizeFromBaseAndLimit:jse,getExactDecimalString:B3,getAreSizesEquivalent:FOe,getDisplaySizeFromBaseAndLimit:BOe,getLimitFromBaseAndSize:$Oe},HOe=({targets:t,targetId:e,inputBaseAddress:n,inputLimitAddress:r,ncnocAddresses:o,targetNameList:i})=>{const s=[];return n&&r&&t.forEach(a=>{const l=o.find(h=>h.targetId===a.id),c=l?.base,u=l?.limit;if(a.id===e||!(c&&u))return;if(_t.getConvertedStrAddressToBigInt(u)>=_t.getConvertedStrAddressToBigInt(n)&&_t.getConvertedStrAddressToBigInt(c)<=_t.getConvertedStrAddressToBigInt(r)){const h=i.find(f=>f.id===a.id)?.name??"";s.push(`${h}`)}}),s},UOe=t=>(BigInt(1)<<BigInt(t))-BigInt(1),zOe=(t,e)=>(BigInt(js+t)&mL.getBitMaskUsingWidth(e)).toString(Kx).toUpperCase().padStart(e/Hse,y1),mL={getOverlappedTargetNames:HOe,getBitMaskUsingWidth:UOe,getMaskedAndPaddedAddress:zOe},yG={getLocalSRAMWithTrimmedAddresses:(t,e)=>{const n=mL.getMaskedAndPaddedAddress(t.parameters.localSRAM.baseAddress,e),r=mL.getMaskedAndPaddedAddress(t.parameters.localSRAM.limitAddress,e);return{...t.parameters.localSRAM,addressWidth:e,baseAddress:_t.getAddressWithoutLeadingZeroesExceptLastZero(n).toUpperCase(),limitAddress:_t.getAddressWithoutLeadingZeroesExceptLastZero(r).toUpperCase()}},getComponentWithUpdatedLocalSRAM:(t,e,n)=>{const r=t;return r.parameters.localSRAM||(r.parameters.localSRAM={...qse,isLocalSRAMEnabled:n}),e==="addressWidth"?r.parameters.localSRAM=yG.getLocalSRAMWithTrimmedAddresses(r,n):r.parameters.localSRAM={...r.parameters.localSRAM,[e]:n},r},getDefaultBaseAddress:t=>y1.padStart(t/4,y1),getPaddedAddress:(t,e)=>t.padStart(e/4,y1),getIsNumericValuesEqual:(t,e)=>!t.length||!e.length?!1:BigInt(js+t)===BigInt(js+e),getLocalSramAddressErrorMessage:({addressWidth:t,formControlLabelName:e,baseAddress:n,limitAddress:r})=>{const o=new RegExp(/[^0-9a-fA-F]+/);switch(e){case $3.BASE_ADDR:if(n.match(o))return Ay.BASE_ADDR_NOT_HEX;if(n.length>t/4)return Ay.BASE_ADDR_EXCEED_WIDTH;if(n.length===0)return Ay.BASE_ADDR_EMPTY;if(r.length&&BigInt(js+n)>BigInt(js+r))return Ay.BASE_ADDR_EXCEED_LIMIT_ADDR;break;case $3.LIMIT_ADDR:if(r.match(o))return Ay.LIMIT_ADDR_NOT_HEX;if(r.length>t/4)return Ay.LIMIT_ADDR_EXCEED_WIDTH;if(r.length===0)return Ay.LIMIT_ADDR_EMPTY;if(n.length&&BigInt(js+n)>BigInt(js+r))return Ay.BASE_ADDR_EXCEED_LIMIT_ADDR;break}return""}},OH=64,VOe=1,GOe={8:"1F",16:"1FFF",32:"1FFFFFFF",64:"1FFFFFFFFFFFFFFF"},qse={isLocalSRAMEnabled:!1,addressWidth:OH,baseAddress:yG.getDefaultBaseAddress(OH),limitAddress:GOe[OH],readDataDelay:VOe,addressTranslation:!1},Ay={BASE_ADDR_NOT_HEX:"Base Address is not Hexadecimal",BASE_ADDR_EXCEED_WIDTH:"Base Address exceeds Address Width. ",BASE_ADDR_EMPTY:"Base Address should not be empty. ",BASE_ADDR_EXCEED_LIMIT_ADDR:"Base Address greater than Limit Address. ",LIMIT_ADDR_NOT_HEX:"Limit Address is not Hexadecimal",LIMIT_ADDR_EXCEED_WIDTH:"Limit Address exceeds Address Width. ",LIMIT_ADDR_EMPTY:"Limit Address should not be empty. "};var $3=(t=>(t.BASE_ADDR="Base Address",t.LIMIT_ADDR="Limit Address",t))($3||{});const Yse={accessType:m1.READ_WRITE,burstLength:Wy.ANY,requestSpeed:RI.FAST},H3={responseSpeed:OI.FAST},WOe=[{key:0,displayName:"Write Only",value:m1.WRITE_ONLY},{key:1,displayName:"Read Only",value:m1.READ_ONLY},{key:2,displayName:"Read/Write",value:m1.READ_WRITE}],jOe=[{key:0,displayName:"Single",value:Wy.SINGLE},{key:1,displayName:"Short",value:Wy.SHORT},{key:2,displayName:"Long",value:Wy.LONG}
100,{key:3,displayName:"Max",value:Wy.MAX},{key:4,displayName:"Any",value:Wy.ANY}],qOe=[{key:0,displayName:"Fast",value:RI.FAST},{key:1,displayName:"Slow",value:RI.SLOW}],YOe=[{key:0,displayName:"Fast",value:OI.FAST},{key:1,displayName:"Slow",value:OI.SLOW}],xC=0,FY=65535,vG=31;var vc=(t=>(t[t.DISABLED=0]="DISABLED",t[t.READ_ONLY=1]="READ_ONLY",t[t.WRITE_ONLY=2]="WRITE_ONLY",t[t.READ_WRITE_INDEPENDENT=3]="READ_WRITE_INDEPENDENT",t[t.READ_WRITE_COMBINED=4]="READ_WRITE_COMBINED",t))(vc||{}),$b=(t=>(t[t.MHZ=0]="MHZ",t[t.GHZ=1]="GHZ",t))($b||{});const yL=2,vL=2,bL=256,XOe=128,KOe=[{key:16,value:16},{key:32,value:32},{key:64,value:64},{key:128,value:128},{key:256,value:256},{key:512,value:512},{key:1024,value:1024},{key:2048,value:2048}],QOe=t=>t===wt.AXI?1:0,$v={getParameterPipelineStagesCount:QOe},Qp=()=>Uo();var nt=(t=>(t[t.NONE=0]="NONE",t[t.AXI_FOUR_FULL=1]="AXI_FOUR_FULL",t[t.AXI_FOUR_LITE=2]="AXI_FOUR_LITE",t[t.AXI_FOUR_STREAM=3]="AXI_FOUR_STREAM",t[t.AXI_THREE=4]="AXI_THREE",t[t.AHB_THREE_LITE=5]="AHB_THREE_LITE",t[t.AHB_FIVE=6]="AHB_FIVE",t[t.APB_THREE=7]="APB_THREE",t[t.APB_FIVE=8]="APB_FIVE",t[t.SIG_NATIVE=9]="SIG_NATIVE",t[t.SEC=10]="SEC",t[t.SRAM=11]="SRAM",t))(nt||{});const wC={[nt.AXI_FOUR_FULL]:"AXI4_",[nt.AXI_FOUR_LITE]:"AXI4LITE_",[nt.AXI_FOUR_STREAM]:"AXI4STREAM_",[nt.AXI_THREE]:"AXI3_",[nt.AHB_FIVE]:"AHB5_",[nt.AHB_THREE_LITE]:"AHB3LITE_",[nt.APB_FIVE]:"APB5_",[nt.APB_THREE]:"APB3_",[nt.SIG_NATIVE]:"SIG_NATIVE_",[nt.SRAM]:"SRAM_",[nt.SEC]:"DEFAULT_SLAVE_",[nt.NONE]:"_"},qh={[nt.AXI_FOUR_FULL]:"AXI4",[nt.AXI_FOUR_LITE]:"AXI4 Lite",[nt.AXI_FOUR_STREAM]:"AXI4 Stream",[nt.AXI_THREE]:"AXI3",[nt.AHB_FIVE]:"AHB5",[nt.AHB_THREE_LITE]:"AHB3 Lite",[nt.APB_FIVE]:"APB5",[nt.APB_THREE]:"APB3",[nt.SIG_NATIVE]:"SIG_NATIVE",[nt.SRAM]:"SRAM",[nt.SEC]:"Security",[nt.NONE]:""},U3=[{key:nt.AXI_FOUR_FULL,value:nt.AXI_FOUR_FULL,displayName:qh[nt.AXI_FOUR_FULL]},{key:nt.AXI_FOUR_LITE,value:nt.AXI_FOUR_LITE,displayName:qh[nt.AXI_FOUR_LITE]},{key:nt.AXI_FOUR_STREAM,value:nt.AXI_FOUR_STREAM,displayName:qh[nt.AXI_FOUR_STREAM]},{key:nt.AXI_THREE,value:nt.AXI_THREE,displayName:qh[nt.AXI_THREE]},{key:nt.AHB_FIVE,value:nt.AHB_FIVE,displayName:qh[nt.AHB_FIVE]},{key:nt.AHB_THREE_LITE,value:nt.AHB_THREE_LITE,displayName:qh[nt.AHB_THREE_LITE]},{key:nt.APB_FIVE,value:nt.APB_FIVE,displayName:qh[nt.APB_FIVE]},{key:nt.APB_THREE,value:nt.APB_THREE,displayName:qh[nt.APB_THREE]},{key:nt.SIG_NATIVE,value:nt.SIG_NATIVE,displayName:qh[nt.SIG_NATIVE]},{key:nt.SRAM,value:nt.SRAM,displayName:qh[nt.SRAM]}],ZOe=[{key:32,value:32},{key:64,value:64},{key:128,value:128},{key:256,value:256},{key:512,value:512},{key:1024,value:1024}],JOe=()=>2,eNe=()=>0,tNe=()=>Qp(),nNe=t=>{const e=nt.AXI_FOUR_FULL;return`${wC[e]}${t}`},rNe=()=>nt.AXI_FOUR_FULL,oNe=()=>64,qE={getParameterWriteDataBufferDepth:JOe,getParameterVirtualChannelsCount:eNe,getId:tNe,getName:nNe,getCompleteProtocol:rNe,getPortDataWidth:oNe},Xse="inno_project_state",z3={type:"",deleteElementId:"",anchorElId:"",projectId:"",projectType:"",userId:0,ownerId:0,name:"",tree:[],routingTable:null},V3={scale:1,pan:{x:0,y:0}},iNe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAADwCAYAAABxLb1rAAAAAXNSR0IArs4c6QAAGmRJREFUeF7tnW2PGzfWRKm3+f9/coHs2nHsJP4iqVsLdre8PQK2WawaRxjPCRDkWTy8I03d4uG9ZDdn9+Xb91sx/rlczuV0ejEiSxmGoRwOh+7Y223+qrvdrjt2HMcpZr/fd8fWgBrvxLpx9TOv10s5Hk/m9x3Kft+vcf0wNz819nK5lNPJ+87J5yax18ulHM3v7ObXjbt70fVyMoeu12s5Ho+WHxNfJFq1vvMOAGr5dJPgxgFALS/3UQBQ0wsAvtYJAGq+oQIUdUpW+gRiSSwVoJbcVjW19VMSX2RFxHbVCgC13ANAUafE6AnEklgAqCX3lwTgpy9/WnuA5/O5vLyYe4DXazkYewlJ+V5XkRrv7D1Ge4DDUPbGfudb7KfVPUtnvzQy+vlcTqYv3M+teR3Huq/8fvanqh9rbpz8JPvZyRxy8zN7+TztZzu/b7K4tRZkKkBt8aMCFHVqGW7rxyRGT2KpALXkZgD0D8dogZf8JKtXsmpGFaB5eswhiDYpOQTp0ymZQwBwpTWPwWjGy1YvHoPRVM4e3aEC1FQGgABQc8pqFADUJUva2CQWAGo5AoAAUHMKAOzWqQYkEEtiAaCWLgAIADWnAMBunQCgLlmyn80e4GudOQUWfee2sm4chyBiYpZhVICaXgAQAGpOeRjlgsyNA4B9aQKAml4AEABqTgGAlk48B6jJliyMtMCaxnMRwatwk1qJae7x3AbTNh4AbGuU+Cn1MhUgFaDmUCpASycAqMlGBajplC4WVICLzlSAuuGS/TQAqOkMADWdAOBKp6R8B4C64QCgrpULMjeOFljPjbQH6N4Gw6twWiISo3MjtKZxHZVAO9P5n78pPFnMkyKi1U5uZesZD5tLAPz969/WdViRaewroupX7b8OvwpRE1//dQ4y7vHOVT4ZAP0ryOv1UM+4Ej+ZJMl3TmIH83q22Rf1Wqv+P7NQvej46e7F+l8v3p9D722RkQDIlfhaleGCzI2bk8dlCFp2wgqQvwkiyZwsbsnecDaHeAxmSm7SNiQbsVnyAKA0M9MWGABKMgPAlUzsAUqesS9SpQLU9L2PitozACiJDQABoGSU9SAqQF2yBGJJ7DM26BNfJN3Msw5BaIFX88A1a5K8xDS0wDrEEqO7vohPgakApQRTAVIBSkahAuQPo7eMQgXYUuh///9Eqxa0uQ5LzIObBDeOPUAxMcuwpHqkBda0bsFk66cknUE2hzgF5hRY8/ePUQlMEqMnn5vEAkDNIACQFlhzympUtnrxGIwqOADUlEr20QEgANRcBgC7dUoPMgCgJjkAfK0Te4Cab+zn+agARYHDh5kBoKYzAASAmlMeRrkgc+M4BOlLEwDU9AKADwDkNhjNOONtLHvjpffkJf38XeD6kn7/5REJTJ5zCHIrwzCWw+GgJfNhVKbzP38bzG0cS73SwLnYIwHgMFzL4XC0NE58kc0hToE5Be607PsDIJchqClOAMghCIcgqs9+jKMF1iVLwJvE8hiMliMACAA1p3AK3K0Tp8C6ZMlrnVSAHILoTnsDkFEB6nInVVwSSwWo5YgKkApQc8obgJNT4D6pAaCmFxUgFaDmlIdRbiXnxgHAvjQBQE0vAAgANacAQEun5HGHBGJJLC2wlmpaYFpgzSm0wN06cQiiS8YhiK5VC9q8Cidq6baybhwtsJiYZRgVoKYXLTAtsOYUWmBLJ1pgTbZkYaQC1DSeiwjeBJnUSkxzj3dePUqMnr2i9Zy/CwwAtcmZ+CLxMhUgFaDmUCpASycAqMkGADWdkuKDCvDhMKL+T6eKS5KQGJ0KUJ8k7AFqWlEBPlSA//78tV4s0f1PNDmHoeyNmztq8na7/ttN6i9Xb9Co/+z29YaU/n/cz66f635ma/9i67dIbtB4FkySzx1NTylVwpbObn7duMnLt3nKOnPB9XH9vCQ/ES9G78YdJbecAossdCs5N25OHlfii+nJJid/FlOSOVmQk62RbA5xCDIlN9k4pgWW5sc0KDF6UmEksTwIreUXAK50ulzO5XR60ZR7GOWaNSn9AaCeKjc/AFDXOKlqEi8ncwgAAkDd4cvIxOi0wLrcCbSpADWdASAA1JyyGgUAdckSiCWxAFDLEQAEgJpTAGC3TjUggVgSCwC1dAFAAKg5BQB26wQAdcnYA9S1akGbx2BELd1W1o2rX4s9QDE5YfVIBajp3ILJ1k9Jng7I5hCPwUx5SVbNe7zzFkmWPJ4D1KZm1j4DQE1lAEgLrDmFFrhbJ1pgXbJkMecxmNc60wKLvnMrOTeOFlhMzDKMQxBNLwAIADWnPIxyQebGAcC+NAFATS8ACAA1pwBAS6dkszuBWBLLHqCW6l9yD/DTlz/fz20w5VZ2xbwN5nabbtFwDjKqPdxbNLIKcPsEa8u2z7oN5nK9ltPxqM2oN1pkkkOqae/xei0H8zvfbmPZ7fpvGHL9dPdi/a9zG0wpdbp7cyhZZJKF8WfOIfYAxanqJsGNowUWE8MeYJdQtMC0wF2GuQ92QebGAcC+NCXVCS2wpvUv2QJ/+fbdaoG5DUYzDQDUdJpa0WEoB+Oi3DQWAGo5AoArnQCgZhoAqOmUQiyBJwDUcgQAAaDmlNUoAKhLlkAsiQWAWo4AIADUnAIAu3WiAtQl400QXasWtDkFFrV0Kzk3jkMQMTHLMCpATS9OgV/rBAA130yXKTjPELpxAFBMDADsEgoAAsAuw9wHuyBz4wBgX5qoADW9ACAA1JzyMMoFmRsHAPvSBAA1vQAgANScAgAtnZJXnhKIJbGcAmupbh0obP2UxBdZEcGFqFNekpOzezx7gO2Jkhg9gVgSCwDbeZ07Ev/d9MQXAHDJT1K+A0DN5HVUApPE6MnnJrEAUPPGLwlA9zaYZxj9fQJwKPv9QXPYw6hnaJyv9OdyOr1Yv687waov6gLnvkbnfm7aGdTbXJwbXZLFPJlDw3Ath4N300/y5lhys1FrceMxGHGqumW4G8chiJiYZRgVoKZXAsBkoUgW82wOsQfIHqA2N36MSmCSGD353CS2VSVsyedOTjcu3c8GgJwCd+JgHu4a1o2jAuxLEwDU9AKAAFBzysMoF2RuHADsSxMA1PQCgABQcwoAtHSiBdZkSxbGZx2CsAe4ym1yquOu1snqlZiGFlib1HUUANS0AoCaTsncm7soDkE4BNG9No10FygAqAsNAP8ZrQDgojMVoG44AKhr5YLMjbtXRPW/zptJSRfVgsmWaklnkGjV+s48Byh63U2CG8chiJiYZVgCbR6D0bRuwQQAajraLVayelEBismhBdaFetLjUYmXkzkEADkE6Zoc+QbupRyPp+7PnD/XfwUvqaaSVif53CSWClCzGAAEgJpTVqNogXXJEoglsQBQyxEABICaUwBgt041IIFYEgsAtXT9kgD812+fP8QfRr+NY6m/qHNylrSy4zCUvfnHvq9XWmBtapbyPJ2TvxWzK6XUf/v+qV3FFLnf9wWWUpI9wOF6LYejdxtM4uVoceM5wNkjycZxBEDzjynVz0xMwx6gzgYqQE2rX7IC/PLt+4eoAAGgZvK0FeUQRNM52RtOvJxUgACQPUDN3ewBduuUgjdqky6Xcjy5p+1JC9zfwqbdDAB8bU0ehBanqrtiu3G0wGJilmEAUNMLAAJAzSkPo1yQuXEAsC9NAFDTCwACQM0pANDSiT1ATbZkYWQPUNN4LiK4DWZSKzHNPd55hCYxOqfAutGpADWtqACpADWnUAFaOlE
100BarIlC2OymANAAKg5FABaOgFATTYAqOmUdF+0wCuNk1UzSUJidFpgfZLQAmtaUQFSAWpOoQK0dKIC1GRLFsZkMQeAAFBzKAC0dAKAmmwAUNMp6b5ogWmBdZetRibtJADUJAeAmk4/HYD/+f2b+S7wpZzc14fMG1Jq+T7dnbHrv0Fjug3mdrNvZqnxzu0bidGjPcCqcb0txNDq3QHwdivDOJaDfevO9rNiW1PV9YUbdwdCchuMO4eG4VoOB+82mGRhzG764TnAyb/JvkmyCj0NgNwILZcY3AajSdV6qHjrp0QAjG5UAoAAUPP3j1HvrgIML1MFgJpBAOBKJ/4wumYaKkBNpzoqAW8SCwC1HAFAAKg55eHwxXmFbj7B4kZoVXAAqCnFYzCvdeI6LM030x6iAzI3DgCKiVmGAUBNLwAIADWnPIxyQebGAcC+NAFATS8ACAA1pwBAS6fktC+BWBLLHqCWavYA2QPUnMIeYLdOHILokiWPdFEBUgHqTnsDkNEC63InVVwSSwWo5YgKkApQc8obgJM9wD6pAaCmFxUgFaDmFPYALZ3YA9RkSzoDWmBN47mI4E2QSa3ENPd4HoNpGw8AtjVK/JR6mQqQClBzKBWgpRMA1GSjAtR0ShcLKsBF549WASZ7YkksANQmNgDUdKqjEj8CwA8KwJHbYOQZximwJlULJls/JVkYk8Wi9Z15FU7LPa/CiTolRk9W+iQWAGrJbcEEAGo62iVtsoH70VpgKkDRjPWk8HIpR/dy3ye8I554OZlDAHDlKa7D0iZYVr5zG4ymcrhPBAAlmQEgAJSMsh4EAHXJkjY2iaUC1HIEAAGg5pTVKACoS5ZALIkFgFqOACAA1JwCALt1Sh93AICa5OwBvtaJU2DNN5wCizpxCqwJlXQGHIJoGtdRraoVAIpauoZ14+bkcQgipsd+smDSmUMQSeYWTLZ+SLIwZnOId4GnvCSr5j2ed4Hb8yQxetLGJrEAsJ1XpZoCgJqO9mqd7F8AQDE54atHAFDTOalqEi8nc4gKkEMQzd0cgnTrxCGILhkA1LVqQZs9QFFLd8V249gDFBOzDKMF1vSiAnyt0+63T3/cNOlej/pob4LcbmPZ7fbdUgFAXbIEYklsq0rY+g3c/N7Gsez2/X6q36VC7HYrZb/f6eIuIxMARho/4aBJ2bekAhQt5BrdjaMCFBNDBdglVALAZKFI9oazOcQp8GSQZN/kHs8pcHuuJUZPKowkllPgdl6VamrrpyS+AIBvUL4DQM3k6WFEYvQEYkksANS8QQW40umj7QG6q5AbRwusTcr7KACo6UUL/HAI8uXbdw5BBO+4IHPjAKCQlNUQAKjpBQABoOaUh1EuyNw4ANiXJgCo6QUAAaDmFABo6cQeoCZbsjAm+9kAEABqDgWAlk4AUJMNAGo61VGJVq2DG54DFPPgJsGNowUWE7MMowXW9KICpALUnEIFaOlEBajJliyMtMCaxnMRwYPQk1qJaZIyPDE69wHqRqcC1LSiAqQC1JxCBWjpRAWoyZYsjMliDgABoOZQAGjpBAA12QCgplPSfUktsH8bzKWc3D8mPQxlfzjoCiwjk9Wr3uYy36Dh3cDhGtaNU5K3JeCz/jB68lpZ0sYmv29rn2hb59HyVOKLGlvvgXFuk0nmUJKfbDvH01iZQ5wCixh2DevGzcnjb4KI6bFvGZ90fsJVTYkvaIFVV3AI8kOpxDRJGZ4YHQDqRo+qEwAoCZ1UysnWSDaHOAWekgsAJY9PgxKYJEZPPjeJpQLUvAEAVzpxG4xmmmz1ogXWVM6gDQA1lQEgANScshoFAHXJkiouiQWAWo4AIADUnAIAu3VKW28AqEmenAIDQACouQwAdusEAHXJkv1sAPhaZx6DEX3ntrJuXP1anAKLyQkPbmiBNZ2pAKkANadQAXbrRAWoS0YFqGvVgjYVoKilW8m5cVSAYmKWYewBanrRAtMCa055GOWCzI0DgH1pAoCaXgAQAGpOAYCWTjwIrcmWLIy0wJrGcxHBmyCTWolp7vHORQqJ0TkE0Y1OBahpRQX4UAF+/uMv889i+rfBuGatydvt6j0Y/f/U2PqvA7H6afU2md2u/yYZAKjnyvVF/YQktlUlbP0Gbn7duNmL85R15sI8h6ZoPTHLyETjpDNItGrllkMQ0QZuEtw49gDFxLzB5OQxGE3rFky2fgoAXKnjriTJykcLrJk8raYSo7u+SL8zANS8AQBXOnEZgmYaKkBNpxRiCTwBoJYjAAgANaesRgFAXbIEYkksANRyBAABoOYUANitExWgLlmynZNsIwFAAKi7dBlJBahLllRxSSwVoJYjAAgANadQAXbrRAWoS0YFqGvVgjaPwYhaupWcG1e/Fg9Ci8lJnwPkb4JIQrdgsvVDkqcDsjnEmyBTXpJV8x7vPESdJY8r8aWZCQBVmaKHqAEgLbBstPtAAKhLluzjJbHsAWo5AoAAUHMKe4DdOrEHqEuWdDOcAr/WmT1A0XduJefGsQcoJmYZRgWo6QUAAaDmlIdRLsjcOADYlyYAqOkFAB8A+OnLn9ZtMNm+yVD2+4OWsdWo594G491EkwFw+wRrS8Bx9DROW9HL9VJOx1N3btPPjX7f67UcjkfrO7u3BN3GW9nt+29kqV+yfmb9x7mdqNSbZMwblZJFJjsF9r3c2rekBRZt74LMjaMCFBNDC9wlFBUgLXCXYe6DXZC5cQCwL01JdZJ1M6N1x2TiCw5BdG9QAS5aJaapP8I1rBsHAHWTp+0zANS0bsFk66dkLbC3yMxziAehp7wAQM3kKUwSoydVXBILADVvtGACADUd7evLk/0LACgmJ3yrAgBqOiedQeLlZA4BwFVuuRD15xudd4E1jdOqlQpQ0xkAAkDNKatRyUoPAHW5aYE1ragAX+vEYzCabzgEEXWiBdaEShZGWmBNYw5BHiqx+j+dG13uhyhObGJ0KkDd6FSAmlZUgFSAmlMeRrkgc+Pm1YvrsNRkAUBNKQAIADWnAEBLJ1pgTbZkYaQF1jSmBaYF1p2yGplUUwBQkxwAajol208AEADqLgOAllYuyNy4OxDc/Wxa4IcW2L0N5qM9B+je+pEYnT1AnUlJ1Zo83+bm142rilQv1ktdnEO5BICJxklnkNz008otj8GIc8w1rBvHIYiYmGVYMjl5EFrTugWTrZ+SAZB3gSdtk9Ur2ThO9iEAoDa56qgEYkksANRyBABXOn20FtgFmRtHBahNyvsoAKjplRQRABAAai57OHxx9moAYJ/UAFDTCwA+HIJ8+fbduhKfClAzHBWgphMtsK5Tsp0DAAGg7rQ3qOQAoC53UsUlsewBajmiBaYF1pzyBuCkBe6TGgBqelEBUgFqTnkY5VZybhwA7EsTANT0AoAAUHMKALR0Sp73SiCWxNICa6mmBaYF1pxCC9ytE4cgumQcguhataDNmyCilm4r68bRAouJWYZRAWp60QLTAmtOoQW2dKIF1mRLFkYqQE3juYho/FnM37/+bT0HGL2oPwxlfzjov8Uysq5eu92uO64G1Nj6r/tQMpchaLK/SwA2JsnWb+764jaOZbffa6I+jEqquGQOJVV24otksfhpAEx+IVfIJHkpAN0kuHFpC+xqnO7Fnc/n8vLyYk3s4Xoth+PRix2GcjAWVaVK2PpCbn4rAMtuZy3o9TNrGeAAdIZn/dx+mRNPJS9OcBvMqgKs/6dTBSZtQ/1M1+huXArAxDSZ0S/ldDr1zy4uQ5A1S7ycVI+tamrrF0gKpmwONVpgXoXTfOcmwY0DgFpe7qMSaPMYjKY1AFzplJS0rlmT1StZNakAtQlSRyUrveuLtG0HgFp+ASAA1JyyGkUFqEsGADWtksU8KSIAIADUHAoAu3VKq7gEnlSAWroAIADUnAIAu3UCgLpkVIC6Vi1o8yaIqKXbyrpxHIKIiVmGUQFqetECv9YJAGq+4TEYUScOQTShkoWRClDTeC4ieAxmUisxzT3eeYskMXr0ts04lP2+/22btBUFgNrkTHyReJkKkApQc+jDKNewbhwtcF+aaIE1vQAgANScAgAtnagANdmShZEKUNOYFnilU2IaWmDdcABQ0woAajolc08CoHsbTPQmiPnSe715Y36Ru/9N7mq4Wv67L8y7hk1asxQmdc/S0aq1cbxl3eQyBPdza17ru8+Hg3eRQvYcoLfXOl1oEFyGUHPg7Ek/rwU+l+PxZPkxmUOt3O4+f/3Lug7rcj6Xk33rx1AOx/4N+ttYr8OabkPQl49lZL19o16EsT+YVxCZ1xeNw2h/Zit5WyKM9cqxegjSL1UZrl5+6ve5nC/l9GJehuB+7q0ecnlXrE1VwuVSjuYFDm5+b8NyHZaRn/qZ0zRwvDzdBuPNocQXk8bHk+XHycvuTT+Xazme/v/CyGMwIkrdCtCN4xBETMwy7GdWCZsLzThalVjii2Q753kVoH9LUKJVq6sAgOI8c5PgxgFAMTEAsEsoAPhaLgAo2scFmRsHAMXEAMAuoQAgAOwyzH2wCzI3DgD2pYkWWNMLAAJAzSkPo1yQuXEAsC9NAFDTCwACQM0pANDSKX10x31MCQBq6QKAAFBzCgC0dAKAmmxJZ8ApsKbx3EVxGcKkVmKae7zz4GlidC5D0I1OBahpRQVIBag5hQrQ0okKUJMtWRiTxRwAAkDNoQDQ0gkAarIBQE2npPuiBV5pnKyaSRISo9MC65OEFljTigqQClBzChWgpRMVoCZbsjAmizkABICaQwGgpRMA1GQDgJpOSfcltcCf/zBvg7n4Lze77UpdvabLM4zbYJJVs35kvU1mt++/SSYxOi2wPklcTymTZOtbuPl14+5AmG6DMfyYzKFE42RhnG76Mf+8A4/BLO5NAega1o2bJ+ZyhZDOgR8jE9M8y+jJ5yax0XVY3AYjuTMDoHfjjrK4cRmClL75OUKeA2yLlRg9gVgSCwDbeVVgsvVTEl+4c0/5zgBQyz0AFHVKjJ5ALIkFgFpyW+0kANR0LK5ZkxMsWmAxOaXY+amfAAA1nZOqJvFyMocA4Cq30d8EGerfbzCuxF+u83b+zkVimuQkKjE6e4AaTOood1Gd2qTkSvwnbI0kXgaArz1FCyzOMRdkbhyHIGJilmEAUNMLAAJAzSkPo1yQuXEAsC9NAFDTCwACQM0pANDSiT1ATbZkYaQF1jTmFHilU2Ia9gB1wwFATSsAqOmUzD0ACAB1l61GJu0kANQkB4CaTgBwpVOyf0EFqBsOAOpauSBz4+5AqP91HsxP5tCv+BjMfwHnZdKtP+9fsQAAAABJRU5ErkJggg==",Ve={gridBlockSize:100,portCircleRadius:8,routerCornerRadius:10,routerStrokeWidth:5,c
100onnectionLineStrokeWidth:2,portFontSize:20,skippedPortFontSize:14,stageZoomFactor:1.05,nameFontSize:24},Cv=2*Ve.gridBlockSize,CL=10*Ve.gridBlockSize,NH={id:"",message:""},BY={type:"",id:"",elementType:"",location:{x:0,y:0},hasDelete:!0},Zk={initiators:[],routers:[],targets:[],cRouters:[],cTargets:[],topologies:[],bridges:[],virtualTargets:[]},Ap={propKey:"",propId:null,portType:"",portIdx:null,startingCoordinates:{x:0,y:0}},Ud={id:"",type:null},gb={id:"",name:"",coordinates:{x:0,y:0},size:{width:0,height:0,nameSize:{width:Ve.gridBlockSize,height:0}},parameters:{},frequency:HT.frequency.min,frequencyUnit:$b.MHZ,componentId:0,useParentPowerDomain:!0,powerDomainName:HT.powerDomainName,primaryPower:HT.primaryPower,groundDomainName:HT.groundDomainName},tp=(t,e)=>({id:Uo(),name:`${t}${e}`,portDataWidth:256}),Zu={[Fe.INITIATORS]:{...gb,type:Fe.INITIATORS,parameters:{bus:{variant:En.initiators.bus.variants.AXI[En.initiators.bus.versions.AXI[1].key][0].key,protocol:En.initiators.bus.protocols[0].key,version:En.initiators.bus.versions.AXI[1].key},flitPacketSize:En.initiators.flitPacketSize[1].key,flitBufferSize:En.initiators.flitBufferSize[1].key,outstandingWrite:nv,outstandingRead:nv,writeTransactionWidth:WE,readTransactionWidth:WE,userRequestWidth:0,userDataWidth:0,portDataWidth:En.initiators.portDataWidth[1].key,rootPolicy:En.initiators.rootPolicies[0].key,isSameClock:!0,accessPolicy:"",trafficPattern:Yse,localSRAM:qse,readReorderBufferSize:uL,writeReorderBufferSize:uL,trafficRegulationPolicy1:vc.DISABLED,trafficRegulationPolicy2:vc.DISABLED,isWriteDataBufferEnabled:!1,writeDataBufferDepth:yL,pipelineStagesCount:$v.getParameterPipelineStagesCount(wt.AXI),virtualChannelsCount:qE.getParameterVirtualChannelsCount()}},[Fe.ROUTERS]:{...gb,type:Fe.ROUTERS,size:{width:Ve.gridBlockSize*2,height:Ve.gridBlockSize*5,nameSize:{width:Ve.gridBlockSize,height:Ve.gridBlockSize}},parameters:{powerManagementEnabled:En.routers.powerManagementEnabled,ports:{inGress:[tp("i",0),tp("i",1),tp("i",2),tp("i",3),tp("i",4)],eGress:[tp("e",0),tp("e",1),tp("e",2),tp("e",3),tp("e",4)]},pipelineStagesCountPortE0:0,pipelineStagesCountPortE1:0,pipelineStagesCountPortE2:0,pipelineStagesCountPortE3:0,pipelineStagesCountPortE4:0,pipelineStagesCountPortI0:0,pipelineStagesCountPortI1:0,pipelineStagesCountPortI2:0,pipelineStagesCountPortI3:0,pipelineStagesCountPortI4:0,internalArbiterPipelineStagesE0:0,internalArbiterPipelineStagesE1:0,internalArbiterPipelineStagesE2:0,internalArbiterPipelineStagesE3:0,internalArbiterPipelineStagesE4:0,internalArbiterPipelineStagesI0:0,internalArbiterPipelineStagesI1:0,internalArbiterPipelineStagesI2:0,internalArbiterPipelineStagesI3:0,internalArbiterPipelineStagesI4:0}},[Fe.TARGETS]:{...gb,type:Fe.TARGETS,parameters:{bus:{variant:En.targets.bus.variants.AXI[En.targets.bus.versions.AXI[1].key][0].key,protocol:En.targets.bus.protocols[0].key,version:En.targets.bus.versions.AXI[1].key},userRequestWidth:0,userDataWidth:0,writeTransactionWidth:jE,readTransactionWidth:jE,maxOutstandingWrite:nv,maxOutstandingRead:nv,portDataWidth:En.targets.portDataWidth[1].key,addressMap:!0,baseAddress:"",limitAddress:"",isSameClock:!0,trafficPattern:H3,channel:"",isVirtualDevicesEnabled:!1,isAddressTranslationEnabled:!1,isOutOfOrderTransactionEnabled:!1,isExclusiveAccessEnabled:!1,exclusiveAccessLutSize:$se,isAddressAlignmentEnabled:!1,isReadDataBufferEnabled:!1,readDataBufferDepth:yL,isTargetAddressInterleavingEnabled:!1,minimumTransactionSize:XOe,pipelineStagesCount:$v.getParameterPipelineStagesCount(wt.AXI)}},[Yt.DEFAULT_TARGET]:{...gb,type:Fe.TARGETS,componentId:0,parameters:{bus:{variant:"",protocol:wt.SEC,version:0},userRequestWidth:0,userDataWidth:0,writeTransactionWidth:0,readTransactionWidth:0,maxOutstandingWrite:0,maxOutstandingRead:0,portDataWidth:0,addressMap:!0,baseAddress:"",limitAddress:"",isSameClock:!0,trafficPattern:H3,channel:"",isVirtualDevicesEnabled:!1,isAddressTranslationEnabled:!1}},[Fe.TOPOLOGIES]:{...gb,type:Fe.TOPOLOGIES,parameters:{colors:{initiators:"#fc6239",routers:"#1257fd",targets:"#00859b"}},comment:"",dataWidth:En.topologies.dataWidth[0].key},[Fe.BRIDGES]:{...gb,type:Fe.BRIDGES,parameters:{pipelineStagesCount:xC}},[Fe.VIRTUAL_TARGETS]:{...gb,type:Fe.VIRTUAL_TARGETS,parameters:{parentTargetId:"",baseAddress:"",limitAddress:""}}},bG={noc:{id:"",name:"",ownerId:-1,thumbnail:iNe,parameters:{noc:{addressWidth:$T.parameters.noc.addressWidth[1].key}},type:pr.NCNOC,powerDomainName:"VCC",groundDomainName:"GND",autoAddressMap:!1,disableFrequency:!0,clockSimulationEnabled:!1,primaryPower:1,primaryGround:0,reposition:!1}},sNe="Performance Matrix",aNe="Access Map",Is={filters:{sortModel:[{field:"createdAt",sort:"desc"}],page:0},rowsPerPageOptions:[5,10,20,30,100]},lNe="warning-popover-component",MH="virtual-devices-switch",cNe="Disabling Virtual Devices is not allowed until all Virtual Devices has been removed in this component",uNe="Adding Virtual Devices may require reestablishing Routing Table entr
100ies for this Parent Device to reflect new Virtual Devices",Kse={anchorElId:"",warningText:""},dNe=t=>t==="true";var Sl=(t=>(t.MY_PROJECTS="MY_PROJECTS",t.SHARED_TO_ME="SHARED_TO_ME",t.STARRED="STARRED",t))(Sl||{}),Un=(t=>(t.OVERVIEW="Overview",t.DESIGN="Design",t.ACCESS_MAP="Access Map",t.PERFORMANCE_MATRIX="Performance Matrix",t.CONFIGURABLE_TEST="Configurable Test",t.ADDRESS_MAP="Address Map",t.REGISTER_MAP="Register Map",t.DESIGN_X6="Design (X6)",t.NETWORK="Network",t))(Un||{});const SL="CACHED",DH="OUTDATED",CG="isLeftPanelOpen",SG="isRightPanelOpen",nC="activeProjectsPageTab",EG="activeCenterPanelTab",EL="activeProjectId",xL="activeRightPanelTab",xG="autoRouteResponse",wG="activeNcnocComponentId",wL="activeCnocComponentId",MI="activeRtlBranchId",Qse={isLogoutModalOpen:!1,shareProject:!1,cloneProject:!1,deleteUser:!1,data:{projectId:"",name:"",groupId:"",userId:null,email:"",projectType:""}},np=t=>{const e=localStorage.getItem(t);switch(t){case CG:case SG:return e?dNe(e):!0;case nC:return e??Sl.MY_PROJECTS;case EG:return e??Un.DESIGN;case xL:return e??qn.PARAMETERS;case xG:return e??SL;case EL:case wG:case wL:case MI:return e??"";default:return e}},hNe={modals:Eo.deepCopy(Qse),isLeftPanelOpen:!!np(CG),isRightPanelOpen:!!np(SG),autoRouteResponse:String(np(xG)),projectFolders:{shared:!1,myProjects:!0},selectedFolder:{shared:0,myProjects:0},hasSharedProject:!1,[nC]:np(nC),currentProjectsPage:1,createEditProject:Eo.deepCopy(bG.noc),tables:{[ps.TARGETS]:{...Is,filters:{...Is.filters}},[ps.GROUPS]:{...Is,filters:{...Is.filters}},[ps.USERS]:{...Is,filters:{...Is.filters}},[ps.SHARE_WITH_USERS]:{...Is,filters:{...Is.filters}},[ps.TASKS]:{...Is,filters:{...Is.filters,sortModel:[{field:"createdAt",sort:"desc"}]}},[ps.MATRIX]:{...Is,filters:{...Is.filters,sortModel:[{field:"name",sort:"desc"}]}},[ps.PERFORMANCE_MATRIX]:{...Is,filters:{...Is.filters,sortModel:[]}},[ps.ACCESS_MAP]:{...Is,filters:{...Is.filters,sortModel:[]}},[ps.ADDRESS_MAP]:{...Is,filters:{...Is.filters,sortModel:[]}}},updatedStageCoordinates:null,updatedPhysicalStageCoordinates:null,deleteConfirm:Eo.deepCopy(z3),forceCloseContextMenu:!1,matrixType:ql.READ_BANDWIDTH,accessMapType:H1.SECURITY_POLICY,componentsReposition:!1,warningPopover:Kse,keepToastsOpen:!0,activeCenterPanelTab:np(EG),[EL]:String(np(EL)),[xL]:Number(np(xL)),activeNcnocComponentId:String(np(wG)),[wL]:String(np(wL)),[MI]:String(np(MI))},fNe=rf({name:"ui",initialState:hNe,reducers:{toggleProjectFolders:(t,e)=>{t.projectFolders[e.payload]=!t.projectFolders[e.payload]},toggleProjectSelectedFolder:(t,e)=>{t.selectedFolder[e.payload.type]=!t.projectFolders[e.payload.id]},setActiveProjectsPageTab:(t,e)=>{t[nC]=e.payload,Wg.setValueByKey(nC,e.payload)},setCurrentProjectsPage:(t,e)=>{t.currentProjectsPage=e.payload},setActiveCenterPanelTab:(t,e)=>{t.activeCenterPanelTab=e.payload,Wg.setValueByKey(EG,t.activeCenterPanelTab)},createUpdateProjectModal:(t,e)=>{t.createEditProject=e.payload||Eo.deepCopy(bG.noc),t.keepToastsOpen=!t.keepToastsOpen},updateTableFiltersState:(t,e)=>{t.tables[e.payload.table]||(t.tables[e.payload.table]={...Is,filters:{...Is.filters}}),t.tables[e.payload.table].filters={...e.payload.filters}},openModal:(t,e)=>{const{modalKey:n,data:r}=e.payload;t.modals={...t.modals,[n]:!0,data:{...t.modals.data,...r}}},closeModal:t=>{t.modals=Eo.deepCopy(Qse)},setUpdatedStageCoordinates:(t,e)=>{t.updatedStageCoordinates=e.payload||null},setUpdatedPhysicalStageCoordinates:(t,e)=>{t.updatedPhysicalStageCoordinates=e.payload||null},setHasSharedProject:(t,e)=>{t.hasSharedProject=!!e.payload},setDeleteConfirmProps:(t,e)=>{t.deleteConfirm=e.payload?{...Eo.deepCopy(z3),...e.payload}:Eo.deepCopy(z3)},setForceCloseContextMenu:(t,e)=>{t.forceCloseContextMenu=e.payload||!1},setMatrixType:(t,e)=>{t.matrixType=e.payload},setAccessMapType:(t,e)=>{t.accessMapType=e.payload},toggleComponentsReposition:(t,e)=>{t.componentsReposition=!!e.payload},setWarningPopoverProps:(t,e)=>{t.warningPopover={...Eo.deepCopy(Kse),...e.payload}},setIsLeftPanelOpen:(t,e)=>{t.isLeftPanelOpen=e.payload,Wg.setValueByKey(CG,t.isLeftPanelOpen)},setIsRightPanelOpen:(t,e)=>{t.isRightPanelOpen=e.payload,Wg.setValueByKey(SG,t.isRightPanelOpen)},setActiveProjectId:(t,e)=>{t.activeProjectId=e.payload,Wg.setValueByKey(EL,e.payload)},setActiveRightPanelTab:(t,e)=>{t.activeRightPanelTab=e.payload,localStorage.setItem(xL,e.payload)},setAutoRouteResponse:(t,e)=>{t.autoRouteResponse=e.payload,localStorage.setItem(xG,t.autoRouteResponse)},setActiveNcnocComponentId:(t,e)=>{t.activeNcnocComponentId=e.payload,localStorage.setItem(wG,e.payload)},setActiveCnocComponentId:(t,e)=>{t.activeCnocComponentId=e.payload,localStorage.setItem(wL,e.payload)},setActiveRtlBranchId:(t,e)=>{t.activeRtlBranchId=e.payload,localStorage.setItem(MI,e.payload)}},extraReducers:t=>{t.addCase(qk,e=>{e[nC]=Sl.MY_PROJECTS,e.currentProjectsPage=1,e[MI]=""})}}),{actions:{toggleProjectFolders:Wjt,toggleProjectSelectedFolder:jjt,createUpdateProjectMod
100al:pNe,updateTableFiltersState:gNe,setUpdatedStageCoordinates:AL,setUpdatedPhysicalStageCoordinates:qjt,setActiveProjectsPageTab:mNe,setHasSharedProject:Yjt,setActiveCenterPanelTab:YP,setActiveRightPanelTab:Zse,openModal:AG,closeModal:Jk,setDeleteConfirmProps:Im,setForceCloseContextMenu:eF,setMatrixType:yNe,setAccessMapType:vNe,toggleComponentsReposition:Jse,setWarningPopoverProps:DI,setCurrentProjectsPage:z1,setIsLeftPanelOpen:eae,setIsRightPanelOpen:pd,setActiveProjectId:bNe,setAutoRouteResponse:zT,setActiveNcnocComponentId:d0,setActiveCnocComponentId:AC,setActiveRtlBranchId:CNe},reducer:SNe}=fNe,ENe=t=>t.ui,tF=t=>t.ui[nC],xNe=t=>t.ui.tables,wNe=t=>t.ui.modals.isLogoutModalOpen,ANe=t=>t.ui.modals.cloneProject,TNe=t=>t.ui.modals.deleteUser,tae=t=>t.ui.modals.data,_Ne=t=>t.ui.hasSharedProject,INe=t=>t.ui.deleteConfirm,PNe=t=>t.ui.forceCloseContextMenu,nae=t=>t.ui.componentsReposition,RNe=t=>t.ui.warningPopover,ONe=t=>t.ui.currentProjectsPage,h0=t=>t.ui.isLeftPanelOpen,gd=t=>t.ui.isRightPanelOpen,NNe=t=>t.ui.activeProjectId,nF=t=>t.ui.activeCenterPanelTab,MNe=t=>t.ui.activeRightPanelTab,DNe=t=>t.ui.autoRouteResponse,rae=t=>t.ui.activeNcnocComponentId,oae=t=>t.ui.activeCnocComponentId,Qx=t=>t.ui.activeRtlBranchId,Kt={projectTogglePanels:{leftMenuOpen:"leftMenuOpen",matrixOpen:"matrixOpen",explorerOpen:"explorerOpen",componentsOpen:"componentsOpen",performanceMatrixOpen:"performanceMatrixOpen",isAccessMapOpen:"isAccessMapOpen"},componentTypes:{initiators:"initiators",routers:"routers",targets:"targets",cRouters:"cRouters",cTargets:"cTargets",topologies:"topologies",bridges:"bridges"},componentSingleTypes:{initiators:"initiator",routers:"router",targets:"target",cRouters:"cRouter",cTargets:"cTarget",topologies:"topology",bridges:"bridge"},highlightRoutes:["initiators","targets"],excludeForProjectRoutes:["routers","cRouters"],elementTypes:{connections:"connections",components:"components"},gressTypes:{inGress:"inGress",eGress:"eGress"},tasks:{statusById:{0:"pending",1:"running",2:"failure",3:"success"},description:{generate:"Generate RTL",simulate:"Simulate"},idByStatus:{pending:0,running:1,failure:2,success:3}},deleteConfirm:{project:"project",connections:"connections",initiators:"initiators",routers:"routers",targets:"targets",cRouters:"cRouters",cTargets:"cTargets",topologies:"topologies",tasks:"tasks",group:"group",user:"user",routingEntries:"routing-entries"},projectTypes:{noc:"noc",cNoc:"cNoc"},projectTypesShort:{noc:"n",cNoc:"cn"},projectTypesLong:{n:"noc",cn:"cNoc"},projectTypesRoute:{noc:"noc",cNoc:"coherent-noc"},projectRouteToType:{noc:"noc","coherent-noc":"cNoc"},coherentPrimaryPortLocations:{top:"top",right:"right",bottom:"bottom",left:"left"},coherentSecondaryPortLocations:{topRight:"topRight",bottomRight:"bottomRight",bottomLeft:"bottomLeft",topLeft:"topLeft"},coherentPrimaryPortIdxByLocation:{top:0,right:1,bottom:2,left:3},coherentPrimaryPortLocationByIdx:{0:"top",1:"right",2:"bottom",3:"left"},coherentSecondaryPortIdxByLocation:{topRight:0,bottomRight:1,bottomLeft:2,topLeft:3},coherentSecondaryPortLocationByIdx:{0:"topRight",1:"bottomRight",2:"bottomLeft",3:"topLeft"},coherentConnectionOpposingPortIdxByLocation:{top:2,right:3,bottom:0,left:1},excludeForIdConversion:["topologies","cTargets","cRouters"]},TG={id:"",type:null},$Y={selectedElement:{...TG},multipleSelection:{},shareWithUsers:[],type:Kt.projectTypes.noc,projectSearchTerm:"",projectsFilterTypes:Wg.getProjectsFilterTypes()},LNe=rf({name:"project",initialState:$Y,reducers:{setSelected:(t,e)=>{const{id:n,type:r,group:o,deselect:i=!0}=e.payload;o?(t.multipleSelection[n]&&i?i&&delete t.multipleSelection[n]:t.multipleSelection[n]={id:n,type:r},t.selectedElement.id&&(t.multipleSelection[t.selectedElement.id]={...t.selectedElement},t.selectedElement={...TG})):(Object.keys(t.multipleSelection).length&&(t.multipleSelection={}),t.selectedElement={id:n,type:r})},clearSelectedComponents:t=>{t.multipleSelection={},t.selectedElement={...Ud}},setMultipleSelection:(t,e)=>{const{elements:n,group:r}=e.payload;r?t.multipleSelection={...t.multipleSelection,...n}:t.multipleSelection=n,t.selectedElement.id&&(t.multipleSelection[t.selectedElement.id]={...t.selectedElement},t.selectedElement={...Ud})},setShareWithUsers:(t,e)=>{t.shareWithUsers=e.payload},setProjectType:(t,e)=>{t.type=e.payload||Kt.projectTypes.noc},setProjectSearchTerm:(t,e)=>{t.projectSearchTerm=e.payload},setProjectsFilterTypes:(t,e)=>{t.projectsFilterTypes=e.payload,Wg.setValueByKey("projectsFilterTypes",e.payload)}},extraReducers:t=>{t.addCase(qk,()=>({...$Y,projectsFilterTypes:Wg.getProjectsFilterTypes()}))}}),{actions:{setSelected:Sv,setMultipleSelection:Xjt,clearSelectedComponents:I_,setShareWithUsers:Kjt,setProjectType:Qjt,setProjectSearchTerm:HY,setProjectsFilterTypes:kNe},reducer:FNe}=LNe,BNe=t=>t.project.multipleSelection,Zx=t=>t.project.selectedElement||TG,XP=t=>t.project.projectSearchTerm,_G=t=>t.project.projectsFilterTypes,IG=MPe({reducer:{...oOe,admin:aOe,auth:URe,ui:SNe,project:FNe,error:qRe},devTools:!0,middleware:t=>t({serializableCheck:!1}).concat(Nr.middleware)});tRe(IG.dispatch);const $Ne={black:"#000",white:"#fff"},LI=$Ne,HNe={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Hg=HNe,UNe={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},rE=UNe,zNe={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},oE=zNe,VNe={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},iE=VNe,GNe={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},ky=GNe,WNe={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},jNe=WNe,qNe={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},JA=qNe,YNe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},iae=YNe;function ym(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}const XNe=Object.freeze(Object.defineProperty({__proto__:null,default:ym},Symbol.toStringTag,{value:"Module"})),TC="$$material";function sae(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var KNe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInl
100ine|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QNe=sae(function(t){return KNe.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function ZNe(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function JNe(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var eMe=function(){function t(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(JNe(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=ZNe(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++}
vendor: 4,996 bytes, line 100
100,e.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},t}(),Ul="-ms-",TL="-moz-",yo="-webkit-",aae="comm",PG="rule",RG="decl",tMe="@import",lae="@keyframes",nMe="@layer",rMe=Math.abs,rF=String.fromCharCode,oMe=Object.assign;function iMe(t,e){return Cl(t,0)^45?(((e<<2^Cl(t,0))<<2^Cl(t,1))<<2^Cl(t,2))<<2^Cl(t,3):0}function cae(t){return t.trim()}function sMe(t,e){return(t=e.exec(t))?t[0]:t}function bo(t,e,n){return t.replace(e,n)}function G3(t,e){return t.indexOf(e)}function Cl(t,e){return t.charCodeAt(e)|0}function kI(t,e,n){return t.slice(e,n)}function gp(t){return t.length}function OG(t){return t.length}function SN(t,e){return e.push(t),t}function aMe(t,e){return t.map(e).join("")}var oF=1,V1=1,uae=0,xu=0,qs=0,Jx="";function iF(t,e,n,r,o,i,s){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:oF,column:V1,length:s,return:""}}function eT(t,e){return oMe(iF("",null,null,"",null,null,0),t,{length:-t.length},e)}function lMe(){return qs}function cMe(){return qs=xu>0?Cl(Jx,--xu):0,V1--,qs===10&&(V1=1,oF--),qs}function td(){return qs=xu<uae?Cl(Jx,xu++):0,V1++,qs===10&&(V1=1,oF++),qs}function Rp(){return Cl(Jx,xu)}function jM(){return xu}function KP(t,e){return kI(Jx,t,e)}function FI(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dae(t){return oF=V1=1,uae=gp(Jx=t),xu=0,[]}function hae(t){return Jx="",t}function qM(t){return cae(KP(xu-1,W3(t===91?t+2:t===40?t+1:t)))}function uMe(t){for(;(qs=Rp())&&qs<33;)td();return FI(t)>2||FI(qs)>3?"":" "}function dMe(t,e){for(;--e&&td()&&!(qs<48||qs>102||qs>57&&qs<65||qs>70&&qs<97););return KP(t,jM()+(e<6&&Rp()==32&&td()==32))}function W3(t){for(;td();)switch(qs){case t:return xu;case 34:case 39:t!==34&&t!==39&&W3(qs);break;case 40:t===41&&W3(t);break;case 92:td();break}return xu}function hMe(t,e){for(;td()&&t+qs!==47+10;)if(t+qs===42+42&&Rp()===47)break;return"/*"+KP(e,xu-1)+"*"+rF(t===47?t:td())}function fMe(t){for(;!FI(Rp());)td();return KP(t,xu)}function pMe(t){return hae(YM("",null,null,null,[""],t=dae(t),0,[0],t))}function YM(t,e,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,h=0,f=0,p=0,m=1,y=1,v=1,b=0,S="",w=o,A=i,_=r,P=S;y;)switch(p=b,b=td()){case 40:if(p!=108&&Cl(P,d-1)==58){G3(P+=bo(qM(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:P+=qM(b);break;case 9:case 10:case 13:case 32:P+=uMe(p);break;case 92:P+=dMe(jM()-1,7);continue;case 47:switch(Rp()){case 42:case 47:SN(gMe(hMe(td(),jM()),e,n),l);break;default:P+="/"}break;case 123*m:a[c++]=gp(P)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:v==-1&&(P=bo(P,/\f/g,"")),f>0&&gp(P)-d&&SN(f>32?zY(P+";",r,n,d-1):zY(bo(P," ","")+";",r,n,d-2),l);break;case 59:P+=";";default:if(SN(_=UY(P,e,n,c,u,o,a,S,w=[],A=[],d),i),b===123)if(u===0)YM(P,e,_,_,w,i,d,a,A);else switch(h===99&&Cl(P,3)===110?100:h){case 100:case 108:case 109:case 115:YM(t,_,_,r&&SN(UY(t,_,_,0,0,o,a,S,o,w=[],d),A),o,A,d,a,r?w:A);break;default:YM(P,_,_,_,[""],A,0,a,A)}}c=u=f=0,m=v=1,S=P="",d=s;break;case 58:d=1+gp(P),f=p;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&cMe()==125)continue}switch(P+=rF(b),b*m){case 38:v=u>0?1:(P+="\f",-1);break;case 44:a[c++]=(gp(P)-1)*v,v=1;break;case 64:Rp()===45&&(P+=qM(td())),h=Rp(),u=d=gp(S=P+=fMe(jM())),b++;break;case 45:p===45&&gp(P)==2&&(m=0)}}return i}function UY(t,e,n,r,o,i,s,a,l,c,u){for(var d=o-1,h=o===0?i:[""],f=OG(h),p=0,m=0,y=0;p<r;++p)for(var v=0,b=kI(t,d+1,d=rMe(m=s[p])),S=t;v<f;++v)(S=cae(m>0?h[v]+" "+b:bo(b,/&\f/g,h[v])))&&(l[y++]=S);return iF(t,e,n,o===0?PG:a,l,c,u)}function gMe(t,e,n){return iF(t,e,n,aae,rF(lMe()),kI(t,2,-2),0)}function zY(t,e,n,r){return iF(t,e,n,RG,kI(t,0,r),kI(t,r+1,-1),r)}function v1(t,e){for(var n="",r=OG(t),o=0;o<r;o++)n+=e(t[o],o,t,e)||"";return n}function mMe(t,e,n,r){switch(t.type){case nMe:if(t.children.length)break;case tMe:case RG:return t.return=t.return||t.value;case aae:return"";case lae:return t.return=t.value+"{"+v1(t.children,r)+"}";case PG:t.value=t.props.join(",")}return gp(n=v1(t.children,r))?t.return=t.value+"{"+n+"}":""}function yMe(t){var e=OG(t);return function(n,r,o,i){for(var s="",a=0;a<e;a++)s+=t[a](n,r,o,i)||"";return s}}function vMe(t){return function(e){e.root||(e=e.return)&&t(e)}}var bMe=function(e,n,r){for(var o=0,i=0;o=i,i=Rp(),o===38&&i===12&&(n[r]=1),!FI(i);)td();return KP(e,xu)},CMe=function(e,n){var r=-1,o=44;do switch(FI(o)){case 0:o===38&&Rp()===12&&(n[r]=1),e[r]+=bMe(xu-1,n,r);break;case 2:e[r]+=qM(o);break;case 4:if(o===44){e[++r]=Rp()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=rF(o)}while(o=td());return e},SMe=function(e,n){return hae(CMe(dae(e),n))},VY=new WeakMap,EMe=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,o=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;
vendor: 2,345 bytes, line 100
100if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!VY.get(r))&&!o){VY.set(e,!0);for(var i=[],s=SMe(n,i),a=r.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)e.props[c]=i[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},xMe=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function fae(t,e){switch(iMe(t,e)){case 5103:return yo+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return yo+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return yo+t+TL+t+Ul+t+t;case 6828:case 4268:return yo+t+Ul+t+t;case 6165:return yo+t+Ul+"flex-"+t+t;case 5187:return yo+t+bo(t,/(\w+).+(:[^]+)/,yo+"box-$1$2"+Ul+"flex-$1$2")+t;case 5443:return yo+t+Ul+"flex-item-"+bo(t,/flex-|-self/,"")+t;case 4675:return yo+t+Ul+"flex-line-pack"+bo(t,/align-content|flex-|-self/,"")+t;case 5548:return yo+t+Ul+bo(t,"shrink","negative")+t;case 5292:return yo+t+Ul+bo(t,"basis","preferred-size")+t;case 6060:return yo+"box-"+bo(t,"-grow","")+yo+t+Ul+bo(t,"grow","positive")+t;case 4554:return yo+bo(t,/([^-])(transform)/g,"$1"+yo+"$2")+t;case 6187:return bo(bo(bo(t,/(zoom-|grab)/,yo+"$1"),/(image-set)/,yo+"$1"),t,"")+t;case 5495:case 3959:return bo(t,/(image-set\([^]*)/,yo+"$1$`$1");case 4968:return bo(bo(t,/(.+:)(flex-)?(.*)/,yo+"box-pack:$3"+Ul+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+yo+t+t;case 4095:case 3583:case 4068:case 2532:return bo(t,/(.+)-inline(.+)/,yo+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(gp(t)-1-e>6)switch(Cl(t,e+1)){case 109:if(Cl(t,e+4)!==45)break;case 102:return bo(t,/(.+:)(.+)-([^]+)/,"$1"+yo+"$2-$3$1"+TL+(Cl(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~G3(t,"stretch")?fae(bo(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Cl(t,e+1)!==115)break;case 6444:switch(Cl(t,gp(t)-3-(~G3(t,"!important")&&10))){case 107:return bo(t,":",":"+yo)+t;case 101:return bo(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+yo+(Cl(t,14)===45?"inline-":"")+"box$3$1"+yo+"$2$3$1"+Ul+"$2box$3")+t}break;case 5936:switch(Cl(t,e+11)){case 114:return yo+t+Ul+bo(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
vendor: 4,544 bytes, line 100
100case 108:return yo+t+Ul+bo(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return yo+t+Ul+bo(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return yo+t+Ul+t+t}return t}var wMe=function(e,n,r,o){if(e.length>-1&&!e.return)switch(e.type){case RG:e.return=fae(e.value,e.length);break;case lae:return v1([eT(e,{value:bo(e.value,"@","@"+yo)})],o);case PG:if(e.length)return aMe(e.props,function(i){switch(sMe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return v1([eT(e,{props:[bo(i,/:(read-\w+)/,":"+TL+"$1")]})],o);case"::placeholder":return v1([eT(e,{props:[bo(i,/:(plac\w+)/,":"+yo+"input-$1")]}),eT(e,{props:[bo(i,/:(plac\w+)/,":"+TL+"$1")]}),eT(e,{props:[bo(i,/:(plac\w+)/,Ul+"input-$1")]})],o)}return""})}},AMe=[wMe],pae=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=e.stylisPlugins||AMe,i={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)i[y[v]]=!0;a.push(m)});var l,c=[EMe,xMe];{var u,d=[mMe,vMe(function(m){u.insert(m)})],h=yMe(c.concat(o,d)),f=function(y){return v1(pMe(y),h)};l=function(y,v,b,S){u=b,f(y?y+"{"+v.styles+"}":v.styles),S&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new eMe({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:l};return p.sheet.hydrate(a),p},TMe=!0;function _Me(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):r+=o+" "}),r}var gae=function(e,n,r){var o=e.key+"-"+n.name;(r===!1||TMe===!1)&&e.registered[o]===void 0&&(e.registered[o]=n.styles)},mae=function(e,n,r){gae(e,n,r);var o=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var i=n;do e.insert(n===i?"."+o:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};function IMe(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var PMe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},RMe=/[A-Z]|^ms/g,OMe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,yae=function(e){return e.charCodeAt(1)===45},GY=function(e){return e!=null&&typeof e!="boolean"},LH=sae(function(t){return yae(t)?t:t.replace(RMe,"-$&").toLowerCase()}),WY=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(OMe,function(r,o,i){return mp={name:o,styles:i,next:mp},o})}return PMe[e]!==1&&!yae(e)&&typeof n=="number"&&n!==0?n+"px":n};function BI(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return mp={name:n.name,styles:n.styles,next:mp},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)mp={name:r.name,styles:r.styles,next:mp},r=r.next;var o=n.styles+";";return o}return NMe(t,e,n)}case"function":{if(t!==void 0){var i=mp,s=n(t);return mp=i,BI(t,e,s)}break}}if(e==null)return n;var a=e[n];return a!==void 0?a:n}function NMe(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=BI(t,e,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object")e!=null&&e[s]!==void 0?r+=i+"{"+e[s]+"}":GY(s)&&(r+=LH(i)+":"+WY(i,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var a=0;a<s.length;
100a++)GY(s[a])&&(r+=LH(i)+":"+WY(i,s[a])+";");else{var l=BI(t,e,s);switch(i){case"animation":case"animationName":{r+=LH(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var jY=/label:\s*([^\s;\n{]+)\s*(;|$)/g,mp,NG=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,i="";mp=void 0;var s=e[0];s==null||s.raw===void 0?(o=!1,i+=BI(r,n,s)):i+=s[0];for(var a=1;a<e.length;a++)i+=BI(r,n,e[a]),o&&(i+=s[a]);jY.lastIndex=0;for(var l="",c;(c=jY.exec(i))!==null;)l+="-"+c[1];var u=IMe(i)+l;return{name:u,styles:i,next:mp}},MMe=function(e){return e()},vae=fC["useInsertionEffect"]?fC["useInsertionEffect"]:!1,DMe=vae||MMe,qY=vae||C.useLayoutEffect,bae=C.createContext(typeof HTMLElement<"u"?pae({key:"css"}):null),LMe=bae.Provider,Cae=function(e){return C.forwardRef(function(n,r){var o=C.useContext(bae);return e(n,o,r)})},QP=C.createContext({}),kH={exports:{}},YY;function Sae(){return YY||(YY=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)({}).hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(null,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(kH)),kH.exports}Sae();var kMe=Cae(function(t,e){var n=t.styles,r=NG([n],void 0,C.useContext(QP)),o=C.useRef();return qY(function(){var i=e.key+"-global",s=new e.sheet.constructor({key:i,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+i+" "+r.name+'"]');return e.sheet.tags.length&&(s.before=e.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",i),s.hydrate([l])),o.current=[s,a],function(){s.flush()}},[e]),qY(function(){var i=o.current,s=i[0],a=i[1];if(a){i[1]=!1;return}if(r.next!==void 0&&mae(e,r.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}e.insert("",r,s,!1)},[e,r.name]),null});function vm(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return NG(e)}var _f=function(){var e=vm.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},FMe=QNe,BMe=function(e){return e!=="theme"},XY=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?FMe:BMe},KY=function(e,n,r){var o;if(n){var i=n.shouldForwardProp;o=e.__emotion_forwardProp&&i?function(s){return e.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=e.__emotion_forwardProp),o},$Me=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return gae(n,r,o),DMe(function(){return mae(n,r,o)}),null},HMe=function t(e,n){var r=e.__emotion_real===e,o=r&&e.__emotion_base||e,i,s;n!==void 0&&(i=n.label,s=n.target);
vendor: 2,467 bytes, line 100
100var a=KY(e,n,r),l=a||XY(o),c=!l("as");return function(){var u=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var h=u.length,f=1;f<h;f++)d.push(u[f],u[0][f])}var p=Cae(function(m,y,v){var b=c&&m.as||o,S="",w=[],A=m;if(m.theme==null){A={};for(var _ in m)A[_]=m[_];A.theme=C.useContext(QP)}typeof m.className=="string"?S=_Me(y.registered,w,m.className):m.className!=null&&(S=m.className+" ");var P=NG(d.concat(w),y.registered,A);S+=y.key+"-"+P.name,s!==void 0&&(S+=" "+s);var R=c&&a===void 0?XY(b):l,O={};for(var N in m)c&&N==="as"||R(N)&&(O[N]=m[N]);return O.className=S,O.ref=v,C.createElement(C.Fragment,null,C.createElement($Me,{cache:y,serialized:P,isStringTag:typeof b=="string"}),C.createElement(b,O))});return p.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=e.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=d,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+s}}),p.withComponent=function(m,y){return t(m,X({},n,y,{shouldForwardProp:KY(p,y,!0)})).apply(void 0,d)},p}},UMe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],j3=HMe.bind();UMe.forEach(function(t){j3[t]=j3(t)});var Eae={exports:{}},zMe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",VMe=zMe,GMe=VMe;function xae(){}function wae(){}wae.resetWarningCache=xae;
100var WMe=function(){function t(r,o,i,s,a,l){if(l!==GMe){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:wae,resetWarningCache:xae};return n.PropTypes=n,n};Eae.exports=WMe();var jMe=Eae.exports;const ge=ud(jMe);let q3;typeof document=="object"&&(q3=pae({key:"css",prepend:!0}));function qMe(t){const{injectFirst:e,children:n}=t;return e&&q3?g(LMe,{value:q3,children:n}):n}function YMe(t){return t==null||Object.keys(t).length===0}function Aae(t){const{styles:e,defaultTheme:n={}}=t;return g(kMe,{styles:typeof e=="function"?o=>e(YMe(o)?n:o):e})}/** 101 * @mui/styled-engine v5.16.6 102 * 103 * @license MIT 104 * This source code is licensed under the MIT license found in the 105 * LICENSE file in the root directory of this source tree. 106 */function MG(t,e){return j3(t,e)}const Tae=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},XMe=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Aae,StyledEngineProvider:qMe,ThemeContext:QP,css:vm,default:MG,internal_processStyles:Tae,keyframes:_f},Symbol.toStringTag,{value:"Module"}));function jg(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function _ae(t){if(!jg(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=_ae(t[n])}),e}function Oc(t,e,n={clone:!0}){const r=n.clone?X({},t):t;return jg(t)&&jg(e)&&Object.keys(e).forEach(o=>{jg(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&jg(t[o])?r[o]=Oc(t[o],e[o],n):n.clone?r[o]=jg(e[o])?_ae(e[o]):e[o]:r[o]=e[o]}),r}const KMe=Object.freeze(Object.defineProperty({__proto__:null,default:Oc,isPlainObject:jg},Symbol.toStringTag,{value:"Module"})),QMe=["values","unit","step"],ZMe=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>X({},n,{[r.key]:r.val}),{})};function Iae(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,o=at(t,QMe),i=ZMe(e),s=Object.keys(i);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function c(h,f){const p=s.indexOf(f);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(p!==-1&&typeof e[s[p]]=="number"?e[s[p]]:f)-r/100}${n})`}function u(h){return s.indexOf(h)+1<s.length?c(h,s[s.indexOf(h)+1]):a(h)}function d(h){const f=s.indexOf(h);return f===0?a(s[1]):f===s.length-1?l(s[f]):c(h,s[s.indexOf(h)+1]).replace("@media","@media not all and")}return X({keys:s,values:i,up:a,down:l,between:c,only:u,not:d,unit:n},o)}const JMe={borderRadius:4},eDe=JMe;function P_(t,e){return e?Oc(t,e,{clone:!1}):t}const DG={xs:0,sm:600,md:900,lg:1200,xl:1536},QY={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${DG[t]}px)`};function wu(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||QY;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const i=r.breakpoints||QY;return Object.keys(e).reduce((s,a)=>{if(Object.keys(i.values||DG).indexOf(a)!==-1){const l=i.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function Pae(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function Rae(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function tDe(t,...e){const n=Pae(t),r=[n,...e].reduce((o,i)=>Oc(o,i),{});return Rae(Object.keys(n),r)}function nDe(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((o,i)=>{i<t.length&&(n[o]=!0)}):r.forEach(o=>{t[o]!=null&&(n[o]=!0)}),n}function rC({values:t,breakpoints:e,base:n}){const r=n||nDe(t,e),o=Object.keys(r);if(o.length===0)return t;let i;return o.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[i],i=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[i],i=a):s[a]=t,s),{})}function ht(t){if(typeof t!="string")throw new Error(ym(7));return t.charAt(0).toUpperCase()+t.slice(1)}const rDe=Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"}));function G1(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function _L(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=G1(t,n)||r,e&&(o=e(o,r,t)),o}function Bs(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,c=G1(l,r)||{};return wu(s,a,d=>{let h=_L(c,o,d);
106return d===h&&typeof d=="string"&&(h=_L(c,o,`${e}${d==="default"?"":ht(d)}`,d)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[e],i}function oDe(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const iDe={m:"margin",p:"padding"},sDe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ZY={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},aDe=oDe(t=>{if(t.length>2)if(ZY[t])t=ZY[t];else return[t];const[e,n]=t.split(""),r=iDe[e],o=sDe[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),LG=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],kG=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...LG,...kG];function ZP(t,e,n,r){var o;const i=(o=G1(t,e,!1))!=null?o:n;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function FG(t){return ZP(t,"spacing",8)}function _C(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function lDe(t,e){return n=>t.reduce((r,o)=>(r[o]=_C(e,n),r),{})}function cDe(t,e,n,r){if(e.indexOf(n)===-1)return null;const o=aDe(n),i=lDe(o,r),s=t[n];return wu(t,s,i)}function Oae(t,e){const n=FG(t.theme);return Object.keys(t).map(r=>cDe(t,e,r,n)).reduce(P_,{})}function us(t){return Oae(t,LG)}us.propTypes={};us.filterProps=LG;function ds(t){return Oae(t,kG)}ds.propTypes={};ds.filterProps=kG;function uDe(t=8){if(t.mui)return t;const e=FG({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function sF(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?P_(o,e[i](r)):o,{});return n.propTypes={},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function oh(t){return typeof t!="number"?t:`${t}px solid`}function Rh(t,e){return Bs({prop:t,themeKey:"borders",transform:e})}const dDe=Rh("border",oh),hDe=Rh("borderTop",oh),fDe=Rh("borderRight",oh),pDe=Rh("borderBottom",oh),gDe=Rh("borderLeft",oh),mDe=Rh("borderColor"),yDe=Rh("borderTopColor"),vDe=Rh("borderRightColor"),bDe=Rh("borderBottomColor"),CDe=Rh("borderLeftColor"),SDe=Rh("outline",oh),EDe=Rh("outlineColor"),aF=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=ZP(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:_C(e,r)});return wu(t,t.borderRadius,n)}return null};aF.propTypes={};aF.filterProps=["borderRadius"];sF(dDe,hDe,fDe,pDe,gDe,mDe,yDe,vDe,bDe,CDe,aF,SDe,EDe);const lF=t=>{if(t.gap!==void 0&&t.gap!==null){const e=ZP(t.theme,"spacing",8),n=r=>({gap:_C(e,r)});return wu(t,t.gap,n)}return null};lF.propTypes={};lF.filterProps=["gap"];const cF=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=ZP(t.theme,"spacing",8),n=r=>({columnGap:_C(e,r)});return wu(t,t.columnGap,n)}return null};cF.propTypes={};cF.filterProps=["columnGap"];const uF=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=ZP(t.theme,"spacing",8),n=r=>({rowGap:_C(e,r)});return wu(t,t.rowGap,n)}return null};uF.propTypes={};uF.filterProps=["rowGap"];const xDe=Bs({prop:"gridColumn"}),wDe=Bs({prop:"gridRow"}),ADe=Bs({prop:"gridAutoFlow"}),TDe=Bs({prop:"gridAutoColumns"}),_De=Bs({prop:"gridAutoRows"}),IDe=Bs({prop:"gridTemplateColumns"}),PDe=Bs({prop:"gridTemplateRows"}),RDe=Bs({prop:"gridTemplateAreas"}),ODe=Bs({prop:"gridArea"});sF(lF,cF,uF,xDe,wDe,ADe,TDe,_De,IDe,PDe,RDe,ODe);function b1(t,e){return e==="grey"?e:t}const NDe=Bs({prop:"color",themeKey:"palette",transform:b1}),MDe=Bs({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:b1}),DDe=Bs({prop:"backgroundColor",themeKey:"palette",transform:b1});sF(NDe,MDe,DDe);function Xu(t){return t<=1&&t!==0?`${t*100}%`:t}const LDe=Bs({prop:"width",transform:Xu}),BG=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,o;const i=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||DG[n];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Xu(n)}};return wu(t,t.maxWidth,e)}return null};BG.filterProps=["maxWidth"];const kDe=Bs({prop:"minWidth",transform:Xu}),FDe=Bs({prop:"height",transform:Xu}),BDe=Bs({prop:"maxHeight",transform:Xu}),$De=Bs({prop:"minHeight",transform:Xu});Bs({prop:"size",cssProperty:"width",transform:Xu});Bs({prop:"size",cssProperty:"height",transform:Xu});const HDe=Bs({prop:"boxSizing"});sF(LDe,BG,kDe,FDe,BDe,$De,HDe);
106const UDe={border:{themeKey:"borders",transform:oh},borderTop:{themeKey:"borders",transform:oh},borderRight:{themeKey:"borders",transform:oh},borderBottom:{themeKey:"borders",transform:oh},borderLeft:{themeKey:"borders",transform:oh},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:oh},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:aF},color:{themeKey:"palette",transform:b1},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:b1},backgroundColor:{themeKey:"palette",transform:b1},p:{style:ds},pt:{style:ds},pr:{style:ds},pb:{style:ds},pl:{style:ds},px:{style:ds},py:{style:ds},padding:{style:ds},paddingTop:{style:ds},paddingRight:{style:ds},paddingBottom:{style:ds},paddingLeft:{style:ds},paddingX:{style:ds},paddingY:{style:ds},paddingInline:{style:ds},paddingInlineStart:{style:ds},paddingInlineEnd:{style:ds},paddingBlock:{style:ds},paddingBlockStart:{style:ds},paddingBlockEnd:{style:ds},m:{style:us},mt:{style:us},mr:{style:us},mb:{style:us},ml:{style:us},mx:{style:us},my:{style:us},margin:{style:us},marginTop:{style:us},marginRight:{style:us},marginBottom:{style:us},marginLeft:{style:us},marginX:{style:us},marginY:{style:us},marginInline:{style:us},marginInlineStart:{style:us},marginInlineEnd:{style:us},marginBlock:{style:us},marginBlockStart:{style:us},marginBlockEnd:{style:us},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:lF},rowGap:{style:uF},columnGap:{style:cF},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Xu},maxWidth:{style:BG},minWidth:{transform:Xu},height:{transform:Xu},maxHeight:{transform:Xu},minHeight:{transform:Xu},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},JP=UDe;function zDe(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function VDe(t,e){return typeof t=="function"?t(e):t}function Nae(){function t(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=G1(o,c)||{};return d?d(s):wu(s,r,p=>{let m=_L(h,u,p);return p===m&&typeof p=="string"&&(m=_L(h,u,`${n}${p==="default"?"":ht(p)}`,p)),l===!1?m:{[l]:m}})}function e(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:JP;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=Pae(i.breakpoints),d=Object.keys(u);let h=u;return Object.keys(c).forEach(f=>{const p=VDe(c[f],i);if(p!=null)if(typeof p=="object")if(s[f])h=P_(h,t(f,p,i,s));else{const m=wu({theme:i},p,y=>({[f]:y}));zDe(m,p)?h[f]=e({sx:p,theme:i}):h=P_(h,m)}else h=P_(h,t(f,p,i,s))}),Rae(d,h)}return Array.isArray(o)?o.map(a):a(o)}return e}const Mae=Nae();Mae.filterProps=["sx"];const eR=Mae;function Dae(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const GDe=["breakpoints","palette","spacing","shape"];function tR(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=t,s=at(t,GDe),a=Iae(n),l=uDe(o);let c=Oc({breakpoints:a,direction:"ltr",components:{},palette:X({mode:"light"},r),spacing:l,shape:X({},eDe,i)},s);return c.applyStyles=Dae,c=e.reduce((u,d)=>Oc(u,d),c),c.unstable_sxConfig=X({},JP,s?.unstable_sxConfig),c.unstable_sx=function(d){return eR({sx:d,theme:this})},c}const WDe=Object.freeze(Object.defineProperty({__proto__:null,default:tR,private_createBreakpoints:Iae,unstable_applyStyles:Dae},Symbol.toStringTag,{value:"Module"}));function jDe(t){return Object.keys(t).length===0}function $G(t=null){const e=C.useContext(QP);return!e||jDe(e)?t:e}const qDe=tR();function ew(t=qDe){return $G(t)}function YDe({styles:t,themeId:e,defaultTheme:n={}}){const r=ew(n),o=typeof t=="function"?t(e&&r[e]||r):t;return g(Aae,{styles:o})}const XDe=["sx"],KDe=t=>{var e,n;const r={systemProps:{},otherProps:{}},o=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:JP;return Object.keys(t).forEach(i=>
106{o[i]?r.systemProps[i]=t[i]:r.otherProps[i]=t[i]}),r};function nR(t){const{sx:e}=t,n=at(t,XDe),{systemProps:r,otherProps:o}=KDe(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const a=e(...s);return jg(a)?X({},r,a):r}:i=X({},r,e),X({},o,{sx:i})}const QDe=Object.freeze(Object.defineProperty({__proto__:null,default:eR,extendSxProp:nR,unstable_createStyleFunctionSx:Nae,unstable_defaultSxConfig:JP},Symbol.toStringTag,{value:"Module"})),JY=t=>t,ZDe=()=>{let t=JY;return{configure(e){t=e},generate(e){return t(e)},reset(){t=JY}}},JDe=ZDe(),dF=JDe;function Lae(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Lae(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ye(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Lae(t))&&(r&&(r+=" "),r+=e);return r}const eLe=["className","component"];function kae(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=t,i=MG("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(eR);return C.forwardRef(function(l,c){const u=ew(n),d=nR(l),{className:h,component:f="div"}=d,p=at(d,eLe);return g(i,X({as:f,ref:c,className:Ye(h,o?o(r):r),theme:e&&u[e]||u},p))})}const Fae={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ft(t,e,n="Mui"){const r=Fae[e];return r?`${n}-${r}`:`${dF.generate(t)}-${e}`}function Dt(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=Ft(t,o,n)}),r}const tLe=Dt("MuiBox",["root"]),nLe=tLe,rLe=kae({defaultClassName:nLe.root,generateClassName:dF.generate}),oLe=rLe,iLe=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Bae(t){const e=`${t}`.match(iLe);return e&&e[1]||""}function $ae(t,e=""){return t.displayName||t.name||Bae(t)||e}function eX(t,e,n){const r=$ae(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function sLe(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return $ae(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Vq.ForwardRef:return eX(t,t.render,"ForwardRef");case Vq.Memo:return eX(t,t.type,"memo");default:return}}}const aLe=Object.freeze(Object.defineProperty({__proto__:null,default:sLe,getFunctionName:Bae},Symbol.toStringTag,{value:"Module"})),lLe=["ownerState"],cLe=["variants"],uLe=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function dLe(t){return Object.keys(t).length===0}function hLe(t){return typeof t=="string"&&t.charCodeAt(0)>96}function FH(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const fLe=tR(),pLe=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function EN({defaultTheme:t,theme:e,themeId:n}){return dLe(e)?t:e[n]||e}function gLe(t){return t?(e,n)=>n[t]:null}function XM(t,e){let{ownerState:n}=e,r=at(e,lLe);const o=typeof t=="function"?t(X({ownerState:n},r)):t;if(Array.isArray(o))return o.flatMap(i=>XM(i,X({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=at(o,cLe);return i.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(X({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{n?.[u]!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(X({ownerState:n},r,n)):l.style))}),a}return o}function mLe(t={}){const{themeId:e,defaultTheme:n=fLe,rootShouldForwardProp:r=FH,slotShouldForwardProp:o=FH}=t,i=s=>eR(X({},s,{theme:EN(X({},s,{defaultTheme:n,themeId:e}))}));return i.__mui_systemSx=!0,(s,a={})=>{Tae(s,A=>A.filter(_=>!(_!=null&&_.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:h=gLe(pLe(c))}=a,f=at(a,uLe),p=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,m=d||!1;let y,v=FH;c==="Root"||c==="root"?v=r:c?v=o:hLe(s)&&(v=void 0);const b=MG(s,X({shouldForwardProp:v,label:y},f)),S=A=>typeof A=="function"&&A.__emotion_real!==A||jg(A)?_=>XM(A,X({},_,{theme:EN({theme:_.theme,defaultTheme:n,themeId:e})})):A,w=(A,..._)=>{let P=S(A);const R=_?_.map(S):[];l&&h&&R.push(M=>{const L=EN(X({},M,{defaultTheme:n,themeId:e}));if(!L.components||!L.components[l]||!L.components[l].styleOverrides)return null;const F=L.components[l].styleOverrides,$={};
106return Object.entries(F).forEach(([D,k])=>{$[D]=XM(k,X({},M,{theme:L}))}),h(M,$)}),l&&!p&&R.push(M=>{var L;const F=EN(X({},M,{defaultTheme:n,themeId:e})),$=F==null||(L=F.components)==null||(L=L[l])==null?void 0:L.variants;return XM({variants:$},X({},M,{theme:F}))}),m||R.push(i);const O=R.length-_.length;if(Array.isArray(A)&&O>0){const M=new Array(O).fill("");P=[...A,...M],P.raw=[...A.raw,...M]}const N=b(P,...R);return s.muiName&&(N.muiName=s.muiName),N};return b.withConfig&&(w.withConfig=b.withConfig),w}}const yLe=mLe(),ko=yLe;function hF(t,e){const n=X({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=X({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=t[r]||{},i=e[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=X({},i),Object.keys(o).forEach(s=>{n[r][s]=hF(o[s],i[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Hae(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:hF(e.components[n].defaultProps,r)}function Uae({props:t,name:e,defaultTheme:n,themeId:r}){let o=ew(n);return r&&(o=o[r]||o),Hae({theme:o,name:e,props:t})}const vLe=typeof window<"u"?C.useLayoutEffect:C.useEffect,Ls=vLe;function bLe(t,e,n,r,o){const[i,s]=C.useState(()=>o&&n?n(t).matches:r?r(t).matches:e);return Ls(()=>{let a=!0;if(!n)return;const l=n(t),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[t,n]),i}const zae=fC["useSyncExternalStore"];function CLe(t,e,n,r,o){const i=C.useCallback(()=>e,[e]),s=C.useMemo(()=>{if(o&&n)return()=>n(t).matches;if(r!==null){const{matches:u}=r(t);return()=>u}return i},[i,t,r,o,n]),[a,l]=C.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(t);return[()=>u.matches,d=>(u.addListener(d),()=>{u.removeListener(d)})]},[i,n,t]);return zae(l,a,s)}function Vae(t,e={}){const n=$G(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:i=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=Hae({name:"MuiUseMediaQuery",props:e,theme:n});let l=typeof t=="function"?t(n):t;return l=l.replace(/^@media( ?)/m,""),(zae!==void 0?CLe:bLe)(l,o,i,s,a)}function Gae(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const SLe=Object.freeze(Object.defineProperty({__proto__:null,default:Gae},Symbol.toStringTag,{value:"Module"}));function HG(t,e=0,n=1){return Gae(t,e,n)}function ELe(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function W1(t){if(t.type)return t;if(t.charAt(0)==="#")return W1(ELe(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ym(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(ym(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function fF(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function Tl(t,e){return t=W1(t),e=HG(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,fF(t)}function UG(t,e){if(t=W1(t),e=HG(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return fF(t)}function md(t,e){if(t=W1(t),e=HG(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return fF(t)}const xLe=ge.oneOfType([ge.func,ge.object]),Wae=xLe;function IL(...t){return t.reduce((e,n)=>n==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function rR(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function wLe(t,e){return()=>null}function R_(t,e){var n,r;return C.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Ji(t){return t&&t.ownerDocument||document}function $p(t){return Ji(t).defaultView||window}function ALe(t,e){return()=>null}function $I(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let tX=0;function TLe(t){const[e,n]=C.useState(t),r=t||e;return C.useEffect(()=>{e==null&&(tX+=1,n(`mui-${tX}`))},[e]),r}const nX=fC["useId".toString()];function sd(t){if(nX!==void 0){const e=nX();return t??e}return TLe(t)}function _Le(t,e,n,r,o){return null}function Ka({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=C.useRef(t!==void 0),[i,s]=C.useState(e),a=o?t:i,l=C.useCallback(c=>{o||s(c)},[]);return[a,l]}function mn(t){const e=C.useRef(t);return Ls(()=>{e.current=t}),C.useRef((...n)=>(0,e.current)(...n)).current}function Xr(...t){return C.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{$I(n,e)})},t)}const rX={};function ILe(t,e){const n=C.useRef(rX);return n.current===rX&&(n.current=t(e)),n}const PLe=[];function RLe(t){C.useEffect(t,PLe)}let zG=class jae{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new jae}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}};function Hb(){const t=ILe(zG.create).current;return RLe(t.disposeEffect),t}let pF=!0,Y3=!1;const OLe=new zG,NLe={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function MLe(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&NLe[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function DLe(t){t.metaKey||t.altKey||t.ctrlKey||(pF=!0)}function BH(){pF=!1}function LLe(){this.visibilityState==="hidden"&&Y3&&(pF=!0)}function kLe(t){t.addEventListener("keydown",DLe,!0),t.addEventListener("mousedown",BH,!0),t.addEventListener("pointerdown",BH,!0),t.addEventListener("touchstart",BH,!0),t.addEventListener("visibilitychange",LLe,!0)}function FLe(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return pF||MLe(e)}function gF(){const t=C.useCallback(o=>{o!=null&&kLe(o.ownerDocument)},[]),e=C.useRef(!1);function n(){return e.current?(Y3=!0,OLe.start(100,()=>{Y3=!1}),e.current=!1,!0):!1}function r(o){return FLe(o)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function qae(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let sE;function Yae(){if(sE)return sE;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),sE="reverse",t.scrollLeft>0?sE="default":(t.scrollLeft=1,t.scrollLeft===0&&(sE="negative")),document.body.removeChild(t),sE}function BLe(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch(Yae()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}const $Le=t=>{const e=C.useRef({});return C.useEffect(()=>{e.current=t}),e.current},VG=$Le;function Lt(t,e,n=void 0){const r={};return Object.keys(t).forEach(o=>{r[o]=t[o].reduce((i,s)=>{if(s){const a=e(s);a!==""&&i.push(a),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}const HLe=C.createContext(null),Xae=HLe;function Kae(){return C.useContext(Xae)}const ULe=typeof Symbol=="function"&&Symbol.for,zLe=ULe?Symbol.for("mui.nested"):"__THEME_NESTED__";function VLe(t,e){return typeof e=="function"?e(t):X({},t,e)}function GLe(t){const{children:e,theme:n}=t,r=Kae(),o=C.useMemo(()=>{const i=r===null?n:VLe(r,n);return i!=null&&(i[zLe]=r!==null),i},[n,r]);return g(Xae.Provider,{value:o,children:e})}const WLe=["value"],Qae=C.createContext();function jLe(t){let{value:e}=t,n=at(t,WLe);return g(Qae.Provider,X({value:e??!0},n))}const ic=()=>{const t=C.useContext(Qae);return t??!1},qLe=C.createContext(void 0);function YLe({value:t,children:e}){return g(qLe.Provider,{value:t,children:e})}const oX={};function iX(t,e,n,r=!1){return C.useMemo(()=>{const o=t&&e[t]||e;if(typeof n=="function"){const i=n(o),s=t?X({},e,{[t]:i}):i;return r?()=>s:s}return t?X({},e,{[t]:n}):X({},e,n)},[t,e,n,r])}function XLe(t){const{children:e,theme:n,themeId:r}=t,o=$G(oX),i=Kae()||oX,s=iX(r,o,n),a=iX(r,i,n,!0),l=s.direction==="rtl";return g(GLe,{theme:a,children:g(QP.Provider,{value:s,children:g(jLe,{value:l,children:g(YLe,{value:s?.components,children:e})})})})}const KLe=["component","direction","spacing","divider","children","className","useFlexGap"],QLe=tR(),ZLe=ko("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function JLe(t){return Uae({props:t,name:"MuiStack",defaultTheme:QLe})}
106function e2e(t,e){const n=C.Children.toArray(t).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(C.cloneElement(e,{key:`separator-${i}`})),r),[])}const t2e=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],n2e=({ownerState:t,theme:e})=>{let n=X({display:"flex",flexDirection:"column"},wu({theme:e},rC({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=FG(e),o=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),i=rC({values:t.direction,base:o}),s=rC({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const h=c>0?i[u[c-1]]:"column";i[l]=h}}),n=Oc(n,wu({theme:e},s,(l,c)=>t.useFlexGap?{gap:_C(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${t2e(c?i[c]:t.direction)}`]:_C(r,l)}}))}return n=tDe(e.breakpoints,n),n};function r2e(t={}){const{createStyledComponent:e=ZLe,useThemeProps:n=JLe,componentName:r="MuiStack"}=t,o=()=>Lt({root:["root"]},l=>Ft(r,l),{}),i=e(n2e);return C.forwardRef(function(l,c){const u=n(l),d=nR(u),{component:h="div",direction:f="column",spacing:p=0,divider:m,children:y,className:v,useFlexGap:b=!1}=d,S=at(d,KLe),w={direction:f,spacing:p,useFlexGap:b},A=o();return g(i,X({as:h,ownerState:w,ref:c,className:Ye(A.root,v)},S,{children:m?e2e(y,m):y}))})}function o2e(t,e){return X({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var $s={},Zae={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Zae);var hr=Zae.exports;const i2e=Kp(XNe),s2e=Kp(SLe);var Jae=hr;Object.defineProperty($s,"__esModule",{value:!0});var ar=$s.alpha=rle;$s.blend=y2e;$s.colorChannel=void 0;var j1=$s.darken=WG;$s.decomposeColor=Ch;$s.emphasize=ole;var a2e=$s.getContrastRatio=h2e;$s.getLuminance=PL;$s.hexToRgb=ele;$s.hslToRgb=nle;var q1=$s.lighten=jG;$s.private_safeAlpha=f2e;$s.private_safeColorChannel=void 0;$s.private_safeDarken=p2e;$s.private_safeEmphasize=m2e;$s.private_safeLighten=g2e;$s.recomposeColor=tw;$s.rgbToHex=d2e;var sX=Jae(i2e),l2e=Jae(s2e);function GG(t,e=0,n=1){return(0,l2e.default)(t,e,n)}function ele(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function c2e(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Ch(t){if(t.type)return t;if(t.charAt(0)==="#")return Ch(ele(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,sX.default)(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error((0,sX.default)(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const tle=t=>{const e=Ch(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};$s.colorChannel=tle;const u2e=(t,e)=>{try{return tle(t)}catch{return t}};$s.private_safeColorChannel=u2e;function tw(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function d2e(t){if(t.indexOf("#")===0)return t;const{values:e}=Ch(t);return`#${e.map((n,r)=>c2e(r===3?Math.round(255*n):n)).join("")}`}function nle(t){t=Ch(t);const{values:e}
vendor: 4,408 bytes, line 106
106=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),tw({type:a,values:l})}function PL(t){t=Ch(t);let e=t.type==="hsl"||t.type==="hsla"?Ch(nle(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function h2e(t,e){const n=PL(t),r=PL(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function rle(t,e){return t=Ch(t),e=GG(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,tw(t)}function f2e(t,e,n){try{return rle(t,e)}catch{return t}}function WG(t,e){if(t=Ch(t),e=GG(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return tw(t)}function p2e(t,e,n){try{return WG(t,e)}catch{return t}}function jG(t,e){if(t=Ch(t),e=GG(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return tw(t)}function g2e(t,e,n){try{return jG(t,e)}catch{return t}}function ole(t,e=.15){return PL(t)>.5?WG(t,e):jG(t,e)}function m2e(t,e,n){try{return ole(t,e)}catch{return t}}function y2e(t,e,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=Ch(t),s=Ch(e),a=[o(i.values[0],s.values[0]),o(i.values[1],s.values[1]),o(i.values[2],s.values[2])];return tw({type:"rgb",values:a})}const v2e=["mode","contrastThreshold","tonalOffset"],aX={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:LI.white,default:LI.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},$H={text:{primary:LI.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:LI.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function lX(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=q1(t.main,o):e==="dark"&&(t.dark=j1(t.main,i)))}function b2e(t="light"){return t==="dark"?{main:oE[200],light:oE[50],dark:oE[400]}:{main:oE[700],light:oE[400],dark:oE[800]}}function C2e(t="light"){return t==="dark"?{main:rE[200],light:rE[50],dark:rE[400]}:{main:rE[500],light:rE[300],dark:rE[700]}}function S2e(t="light"){return t==="dark"?{main:Hg[500],light:Hg[300],dark:Hg[700]}:{main:Hg[700],light:Hg[400],dark:Hg[800]}}function E2e(t="light"){return t==="dark"?{main:iE[400],light:iE[300],dark:iE[700]}:{main:iE[700],light:iE[500],dark:iE[900]}}function x2e(t="light"){return t==="dark"?{main:ky[400],light:ky[300],dark:ky[700]}:{main:ky[800],light:ky[500],dark:ky[900]}}function w2e(t="light"){return t==="dark"?{main:JA[400],light:JA[300],dark:JA[700]}:{main:"#ed6c02",light:JA[500],dark:JA[900]}}function A2e(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,o=at(t,v2e),i=t.primary||b2e(e),s=t.secondary||C2e(e),a=t.error||S2e(e),l=t.info||E2e(e),c=t.success||x2e(e),u=t.warning||w2e(e);function d(m){return a2e(m,$H.text.primary)>=n?$H.text.primary:aX.text.primary}const h=({color:m,name:y,mainShade:v=500,lightShade:b=300,darkShade:S=700})=>{if(m=X({},m),!m.main&&m[v]&&(m.main=m[v]),!m.hasOwnProperty("main"))throw new Error(ym(11,y?` (${y})`:"",v));if(typeof m.main!="string")throw new Error(ym(12,y?` (${y})`:"",JSON.stringify(m.main)));return lX(m,"light",b,r),lX(m,"dark",S,r),m.contrastText||(m.contrastText=d(m.main)),m},f={dark:$H,light:aX};return Oc(X({common:X({},LI),mode:e,primary:h({color:i,name:"primary"}
106),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:iae,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},f[e]),o)}const T2e=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function _2e(t){return Math.round(t*1e5)/1e5}const cX={textTransform:"uppercase"},uX='"Roboto", "Helvetica", "Arial", sans-serif';function I2e(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=uX,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,h=at(n,T2e),f=o/14,p=d||(v=>`${v/c*f}rem`),m=(v,b,S,w,A)=>X({fontFamily:r,fontWeight:v,fontSize:p(b),lineHeight:S},r===uX?{letterSpacing:`${_2e(w/b)}em`}:{},A,u),y={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(a,14,1.75,.4,cX),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,cX),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Oc(X({htmlFontSize:c,pxToRem:p,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}const P2e=.2,R2e=.14,O2e=.12;function Bi(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${P2e})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${R2e})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${O2e})`].join(",")}const N2e=["none",Bi(0,2,1,-1,0,1,1,0,0,1,3,0),Bi(0,3,1,-2,0,2,2,0,0,1,5,0),Bi(0,3,3,-2,0,3,4,0,0,1,8,0),Bi(0,2,4,-1,0,4,5,0,0,1,10,0),Bi(0,3,5,-1,0,5,8,0,0,1,14,0),Bi(0,3,5,-1,0,6,10,0,0,1,18,0),Bi(0,4,5,-2,0,7,10,1,0,2,16,1),Bi(0,5,5,-3,0,8,10,1,0,3,14,2),Bi(0,5,6,-3,0,9,12,1,0,3,16,2),Bi(0,6,6,-3,0,10,14,1,0,4,18,3),Bi(0,6,7,-4,0,11,15,1,0,4,20,3),Bi(0,7,8,-4,0,12,17,2,0,5,22,4),Bi(0,7,8,-4,0,13,19,2,0,5,24,4),Bi(0,7,9,-4,0,14,21,2,0,5,26,4),Bi(0,8,9,-5,0,15,22,2,0,6,28,5),Bi(0,8,10,-5,0,16,24,2,0,6,30,5),Bi(0,8,11,-5,0,17,26,2,0,6,32,5),Bi(0,9,11,-5,0,18,28,2,0,7,34,6),Bi(0,9,12,-6,0,19,29,2,0,7,36,6),Bi(0,10,13,-6,0,20,31,3,0,8,38,7),Bi(0,10,13,-6,0,21,33,3,0,8,40,7),Bi(0,10,14,-6,0,22,35,3,0,8,42,7),Bi(0,11,14,-7,0,23,36,3,0,9,44,8),Bi(0,11,15,-7,0,24,38,3,0,9,46,8)],M2e=N2e,D2e=["duration","easing","delay"],L2e={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ile={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function dX(t){return`${Math.round(t)}ms`}function k2e(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function F2e(t){const e=X({},L2e,t.easing),n=X({},ile,t.duration);return X({getAutoHeightDuration:k2e,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=i;return at(i,D2e),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:dX(s)} ${a} ${typeof l=="string"?l:dX(l)}`).join(",")}},t,{easing:e,duration:n})}const B2e={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},$2e=B2e,H2e=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function HI(t={},...e){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=t,s=at(t,H2e);if(t.vars)throw new Error(ym(18));const a=A2e(r),l=tR(t);let c=Oc(l,{mixins:o2e(l.breakpoints,n),palette:a,shadows:M2e.slice(),typography:I2e(a,i),transitions:F2e(o),zIndex:X({},$2e)});return c=Oc(c,s),c=e.reduce((u,d)=>Oc(u,d),c),c.unstable_sxConfig=X({},JP,s?.unstable_sxConfig),c.unstable_sx=function(d){return eR({sx:d,theme:this})},c}function U2e(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function z2e(t){return parseFloat(t)}const V2e=HI(),mF=V2e;function Tu(){const t=ew(mF);return t[TC]||t}function Ht({props:t,name:e}){return Uae({props:t,name:e,defaultTheme:mF,themeId:TC})}var oR={},HH={exports:{}},hX;function G2e(){return hX||(hX=1,function(t){function e(n,r){if(n==null)return{};var o={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(r.indexOf(i)>=0)continue;o[i]=n[i]}return o}
106t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(HH)),HH.exports}const sle=Kp(XMe),W2e=Kp(KMe),j2e=Kp(rDe),q2e=Kp(aLe),Y2e=Kp(WDe),X2e=Kp(QDe);var nw=hr;Object.defineProperty(oR,"__esModule",{value:!0});var K2e=oR.default=cke;oR.shouldForwardProp=KM;oR.systemDefaultTheme=void 0;var jd=nw(Sae()),X3=nw(G2e()),fX=rke(sle),Q2e=W2e;nw(j2e);nw(q2e);var Z2e=nw(Y2e),J2e=nw(X2e);const eke=["ownerState"],tke=["variants"],nke=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ale(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ale=function(r){return r?n:e})(t)}function rke(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=ale(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}function oke(t){return Object.keys(t).length===0}function ike(t){return typeof t=="string"&&t.charCodeAt(0)>96}function KM(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const ske=oR.systemDefaultTheme=(0,Z2e.default)(),ake=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function xN({defaultTheme:t,theme:e,themeId:n}){return oke(e)?t:e[n]||e}function lke(t){return t?(e,n)=>n[t]:null}function QM(t,e){let{ownerState:n}=e,r=(0,X3.default)(e,eke);const o=typeof t=="function"?t((0,jd.default)({ownerState:n},r)):t;if(Array.isArray(o))return o.flatMap(i=>QM(i,(0,jd.default)({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=(0,X3.default)(o,tke);return i.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,jd.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{n?.[u]!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,jd.default)({ownerState:n},r,n)):l.style))}),a}return o}function cke(t={}){const{themeId:e,defaultTheme:n=ske,rootShouldForwardProp:r=KM,slotShouldForwardProp:o=KM}=t,i=s=>(0,J2e.default)((0,jd.default)({},s,{theme:xN((0,jd.default)({},s,{defaultTheme:n,themeId:e}))}));return i.__mui_systemSx=!0,(s,a={})=>{(0,fX.internal_processStyles)(s,A=>A.filter(_=>!(_!=null&&_.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:h=lke(ake(c))}=a,f=(0,X3.default)(a,nke),p=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,m=d||!1;let y,v=KM;c==="Root"||c==="root"?v=r:c?v=o:ike(s)&&(v=void 0);const b=(0,fX.default)(s,(0,jd.default)({shouldForwardProp:v,label:y},f)),S=A=>typeof A=="function"&&A.__emotion_real!==A||(0,Q2e.isPlainObject)(A)?_=>QM(A,(0,jd.default)({},_,{theme:xN({theme:_.theme,defaultTheme:n,themeId:e})})):A,w=(A,..._)=>{let P=S(A);const R=_?_.map(S):[];l&&h&&R.push(M=>{const L=xN((0,jd.default)({},M,{defaultTheme:n,themeId:e}));if(!L.components||!L.components[l]||!L.components[l].styleOverrides)return null;const F=L.components[l].styleOverrides,$={};return Object.entries(F).forEach(([D,k])=>{$[D]=QM(k,(0,jd.default)({},M,{theme:L}))}),h(M,$)}),l&&!p&&R.push(M=>{var L;const F=xN((0,jd.default)({},M,{defaultTheme:n,themeId:e})),$=F==null||(L=F.components)==null||(L=L[l])==null?void 0:L.variants;return QM({variants:$},(0,jd.default)({},M,{theme:F}))}),m||R.push(i);const O=R.length-_.length;if(Array.isArray(A)&&O>0){const M=new Array(O).fill("");P=[...A,...M],P.raw=[...A.raw,...M]}const N=b(P,...R);return s.muiName&&(N.muiName=s.muiName),N};return b.withConfig&&(w.withConfig=b.withConfig),w}}function lle(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const uke=t=>lle(t)&&t!=="classes",el=uke,dke=K2e({themeId:TC,defaultTheme:mF,rootShouldForwardProp:el}),$e=dke,hke=["theme"];function fke(t){let{theme:e}=t,n=at(t,hke);const r=e[TC];return g(XLe,X({},n,{themeId:r?TC:void 0,theme:r||e}))}const pke=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},pX=pke;function gke(t){return Ft("MuiSvgIcon",t)}Dt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const mke=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],yke=t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root",e!=="inherit"&&`color${ht(e)}`,`fontSize${ht(n)}`]};return Lt(o,gke,r)},vke=$e("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${ht(n.color)}`],e[`fontSize${ht(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,o,i,s,a,l,c,u,d,h,f,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=t.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=t.typography)==null||(s=i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(d=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?d:{action:(f=(t.vars||t).palette)==null||(f=f.action)==null?void 0:f.active,disabled:(p=(t.vars||t).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[e.color]}}),cle=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewB
vendor: 5,106 bytes, line 106
106ox:h="0 0 24 24"}=r,f=at(r,mke),p=C.isValidElement(o)&&o.type==="svg",m=X({},r,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:p}),y={};u||(y.viewBox=h);const v=yke(m);return K(vke,X({as:a,className:Ye(v.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},y,f,p&&o.props,{ownerState:m,children:[p?o.props.children:o,d?g("title",{children:d}):null]}))});cle.muiName="SvgIcon";const Hp=cle;function gt(t,e){function n(r,o){return g(Hp,X({"data-testid":`${e}Icon`,ref:o},r,{children:t}))}return n.muiName=Hp.muiName,C.memo(C.forwardRef(n))}const bke={configure:t=>{dF.configure(t)}},Cke=Object.freeze(Object.defineProperty({__proto__:null,capitalize:ht,createChainedFunction:IL,createSvgIcon:gt,debounce:rR,deprecatedPropType:wLe,isMuiElement:R_,ownerDocument:Ji,ownerWindow:$p,requirePropFactory:ALe,setRef:$I,unstable_ClassNameGenerator:bke,unstable_useEnhancedEffect:Ls,unstable_useId:sd,unsupportedProp:_Le,useControlled:Ka,useEventCallback:mn,useForkRef:Xr,useIsFocusVisible:gF},Symbol.toStringTag,{value:"Module"}));function f0(t){return Ht}function K3(t,e){return K3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},K3(t,e)}function qG(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,K3(t,e)}function Ske(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function Eke(t,e){t.classList?t.classList.add(e):Ske(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function gX(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function xke(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=gX(t.className,e):t.setAttribute("class",gX(t.className&&t.className.baseVal||"",e))}const mX={disabled:!1},RL=qt.createContext(null);var ule=function(e){return e.scrollTop},VT="unmounted",xb="exited",wb="entering",wE="entered",Q3="exiting",Pm=function(t){qG(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=xb,i.appearStatus=wb):l=wE:r.unmountOnExit||r.mountOnEnter?l=VT:l=xb,i.state={status:l},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===VT?{status:xb}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==wb&&s!==wE&&(i=wb):(s===wb||s===wE)&&(i=Q3)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===wb){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:hN.findDOMNode(this);s&&ule(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xb&&this.setState({status:VT})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[hN.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),h=a?d.appear:d.enter;if(!o&&!s||mX.disabled){this.safeSetState({status:wE},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:wb},function(){i.props.onEntering(c,u),i.onTransitionEnd(h,function(){i.safeSetState({status:wE},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:hN.findDOMNode(this);if(!i||mX.disabled){this.safeSetState({status:xb},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Q3},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:xb},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:hN.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===VT)return null;var i=this.props,s=i.children;
vendor: 4,785 bytes, line 106
106i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=at(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return qt.createElement(RL.Provider,{value:null},typeof s=="function"?s(o,a):qt.cloneElement(qt.Children.only(s),a))},e}(qt.Component);Pm.contextType=RL;Pm.propTypes={};function aE(){}Pm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:aE,onEntering:aE,onEntered:aE,onExit:aE,onExiting:aE,onExited:aE};Pm.UNMOUNTED=VT;Pm.EXITED=xb;Pm.ENTERING=wb;Pm.ENTERED=wE;Pm.EXITING=Q3;const yF=Pm;var wke=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return Eke(e,r)})},UH=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return xke(e,r)})},YG=function(t){qG(e,t);function e(){for(var r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1];r.removeClasses(u,"exit"),r.addClass(u,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1],h=d?"appear":"enter";r.addClass(u,h,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1],h=d?"appear":"enter";r.removeClasses(u,h),r.addClass(u,h,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",u=c&&l?l+"-":"",d=c?""+u+a:l[a],h=c?d+"-active":l[a+"Active"],f=c?d+"-done":l[a+"Done"];return{baseClassName:d,activeClassName:h,doneClassName:f}},r}var n=e.prototype;return n.addClass=function(o,i,s){var a=this.getClassNames(i)[s+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;i==="appear"&&s==="done"&&c&&(a+=" "+c),s==="active"&&o&&ule(o),a&&(this.appliedClasses[i][s]=a,wke(o,a))},n.removeClasses=function(o,i){var s=this.appliedClasses[i],a=s.base,l=s.active,c=s.done;this.appliedClasses[i]={},a&&UH(o,a),l&&UH(o,l),c&&UH(o,c)},n.render=function(){var o=this.props;o.classNames;var i=at(o,["classNames"]);return qt.createElement(yF,X({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(qt.Component);YG.defaultProps={classNames:""};YG.propTypes={};const Ake=YG;function Tke(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function XG(t,e){var n=function(i){return e&&C.isValidElement(i)?e(i):i},r=Object.create(null);return t&&C.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function _ke(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var l in e){if(r[l])for(s=0;s<r[l].length;s++){var c=r[l][s];a[r[l][s]]=n(c)}a[l]=n(l)}for(s=0;s<o.length;s++)a[o[s]]=n(o[s]);return a}function Ub(t,e,n){return n[e]!=null?n[e]:t.props[e]}function Ike(t,e){return XG(t.children,function(n){return C.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Ub(n,"appear",t),enter:Ub(n,"enter",t),exit:Ub(n,"exit",t)})})}function Pke(t,e,n){var r=XG(t.children),o=_ke(e,r);return Object.keys(o).forEach(function(i){var s=o[i];if(C.isValidElement(s)){var a=i in e,l=i in r,c=e[i],u=C.isValidElement(c)&&!c.props.in;l&&(!a||u)?o[i]=C.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:Ub(s,"exit",t),enter:Ub(s,"enter",t)}):!l&&a&&!u?o[i]=C.cloneElement(s,{in:!1}):l&&a&&C.isValidElement(c)&&(o[i]=C.cloneElement(s,{onExited:n.bind(null,s),in:c.props.in,exit:Ub(s,"exit",t),enter:Ub(s,"enter",t)}))}}),o}var Rke=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},Oke={component:"div",childFactory:function(e){return e}},KG=function(t){qG(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=i.handleExited.bind(Tke(i));return i.state={contextValue:{isMounting:!0}
106,handleExited:s,firstRender:!0},i}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,i){var s=i.children,a=i.handleExited,l=i.firstRender;return{children:l?Ike(o,a):Pke(o,s,a),firstRender:!1}},n.handleExited=function(o,i){var s=XG(this.props.children);o.key in s||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(a){var l=X({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,s=o.childFactory,a=at(o,["component","childFactory"]),l=this.state.contextValue,c=Rke(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,i===null?qt.createElement(RL.Provider,{value:l},c):qt.createElement(RL.Provider,{value:l},qt.createElement(i,a,c))},e}(qt.Component);KG.propTypes={};KG.defaultProps=Oke;const QG=KG,dle=t=>t.scrollTop;function Y1(t,e){var n,r;const{timeout:o,easing:i,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[e.mode]:i,delay:s.transitionDelay}}function Nke(t){return Ft("MuiCollapse",t)}Dt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Mke=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Dke=t=>{const{orientation:e,classes:n}=t,r={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};
vendor: 5,376 bytes, line 106
106return Lt(r,Nke,n)},Lke=$e("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.orientation],n.state==="entered"&&e.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&e.hidden]}})(({theme:t,ownerState:e})=>X({height:0,overflow:"hidden",transition:t.transitions.create("height")},e.orientation==="horizontal"&&{height:"auto",width:0,transition:t.transitions.create("width")},e.state==="entered"&&X({height:"auto",overflow:"visible"},e.orientation==="horizontal"&&{width:"auto"}),e.state==="exited"&&!e.in&&e.collapsedSize==="0px"&&{visibility:"hidden"})),kke=$e("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(({ownerState:t})=>X({display:"flex",width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),Fke=$e("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(({ownerState:t})=>X({width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),hle=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiCollapse"}),{addEndListener:o,children:i,className:s,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:d,onEntered:h,onEntering:f,onExit:p,onExited:m,onExiting:y,orientation:v="vertical",style:b,timeout:S=ile.standard,TransitionComponent:w=yF}=r,A=at(r,Mke),_=X({},r,{orientation:v,collapsedSize:a}),P=Dke(_),R=Tu(),O=Hb(),N=C.useRef(null),M=C.useRef(),L=typeof a=="number"?`${a}px`:a,F=v==="horizontal",$=F?"width":"height",D=C.useRef(null),k=Xr(n,D),U=ee=>re=>{if(ee){const fe=D.current;re===void 0?ee(fe):ee(fe,re)}},H=()=>N.current?N.current[F?"clientWidth":"clientHeight"]:0,V=U((ee,re)=>{N.current&&F&&(N.current.style.position="absolute"),ee.style[$]=L,d&&d(ee,re)}),q=U((ee,re)=>{const fe=H();N.current&&F&&(N.current.style.position="");const{duration:we,easing:xe}=Y1({style:b,timeout:S,easing:c},{mode:"enter"});if(S==="auto"){const ve=R.transitions.getAutoHeightDuration(fe);ee.style.transitionDuration=`${ve}ms`,M.current=ve}else ee.style.transitionDuration=typeof we=="string"?we:`${we}ms`;ee.style[$]=`${fe}px`,ee.style.transitionTimingFunction=xe,f&&f(ee,re)}),J=U((ee,re)=>{ee.style[$]="auto",h&&h(ee,re)}),Q=U(ee=>{ee.style[$]=`${H()}px`,p&&p(ee)}),se=U(m),oe=U(ee=>{const re=H(),{duration:fe,easing:we}=Y1({style:b,timeout:S,easing:c},{mode:"exit"});if(S==="auto"){const xe=R.transitions.getAutoHeightDuration(re);ee.style.transitionDuration=`${xe}ms`,M.current=xe}else ee.style.transitionDuration=typeof fe=="string"?fe:`${fe}ms`;ee.style[$]=L,ee.style.transitionTimingFunction=we,y&&y(ee)});return g(w,X({in:u,onEnter:V,onEntered:J,onEntering:q,onExit:Q,onExited:se,onExiting:oe,addEndListener:ee=>{S==="auto"&&O.start(M.current||0,ee),o&&o(D.current,ee)},nodeRef:D,timeout:S==="auto"?null:S},A,{children:(ee,re)=>g(Lke,X({as:l,className:Ye(P.root,s,{entered:P.entered,exited:!u&&L==="0px"&&P.hidden}[ee]),style:X({[F?"minWidth":"minHeight"]:L},b),ref:k},re,{ownerState:X({},_,{state:ee}),children:g(kke,{ownerState:X({},_,{state:ee}),className:P.wrapper,ref:N,children:g(Fke,{ownerState:X({},_,{state:ee}),className:P.wrapperInner,children:i})})}))}))});hle.muiSupportAuto=!0;const ZG=hle;function Bke(t){return Ft("MuiPaper",t)}Dt("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 $ke=["className","component","elevation","square","variant"],Hke=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Lt(i,Bke,o)},Uke=$e("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return X({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&X({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${ar("#fff",pX(e.elevation))}, ${ar("#fff",pX(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),zke=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=at(r,$ke),u=X({},r,{component:i,elevation:s,square:a,variant:l}),d=Hke(u);return g(Uke,X({as:i,ownerState:u,className:Ye(d.root,o),ref:n},c))}),To=zke,Vke=C.createContext({}),fle=Vke;function IC(t){return typeof t=="string"}function YE(t,e,n){return t===void 0||IC(t)?e:X({},e,{ownerState:X({},e.ownerState,n)})}const Gke={disableDefaultClasses:!1},Wke=C.createContext(Gke);function jke(t){const{disableDefaultClasses:e}=C.useContext(Wke);return n=>e?"":t(n)}function ple(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEac
vendor: 1,900 bytes, line 106
106h(r=>{n[r]=t[r]}),n}function vF(t,e,n){return typeof t=="function"?t(e,n):t}function yX(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function gle(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const f=Ye(n?.className,i,o?.className,r?.className),p=X({},n?.style,o?.style,r?.style),m=X({},n,o,r);return f.length>0&&(m.className=f),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:void 0}}const s=ple(X({},o,r)),a=yX(r),l=yX(o),c=e(s),u=Ye(c?.className,n?.className,i,o?.className,r?.className),d=X({},c?.style,n?.style,o?.style,r?.style),h=X({},c,n,l,a);return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}const qke=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function ao(t){var e;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=t,s=at(t,qke),a=i?{}:vF(r,o),{props:l,internalRef:c}=gle(X({},s,{externalSlotProps:a})),u=Xr(c,a?.ref,(e=t.additionalProps)==null?void 0:e.ref);return YE(n,X({},l,{ref:u}),o)}const Yke=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Xke=["component","slots","slotProps"],Kke=["component"];function OL(t,e){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:s,internalForwardedProps:a}=e,l=at(e,Yke),{component:c,slots:u={[t]:void 0},slotProps:d={[t]:void 0}}=i,h=at(i,Xke),f=u[t]||r,p=vF(d[t],o),m=gle(X({className:n},l,{externalForwardedProps:t==="root"?h:void 0,externalSlotProps:p})),{props:{component:y},internalRef:v}=m,b=at(m.props,Kke),S=Xr(v,p?.ref,e.ref),w=s?s(b):{},A=X({},o,w),_=t==="root"?y||c:y,P=YE(f,X({},t==="root"&&!c&&!u[t]&&a,t!=="root"&&!u[t]&&a,b,_&&{as:_},{ref:S}),A);
106return Object.keys(w).forEach(R=>{delete P[R]}),[f,P]}function Qke(t){return Ft("MuiAccordion",t)}const Zke=Dt("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),wN=Zke,Jke=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],eFe=f0(),tFe=t=>{const{classes:e,square:n,expanded:r,disabled:o,disableGutters:i}=t;return Lt({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],region:["region"]},Qke,e)},nFe=$e(To,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${wN.region}`]:e.region},e.root,!n.square&&e.rounded,!n.disableGutters&&e.gutters]}})(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${wN.expanded}`]:{"&::before":{opacity:0}
106,"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${wN.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}},({theme:t})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${wN.expanded}`]:{margin:"16px 0"}}}]})),rFe=C.forwardRef(function(e,n){const r=eFe({props:e,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:s=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:h={},slotProps:f={},TransitionComponent:p,TransitionProps:m}=r,y=at(r,Jke),[v,b]=Ka({controlled:c,default:s,name:"Accordion",state:"expanded"}),S=C.useCallback(F=>{b(!v),u&&u(F,!v)},[v,u,b]),[w,...A]=C.Children.toArray(o),_=C.useMemo(()=>({expanded:v,disabled:a,disableGutters:l,toggle:S}),[v,a,l,S]),P=X({},r,{square:d,disabled:a,disableGutters:l,expanded:v}),R=tFe(P),O=X({transition:p},h),N=X({transition:m},f),[M,L]=OL("transition",{elementType:ZG,externalForwardedProps:{slots:O,slotProps:N},ownerState:P});return K(nFe,X({className:Ye(R.root,i),ref:n,ownerState:P,square:d},y,{children:[g(fle.Provider,{value:_,children:w}),g(M,X({in:v,timeout:"auto"},L,{children:g("div",{"aria-labelledby":w.props.id,id:w.props["aria-controls"],role:"region",className:R.region,children:A})}))]}))}),Hv=rFe;function oFe(t){return Ft("MuiAccordionDetails",t)}Dt("MuiAccordionDetails",["root"]);const iFe=["className"],sFe=f0(),aFe=t=>{const{classes:e}=t;return Lt({root:["root"]},oFe,e)},lFe=$e("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({padding:t.spacing(1,2,2)})),cFe=C.forwardRef(function(e,n){const r=sFe({props:e,name:"MuiAccordionDetails"}),{className:o}=r,i=at(r,iFe),s=r,a=aFe(s);return g(lFe,X({className:Ye(a.root,o),ref:n,ownerState:s},i))}),Uv=cFe;function uFe(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:c}=t,[u,d]=C.useState(!1),h=Ye(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),f={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},p=Ye(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&d(!0),C.useEffect(()=>{if(!a&&l!=null){const m=setTimeout(l,c);return()=>{clearTimeout(m)}}},[l,a,c]),g("span",{className:h,style:f,children:g("span",{className:p})})}const dFe=Dt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Zd=dFe,hFe=["center","classes","className"];let bF=t=>t,vX,bX,CX,SX;const Z3=550,fFe=80,pFe=_f(vX||(vX=bF` 107 0% { 108 transform: scale(0); 109 opacity: 0.1; 110 } 111 112 100% { 113 transform: scale(1); 114 opacity: 0.3; 115 } 116`)),gFe=_f(bX||(bX=bF` 117 0% { 118 opacity: 1; 119 } 120 121 100% { 122 opacity: 0; 123 } 124`)),mFe=_f(CX||(CX=bF` 125 0% { 126 transform: scale(1); 127 } 128 129 50% { 130 transform: scale(0.92); 131 } 132 133 100% { 134 transform: scale(1); 135 } 136`)),yFe=$e("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),vFe=$e(uFe,{name:"MuiTouchRipple",slot:"Ripple"})(SX||(SX=bF` 137 opacity: 0; 138 position: absolute; 139 140 &.${0} { 141 opacity: 0.3; 142 transform: scale(1); 143 animation-name: ${0}; 144 animation-duration: ${0}ms; 145 animation-timing-function: ${0}; 146 } 147 148 &.${0} { 149 animation-duration: ${0}ms; 150 } 151 152 & .${0} { 153 opacity: 1; 154 display: block; 155 width: 100%; 156 height: 100%; 157 border-radius: 50%; 158 background-color: currentColor; 159 } 160 161 & .${0} { 162 opacity: 0; 163 animation-name: ${0}; 164 animation-duration: ${0}ms; 165 animation-timing-function: ${0}; 166 } 167 168 & .${0} { 169 position: absolute; 170 /* @noflip */ 171 left: 0px; 172 top: 0; 173 animation-name: ${0}; 174 animation-duration: 2500ms; 175 animation-timing-function: ${0}; 176 animation-iteration-count: infinite; 177 animation-delay: 200ms; 178 } 179`),Zd.rippleVisible,pFe,Z3,({theme:t})=>t.transitions.easing.easeInOut,Zd.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Zd.child,Zd.childLeaving,gFe,Z3,({theme:t})=>t.transitions.easing.easeInOut,Zd.childPulsate,mFe,({theme:t})=>t.transitions.easing.easeInOut),bFe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,a=at(r,hFe),[l,c]=C.useState([]),u=C.useRef(0),d=C.useRef(null);C.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const h=C.useRef(!1),f=Hb(),p=C.useRef(null),m=C.useRef(null),y=C.useCallback(w=>{const{pulsate:A,rippleX:_,rippleY:P,rippleSize:R,cb:O}=w;c(N=>
vendor: 4,762 bytes, line 179
179[...N,g(vFe,{classes:{ripple:Ye(i.ripple,Zd.ripple),rippleVisible:Ye(i.rippleVisible,Zd.rippleVisible),ripplePulsate:Ye(i.ripplePulsate,Zd.ripplePulsate),child:Ye(i.child,Zd.child),childLeaving:Ye(i.childLeaving,Zd.childLeaving),childPulsate:Ye(i.childPulsate,Zd.childPulsate)},timeout:Z3,pulsate:A,rippleX:_,rippleY:P,rippleSize:R},u.current)]),u.current+=1,d.current=O},[i]),v=C.useCallback((w={},A={},_=()=>{})=>{const{pulsate:P=!1,center:R=o||A.pulsate,fakeElement:O=!1}=A;if(w?.type==="mousedown"&&h.current){h.current=!1;return}w?.type==="touchstart"&&(h.current=!0);const N=O?null:m.current,M=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,F,$;if(R||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)L=Math.round(M.width/2),F=Math.round(M.height/2);else{const{clientX:D,clientY:k}=w.touches&&w.touches.length>0?w.touches[0]:w;L=Math.round(D-M.left),F=Math.round(k-M.top)}if(R)$=Math.sqrt((2*M.width**2+M.height**2)/3),$%2===0&&($+=1);else{const D=Math.max(Math.abs((N?N.clientWidth:0)-L),L)*2+2,k=Math.max(Math.abs((N?N.clientHeight:0)-F),F)*2+2;$=Math.sqrt(D**2+k**2)}w!=null&&w.touches?p.current===null&&(p.current=()=>{y({pulsate:P,rippleX:L,rippleY:F,rippleSize:$,cb:_})},f.start(fFe,()=>{p.current&&(p.current(),p.current=null)})):y({pulsate:P,rippleX:L,rippleY:F,rippleSize:$,cb:_})},[o,y,f]),b=C.useCallback(()=>{v({},{pulsate:!0})},[v]),S=C.useCallback((w,A)=>{if(f.clear(),w?.type==="touchend"&&p.current){p.current(),p.current=null,f.start(0,()=>{S(w,A)});return}p.current=null,c(_=>_.length>0?_.slice(1):_),d.current=A},[f]);return C.useImperativeHandle(n,()=>({pulsate:b,start:v,stop:S}),[b,v,S]),g(yFe,X({className:Ye(Zd.root,i.root,s),ref:m},a,{children:g(QG,{component:null,exit:!0,children:l})}))}),CFe=bFe;function SFe(t){return Ft("MuiButtonBase",t)}const EFe=Dt("MuiButtonBase",["root","disabled","focusVisible"]),xFe=EFe,wFe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],AFe=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=Lt({root:["root",e&&"disabled",n&&"focusVisible"]},SFe,o);return n&&r&&(s.root+=` ${r}`),s},TFe=$e("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${xFe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),_Fe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:f="a",onBlur:p,onClick:m,onContextMenu:y,onDragLeave:v,onFocus:b,onFocusVisible:S,onKeyDown:w,onKeyUp:A,onMouseDown:_,onMouseLeave:P,onMouseUp:R,onTouchEnd:O,onTouchMove:N,onTouchStart:M,tabIndex:L=0,TouchRippleProps:F,touchRippleRef:$,type:D}=r,k=at(r,wFe),U=C.useRef(null),H=C.useRef(null),V=Xr(H,$),{isFocusVisibleRef:q,onFocus:J,onBlur:Q,ref:se}=gF(),[oe,ie]=C.useState(!1);c&&oe&&ie(!1),C.useImperativeHandle(o,()=>({focusVisible:()=>{ie(!0),U.current.focus()}}),[]);const[ee,re]=C.useState(!1);C.useEffect(()=>{re(!0)},[]);const fe=ee&&!u&&!c;C.useEffect(()=>{oe&&h&&!u&&ee&&H.current.pulsate()},[u,h,oe,ee]);function we(j,ue,he=d){return mn(Ce=>(ue&&ue(Ce),!he&&H.current&&H.current[j](Ce),!0))}const xe=we("start",_),ve=we("stop",y),Re=we("stop",v),pe=we("stop",R),Be=we("stop",j=>{oe&&j.preventDefault(),P&&P(j)}),ke=we("start",M),Ne=we("stop",O),ot=we("stop",N),ce=we("stop",j=>{Q(j),q.current===!1&&ie(!1),p&&p(j)},!1),Ae=mn(j=>{U.current||(U.current=j.currentTarget),J(j),q.current===!0&&(ie(!0),S&&S(j)),b&&b(j)}),be=()=>{const j=U.current;return l&&l!=="button"&&!(j.tagName==="A"&&j.href)},Se=C.useRef(!1),Pe=mn(j=>{h&&!Se.current&&oe&&H.current&&j.key===" "&&(Se.current=!0,H.current.stop(j,()=>{H.current.start(j)})),j.target===j.currentTarget&&be()&&j.key===" "&&j.preventDefault(),w&&w(j),j.target===j.currentTarget&&be()&&j.key==="Enter"&&!c&&(j.preventDefault(),m&&m(j))}),Ue=mn(j=>{h&&j.key===" "&&H.current&&oe&&!j.defaultPrevented&&(Se.current=!1,H.
179current.stop(j,()=>{H.current.pulsate(j)})),A&&A(j),m&&j.target===j.currentTarget&&be()&&j.key===" "&&!j.defaultPrevented&&m(j)});let _e=l;_e==="button"&&(k.href||k.to)&&(_e=f);const Oe={};_e==="button"?(Oe.type=D===void 0?"button":D,Oe.disabled=c):(!k.href&&!k.to&&(Oe.role="button"),c&&(Oe["aria-disabled"]=c));const ze=Xr(n,se,U),ne=X({},r,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:h,tabIndex:L,focusVisible:oe}),W=AFe(ne);return K(TFe,X({as:_e,className:Ye(W.root,a),ownerState:ne,onBlur:ce,onClick:m,onContextMenu:ve,onFocus:Ae,onKeyDown:Pe,onKeyUp:Ue,onMouseDown:xe,onMouseLeave:Be,onMouseUp:pe,onDragLeave:Re,onTouchEnd:Ne,onTouchMove:ot,onTouchStart:ke,ref:ze,tabIndex:c?-1:L,type:D},Oe,k,{children:[s,fe?g(CFe,X({ref:V,center:i},F)):null]}))}),ad=_Fe;function IFe(t){return Ft("MuiAccordionSummary",t)}const PFe=Dt("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),XE=PFe,RFe=["children","className","expandIcon","focusVisibleClassName","onClick"],OFe=f0(),NFe=t=>{const{classes:e,expanded:n,disabled:r,disableGutters:o}=t;return Lt({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},IFe,e)},MFe=$e(ad,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],e),[`&.${XE.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${XE.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${XE.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${XE.expanded}`]:{minHeight:64}}}]}}),DFe=$e("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(t,e)=>e.content})(({theme:t})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${XE.expanded}`]:{margin:"20px 0"}}}]})),LFe=$e("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(t,e)=>e.expandIconWrapper})(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${XE.expanded}`]:{transform:"rotate(180deg)"}})),kFe=C.forwardRef(function(e,n){const r=OFe({props:e,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:s,focusVisibleClassName:a,onClick:l}=r,c=at(r,RFe),{disabled:u=!1,disableGutters:d,expanded:h,toggle:f}=C.useContext(fle),p=v=>{f&&f(v),l&&l(v)},m=X({},r,{expanded:h,disabled:u,disableGutters:d}),y=NFe(m);return K(MFe,X({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":h,className:Ye(y.root,i),focusVisibleClassName:Ye(y.focusVisible,a),onClick:p,ref:n,ownerState:m},c,{children:[g(DFe,{className:y.content,ownerState:m,children:o}),s&&g(LFe,{className:y.expandIconWrapper,ownerState:m,children:s})]}))}),zv=kFe;function FFe(t){return Ft("MuiAlert",t)}const BFe=Dt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),EX=BFe;function $Fe(t){return Ft("MuiIconButton",t)}const HFe=Dt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),UFe=HFe,zFe=["edge","children","className","color","disabled","disableFocusRipple","size"],VFe=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i}=t,s={root:["root",n&&"disabled",r!=="default"&&`color${ht(r)}`,o&&`edge${ht(o)}`,`size${ht(i)}`]};return Lt(s,$Fe,e)}
vendor: 6,357 bytes, line 179
179,GFe=$e(ad,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${ht(n.color)}`],n.edge&&e[`edge${ht(n.edge)}`],e[`size${ht(n.size)}`]]}})(({theme:t,ownerState:e})=>X({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return X({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&X({color:r?.main},!e.disableRipple&&{"&:hover":X({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${UFe.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),WFe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=r,d=at(r,zFe),h=X({},r,{edge:o,color:a,disabled:l,disableFocusRipple:c,size:u}),f=VFe(h);return g(GFe,X({className:Ye(f.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},d,{ownerState:h,children:i}))}),Di=WFe,jFe=gt(g("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),qFe=gt(g("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),YFe=gt(g("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),XFe=gt(g("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),mle=gt(g("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),KFe=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],QFe=f0(),ZFe=t=>{const{variant:e,color:n,severity:r,classes:o}=t,i={root:["root",`color${ht(n||r)}`,`${e}${ht(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Lt(i,FFe,o)},JFe=$e(To,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${ht(n.color||n.severity)}`]]}})(({theme:t})=>{const e=t.palette.mode==="light"?j1:q1,n=t.palette.mode==="light"?q1:j1;return X({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${EX.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${EX.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:X({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)})}))]})}),eBe=$e("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),tBe=$e("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),xX=$e("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),wX={success:g(jFe,{fontSize:"inherit"}),warning:g(qFe,{fontSize:"inherit"}),error:g(YFe,{fontSize:"inherit"}),info:g(XFe,{fontSize:"inherit"})},nBe=C.forwardRef(function(e,n){const r=QFe({props:e,name:"MuiAlert"}),{action:o,children:i,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:h=wX,onClose:f,role:p="alert",severity:m="success",slotProps:y={},slots:v={},variant:b="standard"}=r,S=at(r,KFe),w=X({},r,{color:l,severity:m,variant:b,colorSeverity:l||m}),A=ZFe(w),_={slots:X({closeButton:c.CloseButton,closeIcon:c.CloseIcon},v),slotProps:X({},u,y)},[P,R]=OL("closeButton",{elementType:Di,externalForwardedProps:_,ownerState:w}),[O,N]=OL("closeIcon",{elementType:mle,externalForwardedProps:_,ownerState:w});return K(JFe,X({role:p,elevation:0,ownerState:w,className:Ye(A.root,s),ref:n},S,{children:[d!==!1?g(eBe,{ownerState:w,className:A.icon,children:d||h[m]||wX[m]}):null,g(tBe,{ownerState:w,className:A.message,children:i}),o!=null?g(xX,{ownerState:w,className:A.action,children:o}):null,o==null&&f?g(xX,{ownerState:w,className:A.action,children:g(P,X({size:"small","aria-label":a,title:a,c
179olor:"inherit",onClick:f},R,{children:g(O,X({fontSize:"small"},N))}))}):null]}))}),rBe=nBe;function oBe(t){return Ft("MuiTypography",t)}Dt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const iBe=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],sBe=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,a={root:["root",i,t.align!=="inherit"&&`align${ht(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Lt(a,oBe,s)},aBe=$e("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${ht(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>X({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),AX={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},lBe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},cBe=t=>lBe[t]||t,uBe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTypography"}),o=cBe(r.color),i=nR(X({},r,{color:o})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:h="body1",variantMapping:f=AX}=i,p=at(i,iBe),m=X({},i,{align:s,color:o,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:h,variantMapping:f}),y=l||(d?"p":f[h]||AX[h])||"span",v=sBe(m);return g(aBe,X({as:y,ref:n,ownerState:m,className:Ye(v.root,a)},p))}),Ke=uBe;function dBe(t){const{badgeContent:e,invisible:n=!1,max:r=99,showZero:o=!1}=t,i=VG({badgeContent:e,max:r});let s=n;n===!1&&e===0&&!o&&(s=!0);const{badgeContent:a,max:l=r}=s?i:t,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}const yle="base";function hBe(t){return`${yle}--${t}`}function fBe(t,e){return`${yle}-${t}-${e}`}function vle(t,e){const n=Fae[e];return n?hBe(n):fBe(t,e)}function pBe(t,e){const n={};return e.forEach(r=>{n[r]=vle(t,r)}),n}function TX(t){return t.substring(2).toLowerCase()}function gBe(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function ble(t){const{children:e,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=t,s=C.useRef(!1),a=C.useRef(null),l=C.useRef(!1),c=C.useRef(!1);C.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Xr(e.ref,a),d=mn(p=>{const m=c.current;c.current=!1;const y=Ji(a.current);if(!l.current||!a.current||"clientX"in p&&gBe(p,y))return;if(s.current){s.current=!1;return}let v;p.composedPath?v=p.composedPath().indexOf(a.current)>-1:v=!y.documentElement.contains(p.target)||a.current.contains(p.target),!v&&(n||!m)&&o(p)}),h=p=>m=>{c.current=!0;const y=e.props[p];y&&y(m)},f={ref:u};return i!==!1&&(f[i]=h(i)),C.useEffect(()=>{if(i!==!1){const p=TX(i),m=Ji(a.current),y=()=>{s.current=!0};return m.addEventListener(p,d),m.addEventListener("touchmove",y),()=>{m.removeEventListener(p,d),m.removeEventListener("touchmove",y)}}},[d,i]),r!==!1&&(f[r]=h(r)),C.useEffect(()=>{if(r!==!1){const p=TX(r),m=Ji(a.current);return m.addEventListener(p,d),()=>{m.removeEventListener(p,d)}}},[d,r]),g(C.Fragment,{children:C.cloneElement(e,f)})}const mBe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function yBe(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function vBe(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function bBe(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||vBe(t))}function CBe(t){const e=[],n=[];
179return Array.from(t.querySelectorAll(mBe)).forEach((r,o)=>{const i=yBe(r);i===-1||!bBe(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function SBe(){return!0}function JG(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=CBe,isEnabled:s=SBe,open:a}=t,l=C.useRef(!1),c=C.useRef(null),u=C.useRef(null),d=C.useRef(null),h=C.useRef(null),f=C.useRef(!1),p=C.useRef(null),m=Xr(e.ref,p),y=C.useRef(null);C.useEffect(()=>{!a||!p.current||(f.current=!n)},[n,a]),C.useEffect(()=>{if(!a||!p.current)return;const S=Ji(p.current);return p.current.contains(S.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),f.current&&p.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),C.useEffect(()=>{if(!a||!p.current)return;const S=Ji(p.current),w=P=>{y.current=P,!(r||!s()||P.key!=="Tab")&&S.activeElement===p.current&&P.shiftKey&&(l.current=!0,u.current&&u.current.focus())},A=()=>{const P=p.current;if(P===null)return;if(!S.hasFocus()||!s()||l.current){l.current=!1;return}if(P.contains(S.activeElement)||r&&S.activeElement!==c.current&&S.activeElement!==u.current)return;if(S.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let R=[];if((S.activeElement===c.current||S.activeElement===u.current)&&(R=i(p.current)),R.length>0){var O,N;const M=!!((O=y.current)!=null&&O.shiftKey&&((N=y.current)==null?void 0:N.key)==="Tab"),L=R[0],F=R[R.length-1];typeof L!="string"&&typeof F!="string"&&(M?F.focus():L.focus())}else P.focus()};S.addEventListener("focusin",A),S.addEventListener("keydown",w,!0);const _=setInterval(()=>{S.activeElement&&S.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(_),S.removeEventListener("focusin",A),S.removeEventListener("keydown",w,!0)}},[n,r,o,s,a,i]);const v=S=>{d.current===null&&(d.current=S.relatedTarget),f.current=!0,h.current=S.target;const w=e.props.onFocus;w&&w(S)},b=S=>{d.current===null&&(d.current=S.relatedTarget),f.current=!0};return K(C.Fragment,{children:[g("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),C.cloneElement(e,{ref:m,onFocus:v}),g("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}function EBe(t){return typeof t=="function"?t():t}const Cle=C.forwardRef(function(e,n){const{children:r,container:o,disablePortal:i=!1}=e,[s,a]=C.useState(null),l=Xr(C.isValidElement(r)?r.ref:null,n);if(Ls(()=>{i||a(EBe(o)||document.body)},[o,i]),Ls(()=>{if(s&&!i)return $I(n,s),()=>{$I(n,null)}},[n,s,i]),i){if(C.isValidElement(r)){const c={ref:l};return C.cloneElement(r,c)}return g(C.Fragment,{children:r})}return g(C.Fragment,{children:s&&Vx.createPortal(r,s)})});function xBe(t){const e=Ji(t);return e.body===t?$p(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function O_(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function _X(t){return parseInt($p(t).getComputedStyle(t).paddingRight,10)||0}function wBe(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function IX(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const a=i.indexOf(s)===-1,l=!wBe(s);a&&l&&O_(s,o)})}function zH(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function ABe(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(xBe(r)){const s=qae(Ji(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_X(r)+s}px`;const a=Ji(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${_X(l)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Ji(r).body;else{const s=r.parentElement,a=$p(r);i=s?.nodeName==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>
179{n.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function TBe(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class _Be{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&O_(e.modalRef,!1);const o=TBe(n);IX(n,e.mount,e.modalRef,o,!0);const i=zH(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=zH(this.containers,i=>i.modals.indexOf(e)!==-1),o=this.containers[r];o.restore||(o.restore=ABe(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=zH(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&O_(e.modalRef,n),IX(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&O_(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function IBe(t){return typeof t=="function"?t():t}function PBe(t){return t?t.props.hasOwnProperty("in"):!1}const RBe=new _Be;function OBe(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=RBe,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=t,h=C.useRef({}),f=C.useRef(null),p=C.useRef(null),m=Xr(p,d),[y,v]=C.useState(!u),b=PBe(l);let S=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(S=!1);const w=()=>Ji(f.current),A=()=>(h.current.modalRef=p.current,h.current.mount=f.current,h.current),_=()=>{o.mount(A(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},P=mn(()=>{const k=IBe(e)||w().body;o.add(A(),k),p.current&&_()}),R=C.useCallback(()=>o.isTopModal(A()),[o]),O=mn(k=>{f.current=k,k&&(u&&R()?_():p.current&&O_(p.current,S))}),N=C.useCallback(()=>{o.remove(A(),S)},[S,o]);C.useEffect(()=>()=>{N()},[N]),C.useEffect(()=>{u?P():(!b||!i)&&N()},[u,N,b,i,P]);const M=k=>U=>{var H;(H=k.onKeyDown)==null||H.call(k,U),!(U.key!=="Escape"||U.which===229||!R())&&(n||(U.stopPropagation(),c&&c(U,"escapeKeyDown")))},L=k=>U=>{var H;
179(H=k.onClick)==null||H.call(k,U),U.target===U.currentTarget&&c&&c(U,"backdropClick")};return{getRootProps:(k={})=>{const U=ple(t);delete U.onTransitionEnter,delete U.onTransitionExited;const H=X({},U,k);return X({role:"presentation"},H,{onKeyDown:M(H),ref:m})},getBackdropProps:(k={})=>{const U=k;return X({"aria-hidden":!0},U,{onClick:L(U),open:u})},getTransitionProps:()=>{const k=()=>{v(!1),s&&s()},U=()=>{v(!0),a&&a(),i&&N()};return{onEnter:IL(k,l?.props.onEnter),onExited:IL(U,l?.props.onExited)}},rootRef:m,portalRef:O,isTopModal:R,exited:y,hasTransition:b}}var bu="top",Sh="bottom",Eh="right",Cu="left",eW="auto",iR=[bu,Sh,Eh,Cu],X1="start",UI="end",NBe="clippingParents",Sle="viewport",tT="popper",MBe="reference",PX=iR.reduce(function(t,e){return t.concat([e+"-"+X1,e+"-"+UI])},[]),Ele=[].concat(iR,[eW]).reduce(function(t,e){return t.concat([e,e+"-"+X1,e+"-"+UI])},[]),DBe="beforeRead",LBe="read",kBe="afterRead",FBe="beforeMain",BBe="main",$Be="afterMain",HBe="beforeWrite",UBe="write",zBe="afterWrite",VBe=[DBe,LBe,kBe,FBe,BBe,$Be,HBe,UBe,zBe];function Up(t){return t?(t.nodeName||"").toLowerCase():null}function ld(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function PC(t){var e=ld(t).Element;return t instanceof e||t instanceof Element}function gh(t){var e=ld(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function tW(t){if(typeof ShadowRoot>"u")return!1;var e=ld(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function GBe(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!gh(i)||!Up(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function WBe(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});
vendor: 15,541 bytes, line 179
179!gh(o)||!Up(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const jBe={name:"applyStyles",enabled:!0,phase:"write",fn:GBe,effect:WBe,requires:["computeStyles"]};function Op(t){return t.split("-")[0]}var oC=Math.max,NL=Math.min,K1=Math.round;function J3(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function xle(){return!/^((?!chrome|android).)*safari/i.test(J3())}function Q1(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&gh(t)&&(o=t.offsetWidth>0&&K1(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&K1(r.height)/t.offsetHeight||1);var s=PC(t)?ld(t):window,a=s.visualViewport,l=!xle()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/o,u=(r.top+(l&&a?a.offsetTop:0))/i,d=r.width/o,h=r.height/i;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function nW(t){var e=Q1(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function wle(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&tW(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bm(t){return ld(t).getComputedStyle(t)}function qBe(t){return["table","td","th"].indexOf(Up(t))>=0}function p0(t){return((PC(t)?t.ownerDocument:t.document)||window.document).documentElement}function CF(t){return Up(t)==="html"?t:t.assignedSlot||t.parentNode||(tW(t)?t.host:null)||p0(t)}function RX(t){return!gh(t)||bm(t).position==="fixed"?null:t.offsetParent}function YBe(t){var e=/firefox/i.test(J3()),n=/Trident/i.test(J3());if(n&&gh(t)){var r=bm(t);if(r.position==="fixed")return null}var o=CF(t);for(tW(o)&&(o=o.host);gh(o)&&["html","body"].indexOf(Up(o))<0;){var i=bm(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function sR(t){for(var e=ld(t),n=RX(t);n&&qBe(n)&&bm(n).position==="static";)n=RX(n);return n&&(Up(n)==="html"||Up(n)==="body"&&bm(n).position==="static")?e:n||YBe(t)||e}function rW(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function N_(t,e,n){return oC(t,NL(e,n))}function XBe(t,e,n){var r=N_(t,e,n);return r>n?n:r}function Ale(){return{top:0,right:0,bottom:0,left:0}}function Tle(t){return Object.assign({},Ale(),t)}function _le(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var KBe=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,Tle(typeof e!="number"?e:_le(e,iR))};function QBe(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Op(n.placement),l=rW(a),c=[Cu,Eh].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!s)){var d=KBe(o.padding,n),h=nW(i),f=l==="y"?bu:Cu,p=l==="y"?Sh:Eh,m=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],y=s[l]-n.rects.reference[l],v=sR(i),b=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,S=m/2-y/2,w=d[f],A=b-h[u]-d[p],_=b/2-h[u]/2+S,P=N_(w,_,A),R=l;n.modifiersData[r]=(e={},e[R]=P,e.centerOffset=P-_,e)}}function ZBe(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||wle(e.elements.popper,o)&&(e.elements.arrow=o))}const JBe={name:"arrow",enabled:!0,phase:"main",fn:QBe,effect:ZBe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z1(t){return t.split("-")[1]}var e$e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function t$e(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:K1(n*o)/o||0,y:K1(r*o)/o||0}}function OX(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=s.x,f=h===void 0?0:h,p=s.y,m=p===void 0?0:p,y=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=y.x,m=y.y;var v=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),S=Cu,w=bu,A=window;if(c){var _=sR(n),P="clientHeight",R="clientWidth";if(_===ld(n)&&(_=p0(n),bm(_).position!=="static"&&a==="absolute"&&(P="scrollHeight",R="scrollWidth")),_=_,o===bu||(o===Cu||o===Eh)&&i===UI){w=Sh;var O=d&&_===A&&A.visualViewport?A.visualViewport.height:_[P];m-=O-r.height,m*=l?1:-1}if(o===Cu||(o===bu||o===Sh)&&i===UI){S=Eh;var N=d&&_===A&&A.visualViewport?A.visualViewport.width:_[R];f-=N-r.width,f*=l?1:-1}}var M=Object.assign({position:a},c&&e$e),L=u===!0?t$e({x:f,y:m},ld(n)):{x:f,y:m};if(f=L.x,m=L.y,l){var F;return Object.assign({},M,(F={},F[w]=b?"0":"",F[S]=v?"0":"",F.transform=(A.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",F))}return Object.assign({},M,(e={},e[w]=b?m+"px":"",e[S]=v?f+"px":"",e.transform="",e))}function n$e(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Op(e.placement),variation:Z1(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,OX(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,OX(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const r$e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:n$e,data:{}};var AN={passive:!0};function o$e(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=ld(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,AN)}),a&&l.addEventListener("resize",n.update,AN),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,AN)}),a&&l.removeEventListener("resize",n.update,AN)}}const i$e={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:o$e,data:{}};var s$e={left:"right",right:"left",bottom:"top",top:"bottom"};function ZM(t){return t.replace(/left|right|bottom|top/g,function(e){return s$e[e]})}var a$e={start:"end",end:"start"};function NX(t){return t.replace(/start|end/g,function(e){return a$e[e]})}function oW(t){var e=ld(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function iW(t){return Q1(p0(t)).left+oW(t).scrollLeft}function l$e(t,e){var n=ld(t),r=p0(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=xle();(c||!c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+iW(t),y:l}}function c$e(t){var e,n=p0(t),r=oW(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=oC(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=oC(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+iW(t),l=-r.scrollTop;return bm(o||n).direction==="rtl"&&(a+=oC(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function sW(t){var e=bm(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Ile(t){return["html","body","#document"].indexOf(Up(t))>=0?t.ownerDocument.body:gh(t)&&sW(t)?t:Ile(CF(t))}function M_(t,e){var n;e===void 0&&(e=[]);var r=Ile(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=ld(r),s=o?[i].concat(i.visualViewport||[],sW(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(M_(CF(s)))}function e4(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function u$e(t,e){var n=Q1(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function MX(t,e,n){return e===Sle?e4(l$e(t,n)):PC(e)?u$e(e,n):e4(c$e(p0(t)))}function d$e(t){var e=M_(CF(t)),n=["absolute","fixed"].indexOf(bm(t).position)>=0,r=n&&gh(t)?sR(t):t;return PC(r)?e.filter(function(o){return PC(o)&&wle(o,r)&&Up(o)!=="body"}):[]}function h$e(t,e,n,r){var o=e==="clippingParents"?d$e(t):[].concat(e),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,c){var u=MX(t,c,r);return l.top=oC(u.top,l.top),l.right=NL(u.right,l.right),l.bottom=NL(u.bottom,l.bottom),l.left=oC(u.left,l.left),l},MX(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ple(t){var e=t.reference,n=t.element,r=t.placement,o=r?Op(r):null,i=r?Z1(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(o){case bu:l={x:s,y:e.y-n.height};break;case Sh:l={x:s,y:e.y+e.height};break;case Eh:l={x:e.x+e.width,y:a};break;case Cu:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=o?rW(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case X1:l[c]=l[c]-(e[u]/2-n[u]/2);break;case UI:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function zI(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,a=n.boundary,l=a===void 0?NBe:a,c=n.rootBoundary,u=c===void 0?Sle:c,d=n.elementContext,h=d===void 0?tT:d,f=n.altBoundary,p=f===void 0?!1:f,m=n.padding,y=m===void 0?0:m,v=Tle(typeof y!="number"?y:_le(y,iR)),b=h===tT?MBe:tT,S=t.rects.popper,w=t.elements[p?b:h],A=h$e(PC(w)?w:w.contextElement||p0(t.elements.popper),l,u,s),_=Q1(t.elements.reference),P=Ple({reference:_,element:S,strategy:"absolute",placement:o}),R=e4(Object.assign({},S,P)),O=h===tT?R:_,N={top:A.top-O.top+v.top,bottom:O.bottom-A.bottom+v.bottom,left:A.left-O.left+v.left,right:O.right-A.right+v.right},M=t.modifiersData.offset;if(h===tT&&M){var L=M[o];Object.keys(N).forEach(function(F){var $=[Eh,Sh].indexOf(F)>=0?1:-1,D=[bu,Sh].indexOf(F)>=0?"y":"x";N[F]+=L[D]*$})}return N}function f$e(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Ele:l,u=Z1(r),d=u?a?PX:PX.filter(function(p){return Z1(p)===u}):iR,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=zI(t,{placement:m,boundary:o,rootBoundary:i,padding:s})[Op(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function p$e(t){if(Op(t)===eW)return[];var e=ZM(t);return[NX(t),e,NX(e)]}function g$e(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,y=e.options.placement,v=Op(y),b=v===y,S=l||(b||!p?[ZM(y)]:p$e(y)),w=[y].concat(S).reduce(function(oe,ie){return oe.concat(Op(ie)===eW?f$e(e,{placement:ie,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ie)},[]),A=e.rects.reference,_=e.rects.popper,P=new Map,R=!0,O=w[0],N=0;N<w.length;N++){var M=w[N],L=Op(M),F=Z1(M)===X1,$=[bu,Sh].indexOf(L)>=0,D=$?"width":"height",k=zI(e,{placement:M,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),U=$?F?Eh:Cu:F?Sh:bu;A[D]>_[D]&&(U=ZM(U));var H=ZM(U),V=[];if(i&&V.push(k[L]<=0),a&&V.push(k[U]<=0,k[H]<=0),V.every(function(oe){return oe})){O=M,R=!1;break}P.set(M,V)}if(R)for(var q=p?3:1,J=function(ie){var ee=w.find(function(re){var fe=P.get(re);if(fe)return fe.slice(0,ie).every(function(we){return we})});if(ee)return O=ee,"break"},Q=q;Q>0;Q--){var se=J(Q);if(se==="break")break}e.placement!==O&&(e.modifiersData[r]._skip=!0,e.placement=O,e.reset=!0)}}const m$e={name:"flip",enabled:!0,phase:"main",fn:g$e,requiresIfExists:["offset"],data:{_skip:!1}};function DX(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function LX(t){return[bu,Eh,Sh,Cu].some(function(e){return t[e]>=0})}function y$e(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=zI(e,{elementContext:"reference"}),a=zI(e,{altBoundary:!0}),l=DX(s,r),c=DX(a,o,i),u=LX(l),d=LX(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const v$e={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:y$e};function b$e(t,e,n){var r=Op(t),o=[Cu,bu].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Cu,Eh].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function C$e(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=Ele.reduce(function(u,d){return u[d]=b$e(d,e.rects,i),u},{}),a=s[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}const S$e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:C$e};function E$e(t){var e=t.state,n=t.name;e.modifiersData[n]=Ple({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const x$e={name:"popperOffsets",enabled:!0,phase:"read",fn:E$e,data:{}};function w$e(t){return t==="x"?"y":"x"}function A$e(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,y=zI(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Op(e.placement),b=Z1(e.placement),S=!b,w=rW(v),A=w$e(w),_=e.modifiersData.popperOffsets,P=e.rects.reference,R=e.rects.popper,O=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,N=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),M=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(_){if(i){var F,$=w==="y"?bu:Cu,D=w==="y"?Sh:Eh,k=w==="y"?"height":"width",U=_[w],H=U+y[$],V=U-y[D],q=f?-R[k]/2:0,J=b===X1?P[k]:R[k],Q=b===X1?-R[k]:-P[k],se=e.elements.arrow,oe=f&&se?nW(se):{width:0,height:0},ie=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ale(),ee=ie[$],re=ie[D],fe=N_(0,P[k],oe[k]),we=S?P[k]/2-q-fe-ee-N.mainAxis:J-fe-ee-N.mainAxis,xe=S?-P[k]/2+q+fe+re+N.mainAxis:Q+fe+re+N.mainAxis,ve=e.elements.arrow&&sR(e.elements.arrow),Re=ve?w==="y"?ve.clientTop||0:ve.clientLeft||0:0,pe=(F=M?.[w])!=null?F:0,Be=U+we-pe-Re,ke=U+xe-pe,Ne=N_(f?NL(H,Be):H,U,f?oC(V,ke):V);_[w]=Ne,L[w]=Ne-U}if(a){var ot,ce=w==="x"?bu:Cu,Ae=w==="x"?Sh:Eh,be=_[A],Se=A==="y"?"height":"width",Pe=be+y[ce],Ue=be-y[Ae],_e=[bu,Cu].indexOf(v)!==-1,Oe=(ot=M?.[A])!=null?ot:0,ze=_e?Pe:be-P[Se]-R[Se]-Oe+N.altAxis,ne=_e?be+P[Se]+R[Se]-Oe-N.altAxis:Ue,W=f&&_e?XBe(ze,be,ne):N_(f?ze:Pe,be,f?ne:Ue);_[A]=W,L[A]=W-be}e.modifiersData[r]=L}}const T$e={name:"preventOverflow",enabled:!0,phase:"main",fn:A$e,requiresIfExists:["offset"]};function _$e(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function I$e(t){return t===ld(t)||!gh(t)?oW(t):_$e(t)}function P$e(t){var e=t.getBoundingClientRect(),n=K1(e.width)/t.offsetWidth||1,r=K1(e.height)/t.offsetHeight||1;return n!==1||r!==1}function R$e(t,e,n){n===void 0&&(n=!1);
vendor: 4,350 bytes, line 179
179var r=gh(e),o=gh(e)&&P$e(e),i=p0(e),s=Q1(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Up(e)!=="body"||sW(i))&&(a=I$e(e)),gh(e)?(l=Q1(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=iW(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function O$e(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&o(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function N$e(t){var e=O$e(t);return VBe.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function M$e(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function D$e(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var kX={placement:"bottom",modifiers:[],strategy:"absolute"};function FX(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function L$e(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?kX:o;return function(a,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},kX,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,f={state:u,setOptions:function(v){var b=typeof v=="function"?v(u.options):v;m(),u.options=Object.assign({},i,u.options,b),u.scrollParents={reference:PC(a)?M_(a):a.contextElement?M_(a.contextElement):[],popper:M_(l)};var S=N$e(D$e([].concat(r,u.options.modifiers)));return u.orderedModifiers=S.filter(function(w){return w.enabled}),p(),f.update()},forceUpdate:function(){if(!h){var v=u.elements,b=v.reference,S=v.popper;if(FX(b,S)){u.rects={reference:R$e(b,sR(S),u.options.strategy==="fixed"),popper:nW(S)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(N){return u.modifiersData[N.name]=Object.assign({},N.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var A=u.orderedModifiers[w],_=A.fn,P=A.options,R=P===void 0?{}:P,O=A.name;typeof _=="function"&&(u=_({state:u,options:R,name:O,instance:f})||u)}}}},update:M$e(function(){return new Promise(function(y){f.forceUpdate(),y(u)})}),destroy:function(){m(),h=!0}};if(!FX(a,l))return f;f.setOptions(c).then(function(y){!h&&c.onFirstUpdate&&c.onFirstUpdate(y)});function p(){u.orderedModifiers.forEach(function(y){var v=y.name,b=y.options,S=b===void 0?{}:b,w=y.effect;if(typeof w=="function"){var A=w({state:u,name:v,instance:f,options:S}),_=function(){};d.push(A||_)}})}function m(){d.forEach(function(y){return y()}),d=[]}return f}}var k$e=[i$e,x$e,r$e,jBe,S$e,m$e,T$e,JBe,v$e],F$e=L$e({defaultModifiers:k$e});const Rle="Popper";function B$e(t){return vle(Rle,t)}pBe(Rle,["root"]);const $$e=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],H$e=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function U$e(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function t4(t){return typeof t=="function"?t():t}function z$e(t){return t.nodeType!==void 0}const V$e=()=>Lt({root:["root"]},jke(B$e)),G$e={},W$e=C.forwardRef(function(e,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:h,slotProps:f={},slots:p={},TransitionProps:m}=e,y=at(e,$$e),v=C.useRef(null),b=Xr(v,n),S=C.useRef(null),w=Xr(S,h),A=C.useRef(w);Ls(()=>{A.current=w},[w]),C.useImperativeHandle(h,()=>S.current,[]);const _=U$e(u,s),[P,R]=C.useState(_),[O,N]=C.useState(t4(o));C.useEffect(()=>{S.current&&S.current.forceUpdate()}),C.useEffect(()=>{o&&N(t4(o))}
179,[o]),Ls(()=>{if(!O||!c)return;const D=H=>{R(H.placement)};let k=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:H})=>{D(H)}}];l!=null&&(k=k.concat(l)),d&&d.modifiers!=null&&(k=k.concat(d.modifiers));const U=F$e(O,v.current,X({placement:_},d,{modifiers:k}));return A.current(U),()=>{U.destroy(),A.current(null)}},[O,a,l,c,d,_]);const M={placement:P};m!==null&&(M.TransitionProps=m);const L=V$e(),F=(r=p.root)!=null?r:"div",$=ao({elementType:F,externalSlotProps:f.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:L.root});return g(F,X({},$,{children:typeof i=="function"?i(M):i}))}),j$e=C.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:h=G$e,popperRef:f,style:p,transition:m=!1,slotProps:y={},slots:v={}}=e,b=at(e,H$e),[S,w]=C.useState(!0),A=()=>{w(!1)},_=()=>{w(!0)};if(!l&&!u&&(!m||S))return null;let P;if(i)P=i;else if(r){const N=t4(r);P=N&&z$e(N)?Ji(N).body:Ji(null).body}const R=!u&&l&&(!m||S)?"none":void 0,O=m?{in:u,onEnter:A,onExited:_}:void 0;return g(Cle,{disablePortal:a,container:P,children:g(W$e,X({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:m?!S:u,placement:d,popperOptions:h,popperRef:f,slotProps:y,slots:v},b,{style:X({position:"fixed",top:0,left:0,display:R},p),TransitionProps:O,children:o}))})}),q$e=["onChange","maxRows","minRows","style","value"];function TN(t){return parseInt(t,10)||0}const Y$e={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function X$e(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const K$e=C.forwardRef(function(e,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a}=e,l=at(e,q$e),{current:c}=C.useRef(a!=null),u=C.useRef(null),d=Xr(n,u),h=C.useRef(null),f=C.useCallback(()=>{const y=u.current,b=$p(y).getComputedStyle(y);if(b.width==="0px")return{outerHeightStyle:0,overflowing:!1};const S=h.current;S.style.width=b.width,S.value=y.value||e.placeholder||"x",S.value.slice(-1)===` 180`&&(S.value+=" ");const w=b.boxSizing,A=TN(b.paddingBottom)+TN(b.paddingTop),_=TN(b.borderBottomWidth)+TN(b.borderTopWidth),P=S.scrollHeight;S.value="x";const R=S.scrollHeight;let O=P;i&&(O=Math.max(Number(i)*R,O)),o&&(O=Math.min(Number(o)*R,O)),O=Math.max(O,R);const N=O+(w==="border-box"?A+_:0),M=Math.abs(O-P)<=1;return{outerHeightStyle:N,overflowing:M}},[o,i,e.placeholder]),p=C.useCallback(()=>{const y=f();if(X$e(y))return;const v=u.current;v.style.height=`${y.outerHeightStyle}px`,v.style.overflow=y.overflowing?"hidden":""},[f]);Ls(()=>{const y=()=>{p()};let v;const b=rR(y),S=u.current,w=$p(S);w.addEventListener("resize",b);let A;return typeof ResizeObserver<"u"&&(A=new ResizeObserver(y),A.observe(S)),()=>{b.clear(),cancelAnimationFrame(v),w.removeEventListener("resize",b),A&&A.disconnect()}},[f,p]),Ls(()=>{p()});const m=y=>{c||p(),r&&r(y)};return K(C.Fragment,{children:[g("textarea",X({value:a,onChange:m,ref:d,rows:i,style:s},l)),g("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:X({},Y$e.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function BX(t){return typeof t.normalize<"u"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function Ole(t={}){const{ignoreAccents:e=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:s=!1}=t;return(a,{inputValue:l,getOptionLabel:c})=>{let u=s?l.trim():l;n&&(u=u.toLowerCase()),e&&(u=BX(u));const d=u?a.filter(h=>{let f=(i||c)(h);return n&&(f=f.toLowerCase()),e&&(f=BX(f)),o==="start"?f.indexOf(u)===0:f.indexOf(u)>-1}):a;return typeof r=="number"?d.slice(0,r):d}}function _N(t,e){for(let n=0;n<t.length;n+=1)if(e(t[n]))return n;return-1}const Q$e=Ole(),$X=5,Z$e=t=>{var e;return t.current!==null&&((e=t.current.parentElement)==null?void 0:e.contains(document.activeElement))};function J$e(t){const{unstable_isActiveElementInListbox:e=Z$e,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:s=!1,clearOnBlur:a=!t.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=t.multiple?[]:null,disableClearable:d=!1,disableCloseOnSelect:h=!1,disabled:f,disabledItemsFocusable:p=!1,disableListWrap:m=!1,filterOptions:y=Q$e,filterSelectedOptions:v=!1,freeSolo:b=!1,getOptionDisabled:S,getOptionKey:w,getOptionLabel:A=yt=>{var pt;return(pt=yt.label)!=null?pt:yt},groupBy:_,handleHomeEndKeys:P=!t.freeSolo,id:R,includeInputInList:O=!1,inputValue:N,isOptionEqualToValue:M=(yt,pt)=>yt===pt,multiple:L=!1,onChange:F,onClose:$,onHighlightChange:D,onInputChange:k,onOpen:U,open:H,openOnFocus:V=!1,options:q,readOnly:J=!1,selectOnFocus:Q=!t.freeSolo,value:se}=t,oe=sd(R);let ie=A;ie=yt=>{const pt=A(yt);return typeof pt!="string"?String(pt):pt};const ee=C.useRef(!1),re=C.useRef(!0),fe=C.useRef(null),we=C.useRef(null),[xe,ve]=C.useState(null),[Re,pe]=C.useState(-1),Be=o?0:-1,ke=C.useRef(Be),[Ne,ot]=Ka({controlled:se,default:u,name:c}
vendor: 9,125 bytes, line 180
180),[ce,Ae]=Ka({controlled:N,default:"",name:c,state:"inputValue"}),[be,Se]=C.useState(!1),Pe=C.useCallback((yt,pt)=>{if(!(L?Ne.length<pt.length:pt!==null)&&!a)return;let $t;if(L)$t="";else if(pt==null)$t="";else{const Pn=ie(pt);$t=typeof Pn=="string"?Pn:""}ce!==$t&&(Ae($t),k&&k(yt,$t,"reset"))},[ie,ce,L,k,Ae,a,Ne]),[Ue,_e]=Ka({controlled:H,default:!1,name:c,state:"open"}),[Oe,ze]=C.useState(!0),ne=!L&&Ne!=null&&ce===ie(Ne),W=Ue&&!J,j=W?y(q.filter(yt=>!(v&&(L?Ne:[Ne]).some(pt=>pt!==null&&M(yt,pt)))),{inputValue:ne&&Oe?"":ce,getOptionLabel:ie}):[],ue=VG({filteredOptions:j,value:Ne,inputValue:ce});C.useEffect(()=>{const yt=Ne!==ue.value;be&&!yt||b&&!yt||Pe(null,Ne)},[Ne,Pe,be,ue.value,b]);const he=Ue&&j.length>0&&!J,Ce=mn(yt=>{yt===-1?fe.current.focus():xe.querySelector(`[data-tag-index="${yt}"]`).focus()});C.useEffect(()=>{L&&Re>Ne.length-1&&(pe(-1),Ce(-1))},[Ne,L,Re,Ce]);function Ie(yt,pt){if(!we.current||yt<0||yt>=j.length)return-1;let Xt=yt;for(;;){const $t=we.current.querySelector(`[data-option-index="${Xt}"]`),Pn=p?!1:!$t||$t.disabled||$t.getAttribute("aria-disabled")==="true";if($t&&$t.hasAttribute("tabindex")&&!Pn)return Xt;if(pt==="next"?Xt=(Xt+1)%j.length:Xt=(Xt-1+j.length)%j.length,Xt===yt)return-1}}const et=mn(({event:yt,index:pt,reason:Xt="auto"})=>{if(ke.current=pt,pt===-1?fe.current.removeAttribute("aria-activedescendant"):fe.current.setAttribute("aria-activedescendant",`${oe}-option-${pt}`),D&&D(yt,pt===-1?null:j[pt],Xt),!we.current)return;const $t=we.current.querySelector(`[role="option"].${n}-focused`);$t&&($t.classList.remove(`${n}-focused`),$t.classList.remove(`${n}-focusVisible`));let Pn=we.current;if(we.current.getAttribute("role")!=="listbox"&&(Pn=we.current.parentElement.querySelector('[role="listbox"]')),!Pn)return;if(pt===-1){Pn.scrollTop=0;return}const an=we.current.querySelector(`[data-option-index="${pt}"]`);if(an&&(an.classList.add(`${n}-focused`),Xt==="keyboard"&&an.classList.add(`${n}-focusVisible`),Pn.scrollHeight>Pn.clientHeight&&Xt!=="mouse"&&Xt!=="touch")){const tr=an,Ra=Pn.clientHeight+Pn.scrollTop,Oa=tr.offsetTop+tr.offsetHeight;Oa>Ra?Pn.scrollTop=Oa-Pn.clientHeight:tr.offsetTop-tr.offsetHeight*(_?1.3:0)<Pn.scrollTop&&(Pn.scrollTop=tr.offsetTop-tr.offsetHeight*(_?1.3:0))}}),je=mn(({event:yt,diff:pt,direction:Xt="next",reason:$t="auto"})=>{if(!W)return;const an=Ie((()=>{const tr=j.length-1;if(pt==="reset")return Be;if(pt==="start")return 0;if(pt==="end")return tr;const Ra=ke.current+pt;return Ra<0?Ra===-1&&O?-1:m&&ke.current!==-1||Math.abs(pt)>1?0:tr:Ra>tr?Ra===tr+1&&O?-1:m||Math.abs(pt)>1?tr:0:Ra})(),Xt);if(et({index:an,reason:$t,event:yt}),r&&pt!=="reset")if(an===-1)fe.current.value=ce;else{const tr=ie(j[an]);fe.current.value=tr,tr.toLowerCase().indexOf(ce.toLowerCase())===0&&ce.length>0&&fe.current.setSelectionRange(ce.length,tr.length)}}),it=()=>{const yt=(pt,Xt)=>{const $t=pt?ie(pt):"",Pn=Xt?ie(Xt):"";return $t===Pn};if(ke.current!==-1&&ue.filteredOptions&&ue.filteredOptions.length!==j.length&&ue.inputValue===ce&&(L?Ne.length===ue.value.length&&ue.value.every((pt,Xt)=>ie(Ne[Xt])===ie(pt)):yt(ue.value,Ne))){const pt=ue.filteredOptions[ke.current];if(pt)return _N(j,Xt=>ie(Xt)===ie(pt))}return-1},xt=C.useCallback(()=>{if(!W)return;const yt=it();if(yt!==-1){ke.current=yt;return}const pt=L?Ne[0]:Ne;if(j.length===0||pt==null){je({diff:"reset"});return}if(we.current){if(pt!=null){const Xt=j[ke.current];if(L&&Xt&&_N(Ne,Pn=>M(Xt,Pn))!==-1)return;const $t=_N(j,Pn=>M(Pn,pt));$t===-1?je({diff:"reset"}):et({index:$t});return}if(ke.current>=j.length-1){et({index:j.length-1});return}et({index:ke.current})}},[j.length,L?!1:Ne,v,je,et,W,ce,L]),rt=mn(yt=>{$I(we,yt),yt&&xt()});C.useEffect(()=>{xt()},[xt]);const Bt=yt=>{Ue||(_e(!0),ze(!0),U&&U(yt))},dn=(yt,pt)=>{Ue&&(_e(!1),$&&$(yt,pt))},kn=(yt,pt,Xt,$t)=>{if(L){if(Ne.length===pt.length&&Ne.every((Pn,an)=>Pn===pt[an]))return}else if(Ne===pt)return;F&&F(yt,pt,Xt,$t),ot(pt)},jn=C.useRef(!1),Cr=(yt,pt,Xt="selectOption",$t="options")=>{let Pn=Xt,an=pt;if(L){an=Array.isArray(Ne)?Ne.slice():[];const tr=_N(an,Ra=>M(pt,Ra));tr===-1?an.push(pt):$t!=="freeSolo"&&(an.splice(tr,1),Pn="removeOption")}Pe(yt,an),kn(yt,an,Pn,{option:pt}),!h&&(!yt||!yt.ctrlKey&&!yt.metaKey)&&dn(yt,Pn),(s===!0||s==="touch"&&jn.current||s==="mouse"&&!jn.current)&&fe.current.blur()};function Xn(yt,pt){if(yt===-1)return-1;let Xt=yt;for(;;){if(pt==="next"&&Xt===Ne.length||pt==="previous"&&Xt===-1)return-1;const $t=xe.querySelector(`[data-tag-index="${Xt}"]`);if(!$t||!$t.hasAttribute("tabindex")||$t.disabled||$t.getAttribute("aria-disabled")==="true")Xt+=pt==="next"?1:-1;else return Xt}}const Wo=(yt,pt)=>{if(!L)return;ce===""&&dn(yt,"toggleInput");let Xt=Re;Re===-1?ce===""&&pt==="previous"&&(Xt=Ne.length-1):(Xt+=pt==="next"?1:-1,Xt<0&&(Xt=0),Xt===Ne.length&&(Xt=-1)),Xt=Xn(Xt,pt),pe(Xt),Ce(Xt)},jo=yt=>{ee.current=!0,Ae(""),k&&k(yt,"","clear"),kn(yt,L?[]:null,"clear")},ri=yt=>pt=>{if(yt.onKeyDown&&yt.onKeyDown(pt),!pt.defaultMuiPrevented&&(Re!==-1&&["ArrowLeft","ArrowRight"].indexOf(pt.key)===-1&&(pe(-1),Ce(-1)),pt.which!==229))switch(pt.key){case"Home":W&&P&&(pt.preventDefault(),je({diff:"start",direction:"next",reason:"keyboard",event:pt}));break;case"End":W&&P&&(pt.preventDefault(),je({diff:"end",direction:"previous",reason:"keyboard",event:pt}));break;case"PageUp":pt.preventDefault(),je({diff:-$X,direction:"previous",reason:"keyboard",event:pt}),Bt(pt);break;case"PageDown":pt.preventDefault(),je({diff:$X,direction:"next",reason:"keyboard",event:pt}),Bt(pt);break;case"ArrowDown":pt.preventDefault(),je({diff:1,direction:"next",reason:"keyboard",event:pt}),Bt(pt);break;case"ArrowUp":pt.preventDefault(),je({diff:-1,direction:"previous",reason:"keyboard",event:pt}),Bt(pt);break;case"ArrowLeft":Wo(pt,"previous");break;case"ArrowRight":Wo(pt,"next");break;case"Enter":if(ke.current!==-1&&W){const Xt=j[ke.current],$t=S?S(Xt):!1;if(pt.preventDefault(),$t)return;Cr(pt,Xt,"selectOption"),r&&fe.current.setSelectionRange(fe.current.value.length,fe.current.value.length)}else b&&ce!==""&&ne===!1&&(L&&pt.preventDefault(),Cr(pt,ce,"createOption","freeSolo"));break;case"Escape":W?(pt.preventDefault(),pt.stopPropagation(),dn(pt,"escape")):l&&(ce!==""||L&&Ne.length>0)&&(pt.preventDefault(),pt.stopPropagation(),jo(pt));break;case"Backspace":if(L&&!J&&ce===""&&Ne.length>0){const Xt=Re===-1?Ne.length-1:Re,$t=Ne.slice();$t.splice(Xt,1),kn(pt,$t,"removeOption",{option:Ne[Xt]})}break;case"Delete":if(L&&!J&&ce===""&&Ne.length>0&&Re!==-1){const Xt=Re,$t=Ne.slice();$t.splice(Xt,1),kn(pt,$t,"removeOption",{option:Ne[Xt]})}break}},Pu=yt=>{Se(!0),V&&!ee.current&&Bt(yt)},ta=yt=>{if(e(we)){fe.current.focus();return}Se(!1),re.current=!0,ee.current=!1,i&&ke.current!==-1&&W?Cr(yt,j[ke.current],"blur"):i&&b&&ce!==""?Cr(yt,ce,"blur","freeSolo"):a&&Pe(yt,Ne),dn(yt,"blur")},oi=yt=>{const pt=yt.target.value;ce!==pt&&(Ae(pt),ze(!1),k&&k(yt,pt,"input")),pt===""?!d&&!L&&kn(yt,null,"clear"):Bt(yt)},Qr=yt=>{const pt=Number(yt.currentTarget.getAttribute("data-option-index"));ke.current!==pt&&et({event:yt,index:pt,reason:"mouse"})},ft=yt=>{et({event:yt,index:Number(yt.currentTarget.getAttribute("data-option-index")),reason:"touch"}),jn.current=!0},Ot=yt=>{const pt=Number(yt.currentTarget.getAttribute("data-option-index"));Cr(yt,j[pt],"selectOption"),jn.current=!1},Wt=yt=>pt=>{const Xt=Ne.slice();Xt.splice(yt,1),kn(pt,Xt,"removeOption",{option:Ne[yt]})},sn=yt=>{Ue?dn(yt,"toggleInput"):Bt(yt)},Jt=yt=>{yt.currentTarget.contains(yt.target)&&yt.target.getAttribute("id")!==oe&&yt.preventDefault()},wn=yt=>{yt.currentTarget.contains(yt.target)&&(fe.current.focus(),Q&&re.current&&fe.current.selectionEnd-fe.current.selectionStart===0&&fe.current.select(),re.current=!1)},Sr=yt=>{!f&&(ce===""||!Ue)&&sn(yt)};let ii=b&&ce.length>0;ii=ii||(L?Ne.length>0:Ne!==null);let ol=j;return _&&(ol=j.reduce((yt,pt,Xt)=>{const $t=_(pt);return yt.length>0&&yt[yt.length-1].group===$t?yt[yt.length-1].options.push(pt):yt.push({key:Xt,index:Xt,group:$t,options:[pt]}),yt},[])),f&&be&&ta(),{getRootProps:(yt={})=>X({"aria-owns":he?`${oe}-listbox`:null},yt,{onKeyDown:ri(yt),onMouseDown:Jt,onClick:wn}),getInputLabelProps:()=>({id:`${oe}-label`,htmlFor:oe}),getInputProps:()=>({id:oe,value:ce,onBlur:ta,onFocus:Pu,onChange:oi,onMouseDown:Sr,"aria-activedescendant":W?"":null,"aria-autocomplete":r?"both":"list","aria-controls":he?`${oe}-listbox`:void 0,"aria-expanded":he,autoComplete:"off",ref:fe,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:f}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:jo}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:sn}),getTagProps:({index:yt})=>X({key:yt,"data-tag-index":yt,tabIndex:-1},!J&&{onDelete:Wt(yt)}),getListboxProps:()=>({role:"listbox",id:`${oe}-listbox`,"aria-labelledby":`${oe}-label`,ref:rt,onMouseDown:yt=>{yt.preventDefault()}}),getOptionProps:({index:yt,option:pt})=>{var Xt;const $t=(L?Ne:[Ne]).some(an=>an!=null&&M(pt,an)),Pn=S?S(pt):!1;return{key:(Xt=w?.(pt))!=null?Xt:ie(pt),tabIndex:-1,role:"option",id:`${oe}-option-${yt}`,onMouseMove:Qr,onClick:Ot,onTouchStart:ft,"data-option-index":yt,"aria-disabled":Pn,"aria-selected":$t}}
vendor: 6,941 bytes, line 180
180,id:oe,inputValue:ce,value:Ne,dirty:ii,expanded:W&&xe,popupOpen:W,focused:be||Re!==-1,anchorEl:xe,setAnchorEl:ve,focusedTag:Re,groupedOptions:ol}}var aW={};Object.defineProperty(aW,"__esModule",{value:!0});var Nle=aW.default=void 0,eHe=nHe(C),tHe=sle;function Mle(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Mle=function(r){return r?n:e})(t)}function nHe(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=Mle(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}function rHe(t){return Object.keys(t).length===0}function oHe(t=null){const e=eHe.useContext(tHe.ThemeContext);return!e||rHe(e)?t:e}Nle=aW.default=oHe;const iHe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],sHe=$e(j$e,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),aHe=C.forwardRef(function(e,n){var r;const o=Nle(),i=Ht({props:e,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:m,popperOptions:y,popperRef:v,transition:b,slots:S,slotProps:w}=i,A=at(i,iHe),_=(r=S?.root)!=null?r:l?.Root,P=X({anchorEl:s,container:u,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:m,popperOptions:y,popperRef:v,transition:b},A);return g(sHe,X({as:a,direction:o?.direction,slots:{root:_},slotProps:w??c},P,{ref:n}))}),g0=aHe;function lHe(t){return Ft("MuiListSubheader",t)}Dt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const cHe=["className","color","component","disableGutters","disableSticky","inset"],uHe=t=>{const{classes:e,color:n,disableGutters:r,inset:o,disableSticky:i}=t,s={root:["root",n!=="default"&&`color${ht(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Lt(s,lHe,e)},dHe=$e("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${ht(n.color)}`],!n.disableGutters&&e.gutters,n.inset&&e.inset,!n.disableSticky&&e.sticky]}})(({theme:t,ownerState:e})=>X({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},e.color==="primary"&&{color:(t.vars||t).palette.primary.main},e.color==="inherit"&&{color:"inherit"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.inset&&{paddingLeft:72},!e.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),Dle=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiListSubheader"}),{className:o,color:i="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1}=r,u=at(r,cHe),d=X({},r,{color:i,component:s,disableGutters:a,disableSticky:l,inset:c}),h=uHe(d);return g(dHe,X({as:s,className:Ye(h.root,o),ref:n,ownerState:d},u))});Dle.muiSkipListHighlight=!0;const hHe=Dle,fHe=gt(g("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function pHe(t){return Ft("MuiChip",t)}const gHe=Dt("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),ho=gHe,mHe=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],yHe=t=>{const{classes:e,disabled:n,size:r,color:o,iconColor:i,onDelete:s,clickable:a,variant:l}=t,c={root:["root",l,n&&"disabled",`size${ht(r)}`,`color${ht(o)}`,a&&"clickable",a&&`clickableColor${ht(o)}`,s&&"deletable",s&&`deletableColor${ht(o)}`,`${l}${ht(o)}`],label:["label",`label${ht(r)}`],avatar:["avatar",`avatar${ht(r)}`,`avatarColor${ht(o)}`],icon:["icon",`icon${ht(r)}`,`iconColor${ht(i)}`],deleteIcon:["deleteIcon",`deleteIcon${ht(r)}`,`deleteIconColor${ht(o)}`,`deleteIcon${ht(l)}Color${ht(o)}`]};return Lt(c,pHe,e)},vHe=$e("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:o,clickable:i,onDelete:s,size:a,variant:l}=n;return[{[`& .${ho.avatar}`]:e.avatar},{[`& .${ho.avatar}`]:e[`avatar${ht(a)}`]},{[`& .${ho.avatar}`]:e[`avatarColor${ht(r)}`]},{[`& .${ho.icon}`]:e.icon},{[`& .${ho.icon}`]:e[`icon${ht(a)}`]},{[`& .${ho.icon}`]:e[`iconColor${ht(o)}`]},{[`& .${ho.deleteIcon}`]:e.deleteIcon},{[`& .${ho.deleteIcon}`]:e[`deleteIcon${ht(a)}`]},{[`& .${ho.deleteIcon}`]:e[`deleteIconColor${ht(r)}`]},{[`& .${ho.deleteIcon}`]:e[`deleteIcon${ht(l)}Color${ht(r)}`]},e.root,e[`size${ht(a)}`],e[`color${ht(r)}`],i&&e.clickable,i&&r!=="default"&&e[`clickableColor${ht(r)})`],s&&e.deletable,s&&r!=="default"&&e[`deletableColor${ht(r)}`],e[l],e[`${l}${ht(r)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return X({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${ho.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${ho.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:n,fontSize:t.typography.pxToRem(12)},[`& .${ho.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${ho.avatarColorSecondary}
180`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${ho.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${ho.icon}`]:X({marginLeft:5,marginRight:-6},e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},e.iconColor===e.color&&X({color:t.vars?t.vars.palette.Chip.defaultIconColor:n},e.color!=="default"&&{color:"inherit"})),[`& .${ho.deleteIcon}`]:X({WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:ar(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:ar(t.palette.text.primary,.4)}},e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},e.color!=="default"&&{color:t.vars?`rgba(${t.vars.palette[e.color].contrastTextChannel} / 0.7)`:ar(t.palette[e.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].contrastText}})},e.size==="small"&&{height:24},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.onDelete&&{[`&.${ho.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ar(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},e.onDelete&&e.color!=="default"&&{[`&.${ho.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}})},({theme:t,ownerState:e})=>X({},e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ar(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${ho.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ar(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},e.clickable&&e.color!=="default"&&{[`&:hover, &.${ho.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}}),({theme:t,ownerState:e})=>X({},e.variant==="outlined"&&{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${ho.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${ho.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${ho.avatar}`]:{marginLeft:4},[`& .${ho.avatarSmall}`]:{marginLeft:2},[`& .${ho.icon}`]:{marginLeft:4},[`& .${ho.iconSmall}`]:{marginLeft:2},[`& .${ho.deleteIcon}`]:{marginRight:5},[`& .${ho.deleteIconSmall}`]:{marginRight:3}},e.variant==="outlined"&&e.color!=="default"&&{color:(t.vars||t).palette[e.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:ar(t.palette[e.color].main,.7)}`,[`&.${ho.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(t.palette[e.color].main,t.palette.action.hoverOpacity)},[`&.${ho.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.focusOpacity})`:ar(t.palette[e.color].main,t.palette.action.focusOpacity)},[`& .${ho.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:ar(t.palette[e.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].main}}})),bHe=$e("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${ht(r)}`]]}})(({ownerState:t})=>X({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},t.variant==="outlined"&&{paddingLeft:11,paddingRight:11},t.size==="small"&&{paddingLeft:8,paddingRight:8},t.size==="small"&&t.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function HX(t){return t.key==="Backspace"||t.key==="Delete"}const CHe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:h,onClick:f,onDelete:p,onKeyDown:m,onKeyUp:y,size:v="medium",variant:b="filled",tabIndex:S,skipFocusWhenDisabled:w=!1}=r,A=at(r,mHe),_=C.useRef(null),P=Xr(_,n),R=V=>{V.stopPropagation(),p&&p(V)},O=V=>{V.currentTarget===V.target&&HX(V)&&V.preventDefault(),m&&m(V)},N=V=>{V.currentTarget===V.target&&(p&&HX(V)?p(V):V.key==="Escape"&&_.current&&_.current.blur()),y&&y(V)},M=s!==!1&&f?!0:s,L=M||p?ad:l||"div",F=X({},r,{component:L,disabled:u,size:v,color:a,iconColor:C.isValidElement(d)&&d.props.color||a,onDelete:!!p,clickable:M,variant:b}
vendor: 5,165 bytes, line 180
180),$=yHe(F),D=L===ad?X({component:l||"div",focusVisibleClassName:$.focusVisible},p&&{disableRipple:!0}):{};let k=null;p&&(k=c&&C.isValidElement(c)?C.cloneElement(c,{className:Ye(c.props.className,$.deleteIcon),onClick:R}):g(fHe,{className:Ye($.deleteIcon),onClick:R}));let U=null;o&&C.isValidElement(o)&&(U=C.cloneElement(o,{className:Ye($.avatar,o.props.className)}));let H=null;return d&&C.isValidElement(d)&&(H=C.cloneElement(d,{className:Ye($.icon,d.props.className)})),K(vHe,X({as:L,className:Ye($.root,i),disabled:M&&u?!0:void 0,onClick:f,onKeyDown:O,onKeyUp:N,ref:P,tabIndex:w&&u?-1:S,ownerState:F},D,A,{children:[U||H,g(bHe,{className:Ye($.label),ownerState:F,children:h}),k]}))}),m0=CHe;function y0({props:t,states:e,muiFormControl:n}){return e.reduce((r,o)=>(r[o]=t[o],n&&typeof t[o]>"u"&&(r[o]=n[o]),r),{})}const SHe=C.createContext(void 0),SF=SHe;function Zp(){return C.useContext(SF)}function Lle(t){return g(YDe,X({},t,{defaultTheme:mF,themeId:TC}))}function UX(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function ML(t,e=!1){return t&&(UX(t.value)&&t.value!==""||e&&UX(t.defaultValue)&&t.defaultValue!=="")}function EHe(t){return t.startAdornment}function xHe(t){return Ft("MuiInputBase",t)}const wHe=Dt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Wa=wHe,AHe=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],EF=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${ht(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},xF=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},THe=t=>{const{classes:e,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:h,startAdornment:f,type:p}=t,m={root:["root",`color${ht(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&h!=="medium"&&`size${ht(h)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",p==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return Lt(m,xHe,e)},wF=$e("div",{name:"MuiInputBase",slot:"Root",overridesResolver:EF})(({theme:t,ownerState:e})=>X({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Wa.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&X({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),AF=$e("input",{name:"MuiInputBase",slot:"Input",overridesResolver:xF})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=X({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},i=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return X({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Wa.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Wa.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}
180),_He=g(Lle,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),IHe=C.forwardRef(function(e,n){var r;const o=Ht({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:h,disableInjectingGlobalStyles:f,endAdornment:p,fullWidth:m=!1,id:y,inputComponent:v="input",inputProps:b={},inputRef:S,maxRows:w,minRows:A,multiline:_=!1,name:P,onBlur:R,onChange:O,onClick:N,onFocus:M,onKeyDown:L,onKeyUp:F,placeholder:$,readOnly:D,renderSuffix:k,rows:U,slotProps:H={},slots:V={},startAdornment:q,type:J="text",value:Q}=o,se=at(o,AHe),oe=b.value!=null?b.value:Q,{current:ie}=C.useRef(oe!=null),ee=C.useRef(),re=C.useCallback(W=>{},[]),fe=Xr(ee,S,b.ref,re),[we,xe]=C.useState(!1),ve=Zp(),Re=y0({props:o,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Re.focused=ve?ve.focused:we,C.useEffect(()=>{!ve&&h&&we&&(xe(!1),R&&R())},[ve,h,we,R]);const pe=ve&&ve.onFilled,Be=ve&&ve.onEmpty,ke=C.useCallback(W=>{ML(W)?pe&&pe():Be&&Be()},[pe,Be]);Ls(()=>{ie&&ke({value:oe})},[oe,ke,ie]);const Ne=W=>{if(Re.disabled){W.stopPropagation();return}M&&M(W),b.onFocus&&b.onFocus(W),ve&&ve.onFocus?ve.onFocus(W):xe(!0)},ot=W=>{R&&R(W),b.onBlur&&b.onBlur(W),ve&&ve.onBlur?ve.onBlur(W):xe(!1)},ce=(W,...j)=>{if(!ie){const ue=W.target||ee.current;if(ue==null)throw new Error(ym(1));ke({value:ue.value})}b.onChange&&b.onChange(W,...j),O&&O(W,...j)};C.useEffect(()=>{ke(ee.current)},[]);const Ae=W=>{ee.current&&W.currentTarget===W.target&&ee.current.focus(),N&&N(W)};let be=v,Se=b;_&&be==="input"&&(U?Se=X({type:void 0,minRows:U,maxRows:U},Se):Se=X({type:void 0,maxRows:w,minRows:A},Se),be=K$e);const Pe=W=>{ke(W.animationName==="mui-auto-fill-cancel"?ee.current:{value:"x"})};C.useEffect(()=>{ve&&ve.setAdornedStart(!!q)},[ve,q]);const Ue=X({},o,{color:Re.color||"primary",disabled:Re.disabled,endAdornment:p,error:Re.error,focused:Re.focused,formControl:ve,fullWidth:m,hiddenLabel:Re.hiddenLabel,multiline:_,size:Re.size,startAdornment:q,type:J}),_e=THe(Ue),Oe=V.root||c.Root||wF,ze=H.root||u.root||{},ne=V.input||c.Input||AF;return Se=X({},Se,(r=H.input)!=null?r:u.input),K(C.Fragment,{children:[!f&&_He,K(Oe,X({},ze,!IC(Oe)&&{ownerState:X({},Ue,ze.ownerState)},{ref:n,onClick:Ae},se,{className:Ye(_e.root,ze.className,l,D&&"MuiInputBase-readOnly"),children:[q,g(SF.Provider,{value:null,children:g(ne,X({ownerState:Ue,"aria-invalid":Re.error,"aria-describedby":i,autoComplete:s,autoFocus:a,defaultValue:d,disabled:Re.disabled,id:y,onAnimationStart:Pe,name:P,placeholder:$,readOnly:D,required:Re.required,rows:U,value:oe,onKeyDown:L,onKeyUp:F,type:J},Se,!IC(ne)&&{as:be,ownerState:X({},Ue,Se.ownerState)},{ref:fe,className:Ye(_e.input,Se.className,D&&"MuiInputBase-readOnly"),onBlur:ot,onChange:ce,onFocus:Ne}))}),p,k?k(X({},Re,{startAdornment:q})):null]}))]})}),QC=IHe;function PHe(t){return Ft("MuiInput",t)}const RHe=X({},Wa,Dt("MuiInput",["root","underline","input"])),jy=RHe;function OHe(t){return Ft("MuiOutlinedInput",t)}const NHe=X({},Wa,Dt("MuiOutlinedInput",["root","notchedOutline","input"])),cp=NHe;function MHe(t){return Ft("MuiFilledInput",t)}const DHe=X({},Wa,Dt("MuiFilledInput",["root","underline","input"])),ju=DHe,kle=gt(g("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function LHe(t){return Ft("MuiAutocomplete",t)}const kHe=Dt("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","
180input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),Rr=kHe;var zX,VX;const FHe=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],BHe=["ref"],$He=["key"],HHe=["key"],UHe=f0(),zHe=t=>{const{classes:e,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:s,hasPopupIcon:a,inputFocused:l,popupOpen:c,size:u}=t,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",s&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${ht(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Lt(d,LHe,e)},VHe=$e("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:s,size:a}=n;return[{[`& .${Rr.tag}`]:e.tag},{[`& .${Rr.tag}`]:e[`tagSize${ht(a)}`]},{[`& .${Rr.inputRoot}`]:e.inputRoot},{[`& .${Rr.input}`]:e.input},{[`& .${Rr.input}`]:s&&e.inputFocused},e.root,r&&e.fullWidth,i&&e.hasPopupIcon,o&&e.hasClearIcon]}})({[`&.${Rr.focused} .${Rr.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Rr.clearIndicator}`]:{visibility:"visible"}},[`& .${Rr.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Rr.inputRoot}`]:{[`.${Rr.hasPopupIcon}&, .${Rr.hasClearIcon}&`]:{paddingRight:26+4},[`.${Rr.hasPopupIcon}.${Rr.hasClearIcon}&`]:{paddingRight:52+4},[`& .${Rr.input}`]:{width:0,minWidth:30}},[`& .${jy.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${jy.root}.${Wa.sizeSmall}`]:{[`& .${jy.input}`]:{padding:"2px 4px 3px 0"}},[`& .${cp.root}`]:{padding:9,[`.${Rr.hasPopupIcon}&, .${Rr.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${Rr.hasPopupIcon}.${Rr.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Rr.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Rr.endAdornment}`]:{right:9}},[`& .${cp.root}.${Wa.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Rr.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ju.root}`]:{paddingTop:19,paddingLeft:8,[`.${Rr.hasPopupIcon}&, .${Rr.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${Rr.hasPopupIcon}.${Rr.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${ju.input}`]:{padding:"7px 4px"},[`& .${Rr.endAdornment}`]:{right:9}},[`& .${ju.root}.${Wa.sizeSmall}`]:{paddingBottom:1,[`& .${ju.input}`]:{padding:"2.5px 4px"}},[`& .${Wa.hiddenLabel}`]:{paddingTop:8},[`& .${ju.root}.${Wa.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Rr.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ju.root}.${Wa.hiddenLabel}.${Wa.sizeSmall}`]:{[`& .${Rr.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Rr.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0}
vendor: 4,453 bytes, line 180
180,variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Rr.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Rr.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Rr.inputRoot}`]:{flexWrap:"wrap"}}}]}),GHe=$e("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,e)=>e.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),WHe=$e(Di,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,e)=>e.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),jHe=$e(Di,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},e)=>X({},e.popupIndicator,t.popupOpen&&e.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),qHe=$e(g0,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Rr.option}`]:e.option},e.popper,n.disablePortal&&e.popperDisablePortal]}})(({theme:t})=>({zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),YHe=$e(To,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,e)=>e.paper})(({theme:t})=>X({},t.typography.body1,{overflow:"auto"})),XHe=$e("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,e)=>e.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),KHe=$e("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,e)=>e.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),QHe=$e("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,e)=>e.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Rr.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Rr.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Rr.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Rr.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${Rr.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),ZHe=$e(hHe,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,e)=>e.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),JHe=$e("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,e)=>e.groupUl})({padding:0,[`& .${Rr.option}`]:{paddingLeft:24}}),e5e=C.forwardRef(function(e,n){var r,o,i,s;const a=UHe({props:e,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:c=!1,autoSelect:u=!1,blurOnSelect:d=!1,ChipProps:h,className:f,clearIcon:p=zX||(zX=g(mle,{fontSize:"small"})),clearOnBlur:m=!a.freeSolo,clearOnEscape:y=!1,clearText:v="Clear",closeText:b="Close",componentsProps:S={},defaultValue:w=a.multiple?[]:null,disableClearable:A=!1,disableCloseOnSelect:_=!1,disabled:P=!1,disabledItemsFocusable:R=!1,disableListWrap:O=!1,disablePortal:N=!1,filterSelectedOptions:M=!1,forcePopupIcon:L="auto",freeSolo:F=!1,fullWidth:$=!1,getLimitTagsText:D=$t=>`+${$t}`,getOptionLabel:k,groupBy:U,handleHomeEndKeys:H=!a.freeSolo,includeInputInList:V=!1,limitTags:q=-1,ListboxComponent:J="ul",ListboxProps:Q,loading:se=!1,loadingText:oe="Loadingâ¦",multiple:ie=!1,noOptionsText:ee="No options",openOnFocus:re=!1,openText:fe="Open",Pa
180perComponent:we=To,PopperComponent:xe=g0,popupIcon:ve=VX||(VX=g(kle,{})),readOnly:Re=!1,renderGroup:pe,renderInput:Be,renderOption:ke,renderTags:Ne,selectOnFocus:ot=!a.freeSolo,size:ce="medium",slotProps:Ae={}}=a,be=at(a,FHe),{getRootProps:Se,getInputProps:Pe,getInputLabelProps:Ue,getPopupIndicatorProps:_e,getClearProps:Oe,getTagProps:ze,getListboxProps:ne,getOptionProps:W,value:j,dirty:ue,expanded:he,id:Ce,popupOpen:Ie,focused:et,focusedTag:je,anchorEl:it,setAnchorEl:xt,inputValue:rt,groupedOptions:Bt}=J$e(X({},a,{componentName:"Autocomplete"})),dn=!A&&!P&&ue&&!Re,kn=(!F||L===!0)&&L!==!1,{onMouseDown:jn}=Pe(),{ref:Cr}=Q??{},Xn=ne(),{ref:Wo}=Xn,jo=at(Xn,BHe),ri=Xr(Wo,Cr),ta=k||($t=>{var Pn;return(Pn=$t.label)!=null?Pn:$t}),oi=X({},a,{disablePortal:N,expanded:he,focused:et,fullWidth:$,getOptionLabel:ta,hasClearIcon:dn,hasPopupIcon:kn,inputFocused:je===-1,popupOpen:Ie,size:ce}),Qr=zHe(oi);let ft;if(ie&&j.length>0){const $t=Pn=>X({className:Qr.tag,disabled:P},ze(Pn));Ne?ft=Ne(j,$t,oi):ft=j.map((Pn,an)=>{const tr=$t({index:an}),{key:Ra}=tr,Oa=at(tr,$He);return g(m0,X({label:ta(Pn),size:ce},Oa,h),Ra)})}if(q>-1&&Array.isArray(ft)){const $t=ft.length-q;!et&&$t>0&&(ft=ft.splice(0,q),ft.push(g("span",{className:Qr.tag,children:D($t)},ft.length)))}const Wt=pe||($t=>K("li",{children:[g(ZHe,{className:Qr.groupLabel,ownerState:oi,component:"div",children:$t.group}),g(JHe,{className:Qr.groupUl,ownerState:oi,children:$t.children})]},$t.key)),Jt=ke||(($t,Pn)=>{const{key:an}=$t,tr=at($t,HHe);return g("li",X({},tr,{children:ta(Pn)}),an)}),wn=($t,Pn)=>{const an=W({option:$t,index:Pn});return Jt(X({},an,{className:Qr.option}),$t,{selected:an["aria-selected"],index:Pn,inputValue:rt},oi)},Sr=(r=Ae.clearIndicator)!=null?r:S.clearIndicator,ii=(o=Ae.paper)!=null?o:S.paper,ol=(i=Ae.popper)!=null?i:S.popper,yt=(s=Ae.popupIndicator)!=null?s:S.popupIndicator,pt=$t=>g(qHe,X({as:xe,disablePortal:N,style:{width:it?it.clientWidth:null},ownerState:oi,role:"presentation",anchorEl:it,open:Ie},ol,{className:Ye(Qr.popper,ol?.className),children:g(YHe,X({ownerState:oi,as:we},ii,{className:Ye(Qr.paper,ii?.className),children:$t}))}));let Xt=null;return Bt.length>0?Xt=pt(g(QHe,X({as:J,className:Qr.listbox,ownerState:oi},jo,Q,{ref:ri,children:Bt.map(($t,Pn)=>U?Wt({key:$t.key,group:$t.group,children:$t.options.map((an,tr)=>wn(an,$t.index+tr))}):wn($t,Pn))}))):se&&Bt.length===0?Xt=pt(g(XHe,{className:Qr.loading,ownerState:oi,children:oe})):Bt.length===0&&!F&&!se&&(Xt=pt(g(KHe,{className:Qr.noOptions,ownerState:oi,role:"presentation",onMouseDown:$t=>{$t.preventDefault()},children:ee}))),K(C.Fragment,{children:[g(VHe,X({ref:n,className:Ye(Qr.root,f),ownerState:oi},Se(be),{children:Be({id:Ce,disabled:P,fullWidth:!0,size:ce==="small"?"small":void 0,InputLabelProps:Ue(),InputProps:X({ref:xt,className:Qr.inputRoot,startAdornment:ft,onClick:$t=>{$t.target===$t.currentTarget&&jn($t)}},(dn||kn)&&{endAdornment:K(GHe,{className:Qr.endAdornment,ownerState:oi,children:[dn?g(WHe,X({},Oe(),{"aria-label":v,title:v,ownerState:oi},Sr,{className:Ye(Qr.clearIndicator,Sr?.className),children:p})):null,kn?g(jHe,X({},_e(),{disabled:P,"aria-label":Ie?b:fe,title:Ie?b:fe,ownerState:oi},yt,{className:Ye(Qr.popupIndicator,yt?.className),children:ve})):null]})}),inputProps:X({className:Qr.input,disabled:P,readOnly:Re},Pe())})})),it?Xt:null]})}),Fle=e5e,t5e=gt(g("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function n5e(t){return Ft("MuiAvatar",t)}Dt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const r5e=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],o5e=f0(),i5e=t=>{const{classes:e,variant:n,colorDefault:r}=t;return Lt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},n5e,e)},s5e=$e("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],n.colorDefault&&e.colorDefault]}})(({theme:t})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:X({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:X({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]})),a5e=$e("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(t,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),l5e=$e(t5e,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(t,e)=>e.fallback})({width:"75%",height:"75%"});function c5e({crossOrigin:t,referrerPolicy:e,src:n,srcSet:r}){const[o,i]=C.useState(!1);return C.useEffect(()=>{if(!n&&!r)return;i(!1);let s=!0;const a=new Image;return a.onload=()=>{s&&i("loaded")},a.onerror=()=>{s&&i("error")},a.crossOrigin=t,a.referrerPolicy=e,a.src=n,r&&(a.srcset=r),()=>{s=!1}},[t,e,n,r]),o}const u5e=C.forwardRef(function(e,n){const r=o5e({props:e,name:"MuiAvatar"}),{alt:o,children:i,className:s,component:a="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:h,srcSet:f,variant:p="circular"}=r,m=at(r,r5e);let y=null;const v=c5e(X({},u,{src:h,srcSet:f})),b=h||f,S=b&&v!=="error",w=X({},r,{colorDefault:!S,component:a,variant:p}),A=i5e(w),[_,P]=OL("img",{className:A.img,elementType:a5e,externalForwardedProps:{slots:l,slotProps:{img:X({},u,c.img)}},additionalProps:{alt:o,src:h,srcSet:f,sizes:d},ownerState:w});return S?y=g(_,X({},P)):i||i===0?y=i:b&&o?y=o[0]:y=g(l5e,{ownerState:w,className:A.fallback}),g(s5e,X({as:a,ownerState:w,className:Ye(A.root,s),ref:n},m,{children:y}))}),d5e=u5e,h5e=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],f5e={entering:{opacity:1},entered:{opacity:1}},p5e=C.forwardRef(function(e,n){const r=Tu(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:h,onExit:f,onExited:p,onExiting:m,style:y,timeout:v=o,TransitionComponent:b=yF}=e,S=at(e,h5e),w=C.useRef(null),A=Xr(w,a.ref,n),_=$=>D=>{if($){const k=w.current;D===void 0?$(k):$(k,D)}},P=_(h),R=_(($,D)=>{dle($);const k=Y1({style:y,timeout:v,easing:l},{mode:"enter"});$.style.webkitTransition=r.transitions.create("opacity",k),$.style.transition=r.transitions.create("opacity",k),u&&u($,D)}),O=_(d),N=_(m),M=_($=>{const D=Y1({style:y,timeout:v,easing:l},{mode:"exit"});$.style.webkitTransition=r.transitions.create("opacity",D),$.style.transition=r.transitions.create("opacity",D),f&&f($)}),L=_(p);return g(b,X({appear:s,in:c,nodeRef:w,onEnter:R,onEntered:O,onEntering:P,onExit:M,onExited:L,onExiting:N,addEndListener:$=>{i&&i(w.current,$)},timeout:v},S,{children:($,D)=>C.cloneElement(a,X({style:X({opacity:0,visibility:$==="exited"&&!c?"hidden":void 0},f5e[$],y,a.props.style),ref:A},D))}))}),rw=p5e;function g5e(t){return Ft("MuiBackdrop",t)}Dt("MuiBackdrop",["root","invisible"]);const m5e=["children","className","component","components","componentsProps","invisible","open","slotProps","
180slots","TransitionComponent","transitionDuration"],y5e=t=>{const{classes:e,invisible:n}=t;return Lt({root:["root",n&&"invisible"]},g5e,e)},v5e=$e("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>X({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),b5e=C.forwardRef(function(e,n){var r,o,i;const s=Ht({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:h=!1,open:f,slotProps:p={},slots:m={},TransitionComponent:y=rw,transitionDuration:v}=s,b=at(s,m5e),S=X({},s,{component:c,invisible:h}),w=y5e(S),A=(r=p.root)!=null?r:d.root;return g(y,X({in:f,timeout:v},b,{children:g(v5e,X({"aria-hidden":!0},A,{as:(o=(i=m.root)!=null?i:u.Root)!=null?o:c,className:Ye(w.root,l,A?.className),ownerState:X({},S,A?.ownerState),classes:w,ref:n,children:a}))}))}),lW=b5e;function C5e(t){return Ft("MuiBadge",t)}const S5e=Dt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),Ty=S5e,E5e=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],VH=10,GH=4,x5e=f0(),w5e=t=>{const{color:e,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=t,a={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${ht(n.vertical)}${ht(n.horizontal)}`,`anchorOrigin${ht(n.vertical)}${ht(n.horizontal)}${ht(o)}`,`overlap${ht(o)}`,e!=="default"&&`color${ht(e)}`]};return Lt(a,C5e,s)},A5e=$e("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,e)=>e.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),T5e=$e("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.badge,e[n.variant],e[`anchorOrigin${ht(n.anchorOrigin.vertical)}${ht(n.anchorOrigin.horizontal)}${ht(n.overlap)}`],n.color!=="default"&&e[`color${ht(n.color)}`],n.invisible&&e.invisible]}})(({theme:t})=>{var e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:VH*2,lineHeight:1,padding:"0 6px",height:VH*2,borderRadius:VH,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r,o;return((r=t.vars)!=null?r:t).palette[n].main&&((o=t.vars)!=null?o:t).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:GH,height:GH*2,minWidth:GH*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{to
180p:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Ty.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}}),_5e=C.forwardRef(function(e,n){var r,o,i,s,a,l;const c=x5e({props:e,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:h,components:f={},componentsProps:p={},children:m,overlap:y="rectangular",color:v="default",invisible:b=!1,max:S=99,badgeContent:w,slots:A,slotProps:_,showZero:P=!1,variant:R="standard"}=c,O=at(c,E5e),{badgeContent:N,invisible:M,max:L,displayValue:F}=dBe({max:S,invisible:b,badgeContent:w,showZero:P}),$=VG({anchorOrigin:u,color:v,overlap:y,variant:R,badgeContent:w}),D=M||N==null&&R!=="dot",{color:k=v,overlap:U=y,anchorOrigin:H=u,variant:V=R}=D?$:c,q=V!=="dot"?F:void 0,J=X({},c,{badgeContent:N,invisible:D,max:L,displayValue:q,showZero:P,anchorOrigin:H,color:k,overlap:U,variant:V}),Q=w5e(J),se=(r=(o=A?.root)!=null?o:f.Root)!=null?r:A5e,oe=(i=(s=A?.badge)!=null?s:f.Badge)!=null?i:T5e,ie=(a=_?.root)!=null?a:p.root,ee=(l=_?.badge)!=null?l:p.badge,re=ao({elementType:se,externalSlotProps:ie,externalForwardedProps:O,additionalProps:{ref:n,as:h},ownerState:J,className:Ye(ie?.className,Q.root,d)}),fe=ao({elementType:oe,externalSlotProps:ee,ownerState:J,className:Ye(Q.badge,ee?.className)});return K(se,X({},re,{children:[m,g(oe,X({},fe,{children:q}))]}))}),Ca=_5e,I5e=Dt("MuiBox",["root"]),P5e=I5e,R5e=HI(),O5e=kae({themeId:TC,defaultTheme:R5e,defaultClassName:P5e.root,generateClassName:dF.generate}),le=O5e;function N5e(t){return Ft("MuiButton",t)}const M5e=Dt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),IN=M5e,D5e=C.createContext({}),Ble=D5e,L5e=C.createContext(void 0),k5e=L5e,F5e=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],B5e=t=>{const{color:e,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=t,a={root:["root",i,`${i}${ht(e)}`,`size${ht(o)}`,`${i}Size${ht(o)}`,`color${ht(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${ht(o)}`],endIcon:["icon","endIcon",`iconSize${ht(o)}`]},l=Lt(a,N5e,s);return X({},s,l)},$le=t=>X({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}
vendor: 11,097 bytes, line 180
180),$5e=$e(ad,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${ht(n.color)}`],e[`size${ht(n.size)}`],e[`${n.variant}Size${ht(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const o=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],i=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return X({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":X({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":X({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${IN.focusVisible}`]:X({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${IN.disabled}`]:X({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${ar(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:o,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${IN.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${IN.disabled}`]:{boxShadow:"none"}}),H5e=$e("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${ht(n.size)}`]]}})(({ownerState:t})=>X({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},$le(t))),U5e=$e("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${ht(n.size)}`]]}})(({ownerState:t})=>X({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},$le(t))),z5e=C.forwardRef(function(e,n){const r=C.useContext(Ble),o=C.useContext(k5e),i=hF(r,e),s=Ht({props:i,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:h=!1,disableFocusRipple:f=!1,endIcon:p,focusVisibleClassName:m,fullWidth:y=!1,size:v="medium",startIcon:b,type:S,variant:w="text"}=s,A=at(s,F5e),_=X({},s,{color:l,component:c,disabled:d,disableElevation:h,disableFocusRipple:f,fullWidth:y,size:v,type:S,variant:w}),P=B5e(_),R=b&&g(H5e,{className:P.startIcon,ownerState:_,children:b}),O=p&&g(U5e,{className:P.endIcon,ownerState:_,children:p}),N=o||"";return K($5e,X({ownerState:_,className:Ye(r.className,P.root,u,N),component:c,disabled:d,focusRipple:!f,focusVisibleClassName:Ye(P.focusVisible,m),ref:n,type:S},A,{classes:P,children:[R,a,O]}))}),Sn=z5e;function V5e(t){return Ft("MuiCard",t)}Dt("MuiCard",["root"]);const G5e=["className","raised"],W5e=t=>{const{classes:e}=t;return Lt({root:["root"]},V5e,e)},j5e=$e(To,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),q5e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiCard"}),{className:o,raised:i=!1}=r,s=at(r,G5e),a=X({},r,{raised:i}),l=W5e(a);return g(j5e,X({className:Ye(l.root,o),elevation:i?8:void 0,ref:n,ownerState:a},s))}),Hle=q5e;function Y5e(t){return Ft("MuiCardActions",t)}Dt("MuiCardActions",["root","spacing"]);const X5e=["disableSpacing","className"],K5e=t=>{const{classes:e,disableSpacing:n}=t;return Lt({root:["root",!n&&"spacing"]},Y5e,e)},Q5e=$e("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>X({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Z5e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i}=r,s=at(r,X5e),a=X({},r,{disableSpacing:o}),l=K5e(a);return g(Q5e,X({className:Ye(l.root,i),ownerState:a,ref:n},s))}),J5e=Z5e;function eUe(t){return Ft("MuiCardContent",t)}Dt("MuiCardContent",["root"]);const tUe=["className","component"],nUe=t=>{const{classes:e}=t;return Lt({root:["root"]},eUe,e)},rUe=$e("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),oUe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiCardContent"}),{className:o,component:i="div"}=r,s=at(r,tUe),a=X({},r,{component:i}),l=nUe(a);return g(rUe,X({as:i,className:Ye(l.root,o),ownerState:a,ref:n},s))}),Ule=oUe;function iUe(t){return Ft("MuiCardMedia",t)}Dt("MuiCardMedia",["root","media","img"]);const sUe=["children","className","component","image","src","style"],aUe=t=>{const{classes:e,isMediaComponent:n,isImageComponent:r}=t;return Lt({root:["root",n&&"media",r&&"img"]},iUe,e)},lUe=$e("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{isMediaComponent:r,isImageComponent:o}=n;return[e.root,r&&e.media,o&&e.img]}})(({ownerState:t})=>X({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},t.isMediaComponent&&{width:"100%"},t.isImageComponent&&{objectFit:"cover"})),cUe=["video","audio","picture","iframe","img"],uUe=["picture","img"],dUe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiCardMedia"}),{children:o,className:i,component:s="div",image:a,src:l,style:c}=r,u=at(r,sUe),d=cUe.indexOf(s)!==-1,h=!d&&a?X({backgroundImage:`url("${a}")`},c):c,f=X({},r,{component:s,isMediaComponent:d,isImageComponent:uUe.indexOf(s)!==-1}),p=aUe(f);return g(lUe,X({className:Ye(p.root,i),as:s,role:!d&&a?"img":void 0,ref:n,style:h,ownerState:f,src:d?a||l:void 0},u,{children:o}))}),zle=dUe;function hUe(t){return Ft("PrivateSwitchBase",t)}Dt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const fUe=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],pUe=t=>{const{classes:e,checked:n,disabled:r,edge:o}=t,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${ht(o)}`],input:["input"]};return Lt(i,hUe,e)},gUe=$e(ad)(({ownerState:t})=>X({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),mUe=$e("input",{shouldForwardProp:el})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),yUe=C.forwardRef(function(e,n){const{autoFocus:r,checked:o,checkedIcon:i,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:h,inputProps:f,inputRef:p,name:m,onBlur:y,onChange:v,onFocus:b,readOnly:S,required:w=!1,tabIndex:A,type:_,value:P}=e,R=at(e,fUe),[O,N]=Ka({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),M=Zp(),L=V=>{b&&b(V),M&&M.onFocus&&M.onFocus(V)},F=V=>{y&&y(V),M&&M.onBlur&&M.onBlur(V)},$=V=>{if(V.nativeEvent.defaultPrevented)return;const q=V.target.checked;N(q),v&&v(V,q)};let D=l;M&&typeof D>"u"&&(D=M.disabled);const k=_==="checkbox"||_==="radio",U=X({},e,{checked:O,disabled:D,disableFocusRipple:c,edge:u}),H=pUe(U);return K(gUe,X({component:"span",className:Ye(H.root,s),centerRipple:!0,focusRipple:!c,disabled:D,tabIndex:null,role:void 0,onFocus:L,onBlur:F,ownerState:U,ref:n},R,{children:[g(mUe,X({autoFocus:r,checked:o,defaultChecked:a,className:H.input,disabled:D,id:k?h:void 0,name:m,onChange:$,readOnly:S,ref:p,required:w,ownerState:U,tabIndex:A,type:_},_==="checkbox"&&P===void 0?{}:{value:P},f)),O?i:d]}))}),cW=yUe,vUe=gt(g("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),bUe=gt(g("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),CUe=gt(g("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function SUe(t){return Ft("MuiCheckbox",t)}const EUe=Dt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),WH=EUe,xUe=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","
180size","className"],wUe=t=>{const{classes:e,indeterminate:n,color:r,size:o}=t,i={root:["root",n&&"indeterminate",`color${ht(r)}`,`size${ht(o)}`]},s=Lt(i,SUe,e);return X({},e,s)},AUe=$e(cW,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${ht(n.size)}`],n.color!=="default"&&e[`color${ht(n.color)}`]]}})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${WH.checked}, &.${WH.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${WH.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),TUe=g(bUe,{}),_Ue=g(vUe,{}),IUe=g(CUe,{}),PUe=C.forwardRef(function(e,n){var r,o;const i=Ht({props:e,name:"MuiCheckbox"}),{checkedIcon:s=TUe,color:a="primary",icon:l=_Ue,indeterminate:c=!1,indeterminateIcon:u=IUe,inputProps:d,size:h="medium",className:f}=i,p=at(i,xUe),m=c?u:l,y=c?u:s,v=X({},i,{color:a,indeterminate:c,size:h}),b=wUe(v);return g(AUe,X({type:"checkbox",inputProps:X({"data-indeterminate":c},d),icon:C.cloneElement(m,{fontSize:(r=m.props.fontSize)!=null?r:h}),checkedIcon:C.cloneElement(y,{fontSize:(o=y.props.fontSize)!=null?o:h}),ownerState:v,ref:n,className:Ye(b.root,f)},p,{classes:b}))}),_u=PUe;function RUe(t){return Ft("MuiCircularProgress",t)}Dt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const OUe=["className","color","disableShrink","size","style","thickness","value","variant"];let TF=t=>t,GX,WX,jX,qX;const _y=44,NUe=_f(GX||(GX=TF` 181 0% { 182 transform: rotate(0deg); 183 } 184 185 100% { 186 transform: rotate(360deg); 187 } 188`)),MUe=_f(WX||(WX=TF` 189 0% { 190 stroke-dasharray: 1px, 200px; 191 stroke-dashoffset: 0; 192 } 193 194 50% { 195 stroke-dasharray: 100px, 200px; 196 stroke-dashoffset: -15px; 197 } 198 199 100% { 200 stroke-dasharray: 100px, 200px; 201 stroke-dashoffset: -125px; 202 } 203`)),DUe=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,i={root:["root",n,`color${ht(r)}`],svg:["svg"],circle:["circle",`circle${ht(n)}`,o&&"circleDisableShrink"]};return Lt(i,RUe,e)},LUe=$e("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${ht(n.color)}`]]}})(({ownerState:t,theme:e})=>X({display:"inline-block"},t.variant==="determinate"&&{transition:e.transitions.create("transform")},t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&vm(jX||(jX=TF` 204 animation: ${0} 1.4s linear infinite; 205 `),NUe)),kUe=$e("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),FUe=$e("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${ht(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>X({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&vm(qX||(qX=TF` 206 animation: ${0} 1.4s ease-in-out infinite; 207 `),MUe)),BUe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:a=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate"}=r,h=at(r,OUe),f=X({},r,{color:i,disableShrink:s,size:a,thickness:c,value:u,variant:d}),p=DUe(f),m={},y={},v={};if(d==="determinate"){const b=2*Math.PI*((_y-c)/2);m.strokeDasharray=b.toFixed(3),v["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*b).toFixed(3)}px`,y.transform="rotate(-90deg)"}return g(LUe,X({className:Ye(p.root,o),style:X({width:a,height:a},y,l),ownerState:f,ref:n,role:"progressbar"},v,h,{children:g(kUe,{className:p.svg,ownerState:f,viewBox:`${_y/2} ${_y/2} ${_y} ${_y}`,children:g(FUe,{className:p.circle,style:m,ownerState:f,cx:_y,cy:_y,r:(_y-c)/2,fill:"none",strokeWidth:c})})}))}),Ni=BUe,$Ue=(t,e)=>X({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),HUe=t=>X({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),UUe=(t,e=!1)=>{var n;const r={};
207e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([s,a])=>{var l;r[t.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let o=X({html:$Ue(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:X({margin:0},HUe(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const i=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return i&&(o=[o,i]),o};function zUe(t){const e=Ht({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return K(C.Fragment,{children:[g(Lle,{styles:o=>UUe(o,r)}),n]})}function VUe(t){return Ft("MuiModal",t)}Dt("MuiModal",["root","hidden","backdrop"]);const GUe=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],WUe=t=>{const{open:e,exited:n,classes:r}=t;return Lt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},VUe,r)},jUe=$e("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>X({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),qUe=$e(lW,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),YUe=C.forwardRef(function(e,n){var r,o,i,s,a,l;const c=Ht({name:"MuiModal",props:e}),{BackdropComponent:u=qUe,BackdropProps:d,className:h,closeAfterTransition:f=!1,children:p,container:m,component:y,components:v={},componentsProps:b={},disableAutoFocus:S=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:A=!1,disablePortal:_=!1,disableRestoreFocus:P=!1,disableScrollLock:R=!1,hideBackdrop:O=!1,keepMounted:N=!1,onBackdropClick:M,open:L,slotProps:F,slots:$}=c,D=at(c,GUe),k=X({},c,{closeAfterTransition:f,disableAutoFocus:S,disableEnforceFocus:w,disableEscapeKeyDown:A,disablePortal:_,disableRestoreFocus:P,disableScrollLock:R,hideBackdrop:O,keepMounted:N}),{getRootProps:U,getBackdropProps:H,getTransitionProps:V,portalRef:q,isTopModal:J,exited:Q,hasTransition:se}=OBe(X({},k,{rootRef:n})),oe=X({},k,{exited:Q}),ie=WUe(oe),ee={};if(p.props.tabIndex===void 0&&(ee.tabIndex="-1"),se){const{onEnter:pe,onExited:Be}=V();ee.onEnter=pe,ee.onExited=Be}const re=(r=(o=$?.root)!=null?o:v.Root)!=null?r:jUe,fe=(i=(s=$?.backdrop)!=null?s:v.Backdrop)!=null?i:u,we=(a=F?.root)!=null?a:b.root,xe=(l=F?.backdrop)!=null?l:b.backdrop,ve=ao({elementType:re,externalSlotProps:we,externalForwardedProps:D,getSlotProps:U,additionalProps:{ref:n,as:y},ownerState:oe,className:Ye(h,we?.className,ie?.root,!oe.open&&oe.exited&&ie?.hidden)}),Re=ao({elementType:fe,externalSlotProps:xe,additionalProps:d,getSlotProps:pe=>H(X({},pe,{onClick:Be=>{M&&M(Be),pe!=null&&pe.onClick&&pe.onClick(Be)}})),className:Ye(xe?.className,d?.className,ie?.backdrop),ownerState:oe});return!N&&!L&&(!se||Q)?null:g(Cle,{ref:q,container:m,disablePortal:_,children:K(re,X({},ve,{children:[!O&&u?g(fe,X({},Re)):null,g(JG,{disableEnforceFocus:w,disableAutoFocus:S,disableRestoreFocus:P,isEnabled:J,open:L,children:C.cloneElement(p,ee)})]}))})}),Vle=YUe;function XUe(t){return Ft("MuiDialog",t)}const KUe=Dt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),D_=KUe,QUe=C.createContext({}),Gle=QUe,ZUe=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],JUe=$e(lW,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),e3e=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}
vendor: 17,776 bytes, line 207
207=t,s={root:["root"],container:["container",`scroll${ht(n)}`],paper:["paper",`paperScroll${ht(n)}`,`paperWidth${ht(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Lt(s,XUe,e)},t3e=$e(Vle,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),n3e=$e("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${ht(n.scroll)}`]]}})(({ownerState:t})=>X({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),r3e=$e(To,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${ht(n.scroll)}`],e[`paperWidth${ht(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>X({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${D_.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${D_.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${D_.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),o3e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiDialog"}),o=Tu(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:h=!1,fullScreen:f=!1,fullWidth:p=!1,maxWidth:m="sm",onBackdropClick:y,onClick:v,onClose:b,open:S,PaperComponent:w=To,PaperProps:A={},scroll:_="paper",TransitionComponent:P=rw,transitionDuration:R=i,TransitionProps:O}=r,N=at(r,ZUe),M=X({},r,{disableEscapeKeyDown:h,fullScreen:f,fullWidth:p,maxWidth:m,scroll:_}),L=e3e(M),F=C.useRef(),$=H=>{F.current=H.target===H.currentTarget},D=H=>{v&&v(H),F.current&&(F.current=null,y&&y(H),b&&b(H,"backdropClick"))},k=sd(a),U=C.useMemo(()=>({titleId:k}),[k]);return g(t3e,X({className:Ye(L.root,d),closeAfterTransition:!0,components:{Backdrop:JUe},componentsProps:{backdrop:X({transitionDuration:R,as:l},c)},disableEscapeKeyDown:h,onClose:b,open:S,ref:n,onClick:D,ownerState:M},N,{children:g(P,X({appear:!0,in:S,timeout:R,role:"presentation"},O,{children:g(n3e,{className:Ye(L.container),onMouseDown:$,ownerState:M,children:g(r3e,X({as:w,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":k},A,{className:Ye(L.paper,A.className),ownerState:M,children:g(Gle.Provider,{value:U,children:u})}))})}))}))}),Iu=o3e;function i3e(t){return Ft("MuiDialogActions",t)}Dt("MuiDialogActions",["root","spacing"]);const s3e=["className","disableSpacing"],a3e=t=>{const{classes:e,disableSpacing:n}=t;return Lt({root:["root",!n&&"spacing"]},i3e,e)},l3e=$e("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>X({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),c3e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1}=r,s=at(r,s3e),a=X({},r,{disableSpacing:i}),l=a3e(a);return g(l3e,X({className:Ye(l.root,o),ownerState:a,ref:n},s))}),Jp=c3e;function u3e(t){return Ft("MuiDialogContent",t)}Dt("MuiDialogContent",["root","dividers"]);function d3e(t){return Ft("MuiDialogTitle",t)}const h3e=Dt("MuiDialogTitle",["root"]),f3e=h3e,p3e=["className","dividers"],g3e=t=>{const{classes:e,dividers:n}=t;return Lt({root:["root",n&&"dividers"]},u3e,e)},m3e=$e("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>X({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${f3e.root} + &`]:{paddingTop:0}})),y3e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiDialogContent"}),{className:o,dividers:i=!1}=r,s=at(r,p3e),a=X({},r,{dividers:i}),l=g3e(a);return g(m3e,X({className:Ye(l.root,o),ownerState:a,ref:n},s))}),ZC=y3e,v3e=["className","id"],b3e=t=>{const{classes:e}=t;return Lt({root:["root"]},d3e,e)},C3e=$e(Ke,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),S3e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiDialogTitle"}),{className:o,id:i}=r,s=at(r,v3e),a=r,l=b3e(a),{titleId:c=i}=C.useContext(Gle);return g(C3e,X({component:"h2",className:Ye(l.root,o),ownerState:a,ref:n,variant:"h6",id:i??c},s))}),eg=S3e;function E3e(t){return Ft("MuiDivider",t)}const x3e=Dt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),YX=x3e,w3e=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],A3e=t=>{const{absolute:e,children:n,classes:r,flexItem:o,light:i,orientation:s,textAlign:a,variant:l}=t;return Lt({root:["root",e&&"absolute",l,i&&"light",s==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},E3e,r)},T3e=$e("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>X({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:ar(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>X({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>X({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`}}),({theme:t,ownerState:e})=>X({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`}}),({ownerState:t})=>X({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),_3e=$e("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>X({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),Wle=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiDivider"}),{absolute:o=!1,children:i,className:s,component:a=i?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=a!=="hr"?"separator":void 0,textAlign:h="center",variant:f="fullWidth"}=r,p=at(r,w3e),m=X({},r,{absolute:o,component:a,flexItem:l,light:c,orientation:u,role:d,textAlign:h,variant:f}),y=A3e(m);return g(T3e,X({as:a,className:Ye(y.root,s),role:d,ref:n,ownerState:m},p,{children:i?g(_3e,{className:y.wrapper,ownerState:m,children:i}):null}))});Wle.muiSkipListHighlight=!0;const yi=Wle;function I3e(t){return Ft("MuiFab",t)}const P3e=Dt("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),XX=P3e,R3e=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],O3e=t=>{const{color:e,variant:n,classes:r,size:o}=t,i={root:["root",n,`size${ht(o)}`,e==="inherit"?"colorInherit":e]},s=Lt(i,I3e,r);return X({},r,s)},N3e=$e(ad,{name:"MuiFab",slot:"Root",shouldForwardProp:t=>el(t)||t==="classes",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${ht(n.size)}`],n.color==="inherit"&&e.colorInherit,e[ht(n.size)],e[n.color]]}})(({theme:t,ownerState:e})=>{var n,r;return X({},t.typography.button,{minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(t.vars||t).zIndex.fab,boxShadow:(t.vars||t).shadows[6],"&:active":{boxShadow:(t.vars||t).shadows[12]},color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],"&:hover":{backgroundColor:(t.vars||t).palette.grey.A100,"@media (hover: none)":{backgroundColor:(t.vars||t).palette.grey[300]},textDecoration:"none"},[`&.${XX.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]}},e.size==="small"&&{width:40,height:40},e.size==="medium"&&{width:48,height:48},e.variant==="extended"&&{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},e.variant==="extended"&&e.size==="small"&&{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},e.variant==="extended"&&e.size==="medium"&&{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40},e.color==="inherit"&&{color:"inherit"})},({theme:t,ownerState:e})=>X({},e.color!=="inherit"&&e.color!=="default"&&(t.vars||t).palette[e.color]!=null&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}}),({theme:t})=>({[`&.${XX.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}})),M3e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiFab"}),{children:o,className:i,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:h="circular"}=r,f=at(r,R3e),p=X({},r,{color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:h}),m=O3e(p);return g(N3e,X({className:Ye(m.root,i),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:Ye(m.focusVisible,u),ownerState:p,ref:n},f,{classes:m,children:o}))}),D3e=M3e,L3e=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],k3e=t=>{const{classes:e,disableUnderline:n}=t,o=Lt({root:["root",!n&&"underline"],input:["input"]},MHe,e);return X({},e,o)},F3e=$e(wF,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...EF(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return X({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:i}},[`&.${ju.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:i},[`&.${ju.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ju.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ju.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ju.disabled}, .${ju.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${ju.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&X({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),B3e=$e(AF,{name:"MuiFilledInput",slot:"Input",overridesResolver:xF})(({theme:t,ownerState:e})=>X({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),jle=C.forwardRef(function(e,n){var r,o,i,s;const a=Ht({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:h=!1,slotProps:f,slots:p={},type:m="text"}=a,y=at(a,L3e),v=X({},a,{fullWidth:u,inputComponent:d,multiline:h,type:m}),b=k3e(a),S={root:{ownerState:v},input:{ownerState:v}},w=f??c?Oc(S,f??c):S,A=(r=(o=p.root)!=null?o:l.Root)!=null?r:F3e,_=(i=(s=p.input)!=null?s:l.Input)!=null?i:B3e;return g(QC,X({slots:{root:A,input:_},componentsProps:w,fullWidth:u,inputComponent:d,multiline:h,ref:n,type:m},y,{classes:b}))});jle.muiName="Input";const qle=jle;function $3e(t){return Ft("MuiFormControl",t)}Dt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const H3e=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],U3e=t=>{const{classes:e,margin:n,fullWidth:r}=t,o={root:["root",n!=="none"&&`margin${ht(n)}`,r&&"fullWidth"]};return Lt(o,$3e,e)},z3e=$e("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>X({},e.root,e[`margin${ht(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>X({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),V3e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:h=!1,margin:f="none",required:p=!1,size:m="medium",variant:y="outlined"}=r,v=at(r,H3e),b=X({},r,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:h,margin:f,required:p,size:m,variant:y}
207),S=U3e(b),[w,A]=C.useState(()=>{let F=!1;return o&&C.Children.forEach(o,$=>{if(!R_($,["Input","Select"]))return;const D=R_($,["Select"])?$.props.input:$;D&&EHe(D.props)&&(F=!0)}),F}),[_,P]=C.useState(()=>{let F=!1;return o&&C.Children.forEach(o,$=>{R_($,["Input","Select"])&&(ML($.props,!0)||ML($.props.inputProps,!0))&&(F=!0)}),F}),[R,O]=C.useState(!1);l&&R&&O(!1);const N=u!==void 0&&!l?u:R;let M;const L=C.useMemo(()=>({adornedStart:w,setAdornedStart:A,color:s,disabled:l,error:c,filled:_,focused:N,fullWidth:d,hiddenLabel:h,size:m,onBlur:()=>{O(!1)},onEmpty:()=>{P(!1)},onFilled:()=>{P(!0)},onFocus:()=>{O(!0)},registerEffect:M,required:p,variant:y}),[w,s,l,c,_,N,d,h,M,p,m,y]);return g(SF.Provider,{value:L,children:g(z3e,X({as:a,ownerState:b,className:Ye(S.root,i),ref:n},v,{children:o}))})}),v0=V3e,G3e=r2e({createStyledComponent:$e("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Ht({props:t,name:"MuiStack"})}),Mt=G3e;function W3e(t){return Ft("MuiFormControlLabel",t)}const j3e=Dt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),GT=j3e,q3e=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Y3e=t=>{const{classes:e,disabled:n,labelPlacement:r,error:o,required:i}=t,s={root:["root",n&&"disabled",`labelPlacement${ht(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Lt(s,W3e,e)},X3e=$e("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${GT.label}`]:e.label},e.root,e[`labelPlacement${ht(n.labelPlacement)}`]]}})(({theme:t,ownerState:e})=>X({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${GT.disabled}`]:{cursor:"default"}},e.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},e.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},e.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${GT.label}`]:{[`&.${GT.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})),K3e=$e("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${GT.error}`]:{color:(t.vars||t).palette.error.main}})),Q3e=C.forwardRef(function(e,n){var r,o;const i=Ht({props:e,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:l,disabled:c,disableTypography:u,label:d,labelPlacement:h="end",required:f,slotProps:p={}}=i,m=at(i,q3e),y=Zp(),v=(r=c??l.props.disabled)!=null?r:y?.disabled,b=f??l.props.required,S={disabled:v,required:b};["checked","name","onChange","value","inputRef"].forEach(O=>{typeof l.props[O]>"u"&&typeof i[O]<"u"&&(S[O]=i[O])});const w=y0({props:i,muiFormControl:y,states:["error"]}),A=X({},i,{disabled:v,labelPlacement:h,required:b,error:w.error}),_=Y3e(A),P=(o=p.typography)!=null?o:a.typography;let R=d;return R!=null&&R.type!==Ke&&!u&&(R=g(Ke,X({component:"span"},P,{className:Ye(_.label,P?.className),children:R}))),K(X3e,X({className:Ye(_.root,s),ownerState:A,ref:n},m,{children:[C.cloneElement(l,S),b?K(Mt,{display:"block",children:[R,K(K3e,{ownerState:A,"aria-hidden":!0,className:_.asterisk,children:["â","*"]})]}):R]}))}),ec=Q3e;function Z3e(t){return Ft("MuiFormGroup",t)}Dt("MuiFormGroup",["root","row","error"]);const J3e=["className","row"],e4e=t=>{const{classes:e,row:n,error:r}=t;return Lt({root:["root",n&&"row",r&&"error"]},Z3e,e)},t4e=$e("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.row&&e.row]}})(({ownerState:t})=>X({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})),n4e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiFormGroup"}),{className:o,row:i=!1}=r,s=at(r,J3e),a=Zp(),l=y0({props:r,muiFormControl:a,states:["error"]}),c=X({},r,{row:i,error:l.error}),u=e4e(c);return g(t4e,X({className:Ye(u.root,o),ownerState:c,ref:n},s))}),r4e=n4e;function o4e(t){return Ft("MuiFormHelperText",t)}const i4e=Dt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),KX=i4e;var QX;const s4e=["children","className","component","disabled","error","filled","focused","margin","required","variant"],a4e=t=>{const{classes:e,contained:n,size:r,disabled:o,error:i,filled:s,focused:a,required:l}=t,c={root:["root",o&&"disabled",i&&"error",r&&`size${ht(r)}
207`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Lt(c,o4e,e)},l4e=$e("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${ht(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${KX.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${KX.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),c4e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiFormHelperText"}),{children:o,className:i,component:s="p"}=r,a=at(r,s4e),l=Zp(),c=y0({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=X({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=a4e(u);return g(l4e,X({as:s,ownerState:u,className:Ye(d.root,i),ref:n},a,{children:o===" "?QX||(QX=g("span",{className:"notranslate",children:"â"})):o}))}),u4e=c4e;function d4e(t){return Ft("MuiFormLabel",t)}const h4e=Dt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),L_=h4e,f4e=["children","className","color","component","disabled","error","filled","focused","required"],p4e=t=>{const{classes:e,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=t,l={root:["root",`color${ht(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return Lt(l,d4e,e)},g4e=$e("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>X({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${L_.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${L_.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${L_.error}`]:{color:(t.vars||t).palette.error.main}})),m4e=$e("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${L_.error}`]:{color:(t.vars||t).palette.error.main}})),y4e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiFormLabel"}),{children:o,className:i,component:s="label"}=r,a=at(r,f4e),l=Zp(),c=y0({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=X({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=p4e(u);return K(g4e,X({as:s,ownerState:u,className:Ye(d.root,i),ref:n},a,{children:[o,c.required&&K(m4e,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:["â","*"]})]}))}),v4e=y4e,b4e=C.createContext(),ZX=b4e;function C4e(t){return Ft("MuiGrid",t)}const S4e=[0,1,2,3,4,5,6,7,8,9,10],E4e=["column-reverse","column","row-reverse","row"],x4e=["nowrap","wrap-reverse","wrap"],nT=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],w4e=Dt("MuiGrid",["root","container","item","zeroMinWidth",...S4e.map(t=>`spacing-xs-${t}`),...E4e.map(t=>`direction-xs-${t}`),...x4e.map(t=>`wrap-xs-${t}`),...nT.map(t=>`grid-xs-${t}`),...nT.map(t=>`grid-sm-${t}`),...nT.map(t=>`grid-md-${t}`),...nT.map(t=>`grid-lg-${t}`),...nT.map(t=>`grid-xl-${t}`)]),VI=w4e,A4e=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function C1(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function T4e({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,o)=>{let i={};if(e[o]&&(n=e[o]),!n)return r;if(n===!0)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=rC({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof s=="object"?s[o]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(e.container&&e.item&&e.columnSpacing!==0){const u=t.spacing(e.columnSpacing);if(u!=="0px"){const d=`calc(${l} + ${C1(u)})`;c={flexBasis:d,maxWidth:d}}}i=X({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[o]===0?Object.assign(r,i):r[t.breakpoints.up(o)]=i,r},{})}function _4e({theme:t,ownerState:e}){const n=rC({values:e.direction,breakpoints:t.breakpoints.values});return wu({theme:t},n,r=>{const o={flexDirection:r};return r.indexOf("column")===0&&(o[`& > .${VI.item}`]={maxWidth:"none"}),o})}function Yle({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(o=>{n===""&&e[o]!==0&&(n=o)});const r=Object.keys(t).sort((o,i)=>t[o]-t[i]);return r.slice(0,r.indexOf(n))}function I4e({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let o={};if(n&&r!==0){const i=rC({values:r,breakpoints:t.breakpoints.values});let s;typeof i=="object"&&(s=Yle({breakpoints:t.breakpoints.values,values:i})),o=wu({theme:t},i,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{marginTop:`-${C1(u)}`,[`& > .${VI.item}`]:{paddingTop:C1(u)}}:(c=s)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${VI.item}`]:{paddingTop:0}}})}return o}function P4e({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let o={};if(n&&r!==0){const i=rC({values:r,breakpoints:t.breakpoints.values});let s;typeof i=="object"&&(s=Yle({breakpoints:t.breakpoints.values,values:i})),o=wu({theme:t},i,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{width:`calc(100% + ${C1(u)}
207)`,marginLeft:`-${C1(u)}`,[`& > .${VI.item}`]:{paddingLeft:C1(u)}}:(c=s)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${VI.item}`]:{paddingLeft:0}}})}return o}function R4e(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(o=>{const i=t[o];Number(i)>0&&r.push(n[`spacing-${o}-${String(i)}`])}),r}const O4e=$e("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:o,item:i,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=R4e(s,c,e));const d=[];return c.forEach(h=>{const f=n[h];f&&d.push(e[`grid-${h}-${String(f)}`])}),[e.root,r&&e.container,i&&e.item,l&&e.zeroMinWidth,...u,o!=="row"&&e[`direction-xs-${String(o)}`],a!=="wrap"&&e[`wrap-xs-${String(a)}`],...d]}})(({ownerState:t})=>X({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),_4e,I4e,P4e,T4e);function N4e(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const o=t[r];if(Number(o)>0){const i=`spacing-${r}-${String(o)}`;n.push(i)}}),n}const M4e=t=>{const{classes:e,container:n,direction:r,item:o,spacing:i,wrap:s,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=N4e(i,l));const u=[];l.forEach(h=>{const f=t[h];f&&u.push(`grid-${h}-${String(f)}`)});const d={root:["root",n&&"container",o&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return Lt(d,C4e,e)},D4e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiGrid"}),{breakpoints:o}=Tu(),i=nR(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:d="row",item:h=!1,rowSpacing:f,spacing:p=0,wrap:m="wrap",zeroMinWidth:y=!1}=i,v=at(i,A4e),b=f||p,S=l||p,w=C.useContext(ZX),A=u?a||12:w,_={},P=X({},v);o.keys.forEach(N=>{v[N]!=null&&(_[N]=v[N],delete P[N])});const R=X({},i,{columns:A,container:u,direction:d,item:h,rowSpacing:b,columnSpacing:S,wrap:m,zeroMinWidth:y,spacing:p},_,{breakpoints:o.keys}),O=M4e(R);return g(ZX.Provider,{value:A,children:g(O4e,X({ownerState:R,className:Ye(O.root,s),as:c,ref:n},P))})}),mi=D4e,L4e=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function n4(t){return`scale(${t}, ${t**2})`}const k4e={entering:{opacity:1,transform:n4(1)},entered:{opacity:1,transform:"none"}},jH=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Xle=C.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:h,onExiting:f,style:p,timeout:m="auto",TransitionComponent:y=yF}=e,v=at(e,L4e),b=Hb(),S=C.useRef(),w=Tu(),A=C.useRef(null),_=Xr(A,i.ref,n),P=D=>k=>{if(D){const U=A.current;k===void 0?D(U):D(U,k)}},R=P(u),O=P((D,k)=>{dle(D);const{duration:U,delay:H,easing:V}=Y1({style:p,timeout:m,easing:s},{mode:"enter"});let q;m==="auto"?(q=w.transitions.getAutoHeightDuration(D.clientHeight),S.current=q):q=U,D.style.transition=[w.transitions.create("opacity",{duration:q,delay:H}),w.transitions.create("transform",{duration:jH?q:q*.666,delay:H,easing:V})].join(","),l&&l(D,k)}),N=P(c),M=P(f),L=P(D=>{const{duration:k,delay:U,easing:H}=Y1({style:p,timeout:m,easing:s},{mode:"exit"});let V;m==="auto"?(V=w.transitions.getAutoHeightDuration(D.clientHeight),S.current=V):V=k,D.style.transition=[w.transitions.create("opacity",{duration:V,delay:U}),w.transitions.create("transform",{duration:jH?V:V*.666,delay:jH?U:U||V*.333,easing:H})].join(","),D.style.opacity=0,D.style.transform=n4(.75),d&&d(D)}),F=P(h);return g(y,X({appear:o,in:a,nodeRef:A,onEnter:O,onEntered:N,onEntering:R,onExit:L,onExited:F,onExiting:M,addEndListener:D=>{m==="auto"&&b.start(S.current||0,D),r&&r(A.current,D)},timeout:m==="auto"?null:m},v,{children:(D,k)=>C.cloneElement(i,X({style:X({opacity:0,transform:n4(.75),visibility:D==="exited"&&!a?"hidden":void 0},k4e[D],p,i.props.style),ref:_},k))}))});Xle.muiSupportAuto=!0;const GI=Xle,F4e=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","
207slots","type"],B4e=t=>{const{classes:e,disableUnderline:n}=t,o=Lt({root:["root",!n&&"underline"],input:["input"]},PHe,e);return X({},e,o)},$4e=$e(wF,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...EF(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),X({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${jy.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${jy.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${jy.disabled}, .${jy.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${jy.disabled}:before`]:{borderBottomStyle:"dotted"}})}),H4e=$e(AF,{name:"MuiInput",slot:"Input",overridesResolver:xF})({}),Kle=C.forwardRef(function(e,n){var r,o,i,s;const a=Ht({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:h="input",multiline:f=!1,slotProps:p,slots:m={},type:y="text"}=a,v=at(a,F4e),b=B4e(a),w={root:{ownerState:{disableUnderline:l}}},A=p??u?Oc(p??u,w):w,_=(r=(o=m.root)!=null?o:c.Root)!=null?r:$4e,P=(i=(s=m.input)!=null?s:c.Input)!=null?i:H4e;return g(QC,X({slots:{root:_,input:P},slotProps:A,fullWidth:d,inputComponent:h,multiline:f,ref:n,type:y},v,{classes:b}))});Kle.muiName="Input";const J1=Kle;function U4e(t){return Ft("MuiInputAdornment",t)}const z4e=Dt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),JX=z4e;var eK;const V4e=["children","className","component","disablePointerEvents","disableTypography","position","variant"],G4e=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${ht(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},W4e=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:s}=t,a={root:["root",n&&"disablePointerEvents",o&&`position${ht(o)}`,s,r&&"hiddenLabel",i&&`size${ht(i)}`]};return Lt(a,U4e,e)},j4e=$e("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:G4e})(({theme:t,ownerState:e})=>X({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},e.variant==="filled"&&{[`&.${JX.positionStart}&:not(.${JX.hiddenLabel})`]:{marginTop:16}},e.position==="start"&&{marginRight:8},e.position==="end"&&{marginLeft:8},e.disablePointerEvents===!0&&{pointerEvents:"none"})),q4e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiInputAdornment"}),{children:o,className:i,component:s="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:c,variant:u}=r,d=at(r,V4e),h=Zp()||{};let f=u;u&&h.variant,h&&!f&&(f=h.variant);const p=X({},r,{hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:a,position:c,variant:f}),m=W4e(p);return g(SF.Provider,{value:null,children:g(j4e,X({as:s,ownerState:p,className:Ye(m.root,i),ref:n},d,{children:typeof o=="string"&&!l?g(Ke,{color:"text.secondary",children:o}):K(C.Fragment,{children:[c==="start"?eK||(eK=g("span",{className:"notranslate",children:"â"})):null,o]})}))})}),qr=q4e;function Y4e(t){return Ft("MuiInputLabel",t)}Dt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const X4e=["disableAnimation","margin","shrink","variant","className"],K4e=t=>{const{classes:e,formControl:n,size:r,shrink:o,disableAnimation:i,variant:s,required:a}=t,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${ht(r)}`,s],asterisk:[a&&"asterisk"]},c=Lt(l,Y4e,e);return X({},e,c)},Q4e=$e(v4e,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${L_.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>X({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&X({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&X({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7
207px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&X({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Z4e=C.forwardRef(function(e,n){const r=Ht({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,shrink:i,className:s}=r,a=at(r,X4e),l=Zp();let c=i;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=y0({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=X({},r,{disableAnimation:o,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),h=K4e(d);return g(Q4e,X({"data-shrink":c,ownerState:d,ref:n,className:Ye(h.root,s)},a,{classes:h}))}),_F=Z4e;function J4e(t){return Ft("MuiLinearProgress",t)}Dt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const eze=["className","color","value","valueBuffer","variant"];let ow=t=>t,tK,nK,rK,oK,iK,sK;const r4=4,tze=_f(tK||(tK=ow` 208 0% { 209 left: -35%; 210 right: 100%; 211 } 212 213 60% { 214 left: 100%; 215 right: -90%; 216 } 217 218 100% { 219 left: 100%; 220 right: -90%; 221 } 222`)),nze=_f(nK||(nK=ow` 223 0% { 224 left: -200%; 225 right: 100%; 226 } 227 228 60% { 229 left: 107%; 230 right: -8%; 231 } 232 233 100% { 234 left: 107%; 235 right: -8%; 236 } 237`)),rze=_f(rK||(rK=ow` 238 0% { 239 opacity: 1; 240 background-position: 0 -23px; 241 } 242 243 60% { 244 opacity: 0; 245 background-position: 0 -23px; 246 } 247 248 100% { 249 opacity: 1; 250 background-position: -200px -23px; 251 } 252`)),oze=t=>{const{classes:e,variant:n,color:r}=t,o={root:["root",`color${ht(r)}`,n],dashed:["dashed",`dashedColor${ht(r)}`],bar1:["bar",`barColor${ht(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${ht(r)}`,n==="buffer"&&`color${ht(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Lt(o,J4e,e)},uW=(t,e)=>e==="inherit"?"currentColor":t.vars?t.vars.palette.LinearProgress[`${e}Bg`]:t.palette.mode==="light"?q1(t.palette[e].main,.62):j1(t.palette[e].main,.5),ize=$e("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${ht(n.color)}`],e[n.variant]]}})(({ownerState:t,theme:e})=>X({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:uW(e,t.color)},t.color==="inherit"&&t.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},t.variant==="buffer"&&{backgroundColor:"transparent"},t.variant==="query"&&{transform:"rotate(180deg)"})),sze=$e("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.dashed,e[`dashedColor${ht(n.color)}`]]}})(({ownerState:t,theme:e})=>{const n=uW(e,t.color);return X({position:"absolute",marginTop:0,height:"100%",width:"100%"},t.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},vm(oK||(oK=ow` 253 animation: ${0} 3s infinite linear; 254 `),rze)),aze=$e("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.bar,e[`barColor${ht(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&e.bar1Indeterminate,n.variant==="determinate"&&e.bar1Determinate,n.variant==="buffer"&&e.bar1Buffer]}})(({ownerState:t,theme:e})=>X({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:t.color==="inherit"?"currentColor":(e.vars||e).palette[t.color].main},t.variant==="determinate"&&{transition:`transform .${r4}s linear`},t.variant==="buffer"&&{zIndex:1,transition:`transform .${r4}s linear`}),({ownerState:t})=>(t.variant==="indeterminate"||t.variant==="query")&&vm(iK||(iK=ow` 255 width: auto; 256 animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; 257 `),tze)),lze=$e("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.bar,e[`barColor${ht(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&e.bar2Indeterminate,n.variant==="buffer"&&e.bar2Buffer]}})(({ownerState:t,theme:e})=>X({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},t.variant!=="buffer"&&{backgroundColor:t.color==="inherit"?"currentColor":(e.vars||e).palette[t.color].main},t.color==="inherit"&&{opacity:.3},t.variant==="buffer"&&{backgroundColor:uW(e,t.color),transition:`transform .${r4}s linear`}),({ownerState:t})=>(t.variant==="indeterminate"||t.variant==="query")&&vm(sK||(sK=ow` 258 width: auto; 259 animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; 260 `),nze)),cze=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:s,valueBuffer:a,variant:l="indeterminate"}=r,c=at(r,eze),u=X({},r,{color:i,variant:l}),d=oze(u),h=ic(),f={},p={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&s!==void 0){f["aria-valuenow"]=Math.round(s),f["aria-valuemin"]=0,f["aria-valuemax"]=100;let m=s-100;h&&(m=-m),p.bar1.transform=`translateX(${m}%)`}if(l==="buffer"&&a!==void 0){let m=(a||0)-100;h&&(m=-m),p.bar2.transform=`translateX(${m}%)`}return K(ize,X({className:Ye(d.root,o),ownerState:u,role:"progressbar"},f,{ref:n}
vendor: 19,639 bytes, line 260
260,c,{children:[l==="buffer"?g(sze,{className:d.dashed,ownerState:u}):null,g(aze,{className:d.bar1,ownerState:u,style:p.bar1}),l==="determinate"?null:g(lze,{className:d.bar2,ownerState:u,style:p.bar2})]}))}),uze=cze;function dze(t){return Ft("MuiLink",t)}const hze=Dt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),fze=hze,Qle={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},pze=t=>Qle[t]||t,gze=({theme:t,ownerState:e})=>{const n=pze(e.color),r=G1(t,`palette.${n}`,!1)||e.color,o=G1(t,`palette.${n}Channel`);return"vars"in t&&o?`rgba(${o} / 0.4)`:ar(r,.4)},mze=gze,yze=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],vze=t=>{const{classes:e,component:n,focusVisible:r,underline:o}=t,i={root:["root",`underline${ht(o)}`,n==="button"&&"button",r&&"focusVisible"]};return Lt(i,dze,e)},bze=$e(Ke,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${ht(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>X({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&X({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:mze({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${fze.focusVisible}`]:{outline:"auto"}})),Cze=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiLink"}),{className:o,color:i="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:h}=r,f=at(r,yze),{isFocusVisibleRef:p,onBlur:m,onFocus:y,ref:v}=gF(),[b,S]=C.useState(!1),w=Xr(n,v),A=O=>{m(O),p.current===!1&&S(!1),a&&a(O)},_=O=>{y(O),p.current===!0&&S(!0),l&&l(O)},P=X({},r,{color:i,component:s,focusVisible:b,underline:u,variant:d}),R=vze(P);return g(bze,X({color:i,className:Ye(R.root,o),classes:c,component:s,onBlur:A,onFocus:_,ref:w,ownerState:P,variant:d,sx:[...Object.keys(Qle).includes(i)?[]:[{color:i}],...Array.isArray(h)?h:[h]]},f))}),o4=Cze,Sze=C.createContext({}),hf=Sze;function Eze(t){return Ft("MuiList",t)}Dt("MuiList",["root","padding","dense","subheader"]);const xze=["children","className","component","dense","disablePadding","subheader"],wze=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return Lt({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Eze,e)},Aze=$e("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>X({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),Tze=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=at(r,xze),d=C.useMemo(()=>({dense:a}),[a]),h=X({},r,{component:s,dense:a,disablePadding:l}),f=wze(h);return g(hf.Provider,{value:d,children:K(Aze,X({as:s,className:Ye(f.root,i),ref:n,ownerState:h},u,{children:[c,o]}))})}),iw=Tze;function _ze(t){return Ft("MuiListItem",t)}const Ize=Dt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),AE=Ize;function Pze(t){return Ft("MuiListItemButton",t)}const Rze=Dt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),TE=Rze,Oze=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Nze=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},Mze=t=>{const{alignItems:e,classes:n,dense:r,disabled:o,disableGutters:i,divider:s,selected:a}=t,c=Lt({root:["root",r&&"dense",!i&&"gutters",s&&"divider",o&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Pze,n);return X({},n,c)},Dze=$e(ad,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Nze})(({theme:t,ownerState:e})=>X({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${TE.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${TE.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${TE.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${TE.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${TE.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),Lze=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:h=!1,className:f}=r,p=at(r,Oze),m=C.useContext(hf),y=C.useMemo(()=>({dense:l||m.dense||!1,alignItems:o,disableGutters:c}),[o,m.dense,l,c]),v=C.useRef(null);Ls(()=>{i&&v.current&&v.current.focus()},[i]);const b=X({},r,{alignItems:o,dense:y.dense,disableGutters:c,divider:u,selected:h}),S=Mze(b),w=Xr(v,n);return g(hf.Provider,{value:y,children:g(Dze,X({ref:w,href:p.href||p.to,component:(p.href||p.to)&&s==="div"?"button":s,focusVisibleClassName:Ye(S.focusVisible,d),ownerState:b,className:Ye(S.root,f)},p,{classes:S,children:a}))})}),WI=Lze;function kze(t){return Ft("MuiListItemSecondaryAction",t)}Dt("MuiListItemSecondaryAction",["root","disableGutters"]);const Fze=["className"],Bze=t=>{const{disableGutters:e,classes:n}=t;return Lt({root:["root",e&&"disableGutters"]},kze,n)},$ze=$e("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>X({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),Zle=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiListItemSecondaryAction"}),{className:o}=r,i=at(r,Fze),s=C.useContext(hf),a=X({},r,{disableGutters:s.disableGutters}),l=Bze(a);return g($ze,X({className:Ye(l.root,o),ownerState:a,ref:n},i))});Zle.muiName="ListItemSecondaryAction";const Hze=Zle,Uze=["className"],zze=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Vze=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},Gze=t=>{const{alignItems:e,button:n,classes:r,dense:o,disabled:i,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return Lt({root:["root",o&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",i&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},_ze,r)},Wze=$e("div",{name:"MuiListItem",slot:"Root",overridesResolver:Vze})(({theme:t,ownerState:e})=>X({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&X({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${TE.root}`]:{paddingRight:48}},{[`&.${AE.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${AE.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${AE.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${AE.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${AE.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),jze=$e("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),qze=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiListItem"}),{alignItems:o="center",autoFocus:i=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:h="li",ContainerProps:{className:f}={},dense:p=!1,disabled:m=!1,disableGutters:y=!1,disablePadding:v=!1,divider:b=!1,focusVisibleClassName:S,secondaryAction:w,selected:A=!1,slotProps:_={},slots:P={}}=r,R=at(r.ContainerProps,Uze),O=at(r,zze),N=C.useContext(hf),M=C.useMemo(()=>({dense:p||N.dense||!1,alignItems:o,disableGutters:y}),[o,N.dense,p,y]),L=C.useRef(null);Ls(()=>{i&&L.current&&L.current.focus()},[i]);const F=C.Children.toArray(a),$=F.length&&R_(F[F.length-1],["ListItemSecondaryAction"]),D=X({},r,{alignItems:o,autoFocus:i,button:s,dense:M.dense,disabled:m,disableGutters:y,disablePadding:v,divider:b,hasSecondaryAction:$,selected:A}),k=Gze(D),U=Xr(L,n),H=P.root||u.Root||Wze,V=_.root||d.root||{},q=X({className:Ye(k.root,V.className,l),disabled:m},O);let J=c||"li";return s&&(q.component=c||"div",q.focusVisibleClassName=Ye(AE.focusVisible,S),J=ad),$?(J=!q.component&&!c?"div":J,h==="li"&&(J==="li"?J="div":q.component==="li"&&(q.component="div")),g(hf.Provider,{value:M,children:K(jze,X({as:h,className:Ye(k.container,f),ref:U,ownerState:D},R,{children:[g(H,X({},V,!IC(H)&&{as:J,ownerState:X({},D,V.ownerState)},q,{children:F})),F.pop()]}))})):g(hf.Provider,{value:M,children:K(H,X({},V,{as:J,ref:U},!IC(H)&&{ownerState:X({},D,V.ownerState)},q,{children:[F,w&&g(Hze,{children:w})]}))})}),RC=qze;function Yze(t){return Ft("MuiListItemIcon",t)}const Xze=Dt("MuiListItemIcon",["root","alignItemsFlexStart"]),aK=Xze,Kze=["className"],Qze=t=>{const{alignItems:e,classes:n}=t;return Lt({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Yze,n)},Zze=$e("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>X({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),Jze=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiListItemIcon"}),{className:o}=r,i=at(r,Kze),s=C.useContext(hf),a=X({},r,{alignItems:s.alignItems}),l=Qze(a);return g(Zze,X({className:Ye(l.root,o),ownerState:a,ref:n},i))}),ff=Jze;function eVe(t){return Ft("MuiListItemText",t)}const tVe=Dt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),DL=tVe,nVe=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],rVe=t=>{const{classes:e,inset:n,primary:r,secondary:o,dense:i}=t;return Lt({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},eVe,e)},oVe=$e("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${DL.primary}`]:e.primary},{[`& .${DL.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>X({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),iVe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,h=at(r,nVe),{dense:f}=C.useContext(hf);let p=l??o,m=u;const y=X({},r,{disableTypography:s,inset:a,primary:!!p,secondary:!!m,dense:f}),v=rVe(y);return p!=null&&p.type!==Ke&&!s&&(p=g(Ke,X({variant:f?"body2":"body1",className:v.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:p}))),m!=null&&m.type!==Ke&&!s&&(m=g(Ke,X({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:m}))),K(oVe,X({className:Ye(v.root,i),ownerState:y,ref:n},h,{children:[p,m]}))}),Il=iVe,sVe=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function qH(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function lK(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function Jle(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function rT(t,e,n,r,o,i){let s=!1,a=o(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!Jle(a,i)||l)a=o(t,a,n);else return a.focus(),!0}return!1}const aVe=C.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,h=at(e,sVe),f=C.useRef(null),p=C.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Ls(()=>{o&&f.current.focus()},[o]),C.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,{direction:w})=>{const A=!f.current.style.width;if(S.clientHeight<f.current.clientHeight&&A){const _=`${qae(Ji(S))}px`;f.current.style[w==="rtl"?"paddingLeft":"paddingRight"]=_,f.current.style.width=`calc(100% + ${_})`}return f.current}}),[]);const m=S=>{const w=f.current,A=S.key,_=Ji(w).activeElement;if(A==="ArrowDown")S.preventDefault(),rT(w,_,c,l,qH);else if(A==="ArrowUp")S.preventDefault(),rT(w,_,c,l,lK);else if(A==="Home")S.preventDefault(),rT(w,null,c,l,qH);else if(A==="End")S.preventDefault(),rT(w,null,c,l,lK);else if(A.length===1){const P=p.current,R=A.toLowerCase(),O=performance.now();P.keys.length>0&&(O-P.lastTime>500?(P.keys=[],P.repeating=!0,P.previousKeyMatched=!0):P.repeating&&R!==P.keys[0]&&(P.repeating=!1)),P.lastTime=O,P.keys.push(R);const N=_&&!P.repeating&&Jle(_,P);P.previousKeyMatched&&(N||rT(w,_,!1,l,qH,P))?S.preventDefault():P.previousKeyMatched=!1}u&&u(S)},y=Xr(f,n);let v=-1;C.Children.forEach(s,(S,w)=>{if(!C.isValidElement(S)){v===w&&(v+=1,v>=s.length&&(v=-1));return}S.props.disabled||(d==="selectedMenu"&&S.props.selected||v===-1)&&(v=w),v===w&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const b=C.Children.map(s,(S,w)=>{if(w===v){const A={};return i&&(A.autoFocus=!0),S.props.tabIndex===void 0&&d==="selectedMenu"&&(A.tabIndex=0),C.cloneElement(S,A)}return S});return g(iw,X({role:"menu",ref:y,className:a,onKeyDown:m,tabIndex:o?0:-1},h,{children:b}))}),aR=aVe;function lVe(t){return Ft("MuiPopover",t)}Dt("MuiPopover",["root","paper"]);const cVe=["onEntering"],uVe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],dVe=["slotProps"];function cK(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function uK(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function dK(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function YH(t){return typeof t=="function"?t():t}const hVe=t=>{const{classes:e}=t;return Lt({root:["root"],paper:["paper"]},lVe,e)},fVe=$e(Vle,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),ece=$e(To,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),pVe=C.forwardRef(function(e,n){var r,o,i;const s=Ht({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:h,className:f,container:p,elevation:m=8,marginThreshold:y=16,open:v,PaperProps:b={},slots:S,slotProps:w,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:_=GI,transitionDuration:P="auto",TransitionProps:{onEntering:R}={},disableScrollLock:O=!1}=s,N=at(s.TransitionProps,cVe),M=at(s,uVe),L=(r=w?.paper)!=null?r:b,F=C.useRef(),$=Xr(F,L.ref),D=X({},s,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:y,externalPaperSlotProps:L,transformOrigin:A,TransitionComponent:_,transitionDuration:P,TransitionProps:N}),k=hVe(D),U=C.useCallback(()=>
260{if(d==="anchorPosition")return u;const pe=YH(l),ke=(pe&&pe.nodeType===1?pe:Ji(F.current).body).getBoundingClientRect();return{top:ke.top+cK(ke,c.vertical),left:ke.left+uK(ke,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),H=C.useCallback(pe=>({vertical:cK(pe,A.vertical),horizontal:uK(pe,A.horizontal)}),[A.horizontal,A.vertical]),V=C.useCallback(pe=>{const Be={width:pe.offsetWidth,height:pe.offsetHeight},ke=H(Be);if(d==="none")return{top:null,left:null,transformOrigin:dK(ke)};const Ne=U();let ot=Ne.top-ke.vertical,ce=Ne.left-ke.horizontal;const Ae=ot+Be.height,be=ce+Be.width,Se=$p(YH(l)),Pe=Se.innerHeight-y,Ue=Se.innerWidth-y;if(y!==null&&ot<y){const _e=ot-y;ot-=_e,ke.vertical+=_e}else if(y!==null&&Ae>Pe){const _e=Ae-Pe;ot-=_e,ke.vertical+=_e}if(y!==null&&ce<y){const _e=ce-y;ce-=_e,ke.horizontal+=_e}else if(be>Ue){const _e=be-Ue;ce-=_e,ke.horizontal+=_e}return{top:`${Math.round(ot)}px`,left:`${Math.round(ce)}px`,transformOrigin:dK(ke)}},[l,d,U,H,y]),[q,J]=C.useState(v),Q=C.useCallback(()=>{const pe=F.current;if(!pe)return;const Be=V(pe);Be.top!==null&&(pe.style.top=Be.top),Be.left!==null&&(pe.style.left=Be.left),pe.style.transformOrigin=Be.transformOrigin,J(!0)},[V]);C.useEffect(()=>(O&&window.addEventListener("scroll",Q),()=>window.removeEventListener("scroll",Q)),[l,O,Q]);const se=(pe,Be)=>{R&&R(pe,Be),Q()},oe=()=>{J(!1)};C.useEffect(()=>{v&&Q()}),C.useImperativeHandle(a,()=>v?{updatePosition:()=>{Q()}}:null,[v,Q]),C.useEffect(()=>{if(!v)return;const pe=rR(()=>{Q()}),Be=$p(l);return Be.addEventListener("resize",pe),()=>{pe.clear(),Be.removeEventListener("resize",pe)}},[l,v,Q]);let ie=P;P==="auto"&&!_.muiSupportAuto&&(ie=void 0);const ee=p||(l?Ji(YH(l)).body:void 0),re=(o=S?.root)!=null?o:fVe,fe=(i=S?.paper)!=null?i:ece,we=ao({elementType:fe,externalSlotProps:X({},L,{style:q?L.style:X({},L.style,{opacity:0})}),additionalProps:{elevation:m,ref:$},ownerState:D,className:Ye(k.paper,L?.className)}),xe=ao({elementType:re,externalSlotProps:w?.root||{},externalForwardedProps:M,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:ee,open:v},ownerState:D,className:Ye(k.root,f)}),{slotProps:ve}=xe,Re=at(xe,dVe);return g(re,X({},Re,!IC(re)&&{slotProps:ve,disableScrollLock:O},{children:g(_,X({appear:!0,in:v,onEntering:se,onExited:oe,timeout:ie},N,{children:g(fe,X({},we,{children:h}))}))}))}),lR=pVe;function gVe(t){return Ft("MuiMenu",t)}Dt("MuiMenu",["root","paper","list"]);const mVe=["onEntering"],yVe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],vVe={vertical:"top",horizontal:"right"},bVe={vertical:"top",horizontal:"left"},CVe=t=>{const{classes:e}=t;return Lt({root:["root"],paper:["paper"],list:["list"]},gVe,e)},SVe=$e(lR,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),EVe=$e(ece,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),xVe=$e(aR,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),wVe=C.forwardRef(function(e,n){var r,o;const i=Ht({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:h,PaperProps:f={},PopoverClasses:p,transitionDuration:m="auto",TransitionProps:{onEntering:y}={},variant:v="selectedMenu",slots:b={},slotProps:S={}}=i,w=at(i.TransitionProps,mVe),A=at(i,yVe),_=ic(),P=X({},i,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:y,PaperProps:f,transitionDuration:m,TransitionProps:w,variant:v}),R=CVe(P),O=s&&!c&&h,N=C.useRef(null),M=(H,V)=>{N.current&&N.current.adjustStyleForScrollbar(H,{direction:_?"rtl":"ltr"}),y&&y(H,V)},L=H=>{H.key==="Tab"&&(H.preventDefault(),d&&d(H,"tabKeyDown"))};let F=-1;C.Children.map(a,(H,V)=>{C.isValidElement(H)&&(H.props.disabled||(v==="selectedMenu"&&H.props.selected||F===-1)&&(F=V))});const $=(r=b.paper)!=null?r:EVe,D=(o=S.paper)!=null?o:f,k=ao({elementType:b.root,externalSlotProps:S.root,ownerState:P,className:[R.root,l]}),U=ao({elementType:$,externalSlotProps:D,ownerState:P,className:R.paper});return g(SVe,X({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:_?"right":"left"},transformOrigin:_?vVe:bVe,slots:{paper:$,root:b.root},slotProps:{root:k,paper:U},open:h,ref:n,transitionDuration:m,TransitionProps:X({onEntering:M},w),ownerState:P},A,{classes:p,children:g(xVe,X({onKeyDown:L,actions:N,autoFocus:s&&(F===-1||c),autoFocusItem:O,variant:v},u,{className:Ye(R.list,u.className),children:a}))}))}),Es=wVe;function AVe(t){return Ft("MuiMenuItem",t)}const TVe=Dt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),oT=TVe,_Ve=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],IVe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},PVe=t=>{const{disabled:e,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=t,l=Lt({root:["root",n&&"dense",e&&"disabled",!o&&"gutters",r&&"divi
260der",i&&"selected"]},AVe,s);return X({},s,l)},RVe=$e(ad,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:IVe})(({theme:t,ownerState:e})=>X({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${oT.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${oT.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${oT.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${oT.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${oT.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${YX.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${YX.inset}`]:{marginLeft:52},[`& .${DL.root}`]:{marginTop:0,marginBottom:0},[`& .${DL.inset}`]:{paddingLeft:36},[`& .${aK.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&X({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${aK.root} svg`]:{fontSize:"1.25rem"}}))),OVe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:h}=r,f=at(r,_Ve),p=C.useContext(hf),m=C.useMemo(()=>({dense:s||p.dense||!1,disableGutters:l}),[p.dense,s,l]),y=C.useRef(null);Ls(()=>{o&&y.current&&y.current.focus()},[o]);const v=X({},r,{dense:m.dense,divider:a,disableGutters:l}),b=PVe(r),S=Xr(y,n);let w;return r.disabled||(w=d!==void 0?d:-1),g(hf.Provider,{value:m,children:g(RVe,X({ref:S,role:u,tabIndex:w,component:i,focusVisibleClassName:Ye(b.focusVisible,c),className:Ye(b.root,h)},f,{ownerState:v,classes:b}))})}),mr=OVe;function NVe(t){return Ft("MuiNativeSelect",t)}const MVe=Dt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),dW=MVe,DVe=["className","disabled","error","IconComponent","inputRef","variant"],LVe=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${ht(n)}`,i&&"iconOpen",r&&"disabled"]};return Lt(a,NVe,e)},tce=({ownerState:t,theme:e})=>X({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":X({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${dW.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),kVe=$e("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:el,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${dW.multiple}`]:e.multiple}]}})(tce),nce=({ownerState:t,theme:e})=>X({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${dW.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),FVe=$e("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${ht(n.variant)}`],n.open&&e.iconOpen]}})(nce),BVe=C.forwardRef(function(e,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:a,variant:l="standard"}=e,c=at(e,DVe),u=X({},e,{disabled:o,variant:l,error:i}),d=LVe(u);return K(C.Fragment,{children:[g(kVe,X({ownerState:u,className:Ye(d.select,r),disabled:o,ref:a||n},c)),e.multiple?null:g(FVe,{as:s,ownerState:u,className:d.icon})]})}),$Ve=BVe;var hK;const HVe=["children","classes","className","label","notched"],UVe=$e("fieldset",{shouldForwardProp:el})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),zVe=$e("legend",{shouldForwardProp:el})(({ownerState:t,theme:e})=>X({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&X({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function VVe(t){const{className:e,label:n,notched:r}=t,o=at(t,HVe),i=n!=null&&n!=="",s=X({},t,{notched:r,withLabel:i});
260return g(UVe,X({"aria-hidden":!0,className:e,ownerState:s},o,{children:g(zVe,{ownerState:s,children:i?g("span",{children:n}):hK||(hK=g("span",{className:"notranslate",children:"â"}))})}))}const GVe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],WVe=t=>{const{classes:e}=t,r=Lt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},OHe,e);return X({},e,r)},jVe=$e(wF,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:EF})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return X({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${cp.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${cp.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${cp.focused} .${cp.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${cp.error} .${cp.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${cp.disabled} .${cp.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&X({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),qVe=$e(VVe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),YVe=$e(AF,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:xF})(({theme:t,ownerState:e})=>X({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),rce=C.forwardRef(function(e,n){var r,o,i,s,a;const l=Ht({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:h,multiline:f=!1,notched:p,slots:m={},type:y="text"}=l,v=at(l,GVe),b=WVe(l),S=Zp(),w=y0({props:l,muiFormControl:S,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=X({},l,{color:w.color||"primary",disabled:w.disabled,error:w.error,focused:w.focused,formControl:S,fullWidth:u,hiddenLabel:w.hiddenLabel,multiline:f,size:w.size,type:y}),_=(r=(o=m.root)!=null?o:c.Root)!=null?r:jVe,P=(i=(s=m.input)!=null?s:c.Input)!=null?i:YVe;return g(QC,X({slots:{root:_,input:P},renderSuffix:R=>g(qVe,{ownerState:A,className:b.notchedOutline,label:h!=null&&h!==""&&w.required?a||(a=K(C.Fragment,{children:[h,"â","*"]})):h,notched:typeof p<"u"?p:!!(R.startAdornment||R.filled||R.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:n,type:y},v,{classes:X({},b,{notchedOutline:null})}))});rce.muiName="Input";const hW=rce,XVe=gt(g("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),KVe=gt(g("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),QVe=gt(g("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),ZVe=gt(g("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),JVe=$e("span",{shouldForwardProp:el})({position:"relative",display:"flex"}),eGe=$e(QVe)({transform:"scale(1)"}),tGe=$e(ZVe)(({theme:t,ownerState:e})=>X({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},e.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})}));function oce(t){const{checked:e=!1,classes:n={},fontSize:r}=t,o=X({},t,{checked:e});return K(JVe,{className:n.root,ownerState:o,children:[g(eGe,{fontSize:r,className:n.background,ownerState:o}),g(tGe,{fontSize:r,className:n.dot,ownerState:o})]})}const nGe=C.createContext(void 0),ice=nGe;function rGe(){return C.useContext(ice)}function oGe(t){return Ft("MuiRadio",t)}const iGe=Dt("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),fK=iGe,sGe=["checked","checkedIcon","color","icon","name","onChange","size","className"],aGe=t=>{const{classes:e,color:n,size:r}=t,o={root:["root",`color${ht(n)}`,r!=="medium"&&`size${ht(r)}`]};return X({},e,Lt(o,oGe,e))},lGe=$e(cW,{shouldForwardProp:t=>el(t)||t==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size!=="medium"&&e[`size${ht(n.size)}`],e[`color${ht(n.color)}`]]}})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainCh
260annel} / ${t.vars.palette.action.hoverOpacity})`:ar(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${fK.checked}`]:{color:(t.vars||t).palette[e.color].main}},{[`&.${fK.disabled}`]:{color:(t.vars||t).palette.action.disabled}}));function cGe(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}const pK=g(oce,{checked:!0}),gK=g(oce,{}),uGe=C.forwardRef(function(e,n){var r,o;const i=Ht({props:e,name:"MuiRadio"}),{checked:s,checkedIcon:a=pK,color:l="primary",icon:c=gK,name:u,onChange:d,size:h="medium",className:f}=i,p=at(i,sGe),m=X({},i,{color:l,size:h}),y=aGe(m),v=rGe();let b=s;const S=IL(d,v&&v.onChange);let w=u;return v&&(typeof b>"u"&&(b=cGe(v.value,i.value)),typeof w>"u"&&(w=v.name)),g(lGe,X({type:"radio",icon:C.cloneElement(c,{fontSize:(r=gK.props.fontSize)!=null?r:h}),checkedIcon:C.cloneElement(a,{fontSize:(o=pK.props.fontSize)!=null?o:h}),ownerState:m,classes:y,name:w,checked:b,onChange:S,ref:n,className:Ye(y.root,f)},p))}),jI=uGe;function dGe(t){return Ft("MuiRadioGroup",t)}Dt("MuiRadioGroup",["root","row","error"]);const hGe=["actions","children","className","defaultValue","name","onChange","value"],fGe=t=>{const{classes:e,row:n,error:r}=t;return Lt({root:["root",n&&"row",r&&"error"]},dGe,e)},pGe=C.forwardRef(function(e,n){const{actions:r,children:o,className:i,defaultValue:s,name:a,onChange:l,value:c}=e,u=at(e,hGe),d=C.useRef(null),h=fGe(e),[f,p]=Ka({controlled:c,default:s,name:"RadioGroup"});C.useImperativeHandle(r,()=>({focus:()=>{let b=d.current.querySelector("input:not(:disabled):checked");b||(b=d.current.querySelector("input:not(:disabled)")),b&&b.focus()}}),[]);const m=Xr(n,d),y=sd(a),v=C.useMemo(()=>({name:y,onChange(b){p(b.target.value),l&&l(b,b.target.value)},value:f}),[y,l,p,f]);return g(ice.Provider,{value:v,children:g(r4e,X({role:"radiogroup",ref:m,className:Ye(h.root,i)},u,{children:o}))})}),sce=pGe;function gGe(t){return Ft("MuiSelect",t)}const mGe=Dt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),iT=mGe;var mK;const yGe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],vGe=$e("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${iT.select}`]:e.select},{[`&.${iT.select}`]:e[n.variant]},{[`&.${iT.error}`]:e.error},{[`&.${iT.multiple}`]:e.multiple}]}})(tce,{[`&.${iT.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),bGe=$e("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${ht(n.variant)}`],n.open&&e.iconOpen]}})(nce),CGe=$e("input",{shouldForwardProp:t=>lle(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function yK(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function SGe(t){return t==null||typeof t=="string"&&!t.trim()}const EGe=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${ht(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Lt(a,gGe,e)},xGe=C.forwardRef(function(e,n){var r;const{"aria-describedby":o,"aria-label":i,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:h,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:y,labelId:v,MenuProps:b={},multiple:S,name:w,onBlur:A,onChange:_,onClose:P,onFocus:R,onOpen:O,open:N,readOnly:M,renderValue:L,SelectDisplayProps:F={},tabIndex:$,value:D,variant:k="standard"}=e,U=at(e,yGe),[H,V]=Ka({controlled:D,default:d,name:"Select"}),[q,J]=Ka({controlled:N,default:u,name:"Select"}),Q=C.useRef(null),se=C.useRef(null),[oe,ie]=C.useState(null),{current:ee}=C.useRef(N!=null),[re,fe]=C.useState(),we=Xr(n,y),xe=C.useCallback(Ie=>{se.current=Ie,Ie&&ie(Ie)},[]),ve=oe?.parentNode;C.useImperativeHandle(we,()=>({focus:()=>{se.current.focus()},node:Q.current,value:H}),[H]),C.useEffect(()=>{u&&q&&oe&&!ee&&(fe(a?null:ve.clientWidth),se.current.focus())},[oe,a]),C.useEffect(()=>{s&&se.current.focus()},[s]),C.useEffect(()=>{if(!v)return;const Ie=Ji(se.current).getElementById(v);if(Ie){const et=()=>{getSelection().isCollapsed&&se.current.focus()};return Ie.addEventListener("click",et),()=>{Ie.removeEventListener("click",et)}}},[v]);const Re=(Ie,et)=>{Ie?O&&O(et):P&&P(et),ee||(fe(a?null:ve.clientWidth),J(Ie))},pe=Ie=>{Ie.button===0&&(Ie.preventDefault(),se.current.focus(),Re(!0,Ie))},Be=Ie=>{Re(!1,Ie)},ke=C.Children.toArray(l),Ne=Ie=>{const et=ke.find(je=>je.props.value===Ie.target.value);et!==void 0&&(V(et.props.value),_&&_(Ie,et))},ot=Ie=>et=>{let je;if(et.currentTarget.hasAttribute("tabindex")){if(S){je=Array.isArray(H)?H.slice():[];const it=H.indexOf(Ie.props.value);it===-1?je.push(Ie.props.value):je.splice(it,1)}else je=Ie.props.value;if(Ie.props.onClick&&Ie.props.onClick(et),H!==je&&(V(je),_)){const it=et.nativeEvent||et,xt=new it.constructor(it.type,it);Object.defineProperty(xt,"target",{writable:!0,value:{value:je,name:w}}),_(xt,Ie)}S||Re(!1,et)}},ce=Ie=>{M||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ie.key)!==-1&&(Ie.preventDefault(),Re(!0,Ie))},Ae=oe!==null&&q,be=Ie=>{!Ae&&A&&(Object.defineProperty(Ie,"target",{writable:!0,value:{value:H,name:w}}),A(Ie))};delete U["aria-invalid"];let Se,Pe;const Ue=[];let _e=!1;(ML({value:H})||f)&&(L?Se=L(H):_e=!0);const Oe=ke.map(Ie=>{if(!C.isValidElement(Ie))return null;let et;if(S){if(!Array.isArray(H))throw new Error(ym(2));et=H.some(je=>
260yK(je,Ie.props.value)),et&&_e&&Ue.push(Ie.props.children)}else et=yK(H,Ie.props.value),et&&_e&&(Pe=Ie.props.children);return C.cloneElement(Ie,{"aria-selected":et?"true":"false",onClick:ot(Ie),onKeyUp:je=>{je.key===" "&&je.preventDefault(),Ie.props.onKeyUp&&Ie.props.onKeyUp(je)},role:"option",selected:et,value:void 0,"data-value":Ie.props.value})});_e&&(S?Ue.length===0?Se=null:Se=Ue.reduce((Ie,et,je)=>(Ie.push(et),je<Ue.length-1&&Ie.push(", "),Ie),[]):Se=Pe);let ze=re;!a&&ee&&oe&&(ze=ve.clientWidth);let ne;typeof $<"u"?ne=$:ne=h?null:0;const W=F.id||(w?`mui-component-select-${w}`:void 0),j=X({},e,{variant:k,value:H,open:Ae,error:p}),ue=EGe(j),he=X({},b.PaperProps,(r=b.slotProps)==null?void 0:r.paper),Ce=sd();return K(C.Fragment,{children:[g(vGe,X({ref:xe,tabIndex:ne,role:"combobox","aria-controls":Ce,"aria-disabled":h?"true":void 0,"aria-expanded":Ae?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,W].filter(Boolean).join(" ")||void 0,"aria-describedby":o,onKeyDown:ce,onMouseDown:h||M?null:pe,onBlur:be,onFocus:R},F,{ownerState:j,className:Ye(F.className,ue.select,c),id:W,children:SGe(Se)?mK||(mK=g("span",{className:"notranslate",children:"â"})):Se})),g(CGe,X({"aria-invalid":p,value:Array.isArray(H)?H.join(","):H,name:w,ref:Q,"aria-hidden":!0,onChange:Ne,tabIndex:-1,disabled:h,className:ue.nativeInput,autoFocus:s,ownerState:j},U)),g(bGe,{as:m,className:ue.icon,ownerState:j}),g(Es,X({id:`menu-${w||""}`,anchorEl:ve,open:Ae,onClose:Be,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:X({"aria-labelledby":v,role:"listbox","aria-multiselectable":S?"true":void 0,disableListWrap:!0,id:Ce},b.MenuListProps),slotProps:X({},b.slotProps,{paper:X({},he,{style:X({minWidth:ze},he!=null?he.style:null)})}),children:Oe}))]})}),wGe=xGe,AGe=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],TGe=["root"],_Ge=t=>{const{classes:e}=t;return e},fW={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>el(t)&&t!=="variant",slot:"Root"},IGe=$e(J1,fW)(""),PGe=$e(hW,fW)(""),RGe=$e(qle,fW)(""),ace=C.forwardRef(function(e,n){const r=Ht({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=kle,id:d,input:h,inputProps:f,label:p,labelId:m,MenuProps:y,multiple:v=!1,native:b=!1,onClose:S,onOpen:w,open:A,renderValue:_,SelectDisplayProps:P,variant:R="outlined"}=r,O=at(r,AGe),N=b?$Ve:wGe,M=Zp(),L=y0({props:r,muiFormControl:M,states:["variant","error"]}),F=L.variant||R,$=X({},r,{variant:F,classes:s}),D=_Ge($),k=at(D,TGe),U=h||{standard:g(IGe,{ownerState:$}),outlined:g(PGe,{label:p,ownerState:$}),filled:g(RGe,{ownerState:$})}[F],H=Xr(n,U.ref);return g(C.Fragment,{children:C.cloneElement(U,X({inputComponent:N,inputProps:X({children:i,error:L.error,IconComponent:u,variant:F,type:void 0,multiple:v},b?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:y,onClose:S,onOpen:w,open:A,renderValue:_,SelectDisplayProps:X({id:d},P)},f,{classes:f?Oc(k,f.classes):k},h?h.props.inputProps:{})},(v&&b||c)&&F==="outlined"?{notched:!0}:{},{ref:H,className:Ye(U.props.className,a,D.root)},!h&&{variant:F},O))})});ace.muiName="Select";const xa=ace;function OGe(t){return Ft("MuiSkeleton",t)}Dt("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const NGe=["animation","className","component","height","style","variant","width"];let LL=t=>t,vK,bK,CK,SK;const MGe=t=>{const{classes:e,variant:n,animation:r,hasChildren:o,width:i,height:s}=t;return Lt({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!s&&"heightAuto"]},OGe,e)},DGe=_f(vK||(vK=LL` 261 0% { 262 opacity: 1; 263 } 264 265 50% { 266 opacity: 0.4; 267 } 268 269 100% { 270 opacity: 1; 271 } 272`)),LGe=_f(bK||(bK=LL` 273 0% { 274 transform: translateX(-100%); 275 } 276 277 50% { 278 /* +0.5s of delay between each loop */ 279 transform: translateX(100%); 280 } 281 282 100% { 283 transform: translateX(100%); 284 }
285`)),kGe=$e("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],n.animation!==!1&&e[n.animation],n.hasChildren&&e.withChildren,n.hasChildren&&!n.width&&e.fitContent,n.hasChildren&&!n.height&&e.heightAuto]}})(({theme:t,ownerState:e})=>{const n=U2e(t.shape.borderRadius)||"px",r=z2e(t.shape.borderRadius);return X({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:Tl(t.palette.text.primary,t.palette.mode==="light"?.11:.13),height:"1.2em"},e.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},e.variant==="circular"&&{borderRadius:"50%"},e.variant==="rounded"&&{borderRadius:(t.vars||t).shape.borderRadius},e.hasChildren&&{"& > *":{visibility:"hidden"}},e.hasChildren&&!e.width&&{maxWidth:"fit-content"},e.hasChildren&&!e.height&&{height:"auto"})},({ownerState:t})=>t.animation==="pulse"&&vm(CK||(CK=LL` 286 animation: ${0} 2s ease-in-out 0.5s infinite; 287 `),DGe),({ownerState:t,theme:e})=>t.animation==="wave"&&vm(SK||(SK=LL` 288 position: relative; 289 overflow: hidden; 290 291 /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ 292 -webkit-mask-image: -webkit-radial-gradient(white, black); 293 294 &::after { 295 animation: ${0} 2s linear 0.5s infinite; 296 background: linear-gradient( 297 90deg, 298 transparent, 299 ${0}, 300 transparent 301 ); 302 content: ''; 303 position: absolute; 304 transform: translateX(-100%); /* Avoid flash during server-side hydration */ 305 bottom: 0; 306 left: 0; 307 right: 0; 308 top: 0; 309 } 310 `),LGe,(e.vars||e).palette.action.hover)),FGe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:s="span",height:a,style:l,variant:c="text",width:u}=r,d=at(r,NGe),h=X({},r,{animation:o,component:s,variant:c,hasChildren:!!d.children}),f=MGe(h);return g(kGe,X({as:s,ref:n,className:Ye(f.root,i),ownerState:h},d,{style:X({width:u,height:a},l)}))}),BGe=FGe;function $Ge(t){return Ft("MuiTooltip",t)}const HGe=Dt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),rv=HGe,UGe=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function zGe(t){return Math.round(t*1e5)/1e5}const VGe=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:o,placement:i}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${ht(i.split("-")[0])}`],arrow:["arrow"]};return Lt(s,$Ge,e)},GGe=$e(g0,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>X({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${rv.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${rv.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${rv.arrow}`]:X({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${rv.arrow}`]:X({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),WGe=$e("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${ht(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>X({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:ar(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${zGe(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${rv.popper}[data-popper-placement*="left"] &`]:X({transformOrigin:"right center"},e.isRtl?X({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):X({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${rv.popper}[data-popper-placement*="right"] &`]:X({transformOrigin:"left center"},e.isRtl?X({marginRight:"14px"},e.touch&&{marginRight:"24px"}):X({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${rv.popper}[data-popper-placement*="top"] &`]:X({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${rv.popper}[data-popper-placement*="bottom"] &`]:X({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),jGe=$e("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:ar(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let PN=!1;const EK=new zG;let sT={x:0,y:0};function RN(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const qGe=C.forwardRef(function(e,n){var r,o,i,s,a,l,c,u,d,h,f,p,m,y,v,b,S,w,A;const _=Ht({props:e,name:"MuiTooltip"}),{arrow:P=!1,children:R,components:O={},componentsProps:N={},describeChild:M=!1,disableFocusListener:L=!1,disableHoverListener:F=!1,disableInteractive:$=!1,disableTouchListener:D=!1,enterDelay:k=100,enterNextDelay:U=0,enterTouchDelay:H=700,followCursor:V=!1,id:q,leaveDelay:J=0,leaveTouchDelay:Q=1500,onClose:se,onOpen:oe,open:ie,placement:ee="bottom",PopperComponent:re,PopperProps:fe={},slotProps:we={},slots:xe={},title:ve,TransitionComponent:Re=GI,TransitionProps:pe}=_,Be=at(_,UGe),ke=C.isValidElement(R)?R:g("span",{children:R}),Ne=Tu(),ot=ic(),[ce,Ae]=C.useState(),[be,Se]=C.useState(null),Pe=C.useRef(!1),Ue=$||V,_e=Hb(),Oe=Hb(),ze=Hb(),ne=Hb(),[W,j]=Ka({controlled:ie,default:!1,name:"Tooltip",state:"open"});let ue=W;const he=sd(q),Ce=C.useRef(),Ie=mn(()=>{Ce.current!==void 0&&(document.body.style.WebkitUserSelect=Ce.current,Ce.current=void 0),ne.clear()});C.useEffect(()=>Ie,[Ie]);const et=an=>{EK.clear(),PN=!0,j(!0),oe&&!ue&&oe(an)},je=mn(an=>{EK.start(800+J,()=>{PN=!1}),j(!1),se&&ue&&se(an),_e.start(Ne.transitions.duration.shortest,()=>{Pe.current=!1})}),it=an=>{Pe.current&&an.type!=="touchstart"||(ce&&ce.removeAttribute("title"),Oe.clear(),ze.clear(),k||PN&&U?Oe.start(PN?U:k,()=>{et(an)}):et(an))},xt=an=>{Oe.clear(),ze.start(J,()=>{je(an)})},{isFocusVisibleRef:rt,onBlur:Bt,onFocus:dn,ref:kn}=gF(),[,jn]=C.useState(!1),Cr=an=>
vendor: 5,502 bytes, line 310
310{Bt(an),rt.current===!1&&(jn(!1),xt(an))},Xn=an=>{ce||Ae(an.currentTarget),dn(an),rt.current===!0&&(jn(!0),it(an))},Wo=an=>{Pe.current=!0;const tr=ke.props;tr.onTouchStart&&tr.onTouchStart(an)},jo=an=>{Wo(an),ze.clear(),_e.clear(),Ie(),Ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ne.start(H,()=>{document.body.style.WebkitUserSelect=Ce.current,it(an)})},ri=an=>{ke.props.onTouchEnd&&ke.props.onTouchEnd(an),Ie(),ze.start(Q,()=>{je(an)})};C.useEffect(()=>{if(!ue)return;function an(tr){(tr.key==="Escape"||tr.key==="Esc")&&je(tr)}return document.addEventListener("keydown",an),()=>{document.removeEventListener("keydown",an)}},[je,ue]);const Pu=Xr(ke.ref,kn,Ae,n);!ve&&ve!==0&&(ue=!1);const ta=C.useRef(),oi=an=>{const tr=ke.props;tr.onMouseMove&&tr.onMouseMove(an),sT={x:an.clientX,y:an.clientY},ta.current&&ta.current.update()},Qr={},ft=typeof ve=="string";M?(Qr.title=!ue&&ft&&!F?ve:null,Qr["aria-describedby"]=ue?he:null):(Qr["aria-label"]=ft?ve:null,Qr["aria-labelledby"]=ue&&!ft?he:null);const Ot=X({},Qr,Be,ke.props,{className:Ye(Be.className,ke.props.className),onTouchStart:Wo,ref:Pu},V?{onMouseMove:oi}:{}),Wt={};D||(Ot.onTouchStart=jo,Ot.onTouchEnd=ri),F||(Ot.onMouseOver=RN(it,Ot.onMouseOver),Ot.onMouseLeave=RN(xt,Ot.onMouseLeave),Ue||(Wt.onMouseOver=it,Wt.onMouseLeave=xt)),L||(Ot.onFocus=RN(Xn,Ot.onFocus),Ot.onBlur=RN(Cr,Ot.onBlur),Ue||(Wt.onFocus=Xn,Wt.onBlur=Cr));const sn=C.useMemo(()=>{var an;let tr=[{name:"arrow",enabled:!!be,options:{element:be,padding:4}}];return(an=fe.popperOptions)!=null&&an.modifiers&&(tr=tr.concat(fe.popperOptions.modifiers)),X({},fe.popperOptions,{modifiers:tr})},[be,fe]),Jt=X({},_,{isRtl:ot,arrow:P,disableInteractive:Ue,placement:ee,PopperComponentProp:re,touch:Pe.current}),wn=VGe(Jt),Sr=(r=(o=xe.popper)!=null?o:O.Popper)!=null?r:GGe,ii=(i=(s=(a=xe.transition)!=null?a:O.Transition)!=null?s:Re)!=null?i:GI,ol=(l=(c=xe.tooltip)!=null?c:O.Tooltip)!=null?l:WGe,yt=(u=(d=xe.arrow)!=null?d:O.Arrow)!=null?u:jGe,pt=YE(Sr,X({},fe,(h=we.popper)!=null?h:N.popper,{className:Ye(wn.popper,fe?.className,(f=(p=we.popper)!=null?p:N.popper)==null?void 0:f.className)}),Jt),Xt=YE(ii,X({},pe,(m=we.transition)!=null?m:N.transition),Jt),$t=YE(ol,X({},(y=we.tooltip)!=null?y:N.tooltip,{className:Ye(wn.tooltip,(v=(b=we.tooltip)!=null?b:N.tooltip)==null?void 0:v.className)}),Jt),Pn=YE(yt,X({},(S=we.arrow)!=null?S:N.arrow,{className:Ye(wn.arrow,(w=(A=we.arrow)!=null?A:N.arrow)==null?void 0:w.className)}),Jt);return K(C.Fragment,{children:[C.cloneElement(ke,Ot),g(Sr,X({as:re??g0,placement:ee,anchorEl:V?{getBoundingClientRect:()=>({top:sT.y,left:sT.x,right:sT.x,bottom:sT.y,width:0,height:0})}:ce,popperRef:ta,open:ce?ue:!1,id:he,transition:!0},Wt,pt,{popperOptions:sn,children:({TransitionProps:an})=>g(ii,X({timeout:Ne.transitions.duration.shorter},an,Xt,{children:K(ol,X({},$t,{children:[ve,P?g(yt,X({},Pn,{ref:Se})):null]}))}))}))]})}),pW=qGe;function YGe(t){return Ft("MuiSwitch",t)}const XGe=Dt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),yc=XGe,KGe=["className","color","edge","size","sx"],QGe=f0(),ZGe=t=>{const{classes:e,edge:n,size:r,color:o,checked:i,disabled:s}=t,a={root:["root",n&&`edge${ht(n)}`,`size${ht(r)}`],switchBase:["switchBase",`color${ht(o)}`,i&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Lt(a,YGe,e);return X({},e,l)},JGe=$e("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.edge&&e[`edge${ht(n.edge)}`],e[`size${ht(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${yc.thumb}`]:{width:16,height:16},[`& .${yc.switchBase}`]:{padding:4,[`&.${yc.checked}`]:{transform:"translateX(16px)"}}}}]}),eWe=$e(cW,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.switchBase,{[`& .${yc.input}`]:e.input},n.color!=="default"&&e[`color${ht(n.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${yc.checked}`]:{transform:"translateX(20px)"},[`&.${yc.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${yc.checked} + .${yc.track}`]:{opacity:.5},[`&.${yc.disabled} + .${yc.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${yc.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:ar(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,e])=>e.main&&e.light).map(([e])=>({props:{color:e},style:{[`&.${yc.checked}`]:{color:(t.vars||t).palette[e].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainCh
vendor: 6,734 bytes, line 310
310annel} / ${t.vars.palette.action.hoverOpacity})`:ar(t.palette[e].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${yc.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e}DisabledColor`]:`${t.palette.mode==="light"?q1(t.palette[e].main,.62):j1(t.palette[e].main,.55)}`}},[`&.${yc.checked} + .${yc.track}`]:{backgroundColor:(t.vars||t).palette[e].main}}}))]})),tWe=$e("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),nWe=$e("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,e)=>e.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),rWe=C.forwardRef(function(e,n){const r=QGe({props:e,name:"MuiSwitch"}),{className:o,color:i="primary",edge:s=!1,size:a="medium",sx:l}=r,c=at(r,KGe),u=X({},r,{color:i,edge:s,size:a}),d=ZGe(u),h=g(nWe,{className:d.thumb,ownerState:u});return K(JGe,{className:Ye(d.root,o),sx:l,ownerState:u,children:[g(eWe,X({type:"checkbox",icon:h,checkedIcon:h,ref:n,ownerState:u},c,{classes:X({},d,{root:d.switchBase})})),g(tWe,{className:d.track,ownerState:u})]})}),zb=rWe;function oWe(t){return Ft("MuiTab",t)}const iWe=Dt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Iy=iWe,sWe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],aWe=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:o,icon:i,label:s,selected:a,disabled:l}=t,c={root:["root",i&&s&&"labelIcon",`textColor${ht(n)}`,r&&"fullWidth",o&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Lt(c,oWe,e)},lWe=$e(ad,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${ht(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${Iy.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>X({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Iy.iconWrapper}`]:X({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Iy.selected}`]:{opacity:1},[`&.${Iy.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Iy.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Iy.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Iy.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Iy.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),cWe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:h,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:y,textColor:v="inherit",value:b,wrapped:S=!1}=r,w=at(r,sWe),A=X({},r,{disabled:i,disableFocusRipple:s,selected:m,icon:!!l,iconPosition:c,label:!!d,fullWidth:a,textColor:v,wrapped:S}),_=aWe(A),P=l&&d&&C.isValidElement(l)?C.cloneElement(l,{className:Ye(_.iconWrapper,l.props.className)}):l,R=N=>{!m&&h&&h(N,b),f&&f(N)},O=N=>{y&&!m&&h&&h(N,b),p&&p(N)};return K(lWe,X({focusRipple:!s,className:Ye(_.root,o),ref:n,role:"tab","aria-selected":m,disabled:i,onClick:R,onFocus:O,ownerState:A,tabIndex:m?0:-1},w,{children:[c==="top"||c==="start"?K(C.Fragment,{children:[P,d]}):K(C.Fragment,{children:[d,P]}),u]}))}),Sa=cWe,uWe=C.createContext(),lce=uWe;function dWe(t){return Ft("MuiTable",t)}Dt("MuiTable",["root","stickyHeader"]);const hWe=["className","component","padding","size","stickyHeader"],fWe=t=>{const{classes:e,stickyHeader:n}=t;return Lt({root:["root",n&&"stickyHeader"]},dWe,e)},pWe=$e("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>X({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":X({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),xK="table",gWe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTable"}),{className:o,component:i=xK,padding:s="normal",size:a="medium",stickyHeader:l=!1}=r,c=at(r,hWe),u=X({},r,{component:i,padding:s,size:a,stickyHeader:l}),d=fWe(u),h=C.useMemo(()=>({padding:s,size:a,stickyHeader:l}),[s,a,l]);return g(lce.Provider,{value:h,children:g(pWe,X({as:i,role:i===xK?null:"table",ref:n,className:Ye(d.root,o),ownerState:u},c))})}),gW=gWe,mWe=C.createContext(),IF=mWe;function yWe(t){return Ft("MuiTableBody",t)}Dt("MuiTableBody",["root"]);const vWe=["className","component"],bWe=t=>{const{classes:e}=t;return Lt({root:["root"]},yWe,e)},CWe=$e("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),SWe={variant:"body"},wK="tbody",EWe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTableBody"}),{className:o,component:i=wK}=r,s=at(r,vWe),a=X({},r,{component:i}),l=bWe(a);return g(IF.Provider,{value:SWe,children:g(CWe,X({className:Ye(l.root,o),as:i,ref:n,role:i===wK?null:"rowgroup",ownerState:a},s))})}),mW=EWe;function xWe(t){return Ft("MuiTableCell",t)}const wWe=Dt("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),AWe=wWe,TWe=["align","className","component","padding","scope","size","sortDirection","variant"],_We=t=>{const{classes:e,variant:n,align:r,padding:o,size:i,stickyHeader:s}
310=t,a={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${ht(r)}`,o!=="normal"&&`padding${ht(o)}`,`size${ht(i)}`]};return Lt(a,xWe,e)},IWe=$e("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${ht(n.size)}`],n.padding!=="normal"&&e[`padding${ht(n.padding)}`],n.align!=="inherit"&&e[`align${ht(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>X({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid 311 ${t.palette.mode==="light"?q1(ar(t.palette.divider,1),.88):j1(ar(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${AWe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),PWe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTableCell"}),{align:o="inherit",className:i,component:s,padding:a,scope:l,size:c,sortDirection:u,variant:d}=r,h=at(r,TWe),f=C.useContext(lce),p=C.useContext(IF),m=p&&p.variant==="head";let y;s?y=s:y=m?"th":"td";let v=l;y==="td"?v=void 0:!v&&m&&(v="col");const b=d||p&&p.variant,S=X({},r,{align:o,component:y,padding:a||(f&&f.padding?f.padding:"normal"),size:c||(f&&f.size?f.size:"medium"),sortDirection:u,stickyHeader:b==="head"&&f&&f.stickyHeader,variant:b}),w=_We(S);let A=null;return u&&(A=u==="asc"?"ascending":"descending"),g(IWe,X({as:y,ref:n,className:Ye(w.root,i),"aria-sort":A,scope:v,ownerState:S},h))}),no=PWe;function RWe(t){return Ft("MuiTableContainer",t)}Dt("MuiTableContainer",["root"]);const OWe=["className","component"],NWe=t=>{const{classes:e}=t;return Lt({root:["root"]},RWe,e)},MWe=$e("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),DWe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTableContainer"}),{className:o,component:i="div"}=r,s=at(r,OWe),a=X({},r,{component:i}),l=NWe(a);return g(MWe,X({ref:n,as:i,className:Ye(l.root,o),ownerState:a},s))}),cce=DWe;function LWe(t){return Ft("MuiTableHead",t)}Dt("MuiTableHead",["root"]);const kWe=["className","component"],FWe=t=>{const{classes:e}=t;return Lt({root:["root"]},LWe,e)},BWe=$e("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),$We={variant:"head"},AK="thead",HWe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTableHead"}),{className:o,component:i=AK}=r,s=at(r,kWe),a=X({},r,{component:i}),l=FWe(a);return g(IF.Provider,{value:$We,children:g(BWe,X({as:i,className:Ye(l.root,o),ref:n,role:i===AK?null:"rowgroup",ownerState:a},s))})}),yW=HWe;function UWe(t){return Ft("MuiToolbar",t)}Dt("MuiToolbar",["root","gutters","regular","dense"]);const zWe=["className","component","disableGutters","variant"],VWe=t=>{const{classes:e,disableGutters:n,variant:r}=t;return Lt({root:["root",!n&&"gutters",r]},UWe,e)},GWe=$e("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>X({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),WWe=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:s=!1,variant:a="regular"}=r,l=at(r,zWe),c=X({},r,{component:i,disableGutters:s,variant:a}),u=VWe(c);return g(GWe,X({as:i,className:Ye(u.root,o),ref:n,ownerState:c},l))}),jWe=WWe,uce=gt(g("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),dce=gt(g("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),qWe=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],YWe=C.forwardRef(function(e,n){var r,o,i,s,a,l,c,u;const{backIconButtonProps:d,count:h,disabled:f=!1,getItemAriaLabel:p,nextIconButtonProps:m,onPageChange:y,page:v,rowsPerPage:b,showFirstButton:S,showLastButton:w,slots:A={},slotProps:_={}}=e,P=at(e,qWe),R=ic(),O=we=>{y(we,0)},N=we=>{y(we,v-1)},M=we=>{y(we,v+1)},L=we=>{y(we,Math.max(0,Math.ceil(h/b)-1))},F=(r=A.firstButton)!=null?r:Di,$=(o=A.lastButton)!=null?o:Di,D=(i=A.nextButton)!=null?i:Di,k=(s=A.previousButton)!=null?s:Di,U=(a=A.firstButtonIcon)!=null?a:XVe,H=(l=A.lastButtonIcon)!=null?l:KVe,V=(c=A.nextButtonIcon)!=null?c:dce,q=(u=A.previousButtonIcon)!=null?u:uce,J=R?$:F,Q=R?D:k,se=R?k:D,oe=R?F:$,ie=R?_.lastButton:_.firstButton,ee=R?_.nextButton:_.previousButton,re=R?_.previousButton:_.nextButton,fe=R?_.firstButton:_.lastButton;return K("div",X({ref:n},P,{children:[S&&g(J,X({onClick:O,disabled:f||v===0,"aria-label":p("first",v),title:p("first",v)},ie,{children:R?g(H,X({},_.lastButtonIcon)):g(U,X({},_.firstButtonIcon))})),g(Q,X({onClick:N,disabled:f||v===0,color:"inherit","aria-label":p("previous",v),title:p("previous",v)},ee??d,{children:R?g(V,X({},_.nextButtonIcon)):g(q,X({},_.previousButtonIcon))})),g(se,X({onClick:M,disabled:f||(h!==-1?v>=Math.ceil(h/b)-1:!1),color:"inherit","aria-label":p("next",v),title:p("next",v)},re??m,{children:R?g(q,X({},_.previousButtonIcon)):g(V,X({},_.nextButtonIcon))})),w&&g(oe,X({onClick:L,disabled:f||v>=Math.ceil(h/b)-1,"aria-label":p("last",v),title:p("last",v)}
311,fe,{children:R?g(U,X({},_.firstButtonIcon)):g(H,X({},_.lastButtonIcon))}))]}))}),XWe=YWe;function KWe(t){return Ft("MuiTablePagination",t)}const QWe=Dt("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),iC=QWe;var TK;const ZWe=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],JWe=$e(no,{name:"MuiTablePagination",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}})),eje=$e(jWe,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(t,e)=>X({[`& .${iC.actions}`]:e.actions},e.toolbar)})(({theme:t})=>({minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${iC.actions}`]:{flexShrink:0,marginLeft:20}})),tje=$e("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})({flex:"1 1 100%"}),nje=$e("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(t,e)=>e.selectLabel})(({theme:t})=>X({},t.typography.body2,{flexShrink:0})),rje=$e(xa,{name:"MuiTablePagination",slot:"Select",overridesResolver:(t,e)=>X({[`& .${iC.selectIcon}`]:e.selectIcon,[`& .${iC.select}`]:e.select},e.input,e.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${iC.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),oje=$e(mr,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(t,e)=>e.menuItem})({}),ije=$e("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(t,e)=>e.displayedRows})(({theme:t})=>X({},t.typography.body2,{flexShrink:0}));function sje({from:t,to:e,count:n}){return`${t}â${e} of ${n!==-1?n:`more than ${e}`}`}function aje(t){return`Go to ${t} page`}const lje=t=>{const{classes:e}=t;return Lt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},KWe,e)},cje=C.forwardRef(function(e,n){var r;const o=Ht({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=XWe,backIconButtonProps:s,className:a,colSpan:l,component:c=no,count:u,disabled:d=!1,getItemAriaLabel:h=aje,labelDisplayedRows:f=sje,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:m,onPageChange:y,onRowsPerPageChange:v,page:b,rowsPerPage:S,rowsPerPageOptions:w=[10,25,50,100],SelectProps:A={},showFirstButton:_=!1,showLastButton:P=!1,slotProps:R={},slots:O={}}=o,N=at(o,ZWe),M=o,L=lje(M),F=(r=R?.select)!=null?r:A,$=F.native?"option":oje;let D;(c===no||c==="td")&&(D=l||1e3);const k=sd(F.id),U=sd(F.labelId),H=()=>u===-1?(b+1)*S:S===-1?u:Math.min(u,(b+1)*S);return g(JWe,X({colSpan:D,ref:n,as:c,ownerState:M,className:Ye(L.root,a)},N,{children:K(eje,{className:L.toolbar,children:[g(tje,{className:L.spacer}),w.length>1&&g(nje,{className:L.selectLabel,id:U,children:p}),w.length>1&&g(rje,X({variant:"standard"},!F.variant&&{input:TK||(TK=g(QC,{}))},{value:S,onChange:v,id:k,labelId:U},F,{classes:X({},F.classes,{root:Ye(L.input,L.selectRoot,(F.classes||{}).root),select:Ye(L.select,(F.classes||{}).select),icon:Ye(L.selectIcon,(F.classes||{}).icon)}),disabled:d,children:w.map(V=>C.createElement($,X({},!IC($)&&{ownerState:M},{className:L.menuItem,key:V.label?V.label:V,value:V.value?V.value:V}),V.label?V.label:V))})),g(ije,{className:L.displayedRows,children:f({from:u===0?0:b*S+1,to:H(),count:u===-1?-1:u,page:b})}),g(i,{className:L.actions,backIconButtonProps:s,count:u,nextIconButtonProps:m,onPageChange:y,page:b,rowsPerPage:S,showFirstButton:_,showLastButton:P,slotProps:R.actions,slots:O.actions,getItemAriaLabel:h,disabled:d})]})}))}),uje=cje;function dje(t){return Ft("MuiTableRow",t)}const hje=Dt("MuiTableRow",["root","selected","hover","head","footer"]),_K=hje,fje=["className","component","hover","selected"],pje=t=>{const{classes:e,selected:n,hover:r,head:o,footer:i}=t;return Lt({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},dje,e)},gje=$e("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${_K.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${_K.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ar(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ar(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),IK="tr",mje=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTableRow"}),{className:o,component:i=IK,hover:s=!1,selected:a=!1}=r,l=at(r,fje),c=C.useContext(IF),u=X({},r,{component:i,hover:s,selected:a,head:c&&c.variant==="head",footer
311:c&&c.variant==="footer"}),d=pje(u);return g(gje,X({as:i,ref:n,className:Ye(d.root,o),role:i===IK?null:"row",ownerState:u},l))}),ex=mje;function yje(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function vje(t,e,n,r={},o=()=>{}){const{ease:i=yje,duration:s=300}=r;let a=null;const l=e[t];let c=!1;const u=()=>{c=!0},d=h=>{if(c){o(new Error("Animation cancelled"));return}a===null&&(a=h);const f=Math.min(1,(h-a)/s);if(e[t]=i(f)*(n-l)+l,f>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const bje=["onChange"],Cje={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Sje(t){const{onChange:e}=t,n=at(t,bje),r=C.useRef(),o=C.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Ls(()=>{const s=rR(()=>{const l=r.current;i(),l!==r.current&&e(r.current)}),a=$p(o.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[e]),C.useEffect(()=>{i(),e(r.current)},[e]),g("div",X({style:Cje,ref:o},n))}function Eje(t){return Ft("MuiTabScrollButton",t)}const xje=Dt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),wje=xje,Aje=["className","slots","slotProps","direction","orientation","disabled"],Tje=t=>{const{classes:e,orientation:n,disabled:r}=t;return Lt({root:["root",n,r&&"disabled"]},Eje,e)},_je=$e(ad,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>X({width:40,flexShrink:0,opacity:.8,[`&.${wje.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Ije=C.forwardRef(function(e,n){var r,o;const i=Ht({props:e,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:l={},direction:c}=i,u=at(i,Aje),d=ic(),h=X({isRtl:d},i),f=Tje(h),p=(r=a.StartScrollButtonIcon)!=null?r:uce,m=(o=a.EndScrollButtonIcon)!=null?o:dce,y=ao({elementType:p,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),v=ao({elementType:m,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return g(_je,X({component:"div",className:Ye(f.root,s),ref:n,role:null,ownerState:h,tabIndex:null},u,{children:c==="left"?g(p,X({},y)):g(m,X({},v))}))}),Pje=Ije;function Rje(t){return Ft("MuiTabs",t)}const Oje=Dt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","
311indicator"]),XH=Oje,Nje=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],PK=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,RK=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ON=(t,e,n)=>{let r=!1,o=n(t,e);for(;o;){if(o===t.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(t,o);else{o.focus();return}}},Mje=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:s,scrollButtonsHideMobile:a,classes:l}=t;return Lt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Rje,l)},Dje=$e("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${XH.scrollButtons}`]:e.scrollButtons},{[`& .${XH.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>X({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${XH.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Lje=$e("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>X({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),kje=$e("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>X({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Fje=$e("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>X({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Bje=$e(Sje)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),OK={},$je=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTabs"}),o=Tu(),i=ic(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:d,component:h="div",allowScrollButtonsMobile:f=!1,indicatorColor:p="primary",onChange:m,orientation:y="horizontal",ScrollButtonComponent:v=Pje,scrollButtons:b="auto",selectionFollowsFocus:S,slots:w={},slotProps:A={},TabIndicatorProps:_={},TabScrollButtonProps:P={},textColor:R="primary",value:O,variant:N="standard",visibleScrollbar:M=!1}=r,L=at(r,Nje),F=N==="scrollable",$=y==="vertical",D=$?"scrollTop":"scrollLeft",k=$?"top":"left",U=$?"bottom":"right",H=$?"clientHeight":"clientWidth",V=$?"height":"width",q=X({},r,{component:h,allowScrollButtonsMobile:f,indicatorColor:p,orientation:y,vertical:$,scrollButtons:b,textColor:R,variant:N,visibleScrollbar:M,fixed:!F,hideScrollbar:F&&!M,scrollableX:F&&!$,scrollableY:F&&$,centered:c&&!F,scrollButtonsHideMobile:!f}),J=Mje(q),Q=ao({elementType:w.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:q}),se=ao({elementType:w.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:q}),[oe,ie]=C.useState(!1),[ee,re]=C.useState(OK),[fe,we]=C.useState(!1),[xe,ve]=C.useState(!1),[Re,pe]=C.useState(!1),[Be,ke]=C.useState({overflow:"hidden",scrollbarWidth:0}),Ne=new Map,ot=C.useRef(null),ce=C.useRef(null),Ae=()=>{const je=ot.current;let it;if(je){const rt=je.getBoundingClientRect();it={clientWidth:je.clientWidth,scrollLeft:je.scrollLeft,scrollTop:je.scrollTop,scrollLeftNormalized:BLe(je,i?"rtl":"ltr"),scrollWidth:je.scrollWidth,top:rt.top,bottom:rt.bottom,left:rt.left,right:rt.right}}let xt;if(je&&O!==!1){const rt=ce.current.children;if(rt.length>0){const Bt=rt[Ne.get(O)];xt=Bt?Bt.getBoundingClientRect():null}}return{tabsMeta:it,tabMeta:xt}},be=mn(()=>{const{tabsMeta:je,tabMeta:it}=Ae();let xt=0,rt;if($)rt="top",it&&je&&(xt=it.top-je.top+je.scrollTop);else if(rt=i?"right":"left",it&&je){const dn=i?je.scrollLeftNormalized+je.clientWidth-je.scrollWidth:je.scrollLeft;xt=(i?-1:1)*(it[rt]-je[rt]+dn)}const Bt={[rt]:xt,[V]:it?it[V]:0};if(isNaN(ee[rt])||isNaN(ee[V]))re(Bt);else{const dn=Math.abs(ee[rt]-Bt[rt]),kn=Math.abs(ee[V]-Bt[V]);(dn>=1||kn>=1)&&re(Bt)}}),Se=(je,{animation:it=!0}={})=>{it?vje(D,ot.current,je,{duration:o.transitions.duration.standard}):ot.current[D]=je},Pe=je=>{let it=ot.current[D];$?it+=je:(it+=je*(i?-1:1),it*=i&&Yae()==="reverse"?-1:1),Se(it)},Ue=()=>{const je=ot.current[H];let it=0;const xt=Array.from(ce.current.children);for(let rt=0;rt<xt.length;rt+=1){const Bt=xt[rt];if(it+Bt[H]>je){rt===0&&(it=je);break}it+=Bt[H]}return it},_e=()=>{Pe(-1*Ue())},Oe=()=>{Pe(Ue())},ze=C.useCallback(je=>{ke({overflow:null,scrollbarWidth:je})},[]),ne=()=>{const je={};je.scrollbarSizeListener=F?g(Bje,{onChange:ze,className:Ye(J.scrollableX,J.hideScrollbar)}):null;const xt=F&&(b==="auto"&&(fe||xe)||b===!0);return je.scrollButtonStart=xt?g(v,X({slots:{StartScrollButtonIcon:w.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Q},orientation:y,direction:i?"right":"left",onClick:_e,disabled:!fe},P,{className:Ye(J.scrollButtons,P.className)})):null,je.scrollButtonEnd=xt?g(v,X({slots:{EndScrollButtonIcon:w.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:se},orientation:y,direction:i?"left":"right",onClick:Oe,disabled:!xe},P,{className:Ye(J.scrollButtons,P.className)})):null,je},W=mn(je=>{const{tabsMeta:it,tabMeta:xt}=Ae();if(!(!xt||!it)){if(xt[k]<it[k]){const rt=it[D]+(xt[k]-it[k]);Se(rt,{animation:je})}else if(xt[U]>it[U]){const rt=it[D]+(xt[U]-it[U]);Se(rt,{animation:je})}}}),j=mn(()=>{F&&b!==!1&&pe(!Re)});C.useEffect(()=>{const je=rR(()=>{ot.current&&be()});let it;const xt=dn=>{dn.forEach(kn=>
311{kn.removedNodes.forEach(jn=>{var Cr;(Cr=it)==null||Cr.unobserve(jn)}),kn.addedNodes.forEach(jn=>{var Cr;(Cr=it)==null||Cr.observe(jn)})}),je(),j()},rt=$p(ot.current);rt.addEventListener("resize",je);let Bt;return typeof ResizeObserver<"u"&&(it=new ResizeObserver(je),Array.from(ce.current.children).forEach(dn=>{it.observe(dn)})),typeof MutationObserver<"u"&&(Bt=new MutationObserver(xt),Bt.observe(ce.current,{childList:!0})),()=>{var dn,kn;je.clear(),rt.removeEventListener("resize",je),(dn=Bt)==null||dn.disconnect(),(kn=it)==null||kn.disconnect()}},[be,j]),C.useEffect(()=>{const je=Array.from(ce.current.children),it=je.length;if(typeof IntersectionObserver<"u"&&it>0&&F&&b!==!1){const xt=je[0],rt=je[it-1],Bt={root:ot.current,threshold:.99},dn=Xn=>{we(!Xn[0].isIntersecting)},kn=new IntersectionObserver(dn,Bt);kn.observe(xt);const jn=Xn=>{ve(!Xn[0].isIntersecting)},Cr=new IntersectionObserver(jn,Bt);return Cr.observe(rt),()=>{kn.disconnect(),Cr.disconnect()}}},[F,b,Re,u?.length]),C.useEffect(()=>{ie(!0)},[]),C.useEffect(()=>{be()}),C.useEffect(()=>{W(OK!==ee)},[W,ee]),C.useImperativeHandle(l,()=>({updateIndicator:be,updateScrollButtons:j}),[be,j]);const ue=g(Fje,X({},_,{className:Ye(J.indicator,_.className),ownerState:q,style:X({},ee,_.style)}));let he=0;const Ce=C.Children.map(u,je=>{if(!C.isValidElement(je))return null;const it=je.props.value===void 0?he:je.props.value;Ne.set(it,he);const xt=it===O;return he+=1,C.cloneElement(je,X({fullWidth:N==="fullWidth",indicator:xt&&!oe&&ue,selected:xt,selectionFollowsFocus:S,onChange:m,textColor:R,value:it},he===1&&O===!1&&!je.props.tabIndex?{tabIndex:0}:{}))}),Ie=je=>{const it=ce.current,xt=Ji(it).activeElement;if(xt.getAttribute("role")!=="tab")return;let Bt=y==="horizontal"?"ArrowLeft":"ArrowUp",dn=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&i&&(Bt="ArrowRight",dn="ArrowLeft"),je.key){case Bt:je.preventDefault(),ON(it,xt,RK);break;case dn:je.preventDefault(),ON(it,xt,PK);break;case"Home":je.preventDefault(),ON(it,null,PK);break;case"End":je.preventDefault(),ON(it,null,RK);break}},et=ne();return K(Dje,X({className:Ye(J.root,d),ownerState:q,ref:n,as:h},L,{children:[et.scrollButtonStart,et.scrollbarSizeListener,K(Lje,{className:J.scroller,ownerState:q,style:{overflow:Be.overflow,[$?`margin${i?"Left":"Right"}`:"marginBottom"]:M?void 0:-Be.scrollbarWidth},ref:ot,children:[g(kje,{"aria-label":s,"aria-labelledby":a,"aria-orientation":y==="vertical"?"vertical":null,className:J.flexContainer,ownerState:q,onKeyDown:Ie,ref:ce,role:"tablist",children:Ce}),oe&&ue]}),et.scrollButtonEnd]}))}),tg=$je;function Hje(t){return Ft("MuiTextField",t)}Dt("MuiTextField",["root"]);const Uje=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],zje={standard:J1,filled:qle,outlined:hW},Vje=t=>{const{classes:e}=t;return Lt({root:["root"]},Hje,e)},Gje=$e(v0,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Wje=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:h,fullWidth:f=!1,helperText:p,id:m,InputLabelProps:y,inputProps:v,InputProps:b,inputRef:S,label:w,maxRows:A,minRows:_,multiline:P=!1,name:R,onBlur:O,onChange:N,onFocus:M,placeholder:L,required:F=!1,rows:$,select:D=!1,SelectProps:k,type:U,value:H,variant:V="outlined"}=r,q=at(r,Uje),J=X({},r,{autoFocus:i,color:l,disabled:u,error:d,fullWidth:f,multiline:P,required:F,select:D,variant:V}),Q=Vje(J),se={};V==="outlined"&&(y&&typeof y.shrink<"u"&&(se.notched=y.shrink),se.label=w),D&&((!k||!k.native)&&(se.id=void 0),se["aria-describedby"]=void 0);const oe=sd(m),ie=p&&oe?`${oe}-helper-text`:void 0,ee=w&&oe?`${oe}-label`:void 0,re=zje[V],fe=g(re,X({"aria-describedby":ie,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:f,multiline:P,name:R,rows:$,maxRows:A,minRows:_,type:U,value:H,id:oe,inputRef:S,onBlur:O,onChange:N,onFocus:M,placeholder:L,inputProps:v},se,b));return K(Gje,X({className:Ye(Q.root,a),disabled:u,error:d,fullWidth:f,ref:n,required:F,color:l,variant:V,ownerState:J},q,{children:[w!=null&&w!==""&&g(_F,X({htmlFor:oe,id:ee},y,{children:w})),D?g(xa,X({"aria-describedby":ie,id:oe,labelId:ee,value:H,input:fe},k,{children:s})):fe,p&&g(u4e,X({id:ie},h,{children:p}))]}))}),lo=Wje;const Yn=VP,bt=nse,jje={grey:{100:"#e0e0e0",200:"#c2c2c2",300:"#a3a3a3",400:"#858585",500:"#666666",600:"#525252",700:"#3d3d3d",8
31100:"#292929",900:"#141414"},primary:{100:"#d0d1d5",200:"#a1a4ab",300:"#727681",400:"#1F2A40",500:"#141b2d",600:"#101624",700:"#0c101b",800:"#080b12",900:"#040509"},greenAccent:{100:"#dbf5ee",200:"#b7ebde",300:"#94e2cd",400:"#70d8bd",500:"#4cceac",600:"#3da58a",700:"#2e7c67",800:"#1e5245",900:"#0f2922"},redAccent:{100:"#f8dcdb",200:"#f1b9b7",300:"#e99592",400:"#e2726e",500:"#db4f4a",600:"#af3f3b",700:"#832f2c",800:"#58201e",900:"#2c100f"},orangeAccent:{100:"#f8e7db",200:"#f1d1b7",300:"#e9b392",400:"#e2a26e",500:"#db864a",600:"#af6b3b",700:"#834d2c",800:"#58361e",900:"#2c190f"},blueAccent:{100:"#e1e2fe",200:"#c3c6fd",300:"#a4a9fc",400:"#868dfb",500:"#6870fa",600:"#535ac8",700:"#3e4396",800:"#2a2d64",900:"#151632"}},qje={grey:{100:"#141414",200:"#292929",300:"#3d3d3d",400:"#525252",500:"#444444",600:"#858585",700:"#a3a3a3",800:"#c2c2c2",900:"#e0e0e0"},primary:{100:"#040509",200:"#080b12",300:"#0c101b",400:"#f2f0f0",500:"#141b2d",600:"#1F2A40",700:"#727681",800:"#a1a4ab",900:"#d0d1d5"},greenAccent:{100:"#0f2922",200:"#1e5245",300:"#2e7c67",400:"#3da58a",500:"#4cceac",600:"#70d8bd",700:"#94e2cd",800:"#b7ebde",900:"#dbf5ee"},redAccent:{100:"#2c100f",200:"#58201e",300:"#832f2c",400:"#af3f3b",500:"#db4f4a",600:"#e2726e",700:"#e99592",800:"#f1b9b7",900:"#f8dcdb"},orangeAccent:{100:"#2c190f",200:"#58361e",300:"#834d2c",400:"#af6b3b",500:"#db864a",600:"#e2a26e",700:"#e9b392",800:"#f1d1b7",900:"#f8e7db"},blueAccent:{100:"#151632",200:"#2a2d64",300:"#3e4396",400:"#535ac8",500:"#6870fa",600:"#868dfb",700:"#a4a9fc",800:"#c3c6fd",900:"#e1e2fe"},designBlue:{100:"rgb(18,87,253)",200:"rgba(113,199,238,0.85)",300:"rgb(67,138,254)"},designOrange:{100:"rgb(252,98,57)",200:"rgba(254,132,67,0.4)",300:"rgb(254,132,67)"},designCyan:{100:"rgb(0,133,155)",200:"rgba(0,100,110)",300:"rgb(0,184,199)",400:"rgb(20,150,150)"}},kL={dark:jje,light:qje},Yje=t=>({primary:{main:t.orangeAccent[300]},secondary:{main:t.grey[500]},neutral:{main:t.grey[500]},green:{main:t.greenAccent[500]},background:{default:t.primary[500],input:t.greenAccent[500]}}),Xje=t=>({primary:{main:t.designBlue[300]},secondary:{main:t.blueAccent[700]},neutral:{main:t.grey[500]},green:{main:t.greenAccent[500]},background:{default:t.primary[400],input:t.greenAccent[500]}}),Kje={dark:Yje,light:Xje},NK=HI(),MK=t=>{const e=kL[t]||kL.light,n={mode:t,...Kje[t](e)};return{...NK,palette:n,typography:{fontFamily:["Source Sans Pro","sans-serif"].join(","),fontSize:12,h1:{fontFamily:["Source Sans Pro","sans-serif"].join(","),fontSize:40},h2:{fontFamily:["Source Sans Pro","sans-serif"].join(","),fontSize:32},h3:{fontFamily:["Source Sans Pro","sans-serif"].join(","),fontSize:24},h4:{fontFamily:["Source Sans Pro","sans-serif"].join(","),fontSize:20},h5:{fontFamily:["Source Sans Pro","sans-serif"].join(","),fontSize:16},h6:{fontFamily:["Source Sans Pro","sans-serif"].join(","),fontSize:14}},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536,mobile:0,tablet:640,laptop:1024,desktop:1200}},components:{MuiButtonBase:{defaultProps:{size:"small",disableRipple:!0},styleOverrides:{root:{}}},MuiDataGrid:{defaultProps:{size:"small",disableRipple:!0}},MuiPaper:{defaultProps:{size:"small"},styleOverrides:{root:{"&::before":{borderBottom:n.background.input,opacity:1},padding:"8px","&.Mui-disabled":{backgroundColor:"transparent",border:"1px solid black","&:before":{border:"none"},".MuiInput-input":{cursor:"not-allowed"}},"& .MuiDataGrid-menuList":{"& .MuiMenuItem-root":{"&:last-child":{display:"none"}}}}}},MuiButton:{defaultProps:{size:"small"},styleOverrides:{root:{borderRadius:"1rem",textTransform:"none",fontSize:"0.8rem",height:NK.spacing(4.2)}},variants:[{props:{variant:"action"},style:{minWidth:"fit-content",maxWidth:"fit-content",backgroundColor:e.orangeAccent[500],color:e.primary[400],maxHeight:"60%",border:"none","&:hover":{backgroundColor:e.orangeAccent[700]}}},{props:{variant:"component"},style:{minWidth:"fit-content",maxWidth:"fit-content",borderRadius:"0.3rem",backgroundColor:e.orangeAccent[500],color:e.primary[400],maxHeight:"60%",border:"none","&:hover":{backgroundColor:e.orangeAccent[700]}}}]}
311,MuiFilledInput:{defaultProps:{margin:"dense"}},MuiFormControl:{defaultProps:{margin:"dense"}},MuiFormHelperText:{defaultProps:{margin:"dense"}},MuiIconButton:{size:"small"},MuiTextField:{defaultProps:{variant:"standard",margin:"dense",autoComplete:"off"}},MuiInput:{defaultProps:{autoComplete:"off"}},MuiFormControlLabel:{defaultProps:{autoComplete:"off"},styleOverrides:{root:{}}},MuiBox:{defaultProps:{autoComplete:"off"}},MuiInputBase:{defaultProps:{autoComplete:"off"},styleOverrides:{root:{"&.Mui-disabled":{opacity:.35},"& .Mui-disabled":{pointerEvents:"unset",cursor:"not-allowed"}}}},MuiModal:{defaultProps:{autoComplete:"off",disableScrollLock:!0}},MuiListItem:{defaultProps:{dense:!0}},MuiListItemButton:{defaultProps:{dense:!0},styleOverrides:{root:{"&.Mui-disabled":{cursor:"not-allowed","&:hover":{backgroundColor:"inherit"}}}}},MuiOutlinedInput:{defaultProps:{margin:"dense"}},MuiFab:{defaultProps:{size:"small"}},MuiDrawer:{defaultProps:{size:"small"},styleOverrides:{root:{backgroundColor:e.grey[400],"& .MuiPaper-root":{backgroundColor:e.grey[400]}}}},MuiTable:{defaultProps:{size:"small"}},MuiToolbar:{defaultProps:{variant:"dense"}},MuiMenu:{defaultProps:{disableScrollLock:!0}},MuiMenuItem:{defaultProps:{disableRipple:!0}},MuiTypography:{defaultProps:{margin:"dense"},styleOverrides:{root:{}}}}}},Qje=()=>{const t=bt(Rse),[e,n]=C.useState(HI(MK(t)));return C.useEffect(()=>{t&&n(HI(MK(t)))},[t]),{theme:e,activeTheme:t}},un={base:"/",login:{base:"login",path:"/login"},activateUser:{base:"activate",path:"/activate"},requestAccess:{base:"request-access",path:"/request-access"},requestAccessConfirmation:{base:"request-access-confirmation",path:"/request-access-confirmation"},resetPassword:{base:"reset-password",path:"/reset-password"},resetPasswordConfirm:{base:"reset-password-confirm",path:"/reset-password-confirm"},dashboard:{base:"dashboard",path:"/dashboard"},projects:{base:"projects",path:"/projects"},admin:{base:"admin",path:"/admin"},profile:{base:"profile",path:"/profile"},landingPage:{base:"home",path:"/home"},tosAndPrivacyPolicy:{base:"tos-&-privacy-policy",path:"/tos-&-privacy-policy"}
vendor: 22,791 bytes, line 311
311,softwareEvaluationAgreement:{base:"software-evaluation-agreement",path:"/software-evaluation-agreement"},userGuide:{base:"user-guide",path:"/user-guide"},userAgreement:{base:"user-agreement",path:"/user-agreement"}};var cR=t=>t.type==="checkbox",KE=t=>t instanceof Date,Sc=t=>t==null;const hce=t=>typeof t=="object";var Ta=t=>!Sc(t)&&!Array.isArray(t)&&hce(t)&&!KE(t),fce=t=>Ta(t)&&t.target?cR(t.target)?t.target.checked:t.target.value:t,Zje=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,pce=(t,e)=>t.has(Zje(e)),Jje=t=>{const e=t.constructor&&t.constructor.prototype;return Ta(e)&&e.hasOwnProperty("isPrototypeOf")},vW=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function nu(t){let e;const n=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(vW&&(t instanceof Blob||t instanceof FileList))&&(n||Ta(t)))if(e=n?[]:{},!n&&!Jje(t))e=t;else for(const r in t)t.hasOwnProperty(r)&&(e[r]=nu(t[r]));else return t;return e}var uR=t=>Array.isArray(t)?t.filter(Boolean):[],gs=t=>t===void 0,jt=(t,e,n)=>{if(!e||!Ta(t))return n;const r=uR(e.split(/[,[\].]+?/)).reduce((o,i)=>Sc(o)?o:o[i],t);return gs(r)||r===t?gs(t[e])?n:t[e]:r},Cp=t=>typeof t=="boolean",bW=t=>/^\w*$/.test(t),gce=t=>uR(t.replace(/["|']|\]/g,"").split(/\.|\[/)),$o=(t,e,n)=>{let r=-1;const o=bW(e)?[e]:gce(e),i=o.length,s=i-1;for(;++r<i;){const a=o[r];let l=n;if(r!==s){const c=t[a];l=Ta(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(a==="__proto__")return;t[a]=l,t=t[a]}return t};const FL={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},sf={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xg={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},e6e=qt.createContext(null),CW=()=>qt.useContext(e6e);var mce=(t,e,n,r=!0)=>{const o={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(o,i,{get:()=>{const s=i;return e._proxyFormState[s]!==sf.all&&(e._proxyFormState[s]=!r||sf.all),n&&(n[s]=!0),t[s]}});return o},Gu=t=>Ta(t)&&!Object.keys(t).length,yce=(t,e,n,r)=>{n(t);const{name:o,...i}=t;return Gu(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(s=>e[s]===(!r||sf.all))},JM=t=>Array.isArray(t)?t:[t],vce=(t,e,n)=>!t||!e||t===e||JM(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r)));function SW(t){const e=qt.useRef(t);e.current=t,qt.useEffect(()=>{const n=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{n&&n.unsubscribe()}},[t.disabled])}function t6e(t){const e=CW(),{control:n=e.control,disabled:r,name:o,exact:i}=t||{},[s,a]=qt.useState(n._formState),l=qt.useRef(!0),c=qt.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=qt.useRef(o);return u.current=o,SW({disabled:r,next:d=>l.current&&vce(u.current,d.name,i)&&yce(d,c.current,n._updateFormState)&&a({...n._formState,...d}),subject:n._subjects.state}),qt.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),mce(s,n,c.current,!1)}var Tp=t=>typeof t=="string",bce=(t,e,n,r,o)=>Tp(t)?(r&&e.watch.add(t),jt(n,t,o)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),jt(n,i))):(r&&(e.watchAll=!0),n);function n6e(t){const e=CW(),{control:n=e.control,name:r,defaultValue:o,disabled:i,exact:s}=t||{},a=qt.useRef(r);a.current=r,SW({disabled:i,subject:n._subjects.values,next:u=>{vce(a.current,u.name,s)&&c(nu(bce(a.current,n._names,u.values||n._formValues,!1,o)))}});const[l,c]=qt.useState(n._getWatch(r,o));return qt.useEffect(()=>n._removeUnmounted()),l}function r6e(t){const e=CW(),{name:n,disabled:r,control:o=e.control,shouldUnregister:i}=t,s=pce(o._names.array,n),a=n6e({control:o,name:n,defaultValue:jt(o._formValues,n,jt(o._defaultValues,n,t.defaultValue)),exact:!0}),l=t6e({control:o,name:n}),c=qt.useRef(o.register(n,{...t.rules,value:a,...Cp(t.disabled)?{disabled:t.disabled}:{}}));return qt.useEffect(()=>{const u=o._options.shouldUnregister||i,d=(h,f)=>{const p=jt(o._fields,h);p&&p._f&&(p._f.mount=f)};if(d(n,!0),u){const h=nu(jt(o._options.defaultValues,n));$o(o._defaultValues,n,h),gs(jt(o._formValues,n))&&$o(o._formValues,n,h)}return()=>{(s?u&&!o._state.action:u)?o.unregister(n):d(n,!1)}},[n,o,s,i]),qt.useEffect(()=>{jt(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:jt(o._fields,n)._f.value})},[r,n,o]),{field:{name:n,value:a,...Cp(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:qt.useCallback(u=>c.current.onChange({target:{value:fce(u),name:n},type:FL.CHANGE}),[n]),onBlur:qt.useCallback(()=>c.current.onBlur({target:{value:jt(o._formValues,n),name:n},type:FL.BLUR}),[n,o]),ref:u=>{const d=jt(o._fields,n);d&&u&&(d._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:h=>u.setCustomValidity(h),reportValidity:()=>u.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!jt(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!jt(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!jt(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!jt(l.validatingFields,n)},error:{enumerable:!0,get:()=>jt(l.errors,n)}})}}const o6e=t=>t.render(r6e(t));var Cce=(t,e,n,r,o)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:o||!0}}:{},DK=t=>({isOnSubmit:!t||t===sf.onSubmit,isOnBlur:t===sf.onBlur,isOnChange:t===sf.onChange,isOnAll:t===sf.all,isOnTouch:t===sf.onTouched}),LK=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const k_=(t,e,n,r)=>{for(const o of n||Object.keys(t)){const i=jt(t,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&e(s.refs[0],o)&&!r)break;if(s.ref&&e(s.ref,s.name)&&!r)break;k_(a,e)}else Ta(a)&&k_(a,e)}}};var i6e=(t,e,n)=>{const r=uR(jt(t,n));return $o(r,"root",e[n]),$o(t,n,r),t},EW=t=>t.type==="file",ov=t=>typeof t=="function",BL=t=>{if(!vW)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},eD=t=>Tp(t),xW=t=>t.type==="radio",$L=t=>t instanceof RegExp;const kK={value:!1,isValid:!1},FK={value:!0,isValid:!0};var Sce=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!gs(t[0].attributes.value)?gs(t[0].value)||t[0].value===""?FK:{value:t[0].value,isValid:!0}:FK:kK}return kK};const BK={isValid:!1,value:null};var Ece=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,BK):BK;function $K(t,e,n="validate"){if(eD(t)||Array.isArray(t)&&t.every(eD)||Cp(t)&&!t)return{type:n,message:eD(t)?t:"",ref:e}}var lE=t=>Ta(t)&&!$L(t)?t:{value:t,message:""},HK=async(t,e,n,r,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:c,min:u,max:d,pattern:h,validate:f,name:p,valueAsNumber:m,mount:y,disabled:v}=t._f,b=jt(e,p);if(!y||v)return{};const S=s?s[0]:i,w=L=>{r&&S.reportValidity&&(S.setCustomValidity(Cp(L)?"":L||""),S.reportValidity())},A={},_=xW(i),P=cR(i),R=_||P,O=(m||EW(i))&&gs(i.value)&&gs(b)||BL(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,N=Cce.bind(null,p,n,A),M=(L,F,$,D=xg.maxLength,k=xg.minLength)=>{const U=L?F:$;A[p]={type:L?D:k,message:U,ref:i,...N(L?D:k,U)}};if(o?!Array.isArray(b)||!b.length:a&&(!R&&(O||Sc(b))||Cp(b)&&!b||P&&!Sce(s).isValid||_&&!Ece(s).isValid)){const{value:L,message:F}=eD(a)?{value:!!a,message:a}:lE(a);if(L&&(A[p]={type:xg.required,message:F,ref:S,...N(xg.required,F)},!n))return w(F),A}if(!O&&(!Sc(u)||!Sc(d))){let L,F;const $=lE(d),D=lE(u);if(!Sc(b)&&!isNaN(b)){const k=i.valueAsNumber||b&&+b;Sc($.value)||(L=k>$.value),Sc(D.value)||(F=k<D.value)}else{const k=i.valueAsDate||new Date(b),U=q=>new Date(new Date().toDateString()+" "+q),H=i.type=="time",V=i.type=="week";Tp($.value)&&b&&(L=H?U(b)>U($.value):V?b>$.value:k>new Date($.value)),Tp(D.value)&&b&&(F=H?U(b)<U(D.value):V?b<D.value:k<new Date(D.value))}if((L||F)&&(M(!!L,$.message,D.message,xg.max,xg.min),!n))return w(A[p].message),A}if((l||c)&&!O&&(Tp(b)||o&&Array.isArray(b))){const L=lE(l),F=lE(c),$=!Sc(L.value)&&b.length>+L.value,D=!Sc(F.value)&&b.length<+F.value;if(($||D)&&(M($,L.message,F.message),!n))return w(A[p].message),A}if(h&&!O&&Tp(b)){const{value:L,message:F}=lE(h);if($L(L)&&!b.match(L)&&(A[p]={type:xg.pattern,message:F,ref:i,...N(xg.pattern,F)},!n))return w(F),A}if(f){if(ov(f)){const L=await f(b,e),F=$K(L,S);if(F&&(A[p]={...F,...N(xg.validate,F.message)},!n))return w(F.message),A}else if(Ta(f)){let L={};for(const F in f){if(!Gu(L)&&!n)break;const $=$K(await f[F](b,e),S,F);$&&(L={...$,...N(F,$.message)},w($.message),n&&(A[p]=L))}if(!Gu(L)&&(A[p]={ref:S,...L},!n))return A}}return w(!0),A};function s6e(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=gs(t)?r++:t[e[r++]];return t}function a6e(t){for(const e in t)if(t.hasOwnProperty(e)&&!gs(t[e]))return!1;return!0}function ua(t,e){const n=Array.isArray(e)?e:bW(e)?[e]:gce(e),r=n.length===1?t:s6e(t,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Ta(r)&&Gu(r)||Array.isArray(r)&&a6e(r))&&ua(t,n.slice(0,-1)),t}var KH=()=>{let t=[];return{get observers(){return t},next:o=>{for(const i of t)i.next&&i.next(o)},subscribe:o=>(t.push(o),{unsubscribe:()=>{t=t.filter(i=>i!==o)}}),unsubscribe:()=>{t=[]}}},HL=t=>Sc(t)||!hce(t);function Vb(t,e){if(HL(t)||HL(e))return t===e;if(KE(t)&&KE(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const o of n){const i=t[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=e[o];if(KE(i)&&KE(s)||Ta(i)&&Ta(s)||Array.isArray(i)&&Array.isArray(s)?!Vb(i,s):i!==s)return!1}}return!0}var xce=t=>t.type==="select-multiple",l6e=t=>xW(t)||cR(t),QH=t=>BL(t)&&t.isConnected,wce=t=>{for(const e in t)if(ov(t[e]))return!0;return!1};function UL(t,e={}){const n=Array.isArray(t);if(Ta(t)||n)for(const r in t)Array.isArray(t[r])||Ta(t[r])&&!wce(t[r])?(e[r]=Array.isArray(t[r])?[]:{},UL(t[r],e[r])):Sc(t[r])||(e[r]=!0);return e}function Ace(t,e,n){const r=Array.isArray(t);if(Ta(t)||r)for(const o in t)Array.isArray(t[o])||Ta(t[o])&&!wce(t[o])?gs(e)||HL(n[o])?n[o]=Array.isArray(t[o])?UL(t[o],[]):{...UL(t[o])}:Ace(t[o],Sc(e)?{}:e[o],n[o]):n[o]=!Vb(t[o],e[o]);return n}var NN=(t,e)=>Ace(t,e,UL(e)),Tce=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>gs(t)?t:e?t===""?NaN:t&&+t:n&&Tp(t)?new Date(t):r?r(t):t;function ZH(t){const e=t.ref;if(!(t.refs?t.refs.every(n=>n.disabled):e.disabled))return EW(e)?e.files:xW(e)?Ece(t.refs).value:xce(e)?[...e.selectedOptions].map(({value:n})=>n):cR(e)?Sce(t.refs).value:Tce(gs(e.value)?t.ref.value:e.value,t)}var c6e=(t,e,n,r)=>{const o={};for(const i of t){const s=jt(e,i);s&&$o(o,i,s._f)}return{criteriaMode:n,names:[...t],fields:o,shouldUseNativeValidation:r}},aT=t=>gs(t)?t:$L(t)?t.source:Ta(t)?$L(t.value)?t.value.source:t.value:t,u6e=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function UK(t,e,n){const r=jt(t,n);if(r||bW(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=jt(e,i),a=jt(t,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:n}}var d6e=(t,e,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(e||t):(n?r.isOnBlur:o.isOnBlur)?!t:(n?r.isOnChange:o.isOnChange)?t:!0,h6e=(t,e)=>!uR(jt(t,e)).length&&ua(t,e);const f6e={mode:sf.onSubmit,reValidateMode:sf.onChange,shouldFocusError:!0};function p6e(t={}){let e={...f6e,...t},n={submitCount:0,isDirty:!1,isLoading:ov(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},o=Ta(e.defaultValues)||Ta(e.values)?nu(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:nu(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:KH(),array:KH(),state:KH()},h=DK(e.mode),f=DK(e.reValidateMode),p=e.criteriaMode===sf.all,m=ce=>Ae=>{clearTimeout(c),c=setTimeout(ce,Ae)},y=async ce=>{if(u.isValid||ce){const Ae=e.resolver?Gu((await R()).errors):await N(r,!0);Ae!==n.isValid&&d.state.next({isValid:Ae})}},v=(ce,Ae)=>{(u.isValidating||u.validatingFields)&&((ce||Array.from(a.mount)).forEach(be=>{be&&(Ae?$o(n.validatingFields,be,Ae):ua(n.validatingFields,be))}),d.state.next({validatingFields:n.validatingFields,isValidating:!Gu(n.validatingFields)}))},b=(ce,Ae=[],be,Se,Pe=!0,Ue=!0)=>{if(Se&&be){if(s.action=!0,Ue&&Array.isArray(jt(r,ce))){const _e=be(jt(r,ce),Se.argA,Se.argB);Pe&&$o(r,ce,_e)}if(Ue&&Array.isArray(jt(n.errors,ce))){const _e=be(jt(n.errors,ce),Se.argA,Se.argB);Pe&&$o(n.errors,ce,_e),h6e(n.errors,ce)}if(u.touchedFields&&Ue&&Array.isArray(jt(n.touchedFields,ce))){const _e=be(jt(n.touchedFields,ce),Se.argA,Se.argB);Pe&&$o(n.touchedFields,ce,_e)}u.dirtyFields&&(n.dirtyFields=NN(o,i)),d.state.next({name:ce,isDirty:L(ce,Ae),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else $o(i,ce,Ae)},S=(ce,Ae)=>{$o(n.errors,ce,Ae),d.state.next({errors:n.errors})},w=ce=>{n.errors=ce,d.state.next({errors:n.errors,isValid:!1})},A=(ce,Ae,be,Se)=>{const Pe=jt(r,ce);if(Pe){const Ue=jt(i,ce,gs(be)?jt(o,ce):be);gs(Ue)||Se&&Se.defaultChecked||Ae?$o(i,ce,Ae?Ue:ZH(Pe._f)):D(ce,Ue),s.mount&&y()}},_=(ce,Ae,be,Se,Pe)=>{let Ue=!1,_e=!1;const Oe={name:ce},ze=!!(jt(r,ce)&&jt(r,ce)._f&&jt(r,ce)._f.disabled);if(!be||Se){u.isDirty&&(_e=n.isDirty,n.isDirty=Oe.isDirty=L(),Ue=_e!==Oe.isDirty);const ne=ze||Vb(jt(o,ce),Ae);_e=!!(!ze&&jt(n.dirtyFields,ce)),ne||ze?ua(n.dirtyFields,ce):$o(n.dirtyFields,ce,!0),Oe.dirtyFields=n.dirtyFields,Ue=Ue||u.dirtyFields&&_e!==!ne}if(be){const ne=jt(n.touchedFields,ce);ne||($o(n.touchedFields,ce,be),Oe.touchedFields=n.touchedFields,Ue=Ue||u.touchedFields&&ne!==be)}return Ue&&Pe&&d.state.next(Oe),Ue?Oe:{}},P=(ce,Ae,be,Se)=>{const Pe=jt(n.errors,ce),Ue=u.isValid&&Cp(Ae)&&n.isValid!==Ae;if(t.delayError&&be?(l=m(()=>S(ce,be)),l(t.delayError)):(clearTimeout(c),l=null,be?$o(n.errors,ce,be):ua(n.errors,ce)),(be?!Vb(Pe,be):Pe)||!Gu(Se)||Ue){const _e={...Se,...Ue&&Cp(Ae)?{isValid:Ae}:{},errors:n.errors,name:ce};n={...n,..._e},d.state.next(_e)}},R=async ce=>{v(ce,!0);const Ae=await e.resolver(i,e.context,c6e(ce||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return v(ce),Ae},O=async ce=>{const{errors:Ae}=await R(ce);if(ce)for(const be of ce){const Se=jt(Ae,be);Se?$o(n.errors,be,Se):ua(n.errors,be)}else n.errors=Ae;return Ae},N=async(ce,Ae,be={valid:!0})=>{for(const Se in ce){const Pe=ce[Se];if(Pe){const{_f:Ue,..._e}=Pe;if(Ue){const Oe=a.array.has(Ue.name);v([Se],!0);const ze=await HK(Pe,i,p,e.shouldUseNativeValidation&&!Ae,Oe);if(v([Se]),ze[Ue.name]&&(be.valid=!1,Ae))break;!Ae&&(jt(ze,Ue.name)?Oe?i6e(n.errors,ze,Ue.name):$o(n.errors,Ue.name,ze[Ue.name]):ua(n.errors,Ue.name))}_e&&await N(_e,Ae,be)}}return be.valid},M=()=>{for(const ce of a.unMount){const Ae=jt(r,ce);Ae&&(Ae._f.refs?Ae._f.refs.every(be=>!QH(be)):!QH(Ae._f.ref))&&ee(ce)}a.unMount=new Set},L=(ce,Ae)=>(ce&&Ae&&$o(i,ce,Ae),!Vb(J(),o)),F=(ce,Ae,be)=>bce(ce,a,{...s.mount?i:gs(Ae)?o:Tp(ce)?{[ce]:Ae}:Ae},be,Ae),$=ce=>uR(jt(s.mount?i:o,ce,t.shouldUnregister?jt(o,ce,[]):[])),D=(ce,Ae,be={})=>{const Se=jt(r,ce);let Pe=Ae;if(Se){const Ue=Se._f;Ue&&(!Ue.disabled&&$o(i,ce,Tce(Ae,Ue)),Pe=BL(Ue.ref)&&Sc(Ae)?"":Ae,xce(Ue.ref)?[...Ue.ref.options].forEach(_e=>_e.selected=Pe.includes(_e.value)):Ue.refs?cR(Ue.ref)?Ue.refs.length>1?Ue.refs.forEach(_e=>(!_e.defaultChecked||!_e.disabled)&&(_e.checked=Array.isArray(Pe)?!!Pe.find(Oe=>Oe===_e.value):Pe===_e.value)):Ue.refs[0]&&(Ue.refs[0].checked=!!Pe):Ue.refs.forEach(_e=>_e.checked=_e.value===Pe):EW(Ue.ref)?Ue.ref.value="":(Ue.ref.value=Pe,Ue.ref.type||d.values.next({name:ce,values:{...i}})))}(be.shouldDirty||be.shouldTouch)&&_(ce,Pe,be.shouldTouch,be.shouldDirty,!0),be.shouldValidate&&q(ce)},k=(ce,Ae,be)=>{for(const Se in Ae){const Pe=Ae[Se],Ue=`${ce}.${Se}`,_e=jt(r,Ue);(a.array.has(ce)||!HL(Pe)||_e&&!_e._f)&&!KE(Pe)?k(Ue,Pe,be):D(Ue,Pe,be)}},U=(ce,Ae,be={})=>{const Se=jt(r,ce),Pe=a.array.has(ce),Ue=nu(Ae);$o(i,ce,Ue),Pe?(d.array.next({name:ce,values:{...i}}),(u.isDirty||u.dirtyFields)&&be.shouldDirty&&d.state.next({name:ce,dirtyFields:NN(o,i),isDirty:L(ce,Ue)})):Se&&!Se._f&&!Sc(Ue)?k(ce,Ue,be):D(ce,Ue,be),LK(ce,a)&&d.state.next({...n}),d.values.next({name:s.mount?ce:void 0,values:{...i}})},H=async ce=>{s.mount=!0;const Ae=ce.target;let be=Ae.name,Se=!0;const Pe=jt(r,be),Ue=()=>Ae.type?ZH(Pe._f):fce(ce),_e=Oe=>{Se=Number.isNaN(Oe)||Oe===jt(i,be,Oe)};if(Pe){let Oe,ze;const ne=Ue(),W=ce.type===FL.BLUR||ce.type===FL.FOCUS_OUT,j=!u6e(Pe._f)&&!e.resolver&&!jt(n.errors,be)&&!Pe._f.deps||d6e(W,jt(n.touchedFields,be),n.isSubmitted,f,h),ue=LK(be,a,W);$o(i,be,ne),W?(Pe._f.onBlur&&Pe._f.onBlur(ce),l&&l(0)):Pe._f.onChange&&Pe._f.onChange(ce);const he=_(be,ne,W,!1),Ce=!Gu(he)||ue;if(!W&&d.values.next({name:be,type:ce.type,values:{...i}}),j)return u.isValid&&y(),Ce&&d.state.next({name:be,...ue?{}:he});if(!W&&ue&&d.state.next({...n}),e.resolver){const{errors:Ie}=await R([be]);if(_e(ne),Se){const et=UK(n.errors,r,be),je=UK(Ie,r,et.name||be);Oe=je.error,be=je.name,ze=Gu(Ie)}}else v([be],!0),Oe=(await HK(Pe,i,p,e.shouldUseNativeValidation))[be],v([be]),_e(ne),Se&&(Oe?ze=!1:u.isValid&&(ze=await N(r,!0)));Se&&(Pe._f.deps&&q(Pe._f.deps),P(be,ze,Oe,he))}},V=(ce,Ae)=>{if(jt(n.errors,Ae)&&ce.focus)return ce.focus(),1},q=async(ce,Ae={})=>{let be,Se;const Pe=JM(ce);if(e.resolver){const Ue=await O(gs(ce)?ce:Pe);be=Gu(Ue),Se=ce?!Pe.some(_e=>jt(Ue,_e)):be}else ce?(Se=(await Promise.all(Pe.map(async Ue=>{const _e=jt(r,Ue);return await N(_e&&_e._f?{[Ue]:_e}:_e)}))).every(Boolean),!(!Se&&!n.isValid)&&y()):Se=be=await N(r);return d.state.next({...!Tp(ce)||u.isValid&&be!==n.isValid?{}:{name:ce},...e.resolver||!ce?{isValid:be}:{},errors:n.errors}),Ae.shouldFocus&&!Se&&k_(r,V,ce?Pe:a.mount),Se},J=ce=>{const Ae={...s.mount?i:o};return gs(ce)?Ae:Tp(ce)?jt(Ae,ce):ce.map(be=>jt(Ae,be))},Q=(ce,Ae)=>({invalid:!!jt((Ae||n).errors,ce),isDirty:!!jt((Ae||n).dirtyFields,ce),error:jt((Ae||n).errors,ce),isValidating:!!jt(n.validatingFields,ce),isTouched:!!jt((Ae||n).touchedFields,ce)}),se=ce=>{ce&&JM(ce).forEach(Ae=>ua(n.errors,Ae)),d.state.next({errors:ce?n.errors:{}})},oe=(ce,Ae,be)=>{const Se=(jt(r,ce,{_f:{}})._f||{}).ref,Pe=jt(n.errors,ce)||{},{ref:Ue,message:_e,type:Oe,...ze}=Pe;$o(n.errors,ce,{...ze,...Ae,ref:Se}),d.state.next({name:ce,errors:n.errors,isValid:!1}),be&&be.shouldFocus&&Se&&Se.focus&&Se.focus()},ie=(ce,Ae)=>ov(ce)?d.values.subscribe({next:be=>ce(F(void 0,Ae),be)}):F(ce,Ae,!0),ee=(ce,Ae={})=>{for(const be of ce?JM(ce):a.mount)a.mount.delete(be),a.array.delete(be),Ae.keepValue||(ua(r,be),ua(i,be)),!Ae.keepError&&ua(n.errors,be),!Ae.keepDirty&&ua(n.dirtyFields,be),!Ae.keepTouched&&ua(n.touchedFields,be),!Ae.keepIsValidating&&ua(n.validatingFields,be),!e.shouldUnregister&&!Ae.keepDefaultValue&&ua(o,be);d.values.next({values:{...i}}),d.state.next({...n,...Ae.keepDirty?{isDirty:L()}:{}}),!Ae.keepIsValid&&y()},re=({disabled:ce,name:Ae,field:be,fields:Se,value:Pe})=>{if(Cp(ce)&&s.mount||ce){const Ue=ce?void 0:gs(Pe)?ZH(be?be._f:jt(Se,Ae)._f):Pe;$o(i,Ae,Ue),_(Ae,Ue,!1,!1,!0)}},fe=(ce,Ae={})=>{let be=jt(r,ce);const Se=Cp(Ae.disabled);return $o(r,ce,{...be||{},_f:{...be&&be._f?be._f:{ref:{name:ce}},name:ce,mount:!0,...Ae}}),a.mount.add(ce),be?re({field:be,disabled:Ae.disabled,name:ce,value:Ae.value}):A(ce,!0,Ae.value),{...Se?{disabled:Ae.disabled}:{},...e.progressive?{required:!!Ae.required,min:aT(Ae.min),max:aT(Ae.max),minLength:aT(Ae.minLength),maxLength:aT(Ae.maxLength),pattern:aT(Ae.pattern)}:{},name:ce,onChange:H,onBlur:H,ref:Pe=>{if(Pe){fe(ce,Ae),be=jt(r,ce);const Ue=gs(Pe.value)&&Pe.querySelectorAll&&Pe.querySelectorAll("input,select,textarea")[0]||Pe,_e=l6e(Ue),Oe=be._f.refs||[];if(_e?Oe.find(ze=>ze===Ue):Ue===be._f.ref)return;$o(r,ce,{_f:{...be._f,..._e?{refs:[...Oe.filter(QH),Ue,...Array.isArray(jt(o,ce))?[{}]:[]],ref:{type:Ue.type,name:ce}}:{ref:Ue}}}),A(ce,!1,void 0,Ue)}else be=jt(r,ce,{}),be._f&&(be._f.mount=!1),(e.shouldUnregister||Ae.shouldUnregister)&&!(pce(a.array,ce)&&s.action)&&a.unMount.add(ce)}}},we=()=>e.shouldFocusError&&k_(r,V,a.mount),xe=ce=>{Cp(ce)&&(d.state.next({disabled:ce}),k_(r,(Ae,be)=>{const Se=jt(r,be);Se&&(Ae.disabled=Se._f.disabled||ce,Array.isArray(Se._f.refs)&&Se._f.refs.forEach(Pe=>{Pe.disabled=Se._f.disabled||ce}))},0,!1))},ve=(ce,Ae)=>async be=>{let Se;be&&(be.preventDefault&&be.preventDefault(),be.persist&&be.persist());let Pe=nu(i);if(d.state.next({isSubmitting:!0}),e.resolver){const{errors:Ue,values:_e}=await R();n.errors=Ue,Pe=_e}else await N(r);if(ua(n.errors,"root"),Gu(n.errors)){d.state.next({errors:{}});try{await ce(Pe,be)}catch(Ue){Se=Ue}}else Ae&&await Ae({...n.errors},be),we(),setTimeout(we);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Gu(n.errors)&&!Se,submitCount:n.submitCount+1,errors:n.errors}),Se)throw Se},Re=(ce,Ae={})=>{jt(r,ce)&&(gs(Ae.defaultValue)?U(ce,nu(jt(o,ce))):(U(ce,Ae.defaultValue),$o(o,ce,nu(Ae.defaultValue))),Ae.keepTouched||ua(n.touchedFields,ce),Ae.keepDirty||(ua(n.dirtyFields,ce),n.isDirty=Ae.defaultValue?L(ce,nu(jt(o,ce))):L()),Ae.keepError||(ua(n.errors,ce),u.isValid&&y()),d.state.next({...n}))},pe=(ce,Ae={})=>{const be=ce?nu(ce):o,Se=nu(be),Pe=Gu(ce),Ue=Pe?o:Se;if(Ae.keepDefaultValues||(o=be),!Ae.keepValues){if(Ae.keepDirtyValues)for(const _e of a.mount)jt(n.dirtyFields,_e)?$o(Ue,_e,jt(i,_e)):U(_e,jt(Ue,_e));else{if(vW&&gs(ce))for(const _e of a.mount){const Oe=jt(r,_e);if(Oe&&Oe._f){const ze=Array.isArray(Oe._f.refs)?Oe._f.refs[0]:Oe._f.ref;if(BL(ze)){const ne=ze.closest("form");if(ne){ne.reset();break}}}}r={}}i=t.shouldUnregister?Ae.keepDefaultValues?nu(o):{}:nu(Ue),d.array.next({values:{...Ue}}),d.values.next({values:{...Ue}})}a={mount:Ae.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!u.isValid||!!Ae.keepIsValid||!!Ae.keepDirtyValues,s.watch=!!t.shouldUnregister,d.state.next({submitCount:Ae.keepSubmitCount?n.submitCount:0,isDirty:Pe?!1:Ae.keepDirty?n.isDirty:!!(Ae.keepDefaultValues&&!Vb(ce,o)),isSubmitted:Ae.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Pe?[]:Ae.keepDirtyValues?Ae.keepDefaultValues&&i?NN(o,i):n.dirtyFields:Ae.keepDefaultValues&&ce?NN(o,ce):Ae.keepDirty?n.dirtyFields:{},touchedFields:Ae.keepTouched?n.touchedFields:{},errors:Ae.keepErrors?n.errors:{},isSubmitSuccessful:Ae.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Be=(ce,Ae)=>pe(ov(ce)?ce(i):ce,Ae);return{control:{register:fe,unregister:ee,getFieldState:Q,handleSubmit:ve,setError:oe,_executeSchema:R,_getWatch:F,_getDirty:L,_updateV
311alid:y,_removeUnmounted:M,_updateFieldArray:b,_updateDisabledField:re,_getFieldArray:$,_reset:pe,_resetDefaultValues:()=>ov(e.defaultValues)&&e.defaultValues().then(ce=>{Be(ce,e.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:ce=>{n={...n,...ce}},_disableForm:xe,_subjects:d,_proxyFormState:u,_setErrors:w,get _fields(){return r},get _formValues(){return i},get _state(){return s},set _state(ce){s=ce},get _defaultValues(){return o},get _names(){return a},set _names(ce){a=ce},get _formState(){return n},set _formState(ce){n=ce},get _options(){return e},set _options(ce){e={...e,...ce}}},trigger:q,register:fe,handleSubmit:ve,watch:ie,setValue:U,getValues:J,reset:Be,resetField:Re,clearErrors:se,unregister:ee,setError:oe,setFocus:(ce,Ae={})=>{const be=jt(r,ce),Se=be&&be._f;if(Se){const Pe=Se.refs?Se.refs[0]:Se.ref;Pe.focus&&(Pe.focus(),Ae.shouldSelect&&Pe.select())}},getFieldState:Q}}function JC(t={}){const e=qt.useRef(),n=qt.useRef(),[r,o]=qt.useState({isDirty:!1,isValidating:!1,isLoading:ov(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:ov(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...p6e(t),formState:r});const i=e.current.control;return i._options=t,SW({subject:i._subjects.state,next:s=>{yce(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),qt.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),qt.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),qt.useEffect(()=>{t.values&&!Vb(t.values,n.current)?(i._reset(t.values,i._options.resetOptions),n.current=t.values,o(s=>({...s}))):i._resetDefaultValues()},[t.values,i]),qt.useEffect(()=>{t.errors&&i._setErrors(t.errors)},[t.errors,i]),qt.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),qt.useEffect(()=>{t.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[t.shouldUnregister,i]),e.current.formState=mce(r,i),e.current}var zK=function(t,e,n){if(t&&"reportValidity"in t){var r=jt(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},_ce=function(t,e){var n=function(o){var i=e.fields[o];i&&i.ref&&"reportValidity"in i.ref?zK(i.ref,o,t):i.refs&&i.refs.forEach(function(s){return zK(s,o,t)})};for(var r in e.fields)n(r)},g6e=function(t,e){e.shouldUseNativeValidation&&_ce(t,e);var n={};for(var r in t){var o=jt(e.fields,r);$o(n,r,Object.assign(t[r],{ref:o&&o.ref}))}return n},sw=function(t,e,n){return e===void 0&&(e={}),n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve(function(s,a){try{var l=(e.context,Promise.resolve(t[n.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},e,{context:o}))).then(function(c){return i.shouldUseNativeValidation&&_ce({},i),{values:n.rawValues?r:c,errors:{}}}))}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:g6e((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(c,u){if(c[u.path]||(c[u.path]={message:u.message,type:u.type}),l){var d=c[u.path].types,h=d&&d[u.type];c[u.path]=Cce(u.path,l,c,u.type,h?[].concat(h,u.message):u.message)}return c},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}};const m6e=gt(g("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m3.3 14.71L11 12.41V7h2v4.59l3.71 3.71z"}),"AccessTimeFilled"),qI=gt(g("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z"}),"AccountTree"),eS=gt(g("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),y6e=gt(g("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),v6e=gt(g("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),b6e=gt(g("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight"),C6e=gt(g("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),S6e=gt(g("path",{d:"M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z"}),"BorderAll"),E6e=gt(g("path",{d:"M19 6v10.5l1.95 1.95c.03-.15.05-.3.05-.45V6c0-1.1-.9-2-2-2H6.5l2 2zM3.22 3.32 1.95 4.59 3 5.64V18c0 1.1.9 2 2 2h12.36l2.06 2.06 1.27-1.27zM15 18H5V7.64L15.36 18z"}),"BrowserNotSupported"),dR=gt(g("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),x6e=gt(g("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"}),"CheckBoxOutlineBlank"),Vv=gt(g("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),Ice=gt(g("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),PF=gt(g("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),i4=gt(g("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}
311),"Circle"),w6e=gt(g("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96M3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4z"}),"CloudOff"),A6e=gt(g("path",{d:"M21.5 14.98c-.02 0-.03 0-.05.01C21.2 13.3 19.76 12 18 12c-1.4 0-2.6.83-3.16 2.02C13.26 14.1 12 15.4 12 17c0 1.66 1.34 3 3 3l6.5-.02c1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5m.01 3.02H15c-.55 0-1-.45-1-1s.45-1 1-1h1.25v-.25c0-.97.78-1.75 1.75-1.75s1.75.78 1.75 1.75V17h1.76c.28 0 .5.22.5.5-.01.27-.23.5-.5.5M10 4.26v2.09C7.67 7.18 6 9.39 6 12c0 1.77.78 3.34 2 4.44V14h2v6H4v-2h2.73C5.06 16.54 4 14.4 4 12c0-3.73 2.55-6.85 6-7.74M20 6h-2.73c1.43 1.26 2.41 3.01 2.66 5h-2.02c-.23-1.36-.93-2.55-1.91-3.44V10h-2V4h6z"}),"CloudSyncOutlined"),T6e=gt(g("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"CloudUploadOutlined"),_6e=gt(g("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens"),wW=gt(g("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"Construction"),I6e=gt(g("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),P6e=gt(g("path",{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z"}),"CreateNewFolder"),R6e=gt(g("path",{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-1 14H7c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1"}),"CropSquareRounded"),Pce=gt(g("path",{d:"M3 3h8v8H3zm10 0h8v8h-8zM3 13h8v8H3zm15 0h-2v3h-3v2h3v3h2v-3h3v-2h-3z"}),"DashboardCustomize"),RF=gt(g("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),O6e=gt(g("path",{d:"M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3zM14 5h-3l-1-1H6L5 5H2v2h12z"}),"DeleteSweep"),Rce=gt(g("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),N6e=gt(g("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-6 12v-3h-4v-4h4V8l5 5z"}),"DriveFileMove"),Oce=gt(g("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2m0 14H3V5h18zm-2-9H8v2h11zm0 4H8v2h11zM7 8H5v2h2zm0 4H5v2h2z"}),"Dvr"),hR=gt(g("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),AW=gt(g("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Email"),TW=gt(g("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"ErrorOutlined"),Gv=gt(g("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Nce=gt(g("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),M6e=gt(g("path",{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2m0 16H7V3h14z"}),"FilterNone"),D6e=gt(g("path",{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.
31115 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"}),"FindInPage"),_W=gt(g("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder"),L6e=gt(g("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9v-2H4V8l8 5 8-5v5h2V6c0-1.1-.9-2-2-2m-8 7L4 6h16zm7 4 4 4-4 4v-3h-4v-2h4z"}),"ForwardToInbox"),k6e=gt(g("path",{fillRule:"evenodd",d:"M3 3v8h8V3zm6 6H5V5h4zm-6 4v8h8v-8zm6 6H5v-4h4zm4-16v8h8V3zm6 6h-4V5h4zm-6 4v8h8v-8zm6 6h-4v-4h4z"}),"GridView"),F6e=gt(g("path",{d:"M16.48 10.41c-.39.39-1.04.39-1.43 0l-4.47-4.46-7.05 7.04-.66-.63c-1.17-1.17-1.17-3.07 0-4.24l4.24-4.24c1.17-1.17 3.07-1.17 4.24 0L16.48 9c.39.39.39 1.02 0 1.41m.7-2.12c.78.78.78 2.05 0 2.83-1.27 1.27-2.61.22-2.83 0l-3.76-3.76-5.57 5.57c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.42 0l4.62-4.62.71.71-4.62 4.62c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.42 0l4.62-4.62.71.71-4.62 4.62c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.62-4.62.71.71-4.62 4.62c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l8.32-8.34c1.17-1.17 1.17-3.07 0-4.24l-4.24-4.24c-1.15-1.15-3.01-1.17-4.18-.06z"}),"Handshake"),JH=gt(g("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"HighlightOff"),B6e=gt(g("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History"),Mce=gt(g("path",{d:"M17.5 4.5c-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .65.73.45.75.45C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.41.21.75-.19.75-.45V6c-1.49-1.12-3.63-1.5-5.5-1.5m3.5 14c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"}),"ImportContacts"),Dce=gt(g("path",{d:"M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z"}),"ImportExport"),$6e=gt(g("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10H7v-2h10z"}),"IndeterminateCheckBox"),H6e=gt(g("path",{d:"M13 22h8v-7h-3v-4h-5V9h3V2H8v7h3v2H6v4H3v7h8v-7H8v-2h8v2h-3z"}),"Lan"),U6e=gt(g("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7.53 12L9 10.5l1.4-1.41 2.07 2.08L17.6 6 19 7.41zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4z"}),"LibraryAddCheck"),z6e=gt(g("path",{d:"M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt"),OF=gt(g("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock"),Lce=gt(g("path",{d:"M13 3c-4.97 0-9 4.03-9 9 0 .06.01.12.01.19l-1.84-1.84-1.41 1.41L5 16l4.24-4.24-1.41-1.41-1.82 1.82c0-.06-.01-.11-.01-.17 0-3.86 3.14-7 7-7s7 3.14 7 7-3.14 7-7 7c-1.9 0-3.62-.76-4.88-1.99L6.7 18.42C8.32 20.01 10.55 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m2 8v-1c0-1.1-.9-2-2-2s-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1m-1 0h-2v-1c0-.55.45-1 1-1s1 .45 1 1z"}),"LockResetOutlined"),IW=gt(g("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login"),V6e=gt(g("path",{d:"m17 8-1.41 1.41L17.17 11H9v2h8.17l-1.58 1.58L17 16l4-4zM5 5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h7v-2H5z"}),"LogoutOutlined"),PW=gt(g("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Mail"),kce=gt(g("path",{d:"M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z"}),"Memory"),G6e=gt(g("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),W6e=gt([g("path",{d:"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"},"0"),g("path",{d:"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24"},"1")],"MenuBook"),j6e=gt(g("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),q6e=gt(g("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),Fce=gt(g("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 8c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4m-6 4c.22-.72 3.31-2 6-2 2.7 0 5.8 1.29 6 2zm-3-3v-3h3v-2H6V7H4v3H1v2h3v3z"}),"PersonAddOutlined"),Y6e=gt(g("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonOutlined"),X6e=gt(g("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),Bce=gt(g("path",{d:"m19.93 8.21-3.6 1.68L14 7.7V6.3l2.33-2.19 3.6 1.68c.38.18.82.01 1-.36.18-.38.01-.82-.36-1L16.65 2.6c-.38-.18-.83-.1-1.13.2l-1.74 1.6c-.18-.24-.46-.4-.78-.4-.55 0-1 .45-1 1v1H8.82C8.34 4.65 6.98 3.73 5.4 4.07c-1.16.25-2.15 1.25-2.36 2.43-.22 1.32.46 2.47 1.48 3.08L7.08 18H4v3h13v-3h-3.62L8.41 8.77c.17-.24.31-.49.41-.77H12v1c0 .55.45 1 1 1 .32 0 .6-.16.78-.4l1.74 1.6c.3.3.75.38 1.13.2l3.92-1.83c.38-.18.54-.62.36-1-.18-.37-.62-.54-1-.36M6 8c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}
311),"PrecisionManufacturing"),K6e=gt(g("path",{d:"M19.74 18.33C21.15 16.6 22 14.4 22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10c2.4 0 4.6-.85 6.33-2.26.27-.22.53-.46.78-.71.03-.03.05-.06.07-.08.2-.2.39-.41.56-.62M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8c0 1.85-.63 3.54-1.69 4.9l-1.43-1.43c.69-.98 1.1-2.17 1.1-3.46 0-3.31-2.69-6-6-6s-6 2.69-6 6 2.69 6 6 6c1.3 0 2.51-.42 3.49-1.13l1.42 1.42C15.54 19.37 13.85 20 12 20m1.92-7.49c.17-.66.02-1.38-.49-1.9l-.02-.02c-.77-.77-2-.78-2.78-.04-.01.01-.03.02-.05.04-.78.78-.78 2.05 0 2.83l.02.02c.52.51 1.25.67 1.91.49l1.51 1.51c-.6.36-1.29.58-2.04.58-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4c0 .73-.21 1.41-.56 2z"}),"Radar"),Q6e=gt(g("path",{d:"M19 13H5v-2h14z"}),"Remove"),Z6e=gt([g("path",{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27zM19 14.9 14.9 19H9.1L5 14.9V9.1L9.1 5h5.8L19 9.1z"},"0"),g("path",{d:"M11 7h2v6h-2zm0 8h2v2h-2z"},"1")],"ReportGmailerrorred"),J6e=gt(g("path",{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82"}),"Route"),$ce=gt(g("path",{d:"M19 15.18V3h-8v16H7V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V21h8V5h4v10.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82"}),"RouteSharp"),e8e=gt(g("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send"),RW=gt(g("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),Hce=gt(g("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage"),t8e=gt(g("path",{d:"M10 6.35V4.26c-.66.17-1.29.43-1.88.75l1.5 1.5c.13-.05.25-.11.38-.16M20 12c0-2.21-.91-4.2-2.36-5.64L20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 .85-.19 1.65-.51 2.38l1.5 1.5C19.63 14.74 20 13.41 20 12M4.27 4 2.86 5.41l2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.24-.76.34v2.09c.8-.21 1.55-.54 2.23-.96l2.58 2.58 1.41-1.41z"}),"SyncDisabledOutlined"),n8e=gt(g("path",{d:"M10 4.26v2.09C7.67 7.18 6 9.39 6 12c0 1.77.78 3.34 2 4.44V14h2v6H4v-2h2.73C5.06 16.54 4 14.4 4 12c0-3.73 2.55-6.85 6-7.74M20 4h-6v6h2V7.56c1.22 1.1 2 2.67 2 4.44h2c0-2.4-1.06-4.54-2.73-6H20zm0 13v-1c0-1.1-.9-2-2-2s-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1m-1 0h-2v-1c0-.55.45-1 1-1s1 .45 1 1z"}),"SyncLock"),OW=gt(g("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune"),r8e=gt(g("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"}),"UnfoldLess"),o8e=gt(g("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore"),i8e=gt(g("path",{d:"M15 7v4h1v2h-3V5h2l-3-4-3 4h2v8H8v-2.07c.7-.37 1.2-1.08 1.2-1.93 0-1.21-.99-2.2-2.2-2.2-1.21 0-2.2.99-2.2 2.2 0 .85.5 1.56 1.2 1.93V13c0 1.11.89 2 2 2h3v3.05c-.71.37-1.2 1.1-1.2 1.95 0 1.22.99 2.2 2.2 2.2 1.21 0 2.2-.98 2.2-2.2 0-.85-.49-1.58-1.2-1.95V15h3c1.11 0 2-.89 2-2v-2h1V7z"}),"Usb"),s8e=gt(g("path",{d:"M2 4v7h20V4zm8 16h12v-7H10zm-8 0h6v-7H2z"}),"ViewComfy"),tx=gt([g("path",{d:"M12 14c.04 0 .08-.01.12-.01l-2.61-2.61c0 .04-.01.08-.01.12 0 1.38 1.12 2.5 2.5 2.5m1.01-4.79 1.28 1.28c-.26-.57-.71-1.03-1.28-1.28m7.81 2.29C19.17 8.13 15.79 6 12 6c-.68 0-1.34.09-1.99.22l.92.92c.35-.09.7-.14 1.07-.14 2.48 0 4.5 2.02 4.5 4.5 0 .37-.06.72-.14 1.07l2.05 2.05c.98-.86 1.81-1.91 2.41-3.12M12 17c.95 0 1.87-.13 2.75-.39l-.98-.98c-.54.24-1.14.37-1.77.37-2.48 0-4.5-2.02-4.5-4.5 0-.63.13-1.23.36-1.77L6.11 7.97c-1.22.91-2.23 2.1-2.93 3.52C4.83 14.86 8.21 17 12 17",opacity:".3"},"0"),g("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5-.59 1.22-1.42 2.27-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6m2.28 4.49 2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.06-1.07.14L13 9.21c.58.25 1.03.71 1.28 1.28M2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45zm7.5 7.5 2.61 2.61c-.04.01-.08.02-.12.02-1.38 0-2.5-1.12-2.5-2.5 0-.05.01-.08.01-.13m-3.4-3.4 1.75 1.75c-.23.55-.36 1.15-.36 1.78 0 2.48 2.02 4.5 4.5 4.5.63 0 1.23-.13 1.7
3117-.36l.98.98c-.88.24-1.8.38-2.75.38-3.79 0-7.17-2.13-8.82-5.5.7-1.43 1.72-2.61 2.93-3.53"},"1")],"VisibilityOffTwoTone"),nx=gt([g("path",{d:"M12 6c-3.79 0-7.17 2.13-8.82 5.5C4.83 14.87 8.21 17 12 17s7.17-2.13 8.82-5.5C19.17 8.13 15.79 6 12 6m0 10c-2.48 0-4.5-2.02-4.5-4.5S9.52 7 12 7s4.5 2.02 4.5 4.5S14.48 16 12 16",opacity:".3"},"0"),g("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 13c-3.79 0-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6s7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17m0-10c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7m0 7c-1.38 0-2.5-1.12-2.5-2.5S10.62 9 12 9s2.5 1.12 2.5 2.5S13.38 14 12 14"},"1")],"VisibilityTwoTone"),NW=gt(g("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),a8e=gt(g("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"WarningOutlined"),l8e=gt(g("path",{d:"M23 19v-1c0-1.1-.9-2-2-2s-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1m-1 0h-2v-1c0-.55.45-1 1-1s1 .45 1 1zm2-10.02-2.12 2.13C19.35 8.57 15.85 7 12 7s-7.35 1.57-9.88 4.11L0 8.98C3.07 5.9 7.31 4 12 4s8.93 1.9 12 4.98M12 10c3.03 0 5.78 1.23 7.76 3.22l-2.12 2.12C16.2 13.9 14.2 13 12 13c-2.2 0-4.2.9-5.64 2.35l-2.12-2.12C6.22 11.23 8.97 10 12 10m3.53 7.46L12 21l-3.53-3.54c.9-.9 2.15-1.46 3.53-1.46s2.63.56 3.53 1.46"}),"WifiPassword"),c8e=gt(g("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2z"}),"ZoomInMap");function tS(t){this._maxSize=t,this.clear()}tS.prototype.clear=function(){this._size=0,this._values=Object.create(null)};tS.prototype.get=function(t){return this._values[t]};tS.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var u8e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Uce=/^\d+$/,d8e=/^\d/,h8e=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,f8e=/^\s*(['"]?)(.*?)(\1)\s*$/,MW=512,VK=new tS(MW),GK=new tS(MW),WK=new tS(MW),sC={Cache:tS,split:s4,normalizePath:e5,setter:function(t){var e=e5(t);return GK.get(t)||GK.set(t,function(r,o){for(var i=0,s=e.length,a=r;i<s-1;){var l=e[i];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[e[i++]]}a[e[i]]=o})},getter:function(t,e){var n=e5(t);return WK.get(t)||WK.set(t,function(o){for(var i=0,s=n.length;i<s;)if(o!=null||!e)o=o[n[i++]];else return;return o})},join:function(t){return t.reduce(function(e,n){return e+(DW(n)||Uce.test(n)?"["+n+"]":(e?".":"")+n)},"")},forEach:function(t,e,n){p8e(Array.isArray(t)?t:s4(t),e,n)}};function e5(t){return VK.get(t)||VK.set(t,s4(t).map(function(e){return e.replace(f8e,"$2")}))}function s4(t){return t.match(u8e)||[""]}function p8e(t,e,n){var r=t.length,o,i,s,a;for(i=0;i<r;i++)o=t[i],o&&(y8e(o)&&(o='"'+o+'"'),a=DW(o),s=!a&&/^\d+$/.test(o),e.call(n,o,a,s,i,t))}function DW(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function g8e(t){return t.match(d8e)&&!t.match(Uce)}function m8e(t){return h8e.test(t)}function y8e(t){return!DW(t)&&(g8e(t)||m8e(t))}const v8e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['â](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['â](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['â](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['â](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,NF=t=>t.match(v8e)||[],MF=t=>t[0].toUpperCase()+t.slice(1),LW=(t,e)=>NF(t).join(e).toLowerCase(),zce=t=>NF(t).reduce((e,n)=>`${e}${e?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),b8e=t=>MF(zce(t)),C8e=t=>LW(t,"_"),S8e=t=>LW(t,"-"),E8e=t=>MF(LW(t," ")),x8e=t=>NF(t).map(MF).join(" ");var t5={words:NF,upperFirst:MF,camelCase:zce,pascalCase:b8e,snakeCase:C8e,kebabCase:S8e,sentenceCase:E8e,titleCase:x8e},kW={exports:{}};kW.exports=function(t){return Vce(w8e(t),t)};kW.exports.array=Vce;function Vce(t,e){var n=t.length,r=new Array(n),o={},i=n,s=A8e(e),a=T8e(t);for(e.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(t[i],i,new Set);return r;
vendor: 29,817 bytes, lines 311-314
311function l(c,u,d){if(d.has(c)){var h;try{h=", node was:"+JSON.stringify(c)}catch{h=""}throw new Error("Cyclic dependency"+h)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!o[u]){o[u]=!0;var f=s.get(c)||new Set;if(f=Array.from(f),u=f.length){d.add(c);do{var p=f[--u];l(p,a.get(p),d)}while(u);d.delete(c)}r[--n]=c}}}function w8e(t){for(var e=new Set,n=0,r=t.length;n<r;n++){var o=t[n];e.add(o[0]),e.add(o[1])}return Array.from(e)}function A8e(t){for(var e=new Map,n=0,r=t.length;n<r;n++){var o=t[n];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}function T8e(t){for(var e=new Map,n=0,r=t.length;n<r;n++)e.set(t[n],n);return e}var _8e=kW.exports;const I8e=ud(_8e),P8e=Object.prototype.toString,R8e=Error.prototype.toString,O8e=RegExp.prototype.toString,N8e=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",M8e=/^Symbol\((.*)\)(.*)$/;function D8e(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function jK(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return D8e(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return N8e.call(t).replace(M8e,"Symbol($1)");const r=P8e.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+R8e.call(t)+"]":r==="RegExp"?O8e.call(t):null}function Ev(t,e){let n=jK(t,e);return n!==null?n:JSON.stringify(t,function(r,o){let i=jK(this[r],e);return i!==null?i:o},2)}function Gce(t){return t==null?[]:[].concat(t)}let Wce,jce,qce,L8e=/\$\{\s*(\w+)\s*\}/g;Wce=Symbol.toStringTag;class qK{constructor(e,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Wce]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],Gce(e).forEach(i=>{if(lu.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}jce=Symbol.hasInstance;qce=Symbol.toStringTag;class lu extends Error{static formatError(e,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof e=="string"?e.replace(L8e,(o,i)=>Ev(n[i])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,r,o,i){const s=new qK(e,n,r,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[qce]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,lu)}static[jce](e){return qK[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let hp={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Ev(r,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Ev(n,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Ev(n,!0)}\``+o}},eu={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},k8e={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},a4={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},F8e={isValue:"${path} field must be ${value}"},l4={noUnknown:"${path} field has unspecified keys: ${unknown}"},B8e={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},$8e={notType:t=>{const{path:e,value:n,spec:r}=t,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Ev(n,!0)}\``;if(n.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Ev(n,!0)}\``}return lu.formatError(hp.notType,t)}};Object.assign(Object.create(null),{mixed:hp,string:eu,number:k8e,date:a4,object:l4,array:B8e,boolean:F8e,tuple:$8e});const FW=t=>t&&t.__isYupSchema__;class zL{static fromOptions(e,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,s=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new zL(e,(a,l)=>{var c;let u=s(...a)?o:i;return(c=u?.(l))!=null?c:l})}constructor(e,n){this.fn=void 0,this.refs=e,this.refs=e,this.fn=n}resolve(e,n){let r=this.refs.map(i=>i.getValue(n?.value,n?.parent,n?.context)),o=this.fn(r,e,n);if(o===void 0||o===e)return e;if(!FW(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const MN={context:"$",value:"."};function YK(t,e){return new b0(t,e)}class b0{constructor(e,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===MN.context,this.isValue=this.key[0]===MN.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?MN.context:this.isValue?MN.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&sC.getter(this.path,!0),this.map=n.map}getValue(e,n,r){let o=this.isContext?r:this.isValue?e:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,n){return this.getValue(e,n?.parent,n?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}b0.prototype.__isYupRef=!0;const Gb=t=>t==null;function cE(t){function e({value:n,path:r="",options:o,originalValue:i,schema:s},a,l){const{name:c,test:u,params:d,message:h,skipAbsent:f}=t;let{parent:p,context:m,abortEarly:y=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=o;function b(M){return b0.isRef(M)?M.getValue(n,p,m):M}function S(M={}){const L=Object.assign({value:n,originalValue:i,label:s.spec.label,path:M.path||r,spec:s.spec,disableStackTrace:M.disableStackTrace||v},d,M.params);for(const $ of Object.keys(L))L[$]=b(L[$]);const F=new lu(lu.formatError(M.message||h,L),n,L.path,M.type||c,L.disableStackTrace);return F.params=L,F}const w=y?a:l;let A={path:r,parent:p,type:c,from:o.from,createError:S,resolve:b,options:o,originalValue:i,schema:s};const _=M=>{lu.isError(M)?w(M):M?l(null):w(S())},P=M=>{lu.isError(M)?w(M):a(M)};if(f&&Gb(n))return _(!0);let O;try{var N;if(O=u.call(A,n,A),typeof((N=O)==null?void 0:N.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${A.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(O).then(_,P)}}catch(M){P(M);return}_(O)}return e.OPTIONS=t,e}function H8e(t,e,n,r=n){let o,i,s;return e?(sC.forEach(e,(a,l,c)=>{let u=l?a.slice(1,a.length-1):a;t=t.resolve({context:r,parent:o,value:n});let d=t.type==="tuple",h=c?parseInt(u,10):0;if(t.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);o=n,n=n&&n[h],t=d?t.spec.types[h]:t.innerType}if(!c){if(!t.fields||!t.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=n,n=n&&n[u],t=t.fields[u]}i=u,s=l?"["+a+"]":"."+a}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}class VL extends Set{describe(){const e=[];for(const n of this.values())e.push(b0.isRef(n)?n.describe():n);return e}resolveAll(e){let n=[];for(const r of this.values())n.push(e(r));return n}clone(){return new VL(this.values())}merge(e,n){const r=this.clone();return e.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function QE(t,e=new Map){if(FW(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let r=0;r<t.length;r++)n[r]=QE(t[r],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[r,o]of t.entries())n.set(r,QE(o,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(QE(r,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[r,o]of Object.entries(t))n[r]=QE(o,e)}else throw Error(`Unable to clone ${t}`);return n}let zp=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new VL,this._blacklist=new VL,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(hp.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e?.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=QE(Object.assign({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let r=e(this);return this._mutate=n,r}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let n=this,r=e.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,e),n),n=n.resolve(e)}return n}resolveOptions(e){var n,r,o,i;return Object.assign({},e,{from:e.from||[],strict:(n=e.strict)!=null?n:this.spec.strict,abortEarly:(r=e.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,n={}){let r=this.resolve(Object.assign({value:e},n)),o=n.assert==="ignore-optionality",i=r._cast(e,n);if(n.assert!==!1&&!r.isType(i)){if(o&&Gb(i))return i;let s=Ev(e),a=Ev(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". 312 313attempted value: ${s} 314`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,n){let r=e===void 0?e:this.transforms.reduce((o,i)=>i.call(this,o,e,this),e);return r===void 0&&(r=this.getDefault(n)),r}_validate(e,n={},r,o){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=n,l=e;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:s,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(e,n,r){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:c}=e,u=m=>{o||(o=!0,n(m,s))},d=m=>{o||(o=!0,r(m,s))},h=i.length,f=[];if(!h)return d([]);let p={value:s,originalValue:a,path:l,options:c,schema:this};for(let m=0;m<i.length;m++){const y=i[m];y(p,u,function(b){b&&(Array.isArray(b)?f.push(...b):f.push(b)),--h<=0&&d(f)})}}asNestedTest({key:e,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const a=e??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const u=Object.assign({},s,{strict:!0,parent:r,value:c,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+e});return(d,h,f)=>this.resolve(u)._validate(c,u,h,f)}validate(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i=(r=n?.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(e,n,(l,c)=>{lu.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new lu(l,c,void 0,void 0,i)):s(c)}))}validateSync(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i,s=(r=n?.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(e,Object.assign({},n,{sync:!0}),(a,l)=>{throw lu.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new lu(a,e,void 0,void 0,s);i=l}),i}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(lu.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(lu.isError(r))return!1;throw r}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):QE(n)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,n){const r=this.clone({nullable:e});return r.internalTests.nullable=cE({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(e,n){const r=this.clone({optional:e});return r.internalTests.optionality=cE({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(e=hp.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=hp.notNull){return this.nullability(!1,e)}required(e=hp.required){return this.clone().withMutation(n=>n.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=hp.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=cE(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let r=this.clone(),o=Gce(e).map(i=>new b0(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new zL(o,n):zL.fromOptions(o,n)),r}typeError(e){let n=this.clone();return n.internalTests.typeError=cE({message:e,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(e,n=hp.oneOf){let r=this.clone();return e.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=cE({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(e,n=hp.notOneOf){let r=this.clone();return e.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=cE({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(e){const n=(e?this.resolve(e):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(e),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}};zp.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])zp.prototype[`${t}At`]=function(e,n,r={}){const{parent:o,parentPath:i,schema:s}=H8e(this,e,n,r.context);return s[t](o&&o[i],Object.assign({},r,{parent:o,path:e}))};for(const t of["equals","is"])zp.prototype[t]=zp.prototype.oneOf;for(const t of["not","nope"])zp.prototype[t]=zp.prototype.notOneOf;const U8e=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function z8e(t){const e=c4(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let n=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(n=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(n=0-n)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+n,e.second,e.millisecond)}function c4(t){var e,n;const r=U8e.exec(t);return r?{year:wg(r[1]),month:wg(r[2],1)-1,day:wg(r[3],1),hour:wg(r[4]),minute:wg(r[5]),second:wg(r[6]),millisecond:r[7]?wg(r[7].substring(0,3)):0,precision:(e=(n=r[7])==null?void 0:n.length)!=null?e:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:wg(r[10]),minuteOffset:wg(r[11])}:null}function wg(t,e=0){return Number(t)||e}let V8e=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,G8e=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,W8e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,j8e="^\\d{4}-\\d{2}-\\d{2}",q8e="\\d{2}:\\d{2}:\\d{2}",Y8e="(([+-]\\d{2}(:?\\d{2})?)|Z)",X8e=new RegExp(`${j8e}T${q8e}(\\.\\d+)?${Y8e}$`),K8e=t=>Gb(t)||t===t.trim(),Q8e={}.toString();function Rb(){return new Yce}class Yce extends zp{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,n,r)=>{if(!r.spec.coerce||r.isType(e)||Array.isArray(e))return e;const o=e!=null&&e.toString?e.toString():e;return o===Q8e?e:o})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||hp.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e))}length(e,n=eu.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(r){return r.length===this.resolve(e)}})}min(e,n=eu.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(r){return r.length>=this.resolve(e)}})}max(e,n=eu.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},skipAbsent:!0,test(r){return r.length<=this.resolve(e)}})}matches(e,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||eu.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&r||s.search(e)!==-1})}email(e=eu.email){return this.matches(V8e,{name:"email",message:e,excludeEmptyString:!0})}url(e=eu.url){return this.matches(G8e,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=eu.uuid){return this.matches(W8e,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let n="",r,o;return e&&(typeof e=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=e:n=e),this.matches(X8e,{name:"datetime",message:n||eu.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||eu.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=c4(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||eu.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=c4(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=eu.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:K8e})}lowercase(e=eu.lowercase){return this.transform(n=>Gb(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Gb(n)||n===n.toLowerCase()})}uppercase(e=eu.uppercase){return this.transform(n=>Gb(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Gb(n)||n===n.toUpperCase()})}}Rb.prototype=Yce.prototype;let Z8e=new Date(""),J8e=t=>Object.prototype.toString.call(t)==="[object Date]";class DF extends zp{constructor(){super({type:"date",check(e){return J8e(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n,r)=>!r.spec.coerce||r.isType(e)||e===null?e:(e=z8e(e),isNaN(e)?DF.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let r;if(b0.isRef(e))r=e;else{let o=this.cast(e);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(e,n=a4.min){let r=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(e,n=a4.max){let r=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}DF.INVALID_DATE=Z8e;DF.prototype;function e9e(t,e=[]){let n=[],r=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=sC.split(s)[0];r.add(l),o.has(`${a}-${l}`)||n.push([a,l])}for(const s of Object.keys(t)){let a=t[s];r.add(s),b0.isRef(a)&&a.isSibling?i(a.path,s):FW(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return I8e.array(Array.from(r),n).reverse()}function XK(t,e){let n=1/0;return t.some((r,o)=>{var i;if((i=e.path)!=null&&i.includes(r))return n=o,!0}),n}function Xce(t){return(e,n)=>XK(t,e)-XK(t,n)}const t9e=(t,e,n)=>{if(typeof t!="string")return t;let r=t;try{r=JSON.parse(t)}catch{}return n.isType(r)?r:t};function tD(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=tD(r);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=tD(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(tD)}):"optional"in t?t.optional():t}const n9e=(t,e)=>{const n=[...sC.normalizePath(e)];if(n.length===1)return n[0]in t;let r=n.pop(),o=sC.getter(sC.join(n),!0)(t);return!!(o&&r in o)};let KK=t=>Object.prototype.toString.call(t)==="[object Object]";function r9e(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const o9e=Xce([]);function zu(t){return new Kce(t)}class Kce extends zp{constructor(e){super({type:"object",check(n){return KK(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=o9e,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,n={}){var r;let o=super._cast(e,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const d of a){let h=i[d],f=d in o;if(h){let p,m=o[d];c.path=(n.path?`${n.path}.`:"")+d,h=h.resolve({value:m,context:n.context,parent:l});let y=h instanceof zp?h.spec:void 0,v=y?.strict;if(y!=null&&y.strip){u=u||d in o;continue}p=!n.__validating||!v?h.cast(o[d],c):o[d],p!==void 0&&(l[d]=p)}else f&&!s&&(l[d]=o[d]);(f!==d in l||l[d]!==o[d])&&(u=!0)}return u?l:o}_validate(e,n={},r,o){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(e,n,r,(l,c)=>{if(!a||!KK(c)){o(l,c);return}s=s||c;let u=[];for(let d of this._nodes){let h=this.fields[d];!h||b0.isRef(h)||u.push(h.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:s}))}this.runTests({tests:u,value:c,originalValue:s,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),c)})})}clone(e){const n=super.clone(e);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=e;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(e,n){let r=this.clone();return r.fields=e,r._nodes=e9e(e,n),r._sortErrors=Xce(Object.keys(e)),n&&(r._excludedEdges=n),r}shape(e,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,e),o)})}partial(){const e={};for(const[n,r]of Object.entries(this.fields))e[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(e)}deepPartial(){return tD(this)}pick(e){const n={};for(const r of e)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>e.includes(r)&&e.includes(o)))}omit(e){const n=[];for(const r of Object.keys(this.fields))e.includes(r)||n.push(r);return this.pick(n)}from(e,n,r){let o=sC.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return n9e(i,e)&&(s=Object.assign({},i),r||delete s[e],s[n]=o(i)),s})}json(){return this.transform(t9e)}noUnknown(e=!0,n=l4.noUnknown){typeof e!="boolean"&&(n=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=r9e(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=l4.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[e(o)]=n[o];return r})}camelCase(){return this.transformKeys(t5.camelCase)}snakeCase(){return this.transformKeys(t5.snakeCase)}constantCase(){return this.transformKeys(e=>t5.snakeCase(e).toUpperCase())}describe(e){const n=(e?this.resolve(e):this).clone(),r=super.describe(e);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let a=e;
314(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),r.fields[i]=s.describe(a)}return r}}zu.prototype=Kce.prototype;const YI=100,OC=2,Qce=4,Zce=6,QK=40,ZK=100,GL=/^(?![0-9])[a-zA-Z0-9_]+$/,i9e=/^[A-ZÃa-zñ](([,.] |[ '-])*[A-ZÃa-zñ][a-zñ]*)*(\.?)( [IVXLCDM]+)?$/,s9e=/^(?!:\/\/)(?:(?:[a-z0-9][a-z0-9-]{0,61}[a-z0-9]\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9])$/i,Jce=/^[\w\.]+\@[\w]+\.[\w\.]+$/,xh={componentNameIsValid:t=>typeof t!="string"||t.length<OC||t.length>YI?!1:GL.test(t),isNameValid:t=>typeof t!="string"?!1:GL.test(t),hasNameExceededMaxCharLength:t=>t!==null&&t.length>YI,isSchemaTypeForPersonalName:t=>t==="First Name"||t==="Last Name",isComponentNameAlreadyUsed:({name:t,groupedProjectComponents:e,component:n})=>!!e[n.type].find(r=>r.id!==n.id&&r.name===t),getMinCharLength:t=>{switch(t){case"Password":return Qce;case"OTP":return Zce;default:return OC}}},to={emptyValue:t=>`${t} is required`,invalidName:t=>xh.isSchemaTypeForPersonalName(t)?`Invalid ${t}. Please enter a valid ${t}.`:`Only alphanumeric characters and underscores are allowed. ${t} cannot begin with a number.`,minCharLengthNotReach:t=>{const e=xh.getMinCharLength(t);return`${t} must be at least ${e} characters`},maxCharLengthExceeded:(t,e)=>`${t} must not exceed ${e} characters`,nameAlreadyUsed:t=>`The ${t} you entered is already in use. Please rename it to avoid duplication.`},xi={email:()=>{const t="Email is invalid";return Rb().required(to.emptyValue("Email")).matches(Jce,t).transform(e=>e.toLowerCase())},password:t=>Rb().required(to.emptyValue(t)).min(Qce,to.minCharLengthNotReach(t)).max(QK,to.maxCharLengthExceeded(t,QK)),name:t=>{const e=xh.isSchemaTypeForPersonalName(t),n=YI,r=e?i9e:GL;return Rb().required(to.emptyValue(t)).matches(r,to.invalidName(t)).max(n,to.maxCharLengthExceeded(t,n)).min(OC,to.minCharLengthNotReach(t))},domain:t=>Rb().required(to.emptyValue(t)).matches(s9e,"Invalid Domain").max(ZK,to.maxCharLengthExceeded(t,ZK)).transform(e=>e.toLowerCase()),loginToken:()=>{const t="OTP";return Rb().required(to.emptyValue(t)).min(Zce,to.minCharLengthNotReach(t)).transform(e=>e?e.trim():"")}},Zg={requestLoginToken:zu().shape({email:xi.email(),password:xi.password("Password")}),login:zu().shape({email:xi.email(),password:xi.password("Password"),loginToken:xi.loginToken()}),requestAccess:zu().shape({email:xi.email(),firstName:xi.name("First Name"),lastName:xi.name("Last Name"),password:xi.password("Password")}),signAgency:zu().shape({email:xi.email(),agency:Rb().required("Agency is required")}),changePassword:zu().shape({oldPassword:xi.password("Password"),newPassword:xi.password("New Password"),confirmPassword:xi.password("Confirm Password").oneOf([YK("new_password")],"New and Confirm Passwords must match")}),activateUser:zu().shape({firstName:xi.name("First Name"),lastName:xi.name("Last Name"),password:xi.password("Password")}),createProject:zu().shape({name:xi.name("Project Name"),powerDomainName:xi.name("Power Net Name"),groundDomainName:xi.name("Ground Net Name")}),componentName:zu().shape({name:xi.name("Component Name")}),createGroup:zu().shape({groupName:xi.name("Group Name")}),inviteUser:zu().shape({email:xi.email()}),resetPassword:zu().shape({email:xi.email()}),resetPasswordConfirm:zu().shape({password:xi.password("Password"),confirmPassword:xi.password("Confirm Password").oneOf([YK("password")],"Passwords don't match")})},a9e=Nr.injectEndpoints({endpoints:t=>({requestToken:t.mutation({query:e=>({url:dt.loginToken,method:"POST",body:{...e}}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.data}),login:t.mutation({query:e=>({url:dt.login,method:"POST",body:{...e}}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["User"]}),logout:t.mutation({query:e=>({url:dt.logout,method:"POST",body:{...e}}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.message,invalidatesTags:["User"]}),persistLogin:t.mutation({query:()=>({url:dt.persistLogin,method:"POST"}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.message}),verifyAccessToken:t.query({query:e=>`${dt.verifyAccessToken}/${e}`,transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.message}),activateUser:t.mutation({query:e=>({url:dt.activateUser,method:"POST",body:{...e}}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e}),resetPassword:t.mutation({query:({email:e})=>({url:dt.resetPassword,method:"POST",body:{email:e}}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.data}),verifyResetPasswordToken:t.query({query:e=>`${dt.resetPassword}/${e}`,transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.message}),resetPasswordConfirm:t.mutation({query:e=>({url:dt.resetPassword,method:"PUT",body:{...e}}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.data})})}),{useLoginMutation:l9e,useRequestTokenMutation:eue,usePersistLoginMutation:c9e,useLogoutMutation:u9e,useVerifyAccessTokenQuery:d9e,useActivateUserMutation:h9e,useResetPasswordMutation:f9e,useVerifyResetPasswordTokenQuery:p9e,useResetPasswordConfirmMutation:g9e}=a9e,tt="#2f2f2f",so="#D25A3F",XI=md(so,.8);md(so,.95);const KI="#FAFAFA",Ef="lightgray",m9e="white",Zs="dimgray",y9e="#f1ebeb",tc="#D25A3F",NC={[pr.NCNOC]:"blue",[pr.CNOC]:"cyan",[pr.INTEGRATION]:"#2f2f2f"},v9e={[pr.NCNOC]:"black",[pr.CNOC]:"black",[pr.INTEGRATION]:"black"},Wv=({title:t,children:e,subtitle:n,sx:r})=>g(To,{sx:{maxHeight:"80vh",m:{md:"30px auto",sm:"20px auto",xs:"10px auto"},overflow:"auto",bgcolor:"rgba(255,255,255, 0.85)",borderRadius:"30px",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.5)",display:"flex",flexDirection:"column",alignContent:"center",...r},children:K(le,{sx:{px:{md:3,sm:2,xs:1},py:{md:2,sm:1,xs:0}},children:[g(Ke,{variant:"h3",align:"center",margin:"dense",sx:{color:so,"& .MuiButtonBase-root":{fontSize:"2rem"}},children:t}),n||null,e]})}),rx=3e3,JK=60,BW=Nr.injectEndpoints({endpoints:t=>({getUserLocationByUserId:t.query({query:({userId:e})=>({url:`${dt.userLocation}?userId=${e}`,method:nn.GET}),providesTags:[We.UserLocation],transformResponse:(e,n,r)=>e}),upsertUserLocation:t.mutation({query:({requestBody:e})=>({url:`${dt.userLocation}
314`,method:nn.POST,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){try{const{data:o}=await r;n(BW.util.upsertQueryData("getUserLocationByUserId",{userId:e.userId},o))}catch{}},transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e})})}),{useGetUserLocationByUserIdQuery:b9e,useUpsertUserLocationMutation:tue}=BW,C9e=async t=>{const{data:e}=await IG.dispatch(BW.endpoints.getUserLocationByUserId.initiate({userId:t},{forceRefetch:!0}));return e||null},S9e=t=>{const{data:e}=b9e({userId:t},{refetchOnMountOrArgChange:!0});return e},$W={getByUserIdAsync:C9e,getByUserIdSync:S9e},E9e=()=>new Promise((t,e)=>{if(window.geoip2){t();return}const n=document.createElement("script");n.src="https://geoip-js.com/js/apis/geoip2/v2.1/geoip2.js",n.onload=()=>t(),n.onerror=()=>e(new Error("Failed to load GeoIP2 script")),document.body.appendChild(n)}),x9e=()=>new Promise(async(t,e)=>{if(await E9e(),!window.geoip2){e(new Error("GeoIP2 script not loaded"));return}window.geoip2.country(t,e)}),w9e={getIpLocation:x9e},A9e=()=>Qp(),T9e=async()=>({...await w9e.getIpLocation(),timestamp:new Date}),u4={getId:A9e,getData:T9e},_9e=async t=>{const e=await u4.getData();return{id:u4.getId(),userId:t,data:[e]}},I9e=async t=>{const n=await u4.getData(),r=[...t.data];return r.length>=50&&r.pop(),{...t,data:[n,...r]}},WL={getCreatePayload:_9e,getUpdatePayload:I9e};var yp=(t=>(t[t.UNDER_REVIEW=0]="UNDER_REVIEW",t[t.PENDING_AGREEMENT=1]="PENDING_AGREEMENT",t[t.OK=2]="OK",t[t.SUSPENDED=3]="SUSPENDED",t[t.SOFT_DELETED=4]="SOFT_DELETED",t))(yp||{});const nD=Nr.injectEndpoints({endpoints:t=>({getGroup:t.query({query:e=>`${dt.groups}/${e}`,providesTags:["Groups"],transformResponse:(e,n,r)=>e?.result?e.result:e,transformErrorResponse:(e,n,r)=>e}),getGroups:t.query({query:()=>dt.groups,providesTags:["Groups"],transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.status}),getGroupUsers:t.query({query:e=>`${dt.groupUsers}/${e}`,providesTags:(e,n,r)=>e?[...e.map(o=>({type:"User",id:o.id})),"Users"]:["Users"],transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.status}),getRoles:t.query({query:()=>dt.roles,providesTags:(e,n,r)=>e?[...e.map(o=>({type:"Role",id:o.id})),"Roles"]:["Roles"],transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.status}),createGroup:t.mutation({query:e=>({url:dt.groups,method:"POST",body:{...e}}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["Groups"]}),updateGroup:t.mutation({query:({params:e})=>({url:`${dt.groups}`,method:"PUT",body:{...e}}),async onQueryStarted({params:e,groupId:n},{dispatch:r,queryFulfilled:o}){const i=r(nD.util.updateQueryData("getGroups",void 0,s=>{const a=s.findIndex(l=>l.id===n);a!==-1&&(s[a]={...s[a],...e})}));try{await o}catch{i.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["Groups"]}),deleteGroup:t.mutation({query:e=>({url:`${dt.groups}/${e}`,method:"DELETE"}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["Groups"]}),deleteUser:t.mutation({query:({userId:e})=>({url:`${dt.users}/${e}`,method:"DELETE"}),async onQueryStarted({groupId:e,userId:n},{dispatch:r,queryFulfilled:o}){const i=r(nD.util.updateQueryData("getGroupUsers",e,s=>{const a=s.findIndex(l=>l.id===n);a!==-1&&s.splice(a,1)}));try{await o}catch{i.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["Users","Groups"]}),assignProjectsAndDeleteUser:t.mutation({query:({ownerId:e,groupId:n,assignToUserId:r,adminUserId:o})=>({url:`${dt.assignProjectsAndDeleteUser}?ownerId=${e}&groupId=${n}&assignToUserId=${r}&adminUserId=${o}`,method:"DELETE"}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["Users","SharedProjectsUsers","Groups"]}),updateUser:t.mutation({query:({id:e,params:n,activeGroupId:r})=>({url:`${dt.users}/${e}`,method:"PUT",body:{...n}}),async onQueryStarted({id:e,params:n,activeGroupId:r},{dispatch:o,queryFulfilled:i}){const s=o(nD.util.updateQueryData("getGroupUsers",r,a=>{const l=a.findIndex(c=>c.id===e);l!==-1&&(a[l]={...a[l],...n})}));try{await i}catch{s.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["Groups","Users"]})})}),{useGetGroupsQuery:LF,useGetGroupQuery:P9e,useGetGroupUsersQuery:HW,useGetRolesQuery:Jjt,useCreateGroupMutation:R9e,useUpdateGroupMutation:UW,useDeleteGroupMutation:O9e,useUpdateUserMutation:nue,useDeleteUserMutation:rue,useAssignProjectsAndDeleteUserMutation:N9e}=nD,Ic={"& .MuiInputLabel-root.Mui-focused":{color:so},"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:so},"& input":{caretColor:so}}},M9e=()=>{const t="Log in",e=Za(),n=Yn(),r=u0(),o=bt(Yx),{register:i,getValues:s,setValue:a,handleSubmit:l,clearErrors:c,watch:u,formState:{errors:d}}=JC({resolver:sw(Zg.login)}),h=r.state?.isTokenSent,[f,p]=C.useState(!0),[m,y]=C.useState(h??!1),[v,b]=C.useState(!0),[S,w]=C.useState(!0),[A,_]=C.useState(!0),[P,R]=C.useState(JK),[O,N]=C.useState(!1),[M,{isLoading:L}]=l9e(),[F,{isLoading:$}]=eue(),[D]=nue(),[k]=tue(),U=C.useMemo(()=>!!Object.keys(o).length||!!Object.keys(o).length,[o,o]),H=C.useCallback(re=>{o&&o[re.target.name]&&n(CC(re.target.name)),Object.keys(d).length&&c()},[U]),V=()=>{p(re=>!re)},q=async re=>
314{const fe=await $W.getByUserIdAsync(re),we=fe?await WL.getUpdatePayload(fe):await WL.getCreatePayload(re);await k({requestBody:we})},J=async({email:re,password:fe,loginToken:we})=>{if(we)try{const xe=await M({email:re.toLowerCase(),password:btoa(fe),loginToken:we}).unwrap();xe&&(n(bC(xe)),rh.isAdmin(xe.user.roleId)&&(n(Qk(xe.user.groupId)),n(kse(xe.user.roleId))),await q(xe.user.id),e(un.projects.path),xe.user.status!==yp.OK&&D({params:{status:yp.OK},id:xe.user.id,activeGroupId:xe.user.groupId}))}catch{e(un.login.path)}},Q=()=>{const{email:re,password:fe}=s();if(!re){n(A_({field:"email",message:"email is required."}));return}if(!fe){n(A_({field:"password",message:"password is required."}));return}Zg.requestLoginToken.validate({email:re,password:fe}).then(({email:we,password:xe})=>{F({email:we?.toLowerCase()??"",password:btoa(xe??""),isAgreementAccepted:O}).then(ve=>{if(c("loginToken"),"error"in ve)y(!1),ln.error(ve.error.message,{autoClose:rx});else if("data"in ve){if(ve.data.userStatus===yp.PENDING_AGREEMENT&&!O){e(un.userAgreement.path,{state:{email:we?.toLowerCase()??"",password:btoa(xe??"")}});return}if(y(!0),ln.success(ve.data.success,{autoClose:rx}),_(!0),ve.data.otp){a("loginToken",ve.data.otp);const{email:Re,password:pe,loginToken:Be}=s();J({email:Re,password:pe,loginToken:Be})}}})}).catch(we=>{we.message&&we.path&&(y(!1),n(A_({field:we.path,message:we.message})))})},se=async()=>{const{email:re,password:fe}=s();try{const{email:we,password:xe}=await Zg.requestLoginToken.validate({email:re,password:fe});b(!(we&&xe))}catch{b(!0)}},oe=async()=>{const{email:re,password:fe,loginToken:we}=s();try{const{email:xe,password:ve,loginToken:Re}=await Zg.login.validate({email:re,password:fe,loginToken:we});w(!(xe&&ve&&Re))}catch{w(!0)}},ie=()=>{n(pNe(Eo.deepCopy(bG))),n(Jk())},ee=re=>{const fe=Math.floor(re/60),we=re%60;return`${fe}:${we<10?"0":""}${we}`};return C.useEffect(()=>(ie(),n(Bv({})),()=>{n(Bv({}))}),[]),C.useEffect(()=>{if(o?.loginToken){const re=u(()=>{n(CC("loginToken"))});return()=>re.unsubscribe()}},[u,o]),C.useEffect(()=>{let re;return A&&P>0&&(re=setInterval(()=>{R(fe=>fe===1?(clearInterval(re),_(!1),JK):fe-1)},1e3)),()=>clearInterval(re)},[A,P]),C.useEffect(()=>{if(r.state?.isAgreementAccepted&&N(r.state.isAgreementAccepted),r.state?.email&&a("email",r.state.email),r.state?.password&&a("password",atob(r.state.password)),r.state?.otp){a("loginToken",r.state.otp);const{email:re,password:fe,loginToken:we}=s();J({email:re,password:fe,loginToken:we})}},[r.state]),g(le,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f2f0f0"},children:g(Wv,{title:K(le,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"center"},children:[g(IW,{fontSize:"large"}),g(Ke,{variant:"h3",children:t})]}),sx:{width:{xl:"30%",lg:"45%",md:"45%",sm:"65%",xs:"95%"}},children:K("form",{onSubmit:l(J),children:[K(mi,{container:!0,spacing:2,children:[!m&&K(le,{sx:{width:"80%",mx:"auto",mt:4,mb:2},children:[K(le,{sx:{display:"flex",alignItems:"flex-end"},children:[g(lo,{id:"email",label:"Email",InputProps:{startAdornment:g(qr,{position:"start",children:g(PW,{})})},variant:"outlined",onFocus:H,fullWidth:!0,...i("email",{onChange:()=>se()}),error:!!(d.email||o?.email),sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:d.email?.message||o?.email})]}),K(le,{sx:{mt:2},children:[g(lo,{id:"password",label:"Password",type:f?"password":"input",fullWidth:!0,variant:"outlined",onFocus:H,...i("password",{onChange:()=>se()}),error:!!(d.password||o?.password),InputProps:{startAdornment:g(qr,{position:"start",children:g(OF,{})}),endAdornment:f?g(qr,{position:"end",children:g(tx,{onClick:V,sx:{cursor:"pointer"}})}):g(qr,{position:"end",children:g(nx,{onClick:V,sx:{cursor:"pointer"}})})},sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:d.password?.message||o?.password})]})]}),g(mi,{item:!0,xs:12,sm:12,children:K(mi,{container:!0,spacing:2,children:[m?K(le,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%"},children:[g(le,{sx:{mt:4,mb:1,mx:"auto",width:"70%",textAlign:"center"},children:g(Ke,{sx:{color:tt,lineHeight:1.3}
314,children:"For enhanced security, two-factor authentication is implemented using One Time Password (OTP). OTPs are sent to your registered email address."})}),K(le,{sx:{mx:"auto",width:"70%"},children:[g(lo,{required:!0,id:"loginToken",label:"OTP",fullWidth:!0,type:"text",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},variant:"outlined",onFocus:H,...i("loginToken",{onChange:()=>oe()}),error:!!(d.loginToken||o?.loginToken),sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:d.loginToken?.message||o?.loginToken})]})]}):g(Sn,{variant:"contained",type:"submit",size:"large",sx:{my:2,mx:"auto",width:"80%",backgroundColor:tt,"&:hover":{backgroundColor:Zs}},disabled:U||v||$,onClick:Q,startIcon:$?g(Ni,{size:18}):null,children:$?" Requesting...":"Request OTP"}),m?g(le,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",mt:4,mb:2},children:K(le,{sx:{display:"flex",justifyContent:"center",width:"80%"},children:[g(Sn,{variant:"outlined",size:"large",disabled:$||A||L,onClick:Q,sx:{mr:2,color:tt,borderColor:tt,backgroundColor:"rgba(42, 44, 46, 0.04)","&:hover":{borderColor:tt,backgroundColor:"rgba(42, 44, 46, 0.08)",transform:"translateY(-1px)"}},startIcon:$?g(Ni,{size:18}):null,children:A?`Request another OTP in ${ee(P)}`:"Request New OTP"}),g(Sn,{variant:"contained",type:"submit",size:"large",disabled:U||S||L,startIcon:L?g(Ni,{size:18}):null,sx:{backgroundColor:tt,"&:hover":{backgroundColor:Zs}},children:L?"Logging in...":"Log in"})]})}):null]})})]}),!m&&g(mi,{container:!0,spacing:1,children:K(le,{sx:{width:"80%",mx:"auto",mt:2,mb:2,display:"flex",justifyContent:"center",gap:"16px"},children:[g(Sn,{startIcon:g(Fce,{}),onClick:()=>e(un.requestAccess.path),sx:{ml:1,color:tt,backgroundColor:"rgba(42, 44, 46, 0.04)",borderRadius:"8px",padding:"8px 16px",textTransform:"none",fontWeight:500,"&:hover":{backgroundColor:"rgba(42, 44, 46, 0.08)",transform:"translateY(-1px)"},transition:"transform 0.2s ease"},children:"Request Access"}),g(Sn,{startIcon:g(Lce,{}),onClick:()=>e(un.resetPassword.path),sx:{mr:2,color:tt,backgroundColor:"rgba(42, 44, 46, 0.08)",borderRadius:"8px",padding:"8px 16px",textTransform:"none",fontWeight:500,"&:hover":{backgroundColor:"rgba(42, 44, 46, 0.08)",transform:"translateY(-1px)"},transition:"transform 0.2s ease"},children:"Forgot Password?"})]})})]})})})},D9e=()=>{const t="Reset your password",e=bt(Yx),n=Za(),r=Yn(),{register:o,getValues:i,handleSubmit:s,reset:a,formState:{errors:l}}=JC({resolver:sw(Zg.resetPassword)}),[c,{isLoading:u}]=f9e(),d=!!(l.email||e?.email),h=({email:p})=>{c({email:p}).then(m=>{"error"in m?ln.error(m.error.message,{autoClose:rx}):"data"in m&&(n(un.login.path),ln.success(m.data.success,{autoClose:rx}))}).catch(m=>{console.log("resetPassword",{e:m})})},f=C.useCallback(p=>{e&&e[p.target.name]&&r(CC(p.target.name))},[e]);return C.useEffect(()=>(r(Bv({})),()=>{r(Bv({}))}),[]),g(le,{sx:{height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f2f0f0"},children:g(Wv,{title:K(le,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"center"},children:[g(Lce,{fontSize:"large"}),g(Ke,{variant:"h3",children:t})]}),subtitle:g(Ke,{variant:"inherit",color:"text.main",sx:{mt:2,textAlign:"center"},children:"Enter your registered email to receive Password reset instructions."}),sx:{width:{xl:"30%",lg:"45%",md:"45%",sm:"65%",xs:"95%"}},children:K("form",{onSubmit:s(h),children:[K(le,{sx:{width:"80%",mx:"auto",my:1,mb:1},children:[g(le,{sx:{display:"flex",alignItems:"flex-end"},children:g(lo,{required:!0,id:"email",label:"Email",variant:"outlined",InputProps:{startAdornment:g(qr,{position:"start",children:g(PW,{})})},onFocus:f,fullWidth:!0,...o("email"),error:d,sx:Ic})}),g(Ke,{variant:"inherit",color:"error",children:l.email?.message||e?.email})]}),K(le,{sx:{textAlign:"center"},children:[g(Sn,{variant:"contained",type:"submit",size:"large",disabled:d||u,sx:{my:2,mx:"auto",width:"80%",backgroundColor:tt,"&:hover":{backgroundColor:Zs}},startIcon:u?g(Ni,{size:18}):null,children:u?"Validating...":"Reset Password"}),K(Ke,{sx:{mx:"auto"},mx:"auto",children:["Try Logging in again â",g(Ke,{component:"span",sx:{ml:1,textDecoration:"underline",color:"primary.light","&:hover":{cursor:"pointer",color:"primary.dark"}},mt:2,alignSelf:"center",onClick:()=>n(un.login.path),children:"Log in"})]})]})]})})})},L9e=()=>{const t="Activate account",e="Invalid activation link",n=bt(Yx),{token:r}=Wx(),o=Za(),i=Yn(),{register:s,handleSubmit:a,formState:{errors:l}}=JC({resolver:sw(Zg.activateUser)}),{data:c,error:u,isLoading:d}=d9e(r),[h,{isLoading:f,error:p}]=h9e(),[m,y]=C.useState(!0),v=!!Object.keys(n).length||!!Object.keys(l).length,b=()=>{y(A=>!A)},S=({firstName:A,lastName:_,password:P})=>{const R=ln.loading("Validating data...",{autoClose:!1});h({id:c.id,firstName:A,lastName:_,password:btoa(P)}).then(O=>{o(un.login.path)}).catch(O=>{O.message&&O.path&&i(A_({field:O.path,message:O.message}))}).finally(()=>ln.dismiss(R))},w=C.useCallback(A=>n&&n[A.target.name]&&i(CC(A.target.name)),[n]);return C.useEffect(()=>()=>{i(Bv({}))},[]),d?g("div",{children:"...Loading..."}):u?g(le,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g(Wv,{title:e,children:K(le,{children:[g(le,{mt:1,sx:{display:"flex",justifyContent:"center"},children:g(Ke,{children:"Please request a new access or return to the login page if you already have an existing account."})}),g(le,{sx:{textAlign:"center",mt:2},children:g(Sn,{variant:"contained",size:"large",type:"button",onClick:()=>o(un.login.path),sx:{backgroundColor:tt,"&:hover":{backgroundColor:Zs}},children:"Back to Login"})}),g(le,{mt:1,sx:{display:"flex",justifyContent:"center",textDecoration:"underline",color:"primary.light","& .MuiTypography-root":{fontWeight:"400","&:hover":{cursor:"pointer",color:"primary.dark"}}},children:g(Ke,{onClick:()=>o(un.requestAccess.path),children:"Request New Access?"})})]})})}):g(le,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g(Wv,{title:t,children:K("form",{onSubmit:a(S),children:[K(mi,{container:!0,spacing:1,children:[K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"firstName",label:"First name",onFocus:w,fullWidth:!0,...s("firstName"),error:!!(l.firstName||n?.firstName),sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:l.firstName?.message||n?.firstName})]}),K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"lastName",label:"Last name",onFocus:w,fullWidth:!0,...s("lastName"),error:!!(l.lastName||n?.lastName),sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:l.lastName?.message||n?.lastName})]}),K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"password",label:"Password",type:m?"password":"input",fullWidth:!0,onFocus:w,...s("password"),error:!!(l.password||n?.password),sx:Ic,InputProps:{endAdornment:m?g(qr,{position:"end",children:g(tx,{onClick:b})}):g(qr,{position:"end",children:g(nx,{onClick:b})})}}),g(Ke,{variant:"inherit",color:"error",children:l.password?.message||n?.password})]})]}),g(le,{sx:{textAlign:"center",mt:2},children:g(Sn,{variant:"contained",size:"large",sx:{backgroundColor:tt,"&:hover":{backgroundColor:Zs}},type:"submit",disabled:f||v,children:"Activate"})}),g(le,{mt:1,sx:{display:"flex",justifyContent:"center",textDecoration:"underline",color:"primary.light","& .MuiTypography-root":{fontWeight:"400","&:hover":{cursor:"pointer",color:"primary.dark"}}},children:g(Ke,{onClick:()=>o(un.requestAccess.path),children:"Request New Access?"})})]})})})},k9e=Nr.injectEndpoints({endpoints:t=>({getAllUser:t.query({query:()=>({url:`${dt.users}`,method:nn.GET}),providesTags:[We.User],transformResponse:(e,n,r)=>e}),createUser:t.mutation({query:e=>({url:`${dt.users}
314`,method:nn.POST,body:e}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.User]})})}),{useGetAllUserQuery:F9e,useCreateUserMutation:B9e}=k9e;var ox=(t=>(t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.CONFLICT=409]="CONFLICT",t[t.UNPROCESSABLE_CONTENT=422]="UNPROCESSABLE_CONTENT",t[t.LOCKED=423]="LOCKED",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t))(ox||{});const tl=({customSX:t})=>g(lW,{sx:{color:"#fff",zIndex:1,...t||{}},open:!0,children:g(Ni,{color:"inherit"})}),$9e=()=>{const t="Request Access",e="Request Access",n=Za(),r=Yn(),[o,i]=C.useState(!0),s=bt(Yx),{register:a,handleSubmit:l,formState:{errors:c,isValid:u}}=JC({resolver:sw(Zg.requestAccess),defaultValues:{email:"",firstName:"",lastName:"",password:""},mode:"onSubmit"}),[d,{isLoading:h}]=B9e(),f=()=>{i(!o)},p=C.useCallback(y=>s&&s[y.target.name]&&r(CC(y.target.name)),[s]),m=({email:y,firstName:v,lastName:b,password:S})=>{const w=ln.loading("Requesting access...",{autoClose:!1});d({email:y,firstName:v,lastName:b,password:btoa(S)}).then(A=>{const _=A.error;if(_){const P=_.status===ox.CONFLICT?"Email already used by another user. Please use a different one.":"An unexpected error has occurred";ln.error(P);return}n(un.requestAccessConfirmation.path)}).finally(()=>ln.dismiss(w))};return C.useEffect(()=>(r(Bv({})),()=>{r(Bv({}))}),[]),g(le,{sx:{mt:{xl:"7vh",lg:"5vh",md:"5vh",sm:"5vh",xs:"5vh"},height:"100%",maxHeight:"85vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:g(Wv,{title:K(le,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"center"},children:[g(Fce,{fontSize:"large"}),g(Ke,{variant:"h3",children:t})]}),sx:{width:{xl:"30%",lg:"45%",md:"45%",sm:"65%",xs:"95%"}},children:K("form",{onSubmit:l(m),children:[K(mi,{container:!0,gap:2,sx:{width:"80%",mx:"auto",mt:3,mb:2},children:[K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"email",label:"Business email",onFocus:p,fullWidth:!0,variant:"outlined",...a("email"),error:!!(c.email||s?.email),InputProps:{startAdornment:g(qr,{position:"start",children:g(AW,{color:"action"})})},sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:c.email?.message||s?.email})]}),K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"firstName",label:"First name",onFocus:p,fullWidth:!0,variant:"outlined",...a("firstName"),error:!!(c.firstName||s?.firstName),InputProps:{startAdornment:g(qr,{position:"start",children:g(q6e,{color:"action"})})},sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:c.firstName?.message||s?.firstName})]}),K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"lastName",label:"Last name",onFocus:p,fullWidth:!0,variant:"outlined",...a("lastName"),error:!!(c.lastName||s?.lastName),InputProps:{startAdornment:g(qr,{position:"start",children:g(Y6e,{color:"action"})})},sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:c.lastName?.message||s?.lastName})]}),K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"password",label:"Password",type:o?"password":"input",onFocus:p,fullWidth:!0,variant:"outlined",...a("password"),error:!!(c.password||s?.password),InputProps:{startAdornment:g(qr,{position:"start",children:g(OF,{color:"action"})}),endAdornment:o?g(qr,{position:"end",children:g(tx,{onClick:f,sx:{cursor:"pointer"}})}):g(qr,{position:"end",children:g(nx,{onClick:f,sx:{cursor:"pointer"}})})},sx:Ic}),g(Ke,{variant:"inherit",color:"error",children:c.password?.message||s?.password})]})]}),K(le,{mt:2,display:"flex",flexDirection:"column",children:[g(Sn,{variant:"contained",type:"submit",size:"large",sx:{my:2,mx:"auto",width:"80%",backgroundColor:tt,"&:hover":{backgroundColor:Zs}},disabled:h,children:h?g(tl,{}):e}),K(Ke,{mx:"auto",children:["Already have an account?",g(Ke,{component:"span",sx:{ml:1,textDecoration:"underline",color:"primary.light","&:hover":{cursor:"pointer",color:"primary.dark"}},mt:2,alignSelf:"center",onClick:()=>{h||n(un.login.path)},children:"Log in"})]})]})]})})})},H9e="/assets/inoculator_logo_text-cac9de36.svg",U9e={inoculatorLogoText:H9e},z9e=({iconType:t="inoculatorLogoText",sxProps:e={},hover:n=!0,...r})=>g(le,{component:"img",sx:{height:"50px","&:hover":{cursor:n?"pointer":"default"},...e},src:U9e[t],...r}),Lc=()=>{const t=bt(Rse),[e,n]=C.useState(kL[t]);return C.useEffect(()=>{t&&n(kL[t])},[t]),{themeColors:e}};var jL={exports:{}};/** 315 * @license 316 * Lodash <https://lodash.com/>
317 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 318 * Released under MIT license <https://lodash.com/license> 319 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 320 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 321 */jL.exports;(function(t,e){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,h=2,f=4,p=1,m=2,y=1,v=2,b=4,S=8,w=16,A=32,_=64,P=128,R=256,O=512,N=30,M="...",L=800,F=16,$=1,D=2,k=3,U=1/0,H=9007199254740991,V=17976931348623157e292,q=0/0,J=4294967295,Q=J-1,se=J>>>1,oe=[["ary",P],["bind",y],["bindKey",v],["curry",S],["curryRight",w],["flip",O],["partial",A],["partialRight",_],["rearg",R]],ie="[object Arguments]",ee="[object Array]",re="[object AsyncFunction]",fe="[object Boolean]",we="[object Date]",xe="[object DOMException]",ve="[object Error]",Re="[object Function]",pe="[object GeneratorFunction]",Be="[object Map]",ke="[object Number]",Ne="[object Null]",ot="[object Object]",ce="[object Promise]",Ae="[object Proxy]",be="[object RegExp]",Se="[object Set]",Pe="[object String]",Ue="[object Symbol]",_e="[object Undefined]",Oe="[object WeakMap]",ze="[object WeakSet]",ne="[object ArrayBuffer]",W="[object DataView]",j="[object Float32Array]",ue="[object Float64Array]",he="[object Int8Array]",Ce="[object Int16Array]",Ie="[object Int32Array]",et="[object Uint8Array]",je="[object Uint8ClampedArray]",it="[object Uint16Array]",xt="[object Uint32Array]",rt=/\b__p \+= '';/g,Bt=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kn=/&(?:amp|lt|gt|quot|#39);/g,jn=/[&<>"']/g,Cr=RegExp(kn.source),Xn=RegExp(jn.source),Wo=/<%-([\s\S]+?)%>/g,jo=/<%([\s\S]+?)%>/g,ri=/<%=([\s\S]+?)%>/g,Pu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ta=/^\w*$/,oi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qr=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(Qr.source),Ot=/^\s+/,Wt=/\s/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jt=/\{\n\/\* \[wrapped with (.+)\] \*/,wn=/,? & /,Sr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ii=/[()=,{}\[\]\/\s]/,ol=/\\(\\)?/g,yt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,Xt=/^[-+]0x[0-9a-f]+$/i,$t=/^0b[01]+$/i,Pn=/^\[object .+?Constructor\]$/,an=/^0o[0-7]+$/i,tr=/^(?:0|[1-9]\d*)$/,Ra=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 4,130 bytes, line 321
3217f]/g,Oa=/($^)/,Vw=/['\n\r\u2028\u2029\\]/g,zm="\\ud800-\\udfff",L0="\\u0300-\\u036f",ig="\\ufe20-\\ufe2f",k0="\\u20d0-\\u20ff",Vm=L0+ig+k0,SS="\\u2700-\\u27bf",Gm="a-z\\xdf-\\xf6\\xf8-\\xff",bd="\\xac\\xb1\\xd7\\xf7",lc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Io="\\u2000-\\u206f",xo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fc="A-Z\\xc0-\\xd6\\xd8-\\xde",rs="\\ufe0e\\ufe0f",na=bd+lc+Io+xo,Ru="['â]",Nf="["+zm+"]",ra="["+na+"]",Bc="["+Vm+"]",Wm="\\d+",ES="["+SS+"]",sg="["+Gm+"]",F0="[^"+zm+na+Wm+SS+Gm+Fc+"]",il="\\ud83c[\\udffb-\\udfff]",Gw="(?:"+Bc+"|"+il+")",xS="[^"+zm+"]",cc="(?:\\ud83c[\\udde6-\\uddff]){2}",Mf="[\\ud800-\\udbff][\\udc00-\\udfff]",$c="["+Fc+"]",Ou="\\u200d",Cd="(?:"+sg+"|"+F0+")",Ww="(?:"+$c+"|"+F0+")",Qe="(?:"+Ru+"(?:d|ll|m|re|s|t|ve))?",Ut="(?:"+Ru+"(?:D|LL|M|RE|S|T|VE))?",An=Gw+"?",pn="["+rs+"]?",At="(?:"+Ou+"(?:"+[xS,cc,Mf].join("|")+")"+pn+An+")*",ir="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Po="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bn=pn+An+At,bi="(?:"+[ES,cc,Mf].join("|")+")"+Bn,uc="(?:"+[xS+Bc+"?",Bc,cc,Mf,Nf].join("|")+")",Hc=RegExp(Ru,"g"),Nu=RegExp(Bc,"g"),oa=RegExp(il+"(?="+il+")|"+uc+Bn,"g"),si=RegExp([$c+"?"+sg+"+"+Qe+"(?="+[ra,$c,"$"].join("|")+")",Ww+"+"+Ut+"(?="+[ra,$c+Cd,"$"].join("|")+")",$c+"?"+Cd+"+"+Qe,$c+"+"+Ut,Po,ir,Wm,bi].join("|"),"g"),Mu=RegExp("["+Ou+zm+Vm+rs+"]"),Mh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Dh=-1,uo={};uo[j]=uo[ue]=uo[he]=uo[Ce]=uo[Ie]=uo[et]=uo[je]=uo[it]=uo[xt]=!0,uo[ie]=uo[ee]=uo[ne]=uo[fe]=uo[W]=uo[we]=uo[ve]=uo[Re]=uo[Be]=uo[ke]=uo[ot]=uo[be]=uo[Se]=uo[Pe]=uo[Oe]=!1;var Br={};Br[ie]=Br[ee]=Br[ne]=Br[W]=Br[fe]=Br[we]=Br[j]=Br[ue]=Br[he]=Br[Ce]=Br[Ie]=Br[Be]=Br[ke]=Br[ot]=Br[be]=Br[Se]=Br[Pe]=Br[Ue]=Br[et]=Br[je]=Br[it]=Br[xt]=!0,Br[ve]=Br[Re]=Br[Oe]=!1;var c$={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"},u$={"&":"&","<":"<",">":">",'"':""","'":"'"},Du={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lh={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wS=parseFloat,jw=parseInt,qw=typeof Ac=="object"&&Ac&&Ac.Object===Object&&Ac,d$=typeof self=="object"&&self&&self.Object===Object&&self,Fo=qw||d$||Function("return this")(),Df=e&&!e.nodeType&&e,Uc=Df&&!0&&t&&!t.nodeType&&t,B0=Uc&&Uc.exports===Df,qm=B0&&qw.process,Ci=function(){try{var Ge=Uc&&Uc.require&&Uc.require("util").t
vendor: 8,923 bytes, line 321
321ypes;return Ge||qm&&qm.binding&&qm.binding("util")}catch{}}(),dc=Ci&&Ci.isArrayBuffer,Lf=Ci&&Ci.isDate,Sd=Ci&&Ci.isMap,Ed=Ci&&Ci.isRegExp,kf=Ci&&Ci.isSet,Yw=Ci&&Ci.isTypedArray;function sl(Ge,vt,ct){switch(ct.length){case 0:return Ge.call(vt);case 1:return Ge.call(vt,ct[0]);case 2:return Ge.call(vt,ct[0],ct[1]);case 3:return Ge.call(vt,ct[0],ct[1],ct[2])}return Ge.apply(vt,ct)}function Xw(Ge,vt,ct,cn){for(var $n=-1,Fn=Ge==null?0:Ge.length;++$n<Fn;){var Mr=Ge[$n];vt(cn,Mr,ct(Mr),Ge)}return cn}function ai(Ge,vt){for(var ct=-1,cn=Ge==null?0:Ge.length;++ct<cn&&vt(Ge[ct],ct,Ge)!==!1;);return Ge}function zc(Ge,vt){for(var ct=Ge==null?0:Ge.length;ct--&&vt(Ge[ct],ct,Ge)!==!1;);return Ge}function qo(Ge,vt){for(var ct=-1,cn=Ge==null?0:Ge.length;++ct<cn;)if(!vt(Ge[ct],ct,Ge))return!1;return!0}function Vc(Ge,vt){for(var ct=-1,cn=Ge==null?0:Ge.length,$n=0,Fn=[];++ct<cn;){var Mr=Ge[ct];vt(Mr,ct,Ge)&&(Fn[$n++]=Mr)}return Fn}function Nl(Ge,vt){var ct=Ge==null?0:Ge.length;return!!ct&&Km(Ge,vt,0)>-1}function AS(Ge,vt,ct){for(var cn=-1,$n=Ge==null?0:Ge.length;++cn<$n;)if(ct(vt,Ge[cn]))return!0;return!1}function Yo(Ge,vt){for(var ct=-1,cn=Ge==null?0:Ge.length,$n=Array(cn);++ct<cn;)$n[ct]=vt(Ge[ct],ct,Ge);return $n}function xd(Ge,vt){for(var ct=-1,cn=vt.length,$n=Ge.length;++ct<cn;)Ge[$n+ct]=vt[ct];return Ge}function $0(Ge,vt,ct,cn){var $n=-1,Fn=Ge==null?0:Ge.length;for(cn&&Fn&&(ct=Ge[++$n]);++$n<Fn;)ct=vt(ct,Ge[$n],$n,Ge);return ct}function oO(Ge,vt,ct,cn){var $n=Ge==null?0:Ge.length;for(cn&&$n&&(ct=Ge[--$n]);$n--;)ct=vt(ct,Ge[$n],$n,Ge);return ct}function Ym(Ge,vt){for(var ct=-1,cn=Ge==null?0:Ge.length;++ct<cn;)if(vt(Ge[ct],ct,Ge))return!0;return!1}var iO=TS("length");function Xm(Ge){return Ge.split("")}function Kw(Ge){return Ge.match(Sr)||[]}function sO(Ge,vt,ct){var cn;return ct(Ge,function($n,Fn,Mr){if(vt($n,Fn,Mr))return cn=Fn,!1}),cn}function ag(Ge,vt,ct,cn){for(var $n=Ge.length,Fn=ct+(cn?1:-1);cn?Fn--:++Fn<$n;)if(vt(Ge[Fn],Fn,Ge))return Fn;return-1}function Km(Ge,vt,ct){return vt===vt?G0(Ge,vt,ct):ag(Ge,U0,ct)}function H0(Ge,vt,ct,cn){for(var $n=ct-1,Fn=Ge.length;++$n<Fn;)if(cn(Ge[$n],vt))return $n;return-1}function U0(Ge){return Ge!==Ge}function Qw(Ge,vt){var ct=Ge==null?0:Ge.length;return ct?Qm(Ge,vt)/ct:q}function TS(Ge){return function(vt){return vt==null?n:vt[Ge]}}function Ff(Ge){return function(vt){return Ge==null?n:Ge[vt]}}function Zw(Ge,vt,ct,cn,$n){return $n(Ge,function(Fn,Mr,nr){ct=cn?(cn=!1,Fn):vt(ct,Fn,Mr,nr)}),ct}function _S(Ge,vt){var ct=Ge.length;for(Ge.sort(vt);ct--;)Ge[ct]=Ge[ct].value;return Ge}function Qm(Ge,vt){for(var ct,cn=-1,$n=Ge.length;++cn<$n;){var Fn=vt(Ge[cn]);Fn!==n&&(ct=ct===n?Fn:ct+Fn)}return ct}function Bf(Ge,vt){for(var ct=-1,cn=Array(Ge);++ct<Ge;)cn[ct]=vt(ct);return cn}function Jw(Ge,vt){return Yo(vt,function(ct){return[ct,Ge[ct]]})}function IS(Ge){return Ge&&Ge.slice(0,Lu(Ge)+1).replace(Ot,"")}function Ml(Ge){return function(vt){return Ge(vt)}}function z0(Ge,vt){return Yo(vt,function(ct){return Ge[ct]})}function lg(Ge,vt){return Ge.has(vt)}function cg(Ge,vt){for(var ct=-1,cn=Ge.length;++ct<cn&&Km(vt,Ge[ct],0)>-1;);return ct}function hc(Ge,vt){for(var ct=Ge.length;ct--&&Km(vt,Ge[ct],0)>-1;);return ct}function ug(Ge,vt){for(var ct=Ge.length,cn=0;ct--;)Ge[ct]===vt&&++cn;return cn}var eA=Ff(c$),aO=Ff(u$);function wd(Ge){return"\\"+Lh[Ge]}function $f(Ge,vt){return Ge==null?n:Ge[vt]}function Hf(Ge){return Mu.test(Ge)}function lO(Ge){return Mh.test(Ge)}function kh(Ge){for(var vt,ct=[];!(vt=Ge.next()).done;)ct.push(vt.value);return ct}function Ad(Ge){var vt=-1,ct=Array(Ge.size);return Ge.forEach(function(cn,$n){ct[++vt]=[$n,cn]}),ct}function V0(Ge,vt){return function(ct){return Ge(vt(ct))}}function Fh(Ge,vt){for(var ct=-1,cn=Ge.length,$n=0,Fn=[];++ct<cn;){var Mr=Ge[ct];(Mr===vt||Mr===u)&&(Ge[ct]=u,Fn[$n++]=ct)}return Fn}function dg(Ge){var vt=-1,ct=Array(Ge.size);return Ge.forEach(function(cn){ct[++vt]=cn}),ct}function cO(Ge){var vt=-1,ct=Array(Ge.size);return Ge.forEach(function(cn){ct[++vt]=[cn,cn]}),ct}function G0(Ge,vt,ct){for(var cn=ct-1,$n=Ge.length;++cn<$n;)if(Ge[cn]===vt)return cn;return-1}function Gc(Ge,vt,ct){for(var cn=ct+1;cn--;)if(Ge[cn]===vt)return cn;return cn}function Td(Ge){return Hf(Ge)?Zm(Ge):iO(Ge)}function Na(Ge){return Hf(Ge)?uO(Ge):Xm(Ge)}function Lu(Ge){for(var vt=Ge.length;vt--&&Wt.test(Ge.charAt(vt)););return vt}var tA=Ff(Du);function Zm(Ge){for(var vt=oa.lastIndex=0;oa.test(Ge);)++vt;return vt}function uO(Ge){return Ge.match(oa)||[]}function nA(Ge){return Ge.match(si)||[]}var Si=function Ge(vt){vt=vt==null?Fo:Bh.defaults(Fo.Object(),vt,Bh.pick(Fo,jm));var ct=vt.Array,cn=vt.Date,$n=vt.Error,Fn=vt.Function,Mr=vt.Math,nr=vt.Object,Jm=vt.RegExp,W0=vt.String,Ma=vt.TypeError,PS=ct.prototype,Da=Fn.prototype,Uf=nr.prototype,ey=vt["__core-js_shared__"],ty=Da.toString,_r=Uf.hasOwnProperty,Wc=0,ny=function(){var E=/[^.]+$/.exec(ey&&ey.keys&&ey.keys.IE_PROTO||"");return E?"Symbol(src)_1."+E:""}(),ry=Uf.toString,rA=ty.call(nr),dO=Fo._,hO=Jm("^"+ty.call(_r).replace(Qr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j0=B0?vt.Buffer:n,$h=vt.Symbol,q0=vt.Uint8Array,oA=j0?j0.allocUnsafe:n,Y0=V0(nr.getPrototypeOf,nr),iA=nr.create,oy=Uf.propertyIsEnumerable,X0=PS.splice,K0=$h?$h.isConcatSpreadable:n,zf=$h?$h.iterator:n,Vf=$h?$h.toStringTag:n,iy=function(){try{var E=ci(nr,"defineProperty");return E({},"",{}),E}catch{}}(),fO=vt.clearTimeout!==Fo.clearTimeout&&vt.clearTimeout,pO=cn&&cn.now!==Fo.Date.now&&cn.now,gO=vt.setTimeout!==Fo.setTimeout&&vt.setTimeout,Q0=Mr.ceil,sy=Mr.floor,RS=nr.getOwnPropertySymbols,mO=j0?j0.isBuffer:n,sA=vt.isFinite,h$=PS.join,yO=V0(nr.keys,nr),xs=Mr.max,La=Mr.min,vO=cn.now,bO=vt.parseInt,aA=Mr.random,OS=PS.reverse,lA=ci(vt,"DataView"),Z0=ci(vt,"Map"),cA=ci(vt,"Promise"),ka=ci(vt,"Set"),hg=ci(vt,"WeakMap"),Gf=ci(nr,"create"),J0=hg&&new hg,fg={},CO=fb(lA),uA=fb(Z0),ay=fb(cA),dA=fb(ka),hA=fb(hg),NS=$h?$h.prototype:n,ly=NS?NS.valueOf:n,fA=NS?NS.toString:n;function me(E){if(as(E)&&!fr(E)&&!(E instanceof zn)){if(E instanceof jc)return E;if(_r.call(E,"__wrapped__"))return V9(E)}return new jc(E)}var pg=function(){function E(){}return function(I){if(!ji(I))return{};if(iA)return iA(I);E.prototype=I;var z=new E;return E.prototype=n,z}}();function eb(){}function jc(E,I){this.__wrapped__=E,this.__actions__=[],this.__chain__=!!I,this.__index__=0,this.__values__=n}me.templateSettings={escape:Wo,evaluate:jo,interpolate:ri,variable:"",imports:{_:me}},me.prototype=eb.prototype,me.prototype.constructor=me,jc.prototype=pg(eb.prototype),jc.prototype.constructor=jc;function zn(E){this.__wrapped__=E,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J,this.__views__=[]}function al(){var E=new zn(this.__wrapped__);return E.__actions__=kl(this.__actions__),E.__dir__=this.__dir__,E.__filtered__=this.__filtered__,E.__iteratees__=kl(this.__iteratees__),E.__takeCount__=this.__takeCount__,E.__views__=kl(this.__views__),E}function SO(){if(this.__filtered__){var E=new zn(this);E.__dir__=-1,E.__filtered__=!0}else E=this.clone(),E.__dir__*=-1;return E}function EO(){var E=this.__wrapped__.value(),I=this.__dir__,z=fr(E),Z=I<0,de=z?E.length:0,Ee=pSe(0,de,this.__views__),Me=Ee.start,He=Ee.end,Ze=He-Me,Ct=Z?He:Me-1,Et=this.__iteratees__,It=Et.length,tn=0,_n=La(Ze,this.__takeCount__);if(!z||!Z&&de==Ze&&_n==Ze)return OA(E,this.__actions__);var Gn=[];e:for(;Ze--&&tn<_n;){Ct+=I;for(var Pr=-1,Wn=E[Ct];++Pr<It;){var $r=Et[Pr],Wr=$r.iteratee,$u=$r.type,gc=Wr(Wn);if($u==D)Wn=gc;else if(!gc){if($u==$)continue e;break e}}Gn[tn++]=Wn}return Gn}zn.prototype=pg(eb.prototype),zn.prototype.constructor=zn;function Wf(E){var I=-1,z=E==null?0:E.length;for(this.clear();++I<z;){var Z=E[I];this.set(Z[0],Z[1])}}function xO(){this.__data__=Gf?Gf(null):{},this.size=0}function wO(E){var I=this.has(E)&&delete this.__data__[E];return this.size-=I?1:0,I}function pA(E){var I=this.__data__;if(Gf){var z=I[E];return z===l?n:z}return _r.call(I,E)?I[E]:n}function AO(E){var I=this.__data__;return Gf?I[E]!==n:_r.call(I,E)}function gA(E,I){var z=this.__data__;return this.size+=this.has(E)?0:1,z[E]=Gf&&I===n?l:I,this}Wf.prototype.clear=xO,Wf.prototype.delete=wO,Wf.prototype.get=pA,Wf.prototype.has=AO,Wf.prototype.set=gA;function _d(E){var I=-1,z=E==null?0:E.length;for(this.clear();++I<z;){var Z=E[I];this.set(Z[0],Z[1])}}function TO(){this.__data__=[],this.size=0}function mA(E){var I=this.__data__,z=kS(I,E);if(z<0)return!1;var Z=I.length-1;return z==Z?I.pop():X0.call(I,z,1),--this.size,!0}function yA(E){var I=this.__data__,z=kS(I,E);return z<0?n:I[z][1]}function _O(E){return kS(this.__data__,E)>-1}function vA(E,I){var z=this.__data__,Z=kS(z,E);return Z<0?(++this.size,z.push([E,I])):z[Z][1]=I,this}_d.prototype.clear=TO,_d.prototype.delete=mA,_d.prototype.get=yA,_d.prototype.has=_O,_d.prototype.set=vA;function qc(E){var I=-1,z=E==null?0:E.length;for(this.clear();++I<z;){var Z=E[I];this.set(Z[0],Z[1])}}
vendor: 9,299 bytes, line 321
321function f$(){this.size=0,this.__data__={hash:new Wf,map:new(Z0||_d),string:new Wf}}function IO(E){var I=Kn(this,E).delete(E);return this.size-=I?1:0,I}function bA(E){return Kn(this,E).get(E)}function PO(E){return Kn(this,E).has(E)}function MS(E,I){var z=Kn(this,E),Z=z.size;return z.set(E,I),this.size+=z.size==Z?0:1,this}qc.prototype.clear=f$,qc.prototype.delete=IO,qc.prototype.get=bA,qc.prototype.has=PO,qc.prototype.set=MS;function ll(E){var I=-1,z=E==null?0:E.length;for(this.__data__=new qc;++I<z;)this.add(E[I])}function p$(E){return this.__data__.set(E,l),this}function Id(E){return this.__data__.has(E)}ll.prototype.add=ll.prototype.push=p$,ll.prototype.has=Id;function Yc(E){var I=this.__data__=new _d(E);this.size=I.size}function tb(){this.__data__=new _d,this.size=0}function nb(E){var I=this.__data__,z=I.delete(E);return this.size=I.size,z}function DS(E){return this.__data__.get(E)}function LS(E){return this.__data__.has(E)}function RO(E,I){var z=this.__data__;if(z instanceof _d){var Z=z.__data__;if(!Z0||Z.length<o-1)return Z.push([E,I]),this.size=++z.size,this;z=this.__data__=new qc(Z)}return z.set(E,I),this.size=z.size,this}Yc.prototype.clear=tb,Yc.prototype.delete=nb,Yc.prototype.get=DS,Yc.prototype.has=LS,Yc.prototype.set=RO;function cy(E,I){var z=fr(E),Z=!z&&pb(E),de=!z&&!Z&&Ey(E),Ee=!z&&!Z&&!de&&eE(E),Me=z||Z||de||Ee,He=Me?Bf(E.length,W0):[],Ze=He.length;for(var Ct in E)(I||_r.call(E,Ct))&&!(Me&&(Ct=="length"||de&&(Ct=="offset"||Ct=="parent")||Ee&&(Ct=="buffer"||Ct=="byteLength"||Ct=="byteOffset")||bg(Ct,Ze)))&&He.push(Ct);return He}function ia(E){var I=E.length;return I?E[Md(0,I-1)]:n}function g$(E,I){return HO(kl(E),ku(I,0,E.length))}function m$(E){return HO(kl(E))}function uy(E,I,z){(z!==n&&!Gh(E[I],z)||z===n&&!(I in E))&&Pd(E,I,z)}function os(E,I,z){var Z=E[I];(!(_r.call(E,I)&&Gh(Z,z))||z===n&&!(I in E))&&Pd(E,I,z)}function kS(E,I){for(var z=E.length;z--;)if(Gh(E[z][0],I))return z;return-1}function gn(E,I,z,Z){return Rd(E,function(de,Ee,Me){I(Z,de,z(de),Me)}),Z}function gg(E,I){return E&&Wi(I,$a(I),E)}function CA(E,I){return E&&Wi(I,Kc(I),E)}function Pd(E,I,z){I=="__proto__"&&iy?iy(E,I,{configurable:!0,enumerable:!0,value:z,writable:!0}):E[I]=z}function SA(E,I){for(var z=-1,Z=I.length,de=ct(Z),Ee=E==null;++z<Z;)de[z]=Ee?n:O$(E,I[z]);return de}function ku(E,I,z){return E===E&&(z!==n&&(E=E<=z?E:z),I!==n&&(E=E>=I?E:I)),E}function cl(E,I,z,Z,de,Ee){var Me,He=I&d,Ze=I&h,Ct=I&f;if(z&&(Me=de?z(E,Z,de,Ee):z(E)),Me!==n)return Me;if(!ji(E))return E;var Et=fr(E);if(Et){if(Me=mSe(E),!He)return kl(E,Me)}else{var It=Bl(E),tn=It==Re||It==pe;if(Ey(E))return DO(E,He);if(It==ot||It==ie||tn&&!de){if(Me=Ze||tn?{}:D9(E),!He)return Ze?C$(E,CA(Me,E)):kA(E,gg(Me,E))}else{if(!Br[It])return de?E:{};Me=ySe(E,It,He)}}Ee||(Ee=new Yc);var _n=Ee.get(E);if(_n)return _n;Ee.set(E,Me),c7(E)?E.forEach(function(Wn){Me.add(cl(Wn,I,z,Wn,E,Ee))}):a7(E)&&E.forEach(function(Wn,$r){Me.set($r,cl(Wn,I,z,$r,E,Ee))});var Gn=Ct?Ze?Xe:lt:Ze?Kc:$a,Pr=Et?n:Gn(E);return ai(Pr||E,function(Wn,$r){Pr&&($r=Wn,Wn=E[$r]),os(Me,$r,cl(Wn,I,z,$r,E,Ee))}),Me}function EA(E){var I=$a(E);return function(z){return xA(z,E,I)}}function xA(E,I,z){var Z=z.length;if(E==null)return!Z;for(E=nr(E);Z--;){var de=z[Z],Ee=I[de],Me=E[de];if(Me===n&&!(de in E)||!Ee(Me))return!1}return!0}function wA(E,I,z){if(typeof E!="function")throw new Ma(s);return UA(function(){E.apply(n,z)},I)}function dy(E,I,z,Z){var de=-1,Ee=Nl,Me=!0,He=E.length,Ze=[],Ct=I.length;if(!He)return Ze;z&&(I=Yo(I,Ml(z))),Z?(Ee=AS,Me=!1):I.length>=o&&(Ee=lg,Me=!1,I=new ll(I));e:for(;++de<He;){var Et=E[de],It=z==null?Et:z(Et);if(Et=Z||Et!==0?Et:0,Me&&It===It){for(var tn=Ct;tn--;)if(I[tn]===It)continue e;Ze.push(Et)}else Ee(I,It,Z)||Ze.push(Et)}return Ze}var Rd=Zf(ws),FS=Zf(TA,!0);function sa(E,I){var z=!0;return Rd(E,function(Z,de,Ee){return z=!!I(Z,de,Ee),z}),z}function Dl(E,I,z){for(var Z=-1,de=E.length;++Z<de;){var Ee=E[Z],Me=I(Ee);if(Me!=null&&(He===n?Me===Me&&!Bu(Me):z(Me,He)))var He=Me,Ze=Ee}return Ze}function Od(E,I,z,Z){var de=E.length;for(z=Er(z),z<0&&(z=-z>de?0:de+z),Z=Z===n||Z>de?de:Er(Z),Z<0&&(Z+=de),Z=z>Z?0:d7(Z);z<Z;)E[z++]=I;return E}function BS(E,I){var z=[];return Rd(E,function(Z,de,Ee){I(Z,de,Ee)&&z.push(Z)}),z}function Hs(E,I,z,Z,de){var Ee=-1,Me=E.length;for(z||(z=bSe),de||(de=[]);++Ee<Me;){var He=E[Ee];I>0&&z(He)?I>1?Hs(He,I-1,z,Z,de):xd(de,He):Z||(de[de.length]=He)}return de}var fc=hb(),AA=hb(!0);function ws(E,I){return E&&fc(E,I,$a)}function TA(E,I){return E&&AA(E,I,$a)}function rb(E,I){return Vc(I,function(z){return Cg(E[z])})}function jf(E,I){I=Kf(I,E);for(var z=0,Z=I.length;E!=null&&z<Z;)E=E[Jf(I[z++])];return z&&z==Z?E:n}function _A(E,I,z){var Z=I(E);return fr(E)?Z:xd(Z,z(E))}function Fa(E){return E==null?E===n?_e:Ne:Vf&&Vf in nr(E)?Zr(E):TSe(E)}function hy(E,I){return E>I}function $S(E,I){return E!=null&&_r.call(E,I)}function HS(E,I){return E!=null&&I in nr(E)}function US(E,I,z){return E>=La(I,z)&&E<xs(I,z)}function fy(E,I,z){for(var Z=z?AS:Nl,de=E[0].length,Ee=E.length,Me=Ee,He=ct(Ee),Ze=1/0,Ct=[];Me--;){var Et=E[Me];Me&&I&&(Et=Yo(Et,Ml(I))),Ze=La(Et.length,Ze),He[Me]=!z&&(I||de>=120&&Et.length>=120)?new ll(Me&&Et):n}Et=E[0];var It=-1,tn=He[0];e:for(;++It<de&&Ct.length<Ze;){var _n=Et[It],Gn=I?I(_n):_n;if(_n=z||_n!==0?_n:0,!(tn?lg(tn,Gn):Z(Ct,Gn,z))){for(Me=Ee;--Me;){var Pr=He[Me];if(!(Pr?lg(Pr,Gn):Z(E[Me],Gn,z)))continue e}tn&&tn.push(Gn),Ct.push(_n)}}return Ct}function ob(E,I,z,Z){return ws(E,function(de,Ee,Me){I(Z,z(de),Ee,Me)}),Z}function mg(E,I,z){I=Kf(I,E),E=B9(E,I);var Z=E==null?E:E[Jf(Fd(I))];return Z==null?n:sl(Z,E,z)}function zS(E){return as(E)&&Fa(E)==ie}function IA(E){return as(E)&&Fa(E)==ne}function OO(E){return as(E)&&Fa(E)==we}function yg(E,I,z,Z,de){return E===I?!0:E==null||I==null||!as(E)&&!as(I)?E!==E&&I!==I:y$(E,I,z,Z,yg,de)}function y$(E,I,z,Z,de,Ee){var Me=fr(E),He=fr(I),Ze=Me?ee:Bl(E),Ct=He?ee:Bl(I);Ze=Ze==ie?ot:Ze,Ct=Ct==ie?ot:Ct;var Et=Ze==ot,It=Ct==ot,tn=Ze==Ct;if(tn&&Ey(E)){if(!Ey(I))return!1;Me=!0,Et=!1}if(tn&&!Et)return Ee||(Ee=new Yc),Me||eE(E)?Bo(E,I,z,Z,de,Ee):Ro(E,I,Ze,z,Z,de,Ee);if(!(z&p)){var _n=Et&&_r.call(E,"__wrapped__"),Gn=It&&_r.call(I,"__wrapped__");if(_n||Gn){var Pr=_n?E.value():E,Wn=Gn?I.value():I;return Ee||(Ee=new Yc),de(Pr,Wn,z,Z,Ee)}}return tn?(Ee||(Ee=new Yc),Fl(E,I,z,Z,de,Ee)):!1}function VS(E){return as(E)&&Bl(E)==Be}function ib(E,I,z,Z){var de=z.length,Ee=de,Me=!Z;if(E==null)return!Ee;for(E=nr(E);de--;){var He=z[de];if(Me&&He[2]?He[1]!==E[He[0]]:!(He[0]in E))return!1}for(;++de<Ee;){He=z[de];var Ze=He[0],Ct=E[Ze],Et=He[1];if(Me&&He[2]){if(Ct===n&&!(Ze in E))return!1}else{var It=new Yc;if(Z)var tn=Z(Ct,Et,Ze,E,I,It);if(!(tn===n?yg(Et,Ct,p|m,Z,It):tn))return!1}}return!0}function Fi(E){if(!ji(E)||SSe(E))return!1;var I=Cg(E)?hO:Pn;return I.test(fb(E))}function Ir(E){return as(E)&&Fa(E)==be}function Us(E){return as(E)&&Bl(E)==Se}function is(E){return as(E)&&jO(E.length)&&!!uo[Fa(E)]}function zs(E){return typeof E=="function"?E:E==null?Qc:typeof E=="object"?fr(E)?sb(E[0],E[1]):qf(E):E7(E)}function ul(E){if(!HA(E))return yO(E);var I=[];for(var z in nr(E))_r.call(E,z)&&z!="constructor"&&I.push(z);return I}function py(E){if(!ji(E))return ASe(E);var I=HA(E),z=[];for(var Z in E)Z=="constructor"&&(I||!_r.call(E,Z))||z.push(Z);return z}function Gi(E,I){return E<I}function gy(E,I){var z=-1,Z=Xc(E)?ct(E.length):[];return Rd(E,function(de,Ee,Me){Z[++z]=I(de,Ee,Me)}),Z}function qf(E){var I=Vr(E);return I.length==1&&I[0][2]?k9(I[0][0],I[0][1]):function(z){return z===E||ib(z,E,I)}}function sb(E,I){return S$(E)&&L9(I)?k9(Jf(E),I):function(z){var Z=O$(z,E);return Z===n&&Z===I?N$(z,E):yg(I,Z,p|m)}}function my(E,I,z,Z,de){E!==I&&fc(I,function(Ee,Me){if(de||(de=new Yc),ji(Ee))ab(E,I,Me,z,my,Z,de);else{var He=Z?Z(x$(E,Me),Ee,Me+"",E,I,de):n;He===n&&(He=Ee),uy(E,Me,He)}},Kc)}function ab(E,I,z,Z,de,Ee,Me){var He=x$(E,z),Ze=x$(I,z),Ct=Me.get(Ze);if(Ct){uy(E,z,Ct);return}var Et=Ee?Ee(He,Ze,z+"",E,I,Me):n,It=Et===n;if(It){var tn=fr(Ze),_n=!tn&&Ey(Ze),Gn=!tn&&!_n&&eE(Ze);Et=Ze,tn||_n||Gn?fr(He)?Et=He:As(He)?Et=kl(He):_n?(It=!1,Et=DO(Ze,!0)):Gn?(It=!1,Et=MA(Ze,!0)):Et=[]:zA(Ze)||pb(Ze)?(Et=He,pb(He)?Et=h7(He):(!ji(He)||Cg(He))&&(Et=D9(Ze))):It=!1}It&&(Me.set(Ze,Et),de(Et,Ze,Z,Ee,Me),Me.delete(Ze)),uy(E,z,Et)}function dl(E,I){var z=E.length;if(z)return I+=I<0?z:0,bg(I,z)?E[I]:n}function GS(E,I,z){I.length?I=Yo(I,function(Ee){return fr(Ee)?function(Me){return jf(Me,Ee.length===1?Ee[0]:Ee)}:Ee}):I=[Qc];var Z=-1;I=Yo(I,Ml(kt()));var de=gy(E,function(Ee,Me,He){var Ze=Yo(I,function(Ct){return Ct(Ee)});return{criteria:Ze,index:++Z,value:Ee}});return _S(de,function(Ee,Me){return b$(Ee,Me,z)})}function PA(E,I){return Nd(E,I,function(z,Z){return N$(E,Z)})}function Nd(E,I,z){for(var Z=-1,de=I.length,Ee={};++Z<de;){var Me=I[Z],He=jf(E,Me);z(He,Me)&&Yf(Ee,Kf(Me,E),He)}return Ee}function yy(E){return function(I){return jf(I,E)}}function vy(E,I,z,Z){var de=Z?H0:Km,Ee=-1,Me=I.length,He=E;for(E===I&&(I=kl(I)),z&&(He=Yo(E,Ml(z)));++Ee<Me;)for(var Ze=0,Ct=I[Ee],Et=z?z(Ct):Ct;(Ze=de(He,Et,Ze,Z))>-1;)He!==E&&X0.call(He,Ze,1),X0.call(E,Ze,1);return E}function WS(E,I){for(var z=E?I.length:0,Z=z-1;z--;){var de=I[z];if(z==Z||de!==Ee){var Ee=de;bg(de)?X0.call(E,de,1):YS(E,de)}}return E}function Md(E,I){return E+sy(aA()*(I-E+1))}function jS(E,I,z,Z){for(var de=-1,Ee=xs(Q0((I-E)/(z||1)),0),Me=ct(Ee);Ee--;
vendor: 21,841 bytes, lines 321-323
321)Me[Z?Ee:++de]=E,E+=z;return Me}function Dd(E,I){var z="";if(!E||I<1||I>H)return z;do I%2&&(z+=E),I=sy(I/2),I&&(E+=E);while(I);return z}function cr(E,I){return w$(F9(E,I,Qc),E+"")}function lb(E){return ia(tE(E))}function RA(E,I){var z=tE(E);return HO(z,ku(I,0,z.length))}function Yf(E,I,z,Z){if(!ji(E))return E;I=Kf(I,E);for(var de=-1,Ee=I.length,Me=Ee-1,He=E;He!=null&&++de<Ee;){var Ze=Jf(I[de]),Ct=z;if(Ze==="__proto__"||Ze==="constructor"||Ze==="prototype")return E;if(de!=Me){var Et=He[Ze];Ct=Z?Z(Et,Ze,He):n,Ct===n&&(Ct=ji(Et)?Et:bg(I[de+1])?[]:{})}os(He,Ze,Ct),He=He[Ze]}return E}var cb=J0?function(E,I){return J0.set(E,I),E}:Qc,Ba=iy?function(E,I){return iy(E,"toString",{configurable:!0,enumerable:!1,value:D$(I),writable:!0})}:Qc;function Xf(E){return HO(tE(E))}function Ei(E,I,z){var Z=-1,de=E.length;I<0&&(I=-I>de?0:de+I),z=z>de?de:z,z<0&&(z+=de),de=I>z?0:z-I>>>0,I>>>=0;for(var Ee=ct(de);++Z<de;)Ee[Z]=E[Z+I];return Ee}function Ll(E,I){var z;return Rd(E,function(Z,de,Ee){return z=I(Z,de,Ee),!z}),!!z}function ub(E,I,z){var Z=0,de=E==null?Z:E.length;if(typeof I=="number"&&I===I&&de<=se){for(;Z<de;){var Ee=Z+de>>>1,Me=E[Ee];Me!==null&&!Bu(Me)&&(z?Me<=I:Me<I)?Z=Ee+1:de=Ee}return de}return db(E,I,Qc,z)}function db(E,I,z,Z){var de=0,Ee=E==null?0:E.length;if(Ee===0)return 0;I=z(I);for(var Me=I!==I,He=I===null,Ze=Bu(I),Ct=I===n;de<Ee;){var Et=sy((de+Ee)/2),It=z(E[Et]),tn=It!==n,_n=It===null,Gn=It===It,Pr=Bu(It);if(Me)var Wn=Z||Gn;else Ct?Wn=Gn&&(Z||tn):He?Wn=Gn&&tn&&(Z||!_n):Ze?Wn=Gn&&tn&&!_n&&(Z||!Pr):_n||Pr?Wn=!1:Wn=Z?It<=I:It<I;Wn?de=Et+1:Ee=Et}return La(Ee,Q)}function qS(E,I){for(var z=-1,Z=E.length,de=0,Ee=[];++z<Z;){var Me=E[z],He=I?I(Me):Me;if(!z||!Gh(He,Ze)){var Ze=He;Ee[de++]=Me===0?0:Me}}return Ee}function NO(E){return typeof E=="number"?E:Bu(E)?q:+E}function ss(E){if(typeof E=="string")return E;if(fr(E))return Yo(E,ss)+"";if(Bu(E))return fA?fA.call(E):"";var I=E+"";return I=="0"&&1/E==-U?"-0":I}function Hh(E,I,z){var Z=-1,de=Nl,Ee=E.length,Me=!0,He=[],Ze=He;if(z)Me=!1,de=AS;else if(Ee>=o){var Ct=I?null:qe(E);if(Ct)return dg(Ct);Me=!1,de=lg,Ze=new ll}else Ze=I?[]:He;e:for(;++Z<Ee;){var Et=E[Z],It=I?I(Et):Et;if(Et=z||Et!==0?Et:0,Me&&It===It){for(var tn=Ze.length;tn--;)if(Ze[tn]===It)continue e;I&&Ze.push(It),He.push(Et)}else de(Ze,It,z)||(Ze!==He&&Ze.push(It),He.push(Et))}return He}function YS(E,I){return I=Kf(I,E),E=B9(E,I),E==null||delete E[Jf(Fd(I))]}function XS(E,I,z,Z){return Yf(E,I,z(jf(E,I)),Z)}function Ld(E,I,z,Z){for(var de=E.length,Ee=Z?de:-1;(Z?Ee--:++Ee<de)&&I(E[Ee],Ee,E););return z?Ei(E,Z?0:Ee,Z?Ee+1:de):Ei(E,Z?Ee+1:0,Z?de:Ee)}function OA(E,I){var z=E;return z instanceof zn&&(z=z.value()),$0(I,function(Z,de){return de.func.apply(de.thisArg,xd([Z],de.args))},z)}function KS(E,I,z){var Z=E.length;if(Z<2)return Z?Hh(E[0]):[];for(var de=-1,Ee=ct(Z);++de<Z;)for(var Me=E[de],He=-1;++He<Z;)He!=de&&(Ee[de]=dy(Ee[de]||Me,E[He],I,z));return Hh(Hs(Ee,1),I,z)}function QS(E,I,z){for(var Z=-1,de=E.length,Ee=I.length,Me={};++Z<de;){var He=Z<Ee?I[Z]:n;z(Me,E[Z],He)}return Me}function by(E){return As(E)?E:[]}function NA(E){return typeof E=="function"?E:Qc}function Kf(E,I){return fr(E)?E:S$(E,I)?[E]:z9(wo(E))}var MO=cr;function Uh(E,I,z){var Z=E.length;return z=z===n?Z:z,!I&&z>=Z?E:Ei(E,I,z)}var Qf=fO||function(E){return Fo.clearTimeout(E)};function DO(E,I){if(I)return E.slice();var z=E.length,Z=oA?oA(z):new E.constructor(z);return E.copy(Z),Z}function zh(E){var I=new E.constructor(E.byteLength);return new q0(I).set(new q0(E)),I}function LO(E,I){var z=I?zh(E.buffer):E.buffer;return new E.constructor(z,E.byteOffset,E.byteLength)}function li(E){var I=new E.constructor(E.source,pt.exec(E));return I.lastIndex=E.lastIndex,I}function v$(E){return ly?nr(ly.call(E)):{}}function MA(E,I){var z=I?zh(E.buffer):E.buffer;return new E.constructor(z,E.byteOffset,E.length)}function kO(E,I){if(E!==I){var z=E!==n,Z=E===null,de=E===E,Ee=Bu(E),Me=I!==n,He=I===null,Ze=I===I,Ct=Bu(I);if(!He&&!Ct&&!Ee&&E>I||Ee&&Me&&Ze&&!He&&!Ct||Z&&Me&&Ze||!z&&Ze||!de)return 1;if(!Z&&!Ee&&!Ct&&E<I||Ct&&z&&de&&!Z&&!Ee||He&&z&&de||!Me&&de||!Ze)return-1}return 0}function b$(E,I,z){for(var Z=-1,de=E.criteria,Ee=I.criteria,Me=de.length,He=z.length;++Z<Me;){var Ze=kO(de[Z],Ee[Z]);if(Ze){if(Z>=He)return Ze;var Ct=z[Z];return Ze*(Ct=="desc"?-1:1)}}return E.index-I.index}function DA(E,I,z,Z){for(var de=-1,Ee=E.length,Me=z.length,He=-1,Ze=I.length,Ct=xs(Ee-Me,0),Et=ct(Ze+Ct),It=!Z;++He<Ze;)Et[He]=I[He];for(;++de<Me;)(It||de<Ee)&&(Et[z[de]]=E[de]);for(;Ct--;)Et[He++]=E[de++];return Et}function LA(E,I,z,Z){for(var de=-1,Ee=E.length,Me=-1,He=z.length,Ze=-1,Ct=I.length,Et=xs(Ee-He,0),It=ct(Et+Ct),tn=!Z;++de<Et;)It[de]=E[de];for(var _n=de;++Ze<Ct;)It[_n+Ze]=I[Ze];for(;++Me<He;)(tn||de<Ee)&&(It[_n+z[Me]]=E[de++]);return It}function kl(E,I){var z=-1,Z=E.length;for(I||(I=ct(Z));++z<Z;)I[z]=E[z];return I}function Wi(E,I,z,Z){var de=!z;z||(z={});for(var Ee=-1,Me=I.length;++Ee<Me;){var He=I[Ee],Ze=Z?Z(z[He],E[He],He,z,E):n;Ze===n&&(Ze=E[He]),de?Pd(z,He,Ze):os(z,He,Ze)}return z}function kA(E,I){return Wi(E,kd(E),I)}function C$(E,I){return Wi(E,$O(E),I)}function Fu(E,I){return function(z,Z){var de=fr(z)?Xw:gn,Ee=I?I():{};return de(z,E,kt(Z,2),Ee)}}function Vh(E){return cr(function(I,z){var Z=-1,de=z.length,Ee=de>1?z[de-1]:n,Me=de>2?z[2]:n;for(Ee=E.length>3&&typeof Ee=="function"?(de--,Ee):n,Me&&pc(z[0],z[1],Me)&&(Ee=de<3?n:Ee,de=1),I=nr(I);++Z<de;){var He=z[Z];He&&E(I,He,Z,Ee)}return I})}function Zf(E,I){return function(z,Z){if(z==null)return z;if(!Xc(z))return E(z,Z);for(var de=z.length,Ee=I?de:-1,Me=nr(z);(I?Ee--:++Ee<de)&&Z(Me[Ee],Ee,Me)!==!1;);return z}}function hb(E){return function(I,z,Z){for(var de=-1,Ee=nr(I),Me=Z(I),He=Me.length;He--;){var Ze=Me[E?He:++de];if(z(Ee[Ze],Ze,Ee)===!1)break}return I}}function FA(E,I,z){var Z=I&y,de=Sy(E);function Ee(){var Me=this&&this!==Fo&&this instanceof Ee?de:E;return Me.apply(Z?z:this,arguments)}return Ee}function ZS(E){return function(I){I=wo(I);var z=Hf(I)?Na(I):n,Z=z?z[0]:I.charAt(0),de=z?Uh(z,1).join(""):I.slice(1);return Z[E]()+de}}function Cy(E){return function(I){return $0(C7(b7(I).replace(Hc,"")),E,"")}}function Sy(E){return function(){var I=arguments;switch(I.length){case 0:return new E;case 1:return new E(I[0]);case 2:return new E(I[0],I[1]);case 3:return new E(I[0],I[1],I[2]);case 4:return new E(I[0],I[1],I[2],I[3]);case 5:return new E(I[0],I[1],I[2],I[3],I[4]);case 6:return new E(I[0],I[1],I[2],I[3],I[4],I[5]);case 7:return new E(I[0],I[1],I[2],I[3],I[4],I[5],I[6])}var z=pg(E.prototype),Z=E.apply(z,I);return ji(Z)?Z:z}}function FO(E,I,z){var Z=Sy(E);function de(){for(var Ee=arguments.length,Me=ct(Ee),He=Ee,Ze=In(de);He--;)Me[He]=arguments[He];var Ct=Ee<3&&Me[0]!==Ze&&Me[Ee-1]!==Ze?[]:Fh(Me,Ze);if(Ee-=Ct.length,Ee<z)return te(E,I,vg,de.placeholder,n,Me,Ct,n,n,z-Ee);var Et=this&&this!==Fo&&this instanceof de?Z:E;return sl(Et,this,Me)}return de}function BA(E){return function(I,z,Z){var de=nr(I);if(!Xc(I)){var Ee=kt(z,3);I=$a(I),z=function(He){return Ee(de[He],He,de)}}var Me=E(I,z,Z);return Me>-1?de[Ee?I[Me]:Me]:n}}function $A(E){return aa(function(I){var z=I.length,Z=z,de=jc.prototype.thru;for(E&&I.reverse();Z--;){var Ee=I[Z];if(typeof Ee!="function")throw new Ma(s);if(de&&!Me&&en(Ee)=="wrapper")var Me=new jc([],!0)}for(Z=Me?Z:z;++Z<z;){Ee=I[Z];var He=en(Ee),Ze=He=="wrapper"?mt(Ee):n;Ze&&E$(Ze[0])&&Ze[1]==(P|S|A|R)&&!Ze[4].length&&Ze[9]==1?Me=Me[en(Ze[0])].apply(Me,Ze[3]):Me=Ee.length==1&&E$(Ee)?Me[He]():Me.thru(Ee)}return function(){var Ct=arguments,Et=Ct[0];if(Me&&Ct.length==1&&fr(Et))return Me.plant(Et).value();for(var It=0,tn=z?I[It].apply(this,Ct):Et;++It<z;)tn=I[It].call(this,tn);return tn}})}function vg(E,I,z,Z,de,Ee,Me,He,Ze,Ct){var Et=I&P,It=I&y,tn=I&v,_n=I&(S|w),Gn=I&O,Pr=tn?n:Sy(E);function Wn(){for(var $r=arguments.length,Wr=ct($r),$u=$r;$u--;)Wr[$u]=arguments[$u];if(_n)var gc=In(Wn),Hu=ug(Wr,gc);if(Z&&(Wr=DA(Wr,Z,de,_n)),Ee&&(Wr=LA(Wr,Ee,Me,_n)),$r-=Hu,_n&&$r<Ct){var Ts=Fh(Wr,gc);return te(E,I,vg,Wn.placeholder,z,Wr,Ts,He,Ze,Ct-$r)}var Wh=It?z:this,Eg=tn?Wh[E]:E;return $r=Wr.length,He?Wr=_Se(Wr,He):Gn&&$r>1&&Wr.reverse(),Et&&Ze<$r&&(Wr.length=Ze),this&&this!==Fo&&this instanceof Wn&&(Eg=Pr||Sy(Eg)),Eg.apply(Wh,Wr)}return Wn}function BO(E,I){return function(z,Z){return ob(z,E,I(Z),{})}}function JS(E,I){return function(z,Z){var de;if(z===n&&Z===n)return I;if(z!==n&&(de=z),Z!==n){if(de===n)return Z;typeof z=="string"||typeof Z=="string"?(z=ss(z),Z=ss(Z)):(z=NO(z),Z=NO(Z)),de=E(z,Z)}return de}}function x(E){return aa(function(I){return I=Yo(I,Ml(kt())),cr(function(z){var Z=this;return E(I,function(de){return sl(de,Z,z)})})})}function T(E,I){I=I===n?" ":ss(I);var z=I.length;if(z<2)return z?Dd(I,E):I;var Z=Dd(I,Q0(E/Td(I)));return Hf(I)?Uh(Na(Z),0,E).join(""):Z.slice(0,E)}function B(E,I,z,Z){var de=I&y,Ee=Sy(E);function Me(){for(var He=-1,Ze=arguments.length,Ct=-1,Et=Z.length,It=ct(Et+Ze),tn=this&&this!==Fo&&this instanceof Me?Ee:E;++Ct<Et;)It[Ct]=Z[Ct];for(;Ze--;)It[Ct++]=arguments[++He];return sl(tn,de?z:this,It)}return Me}function G(E){return function(I,z,Z){return Z&&typeof Z!="number"&&pc(I,z,Z)&&(z=Z=n),I=Sg(I),z===n?(z=I,I=0):z=Sg(z),Z=Z===n?I<z?1:-1:Sg(Z),jS(I,z,Z,E)}}function Y(E){return function(I,z){return typeof I=="string"&&typeof z=="string"||(I=Bd(I),z=Bd(z)),E(I,z)}}function te(E,I,z,Z,de,Ee,Me,He,Ze,Ct){var Et=I&S,It=Et?Me:n,tn=Et?n:Me,_n=Et?Ee:n,Gn=Et?n:Ee;I|=Et?A:_,I&=~(Et?_:A),I&b||(I&=~(y|v));var Pr=[E,I,de,_n,It,Gn,tn,He,Ze,Ct],Wn=z.apply(n,Pr);return E$(E)&&$9(Wn,Pr),Wn.placeholder=Z,H9(Wn,E,I)}function Te(E){var I=Mr[E];return function(z,Z){if(z=Bd(z),Z=Z==null?0:La(Er(Z),292),Z&&sA(z)){var de=(wo(z)+"e").split("e"),Ee=I(de[0]+"e"+(+de[1]+Z));return de=(wo(Ee)+"e").split("e"),+(de[0]+"e"+(+de[1]-Z))}return I(z)}}var qe=ka&&1/dg(new ka([,-0]))[1]==U?function(E){return new ka(E)}:F$;function ut(E){return function(I){var z=Bl(I);return z==Be?Ad(I):z==Se?cO(I):Jw(I,E(I))}}function Pt(E,I,z,Z,de,Ee,Me,He){var Ze=I&v;if(!Ze&&typeof E!="function")throw new Ma(s);var Ct=Z?Z.length:0;if(Ct||(I&=~(A|_),Z=de=n),Me=Me===n?Me:xs(Er(Me),0),He=He===n?He:Er(He),Ct-=de?de.length:0,I&_){var Et=Z,It=de;Z=de=n}var tn=Ze?n:mt(E),_n=[E,I,z,Z,de,Et,It,Ee,Me,He];if(tn&&wSe(_n,tn),E=_n[0],I=_n[1],z=_n[2],Z=_n[3],de=_n[4],He=_n[9]=_n[9]===n?Ze?0:E.length:xs(_n[9]-Ct,0),!He&&I&(S|w)&&(I&=~(S|w)),!I||I==y)var Gn=FA(E,I,z);else I==S||I==w?Gn=FO(E,I,He):(I==A||I==(y|A))&&!de.length?Gn=B(E,I,z,Z):Gn=vg.apply(n,_n);var Pr=tn?cb:$9;return H9(Pr(Gn,_n),E,I)}function vn(E,I,z,Z){return E===n||Gh(E,Uf[z])&&!_r.call(Z,z)?I:E}function rr(E,I,z,Z,de,Ee){return ji(E)&&ji(I)&&(Ee.set(I,E),my(E,I,n,rr,Ee),Ee.delete(I)),E}function on(E){return zA(E)?n:E}function Bo(E,I,z,Z,de,Ee){var Me=z&p,He=E.length,Ze=I.length;if(He!=Ze&&!(Me&&Ze>He))return!1;var Ct=Ee.get(E),Et=Ee.get(I);if(Ct&&Et)return Ct==I&&Et==E;var It=-1,tn=!0,_n=z&m?new ll:n;for(Ee.set(E,I),Ee.set(I,E);++It<He;){var Gn=E[It],Pr=I[It];if(Z)var Wn=Me?Z(Pr,Gn,It,I,E,Ee):Z(Gn,Pr,It,E,I,Ee);if(Wn!==n){if(Wn)continue;tn=!1;break}if(_n){if(!Ym(I,function($r,Wr){if(!lg(_n,Wr)&&(Gn===$r||de(Gn,$r,z,Z,Ee)))return _n.push(Wr)})){tn=!1;break}}else if(!(Gn===Pr||de(Gn,Pr,z,Z,Ee))){tn=!1;break}}return Ee.delete(E),Ee.delete(I),tn}function Ro(E,I,z,Z,de,Ee,Me){switch(z){case W:if(E.byteLength!=I.byteLength||E.byteOffset!=I.byteOffset)return!1;E=E.buffer,I=I.buffer;case ne:return!(E.byteLength!=I.byteLength||!Ee(new q0(E),new q0(I)));case fe:case we:case ke:return Gh(+E,+I);case ve:return E.name==I.name&&E.message==I.message;case be:case Pe:return E==I+"";case Be:var He=Ad;case Se:var Ze=Z&p;if(He||(He=dg),E.size!=I.size&&!Ze)return!1;var Ct=Me.get(E);if(Ct)return Ct==I;Z|=m,Me.set(E,I);var Et=Bo(He(E),He(I),Z,de,Ee,Me);return Me.delete(E),Et;case Ue:if(ly)return ly.call(E)==ly.call(I)}return!1}function Fl(E,I,z,Z,de,Ee){var Me=z&p,He=lt(E),Ze=He.length,Ct=lt(I),Et=Ct.length;if(Ze!=Et&&!Me)return!1;for(var It=Ze;It--;){var tn=He[It];if(!(Me?tn in I:_r.call(I,tn)))return!1}var _n=Ee.get(E),Gn=Ee.get(I);if(_n&&Gn)return _n==I&&Gn==E;var Pr=!0;Ee.set(E,I),Ee.set(I,E);for(var Wn=Me;++It<Ze;){tn=He[It];var $r=E[tn],Wr=I[tn];if(Z)var $u=Me?Z(Wr,$r,tn,I,E,Ee):Z($r,Wr,tn,E,I,Ee);if(!($u===n?$r===Wr||de($r,Wr,z,Z,Ee):$u)){Pr=!1;break}Wn||(Wn=tn=="constructor")}if(Pr&&!Wn){var gc=E.constructor,Hu=I.constructor;gc!=Hu&&"constructor"in E&&"constructor"in I&&!(typeof gc=="function"&&gc instanceof gc&&typeof Hu=="function"&&Hu instanceof Hu)&&(Pr=!1)}return Ee.delete(E),Ee.delete(I),Pr}function aa(E){return w$(F9(E,n,j9),E+"")}function lt(E){return _A(E,$a,kd)}function Xe(E){return _A(E,Kc,$O)}var mt=J0?function(E){return J0.get(E)}:F$;function en(E){for(var I=E.name+"",z=fg[I],Z=_r.call(fg,I)?z.length:0;Z--;){var de=z[Z],Ee=de.func;if(Ee==null||Ee==E)return de.name}return I}function In(E){var I=_r.call(me,"placeholder")?me:E;return I.placeholder}function kt(){var E=me.iteratee||L$;return E=E===L$?zs:E,arguments.length?E(arguments[0],arguments[1]):E}function Kn(E,I){var z=E.__data__;return CSe(I)?z[typeof I=="string"?"string":"hash"]:z.map}function Vr(E){for(var I=$a(E),z=I.length;z--;){var Z=I[z],de=E[Z];I[z]=[Z,de,L9(de)]}return I}function ci(E,I){var z=$f(E,I);return Fi(z)?z:n}function Zr(E){var I=_r.call(E,Vf),z=E[Vf];try{E[Vf]=n;var Z=!0}catch{}var de=ry.call(E);return Z&&(I?E[Vf]=z:delete E[Vf]),de}var kd=RS?function(E){return E==null?[]:(E=nr(E),Vc(RS(E),function(I){return oy.call(E,I)}))}:B$,$O=RS?function(E){for(var I=[];E;)xd(I,kd(E)),E=Y0(E);return I}:B$,Bl=Fa;(lA&&Bl(new lA(new ArrayBuffer(1)))!=W||Z0&&Bl(new Z0)!=Be||cA&&Bl(cA.resolve())!=ce||ka&&Bl(new ka)!=Se||hg&&Bl(new hg)!=Oe)&&(Bl=function(E){var I=Fa(E),z=I==ot?E.constructor:n,Z=z?fb(z):"";if(Z)switch(Z){case CO:return W;case uA:return Be;case ay:return ce;case dA:return Se;case hA:return Oe}return I});function pSe(E,I,z){for(var Z=-1,de=z.length;++Z<de;){var Ee=z[Z],Me=Ee.size;switch(Ee.type){case"drop":E+=Me;break;case"dropRight":I-=Me;break;case"take":I=La(I,E+Me);break;case"takeRight":E=xs(E,I-Me);break}}return{start:E,end:I}}function gSe(E){var I=E.match(Jt);return I?I[1].split(wn):[]}function M9(E,I,z){I=Kf(I,E);for(var Z=-1,de=I.length,Ee=!1;++Z<de;){var Me=Jf(I[Z]);if(!(Ee=E!=null&&z(E,Me)))break;E=E[Me]}return Ee||++Z!=de?Ee:(de=E==null?0:E.length,!!de&&jO(de)&&bg(Me,de)&&(fr(E)||pb(E)))}function mSe(E){var I=E.length,z=new E.constructor(I);return I&&typeof E[0]=="string"&&_r.call(E,"index")&&(z.index=E.index,z.input=E.input),z}function D9(E){return typeof E.constructor=="function"&&!HA(E)?pg(Y0(E)):{}}function ySe(E,I,z){var Z=E.constructor;switch(I){case ne:return zh(E);case fe:case we:return new Z(+E);case W:return LO(E,z);case j:case ue:case he:case Ce:case Ie:case et:case je:case it:case xt:return MA(E,z);case Be:return new Z;case ke:case Pe:return new Z(E);case be:return li(E);case Se:return new Z;case Ue:return v$(E)}}function vSe(E,I){var z=I.length;if(!z)return E;var Z=z-1;return I[Z]=(z>1?"& ":"")+I[Z],I=I.join(z>2?", ":" "),E.replace(sn,`{ 322/* [wrapped with `+I+`] */ 323`)}function bSe(E){return fr(E)||pb(E)||!!(K0&&E&&E[K0])}function bg(E,I){var z=typeof E;return I=I??H,!!I&&(z=="number"||z!="symbol"&&tr.test(E))&&E>-1&&E%1==0&&E<I}function pc(E,I,z){if(!ji(z))return!1;var Z=typeof I;return(Z=="number"?Xc(z)&&bg(I,z.length):Z=="string"&&I in z)?Gh(z[I],E):!1}function S$(E,I){if(fr(E))return!1;var z=typeof E;return z=="number"||z=="symbol"||z=="boolean"||E==null||Bu(E)?!0:ta.test(E)||!Pu.test(E)||I!=null&&E in nr(I)}function CSe(E){var I=typeof E;return I=="string"||I=="number"||I=="symbol"||I=="boolean"?E!=="__proto__":E===null}function E$(E){var I=en(E),z=me[I];if(typeof z!="function"||!(I in zn.prototype))return!1;if(E===z)return!0;var Z=mt(z);return!!Z&&E===Z[0]}function SSe(E){return!!ny&&ny in E}var ESe=ey?Cg:$$;function HA(E){var I=E&&E.constructor,z=typeof I=="function"&&I.prototype||Uf;return E===z}function L9(E){return E===E&&!ji(E)}function k9(E,I){return function(z){return z==null?!1:z[E]===I&&(I!==n||E in nr(z))}}function xSe(E){var I=GO(E,function(Z){return z.size===c&&z.clear(),Z}),z=I.cache;return I}function wSe(E,I){var z=E[1],Z=I[1],de=z|Z,Ee=de<(y|v|P),Me=Z==P&&z==S||Z==P&&z==R&&E[7].length<=I[8]||Z==(P|R)&&I[7].length<=I[8]&&z==S;if(!(Ee||Me))return E;Z&y&&(E[2]=I[2],de|=z&y?0:b);var He=I[3];if(He){var Ze=E[3];E[3]=Ze?DA(Ze,He,I[4]):He,E[4]=Ze?Fh(E[3],u):I[4]}return He=I[5],He&&(Ze=E[5],E[5]=Ze?LA(Ze,He,I[6]):He,E[6]=Ze?Fh(E[5],u):I[6]),He=I[7],He&&(E[7]=He),Z&P&&(E[8]=E[8]==null?I[8]:La(E[8],I[8])),E[9]==null&&(E[9]=I[9]),E[0]=I[0],E[1]=de,E}function ASe(E){var I=[];if(E!=null)for(var z in nr(E))I.push(z);return I}function TSe(E){return ry.call(E)}function F9(E,I,z){return I=xs(I===n?E.length-1:I,0),function(){for(var Z=arguments,de=-1,Ee=xs(Z.length-I,0),Me=ct(Ee);++de<Ee;)Me[de]=Z[I+de];de=-1;for(var He=ct(I+1);++de<I;)He[de]=Z[de];return He[I]=z(Me),sl(E,this,He)}}function B9(E,I){return I.length<2?E:jf(E,Ei(I,0,-1))}function _Se(E,I){for(var z=E.length,Z=La(I.length,z),de=kl(E);Z--;){var Ee=I[Z];E[Z]=bg(Ee,z)?de[Ee]:n}return E}function x$(E,I){if(!(I==="constructor"&&typeof E[I]=="function")&&I!="__proto__")return E[I]}var $9=U9(cb),UA=gO||function(E,I){return Fo.setTimeout(E,I)},w$=U9(Ba);function H9(E,I,z){var Z=I+"";return w$(E,vSe(Z,ISe(gSe(Z),z)))}function U9(E){var I=0,z=0;return function(){var Z=vO(),de=F-(Z-z);if(z=Z,de>0){if(++I>=L)return arguments[0]}else I=0;return E.apply(n,arguments)}}function HO(E,I){var z=-1,Z=E.length,de=Z-1;for(I=I===n?Z:I;++z<I;){var Ee=Md(z,de),Me=E[Ee];E[Ee]=E[z],E[z]=Me}return E.length=I,E}var z9=xSe(function(E){var I=[];return E.charCodeAt(0)===46&&I.push(""),E.replace(oi,function(z,Z,de,Ee){I.push(de?Ee.replace(ol,"$1"):Z||z)}),I});function Jf(E){if(typeof E=="string"||Bu(E))return E;var I=E+"";return I=="0"&&1/E==-U?"-0":I}function fb(E){if(E!=null){try{return ty.call(E)}catch{}try{return E+""}catch{}}return""}function ISe(E,I){return ai(oe,function(z){var Z="_."+z[0];I&z[1]&&!Nl(E,Z)&&E.push(Z)}),E.sort()}function V9(E){if(E instanceof zn)return E.clone();var I=new jc(E.__wrapped__,E.__chain__);return I.__actions__=kl(E.__actions__),I.__index__=E.__index__,I.__values__=E.__values__,I}function PSe(E,I,z){(z?pc(E,I,z):I===n)?I=1:I=xs(Er(I),0);var Z=E==null?0:E.length;if(!Z||I<1)return[];for(var de=0,Ee=0,Me=ct(Q0(Z/I));de<Z;)Me[Ee++]=Ei(E,de,de+=I);return Me}function RSe(E){for(var I=-1,z=E==null?0:E.length,Z=0,de=[];++I<z;){var Ee=E[I];Ee&&(de[Z++]=Ee)}return de}function OSe(){var E=arguments.length;if(!E)return[];for(var I=ct(E-1),z=arguments[0],Z=E;Z--;)I[Z-1]=arguments[Z];return xd(fr(z)?kl(z):[z],Hs(I,1))}var NSe=cr(function(E,I){return As(E)?dy(E,Hs(I,1,As,!0)):[]}),MSe=cr(function(E,I){var z=Fd(I);return As(z)&&(z=n),As(E)?dy(E,Hs(I,1,As,!0),kt(z,2)):[]}),DSe=cr(function(E,I){var z=Fd(I);return As(z)&&(z=n),As(E)?dy(E,Hs(I,1,As,!0),n,z):[]});function LSe(E,I,z){var Z=E==null?0:E.length;return Z?(I=z||I===n?1:Er(I),Ei(E,I<0?0:I,Z)):[]}function kSe(E,I,z){var Z=E==null?0:E.length;return Z?(I=z||I===n?1:Er(I),I=Z-I,Ei(E,0,I<0?0:I)):[]}function FSe(E,I){return E&&E.length?Ld(E,kt(I,3),!0,!0):[]}function BSe(E,I){return E&&E.length?Ld(E,kt(I,3),!0):[]}function $Se(E,I,z,Z){var de=E==null?0:E.length;return de?(z&&typeof z!="number"&&pc(E,I,z)&&(z=0,Z=de),Od(E,I,z,Z)):[]}function G9(E,I,z){var Z=E==null?0:E.length;if(!Z)return-1;var de=z==null?0:Er(z);return de<0&&(de=xs(Z+de,0)),ag(E,kt(I,3),de)}function W9(E,I,z){var Z=E==null?0:E.length;if(!Z)return-1;var de=Z-1;return z!==n&&(de=Er(z),de=z<0?xs(Z+de,0):La(de,Z-1)),ag(E,kt(I,3),de,!0)}function j9(E){var I=E==null?0:E.length;return I?Hs(E,1):[]}function HSe(E){var I=E==null?0:E.length;return I?Hs(E,U):[]}function USe(E,I){var z=E==null?0:E.length;return z?(I=I===n?1:Er(I),Hs(E,I)):[]}function zSe(E){for(var I=-1,z=E==null?0:E.length,Z={};++I<z;){var de=E[I];Z[de[0]]=de[1]}return Z}function q9(E){return E&&E.length?E[0]:n}function VSe(E,I,z){var Z=E==null?0:E.length;if(!Z)return-1;var de=z==null?0:Er(z);return de<0&&(de=xs(Z+de,0)),Km(E,I,de)}function GSe(E){var I=E==null?0:E.length;return I?Ei(E,0,-1):[]}var WSe=cr(function(E){var I=Yo(E,by);return I.length&&I[0]===E[0]?fy(I):[]}),jSe=cr(function(E){var I=Fd(E),z=Yo(E,by);return I===Fd(z)?I=n:z.pop(),z.length&&z[0]===E[0]?fy(z,kt(I,2)):[]}),qSe=cr(function(E){var I=Fd(E),z=Yo(E,by);return I=typeof I=="function"?I:n,I&&z.pop(),z.length&&z[0]===E[0]?fy(z,n,I):[]});function YSe(E,I){return E==null?"":h$.call(E,I)}function Fd(E){var I=E==null?0:E.length;return I?E[I-1]:n}function XSe(E,I,z){var Z=E==null?0:E.length;if(!Z)return-1;var de=Z;return z!==n&&(de=Er(z),de=de<0?xs(Z+de,0):La(de,Z-1)),I===I?Gc(E,I,de):ag(E,U0,de,!0)}function KSe(E,I){return E&&E.length?dl(E,Er(I)):n}var QSe=cr(Y9);function Y9(E,I){return E&&E.length&&I&&I.length?vy(E,I):E}function ZSe(E,I,z){return E&&E.length&&I&&I.length?vy(E,I,kt(z,2)):E}function JSe(E,I,z){return E&&E.length&&I&&I.length?vy(E,I,n,z):E}var eEe=aa(function(E,I){var z=E==null?0:E.length,Z=SA(E,I);return WS(E,Yo(I,function(de){return bg(de,z)?+de:de}).sort(kO)),Z});function tEe(E,I){var z=[];if(!(E&&E.length))return z;var Z=-1,de=[],Ee=E.length;for(I=kt(I,3);++Z<Ee;){var Me=E[Z];I(Me,Z,E)&&(z.push(Me),de.push(Z))}return WS(E,de),z}function A$(E){return E==null?E:OS.call(E)}function nEe(E,I,z){var Z=E==null?0:E.length;return Z?(z&&typeof z!="number"&&pc(E,I,z)?(I=0,z=Z):(I=I==null?0:Er(I),z=z===n?Z:Er(z)),Ei(E,I,z)):[]}function rEe(E,I){return ub(E,I)}function oEe(E,I,z){return db(E,I,kt(z,2))}function iEe(E,I){var z=E==null?0:E.length;if(z){var Z=ub(E,I);if(Z<z&&Gh(E[Z],I))return Z}return-1}function sEe(E,I){return ub(E,I,!0)}function aEe(E,I,z){return db(E,I,kt(z,2),!0)}function lEe(E,I){var z=E==null?0:E.length;if(z){var Z=ub(E,I,!0)-1;if(Gh(E[Z],I))return Z}return-1}function cEe(E){return E&&E.length?qS(E):[]}function uEe(E,I){return E&&E.length?qS(E,kt(I,2)):[]}function dEe(E){var I=E==null?0:E.length;return I?Ei(E,1,I):[]}
vendor: 5,785 bytes, line 323
323function hEe(E,I,z){return E&&E.length?(I=z||I===n?1:Er(I),Ei(E,0,I<0?0:I)):[]}function fEe(E,I,z){var Z=E==null?0:E.length;return Z?(I=z||I===n?1:Er(I),I=Z-I,Ei(E,I<0?0:I,Z)):[]}function pEe(E,I){return E&&E.length?Ld(E,kt(I,3),!1,!0):[]}function gEe(E,I){return E&&E.length?Ld(E,kt(I,3)):[]}var mEe=cr(function(E){return Hh(Hs(E,1,As,!0))}),yEe=cr(function(E){var I=Fd(E);return As(I)&&(I=n),Hh(Hs(E,1,As,!0),kt(I,2))}),vEe=cr(function(E){var I=Fd(E);return I=typeof I=="function"?I:n,Hh(Hs(E,1,As,!0),n,I)});function bEe(E){return E&&E.length?Hh(E):[]}function CEe(E,I){return E&&E.length?Hh(E,kt(I,2)):[]}function SEe(E,I){return I=typeof I=="function"?I:n,E&&E.length?Hh(E,n,I):[]}function T$(E){if(!(E&&E.length))return[];var I=0;return E=Vc(E,function(z){if(As(z))return I=xs(z.length,I),!0}),Bf(I,function(z){return Yo(E,TS(z))})}function X9(E,I){if(!(E&&E.length))return[];var z=T$(E);return I==null?z:Yo(z,function(Z){return sl(I,n,Z)})}var EEe=cr(function(E,I){return As(E)?dy(E,I):[]}),xEe=cr(function(E){return KS(Vc(E,As))}),wEe=cr(function(E){var I=Fd(E);return As(I)&&(I=n),KS(Vc(E,As),kt(I,2))}),AEe=cr(function(E){var I=Fd(E);return I=typeof I=="function"?I:n,KS(Vc(E,As),n,I)}),TEe=cr(T$);function _Ee(E,I){return QS(E||[],I||[],os)}function IEe(E,I){return QS(E||[],I||[],Yf)}var PEe=cr(function(E){var I=E.length,z=I>1?E[I-1]:n;return z=typeof z=="function"?(E.pop(),z):n,X9(E,z)});function K9(E){var I=me(E);return I.__chain__=!0,I}function REe(E,I){return I(E),E}function UO(E,I){return I(E)}var OEe=aa(function(E){var I=E.length,z=I?E[0]:0,Z=this.__wrapped__,de=function(Ee){return SA(Ee,E)};return I>1||this.__actions__.length||!(Z instanceof zn)||!bg(z)?this.thru(de):(Z=Z.slice(z,+z+(I?1:0)),Z.__actions__.push({func:UO,args:[de],thisArg:n}),new jc(Z,this.__chain__).thru(function(Ee){return I&&!Ee.length&&Ee.push(n),Ee}))});function NEe(){return K9(this)}function MEe(){return new jc(this.value(),this.__chain__)}function DEe(){this.__values__===n&&(this.__values__=u7(this.value()));var E=this.__index__>=this.__values__.length,I=E?n:this.__values__[this.__index__++];return{done:E,value:I}}function LEe(){return this}function kEe(E){for(var I,z=this;z instanceof eb;){var Z=V9(z);Z.__index__=0,Z.__values__=n,I?de.__wrapped__=Z:I=Z;var de=Z;z=z.__wrapped__}return de.__wrapped__=E,I}function FEe(){var E=this.__wrapped__;if(E instanceof zn){var I=E;return this.__actions__.length&&(I=new zn(this)),I=I.reverse(),I.__actions__.push({func:UO,args:[A$],thisArg:n}),new jc(I,this.__chain__)}return this.thru(A$)}function BEe(){return OA(this.__wrapped__,this.__actions__)}var $Ee=Fu(function(E,I,z){_r.call(E,z)?++E[z]:Pd(E,z,1)});function HEe(E,I,z){var Z=fr(E)?qo:sa;return z&&pc(E,I,z)&&(I=n),Z(E,kt(I,3))}function UEe(E,I){var z=fr(E)?Vc:BS;return z(E,kt(I,3))}var zEe=BA(G9),VEe=BA(W9);function GEe(E,I){return Hs(zO(E,I),1)}function WEe(E,I){return Hs(zO(E,I),U)}function jEe(E,I,z){return z=z===n?1:Er(z),Hs(zO(E,I),z)}function Q9(E,I){var z=fr(E)?ai:Rd;return z(E,kt(I,3))}function Z9(E,I){var z=fr(E)?zc:FS;return z(E,kt(I,3))}var qEe=Fu(function(E,I,z){_r.call(E,z)?E[z].push(I):Pd(E,z,[I])});function YEe(E,I,z,Z){E=Xc(E)?E:tE(E),z=z&&!Z?Er(z):0;var de=E.length;return z<0&&(z=xs(de+z,0)),qO(E)?z<=de&&E.indexOf(I,z)>-1:!!de&&Km(E,I,z)>-1}var XEe=cr(function(E,I,z){var Z=-1,de=typeof I=="function",Ee=Xc(E)?ct(E.length):[];return Rd(E,function(Me){Ee[++Z]=de?sl(I,Me,z):mg(Me,I,z)}),Ee}),KEe=Fu(function(E,I,z){Pd(E,z,I)});function zO(E,I){var z=fr(E)?Yo:gy;return z(E,kt(I,3))}function QEe(E,I,z,Z){return E==null?[]:(fr(I)||(I=I==null?[]:[I]),z=Z?n:z,fr(z)||(z=z==null?[]:[z]),GS(E,I,z))}var ZEe=Fu(function(E,I,z){E[z?0:1].push(I)},function(){return[[],[]]});function JEe(E,I,z){var Z=fr(E)?$0:Zw,de=arguments.length<3;return Z(E,kt(I,4),z,de,Rd)}function e1e(E,I,z){var Z=fr(E)?oO:Zw,de=arguments.length<3;return Z(E,kt(I,4),z,de,FS)}function t1e(E,I){var z=fr(E)?Vc:BS;return z(E,WO(kt(I,3)))}function n1e(E){var I=fr(E)?ia:lb;return I(E)}function r1e(E,I,z){(z?pc(E,I,z):I===n)?I=1:I=Er(I);var Z=fr(E)?g$:RA;return Z(E,I)}function o1e(E){var I=fr(E)?m$:Xf;return I(E)}function i1e(E){if(E==null)return 0;if(Xc(E))return qO(E)?Td(E):E.length;var I=Bl(E);return I==Be||I==Se?E.size:ul(E).length}function s1e(E,I,z){var Z=fr(E)?Ym:Ll;return z&&pc(E,I,z)&&(I=n),Z(E,kt(I,3))}var a1e=cr(function(E,I){if(E==null)return[];var z=I.length;return z>1&&pc(E,I[0],I[1])?I=[]:z>2&&pc(I[0],I[1],I[2])&&(I=[I[0]]),GS(E,Hs(I,1),[])}),VO=pO||function(){return Fo.Date.now()};function l1e(E,I){if(typeof I!="function")throw new Ma(s);return E=Er(E),function(){if(--E<1)return I.apply(this,arguments)}}function J9(E,I,z){return I=z?n:I,I=E&&I==null?E.length:I,Pt(E,P,n,n,n,n,I)}function e7(E,I){var z;if(typeof I!="function")throw new Ma(s);return E=Er(E),function(){return--E>0&&(z=I.apply(this,arguments)),E<=1&&(I=n),z}}var _$=cr(function(E,I,z){var Z=y;if(z.length){var de=Fh(z,In(_$));Z|=A}return Pt(E,Z,I,z,de)}),t7=cr(function(E,I,z){var Z=y|v;if(z.length){var de=Fh(z,In(t7));Z|=A}return Pt(I,Z,E,z,de)});function n7(E,I,z){I=z?n:I;var Z=Pt(E,S,n,n,n,n,n,I);return Z.placeholder=n7.placeholder,Z}function r7(E,I,z){I=z?n:I;var Z=Pt(E,w,n,n,n,n,n,I);return Z.placeholder=r7.placeholder,Z}function o7(E,I,z){var Z,de,Ee,Me,He,Ze,Ct=0,Et=!1,It=!1,tn=!0;if(typeof E!="function")throw new Ma(s);I=Bd(I)||0,ji(z)&&(Et=!!z.leading,It="maxWait"in z,Ee=It?xs(Bd(z.maxWait)||0,I):Ee,tn="trailing"in z?!!z.trailing:tn);function _n(Ts){var Wh=Z,Eg=de;return Z=de=n,Ct=Ts,Me=E.apply(Eg,Wh),Me}function Gn(Ts){return Ct=Ts,He=UA($r,I),Et?_n(Ts):Me}function Pr(Ts){var Wh=Ts-Ze,Eg=Ts-Ct,x7=I-Wh;return It?La(x7,Ee-Eg):x7}function Wn(Ts){var Wh=Ts-Ze,Eg=Ts-Ct;return Ze===n||Wh>=I||Wh<0||It&&Eg>=Ee}function $r(){var Ts=VO();if(Wn(Ts))return Wr(Ts);He=UA($r,Pr(Ts))}
vendor: 9,260 bytes, line 323
323function Wr(Ts){return He=n,tn&&Z?_n(Ts):(Z=de=n,Me)}function $u(){He!==n&&Qf(He),Ct=0,Z=Ze=de=He=n}function gc(){return He===n?Me:Wr(VO())}function Hu(){var Ts=VO(),Wh=Wn(Ts);if(Z=arguments,de=this,Ze=Ts,Wh){if(He===n)return Gn(Ze);if(It)return Qf(He),He=UA($r,I),_n(Ze)}return He===n&&(He=UA($r,I)),Me}return Hu.cancel=$u,Hu.flush=gc,Hu}var c1e=cr(function(E,I){return wA(E,1,I)}),u1e=cr(function(E,I,z){return wA(E,Bd(I)||0,z)});function d1e(E){return Pt(E,O)}function GO(E,I){if(typeof E!="function"||I!=null&&typeof I!="function")throw new Ma(s);var z=function(){var Z=arguments,de=I?I.apply(this,Z):Z[0],Ee=z.cache;if(Ee.has(de))return Ee.get(de);var Me=E.apply(this,Z);return z.cache=Ee.set(de,Me)||Ee,Me};return z.cache=new(GO.Cache||qc),z}GO.Cache=qc;function WO(E){if(typeof E!="function")throw new Ma(s);return function(){var I=arguments;switch(I.length){case 0:return!E.call(this);case 1:return!E.call(this,I[0]);case 2:return!E.call(this,I[0],I[1]);case 3:return!E.call(this,I[0],I[1],I[2])}return!E.apply(this,I)}}function h1e(E){return e7(2,E)}var f1e=MO(function(E,I){I=I.length==1&&fr(I[0])?Yo(I[0],Ml(kt())):Yo(Hs(I,1),Ml(kt()));var z=I.length;return cr(function(Z){for(var de=-1,Ee=La(Z.length,z);++de<Ee;)Z[de]=I[de].call(this,Z[de]);return sl(E,this,Z)})}),I$=cr(function(E,I){var z=Fh(I,In(I$));return Pt(E,A,n,I,z)}),i7=cr(function(E,I){var z=Fh(I,In(i7));return Pt(E,_,n,I,z)}),p1e=aa(function(E,I){return Pt(E,R,n,n,n,I)});function g1e(E,I){if(typeof E!="function")throw new Ma(s);return I=I===n?I:Er(I),cr(E,I)}function m1e(E,I){if(typeof E!="function")throw new Ma(s);return I=I==null?0:xs(Er(I),0),cr(function(z){var Z=z[I],de=Uh(z,0,I);return Z&&xd(de,Z),sl(E,this,de)})}function y1e(E,I,z){var Z=!0,de=!0;if(typeof E!="function")throw new Ma(s);return ji(z)&&(Z="leading"in z?!!z.leading:Z,de="trailing"in z?!!z.trailing:de),o7(E,I,{leading:Z,maxWait:I,trailing:de})}function v1e(E){return J9(E,1)}function b1e(E,I){return I$(NA(I),E)}function C1e(){if(!arguments.length)return[];var E=arguments[0];return fr(E)?E:[E]}function S1e(E){return cl(E,f)}function E1e(E,I){return I=typeof I=="function"?I:n,cl(E,f,I)}function x1e(E){return cl(E,d|f)}function w1e(E,I){return I=typeof I=="function"?I:n,cl(E,d|f,I)}function A1e(E,I){return I==null||xA(E,I,$a(I))}function Gh(E,I){return E===I||E!==E&&I!==I}var T1e=Y(hy),_1e=Y(function(E,I){return E>=I}),pb=zS(function(){return arguments}())?zS:function(E){return as(E)&&_r.call(E,"callee")&&!oy.call(E,"callee")},fr=ct.isArray,I1e=dc?Ml(dc):IA;function Xc(E){return E!=null&&jO(E.length)&&!Cg(E)}function As(E){return as(E)&&Xc(E)}function P1e(E){return E===!0||E===!1||as(E)&&Fa(E)==fe}var Ey=mO||$$,R1e=Lf?Ml(Lf):OO;function O1e(E){return as(E)&&E.nodeType===1&&!zA(E)}function N1e(E){if(E==null)return!0;if(Xc(E)&&(fr(E)||typeof E=="string"||typeof E.splice=="function"||Ey(E)||eE(E)||pb(E)))return!E.length;var I=Bl(E);if(I==Be||I==Se)return!E.size;if(HA(E))return!ul(E).length;for(var z in E)if(_r.call(E,z))return!1;return!0}function M1e(E,I){return yg(E,I)}function D1e(E,I,z){z=typeof z=="function"?z:n;var Z=z?z(E,I):n;return Z===n?yg(E,I,n,z):!!Z}function P$(E){if(!as(E))return!1;var I=Fa(E);return I==ve||I==xe||typeof E.message=="string"&&typeof E.name=="string"&&!zA(E)}function L1e(E){return typeof E=="number"&&sA(E)}function Cg(E){if(!ji(E))return!1;var I=Fa(E);return I==Re||I==pe||I==re||I==Ae}function s7(E){return typeof E=="number"&&E==Er(E)}function jO(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=H}function ji(E){var I=typeof E;return E!=null&&(I=="object"||I=="function")}function as(E){return E!=null&&typeof E=="object"}var a7=Sd?Ml(Sd):VS;function k1e(E,I){return E===I||ib(E,I,Vr(I))}function F1e(E,I,z){return z=typeof z=="function"?z:n,ib(E,I,Vr(I),z)}function B1e(E){return l7(E)&&E!=+E}function $1e(E){if(ESe(E))throw new $n(i);return Fi(E)}function H1e(E){return E===null}function U1e(E){return E==null}function l7(E){return typeof E=="number"||as(E)&&Fa(E)==ke}function zA(E){if(!as(E)||Fa(E)!=ot)return!1;var I=Y0(E);if(I===null)return!0;var z=_r.call(I,"constructor")&&I.constructor;return typeof z=="function"&&z instanceof z&&ty.call(z)==rA}var R$=Ed?Ml(Ed):Ir;function z1e(E){return s7(E)&&E>=-H&&E<=H}var c7=kf?Ml(kf):Us;function qO(E){return typeof E=="string"||!fr(E)&&as(E)&&Fa(E)==Pe}function Bu(E){return typeof E=="symbol"||as(E)&&Fa(E)==Ue}var eE=Yw?Ml(Yw):is;function V1e(E){return E===n}function G1e(E){return as(E)&&Bl(E)==Oe}function W1e(E){return as(E)&&Fa(E)==ze}var j1e=Y(Gi),q1e=Y(function(E,I){return E<=I});function u7(E){if(!E)return[];if(Xc(E))return qO(E)?Na(E):kl(E);if(zf&&E[zf])return kh(E[zf]());var I=Bl(E),z=I==Be?Ad:I==Se?dg:tE;return z(E)}function Sg(E){if(!E)return E===0?E:0;if(E=Bd(E),E===U||E===-U){var I=E<0?-1:1;return I*V}return E===E?E:0}function Er(E){var I=Sg(E),z=I%1;return I===I?z?I-z:I:0}function d7(E){return E?ku(Er(E),0,J):0}function Bd(E){if(typeof E=="number")return E;if(Bu(E))return q;if(ji(E)){var I=typeof E.valueOf=="function"?E.valueOf():E;E=ji(I)?I+"":I}if(typeof E!="string")return E===0?E:+E;E=IS(E);var z=$t.test(E);return z||an.test(E)?jw(E.slice(2),z?2:8):Xt.test(E)?q:+E}function h7(E){return Wi(E,Kc(E))}function Y1e(E){return E?ku(Er(E),-H,H):E===0?E:0}function wo(E){return E==null?"":ss(E)}var X1e=Vh(function(E,I){if(HA(I)||Xc(I)){Wi(I,$a(I),E);return}for(var z in I)_r.call(I,z)&&os(E,z,I[z])}),f7=Vh(function(E,I){Wi(I,Kc(I),E)}),YO=Vh(function(E,I,z,Z){Wi(I,Kc(I),E,Z)}),K1e=Vh(function(E,I,z,Z){Wi(I,$a(I),E,Z)}),Q1e=aa(SA);function Z1e(E,I){var z=pg(E);return I==null?z:gg(z,I)}var J1e=cr(function(E,I){E=nr(E);var z=-1,Z=I.length,de=Z>2?I[2]:n;for(de&&pc(I[0],I[1],de)&&(Z=1);++z<Z;)for(var Ee=I[z],Me=Kc(Ee),He=-1,Ze=Me.length;++He<Ze;){var Ct=Me[He],Et=E[Ct];(Et===n||Gh(Et,Uf[Ct])&&!_r.call(E,Ct))&&(E[Ct]=Ee[Ct])}return E}),exe=cr(function(E){return E.push(n,rr),sl(p7,n,E)});function txe(E,I){return sO(E,kt(I,3),ws)}function nxe(E,I){return sO(E,kt(I,3),TA)}function rxe(E,I){return E==null?E:fc(E,kt(I,3),Kc)}function oxe(E,I){return E==null?E:AA(E,kt(I,3),Kc)}function ixe(E,I){return E&&ws(E,kt(I,3))}function sxe(E,I){return E&&TA(E,kt(I,3))}function axe(E){return E==null?[]:rb(E,$a(E))}function lxe(E){return E==null?[]:rb(E,Kc(E))}function O$(E,I,z){var Z=E==null?n:jf(E,I);return Z===n?z:Z}function cxe(E,I){return E!=null&&M9(E,I,$S)}function N$(E,I){return E!=null&&M9(E,I,HS)}var uxe=BO(function(E,I,z){I!=null&&typeof I.toString!="function"&&(I=ry.call(I)),E[I]=z},D$(Qc)),dxe=BO(function(E,I,z){I!=null&&typeof I.toString!="function"&&(I=ry.call(I)),_r.call(E,I)?E[I].push(z):E[I]=[z]},kt),hxe=cr(mg);function $a(E){return Xc(E)?cy(E):ul(E)}function Kc(E){return Xc(E)?cy(E,!0):py(E)}function fxe(E,I){var z={};return I=kt(I,3),ws(E,function(Z,de,Ee){Pd(z,I(Z,de,Ee),Z)}),z}function pxe(E,I){var z={};return I=kt(I,3),ws(E,function(Z,de,Ee){Pd(z,de,I(Z,de,Ee))}),z}var gxe=Vh(function(E,I,z){my(E,I,z)}),p7=Vh(function(E,I,z,Z){my(E,I,z,Z)}),mxe=aa(function(E,I){var z={};if(E==null)return z;var Z=!1;I=Yo(I,function(Ee){return Ee=Kf(Ee,E),Z||(Z=Ee.length>1),Ee}),Wi(E,Xe(E),z),Z&&(z=cl(z,d|h|f,on));for(var de=I.length;de--;)YS(z,I[de]);return z});function yxe(E,I){return g7(E,WO(kt(I)))}var vxe=aa(function(E,I){return E==null?{}:PA(E,I)});function g7(E,I){if(E==null)return{};var z=Yo(Xe(E),function(Z){return[Z]});return I=kt(I),Nd(E,z,function(Z,de){return I(Z,de[0])})}function bxe(E,I,z){I=Kf(I,E);var Z=-1,de=I.length;for(de||(de=1,E=n);++Z<de;){var Ee=E==null?n:E[Jf(I[Z])];Ee===n&&(Z=de,Ee=z),E=Cg(Ee)?Ee.call(E):Ee}return E}function Cxe(E,I,z){return E==null?E:Yf(E,I,z)}function Sxe(E,I,z,Z){return Z=typeof Z=="function"?Z:n,E==null?E:Yf(E,I,z,Z)}var m7=ut($a),y7=ut(Kc);function Exe(E,I,z){var Z=fr(E),de=Z||Ey(E)||eE(E);if(I=kt(I,4),z==null){var Ee=E&&E.constructor;de?z=Z?new Ee:[]:ji(E)?z=Cg(Ee)?pg(Y0(E)):{}:z={}}return(de?ai:ws)(E,function(Me,He,Ze){return I(z,Me,He,Ze)}),z}function xxe(E,I){return E==null?!0:YS(E,I)}function wxe(E,I,z){return E==null?E:XS(E,I,NA(z))}function Axe(E,I,z,Z){return Z=typeof Z=="function"?Z:n,E==null?E:XS(E,I,NA(z),Z)}function tE(E){return E==null?[]:z0(E,$a(E))}function Txe(E){return E==null?[]:z0(E,Kc(E))}function _xe(E,I,z){return z===n&&(z=I,I=n),z!==n&&(z=Bd(z),z=z===z?z:0),I!==n&&(I=Bd(I),I=I===I?I:0),ku(Bd(E),I,z)}function Ixe(E,I,z){return I=Sg(I),z===n?(z=I,I=0):z=Sg(z),E=Bd(E),US(E,I,z)}function Pxe(E,I,z){if(z&&typeof z!="boolean"&&pc(E,I,z)&&(I=z=n),z===n&&(typeof I=="boolean"?(z=I,I=n):typeof E=="boolean"&&(z=E,E=n)),E===n&&I===n?(E=0,I=1):(E=Sg(E),I===n?(I=E,E=0):I=Sg(I)),E>I){var Z=E;E=I,I=Z}if(z||E%1||I%1){var de=aA();return La(E+de*(I-E+wS("1e-"+((de+"").length-1))),I)}return Md(E,I)}var Rxe=Cy(function(E,I,z){return I=I.toLowerCase(),E+(z?v7(I):I)});function v7(E){return M$(wo(E).toLowerCase())}function b7(E){return E=wo(E),E&&E.replace(Ra,eA).replace(Nu,"")}function Oxe(E,I,z){E=wo(E),I=ss(I);var Z=E.length;z=z===n?Z:ku(Er(z),0,Z);var de=z;return z-=I.length,z>=0&&E.slice(z,de)==I}function Nxe(E){return E=wo(E),E&&Xn.test(E)?E.replace(jn,aO):E}function Mxe(E){return E=wo(E),E&&ft.test(E)?E.replace(Qr,"\\$&"):E}var Dxe=Cy(function(E,I,z){return E+(z?"-":"")+I.toLowerCase()}),Lxe=Cy(function(E,I,z){return E+(z?" ":"")+I.toLowerCase()}),kxe=ZS("toLowerCase");
vendor: 14,031 bytes, lines 323-340
323function Fxe(E,I,z){E=wo(E),I=Er(I);var Z=I?Td(E):0;if(!I||Z>=I)return E;var de=(I-Z)/2;return T(sy(de),z)+E+T(Q0(de),z)}function Bxe(E,I,z){E=wo(E),I=Er(I);var Z=I?Td(E):0;return I&&Z<I?E+T(I-Z,z):E}function $xe(E,I,z){E=wo(E),I=Er(I);var Z=I?Td(E):0;return I&&Z<I?T(I-Z,z)+E:E}function Hxe(E,I,z){return z||I==null?I=0:I&&(I=+I),bO(wo(E).replace(Ot,""),I||0)}function Uxe(E,I,z){return(z?pc(E,I,z):I===n)?I=1:I=Er(I),Dd(wo(E),I)}function zxe(){var E=arguments,I=wo(E[0]);return E.length<3?I:I.replace(E[1],E[2])}var Vxe=Cy(function(E,I,z){return E+(z?"_":"")+I.toLowerCase()});function Gxe(E,I,z){return z&&typeof z!="number"&&pc(E,I,z)&&(I=z=n),z=z===n?J:z>>>0,z?(E=wo(E),E&&(typeof I=="string"||I!=null&&!R$(I))&&(I=ss(I),!I&&Hf(E))?Uh(Na(E),0,z):E.split(I,z)):[]}var Wxe=Cy(function(E,I,z){return E+(z?" ":"")+M$(I)});function jxe(E,I,z){return E=wo(E),z=z==null?0:ku(Er(z),0,E.length),I=ss(I),E.slice(z,z+I.length)==I}function qxe(E,I,z){var Z=me.templateSettings;z&&pc(E,I,z)&&(I=n),E=wo(E),I=YO({},I,Z,vn);var de=YO({},I.imports,Z.imports,vn),Ee=$a(de),Me=z0(de,Ee),He,Ze,Ct=0,Et=I.interpolate||Oa,It="__p += '",tn=Jm((I.escape||Oa).source+"|"+Et.source+"|"+(Et===ri?yt:Oa).source+"|"+(I.evaluate||Oa).source+"|$","g"),_n="//# sourceURL="+(_r.call(I,"sourceURL")?(I.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Dh+"]")+` 324`;E.replace(tn,function(Wn,$r,Wr,$u,gc,Hu){return Wr||(Wr=$u),It+=E.slice(Ct,Hu).replace(Vw,wd),$r&&(He=!0,It+=`' + 325__e(`+$r+`) + 326'`),gc&&(Ze=!0,It+=`'; 327`+gc+`; 328__p += '`),Wr&&(It+=`' + 329((__t = (`+Wr+`)) == null ? '' : __t) + 330'`),Ct=Hu+Wn.length,Wn}),It+=`'; 331`;var Gn=_r.call(I,"variable")&&I.variable;if(!Gn)It=`with (obj) { 332`+It+` 333} 334`;else if(ii.test(Gn))throw new $n(a);It=(Ze?It.replace(rt,""):It).replace(Bt,"$1").replace(dn,"$1;"),It="function("+(Gn||"obj")+`) { 335`+(Gn?"":`obj || (obj = {}); 336`)+"var __t, __p = ''"+(He?", __e = _.escape":"")+(Ze?`, __j = Array.prototype.join; 337function print() { __p += __j.call(arguments, '') } 338`:`; 339`)+It+`return __p 340}`;var Pr=S7(function(){return Fn(Ee,_n+"return "+It).apply(n,Me)});if(Pr.source=It,P$(Pr))throw Pr;return Pr}function Yxe(E){return wo(E).toLowerCase()}function Xxe(E){return wo(E).toUpperCase()}function Kxe(E,I,z){if(E=wo(E),E&&(z||I===n))return IS(E);if(!E||!(I=ss(I)))return E;var Z=Na(E),de=Na(I),Ee=cg(Z,de),Me=hc(Z,de)+1;return Uh(Z,Ee,Me).join("")}function Qxe(E,I,z){if(E=wo(E),E&&(z||I===n))return E.slice(0,Lu(E)+1);if(!E||!(I=ss(I)))return E;var Z=Na(E),de=hc(Z,Na(I))+1;return Uh(Z,0,de).join("")}function Zxe(E,I,z){if(E=wo(E),E&&(z||I===n))return E.replace(Ot,"");if(!E||!(I=ss(I)))return E;var Z=Na(E),de=cg(Z,Na(I));return Uh(Z,de).join("")}function Jxe(E,I){var z=N,Z=M;if(ji(I)){var de="separator"in I?I.separator:de;z="length"in I?Er(I.length):z,Z="omission"in I?ss(I.omission):Z}E=wo(E);var Ee=E.length;if(Hf(E)){var Me=Na(E);Ee=Me.length}if(z>=Ee)return E;var He=z-Td(Z);if(He<1)return Z;var Ze=Me?Uh(Me,0,He).join(""):E.slice(0,He);if(de===n)return Ze+Z;if(Me&&(He+=Ze.length-He),R$(de)){if(E.slice(He).search(de)){var Ct,Et=Ze;for(de.global||(de=Jm(de.source,wo(pt.exec(de))+"g")),de.lastIndex=0;Ct=de.exec(Et);)var It=Ct.index;Ze=Ze.slice(0,It===n?He:It)}}else if(E.indexOf(ss(de),He)!=He){var tn=Ze.lastIndexOf(de);tn>-1&&(Ze=Ze.slice(0,tn))}return Ze+Z}function ewe(E){return E=wo(E),E&&Cr.test(E)?E.replace(kn,tA):E}var twe=Cy(function(E,I,z){return E+(z?" ":"")+I.toUpperCase()}),M$=ZS("toUpperCase");function C7(E,I,z){return E=wo(E),I=z?n:I,I===n?lO(E)?nA(E):Kw(E):E.match(I)||[]}var S7=cr(function(E,I){try{return sl(E,n,I)}catch(z){return P$(z)?z:new $n(z)}}),nwe=aa(function(E,I){return ai(I,function(z){z=Jf(z),Pd(E,z,_$(E[z],E))}),E});function rwe(E){var I=E==null?0:E.length,z=kt();return E=I?Yo(E,function(Z){if(typeof Z[1]!="function")throw new Ma(s);return[z(Z[0]),Z[1]]}):[],cr(function(Z){for(var de=-1;++de<I;){var Ee=E[de];if(sl(Ee[0],this,Z))return sl(Ee[1],this,Z)}})}function owe(E){return EA(cl(E,d))}function D$(E){return function(){return E}}function iwe(E,I){return E==null||E!==E?I:E}var swe=$A(),awe=$A(!0);function Qc(E){return E}function L$(E){return zs(typeof E=="function"?E:cl(E,d))}function lwe(E){return qf(cl(E,d))}function cwe(E,I){return sb(E,cl(I,d))}var uwe=cr(function(E,I){return function(z){return mg(z,E,I)}}),dwe=cr(function(E,I){return function(z){return mg(E,z,I)}});function k$(E,I,z){var Z=$a(I),de=rb(I,Z);z==null&&!(ji(I)&&(de.length||!Z.length))&&(z=I,I=E,E=this,de=rb(I,$a(I)));var Ee=!(ji(z)&&"chain"in z)||!!z.chain,Me=Cg(E);return ai(de,function(He){var Ze=I[He];E[He]=Ze,Me&&(E.prototype[He]=function(){var Ct=this.__chain__;if(Ee||Ct){var Et=E(this.__wrapped__),It=Et.__actions__=kl(this.__actions__);return It.push({func:Ze,args:arguments,thisArg:E}),Et.__chain__=Ct,Et}return Ze.apply(E,xd([this.value()],arguments))})}),E}function hwe(){return Fo._===this&&(Fo._=dO),this}function F$(){}function fwe(E){return E=Er(E),cr(function(I){return dl(I,E)})}var pwe=x(Yo),gwe=x(qo),mwe=x(Ym);function E7(E){return S$(E)?TS(Jf(E)):yy(E)}function ywe(E){return function(I){return E==null?n:jf(E,I)}}var vwe=G(),bwe=G(!0);function B$(){return[]}function $$(){return!1}function Cwe(){return{}}function Swe(){return""}function Ewe(){return!0}function xwe(E,I){if(E=Er(E),E<1||E>H)return[];var z=J,Z=La(E,J);I=kt(I),E-=J;for(var de=Bf(Z,I);++z<E;)I(z);return de}function wwe(E){return fr(E)?Yo(E,Jf):Bu(E)?[E]:kl(z9(wo(E)))}function Awe(E){var I=++Wc;return wo(E)+I}var Twe=JS(function(E,I){return E+I},0),_we=Te("ceil"),Iwe=JS(function(E,I){return E/I},1),Pwe=Te("floor");function Rwe(E){return E&&E.length?Dl(E,Qc,hy):n}function Owe(E,I){return E&&E.length?Dl(E,kt(I,2),hy):n}function Nwe(E){return Qw(E,Qc)}function Mwe(E,I){return Qw(E,kt(I,2))}function Dwe(E){return E&&E.length?Dl(E,Qc,Gi):n}function Lwe(E,I){return E&&E.length?Dl(E,kt(I,2),Gi):n}var kwe=JS(function(E,I){return E*I},1),Fwe=Te("round"),Bwe=JS(function(E,I){return E-I},0);function $we(E){return E&&E.length?Qm(E,Qc):0}function Hwe(E,I){return E&&E.length?Qm(E,kt(I,2)):0}return me.after=l1e,me.ary=J9,me.assign=X1e,me.assignIn=f7,me.assignInWith=YO,me.assignWith=K1e,me.at=Q1e,me.before=e7,me.bind=_$,me.bindAll=nwe,me.bindKey=t7,me.castArray=C1e,me.chain=K9,me.chunk=PSe,me.compact=RSe,me.concat=OSe,me.cond=rwe,me.conforms=owe,me.constant=D$,me.countBy=$Ee,me.create=Z1e,me.curry=n7,me.curryRight=r7,me.debounce=o7,me.defaults=J1e,me.defaultsDeep=exe,me.defer=c1e,me.delay=u1e,me.difference=NSe,me.differenceBy=MSe,me.differenceWith=DSe,me.drop=LSe,me.dropRight=kSe,me.dropRightWhile=FSe,me.dropWhile=BSe,me.fill=$Se,me.filter=UEe,me.flatMap=GEe,me.flatMapDeep=WEe,me.flatMapDepth=jEe,me.flatten=j9,me.flattenDeep=HSe,me.flattenDepth=USe,me.flip=d1e,me.flow=swe,me.flowRight=awe,me.fromPairs=zSe,me.functions=axe,me.functionsIn=lxe,me.groupBy=qEe,me.initial=GSe,me.intersection=WSe,me.intersectionBy=jSe,me.intersectionWith=qSe,me.invert=uxe,me.invertBy=dxe,me.invokeMap=XEe,me.iteratee=L$,me.keyBy=KEe,me.keys=$a,me.keysIn=Kc,me.map=zO,me.mapKeys=fxe,me.mapValues=pxe,me.matches=lwe,me.matchesProperty=cwe,me.memoize=GO,me.merge=gxe,me.mergeWith=p7,me.method=uwe,me.methodOf=dwe,me.mixin=k$,me.negate=WO,me.nthArg=fwe,me.omit=mxe,me.omitBy=yxe,me.once=h1e,me.orderBy=QEe,me.over=pwe,me.overArgs=f1e,me.overEvery=gwe,me.overSome=mwe,me.partial=I$,me.partialRight=i7,me.partition=ZEe,me.pick=vxe,me.pickBy=g7,me.property=E7,me.propertyOf=ywe,me.pull=QSe,me.pullAll=Y9,me.pullAllBy=ZSe,me.pullAllWith=JSe,me.pullAt=eEe,me.range=vwe,me.rangeRight=bwe,me.rearg=p1e,me.reject=t1e,me.remove=tEe,me.rest=g1e,me.reverse=A$,me.sampleSize=r1e,me.set=Cxe,me.setWith=Sxe,me.shuffle=o1e,me.slice=nEe,me.sortBy=a1e,me.sortedUniq=cEe,me.sortedUniqBy=uEe,me.split=Gxe,me.spread=m1e,me.tail=dEe,me.take=hEe,me.takeRight=fEe,me.takeRightWhile=pEe,me.takeWhile=gEe,me.tap=REe,me.throttle=y1e,me.thru=UO,me.toArray=u7,me.toPairs=m7,me.toPairsIn=y7,me.toPath=wwe,me.toPlainObject=h7,me.transform=Exe,me.unary=v1e,me.union=mEe,me.unionBy=yEe,me.unionWith=vEe,me.uniq=bEe,me.uniqBy=CEe,me.uniqWith=SEe,me.unset=xxe,me.unzip=T$,me.unzipWith=X9,me.update=wxe,me.updateWith=Axe,me.values=tE,me.valuesIn=Txe,me.without=EEe,me.words=C7,me.wrap=b1e,me.xor=xEe,me.xorBy=wEe,me.xorWith=AEe,me.zip=TEe,me.zipObject=_Ee,me.zipObjectDeep=IEe,me.zipWith=PEe,me.entries=m7,me.entriesIn=y7,me.extend=f7,me.extendWith=YO,k$(me,me),me.add=Twe,me.attempt=S7,me.camelCase=Rxe,me.capitalize=v7,me.ceil=_we,me.clamp=_xe,me.clone=S1e,me.cloneDeep=x1e,me.cloneDeepWith=w1e,me.cloneWith=E1e,me.conformsTo=A1e,me.deburr=b7,me.defaultTo=iwe,me.divide=Iwe,me.endsWith=Oxe,me.eq=Gh,me.escape=Nxe,me.escapeRegExp=Mxe,me.every=HEe,me.find=zEe,me.findIndex=G9,me.findKey=txe,me.findLast=VEe,me.findLastIndex=W9,me.findLastKey=nxe,me.floor=Pwe,me.forEach=Q9,me.forEachRight=Z9,me.forIn=rxe,me.forInRight=oxe,me.forOwn=ixe,me.forOwnRight=sxe,me.get=O$,me.gt=T1e,me.gte=_1e,me.has=cxe,me.hasIn=N$,me.head=q9,me.identity=Qc,me.includes=YEe,me.indexOf=VSe,me.inRange=Ixe,me.invoke=hxe,me.isArguments=pb,me.isArray=fr,me.isArrayBuffer=I1e,me.isArrayLike=Xc,me.isArrayLikeObject=As,me.isBoolean=P1e,me.isBuffer=Ey,me.isDate=R1e,me.isElement=O1e,me.isEmpty=N1e,me.isEqual=M1e,me.isEqualWith=D1e,me.isError=P$,me.isFinite=L1e,me.isFunction=Cg,me.isInteger=s7,me.isLength=jO,me.isMap=a7,me.isMatch=k1e,me.isMatchWith=F1e,me.isNaN=B1e,me.isNative=$1e,me.isNil=U1e,me.isNull=H1e,me.isNumber=l7,me.isObject=ji,me.isObjectLike=as,me.isPlainObject=zA,me.isRegExp=R$,me.isSafeInteger=z1e,me.isSet=c7,me.isString=qO,me.isSymbol=Bu,me.isTypedArray=eE,me.isUndefined=V1e,me.isWeakMap=G1e,me.isWeakSet=W1e,me.join=YSe,me.kebabCase=Dxe,me.last=Fd,me.lastIndexOf=XSe,me.lowerCase=Lxe,me.lowerFirst=kxe,me.lt=j1e,me.lte=q1e,me.max=Rwe,me.maxBy=Owe,me.mean=Nwe,me.meanBy=Mwe,me.min=Dwe,me.minBy=Lwe,me.stubArray=B$,me.stubFalse=$$,me.stubObject=Cwe,me.stubString=Swe,me.stubTrue=Ewe,me.multiply=kwe,me.nth=KSe,me.noConflict=hwe,me.noop=F$,me.now=VO,me.pad=Fxe,me.padEnd=Bxe,me.padStart=$xe,me.parseInt=Hxe,me.random=Pxe,me.reduce=JEe,me.reduceRight=e1e,me.repeat=Uxe,me.replace=zxe,me.result=bxe,me.round=Fwe,me.runInContext=Ge,me.sample=n1e,me.size=i1e,me.snakeCase=Vxe,me.some=s1e,me.sortedIndex=rEe,me.sortedIndexBy=oEe,me.sortedIndexOf=iEe,me.sortedLastIndex=sEe,me.sortedLastIndexBy=aEe,me.sortedLastIndexOf=lEe,me.startCase=Wxe,me.startsWith=jxe,me.subtract=Bwe,me.sum=$we,me.sumBy=Hwe,me.template=qxe,me.times=xwe,me.toFinite=Sg,me.toInteger=Er,me.toLength=d7,me.toLower=Yxe,me.toNumber=Bd,me.toSafeInteger=Y1e,me.toString=wo,me.toUpper=Xxe,me.trim=Kxe,me.trimEnd=Qxe,me.trimStart=Zxe,me.truncate=Jxe,me.unescape=ewe,me.uniqueId=Awe,me.upperCase=twe,me.upperFirst=M$,me.each=Q9,me.eachRight=Z9,me.first=q9,k$(me,function(){var E={};return ws(me,function(I,z){_r.call(me.prototype,z)||(E[z]=I)}),E}(),{chain:!1}),me.VERSION=r,ai(["bind","bindKey","curry","curryRight","partial","partialRight"],function(E){me[E].placeholder=me}),ai(["drop","take"],function(E,I){zn.prototype[E]=function(z){z=z===n?1:xs(Er(z),0);var Z=this.__filtered__&&!I?new zn(this):this.clone();return Z.__filtered__?Z.__takeCount__=La(z,Z.__takeCount__):Z.__views__.push({size:La(z,J),type:E+(Z.__dir__<0?"Right":"")}),Z},zn.prototype[E+"Right"]=function(z){return this.reverse()[E](z).reverse()}}),ai(["filter","map","takeWhile"],function(E,I){var z=I+1,Z=z==$||z==k;zn.prototype[E]=function(de){var Ee=this.clone();return Ee.__iteratees__.push({iteratee:kt(de,3),type:z}),Ee.__filtered__=Ee.__filtered__||Z,Ee}}),ai(["head","last"],function(E,I){var z="take"+(I?"Right":"");zn.prototype[E]=function(){return this[z](1).value()[0]}}),ai(["initial","tail"],function(E,I){var z="drop"+(I?"":"Right");zn.prototype[E]=function(){return this.__filtered__?new zn(this):this[z](1)}}),zn.prototype.compact=function(){return this.filter(Qc)},zn.prototype.find=function(E){return this.filter(E).head()},zn.prototype.findLast=function(E){return this.reverse().find(E)},zn.prototype.invokeMap=cr(function(E,I){return typeof E=="function"?new zn(this):this.map(function(z){return mg(z,E,I)})}),zn.prototype.reject=function(E){return this.filter(WO(kt(E)))},zn.prototype.slice=function(E,I){E=Er(E);var z=this;return z.__filtered__&&(E>0||I<0)?new zn(z):(E<0?z=z.takeRight(-E):E&&(z=z.drop(E)),I!==n&&(I=Er(I),z=I<0?z.dropRight(-I):z.take(I-E)),z)},zn.prototype.takeRightWhile=function(E){return this.reverse().takeWhile(E).reverse()},zn.prototype.toArray=function(){return this.take(J)},ws(zn.prototype,function(E,I){var z=/^(?:filter|find|map|reject)|While$/.test(I),Z=/^(?:head|last)$/.test(I),de=me[Z?"take"+(I=="last"?"Right":""):I],Ee=Z||/^find/.test(I);de&&(me.prototype[I]=function(){var Me=this.__wrapped__,He=Z?[1]:arguments,Ze=Me instanceof zn,Ct=He[0],Et=Ze||fr(Me),It=function($r){var Wr=de.apply(me,xd([$r],He));return Z&&tn?Wr[0]:Wr};Et&&z&&typeof Ct=="function"&&Ct.length!=1&&(Ze=Et=!1);var tn=this.__chain__,_n=!!this.__actions__.length,Gn=Ee&&!tn,Pr=Ze&&!_n;if(!Ee&&Et){Me=Pr?Me:new zn(this);var Wn=E.apply(Me,He);return Wn.__actions__.push({func:UO,args:[It],thisArg:n}),new jc(Wn,tn)}return Gn&&Pr?E.apply(this,He):(Wn=this.thru(It),Gn?Z?Wn.value()[0]:Wn.value():Wn)})}),ai(["pop","push","shift","sort","splice","unshift"],function(E){var I=PS[E],z=/^(?:push|sort|unshift)$/.test(E)?"tap":"thru",Z=/^(?:pop|shift)$/.test(E);me.prototype[E]=function(){var de=arguments;if(Z&&!this.__chain__){var Ee=this.value();return I.apply(fr(Ee)?Ee:[],de)}return this[z](function(Me){return I.apply(fr(Me)?Me:[],de)})}}),ws(zn.prototype,function(E,I){var z=me[I];if(z){var Z=z.name+"";_r.call(fg,Z)||(fg[Z]=[]),fg[Z].push({name:I,func:z})}}),fg[vg(n,v).name]=[{name:"wrapper",func:n}],zn.prototype.clone=al,zn.prototype.reverse=SO,zn.prototype.value=EO,me.prototype.at=OEe,me.prototype.chain=NEe,me.prototype.commit=MEe,me.prototype.next=DEe,me.prototype.plant=kEe,me.prototype.reverse=FEe,me.prototype.toJSON=me.prototype.valueOf=me.prototype.value=BEe,me.prototype.first=me.prototype.head,zf&&(me.prototype[zf]=LEe),me},Bh=Si();Uc?((Uc.exports=Bh)._=Bh,Df._=Bh):Fo._=Bh}).call(Ac)}
340)(jL,jL.exports);var Tt=jL.exports,zW={},n5={};const V9e=Kp(Cke);var eQ;function yr(){return eQ||(eQ=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=V9e}(n5)),n5}const vr=Kp(cAe);var G9e=hr;Object.defineProperty(zW,"__esModule",{value:!0});var oue=zW.default=void 0,W9e=G9e(yr()),j9e=vr;oue=zW.default=(0,W9e.default)((0,j9e.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home");var VW={},q9e=hr;Object.defineProperty(VW,"__esModule",{value:!0});var iue=VW.default=void 0,Y9e=q9e(yr()),tQ=vr;iue=VW.default=(0,Y9e.default)([(0,tQ.jsx)("path",{d:"M17 11c.34 0 .67.04 1 .09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55-.69-.98-1.1-2.17-1.1-3.45 0-3.31 2.69-6 6-6"},"0"),(0,tQ.jsx)("path",{d:"M17 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 1.38c.62 0 1.12.51 1.12 1.12s-.51 1.12-1.12 1.12-1.12-.51-1.12-1.12.5-1.12 1.12-1.12m0 5.37c-.93 0-1.74-.46-2.24-1.17.05-.72 1.51-1.08 2.24-1.08s2.19.36 2.24 1.08c-.5.71-1.31 1.17-2.24 1.17"},"1")],"AdminPanelSettings");const X9e=({openNavigationMenu:t,setOpenNavigationMenu:e,isAdmin:n})=>{const r=()=>e(null),o=Za(),i=u0(),s=i.pathname===un.projects.path,a=i.pathname.includes(un.admin.path),l="Navigate",c="Projects",u="Admin",d="Current Page",h=s?d:c,f=a?d:u,p=()=>g(le,{sx:{height:"1px",backgroundColor:Zs,width:"140px",margin:"5px 5px"}});return C.useEffect(()=>{r()},[i]),K(Es,{open:!!t,anchorEl:t,onClose:r,disableEnforceFocus:!0,children:[g(Ke,{fontWeight:700,sx:{ml:"5px"},children:l}),K(iw,{disablePadding:!0,children:[g(RC,{title:h,sx:{padding:"5px 0",display:"block"},children:K(WI,{onClick:()=>{s||o(un.projects.path)},selected:s,children:[g(ff,{sx:{minWidth:0,mr:"10px",alignContent:"left"},children:g(oue,{})}),g(Il,{primary:c,sx:{justifyContent:"left"}})]})}),n&&K(gr,{children:[g(p,{}),g(RC,{title:f,sx:{padding:"5px 0",display:"block"},children:K(WI,{onClick:()=>{a||o(un.admin.path)},selected:a,children:[g(ff,{sx:{minWidth:0,mr:"10px",justifyContent:"left"},children:g(iue,{})}),g(Il,{primary:u,sx:{justifyContent:"left"}})]})})]})]})]})},C0=async({dispatch:t,api:e,endpointName:n,queryArg:r,requestBody:o,queryFulfilled:i})=>{const s=t(e.util.updateQueryData(n,r,a=>{const l=a,c=l.findIndex(u=>u.id===o.id);c>=0&&(l[c]=o)}));try{await i}catch{s.undo()}},fR=async({dispatch:t,api:e,endpointName:n,queryArg:r,queryFulfilled:o,id:i})=>{const s=t(e.util.updateQueryData(n,r,a=>{const l=a,c=l.findIndex(u=>u.id===i);c>=0&&l.splice(c,1)}));try{await o}catch{s.undo()}},qL="getAllProjectComponentNcnocRouterByProjectId",QI=Nr.injectEndpoints({endpoints:t=>({getAllProjectComponentNcnocRouterByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectComponentNcnocRouters}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectComponentNcnocRouters],transformResponse:(e,n,r)=>e}),createProjectComponentNcnocRouter:t.mutation({query:({projectId:e,subtopologyId:n})=>({url:`${dt.projectComponentNcnocRouters}`,method:nn.POST,body:{projectId:e,subtopologyId:n}}),transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectValidator,We.ProjectRoutes,We.RoutingTable,We.ProjectComponentsTree,We.ProjectRegister,We.ProjectComponents]}),updateProjectComponentNcnocRouter:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentNcnocRouters}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){await C0({dispatch:n,api:QI,endpointName:qL,queryArg:{projectId:e.projectId},requestBody:e,queryFulfilled:r})}}),deleteProjectComponentNcnocRouter:t.mutation({query:({id:e,projectId:n})=>({url:`${dt.projectComponentNcnocRouters}?id=${e}&projectId=${n}`,method:nn.DELETE}),async onQueryStarted({id:e,projectId:n},{dispatch:r,queryFulfilled:o}){await fR({dispatch:r,api:QI,endpointName:qL,queryArg:{projectId:n},queryFulfilled:o,id:e})}})})}),{useGetAllProjectComponentNcnocRouterByProjectIdQuery:GW,useCreateProjectComponentNcnocRouterMutation:K9e,useUpdateProjectComponentNcnocRouterMutation:Q9e,useDeleteProjectComponentNcnocRouterMutation:e6t}=QI,_s=Nr.injectEndpoints({endpoints:t=>({getDockerImageVersion:t.query({query:()=>
340`${dt.version}`,providesTags:["Version"],transformResponse:(e,n,r)=>e}),getComponents:t.query({query:e=>`${dt.projectComponents.base}/${e}`,providesTags:["ProjectComponents"],transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.status}),createProjectComponent:t.mutation({query:({projectId:e,component:n,componentTreeElement:r,addToMatrix:o,newConnections:i})=>({url:`${dt.projectComponents.base}/${e}`,method:"POST",body:{component:n,componentTreeElement:r,addToMatrix:o,newConnections:i}}),async onQueryStarted({projectId:e,component:n,componentTreeElement:r,addToMatrix:o,newConnections:i},{dispatch:s,queryFulfilled:a}){const l=s(_s.util.updateQueryData("getComponents",e,h=>{h[n.type].push(n)})),c=s(_s.util.updateQueryData("getConnections",e,h=>{i&&i.length&&i.forEach(f=>{h[f.type].push(f)})})),u=s(_s.util.updateQueryData("getProjectComponentsTree",e,h=>{h.data.push(r)})),d=s(_s.util.updateQueryData("getComponentsMatrix",e,h=>{if(o&&o.length&&n.type!==Kt.componentTypes.routers)if(n.type===Kt.componentTypes.initiators)h.data[n.id]=o.map(({id:f,latency:p,status:m,targetId:y,...v})=>({id:f,latency:p,status:m,targetId:y}));else for(const f in h.data)h.data.hasOwnProperty(f)&&h.data[f].push({...o[0],targetId:o[0].targetId})}));try{await a}catch{l.undo(),c.undo(),u.undo(),d.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectValidator","ProjectRoutes","RoutingTable",We.ProjectRegister,We.ProjectNcnocSystem]}),createBulkProjectComponents:t.mutation({query:e=>({url:`${dt.projectComponents.base}/${e[0].projectId}/bulk-components`,method:"POST",body:e}),async onQueryStarted(e,{dispatch:n,queryFulfilled:r}){const o=e[0].projectId,i=n(_s.util.updateQueryData("getComponents",o,a=>{e.forEach(l=>{a[l.component.type].push(l.component)})})),s=n(_s.util.updateQueryData("getProjectComponentsTree",o,a=>{e.forEach(l=>{a.data.push(l.componentTreeElement)})}));try{await r}catch{i.undo(),s.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectValidator","ProjectRoutes","RoutingTable",We.ProjectRegister,We.ProjectNcnocSystem]}),updateProjectComponent:t.mutation({query:({projectId:e,component:n,coordinatesOnly:r=!1})=>({url:`${dt.projectComponents.base}/${e}`,method:"PUT",body:{component:n,coordinatesOnly:r}}),async onQueryStarted({projectId:e,component:n},{dispatch:r,queryFulfilled:o}){const i=r(_s.util.updateQueryData("getComponents",e,s=>{s[n.type]=s[n.type].map(a=>a.id===n.id?n:a)}));try{await o}catch{i.undo()}n.type===Fe.ROUTERS&&await C0({dispatch:r,api:QI,endpointName:qL,queryArg:{projectId:e},requestBody:n,queryFulfilled:o})},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectValidator","ProjectRoutes",We.ProjectRegister,We.ProjectNcnocSystem]}),updateMultipleProjectComponents:t.mutation({query:({projectId:e,components:n})=>({url:`${dt.projectComponents.base}/${e}/${dt.projectComponents.multipleComponents}`,method:"PUT",body:{components:n.length?n.map(({idx:r,...o})=>(delete o.componentId,o)):[]}}),async onQueryStarted({projectId:e,components:n},{dispatch:r,queryFulfilled:o}){const i=r(_s.util.updateQueryData("getComponents",e,s=>{n.length&&n.forEach(({index:a,...l})=>{const c=s[l.type].findIndex(u=>u.id===l.id);c!==-1&&(s[l.type][c]=l)})}));try{await o}catch{i.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectComponents"]}),deleteComponent:t.mutation({query:({componentId:e,type:n,projectId:r,invalidateConnections:o,invalidateComponents:i})=>({url:`${dt.projectComponents.base}/${r}`,method:"DELETE",body:{componentId:e,type:n,invalidateConnections:o?Object.keys(o):[],invalidateComponents:i?Object.keys(i):[]}}),async onQueryStarted({componentId:e,type:n,projectId:r,invalidateConnections:o,invalidateComponents:i},{dispatch:s,queryFulfilled:a}){const l=s(_s.util.updateQueryData("getConnections",r,h=>{!o||!Object.keys(o).length||(h.initiators=h.initiators.filter(f=>!o[f.id]),h.targets=h.targets.filter(f=>!o[f.id]),h.routers=h.routers.filter(f=>!o[f.id]),h.bridges=h.bridges.filter(f=>!o[f.id]))})),c=s(_s.util.updateQueryData("getComponents",r,h=>{!i||!Object.keys(i).length||(h.initiators=h.initiators.filter(f=>!i[f.id]),h.targets=h.targets.filter(f=>!i[f.id]),h.routers=h.routers.filter(f=>!i[f.id]),h.bridges=h.bridges.filter(f=>!i[f.id]),h.virtualTargets=h.virtualTargets.filter(f=>!i[f.id]))})),u=s(_s.util.updateQueryData("getProjectComponentsTree",r,h=>{h.data=h.data.filter(f=>f.relationId!==e)})),d=s(_s.util.updateQueryData("getComponentsMatrix",r,h=>{if(Kt.excludeForIdConversion.includes(n))return h;n!==Kt.componentTypes.routers&&h.data&&Object.keys(h.data).length&&(n===Kt.componentTypes.initiators?delete h.data[e]:h.data=Object.keys(h.data).reduce((f,p)=>(f[p]=h.data[p].filter(m=>m.targetId!==e),f),{}))}));try{await a}catch{c.undo(),l.undo(),u.undo(),d.undo()}n===Fe.ROUTERS&&await fR({dispatch:s,api:QI,endpointName:qL,queryArg:{projectId:r},queryFulfilled:a,id:e})},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectComponentsReachability","ProjectValidator","ProjectRoutes","ProjectComponents","ProjectComponentsTree","RoutingTable",We.ProjectRegister,We.ProjectNcnocSystem]}),createComponentAndConnection:t.mutation({query:({projectId:e,component:n,componentTreeElement:r,addToMatrix:o,connection:i})=>({url:`${dt.projectComponents.base}/${e}
340/${dt.projectComponents.componentAndConnection}`,method:"POST",body:{component:n,componentTreeElement:r,addToMatrix:o,connection:i}}),async onQueryStarted({projectId:e,component:n,componentTreeElement:r,addToMatrix:o,connection:i},{dispatch:s,queryFulfilled:a}){const l=s(_s.util.updateQueryData("getComponents",e,d=>{d[n.type].push(n)})),c=s(_s.util.updateQueryData("getProjectComponentsTree",e,d=>{d.data.push(r)})),u=s(_s.util.updateQueryData("getComponentsMatrix",e,d=>{if(o&&o.length&&n.type!==Kt.componentTypes.routers)if(n.type===Kt.componentTypes.initiators)d.data[n.id]=o.map(({id:h,latency:f,status:p,targetId:m,...y})=>({id:h,latency:f,status:p,targetId:m}));else for(const h in d.data)d.data.hasOwnProperty(h)&&d.data[h].push({...o[0],targetId:o[0].targetId})}));try{await a}catch{l.undo(),c.undo(),u.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectComponentsReachability","ProjectValidator","ProjectRoutes","RoutingTable","ProjectComponents"]}),getProjectComponentsTree:t.query({query:e=>`${dt.projectComponentsTree}/${e}`,providesTags:["ProjectComponentsTree"],transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.status}),updateProjectTreeComponentParent:t.mutation({query:({projectId:e,treeElementRelation:n,newParentId:r})=>({url:`${dt.projectComponentsTree}/${e}/`,method:"PUT",body:{treeElementRelation:n,newParentId:r}}),async onQueryStarted({projectId:e,treeElementRelation:n,newParentId:r},{dispatch:o,queryFulfilled:i}){const s=o(_s.util.updateQueryData("getProjectComponentsTree",e,a=>{a.data=a.data.map(l=>l.relationId===n?{...l,parent:r}:l)}));try{await i}catch{s.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectValidator"]}),getConnections:t.query({query:e=>`${dt.projectConnections}/${e}`,providesTags:["Connections"],transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.status}),createConnection:t.mutation({query:({connection:e,invalidatedConnections:n})=>({url:`${dt.projectConnections}/${e.projectId}`,method:"POST",body:{connection:e,invalidatedConnections:n}}),async onQueryStarted({connection:e,invalidatedConnections:n},{dispatch:r,queryFulfilled:o}){const i=r(_s.util.updateQueryData("getConnections",e.projectId,s=>{if(Object.keys(n).length)for(const a in s)s[a]=s[a].reduce((l,c)=>(n[c.id]||l.push(c),l),[]);s[e.type].push(e)}));try{await o}catch{i.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectComponentsReachability","ProjectValidator","ProjectRoutes","RoutingTable",We.ProjectRegister]}),deleteConnection:t.mutation({query:({connectionId:e,type:n,projectId:r})=>({url:`${dt.projectConnections}/${r}`,method:"DELETE",body:{connectionId:e,type:n}}),async onQueryStarted({connectionId:e,type:n,projectId:r},{dispatch:o,queryFulfilled:i}){const s=o(_s.util.updateQueryData("getConnections",r,a=>{a[n]=a[n].filter(l=>l.id!==e)}));try{await i}catch{s.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:["ProjectComponentsReachability","ProjectValidator","ProjectRoutes","RoutingTable",We.ProjectRegister]}),getComponentsMatrix:t.query({providesTags:["ProjectComponentsMatrix"],query:e=>`${dt.componentsMatrix}/${e}`,transformResponse:(e,n,r)=>({data:e}),transformErrorResponse:(e,n,r)=>e.status}),updateMatrix:t.mutation({query:({matrixId:e,field:n,value:r,...o})=>({url:dt.componentsMatrix,method:"PUT",body:{matrixId:e,field:n,value:r}}),async onQueryStarted({projectId:e,matrixId:n,field:r,value:o,initiatorId:i},{dispatch:s,queryFulfilled:a}){const l=s(_s.util.updateQueryData("getComponentsMatrix",e,c=>{c.data[i]=c.data[i].map(u=>(u.id===n&&(u[r]=o),u))}));try{await a}catch{l.undo()}},transformResponse:e=>e,transformErrorResponse:e=>e}),getComponentsReachability:t.query({providesTags:["ProjectComponentsReachability"],query:({componentId:e,projectId:n,column:r})=>({url:`${dt.projectComponentsReachability}/${n}/${e}/${r}`}),transformResponse:e=>e}),getComponentsReachabilityByProjectId:t.query({providesTags:["ProjectComponentsReachability"],query:e=>({url:`${dt.projectComponentsReachability}/${e}`}),transformResponse:e=>e}),updateComponentsReachability:t.mutation({query:({items:e,projectId:n})=>({url:`${dt.projectComponentsReachability}/${n}`,method:"PUT",body:e}),transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:(e,n,r)=>[{type:"ProjectComponentsReachability",...r},"ProjectValidator","ProjectRoutes","RoutingTable"]}),getProjectValidation:t.query({providesTags:["ProjectValidator"],query:({projectId:e,groupId:n})=>`${dt.validateProject}/${e}?groupId=${n}`,transformResponse:e=>e}),getProjectRoutes:t.query({query:e=>`${dt.projectRoutes}/${e}`,providesTags:(e,n,r)=>e?[...e.map(o=>({type:"ProjectRoutes",id:o.connectionId})),"ProjectRoutes"]:["ProjectRoutes"],transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e.status}),updateProjectRoutesDisabledStatus:t.mutation({query:({projectId:e,id:n,componentType:r,componentId:o,disabled:i})=>({url:`${dt.projectRoutes}/${e}`,method:"PUT",body:{id:n,componentType:r,componentId:o,disabled:i}}),async onQueryStarted({projectId:e,id:n,componentType:r,componentId:o,disabled:i},{dispatch:s,queryFulfilled:a}){const l=s(_s.util.updateQueryData("getProjectRoutes",e,c=>{c.map(u=>(u.projectId===e&&u.id===n&&(u[r][o].disabled=i),u))}));try{await a}catch{l.undo()}},transformResponse:(e,n,r)=>e,transformErrorResponse:(e,n,r)=>e,invalidatesTags:(e,n,r)=>[{type:"ProjectRoutes",id:r.id},"ProjectValidator"]})})}),{useGetComponentsQuery:nl,useCreateProjectComponentMutation:WW,useCreateBulkProjectComponentsMutation:t6t,useUpdateProjectComponentMutation:nS,useUpd
340ateMultipleProjectComponentsMutation:Z9e,useDeleteComponentMutation:jW,useCreateComponentAndConnectionMutation:sue,useGetConnectionsQuery:Rm,useCreateConnectionMutation:aue,useDeleteConnectionMutation:J9e,useUpdateProjectTreeComponentParentMutation:qW,useGetProjectComponentsTreeQuery:aw,useGetComponentsMatrixQuery:n6t,useUpdateMatrixMutation:r6t,useGetComponentsReachabilityQuery:e7e,useGetComponentsReachabilityByProjectIdQuery:lue,useUpdateComponentsReachabilityMutation:cue,useGetProjectValidationQuery:t7e,useGetProjectRoutesQuery:n7e,useUpdateProjectRoutesDisabledStatusMutation:o6t,useGetDockerImageVersionQuery:uue}=_s,r7e="/assets/inoculator_favicon-ea1e4209.svg",due=({isUserLoggedIn:t})=>{const e=Za();return g(le,{component:"img",src:r7e,alt:"Inoculator Favicon",sx:{height:20,display:"flex",alignItems:"center",padding:"6px",borderRadius:1,boxSizing:"content-box",cursor:t?"pointer":"default","&:hover":t?{backgroundColor:Zs}:"transparent"},onClick:()=>t?e(un.projects.path):null})},rn=({title:t,placement:e="right",children:n,...r})=>g(pW,{title:t&&g("span",{style:{fontSize:"12px",whiteSpace:"pre-line"},children:t}),placement:e,disableInteractive:!0,leaveDelay:0,...r,children:g(le,{component:"span",children:n})}),Qo=({icon:t,sxPropsOverride:e,...n})=>g(Di,{sx:{padding:"6px",color:Ef,"&.Mui-disabled":{color:Zs},...e},...n,children:t}),Pi=({tooltipMessage:t,icon:e,isFeatureEnabled:n,handleActionBarButtonClick:r,...o})=>g(rn,{title:t,placement:"bottom",children:g(Qo,{icon:e,disabled:!n,onClick:r,sxPropsOverride:{borderRadius:1,"&:hover":{backgroundColor:Zs}},...o})}),o7e=()=>{const t="Navigation",e="Quick Start Guide",n="Email Support",r="Profile (Not yet available)",o="Log out",i="Go to Log in page",s="Projects",a="Log in",l="mailto:[email protected]",c="https://signature-ip-ai.github.io/inoculator-user-guide/index.html",u=bt(Dc),d=bt(qx),h=bt(Ose),f=bt(Yk),{themeColors:p}=Lc(),{data:m}=uue({}),y=Yn(),v=Za(),b=u0(),S=b.pathname.includes(un.landingPage.path),w=b.pathname.includes(un.userGuide.path),A=f?s:"",[_,P]=C.useState(null),R=C.useCallback(()=>{y(AG({modalKey:"isLogoutModalOpen"}))},[]),O=()=>g(le,{sx:{height:"1px",backgroundColor:Zs}}),N=L=>{L.stopPropagation(),P(L.currentTarget)},M=C.useMemo(()=>{const L=Tt.head(u?.firstName),F=Tt.head(u?.lastName);return L&&F?`${L.toUpperCase()}${F.toUpperCase()}`:""},[u]);return K(le,{children:[K(le,{className:"panel-header",p:1,sx:{width:"100%",backgroundColor:tt},display:"flex",justifyContent:"space-between",alignItems:"center",height:"45px",children:[K(le,{display:"flex",sx:{alignItems:"center"},justifyContent:"space-between",children:[g(rn,{title:A,placement:"bottom",children:g(due,{isUserLoggedIn:f})}),!f&&g(z9e,{sxProps:{pl:1,height:30,ml:"-15px"},alt:"Inoculator Logo Text",hover:!1}),f&&g(Pi,{tooltipMessage:t,icon:g(G6e,{}),isFeatureEnabled:!0,handleActionBarButtonClick:N}),g(X9e,{openNavigationMenu:_,setOpenNavigationMenu:P,isAdmin:d||h})]}),K(le,{display:"flex",height:"50px",sx:{alignItems:"center"},justifyContent:"right",children:[f&&K(gr,{children:[!w&&g(Pi,{tooltipMessage:e,icon:g(W6e,{}),isFeatureEnabled:!0,href:c,target:"_blank"}),g(Pi,{tooltipMessage:n,icon:g(AW,{}),isFeatureEnabled:!0,href:l}),g(Pi,{tooltipMessage:r,icon:g(d5e,{sx:{bgcolor:p.primary[800],width:32,height:32},"aria-label":"profile-avatar",alt:"profile-avatar",children:M}),isFeatureEnabled:!1}),g(Pi,{tooltipMessage:o,icon:g(V6e,{}),isFeatureEnabled:!0,onClick:R})]}),S&&!f?g(rn,{title:i,placement:"bottom",children:g(Sn,{variant:"text",onClick:()=>v(un.login.path),startIcon:g(IW,{}),sx:{color:m9e,px:2,borderRadius:1,"&:hover":{backgroundColor:Zs}},children:a})}):null]})]}),g(O,{}),g(le,{sx:{position:"absolute",bottom:0,left:0,zIndex:3,backgroundColor:tt,px:"2px"},children:m?.inoculatorVersion?g(Ke,{sx:{fontSize:"12px",color:"white",textShadow:"-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000"},children:m?.inoculatorVersion}):null})]})},i7e=()=>{const t=bt(Dc),e=bt(wNe),[n]=u9e(),r=Za(),o=Yn(),i=C.useCallback(()=>{o(Jk())},[]);return K(Iu,{open:e,onClose:i,fullWidth:!0,sx:{"& .MuiPaper-root":{maxWidth:"25vw"}},children:[g(eg,{children:"Are you sure you want to log out?"}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:i,children:"Cancel"}),g(Sn,{color:"error",variant:"contained",onClick:()=>n({id:t.id}).then(()=>{o(qk()),r(un.landingPage.path),i()}),children:"Log out"})]})]})},s7e=Nr.injectEndpoints({endpoints:t=>({getRoutingTable:t.query({query:({projectId:e,routerId:n})=>
vendor: 1,863 bytes, line 340
340`${dt.routingTable}/${e}/${n}`,providesTags:["RoutingTable"],transformResponse:(e,n,r)=>e}),updateRoutingTableRecord:t.mutation({query:e=>({url:`${dt.routingTable}/${e.id}`,method:"PUT",body:e}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:["ProjectValidator","RoutingTable","ProjectRoutes"]})})}),{useGetRoutingTableQuery:a7e,useUpdateRoutingTableRecordMutation:hue}=s7e;var fue={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ac,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var D=["th","st","nd","rd"],k=$%100;return"["+$+(D[(k-20)%10]||D[k]||D[0])+"]"}},S=function($,D,k){var U=String($);return!U||U.length>=D?$:""+Array(D+1-U.length).join(k)+$},w={s:S,z:function($){var D=-$.utcOffset(),k=Math.abs(D),U=Math.floor(k/60),H=k%60;return(D<=0?"+":"-")+S(U,2,"0")+":"+S(H,2,"0")},m:function $(D,k){if(D.date()<k.date())return-$(k,D);var U=12*(k.year()-D.year())+(k.month()-D.month()),H=D.clone().add(U,d),V=k-H<0,q=D.clone().add(U+(V?-1:1),d);return+(-(U+(k-H)/(V?H-q:q-H))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:f,w:u,d:c,D:p,h:l,m:a,s,ms:i,Q:h}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},A="en",_={};_[A]=b;var P="$isDayjsObject",R=function($){return $ instanceof L||!(!$||!$[P])},O=function $(D,k,U){var H;if(!D)return A;
vendor: 3,529 bytes, line 340
340if(typeof D=="string"){var V=D.toLowerCase();_[V]&&(H=V),k&&(_[V]=k,H=V);var q=D.split("-");if(!H&&q.length>1)return $(q[0])}else{var J=D.name;_[J]=D,H=J}return!U&&H&&(A=H),H||!U&&A},N=function($,D){if(R($))return $.clone();var k=typeof D=="object"?D:{};return k.date=$,k.args=arguments,new L(k)},M=w;M.l=O,M.i=R,M.w=function($,D){return N($,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var L=function(){function $(k){this.$L=O(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[P]=!0}var D=$.prototype;return D.parse=function(k){this.$d=function(U){var H=U.date,V=U.utc;if(H===null)return new Date(NaN);if(M.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var q=H.match(y);if(q){var J=q[2]-1||0,Q=(q[7]||"0").substring(0,3);return V?new Date(Date.UTC(q[1],J,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Q)):new Date(q[1],J,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Q)}}return new Date(H)}(k),this.init()},D.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},D.$utils=function(){return M},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(k,U){var H=N(k);return this.startOf(U)<=H&&H<=this.endOf(U)},D.isAfter=function(k,U){return N(k)<this.startOf(U)},D.isBefore=function(k,U){return this.endOf(U)<N(k)},D.$g=function(k,U,H){return M.u(k)?this[U]:this.set(H,k)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(k,U){var H=this,V=!!M.u(U)||U,q=M.p(k),J=function(we,xe){var ve=M.w(H.$u?Date.UTC(H.$y,xe,we):new Date(H.$y,xe,we),H);return V?ve:ve.endOf(c)},Q=function(we,xe){return M.w(H.toDate()[we].apply(H.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(xe)),H)},se=this.$W,oe=this.$M,ie=this.$D,ee="set"+(this.$u?"UTC":"");switch(q){case f:return V?J(1,0):J(31,11);case d:return V?J(1,oe):J(0,oe+1);case u:var re=this.$locale().weekStart||0,fe=(se<re?se+7:se)-re;return J(V?ie-fe:ie+(6-fe),oe);case c:case p:return Q(ee+"Hours",0);case l:return Q(ee+"Minutes",1);case a:return Q(ee+"Seconds",2);case s:return Q(ee+"Milliseconds",3);default:return this.clone()}},D.endOf=function(k){return this.startOf(k,!1)},D.$set=function(k,U){var H,V=M.p(k),q="set"+(this.$u?"UTC":""),J=(H={},H[c]=q+"Date",H[p]=q+"Date",H[d]=q+"Month",H[f]=q+"FullYear",H[l]=q+"Hours",H[a]=q+"Minutes",H[s]=q+"Seconds",H[i]=q+"Milliseconds",H)[V],Q=V===c?this.$D+(U-this.$W):U;if(V===d||V===f){var se=this.clone().set(p,1);se.$d[J](Q),se.init(),this.$d=se.set(p,Math.min(this.$D,se.daysInMonth())).$d}else J&&this.$d[J](Q);return this.init(),this},D.set=function(k,U){return this.clone().$set(k,U)},D.get=function(k){return this[M.p(k)]()},D.add=function(k,U){var H,V=this;k=Number(k);var q=M.p(U),J=function(oe){var ie=N(V);return M.w(ie.date(ie.date()+Math.round(oe*k)),V)};if(q===d)return this.set(d,this.$M+k);if(q===f)return this.set(f,this.$y+k);if(q===c)return J(1);if(q===u)return J(7);var Q=(H={},H[a]=r,H[l]=o,H[s]=n,H)[q]||1,se=this.$d.getTime()+k*Q;return M.w(se,this)},D.subtract=function(k,U){return this.add(-1*k,U)},D.format=function(k){var U=this,H=this.$locale();if(!this.isValid())return H.invalidDate||m;var V=k||"YYYY-MM-DDTHH:mm:ssZ",q=M.z(this),J=this.$H,Q=this.$m,se=this.$M,oe=H.weekdays,ie=H.months,ee=H.meridiem,re=function(xe,ve,Re,pe){return xe&&(xe[ve]||xe(U,V))||Re[ve].slice(0,pe)},fe=function(xe){return M.s(J%12||12,xe,"0")}
vendor: 2,879 bytes, line 340
340,we=ee||function(xe,ve,Re){var pe=xe<12?"AM":"PM";return Re?pe.toLowerCase():pe};return V.replace(v,function(xe,ve){return ve||function(Re){switch(Re){case"YY":return String(U.$y).slice(-2);case"YYYY":return M.s(U.$y,4,"0");case"M":return se+1;case"MM":return M.s(se+1,2,"0");case"MMM":return re(H.monthsShort,se,ie,3);case"MMMM":return re(ie,se);case"D":return U.$D;case"DD":return M.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return re(H.weekdaysMin,U.$W,oe,2);case"ddd":return re(H.weekdaysShort,U.$W,oe,3);case"dddd":return oe[U.$W];case"H":return String(J);case"HH":return M.s(J,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return we(J,Q,!0);case"A":return we(J,Q,!1);case"m":return String(Q);case"mm":return M.s(Q,2,"0");case"s":return String(U.$s);case"ss":return M.s(U.$s,2,"0");case"SSS":return M.s(U.$ms,3,"0");case"Z":return q}return null}(xe)||q.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(k,U,H){var V,q=this,J=M.p(U),Q=N(k),se=(Q.utcOffset()-this.utcOffset())*r,oe=this-Q,ie=function(){return M.m(q,Q)};switch(J){case f:V=ie()/12;break;case d:V=ie();break;case h:V=ie()/3;break;case u:V=(oe-se)/6048e5;break;case c:V=(oe-se)/864e5;break;case l:V=oe/o;break;case a:V=oe/r;break;case s:V=oe/n;break;default:V=oe}return H?V:M.a(V)},D.daysInMonth=function(){return this.endOf(d).$D},D.$locale=function(){return _[this.$L]},D.locale=function(k,U){if(!k)return this.$L;var H=this.clone(),V=O(k,U,!0);return V&&(H.$L=V),H},D.clone=function(){return M.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},$}(),F=L.prototype;return N.prototype=F,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function($){F[$[1]]=function(D){return this.$g(D,$[0],$[1])}}),N.extend=function($,D){return $.$i||($(D,L,N),$.$i=!0),N},N.locale=O,N.isDayjs=R,N.unix=function($){return N(1e3*$)},N.en=_[A],N.Ls=_,N.p={},N})})(fue);var l7e=fue.exports;const Ti=ud(l7e);var pue={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ac,function(){return function(n,r,o){n=n||{};var i=r.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(c,u,d,h){return i.fromToBase(c,u,d,h)}o.en.relativeTime=s,i.fromToBase=function(c,u,d,h,f){for(var p,m,y,v=d.$locale().relativeTime||s,b=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],S=b.length,w=0;w<S;w+=1){var A=b[w];
340A.d&&(p=h?o(c).diff(d,A.d,!0):d.diff(c,A.d,!0));var _=(n.rounding||Math.round)(Math.abs(p));if(y=p>0,_<=A.r||!A.r){_<=1&&w>0&&(A=b[w-1]);var P=v[A.l];f&&(_=f(""+_)),m=typeof P=="string"?P.replace("%d",_):P(_,u,A.l,y);break}}if(u)return m;var R=y?v.future:v.past;return typeof R=="function"?R(m):R.replace("%s",m)},i.to=function(c,u){return a(c,u,this,!0)},i.from=function(c,u){return a(c,u,this)};var l=function(c){return c.$u?o.utc():o()};i.toNow=function(c){return this.to(l(this),c)},i.fromNow=function(c){return this.from(l(this),c)}}})})(pue);var c7e=pue.exports;const u7e=ud(c7e);var gue={},kF={};kF.byteLength=f7e;kF.toByteArray=g7e;kF.fromByteArray=v7e;var Sp=[],Gd=[],d7e=typeof Uint8Array<"u"?Uint8Array:Array,r5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var uE=0,h7e=r5.length;uE<h7e;++uE)Sp[uE]=r5[uE],Gd[r5.charCodeAt(uE)]=uE;Gd["-".charCodeAt(0)]=62;Gd["_".charCodeAt(0)]=63;function mue(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function f7e(t){var e=mue(t),n=e[0],r=e[1];return(n+r)*3/4-r}function p7e(t,e,n){return(e+n)*3/4-n}function g7e(t){var e,n=mue(t),r=n[0],o=n[1],i=new d7e(p7e(t,r,o)),s=0,a=o>0?r-4:r,l;for(l=0;l<a;l+=4)e=Gd[t.charCodeAt(l)]<<18|Gd[t.charCodeAt(l+1)]<<12|Gd[t.charCodeAt(l+2)]<<6|Gd[t.charCodeAt(l+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return o===2&&(e=Gd[t.charCodeAt(l)]<<2|Gd[t.charCodeAt(l+1)]>>4,i[s++]=e&255),o===1&&(e=Gd[t.charCodeAt(l)]<<10|Gd[t.charCodeAt(l+1)]<<4|Gd[t.charCodeAt(l+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}function m7e(t){return Sp[t>>18&63]+Sp[t>>12&63]+Sp[t>>6&63]+Sp[t&63]}function y7e(t,e,n){for(var r,o=[],i=e;i<n;i+=3)r=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(m7e(r));return o.join("")}function v7e(t){for(var e,n=t.length,r=n%3,o=[],i=16383,s=0,a=n-r;s<a;s+=i)o.push(y7e(t,s,s+i>a?a:s+i));return r===1?(e=t[n-1],o.push(Sp[e>>2]+Sp[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],o.push(Sp[e>>10]+Sp[e>>4&63]+Sp[e<<2&63]+"=")),o.join("")}var YW={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */YW.read=function(t,e,n,r,o){var i,s,a=o*8-r-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?o-1:0,h=n?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-u)-1,f>>=-u,u+=a;u>0;i=i*256+t[e+d],d+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+t[e+d],d+=h,u-=8);if(i===0)i=1-c;else{if(i===l)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-c}return(f?-1:1)*s*Math.pow(2,i-r)};YW.write=function(t,e,n,r,o,i){var s,a,l,c=i*8-o-1,u=(1<<c)-1,d=u>>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,p=r?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?e+=h/l:e+=h*Math.pow(2,1-d),e*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(e*l-1)*Math.pow(2,o),s=s+d):(a=e*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;t[n+f]=a&255,f+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;t[n+f]=s&255,f+=p,s/=256,c-=8);t[n+f-p]|=m*128};/*! 341 * The buffer module from node.js, for the browser. 342 * 343 * @author Feross Aboukhadijeh <https://feross.org> 344 * @license MIT 345 */(function(t){const e=kF,n=YW,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50;const o=2147483647;t.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const ne=new Uint8Array(1),W={foo:function(){return 42}};return Object.setPrototypeOf(W,Uint8Array.prototype),Object.setPrototypeOf(ne,W),ne.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(ne){if(ne>
vendor: 26,168 bytes, line 345
345o)throw new RangeError('The value "'+ne+'" is invalid for option "size"');const W=new Uint8Array(ne);return Object.setPrototypeOf(W,a.prototype),W}function a(ne,W,j){if(typeof ne=="number"){if(typeof W=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(ne)}return l(ne,W,j)}a.poolSize=8192;function l(ne,W,j){if(typeof ne=="string")return h(ne,W);if(ArrayBuffer.isView(ne))return p(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ne);if(Pe(ne,ArrayBuffer)||ne&&Pe(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(ne,SharedArrayBuffer)||ne&&Pe(ne.buffer,SharedArrayBuffer)))return m(ne,W,j);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ue=ne.valueOf&&ne.valueOf();if(ue!=null&&ue!==ne)return a.from(ue,W,j);const he=y(ne);if(he)return he;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return a.from(ne[Symbol.toPrimitive]("string"),W,j);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ne)}a.from=function(ne,W,j){return l(ne,W,j)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function u(ne,W,j){return c(ne),ne<=0?s(ne):W!==void 0?typeof j=="string"?s(ne).fill(W,j):s(ne).fill(W):s(ne)}a.alloc=function(ne,W,j){return u(ne,W,j)};function d(ne){return c(ne),s(ne<0?0:v(ne)|0)}a.allocUnsafe=function(ne){return d(ne)},a.allocUnsafeSlow=function(ne){return d(ne)};function h(ne,W){if((typeof W!="string"||W==="")&&(W="utf8"),!a.isEncoding(W))throw new TypeError("Unknown encoding: "+W);const j=S(ne,W)|0;let ue=s(j);const he=ue.write(ne,W);return he!==j&&(ue=ue.slice(0,he)),ue}function f(ne){const W=ne.length<0?0:v(ne.length)|0,j=s(W);for(let ue=0;ue<W;ue+=1)j[ue]=ne[ue]&255;return j}function p(ne){if(Pe(ne,Uint8Array)){const W=new Uint8Array(ne);return m(W.buffer,W.byteOffset,W.byteLength)}return f(ne)}function m(ne,W,j){if(W<0||ne.byteLength<W)throw new RangeError('"offset" is outside of buffer bounds');if(ne.byteLength<W+(j||0))throw new RangeError('"length" is outside of buffer bounds');let ue;return W===void 0&&j===void 0?ue=new Uint8Array(ne):j===void 0?ue=new Uint8Array(ne,W):ue=new Uint8Array(ne,W,j),Object.setPrototypeOf(ue,a.prototype),ue}function y(ne){if(a.isBuffer(ne)){const W=v(ne.length)|0,j=s(W);return j.length===0||ne.copy(j,0,0,W),j}if(ne.length!==void 0)return typeof ne.length!="number"||Ue(ne.length)?s(0):f(ne);if(ne.type==="Buffer"&&Array.isArray(ne.data))return f(ne.data)}function v(ne){if(ne>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return ne|0}function b(ne){return+ne!=ne&&(ne=0),a.alloc(+ne)}a.isBuffer=function(W){return W!=null&&W._isBuffer===!0&&W!==a.prototype},a.compare=function(W,j){if(Pe(W,Uint8Array)&&(W=a.from(W,W.offset,W.byteLength)),Pe(j,Uint8Array)&&(j=a.from(j,j.offset,j.byteLength)),!a.isBuffer(W)||!a.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(W===j)return 0;let ue=W.length,he=j.length;for(let Ce=0,Ie=Math.min(ue,he);Ce<Ie;++Ce)if(W[Ce]!==j[Ce]){ue=W[Ce],he=j[Ce];break}return ue<he?-1:he<ue?1:0},a.isEncoding=function(W){switch(String(W).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(W,j){if(!Array.isArray(W))throw new TypeError('"list" argument must be an Array of Buffers');if(W.length===0)return a.alloc(0);let ue;if(j===void 0)for(j=0,ue=0;ue<W.length;++ue)j+=W[ue].length;const he=a.allocUnsafe(j);let Ce=0;for(ue=0;ue<W.length;++ue){let Ie=W[ue];if(Pe(Ie,Uint8Array))Ce+Ie.length>he.length?(a.isBuffer(Ie)||(Ie=a.from(Ie)),Ie.copy(he,Ce)):Uint8Array.prototype.set.call(he,Ie,Ce);else if(a.isBuffer(Ie))Ie.copy(he,Ce);else throw new TypeError('"list" argument must be an Array of Buffers');Ce+=Ie.length}return he};function S(ne,W){if(a.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||Pe(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ne);const j=ne.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&j===0)return 0;let he=!1;for(;;)switch(W){case"ascii":case"latin1":case"binary":return j;case"utf8":case"utf-8":return ot(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j*2;case"hex":return j>>>1;case"base64":return be(ne).length;default:if(he)return ue?-1:ot(ne).length;W=(""+W).toLowerCase(),he=!0}}a.byteLength=S;function w(ne,W,j){let ue=!1;if((W===void 0||W<0)&&(W=0),W>this.length||((j===void 0||j>this.length)&&(j=this.length),j<=0)||(j>>>=0,W>>>=0,j<=W))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return V(this,W,j);case"utf8":case"utf-8":return $(this,W,j);case"ascii":return U(this,W,j);case"latin1":case"binary":return H(this,W,j);case"base64":return F(this,W,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,W,j);default:if(ue)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),ue=!0}}a.prototype._isBuffer=!0;function A(ne,W,j){const ue=ne[W];ne[W]=ne[j],ne[j]=ue}a.prototype.swap16=function(){const W=this.length;if(W%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let j=0;j<W;j+=2)A(this,j,j+1);return this},a.prototype.swap32=function(){const W=this.length;if(W%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let j=0;j<W;j+=4)A(this,j,j+3),A(this,j+1,j+2);return this},a.prototype.swap64=function(){const W=this.length;if(W%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let j=0;j<W;j+=8)A(this,j,j+7),A(this,j+1,j+6),A(this,j+2,j+5),A(this,j+3,j+4);return this},a.prototype.toString=function(){const W=this.length;return W===0?"":arguments.length===0?$(this,0,W):w.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(W){if(!a.isBuffer(W))throw new TypeError("Argument must be a Buffer");return this===W?!0:a.compare(this,W)===0},a.prototype.inspect=function(){let W="";const j=t.INSPECT_MAX_BYTES;return W=this.toString("hex",0,j).replace(/(.{2})/g,"$1 ").trim(),this.length>j&&(W+=" ... "),"<Buffer "+W+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(W,j,ue,he,Ce){if(Pe(W,Uint8Array)&&(W=a.from(W,W.offset,W.byteLength)),!a.isBuffer(W))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof W);if(j===void 0&&(j=0),ue===void 0&&(ue=W?W.length:0),he===void 0&&(he=0),Ce===void 0&&(Ce=this.length),j<0||ue>W.length||he<0||Ce>this.length)throw new RangeError("out of range index");if(he>=Ce&&j>=ue)return 0;if(he>=Ce)return-1;if(j>=ue)return 1;if(j>>>=0,ue>>>=0,he>>>=0,Ce>>>=0,this===W)return 0;let Ie=Ce-he,et=ue-j;const je=Math.min(Ie,et),it=this.slice(he,Ce),xt=W.slice(j,ue);for(let rt=0;rt<je;++rt)if(it[rt]!==xt[rt]){Ie=it[rt],et=xt[rt];break}return Ie<et?-1:et<Ie?1:0};function _(ne,W,j,ue,he){if(ne.length===0)return-1;if(typeof j=="string"?(ue=j,j=0):j>2147483647?j=2147483647:j<-2147483648&&(j=-2147483648),j=+j,Ue(j)&&(j=he?0:ne.length-1),j<0&&(j=ne.length+j),j>=ne.length){if(he)return-1;j=ne.length-1}else if(j<0)if(he)j=0;else return-1;if(typeof W=="string"&&(W=a.from(W,ue)),a.isBuffer(W))return W.length===0?-1:P(ne,W,j,ue,he);if(typeof W=="number")return W=W&255,typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(ne,W,j):Uint8Array.prototype.lastIndexOf.call(ne,W,j):P(ne,[W],j,ue,he);throw new TypeError("val must be string, number or Buffer")}function P(ne,W,j,ue,he){let Ce=1,Ie=ne.length,et=W.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(ne.length<2||W.length<2)return-1;Ce=2,Ie/=2,et/=2,j/=2}function je(xt,rt){return Ce===1?xt[rt]:xt.readUInt16BE(rt*Ce)}let it;if(he){let xt=-1;for(it=j;it<Ie;it++)if(je(ne,it)===je(W,xt===-1?0:it-xt)){if(xt===-1&&(xt=it),it-xt+1===et)return xt*Ce}else xt!==-1&&(it-=it-xt),xt=-1}else for(j+et>Ie&&(j=Ie-et),it=j;it>=0;it--){let xt=!0;for(let rt=0;rt<et;rt++)if(je(ne,it+rt)!==je(W,rt)){xt=!1;break}if(xt)return it}return-1}a.prototype.includes=function(W,j,ue){return this.indexOf(W,j,ue)!==-1},a.prototype.indexOf=function(W,j,ue){return _(this,W,j,ue,!0)},a.prototype.lastIndexOf=function(W,j,ue){return _(this,W,j,ue,!1)};function R(ne,W,j,ue){j=Number(j)||0;const he=ne.length-j;ue?(ue=Number(ue),ue>he&&(ue=he)):ue=he;const Ce=W.length;ue>Ce/2&&(ue=Ce/2);let Ie;for(Ie=0;Ie<ue;++Ie){const et=parseInt(W.substr(Ie*2,2),16);if(Ue(et))return Ie;ne[j+Ie]=et}return Ie}function O(ne,W,j,ue){return Se(ot(W,ne.length-j),ne,j,ue)}function N(ne,W,j,ue){return Se(ce(W),ne,j,ue)}function M(ne,W,j,ue){return Se(be(W),ne,j,ue)}function L(ne,W,j,ue){return Se(Ae(W,ne.length-j),ne,j,ue)}a.prototype.write=function(W,j,ue,he){if(j===void 0)he="utf8",ue=this.length,j=0;else if(ue===void 0&&typeof j=="string")he=j,ue=this.length,j=0;else if(isFinite(j))j=j>>>0,isFinite(ue)?(ue=ue>>>0,he===void 0&&(he="utf8")):(he=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ce=this.length-j;if((ue===void 0||ue>Ce)&&(ue=Ce),W.length>0&&(ue<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");let Ie=!1;for(;;)switch(he){case"hex":return R(this,W,j,ue);case"utf8":case"utf-8":return O(this,W,j,ue);case"ascii":case"latin1":case"binary":return N(this,W,j,ue);case"base64":return M(this,W,j,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,W,j,ue);default:if(Ie)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Ie=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(ne,W,j){return W===0&&j===ne.length?e.fromByteArray(ne):e.fromByteArray(ne.slice(W,j))}function $(ne,W,j){j=Math.min(ne.length,j);const ue=[];let he=W;for(;he<j;){const Ce=ne[he];let Ie=null,et=Ce>239?4:Ce>223?3:Ce>191?2:1;if(he+et<=j){let je,it,xt,rt;switch(et){case 1:Ce<128&&(Ie=Ce);break;case 2:je=ne[he+1],(je&192)===128&&(rt=(Ce&31)<<6|je&63,rt>127&&(Ie=rt));break;case 3:je=ne[he+1],it=ne[he+2],(je&192)===128&&(it&192)===128&&(rt=(Ce&15)<<12|(je&63)<<6|it&63,rt>2047&&(rt<55296||rt>57343)&&(Ie=rt));break;case 4:je=ne[he+1],it=ne[he+2],xt=ne[he+3],(je&192)===128&&(it&192)===128&&(xt&192)===128&&(rt=(Ce&15)<<18|(je&63)<<12|(it&63)<<6|xt&63,rt>65535&&rt<1114112&&(Ie=rt))}}Ie===null?(Ie=65533,et=1):Ie>65535&&(Ie-=65536,ue.push(Ie>>>10&1023|55296),Ie=56320|Ie&1023),ue.push(Ie),he+=et}return k(ue)}const D=4096;function k(ne){const W=ne.length;if(W<=D)return String.fromCharCode.apply(String,ne);let j="",ue=0;for(;ue<W;)j+=String.fromCharCode.apply(String,ne.slice(ue,ue+=D));return j}function U(ne,W,j){let ue="";j=Math.min(ne.length,j);for(let he=W;he<j;++he)ue+=String.fromCharCode(ne[he]&127);return ue}function H(ne,W,j){let ue="";j=Math.min(ne.length,j);for(let he=W;he<j;++he)ue+=String.fromCharCode(ne[he]);return ue}function V(ne,W,j){const ue=ne.length;(!W||W<0)&&(W=0),(!j||j<0||j>ue)&&(j=ue);let he="";for(let Ce=W;Ce<j;++Ce)he+=_e[ne[Ce]];return he}function q(ne,W,j){const ue=ne.slice(W,j);let he="";for(let Ce=0;Ce<ue.length-1;Ce+=2)he+=String.fromCharCode(ue[Ce]+ue[Ce+1]*256);return he}a.prototype.slice=function(W,j){const ue=this.length;W=~~W,j=j===void 0?ue:~~j,W<0?(W+=ue,W<0&&(W=0)):W>ue&&(W=ue),j<0?(j+=ue,j<0&&(j=0)):j>ue&&(j=ue),j<W&&(j=W);const he=this.subarray(W,j);return Object.setPrototypeOf(he,a.prototype),he};function J(ne,W,j){if(ne%1!==0||ne<0)throw new RangeError("offset is not uint");if(ne+W>j)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(W,j,ue){W=W>>>0,j=j>>>0,ue||J(W,j,this.length);let he=this[W],Ce=1,Ie=0;for(;++Ie<j&&(Ce*=256);)he+=this[W+Ie]*Ce;return he},a.prototype.readUintBE=a.prototype.readUIntBE=function(W,j,ue){W=W>>>0,j=j>>>0,ue||J(W,j,this.length);let he=this[W+--j],Ce=1;for(;j>0&&(Ce*=256);)he+=this[W+--j]*Ce;return he},a.prototype.readUint8=a.prototype.readUInt8=function(W,j){return W=W>>>0,j||J(W,1,this.length),this[W]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(W,j){return W=W>>>0,j||J(W,2,this.length),this[W]|this[W+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(W,j){return W=W>>>0,j||J(W,2,this.length),this[W]<<8|this[W+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(W,j){return W=W>>>0,j||J(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+this[W+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(W,j){return W=W>>>0,j||J(W,4,this.length),this[W]*16777216+(this[W+1]<<16|this[W+2]<<8|this[W+3])},a.prototype.readBigUInt64LE=Oe(function(W){W=W>>>0,pe(W,"offset");const j=this[W],ue=this[W+7];(j===void 0||ue===void 0)&&Be(W,this.length-8);const he=j+this[++W]*2**8+this[++W]*2**16+this[++W]*2**24,Ce=this[++W]+this[++W]*2**8+this[++W]*2**16+ue*2**24;return BigInt(he)+(BigInt(Ce)<<BigInt(32))}),a.prototype.readBigUInt64BE=Oe(function(W){W=W>>>0,pe(W,"offset");const j=this[W],ue=this[W+7];(j===void 0||ue===void 0)&&Be(W,this.length-8);const he=j*2**24+this[++W]*2**16+this[++W]*2**8+this[++W],Ce=this[++W]*2**24+this[++W]*2**16+this[++W]*2**8+ue;return(BigInt(he)<<BigInt(32))+BigInt(Ce)}),a.prototype.readIntLE=function(W,j,ue){W=W>>>0,j=j>>>0,ue||J(W,j,this.length);let he=this[W],Ce=1,Ie=0;for(;++Ie<j&&(Ce*=256);)he+=this[W+Ie]*Ce;return Ce*=128,he>=Ce&&(he-=Math.pow(2,8*j)),he},a.prototype.readIntBE=function(W,j,ue){W=W>>>0,j=j>>>0,ue||J(W,j,this.length);let he=j,Ce=1,Ie=this[W+--he];for(;he>0&&(Ce*=256);)Ie+=this[W+--he]*Ce;return Ce*=128,Ie>=Ce&&(Ie-=Math.pow(2,8*j)),Ie},a.prototype.readInt8=function(W,j){return W=W>>>0,j||J(W,1,this.length),this[W]&128?(255-this[W]+1)*-1:this[W]},a.prototype.readInt16LE=function(W,j){W=W>>>0,j||J(W,2,this.length);const ue=this[W]|this[W+1]<<8;return ue&32768?ue|4294901760:ue},a.prototype.readInt16BE=function(W,j){W=W>>>0,j||J(W,2,this.length);const ue=this[W+1]|this[W]<<8;return ue&32768?ue|4294901760:ue},a.prototype.readInt32LE=function(W,j){return W=W>>>0,j||J(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},a.prototype.readInt32BE=function(W,j){return W=W>>>0,j||J(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},a.prototype.readBigInt64LE=Oe(function(W){W=W>>>0,pe(W,"offset");const j=this[W],ue=this[W+7];(j===void 0||ue===void 0)&&Be(W,this.length-8);const he=this[W+4]+this[W+5]*2**8+this[W+6]*2**16+(ue<<24);return(BigInt(he)<<BigInt(32))+BigInt(j+this[++W]*2**8+this[++W]*2**16+this[++W]*2**24)}),a.prototype.readBigInt64BE=Oe(function(W){W=W>>>0,pe(W,"offset");const j=this[W],ue=this[W+7];(j===void 0||ue===void 0)&&Be(W,this.length-8);const he=(j<<24)+this[++W]*2**16+this[++W]*2**8+this[++W];return(BigInt(he)<<BigInt(32))+BigInt(this[++W]*2**24+this[++W]*2**16+this[++W]*2**8+ue)}),a.prototype.readFloatLE=function(W,j){return W=W>>>0,j||J(W,4,this.length),n.read(this,W,!0,23,4)},a.prototype.readFloatBE=function(W,j){return W=W>>>0,j||J(W,4,this.length),n.read(this,W,!1,23,4)},a.prototype.readDoubleLE=function(W,j){return W=W>>>0,j||J(W,8,this.length),n.read(this,W,!0,52,8)},a.prototype.readDoubleBE=function(W,j){return W=W>>>0,j||J(W,8,this.length),n.read(this,W,!1,52,8)};function Q(ne,W,j,ue,he,Ce){if(!a.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>he||W<Ce)throw new RangeError('"value" argument is out of bounds');if(j+ue>ne.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(W,j,ue,he){if(W=+W,j=j>>>0,ue=ue>>>0,!he){const et=Math.pow(2,8*ue)-1;Q(this,W,j,ue,et,0)}let Ce=1,Ie=0;for(this[j]=W&255;++Ie<ue&&(Ce*=256);)this[j+Ie]=W/Ce&255;return j+ue},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(W,j,ue,he){if(W=+W,j=j>>>0,ue=ue>>>0,!he){const et=Math.pow(2,8*ue)-1;Q(this,W,j,ue,et,0)}let Ce=ue-1,Ie=1;for(this[j+Ce]=W&255;--Ce>=0&&(Ie*=256);)this[j+Ce]=W/Ie&255;return j+ue},a.prototype.writeUint8=a.prototype.writeUInt8=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,1,255,0),this[j]=W&255,j+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,2,65535,0),this[j]=W&255,this[j+1]=W>>>8,j+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,2,65535,0),this[j]=W>>>8,this[j+1]=W&255,j+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,4,4294967295,0),this[j+3]=W>>>24,this[j+2]=W>>>16,this[j+1]=W>>>8,this[j]=W&255,j+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,4,4294967295,0),this[j]=W>>>24,this[j+1]=W>>>16,this[j+2]=W>>>8,this[j+3]=W&255,j+4};function se(ne,W,j,ue,he){Re(W,ue,he,ne,j,7);let Ce=Number(W&BigInt(4294967295));ne[j++]=Ce,Ce=Ce>>8,ne[j++]=Ce,Ce=Ce>>8,ne[j++]=Ce,Ce=Ce>>8,ne[j++]=Ce;let Ie=Number(W>>BigInt(32)&BigInt(4294967295));return ne[j++]=Ie,Ie=Ie>>8,ne[j++]=Ie,Ie=Ie>>8,ne[j++]=Ie,Ie=Ie>>8,ne[j++]=Ie,j}function oe(ne,W,j,ue,he){Re(W,ue,he,ne,j,7);let Ce=Number(W&BigInt(4294967295));ne[j+7]=Ce,Ce=Ce>>8,ne[j+6]=Ce,Ce=Ce>>8,ne[j+5]=Ce,Ce=Ce>>8,ne[j+4]=Ce;let Ie=Number(W>>BigInt(32)&BigInt(4294967295));return ne[j+3]=Ie,Ie=Ie>>8,ne[j+2]=Ie,Ie=Ie>>8,ne[j+1]=Ie,Ie=Ie>>8,ne[j]=Ie,j+8}a.prototype.writeBigUInt64LE=Oe(function(W,j=0){return se(this,W,j,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Oe(function(W,j=0){return oe(this,W,j,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(W,j,ue,he){if(W=+W,j=j>>>0,!he){const je=Math.pow(2,8*ue-1);Q(this,W,j,ue,je-1,-je)}let Ce=0,Ie=1,et=0;for(this[j]=W&255;++Ce<ue&&(Ie*=256);)W<0&&et===0&&this[j+Ce-1]!==0&&(et=1),this[j+Ce]=(W/Ie>>0)-et&255;return j+ue},a.prototype.writeIntBE=function(W,j,ue,he){if(W=+W,j=j>>>0,!he){const je=Math.pow(2,8*ue-1);Q(this,W,j,ue,je-1,-je)}let Ce=ue-1,Ie=1,et=0;for(this[j+Ce]=W&255;--Ce>=0&&(Ie*=256);)W<0&&et===0&&this[j+Ce+1]!==0&&(et=1),this[j+Ce]=(W/Ie>>0)-et&255;return j+ue},a.prototype.writeInt8=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,1,127,-128),W<0&&(W=255+W+1),this[j]=W&255,j+1},a.prototype.writeInt16LE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,2,32767,-32768),this[j]=W&255,this[j+1]=W>>>8,j+2},a.prototype.writeInt16BE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,2,32767,-32768),this[j]=W>>>8,this[j+1]=W&255,j+2},a.prototype.writeInt32LE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,4,2147483647,-2147483648),this[j]=W&255,this[j+1]=W>>>8,this[j+2]=W>>>16,this[j+3]=W>>>24,j+4},a.prototype.writeInt32BE=function(W,j,ue){return W=+W,j=j>>>0,ue||Q(this,W,j,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),this[j]=W>>>24,this[j+1]=W>>>16,this[j+2]=W>>>8,this[j+3]=W&255,j+4},a.prototype.writeBigInt64LE=Oe(function(W,j=0){return se(this,W,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Oe(function(W,j=0){return oe(this,W,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ie(ne,W,j,ue,he,Ce){if(j+ue>ne.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("Index out of range")}function ee(ne,W,j,ue,he){return W=+W,j=j>>>0,he||ie(ne,W,j,4),n.write(ne,W,j,ue,23,4),j+4}a.prototype.writeFloatLE=function(W,j,ue){return ee(this,W,j,!0,ue)},a.prototype.writeFloatBE=function(W,j,ue){return ee(this,W,j,!1,ue)};function re(ne,W,j,ue,he){return W=+W,j=j>>>0,he||ie(ne,W,j,8),n.write(ne,W,j,ue,52,8),j+8}a.prototype.writeDoubleLE=function(W,j,ue){return re(this,W,j,!0,ue)},a.prototype.writeDoubleBE=function(W,j,ue){return re(this,W,j,!1,ue)},a.prototype.copy=function(W,j,ue,he){if(!a.isBuffer(W))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!he&&he!==0&&(he=this.length),j>=W.length&&(j=W.length),j||(j=0),he>0&&he<ue&&(he=ue),he===ue||W.length===0||this.length===0)return 0;if(j<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),W.length-j<he-ue&&(he=W.length-j+ue);const Ce=he-ue;return this===W&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(j,ue,he):Uint8Array.prototype.set.call(W,this.subarray(ue,he),j),Ce},a.prototype.fill=function(W,j,ue,he){if(typeof W=="string"){if(typeof j=="string"?(he=j,j=0,ue=this.length):typeof ue=="string"&&(he=ue,ue=this.length),he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!a.isEncoding(he))throw new TypeError("Unknown encoding: "+he);if(W.length===1){const Ie=W.charCodeAt(0);(he==="utf8"&&Ie<128||he==="latin1")&&(W=Ie)}}else typeof W=="number"?W=W&255:typeof W=="boolean"&&(W=Number(W));if(j<0||this.length<j||this.length<ue)throw new RangeError("Out of range index");if(ue<=j)return this;j=j>>>0,ue=ue===void 0?this.length:ue>>>0,W||(W=0);let Ce;if(typeof W=="number")for(Ce=j;Ce<ue;++Ce)this[Ce]=W;else{const Ie=a.isBuffer(W)?W:a.from(W,he),et=Ie.length;if(et===0)throw new TypeError('The value "'+W+'" is invalid for argument "value"');for(Ce=0;Ce<ue-j;++Ce)this[Ce+j]=Ie[Ce%et]}return this};const fe={};function we(ne,W,j){fe[ne]=class extends j{constructor(){super(),Object.defineProperty(this,"message",{value:W.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${ne}]`,this.stack,delete this.name}get code(){return ne}set code(he){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:he,writable:!0})}toString(){return`${this.name} [${ne}]: ${this.message}`}}}we("ERR_BUFFER_OUT_OF_BOUNDS",function(ne){return ne?`${ne} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),we("ERR_INVALID_ARG_TYPE",function(ne,W){return`The "${ne}" argument must be of type number. Received type ${typeof W}`},TypeError),we("ERR_OUT_OF_RANGE",function(ne,W,j){let ue=`The value of "${ne}" is out of range.`,he=j;return Number.isInteger(j)&&Math.abs(j)>2**32?he=xe(String(j)):typeof j=="bigint"&&(he=String(j),(j>BigInt(2)**BigInt(32)||j<-(BigInt(2)**BigInt(32)))&&(he=xe(he)),he+="n"),ue+=` It must be ${W}. Received ${he}`,ue},RangeError);function xe(ne){let W="",j=ne.length;const ue=ne[0]==="-"?1:0;for(;j>=ue+4;j-=3)W=`_${ne.slice(j-3,j)}${W}`;return`${ne.slice(0,j)}${W}`}function ve(ne,W,j){pe(W,"offset"),(ne[W]===void 0||ne[W+j]===void 0)&&Be(W,ne.length-(j+1))}function Re(ne,W,j,ue,he,Ce){if(ne>j||ne<W){const Ie=typeof W=="bigint"?"n":"";let et;throw Ce>3?W===0||W===BigInt(0)?et=`>= 0${Ie} and < 2${Ie} ** ${(Ce+1)*8}${Ie}`:et=`>= -(2${Ie} ** ${(Ce+1)*8-1}${Ie}) and < 2 ** ${(Ce+1)*8-1}${Ie}`:et=`>= ${W}${Ie} and <= ${j}${Ie}`,new fe.ERR_OUT_OF_RANGE("value",et,ne)}ve(ue,he,Ce)}function pe(ne,W){if(typeof ne!="number")throw new fe.ERR_INVALID_ARG_TYPE(W,"number",ne)}function Be(ne,W,j){throw Math.floor(ne)!==ne?(pe(ne,j),new fe.ERR_OUT_OF_RANGE(j||"offset","an integer",ne)):W<0?new fe.ERR_BUFFER_OUT_OF_BOUNDS:new fe.ERR_OUT_OF_RANGE(j||"offset",`>= ${j?1:0} and <= ${W}`,ne)}const ke=/[^+/0-9A-Za-z-_]/g;function Ne(ne){if(ne=ne.split("=")[0],ne=ne.trim().replace(ke,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function ot(ne,W){W=W||1/0;let j;const ue=ne.length;let he=null;const Ce=[];for(let Ie=0;Ie<ue;++Ie){if(j=ne.charCodeAt(Ie),j>55295&&j<57344){if(!he){if(j>56319){(W-=3)>-1&&Ce.push(239,191,189);continue}else if(Ie+1===ue){(W-=3)>-1&&Ce.push(239,191,189);continue}he=j;continue}if(j<56320){(W-=3)>-1&&Ce.push(239,191,189),he=j;continue}j=(he-55296<<10|j-56320)+65536}else he&&(W-=3)>-1&&Ce.push(239,191,189);if(he=null,j<128){if((W-=1)<0)break;Ce.push(j)}else if(j<2048){if((W-=2)<0)break;Ce.push(j>>6|192,j&63|128)}else if(j<65536){if((W-=3)<0)break;Ce.push(j>>12|224,j>>6&63|128,j&63|128)}else if(j<1114112){if((W-=4)<0)break;Ce.push(j>>18|240,j>>12&63|128,j>>6&63|128,j&63|128)}else throw new Error("Invalid code point")}return Ce}function ce(ne){const W=[];for(let j=0;j<ne.length;++j)W.push(ne.charCodeAt(j)&255);return W}function Ae(ne,W){let j,ue,he;const Ce=[];for(let Ie=0;Ie<ne.length&&!((W-=2)<0);++Ie)j=ne.charCodeAt(Ie),ue=j>>8,he=j%256,Ce.push(he),Ce.push(ue);return Ce}function be(ne){return e.toByteArray(Ne(ne))}function Se(ne,W,j,ue){let he;for(he=0;he<ue&&!(he+j>=W.length||he>=ne.length);++he)W[he+j]=ne[he];return he}function Pe(ne,W){return ne instanceof W||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===W.name}function Ue(ne){return ne!==ne}const _e=function(){const ne="0123456789abcdef",W=new Array(256);for(let j=0;j<16;++j){const ue=j*16;for(let he=0;he<16;++he)W[ue+he]=ne[j]+ne[he]}return W}();function Oe(ne){return typeof BigInt>"u"?ze:ne}function ze(){throw new Error("BigInt not supported")}})(gue);const nQ=32,rQ=32,oQ=31,ys={[Fe.ROUTERS]:nQ,[Fe.INITIATORS]:rQ,[Fe.TARGETS]:oQ,[Yt.ROUTER]:nQ,[Yt.INITIATOR]:rQ,[Yt.TARGET]:oQ,[Yt.DEFAULT_TARGET]:1,[Yt.BRIDGE]:128},lT={[Yt.ROUTER]:"Router",[Yt.INITIATOR]:"Initiator",[Yt.TARGET]:"Target",[Yt.DEFAULT_TARGET]:"D.Target",[Yt.BRIDGE]:"Bridge"},cT={[Yt.ROUTER]:`Create Router (max ${ys[Yt.ROUTER]})`,[Yt.INITIATOR]:`Create Initiator (max ${ys[Yt.INITIATOR]})`,[Yt.TARGET]:`Create Target (max ${ys[Yt.TARGET]})`,[Yt.DEFAULT_TARGET]:`Create Default Target (max ${ys[Yt.DEFAULT_TARGET]})`,[Yt.BRIDGE]:`Create Bridge (max ${ys[Yt.BRIDGE]})`},YL={initiators:"Initiator",routers:"Router",targets:"Target",bridges:"Bridge",virtualTargets:"_vdev",defaultTarget:"Default_Target",topologies:"Subto
345pology"},DN=[0,1,2,3,4],XW="#1257fd",hs={BLUE:"#4e79a7",ORANGE:"#f28e2c",RED:"#e15759",CYAN:"#76b7b2",GREEN:"#59a14f",YELLOW:"#edc949",PURPLE:"#af7aa1",PINK:"#ff9da7",BROWN:"#9c755f",GRAY:"#bab0ab"},yue=[{key:0,value:XW},{key:1,value:hs.BLUE},{key:2,value:hs.ORANGE},{key:3,value:hs.RED},{key:4,value:hs.CYAN},{key:5,value:hs.GREEN},{key:6,value:hs.YELLOW},{key:7,value:hs.PURPLE},{key:8,value:hs.PINK},{key:9,value:hs.BROWN},{key:10,value:hs.GRAY}],F_={divider:1e4,defaultColor:"#1257fd"},Rs={leftPanelWidth:240,rightPanelWidth:377.6,headerHeight:46,actionBarHeight:42.563,footerHeight:48},ei={getLeftPanelWidth:t=>t?Rs.leftPanelWidth:0,getRightPanelWidth:t=>t?Rs.rightPanelWidth:0,getCenterPanelWidth:({width:t,isLeftPanelOpen:e,isRightPanelOpen:n})=>t-ei.getLeftPanelWidth(e)-ei.getRightPanelWidth(n),getCenterPanelHeight:t=>t-Rs.headerHeight-Rs.actionBarHeight-Rs.footerHeight,getLeftRightPanelHeight:t=>t-Rs.headerHeight-Rs.actionBarHeight,getAdminPanelHeight:t=>t-Rs.headerHeight-Rs.footerHeight};var ch=(t=>(t[t.GUEST=0]="GUEST",t[t.COLLABORATOR=1]="COLLABORATOR",t[t.CO_OWNER=2]="CO_OWNER",t))(ch||{});const b7e=/^[0-9a-fA-F]{1,8}$/,C7e=/^[0-9a-fA-F]{1,16}$/,S7e=/^[A-Fa-f0-9]*$/,E7e=t=>t===32?b7e:C7e,iQ=t=>t.reduce((e,n)=>{const r=n.x/F_.divider,o=n.y/F_.divider;return e.minX>r&&(e.minX=r),e.maxX<r&&(e.maxX=r),e.minY>o&&(e.minY=o),e.maxY<o&&(e.maxY=o),e},{minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),x7e=(t,e,n,r)=>{if(n==="protocol")switch(r){case wt.AXI:t.parameters.writeTransactionWidth=t.parameters.writeTransactionWidth||WE,t.parameters.readTransactionWidth=t.parameters.readTransactionWidth||WE;break;case wt.AHB:case wt.APB:case wt.SIG_NATIVE:t.parameters.writeTransactionWidth=0,t.parameters.readTransactionWidth=0;break}if(n==="version"||n==="variant")switch(t.parameters.bus.protocol){case wt.AXI:if(t.parameters.bus.version===Co.FOUR&&t.parameters.bus.variant===Ui.LITE){t.parameters.writeTransactionWidth=0,t.parameters.readTransactionWidth=0;break}t.parameters.writeTransactionWidth=t.parameters.writeTransactionWidth||WE,t.parameters.readTransactionWidth=t.parameters.readTransactionWidth||WE;break}r===wt.SIG_NATIVE?(t.parameters.outstandingRead=0,t.parameters.outstandingWrite=0,t.parameters.readReorderBufferSize=RY,t.parameters.writeReorderBufferSize=RY):(t.parameters.outstandingRead=nv,t.parameters.outstandingWrite=nv,t.parameters.readReorderBufferSize=uL,t.parameters.writeReorderBufferSize=uL),t.parameters.isSameClock=t.parameters.isSameClock??!0},w7e=(t,e,n,r)=>{if(n==="protocol"){switch(r){case wt.AXI:t.parameters.writeTransactionWidth=t.parameters.writeTransactionWidth||jE,t.parameters.readTransactionWidth=t.parameters.readTransactionWidth||jE,t.parameters.maxOutstandingWrite=t.parameters.maxOutstandingWrite||nv,t.parameters.maxOutstandingRead=t.parameters.maxOutstandingRead||nv;break;case wt.APB:case wt.AHB:case wt.SEC:case wt.SRAM:case wt.SIG_NATIVE:t.parameters.writeTransactionWidth=0,t.parameters.readTransactionWidth=0,t.parameters.maxOutstandingWrite=0,t.parameters.maxOutstandingRead=0;break}switch(r){case wt.AXI:case wt.APB:case wt.AHB:case wt.SRAM:t.parameters.portDataWidth=t.parameters.portDataWidth?t.parameters.portDataWidth:e.portDataWidth[1].key;break;case wt.SEC:case wt.SIG_NATIVE:t.parameters.portDataWidth=0;break}switch(r){case wt.AXI:case wt.APB:case wt.AHB:case wt.SEC:case wt.SIG_NATIVE:t.parameters.readDataDelay=0,t.parameters.channel=tv.NOT_AVAILABLE;break;case wt.SRAM:t.parameters.readDataDelay=e.readDataDelay[0].key,t.parameters.channel=tv.SINGLE;break}}if(n==="version"||n==="variant")switch(t.parameters.bus.protocol){case wt.AXI:if(t.parameters.bus.variant===Ui.LITE&&t.parameters.bus.version===Co.FOUR){t.parameters.writeTransactionWidth=0,t.parameters.readTransactionWidth=0;break}t.parameters.writeTransactionWidth=t.parameters.writeTransactionWidth||jE,t.parameters.readTransactionWidth=t.parameters.readTransactionWidth||jE;break}t.parameters.isSameClock=t.parameters.isSameClock??!0,t.parameters.isVirtualDevicesEnabled=r===wt.SEC?!1:t.parameters.isVirtualDevicesEnabled},A7e=5*1e3,T7e=5*60*1e3;
345function _7e(t){return new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=n,r.src=t})}const st={projectShouldPoll:t=>({pollingInterval:t?A7e:T7e}),roundDownToGrid:({coordinate:t,grid:e=Ve.gridBlockSize})=>Math.floor(t/e)*e,getProjectNamesById:t=>t.reduce((e,n)=>(e[n.id]=n.name,e),{}),getRoundedComponentCoordinates:({x:t,y:e,scale:n,offsetX:r=0,offsetY:o=0,diagramWidth:i,diagramHeight:s})=>({x:st.roundDownToGrid({coordinate:(-t+i/2)/n})+r,y:st.roundDownToGrid({coordinate:(-e+s/2)/n})+o}),checkNameDuplicates:({elementsCollection:t,itemId:e,idKey:n,nameKey:r="name",name:o})=>!!t.find(i=>e?i[n]!==e&&i[r]===o:i[r]===o),checkComponentNameDuplicates:({namesObj:t,name:e,id:n})=>!!Object.entries(t).find(([r,o])=>r!==n&&o===e),getInitiatorAndTargetConnectionCoordinates:({fromElements:t,toElements:e,fromElementId:n,toElementId:r,portType:o,portIdx:i})=>{let s="";const a=t.find(c=>(!s&&c.type===Kt.componentTypes.initiators&&(s=Kt.componentTypes.initiators),c.id===n)),l=e.find(c=>c.id===r);if(a&&l){const c=l.parameters.ports[o][i],u=l.parameters.ports[o].length,d=l.size.height/u;let h,f,p,m;switch(o){case Kt.gressTypes.inGress:h=a.coordinates.x+Ve.gridBlockSize,f=a.coordinates.y+Ve.gridBlockSize/2,p=l.coordinates.x-Ve.portCircleRadius,m=l.coordinates.y+l.size.nameSize.height+(d/2+d*i);break;case Kt.gressTypes.eGress:h=l.coordinates.x+l.size.width+Ve.portCircleRadius,f=l.coordinates.y+l.size.nameSize.height+(d/2+d*i),p=a.coordinates.x,m=a.coordinates.y+Ve.gridBlockSize/2;break;default:console.log("Unhandled portType in getInitiatorAndTargetConnectionCoordinates",o);break}return s&&(h+=a.size.nameSize.width),{key:`${c.id}-${a.id}`,points:[h,f,p,m]}}return null},transformMousePosition:t=>{if(t.current){const e=t.current,r=e.getAbsoluteTransform().copy();return r.invert(),r.point(e.getPointerPosition())}return{x:0,y:0}},createConnection:({editorMode:t,props:{propKey:e,propId:n,portIdx:r,portType:o},projectId:i})=>{const s={id:Uo(),projectId:i,type:"",parameters:{}};switch(`${t.propKey}-${e}`){case"initiators-routers":s.type="initiators",s.parameters={fromInitiatorId:t.propId,toRouterId:n,toRouterPortIdx:r};break;case"routers-initiators":s.type="initiators",s.parameters={fromInitiatorId:n,toRouterId:t.propId,toRouterPortIdx:t.portIdx};break;case"routers-routers":s.type="routers";const a=t.portType==="eGress";s.parameters={fromId:a?t.propId:n,toId:a?n:t.propId,fromEgressPortIdx:a?t.portIdx:r,toInGressPortIdx:a?r:t.portIdx};break;case"targets-routers":s.type="targets",s.parameters={fromRouterId:n,fromEgressPortIdx:r,toTargetId:t.propId};break;case"routers-targets":s.type="targets",s.parameters={fromRouterId:t.propId,fromEgressPortIdx:t.portIdx,toTargetId:n};break;case"routers-bridges":case"bridges-routers":const l=t.portType==="inGress"||o==="inGress",c=t.portType==="",u=c&&l||!c&&!l;s.type=pi.BRIDGES,s.parameters={[l?"fromBridgeId":"fromRouterId"]:u?t.propId:n,[l?"toRouterId":"toBridgeId"]:u?n:t.propId,routerPortIdx:c?r:t.portIdx};break}return s},invalidateConnections:({connection:t,connections:e})=>{const n={};if(t.type&&t){switch(t.type){case"routers":e.initiators.forEach(r=>{r.parameters.toRouterId!==t.parameters.toId||r.parameters.toRouterPortIdx!==t.parameters.toInGressPortIdx||(n[r.id]=r.id)}),e.targets.forEach(r=>{r.parameters.fromRouterId!==t.parameters.fromId||r.parameters.fromEgressPortIdx!==t.parameters.fromEgressPortIdx||(n[r.id]=r.id)}),e.bridges.forEach(r=>{(r.parameters.fromRouterId===t.parameters.fromId&&r.parameters.routerPortIdx===t.parameters.fromEgressPortIdx||r.parameters.toRouterId===t.parameters.toId&&r.parameters.routerPortIdx===t.parameters.toInGressPortIdx)&&(n[r.id]=r.id)});break;case"initiators":e.routers.forEach(r=>{r.parameters.toId!==t.parameters.toRouterId||r.parameters.toInGressPortIdx!==t.parameters.toRouterPortIdx||(n[r.id]=r.id)}),e.bridges.forEach(r=>{r.parameters.toRouterId!==t.parameters.toRouterId||r.parameters.routerPortIdx!==t.parameters.toRouterPortIdx||(n[r.id]=r.id)});break;case"targets":e.routers.forEach(r=>{r.parameters.fromId!==t.parameters.fromRouterId||r.parameters.fromEgressPortIdx!==t.parameters.fromEgressPortIdx||(n[r.id]=r.id)}
345),e.bridges.forEach(r=>{r.parameters.fromRouterId!==t.parameters.fromRouterId||r.parameters.routerPortIdx!==t.parameters.fromEgressPortIdx||(n[r.id]=r.id)});break;case"bridges":e.initiators.forEach(r=>{r.parameters.toRouterId!==t.parameters.toRouterId||r.parameters.toRouterPortIdx!==t.parameters.routerPortIdx||(n[r.id]=r.id)}),e.targets.forEach(r=>{r.parameters.fromRouterId!==t.parameters.fromRouterId||r.parameters.fromEgressPortIdx!==t.parameters.routerPortIdx||(n[r.id]=r.id)}),e.routers.forEach(r=>{(r.parameters.fromId===t.parameters.fromRouterId&&r.parameters.fromEgressPortIdx===t.parameters.routerPortIdx||r.parameters.toId===t.parameters.toRouterId&&r.parameters.toInGressPortIdx===t.parameters.routerPortIdx)&&(n[r.id]=r.id)});break}e[t.type].forEach(r=>{switch(t.type){case"initiators":r.parameters.fromInitiatorId!==t.parameters.fromInitiatorId&&r.parameters.toRouterId===t.parameters.toRouterId&&r.parameters.toRouterPortIdx!==t.parameters.toRouterPortIdx||r.parameters.fromInitiatorId!==t.parameters.fromInitiatorId&&r.parameters.toRouterId!==t.parameters.toRouterId||(n[r.id]=r.id);break;case"routers":r.parameters.fromId!==t.parameters.fromId&&r.toId!==t.parameters.toId||r.parameters.fromId===t.parameters.fromId&&r.parameters.toId===t.parameters.toId&&r.parameters.fromEgressPortIdx!==t.parameters.fromEgressPortIdx&&r.parameters.toInGressPortIdx!==t.parameters.toInGressPortIdx||r.parameters.fromId===t.parameters.fromId&&r.parameters.toId!==t.parameters.toId&&r.parameters.fromEgressPortIdx!==t.parameters.fromEgressPortIdx&&r.parameters.toInGressPortIdx!==t.parameters.toInGressPortIdx||r.parameters.fromId===t.parameters.fromId&&r.parameters.toId!==t.parameters.toId&&r.parameters.fromEgressPortIdx!==t.parameters.fromEgressPortIdx||r.parameters.fromId!==t.parameters.fromId&&r.parameters.toId===t.parameters.toId&&r.parameters.toInGressPortIdx!==t.parameters.toInGressPortIdx||(n[r.id]=r.id),r.parameters.fromId!==t.parameters.fromId&&r.parameters.toId===t.parameters.toId&&r.parameters.toInGressPortIdx===t.parameters.toInGressPortIdx&&(n[r.id]=r.id);break;case"targets":r.parameters.toTargetId!==t.parameters.toTargetId&&r.parameters.fromRouterId===t.parameters.fromRouterId&&r.parameters.fromEgressPortIdx!==t.parameters.fromEgressPortIdx||r.parameters.toTargetId!==t.parameters.toTargetId&&r.parameters.fromRouterId!==t.parameters.fromRouterId||(n[r.id]=r.id);break;case"bridges":const o=!!(t.parameters.fromRouterId&&t.parameters.toBridgeId),i=!!(t.parameters.fromBridgeId&&t.parameters.toRouterId);o&&(r.parameters.toBridgeId===t.parameters.toBridgeId||r.parameters.fromRouterId===t.parameters.fromRouterId&&r.parameters.routerPortIdx===t.parameters.routerPortIdx||r.parameters.toRouterId===t.parameters.fromRouterId&&r.parameters.fromBridgeId===t.parameters.toBridgeId)&&(n[r.id]=r.id),i&&(r.parameters.fromBridgeId===t.parameters.fromBridgeId||r.parameters.toRouterId===t.parameters.toRouterId&&r.parameters.routerPortIdx===t.parameters.routerPortIdx||r.parameters.fromRouterId===t.parameters.toRouterId&&r.parameters.toBridgeId===t.parameters.fromBridgeId||r.parameters.toRouterId===t.parameters.toRouterId&&r.parameters.toRouterPortIdx===t.parameters.routerPortIdx)&&(n[r.id]=r.id)}})}return n},validateMinMax:({value:t,min:e,max:n})=>Math.min(Math.max(t,e),n),getMaxBy:(t,e)=>t.length?Tt.maxBy(t,e)[e]:0,findTreeElementParentId:(t,e)=>{if(!t.length)return 1;const n=t.find(r=>r.data.id===e);return n?n.id:1},getTreeLastId:t=>{const e=[...t].sort((n,r)=>n.id<r.id?1:n.id>r.id?-1:0);return e.length>0?e[0].id:0},getCardTimeAgo:t=>(Ti.extend(u7e),Ti(t).fromNow()),getUserDisplayName:t=>`${t.firstName??"-"} ${t.lastName??""}`,getCardPermission:t=>{switch(t){case ch.GUEST:return"[Read-only]";case ch.COLLABORATOR:return"[Editable]";case ch.CO_OWNER:return"(Co-Owner) [Edit, Share]";default:return""}},convertToBase64FromBuffer:t=>gue.Buffer.from(t,"base64"),checkBusValues:(t,e,n)=>{const r=Eo.deepCopy(t),o=En[r.type];if(e==="protocol")switch(n){case wt.AXI:case wt.AHB:case wt.APB:case wt.SEC:case wt.SRAM:case wt.SIG_NATIVE:r.parameters.bus.version=!r.parameters.bus.version||!o.bus.versions[n].find(i=>i.key===r.parameters.bus.version)?o.bus.versions[n][0].key:r.parameters.bus.version,r.parameters.bus.variant=r.parameters.bus.version?o.bus.variants[n][r.parameters.bus.version][0].key:"",t.type===Kt.componentTypes.targets&&(r.frequency=0);break}switch(e==="version"&&(r.parameters.bus.variant=o.bus.variants[r.parameters.bus.protocol][r.parameters.bus.version][0].key),r.type){case Fe.INITIATORS:x7e(r,o,e,n);break;case Fe.TARGETS:w7e(r,o,e,n);const i=r;st.isExclusiveAccessDisabledForAxi3OrAxi4Full(i)&&(r.parameters.maxOutstandingRead=st.getValidMaxOutstandingRead(i),r.parameters.maxOutstandingWrite=st.getValidMaxOutstandingWrite(i));break}return r.parameters.bus.protocol===wt.APB&&r.parameters.portDataWidth>32&&(r.parameters.portDataWidth=32),r.parameters.bus.protocol===wt.AXI&&r.parameters.bus.version===Co.FOUR&&r.parameters.portDataWidth>64&&(r.parameters.portDataWidth=64),r}
345,checkAccessPolicies:(t,e,n)=>(t.type===Kt.componentTypes.initiators&&e==="rootPolicy"&&(n!=="Programmable"?t.parameters.accessPolicy=zo.SECURE:t.parameters.accessPolicy=t.parameters.accessPolicy?"":En.initiators.accessPolicies[0].key),t),getValidMaxOutstandingRead:t=>{const e=st.getMaxOutstandingReadMin(t),n=st.getMaxOutstandingReadMax(t),r=t.parameters.maxOutstandingRead;return r<e?e:r>n?n:r},getValidMaxOutstandingWrite:t=>{const e=st.getMaxOutstandingWriteMin(t),n=st.getMaxOutstandingWriteMax(t),r=t.parameters.maxOutstandingWrite;return r<e?e:r>n?n:r},getValidExclusiveAccessLutSize:t=>{const e=st.getExclusiveAccessLutSizeMax(t),n=t.parameters.exclusiveAccessLutSize;return n>e?e:n},getTargetWithAdjustedMaxOutstandingValue:(t,e)=>{if(t.type!==Fe.TARGETS)return t;const n=st.getValidMaxOutstandingRead(t),r=st.getValidMaxOutstandingWrite(t),o=st.getValidExclusiveAccessLutSize(t);return st.isExclusiveAccessDisabledForAxi3OrAxi4Full(t)&&(e==="readTransactionWidth"||e==="writeTransactionWidth")?{...t,parameters:{...t.parameters,maxOutstandingRead:n,maxOutstandingWrite:r}}:st.isExclusiveAccessEnabledForAxi3OrAxi4Full(t)?{...t,parameters:{...t.parameters,maxOutstandingRead:n,maxOutstandingWrite:r,exclusiveAccessLutSize:o}}:t},resetTransactionWidthMaxOutstandingAndLutSizeToDefault:t=>t.type!==Fe.TARGETS?t:{...t,parameters:{...t.parameters,readTransactionWidth:4,writeTransactionWidth:4,exclusiveAccessLutSize:4,maxOutstandingWrite:st.isExclusiveAccessEnabledForAxi3OrAxi4Full(t)?8:16,maxOutstandingRead:st.isExclusiveAccessEnabledForAxi3OrAxi4Full(t)?8:16}},isExclusiveAccessDisabledForAxi3OrAxi4Full:t=>t.parameters.bus.protocol===wt.AXI&&(t.parameters.bus.version===Co.THREE||t.parameters.bus.version===Co.FOUR&&t.parameters.bus.variant===Ui.FULL)&&!t.parameters.isExclusiveAccessEnabled,isExclusiveAccessEnabledForAxi3OrAxi4Full:t=>t.parameters.bus.protocol===wt.AXI&&(t.parameters.bus.version===Co.THREE||t.parameters.bus.version===Co.FOUR&&t.parameters.bus.variant===Ui.FULL)&&t.parameters.isExclusiveAccessEnabled,getMaxOutstandingReadMin:t=>st.isExclusiveAccessDisabledForAxi3OrAxi4Full(t)?2:En[t.type].maxOutstandingRead.min,getMaxOutstandingReadMax:(t,e=!1)=>st.isExclusiveAccessDisabledForAxi3OrAxi4Full(t)?e?`2^${t.parameters.readTransactionWidth}`:2**Number(t.parameters.readTransactionWidth):st.isExclusiveAccessEnabledForAxi3OrAxi4Full(t)?e?`2^(${t.parameters.readTransactionWidth}-1)`:2**Number(t.parameters.readTransactionWidth-1):En[t.type].maxOutstandingRead.max,getMaxOutstandingWriteMin:t=>st.isExclusiveAccessDisabledForAxi3OrAxi4Full(t)?2:En[t.type].maxOutstandingWrite.min,getMaxOutstandingWriteMax:(t,e=!1)=>st.isExclusiveAccessDisabledForAxi3OrAxi4Full(t)?e?`2^${t.parameters.writeTransactionWidth}`:2**Number(t.parameters.writeTransactionWidth):st.isExclusiveAccessEnabledForAxi3OrAxi4Full(t)?e?`2^(${t.parameters.readTransactionWidth}-1)`:2**Number(t.parameters.readTransactionWidth-1):En[t.type].maxOutstandingWrite.max,getExclusiveAccessLutSizeMax:(t,e=!1)=>st.isExclusiveAccessEnabledForAxi3OrAxi4Full(t)?e?`2^(${t.parameters.readTransactionWidth}-1)`:2**Number(t.parameters.readTransactionWidth-1):En[t.type].exclusiveAccessLutSize.max,checkTypeAndIsSecurityDevice:t=>t.type===Fe.TARGETS&&t.parameters.bus.protocol===wt.SEC?Yt.DEFAULT_TARGET:t.type,getStoredStageCoordinates:({key:t=Xse,projectId:e})=>{const n=window.localStorage.getItem(`${t}_${e}`);return n?JSON.parse(n):null},sceneFitObjects:({elementsArray:t,diagramWidth:e,diagramHeight:n})=>{if(!t.length)return JSON.parse(JSON.stringify(V3));const{minX:r,maxX:o,minY:i,maxY:s}=t.reduce((y,v)=>{const b=v.coordinates.x,S=v.coordinates.y;let w=v.coordinates.x,A=v.coordinates.y;switch(v.type){case Kt.componentTypes.cRouters:w+=v.size.width,A+=v.size.height;break;case Kt.componentTypes.routers:w+=v.size.width,A+=v.size.nameSize.height+v.size.height;break;case Kt.componentTypes.initiators:case Kt.componentTypes.targets:w+=v.size.nameSize.width+Ve.gridBlockSize,A+=Ve.gridBlockSize;break;default:console.log(`unknown element type: ${v.type}`)}return y.minX>b&&(y.minX=b),y.maxX<w&&(y.maxX=w),y.minY>S&&(y.minY=S),y.maxY<A&&(y.maxY=A),y},{minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),a=o-r,l=s-i,c=e/(a+4*Ve.gridBlockSize),u=n/(l+4*Ve.gridBlockSize),d=Math.min(c,u),h=a*d,f=l*d,p=(e-h)/2,m=(n-f)/2;return{scale:d,pan:{x:Math.round(-r*d+p),y:Math.round(-i*d+m)}}},scaleFitPhysicalObjects:({elementsArray:t,diagramWidth:e,diagramHeight:n})=>{if(!t.length)return JSON.parse(JSON.stringify(V3));const{minX:r,maxX:o,minY:i,maxY:s}=t.reduce((y,v)=>{const{minX:b,minY:S,maxX:w,maxY:A}=iQ(v.outline);return console.log("minMaxValues",b,w,S,A),y.minX>b&&(y.minX=b),y.maxX<w&&(y.maxX=w),y.minY>S&&(y.minY=S),y.maxY<A&&(y.maxY=A),y},{minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),a=o-r,l=s-i,c=e/(a+4*Ve.gridBlockSize),u=n/(l+4*Ve.gridBlockSize),d=Math.min(c,u),h=a*d,f=l*d,p=(e-h)/2,m=(n-f)/2;return{scale:d,pan:{x:Math.round(-r*d+p),y:Math.round(-i*d+m)}}},getMinMaxXYFromOutline:iQ,getMacroComponentWidthHeightColor:({minX:t,maxX:e,minY:n,maxY:r,instanceToTopologyIdMap:o,macroId:i})=>({width:Math.abs(e-t)*F_.divider,height:Math.abs(r-n)*F_.divider,color:o&&o[i]?o[i].parameters.colors.routers:F_.defaultColor}),getStageDimensions:({width:t,height:e})=>({diagramWidth:t,diagramHeight:ei.getCenterPanelHeight(e)}),invalidateConnectionsOnComponentDelete:({connections:t,deletedComponentId:e,invalidateConnections
345Holder:n})=>{for(const r in t)t.hasOwnProperty(r)&&t[r].forEach(o=>{(o.parameters.fromInitiatorId===e||o.parameters.toTargetId===e||o.parameters.fromId===e||o.parameters.toId===e||o.parameters.fromRouterId===e||o.parameters.toRouterId===e||o.parameters.fromBridgeId===e||o.parameters.toBridgeId===e)&&(n[o.id]=o.id)});return n},getComponentLeafNodeChildComponentIds:(t,e)=>t.reduce((n,r)=>(r.parent===e&&(n[r.relationId]={id:r.relationId,type:r.data.type}),n),{}),addComponentIds:({data:t,type:e,updatedComponent:n=null,deletedId:r=null})=>{if(Kt.excludeForIdConversion.includes(e))return t;let o=!1,i=!1;const s=t.reduce((a,l,c)=>{if(r&&r===l.id)return i=!0,a;const u=n&&n.id===l.id?Object.assign(l,n):l;return e===Kt.componentTypes.targets&&l.parameters.bus.protocol===wt.SEC?(o=!0,u.componentId=0,[u,...a]):(u.componentId=c,a.push(u),a)},[]);return o||i?s.map((a,l)=>({...a,componentId:l})):s},checkAddressValid:({projectAddressWidth:t,value:e})=>E7e(t).test(e),validateBaseAddress:({projectAddressWidth:t,base:e,limit:n})=>{let r="",o="";const i=e&&st.checkAddressValid({projectAddressWidth:t,value:e});i||(r="Invalid Base Address");const s=n&&st.checkAddressValid({projectAddressWidth:t,value:n});return s||(o="Invalid Limit Address"),i&&s&&BigInt("0x0"+e)>BigInt("0x0"+n)&&(r="Greater than Limit Address"),{limitAddressMsg:o,baseAddressMsg:r}},validateLimitAddress:({projectAddressWidth:t,base:e,limit:n})=>{let r="",o="";const i=n&&st.checkAddressValid({projectAddressWidth:t,value:n});i||(o="Invalid Limit Address");const s=e&&st.checkAddressValid({projectAddressWidth:t,value:e});return s||(r="Invalid Base Address"),s&&i&&BigInt("0x0"+e)>BigInt("0x0"+n)&&(r="Greater than Limit Address"),{limitAddressMsg:o,baseAddressMsg:r}},validateAddresses:({base:t,limit:e,projectAddressWidth:n})=>{let r="",o="";const i=t&&st.checkAddressValid({projectAddressWidth:n,value:t});i||(r="Invalid Base Address");const s=e&&st.checkAddressValid({projectAddressWidth:n,value:e});return s||(o="Invalid Limit Address"),i&&s&&BigInt("0x0"+t)>BigInt("0x0"+e)&&(r="Greater than Limit Address"),{limitAddressMsg:o,baseAddressMsg:r}},validateHex:t=>S7e.test(t),filterDataWidthOptions:t=>{let e=En[t.type].portDataWidth;const n=t?.parameters.bus.protocol===wt.AXI&&t?.parameters.bus.version===Co.FOUR&&t?.parameters.bus.variant===Ui.LITE;return wt.APB===t.parameters.bus.protocol?e=En[t.type].portDataWidth.filter(r=>r.value<=32):n&&(e=En[t.type].portDataWidth.filter(r=>r.value<=64)),e},ctrlPressed:t=>t.ctrlKey||t.key==="Control"||t.which===17||t.keyCode===17||t.keyCode===224||t.keyCode===91||t.keyCode===93||t.metaKey,shiftPressed:t=>t.shiftKey||t.key==="shift"||t.key==="Shift"||t.which===16||t.keyCode===16||t.keyCode===5||t.keyCode===52||t.metaKey,getComponentId:({components:t,type:e})=>{const n=e===Fe.TARGETS||e===Fe.VIRTUAL_TARGETS,r=n?[...t[Fe.TARGETS],...t[Fe.VIRTUAL_TARGETS]]:t[e],o=n?1:0;if(!r.length)return o;const i=new Set(r.filter(a=>a.parameters?.bus?.protocol!==wt.SEC).map(a=>a.componentId));let s=o;for(;s<i.size+o;s++)if(!i.has(s))return s;return s},getUniqueTopologyFolderColor:t=>{const e=yue.map(o=>o.value),n=Tt.uniq(t.map(o=>o.parameters.colors.routers));let r=0;for(;n.includes(e[r])&&r!==10;)r++;return e[r]},getUniqueComponentName:({componentName:t,index:e})=>t===""?"":`${t}_${e}`,getCreatingComponent:({type:t,initialCoordinates:e,id:n,components:r,parameterOverrides:o})=>{const i=Yt.DEFAULT_TARGET===t?0:st.getComponentId({components:r,type:t});return{...Zu[t],id:n,componentId:i,name:st.getUniqueComponentName({componentName:YL[t],index:i}),coordinates:e,parameters:{...Zu[t].parameters,...o}}},getCreatingComponentConnection:({type:t,creatingComponentId:e,creatingComponentPort:n,presetComponentId:r,presentComponentPort:o})=>{const i=Uo();switch(t){case pi.INITIATORS:return{id:i,type:t,parameters:{fromInitiatorId:e,toRouterId:r,toRouterPortIdx:o||0}};case pi.TARGETS:return{id:i,type:t,parameters:{toTargetId:e,fromEgressPortIdx:o||0,fromRouterId:r}};default:return{id:i,type:t,parameters:{toId:e,fromId:r,toInGressPortIdx:n||0,fromEgressPortIdx:o||0}}}},getProjectComponentsBoundaryAndBlockers:(t,e=400)=>{const n={upperLeftX:Number.POSITIVE_INFINITY,upperLeftY:Number.POSITIVE_INFINITY,lowerRightX:Number.NEGATIVE_INFINITY,lowerRightY:Number.NEGATIVE_INFINITY},r={};return Object.keys(t).forEach(o=>{if(o===Fe.TOPOLOGIES)return;const i=t[o];
345i.length&&i.forEach(s=>{let a=s.size.nameSize.width||Ve.gridBlockSize;const l=s.size.nameSize.height||Ve.gridBlockSize,c=s.coordinates.x,u=s.coordinates.y;let d=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY,f=0;switch(s.type){case Fe.INITIATORS:case Fe.TARGETS:case Fe.BRIDGES:d=c+a+Ve.gridBlockSize,h=u+(s.size.nameSize.height||Ve.gridBlockSize);break;case Fe.ROUTERS:a=s.size.width,d=c+s.size.width,h=u+s.size.height+s.size.nameSize.height,f=s.parameters.ports.eGress.length;break}n.upperLeftX=Math.min(n.upperLeftX,c-e),n.upperLeftY=Math.min(n.upperLeftY,u-e),n.lowerRightX=Math.max(n.lowerRightX,d+e),n.lowerRightY=Math.max(n.lowerRightY,h+e),r[s.id]={upperLeftX:c,upperLeftY:u,lowerRightX:d,lowerRightY:h,nameWidth:a,nameHeight:l,ports:f}})}),{boundary:n,blockers:r}},getConnectionCoordinates:(t,e)=>{const n={};return Object.keys(t).forEach(r=>{if(r===pi.CROUTERS||r===pi.CTARGETS)return;const o=t[r];o.length&&o.forEach(i=>{const s=i.parameters;let a=0,l=0,c=0,u=0,d=null,h=null,f=500,p=500,m=f/5,y=p/5;switch(i.type){case pi.INITIATORS:d=e[s.toRouterId];const v=e[s.fromInitiatorId];if(!d||!v)break;f=Math.abs(d.lowerRightY-d.upperLeftY-d.nameHeight),m=f/d.ports,a=v.lowerRightX,l=v.lowerRightY-v.nameHeight/2,c=d.upperLeftX,u=d.upperLeftY+d.nameHeight+(m/2+m*s.toRouterPortIdx);break;case pi.TARGETS:const b=e[s.toTargetId];if(h=e[s.fromRouterId],!b||!h)break;p=Math.abs(h.upperLeftY-h.lowerRightY)-h.nameHeight,y=p/h.ports,a=h.upperLeftX+h.nameWidth,l=h.upperLeftY+h.nameHeight+(y/2+y*s.fromEgressPortIdx),c=b.upperLeftX,u=b.upperLeftY+b.nameHeight/2;break;case pi.ROUTERS:if(h=e[s.fromId],d=e[s.toId],!h||!d)break;p=Math.abs(h.lowerRightY-h.upperLeftY-h.nameHeight),y=p/h.ports,f=Math.abs(d.lowerRightY-d.upperLeftY-d.nameHeight),m=f/d.ports,a=h.lowerRightX,l=h.upperLeftY+h.nameHeight+(y/2+y*s.fromEgressPortIdx),c=d.upperLeftX,u=d.upperLeftY+d.nameHeight+(m/2+m*s.toInGressPortIdx);break;case pi.BRIDGES:const S=e[s.fromBridgeId],w=e[s.toBridgeId];h=e[s.fromRouterId],d=e[s.toRouterId],h&&w&&(p=Math.abs(h.lowerRightY-h.upperLeftY-h.nameHeight),y=p/h.ports,a=h.lowerRightX,l=h.upperLeftY+h.nameHeight+(y/2+y*s.routerPortIdx),c=w.upperLeftX,u=w.upperLeftY+w.nameHeight/2),S&&d&&(f=Math.abs(d.lowerRightY-d.upperLeftY-d.nameHeight),m=f/d.ports,a=S.lowerRightX,l=S.lowerRightY-S.nameHeight/2,c=d.upperLeftX,u=d.upperLeftY+d.nameHeight+(m/2+m*s.routerPortIdx));break}(a!==c||l!==u)&&(n[i.id]={startX:a,startY:l,endX:c,endY:u})})}),n},getConnectionRoutePoints:({route:t,lineParams:e,precalculatedPoints:n})=>{if(t&&t.length){const r=t.length;return t.reduce((o,{x0:i,y0:s,x1:a,y1:l},c)=>(o.push(i,s),r===c+1&&o.push(a,l),o),[])}if(n)return n;if(e){const r=st.getInitiatorAndTargetConnectionCoordinates(e);if(r&&r.points)return r.points}return[]},checkForExistingConnection:({connections:t,newConnection:e})=>!1,scaleDownProjectThumbnail:async({dataURL:t,width:e=320,height:n})=>{const r=await _7e(t);let o=n||240;if(!n){const a=r.height/r.width;o=e*a}const i=document.createElement("canvas");i.width=e,i.height=o;const s=i.getContext("2d");return s?(s.drawImage(r,0,0,e,o),i.toDataURL()):""}},I7e=Nr.injectEndpoints({endpoints:t=>({getProject:t.query({query:({projectId:e})=>`${dt.project}?id=${e}`,providesTags:[We.Project],transformResponse:e=>e}),getAll:t.query({query:({userId:e,limit:n,searchTerm:r,types:o,activeTab:i})=>({url:`${dt.projectAllOwnedByUser}`,method:nn.POST,body:{userId:e,limit:n,searchTerm:r,types:o,activeTab:i}}),providesTags:[We.Projects],transformResponse:e=>e}),getAllCount:t.query({query:({userId:e,types:n,searchTerm:r,activeTab:o})=>({url:`${dt.projectAllOwnedByUserCount}`,method:nn.POST,body:{userId:e,types:n,searchTerm:r,activeTab:o}}),providesTags:[We.ProjectsCount],transformResponse:e=>e}),getAllByIntegrationId:t.query({query:({integrationId:e})=>`${dt.projectsByIntegrationId}?id=${e}`,providesTags:[We.ProjectsByIntegrationId],transformResponse:e=>e}),getAllSharedByUserId:t.query({query:({userId:e,limit:n,searchTerm:r,types:o})=>({url:`${dt.projectAllSharedToUser}`,method:nn.POST,body:{userId:e,limit:n,searchTerm:r,types:o}}),providesTags:[We.ProjectsShared],transformResponse:e=>e}),getAllSharedByUserIdCount:t.query({query:({userId:e,types:n,searchTerm:r})=>({url:`${dt.projectAllSharedToUserCount}
345`,method:nn.POST,body:{userId:e,types:n,searchTerm:r}}),providesTags:[We.ProjectsSharedCount],transformResponse:e=>e}),createProject:t.mutation({query:({requestBody:e})=>({url:`${dt.projectCreate}`,method:nn.POST,body:e}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.Projects,We.ProjectsCount]}),createProjectByFile:t.mutation({query:({requestBody:e})=>{const n=new FormData;return n.append("file",e.file),n.append("createParams",JSON.stringify(e.createParams)),{url:`${dt.projectUploadExcelFile}`,method:nn.POST,body:n}},transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.Projects,We.ProjectsCount]}),createProjectByCloning:t.mutation({query:({requestBody:e})=>({url:`${dt.projectClone}`,method:nn.POST,body:e}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.Projects,We.ProjectsCount]}),updateProject:t.mutation({query:({requestBody:e})=>({url:`${dt.project}`,method:nn.PUT,body:e}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.Project,We.Projects,We.ProjectsShared,We.ProjectsCount]}),deleteProject:t.mutation({query:({projectId:e})=>({url:`${dt.project}?id=${e}`,method:nn.DELETE}),transformErrorResponse:e=>({error:e}),transformResponse:e=>e,invalidatesTags:[We.Projects,We.ProjectsCount,We.SharedProject]})})}),{useGetProjectQuery:vue,useGetAllQuery:bue,useGetAllSharedByUserIdQuery:P7e,useGetAllByIntegrationIdQuery:R7e,useCreateProjectMutation:O7e,useCreateProjectByFileMutation:N7e,useCreateProjectByCloningMutation:M7e,useUpdateProjectMutation:rS,useDeleteProjectMutation:Cue,useGetAllCountQuery:D7e,useGetAllSharedByUserIdCountQuery:L7e}=I7e,Sue=Nr.injectEndpoints({endpoints:t=>({getAllProjectTaskByProjectId:t.query({query:e=>`${dt.projectTask}?projectId=${e}`,providesTags:[We.ProjectTask],transformResponse:e=>e,transformErrorResponse:e=>e.status}),deleteProjectTask:t.mutation({query:({projectId:e,taskId:n})=>({url:`${dt.projectTask}?taskId=${n}&projectId=${e}`,method:"DELETE"}),async onQueryStarted({projectId:e,taskId:n},{dispatch:r,queryFulfilled:o}){await fR({dispatch:r,api:Sue,endpointName:"getAllProjectTaskByProjectId",queryArg:{projectId:e},queryFulfilled:o,id:n})},transformResponse:e=>e,transformErrorResponse:e=>e.status,invalidatesTags:[We.ProjectTask]}),autoRouteProject:t.mutation({query:e=>({url:`${dt.projectTaskAutoRoute}`,method:"POST",body:e}),transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:["ProjectValidator","RoutingTable","ProjectRoutes"]}),generateProjectRtl:t.mutation({query:e=>({url:`${dt.projectTaskGenerate}`,method:"POST",body:e}),transformResponse:e=>e,transformErrorResponse:e=>e.status,invalidatesTags:[We.ProjectTask]}),simulateProject:t.mutation({query:e=>({url:`${dt.projectTaskSimulate}`,method:"POST",body:e}),transformResponse:e=>e,transformErrorResponse:e=>e.status,invalidatesTags:[We.ProjectTask]}),exportProject:t.mutation({query:e=>({url:`${dt.projectTaskExport}`,method:"POST",body:e}),transformResponse:e=>e,transformErrorResponse:e=>e.status,invalidatesTags:[We.ProjectTask]}),getDownloadResultLink:t.mutation({query:({projectId:e,taskId:n})=>({url:`${dt.projectTaskDownloadResult}?projectId=${e}&taskId=${n}`,method:"GET"}),transformResponse:e=>e,transformErrorResponse:e=>e.status}),downloadProjectJson:t.mutation({query:e=>({url:`${dt.projectTaskDownloadJSON}`,method:"POST",body:e}),transformResponse:e=>e,transformErrorResponse:e=>e})})}),{useGetAllProjectTaskByProjectIdQuery:Eue,useDeleteProjectTaskMutation:k7e,useAutoRouteProjectMutation:F7e,useGenerateProjectRtlMutation:B7e,useSimulateProjectMutation:$7e,useExportProjectMutation:H7e,useDownloadProjectJsonMutation:xue,useGetDownloadResultLinkMutation:wue}=Sue,U7e=()=>{const t=Yn(),[e,n]=C.useState(null),r=bt(Xx),o=bt(INe),{data:i=Zk,error:s,isLoading:a}=Rm(o.projectId,{skip:!o.projectId}),{data:l=[],error:c,isLoading:u}=LF(void 0,{skip:!o.type||o.type!==Kt.deleteConfirm.group});Wx();const[d]=k7e(),[h,{isLoading:f}]=Cue(),[p,{isLoading:m}]=jW(),[y,{isLoading:v}]=J9e(),[b,{isLoading:S,error:w}]=O9e(),[A,{isLoading:_,error:P}]=rue(),[R,{isLoading:O}]=hue(),[N,M]=C.useState(!1),L="Project deleted",F="Failed to delete project",$=!!e,D=$?"delete-confirm-popover":void 0,k=C.useCallback(()=>{M(!1),n(null),t(Im(null)),t(eF(!0)),history.state?.modalOpen&&history.back()},[]),U=({projectId:oe})=>{h({projectId:oe}).then(ie=>{"error"in ie?ln.error(F,{autoClose:3e3}):ln.success(L,{autoClose:3e3})}).catch(()=>ln.error(F,{autoClose:3e3}))},H=C.useCallback(({componentId:oe,type:ie,projectId:ee,tree:re})=>{const fe={};switch(ie){case Fe.INITIATORS:case Fe.ROUTERS:case Fe.VIRTUAL_TARGETS:case Fe.BRIDGES:p({componentId:oe,type:ie,projectId:ee,invali
345dateConnections:st.invalidateConnectionsOnComponentDelete({connections:i,deletedComponentId:oe,invalidateConnectionsHolder:fe})}).then(()=>{ie!==Fe.VIRTUAL_TARGETS&&t(I_())});break;case Fe.TARGETS:if(re){const ve=re.find(pe=>pe.relationId===oe),Re=ve?st.getComponentLeafNodeChildComponentIds(re,ve?.id):{};p({componentId:oe,type:ie,projectId:ee,invalidateConnections:st.invalidateConnectionsOnComponentDelete({connections:i,deletedComponentId:oe,invalidateConnectionsHolder:fe}),invalidateComponents:Re}).then(()=>{t(I_())})}break;case Fe.TOPOLOGIES:if(!re){console.log("Tree Elements Not Found");break}const we=re.find(ve=>ve.relationId===oe);if(!we){console.log("Tree Element Not Found");break}const xe=st.getComponentLeafNodeChildComponentIds(re,we.id);Object.keys(xe).length&&Object.keys(xe).forEach(ve=>{st.invalidateConnectionsOnComponentDelete({connections:i,deletedComponentId:ve,invalidateConnectionsHolder:fe})}),p({componentId:oe,type:ie,projectId:ee,invalidateComponents:xe,invalidateConnections:fe}).then(ve=>{t(I_())});break;default:console.log(`Unknown in DeleteConfirmPopoverComponent deleteComponentHandler, type: ${ie}`)}},[i]),V=C.useCallback(({id:oe,type:ie,projectId:ee})=>{y({connectionId:oe,type:ie,projectId:ee})},[]),q=C.useCallback(oe=>{b(oe).then(ie=>{r===oe&&t(Qk(l[0].id))}).catch(ie=>{ln.error("Group not deleted.")})},[r,l]),J=C.useCallback(oe=>{A({groupId:r,userId:oe})},[r]),Q=C.useCallback(oe=>{oe&&R(oe)},[]),se=C.useCallback(oe=>{if(oe.stopPropagation(),o.isConnection)V({id:o.deleteElementId,type:o.type,projectId:o.projectId});else switch(o.type){case Kt.deleteConfirm.project:U({projectId:o.deleteElementId});break;case Kt.deleteConfirm.initiators:case Fe.VIRTUAL_TARGETS:case Kt.deleteConfirm.routers:case Kt.deleteConfirm.cRouters:case Kt.deleteConfirm.cTargets:case Fe.BRIDGES:H({componentId:o.deleteElementId,type:o.type,projectId:o.projectId});break;case Kt.deleteConfirm.targets:case Kt.deleteConfirm.topologies:H({componentId:o.deleteElementId,type:o.type,projectId:o.projectId,tree:o.tree});break;case Kt.deleteConfirm.tasks:ln.info("Deleting task result"),d({taskId:o.deleteElementId,projectId:o.projectId});break;case Kt.deleteConfirm.group:q(o.deleteElementId);break;case Kt.deleteConfirm.user:J(o.deleteElementId);break;case Kt.deleteConfirm.routingEntries:Q(o.routingTable);break;default:console.log(`Unknown delete type: ${o.type}`);break}k()},[o.type,o.anchorElId]);return C.useEffect(()=>{if(o.anchorElId){const oe=document.getElementById(o.anchorElId);oe&&n(oe)}},[o.anchorElId]),C.useEffect(()=>($&&(N||(history.pushState({modalOpen:!0},""),M(!0)),window.addEventListener("popstate",k)),()=>window.removeEventListener("popstate",k)),[$,N]),K(lR,{id:D,open:$,anchorEl:e,onClose:k,anchorOrigin:{vertical:"bottom",horizontal:"left"},transitionDuration:1,children:[g(eg,{children:`Confirm deletion of ${o.name}`}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:k,children:"Cancel"}),g(Sn,{variant:"contained",color:"error",onClick:se,children:"Delete"})]})]})},Aue=({message:t})=>t.length?g(le,{sx:{position:"absolute",left:0,zIndex:2,backgroundColor:"darkRed",color:"white",px:.5,py:.25,fontSize:"12px",lineHeight:1.2,whiteSpace:"normal",wordWrap:"break-word",maxWidth:"50%"},children:t}):null,KW={getIncrementedProjectName:({baseName:t,existingNames:e})=>{let n=0;e.forEach(o=>{const i=new RegExp(`^${t}_?(\\d+)?$`),s=o.match(i);if(s){const a=s[1]?parseInt(s[1]):0;n=Math.max(n,a)}});const r=n+1;return`${t}_${r}`},getNameErrorMessage:t=>{const e="Project Name";return t?t.length<OC?to.minCharLengthNotReach(e):xh.isNameValid(t)?xh.hasNameExceededMaxCharLength(t)?to.maxCharLengthExceeded(e,YI):"":to.invalidName(e):to.emptyValue(e)}},z7e=()=>{const t=Yn(),e=bt(Yx),n=bt(ANe),r=bt(tae),o=bt(qP),[i,s]=C.useState(!1),[a,l]=C.useState(n),[c,u]=C.useState(!1),[d,h]=C.useState(""),{register:f,getValues:p,handleSubmit:m,reset:y,watch:v,formState:{errors:b}}=JC({defaultValues:{name:"",powerDomainName:$T.powerDomainName,groundDomainName:$T.groundDomainName},resolver:sw(Zg.createProject)}),[S,{isLoading:w}]=M7e(),A=C.useCallback(()=>{s(!1),l(!1),u(!1),t(Jk()),h(""),history.state?.modalOpen&&history.back()},[]),_=async({name:N})=>{const M={projectId:r.projectId,userId:o,name:N,type:r.type};await S({requestBody:M}).then(L=>{if(L.error?.status===ox.CONFLICT){s(!0);return}"error"in L?ln.error("Failed to copy project"):A()}).catch(L=>ln.error("Failed to copy project"))},P=N=>{const M=KW.getNameErrorMessage(N);h(M)},R=C.useCallback(N=>{s(!1),e&&e[N.target.name]&&t(CC(N.target.name))},[e]),O=b.name?.message||e?.name||(i?to.nameAlreadyUsed("Project Name"):"")||d;return C.useEffect(()=>{const N=()=>{a&&A()};return n&&l(!0),a&&(c||(history.pushState({modalOpen:!0},""),u(!0)),window.addEventListener("popstate",N)),()=>window.removeEventListener("popstate",N)},[n,a,c]),C.useEffect(()=>{n&&r.name&&y({name:`Copy_${r.name}`,powerDomainName:$T.powerDomainName,groundDomainName:$T.groundDomainName})},[r.name,y,n]),K(Iu,{open:n,onClose:A,fullWidth:!0,sx:{width:"100%","& .MuiPaper-root":{maxWidth:"50vw"}},children:[w?g(tl,{}):null,g(eg,{children:`Copy Project [${r.name}]`}),g(yi,{}),g(ZC,{sx:{width:"100%"},children:K(le,{sx:{p:2},children:[g(lo,{required:!0,id:"name",label:"Project Name",onFocus:R,fullWidth:!0,margin:"dense",...f("name",{onChange:R}),error:!!(b.name||e?.name||i||d),onChange:N=>{const M=N.target.value;P(M)},onKeyDown:N=>{const M=N.target.value;N.key==="Enter"&&!d&&(N.preventDefault(),_({name:M}))},helperText:O?g(Aue,{message:O}):null}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:A,children:"Cancel"}),g(Sn,{variant:"contained",sx:{backgroundColor:tt,"&:hover":{backgroundColor:Zs}},onClick:m(_),disabled:!!(b.name||e?.name||d),children:"Save"})]})]})})]})},V7e=()=>{const t=Yn(),[e,n]=qt.useState(null),r=bt(RNe),o=!!e,i=o?lNe:void 0,s=()=>{n(null),t(DI(null))};return C.useEffect(()=>{if(r.anchorElId){const a=document.getElementById(r.anchorElId);a&&n(a);const l=()=>{s()};return window.addEventListener("popstate",l),()=>{window.removeEventListener("popstate",l)}}},[r.anchorElId]),g(lR,{id:i,open:o,anchorEl:e,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},sx:{ml:2},children:g(Ke,{sx:{p:1,width:"342px",color:"darkRed"},children:r.warningText})})},G7e=()=>{const t=bt(Yk),e=u0(),n=Za(),r=e.pathname.includes(un.landingPage.base);return C.useEffect(()=>{!t&&e.pathname===un.base&&n(un.landingPage.path),setTimeout(()=>{if(t)switch(!0){case e.pathname===un.base:case e.pathname.includes(un.landingPage.path):case e.pathname.includes(un.login.path):n(un.projects.path);break;default:n(e.pathname)}},100)},[t,e.pathname]),C.useEffect(()=>{const o=i=>{t&&e.pathname===un.projects.path&&(i.preventDefault(),window.history.pushState(null,"",un.projects.path))};return window.addEventListener("popstate",o),()=>{window.removeEventListener("popstate",o)}},[e.pathname]),K(le,{sx:{height:"100vh",overflow:"hidden"},children:[r?null:g(o7e,{}),g(ZV,{}),t?K(gr,{children:[g(i7e,{}),g(U7e,{}),g(V7e,{}),g(z7e,{})]}):null]})},W7e=()=>{const t=u0(),e=Za(),n=Yn(),r=bt(Yk),o=bt(zRe),i=t.pathname.includes(un.landingPage.path),[s,{isLoading:a}]=c9e(),[l]=tue(),c=async d=>
345{const h=await $W.getByUserIdAsync(d),f=h?await WL.getUpdatePayload(h):await WL.getCreatePayload(d);await l({requestBody:f})},u=async()=>{try{const d=await s("").unwrap();d?.user?.id&&d?.token?(n(bC(d)),d.user.groupId&&rh.isAdmin(d.user.roleId)&&(n(Qk(d.user.groupId)),n(kse(d.user.roleId))),await c(d.user.id),e(t.pathname!==un.base&&t.pathname!==un.login.path?t.pathname:un.projects.path)):e(un.landingPage.path)}catch{e(un.landingPage.path)}};return C.useEffect(()=>{!o&&!r&&!t.pathname.includes(un.requestAccess.path)&&!t.pathname.includes(un.activateUser.path)&&!t.pathname.includes(un.resetPassword.path)&&!t.pathname.includes(un.resetPasswordConfirm.path)&&u()},[]),C.useEffect(()=>{r&&e(un.projects.path)},[r]),!r&&!i?g(tl,{}):g(ZV,{})},j7e=({isAllowed:t=!1,redirectPath:e=un.login.path,children:n=g(ZV,{})})=>{const r=bt(Yk),o=bt(Dc);return!r&&!o.id?g(W7e,{}):n};var xv=(t=>(t[t.ALL=0]="ALL",t[t.ENCRYPTED_AND_OBFUSCATED=1]="ENCRYPTED_AND_OBFUSCATED",t[t.ENCRYPTED=2]="ENCRYPTED",t))(xv||{});const uT={GROUPS:"Groups",CREATE_GROUP:"Create Group",GROUP_NAME:"Group Name"},Jr={SUSPEND:"Suspend Group",DOWNLOAD_RTL:"Allow Download RTL",GENERATE_CYCLE_ACCURATE_MODEL:"Allow Generate Cycle Accurate Model",SIMULATE:"Allow Simulate",EXPORT:"Allow Export",ENCRYPTED:"Encrypted",CLEAN:"Clean",NAME:"Name",EMAIL:"Email",REINVITE:"Reinvite",GROUP:"Group",LICENSE_EXPIRY_DATE:"License Expiry Date",NON_EXPIRING_LICENSE:"Non-expiring license",DATE_FORMAT:"DD-MMM-YYYY",ACTIVATED:"Activated",SUSPENDED:"Suspended",DELETE:"Delete",INVITE_USER_EMAIL:"Invite User E-mail",ENTER_VALID_EMAIL_ADDRESS:"Enter valid email address",ROLE:"Role",NUMBER_OF:"Number of",WEEKS:"weeks",SEND_INVITE:"Send Invite",EDIT_GROUP_NAME:"Edit Group Name",DELETE_GROUP:"Delete Group",MAX_GENERATE_COUNT:"Max Generate Count",MAX_SIMULATE_COUNT:"Max Simulate Count",MAX_EXPORT_COUNT:"Max Export Count",ACTIONS:"Actions",DOWNLOAD_JSON:"Allow Download JSON",UPLOAD_TO_FTP:"Upload to FTP",USER_ACTIVITY:"User Activity",USER_BRANCH_CONTROL:"User Branch Control",STATUS:"Status"},ls={GROUP_ID:"groupId",NAME:"name",EMAIL:"email",REINVITE:"reInvite",GROUP:"group",ROLE:"role",LICENSE_EXPIRY_DATE:"licenseExpiryDate",ACTIVATED:"activated",SUSPENDED:"suspended",DELETED:"deleted",DELETE:"delete",MAX_GENERATE_COUNT:"maxGenerateCount",MAX_SIMULATE_COUNT:"maxSimulateCount",MAX_EXPORT_COUNT:"maxExportCount",ACTIONS:"actions",DELETE_USER:"deleteUser",STATUS:"status"},XL={CHANGE_ROLE_TO_USER:"Change Role to User (cannot be Admin in other groups.)",NOT_AUTHORIZED:"Not Authorized.",CANNOT_DELETE_GROUP:"Deleting this group is not allowed until all users have been removed",CANNOT_REMOVE_LAST_EXPORT_TYPE:"Removing last export type is not allowed. There should be at least one export type selected"},mc={DELETED:"deleted",CAN_DOWNLOAD_RTL:"canDownloadRTL",CAN_GENERATE_CYCLE_ACCURATE_MODEL:"canGenerateCycleAccurateModel",CAN_SIMULATE:"canSimulate",CAN_EXPORT:"canExport",CAN_DOWNLOAD_JSON:"canDownloadJson",EXPORT_AUTH_LEVEL:"exportAuthLevel",IS_UPLOAD_TO_FTP:"isUploadToFtp",IS_USER_BRANCH_CONTROL_VISIBLE:"isUserBranchControlVisible"},q7e=[{label:"L0 (Clean, Encrypted, Obfuscated)",value:xv.ALL},{label:"L1 (Encrypted, Obfuscated)",value:xv.ENCRYPTED_AND_OBFUSCATED},{label:"L2 (Encrypted)",value:xv.ENCRYPTED}],rD={EDIT_GROUP_NAME:"Edit Group Name",SELECT_USER_TO_ASSIGN_PROJECTS:"Select a user to assign the projects to",DELETE_USER_AND_REASSIGN_PROJECTS:"Delete user and reassign projects to another user",DELETE_USER_AND_PROJECTS:"Delete user and all of their projects"},KL={CANCEL:"Cancel",UPDATE:"Update",DELETE:"Delete"},Xh={ASSIGN:"assign",DELETE:"delete"},Y7e={[Xh.ASSIGN]:"I understand this is an unrecoverable action that will delete the user and permanently reassign their projects",[Xh.DELETE]:"I understand this is an unrecoverable action that will delete the user and all user's data"};var Ri=(t=>(t.GROUP="Groups",t.COLLABORATION="Project Collaboration",t.INVITE="Invite",t))(Ri||{});const X7e=({activeTab:t,handleActiveTabChange:e})=>g(le,{children:K(tg,{value:t,onChange:e,sx:{"& .MuiTabs-indicator":{backgroundColor:tc,height:"3px"},"& .Mui-selected":{color:`${tc} !important`}},children:[g(Sa,{value:Ri.GROUP,label:Ri.GROUP}),g(Sa,{value:Ri.COLLABORATION,label:Ri.COLLABORATION}),g(Sa,{value:Ri.INVITE,label:Ri.INVITE})]})}),Tue=()=>{const{data:t=[],isLoading:e}=LF();return{groups:t,isLoadingGroups:e}},_ue=()=>{const{groups:t}=Tue();return t},K7e=t=>_ue().find(n=>n.id===t),pR={getAll:_ue,getAllAndLoading:Tue,getById:K7e},Iue=Nr.injectEndpoints({endpoints:t=>({getAllGroupCollaboration:t.query({query:()=>({url:`${dt.groupCollaboration}`,method:nn.GET}),providesTags:[We.GroupCollaboration],transformResponse:(e,n,r)=>e}),createGroupCollaboration:t.mutation({query:({requestBody:e})=>({url:`${dt.groupCollaboration}
345`,method:nn.POST,body:e}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.GroupCollaboration]}),updateGroupCollaboration:t.mutation({query:({requestBody:e})=>({url:`${dt.groupCollaboration}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(Iue.util.updateQueryData("getAllGroupCollaboration",void 0,i=>{const s=i.findIndex(a=>a.id===e.id);s>=0&&(i[s]=e)}));try{await r}catch{o.undo()}},invalidatesTags:[We.Projects,We.ProjectSharing],transformErrorResponse:e=>e,transformResponse:e=>e}),deleteGroupCollaboration:t.mutation({query:e=>({url:`${dt.groupCollaboration}?id=${e}`,method:nn.DELETE}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.GroupCollaboration]})})}),{useGetAllGroupCollaborationQuery:Q7e,useCreateGroupCollaborationMutation:Z7e,useUpdateGroupCollaborationMutation:Pue,useDeleteGroupCollaborationMutation:J7e}=Iue,gR=()=>{const{data:t=[],isLoading:e}=Q7e();return{groupCollaborations:t,isLoadingGroupCollaborations:e}},eqe=()=>{const{groupCollaborations:t}=gR();return Tt.sortBy(t,"name")},tqe=t=>{const{groupCollaborations:e}=gR();return e.find(n=>n.id===t)},nqe=t=>{const{groupCollaborations:e}=gR();return e.find(n=>n.groupIds.includes(t))},rqe=t=>{const{groupCollaborations:e,isLoadingGroupCollaborations:n}=gR();return{groupCollaborations:e.filter(r=>r.userIds.includes(t)),isLoadingGroupCollaborations:n}},QL={getAll:eqe,getAllAndLoading:gR,getById:tqe,getAllByGroupId:nqe,getAllAndLoadingByUserId:rqe},oqe=()=>Qp(),iqe=()=>[],sqe=()=>[],o5={getId:oqe,getGroupIds:iqe,getUserIds:sqe},aqe=({name:t})=>({id:o5.getId(),name:t,groupIds:o5.getGroupIds(),userIds:o5.getUserIds()}),lqe=({id:t,name:e,groupIds:n,userIds:r})=>({id:t,name:e,groupIds:n,userIds:r}),cqe={getCreatePayload:aqe,getUpdatePayload:lqe},uqe=({handleAddAction:t})=>g(Qo,{icon:g(eS,{}),onClick:t,sx:{color:Ef,background:tt,"&:hover":{backgroundColor:"gray"},p:0}}),dqe=({headerLabel:t,handleAddAction:e})=>K(Mt,{direction:"row",spacing:1,sx:{m:2,justifyContent:"center"},children:[g(Ke,{variant:"h6",children:t}),g(uqe,{handleAddAction:e})]}),hqe=({items:t,selectedItemId:e,handleClick:n})=>{const r=md(tc,.8),o=UG(tc,.2);return g(iw,{sx:{overflowY:"auto",height:"100%"},children:t.map(i=>g(RC,{disablePadding:!0,sx:{"&:hover":{backgroundColor:r},"& .MuiListItemButton-root.Mui-selected":{backgroundColor:tc,color:"lightgrey"},"& .Mui-selected:hover":{backgroundColor:`${o} !important`}},children:g(WI,{onClick:()=>n(i.id),selected:e===i.id,children:g(Il,{primary:i.name})})},i.id))})},fqe=({headerLabel:t,listItems:e,selectedItemId:n,handleAddAction:r,handleListClick:o})=>K(Mt,{direction:"column",children:[g(dqe,{headerLabel:t,handleAddAction:r}),g(yi,{}),g(hqe,{items:e,selectedItemId:n,handleClick:o})]}),QW=({label:t,controlValue:e,errorMessage:n,isPassword:r,isError:o,isInputFocused:i,inputRef:s,handleInputFocus:a,handleInputChange:l,handleInputBlur:c,handleInputKeyDown:u,startIcon:d,isPasswordHidden:h,handleChangePasswordVisibility:f})=>{const p=i&&o?g(le,{sx:{position:"absolute",zIndex:2,backgroundColor:"darkred",px:"2px",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"50%"},component:"span",children:g(Ke,{sx:{fontSize:"12px",color:"white"},component:"span",children:n})}):null;return g(Mt,{direction:"column",children:g(lo,{id:t.toLowerCase(),inputRef:s,size:"small",label:t,value:e,type:r&&h?"password":"input",InputProps:{startAdornment:g(qr,{position:"start",children:d}),endAdornment:r&&h?g(qr,{position:"end",children:g(tx,{onClick:f,sx:{cursor:"pointer"}})}):r&&!h?g(qr,{position:"end",children:g(nx,{onClick:f,sx:{cursor:"pointer"}})}):null},variant:"outlined",onFocus:a,onChange:l,onBlur:c,onKeyDown:u,helperText:p,error:o,sx:{"& .MuiOutlinedInput-root.Mui-focused fieldset":{borderColor:so},"& .MuiInputLabel-root.Mui-focused":{color:so}}})})},lw=({label:t})=>g(le,{sx:{textAlign:"center",width:"100%"},children:g(Ke,{variant:"h5",noWrap:!0,sx:{flex:15,mb:1},children:t})}),mR=({isOpen:t,handleCancel:e,sx:n,children:r,isCloseOnBackDropClickEnabled:o=!1})=>g(Iu,{open:t,onClose:(i,s)=>{(s==="backdropClick"&&o||s==="escapeKeyDown")&&e()},fullWidth:!0,sx:n,children:r}),Au=({id:t,label:e,handleClick:n,isEnabled:r=!0,sx:o,startIcon:i,tooltip:s=""})=>{const a=md(tt,.8);return g(rn,{title:s,children:g(Sn,{id:t,variant:"contained",sx:{color:"white",backgroundColor:tt,"&:hover":{backgroundColor:a},my:"5px",whiteSpace:"normal",textAlign:"center",lineHeight:1.5,height:"auto",py:1,...o},startIcon:i,disabled:!r,onClick:n,children:e})})},FF=({isOpen:t,headerLabel:e,submitLabel:n,inputLabel:r,inputIcon:o,existingNames:i,initialValue:s="",handleCloseModal:a,handleSubmitAction:l})=>{const c="Cancel",u="Name already exists",d="Name cannot be blank",[h,f]=C.useState(s),[p,m]=C.useState(!1),[y,v]=C.useState(!1),b=C.useRef(null),S=!h||h.trim()==="",w=i.some($=>$.toLowerCase()===h.toLowerCase()),A=!(S||w),_=y&&!A,P=w?u:S?d:"",R=()=>{m(!0),v(!0)},O=$=>{f($.target.value)},N=()=>{m(!1)},M=$=>{$.key==="Enter"&&($.preventDefault(),N(),b.current?.blur())},L=()=>
345{l(h.trim()),a()},F=[{id:"cancel",label:c,handleClick:()=>a(),isEnabled:!0,sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"submit",label:n,handleClick:()=>L(),isEnabled:A,sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:1}}];return g(mR,{isOpen:t,handleCancel:a,sx:{},children:K(Mt,{direction:"column",sx:{p:2},children:[g(lw,{label:e}),g(QW,{label:r,controlValue:h,errorMessage:P,isPassword:!1,isPasswordHidden:!1,isError:_,isInputFocused:p,inputRef:b,handleInputFocus:R,handleInputChange:O,handleInputBlur:N,handleInputKeyDown:M,handleChangePasswordVisibility:()=>null,startIcon:o}),g(Mt,{direction:"row",spacing:.5,sx:{mt:2,justifyContent:"flex-end"},children:F.map($=>g(Au,{id:$.id,label:$.label,handleClick:$.handleClick,isEnabled:$.isEnabled,sx:$.sx},$.id))})]})})},pqe=({activeTab:t})=>{const e="Group",n="Project Collaboration",r="240px",o=Yn(),i=bt(Xx),s=bt(pG),a=pR.getAll(),l=QL.getAll(),[c,{isLoading:u}]=R9e(),[d,{isLoading:h}]=Z7e(),[f,p]=C.useState(!1),m=()=>a.map(O=>({id:O.id.toString(),name:O.name})),y=t===Ri.GROUP||t===Ri.COLLABORATION,v=t===Ri.GROUP?e:n,b=t===Ri.GROUP?m():l,S=t===Ri.GROUP?i.toString():s,w=t===Ri.GROUP?a.map(O=>O.name):l.map(O=>O.name),A=()=>{p(!0)},_=()=>{p(!1)},P=O=>{if(t===Ri.GROUP)c({name:O});else{const N=cqe.getCreatePayload({name:O});d({requestBody:N})}},R=O=>{if(t===Ri.GROUP){const N=parseInt(O);o(Qk(N))}else o(M3(O))};return C.useEffect(()=>{!s&&l.length&&o(M3(l[0].id))},[s,l]),u||h?g(tl,{}):K(To,{sx:{height:"100%",width:r,borderRight:"1px solid lightgrey",overflowY:"auto",overflowX:"hidden",zIndex:2},children:[y?g(fqe,{headerLabel:v,listItems:b,selectedItemId:S,handleAddAction:A,handleListClick:R}):null,!!f&&g(FF,{isOpen:f,headerLabel:`Add ${v}`,submitLabel:"Add",inputLabel:`New ${v} Name`,inputIcon:g(eS,{}),existingNames:w,handleCloseModal:_,handleSubmitAction:P},v)]})},gqe=({controlValue:t,controlSX:e,onChangeHandler:n,controlChangeParameter:r,controlChangeKey:o,disabled:i,size:s="small"})=>g(zb,{checked:t,value:t,size:s,sx:{height:"24px","& .MuiButtonBase-root":{height:"inherit"},...e},onChange:(a,l)=>n({parameter:r,key:o,value:l}),disabled:i}),mqe=({controlValue:t,controlSX:e,onChangeHandler:n,controlChangeParameter:r,controlChangeKey:o,options:i,disabledOption:s,colorPicker:a=!1,maxValue:l,placeholder:c="",units:u="",disabled:d})=>K(xa,{error:!!(l&&t>l),value:t,displayEmpty:!0,placeholder:c,endAdornment:g(qr,{position:"end",sx:{mr:2},children:u}),sx:{width:"50%",height:"24px",fontSize:"12px","& .color-picker":{mt:"2px",height:16,backgroundColor:a?t:"inherit"},...e},onChange:h=>n({parameter:r,key:o,value:h.target.value}),disabled:d,children:[!t&&c?g(mr,{disabled:!0,value:"",children:g("em",{children:c})}):null,i.map(({key:h,value:f,displayName:p,text:m,disabled:y})=>s&&s===h?null:g(mr,{value:f,disabled:!!(l&&f>l)||y,sx:{fontSize:"12px",backgroundColor:a?f:"inherit","&.MuiButtonBase-root.Mui-selected":{backgroundColor:a?f:""},"&:hover":{backgroundColor:a?f:"",opacity:a?.65:1}},children:a?g(le,{className:"color-picker",sx:{height:"8px"}}):m||p||f},h))]}),yqe=({controlValue:t,controlSX:e,onChangeHandler:n,controlChangeParameter:r,controlChangeKey:o})=>g(_u,{checked:t,sx:{width:"50%",...e},onChange:i=>n({parameter:r,key:o,value:i.target.checked})}),vqe=({controlValue:t,controlSX:e,onChangeHandler:n,controlChangeParameter:r,controlChangeKey:o,textFieldLabel:i="",InputPropsOverride:s={type:"text"},inputPropsOverride:a={},disabled:l,variant:c="outlined",error:u=!1,helperText:d="",multiline:h=!1,maxRows:f=1})=>g(lo,{id:`outstanding-write-number-${Uo()}`,value:t,sx:{width:"50%",height:"24px","& .MuiInputBase-root":{height:"inherit",fontSize:"12px"},...e},multiline:h,maxRows:f,error:u,helperText:d,label:i,InputProps:{...s},inputProps:{...a},variant:c,onChange:p=>{n(r||o?{parameter:r,key:o,value:p.target.value}:p.target.value)},disabled:l}),bqe={switch:gqe,select:mqe,textField:vqe,checkBox:yqe},d4={switch:"switch",select:"select",textField:"textField",checkBox:"checkBox"},h4=({label:t="",labelPlacement:e="start",fclSX:n={},controlType:r,...o})=>{const i=bqe[r];return t?g(ec,{value:t,label:t,className:"form-control-label-wrapper with-label",labelPlacement:e,sx:{dis
345play:"flex",justifyContent:"space-between",height:32,mr:2,pt:.5,pb:.5,"& .MuiFormControlLabel-label":{"&:hover":{cursor:"default"}},...n},control:g(i,{...o}),componentsProps:{typography:{fontSize:"12px"}}}):g(i,{...o})},Cqe=({open:t,anchorEl:e,closeConfirmPopover:n,deleteInfo:r="user",confirmHandler:o})=>{const i=C.useCallback(()=>{n()},[]),s=C.useCallback(()=>{o()},[]);return g(lR,{id:"delete-user-confirm-popover",open:t,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transitionDuration:1,children:K(To,{className:"paper",children:[g(eg,{children:`Confirm deletion of ${r}`}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:i,children:"Cancel"}),g(Sn,{variant:"contained",color:"error",onClick:s,children:"Delete"})]})]})})},Sqe=()=>{const t=Yn(),e=bt(Dc),n=bt(qx),r=bt(n?Xx:fG),o=bt(TNe),i=bt(tae),{data:s=[],error:a,isLoading:l}=HW(r),[c,u]=C.useState(null),[d,h]=C.useState(""),[f,p]=C.useState(Xh.ASSIGN),[m,y]=C.useState(!1),[v,{isLoading:b,error:S}]=rue(),[w,{isLoading:A,error:_}]=N9e(),P=f===Xh.ASSIGN&&!d||!m,R=C.useMemo(()=>s&&i.userId?s.reduce(($,D)=>(D.id!==i.userId&&$.push({key:D.id,value:D.email}),$),[]):[],[s,i.userId]),O=$=>{const D=$.target.value;D!==f&&(y(!1),p(D),h(""))},N=C.useCallback(()=>{t(Jk()),u(null)},[]),M=C.useCallback(({id:$,assignToId:D})=>{if(L(),D){w({groupId:r,ownerId:$,assignToUserId:D,adminUserId:e.id}).then(()=>{N()}).catch(k=>{});return}v({groupId:r,userId:$}).then(()=>{N()}).catch(k=>{})},[r,e]),L=C.useCallback(()=>{u(null)},[]),F=C.useCallback(()=>{M({id:i.userId,assignToId:d&&R.find($=>$.value===d)?.key||null})},[i.userId,d,R]);return C.useEffect(()=>{o&&(h(""),y(!1))},[o]),K(Iu,{open:o,onClose:N,fullWidth:!0,sx:{"& .MuiPaper-root":{maxWidth:{sx:"80vw",md:"60vw",lg:"40vw"}},"& .MuiDialogContent-root":{height:"inherit",overflowY:"hidden"}},children:[A||b?g(tl,{}):null,g(eg,{children:`Delete User ${i.email}`}),g(yi,{}),g(ZC,{children:K(le,{sx:{p:2,height:"inherit",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[g(le,{children:K(le,{sx:{display:"flex",flexDirection:"column"},children:[g(ec,{control:g(jI,{checked:f===Xh.ASSIGN,onChange:O,value:Xh.ASSIGN}),label:rD.DELETE_USER_AND_REASSIGN_PROJECTS}),f===Xh.ASSIGN&&R.length?g(le,{sx:{display:"flex",flexDirection:"column",gap:2},children:g(le,{sx:{display:"flex",alignItems:"center",marginLeft:3.5},children:g(h4,{controlType:d4.select,onChangeHandler:({value:$})=>h($),controlValue:d||"",options:R,placeholder:rD.SELECT_USER_TO_ASSIGN_PROJECTS})})}):null,g(ec,{checked:f===Xh.DELETE,value:Xh.DELETE,control:g(jI,{checked:f===Xh.DELETE,value:Xh.DELETE,onChange:O}),label:rD.DELETE_USER_AND_PROJECTS})]})}),g(ec,{label:Y7e[f],sx:{"& .MuiFormControlLabel-label":{fontWeight:"bold"}},control:g(_u,{checked:m,onChange:$=>{y($.target.checked)}})})]})}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:N,children:KL.CANCEL}),g(Sn,{variant:"contained",color:"error",disabled:P,type:"submit",onClick:$=>u($.currentTarget),children:KL.DELETE})]}),c?g(Cqe,{open:!!c,anchorEl:c,closeConfirmPopover:L,confirmHandler:F,deleteInfo:i.email}):null]})};var ZW={},Eqe=hr;
345Object.defineProperty(ZW,"__esModule",{value:!0});var Rue=ZW.default=void 0,xqe=Eqe(yr()),wqe=vr;Rue=ZW.default=(0,xqe.default)((0,wqe.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");var JW={},Aqe=hr;Object.defineProperty(JW,"__esModule",{value:!0});var ej=JW.default=void 0,Tqe=Aqe(yr()),_qe=vr;ej=JW.default=(0,Tqe.default)((0,_qe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var tj={},Iqe=hr;Object.defineProperty(tj,"__esModule",{value:!0});var Oue=tj.default=void 0,Pqe=Iqe(yr()),Rqe=vr;Oue=tj.default=(0,Pqe.default)((0,Rqe.jsx)("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92"}),"Share");var nj={},Oqe=hr;Object.defineProperty(nj,"__esModule",{value:!0});var Nue=nj.default=void 0,Nqe=Oqe(yr()),Mqe=vr;Nue=nj.default=(0,Nqe.default)((0,Mqe.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var rj={},Dqe=hr;Object.defineProperty(rj,"__esModule",{value:!0});var Mue=rj.default=void 0,Lqe=Dqe(yr()),kqe=vr;Mue=rj.default=(0,Lqe.default)((0,kqe.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var oj={},Fqe=hr;Object.defineProperty(oj,"__esModule",{value:!0});var ZL=oj.default=void 0,Bqe=Fqe(yr()),$qe=vr;ZL=oj.default=(0,Bqe.default)((0,$qe.jsx)("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder");var ij={},Hqe=hr;Object.defineProperty(ij,"__esModule",{value:!0});var Due=ij.default=void 0,Uqe=Hqe(yr()),zqe=vr;Due=ij.default=(0,Uqe.default)((0,zqe.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-2 12H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z"}),"Message");var sj={},Vqe=hr;Object.defineProperty(sj,"__esModule",{value:!0});var Lue=sj.default=void 0,Gqe=Vqe(yr()),Wqe=vr;Lue=sj.default=(0,Gqe.default)((0,Wqe.jsx)("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune");var aj={},jqe=hr;Object.defineProperty(aj,"__esModule",{value:!0});var lj=aj.default=void 0,qqe=jqe(yr()),Yqe=vr;lj=aj.default=(0,qqe.default)((0,Yqe.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var cj={},Xqe=hr;Object.defineProperty(cj,"__esModule",{value:!0});var kue=cj.default=void 0,Kqe=Xqe(yr()),Qqe=vr;kue=cj.default=(0,Kqe.default)((0,Qqe.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle");var uj={},Zqe=hr;Object.defineProperty(uj,"__esModule",{value:!0});var Fue=uj.default=void 0,Jqe=Zqe(yr()),sQ=vr;Fue=uj.default=(0,Jqe.default)([(0,sQ.jsx)("path",{d:"M3 6H1v13c0 1.1.9 2 2 2h17v-2H3z"},"0"),(0,sQ.jsx)("path",{d:"M21 4h-7l-2-2H7c-1.1 0-1.99.9-1.99 2L5 15c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2"},"1")],"FolderCopy");var dj={},eYe=hr;Object.defineProperty(dj,"__esModule",{value:!0});var Bue=dj.default=void 0,tYe=eYe(yr()),nYe=vr;Bue=dj.default=(0,tYe.default)((0,nYe.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");var hj={},rYe=hr;Object.defineProperty(hj,"__esModule",{value:!0});var $ue=hj.default=void 0,oYe=rYe(yr()),iYe=vr;$ue=hj.default=(0,oYe.default)((0,iYe.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"FileDownload");var fj={},sYe=hr;Object.defineProperty(fj,"__esModule",{value:!0});var Hue=fj.default=void 0,aYe=sYe(yr()),lYe=vr;Hue=fj.default=(0,aYe.default)((0,lYe.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");var pj={},cYe=hr;Object.defineProperty(pj,"__esModule",{value:!0});var Uue=pj.default=void 0,uYe=cYe(yr()),dYe=vr;Uue=pj.default=(0,uYe.default)((0,dYe.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z"}),"CreateNewFolder");var gj={},hYe=hr;Object.defineProperty(gj,"__esModule",{value:!0});var zue=gj.default=void 0,fYe=hYe(yr()),pYe=vr;zue=gj.default=(0,fYe.default)((0,pYe.jsx)("path",{d:"M5 15H3v4c0 1.1.9 2 2 2h4v-2H5zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2m0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"CenterFocusWeak");var mj={},gYe=hr;Object.defineProperty(mj,"__esModule",{value:!0});var Vue=mj.default=void 0,mYe=gYe(yr()),yYe=vr;Vue=mj.default=(0,mYe.default)((0,yYe.jsx)("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m-7 7H3v4c0 1.1.9 2 2 2h4v-2H5zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2m0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2z"}),"CenterFocusStrong");var yj={},vYe=hr;Object.defineProperty(yj,"__esModule",{value:!0});var Gue=yj.default=void 0,bYe=vYe(yr()),CYe=vr;Gue=yj.default=(0,bYe.default)((0,CYe.jsx)("path",{d:"M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5M9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v
345-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13"}),"SupervisorAccount");var vj={},SYe=hr;Object.defineProperty(vj,"__esModule",{value:!0});var Wue=vj.default=void 0,EYe=SYe(yr()),xYe=vr;Wue=vj.default=(0,EYe.default)((0,xYe.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");var bj={},wYe=hr;Object.defineProperty(bj,"__esModule",{value:!0});var jue=bj.default=void 0,AYe=wYe(yr()),TYe=vr;jue=bj.default=(0,AYe.default)((0,TYe.jsx)("path",{d:"m19.93 8.21-3.6 1.68L14 7.7V6.3l2.33-2.19 3.6 1.68c.38.18.82.01 1-.36.18-.38.01-.82-.36-1L16.65 2.6c-.38-.18-.83-.1-1.13.2l-1.74 1.6c-.18-.24-.46-.4-.78-.4-.55 0-1 .45-1 1v1H8.82C8.34 4.65 6.98 3.73 5.4 4.07c-1.16.25-2.15 1.25-2.36 2.43-.22 1.32.46 2.47 1.48 3.08L7.08 18H4v3h13v-3h-3.62L8.41 8.77c.17-.24.31-.49.41-.77H12v1c0 .55.45 1 1 1 .32 0 .6-.16.78-.4l1.74 1.6c.3.3.75.38 1.13.2l3.92-1.83c.38-.18.54-.62.36-1-.18-.37-.62-.54-1-.36M6 8c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"PrecisionManufacturing");var Cj={},_Ye=hr;Object.defineProperty(Cj,"__esModule",{value:!0});var que=Cj.default=void 0,IYe=_Ye(yr()),PYe=vr;que=Cj.default=(0,IYe.default)((0,PYe.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download");var Sj={},RYe=hr;Object.defineProperty(Sj,"__esModule",{value:!0});var Yue=Sj.default=void 0,OYe=RYe(yr()),NYe=vr;Yue=Sj.default=(0,OYe.default)((0,NYe.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload");var Ej={},MYe=hr;Object.defineProperty(Ej,"__esModule",{value:!0});var Xue=Ej.default=void 0,DYe=MYe(yr()),LYe=vr;Xue=Ej.default=(0,DYe.default)((0,LYe.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore");var xj={},kYe=hr;Object.defineProperty(xj,"__esModule",{value:!0});var Kue=xj.default=void 0,FYe=kYe(yr()),BYe=vr;Kue=xj.default=(0,FYe.default)((0,BYe.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");var wj={},$Ye=hr;Object.defineProperty(wj,"__esModule",{value:!0});var Aj=wj.default=void 0,HYe=$Ye(yr()),UYe=vr;Aj=wj.default=(0,HYe.default)((0,UYe.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");const zYe="0 0 16 16",BF=t=>g(Hp,{viewBox:zYe,...t,children:g("path",{d:"m14,9.5c.83,0,1.5-.67,1.5-1.5s-.67-1.5-1.5-1.5h-1.5v-1h1.5c.83,0,1.5-.67,1.5-1.5s-.67-1.5-1.5-1.5h-1.5v-.5c0-1.1-.9-2-2-2h-5c-1.1,0-2,.9-2,2v.5h-1.5c-.83,0-1.5.67-1.5,1.5s.67,1.5,1.5,1.5h1.5v1h-1.5c-.83,0-1.5.67-1.5,1.5s.67,1.5,1.5,1.5h1.5v1h-1.5c-.83,0-1.5.67-1.5,1.5s.67,1.5,1.5,1.5h1.5v.5c0,1.1.9,2,2,2h5c1.1,0,2-.9,2-2v-.5h1.5c.83,0,1.5-.67,1.5-1.5s-.67-1.5-1.5-1.5h-1.5v-1h1.5Z"})}),$F=({invert:t,size:e=16,fill:n="black",...r})=>K(Hp,{className:"target-icon",viewBox:`0 0 ${e} ${e}`,...r,children:[g("rect",{width:e,height:e/2,x:0,y:e/4,rx:e/8,ry:e/8,fill:t?"white":n,stroke:t?"white":n}),g("rect",{width:e/2,height:e/2-2,y:e/4+1,x:e/4,fill:t?n:"white"})]}),Tj=({invert:t,size:e=16,fill:n="#00b8c7",...r})=>K(Hp,{className:"target-icon",viewBox:`0 0 ${e} ${e}`,...r,children:[g("g",{children:g("rect",{width:e,height:e,rx:e/4,ry:e/4,fill:t?"white":n})}),g("circle",{cx:e/2,cy:e/2,r:e/4,fill:t?n:"white"})]}),_j=({invert:t,size:e=16,fill:n="#149696",...r})=>K(Hp,{className:"default-target-icon",viewBox:`0 0 ${e} ${e}`,...r,children:[g("g",{children:g("rect",{width:e,height:e,rx:e/4,ry:e/4,fill:t?"white":n})}),g("rect",{width:e/4,height:e/4,x:e/4,y:e/4,fill:t?n:"white"}),g("rect",{width:e/4,height:e/4,x:e/2,y:e/2,fill:t?n:"white"}),g("circle",{cx:e/2,cy:e/2,r:e/4,stroke:t?n:"white",fillOpacity:"0"}),g("circle",{cx:e/2,cy:e/2,r:e/4+1,stroke:t?"white":n,strokeWidth:e/8,fillOpacity:"0"})]}),Que=({invert:t,size:e=16,fill:n="#00b8c7",...r})=>K(Hp,{className:"virtual-target-icon",viewBox:`0 0 ${e} ${e}`,...r,children:[g("g",{children:g("rect",{width:e,height:e,rx:e/4,ry:e/4,fill:t?"white":n})}),g("circle",{cx:e/2,cy:e/2,r:e/4,fill:t?n:"white"}),g("polyline",{points:`${e/4+e/16},${e/4} ${e/2},${e*3/4+e/16} ${e*3/4-e/16},${e/4}`,fillOpacity:"0",stroke:t?"white":n,strokeWidth:e/16})]}),Su={editIcon:Rue,closeIcon:ej,defaultTarget:_j,cancelIcon:Nue,configIcon:Lue,initiators:lj,acceptIcon:Bue,deleteIcon:Hue,createFolderIcon:Uue,zoomToComponentIcon:zue,fitComponentsIcon:Vue,fileDownloadIcon:$ue,adminIcon:Gue,replayIcon:Mue,commentIcon:Due,addIcon:kue,shareIcon:Oue,folderIcon:ZL,topologies:ZL,bridges:$F,copyIcon:Fue,expandMoreIcon:Wue,virtualTargets:Que,precisionManufacturingIcon:jue,downloadIcon:que,cloudUploadIcon:Yue,navigateBeforeIcon:Xue,navigateNextIcon:Kue,starIcon:Aj,routers:BF,targets:Tj,history:B6e},wa={routers:"routers",targets:"targets",editIcon:"editIcon",closeIcon:"closeIcon",adminIcon:"adminIcon",replayIcon:"replayIcon",initiators:"initiators",cancelIcon:"cancelIcon",deleteIcon:"deleteIcon",acceptIcon:"acceptIcon",configIcon:"configIcon",createFolderIcon:"createFolderIcon",zoomToComponentIcon:"zoomToComponentIcon",fitComponentsIcon:"fitComponentsIcon",fileDownloadIcon:"fileDownloadIcon",addIcon:"addIcon",shareIcon:"shareIcon",folderIcon:"folderIcon",topologies:"folderIcon",bridges:"linearScaleIcon",copyIcon:"copyIcon",expandMoreIcon:"expandMoreIcon",virtualTargets:"virtualTargets",precisionManufacturingIcon:"precisionManufacturingIcon",downloadIcon:"downloadIcon",cloudUploadIcon:"cloudUploadIcon",
345navigateBeforeIcon:"navigateBeforeIcon",navigateNextIcon:"navigateNextIcon",starIcon:"starIcon",history:"history"},Vp=({fontSize:t="small",tooltipProps:e=!1,IconButtonProps:n={},IconButtonPropsSx:r,iconProps:o={},iconPropsSx:i,iconType:s})=>{const a=Su[s],l=g(Di,{...n,sx:{"&.Mui-disabled":{pointerEvent:"none",color:"grey",opacity:.35},...r},children:g(a,{fontSize:t,...o,sx:{...i}})});return e?g(rn,{...e,children:l}):g(gr,{children:l})},Zue=C.createContext(void 0);function br(){const t=C.useContext(Zue);if(t===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` 346`));return t}const Jue=C.createContext(void 0),yn=()=>{const t=C.useContext(Jue);if(!t)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return t};function ae(){return ae=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ae.apply(null,arguments)}const VYe=parseInt(C.version,10),Kr=t=>{if(VYe>=19){const e=n=>t(n,n.ref??null);return e.displayName=t.displayName??t.name,e}return C.forwardRef(t)};function Dr(t,e,n=void 0){const r={};for(const o in t){const i=t[o];let s="",a=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(s+=(a===!0?"":" ")+e(c),a=!1,n&&n[c]&&(s+=" "+n[c]))}r[o]=s}return r}var JL=Symbol("NOT_FOUND");function GYe(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function WYe(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function jYe(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var aQ=t=>Array.isArray(t)?t:[t];function qYe(t){const e=Array.isArray(t[0])?t[0]:t;return jYe(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function YYe(t,e){const n=[],{length:r}=t;for(let o=0;o<r;o++)n.push(t[o].apply(null,e));return n}function XYe(t){let e;return{get(n){return e&&t(e.key,n)?e.value:JL},put(n,r){e={key:n,value:r}},getEntries(){return e?[e]:[]},clear(){e=void 0}}}function KYe(t,e){let n=[];function r(a){const l=n.findIndex(c=>e(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return JL}function o(a,l){r(a)===JL&&(n.unshift({key:a,value:l}),n.length>t&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var QYe=(t,e)=>t===e;function ZYe(t){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!t(n[i],r[i]))return!1;return!0}}function ede(t,e){const n=typeof e=="object"?e:{equalityCheck:e},{equalityCheck:r=QYe,maxSize:o=1,resultEqualityCheck:i}=n,s=ZYe(r);let a=0;const l=o<=1?XYe(s):KYe(o,s);function c(){let u=l.get(arguments);if(u===JL){if(u=t.apply(null,arguments),a++,i){const h=l.getEntries().find(f=>i(f.value,u));h&&(u=h.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var JYe=class{constructor(t){this.value=t}deref(){return this.value}},eXe=typeof WeakRef<"u"?WeakRef:JYe,tXe=0,lQ=1;function LN(){return{s:tXe,v:void 0,o:null,p:null}}function tde(t,e={}){let n=LN();const{resultEqualityCheck:r}=e;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,h=l;d<h;d++){const f=arguments[d];if(typeof f=="function"||typeof f=="object"&&f!==null){let p=a.o;p===null&&(a.o=p=new WeakMap);const m=p.get(f);m===void 0?(a=LN(),p.set(f,a)):a=m}else{let p=a.p;p===null&&(a.p=p=new Map);const m=p.get(f);m===void 0?(a=LN(),p.set(f,a)):a=m}}const c=a;let u;if(a.s===lQ)u=a.v;else if(u=t.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new eXe(u):u}return c.s=lQ,c.v=u,u}return s.clearCache=()=>{n=LN(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}
346function nde(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),GYe(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:f=tde,argsMemoizeOptions:p=[],devModeChecks:m={}}=u,y=aQ(h),v=aQ(p),b=qYe(o),S=d(function(){return i++,c.apply(null,arguments)},...y),w=f(function(){s++;const _=YYe(b,arguments);return a=S.apply(null,_),a},...v);return Object.assign(w,{resultFunc:c,memoizedResultFunc:S,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var rde=nde(tde),nXe=Object.assign((t,e=rde)=>{WYe(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(i=>t[i]);return e(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>nXe});const rXe=Object.is;function ode(t,e){if(t===e)return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;let n=0,r=0;for(const o in t)if(n+=1,!rXe(t[o],e[o])||!(o in e))return!1;for(const o in e)r+=1;return n===r}const cQ={};function If(t,e){const n=C.useRef(cQ);return n.current===cQ&&(n.current=t(e)),n}function ide(t){return t.acceptsApiRef}function uQ(t,e){return ide(e)?e(t):e(t.current.state)}function i5(t,e,n,r){return ide(e)?e(t,n):e(t.current.state,r)}const sde=Object.is,Ij=ode,oXe=(t,e)=>t===e?!0:t.length===e.length&&t.every((n,r)=>n===e[r]),iXe=(t,e)=>{let n=Object.is;return e instanceof Array?n=oXe:e instanceof Object&&(n=Ij),n(t,e)},ade=()=>({state:null,equals:null,selector:null,args:void 0}),e2=[],lde=()=>null,St=(t,e,n=sde)=>{const r=If(ade),o=r.current.selector!==null,[i,s]=C.useState(o?null:uQ(t,e));r.current.state=i,r.current.equals=n,r.current.selector=e;const a=C.useCallback(()=>(r.current.subscription||(r.current.subscription=t.current.store.subscribe(()=>{const c=uQ(t,r.current.selector);r.current.equals(r.current.state,c)||(r.current.state=c,s(c))})),null),e2),l=C.useCallback(()=>()=>{r.current.subscription&&(r.current.subscription(),r.current.subscription=void 0)},e2);return Sk.useSyncExternalStore(l,a,lde),i},ZI=(t,e,n=void 0,r=sde)=>
346{const o=If(ade),i=o.current.selector!==null,[s,a]=C.useState(i?null:i5(t,e,n,t.current.instanceId));o.current.state=s,o.current.equals=r,o.current.selector=e;const l=o.current.args;if(o.current.args=n,i&&!iXe(l,n)){const d=i5(t,o.current.selector,o.current.args,t.current.instanceId);o.current.equals(o.current.state,d)||(o.current.state=d,a(d))}const c=C.useCallback(()=>(o.current.subscription||(o.current.subscription=t.current.store.subscribe(()=>{const d=i5(t,o.current.selector,o.current.args,t.current.instanceId);o.current.equals(o.current.state,d)||(o.current.state=d,a(d))})),null),e2),u=C.useCallback(()=>()=>{o.current.subscription&&(o.current.subscription(),o.current.subscription=void 0)},e2);return Sk.useSyncExternalStore(u,c,lde),s},sXe=nde({memoize:ede,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),dQ=new WeakMap;function af(t){return"current"in t&&"instanceId"in t.current}const lf={id:"default"},Dn=(t,e,n,r,o,i,...s)=>{if(s.length>0)throw new Error("Unsupported number of selectors");let a;if(t&&e&&n&&r&&o&&i)a=(l,c)=>{const u=af(l),d=c??(u?l.current.instanceId:lf),h=u?l.current.state:l,f=t(h,d),p=e(h,d),m=n(h,d),y=r(h,d),v=o(h,d);return i(f,p,m,y,v)};else if(t&&e&&n&&r&&o)a=(l,c)=>{const u=af(l),d=c??(u?l.current.instanceId:lf),h=u?l.current.state:l,f=t(h,d),p=e(h,d),m=n(h,d),y=r(h,d);return o(f,p,m,y)};else if(t&&e&&n&&r)a=(l,c)=>{const u=af(l),d=c??(u?l.current.instanceId:lf),h=u?l.current.state:l,f=t(h,d),p=e(h,d),m=n(h,d);return r(f,p,m)};else if(t&&e&&n)a=(l,c)=>{const u=af(l),d=c??(u?l.current.instanceId:lf),h=u?l.current.state:l,f=t(h,d),p=e(h,d);return n(f,p)};else if(t&&e)a=(l,c)=>{const u=af(l),d=c??(u?l.current.instanceId:lf),h=u?l.current.state:l,f=t(h,d);return e(f)};else throw new Error("Missing arguments");return a.acceptsApiRef=!0,a},yR=(t,e,n,r,o,i,...s)=>{if(s.length>0)throw new Error("Unsupported number of selectors");let a;if(t&&e&&n&&r&&o&&i)a=(l,c,u)=>{const d=af(l),h=u??(d?l.current.instanceId:lf),f=d?l.current.state:l,p=t(f,c,h),m=e(f,c,h),y=n(f,c,h),v=r(f,c,h),b=o(f,c,h);return i(p,m,y,v,b,c)};else if(t&&e&&n&&r&&o)a=(l,c,u)=>{const d=af(l),h=u??(d?l.current.instanceId:lf),f=d?l.current.state:l,p=t(f,c,h),m=e(f,c,h),y=n(f,c,h),v=r(f,c,h);return o(p,m,y,v,c)};else if(t&&e&&n&&r)a=(l,c,u)=>{const d=af(l),h=u??(d?l.current.instanceId:lf),f=d?l.current.state:l,p=t(f,c,h),m=e(f,c,h),y=n(f,c,h);return r(p,m,y,c)};else if(t&&e&&n)a=(l,c,u)=>{const d=af(l),h=u??(d?l.current.instanceId:lf),f=d?l.current.state:l,p=t(f,c,h),m=e(f,c,h);return n(p,m,c)};else if(t&&e)a=(l,c,u)=>{const d=af(l),h=u??(d?l.current.instanceId:lf),f=d?l.current.state:l,p=t(f,c,h);return e(p,c)};else throw new Error("Missing arguments");return a.acceptsApiRef=!0,a},co=(...t)=>{const e=(n,r)=>{const o=af(n),i=o?n.current.instanceId:r??lf,s=o?n.current.state:n,a=dQ.get(i),l=a??new Map,c=l?.get(t);if(l&&c)return c(s,i);const u=sXe(...t);return a||dQ.set(i,l),l.set(t,u),u(s,i)};return e.acceptsApiRef=!0,e},qa=t=>t.dimensions,HF=Dn(qa,t=>t.columnsTotalWidth),Pj=t=>t.dimensions.rowHeight,aXe=t=>t.dimensions.contentSize.height,lXe=t=>t.dimensions.hasScrollX,cXe=t=>t.dimensions.hasScrollY,cde=t=>t.dimensions.columnsTotalWidth<t.dimensions.viewportOuterSize.width,uXe=t=>t.dimensions.headerHeight,dXe=t=>t.dimensions.groupHeaderHeight,ude=t=>t.dimensions.hasScrollY?t.dimensions.scrollbarSize:0,hXe=t=>{const e=t.dimensions.hasScrollX?t.dimensions.scrollbarSize:0,n=t.dimensions.viewportOuterSize.height-t.dimensions.minimumSize.height>0;return!(e===0&&!n)};function fXe(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function vR(t){if(typeof t!="string")throw new Error(fXe(7));return t.charAt(0).toUpperCase()+t.slice(1)}function wv(t){return t&&t.ownerDocument||document}function pXe(t){return wv(t).defaultView||window}function gXe(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const mXe=typeof window<"u"?C.useLayoutEffect:C.useEffect,Ol=mXe;let hQ=0;function yXe(t){const[e,n]=C.useState(t),r=t||e;return C.useEffect(()=>{e==null&&(hQ+=1,n(`mui-${hQ}`))},[e]),r}const vXe={...fC},fQ=vXe.useId;function Cs(t){if(fQ!==void 0){const e=fQ();return t??e}return yXe(t)}function zi(t){const e=C.useRef(t);return Ol(()=>{e.current=t}),C.useRef((...n)=>(0,e.current)(...n)).current}function S0(...t){return C.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{gXe(n,e)})},t)}const bXe=[];function Rj(t){C.useEffect(t,bXe)}class Oj{static create(){return new Oj}currentId=null;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};
346disposeEffect=()=>this.clear}function cw(){const t=If(Oj.create).current;return Rj(t.disposeEffect),t}function dde(t,e){const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=r;if(o==="components"||o==="slots")n[o]={...t[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=t[o],s=e[o];if(!s)n[o]=i||{};else if(!i)n[o]=s;else{n[o]={...s};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=a;n[o][l]=dde(i[l],s[l])}}}else n[o]===void 0&&(n[o]=t[o])}return n}const pQ=t=>t,CXe=()=>{let t=pQ;return{configure(e){t=e},generate(e){return t(e)},reset(){t=pQ}}},SXe=CXe(),EXe=SXe,xXe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function hde(t,e,n="Mui"){const r=xXe[e];return r?`${n}-${r}`:`${EXe.generate(t)}-${e}`}function fde(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=hde(t,o,n)}),r}function Om(t){return C.memo(t,ode)}const wXe={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:t=>t!==1?`${t} active filters`:`${t} active filter`,toolbarQuickFilterPlaceholder:"Searchâ¦",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:t=>t!==1?`${t} active filters`:`${t} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:t=>
346t!==1?`${t.toLocaleString()} rows selected`:`${t.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(t,e)=>`${t.toLocaleString()} of ${e.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:t=>`Group by ${t}`,unGroupColumn:t=>`Stop grouping by ${t}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function Lr(t){return hde("MuiDataGrid",t)}const ye=fde("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLo
346adingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),gQ=1e3;let AXe=class{constructor(e=gQ){this.timeouts=new Map,this.cleanupTimeout=gQ,this.cleanupTimeout=e}register(e,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(e){const n=this.timeouts.get(e.cleanupToken);n&&(this.timeouts.delete(e.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((e,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}},TXe=class{constructor(){this.registry=new FinalizationRegistry(e=>{typeof e=="function"&&e()})}register(e,n,r){this.registry.register(e,n,r)}unregister(e){this.registry.unregister(e)}reset(){}};var mh=function(t){return t.DataGrid="DataGrid",t.DataGridPro="DataGridPro",t.DataGridPremium="DataGridPremium",t}(mh||{});let _Xe=class{};function IXe(t){let e=0;return function(r,o,i,s){t.registry===null&&(t.registry=typeof FinalizationRegistry<"u"?new TXe:new AXe);const[a]=C.useState(new _Xe),l=C.useRef(null),c=C.useRef(null);c.current=i;const u=C.useRef(null);if(!l.current&&c.current){const d=(h,f,p)=>{f.defaultMuiPrevented||c.current?.(h,f,p)};l.current=r.current.subscribeEvent(o,d,s),e+=1,u.current={cleanupToken:e},t.registry.register(a,()=>{l.current?.(),l.current=null,u.current=null},u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(t.registry.unregister(u.current),u.current=null));C.useEffect(()=>{if(!l.current&&c.current){const d=(h,f,p)=>{f.defaultMuiPrevented||c.current?.(h,f,p)};l.current=r.current.subscribeEvent(o,d,s)}return u.current&&t.registry&&(t.registry.unregister(u.current),u.current=null),()=>{l.current?.(),l.current=null}},[r,o,s])}}const PXe={registry:null},Qt=IXe(PXe),RXe={isFirst:!0};function So(t,e,n){Qt(t,e,n,RXe)}const OXe=.7,NXe=1.3,MXe={compact:OXe,comfortable:NXe,standard:1},ZE=t=>t.density,uw=Dn(ZE,t=>MXe[t]);function Tn(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}const DXe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],LXe=t=>{const{classes:e}=t;return Dr({root:["editInputCell"]},Lr,e)},kXe=$e(QC,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(t,e)=>e.editInputCell})(({theme:t})=>ae({},t.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),FXe=Kr((t,e)=>{const n=yn(),{id:r,value:o,field:i,colDef:s,hasFocus:a,debounceMs:l=200,isProcessingProps:c,onValueChange:u}=t,d=Tn(t,DXe),h=br(),f=C.useRef(null),[p,m]=C.useState(o),y=LXe(n),v=C.useCallback(async S=>{const w=S.target.value;u&&await u(S,w);const A=h.current.getColumn(i);let _=w;A.valueParser&&(_=A.valueParser(w,h.current.getRow(r),A,h)),m(_),h.current.setEditCellValue({id:r,field:i,value:_,debounceMs:l,unstable_skipValueParser:!0},S)},[h,l,i,r,u]),b=h.current.unstable_getEditCellMeta(r,i);return C.useEffect(()=>{b?.changeReason!=="debouncedSetEditCellValue"&&m(o)},[b,o]),Ol(()=>{a&&f.current.focus()},[a]),g(kXe,ae({inputRef:f,className:y.root,ownerState:n,fullWidth:!0,type:s.type==="number"?s.type:"text",value:p??"",onChange:v,endAdornment:c?g(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d,{ref:e}))}),BXe=t=>g(FXe,ae({},t)),Oh=t=>t.rows,bR=Dn(Oh,t=>t.totalRowCount),$Xe=Dn(Oh,t=>t.loading),HXe=Dn(Oh,t=>t.totalTopLevelRowCount),uh=Dn(Oh,t=>
346t.dataRowIdToModelLookup),mQ=Dn(Oh,t=>t.dataRowIdToIdLookup),ma=Dn(Oh,t=>t.tree),UXe=Dn(Oh,t=>t.groupsToFetch),zXe=Dn(Oh,t=>t.groupingName),yQ=Dn(Oh,t=>t.treeDepths),oS=co(Oh,t=>{const e=Object.entries(t.treeDepths);return e.length===0?1:(e.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]??0)+1}),WT=Dn(Oh,t=>t.dataRowIds),VXe=Dn(Oh,t=>t?.additionalRowGroups),dw=co(VXe,t=>{const e=t?.pinnedRows;return{bottom:e?.bottom?.map(n=>({id:n.id,model:n.model??{}}))??[],top:e?.top?.map(n=>({id:n.id,model:n.model??{}}))??[]}}),pde=Dn(dw,t=>(t?.top?.length||0)+(t?.bottom?.length||0)),gde=(t,e)=>e&&t.length>1?[t[0]]:t,vQ=(t,e)=>n=>ae({},n,{sorting:ae({},n.sorting,{sortModel:gde(t,e)})}),GXe=t=>t==="desc",WXe=(t,e)=>{const n=e.current.getColumn(t.field);if(!n||t.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(t.sort):r=GXe(t.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:ma(e)[i],value:e.current.getCellValue(i,n.field),api:e.current}),comparator:r}:null},jXe=(t,e,n)=>t.reduce((r,o,i)=>{if(r!==0)return r;const s=e.params[i],a=n.params[i];return r=o.comparator(s.value,a.value,s,a),r},0),qXe=(t,e)=>{const n=t.map(r=>WXe(r,e)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>jXe(n,o,i)).map(o=>o.node.id)},bQ=(t,e)=>{const n=t.indexOf(e);return!e||n===-1||n+1===t.length?t[0]:t[n+1]},Nj=(t,e)=>t==null&&e!=null?-1:e==null&&t!=null?1:t==null&&e==null?0:null,YXe=new Intl.Collator,XXe=(t,e)=>{const n=Nj(t,e);return n!==null?n:typeof t=="string"?YXe.compare(t.toString(),e.toString()):t-e},mde=(t,e)=>{const n=Nj(t,e);return n!==null?n:Number(t)-Number(e)},yde=(t,e)=>{const n=Nj(t,e);return n!==null?n:t>e?1:t<e?-1:0},KXe=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function ih(t){const{item:e,applyValue:n,type:r,apiRef:o,focusElementRef:i,tabIndex:s,disabled:a,clearButton:l,InputProps:c,variant:u="standard"}=t,d=Tn(t,KXe),h=cw(),[f,p]=C.useState(s5(e.value)),[m,y]=C.useState(!1),v=Cs(),b=yn(),S=C.useCallback(w=>{const A=s5(w.target.value);p(A),y(!0),h.start(b.filterDebounceMs,()=>{const _=ae({},e,{value:r==="number"&&!Number.isNaN(Number(A))?Number(A):A,fromInput:v});n(_),y(!1)})},[h,b.filterDebounceMs,e,r,v,n]);return C.useEffect(()=>{(e.fromInput!==v||e.value==null)&&p(s5(e.value))},[v,e]),g(b.slots.baseTextField,ae({id:v,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:f??"",onChange:S,variant:u,type:r||"text",InputProps:ae({},m||l?{endAdornment:m?g(b.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:a},c,{inputProps:ae({tabIndex:s},c?.inputProps)}),InputLabelProps:{shrink:!0},inputRef:i},d,b.slotProps?.baseTextField))}function s5(t){if(!(t==null||t===""))return String(t)}function QXe(t){return typeof t=="number"&&!Number.isNaN(t)}function ZXe(t){return typeof t=="function"}function Mj(t){return typeof t=="object"&&t!==null}function JXe(){try{const t="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch{return!1}}function t2(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const nd=(t,e,n)=>Math.max(e,Math.min(n,t));function CQ(t,e){return Array.from({length:e-t}).map((n,r)=>t+r)}function Av(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;if(Array.isArray(t)){const o=t.length;if(o!==e.length)return!1;for(let i=0;i<o;i+=1)if(!Av(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;const o=Array.from(t.entries());for(let i=0;i<o.length;i+=1)if(!e.has(o[i][0]))return!1;for(let i=0;i<o.length;i+=1){const s=o[i];if(!Av(s[1],e.get(s[0])))return!1}return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;const o=Array.from(t.entries());for(let i=0;i<o.length;i+=1)if(!e.has(o[i][0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){const o=t.length;if(o!==e.length)return!1;for(let i=0;i<o;i+=1)if(t[i]!==e[i])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t),r=n.length;if(r!==Object.keys(e).length)return!1;for(let o=0;o<r;o+=1)if(!Object.prototype.hasOwnProperty.call(e,n[o]))return!1;for(let o=0;o<r;o+=1){const i=n[o];if(!Av(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function eKe(t){return()=>{let e=t+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function tKe(t){const e=eKe(t);return(n,r)=>n+(r-n)*e()}function vde(t){return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}const Ob=(t,e)=>n=>{t&&e(n)},nKe=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],rKe=["key"];function bde(t){const{item:e,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:s,error:a,helperText:l,size:c,variant:u="standard"}=t,d=Tn(t,nKe),h={color:s,error:a,helperText:l,size:c,variant:u},[f,p]=C.useState(e.value||[]),m=Cs(),y=yn();C.useEffect(()=>{const b=e.value??[];p(b.map(String))},[e.value]);const v=C.useCallback((b,S)=>{p(S.map(String)),n(ae({},e,{value:[...S.map(w=>r==="number"?Number(w):w)]}))},[n,e,r]);return g(Fle,ae({multiple:!0,freeSolo:!0,options:[],filterOptions:(b,S)=>{const{inputValue:w}=S;return w==null||w===""?[]:[w]},id:m,value:f,onChange:v,renderTags:(b,S)=>b.map((w,A)=>{const _=S({index:A}),{key:P}=_,R=Tn(_,rKe);return g(y.slots.baseChip,ae({variant:"outlined",size:"small",label:w},R),P)}),renderInput:b=>g(y.slots.baseTextField,ae({},b,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:ae({},b.InputLabelProps,{shrink:!0}
346),inputRef:i,type:r||"text"},h,y.slotProps?.baseTextField))},d))}var Gp=function(t){return t.Cell="cell",t.Row="row",t}(Gp||{}),vo=function(t){return t.Edit="edit",t.View="view",t}(vo||{}),ui=function(t){return t.Edit="edit",t.View="view",t}(ui||{}),Ec=function(t){return t.And="and",t.Or="or",t}(Ec||{}),Rg=function(t){return t.enterKeyDown="enterKeyDown",t.cellDoubleClick="cellDoubleClick",t.printableKeyDown="printableKeyDown",t.deleteKeyDown="deleteKeyDown",t.pasteKeyDown="pasteKeyDown",t}(Rg||{}),Qh=function(t){return t.cellFocusOut="cellFocusOut",t.escapeKeyDown="escapeKeyDown",t.enterKeyDown="enterKeyDown",t.tabKeyDown="tabKeyDown",t.shiftTabKeyDown="shiftTabKeyDown",t}(Qh||{}),Oy=function(t){return t.enterKeyDown="enterKeyDown",t.cellDoubleClick="cellDoubleClick",t.printableKeyDown="printableKeyDown",t.deleteKeyDown="deleteKeyDown",t}(Oy||{}),sp=function(t){return t.rowFocusOut="rowFocusOut",t.escapeKeyDown="escapeKeyDown",t.enterKeyDown="enterKeyDown",t.tabKeyDown="tabKeyDown",t.shiftTabKeyDown="shiftTabKeyDown",t}(sp||{});function Cde(t){return t.field!==void 0}const Sde={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},JI=()=>({items:[],logicOperator:Ec.And,quickFilterValues:[],quickFilterLogicOperator:Ec.And});function Ede(t){return{current:t.current.getPublicApi()}}let Fy=function(t){return t.LEFT="left",t.RIGHT="right",t}({});const n2={left:[],right:[]},oKe=t=>t.isRtl,Np=t=>t.columns,rm=Dn(Np,t=>t.orderedFields),Nm=Dn(Np,t=>t.lookup),pf=co(rm,Nm,(t,e)=>t.map(n=>e[n])),dh=Dn(Np,t=>t.columnVisibilityModel),Qi=co(pf,dh,(t,e)=>t.filter(n=>e[n.field]!==!1)),hw=co(Qi,t=>t.map(e=>e.field)),iKe=t=>t.pinnedColumns,fw=co(Np,iKe,hw,oKe,(t,e,n,r)=>{const o=sKe(e,n,r);return{left:o.left.map(s=>t.lookup[s]),right:o.right.map(s=>t.lookup[s])}});function sKe(t,e,n){if(!Array.isArray(t.left)&&!Array.isArray(t.right)||t.left?.length===0&&t.right?.length===0)return n2;const r=(a,l)=>Array.isArray(a)?a.filter(c=>l.includes(c)):[],o=r(t.left,e),i=e.filter(a=>!o.includes(a)),s=r(t.right,i);return n?{left:s,right:o}:{left:o,right:s}}const E0=co(Qi,t=>{const e=[];let n=0;for(let r=0;r<t.length;r+=1)e.push(n),n+=t[r].computedWidth;return e}),xde=co(pf,t=>t.filter(e=>e.filterable)),aKe=co(pf,t=>t.reduce((e,n)=>(n.filterable&&(e[n.field]=n),e),{})),lKe=co(pf,t=>t.some(e=>e.colSpan!==void 0));let dT;function cKe(){if(dT!==void 0)return dT;try{dT=new Function("return true")()}catch{dT=!1}return dT}const f4=(t,e)=>{const n=ae({},t);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=Nm(e)[n.field];n.operator=r&&r.filterOperators[0].value}return n},Dj=(t,e,n)=>{const r=t.items.length>1;let o;r&&e?o=[t.items[0]]:o=t.items;const i=r&&o.some(a=>a.id==null);return o.some(a=>a.operator==null)||i?ae({},t,{items:o.map(a=>f4(a,n))}):t.items!==o?ae({},t,{items:o}):t},SQ=(t,e,n)=>r=>ae({},r,{filterModel:Dj(t,e,n)}),eP=t=>typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t,wde=(t,e)=>{if(!t.field||!t.operator)return null;const n=e.current.getColumn(t.field);if(!n)return null;let r;if(n.valueParser){const u=n.valueParser;r=Array.isArray(t.value)?t.value?.map(d=>u(d,void 0,n,e)):u(t.value,void 0,n,e)}else r=t.value;const{ignoreDiacritics:o}=e.current.rootProps;o&&(r=eP(r));const i=ae({},t,{value:r}),s=n.filterOperators;if(!s?.length)throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const a=s.find(u=>u.value===i.operator);if(!a)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=Ede(e),c=a.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:u=>{let d=e.current.getRowValue(u,n);return o&&(d=eP(d)),c(d,u,n,l)}}};let EQ=1;const uKe=(t,e,n)=>{const{items:r}=t,o=r.map(a=>wde(a,e)).filter(a=>!!a);if(o.length===0)return null;if(n||!cKe())return(a,l)=>{const c={};for(let u=0;u<o.length;u+=1){const d=o[u];(!l||l(d.item.field))&&(c[d.item.id]=d.fn(a))}return c};const i=new Function("appliers","row","shouldApplyFilter",`"use strict"; 347${o.map((a,l)=>`const shouldApply${l} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(a.item.field)});`).join(` 348`)} 349 350const result$$ = { 351${o.map((a,l)=>` ${JSON.stringify(String(a.item.id))}: !shouldApply${l} ? false : appliers[${l}].fn(row),`).join(` 352`)} 353}; 354 355return result$$;`.replaceAll("$$",String(EQ)));return EQ+=1,(a,l)=>i(o,a,l)},Ade=t=>t.quickFilterExcludeHiddenColumns??!0,dKe=(t,e)=>{const n=t.quickFilterValues?.filter(Boolean)??[];if(n.length===0)return null;const r=Ade(t)?hw(e):rm(e),o=[],{ignoreDiacritics:i}=e.current.rootProps,s=Ede(e);return r.forEach(a=>{const l=e.current.getColumn(a),c=l?.getApplyQuickFilterFn;c&&o.push({column:l,appliers:n.map(u=>{const d=i?eP(u):u;return{fn:c(d,l,s)}})})}),function(l,c){const u={};e:for(let d=0;d<n.length;d+=1){const h=n[d];for(let f=0;f<o.length;f+=1){const{column:p,appliers:m}=o[f],{field:y}=p;if(c&&!c(y))continue;const v=m[d];let b=e.current.getRowValue(l,p);if(v.fn===null)continue;if(i&&(b=eP(b)),v.fn(b,l,p,s)){u[h]=!0;continue e}}u[h]=!1}return u}},hKe=(t,e,n)=>{const r=uKe(t,e,n),o=dKe(t,e);return function(s,a,l){l.passingFilterItems=r?.(s,a)??null,l.passingQuickFilterValues=o?.(s,a)??null}},xQ=t=>t!=null,fKe=(t,e,n)=>(t.cleanedFilterItems||(t.cleanedFilterItems=n.filter(r=>wde(r,e)!==null)),t.cleanedFilterItems),pKe=(t,e,n,r,o)=>{const i=fKe(o,r,n.items),s=t.filter(xQ),a=e.filter(xQ);if(s.length>0){const l=u=>s.some(d=>d[u.id]);if((n.logicOperator??JI().logicOperator)===Ec.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(a.length>0&&n.quickFilterValues!=null){const l=u=>a.some(d=>d[u]);if((n.quickFilterLogicOperator??JI().quickFilterLogicOperator)===Ec.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},gKe=t=>
355{if(!t)return null;const e=new RegExp(t2(t),"i");return(n,r,o,i)=>{let s=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(s=eP(s)),s!=null?e.test(s.toString()):!1}},wQ=(t,e)=>n=>{if(!n.value)return null;const r=t?n.value:n.value.trim(),o=new RegExp(t2(r),"i");return i=>{if(i==null)return e;const s=o.test(String(i));return e?!s:s}},AQ=(t,e)=>n=>{if(!n.value)return null;const r=t?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return e;const s=o.compare(r,i.toString())===0;return e?!s:s}},TQ=t=>()=>e=>{const n=e===""||e==null;return t?!n:n},mKe=(t=!1)=>[{value:"contains",getApplyFilterFn:wQ(t,!1),InputComponent:ih},{value:"doesNotContain",getApplyFilterFn:wQ(t,!0),InputComponent:ih},{value:"equals",getApplyFilterFn:AQ(t,!1),InputComponent:ih},{value:"doesNotEqual",getApplyFilterFn:AQ(t,!0),InputComponent:ih},{value:"startsWith",getApplyFilterFn:e=>{if(!e.value)return null;const n=t?e.value:e.value.trim(),r=new RegExp(`^${t2(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:ih},{value:"endsWith",getApplyFilterFn:e=>{if(!e.value)return null;const n=t?e.value:e.value.trim(),r=new RegExp(`.*${t2(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:ih},{value:"isEmpty",getApplyFilterFn:TQ(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:TQ(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const n=t?e.value:e.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:bde}],gf={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:XXe,type:"string",align:"left",filterOperators:mKe(),renderEditCell:BXe,getApplyQuickFilterFn:gKe},yKe=["open","target","onClose","children","position","className","onExited"],vKe=t=>{const{classes:e}=t;return Dr({root:["menu"]},Lr,e)},bKe=$e(g0,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(t,e)=>e.menu})(({theme:t})=>({zIndex:t.zIndex.modal,[`& .${ye.menuList}`]:{outline:0}})),CKe={"bottom-start":"top left","bottom-end":"top right"};function Lj(t){const{open:e,target:n,onClose:r,children:o,position:i,className:s,onExited:a}=t,l=Tn(t,yKe),c=br(),u=yn(),d=vKe(u),h=C.useRef(null);Ol(()=>{e?h.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(h.current?.focus?.(),h.current=null)},[e]),C.useEffect(()=>{const m=e?"menuOpen":"menuClose";c.current.publishEvent(m,{target:n})},[c,e,n]);const f=m=>y=>{m&&m(),a&&a(y)},p=m=>{m.target&&(n===m.target||n?.contains(m.target))||r(m)};return g(bKe,ae({as:u.slots.basePopper,className:Ye(d.root,s),ownerState:u,open:e,anchorEl:n,transition:!0,placement:i},l,u.slotProps?.basePopper,{children:({TransitionProps:m,placement:y})=>g(ble,{onClickAway:p,mouseEvent:"onMouseDown",children:g(GI,ae({},m,{style:{transformOrigin:CKe[y]},onExited:f(m?.onExited),children:g(To,{children:o})}))})}))}const SKe=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],EKe=t=>typeof t.getActions=="function";function xKe(t){const{colDef:e,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:s}=t,a=Tn(t,SKe),[l,c]=C.useState(-1),[u,d]=C.useState(!1),h=br(),f=C.useRef(null),p=C.useRef(null),m=C.useRef(!1),y=C.useRef({}),v=ic(),b=Cs(),S=Cs(),w=yn();if(!EKe(e))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const A=e.getActions(h.current.getRowParams(n)),_=A.filter(k=>!k.props.showInMenu),P=A.filter(k=>k.props.showInMenu),R=_.length+(P.length?1:0);C.useLayoutEffect(()=>{r||Object.entries(y.current).forEach(([k,U])=>{U?.stop({},()=>{delete y.current[k]})})},[r]),C.useEffect(()=>{if(l<0||!f.current||l>=f.current.children.length)return;f.current.children[l].focus({preventScroll:!0})},[l]),C.useEffect(()=>{r||(c(-1),m.current=!1)},[r]),C.useImperativeHandle(s,()=>
355({focus(){if(!m.current){const k=A.findIndex(U=>!U.props.disabled);c(k)}}}),[A]),C.useEffect(()=>{l>=R&&c(R-1)},[l,R]);const O=()=>{d(!0),c(R-1),m.current=!0},N=()=>{d(!1)},M=()=>{u?N():O()},L=k=>U=>{y.current[k]=U},F=(k,U)=>H=>{c(k),m.current=!0,U&&U(H)},$=k=>{if(R<=1)return;const U=(V,q)=>{if(V<0||V>A.length)return V;const Q=(q==="left"?-1:1)*(v?-1:1);return A[V+Q]?.props.disabled?U(V+Q,q):V+Q};let H=l;k.key==="ArrowRight"?H=U(l,"right"):k.key==="ArrowLeft"&&(H=U(l,"left")),!(H<0||H>=R)&&H!==l&&(k.preventDefault(),k.stopPropagation(),c(H))},D=k=>{k.key==="Tab"&&k.preventDefault(),["Tab","Escape"].includes(k.key)&&N()};return K("div",ae({role:"menu",ref:f,tabIndex:-1,className:ye.actionsCell,onKeyDown:$},a,{children:[_.map((k,U)=>C.cloneElement(k,{key:U,touchRippleRef:L(U),onClick:F(U,k.props.onClick),tabIndex:l===U?o:-1})),P.length>0&&S&&g(w.slots.baseIconButton,ae({ref:p,id:S,"aria-label":h.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?b:void 0,role:"menuitem",size:"small",onClick:M,touchRippleRef:L(S),tabIndex:l===_.length?o:-1},w.slotProps?.baseIconButton,{children:g(w.slots.moreActionsIcon,{fontSize:"small"})})),P.length>0&&g(Lj,{open:u,target:p.current,position:i,onClose:N,children:g(aR,{id:b,className:ye.menuList,onKeyDown:D,"aria-labelledby":S,variant:"menu",autoFocusItem:!0,children:P.map((k,U)=>C.cloneElement(k,{key:U,closeMenu:N}))})})]}))}const wKe=t=>g(xKe,ae({},t)),UF="actions",AKe=ae({},gf,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:wKe,getApplyQuickFilterFn:void 0}),El="auto-generated-group-node-root",ix=Symbol("mui.id_autogenerated"),TKe=()=>({type:"group",id:El,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function _Ke(t,e,n="A row was provided without id in the rows prop:"){if(t==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(e)].join(` 356`))}const zF=(t,e,n)=>{const r=e?e(t):t.id;return _Ke(r,t,n),r},oD=({rows:t,getRowId:e,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},s={};for(let a=0;a<t.length;a+=1){const l=t[a],c=zF(l,e);i[c]=l,s[c]=c,o.rows.push(c)}return{rowsBeforePartialUpdates:t,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,updates:o,dataRowIdToIdLookup:s,dataRowIdToModelLo
356okup:i}},Tde=({tree:t,rowCountProp:e=0})=>{const n=t[El];return Math.max(e,n.children.length+(n.footerId==null?0:1))},_de=({apiRef:t,rowCountProp:e=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const s=t.current.caches.rows,{tree:a,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=t.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:s.updates,dataRowIdToIdLookup:s.dataRowIdToIdLookup,dataRowIdToModelLookup:s.dataRowIdToModelLookup,previousGroupsToFetch:i}),h=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:a,treeDepths:l,dataRowIdToIdLookup:s.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:s.dataRowIdToModelLookup});return t.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},ae({},h,{totalRowCount:Math.max(e,h.dataRowIds.length),totalTopLevelRowCount:Tde({tree:h.tree,rowCountProp:e}),groupingName:u,loading:n,groupsToFetch:d})},sx=t=>t.type==="skeletonRow"||t.type==="footer"||t.type==="group"&&t.isAutoGenerated||t.type==="pinnedRow"&&t.isAutoGenerated,kj=(t,e,n)=>{const r=t[e];if(r.type!=="group")return[];const o=[];for(let i=0;i<r.children.length;i+=1){const s=r.children[i];(!n||!sx(t[s]))&&o.push(s);const a=kj(t,s,n);for(let l=0;l<a.length;l+=1)o.push(a[l])}return!n&&r.footerId!=null&&o.push(r.footerId),o},_Q=({previousCache:t,getRowId:e,updates:n,groupKeys:r})=>{if(t.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=zF(u,e,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,ae({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...t.updates.actions.insert??[]],modify:[...t.updates.actions.modify??[]],remove:[...t.updates.actions.remove??[]]},idToActionLookup:ae({},t.updates.idToActionLookup),groupKeys:r},s=ae({}
356,t.dataRowIdToModelLookup),a=ae({},t.dataRowIdToIdLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const h=i.idToActionLookup[d];if(u._action==="delete"){if(h==="remove"||!s[d])return;h!=null&&(l[h][d]=!0),i.actions.remove.push(d),delete s[d],delete a[d];return}const f=s[d];if(f){h==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):h==null&&i.actions.modify.push(d),s[d]=ae({},f,u);return}h==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):h==null&&i.actions.insert.push(d),s[d]=u,a[d]=d});const c=Object.keys(l);for(let u=0;u<c.length;u+=1){const d=c[u],h=l[d];Object.keys(h).length>0&&(i.actions[d]=i.actions[d].filter(f=>!h[f]))}return{dataRowIdToModelLookup:s,dataRowIdToIdLookup:a,updates:i,rowsBeforePartialUpdates:t.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:t.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:t.rowCountPropBeforePartialUpdates}},Ide="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function IQ(t,e,n){const r=[];return e.forEach(o=>{const i=zF(o,n,"A row was provided without id when calling updateRows():");if(t.current.getRowNode(i)?.type==="pinnedRow"){const a=t.current.caches.pinnedRows,l=a.idLookup[i];l&&(a.idLookup[i]=ae({},l,o))}else r.push(o)}),r}const Pde=(t,e,n)=>typeof t=="number"&&t>0?t:e,IKe="__tree_data_group__",Rde="__row_group_by_columns_group__",VF="__detail_panel_toggle__";let Tr=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.VIRTUAL=3]="VIRTUAL",t}({});const PKe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],RKe=t=>{const{classes:e}=t;return Dr({root:["booleanCell"]},Lr,e)};function OKe(t){const{value:e,rowNode:n}=t,r=Tn(t,PKe),o=br(),i=yn(),s={classes:i.classes},a=RKe(s),c=St(o,oS)>0&&n.type==="group"&&i.treeData===!1,u=C.useMemo(()=>e?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,e]);return c&&e===void 0?null:g(u,ae({fontSize:"small",className:a.root,titleAccess:o.current.getLocaleText(e?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!e},r))}const NKe=C.memo(OKe),MKe=t=>t.field!==Rde&&sx(t.rowNode)?"":g(NKe,ae({},t)),DKe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],LKe=t=>{const{classes:e}=t;return Dr({root:["editBooleanCell"]},Lr,e)};function kKe(t){const{id:e,value:n,field:r,className:o,hasFocus:i,onValueChange:s}=t,a=Tn(t,DKe),l=br(),c=C.useRef(null),u=Cs(),[d,h]=C.useState(n),f=yn(),p={classes:f.classes},m=LKe(p),y=C.useCallback(async v=>{const b=v.target.checked;s&&await s(v,b),h(b),await l.current.setEditCellValue({id:e,field:r,value:b},v)},[l,r,e,s]);return C.useEffect(()=>{h(n)}
356,[n]),Ol(()=>{i&&c.current.focus()},[i]),g("label",ae({htmlFor:u,className:Ye(m.root,o)},a,{children:g(f.slots.baseCheckbox,ae({id:u,inputRef:c,checked:!!d,onChange:y,size:"small"},f.slotProps?.baseCheckbox))}))}const FKe=t=>g(kKe,ae({},t)),BKe=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],iD=t=>{if(String(t).toLowerCase()==="true")return!0;if(String(t).toLowerCase()==="false")return!1},$Ke=$e("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function HKe(t){const{item:e,applyValue:n,apiRef:r,focusElementRef:o,clearButton:i,tabIndex:s,label:a,variant:l="standard"}=t,c=Tn(t,BKe),[u,d]=C.useState(iD(e.value)),h=yn(),f=Cs(),p=Cs(),m=h.slotProps?.baseSelect||{},y=m.native??!1,v=h.slotProps?.baseSelectOption||{},b=C.useCallback(w=>{const A=iD(w.target.value);d(A),n(ae({},e,{value:A}))},[n,e]);C.useEffect(()=>{d(iD(e.value))},[e.value]);const S=a??r.current.getLocaleText("filterPanelInputLabel");return K($Ke,{children:[K(h.slots.baseFormControl,{fullWidth:!0,children:[g(h.slots.baseInputLabel,ae({},h.slotProps?.baseInputLabel,{id:f,shrink:!0,variant:l,children:S})),K(h.slots.baseSelect,ae({labelId:f,id:p,label:S,value:u===void 0?"":String(u),onChange:b,variant:l,notched:l==="outlined"?!0:void 0,native:y,displayEmpty:!0,inputProps:{ref:o,tabIndex:s}},c,m,{children:[g(h.slots.baseSelectOption,ae({},v,{native:y,value:"",children:r.current.getLocaleText("filterValueAny")})),g(h.slots.baseSelectOption,ae({},v,{native:y,value:"true",children:r.current.getLocaleText("filterValueTrue")})),g(h.slots.baseSelectOption,ae({},v,{native:y,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]}))]}),i]})}const UKe=()=>[{value:"is",getApplyFilterFn:t=>{const e=iD(t.value);return e===void 0?null:n=>!!n===e},InputComponent:HKe}],zKe=(t,e,n,r)=>t?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),VKe=t=>{switch(t.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},Ode=ae({},gf,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:MKe,renderEditCell:FKe,sortComparator:mde,valueFormatter:zKe,filterOperators:UKe(),getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:t=>VKe(t)}),Nde=t=>t.sorting,pw=Dn(Nde,t=>t.sortedRows),Fj=co(pw,uh,ma,(t,e,n)=>t.reduce((r,o)=>{const i=e[o];if(i)r.push({id:o,model:i});else{const s=n[o];s&&sx(s)&&r.push({id:o,model:{[ix]:o}})}return r},[])),Zh=Dn(Nde,t=>t.sortModel),GKe=co(Zh,t=>t.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:t.length>1?o+1:void 0},n),{}));co(pw,t=>t.reduce((e,n,r)=>(e[n]=r,e),Object.create(null)));const GF=t=>t.filter,za=Dn(GF,t=>t.filterModel),WKe=Dn(za,t=>t.quickFilterValues),jKe=t=>t.visibleRowsLookup,gw=Dn(GF,t=>t.filteredRowsLookup);Dn(GF,t=>t.filteredChildrenCountLookup);Dn(GF,t=>t.filteredDescendantCountLookup);const x0=co(jKe,Fj,oS,za,WKe,(t,e,n,r,o)=>n<2&&!r.items.length&&!o?.length?e:e.filter(i=>t[i.id]!==!1)),S1=co(x0,t=>t.map(e=>e.id)),Mde=co(gw,Fj,(t,e)=>e.filter(n=>t[n.id]!==!1)),Dde=co(Mde,t=>t.map(e=>e.id));co(S1,ma,(t,e)=>{const n={};let r=0;return t.reduce((o,i)=>{const s=e[i];return n[s.depth]||(n[s.depth]=0),s.depth>r&&(n[s.depth]=0),r=s.depth,n[s.depth]+=1,o[i]=n[s.depth],o},{})});const Lde=co(x0,ma,oS,(t,e,n)=>n<2?t:t.filter(r=>e[r.id]?.depth===0)),Bj=Dn(x0,t=>t.length),$j=Dn(Lde,t=>t.length),qKe=Dn(Mde,t=>t.length);Dn(qKe,$j,(t,e)=>t-e);const kde=co(za,Nm,(t,e)=>t.items?.filter(n=>{if(!n.field)return!1;const r=e[n.field];if(!r?.filterOperators||r?.filterOperators?.length===0)return!1;const o=r.filterOperators.find(i=>i.value===n.operator);return o?!o.InputComponent||n.value!=null&&n.value?.toString()!=="":!1})),YKe=co(kde,t=>t.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),qd=t=>t.rowSelection,XKe=Dn(qd,t=>t.length),KKe=co(qd,uh,(t,e)=>new Map(t.map(n=>[n,e[n]]))),om=co(qd,t=>t.reduce((e,n)=>(e[n]=n,e),{}));function Fde(t,e){const n=ma(t),r=pw(t),o=gw(t),i=n[e];if(!i||i.type!=="group")return[];const s=[],a=r.findIndex(l=>l===e)+1;for(let l=a;l<r.length&&n[r[l]]?.depth>i.depth;l+=1){const c=r[l];o[c]!==!1&&t.current.isRowSelectable(c)&&s.push(c)}return s}function QKe(t,e){return Dn(ma,pw,gw,om,(n,r,o,i)=>{const s=n[t];if(!s||s.type!=="group")return{isIndeterminate:!1,isChecked:i[t]===t};if(i[t]===t)return{isIndeterminate:!1,isChecked:!0};let a=0,l=0;const c=r.findIndex(u=>u===t)+1;for(let u=c;u<r.length&&n[r[u]]?.depth>s.depth;u+=1){const d=r[u];o[d]!==!1&&(a+=1,i[d]!==void 0&&(l+=1))}return{isIndeterminate:l>0&&(l<a||i[t]===void 0),isChecked:e?l>0:i[t]===t}})}function Hj(t){return t.signature===mh.DataGrid?t.checkboxSelection&&t.disableMultipleRowSelection!==!0:!t.disableMultipleRowSelection}const ZKe=(t,e)=>{const n=[];let r=e;for(;r!=null&&r!==El;){const o=t[r];if(!o)return n;n.push(r),r=o.parent}return n},JKe=(t,e,n)=>{const r=t[n];if(!r)return[];const o=r.parent;return o==null?[]:t[o].children.filter(s=>s!==n&&e[s]!==!1)},kN=(t,e,n,r,o,i)=>{const s=gw(t),a=om(t),l=new Set([]);
356if(!(!r&&!o)&&(r&&e[n]?.type==="group"&&Fde(t,n).forEach(d=>{i(d),l.add(d)}),o)){const c=d=>{if(a[d]!==d&&!l.has(d))return!1;const h=e[d];return h?.type!=="group"?!0:h.children.every(c)},u=d=>{const h=JKe(e,s,d);if(h.length===0||h.every(c)){const p=e[d].parent;p!=null&&p!==El&&t.current.isRowSelectable(p)&&(i(p),l.add(p),u(p))}};u(n)}},PQ=(t,e,n,r,o,i)=>{const s=om(t);!o&&!r||(o&&ZKe(e,n).forEach(l=>{s[l]===l&&i(l)}),r&&e[n]?.type==="group"&&Fde(t,n).forEach(c=>{i(c)}))},eQe=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],tQe=t=>{const{classes:e}=t;return Dr({root:["checkboxInput"]},Lr,e)},nQe=Kr(function(e,n){const{field:r,id:o,rowNode:i,hasFocus:s,tabIndex:a}=e,l=Tn(e,eQe),c=br(),u=yn(),d={classes:u.classes},h=tQe(d),f=C.useRef(null),p=C.useRef(null),m=S0(f,n),y=R=>{const O={value:R.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",O,R)};C.useLayoutEffect(()=>{if(a===0){const R=c.current.getCellElement(o,r);R&&(R.tabIndex=-1)}},[c,a,o,r]),C.useEffect(()=>{s?f.current?.querySelector("input")?.focus({preventScroll:!0}):p.current&&p.current.stop({})},[s]);const v=C.useCallback(R=>{R.key===" "&&R.stopPropagation()},[]),b=c.current.isRowSelectable(o),S=QKe(o,u.rowSelectionPropagation?.parents??!1),{isIndeterminate:w,isChecked:A}=St(c,S,Ij);if(i.type==="footer"||i.type==="pinnedRow")return null;const _=u.indeterminateCheckboxAction==="select"?A&&!w:A,P=c.current.getLocaleText(_?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return g(u.slots.baseCheckbox,ae({tabIndex:a,checked:_,onChange:y,className:h.root,inputProps:{"aria-label":P,name:"select_row"},onKeyDown:v,indeterminate:w,disabled:!b,touchRippleRef:p},u.slotProps?.baseCheckbox,l,{ref:m}))}),rQe=nQe,WF=t=>t.focus,su=Dn(WF,t=>t.cell),oQe=Dn(WF,t=>t.columnHeader);Dn(WF,t=>t.columnHeaderFilter);const r2=Dn(WF,t=>t.columnGroupHeader),jF=t=>t.tabIndex,Uj=Dn(jF,t=>t.cell),Bde=Dn(jF,t=>t.columnHeader);Dn(jF,t=>t.columnHeaderFilter);const iQe=Dn(jF,t=>t.columnGroupHeader);function lr(t,e,n){const r=C.useRef(!0);Ol(()=>{r.current=!1,t.current.register(n,e)},[t,n,e]),r.current&&t.current.register(n,e)}function Ia(t,e){const n=C.useRef(null);if(n.current)return n.current;const r=t.current.getLogger(e);return n.current=r,r}const $de=(t,e,n,r,o)=>{const i=Ia(t,"useNativeEventListener");So(t,"rootMount",()=>{const s=typeof e=="function"?e():e.current;if(!(!s||!n||!r))return i.debug(`Binding native ${n} event`),s.addEventListener(n,r,o),()=>{i.debug(`Clearing native ${n} event`),s.removeEventListener(n,r,o)}})},CR=t=>{const e=C.useRef(!0);e.current&&(e.current=!1,t())},sQe=()=>{},aQe=(t,e)=>{const n=C.useRef(!1);Ol(()=>n.current||!t?sQe:(n.current=!0,e()),[n.current||t])},lQe=100,cQe=t=>t?0:100,Hde=(t,e,n)=>e>0&&t>0?Math.ceil(t/e):t===-1?n+2:0,Ude=t=>({page:0,pageSize:t?0:100}),uQe=(t,e=0)=>e===0?t:Math.max(Math.min(t,e-1),0),zde=(t,e)=>{if(e===mh.DataGrid&&t>lQe)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` 357`))},dQe=-1,SR=t=>t.pagination,Vde=Dn(SR,t=>t.enabled&&t.paginationMode==="client"),Wl=Dn(SR,t=>t.paginationModel),JE=Dn(SR,t=>t.rowCount),jT=Dn(SR,t=>t.meta),hQe=Dn(Wl,t=>t.page),Gde=Dn(Wl,t=>t.pageSize),Wde=Dn(Wl,JE,(t,e)=>Hde(e,t.pageSize,t.page)),zj=co(Vde,Wl,ma,oS,x0,Lde,(t,e,n,r,o,i)=>{if(!t)return null;const s=i.length,a=Math.min(e.pageSize*e.page,s-1),l=e.pageSize===dQe?s-1:Math.min(a+e.pageSize-1,s-1);if(a===-1||l===-1)return null;if(r<2)return{firstRowIndex:a,lastRowIndex:l};const c=i[a],u=l-a+1,d=o.findIndex(p=>p.id===c.id);let h=d,f=0;for(;h<o.length&&f<=u;){const p=o[h],m=n[p.id]?.depth;m===void 0?h+=1:((f<u||m>0)&&(h+=1),m===0&&(f+=1))}return{firstRowIndex:d,lastRowIndex:h-1}}),fQe=co(x0,zj,(t,e)=>e?t.slice(e.firstRowIndex,e.lastRowIndex+1):[]),jde=co(S1,zj,(t,e)=>e?t.slice(e.firstRowIndex,e.lastRowIndex+1):[]),ER=co(Vde,zj,fQe,x0,(t,e,n,r)=>t?{rows:n,range:e,rowToIndexMap:n.reduce((o,i,s)=>(o.set(i.model,s),o),new Map)}:{rows:r,range:r.length===0?null:{firstRowIndex:0,lastRowIndex:r.length-1},rowToIndexMap:r.reduce((o,i,s)=>(o.set(i.model,s),o),new Map)}),pQe=["field","colDef"],gQe=t=>{const{classes:e}=t;return Dr({root:["checkboxInput"]},Lr,e)},mQe=Kr(function(e,n){const r=Tn(e,pQe),[,o]=C.useState(!1),i=br(),s=yn(),a={classes:s.
357classes},l=gQe(a),c=St(i,Bde),u=St(i,qd),d=St(i,S1),h=St(i,jde),f=C.useMemo(()=>typeof s.isRowSelectable!="function"?u:u.filter(R=>s.keepNonExistentRowsSelected?!0:i.current.getRow(R)?s.isRowSelectable(i.current.getRowParams(R)):!1),[i,s.isRowSelectable,u,s.keepNonExistentRowsSelected]),p=C.useMemo(()=>(!s.pagination||!s.checkboxSelectionVisibleOnly?d:h).reduce((O,N)=>(O[N]=!0,O),{}),[s.pagination,s.checkboxSelectionVisibleOnly,h,d]),m=C.useMemo(()=>f.filter(R=>p[R]).length,[f,p]),y=m>0&&m<Object.keys(p).length,v=m>0,b=R=>{const O={value:R.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",O)},S=c!==null&&c.field===e.field?0:-1;C.useLayoutEffect(()=>{const R=i.current.getColumnHeaderElement(e.field);S===0&&R&&(R.tabIndex=-1)},[S,i,e.field]);const w=C.useCallback(R=>{R.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!v})},[i,v]),A=C.useCallback(()=>{o(R=>!R)},[]);C.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",A),[i,A]);const _=s.indeterminateCheckboxAction==="select"?v&&!y:v,P=i.current.getLocaleText(_?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return g(s.slots.baseCheckbox,ae({indeterminate:y,checked:_,onChange:b,className:l.root,inputProps:{"aria-label":P,name:"select_all_rows"},tabIndex:S,onKeyDown:w,disabled:!Hj(s)},s.slotProps?.baseCheckbox,r,{ref:n}))}),xR=(t,e)=>ix in e?e[ix]:t.props.getRowId?t.props.getRowId(e):e.id,kg="__check__",mw=ae({},Ode,{type:"custom",field:kg,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(t,e,n,r)=>{const o=om(r),i=xR(r.current.state,e);return o[i]!==void 0},renderHeader:t=>g(mQe,ae({},t)),renderCell:t=>g(rQe,ae({},t))}),yQe=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function RQ(t,e){if(t==null)return"";const n=new Date(t);return Number.isNaN(n.getTime())?"":e==="date"?n.toISOString().substring(0,10):e==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function dE(t){const{item:e,applyValue:n,type:r,apiRef:o,focusElementRef:i,InputProps:s,clearButton:a,tabIndex:l,disabled:c}=t,u=Tn(t,yQe),d=cw(),[h,f]=C.useState(()=>RQ(e.value,r)),[p,m]=C.useState(!1),y=Cs(),v=yn(),b=C.useCallback(S=>{d.clear();const w=S.target.value;f(w),m(!0),d.start(v.filterDebounceMs,()=>{const A=new Date(w);n(ae({},e,{value:Number.isNaN(A.getTime())?void 0:A})),m(!1)})},[n,e,v.filterDebounceMs,d]);return C.useEffect(()=>{const S=RQ(e.value,r);f(S)},[e.value,r]),g(v.slots.baseTextField,ae({fullWidth:!0,id:y,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:h,onChange:b,variant:"standard",type:r||"text",InputLabelProps:{shrink:!0},inputRef:i,InputProps:ae({},p||a?{endAdornment:p?g(v.slots.loadIcon,{fontSize:"small",color:"action"}):a}:{},{disabled:c},s,{inputProps:ae({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:l},s?.inputProps)})},u,v.slotProps?.baseTextField))}function hE(t,e,n,r){if(!t.value)return null;const o=new Date(t.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return s=>{if(!s)return!1;if(r)return e(s.getTime(),i);const a=new Date(s);return n?a.setSeconds(0,0):a.setHours(0,0,0,0),e(a.getTime(),i)}}const qde=t=>[{value:"is",getApplyFilterFn:e=>hE(e,(n,r)=>n===r,t),InputComponent:dE,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"not",getApplyFilterFn:e=>hE(e,(n,r)=>n!==r,t),InputComponent:dE,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"after",getApplyFilterFn:e=>hE(e,(n,r)=>n>r,t),InputComponent:dE,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:e=>hE(e,(n,r)=>n>=r,t),InputComponent:dE,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"before",getApplyFilterFn:e=>hE(e,(n,r)=>n<r,t,!t),InputComponent:dE,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:e=>hE(e,(n,r)=>n<=r,t),InputComponent:dE,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1}],vQe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],bQe=$e(QC)({fontSize:"inherit"}),CQe=t=>{const{classes:e}=t;return Dr({root:["editInputCell"]},Lr,e)};function SQe(t){const{id:e,value:n,field:r,colDef:o,hasFocus:i,inputProps:s,onValueChange:a}=t,l=Tn(t,vQe),c=o.type==="dateTime",u=br(),d=C.useRef(null),h=C.useMemo(()=>{let w;n==null?w=null:n instanceof Date?w=n:w=new Date((n??"").toString());let A;return w==null||Number.isNaN(w.getTime())?A="":A=new Date(w.getTime()-w.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:w,formatted:A}},[n,c]),[f,p]=C.useState(h),y={classes:yn().classes},v=CQe(y),b=C.useCallback(w=>{if(w==="")return null;const[A,_]=w.split("T"),[P,R,O]=A.split("-"),N=new Date;if(N.setFullYear(Number(P),Number(R)-1,Number(O)),N.setHours(0,0,0,0),_){const[M,L]=_.split(":");N.setHours(Number(M),Number(L),0,0)}return N},[]),S=C.useCallback(async w=>{const A=w.target.value,_=b(A);a&&await a(w,_),p({parsed:_,formatted:A}),u.current.setEditCellValue({id:e,field:r,value:_},w)},[u,r,e,a,b]);return C.useEffect(()=>{p(w=>h.parsed!==w.parsed&&h.parsed?.getTime()!==w.parsed?.getTime()?h:w)},[h]),Ol(()=>{i&&d.current.focus()},[i]),g(bQe,ae({inputRef:d,fullWidth:!0,className:v.root,type:c?"datetime-local":"date",inputProps:ae({max:c?"9999-12-31T23:59":"9999-12-31"},s),value:f.formatted,onChange:S},l))}const Yde=t=>g(SQe,ae({},t));function Xde({value:t,columnType:e,rowId:n,field:r}){if(!(t instanceof Date))throw new Error([`MUI X: \`${e}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` 358`))}const EQe=(t,e,n,r)=>{if(!t)return"";const o=xR(r.current.state,e);return Xde({value:t,columnType:"date",rowId:o,field:n.field}),t.toLocaleDateString()},xQe=(t,e,n,r)=>{if(!t)return"";const o=xR(r.current.state,e);return Xde({value:t,columnType:"dateTime",rowId:o,field:n.field}
358),t.toLocaleString()},wQe=ae({},gf,{type:"date",sortComparator:yde,valueFormatter:EQe,filterOperators:qde(),renderEditCell:Yde,pastedValueParser:t=>new Date(t)}),AQe=ae({},gf,{type:"dateTime",sortComparator:yde,valueFormatter:xQe,filterOperators:qde(!0),renderEditCell:Yde,pastedValueParser:t=>new Date(t)}),By=t=>t==null?null:Number(t),TQe=t=>t==null||Number.isNaN(t)||t===""?null:e=>By(e)===By(t),_Qe=()=>[{value:"=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>By(e)===t.value,InputComponent:ih,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>By(e)!==t.value,InputComponent:ih,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:By(e)>t.value,InputComponent:ih,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:By(e)>=t.value,InputComponent:ih,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:By(e)<t.value,InputComponent:ih,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:By(e)<=t.value,InputComponent:ih,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>!Array.isArray(t.value)||t.value.length===0?null:e=>e!=null&&t.value.includes(Number(e)),InputComponent:bde,InputComponentProps:{type:"number"}}],IQe=ae({},gf,{type:"number",align:"right",headerAlign:"right",sortComparator:mde,valueParser:t=>t===""?null:Number(t),valueFormatter:t=>QXe(t)?t.toLocaleString():t||"",filterOperators:_Qe(),getApplyQuickFilterFn:TQe});function ax(t){return t?.type==="singleSelect"}function MC(t,e){if(t)return typeof t.valueOptions=="function"?t.valueOptions(ae({field:t.field},e)):t.valueOptions}function o2(t,e,n){if(e===void 0)return;const r=e.find(o=>{const i=n(o);return String(i)===String(t)});return n(r)}const PQe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],RQe=["MenuProps"];function OQe(t){return!!t.key}function NQe(t){const e=yn(),{id:n,value:r,field:o,row:i,colDef:s,hasFocus:a,error:l,onValueChange:c,initialOpen:u=e.editMode===Gp.Cell}=t,d=Tn(t,PQe),h=br(),f=C.useRef(null),p=C.useRef(null),[m,y]=C.useState(u),b=(e.slotProps?.baseSelect||{}).native??!1,S=e.slotProps?.baseSelect||{},{MenuProps:w}=S,A=Tn(S,RQe);
358if(Ol(()=>{a&&p.current?.focus()},[a]),!ax(s))return null;const _=MC(s,{id:n,row:i});if(!_)return null;const P=s.getOptionValue,R=s.getOptionLabel,O=async L=>{if(!ax(s)||!_)return;y(!1);const F=L.target,$=o2(F.value,_,P);c&&await c(L,$),await h.current.setEditCellValue({id:n,field:o,value:$},L)},N=(L,F)=>{if(e.editMode===Gp.Row){y(!1);return}if(F==="backdropClick"||L.key==="Escape"){const $=h.current.getCellParams(n,o);h.current.publishEvent("cellEditStop",ae({},$,{reason:L.key==="Escape"?Qh.escapeKeyDown:Qh.cellFocusOut}))}},M=L=>{OQe(L)&&L.key==="Enter"||y(!0)};return!_||!s?null:g(e.slots.baseSelect,ae({ref:f,inputRef:p,value:r,onChange:O,open:m,onOpen:M,MenuProps:ae({onClose:N},w),error:l,native:b,fullWidth:!0},d,A,{children:_.map(L=>{const F=P(L);return C.createElement(e.slots.baseSelectOption,ae({},e.slotProps?.baseSelectOption||{},{native:b,key:F,value:F}),R(L))})}))}const MQe=t=>g(NQe,ae({},t)),DQe=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],LQe=({column:t,OptionComponent:e,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...MC(t)||[]].map(a=>{const l=r(a);let c=n(a);return c===""&&(c="â"),C.createElement(e,ae({},i,{native:o,key:l,value:l}),c)}),kQe=$e("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function OQ(t){const{item:e,applyValue:n,type:r,apiRef:o,focusElementRef:i,placeholder:s,tabIndex:a,label:l,variant:c="standard",clearButton:u}=t,d=Tn(t,DQe),h=e.value??"",f=Cs(),p=Cs(),m=yn(),y=m.slotProps?.baseSelect?.native??!1;let v=null;if(e.field){const P=o.current.getColumn(e.field);ax(P)&&(v=P)}const b=v?.getOptionValue,S=v?.getOptionLabel,w=C.useMemo(()=>MC(v),[v]),A=C.useCallback(P=>{let R=P.target.value;R=o2(R,w,b),n(ae({},e,{value:R}))},[w,b,n,e]);if(!ax(v))return null;const _=l??o.current.getLocaleText("filterPanelInputLabel");return K(kQe,{children:[K(m.slots.baseFormControl,{fullWidth:!0,children:[g(m.slots.baseInputLabel,ae({},m.slotProps?.baseInputLabel,{id:p,htmlFor:f,shrink:!0,variant:c,children:_})),g(m.slots.baseSelect,ae({id:f,label:_,labelId:p,value:h,onChange:A,variant:c,type:r||"text",inputProps:{tabIndex:a,ref:i,placeholder:s??o.current.getLocaleText("filterPanelInputPlaceholder")},native:y,notched:c==="outlined"?!0:void 0},d,m.slotProps?.baseSelect,{children:LQe({column:v,OptionComponent:m.slots.baseSelectOption,getOptionLabel:S,getOptionValue:b,isSelectNative:y,baseSelectOptionProps:m.slotProps?.baseSelectOption})}))]}),u]})}const FQe=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],BQe=["key"],$Qe=Ole();function HQe(t){const{item:e,applyValue:n,apiRef:r,focusElementRef:o,color:i,error:s,helperText:a,size:l,variant:c="standard"}=t,u=Tn(t,FQe),d={color:i,error:s,helperText:a,size:l,variant:c},h=Cs(),f=yn();let p=null;if(e.field){const A=r.current.getColumn(e.field);ax(A)&&(p=A)}const m=p?.getOptionValue,y=p?.getOptionLabel,v=C.useCallback((A,_)=>m(A)===m(_),[m]),b=C.useMemo(()=>MC(p)||[],[p]),S=C.useMemo(()=>Array.isArray(e.value)?e.value.reduce((A,_)=>{const P=b.find(R=>m(R)===_);return P!=null&&A.push(P),A},[]):[],[m,e.value,b]),w=C.useCallback((A,_)=>{n(ae({},e,{value:_.map(m)}))},[n,e,m]);return g(Fle,ae({multiple:!0,options:b,isOptionEqualToValue:v,filterOptions:$Qe,id:h,value:S,onChange:w,getOptionLabel:y,renderTags:(A,_)=>A.map((P,R)=>{const O=_({index:R}),{key:N}=O,M=Tn(O,BQe);return g(f.slots.baseChip,ae({variant:"outlined",size:"small",label:y(P)},M),N)}),renderInput:A=>g(f.slots.baseTextField,ae({},A,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:ae({},A.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,f.slotProps?.baseTextField))},u))}const fE=t=>t==null||!Mj(t)?t:t.value,UQe=()=>[{value:"is",getApplyFilterFn:t=>t.value==null||t.value===""?null:e=>fE(e)===fE(t.value),InputComponent:OQ},{value:"not",getApplyFilterFn:t=>t.value==null||t.value===""?null:e=>fE(e)!==fE(t.value),InputComponent:OQ},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const e=t.value.map(fE);return n=>e.includes(fE(n))},InputComponent:HQe}],zQe=t=>typeof t[0]=="object",VQe=t=>Mj(t)?t.value:t,GQe=t=>Mj(t)?t.label:String(t),WQe=ae({},gf,{type:"singleSelect",getOptionLabel:GQe,getOptionValue:VQe,valueFormatter(t,e,n,r){const o=xR(r.current.state,e);if(!ax(n))return"";const i=MC(n,{id:o,row:e});if(t==null)return"";if(!i)return t;if(!zQe(i))return n.getOptionLabel(t);const s=i.find(a=>n.getOptionValue(a)===t);return s?n.getOptionLabel(s):""}
358,renderEditCell:MQe,filterOperators:UQe(),pastedValueParser:(t,e,n)=>{const r=n,o=MC(r)||[],i=r.getOptionValue;if(o.find(a=>i(a)===t))return t}}),jQe="string",qQe=()=>({string:gf,number:IQe,date:wQe,dateTime:AQe,boolean:Ode,singleSelect:WQe,[UF]:AKe,custom:gf}),Vj=t=>t.headerFiltering,YQe=Dn(Vj,t=>t?.enabled??!1),XQe=Dn(Vj,t=>t.editing),KQe=Dn(Vj,t=>t.menuOpen),qF=t=>t.columnGrouping,Kde=co(qF,t=>t?.unwrappedGroupingModel??{}),Qde=co(qF,t=>t?.lookup??{}),QQe=co(qF,t=>t?.headerStructure??[]),wR=Dn(qF,t=>t?.maxDepth??0),Zde=["maxWidth","minWidth","width","flex"],a5=qQe();function ZQe({initialFreeSpace:t,totalFlexUnits:e,flexColumns:n}){const r=new Set(n.map(s=>s.field)),o={all:{},frozenFields:[],freeze:s=>{const a=o.all[s];a&&a.frozen!==!0&&(o.all[s].frozen=!0,o.frozenFields.push(s))}};function i(){if(o.frozenFields.length===r.size)return;const s={min:{},max:{}};let a=t,l=e,c=0;o.frozenFields.forEach(u=>{a-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;u<n.length;u+=1){const d=n[u];if(o.all[d.field]&&o.all[d.field].frozen===!0)continue;let f=a/l*d.flex;f<d.minWidth?(c+=d.minWidth-f,f=d.minWidth,s.min[d.field]=!0):f>d.maxWidth&&(c+=d.maxWidth-f,f=d.maxWidth,s.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:f,flex:d.flex}}c<0?Object.keys(s.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(s.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const p4=(t,e)=>{const n={};let r=0,o=0;const i=[];t.orderedFields.forEach(l=>{let c=t.lookup[l],u=0,d=!1;t.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,d=!0):u=nd(c.width||gf.width,c.minWidth||gf.minWidth,c.maxWidth||gf.maxWidth),o+=u),c.computedWidth!==u&&(c=ae({},c,{computedWidth:u})),d&&i.push(c),n[l]=c});const s=e===void 0?0:e.viewportOuterSize.width-(e.hasScrollY?e.scrollbarSize:0),a=Math.max(s-o,0);if(r>0&&s>0){const l=ZQe({initialFreeSpace:a,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return ae({},t,{lookup:n})},JQe=(t,e)=>{if(!e)return t;const{orderedFields:n=[],dimensions:r={}}=e,o=Object.keys(r);if(o.length===0&&n.length===0)return t;const i={},s=[];for(let u=0;u<n.length;u+=1){const d=n[u];t.lookup[d]&&(i[d]=!0,s.push(d))}const a=s.length===0?t.orderedFields:[...s,...t.orderedFields.filter(u=>!i[u])],l=ae({},t.lookup);for(let u=0;u<o.length;u+=1){const d=o[u],h=ae({},l[d],{hasBeenResized:!0});Object.entries(r[d]).forEach(([f,p])=>{h[f]=p===-1?1/0:p}),l[d]=h}return ae({},t,{orderedFields:a,lookup:l})};function NQ(t){let e=a5[jQe];return t&&a5[t]&&(e=a5[t]),e}const _E=({apiRef:t,columnsToUpsert:e,initialState:n,columnVisibilityModel:r=dh(t),keepOnlyColumnsToUpsert:o=!1})=>{const i=!t.current.state.columns;let s;if(i)s={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const u=Np(t.current.state);s={orderedFields:o?[]:[...u.orderedFields],lookup:ae({},u.lookup),columnVisibilityModel:r}}let a={};o&&!i&&(a=Object.keys(s.lookup).reduce((u,d)=>ae({},u,{[d]:!1}),{})),e.forEach(u=>{const{field:d}=u;a[d]=!0;let h=s.lookup[d];h==null?(h=ae({},NQ(u.type),{field:d,hasBeenResized:!1}),s.orderedFields.push(d)):o&&s.orderedFields.push(d),h&&h.type!==u.type&&(h=ae({},NQ(u.type),{field:d}));let f=h.hasBeenResized;Zde.forEach(p=>{u[p]!==void 0&&(f=!0,u[p]===-1&&(u[p]=1/0))}),s.lookup[d]=dde(h,ae({},u,{hasBeenResized:f}))}),o&&!i&&Object.keys(s.lookup).forEach(u=>{a[u]||delete s.lookup[u]});const l=t.current.unstable_applyPipeProcessors("hydrateColumns",s),c=JQe(l,n);return p4(c,t.current.getRootDimensions?.()??void 0)};function eZe({firstColumnToRender:t,apiRef:e,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=t;for(let s=n;s<r;s+=1)if(o[s]){const l=o[s].id,c=e.current.unstable_getCellColSpanInfo(l,t);c&&c.spannedByColSpan&&(i=c.leftVisibleCellIndex)}return i}function Gj(t,e){if(e.unstable_listView)return 0;const n=uw(t),r=wR(t),o=YQe(t),i=Math.floor(e.columnHeaderHeight*n),s=Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),a=o?Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n):0;return i+s*r+a}const MQ=1,tZe=1.5,nZe=t=>{const{scrollDirection:e,classes:n}=t,r={root:["scrollArea",`scrollArea--${e}`]};return Dr(r,Lr,n)},rZe=ko("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(t,e)=>[{[`&.${ye["scrollArea--left"]}`]:e["scrollArea--left"]},{[`&.${ye["scrollArea--right"]}`]:e["scrollArea--right"]},e.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${ye["scrollArea--left"]}`]:{left:0},[`&.${ye["scrollArea--right"]}`]:{right:0}})),oZe=yR(qa,(t,e)=>e==="left"?t.leftPinnedWidth:e==="right"?t.rightPinnedWidth+(t.hasScrollX?t.scrollbarSize:0):0);function iZe(t){const e=br(),[n,r]=C.useState(!1);return Qt(e,"columnHeaderDragStart",()=>r(!0)),Qt(e,"columnHeaderDragEnd",()=>r(!1)),n?g(sZe,ae({},t)):null}function sZe(t){const{scrollDirection:e,scrollPosition:n}=t,r=C.useRef(null),o=br(),i=cw(),s=St(o,uw),a=St(o,HF),l=ZI(o,oZe,e),c=()=>{const w=qa(o.current.state);if(e==="left")return n.current.left>0;if(e==="right"){const A=a-w.viewportInnerSize.width;return n.current.left<A}return!1},[u,d]=C.useState(c),h=yn(),f=ae({},h,{scrollDirection:e}),p=nZe(f),m=Gj(o,h),y=Math.floor(h.columnHeaderHeight*s),v={height:y,top:m-y};e==="left"?v.left=l:e==="right"&&(v.right=l);const b=()=>{d(c)},S=zi(w=>{let A;if(w.preventDefault(),e==="left")A=w.clientX-r.current.getBoundingClientRect().right;else if(e==="right")A=Math.max(1,w.clientX-r.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");A=(A-MQ)*tZe+MQ,i.start(0,()=>{o.current.scroll({left:n.current.left+A,top:n.current.top})})});return Qt(o,"scrollPositionChange",b),u?g(rZe,{ref:r,className:Ye(p.root),ownerState:f,onDragOver:S,style:v}):null}const DQ=Om(iZe);var Wj={},Jde={exports:{}},ehe={exports:{}};(function(t){function e(n){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r}
358,t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(ehe);var aZe=ehe.exports;(function(t){var e=aZe.default;function n(o){if(typeof WeakMap!="function")return null;var i=new WeakMap,s=new WeakMap;return(n=function(l){return l?s:i})(o)}function r(o,i){if(!i&&o&&o.__esModule)return o;if(o===null||e(o)!="object"&&typeof o!="function")return{default:o};var s=n(i);if(s&&s.has(o))return s.get(o);var a={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in o)if(c!=="default"&&{}.hasOwnProperty.call(o,c)){var u=l?Object.getOwnPropertyDescriptor(o,c):null;u&&(u.get||u.set)?Object.defineProperty(a,c,u):a[c]=o[c]}return a.default=o,s&&s.set(o,a),a}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(Jde);var lZe=Jde.exports,cZe=lZe.default;Object.defineProperty(Wj,"__esModule",{value:!0});var the=Wj.default=void 0,uZe=cZe(C);the=Wj.default=parseInt(uZe.version,10);const nhe=C.createContext(void 0);function yd(){const t=C.useContext(nhe);if(t===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` 359`));return t}const Tv=(t,e)=>ER(t),jj=(t,e)=>St(t,ER),dZe=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",hZe=dZe.includes("firefox"),AR=t=>t.rowsMeta,YF=t=>t.virtualization;Dn(YF,t=>t.enabled);const rhe=Dn(YF,t=>t.enabledForColumns),fZe=Dn(YF,t=>t.enabledForRows),TR=Dn(YF,t=>t.renderContext),pZe=co(t=>t.virtualization.renderContext.firstColumnIndex,t=>t.virtualization.renderContext.lastColumnIndex,(t,e)=>({firstColumnIndex:t,lastColumnIndex:e})),g4={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},gZe=(t,e)=>{const{disableVirtualization:n,autoHeight:r}=e;return ae({},t,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:g4}})};function mZe(t,e){const n=i=>{t.current.setState(s=>ae({},s,{virtualization:ae({},s.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!e.autoHeight})}))};lr(t,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{t.current.setState(s=>ae({},s,{virtualization:ae({},s.virtualization,{enabledForColumns:i})}))}},"public"),C.useEffect(()=>{n(!e.disableVirtualization)},[e.disableVirtualization,e.autoHeight])}const qj=t=>t.rowSpanning,ohe=Dn(qj,t=>t.hiddenCells),yZe=Dn(qj,t=>t.spannedCells),vZe=Dn(qj,t=>t.hiddenCellOriginMap),lx=t=>t.listViewColumn,bZe=rde(su,TR,ER,Qi,uh,(t,e,n,r,o)=>{if(!t)return!1;const i=o[t.id];if(!i)return!1;const s=n.rowToIndexMap.get(i),a=r.slice(e.firstColumnIndex,e.lastColumnIndex).findIndex(c=>c.field===t.field);return!(s!==void 0&&a!==-1&&s>=e.firstRowIndex&&s<=e.lastRowIndex)}),CZe=co(bZe,Qi,ER,uh,su,(t,e,n,r,o)=>{if(!t)return null;const i=r[o.id];if(!i)return null;const s=n.rowToIndexMap.get(i);if(s===void 0)return null;const a=e.findIndex(l=>l.field===o.field);return a===-1?null:ae({},o,{rowIndex:s,columnIndex:a})});function e1(t,e){return Math.round(t*10**e)/10**e}const i2=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent),l5=50;var Os=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t[t.LEFT=3]="LEFT",t[t.RIGHT=4]="RIGHT",t}(Os||{});const LQ={top:0,left:0},SZe=Object.freeze(new Map),EZe=(t,e,n,r,o)=>({direction:Os.NONE,buffer:she(t,Os.NONE,e,n,r,o)}),xZe=()=>{const t=yd(),e=yn(),{unstable_listView:n}=e,r=St(t,()=>n?[lx(t.current.state)]:Qi(t)),o=St(t,fZe)&&!i2,i=St(t,rhe)&&!i2,s=St(t,dw),a=fw(t),l=n?n2:a,c=s.bottom.length>0,[u,d]=C.useState(SZe),h=ic(),f=St(t,om),p=jj(t),m=t.current.mainElementRef,y=t.current.virtualScrollerRef,v=t.current.virtualScrollbarVerticalRef,b=t.current.virtualScrollbarHorizontalRef,S=St(t,lKe),w=C.useRef(!1),A=St(t,Pj),_=St(t,aXe),P=St(t,HF),R=St(t,wZe),O=St(t,ude),N=St(t,cde),M=C.useRef(null),L=C.useCallback(Re=>{if(m.current=Re,!Re)return;const pe=Re.getBoundingClientRect();let Be={width:e1(pe.width,1),height:e1(pe.height,1)};if((!M.current||Be.width!==M.current.width&&Be.height!==M.current.height)&&(M.current=Be,t.current.publishEvent("resize",Be)),typeof ResizeObserver>"u")return;const ke=new ResizeObserver(Ne=>{const ot=Ne[0];if(!ot)return;const ce={width:e1(ot.contentRect.width,1),height:e1(ot.contentRect.height,1)};ce.width===Be.width&&ce.height===Be.height||(t.current.publishEvent("resize",ce),Be=ce)});if(ke.observe(Re),the>=19)return()=>{m.current=null,ke.disconnect()}},[t,m]),F=C.useRef(e.initialState?.scroll??LQ),$=C.useRef(!1),D=C.useRef(LQ),k=C.useRef(g4),U=St(t,TR),H=St(t,CZe),V=cw(),q=C.useRef(void 0),J=If(()=>EZe(h,e.rowBufferPx,e.columnBufferPx,A*15,l5*6)).current,Q=C.useCallback(Re=>{if(_Ze(Re,t.current.state.virtualization.renderContext))return;const pe=Re.firstRowIndex!==k.current.firstRowIndex||Re.lastRowIndex!==k.current.lastRowIndex;t.current.setState(ke=>ae({},ke,{virtualization:ae({},ke.virtualization,{renderContext:Re})})),qa(t.current.state).isReady&&pe&&(k.current=Re,t.current.publishEvent("renderedRowsIntervalChange",Re)),D.current=F.current},[t]),se=zi(()=>{const Re=y.current;if(!Re)return;const pe=qa(t.current.state),Be=Math.ceil(pe.minimumSize.height-pe.viewportOuterSize.height),ke=Math.ceil(pe.minimumSize.width-pe.viewportInnerSize.width),Ne={top:nd(Re.scrollTop,0,Be),left:h?nd(Re.scrollLeft,-ke,0):nd(Re.scrollLeft,0,ke)},ot=Ne.left-F.current.left,ce=Ne.top-F.current.top,Ae=ot!==0||ce!==0;F.current=Ne;const be=Ae?IZe(ot,ce):Os.NONE,Se=Math.abs(F.current.top-D.current.top),Pe=Math.abs(F.current.left-D.current.left),Ue=Se>=A||Pe>=l5,_e=J.direction!==be;if(!(Ue||_e))return U;if(_e)switch(be){case Os.NONE:case Os.LEFT:case Os.RIGHT:q.current=void 0;break;default:q.current=U;break}J.direction=be,J.buffer=she(h,be,e.rowBufferPx,e.columnBufferPx,A*15,l5*6);const ze=kQ(t,e,o,i),ne=FQ(ze,F.current,J);return Vx.flushSync(()=>{Q(ne)}),V.start(1e3,se),ne}),oe=()=>{if(!qa(t.current.state).isReady&&(o||i))return;const Re=kQ(t,e,o,i),pe=FQ(Re,F.current,J);q.current=void 0,Q(pe)},ie=zi(()=>
359{if($.current){$.current=!1;return}const Re=se();t.current.publishEvent("scrollPositionChange",{top:F.current.top,left:F.current.left,renderContext:Re})}),ee=zi(Re=>{t.current.publishEvent("virtualScrollerWheel",{},Re)}),re=zi(Re=>{t.current.publishEvent("virtualScrollerTouchMove",{},Re)}),fe=(Re={})=>{if(!Re.rows&&!p.range)return[];let pe=U;Re.renderContext&&(pe=Re.renderContext,pe.firstColumnIndex=U.firstColumnIndex,pe.lastColumnIndex=U.lastColumnIndex);const Be=!c&&Re.position===void 0||c&&Re.position==="bottom",ke=Re.position!==void 0;let Ne;switch(Re.position){case"top":Ne=0;break;case"bottom":Ne=s.top.length+p.rows.length;break;case void 0:Ne=s.top.length;break}const ot=Re.rows??p.rows,ce=pe.firstRowIndex,Ae=Math.min(pe.lastRowIndex,ot.length),be=Re.rows?CQ(0,Re.rows.length):CQ(ce,Ae);let Se=-1;!ke&&H&&(H.rowIndex<ce&&(be.unshift(H.rowIndex),Se=H.rowIndex),H.rowIndex>Ae&&(be.push(H.rowIndex),Se=H.rowIndex));const Pe=[],Ue=e.slotProps?.row,_e=E0(t);return be.forEach(Oe=>{const{id:ze,model:ne}=ot[Oe],W=(p?.range?.firstRowIndex||0)+Ne+Oe;if(S){const jn=l.left.length,Cr=r.length-l.right.length;t.current.calculateColSpan({rowId:ze,minFirstColumn:jn,maxLastColumn:Cr,columns:r}),l.left.length>0&&t.current.calculateColSpan({rowId:ze,minFirstColumn:0,maxLastColumn:l.left.length,columns:r}),l.right.length>0&&t.current.calculateColSpan({rowId:ze,minFirstColumn:r.length-l.right.length,maxLastColumn:r.length,columns:r})}const j=t.current.rowHasAutoHeight(ze)?"auto":t.current.unstable_getRowHeight(ze);let ue;f[ze]==null?ue=!1:ue=t.current.isRowSelectable(ze);let he=!1;Re.position===void 0&&(he=Oe===0);let Ce=!1;const Ie=Oe===ot.length-1;if(Be)if(ke)Ce=Ie;else{const jn=p.rows.length-1;Oe===jn&&(Ce=!0)}let et=pe;q.current&&Oe>=q.current.firstRowIndex&&Oe<q.current.lastRowIndex&&(et=q.current);const je=Oe===Se,it=H?.rowIndex===W,xt=ihe(_e,et,l.left.length),rt=Ie&&Re.position==="top",Bt=et.firstColumnIndex,dn=et.lastColumnIndex;if(Pe.push(g(e.slots.row,ae({row:ne,rowId:ze,index:W,selected:ue,offsetLeft:xt,columnsTotalWidth:P,rowHeight:j,pinnedColumns:l,visibleColumns:r,firstColumnIndex:Bt,lastColumnIndex:dn,focusedColumnIndex:it?H.columnIndex:void 0,isFirstVisible:he,isLastVisible:Ce,isNotVisible:je,showBottomBorder:rt,scrollbarWidth:O,gridHasFiller:N},Ue),ze)),je)return;const kn=u.get(ze);kn&&Pe.push(kn),Re.position===void 0&&Ie&&Pe.push(t.current.getInfiniteLoadingTriggerElement?.({lastRowId:ze}))}),Pe},we=C.useMemo(()=>({overflowX:!R||n?"hidden":void 0,overflowY:e.autoHeight?"hidden":void 0}),[R,e.autoHeight,n]),xe=C.useMemo(()=>{const Re={width:R?P:"auto",flexBasis:_,flexShrink:0};return Re.flexBasis===0&&(Re.flexBasis=Ide),Re},[P,_,R]),ve=C.useCallback(Re=>{Re&&t.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:P,contentHeight:_})},[t,P,_]);return Ol(()=>{w.current&&t.current.updateRenderContext?.()},[t,i,o]),Ol(()=>{n&&(y.current.scrollLeft=0)},[n,y]),aQe(U!==g4,()=>{if(t.current.publishEvent("scrollPositionChange",{top:F.current.top,left:F.current.left,renderContext:U}),w.current=!0,e.initialState?.scroll&&y.current){const Re=y.current,{top:pe,left:Be}=e.initialState.scroll,ke={top:!(pe>0),left:!(Be>0)};if(!ke.left&&P&&(Re.scrollLeft=Be,$.current=!0,ke.left=!0),!ke.top&&_&&(Re.scrollTop=pe,$.current=!0,ke.top=!0),!ke.top||!ke.left){const Ne=t.current.subscribeEvent("virtualScrollerContentSizeChange",ot=>{!ke.left&&ot.columnsTotalWidth&&(Re.scrollLeft=Be,$.current=!0,ke.left=!0),!ke.top&&ot.contentHeight&&(Re.scrollTop=pe,$.current=!0,ke.top=!0),ke.left&&ke.top&&Ne()});return Ne}}}),t.current.register("private",{updateRenderContext:oe}),So(t,"sortedRowsSet",oe),So(t,"paginationModelChange",oe),So(t,"columnsChange",oe),{renderContext:U,setPanels:d,getRows:fe,getContainerProps:()=>({ref:L}),getScrollerProps:()=>({ref:y,onScroll:ie,onWheel:ee,onTouchMove:re,style:we,role:"presentation",tabIndex:hZe?-1:void 0}),getContentProps:()=>({style:xe,role:"presentation",ref:ve}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:v,role:"presentation",scrollPosition:F}),getScrollbarHorizontalProps:()=>({ref:b,role:"presentation",scrollPosition:F}),getScrollAreaProps:()=>({scrollPosition:F})}};function wZe(t){return t.dimensions.viewportOuterSize.width>0&&t.dimensions.columnsTotalWidth>t.dimensions.viewportOuterSize.width}function kQ(t,e,n,r){const o=qa(t.current.state),i=Tv(t),s=e.unstable_listView?[lx(t.current.state)]:Qi(t),a=vZe(t),l=t.current.state.rows.dataRowIds.at(-1),c=s.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:t,autoHeight:e.autoHeight,rowBufferPx:e.rowBufferPx,columnBufferPx:e.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?t.current.unstable_getRowHeight(l):0,lastColumnWidth:c?.computedWidth??0,rowsMeta:AR(t.current.state),columnPositions:E0(t),rows:i.rows,range:i.range,pinnedColumns:fw(t),visibleColumns:s,hiddenCellsOriginMap:a,listView:e.unstable_listView??!1,virtualizeColumnsWithAutoRowHeight:e.virtualizeColumnsWithAutoRowHeight}}function FQ(t,e,n){const r={firstRowIndex:0,lastRowIndex:t.rows.length,firstColumnIndex:0,lastColumnIndex:t.visibleColumns.length};if(t.listView)return ae({},r,{lastColumnIndex:1});const{top:o,left:i}=e,s=Math.abs(i)+t.leftPinnedWidth;
359if(t.enabledForRows){let l=Math.min(BQ(t,o,{atStart:!0,lastPosition:t.rowsMeta.positions[t.rowsMeta.positions.length-1]+t.lastRowHeight}),t.rowsMeta.positions.length-1);const c=t.hiddenCellsOriginMap[l];if(c){const d=Math.min(...Object.values(c));l=Math.min(l,d)}const u=t.autoHeight?l+t.rows.length:BQ(t,o+t.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(t.enabledForColumns){let l=0,c=t.columnPositions.length,u=!1;const[d,h]=m4({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:t.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:t.rowsMeta.positions,lastSize:t.lastRowHeight});if(!t.virtualizeColumnsWithAutoRowHeight)for(let f=d;f<h&&!u;f+=1){const p=t.rows[f];u=t.apiRef.current.rowHasAutoHeight(p.id)}(!u||t.virtualizeColumnsWithAutoRowHeight)&&(l=jv(s,t.columnPositions,{atStart:!0,lastPosition:t.columnsTotalWidth}),c=jv(s+t.viewportInnerWidth,t.columnPositions)),r.firstColumnIndex=l,r.lastColumnIndex=c}return AZe(t,r,n)}function BQ(t,e,n){const r=t.apiRef.current.getLastMeasuredRowIndex();let o=r===1/0;t.range?.lastRowIndex&&!o&&(o=r>=t.range.lastRowIndex);const i=nd(r-(t.range?.firstRowIndex||0),0,t.rowsMeta.positions.length);return o||t.rowsMeta.positions[i]>=e?jv(e,t.rowsMeta.positions,n):TZe(e,t.rowsMeta.positions,i,n)}function AZe(t,e,n){const[r,o]=m4({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:t.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:t.rowsMeta.positions,lastSize:t.lastRowHeight}),[i,s]=m4({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:t.pinnedColumns.left.length,maxLastIndex:t.visibleColumns.length-t.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:t.columnPositions,lastSize:t.lastColumnWidth}),a=eZe({firstColumnToRender:i,apiRef:t.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:t.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:a,lastColumnIndex:s}}function jv(t,e,n=void 0,r=0,o=e.length){if(e.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),s=e[i];let a;if(n?.atStart){const l=(i===e.length-1?n.lastPosition:e[i+1])-s;a=t-l<s}else a=t<=s;return a?jv(t,e,n,r,i):jv(t,e,n,i+1,o)}function TZe(t,e,n,r=void 0){let o=1;for(;n<e.length&&Math.abs(e[n])<t;)n+=o,o*=2;return jv(t,e,r,Math.floor(n/2),Math.min(n,e.length))}function m4({firstIndex:t,lastIndex:e,bufferBefore:n,bufferAfter:r,minFirstIndex:o,maxLastIndex:i,positions:s,lastSize:a}){const l=s[t]-n,c=s[e]+r,u=jv(l,s,{atStart:!0,lastPosition:s[s.length-1]+a}),d=jv(c,s);return[nd(u,o,i),nd(d,o,i)]}function _Ze(t,e){return t===e?!0:t.firstRowIndex===e.firstRowIndex&&t.lastRowIndex===e.lastRowIndex&&t.firstColumnIndex===e.firstColumnIndex&&t.lastColumnIndex===e.lastColumnIndex}function ihe(t,e,n){const r=(t[e.firstColumnIndex]??0)-(t[n]??0);return Math.abs(r)}function IZe(t,e){return t===0&&e===0?Os.NONE:Math.abs(e)>=Math.abs(t)?e>0?Os.DOWN:Os.UP:t>0?Os.RIGHT:Os.LEFT}function she(t,e,n,r,o,i){if(t)switch(e){case Os.LEFT:e=Os.RIGHT;break;case Os.RIGHT:e=Os.LEFT;break}switch(e){case Os.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case Os.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case Os.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case Os.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case Os.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const PZe=()=>{const t=br(),e=yn(),n=St(t,bR),r=St(t,Bj),o=St(t,pde),i=n===0&&o===0,s=St(t,$Xe),a=!s&&i,l=!s&&n>0&&r===0;let c=null,u=null;return a&&(c="noRowsOverlay"),l&&(c="noResultsOverlay"),s&&(c="loadingOverlay",u=e.slotProps?.loadingOverlay?.[i?"noRowsVariant":"variant"]||null),{overlayType:c,loadingOverlayVariant:u}},RZe=ko("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:t=>t!=="overlayType"&&t!=="loadingOverlayVariant",overridesResolver:(t,e)=>e.overlayWrapper})(({overlayType:t,loadingOverlayVariant:e})=>e!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:t==="loadingOverlay"?5:4}:{}),OZe=ko("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:t=>t!=="overlayType"&&t!=="loadingOverlayVariant",overridesResolver:(t,e)=>e.overlayWrapperInner})({}),NZe=t=>{const{classes:e}=t;return Dr({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Lr,e)};function MZe(t){const e=br(),n=yn(),r=St(e,qa);let o=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);o===0&&(o=Ide);const i=NZe(ae({},t,{classes:n.classes}));return g(RZe,ae({className:Ye(i.root)},t,{children:g(OZe,ae({className:Ye(i.inner),style:{height:o,width:r.viewportOuterSize.width}},t))}))}function DZe(t){const{overlayType:e}=t,n=yn();if(!e)return null;const r=n.slots?.[e],o=n.slotProps?.[e];return g(MZe,ae({},t,{children:g(r,ae({},o))}))}const sD=t=>t.columnMenu;function LZe(){const t=yd(),e=yn(),n=St(t,Qi),r=St(t,YKe),o=St(t,GKe),i=St(t,Bde),s=St(t,()=>Uj(t)===null),a=St(t,iQe),l=St(t,oQe),c=St(t,r2),u=St(t,wR),d=St(t,sD),h=St(t,dh),f=St(t,QQe),p=!(a===null&&i===null&&s),m=t.current.columnHeadersContainerRef;return g(e.slots.columnHeaders,ae({ref:m,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:a,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:h,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:p},e.slotProps?.columnHeaders))}const kZe=Om(LZe),ahe=C.createContext(void 0),lhe=()=>{const t=C.useContext(ahe);if(t===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` 360`));return t},FZe=ko("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),BZe=ko("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.main,n.hasPinnedRight&&e["main--hasPinnedRight"],n.loadingOverlayVariant==="skeleton"&&e["main--hasSkeletonLoadingOverlay"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),$Ze=Kr((t,e)=>{const{ownerState:n}=t,r=yn(),i=lhe().hooks.useGridAriaAttributes();return K(BZe,ae({ownerState:n,className:t.className,tabIndex:-1},i,r.slotProps?.main,{ref:e,children:[g(FZe,{role:"presentation","data-id":"gridPanelAnchor"}),t.children]}))}),HZe=()=>Dr({root:["topContainer"]},Lr,{}
360),UZe=ko("div")({position:"sticky",zIndex:4,top:0});function zZe(t){const e=HZe();return g(UZe,ae({},t,{className:Ye(e.root,ye["container--top"]),role:"presentation"}))}const VZe=()=>Dr({root:["bottomContainer"]},Lr,{}),GZe=ko("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function WZe(t){const e=VZe();return g(GZe,ae({},t,{className:Ye(e.root,ye["container--bottom"]),role:"presentation"}))}const jZe=(t,e)=>{const{classes:n}=t;return Dr({root:["virtualScrollerContent",e&&"virtualScrollerContent--overflowed"]},Lr,n)},qZe=ko("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.virtualScrollerContent,n.overflowedContent&&e["virtualScrollerContent--overflowed"]]}})({}),YZe=Kr(function(e,n){const r=yn(),o=!r.autoHeight&&e.style?.minHeight==="auto",i=jZe(r,o),s={classes:r.classes,overflowedContent:o};return g(qZe,ae({},e,{ownerState:s,className:Ye(i.root,e.className),ref:n}))}),XZe=ko("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),che=ko("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),KZe=ko(che)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),QZe=ko(che)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),ZZe=ko("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function JZe({rowsLength:t}){const e=br(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:s,leftPinnedWidth:a,rightPinnedWidth:l}=St(e,qa),c=o?s:0,u=n.height-r.height>0;return c===0&&!u?null:K(XZe,{className:ye.filler,role:"presentation",style:{height:c,"--rowBorderColor":t===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[a>0&&g(KZe,{className:ye["filler--pinnedLeft"],style:{width:a}}),g(ZZe,{}),l>0&&g(QZe,{className:ye["filler--pinnedRight"],style:{width:l+(i?s:0)}})]})}const eJe=Om(JZe),tJe=["className"],nJe=t=>{const{classes:e}=t;return Dr({root:["virtualScrollerRenderZone"]},Lr,e)},rJe=ko("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(t,e)=>e.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),oJe=Kr(function(e,n){const{className:r}=e,o=Tn(e,tJe),i=br(),s=yn(),a=nJe(s),l=St(i,()=>{const c=TR(i);return AR(i.current.state).positions[c.firstRowIndex]??0});return g(rJe,ae({className:Ye(a.root,r),ownerState:s,style:{transform:`translate3d(0, ${l}px, 0)`}},o,{ref:n}))}),iJe={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},pa=t=>t.editRows,uhe=yR(pa,(t,{rowId:e,editMode:n})=>n===Gp.Row&&!!t[e]),sJe=yR(pa,(t,{rowId:e,field:n})=>t[e]?.[n]??null),tP=t=>t.preferencePanel,aJe=yR(tP,(t,e)=>!!(t.open&&t.labelId===e));var DC=function(t){return t.filters="filters",t.columns="columns",t}(DC||{});const lJe=(t,e)=>{const{classes:n}=t,r={root:["scrollbar",`scrollbar--${e}`],content:["scrollbarContent"]};return Dr(r,Lr,n)},dhe=ko("div")({position:"absolute",display:"inline-block",zIndex:6,"&:hover":{zIndex:7},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),cJe=ko(dhe)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),uJe=ko(dhe)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),$Q=Kr(function(e,n){const r=yd(),o=yn(),i=C.useRef(!1),s=C.useRef(0),a=C.useRef(null),l=C.useRef(null),c=lJe(o,e.position),u=St(r,qa),d=e.position==="vertical"?"height":"width",h=e.position==="vertical"?"scrollTop":"scrollLeft",f=e.position==="vertical"?"top":"left",p=e.position==="vertical"?u.hasScrollX:u.hasScrollY,m=u.minimumSize[d]+(p?u.scrollbarSize:0),v=(e.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(m/u.viewportOuterSize[d]),b=zi(()=>{const A=a.current,_=e.scrollPosition.current;if(!A||_[f]===s.current)return;if(s.current=_[f],i.current){i.current=!1;return}i.current=!0;const P=_[f]/m;A[h]=P*v}),S=zi(()=>{const A=r.current.virtualScrollerRef.current,_=a.current;if(!_)return;if(i.current){i.current=!1;return}i.current=!0;const P=_[h]/v;A[h]=P*m});Rj(()=>{const A=r.current.virtualScrollerRef.current,_=a.current,P={passive:!0};return A.addEventListener("scroll",b,P),_.addEventListener("scroll",S,P),()=>{A.removeEventListener("scroll",b,P),_.removeEventListener("scroll",S,P)}}),C.useEffect(()=>{l.current.style.setProperty(d,`${v}px`)},[v,d]);const w=e.position==="vertical"?cJe:uJe;return g(w,{ref:S0(n,a),className:c.root,style:e.position==="vertical"&&o.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",children:g("div",{ref:l,className:c.content})})}),dJe=t=>{const{classes:e,hasScrollX:n,hasPinnedRight:r,loadingOverlayVariant:o}=t;return Dr({root:["main",r&&"main--hasPinnedRight",o==="skeleton"&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",n&&"virtualScroller--hasScrollX"]},Lr,e)},hJe=ko("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.virtualScroller,n.hasScrollX&&e["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),fJe=t=>t.dimensions.rightPinnedWidth>0;function pJe(t){const e=br(),n=yn(),r=St(e,cXe),o=St(e,lXe),i=St(e,fJe),s=St(e,hXe),a=PZe(),l={classes:n.classes,hasScrollX:o,hasPinnedRight:i,loadingOverlayVariant:a.loadingOverlayVariant},c=dJe(l),u=xZe(),{getContainerProps:d,getScrollerProps:h,getContentProps:f,getRenderZoneProps:p,getScrollbarVerticalProps:m,getScrollbarHorizontalProps:y,getRows:v,getScrollAreaProps:b}=u,S=v();return K($Ze,ae({className:c.root},d(),{ownerState:l,children:[g(DQ,ae({scrollDirection:"left"},b())),g(DQ,ae({scrollDirection:"right"},b())),K(hJe,ae({className:c.scroller},h(),{ownerState:l,children:[K(zZe,{children:[!n.unstable_listView&&g(kZe,{}),g(n.slots.pinnedRows,{position:"top",virtualScroller:u})]}),g(DZe,ae({},a)),g(YZe,ae({},f(),{children:K(oJe,ae({},p(),{children:[S,g(n.slots.detailPanels,{virtualScroller:u})]}))})),s&&g(eJe,{rowsLength:S.length}),g(WZe,{children:g(n.slots.pinnedRows,{position:"bottom",virtualScroller:u})})]})),o&&!n.unstable_listView&&g($Q,ae({position:"horizontal"},y())),r&&g($Q,ae({position:"vertical"},m())),t.children]}))}function gJe(){const t=yn();return t.hideFooter?null:g(t.slots.footer,ae({},t.slotProps?.footer))}let c5;function mJe(){return c5===void 0&&document.createElement("div").focus({get preventScroll(){return c5=!0,!1}}),c5}function yJe({defaultSlots:t,slots:e}){const n=e;if(!n||Object.keys(n).length===0)return t;const r=ae({},t);
360return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}function vJe(t){if(t.slotProps?.root)return t;const e=Object.keys(t);if(!e.some(o=>o.startsWith("aria-")||o.startsWith("data-")))return t;const n={},r=t.forwardedProps??{};for(let o=0;o<e.length;o+=1){const i=e[o];i.startsWith("aria-")||i.startsWith("data-")?r[i]=t[i]:n[i]=t[i]}return n.forwardedProps=r,n}function bJe(t){return C.useMemo(()=>vJe(t),[t])}const CJe=t=>{const e=t.match(/^__row_group_by_columns_group_(.*)__$/);return e?e[1]:null},SJe=t=>t===Rde||CJe(t)!==null,hhe=(t,e)=>{if(t)if(e){if(t===Tr.LEFT)return"right";if(t===Tr.RIGHT)return"left"}else{if(t===Tr.LEFT)return"left";if(t===Tr.RIGHT)return"right"}};function XF(t,e,n,r){const o=hhe(n,e);return!o||r===void 0||(t[o]=r),t}const EJe=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],xJe=["changeReason","unstable_updateV
360alueOnRender"];Tr.LEFT+"",Fy.LEFT,Tr.RIGHT+"",Fy.RIGHT,Tr.NONE+"",Tr.VIRTUAL+"";const wJe=t=>{const{align:e,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:s,isSelectionMode:a,classes:l}=t,c={root:["cell",`cell--text${vR(e)}`,s&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===Tr.LEFT&&"cell--pinnedLeft",o===Tr.RIGHT&&"cell--pinnedRight",a&&!i&&"cell--selectionMode"]};return Dr(c,Lr,l)},AJe=Kr(function(e,n){const{column:r,row:o,rowId:i,rowNode:s,align:a,colIndex:l,width:c,className:u,style:d,colSpan:h,disableDragEvents:f,isNotVisible:p,pinnedOffset:m,pinnedPosition:y,showRightBorder:v,showLeftBorder:b,onClick:S,onDoubleClick:w,onMouseDown:A,onMouseUp:_,onMouseOver:P,onKeyDown:R,onKeyUp:O,onDragEnter:N,onDragOver:M}=e,L=Tn(e,EJe),F=yd(),$=yn(),D=ic(),k=r.field,U=ZI(F,sJe,{rowId:i,field:k}),H=U?vo.Edit:vo.View,V=F.current.getCellParamsForRow(i,k,o,{colDef:r,cellMode:H,rowNode:s,tabIndex:St(F,()=>{const j=Uj(F);return j&&j.field===k&&j.id===i?0:-1}),hasFocus:St(F,()=>{const j=su(F);return j?.id===i&&j.field===k})});V.api=F.current;const q=St(F,()=>F.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:i,field:k})),J=St(F,ohe),Q=St(F,yZe),{hasFocus:se,isEditable:oe=!1,value:ie}=V,ee=r.type==="actions"&&r.getActions?.(F.current.getRowParams(i)).some(j=>!j.props.disabled),re=(H==="view"||!oe)&&!ee?V.tabIndex:-1,{classes:fe,getCellClassName:we}=$,ve=[St(F,()=>F.current.unstable_applyPipeProcessors("cellClassName",[],{id:i,field:k}).filter(Boolean).join(" "))];r.cellClassName&&ve.push(typeof r.cellClassName=="function"?r.cellClassName(V):r.cellClassName),r.display==="flex"&&ve.push(ye["cell--flex"]),we&&ve.push(we(V));const Re=V.formattedValue??ie,pe=C.useRef(null),Be=S0(n,pe),ke=C.useRef(null),Ne=$.cellSelection??!1,ot={align:a,showLeftBorder:b,showRightBorder:v,isEditable:oe,classes:$.classes,pinnedPosition:y,isSelected:q,isSelectionMode:Ne},ce=wJe(ot),Ae=C.useCallback(j=>ue=>{const he=F.current.getCellParams(i,k||"");F.current.publishEvent(j,he,ue),_&&_(ue)},[F,k,_,i]),be=C.useCallback(j=>ue=>{const he=F.current.getCellParams(i,k||"");F.current.publishEvent(j,he,ue),A&&A(ue)},[F,k,A,i]),Se=C.useCallback((j,ue)=>he=>{if(!F.current.getRow(i))return;const Ce=F.current.getCellParams(i,k||"");F.current.publishEvent(j,Ce,he),ue&&ue(he)},[F,k,i]),Pe=J[i]?.[k]??!1,Ue=Q[i]?.[k]??1,_e=C.useMemo(()=>{if(p)return{padding:0,opacity:0,width:0,height:0,border:0};const j=XF(ae({"--width":`${c}px`},d),D,y,m),ue=y===Tr.LEFT,he=y===Tr.RIGHT;return Ue>1&&(j.height=`calc(var(--height) * ${Ue})`,j.zIndex=5,(ue||he)&&(j.zIndex=6)),j},[c,p,d,m,y,D,Ue]);if(C.useEffect(()=>{if(!se||H===vo.Edit)return;const j=wv(F.current.rootElementRef.current);if(pe.current&&!pe.current.contains(j.activeElement)){const ue=pe.current.querySelector('[tabindex="0"]'),he=ke.current||ue||pe.current;if(mJe())he.focus({preventScroll:!0});else{const Ce=F.current.getScrollPosition();he.focus(),F.current.scroll(Ce)}}},[se,H,F]),Pe)return g("div",{"data-colindex":l,role:"presentation",style:ae({width:"var(--width)"},_e)});let Oe=L.onFocus,ze,ne;if(U===null&&r.renderCell&&(ze=r.renderCell(V)),U!==null&&r.renderEditCell){const j=F.current.getRowWithUpdatedValues(i,r.field),ue=Tn(U,xJe),he=r.valueFormatter?r.valueFormatter(U.value,j,r,F):V.formattedValue,Ce=ae({},V,{row:j,formattedValue:he},ue);ze=r.renderEditCell(Ce),ve.push(ye["cell--editing"]),ve.push(fe?.["cell--editing"])}if(ze===void 0){const j=Re?.toString();ze=j,ne=j}C.isValidElement(ze)&&ee&&(ze=C.cloneElement(ze,{focusElementRef:ke}));const W=f?null:{onDragEnter:Se("cellDragEnter",N),onDragOver:Se("cellDragOver",M)};return g("div",ae({className:Ye(ce.root,ve,u),role:"gridcell","data-field":k,"data-colindex":l,"aria-colindex":l+1,"aria-colspan":h,"aria-rowspan":Ue,style:_e,title:ne,tabIndex:re,onClick:Se("cellClick",S),onDoubleClick:Se("cellDoubleClick",w),onMouseOver:Se("cellMouseOver",P),onMouseDown:be("cellMouseDown"),onMouseUp:Ae("cellMouseUp"),onKeyDown:Se("cellKeyDown",R),onKeyUp:Se("cellKeyUp",O)},W,L,{onFocus:Oe,ref:Be,children:ze}))}),TJe=Om(AJe),_Je=["field","type","align","width","height","empty","style","className"],HQ="1.3em",IJe="1.2em",UQ=[40,80],PJe={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},RJe=t=>{const{align:e,classes:n,empty:r}=t,o={root:["cell","cellSkeleton",`cell--text${e?vR(e):"Left"}`,r&&"cellEmpty"]};return Dr(o,Lr,n)},OJe=tKe(12345);function NJe(t){const{field:e,type:n,align:r,width:o,height:i,empty:s=!1,style:a,className:l}=t,c=Tn(t,_Je),d={classes:yn().classes,align:r,empty:s}
360,h=RJe(d),f=C.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:HQ,height:HQ};const[m,y]=n?PJe[n]??UQ:UQ;return{variant:"text",width:`${Math.round(OJe(m,y))}%`,height:IJe}},[n]);return g("div",ae({"data-field":e,className:Ye(h.root,l),style:ae({height:i,maxWidth:o,minWidth:o},a)},c,{children:!s&&g(BGe,ae({},f))}))}const MJe=Om(NJe);function DJe(t){return t.vars?t.vars.palette.TableCell.border:t.palette.mode==="light"?md(Tl(t.palette.divider,1),.88):UG(Tl(t.palette.divider,1),.68)}const zQ={[`& .${ye.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ye.menuIcon}`]:{width:"auto",visibility:"visible"}},LJe=10,FN=-5,pE=1,VQ={width:3,rx:1.5,x:10.5},kJe="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",FJe=t=>t.dimensions.hasScrollX&&(!t.dimensions.hasScrollY||t.dimensions.scrollbarSize===0),BJe=$e("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`&.${ye.autoHeight}`]:e.autoHeight},{[`&.${ye.autosizing}`]:e.autosizing},{[`&.${ye["root--densityStandard"]}`]:e["root--densityStandard"]},{[`&.${ye["root--densityComfortable"]}`]:e["root--densityComfortable"]},{[`&.${ye["root--densityCompact"]}`]:e["root--densityCompact"]},{[`&.${ye["root--disableUserSelection"]}`]:e["root--disableUserSelection"]},{[`&.${ye["root--noToolbar"]}`]:e["root--noToolbar"]},{[`&.${ye.withVerticalBorder}`]:e.withVerticalBorder},{[`& .${ye.actionsCell}`]:e.actionsCell},{[`& .${ye.booleanCell}`]:e.booleanCell},{[`& .${ye.cell}`]:e.cell},{[`& .${ye["cell--editable"]}`]:e["cell--editable"]},{[`& .${ye["cell--editing"]}`]:e["cell--editing"]},{[`& .${ye["cell--flex"]}`]:e["cell--flex"]},{[`& .${ye["cell--pinnedLeft"]}`]:e["cell--pinnedLeft"]},{[`& .${ye["cell--pinnedRight"]}`]:e["cell--pinnedRight"]},{[`& .${ye["cell--rangeBottom"]}`]:e["cell--rangeBottom"]},{[`& .${ye["cell--rangeLeft"]}`]:e["cell--rangeLeft"]},{[`& .${ye["cell--rangeRight"]}`]:e["cell--rangeRight"]},{[`& .${ye["cell--rangeTop"]}`]:e["cell--rangeTop"]},{[`& .${ye["cell--selectionMode"]}`]:e["cell--selectionMode"]},{[`& .${ye["cell--textCenter"]}`]:e["cell--textCenter"]},{[`& .${ye["cell--textLeft"]}`]:e["cell--textLeft"]},{[`& .${ye["cell--textRight"]}`]:e["cell--textRight"]},{[`& .${ye["cell--withLeftBorder"]}`]:e["cell--withLeftBorder"]},{[`& .${ye["cell--withRightBorder"]}`]:e["cell--withRightBorder"]},{[`& .${ye.cellCheckbox}`]:e.cellCheckbox},{[`& .${ye.cellEmpty}`]:e.cellEmpty},{[`& .${ye.cellOffsetLeft}`]:e.cellOffsetLeft},{[`& .${ye.cellSkeleton}`]:e.cellSkeleton},{[`& .${ye.checkboxInput}`]:e.checkboxInput},{[`& .${ye.columnHeader}`]:e.columnHeader},{[`& .${ye["columnHeader--alignCenter"]}`]:e["columnHeader--alignCenter"]},{[`& .${ye["columnHeader--alignLeft"]}`]:e["columnHeader--alignLeft"]},{[`& .${ye["columnHeader--alignRight"]}`]:e["columnHeader--alignRight"]},{[`& .${ye["columnHeader--dragging"]}`]:e["columnHeader--dragging"]},{[`& .${ye["columnHeader--emptyGroup"]}`]:e["columnHeader--emptyGroup"]},{[`& .${ye["columnHeader--filledGroup"]}`]:e["columnHeader--filledGroup"]},{[`& .${ye["columnHeader--filtered"]}`]:e["columnHeader--filtered"]},{[`& .${ye["columnHeader--last"]}`]:e["columnHeader--last"]},{[`& .${ye["columnHeader--lastUnpinned"]}`]:e["columnHeader--lastUnpinned"]},{[`& .${ye["columnHeader--moving"]}`]:e["columnHeader--moving"]},{[`& .${ye["columnHeader--numeric"]}`]:e["columnHeader--numeric"]},{[`& .${ye["columnHeader--pinnedLeft"]}`]:e["columnHeader--pinnedLeft"]},{[`& .${ye["columnHeader--pinnedRight"]}`]:e["columnHeader--pinnedRight"]},{[`& .${ye["columnHeader--siblingFocused"]}`]:e["columnHeader--siblingFocused"]},{[`& .${ye["columnHeader--sortable"]}`]:e["columnHeader--sortable"]},{[`& .${ye["columnHeader--sorted"]}`]:e["columnHeader--sorted"]},{[`& .${ye["columnHeader--withLeftBorder"]}`]:e["columnHeader--withLeftBorder"]},{[`& .${ye["columnHeader--withRightBorder"]}`]:e["columnHeader--withRightBorder"]},{[`& .${ye.columnHeaderCheckbox}`]:e.columnHeaderCheckbox},{[`& .${ye.columnHeaderDraggableContainer}`]:e.columnHeaderDraggableContainer},{[`& .${ye.columnHeaderTitleContainer}`]:e.columnHeaderTitleContainer},{[`& .${ye.columnHeaderTitleContainerContent}`]:e.columnHeaderTitleContainerContent},{[`& .${ye.columnSeparator}`]:e.columnSeparator},{[`& .${ye["columnSeparator--resizable"]}`]:e["columnSeparator--resizable"]},{[`& .${ye["columnSeparator--resizing"]}`]:e["columnSeparator--resizing"]},{[`& .${ye["columnSeparator--sideLeft"]}`]:e["columnSeparator--sideLeft"]},{[`& .${ye["columnSeparator--sideRight"]}`]:e["columnSeparator--sideRight"]},{[`& .${ye["container--bottom"]}`]:e["container--bottom"]},{[`& .${ye["container--top"]}`]:e["container--top"]},{[`& .${ye.detailPanelToggleCell}`]:e.detailPanelToggleCell},{[`& .${ye["detailPanelToggleCell--expanded"]}`]:e["detailPanelToggleCell--expanded"]},{[`& .${ye.editBooleanCell}`]:e.editBooleanCell},{[`& .${ye.filterIcon}`]:e.filterIcon},{[`& .${ye["filler--borderBottom"]}`]:e["filler--borderBottom"]},{[`& .${ye["filler--pinnedLeft"]}`]:e["filler--pinnedLeft"]},{[`& .${ye["filler--pinnedRight"]}`]:e["filler--pinnedRight"]},{[`& .${ye.groupingCriteriaCell}`]:e.groupingCriteriaCell}
360,{[`& .${ye.groupingCriteriaCellLoadingContainer}`]:e.groupingCriteriaCellLoadingContainer},{[`& .${ye.groupingCriteriaCellToggle}`]:e.groupingCriteriaCellToggle},{[`& .${ye.headerFilterRow}`]:e.headerFilterRow},{[`& .${ye.iconSeparator}`]:e.iconSeparator},{[`& .${ye.menuIcon}`]:e.menuIcon},{[`& .${ye.menuIconButton}`]:e.menuIconButton},{[`& .${ye.menuList}`]:e.menuList},{[`& .${ye.menuOpen}`]:e.menuOpen},{[`& .${ye.overlayWrapperInner}`]:e.overlayWrapperInner},{[`& .${ye.pinnedRows}`]:e.pinnedRows},{[`& .${ye["pinnedRows--bottom"]}`]:e["pinnedRows--bottom"]},{[`& .${ye["pinnedRows--top"]}`]:e["pinnedRows--top"]},{[`& .${ye.row}`]:e.row},{[`& .${ye["row--borderBottom"]}`]:e["row--borderBottom"]},{[`& .${ye["row--detailPanelExpanded"]}`]:e["row--detailPanelExpanded"]},{[`& .${ye["row--dragging"]}`]:e["row--dragging"]},{[`& .${ye["row--dynamicHeight"]}`]:e["row--dynamicHeight"]},{[`& .${ye["row--editable"]}`]:e["row--editable"]},{[`& .${ye["row--editing"]}`]:e["row--editing"]},{[`& .${ye["row--firstVisible"]}`]:e["row--firstVisible"]},{[`& .${ye["row--lastVisible"]}`]:e["row--lastVisible"]},{[`& .${ye.rowReorderCell}`]:e.rowReorderCell},{[`& .${ye["rowReorderCell--draggable"]}`]:e["rowReorderCell--draggable"]},{[`& .${ye.rowReorderCellContainer}`]:e.rowReorderCellContainer},{[`& .${ye.rowReorderCellPlaceholder}`]:e.rowReorderCellPlaceholder},{[`& .${ye.rowSkeleton}`]:e.rowSkeleton},{[`& .${ye.scrollbar}`]:e.scrollbar},{[`& .${ye["scrollbar--horizontal"]}`]:e["scrollbar--horizontal"]},{[`& .${ye["scrollbar--vertical"]}`]:e["scrollbar--vertical"]},{[`& .${ye.scrollbarFiller}`]:e.scrollbarFiller},{[`& .${ye["scrollbarFiller--borderBottom"]}`]:e["scrollbarFiller--borderBottom"]},{[`& .${ye["scrollbarFiller--borderTop"]}`]:e["scrollbarFiller--borderTop"]},{[`& .${ye["scrollbarFiller--header"]}`]:e["scrollbarFiller--header"]},{[`& .${ye["scrollbarFiller--pinnedRight"]}`]:e["scrollbarFiller--pinnedRight"]},{[`& .${ye.sortIcon}`]:e.sortIcon},{[`& .${ye.treeDataGroupingCell}`]:e.treeDataGroupingCell},{[`& .${ye.treeDataGroupingCellLoadingContainer}`]:e.treeDataGroupingCellLoadingContainer},{[`& .${ye.treeDataGroupingCellToggle}`]:e.treeDataGroupingCellToggle},{[`& .${ye.withBorderColor}`]:e.withBorderColor}]})(({theme:t})=>{const e=yd(),n=St(e,FJe),r=DJe(t),o=t.shape.borderRadius,i=t.vars?t.vars.palette.background.default:t.mixins.MuiDataGrid?.containerBackground??t.palette.background.default,s=t.mixins.MuiDataGrid?.pinnedBackground??i,a=t.vars?`rgba(${t.vars.palette.background.defaultChannel} / ${t.vars.palette.action.disabledOpacity})`:Tl(t.palette.background.default,t.palette.action.disabledOpacity),l=(t.vars||t).palette.action.hoverOpacity,c=(t.vars||t).palette.action.hover,u=(t.vars||t).palette.action.selectedOpacity,d=t.vars?`calc(${l} + ${u})`:l+u,h=t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${u})`:Tl(t.palette.primary.main,u),f=t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${d})`:Tl(t.palette.primary.main,d),p=t.vars?UJe:$Je,m=R=>({[`& .${ye["cell--pinnedLeft"]}, & .${ye["cell--pinnedRight"]}`]:{backgroundColor:R,"&.Mui-selected":{backgroundColor:p(R,h,u),"&:hover":{backgroundColor:p(R,h,d)}}}}),y=p(s,c,l),v=m(y),b=p(s,h,u),S=m(b),w=p(s,f,d),A=m(w),_={backgroundColor:h,"&:hover":{backgroundColor:f,"@media (hover: none)":{backgroundColor:h}}};return ae({"--unstable_DataGrid-radius":typeof o=="number"?`${o}px`:o,"--unstable_DataGrid-headWeight":t.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":a,"--DataGrid-containerBackground":i,"--DataGrid-pinnedBackground":s,"--DataGrid-rowBorderColor":r,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:r,borderRadius:"var(--unstable_DataGrid-radius)",color:(t.vars||t).palette.text.primary},t.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${ye.main} > *:first-child${kJe}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${ye.autoHeight}`]:{height:"auto"},[`&.${ye.autosizing}`]:{[`& .${ye.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${ye.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${ye.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${ye.groupingCriteriaCell}`]:{width:"unset"},[`& .${ye.treeDataGroupingCell}`]:{width:"unset"}},[`& .${ye.columnHeader}, & .${ye.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${ye.columnHeader}:focus-within, & .${ye.cell}:focus-within`]:{outline:`solid ${t.vars?`rgba(${t.vars.palette.primary.mainChannel} / 0.5)`:Tl(t.palette.primary.main,.5)} ${pE}px`,outlineOffset:pE*-1},[`& .${ye.columnHeader}:focus, & .${ye.cell}:focus`]:{outline:`solid ${t.palette.primary.main} ${pE}px`,outlineOffset:pE*-1},[`& .${ye.columnHeader}:focus, 361 & .${ye["columnHeader--withLeftBorder"]}, 362 & .${ye["columnHeader--withRightBorder"]}, 363 & .${ye["columnHeader--siblingFocused"]}, 364 & .${ye["virtualScroller--hasScrollX"]} .${ye["columnHeader--lastUnpinned"]}, 365 & .${ye["virtualScroller--hasScrollX"]} .${ye["columnHeader--last"]} 366 `]:{[`& .${ye.columnSeparator}`]:{opacity:0}
366,"@media (hover: none)":{[`& .${ye["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${ye["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${ye["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${ye["root--noToolbar"]} [aria-rowindex="1"] .${ye["columnHeader--last"]}`]:{borderTopRightRadius:n?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${ye.columnHeaderCheckbox}, & .${ye.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${ye.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${ye["virtualScroller--hasScrollX"]} .${ye["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${ye["columnHeader--sorted"]} .${ye.iconButtonContainer}, & .${ye["columnHeader--filtered"]} .${ye.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ye.columnHeader}:not(.${ye["columnHeader--sorted"]}) .${ye.sortIcon}`]:{opacity:0,transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.shorter})},[`& .${ye.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:t.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${ye.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${ye["columnHeader--filledGroup"]} .${ye.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${ye.sortIcon}, & .${ye.filterIcon}`]:{fontSize:"inherit"},[`& .${ye["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${ye["columnHeader--alignCenter"]} .${ye.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${ye["columnHeader--alignRight"]} .${ye.columnHeaderDraggableContainer}, & .${ye["columnHeader--alignRight"]} .${ye.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${ye["columnHeader--alignCenter"]} .${ye.menuIcon}`]:{marginLeft:"auto"},[`& .${ye["columnHeader--alignRight"]} .${ye.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${ye["columnHeader--moving"]}`]:{backgroundColor:(t.vars||t).palette.action.hover},[`& .${ye["columnHeader--pinnedLeft"]}, & .${ye["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${ye.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:LJe,color:r},[`& .${ye.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${ye.columnHeader}:hover`]:zQ,[`& .${ye.columnHeader}:not(.${ye["columnHeader--sorted"]}):hover .${ye.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${ye.columnHeader}`]:zQ,[`& .${ye.columnHeader}:focus, 367 & .${ye["columnHeader--siblingFocused"]}`]:{[`.${ye["columnSeparator--resizable"]}`]:{color:(t.vars||t).palette.primary.main}}},[`& .${ye["columnSeparator--sideLeft"]}`]:{left:FN},[`& .${ye["columnSeparator--sideRight"]}`]:{right:FN},[`& .${ye["columnHeader--withRightBorder"]} .${ye["columnSeparator--sideLeft"]}`]:{left:FN-.5},[`& .${ye["columnHeader--withRightBorder"]} .${ye["columnSeparator--sideRight"]}`]:{right:FN-.5},[`& .${ye["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${ye["columnSeparator--resizing"]}`]:{color:(t.vars||t).palette.primary.main},"@media (hover: none)":{[`& .${ye.iconSeparator} rect`]:VQ},"@media (hover: hover)":{"&:hover":{color:(t.vars||t).palette.primary.main,[`& .${ye.iconSeparator} rect`]:VQ}},"& svg":{pointerEvents:"none"}},[`& .${ye.iconSeparator}`]:{color:"inherit",transition:t.transitions.create(["color","width"],{duration:t.transitions.duration.shortest})},[`& .${ye.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${ye.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${ye.headerFilterRow}`]:{[`& .${ye.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${ye["row--borderBottom"]} .${ye.columnHeader}, 368 & .${ye["row--borderBottom"]} .${ye.filler}, 369 & .${ye["row--borderBottom"]} .${ye.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ye["row--borderBottom"]} .${ye.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${ye.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${ye["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ye.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":_},[`& .${ye["container--top"]}, & .${ye["container--bottom"]}
369`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${ye.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":_},[`& .${ye["virtualScrollerContent--overflowed"]} .${ye["row--lastVisible"]} .${ye.cell}`]:{borderTopColor:"transparent"},[`& .${ye["pinnedRows--top"]} :first-of-type`]:{[`& .${ye.cell}, .${ye.scrollbarFiller}`]:{borderTop:"none"}},[`&.${ye["root--disableUserSelection"]} .${ye.cell}`]:{userSelect:"none"},[`& .${ye["row--dynamicHeight"]} > .${ye.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${ye.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${ye.cell}.${ye["cell--selectionMode"]}`]:{cursor:"default"},[`& .${ye.cell}.${ye["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:t.shadows[2],backgroundColor:(t.vars||t).palette.background.paper,"&:focus-within":{outline:`${pE}px solid ${(t.vars||t).palette.primary.main}`,outlineOffset:pE*-1}},[`& .${ye["row--editing"]}`]:{boxShadow:t.shadows[2]},[`& .${ye["row--editing"]} .${ye.cell}`]:{boxShadow:t.shadows[0],backgroundColor:(t.vars||t).palette.background.paper},[`& .${ye.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${ye.booleanCell}[data-value="true"]`]:{color:(t.vars||t).palette.text.secondary},[`& .${ye.booleanCell}[data-value="false"]`]:{color:(t.vars||t).palette.text.disabled},[`& .${ye.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:t.spacing(1)},[`& .${ye.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(t.vars||t).palette.action.disabledOpacity},[`& .${ye["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${ye.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${ye.withBorderColor}`]:{borderColor:r},[`& .${ye["cell--withLeftBorder"]}, & .${ye["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${ye["cell--withRightBorder"]}, & .${ye["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ye["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${ye["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${ye["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${ye["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${ye["cell--pinnedLeft"]}, & .${ye["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:b}},[`& .${ye.virtualScrollerContent} .${ye.row}`]:{"&:hover":v,"&.Mui-selected":S,"&.Mui-selected:hover":A},[`& .${ye.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${ye.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${ye.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${ye.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${ye["columnHeader--dragging"]}, & .${ye["row--dragging"]}`]:{background:(t.vars||t).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(t.vars||t).palette.action.disabledOpacity},[`& .${ye["row--dragging"]}`]:{background:(t.vars||t).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(t.vars||t).palette.action.disabledOpacity,[`& .${ye.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${ye.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ye.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:t.spacing(2)},[`& .${ye.treeDataGroupingCellLoadingContainer}, .${ye.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${ye.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ye.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:t.spacing(2)},[`.${ye.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${ye["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ye["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ye["scrollbarFiller--pinnedRight"]}
369`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${ye.filler}`]:{flex:"1 0 auto"},[`& .${ye["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ye["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${ye.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${ye["scrollbar--vertical"]}, & .${ye.pinnedRows}, & .${ye.virtualScroller} > .${ye.filler}`]:{display:"none"}}})});function $Je(t,e,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=W1(t),s=W1(e),a=[o(i.values[0],s.values[0]),o(i.values[1],s.values[1]),o(i.values[2],s.values[2])];return fF({type:"rgb",values:a})}const HJe=t=>`rgb(from ${t} r g b / 1)`;function UJe(t,e,n){return`color-mix(in srgb,${t}, ${HJe(e)} calc(${n} * 100%))`}const zJe=()=>()=>{},VJe=()=>!1,GJe=()=>!0,WJe=()=>Sk.useSyncExternalStore(zJe,VJe,GJe);function jJe(){const t=br(),e=St(t,pf),n=yn(),r=St(t,tP),o=t.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??DC.filters);return g(n.slots.panel,ae({as:n.slots.basePopper,open:e.length>0&&r.open,id:r.panelId,"aria-labelledby":r.labelId},n.slotProps?.panel,n.slotProps?.basePopper,{children:o}))}function qJe(){const t=yn();return K(C.Fragment,{children:[g(jJe,{}),t.slots.toolbar&&g(t.slots.toolbar,ae({},t.slotProps?.toolbar))]})}const YJe=["className","children"],XJe=(t,e)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=t,i={root:["root",n&&"autoHeight",`root--density${vR(e)}`,t.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return Dr(i,Lr,r)},KJe=Kr(function(e,n){const r=yn(),{className:o,children:i}=e,s=Tn(e,YJe),a=yd(),l=St(a,ZE),c=a.current.rootElementRef,u=C.useCallback(m=>{m!==null&&a.current.publishEvent("rootMount",m)},[a]),d=S0(c,n,u),h=r,f=XJe(h,l);return WJe()?null:K(BJe,ae({className:Ye(f.root,o),ownerState:h},s,{ref:d,children:[g(qJe,{}),g(pJe,{children:i}),g(gJe,{})]}))}),QJe=Om(KJe),ZJe=["className"],JJe=t=>{const{classes:e}=t;return Dr({root:["footerContainer","withBorderColor"]},Lr,e)},eet=ko("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(t,e)=>e.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),tet=Kr(function(e,n){const{className:r}=e,o=Tn(e,ZJe),i=yn(),s=JJe(i);return g(eet,ae({className:Ye(s.root,r),ownerState:i},o,{ref:n}))}),net=["className"],ret=t=>{const{classes:e}=t;return Dr({root:["overlay"]},Lr,e)},oet=ko("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(t,e)=>e.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),Yj=Kr(function(e,n){const{className:r}=e,o=Tn(e,net),i=yn(),s=ret(i);return g(oet,ae({className:Ye(s.root,r),ownerState:i},o,{ref:n}))}),iet=t=>{const{classes:e,open:n}=t;return Dr({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},Lr,e)},set=C.memo(t=>{const{colDef:e,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=t,s=br(),a=yn(),l=ae({},t,{classes:a.classes}),c=iet(l),u=C.useCallback(d=>{d.preventDefault(),d.stopPropagation(),s.current.toggleColumnMenu(e.field)},[s,e.field]);return g("div",{className:c.root,children:g(a.slots.baseTooltip,ae({title:s.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},a.slotProps?.baseTooltip,{children:g(a.slots.baseIconButton,ae({ref:i,tabIndex:-1,className:c.button,"aria-label":s.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},a.slotProps?.baseIconButton,{children:g(a.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function aet({columnMenuId:t,columnMenuButtonId:e,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:s,onExited:a}){const l=br(),c=l.current.getColumn(o),u=zi(d=>{d&&(d.stopPropagation(),s?.contains(d.target))||l.current.hideColumnMenu()});return!s||!c?null:g(Lj,{placement:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:s,onClose:u,onExited:a,children:g(n,ae({colDef:c,hideMenu:u,open:i,id:t,labelledby:e},r))})}function cet(t){return t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth}function s2(t,e){return t.closest(`.${e}`)}function Mm(t){return t.replace(/["\\]/g,"\\$&")}function uet(t,e){return t.querySelector(`[role="columnheader"][data-field="${Mm(e)}"]`)}function fhe(t){return`.${ye.row}[data-id="${Mm(String(t))}"]`}function det(t,e){return t.querySelector(fhe(e))}function het(t,{id:e,field:n}){const r=fhe(e),o=`.${ye.cell}[data-field="${Mm(n)}"]`,i=`${r} ${o}`;return t.querySelector(i)}function _R(t){return t.target.nodeType===1&&!t.currentTarget.contains(t.target)}function fet(t){return t.getAttribute("data-field")}function pet(t,e){return t.querySelector(`[data-field="${Mm(e)}"]`)}function get(t){return t.getAttribute("data-fields").slice(2,-2).split("-|-")}function met(t,e){return Array.from(t.querySelectorAll(`[data-fields*="|-${Mm(e)}-|"]`)??[])}function yet(t,e){if(!s2(t,ye.root))throw new Error("MUI X: The root element is not found.");const r=t.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return e.virtualScrollerRef?.current?(mhe(e).forEach(s=>{const a=s.getAttribute("data-id");if(!a)return;let l=o;const c=e.unstable_getCellColSpanInfo(a,o);c&&c.spannedByColSpan&&(l=c.leftVisibleCellIndex);const u=s.querySelector(`[data-colindex="${l}"]`);u&&i.push(u)}),i):[]}function GQ(t,e){return t.rootElementRef.current.querySelector(`.${ye[e]}`)}const phe=({api:t,colIndex:e,position:n,filterFn:r})=>{if(e===null)return[];const o=[];return mhe(t).forEach(i=>
369{i.getAttribute("data-id")&&i.querySelectorAll(`.${ye[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(a=>{const l=yw(a);l!==null&&r(l)&&o.push(a)})}),o};function vet(t,e,n){const r=yw(e);return phe({api:t,colIndex:r,position:n?"right":"left",filterFn:o=>n?o<r:o>r})}function bet(t,e,n){const r=yw(e);return phe({api:t,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o<r})}const ghe=({api:t,colIndex:e,position:n,filterFn:r})=>{if(!t.columnHeadersContainerRef?.current)return[];if(e===null)return[];const o=[];return t.columnHeadersContainerRef.current.querySelectorAll(`.${ye[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(i=>{const s=yw(i);s!==null&&r(s,i)&&o.push(i)}),o};function Cet(t,e,n){const r=yw(e);return ghe({api:t,position:n?"right":"left",colIndex:r,filterFn:o=>n?o<r:o>r})}function Eet(t,e,n){const r=yw(e);return ghe({api:t,position:n?"left":"right",colIndex:r,filterFn:(o,i)=>i.classList.contains(ye["columnHeader--last"])?!1:n?o>r:o<r})}function xet(t,e){return t.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${Mm(e)}"][role="columnheader"]`)}function wet(t,e){const n=t.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${Mm(e)}"][role="gridcell"]`))}function mhe(t){return t.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${ye.row}`)}function yw(t){const e=t.getAttribute("aria-colindex");return e?Number(e)-1:null}const Aet=["className","aria-label"],Tet=t=>{const{classes:e}=t;return Dr({root:["columnHeaderTitle"]},Lr,e)},_et=ko("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(t,e)=>e.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),Iet=Kr(function(e,n){const{className:r}=e,o=Tn(e,Aet),i=yn(),s=Tet(i);return g(_et,ae({className:Ye(s.root,r),ownerState:i},o,{ref:n}))});function Pet(t){const{label:e,description:n}=t,r=yn(),o=C.useRef(null),[i,s]=C.useState(""),a=C.useCallback(()=>{if(!n&&o?.current){const l=cet(o.current);s(l?e:"")}},[n,e]);return g(r.slots.baseTooltip,ae({title:n||i},r.slotProps?.baseTooltip,{children:g(Iet,{onMouseOver:a,ref:o,children:e})}))}const Ret=["resizable","resizing","height","side"];var Xj=function(t){return t.Left="left",t.Right="right",t}(Xj||{});const Oet=t=>{const{resizable:e,resizing:n,classes:r,side:o}=t,i={root:["columnSeparator",e&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${vR(o)}`],icon:["iconSeparator"]};return Dr(i,Lr,r)};function Net(t){const{height:e,side:n=Xj.Right}=t,r=Tn(t,Ret),o=yn(),i=ae({},t,{side:n,classes:o.classes}),s=Oet(i),a=C.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return g("div",ae({className:s.root,style:{minHeight:e}},r,{onClick:a,children:g(o.slots.columnResizeIcon,{className:s.icon})}))}const Met=C.memo(Net),Det=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],yhe=Kr(function(e,n){const{classes:r,colIndex:o,height:i,isResizing:s,sortDirection:a,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:h,description:f,width:p,columnMenuIconButton:m=null,columnMenu:y=null,columnTitleIconButtons:v=null,headerClassName:b,label:S,resizable:w,draggableContainerProps:A,columnHeaderSeparatorProps:_,style:P}=e,R=Tn(e,Det),O=yd(),N=yn(),M=C.useRef(null),L=S0(M,n);let F="none";return a!=null&&(F=a==="asc"?"ascending":"descending"),C.useLayoutEffect(()=>{const $=O.current.state.columnMenu;l&&!$.open&&((M.current.querySelector('[tabindex="0"]')||M.current)?.focus(),O.current.columnHeadersContainerRef?.current&&(O.current.columnHeadersContainerRef.current.scrollLeft=0))},[O,l]),K("div",ae({className:Ye(r.root,b),style:ae({},P,{height:i,width:p}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":F},R,{ref:L,children:[K("div",ae({className:r.draggableContainer,draggable:d,role:"presentation"},A,{children:[K("div",{className:r.titleContainer,role:"presentation",children:[g("div",{className:r.titleContainerContent,children:h!==void 0?h:g(Pet,{label:S,description:f,columnWidth:p})}),v]}),m]})),g(Met,ae({resizable:!N.disableColumnResize&&!!w,resizing:s,height:i,side:u},_)),y]}))}),Let=t=>{const{colDef:e,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:s,filterItemsCounter:a,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=t,d=o!=null,h=a!=null&&a>0,f=e.type==="number",p={root:["columnHeader",e.headerAlign==="left"&&"columnHeader--alignLeft",e.headerAlign==="center"&&"columnHeader--alignCenter",e.headerAlign==="right"&&"columnHeader--alignRight",e.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",h&&"columnHeader--filtered",f&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",s&&"columnHeader--withLeftBorder",l===Tr.LEFT&&"columnHeader--pinnedLeft",l===Tr.RIGHT&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Dr(p,Lr,n)};function ket(t){const{colDef:e,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:s,sortDirection:a,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:h,separatorSide:f,showLeftBorder:p,showRightBorder:m,pinnedPosition:y,pinnedOffset:v}=t,b=yd(),S=yn(),w=ic(),A=C.useRef(null),_=Cs(),P=Cs(),R=C.useRef(null),[O,N]=C.useState(n),M=C.useMemo(()=>!S.disableColumnReorder&&!h&&!e.disableReorder,[S.disableColumnReorder,h,e.disableReorder]);let L;e.renderHeader&&(L=e.renderHeader(b.current.getColumnHeaderParams(e.field)));const F=ae({},t,{classes:S.classes,showRightBorder:m,showLeftBorder:p}),$=Let(F),D=C.useCallback(fe=>we=>{_R(we)||b.current.publishEvent(fe,b.current.getColumnHeaderParams(e.field),we)},[b,e.field]),k=C.useMemo(()=>({onClick:D("columnHeaderClick"),onContextMenu:D("columnHeaderContextMenu"),onDoubleClick:D("columnHeaderDoubleClick"),onMouseOver:D("columnHeaderOver"),onMouseOut:D("columnHeaderOut"),onMouseEnter:D("columnHeaderEnter"),onMouseLeave:D("columnHeaderLeave"),onKeyDown:D("columnHeaderKeyDown"),onFocus:D("columnHeaderFocus"),onBlur:D("columnHeaderBlur")}),[D]),U=C.useMemo(()=>M?{onDragStart:D("columnHeaderDragStart"),onDragEnter:D("columnHeaderDragEnter"),onDragOver:D("columnHeaderDragOver"),onDragEnd:D("columnHeaderDragEnd")}:{},[M,D]),H=C.useMemo(()=>({onMouseDown:D("columnSeparatorMouseDown"),onDoubleClick:D("columnSeparatorDoubleClick")}),[D]);C.useEffect(()=>{O||N(n)},[O,n]);const V=C.useCallback(()=>{N(!1)},[]),q=!S.disableColumnMenu&&!e.disableColumnMenu&&g(set,{colDef:e,columnMenuId:_,columnMenuButtonId:P,open:O,iconButtonRef:R}),J=g(aet,{columnMenuId:_,columnMenuButtonId:P,field:e.field,open:n,target:R.current,ContentComponent:S.slots.columnMenu,contentComponentProps:S.slotProps?.columnMenu,onExited:V}),Q=e.sortingOrder??S.sortingOrder,se=(e.sortable||a!=null)&&!e.hideSortIcons&&!S.disableColumnSorting,oe=K(C.Fragment,{children:[!S.disableColumnFilter&&g(S.slots.columnHeaderFilterIconButton,ae({field:e.field,counter:c},S.slotProps?.columnHeaderFilterIconButton)),se&&g(S.slots.columnHeaderSortIcon,ae({field:e.field,direction:a,index:l,sortingOrder:Q,disabled:!e.sortable},S.slotProps?.columnHeaderSortIcon))]});C.useLayoutEffect(()=>{const fe=b.current.state.columnMenu;u&&!fe.open&&((A.current.querySelector('[tabindex="0"]')||A.current)?.focus(),b.current.columnHeadersContainerRef?.current&&(b.current.columnHeadersContainerRef.current.scrollLeft=0))},[b,u]);const ie=typeof e.headerClassName=="function"?e.headerClassName({field:e.field,colDef:e}):e.headerClassName,ee=e.headerName??e.field,re=C.useMemo(()=>XF(ae({},t.style),w,y,v),[y,v,t.style,w]);return g(yhe,ae({ref:A,classes:$,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:a,hasFocus:u,tabIndex:d,separatorSide:f,isDraggable:M,headerComponent:L,description:e.description,elementId:e.field,width:e.computedWidth,columnMenuIconButton:q,columnTitleIconButtons:oe,headerClassName:Ye(ie,s&&ye["columnHeader--last"]),label:ee,resizable:!S.disableColumnResize&&!!e.resizable,"data-field":e.field,columnMenu:J,draggableContainerProps:U,columnHeaderSeparatorProps:H,style:re},k))}const Fet=Om(ket),Bet=["className"],$et=t=>{const{classes:e}=t;return Dr({root:["iconButtonContainer"]},Lr,e)},Het=ko("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(t,e)=>e.iconButtonContainer})(()=>
369({display:"flex",visibility:"hidden",width:0})),vhe=Kr(function(e,n){const{className:r}=e,o=Tn(e,Bet),i=yn(),s=$et(i);return g(Het,ae({className:Ye(s.root,r),ownerState:i},o,{ref:n}))}),Uet=["direction","index","sortingOrder","disabled"],zet=t=>{const{classes:e}=t;return Dr({icon:["sortIcon"]},Lr,e)};function Vet(t,e,n,r){let o;const i={};return e==="asc"?o=t.columnSortedAscendingIcon:e==="desc"?o=t.columnSortedDescendingIcon:(o=t.columnUnsortedIcon,i.sortingOrder=r),o?g(o,ae({fontSize:"small",className:n},i)):null}function Get(t){const{direction:e,index:n,sortingOrder:r,disabled:o}=t,i=Tn(t,Uet),s=br(),a=yn(),l=ae({},t,{classes:a.classes}),c=zet(l),u=Vet(a.slots,e,c.icon,r);if(!u)return null;const d=g(a.slots.baseIconButton,ae({tabIndex:-1,"aria-label":s.current.getLocaleText("columnHeaderSortIconLabel"),title:s.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o},a.slotProps?.baseIconButton,i,{children:u}));return K(vhe,{children:[n!=null&&g(a.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:d}),n==null&&d]})}const Wet=C.memo(Get),jet=t=>{const{classes:e}=t;return Dr({icon:["filterIcon"]},Lr,e)};function qet(t){return t.counter?g(Yet,ae({},t)):null}function Yet(t){const{counter:e,field:n,onClick:r}=t,o=br(),i=yn(),s=ae({},t,{classes:i.classes}),a=jet(s),l=Cs(),c=ZI(o,aJe,l),u=Cs(),d=C.useCallback(f=>{f.preventDefault(),f.stopPropagation();const{open:p,openedPanelValue:m}=tP(o.current.state);p&&m===DC.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,l),r&&r(o.current.getColumnHeaderParams(n),f)},[o,n,r,u,l]);if(!e)return null;const h=g(i.slots.baseIconButton,ae({id:l,onClick:d,color:"default","aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?u:void 0},i.slotProps?.baseIconButton,{children:g(i.slots.columnFilteredIcon,{className:a.icon,fontSize:"small"})}));return g(i.slots.baseTooltip,ae({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(e),enterDelay:1e3},i.slotProps?.baseTooltip,{children:K(vhe,{children:[e>1&&g(i.slots.baseBadge,{badgeContent:e,color:"default",children:h}),e===1&&h]})}))}const WQ=gt(g("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),jQ=gt(g("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),qQ=gt(g("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),YQ=gt(g("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Xet=gt(g("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),XQ=gt(g("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),Ket=gt(g("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");gt(g("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");gt(g("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const Qet=gt(g("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),Zet=gt(g("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),Jet=gt(g("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),ett=gt(g("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),ttt=gt(g("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),ntt=gt(g("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),u5=gt(g("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),KQ=gt(g("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),rtt=gt(g("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),ott=gt(g("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),QQ=gt(g("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),itt=gt(g("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),stt=gt(g("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),att=gt(g("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),ltt=gt(g("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),ctt=gt(g("g",{children:g("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),utt=gt(g("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");gt(g("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const dtt=gt(g("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function bhe(t){return t.key.length===1&&!t.ctrlKey&&!t.metaKey}const a2=t=>t.indexOf("Arrow")===0||t.indexOf("Page")===0||t===" "||t==="Home"||t==="End",htt=t=>!!t.key,Che=t=>t==="Tab"||t==="Escape";function She(t){return(t.ctrlKey||t.metaKey)&&String.fromCharCode(t.keyCode)==="V"&&!t.shiftKey&&!t.altKey}function ftt(t){return(t.ctrlKey||t.metaKey)&&String.fromCharCode(t.keyCode)==="C"&&!t.shiftKey&&!t.altKey}const ptt=["hideMenu","colDef","id","labelledby","className","children","open"],gtt=$e(
369aR)(()=>({minWidth:248})),mtt=Kr(function(e,n){const{hideMenu:r,id:o,labelledby:i,className:s,children:a,open:l}=e,c=Tn(e,ptt),u=C.useCallback(d=>{d.key==="Tab"&&d.preventDefault(),Che(d.key)&&r(d)},[r]);return g(gtt,ae({id:o,className:Ye(ye.menuList,s),"aria-labelledby":i,onKeyDown:u,autoFocus:l},c,{ref:n,children:a}))}),ytt=["displayOrder"],vtt=t=>{const e=yd(),n=yn(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:s={},hideMenu:a,colDef:l,addDividers:c=!0}=t,u=C.useMemo(()=>ae({},r,i),[r,i]),d=C.useMemo(()=>{if(!s||Object.keys(s).length===0)return o;const p=ae({},s);return Object.entries(o).forEach(([m,y])=>{p[m]=ae({},y,s[m]||{})}),p},[o,s]),h=e.current.unstable_applyPipeProcessors("columnMenu",[],t.colDef),f=C.useMemo(()=>{const p=Object.keys(r);return Object.keys(i).filter(m=>!p.includes(m))},[i,r]);return C.useMemo(()=>{const y=Array.from(new Set([...h,...f])).filter(v=>u[v]!=null).sort((v,b)=>{const S=d[v],w=d[b],A=Number.isFinite(S?.displayOrder)?S.displayOrder:100,_=Number.isFinite(w?.displayOrder)?w.displayOrder:100;return A-_});return y.reduce((v,b,S)=>{let w={colDef:l,onClick:a};const A=d[b];if(A){const _=Tn(A,ytt);w=ae({},w,_)}return c&&S!==y.length-1?[...v,[u[b],w],[n.slots.baseDivider,{}]]:[...v,[u[b],w]]},[])},[c,l,h,a,u,d,f,n.slots.baseDivider])};function btt(t){const{colDef:e,onClick:n}=t,r=br(),o=yn(),a=Qi(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=C.useCallback(c=>{a||(r.current.setColumnVisibility(e.field,!1),n(c))},[r,e.field,n,a]);return o.disableColumnSelector||e.hideable===!1?null:K(mr,{onClick:l,disabled:a,children:[g(ff,{children:g(o.slots.columnMenuHideIcon,{fontSize:"small"})}),g(Il,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function Ctt(t){const{onClick:e}=t,n=br(),r=yn(),o=C.useCallback(i=>{e(i),n.current.showPreferences(DC.columns)},[n,e]);return r.disableColumnSelector?null:K(mr,{onClick:o,children:[g(ff,{children:g(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),g(Il,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function Stt(t){return K(C.Fragment,{children:[g(btt,ae({},t)),g(Ctt,ae({},t))]})}function Ett(t){const{colDef:e,onClick:n}=t,r=br(),o=yn(),i=C.useCallback(s=>{n(s),r.current.showFilterPanel(e.field)},[r,e.field,n]);return o.disableColumnFilter||!e.filterable?null:K(mr,{onClick:i,children:[g(ff,{children:g(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),g(Il,{children:r.current.getLocaleText("columnMenuFilter")})]})}function xtt(t){const{colDef:e,onClick:n}=t,r=br(),o=St(r,Zh),i=yn(),s=C.useMemo(()=>e?o.find(d=>d.field===e.field)?.sort:null,[e,o]),a=e.sortingOrder??i.sortingOrder,l=C.useCallback(u=>{n(u);const d=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(e.field,d===s?null:d)},[r,e,n,s]);if(i.disableColumnSorting||!e||!e.sortable||!a.some(u=>!!u))return null;const c=u=>{const d=r.current.getLocaleText(u);return typeof d=="function"?d(e):d};return K(C.Fragment,{children:[a.includes("asc")&&s!=="asc"?K(mr,{onClick:l,"data-value":"asc",children:[g(ff,{children:g(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),g(Il,{children:c("columnMenuSortAsc")})]}):null,a.includes("desc")&&s!=="desc"?K(mr,{onClick:l,"data-value":"desc",children:[g(ff,{children:g(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),g(Il,{children:c("columnMenuSortDesc")})]}):null,a.includes(null)&&s!=null?K(mr,{onClick:l,children:[g(ff,{}),g(Il,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})}const wtt=["defaultSlots","defaultSlotProps","slots","slotProps"],Att={columnMenuSortItem:xtt,columnMenuFilterItem:Ett,columnMenuColumnsItem:Stt},Ttt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},_tt=Kr(function(e,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:s}=e,a=Tn(e,wtt),l=vtt(ae({},a,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:s}));return g(mtt,ae({},a,{ref:n,children:l.map(([c,u],d)=>g(c,ae({},u),d))}))}),Itt=Kr(function(e,n){return g(_tt,ae({},e,{ref:n,defaultSlots:Att,defaultSlotProps:Ttt}))}),Ptt=["className","slotProps"],Rtt=t=>{const{classes:e}=t;return Dr({root:["panelWrapper"]},Lr,e)},Ott=$e("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(t,e)=>e.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),Ntt=()=>!0,Ehe=Kr(function(e,n){const{className:r,slotProps:o={}}=e,i=Tn(e,Ptt),s=yn(),a=Rtt(s);return g(JG,ae({open:!0,disableEnforceFocus:!0,isEnabled:Ntt}
369,o.TrapFocus,{children:g(Ott,ae({tabIndex:-1,className:Ye(a.root,r),ownerState:s},i,{ref:n}))}))});function Mtt(t){const e=yn();return g(Ehe,ae({},t,{children:g(e.slots.columnsManagement,ae({},e.slotProps?.columnsManagement))}))}const Dtt=["children","className","classes"],Ltt=fde("MuiDataGrid",["panel","paper"]),ktt=$e(g0,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(t,e)=>e.panel})(({theme:t})=>({zIndex:t.zIndex.modal})),Ftt=$e(To,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(t,e)=>e.paper})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${t.spacing(.5)})`,overflow:"auto"})),Btt=Kr((t,e)=>{const{children:n,className:r}=t,o=Tn(t,Dtt),i=br(),s=yn(),a=Ltt,[l,c]=C.useState(!1),u=C.useCallback(()=>{i.current.hidePreferences()},[i]),d=C.useCallback(m=>{m.key==="Escape"&&i.current.hidePreferences()},[i]),h=C.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}],[]),[f,p]=C.useState(null);return C.useEffect(()=>{const m=i.current.rootElementRef?.current?.querySelector('[data-id="gridPanelAnchor"]');m&&p(m)},[i]),f?g(ktt,ae({placement:"bottom-start",className:Ye(a.panel,r),ownerState:s,anchorEl:f,modifiers:h},o,{ref:e,children:g(ble,{mouseEvent:"onPointerUp",touchEvent:!1,onClickAway:u,children:g(Ftt,{className:a.paper,ownerState:s,elevation:8,onKeyDown:d,children:l&&n})})})):null}),$tt=["className"],Htt=t=>{const{classes:e}=t;return Dr({root:["panelContent"]},Lr,e)},Utt=ko("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(t,e)=>e.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function ztt(t){const{className:e}=t,n=Tn(t,$tt),r=yn(),o=Htt(r);return g(Utt,ae({className:Ye(o.root,e),ownerState:r},n))}const Vtt=["className"],Gtt=t=>{const{classes:e}=t;return Dr({root:["panelFooter"]},Lr,e)},Wtt=ko("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(t,e)=>e.panelFooter})(({theme:t})=>({padding:t.spacing(.5),display:"flex",justifyContent:"space-between"}));function jtt(t){const{className:e}=t,n=Tn(t,Vtt),r=yn(),o=Gtt(r);return g(Wtt,ae({className:Ye(o.root,e),ownerState:r},n))}const qtt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],Ytt=["InputComponentProps"],Xtt=t=>{const{classes:e}=t;return Dr({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Lr,e)},Ktt=$e("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(t,e)=>e.filterForm})(({theme:t})=>({display:"flex",padding:t.spacing(1)})),Qtt=$e("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(t,e)=>e.filterFormDeleteIcon})(({theme:t})=>({flexShrink:0,justifyContent:"flex-end",marginRight:t.spacing(.5),marginBottom:t.spacing(.2)})),Ztt=$e("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(t,e)=>e.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),Jtt=$e("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(t,e)=>e.filterFormColumnInput})({width:150}),ent=$e("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(t,e)=>e.filterFormOperatorInput})({width:150}),tnt=$e("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(t,e)=>e.filterFormValueInput})({width:190}),nnt=t=>{switch(t){case Ec.And:return"filterPanelOperatorAnd";case Ec.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},hT=t=>t.headerName||t.field,ZQ=new Intl.Collator,JQ=Kr(function(e,n){const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:s,showMultiFilterOperators:a,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:d=[Ec.And,Ec.Or],columnsSort:h,filterColumns:f,deleteIconProps:p={},logicOperatorInputProps:m={},operatorInputProps:y={},columnInputProps:v={},valueInputProps:b={},readOnly:S}=e,w=Tn(e,qtt),A=br(),_=St(A,Nm),P=St(A,xde),R=St(A,za),O=Cs(),N=Cs(),M=Cs(),L=Cs(),F=yn(),$=Xtt(F),D=C.useRef(null),k=C.useRef(null),U=R.logicOperator??Ec.And,H=o&&d.length>0,V=F.slotProps?.baseFormControl||{},J=(F.slotProps?.baseSelect||{}).native??!1,Q=F.slotProps?.baseInputLabel||{},se=F.slotProps?.baseSelectOption||{},{InputComponentProps:oe}=b,ie=Tn(b,Ytt),{filteredColumns:ee,selectedField:re}=C.useMemo(()=>{let ke=r.field;const Ne=_[r.field].filterable===!1?_[r.field]:null;if(Ne)return{filteredColumns:[Ne],selectedField:ke};if(f===void 0||typeof f!="function")return{filteredColumns:P,selectedField:ke};const ot=f({field:r.field,columns:P,currentFilters:R?.items||[]});return{filteredColumns:P.filter(ce=>{const Ae=ot.includes(ce.field);return ce.field===r.field&&!Ae&&(ke=void 0),Ae}),selectedField:ke}},[f,R?.items,P,r.field,_]),fe=C.useMemo(()=>{switch(h){case"asc":return ee.sort((ke,Ne)=>ZQ.compare(hT(ke),hT(Ne)));
369case"desc":return ee.sort((ke,Ne)=>-ZQ.compare(hT(ke),hT(Ne)));default:return ee}},[ee,h]),we=r.field?A.current.getColumn(r.field):null,xe=C.useMemo(()=>!r.operator||!we?null:we.filterOperators?.find(ke=>ke.value===r.operator),[r,we]),ve=C.useCallback(ke=>{const Ne=ke.target.value,ot=A.current.getColumn(Ne);if(ot.field===we.field)return;const ce=ot.filterOperators.find(Se=>Se.value===r.operator)||ot.filterOperators[0];let be=!ce.InputComponent||ce.InputComponent!==xe?.InputComponent||ot.type!==we.type?void 0:r.value;if(ot.type==="singleSelect"&&be!==void 0){const Se=ot,Pe=MC(Se);Array.isArray(be)?be=be.filter(Ue=>o2(Ue,Pe,Se?.getOptionValue)!==void 0):o2(r.value,Pe,Se?.getOptionValue)===void 0&&(be=void 0)}s(ae({},r,{field:Ne,operator:ce.value,value:be}))},[A,s,r,we,xe]),Re=C.useCallback(ke=>{const Ne=ke.target.value,ot=we?.filterOperators.find(Ae=>Ae.value===Ne),ce=!ot?.InputComponent||ot?.InputComponent!==xe?.InputComponent;s(ae({},r,{operator:Ne,value:ce?void 0:r.value}))},[s,r,we,xe]),pe=C.useCallback(ke=>{const Ne=ke.target.value===Ec.And.toString()?Ec.And:Ec.Or;c(Ne)},[c]),Be=()=>{i(r)};return C.useImperativeHandle(u,()=>({focus:()=>{xe?.InputComponent?D?.current?.focus():k.current.focus()}}),[xe]),K(Ktt,ae({className:$.root,"data-id":r.id,ownerState:F},w,{ref:n,children:[g(Qtt,ae({variant:"standard",as:F.slots.baseFormControl},V,p,{className:Ye($.deleteIcon,V.className,p.className),ownerState:F,children:g(F.slots.baseIconButton,ae({"aria-label":A.current.getLocaleText("filterPanelDeleteIconLabel"),title:A.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:Be,size:"small",disabled:S},F.slotProps?.baseIconButton,{children:g(F.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),g(Ztt,ae({variant:"standard",as:F.slots.baseFormControl},V,m,{sx:[H?{display:"flex"}:{display:"none"},a?{visibility:"visible"}:{visibility:"hidden"},V.sx,m.sx],className:Ye($.logicOperatorInput,V.className,m.className),ownerState:F,children:g(F.slots.baseSelect,ae({inputProps:{"aria-label":A.current.getLocaleText("filterPanelLogicOperator")},value:U??"",onChange:pe,disabled:!!l||d.length===1,native:J},F.slotProps?.baseSelect,{children:d.map(ke=>C.createElement(F.slots.baseSelectOption,ae({},se,{native:J,key:ke.toString(),value:ke.toString()}),A.current.getLocaleText(nnt(ke))))}))})),K(Jtt,ae({variant:"standard",as:F.slots.baseFormControl},V,v,{className:Ye($.columnInput,V.className,v.className),ownerState:F,children:[g(F.slots.baseInputLabel,ae({},Q,{htmlFor:O,id:N,children:A.current.getLocaleText("filterPanelColumns")})),g(F.slots.baseSelect,ae({labelId:N,id:O,label:A.current.getLocaleText("filterPanelColumns"),value:re??"",onChange:ve,native:J,disabled:S},F.slotProps?.baseSelect,{children:fe.map(ke=>C.createElement(F.slots.baseSelectOption,ae({},se,{native:J,key:ke.field,value:ke.field}),hT(ke)))}))]})),K(ent,ae({variant:"standard",as:F.slots.baseFormControl},V,y,{className:Ye($.operatorInput,V.className,y.className),ownerState:F,children:[g(F.slots.baseInputLabel,ae({},Q,{htmlFor:M,id:L,children:A.current.getLocaleText("filterPanelOperator")})),g(F.slots.baseSelect,ae({labelId:L,label:A.current.getLocaleText("filterPanelOperator"),id:M,value:r.operator,onChange:Re,native:J,inputRef:k,disabled:S},F.slotProps?.baseSelect,{children:we?.filterOperators?.map(ke=>C.createElement(F.slots.baseSelectOption,ae({},se,{native:J,key:ke.value,value:ke.value}),ke.label||A.current.getLocaleText(`filterOperator${vR(ke.value)}`)))}))]})),g(tnt,ae({variant:"standard",as:F.slots.baseFormControl},V,ie,{className:Ye($.valueInput,V.className,ie.className),ownerState:F,children:xe?.InputComponent?g(xe.InputComponent,ae({apiRef:A,item:r,applyValue:s,focusElementRef:D,disabled:S},xe.InputComponentProps,oe),r.field):null}))]}))}),rnt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],eZ=t=>({field:t.field,operator:t.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),ont=Kr(function(e,n){const r=br(),o=yn(),i=St(r,za),s=St(r,xde),a=St(r,aKe),l=C.useRef(null),c=C.useRef(null),{logicOperators:u=[Ec.And,Ec.Or],columnsSort:d,filterFormProps:h,getColumnForNewFilter:f,disableAddFilterButton:p=!1,disableRemoveAllButton:m=!1}=e,y=Tn(e,rnt),v=r.current.upsertFilterItem,b=C.useCallback(L=>{r.current.setFilterLogicOperator(L)},[r]),S=C.useCallback(()=>{let L;if(f&&typeof f=="function"){const F=f({currentFilters:i?.items||[],columns:s});if(F===null)return null;L=s.find(({field:$})=>$===F)}else L=s.find(F=>F.filterOperators?.length);return L?eZ(L):null},[i?.items,s,f]),w=C.useCallback(()=>
369{if(f===void 0||typeof f!="function")return S();const L=i.items.length?i.items:[S()].filter(Boolean),F=f({currentFilters:L,columns:s});if(F===null)return null;const $=s.find(({field:D})=>D===F);return $?eZ($):null},[i.items,s,f,S]),A=C.useMemo(()=>i.items.length?i.items:(c.current||(c.current=S()),c.current?[c.current]:[]),[i.items,S]),_=A.length>1,{readOnlyFilters:P,validFilters:R}=C.useMemo(()=>A.reduce((L,F)=>(a[F.field]?L.validFilters.push(F):L.readOnlyFilters.push(F),L),{readOnlyFilters:[],validFilters:[]}),[A,a]),O=C.useCallback(()=>{const L=w();L&&r.current.upsertFilterItems([...A,L])},[r,w,A]),N=C.useCallback(L=>{const F=R.length===1;r.current.deleteFilterItem(L),F&&r.current.hideFilterPanel()},[r,R.length]),M=C.useCallback(()=>R.length===1&&R[0].value===void 0?(r.current.deleteFilterItem(R[0]),r.current.hideFilterPanel()):r.current.setFilterModel(ae({},i,{items:P}),"removeAllFilterItems"),[r,P,i,R]);return C.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&b(u[0])},[u,b,i.logicOperator]),C.useEffect(()=>{R.length>0&&l.current.focus()},[R.length]),K(Ehe,ae({},y,{ref:n,children:[K(ztt,{children:[P.map((L,F)=>g(JQ,ae({item:L,applyFilterChanges:v,deleteFilter:N,hasMultipleFilters:_,showMultiFilterOperators:F>0,disableMultiFilterOperator:F!==1,applyMultiFilterOperatorChanges:b,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:d},h),L.id==null?F:L.id)),R.map((L,F)=>g(JQ,ae({item:L,applyFilterChanges:v,deleteFilter:N,hasMultipleFilters:_,showMultiFilterOperators:P.length+F>0,disableMultiFilterOperator:P.length+F!==1,applyMultiFilterOperatorChanges:b,focusElementRef:F===R.length-1?l:null,logicOperators:u,columnsSort:d},h),L.id==null?F+P.length:L.id))]}),!o.disableMultipleColumnsFiltering&&!(p&&m)?K(jtt,{children:[p?g("span",{}):g(o.slots.baseButton,ae({onClick:O,startIcon:g(o.slots.filterPanelAddIcon,{})},o.slotProps?.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!m&&R.length>0?g(o.slots.baseButton,ae({onClick:M,startIcon:g(o.slots.filterPanelRemoveAllIcon,{})},o.slotProps?.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),int=(t,e)=>{const n=new Set(Object.keys(t).filter(i=>t[i]===!1)),r=new Set(Object.keys(e).filter(i=>e[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},snt=(t,e)=>(t.headerName||t.field).toLowerCase().indexOf(e)>-1,ant=t=>{const{classes:e}=t;return Dr({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},Lr,e)},tZ=new Intl.Collator;function lnt(t){const e=br(),n=C.useRef(null),r=St(e,pf),o=If(()=>dh(e)).current,i=St(e,dh),s=yn(),[a,l]=C.useState(""),c=ant(s),{sort:u,searchPredicate:d=snt,autoFocusSearchField:h=!0,disableShowHideToggle:f=!1,disableResetButton:p=!1,toggleAllMode:m="all",getTogglableColumns:y,searchInputProps:v}=t,b=C.useMemo(()=>int(i,o),[i,o]),S=C.useMemo(()=>{switch(u){case"asc":return[...r].sort((D,k)=>tZ.compare(D.headerName||D.field,k.headerName||k.field));case"desc":return[...r].sort((D,k)=>-tZ.compare(D.headerName||D.field,k.headerName||k.field));default:return r}},[r,u]),w=D=>{const{name:k}=D.target;e.current.setColumnVisibility(k,i[k]===!1)},A=C.useMemo(()=>{const D=y?y(S):null,k=D?S.filter(({field:U})=>D.includes(U)):S;return a?k.filter(U=>d(U,a.toLowerCase())):k},[S,a,d,y]),_=C.useCallback(D=>{const k=dh(e),U=ae({},k),H=y?y(r):null;return(m==="filteredOnly"?A:r).forEach(V=>{V.hideable&&(H==null||H.includes(V.field))&&(D?delete U[V.field]:U[V.field]=!1)}),e.current.setColumnVisibilityModel(U)},[e,r,y,m,A]),P=C.useCallback(D=>{l(D.target.value)},[]),R=C.useMemo(()=>A.filter(D=>D.hideable),[A]),O=C.useMemo(()=>R.every(D=>i[D.field]==null||i[D.field]!==!1),[i,R]),N=C.useMemo(()=>R.every(D=>i[D.field]===!1),[i,R]),M=C.useRef(null);C.useEffect(()=>{h?n.current.focus():M.current&&typeof M.current.focus=="function"&&M.current.focus()},[h]);let L=!1;const F=D=>L===!1&&D.hideable!==!1?(L=!0,!0):!1,$=C.useCallback(()=>{l(""),n.current.focus()},[]);return K(C.Fragment,{children:[g(unt,{className:c.header,ownerState:s,children:g(dnt,ae({as:s.slots.baseTextField,ownerState:s,placeholder:e.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:c.searchInput,value:a,onChange:P,variant:"outlined",size:"small",type:"search",InputProps:{startAdornment:g(s.slots.baseInputAdornment,{position:"start",children:g(s.slots.quickFilterIcon,{})}),endAdornment:g(s.slots.baseIconButton,ae({"aria-label":e.current.getLocaleText("columnsManagementDeleteIconLabel"),size:"small",sx:[a?{visibility:"visible"}:{visibility:"hidden"}],tabIndex:-1,onClick:$},s.slotProps?.baseIconButton,{children:g(s.slots.quickFilterClearIcon,{fontSize:"small"})}))},inputProps:{"aria-label":e.current.getLocaleText("columnsManagementSearchTitle")},autoComplete:"off",fullWidth:!0},s.slotProps?.baseTextField,v))}),K(cnt,{className:c.root,ownerState:s,children:[A.map(D=>g(ec,{className:c.row,control:g(s.slots.baseCheckbox,ae({disabled:D.hideable===!1,checked:i[D.field]!==!1,onClick:w,name:D.field,sx:{p:.5},inputRef:F(D)?M:void 0},s.slotProps?.baseCheckbox)),label:D.headerName||D.field},D.field)),A.length===0&&g(fnt,{ownerState:s,children:e.current.getLocaleText("columnsManagementNoColumns")})]}),(!f||!p)&&A.length>0?K(hnt,{ownerState:s,className:c.footer,children:[f?g("span",{}):g(ec,{control:g(s.slots.baseCheckbox,ae({disabled:R.length===0,checked:O,indeterminate:!O&&!N,onClick:()=>_(!O),name:e.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},s.slotProps?.baseCheckbox)),label:e.current.getLocaleText("columnsManagementShowHideAllText")}),p?null:g(s.slots.baseButton,ae({onClick:()=>e.current.setColumnVisibilityModel(o),disabled:b},s.slotProps?.baseButton,{children:e.current.getLocaleText("columnsManagementReset")}))]}):null]})}const cnt=$e("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(t,e)=>e.columnsManagement})(({theme:t})=>({padding:t.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"})),unt=$e("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(t,e)=>e.columnsManagementHeader})(({theme:t})=>({padding:t.spacing(1.5,3)})),dnt=$e(lo,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput",overridesResolver:(t,e)=>e.columnsManagementSearchInput})(({theme:t})=>({[`& .${Wa.root}`]:{padding:t.spacing(0,1.5,0,1.5)},[`& .${Wa.input}::-webkit-search-decoration, 370 & .${Wa.input}::-webkit-search-cancel-button, 371 & .${Wa.input}::-webkit-search-results-button, 372 & .${Wa.input}::-webkit-search-results-decoration`]:{display:"none"}})),hnt=$e("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(t,e)=>e.columnsManagementFooter})(({theme:t})=>({padding:t.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${t.palette.divider}`})),fnt=$e("div")(({theme:t})=>({padding:t.spacing(.5,0),color:t.palette.grey[500]})),pnt=Kr(function(e,n){const{children:r,slotProps:o={}}=e,i=o.button||{},s=o.tooltip||{},a=br(),l=yn(),c=Cs(),u=Cs(),[d,h]=C.useState(!1),f=C.useRef(null),p=S0(n,f),m=b=>{h(S=>!S),i.onClick?.(b)},y=()=>h(!1),v=b=>{b.key==="Tab"&&b.preventDefault(),Che(b.key)&&y()};return r==null?null:K(C.Fragment,{children:[g(l.slots.baseTooltip,ae({title:a.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},l.slotProps?.baseTooltip,s,{children:g(l.slots.baseButton,ae({size:"small",startIcon:g(l.slots.exportIcon,{}),"aria-expanded":d,"aria-label":a.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":d?u:void 0,id:c},l.slotProps?.baseButton,i,{onClick:m,ref:p,children:a.current.getLocaleText("toolbarExport")}))})),g(Lj,{open:d,target:f.current,onClose:y,position:"bottom-start",children:g(aR,{id:u,className:ye.menuList,"aria-labelledby":c,onKeyDown:v,autoFocusItem:d,children:C.Children.map(r,b=>C.isValidElement(b)?C.cloneElement(b,{hideMenu:y}):b)})})]})}),gnt=["hideMenu","options"],mnt=["hideMenu","options"],ynt=["csvOptions","printOptions","excelOptions"];function vnt(t){const e=br(),{hideMenu:n,options:r}=t,o=Tn(t,gnt);return g(mr,ae({onClick:()=>{e.current.exportDataAsCsv(r),n?.()}},o,{children:e.current.getLocaleText("toolbarExportCSV")}))}function bnt(t){const e=br(),{hideMenu:n,options:r}=t,o=Tn(t,mnt);return g(mr,ae({onClick:()=>{e.current.exportDataAsPrint(r),n?.()}},o,{children:e.current.getLocaleText("toolbarExportPrint")}))}Kr(function(e,n){const r=e,{csvOptions:o={},printOptions:i={},excelOptions:s}=r,a=Tn(r,ynt),c=br().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:s,csvOptions:o,printOptions:i}).sort((u,d)=>u.componentName>d.componentName?1:-1);return c.length===0?null:g(pnt,ae({},a,{ref:n,children:c.map((u,d)=>C.cloneElement(u.component,{key:d}))}))});const Cnt=["className","selectedRowCount"],Snt=t=>{const{classes:e}=t;return Dr({root:["selectedRowCount"]},Lr,e)},Ent=ko("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(t,e)=>e.selectedRowCount})(({theme:t})=>({alignItems:"center",display:"flex",margin:t.spacing(0,2),visibility:"hidden",
372width:0,height:0,[t.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),xnt=Kr(function(e,n){const{className:r,selectedRowCount:o}=e,i=Tn(e,Cnt),s=br(),a=yn(),l=Snt(a),c=s.current.getLocaleText("footerRowSelected")(o);return g(Ent,ae({className:Ye(l.root,r),ownerState:a},i,{ref:n,children:c}))}),wnt=Kr(function(e,n){const r=br(),o=yn(),i=St(r,HXe),s=St(r,XKe),a=St(r,$j),l=!o.hideFooterSelectedRowCount&&s>0?g(xnt,{selectedRowCount:s}):g("div",{}),c=!o.hideFooterRowCount&&!o.pagination?g(o.slots.footerRowCount,ae({},o.slotProps?.footerRowCount,{rowCount:i,visibleRowCount:a})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&g(o.slots.pagination,ae({},o.slotProps?.pagination));return K(tet,ae({},e,{ref:n,children:[l,c,u]}))}),B_=(t,e,n,r,o,i)=>{let s;switch(t){case Tr.LEFT:s=r[n];break;case Tr.RIGHT:s=o-r[n]-e+i;break;default:s=void 0;break}return s},l2=(t,e,n,r,o)=>{const i=e===n-1;return t===Tr.LEFT&&i?!0:r?t===Tr.LEFT?!0:t===Tr.RIGHT?!i:!i||o:!1},c2=(t,e)=>t===Tr.RIGHT&&e===0,fT={root:ye.scrollbarFiller,header:ye["scrollbarFiller--header"],borderTop:ye["scrollbarFiller--borderTop"],borderBottom:ye["scrollbarFiller--borderBottom"],pinnedRight:ye["scrollbarFiller--pinnedRight"]};function Kj({header:t,borderTop:e=!0,borderBottom:n,pinnedRight:r}){return g("div",{role:"presentation",className:Ye(fT.root,t&&fT.header,e&&fT.borderTop,n&&fT.borderBottom,r&&fT.pinnedRight)})}const Ant=ko("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(t,e)=>e.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),Tnt=t=>{const{classes:e}=t;return Dr({root:["skeletonLoadingOverlay"]},Lr,e)},nZ=t=>parseInt(t.getAttribute("data-colindex"),10),_nt=Kr(function(e,n){const r=yn(),{slots:o}=r,i=ic(),s=Tnt({classes:r.classes}),a=C.useRef(null),l=S0(a,n),c=br(),u=St(c,qa),d=u?.viewportInnerSize.height??0,h=Math.ceil(d/u.rowHeight),f=St(c,HF),p=St(c,E0),m=C.useMemo(()=>p.filter(_=>_<=f).length,[f,p]),y=St(c,Qi),v=C.useMemo(()=>y.slice(0,m),[y,m]),b=St(c,fw),S=C.useCallback(_=>{if(b.left.findIndex(P=>P.field===_)!==-1)return Tr.LEFT;if(b.right.findIndex(P=>P.field===_)!==-1)return Tr.RIGHT},[b.left,b.right]),w=C.useMemo(()=>{const _=[];for(let P=0;P<h;P+=1){const R=[];for(let O=0;O<v.length;O+=1){const N=v[O],M=S(N.field),L=M===Tr.LEFT,F=M===Tr.RIGHT,$=hhe(M,i),D=$?b[$].length:v.length-b.left.length-b.right.length,k=$?b[$].findIndex(xe=>xe.field===N.field):O-b.left.length,U=u.hasScrollY?u.scrollbarSize:0,H=XF({},i,M,B_(M,N.computedWidth,O,p,u.columnsTotalWidth,U)),V=u.columnsTotalWidth<u.viewportOuterSize.width,q=l2(M,k,D,r.showCellVerticalBorder,V),J=c2(M,k),Q=O===v.length-1,se=F&&k===0,oe=se&&V,ie=Q&&!se&&V,ee=u.viewportOuterSize.width-u.columnsTotalWidth,re=Math.max(0,ee),fe=g(o.skeletonCell,{width:re,empty:!0},`skeleton-filler-column-${P}`),we=Q&&U!==0;oe&&R.push(fe),R.push(g(o.skeletonCell,{field:N.field,type:N.type,align:N.align,width:"var(--width)",height:u.rowHeight,"data-colindex":O,className:Ye(L&&ye["cell--pinnedLeft"],F&&ye["cell--pinnedRight"],q&&ye["cell--withRightBorder"],J&&ye["cell--withLeftBorder"]),style:ae({"--width":`${N.computedWidth}px`},H)},`skeleton-column-${P}-${N.field}`)),ie&&R.push(fe),we&&R.push(g(Kj,{pinnedRight:b.right.length>0},`skeleton-scrollbar-filler-${P}`))}_.push(g("div",{className:Ye(ye.row,ye.rowSkeleton,P===0&&ye["row--firstVisible"]),children:R},`skeleton-row-${P}`))}return _},[o,v,b,h,r.showCellVerticalBorder,u,p,S,i]);return Qt(c,"columnResize",_=>{const{colDef:P,width:R}=_,O=a.current?.querySelectorAll(`[data-field="${Mm(P.field)}"]`);if(!O)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const N=v.findIndex(k=>k.field===P.field),M=S(P.field),L=M===Tr.LEFT,F=M===Tr.RIGHT,$=getComputedStyle(O[0]).getPropertyValue("--width"),D=parseInt($,10)-R;O&&O.forEach(k=>{k.style.setProperty("--width",`${R}px`)}),L&&a.current?.querySelectorAll(`.${ye["cell--pinnedLeft"]}`)?.forEach(U=>{nZ(U)>N&&(U.style.left=`${parseInt(getComputedStyle(U).left,10)-D}px`)}),F&&a.current?.querySelectorAll(`.${ye["cell--pinnedRight"]}`)?.forEach(U=>{nZ(U)<N&&(U.style.right=`${parseInt(getComputedStyle(U).right,10)+D}px`)}
372)}),g(Ant,ae({className:s.root},e,{ref:l,children:w}))}),Int=["variant","noRowsVariant","style"],Pnt={"circular-progress":{component:Ni,style:{}},"linear-progress":{component:uze,style:{display:"block"}},skeleton:{component:_nt,style:{display:"block"}}},Rnt=Kr(function(e,n){const{variant:r="circular-progress",noRowsVariant:o="circular-progress",style:i}=e,s=Tn(e,Int),a=br(),l=St(a,bR),c=Pnt[l===0?o:r];return g(Yj,ae({style:ae({},c.style,i)},s,{ref:n,children:g(c.component,{})}))}),Ont=Kr(function(e,n){const o=br().current.getLocaleText("noRowsLabel");return g(Yj,ae({},e,{ref:n,children:o}))}),Nnt=$e(uje)(({theme:t})=>({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${iC.selectLabel}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"block"}},[`& .${iC.input}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"inline-flex"}}})),Mnt=(t,e)=>({from:n,to:r,count:o,page:i})=>t({from:n,to:r,count:o,page:i,estimated:e}),Dnt=({from:t,to:e,count:n,estimated:r})=>r?`${t}â${e} of ${n!==-1?n:`more than ${r>e?r:e}`}`:`${t}â${e} of ${n!==-1?n:`more than ${e}`}`,Lnt=Kr(function(e,n){const r=br(),o=yn(),i=St(r,Wl),s=St(r,JE),a=St(r,Wde),{paginationMode:l,loading:c,estimatedRowCount:u}=o,d=C.useMemo(()=>s===-1&&l==="server"&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{},[c,l,s]),h=C.useMemo(()=>Math.max(0,a-1),[a]),f=C.useMemo(()=>s===-1||i.page<=h?i.page:h,[h,i.page,s]),p=C.useCallback(w=>{const A=Number(w.target.value);r.current.setPageSize(A)},[r]),m=C.useCallback((w,A)=>{r.current.setPage(A)},[r]),v=(w=>{for(let A=0;A<o.pageSizeOptions.length;A+=1){const _=o.pageSizeOptions[A];if(typeof _=="number"){if(_===w)return!0}else if(_.value===w)return!0}return!1})(i.pageSize)?o.pageSizeOptions:[],b=r.current.getLocaleText("MuiTablePagination"),S=Mnt(b.labelDisplayedRows||Dnt,u);return g(Nnt,ae({component:"div",count:s,page:f,rowsPerPageOptions:v,rowsPerPage:i.pageSize,onPageChange:m,onRowsPerPageChange:p},d,b,{labelDisplayedRows:S},e,{ref:n}))}),knt=["className","rowCount","visibleRowCount"],Fnt=t=>{const{classes:e}=t;return Dr({root:["rowCount"]},Lr,e)},Bnt=ko("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(t,e)=>e.rowCount})(({theme:t})=>({alignItems:"center",display:"flex",margin:t.spacing(0,2)})),$nt=Kr(function(e,n){const{className:r,rowCount:o,visibleRowCount:i}=e,s=Tn(e,knt),a=br(),l=yn(),c=Fnt(l);if(o===0)return null;const u=i<o?a.current.getLocaleText("footerTotalVisibleRows")(i,o):o.toLocaleString();return K(Bnt,ae({className:Ye(c.root,r),ownerState:l},s,{ref:n,children:[a.current.getLocaleText("footerTotalRows")," ",u]}))});function Hnt(t){for(const e in t)return!1;return!0}function Unt(t,e){return Dr(e,Lr,t)}const znt=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],Vnt=yR(pa,(t,e)=>e?!!Hnt(t):!1),Gnt=Kr(function(e,n){const{selected:r,rowId:o,row:i,index:s,style:a,rowHeight:l,className:c,visibleColumns:u,pinnedColumns:d,offsetLeft:h,columnsTotalWidth:f,firstColumnIndex:p,lastColumnIndex:m,focusedColumnIndex:y,isFirstVisible:v,isLastVisible:b,isNotVisible:S,showBottomBorder:w,scrollbarWidth:A,gridHasFiller:_,onClick:P,onDoubleClick:R,onMouseEnter:O,onMouseLeave:N,onMouseOut:M,onMouseOver:L}=e,F=Tn(e,znt),$=yd(),D=lhe(),k=C.useRef(null),U=yn(),H=jj($),V=St($,Zh),q=St($,oS),J=St($,E0),Q=U.rowReordering,se=ZI($,Vnt,Q),oe=S0(k,n),ie=$.current.getRowNode(o),ee=ZI($,uhe,{rowId:o,editMode:U.editMode}),re=U.editMode===Gp.Row,fe=y!==void 0,we=fe&&y>=d.left.length&&y<p,xe=fe&&y<u.length-d.right.length&&y>=m,ve=Unt(U.classes,{root:["row",r&&"selected",re&&"row--editable",ee&&"row--editing",v&&"row--firstVisible",b&&"row--lastVisible",w&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),Re=D.hooks.useGridRowAriaAttributes();C.useLayoutEffect(()=>{if(H.range){const W=$.current.getRowIndexRelativeToVisibleRows(o);W!==void 0&&$.current.unstable_setLastMeasuredRowIndex(W)}if(k.current&&l==="auto")return $.current.observeRowHeight(k.current,o)},[$,H.range,l,o]);const pe=C.useCallback((W,j)=>ue=>{_R(ue)||$.current.getRow(o)&&($.current.publishEvent(W,$.current.getRowParams(o),ue),j&&j(ue))},[$,o]),Be=C.useCallback(W=>{const ue=s2(W.target,ye.cell)?.getAttribute("data-field");ue&&(ue===mw.field||ue===VF||ue==="__reorder__"||$.current.getCellMode(o,ue)===vo.Edit||$.current.getColumn(ue)?.type===UF)||pe("rowClick",P)(W)},[$,P,pe,o]),{slots:ke,slotProps:Ne,disableColumnReorder:ot}=U,ce=St($,()=>ae({},$.current.getRowHeightEntry(o)),Ij),Ae=C.useMemo(()=>
372{if(S)return{opacity:0,width:0,height:0};const W=ae({},a,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(ce.spacingTop){const j=U.rowSpacingType==="border"?"borderTopWidth":"marginTop";W[j]=ce.spacingTop}if(ce.spacingBottom){const j=U.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let ue=W[j];typeof ue!="number"&&(ue=parseInt(ue||"0",10)),ue+=ce.spacingBottom,W[j]=ue}return W},[S,l,a,ce,U.rowSpacingType]),be=$.current.unstable_applyPipeProcessors("rowClassName",[],o),Se=ie?Re(ie,s):void 0;if(typeof U.getRowClassName=="function"){const W=s-(H.range?.firstRowIndex||0),j=ae({},$.current.getRowParams(o),{isFirstVisible:W===0,isLastVisible:W===H.rows.length-1,indexRelativeToCurrentPage:W});be.push(U.getRowClassName(j))}if(!ie)return null;const Pe=(W,j,ue,he,Ce=Tr.NONE)=>{const Ie=$.current.unstable_getCellColSpanInfo(o,ue);if(Ie?.spannedByColSpan)return null;const et=Ie?.cellProps.width??W.computedWidth,je=Ie?.cellProps.colSpan??1,it=B_(Ce,W.computedWidth,ue,J,f,A);if(ie?.type==="skeletonRow")return g(ke.skeletonCell,{type:W.type,width:et,height:l,field:W.field,align:W.align},W.field);const xt=W.field==="__reorder__",rt=!(ot||W.disableReorder),Bt=se&&!V.length&&q<=1,dn=!(rt||xt&&Bt),kn=Ce===Tr.VIRTUAL,jn=c2(Ce,j),Cr=l2(Ce,j,he,U.showCellVerticalBorder,_);return g(ke.cell,ae({column:W,width:et,rowId:o,align:W.align||"left",colIndex:ue,colSpan:je,disableDragEvents:dn,isNotVisible:kn,pinnedOffset:it,pinnedPosition:Ce,showLeftBorder:jn,showRightBorder:Cr,row:i,rowNode:ie},Ne?.cell),W.field)},Ue=d.left.map((W,j)=>Pe(W,j,j,d.left.length,Tr.LEFT)),_e=d.right.map((W,j)=>{const ue=u.length-d.right.length+j;return Pe(W,j,ue,d.right.length,Tr.RIGHT)}),Oe=u.length-d.left.length-d.right.length,ze=[];we&&ze.push(Pe(u[y],y-d.left.length,y,Oe,Tr.VIRTUAL));for(let W=p;W<m;W+=1){const j=u[W],ue=W-d.left.length;j&&ze.push(Pe(j,ue,W,Oe))}xe&&ze.push(Pe(u[y],y-d.left.length,y,Oe,Tr.VIRTUAL));const ne=i?{onClick:Be,onDoubleClick:pe("rowDoubleClick",R),onMouseEnter:pe("rowMouseEnter",O),onMouseLeave:pe("rowMouseLeave",N),onMouseOut:pe("rowMouseOut",M),onMouseOver:pe("rowMouseOver",L)}:null;return K("div",ae({"data-id":o,"data-rowindex":s,role:"row",className:Ye(...be,ve.root,c),style:Ae},Se,ne,F,{ref:oe,children:[Ue,g("div",{role:"presentation",className:ye.cellOffsetLeft,style:{width:h}}),ze,g("div",{role:"presentation",className:Ye(ye.cell,ye.cellEmpty)}),_e,A!==0&&g(Kj,{pinnedRight:d.right.length>0,borderTop:!v})]}))}),Wnt=Om(Gnt),jnt=()=>{const t=yd(),e=yn(),n=St(t,Qi),r=St(t,Bj),o=St(t,wR),i=St(t,pde);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":Hj(e)}},qnt=()=>{const t=yd(),e=St(t,om),n=St(t,wR);return C.useCallback((r,o)=>{const i={},s=o+n+2;return i["aria-rowindex"]=s,t.current.isRowSelectable(r.id)&&(i["aria-selected"]=e[r.id]!==void 0),i},[t,e,n])};function Ynt({privateApiRef:t,configuration:e,props:n,children:r}){const o=C.useRef(t.current.getPublicApi());return g(ahe.Provider,{value:e,children:g(Jue.Provider,{value:n,children:g(nhe.Provider,{value:t,children:g(Zue.Provider,{value:o,children:r})})})})}const Xnt=t=>{const e=C.useRef(null),n=C.useRef(null),r=C.useRef(null),o=C.useRef(null),i=C.useRef(null),s=C.useRef(null);t.current.register("public",{rootElementRef:e}),t.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:s})},Knt=t=>{const e=ic();t.current.state.isRtl===void 0&&(t.current.state.isRtl=e);const n=C.useRef(!0);C.useEffect(()=>{n.current?n.current=!1:t.current.setState(r=>ae({},r,{isRtl:e}))},[t,e])},Qnt=JXe()&&window.localStorage.getItem("DEBUG")!=null,qT=()=>{},Znt={debug:qT,info:qT,warn:qT,error:qT},rZ=["debug","info","warn","error"];function oZ(t,e,n=console){const r=rZ.indexOf(e);if(r===-1)throw new Error(`MUI X: Log level ${e} not recognized.`);return rZ.reduce((i,s,a)=>(a>=r?i[s]=(...l)=>{const[c,...u]=l;n[s](`MUI X: ${t} - ${c}`,...u)}:i[s]=qT,i),{})}const Jnt=(t,e)=>{const n=C.useCallback(r=>Qnt?oZ(r,"debug",e.logger):e.logLevel?oZ(r,e.logLevel.toString(),e.logger):Znt,[e.logLevel,e.logger]);lr(t,{getLogger:n},"private")};let ert=class{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,n,r={}){let o=this.events[e];o||(o={highPriority:new Map,regular:new Map},this.events[e]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(e,n){this.events[e]&&(this.events[e].regular.delete(n),this.events[e].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(e,...n){const r=this.events[e];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let s=o.length-1;s>=0;s-=1){const a=o[s];r.highPriority.has(a)&&a.apply(this,n)}for(let s=0;s<i.length;s+=1){const a=i[s];r.regular.has(a)&&a.apply(this,n)}}once(e,n){const r=this;this.on(e,function o(...i){r.removeListener(e,o),n.apply(r,i)})}},trt=class xhe{static create(e){return new xhe(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}
372),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=e,this.listeners=new Set}};const whe=Symbol("mui.api_private"),nrt=t=>t.isPropagationStopped!==void 0;let iZ=0;function rrt(t){const e=t.current?.[whe];if(e)return e;const n={},r={state:n,store:trt.create(n),instanceId:{id:iZ}};return iZ+=1,r.getPublicApi=()=>t.current,r.register=(o,i)=>{Object.keys(i).forEach(s=>{const a=i[s],l=r[s];if(l?.spying===!0?l.target=a:r[s]=a,o==="public"){const c=t.current,u=c[s];u?.spying===!0?u.target=a:c[s]=a}})},r.register("private",{caches:{},eventManager:new ert}),r}function ort(t){return{get state(){return t.current.state},get store(){return t.current.store},get instanceId(){return t.current.instanceId},[whe]:t.current}}function irt(t,e){const n=C.useRef(null),r=C.useRef(null);r.current||(r.current=rrt(n)),n.current||(n.current=ort(r));const o=C.useCallback((...s)=>{const[a,l,c={}]=s;if(c.defaultMuiPrevented=!1,nrt(c)&&c.isPropagationStopped())return;const u=e.signature===mh.DataGridPro||e.signature===mh.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(a,l,c,u)},[r,e.signature]),i=C.useCallback((s,a,l)=>{r.current.eventManager.on(s,a,l);const c=r.current;return()=>{c.eventManager.removeListener(s,a)}},[r]);return lr(r,{subscribeEvent:i,publishEvent:o},"public"),t&&!t.current?.state&&(t.current=n.current),C.useImperativeHandle(t,()=>n.current,[n]),C.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const srt=(t,e)=>{const n=C.useCallback(r=>{if(e.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return e.localeText[r]},[e.localeText]);t.current.register("public",{getLocaleText:n})};function nP(t){"@babel/helpers - typeof";return nP=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nP(t)}function art(t,e){if(nP(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(nP(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rP(t){var e=art(t,"string");return nP(e)=="symbol"?e:e+""}const lrt=t=>{const e=C.useRef({}),n=C.useRef(!1),r=C.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=C.useCallback((u,d,h)=>{e.current[u]||(e.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const f=e.current[u];return f.processors.get(d)!==h&&(f.processors.set(d,h),f.processorsAsArray=Array.from(e.current[u].processors.values()),r(f)),()=>{e.current[u].processors.delete(d),e.current[u].processorsAsArray=Array.from(e.current[u].processors.values())}},[r]),i=C.useCallback((u,d,h)=>(e.current[u]||(e.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),e.current[u].appliers[d]=h,()=>{const f=e.current[u].appliers,p=Tn(f,[d].map(rP));e.current[u].appliers=p}),[]),s=C.useCallback(u=>{r(e.current[u])},[r]),a=C.useCallback((...u)=>{const[d,h,f]=u;if(!e.current[d])return h;const p=e.current[d].processorsAsArray;let m=h;for(let y=0;y<p.length;y+=1)m=p[y](m,f);return m},[]),l={registerPipeProcessor:o,registerPipeApplier:i,requestPipeProcessorsApplication:s},c={unstable_applyPipeProcessors:a};lr(t,l,"private"),lr(t,c,"public")},Li=(t,e,n,r=!0)=>{const o=C.useRef(null),i=C.useRef(`mui-${Math.round(Math.random()*1e9)}`),s=C.useCallback(()=>{o.current=t.current.registerPipeProcessor(e,i.current,n)},[t,n,e]);CR(()=>{r&&s()});const a=C.useRef(!0);C.useEffect(()=>(a.current?a.current=!1:r&&s(),()=>{o.current&&(o.current(),o.current=null)}),[s,r])},Qj=(t,e,n)=>{const r=C.useRef(null),o=C.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=C.useCallback(()=>{r.current=t.current.registerPipeApplier(e,o.current,n)},[t,n,e]);CR(()=>{i()});const s=C.useRef(!0);C.useEffect(()=>(s.current?s.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},u2=(t,e,n,r)=>{const o=C.useCallback(()=>{t.current.registerStrategyProcessor(e,n,r)},[t,r,n,e]);CR(()=>{o()});const i=C.useRef(!0);C.useEffect(()=>{i.current?i.current=!1:o()},[o])},LC="none",sZ={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},crt=t=>{const e=C.useRef(new Map),n=C.useRef({}),r=C.useCallback((l,c,u)=>{const d=()=>{const p=n.current[c],m=Tn(p,[l].map(rP));n.current[c]=m};n.current[c]||(n.current[c]={});const h=n.current[c],f=h[l];return h[l]=u,!f||f===u||l===t.current.getActiveStrategy(sZ[c])&&t.current.publishEvent("activeStrategyProcessorChange",c),d},[t]),o=C.useCallback((l,c)=>{const u=t.current.getActiveStrategy(sZ[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const h=d[u];return h(c)},[t]),i=C.useCallback(l=>Array.from(e.current.entries()).find(([,d])=>d.group!==l?!1:d.isAvailable())?.[0]??LC,[]),s=C.useCallback((l,c,u)=>{e.current.set(c,{group:l,isAvailable:u}),t.current.publishEvent("strategyAvailabilityChange")},[t]);lr(t,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:s},"private")},urt=t=>{const e=C.useRef({}),n=C.useCallback(l=>{e.current[l.stateId]=l},[]),r=C.useCallback((l,c)=>{let u;if(ZXe(l)?u=l(t.current.state):u=l,t.current.state===u)return!1;let d=!1;const h=[];if(Object.keys(e.current).forEach(f=>{const p=e.current[f],m=p.stateSelector(t.current.state,t.current.instanceId),y=p.stateSelector(u,t.current.instanceId);y!==m&&(h.push({stateId:p.stateId,hasPropChanged:y!==p.propModel}),p.propModel!==void 0&&y!==p.propModel&&(d=!0))}),h.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${h[0].stateId}, therefore, you're not allowed to update ${h.map(f=>f.stateId).join(", ")} in the same transaction.`);if(d||(t.current.state=u,t.current.publishEvent("stateChange",u),t.current.store.update(u)),h.length===1){const{stateId:f,hasPropChanged:p}=h[0],m=e.current[f],y=m.stateSelector(u,t.current.instanceId);m.propOnChange&&p&&m.propOnChange(y,{reason:c,api:t.current}),d||t.current.publishEvent(m.changeEvent,y,{reason:c})}return!d},[t]),o=C.useCallback((l,c,u)=>t.current.setState(d=>ae({},d,{[l]:c(d[l])}),u),[t]),i=C.useCallback(()=>{},[]),s={setState:r,forceUpdate:i},a={updateControlState:o,registerControlState:n};lr(t,s,"public"),lr(t,a,"private")},drt=(t,e)=>ae({},t,{props:{getRowId:e.getRowId}}),hrt=(t,e)=>{C.useEffect(()=>{t.current.setState(n=>ae({},n,{props:{getRowId:e.getRowId}}))},[t,e.getRowId])},frt=(t,e)=>{const n=irt(t,e);return Xnt(n),hrt(n,e),Knt(n),Jnt(n,e),urt(n),lrt(n),crt(n),srt(n,e),n.current.register("private",{rootProps:e}),n},la=(t,e,n)=>{const r=C.useRef(!1);r.current||(e.current.state=t(e.current.state,n,e),r.current=!0)};function y4(t,e){if(t==null)return"";const n=typeof t=="string"?t:`${t}`;if(e.shouldAppendQuotes||e.escapeFormulas){const r=n.replace(/"/g,'""');return e.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[e.delimiter,` 373`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const Ahe=(t,e)=>{const{csvOptions:n,ignoreValueFormatter:r}=e;let o;if(r){const i=t.colDef.type;i==="number"?o=String(t.value):i==="date"||i==="dateTime"?o=t.value?.toISOString():typeof t.value?.toString=="function"?o=t.value.toString():o=t.value}else o=t.formattedValue;return y4(o,n)};class v4{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}const prt=({id:t,columns:e,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new v4({csvOptions:r});return e.forEach(s=>{const a=n(t,s.field);i.addValue(Ahe(a,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function grt(t){const{columns:e,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=t,s=n.reduce((d,h)=>`${d}${prt({id:h,columns:e,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r 374`,"").trim();if(!r.includeHeaders)return s;const a=e.filter(d=>d.field!==mw.field),l=[];
374if(r.includeColumnGroupsHeaders){const d=i.current.getAllGroupDetails();let h=0;const f=a.reduce((p,m)=>{const y=i.current.getColumnGroupPath(m.field);return p[m.field]=y,h=Math.max(h,y.length),p},{});for(let p=0;p<h;p+=1){const m=new v4({csvOptions:r,sanitizeCellValue:y4});l.push(m),a.forEach(y=>{const v=(f[y.field]||[])[p],b=d[v];m.addValue(b?b.headerName||b.groupId:"")})}}const c=new v4({csvOptions:r,sanitizeCellValue:y4});return a.forEach(d=>{c.addValue(d.headerName||d.field)}),l.push(c),`${`${l.map(d=>d.getRowString()).join(`\r 375`)}\r 376`}${s}`.trim()}function aZ(t){const e=document.createElement("span");e.style.whiteSpace="pre",e.style.userSelect="all",e.style.opacity="0px",e.textContent=t,document.body.appendChild(e);const n=document.createRange();n.selectNode(e);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(e)}}function mrt(t){navigator.clipboard?navigator.clipboard.writeText(t).catch(()=>{aZ(t)}):aZ(t)}function yrt(t){return!!(window.getSelection()?.toString()||t&&(t.selectionEnd||0)-(t.selectionStart||0)>0)}const vrt=(t,e)=>{const n=e.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n?.clipboardExport:n)||!1,o=e.clipboardCopyCellDelimiter,i=C.useCallback(s=>{if(!ftt(s)||yrt(s.target))return;let a="";if(t.current.getSelectedRows().size>0)a=t.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=su(t);if(c){const u=t.current.getCellParams(c.id,c.field);a=Ahe(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}a=t.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(mrt(a),t.current.publishEvent("clipboardCopy",a))},[t,r,o]);$de(t,()=>t.current.rootElementRef.current,"keydown",i),So(t,"clipboardCopy",e.onClipboardCopy)},brt=t=>ae({},t,{columnMenu:{open:!1}}),Crt=t=>{const e=Ia(t,"useGridColumnMenu"),n=C.useCallback(s=>{const a=sD(t.current.state),l={open:!0,field:s};(l.open!==a.open||l.field!==a.field)&&(t.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===s?u:(e.debug("Opening Column Menu"),ae({},u,{columnMenu:{open:!0,field:s}}))),t.current.hidePreferences())},[t,e]),r=C.useCallback(()=>{const s=sD(t.current.state);if(s.field){const c=Nm(t),u=dh(t),d=rm(t);let h=s.field;if(c[h]||(h=d[0]),u[h]===!1){const f=d.filter(m=>m===h?!0:u[m]!==!1),p=f.indexOf(h);h=f[p+1]||f[p-1]}t.current.setColumnHeaderFocus(h)}const a={open:!1,field:void 0};(a.open!==s.open||a.field!==s.field)&&t.current.setState(c=>(e.debug("Hiding Column Menu"),ae({},c,{columnMenu:a})))},[t,e]),o=C.useCallback(s=>{e.debug("Toggle Column Menu");const a=sD(t.current.state);!a.open||a.field!==s?n(s):r()},[t,e,n,r]);lr(t,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),Qt(t,"columnResizeStart",r),Qt(t,"virtualScrollerWheel",t.current.hideColumnMenu),Qt(t,"virtualScrollerTouchMove",t.current.hideColumnMenu)},Srt=(t,e,n)=>{const r=_E({apiRef:n,columnsToUpsert:e.columns,initialState:e.initialState?.columns,columnVisibilityModel:e.columnVisibilityModel??e.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0});return ae({},t,{columns:r,pinnedColumns:t.pinnedColumns??n2})};function Ert(t,e){const n=Ia(t,"useGridColumns"),r=C.useRef(e.columns);t.current.registerControlState({stateId:"visibleColumns",propModel:e.columnVisibilityModel,propOnChange:e.onColumnVisibilityModelChange,stateSelector:dh,changeEvent:"columnVisibilityModelChange"});const o=C.useCallback(N=>{n.debug("Updating columns state."),t.current.setState(lZ(N)),t.current.publishEvent("columnsChange",N.orderedFields),t.current.updateRenderContext?.(),t.current.forceUpdate()},[n,t]),i=C.useCallback(N=>Nm(t)[N],[t]),s=C.useCallback(()=>pf(t),[t]),a=C.useCallback(()=>Qi(t),[t]),l=C.useCallback((N,M=!0)=>(M?Qi(t):pf(t)).findIndex(F=>F.field===N),[t]),c=C.useCallback(N=>{const M=l(N);return E0(t)[M]},[t,l]),u=C.useCallback(N=>{dh(t)!==N&&(t.current.setState(L=>ae({},L,{columns:_E({apiRef:t,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:N,keepOnlyColumnsToUpsert:!1})})),t.current.updateRenderContext?.(),t.current.forceUpdate())},[t]),d=C.useCallback(N=>{const M=_E({apiRef:t,columnsToUpsert:N,initialState:void 0,keepOnlyColumnsToUpsert:!1});o(M)},[t,o]),h=C.useCallback((N,M)=>{const L=dh(t),F=L[N]??!0;if(M!==F){const $=ae({},L,{[N]:M});t.current.setColumnVisibilityModel($)}},[t]),f=C.useCallback(N=>rm(t).findIndex(L=>L===N),[t]),p=C.useCallback((N,M)=>{const L=rm(t),F=f(N);if(F===M)return;n.debug(`Moving column ${N} to index ${M}`);const $=[...L],D=$.splice(F,1)[0];$.splice(M,0,D),o(ae({},Np(t.current.state),{orderedFields:$}));const k={column:t.current.getColumn(N),targetIndex:t.current.getColumnIndexRelativeToVisibleColumns(N),oldIndex:F};t.current.publishEvent("columnIndexChange",k)},[t,n,o,f]),m=C.useCallback((N,M)=>
376{n.debug(`Updating column ${N} width to ${M}`);const L=Np(t.current.state),F=L.lookup[N],$=ae({},F,{width:M,hasBeenResized:!0});o(p4(ae({},L,{lookup:ae({},L.lookup,{[N]:$})}),t.current.getRootDimensions())),t.current.publishEvent("columnWidthChange",{element:t.current.getColumnHeaderElement(N),colDef:$,width:M})},[t,n,o]),y={getColumn:i,getAllColumns:s,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:a,getColumnIndexRelativeToVisibleColumns:f,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:h,setColumnWidth:m},v={setColumnIndex:p};lr(t,y,"public"),lr(t,v,e.signature===mh.DataGrid?"private":"public");const b=C.useCallback((N,M)=>{const L={},F=dh(t);(!M.exportOnlyDirtyModels||e.columnVisibilityModel!=null||Object.keys(e.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(F).length>0)&&(L.columnVisibilityModel=F),L.orderedFields=rm(t);const D=pf(t),k={};return D.forEach(U=>{if(U.hasBeenResized){const H={};Zde.forEach(V=>{let q=U[V];q===1/0&&(q=-1),H[V]=q}),k[U.field]=H}}),Object.keys(k).length>0&&(L.dimensions=k),ae({},N,{columns:L})},[t,e.columnVisibilityModel,e.initialState?.columns]),S=C.useCallback((N,M)=>{const L=M.stateToRestore.columns?.columnVisibilityModel,F=M.stateToRestore.columns;if(L==null&&F==null)return N;const $=_E({apiRef:t,columnsToUpsert:[],initialState:F,columnVisibilityModel:L,keepOnlyColumnsToUpsert:!1});return t.current.setState(lZ($)),F!=null&&t.current.publishEvent("columnsChange",$.orderedFields),N},[t]),w=C.useCallback((N,M)=>{if(M===DC.columns){const L=e.slots.columnsPanel;return g(L,ae({},e.slotProps?.columnsPanel))}return N},[e.slots.columnsPanel,e.slotProps?.columnsPanel]),A=C.useCallback(N=>e.disableColumnSelector?N:[...N,"columnMenuColumnsItem"],[e.disableColumnSelector]);Li(t,"columnMenu",A),Li(t,"exportState",b),Li(t,"restoreState",S),Li(t,"preferencePanel",w);const _=C.useRef(null);Qt(t,"viewportInnerSizeChange",N=>{if(_.current!==N.width){if(_.current=N.width,!Qi(t).some(L=>L.flex&&L.flex>0))return;o(p4(Np(t.current.state),t.current.getRootDimensions()))}});const R=C.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const N=_E({apiRef:t,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[t,n,o]);Qj(t,"hydrateColumns",R);const O=C.useRef(!0);C.useEffect(()=>{if(O.current){O.current=!1;return}if(n.info(`GridColumns have changed, new length ${e.columns.length}`),r.current===e.columns)return;const N=_E({apiRef:t,initialState:void 0,columnsToUpsert:e.columns,keepOnlyColumnsToUpsert:!0});r.current=e.columns,o(N)},[n,t,o,e.columns]),C.useEffect(()=>{e.columnVisibilityModel!==void 0&&t.current.setColumnVisibilityModel(e.columnVisibilityModel)},[t,n,e.columnVisibilityModel])}function lZ(t){return e=>ae({},e,{columns:t})}const xrt=(t,e)=>ae({},t,{density:e.initialState?.density??e.density??"standard"}),wrt=(t,e)=>{const n=Ia(t,"useDensity");t.current.registerControlState({stateId:"density",propModel:e.density,propOnChange:e.onDensityChange,stateSelector:ZE,changeEvent:"densityChange"});const o={setDensity:zi(a=>{ZE(t.current.state)!==a&&(n.debug(`Set grid density to ${a}`),t.current.setState(c=>ae({},c,{density:a})))})};lr(t,o,"public");const i=C.useCallback((a,l)=>{const c=ZE(t.current.state);return!l.exportOnlyDirtyModels||e.density!=null||e.initialState?.density!=null?ae({},a,{density:c}):a},[t,e.density,e.initialState?.density]),s=C.useCallback((a,l)=>{const c=l.stateToRestore?.density?l.stateToRestore.density:ZE(t.current.state);return t.current.setState(u=>ae({},u,{density:c})),a},[t]);Li(t,"exportState",i),Li(t,"restoreState",s),C.useEffect(()=>{e.density&&t.current.setDensity(e.density)},[t,e.density])};function Art(t,e="csv",n=document.title||"untitled"){const r=`${n}.${e}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(t),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const The=({apiRef:t,options:e})=>{const n=pf(t);return e.fields?e.fields.reduce((o,i)=>{const s=n.find(a=>a.field===i);return s&&o.push(s),o},[]):(e.allColumns?n:Qi(t)).filter(o=>!o.disableExport)},_he=({apiRef:t})=>
376{const e=Dde(t),n=ma(t),r=t.current.getSelectedRows(),o=e.filter(l=>n[l].type!=="footer"),i=dw(t),s=i?.top?.map(l=>l.id)||[],a=i?.bottom?.map(l=>l.id)||[];return o.unshift(...s),o.push(...a),r.size>0?o.filter(l=>r.has(l)):o},Trt=(t,e)=>{const n=Ia(t,"useGridCsvExport"),r=e.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r?.csvExport:r)||!1,i=C.useCallback((c={})=>{n.debug("Get data as CSV");const u=The({apiRef:t,options:c}),h=(c.getRowsToExport??_he)({apiRef:t});return grt({columns:u,rowIds:h,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:t})},[n,t,o]),s=C.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),d=new Blob([c?.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});Art(d,"csv",c?.fileName)},[n,i]);lr(t,{getDataAsCsv:i,exportDataAsCsv:s},"public");const l=C.useCallback((c,u)=>u.csvOptions?.disableToolbarButton?c:[...c,{component:g(vnt,{options:u.csvOptions}),componentName:"csvExport"}],[]);Li(t,"exportMenu",l)},aD=(t,e,n)=>{let r=t.paginationModel;const o=t.rowCount,i=n?.pageSize??r.pageSize,s=n?.page??r.page,a=Hde(o,i,s);n&&(n?.page!==r.page||n?.pageSize!==r.pageSize)&&(r=n);const l=i===-1?0:uQe(r.page,a);return l!==r.page&&(r=ae({},r,{page:l})),zde(r.pageSize,e),r},_rt=(t,e)=>{const n=Ia(t,"useGridPaginationModel"),r=St(t,uw),o=C.useRef(za(t)),i=Math.floor(e.rowHeight*r);t.current.registerControlState({stateId:"paginationModel",propModel:e.paginationModel,propOnChange:e.onPaginationModelChange,stateSelector:Wl,changeEvent:"paginationModelChange"});const s=C.useCallback(b=>{const S=Wl(t);b!==S.page&&(n.debug(`Setting page to ${b}`),t.current.setPaginationModel({page:b,pageSize:S.pageSize}))},[t,n]),a=C.useCallback(b=>{const S=Wl(t);b!==S.pageSize&&(n.debug(`Setting page size to ${b}`),t.current.setPaginationModel({pageSize:b,page:S.page}))},[t,n]),l=C.useCallback(b=>{const S=Wl(t);b!==S&&(n.debug("Setting 'paginationModel' to",b),t.current.setState(w=>ae({},w,{pagination:ae({},w.pagination,{paginationModel:aD(w.pagination,e.signature,b)})}),"setPaginationModel"))},[t,n,e.signature]);lr(t,{setPage:s,setPageSize:a,setPaginationModel:l},"public");const u=C.useCallback((b,S)=>{const w=Wl(t);return!S.exportOnlyDirtyModels||e.paginationModel!=null||e.initialState?.pagination?.paginationModel!=null||w.page!==0&&w.pageSize!==cQe(e.autoPageSize)?ae({},b,{pagination:ae({},b.pagination,{paginationModel:w})}):b},[t,e.paginationModel,e.initialState?.pagination?.paginationModel,e.autoPageSize]),d=C.useCallback((b,S)=>{const w=S.stateToRestore.pagination?.paginationModel?ae({},Ude(e.autoPageSize),S.stateToRestore.pagination?.paginationModel):Wl(t);return t.current.setState(A=>ae({},A,{pagination:ae({},A.pagination,{paginationModel:aD(A.pagination,e.signature,w)})}),"stateRestorePreProcessing"),b},[t,e.autoPageSize,e.signature]);Li(t,"exportState",u),Li(t,"restoreState",d);const h=()=>{const b=Wl(t);t.current.virtualScrollerRef?.current&&t.current.scrollToIndexes({rowIndex:b.page*b.pageSize})},f=C.useCallback(()=>{if(!e.autoPageSize)return;const b=t.current.getRootDimensions(),S=Math.floor(b.viewportInnerSize.height/i);t.current.setPageSize(S)},[t,e.autoPageSize,i]),p=C.useCallback(b=>{if(b==null)return;const S=Wl(t);if(S.page===0)return;const w=Wde(t);S.page>w-1&&t.current.setPage(Math.max(0,w-1))},[t]),m=C.useCallback(()=>{Wl(t).page!==0&&t.current.setPage(0),t.current.getScrollPosition().top!==0&&t.current.scroll({top:0})},[t]),y=C.useCallback(b=>{const S=ae({},b,{items:kde(t)});Av(S,o.current)||(o.current=S,m())},[t,m]);Qt(t,"viewportInnerSizeChange",f),Qt(t,"paginationModelChange",h),Qt(t,"rowCountChange",p),Qt(t,"sortModelChange",Ob(e.resetPageOnSortFilter,m)),Qt(t,"filterModelChange",Ob(e.resetPageOnSortFilter,y));const v=C.useRef(!0);C.useEffect(()=>{if(v.current){v.current=!1;return}e.pagination&&t.current.setState(b=>ae({},b,{pagination:ae({},b.pagination,{paginationModel:aD(b.pagination,e.signature,e.paginationModel)})}))},[t,e.paginationModel,e.signature,e.pagination]),C.useEffect(()=>{t.current.setState(b=>{const S=e.pagination===!0;return b.pagination.paginationMode===e.paginationMode||b.pagination.enabled===S?b:ae({},b,{pagination:ae({},b.pagination,{paginationMode:e.paginationMode,enabled:e.pagination===!0})})})},[t,e.paginationMode,e.pagination]),C.useEffect(f,[f])};function Irt(){return new Promise(t=>{requestAnimationFrame(()=>{t()})})}function Prt(t){const e=document.createElement("iframe");return e.style.position="absolute",e.style.width="0px",e.style.height="0px",e.title=t||document.title,e}const Rrt=(t,e)=>{const n=t.current.rootElementRef.current!==null,r=Ia(t,"useGridPrintExport"),o=C.useRef(null),i=C.useRef(null),s=C.useRef({}),a=C.useRef([]),l=C.useRef(null);C.useEffect(()=>{o.current=wv(t.current.rootElementRef.current)},[t,n]);const c=C.useCallback((y,v,b)=>new Promise(S=>
376{const w=The({apiRef:t,options:{fields:y,allColumns:v}}).map(P=>P.field),A=pf(t),_={};A.forEach(P=>{_[P.field]=w.includes(P.field)}),b&&(_[mw.field]=!0),t.current.setColumnVisibilityModel(_),S()}),[t]),u=C.useCallback(y=>{const b=y({apiRef:t}).reduce((S,w)=>{const A=t.current.getRow(w);return A[ix]||S.push(A),S},[]);t.current.setRows(b)},[t]),d=C.useCallback((y,v)=>{const b=ae({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},v),S=y.contentDocument;if(!S)return;const w=AR(t.current.state),A=t.current.rootElementRef.current,_=A.cloneNode(!0),P=_.querySelector(`.${ye.main}`);P.style.overflow="visible",_.style.contain="size";let R=A.querySelector(`.${ye.toolbarContainer}`)?.offsetHeight||0,O=A.querySelector(`.${ye.footerContainer}`)?.offsetHeight||0;b.hideToolbar&&(_.querySelector(`.${ye.toolbarContainer}`)?.remove(),R=0),b.hideFooter&&(_.querySelector(`.${ye.footerContainer}`)?.remove(),O=0);const N=w.currentPageTotalHeight+Gj(t,e)+R+O;if(_.style.height=`${N}px`,_.style.boxSizing="content-box",!b.hideFooter){const $=_.querySelector(`.${ye.footerContainer}`);$.style.position="absolute",$.style.width="100%",$.style.top=`${N-O}px`}const M=document.createElement("div");M.appendChild(_),S.body.style.marginTop="0px",S.body.innerHTML=M.innerHTML;const L=typeof b.pageStyle=="function"?b.pageStyle():b.pageStyle;if(typeof L=="string"){const $=S.createElement("style");$.appendChild(S.createTextNode(L)),S.head.appendChild($)}b.bodyClassName&&S.body.classList.add(...b.bodyClassName.split(" "));const F=[];if(b.copyStyles){const $=A.getRootNode(),k=($.constructor.name==="ShadowRoot"?$:o.current).querySelectorAll("style, link[rel='stylesheet']");for(let U=0;U<k.length;U+=1){const H=k[U];if(H.tagName==="STYLE"){const V=S.createElement(H.tagName),q=H.sheet;if(q){let J="";for(let Q=0;Q<q.cssRules.length;Q+=1)typeof q.cssRules[Q].cssText=="string"&&(J+=`${q.cssRules[Q].cssText}\r 377`);V.appendChild(S.createTextNode(J)),S.head.appendChild(V)}}else if(H.getAttribute("href")){const V=S.createElement(H.tagName);for(let q=0;q<H.attributes.length;q+=1){const J=H.attributes[q];J&&V.setAttribute(J.nodeName,J.nodeValue||"")}F.push(new Promise(q=>{V.addEventListener("load",()=>q())})),S.head.appendChild(V)}}}Promise.all(F).then(()=>{y.contentWindow.print()})},[t,o,e]),h=C.useCallback(y=>{o.current.body.removeChild(y),t.current.restoreState(i.current||{}),i.current?.columns?.columnVisibilityModel||t.current.setColumnVisibilityModel(s.current),t.current.setState(v=>ae({},v,{virtualization:l.current})),t.current.setRows(a.current),i.current=null,s.current={},a.current=[]},[t]),p={exportDataAsPrint:C.useCallback(async y=>{if(r.debug("Export data as Print"),!t.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=t.current.exportState(),s.current=dh(t),a.current=t.current.getSortedRows().filter(b=>!b[ix]),e.pagination){const S={page:0,pageSize:Bj(t)};t.current.setState(w=>ae({},w,{pagination:ae({},w.pagination,{paginationModel:aD(w.pagination,"DataGridPro",S)})}))}l.current=t.current.state.virtualization,t.current.setState(b=>ae({},b,{virtualization:ae({},b.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(y?.fields,y?.allColumns,y?.includeCheckboxes),u(y?.getRowsToExport??_he),await Irt();const v=Prt(y?.fileName);v.onload=()=>{d(v,y),v.contentWindow.matchMedia("print").addEventListener("change",S=>{S.matches===!1&&h(v)})},o.current.body.appendChild(v)},[e,r,t,d,h,c,u])};lr(t,p,"public");const m=C.useCallback((y,v)=>v.printOptions?.disableToolbarButton?y:[...y,{component:g(bnt,{options:v.printOptions}),componentName:"printExport"}],[]);Li(t,"exportMenu",m)},Ort=(t,e,n)=>{const r=e.filterModel??e.initialState?.filter?.filterModel??JI();return ae({},t,{filter:ae({filterModel:Dj(r,e.disableMultipleColumnsFiltering,n)},Sde),visibleRowsLookup:{}})},Nrt=t=>t.filteredRowsLookup;function cZ(t,e){return t.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:e.rows.tree,filteredRowsLookup:e.filter.filteredRowsLookup})}function Mrt(){return ede(Object.values)}const Drt=(t,e)=>{const n=Ia(t,"useGridFilter");t.current.registerControlState({stateId:"filter",propModel:e.filterModel,propOnChange:e.onFilterModelChange,stateSelector:za,changeEvent:"filterModelChange"});const r=C.useCallback(()=>{t.current.setState(O=>{const N=za(O,t.current.instanceId),M=t.current.getFilterState(N),L=ae({},O,{filter:ae({},O.filter,M)}),F=cZ(t,L);return ae({},L,{visibleRowsLookup:F})}),t.current.publishEvent("filteredRowsSet")},[t]),o=C.useCallback((O,N)=>N==null||N.filterable===!1||e.disableColumnFilter?O:[...O,"columnMenuFilterItem"],[e.disableColumnFilter]),i=C.useCallback(()=>{r(),t.current.forceUpdate()},[t,r]),s=C.useCallback(O=>{const N=za(t),M=[...N.items],L=M.findIndex(F=>F.id===O.id);L===-1?M.push(O):M[L]=O,t.current.setFilterModel(ae({},N,{items:M}),"upsertFilterItem")},[t]),a=C.useCallback(O=>{const N=za(t),M=[...N.items];O.forEach(L=>{const F=M.findIndex($=>$.id===L.id);F===-1?M.push(L):M[F]=L}),t.current.setFilterModel(ae({},N,{items:M}),"upsertFilterItems")},[t]),l=C.useCallback(O=>{const N=za(t),M=N.items.filter(L=>
377L.id!==O.id);M.length!==N.items.length&&t.current.setFilterModel(ae({},N,{items:M}),"deleteFilterItem")},[t]),c=C.useCallback((O,N,M)=>{if(n.debug("Displaying filter panel"),O){const L=za(t),F=L.items.filter(U=>{if(U.value!==void 0)return!(Array.isArray(U.value)&&U.value.length===0);const V=t.current.getColumn(U.field).filterOperators?.find(J=>J.value===U.operator);return!(typeof V?.requiresFilterValue>"u"?!0:V?.requiresFilterValue)});let $;const D=F.find(U=>U.field===O),k=t.current.getColumn(O);D?$=F:e.disableMultipleColumnsFiltering?$=[f4({field:O,operator:k.filterOperators[0].value},t)]:$=[...F,f4({field:O,operator:k.filterOperators[0].value},t)],t.current.setFilterModel(ae({},L,{items:$}))}t.current.showPreferences(DC.filters,N,M)},[t,n,e.disableMultipleColumnsFiltering]),u=C.useCallback(()=>{n.debug("Hiding filter panel"),t.current.hidePreferences()},[t,n]),d=C.useCallback(O=>{const N=za(t);N.logicOperator!==O&&t.current.setFilterModel(ae({},N,{logicOperator:O}),"changeLogicOperator")},[t]),h=C.useCallback(O=>{const N=za(t);Av(N.quickFilterValues,O)||t.current.setFilterModel(ae({},N,{quickFilterValues:[...O]}))},[t]),f=C.useCallback((O,N)=>{za(t)!==O&&(n.debug("Setting filter model"),t.current.updateControlState("filter",SQ(O,e.disableMultipleColumnsFiltering,t),N),t.current.unstable_applyFilters())},[t,n,e.disableMultipleColumnsFiltering]),p=C.useCallback(O=>{const N=Dj(O,e.disableMultipleColumnsFiltering,t),M=e.filterMode==="client"?hKe(N,t,e.disableEval):null,L=t.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:M,filterModel:N??JI()});return ae({},L,{filterModel:N})},[e.disableMultipleColumnsFiltering,e.filterMode,e.disableEval,t]),m={setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:l,upsertFilterItem:s,upsertFilterItems:a,setFilterModel:f,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:h,ignoreDiacritics:e.ignoreDiacritics,getFilterState:p};lr(t,m,"public");const y=C.useCallback((O,N)=>{const M=za(t);return!N.exportOnlyDirtyModels||e.filterModel!=null||e.initialState?.filter?.filterModel!=null||!Av(M,JI())?ae({},O,{filter:{filterModel:M}}):O},[t,e.filterModel,e.initialState?.filter?.filterModel]),v=C.useCallback((O,N)=>{const M=N.stateToRestore.filter?.filterModel;return M==null?O:(t.current.updateControlState("filter",SQ(M,e.disableMultipleColumnsFiltering,t),"restoreState"),ae({},O,{callbacks:[...O.callbacks,t.current.unstable_applyFilters]}))},[t,e.disableMultipleColumnsFiltering]),b=C.useCallback((O,N)=>{if(N===DC.filters){const M=e.slots.filterPanel;return g(M,ae({},e.slotProps?.filterPanel))}return O},[e.slots.filterPanel,e.slotProps?.filterPanel]),{getRowId:S}=e,w=If(Mrt),A=C.useCallback(O=>{if(e.filterMode!=="client"||!O.isRowMatchingFilters||!O.filterModel.items.length&&!O.filterModel.quickFilterValues?.length)return Sde;const N=uh(t),M={},{isRowMatchingFilters:L}=O,F={},$={passingFilterItems:null,passingQuickFilterValues:null}
377,D=w.current(t.current.state.rows.dataRowIdToModelLookup);for(let H=0;H<D.length;H+=1){const V=D[H],q=S?S(V):V.id;L(V,void 0,$);const J=pKe([$.passingFilterItems],[$.passingQuickFilterValues],O.filterModel,t,F);M[q]=J}const k="auto-generated-group-footer-root";return N[k]&&(M[k]=!0),{filteredRowsLookup:M,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}},[t,e.filterMode,S,w]);Li(t,"columnMenu",o),Li(t,"exportState",y),Li(t,"restoreState",v),Li(t,"preferencePanel",b),u2(t,LC,"filtering",A),u2(t,LC,"visibleRowsLookupCreation",Nrt);const _=C.useCallback(()=>{n.debug("onColUpdated - GridColumns changed, applying filters");const O=za(t),N=Nm(t),M=O.items.filter(L=>L.field&&N[L.field]);M.length<O.items.length&&t.current.setFilterModel(ae({},O,{items:M}))},[t,n]),P=C.useCallback(O=>{O==="filtering"&&t.current.unstable_applyFilters()},[t]),R=C.useCallback(()=>{t.current.setState(O=>ae({},O,{visibleRowsLookup:cZ(t,O)})),t.current.forceUpdate()},[t]);Qt(t,"rowsSet",r),Qt(t,"columnsChange",_),Qt(t,"activeStrategyProcessorChange",P),Qt(t,"rowExpansionChange",R),Qt(t,"columnVisibilityModelChange",()=>{const O=za(t);O.quickFilterValues&&Ade(O)&&t.current.unstable_applyFilters()}),CR(()=>{t.current.unstable_applyFilters()}),Ol(()=>{e.filterModel!==void 0&&t.current.setFilterModel(e.filterModel)},[t,n,e.filterModel])},Lrt=t=>ae({},t,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),krt=(t,e)=>{const n=Ia(t,"useGridFocus"),r=C.useRef(null),o=t.current.rootElementRef.current!==null,i=C.useCallback((R,O)=>{R&&t.current.getRow(R.id)&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(R.id,R.field),O)},[t]),s=C.useCallback((R,O)=>{const N=su(t);N?.id===R&&N?.field===O||(t.current.setState(M=>(n.debug(`Focusing on cell with id=${R} and field=${O}`),ae({},M,{tabIndex:{cell:{id:R,field:O},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:R,field:O},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),t.current.forceUpdate(),t.current.getRow(R)&&(N&&i(N,{}),t.current.publishEvent("cellFocusIn",t.current.getCellParams(R,O))))},[t,n,i]),a=C.useCallback((R,O={})=>{const N=su(t);i(N,O),t.current.setState(M=>(n.debug(`Focusing on column header with colIndex=${R}`),ae({},M,{tabIndex:{columnHeader:{field:R},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:R},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),t.current.forceUpdate()},[t,n,i]),l=C.useCallback((R,O={})=>{const N=su(t);i(N,O),t.current.setState(M=>(n.debug(`Focusing on column header filter with colIndex=${R}`),ae({},M,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:R},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:R},cell:null,columnGroupHeader:null}}))),t.current.forceUpdate()},[t,n,i]),c=C.useCallback((R,O,N={})=>{const M=su(t);M&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(M.id,M.field),N),t.current.setState(L=>ae({},L,{tabIndex:{columnGroupHeader:{field:R,depth:O},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:R,depth:O},columnHeader:null,columnHeaderFilter:null,cell:null}})),t.current.forceUpdate()},[t]),u=C.useCallback(()=>r2(t),[t]),d=C.useCallback((R,O,N)=>{let M=t.current.getColumnIndex(O);const L=Qi(t),F=Tv(t,{pagination:e.pagination,paginationMode:e.paginationMode}),$=dw(t),D=[].concat($.top||[],F.rows,$.bottom||[]);let k=D.findIndex(q=>q.id===R);N==="right"?M+=1:N==="left"?M-=1:k+=1,M>=L.length?(k+=1,k<D.length&&(M=0)):M<0&&(k-=1,k>=0&&(M=L.length-1)),k=nd(k,0,D.length-1);const U=D[k];if(!U)return;const H=t.current.unstable_getCellColSpanInfo(U.id,M);H&&H.spannedByColSpan&&(N==="left"||N==="below"?M=H.leftVisibleCellIndex:N==="right"&&(M=H.rightVisibleCellIndex)),M=nd(M,0,L.length-1);const V=L[M];t.current.setCellFocus(U.id,V.field)},[t,e.pagination,e.paginationMode]),h=C.useCallback(({id:R,field:O})=>{t.current.setCellFocus(R,O)},[t]),f=C.useCallback((R,O)=>
377{O.key==="Enter"||O.key==="Tab"||O.key==="Shift"||a2(O.key)||t.current.setCellFocus(R.id,R.field)},[t]),p=C.useCallback(({field:R},O)=>{O.target===O.currentTarget&&t.current.setColumnHeaderFocus(R,O)},[t]),m=C.useCallback(({fields:R,depth:O},N)=>{if(N.target!==N.currentTarget)return;const M=r2(t);M!==null&&M.depth===O&&R.includes(M.field)||t.current.setColumnGroupHeaderFocus(R[0],O,N)},[t]),y=C.useCallback((R,O)=>{O.relatedTarget?.getAttribute("class")?.includes(ye.columnHeader)||(n.debug("Clearing focus"),t.current.setState(N=>ae({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,t]),v=C.useCallback(R=>{r.current=R},[]),b=C.useCallback(R=>{const O=r.current;r.current=null;const N=su(t);if(!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:R,cell:O}))return;if(!N){O&&t.current.setCellFocus(O.id,O.field);return}O?.id===N.id&&O?.field===N.field||t.current.getCellElement(N.id,N.field)?.contains(R.target)||(O?t.current.setCellFocus(O.id,O.field):(t.current.setState(F=>ae({},F,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),t.current.forceUpdate(),i(N,R)))},[t,i]),S=C.useCallback(R=>{if(R.cellMode==="view")return;const O=su(t);(O?.id!==R.id||O?.field!==R.field)&&t.current.setCellFocus(R.id,R.field)},[t]),w=C.useCallback(()=>{const R=su(t);if(R&&!t.current.getRow(R.id)){const O=R.id;let N=null;if(typeof O<"u"){const M=t.current.getRowElement(O),L=M?.dataset.rowindex?Number(M?.dataset.rowindex):0,F=Tv(t,{pagination:e.pagination,paginationMode:e.paginationMode});N=F.rows[nd(L,0,F.rows.length-1)]?.id??null}t.current.setState(M=>ae({},M,{focus:{cell:N===null?null:{id:N,field:R.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[t,e.pagination,e.paginationMode]),A=zi(()=>{const R=su(t);if(!R)return;const O=Tv(t,{pagination:e.pagination,paginationMode:e.paginationMode});if(O.rows.find(L=>L.id===R.id))return;const M=Qi(t);t.current.setState(L=>ae({},L,{tabIndex:{cell:{id:O.rows[0].id,field:M[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),_={setCellFocus:s,setColumnHeaderFocus:a,setColumnHeaderFilterFocus:l},P={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};lr(t,_,"public"),lr(t,P,"private"),C.useEffect(()=>{const R=wv(t.current.rootElementRef.current);return R.addEventListener("mouseup",b),()=>{R.removeEventListener("mouseup",b)}},[t,o,b]),Qt(t,"columnHeaderBlur",y),Qt(t,"cellDoubleClick",h),Qt(t,"cellMouseDown",v),Qt(t,"cellKeyDown",f),Qt(t,"cellModeChange",S),Qt(t,"columnHeaderFocus",p),Qt(t,"columnGroupHeaderFocus",m),Qt(t,"rowsSet",w),Qt(t,"paginationModelChange",A)},d5=({currentColIndex:t,firstColIndex:e,lastColIndex:n,isRtl:r})=>{if(r){if(t<n)return t+1}else if(!r&&t>e)return t-1;return null},h5=({currentColIndex:t,firstColIndex:e,lastColIndex:n,isRtl:r})=>{if(r){if(t>e)return t-1}else if(!r&&t<n)return t+1;return null};function Frt(t,e,n,r){const o=ohe(t);if(!o[e]?.[n])return e;const i=Dde(t);let s=i.indexOf(e)+(r==="down"?1:-1);for(;s>=0&&s<i.length;){const a=i[s];if(!o[a]?.[n])return a;s+=r==="down"?1:-1}return e}const Brt=co(ER,dw,(t,e)=>(e.top||[]).concat(t.rows,e.bottom||[])),$rt=(t,e)=>{const n=Ia(t,"useGridKeyboardNavigation"),r=ic(),o=e.unstable_listView,i=C.useCallback(()=>Brt(t),[t]),s=e.signature!=="DataGrid"&&e.headerFilters,a=C.useCallback((v,b,S="left",w="up")=>{const A=x0(t),_=t.current.unstable_getCellColSpanInfo(b,v);_&&_.spannedByColSpan&&(S==="left"?v=_.leftVisibleCellIndex:S==="right"&&(v=_.rightVisibleCellIndex));const P=o?lx(t.current.state).field:hw(t)[v],R=Frt(t,b,P,w),O=A.findIndex(N=>N.id===R);n.debug(`Navigating to cell row ${O}, col ${v}`),t.current.scrollToIndexes({colIndex:v,rowIndex:O}),t.current.setCellFocus(R,P)},[t,n,o]),l=C.useCallback((v,b)=>{n.debug(`Navigating to header col ${v}`),t.current.scrollToIndexes({colIndex:v});const S=t.current.getVisibleColumns()[v].field;t.current.setColumnHeaderFocus(S,b)},[t,n]),c=C.useCallback((v,b)=>{n.debug(`Navigating to header filter col ${v}`),t.current.scrollToIndexes({colIndex:v});const S=t.current.getVisibleColumns()[v].field;t.current.setColumnHeaderFilterFocus(S,b)},[t,n]),u=C.useCallback((v,b,S)=>{n.debug(`Navigating to header col ${v}`),t.current.scrollToIndexes({colIndex:v});const{field:w}=t.current.getVisibleColumns()[v];t.current.setColumnGroupHeaderFocus(w,b,S)},[t,n]),d=C.useCallback(v=>i()[v]?.id,[i]),h=C.useCallback((v,b)=>{const S=b.currentTarget.querySelector(`.${ye.columnHeaderTitleContainerContent}`);if(!!S&&S.contains(b.target)&&v.field!==mw.field)return;const A=i(),_=t.current.getViewportPageSize(),P=v.field?t.current.getColumnIndex(v.field):0,R=A.length>0?0:null,O=A.length-1,N=0,M=Qi(t).length-1,L=wR(t);let F=!0;switch(b.key){case"ArrowDown":{s?c(P,b):R!==null&&a(P,d(R));break}case"ArrowRight":{const $=h5({currentColIndex:P,firstColIndex:N,lastColIndex:M,isRtl:r});$!==null&&l($,b);break}case"ArrowLeft":{const $=d5({currentColIndex:P,firstColIndex:N,lastColIndex:M,isRtl:r});$!==null&&l($,b);break}case"ArrowUp":{L>0&&u(P,L-1,b);break}case"PageDown":{R!==null&&O!==null&&a(P,d(Math.min(R+_,O)));break}case"Home":{l(N,b);break}case"End":{l(M,b);break}case"Enter":{(b.ctrlKey||b.metaKey)&&t.current.toggleColumnMenu(v.field);break}case" ":break;default:F=!1}F&&b.preventDefault()},[t,i,s,c,a,d,r,l,u]),f=C.useCallback((v,b)=>{const S=XQe(t)===v.field,w=KQe(t)===v.field;if(S||w||!a2(b.key))return;const A=i(),_=t.current.getViewportPageSize(),P=v.field?t.current.getColumnIndex(v.field):0,R=0,O=A.length-1,N=0,M=Qi(t).length-1;let L=!0;switch(b.key){case"ArrowDown":{const F=d(R);F!=null&&a(P,F);break}case"ArrowRight":{const F=h5({currentColIndex:P,firstColIndex:N,lastColIndex:M,isRtl:r});F!==null&&c(F,b);break}case"ArrowLeft":{const F=d5({currentColIndex:P,firstColIndex:N,lastColIndex:M,isRtl:r});F!==null?c(F,b):t.current.setColumnHeaderFilterFocus(v.field,b);break}case"ArrowUp":{l(P,b);break}case"PageDown":{O!==null&&a(P,d(Math.min(R+_,O)));break}case"Home":{c(N,b);break}case"End":{c(M,b);break}case" ":break;default:L=!1}L&&b.preventDefault()},[t,i,c,r,l,a,d]),p=C.useCallback((v,b)=>{const S=r2(t);if(S===null)return;const{field:w,depth:A}=S,{fields:_,depth:P,maxDepth:R}=v,O=i(),N=t.current.getViewportPageSize(),M=t.current.getColumnIndex(w),L=w?t.current.getColumnIndex(w):0,F=0,$=O.length-1,D=0,k=Qi(t).length-1;let U=!0;switch(b.key){case"ArrowDown":{P===R-1?l(M,b):u(M,A+1,b);break}case"ArrowUp":{P>0&&u(M,A-1,b);break}case"ArrowRight":{const H=_.length-_.indexOf(w)-1;M+H+1<=k&&u(M+H+1,A,b);break}case"ArrowLeft":{const H=_.indexOf(w);M-H-1>=D&&u(M-H-1,A,b);break}case"PageDown":{$!==null&&a(L,d(Math.min(F+N,$)));break}case"Home":{u(D,A,b);break}case"End":{u(k,A,b);break}case" ":break;default:U=!1}U&&b.preventDefault()},[t,i,l,u,a,d]),m=C.useCallback((v,b)=>{if(_R(b))return;const S=t.current.getCellParams(v.id,v.field);if(S.cellMode===vo.Edit||!a2(b.key)||!t.current.unstable_applyPipeProcessors("canU
377pdateFocus",!0,{event:b,cell:S}))return;const A=i();if(A.length===0)return;const _=t.current.getViewportPageSize(),P=o?()=>0:t.current.getColumnIndex,R=v.field?P(v.field):0,O=A.findIndex(k=>k.id===v.id),N=0,M=A.length-1,L=0,$=(o?[lx(t.current.state)]:Qi(t)).length-1;let D=!0;switch(b.key){case"ArrowDown":{O<M&&a(R,d(O+1),r?"right":"left","down");break}case"ArrowUp":{O>N?a(R,d(O-1)):s?c(R,b):l(R,b);break}case"ArrowRight":{const k=h5({currentColIndex:R,firstColIndex:L,lastColIndex:$,isRtl:r});k!==null&&a(k,d(O),r?"left":"right");break}case"ArrowLeft":{const k=d5({currentColIndex:R,firstColIndex:L,lastColIndex:$,isRtl:r});k!==null&&a(k,d(O),r?"right":"left");break}case"Tab":{b.shiftKey&&R>L?a(R-1,d(O),"left"):!b.shiftKey&&R<$&&a(R+1,d(O),"right");break}case" ":{if(v.field===VF)break;const U=v.colDef;if(U&&(U.field===IKe||SJe(U.field)))break;!b.shiftKey&&O<M&&a(R,d(Math.min(O+_,M)));break}case"PageDown":{O<M&&a(R,d(Math.min(O+_,M)));break}case"PageUp":{const k=Math.max(O-_,N);k!==O&&k>=N?a(R,d(k)):l(R,b);break}case"Home":{b.ctrlKey||b.metaKey||b.shiftKey?a(L,d(N)):a(L,d(O));break}case"End":{b.ctrlKey||b.metaKey||b.shiftKey?a($,d(M)):a($,d(O));break}default:D=!1}D&&b.preventDefault()},[t,i,r,a,d,s,c,l,o]),y=C.useCallback((v,{event:b})=>b.key===" "?!1:v,[]);Li(t,"canStartEditing",y),Qt(t,"columnHeaderKeyDown",h),Qt(t,"headerFilterKeyDown",f),Qt(t,"columnGroupHeaderKeyDown",p),Qt(t,"cellKeyDown",m)},Hrt=(t,e)=>{const n=Ia(t,"useGridRowCount"),r=St(t,$j),o=St(t,JE),i=St(t,jT),s=St(t,Wl),a=If(()=>Wl(t).pageSize);t.current.registerControlState({stateId:"paginationRowCount",propModel:e.rowCount,propOnChange:e.onRowCountChange,stateSelector:JE,changeEvent:"rowCountChange"});const c={setRowCount:C.useCallback(p=>{o!==p&&(n.debug("Setting 'rowCount' to",p),t.current.setState(m=>ae({},m,{pagination:ae({},m.pagination,{rowCount:p})})))},[t,n,o])};lr(t,c,"public");const u=C.useCallback((p,m)=>{const y=JE(t);return!m.exportOnlyDirtyModels||e.rowCount!=null||e.initialState?.pagination?.rowCount!=null?ae({},p,{pagination:ae({},p.pagination,{rowCount:y})}):p},[t,e.rowCount,e.initialState?.pagination?.rowCount]),d=C.useCallback((p,m)=>{const y=m.stateToRestore.pagination?.rowCount?m.stateToRestore.pagination.rowCount:JE(t);return t.current.setState(v=>ae({},v,{pagination:ae({},v.pagination,{rowCount:y})})),p},[t]);Li(t,"exportState",u),Li(t,"restoreState",d);const h=C.useCallback(p=>{e.paginationMode==="client"||!a.current||p.pageSize!==a.current&&(a.current=p.pageSize,o===-1&&t.current.setPage(0))},[e.paginationMode,a,o,t]);Qt(t,"paginationModelChange",h),C.useEffect(()=>{e.paginationMode==="client"?t.current.setRowCount(r):e.rowCount!=null&&t.current.setRowCount(e.rowCount)},[t,e.paginationMode,r,e.rowCount]);const f=i.hasNextPage===!1;C.useEffect(()=>{f&&o===-1&&t.current.setRowCount(s.pageSize*s.page+r)},[t,r,f,o,s])},Urt=(t,e)=>{const n=Ia(t,"useGridPaginationMeta"),r=St(t,jT);t.current.registerControlState({stateId:"paginationMeta",propModel:e.paginationMeta,propOnChange:e.onPaginationMetaChange,stateSelector:jT,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:C.useCallback(l=>{r!==l&&(n.debug("Setting 'paginationMeta' to",l),t.current.setState(c=>ae({},c,{pagination:ae({},c.pagination,{meta:l})})))},[t,n,r])};lr(t,i,"public");const s=C.useCallback((l,c)=>{const u=jT(t);return!c.exportOnlyDirtyModels||e.paginationMeta!=null||e.initialState?.pagination?.meta!=null?ae({},l,{pagination:ae({},l.pagination,{meta:u})}):l},[t,e.paginationMeta,e.initialState?.pagination?.meta]),a=C.useCallback((l,c)=>{const u=c.stateToRestore.pagination?.meta?c.stateToRestore.pagination.meta:jT(t);return t.current.setState(d=>ae({},d,{pagination:ae({},d.pagination,{meta:u})})),l},[t]);Li(t,"exportState",s),Li(t,"restoreState",a),C.useEffect(()=>{e.paginationMeta&&t.current.setPaginationMeta(e.paginationMeta)},[t,e.paginationMeta])},zrt=(t,e)=>{const n=ae({},Ude(e.autoPageSize),e.paginationModel??e.initialState?.pagination?.paginationModel);zde(n.pageSize,e.signature);const r=e.rowCount??e.initialState?.pagination?.rowCount??(e.paginationMode==="client"?t.rows?.totalRowCount:void 0),o=e.paginationMeta??e.initialState?.pagination?.meta??{};return ae({},t,{pagination:ae({},t.pagination,{paginationModel:n,rowCount:r,meta:o,enabled:e.pagination===!0,paginationMode:e.paginationMode})})},Vrt=(t,e)=>{Urt(t,e),_rt(t,e),Hrt(t,e)},Grt=(t,e)=>ae({},t,{preferencePanel:e.initialState?.preferencePanel??{open:!1}}),Wrt=(t,e)=>{const n=Ia(t,"useGridPreferencesPanel"),r=C.useCallback(()=>{t.current.setState(a=>{if(!a.preferencePanel.open)return a;n.debug("Hiding Preferences Panel");const l=tP(a);return t.current.publishEvent("preferencePanelClose",{openedPanelValue:l.openedPanelValue}),ae({},a,{preferencePanel:{open:!1}})})},[t,n]),o=C.useCallback((a,l,c)=>{n.debug("Opening Preferences Panel"),t.current.setState(u=>ae({},u,{preferencePanel:ae({},u.preferencePanel,{open:!0,openedPanelValue:a,panelId:l,labelId:c})})),t.current.publishEvent("preferencePanelOpen",{openedPanelValue:a})},[n,t]);lr(t,{showPreferences:o,hidePreferences:r},"public");const i=C.useCallback((a,l)=>{const c=tP(t.current.state);return!l.exportOnlyDirtyModels||e.initialState?.preferencePanel!=null||c.open?ae({},a,{preferencePanel:c}):a},[t,e.initialState?.preferencePanel]),s=C.useCallback((a,l)=>{const c=l.stateToRestore.preferencePanel;return c!=null&&t.current.setState(u=>ae({},u,{preferencePanel:c})),a},[t]);Li(t,"exportState",i),Li(t,"restoreState",s)},b4=t=>{switch(t.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},jrt=["id","field"],qrt=["id","field"],Yrt=(t,e)=>{const[n,r]=C.useState({}),o=C.useRef(n),i=C.useRef({}),{processRowUpdate:s,onProcessRowUpdateError:a,cellModesModel:l,onCellModesModelChange:c}=e,u=D=>(...k)=>{e.editMode===Gp.Cell&&D(...k)},d=C.useCallback((D,k)=>{const U=t.current.getCellParams(D,k);if(!t.current.isCellEditable(U))throw new Error(`MUI X: The cell with id=${D} and field=${k} is not editable.`)},[t]),h=C.useCallback((D,k,U)=>{if(t.current.getCellMode(D,k)!==U)throw new Error(`MUI X: The cell with id=${D} and field=${k} is not in ${U} mode.`)},[t]),f=C.useCallback((D,k)=>{if(!D.isEditable||D.cellMode===vo.Edit)return;const U=ae({},D,{reason:Rg.cellDoubleClick});
377t.current.publishEvent("cellEditStart",U,k)},[t]),p=C.useCallback((D,k)=>{if(D.cellMode===vo.View||t.current.getCellMode(D.id,D.field)===vo.View)return;const U=ae({},D,{reason:Qh.cellFocusOut});t.current.publishEvent("cellEditStop",U,k)},[t]),m=C.useCallback((D,k)=>{if(D.cellMode===vo.Edit){if(k.which===229)return;let U;if(k.key==="Escape"?U=Qh.escapeKeyDown:k.key==="Enter"?U=Qh.enterKeyDown:k.key==="Tab"&&(U=k.shiftKey?Qh.shiftTabKeyDown:Qh.tabKeyDown,k.preventDefault()),U){const H=ae({},D,{reason:U});t.current.publishEvent("cellEditStop",H,k)}}else if(D.isEditable){let U;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:k,cellParams:D,editMode:"cell"}))return;if(bhe(k)?U=Rg.printableKeyDown:She(k)?U=Rg.pasteKeyDown:k.key==="Enter"?U=Rg.enterKeyDown:(k.key==="Backspace"||k.key==="Delete")&&(U=Rg.deleteKeyDown),U){const V=ae({},D,{reason:U,key:k.key});t.current.publishEvent("cellEditStart",V,k)}}},[t]),y=C.useCallback(D=>{const{id:k,field:U,reason:H}=D,V={id:k,field:U};(H===Rg.printableKeyDown||H===Rg.deleteKeyDown||H===Rg.pasteKeyDown)&&(V.deleteValue=!0),t.current.startCellEditMode(V)},[t]),v=C.useCallback(D=>{const{id:k,field:U,reason:H}=D;t.current.runPendingEditCellValueMutation(k,U);let V;H===Qh.enterKeyDown?V="below":H===Qh.tabKeyDown?V="right":H===Qh.shiftTabKeyDown&&(V="left");const q=H==="escapeKeyDown";t.current.stopCellEditMode({id:k,field:U,ignoreModifications:q,cellToFocusAfter:V})},[t]),b=D=>async(...k)=>{if(D){const{id:U,field:H}=k[0];t.current.state.editRows[U][H]?.error||D(...k)}};Qt(t,"cellDoubleClick",u(f)),Qt(t,"cellFocusOut",u(p)),Qt(t,"cellKeyDown",u(m)),Qt(t,"cellEditStart",u(y)),Qt(t,"cellEditStop",u(v)),So(t,"cellEditStart",e.onCellEditStart),So(t,"cellEditStop",b(e.onCellEditStop));const S=C.useCallback((D,k)=>{const U=pa(t.current.state);return U[D]&&U[D][k]?vo.Edit:vo.View},[t]),w=zi(D=>{const k=D!==e.cellModesModel;c&&k&&c(D,{api:t.current}),!(e.cellModesModel&&k)&&(r(D),o.current=D,t.current.publishEvent("cellModesModelChange",D))}),A=C.useCallback((D,k,U)=>{const H=ae({},o.current);if(U!==null)H[D]=ae({},H[D],{[k]:ae({},U)});else{const V=H[D],q=Tn(V,[k].map(rP));H[D]=q,Object.keys(H[D]).length===0&&delete H[D]}w(H)},[w]),_=C.useCallback((D,k,U)=>{t.current.setState(H=>{const V=ae({},H.editRows);return U!==null?V[D]=ae({},V[D],{[k]:ae({},U)}):(delete V[D][k],Object.keys(V[D]).length===0&&delete V[D]),ae({},H,{editRows:V})}),t.current.forceUpdate()},[t]),P=C.useCallback(D=>{const{id:k,field:U}=D,H=Tn(D,jrt);d(k,U),h(k,U,vo.View),A(k,U,ae({mode:vo.Edit},H))},[d,h,A]),R=zi(async D=>{const{id:k,field:U,deleteValue:H,initialValue:V}=D,q=t.current.getCellValue(k,U);let J=q;H?J=b4(t.current.getColumn(U)):V&&(J=V);const Q=t.current.getColumn(U),se=!!Q.preProcessEditCellProps&&H;let oe={value:J,error:!1,isProcessingProps:se};if(_(k,U,oe),t.current.setCellFocus(k,U),se&&(oe=await Promise.resolve(Q.preProcessEditCellProps({id:k,row:t.current.getRow(k),props:oe,hasChanged:J!==q})),t.current.getCellMode(k,U)===vo.Edit)){const ie=pa(t.current.state);_(k,U,ae({},oe,{value:ie[k][U].value,isProcessingProps:!1}))}}),O=C.useCallback(D=>{const{id:k,field:U}=D,H=Tn(D,qrt);h(k,U,vo.Edit),A(k,U,ae({mode:vo.View},H))},[h,A]),N=zi(async D=>{const{id:k,field:U,ignoreModifications:H,cellToFocusAfter:V="none"}=D;h(k,U,vo.Edit),t.current.runPendingEditCellValueMutation(k,U);const q=()=>{_(k,U,null),A(k,U,null),V!=="none"&&t.current.moveFocusToRelativeCell(k,U,V)};if(H){q();return}const J=pa(t.current.state),{error:Q,isProcessingProps:se}=J[k][U];if(Q||se){i.current[k][U].mode=vo.Edit,A(k,U,{mode:vo.Edit});return}const oe=t.current.getRowWithUpdatedValuesFromCellEditing(k,U);if(s){const ie=ee=>{i.current[k][U].mode=vo.Edit,A(k,U,{mode:vo.Edit}),a&&a(ee)};try{const ee=t.current.getRow(k);Promise.resolve(s(oe,ee,{rowId:k})).then(re=>{t.current.updateRows([re]),q()}).catch(ie)}catch(ee){ie(ee)}}else t.current.updateRows([oe]),q()}),M=C.useCallback(async D=>{const{id:k,field:U,value:H,debounceMs:V,unstable_skipValueParser:q}=D;d(k,U),h(k,U,vo.Edit);const J=t.current.getColumn(U),Q=t.current.getRow(k);let se=H;J.valueParser&&!q&&(se=J.valueParser(H,Q,J,t));let oe=pa(t.current.state),ie=ae({},oe[k][U],{value:se,changeReason:V?"debouncedSetEditCellValue":"setEditCellValue"});if(J.preProcessEditCellProps){const ee=H!==oe[k][U].value;ie=ae({},ie,{isProcessingProps:!0}),_(k,U,ie),ie=await Promise.resolve(J.preProcessEditCellProps({id:k,row:Q,props:ie,hasChanged:ee}))}return t.current.getCellMode(k,U)===vo.View?!1:(oe=pa(t.current.state),ie=ae({},ie,{isProcessingProps:!1}),ie.value=J.preProcessEditCellProps?oe[k][U].value:se,_(k,U,ie),oe=pa(t.current.state),!oe[k]?.[U]?.error)},[t,d,h,_]),L=C.useCallback((D,k)=>{const U=t.current.getColumn(k),H=pa(t.current.state),V=t.current.getRow(D);if(!H[D]||!H[D][k])return t.current.getRow(D);const{value:q}=H[D][k];return U.valueSetter?U.valueSetter(q,V,U,t):ae({},V,{[k]:q})},[t]),F={getCellMode:S,startCellEditMode:P,stopCellEditMode:O}
377,$={setCellEditingEditCellValue:M,getRowWithUpdatedValuesFromCellEditing:L};lr(t,F,"public"),lr(t,$,"private"),C.useEffect(()=>{l&&w(l)},[l,w]),Ol(()=>{const D=uh(t),k=i.current;i.current=vde(n),Object.entries(n).forEach(([U,H])=>{Object.entries(H).forEach(([V,q])=>{const J=k[U]?.[V]?.mode||vo.View,Q=D[U]?t.current.getRowId(D[U]):U;q.mode===vo.Edit&&J===vo.View?R(ae({id:Q,field:V},q)):q.mode===vo.View&&J===vo.Edit&&N(ae({id:Q,field:V},q))})})},[t,n,R,N])},Xrt=["id"],Krt=["id"],Qrt=(t,e)=>{const[n,r]=C.useState({}),o=C.useRef(n),i=C.useRef({}),s=C.useRef(void 0),a=C.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:c,rowModesModel:u,onRowModesModelChange:d}=e,h=V=>(...q)=>{e.editMode===Gp.Row&&V(...q)},f=C.useCallback((V,q)=>{const J=t.current.getCellParams(V,q);if(!t.current.isCellEditable(J))throw new Error(`MUI X: The cell with id=${V} and field=${q} is not editable.`)},[t]),p=C.useCallback((V,q)=>{if(t.current.getRowMode(V)!==q)throw new Error(`MUI X: The row with id=${V} is not in ${q} mode.`)},[t]),m=C.useCallback(V=>{const q=pa(t.current.state);return Object.values(q[V]).some(J=>J.error)},[t]),y=C.useCallback((V,q)=>{if(!V.isEditable||t.current.getRowMode(V.id)===ui.Edit)return;const J=t.current.getRowParams(V.id),Q=ae({},J,{field:V.field,reason:Oy.cellDoubleClick});t.current.publishEvent("rowEditStart",Q,q)},[t]),v=C.useCallback(V=>{a.current=V},[]),b=C.useCallback((V,q)=>{V.isEditable&&t.current.getRowMode(V.id)!==ui.View&&(a.current=null,s.current=setTimeout(()=>{if(a.current?.id!==V.id){if(!t.current.getRow(V.id)||t.current.getRowMode(V.id)===ui.View||m(V.id))return;const J=t.current.getRowParams(V.id),Q=ae({},J,{field:V.field,reason:sp.rowFocusOut});t.current.publishEvent("rowEditStop",Q,q)}}))},[t,m]);C.useEffect(()=>()=>{clearTimeout(s.current)},[]);const S=C.useCallback((V,q)=>{if(V.cellMode===ui.Edit){if(q.which===229)return;let J;if(q.key==="Escape")J=sp.escapeKeyDown;else if(q.key==="Enter")J=sp.enterKeyDown;else if(q.key==="Tab"){const Q=hw(t).filter(se=>t.current.getColumn(se).type===UF?!0:t.current.isCellEditable(t.current.getCellParams(V.id,se)));if(q.shiftKey?V.field===Q[0]&&(J=sp.shiftTabKeyDown):V.field===Q[Q.length-1]&&(J=sp.tabKeyDown),q.preventDefault(),!J){const se=Q.findIndex(ie=>ie===V.field),oe=Q[q.shiftKey?se-1:se+1];t.current.setCellFocus(V.id,oe)}}if(J){if(J!==sp.escapeKeyDown&&m(V.id))return;const Q=ae({},t.current.getRowParams(V.id),{reason:J,field:V.field});t.current.publishEvent("rowEditStop",Q,q)}}else if(V.isEditable){let J;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:q,cellParams:V,editMode:"row"}))return;if(bhe(q)||She(q)?J=Oy.printableKeyDown:q.key==="Enter"?J=Oy.enterKeyDown:(q.key==="Backspace"||q.key==="Delete")&&(J=Oy.deleteKeyDown),J){const se=t.current.getRowParams(V.id),oe=ae({},se,{field:V.field,reason:J});t.current.publishEvent("rowEditStart",oe,q)}}},[t,m]),w=C.useCallback(V=>{const{id:q,field:J,reason:Q}=V,se={id:q,fieldToFocus:J};(Q===Oy.printableKeyDown||Q===Oy.deleteKeyDown)&&(se.deleteValue=!!J),t.current.startRowEditMode(se)},[t]),A=C.useCallback(V=>{const{id:q,reason:J,field:Q}=V;t.current.runPendingEditCellValueMutation(q);let se;J===sp.enterKeyDown?se="below":J===sp.tabKeyDown?se="right":J===sp.shiftTabKeyDown&&(se="left");const oe=J==="escapeKeyDown";t.current.stopRowEditMode({id:q,ignoreModifications:oe,field:Q,cellToFocusAfter:se})},[t]);Qt(t,"cellDoubleClick",h(y)),Qt(t,"cellFocusIn",h(v)),Qt(t,"cellFocusOut",h(b)),Qt(t,"cellKeyDown",h(S)),Qt(t,"rowEditStart",h(w)),Qt(t,"rowEditStop",h(A)),So(t,"rowEditStart",e.onRowEditStart),So(t,"rowEditStop",e.onRowEditStop);const _=C.useCallback(V=>uhe(t,{rowId:V,editMode:e.editMode})?ui.Edit:ui.View,[t,e.editMode]),P=zi(V=>{const q=V!==e.rowModesModel;d&&q&&d(V,{api:t.current}),!(e.rowModesModel&&q)&&(r(V),o.current=V,t.current.publishEvent("rowModesModelChange",V))}),R=C.useCallback((V,q)=>{const J=ae({},o.current);q!==null?J[V]=ae({},q):delete J[V],P(J)},[P]),O=C.useCallback((V,q)=>{t.current.setState(J=>{const Q=ae({},J.editRows);return q!==null?Q[V]=q:delete Q[V],ae({},J,{editRows:Q})}),t.current.forceUpdate()},[t]),N=C.useCallback((V,q,J)=>{t.current.setState(Q=>{const se=ae({},Q.editRows);return J!==null?se[V]=ae({},se[V],{[q]:ae({},J)}):(delete se[V][q],Object.keys(se[V]).length===0&&delete se[V]),ae({},Q,{editRows:se})}),t.current.forceUpdate()},[t]),M=C.useCallback(V=>{const{id:q}=V,J=Tn(V,Xrt);p(q,ui.View),R(q,ae({mode:ui.Edit},J))},[p,R]),L=zi(V=>{const{id:q,fieldToFocus:J,deleteValue:Q,initialValue:se}=V,oe=rm(t),ie=oe.reduce((ee,re)=>{if(!t.current.getCellParams(q,re).isEditable)return ee;const we=t.current.getColumn(re);let xe=t.current.getCellValue(q,re);
377return J===re&&(Q||se)&&(Q?xe=b4(we):se&&(xe=se)),ee[re]={value:xe,error:!1,isProcessingProps:!!we.preProcessEditCellProps&&Q},ee},{});O(q,ie),J&&t.current.setCellFocus(q,J),oe.filter(ee=>!!t.current.getColumn(ee).preProcessEditCellProps&&Q).forEach(ee=>{const re=t.current.getColumn(ee),fe=t.current.getCellValue(q,ee),we=Q?b4(re):se??fe;Promise.resolve(re.preProcessEditCellProps({id:q,row:t.current.getRow(q),props:ie[ee],hasChanged:we!==fe})).then(xe=>{if(t.current.getRowMode(q)===ui.Edit){const ve=pa(t.current.state);N(q,ee,ae({},xe,{value:ve[q][ee].value,isProcessingProps:!1}))}})})}),F=C.useCallback(V=>{const{id:q}=V,J=Tn(V,Krt);p(q,ui.Edit),R(q,ae({mode:ui.View},J))},[p,R]),$=zi(V=>{const{id:q,ignoreModifications:J,field:Q,cellToFocusAfter:se="none"}=V;t.current.runPendingEditCellValueMutation(q);const oe=()=>{se!=="none"&&Q&&t.current.moveFocusToRelativeCell(q,Q,se),O(q,null),R(q,null)};if(J){oe();return}const ie=pa(t.current.state),ee=t.current.getRow(q);if(Object.values(ie[q]).some(we=>we.isProcessingProps)){i.current[q].mode=ui.Edit;return}if(m(q)){i.current[q].mode=ui.Edit,R(q,{mode:ui.Edit});return}const fe=t.current.getRowWithUpdatedValuesFromRowEditing(q);if(l){const we=xe=>{i.current[q].mode=ui.Edit,R(q,{mode:ui.Edit}),c&&c(xe)};try{Promise.resolve(l(fe,ee,{rowId:q})).then(xe=>{t.current.updateRows([xe]),oe()}).catch(we)}catch(xe){we(xe)}}else t.current.updateRows([fe]),oe()}),D=C.useCallback(V=>{const{id:q,field:J,value:Q,debounceMs:se,unstable_skipValueParser:oe}=V;f(q,J);const ie=t.current.getColumn(J),ee=t.current.getRow(q);let re=Q;ie.valueParser&&!oe&&(re=ie.valueParser(Q,ee,ie,t));let fe=pa(t.current.state),we=ae({},fe[q][J],{value:re,changeReason:se?"debouncedSetEditCellValue":"setEditCellValue"});return ie.preProcessEditCellProps||N(q,J,we),new Promise(xe=>{const ve=[];if(ie.preProcessEditCellProps){const Re=we.value!==fe[q][J].value;we=ae({},we,{isProcessingProps:!0}),N(q,J,we);const pe=fe[q],Be=Tn(pe,[J].map(rP)),ke=Promise.resolve(ie.preProcessEditCellProps({id:q,row:ee,props:we,hasChanged:Re,otherFieldsProps:Be})).then(Ne=>{if(t.current.getRowMode(q)===ui.View){xe(!1);return}fe=pa(t.current.state),Ne=ae({},Ne,{isProcessingProps:!1}),Ne.value=ie.preProcessEditCellProps?fe[q][J].value:re,N(q,J,Ne)});ve.push(ke)}Object.entries(fe[q]).forEach(([Re,pe])=>{if(Re===J)return;const Be=t.current.getColumn(Re);if(!Be.preProcessEditCellProps)return;pe=ae({},pe,{isProcessingProps:!0}),N(q,Re,pe),fe=pa(t.current.state);const ke=fe[q],Ne=Tn(ke,[Re].map(rP)),ot=Promise.resolve(Be.preProcessEditCellProps({id:q,row:ee,props:pe,hasChanged:!1,otherFieldsProps:Ne})).then(ce=>{if(t.current.getRowMode(q)===ui.View){xe(!1);return}ce=ae({},ce,{isProcessingProps:!1}),N(q,Re,ce)});ve.push(ot)}),Promise.all(ve).then(()=>{t.current.getRowMode(q)===ui.Edit?(fe=pa(t.current.state),xe(!fe[q][J].error)):xe(!1)})})},[t,f,N]),k=C.useCallback(V=>{const q=pa(t.current.state),J=t.current.getRow(V);if(!q[V])return t.current.getRow(V);let Q=ae({},J);return Object.entries(q[V]).forEach(([se,oe])=>{const ie=t.current.getColumn(se);ie.valueSetter?Q=ie.valueSetter(oe.value,Q,ie,t):Q[se]=oe.value}),Q},[t]),U={getRowMode:_,startRowEditMode:M,stopRowEditMode:F},H={setRowEditingEditCellValue:D,getRowWithUpdatedValuesFromRowEditing:k};lr(t,U,"public"),lr(t,H,"private"),C.useEffect(()=>{u&&P(u)},[u,P]),Ol(()=>{const V=uh(t),q=i.current;i.current=vde(n);const J=new Set([...Object.keys(n),...Object.keys(q)]);Array.from(J).forEach(Q=>{const se=n[Q]??{mode:ui.View},oe=q[Q]?.mode||ui.View,ie=V[Q]?t.current.getRowId(V[Q]):Q;se.mode===ui.Edit&&oe===ui.View?L(ae({id:ie},se)):se.mode===ui.View&&oe===ui.Edit&&$(ae({id:ie},se))})},[t,n,L,$])},Zrt=t=>ae({},t,{editRows:{}}),Jrt=(t,e)=>{Yrt(t,e),Qrt(t,e);const n=C.useRef({}),{isCellEditable:r}=e,o=C.useCallback(h=>sx(h.rowNode)||!h.colDef.editable||!h.colDef.renderEditCell?!1:r?r(h):!0,[r]),i=(h,f,p,m)=>{if(!p){m();return}if(n.current[h]||(n.current[h]={}),n.current[h][f]){const[b]=n.current[h][f];clearTimeout(b)}const y=()=>{const[b]=n.current[h][f];clearTimeout(b),m(),delete n.current[h][f]},v=setTimeout(()=>{m(),delete n.current[h][f]},p);n.current[h][f]=[v,y]};C.useEffect(()=>{const h=n.current;return()=>
377{Object.entries(h).forEach(([f,p])=>{Object.keys(p).forEach(m=>{const[y]=h[f][m];clearTimeout(y),delete h[f][m]})})}},[]);const s=C.useCallback((h,f)=>{if(n.current[h]){if(!f)Object.keys(n.current[h]).forEach(p=>{const[,m]=n.current[h][p];m()});else if(n.current[h][f]){const[,p]=n.current[h][f];p()}}},[]),a=C.useCallback(h=>{const{id:f,field:p,debounceMs:m}=h;return new Promise(y=>{i(f,p,m,async()=>{const v=e.editMode===Gp.Row?t.current.setRowEditingEditCellValue:t.current.setCellEditingEditCellValue;if(t.current.getCellMode(f,p)===vo.Edit){const b=await v(h);y(b)}})})},[t,e.editMode]),l=C.useCallback((h,f)=>e.editMode===Gp.Cell?t.current.getRowWithUpdatedValuesFromCellEditing(h,f):t.current.getRowWithUpdatedValuesFromRowEditing(h),[t,e.editMode]),c=C.useCallback((h,f)=>pa(t.current.state)[h]?.[f]??null,[t]),u={isCellEditable:o,setEditCellValue:a,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},d={runPendingEditCellValueMutation:s};lr(t,u,"public"),lr(t,d,"private")},eot=(t,e,n)=>{const r=!!e.unstable_dataSource;return n.current.caches.rows=oD({rows:r?[]:e.rows,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),ae({},t,{rows:_de({apiRef:n,rowCountProp:e.rowCount,loadingProp:r?!0:e.loading,previousTree:null,previousTreeDepths:null})})},tot=(t,e)=>{const n=Ia(t,"useGridRows"),r=C.useRef(Date.now()),o=C.useRef(e.rowCount),i=cw(),s=C.useCallback(D=>{const k=uh(t)[D];if(k)return k;const U=t.current.getRowNode(D);return U&&sx(U)?{[ix]:D}:null},[t]),a=C.useCallback(D=>xR(t.current.state,D),[t]),l=C.useCallback(({cache:D,throttle:k})=>{const U=()=>{r.current=Date.now(),t.current.setState(V=>ae({},V,{rows:_de({apiRef:t,rowCountProp:e.rowCount,loadingProp:e.loading,previousTree:ma(t),previousTreeDepths:yQ(t),previousGroupsToFetch:UXe(t)})})),t.current.publishEvent("rowsSet"),t.current.forceUpdate()};if(i.clear(),t.current.caches.rows=D,!k){U();return}const H=e.throttleRowsMs-(Date.now()-r.current);if(H>0){i.start(H,U);return}U()},[e.throttleRowsMs,e.rowCount,e.loading,t,i]),c=C.useCallback(D=>{n.debug(`Updating all rows, new length ${D.length}`);const k=oD({rows:D,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),U=t.current.caches.rows;k.rowsBeforePartialUpdates=U.rowsBeforePartialUpdates,l({cache:k,throttle:!0})},[n,e.getRowId,e.loading,e.rowCount,l,t]),u=C.useCallback(D=>{if(e.signature===mh.DataGrid&&D.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` 378`));const k=IQ(t,D,e.getRowId),U=_Q({updates:k,getRowId:e.getRowId,previousCache:t.current.caches.rows});l({cache:U,throttle:!0})},[e.signature,e.getRowId,l,t]),d=C.useCallback((D,k)=>{const U=IQ(t,D,e.getRowId),H=_Q({updates:U,getRowId:e.getRowId,previousCache:t.current.caches.rows,groupKeys:k??[]});l({cache:H,throttle:!1})},[e.getRowId,l,t]),h=C.useCallback(D=>{D!==e.loading&&(n.debug(`Setting loading to ${D}`),t.current.setState(k=>ae({},k,{rows:ae({},k.rows,{loading:D})})),t.current.caches.rows.loadingPropBeforePartialUpdates=D)},[e.loading,t,n]),f=C.useCallback(()=>{const D=WT(t),k=uh(t);return new Map(D.map(U=>[U,k[U]??{}]))},[t]),p=C.useCallback(()=>bR(t),[t]),m=C.useCallback(()=>WT(t),[t]),y=C.useCallback(D=>{const k=t.current.getRow(D),{rowToIndexMap:U}=Tv(t);return U.get(k)},[t]),v=C.useCallback((D,k)=>{const U=t.current.getRowNode(D);if(!U)throw new Error(`MUI X: No row with id #${D} found.`);if(U.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const H=ae({},U,{childrenExpanded:k});t.current.setState(V=>ae({},V,{rows:ae({},V.rows,{tree:ae({},V.rows.tree,{[D]:H})})})),t.current.forceUpdate(),t.current.publishEvent("rowExpansionChange",H)},[t]),b=C.useCallback(D=>ma(t)[D]??null,[t]),S=C.useCallback(({skipAutoGeneratedRows:D=!0,groupId:k,applySorting:U,applyFiltering:H})=>{const V=ma(t);let q;if(U){const J=V[k];if(!J)return[];const Q=pw(t);q=[];const se=Q.findIndex(oe=>oe===k)+1;for(let oe=se;oe<Q.length&&V[Q[oe]].depth>J.depth;oe+=1){const ie=Q[oe];(!D||!sx(V[ie]))&&q.push(ie)}}else q=kj(V,k,D);if(H){const J=gw(t);q=q.filter(Q=>J[Q]!==!1)}return q},[t]),w=C.useCallback((D,k)=>{const U=t.current.getRowNode(D);if(!U)throw new Error(`MUI X: No row with id #${D} found.`);if(U.parent!==El)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(U.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");t.current.setState(H=>
378{const V=ma(H,t.current.instanceId)[El],q=V.children,J=q.findIndex(se=>se===D);if(J===-1||J===k)return H;n.debug(`Moving row ${D} to index ${k}`);const Q=[...q];return Q.splice(k,0,Q.splice(J,1)[0]),ae({},H,{rows:ae({},H.rows,{tree:ae({},H.rows.tree,{[El]:ae({},V,{children:Q})})})})}),t.current.publishEvent("rowsSet")},[t,n]),A=C.useCallback((D,k)=>{if(e.signature===mh.DataGrid&&k.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` 379`));if(k.length===0)return;if(oS(t)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const H=ae({},ma(t)),V=ae({},uh(t)),q=ae({},mQ(t)),J=H[El],Q=[...J.children],se=new Set;for(let ie=0;ie<k.length;ie+=1){const ee=k[ie],re=zF(ee,e.getRowId,"A row was provided without id when calling replaceRows()."),[fe]=Q.splice(D+ie,1,re);se.has(fe)||(delete V[fe],delete q[fe],delete H[fe]);const we={id:re,depth:0,parent:El,type:"leaf",groupingKey:null};V[re]=ee,q[re]=re,H[re]=we,se.add(re)}H[El]=ae({},J,{children:Q});const oe=Q.filter(ie=>H[ie]?.type==="leaf");
379t.current.caches.rows.dataRowIdToModelLookup=V,t.current.caches.rows.dataRowIdToIdLookup=q,t.current.setState(ie=>ae({},ie,{rows:ae({},ie.rows,{dataRowIdToModelLookup:V,dataRowIdToIdLookup:q,dataRowIds:oe,tree:H})})),t.current.publishEvent("rowsSet")},[t,e.signature,e.getRowId]),_={getRow:s,setLoading:h,getRowId:a,getRowModels:f,getRowsCount:p,getAllRowIds:m,setRows:c,updateRows:u,getRowNode:b,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:A},P={setRowIndex:w,setRowChildrenExpansion:v,getRowGroupChildren:S},R={updateServerRows:d},O=C.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let D;t.current.caches.rows.rowsBeforePartialUpdates===e.rows?D=ae({},t.current.caches.rows,{updates:{type:"full",rows:WT(t)}}):D=oD({rows:e.rows,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),l({cache:D,throttle:!1})},[n,t,e.rows,e.getRowId,e.loading,e.rowCount,l]),N=If(()=>e.unstable_dataSource),M=C.useCallback(D=>{if(e.unstable_dataSource&&e.unstable_dataSource!==N.current){N.current=e.unstable_dataSource;return}D==="rowTreeCreation"&&O()},[O,N,e.unstable_dataSource]),L=C.useCallback(()=>{t.current.getActiveStrategy("rowTree")!==zXe(t)&&O()},[t,O]);Qt(t,"activeStrategyProcessorChange",M),Qt(t,"strategyAvailabilityChange",L);const F=C.useCallback(()=>{t.current.setState(D=>{const k=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:ma(D,t.current.instanceId),treeDepths:yQ(D,t.current.instanceId),dataRowIds:WT(D,t.current.instanceId),dataRowIdToModelLo
379okup:uh(D,t.current.instanceId),dataRowIdToIdLookup:mQ(D,t.current.instanceId)});return ae({},D,{rows:ae({},D.rows,k,{totalTopLevelRowCount:Tde({tree:k.tree,rowCountProp:e.rowCount})})})}),t.current.publishEvent("rowsSet"),t.current.forceUpdate()},[t,e.rowCount]);Qj(t,"hydrateRows",F),lr(t,_,"public"),lr(t,P,e.signature===mh.DataGrid?"private":"public"),lr(t,R,"private");const $=C.useRef(!0);C.useEffect(()=>{if($.current){$.current=!1;return}let D=!1;e.rowCount!==o.current&&(D=!0,o.current=e.rowCount);const k=t.current.caches.rows.rowsBeforePartialUpdates===e.rows,U=t.current.caches.rows.loadingPropBeforePartialUpdates===e.loading,H=t.current.caches.rows.rowCountPropBeforePartialUpdates===e.rowCount;k&&(U||(t.current.setState(V=>ae({},V,{rows:ae({},V.rows,{loading:e.loading})})),t.current.caches.rows.loadingPropBeforePartialUpdates=e.loading,t.current.forceUpdate()),H||(t.current.setState(V=>ae({},V,{rows:ae({},V.rows,{totalRowCount:Math.max(e.rowCount||0,V.rows.totalRowCount),totalTopLevelRowCount:Math.max(e.rowCount||0,V.rows.totalTopLevelRowCount)})})),t.current.caches.rows.rowCountPropBeforePartialUpdates=e.rowCount,t.current.forceUpdate()),!D)||(n.debug(`Updating all rows, new length ${e.rows?.length}`),l({cache:oD({rows:e.rows,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),throttle:!1}))},[e.rows,e.rowCount,e.getRowId,e.loading,n,l,t])},not=t=>{const e={[El]:ae({},TKe(),{children:t})};for(let n=0;n<t.length;n+=1){const r=t[n];e[r]={id:r,depth:0,parent:El,type:"leaf",groupingKey:null}}return{groupingName:LC,tree:e,treeDepths:{0:t.length},dataRowIds:t}},rot=({previousTree:t,actions:e})=>{const n=ae({},t),r={};for(let s=0;s<e.remove.length;s+=1){const a=e.remove[s];r[a]=!0,delete n[a]}for(let s=0;s<e.insert.length;s+=1){const a=e.insert[s];n[a]={id:a,depth:0,parent:El,type:"leaf",groupingKey:null}}const o=n[El];let i=[...o.children,...e.insert];return Object.values(r).length&&(i=i.filter(s=>!r[s])),n[El]=ae({},o,{children:i}),{groupingName:LC,tree:n,treeDepths:{0:i.length},dataRowIds:i}},oot=t=>t.updates.type==="full"?not(t.updates.rows):rot({previousTree:t.previousTree,actions:t.updates.actions}),iot=t=>{u2(t,LC,"rowTreeCreation",oot)};class f5 extends Error{}function sot(t,e){const n=C.useCallback(p=>({field:p,colDef:t.current.getColumn(p)}),[t]),r=C.useCallback(p=>{const m=t.current.getRow(p);if(!m)throw new f5(`No row with id #${p} found`);return{id:p,columns:t.current.getAllColumns(),row:m}},[t]),o=C.useCallback((p,m,y,{cellMode:v,colDef:b,hasFocus:S,rowNode:w,tabIndex:A})=>{const _=y[m],P=b?.valueGetter?b.valueGetter(_,y,b,t):_,R={id:p,field:m,row:y,rowNode:w,colDef:b,cellMode:v,hasFocus:S,tabIndex:A,value:P,formattedValue:P,isEditable:!1,api:null};return b&&b.valueFormatter&&(R.formattedValue=b.valueFormatter(P,y,b,t)),R.isEditable=b&&t.current.isCellEditable(R),R},[t]),i=C.useCallback((p,m)=>{const y=t.current.getRow(p),v=t.current.getRowNode(p);if(!y||!v)throw new f5(`No row with id #${p} found`);const b=su(t),S=Uj(t),w=t.current.getCellMode(p,m);return t.current.getCellParamsForRow(p,m,y,{colDef:e.unstable_listView&&e.unstable_listColumn?.field===m?lx(t.current.state):t.current.getColumn(m),rowNode:v,hasFocus:b!==null&&b.field===m&&b.id===p,tabIndex:S&&S.field===m&&S.id===p?0:-1,cellMode:w})},[t,e.unstable_listView,e.unstable_listColumn?.field]),s=C.useCallback((p,m)=>{const y=t.current.getColumn(m),v=t.current.getRow(p);if(!v)throw new f5(`No row with id #${p} found`);return!y||!y.valueGetter?v[m]:y.valueGetter(v[y.field],v,y,t)},[t]),a=C.useCallback((p,m)=>{const y=m.field;if(!m||!m.valueGetter)return p[y];const v=p[m.field];return m.valueGetter(v,p,m,t)},[t]),l=C.useCallback((p,m)=>{const y=a(p,m);return!m||!m.valueFormatter?y:m.valueFormatter(y,p,m,t)},[t,a]),c=C.useCallback(p=>t.current.rootElementRef.current?uet(t.current.rootElementRef.current,p):null,[t]),u=C.useCallback(p=>t.current.rootElementRef.current?det(t.current.rootElementRef.current,p):null,[t]),d=C.useCallback((p,m)=>t.current.rootElementRef.current?het(t.current.rootElementRef.current,{id:p,field:m}):null,[t]),h={getCellValue:s,getCellParams:i,getCellElement:d,getRowValue:a,getRowFormattedValue:l,getRowParams:r,getRowElement:u,getColumnHeaderParams:n,getColumnHeaderElement:c},f={getCellParamsForRow:o};lr(t,h,"public"),lr(t,f,"private")}const Ihe=(t,e)=>t==null||Array.isArray(t)?t:e&&e[0]===t?e:[t],aot=(t,e)=>ae({},t,{rowSelection:e.rowSelection?Ihe(e.rowSelectionModel)??[]:[]}),lot=(t,e)=>{const n=Ia(t,"useGridSelection"),r=C.useCallback(D=>(...k)=>{e.rowSelection&&D(...k)},[e.rowSelection]),o=e.signature!==mh.DataGrid&&(e.rowSelectionPropagation?.parents||e.rowSelectionPropagation?.desce
379ndants),i=C.useMemo(()=>Ihe(e.rowSelectionModel,qd(t.current.state)),[t,e.rowSelectionModel]),s=C.useRef(null);t.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:e.onRowSelectionModelChange,stateSelector:qd,changeEvent:"rowSelectionChange"});const{checkboxSelection:a,disableRowSelectionOnClick:l,isRowSelectable:c}=e,u=Hj(e),d=St(t,ma),h=St(t,oS)>1,f=C.useCallback(D=>{let k=D;const U=s.current??D,H=t.current.isRowSelected(D);if(H){const V=S1(t),q=V.findIndex(Q=>Q===U),J=V.findIndex(Q=>Q===k);if(q===J)return;q>J?k=V[J+1]:k=V[J-1]}s.current=D,t.current.selectRowRange({startId:U,endId:k},!H)},[t]),p=C.useCallback(D=>{if(e.signature===mh.DataGrid&&!u&&Array.isArray(D)&&D.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` 380`));qd(t.current.state)!==D&&(n.debug("Setting selection model"),t.current.setState(U=>ae({},U,{rowSelection:e.rowSelection?D:[]})),t.current.forceUpdate())},[t,n,e.rowSelection,e.signature,u]),m=C.useCallback(D=>qd(t.current.state).includes(D),[t]),y=C.useCallback(D=>{if(e.rowSelection===!1||c&&!c(t.current.getRowParams(D)))return!1;const k=ma(t)[D];return!(k?.type==="footer"||k?.type==="pinnedRow")},[t,e.rowSelection,c]),v=C.useCallback(()=>KKe(t),[t]),b=C.useCallback((D,k=!0,U=!1)=>{if(t.current.isRowSelectable(D))if(s.current=D,U){n.debug(`Setting selection for row ${D}`);const H=[],V=q=>{H.push(q)};k&&(V(D),o&&kN(t,d,D,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,V)),t.current.setRowSelectionModel(H)}else{n.debug(`Toggling selection for row ${D}`);const H=qd(t.current.state),V=new Set(H);V.delete(D);const q=se=>{V.add(se)},J=se=>{V.delete(se)};k?(q(D),o&&kN(t,d,D,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,q)):o&&PQ(t,d,D,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,J),(V.size<2||u)&&t.current.setRowSelectionModel(Array.from(V))}},[t,n,o,d,e.rowSelectionPropagation?.descendants,e.rowSelectionPropagation?.parents,u]),S=C.useCallback((D,k=!0,U=!1)=>{n.debug("Setting selection for several rows");const H=D.filter(J=>t.current.isRowSelectable(J));let V;if(U){if(k){if(V=new Set(H),o){const Q=se=>{V.add(se)};H.forEach(se=>{kN(t,d,se,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,Q)})}}else V=new Set;const J=om(t);if(V.size===Object.keys(J).length&&Array.from(V).every(Q=>J[Q]===Q))return}else{V=new Set(Object.values(om(t)));const J=se=>{V.add(se)},Q=se=>{V.delete(se)};H.forEach(se=>{k?(V.add(se),o&&kN(t,d,se,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,J)):(Q(se),o&&PQ(t,d,se,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,Q))})}(V.size<2||u)&&t.current.setRowSelectionModel(Array.from(V))},[n,o,u,t,d,e.rowSelectionPropagation?.descendants,e.rowSelectionPropagation?.parents]),w=C.useCallback(({startId:D,endId:k},U=!0,H=!1)=>{if(!t.current.getRow(D)||!t.current.getRow(k))return;n.debug(`Expanding selection from row ${D} to row ${k}`);const V=S1(t),q=V.indexOf(D),J=V.indexOf(k),[Q,se]=q>J?[J,q]:[q,J],oe=V.slice(Q,se+1);t.current.selectRows(oe,U,H)},[t,n]),A={selectRow:b,setRowSelectionModel:p,getSelectedRows:v,isRowSelected:m,isRowSelectable:y},_={selectRows:S,selectRowRange:w};lr(t,A,"public"),lr(t,_,e.signature===mh.DataGrid?"private":"public");const P=C.useCallback((D=!1)=>{const k=qd(t.current.state),U=uh(t),H=gw(t),V=ae({},om(t)),q=se=>e.filterMode==="server"?!U[se]:!U[se]||H[se]===!1;let J=!1;k.forEach(se=>{if(q(se)){if(e.keepNonExistentRowsSelected)return;delete V[se],J=!0;return}if(!e.rowSelectionPropagation?.parents)return;const oe=d[se];if(oe.type==="group"){if(oe.isAutoGenerated){delete V[se],J=!0;return}oe.children.every(ee=>H[ee]===!1)||(delete V[se],J=!0)}});const Q=h&&e.rowSelectionPropagation?.parents&&Object.keys(V).length>0;if(J||Q&&!D){const se=Object.values(V);Q?t.current.selectRows(se,!0,!0):t.current.setRowSelectionModel(se)}},[t,h,e.rowSelectionPropagation?.parents,e.keepNonExistentRowsSelected,e.filterMode,d]),R=C.useCallback((D,k)=>{const U=k.metaKey||k.ctrlKey,H=!a&&!U&&!htt(k),V=!u||H,q=t.current.isRowSelected(D);V?t.current.selectRow(D,H?!0:!q,!0):t.current.selectRow(D,!q,!1)},[t,u,a]),O=C.useCallback((D,k)=>{if(l)return;const U=k.target.closest(`.${ye.cell}`)?.getAttribute("data-field");U===mw.field||U===VF||U&&t.current.getColumn(U)?.type===UF||ma(t)[D.id].type==="pinnedRow"||(k.shiftKey&&u?f(D.id):R(D.id,k))},[l,u,t,f,R]),N=C.useCallback((D,k)=>
380{u&&k.shiftKey&&window.getSelection()?.removeAllRanges()},[u]),M=C.useCallback((D,k)=>{u&&k.nativeEvent.shiftKey?f(D.id):t.current.selectRow(D.id,D.value,!u)},[t,f,u]),L=C.useCallback(D=>{const k=e.pagination&&e.checkboxSelectionVisibleOnly&&e.paginationMode==="client"?jde(t):S1(t);t.current.selectRows(k,D.value)},[t,e.checkboxSelectionVisibleOnly,e.pagination,e.paginationMode]),F=C.useCallback((D,k)=>{if(t.current.getCellMode(D.id,D.field)!==vo.Edit&&!_R(k)){if(a2(k.key)&&k.shiftKey){const U=su(t);if(U&&U.id!==D.id){k.preventDefault();const H=t.current.isRowSelected(U.id);if(!u){t.current.selectRow(U.id,!H,!0);return}const V=t.current.getRowIndexRelativeToVisibleRows(U.id),q=t.current.getRowIndexRelativeToVisibleRows(D.id);let J,Q;V>q?H?(J=q,Q=V-1):(J=q,Q=V):H?(J=V+1,Q=q):(J=V,Q=q);const oe=Tv(t).rows.slice(J,Q+1).map(ie=>ie.id);t.current.selectRows(oe,!H);return}}if(k.key===" "&&k.shiftKey){k.preventDefault(),R(D.id,k);return}String.fromCharCode(k.keyCode)==="A"&&(k.ctrlKey||k.metaKey)&&(k.preventDefault(),S(t.current.getAllRowIds(),!0))}},[t,R,S,u]);Qt(t,"sortedRowsSet",r(()=>P(!0))),Qt(t,"filteredRowsSet",r(P)),Qt(t,"rowClick",r(O)),Qt(t,"rowSelectionCheckboxChange",r(M)),Qt(t,"headerSelectionCheckboxChange",L),Qt(t,"cellMouseDown",r(N)),Qt(t,"cellKeyDown",r(F)),C.useEffect(()=>{i!==void 0&&t.current.setRowSelectionModel(i)},[t,i,e.rowSelection]),C.useEffect(()=>{e.rowSelection||t.current.setRowSelectionModel([])},[t,e.rowSelection]);const $=i!=null;C.useEffect(()=>{if($||!e.rowSelection)return;const D=qd(t.current.state);if(y){const k=D.filter(U=>y(U));k.length<D.length&&t.current.setRowSelectionModel(k)}},[t,y,$,e.rowSelection]),C.useEffect(()=>{if(!e.rowSelection||$)return;const D=qd(t.current.state);!u&&D.length>1&&t.current.setRowSelectionModel([])},[t,u,a,$,e.rowSelection]),C.useEffect(()=>{r(P)},[P,r])},cot=t=>{const{classes:e}=t;return C.useMemo(()=>Dr({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},Lr,e),[e])},uot=(t,e)=>{const n={classes:e.classes},r=cot(n),o=C.useCallback(i=>{const s=ae({},mw,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:t.current.getLocaleText("checkboxSelectionHeaderName")}),a=e.checkboxSelection,l=i.lookup[kg]!=null;return a&&!l?(i.lookup[kg]=s,i.orderedFields=[kg,...i.orderedFields]):!a&&l?(delete i.lookup[kg],i.orderedFields=i.orderedFields.filter(c=>c!==kg)):a&&l&&(i.lookup[kg]=ae({},s,i.lookup[kg])),i},[t,r,e.checkboxSelection]);Li(t,"hydrateColumns",o)},dot=(t,e)=>{const n=e.sortModel??e.initialState?.sorting?.sortModel??[];return ae({},t,{sorting:{sortModel:gde(n,e.disableMultipleColumnsSorting),sortedRows:[]}})},hot=(t,e)=>{const n=Ia(t,"useGridSorting");t.current.registerControlState({stateId:"sortModel",propModel:e.sortModel,propOnChange:e.onSortModelChange,stateSelector:Zh,changeEvent:"sortModelChange"});const r=C.useCallback((A,_)=>{const P=Zh(t),R=P.findIndex(N=>N.field===A);let O=[...P];return R>-1?_?.sort==null?O.splice(R,1):O.splice(R,1,_):O=[...P,_],O},[t]),o=C.useCallback((A,_)=>{const R=Zh(t).find(O=>O.field===A.field);if(R){const O=_===void 0?bQ(A.sortingOrder??e.sortingOrder,R.sort):_;return O===void 0?void 0:ae({},R,{sort:O})}return{field:A.field,sort:_===void 0?bQ(A.sortingOrder??e.sortingOrder):_}},[t,e.sortingOrder]),i=C.useCallback((A,_)=>_==null||_.sortable===!1||e.disableColumnSorting?A:(_.sortingOrder||e.sortingOrder).some(R=>!!R)?[...A,"columnMenuSortItem"]:A,[e.sortingOrder,e.disableColumnSorting]),s=C.useCallback(()=>{t.current.setState(A=>{if(e.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),ae({},A,{sorting:ae({},A.sorting,{sortedRows:kj(ma(t),El,!1)})});const _=Zh(A,t.current.instanceId),P=qXe(_,t),R=t.current.applyStrategyProcessor("sorting",{sortRowList:P});return ae({},A,{sorting:ae({},A.sorting,{sortedRows:R})})}),t.current.publishEvent("sortedRowsSet"),t.current.forceUpdate()},[t,n,e.sortingMode]),a=C.useCallback(A=>{Zh(t)!==A&&(n.debug("Setting sort model"),t.current.setState(vQ(A,e.disableMultipleColumnsSorting)),t.current.forceUpdate(),t.current.applySorting())},[t,n,e.disableMultipleColumnsSorting]),l=C.useCallback((A,_,P)=>{const R=t.current.getColumn(A),O=o(R,_);let N;!P||e.disableMultipleColumnsSorting?N=O?.sort==null?[]:[O]:N=r(R.field,O),t.current.setSortModel(N)},[t,r,o,e.disableMultipleColumnsSorting]),c=C.useCallback(()=>Zh(t),[t]),u=C.useCallback(()=>Fj(t).map(_=>_.model),[t]),d=C.useCallback(()=>pw(t),[t]),h=C.useCallback(A=>t.current.getSortedRowIds()[A],[t]);lr(t,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:h,setSortModel:a,sortColumn:l,applySorting:s},"public");const p=C.useCallback((A,_)=>{const P=Zh(t);return!_.exportOnlyDirtyModels||e.sortModel!=null||e.initialState?.sorting?.sortModel!=null||P.length>0?ae({},A,{sorting:{sortModel:P}}):A},[t,e.sortModel,e.initialState?.sorting?.sortModel]),m=C.useCallback((A,_)=>{const P=_.stateToRestore.sorting?.sortModel;return P==null?A:(t.current.setState(vQ(P,e.disableMultipleColumnsSorting)),ae({},A,{callbacks:[...A.callbacks,t.current.applySorting]}))},[t,e.disableMultipleColumnsSorting]),y=C.useCallback(A=>{const _=ma(t),P=_[El],R=A.sortRowList?A.sortRowList(P.children.map(O=>_[O])):[...P.children];return P.footerId!=null&&R.push(P.footerId),R},[t]);Li(t,"exportState",p),Li(t,"restoreState",m),u2(t,LC,"sorting",y);const v=C.useCallback(({field:A,colDef:_},P)=>
380{if(!_.sortable||e.disableColumnSorting)return;const R=P.shiftKey||P.metaKey||P.ctrlKey;l(A,void 0,R)},[l,e.disableColumnSorting]),b=C.useCallback(({field:A,colDef:_},P)=>{!_.sortable||e.disableColumnSorting||P.key==="Enter"&&!P.ctrlKey&&!P.metaKey&&l(A,void 0,P.shiftKey)},[l,e.disableColumnSorting]),S=C.useCallback(()=>{const A=Zh(t),_=Nm(t);if(A.length>0){const P=A.filter(R=>_[R.field]);P.length<A.length&&t.current.setSortModel(P)}},[t]),w=C.useCallback(A=>{A==="sorting"&&t.current.applySorting()},[t]);Li(t,"columnMenu",i),Qt(t,"columnHeaderClick",v),Qt(t,"columnHeaderKeyDown",b),Qt(t,"rowsSet",t.current.applySorting),Qt(t,"columnsChange",S),Qt(t,"activeStrategyProcessorChange",w),CR(()=>{t.current.applySorting()}),Ol(()=>{e.sortModel!==void 0&&t.current.setSortModel(e.sortModel)},[t,e.sortModel])};function uZ(t){const{containerSize:e,scrollPosition:n,elementSize:r,elementOffset:o}=t,i=o+r;if(r>e)return o;if(i-e>n)return i-e;if(o<n)return o}const fot=(t,e)=>{const n=ic(),r=Ia(t,"useGridScroll"),o=t.current.columnHeadersContainerRef,i=t.current.virtualScrollerRef,s=St(t,x0),a=C.useCallback(d=>{const h=qa(t.current.state),f=bR(t),p=e.unstable_listView?[lx(t.current.state)]:Qi(t);if(!(d.rowIndex==null)&&f===0||p.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let y={};if(d.colIndex!==void 0){const v=E0(t);let b;if(typeof d.rowIndex<"u"){const S=s[d.rowIndex]?.id,w=t.current.unstable_getCellColSpanInfo(S,d.colIndex);w&&!w.spannedByColSpan&&(b=w.cellProps.width)}typeof b>"u"&&(b=p[d.colIndex].computedWidth),y.left=uZ({containerSize:h.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:b,elementOffset:v[d.colIndex]})}if(d.rowIndex!==void 0){const v=AR(t.current.state),b=hQe(t),S=Gde(t),w=e.pagination?d.rowIndex-b*S:d.rowIndex,A=v.positions[w+1]?v.positions[w+1]-v.positions[w]:v.currentPageTotalHeight-v.positions[w];y.top=uZ({containerSize:h.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:A,elementOffset:v.positions[w]})}return y=t.current.unstable_applyPipeProcessors("scrollToIndexes",y,d),typeof y.left!==void 0||typeof y.top!==void 0?(t.current.scroll(y),!0):!1},[r,t,i,e.pagination,s,e.unstable_listView]),l=C.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const h=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=h*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=C.useCallback(()=>i?.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);lr(t,{scroll:l,scrollToIndexes:a,getScrollPosition:c},"public")};function pot(t,e){So(t,"columnHeaderClick",e.onColumnHeaderClick),So(t,"columnHeaderContextMenu",e.onColumnHeaderContextMenu),So(t,"columnHeaderDoubleClick",e.onColumnHeaderDoubleClick),So(t,"columnHeaderOver",e.onColumnHeaderOver),So(t,"columnHeaderOut",e.onColumnHeaderOut),So(t,"columnHeaderEnter",e.onColumnHeaderEnter),So(t,"columnHeaderLeave",e.onColumnHeaderLeave),So(t,"cellClick",e.onCellClick),So(t,"cellDoubleClick",e.onCellDoubleClick),So(t,"cellKeyDown",e.onCellKeyDown),So(t,"preferencePanelClose",e.onPreferencePanelClose),So(t,"preferencePanelOpen",e.onPreferencePanelOpen),So(t,"menuOpen",e.onMenuOpen),So(t,"menuClose",e.onMenuClose),So(t,"rowDoubleClick",e.onRowDoubleClick),So(t,"rowClick",e.onRowClick),So(t,"stateChange",e.onStateChange)}function got(t,e=166){let n,r;const o=()=>{n=void 0,t(...r)};function i(...s){r=s,n===void 0&&(n=setTimeout(o,e))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const C4={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Gp.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,indeterminateCheckboxAction:"deselect",keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resetPageOnSortFilter:!1,resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rowPositionsDebounceMs:166,rows:[],rowSelection:!0,rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,unstable_rowSpanning:!1,virtualizeColumnsWithAutoRowHeight:!1},IE={width:0,height:0},mot={isReady:!1,root:IE,viewportOuterSize:IE,viewportInnerSize:IE,contentSize:IE,minimumSize:IE,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},yot=(t,e,n)=>{const r=mot,o=uw(n);return ae({},t,{dimensions:ae({},r,Rhe(e,n,o,fw(n)))})},Phe=Dn(Qi,E0,(t,e)=>{const n=t.length;return n===0?0:e1(e[n-1]+t[n-1].computedWidth,1)});function vot(t,e){const n=Ia(t,"useResizeContainer"),r=C.useRef(!1),o=C.useRef(IE),i=St(t,fw),s=St(t,uw),a=St(t,Phe),l=C.useRef(!0),{rowHeight:c,headerHeight:u,groupHeaderHeight:d,headerFilterHeight:h,headersTotalHeight:f,leftPinnedWidth:p,rightPinnedWidth:m}=Rhe(e,t,s,i),y=C.useRef(void 0),v=C.useCallback(()=>qa(t.current.state),[t]),b=C.useCallback(L=>{t.current.setState(F=>ae({},F,{dimensions:L})),t.current.rootElementRef.current&&dZ(t.current.rootElementRef.current,qa(t.current.state))},[t]),S=C.useCallback(()=>{const L=t.current.mainElementRef.current;if(!L)return;const F=pXe(L).getComputedStyle(L),$={width:parseFloat(F.width)||0,height:parseFloat(F.height)||0};(!y.current||!fZ(y.current,$))&&(t.current.publishEvent("resize",$),y.current=$)},[t]),w=C.useCallback(()=>{const L=qa(t.current.state);if(!L.isReady)return 0;const F=Tv(t);if(e.getRowHeight){const D=TR(t),k=D.lastRowIndex-D.firstRowIndex;return Math.min(k-1,F.rows.length)}const $=Math.floor(L.viewportInnerSize.height/c);return Math.min($,F.rows.length)},[t,e.getRowHeight,c]),A=C.useCallback(()=>
380{if(l.current)return;const L=bot(t.current.mainElementRef.current,e.scrollbarSize),F=AR(t.current.state),$=f+F.pinnedTopRowsTotalHeight,D=F.pinnedBottomRowsTotalHeight,U={width:a-p-m,height:e1(F.currentPageTotalHeight,1)};let H,V,q=!1,J=!1;if(e.autoHeight)J=!1,q=Math.round(a)>Math.round(o.current.width),H={width:o.current.width,height:$+D+U.height},V={width:Math.max(0,H.width-(J?L:0)),height:Math.max(0,H.height-(q?L:0))};else{H={width:o.current.width,height:o.current.height},V={width:Math.max(0,H.width-p-m),height:Math.max(0,H.height-$-D)};const ee=U,re=V,fe=ee.width>re.width,we=ee.height>re.height;(fe||we)&&(J=we,q=ee.width+(J?L:0)>re.width,q&&(J=ee.height+L>re.height)),J&&(V.width-=L),q&&(V.height-=L)}const Q=Math.max(H.width,a+(J?L:0)),se={width:a,height:$+U.height+D},oe={isReady:!0,root:o.current,viewportOuterSize:H,viewportInnerSize:V,contentSize:U,minimumSize:se,hasScrollX:q,hasScrollY:J,scrollbarSize:L,headerHeight:u,groupHeaderHeight:d,headerFilterHeight:h,rowWidth:Q,rowHeight:c,columnsTotalWidth:a,leftPinnedWidth:p,rightPinnedWidth:m,headersTotalHeight:f,topContainerHeight:$,bottomContainerHeight:D},ie=t.current.state.dimensions;Av(ie,oe)||(b(oe),fZ(oe.viewportInnerSize,ie.viewportInnerSize)||t.current.publishEvent("viewportInnerSizeChange",oe.viewportInnerSize),t.current.updateRenderContext?.())},[t,b,e.scrollbarSize,e.autoHeight,c,u,d,h,a,f,p,m]),_=zi(A),P=C.useMemo(()=>e.resizeThrottleMs>0?got(()=>{_(),t.current.publishEvent("debouncedResize",o.current)},e.resizeThrottleMs):void 0,[t,e.resizeThrottleMs,_]);C.useEffect(()=>P?.clear,[P]);const R={resize:S,getRootDimensions:v},O={updateDimensions:A,getViewportPageSize:w};Ol(A,[A]),lr(t,R,"public"),lr(t,O,"private");const N=C.useCallback(L=>{dZ(L,qa(t.current.state))},[t]),M=C.useCallback(L=>{if(o.current=L,L.height===0&&!r.current&&!e.autoHeight&&!i2&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` 381`)),r.current=!0),L.width===0&&!r.current&&!i2&&(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` 382`)),r.current=!0),l.current||!P){l.current=!1,A();return}P()},[A,e.autoHeight,P,n]);So(t,"rootMount",N),So(t,"resize",M),So(t,"debouncedResize",e.onResize)}function dZ(t,e){const n=(r,o)=>t.style.setProperty(r,o);n("--DataGrid-hasScrollX",`${Number(e.hasScrollX)}`),n("--DataGrid-hasScrollY",`${Number(e.hasScrollY)}`),n("--DataGrid-scrollbarSize",`${e.scrollbarSize}px`),n("--DataGrid-rowWidth",`${e.rowWidth}px`),n("--DataGrid-columnsTotalWidth",`${e.columnsTotalWidth}px`),n("--DataGrid-leftPinnedWidth",`${e.leftPinnedWidth}px`),n("--DataGrid-rightPinnedWidth",`${e.rightPinnedWidth}px`),n("--DataGrid-headerHeight",`${e.headerHeight}px`),n("--DataGrid-headersTotalHeight",`${e.headersTotalHeight}px`),n("--DataGrid-topContainerHeight",`${e.topContainerHeight}px`),n("--DataGrid-bottomContainerHeight",`${e.bottomContainerHeight}px`),n("--height",`${e.rowHeight}px`)}function Rhe(t,e,n,r){const o=Pde(t.rowHeight,C4.rowHeight);return{rowHeight:Math.floor(o*n),headerHeight:Math.floor(t.columnHeaderHeight*n),groupHeaderHeight:Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*n),headerFilterHeight:Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*n),columnsTotalWidth:Phe(e),headersTotalHeight:Gj(e,t),leftPinnedWidth:r.left.reduce((i,s)=>i+s.computedWidth,0),rightPinnedWidth:r.right.reduce((i,s)=>i+s.computedWidth,0)}}const hZ=new WeakMap;function bot(t,e){if(e!==void 0)return e;if(t===null)return 0;const n=hZ.get(t);if(n!==void 0)return n;const o=wv(t).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",t.appendChild(o);const i=o.offsetWidth-o.clientWidth;return t.removeChild(o),hZ.set(t,i),i}function fZ(t,e){return t.width===e.width&&t.height===e.height}const Cot=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},Sot=(t,e,n)=>{n.current.caches.rowsMeta={heights:new Map};const r=Pj(n.current.state),o=bR(n),i=SR(n.current.state),s=Math.min(i.enabled?i.paginationModel.pageSize:o,o);return ae({},t,{rowsMeta:{currentPageTotalHeight:s*r,positions:Array.from({length:s},(a,l)=>l*r),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})},Eot=(t,e)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=e,i=t.current.caches.rowsMeta.heights,s=C.useRef(-1),a=C.useRef(!1),l=C.useRef(!1),c=St(t,uw),u=jj(t),d=St(t,dw),h=St(t,Pj),f=N=>{let M=i.get(N);return M===void 0&&(M={content:h,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(N,M)),M},p=C.useCallback(N=>{const M=qa(t.current.state).rowHeight,L=t.current.getRowHeightEntry(N.id);if(!n)L.content=M,L.needsFirstMeasurement=!1;else{const F=n(ae({},N,{densityFactor:c}));if(F==="auto"){if(L.needsFirstMeasurement){const $=o?o(ae({},N,{densityFactor:c})):M;L.content=$??M}a.current=!0,L.autoHeight=!0}else L.content=Pde(F,M),L.needsFirstMeasurement=!1,L.autoHeight=!1}if(r){const F=t.current.getRowIndexRelativeToVisibleRows(N.id),$=r(ae({},N,{isFirstVisible:F===0,isLastVisible:F===u.rows.length-1,indexRelativeToCurrentPage:F}));L.spacingTop=$.top??0,L.spacingBottom=$.bottom??0}else L.spacingTop=0,L.spacingBottom=0;return t.current.unstable_applyPipeProcessors("rowHeight",L,N),L},[t,u.rows,n,o,h,r,c]),m=C.useCallback(()=>{a.current=!1;const N=d.top.reduce((k,U)=>{const H=p(U);return k+H.content+H.spacingTop+H.spacingBottom+H.detail},0),M=d.bottom.reduce((k,U)=>{const H=p(U);return k+H.content+H.spacingTop+H.spacingBottom+H.detail},0),L=[],F=u.rows.reduce((k,U)=>{L.push(k);const H=p(U),V=H.content+H.spacingTop+H.spacingBottom+H.detail;return k+V},0);a.current||(s.current=1/0);const $=N!==t.current.state.rowsMeta.pinnedTopRowsTotalHeight||M!==t.current.state.rowsMeta.pinnedBottomRowsTotalHeight||F!==t.current.state.rowsMeta.currentPageTotalHeight,D={currentPageTotalHeight:F,positions:L,pinnedTopRowsTotalHeight:N,pinnedBottomRowsTotalHeight:M};t.current.setState(k=>ae({},k,{rowsMeta:D})),$&&t.current.updateDimensions(),l.current=!0},[t,d,u.rows,p]),y=N=>i.get(N)?.content??h,v=(N,M)=>{const L=t.current.getRowHeightEntry(N),F=L.content!==M;
382L.needsFirstMeasurement=!1,L.content=M,l.current&&=!F},b=N=>i.get(N)?.autoHeight??!1,S=()=>s.current,w=N=>{a.current&&N>s.current&&(s.current=N)},A=()=>{i.clear(),m()},_=If(()=>new Cot(N=>{for(let M=0;M<N.length;M+=1){const L=N[M],F=L.borderBoxSize&&L.borderBoxSize.length>0?L.borderBoxSize[0].blockSize:L.contentRect.height,$=L.target.__mui_id;t.current.unstable_storeRowHeightMeasurement($,F)}l.current||t.current.requestPipeProcessorsApplication("rowHeight")})).current,P=(N,M)=>(N.__mui_id=M,_.observe(N),()=>_.unobserve(N));Qj(t,"rowHeight",m),Ol(()=>{m()},[m]);const R={unstable_getRowHeight:y,unstable_setLastMeasuredRowIndex:w,unstable_storeRowHeightMeasurement:v,resetRowHeights:A},O={hydrateRowsMeta:m,observeRowHeight:P,rowHasAutoHeight:b,getRowHeightEntry:f,getLastMeasuredRowIndex:S};lr(t,R,"public"),lr(t,O,"private")},xot=t=>{const e=C.useCallback((o={})=>t.current.unstable_applyPipeProcessors("exportState",{},o),[t]),n=C.useCallback(o=>{t.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(s=>{s()}),t.current.forceUpdate()},[t]);lr(t,{exportState:e,restoreState:n},"public")},wot=t=>{const e=C.useRef({}),n=(a,l)=>e.current[a]?.[l],r=()=>{e.current={}},o=C.useCallback(({rowId:a,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let d=l;d<c;d+=1){const h=Aot({apiRef:t,lookup:e.current,columnIndex:d,rowId:a,minFirstColumnIndex:l,maxLastColumnIndex:c,columns:u});h.colSpan>1&&(d+=h.colSpan-1)}},[t]),i={unstable_getCellColSpanInfo:n},s={resetColSpan:r,calculateColSpan:o};lr(t,i,"public"),lr(t,s,"private"),Qt(t,"columnOrderChange",r)};function Aot(t){const{apiRef:e,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:s,columns:a}=t,l=a.length,c=a[r],u=e.current.getRow(o),d=e.current.getRowValue(u,c),h=typeof c.colSpan=="function"?c.colSpan(d,u,c,e):c.colSpan;if(!h||h===1)return p5(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let f=c.computedWidth;for(let p=1;p<h;p+=1){const m=r+p;if(m>=i&&m<s){const y=a[m];f+=y.computedWidth,p5(n,o,r+p,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(r+h,l-1),leftVisibleCellIndex:r})}p5(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:h,width:f}})}return{colSpan:h}}function p5(t,e,n,r){t[e]||(t[e]={}),t[e][n]=r}const Ohe=(t,e,n)=>{if(Cde(t)){if(n[t.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${t.field} occurs two times in the grouping model:`,`- ${n[t.field].join(" > ")}`,`- ${e.join(" > ")}`].join(` 383`));n[t.field]=e;return}const{groupId:r,children:o}=t;o.forEach(i=>{Ohe(i,[...e,r],n)})},S4=t=>{if(!t)return{};const e={};return t.forEach(n=>{Ohe(n,[],e)}),e},E4=(t,e,n)=>{const r=l=>e[l]??[],o=[],i=Math.max(...t.map(l=>r(l).length)),s=(l,c,u)=>Av(r(l).slice(0,u+1),r(c).slice(0,u+1)),a=(l,c)=>!!(n?.left&&n.left.includes(l)&&!n.left.includes(c)||n?.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l<i;l+=1){const c=t.reduce((u,d)=>{const h=r(d)[l]??null;if(u.length===0)return[{columnFields:[d],groupId:h}];const f=u[u.length-1],p=f.columnFields[f.columnFields.length-1];return f.groupId!==h||!s(p,d,l)||a(p,d)?[...u,{columnFields:[d],groupId:h}]:[...u.slice(0,u.length-1),{columnFields:[...f.columnFields,d],groupId:h}]},[]);o.push(c)}return o},Tot=["groupId","children"],Zj=t=>{let e={};return t.forEach(n=>{if(Cde(n))return;const{groupId:r,children:o}=n,i=Tn(n,Tot);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const s=ae({},i,{groupId:r}),a=Zj(o);if(a[r]!==void 0||e[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);e=ae({},e,a,{[r]:s})}),ae({},e)},_ot=(t,e,n)=>{if(!e.columnGroupingModel)return t;const r=rm(n),o=hw(n),i=Zj(e.columnGroupingModel??[]),s=S4(e.columnGroupingModel??[]),a=E4(r,s,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>s[c]?.length??0));return ae({},t,{columnGrouping:{lookup:i,unwrappedGroupingModel:s,headerStructure:a,maxDepth:l}})},Iot=(t,e)=>{const n=C.useCallback(a=>Kde(t)[a]??[],[t]),r=C.useCallback(()=>Qde(t),[t]);
383lr(t,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=C.useCallback(()=>{const a=S4(e.columnGroupingModel??[]);t.current.setState(l=>{const c=l.columns?.orderedFields??[],u=l.pinnedColumns??{},d=E4(c,a,u);return ae({},l,{columnGrouping:ae({},l.columnGrouping,{headerStructure:d})})})},[t,e.columnGroupingModel]),s=C.useCallback(a=>{const l=t.current.getPinnedColumns?.()??{},c=rm(t),u=hw(t),d=Zj(a??[]),h=S4(a??[]),f=E4(c,h,l),p=u.length===0?0:Math.max(...u.map(m=>h[m]?.length??0));t.current.setState(m=>ae({},m,{columnGrouping:{lookup:d,unwrappedGroupingModel:h,headerStructure:f,maxDepth:p}}))},[t]);Qt(t,"columnIndexChange",i),Qt(t,"columnsChange",()=>{s(e.columnGroupingModel)}),Qt(t,"columnVisibilityModelChange",()=>{s(e.columnGroupingModel)}),C.useEffect(()=>{s(e.columnGroupingModel)},[s,e.columnGroupingModel])};function Pot(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function pZ(t,e){if(e!==void 0&&t.changedTouches){for(let n=0;n<t.changedTouches.length;n+=1){const r=t.changedTouches[n];if(r.identifier===e)return{x:r.clientX,y:r.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function gZ(t,e,n,r){let o=t;return r==="Right"?o+=e-n.left:o+=n.right-e,o}function Rot(t,e,n){return n==="Left"?t-e.left:e.right-t}function Oot(t){return t==="Right"?"Left":"Right"}function Not(t,e){const n=t.classList.contains(ye["columnSeparator--sideRight"])?"Right":"Left";return e?Oot(n):n}function mZ(t){t.preventDefault(),t.stopImmediatePropagation()}function Mot(t){const e=C.useRef(void 0),n=()=>rhe(t),r=St(t,n);return C.useEffect(()=>{e.current&&r===!1&&(e.current.resolve(),e.current=void 0)}),()=>{if(!e.current){if(n()===!1)return Promise.resolve();e.current=Pot()}return e.current}}function Dot(t,e){if(t.length<4)return t;const n=t.slice();n.sort((a,l)=>a-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,s=i<5?5:i*e;return n.filter(a=>a>r-s&&a<o+s)}function Lot(t,e,n){const r={},o=t.current.rootElementRef.current;return o.classList.add(ye.autosizing),n.forEach(i=>{const a=wet(t.current,i.field).map(p=>p.getBoundingClientRect().width??0),l=e.includeOutliers?a:Dot(a,e.outliersFactor);if(e.includeHeaders){const p=xet(t.current,i.field);if(p){const m=p.querySelector(`.${ye.columnHeaderTitle}`),y=p.querySelector(`.${ye.columnHeaderTitleContainerContent}`),v=p.querySelector(`.${ye.iconButtonContainer}`),b=p.querySelector(`.${ye.menuIcon}`),S=m??y,w=window.getComputedStyle(p,null),A=parseInt(w.paddingLeft,10)+parseInt(w.paddingRight,10),P=S.scrollWidth+1+A+(v?.clientWidth??0)+(b?.clientWidth??0);l.push(P)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,d=c?i.minWidth:0,h=u?i.maxWidth:1/0,f=l.length===0?0:Math.max(...l);r[i.field]=nd(f,d,h)}),o.classList.remove(ye.autosizing),r}const kot=t=>ae({},t,{columnResize:{resizingColumnField:""}});function Fot(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const Bot=(t,e)=>{const n=ic(),r=Ia(t,"useGridColumnResize"),o=If(Fot).current,i=C.useRef(null),s=C.useRef(null),a=cw(),l=C.useRef(void 0),c=O=>{r.debug(`Updating width to ${O} for col ${o.colDef.field}`);const N=o.columnHeaderElement.offsetWidth,M=O-N,L=O-o.initialColWidth;if(L>0){const D=o.initialTotalWidth+L;t.current.rootElementRef?.current?.style.setProperty("--DataGrid-rowWidth",`${D}px`)}o.colDef.computedWidth=O,o.colDef.width=O,o.colDef.flex=0,o.columnHeaderElement.style.width=`${O}px`;const F=o.headerFilterElement;F&&(F.style.width=`${O}px`),o.groupHeaderElements.forEach(D=>{const k=D;let U;k.getAttribute("aria-colspan")==="1"?U=`${O}px`:U=`${k.offsetWidth+M}px`,k.style.width=U}),o.cellElements.forEach(D=>{const k=D;let U;k.getAttribute("aria-colspan")==="1"?U=`${O}px`:U=`${k.offsetWidth+M}px`,k.style.setProperty("--width",U)});const $=t.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);$===Fy.LEFT&&(gE(o.fillerLeft,"width",M),o.leftPinnedCellsAfter.forEach(D=>{gE(D,"left",M)}),o.leftPinnedHeadersAfter.forEach(D=>{gE(D,"left",M)})),$===Fy.RIGHT&&(gE(o.fillerRight,"width",M),o.rightPinnedCellsBefore.forEach(D=>{gE(D,"right",M)}),o.rightPinnedHeadersBefore.forEach(D=>{gE(D,"right",M)}))},u=O=>{if(v(),o.previousMouseClickEvent){const N=o.previousMouseClickEvent,M=N.timeStamp,L=N.clientX,F=N.clientY;if(O.timeStamp-M<300&&O.clientX===L&&O.clientY===F){o.previousMouseClickEvent=void 0,t.current.publishEvent("columnResizeStop",null,O);return}}if(o.colDef){t.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Upd
383ating col ${o.colDef.field} with new width: ${o.colDef.width}`);const N=Np(t.current.state);o.groupHeaderElements.forEach(M=>{const L=get(M),F=M,D=`${L.reduce((k,U)=>N.columnVisibilityModel[U]!==!1?k+N.lookup[U].computedWidth:k,0)}px`;F.style.width=D})}a.start(0,()=>{t.current.publishEvent("columnResizeStop",null,O)})},d=(O,N,M)=>{const L=t.current.rootElementRef.current;o.initialColWidth=O.computedWidth,o.initialTotalWidth=t.current.getRootDimensions().rowWidth,o.colDef=O,o.columnHeaderElement=pet(t.current.columnHeadersContainerRef.current,O.field);const F=L.querySelector(`.${ye.headerFilterRow} [data-field="${Mm(O.field)}"]`);F&&(o.headerFilterElement=F),o.groupHeaderElements=met(t.current.columnHeadersContainerRef?.current,O.field),o.cellElements=yet(o.columnHeaderElement,t.current),o.fillerLeft=GQ(t.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=GQ(t.current,n?"filler--pinnedLeft":"filler--pinnedRight");const $=t.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=$!==Fy.LEFT?[]:vet(t.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=$!==Fy.RIGHT?[]:bet(t.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=$!==Fy.LEFT?[]:Cet(t.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=$!==Fy.RIGHT?[]:Eet(t.current,o.columnHeaderElement,n),s.current=Not(N,n),i.current=Rot(M,o.columnHeaderElement.getBoundingClientRect(),s.current)},h=zi(u),f=zi(O=>{if(O.buttons===0){h(O);return}let N=gZ(i.current,O.clientX,o.columnHeaderElement.getBoundingClientRect(),s.current);N=nd(N,o.colDef.minWidth,o.colDef.maxWidth),c(N);const M={element:o.columnHeaderElement,colDef:o.colDef,width:N};t.current.publishEvent("columnResize",M,O)}),p=zi(O=>{pZ(O,l.current)&&u(O)}),m=zi(O=>{const N=pZ(O,l.current);if(!N)return;if(O.type==="mousemove"&&O.buttons===0){p(O);return}let M=gZ(i.current,N.x,o.columnHeaderElement.getBoundingClientRect(),s.current);M=nd(M,o.colDef.minWidth,o.colDef.maxWidth),c(M);const L={element:o.columnHeaderElement,colDef:o.colDef,width:M};t.current.publishEvent("columnResize",L,O)}),y=zi(O=>{const N=s2(O.target,ye["columnSeparator--resizable"]);if(!N)return;const M=O.changedTouches[0];M!=null&&(l.current=M.identifier);const L=s2(O.target,ye.columnHeader),F=fet(L),$=t.current.getColumn(F);r.debug(`Start Resize on col ${$.field}`),t.current.publishEvent("columnResizeStart",{field:F},O),d($,N,M.clientX);const D=wv(O.currentTarget);D.addEventListener("touchmove",m),D.addEventListener("touchend",p)}),v=C.useCallback(()=>{const O=wv(t.current.rootElementRef.current);O.body.style.removeProperty("cursor"),O.removeEventListener("mousemove",f),O.removeEventListener("mouseup",h),O.removeEventListener("touchmove",m),O.removeEventListener("touchend",p),setTimeout(()=>{O.removeEventListener("click",mZ,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[t,o,f,h,m,p]),b=C.useCallback(({field:O})=>{t.current.setState(N=>ae({},N,{columnResize:ae({},N.columnResize,{resizingColumnField:O})})),t.current.forceUpdate()},[t]),S=C.useCallback(()=>{t.current.setState(O=>ae({},O,{columnResize:ae({},O.columnResize,{resizingColumnField:""})})),t.current.forceUpdate()},[t]),w=zi(({colDef:O},N)=>{if(N.button!==0||!N.currentTarget.classList.contains(ye["columnSeparator--resizable"]))return;N.preventDefault(),r.debug(`Start Resize on col ${O.field}`),t.current.publishEvent("columnResizeStart",{field:O.field},N),d(O,N.currentTarget,N.clientX);const M=wv(t.current.rootElementRef.current);M.body.style.cursor="col-resize",o.previousMouseClickEvent=N.nativeEvent,M.addEventListener("mousemove",f),M.addEventListener("mouseup",h),M.addEventListener("click",mZ,!0)}),A=zi((O,N)=>{if(e.disableAutosize||N.button!==0)return;const M=t.current.state.columns.lookup[O.field];M.resizable!==!1&&t.current.autosizeColumns(ae({},e.autosizeOptions,{disableColumnVirtualization:!1,columns:[M.field]}))}),_=Mot(t),P=C.useRef(!1),R=C.useCallback(async O=>{if(!t.current.rootElementRef?.current||P.current)return;P.current=!0;const M=Np(t.current.state),L=ae({},iJe,O,{columns:O?.columns??M.orderedFields});L.columns=L.columns.filter($=>
383M.columnVisibilityModel[$]!==!1);const F=L.columns.map($=>t.current.state.columns.lookup[$]);try{!e.disableVirtualization&&L.disableColumnVirtualization&&(t.current.unstable_setColumnVirtualization(!1),await _());const $=Lot(t,L,F),D=F.map(k=>ae({},k,{width:$[k.field],computedWidth:$[k.field],flex:0}));if(L.expand){const U=M.orderedFields.map(J=>M.lookup[J]).filter(J=>M.columnVisibilityModel[J.field]!==!1).reduce((J,Q)=>J+($[Q.field]??Q.computedWidth??Q.width),0),q=t.current.getRootDimensions().viewportInnerSize.width-U;if(q>0){const J=q/(D.length||1);D.forEach(Q=>{Q.width+=J,Q.computedWidth+=J})}}t.current.updateColumns(D),D.forEach((k,U)=>{if(k.width!==F[U].width){const H=k.width;t.current.publishEvent("columnWidthChange",{element:t.current.getColumnHeaderElement(k.field),colDef:k,width:H})}})}finally{e.disableVirtualization||t.current.unstable_setColumnVirtualization(!0),P.current=!1}},[t,_,e.disableVirtualization]);C.useEffect(()=>v,[v]),Rj(()=>{e.autosizeOnMount&&Promise.resolve().then(()=>{t.current.autosizeColumns(e.autosizeOptions)})}),$de(t,()=>t.current.columnHeadersContainerRef?.current,"touchstart",y,{passive:!0}),lr(t,{autosizeColumns:R},"public"),Qt(t,"columnResizeStop",S),Qt(t,"columnResizeStart",b),Qt(t,"columnSeparatorMouseDown",w),Qt(t,"columnSeparatorDoubleClick",A),So(t,"columnResize",e.onColumnResize),So(t,"columnWidthChange",e.onColumnWidthChange)};function gE(t,e,n){t&&(t.style[e]=`${parseInt(t.style[e],10)+n}px`)}function $ot(t,e){return t.firstRowIndex>=e.firstRowIndex&&t.lastRowIndex<=e.lastRowIndex?null:t.firstRowIndex>=e.firstRowIndex&&t.lastRowIndex>e.lastRowIndex?{firstRowIndex:e.lastRowIndex,lastRowIndex:t.lastRowIndex}:t.firstRowIndex<e.firstRowIndex&&t.lastRowIndex<=e.lastRowIndex?{firstRowIndex:t.firstRowIndex,lastRowIndex:e.firstRowIndex-1}:t}function yZ(t){return t.firstRowIndex!==0||t.lastRowIndex!==0}const g5=(t,e,n)=>{if(!t)return null;let r=t[e.field];const o=e.rowSpanValueGetter??e.valueGetter;return o&&(r=o(r,t,e,n)),r},t1={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},d2={firstRowIndex:0,lastRowIndex:0},Hot=new Set([kg,"__reorder__",VF]),vZ=20,Nhe=(t,e,n,r,o,i,s)=>{const a=i?{}:ae({},t.current.state.rowSpanning.spannedCells),l=i?{}:ae({},t.current.state.rowSpanning.hiddenCells),c=i?{}:ae({},t.current.state.rowSpanning.hiddenCellOriginMap);return i&&(s=d2),e.forEach(u=>{if(!Hot.has(u.field)){for(let d=o.firstRowIndex;d<o.lastRowIndex;d+=1){const h=n[d];if(l[h.id]?.[u.field])continue;const f=g5(h.model,u,t);if(f==null)continue;let p=h.id,m=d,y=0;const v=[];if(d===o.firstRowIndex){let S=d-1,w=n[S];for(;S>=r.firstRowIndex&&w&&g5(w.model,u,t)===f;){const A=n[S+1];l[A.id]?l[A.id][u.field]=!0:l[A.id]={[u.field]:!0},v.push(d),y+=1,p=w.id,m=S,S-=1,w=n[S]}}v.forEach(S=>{c[S]?c[S][u.field]=m:c[S]={[u.field]:m}});let b=d+1;for(;b<=r.lastRowIndex&&n[b]&&g5(n[b].model,u,t)===f;){const S=n[b];l[S.id]?l[S.id][u.field]=!0:l[S.id]={[u.field]:!0},c[b]?c[b][u.field]=m:c[b]={[u.field]:m},b+=1,y+=1}y>0&&(a[p]?a[p][u.field]=y+1:a[p]={[u.field]:y+1})}s={firstRowIndex:Math.min(s.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(s.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:a,hiddenCells:l,hiddenCellOriginMap:c,processedRange:s}},Mhe=(t,e)=>{const n=WT(e).length;if(t.pagination){const r=Gde(e);let o=vZ;return r>0&&(o=r-1),{firstRowIndex:0,lastRowIndex:Math.min(o,n)}}return{firstRowIndex:0,lastRowIndex:Math.min(vZ,n)}},Uot=(t,e,n)=>{if(!e.unstable_rowSpanning)return ae({},t,{rowSpanning:t1});const r=t.rows.dataRowIds||[],o=t.columns.orderedFields||[],i=t.rows.dataRowIdToModelLo
383okup,s=t.columns.lookup,a=!!t.filter.filterModel.items.length||!!t.filter.filterModel.quickFilterValues?.length;if(!r.length||!o.length||!i||!s||a)return ae({},t,{rowSpanning:t1});const l=Mhe(e,n),c=r.map(p=>({id:p,model:i[p]})),u=o.map(p=>s[p]),{spannedCells:d,hiddenCells:h,hiddenCellOriginMap:f}=Nhe(n,u,c,l,l,!0,d2);return ae({},t,{rowSpanning:{spannedCells:d,hiddenCells:h,hiddenCellOriginMap:f}})},zot=(t,e)=>{const n=If(()=>t.current.state.rowSpanning!==t1?Mhe(e,t):d2),r=C.useCallback((i,s=!1)=>{const{range:a,rows:l}=Tv(t,{pagination:e.pagination,paginationMode:e.paginationMode});if(a===null||!yZ(i))return;s&&(n.current=d2);const c=$ot({firstRowIndex:i.firstRowIndex,lastRowIndex:Math.min(i.lastRowIndex,a.lastRowIndex+1)},n.current);if(c===null)return;const u=Qi(t),{spannedCells:d,hiddenCells:h,hiddenCellOriginMap:f,processedRange:p}=Nhe(t,u,l,a,c,s,n.current);n.current=p;const m=Object.keys(d).length,y=Object.keys(h).length,v=Object.keys(t.current.state.rowSpanning.spannedCells).length,b=Object.keys(t.current.state.rowSpanning.hiddenCells).length;!(s||m!==v||y!==b)||m===0&&v===0||t.current.setState(A=>ae({},A,{rowSpanning:{spannedCells:d,hiddenCells:h,hiddenCellOriginMap:f}}))},[t,n,e.pagination,e.paginationMode]),o=C.useCallback(()=>{const i=TR(t);yZ(i)&&r(i,!0)},[t,r]);Qt(t,"renderedRowsIntervalChange",Ob(e.unstable_rowSpanning,r)),Qt(t,"sortedRowsSet",Ob(e.unstable_rowSpanning,o)),Qt(t,"paginationModelChange",Ob(e.unstable_rowSpanning,o)),Qt(t,"filteredRowsSet",Ob(e.unstable_rowSpanning,o)),Qt(t,"columnsChange",Ob(e.unstable_rowSpanning,o)),C.useEffect(()=>{e.unstable_rowSpanning?t.current.state.rowSpanning===t1&&o():t.current.state.rowSpanning!==t1&&t.current.setState(i=>ae({},i,{rowSpanning:t1}))},[t,o,e.unstable_rowSpanning])},Vot=(t,e,n)=>ae({},t,{listViewColumn:e.unstable_listColumn?ae({},e.unstable_listColumn,{computedWidth:x4(n)}):void 0});function Got(t,e){const n=()=>{t.current.setState(i=>i.listViewColumn?ae({},i,{listViewColumn:ae({},i.listViewColumn,{computedWidth:x4(t)})}):i)},r=C.useRef(null);Qt(t,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),Qt(t,"columnVisibilityModelChange",n),Ol(()=>{const i=e.unstable_listColumn;i&&t.current.setState(s=>ae({},s,{listViewColumn:ae({},i,{computedWidth:x4(t)})}))},[t,e.unstable_listColumn]),C.useEffect(()=>{e.unstable_listView&&e.unstable_listColumn},[e.unstable_listView,e.unstable_listColumn])}function x4(t){return qa(t.current.state).viewportInnerSize.width}const Wot=(t,e)=>{const n=frt(t,e);return uot(n,e),iot(n),la(drt,n,e),la(aot,n,e),la(Srt,n,e),la(eot,n,e),la(zrt,n,e),la(Zrt,n,e),la(Lrt,n,e),la(dot,n,e),la(Grt,n,e),la(Ort,n,e),la(Uot,n,e),la(xrt,n,e),la(kot,n,e),la(brt,n,e),la(_ot,n,e),la(gZe,n,e),la(yot,n,e),la(Sot,n,e),la(Vot,n,e),$rt(n,e),lot(n,e),Ert(n,e),tot(n,e),zot(n,e),sot(n,e),wot(n),Iot(n,e),Jrt(n,e),krt(n,e),Wrt(n,e),Drt(n,e),hot(n,e),wrt(n,e),Bot(n,e),Vrt(n,e),Eot(n,e),fot(n,e),Crt(n),Trt(n,e),Rrt(n,e),vrt(n,e),vot(n,e),pot(n,e),xot(n),mZe(n,e),Got(n,e),n},jot=t=>{const{classes:e,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:s,groupId:a,pinnedPosition:l}=t,c={root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",s&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",a===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===Tr.LEFT&&"columnHeader--pinnedLeft",l===Tr.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Dr(c,Lr,e)};function qot(t){const{groupId:e,width:n,depth:r,maxDepth:o,fields:i,height:s,colIndex:a,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:d,pinnedOffset:h}=t,f=yn(),p=ic(),m=C.useRef(null),y=br(),v=St(y,Qde),b=e?v[e]:{},{headerName:S=e??"",description:w="",headerAlign:A=void 0}=b;let _;const P=e&&v[e]?.renderHeaderGroup,R=C.useMemo(()=>({groupId:e,headerName:S,description:w,depth:r,maxDepth:o,fields:i,colIndex:a,isLastColumn:u}),[e,S,w,r,o,i,a,u]);e&&P&&(_=P(R));const O=ae({},t,{classes:f.classes,headerAlign:A,depth:r,isDragging:!1}),N=S??e,M=Cs(),L=e===null?`empty-group-cell-${M}`:e,F=jot(O);C.useLayoutEffect(()=>{l&&(m.current.querySelector('[tabindex="0"]')||m.current)?.focus()},[y,l]);const $=C.useCallback(H=>V=>{_R(V)||y.current.publishEvent(H,R,V)},[y,R]),D=C.useMemo(()=>({onKeyDown:$("columnGroupHeaderKeyDown"),onFocus:$("columnGroupHeaderFocus"),onBlur:$("columnGroupHeaderBlur")}),[$]),k=typeof b.headerClassName=="function"?b.headerClassName(R):b.headerClassName,U=C.useMemo(()=>XF(ae({},t.style),p,d,h),[d,h,t.style,p]);return g(yhe,ae({ref:m,classes:F,columnMenuOpen:!1,colIndex:a,height:s,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:_,headerClassName:k,description:w,elementId:L,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:N,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:U},D))}const bZ=$e("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(t,e)=>e.columnHeaderRow})({display:"flex"}),Yot=t=>{const{visibleColumns:e,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:s,columnGroupHeaderFocus:a,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:h}=t,[f,p]=C.useState(""),[m,y]=C.useState(""),v=yd(),b=yn(),S=St(v,Kde),w=St(v,E0),A=St(v,pZe),_=St(v,f
383w),P=St(v,Nm),R=ihe(w,A,_.left.length),O=St(v,HF),N=St(v,cde),M=St(v,uXe),L=St(v,dXe),F=St(v,ude),$=C.useCallback(ee=>y(ee.field),[]),D=C.useCallback(()=>y(""),[]),k=C.useCallback(ee=>p(ee.field),[]),U=C.useCallback(()=>p(""),[]),H=C.useMemo(()=>_.left.length?{firstColumnIndex:0,lastColumnIndex:_.left.length}:null,[_.left.length]),V=C.useMemo(()=>_.right.length?{firstColumnIndex:e.length-_.right.length,lastColumnIndex:e.length}:null,[_.right.length,e.length]);Qt(v,"columnResizeStart",$),Qt(v,"columnResizeStop",D),Qt(v,"columnHeaderDragStart",k),Qt(v,"columnHeaderDragEnd",U);const q=ee=>{const{renderContext:re=A}=ee||{},fe=re.firstColumnIndex,we=re.lastColumnIndex;return{renderedColumns:e.slice(fe,we),firstColumnToRender:fe,lastColumnToRender:we}},J=(ee,re,fe,we=!1)=>{const xe=ee?.position===Tr.RIGHT,ve=ee?.position===void 0,Re=_.right.length>0&&xe||_.right.length===0&&ve,pe=R-fe;return K(C.Fragment,{children:[ve&&g("div",{role:"presentation",style:{width:pe}}),re,ve&&g("div",{role:"presentation",className:Ye(ye.filler,we&&ye["filler--borderBottom"])}),Re&&g(Kj,{header:!0,pinnedRight:xe,borderBottom:we,borderTop:!1})]})},Q=(ee,re={})=>{const{renderedColumns:fe,firstColumnToRender:we}=q(ee),xe=[];for(let ve=0;ve<fe.length;ve+=1){const Re=fe[ve],pe=we+ve,Be=pe===0,ke=o!==null&&o.field===Re.field||Be&&!h?0:-1,Ne=s!==null&&s.field===Re.field,ot=c.open&&c.field===Re.field,ce=ee?.position,Ae=B_(ce,Re.computedWidth,pe,w,O,F),be=ce===Tr.RIGHT?fe[ve-1]:fe[ve+1],Se=be?s!==null&&s.field===be.field:!1,Pe=pe+1===w.length-_.right.length,Ue=ve,_e=fe.length,Oe=c2(ce,Ue),ze=l2(ce,Ue,_e,b.showColumnVerticalBorder,N);xe.push(g(Fet,ae({},n[Re.field],{columnMenuOpen:ot,filterItemsCounter:r[Re.field]&&r[Re.field].length,headerHeight:M,isDragging:Re.field===f,colDef:Re,colIndex:pe,isResizing:m===Re.field,isLast:pe===w.length-1,hasFocus:Ne,tabIndex:ke,pinnedPosition:ce,pinnedOffset:Ae,isLastUnpinned:Pe,isSiblingFocused:Se,showLeftBorder:Oe,showRightBorder:ze},re),Re.field))}return J(ee,xe,0)},se=()=>K(bZ,{role:"row","aria-rowindex":l+1,ownerState:b,className:ye["row--borderBottom"],children:[H&&Q({position:Tr.LEFT,renderContext:H},{disableReorder:!0}),Q({renderContext:A}),V&&Q({position:Tr.RIGHT,renderContext:V},{disableReorder:!0,separatorSide:Xj.Left})]}),oe=({depth:ee,params:re})=>{const fe=q(re);if(fe.renderedColumns.length===0)return null;const{firstColumnToRender:we,lastColumnToRender:xe}=fe,ve=d[ee],Re=e[we].field,pe=S[Re]?.[ee]??null,Be=ve.findIndex(({groupId:_e,columnFields:Oe})=>_e===pe&&Oe.includes(Re)),ke=e[xe-1].field,Ne=S[ke]?.[ee]??null,ot=ve.findIndex(({groupId:_e,columnFields:Oe})=>_e===Ne&&Oe.includes(ke)),ce=ve.slice(Be,ot+1).map(_e=>ae({},_e,{columnFields:_e.columnFields.filter(Oe=>u[Oe]!==!1)})).filter(_e=>_e.columnFields.length>0),Ae=ce[0].columnFields.indexOf(Re),Se=ce[0].columnFields.slice(0,Ae).reduce((_e,Oe)=>{const ze=P[Oe];return _e+(ze.computedWidth??0)},0);let Pe=we;const Ue=ce.map(({groupId:_e,columnFields:Oe},ze)=>{const ne=a!==null&&a.depth===ee&&Oe.includes(a.field),W=i!==null&&i.depth===ee&&Oe.includes(i.field)?0:-1,j={groupId:_e,width:Oe.reduce((Ie,et)=>Ie+P[et].computedWidth,0),fields:Oe,colIndex:Pe,hasFocus:ne,tabIndex:W},ue=re.position,he=B_(ue,j.width,Pe,w,O,F);Pe+=Oe.length;let Ce=ze;return ue===Tr.LEFT&&(Ce=Pe-1),g(qot,{groupId:_e,width:j.width,fields:j.fields,colIndex:j.colIndex,depth:ee,isLastColumn:ze===ce.length-1,maxDepth:l,height:L,hasFocus:ne,tabIndex:W,pinnedPosition:ue,pinnedOffset:he,showLeftBorder:c2(ue,Ce),showRightBorder:l2(ue,Ce,ce.length,b.showColumnVerticalBorder,N)},ze)});return J(re,Ue,Se)};return{renderContext:A,leftRenderContext:H,rightRenderContext:V,pinnedColumns:_,visibleColumns:e,columnPositions:w,getFillers:J,getColumnHeadersRow:se,getColumnsToRender:q,getColumnGroupHeadersRows:()=>{if(l===0)return null;const ee=[];for(let re=0;re<l;re+=1)ee.push(K(bZ,{role:"row","aria-rowindex":re+1,ownerState:b,children:[H&&oe({depth:re,params:{position:Tr.LEFT,renderContext:H,maxLastColumn:H.lastColumnIndex}}),oe({depth:re,params:{renderContext:A}}),V&&oe({depth:re,params:{position:Tr.RIGHT,renderContext:V,maxLastColumn:V.lastColumnIndex}})]},re));return ee},getPinnedCellOffset:B_,isDragging:!!f,getInnerProps:()=>({role:"rowgroup"})}},Xot=["className"],Kot=t=>{const{classes:e}=t;return Dr({root:["columnHeaders"]},Lr,e)},Qot=ko("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(t,e)=>e.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),Zot=Kr(function(e,n){const{className:r}=e,o=Tn(e,Xot),i=yn(),s=Kot(i);return g(Qot,ae({className:Ye(s.root,r),ownerState:i},o,{role:"presentation",ref:n}))}),Jot=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],eit=Kr(function(e,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:a,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:h,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:p}=e,m=Tn(e,Jot),{getInnerProps:y,getColumnHeadersRow:v,getColumnGroupHeadersRows:b}=Yot({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:a,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:h,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:p});return K(Zot,ae({},m,y(),{ref:n,children:[b(),v()]}))}),tit=Om(eit);function nit(t){return null}function rit(t){return null}const oit=Kr(function(e,n){const o=br().current.getLocaleText("noResultsOverlayLabel");return g(Yj,ae({},e,{ref:n,children:o}))}),iit=["sortingOrder"],sit=C.memo(function(e){const{sortingOrder:n}=e,r=Tn(e,iit),o=yn(),[i]=n,s=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return s?g(s,ae({},r)):null}),ait=["native"];function lit(t){let{native:e}=t,n=Tn(t,ait);return e?g("option",ae({},n)):g(mr,ae({},n))}const cit={booleanCellTrueIcon:stt,booleanCellFalseIcon:u5,columnMenuIcon:ntt,openFilterButtonIcon:Xet,filterPanelDeleteIcon:u5,columnFilteredIcon:XQ,columnSelectorIcon:Qet,columnUnsortedIcon:sit,columnSortedAscendingIcon:WQ,columnSortedDescendingIcon:jQ,columnResizeIcon:Zet,densityCompactIcon:Jet,densityStandardIcon:ett,densityComfortableIcon:ttt,exp
383ortIcon:itt,moreActionsIcon:att,treeDataCollapseIcon:YQ,treeDataExpandIcon:qQ,groupingCriteriaCollapseIcon:YQ,groupingCriteriaExpandIcon:qQ,detailPanelExpandIcon:KQ,detailPanelCollapseIcon:rtt,rowReorderIcon:QQ,quickFilterIcon:Ket,quickFilterClearIcon:u5,columnMenuHideIcon:ltt,columnMenuSortAscendingIcon:WQ,columnMenuSortDescendingIcon:jQ,columnMenuFilterIcon:XQ,columnMenuManageColumnsIcon:ctt,columnMenuClearIcon:utt,loadIcon:ott,filterPanelAddIcon:KQ,filterPanelRemoveAllIcon:dtt,columnReorderIcon:QQ},uit=ae({},cit,{baseBadge:Ca,baseCheckbox:_u,baseDivider:yi,baseTextField:lo,baseFormControl:v0,baseSelect:xa,baseButton:Sn,baseIconButton:Di,baseInputAdornment:qr,baseTooltip:pW,basePopper:g0,baseInputLabel:_F,baseSelectOption:lit,baseChip:m0}),dit=uit,hit=ae({},dit,{cell:TJe,skeletonCell:MJe,columnHeaderFilterIconButton:qet,columnHeaderSortIcon:Wet,columnMenu:Itt,columnHeaders:tit,detailPanels:nit,footer:wnt,footerRowCount:$nt,toolbar:null,pinnedRows:rit,loadingOverlay:Rnt,noResultsOverlay:oit,noRowsOverlay:Ont,pagination:Lnt,filterPanel:ont,columnsPanel:Mtt,columnsManagement:lnt,panel:Btt,row:Wnt}),fit={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",unstable_listView:!1},pit=hit,git=t=>{const e=bJe(Ht({props:t,name:"MuiDataGrid"})),n=C.useMemo(()=>ae({},wXe,e.localeText),[e.localeText]),r=C.useMemo(()=>yJe({defaultSlots:pit,slots:e.slots}),[e.slots]),o=C.useMemo(()=>Object.keys(C4).reduce((i,s)=>(i[s]=e[s]??C4[s],i),{}),[e]);return C.useMemo(()=>ae({},e,o,{localeText:n,slots:r},fit),[e,n,r,o])},mit={hooks:{useGridAriaAttributes:jnt,useGridRowAriaAttributes:qnt}},Dhe=Kr(function(e,n){const r=git(e),o=Wot(r.apiRef,r);return g(Ynt,{privateApiRef:o,configuration:mit,props:r,children:g(QJe,ae({className:r.className,style:r.style,sx:r.sx},r.forwardedProps,r.slotProps?.root,{ref:n}))})}),Jj=C.memo(Dhe);
383Dhe.propTypes={apiRef:ge.shape({current:ge.object.isRequired}),"aria-label":ge.string,"aria-labelledby":ge.string,autoHeight:ge.bool,autoPageSize:ge.bool,autosizeOnMount:ge.bool,autosizeOptions:ge.shape({columns:ge.arrayOf(ge.string),disableColumnVirtualization:ge.bool,expand:ge.bool,includeHeaders:ge.bool,includeOutliers:ge.bool,outliersFactor:ge.number}),cellModesModel:ge.object,checkboxSelection:ge.bool,classes:ge.object,clipboardCopyCellDelimiter:ge.string,columnBufferPx:ge.number,columnGroupHeaderHeight:ge.number,columnGroupingModel:ge.arrayOf(ge.object),columnHeaderHeight:ge.number,columns:ge.arrayOf(ge.object).isRequired,columnVisibilityModel:ge.object,density:ge.oneOf(["comfortable","compact","standard"]),disableAutosize:ge.bool,disableColumnFilter:ge.bool,disableColumnMenu:ge.bool,disableColumnResize:ge.bool,disableColumnSelector:ge.bool,disableColumnSorting:ge.bool,disableDensitySelector:ge.bool,disableEval:ge.bool,disableMultipleRowSelection:ge.bool,disableRowSelectionOnClick:ge.bool,disableVirtualization:ge.bool,editMode:ge.oneOf(["cell","row"]),estimatedRowCount:ge.number,experimentalFeatures:ge.shape({warnIfFocusStateIsNotSynced:ge.bool}),filterDebounceMs:ge.number,filterMode:ge.oneOf(["client","server"]),filterModel:ge.shape({items:ge.arrayOf(ge.shape({field:ge.string.isRequired,id:ge.oneOfType([ge.number,ge.string]),operator:ge.string.isRequired,value:ge.any})).isRequired,logicOperator:ge.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:ge.bool,quickFilterLogicOperator:ge.oneOf(["and","or"]),quickFilterValues:ge.array}),forwardedProps:ge.object,getCellClassName:ge.func,getDetailPanelContent:ge.func,getEstimatedRowHeight:ge.func,getRowClassName:ge.func,getRowHeight:ge.func,getRowId:ge.func,getRowSpacing:ge.func,hideFooter:ge.bool,hideFooterPagination:ge.bool,hideFooterSelectedRowCount:ge.bool,ignoreDiacritics:ge.bool,ignoreValueFormatterDuringExport:ge.oneOfType([ge.shape({clipboardExport:ge.bool,csvExport:ge.bool}),ge.bool]),indeterminateCheckboxAction:ge.oneOf(["deselect","select"]),initialState:ge.object,isCellEditable:ge.func,isRowSelectable:ge.func,keepNonExistentRowsSelected:ge.bool,loading:ge.bool,localeText:ge.object,logger:ge.shape({debug:ge.func.isRequired,error:ge.func.isRequired,info:ge.func.isRequired,warn:ge.func.isRequired}),logLevel:ge.oneOf(["debug","error","info","warn",!1]),nonce:ge.string,onCellClick:ge.func,onCellDoubleClick:ge.func,onCellEditStart:ge.func,onCellEditStop:ge.func,onCellKeyDown:ge.func,onCellModesModelChange:ge.func,onClipboardCopy:ge.func,onColumnHeaderClick:ge.func,onColumnHeaderContextMenu:ge.func,onColumnHeaderDoubleClick:ge.func,onColumnHeaderEnter:ge.func,onColumnHeaderLeave:ge.func,onColumnHeaderOut:ge.func,onColumnHeaderOver:ge.func,onColumnOrderChange:ge.func,onColumnResize:ge.func,onColumnVisibilityModelChange:ge.func,onColumnWidthChange:ge.func,onDensityChange:ge.func,onFilterModelChange:ge.func,onMenuClose:ge.func,onMenuOpen:ge.func,onPaginationMetaChange:ge.func,onPaginationModelChange:ge.func,onPreferencePanelClose:ge.func,onPreferencePanelOpen:ge.func,onProcessRowUpdateError:ge.func,onResize:ge.func,onRowClick:ge.func,onRowCountChange:ge.func,onRowDoubleClick:ge.func,onRowEditStart:ge.func,onRowEditStop:ge.func,onRowModesModelChange:ge.func,onRowSelectionModelChange:ge.func,onSortModelChange:ge.func,onStateChange:ge.func,pageSizeOptions:ge.arrayOf(ge.oneOfType([ge.number,ge.shape({label:ge.string.isRequired,value:ge.number.isRequired})]).isRequired),pagination:ge.oneOf([!0]),paginationMeta:ge.shape({hasNextPage:ge.bool}),paginationMode:ge.oneOf(["client","server"]),paginationModel:ge.shape({page:ge.number.isRequired,pageSize:ge.number.isRequired}),processRowUpdate:ge.func,resetPageOnSortFilter:ge.bool,resizeThrottleMs:ge.number,rowBufferPx:ge.number,rowCount:ge.number,rowHeight:ge.number,rowModesModel:ge.object,rowPositionsDebounceMs:ge.number,rows:ge.arrayOf(ge.object),rowSelection:ge.bool,rowSelectionModel:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.number,ge.string]).isRequired),ge.number,ge.string]),rowSpacingType:ge.oneOf(["border","margin"]),scrollbarSize:ge.number,showCellVerticalBorder:ge.bool,showColumnVerticalBorder:ge.bool,slotProps:ge.object,slots:ge.object,sortingMode:ge.oneOf(["client","server"]),sortingOrder:ge.arrayOf(ge.oneOf(["asc","desc"])),sortModel:ge.arrayOf(ge.shape({field:ge.string.isRequired,sort:ge.oneOf(["asc","desc"])})),sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object]),unstable_rowSpanning:ge.bool,virtualizeColumnsWithAutoRowHeight:ge.bool};const Dm=({rows:t,columns:e,rowHeight:n=33,tableType:r,wrapperSx:o={},dataGridSx:i={},disableColumnFilter:s=!1,disableColumnSelector:a=!1,disableRowSelectionOnClick:l=!0,checkboxSelection:c=!1,loading:u=!1,columnVisibilityModel:d={},onColumnVisibilityModelChange:h,disableColumnMenu:f=!1,...p})=>{const m=bt(xNe),y=m[r]?m[r].filters:Eo.deepCopy(Is.filters),[v,b]=C.useState(y.sortModel),S=Yn();return C.useEffect(()=>{S(gNe({tableType:r,filters:{sortModel:v}}))},[v,r]),g(le,{sx:{px:6,py:2,width:"100%",minHeight:"100%",...o},children:g(To,{sx:{width:"100%",p:0,flex:1},children:g(Jj,{loading:u,sx:{p:1.5,width:"100%",height:"calc(100vh - 210px)","& .MuiDataGrid-cell:focus, & .MuiDataGrid-cell:focus-within":{outline:"none !important"},...i}
383,rows:t,rowHeight:n,columns:e,sortModel:v,onSortModelChange:w=>b(w),disableColumnFilter:s,disableColumnSelector:a,disableRowSelectionOnClick:l,checkboxSelection:c,columnVisibilityModel:d,onColumnVisibilityModelChange:h,disableColumnMenu:f,...p})})})},yit=[{key:pp.USER,value:pp.USER.toString(),displayText:"User"},{key:pp.ADMIN,value:pp.ADMIN.toString(),displayText:"Admin",showOnAdmin:!0},{key:pp.GROUP_ADMIN,value:pp.GROUP_ADMIN.toString(),displayText:"Group Admin"}],vit=["localeText"],w4=C.createContext(null),e6=function(e){var n;const{localeText:r}=e,o=at(e,vit),{utils:i,localeText:s}=(n=C.useContext(w4))!=null?n:{utils:void 0,localeText:void 0},a=Ht({props:o,name:"MuiLocalizationProvider"}),{children:l,dateAdapter:c,dateFormats:u,dateLibInstance:d,adapterLocale:h,localeText:f}=a,p=C.useMemo(()=>X({},f,s,r),[f,s,r]),m=C.useMemo(()=>{if(!c)return i||null;const b=new c({locale:h,formats:u,instance:d});if(!b.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` 384`));return b},[c,h,u,d,i]),y=C.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),v=C.useMemo(()=>({utils:m,defaultDates:y,localeText:p}),[y,m,p]);return g(w4.Provider,{value:v,children:l})},bit=t=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:X({},t)}}}}),Lhe={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:t=>t==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(t,e,n)=>`Select ${t}. ${e===null?"No time selected":`Selected time is ${n.format(e,"fullTime")}`}`,hoursClockNumberText:t=>`${t} hours`,minutesClockNumberText:t=>`${t} minutes`,secondsClockNumberText:t=>`${t} seconds`,selectViewText:t=>`Select ${t}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:t=>`Week ${t}`,calendarWeekNumberText:t=>`${t}`,openDatePickerDialogue:(t,e)=>t!==null&&e.isValid(t)?`Choose date, selected date is ${e.format(t,"fullDate")}`:"Choose date",openTimePickerDialogue:(t,e)=>t!==null&&e.isValid(t)?`Choose time, selected time is ${e.format(t,"fullTime")}`:"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:t=>"Y".repeat(t.digitAmount),fieldMonthPlaceholder:t=>t.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:t=>t.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},Cit=Lhe;bit(Lhe);const iS=()=>{const t=C.useContext(w4);if(t===null)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` 385`));if(t.utils===null)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(` 386`));const e=C.useMemo(()=>X({},Cit,t.localeText),[t.localeText]);return C.useMemo(()=>X({},t,{localeText:e}),[t,e])},vi=()=>iS().utils,IR=()=>iS().defaultDates,w0=()=>iS().localeText,KF=t=>{const e=vi(),n=C.useRef();return n.current===void 0&&(n.current=e.dateWithTimezone(void 0,t)),n.current},Sit=gt(g("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Eit=gt(g("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),xit=gt(g("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),wit=gt(g("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");gt(K(C.Fragment,{children:[g("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),g("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");gt(g("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");gt(K(C.Fragment,{children:[g("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),g("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const Ait=gt(g("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function Tit(t){return Ft("MuiPickersArrowSwitcher",t)}Dt("MuiPickersArrowSwitcher",["root","spacer","button"]);const _it=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],Iit=["ownerState"],Pit=["ownerState"],Rit=$e("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex"}),Oit=$e("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})(({theme:t})=>({width:t.spacing(3)})),CZ=$e(Di,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(t,e)=>e.button})(({ownerState:t})=>X({},t.hidden&&{visibility:"hidden"})),Nit=t=>{const{classes:e}=t;return Lt({root:["root"],spacer:["spacer"],button:["button"]},Tit,e)},Mit=C.forwardRef(function(e,n){var r,o,i,s;const l=Tu().direction==="rtl",c=Ht({props:e,name:"MuiPickersArrowSwitcher"}),{children:u,className:d,slots:h,slotProps:f,isNextDisabled:p,isNextHidden:m,onGoToNext:y,nextLabel:v,isPreviousDisabled:b,isPreviousHidden:S,onGoToPrevious:w,previousLabel:A}=c,_=at(c,_it),P=c,R=Nit(P),O={isDisabled:p,isHidden:m,goTo:y,label:v},N={isDisabled:b,isHidden:S,goTo:w,label:A},M=(r=h?.previousIconButton)!=null?r:CZ,L=ao({elementType:M,externalSlotProps:f?.previousIconButton,additionalProps:{size:"medium",title:N.label,"aria-label":N.label,disabled:N.isDisabled,edge:"end",onClick:N.goTo},ownerState:X({},P,{hidden:N.isHidden}),className:R.button}),F=(o=h?.nextIconButton)!=null?o:CZ,$=ao({elementType:F,externalSlotProps:f?.nextIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"start",onClick:O.goTo},ownerState:X({},P,{hidden:O.isHidden}),className:R.button}),D=(i=h?.leftArrowIcon)!=null?i:Eit,k=ao({elementType:D,externalSlotProps:f?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),U=at(k,Iit),H=(s=h?.rightArrowIcon)!=null?s:xit,V=ao({elementType:H,externalSlotProps:f?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),q=at(V,Pit);return K(Rit,X({ref:n,className:Ye(R.root,d),ownerState:P},_,{children:[g(M,X({},L,{children:l?g(H,X({},q)):g(D,X({},U))})),u?g(Ke,{variant:"subtitle1",component:"span",children:u}):g(Oit,{className:R.spacer,ownerState:P}),g(F,X({},$,{children:l?g(D,X({},U)):g(H,X({},q))}))]}))}),pT=(t,e)=>t.length!==e.length?!1:e.every(n=>t.includes(n)),Dit=({openTo:t,defaultOpenTo:e,views:n,defaultViews:r})=>{const o=n??r;let i;if(t!=null)i=t;else if(o.includes(e))i=e;else if(o.length>0)i=o[0];else throw new Error("MUI: The `views` prop must contain at least one view");return{views:o,openTo:i}},Lit=["hours","minutes","seconds"],kit=t=>Lit.includes(t),SZ=(t,e)=>e.getHours(t)*3600+e.getMinutes(t)*60+e.getSeconds(t),Fit=(t,e)=>(n,r)=>t?e.isAfter(n,r):SZ(n,e)>SZ(r,e);function khe({onChange:t,onViewChange:e,openTo:n,view:r,views:o,autoFocus:i,focusedView:s,onFocusedViewChange:a}){var l,c;const u=C.useRef(n),d=C.useRef(o),h=C.useRef(o.includes(n)?n:o[0]),[f,p]=Ka({name:"useViews",state:"view",controlled:r,default:h.current}),m=C.useRef(i?f:null),[y,v]=Ka({name:"useViews",state:"focusedView",controlled:s,default:m.current});C.useEffect(()=>{(u.current&&u.current!==n||d.current&&d.current.some(O=>!o.includes(O)))&&(p(o.includes(n)?n:o[0]),d.current=o,u.current=n)},[n,p,f,o]);const b=o.indexOf(f),S=(l=o[b-1])!=null?l:null,w=(c=o[b+1])!=null?c:null,A=mn((O,N)=>{v(N?O:M=>O===M?null:M),a?.(O,N)}),_=mn(O=>{A(O,!0),O!==f&&(p(O),e&&e(O))}),P=mn(()=>{w&&_(w)}),R=mn((O,N,M)=>{const L=N==="finish",F=M?o.indexOf(M)<o.length-1:!!w;
386if(t(O,L&&F?"partial":N,M),M&&M!==f){const D=o[o.indexOf(M)+1];D&&_(D)}else L&&P()});return{view:f,setView:_,focusedView:y,setFocusedView:A,nextView:w,previousView:S,defaultView:o.includes(n)?n:o[0],goToNextView:P,setValueAndGoToNextView:R}}function Bit(t,{disableFuture:e,maxDate:n,timezone:r}){const o=vi();return C.useMemo(()=>{const i=o.dateWithTimezone(void 0,r),s=o.startOfMonth(e&&o.isBefore(i,n)?i:n);return!o.isAfter(s,t)},[e,n,t,o,r])}function $it(t,{disablePast:e,minDate:n,timezone:r}){const o=vi();return C.useMemo(()=>{const i=o.dateWithTimezone(void 0,r),s=o.startOfMonth(e&&o.isAfter(i,n)?i:n);return!o.isBefore(s,t)},[e,n,t,o,r])}const oP=36,QF=2,ZF=320,Hit=280,t6=334,Uit=$e("div")({overflow:"hidden",width:ZF,maxHeight:t6,display:"flex",flexDirection:"column",margin:"0 auto"}),h2=(t,e,n)=>{let r=e;return r=t.setHours(r,t.getHours(n)),r=t.setMinutes(r,t.getMinutes(n)),r=t.setSeconds(r,t.getSeconds(n)),r},$_=({date:t,disableFuture:e,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:s,timezone:a})=>{const l=h2(s,s.dateWithTimezone(void 0,a),t);n&&s.isBefore(o,l)&&(o=l),e&&s.isAfter(r,l)&&(r=l);let c=t,u=t;for(s.isBefore(t,o)&&(c=o,u=null),s.isAfter(t,r)&&(u&&(u=r),c=null);c||u;){if(c&&s.isAfter(c,r)&&(c=null),u&&s.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=s.addDays(c,1)}if(u){if(!i(u))return u;u=s.addDays(u,-1)}}return null},zit=(t,e)=>e==null||!t.isValid(e)?null:e,wh=(t,e,n)=>e==null||!t.isValid(e)?n:e,Vit=(t,e,n)=>!t.isValid(e)&&e!=null&&!t.isValid(n)&&n!=null?!0:t.isEqual(e,n),n6=(t,e)=>{const r=[t.startOfYear(e)];for(;r.length<12;){const o=r[r.length-1];r.push(t.addMonths(o,1))}return r},Fhe=(t,e,n)=>n==="date"?t.startOfDay(t.dateWithTimezone(void 0,e)):t.dateWithTimezone(void 0,e),Git=["year","month","day"],EZ=t=>Git.includes(t),r6=(t,{format:e,views:n},r)=>{if(e!=null)return e;const o=t.formats;return pT(n,["year"])?o.year:pT(n,["month"])?o.month:pT(n,["day"])?o.dayOfMonth:pT(n,["month","year"])?`${o.month} ${o.year}`:pT(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(t.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},Wit=(t,e)=>{const n=t.startOfWeek(e);return[0,1,2,3,4,5,6].map(r=>t.addDays(n,r))},o6=({timezone:t,value:e,defaultValue:n,onChange:r,valueManager:o})=>{var i,s;const a=vi(),l=C.useRef(n),c=(i=e??l.current)!=null?i:o.emptyValue,u=C.useMemo(()=>o.getTimezone(a,c),[a,o,c]),d=mn(m=>u==null?m:o.setTimezone(a,u,m)),h=(s=t??u)!=null?s:"default",f=C.useMemo(()=>o.setTimezone(a,h,c),[o,a,h,c]),p=mn((m,...y)=>{const v=d(m);r?.(v,...y)});return{value:f,handleValueChange:p,timezone:h}},i6=({name:t,timezone:e,value:n,defaultValue:r,onChange:o,valueManager:i})=>{const[s,a]=Ka({name:t,state:"value",controlled:n,default:r??i.emptyValue}),l=mn((c,...u)=>{a(c),o?.(c,...u)});return o6({timezone:e,value:s,defaultValue:void 0,onChange:l,valueManager:i})},vp={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},jit=t=>Math.max(...t.map(e=>{var n;return(n=vp[e.type])!=null?n:1})),gT=(t,e,n)=>{if(e===vp.year)return t.startOfYear(n);if(e===vp.month)return t.startOfMonth(n);if(e===vp.day)return t.startOfDay(n);let r=n;return e<vp.minutes&&(r=t.setMinutes(r,0)),e<vp.seconds&&(r=t.setSeconds(r,0)),e<vp.milliseconds&&(r=t.setMilliseconds(r,0)),r},qit=({props:t,utils:e,granularity:n,timezone:r,getTodayDate:o})=>{var i;let s=o?o():gT(e,n,Fhe(e,r));t.minDate!=null&&e.isAfterDay(t.minDate,s)&&(s=gT(e,n,t.minDate)),t.maxDate!=null&&e.isBeforeDay(t.maxDate,s)&&
386(s=gT(e,n,t.maxDate));const a=Fit((i=t.disableIgnoringDatePartForTimeValidation)!=null?i:!1,e);return t.minTime!=null&&a(t.minTime,s)&&(s=gT(e,n,t.disableIgnoringDatePartForTimeValidation?t.minTime:h2(e,s,t.minTime))),t.maxTime!=null&&a(s,t.maxTime)&&(s=gT(e,n,t.disableIgnoringDatePartForTimeValidation?t.maxTime:h2(e,s,t.maxTime))),s},Bhe=(t,e)=>{const n=t.formatTokenMap[e];if(n==null)throw new Error([`MUI: The token "${e}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(` 387`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Yit=t=>{switch(t){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},JF=(t,e,n)=>{const r=[],o=t.dateWithTimezone(void 0,e),i=t.startOfWeek(o),s=t.endOfWeek(o);let a=i;for(;t.isBefore(a,s);)r.push(a),a=t.addDays(a,1);return r.map(l=>t.formatByString(l,n))},$he=(t,e,n,r)=>{switch(n){case"month":return n6(t,t.dateWithTimezone(void 0,e)).map(o=>t.formatByString(o,r));case"weekDay":return JF(t,e,r);case"meridiem":{const o=t.dateWithTimezone(void 0,e);return[t.startOfDay(o),t.endOfDay(o)].map(i=>t.formatByString(i,r))}default:return[]}},Hhe=(t,e,n)=>{let r=e;for(r=Number(r).toString();r.length<n;)r=`0${r}`;return r},Uhe=(t,e,n,r,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const s=t.setDate(r.longestMonth,n);return t.formatByString(s,o.format)}const i=n.toString();return o.hasLeadingZerosInInput?Hhe(t,i,o.maxLength):i},Xit=(t,e,n,r,o,i,s)=>{const a=Yit(r),l=r==="Home",c=r==="End",u=n.value===""||l||c,d=()=>{const f=o[n.type]({currentDate:i,format:n.format,contentType:n.contentType}),p=b=>Uhe(t,e,b,f,n),m=n.type==="minutes"&&s!=null&&s.minutesStep?s.minutesStep:1;let v=parseInt(n.value,10)+a*m;if(u){if(n.type==="year"&&!c&&!l)return t.formatByString(t.dateWithTimezone(void 0,e),n.format);a>0||l?v=f.minimum:v=f.maximum}return v%m!==0&&((a<0||l)&&(v+=m-(m+v)%m),(a>0||c)&&(v-=v%m)),v>f.maximum?p(f.minimum+(v-f.maximum-1)%(f.maximum-f.minimum+1)):v<f.minimum?p(f.maximum-(f.minimum-v-1)%(f.maximum-f.minimum+1)):p(v)},h=()=>{const f=$he(t,e,n.type,n.format);if(f.length===0)return n.value;if(u)return a>0||l?f[0]:f[f.length-1];const m=(f.indexOf(n.value)+f.length+a)%f.length;return f[m]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?d():h()},s6=(t,e)=>{let n=t.value||t.placeholder;const r=e==="non-input"?t.hasLeadingZerosInFormat:t.hasLeadingZerosInInput;return e==="non-input"&&t.hasLeadingZerosInInput&&!t.hasLeadingZerosInFormat&&(n=Number(n).toString()),["input-rtl","input-ltr"].includes(e)&&t.contentType==="digit"&&!r&&n.length===1&&(n=`${n}â`),e==="input-rtl"&&(n=`â¨${n}â©`),n},n1=t=>t.replace(/[\u2066\u2067\u2068\u2069]/g,""),zhe=(t,e)=>{let n=0,r=e?1:0;const o=[];for(let i=0;i<t.length;i+=1){const s=t[i],a=s6(s,e?"input-rtl":"input-ltr"),l=`${s.startSeparator}${a}${s.endSeparator}`,c=n1(l).length,u=l.length,d=n1(a),h=r+a.indexOf(d[0])+s.startSeparator.length,f=h+d.length;o.push(X({},s,{start:n,end:n+c,startInInput:h,endInInput:f})),n+=c,r+=u}return o},Kit=(t,e,n,r,o)=>{switch(r.type){case"year":return n.fieldYearPlaceholder({digitAmount:t.formatByString(t.dateWithTimezone(void 0,e),o).length,format:o});case"month":return n.fieldMonthPlaceholder({contentType:r.contentType,format:o});case"day":return n.fieldDayPlaceholder({format:o});case"weekDay":return n.fieldWeekDayPlaceholder({contentType:r.contentType,format:o});case"hours":return n.fieldHoursPlaceholder({format:o});case"minutes":return n.fieldMinutesPlaceholder({format:o});case"seconds":return n.fieldSecondsPlaceholder({format:o});case"meridiem":return n.fieldMeridiemPlaceholder({format:o});default:return o}},xZ=(t,e,n,r)=>t.formatByString(t.parse(e,n),r),Vhe=(t,e,n)=>t.formatByString(t.dateWithTimezone(void 0,e),n).length===4,Ghe=(t,e,n,r,o)=>{if(n!=="digit")return!1;const i=t.dateWithTimezone(void 0,e);switch(r){case"year":return Vhe(t,e,o)?t.formatByString(t.setYear(i,1),o)==="0001":t.formatByString(t.setYear(i,2001),o)==="01";case"month":return t.formatByString(t.startOfYear(i),o).length>1;case"day":return t.formatByString(t.startOfMonth(i),o).length>1;case"weekDay":return t.formatByString(t.startOfWeek(i),o).length>1;case"hours":return t.formatByString(t.setHours(i,1),o).length>1;case"minutes":return t.formatByString(t.setMinutes(i,1),o).length>1;case"seconds":return t.formatByString(t.setSeconds(i,1),o).length>1;default:throw new Error("Invalid section type")}},Qit=(t,e)=>{const n=[],{start:r,end:o}=t.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let s=null;for(;s=i.exec(e);)n.push({start:s.index,end:i.lastIndex-1});return n},wZ=(t,e,n,r,o,i,s,a)=>{let l="";const c=[],u=t.date(),d=S=>{if(S==="")return null;const w=Bhe(t,S),A=Ghe(t,e,w.contentType,w.type,S),_=s?A:w.contentType==="digit",P=o!=null&&t.isValid(o);let R=P?t.formatByString(o,S):"",O=null;if(_)if(A)O=R===""?t.formatByString(u,S).length:R.length;else{if(w.maxLength==null)throw new Error(`MUI: The token ${S} should have a 'maxDigitNumber' property on it's adapter`);O=w.maxLength,P&&(R=Hhe(t,R,O))}return c.push(X({},w,{format:S,maxLength:O,value:R,placeholder:Kit(t,e,n,w,S),hasLeadingZeros:A,hasLeadingZerosInFormat:A,hasLeadingZerosInInput
387:_,startSeparator:c.length===0?l:"",endSeparator:"",modified:!1})),null};let h=10,f=r,p=t.expandFormat(r);for(;p!==f;)if(f=p,p=t.expandFormat(f),h-=1,h<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const m=p,y=Qit(t,m),v=new RegExp(`^(${Object.keys(t.formatTokenMap).sort((S,w)=>w.length-S.length).join("|")})`,"g");let b="";for(let S=0;S<m.length;S+=1){const w=y.find(O=>O.start<=S&&O.end>=S),A=m[S],_=w!=null,P=`${b}${m.slice(S)}`,R=v.test(P);!_&&A.match(/([A-Za-z]+)/)&&R?(b=P.slice(0,v.lastIndex),S+=v.lastIndex-1):_&&w?.start===S||w?.end===S||(d(b),b="",c.length===0?l+=A:c[c.length-1].endSeparator+=A)}return d(b),c.map(S=>{const w=A=>{let _=A;return a&&_!==null&&_.includes(" ")&&(_=`â©${_}â¦`),i==="spacious"&&["/",".","-"].includes(_)&&(_=` ${_} `),_};return S.startSeparator=w(S.startSeparator),S.endSeparator=w(S.endSeparator),S})},Zit=(t,e)=>{const n=e.some(a=>a.type==="day"),r=[],o=[];for(let a=0;a<e.length;a+=1){const l=e[a];n&&l.type==="weekDay"||(r.push(l.format),o.push(s6(l,"non-input")))}const i=r.join(" "),s=o.join(" ");return t.parse(s,i)},Jit=(t,e)=>{const r=t.map(o=>{const i=s6(o,e?"input-rtl":"input-ltr");return`${o.startSeparator}${i}${o.endSeparator}`}).join("");return e?`â¦${r}â©`:r},est=(t,e)=>{const n=t.dateWithTimezone(void 0,e),r=t.endOfYear(n),o=t.endOfDay(n),{maxDaysInMonth:i,longestMonth:s}=n6(t,n).reduce((a,l)=>{const c=t.getDaysInMonth(l);return c>a.maxDaysInMonth?{maxDaysInMonth:c,longestMonth:l}:a},{maxDaysInMonth:0,longestMonth:null});return{year:({format:a})=>({minimum:0,maximum:Vhe(t,e,a)?9999:99}),month:()=>({minimum:1,maximum:t.getMonth(r)+1}),day:({currentDate:a})=>({minimum:1,maximum:a!=null&&t.isValid(a)?t.getDaysInMonth(a):i,longestMonth:s}),weekDay:({format:a,contentType:l})=>{if(l==="digit"){const c=JF(t,e,a).map(Number);return{minimum:Math.min(...c),maximum:Math.max(...c)}}return{minimum:1,maximum:7}},hours:({format:a})=>{const l=t.getHours(o);return t.formatByString(t.endOfDay(n),a)!==l.toString()?{minimum:1,maximum:Number(t.formatByString(t.startOfDay(n),a))}:{minimum:0,maximum:l}},minutes:()=>({minimum:0,maximum:t.getMinutes(o)}),seconds:()=>({minimum:0,maximum:t.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:0})}},tst=(t,e,n,r,o)=>{switch(n.type){case"year":return t.setYear(o,t.getYear(r));case"month":return t.setMonth(o,t.getMonth(r));case"weekDay":{const i=JF(t,e,n.format),s=t.formatByString(r,n.format),a=i.indexOf(s),c=i.indexOf(n.value)-a;return t.addDays(r,c)}case"day":return t.setDate(o,t.getDate(r));case"meridiem":{const i=t.getHours(r)<12,s=t.getHours(o);return i&&s>=12?t.addHours(o,-12):!i&&s<12?t.addHours(o,12):o}case"hours":return t.setHours(o,t.getHours(r));case"minutes":return t.setMinutes(o,t.getMinutes(r));case"seconds":return t.setSeconds(o,t.getSeconds(r));default:return o}},AZ={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},TZ=(t,e,n,r,o,i)=>[...r].sort((s,a)=>AZ[s.type]-AZ[a.type]).reduce((s,a)=>!i||a.modified?tst(t,e,a,n,s):s,o),nst=()=>navigator.userAgent.toLowerCase().indexOf("android")>-1,rst=(t,e)=>{const n={};if(!e)return t.forEach((l,c)=>{const u=c===0?null:c-1,d=c===t.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:d}}),{neighbors:n,startIndex:0,endIndex:t.length-1};const r={},o={};let i=0,s=0,a=t.length-1;for(;a>=0;){s=t.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),s===-1&&(s=t.length-1);for(let l=s;l>=i;l-=1)o[l]=a,r[a]=l,a-=1;i=s+1}return t.forEach((l,c)=>{const u=o[c],d=u===0?null:r[u-1],h=u===t.length-1?null:r[u+1];n[c]={leftIndex:d,rightIndex:h}}),{neighbors:n,startIndex:r[0],endIndex:r[t.length-1]}},ost=["value","referenceDate"],Cm={emptyValue:null,getTodayValue:Fhe,getInitialReferenceValue:t=>{let{value:e,referenceDate:n}=t,r=at(t,ost);return e!=null&&r.utils.isValid(e)?e:n??qit(r)},cleanValue:zit,areValuesEqual:Vit,isSameError:(t,e)=>t===e,hasError:t=>t!=null,defaultErrorState:null,getTimezone:(t,e)=>e==null||!t.isValid(e)?null:t.getTimezone(e),setTimezone:(t,e,n)=>n==null?null:t.setTimezone(n,e)},ist={updateReferenceValue:(t,e,n)=>e==null||!t.isValid(e)?n:e,getSectionsFromValue:(t,e,n,r,o)=>!t.isValid(e)&&!!n?n:zhe(o(e),r),getValueStrFromSections:Jit,getActiveDateManager:(t,e)=>({date:e.value,referenceDate:e.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!t.isValid(n)?e.referenceValue:n})}),parseValueStr:(t,e,n)=>n(t.trim(),e)},Whe=t=>{if(t!==void 0)return Object.keys(t).reduce((e,n)=>X({},e,{[`${n.slice(0,1).toLowerCase()}${n.slice(1)}`]:t[n]}),{})};function sst(t){return Ft("MuiPickersDay",t)}const mb=Dt("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),ast=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onF
387ocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],lst=t=>{const{selected:e,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:a,classes:l}=t,c=s&&!a;return Lt({root:["root",e&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",s&&a&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},sst,l)},jhe=({theme:t,ownerState:e})=>X({},t.typography.caption,{width:oP,height:oP,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Tl(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:Tl(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${mb.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${mb.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${mb.disabled}:not(.${mb.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${mb.disabled}&.${mb.selected}`]:{opacity:.6}},!e.disableMargin&&{margin:`0 ${QF}px`},e.outsideCurrentMonth&&e.showDaysOutsideCurrentMonth&&{color:(t.vars||t).palette.text.secondary},!e.disableHighlightToday&&e.today&&{[`&:not(.${mb.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}),qhe=(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableMargin&&e.dayWithMargin,!n.disableHighlightToday&&n.today&&e.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&e.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&e.hiddenDaySpacingFiller]},cst=$e(ad,{name:"MuiPickersDay",slot:"Root",overridesResolver:qhe})(jhe),ust=$e("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:qhe})(({theme:t,ownerState:e})=>X({},jhe({theme:t,ownerState:e}),{opacity:0,pointerEvents:"none"})),mT=()=>{},dst=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:s,disabled:a=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:h,onFocus:f=mT,onBlur:p=mT,onKeyDown:m=mT,onMouseDown:y=mT,onMouseEnter:v=mT,outsideCurrentMonth:b,selected:S=!1,showDaysOutsideCurrentMonth:w=!1,children:A,today:_=!1}=r,P=at(r,ast),R=X({},r,{autoFocus:o,disabled:a,disableHighlightToday:l,disableMargin:c,selected:S,showDaysOutsideCurrentMonth:w,today:_}),O=lst(R),N=vi(),M=C.useRef(null),L=Xr(M,n);Ls(()=>{o&&!a&&!u&&!b&&M.current.focus()},[o,a,u,b]);const F=D=>{y(D),b&&D.preventDefault()},$=D=>{a||h(s),b&&D.currentTarget.focus(),d&&d(D)};return b&&!w?g(ust,{className:Ye(O.root,O.hiddenDaySpacingFiller,i),ownerState:R,role:P.role}):g(cst,X({className:Ye(O.root,i),ref:L,centerRipple:!0,disabled:a,tabIndex:S?0:-1,onKeyDown:D=>m(D,s),onFocus:D=>f(D,s),onBlur:D=>p(D,s),onMouseEnter:D=>v(D,s),onClick:$,onMouseDown:F},P,{ownerState:R,children:A||N.format(s,"dayOfMonth")}))}),hst=C.memo(dst);function Yhe(t,e,n,r){const{value:o,onError:i}=t,s=iS(),a=C.useRef(r),l=e({adapter:s,value:o,props:t});return C.useEffect(()=>{i&&!n(l,a.current)&&i(l,o),a.current=l},[n,i,a,l,o]),l}const fst=t=>{const e=vi(),n=w0(),r=iS(),i=Tu().direction==="rtl",{valueManager:s,fieldValueManager:a,valueType:l,validator:c,internalProps:u,internalProps:{value:d,defaultValue:h,referenceDate:f,onChange:p,format:m,formatDensity:y="dense",selectedSections:v,onSelectedSectionsChange:b,shouldRespectLeadingZeros:S=!1,timezone:w}}=t,{timezone:A,value:_,handleValueChange:P}=o6({timezone:w,value:d,defaultValue:h,onChange:p,valueManager:s}),R=C.useMemo(()=>est(e,A),[e,A]),O=C.useCallback((oe,ie=null)=>a.getSectionsFromValue(e,oe,ie,i,ee=>wZ(e,A,n,m,ee,y,S,i)),[a,m,n,i,S,e,y,A]),N=C.useMemo(()=>a.getValueStrFromSections(O(s.emptyValue),i),[a,O,s.emptyValue,i]),[M,L]=C.useState(()=>{const oe=O(_),ie={sections:oe,value:_,referenceValue:s.emptyValue,tempValueStrAndroid:null},ee=jit(oe),re=s.getInitialReferenceValue({referenceDate:f,value:_,utils:e,props:u,granularity:ee,timezone:A});return X({},ie,{referenceValue:re})}),[F,$]=Ka({controlled:v,default:null,name:"useField",state:"selectedSectionIndexes"}),D=oe=>{$(oe),b?.(oe),L(ie=>X({},ie,{selectedSectionQuery:null}))},k=C.useMemo(()=>
387{if(F==null)return null;if(F==="all")return{startIndex:0,endIndex:M.sections.length-1,shouldSelectBoundarySelectors:!0};if(typeof F=="number")return{startIndex:F,endIndex:F};if(typeof F=="string"){const oe=M.sections.findIndex(ie=>ie.type===F);return{startIndex:oe,endIndex:oe}}return F},[F,M.sections]),U=({value:oe,referenceValue:ie,sections:ee})=>{if(L(fe=>X({},fe,{sections:ee,value:oe,referenceValue:ie,tempValueStrAndroid:null})),s.areValuesEqual(e,M.value,oe))return;const re={validationError:c({adapter:r,value:oe,props:X({},u,{value:oe,timezone:A})})};P(oe,re)},H=(oe,ie)=>{const ee=[...M.sections];return ee[oe]=X({},ee[oe],{value:ie,modified:!0}),zhe(ee,i)},V=()=>{U({value:s.emptyValue,referenceValue:M.referenceValue,sections:O(s.emptyValue)})},q=()=>{if(k==null)return;const oe=M.sections[k.startIndex],ie=a.getActiveDateManager(e,M,oe),re=ie.getSections(M.sections).filter(ve=>ve.value!=="").length===(oe.value===""?0:1),fe=H(k.startIndex,""),we=re?null:e.date(new Date("")),xe=ie.getNewValuesFromNewActiveDate(we);(we!=null&&!e.isValid(we))!=(ie.date!=null&&!e.isValid(ie.date))?U(X({},xe,{sections:fe})):L(ve=>X({},ve,xe,{sections:fe,tempValueStrAndroid:null}))},J=oe=>{const ie=(fe,we)=>{const xe=e.parse(fe,m);if(xe==null||!e.isValid(xe))return null;const ve=wZ(e,A,n,m,xe,y,S,i);return TZ(e,A,xe,ve,we,!1)},ee=a.parseValueStr(oe,M.referenceValue,ie),re=a.updateReferenceValue(e,ee,M.referenceValue);U({value:ee,referenceValue:re,sections:O(ee,M.sections)})},Q=({activeSection:oe,newSectionValue:ie,shouldGoToNextSection:ee})=>{ee&&k&&k.startIndex<M.sections.length-1?D(k.startIndex+1):k&&k.startIndex!==k.endIndex&&D(k.startIndex);const re=a.getActiveDateManager(e,M,oe),fe=H(k.startIndex,ie),we=re.getSections(fe),xe=Zit(e,we);let ve,Re;if(xe!=null&&e.isValid(xe)){const pe=TZ(e,A,xe,we,re.referenceDate,!0);ve=re.getNewValuesFromNewActiveDate(pe),Re=!0}else ve=re.getNewValuesFromNewActiveDate(xe),Re=(xe!=null&&!e.isValid(xe))!=(re.date!=null&&!e.isValid(re.date));return Re?U(X({},ve,{sections:fe})):L(pe=>X({},pe,ve,{sections:fe,tempValueStrAndroid:null}))},se=oe=>L(ie=>X({},ie,{tempValueStrAndroid:oe}));return C.useEffect(()=>{const oe=O(M.value);L(ie=>X({},ie,{sections:oe}))},[m,e.locale]),C.useEffect(()=>{let oe=!1;s.areValuesEqual(e,M.value,_)?oe=s.getTimezone(e,M.value)!==s.getTimezone(e,_):oe=!0,oe&&L(ie
387=>X({},ie,{value:_,referenceValue:a.updateReferenceValue(e,_,ie.referenceValue),sections:O(_)}))},[_]),{state:M,selectedSectionIndexes:k,setSelectedSections:D,clearValue:V,clearActiveSection:q,updateSectionValue:Q,updateValueFromValueStr:J,setTempAndroidValueStr:se,sectionsValueBoundaries:R,placeholder:N,timezone:A}},pst=5e3,mE=t=>t.saveQuery!=null,gst=({sections:t,updateSectionValue:e,sectionsValueBoundaries:n,setTempAndroidValueStr:r,timezone:o})=>{const i=vi(),[s,a]=C.useState(null),l=mn(()=>a(null));C.useEffect(()=>{var f;s!=null&&((f=t[s.sectionIndex])==null?void 0:f.type)!==s.sectionType&&l()},[t,s,l]),C.useEffect(()=>{if(s!=null){const f=setTimeout(()=>l(),pst);return()=>{window.clearTimeout(f)}}return()=>{}},[s,l]);const c=({keyPressed:f,sectionIndex:p},m,y)=>{const v=f.toLowerCase(),b=t[p];if(s!=null&&(!y||y(s.value))&&s.sectionIndex===p){const w=`${s.value}${v}`,A=m(w,b);if(!mE(A))return a({sectionIndex:p,value:w,sectionType:b.type}),A}const S=m(v,b);return mE(S)&&!S.saveQuery?(l(),null):(a({sectionIndex:p,value:v,sectionType:b.type}),mE(S)?null:S)},u=f=>{const p=(v,b,S)=>{const w=b.filter(A=>A.toLowerCase().startsWith(S));return w.length===0?{saveQuery:!1}:{sectionValue:w[0],shouldGoToNextSection:w.length===1}},m=(v,b,S,w)=>{const A=_=>$he(i,o,b.type,_);if(b.contentType==="letter")return p(b.format,A(b.format),v);if(S&&w!=null&&Bhe(i,S).contentType==="letter"){const _=A(S),P=p(S,_,v);return mE(P)?{saveQuery:!1}:X({},P,{sectionValue:w(P.sectionValue,_)})}return{saveQuery:!1}};return c(f,(v,b)=>{switch(b.type){case"month":{const S=w=>xZ(i,w,i.formats.month,b.format);return m(v,b,i.formats.month,S)}case"weekDay":{const S=(w,A)=>A.indexOf(w).toString();return m(v,b,i.formats.weekday,S)}case"meridiem":return m(v,b);default:return{saveQuery:!1}}})},d=f=>{const p=(y,v)=>{const b=+`${y}`,S=n[v.type]({currentDate:null,format:v.format,contentType:v.contentType});if(b>S.maximum)return{saveQuery:!1};if(b<S.minimum)return{saveQuery:!0};const w=+`${y}0`>S.maximum||y.length===S.maximum.toString().length;return{sectionValue:Uhe(i,o,b,S,v),shouldGoToNextSection:w}};return c(f,(y,v)=>{if(v.contentType==="digit"||v.contentType==="digit-with-letter")return p(y,v);if(v.type==="month"){const b=Ghe(i,o,"digit","month","MM"),S=p(y,{type:v.type,format:"MM",hasLeadingZerosInFormat:b,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(mE(S))return S;const w=xZ(i,S.sectionValue,"MM",v.format);return X({},S,{sectionValue:w})}if(v.type==="weekDay"){const b=p(y,v);if(mE(b))return b;const S=JF(i,o,v.format)[Number(b.sectionValue)-1];return X({},b,{sectionValue:S})}return{saveQuery:!1}},y=>!Number.isNaN(Number(y)))};return{applyCharacterEditing:mn(f=>{const p=t[f.sectionIndex],y=!Number.isNaN(Number(f.keyPressed))?d(f):u(f);y==null?r(null):e({activeSection:p,newSectionValue:y.sectionValue,shouldGoToNextSection:y.shouldGoToNextSection})}),resetCharacterQuery:l}};function mst(t,e){return Array.isArray(e)?e.every(n=>t.indexOf(n)!==-1):t.indexOf(e)!==-1}const yst=(t,e)=>n=>{(n.key==="Enter"||n.key===" ")&&(t(n),n.preventDefault(),n.stopPropagation()),e&&e(n)},f2=(t=document)=>{const e=t.activeElement;return e?e.shadowRoot?f2(e.shadowRoot):e:null},vst="@media (pointer: fine)",bst=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],Cst=t=>{const e=vi(),{state:n,selectedSectionIndexes:r,setSelectedSections:o,clearValue:i,clearActiveSection:s,updateSectionValue:a,updateValueFromValueStr:l,setTempAndroidValueStr:c,sectionsValueBoundaries:u,placeholder:d,timezone:h}=fst(t),{inputRef:f,internalProps:p,internalProps:{readOnly:m=!1,unstableFieldRef:y,minutesStep:v},forwardedProps:{onClick:b,onKeyDown:S,onFocus:w,onBlur:A,onMouseUp:_,onPaste:P,error:R,clearable:O,onClear:N,disabled:M},fieldValueManager:L,valueManager:F,validator:$}=t,D=at(t.forwardedProps,bst),{applyCharacterEditing:k,resetCharacterQuery:U}=gst({sections:n.sections,updateSectionValue:a,sectionsValueBoundaries:u,setTempAndroidValueStr:c,timezone:h}),H=C.useRef(null),V=Xr(f,H),q=C.useRef(void 0),Q=Tu().direction==="rtl",se=C.useMemo(()=>rst(n.sections,Q),[n.sections,Q]),oe=()=>{var be;if(m){o(null);return}const Se=(be=H.current.selectionStart)!=null?be:0;let Pe;Se<=n.sections[0].startInInput||Se>=n.sections[n.sections.length-1].endInInput?Pe=1:Pe=n.sections.findIndex(_e=>_e.startInInput-_e.startSeparator.length>Se);const Ue=Pe===-1?n.sections.length-1:Pe-1;o(Ue)},ie=mn((be,...Se)=>{be.isDefaultPrevented()||(b?.(be,...Se),oe())}),ee=mn(be=>{_?.(be),be.preventDefault()}),re=mn((...be)=>{w?.(...be);const Se=H.current;window.clearTimeout(q.current),q.current=setTimeout(()=>{!Se||Se!==H.current||r!=null||m||(Se.value.length&&Number(Se.selectionEnd)-Number(Se.selectionStart)===Se.value.length?o("all"):oe())})}),fe=mn((...be)=>{A?.(...be),o(null)}),we=mn(be=>{if(P?.(be),m){be.preventDefault();return}const Se=be.clipboardData.getData("text");if(r&&r.startIndex===r.endIndex){const Pe=n.sections[r.startIndex],Ue=/^[a-zA-Z]+$/.test(Se),_e=/^[0-9]+$/.test(Se),Oe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Se);if(Pe.contentType==="letter"&&Ue||Pe.contentType==="digit"&&_e||Pe.contentType==="digit-with-letter"&&Oe){U(),a({activeSection:Pe,newSectionValue:Se,shouldGoToNextSection:!0}
387),be.preventDefault();return}if(Ue||_e){be.preventDefault();return}}be.preventDefault(),U(),l(Se)}),xe=mn(be=>{if(m)return;const Se=be.target.value;if(Se===""){U(),i();return}const Pe=be.nativeEvent.data,Ue=Pe&&Pe.length>1,_e=Ue?Pe:Se,Oe=n1(_e);if(r==null||Ue){l(Ue?Pe:Oe);return}let ze;if(r.startIndex===0&&r.endIndex===n.sections.length-1&&Oe.length===1)ze=Oe;else{const ne=n1(L.getValueStrFromSections(n.sections,Q));let W=-1,j=-1;for(let Ie=0;Ie<ne.length;Ie+=1)W===-1&&ne[Ie]!==Oe[Ie]&&(W=Ie),j===-1&&ne[ne.length-Ie-1]!==Oe[Oe.length-Ie-1]&&(j=Ie);const ue=n.sections[r.startIndex];if(W<ue.start||ne.length-j-1>ue.end)return;const Ce=Oe.length-ne.length+ue.end-n1(ue.endSeparator||"").length;ze=Oe.slice(ue.start+n1(ue.startSeparator||"").length,Ce)}if(ze.length===0){nst()?c(_e):(U(),s());return}k({keyPressed:ze,sectionIndex:r.startIndex})}),ve=mn(be=>{switch(S?.(be),!0){case(be.key==="a"&&(be.ctrlKey||be.metaKey)):{be.preventDefault(),o("all");break}case be.key==="ArrowRight":{if(be.preventDefault(),r==null)o(se.startIndex);else if(r.startIndex!==r.endIndex)o(r.endIndex);else{const Se=se.neighbors[r.startIndex].rightIndex;Se!==null&&o(Se)}break}case be.key==="ArrowLeft":{if(be.preventDefault(),r==null)o(se.endIndex);else if(r.startIndex!==r.endIndex)o(r.startIndex);else{const Se=se.neighbors[r.startIndex].leftIndex;Se!==null&&o(Se)}break}case be.key==="Delete":{if(be.preventDefault(),m)break;r==null||r.startIndex===0&&r.endIndex===n.sections.length-1?i():s(),U();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(be.key):{if(be.preventDefault(),m||r==null)break;const Se=n.sections[r.startIndex],Pe=L.getActiveDateManager(e,n,Se),Ue=Xit(e,h,Se,be.key,u,Pe.date,{minutesStep:v});a({activeSection:Se,newSectionValue:Ue,shouldGoToNextSection:!1});break}}});Ls(()=>{if(!H.current)return;if(r==null){H.current.scrollLeft&&(H.current.scrollLeft=0);return}const be=n.sections[r.startIndex],Se=n.sections[r.endIndex];let Pe=be.startInInput,Ue=Se.endInInput;if(r.shouldSelectBoundarySelectors&&(Pe-=be.startSeparator.length,Ue+=Se.endSeparator.length),Pe!==H.current.selectionStart||Ue!==H.current.selectionEnd){const _e=H.current.scrollTop;H.current===f2(document)&&H.current.setSelectionRange(Pe,Ue),H.current.scrollTop=_e}});const Re=Yhe(X({},p,{value:n.value,timezone:h}),$,F.isSameError,F.defaultErrorState),pe=C.useMemo(()=>R!==void 0?R:F.hasError(Re),[F,Re,R]);C.useEffect(()=>{!pe&&!r&&U()},[n.referenceValue,r,pe]),C.useEffect(()=>(H.current&&H.current===document.activeElement&&o("all"),()=>window.clearTimeout(q.current)),[]),C.useEffect(()=>{n.tempValueStrAndroid!=null&&r!=null&&(U(),s())},[n.tempValueStrAndroid]);const Be=C.useMemo(()=>{var be;return(be=n.tempValueStrAndroid)!=null?be:L.getValueStrFromSections(n.sections,Q)},[n.sections,L,n.tempValueStrAndroid,Q]),ke=C.useMemo(()=>r==null||n.sections[r.startIndex].contentType==="letter"?"text":"numeric",[r,n.sections]),Ne=H.current&&H.current===f2(document),ot=F.areValuesEqual(e,n.value,F.emptyValue),ce=!Ne&&ot;C.useImperativeHandle(y,()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var be,Se,Pe;const Ue=(be=H.current.selectionStart)!=null?be:0,_e=(Se=H.current.selectionEnd)!=null?Se:0,Oe=!!((Pe=H.current)!=null&&Pe.readOnly);if(Ue===0&&_e===0||Oe)return null;const ze=Ue<=n.sections[0].startInInput?1:n.sections.findIndex(ne=>ne.startInInput-ne.startSeparator.length>Ue);return ze===-1?n.sections.length-1:ze-1},setSelectedSections:be=>o(be)}));const Ae=mn((be,...Se)=>{var Pe;be.preventDefault(),N?.(be,...Se),i(),H==null||(Pe=H.current)==null||Pe.focus(),o(0)});return X({placeholder:d,autoComplete:"off",disabled:!!M},D,{value:ce?"":Be,inputMode:ke,readOnly:m,onClick:ie,onFocus:re,onBlur:fe,onPaste:we,onChange:xe,onKeyDown:ve,onMouseUp:ee,onClear:Ae,error:pe,ref:V,clearable:!!(O&&!ot&&!m&&!M)})},eB=({props:t,value:e,adapter:n})=>{if(e===null)return null;const{shouldDisableDate:r,shouldDisableMonth:o,shouldDisableYear:i,disablePast:s,disableFuture:a,timezone:l}=t,c=n.utils.dateWithTimezone(void 0,l),u=wh(n.utils,t.minDate,n.defaultDates.minDate),d=wh(n.utils,t.maxDate,n.defaultDates.maxDate);switch(!0){case!n.utils.isValid(e):return"invalidDate";case!!(r&&r(e)):return"shouldDisableDate";case!!(o&&o(e)):return"shouldDisableMonth";case!!(i&&i(e)):return"shouldDisableYear";case!!(a&&n.utils.isAfterDay(e,c)):return"disableFuture";case!!(s&&n.utils.isBeforeDay(e,c)):return"disablePast";case!!(u&&n.utils.isBeforeDay(e,u)):return"minDate";case!!(d&&n.utils.isAfterDay(e,d)):return"maxDate";default:return null}},A4=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],T4=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],Xhe=["minDateTime","maxDateTime"],Sst=[...A4,...T4,...Xhe],Khe=t=>Sst.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{}),Est=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],xst=(t,e)=>{const n=X({},t),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return Est.forEach(o),e==="date"?A4.forEach(o):e==="time"?T4.forEach(o):e==="date-time"&&(A4.forEach(o),T4.forEach(o),Xhe.forEach(o)),{forwardedProps:n,internalProps:r}},wst=t=>{var e,n,r;const o=vi(),i=IR();return X({},t,{disablePast:(e=t.disablePast)!=null?e:!1,disableFuture:(n=t.disableFuture)!=null?n:!1,format:(r=t.format)!=null?r:o.formats.keyboardDate,minDate:wh(o,t.minDate,i.minDate),maxDate:wh(o,t.maxDate,i.maxDate)})},Ast=({props:t,inputRef:e})=>{const n=wst(t),{forwardedProps:r,internalProps:o}=xst(n,"date");return Cst({inputRef:e,forwardedProps:r,internalProps:o,valueManager:Cm,fieldValueManager:ist,validator:eB,valueType:"date"})},Tst=$e(Iu)({[`& .${D_.container}`]:{outline:0},[`& .${D_.paper}`]:{outline:0,minWidth:ZF}}),_st=$e(ZC)({"&:first-of-type":{padding:0}});function Ist(t){var e,n;const{children:r,onDismiss:o,open:i,slots:s,slotProps:a}=t,l=(e=s?.dialog)!=null?e:Tst,c=(n=s?.mobileTransition)!=null?n:rw;return g(l,X({open:i,onClose:o},a?.dialog,{TransitionComponent:c,TransitionProps:a?.mobileTransition,PaperComponent:s?.mobilePaper,PaperProps:a?.mobilePaper,children:g(_st,{children:r})}))}function Pst(t){return Ft("MuiPickersPopper",t)}Dt("MuiPickersPopper",["root","paper"]);const Rst="@media (prefers-reduced-motion: reduce)",E1=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),_Z=E1&&E1[1]?parseInt(E1[1],10):null,IZ=E1&&E1[2]?parseInt(E1[2],10):null,Ost=_Z&&_Z<10||IZ&&IZ<13||!1,Qhe=()=>Vae(Rst,{defaultMatches:!1})||Ost,Nst=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],Mst=t=>{const{classes:e}=t;return Lt({root:["root"],paper:["paper"]},Pst,e)},Dst=$e(g0,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.modal})),Lst=$e(To,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(t,e)=>e.paper})(({ownerState:t})=>X({outline:0,transformOrigin:"top center"},t.placement.includes("top")&&{transformOrigin:"bottom center"}));function kst(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function Fst(t,e){const n=C.useRef(!1),r=C.useRef(!1),o=C.useRef(null),i=C.useRef(!1);C.useEffect(()=>{if(!t)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[t]);const s=mn(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=Ji(o.current);if(!o.current||"clientX"in l&&kst(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&e(l)}),a=()=>{r.current=!0};return C.useEffect(()=>{if(t){const l=Ji(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",s),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",s),l.removeEventListener("touchmove",c)}}},[t,s]),C.useEffect(()=>{if(t){const l=Ji(o.current);
387return l.addEventListener("click",s),()=>{l.removeEventListener("click",s),r.current=!1}}},[t,s]),[o,a,a]}const Bst=C.forwardRef((t,e)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:s,paperClasses:a,onPaperClick:l,onPaperTouchStart:c}=t,u=at(t,Nst),d=X({},o,{placement:r}),h=ao({elementType:n,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:e},className:a,ownerState:d});return g(n,X({},u,h,{onClick:f=>{var p;l(f),(p=h.onClick)==null||p.call(h,f)},onTouchStart:f=>{var p;c(f),(p=h.onTouchStart)==null||p.call(h,f)},ownerState:d,children:i}))});function $st(t){var e,n,r,o;const i=Ht({props:t,name:"MuiPickersPopper"}),{anchorEl:s,children:a,containerRef:l=null,shouldRestoreFocus:c,onBlur:u,onDismiss:d,open:h,role:f,placement:p,slots:m,slotProps:y,reduceAnimations:v}=i;C.useEffect(()=>{function V(q){h&&(q.key==="Escape"||q.key==="Esc")&&d()}return document.addEventListener("keydown",V),()=>{document.removeEventListener("keydown",V)}},[d,h]);const b=C.useRef(null);C.useEffect(()=>{f==="tooltip"||c&&!c()||(h?b.current=f2(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[h,f,c]);const[S,w,A]=Fst(h,u??d),_=C.useRef(null),P=Xr(_,l),R=Xr(P,S),O=i,N=Mst(O),M=Qhe(),L=v??M,F=V=>{V.key==="Escape"&&(V.stopPropagation(),d())},$=((e=m?.desktopTransition)!=null?e:L)?rw:GI,D=(n=m?.desktopTrapFocus)!=null?n:JG,k=(r=m?.desktopPaper)!=null?r:Lst,U=(o=m?.popper)!=null?o:Dst,H=ao({elementType:U,externalSlotProps:y?.popper,additionalProps:{transition:!0,role:f,open:h,anchorEl:s,placement:p,onKeyDown:F},className:N.root,ownerState:i});return g(U,X({},H,{children:({TransitionProps:V,placement:q})=>g(D,X({open:h,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:f==="tooltip",isEnabled:()=>!0},y?.desktopTrapFocus,{children:g($,X({},V,y?.desktopTransition,{children:g(Bst,{PaperComponent:k,ownerState:O,popperPlacement:q,ref:R,onPaperClick:w,onPaperTouchStart:A,paperClasses:N.paper,paperSlotProps:y?.desktopPaper,children:a})}))}))}))}function Hst(t){return Ft("MuiPickersToolbar",t)}Dt("MuiPickersToolbar",["root","content"]);const Ust=t=>{const{classes:e,isLandscape:n}=t;return Lt({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},Hst,e)},zst=$e("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>X({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},e.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})),Vst=$e("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(t,e)=>e.content})(({ownerState:t})=>{var e;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:t.isLandscape?"flex-start":"space-between",flexDirection:t.isLandscape?(e=t.landscapeDirection)!=null?e:"column":"row",flex:1,alignItems:t.isLandscape?"flex-start":"center"}}),Gst=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:s,hidden:a,titleId:l}=r,c=r,u=Ust(c);return a?null:K(zst,{ref:n,className:Ye(u.root,i),ownerState:c,children:[g(Ke,{color:"text.secondary",variant:"overline",id:l,children:s}),g(Vst,{className:u.content,ownerState:c,children:o})]})}),Wst=({open:t,onOpen:e,onClose:n})=>{const r=C.useRef(typeof t=="boolean").current,[o,i]=C.useState(!1);C.useEffect(()=>{if(r){if(typeof t!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(t)}},[r,t]);const s=C.useCallback(a=>{r||i(a),a&&e&&e(),!a&&n&&n()},[r,e,n]);return{isOpen:o,setIsOpen:s}},jst=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o}=t,i=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromField"?!0:e.name==="setValueFromAction"?i&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastPublishedValue):e.name==="setValueFromView"&&e.selectionState!=="shallow"||e.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},qst=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=t,s=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromAction"?s&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastCommittedValue):e.name==="setValueFromVie
387w"&&e.selectionState==="finish"&&i?s?!0:n(r.lastCommittedValue):e.name==="setValueFromShortcut"?e.changeImportance==="accept"&&n(r.lastCommittedValue):!1},Yst=t=>{const{action:e,closeOnSelect:n}=t;return e.name==="setValueFromAction"?!0:e.name==="setValueFromView"?e.selectionState==="finish"&&n:e.name==="setValueFromShortcut"?e.changeImportance==="accept":!1},Xst=({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:s,value:a,defaultValue:l,closeOnSelect:c=r==="desktop",selectedSections:u,onSelectedSectionsChange:d,timezone:h}=t,{current:f}=C.useRef(l),{current:p}=C.useRef(a!==void 0),m=vi(),y=iS(),[v,b]=Ka({controlled:u,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:S,setIsOpen:w}=Wst(t),[A,_]=C.useState(()=>{let re;return a!==void 0?re=a:f!==void 0?re=f:re=e.emptyValue,{draft:re,lastPublishedValue:re,lastCommittedValue:re,lastControlledValue:a,hasBeenModifiedSinceMount:!1}}),{timezone:P,handleValueChange:R}=o6({timezone:h,value:a,defaultValue:f,onChange:s,valueManager:e});Yhe(X({},t,{value:A.draft,timezone:P}),o,e.isSameError,e.defaultErrorState);const O=mn(re=>{const fe={action:re,dateState:A,hasChanged:Re=>!e.areValuesEqual(m,re.value,Re),isControlled:p,closeOnSelect:c},we=jst(fe),xe=qst(fe),ve=Yst(fe);if(_(Re=>X({},Re,{draft:re.value,lastPublishedValue:we?re.value:Re.lastPublishedValue,lastCommittedValue:xe?re.value:Re.lastCommittedValue,hasBeenModifiedSinceMount:!0})),we){const pe={validationError:re.name==="setValueFromField"?re.context.validationError:o({adapter:y,value:re.value,props:X({},t,{value:re.value,timezone:P})})};re.name==="setValueFromShortcut"&&re.shortcut!=null&&(pe.shortcut=re.shortcut),R(re.value,pe)}xe&&i&&i(re.value),ve&&w(!1)});if(a!==void 0&&(A.lastControlledValue===void 0||!e.areValuesEqual(m,A.lastControlledValue,a))){const re=e.areValuesEqual(m,A.draft,a);_(fe=>X({},fe,{lastControlledValue:a},re?{}:{lastCommittedValue:a,lastPublishedValue:a,draft:a,hasBeenModifiedSinceMount:!0}))}const N=mn(()=>{O({value:e.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),M=mn(()=>{O({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),L=mn(()=>{O({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),F=mn(()=>{O({value:A.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),$=mn(()=>{O({value:e.getTodayValue(m,P,n),name:"setValueFromAction",pickerAction:"today"})}),D=mn(()=>w(!0)),k=mn(()=>w(!1)),U=mn((re,fe="partial")=>O({name:"setValueFromView",value:re,selectionState:fe})),H=mn((re,fe,we)=>O({name:"setValueFromShortcut",value:re,changeImportance:fe??"accept",shortcut:we})),V=mn((re,fe)=>O({name:"setValueFromField",value:re,context:fe})),q=mn(re=>{b(re),d?.(re)}),J={onClear:N,onAccept:M,onDismiss:L,onCancel:F,onSetToday:$,onOpen:D,onClose:k},Q={value:A.draft,onChange:V,selectedSections:v,onSelectedSectionsChange:q},se=C.useMemo(()=>e.cleanValue(m,A.draft),[m,e,A.draft]),oe={value:se,onChange:U,onClose:k,open:S,onSelectedSectionsChange:q},ee=X({},J,{value:se,onChange:U,onSelectShortcut:H,isValid:re=>{const fe=o({adapter:y,value:re,props:X({},t,{value:re,timezone:P})});return!e.hasError(fe)}});return{open:S,fieldProps:Q,viewProps:oe,layoutProps:ee,actions:J}},Kst=["className","sx"],Qst=({props:t,propsFromPickerValue:e,additionalViewProps:n,inputRef:r,autoFocusView:o})=>{const{onChange:i,open:s,onSelectedSectionsChange:a,onClose:l}=e,{views:c,openTo:u,onViewChange:d,viewRenderers:h,timezone:f}=t,p=at(t,Kst),{view:m,setView:y,defaultView:v,focusedView:b,setFocusedView:S,setValueAndGoToNextView:w}=khe({view:void 0,views:c,openTo:u,onChange:i,onViewChange:d,autoFocus:o}),{hasUIView:A,viewModeLookup:_}=C.useMemo(()=>c.reduce((F,$)=>{let D;return h[$]!=null?D="UI":D="field",F.viewModeLookup[$]=D,D==="UI"&&(F.hasUIView=!0),F},{hasUIView:!1,viewModeLookup:{}}),[h,c]),P=C.useMemo(()=>c.reduce((F,$)=>h[$]!=null&&kit($)?F+1:F,0),[h,c]),R=_[m],O=mn(()=>R==="UI"),[N,M]=C.useState(R==="UI"?m:null);return N!==m&&_[m]==="UI"&&M(m),Ls(()=>{R==="field"&&s&&(l(),setTimeout(()=>{r?.current.focus(),a(m)}))},[m]),Ls(()=>
387{if(!s)return;let F=m;R==="field"&&N!=null&&(F=N),F!==v&&_[F]==="UI"&&_[v]==="UI"&&(F=v),F!==m&&y(F),S(F,!0)},[s]),{hasUIView:A,shouldRestoreFocus:O,layoutProps:{views:c,view:N,onViewChange:y},renderCurrentView:()=>{if(N==null)return null;const F=h[N];return F==null?null:F(X({},p,n,e,{views:c,timezone:f,onChange:w,view:N,onViewChange:y,focusedView:b,onFocusedViewChange:S,showViewSwitcher:P>1,timeViewsCount:P}))}}};function PZ(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const Zst=(t,e)=>{const[n,r]=C.useState(PZ);return Ls(()=>{const i=()=>{r(PZ())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),mst(t,["hours","minutes","seconds"])?!1:(e||n)==="landscape"},Jst=({props:t,propsFromPickerValue:e,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=t,i=Zst(n.views,o);return{layoutProps:X({},n,e,{isLandscape:i,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}},Zhe=(t,e="warning")=>{let n=!1;const r=Array.isArray(t)?t.join(` 388`):t;return()=>{n||(n=!0,e==="error"?console.error(r):console.warn(r))}};Zhe(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const Jhe=({props:t,valueManager:e,valueType:n,wrapperVariant:r,inputRef:o,additionalViewProps:i,validator:s,autoFocusView:a})=>{const l=Xst({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:s}),c=Qst({props:t,inputRef:o,additionalViewProps:i,autoFocusView:a,propsFromPickerValue:l.viewProps}),u=Jst({props:t,wrapperVariant:r,propsFromPickerValue:l.layoutProps,propsFromPickerViews:c.layoutProps});return{open:l.open,actions:l.actions,fieldProps:l.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:u.layoutProps}};function efe(t){return Ft("MuiPickersLayout",t)}const m5=Dt("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),eat=["onAccept","onClear","onCancel","onSetToday","actions"];function tat(t){const{onAccept:e,onClear:n,onCancel:r,onSetToday:o,actions:i}=t,s=at(t,eat),a=w0();if(i==null||i.length===0)return null;const l=i?.map(c=>{switch(c){case"clear":return g(Sn,{onClick:n,children:a.clearButtonLabel},c);case"cancel":return g(Sn,{onClick:r,children:a.cancelButtonLabel},c);case"accept":return g(Sn,{onClick:e,children:a.okButtonLabel},c);case"today":return g(Sn,{onClick:o,children:a.todayButtonLabel},c);default:return null}});return g(Jp,X({},s,{children:l}))}const nat=["items","changeImportance","isLandscape","onChange","isValid"],rat=["getValue"];function oat(t){const{items:e,changeImportance:n,onChange:r,isValid:o}=t,i=at(t,nat);if(e==null||e.length===0)return null;const s=e.map(a=>{let{getValue:l}=a,c=at(a,rat);const u=l({isValid:o});return{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)}});return g(iw,X({dense:!0,sx:[{maxHeight:t6,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:s.map(a=>g(RC,{children:g(m0,X({},a))},a.label))}))}function iat(t){return t.view!==null}const sat=t=>{const{classes:e,isLandscape:n}=t;return Lt({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},efe,e)},aat=t=>{var e,n;const{wrapperVariant:r,onAccept:o,onClear:i,onCancel:s,onSetToday:a,view:l,views:c,onViewChange:u,value:d,onChange:h,onSelectShortcut:f,isValid:p,isLandscape:m,disabled:y,readOnly:v,children:b,components:S,componentsProps:w,slots:A,slotProps:_}=t,P=A??Whe(S),R=_??w,O=sat(t),N=(e=P?.actionBar)!=null?e:tat,M=ao({elementType:N,externalSlotProps:R?.actionBar,additionalProps:{onAccept:o,onClear:i,onCancel:s,onSetToday:a,actions:r==="desktop"?[]:["cancel","accept"],className:O.actionBar},ownerState:X({},t,{wrapperVariant:r})}),L=g(N,X({},M)),F=P?.toolbar,$=ao({elementType:F,externalSlotProps:R?.toolbar,additionalProps:{isLandscape:m,onCh
388ange:h,value:d,view:l,onViewChange:u,views:c,disabled:y,readOnly:v,className:O.toolbar},ownerState:X({},t,{wrapperVariant:r})}),D=iat($)&&F?g(F,X({},$)):null,k=b,U=P?.tabs,H=l&&U?g(U,X({view:l,onViewChange:u,className:O.tabs},R?.tabs)):null,V=(n=P?.shortcuts)!=null?n:oat,q=ao({elementType:V,externalSlotProps:R?.shortcuts,additionalProps:{isValid:p,isLandscape:m,onChange:f,className:O.shortcuts},ownerState:{isValid:p,isLandscape:m,onChange:f,className:O.shortcuts,wrapperVariant:r}}),J=l&&V?g(V,X({},q)):null;return{toolbar:D,content:k,tabs:H,actionBar:L,shortcuts:J}},lat=aat,cat=t=>{const{isLandscape:e,classes:n}=t;return Lt({root:["root",e&&"landscape"],contentWrapper:["contentWrapper"]},efe,n)},tfe=$e("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${m5.toolbar}`]:e.isLandscape?{gridColumn:t.direction==="rtl"?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${m5.shortcuts}`]:e.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:t.direction==="rtl"?3:1,gridRow:"2 / 3"},[`& .${m5.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}));tfe.propTypes={as:ge.elementType,ownerState:ge.shape({isLandscape:ge.bool.isRequired}).isRequired,sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object])};const uat=$e("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),nfe=function(e){const n=Ht({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:o,tabs:i,actionBar:s,shortcuts:a}=lat(n),{sx:l,className:c,isLandscape:u,ref:d,wrapperVariant:h}=n,f=n,p=cat(f);return K(tfe,{ref:d,sx:l,className:Ye(c,p.root),ownerState:f,children:[u?a:r,u?r:a,g(uat,{className:p.contentWrapper,children:h==="desktop"?K(C.Fragment,{children:[o,i]}):K(C.Fragment,{children:[i,o]})}),s]})},dat=t=>Ft("MuiPickersSlideTransition",t),$d=Dt("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),hat=["children","className","reduceAnimations","slideDirection","transKey","classes"],fat=t=>{const{classes:e,slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Lt(r,dat,e)},pat=$e(QG,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`.${$d["slideEnter-left"]}`]:e["slideEnter-left"]},{[`.${$d["slideEnter-right"]}`]:e["slideEnter-right"]},{[`.${$d.slideEnterActive}`]:e.slideEnterActive},{[`.${$d.slideExit}`]:e.slideExit},{[`.${$d["slideExitActiveLeft-left"]}`]:e["slideExitActiveLeft-left"]},{[`.${$d["slideExitActiveLeft-right"]}`]:e["slideExitActiveLeft-right"]}]})(({theme:t})=>{const e=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${$d["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${$d["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${$d.slideEnterActive}`]:{transform:"translate(0%)",transition:e},[`& .${$d.slideExit}`]:{transform:"translate(0%)"},[`& .${$d["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},[`& .${$d["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}});function gat(t){const e=Ht({props:t,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=at(e,hat),a=fat(e),l=Tu();if(o)return g("div",{className:Ye(a.root,r),children:n});const c={exit:a.exit,enterActive:a.enterActive,enter:a.enter,exitActive:a.exitActive};return g(pat,{className:Ye(a.root,r),childFactory:u=>C.cloneElement(u,{classNames:c}),role:"presentation",children:g(Ake,X({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},s,{children:n}),i)})}const rfe=({shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s,timezone:a})=>{const l=iS();return C.useCallback(c=>eB({adapter:l,value:c,props:{shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s,timezone:a}})!==null,[l,t,e,n,r,o,i,s,a])},mat=t=>Ft("MuiDayCalendar",t);Dt("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const yat=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],vat=["ownerState"],bat=t=>{const{classes:e}=t;return Lt({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},mat,e)},ofe=(oP+QF*2)*6,Cat=$e("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Sat=$e("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(t,e)=>e.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Eat=$e(Ke,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(t,e)=>e.weekDayLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary})),xat=$e(Ke,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(t,e)=>e.weekNumberLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled})),wat=$e(Ke,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(t,e)=>e.weekNumber})(({theme:t})=>X({},t.typography.caption,{width:oP,height:oP,padding:0,margin:`0 ${QF}px`,color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),Aat=$e("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(t,e)=>e.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:ofe}),Tat=$e(gat,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(t,e)=>e.slideTransition})({minHeight:ofe}),_at=$e("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(t,e)=>e.monthContainer})({overflow:"hidden"}),Iat=$e("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(t,e)=>e.weekContainer})({margin:`${QF}px 0`,display:"flex",justifyContent:"center"});function Pat(t){var e,n,r;let{parentProps:o,day:i,focusableDay:s,selectedDays:a,isDateDisabled:l,currentMonthNumber:c,isViewFocused:u}=t,d=at(t,yat);const{disabled:h,disableHighlightToday:f,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:m,components:y,componentsProps:v,slots:b,slotProps:S,timezone:w}=o,A=vi(),_=KF(w),P=s!==null&&A.isSameDay(i,s),R=a.some(U=>A.isSameDay(U,i)),O=A.isSameDay(i,_),N=(e=(n=b?.day)!=null?n:y?.Day)!=null?e:hst,M=ao({elementType:N,externalSlotProps:(r=S?.day)!=null?r:v?.day,additionalProps:X({disableHighlightToday:f,showDaysOutsideCurrentMonth:m,role:"gridcell",isAnimating:p,"data-timestamp":A.toJsDate(i).valueOf()},d),ownerState:X({},o,{day:i,selected:R})}),L=at(M,vat),F=C.useMemo(()=>h||l(i),[h,l,i]),$=C.useMemo(()=>A.getMonth(i)!==c,[A,i,c]),D=C.useMemo(()=>{const U=A.startOfMonth(A.setMonth(i,c));return m?A.isSameDay(i,A.startOfWeek(U)):A.isSameDay(i,U)},[c,i,m,A]),k=C.useMemo(()=>{const U=A.endOfMonth(A.setMonth(i,c));return m?A.isSameDay(i,A.endOfWeek(U)):A.isSameDay(i,U)},[c,i,m,A]);return g(N,X({},L,{day:i,disabled:F,autoFocus:u&&P,today:O,outsideCurrentMonth:$,isFirstVisibleCell:D,isLastVisibleCell:k,selected:R,tabIndex:P?0:-1,"aria-selected":R,"aria-current":O?"date":void 0}))}function Rat(t){const e=Ht({props:t,name:"MuiDayCalendar"}),{onFocusedDayChange:n,className:r,currentMonth:o,selectedDays:i,focusedDay:s,loading:a,onSelectedDaysChange:l,onMonthSwitchingAnimationEnd:c,readOnly:u,reduceAnimations:d,renderLoading:h=()=>g("span",{children:"..."}),slideDirection:f,TransitionProps:p,disablePast:m,disableFuture:y,minDate:v,maxDate:b,shouldDisableDate:S,shouldDisableMonth:w,shouldDisableYear:A,dayOfWeekFormatter:_,hasFocus:P,onFocusedViewChange:R,gridLabelId:O,displayWeekNumber:N,fixedWeekNumber:M,autoFocus:L,timezone:F}=e,$=KF(F),D=vi(),k=bat(e),H=Tu().direction==="rtl",V=_||((ce,Ae)=>D.format(Ae,"weekdayShort").charAt(0).toUpperCase()),q=rfe({shouldDisableDate:S,shouldDisableMonth:w,shouldDisableYear:A,minDate:v,maxDate:b,disablePast:m,disableFuture:y,timezone:F}),J=w0(),[Q,se]=Ka({name:"DayCalendar",state:"hasFocus",controlled:P,default:L??!1}),[oe,ie]=C.useState(()=>s||$),ee=mn(ce=>{u||l(ce)}),re=ce=>{q(ce)||(n(ce),ie(ce),R?.(!0),se(!0))},fe=mn((ce,Ae)=>{switch(ce.key){case"ArrowUp":re(D.addDays(Ae,-7)),ce.preventDefault();break;case"ArrowDown":re(D.addDays(Ae,7)),ce.preventDefault();break;case"ArrowLeft":{const be=D.addDays(Ae,H?1:-1),Se=D.addMonths(Ae,H?1:-1),Pe=$_({utils:D,date:be,minDate:H?be:D.startOfMonth(Se),maxDate:H?D.endOfMonth(Se):be,isDateDisabled:q,timezone:F});re(Pe||be),ce.preventDefault();break}case"ArrowRight":{const be=D.addDays(Ae,H?-1:1),Se=D.addMonths(Ae,H?-1:1),Pe=$_({utils:D,date:be,minDate:H?D.startOfMonth(Se):be,maxDate:H?be:D.endOfMonth(Se),isDateDisabled:q,timezone:F});re(Pe||be),ce.preventDefault();break}case"Home":re(D.startOfWeek(Ae)),ce.preventDefault();break;case"End":re(D.endOfWeek(Ae)),ce.preventDefault();break;
388case"PageUp":re(D.addMonths(Ae,1)),ce.preventDefault();break;case"PageDown":re(D.addMonths(Ae,-1)),ce.preventDefault();break}}),we=mn((ce,Ae)=>re(Ae)),xe=mn((ce,Ae)=>{Q&&D.isSameDay(oe,Ae)&&R?.(!1)}),ve=D.getMonth(o),Re=C.useMemo(()=>i.filter(ce=>!!ce).map(ce=>D.startOfDay(ce)),[D,i]),pe=ve,Be=C.useMemo(()=>C.createRef(),[pe]),ke=D.startOfWeek($),Ne=C.useMemo(()=>{const ce=D.startOfMonth(o),Ae=D.endOfMonth(o);return q(oe)||D.isAfterDay(oe,Ae)||D.isBeforeDay(oe,ce)?$_({utils:D,date:oe,minDate:ce,maxDate:Ae,disablePast:m,disableFuture:y,isDateDisabled:q,timezone:F}):oe},[o,y,m,oe,q,D,F]),ot=C.useMemo(()=>{const ce=D.setTimezone(o,F),Ae=D.getWeekArray(ce);let be=D.addMonths(ce,1);for(;M&&Ae.length<M;){const Se=D.getWeekArray(be),Pe=D.isSameDay(Ae[Ae.length-1][0],Se[0][0]);Se.slice(Pe?1:0).forEach(Ue=>{Ae.length<M&&Ae.push(Ue)}),be=D.addMonths(be,1)}return Ae},[o,M,D,F]);return K(Cat,{role:"grid","aria-labelledby":O,className:k.root,children:[K(Sat,{role:"row",className:k.header,children:[N&&g(xat,{variant:"caption",role:"columnheader","aria-label":J.calendarWeekNumberHeaderLabel,className:k.weekNumberLabel,children:J.calendarWeekNumberHeaderText}),Wit(D,$).map((ce,Ae)=>{var be;const Se=D.format(ce,"weekdayShort");return g(Eat,{variant:"caption",role:"columnheader","aria-label":D.format(D.addDays(ke,Ae),"weekday"),className:k.weekDayLabel,children:(be=V?.(Se,ce))!=null?be:Se},Se+Ae.toString())})]}),a?g(Aat,{className:k.loadingContainer,children:h()}):g(Tat,X({transKey:pe,onExited:c,reduceAnimations:d,slideDirection:f,className:Ye(r,k.slideTransition)},p,{nodeRef:Be,children:g(_at,{ref:Be,role:"rowgroup",className:k.monthContainer,children:ot.map((ce,Ae)=>K(Iat,{role:"row",className:k.weekContainer,"aria-rowindex":Ae+1,children:[N&&g(wat,{className:k.weekNumber,role:"rowheader","aria-label":J.calendarWeekNumberAriaLabelText(D.getWeekNumber(ce[0])),children:J.calendarWeekNumberText(D.getWeekNumber(ce[0]))}),ce.map((be,Se)=>g(Pat,{parentProps:e,day:be,selectedDays:Re,focusableDay:Ne,onKeyDown:fe,onFocus:we,onBlur:xe,onDaySelect:ee,isDateDisabled:q,currentMonthNumber:ve,isViewFocused:Q,"aria-colindex":Se+1},be.toString()))]},`week-${ce[0]}`))})}))]})}const Oat=(t,e,n)=>(r,o)=>{switch(o.type){case"changeMonth":return X({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!t});case"finishMonthSwitchingAnimation":return X({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!e&&!n.isSameMonth(r.currentMonth,o.focusedDay);return X({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!t&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},Nat=t=>{const{value:e,referenceDate:n,defaultCalendarMonth:r,disableFuture:o,disablePast:i,disableSwitchToMonthOnDayFocus:s=!1,maxDate:a,minDate:l,onMonthChange:c,reduceAnimations:u,shouldDisableDate:d,timezone:h}=t,f=vi(),p=C.useRef(Oat(!!u,s,f)).current,m=C.useMemo(()=>{let P=null;return n?P=n:r&&(P=f.startOfMonth(r)),Cm.getInitialReferenceValue({value:e,utils:f,timezone:h,props:t,referenceDate:P,granularity:vp.day})},[]),[y,v]=C.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:f.startOfMonth(m),slideDirection:"left"}),b=C.useCallback(P=>{v(X({type:"changeMonth"},P)),c&&c(P.newMonth)},[c]),S=C.useCallback(P=>{const R=P;f.isSameMonth(R,y.currentMonth)||b({newMonth:f.startOfMonth(R),direction:f.isAfterDay(R,y.currentMonth)?"left":"right"})},[y.currentMonth,b,f]),w=rfe({shouldDisableDate:d,minDate:l,maxDate:a,disableFuture:o,disablePast:i,timezone:h}),A=C.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]),_=mn((P,R)=>{w(P)||v({type:"changeFocusedDay",focusedDay:P,withoutMonthSwitchingAnimation:R})});return{referenceDate:m,calendarState:y,changeMonth:S,changeFocusedDay:_,isDateDisabled:w,onMonthSwitchingAnimationEnd:A,handleChangeMonth:b}},Mat=["ownerState"],Dat=({clearable:t,fieldProps:e,InputProps:n,onClear:r,slots:o,slotProps:i,components:s,componentsProps:a})=>{var l,c,u,d,h,f;const p=w0(),m=(l=(c=o?.clearButton)!=null?c:s?.ClearButton)!=null?l:Di,y=ao({elementType:m,externalSlotProps:(u=i?.clearButton)!=null?u:a?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:p.fieldClearLabel}}
388),v=at(y,Mat),b=(d=(h=o?.clearIcon)!=null?h:s?.ClearIcon)!=null?d:Ait,S=ao({elementType:b,externalSlotProps:(f=i?.clearIcon)!=null?f:a?.clearIcon,ownerState:{}}),w=X({},n,{endAdornment:K(C.Fragment,{children:[t&&g(qr,{position:"end",sx:{marginRight:n!=null&&n.endAdornment?-1:-1.5},children:g(m,X({},v,{onClick:r,children:g(b,X({fontSize:"small"},S))}))}),n?.endAdornment]})}),A=X({},e,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(e.sx)?e.sx:[e.sx]]});return{InputProps:w,fieldProps:A}},Lat=["components","componentsProps","slots","slotProps","InputProps","inputProps"],kat=["inputRef"],Fat=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],ife=C.forwardRef(function(e,n){var r,o,i;const s=Ht({props:e,name:"MuiDateField"}),{components:a,componentsProps:l,slots:c,slotProps:u,InputProps:d,inputProps:h}=s,f=at(s,Lat),p=s,m=(r=(o=c?.textField)!=null?o:a?.TextField)!=null?r:lo,y=ao({elementType:m,externalSlotProps:(i=u?.textField)!=null?i:l?.textField,externalForwardedProps:f,ownerState:p}),{inputRef:v}=y,b=at(y,kat);b.inputProps=X({},h,b.inputProps),b.InputProps=X({},d,b.InputProps);const S=Ast({props:b,inputRef:v}),{ref:w,onPaste:A,onKeyDown:_,inputMode:P,readOnly:R,clearable:O,onClear:N}=S,M=at(S,Fat),{InputProps:L,fieldProps:F}=Dat({onClear:N,clearable:O,fieldProps:M,InputProps:M.InputProps,slots:c,slotProps:u,components:a,componentsProps:l});return g(m,X({ref:n},F,{InputProps:X({},L,{readOnly:R}),inputProps:X({},M.inputProps,{inputMode:P,onPaste:A,onKeyDown:_,ref:w})}))}),Bat=t=>Ft("MuiPickersFadeTransitionGroup",t);Dt("MuiPickersFadeTransitionGroup",["root"]);const $at=t=>{const{classes:e}=t;return Lt({root:["root"]},Bat,e)},Hat=$e(QG,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"block",position:"relative"});function sfe(t){const e=Ht({props:t,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=$at(e),a=Tu();return o?n:g(Hat,{className:Ye(s.root,r),children:g(rw,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},i)})}function Uat(t){return Ft("MuiPickersMonth",t)}const BN=Dt("MuiPickersMonth",["root","monthButton","disabled","selected"]),zat=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],Vat=t=>{const{disabled:e,selected:n,classes:r}=t;return Lt({root:["root"],monthButton:["monthButton",e&&"disabled",n&&"selected"]},Uat,r)},Gat=$e("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(t,e)=>[e.root]}
388)(({ownerState:t})=>({flexBasis:t.monthsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),Wat=$e("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(t,e)=>[e.monthButton,{[`&.${BN.disabled}`]:e.disabled},{[`&.${BN.selected}`]:e.selected}]})(({theme:t})=>X({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Tl(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Tl(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${BN.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${BN.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),jat=C.memo(function(e){const n=Ht({props:e,name:"MuiPickersMonth"}),{autoFocus:r,children:o,disabled:i,selected:s,value:a,tabIndex:l,onClick:c,onKeyDown:u,onFocus:d,onBlur:h,"aria-current":f,"aria-label":p}=n,m=at(n,zat),y=C.useRef(null),v=Vat(n);return Ls(()=>{if(r){var b;(b=y.current)==null||b.focus()}},[r]),g(Gat,X({className:v.root,ownerState:n},m,{children:g(Wat,{ref:y,disabled:i,type:"button",role:"radio",tabIndex:i?-1:l,"aria-current":f,"aria-checked":s,"aria-label":p,onClick:b=>c(b,a),onKeyDown:b=>u(b,a),onFocus:b=>d(b,a),onBlur:b=>h(b,a),className:v.monthButton,ownerState:n,children:o})}))});function qat(t){return Ft("MuiMonthCalendar",t)}Dt("MuiMonthCalendar",["root"]);const Yat=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"],Xat=t=>{const{classes:e}=t;return Lt({root:["root"]},qat,e)};function Kat(t,e){const n=vi(),r=IR(),o=Ht({props:t,name:e});return X({disableFuture:!1,disablePast:!1},o,{minDate:wh(n,o.minDate,r.minDate),maxDate:wh(n,o.maxDate,r.maxDate)})}const Qat=$e("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:ZF,boxSizing:"border-box"}),Zat=C.forwardRef(function(e,n){const r=Kat(e,"MuiMonthCalendar"),{className:o,value:i,defaultValue:s,referenceDate:a,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:h,onChange:f,shouldDisableMonth:p,readOnly:m,disableHighlightToday:y,autoFocus:v=!1,onMonthFocus:b,hasFocus:S,onFocusedViewChange:w,monthsPerRow:A=3,timezone:_,gridLabelId:P}=r,R=at(r,Yat),{value:O,handleValueChange:N,timezone:M}=i6({name:"MonthCalendar",timezone:_,value:i,defaultValue:s,onChange:f,valueManager:Cm}),L=KF(M),F=ew(),$=vi(),D=C.useMemo(()=>Cm.getInitialReferenceValue({value:O,utils:$,props:r,timezone:M,referenceDate:a,granularity:vp.month}),[]),k=r,U=Xat(k),H=C.useMemo(()=>$.getMonth(L),[$,L]),V=C.useMemo(()=>O!=null?$.getMonth(O):y?null:$.getMonth(D),[O,$,y,D]),[q,J]=C.useState(()=>V||H),[Q,se]=Ka({name:"MonthCalendar",state:"hasFocus",controlled:S,default:v??!1}),oe=mn(ve=>{se(ve),w&&w(ve)}),ie=C.useCallback(ve=>{const Re=$.startOfMonth(u&&$.isAfter(L,h)?L:h),pe=$.startOfMonth(c&&$.isBefore(L,d)?L:d),Be=$.startOfMonth(ve);return $.isBefore(Be,Re)||$.isAfter(Be,pe)?!0:p?p(Be):!1},[c,u,d,h,L,p,$]),ee=mn((ve,Re)=>{if(m)return;const pe=$.setMonth(O??D,Re);N(pe)}),re=mn(ve=>{ie($.setMonth(O??D,ve))||(J(ve),oe(!0),b&&b(ve))});C.useEffect(()=>{J(ve=>V!==null&&ve!==V?V:ve)},[V]);const fe=mn((ve,Re)=>{switch(ve.key){case"ArrowUp":re((12+Re-3)%12),ve.preventDefault();break;case"ArrowDown":re((12+Re+3)%12),ve.preventDefault();break;case"ArrowLeft":re((12+Re+(F.direction==="ltr"?-1:1))%12),ve.preventDefault();break;case"ArrowRight":re((12+Re+(F.direction==="ltr"?1:-1))%12),ve.preventDefault();break}}),we=mn((ve,Re)=>{re(Re)}),xe=mn((ve,Re)=>{q===Re&&oe(!1)});return g(Qat,X({ref:n,className:Ye(U.root,o),ownerState:k,role:"radiogroup","aria-labelledby":P},R,{children:n6($,O??D).map(ve=>{const Re=$.getMonth(ve),pe=$.format(ve,"monthShort"),Be=$.format(ve,"month"),ke=Re===V,Ne=l||ie(ve);return g(jat,{selected:ke,value:Re,onClick:ee,onKeyDown:fe,autoFocus:Q&&Re===q,disabled:Ne,tabIndex:Re===q?0:-1,onFocus:we,onBlur:xe,"aria-current":H===Re?"date":void 0,"aria-label":Be,monthsPerRow:A,children:pe},pe)})}))});function Jat(t){return Ft("MuiPickersYear",t)}const $N=Dt("MuiPickersYear",["root","yearButton","selected","disabled"]),elt=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],tlt=t=>{const{disabled:e,selected:n,classes:r}=t;return Lt({root:["root"],yearButton:["yearButton",e&&"disabled",n&&"selected"]},Jat,r)},nlt=$e("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(t,e)=>[e.root]}
388)(({ownerState:t})=>({flexBasis:t.yearsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),rlt=$e("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(t,e)=>[e.yearButton,{[`&.${$N.disabled}`]:e.disabled},{[`&.${$N.selected}`]:e.selected}]})(({theme:t})=>X({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.focusOpacity})`:Tl(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Tl(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${$N.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${$N.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),olt=C.memo(function(e){const n=Ht({props:e,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:h,onBlur:f,"aria-current":p}=n,m=at(n,elt),y=C.useRef(null),v=tlt(n);return C.useEffect(()=>{r&&y.current.focus()},[r]),g(nlt,X({className:Ye(v.root,o),ownerState:n},m,{children:g(rlt,{ref:y,disabled:s,type:"button",role:"radio",tabIndex:s?-1:c,"aria-current":p,"aria-checked":a,onClick:b=>u(b,l),onKeyDown:b=>d(b,l),onFocus:b=>h(b,l),onBlur:b=>f(b,l),className:v.yearButton,ownerState:n,children:i})}))});function ilt(t){return Ft("MuiYearCalendar",t)}Dt("MuiYearCalendar",["root"]);const slt=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"],alt=t=>{const{classes:e}=t;return Lt({root:["root"]},ilt,e)};function llt(t,e){var n;const r=vi(),o=IR(),i=Ht({props:t,name:e});return X({disablePast:!1,disableFuture:!1},i,{yearsPerRow:(n=i.yearsPerRow)!=null?n:3,minDate:wh(r,i.minDate,o.minDate),maxDate:wh(r,i.maxDate,o.maxDate)})}const clt=$e("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:ZF,maxHeight:Hit,boxSizing:"border-box",position:"relative"}),ult=C.forwardRef(function(e,n){const r=llt(e,"MuiYearCalendar"),{autoFocus:o,className:i,value:s,defaultValue:a,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:h,minDate:f,onChange:p,readOnly:m,shouldDisableYear:y,disableHighlightToday:v,onYearFocus:b,hasFocus:S,onFocusedViewChange:w,yearsPerRow:A,timezone:_,gridLabelId:P}=r,R=at(r,slt),{value:O,handleValueChange:N,timezone:M}=i6({name:"YearCalendar",timezone:_,value:s,defaultValue:a,onChange:p,valueManager:Cm}),L=KF(M),F=ew(),$=vi(),D=C.useMemo(()=>Cm.getInitialReferenceValue({value:O,utils:$,props:r,timezone:M,referenceDate:l,granularity:vp.year}),[]),k=r,U=alt(k),H=C.useMemo(()=>$.getYear(L),[$,L]),V=C.useMemo(()=>O!=null?$.getYear(O):v?null:$.getYear(D),[O,$,v,D]),[q,J]=C.useState(()=>V||H),[Q,se]=Ka({name:"YearCalendar",state:"hasFocus",controlled:S,default:o??!1}),oe=mn(pe=>{se(pe),w&&w(pe)}),ie=C.useCallback(pe=>{if(d&&$.isBeforeYear(pe,L)||u&&$.isAfterYear(pe,L)||f&&$.isBeforeYear(pe,f)||h&&$.isAfterYear(pe,h))return!0;if(!y)return!1;const Be=$.startOfYear(pe);return y(Be)},[u,d,h,f,L,y,$]),ee=mn((pe,Be)=>{if(m)return;const ke=$.setYear(O??D,Be);N(ke)}),re=mn(pe=>{ie($.setYear(O??D,pe))||(J(pe),oe(!0),b?.(pe))});C.useEffect(()=>{J(pe=>V!==null&&pe!==V?V:pe)},[V]);const fe=mn((pe,Be)=>{switch(pe.key){case"ArrowUp":re(Be-A),pe.preventDefault();break;case"ArrowDown":re(Be+A),pe.preventDefault();break;case"ArrowLeft":re(Be+(F.direction==="ltr"?-1:1)),pe.preventDefault();break;case"ArrowRight":re(Be+(F.direction==="ltr"?1:-1)),pe.preventDefault();break}}),we=mn((pe,Be)=>{re(Be)}),xe=mn((pe,Be)=>{q===Be&&oe(!1)}),ve=C.useRef(null),Re=Xr(n,ve);return C.useEffect(()=>{if(o||ve.current===null)return;const pe=ve.current.querySelector('[tabindex="0"]');if(!pe)return;const Be=pe.offsetHeight,ke=pe.offsetTop,Ne=ve.current.clientHeight,ot=ve.current.scrollTop,ce=ke+Be;Be>Ne||ke<ot||(ve.current.scrollTop=ce-Ne/2-Be/2)}
388,[o]),g(clt,X({ref:Re,className:Ye(U.root,i),ownerState:k,role:"radiogroup","aria-labelledby":P},R,{children:$.getYearRange(f,h).map(pe=>{const Be=$.getYear(pe),ke=Be===V,Ne=c||ie(pe);return g(olt,{selected:ke,value:Be,onClick:ee,onKeyDown:fe,autoFocus:Q&&Be===q,disabled:Ne,tabIndex:Be===q?0:-1,onFocus:we,onBlur:xe,"aria-current":H===Be?"date":void 0,yearsPerRow:A,children:$.format(pe,"year")},$.format(pe,"year"))})}))}),dlt=t=>Ft("MuiPickersCalendarHeader",t),hlt=Dt("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),flt=["slots","slotProps","components","componentsProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],plt=["ownerState"],glt=t=>{const{classes:e}=t;return Lt({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},dlt,e)},mlt=$e("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),ylt=$e("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(t,e)=>e.labelContainer})(({theme:t})=>X({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})),vlt=$e("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(t,e)=>e.label})({marginRight:6}),blt=$e(Di,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(t,e)=>e.switchViewButton})(({ownerState:t})=>X({marginRight:"auto"},t.view==="year"&&{[`.${hlt.switchViewIcon}`]:{transform:"rotate(180deg)"}})),Clt=$e(Sit,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(t,e)=>e.switchViewIcon})(({theme:t})=>({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"})),Slt=C.forwardRef(function(e,n){var r,o,i,s;const a=w0(),l=vi(),c=Ht({props:e,name:"MuiPickersCalendarHeader"}),{slots:u,slotProps:d,components:h,currentMonth:f,disabled:p,disableFuture:m,disablePast:y,maxDate:v,minDate:b,onMonthChange:S,onViewChange:w,view:A,reduceAnimations:_,views:P,labelId:R,className:O,timezone:N}=c,M=at(c,flt),L=c,F=glt(c),$=(r=(o=u?.switchViewButton)!=null?o:h?.SwitchViewButton)!=null?r:blt,D=ao({elementType:$,externalSlotProps:d?.switchViewButton,additionalProps:{size:"small","aria-label":a.calendarViewSwitchingButtonAriaLabel(A)},ownerState:L,className:F.switchViewButton}),k=(i=(s=u?.switchViewIcon)!=null?s:h?.SwitchViewIcon)!=null?i:Clt,U=ao({elementType:k,externalSlotProps:d?.switchViewIcon,ownerState:void 0,className:F.switchViewIcon}),H=at(U,plt),V=()=>S(l.addMonths(f,1),"left"),q=()=>S(l.addMonths(f,-1),"right"),J=Bit(f,{disableFuture:m,maxDate:v,timezone:N}),Q=$it(f,{disablePast:y,minDate:b,timezone:N}),se=()=>{if(!(P.length===1||!w||p))if(P.length===2)w(P.find(oe=>oe!==A)||P[0]);else{const oe=P.indexOf(A)!==0?0:1;w(P[oe])}};return P.length===1&&P[0]==="year"?null:K(mlt,X({},M,{ownerState:L,className:Ye(O,F.root),ref:n,children:[K(ylt,{role:"presentation",onClick:se,ownerState:L,"aria-live":"polite",className:F.labelContainer,children:[g(sfe,{reduceAnimations:_,transKey:l.format(f,"monthAndYear"),children:g(vlt,{id:R,ownerState:L,className:F.label,children:l.format(f,"monthAndYear")}
388)}),P.length>1&&!p&&g($,X({},D,{children:g(k,X({},H))}))]}),g(rw,{in:A==="day",children:g(Mit,{slots:u,slotProps:d,onGoToPrevious:q,isPreviousDisabled:Q,previousLabel:a.previousMonth,onGoToNext:V,isNextDisabled:J,nextLabel:a.nextMonth})})]}))}),Elt=t=>Ft("MuiDateCalendar",t);Dt("MuiDateCalendar",["root","viewTransitionContainer"]);const xlt=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"],wlt=t=>{const{classes:e}=t;return Lt({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Elt,e)};function Alt(t,e){var n,r,o,i,s,a,l;const c=vi(),u=IR(),d=Qhe(),h=Ht({props:t,name:e});return X({},h,{loading:(n=h.loading)!=null?n:!1,disablePast:(r=h.disablePast)!=null?r:!1,disableFuture:(o=h.disableFuture)!=null?o:!1,openTo:(i=h.openTo)!=null?i:"day",views:(s=h.views)!=null?s:["year","day"],reduceAnimations:(a=h.reduceAnimations)!=null?a:d,renderLoading:(l=h.renderLoading)!=null?l:()=>g("span",{children:"..."}),minDate:wh(c,h.minDate,u.minDate),maxDate:wh(c,h.maxDate,u.maxDate)})}const Tlt=$e(Uit,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",height:t6}),_lt=$e(sfe,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(t,e)=>e.viewTransitionContainer})({}),Ilt=C.forwardRef(function(e,n){var r,o,i;const s=vi(),a=sd(),l=Alt(e,"MuiDateCalendar"),{autoFocus:c,onViewChange:u,value:d,defaultValue:h,referenceDate:f,disableFuture:p,disablePast:m,defaultCalendarMonth:y,onChange:v,onYearChange:b,onMonthChange:S,reduceAnimations:w,shouldDisableDate:A,shouldDisableMonth:_,shouldDisableYear:P,view:R,views:O,openTo:N,className:M,disabled:L,readOnly:F,minDate:$,maxDate:D,disableHighlightToday:k,focusedView:U,onFocusedViewChange:H,showDaysOutsideCurrentMonth:V,fixedWeekNumber:q,dayOfWeekFormatter:J,components:Q,componentsProps:se,slots:oe,slotProps:ie,loading:ee,renderLoading:re,displayWeekNumber:fe,yearsPerRow:we,monthsPerRow:xe,timezone:ve}=l,Re=at(l,xlt),{value:pe,handleValueChange:Be,timezone:ke}=i6({name:"DateCalendar",timezone:ve,value:d,defaultValue:h,onChange:v,valueManager:Cm}),{view:Ne,setView:ot,focusedView:ce,setFocusedView:Ae,goToNextView:be,setValueAndGoToNextView:Se}=khe({view:R,views:O,openTo:N,onChange:Be,onViewChange:u,autoFocus:c,focusedView:U,onFocusedViewChange:H}),{referenceDate:Pe,calendarState:Ue,changeFocusedDay:_e,changeMonth:Oe,handleChangeMonth:ze,isDateDisabled:ne,onMonthSwitchingAnimationEnd:W}
388=Nat({value:pe,defaultCalendarMonth:y,referenceDate:f,reduceAnimations:w,onMonthChange:S,minDate:$,maxDate:D,shouldDisableDate:A,disablePast:m,disableFuture:p,timezone:ke}),j=L&&pe||$,ue=L&&pe||D,he=`${a}-grid-label`,Ce=ce!==null,Ie=(r=(o=oe?.calendarHeader)!=null?o:Q?.CalendarHeader)!=null?r:Slt,et=ao({elementType:Ie,externalSlotProps:(i=ie?.calendarHeader)!=null?i:se?.calendarHeader,additionalProps:{views:O,view:Ne,currentMonth:Ue.currentMonth,onViewChange:ot,onMonthChange:(Xn,Wo)=>ze({newMonth:Xn,direction:Wo}),minDate:j,maxDate:ue,disabled:L,disablePast:m,disableFuture:p,reduceAnimations:w,timezone:ke,labelId:he,slots:oe,slotProps:ie},ownerState:l}),je=mn(Xn=>{const Wo=s.startOfMonth(Xn),jo=s.endOfMonth(Xn),ri=ne(Xn)?$_({utils:s,date:Xn,minDate:s.isBefore($,Wo)?Wo:$,maxDate:s.isAfter(D,jo)?jo:D,disablePast:m,disableFuture:p,isDateDisabled:ne,timezone:ke}):Xn;ri?(Se(ri,"finish"),S?.(Wo)):(be(),Oe(Wo)),_e(ri,!0)}),it=mn(Xn=>{const Wo=s.startOfYear(Xn),jo=s.endOfYear(Xn),ri=ne(Xn)?$_({utils:s,date:Xn,minDate:s.isBefore($,Wo)?Wo:$,maxDate:s.isAfter(D,jo)?jo:D,disablePast:m,disableFuture:p,isDateDisabled:ne,timezone:ke}):Xn;ri?(Se(ri,"finish"),b?.(ri)):(be(),Oe(Wo)),_e(ri,!0)}),xt=mn(Xn=>Be(Xn&&h2(s,Xn,pe??Pe),"finish",Ne));C.useEffect(()=>{pe!=null&&s.isValid(pe)&&Oe(pe)},[pe]);const rt=l,Bt=wlt(rt),dn={disablePast:m,disableFuture:p,maxDate:D,minDate:$},kn={disableHighlightToday:k,readOnly:F,disabled:L,timezone:ke,gridLabelId:he},jn=C.useRef(Ne);C.useEffect(()=>{jn.current!==Ne&&(ce===jn.current&&Ae(Ne,!0),jn.current=Ne)},[ce,Ae,Ne]);const Cr=C.useMemo(()=>[pe],[pe]);return K(Tlt,X({ref:n,className:Ye(Bt.root,M),ownerState:rt},Re,{children:[g(Ie,X({},et)),g(_lt,{reduceAnimations:w,className:Bt.viewTransitionContainer,transKey:Ne,ownerState:rt,children:K("div",{children:[Ne==="year"&&g(ult,X({},dn,kn,{value:pe,onChange:it,shouldDisableYear:P,hasFocus:Ce,onFocusedViewChange:Xn=>Ae("year",Xn),yearsPerRow:we,referenceDate:Pe})),Ne==="month"&&g(Zat,X({},dn,kn,{hasFocus:Ce,className:M,value:pe,onChange:je,shouldDisableMonth:_,onFocusedViewChange:Xn=>Ae("month",Xn),monthsPerRow:xe,referenceDate:Pe})),Ne==="day"&&g(Rat,X({},Ue,dn,kn,{onMonthSwitchingAnimationEnd:W,onFocusedDayChange:_e,reduceAnimations:w,selectedDays:Cr,onSelectedDaysChange:xt,shouldDisableDate:A,shouldDisableMonth:_,shouldDisableYear:P,hasFocus:Ce,onFocusedViewChange:Xn=>Ae("day",Xn),showDaysOutsideCurrentMonth:V,fixedWeekNumber:q,dayOfWeekFormatter:J,displayWeekNumber:fe,components:Q,componentsProps:se,slots:oe,slotProps:ie,loading:ee,renderLoading:re}))]})})]}))});function Plt(t){return Ft("MuiDatePickerToolbar",t)}Dt("MuiDatePickerToolbar",["root","title"]);const Rlt=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className"],Olt=t=>{const{classes:e}=t;return Lt({root:["root"],title:["title"]},Plt,e)},Nlt=$e(Gst,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Mlt=$e(Ke,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(t,e)=>e.title})(({ownerState:t})=>X({},t.isLandscape&&{margin:"auto 16px auto auto"})),Dlt=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:s,toolbarPlaceholder:a="ââ",views:l,className:c}=r,u=at(r,Rlt),d=vi(),h=w0(),f=Olt(r),p=C.useMemo(()=>{if(!o)return a;const y=r6(d,{format:s,views:l},!0);return d.formatByString(o,y)},[o,s,a,d,l]),m=r;return g(Nlt,X({ref:n,toolbarTitle:h.datePickerToolbarTitle,isLandscape:i,className:Ye(f.root,c)},u,{children:g(Mlt,{variant:"h4",align:i?"left":"center",ownerState:m,className:f.title,children:p})}))});function afe(t,e){var n,r,o,i;const s=vi(),a=IR(),l=Ht({props:t,name:e}),c=C.useMemo(()=>{var d;return((d=l.localeText)==null?void 0:d.toolbarTitle)==null?l.localeText:X({},l.localeText,{datePickerToolbarTitle:l.localeText.toolbarTitle})},[l.localeText]),u=(n=l.slots)!=null?n:Whe(l.components);return X({},l,{localeText:c},Dit({views:l.views,openTo:l.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:(r=l.disableFuture)!=null?r:!1,disablePast:(o=l.disablePast)!=null?o:!1,minDate:wh(s,l.minDate,a.minDate),maxDate:wh(s,l.maxDate,a.maxDate),slots:X({toolbar:Dlt},u),slotProps:(i=l.slotProps)!=null?i:l.componentsProps})}const Llt=["props","getOpenDialogAriaText"],klt=["ownerState"],Flt=["ownerState"],Blt=t=>{var e,n,r,o,i;let{props:s,getOpenDialogAriaText:a}=t,l=at(t,Llt);const{slots:c,slotProps:u,className:d,sx:h,format:f,formatDensity:p,timezone:m,name:y,label:v,inputRef:b,readOnly:S,disabled:w,autoFocus:A,localeText:_,reduceAnimations:P}=s,R=vi(),O=C.useRef(null),N=C.useRef(null),M=sd(),L=(e=u==null||(n=u.toolbar)==null?void 0:n.hidden)!=null?e:!1,{open:F,actions:$,hasUIView:D,layoutProps:k,renderCurrentView:U,shouldRestoreFocus:H,fieldProps:V}=Jhe(X({},l,{props:s,inputRef:O,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),q=(r=c.inputAdornment)!=null?r:qr,J=ao({elementType:q,externalSlotProps:u?.inputAdornment,additionalProps:{position:"end"},ownerState:s}),Q=at(J,klt),se=(o=c.openPickerButton)!=null?o:Di,oe=ao({elementType:se,externalSlotProps:u?.openPickerButton,additionalProps:{disabled:w||S,onClick:F?$.onClose:$.onOpen,"aria-label":a(V.value,R),edge:Q.position},ownerState:s}),ie=at(oe,Flt),ee=c.openPickerIcon,re=c.field,fe=ao({elementType:re,externalSlotProps:u?.field,additionalProps:X({},V,L&&{id:M},{readOnly:S,disabled:w,className:d,sx:h,format:f,formatDensity:p,timezone:m,label:v,name:y,autoFocus:A&&!s.open,focused:F?!0:void 0}),ownerState:s});D&&(fe.InputProps=X({},fe.InputProps,{ref:N},!s.disableOpenPicker&&{[`${Q.position}Adornment`]:g(q,X({},Q,{children:g(se,X({},ie,{children:g(ee,X({}
388,u?.openPickerIcon))}))}))}));const we=X({textField:c.textField,clearIcon:c.clearIcon,clearButton:c.clearButton},fe.slots),xe=(i=c.layout)!=null?i:nfe,ve=Xr(O,fe.inputRef,b);let Re=M;L&&(v?Re=`${M}-label`:Re=void 0);const pe=X({},u,{toolbar:X({},u?.toolbar,{titleId:M}),popper:X({"aria-labelledby":Re},u?.popper)});return{renderPicker:()=>K(e6,{localeText:_,children:[g(re,X({},fe,{slots:we,slotProps:pe,inputRef:ve})),g($st,X({role:"dialog",placement:"bottom-start",anchorEl:N.current},$,{open:F,slots:c,slotProps:pe,shouldRestoreFocus:H,reduceAnimations:P,children:g(xe,X({},k,pe?.layout,{slots:c,slotProps:pe,children:U()}))}))]})}},x1=({view:t,onViewChange:e,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:c,classes:u,disableFuture:d,disablePast:h,minDate:f,maxDate:p,shouldDisableDate:m,shouldDisableMonth:y,shouldDisableYear:v,reduceAnimations:b,onMonthChange:S,monthsPerRow:w,onYearChange:A,yearsPerRow:_,defaultCalendarMonth:P,components:R,componentsProps:O,slots:N,slotProps:M,loading:L,renderLoading:F,disableHighlightToday:$,readOnly:D,disabled:k,showDaysOutsideCurrentMonth:U,dayOfWeekFormatter:H,sx:V,autoFocus:q,fixedWeekNumber:J,displayWeekNumber:Q,timezone:se})=>g(Ilt,{view:t,onViewChange:e,views:n.filter(EZ),focusedView:r&&EZ(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:c,classes:u,disableFuture:d,disablePast:h,minDate:f,maxDate:p,shouldDisableDate:m,shouldDisableMonth:y,shouldDisableYear:v,reduceAnimations:b,onMonthChange:S,monthsPerRow:w,onYearChange:A,yearsPerRow:_,defaultCalendarMonth:P,components:R,componentsProps:O,slots:N,slotProps:M,loading:L,renderLoading:F,disableHighlightToday:$,readOnly:D,disabled:k,showDaysOutsideCurrentMonth:U,dayOfWeekFormatter:H,sx:V,autoFocus:q,fixedWeekNumber:J,displayWeekNumber:Q,timezone:se}),lfe=C.forwardRef(function(e,n){var r,o,i,s;const a=w0(),l=vi(),c=afe(e,"MuiDesktopDatePicker"),u=X({day:x1,month:x1,year:x1},c.viewRenderers),d=X({},c,{viewRenderers:u,format:r6(l,c,!1),yearsPerRow:(r=c.yearsPerRow)!=null?r:4,slots:X({openPickerIcon:wit,field:ife},c.slots),slotProps:X({},c.slotProps,{field:f=>{var p;return X({},vF((p=c.slotProps)==null?void 0:p.field,f),Khe(c),{ref:n})},toolbar:X({hidden:!0},(o=c.slotProps)==null?void 0:o.toolbar)})}),{renderPicker:h}=Blt({props:d,valueManager:Cm,valueType:"date",getOpenDialogAriaText:(i=(s=d.localeText)==null?void 0:s.openDatePickerDialogue)!=null?i:a.openDatePickerDialogue,validator:eB});return h()});lfe.propTypes={autoFocus:ge.bool,className:ge.string,closeOnSelect:ge.bool,components:ge.object,componentsProps:ge.object,dayOfWeekFormatter:ge.func,defaultCalendarMonth:ge.any,defaultValue:ge.any,disabled:ge.bool,disableFuture:ge.bool,disableHighlightToday:ge.bool,disableOpenPicker:ge.bool,disablePast:ge.bool,displayWeekNumber:ge.bool,fixedWeekNumber:ge.number,format:ge.string,formatDensity:ge.oneOf(["dense","spacious"]),inputRef:Wae,label:ge.node,loading:ge.bool,localeText:ge.object,maxDate:ge.any,minDate:ge.any,monthsPerRow:ge.oneOf([3,4]),name:ge.string,onAccept:ge.func,onChange:ge.func,onClose:ge.func,onError:ge.func,onMonthChange:ge.func,onOpen:ge.func,onSelectedSectionsChange:ge.func,onViewChange:ge.func,onYearChange:ge.func,open:ge.bool,openTo:ge.oneOf(["day","month","year"]),orientation:ge.oneOf(["landscape","portrait"]),readOnly:ge.bool,reduceAnimations:ge.bool,referenceDate:ge.any,renderLoading:ge.func,selectedSections:ge.oneOfType([ge.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),ge.number,ge.shape({endIndex:ge.number.isRequired,startIndex:ge.number.isRequired})]),shouldDisableDate:ge.func,shouldDisableMonth:ge.func,shouldDisableYear:ge.func,showDaysOutsideCurrentMonth:ge.bool,slotProps:ge.object,slots:ge.object,sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object]),timezone:ge.string,value:ge.any,view:ge.oneOf(["day","month","year"]),viewRenderers:ge.shape({day:ge.func,month:ge.func,year:ge.func}),views:ge.arrayOf(ge.oneOf(["day","month","year"]).isRequired),yearsPerRow:ge.oneOf([3,4])};const $lt=["props","getOpenDialogAriaText"],Hlt=t=>{var e,n,r;let{props:o,getOpenDialogAriaText:i}=t,s=at(t,$lt);const{slots:a,slotProps:l,className:c,sx:u,format:d,formatDensity:h,timezone:f,name:p,label:m,inputRef:y,readOnly:v,disabled:b,localeText:S}=o,w=vi(),A=C.useRef(null),_=sd(),P=(e=l==null||(n=l.toolbar)==null?void 0:n.hidden)!=null?e:!1,{open:R,actions:O,layoutProps:N,renderCurrentView:M,fieldProps:L}=Jhe(X({},s,{props:o,inputRef:A,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),F=a.field,$=ao({elementType:F,externalSlotProps:l?.field,additionalProps:X({},L,P&&{id:_},!(b||v)&&{onClick:O.onOpen,onKeyDown:yst(O.onOpen)},{readOnly:v??!0,disabled:b,className:c,sx:u,format:d,formatDensity:h,timezone:f,label:m,name:p}),ownerState:o});$.inputProps=X({},$.inputProps,{"aria-label":i(L.value,w)});const D=X({textField:a.textField}
388,$.slots),k=(r=a.layout)!=null?r:nfe,U=Xr(A,$.inputRef,y);let H=_;P&&(m?H=`${_}-label`:H=void 0);const V=X({},l,{toolbar:X({},l?.toolbar,{titleId:_}),mobilePaper:X({"aria-labelledby":H},l?.mobilePaper)});return{renderPicker:()=>K(e6,{localeText:S,children:[g(F,X({},$,{slots:D,slotProps:V,inputRef:U})),g(Ist,X({},O,{open:R,slots:a,slotProps:V,children:g(k,X({},N,V?.layout,{slots:a,slotProps:V,children:M()}))}))]})}},cfe=C.forwardRef(function(e,n){var r,o,i;const s=w0(),a=vi(),l=afe(e,"MuiMobileDatePicker"),c=X({day:x1,month:x1,year:x1},l.viewRenderers),u=X({},l,{viewRenderers:c,format:r6(a,l,!1),slots:X({field:ife},l.slots),slotProps:X({},l.slotProps,{field:h=>{var f;return X({},vF((f=l.slotProps)==null?void 0:f.field,h),Khe(l),{ref:n})},toolbar:X({hidden:!1},(r=l.slotProps)==null?void 0:r.toolbar)})}),{renderPicker:d}=Hlt({props:u,valueManager:Cm,valueType:"date",getOpenDialogAriaText:(o=(i=u.localeText)==null?void 0:i.openDatePickerDialogue)!=null?o:s.openDatePickerDialogue,validator:eB});return d()});cfe.propTypes={autoFocus:ge.bool,className:ge.string,closeOnSelect:ge.bool,components:ge.object,componentsProps:ge.object,dayOfWeekFormatter:ge.func,defaultCalendarMonth:ge.any,defaultValue:ge.any,disabled:ge.bool,disableFuture:ge.bool,disableHighlightToday:ge.bool,disableOpenPicker:ge.bool,disablePast:ge.bool,displayWeekNumber:ge.bool,fixedWeekNumber:ge.number,format:ge.string,formatDensity:ge.oneOf(["dense","spacious"]),inputRef:Wae,label:ge.node,loading:ge.bool,localeText:ge.object,maxDate:ge.any,minDate:ge.any,monthsPerRow:ge.oneOf([3,4]),name:ge.string,onAccept:ge.func,onChange:ge.func,onClose:ge.func,onError:ge.func,onMonthChange:ge.func,onOpen:ge.func,onSelectedSectionsChange:ge.func,onViewChange:ge.func,onYearChange:ge.func,open:ge.bool,openTo:ge.oneOf(["day","month","year"]),orientation:ge.oneOf(["landscape","portrait"]),readOnly:ge.bool,reduceAnimations:ge.bool,referenceDate:ge.any,renderLoading:ge.func,selectedSections:ge.oneOfType([ge.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),ge.number,ge.shape({endIndex:ge.number.isRequired,startIndex:ge.number.isRequired})]),shouldDisableDate:ge.func,shouldDisableMonth:ge.func,shouldDisableYear:ge.func,showDaysOutsideCurrentMonth:ge.bool,slotProps:ge.object,slots:ge.object,sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object]),timezone:ge.string,value:ge.any,view:ge.oneOf(["day","month","year"]),viewRenderers:ge.shape({day:ge.func,month:ge.func,year:ge.func}),views:ge.arrayOf(ge.oneOf(["day","month","year"]).isRequired),yearsPerRow:ge.oneOf([3,4])};const Ult=["desktopModeMediaQuery"],zlt=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=vst}=r,i=at(r,Ult);return Vae(o,{defaultMatches:!0})?g(lfe,X({ref:n},i)):g(cfe,X({ref:n},i))}),Vlt=({currentValue:t,handleInputValueChange:e,handleInputBlur:n,handleInputKeyDown:r,error:o})=>g(lo,{type:"number",size:"small",variant:"outlined",value:t,onKeyDown:i=>r(i),onChange:i=>e(i),onBlur:()=>n(),inputProps:{min:1},sx:{height:"24px","& .MuiInputBase-root":{height:"24px"},mt:.5},error:o}),y5=({id:t,storedValue:e,field:n,updateUserHandler:r})=>{const[i,s]=C.useState(e),a=C.useCallback(f=>!!(f&&!Number.isInteger(f)),[]),l=f=>{const p=Number(f.target.value);if(p<1){s(1);return}s(p)},c=()=>{d&&!h&&r({field:n,value:i,id:t})},u=f=>{f.stopPropagation(),f.key==="Enter"&&d&&!h&&r({field:n,value:i,id:t})},d=C.useMemo(()=>i!==e,[i,e]),h=C.useMemo(()=>a(i),[i]);return g(Vlt,{currentValue:i,updateUserHandler:r,handleInputValueChange:l,handleInputBlur:c,handleInputKeyDown:u,error:h})};var a6={},Glt=hr;Object.defineProperty(a6,"__esModule",{value:!0});var l6=a6.default=void 0,Wlt=Glt(yr()),jlt=vr;l6=a6.default=(0,Wlt.default)((0,jlt.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");const qlt=({items:t,menuId:e="user-table-context-menu",iconButtonId:n})=>{const[r,o]=C.useState(null),i=!!r,s=l=>{l.stopPropagation(),o(l.currentTarget)},a=()=>{o(null)};return K("div",{children:[g(Di,{id:n,onClick:s,size:"small","aria-controls":e,"aria-haspopup":"true","aria-expanded":i,children:g(l6,{})}),g(Es,{id:e,anchorEl:r,open:i,onClose:a,onClick:l=>l.stopPropagation(),sx:{"& .MuiMenu-paper":{p:0,width:"145px"}},children:t.map(l=>K(mr,{id:l.id,disabled:l.disabled,onClick:c=>{l.onClick(c),a()},children:[l.icon,l.label]},l.id))})]})},Ylt=t=>Ti(t).format("YYYY-MMM-DD, hh:mm:ss A"),Xlt=({userId:t})=>{const e="IP Address",n="Country",r="Continent",o="Login Time",s=$W.getByUserIdSync(t)?.data??[],a=()=>s.map((c,u)=>({id:`${u}`,[e]:c.traits.ip_address,[n]:c.country.iso_code,[r]:c.continent.code,[o]:Ylt(new Date(c.timestamp))})),l=()=>[{field:e,headerName:e,flex:1,headerAlign:"center",align:"center",hideable:!1},{field:n,headerName:n,flex:1,headerAlign:"center",align:"center",hideable:!1},{field:r,headerName:r,flex:1,headerAlign:"center",align:"center",hideable:!1},{field:o,headerName:o,flex:1,minWidth:170,headerAlign:"center",align:"center",hideable:!1}];return g(Dm,{wrapperSx:{p:0,flex:1},tableType:ps.USER_ACTIVITY,rows:a(),columns:l()})},Klt=({userId:t,isOpen:e,setIsOpen:n})=>{const r="User Activity",o="Close",i=()=>{n(!1)};return g(mR,{isOpen:e,sx:{},handleCancel:i,children:K(le,{sx:{p:2},children:[g(lw,{label:r}),g(Xlt,{userId:t}),g(le,{sx:{display:"flex",justifyContent:"flex-end",mt:1},children:g(Au,{id:"close-user-activity",label:o,handleClick:i,isEnabled:!0,sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:3}})})]}),isCloseOnBackDropClickEnabled:!0})},Qlt=({user:t,users:e,groups:n,isLoading:r,isAdmin:o,activeGroupId:i})=>{const a=Za(),l=Yn(),[c,u]=C.useState(!1),[d,h]=C.useState(t.id),[f,{isLoading:p}]=nue(),m=A=>A===yp.OK||A===yp.PENDING_AGREEMENT,y=A=>A===yp.SUSPENDED||A===yp.SOFT_DELETED,v=(A,_)=>{const P=rh.isAdmin(A),R=rh.isGroupAdmin(A);return y(_)?"error.dark":P?"success.main":R?"info.dark":m(_)?"black":"warning.dark"},b=async({field:A,value:_,id:P,changingUserCurrentRoleId:R})=>{try{const O={[A]:_};A===ls.GROUP_ID&&!rh.isAdminGroup(_)&&R&&rh.isAdmin(R)&&(O.roleId=pp.USER,ln.info(XL.CHANGE_ROLE_TO_USER)),await f({params:O,id:P,activeGroupId:i}).then(()=>{(A===ls.GROUP_ID||A===ls.MAX_GENERATE_COUNT||A===ls.MAX_SIMULATE_COUNT||A===ls.MAX_EXPORT_COUNT)&&l(bC({user:{...t,[A]:_}})),P===t.id&&O.roleId&&!rh.isAdmin(O.roleId)&&(a(un.dashboard.path),ln.warning(XL.NOT_AUTHORIZED))})}catch{}},S=A=>A?Ti(A):null,w=C.useMemo(()=>
388[{field:ls.NAME,headerName:Jr.NAME,width:160,renderCell:({row:{role:A,status:_,firstName:P,lastName:R}})=>{const O=`${P} ${R}`;return g(le,{sx:{width:"100%",mt:1},children:g(Ke,{sx:{overflow:"hidden",textOverflow:"ellipsis",color:v(A.id,_)},children:O})})}},{field:ls.EMAIL,headerName:Jr.EMAIL,width:220,hideable:!1,renderCell:({row:{role:A,id:_,status:P,email:R}})=>{const O=`${R}${_===t.id?" [ me ]":""}`;return g(le,{sx:{color:v(A.id,P),mt:1},children:g(Ke,{component:"div",mr:1,sx:{color:v(A.id,P)},children:O})})}},{field:ls.GROUP,headerName:Jr.GROUP,width:140,hideable:!1,renderCell:({row:{id:A,group:_,role:P}})=>o?g(xa,{value:`${_.id}`,sx:{height:"24px",width:"100%"},onChange:R=>b({field:ls.GROUP_ID,value:parseInt(R.target.value),id:A,changingUserCurrentRoleId:P.id}),children:n.map(R=>g(mr,{value:R.id,sx:{overflow:"hidden",textOverflow:"ellipsis"},children:g(Ke,{sx:{overflow:"hidden",textOverflow:"ellipsis"},children:R.name})},`${A}-${R.id}`))}):g(le,{children:g(Ke,{component:"div",mr:1,children:_.name})})},{field:ls.ROLE,headerName:Jr.ROLE,width:160,hideable:!1,renderCell:({row:{id:A,group:_,role:P}})=>g(xa,{value:`${P.id}`,disabled:A===t.id,sx:{height:"24px",width:"100%"},onChange:R=>b({field:"roleId",value:parseInt(R.target.value),id:A}),children:yit.map(({key:R,value:O,displayText:N,showOnAdmin:M})=>M&&!rh.isAdminGroup(_.id)?null:g(mr,{value:O,children:N},`invite-${R}`))})},{field:ls.MAX_GENERATE_COUNT,headerName:Jr.MAX_GENERATE_COUNT,width:120,hideable:!1,renderCell:({row:{id:A,maxGenerateCount:_}})=>g(y5,{id:A,storedValue:_,field:ls.MAX_GENERATE_COUNT,updateUserHandler:b})},{field:ls.MAX_SIMULATE_COUNT,headerName:Jr.MAX_SIMULATE_COUNT,width:120,hideable:!1,renderCell:({row:{id:A,maxSimulateCount:_}})=>g(y5,{id:A,storedValue:_,field:ls.MAX_SIMULATE_COUNT,updateUserHandler:b})},{field:ls.MAX_EXPORT_COUNT,headerName:Jr.MAX_EXPORT_COUNT,width:120,hideable:!1,renderCell:({row:{id:A,maxExportCount:_}})=>g(y5,{id:A,storedValue:_,field:ls.MAX_EXPORT_COUNT,updateUserHandler:b})},{field:ls.LICENSE_EXPIRY_DATE,headerName:Jr.LICENSE_EXPIRY_DATE,width:170,hideable:!1,renderCell:({row:{id:A,status:_,license:P}})=>o?g(zlt,{label:Jr.NON_EXPIRING_LICENSE,value:S(P.expiryDate),disabled:!m(_),format:Jr.DATE_FORMAT,onChange:R=>b({field:ls.LICENSE_EXPIRY_DATE,value:Ti(R).hour(Ti().hour()).minute(Ti().minute()),id:A}),slotProps:{field:{clearable:!0,onClear:()=>Tt.debounce(()=>b({field:"licenseExpiryDate",value:null,id:A}),100)}},sx:{width:"100%",mt:-2}}):g(rn,{title:P.expiryDate?Jr.DATE_FORMAT:"",children:g(Ke,{component:"div",mr:1,children:P.expiryDate?Ti(P.expiryDate).format(Jr.DATE_FORMAT):Jr.NON_EXPIRING_LICENSE})})},{field:ls.STATUS,headerName:Jr.STATUS,width:160,hideable:!1,renderCell:({row:{id:A,firstName:_,lastName:P,status:R}})=>!_.length&&!P.length&&R===yp.UNDER_REVIEW?g(Ke,{sx:{height:"100%",alignContent:"center",pl:1.5},children:"INVITED"}):g(xa,{value:`${R}`,sx:{height:"24px",width:"100%"},onChange:N=>b({field:"status",value:parseInt(N.target.value),id:A}),children:Object.entries(yp).filter(([N])=>isNaN(Number(N))).map(([N,M])=>g(mr,{value:M,children:N},`status-${N}`))})},{field:ls.ACTIONS,type:ls.ACTIONS,headerName:Jr.ACTIONS,hideable:!1,getActions:({row:{id:A,email:_,status:P}})=>{const R=[{id:`delete-user-${A}`,label:Jr.DELETE,disabled:A===t.id,onClick:O=>{O.stopPropagation(),l(AG({modalKey:ls.DELETE_USER,data:{userId:A,email:_}}))},icon:g(Vp,{fontSize:"medium",IconButtonPropsSx:{"&:hover":{backgroundColor:"transparent"}},iconPropsSx:{color:"error.light","&:hover":{color:"error.dark"}},iconType:wa.deleteIcon})},{id:`user-activity-${A}`,label:Jr.USER_ACTIVITY,onClick:O=>{O.stopPropagation(),h(A),u(!0)},icon:g(Vp,{fontSize:"medium",IconButtonPropsSx:{"&:hover":{backgroundColor:"transparent"}},iconType:wa.history})}];return[g(qlt,{items:R,menuId:`action-menu-${A}`,iconButtonId:`action-button-${A}`},`action-menu-${A}`)]}}],[e]);return K(Mt,{direction:"column",sx:{height:"100%"},children:[g(Dm,{wrapperSx:{p:0,display:"flex",flex:1},dataGridSx:{p:"4px",height:"100%"},loading:r||p,tableType:ps.USERS,rows:e,columns:w,hideFooter:e.length<100}),c?g(Klt,{userId:d,isOpen:c,setIsOpen:u}):null]})},c6=({headerLabel:t})=>g(Ke,{variant:"h5",sx:{m:2,textAlign:"center"},children:t}),Zlt=()=>{const t=bt(Dc),e=bt(qx),n=bt(e?Xx:fG),{data:r=[],isLoading:o}=HW(n),{data:i=[],isLoading:s}=LF(void 0,{skip:!e}),{data:a,isLoading:l}=P9e(n,{skip:e}),c=C.useMemo(()=>e?i.find(d=>d.id===n):a,[i,n]),u=C.useMemo(()=>c&&e?`Users (Group: ${c.name})`:"Users",[i,n,e]);return o||s||l?g(tl,{}):g(To,{sx:{m:0,p:0,height:"100%",overflow:"auto",display:"flex"},children:K(Mt,{direction:"column",children:[g(c6,{headerLabel:u}),g(le,{sx:{flex:1},children:g(Qlt,{user:t,users:r,groups:i,isLoading:o||s,isAdmin:e,activeGroupId:n})}),g(Sqe,{})]})})},Jlt=({users:t})=>{const e="Name",n="Email",r="<Empty>",[s,a]=C.useState({pageSize:50,page:0}),l=[{field:e,headerName:e,flex:1,hideable:!1},{field:n,headerName:n,flex:1.2,hideable:!1}],c=C.useMemo(()=>Tt.sortBy(t.map(u=>({id:u.id,[e]:`${u.firstName} ${u.lastName}`,[n]:u.email})),n),[t]);return t.length?g(le,{sx:{flex:1,border:`1px solid ${tc}`},children:g(Dm,{tableType:ps.GROUP_COLLABORATION,wrapperSx:{p:0},dataGridSx:{zIndex:1,height:"auto"},rows:c,columns:l,rowHeight:30,columnHeaderHeight:30,paginationModel:s,onPaginationModelChange:a,pageSizeOptions:[50],hideFooter:t.length<50,disableColumnResize:!0,disableColumnSelector:!0,disableColumnMenu:!0,showColumnVerticalBorder:!0})}):g(le,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center",border:`1px dashed ${tc}`},children:g(Ke,{variant:"h5",children:r})})},ect=({handleEditAction:t})=>g(Qo,{icon:g(hR,{}),onClick:t,sx:{color:Ef,background:tt,p:0}}),tct=({label:t,handleEditAction:e})=>K(Mt,{direction:"row",spacing:1,sx:{mb:1,alignItems:"center"},children:[g(Ke,{variant:"h5",children:t}),g(rn,{title:"Edit User List",children:g(ect,{handleEditAction:e})})]}),nct=({group:t,users:e,handleEditAction:n})=>{const r="Invalid Group";return t?K(Mt,{direction:"column",sx:{border:`2px solid ${tt}`,borderRadius:2,p:2},children:[g(tct,{label:t.name,handleEditAction:n}),g(Jlt,{users:e})]}):g(Ke,{variant:"h5",children:r})},ufe=()=>{const{data:t=[],isLoading:e}=F9e();return{users:t,isLoadingUsers:e}},u6=()=>{const{users:t}=ufe();return t},rct=t=>{const{data:e=[]}=HW(t);return e},oct=t=>u6().filter(r=>r.groupId===t),ict=t=>u6().find(n=>n.id===t),tB={getAll:u6,getAllAndLoading:ufe,getAllByGroupId:rct,getAllSimpleByGroupId:oct,getById:ict},dfe=({label:t,isChecked:e,isDisabled:n,onChangeHandler:r})=>K(le,{display:"flex",alignItems:"center",children:[g(_u,{sx:{"&.Mui-checked":{color:tc}},checked:e,disabled:n,onChange:r}),g(Ke,{variant:"body2",children:t})]}),hfe=({isOpen:t,headerLabel:e,optionList:n,handleCloseModal:r,handleSubmitAction:o})=>{const i="Cancel",s="Save",a="Select All",l="<Empty>",c="400px",[u,d]=C.useState(n),h=(S,w)=>{d(A=>A.map(_=>_.id===S?{..._,isSelected:w}:_))},f=S=>{d(n.map(w=>({...w,isSelected:S})))},p=()=>{o(u),r()},m=[{id:"cancel",label:i,handleClick:()=>r(),isEnabled:!0,sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"submit",label:s,handleClick:()=>p(),isEnabled:!0,sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:1}}],y=u.filter(S=>S.isSelected),v=u.length>0&&y.length===u.length,b=y.length>0&&y.length<u.length;return g(mR,{isOpen:t,handleCancel:r,sx:{},children:K(Mt,{direction:"column",sx:{p:2},children:[g(lw,{label:e}),K(Mt,{direction:"row",sx:{alignItems:"center"},children:[g(_u,{sx:{"&.Mui-checked":{color:tc},"&.MuiCheckbox-indeterminate":{color:tc},justifyContent:"flex-start",pl:2},checked:v,indeterminate:b,onChange:()=>{f(!v)}})," ",g(Ke,{variant:"body2",children:a})]}),g(Mt,{direction:"column",sx:{p:1,border:"1px solid grey",borderRadius:2,maxHeight:c,overflowY:"auto"},children:u.length?u.map(S=>g(dfe,{label:S.label,isChecked:S.isSelected,isDisabled:!1,onChangeHandler:w=>h(S.id,w.target.checked)},S.id)):g(le,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:g(Ke,{variant:"h5",children:l})})}),g(Mt,{direction:"row",spacing:.5,sx:{mt:2,justifyContent:"flex-end"},children:m.map(S=>g(Au,{id:S.id,label:S.label,handleClick:S.handleClick,isEnabled:S.isEnabled,sx:S.sx},S.id))})]})})},sct=({activeGroupCollaboration:t})=>{const e="Empty",n=pR.getAll(),r=tB.getAll(),[o]=Pue(),[i,s]=C.useState(null),[a,l]=C.useState(!1),c=t.groupIds,u=i!=null?n.find(S=>S.id===i):null,d=r.filter(S=>S.groupId===i),h=`Project Collaboration: ${t.name}`,f=`Add/Remove User from Group: '${u?.name}'`,p=Tt.sortBy(d,"email").map(S=>({id:S.id,label:`${S.firstName} ${S.lastName} <${S.email}>`,isSelected:t.userIds.includes(S.id)})),m=S=>t.userIds.reduce((w,A)=>{const _=r.find(P=>P.id===A);return _?.groupId===S&&w.push(_),w},[]),y=S=>{l(!0),s(S)},v=()=>{l(!1),s(null)},b=S=>{const w=d.map(O=>O.id),A=t.userIds.filter(O=>!w.includes(O)),P=S.filter(O=>O.isSelected).map(O=>O.id),R={...t,userIds:[...A,...P]};o({requestBody:R})};return K(To,{sx:{width:"100%",minHeight:"100%"},children:[K(Mt,{direction:"column",sx:{height:"100%"},children:[g(c6,{headerLabel:h}),c.length?c.map(S=>g(nct,{group:n.find(w=>w.id===S),users:m(S),handleEditAction:()=>y(S)},S)):g(To,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:g(Ke,{variant:"h5",children:e})})]}),u?g(hfe,{isOpen:a,headerLabel:f,optionList:p,handleCloseModal:v,handleSubmitAction:b}):null]})},act=Nr.injectEndpoints({endpoints:t=>({getAllEmailInvite:t.query({query:()=>({url:`${dt.invite}`,method:nn.GET}),providesTags:[We.EmailInvite],transformResponse:e=>e}),createEmailInvite:t.mutation({query:e=>({url:`${dt.invite}
388`,method:nn.POST,body:e}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.EmailInvite]})})}),{useGetAllEmailInviteQuery:lct,useCreateEmailInviteMutation:cct}=act,PR=({id:t,label:e,handleClick:n,sx:r,startIcon:o,isEnabled:i=!0,tooltip:s=""})=>{const a=md(tt,.8);return g(rn,{title:s,children:g(Sn,{id:t,variant:"contained",sx:{color:"white",backgroundColor:tt,"&:hover":{backgroundColor:a},my:"5px",whiteSpace:"normal",textAlign:"center",lineHeight:1.5,height:"auto",py:1,...r},startIcon:o,disabled:!i,onClick:n,children:e})})},uct=({emailInvites:t})=>{const n=Date.now()-864e5,r=bt(Dc),o=tB.getAll(),[i,s]=C.useState(""),[a,l]=C.useState(!1),[c,u]=C.useState(""),d=C.useRef(null),[h,{isLoading:f}]=cct(),p=!!o.find(P=>P.email===i),m=t.find(P=>P.email===i),y=!!m&&new Date(m.createdAt).getTime()>n,b=!!c||f,S=P=>{s(P.target.value.toLowerCase().trim())},w=()=>{l(!0)},A=P=>{P.key==="Enter"&&(P.preventDefault(),w(),d.current?.blur())},_=()=>{const P=`Sent email invite to ${i.trim()}`,R="Failed to send email invite",O=`${r.firstName} ${r.lastName}`;h({email:i.trim(),senderName:O}).unwrap().then(()=>{s(""),l(!1),ln.success(P,{autoClose:3e3})}).catch(()=>ln.error(R,{autoClose:3e3}))};return C.useEffect(()=>{const P="Invalid email format",R="User with the same email already exists in the database",O="Email was last invited less than 24hrs ago";a&&(!i.length||!i.match(Jce))?u(P):u(p?R:y?O:"")},[a,i]),K(Mt,{direction:"row",spacing:1,sx:{maxWidth:"40%",p:2},children:[g(le,{width:"100%",children:g(QW,{label:Jr.INVITE_USER_EMAIL,controlValue:i,errorMessage:c,isPassword:!1,isPasswordHidden:!1,isError:!!c,isInputFocused:!0,inputRef:d,handleInputFocus:()=>null,handleInputChange:S,handleInputBlur:w,handleInputKeyDown:A,handleChangePasswordVisibility:()=>null,startIcon:g(AW,{})})}),g(PR,{id:Jr.SEND_INVITE,label:Jr.SEND_INVITE,startIcon:g(e8e,{}),handleClick:_,isEnabled:!b,sx:{width:"120px"}})]})},dct=({emailInvites:t})=>{const e="email",n="senderName",r="date",o="Email",i="Sender Name",s="Sent Date and Age",a="Filter logs",[d,h]=C.useState(""),[f,p]=C.useState({pageSize:50,page:0}),m=S=>{const A=new Date(S),_=`${A.getUTCFullYear()} ${A.toLocaleString("en-US",{month:"short",timeZone:"UTC"}).toUpperCase()} ${A.getUTCDate()}`,P=A.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC"}),R=Math.floor((Date.now()-A.getTime())/864e5);return`${_}, ${P}, ${R} days ago`},y=[{field:e,headerName:o,flex:3},{field:n,headerName:i,flex:2},{field:r,headerName:s,flex:3}],b=C.useMemo(()=>t.map((S,w)=>({id:`${w}`,[e]:S.email,[n]:S.senderName,[r]:m(S.createdAt)})),[t]).filter(S=>S.email.includes(d)||S.senderName.includes(d)||S.date.includes(d));return K(Mt,{direction:"column",spacing:1,sx:{p:2},children:[g(lo,{id:"filter",placeholder:a,value:d,onChange:S=>h(S.target.value),InputProps:{startAdornment:g(qr,{position:"start",children:g(Nce,{})})},variant:"outlined",size:"small",sx:{my:0,height:"40px",width:"220px",...Ic}}),g(Jj,{sx:{width:"100%",height:"50%",zIndex:1,"& .MuiDataGrid-cell:focus":{outline:`1px ${tt} solid`},"& .MuiDataGrid-row.Mui-selected":{backgroundColor:XI},"& .MuiDataGrid-row.Mui-selected:hover":{backgroundColor:so}},rows:b,rowHeight:30,columns:y,paginationModel:f,onPaginationModelChange:p,pageSizeOptions:[50,100],hideFooter:b.length<50,disableColumnFilter:!0,disableColumnSelector:!0,checkboxSelection:!1})]})},hct=()=>{const t="Send Invite via Email",e="No Access",n=bt(qx),{data:r=[]}=lct();return n?g(To,{sx:{m:0,p:0,height:"100%",width:"100%",overflow:"auto"},children:K(Mt,{direction:"column",children:[g(c6,{headerLabel:t}),K(Mt,{direction:"column",spacing:1,sx:{alignItems:"left"},children:[g(uct,{emailInvites:r}),g(yi,{}),g(dct,{emailInvites:r})]})]})}):g(Ke,{children:e})},fct=({activeTab:t})=>{const e=bt(pG),n=QL.getById(e);return K(le,{sx:{flex:1,height:"100%",overflow:"auto"},children:[t===Ri.GROUP?g(Zlt,{}):null,t===Ri.COLLABORATION&&n?g(sct,{activeGroupCollaboration:n}):null,t===Ri.INVITE?g(hct,{}):null]})},pct=({activeGroup:t,isOpen:e,close:n})=>{const[r,o]=C.useState(""),[i,{isLoading:s,error:a}]=UW(),{data:l=[],error:c,isLoading:u}=LF(void 0),h=l.map(b=>b.name).includes(r),f=r!==t.name,p=C.useMemo(()=>{switch(!0){case!r:return to.emptyValue(uT.GROUP_NAME);case r.length<OC:return to.minCharLengthNotReach(uT.GROUP_NAME);case!GL.test(r):return to.invalidName(uT.GROUP_NAME);case(f&&h):return to.nameAlreadyUsed(uT.GROUP_NAME);default:return""}},[r]),m=!!p,y=C.useCallback(b=>{o(b.target.value)},[p]),v=async()=>
388{if(!(m||h)){try{await i({params:{...t,name:r}})}catch{}n()}};return C.useEffect(()=>{t.id&&o(t.name)},[t]),K(Iu,{open:e,onClose:n,fullWidth:!0,sx:{width:"100%","& .MuiPaper-root":{maxWidth:"50vw"}},children:[g(eg,{children:rD.EDIT_GROUP_NAME}),g(yi,{}),g(ZC,{children:g(le,{sx:{p:2},children:g(lo,{required:!0,id:"groupName",label:uT.GROUP_NAME,fullWidth:!0,margin:"dense",value:r,onChange:y,error:!!p,helperText:p?g(Aue,{message:p}):null})})}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:n,children:KL.CANCEL}),g(Sn,{variant:"contained",color:"primary",disabled:s||!f||m||h,type:"submit",onClick:v,children:KL.UPDATE})]})]})},gct=Nr.injectEndpoints({endpoints:t=>({getGroupFtpCredentialByGroupId:t.query({query:({groupId:e})=>({url:`${dt.groupFtpCredential}?groupId=${e}`,method:nn.GET}),providesTags:[We.GroupFtpCredential],transformResponse:(e,n,r)=>e}),upsertGroupFtpCredential:t.mutation({query:({requestBody:e})=>({url:`${dt.groupFtpCredential}`,method:nn.POST,body:e}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.GroupFtpCredential]})})}),{useGetGroupFtpCredentialByGroupIdQuery:mct,useUpsertGroupFtpCredentialMutation:yct}=gct,vct=t=>{const{data:e}=mct({groupId:t});return e},ffe={getByGroupId:vct},bct=()=>Qp(),Cct={getId:bct},Sct=({hostname:t,port:e,username:n,password:r,encryptionType:o,path:i,groupId:s})=>({id:Cct.getId(),hostname:t,port:e,username:n,password:r,encryptionType:o,path:i,groupId:s}),Ect=({hostname:t,port:e,username:n,password:r,encryptionType:o,path:i,groupFtpCredential:s})=>({...s,hostname:t,port:e,username:n,password:r,encryptionType:o,path:i}),RZ={getCreatePayload:Sct,getUpdatePayload:Ect},xct=({label:t,currentFtpValue:e,setCurrentFtpValue:n,isPassword:r,isError:o,startIcon:i})=>{const[s,a]=C.useState(!1),[l,c]=C.useState(!0),u=C.useRef(null),d=()=>a(!0),h=y=>{n(y.target.value)},f=()=>{a(!1)},p=y=>{y.key==="Enter"&&(y.preventDefault(),f(),u.current?.blur())},m=()=>{c(!l)};return g(QW,{label:t,controlValue:e,errorMessage:`${t} ${o?"is required":""}`,isPassword:r,isPasswordHidden:l,isError:o,isInputFocused:s,inputRef:u,handleInputFocus:d,handleInputChange:h,handleInputBlur:f,handleInputKeyDown:p,handleChangePasswordVisibility:m,startIcon:i})};var lD=(t=>(t.TLS="tls",t.PLAIN="plain",t.SFTP="sftp",t))(lD||{});const wct=({label:t,controlValue:e,options:n,isError:r,handleSelectChange:o,startIcon:i})=>{const s=n.map(({key:a,value:l,displayName:c,isOptionDisabled:u})=>g(mr,{value:l,disabled:u,children:c},a));return g(Mt,{direction:"column",children:K(v0,{sx:{width:"100%"},children:[g(_F,{id:`${t}-label`,sx:{fontSize:"12px"},children:t}),g(xa,{id:t.toLowerCase(),size:"small",value:e,input:g(hW,{label:t,startAdornment:g(qr,{position:"start",children:i})}),onChange:o,error:r,children:s})]})})},Act=({label:t,currentFtpValue:e,setCurrentFtpValue:n,isError:r,startIcon:o,options:i})=>g(wct,{label:t,controlValue:e,options:i,isError:r,handleSelectChange:a=>{n(a.target.value)},startIcon:o}),Tct=({activeGroupId:t,isOpen:e,setIsFtpModalOpen:n})=>{const r="Save",o="Clear",i="Cancel",s="Hostname",a="Port",l="Username",c="Password",u="Encryption Type",d="Path",h="Configure FTP",f=ffe.getByGroupId(t),[p]=yct(),[m,y]=C.useState(f?.hostname??""),[v,b]=C.useState(f?.port??""),[S,w]=C.useState(f?.username??""),[A,_]=C.useState(atob(f?.password??"")),[P,R]=C.useState(f?.encryptionType??lD.TLS),[O,N]=C.useState(f?.path??""),M=()=>!!m||!!v||!!S||!!A||!!O,L=()=>{n(!1)},F=()=>{const H={hostname:m,port:v,username:S,password:btoa(A),encryptionType:P,path:O},V=f?RZ.getUpdatePayload({...H,groupFtpCredential:f}):RZ.getCreatePayload({...H,groupId:t});Tt.isEqual(V,f)||p({requestBody:V}),n(!1)},$=()=>{y(""),b(""),w(""),_(""),R(lD.TLS),N("")},D=Object.entries(lD).map(([H,V])=>({key:H,value:V,displayName:V})),k=[{label:s,value:m,setValue:y,isPassword:!1,isError:!m,startIcon:g(Hce,{})},{label:a,value:v,setValue:b,isPassword:!1,isError:!v,startIcon:g(i8e,{})},{label:l,value:S,setValue:w,isPassword:!1,isError:!S,startIcon:g(PW,{})},{label:c,value:A,setValue:_,isPassword:!0,isError:!1,startIcon:g(OF,{})},{isSelect:!0,label:u,value:P,setValue:R,isPassword:!1,isError:!1,startIcon:g(l8e,{}),options:D},{label:d,value:O,setValue:N,isPassword:!1,isError:!1,startIcon:g(J6e,{})}],U=[{id:"cancel-ftp",label:i,handleClick:()=>L(),sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"save-ftp",label:r,handleClick:()=>F(),sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:1}}];return C.useEffect(()=>{f&&(y(f.hostname),b(f.port),w(f.username),_(atob(f.password)),R(f.encryptionType),N(f.path)),f||$()},[f,e]),g(mR,{isOpen:e,sx:{},handleCancel:L,children:K(le,{sx:{p:4},children:[g(lw,{label:h}),k.map(H=>H?.isSelect?g(Act,{label:H.label,currentFtpValue:H.value,setCurrentFtpValue:H.setValue,isError:H.isError,startIcon:H.startIcon,options:H.options},H.label):g(xct,{label:H.label,currentFtpValue:H.value,setCurrentFtpValue:H.setValue,isPassword:H.isPassword,isError:H.isError,startIcon:H.startIcon},H.label)),K(Mt,{direction:"row",sx:{width:"100%",justifyContent:"space-between",mt:1},children:[g(Au,{id:"clear-ftp",label:o,handleClick:$,isEnabled:M(),sx:{border:`1px solid ${M()?"darkred":Ef}`,color:"darkred",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}}),g(Mt,{direction:"row",spacing:.5,children:U.map(H=>g(Au,{id:H.id,label:H.label,handleClick:H.handleClick,isEnabled:!0,sx:H.sx},H.id))})]})]})})},_ct=({activeGroupId:t,isEnabled:e})=>{const n="Configure",[r,o]=C.useState(!1),i=()=>{o(!0)};return K(le,{children:[g(Au,{id:"configure-ftp",label:n,handleClick:()=>i(),startIcon:g(RW,{}),isEnabled:e,sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:3}}),g(Tct,{activeGroupId:t,isOpen:r,setIsFtpModalOpen:o})]})},cD=Nr.injectEndpoints({endpoints:t=>({getAllRtlBranch:t.query({query:()=>({url:`${dt.rtlBranch}`,method:nn.GET}),providesTags:[We.RtlBranch],transformResponse:e=>e}),createRtlBranch:t.mutation({query:e=>({url:`${dt.rtlBranch}
388`,method:nn.POST,body:e}),async onQueryStarted(e,{dispatch:n,queryFulfilled:r}){const o=n(cD.util.updateQueryData("getAllRtlBranch",void 0,i=>{i.push(e)}));try{await r}catch{o.undo()}},transformResponse:e=>e,transformErrorResponse:e=>e}),updateRtlBranch:t.mutation({query:({requestBody:e})=>({url:`${dt.rtlBranch}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){await C0({dispatch:n,api:cD,endpointName:"getAllRtlBranch",queryArg:void 0,requestBody:e,queryFulfilled:r})},transformErrorResponse:e=>e,transformResponse:e=>e}),deleteRtlBranch:t.mutation({query:({id:e})=>({url:`${dt.rtlBranch}?id=${e}`,method:nn.DELETE}),async onQueryStarted({id:e},{dispatch:n,queryFulfilled:r}){await fR({dispatch:n,api:cD,endpointName:"getAllRtlBranch",queryArg:void 0,queryFulfilled:r,id:e})},transformErrorResponse:e=>e,transformResponse:e=>e})})}),{useGetAllRtlBranchQuery:Ict,useCreateRtlBranchMutation:Pct,useUpdateRtlBranchMutation:Rct,useDeleteRtlBranchMutation:Oct}=cD,d6=()=>{const{data:t=[]}=Ict();return t},Nct=t=>{const n=d6().find(r=>r.id===t);return n||null},Mct=t=>{const n=d6().find(r=>r.name===t);return n||null},im={getAll:d6,getById:Nct,getByName:Mct},Dct=({activeGroup:t,field:e,value:n})=>({...t,[e]:n}),Lct={getUpdatePayload:Dct},kct=({label:t,isChecked:e,isDisabled:n,onChangeHandler:r})=>K(le,{display:"flex",alignItems:"center",children:[g(jI,{sx:{"&.Mui-checked":{color:tc}},checked:e,disabled:n,onChange:r}),g(Ke,{variant:"body2",children:t})]}),pfe=({labelForDelete:t,menuAnchorEl:e,handleCancel:n,handleConfirm:r})=>{const o="Cancel",i="Confirm",s=`Confirm deleting '${t}'?`,a="#FE0000",l={border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}},c={width:"100%",backgroundColor:a,"&:hover":{backgroundColor:md(a,.8)},ml:1};return g(Es,{open:!!e,anchorEl:e,onClose:n,disableEnforceFocus:!0,children:K(Mt,{direction:"column",sx:{m:2},children:[g(lw,{label:s}),K(Mt,{direction:"row",sx:{justifyContent:"center"},children:[g(Au,{id:"cancel-delete",label:o,handleClick:n,sx:l}),g(Au,{id:"confirm-delete",label:i,handleClick:r,sx:c})]})]})})},Fct=()=>Qp(),Bct={getId:Fct},$ct=t=>({id:Bct.getId(),name:t}),Hct=(t,e)=>({...t,name:e}),gfe={getCreatePayload:$ct,getUpdatePayload:Hct},Uct=({isOpen:t,activeGroupRtlBranchId:e,activeRtlBranchName:n,setIsEditRtlBranchModalOpen:r})=>{const o=`Edit ${n}`,i="Save",s="Edit RTL Branch Name",a=im.getById(e),c=im.getAll().map(f=>f.name),[u]=Rct();return g(FF,{isOpen:t,headerLabel:o,submitLabel:i,inputLabel:s,inputIcon:g(hR,{}),existingNames:c,initialValue:n,handleCloseModal:()=>{r(!1)},handleSubmitAction:f=>{if(!a)return;const p=gfe.getUpdatePayload(a,f);u({requestBody:p})}})},zct=({isOpen:t,setIsAddRtlBranchModalOpen:e})=>{const n="Add RTL Branch",r="Save",o="New RTL Branch Name",s=im.getAll().map(h=>h.name),[a]=Pct(),[l,c]=C.useState("");return g(FF,{isOpen:t,headerLabel:n,submitLabel:r,inputLabel:o,inputIcon:g(eS,{}),existingNames:s,initialValue:l,handleCloseModal:()=>{e(!1),c("")},handleSubmitAction:h=>{const f=gfe.getCreatePayload(h);a(f)}})},Vct=({isOpen:t,activeGroupId:e,activeGroupRtlBranchId:n,setIsSelectRtlBranchModalOpen:r})=>{const o="RTL Branch",i="Select",s="Cancel",a="Delete",l="Edit",c="Add",u="master",d="400px",[h]=UW(),[f]=Oct(),[p,m]=C.useState(n??null),[y,v]=C.useState(null),[b,S]=C.useState(!1),[w,A]=C.useState(!1),_=pR.getById(e),P=im.getAll(),R=im.getById(p),O=im.getByName(u),N=P.map(H=>({id:H.id,label:H.name,isSelected:H.id===p})),M=()=>{r(!1)},L=async H=>{if(!_)return;const V=Lct.getUpdatePayload({activeGroup:_,field:"rtlBranchId",value:H});Tt.isEqual(V,_)||await h({params:V})},F=()=>{v(null)},$=async()=>{const H=O?.id;v(null),await f({id:p}),await L(H),m(H)},D=()=>R?.name===u,k=[{id:"delete",label:a,isEnabled:!D(),tooltip:D()?"Cannot delete master branch":"",handleClick:H=>{H.stopPropagation(),v(H.currentTarget)},sx:{border:`1px solid ${D()?Ef:"#FE0000"}`,color:"#FE0000",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"edit",label:l,isEnabled:!D(),tooltip:D()?"Cannot edit master branch":"",handleClick:H=>{H.stopPropagation(),S(!0)},sx:{border:`1px solid ${D()?Ef:tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7},my:"5px",ml:1}},{id:"add",label:c,isEnabled:!0,tooltip:"",handleClick:H=>{H.stopPropagation(),A(!0)},sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7},my:"5px",ml:1}}],U=[{id:"cancel",label:s,handleClick:()=>M(),isEnabled:!0,sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"select",label:i,handleClick:()=>{L(p),M()},isEnabled:!0,sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:1}}];return g(mR,{isOpen:t,handleCancel:M,sx:{},children:K(Mt,{direction:"column",sx:{p:2},children:[g(lw,{label:o}),g(Mt,{direction:"column",sx:{p:1,border:"1px solid grey",borderRadius:2,maxHeight:d,overflowY:"auto"},children:N.map(H=>g(kct,{label:H.label,isChecked:H.isSelected,isDisabled:!1,onChangeHandler:()=>m(H.id)},H.id))}),K(Mt,{direction:"row",sx:{width:"100%",justifyContent:"space-between",mt:1},children:[g(Mt,{direction:"row",spacing:.5,children:k.map(H=>g(rn,{title:H.tooltip,children:g(Au,{id:H.id,label:H.label,handleClick:H.handleClick,isEnabled:H.isEnabled,sx:H.sx})},H.id))}),g(Mt,{direction:"row",spacing:.5,children:U.map(H=>g(Au,{id:H.id,label:H.label,handleClick:H.handleClick,isEnabled:!0,sx:H.sx},H.id))})]}),y?g(pfe,{labelForDelete:R?.name??u,menuAnchorEl:y,handleCancel:F,handleConfirm:$}):null,b?g(Uct,{isOpen:b,activeGroupRtlBranchId:R?.id,activeRtlBranchName:R?.name,setIsEditRtlBranchModalOpen:S}):null,w?g(zct,{isOpen:w,setIsAddRtlBranchModalOpen:A}):null]})})},Gct=({activeGroupId:t,activeGroupRtlBranchId:e,isEnabled:n})=>{const r="master",o=im.getById(e),i=o?o.name:r,[s,a]=C.useState(!1);return K(le,{children:[g(rn,{title:i,children:g(Au,{id:"rtl-branch-control",label:K(le,{sx:{display:"flex",alignItems:"center",minWidth:0,gap:"6px"},children:[g(qI,{}),g(le,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:i})]}),handleClick:()=>{a(!0)},isEnabled:n,sx:{width:"100px",minWidth:"100px",maxWidth:"100px",backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:3}})}),s?g(Vct,{isOpen:s,activeGroupId:t,activeGroupRtlBranchId:e,setIsSelectRtlBranchModalOpen:a}):null]})},mfe=({id:t,isEditEnabled:e=!0,isDeleteEnabled:n=!0,isDeleteHidden:r=!1,editLabel:o,deleteLabel:i,editTooltip:s="",deleteTooltip:a="",handleEdit:l,handleDelete:c})=>{const u="Edit",d="Delete",h="#FE0000";return K(Mt,{direction:"column",sx:{px:1,width:"100%",alignItems:"center"},children:[g(Au,{id:`edit-${t}`,label:o??u,handleClick:l,startIcon:g(hR,{}),isEnabled:e,sx:{width:"100%"},tooltip:s}
388),r?null:g(Au,{id:`delete-${t}`,label:i??d,handleClick:f=>c(f),startIcon:g(RF,{}),isEnabled:n,sx:{width:"100%",backgroundColor:h,"&:hover":{backgroundColor:md(h,.8)}},tooltip:a})]})},Wct=({users:t,activeGroup:e,setEditGroup:n})=>{const r={"&.Mui-checked":{color:tc}},o=Yn(),i=bt(Dc),s=bt(qx),a=bt(s?Xx:fG),l=a&&rh.isAdminGroup(a),[c]=UW(),u=async({field:y,value:v,id:b})=>{await c({params:{...e,[y]:v}}),(y===mc.CAN_DOWNLOAD_RTL||y===mc.CAN_SIMULATE||y===mc.CAN_DOWNLOAD_JSON||y===mc.CAN_GENERATE_CYCLE_ACCURATE_MODEL||y===mc.IS_UPLOAD_TO_FTP)&&b===i.group.id&&o(bC({user:{...i,group:{...i.group,[y]:v}}}))},d=({canExport:y,exportAuthLevel:v,id:b})=>{b===i.group.id&&o(bC({user:{...i,group:{...i.group,canExport:y,exportAuthLevel:v}}}))},h=(y,v)=>{u({field:mc.CAN_EXPORT,value:v,id:y.id}),d({canExport:v,exportAuthLevel:y.exportAuthLevel,id:y.id})},f=({row:y,exportAuthLevel:v})=>{u({field:mc.EXPORT_AUTH_LEVEL,value:v,id:y.id}),d({canExport:y.canExport,exportAuthLevel:v,id:y.id})},p=(y,v,b)=>{t.length?o(DI({anchorElId:b,warningText:XL.CANNOT_DELETE_GROUP})):o(Im({type:"group",deleteElementId:y,anchorElId:b,name:v}))},m=[{label:Jr.SUSPEND,checked:e.deleted,disabled:e.id===1||e.id===2,hidden:l,handlerField:mc.DELETED},{label:Jr.DOWNLOAD_RTL,checked:e.canDownloadRTL,disabled:e.deleted,handlerField:mc.CAN_DOWNLOAD_RTL},{label:Jr.GENERATE_CYCLE_ACCURATE_MODEL,checked:e.canGenerateCycleAccurateModel,disabled:e.deleted,handlerField:mc.CAN_GENERATE_CYCLE_ACCURATE_MODEL},{label:Jr.DOWNLOAD_JSON,checked:e.canDownloadJson,disabled:e.deleted,handlerField:mc.CAN_DOWNLOAD_JSON},{label:Jr.SIMULATE,checked:e.canSimulate,disabled:e.deleted,handlerField:mc.CAN_SIMULATE},{label:Jr.EXPORT,checked:e.canExport,disabled:e.deleted,handlerField:mc.CAN_EXPORT},{label:Jr.UPLOAD_TO_FTP,checked:e.isUploadToFtp,disabled:e.deleted,handlerField:mc.IS_UPLOAD_TO_FTP},{label:Jr.USER_BRANCH_CONTROL,checked:e.isUserBranchControlVisible,disabled:e.deleted,handlerField:mc.IS_USER_BRANCH_CONTROL_VISIBLE}];return g(le,{sx:{border:`1px solid ${Ef}`,p:1},children:K(Mt,{direction:"column",children:[m.map(y=>y?.hidden?null:K(le,{children:[g(dfe,{label:y.label,isChecked:y.checked,isDisabled:y.disabled,onChangeHandler:v=>{Jr.EXPORT===y.label?h(e,v.target.checked):u({field:y.handlerField,value:v.target.checked,id:e.id})}}),y.label===Jr.EXPORT?g(le,{display:"flex",alignItems:"center",children:g(sce,{value:e.exportAuthLevel,name:"export-radio-button-group",onChange:v=>{const b=Number(v.target.value);f({row:e,exportAuthLevel:b})},sx:{ml:3},children:q7e.map(v=>g(ec,{value:v.value,control:g(jI,{sx:r}),disabled:!e.canExport||e.deleted,label:g(Ke,{variant:"body2",children:v.label})},v.label))})}):null,y.label===Jr.UPLOAD_TO_FTP&&e.isUploadToFtp?g(_ct,{activeGroupId:e.id,isEnabled:!e.deleted}):null,y.label===Jr.USER_BRANCH_CONTROL&&!e.isUserBranchControlVisible?g(Gct,{activeGroupId:e.id,activeGroupRtlBranchId:e.rtlBranchId,isEnabled:!e.deleted}):null]},y.label)),g(yi,{sx:{my:1}}),g(mfe,{id:a.toString(),isEditEnabled:!e.deleted,isDeleteEnabled:!e.deleted,isDeleteHidden:!!l,editLabel:Jr.EDIT_GROUP_NAME,deleteLabel:Jr.DELETE_GROUP,handleEdit:()=>n({name:e.name,id:e.id}),handleDelete:()=>p(e.id,e.name,`delete-${e.id}`)})]})},a)},jct=({headerLabel:t})=>g(Ke,{variant:"h6",sx:{m:2,textAlign:"center"},children:t}),qct=({headerLabel:t,controlBox:e})=>K(Mt,{direction:"column",children:[g(jct,{headerLabel:t}),g(yi,{}),e]}),Yct=()=>{const t="Add/Remove Group",e="Edit Project Collaboration Name",n="Edit Project Collaboration",r="Edit Project Collaboration Name",o="Save",i="Delete Project Collaboration",s="Unable to delete non-empty Project Collaboration",a=Yn(),l=bt(pG),[c]=Pue(),[u]=J7e(),[d,h]=C.useState(!1),[f,p]=C.useState(!1),[m,y]=C.useState(null),v=QL.getAll(),b=QL.getById(l),S=pR.getAll();if(!b)return g(le,{});const w=`Add Group to Project Collaboration: '${b.name}'`,A=v.map(L=>L.name),_=S.map(L=>({id:L.id,label:L.name,isSelected:b.groupIds.includes(L.id)})),P=()=>h(!1),R=L=>{const $=L.filter(k=>k.isSelected).map(k=>k.id),D={...b,groupIds:$};c({requestBody:D}),P()},O=L=>{const F={...b,name:L};c({requestBody:F})},N=()=>y(null),M=()=>{u(l),a(M3("")),N()};return K(le,{sx:{border:`1px solid ${Ef}`,p:1},children:[K(Mt,{direction:"column",children:[g(le,{sx:{px:1},children:g(Au,{id:"add-group-collab",label:t,handleClick:()=>h(!0),startIcon:g(eS,{}),isEnabled:!0,sx:{width:"100%"}})}),g(yi,{sx:{my:1}}),g(mfe,{id:l,isDeleteEnabled:!b.groupIds.length,deleteTooltip:b.groupIds.length?s:"",editLabel:e,deleteLabel:i,handleEdit:()=>p(!0),handleDelete:L=>{L.stopPropagation(),y(L.currentTarget)}})]}),d&&g(hfe,{isOpen:d,headerLabel:w,optionList:_,handleCloseModal:P,handleSubmitAction:R}),f&&g(FF,{isOpen:f,headerLabel:n,submitLabel:o,inputLabel:r,inputIcon:g(hR,{}),existingNames:A,initialValue:b.name,handleCloseModal:()=>p(!1),handleSubmitAction:O}),!!m&&g(pfe,{labelForDelete:b.name,menuAnchorEl:m,handleCancel:N,handleConfirm:M})]},l)},Xct=({activeTab:t,height:e})=>{const n="Group Controls",r="Project Collaboration Controls",o="200px",i={name:"",id:0},s=bt(Xx),a=tB.getAllByGroupId(s),l=pR.getById(s),[c,u]=C.useState(i),d=t===Ri.GROUP||t===Ri.COLLABORATION,h=t===Ri.GROUP?n:r;if(!l)return g(tl,{});const p={[Ri.GROUP]:g(Wct,{users:a,activeGroup:l,setEditGroup:u}),[Ri.COLLABORATION]:g(Yct,{}),[Ri.INVITE]:g(le,{})}[t];return K(To,{sx:{height:e,width:o,borderLeft:"1px solid black",overflowY:"auto",overflowX:"hidden",zIndex:2,justifyContent:"flex-end"},children:[d?g(qct,{headerLabel:h,controlBox:p}):null,g(pct,{activeGroup:l,isOpen:!!c.id,close:()=>u(Eo.deepCopy(i))})]})},OZ=()=>
388{const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}},sc=()=>{const[t,e]=C.useState(OZ());return C.useEffect(()=>{const n=()=>{e(OZ())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t},Kct=({isAdmin:t,activeTab:e})=>{const{height:n}=sc(),r=ei.getAdminPanelHeight(n);return K(Mt,{direction:"row",sx:{height:r},children:[t?g(pqe,{activeTab:e}):null,g(fct,{activeTab:e}),t?g(Xct,{activeTab:e,height:r}):null]})},Qct=()=>{const t=Za(),e=bt(Dc),n=bt(qx),r=bt(Ose),[o,i]=C.useState(Ri.GROUP),s=(a,l)=>i(l);return C.useEffect(()=>{e.id&&!n&&!r&&(t(un.projects.path),ln.warning(XL.NOT_AUTHORIZED))},[e,n,r]),e&&e.role?K(Mt,{direction:"column",children:[g(X7e,{activeTab:o,handleActiveTabChange:s}),g(Kct,{isAdmin:n,activeTab:o})]}):g(tl,{})},Zct=()=>{const{firstName:t,lastName:e,email:n,settings:r,role:o,group:i}=bt(Dc);return K(le,{children:[g(le,{}),K(le,{children:["Group: ",i.name]}),K(le,{children:["Role: ",o.name]}),K(le,{children:["User name: ",t," ",e]}),K(le,{children:["Email: ",n]}),K(le,{children:["Theme: ",r.ui.theme]})]})},Ep={DOWNLOAD_INITIATED:"Result download initiated, please wait",DOWNLOAD_FAILED:"Downloading task result failed",RESULTS_UPDATED:"Results updated",DOWNLOAD_JSON_FAILED:"Download Json Failed."},yfe=5*1e3,qg=()=>g(le,{sx:{width:"1px",backgroundColor:Zs,height:"20px",margin:"0 5px"}}),v5={isEgressRouterConnection:({connection:t,routerComponent:e})=>t.parameters.fromId===e?.id,isIngressRouterConnection:({connection:t,routerComponent:e})=>t.parameters.toId===e?.id,getRouterConnectionCoordinates:({connection:t,routerComponents:e,connectionRoutes:n})=>{const r=e.find(i=>i.id===t?.parameters?.fromId),o=e.find(i=>i.id===t?.parameters?.toId);if(r&&o){const i=r.parameters.ports.eGress.length,s=o.parameters.ports.inGress.length,a=r.size.height/i,l=o.size.height/s,c=r.size.nameSize.height,u=o.size.nameSize.height,d=r.coordinates.x+r.size.width+Ve.portCircleRadius/2,h=r.coordinates.y+c+(a/2+a*t.parameters.fromEgressPortIdx),f=o.coordinates.x-Ve.portCircleRadius/2,p=o.coordinates.y+u+(l/2+l*t?.parameters?.toInGressPortIdx);return st.getConnectionRoutePoints({route:n[t.id],precalculatedPoints:[d,h,f,p]})??[]}return[]}},Ki={getCreateComponentPayload:({projectId:t,componentType:e,connection:n,newParentId:r,componentIdToTopologyMap:o,groupedComponents:i,projectComponentsTree:s,connectionRoutes:a,index:l,routerConnectedToBridges:c,virtualDeviceParentComponent:u})=>{const d=Uo(),h=st.getComponentId({components:i,type:e}),f=i.virtualTargets.filter(m=>m.parameters.parentTargetId===u?.id),p=Ki.getVirtualDeviceIndex(f);return{projectId:t,component:{...Zu[e],id:d,projectId:t,componentId:h,name:st.getUniqueComponentName({componentName:YL[e],index:e===Fe.VIRTUAL_TARGETS?p:h}),coordinates:Ki.getComponentCoordinatesByType({componentType:e,connection:n,groupedComponents:i,connectionRoutes:a}),parameters:Ki.getComponentParametersByType({componentType:e,connection:n,componentIdToTopologyMap:o,projectComponentsTree:s,newParentId:r,routerConnectedToBridges:c,virtualDeviceParentComponent:u,groupedComponents:i}),size:Ki.getComponentSizeByType(e),type:e},componentTreeElement:{id:st.getMaxBy(s.data,"id")+1+(l??0),relationId:d,parent:r,droppable:!1,data:{id:d,type:e}}}},getUpdateComponentPayload:({projectId:t,component:e,connection:n,groupedComponents:r,componentIdToTopologyMap:o,projectComponentsTree:i,newParentId:s,isCoordinatesOnly:a,connectionRoutes:l,routerConnectedToBridges:c})=>({projectId:t,component:{...e,coordinates:Ki.getComponentCoordinatesByType({componentType:e.type,connection:n,groupedComponents:r,connectionRoutes:l}),parameters:Ki.getComponentParametersByType({componentType:e.type,connection:n,componentIdToTopologyMap:o,projectComponentsTree:i,newParentId:s,component:e,routerConnectedToBridges:c,groupedComponents:r})},coordinatesOnly:a}),getDeleteComponentPayload:({projectId:t,component:e,connections:n})=>({componentId:e.id,type:e.type,projectId:t,invalidateConnections:st.invalidateConnectionsOnComponentDelete({connections:n,deletedComponentId:e.id,invalidateConnectionsHolder:{}})}),getComponentParametersByType:({componentType:t,connection:e,componentIdToTopologyMap:n,projectComponentsTree:r,newParentId:o,component:i,routerConnectedToBridges:s,virtualDeviceParentComponent:a,groupedComponents:l})=>{switch(t){case Fe.BRIDGES:const c=r.data.find(h=>h.id===o)?.data?.id,u=v5.isEgressRouterConnection({connection:e,routerComponent:s}),d=v5.isIngressRouterConnection({connection:e,routerComponent:s});return{pipelineStagesCount:i?.parameters.pipelineStagesCount||xC,connectionId:e.id,fromTopologyId:u?c:n.get(e.parameters.fromId)?.id,toTo
388pologyId:d?c:n.get(e.parameters.toId)?.id};case Fe.VIRTUAL_TARGETS:return{parentTargetId:a?.id,baseAddress:"",limitAddress:""};case Fe.ROUTERS:case Fe.TARGETS:case Fe.INITIATORS:default:return{}}},getComponentCoordinatesByType:({componentType:t,connection:e,groupedComponents:n,connectionRoutes:r})=>{switch(t){case Fe.BRIDGES:const o=v5.getRouterConnectionCoordinates({connection:e,routerComponents:n.routers,connectionRoutes:r});return{x:Math.round(o[2]),y:Math.round(o[3])};case Fe.INITIATORS:case Fe.TARGETS:case Fe.ROUTERS:case Fe.VIRTUAL_TARGETS:default:return{x:Zu[t].coordinates.x,y:Zu[t].coordinates.y}}},getComponentSizeByType:t=>{switch(t){case Fe.BRIDGES:return{width:Ve.gridBlockSize*2,height:Ve.gridBlockSize,nameSize:{width:Ve.gridBlockSize,height:Ve.gridBlockSize}};case Fe.INITIATORS:case Fe.TARGETS:case Fe.ROUTERS:case Fe.VIRTUAL_TARGETS:default:return Zu[t].size}},getNumberOfNonDefaultTargetsInProject:t=>t[Fe.TARGETS].filter(e=>e.componentId!==0).length+t[Fe.VIRTUAL_TARGETS].length,getNumberOfDefaultTargetsInProject:t=>t.filter(e=>wt.SEC===e.parameters.bus.protocol||e.componentId===0).length,getVirtualDeviceIndex:t=>{let e=0;if(!t.length)return e;const n=t.map(r=>r.name);for(;e<n.length;++e)if(!n.includes(`${YL[Fe.VIRTUAL_TARGETS]}_${e}`))return e;return e},getComponentIdToTopologyMap:({projectComponentsTree:t,topologies:e})=>{const n=new Map;return t.data.forEach(r=>{const o=t.data.find(s=>s.id===r.parent)?.data.id,i=e.find(s=>s.id===o);i&&n.set(r.data.id,i)}),n},getMinimumValueByParameter:({components:t,parameter:e})=>{if(!t.length)return 0;switch(e){case"flitBufferSize":return Math.min(...t.map(n=>n.parameters.flitBufferSize));case"flitPacketSize":return Math.min(...t.map(n=>n.parameters.flitPacketSize));case"minimumTransactionSize":return Math.min(...t.map(n=>n.parameters.minimumTransactionSize));default:return 0}},getVirtualTargetName:(t,e)=>`${e.find(r=>r.id===t.parameters.parentTargetId)?.name??""}${t.name}`},Jct=t=>!!t.initiators.length,eut=t=>!!t.routers.length,tut=t=>Ki.getNumberOfNonDefaultTargetsInProject(t)>=1,nut=t=>Ki.getNumberOfDefaultTargetsInProject(t.targets)===1,HN={getHasInitiator:Jct,getHasRouter:eut,getHasTarget:tut,getHasDefaultTarget:nut},h6=({isValid:t})=>t?g(Vv,{color:"success",fontSize:"small"}):g(TW,{color:"error",fontSize:"small"}),dr=({isValid:t,label:e,typographySx:n,names:r})=>K(le,{children:[K(le,{sx:{display:"flex",alignItems:"center"},children:[g(h6,{isValid:t}),g(Ke,{sx:{marginLeft:"1px",fontSize:"14px",...n},children:e})]}),r.length?g(le,{pl:2.25,children:r.map(o=>g(Ke,{children:`${o}`},o))}):null]}),rut=({hasInitiator:t,hasTarget:e,hasRouter:n,hasDefaultTarget:r,hasMinimumConfiguration:o})=>K(le,{children:[g(dr,{isValid:o,label:"Meets minimum configuration",typographySx:{fontWeight:"bold"},names:[]}),K(le,{pl:2,children:[g(dr,{isValid:t,label:"At least 1 Initiator",names:[]}),g(dr,{isValid:n,label:"At least 1 Router",names:[]}),g(dr,{isValid:e,label:"At least 1 Target",names:[]}),g(dr,{isValid:r,label:"1 Default Target",names:[]})]})]}),out=t=>t.targets.find(e=>e.parameters.bus.protocol===wt.SEC||e.componentId===0)||null,iut=({fetchedComponents:t,componentsReachabilities:e,defaultTarget:n})=>{if(!n)return[];const r=e.reduce((o,i)=>i.targetId===n.id?[...o,i.initiatorId]:o,[]);return t.initiators.reduce((o,i)=>r.includes(i.id)?o:[...o,i.name],[])},sut=(t,e)=>{if(!e)return!1;const n=t.targets.find(r=>r.parameters.toTargetId===e.id);return!!n&&n?.parameters.fromEgressPortIdx===0},uD={getDefaultTarget:out,getInitiatorNamesDisconnectedToDefaultTarget:iut,getIsDefaultTargetAtEgressPortZero:sut},aut=({initiatorNamesNotConnectedToDefaultTarget:t,isDefaultTargetAtEgressPortZero:e})=>{const n="Default Target: Instantiated at egress port #0",r="Default Target: Reachable by all Initiators";return K(le,{children:[g(dr,{isValid:e,label:n,typographySx:{fontWeight:"bold"},names:[]}),g(dr,{isValid:!t.length,label:r,typographySx:{fontWeight:"bold"},names:t})]})},lut=({routerNamesWithSkippedPorts:t,routerNamesWithoutIngressConnections:e,routerNamesWithoutEgressConnections:n,connectedRoutersOnDiffTopologyWithoutBridge:r})=>{const o="Routers: No disconnected ports in-between connected ports",i="Routers: At least 1 connected ingress port on each",s="Routers: At least 1 connected egress port on each",a="Routers: No connected Routers without a Bridge between different subtopologies";return K(le,{children:[g(dr,{isValid:!t.length,label:o,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:i,typographySx:{fontWeight:"bold"},names:e}),g(dr,{isValid:!n.length,label:s,typographySx:{fontWeight:"bold"},names:n}),g(dr,{isValid:!r.length,label:a,typographySx:{fontWeight:"bold"},names:r})]})};var iv=(t=>(t[t.INGRESS=0]="INGRESS",t[t.EGRESS=1]="EGRESS",t))(iv||{});const f6="unknown port",NZ=t=>{const e=[],n=t.filter(s=>s===f6?e.push(s):Tt.isNumber(Number(s))),r=Tt.maxBy(n,Number);if(!r)return[];const o=[];let i=0;for(;i<=Number(r);){const s=i.toString();n.includes(s)||o.push(s),i++}return[...o,...e]},cut=(t,e)=>t.reduce((n,r)=>{const o=r.parameters;return o.toRouterId===e&&Tt.isNumber(o.toRouterPortIdx)?[...n,o.toRouterPortIdx.toString()]:n},[]),uut=(t,e)=>t.reduce((n,r)=>{const o=r.parameters;return o.fromRouterId===e&&Tt.isNumber(o.fromEgressPortIdx)?[...n,o.fromEgressPortIdx.toString()]:n},[]),MZ=({routerConnections:t,routerPortType:e,routerId:n})=>t.reduce((r,o)=>{const i=o.parameters,s=e===iv.INGRESS?i.toId:i.fromId,a=e===iv.INGRESS?i.toInGressPortIdx:i.fromEgressPortIdx;return s===n&&Tt.isNumber(a)?[...r,a.toString()]:s===n&&!Tt.isNumber(a)?[...r,f6]:r},[]),DZ=({bridgeConnections:t,routerPortType:e,routerId:n})=>t.reduce((r,o)=>{const i=o.parameters,s=e===iv.INGRESS?i.toRouterId:i.fromRouterId;return s===n&&Tt.isNumber(i.routerPortIdx)?[...r,i.routerPortIdx.toString()]:s===n&&!Tt.isNumber(i.routerPortIdx)?[...r,f6]:r},[]),dut=(t,e)=>t.routers.map(n=>{const r=cut(e.initiators,n.id),o=MZ({routerConnections:e.routers,routerPortType:iv.INGRESS,routerId:n.id}),i=DZ({bridgeConnections:e.bridges,routerPortType:iv.INGRESS,routerId:n.id}),s=uut(e.targets,n.id),a=MZ({routerConnections:e.routers,routerPortType:iv.EGRESS,routerId:n.id}),l=DZ({bridgeConnections:e.bridges,routerPortType:iv.EGRESS,routerId:n.id});return{routerId:n.id,routerName:n.name,connectedRouterIngressPorts:[...r,...o,...i],connectedRouterEgressPorts:[...s,...a,...l]}}),hut=(t,e)=>dut(t,e).reduce((r,o)=>{const i=NZ(o.connectedRouterIngressPorts),s=NZ(o.connectedRouterEgressPorts),a=!!i.length,l=!!s.length;if(a||l){const c=a?`Ingress: ${i.join(", ")}`:"",u=l?`Egress: ${s.join(", ")}`:"",d=c.length&&u.length?" | ":"",h=`${o.routerName} â ${c}${d}
388${u}`;return[...r,h]}return r},[]),fut=(t,e)=>{const n=[];return t.routers.forEach(r=>{const o=e.initiators.some(a=>{const l=a.parameters;return l.toRouterId===r.id&&l.toRouterPortIdx===0}),i=e.routers.some(a=>{const l=a.parameters;return l.toId===r.id&&l.toInGressPortIdx===0}),s=e.bridges.some(a=>{const l=a.parameters;return"toRouterId"in l&&l.toRouterId===r.id&&l.routerPortIdx===0});!o&&!i&&!s&&n.push(r.name)}),n},put=(t,e)=>{const n=[];return t.routers.forEach(r=>{const o=e.targets.some(a=>a.parameters.fromRouterId===r.id),i=e.routers.some(a=>a.parameters.fromId===r.id),s=e.bridges.some(a=>{const l=a.parameters;return"fromRouterId"in l&&l.fromRouterId===r.id});!o&&!i&&!s&&n.push(r.name)}),n},gut=({fetchedComponents:t,connections:e,explorerTree:n,topologies:r})=>{if(!n?.data.length)return[];const o=Ki.getComponentIdToTopologyMap({projectComponentsTree:n,topologies:r}),i=e.routers.reduce((s,a)=>{const l=a.parameters;if(!l.fromId||!l.toId)return s;const c=o.get(l.fromId),u=o.get(l.toId);if(c&&u&&c?.id!==u?.id){const d=t.routers.find(f=>f.id===l.fromId),h=t.routers.find(f=>f.id===l.toId);return!d||!h?s:[...s,d.name,h.name]}return s},[]);return Tt.uniq(i)},UN={getRouterNamesWithSkippedPorts:hut,getAllRoutersIngressConnected:fut,getAllRoutersEgressConnected:put,getConnectedRoutersOnDiffTopologyWithoutBridge:gut},mut=({namesOfInitiatorsUnreachableByAnyNonDefaultTarget:t,namesOfDisconnectedFloatingInitiators:e,namesOfInitiatorsWithInvalidReadReorderBufferSize:n,namesOfInitiatorsWithInvalidWriteReorderBufferSize:r,namesOfInitiatorsWithInvalidVirtualChannelsCount:o})=>{const i="Initiators: Reaches at least 1 Target besides Default",s="Initiators: No disconnected floating Initiators",a="Initiators: No invalid read reorder buffer size",l="Initiators: No invalid write reorder buffer size",c="Initiators: No invalid virtual channels count";return K(le,{children:[g(dr,{isValid:!t.length,label:i,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:s,typographySx:{fontWeight:"bold"},names:e}),g(dr,{isValid:!n.length,label:a,typographySx:{fontWeight:"bold"},names:n}),g(dr,{isValid:!r.length,label:l,typographySx:{fontWeight:"bold"},names:r}),g(dr,{isValid:!o.length,label:c,typographySx:{fontWeight:"bold"},names:o})]})},sm=({busProtocol:t,busVersion:e,busVariant:n})=>{const r=e===Co.THREE||e===3,o=e===Co.FOUR||e===4,i=e===Co.FIVE||e===5,s=n===Ui.FULL||n==="Full",a=n===Ui.LITE||n==="Lite",l=n===Ui.STREAM||n==="Stream",c=t===wt.AXI,u=c&&o&&s,d=c&&o&&a,h=c&&o&&l,f=c&&r,p=t===wt.AHB,m=p&&r&&a,y=p&&i,v=t===wt.APB,b=v&&r,S=v&&i,w=t===wt.SIG_NATIVE,A=t===wt.SRAM,_=t===wt.SEC;return u?nt.AXI_FOUR_FULL:d?nt.AXI_FOUR_LITE:h?nt.AXI_FOUR_STREAM:f?nt.AXI_THREE:m?nt.AHB_THREE_LITE:y?nt.AHB_FIVE:b?nt.APB_THREE:S?nt.APB_FIVE:w?nt.SIG_NATIVE:A?nt.SRAM:_?nt.SEC:nt.NONE},yut=(t,e)=>{if(!t||e===0)return dL;const n=vfe(e);return dL.map(r=>({key:r.key,value:r.value,isOptionDisabled:r.value<n}))},vfe=t=>4096/t>>>0,bfe=t=>t.filter(n=>wt.SEC!==n.parameters.bus.protocol&&wt.SIG_NATIVE!==n.parameters.bus.protocol),vut=(t,e)=>bfe(t).some(o=>o.parameters.isTargetAddressInterleavingEnabled)&&e,but=({globalMinInitiatorFlitBufferSize:t,globalMinInitiatorFlitPacketSize:e,isTargetAddressInterleavingEnabled:n,systemDataWidth:r,targetPortDataWidth:o})=>{if(t>0&&e>0&&n){const i=Math.min(t,e);if(r!=o){const s=256*o/r>>>0;return Math.min(s,i)}return i}},Cut=t=>t.reduce((e,n)=>{const r=sm({busProtocol:n.parameters.bus.protocol,busVersion:n.parameters.bus.version,busVariant:n.parameters.bus.variant});return r!==nt.AXI_FOUR_FULL&&r!==nt.AXI_THREE?[...e,n]:e},[]),cf={getReorderBufferOptions:yut,getMinReorderBufferSize:vfe,getIsTargetAddressInterleavingEnabled:vut,getTargetsWithAddressInterleaving:bfe,getMaxPossibleMinTransactionSize:but,getNonAxiFullOrThreeInitiators:Cut},Sut=(t,e)=>{const n=uD.getDefaultTarget(e);if(!n)return[];const r=t.filter(a=>a.targetId!==n.id),o=t.filter(a=>a.targetId===n.id),i=new Set(r.map(a=>a.initiatorId)),s=[];return o.forEach(a=>{if(!i.has(a.initiatorId)){const l=e.initiators.find(c=>c.id===a.initiatorId);l&&s.push(l.name)}}),s},Eut=(t,e)=>{const n=t.initiators.map(o=>
388o.parameters.fromInitiatorId),r=[];return e.initiators.forEach(o=>{n.includes(o.id)||r.push(o.name)}),r},xut=t=>t!==nt.SIG_NATIVE&&t!==nt.AXI_FOUR_LITE&&t!==nt.AXI_FOUR_STREAM&&t!==nt.AHB_FIVE&&t!==nt.AHB_THREE_LITE&&t!==nt.APB_FIVE&&t!==nt.APB_THREE,wut=({field:t,fetchedComponents:e,isSystemAddressInterleavingEnabled:n})=>{const r=[],o=cf.getTargetsWithAddressInterleaving(e.targets),i=cf.getIsTargetAddressInterleavingEnabled(e.targets,n),s=Ki.getMinimumValueByParameter({components:o,parameter:"minimumTransactionSize"});if(!i||s===0)return r;const a=cf.getMinReorderBufferSize(s);return e.initiators.forEach(l=>{const c=t==="readReorderBufferSize"?l.parameters.readReorderBufferSize:l.parameters.writeReorderBufferSize,u=sm({busProtocol:l.parameters.bus.protocol,busVersion:l.parameters.bus.version,busVariant:l.parameters.bus.variant}),d=xut(u);c<a&&d&&r.push(l.name)}),r},Aut=t=>t.reduce((e,n)=>{const r=sm({busProtocol:n.parameters.bus.protocol,busVersion:n.parameters.bus.version,busVariant:n.parameters.bus.variant}),o=n.parameters.virtualChannelsCount>n.parameters.outstandingRead;return r===nt.AXI_FOUR_FULL&&o?[...e,n.name]:e},[]),yT={getNamesOfInitiatorsUnreachableByAnyNonDefaultTarget:Sut,getNamesOfDisconnectedFloatingInitiators:Eut,getNamesOfInitiatorsWithInvalidReorderBufferSize:wut,getNamesOfInitiatorsWithInvalidVirtualChannelsCount:Aut},Tut=(t,e)=>{const n=e.targets.map(r=>r.parameters.toTargetId);return t.targets.reduce((r,o)=>n.includes(o.id)?r:[...r,o.name],[])},_ut=({isSystemAddressInterleavingEnabled:t,systemDataWidth:e,fetchedComponents:n})=>{const r=[],o=cf.getNonAxiFullOrThreeInitiators(n.initiators),i=cf.getIsTargetAddressInterleavingEnabled(n.targets,t),s=Ki.getMinimumValueByParameter({components:n.initiators,parameter:"flitBufferSize"}),a=Ki.getMinimumValueByParameter({components:n.initiators,parameter:"flitPacketSize"});return n.targets.forEach(l=>{const c=cf.getMaxPossibleMinTransactionSize({globalMinInitiatorFlitBufferSize:s,globalMinInitiatorFlitPacketSize:a,isTargetAddressInterleavingEnabled:i,systemDataWidth:e,targetPortDataWidth:l.parameters.portDataWidth});if(!c||!l.parameters.isTargetAddressInterleavingEnabled||o.length)return r;l.parameters.minimumTransactionSize>c&&r.push(l.name)}),r},LZ={getNamesOfDisconnectedFloatingTargets:Tut,getNamesOfTargetsWithInvalidMinimumTransactionSize:_ut},Iut=({namesOfDisconnectedFloatingTargets:t,namesOfTargetsWithInvalidMinimumTransactionSize:e})=>{const n="Targets: No disconnected floating Targets",r="Targets: No invalid minimum transaction size";return K(le,{children:[g(dr,{isValid:!t.length,label:n,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:r,typographySx:{fontWeight:"bold"},names:e})]})},Put=({namesOfBridgesWithIncompleteConnections:t,namesOfBridgesConnectedBetweenSameTopologies:e})=>{const n="Bridges: No Bridges with incomplete connection",r="Bridges: No Bridges connected between same Subtopologies";return K(le,{children:[g(dr,{isValid:!t.length,label:n,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:r,typographySx:{fontWeight:"bold"},names:e})]})},Rut=(t,e)=>{const n=e.bridges.map(o=>o.parameters.toBridgeId),r=e.bridges.map(o=>o.parameters.fromBridgeId);return t.bridges.reduce((o,i)=>!n.includes(i.id)||!r.includes(i.id)?[...o,i.name]:o,[])},Out=({fetchedComponents:t,connections:e,explorerTree:n,topologies:r})=>{const o=Ki.getComponentIdToTopologyMap({projectComponentsTree:n,topologies:r});return t.bridges.reduce((i,s)=>{const a=e.bridges.find(c=>c.parameters.toBridgeId===s.id)?.parameters.fromRouterId,l=e.bridges.find(c=>c.parameters.fromBridgeId===s.id)?.parameters.toRouterId;return a&&l&&!(o.get(a)?.id!==o.get(l)?.id)?[...i,s.name]:i},[])},kZ={getNamesOfBridgesWithIncompleteConnections:Rut,getNamesOfBridgesConnectedBetweenSameTopologies:Out},Nut=({namesOfRoutersWithNoConfiguredRoutes:t,namesOfConnectedPortsWithNoRoutes:e,namesOfRoutersWithMultipleRoutes:n})=>{const r="Routing: All connected ports have routes",o="Routing: All Routers have configured routes",i="Routing: No Router with multiple routes toward a single Destination";return K(gr,{children:[g(dr,{isValid:!t.length,label:o,names:t,typographySx:{fontWeight:"bold"}}),g(dr,{isValid:!e.length,label:r,typographySx:{fontWeight:"bold"},names:e}),g(dr,{isValid:!n.length,label:i,typographySx:{fontWeight:"bold"},names:n})]})},Mut=(t,e)=>e.find(n=>n.targetId===t)??null,p6=t=>!t.base||!t.limit,Dut=t=>p6(t)?!1:_t.getHexToBigInt(t.base)>_t.getHexToBigInt(t.limit),Lut=(t,e)=>p6(t)?!1:_t.getHasExceededAddressWidth(t.base,e)||_t.getHasExceededAddressWidth(t.limit,e),kut=({activeBaseAddressInBigInt:t,activeLimitAddressInBigInt:e,baseAddressInBigInt:n,limitAddressInBigInt:r})=>r>=t&&n<=e,am={getByTargetId:Mut,getIsAddressOverLapping:kut,getHasEmptyAddress:p6,getIsBaseExceedingLimitAddress:Dut,getHasExceededAddressWidth:Lut},nB=({targets:t,virtualTargets:e})=>[...t.filter(o=>o.componentId!==0),...e],rB=(t,e)=>{if("parentTargetId"in t.parameters){const n=t;return Ki.getVirtualTargetName(n,e)}return t.name},Fut=(t,e)=>nB(t).reduce((n,r)=>{const o=am.getByTargetId(r.id,e);if(!o||am.getHasEmptyAddress(o)){const s=rB(r,t.targets);return[...n,s]}return n},[]),But=(t,e)=>nB(t).reduce((n,r)=>{const o=am.getByTargetId(r.id,e);if(!o)return n;if(am.getIsBaseExceedingLimitAddress(o)){const s=rB(r,t.targets);return[...n,s]}return n},[]),$ut=({fetchedComponents:t,ncnocSystem:e,ncnocAddresses:n})=>nB(t).reduce((r,o)=>{const i=am.getByTargetId(o.id,n);if(!i)return r;if(am.getHasExceededAddressWidth(i,e.addressWidth)){const a=rB(o,t.targets);return[...r,a]}return r},[]),Hut=(t,e)=>{const n=[];return nB(t).reduce((r,o)=>{const i=am.getByTargetId(o.id,e);
388if(!i||am.getHasEmptyAddress(i))return r;const s=_t.getConvertedStrAddressToBigInt(i.base),a=_t.getConvertedStrAddressToBigInt(i.limit),l=rB(o,t.targets),c=n.filter(u=>am.getIsAddressOverLapping({activeBaseAddressInBigInt:u.baseAddressInBigInt,activeLimitAddressInBigInt:u.limitAddressInBigInt,baseAddressInBigInt:s,limitAddressInBigInt:a}));if(n.push({targetName:l,baseAddressInBigInt:s,limitAddressInBigInt:a}),c.length){const u=c.map(d=>`${d.targetName} address block overlaps with ${l}`);return[...r,...u]}return r},[])},zN={getNamesOfTargetsWithBlankAddresses:Fut,getNamesOfTargetsWithBaseAddressExceedingLimitAddress:But,getNamesOfTargetsExceedingAddressWidth:$ut,getNamesOfTargetsWithOverlappingAddresses:Hut},Uut=({namesOfTargetsWithBlankAddresses:t,namesOfTargetsWithBaseAddressExceedingLimitAddress:e,namesOfTargetsWithOverlappingAddresses:n,namesOfTargetsExceedingAddressWidth:r})=>{const o="Address Map: No Target with blank addresses",i="Address Map: No base address exceeds its limit address",s="Address Map: No address greater than NoC Address Width",a="Address Map: No address blocks overlapping";return K(le,{children:[g(dr,{isValid:!t.length,label:o,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:i,typographySx:{fontWeight:"bold"},names:e}),g(dr,{isValid:!r.length,label:s,typographySx:{fontWeight:"bold"},names:r}),g(dr,{isValid:!n.length,label:a,typographySx:{fontWeight:"bold"},names:n})]})},zut=Nr.injectEndpoints({endpoints:t=>({getProjectNcnocSystemByProjectId:t.query({query:({projectId:e})=>`${dt.projectNcnocSystem}/${e}`,providesTags:[We.ProjectNcnocSystem],transformResponse:(e,n,r)=>e}),updateProjectNcnocSystem:t.mutation({query:({requestBody:e})=>({url:`${dt.projectNcnocSystem}`,method:nn.PUT,body:{...e}}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.ProjectNcnocSystem,"ProjectValidator"]})})}),{useGetProjectNcnocSystemByProjectIdQuery:Cfe,useUpdateProjectNcnocSystemMutation:g6}=zut,Vut=t=>{const{data:e}=Cfe({projectId:t});return e},Gut=t=>{const{isLoading:e}=Cfe({projectId:t});return e},Wp={getByProjectId:Vut,getProjectNcnocSystemByProjectIdIsLoading:Gut},_4=Nr.injectEndpoints({endpoints:t=>({getAllProjectNcnocAddressByProjectId:t.query({query:({projectId:e})=>`${dt.projectNcnocAddress}?projectId=${e}`,providesTags:[We.ProjectNcnocAddress],transformResponse:e=>e}),createProjectNcnocAddress:t.mutation({query:e=>({url:`${dt.projectNcnocAddress}`,method:nn.POST,body:e}),async onQueryStarted(e,{dispatch:n,queryFulfilled:r}){const o=e.projectId,i=n(_4.util.updateQueryData("getAllProjectNcnocAddressByProjectId",{projectId:o},s=>{s.push(e)}));try{await r}catch{i.undo()}},transformErrorResponse:e=>e,transformResponse:e=>e}),bulkUpdateAllProjectNcnocAddress:t.mutation({query:({requestBody:e})=>({url:`${dt.projectNcnocAddress}`,method:nn.PUT,body:{...e}}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(_4.util.updateQueryData("getAllProjectNcnocAddressByProjectId",{projectId:e.projectId},i=>{e.ncnocAddresses.forEach(s=>{const a=i.findIndex(l=>l.id===s.id);a>=0&&(i[a]=s)})}));try{await r}catch{o.undo()}},transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.ProjectNcnocAddress,We.ProjectValidator]})})}),{useGetAllProjectNcnocAddressByProjectIdQuery:Sfe,useCreateProjectNcnocAddressMutation:m6,useBulkUpdateAllProjectNcnocAddressMutation:Wut}=_4,jut="getAllProjectComponentNcnocTargetByProjectId",Efe=Nr.injectEndpoints({endpoints:t=>({getAllProjectComponentNcnocTargetByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectComponentNcnocTargets}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectComponentNcnocTargets],transformResponse:(e,n,r)=>e}),createProjectComponentNcnocTarget:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentNcnocTargets}`,method:nn.POST,body:e}),transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectValidator,We.ProjectRoutes,We.RoutingTable,We.ProjectComponentsTree,We.ProjectRegister,We.Connections,We.ProjectComponents,We.ProjectNcnocAddress,We.ProjectComponentsReachability]}),updateProjectComponentNcnocTarget:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentNcnocTargets}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){await C0({dispatch:n,api:Efe,endpointName:jut,queryArg:{projectId:e.projectId},requestBody:e,queryFulfilled:r})}})})}),{useGetAllProjectComponentNcnocTargetByProjectIdQuery:xfe,useCreateProjectComponentNcnocTargetMutation:qut,useUpdateProjectComponentNcnocTargetMutation:d6t}=Efe,Yut=(t,e)=>{const{data:n}=nl(e);return n.targets.find(o=>o.id===t)},y6=t=>{const{data:e}=nl(t);return e.targets},Xut=t=>y6(t).filter(n=>n.parameters.bus.protocol!==wt.SEC),v6=t=>{const{data:e=[]}=xfe({projectId:t});return e},Kut=t=>v6(t).find(r=>r.parameters.bus.protocol===wt.SEC)??null,Qut=t=>v6(t).filter(n=>n.parameters.bus.protocol!==wt.SEC),Zut=t=>y6(t).filter(n=>n.parameters.isTargetAddressInterleavingEnabled),ea={getById:Yut,getAllByProjectId:y6,getAllTypeNonDefaultByProjectId:Xut,getAllByProjectIdX6:v6,getDefaultTargetByProjectIdX6:Kut,getAllTypeNonDefaultByProjectIdX6:Qut,getAllAddressInterleavingEnabledByProjectId:Zut},Jut=(t,e)=>{const{data:n}=nl(e);return n.virtualTargets.find(o=>o.id===t)},edt=t=>{const{data:e}=nl(t);return e.virtualTargets},oB={getById:Jut,getAllByProjectId:edt},tdt=t=>{const{data:e=[]}=Sfe({projectId:t}),n=ea.getAllTypeNonDefaultByProjectId(t),r=oB.getAllByProjectId(t),o=[...n,...r].map(i=>i.id);return e.filter(i=>o.includes(i.targetId))},wfe={getAllByProjectId:tdt},Afe=t=>{const{data:e=[]}=nl(t);return e.topologies},ndt=(t,e)=>Tt.sortBy(Afe(t),"componentId").find(r=>r.id!==e),vw={getAllByProjectId:Afe,getFirstSubtopologyByProjectId:ndt},rdt="getAllProjectComponentNcnocBridgeByProjectId",Tfe=Nr.injectEndpoints({endpoints:t=>({getAllProjectComponentNcnocBridgeByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectComponentNcnocBridges}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectComponentNcnocBridges],transformResponse:(e,n,r)=>e}),createProjectComponentNcnocBridge:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentNcnocBridges}
388`,method:nn.POST,body:e}),transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectValidator,We.ProjectComponentsTree,We.ProjectRegister,We.ProjectComponents]}),updateProjectComponentNcnocBridge:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentNcnocBridges}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){await C0({dispatch:n,api:Tfe,endpointName:rdt,queryArg:{projectId:e.projectId},requestBody:e,queryFulfilled:r})}})})}),{useGetAllProjectComponentNcnocBridgeByProjectIdQuery:_fe,useCreateProjectComponentNcnocBridgeMutation:odt,useUpdateProjectComponentNcnocBridgeMutation:idt}=Tfe,sdt=(t,e)=>{const{data:n}=nl(e);return n.bridges.find(o=>o.id===t)},adt=t=>{const{data:e}=nl(t);return e.bridges},ldt=t=>{const{data:e=[]}=_fe({projectId:t});return e},bw={getById:sdt,getAllByProjectId:adt,getAllByProjectIdX6:ldt},cdt=(t,e)=>{const{data:n}=nl(e);return n.routers.find(o=>o.id===t)},udt=t=>{const{data:e}=nl(t);return e.routers},ddt=t=>{const{data:e=[]}=GW({projectId:t});return e},Nh={getById:cdt,getAllByProjectId:udt,getAllByProjectIdX6:ddt},hdt="getAllProjectComponentNcnocInitiatorByProjectId",Ife=Nr.injectEndpoints({endpoints:t=>({getAllProjectComponentNcnocInitiatorByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectComponentNcnocInitiators}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectComponentNcnocInitiators],transformResponse:(e,n,r)=>e}),createProjectComponentNcnocInitiator:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentNcnocInitiators}`,method:nn.POST,body:e}),transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectValidator,We.ProjectRoutes,We.RoutingTable,We.ProjectComponentsTree,We.ProjectRegister,We.Connections,We.ProjectComponents,We.ProjectComponentsReachability]}),updateProjectComponentNcnocInitiator:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentNcnocInitiators}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){await C0({dispatch:n,api:Ife,endpointName:hdt,queryArg:{projectId:e.projectId},requestBody:e,queryFulfilled:r})}})})}),{useGetAllProjectComponentNcnocInitiatorByProjectIdQuery:Pfe,useCreateProjectComponentNcnocInitiatorMutation:fdt,useUpdateProjectComponentNcnocInitiatorMutation:h6t}=Ife,pdt=(t,e)=>{const{data:n}=nl(e);return n.initiators.find(o=>o.id===t)},Rfe=t=>{const{data:e}=nl(t);return e.initiators},gdt=t=>Rfe(t).reduce((n,r)=>{const o=sm({busProtocol:r.parameters.bus.protocol,busVersion:r.parameters.bus.version,busVariant:r.parameters.bus.variant});return o!==nt.AXI_FOUR_FULL&&o!==nt.AXI_THREE?[...n,r]:n},[]),mdt=t=>{const{data:e=[]}=Pfe({projectId:t});return e},vd={getById:pdt,getAllByProjectId:Rfe,getAllTypeNonAxiThreeOrFullByProjectId:gdt,getAllByProjectIdX6:mdt};var ydt=typeof Ac=="object"&&Ac&&Ac.Object===Object&&Ac,vdt=ydt,bdt=vdt,Cdt=typeof self=="object"&&self&&self.Object===Object&&self,Sdt=bdt||Cdt||Function("return this")(),iB=Sdt,Edt=iB,xdt=Edt.Symbol,Ofe=xdt,FZ=Ofe,Nfe=Object.prototype,wdt=Nfe.hasOwnProperty,Adt=Nfe.toString,vT=FZ?FZ.toStringTag:void 0;function Tdt(t){var e=wdt.call(t,vT),n=t[vT];try{t[vT]=void 0;var r=!0}catch{}var o=Adt.call(t);return r&&(e?t[vT]=n:delete t[vT]),o}var _dt=Tdt,Idt=Object.prototype,Pdt=Idt.toString;function Rdt(t){return Pdt.call(t)}var Odt=Rdt,BZ=Ofe,Ndt=_dt,Mdt=Odt,Ddt="[object Null]",Ldt="[object Undefined]",$Z=BZ?BZ.toStringTag:void 0;function kdt(t){return t==null?t===void 0?Ldt:Ddt:$Z&&$Z in Object(t)?Ndt(t):Mdt(t)}var Fdt=kdt;function Bdt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Mfe=Bdt,$dt=Fdt,Hdt=Mfe,Udt="[object AsyncFunction]",zdt="[object Function]",Vdt="[object GeneratorFunction]",Gdt="[object Proxy]";function Wdt(t){if(!Hdt(t))return!1;var e=$dt(t);return e==zdt||e==Vdt||e==Udt||e==Gdt}var jdt=Wdt,qdt=iB,Ydt=qdt["__core-js_shared__"],Xdt=Ydt,b5=Xdt,HZ=function(){var t=/[^.]+$/.exec(b5&&b5.keys&&b5.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Kdt(t){return!!HZ&&HZ in t}var Qdt=Kdt,Zdt=Function.prototype,Jdt=Zdt.toString;function eht(t){if(t!=null){try{return Jdt.call(t)}catch{}try{return t+""}catch{}}return""}var tht=eht,nht=jdt,rht=Qdt,oht=Mfe,iht=tht,sht=/[\\^$.*+?()[\]{}|]/g,aht=/^\[object .+?Constructor\]$/,lht=Function.prototype,cht=Object.prototype,uht=lht.toString,dht=cht.hasOwnProperty,hht=RegExp("^"+uht.call(dht).replace(sht,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fht(t){if(!oht(t)||rht(t))return!1;var e=nht(t)?hht:aht;return e.test(iht(t))}var pht=fht;function ght(t,e){return t?.[e]}var mht=ght,yht=pht,vht=mht;function bht(t,e){var n=vht(t,e);return yht(n)?n:void 0}var b6=bht,Cht=b6,Sht=Cht(Object,"create"),sB=Sht,UZ=sB;function Eht(){this.__data__=UZ?UZ(null):{},this.size=0}var xht=Eht;function wht(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Aht=wht,Tht=sB,_ht="__lodash_hash_undefined__",Iht=Object.prototype,Pht=Iht.hasOwnProperty;function Rht(t){var e=this.__data__;if(Tht){var n=e[t];return n===_ht?void 0:n}return Pht.call(e,t)?e[t]:void 0}var Oht=Rht,Nht=sB,Mht=Object.prototype,Dht=Mht.hasOwnProperty;function Lht(t){var e=this.__data__;return Nht?e[t]!==void 0:Dht.call(e,t)}var kht=Lht,Fht=sB,Bht="__lodash_hash_undefined__";function $ht(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Fht&&e===void 0?Bht:e,this}var Hht=$ht,Uht=xht,zht=Aht,Vht=Oht,Ght=kht,Wht=Hht;function Cw(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cw.prototype.clear=Uht;Cw.prototype.delete=zht;Cw.prototype.get=Vht;Cw.prototype.has=Ght;Cw.prototype.set=Wht;var jht=Cw;function qht(){this.__data__=[],this.size=0}var Yht=qht;function Xht(t,e){return t===e||t!==t&&e!==e}var Kht=Xht,Qht=Kht;function Zht(t,e){for(var n=t.length;n--;)if(Qht(t[n][0],e))return n;return-1}
388var aB=Zht,Jht=aB,eft=Array.prototype,tft=eft.splice;function nft(t){var e=this.__data__,n=Jht(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():tft.call(e,n,1),--this.size,!0}var rft=nft,oft=aB;function ift(t){var e=this.__data__,n=oft(e,t);return n<0?void 0:e[n][1]}var sft=ift,aft=aB;function lft(t){return aft(this.__data__,t)>-1}var cft=lft,uft=aB;function dft(t,e){var n=this.__data__,r=uft(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var hft=dft,fft=Yht,pft=rft,gft=sft,mft=cft,yft=hft;function Sw(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Sw.prototype.clear=fft;Sw.prototype.delete=pft;Sw.prototype.get=gft;Sw.prototype.has=mft;Sw.prototype.set=yft;var vft=Sw,bft=b6,Cft=iB,Sft=bft(Cft,"Map"),Eft=Sft,zZ=jht,xft=vft,wft=Eft;function Aft(){this.size=0,this.__data__={hash:new zZ,map:new(wft||xft),string:new zZ}}var Tft=Aft;function _ft(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ift=_ft,Pft=Ift;function Rft(t,e){var n=t.__data__;return Pft(e)?n[typeof e=="string"?"string":"hash"]:n.map}var lB=Rft,Oft=lB;function Nft(t){var e=Oft(this,t).delete(t);return this.size-=e?1:0,e}var Mft=Nft,Dft=lB;function Lft(t){return Dft(this,t).get(t)}var kft=Lft,Fft=lB;function Bft(t){return Fft(this,t).has(t)}var $ft=Bft,Hft=lB;function Uft(t,e){var n=Hft(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var zft=Uft,Vft=Tft,Gft=Mft,Wft=kft,jft=$ft,qft=zft;function Ew(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ew.prototype.clear=Vft;Ew.prototype.delete=Gft;Ew.prototype.get=Wft;Ew.prototype.has=jft;Ew.prototype.set=qft;var Yft=Ew,Xft="__lodash_hash_undefined__";function Kft(t){return this.__data__.set(t,Xft),this}var Qft=Kft;function Zft(t){return this.__data__.has(t)}var Jft=Zft,ept=Yft,tpt=Qft,npt=Jft;function p2(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new ept;++e<n;)this.add(t[e])}p2.prototype.add=p2.prototype.push=tpt;p2.prototype.has=npt;var rpt=p2;function opt(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}var ipt=opt;function spt(t){return t!==t}var apt=spt;function lpt(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}var cpt=lpt,upt=ipt,dpt=apt,hpt=cpt;function fpt(t,e,n){return e===e?hpt(t,e,n):upt(t,dpt,n)}var ppt=fpt,gpt=ppt;function mpt(t,e){var n=t==null?0:t.length;return!!n&&gpt(t,e,0)>-1}var ypt=mpt;function vpt(t,e,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}var bpt=vpt;function Cpt(t,e){return t.has(e)}var Spt=Cpt,Ept=b6,xpt=iB,wpt=Ept(xpt,"Set"),Apt=wpt;function Tpt(){}var _pt=Tpt;function Ipt(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Dfe=Ipt,C5=Apt,Ppt=_pt,Rpt=Dfe,Opt=1/0,Npt=C5&&1/Rpt(new C5([,-0]))[1]==Opt?function(t){return new C5(t)}:Ppt,Mpt=Npt,Dpt=rpt,Lpt=ypt,kpt=bpt,Fpt=Spt,Bpt=Mpt,$pt=Dfe,Hpt=200;function Upt(t,e,n){var r=-1,o=Lpt,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=kpt;else if(i>=Hpt){var c=e?null:Bpt(t);if(c)return $pt(c);s=!1,o=Fpt,l=new Dpt}else l=e?[]:a;e:for(;++r<i;){var u=t[r],d=e?e(u):u;if(u=n||u!==0?u:0,s&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),a.push(u)}else o(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var zpt=Upt,Vpt=zpt;function Gpt(t){return t&&t.length?Vpt(t):[]}var Wpt=Gpt;const Lfe=ud(Wpt),jpt=({ncnocInitiators:t,ncnocTargets:e,ncnocSystem:n})=>[...t,...e].reduce((o,i)=>{const s=i.parameters.bus.protocol,a=i.type===Fe.TARGETS;return s!==wt.SIG_NATIVE&&(!a||s!==wt.SEC)&&i.parameters.portDataWidth>n.dataWidth?[...o,`${i.name}: Port Data Width = ${i.parameters.portDataWidth}`]:o},[]),qpt=({ncnocInitiators:t,ncnocTargets:e,ncnocRouters:n,ncnocVirtualTargets:r})=>[...t,...e,...n,...r].reduce((s,a)=>a.componentId>31?[...s,a.name]:s,[]),Ypt=({ncnocRouters:t,ncnocInitiators:e,ncnocTargets:n,ncnocBridges:r,ncnocSubtopologies:o})=>{const i=[...t,...e,...n,...r,...o],s=i.reduce((a,l)=>i.some(u=>u.type===l.type&&u.id!==l.id&&u.name===l.name)?[...a,l.name]:a,[]);return Lfe(s)},Xpt=({ncnocRouters:t,ncnocInitiators:e,ncnocTargets:n,ncnocBridges:r,ncnocSubtopologies:o})=>{const i=[...t,...e,...n,...r,...o],s=i.reduce((a,l)=>i.some(u=>u.type===l.type&&u.id!==l.id&&u.componentId===l.componentId)?[...a,l.name]:a,[]);return Lfe(s)},VN={getNamesOfComponentsWithInvalidPortDataWidth:jpt,getNamesOfComponentsWithInvalidDeviceIDs:qpt,getNamesOfComponentsWithDuplicateNames:Ypt,getNamesOfComponentsWithDuplicateDeviceIDs:Xpt},Kpt=({namesOfComponentsWithInvalidPortDataWidth:t,namesOfComponentsWithInvalidDeviceIDs:e,namesOfComponentsWithDuplicateNames:n,namesOfComponentsWithDuplicateDeviceIDs:r})=>{const o="Components: All Device IDs less than 32",i="Components: No Duplicate Names",s="Components: No Duplicate Device IDs",a="Components: No Port Data Width exceeds N
388oC Data Width";return K(le,{children:[g(dr,{isValid:!t.length,label:a,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:o,typographySx:{fontWeight:"bold"},names:e}),g(dr,{isValid:!n.length,label:i,typographySx:{fontWeight:"bold"},names:n}),g(dr,{isValid:!r.length,label:s,typographySx:{fontWeight:"bold"},names:r})]})},Qpt={variant:"h6",fontWeight:"bold",sx:{display:"flex",alignContent:"center"}},Zpt=({isFrequencyValidationEnabled:t,projectId:e,ncnocTopologyValidatorAnchorEl:n,setNcnocTopologyValidatorAnchorEl:r,setIsNcnocTopologyValid:o,isSystemAddressInterleavingEnabled:i,systemDataWidth:s})=>{const a=bt(jP),{data:l}=t7e({projectId:e,groupId:a.id}),{data:c=[]}=nl(e),{data:u=[]}=Rm(e),{data:d=[]}=lue(e),{data:h}=aw(e),f=Wp.getByProjectId(e),p=wfe.getAllByProjectId(e),m=vw.getAllByProjectId(e),y=bw.getAllByProjectId(e),v=Nh.getAllByProjectId(e),b=vd.getAllByProjectId(e),S=ea.getAllByProjectId(e),w=oB.getAllByProjectId(e);C.useMemo(()=>{const ne={};return c&&(c.routers.forEach(({id:W,name:j,componentId:ue})=>{ne[W]=`${j}:${ue}`}),c.initiators.forEach(({id:W,name:j,componentId:ue})=>{ne[W]=`${j}:${ue}`}),c.targets.forEach(W=>{ne[W.id]=`${W.name}:${W.componentId}`,W.parameters.isVirtualDevicesEnabled&&c.virtualTargets.filter(ue=>ue.parameters.parentTargetId===W.id).forEach(ue=>{ne[ue.id]=`${W.name+ue.name}:${ue.componentId}`})}),c.bridges.forEach(({id:W,name:j,componentId:ue})=>{ne[W]=`${j}:${ue}`})),ne},[c]);const A=C.useCallback((ne,W={})=>ne?g(Vv,{color:"success",fontSize:"small",...W}):g(TW,{color:"error",fontSize:"small",...W}),[]);C.useCallback((ne,W={})=>ne?g(NW,{color:"warning",fontSize:"small",...W}):g(Vv,{color:"success",fontSize:"small",...W}),[]);const _=HN.getHasInitiator(c),P=HN.getHasTarget(c),R=HN.getHasRouter(c),O=HN.getHasDefaultTarget(c),N=_&&P&&R&&O,M=uD.getDefaultTarget(c),L=uD.getInitiatorNamesDisconnectedToDefaultTarget({fetchedComponents:c,componentsReachabilities:d,defaultTarget:M}),F=uD.getIsDefaultTargetAtEgressPortZero(u,M),$=!L.length&&F,D=UN.getRouterNamesWithSkippedPorts(c,u),k=UN.getAllRoutersIngressConnected(c,u),U=UN.getAllRoutersEgressConnected(c,u),H=UN.getConnectedRoutersOnDiffTopologyWithoutBridge({fetchedComponents:c,connections:u,explorerTree:h,topologies:c.topologies}),V=!D.length&&!k.length&&!U.length&&!H.length,q=yT.getNamesOfInitiatorsUnreachableByAnyNonDefaultTarget(d,c),J=yT.getNamesOfDisconnectedFloatingInitiators(u,c),Q=yT.getNamesOfInitiatorsWithInvalidReorderBufferSize({field:"readReorderBufferSize",fetchedComponents:c,isSystemAddressInterleavingEnabled:i}),se=yT.getNamesOfInitiatorsWithInvalidReorderBufferSize({field:"writeReorderBufferSize",fetchedComponents:c,isSystemAddressInterleavingEnabled:i}),oe=yT.getNamesOfInitiatorsWithInvalidVirtualChannelsCount(c.initiators),ie=!q.length&&!J.length&&!Q.length&&!se.length&&!oe.length,ee=LZ.getNamesOfDisconnectedFloatingTargets(c,u),re=LZ.getNamesOfTargetsWithInvalidMinimumTransactionSize({isSystemAddressInterleavingEnabled:i,systemDataWidth:s,fetchedComponents:c}),fe=!ee.length&&!re.length,we=kZ.getNamesOfBridgesWithIncompleteConnections(c,u),xe=kZ.getNamesOfBridgesConnectedBetweenSameTopologies({fetchedComponents:c,connections:u,explorerTree:h,topologies:c.topologies}),ve=!we.length&&!xe.length,Re=zN.getNamesOfTargetsWithBlankAddresses(c,p),pe=zN.getNamesOfTargetsWithBaseAddressExceedingLimitAddress(c,p),Be=zN.getNamesOfTargetsExceedingAddressWidth({fetchedComponents:c,ncnocSystem:f,ncnocAddresses:p}),ke=zN.getNamesOfTargetsWithOverlappingAddresses(c,p),Ne=!Re.length&&!pe.length&&!Be.length&&!ke.length,ot=l?.namesOfConnectedPortsWithNoRoutes??[],ce=l?.allRoutersHaveConfiguredRoutes??[],Ae=l?.noMultipleRoutes??[],be=VN.getNamesOfComponentsWithInvalidPortDataWidth({ncnocInitiators:b,ncnocTargets:S,ncnocSystem:f}),Se=VN.getNamesOfComponentsWithInvalidDeviceIDs({ncnocInitiators:b,ncnocTargets:S,ncnocRouters:v,ncnocVirtualTargets:w}),Pe=VN.getNamesOfComponentsWithDuplicateNames({ncnocRouters:v,ncnocInitiators:b,ncnocTargets:S,ncnocBridges:y,ncnocSubtopologies:m}),Ue=VN.getNamesOfComponentsWithDuplicateDeviceIDs({ncnocRouters:v,ncnocInitiators:b,ncnocTargets:S,ncnocBridges:y,ncnocSubtopologies:m}),_e=!be.length&&!Se.length&&!Pe.length&&!Ue.length,Oe=C.useMemo(()=>N&&$&&V&&ie&&fe&&ve&&Ne&&_e&&l?.isValid,[N,$,V,ie,fe,ve,Ne,l?.isValid]),ze=(ne,W)=>{(W==="backdropClick"||W==="escapeKeyDown")&&r(null)};return C.useEffect(()=>{o(Oe)},[Oe]),l?K(le,{sx:{display:"flex"},children:[g(h6,{isValid:Oe}),K(Es,{anchorEl:n,open:!!n,onClose:ze,sx:{"& .MuiMenu-paper":{p:2}},MenuListProps:{onClick:ne=>ne.stopPropagation()},children:[g(rut,{hasInitiator:_,hasTarget:P,hasRouter:R,hasDefaultTarget:O,hasMinimumConfiguration:N}
388),g(aut,{initiatorNamesNotConnectedToDefaultTarget:L,isDefaultTargetAtEgressPortZero:F}),g(lut,{routerNamesWithSkippedPorts:D,routerNamesWithoutIngressConnections:k,routerNamesWithoutEgressConnections:U,connectedRoutersOnDiffTopologyWithoutBridge:H}),g(mut,{namesOfInitiatorsUnreachableByAnyNonDefaultTarget:q,namesOfDisconnectedFloatingInitiators:J,namesOfInitiatorsWithInvalidReadReorderBufferSize:Q,namesOfInitiatorsWithInvalidWriteReorderBufferSize:se,namesOfInitiatorsWithInvalidVirtualChannelsCount:oe}),g(Iut,{namesOfDisconnectedFloatingTargets:ee,namesOfTargetsWithInvalidMinimumTransactionSize:re}),g(Put,{namesOfBridgesWithIncompleteConnections:we,namesOfBridgesConnectedBetweenSameTopologies:xe}),g(Uut,{namesOfTargetsWithBlankAddresses:Re,namesOfTargetsWithBaseAddressExceedingLimitAddress:pe,namesOfTargetsExceedingAddressWidth:Be,namesOfTargetsWithOverlappingAddresses:ke}),g(Nut,{namesOfRoutersWithNoConfiguredRoutes:ce,namesOfConnectedPortsWithNoRoutes:ot,namesOfRoutersWithMultipleRoutes:Ae}),g(Kpt,{namesOfComponentsWithInvalidPortDataWidth:be,namesOfComponentsWithInvalidDeviceIDs:Se,namesOfComponentsWithDuplicateNames:Pe,namesOfComponentsWithDuplicateDeviceIDs:Ue}),t?K(le,{children:[K(Ke,{...Qpt,children:[A(l.invalidFrequencies.length===0)," Clock Frequency: All values greater than 0"]}),l.invalidFrequencies.length>0?g(le,{pl:1,children:l.invalidFrequencies.map(({id:ne,name:W,type:j})=>K(Ke,{children:[j.charAt(0).toUpperCase()+j.slice(1),": ",W]},ne))}):null]}):null]})]}):null};var go=(t=>(t.GENERATE_NCNOC="Generate RTL(NCNOC)",t.GENERATE_CNOC="Generate RTL(CNOC)",t.SIMULATE_NCNOC="Simulate",t.EXPORT_NCNOC="Export(NCNOC)",t.EXPORT_CNOC="Export(CNOC)",t.NONE="",t))(go||{}),fo=(t=>(t[t.PENDING=0]="PENDING",t[t.RUNNING=1]="RUNNING",t[t.FAILED=2]="FAILED",t[t.SUCCESS=3]="SUCCESS",t[t.STOPPED=4]="STOPPED",t))(fo||{}),I4=(t=>(t[t.RTL_FILES=0]="RTL_FILES",t[t.CYCLE_ACCURATE_MODEL=1]="CYCLE_ACCURATE_MODEL",t))(I4||{}),YT=(t=>(t[t.SIMPLE_TEST=0]="SIMPLE_TEST",t[t.MULTI_TEST=1]="MULTI_TEST",t[t.PERF_TEST=2]="PERF_TEST",t[t.CUSTOM_TEST=3]="CUSTOM_TEST",t))(YT||{}),dD=(t=>(t[t.ENCRYPTED=0]="ENCRYPTED",t[t.OBFUSCATED=1]="OBFUSCATED",t[t.CLEAN=2]="CLEAN",t))(dD||{}),Ab=(t=>(t.NONE="NONE",t.PENDING="PENDING",t.SUCCESS="OK",t.FAILED="NOK",t))(Ab||{});const ru={getStatusColor:t=>{switch(t){case fo.RUNNING:return"warning.light";case fo.FAILED:return"error.main";case fo.SUCCESS:return"success.dark";case fo.STOPPED:return"error.dark";default:return"info.light"}},isTaskSuccessful:t=>t===fo.SUCCESS,getReadableDate:t=>Ti(t).format("DD-MMM-YYYY, hh:mm:ss A"),getStatusTooltip:t=>{switch(t){case fo.PENDING:return"Pending";case fo.RUNNING:return"Running";case fo.FAILED:return"Failed";case fo.SUCCESS:return"Success";case fo.STOPPED:return"Stopped";default:return""}},getStatusIcon:t=>{switch(t){case fo.PENDING:return g(m6e,{sx:{color:jNe[500],marginRight:1}});case fo.RUNNING:return g(Ni,{size:20,sx:{marginRight:1}});case fo.FAILED:return g(JH,{sx:{color:Hg[500],marginRight:1}});case fo.SUCCESS:return g(Vv,{sx:{color:ky[500],marginRight:1}});case fo.STOPPED:return g(JH,{sx:{color:Hg[500],marginRight:1}});default:return g(gr,{})}},getFtpUploadStatusTooltip:t=>{switch(t){case Ab.SUCCESS:return"Success";case Ab.FAILED:return"Failed";case Ab.PENDING:return"Running";default:return"No Info"}},getFtpUploadStatusIcon:t=>{switch(t){case Ab.SUCCESS:return g(Vv,{sx:{color:ky[500],marginRight:1}});case Ab.FAILED:return g(JH,{sx:{color:Hg[500],marginRight:1}});case Ab.PENDING:return g(Ni,{size:20,sx:{marginRight:1}});default:return g(w6e,{sx:{color:iae[500],marginRight:1}})}},getIsDownloadTaskResultButtonDisabled:t=>t===fo.FAILED||t===fo.RUNNING||t===fo.PENDING,getDownloadTaskResultTooltipMessage:(t,e)=>{if(!e)return"Feature not available for trial users";switch(t){case fo.PENDING:case fo.RUNNING:return"Task is not finished";case fo.FAILED:return"Task failed";default:return"Download task result"}},getReadableScope:(t,e)=>{const n="unknown";switch(t){case go.GENERATE_NCNOC:case go.GENERATE_CNOC:return ru.getReadableGenerateScope(e);case go.SIMULATE_NCNOC:return ru.getReadableSimulateScope(e);case go.EXPORT_NCNOC:case go.EXPORT_CNOC:return ru.getReadableExportScope(e);default:return n}},getReadableGenerateScope:t=>{const e="RTL",n="Cycle Accurate Model",r="unknown";switch(t){case I4.RTL_FILES:return e;case I4.CYCLE_ACCURATE_MODEL:return n;default:return r}},getReadableSimulateScope:t=>
388{const e="Simple",n="Multiple",r="Performance",o="Custom Only",i="unknown";switch(t){case YT.SIMPLE_TEST:return e;case YT.MULTI_TEST:return n;case YT.PERF_TEST:return r;case YT.CUSTOM_TEST:return o;default:return i}},getReadableExportScope:t=>{const e="Encrypted",n="Obfuscated",r="Clean",o="unknown";switch(t){case dD.ENCRYPTED:return e;case dD.OBFUSCATED:return n;case dD.CLEAN:return r;default:return o}}},Jpt=({items:t,menuId:e="task-history-context-menu",iconButtonId:n,menuSx:r={}})=>{const[o,i]=C.useState(null),s=!!o;return K("div",{children:[g(Di,{id:n,onClick:c=>{c.stopPropagation(),i(c.currentTarget)},size:"small","aria-controls":e,"aria-haspopup":"true","aria-expanded":s,children:g(l6,{})}),g(Es,{id:e,anchorEl:o,open:s,onClose:()=>{i(null)},onClick:c=>c.stopPropagation(),sx:{"& .MuiMenu-paper":{p:0,width:"145px"},...r},children:t.map(c=>K(mr,{id:c.id,disabled:c.disabled,onClick:u=>{c.onClick(u)},sx:c.sx,children:[c.icon,c.label]},c.id))})]})},C6=({tasks:t,downloadTaskHistoryHandler:e,deleteTaskHistoryHandler:n,isDownloadTaskResultEnabled:r,isUploadToFtp:o})=>{const i="Delete",s="status",a="scope",l="failureReason",c="ftpUploadStatus",u="createdAt",d="updatedAt",h="actions",f="Status",p="Scope",m="Failure Reason",y="FTP Uploaded",v="Started On",b="Completed On",S="Actions",w="Download",A="No Info",_=C.useMemo(()=>[{field:s,headerName:f,width:100,hideable:!1,renderCell:({row:P})=>g(rn,{title:ru.getStatusTooltip(P.status),placement:"bottom",children:g("div",{style:{display:"flex",alignItems:"center"},children:ru.getStatusIcon(P.status)})})},{field:a,headerName:p,width:230,hideable:!1,renderCell:({row:P})=>P.scope.length?g(le,{children:P.scope.map(R=>g(m0,{label:ru.getReadableScope(P.description,R),sx:{height:"16px",mr:"1px",color:"white",backgroundColor:tt}},R))}):g(Ke,{children:A})},{field:l,headerName:m,width:200,hideable:!1,renderCell:({row:P})=>g(Ke,{children:P.failureReason})},...o?[{field:c,headerName:y,width:120,hideable:!1,renderCell:({row:P})=>g(rn,{title:ru.getFtpUploadStatusTooltip(P.ftpStatus),placement:"bottom",children:g(le,{style:{display:"flex",alignItems:"center"},children:ru.getFtpUploadStatusIcon(P.ftpStatus)})})}]:[],{field:u,headerName:v,width:235,hideable:!1,renderCell:({row:P})=>g(Ke,{children:ru.getReadableDate(P.createdAt)})},{field:d,headerName:b,width:235,hideable:!1,renderCell:({row:P})=>g(Ke,{children:ru.isTaskSuccessful(P.status)?ru.getReadableDate(P.updatedAt):"-"})},{field:h,type:h,headerName:S,hideable:!1,sortable:!1,getActions:({row:P})=>{const R=[{id:`download-task-history-${P.id}`,label:w,onClick:O=>{e(O,P)},disabled:ru.getIsDownloadTaskResultButtonDisabled(P.status)||!r,icon:g(Vp,{fontSize:"small",iconType:wa.downloadIcon,tooltipProps:{title:ru.getDownloadTaskResultTooltipMessage(P.status,r)},IconButtonPropsSx:{color:"primary.light","&:hover":{color:"primary.main"}}})},{id:`delete-task-history-${P.id}`,label:i,onClick:O=>{n(O,P)},icon:g(Vp,{fontSize:"small",iconType:wa.deleteIcon,tooltipProps:{title:`Delete ${P.description} task`},IconButtonPropsSx:{color:"error.light","&:hover":{color:"error.dark"}}})}];return[g(Jpt,{items:R,menuId:`action-menu-${P.id}`,iconButtonId:`action-button-${P.id}`},`action-menu-${P.id}`)]}}],[t,e,n,r,o]);return g(Dm,{tableType:ps.TASKS,wrapperSx:{p:0,height:"465px",display:"flex",flexDirection:"column"},dataGridSx:{p:1.5,width:"100%",height:"100%",maxHeight:"465px","& .MuiDataGrid-cell":{display:"flex",alignItems:"center"}},rows:t,columns:_})},egt=({id:t,label:e,handleClick:n,isEnabled:r=!0,sx:o,startIcon:i,tooltip:s=""})=>{const a=md(tt,.8);return g(rn,{title:s,children:g(Sn,{id:t,variant:"contained",sx:{color:"white",backgroundColor:tt,"&:hover":{backgroundColor:a},my:"5px",whiteSpace:"normal",textAlign:"center",lineHeight:1.5,height:"auto",py:1,...o},startIcon:i,disabled:!r,onClick:n,children:e})})},tgt=({anchorEl:t,onCloseHandler:e,menuItems:n})=>g(Es,{open:!!t,anchorEl:t,anchorReference:"anchorEl",onClose:()=>e(),sx:{"& .disabled":{pointer:"not-allowed",opacity:.35,"&:hover":{backgroundColor:"transparent"}}},children:n.map(r=>K(le,{children:[r.isDividerVisible?g(yi,{sx:{backgroundColor:Zs,mt:1,mb:1}}):null,K(mr,{onClick:()=>r.handleClickEvent(),sx:{padding:1},selected:r.isSelected,children:[g(ff,{sx:{minWidth:0},children:r.startIcon}),g(Il,{primary:r.label,sx:{justifyContent:"left"}})]},r.label)]},r.label))}),S6=({projectType:t})=>{const e="master",n=Yn(),r=bt(jP),o=t===pr.CNOC,i=bt(Qx),s=!o&&i&&r.isUserBranchControlVisible?i:r.rtlBranchId,a=im.getById(s),l=a?a.name:e,c=im.getAll(),[u,d]=C.useState(null),h=()=>c.map(y=>({label:y.name,handleClickEvent:()=>{f(y.id)},startIcon:g(qI,{}),isSelected:y.name===l})),f=async y=>{n(CNe(y)),m()},p=y=>{d(y.currentTarget)},m=()=>{d(null)};return K(le,{children:[g(rn,{title:o?"Not yet supported in C-NoC":l,children:g(egt,{id:"rtl-branch-control",label:K(le,{sx:{display:"flex",alignItems:"center",minWidth:0,gap:"6px"},children:[g(qI,{}),g(le,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:l})]}),handleClick:p,sx:{width:"100px",minWidth:"100px",maxWidth:"100px",flexShrink:0,backgroundColor:tt,"&:hover":{backgroundColor:"black"},height:"30px"},isEnabled:r.isUserBranchControlVisible&&!o})}),u?g(tgt,{anchorEl:u,onCloseHandler:m,menuItems:h()}):null]})}
388,ngt=({handleCreateTaskGenerate:t,isTopologyInvalid:e,isGenerateProjectRtlLoading:n,canGenerateCycleAccurateModel:r,isCycleAccurateModelIncluded:o,setIsCycleAccurateModelIncluded:i,areGenerateRequestsEqualToMaxGenerateCount:s,userGroup:a,projectType:l})=>{const c="Generate Design",u="Include Cycle Accurate Model",d=C.useMemo(()=>e?"Disabled for Invalid Topology":s?"Reached the allowed maximum number of pending or running generate requests":r?"":"Cycle accurate model not included in generation",[e,s,r]);return K(le,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2},children:[g(rn,{title:d,placement:"bottom",children:g(ec,{control:g(zb,{checked:o,disabled:e||!r,onChange:h=>i(h.target.checked),sx:{"& .MuiSwitch-switchBase.Mui-checked":{color:tt},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:tt},"&.Mui-disabled":{opacity:Zs}}}),label:u})}),K(le,{sx:{display:"flex",flexDirection:"row",gap:1,width:"auto",alignItems:"center"},children:[a.type===mm.INTERNAL||a.type===mm.ADMIN?g(S6,{projectType:l}):null,g(rn,{title:d,placement:"right",children:g(Sn,{variant:"contained",fullWidth:!0,sx:{height:"30px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.8}},disabled:e||n||s,onClick:()=>t(),children:c})})]})]})},rgt=({projectId:t,tasks:e,projectType:n,handleDownloadTaskResult:r,handleDeleteTaskResult:o,isTopologyInvalid:i,userGroup:s,maxGenerateCount:a,userId:l})=>{const c=bt(Qx),u=c&&s.isUserBranchControlVisible?c:s.rtlBranchId,[d,{isLoading:h}]=B7e(),[f,p]=C.useState(!1),m=C.useMemo(()=>e.filter(b=>{if(n===pr.NCNOC)return b.description===go.GENERATE_NCNOC;if(n===pr.CNOC)return b.description===go.GENERATE_CNOC}),[e]),y=C.useMemo(()=>m.filter(b=>b.status===fo.PENDING||b.status===fo.RUNNING),[m]);return K(le,{children:[g(ngt,{handleCreateTaskGenerate:async()=>{await d({projectId:t,userId:l,includeCycleAccurateModel:f,rtlBranchId:u})},isTopologyInvalid:i,isGenerateProjectRtlLoading:h,canGenerateCycleAccurateModel:s.canGenerateCycleAccurateModel,isCycleAccurateModelIncluded:f,setIsCycleAccurateModelIncluded:p,areGenerateRequestsEqualToMaxGenerateCount:y.length===a,userGroup:s,projectType:n}),g(C6,{tasks:m,downloadTaskHistoryHandler:(b,S)=>{r({event:b,taskId:S.id})},deleteTaskHistoryHandler:(b,S)=>{o({event:b,taskId:S.id,name:S.description})},isDownloadTaskResultEnabled:s.canDownloadRTL})]})};var $y=(t=>(t.QUESTA="questa",t.VCS="vcs",t.XRUN="xrun",t))($y||{});const S5=1,ogt=1,igt=100,kfe=1e3,sgt=4294967295,E5=$y.QUESTA,P4="mac_simple_wr_rd_test",VZ="mac_multi_transaction",GZ="mac_perf_test",agt=[{id:P4,displayName:"Simple",testName:P4,dumpWaveForm:!1,randomize:!1,numberOfTransactions:ogt,selected:!0,simRunner:E5,svseed:S5,enablePortMonitors:!1},{id:VZ,displayName:"Multiple",testName:VZ,dumpWaveForm:!1,randomize:!1,numberOfTransactions:igt,selected:!0,simRunner:E5,svseed:S5,enablePortMonitors:!1},{id:GZ,displayName:"Performance",testName:GZ,dumpWaveForm:!1,randomize:!1,numberOfTransactions:kfe,selected:!0,simRunner:E5,svseed:S5,enablePortMonitors:!1}];/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ffe(t){return typeof t>"u"||t===null}function lgt(t){return typeof t=="object"&&t!==null}function cgt(t){return Array.isArray(t)?t:Ffe(t)?[]:[t]}function ugt(t,e){var n,r,o,i;if(e)for(i=Object.keys(e),n=0,r=i.length;n<r;n+=1)o=i[n],t[o]=e[o];return t}function dgt(t,e){var n="",r;for(r=0;r<e;r+=1)n+=t;return n}function hgt(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var fgt=Ffe,pgt=lgt,ggt=cgt,mgt=dgt,ygt=hgt,vgt=ugt,ya={isNothing:fgt,isObject:pgt,toArray:ggt,repeat:mgt,isNegativeZero:ygt,extend:vgt};function Bfe(t,e){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+=` 389 390`+t.mark.snippet),r+" "+n):r}function iP(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Bfe(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}iP.prototype=Object.create(Error.prototype);iP.prototype.constructor=iP;iP.prototype.toString=function(e){return this.name+": "+Bfe(this,e)};var Tc=iP;function x5(t,e,n,r,o){var i="",s="",a=Math.floor(o/2)-1;return r-e>a&&(i=" ... ",e=r-a+i.length),n-r>a&&(s=" ...",n=r+a-s.length),{str:i+t.slice(e,n).replace(/\t/g,"â")+s,pos:r-e+i.length}}function w5(t,e){return ya.repeat(" ",e-t.length)+t}function bgt(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],o=[],i,s=-1;i=n.exec(t.buffer);)o.push(i.index),r.push(i.index+i[0].length),t.position<=i.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var a="",l,c,u=Math.min(t.line+e.linesAfter,o.length).toString().length,d=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)c=x5(t.buffer,r[s-l],o[s-l],t.position-(r[s]-r[s-l]),d),a=ya.repeat(" ",e.indent)+w5((t.line-l+1).toString(),u)+" | "+c.str+` 391`+a;for(c=x5(t.buffer,r[s],o[s],t.position,d),a+=ya.repeat(" ",e.indent)+w5((t.line+1).toString(),u)+" | "+c.str+` 392`,a+=ya.repeat("-",e.indent+u+3+c.pos)+`^ 393`,l=1;l<=e.linesAfter&&!(s+l>=o.length);l++)c=x5(t.buffer,r[s+l],o[s+l],t.position-(r[s]-r[s+l]),d),a+=ya.repeat(" ",e.indent)+w5((t.line+l+1).toString(),u)+" | "+c.str+` 394`;return a.replace(/\n$/,"")}var Cgt=bgt,Sgt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Egt=["scalar","sequence","mapping"];function xgt(t){var e={};
vendor: 14,560 bytes, lines 394-396
394return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(r){e[String(r)]=n})}),e}function wgt(t,e){if(e=e||{},Object.keys(e).forEach(function(n){if(Sgt.indexOf(n)===-1)throw new Tc('Unknown option "'+n+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(n){return n},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=xgt(e.styleAliases||null),Egt.indexOf(this.kind)===-1)throw new Tc('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Pl=wgt;function WZ(t,e){var n=[];return t[e].forEach(function(r){var o=n.length;n.forEach(function(i,s){i.tag===r.tag&&i.kind===r.kind&&i.multi===r.multi&&(o=s)}),n[o]=r}),n}function Agt(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,n;function r(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(r);return t}function R4(t){return this.extend(t)}R4.prototype.extend=function(e){var n=[],r=[];if(e instanceof Pl)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(n=n.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new Tc("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(i){if(!(i instanceof Pl))throw new Tc("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new Tc("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new Tc("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(i){if(!(i instanceof Pl))throw new Tc("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(R4.prototype);return o.implicit=(this.implicit||[]).concat(n),o.explicit=(this.explicit||[]).concat(r),o.compiledImplicit=WZ(o,"implicit"),o.compiledExplicit=WZ(o,"explicit"),o.compiledTypeMap=Agt(o.compiledImplicit,o.compiledExplicit),o};var $fe=R4,Hfe=new Pl("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Ufe=new Pl("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),zfe=new Pl("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Vfe=new $fe({explicit:[Hfe,Ufe,zfe]});function Tgt(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function _gt(){return null}function Igt(t){return t===null}var Gfe=new Pl("tag:yaml.org,2002:null",{kind:"scalar",resolve:Tgt,construct:_gt,predicate:Igt,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Pgt(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function Rgt(t){return t==="true"||t==="True"||t==="TRUE"}function Ogt(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var Wfe=new Pl("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Pgt,construct:Rgt,predicate:Ogt,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function Ngt(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Mgt(t){return 48<=t&&t<=55}function Dgt(t){return 48<=t&&t<=57}function Lgt(t){if(t===null)return!1;var e=t.length,n=0,r=!1,o;if(!e)return!1;if(o=t[n],(o==="-"||o==="+")&&(o=t[++n]),o==="0"){if(n+1===e)return!0;if(o=t[++n],o==="b"){for(n++;n<e;n++)if(o=t[n],o!=="_"){if(o!=="0"&&o!=="1")return!1;r=!0}return r&&o!=="_"}if(o==="x"){for(n++;n<e;n++)if(o=t[n],o!=="_"){if(!Ngt(t.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}if(o==="o"){for(n++;n<e;n++)if(o=t[n],o!=="_"){if(!Mgt(t.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}}if(o==="_")return!1;for(;n<e;n++)if(o=t[n],o!=="_"){if(!Dgt(t.charCodeAt(n)))return!1;r=!0}return!(!r||o==="_")}function kgt(t){var e=t,n=1,r;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),r=e[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),e=e.slice(1),r=e[0]),e==="0")return 0;if(r==="0"){if(e[1]==="b")return n*parseInt(e.slice(2),2);if(e[1]==="x")return n*parseInt(e.slice(2),16);if(e[1]==="o")return n*parseInt(e.slice(2),8)}return n*parseInt(e,10)}function Fgt(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!ya.isNegativeZero(t)}var jfe=new Pl("tag:yaml.org,2002:int",{kind:"scalar",resolve:Lgt,construct:kgt,predicate:Fgt,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Bgt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function $gt(t){return!(t===null||!Bgt.test(t)||t[t.length-1]==="_")}function Hgt(t){var e,n;return e=t.replace(/_/g,"").toLowerCase(),n=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:n*parseFloat(e,10)}var Ugt=/^[-+]?[0-9]+e/;function zgt(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ya.isNegativeZero(t))return"-0.0";return n=t.toString(10),Ugt.test(n)?n.replace("e",".e"):n}function Vgt(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||ya.isNegativeZero(t))}var qfe=new Pl("tag:yaml.org,2002:float",{kind:"scalar",resolve:$gt,construct:Hgt,predicate:Vgt,represent:zgt,defaultStyle:"lowercase"}),Yfe=Vfe.extend({implicit:[Gfe,Wfe,jfe,qfe]}),Xfe=Yfe,Kfe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qfe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ggt(t){return t===null?!1:Kfe.exec(t)!==null||Qfe.exec(t)!==null}function Wgt(t){var e,n,r,o,i,s,a,l=0,c=null,u,d,h;if(e=Kfe.exec(t),e===null&&(e=Qfe.exec(t)),e===null)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(n,r,o));if(i=+e[4],s=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],d=+(e[11]||0),c=(u*60+d)*6e4,e[9]==="-"&&(c=-c)),h=new Date(Date.UTC(n,r,o,i,s,a,l)),c&&h.setTime(h.getTime()-c),h}function jgt(t){return t.toISOString()}var Zfe=new Pl("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ggt,construct:Wgt,instanceOf:Date,represent:jgt});function qgt(t){return t==="<<"||t===null}var Jfe=new Pl("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qgt}),E6=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= 395\r`;function Ygt(t){if(t===null)return!1;var e,n,r=0,o=t.length,i=E6;for(n=0;n<o;n++)if(e=i.indexOf(t.charAt(n)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function Xgt(t){var e,n,r=t.replace(/[\r\n=]/g,""),o=r.length,i=E6,s=0,a=[];for(e=0;e<o;e++)e%4===0&&e&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|i.indexOf(r.charAt(e));return n=o%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),new Uint8Array(a)}function Kgt(t){var e="",n=0,r,o,i=t.length,s=E6;for(r=0;r<i;r++)r%3===0&&r&&(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]),n=(n<<8)+t[r];return o=i%3,o===0?(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]):o===2?(e+=s[n>>10&63],e+=s[n>>4&63],e+=s[n<<2&63],e+=s[64]):o===1&&(e+=s[n>>2&63],e+=s[n<<4&63],e+=s[64],e+=s[64]),e}function Qgt(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var epe=new Pl("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ygt,construct:Xgt,predicate:Qgt,represent:Kgt}),Zgt=Object.prototype.hasOwnProperty,Jgt=Object.prototype.toString;function emt(t){if(t===null)return!0;var e=[],n,r,o,i,s,a=t;for(n=0,r=a.length;n<r;n+=1){if(o=a[n],s=!1,Jgt.call(o)!=="[object Object]")return!1;for(i in o)if(Zgt.call(o,i))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(i)===-1)e.push(i);else return!1}return!0}function tmt(t){return t!==null?t:[]}var tpe=new Pl("tag:yaml.org,2002:omap",{kind:"sequence",resolve:emt,construct:tmt}),nmt=Object.prototype.toString;function rmt(t){if(t===null)return!0;var e,n,r,o,i,s=t;for(i=new Array(s.length),e=0,n=s.length;e<n;e+=1){if(r=s[e],nmt.call(r)!=="[object Object]"||(o=Object.keys(r),o.length!==1))return!1;i[e]=[o[0],r[o[0]]]}return!0}function omt(t){if(t===null)return[];var e,n,r,o,i,s=t;for(i=new Array(s.length),e=0,n=s.length;e<n;e+=1)r=s[e],o=Object.keys(r),i[e]=[o[0],r[o[0]]];return i}var npe=new Pl("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rmt,construct:omt}),imt=Object.prototype.hasOwnProperty;function smt(t){if(t===null)return!0;var e,n=t;for(e in n)if(imt.call(n,e)&&n[e]!==null)return!1;return!0}function amt(t){return t!==null?t:{}}var rpe=new Pl("tag:yaml.org,2002:set",{kind:"mapping",resolve:smt,construct:amt}),x6=Xfe.extend({implicit:[Zfe,Jfe],explicit:[epe,tpe,npe,rpe]}),qv=Object.prototype.hasOwnProperty,g2=1,ope=2,ipe=3,m2=4,A5=1,lmt=2,jZ=3,cmt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,umt=/[\x85\u2028\u2029]/,dmt=/[,\[\]\{\}]/,spe=/^(?:!|!!|![a-z\-]+!)$/i,ape=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function qZ(t){return Object.prototype.toString.call(t)}function Mp(t){return t===10||t===13}function aC(t){return t===9||t===32}function du(t){return t===9||t===32||t===10||t===13}function r1(t){return t===44||t===91||t===93||t===123||t===125}function hmt(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function fmt(t){return t===120?2:t===117?4:t===85?8:0}function pmt(t){return 48<=t&&t<=57?t-48:-1}function YZ(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?` 396`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"Â ":t===95?"Â ":t===76?"\u2028":t===80?"\u2029":""}function gmt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var lpe=new Array(256),cpe=new Array(256);for(var yE=0;yE<256;yE++)lpe[yE]=YZ(yE)?1:0,cpe[yE]=YZ(yE);function mmt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||x6,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function upe(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=Cgt(n),new Tc(e,n)}function Ln(t,e){throw upe(t,e)}function y2(t,e){t.onWarning&&t.onWarning.call(null,upe(t,e))}var XZ={YAML:function(e,n,r){var o,i,s;e.version!==null&&Ln(e,"duplication of %YAML directive"),r.length!==1&&Ln(e,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),o===null&&Ln(e,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&Ln(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&y2(e,"unsupported YAML version of the document")},TAG:function(e,n,r){var o,i;r.length!==2&&Ln(e,"TAG directive accepts exactly two arguments"),o=r[0],i=r[1],spe.test(o)||Ln(e,"ill-formed tag handle (first argument) of the TAG directive"),qv.call(e.tagMap,o)&&Ln(e,'there is a previously declared suffix for "'+o+'" tag handle'),ape.test(i)||Ln(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{Ln(e,"tag prefix is malformed: "+i)}e.tagMap[o]=i}};function _v(t,e,n,r){var o,i,s,a;if(e<n){if(a=t.input.slice(e,n),r)for(o=0,i=a.length;o<i;o+=1)s=a.charCodeAt(o),s===9||32<=s&&s<=1114111||Ln(t,"expected valid JSON character");else cmt.test(a)&&Ln(t,"the stream contains non-printable characters");t.result+=a}}function KZ(t,e,n,r){var o,i,s,a;for(ya.isObject(n)||Ln(t,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(n),s=0,a=o.length;s<a;s+=1)i=o[s],qv.call(e,i)||(e[i]=n[i],r[i]=!0)}function o1(t,e,n,r,o,i,s,a,l){var c,u;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),c=0,u=o.length;c<u;c+=1)Array.isArray(o[c])&&Ln(t,"nested arrays are not supported inside keys"),typeof o=="object"&&qZ(o[c])==="[object Object]"&&(o[c]="[object Object]");if(typeof o=="object"&&qZ(o)==="[object Object]"&&(o="[object Object]"),o=String(o),e===null&&(e={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(c=0,u=i.length;c<u;c+=1)KZ(t,e,i[c],n);else KZ(t,e,i,n);else!t.json&&!qv.call(n,o)&&qv.call(e,o)&&(t.line=s||t.line,t.lineStart=a||t.lineStart,t.position=l||t.position,Ln(t,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(e,o,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[o]=i,delete n[o];return e}function w6(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Ln(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}
vendor: 10,024 bytes, lines 396-403
396function Xs(t,e,n){for(var r=0,o=t.input.charCodeAt(t.position);o!==0;){for(;aC(o);)o===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&o===35)do o=t.input.charCodeAt(++t.position);while(o!==10&&o!==13&&o!==0);if(Mp(o))for(w6(t),o=t.input.charCodeAt(t.position),r++,t.lineIndent=0;o===32;)t.lineIndent++,o=t.input.charCodeAt(++t.position);else break}return n!==-1&&r!==0&&t.lineIndent<n&&y2(t,"deficient indentation"),r}function cB(t){var e=t.position,n;return n=t.input.charCodeAt(e),!!((n===45||n===46)&&n===t.input.charCodeAt(e+1)&&n===t.input.charCodeAt(e+2)&&(e+=3,n=t.input.charCodeAt(e),n===0||du(n)))}function A6(t,e){e===1?t.result+=" ":e>1&&(t.result+=ya.repeat(` 397`,e-1))}function ymt(t,e,n){var r,o,i,s,a,l,c,u,d=t.kind,h=t.result,f;if(f=t.input.charCodeAt(t.position),du(f)||r1(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(o=t.input.charCodeAt(t.position+1),du(o)||n&&r1(o)))return!1;for(t.kind="scalar",t.result="",i=s=t.position,a=!1;f!==0;){if(f===58){if(o=t.input.charCodeAt(t.position+1),du(o)||n&&r1(o))break}else if(f===35){if(r=t.input.charCodeAt(t.position-1),du(r))break}else{if(t.position===t.lineStart&&cB(t)||n&&r1(f))break;if(Mp(f))if(l=t.line,c=t.lineStart,u=t.lineIndent,Xs(t,!1,-1),t.lineIndent>=e){a=!0,f=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=c,t.lineIndent=u;break}}a&&(_v(t,i,s,!1),A6(t,t.line-l),i=s=t.position,a=!1),aC(f)||(s=t.position+1),f=t.input.charCodeAt(++t.position)}return _v(t,i,s,!1),t.result?!0:(t.kind=d,t.result=h,!1)}function vmt(t,e){var n,r,o;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(_v(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)r=t.position,t.position++,o=t.position;else return!0;else Mp(n)?(_v(t,r,o,!0),A6(t,Xs(t,!1,e)),r=o=t.position):t.position===t.lineStart&&cB(t)?Ln(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Ln(t,"unexpected end of the stream within a single quoted scalar")}function bmt(t,e){var n,r,o,i,s,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return _v(t,n,t.position,!0),t.position++,!0;if(a===92){if(_v(t,n,t.position,!0),a=t.input.charCodeAt(++t.position),Mp(a))Xs(t,!1,e);else if(a<256&&lpe[a])t.result+=cpe[a],t.position++;else if((s=fmt(a))>0){for(o=s,i=0;o>0;o--)a=t.input.charCodeAt(++t.position),(s=hmt(a))>=0?i=(i<<4)+s:Ln(t,"expected hexadecimal character");t.result+=gmt(i),t.position++}else Ln(t,"unknown escape sequence");n=r=t.position}else Mp(a)?(_v(t,n,r,!0),A6(t,Xs(t,!1,e)),n=r=t.position):t.position===t.lineStart&&cB(t)?Ln(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Ln(t,"unexpected end of the stream within a double quoted scalar")}function Cmt(t,e){var n=!0,r,o,i,s=t.tag,a,l=t.anchor,c,u,d,h,f,p=Object.create(null),m,y,v,b;if(b=t.input.charCodeAt(t.position),b===91)u=93,f=!1,a=[];else if(b===123)u=125,f=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),b=t.input.charCodeAt(++t.position);b!==0;){if(Xs(t,!0,e),b=t.input.charCodeAt(t.position),b===u)return t.position++,t.tag=s,t.anchor=l,t.kind=f?"mapping":"sequence",t.result=a,!0;n?b===44&&Ln(t,"expected the node content, but found ','"):Ln(t,"missed comma between flow collection entries"),y=m=v=null,d=h=!1,b===63&&(c=t.input.charCodeAt(t.position+1),du(c)&&(d=h=!0,t.position++,Xs(t,!0,e))),r=t.line,o=t.lineStart,i=t.position,cx(t,e,g2,!1,!0),y=t.tag,m=t.result,Xs(t,!0,e),b=t.input.charCodeAt(t.position),(h||t.line===r)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),Xs(t,!0,e),cx(t,e,g2,!1,!0),v=t.result),f?o1(t,a,p,y,m,v,r,o,i):d?a.push(o1(t,null,p,y,m,v,r,o,i)):a.push(m),Xs(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(n=!0,b=t.input.charCodeAt(++t.position)):n=!1}Ln(t,"unexpected end of the stream within a flow collection")}function Smt(t,e){var n,r,o=A5,i=!1,s=!1,a=e,l=0,c=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)A5===o?o=d===43?jZ:lmt:Ln(t,"repeat of a chomping mode identifier");else if((u=pmt(d))>=0)u===0?Ln(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Ln(t,"repeat of an indentation width identifier"):(a=e+u-1,s=!0);else break;if(aC(d)){do d=t.input.charCodeAt(++t.position);while(aC(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Mp(d)&&d!==0)}for(;d!==0;){for(w6(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!s||t.lineIndent<a)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>a&&(a=t.lineIndent),Mp(d)){l++;continue}if(t.lineIndent<a){o===jZ?t.result+=ya.repeat(` 398`,i?1+l:l):o===A5&&i&&(t.result+=` 399`);break}for(r?aC(d)?(c=!0,t.result+=ya.repeat(` 400`,i?1+l:l)):c?(c=!1,t.result+=ya.repeat(` 401`,l+1)):l===0?i&&(t.result+=" "):t.result+=ya.repeat(` 402`,l):t.result+=ya.repeat(` 403`,i?1+l:l),i=!0,s=!0,l=0,n=t.position;!Mp(d)&&d!==0;)d=t.input.charCodeAt(++t.position);_v(t,n,t.position,!1)}return!0}function QZ(t,e){var n,r=t.tag,o=t.anchor,i=[],s,a=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=i),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Ln(t,"tab characters must not be used in indentation")),!(l!==45||(s=t.input.charCodeAt(t.position+1),!du(s))));){if(a=!0,t.position++,Xs(t,!0,-1)&&t.lineIndent<=e){i.push(null),l=t.input.charCodeAt(t.position);continue}if(n=t.line,cx(t,e,ipe,!1,!0),i.push(t.result),Xs(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&l!==0)Ln(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=r,t.anchor=o,t.kind="sequence",t.result=i,!0):!1}function Emt(t,e,n){var r,o,i,s,a,l,c=t.tag,u=t.anchor,d={},h=Object.create(null),f=null,p=null,m=null,y=!1,v=!1,b;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),b=t.input.charCodeAt(t.position);b!==0;){if(!y&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Ln(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),i=t.line,(b===63||b===58)&&du(r))b===63?(y&&(o1(t,d,h,f,p,null,s,a,l),f=p=m=null),v=!0,y=!0,o=!0):y?(y=!1,o=!0):Ln(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=r;else{if(s=t.line,a=t.lineStart,l=t.position,!cx(t,n,ope,!1,!0))break;if(t.line===i){for(b=t.input.charCodeAt(t.position);aC(b);)b=t.input.charCodeAt(++t.position);if(b===58)b=t.input.charCodeAt(++t.position),du(b)||Ln(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(o1(t,d,h,f,p,null,s,a,l),f=p=m=null),v=!0,y=!1,o=!1,f=t.tag,p=t.result;else if(v)Ln(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=u,!0}else if(v)Ln(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=u,!0}if((t.line===i||t.lineIndent>e)&&(y&&(s=t.line,a=t.lineStart,l=t.position),cx(t,e,m2,!0,o)&&(y?p=t.result:m=t.result),y||(o1(t,d,h,f,p,m,s,a,l),f=p=m=null),Xs(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===i||t.lineIndent>e)&&b!==0)Ln(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&o1(t,d,h,f,p,null,s,a,l),v&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=d),v}function xmt(t){var e,n=!1,r=!1,o,i,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&Ln(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(n=!0,s=t.input.charCodeAt(++t.position)):s===33?(r=!0,o="!!",s=t.input.charCodeAt(++t.position)):o="!",e=t.position,n){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(i=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):Ln(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!du(s);)s===33&&(r?Ln(t,"tag suffix cannot contain exclamation marks"):(o=t.input.slice(e-1,t.position+1),spe.test(o)||Ln(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),dmt.test(i)&&Ln(t,"tag suffix cannot contain flow indicator characters")}i&&!ape.test(i)&&Ln(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{Ln(t,"tag name is malformed: "+i)}return n?t.tag=i:qv.call(t.tagMap,o)?t.tag=t.tagMap[o]+i:o==="!"?t.tag="!"+i:o==="!!"?t.tag="tag:yaml.org,2002:"+i:Ln(t,'undeclared tag handle "'+o+'"'),!0}function wmt(t){var e,n;if(n=t.input.charCodeAt(t.position),n!==38)return!1;for(t.anchor!==null&&Ln(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!du(n)&&!r1(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Ln(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Amt(t){var e,n,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!du(r)&&!r1(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Ln(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),qv.call(t.anchorMap,n)||Ln(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],Xs(t,!0,-1),!0}function cx(t,e,n,r,o){var i,s,a,l=1,c=!1,u=!1,d,h,f,p,m,y;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,i=s=a=m2===n||ipe===n,r&&Xs(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;xmt(t)||wmt(t);)Xs(t,!0,-1)?(c=!0,a=i,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;
vendor: 5,361 bytes, lines 403-404
403if(a&&(a=c||o),(l===1||m2===n)&&(g2===n||ope===n?m=e:m=e+1,y=t.position-t.lineStart,l===1?a&&(QZ(t,y)||Emt(t,y,m))||Cmt(t,m)?u=!0:(s&&Smt(t,m)||vmt(t,m)||bmt(t,m)?u=!0:Amt(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&Ln(t,"alias node should not have any properties")):ymt(t,m,g2===n)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=a&&QZ(t,y))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Ln(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,h=t.implicitTypes.length;d<h;d+=1)if(p=t.implicitTypes[d],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(qv.call(t.typeMap[t.kind||"fallback"],t.tag))p=t.typeMap[t.kind||"fallback"][t.tag];else for(p=null,f=t.typeMap.multi[t.kind||"fallback"],d=0,h=f.length;d<h;d+=1)if(t.tag.slice(0,f[d].tag.length)===f[d].tag){p=f[d];break}p||Ln(t,"unknown tag !<"+t.tag+">"),t.result!==null&&p.kind!==t.kind&&Ln(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Ln(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Tmt(t){var e=t.position,n,r,o,i=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Xs(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(i=!0,s=t.input.charCodeAt(++t.position),n=t.position;s!==0&&!du(s);)s=t.input.charCodeAt(++t.position);for(r=t.input.slice(n,t.position),o=[],r.length<1&&Ln(t,"directive name must not be less than one character in length");s!==0;){for(;aC(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Mp(s));break}if(Mp(s))break;for(n=t.position;s!==0&&!du(s);)s=t.input.charCodeAt(++t.position);o.push(t.input.slice(n,t.position))}s!==0&&w6(t),qv.call(XZ,r)?XZ[r](t,r,o):y2(t,'unknown document directive "'+r+'"')}if(Xs(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Xs(t,!0,-1)):i&&Ln(t,"directives end mark is expected"),cx(t,t.lineIndent-1,m2,!1,!0),Xs(t,!0,-1),t.checkLineBreaks&&umt.test(t.input.slice(e,t.position))&&y2(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&cB(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Xs(t,!0,-1));return}if(t.position<t.length-1)Ln(t,"end of the stream or a document separator is expected");else return}function dpe(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=` 404`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var n=new mmt(t,e),r=t.indexOf("\0");for(r!==-1&&(n.position=r,Ln(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Tmt(n);return n.documents}function _mt(t,e,n){e!==null&&typeof e=="object"&&typeof n>"u"&&(n=e,e=null);var r=dpe(t,n);if(typeof e!="function")return r;for(var o=0,i=r.length;o<i;o+=1)e(r[o])}function Imt(t,e){var n=dpe(t,e);if(n.length!==0){if(n.length===1)return n[0];throw new Tc("expected a single document in the stream, but found more")}}var Pmt=_mt,Rmt=Imt,hpe={loadAll:Pmt,load:Rmt},fpe=Object.prototype.toString,ppe=Object.prototype.hasOwnProperty,T6=65279,Omt=9,sP=10,Nmt=13,Mmt=32,Dmt=33,Lmt=34,O4=35,kmt=37,Fmt=38,Bmt=39,$mt=42,gpe=44,Hmt=45,v2=58,Umt=61,zmt=62,Vmt=63,Gmt=64,mpe=91,ype=93,Wmt=96,vpe=123,jmt=124,bpe=125,ac={};ac[0]="\\0";ac[7]="\\a";ac[8]="\\b";ac[9]="\\t";ac[10]="\\n";ac[11]="\\v";ac[12]="\\f";ac[13]="\\r";ac[27]="\\e";ac[34]='\\"';ac[92]="\\\\";ac[133]="\\N";ac[160]="\\_";ac[8232]="\\L";ac[8233]="\\P";var qmt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ymt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Xmt(t,e){var n,r,o,i,s,a,l;if(e===null)return{};for(n={},r=Object.keys(e),o=0,i=r.length;o<i;o+=1)s=r[o],a=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=t.compiledTypeMap.fallback[s],l&&ppe.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function Kmt(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else if(t<=4294967295)n="U",r=8;else throw new Tc("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+ya.repeat("0",r-e.length)+e}var Qmt=1,aP=2;function Zmt(t){this.schema=t.schema||x6,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ya.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Xmt(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?aP:Qmt,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.impl
vendor: 4,416 bytes, lines 404-418
404icitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ZZ(t,e){for(var n=ya.repeat(" ",e),r=0,o=-1,i="",s,a=t.length;r<a;)o=t.indexOf(` 405`,r),o===-1?(s=t.slice(r),r=a):(s=t.slice(r,o+1),r=o+1),s.length&&s!==` 406`&&(i+=n),i+=s;return i}function N4(t,e){return` 407`+ya.repeat(" ",t.indent*e)}function Jmt(t,e){var n,r,o;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(o=t.implicitTypes[n],o.resolve(e))return!0;return!1}function b2(t){return t===Mmt||t===Omt}function lP(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==T6||65536<=t&&t<=1114111}function JZ(t){return lP(t)&&t!==T6&&t!==Nmt&&t!==sP}function eJ(t,e,n){var r=JZ(t),o=r&&!b2(t);return(n?r:r&&t!==gpe&&t!==mpe&&t!==ype&&t!==vpe&&t!==bpe)&&t!==O4&&!(e===v2&&!o)||JZ(e)&&!b2(e)&&t===O4||e===v2&&o}function eyt(t){return lP(t)&&t!==T6&&!b2(t)&&t!==Hmt&&t!==Vmt&&t!==v2&&t!==gpe&&t!==mpe&&t!==ype&&t!==vpe&&t!==bpe&&t!==O4&&t!==Fmt&&t!==$mt&&t!==Dmt&&t!==jmt&&t!==Umt&&t!==zmt&&t!==Bmt&&t!==Lmt&&t!==kmt&&t!==Gmt&&t!==Wmt}function tyt(t){return!b2(t)&&t!==v2}function XT(t,e){var n=t.charCodeAt(e),r;return n>=55296&&n<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function Cpe(t){var e=/^\n* /;return e.test(t)}var Spe=1,M4=2,Epe=3,xpe=4,PE=5;function nyt(t,e,n,r,o,i,s,a){var l,c=0,u=null,d=!1,h=!1,f=r!==-1,p=-1,m=eyt(XT(t,0))&&tyt(XT(t,t.length-1));if(e||s)for(l=0;l<t.length;c>=65536?l+=2:l++){if(c=XT(t,l),!lP(c))return PE;m=m&&eJ(c,u,a),u=c}else{for(l=0;l<t.length;c>=65536?l+=2:l++){if(c=XT(t,l),c===sP)d=!0,f&&(h=h||l-p-1>r&&t[p+1]!==" ",p=l);else if(!lP(c))return PE;m=m&&eJ(c,u,a),u=c}h=h||f&&l-p-1>r&&t[p+1]!==" "}return!d&&!h?m&&!s&&!o(t)?Spe:i===aP?PE:M4:n>9&&Cpe(t)?PE:s?i===aP?PE:M4:h?xpe:Epe}function ryt(t,e,n,r,o){t.dump=function(){if(e.length===0)return t.quotingType===aP?'""':"''";if(!t.noCompatMode&&(qmt.indexOf(e)!==-1||Ymt.test(e)))return t.quotingType===aP?'"'+e+'"':"'"+e+"'";var i=t.indent*Math.max(1,n),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),a=r||t.flowLevel>-1&&n>=t.flowLevel;function l(c){return Jmt(t,c)}switch(nyt(e,a,t.indent,s,l,t.quotingType,t.forceQuotes&&!r,o)){case Spe:return e;case M4:return"'"+e.replace(/'/g,"''")+"'";case Epe:return"|"+tJ(e,t.indent)+nJ(ZZ(e,i));case xpe:return">"+tJ(e,t.indent)+nJ(ZZ(oyt(e,s),i));case PE:return'"'+iyt(e)+'"';default:throw new Tc("impossible error: invalid scalar style")}}()}function tJ(t,e){var n=Cpe(t)?String(e):"",r=t[t.length-1]===` 408`,o=r&&(t[t.length-2]===` 409`||t===` 410`),i=o?"+":r?"":"-";return n+i+` 411`}function nJ(t){return t[t.length-1]===` 412`?t.slice(0,-1):t}function oyt(t,e){for(var n=/(\n+)([^\n]*)/g,r=function(){var c=t.indexOf(` 413`);return c=c!==-1?c:t.length,n.lastIndex=c,rJ(t.slice(0,c),e)}(),o=t[0]===` 414`||t[0]===" ",i,s;s=n.exec(t);){var a=s[1],l=s[2];i=l[0]===" ",r+=a+(!o&&!i&&l!==""?` 415`:"")+rJ(l,e),o=i}return r}function rJ(t,e){if(t===""||t[0]===" ")return t;for(var n=/ [^ ]/g,r,o=0,i,s=0,a=0,l="";r=n.exec(t);)a=r.index,a-o>e&&(i=s>o?s:a,l+=` 416`+t.slice(o,i),o=i+1),s=a;return l+=` 417`,t.length-o>e&&s>o?l+=t.slice(o,s)+` 418`+t.slice(s+1):l+=t.slice(o),l.slice(1)}function iyt(t){for(var e="",n=0,r,o=0;o<t.length;n>=65536?o+=2:o++)n=XT(t,o),r=ac[n],!r&&lP(n)?(e+=t[o],n>=65536&&(e+=t[o+1])):e+=r||Kmt(n);return e}function syt(t,e,n){var r="",o=t.tag,i,s,a;for(i=0,s=n.length;i<s;i+=1)a=n[i],t.replacer&&(a=t.replacer.call(n,String(i),a)),(Sm(t,e,a,!1,!1)||typeof a>"u"&&Sm(t,e,null,!1,!1))&&(r!==""&&(r+=","+(t.condenseFlow?"":" ")),r+=t.dump);t.tag=o,t.dump="["+r+"]"}function oJ(t,e,n,r){var o="",i=t.tag,s,a,l;for(s=0,a=n.length;s<a;s+=1)l=n[s],t.replacer&&(l=t.replacer.call(n,String(s),l)),(Sm(t,e+1,l,!0,!0,!1,!0)||typeof l>"u"&&Sm(t,e+1,null,!0,!0,!1,!0))&&((!r||o!=="")&&(o+=N4(t,e)),t.dump&&sP===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=i,t.dump=o||"[]"}function ayt(t,e,n){var r="",o=t.tag,i=Object.keys(n),s,a,l,c,u;for(s=0,a=i.length;s<a;s+=1)u="",r!==""&&(u+=", "),t.condenseFlow&&(u+='"'),l=i[s],c=n[l],t.replacer&&(c=t.replacer.call(n,l,c)),Sm(t,e,l,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Sm(t,e,c,!1,!1)&&(u+=t.dump,r+=u));t.tag=o,t.dump="{"+r+"}"}function lyt(t,e,n,r){var o="",i=t.tag,s=Object.keys(n),a,l,c,u,d,h;if(t.sortKeys===!0)s.sort();
418else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Tc("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)h="",(!r||o!=="")&&(h+=N4(t,e)),c=s[a],u=n[c],t.replacer&&(u=t.replacer.call(n,c,u)),Sm(t,e+1,c,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&sP===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,d&&(h+=N4(t,e)),Sm(t,e+1,u,!0,d)&&(t.dump&&sP===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,o+=h));t.tag=i,t.dump=o||"{}"}function iJ(t,e,n){var r,o,i,s,a,l;for(o=n?t.explicitTypes:t.implicitTypes,i=0,s=o.length;i<s;i+=1)if(a=o[i],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(n?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,fpe.call(a.represent)==="[object Function]")r=a.represent(e,l);else if(ppe.call(a.represent,l))r=a.represent[l](e,l);else throw new Tc("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=r}return!0}return!1}function Sm(t,e,n,r,o,i,s){t.tag=null,t.dump=n,iJ(t,n,!1)||iJ(t,n,!0);var a=fpe.call(t.dump),l=r,c;r&&(r=t.flowLevel<0||t.flowLevel>e);var u=a==="[object Object]"||a==="[object Array]",d,h;if(u&&(d=t.duplicates.indexOf(n),h=d!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(o=!1),h&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&h&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),a==="[object Object]")r&&Object.keys(t.dump).length!==0?(lyt(t,e,t.dump,o),h&&(t.dump="&ref_"+d+t.dump)):(ayt(t,e,t.dump),h&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object Array]")r&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?oJ(t,e-1,t.dump,o):oJ(t,e,t.dump,o),h&&(t.dump="&ref_"+d+t.dump)):(syt(t,e,t.dump),h&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&ryt(t,t.dump,e,i,l);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Tc("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}function cyt(t,e){var n=[],r=[],o,i;for(D4(t,n,r),o=0,i=r.length;o<i;o+=1)e.duplicates.push(n[r[o]]);e.usedDuplicates=new Array(i)}function D4(t,e,n){var r,o,i;if(t!==null&&typeof t=="object")if(o=e.indexOf(t),o!==-1)n.indexOf(o)===-1&&n.push(o);else if(e.push(t),Array.isArray(t))for(o=0,i=t.length;o<i;o+=1)D4(t[o],e,n);else for(r=Object.keys(t),o=0,i=r.length;o<i;o+=1)D4(t[r[o]],e,n)}function uyt(t,e){e=e||{};var n=new Zmt(e);n.noRefs||cyt(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Sm(n,0,r,!0,!0)?n.dump+` 419`:""}var dyt=uyt,hyt={dump:dyt};function _6(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var fyt=Pl,pyt=$fe,gyt=Vfe,myt=Yfe,yyt=Xfe,vyt=x6,byt=hpe.load,Cyt=hpe.loadAll,Syt=hyt.dump,Eyt=Tc,xyt={binary:epe,float:qfe,map:zfe,null:Gfe,pairs:npe,set:rpe,timestamp:Zfe,bool:Wfe,int:jfe,merge:Jfe,omap:tpe,seq:Ufe,str:Hfe},wyt=_6("safeLoad","load"),Ayt=_6("safeLoadAll","loadAll"),Tyt=_6("safeDump","dump"),_yt={Type:fyt,Schema:pyt,FAILSAFE_SCHEMA:gyt,JSON_SCHEMA:myt,CORE_SCHEMA:yyt,DEFAULT_SCHEMA:vyt,load:byt,loadAll:Cyt,dump:Syt,YAMLException:Eyt,types:xyt,safeLoad:wyt,safeLoadAll:Ayt,safeDump:Tyt};const T5={INCOMPATIBLE_FILE:t=>`${t}: Incompatible file format`,EMPTY_FILE:t=>`${t}: Empty file uploaded`,UNREADABLE_FILE:t=>`${t}: Error reading file. Please check file type (.yaml, .yml, .txt)`},Iyt=({ncnocSystem:t,runSimulation:e,isTrialUser:n,isTopologyInvalid:r,isSimulateProjectLoading:o,configurableTestSequence:i,setConfigurableTestSequence:s,areSimulateRequestsEqualToMaxSimulateCount:a,userGroup:l})=>{const c="New",u="Use Clock Frequencies for Simulation",d=t.isFrequencyValidationEnabled?"":"Clock Frequency Validation must be enabled",h=[{key:$y.QUESTA,value:$y.QUESTA},{key:$y.VCS,value:$y.VCS},{key:$y.XRUN,value:$y.XRUN}],f=bt(Qx),p=f&&l.isUserBranchControlVisible?f:l.rtlBranchId,[m]=g6(),[y,v]=C.useState([...agt]),[b,S]=C.useState(!1),[w,A]=C.useState(null),[_,P]=C.useState(null),[R,O]=C.useState(t.isClockSimulationEnabled),N=C.useRef(null),M=!!w,L=C.useCallback(Q=>{v(se=>se.map(ie=>ie.id===Q.id?Q:ie))},[v]),F=Q=>Q.selected&&Q.numberOfTransactions===0,$=Q=>{const se=y.map(ee=>ee.id===Q.id?Q:ee),oe=!!se.find(ee=>F(ee)),ie=se.every(ee=>!ee.selected);L(Q),S(oe||ie||F(Q))},D=(Q,se)=>{switch(!0){case Q>se:return se;case Q<0:return 0;default:return Q}},k=({file:Q})=>{if(P(null),Q){const se=new FileReader;se.onload=oe=>{const ie=oe.target?.result;if(ie)try{const ee=_yt.load(ie,{json:!0});ee.fileName=Q.name,s(ee)}catch(ee){console.error(ee),P(T5.INCOMPATIBLE_FILE(Q.name)),s(null)}else P(T5.EMPTY_FILE(Q.name)),s(null)},se.onerror=oe=>{console.error("Error reading file:",oe),P(T5.UNREADABLE_FILE(Q.name)),s(null)},Q&&(A(Q.name),se.readAsText(Q))}},U=()=>{A(null),s(null),N.current&&(N.current.value="")},H=async Q=>{const se={...t,isClockSimulationEnabled:Q};await m({requestBody:se})},V=()=>{const Q={testType:"quickTests",tests:[]},oe=y.filter(({selected:ie})=>ie===!0).map(ie=>{const{id:ee,displayName:re,selected:fe,...we}=ie;return{...we}});Q.tests=oe,e(Q,p)},q=C.useMemo(()=>n?"Feature not available for Trial users":r?"Disabled for Invalid Topology":a?"Reached the allowed maximum number of pending or running simulate requests":_?"Invalid test sequence":i?"":"Sequence not included in simulation",[n,r,a,i]),J=C.useMemo(()=>a?"Reached the allowed maximum number of pending or running simulate requests":"",[a]);return C.useEffect(()=>{t.isFrequencyValidationEnabled||(O(!1),H(!1))},[t.isFrequencyValidationEnabled]),K(le,{sx:{p:1},children:[K(gW,{sx:{minWidth:300},size:"small",children:[g(yW,{children:K(ex,{children:[g(no,{align:"center",sx:{width:30},children:"Selected Test"}),g(no,{align:"center",sx:{width:50},children:"Test Name"}),g(no,{align:"center",sx:{width:50},children:"SimRunner"}),g(no,{align:"center",sx:{width:60},children:"Number of Transactions"}),g(no,{align:"center",sx:{width:100},children:"Seed"}),g(no,{align:"center",sx:{width:60},children:"Randomize Seed"}),g(no,{align:"center",sx:{width:60},children:"Dump Waveform"}),g(no,{align:"center",sx:{width:60},children:"Port Monitoring"})]})}),g(mW,{children:y.map(Q=>K(ex,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[g(no,{align:"center",children:g(_u,{checked:Q.selected&&!w,onChange:se=>$({...Q,selected:se.target.checked}),disabled:M,sx:{"& .MuiSvgIcon-root":{color:M?"lightgrey":tt}}})}),g(no,{component:"th",scope:"row",align:"center",children:Q.displayName}),g(no,{align:"center",children:g(xa,{value:Q.simRunner,onChange:se=>L({...Q,simRunner:se.target.value}),disabled:!Q.selected||M,sx:{width:90,height:28},children:h.map(se=>g(mr,{value:se.value,children:se.value},se.key))})}),g(no,{align:"center",children:g(lo,{type:"number",value:Q.numberOfTransactions.toString(),sx:{width:60},disabled:Q.id===P4||!Q.selected||M,onChange:se=>$({...Q,numberOfTransactions:D(Number(se.target.value),kfe)})})}),g(no,{align:"center",children:g(lo,{type:"number",value:Q.svseed.toString(),sx:{width:100},disabled:Q.randomize||!Q.selected||M,onChange:se=>L({...Q,svseed:D(Number(se.target.value),sgt)})})}),g(no,{align:"center",children:g(zb,{checked:Q.randomize,disabled:!Q.selected||M,onChange:se=>L({...Q,randomize:se.target.checked}),sx:{"& .MuiSwitch-switchBase.Mui-checked":{color:tt},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:tt}}})}),g(no,{align:"center",children:g(zb,{checked:Q.dumpWaveForm,disabled:!Q.selected||M,onChange:se=>L({...Q,dumpWaveForm:se.target.checked}),sx:{"& .MuiSwitch-switchBase.Mui-checked":{color:tt},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:tt}}})}),g(no,{align:"center",children:g(zb,{checked:Q.enablePortMonitors,disabled:!Q.selected||M,onChange:se=>L({...Q,enablePortMonitors:se.target.checked}),sx:{"& .MuiSwitch-switchBase.Mui-checked":{color:tt},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:tt}}})})]},Q.id))})]}),K(le,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mx:"16px",mt:"16px"},children:[g(rn,{title:d,placement:"bottom",children:K(le,{sx:{display:"flex",alignItems:"center"},children:[g(Ke,{fontSize:12,children:u}),g(zb,{checked:R,disabled:!t.isFrequencyValidationEnabled,onChange:Q=>{O(Q.target.checked),H(Q.target.checked)},sx:{"& .MuiSwitch-switchBase.Mui-checked":{color:tt},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:tt}}})]})}),K(le,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:[l.type===mm.INTERNAL||l.type===mm.ADMIN?g(S6,{projectType:pr.NCNOC}):null,g(rn,{title:J,placement:"bottom",children:K(Sn,{component:"label",variant:"contained",color:w&&!_?"success":"primary",sx:{mx:"8px",maxWidth:"210px",minWidth:"210px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.8}},disabled:a||o,startIcon:g(T6e,{}),endIcon:w&&g(Di,{title:"Remove Test Sequence",sx:{p:"0px",backgroundColor:"white","&:focus":{backgroundColor:"darkred"},"&:hover":{backgroundColor:"darkred"}},onClick:Q=>{Q.preventDefault(),P(null),U()},children:g(dR,{color:"error"})}),children:[g(Ke,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"},children:w??"Upload Custom Sequence"}
419),g("input",{type:"file",accept:".yaml,.yml,.txt",onChange:Q=>k({file:Tt.head(Q.target.files)}),hidden:!0,ref:N})]})}),g(rn,{title:q,placement:"bottom",children:g(Sn,{variant:"contained",sx:{mx:"8px",width:100,backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.8}},onClick:V,disabled:n||r||a||o||b||!!_,children:c})})]})]}),_&&g(rBe,{severity:"error",onClose:()=>{P(null),U()},sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"796px",backgroundColor:"darkRed"},children:g(Ke,{sx:{fontSize:"12px",color:"white"},children:_})})]})},Pyt=({project:t,ncnocSystem:e,tasks:n,configurableTestSequence:r,setConfigurableTestSequence:o,handleDownloadTaskResult:i,handleDeleteTaskResult:s,isTopologyInvalid:a,userGroup:l,maxSimulateCount:c,userId:u})=>{const[d,{isLoading:h}]=$7e(),f=C.useMemo(()=>n.filter(y=>{if(t.type===pr.NCNOC)return y.description===go.SIMULATE_NCNOC}),[n]),p=C.useMemo(()=>f.filter(y=>y.status===fo.PENDING||y.status===fo.RUNNING),[f]);return K(le,{children:[g(Iyt,{ncnocSystem:e,runSimulation:async(y,v)=>{const b={projectId:t.id,userId:u,rtlBranchId:v,params:y};await d(b)},isTrialUser:!l.canSimulate,isTopologyInvalid:a,isSimulateProjectLoading:h,configurableTestSequence:r,setConfigurableTestSequence:o,areSimulateRequestsEqualToMaxSimulateCount:p.length===c,userGroup:l}),g(C6,{tasks:f,downloadTaskHistoryHandler:(y,v)=>{i({event:y,taskId:v.id})},deleteTaskHistoryHandler:(y,v)=>{s({event:y,taskId:v.id,name:v.description})},isDownloadTaskResultEnabled:l.canDownloadRTL})]})};var tf=(t=>(t.ENCRYPTED="encrypted",t.OBFUSCATED="obfuscated",t.CLEAN="clean",t))(tf||{});const Ryt=({canExport:t,isPackageTypeEncrypted:e,isPackageTypeObfuscated:n,isPackageTypeClean:r,exportAuthLevel:o,onExportPackageButtonClick:i,handlePackageTypeChange:s,exportButtonTooltipMessage:a,isTopologyInvalid:l,areExportRequestsEqualToMaxExportCount:c,hasAtLeastOnePackageTypeSelected:u,isUploadToFtp:d,isGroupFtpCredentialExisting:h,userGroup:f,projectType:p})=>{const m="Encrypted",y="Obfuscated",v="Clean",b=`Export Package${d?" to FTP":""}`,S=C.useMemo(()=>o===xv.ENCRYPTED_AND_OBFUSCATED||o===xv.ALL,[o]),w=[{packageType:tf.ENCRYPTED,isExportTypeChecked:e,label:m,isVisible:S},{packageType:tf.OBFUSCATED,isExportTypeChecked:n,label:y,isVisible:S},{packageType:tf.CLEAN,isExportTypeChecked:r,label:v,isVisible:o===xv.ALL}];return K(le,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:2,children:[g(le,{children:w.map(A=>A.isVisible?g(ec,{control:g(_u,{checked:A.isExportTypeChecked,disabled:!t,onChange:_=>s({packageType:A.packageType,value:_.target.checked}),sx:{height:"30px","&.Mui-checked":{color:tt},"&.Mui-disabled":{color:Ef}}}),label:A.label},`package-type-${A.label}`):null)}),K(le,{sx:{display:"flex",flexDirection:"row",gap:1,width:"auto",alignItems:"center"},children:[f.type===mm.INTERNAL||f.type===mm.ADMIN?g(S6,{projectType:p}):null,g(rn,{title:a,placement:"right",children:g(Sn,{variant:"contained",sx:{height:"30px",minWidth:"140px",whiteSpace:"nowrap",flexShrink:0,backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.8}},disabled:!t||l||c||!u||!h&&d,onClick:()=>i(),startIcon:d?g(Hce,{}):null,children:b})})]})]})};var wpe=(t=>(t.QUESTA="questa",t.VCS="vcs",t.XCELIUM="xcelium",t))(wpe||{});const Oyt=({projectId:t,tasks:e,projectType:n,handleDownloadTaskResult:r,handleDeleteTaskResult:o,isTopologyInvalid:i,userGroup:s,exportAuthLevel:a,maxExportCount:l,userId:c})=>{const u="Feature not available for trial users",d="Disabled for invalid topology",h="Exceeded the allowed maximum number of pending or running export requests",f="There should be at least one package type selected",p="No FTP Credentials available",m=bt(Qx),y=m&&s.isUserBranchControlVisible?m:s.rtlBranchId,[v]=H7e(),[b,S]=C.useState(!0),[w,A]=C.useState(!0),[_,P]=C.useState(!1),R=ffe.getByGroupId(s.id),O=n===pr.CNOC?go.EXPORT_CNOC:go.EXPORT_NCNOC,N=C.useMemo(()=>e.filter(H=>H.description===O),[e]),M=C.useMemo(()=>N.filter(H=>H.status===fo.PENDING||H.status===fo.RUNNING),[N]),L=C.useMemo(()=>M.length===l,[M,l]),F=C.useMemo(()=>b||w||_,[b,w,_]),$=()=>{const H=[],V=a===xv.ENCRYPTED;(b||V)&&H.push(tf.ENCRYPTED),w&&!V&&H.push(tf.OBFUSCATED),_&&H.push(tf.CLEAN);const q=H.includes(tf.ENCRYPTED);return{packageTypes:H,...q?{encryptionTool:wpe.QUESTA}:{}}},D=async()=>{const H=$();await v({projectId:t,userId:c,rtlBranchId:y,params:H})},k=()=>s.canExport?i?d:L?h:F?!R&&s.isUploadToFtp?p:"":f:u,U=({packageType:H,value:V}
419)=>{switch(H){case tf.ENCRYPTED:S(V);break;case tf.OBFUSCATED:A(V);break;case tf.CLEAN:P(V);break}};return K(le,{children:[g(Ryt,{canExport:s.canExport,isPackageTypeEncrypted:b,isPackageTypeObfuscated:w,isPackageTypeClean:_,exportAuthLevel:a,onExportPackageButtonClick:D,handlePackageTypeChange:U,exportButtonTooltipMessage:k(),isTopologyInvalid:i,areExportRequestsEqualToMaxExportCount:L,hasAtLeastOnePackageTypeSelected:F,isUploadToFtp:s.isUploadToFtp,isGroupFtpCredentialExisting:!!R,userGroup:s,projectType:n}),g(C6,{tasks:N,downloadTaskHistoryHandler:(H,V)=>{ru.getIsDownloadTaskResultButtonDisabled(V.status)||r({event:H,taskId:V.id})},deleteTaskHistoryHandler:(H,V)=>{o({event:H,taskId:V.id,name:V.description})},isDownloadTaskResultEnabled:s.canDownloadRTL,isUploadToFtp:s.isUploadToFtp})]})},Ape=({project:t,tasks:e,user:n,userGroup:r,tasksMenuAnchorEl:o,activeTaskType:i,setTasksMenuAnchorEl:s,handleDownloadTaskResult:a,isTopologyInvalid:l,exportAuthLevel:c,ncnocSystem:u,configurableTestSequence:d,setConfigurableTestSequence:h})=>{const f=Yn(),p=v=>{switch(v){case go.EXPORT_NCNOC:return"Export(NC-NoC)";case go.EXPORT_CNOC:return"Export(C-NoC)";case go.GENERATE_NCNOC:return"Generate RTL(NC-NoC)";case go.GENERATE_CNOC:return"Generate RTL(C-NoC)";default:return v}},m=({event:v,taskId:b,name:S})=>{v.stopPropagation();const w=p(S);f(Im({type:Kt.deleteConfirm.tasks,deleteElementId:b,anchorElId:v.currentTarget.id,name:w,projectId:t.id}))};return K(Es,{id:"project-tasks-menu",MenuListProps:{"aria-labelledby":"tasks-menu"},sx:{"& .MuiMenu-paper":{p:0,width:"700"},"& .MuiList-root":{p:0}},anchorEl:o,open:!!o,onClose:()=>{s(null)},children:[i===go.GENERATE_NCNOC||i===go.GENERATE_CNOC?g(rgt,{projectId:t.id,projectType:t.type,tasks:e,handleDownloadTaskResult:a,handleDeleteTaskResult:m,isTopologyInvalid:l,userGroup:r,maxGenerateCount:n.maxGenerateCount,userId:n.id}):null,i===go.SIMULATE_NCNOC&&u&&h?g(Pyt,{project:t,ncnocSystem:u,tasks:e,configurableTestSequence:d,setConfigurableTestSequence:h,handleDownloadTaskResult:a,handleDeleteTaskResult:m,isTopologyInvalid:l,userGroup:r,maxSimulateCount:n.maxSimulateCount,userId:n.id}):null,i===go.EXPORT_NCNOC||i===go.EXPORT_CNOC?g(Oyt,{projectId:t.id,projectType:t.type,tasks:e,handleDownloadTaskResult:a,handleDeleteTaskResult:m,isTopologyInvalid:l,userGroup:r,exportAuthLevel:c,maxExportCount:n.maxExportCount,userId:n.id}):null]})},Nyt={[Qg.LEF]:{[N3.CELL]:[],[N3.TECH]:[]},[Qg.LIB]:{[GM.SLOW]:[],[GM.TYPICAL]:[],[GM.FAST]:[]},[Qg.RLC]:{[WM.SLOW]:[],[WM.TYPICAL]:[],[WM.FAST]:[]},[Qg.DEF]:{[Lse.OPTIONAL]:[]}},Myt=[tC.SIEMENS,tC.SYNOPSYS,tC.CADENCE],Dyt="Tool",Lyt="Use Custom PD Files",kyt="Use Custom Floor Plan",Fyt="Request Implementation",Byt="Upload file",$yt=({handleDeletePDFile:t,pdFileFormat:e,pdFileType:n,file:r,index:o})=>g(le,{sx:{mt:1,mb:2},children:g(m0,{label:r?.name,variant:"filled",color:"success",onDelete:()=>t({pdFileFormat:e,pdFileType:n,index:o}),sx:{width:"240px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})}),Hyt=({physicalDesignFilesToTypeMapping:t,handlePDFileUpload:e,handleDeletePDFile:n,pdFileFormat:r,pdFileType:o})=>{const i=Su[wa.cloudUploadIcon];return K(le,{sx:{display:"flex",justifyContent:"start",my:2.5,mx:4.5},children:[g(le,{sx:{my:2,width:"160px"},children:g(Ke,{children:Tt.upperFirst(o)})}),K(le,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",width:"240px"},children:[t[r][o].map((s,a)=>s?g($yt,{handleDeletePDFile:n,pdFileFormat:r,pdFileType:o,file:s,index:a},a):null),K(Sn,{component:"label",variant:"outlined",color:"primary",startIcon:g(i,{}),sx:{width:"240px",my:1,py:2,px:4},children:[Byt,g("input",{type:"file",id:o,onChange:s=>e({file:Tt.head(s.target.files),pdFileFormat:r,pdFileType:o}),hidden:!0})]})]})]},o)},sJ=({physicalDesignFilesToTypeMapping:t,handlePDFileUpload:e,handleDeletePDFile:n,pdFileFormat:r,selectedTool:o})=>(o===tC.SYNOPSYS||o===tC.CADENCE)&&r===Qg.RLC?null:K(le,{sx:{m:2,border:"1px solid lightGrey"},children:[g(le,{sx:{background:"white",px:1,float:"left",my:-1.25,mx:1},children:g(Ke,{fontWeight:600,children:r.toUpperCase()})}),Object.keys(t[r]).map(s=>
vendor: 29,120 bytes, line 419
419g(Hyt,{physicalDesignFilesToTypeMapping:t,handlePDFileUpload:e,handleDeletePDFile:n,pdFileFormat:r,pdFileType:s},s))]}),Uyt=({implementMenuAnchorEl:t,setImplementMenuAnchorEl:e})=>{const[n,r]=C.useState(!1),[o,i]=C.useState(!1),[s,a]=C.useState(tC.SIEMENS),[l,c]=C.useState(Nyt),u=C.useReducer(m=>m+1,0)[1],d=()=>e(null),h=m=>{a(m)},f=({file:m,pdFileFormat:y,pdFileType:v})=>{l[y][v].some(S=>S.name===m.name)||(l[y][v]=[...l[y][v],m],c(l),u())},p=({pdFileFormat:m,pdFileType:y,index:v})=>{l[m][y].splice(v,1),c(l),u()};return g(Es,{open:!!t,anchorEl:t,onClose:d,children:K(le,{sx:{width:"480px"},children:[K(le,{sx:{display:"flex",justifyContent:"space-between",mx:2,mb:.5,mt:1.5},children:[g(le,{sx:{my:"auto"},children:g(Ke,{children:Dyt})}),g(xa,{value:s,onChange:m=>h(m.target.value),sx:{width:200,height:32,ml:1.5},children:Myt.map(m=>g(mr,{value:m,children:Tt.upperFirst(m)},m))})]}),g(le,{children:g(h4,{label:Lyt,controlType:d4.switch,controlValue:n,onChangeHandler:m=>{r(m.value)}})}),g(le,{sx:{mb:2},children:g(h4,{label:kyt,controlType:d4.switch,controlValue:o,onChangeHandler:m=>{i(m.value)}})}),n?g(le,{children:Object.keys(l).map(m=>m===Qg.DEF?null:g(sJ,{physicalDesignFilesToTypeMapping:l,handlePDFileUpload:f,handleDeletePDFile:p,pdFileFormat:m,selectedTool:s},m))}):null,o?g(sJ,{physicalDesignFilesToTypeMapping:l,handlePDFileUpload:f,handleDeletePDFile:p,pdFileFormat:Qg.DEF,selectedTool:s},Qg.DEF):null,g(le,{sx:{float:"right",mt:1,pb:3,mx:2},children:g(Sn,{variant:"contained",onClick:m=>m,disabled:!0,sx:{my:"auto",py:2,px:4},children:Fyt})})]})})};var I6={},zyt=hr;Object.defineProperty(I6,"__esModule",{value:!0});var L4=I6.default=void 0,Vyt=zyt(yr()),Gyt=vr;L4=I6.default=(0,Vyt.default)((0,Gyt.jsx)("path",{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"}),"FileUpload");/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Wyt=4,aJ=0,lJ=1,jyt=2;function xw(t){let e=t.length;for(;--e>=0;)t[e]=0}const qyt=0,Tpe=1,Yyt=2,Xyt=3,Kyt=258,P6=29,RR=256,cP=RR+1+P6,w1=30,R6=19,_pe=2*cP+1,Wb=15,_5=16,Qyt=7,O6=256,Ipe=16,Ppe=17,Rpe=18,k4=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),hD=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Zyt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ope=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Jyt=512,Ug=new Array((cP+2)*2);xw(Ug);const H_=new Array(w1*2);xw(H_);const uP=new Array(Jyt);xw(uP);const dP=new Array(Kyt-Xyt+1);xw(dP);const N6=new Array(P6);xw(N6);const C2=new Array(w1);xw(C2);function I5(t,e,n,r,o){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=t&&t.length}let Npe,Mpe,Dpe;function P5(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}const Lpe=t=>t<256?uP[t]:uP[256+(t>>>7)],hP=(t,e)=>{t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255},hu=(t,e,n)=>{t.bi_valid>_5-n?(t.bi_buf|=e<<t.bi_valid&65535,hP(t,t.bi_buf),t.bi_buf=e>>_5-t.bi_valid,t.bi_valid+=n-_5):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},xp=(t,e,n)=>{hu(t,n[e*2],n[e*2+1])},kpe=(t,e)=>{let n=0;do n|=t&1,t>>>=1,n<<=1;while(--e>0);return n>>>1},evt=t=>{t.bi_valid===16?(hP(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},tvt=(t,e)=>{const n=e.dyn_tree,r=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,u,d,h,f,p,m=0;for(h=0;h<=Wb;h++)t.bl_count[h]=0;for(n[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;c<_pe;c++)u=t.heap[c],h=n[n[u*2+1]*2+1]+1,h>l&&(h=l,m++),n[u*2+1]=h,!(u>r)&&(t.bl_count[h]++,f=0,u>=a&&(f=s[u-a]),p=n[u*2],t.opt_len+=p*(h+f),i&&(t.static_len+=p*(o[u*2+1]+f)));if(m!==0){do{for(h=l-1;t.bl_count[h]===0;)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(h=l;h!==0;h--)for(u=t.bl_count[h];u!==0;)d=t.heap[--c],!(d>r)&&(n[d*2+1]!==h&&(t.opt_len+=(h-n[d*2+1])*n[d*2],n[d*2+1]=h),u--)}},Fpe=(t,e,n)=>{const r=new Array(Wb+1);let o=0,i,s;for(i=1;i<=Wb;i++)o=o+n[i-1]<<1,r[i]=o;for(s=0;s<=e;s++){let a=t[s*2+1];a!==0&&(t[s*2]=kpe(r[a]++,a))}},nvt=()=>{let t,e,n,r,o;const i=new Array(Wb+1);for(n=0,r=0;r<P6-1;r++)for(N6[r]=n,t=0;t<1<<k4[r];t++)dP[n++]=r;for(dP[n-1]=r,o=0,r=0;r<16;r++)for(C2[r]=o,t=0;t<1<<hD[r];t++)uP[o++]=r;for(o>>=7;r<w1;r++)for(C2[r]=o<<7,t=0;t<1<<hD[r]-7;t++)uP[256+o++]=r;for(e=0;e<=Wb;e++)i[e]=0;for(t=0;t<=143;)Ug[t*2+1]=8,t++,i[8]++;for(;t<=255;)Ug[t*2+1]=9,t++,i[9]++;for(;t<=279;)Ug[t*2+1]=7,t++,i[7]++;for(;t<=287;)Ug[t*2+1]=8,t++,i[8]++;for(Fpe(Ug,cP+1,i),t=0;t<w1;t++)H_[t*2+1]=5,H_[t*2]=kpe(t,5);Npe=new I5(Ug,k4,RR+1,cP,Wb),Mpe=new I5(H_,hD,0,w1,Wb),Dpe=new I5(new Array(0),Zyt,0,R6,Qyt)},Bpe=t=>{let e;for(e=0;e<cP;e++)t.dyn_ltree[e*2]=0;for(e=0;e<w1;e++)t.dyn_dtree[e*2]=0;for(e=0;e<R6;e++)t.bl_tree[e*2]=0;t.dyn_ltree[O6*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},$pe=t=>{t.bi_valid>8?hP(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},cJ=(t,e,n,r)=>{const o=e*2,i=n*2;return t[o]<t[i]||t[o]===t[i]&&r[e]<=r[n]},R5=(t,e,n)=>{const r=t.heap[n];let o=n<<1;for(;o<=t.heap_len&&(o<t.heap_len&&cJ(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!cJ(e,r,t.heap[o],t.depth));)t.heap[n]=t.heap[o],n=o,o<<=1;t.heap[n]=r},uJ=(t,e,n)=>{let r,o,i=0,s,a;if(t.sym_next!==0)do r=t.pending_buf[t.sym_buf+i++]&255,r+=(t.pending_buf[t.sym_buf+i++]&255)<<8,o=t.pending_buf[t.sym_buf+i++],r===0?xp(t,o,e):(s=dP[o],xp(t,s+RR+1,e),a=k4[s],a!==0&&(o-=N6[s],hu(t,o,a)),r--,s=Lpe(r),xp(t,s,n),a=hD[s],a!==0&&(r-=C2[s],hu(t,r,a)));while(i<t.sym_next);xp(t,O6,e)},F4=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let s,a,l=-1,c;for(t.heap_len=0,t.heap_max=_pe,s=0;s<i;s++)n[s*2]!==0?(t.heap[++t.heap_len]=l=s,t.depth[s]=0):n[s*2+1]=0;for(;t.heap_len<2;)c=t.heap[++t.heap_len]=l<2?++l:0,n[c*2]=1,t.depth[c]=0,t.opt_len--,o&&(t.static_len-=r[c*2+1]);for(e.max_code=l,s=t.heap_len>>1;s>=1;s--)R5(t,n,s);c=i;do s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R5(t,n,1),a=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=a,n[c*2]=n[s*2]+n[a*2],t.depth[c]=(t.depth[s]>=t.depth[a]?t.depth[s]:t.depth[a])+1,n[s*2+1]=n[a*2+1]=c,t.heap[1]=c++,R5(t,n,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],tvt(t,e),Fpe(n,l,t.bl_count)},dJ=(t,e,n)=>{let r,o=-1,i,s=e[0*2+1],a=0,l=7,c=4;for(s===0&&(l=138,c=3),e[(n+1)*2+1]=65535,r=0;r<=n;r++)i=s,s=e[(r+1)*2+1],!(++a<l&&i===s)&&(a<c?t.bl_tree[i*2]+=a:i!==0?(i!==o&&t.bl_tree[i*2]++,t.bl_tree[Ipe*2]++):a<=10?t.bl_tree[Ppe*2]++:t.bl_tree[Rpe*2]++,a=0,o=i,s===0?(l=138,c=3):i===s?(l=6,c=3):(l=7,c=4))},hJ=(t,e,n)=>{let r,o=-1,i,s=e[0*2+1],a=0,l=7,c=4;for(s===0&&(l=138,c=3),r=0;r<=n;r++)if(i=s,s=e[(r+1)*2+1],!(++a<l&&i===s)){if(a<c)do xp(t,i,t.bl_tree);while(--a!==0);else i!==0?(i!==o&&(xp(t,i,t.bl_tree),a--),xp(t,Ipe,t.bl_tree),hu(t,a-3,2)):a<=10?(xp(t,Ppe,t.bl_tree),hu(t,a-3,3)):(xp(t,Rpe,t.bl_tree),hu(t,a-11,7));a=0,o=i,s===0?(l=138,c=3):i===s?(l=6,c=3):(l=7,c=4)}},rvt=t=>{let e;for(dJ(t,t.dyn_ltree,t.l_desc.max_code),dJ(t,t.dyn_dtree,t.d_desc.max_code),F4(t,t.bl_desc),e=R6-1;e>=3&&t.bl_tree[Ope[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e},ovt=(t,e,n,r)=>{let o;for(hu(t,e-257,5),hu(t,n-1,5),hu(t,r-4,4),o=0;o<r;o++)hu(t,t.bl_tree[Ope[o]*2+1],3);hJ(t,t.dyn_ltree,e-1),hJ(t,t.dyn_dtree,n-1)},ivt=t=>{let e=4093624447,n;for(n=0;n<=31;n++,e>>>=1)if(e&1&&t.dyn_ltree[n*2]!==0)return aJ;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return lJ;for(n=32;n<RR;n++)if(t.dyn_ltree[n*2]!==0)return lJ;return aJ};let fJ=!1;const svt=t=>{fJ||(nvt(),fJ=!0),t.l_desc=new P5(t.dyn_ltree,Npe),t.d_desc=new P5(t.dyn_dtree,Mpe),t.bl_desc=new P5(t.bl_tree,Dpe),t.bi_buf=0,t.bi_valid=0,Bpe(t)},Hpe=(t,e,n,r)=>{hu(t,(qyt<<1)+(r?1:0),3),$pe(t),hP(t,n),hP(t,~n),n&&t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n},avt=t=>{hu(t,Tpe<<1,3),xp(t,O6,Ug),evt(t)},lvt=(t,e,n,r)=>{let o,i,s=0;t.level>0?(t.strm.data_type===jyt&&(t.strm.data_type=ivt(t)),F4(t,t.l_desc),F4(t,t.d_desc),s=rvt(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=n+5,n+4<=o&&e!==-1?Hpe(t,e,n,r):t.strategy===Wyt||i===o?(hu(t,(Tpe<<1)+(r?1:0),3),uJ(t,Ug,H_)):(hu(t,(Yyt<<1)+(r?1:0),3),ovt(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),uJ(t,t.dyn_ltree,t.dyn_dtree)),Bpe(t),r&&$pe(t)},cvt=(t,e,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,e===0?t.dyn_ltree[n*2]++:(t.matches++,e--,t.dyn_ltree[(dP[n]+RR+1)*2]++,t.dyn_dtree[Lpe(e)*2]++),t.sym_next===t.sym_end);var uvt=svt,dvt=Hpe,hvt=lvt,fvt=cvt,pvt=avt,gvt={_tr_init:uvt,_tr_stored_block:dvt,_tr_flush_block:hvt,_tr_tally:fvt,_tr_align:pvt};const mvt=(t,e,n,r)=>{let o=t&65535|0,i=t>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do o=o+e[r++]|0,i=i+o|0;while(--s);o%=65521,i%=65521}return o|i<<16|0};var fP=mvt;const yvt=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e},vvt=new Uint32Array(yvt()),bvt=(t,e,n,r)=>{const o=vvt,i=r+n;t^=-1;for(let s=r;s<i;s++)t=t>>>8^o[(t^e[s])&255];return t^-1};var Va=bvt,ux={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},OR={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Cvt,_tr_stored_block:B4,_tr_flush_block:Svt,_tr_tally:Iv,_tr_align:Evt}=gvt,{Z_NO_FLUSH:Pv,Z_PARTIAL_FLUSH:xvt,Z_FULL_FLUSH:wvt,Z_FINISH:ah,Z_BLOCK:pJ,Z_OK:gl,Z_STREAM_END:gJ,Z_STREAM_ERROR:Dp,Z_DATA_ERROR:Avt,Z_BUF_ERROR:O5,Z_DEFAULT_COMPRESSION:Tvt,Z_FILTERED:_vt,Z_HUFFMAN_ONLY:GN,Z_RLE:Ivt,Z_FIXED:Pvt,Z_DEFAULT_STRATEGY:Rvt,Z_UNKNOWN:Ovt,Z_DEFLATED:uB}=OR,Nvt=9,Mvt=15,Dvt=8,Lvt=29,kvt=256,$4=kvt+1+Lvt,Fvt=30,Bvt=19,$vt=2*$4+1,Hvt=15,jr=3,sv=258,Lp=sv+jr+1,Uvt=32,dx=42,M6=57,H4=69,U4=73,z4=91,V4=103,jb=113,KT=666,Pc=1,ww=2,kC=3,Aw=4,zvt=3,qb=(t,e)=>(t.msg=ux[e],e),mJ=t=>t*2-(t>4?9:0),qy=t=>{let e=t.length;for(;--e>=0;)t[e]=0},Vvt=t=>{let e,n,r,o=t.w_size;e=t.hash_size,r=e;do n=t.head[--r],t.head[r]=n>=o?n-o:0;while(--e);e=o,r=e;do n=t.prev[--r],t.prev[r]=n>=o?n-o:0;while(--e)};let Gvt=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask,Rv=Gvt;const Vu=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))},Ju=(t,e)=>{Svt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Vu(t.strm)},mo=(t,e)=>{t.pending_buf[t.pending++]=e},bT=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255},G4=(t,e,n,r)=>{let o=t.avail_in;return o>r&&(o=r),o===0?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),n),t.state.wrap===1?t.adler=fP(t.adler,e,o,n):t.state.wrap===2&&(t.adler=Va(t.adler,e,o,n)),t.next_in+=o,t.total_in+=o,o)},Upe=(t,e)=>{let n=t.max_chain_length,r=t.strstart,o,i,s=t.prev_length,a=t.nice_match;const l=t.strstart>t.w_size-Lp?t.strstart-(t.w_size-Lp):0,c=t.window,u=t.w_mask,d=t.prev,h=t.strstart+sv;let f=c[r+s-1],p=c[r+s];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do if(o=e,!(c[o+s]!==p||c[o+s-1]!==f||c[o]!==c[r]||c[++o]!==c[r+1])){r+=2,o++;do;while(c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&r<h);if(i=sv-(h-r),r=h-sv,i>s){if(t.match_start=e,s=i,i>=a)break;f=c[r+s-1],p=c[r+s]}}while((e=d[e&u])>l&&--n!==0);return s<=t.lookahead?s:t.lookahead},hx=t=>{const e=t.w_size;let n,r,o;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-Lp)&&(t.window.set(t.window.subarray(e,e+e-r),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),Vvt(t),r+=e),t.strm.avail_in===0)break;if(n=G4(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=n,t.lookahead+t.insert>=jr)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=Rv(t,t.ins_h,t.window[o+1]);t.insert&&(t.ins_h=Rv(t,t.ins_h,t.window[o+jr-1]),t.prev[o&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=o,o++,t.insert--,!(t.lookahead+t.insert<jr)););}while(t.lookahead<Lp&&t.strm.avail_in!==0)},zpe=(t,e)=>{let n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r,o,i,s=0,a=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i||(i=t.strm.avail_out-i,o=t.strstart-t.block_start,r>o+t.strm.avail_in&&(r=o+t.strm.avail_in),r>i&&(r=i),r<n&&(r===0&&e!==ah||e===Pv||r!==o+t.strm.avail_in)))break;s=e===ah&&r===o+t.strm.avail_in?1:0,B4(t,0,0,s),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,Vu(t.strm),o&&(o>r&&(o=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+o),t.strm.next_out),t.strm.next_out+=o,t.strm.avail_out-=o,t.strm.total_out+=o,t.block_start+=o,r-=o),r&&(G4(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(s===0);return a-=t.strm.avail_in,a&&(a>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=a&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-a,t.strm.next_in),t.strstart),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?Aw:e!==Pv&&e!==ah&&t.strm.avail_in===0&&t.strstart===t.block_start?ww:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(G4(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,n=i>t.w_size?t.w_size:i,o=t.strstart-t.block_start,(o>=n||(o||e===ah)&&e!==Pv&&t.strm.avail_in===0&&o<=i)&&(r=o>i?i:o,s=e===ah&&t.strm.avail_in===0&&r===o?1:0,B4(t,t.block_start,r,s),t.block_start+=r,Vu(t.strm)),s?kC:Pc)},N5=(t,e)=>{let n,r;for(;;){if(t.lookahead<Lp){if(hx(t),t.lookahead<Lp&&e===Pv)return Pc;if(t.lookahead===0)break}if(n=0,t.lookahead>=jr&&(t.ins_h=Rv(t,t.ins_h,t.window[t.strstart+jr-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),n!==0&&t.strstart-n<=t.w_size-Lp&&(t.match_length=Upe(t,n)),t.match_length>=jr)if(r=Iv(t,t.strstart-t.match_start,t.match_length-jr),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=jr){t.match_length--;do t.strstart++,t.ins_h=Rv(t,t.ins_h,t.window[t.strstart+jr-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Rv(t,t.ins_h,t.window[t.strstart+1]);else r=Iv(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(Ju(t,!1),t.strm.avail_out===0))return Pc}return t.insert=t.strstart<jr-1?t.strstart:jr-1,e===ah?(Ju(t,!0),t.strm.avail_out===0?kC:Aw):t.sym_next&&(Ju(t,!1),t.strm.avail_out===0)?Pc:ww},vE=(t,e)=>{let n,r,o;for(;;){if(t.lookahead<Lp){if(hx(t),t.lookahead<Lp&&e===Pv)return Pc;if(t.lookahead===0)break}if(n=0,t.lookahead>=jr&&(t.ins_h=Rv(t,t.ins_h,t.window[t.strstart+jr-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=jr-1,n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-Lp&&(t.match_length=Upe(t,n),t.match_length<=5&&(t.strategy===_vt||t.match_length===jr&&t.strstart-t.match_start>4096)&&(t.match_length=jr-1)),t.prev_length>=jr&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-jr,r=Iv(t,t.strstart-1-t.prev_match,t.prev_length-jr),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=o&&(t.ins_h=Rv(t,t.ins_h,t.window[t.strstart+jr-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=jr-1,t.strstart++,r&&(Ju(t,!1),t.strm.avail_out===0))return Pc}else if(t.match_available){if(r=Iv(t,0,t.window[t.strstart-1]),r&&Ju(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Pc}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=Iv(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<jr-1?t.strstart:jr-1,e===ah?(Ju(t,!0),t.strm.avail_out===0?kC:Aw):t.sym_next&&(Ju(t,!1),t.strm.avail_out===0)?Pc:ww},Wvt=(t,e)=>{let n,r,o,i;const s=t.window;for(;;){if(t.lookahead<=sv){if(hx(t),t.lookahead<=sv&&e===Pv)return Pc;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=jr&&t.strstart>0&&(o=t.strstart-1,r=s[o],r===s[++o]&&r===s[++o]&&r===s[++o])){i=t.strstart+sv;do;while(r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&o<i);t.match_length=sv-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=jr?(n=Iv(t,1,t.match_length-jr),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=Iv(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(Ju(t,!1),t.strm.avail_out===0))return Pc}return t.insert=0,e===ah?(Ju(t,!0),t.strm.avail_out===0?kC:Aw):t.sym_next&&(Ju(t,!1),t.strm.avail_out===0)?Pc:ww},jvt=(t,e)=>{let n;for(;;){if(t.lookahead===0&&(hx(t),t.lookahead===0)){if(e===Pv)return Pc;break}if(t.match_length=0,n=Iv(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(Ju(t,!1),t.strm.avail_out===0))return Pc}return t.insert=0,e===ah?(Ju(t,!0),t.strm.avail_out===0?kC:Aw):t.sym_next&&(Ju(t,!1),t.strm.avail_out===0)?Pc:ww};function rp(t,e,n,r,o){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=o}const QT=[new rp(0,0,0,0,zpe),new rp(4,4,8,4,N5),new rp(4,5,16,8,N5),new rp(4,6,32,32,N5),new rp(4,4,16,16,vE),new rp(8,16,32,32,vE),new rp(8,16,128,128,vE),new rp(8,32,128,256,vE),new rp(32,128,258,1024,vE),new rp(32,258,258,4096,vE)],qvt=t=>{t.window_size=2*t.w_size,qy(t.head),t.max_lazy_match=QT[t.level].max_lazy,t.good_match=QT[t.level].good_length,t.nice_match=QT[t.level].nice_length,t.max_chain_length=QT[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=jr-1,t.match_available=0,t.ins_h=0};function Yvt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=uB,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array($vt*2),this.dyn_dtree=new Uint16Array((2*Fvt+1)*2),this.bl_tree=new Uint16Array((2*Bvt+1)*2),qy(this.dyn_ltree),qy(this.dyn_dtree),qy(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Hvt+1),this.heap=new Uint16Array(2*$4+1),qy(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*$4+1),qy(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const NR=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==dx&&e.status!==M6&&e.status!==H4&&e.status!==U4&&e.status!==z4&&e.status!==V4&&e.status!==jb&&e.status!==KT?1:0},Vpe=t=>{if(NR(t))return qb(t,Dp);t.total_in=t.total_out=0,t.data_type=Ovt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?M6:e.wrap?dx:jb,t.adler=e.wrap===2?0:1,e.last_flush=-2,Cvt(e),gl},Gpe=t=>{const e=Vpe(t);return e===gl&&qvt(t.state),e},Xvt=(t,e)=>NR(t)||t.state.wrap!==2?Dp:(t.state.gzhead=e,gl),Wpe=(t,e,n,r,o,i)=>{if(!t)return Dp;let s=1;if(e===Tvt&&(e=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>Nvt||n!==uB||r<8||r>15||e<0||e>9||i<0||i>Pvt||r===8&&s!==1)return qb(t,Dp);r===8&&(r=9);const a=new Yvt;return t.state=a,a.strm=t,a.status=dx,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=o+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+jr-1)/jr),a.window=new Uint8Array(a.w_size*2),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<o+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=(a.lit_bufsize-1)*3,a.level=e,a.strategy=i,a.method=n,Gpe(t)},Kvt=(t,e)=>Wpe(t,e,uB,Mvt,Dvt,Rvt),Qvt=(t,e)=>{if(NR(t)||e>pJ||e<0)return t?qb(t,Dp):Dp;const n=t.state;if(!t.output||t.avail_in!==0&&!t.input||n.status===KT&&e!==ah)return qb(t,t.avail_out===0?O5:Dp);const r=n.last_flush;if(n.last_flush=e,n.pending!==0){if(Vu(t),t.avail_out===0)return n.last_flush=-1,gl}else if(t.avail_in===0&&mJ(e)<=mJ(r)&&e!==ah)return qb(t,O5);if(n.status===KT&&t.avail_in!==0)return qb(t,O5);if(n.status===dx&&n.wrap===0&&(n.status=jb),n.status===dx){let o=uB+(n.w_bits-8<<4)<<8,i=-1;if(n.strategy>=GN||n.level<2?i=0:n.level<6?i=1:n.level===6?i=2:i=3,o|=i<<6,n.strstart!==0&&(o|=Uvt),o+=31-o%31,bT(n,o),n.strstart!==0&&(bT(n,t.adler>>>16),bT(n,t.adler&65535)),t.adler=1,n.status=jb,Vu(t),n.pending!==0)return n.last_flush=-1,gl}if(n.status===M6){if(t.adler=0,mo(n,31),mo(n,139),mo(n,8),n.gzhead)mo(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),mo(n,n.gzhead.time&255),mo(n,n.gzhead.time>>8&255),mo(n,n.gzhead.time>>16&255),mo(n,n.gzhead.time>>24&255),mo(n,n.level===9?2:n.strategy>=GN||n.level<2?4:0),mo(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(mo(n,n.gzhead.extra.length&255),mo(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=Va(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=H4;else if(mo(n,0),mo(n,0),mo(n,0),mo(n,0),mo(n,0),mo(n,n.level===9?2:n.strategy>=GN||n.level<2?4:0),mo(n,zvt),n.status=jb,Vu(t),n.pending!==0)return n.last_flush=-1,gl}if(n.status===H4){if(n.gzhead.extra){let o=n.pending,i=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+i>n.pending_buf_size;){let a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>o&&(t.adler=Va(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex+=a,Vu(t),n.pending!==0)return n.last_flush=-1,gl;o=0,i-=a}let s=new Uint8Array(n.gzhead.extra);n.pending_buf.set(s.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending+=i,n.gzhead.hcrc&&n.pending>o&&(t.adler=Va(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex=0}n.status=U4}if(n.status===U4){if(n.gzhead.name){let o=n.pending,i;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>o&&(t.adler=Va(t.adler,n.pending_buf,n.pending-o,o)),Vu(t),n.pending!==0)return n.last_flush=-1,gl;o=0}n.gzindex<n.gzhead.name.length?i=n.gzhead.name.charCodeAt(n.gzindex++)&255:i=0,mo(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(t.adler=Va(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex=0}n.status=z4}if(n.status===z4){if(n.gzhead.comment){let o=n.pending,i;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>o&&(t.adler=Va(t.adler,n.pending_buf,n.pending-o,o)),Vu(t),n.pending!==0)return n.last_flush=-1,gl;o=0}n.gzindex<n.gzhead.comment.length?i=n.gzhead.comment.charCodeAt(n.gzindex++)&255:i=0,mo(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(t.adler=Va(t.adler,n.pending_buf,n.pending-o,o))}n.status=V4}if(n.status===V4){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Vu(t),n.pending!==0))return n.last_flush=-1,gl;mo(n,t.adler&255),mo(n,t.adler>>8&255),t.adler=0}if(n.status=jb,Vu(t),n.pending!==0)return n.last_flush=-1,gl}if(t.avail_in!==0||n.lookahead!==0||e!==Pv&&n.status!==KT){let o=n.level===0?zpe(n,e):n.strategy===GN?jvt(n,e):n.strategy===Ivt?Wvt(n,e):QT[n.level].func(n,e);if((o===kC||o===Aw)&&(n.status=KT),o===Pc||o===kC)return t.avail_out===0&&(n.last_flush=-1),gl;if(o===ww&&(e===xvt?Evt(n):e!==pJ&&(B4(n,0,0,!1),e===wvt&&(qy(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Vu(t),t.avail_out===0))return n.last_flush=-1,gl}return e!==ah?gl:n.wrap<=0?gJ:(n.wrap===2?(mo(n,t.adler&255),mo(n,t.adler>>8&255),mo(n,t.adler>>16&255),mo(n,t.adler>>24&255),mo(n,t.total_in&255),mo(n,t.total_in>>8&255),mo(n,t.total_in>>16&255),mo(n,t.total_in>>24&255)):(bT(n,t.adler>>>16),bT(n,t.adler&65535)),Vu(t),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?gl:gJ)},Zvt=t=>{if(NR(t))return Dp;const e=t.state.status;return t.state=null,e===jb?qb(t,Avt):gl},Jvt=(t,e)=>{let n=e.length;if(NR(t))return Dp;const r=t.state,o=r.wrap;if(o===2||o===1&&r.status!==dx||r.lookahead)return Dp;if(o===1&&(t.adler=fP(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){o===0&&(qy(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(e.subarray(n-r.w_size,n),0),e=l,n=r.w_size}const i=t.avail_in,s=t.next_in,a=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,hx(r);r.lookahead>=jr;){let l=r.strstart,c=r.lookahead-(jr-1);do r.ins_h=Rv(r,r.ins_h,r.window[l+jr-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--c);r.strstart=l,r.lookahead=jr-1,hx(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=jr-1,r.match_available=0,t.next_in=s,t.input=a,t.avail_in=i,r.wrap=o,gl};var e0t=Kvt,t0t=Wpe,n0t=Gpe,r0t=Vpe,o0t=Xvt,i0t=Qvt,s0t=Zvt,a0t=Jvt,l0t="pako deflate (from Nodeca project)",U_={deflateInit:e0t,deflateInit2:t0t,deflateReset:n0t,deflateResetKeep:r0t,deflateSetHeader:o0t,deflate:i0t,deflateEnd:s0t,deflateSetDictionary:a0t,deflateInfo:l0t};const c0t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u0t=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)c0t(n,r)&&(t[r]=n[r])}}return t},d0t=t=>{let e=0;for(let r=0,o=t.length;r<o;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,o=0,i=t.length;r<i;r++){let s=t[r];n.set(s,o),o+=s.length}return n},dB={assign:u0t,flattenChunks:d0t};let jpe=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{jpe=!1}const pP=new Uint8Array(256);for(let t=0;t<256;t++)pP[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;pP[254]=pP[254]=1;var h0t=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,n,r,o,i,s=t.length,a=0;for(o=0;o<s;o++)n=t.charCodeAt(o),(n&64512)===55296&&o+1<s&&(r=t.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),i=0,o=0;i<a;o++)n=t.charCodeAt(o),(n&64512)===55296&&o+1<s&&(r=t.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),n<128?e[i++]=n:n<2048?(e[i++]=192|n>>>6,e[i++]=128|n&63):n<65536?(e[i++]=224|n>>>12,e[i++]=128|n>>>6&63,e[i++]=128|n&63):(e[i++]=240|n>>>18,e[i++]=128|n>>>12&63,e[i++]=128|n>>>6&63,e[i++]=128|n&63);return e};const f0t=(t,e)=>{if(e<65534&&t.subarray&&jpe)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var p0t=(t,e)=>{const n=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r,o;const i=new Array(n*2);for(o=0,r=0;r<n;){let s=t[r++];if(s<128){i[o++]=s;continue}let a=pP[s];if(a>4){i[o++]=65533,r+=a-1;continue}for(s&=a===2?31:a===3?15:7;a>1&&r<n;)s=s<<6|t[r++]&63,a--;if(a>1){i[o++]=65533;continue}s<65536?i[o++]=s:(s-=65536,i[o++]=55296|s>>10&1023,i[o++]=56320|s&1023)}return f0t(i,o)},g0t=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;for(;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+pP[t[n]]>e?n:e},gP={string2buf:h0t,buf2string:p0t,utf8border:g0t};function m0t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var qpe=m0t;
vendor: 2,319 bytes, line 419
419const Ype=Object.prototype.toString,{Z_NO_FLUSH:y0t,Z_SYNC_FLUSH:v0t,Z_FULL_FLUSH:b0t,Z_FINISH:C0t,Z_OK:S2,Z_STREAM_END:S0t,Z_DEFAULT_COMPRESSION:E0t,Z_DEFAULT_STRATEGY:x0t,Z_DEFLATED:w0t}=OR;function D6(t){this.options=dB.assign({level:E0t,method:w0t,chunkSize:16384,windowBits:15,memLevel:8,strategy:x0t},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qpe,this.strm.avail_out=0;let n=U_.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==S2)throw new Error(ux[n]);if(e.header&&U_.deflateSetHeader(this.strm,e.header),e.dictionary){let r;if(typeof e.dictionary=="string"?r=gP.string2buf(e.dictionary):Ype.call(e.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(e.dictionary):r=e.dictionary,n=U_.deflateSetDictionary(this.strm,r),n!==S2)throw new Error(ux[n]);this._dict_set=!0}}D6.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let o,i;if(this.ended)return!1;for(e===~~e?i=e:i=e===!0?C0t:y0t,typeof t=="string"?n.input=gP.string2buf(t):Ype.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(i===v0t||i===b0t)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(o=U_.deflate(n,i),o===S0t)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),o=U_.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===S2;if(n.avail_out===0){this.onData(n.output);continue}if(i>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};D6.prototype.onData=function(t){this.chunks.push(t)};D6.prototype.onEnd=function(t){t===S2&&(this.result=dB.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const WN=16209,A0t=16191;var T0t=function(e,n){let r,o,i,s,a,l,c,u,d,h,f,p,m,y,v,b,S,w,A,_,P,R,O,N;const M=e.state;r=e.next_in,O=e.input,o=r+(e.avail_in-5),i=e.next_out,N=e.output,s=i-(n-e.avail_out),a=i+(e.avail_out-257),l=M.dmax,c=M.wsize,u=M.whave,d=M.wnext,h=M.window,f=M.hold,p=M.bits,m=M.lencode,y=M.distcode,v=(1<<M.lenbits)-1,b=(1<<M.distbits)-1;
vendor: 13,139 bytes, line 419
419e:do{p<15&&(f+=O[r++]<<p,p+=8,f+=O[r++]<<p,p+=8),S=m[f&v];t:for(;;){if(w=S>>>24,f>>>=w,p-=w,w=S>>>16&255,w===0)N[i++]=S&65535;else if(w&16){A=S&65535,w&=15,w&&(p<w&&(f+=O[r++]<<p,p+=8),A+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=O[r++]<<p,p+=8,f+=O[r++]<<p,p+=8),S=y[f&b];n:for(;;){if(w=S>>>24,f>>>=w,p-=w,w=S>>>16&255,w&16){if(_=S&65535,w&=15,p<w&&(f+=O[r++]<<p,p+=8,p<w&&(f+=O[r++]<<p,p+=8)),_+=f&(1<<w)-1,_>l){e.msg="invalid distance too far back",M.mode=WN;break e}if(f>>>=w,p-=w,w=i-s,_>w){if(w=_-w,w>u&&M.sane){e.msg="invalid distance too far back",M.mode=WN;break e}if(P=0,R=h,d===0){if(P+=c-w,w<A){A-=w;do N[i++]=h[P++];while(--w);P=i-_,R=N}}else if(d<w){if(P+=c+d-w,w-=d,w<A){A-=w;do N[i++]=h[P++];while(--w);if(P=0,d<A){w=d,A-=w;do N[i++]=h[P++];while(--w);P=i-_,R=N}}}else if(P+=d-w,w<A){A-=w;do N[i++]=h[P++];while(--w);P=i-_,R=N}for(;A>2;)N[i++]=R[P++],N[i++]=R[P++],N[i++]=R[P++],A-=3;A&&(N[i++]=R[P++],A>1&&(N[i++]=R[P++]))}else{P=i-_;do N[i++]=N[P++],N[i++]=N[P++],N[i++]=N[P++],A-=3;while(A>2);A&&(N[i++]=N[P++],A>1&&(N[i++]=N[P++]))}}else if(w&64){e.msg="invalid distance code",M.mode=WN;break e}else{S=y[(S&65535)+(f&(1<<w)-1)];continue n}break}}else if(w&64)if(w&32){M.mode=A0t;break e}else{e.msg="invalid literal/length code",M.mode=WN;break e}else{S=m[(S&65535)+(f&(1<<w)-1)];continue t}break}}while(r<o&&i<a);A=p>>3,r-=A,p-=A<<3,f&=(1<<p)-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?5+(o-r):5-(r-o),e.avail_out=i<a?257+(a-i):257-(i-a),M.hold=f,M.bits=p};const bE=15,yJ=852,vJ=592,bJ=0,M5=1,CJ=2,_0t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),I0t=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),P0t=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),R0t=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),O0t=(t,e,n,r,o,i,s,a)=>{const l=a.bits;let c=0,u=0,d=0,h=0,f=0,p=0,m=0,y=0,v=0,b=0,S,w,A,_,P,R=null,O;const N=new Uint16Array(bE+1),M=new Uint16Array(bE+1);let L=null,F,$,D;for(c=0;c<=bE;c++)N[c]=0;for(u=0;u<r;u++)N[e[n+u]]++;for(f=l,h=bE;h>=1&&N[h]===0;h--);if(f>h&&(f=h),h===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,a.bits=1,0;for(d=1;d<h&&N[d]===0;d++);for(f<d&&(f=d),y=1,c=1;c<=bE;c++)if(y<<=1,y-=N[c],y<0)return-1;if(y>0&&(t===bJ||h!==1))return-1;for(M[1]=0,c=1;c<bE;c++)M[c+1]=M[c]+N[c];for(u=0;u<r;u++)e[n+u]!==0&&(s[M[e[n+u]]++]=u);if(t===bJ?(R=L=s,O=20):t===M5?(R=_0t,L=I0t,O=257):(R=P0t,L=R0t,O=0),b=0,u=0,c=d,P=i,p=f,m=0,A=-1,v=1<<f,_=v-1,t===M5&&v>yJ||t===CJ&&v>vJ)return 1;for(;;){F=c-m,s[u]+1<O?($=0,D=s[u]):s[u]>=O?($=L[s[u]-O],D=R[s[u]-O]):($=32+64,D=0),S=1<<c-m,w=1<<p,d=w;do w-=S,o[P+(b>>m)+w]=F<<24|$<<16|D|0;while(w!==0);for(S=1<<c-1;b&S;)S>>=1;if(S!==0?(b&=S-1,b+=S):b=0,u++,--N[c]===0){if(c===h)break;c=e[n+s[u]]}if(c>f&&(b&_)!==A){for(m===0&&(m=f),P+=d,p=c-m,y=1<<p;p+m<h&&(y-=N[p+m],!(y<=0));)p++,y<<=1;if(v+=1<<p,t===M5&&v>yJ||t===CJ&&v>vJ)return 1;A=b&_,o[A]=f<<24|p<<16|P-i|0}}return b!==0&&(o[P+b]=c-m<<24|64<<16|0),a.bits=f,0};var z_=O0t;const N0t=0,Xpe=1,Kpe=2,{Z_FINISH:SJ,Z_BLOCK:M0t,Z_TREES:jN,Z_OK:FC,Z_STREAM_END:D0t,Z_NEED_DICT:L0t,Z_STREAM_ERROR:Ah,Z_DATA_ERROR:Qpe,Z_MEM_ERROR:Zpe,Z_BUF_ERROR:k0t,Z_DEFLATED:EJ}=OR,hB=16180,xJ=16181,wJ=16182,AJ=16183,TJ=16184,_J=16185,IJ=16186,PJ=16187,RJ=16188,OJ=16189,E2=16190,Ag=16191,D5=16192,NJ=16193,L5=16194,MJ=16195,DJ=16196,LJ=16197,kJ=16198,qN=16199,YN=16200,FJ=16201,BJ=16202,$J=16203,HJ=16204,UJ=16205,k5=16206,zJ=16207,VJ=16208,$i=16209,Jpe=16210,ege=16211,F0t=852,B0t=592,$0t=15,H0t=$0t,GJ=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function U0t(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const sS=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<hB||e.mode>ege?1:0},tge=t=>{if(sS(t))return Ah;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=hB,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(F0t),e.distcode=e.distdyn=new Int32Array(B0t),e.sane=1,e.back=-1,FC},nge=t=>{if(sS(t))return Ah;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,tge(t)},rge=(t,e)=>{let n;if(sS(t))return Ah;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Ah:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,nge(t))},oge=(t,e)=>{if(!t)return Ah;const n=new U0t;t.state=n,n.strm=t,n.window=null,n.mode=hB;const r=rge(t,e);return r!==FC&&(t.state=null),r},z0t=t=>oge(t,H0t);let WJ=!0,F5,B5;const V0t=t=>{if(WJ){F5=new Int32Array(512),B5=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(z_(Xpe,t.lens,0,288,F5,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;z_(Kpe,t.lens,0,32,B5,0,t.work,{bits:5}),WJ=!1}t.lencode=F5,t.lenbits=9,t.distcode=B5,t.distbits=5},ige=(t,e,n,r)=>{let o;const i=t.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(e.subarray(n-i.wsize,n),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),i.window.set(e.subarray(n-r,n-r+o),i.wnext),r-=o,r?(i.window.set(e.subarray(n-r,n),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0},G0t=(t,e)=>{let n,r,o,i,s,a,l,c,u,d,h,f,p,m,y=0,v,b,S,w,A,_,P,R;const O=new Uint8Array(4);let N,M;const L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(sS(t)||!t.output||!t.input&&t.avail_in!==0)return Ah;n=t.state,n.mode===Ag&&(n.mode=D5),s=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,r=t.input,a=t.avail_in,c=n.hold,u=n.bits,d=a,h=l,R=FC;e:for(;;)switch(n.mode){case hB:if(n.wrap===0){n.mode=D5;break}for(;u<16;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(n.wrap&2&&c===35615){n.wbits===0&&(n.wbits=15),n.check=0,O[0]=c&255,O[1]=c>>>8&255,n.check=Va(n.check,O,2,0),c=0,u=0,n.mode=xJ;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=$i;break}if((c&15)!==EJ){t.msg="unknown compression method",n.mode=$i;break}if(c>>>=4,u-=4,P=(c&15)+8,n.wbits===0&&(n.wbits=P),P>15||P>n.wbits){t.msg="invalid window size",n.mode=$i;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=c&512?OJ:Ag,c=0,u=0;break;case xJ:for(;u<16;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==EJ){t.msg="unknown compression method",n.mode=$i;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=$i;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&n.wrap&4&&(O[0]=c&255,O[1]=c>>>8&255,n.check=Va(n.check,O,2,0)),c=0,u=0,n.mode=wJ;case wJ:for(;u<32;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&n.wrap&4&&(O[0]=c&255,O[1]=c>>>8&255,O[2]=c>>>16&255,O[3]=c>>>24&255,n.check=Va(n.check,O,4,0)),c=0,u=0,n.mode=AJ;case AJ:for(;u<16;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&n.wrap&4&&(O[0]=c&255,O[1]=c>>>8&255,n.check=Va(n.check,O,2,0)),c=0,u=0,n.mode=TJ;case TJ:if(n.flags&1024){for(;u<16;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&n.wrap&4&&(O[0]=c&255,O[1]=c>>>8&255,n.check=Va(n.check,O,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=_J;case _J:if(n.flags&1024&&(f=n.length,f>a&&(f=a),f&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(i,i+f),P)),n.flags&512&&n.wrap&4&&(n.check=Va(n.check,r,f,i)),a-=f,i+=f,n.length-=f),n.length))break e;n.length=0,n.mode=IJ;case IJ:if(n.flags&2048){if(a===0)break e;f=0;do P=r[i+f++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&f<a);if(n.flags&512&&n.wrap&4&&(n.check=Va(n.check,r,f,i)),a-=f,i+=f,P)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=PJ;case PJ:if(n.flags&4096){if(a===0)break e;f=0;do P=r[i+f++],n.head&&P&&n.length<65536&&(n.head.comment+=String.fromCharCode(P));while(P&&f<a);if(n.flags&512&&n.wrap&4&&(n.check=Va(n.check,r,f,i)),a-=f,i+=f,P)break e}else n.head&&(n.head.comment=null);n.mode=RJ;case RJ:if(n.flags&512){for(;u<16;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(n.wrap&4&&c!==(n.check&65535)){t.msg="header crc mismatch",n.mode=$i;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=Ag;break;case OJ:for(;u<32;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}t.adler=n.check=GJ(c),c=0,u=0,n.mode=E2;case E2:if(n.havedict===0)return t.next_out=s,t.avail_out=l,t.next_in=i,t.avail_in=a,n.hold=c,n.bits=u,L0t;t.adler=n.check=1,n.mode=Ag;case Ag:if(e===M0t||e===jN)break e;case D5:if(n.last){c>>>=u&7,u-=u&7,n.mode=k5;break}for(;u<3;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=NJ;break;case 1:if(V0t(n),n.mode=qN,e===jN){c>>>=2,u-=2;break e}break;case 2:n.mode=DJ;break;case 3:t.msg="invalid block type",n.mode=$i}c>>>=2,u-=2;break;case NJ:for(c>>>=u&7,u-=u&7;u<32;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=$i;break}if(n.length=c&65535,c=0,u=0,n.mode=L5,e===jN)break e;case L5:n.mode=MJ;case MJ:if(f=n.length,f){if(f>a&&(f=a),f>l&&(f=l),f===0)break e;o.set(r.subarray(i,i+f),s),a-=f,i+=f,l-=f,s+=f,n.length-=f;break}n.mode=Ag;break;case DJ:for(;u<14;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=4,u-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=$i;break}n.have=0,n.mode=LJ;case LJ:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}n.lens[L[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,N={bits:n.lenbits},R=z_(N0t,n.lens,0,19,n.lencode,0,n.work,N),n.lenbits=N.bits,R){t.msg="invalid code lengths set",n.mode=$i;break}n.have=0,n.mode=kJ;case kJ:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[c&(1<<n.lenbits)-1],v=y>>>24,b=y>>>16&255,S=y&65535,!(v<=u);){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(S<16)c>>>=v,u-=v,n.lens[n.have++]=S;else{if(S===16){for(M=v+2;u<M;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(c>>>=v,u-=v,n.have===0){t.msg="invalid bit length repeat",n.mode=$i;break}P=n.lens[n.have-1],f=3+(c&3),c>>>=2,u-=2}else if(S===17){for(M=v+3;u<M;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}c>>>=v,u-=v,P=0,f=3+(c&7),c>>>=3,u-=3}else{for(M=v+7;u<M;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}c>>>=v,u-=v,P=0,f=11+(c&127),c>>>=7,u-=7}if(n.have+f>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=$i;break}for(;f--;)n.lens[n.have++]=P}}if(n.mode===$i)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=$i;break}if(n.lenbits=9,N={bits:n.lenbits},R=z_(Xpe,n.lens,0,n.nlen,n.lencode,0,n.work,N),n.lenbits=N.bits,R){t.msg="invalid literal/lengths set",n.mode=$i;break}if(n.distbits=6,n.distcode=n.distdyn,N={bits:n.distbits},R=z_(Kpe,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,N),n.distbits=N.bits,R){t.msg="invalid distances set",n.mode=$i;break}if(n.mode=qN,e===jN)break e;case qN:n.mode=YN;case YN:if(a>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=i,t.avail_in=a,n.hold=c,n.bits=u,T0t(t,h),s=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,r=t.input,a=t.avail_in,c=n.hold,u=n.bits,n.mode===Ag&&(n.back=-1);break}for(n.back=0;y=n.lencode[c&(1<<n.lenbits)-1],v=y>>>24,b=y>>>16&255,S=y&65535,!(v<=u);){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(b&&!(b&240)){for(w=v,A=b,_=S;y=n.lencode[_+((c&(1<<w+A)-1)>>w)],v=y>>>24,b=y>>>16&255,S=y&65535,!(w+v<=u);){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}c>>>=w,u-=w,n.back+=w}if(c>>>=v,u-=v,n.back+=v,n.length=S,b===0){n.mode=UJ;break}if(b&32){n.back=-1,n.mode=Ag;break}if(b&64){t.msg="invalid literal/length code",n.mode=$i;break}n.extra=b&15,n.mode=FJ;case FJ:if(n.extra){for(M=n.extra;u<M;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=BJ;case BJ:for(;y=n.distcode[c&(1<<n.distbits)-1],v=y>>>24,b=y>>>16&255,S=y&65535,!(v<=u);){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(!(b&240)){for(w=v,A=b,_=S;y=n.distcode[_+((c&(1<<w+A)-1)>>w)],v=y>>>24,b=y>>>16&255,S=y&65535,!(w+v<=u);){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}c>>>=w,u-=w,n.back+=w}if(c>>>=v,u-=v,n.back+=v,b&64){t.msg="invalid distance code",n.mode=$i;break}n.offset=S,n.extra=b&15,n.mode=$J;case $J:if(n.extra){for(M=n.extra;u<M;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>
vendor: 4,872 bytes, line 419
419n.dmax){t.msg="invalid distance too far back",n.mode=$i;break}n.mode=HJ;case HJ:if(l===0)break e;if(f=h-l,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=$i;break}f>n.wnext?(f-=n.wnext,p=n.wsize-f):p=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=o,p=s-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do o[s++]=m[p++];while(--f);n.length===0&&(n.mode=YN);break;case UJ:if(l===0)break e;o[s++]=n.length,l--,n.mode=YN;break;case k5:if(n.wrap){for(;u<32;){if(a===0)break e;a--,c|=r[i++]<<u,u+=8}if(h-=l,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Va(n.check,o,h,s-h):fP(n.check,o,h,s-h)),h=l,n.wrap&4&&(n.flags?c:GJ(c))!==n.check){t.msg="incorrect data check",n.mode=$i;break}c=0,u=0}n.mode=zJ;case zJ:if(n.wrap&&n.flags){for(;u<32;){if(a===0)break e;a--,c+=r[i++]<<u,u+=8}if(n.wrap&4&&c!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=$i;break}c=0,u=0}n.mode=VJ;case VJ:R=D0t;break e;case $i:R=Qpe;break e;case Jpe:return Zpe;case ege:default:return Ah}return t.next_out=s,t.avail_out=l,t.next_in=i,t.avail_in=a,n.hold=c,n.bits=u,(n.wsize||h!==t.avail_out&&n.mode<$i&&(n.mode<k5||e!==SJ))&&ige(t,t.output,t.next_out,h-t.avail_out),d-=t.avail_in,h-=t.avail_out,t.total_in+=d,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Va(n.check,o,h,t.next_out-h):fP(n.check,o,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===Ag?128:0)+(n.mode===qN||n.mode===L5?256:0),(d===0&&h===0||e===SJ)&&R===FC&&(R=k0t),R},W0t=t=>{if(sS(t))return Ah;let e=t.state;return e.window&&(e.window=null),t.state=null,FC},j0t=(t,e)=>{if(sS(t))return Ah;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,FC):Ah},q0t=(t,e)=>{const n=e.length;let r,o,i;return sS(t)||(r=t.state,r.wrap!==0&&r.mode!==E2)?Ah:r.mode===E2&&(o=1,o=fP(o,e,n,0),o!==r.check)?Qpe:(i=ige(t,e,n,n),i?(r.mode=Jpe,Zpe):(r.havedict=1,FC))};var Y0t=nge,X0t=rge,K0t=tge,Q0t=z0t,Z0t=oge,J0t=G0t,ebt=W0t,tbt=j0t,nbt=q0t,rbt="pako inflate (from Nodeca project)",zg={inflateReset:Y0t,inflateReset2:X0t,inflateResetKeep:K0t,inflateInit:Q0t,inflateInit2:Z0t,inflate:J0t,inflateEnd:ebt,inflateGetHeader:tbt,inflateSetDictionary:nbt,inflateInfo:rbt};function obt(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var ibt=obt;const sge=Object.prototype.toString,{Z_NO_FLUSH:sbt,Z_FINISH:abt,Z_OK:mP,Z_STREAM_END:$5,Z_NEED_DICT:H5,Z_STREAM_ERROR:lbt,Z_DATA_ERROR:jJ,Z_MEM_ERROR:cbt}=OR;function MR(t){this.options=dB.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qpe,this.strm.avail_out=0;let n=zg.inflateInit2(this.strm,e.windowBits);if(n!==mP)throw new Error(ux[n]);if(this.header=new ibt,zg.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=gP.string2buf(e.dictionary):sge.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=zg.inflateSetDictionary(this.strm,e.dictionary),n!==mP)))throw new Error(ux[n])}MR.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,o=this.options.dictionary;let i,s,a;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?abt:sbt,sge.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=zg.inflate(n,s),i===H5&&o&&(i=zg.inflateSetDictionary(n,o),i===mP?i=zg.inflate(n,s):i===jJ&&(i=H5));n.avail_in>0&&i===$5&&n.state.wrap>0&&t[n.next_in]!==0;)zg.inflateReset(n),i=zg.inflate(n,s);switch(i){case lbt:case jJ:case H5:case cbt:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||i===$5))if(this.options.to==="string"){let l=gP.utf8border(n.output,n.next_out),c=n.next_out-l,u=gP.buf2string(n.output,l);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(l,l+c),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(i===mP&&a===0)){if(i===$5)return i=zg.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};MR.prototype.onData=function(t){this.chunks.push(t)};MR.prototype.onEnd=function(t){t===mP&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=dB.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function L6(t,e){const n=new MR(e);if(n.push(t),n.err)throw n.msg||ux[n.err];return n.result}function ubt(t,e){return e=e||{},e.raw=!0,L6(t,e)}
419var dbt=MR,hbt=L6,fbt=ubt,pbt=L6,gbt=OR,mbt={Inflate:dbt,inflate:hbt,inflateRaw:fbt,ungzip:pbt,constants:gbt};const{Inflate:ybt,inflate:f6t,inflateRaw:p6t,ungzip:g6t}=mbt;var age=ybt;class vbt{constructor(){this.file=null,this.pos=0,this.pko=null,this.buffer="",this.syntaxStack=[],this.syntaxStackPtr=0,this.lef=this,this.aborted=!1,this.reader=new FileReader,this.decoder=new TextDecoder("utf-8"),this.size=1*1024*1024,this.onData=e=>{this.buffer+=e;let n=!1;for(this.syntaxStackPtr=0;!this.aborted&&this.syntaxStackPtr<this.syntaxStack[this.syntaxStack.length-1].length;){const r=this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].token.exec(this.buffer);r?(n=!0,this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].handler&&this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].handler()(r.slice(1,r.length)),this.buffer=this.buffer.substring(r[0].length),this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].syntax&&(this.syntaxStack.push(this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].syntax),this.syntaxStackPtr=0,n=!1)):n?(n=!1,this.syntaxStackPtr=0):++this.syntaxStackPtr}return this.buffer},this.handleLoadEnd=e=>{if(this.pos+=e.loaded,this.lef.on_progress(e),this.pko&&this.file&&(this.file.type==="application/x-gzip"||this.file.type==="application/gzip"?this.pko.push(new Uint8Array(e.target.result)):this.pko.onData(this.decoder.decode(e.target.result))),!this.aborted&&this.file&&this.pos<this.file.size){const n=this.file.slice(this.pos,this.pos+this.size);this.reader.readAsArrayBuffer(n)}else console.log("Left buffer length",this.buffer.length),this.lef.on_done(this.buffer)},this.init=()=>{this.lef=this,this.pos=0,this.aborted=!1,this.buffer="",this.syntaxStack=[this.syntax],this.syntaxStackPtr=0},this.parseFile=e=>{if(this.init(),this.file=e,this.pko=new age({chunkSize:5*this.size,to:"string"}),this.pko.onData=this.onData,!this.file)return this.lef.on_error("File not found");const n=this.file.slice(this.pos,this.pos+this.size);this.reader.onloadend=this.handleLoadEnd,this.reader.onabort=r=>{this.lef.on_abort(r)},this.reader.onerror=r=>{this.lef.on_error(r)},this.reader.readAsArrayBuffer(n)},this.abort=()=>{this.reader.abort(),this.aborted=!0},this.syntax=[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*VERSION\s+([^;]+)\s*;/,handler:()=>this.lef.on_version},{token:/^\s*NAMESCASESENSITIVE\s+(ON|OFF)\s*;/,handler:()=>this.lef.on_namesCaseSensitive},{token:/^\s*DIVIDERCHAR\s+([^;]+)\s*;/,handler:()=>this.lef.on_divideChar},{token:/^\s*BUSBITCHARS\s+([^;]+)\s*;/,handler:()=>this.lef.on_busBitChars},{token:/^\s*UNITS/,handler:()=>this.lef.on_units,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*(\w+)\s+(\w+)\s+(\d+)\s*;/,handler:()=>this.lef.on_unitsEntry},{token:/^\s*END UNITS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_endUnits)}]},{token:/^\s*MANUFACTURINGGRID\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_manufacturingGrid},{token:/^\s*FIXEDMASK\s*;/,handler:()=>this.lef.on_fixedMask},{token:/^\s*USEMINSPACING\s+([^;]+)\s*;/,handler:()=>this.lef.on_busBitChars},{token:/^\s*CLEARANCEMEASURE\s+(\w+)\s*;/,handler:()=>this.lef.on_clearanceMeasure},{token:/^\s*PROPERTYDEFINITIONS\s*/,handler:()=>this.lef.on_beginPropertyDefinitions,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*(LAYER|LIBRARY|MACRO|NONDEFAULTRULE|PIN|VIA|VIARULE)\s+(\w+)\s+(INTEGER|REAL|STRING)(\s+"[^"]+")*\s*;/,handler:()=>this.lef.on_propertyDefinition},{token:/^\s*(LAYER|LIBRARY|MACRO|NONDEFAULTRULE|PIN|VIA|VIARULE)\s+(\w+)\s+(INTEGER|REAL|STRING)(\s+[^;]+)*;/,handler:()=>this.lef.on_propertyDefinition},{token:/^\s*(LAYER|LIBRARY|MACRO|NONDEFAULTRULE|PIN|VIA|VIARULE)\s+(\w+)\s+RANGE\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s+(INTEGER|REAL|STRING)(\s+[^;]+)*;/,handler:()=>this.lef.on_propertyDefinition},{token:/^\s*END PROPERTYDEFINITIONS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_endPropertyDefinitions)}]},{token:/^\s*SPACING/,handler:()=>this.lef.on_spacing,syntax:[{token:/^\s*SAMENET\s+(\w+)\s+(\w+)\s+(\d+|\d+.\d+)(\s+STACK)*\s*;/,handler:()=>this.lef.on_spacingSameNet},{token:/^\s*END\s+SPACING/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_endSpacing)}]},{token:/^\s*LAYER\s+(\w+)/,handler:()=>this.lef.on_layer,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*TYPE\s+(CUT|ROUTING|IMPLANT|MASTERSLICE|OVERLAP)\s*;/,handler:()=>this.lef.on_layerType},{token:/^\s*MASK\s+(\d+)\s*;/,handler:()=>this.lef.on_layerMask},{token:/^\s*SPACING\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerSpacing,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*RANGE\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerSpacingRange},{token:/^\s*USELENGTHTHRESHOLD/,handler:()=>this.lef.on_layerSpacingUseLengthThreshold},{token:/^\s*TWOEDGES/,handler:()=>this.lef.on_layerSpacingTwoEdges},{token:/^\s*INFLUENCE\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerSpacingInfluence},{token:/^\s*LENGTHTHRESHOLD\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerSpacingLengthThreshold},{token:/^\s*ENDOFLINE\s+(\d+\.\d+|\d+)\s+WITHIN\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerSpacingEndOfLine},{token:/^\s*PARALLELEDGE\s+(\d+\.\d+|\d+)\s+WITHIN\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerSpacingParallelEdge},{token:/^\s*CENTERTOCENTER/,handler:()=>this.lef.on_layerSpacingCenterToCenter},{token:/^\s*SAMENET\s*(PGONLY)*/,handler:()=>this.lef.on_layerSpacingSameNet},{token:/^\s*LAYER\s+(\w+)/,handler:()=>this.lef.on_layerSpacingLayer},{token:/^\s*STACK/,handler:()=>this.lef.on_layerSpacingStack},{token:/^\s*ADJACENTCUTS\s+(\d+)\s+WITHIN\s+(\d+\.\d+|\d+)/,handler:()=>
419this.lef.on_layerSpacingAdjacentCuts},{token:/^\s*EXCEPTSAMEPGNET/,handler:()=>this.lef.on_layerSpacingExceptSamePGNet},{token:/^\s*PARALLELOVERLAP/,handler:()=>this.lef.on_layerSpacingParallelOverlap},{token:/^\s*NOTCHLENGTH\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerNotchLength},{token:/^\s*ENDOFNOTCHWIDTH\s+(\d+\.\d+|\d+)\s+NOTCHSPACING\s+(\d+\.\d+|\d+)\s*NOTCHLENGTH\s+(\d+\.\d+|\d+)/,handler:()=>this.lef.on_layerEndOfNotchWidth},{token:/^\s*AREA\s+(\d+\.\d+|\d+)\s*/,handler:()=>this.lef.on_layerSpacingArea},{token:/^\s*;/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_endLayerSpacing)}]},{token:/^\s*WIDTH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerWidth},{token:/^\s*WIREEXTENSION\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerWireExtension},{token:/^\s*MINIMUMCUT\s+([^;]+);/,handler:()=>this.lef.on_layerMinimumCut},{token:/^\s*MINSTEP\s+([^;]+);/,handler:()=>this.lef.on_layerMinStep},{token:/^\s*MINENCLOSEDAREA\s+([^;]+);/,handler:()=>this.lef.on_layerMinEnclosedArea},{token:/^\s*PROTRUSIONWIDTH\s+([^;]+);/,handler:()=>this.lef.on_layerProtrusionWidth},{token:/^\s*DIAGWIDTH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerDiagWidth},{token:/^\s*PITCH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerPitch},{token:/^\s*PITCH\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerPitch},{token:/^\s*MINSIZE\s+([^;]+)\s*;/,handler:()=>this.lef.on_layerMinSize},{token:/^\s*DIAGPITCH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerDiagPitch},{token:/^\s*DIAGSPACING\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerDiagSpacing},{token:/^\s*DIAGMINEDGELENGTH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerDiagMinEdgeLength},{token:/^\s*OFFSET\s+(\d+\.\d+|\d+)\s*(\d+|\d+\.\d+)*\s*;/,handler:()=>this.lef.on_layerOffset},{token:/^\s*AREA\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerArea},{token:/^\s*SHRINKAGE\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerShrinkage},{token:/^\s*MINIMUMDENSITY\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerMinimumDensity},{token:/^\s*MAXIMUMDENSITY\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerMaximumDensity},{token:/^\s*DENSITYCHECKWINDOW\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerDensityCheckWindow},{token:/^\s*DENSITYCHECKSTEP\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerDensityCheckStep},{token:/^\s*FILLACTIVESPACING\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerFillActiveSpacing},{token:/^\s*CAPMULTIPLIER\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerCapMultiplier},{token:/^\s*EDGECAPACITANCE\s+(\d+\.\d+[eE][+-]?\d+|\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerEdgeCapacitance},{token:/^\s*MAXWIDTH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerMaxWidth},{token:/^\s*MINWIDTH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerMinWidth},{token:/^\s*RESISTANCE\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerResistancePerCut},{token:/^\s*RESISTANCE\s+RPERSQ\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerResistancePerSq},{token:/^\s*CAPACITANCE\s+CPERSQDIST\s+(\d+(\.\d+)*[eE][+-]\d+|\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerCapacitancePerSqDist},{token:/^\s*THICKNESS\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerThickness},{token:/^\s*HEIGHT\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerHeight},{token:/^\s*DIRECTION\s+(\w+)\s*;/,handler:()=>this.lef.on_layerDirection},{token:/^\s*SPACINGTABLE\s+([^;]+);/,handler:()=>this.lef.on_layerSpacingTable},{token:/^\s*ARRAYSPACING\s+([^;]+);/,handler:()=>this.lef.on_layerArraySpacing},{token:/^\s*ENCLOSURE\s+([^;]+);/,handler:()=>this.lef.on_layerEnclosure},{token:/^\s*PREFERENCLOSURE\s+([^;]+);/,handler:()=>this.lef.on_layerPreferEnclosure},{token:/^\s*PROPERTY\s+(\w+)\s+("[^"]+"|[^;]+)\s*;/,handler:()=>this.lef.on_layerProperty},{token:/^\s*ACCURRENTDENSITY\s+(AVERAGE|PEAK|RMS)\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerACCurrentDensity},{token:/^\s*ACCURRENTDENSITY\s+(AVERAGE|PEAK|RMS)\s+FREQUENCY\s+([0-9.\s]+)\s*;\s*TABLEENTRIES\s+([0-9.\s]+)\s*;/,handler:()=>this.lef.on_layerACCurrentDensity},{token:/^\s*ACCURRENTDENSITY\s+(AVERAGE|PEAK|RMS)\s+FREQUENCY\s+([0-9.\s]+)\s*;\s*CUTAREA\s+([0-9.\s]+)\s*;\s*TABLEENTRIES\s+([0-9.\s]+)\s*;/,handler:()=>this.lef.on_layerACCurrentDensity},{token:/^\s*ACCURRENTDENSITY\s+(AVERAGE|PEAK|RMS)\s+FREQUENCY\s+([0-9.\s]+)\s*;\s*WIDTH\s+([0-9.\s]+)\s*;\s*TABLEENTRIES\s+([0-9.\s]+)\s*;/,handler:()=>this.lef.on_layerACCurrentDensity},{token:/^\s*DCCURRENTDENSITY\s+AVERAGE\s+CUTAREA\s+([0-9.\s]+)\s*;\s*TABLEENTRIES\s+([0-9.\s]+)\s*;/,handler:()=>this.lef.on_layerACCurrentDensity},{token:/^\s*DCCURRENTDENSITY\s+AVERAGE\s+WIDTH\s+([0-9.\s]+)\s*;\s*TABLEENTRIES\s+([0-9.\s]+)\s*;/,handler:()=>this.lef.on_layerACCurrentDensity},{token:/^\s*DCCURRENTDENSITY\s+AVERAGE\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_layerDCCurrentDensity},{token:/^\s*ANTENNAMODEL\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaModel},{token:/^\s*ANTENNAAREARATIO\s+([^;]+);/,handler:()=>this.lef.on_layerAntennAreaRatio},{token:/^\s*ANTENNADIFFAREARATIO\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaDiffAreaRatio},{token:/^\s*ANTENNACUMAREARATIO\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaCumAreaRatio},{token:/^\s*ANTENNACUMDIFFAREARATIO\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaCumAreaRatio},{token:/^\s*ANTENNAAREAFACTOR\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaAreaFactor},{token:/^\s*ANTENNACUMROUTINGPLUSCUT\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaCumRoutingPlusCut},{token:/^\s*ANTENNAGATEPLUSDIFF\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaGatePlusDiff},{token:/^\s*ANTENNAAREAMINUSDIFF\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaAreaMinusDiff},{token:/^\s*ANTENNAAREADIFFREDUCEPWL\s+([^;]+);/,handler:()=>this.lef.on_layerAntennaAreaDiffReducePWL},{token:/^\s*ANTENNADIFFSIDEAREARATIO\s+([^;]+);/},{token:/^\s*END (\w+)/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_endLayer)}]},{token:/^\s*MAXVIASTACK\s+([^;]+)\s*;/,handler:()=>this.lef.on_maxViaStack},{token:/^\s*VIA\s+([\w_\-]+)\s*(DEFAULT)?/,handler:()=>this.lef.on_via,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*LAYER\s+(\w+)\s*;/,handler:()=>this.lef.on_viaLayer},{token:/^\s*PATTERN\s+([^;]+)\s*;/,handler:()=>this.lef.on_viaPattern},{token:/^\s*POLYGON\s+([^;]+)\s*;/,handler:()=>this.lef.on_viaPolygon},{token:/^\s*VIARULE\s+(\w+)\s*;/,handler:()=>this.lef.on_viaViaRule},{token:/^\s*LAYERS\s+(\w+)\s+(\w+)\s(\w+)\s*;/,handler:()=>this.lef.on_viaLayers},{token:/^\s*CUTSIZE\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaCutSize},{token:/^\s*ROWCOL\s+(\d+)\s+(\d+)\s*;/,handler:()=>this.lef.on_viaRowCol},{token:/^\s*ORIGIN\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaOrigin},{token:/^\s*OFFSET\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaOffset},{token:/^\s*CUTSPACING\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaCutSpacing},{token:/^\s*RESISTANCE\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaResistance},{token:/^\s*RECT\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaRect},{token:/^\s*ENCLOSURE\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaEnclosure},{token:/^\s*PROPERTY\s+(\w+)\s+("[^"]+"|[^;]+)\s*;/,handler:()=>this.lef.on_viaProperty},{token:/^\s*END\s+([\w_\-]+)/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_viaEnd)}]},{token:/^\s*VIARULE\s+([\w_\-]+)\s+(?!GENERATE)/,handler:()=>this.lef.on_viaRule,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*LAYER\s+(\w+)\s*;/,handler:()=>this.lef.on_viaRuleLayer},{token:/^\s*VIA\s+(\w+)\s*;/,handler:()=>this.lef.on_viaRuleVia},{token:/^\s*DIRECTION\s+(HORIZONTAL|VERTICAL)\s*;/,handler:()=>this.lef.on_viaRuleDirection},{token:/^\s*WIDTH\s+(\d+\.\d+|\d+)\s+TO\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_viaRuleWidth},{token:/^\s*PROPERTY\s+(\w+)\s+("[^"]+"|[^;]+)\s*;/,handler:()=>this.lef.on_viaRuleProperty},{token:/^\s*END\s+([\w_\-]+)/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_viaRuleEnd)}]},{token:/^\s*VIARULE\s+([\w_\-]+)\s+GENERATE\s*(DEFAULT)?/,handler:()=>this.lef.on_viaRuleGenerate,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*LAYER\s+(\w+)\s*;/,handler:()=>this.lef.on_viaRuleGenerateLayer},{token:/^\s*DIRECTION\s+(HORIZONTAL|VERTICAL)\s*;/,handler:()=>this.lef.on_viaRuleDirection},{token:/^\s*ENCLOSURE\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaRuleGenerateEnclosure},{token:/^\s*WIDTH\s+([+-]?\d+\.\d+|[+-]?\d+)\s+TO\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaRuleGenerateWidth},{token:/^\s*RECT\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaRuleGenerateRect},{token:/^\s*SPACING\s+([+-]?\d+\.\d+|[+-]?\d+)\s+BY\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaRuleGenerateSpacing},{token:/^\s*RESISTANCE\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_viaRuleGenerateResistance},{token:/^\s*OVERHANG\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/},{token:/^\s*METALOVERHANG\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/},{token:/^\s*END\s+([\w_\-]+)/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_viaRuleGenerateEnd)}]},{token:/^\s*NONDEFAULTRULE\s+([^;]+)\s*;/,handler:()=>this.lef.on_nonDefaultRule},{token:/^\s*SITE\s+(\w+)/,handler:()=>this.lef.on_beginSite,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*CLASS\s+(PAD|CORE|pad|core)\s*;/,handler:()=>this.lef.on_siteClass},{token:/^\s*SYMMETRY\s+([^;]+);/,handler:()=>this.lef.on_siteSymmetry},{token:/^\s*ROWPATTERN\s+([^;]+);/,handler:()=>this.lef.on_siteRowPattern},{token:/^\s*SIZE\s+(\d+\.\d+|\d+)\s+BY\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_siteSize},{token:/^\s*END\s+(\w+)/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_endSite)}]},{token:/^\s*BEGINEXT\s+([^\r\n]*)[\n\r]+/,handler:()=>this.lef.on_beginExt,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s+/},{token:/^\s*(\S+)\s+("[^"]*")/,handler:()=>this.lef.on_ext},{token:/^\s*ENDEXT/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_endExt)}]},{token:/^\s*MACRO\s+(\w+)/,handler:()=>this.lef.on_beginMacro,syntax:[{token:/^\s*CLASS\s+([^;]+);/,handler:()=>this.lef.on_macroClass},{token:/^\s*FOREIGN\s+([^;]+);/,handler:()=>this.lef.on_macroForeign},{token:/^\s*ORIGIN\s*(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_macroOrigin},{token:/^\s*EEQ\s+(\w+)\s*;/,handler:()=>this.lef.on_macroEEQ},{token:/^\s*SIZE\s+([+-]?\d+\.\d+|[+-]?\d+)\s+BY\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_macroSize},{token:/^\s*SYMMETRY\s+([^;]+);/,handler:()=>this.lef.on_macroSymmetry},{token:/^\s*SITE\s+([^;]+);/,handler:()=>this.lef.on_macroSite},{token:/^\s*PIN\s+([^\s]+)\s/,handler:()=>this.lef.on_macroBeginPin,syntax:[{token:/^\s*TAPERRULE\s+(\w+)\s*;/,handler:()=>this.lef.on_macroPinTaperRule},{token:/^\s*DIRECTION\s+(INPUT|OUTPUT|OUTPUT\s+TRISTATE|INOUT|FEEDTHROUGH)\s*;/,handler:()=>this.lef.on_macroPinDirection},{token:/^\s*USE\s+(SIGNAL|ANALOG|POWER|GROUND|CLOCK)\s*;/i,handler:()=>this.lef.on_macroPinUse},{token:/^\s*NETEXPR\s+"([^"]+)"\s*;/,handler:()=>this.lef.on_macroPinNetexpr},{token:/^\s*SUPPLYSENSITIVITY\s+(\w+)\s*;/,handler:()=>this.lef.on_macroPinSupplySensitivity},{token:/^\s*GROUNDSENSITIVITY\s+(\w+)\s*;/,handler:()=>this.lef.on_macroPinGroundSensitivity},{token:/^\s*SHAPE\s+(ABUTMENT|ING|FEEDTHRU)\s*;/,handler:()=>this.lef.on_macroPinShape},{token:/^\s*MUSTJOIN\s+(\w+)\s*;/,handler:()=>this.lef.on_macroPinMustJoin},{token:/^\s*PORT/,handler:()=>this.lef.on_macroPinPort,syntax:[{token:/^\s*CLASS\s+(NONE|CORE|BUMP)\s*;/,handler:()=>this.lef.on_macroPinPortClass},{token:/^\s*LAYER\s+(\w+)(\s*EXCEPTPGNET)*(\s*SPACING\s+(\d+\.\d+|\d+))*(\s*DESIGNRULEWIDTH\s+(\d+\.\d+|\d+))*\s*;/,handler:()=>this.lef.on_macroPinPortLayer},{token:/^\s*POLYGON\s+([^;]+);/,handler:()=>this.lef.on_macroPinPortPolygon},{token:/^\s*PATH\s+([^;]+);/,handler:()=>this.lef.on_macroPinPortPath},{token:/^\s*VIA\s+([^;]+);/,handler:()=>this.lef.on_macroPinPortVia},{token:/^\s*RECT\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s+([+-]?\d+\.\d+|[+-]?\d+)\s*;/,handler:()=>this.lef.on_macroPinPortRect},{token:/^\s*WIDTH\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_macroPinPortWidth},{token:/^\s*END/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_macroPinPortEnd)}]},{token:/^\s*PROPERTY\s+(\w+)\s+("[^"]+"|[^;]+)\s*;/,handler:()=>this.lef.on_macroPinProperty},{token:/^\s*ANTENNAPARTIALMETALAREA\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaPartialMetalArea},{token:/^\s*ANTENNAPARTIALMETALSIDEAREA\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaPartialMetalSideArea},{token:/^\s*ANTENNAPARTIALCUTAREA\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaPartialMetalCutArea},{token:/^\s*ANTENNADIFFAREA\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaDiffArea},{token:/^\s*ANTENNAMODEL\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaModel},{token:/^\s*ANTENNAGATEAREA\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaGateArea},{token:/^\s*ANTENNAMAXAREACAR\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaMaxAreaCar},{token:/^\s*ANTENNAMAXSIDEAREACAR\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaMaxSideAreaCar},{token:/^\s*ANTENNAMAXCUTCAR\s+([^;]+);/,handler:()=>this.lef.on_macroPinAntennaMaxCutCar},{token:/^\s*END\s+([^\s]+\s)/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_macroPinEnd)}]},{token:/^\s*OBS\s+/,handler:()=>this.lef.on_macroObsBegin,syntax:[{token:/^\s*LAYER\s+(\w+)(\s*EXCEPTPGNET)*(\s*SPACING\s+(\d+\.\d+|\d+))*(\s*DESIGNRULEWIDTH\s+(\d+\.\d+|\d+))*\s*;/,handler:()=>this.lef.on_macroObsLayer},{token:/^\s*POLYGON\s+([^;]+);/,handler:()=>this.lef.on_macroObsPolygon},{token:/^\s*RECT\s+([^;]+);/,handler:()=>this.lef.on_macroObsRect},{token:/^\s*PATH\s+([^;]+);/,handler:()=>this.lef.on_macroObsPath},{token:/^\s*VIA\s+([^;]+);/,handler:()=>this.lef.on_macroObsVia},{token:/^\s*WIDTH\s+([^;]+);/,handler:()=>this.lef.on_macroObsWidth},{token:/^\s*END/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_macroObsEnd)}]},{token:/^\s*DENSITY\s+/,handler:()=>this.lef.on_macroBeginDensity,syntax:[{token:/^\s*LAYER\s+(\w+)\s+;/,handler:()=>this.lef.on_macroDensityLayer},{token:/^\s*RECT\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s+(\d+\.\d+|\d+)\s*;/,handler:()=>this.lef.on_macroDensityRect}]},{token:/^\s*PROPERTY\s+(\w+)\s+("[^"]+"|[^;]+)\s*;/,handler:()=>this.lef.on_macroProperty},{token:/^\s*END\s+(\w+)/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.lef.on_macroEnd)}]},{token:/^\s*END LIBRARY\s*/,handler:()=>this.lef.on_endLibrary}],this.parserData={}}on_version(){}on_namesCaseSensitive(){}on_divideChar(){}on_busBitChars(){}on_clearanceMeasure(){}on_units(){}on_unitsEntry(){}on_endUnits(){}on_layer(){}on_layerType(){}on_layerMask(){}on_layerSpacing(){}on_layerSpacingRange(){}on_layerSpacingUseLengthThreshold(){}on_layerSpacingTwoEdges(){}on_layerSpacingInfluence(){}on_layerSpacingLengthThreshold(){}on_layerSpacingEndOfLine(){}on_layerSpacingParallelEdge(){}on_layerSpacingCenterToCenter(){}on_layerSpacingSameNet(){}on_layerSpacingLayer(){}on_layerSpacingStack(){}
419on_layerSpacingAdjacentCuts(){}on_layerSpacingExceptSamePGNet(){}on_layerSpacingParallelOverlap(){}on_layerSpacingArea(){}on_layerACCurrentDensity(){}on_layerDCCurrentDensity(){}on_endLayerSpacing(){}on_layerWidth(){}on_layerEnclosure(){}on_layerPreferEnclosure(){}on_layerPitch(){}on_layerOffset(){}on_layerArea(){}on_layerMaxWidth(){}on_layerMinWidth(){}on_layerMinEnclosedArea(){}on_layerThickness(){}on_layerDirection(){}on_layerSpacingTable(){}on_layerArraySpacing(){}on_layerResistancePerCut(){}on_layerResistancePerSq(){}on_layerProperty(){}on_layerAntennaModel(){}on_layerAntennAreaRatio(){}on_layerAntennaDiffAreaRatio(){}on_layerAntennaCumAreaRatio(){}on_layerAntennaAreaFactor(){}on_layerAntennaCumRoutingPlusCut(){}on_layerAntennaGatePlusDiff(){}on_layerAntennaAreaMinusDiff(){}on_layerAntennaAreaDiffReducePWL(){}on_layerDiagWidth(){}on_layerDiagPitch(){}on_layerDiagSpacing(){}on_layerDiagMinEdgeLength(){}on_layerMinSize(){}on_layerNotchLength(){}on_layerEndOfNotchWidth(){}on_layerWireExtension(){}on_layerMinimumCut(){}on_layerMinStep(){}on_layerProtrusionWidth(){}on_layerCapacitancePerSqDist(){}on_layerHeight(){}on_layerShrinkage(){}on_layerCapMultiplier(){}on_layerEdgeCapacitance(){}on_layerMinimumDensity(){}on_layerMaximumDensity(){}on_layerDensityCheckWindow(){}on_layerDensityCheckStep(){}on_layerFillActiveSpacing(){}on_endLayer(){}on_maxViaStack(){}on_via(){}on_viaLayer(){}on_viaRect(){}on_viaPolygon(){}on_viaResistance(){}on_viaPattern(){}on_viaViaRule(){}on_viaLayers(){}on_viaCutSize(){}on_viaRowCol(){}on_viaOrigin(){}on_viaOffset(){}on_viaCutSpacing(){}on_viaEnclosure(){}on_viaProperty(){}on_viaEnd(){}on_viaRule(){}on_viaRuleLayer(){}on_viaRuleWidth(){}on_viaRuleDirection(){}on_viaRuleVia(){}on_viaRuleProperty(){}on_viaRuleEnd(){}on_viaRuleGenerate(){}on_viaRuleGenerateLayer(){}on_viaRuleGenerateEnclosure(){}on_viaRuleGenerateWidth(){}on_viaRuleGenerateRect(){}on_viaRuleGenerateSpacing(){}on_viaRuleGenerateResistance(){}on_viaRuleGenerateEnd(){}on_nonDefaultRule(){}on_beginSite(){}on_siteClass(){}on_siteSymmetry(){}on_siteRowPattern(){}on_siteSize(){}on_endSite(){}on_endLibrary(){}on_beginMacro(e){}on_macroClass(){}on_macroForeign(){}on_macroOrigin(){}on_macroEEQ(){}on_macroSize(e){}on_macroSymmetry(){}on_macroSite(){}on_macroBeginPin(){}on_macroPinTaperRule(){}on_macroPinDirection(){}on_macroPinUse(){}on_macroPinNetexpr(){}on_macroPinSupplySensitivity(){}on_macroPinGroundSensitivity(){}on_macroPinShape(){}on_macroPinMustJoin(){}on_macroPinPort(){}on_macroPinPortClass(){}on_macroPinPortLayer(){}on_macroPinPortPolygon(){}on_macroPinPortPath(){}on_macroPinPortVia(){}on_macroPinPortRect(){}on_macroPinPortWidth(){}on_macroPinPortEnd(){}on_macroPinProperty(){}on_macroPinAntennaPartialMetalArea(){}on_macroPinAntennaPartialMetalSideArea(){}on_macroPinAntennaPartialMetalCutArea(){}on_macroPinAntennaDiffArea(){}on_macroPinAntennaModel(){}on_macroPinAntennaGateArea(){}on_macroPinAntennaMaxAreaCar(){}on_macroPinAntennaMaxSideAreaCar(){}on_macroPinAntennaMaxCutCar(){}on_macroPinEnd(){}on_macroObsBegin(){}on_macroObsLayer(){}on_macroObsPolygon(){}on_macroObsPath(){}on_macroObsWidth(){}on_macroObsVia(){}on_macroObsRect(){}on_macroObsEnd(){}on_macroBeginDensity(){}on_macroDensityLayer(){}on_macroDensityRect(){}on_macroProperty(){}on_manufacturingGrid(){}on_fixedMask(){}on_beginExt(){}on_ext(){}on_endExt(){}on_beginPropertyDefinitions(){}on_propertyDefinition(){}on_endPropertyDefinitions(){}on_spacing(){}on_spacingSameNet(){}on_endSpacing(){}on_macroEnd(){}on_abort(e){}on_error(e){}on_progress(e){}on_done(e){}}class bbt{constructor(){this.file=null,this.pos=0,this.pko=null,this.buffer="",this.syntaxStack=[],this.syntaxStackPtr=0,this.def=this,this.aborted=!1,this.reader=new FileReader,this.decoder=new TextDecoder("utf-8"),this.size=1*1024*1024,this.onData=e=>{this.buffer+=e;let n=!1;for(this.syntaxStackPtr=0;!this.aborted&&this.syntaxStackPtr<this.syntaxStack[this.syntaxStack.length-1].length;){const r=this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].token.exec(this.buffer);r?(n=!0,this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].handler&&this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].handler()(r.slice(1,r.length)),this.buffer=this.buffer.substring(r[0].length),this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].syntax&&(this.syntaxStack.push(this.syntaxStack[this.syntaxStack.length-1][this.syntaxStackPtr].syntax),this.syntaxStackPtr=0,n=!1)):n?(n=!1,this.syntaxStackPtr=0):++this.syntaxStackPtr}return this.buffer},this.handleLoadEnd=e=>{if(this.pos+=e.loaded,this.def.on_progress(e),this.pko&&this.file&&(this.file.type==="application/x-gzip"||this.file.type==="application/gzip"?this.pko.push(new Uint8Array(e.target.result)):this.pko.onData(this.decoder.decode(e.target.result))),!this.aborted&&this.file&&this.pos<this.file.size){const n=this.file.slice(this.pos,this.pos+this.size);this.reader.readAsArrayBuffer(n)}else console.log("Left buffer length",this.buffer.length),this.def.on_done(this.buffer)},this.init=()=>{this.def=this,this.pos=0,this.aborted=!1,this.buffer="",this.syntaxStack=[this.syntax],this.syntaxStackPtr=0},this.parseFile=e=>{if(this.init(),this.file=e,this.pko=new age({chunkSize:5*this.size,to:"string"}),this.pko.onData=this.onData,!this.file)return this.def.on_error("File not found");const n=this.file.slice(this.pos,this.pos+this.size);this.reader.onloadend=this.handleLoadEnd,this.reader.onabort=r=>{this.def.on_abort(r)},this.reader.onerror=r=>{this.def.on_error(r)},this.reader.readAsArrayBuffer(n)},this.abort=()=>{this.reader.abort(),this.aborted=!0},this.syntax=[{token:/^\s*#[^\n]*/},{token:/^\s*VERSION\s+([^;]+);/,handler:()=>this.def.on_version},{token:/^\s*DIVIDERCHAR\s+(\S+)\s*;/,handler:()=>this.def.on_divideChar},{token:/^\s*BUSBITCHARS\s+(\S+)\s*;/,handler:()=>this.def.on_busBitChars},{token:/^\s*DESIGN\s+(\S+)\s*;/,handler:()=>this.def.on_beginDesign,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*TECHNOLOGY\s+(\S+)\s*;/,handler:()=>this.def.on_technology},{token:/^\s*UNITS DISTANCE MICRONS ([\d]+)\s*;/,handler:()=>this.def.on_units},{token:/^\s*HISTORY\s([^;]*);/,handler:()=>this.def.on_history}
419,{token:/^\s*PROPERTYDEFINITIONS\s*/,handler:()=>this.def.on_beginPropertyDefinitions,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*(COMPONENT|COMPONENTPIN|DESIGN|GROUP|NET|NONDEFAULTRULE|REGION|ROW|SPECIALNET)\s+([^;]+);/,handler:()=>this.def.on_propertyDefinition},{token:/^\s*END\s+PROPERTYDEFINITIONS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endPropertyDefinitions)}]},{token:/^\s*DIEAREA\s+((\(\s*\d+\s+\d+\s*\)\s*)+)\s*;/,handler:()=>e=>{const n=/\s*\(\s*([\d]+)\s+([\d]+)\s*\)\s*/;let r=e[0],o;const i=[];for(;o=n.exec(r);)i.push([parseFloat(o[1])/this.def.parserData.units,parseFloat(o[2])/this.def.parserData.units]),r=r.substring(o[0].length);this.def.on_dieArea(i)}},{token:/^\s*ROW\s+([^;]*);/,handler:()=>this.def.on_row},{token:/^\s*TRACKS\s([^;]+);/,handler:()=>this.def.on_tracks},{token:/^\s*GCELLGRID\s([^;]+);/,handler:()=>this.def.on_gcellGrid},{token:/^\s*VIAS\s+(\d+)\s*;/,handler:()=>this.def.on_beginVias,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-\s+([\S]+)\s+([\S]+)\s*([^;]+);/,handler:()=>this.def.on_via},{token:/^\s*END\s+VIAS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endVias)}]},{token:/^\s*STYLES\s+(\d+)\s*;/,handler:()=>this.def.on_beginStyles,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-\s+STYLE\s+(\d+)\s*([^;]+);/,handler:()=>this.def.on_style},{token:/^\s*END\s+STYLES/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endStyles)}]},{token:/^\s*NONDEFAULTRULES\s+(\d+)\s*;/,handler:()=>this.def.on_beginNonDefaultRules,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-\s+([\S]+)\s+([\S]+)\s*([^;]+);/,handler:()=>this.def.on_nonDefaultRule},{token:/^\s*END\s+NONDEFAULTRULES/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endNonDefaultRules)}]},{token:/^\s*REGIONS\s+(\d+)\s*;/,handler:()=>this.def.on_beginRegions,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-\s+([\S]+)\s+([\S]+)\s*([^;]+);/,handler:()=>this.def.on_region},{token:/^\s*END\s+REGIONS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endRegions)}]},{token:/^\s*COMPONENTMASKSHIFT\s([^;]*);/,handler:()=>this.def.on_componentMaskShift},{token:/^\s*COMPONENTS\s+(\d+)\s*;/,handler:()=>this.def.on_beginComponents,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-\s+(\S+)\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_component,syntax:[{token:/^\s*\+\s+EEQMASTER\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentEEQMaster},{token:/^\s*\+\s+SOURCE\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentSource},{token:/^\s*\+\s+FIXED\s+\(\s*(\d+)\s+(\d+)\s*\)\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentFixed},{token:/^\s*\+\s+COVER\s+\(\s*(\d)+\s+(\d+)\s*\)\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentCover},{token:/^\s*\+\s+PLACED\s+\(\s*(\d+)\s+(\d+)\s*\)\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentPlaced},{token:/^\s*\+\s+UNPLACED/,handler:()=>this.def.on_componentUnplaced},{token:/^\s*\+\s+MASKSHIFT\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentMaskShift},{token:/^\s*\+\s+HALO\s+(SOFT)*\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)(?=[\s;])/,handler:()=>this.def.on_componentHalo},{token:/^\s*\+\s+ROUTEHALO\s+(\d+)\s+(\S+)\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentRouteHalo},{token:/^\s*\+\s+WEIGHT\s+(\d+)(?=[\s;])/,handler:()=>this.def.on_componentWeight},{token:/^\s*\+\s+REGION\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_componentRegion},{token:/^\s*\+\s+PROPERTY/,syntax:[{token:/^\s*(?![;])(\S+)\s+(\d+|\S+|\"[\S\s\d]*\")(?=[\s;])/,handler:()=>this.def.on_componentProperty},{token:/^\s*;/,handler:()=>(this.syntaxStack.pop(),this.syntaxStack.pop(),this.syntaxStackPtr=0,()=>{})}]},{token:/^\s*;/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endComponent)}]},{token:/^\s*END\s+COMPONENTS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endComponents)}]},{token:/^\s*PINS\s+(\d+)\s*;/,handler:()=>this.def.on_beginPins,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_pin},{token:/^\s*END\s+PINS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endPins)}]},{token:/^\s*PINPROPERTIES\s+(\d+)\s*;/,handler:()=>this.def.on_beginPinProperties,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_pinProperty},{token:/^\s*END\s+PINPROPERTIES/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endPinProperties)}]},{token:/^\s*BLOCKAGES\s+(\d+)\s*;/,handler:()=>this.def.on_beginBlockages,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_blockage},{token:/^\s*END\s+BLOCKAGES/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endBlockages)}]},{token:/^\s*SLOTS\s+(\d+)\s*;/,handler:()=>this.def.on_beginSlots,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_slot},{token:/^\s*END\s+SLOTS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endSlots)}]},{token:/^\s*FILLS\s+(\d+)\s*;/,handler:()=>this.def.on_beginFills,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_fill},{token:/^\s*END\s+FILLS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endFills)}]},{token:/^\s*SPECIALNETS\s+(\d+)\s*;/,handler:()=>this.def.on_beginSpecialNets,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-\s+([^\s]+)(?=[\s])/,handler:()=>this.def.on_specialNetName,syntax:[{token:/^\s*\(\s*PIN\s+(\S+)\s*\)/,handler:()=>
419this.def.on_specialNetPinName},{token:/^\s*\(\s*(\S+)\s+(\S+)\s*\)/,handler:()=>this.def.on_specialNetComponentPinName},{token:/^\s*\+\s+SYNTHESIZED/,handler:()=>this.def.on_specialNetSynthesized},{token:/^\s*\+\s+VOLTAGE\s+(\d+)(?=[\s;])/,handler:()=>this.def.on_specialNetVoltage},{token:/^\s*\+\s+SOURCE\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_specialNetSource},{token:/^\s*\+\s+FIXEDBUMP/,handler:()=>this.def.on_specialNetFixedBump},{token:/^\s*\+\s+ORIGINAL\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_specialNetOriginal},{token:/^\s*\+\s+USE\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_specialNetUse},{token:/^\s*\+\s+PATTERN\s+(\S+)(?=[\s;])/,handler:()=>this.def.on_specialNetPattern},{token:/^\s*\+\s+ESTCAP\s+(\d+)(?=[\s;])/,handler:()=>this.def.on_specialNetEstCap},{token:/^\s*\+\s+WEIGHT\s+(\d+)(?=[\s;])/,handler:()=>this.def.on_specialNetWeight},{token:/^\s*\+\s+PROPERTY\s+([^;]+)/,syntax:[{token:/^\s*(?![;])(\S+)\s+(\d+|\S+|\"[\S\s\d]*\")(?=[\s;])/,handler:()=>this.def.on_specialNetProperty},{token:/^\s*;/,handler:()=>(this.syntaxStack.pop(),this.syntaxStack.pop(),this.syntaxStackPtr=0,()=>{})}]},{token:/^\s*\+\s+COVER/,handler:()=>this.def.on_specialNetCover},{token:/^\s*\+\s+FIXED/,handler:()=>this.def.on_specialNetFixed},{token:/^\s*\+\s+ROUTED/,handler:()=>this.def.on_specialNetRouted},{token:/^\s*\+\s+SHIELD\s+(\w+)/,handler:()=>this.def.on_specialNetShield},{token:/^\s*\+\s+SHAPE\s+(\w+)/,handler:()=>this.def.on_specialNetShape},{token:/^\s*\+\s+STYLE\s+(\d+)/,handler:()=>this.def.on_specialNetStyle},{token:/^\s*\+\s+MASK\s+(\w+)/,handler:()=>this.def.on_specialNetMask},{token:/^\s*\+\s+POLYGON\s+(\w+)\s+(\s*\(\s*\d+\s+\d+\s*\))+/,handler:()=>this.def.on_specialNetPolygon},{token:/^\s*\+\s+RECT\s+(\w+)\s+(\(\s*\d+\s+\d+\s*\))\s+(\(\s*\d+\s+\d+\s*\))/,handler:()=>this.def.on_specialNetRect},{token:/^\s*\+\s+VIA\s+(\w+)\s+(\w+)*\s+(\(\s*\d+\s+\d+\s*\))/,handler:()=>this.def.on_specialNetVia},{token:/^\s*NEW\s+(\w+)\s+(\w+)/,handler:()=>this.def.on_specialNetNew},{token:/^\s*(\w+)\s+(\d+)/,handler:()=>this.def.on_specialNetLayerWidth},{token:/^\s*(MASK\s+\d+\s+)*(\w+)\s*(N|W|E|S|FN|FS|FW|FE)*(\s+DO\s+\d+\s+BY\s+\d+\s+STEP\s+\d+\s+\d+)*/,handler:()=>this.def.on_specialNetRoutingPoint},{token:/^\s*(MASK\s+\d+\s+)*\(\s*(\d+)\s+(\d+)(\s+\d+)*\s*\)/,handler:()=>this.def.on_specialNetRoutingPoint},{token:/^\s*;/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endSpecialNet)}]},{token:/^\s*END\s+SPECIALNETS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endSpecialNets)}]},{token:/^\s*NETS\s+(\d+)\s*;/,handler:()=>this.def.on_beginNets,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_net},{token:/^\s*END\s+NETS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endNets)}]},{token:/^\s*SCANCHAINS\s+(\d+)\s*;/,handler:()=>this.def.on_beginScanChains,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_scanChain},{token:/^\s*END\s+SCANCHAINS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endScanChains)}]},{token:/^\s*GROUPS\s+(\d+)\s*;/,handler:()=>this.def.on_beginGroups,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*\-([^;]+);/,handler:()=>this.def.on_group},{token:/^\s*END\s+GROUPS/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endGroups)}]},{token:/^\s*BEGINEXT\s+([^\r\n]*)[\n\r]+/,handler:()=>this.def.on_beginExt,syntax:[{token:/^\s*#[^\n]*/},{token:/^\s*(^ENDEXT|[^\r\n]*)[\r\n]+/,handler:()=>this.def.on_ext},{token:/^\s*ENDEXT/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endExt)}]}]},{token:/^\s*ENDs\+DESIGN/,handler:()=>(this.syntaxStack.pop(),this.syntaxStackPtr=0,this.def.on_endDesign())}],this.parserData={units:1}}on_version(){}on_divideChar(){}on_busBitChars(){}on_beginDesign(e){}on_endDesign(){}on_technology(){}on_units(){}on_history(){}on_beginPropertyDefinitions(){}on_endPropertyDefinitions(){}on_propertyDefinition(){}on_dieArea(e){}on_row(){}on_gcellGrid(){}on_beginVias(){}on_endVias(){}on_via(){}on_beginStyles(){}on_endStyles(){}on_style(){}on_beginNonDefaultRules(){}on_endNonDefaultRules(){}on_nonDefaultRule(){}on_beginRegions(){}on_endRegions(){}
419on_region(){}on_tracks(){}on_componentMaskShift(){}on_beginComponents(){}on_endComponents(){}on_component(e){}on_componentSource(){}on_componentEEQMaster(){}on_componentFixed(e){}on_componentPlaced(e){}on_componentCover(e){}on_componentUnplaced(){}on_componentHalo(){}on_componentRouteHalo(){}on_componentWeight(){}on_componentRegion(){}on_componentProperty(){}on_endComponent(){}on_beginPins(){}on_endPins(){}on_pin(){}on_beginPinProperties(){}on_endPinProperties(){}on_pinProperty(){}on_beginBlockages(){}on_endBlockages(){}on_blockage(){}on_beginSlots(){}on_endSlots(){}on_slot(){}on_beginFills(){}on_endFills(){}on_fill(){}on_beginSpecialNets(){}on_endSpecialNets(){}on_specialNetName(){}on_specialNetPinName(){}on_specialNetComponentPinName(){}on_specialNetSynthesized(){}on_specialNetVoltage(){}on_specialNetSource(){}on_specialNetFixedBump(){}on_specialNetOriginal(){}on_specialNetUse(){}on_specialNetPattern(){}on_specialNetEstCap(){}on_specialNetWeight(){}on_specialNetProperty(){}on_specialNetCover(){}on_specialNetFixed(){}on_specialNetRouted(){}on_specialNetShield(){}on_specialNetShape(){}on_specialNetMask(){}on_specialNetPolygon(){}on_specialNetRect(){}on_specialNetVia(){}on_specialNetNew(){}on_specialNetLayerWidth(){}on_specialNetRoutingPoint(){}on_specialNetStyle(){}on_endSpecialNet(){}on_beginNets(){}on_endNets(){}on_net(){}on_beginScanChains(){}on_endScanChains(){}on_scanChain(){}on_beginGroups(){}on_endGroups(){}on_group(){}on_beginExt(){}on_endExt(){}on_ext(){}on_abort(e){}on_error(e){}on_progress(e){}on_done(e){}}var Og=(t=>(t.N="N",t.S="S",t.W="W",t.E="E",t.FN="FN",t.FS="FS",t.FW="FW",t.FE="FE",t))(Og||{});const U5={parseLefFile:({e:t,updateHandler:e})=>new Promise((n,r)=>{if(!t.target.files||!t.target.files[0]){console.log("lefInstance, No file selected"),n(null);return}const o=new vbt;o.parseFile(t.target.files[0]);const i=[];let s=null;o.on_progress=a=>{},o.on_abort=()=>{console.log("lefInstance Aborted")},o.on_error=()=>{console.log("lefInstance Error"),r(new Error("lefInstance Parsing error"))},o.on_done=()=>{console.log("lefInstance Done",{designs:i}),n(i)},o.on_beginMacro=a=>{s={name:a[0],supplies:[],outline:[]}},o.on_macroEnd=()=>{s&&i.push(s),s=null},o.on_macroSize=a=>{if(!s){console.log("lefInstance, No design created");return}console.log({size:a}),s.outline=[{x:0,y:0},{x:+a[0],y:0},{x:+a[0],y:+a[1]},{x:0,y:+a[1]},{x:0,y:0}]}}),parseDefFile:({e:t,updateHandler:e})=>new Promise((n,r)=>{if(!t.target.files||!t.target.files[0]){console.log("defInstance, No file selected"),n(null);return}const o=new bbt;o.parseFile(t.target.files[0]);let i=null;const s=[];let a={name:"none",master_name:"none",origin_x:0,origin_y:0,orientation:void 0};o.on_progress=l=>{},o.on_abort=()=>{console.log("defInstance Aborted")},o.on_error=()=>{console.log("defInstance Error"),r(new Error("defInstance Parsing error"))},o.on_done=l=>{console.log("defInstance Done",i,s),n({top:i,components:s})},o.on_beginDesign=l=>{i={name:l[0],outline:[]}},o.on_dieArea=l=>{if(!i){console.log("defInstance, No top created");return}i.outline=[{x:+l[0][0],y:+l[0][1]},{x:+l[1][0],y:+l[0][1]},{x:+l[1][0],y:+l[1][1]},{x:+l[0][0],y:+l[1][1]}]},o.on_component=l=>{a={name:l[0],master_name:l[1],origin_x:0,origin_y:0,orientation:void 0}},o.on_componentCover=l=>{a.origin_x=+l[0],a.origin_y=+l[1],a.orientation=l[2]},o.on_componentPlaced=l=>{a.origin_x=+l[0],a.origin_y=+l[1],a.orientation=l[2]},o.on_componentFixed=l=>{a.origin_x=+l[0],a.origin_y=+l[1],a.orientation=l[2]},o.on_endComponent=()=>{a?.origin_x&&a?.origin_y&&!isNaN(a.origin_x)&&!isNaN(a.origin_y)&&s.push(a)}}),transformOutline:({outline:t,origin:e,orientation:n})=>{let r;switch(n){case Og.N:r=t;break;case Og.E:r=t.map(o=>({x:o.y,y:-o.x}));break;case Og.S:r=t.map(o=>({x:-o.x,y:-o.y}));break;case Og.W:r=t.map(o=>({x:-o.y,y:o.x}));break;case Og.FN:r=t.map(o=>({x:-o.x,y:o.y}));break;case Og.FE:r=t.map(o=>({x:-o.y,y:-o.x}));break;case Og.FS:r=t.map(o=>({x:o.x,y:-o.y}));break;case Og.FW:r=t.map(o=>({x:o.y,y:o.x}));break;default:throw new Error(`Invalid orientation ${n}`)}return r=r.map(o=>({x:o.x+e.x,y:o.y+e.y})),r}},fD=Nr.injectEndpoints({endpoints:t=>({getProjectMacros:t.query({query:({projectId:e})=>`${dt.projectMacros}/${e}`,providesTags:["ProjectMacros"],transformResponse:(e,n,r)=>e}),createProjectMacros:t.mutation({query:({macros:e,projectId:n})=>({url:`${dt.projectMacros}`,method:"POST",body:{macros:e,projectId:n}}),async onQueryStarted({macros:e,projectId:n},{dispatch:r,queryFulfilled:o}){const i=r(fD.util.updateQueryData("getProjectMacros",{projectId:n},s=>{s.length?s.reduce((a,l)=>{if(!l)a.push(...e);
419else{const c=e.find(u=>u.id===l.id);a.push(c||l)}return a},[]):s.push(...e)}));try{await o}catch{i.undo()}},transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:["ProjectMacros"]}),deleteProjectMacros:t.query({query:({id:e,projectId:n})=>({url:`${dt.projectMacros}/${e}/${n}`,method:"DELETE"}),async onQueryStarted({id:e,projectId:n},{dispatch:r,queryFulfilled:o}){const i=r(fD.util.updateQueryData("getProjectMacros",{projectId:n},s=>{s.filter(a=>a.id!==e)}));try{await o}catch{i.undo()}},transformResponse:(e,n,r)=>e}),getProjectMacroInstances:t.query({query:({projectId:e})=>`${dt.projectMacroInstances}/${e}`,providesTags:["ProjectMacroInstances"],transformResponse:(e,n,r)=>e}),createProjectMacroInstances:t.mutation({query:({topMacro:e,macroInstances:n,projectId:r})=>({url:`${dt.projectMacroInstances}`,method:"POST",body:{topMacro:e,macroInstances:n,projectId:r}}),async onQueryStarted({topMacro:e,macroInstances:n,projectId:r},{dispatch:o,queryFulfilled:i}){const s=o(fD.util.updateQueryData("getProjectMacroInstances",{projectId:r},a=>{a.splice(0,a.length,...n)}));try{await i}catch{s.undo()}},transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:(e,n,r)=>["ProjectComponents","ProjectMacros","ProjectMacroInstances"]})})}),{useGetProjectMacrosQuery:Cbt,useCreateProjectMacrosMutation:Sbt,useGetProjectMacroInstancesQuery:Ebt,useCreateProjectMacroInstancesMutation:xbt}=fD,qJ="In development",YJ=!0,wbt=({uploadMenuAnchorEl:t,setUploadMenuAnchorEl:e,projectId:n})=>{const r=C.useRef(null),o=C.useRef(null),i=bt(_Ne),s=bt(Dc),a=C.useMemo(()=>{if(s.sharedProjects)return st.projectShouldPoll(i&&!!s.sharedProjects.length&&!!s.sharedProjects.find(v=>v.projectId===n))},[i,s.sharedProjects,n]),{data:l,isLoading:c}=Cbt({projectId:n},{...a}),{data:u,isLoading:d}=Ebt({projectId:n},{...a}),[h]=Sbt(),[f]=xbt(),p=()=>e(null),m=C.useCallback((v,b,S)=>{const w=S&&S.length>0;h({projectId:b,macros:v.map(A=>{if(w){const _=S.find(P=>P.name===A.name);if(_)return _}return{...A,projectId:b,id:Uo()}})}).then(A=>{}).catch(A=>{})},[]),y=C.useCallback((v,b,S,w)=>{const A={...S,projectId:w,id:Uo()},_=v.reduce((R,O)=>(R[O.name]=O,R),{});_[A.name]=A;const P=b.reduce((R,O)=>{const N=O.master_name?_[O.master_name]:null;if(!N)return R;const M={name:O.name,id:Uo(),projectId:w,topId:A.id,masterId:N.id,origin_x:O.origin_x,origin_y:O.origin_y,orientation:O.orientation,outline:U5.transformOutline({outline:N.outline,origin:{x:O.origin_x,y:O.origin_y},orientation:O.orientation})};return R.push(M),R},[]);f({projectId:w,topMacro:A,macroInstances:P}).then(R=>{}).catch(R=>{})},[]);return c||d?g(tl,{}):g(Es,{open:!!t,anchorEl:t,onClose:p,children:K(iw,{sx:{py:0},children:[g(RC,{title:qJ,disablePadding:!0,sx:{display:"block"},onClick:()=>{},children:K(WI,{disabled:YJ,sx:{minHeight:48,px:2.5},children:[g(ff,{sx:{minWidth:0,justifyContent:"center"},children:g(L4,{})}),g(Il,{primary:"Upload LEF"}),g(J1,{type:"file",inputRef:r,inputProps:{accept:["*.lef"]},onChange:async v=>{if(!n)return;const b=await U5.parseLefFile({e:v});b&&(m(b,n,l),v.target.value="")},style:{display:"none"}})]})},"Upload LEF"),g(RC,{title:qJ,disablePadding:!0,sx:{display:"block"},onClick:()=>{},children:K(WI,{disabled:YJ,sx:{minHeight:48,px:2.5},children:[g(ff,{sx:{minWidth:0,justifyContent:"center"},children:g(L4,{})}),g(Il,{primary:"Upload DEF"}),g(J1,{type:"file",inputRef:o,inputProps:{accept:["*.def"]},onChange:async v=>{if(!n||!l||!l.length)return;const b=await U5.parseDefFile({e:v});!b||!b.top||(console.log(b),y(l,b?.components||[],b.top,n),v.target.value="")},style:{display:"none"}})]})},"Upload DEF")]})})};var Nn=(t=>(t.SYSTEM_CONFIG="System Config",t.PROJECT_OVERVIEW="Project Overview",t.TOPOLOGY_VALIDATION="Topology Validation",t.AUTO_ROUTE="Auto Route",t.GENERATE_RTL="Generate RTL",t.SIMULATE_RTL="Simulate RTL",t.EXPORT_RTL="Export RTL",t.IMPLEMENT="Implement",t.RESULTS="Results",t.DOWNLOAD_JSON="Download JSON (Internal Use Only)",t.FLOOR_PLAN="Floor Plan",t.FIT_ALL_COMPONENTS="Fit All Components",t.AUTO_PLACE_COMPONENTS="Auto Place Components",t))(Nn||{});const lge={getActiveCenterPanelView:t=>{switch(t){case Un.DESIGN:return"Design View";case Un.PERFORMANCE_MATRIX:return"Performance Matrix View";case Un.ACCESS_MAP:return"Access Map View";case Un.CONFIGURABLE_TEST:return"Configurable Test View";case Un.ADDRESS_MAP:return"Address Map View";case Un.REGISTER_MAP:return"Register Map View";default:return""}}},Abt=t=>{const{data:e}=vue({projectId:t});return e},Tbt=t=>{const{isLoading:e}=vue({projectId:t});return e},_bt=t=>{const{data:e=[]}=R7e({integrationId:t});return e},Ibt=t=>{const{data:e=0}=D7e(t);return e},Pbt=t=>{const{data:e=0}=L7e(t);return e},rc={getById:Abt,getProjectIsLoading:Tbt,getAllByIntegrationId:_bt,getAllCount:Ibt,getAllSharedByUserIdCount:Pbt},Rbt=Nr.injectEndpoints({endpoints:t=>({getAllProjectConnectionNcnocByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectNcnocConnections}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectNcnocConnections],transformResponse:(e,n,r)=>e}),createProjectConnectionNcnoc:t.mutation({query:({requestBody:e})=>({url:`${dt.projectNcnocConnections}
419`,method:nn.POST,body:e}),transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectValidator,We.ProjectRoutes,We.RoutingTable,We.ProjectComponentsTree,We.ProjectRegister,We.Connections,We.ProjectComponentsReachability]})})}),{useGetAllProjectConnectionNcnocByProjectIdQuery:Obt,useCreateProjectConnectionNcnocMutation:Nbt}=Rbt,Mbt=t=>{const{data:e=[]}=Rm(t);return e[Fe.INITIATORS]},Dbt=t=>{const{data:e=[]}=Rm(t);return e[Fe.TARGETS]},Lbt=t=>{const{data:e=[]}=Rm(t);return e[Fe.ROUTERS]},kbt=t=>{const{data:e=[]}=Rm(t);return e[Fe.BRIDGES]},Fbt=t=>{const e={initiators:[],routers:[],targets:[],bridges:[]},{data:n=e}=Rm(t);return n},Bbt=t=>{const{data:e=[]}=Obt({projectId:t});return e.filter(n=>n.type===pi.ROUTERS)},Vo={getAllTypeInitiatorByProjectId:Mbt,getAllTypeTargetByProjectId:Dbt,getAllTypeRouterByProjectId:Lbt,getAllTypeBridgeByProjectId:kbt,getAllMappedByType:Fbt,getAllTypeRouterByProjectIdX6:Bbt},$bt=({projectId:t,autoRouteMenuAnchorEl:e,setAutoRouteMenuAnchorEl:n,setAutoRouteBadgeVisible:r})=>{const o=bt(qP),i="Status:",s="Run",a="Success",l="Error",c="Outdated",u="Cached",d="large",h="OK",f="Protocol Limited",p="Auto Route will overwrite all existing routes",m="Connections have been modified. Check Routing.",y="Unable to run Auto Route at this time.",[v,{isLoading:b}]=F7e(),S=Vo.getAllMappedByType(t),[w,A]=C.useState(""),[_,P]=C.useState(""),[R,O]=C.useState({}),N=Yn(),M=bt(DNe),L=M===h,F=()=>{n(null),b||r(!1)},$=async()=>{r(!1),A(""),P(""),N(zT(""));const k=await v({projectId:t,userId:o});if(r(!0),"data"in k){const U=k.data;N(zT(U)),O(S)}else N(zT(y))},D=()=>{switch(M){case SL:return g(rn,{title:u,placement:"right",children:g(A6e,{fontSize:d})});case h:case f:return g(rn,{title:a,placement:"right",children:g(Vv,{fontSize:d,color:"success"})});case DH:return g(rn,{title:c,placement:"right",children:g(t8e,{fontSize:d,color:"warning"})});default:return g(rn,{title:l,placement:"right",children:g(TW,{fontSize:d,color:"error"})})}};return C.useEffect(()=>{switch(M){case SL:case h:case f:P(""),A("");break;case DH:P(m),A("");break;default:P(""),A(M)}},[M]),C.useEffect(()=>{Tt.every(R,U=>Tt.isArray(U)&&U.length===0)?O(S):Tt.isEqual(R,S)||(N(zT(DH)),r(!0))},[S]),g(Es,{open:!!e,anchorEl:e,onClose:F,children:K(Mt,{direction:"column",sx:{width:"220px",px:1},gap:1,children:[K(Mt,{direction:"row",gap:.5,children:[K(Ke,{display:"flex",alignItems:"center",gap:.5,width:"80%",children:[i,b?g(Ni,{size:24}):D()]}),g(rn,{title:p,placement:"right",children:g(Sn,{variant:"contained",fullWidth:!0,sx:{height:"30px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.8}},disabled:b||L,onClick:$,children:s})})]}),w?K(le,{children:[g(yi,{}),g(Ke,{fontSize:12,sx:{color:"white",backgroundColor:"darkRed"},children:w})]}):null,_?K(le,{children:[g(yi,{}),g(Ke,{fontSize:12,sx:{color:"white",backgroundColor:"darkOrange"},children:_})]}):null,g(yi,{}),K(Ke,{fontSize:12,display:"flex",alignItems:"center",gap:1,children:[g(a8e,{fontSize:"medium",color:"warning"}),p]})]})})},Hbt=({user:t,projectId:e,activeTab:n,components:r,configurableTestSequence:o,setConfigurableTestSequence:i,setSelectedNcnocComponent:s})=>{const a=Yn(),l=bt(nae),c=bt(jP),u=bt(Qx),d=u&&c.isUserBranchControlVisible?u:c.rtlBranchId,h=rc.getById(e),f=Wp.getByProjectId(e),[p,{isLoading:m}]=xue(),[y]=wue(),[v,b]=C.useState(null),[S,w]=C.useState(!1),[A,_]=C.useState(!1),[P,R]=C.useState(!1),[O,N]=C.useState(!1),[M,L]=C.useState(!1),[F,$]=C.useState(null),[D,k]=C.useState(null),[U,H]=C.useState(null),[V,q]=C.useState(!1),[J,Q]=C.useState(go.GENERATE_NCNOC),[se,oe]=C.useState(""),[ie,ee]=C.useState(null),[re,fe]=C.useState(Object.values(Nn).reduce((_e,Oe)=>(_e[Oe]=!0,_e),{})),{width:we,height:xe}=sc(),{diagramWidth:ve,diagramHeight:Re}=st.getStageDimensions({width:we,height:xe}),{data:pe=[]}=Eue(h.id,{skip:!h.id,pollingInterval:P||O||M?yfe:0}),Be=!V,ke=()=>{s(null),a(I_()),a(pd(!0))},Ne=({event:_e,activeTaskType:Oe})=>{_e.stopPropagation(),H(_e.currentTarget),Q(Oe)},ot=_e=>{_e.stopPropagation(),ee(Oe=>Oe?null:_e.currentTarget)},ce=()=>{p({projectId:e,userId:t.id,rtlBranchId:d}).then(_e=>{if(_e?.data){const Oe=document.createElement("a"),ze=new Blob([JSON.stringify(_e?.data,null,4)],{type:"text/plain"});Oe.href=URL.createObjectURL(ze),Oe.download=`${h.name}.json`,Oe.click()}else ln.error(Ep.DOWNLOAD_JSON_FAILED)}).catch(()=>{ln.error(Ep.DOWNLOAD_JSON_FAILED)})},Ae=async({event:_e,taskId:Oe})=>{_e.stopPropagation(),ln.info(Ep.DOWNLOAD_INITIATED);const ze=await y({projectId:h.id,taskId:Oe}).unwrap();ze.includes("http")?setTimeout(()=>window.location.href=ze,100):ln.error(Ep.DOWNLOAD_FAILED)},be=(_e,Oe)=>{fe(ze=>({...ze,[_e]:Oe}))},Se=_e=>{fe(()=>Object.values(Nn).reduce((ze,ne)=>(ze[ne]=_e,ze),{}))},Pe=_e=>re[_e]?Nn.GENERATE_RTL===_e?Nn.GENERATE_RTL:_e:se,Ue=_e=>{R(!1),N(!1),L(!1),_e.forEach(Oe=>{if(Oe.status===fo.PENDING||Oe.status===fo.RUNNING)switch(Oe.description){case go.GENERATE_NCNOC:R(!0);break;case go.SIMULATE_NCNOC:N(!0);break;case go.EXPORT_NCNOC:L(!0)}})};return C.useEffect(()=>{Ue(pe)},[pe]),C.useEffect(()=>{if(!A){_(!0);return}P||O||M||ln.info(Ep.RESULTS_UPDATED)},[P,O,M]),C.useEffect(()=>{Se(!0),n!==Un.DESIGN&&(be(Nn.FLOOR_PLAN,!1),be(Nn.FIT_ALL_COMPONENTS,!1),be(Nn.AUTO_PLACE_COMPONENTS,!1)),oe(`Feature not available in ${lge.getActiveCenterPanelView(n)}`)}
419,[n]),K(Mt,{direction:"row",sx:{p:"5px",width:"100%",flexWrap:"wrap",alignItems:"center",backgroundColor:tt},children:[g(Pi,{tooltipMessage:ie?"":Pe(Nn.TOPOLOGY_VALIDATION),icon:g(Zpt,{isFrequencyValidationEnabled:f.isFrequencyValidationEnabled,projectId:h.id,ncnocTopologyValidatorAnchorEl:ie,setNcnocTopologyValidatorAnchorEl:ee,setIsNcnocTopologyValid:q,isSystemAddressInterleavingEnabled:f.isAddressInterleavingEnabled,systemDataWidth:f.dataWidth}),isFeatureEnabled:re[Nn.TOPOLOGY_VALIDATION],handleActionBarButtonClick:ot}),g(qg,{}),g(Pi,{tooltipMessage:Pe(Nn.AUTO_ROUTE),icon:g(Ca,{invisible:!S,color:"warning",variant:"dot",children:g($ce,{})}),isFeatureEnabled:re[Nn.AUTO_ROUTE],handleActionBarButtonClick:_e=>{_e.stopPropagation(),b(_e.currentTarget)}}),g(qg,{}),g(Pi,{tooltipMessage:Pe(Nn.GENERATE_RTL),icon:g(Ca,{invisible:!P,color:"warning",variant:"dot",children:g(wW,{})}),isFeatureEnabled:re[Nn.GENERATE_RTL],handleActionBarButtonClick:_e=>Ne({event:_e,activeTaskType:go.GENERATE_NCNOC})}),g(Pi,{tooltipMessage:Pe(Nn.SIMULATE_RTL),icon:g(Ca,{invisible:!O,color:"warning",variant:"dot",children:g(Oce,{})}),isFeatureEnabled:re[Nn.SIMULATE_RTL],handleActionBarButtonClick:_e=>Ne({event:_e,activeTaskType:go.SIMULATE_NCNOC})}),g(Pi,{tooltipMessage:Pe(Nn.EXPORT_RTL),icon:g(Ca,{invisible:!M,color:"warning",variant:"dot",children:g(Dce,{})}),isFeatureEnabled:re[Nn.EXPORT_RTL],handleActionBarButtonClick:_e=>Ne({event:_e,activeTaskType:go.EXPORT_NCNOC})}),g(Pi,{tooltipMessage:Pe(Nn.IMPLEMENT),icon:g(Bce,{}),isFeatureEnabled:re[Nn.IMPLEMENT],handleActionBarButtonClick:_e=>{_e.stopPropagation(),$(_e.currentTarget)}}),g(qg,{}),c.canDownloadJson?K(le,{display:"flex",alignItems:"center",children:[g(Pi,{tooltipMessage:Pe(Nn.DOWNLOAD_JSON),icon:m?g(Ni,{size:20}):g(Rce,{}),isFeatureEnabled:re[Nn.DOWNLOAD_JSON],handleActionBarButtonClick:ce}),g(qg,{})]}):null,g(Pi,{tooltipMessage:Pe(Nn.FLOOR_PLAN),icon:g(S6e,{}),isFeatureEnabled:re[Nn.FLOOR_PLAN],handleActionBarButtonClick:_e=>{_e.stopPropagation(),k(_e.currentTarget)}}),g(qg,{}),g(Pi,{tooltipMessage:Pe(Nn.FIT_ALL_COMPONENTS),icon:g(c8e,{}),isFeatureEnabled:re[Nn.FIT_ALL_COMPONENTS],handleActionBarButtonClick:()=>{a(AL(st.sceneFitObjects({elementsArray:[...r.initiators,...r.targets,...r.routers,...r.cRouters,...r.cTargets],diagramWidth:ve,diagramHeight:Re})))}}),g(Pi,{tooltipMessage:Pe(Nn.AUTO_PLACE_COMPONENTS),icon:l?g(Ni,{size:20}):g(K6e,{}),isFeatureEnabled:re[Nn.AUTO_PLACE_COMPONENTS]||l,handleActionBarButtonClick:()=>a(Jse(!0))}),g(le,{sx:{flexGrow:1}}),g(Pi,{tooltipMessage:Pe(Nn.SYSTEM_CONFIG),icon:g(OW,{}),isFeatureEnabled:re[Nn.SYSTEM_CONFIG],handleActionBarButtonClick:()=>ke()}),g($bt,{projectId:h.id,autoRouteMenuAnchorEl:v,setAutoRouteMenuAnchorEl:b,setAutoRouteBadgeVisible:w}),g(Ape,{project:h,ncnocSystem:f,tasks:pe,user:t,userGroup:c,tasksMenuAnchorEl:U,activeTaskType:J,configurableTestSequence:o,setConfigurableTestSequence:i,setTasksMenuAnchorEl:H,handleDownloadTaskResult:Ae,isTopologyInvalid:Be,exportAuthLevel:c.exportAuthLevel}),g(Uyt,{implementMenuAnchorEl:F,setImplementMenuAnchorEl:$}),g(wbt,{uploadMenuAnchorEl:D,setUploadMenuAnchorEl:k,projectId:h.id})]})};var Ubt=Math.PI/180;function zbt(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const A1=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Cn={_global:A1,version:"8.4.3",isBrowser:zbt(),isUnminified:/param/.test(function(t){}.toString()),dblClickWindow:400,getAngle(t){return Cn.angleDeg?t*Ubt:t},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return Cn.DD.isDragging},isDragReady(){return!!Cn.DD.node},releaseCanvasOnDestroy:!0,document:A1.document,_injectGlobal(t){A1.Konva=t}},ns=t=>{Cn[t.prototype.getClassName()]=t};Cn._injectGlobal(Cn);class Ku{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Ku(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var n=this.m;
419return{x:n[0]*e.x+n[2]*e.y+n[4],y:n[1]*e.x+n[3]*e.y+n[5]}}translate(e,n){return this.m[4]+=this.m[0]*e+this.m[2]*n,this.m[5]+=this.m[1]*e+this.m[3]*n,this}scale(e,n){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=n,this.m[3]*=n,this}rotate(e){var n=Math.cos(e),r=Math.sin(e),o=this.m[0]*n+this.m[2]*r,i=this.m[1]*n+this.m[3]*r,s=this.m[0]*-r+this.m[2]*n,a=this.m[1]*-r+this.m[3]*n;return this.m[0]=o,this.m[1]=i,this.m[2]=s,this.m[3]=a,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,n){var r=this.m[0]+this.m[2]*n,o=this.m[1]+this.m[3]*n,i=this.m[2]+this.m[0]*e,s=this.m[3]+this.m[1]*e;return this.m[0]=r,this.m[1]=o,this.m[2]=i,this.m[3]=s,this}multiply(e){var n=this.m[0]*e.m[0]+this.m[2]*e.m[1],r=this.m[1]*e.m[0]+this.m[3]*e.m[1],o=this.m[0]*e.m[2]+this.m[2]*e.m[3],i=this.m[1]*e.m[2]+this.m[3]*e.m[3],s=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],a=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=o,this.m[3]=i,this.m[4]=s,this.m[5]=a,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*e,r=-this.m[1]*e,o=-this.m[2]*e,i=this.m[0]*e,s=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=o,this.m[3]=i,this.m[4]=s,this.m[5]=a,this}getMatrix(){return this.m}decompose(){var e=this.m[0],n=this.m[1],r=this.m[2],o=this.m[3],i=this.m[4],s=this.m[5],a=e*o-n*r;let l={x:i,y:s,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||n!=0){var c=Math.sqrt(e*e+n*n);l.rotation=n>0?Math.acos(e/c):-Math.acos(e/c),l.scaleX=c,l.scaleY=a/c,l.skewX=(e*r+n*o)/a,l.skewY=0}else if(r!=0||o!=0){var u=Math.sqrt(r*r+o*o);l.rotation=Math.PI/2-(o>0?Math.acos(-r/u):-Math.acos(r/u)),l.scaleX=a/u,l.scaleY=u,l.skewX=0,l.skewY=(e*r+n*o)/a}return l.rotation=Je._getRotation(l.rotation),l}}var Vbt="[object Array]",Gbt="[object Number]",Wbt="[object String]",jbt="[object Boolean]",qbt=Math.PI/180,Ybt=180/Math.PI,z5="#",Xbt="",Kbt="0",Qbt="Konva warning: ",XJ="Konva error: ",Zbt="rgb(",V5={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
419ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Jbt=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,XN=[];const eCt=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(t){setTimeout(t,60)},Je={_isElement(t){return!!(t&&t.nodeType==1)},_isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject(t){return!!t&&t.constructor===Object},_isArray(t){return Object.prototype.toString.call(t)===Vbt},_isNumber(t){return Object.prototype.toString.call(t)===Gbt&&!isNaN(t)&&isFinite(t)},_isString(t){return Object.prototype.toString.call(t)===Wbt},_isBoolean(t){return Object.prototype.toString.call(t)===jbt},isObject(t){return t instanceof Object},isValidSelector(t){if(typeof t!="string")return!1;var e=t[0];return e==="#"||e==="."||e===e.toUpperCase()},_sign(t){return t===0||t>0?1:-1},requestAnimFrame(t){XN.push(t),XN.length===1&&eCt(function(){const e=XN;XN=[],e.forEach(function(n){n()})})},createCanvasElement(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch{}return t},createImageElement(){return document.createElement("img")},_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,e){var n=Je.createImageElement();n.onload=function(){e(n)},n.src=t},_rgbToHex(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb(t){t=t.replace(z5,Xbt);var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:e&255}},getRandomColor(){for(var t=(Math.random()*16777215<<0).toString(16);t.length<6;)t=Kbt+t;return z5+t},getRGB(t){var e;return t in V5?(e=V5[t],{r:e[0],g:e[1],b:e[2]}):t[0]===z5?this._hexToRgb(t.substring(1)):t.substr(0,4)===Zbt?(e=Jbt.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA(t){return t=t||"black",Je._namedColorToRBA(t)||Je._hex3ColorToRGBA(t)||Je._hex4ColorToRGBA(t)||Je._hex6ColorToRGBA(t)||Je._hex8ColorToRGBA(t)||Je._rgbColorToRGBA(t)||Je._rgbaColorToRGBA(t)||Je._hslColorToRGBA(t)},_namedColorToRBA(t){var e=V5[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(t.indexOf("rgb(")===0){t=t.match(/rgb\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(t.indexOf("rgba(")===0){t=t.match(/rgba\(([^)]+)\)/)[1];var e=t.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if(t[0]==="#"&&t.length===9)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if(t[0]==="#"&&t.length===7)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if(t[0]==="#"&&t.length===5)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if(t[0]==="#"&&t.length===4)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),r=Number(n[0])/360,o=Number(n[1])/100,i=Number(n[2])/100;let s,a,l;if(o===0)return l=i*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};i<.5?s=i*(1+o):s=i+o-i*o;const c=2*i-s,u=[0,0,0];for(let d=0;d<3;d++)a=r+1/3*-(d-1),a<0&&a++,a>1&&a--,6*a<1?l=c+(s-c)*6*a:2*a<1?l=s:3*a<2?l=c+(s-c)*(2/3-a)*6:l=c,u[d]=l*255;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection(t,e){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)},cloneObject(t){var e={};for(var n in t)this._isPlainObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray(t){return t.slice(0)},degToRad(t){return t*qbt},radToDeg(t){return t*Ybt},_degToRad(t){return Je.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),Je.degToRad(t)},_radToDeg(t){return Je.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),Je.radToDeg(t)},_getRotation(t){return Cn.angleDeg?Je.radToDeg(t):t},_capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw(t){throw new Error(XJ+t)},error(t){console.error(XJ+t)},warn(t){Cn.showWarnings&&console.warn(Qbt+t)},each(t,e){for(var n in t)e(n,t[n])},_inRange(t,e,n){return e<=t&&t<n},_getProjectionToSegment(t,e,n,r,o,i){var s,a,l,c=(t-n)*(t-n)+(e-r)*(e-r);if(c==0)s=t,a=e,l=(o-n)*(o-n)+(i-r)*(i-r);else{var u=((o-t)*(n-t)+(i-e)*(r-e))/c;u<0?(s=t,a=e,l=(t-o)*(t-o)+(e-i)*(e-i)):u>1?(s=n,a=r,l=(n-o)*(n-o)+(r-i)*(r-i)):(s=t+u*(n-t),a=e+u*(r-e),l=(s-o)*(s-o)+(a-i)*(a-i))}return[s,a,l]},_getProjectionToLine(t,e,n){var r=Je.cloneObject(t),o=Number.MAX_VALUE;return e.forEach(function(i,s){if(!(!n&&s===e.length-1)){var a=e[(s+1)%e.length],l=Je._getProjectionToSegment(i.x,i.y,a.x,a.y,t.x,t.y),c=l[0],u=l[1],d=l[2];d<o&&(r.x=c,r.y=u,o=d)}}),r},_prepareArrayForTween(t,e,n){var r,o=[],i=[];if(t.length>e.length){var s=e;e=t,t=s}for(r=0;r<t.length;r+=2)o.push({x:t[r],y:t[r+1]});for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});var a=[];
419return i.forEach(function(l){var c=Je._getProjectionToLine(l,o,n);a.push(c.x),a.push(c.y)}),a},_prepareToStringify(t){var e;t.visitedByCircularReferenceRemoval=!0;for(var n in t)if(t.hasOwnProperty(n)&&t[n]&&typeof t[n]=="object"){if(e=Object.getOwnPropertyDescriptor(t,n),t[n].visitedByCircularReferenceRemoval||Je._isElement(t[n]))if(e.configurable)delete t[n];else return null;else if(Je._prepareToStringify(t[n])===null)if(e.configurable)delete t[n];else return null}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(var n in e)t[n]=e[n];return t},_getFirstPointerId(t){return t.touches?t.changedTouches[0].identifier:t.pointerId||999},releaseCanvas(...t){Cn.releaseCanvasOnDestroy&&t.forEach(e=>{e.width=0,e.height=0})},drawRoundedRectPath(t,e,n,r){let o=0,i=0,s=0,a=0;typeof r=="number"?o=i=s=a=Math.min(r,e/2,n/2):(o=Math.min(r[0]||0,e/2,n/2),i=Math.min(r[1]||0,e/2,n/2),a=Math.min(r[2]||0,e/2,n/2),s=Math.min(r[3]||0,e/2,n/2)),t.moveTo(o,0),t.lineTo(e-i,0),t.arc(e-i,i,i,Math.PI*3/2,0,!1),t.lineTo(e,n-a),t.arc(e-a,n-a,a,0,Math.PI/2,!1),t.lineTo(s,n),t.arc(s,n-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,o),t.arc(o,o,o,Math.PI,Math.PI*3/2,!1)}};function A0(t){return Je._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||Je._isBoolean(t)?t:Object.prototype.toString.call(t)}function cge(t){return t>255?255:t<0?0:Math.round(t)}function zt(){if(Cn.isUnminified)return function(t,e){return Je._isNumber(t)||Je.warn(A0(t)+' is a not val
419id value for "'+e+'" attribute. The value should be a number.'),t}}function k6(t){if(Cn.isUnminified)return function(e,n){let r=Je._isNumber(e),o=Je._isArray(e)&&e.length==t;return!r&&!o&&Je.warn(A0(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function F6(){if(Cn.isUnminified)return function(t,e){var n=Je._isNumber(t),r=t==="auto";return n||r||Je.warn(A0(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function Tw(){if(Cn.isUnminified)return function(t,e){return Je._isString(t)||Je.warn(A0(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function uge(){if(Cn.isUnminified)return function(t,e){const n=Je._isString(t),r=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return n||r||Je.warn(A0(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function tCt(){if(Cn.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(Je._isArray(t)?t.forEach(function(r){Je._isNumber(r)||Je.warn('"'+e+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}
419):Je.warn(A0(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function Pf(){if(Cn.isUnminified)return function(t,e){var n=t===!0||t===!1;return n||Je.warn(A0(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function nCt(t){if(Cn.isUnminified)return function(e,n){return e==null||Je.isObject(e)||Je.warn(A0(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}var CT="get",ST="set";const Le={addGetterSetter(t,e,n,r,o){Le.addGetter(t,e,n),Le.addSetter(t,e,r,o),Le.addOverloadedGetterSetter(t,e)},addGetter(t,e,n){var r=CT+Je._capitalize(e);t.prototype[r]=t.prototype[r]||function(){var o=this.attrs[e];return o===void 0?n:o}},addSetter(t,e,n,r){var o=ST+Je._capitalize(e);t.prototype[o]||Le.overWriteSetter(t,e,n,r)},overWriteSetter(t,e,n,r){var o=ST+Je._capitalize(e);t.prototype[o]=function(i){return n&&i!==void 0&&i!==null&&(i=n.call(this,i,e)),this._setAttr(e,i),r&&r.call(this),this}},addComponentsGetterSetter(t,e,n,r,o){var i=n.length,s=Je._capitalize,a=CT+s(e),l=ST+s(e),c,u;t.prototype[a]=function(){var h={};for(c=0;c<i;c++)u=n[c],h[u]=this.getAttr(e+s(u));return h};var d=nCt(n);t.prototype[l]=function(h){var f=this.attrs[e],p;r&&(h=r.call(this,h)),d&&d.call(this,h,e);for(p in h)h.hasOwnProperty(p)&&this._setAttr(e+s(p),h[p]);return h||n.forEach(m=>{this._setAttr(e+s(m),void 0)}),this._fireChangeEvent(e,f,h),o&&o.call(this),this},Le.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){var n=Je._capitalize(e),r=ST+n,o=CT+n;t.prototype[e]=function(){return arguments.length?(this[r](arguments[0]),this):this[o]()}},addDeprecatedGetterSetter(t,e,n,r){Je.error("Adding deprecated "+e);var o=CT+Je._capitalize(e),i=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[o]=function(){Je.error(i);var s=this.attrs[e];return s===void 0?n:s},Le.addSetter(t,e,r,function(){Je.error(i)}),Le.addOverloadedGetterSetter(t,e)},backCompat(t,e){Je.each(e,function(n,r){var o=t.prototype[r],i=CT+Je._capitalize(n),s=ST+Je._capitalize(n);function a(){o.apply(this,arguments),Je.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}t.prototype[n]=a,t.prototype[i]=a,t.prototype[s]=a})},afterSetFilter(){this._filterUpToDate=!1}};function rCt(t){var e=[],n=t.length,r=Je,o,i;for(o=0;o<n;o++)i=t[o],r._isNumber(i)?i=Math.round(i*1e3)/1e3:r._isString(i)||(i=i+""),e.push(i);return e}var KJ=",",oCt="(",iCt=")",sCt="([",aCt="])",lCt=";",cCt="()",uCt="=",QJ=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],dCt=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const hCt=100;let fB=class{constructor(e){this.canvas=e,Cn.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,n){var r=this.traceArr,o=r.length,i="",s,a,l,c;for(s=0;s<o;s++)a=r[s],l=a.method,l?(c=a.args,i+=l,e?i+=cCt:Je._isArray(c[0])?i+=sCt+c.join(KJ)+aCt:(n&&(c=c.map(u=>typeof u=="number"?Math.floor(u):u)),i+=oCt+c.join(KJ)+iCt)):(i+=a.property,e||(i+=uCt+a.val)),i+=lCt;return i}clearTrace(){this.traceArr=[]}_trace(e){var n=this.traceArr,r;n.push(e),r=n.length,r>=hCt&&n.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var n=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(e){const n=e.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(e){var n=e.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(e){const n=e.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(e,n){this._context[e]=n}arc(e,n,r,o,i,s){this._context.arc(e,n,r,o,i,s)}arcTo(e,n,r,o,i){this._context.arcTo(e,n,r,o,i)}beginPath(){this._context.beginPath()}bezierCurveTo(e,n,r,o,i,s){this._context.bezierCurveTo(e,n,r,o,i,s)}clearRect(e,n,r,o){this._context.clearRect(e,n,r,o)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,n){var r=arguments;if(r.length===2)return this._context.createImageData(e,n);if(r.length===1)return this._context.createImageData(e)}createLinearGradient(e,n,r,o){return this._context.createLinearGradient(e,n,r,o)}createPattern(e,n){return this._context.createPattern(e,n)}createRadialGradient(e,n,r,o,i,s){return this._context.createRadialGradient(e,n,r,o,i,s)}drawImage(e,n,r,o,i,s,a,l,c){var u=arguments,d=this._context;u.length===3?d.drawImage(e,n,r):u.length===5?d.drawImage(e,n,r,o,i):u.length===9&&d.drawImage(e,n,r,o,i,s,a,l,c)}ellipse(e,n,r,o,i,s,a,l){this._context.ellipse(e,n,r,o,i,s,a,l)}
419isPointInPath(e,n,r,o){return r?this._context.isPointInPath(r,e,n,o):this._context.isPointInPath(e,n,o)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,n,r,o){this._context.fillRect(e,n,r,o)}strokeRect(e,n,r,o){this._context.strokeRect(e,n,r,o)}fillText(e,n,r,o){o?this._context.fillText(e,n,r,o):this._context.fillText(e,n,r)}measureText(e){return this._context.measureText(e)}getImageData(e,n,r,o){return this._context.getImageData(e,n,r,o)}lineTo(e,n){this._context.lineTo(e,n)}moveTo(e,n){this._context.moveTo(e,n)}rect(e,n,r,o){this._context.rect(e,n,r,o)}putImageData(e,n,r){this._context.putImageData(e,n,r)}quadraticCurveTo(e,n,r,o){this._context.quadraticCurveTo(e,n,r,o)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,n){this._context.scale(e,n)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,n,r,o,i,s){this._context.setTransform(e,n,r,o,i,s)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,n,r,o){this._context.strokeText(e,n,r,o)}transform(e,n,r,o,i,s){this._context.transform(e,n,r,o,i,s)}translate(e,n){this._context.translate(e,n)}_enableTrace(){var e=this,n=QJ.length,r=this.setAttr,o,i,s=function(a){var l=e[a],c;e[a]=function(){return i=rCt(Array.prototype.slice.call(arguments,0)),c=l.apply(e,arguments),e._trace({method:a,args:i}),c}};for(o=0;o<n;o++)s(QJ[o]);e.setAttr=function(){r.apply(e,arguments);var a=arguments[0],l=arguments[1];(a==="shadowOffsetX"||a==="shadowOffsetY"||a==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),e._trace({property:a,val:l})}}_applyGlobalCompositeOperation(e){const n=e.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}};dCt.forEach(function(t){Object.defineProperty(fB.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class fCt extends fB{constructor(e){super(e),this._context=e._canvas.getContext("2d")}_fillColor(e){var n=e.fill();this.setAttr("fillStyle",n),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var n=e._getLinearGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fillRadialGradient(e){const n=e._getRadialGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fill(e){const n=e.fill(),r=e.getFillPriority();if(n&&r==="color"){this._fillColor(e);return}const o=e.getFillPatternImage();if(o&&r==="pattern"){this._fillPattern(e);return}const i=e.getFillLinearGradientColorStops();if(i&&r==="linear-gradient"){this._fillLinearGradient(e);return}const s=e.getFillRadialGradientColorStops();if(s&&r==="radial-gradient"){this._fillRadialGradient(e);return}n?this._fillColor(e):o?this._fillPattern(e):i?this._fillLinearGradient(e):s&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const n=e.getStrokeLinearGradientStartPoint(),r=e.getStrokeLinearGradientEndPoint(),o=e.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(n.x,n.y,r.x,r.y);if(o){for(var s=0;s<o.length;s+=2)i.addColorStop(o[s],o[s+1]);this.setAttr("strokeStyle",i)}}_stroke(e){var n=e.dash(),r=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!r){this.save();var o=this.getCanvas().getPixelRatio();this.setTransform(o,0,0,o,0,0)}this._applyLineCap(e),n&&e.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var i=e.getStrokeLinearGradientColorStops();i?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),r||this.restore()}}_applyShadow(e){var n,r,o,i=(n=e.getShadowRGBA())!==null&&n!==void 0?n:"black",s=(r=e.getShadowBlur())!==null&&r!==void 0?r:5,a=(o=e.getShadowOffset())!==null&&o!==void 0?o:{x:0,y:0},l=e.getAbsoluteScale(),c=this.canvas.getPixelRatio(),u=l.x*c,d=l.y*c;this.setAttr("shadowColor",i),this.setAttr("shadowBlur",s*Math.min(Math.abs(u),Math.abs(d))),this.setAttr("shadowOffsetX",a.x*u),this.setAttr("shadowOffsetY",a.y*d)}}class pCt extends fB{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore(
419)}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const i=e.getStrokeScaleEnabled();if(!i){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),o=r==="auto"?e.strokeWidth():r;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),i||this.restore()}}}var KN;function gCt(){if(KN)return KN;var t=Je.createCanvasElement(),e=t.getContext("2d");return KN=function(){var n=Cn._global.devicePixelRatio||1,r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return n/r}(),Je.releaseCanvas(t),KN}let pB=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=e||{},r=n.pixelRatio||Cn.pixelRatio||gCt();this.pixelRatio=r,this._canvas=Je.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var n=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,n){this.setWidth(e||0),this.setHeight(n||0)}toDataURL(e,n){try{return this._canvas.toDataURL(e,n)}catch{try{return this._canvas.toDataURL()}catch(o){return Je.error("Unable to get data URL. "+o.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};Le.addGetterSetter(pB,"pixelRatio",void 0,zt());class T1 extends pB{constructor(e={width:0,height:0}){super(e),this.context=new fCt(this),this.setSize(e.width,e.height)}}class B6 extends pB{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new pCt(this),this.setSize(e.width,e.height)}}const po={get isDragging(){var t=!1;return po._dragElements.forEach(e=>{e.dragStatus==="dragging"&&(t=!0)}),t},justDragged:!1,get node(){var t;return po._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){const e=[];po._dragElements.forEach((n,r)=>{const{node:o}=n,i=o.getStage();i.setPointersPositions(t),n.pointerId===void 0&&(n.pointerId=Je._getFirstPointerId(t));const s=i._changedPointerPositions.find(c=>c.id===n.pointerId);if(s){if(n.dragStatus!=="dragging"){var a=o.dragDistance(),l=Math.max(Math.abs(s.x-n.startPointerPos.x),Math.abs(s.y-n.startPointerPos.y));if(l<a||(o.startDrag({evt:t}),!o.isDragging()))return}o._setDragPosition(t,n),e.push(o)}}),e.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:t},!0)})},_endDragBefore(t){const e=[];po._dragElements.forEach(n=>{const{node:r}=n,o=r.getStage();if(t&&o.setPointersPositions(t),!o._changedPointerPositions.find(a=>a.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(po.justDragged=!0,Cn._mouseListenClick=!1,Cn._touchListenClick=!1,Cn._pointerListenClick=!1,n.dragStatus="stopped");const s=n.node.getLayer()||n.node instanceof Cn.Stage&&n.node;s&&e.indexOf(s)===-1&&e.push(s)}),e.forEach(n=>{n.draw()})},_endDragAfter(t){po._dragElements.forEach((e,n)=>{e.dragStatus==="stopped"&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),e.dragStatus!=="dragging"&&po._dragElements.delete(n)})}};Cn.isBrowser&&(window.addEventListener("mouseup",po._endDragBefore,!0),window.addEventListener("touchend",po._endDragBefore,!0),window.addEventListener("mousemove",po._drag),window.addEventListener("touchmove",po._drag),window.addEventListener("mouseup",po._endDragAfter,!1),window.addEventListener("touchend",po._endDragAfter,!1));var pD="absoluteOpacity",QN="allEventListeners",Ng="absoluteTransform",ZJ="absoluteScale",yb="canvas",mCt="Change",yCt="children",vCt="konva",W4="listening",JJ="mouseenter",eee="mouseleave",tee="set",nee="Shape",gD=" ",ree="stage",Ny="transform",bCt="Stage",j4="visible",CCt=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(gD);let SCt=1,Vt=class q4{constructor(e){this._id=SCt++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===Ny||e===Ng)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,n){var r=this._cache.get(e),o=e===Ny||e===Ng,i=r===void 0||o&&r.dirty===!0;return i&&(r=n.call(this),this._cache.set(e,r)),r}_calculate(e,n,r){if(!this._attachedDepsListeners.get(e)){const o=n.map(i=>i+"Change.konva").join(gD);this.on(o,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,r)}_getCanvasCache(){return this._cache.get(yb)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Ng&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(yb)){const{scene:e,filter:n,hit:r}=this._cache.get(yb);Je.releaseCanvas(e,n,r),this._cache.delete(yb)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var n=e||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var o=Math.ceil(n.width||r.width),i=Math.ceil(n.height||r.height),s=n.pixelRatio,a=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,c=n.offset||0,u=n.drawBorder||!1,d=n.hitCanvasPixelRatio||1;if(!o||!i){Je.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}o+=c*2+1,i+=c*2+1,a-=c,l-=c;var h=new T1({pixelRatio:s,width:o,height:i}),f=new T1({pixelRatio:s,width:0,height:0}),p=new B6({pixelRatio:d,width:o,height:i}),m=h.getContext(),y=p.getContext();return p.isCache=!0,h.isCache=!0,this._cache.delete(yb),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(h.getContext()._context.
419imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),m.save(),y.save(),m.translate(-a,-l),y.translate(-a,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(pD),this._clearSelfAndDescendantCache(ZJ),this.drawScene(h,this),this.drawHit(p,this),this._isUnderCache=!1,m.restore(),y.restore(),u&&(m.save(),m.beginPath(),m.rect(0,0,o,i),m.closePath(),m.setAttr("strokeStyle","red"),m.setAttr("lineWidth",5),m.stroke(),m.restore()),this._cache.set(yb,{scene:h,filter:f,hit:p,x:a,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(yb)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,n){var r=[{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}],o,i,s,a,l=this.getAbsoluteTransform(n);return r.forEach(function(c){var u=l.point(c);o===void 0&&(o=s=u.x,i=a=u.y),o=Math.min(o,u.x),i=Math.min(i,u.y),s=Math.max(s,u.x),a=Math.max(a,u.y)}),{x:o,y:i,width:s-o,height:a-i}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();e.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),o=r.pixelRatio;e.drawImage(r._canvas,0,0,r.width/o,r.height/o),e.restore()}_drawCachedHitCanvas(e){var n=this._getCanvasCache(),r=n.hit;e.save(),e.translate(n.x,n.y),e.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),n=this._getCanvasCache(),r=n.scene,o=n.filter,i=o.getContext(),s,a,l,c;if(e){if(!this._filterUpToDate){var u=r.pixelRatio;o.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(s=e.length,i.clear(),i.drawImage(r._canvas,0,0,r.getWidth()/u,r.getHeight()/u),a=i.getImageData(0,0,o.getWidth(),o.getHeight()),l=0;l<s;l++){if(c=e[l],typeof c!="function"){Je.error("Filter should be type of function, but got "+typeof c+" instead. Please check correct filters");continue}c.call(this,a),i.putImageData(a,0,0)}}catch(d){Je.error("Unable to apply filter. "+d.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return o}return r}on(e,n){if(this._cache&&this._cache.delete(QN),arguments.length===3)return this._delegate.apply(this,arguments);var r=e.split(gD),o=r.length,i,s,a,l,c;for(i=0;i<o;i++)s=r[i],a=s.split("."),l=a[0],c=a[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:c,handler:n});return this}off(e,n){var r=(e||"").split(gD),o=r.length,i,s,a,l,c,u;if(this._cache&&this._cache.delete(QN),!e)for(s in this.eventListeners)this._off(s);for(i=0;i<o;i++)if(a=r[i],l=a.split("."),c=l[0],u=l[1],c)this.eventListeners[c]&&this._off(c,u,n);else for(s in this.eventListeners)this._off(s,u,n);return this}dispatchEvent(e){var n={target:this,type:e.type,evt:e};return this.fire(e.type,n),this}addEventListener(e,n){return this.on(e,function(r){n.call(this,r.evt)}
419),this}removeEventListener(e){return this.off(e),this}_delegate(e,n,r){var o=this;this.on(e,function(i){for(var s=i.target.findAncestors(n,!0,o),a=0;a<s.length;a++)i=Je.cloneObject(i),i.currentTarget=s[a],r.call(s[a],i)})}remove(){return this.isDragging()&&this.stopDrag(),po._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Ng),this._clearSelfAndDescendantCache(pD),this._clearSelfAndDescendantCache(ZJ),this._clearSelfAndDescendantCache(ree),this._clearSelfAndDescendantCache(j4),this._clearSelfAndDescendantCache(W4)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){var n="get"+Je._capitalize(e);return Je._isFunction(this[n])?this[n]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),n=[];e;)n.push(e),e=e.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var n,r;if(!e)return this;for(n in e)n!==yCt&&(r=tee+Je._capitalize(n),Je._isFunction(this[r])?this[r](e[n]):this._setAttr(n,e[n]))}),this}isListening(){return this._getCache(W4,this._isListening)}_isListening(e){if(!this.listening())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isListening(e):!0}isVisible(){return this._getCache(j4,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isVisible(e):!0}shouldDrawHit(e,n=!1){if(e)return this._isVisible(e)&&this._isListening(e);var r=this.getLayer(),o=!1;po._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(s.node.nodeType==="Stage"||s.node.getLayer()===r)&&(o=!0)});var i=!n&&!Cn.hitOnDragEnabled&&o;return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),n=this,r=0,o,i,s,a;function l(c){for(o=[],i=c.length,s=0;s<i;s++)a=c[s],r++,a.nodeType!==nee&&(o=o.concat(a.getChildren().slice())),a._id===n._id&&(s=i);o.length>0&&o[0].getDepth()<=e&&l(o)}return n.nodeType!==bCt&&l(n.getStage().getChildren()),r}getDepth(){for(var e=0,n=this.parent;n;)e++,n=n.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Ny),this._clearSelfAndDescendantCache(Ng)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(e)}getAbsolutePosition(e){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!e&&(e=!0);var o=this.getAbsoluteTransform(e).getMatrix(),i=new Ku,s=this.offset();return i.m=o.slice(),i.translate(s.x,s.y),i.getTranslation()}setAbsolutePosition(e){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Ny);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(e.x,e.y),e={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:e.x,y:e.y}),this._clearCache(Ny),this._clearSelfAndDescendantCache(Ng),this}_setTransform(e){var n;for(n in e)this.attrs[n]=e[n]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var n=e.x,r=e.y,o=this.x(),i=this.y();return n!==void 0&&(o+=n),r!==void 0&&(i+=r),this.setPosition({x:o,y:i}),this}_eachAncestorReverse(e,n){var r=[],o=this.getParent(),i,s;if(!(n&&n._id===this._id)){for(r.unshift(this);o&&(!n||o._id!==n._id);)r.unshift(o),o=o.parent;for(i=r.length,s=0;s<i;s++)e(r[s])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Je.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return Je.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return Je.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Je.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return Je.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&Je.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(pD,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(e*=n.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e={},n=this.getAttrs(),r,o,i,s,a;e.attrs={};for(r in n)o=n[r],a=Je.isObject(o)&&!Je._isPlainObject(o)&&!Je._isArray(o),!
419a&&(i=typeof this[r]=="function"&&this[r],delete n[r],s=i?i.call(this):null,n[r]=o,s!==o&&(e.attrs[r]=o));return e.className=this.getClassName(),Je._prepareToStringify(e)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,n,r){var o=[];n&&this._isMatch(e)&&o.push(this);for(var i=this.parent;i;){if(i===r)return o;i._isMatch(e)&&o.push(i),i=i.parent}return o}isAncestorOf(e){return!1}findAncestor(e,n,r){return this.findAncestors(e,n,r)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);var n=e.replace(/ /g,"").split(","),r=n.length,o,i;for(o=0;o<r;o++)if(i=n[o],Je.isValidSelector(i)||(Je.warn('Selector "'+i+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),Je.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),Je.warn("Konva is awesome, right?")),i.charAt(0)==="#"){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)==="."){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(ree,this._getStage)}_getStage(){var e=this.getParent();if(e)return e.getStage()}fire(e,n={},r){return n.target=n.target||this,r?this._fireAndBubble(e,n):this._fire(e,n),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(Ng,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var n;if(e)return n=new Ku,this._eachAncestorReverse(function(o){var i=o.transformsEnabled();i==="all"?n.multiply(o.getTransform()):i==="position"&&n.translate(o.x()-o.offsetX(),o.y()-o.offsetY())},e),n;n=this._cache.get(Ng)||new Ku,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const o=this.attrs.x||0,i=this.attrs.y||0,s=this.attrs.offsetX||0,a=this.attrs.offsetY||0;n.translate(o-s,i-a)}return n.dirty=!1,n}getAbsoluteScale(e){for(var n=this;n;)n._isUnderCache&&(e=n),n=n.getParent();const o=this.getAbsoluteTransform(e).decompose();return{x:o.scaleX,y:o.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Ny,this._getTransform)}_getTransform(){var e,n,r=this._cache.get(Ny)||new Ku;r.reset();var o=this.x(),i=this.y(),s=Cn.getAngle(this.rotation()),a=(e=this.attrs.scaleX)!==null&&e!==void 0?e:1,l=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,c=this.attrs.skewX||0,u=this.attrs.skewY||0,d=this.attrs.offsetX||0,h=this.attrs.offsetY||0;return(o!==0||i!==0)&&r.translate(o,i),s!==0&&r.rotate(s),(c!==0||u!==0)&&r.skew(c,u),(a!==1||l!==1)&&r.scale(a,l),(d!==0||h!==0)&&r.translate(-1*d,-1*h),r.dirty=!1,r}clone(e){var n=Je.cloneObject(this.attrs),r,o,i,s,a;for(r in e)n[r]=e[r];var l=new this.constructor(n);for(r in this.eventListeners)for(o=this.eventListeners[r],i=o.length,s=0;s<i;s++)a=o[s],a.name.indexOf(vCt)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(a));return l}_toKonvaCanvas(e){e=e||{};var n=this.getClientRect(),r=this.getStage(),o=e.x!==void 0?e.x:Math.floor(n.x),i=e.y!==void 0?e.y:Math.floor(n.y),s=e.pixelRatio||1,a=new T1({width:e.width||Math.ceil(n.width)||(r?r.width():0),height:e.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:s}),l=a.getContext();return e.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(o||i)&&l.translate(-1*o,-1*i),this.drawScene(a),l.restore(),a}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e=e||{};var n=e.mimeType||null,r=e.quality||null,o=this._toKonvaCanvas(e).toDataURL(n,r);return e.callback&&e.callback(o),o}toImage(e){return new Promise((n,r)=>{try{const o=e?.callback;o&&delete e.callback,Je._urlToImage(this.toDataURL(e),function(i){n(i),o?.(i)})}catch(o){r(o)}})}toBlob(e){return new Promise((n,r)=>{try{const o=e?.callback;o&&delete e.callback,this.toCanvas(e).toBlob(i=>{n(i),o?.(i)})}catch(o){r(o)}})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Cn.dragDistance}_off(e,n,r){var o=this.eventListeners[e],i,s,a;for(i=0;i<o.length;i++)if(s=o[i].name,a=o[i].handler,(s!=="konva"||n==="konva")&&(!n||s===n)&&(!r||r===a)){if(o.splice(i,1),o.length===0){delete this.eventListeners[e];break}i--}}_fireChangeEvent(e,n,r){this._fire(e+mCt,{oldVal:n,newVal:r})}addName(e){if(!this.hasName(e)){var n=this.name(),r=n?n+" "+e:e;this.name(r)}return this}hasName(e){if(!e)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(e)!==-1}removeName(e){var n=(this.name()||"").split(/\s/g),r=n.indexOf(e);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(e,n){var r=this[tee+Je._capitalize(e)];return Je._isFunction(r)?r.call(this,n):this._setAttr(e,n),this}_requestDraw(){if(Cn.autoDrawEnabled){const e=this.getLayer()||this.get
419Stage();e?.batchDraw()}}_setAttr(e,n){var r=this.attrs[e];r===n&&!Je.isObject(n)||(n==null?delete this.attrs[e]:this.attrs[e]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(e,r,n),this._requestDraw())}_setComponentAttr(e,n,r){var o;r!==void 0&&(o=this.attrs[e],o||(this.attrs[e]=this.getAttr(e)),this.attrs[e][n]=r,this._fireChangeEvent(e,o,r))}_fireAndBubble(e,n,r){n&&this.nodeType===nee&&(n.target=this);var o=(e===JJ||e===eee)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!o){this._fire(e,n);var i=(e===JJ||e===eee)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!i&&(r&&r.parent?this._fireAndBubble.call(this.parent,e,n,r):this._fireAndBubble.call(this.parent,e,n))}}_getProtoListeners(e){let n=this._cache.get(QN);if(!n){n={};let o=Object.getPrototypeOf(this);for(;o;){if(!o.eventListeners){o=Object.getPrototypeOf(o);continue}for(var r in o.eventListeners){const i=o.eventListeners[r],s=n[r]||[];n[r]=i.concat(s)}o=Object.getPrototypeOf(o)}this._cache.set(QN,n)}return n[e]}_fire(e,n){n=n||{},n.currentTarget=this,n.type=e;const r=this._getProtoListeners(e);if(r)for(var o=0;o<r.length;o++)r[o].handler.call(this,n);const i=this.eventListeners[e];if(i)for(var o=0;o<i.length;o++)i[o].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var n=e?e.pointerId:void 0,r=this.getStage(),o=this.getAbsolutePosition(),i=r._getPointerById(n)||r._changedPointerPositions[0]||o;po._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-o.x,y:i.y-o.y},dragStatus:"ready",pointerId:n})}startDrag(e,n=!0){po._dragElements.has(this._id)||this._createDragElement(e);const r=po._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},n)}_setDragPosition(e,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var o={x:r.x-n.offset.x,y:r.y-n.offset.y},i=this.dragBoundFunc();if(i!==void 0){const s=i.call(this,o,e);s?o=s:Je.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==o.x||this._lastPos.y!==o.y)&&(this.setAbsolutePosition(o),this._requestDraw()),this._lastPos=o}}stopDrag(e){const n=po._dragElements.get(this._id);n&&(n.dragStatus="stopped"),po._endDragBefore(e),po._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=po._dragElements.get(this._id);return e?e.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(e){var n=e.evt.button!==void 0,r=!n||Cn.dragButtons.indexOf(e.evt.button)>=0;if(r&&!this.isDragging()){var o=!1;po._dragElements.forEach(i=>{this.isAncestorOf(i.node)&&(o=!0)}),o||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var e=this.getStage();if(!e)return;const n=po._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",o=n&&n.dragStatus==="ready";
419r?this.stopDrag():o&&po._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-e.x,y:-e.y,width:n.width()+2*e.x,height:n.height()+2*e.y};return Je.haveIntersection(r,this.getClientRect())}static create(e,n){return Je._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)}static _createNode(e,n){var r=q4.prototype.getClassName.call(e),o=e.children,i,s,a;n&&(e.attrs.container=n),Cn[r]||(Je.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=Cn[r];if(i=new l(e.attrs),o)for(s=o.length,a=0;a<s;a++)i.add(q4._createNode(o[a]));return i}};Vt.prototype.nodeType="Node";Vt.prototype._attrsAffectingSize=[];Vt.prototype.eventListeners={};Vt.prototype.on.call(Vt.prototype,CCt,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Ny),this._clearSelfAndDescendantCache(Ng)});Vt.prototype.on.call(Vt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(j4)});Vt.prototype.on.call(Vt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(W4)});Vt.prototype.on.call(Vt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(pD)});const ni=Le.addGetterSetter;ni(Vt,"zIndex");ni(Vt,"absolutePosition");ni(Vt,"position");ni(Vt,"x",0,zt());ni(Vt,"y",0,zt());ni(Vt,"globalCompositeOperation","source-over",Tw());ni(Vt,"opacity",1,zt());ni(Vt,"name","",Tw());ni(Vt,"id","",Tw());ni(Vt,"rotation",0,zt());Le.addComponentsGetterSetter(Vt,"scale",["x","y"]);ni(Vt,"scaleX",1,zt());ni(Vt,"scaleY",1,zt());Le.addComponentsGetterSetter(Vt,"skew",["x","y"]);ni(Vt,"skewX",0,zt());ni(Vt,"skewY",0,zt());Le.addComponentsGetterSetter(Vt,"offset",["x","y"]);ni(Vt,"offsetX",0,zt());ni(Vt,"offsetY",0,zt());ni(Vt,"dragDistance",null,zt());ni(Vt,"width",0,zt());ni(Vt,"height",0,zt());ni(Vt,"listening",!0,Pf());ni(Vt,"preventDefault",!0,Pf());ni(Vt,"filters",null,function(t){return this._filterUpToDate=!1,t});ni(Vt,"visible",!0,Pf());ni(Vt,"transformsEnabled","all",Tw());ni(Vt,"size");ni(Vt,"dragBoundFunc");ni(Vt,"draggable",!1,Pf());Le.backCompat(Vt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class rd extends Vt{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(o){e(o)&&r.push(o)}),r}hasChildren(){return this.getChildren().length>0}
419removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(var n=0;n<e.length;n++)this.add(e[n]);return this}const r=e[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var n=this._generalFind(e,!0);return n.length>0?n[0]:void 0}_generalFind(e,n){var r=[];return this._descendants(o=>{const i=o._isMatch(e);return i&&r.push(o),!!(i&&n)}),r}_descendants(e){let n=!1;const r=this.getChildren();for(const o of r){if(n=e(o),n)return!0;if(o.hasChildren()&&(n=o._descendants(e),n))return!0}return!1}toObject(){var e=Vt.prototype.toObject.call(this);
419return e.children=[],this.getChildren().forEach(n=>{e.children.push(n.toObject())}),e}isAncestorOf(e){for(var n=e.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(e){var n=Vt.prototype.clone.call(this,e);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(e){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(e)&&n.push(r)}),n}_clearSelfAndDescendantCache(e){var n;super._clearSelfAndDescendantCache(e),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(e,n){var r=this.getLayer(),o=e||r&&r.getCanvas(),i=o&&o.getContext(),s=this._getCanvasCache(),a=s&&s.scene,l=o&&o.isCache;if(!this.isVisible()&&!l)return this;if(a){i.save();var c=this.getAbsoluteTransform(n).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",o,n);return this}drawHit(e,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),o=e||r&&r.hitCanvas,i=o&&o.getContext(),s=this._getCanvasCache(),a=s&&s.hit;if(a){i.save();var l=this.getAbsoluteTransform(n).getMatrix();i.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren("drawHit",o,n);return this}_drawChildren(e,n,r){var o,i=n&&n.getContext(),s=this.clipWidth(),a=this.clipHeight(),l=this.clipFunc(),c=s&&a||l;const u=r===this;if(c){i.save();var d=this.getAbsoluteTransform(r),h=d.getMatrix();if(i.transform(h[0],h[1],h[2],h[3],h[4],h[5]),i.beginPath(),l)l.call(this,i,this);else{var f=this.clipX(),p=this.clipY();i.rect(f,p,s,a)}i.clip(),h=d.copy().invert().getMatrix(),i.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var m=!u&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";m&&(i.save(),i._applyGlobalCompositeOperation(this)),(o=this.children)===null||o===void 0||o.forEach(function(y){y[e](n,r)}),m&&i.restore(),c&&i.restore()}getClientRect(e){var n;e=e||{};var r=e.skipTransform,o=e.relativeTo,i,s,a,l,c={x:1/0,y:1/0,width:0,height:0},u=this;(n=this.children)===null||n===void 0||n.forEach(function(m){if(m.visible()){var y=m.getClientRect({relativeTo:u,skipShadow:e.skipShadow,skipStroke:e.skipStroke});y.width===0&&y.height===0||(i===void 0?(i=y.x,s=y.y,a=y.x+y.width,l=y.y+y.height):(i=Math.min(i,y.x),s=Math.min(s,y.y),a=Math.max(a,y.x+y.width),l=Math.max(l,y.y+y.height)))}});for(var d=this.find("Shape"),h=!1,f=0;f<d.length;f++){var p=d[f];if(p._isVisible(this)){h=!0;break}}return h&&i!==void 0?c={x:i,y:s,width:a-i,height:l-s}:c={x:0,y:0,width:0,height:0},r?c:this._transformedRect(c,o)}}Le.addComponentsGetterSetter(rd,"clip",["x","y","width","height"]);Le.addGetterSetter(rd,"clipX",void 0,zt());Le.addGetterSetter(rd,"clipY",void 0,zt());Le.addGetterSetter(rd,"clipWidth",void 0,zt());Le.addGetterSetter(rd,"clipHeight",void 0,zt());Le.addGetterSetter(rd,"clipFunc");const yP=new Map,dge=Cn._global.PointerEvent!==void 0;function G5(t){return yP.get(t)}function $6(t){return{evt:t,pointerId:t.pointerId}}function hge(t,e){return yP.get(t)===e}function fge(t,e){V_(t),e.getStage()&&(yP.set(t,e),dge&&e._fire("gotpointercapture",$6(new PointerEvent("gotpointercapture"))))}function V_(t,e){const n=yP.get(t);if(!n)return;const r=n.getStage();r&&r.content,yP.delete(t),dge&&n._fire("lostpointercapture",$6(new PointerEvent("lostpointercapture")))}var ECt="Stage",xCt="string",oee="px",wCt="mouseout",pge="mouseleave",gge="mouseover",mge="mouseenter",yge="mousemove",vge="mousedown",bge="mouseup",ZT="pointermove",JT="pointerdown",i1="pointerup",e_="pointercancel",ACt="lostpointercapture",ZN="pointerout",JN="pointerleave",eM="pointerover",tM="pointerenter",Y4="contextmenu",Cge="touchstart",Sge="touchend",Ege="touchmove",xge="touchcancel",X4="wheel",TCt=5,_Ct=[[mge,"_pointerenter"],[vge,"_pointerdown"],[yge,"_pointermove"],[bge,"_pointerup"],[pge,"_pointerleave"],[Cge,"_pointerdown"],[Ege,"_pointermove"],[Sge,"_pointerup"],[xge,"_pointercancel"],[gge,"_pointerover"],[X4,"_wheel"],[Y4,"_contextmenu"],[JT,"_pointerdown"],[ZT,"_pointermove"],[i1,"_pointerup"],[e_,"_pointercancel"],[ACt,"_lostpointercapture"]];const W5={mouse:{[ZN]:wCt,[JN]:pge,[eM]:gge,[tM]:mge,[ZT]:yge,[JT]:vge,[i1]:bge,[e_]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[ZN]:"touchout",[JN]:"touchleave",[eM]:"touchover",[tM]:"touchenter",[ZT]:Ege,[JT]:Cge,[i1]:Sge,[e_]:xge,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[ZN]:ZN,[JN]:JN,[eM]:eM,[tM]:tM,[ZT]:ZT,[JT]:JT,[i1]:i1,[e_]:e_,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},t_=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",CE=t=>{const e=t_(t);if(e==="pointer")return Cn.pointerEventsEnabled&&W5.pointer;if(e==="touch")return W5.touch;if(e==="mouse")return W5.mouse};function iee(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&Je.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}const ICt="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",mD=[];let gB=class extends rd{constructor(e){super(iee(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),mD.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{iee(this.attrs)}),this._checkVisibility()}_validateAdd(e){const n=e.getType()==="Layer",r=e.getType()==="FastLayer";n||r||Je.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if(typeof e===xCt){if(e.charAt(0)==="."){var n=e.slice(1);e=document.getElementsByClassName(n)[0]}else{var r;e.charAt(0)!=="#"?r=e:r=e.slice(1),e=document.getElementById(r)}if(!e)throw"Can not find container in document with id "+r}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e=this.children,n=e.length,r;for(r=0;r<n;r++)e[r].clear();return this}clone(e){return e||(e={}),e.container=typeof document<"u"&&document.createElement("div"),rd.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&Je._isInDocument(e)&&this.container().removeChild(e);var n=mD.indexOf(this);return n>-1&&mD.splice(n,1),Je.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Je.warn(ICt),null)}_getPointerById(e){return this._pointerPositions.find(n=>n.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e=e||{},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var n=new T1({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),r=n.getContext()._context,o=this.children;return(e.x||e.y)&&r.translate(-1*e.x,-1*e.y),o.forEach(function(i){if(i.isVisible()){var s=i._toKonvaCanvas(e);r.drawImage(s._canvas,e.x,e.y,s.getWidth()/s.getPixelRatio(),s.getHeight()/s.getPixelRatio())}}),n}getIntersection(e){if(!e)return null;var n=this.children,r=n.length,o=r-1,i;for(i=o;i>=0;i--){const s=n[i].getIntersection(e);if(s)return s}return null}_resizeDOM(){var e=this.width(),n=this.height();this.content&&(this.content.style.width=e+oee,this.content.style.height=n+oee),this.bufferCanvas.setSize(e,n),this.bufferHitCanvas.setSize(e,n),this.children.forEac
419h(r=>{r.setSize({width:e,height:n}),r.draw()})}add(e,...n){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(e);var o=this.children.length;return o>TCt&&Je.warn("The stage has "+o+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),Cn.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return hge(e,this)}setPointerCapture(e){fge(e,this)}releaseCapture(e){V_(e)}getLayers(){return this.children}_bindContentEvents(){Cn.isBrowser&&_Ct.forEach(([e,n])=>{this.content.addEventListener(e,r=>{this[n](r)},{passive:!1})})}_pointerenter(e){this.setPointersPositions(e);const n=CE(e.type);this._fire(n.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const n=CE(e.type);this._fire(n.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let n=this[e+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(e){const n=CE(e.type),r=t_(e.type);if(n){this.setPointersPositions(e);var o=this._getTargetShape(r),i=!po.isDragging||Cn.hitOnDragEnabled;o&&i?(o._fireAndBubble(n.pointerout,{evt:e}),o._fireAndBubble(n.pointerleave,{evt:e}),this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this[r+"targetShape"]=null):i&&(this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){const n=CE(e.type),r=t_(e.type);if(n){this.setPointersPositions(e);var o=!1;this._changedPointerPositions.forEach(i=>{var s=this.getIntersection(i);if(po.justDragged=!1,Cn["_"+r+"ListenClick"]=!0,!(s&&s.isListening()))return;Cn.capturePointerEventsEnabled&&s.setPointerCapture(i.id),this[r+"ClickStartShape"]=s,s._fireAndBubble(n.pointerdown,{evt:e,pointerId:i.id}),o=!0;const l=e.type.indexOf("touch")>=0;s.preventDefault()&&e.cancelable&&l&&e.preventDefault()}),o||this._fire(n.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const n=CE(e.type),r=t_(e.type);if(!n)return;po.isDragging&&po.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e);var o=!po.isDragging||Cn.hitOnDragEnabled;if(!o)return;var i={};let s=!1;var a=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const c=G5(l.id)||this.getIntersection(l),u=l.id,d={evt:e,pointerId:u};var h=a!==c;if(h&&a&&(a._fireAndBubble(n.pointerout,Object.assign({},d),c),a._fireAndBubble(n.pointerleave,Object.assign({},d),c)),c){if(i[c._id])return;i[c._id]=!0}c&&c.isListening()?(s=!0,h&&(c._fireAndBubble(n.pointerover,Object.assign({},d),a),c._fireAndBubble(n.pointerenter,Object.assign({},d),a),this[r+"targetShape"]=c),c._fireAndBubble(n.pointermove,Object.assign({},d))):a&&(this._fire(n.pointerover,{evt:e,target:this,currentTarget:this,pointerId:u}),this[r+"targetShape"]=null)}),s||this._fire(n.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const n=CE(e.type),r=t_(e.type);if(!n)return;this.setPointersPositions(e);const o=this[r+"ClickStartShape"],i=this[r+"ClickEndShape"];var s={};let a=!1;this._changedPointerPositions.forEach(l=>{const c=G5(l.id)||this.getIntersection(l);if(c){if(c.releaseCapture(l.id),s[c._id])return;s[c._id]=!0}const u=l.id,d={evt:e,pointerId:u};let h=!1;Cn["_"+r+"InDblClickWindow"]?(h=!0,clearTimeout(this[r+"DblTimeout"])):po.justDragged||(Cn["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){Cn["_"+r+"InDblClickWindow"]=!1},Cn.dblClickWindow),c&&c.isListening()?(a=!0,this[r+"ClickEndShape"]=c,c._fireAndBubble(n.pointerup,Object.assign({},d)),Cn["_"+r+"ListenClick"]&&o&&o===c&&(c._fireAndBubble(n.pointerclick,Object.assign({},d)),h&&i&&i===c&&c._fireAndBubble(n.pointerdblclick,Object.assign({},d)))):(this[r+"ClickEndShape"]=null,Cn["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:u}),h&&this._fire(n.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:u}))}),a||this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Cn["_"+r+"ListenClick"]=!1,e.cancelable&&r!=="touch"&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(Y4,{evt:e}):this._fire(Y4,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(X4,{evt:e}):this._fire(X4,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const n=G5(e.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(i1,$6(e)),V_(e.pointerId)}_lostpointercapture(e){V_(e.pointerId)}setPointersPositions(e){var n=this._getContentPosition(),r=null,o=null;e=e||window.event,e.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,i=>{this._pointerPositions.push({id:i.identifier,x:(i.clientX-n.left)/n.scaleX,y:(i.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,i=>{this._changedPointerPositions.push({id:i.identifier,x:(i.clientX-n.left)/n.scaleX,y:(i.clientY-n.top)/n.scaleY})})):(r=(e.clientX-n.left)/n.scaleX,o=(e.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:o},this._pointerPositions=[{x:r,y:o,id:Je._getFirstPointerId(e)}],this._changedPointerPositions=[{x:r,y:o,id:Je._getFirstPointerId(e)}])}_setPointerPosition(e){Je.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();
419return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new T1({width:this.width(),height:this.height()}),this.bufferHitCanvas=new B6({pixelRatio:1,width:this.width(),height:this.height()}),!!Cn.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}}cache(){return Je.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(e){e.batchDraw()}),this}};gB.prototype.nodeType=ECt;ns(gB);Le.addGetterSetter(gB,"container");var wge="hasShadow",Age="shadowRGBA",Tge="patternImage",_ge="linearGradient",Ige="radialGradient";let nM;function j5(){return nM||(nM=Je.createCanvasElement().getContext("2d"),nM)}const G_={};function PCt(t){t.fill()}function RCt(t){t.stroke()}function OCt(t){t.fill()}function NCt(t){t.stroke()}function MCt(){this._clearCache(wge)}function DCt(){this._clearCache(Age)}function LCt(){this._clearCache(Tge)}function kCt(){this._clearCache(_ge)}function FCt(){this._clearCache(Ige)}class Rt extends Vt{constructor(e){super(e);let n;for(;n=Je.getRandomColor(),!(n&&!(n in G_)););this.colorKey=n,G_[n]=this}getContext(){return Je.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return Je.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(wge,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Tge,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var e=j5();const n=e.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Ku;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(Cn.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const o=r.getMatrix(),i=typeof DOMMatrix>"u"?{a:o[0],b:o[1],c:o[2],d:o[3],e:o[4],f:o[5]}:new DOMMatrix(o);n.setTransform(i)}return n}}_getLinearGradient(){return this._getCache(_ge,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var n=j5(),r=this.fillLinearGradientStartPoint(),o=this.fillLinearGradientEndPoint(),i=n.createLinearGradient(r.x,r.y,o.x,o.y),s=0;s<e.length;s+=2)i.addColorStop(e[s],e[s+1]);return i}}_getRadialGradient(){return this._getCache(Ige,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var n=j5(),r=this.fillRadialGradientStartPoint(),o=this.fillRadialGradientEndPoint(),i=n.createRadialGradient(r.x,r.y,this.fillRadialGradientStartRadius(),o.x,o.y,this.fillRadialGradientEndRadius()),s=0;s<e.length;s+=2)i.addColorStop(e[s],e[s+1]);return i}}getShadowRGBA(){return this._getCache(Age,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var e=Je.colorToRGBA(this.shadowColor());if(e)return"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const e=this.hitStrokeWidth();return e==="auto"?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var n=this.getStage(),r=n.bufferHitCanvas,o;return r.getContext().clear(),this.drawHit(r,null,!0),o=r.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data,o[3]>0}destroy(){return Vt.prototype.destroy.call(this),delete G_[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const o=e||this.hasFill(),i=this.hasStroke(),s=this.getAbsoluteOpacity()!==1;if(o&&i&&s)return!0;const a=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(o&&i&&a&&l)}setStrokeHitEnabled(e){Je.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){const n=e.skipTransform,r=e.relativeTo,o=this.getSelfRect(),s=!e.ski
419pStroke&&this.hasStroke()&&this.strokeWidth()||0,a=o.width+s,l=o.height+s,c=!e.skipShadow&&this.hasShadow(),u=c?this.shadowOffsetX():0,d=c?this.shadowOffsetY():0,h=a+Math.abs(u),f=l+Math.abs(d),p=c&&this.shadowBlur()||0,m=h+p*2,y=f+p*2,v={width:m,height:y,x:-(s/2+p)+Math.min(u,0)+o.x,y:-(s/2+p)+Math.min(d,0)+o.y};return n?v:this._transformedRect(v,r)}drawScene(e,n){var r=this.getLayer(),o=e||r.getCanvas(),i=o.getContext(),s=this._getCanvasCache(),a=this.getSceneFunc(),l=this.hasShadow(),c,u,d,h=o.isCache,f=n===this;if(!this.isVisible()&&!f)return this;if(s){i.save();var p=this.getAbsoluteTransform(n).getMatrix();return i.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedSceneCanvas(i),i.restore(),this}if(!a)return this;if(i.save(),this._useBufferCanvas()&&!h){c=this.getStage(),u=c.bufferCanvas,d=u.getContext(),d.clear(),d.save(),d._applyLineJoin(this);var m=this.getAbsoluteTransform(n).getMatrix();d.transform(m[0],m[1],m[2],m[3],m[4],m[5]),a.call(this,d,this),d.restore();var y=u.pixelRatio;l&&i._applyShadow(this),i._applyOpacity(this),i._applyGlobalCompositeOperation(this),i.drawImage(u._canvas,0,0,u.width/y,u.height/y)}else{if(i._applyLineJoin(this),!f){var m=this.getAbsoluteTransform(n).getMatrix();i.transform(m[0],m[1],m[2],m[3],m[4],m[5]),i._applyOpacity(this),i._applyGlobalCompositeOperation(this)}l&&i._applyShadow(this),a.call(this,i,this)}return i.restore(),this}drawHit(e,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var o=this.getLayer(),i=e||o.hitCanvas,s=i&&i.getContext(),a=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),c=l&&l.hit;if(this.colorKey||Je.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),c){s.save();var u=this.getAbsoluteTransform(n).getMatrix();return s.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(s),s.restore(),this}if(!a)return this;if(s.save(),s._applyLineJoin(this),!(this===n)){var h=this.getAbsoluteTransform(n).getMatrix();s.transform(h[0],h[1],h[2],h[3],h[4],h[5])}return a.call(this,s,this),s.restore(),this}drawHitFromCache(e=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),o=n.hit,i=o.getContext(),s=o.getWidth(),a=o.getHeight(),l,c,u,d,h,f;i.clear(),i.drawImage(r._canvas,0,0,s,a);try{for(l=i.getImageData(0,0,s,a),c=l.data,u=c.length,d=Je._hexToRgb(this.colorKey),h=0;h<u;h+=4)f=c[h+3],f>e?(c[h]=d.r,c[h+1]=d.g,c[h+2]=d.b,c[h+3]=255):c[h+3]=0;i.putImageData(l,0,0)}catch(p){Je.error("Unable to draw hit graph from cached scene canvas. "+p.message)}return this}hasPointerCapture(e){return hge(e,this)}setPointerCapture(e){fge(e,this)}releaseCapture(e){V_(e)}}Rt.prototype._fillFunc=PCt;Rt.prototype._strokeFunc=RCt;Rt.prototype._fillFuncHit=OCt;Rt.prototype._strokeFuncHit=NCt;Rt.prototype._centroid=!1;Rt.prototype.nodeType="Shape";ns(Rt);Rt.prototype.eventListeners={};Rt.prototype.on.call(Rt.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",MCt);Rt.prototype.on.call(Rt.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",DCt);Rt.prototype.on.call(Rt.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",LCt);Rt.prototype.on.call(Rt.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",kCt);Rt.prototype.on.call(Rt.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",FCt);Le.addGetterSetter(Rt,"stroke",void 0,uge());Le.addGetterSetter(Rt,"strokeWidth",2,zt());Le.addGetterSetter(Rt,"fillAfterStrokeEnabled",!1);Le.addGetterSetter(Rt,"hitStrokeWidth","auto",F6());Le.addGetterSetter(Rt,"strokeHitEnabled",!0,Pf());Le.addGetterSetter(Rt,"perfectDrawEnabled",!0,Pf());Le.addGetterSetter(Rt,"shadowForStrokeEnabled",!0,Pf());Le.addGetterSetter(Rt,"lineJoin");Le.addGetterSetter(Rt,"lineCap");Le.addGetterSetter(Rt,"sceneFunc");Le.addGetterSetter(Rt,"hitFunc");Le.addGetterSetter(Rt,"dash");Le.addGetterSetter(Rt,"dashOffset",0,zt());Le.addGetterSetter(Rt,"shadowColor",void 0,Tw());Le.addGetterSetter(Rt,"shadowBlur",0,zt());Le.addGetterSetter(Rt,"shadowOpacity",1,zt());Le.addComponentsGetterSetter(Rt,"shadowOffset",["x","y"]);Le.addGetterSetter(Rt,"shadowOffsetX",0,zt());Le.addGetterSetter(Rt,"shadowOffsetY",0,zt());Le.addGetterSetter(Rt,"fillPatternImage");Le.addGetterSetter(Rt,"fill",void 0,uge());Le.addGetterSetter(Rt,"fillPatternX",0,zt());Le.addGetterSetter(Rt,"fillPatternY",0,zt());Le.addGetterSetter(Rt,"fillLinearGradientColorStops");Le.addGetterSetter(Rt,"strokeLinearGradientColorStops");Le.addGetterSetter(Rt,"fillRadialGradientStartRadius",0);Le.addGetterSetter(Rt,"fillRadialGradientEndRadius",0);Le.addGetterSetter(Rt,"fillRadialGradientColorStops");Le.addGetterSetter(Rt,"fillPatternRepeat","repeat");Le.addGetterSetter(Rt,"fillEnabled",!0);Le.addGetterSetter(Rt,"strokeEnabled",!0);Le.addGetterSetter(Rt,"shadowEnabled",!0);Le.addGetterSetter(Rt,"dashEnabled",!0);Le.addGetterSetter(Rt,"strokeScaleEnabled",!0);Le.addGetterSetter(Rt,"fillPriority","color");Le.addComponentsGetterSetter(Rt,"fillPatternOffset",["x","y"]);Le.addGetterSetter(Rt,"fillPatternOffsetX",0,zt());Le.addGetterSetter(Rt,"fillPatternOffsetY",0,zt());Le.addComponentsGetterSetter(Rt,"fillPatternScale",["x","y"]);Le.addGetterSetter(Rt,"fillPatternScaleX",1,zt());Le.addGetterSetter(Rt,"fillPatternScaleY",1,zt());Le.addComponentsGetterSetter(Rt,"fillLinearGradientStartPoint",["x","y"]);Le.addComponentsGetterSetter(Rt,"strokeLinearGradientStartPoint",["x","y"]);Le.addGetterSetter(Rt,"fillLinearGradientStartPointX",0);Le.addGetterSetter(Rt,"strokeLinearGradientStartPointX",0);Le.addGetterSetter(Rt,"fillLinearGradientStartPointY",0);Le.addGetterSetter(Rt,"strokeLinearGradientStartPointY",0);Le.addComponentsGetterSetter(Rt,"fillLinearGradientEndPoint",["x","y"]);Le.addComponentsGetterSetter(Rt,"strokeLinearGradientEndPoint",["x","y"]);Le.addGetterSetter(Rt,"fillLinearGradientEndPointX",0);Le.addGetterSetter(Rt,"strokeLinearGradientEndPointX",0);Le.addGetterSetter(Rt,"fillLinearGradientEndPointY",0);Le.addGetterSetter(Rt,"strokeLinearGradientEndPointY",0);Le.addComponentsGetterSetter(Rt,"fillRadialGradientStartPoint",["x","y"]);Le.addGetterSetter(Rt,"fillRadialGradientStartPointX",0);Le.addGetterSetter(Rt,"fillRadialGradientStartPointY",0);Le.addComponentsGetterSetter(Rt,"fillRadialGradientEndPoint",["x","y"]);Le.addGetterSetter(Rt,"fillRadialGradientEndPointX",0);Le.addGetterSetter(Rt,"fillRadialGradientEndPointY",0);Le.addGetterSetter(Rt,"fillPatternRotation",0);Le.backCompat(Rt,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var BCt="#",$Ct="beforeDraw",HCt="draw",Pge=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],UCt=Pge.length;let aS=class extends rd{constructor(e){super(e),this.canvas=new T1,this.hitCanvas=new B6({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}
419createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),e<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[e+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Vt.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var e=Vt.prototype.moveUp.call(this);if(!e)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Vt.prototype.moveDown.call(this)){var e=this.getStage();if(e){var n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Vt.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return Vt.prototype.remove.call(this),e&&e.parentNode&&Je._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:n}){return this.canvas.setSize(e,n),this.hitCanvas.setSize(e,n),this._setSmoothEnabled(),this}_validateAdd(e){var n=e.getType();n!=="Group"&&n!=="Shape"&&Je.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e=e||{},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),Vt.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Je.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Je.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Je.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let o=0;o<UCt;o++){const i=Pge[o],s=this._getIntersection({x:e.x+i.x*n,y:e.y+i.y*n}),a=s.shape;if(a)return a;if(r=!!s.antialiased,!s.antialiased)break}if(r)n+=1;else return null}}_getIntersection(e){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(e.x*n),Math.round(e.y*n),1,1).data,o=r[3];if(o===255){const i=Je._rgbToHex(r[0],r[1],r[2]),s=G_[BCt+i];return s?{shape:s}:{antialiased:!0}}else if(o>0)return{antialiased:!0};return{}}drawScene(e,n){var r=this.getLayer(),o=e||r&&r.getCanvas();return this._fire($Ct,{node:this}),this.clearBeforeDraw()&&o.getContext().clear(),rd.prototype.drawScene.call(this,o,n),this._fire(HCt,{node:this}),this}drawHit(e,n){var r=this.getLayer(),o=e||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),rd.prototype.drawHit.call(this,o,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Je.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return Je.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return Je.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};aS.prototype.nodeType="Layer";ns(aS);Le.addGetterSetter(aS,"imageSmoothingEnabled",!0);Le.addGetterSetter(aS,"clearBeforeDraw",!0);Le.addGetterSetter(aS,"hitGraphEnabled",!0,Pf());class H6 extends aS{constructor(e){super(e),this.listening(!1),Je.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}H6.prototype.nodeType="FastLayer";ns(H6);let fx=class extends rd{_validateAdd(e){var n=e.getType();n!=="Group"&&n!=="Shape"&&Je.throw("You may only add groups and shapes to groups.")}};fx.prototype.nodeType="Group";ns(fx);var q5=function(){return A1.performance&&A1.performance.now?function(){return A1.performance.now()}:function(){return new Date().getTime()}}();let _w=class RE{constructor(e,n){this.id=RE.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:q5(),frameRate:0},this.func=e,this.setLayers(n)}setLayers(e){var n=[];return e?e.length>0?n=e:n=[e]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(e){var n=this.layers,r=n.length,o;for(o=0;o<r;o++)if(n[o]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){var e=RE,n=e.animations,r=n.length,o;for(o=0;o<r;o++)if(n[o].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=q5(),RE._addAnimation(this),this}stop(){return RE._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){var n=e.id,r=this.animations,o=r.length,i;for(i=0;i<o;i++)if(r[i].id===n){this.animations.splice(i,1);break}}static _runFrames(){var e={},n=this.animations,r,o,i,s,a,l,c,u,d;for(s=0;s<n.length;s++)if(r=n[s],o=r.layers,i=r.func,r._updateFrameObject(q5()),l=o.length,i?d=i.call(r,r.frame)!==!1:d=!0,!!d)for(a=0;a<l;a++)c=o[a],c._id!==void 0&&(e[c._id]=c);for(u in e)e.hasOwnProperty(u)&&e[u].batchDraw()}static _animationLoop(){var e=RE;
419e.animations.length?(e._runFrames(),Je.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Je.requestAnimFrame(this._animationLoop))}};_w.animations=[];_w.animIdCounter=0;_w.animRunning=!1;var zCt={node:1,duration:1,easing:1,onFinish:1,yoyo:1},VCt=1,see=2,aee=3,GCt=0,lee=["fill","stroke","shadowColor"];class WCt{constructor(e,n,r,o,i,s,a){this.prop=e,this.propFunc=n,this.begin=o,this._pos=o,this.duration=s,this._change=0,this.prevPos=0,this.yoyo=a,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=i-this.begin,this.pause()}fire(e){var n=this[e];n&&n()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=see,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=aee,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var e=this.getTimer()-this._startTime;this.state===see?this.setTime(e):this.state===aee&&this.setTime(this.duration-e)}pause(){this.state=VCt,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Ps{constructor(e){var n=this,r=e.node,o=r._id,i,s=e.easing||W_.Linear,a=!!e.yoyo,l;typeof e.duration>"u"?i=.3:e.duration===0?i=.001:i=e.duration,this.node=r,this._id=GCt++;var c=r.getLayer()||(r instanceof Cn.Stage?r.getLayers():null);c||Je.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new _w(function(){n.tween.onEnterFrame()},c),this.tween=new WCt(l,function(u){n._tweenFunc(u)},s,0,1,i*1e3,a),this._addListeners(),Ps.attrs[o]||(Ps.attrs[o]={}),Ps.attrs[o][this._id]||(Ps.attrs[o][this._id]={}),Ps.tweens[o]||(Ps.tweens[o]={});for(l in e)zCt[l]===void 0&&this._addAttr(l,e[l]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,n){var r=this.node,o=r._id,i,s,a,l,c,u,d,h;if(a=Ps.tweens[o][e],a&&delete Ps.attrs[o][a][e],i=r.getAttr(e),Je._isArray(n))if(s=[],c=Math.max(n.length,i.length),e==="points"&&n.length!==i.length&&(n.length>i.length?(d=i,i=Je._prepareArrayForTween(i,n,r.closed())):(u=n,n=Je._prepareArrayForTween(n,i,r.closed()))),e.indexOf("fill")===0)for(l=0;l<c;l++)if(l%2===0)s.push(n[l]-i[l]);else{var f=Je.colorToRGBA(i[l]);h=Je.colorToRGBA(n[l]),i[l]=f,s.push({r:h.r-f.r,g:h.g-f.g,b:h.b-f.b,a:h.a-f.a})}else for(l=0;l<c;l++)s.push(n[l]-i[l]);else lee.indexOf(e)!==-1?(i=Je.colorToRGBA(i),h=Je.colorToRGBA(n),s={r:h.r-i.r,g:h.g-i.g,b:h.b-i.b,a:h.a-i.a}):s=n-i;Ps.attrs[o][this._id][e]={start:i,diff:s,end:n,trueEnd:u,trueStart:d},Ps.tweens[o][e]=this._id}_tweenFunc(e){var n=this.node,r=Ps.attrs[n._id][this._id],o,i,s,a,l,c,u,d;for(o in r){if(i=r[o],s=i.start,a=i.diff,d=i.end,Je._isArray(s))if(l=[],u=Math.max(s.length,d.length),o.indexOf("fill")===0)for(c=0;c<u;c++)c%2===0?l.push((s[c]||0)+a[c]*e):l.push("rgba("+Math.round(s[c].r+a[c].r*e)+","+Math.round(s[c].g+a[c].g*e)+","+Math.round(s[c].b+a[c].b*e)+","+(s[c].a+a[c].a*e)+")");else for(c=0;c<u;c++)l.push((s[c]||0)+a[c]*e);else lee.indexOf(o)!==-1?l="rgba("+Math.round(s.r+a.r*e)+","+Math.round(s.g+a.g*e)+","+Math.round(s.b+a.b*e)+","+(s.a+a.a*e)+")":l=s+a*e;n.setAttr(o,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,n=Ps.attrs[e._id][this._id];n.points&&n.points.trueEnd&&e.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,n=Ps.attrs[e._id][this._id];n.points&&n.points.trueStart&&e.points(n.points.trueStart),this.onReset&&this.onReset()}
419,this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e=this.node._id,n=this._id,r=Ps.tweens[e],o;this.pause();for(o in r)delete Ps.tweens[e][o];delete Ps.attrs[e][n]}}Ps.attrs={};Ps.tweens={};Vt.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()};var n=new Ps(t);n.play()};const W_={BackEaseIn(t,e,n,r){var o=1.70158;return n*(t/=r)*t*((o+1)*t-o)+e},BackEaseOut(t,e,n,r){var o=1.70158;return n*((t=t/r-1)*t*((o+1)*t+o)+1)+e},BackEaseInOut(t,e,n,r){var o=1.70158;return(t/=r/2)<1?n/2*(t*t*(((o*=1.525)+1)*t-o))+e:n/2*((t-=2)*t*(((o*=1.525)+1)*t+o)+2)+e},ElasticEaseIn(t,e,n,r,o,i){var s=0;return t===0?e:(t/=r)===1?e+n:(i||(i=r*.3),!o||o<Math.abs(n)?(o=n,s=i/4):s=i/(2*Math.PI)*Math.asin(n/o),-(o*Math.pow(2,10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/i))+e)},ElasticEaseOut(t,e,n,r,o,i){var s=0;return t===0?e:(t/=r)===1?e+n:(i||(i=r*.3),!o||o<Math.abs(n)?(o=n,s=i/4):s=i/(2*Math.PI)*Math.asin(n/o),o*Math.pow(2,-10*t)*Math.sin((t*r-s)*(2*Math.PI)/i)+n+e)},ElasticEaseInOut(t,e,n,r,o,i){var s=0;return t===0?e:(t/=r/2)===2?e+n:(i||(i=r*(.3*1.5)),!o||o<Math.abs(n)?(o=n,s=i/4):s=i/(2*Math.PI)*Math.asin(n/o),t<1?-.5*(o*Math.pow(2,10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/i))+e:o*Math.pow(2,-10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/i)*.5+n+e)},BounceEaseOut(t,e,n,r){return(t/=r)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},BounceEaseIn(t,e,n,r){return n-W_.BounceEaseOut(r-t,0,n,r)+e},BounceEaseInOut(t,e,n,r){return t<r/2?W_.BounceEaseIn(t*2,0,n,r)*.5+e:W_.BounceEaseOut(t*2-r,0,n,r)*.5+n*.5+e},EaseIn(t,e,n,r){return n*(t/=r)*t+e},EaseOut(t,e,n,r){return-n*(t/=r)*(t-2)+e},EaseInOut(t,e,n,r){return(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn(t,e,n,r){return n*(t/=r)*t*t*t*t+e},StrongEaseOut(t,e,n,r){return n*((t=t/r-1)*t*t*t*t+1)+e},StrongEaseInOut(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear(t,e,n,r){return n*t/r+e}},BC=Je._assign(Cn,{Util:Je,Transform:Ku,Node:Vt,Container:rd,Stage:gB,stages:mD,Layer:aS,FastLayer:H6,Group:fx,DD:po,Shape:Rt,shapes:G_,Animation:_w,Tween:Ps,Easings:W_,Context:fB,Canvas:pB});class Lm extends Rt{_sceneFunc(e){var n=Cn.getAngle(this.angle()),r=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,n,r),e.arc(0,0,this.innerRadius(),n,0,!r),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),o=Cn.getAngle(r?360-this.angle():this.angle()),i=Math.cos(Math.min(o,Math.PI)),s=1,a=Math.sin(Math.min(Math.max(Math.PI,o),3*Math.PI/2)),l=Math.sin(Math.min(o,Math.PI/2)),c=i*(i>0?e:n),u=s*n,d=a*(a>0?e:n),h=l*(l>0?n:e);return{x:c,y:r?-1*h:d,width:u-c,height:h-d}}}Lm.prototype._centroid=!0;Lm.prototype.className="Arc";Lm.prototype._attrsAffectingSize=["innerRadius","outerRadius"];ns(Lm);Le.addGetterSetter(Lm,"innerRadius",0,zt());Le.addGetterSetter(Lm,"outerRadius",0,zt());Le.addGetterSetter(Lm,"angle",0,zt());Le.addGetterSetter(Lm,"clockwise",!1,Pf());function K4(t,e,n,r,o,i,s){var a=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),l=Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2)),c=s*a/(a+l),u=s*l/(a+l),d=n-c*(o-t),h=r-c*(i-e),f=n+u*(o-t),p=r+u*(i-e);return[d,h,f,p]}function cee(t,e){var n=t.length,r=[],o,i;for(o=2;o<n-2;o+=2)i=K4(t[o-2],t[o-1],t[o],t[o+1],t[o+2],t[o+3],e),!isNaN(i[0])&&(r.push(i[0]),r.push(i[1]),r.push(t[o]),r.push(t[o+1]),r.push(i[2]),r.push(i[3]));return r}let km=class extends Rt{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){var n=this.points(),r=n.length,o=this.tension(),i=this.closed(),s=this.bezier(),a,l,c;if(r){if(e.beginPath(),e.moveTo(n[0],n[1]),o!==0&&r>4){for(a=this.getTensionPoints(),l=a.length,c=i?0:4,i||e.quadraticCurveTo(a[0],a[1],a[2],a[3]);c<l-2;)e.bezierCurveTo(a[c++],a[c++],a[c++],a[c++],a[c++],a[c++]);i||e.quadraticCurveTo(a[l-2],a[l-1],n[r-2],n[r-1])}else if(s)for(c=2;c<r;)e.bezierCurveTo(n[c++],n[c++],n[c++],n[c++],n[c++],n[c++]);else for(c=2;c<r;c+=2)e.lineTo(n[c],n[c+1]);i?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():cee(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),n=e.length,r=this.tension(),o=K4(e[n-2],e[n-1],e[0],e[1],e[2],e[3],r),i=K4(e[n-4],e[n-3],e[n-2],e[n-1],e[0],e[1],r),s=cee(e,r),a=[o[2],o[3]].concat(s).concat([i[0],i[1],e[n-2],e[n-1],i[2],i[3],o[0],o[1],e[0],e[1]]);return a}
419getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:e=this.points();for(var n=e[0],r=e[0],o=e[1],i=e[1],s,a,l=0;l<e.length/2;l++)s=e[l*2],a=e[l*2+1],n=Math.min(n,s),r=Math.max(r,s),o=Math.min(o,a),i=Math.max(i,a);return{x:n,y:o,width:r-n,height:i-o}}};km.prototype.className="Line";km.prototype._attrsAffectingSize=["points","bezier","tension"];ns(km);Le.addGetterSetter(km,"closed",!1);Le.addGetterSetter(km,"bezier",!1);Le.addGetterSetter(km,"tension",0,zt());Le.addGetterSetter(km,"points",[],tCt());let ml=class Yh extends Rt{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this.dataArray=Yh.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on("dataChange.konva",function(){this.dataArray=Yh.parsePathData(this.data()),this.pathLength=0;for(var r=0;r<this.dataArray.length;++r)this.pathLength+=this.dataArray[r].pathLength})}_sceneFunc(e){var n=this.dataArray;e.beginPath();for(var r=!1,o=0;o<n.length;o++){var i=n[o].command,s=n[o].points;switch(i){case"L":e.lineTo(s[0],s[1]);break;case"M":e.moveTo(s[0],s[1]);break;case"C":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"Q":e.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case"A":var a=s[0],l=s[1],c=s[2],u=s[3],d=s[4],h=s[5],f=s[6],p=s[7],m=c>u?c:u,y=c>u?1:c/u,v=c>u?u/c:1;e.translate(a,l),e.rotate(f),e.scale(y,v),e.arc(0,0,m,d,d+h,1-p),e.scale(1/y,1/v),e.rotate(-f),e.translate(-a,-l);break;case"z":r=!0,e.closePath();break}}!r&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach(function(c){if(c.command==="A"){var u=c.points[4],d=c.points[5],h=c.points[4]+d,f=Math.PI/180;if(Math.abs(u-h)<f&&(f=Math.abs(u-h)),d<0)for(let p=u-f;p>h;p-=f){const m=Yh.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],p,0);e.push(m.x,m.y)}else for(let p=u+f;p<h;p+=f){const m=Yh.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],p,0);e.push(m.x,m.y)}}else if(c.command==="C")for(let p=0;p<=1;p+=.01){const m=Yh.getPointOnCubicBezier(p,c.start.x,c.start.y,c.points[0],c.points[1],c.points[2],c.points[3],c.points[4],c.points[5]);e.push(m.x,m.y)}else e=e.concat(c.points)});for(var n=e[0],r=e[0],o=e[1],i=e[1],s,a,l=0;l<e.length/2;l++)s=e[l*2],a=e[l*2+1],isNaN(s)||(n=Math.min(n,s),r=Math.max(r,s)),isNaN(a)||(o=Math.min(o,a),i=Math.max(i,a));return{x:n,y:o,width:r-n,height:i-o}}getLength(){return this.pathLength}getPointAtLength(e){var n,r=0,o=this.dataArray.length;if(!o)return null;for(;r<o&&e>this.dataArray[r].pathLength;)e-=this.dataArray[r].pathLength,++r;if(r===o)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(e<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var i=this.dataArray[r],s=i.points;switch(i.command){case"L":return Yh.getPointOnLine(e,i.start.x,i.start.y,s[0],s[1]);case"C":return Yh.getPointOnCubicBezier(e/i.pathLength,i.start.x,i.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return Yh.getPointOnQuadraticBezier(e/i.pathLength,i.start.x,i.start.y,s[0],s[1],s[2],s[3]);case"A":var a=s[0],l=s[1],c=s[2],u=s[3],d=s[4],h=s[5],f=s[6];return d+=h*e/i.pathLength,Yh.getPointOnEllipticalArc(a,l,c,u,d,f)}return null}static getLineLength(e,n,r,o){return Math.sqrt((r-e)*(r-e)+(o-n)*(o-n))}static getPointOnLine(e,n,r,o,i,s,a){s===void 0&&(s=n),a===void 0&&(a=r);var l=(i-r)/(o-n+1e-8),c=Math.sqrt(e*e/(1+l*l));o<n&&(c*=-1);var u=l*c,d;if(o===n)d={x:s,y:a+u};else if((a-r)/(s-n+1e-8)===l)d={x:s+c,y:a+u};else{var h,f,p=this.getLineLength(n,r,o,i),m=(s-n)*(o-n)+(a-r)*(i-r);m=m/(p*p),h=n+m*(o-n),f=r+m*(i-r);var y=this.getLineLength(s,a,h,f),v=Math.sqrt(e*e-y*y);c=Math.sqrt(v*v/(1+l*l)),o<n&&(c*=-1),u=l*c,d={x:h+c,y:f+u}}return d}static getPointOnCubicBezier(e,n,r,o,i,s,a,l,c){function u(y){return y*y*y}function d(y){return 3*y*y*(1-y)}function h(y){return 3*y*(1-y)*(1-y)}function f(y){return(1-y)*(1-y)*(1-y)}var p=l*u(e)+s*d(e)+o*h(e)+n*f(e),m=c*u(e)+a*d(e)+i*h(e)+r*f(e);return{x:p,y:m}}static getPointOnQuadraticBezier(e,n,r,o,i,s,a){function l(f){return f*f}function c(f){return 2*f*(1-f)}function u(f){return(1-f)*(1-f)}var d=s*l(e)+o*c(e)+n*u(e),h=a*l(e)+i*c(e)+r*u(e);return{x:d,y:h}}static getPointOnEllipticalArc(e,n,r,o,i,s){var a=Math.cos(s),l=Math.sin(s),c={x:r*Math.cos(i),y:o*M
419ath.sin(i)};return{x:e+(c.x*a-c.y*l),y:n+(c.x*l+c.y*a)}}static parsePathData(e){if(!e)return[];var n=e,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var o=0;o<r.length;o++)n=n.replace(new RegExp(r[o],"g"),"|"+r[o]);var i=n.split("|"),s=[],a=[],l=0,c=0,u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,d;for(o=1;o<i.length;o++){var h=i[o],f=h.charAt(0);for(h=h.slice(1),a.length=0;d=u.exec(h);)a.push(d[0]);for(var p=[],m=0,y=a.length;m<y;m++){if(a[m]==="00"){p.push(0,0);continue}var v=parseFloat(a[m]);isNaN(v)?p.push(0):p.push(v)}for(;p.length>0&&!isNaN(p[0]);){var b=null,S=[],w=l,A=c,_,P,R,O,N,M,L,F,$,D;switch(f){case"l":l+=p.shift(),c+=p.shift(),b="L",S.push(l,c);break;case"L":l=p.shift(),c=p.shift(),S.push(l,c);break;case"m":var k=p.shift(),U=p.shift();if(l+=k,c+=U,b="M",s.length>2&&s[s.length-1].command==="z"){for(var H=s.length-2;H>=0;H--)if(s[H].command==="M"){l=s[H].points[0]+k,c=s[H].points[1]+U;break}}S.push(l,c),f="l";break;case"M":l=p.shift(),c=p.shift(),b="M",S.push(l,c),f="L";break;case"h":l+=p.shift(),b="L",S.push(l,c);break;case"H":l=p.shift(),b="L",S.push(l,c);break;case"v":c+=p.shift(),b="L",S.push(l,c);break;case"V":c=p.shift(),b="L",S.push(l,c);break;case"C":S.push(p.shift(),p.shift(),p.shift(),p.shift()),l=p.shift(),c=p.shift(),S.push(l,c);break;case"c":S.push(l+p.shift(),c+p.shift(),l+p.shift(),c+p.shift()),l+=p.shift(),c+=p.shift(),b="C",S.push(l,c);break;case"S":P=l,R=c,_=s[s.length-1],_.command==="C"&&(P=l+(l-_.points[2]),R=c+(c-_.points[3])),S.push(P,R,p.shift(),p.shift()),l=p.shift(),c=p.shift(),b="C",S.push(l,c);break;case"s":P=l,R=c,_=s[s.length-1],_.command==="C"&&(P=l+(l-_.points[2]),R=c+(c-_.points[3])),S.push(P,R,l+p.shift(),c+p.shift()),l+=p.shift(),c+=p.shift(),b="C",S.push(l,c);break;case"Q":S.push(p.shift(),p.shift()),l=p.shift(),c=p.shift(),S.push(l,c);break;case"q":S.push(l+p.shift(),c+p.shift()),l+=p.shift(),c+=p.shift(),b="Q",S.push(l,c);break;case"T":P=l,R=c,_=s[s.length-1],_.command==="Q"&&(P=l+(l-_.points[0]),R=c+(c-_.points[1])),l=p.shift(),c=p.shift(),b="Q",S.push(P,R,l,c);break;case"t":P=l,R=c,_=s[s.length-1],_.command==="Q"&&(P=l+(l-_.points[0]),R=c+(c-_.points[1])),l+=p.shift(),c+=p.shift(),b="Q",S.push(P,R,l,c);break;case"A":O=p.shift(),N=p.shift(),M=p.shift(),L=p.shift(),F=p.shift(),$=l,D=c,l=p.shift(),c=p.shift(),b="A",S=this.convertEndpointToCenterParameterization($,D,l,c,L,F,O,N,M);break;case"a":O=p.shift(),N=p.shift(),M=p.shift(),L=p.shift(),F=p.shift(),$=l,D=c,l+=p.shift(),c+=p.shift(),b="A",S=this.convertEndpointToCenterParameterization($,D,l,c,L,F,O,N,M);break}s.push({command:b||f,points:S,start:{x:w,y:A},pathLength:this.calcLength(w,A,b||f,S)})}(f==="z"||f==="Z")&&s.push({command:"z",points:[],start:void 0,pathLength:0})}return s}static calcLength(e,n,r,o){var i,s,a,l,c=Yh;switch(r){case"L":return c.getLineLength(e,n,o[0],o[1]);case"C":for(i=0,s=c.getPointOnCubicBezier(0,e,n,o[0],o[1],o[2],o[3],o[4],o[5]),l=.01;l<=1;l+=.01)a=c.getPointOnCubicBezier(l,e,n,o[0],o[1],o[2],o[3],o[4],o[5]),i+=c.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case"Q":for(i=0,s=c.getPointOnQuadraticBezier(0,e,n,o[0],o[1],o[2],o[3]),l=.01;l<=1;l+=.01)a=c.getPointOnQuadraticBezier(l,e,n,o[0],o[1],o[2],o[3]),i+=c.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case"A":i=0;var u=o[4],d=o[5],h=o[4]+d,f=Math.PI/180;if(Math.abs(u-h)<f&&(f=Math.abs(u-h)),s=c.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],u,0),d<0)for(l=u-f;l>h;l-=f)a=c.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],l,0),i+=c.getLineLength(s.x,s.y,a.x,a.y),s=a;else for(l=u+f;l<h;l+=f)a=c.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],l,0),i+=c.getLineLength(s.x,s.y,a.x,a.y),s=a;return a=c.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],h,0),i+=c.getLineLength(s.x,s.y,a.x,a.y),i}return 0}static convertEndpointToCenterParameterization(e,n,r,o,i,s,a,l,c){var u=c*(Math.PI/180),d=Math.cos(u)*(e-r)/2+Math.sin(u)*(n-o)/2,h=-1*Math.sin(u)*(e-r)/2+Math.cos(u)*(n-o)/2,f=d*d/(a*a)+h*h/(l*l);f>1&&(a*=Math.sqrt(f),l*=Math.sqrt(f));var p=Math.sqrt((a*a*(l*l)-a*a*(h*h)-l*l*(d*d))/(a*a*(h*h)+l*l*(d*d)));i===s&&(p*=-1),isNaN(p)&&(p=0);var m=p*a*h/l,y=p*-l*d/a,v=(e+r)/2+Math.cos(u)*m-Math.sin(u)*y,b=(n+o)/2+Math.sin(u)*m+
419Math.cos(u)*y,S=function(N){return Math.sqrt(N[0]*N[0]+N[1]*N[1])},w=function(N,M){return(N[0]*M[0]+N[1]*M[1])/(S(N)*S(M))},A=function(N,M){return(N[0]*M[1]<N[1]*M[0]?-1:1)*Math.acos(w(N,M))},_=A([1,0],[(d-m)/a,(h-y)/l]),P=[(d-m)/a,(h-y)/l],R=[(-1*d-m)/a,(-1*h-y)/l],O=A(P,R);return w(P,R)<=-1&&(O=Math.PI),w(P,R)>=1&&(O=0),s===0&&O>0&&(O=O-2*Math.PI),s===1&&O<0&&(O=O+2*Math.PI),[v,b,a,l,_,O,u,s]}};ml.prototype.className="Path";ml.prototype._attrsAffectingSize=["data"];ns(ml);Le.addGetterSetter(ml,"data");class lS extends km{_sceneFunc(e){super._sceneFunc(e);var n=Math.PI*2,r=this.points(),o=r,i=this.tension()!==0&&r.length>4;i&&(o=this.getTensionPoints());var s=this.pointerLength(),a=r.length,l,c;if(i){const h=[o[o.length-4],o[o.length-3],o[o.length-2],o[o.length-1],r[a-2],r[a-1]],f=ml.calcLength(o[o.length-4],o[o.length-3],"C",h),p=ml.getPointOnQuadraticBezier(Math.min(1,1-s/f),h[0],h[1],h[2],h[3],h[4],h[5]);l=r[a-2]-p.x,c=r[a-1]-p.y}else l=r[a-2]-r[a-4],c=r[a-1]-r[a-3];var u=(Math.atan2(c,l)+n)%n,d=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(r[a-2],r[a-1]),e.rotate(u),e.moveTo(0,0),e.lineTo(-s,d/2),e.lineTo(-s,-d/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(r[0],r[1]),i?(l=(o[0]+o[2])/2-r[0],c=(o[1]+o[3])/2-r[1]):(l=r[2]-r[0],c=r[3]-r[1]),e.rotate((Math.atan2(-c,-l)+n)%n),e.moveTo(0,0),e.lineTo(-s,d/2),e.lineTo(-s,-d/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),n=this.pointerWidth()/2;return{x:e.x-n,y:e.y-n,width:e.width+n*2,height:e.height+n*2}}}lS.prototype.className="Arrow";ns(lS);Le.addGetterSetter(lS,"pointerLength",10,zt());Le.addGetterSetter(lS,"pointerWidth",10,zt());Le.addGetterSetter(lS,"pointerAtBeginning",!1);Le.addGetterSetter(lS,"pointerAtEnding",!0);let Iw=class extends Rt{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}};Iw.prototype._centroid=!0;Iw.prototype.className="Circle";Iw.prototype._attrsAffectingSize=["radius"];ns(Iw);Le.addGetterSetter(Iw,"radius",0,zt());let T0=class extends Rt{_sceneFunc(e){var n=this.radiusX(),r=this.radiusY();e.beginPath(),e.save(),n!==r&&e.scale(1,r/n),e.arc(0,0,n,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};T0.prototype.className="Ellipse";T0.prototype._centroid=!0;T0.prototype._attrsAffectingSize=["radiusX","radiusY"];ns(T0);Le.addComponentsGetterSetter(T0,"radius",["x","y"]);Le.addGetterSetter(T0,"radiusX",0,zt());Le.addGetterSetter(T0,"radiusY",0,zt());let ng=class Rge extends Rt{constructor(e){super(e),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const n=this.getWidth(),r=this.getHeight(),o=this.cornerRadius(),i=this.attrs.image;let s;if(i){const a=this.attrs.cropWidth,l=this.attrs.cropHeight;a&&l?s=[i,this.cropX(),this.cropY(),a,l,0,0,n,r]:s=[i,0,0,n,r]}(this.hasFill()||this.hasStroke()||o)&&(e.beginPath(),o?Je.drawRoundedRectPath(e,n,r,o):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)),i&&(o&&e.clip(),e.drawImage.apply(e,s))}_hitFunc(e){var n=this.width(),r=this.height(),o=this.cornerRadius();e.beginPath(),o?Je.drawRoundedRectPath(e,n,r,o):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,n;return(e=this.attrs.width)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var e,n;return(e=this.attrs.height)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(e,n,r=null){var o=Je.createImageElement();o.onload=function(){var i=new Rge({image:o});n(i)},o.onerror=r,o.crossOrigin="Anonymous",o.src=e}};ng.prototype.className="Image";ns(ng);Le.addGetterSetter(ng,"cornerRadius",0,k6(4));Le.addGetterSetter(ng,"image");Le.addComponentsGetterSetter(ng,"crop",["x","y","width","height"]);Le.addGetterSetter(ng,"cropX",0,zt());Le.addGetterSetter(ng,"cropY",0,zt());Le.addGetterSetter(ng,"cropWidth",0,zt());Le.addGetterSetter(ng,"cropHeight",0,zt());var Oge=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],jCt="Change.konva",qCt="none",Q4="up",Z4="right",J4="down",ez="left",YCt=Oge.length;class U6 extends fx{constructor(e){super(e),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var n=this,r,o=function(){n._sync()};for(r=0;r<YCt;r++)e.on(Oge[r]+jCt,o)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),n=this.getTag(),r,o,i,s,a,l,c;if(e&&n){switch(r=e.width(),o=e.height(),i=n.pointerDirection(),s=n.pointerWidth(),c=n.pointerHeight(),a=0,l=0,i){case Q4:a=r/2,l=-1*c;break;case Z4:a=r+s,l=o/2;break;case J4:a=r/2,l=o+c;break;case ez:a=-1*s,l=o/2;break}n.setAttrs({x:-1*a,y:-1*l,width:r,height:o}),e.setAttrs({x:-1*a,y:-1*l})}}}U6.prototype.className="Label";ns(U6);class cS extends Rt{_sceneFunc(e){var n=this.width(),r=this.height(),o=this.pointerDirection(),i=this.pointerWidth(),s=this.pointerHeight(),a=this.cornerRadius();let l=0,c=0,u=0,d=0;typeof a=="number"?l=c=u=d=Math.min(a,n/2,r/2):(l=Math.min(a[0]||0,n/2,r/2),c=Math.min(a[1]||0,n/2,r/2),d=Math.min(a[2]||0,n/2,r/2),u=Math.min(a[3]||0,n/2,r/2)),e.beginPath(),e.moveTo(l,0),o===Q4&&(e.lineTo((n-i)/2,0),e.lineTo(n/2,-1*s),e.lineTo((n+i)/2,0)),e.lineTo(n-c,0),e.arc(n-c,c,c,Math.PI*3/2,0,!1),o===Z4&&(e.lineTo(n,(r-s)/2),e.lineTo(n+i,r/2),e.lineTo(n,(r+s)/2)),e.lineTo(n,r-d),e.arc(n-d,r-d,d,0,Math.PI/2,!1),o===J4&&(e.lineTo((n+i)/2,r),e.lineTo(n/2,r+s),e.lineTo((n-i)/2,r)),e.lineTo(u,r),e.arc(u,r-u,u,Math.PI/2,Math.PI,!1),o===ez&&(e.lineTo(0,(r+s)/2),e.lineTo(-1*i,r/2),e.lineTo(0,(r-s)/2)),e.lineTo(0,l),e.arc(l,l,l,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,n=0,r=this.pointerWidth(),o=this.pointerHeight(),i=this.pointerDirection(),s=this.width(),a=this.height();return i===Q4?(n-=o,a+=o):i===J4?a+=o:i===ez?(e-=r*1.5,s+=r):i===Z4&&(s+=r*1.5),{x:e,y:n,width:s,height:a}}}cS.prototype.className="Tag";ns(cS);Le.addGetterSetter(cS,"pointerDirection",qCt);Le.addGetterSetter(cS,"pointerWidth",0,zt());Le.addGetterSetter(cS,"pointerHeight",0,zt());Le.addGetterSetter(cS,"cornerRadius",0,k6(4));let DR=class extends Rt{_sceneFunc(e){var n=this.cornerRadius(),r=this.width(),o=this.height();e.beginPath(),n?Je.drawRoundedRectPath(e,r,o,n):e.rect(0,0,r,o),e.closePath(),e.fillStrokeShape(this)}};DR.prototype.className="Rect";ns(DR);Le.addGetterSetter(DR,"cornerRadius",0,k6(4));class uS extends Rt{_sceneFunc(e){const n=this._getPoints();e.beginPath(),e.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)e.lineTo(n[r].x,n[r].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,n=this.attrs.radius||0,r=[];for(var o=0;o<e;
419o++)r.push({x:n*Math.sin(o*2*Math.PI/e),y:-1*n*Math.cos(o*2*Math.PI/e)});return r}getSelfRect(){const e=this._getPoints();var n=e[0].x,r=e[0].y,o=e[0].x,i=e[0].y;return e.forEach(s=>{n=Math.min(n,s.x),r=Math.max(r,s.x),o=Math.min(o,s.y),i=Math.max(i,s.y)}),{x:n,y:o,width:r-n,height:i-o}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}uS.prototype.className="RegularPolygon";uS.prototype._centroid=!0;uS.prototype._attrsAffectingSize=["radius"];ns(uS);Le.addGetterSetter(uS,"radius",0,zt());Le.addGetterSetter(uS,"sides",0,zt());var uee=Math.PI*2;class dS extends Rt{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,uee,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),uee,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}dS.prototype.className="Ring";dS.prototype._centroid=!0;dS.prototype._attrsAffectingSize=["innerRadius","outerRadius"];ns(dS);Le.addGetterSetter(dS,"innerRadius",0,zt());Le.addGetterSetter(dS,"outerRadius",0,zt());class rg extends Rt{constructor(e){super(e),this._updated=!0,this.anim=new _w(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){var n=this.animation(),r=this.frameIndex(),o=r*4,i=this.animations()[n],s=this.frameOffsets(),a=i[o+0],l=i[o+1],c=i[o+2],u=i[o+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,c,u),e.closePath(),e.fillStrokeShape(this)),d)if(s){var h=s[n],f=r*2;e.drawImage(d,a,l,c,u,h[f+0],h[f+1],c,u)}else e.drawImage(d,a,l,c,u,0,0,c,u)}_hitFunc(e){var n=this.animation(),r=this.frameIndex(),o=r*4,i=this.animations()[n],s=this.frameOffsets(),a=i[o+2],l=i[o+3];if(e.beginPath(),s){var c=s[n],u=r*2;e.rect(c[u+0],c[u+1],a,l)}else e.rect(0,0,a,l);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),n=this.animation(),r=this.animations(),o=r[n],i=o.length/4;e<i-1?this.frameIndex(e+1):this.frameIndex(0)}}rg.prototype.className="Sprite";ns(rg);Le.addGetterSetter(rg,"animation");Le.addGetterSetter(rg,"animations");Le.addGetterSetter(rg,"frameOffsets");Le.addGetterSetter(rg,"image");Le.addGetterSetter(rg,"frameIndex",0,zt());Le.addGetterSetter(rg,"frameRate",17,zt());Le.backCompat(rg,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class _0 extends Rt{_sceneFunc(e){var n=this.innerRadius(),r=this.outerRadius(),o=this.numPoints();e.beginPath(),e.moveTo(0,0-r);for(var i=1;i<o*2;i++){var s=i%2===0?r:n,a=s*Math.sin(i*Math.PI/o),l=-1*s*Math.cos(i*Math.PI/o);e.lineTo(a,l)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}_0.prototype.className="Star";_0.prototype._centroid=!0;_0.prototype._attrsAffectingSize=["innerRadius","outerRadius"];ns(_0);Le.addGetterSetter(_0,"numPoints",5,zt());Le.addGetterSetter(_0,"innerRadius",0,zt());Le.addGetterSetter(_0,"outerRadius",0,zt());function Nge(t){return Array.from(t)}var SE="auto",XCt="center",ET="justify",KCt="Change.konva",QCt="2d",dee="-",Mge="left",ZCt="text",JCt="Text",eSt="top",tSt="bottom",hee="middle",Dge="normal",nSt="px ",rM=" ",rSt="right",oSt="word",iSt="char",fee="none",Y5="â¦",Lge=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],sSt=Lge.length;function aSt(t){return t.split(",").map(e=>{e=e.trim();const n=e.indexOf(" ")>=0,r=e.indexOf('"')>=0||e.indexOf("'")>=0;return n&&!r&&(e=`"${e}"`),e}).join(", ")}var oM;function X5(){return oM||(oM=Je.createCanvasElement().getContext(QCt),oM)}function lSt(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function cSt(t){t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function uSt(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let ts=class extends Rt{constructor(e){super(uSt(e)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<sSt;n++)this.on(Lge[n]+KCt,this._setTextData);this._setTextData()}_sceneFunc(e){var n=this.textArr,r=n.length;if(this.text()){var o=this.padding(),i=this.fontSize(),s=this.lineHeight()*i,a=this.verticalAlign(),l=0,c=this.align(),u=this.getWidth(),d=this.letterSpacing(),h=this.fill(),f=this.textDecoration(),p=f.indexOf("underline")!==-1,m=f.indexOf("line-through")!==-1,y,v=0,v=s/2,b=0,S=0;for(e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",hee),e.setAttr("textAlign",Mge),a===hee?l=(this.getHeight()-r*s-o*2)/2:a===tSt&&(l=this.getHeight()-r*s-o*2),e.translate(o,l+o),y=0;y<r;y++){var b=0,S=0,w=n[y],A=w.text,_=w.width,P=w.lastInParagraph,R,O,N;if(e.save(),c===rSt?b+=u-_-o*2:c===XCt&&(b+=(u-_-o*2)/2),p){e.save(),e.beginPath(),e.moveTo(b,v+S+Math.round(i/2)),R=A.split(" ").length-1,O=R===0,N=c===ET&&!P?u-o*2:_,e.lineTo(b+Math.round(N),v+S+Math.round(i/2)),e.lineWidth=i/15;const k=this._getLinearGradient();
419e.strokeStyle=k||h,e.stroke(),e.restore()}if(m){e.save(),e.beginPath(),e.moveTo(b,v+S),R=A.split(" ").length-1,O=R===0,N=c===ET&&P&&!O?u-o*2:_,e.lineTo(b+Math.round(N),v+S),e.lineWidth=i/15;const k=this._getLinearGradient();e.strokeStyle=k||h,e.stroke(),e.restore()}if(d!==0||c===ET){R=A.split(" ").length-1;for(var M=Nge(A),L=0;L<M.length;L++){var F=M[L];F===" "&&!P&&c===ET&&(b+=(u-o*2-_)/R),this._partialTextX=b,this._partialTextY=v+S,this._partialText=F,e.fillStrokeShape(this),b+=this.measureSize(F).width+d}}else this._partialTextX=b,this._partialTextY=v+S,this._partialText=A,e.fillStrokeShape(this);e.restore(),r>1&&(v+=s)}}}_hitFunc(e){var n=this.getWidth(),r=this.getHeight();e.beginPath(),e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}setText(e){var n=Je._isString(e)?e:e==null?"":e+"";return this._setAttr(ZCt,n),this}getWidth(){var e=this.attrs.width===SE||this.attrs.width===void 0;return e?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var e=this.attrs.height===SE||this.attrs.height===void 0;return e?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Je.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var n=X5(),r=this.fontSize(),o;return n.save(),n.font=this._getContextFont(),o=n.measureText(e),n.restore(),{width:o.width,height:r}}_getContextFont(){return this.fontStyle()+rM+this.fontVariant()+rM+(this.fontSize()+nSt)+aSt(this.fontFamily())}_addTextLine(e){this.align()===ET&&(e=e.trim());var r=this._getTextWidth(e);return this.textArr.push({text:e,width:r,lastInParagraph:!1})}_getTextWidth(e){var n=this.letterSpacing(),r=e.length;return X5().measureText(e).width+(r?n*(r-1):0)}_setTextData(){var e=this.text().split(` 420`),n=+this.fontSize(),r=0,o=this.lineHeight()*n,i=this.attrs.width,s=this.attrs.height,a=i!==SE&&i!==void 0,l=s!==SE&&s!==void 0,c=this.padding(),u=i-c*2,d=s-c*2,h=0,f=this.wrap(),p=f!==fee,m=f!==iSt&&p,y=this.ellipsis();this.textArr=[],X5().font=this._getContextFont();for(var v=y?this._getTextWidth(Y5):0,b=0,S=e.length;b<S;++b){var w=e[b],A=this._getTextWidth(w);if(a&&A>u)for(;w.length>0;){for(var _=0,P=w.length,R="",O=0;_<P;){var N=_+P>>>1,M=w.slice(0,N+1),L=this._getTextWidth(M)+v;L<=u?(_=N+1,R=M,O=L):P=N}if(R){if(m){var F,$=w[R.length],D=$===rM||$===dee;D&&O<=u?F=R.length:F=Math.max(R.lastIndexOf(rM),R.lastIndexOf(dee))+1,F>0&&(_=F,R=R.slice(0,_),O=this._getTextWidth(R))}R=R.trimRight(),this._addTextLine(R),r=Math.max(r,O),h+=o;var k=this._shouldHandleEllipsis(h);if(k){this._tryToAddEllipsisToLastLine();break}if(w=w.slice(_),w=w.trimLeft(),w.length>0&&(A=this._getTextWidth(w),A<=u)){this._addTextLine(w),h+=o,r=Math.max(r,A);break}}else break}else this._addTextLine(w),h+=o,r=Math.max(r,A),this._shouldHandleEllipsis(h)&&b<S-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),l&&h+o>d)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(e){var n=+this.fontSize(),r=this.lineHeight()*n,o=this.attrs.height,i=o!==SE&&o!==void 0,s=this.padding(),a=o-s*2,l=this.wrap(),c=l!==fee;return!c||i&&e+r>a}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,n=e!==SE&&e!==void 0,r=this.padding(),o=e-r*2,i=this.ellipsis(),s=this.textArr[this.textArr.length-1];if(!(!s||!i)){if(n){var a=this._getTextWidth(s.text+Y5)<o;a||(s.text=s.text.slice(0,s.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(s.text+Y5)}}getStrokeScaleEnabled(){return!0}};ts.prototype._fillFunc=lSt;ts.prototype._strokeFunc=cSt;ts.prototype.className=JCt;ts.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];ns(ts);Le.overWriteSetter(ts,"width",F6());Le.overWriteSetter(ts,"height",F6());Le.addGetterSetter(ts,"fontFamily","Arial");Le.addGetterSetter(ts,"fontSize",12,zt());Le.addGetterSetter(ts,"fontStyle",Dge);Le.addGetterSetter(ts,"fontVariant",Dge);Le.addGetterSetter(ts,"padding",0,zt());Le.addGetterSetter(ts,"align",Mge);Le.addGetterSetter(ts,"verticalAlign",eSt);Le.addGetterSetter(ts,"lineHeight",1,zt());Le.addGetterSetter(ts,"wrap",oSt);Le.addGetterSetter(ts,"ellipsis",!1,Pf());Le.addGetterSetter(ts,"letterSpacing",0,zt());Le.addGetterSetter(ts,"text","",Tw());Le.addGetterSetter(ts,"textDecoration","");var dSt="",kge="normal";function Fge(t){t.fillText(this.partialText,0,0)}function Bge(t){t.strokeText(this.partialText,0,0)}class Pa extends Rt{constructor(e){super(e),this.dummyCanvas=Je.createCanvasElement(),this.dataArray=[],this.dataArray=ml.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=ml.parsePathData(this.attrs.data),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncCh
420ange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var n=this.textDecoration(),r=this.fill(),o=this.fontSize(),i=this.glyphInfo;n==="underline"&&e.beginPath();for(var s=0;s<i.length;s++){e.save();var a=i[s].p0;e.translate(a.x,a.y),e.rotate(i[s].rotation),this.partialText=i[s].text,e.fillStrokeShape(this),n==="underline"&&(s===0&&e.moveTo(0,o/2+1),e.lineTo(o,o/2+1)),e.restore()}n==="underline"&&(e.strokeStyle=r,e.lineWidth=o/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var n=this.glyphInfo;if(n.length>=1){var r=n[0].p0;e.moveTo(r.x,r.y)}for(var o=0;o<n.length;o++){var i=n[o].p1;e.lineTo(i.x,i.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return Je.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return ts.prototype.setText.call(this,e)}_getContextFont(){return ts.prototype._getContextFont.call(this)}_getTextSize(e){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var o=r.measureText(e);return r.restore(),{width:o.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var e=this,n=this._getTextSize(this.attrs.text),r=this.letterSpacing(),o=this.align(),i=this.kerningFunc();this.textWidth=n.width,this.textHeight=n.height;var s=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);this.glyphInfo=[];for(var a=0,l=0;l<e.dataArray.length;l++)e.dataArray[l].pathLength>0&&(a+=e.dataArray[l].pathLength);var c=0;o==="center"&&(c=Math.max(0,a/2-s/2)),o==="right"&&(c=Math.max(0,a-s));for(var u=Nge(this.text()),d=this.text().split(" ").length-1,h,f,p,m=-1,y=0,v=function(){y=0;for(var L=e.dataArray,F=m+1;F<L.length;F++){if(L[F].pathLength>0)return m=F,L[F];L[F].command==="M"&&(h={x:L[F].points[0],y:L[F].points[1]})}return{}},b=function(L){var F=e._getTextSize(L).width+r;L===" "&&o==="justify"&&(F+=(a-s)/d);var $=0,D=0;for(f=void 0;Math.abs(F-$)/F>.01&&D<20;){D++;for(var k=$;p===void 0;)p=v(),p&&k+p.pathLength<F&&(k+=p.pathLength,p=void 0);if(Object.keys(p).length===0||h===void 0)return;var U=!1;switch(p.command){case"L":ml.getLineLength(h.x,h.y,p.points[0],p.points[1])>F?f=ml.getPointOnLine(F,h.x,h.y,p.points[0],p.points[1],h.x,h.y):p=void 0;break;case"A":var H=p.points[4],V=p.points[5],q=p.points[4]+V;y===0?y=H+1e-8:F>$?y+=Math.PI/180*V/Math.abs(V):y-=Math.PI/360*V/Math.abs(V),(V<0&&y<q||V>=0&&y>q)&&(y=q,U=!0),f=ml.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],y,p.points[6]);break;case"C":y===0?F>p.pathLength?y=1e-8:y=F/p.pathLength:F>$?y+=(F-$)/p.pathLength/2:y=Math.max(y-($-F)/p.pathLength/2,0),y>1&&(y=1,U=!0),f=ml.getPointOnCubicBezier(y,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3],p.points[4],p.points[5]);break;case"Q":y===0?y=F/p.pathLength:F>$?y+=(F-$)/p.pathLength:y-=($-F)/p.pathLength,y>1&&(y=1,U=!0),f=ml.getPointOnQuadraticBezier(y,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3]);break}f!==void 0&&($=ml.getLineLength(h.x,h.y,f.x,f.y)),U&&(U=!1,p=void 0)}},S="C",w=e._getTextSize(S).width+r,A=c/w-1,_=0;_<A&&(b(S),!(h===void 0||f===void 0));_++)h=f;for(var P=0;P<u.length&&(b(u[P]),!(h===void 0||f===void 0));P++){var R=ml.getLineLength(h.x,h.y,f.x,f.y),O=0;if(i)try{O=i(u[P-1],u[P])*this.fontSize()}catch{O=0}h.x+=O,f.x+=O,this.textWidth+=O;var N=ml.getPointOnLine(O+R/2,h.x,h.y,f.x,f.y),M=Math.atan2(f.y-h.y,f.x-h.x);this.glyphInfo.push({transposeX:N.x,transposeY:N.y,text:u[P],rotation:M,p0:h,p1:f}),h=f}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach(function(u){e.push(u.p0.x),e.push(u.p0.y),e.push(u.p1.x),e.push(u.p1.y)});for(var n=e[0]||0,r=e[0]||0,o=e[1]||0,i=e[1]||0,s,a,l=0;l<e.length/2;l++)s=e[l*2],a=e[l*2+1],n=Math.min(n,s),r=Math.max(r,s),o=Math.min(o,a),i=Math.max(i,a);var c=this.fontSize();return{x:n-c/2,y:o-c/2,width:r-n+c,height:i-o+c}}destroy(){return Je.releaseCanvas(this.dummyCanvas),super.destroy()}}Pa.prototype._fillFunc=Fge;Pa.prototype._strokeFunc=Bge;Pa.prototype._fillFuncHit=Fge;Pa.prototype._strokeFuncHit=Bge;Pa.prototype.className="TextPath";Pa.prototype._attrsAffectingSize=["text","fontSize","data"];
420ns(Pa);Le.addGetterSetter(Pa,"data");Le.addGetterSetter(Pa,"fontFamily","Arial");Le.addGetterSetter(Pa,"fontSize",12,zt());Le.addGetterSetter(Pa,"fontStyle",kge);Le.addGetterSetter(Pa,"align","left");Le.addGetterSetter(Pa,"letterSpacing",0,zt());Le.addGetterSetter(Pa,"textBaseline","middle");Le.addGetterSetter(Pa,"fontVariant",kge);Le.addGetterSetter(Pa,"text",dSt);Le.addGetterSetter(Pa,"textDecoration",null);Le.addGetterSetter(Pa,"kerningFunc",null);var $ge="tr-konva",hSt=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(t=>t+`.${$ge}`).join(" "),pee="nodesRect",fSt=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],pSt={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const gSt="ontouchstart"in Cn._global;function mSt(t,e){if(t==="rotater")return"crosshair";e+=Je.degToRad(pSt[t]||0);var n=(Je.radToDeg(e)%360+360)%360;return Je._inRange(n,315+22.5,360)||Je._inRange(n,0,22.5)?"ns-resize":Je._inRange(n,45-22.5,45+22.5)?"nesw-resize":Je._inRange(n,90-22.5,90+22.5)?"ew-resize":Je._inRange(n,135-22.5,135+22.5)?"nwse-resize":Je._inRange(n,180-22.5,180+22.5)?"ns-resize":Je._inRange(n,225-22.5,225+22.5)?"nesw-resize":Je._inRange(n,270-22.5,270+22.5)?"ew-resize":Je._inRange(n,315-22.5,315+22.5)?"nwse-resize":(Je.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var x2=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],gee=1e8;function ySt(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function Hge(t,e,n){const r=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),o=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:r,y:o})}function vSt(t,e){const n=ySt(t);return Hge(t,e,n)}function bSt(t,e,n){let r=e;for(let o=0;o<t.length;o++){const i=Cn.getAngle(t[o]),s=Math.abs(i-e)%(Math.PI*2);Math.min(s,Math.PI*2-s)<n&&(r=i)}return r}class _o extends fx{constructor(e){super(e),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(hSt,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Je.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return $ge+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const n=e.filter(o=>o.isAncestorOf(this)?(Je.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=e=n,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(o=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},s=o._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");o.on(s,i),o.on(fSt.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),o.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(o)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(e){let n;e.on(`dragstart.${this._getEventNamespace()}`,r=>{n=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(r,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const o=e.getAbsolutePosition(),i=o.x-n.x,s=o.y-n.y;
420this.nodes().forEach(a=>{if(a===e||a.isDragging())return;const l=a.getAbsolutePosition();a.setAbsolutePosition({x:l.x+i,y:l.y+s}),a.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(pee),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(pee,this.__getNodeRect)}__getNodeShape(e,n=this.rotation(),r){var o=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=e.getAbsoluteScale(r),s=e.getAbsolutePosition(r),a=o.x*i.x-e.offsetX()*i.x,l=o.y*i.y-e.offsetY()*i.y;const c=(Cn.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),u={x:s.x+a*Math.cos(c)+l*Math.sin(-c),y:s.y+l*Math.cos(c)+a*Math.sin(c),width:o.width*i.x,height:o.height*i.y,rotation:c};return Hge(u,-Cn.getAngle(n),{x:0,y:0})}__getNodeRect(){var e=this.getNode();if(!e)return{x:-gee,y:-gee,width:0,height:0,rotation:0};const n=[];this.nodes().map(c=>{const u=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var d=[{x:u.x,y:u.y},{x:u.x+u.width,y:u.y},{x:u.x+u.width,y:u.y+u.height},{x:u.x,y:u.y+u.height}],h=c.getAbsoluteTransform();d.forEach(function(f){var p=h.point(f);n.push(p)})});const r=new Ku;r.rotate(-Cn.getAngle(this.rotation()));var o,i,s,a;n.forEach(function(c){var u=r.point(c);o===void 0&&(o=s=u.x,i=a=u.y),o=Math.min(o,u.x),i=Math.min(i,u.y),s=Math.max(s,u.x),a=Math.max(a,u.y)}),r.invert();const l=r.point({x:o,y:i});return{x:l.x,y:l.y,width:s-o,height:a-i,rotation:Cn.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),x2.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")}_createAnchor(e){var n=new DR({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:gSt?10:"auto"}),r=this;n.on("mousedown touchstart",function(o){r._handleMouseDown(o)}),n.on("dragstart",o=>{n.stopDrag(),o.cancelBubble=!0}),n.on("dragend",o=>{o.cancelBubble=!0}),n.on("mouseenter",()=>{var o=Cn.getAngle(this.rotation()),i=mSt(e,o);n.getStage().content&&(n.getStage().content.style.cursor=i),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var e=new Rt({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),o=r.padding();n.beginPath(),n.rect(-o,-o,this.width()+o*2,this.height()+o*2),n.moveTo(this.width()/2,-o),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*Je._sign(this.height())-o),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var o=this.padding();n.beginPath(),n.rect(-o,-o,r.width()+o*2,r.height()+o*2),n.fillStrokeShape(r)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",n=>{n.cancelBubble=!0}),e.on("dragmove",n=>{n.cancelBubble=!0}),e.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,o=n.height,i=Math.sqrt(Math.pow(r,2)+Math.pow(o,2));this.sin=Math.abs(o/i),this.cos=Math.abs(r/i),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var s=e.target.getAbsolutePosition(),a=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-s.x,y:a.y-s.y},this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:e.evt,target:l})})}_handleMouseMove(e){var n,r,o,i=this.findOne("."+this._movingAnchorName),s=i.getStage();s.setPointersPositions(e);const a=s.getPointerPosition();let l={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y};const c=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(c,l,e)),i.setAbsolutePosition(l);const u=i.getAbsolutePosition();if(!(c.x===u.x&&c.y===u.y)){if(this._movingAnchorName==="rotater"){var d=this._getNodeRect();n=i.x()-d.width/2,r=-i.y()+d.height/2;let L=Math.atan2(-r,n)+Math.PI/2;d.height<0&&(L-=Math.PI);var h=Cn.getAngle(this.rotation());const F=h+L,$=Cn.getAngle(this.rotationSnapTolerance()),k=bSt(this.rotationSnaps(),F,$)-d.rotation,U=vSt(d,k);this._fitNodesInto(U,e);return}var f=this.keepRatio()||e.shiftKey,b=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(f){var p=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};o=Math.sqrt(Math.pow(p.x-i.x(),2)+Math.pow(p.y-i.y(),2));var m=this.findOne(".top-left").x()>p.x?-1:1,y=this.findOne(".top-left").y()>p.y?-1:1;n=o*this.cos*m,r=o*this.sin*y,this.findOne(".top-left").x(p.x-n),this.findOne(".top-left").y(p.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(i.y());else if(this._movingAnchorName==="top-right"){if(f){var p=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};o=Math.sqrt(Math.pow(i.x()-p.x,2)+Math.pow(p.y-i.y(),2));var m=this.findOne(".top-right").x()<p.x?-1:1,y=this.findOne(".top-right").y()>p.y?-1:1;n=o*this.cos*m,r=o*this.sin*y,this.findOne(".top-right").x(p.x+n),this.findOne(".top-right").y(p.y-r)}var v=i.position();this.findOne(".top-left").y(v.y),this.findOne(".bottom-right").x(v.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(i.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(i.x());else if(this._movingAnchorName==="bottom-left"){if(f){var p=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};o=Math.sqrt(Math.pow(p.x-i.x(),2)+Math.pow(i.y()-p.y,2));var m=p.x<i.x()?-1:1,y=i.y()<p.y?-1:1;n=o*this.cos*m,r=o*this.sin*y,i.x(p.x-n),i.y(p.y+r)}v=i.position(),this.findOne(".top-left").x(v.x),this.findOne(".bottom-right").y(v.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(i.y());else if(this._movingAnchorName==="bottom-right"){if(f){var p=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};o=Math.sqrt(Math.pow(i.x()-p.x,2)+Math.pow(i.y()-p.y,2));var m=this.findOne(".bottom-right").x()<p.x?-1:1,y=this.findOne(".bottom-right").y()<p.y?-1:1;n=o*this.cos*m,r=o*this.sin*y,this.findOne(".bottom-right").x(p.x+n),this.findOne(".bottom-right").y(p.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var b=this.centeredScaling()||e.altKey;if(b){var S=this.findOne(".top-left"),w=this.findOne(".bottom-right"),A=S.x(),_=S.y(),P=this.getWidth()-w.x(),R=this.getHeight()-w.y();w.move({x:-A,y:-_}),S.move({x:P,y:R})}var O=this.findOne(".top-left").getAbsolutePosition();n=O.x,r=O.y;var N=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),M=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:N,height:M,rotation:Cn.getAngle(this.rotation())},e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var n=this.getNode();this._fire("transformend",{evt:e,target:n}
420),n&&this._nodes.forEach(r=>{r._fire("transformend",{evt:e,target:r})}),this._movingAnchorName=null}}_fitNodesInto(e,n){var r=this._getNodeRect();const o=1;if(Je._inRange(e.width,-this.padding()*2-o,o)){this.update();return}if(Je._inRange(e.height,-this.padding()*2-o,o)){this.update();return}const i=this.flipEnabled();var s=new Ku;if(s.rotate(Cn.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const d=s.point({x:-this.padding()*2,y:0});if(e.x+=d.x,e.y+=d.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,!i){this.update();return}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const d=s.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,e.width+=this.padding()*2,!i){this.update();return}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const d=s.point({x:0,y:-this.padding()*2});if(e.x+=d.x,e.y+=d.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,e.height+=this.padding()*2,!i){this.update();return}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const d=s.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,e.height+=this.padding()*2,!i){this.update();return}}if(this.boundBoxFunc()){const d=this.boundBoxFunc()(r,e);d?e=d:Je.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const a=1e7,l=new Ku;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/a,r.height/a);const c=new Ku;c.translate(e.x,e.y),c.rotate(e.rotation),c.scale(e.width/a,e.height/a);const u=c.multiply(l.invert());this._nodes.forEach(d=>{var h;const f=d.getParent().getAbsoluteTransform(),p=d.getTransform().copy();p.translate(d.offsetX(),d.offsetY());const m=new Ku;m.multiply(f.copy().invert()).multiply(u).multiply(f).multiply(p);const y=m.decompose();d.setAttrs(y),this._fire("transform",{evt:n,target:d}),d._fire("transform",{evt:n,target:d}),(h=d.getLayer())===null||h===void 0||h.batchDraw()}),this.rotation(Je._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,n){this.findOne(e).setAttrs(n)}update(){var e,n=this._getNodeRect();this.rotation(Je._getRotation(n.rotation));var r=n.width,o=n.height,i=this.enabledAnchors(),s=this.resizeEnabled(),a=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(c=>{c.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+a,offsetY:l/2+a,visible:s&&i.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+a,visible:s&&i.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-a,offsetY:l/2+a,visible:s&&i.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:o/2,offsetX:l/2+a,visible:s&&i.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:o/2,offsetX:l/2-a,visible:s&&i.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:o,offsetX:l/2+a,offsetY:l/2-a,visible:s&&i.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:o,offsetY:l/2-a,visible:s&&i.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:o,offsetX:l/2-a,offsetY:l/2-a,visible:s&&i.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*Je._sign(o)-a,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:o,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);
420e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),fx.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Vt.prototype.toObject.call(this)}clone(e){var n=Vt.prototype.clone.call(this,e);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function CSt(t){return t instanceof Array||Je.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){x2.indexOf(e)===-1&&Je.warn("Unknown anchor name: "+e+". Available names are: "+x2.join(", "))}),t||[]}_o.prototype.className="Transformer";ns(_o);Le.addGetterSetter(_o,"enabledAnchors",x2,CSt);Le.addGetterSetter(_o,"flipEnabled",!0,Pf());Le.addGetterSetter(_o,"resizeEnabled",!0);Le.addGetterSetter(_o,"anchorSize",10,zt());Le.addGetterSetter(_o,"rotateEnabled",!0);Le.addGetterSetter(_o,"rotationSnaps",[]);Le.addGetterSetter(_o,"rotateAnchorOffset",50,zt());Le.addGetterSetter(_o,"rotationSnapTolerance",5,zt());Le.addGetterSetter(_o,"borderEnabled",!0);Le.addGetterSetter(_o,"anchorStroke","rgb(0, 161, 255)");Le.addGetterSetter(_o,"anchorStrokeWidth",1,zt());Le.addGetterSetter(_o,"anchorFill","white");Le.addGetterSetter(_o,"anchorCornerRadius",0,zt());Le.addGetterSetter(_o,"borderStroke","rgb(0, 161, 255)");Le.addGetterSetter(_o,"borderStrokeWidth",1,zt());Le.addGetterSetter(_o,"borderDash");Le.addGetterSetter(_o,"keepRatio",!0);Le.addGetterSetter(_o,"centeredScaling",!1);Le.addGetterSetter(_o,"ignoreStroke",!1);Le.addGetterSetter(_o,"padding",0,zt());Le.addGetterSetter(_o,"node");Le.addGetterSetter(_o,"nodes");Le.addGetterSetter(_o,"boundBoxFunc");Le.addGetterSetter(_o,"anchorDragBoundFunc");Le.addGetterSetter(_o,"shouldOverdrawWholeArea",!1);Le.addGetterSetter(_o,"useSingleNodeRotation",!0);Le.backCompat(_o,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledH
420andlers:"enabledAnchors"});class Fm extends Rt{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,Cn.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}Fm.prototype.className="Wedge";Fm.prototype._centroid=!0;Fm.prototype._attrsAffectingSize=["radius"];ns(Fm);Le.addGetterSetter(Fm,"radius",0,zt());Le.addGetterSetter(Fm,"angle",0,zt());Le.addGetterSetter(Fm,"clockwise",!1);Le.backCompat(Fm,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function mee(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var SSt=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,39
4206,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],ESt=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function xSt(t,e){var n=t.data,r=t.width,o=t.height,i,s,a,l,c,u,d,h,f,p,m,y,v,b,S,w,A,_,P,R,O,N,M,L,F=e+e+1,$=r-1,D=o-1,k=e+1,U=k*(k+1)/2,H=new mee,V=null,q=H,J=null,Q=null,se=SSt[e],oe=ESt[e];for(a=1;a<F;a++)q=q.next=new mee,a===k&&(V=q);for(q.next=H,d=u=0,s=0;s<o;s++){for(w=A=_=P=h=f=p=m=0,y=k*(R=n[u]),v=k*(O=n[u+1]),b=k*(N=n[u+2]),S=k*(M=n[u+3]),h+=U*R,f+=U*O,p+=U*N,m+=U*M,q=H,a=0;a<k;a++)q.r=R,q.g=O,q.b=N,q.a=M,q=q.next;for(a=1;a<k;a++)l=u+(($<a?$:a)<<2),h+=(q.r=R=n[l])*(L=k-a),f+=(q.g=O=n[l+1])*L,p+=(q.b=N=n[l+2])*L,m+=(q.a=M=n[l+3])*L,w+=R,A+=O,_+=N,P+=M,q=q.next;for(J=H,Q=V,i=0;i<r;i++)n[u+3]=M=m*se>>oe,M!==0?(M=255/M,n[u]=(h*se>>oe)*M,n[u+1]=(f*se>>oe)*M,n[u+2]=(p*se>>oe)*M):n[u]=n[u+1]=n[u+2]=0,h-=y,f-=v,p-=b,m-=S,y-=J.r,v-=J.g,b-=J.b,S-=J.a,l=d+((l=i+e+1)<$?l:$)<<2,w+=J.r=n[l],A+=J.g=n[l+1],_+=J.b=n[l+2],P+=J.a=n[l+3],h+=w,f+=A,p+=_,m+=P,J=J.next,y+=R=Q.r,v+=O=Q.g,b+=N=Q.b,S+=M=Q.a,w-=R,A-=O,_-=N,P-=M,Q=Q.next,u+=4;d+=r}for(i=0;i<r;i++){for(A=_=P=w=f=p=m=h=0,u=i<<2,y=k*(R=n[u]),v=k*(O=n[u+1]),b=k*(N=n[u+2]),S=k*(M=n[u+3]),h+=U*R,f+=U*O,p+=U*N,m+=U*M,q=H,a=0;a<k;a++)q.r=R,q.g=O,q.b=N,q.a=M,q=q.next;for(c=r,a=1;a<=e;a++)u=c+i<<2,h+=(q.r=R=n[u])*(L=k-a),f+=(q.g=O=n[u+1])*L,p+=(q.b=N=n[u+2])*L,m+=(q.a=M=n[u+3])*L,w+=R,A+=O,_+=N,P+=M,q=q.next,a<D&&(c+=r);for(u=i,J=H,Q=V,s=0;s<o;s++)l=u<<2,n[l+3]=M=m*se>>oe,M>0?(M=255/M,n[l]=(h*se>>oe)*M,n[l+1]=(f*se>>oe)*M,n[l+2]=(p*se>>oe)*M):n[l]=n[l+1]=n[l+2]=0,h-=y,f-=v,p-=b,m-=S,y-=J.r,v-=J.g,b-=J.b,S-=J.a,l=i+((l=s+k)<D?l:D)*r<<2,h+=w+=J.r=n[l],f+=A+=J.g=n[l+1],p+=_+=J.b=n[l+2],m+=P+=J.a=n[l+3],J=J.next,y+=R=Q.r,v+=O=Q.g,b+=N=Q.b,S+=M=Q.a,w-=R,A-=O,_-=N,P-=M,Q=Q.next,u+=r}}const wSt=function(e){var n=Math.round(this.blurRadius());n>0&&xSt(e,n)};Le.addGetterSetter(Vt,"blurRadius",0,zt(),Le.afterSetFilter);const ASt=function(t){var e=this.brightness()*255,n=t.data,r=n.length,o;for(o=0;o<r;o+=4)n[o]+=e,n[o+1]+=e,n[o+2]+=e};Le.addGetterSetter(Vt,"brightness",0,zt(),Le.afterSetFilter);const TSt=function(t){var e=Math.pow((this.contrast()+100)/100,2),n=t.data,r=n.length,o=150,i=150,s=150,a;for(a=0;a<r;a+=4)o=n[a],i=n[a+1],s=n[a+2],o/=255,o-=.5,o*=e,o+=.5,o*=255,i/=255,i-=.5,i*=e,i+=.5,i*=255,s/=255,s-=.5,s*=e,s+=.5,s*=255,o=o<0?0:o>255?255:o,i=i<0?0:i>255?255:i,s=s<0?0:s>255?255:s,n[a]=o,n[a+1]=i,n[a+2]=s};Le.addGetterSetter(Vt,"contrast",0,zt(),Le.afterSetFilter);const _St=function(t){var e=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),o=this.embossBlend(),i=0,s=0,a=t.data,l=t.width,c=t.height,u=l*4,d=c;switch(r){case"top-left":i=-1,s=-1;break;case"top":i=-1,s=0;break;case"top-right":i=-1,s=1;break;case"right":i=0,s=1;break;case"bottom-right":i=1,s=1;break;case"bottom":i=1,s=0;break;case"bottom-left":i=1,s=-1;break;case"left":i=0,s=-1;break;default:Je.error("Unknown emboss direction: "+r)}do{var h=(d-1)*u,f=i;d+f<1&&(f=0),d+f>c&&(f=0);var p=(d-1+f)*l*4,m=l;do{var y=h+(m-1)*4,v=s;m+v<1&&(v=0),m+v>l&&(v=0);var b=p+(m-1+v)*4,S=a[y]-a[b],w=a[y+1]-a[b+1],A=a[y+2]-a[b+2],_=S,P=_>0?_:-_,R=w>0?w:-w,O=A>0?A:-A;if(R>P&&(_=w),O>P&&(_=A),_*=e,o){var N=a[y]+_,M=a[y+1]+_,L=a[y+2]+_;a[y]=N>255?255:N<0?0:N,a[y+1]=M>255?255:M<0?0:M,a[y+2]=L>255?255:L<0?0:L}else{var F=n-_;F<0?F=0:F>255&&(F=255),a[y]=a[y+1]=a[y+2]=F}}while(--m)}while(--d)};Le.addGetterSetter(Vt,"embossStrength",.5,zt(),Le.afterSetFilter);Le.addGetterSetter(Vt,"embossWhiteLevel",.5,zt(),Le.afterSetFilter);Le.addGetterSetter(Vt,"embossDirection","top-left",null,Le.afterSetFilter);Le.addGetterSetter(Vt,"embossBlend",!1,null,Le.afterSetFilter);function K5(t,e,n,r,o){var i=n-e,s=o-r,a;return i===0?r+s/2:s===0?r:(a=(t-e)/i,a=s*a+r,a)}const ISt=function(t){var e=t.data,n=e.length,r=e[0],o=r,i,s=e[1],a=s,l,c=e[2],u=c,d,h,f=this.enhance();if(f!==0){for(h=0;h<n;h+=4)i=e[h+0],i<r?r=i:i>o&&(o=i),l=e[h+1],l<s?s=l:l>a&&(a=l),d=e[h+2],d<c?c=d:d>u&&(u=d);o===r&&(o=255,r=0),a===s&&(a=255,s=0),u===c&&(u=255,c=0);var p,m,y,v,b,S,w,A,_;for(f>0?(m=o+f*(255-o),y=r-f*(r-0),b=a+f*(255-a),S=s-f*(s-0),A=u+f*(255-u),_=c-f*(c-0)):(p=(o+r)*.5,m=o+f*(o-p),y=r+f*(r-p),v=(a+s)*.5,b=a+f*(a-v),S=s+f*(s-v),w=(u+c)*.5,A=u+f*(u-w),_=c+f*(c-w)),h=0;h<n;h+=4)e[h+0]=K5(e[h+0],r,o,y,m),e[h+1]=K5(e[h+1],s,a,S,b),e[h+2]=K5(e[h+2],c,u,_,A)}};Le.addGetterSetter(Vt,"enhance",0,zt(),Le.afterSetFilter);const PSt=function(t){var e=t.data,n=e.length,r,o;for(r=0;r<n;r+=4)o=.34*e[r]+.5*e[r+1]+.16*e[r+2],e[r]=o,e[r+1]=o,e[r+2]=o};Le.addGetterSetter(Vt,"hue",0,zt(),Le.afterSetFilter);Le.addGetterSetter(Vt,"saturation",0,zt(),Le.afterSetFilter);Le.addGetterSetter(Vt,"luminance",0,zt(),Le.afterSetFilter);const RSt=function(t){var e=t.data,n=e.length,r=1,o=Math.pow(2,this.saturation()),i=Math.abs(this.hue()+360)%360,s=this.luminance()*127,a,l=r*o
420*Math.cos(i*Math.PI/180),c=r*o*Math.sin(i*Math.PI/180),u=.299*r+.701*l+.167*c,d=.587*r-.587*l+.33*c,h=.114*r-.114*l-.497*c,f=.299*r-.299*l-.328*c,p=.587*r+.413*l+.035*c,m=.114*r-.114*l+.293*c,y=.299*r-.3*l+1.25*c,v=.587*r-.586*l-1.05*c,b=.114*r+.886*l-.2*c,S,w,A,_;for(a=0;a<n;a+=4)S=e[a+0],w=e[a+1],A=e[a+2],_=e[a+3],e[a+0]=u*S+d*w+h*A+s,e[a+1]=f*S+p*w+m*A+s,e[a+2]=y*S+v*w+b*A+s,e[a+3]=_},OSt=function(t){var e=t.data,n=e.length,r=Math.pow(2,this.value()),o=Math.pow(2,this.saturation()),i=Math.abs(this.hue()+360)%360,s,a=r*o*Math.cos(i*Math.PI/180),l=r*o*Math.sin(i*Math.PI/180),c=.299*r+.701*a+.167*l,u=.587*r-.587*a+.33*l,d=.114*r-.114*a-.497*l,h=.299*r-.299*a-.328*l,f=.587*r+.413*a+.035*l,p=.114*r-.114*a+.293*l,m=.299*r-.3*a+1.25*l,y=.587*r-.586*a-1.05*l,v=.114*r+.886*a-.2*l,b,S,w,A;for(s=0;s<n;s+=4)b=e[s+0],S=e[s+1],w=e[s+2],A=e[s+3],e[s+0]=c*b+u*S+d*w,e[s+1]=h*b+f*S+p*w,e[s+2]=m*b+y*S+v*w,e[s+3]=A};Le.addGetterSetter(Vt,"hue",0,zt(),Le.afterSetFilter);Le.addGetterSetter(Vt,"saturation",0,zt(),Le.afterSetFilter);Le.addGetterSetter(Vt,"value",0,zt(),Le.afterSetFilter);const NSt=function(t){var e=t.data,n=e.length,r;for(r=0;r<n;r+=4)e[r]=255-e[r],e[r+1]=255-e[r+1],e[r+2]=255-e[r+2]};var MSt=function(t,e,n){var r=t.data,o=e.data,i=t.width,s=t.height,a=n.polarCenterX||i/2,l=n.polarCenterY||s/2,c,u,d,h=0,f=0,p=0,m=0,y,v=Math.sqrt(a*a+l*l);u=i-a,d=s-l,y=Math.sqrt(u*u+d*d),v=y>v?y:v;var b=s,S=i,w,A,_=360/S*Math.PI/180,P,R;for(A=0;A<S;A+=1)for(P=Math.sin(A*_),R=Math.cos(A*_),w=0;w<b;w+=1)u=Math.floor(a+v*w/b*R),d=Math.floor(l+v*w/b*P),c=(d*i+u)*4,h=r[c+0],f=r[c+1],p=r[c+2],m=r[c+3],c=(A+w*i)*4,o[c+0]=h,o[c+1]=f,o[c+2]=p,o[c+3]=m},DSt=function(t,e,n){var r=t.data,o=e.data,i=t.width,s=t.height,a=n.polarCenterX||i/2,l=n.polarCenterY||s/2,c,u,d,h,f,p=0,m=0,y=0,v=0,b,S=Math.sqrt(a*a+l*l);u=i-a,d=s-l,b=Math.sqrt(u*u+d*d),S=b>S?b:S;var w=s,A=i,_,P,R=n.polarRotation||0,O,N;for(u=0;u<i;u+=1)for(d=0;d<s;d+=1)h=u-a,f=d-l,_=Math.sqrt(h*h+f*f)*w/S,P=(Math.atan2(f,h)*180/Math.PI+360+R)%360,P=P*A/360,O=Math.floor(P),N=Math.floor(_),c=(N*i+O)*4,p=r[c+0],m=r[c+1],y=r[c+2],v=r[c+3],c=(d*i+u)*4,o[c+0]=p,o[c+1]=m,o[c+2]=y,o[c+3]=v};const LSt=function(t){var e=t.width,n=t.height,r,o,i,s,a,l,c,u,d,h,f=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),m=Math.floor(e*(p%360)/360);if(!(f<1)){var y=Je.createCanvasElement();y.width=e,y.height=n;var v=y.getContext("2d").getImageData(0,0,e,n);Je.releaseCanvas(y),MSt(t,v,{polarCenterX:e/2,polarCenterY:n/2});for(var b=e/Math.pow(2,f);b<=8;)b=b*2,f-=1;
420b=Math.ceil(b);var S=b,w=0,A=S,_=1;for(m+b>e&&(w=S,A=0,_=-1),o=0;o<n;o+=1)for(r=w;r!==A;r+=_)i=Math.round(r+m)%e,d=(e*o+i)*4,a=v.data[d+0],l=v.data[d+1],c=v.data[d+2],u=v.data[d+3],h=(e*o+r)*4,v.data[h+0]=a,v.data[h+1]=l,v.data[h+2]=c,v.data[h+3]=u;for(o=0;o<n;o+=1)for(S=Math.floor(b),s=0;s<f;s+=1){for(r=0;r<S+1;r+=1)d=(e*o+r)*4,a=v.data[d+0],l=v.data[d+1],c=v.data[d+2],u=v.data[d+3],h=(e*o+S*2-r-1)*4,v.data[h+0]=a,v.data[h+1]=l,v.data[h+2]=c,v.data[h+3]=u;S*=2}DSt(v,t,{polarRotation:0})}};Le.addGetterSetter(Vt,"kaleidoscopePower",2,zt(),Le.afterSetFilter);Le.addGetterSetter(Vt,"kaleidoscopeAngle",0,zt(),Le.afterSetFilter);function iM(t,e,n){var r=(n*t.width+e)*4,o=[];return o.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),o}function xT(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function kSt(t){for(var e=[0,0,0],n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function FSt(t,e){var n=iM(t,0,0),r=iM(t,t.width-1,0),o=iM(t,0,t.height-1),i=iM(t,t.width-1,t.height-1),s=e||10;if(xT(n,r)<s&&xT(r,i)<s&&xT(i,o)<s&&xT(o,n)<s){for(var a=kSt([r,n,i,o]),l=[],c=0;c<t.width*t.height;c++){var u=xT(a,[t.data[c*4],t.data[c*4+1],t.data[c*4+2]]);l[c]=u<s?0:255}return l}}function BSt(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function $St(t,e,n){for(var r=[1,1,1,1,0,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),s=[],a=0;a<n;a++)for(var l=0;l<e;l++){for(var c=a*e+l,u=0,d=0;d<o;d++)for(var h=0;h<o;h++){var f=a+d-i,p=l+h-i;if(f>=0&&f<n&&p>=0&&p<e){var m=f*e+p,y=r[d*o+h];u+=t[m]*y}}s[c]=u===255*8?255:0}return s}function HSt(t,e,n){for(var r=[1,1,1,1,1,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),s=[],a=0;a<n;a++)for(var l=0;l<e;l++){for(var c=a*e+l,u=0,d=0;d<o;d++)for(var h=0;h<o;h++){var f=a+d-i,p=l+h-i;if(f>=0&&f<n&&p>=0&&p<e){var m=f*e+p,y=r[d*o+h];u+=t[m]*y}}s[c]=u>=255*4?255:0}return s}function USt(t,e,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),s=[],a=0;a<n;a++)for(var l=0;l<e;l++){for(var c=a*e+l,u=0,d=0;d<o;d++)for(var h=0;h<o;h++){var f=a+d-i,p=l+h-i;if(f>=0&&f<n&&p>=0&&p<e){var m=f*e+p,y=r[d*o+h];u+=t[m]*y}}s[c]=u}return s}const zSt=function(t){var e=this.threshold(),n=FSt(t,e);return n&&(n=$St(n,t.width,t.height),n=HSt(n,t.width,t.height),n=USt(n,t.width,t.height),BSt(t,n)),t};Le.addGetterSetter(Vt,"threshold",0,zt(),Le.afterSetFilter);const VSt=function(t){var e=this.noise()*255,n=t.data,r=n.length,o=e/2,i;for(i=0;i<r;i+=4)n[i+0]+=o-2*o*Math.random(),n[i+1]+=o-2*o*Math.random(),n[i+2]+=o-2*o*Math.random()};Le.addGetterSetter(Vt,"noise",.2,zt(),Le.afterSetFilter);const GSt=function(t){var e=Math.ceil(this.pixelSize()),n=t.width,r=t.height,o,i,s,a,l,c,u,d=Math.ceil(n/e),h=Math.ceil(r/e),f,p,m,y,v,b,S,w=t.data;if(e<=0){Je.error("pixelSize value can not be <= 0");return}for(v=0;v<d;v+=1)for(b=0;b<h;b+=1){for(a=0,l=0,c=0,u=0,f=v*e,p=f+e,m=b*e,y=m+e,S=0,o=f;o<p;o+=1)if(!(o>=n))for(i=m;i<y;i+=1)i>=r||(s=(n*i+o)*4,a+=w[s+0],l+=w[s+1],c+=w[s+2],u+=w[s+3],S+=1);for(a=a/S,l=l/S,c=c/S,u=u/S,o=f;o<p;o+=1)if(!(o>=n))for(i=m;i<y;i+=1)i>=r||(s=(n*i+o)*4,w[s+0]=a,w[s+1]=l,w[s+2]=c,w[s+3]=u)}};Le.addGetterSetter(Vt,"pixelSize",8,zt(),Le.afterSetFilter);const WSt=function(t){var e=Math.round(this.levels()*254)+1,n=t.data,r=n.length,o=255/e,i;for(i=0;i<r;i+=1)n[i]=Math.floor(n[i]/o)*o};Le.addGetterSetter(Vt,"levels",.5,zt(),Le.afterSetFilter);const jSt=function(t){var e=t.data,n=e.length,r=this.red(),o=this.green(),i=this.blue(),s,a;for(s=0;s<n;s+=4)a=(.34*e[s]+.5*e[s+1]+.16*e[s+2])/255,e[s]=a*r,e[s+1]=a*o,e[s+2]=a*i,e[s+3]=e[s+3]};Le.addGetterSetter(Vt,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});Le.addGetterSetter(Vt,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});Le.addGetterSetter(Vt,"blue",0,cge,Le.afterSetFilter);const qSt=function(t){var e=t.data,n=e.length,r=this.red(),o=this.green(),i=this.blue(),s=this.alpha(),a,l;for(a=0;a<n;
vendor: 30,462 bytes, lines 420-432
420a+=4)l=1-s,e[a]=r*s+e[a]*l,e[a+1]=o*s+e[a+1]*l,e[a+2]=i*s+e[a+2]*l};Le.addGetterSetter(Vt,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});Le.addGetterSetter(Vt,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});Le.addGetterSetter(Vt,"blue",0,cge,Le.afterSetFilter);Le.addGetterSetter(Vt,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});const YSt=function(t){var e=t.data,n=e.length,r,o,i,s;for(r=0;r<n;r+=4)o=e[r+0],i=e[r+1],s=e[r+2],e[r+0]=Math.min(255,o*.393+i*.769+s*.189),e[r+1]=Math.min(255,o*.349+i*.686+s*.168),e[r+2]=Math.min(255,o*.272+i*.534+s*.131)},XSt=function(t){var e=t.data,n=t.width,r=t.height,o=n*4,i=r;do{var s=(i-1)*o,a=n;do{var l=s+(a-1)*4,c=e[l],u=e[l+1],d=e[l+2];c>127&&(c=255-c),u>127&&(u=255-u),d>127&&(d=255-d),e[l]=c,e[l+1]=u,e[l+2]=d}while(--a)}while(--i)},KSt=function(t){var e=this.threshold()*255,n=t.data,r=n.length,o;for(o=0;o<r;o+=1)n[o]=n[o]<e?0:255};Le.addGetterSetter(Vt,"threshold",.5,zt(),Le.afterSetFilter);BC.Util._assign(BC,{Arc:Lm,Arrow:lS,Circle:Iw,Ellipse:T0,Image:ng,Label:U6,Tag:cS,Line:km,Path:ml,Rect:DR,RegularPolygon:uS,Ring:dS,Sprite:rg,Star:_0,Text:ts,TextPath:Pa,Transformer:_o,Wedge:Fm,Filters:{Blur:wSt,Brighten:ASt,Contrast:TSt,Emboss:_St,Enhance:ISt,Grayscale:PSt,HSL:RSt,HSV:OSt,Invert:NSt,Kaleidoscope:LSt,Mask:zSt,Noise:VSt,Pixelate:GSt,Posterize:WSt,RGB:jSt,RGBA:qSt,Sepia:YSt,Solarize:XSt,Threshold:KSt}});var Uge={exports:{}};/** 421 * @license React 422 * react-reconciler.production.min.js 423 * 424 * Copyright (c) Facebook, Inc. and its affiliates. 425 * 426 * This source code is licensed under the MIT license found in the 427 * LICENSE file in the root directory of this source tree. 428 */var QSt=function(e){var n={},r=C,o=h_,i=Object.assign;function s(x){for(var T="https://reactjs.org/docs/error-decoder.html?invariant="+x,B=1;B<arguments.length;B++)T+="&args[]="+encodeURIComponent(arguments[B]);return"Minified React error #"+x+"; visit "+T+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),A=Symbol.iterator;function _(x){return x===null||typeof x!="object"?null:(x=A&&x[A]||x["@@iterator"],typeof x=="function"?x:null)}function P(x){if(x==null)return null;if(typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case u:return"Fragment";case c:return"Portal";case h:return"Profiler";case d:return"StrictMode";case y:return"Suspense";case v:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case p:return(x.displayName||"Context")+".Consumer";case f:return(x._context.displayName||"Context")+".Provider";case m:var T=x.render;return x=x.displayName,x||(x=T.displayName||T.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case b:return T=x.displayName||null,T!==null?T:P(x.type)||"Memo";case S:T=x._payload,x=x._init;try{return P(x(T))}catch{}}return null}function R(x){var T=x.type;switch(x.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 x=T.render,x=x.displayName||x.name||"",T.displayName||(x!==""?"ForwardRef("+x+")":"ForwardRef");case 7:return"Fragment";case 5:return T;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(T);case 8:return T===d?"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(typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T}return null}function O(x){var T=x,B=x;if(x.alternate)for(;T.return;)T=T.return;else{x=T;do T=x,T.flags&4098&&(B=T.return),x=T.return;while(x)}return T.tag===3?B:null}function N(x){if(O(x)!==x)throw Error(s(188))}function M(x){var T=x.alternate;if(!T){if(T=O(x),T===null)throw Error(s(188));return T!==x?null:x}for(var B=x,G=T;;){var Y=B.return;if(Y===null)break;var te=Y.alternate;if(te===null){if(G=Y.return,G!==null){B=G;continue}break}if(Y.child===te.child){for(te=Y.child;te;){if(te===B)return N(Y),x;if(te===G)return N(Y),T;te=te.sibling}throw Error(s(188))}if(B.return!==G.return)B=Y,G=te;else{for(var Te=!1,qe=Y.child;qe;){if(qe===B){Te=!0,B=Y,G=te;break}if(qe===G){Te=!0,G=Y,B=te;break}qe=qe.sibling}if(!Te){for(qe=te.child;qe;){if(qe===B){Te=!0,B=te,G=Y;break}if(qe===G){Te=!0,G=te,B=Y;break}qe=qe.sibling}if(!Te)throw Error(s(189))}}if(B.alternate!==G)throw Error(s(190))}if(B.tag!==3)throw Error(s(188));return B.stateNode.current===B?x:T}function L(x){return x=M(x),x!==null?F(x):null}function F(x){if(x.tag===5||x.tag===6)return x;for(x=x.child;x!==null;){var T=F(x);if(T!==null)return T;x=x.sibling}return null}function $(x){if(x.tag===5||x.tag===6)return x;for(x=x.child;x!==null;){if(x.tag!==4){var T=$(x);if(T!==null)return T}x=x.sibling}return null}var D=Array.isArray,k=e.getPublicInstance,U=e.getRootHostContext,H=e.getChildHostContext,V=e.prepareForCommit,q=e.resetAfterCommit,J=e.createInstance,Q=e.appendInitialChild,se=e.finalizeInitialChildren,oe=e.prepareUpdate,ie=e.shouldSetTextContent,ee=e.createTextInstance,re=e.scheduleTimeout,fe=e.cancelTimeout,we=e.noTimeout,xe=e.isPrimaryRenderer,ve=e.supportsMutation,Re=e.supportsPersistence,pe=e.supportsHydration,Be=e.getInstanceFromNode,ke=e.preparePortalMount,Ne=e.getCurrentEventPriority,ot=e.detachDeletedInstance,ce=e.supportsMicrotasks,Ae=e.scheduleMicrotask,be=e.supportsTestSelectors,Se=e.findFiberRoot,Pe=e.getBoundingRect,Ue=e.getTextContent,_e=e.isHiddenSubtree,Oe=e.matchAccessibilityRole,ze=e.setFocusIfFocusable,ne=e.setupIntersectionObserver,W=e.appendChild,j=e.appendChildToContainer,ue=e.commitTextUpdate,he=e.commitMount,Ce=e.commitUpdate,Ie=e.insertBefore,et=e.insertInContainerBefore,je=e.removeChild,it=e.removeChildFromContainer,xt=e.resetTextContent,rt=e.hideInstance,Bt=e.hideTextInstance,dn=e.unhideInstance,kn=e.unhideTextInstance,jn=e.clearContainer,Cr=e.cloneInstance,Xn=e.createContainerChildSet,Wo=e.appendChildToContainerChildSet,jo=e.finalizeContainerChildren,ri=e.replaceContainerChildren,Pu=e.cloneHiddenInstance,ta=e.cloneHiddenTextInstance,oi=e.canHydrateInstance,Qr=e.canHydrateTextInstance,ft=e.canHydrateSuspenseInstance,Ot=e.isSuspenseInstancePending,Wt=e.isSuspenseInstanceFallback,sn=e.getSuspenseInstanceFallbackErrorDetails,Jt=e.registerSuspenseInstanceRetry,wn=e.getNextHydratableSibling,Sr=e.getFirstHydratableChild,ii=e.getFirstHydratableChildWithinContainer,ol=e.getFirstHydratableChildWithinSuspenseInstance,yt=e.hydrateInstance,pt=e.hydrateTextInstance,Xt=e.hydrateSuspenseInstance,$t=e.getNextHydratableInstanceAfterSuspenseInstance,Pn=e.commitHydratedContainer,an=e.commitHydratedSuspenseInstance,tr=e.clearSuspenseBoundary,Ra=e.clearSuspenseBoundaryFromContainer,Oa=e.shouldDeleteUnhydratedTailInstances,Vw=e.didNotMatchHydratedContainerTextInstance,zm=e.didNotMatchHydratedTextInstance,L0;function ig(x){if(L0===void 0)try{throw Error()}catch(B){var T=B.stack.trim().match(/\n( *(at )?)/);L0=T&&T[1]||""}return` 429`+L0+x}var k0=!1;function Vm(x,T){if(!x||k0)return"";k0=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(T)if(T=function(){throw Error()},Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(Pt){var G=Pt}Reflect.construct(x,[],T)}else{try{T.call()}catch(Pt){G=Pt}x.call(T.prototype)}else{try{throw Error()}catch(Pt){G=Pt}x()}}catch(Pt){if(Pt&&G&&typeof Pt.stack=="string"){for(var Y=Pt.stack.split(` 430`),te=G.stack.split(` 431`),Te=Y.length-1,qe=te.length-1;1<=Te&&0<=qe&&Y[Te]!==te[qe];)qe--;for(;1<=Te&&0<=qe;Te--,qe--)if(Y[Te]!==te[qe]){if(Te!==1||qe!==1)do if(Te--,qe--,0>qe||Y[Te]!==te[qe]){var ut=` 432`+Y[Te].replace(" at new "," at ");return x.displayName&&ut.includes("<anonymous>")&&(ut=ut.replace("<anonymous>",x.displayName)),ut}while(1<=Te&&0<=qe);break}}}finally{k0=!1,Error.prepareStackTrace=B}return(x=x?x.displayName||x.name:"")?ig(x):""}var SS=Object.prototype.hasOwnProperty,Gm=[],bd=-1;function lc(x){return{current:x}}function Io(x){0>bd||(x.current=Gm[bd],Gm[bd]=null,bd--)}function xo(x,T){bd++,Gm[bd]=x.current,x.current=T}var Fc={},rs=lc(Fc),na=lc(!1),Ru=Fc;function Nf(x,T){var B=x.type.contextTypes;if(!B)return Fc;var G=x.stateNode;if(G&&G.__reactInternalMemoizedUnmaskedChildContext===T)return G.__reactInternalMemoizedMaskedChildContext;var Y={},te;for(te in B)Y[te]=T[te];return G&&(x=x.stateNode,x.__reactInternalMemoizedUnmaskedChildContext=T,x.__reactInternalMemoizedMaskedChildContext=Y),Y}function ra(x){return x=x.childContextTypes,x!=null}function Bc(){Io(na),Io(rs)}function Wm(x,T,B){if(rs.current!==Fc)throw Error(s(168));xo(rs,T),xo(na,B)}function ES(x,T,B){var G=x.stateNode;if(T=T.childContextTypes,typeof G.getChildContext!="function")return B;G=G.getChildContext();for(var Y in G)if(!(Y in T))throw Error(s(108,R(x)||"Unknown",Y));return i({},B,G)}function sg(x){return x=(x=x.stateNode)&&x.__reactInternalMemoizedMergedChildContext||Fc,Ru=rs.current,xo(rs,x),xo(na,na.current),!0}function F0(x,T,B){var G=x.stateNode;if(!G)throw Error(s(169));B?(x=ES(x,T,Ru),G.__reactInternalMemoizedMergedChildContext=x,Io(na),Io(rs),xo(rs,x)):Io(na),xo(na,B)}var il=Math.clz32?Math.clz32:cc,Gw=Math.log,xS=Math.LN2;function cc(x){return x>>>=0,x===0?32:31-(Gw(x)/xS|0)|0}var Mf=64,$c=4194304;function Ou(x){switch(x&-x){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 x&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return x&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return x}}function Cd(x,T){var B=x.pendingLanes;if(B===0)return 0;var G=0,Y=x.suspendedLanes,te=x.pingedLanes,Te=B&268435455;if(Te!==0){var qe=Te&~Y;qe!==0?G=Ou(qe):(te&=Te,te!==0&&(G=Ou(te)))}else Te=B&~Y,Te!==0?G=Ou(Te):te!==0&&(G=Ou(te));if(G===0)return 0;if(T!==0&&T!==G&&!(T&Y)&&(Y=G&-G,te=T&-T,Y>=te||Y===16&&(te&4194240)!==0))return T;if(G&4&&(G|=B&16),T=x.entangledLanes,T!==0)for(x=x.entanglements,T&=G;0<T;)B=31-il(T),Y=1<<B,G|=x[B],T&=~Y;return G}function Ww(x,T){switch(x){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;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qe(x,T){for(var B=x.suspendedLanes,G=x.pingedLanes,Y=x.expirationTimes,te=x.pendingLanes;0<te;){var Te=31-il(te),qe=1<<Te,ut=Y[Te];ut===-1?(!(qe&B)||qe&G)&&(Y[Te]=Ww(qe,T)):ut<=T&&(x.expiredLanes|=qe),te&=~qe}}function Ut(x){return x=x.pendingLanes&-1073741825,x!==0?x:x&1073741824?1073741824:0}function An(){var x=Mf;return Mf<<=1,!(Mf&4194240)&&(Mf=64),x}function pn(x){for(var T=[],B=0;31>B;B++)T.push(x);return T}function At(x,T,B){x.pendingLanes|=T,T!==536870912&&(x.suspendedLanes=0,x.pingedLanes=0),x=x.eventTimes,T=31-il(T),x[T]=B}function ir(x,T){var B=x.pendingLanes&~T;x.pendingLanes=T,x.suspendedLanes=0,x.pingedLanes=0,x.expiredLanes&=T,x.mutableReadLanes&=T,x.entangledLanes&=T,T=x.entanglements;var G=x.eventTimes;for(x=x.expirationTimes;0<B;){var Y=31-il(B),te=1<<Y;T[Y]=0,G[Y]=-1,x[Y]=-1,B&=~te}}function Po(x,T){var B=x.entangledLanes|=T;for(x=x.entanglements;B;){var G=31-il(B),Y=1<<G;Y&T|x[G]&T&&(x[G]|=T),B&=~Y}}var Bn=0;function bi(x){return x&=-x,1<x?4<x?x&268435455?16:536870912:4:1}var uc=o.unstable_scheduleCallback,Hc=o.unstable_cancelCallback,Nu=o.unstable_shouldYield,oa=o.unstable_requestPaint,si=o.unstable_now,Mu=o.unstable_ImmediatePriority,Mh=o.unstable_UserBlockingPriority,jm=o.unstable_NormalPriority,Dh=o.unstable_IdlePriority,uo=null,Br=null;function c$(x){if(Br&&typeof Br.onCommitFiberRoot=="function")try{Br.onCommitFiberRoot(uo,x,void 0,(x.current.flags&128)===128)}catch{}}function u$(x,T){return x===T&&(x!==0||1/x===1/T)||x!==x&&T!==T}var Du=typeof Object.is=="function"?Object.is:u$,Lh=null,wS=!1,jw=!1;function qw(x){Lh===null?Lh=[x]:Lh.push(x)}function d$(x){wS=!0,qw(x)}function Fo(){if(!jw&&Lh!==null){jw=!0;var x=0,T=Bn;try{var B=Lh;for(Bn=1;x<B.length;x++){var G=B[x];do G=G(!0);while(G!==null)}Lh=null,wS=!1}catch(Y){throw Lh!==null&&(Lh=Lh.slice(x+1)),uc(Mu,Fo),Y}finally{Bn=T,jw=!1}}return null}var Df=[],Uc=0,B0=null,qm=0,Ci=[],dc=0,Lf=null,Sd=1,Ed="";function kf(x,T){Df[Uc++]=qm,Df[Uc++]=B0,B0=x,qm=T}function Yw(x,T,B){Ci[dc++]=Sd,Ci[dc++]=Ed,Ci[dc++]=Lf,Lf=x;var G=Sd;x=Ed;var Y=32-il(G)-1;G&=~(1<<Y),B+=1;var te=32-il(T)+Y;if(30<te){var Te=Y-Y%5;te=(G&(1<<Te)-1).toString(32),G>>=Te,Y-=Te,Sd=1<<32-il(T)+Y|B<<Y|G,Ed=te+x}else Sd=1<<te|B<<Y|G,Ed=x}function sl(x){x.return!==null&&(kf(x,1),Yw(x,1,0))}function Xw(x){for(;x===B0;)B0=Df[--Uc],Df[Uc]=null,qm=Df[--Uc],Df[Uc]=null;for(;x===Lf;)Lf=Ci[--dc],Ci[dc]=null,Ed=Ci[--dc],Ci[dc]=null,Sd=Ci[--dc],Ci[dc]=null}var ai=null,zc=null,qo=!1,Vc=!1,Nl=null;function AS(x,T){var B=Wi(5,null,null,0);B.elementType="DELETED",B.stateNode=T,B.return=x,T=x.deletions,T===null?(x.deletions=[B],x.flags|=16):T.push(B)}function Yo(x,T){switch(x.tag){case 5:return T=oi(T,x.type,x.pendingProps),T!==null?(x.stateNode=T,ai=x,zc=Sr(T),!0):!1;case 6:return T=Qr(T,x.pendingProps),T!==null?(x.stateNode=T,ai=x,zc=null,!0):!1;case 13:if(T=ft(T),T!==null){var B=Lf!==null?{id:Sd,overflow:Ed}:null;return x.memoizedState={dehydrated:T,treeContext:B,retryLane:1073741824},B=Wi(18,null,null,0),B.stateNode=T,B.return=x,x.child=B,ai=x,zc=null,!0}return!1;default:return!1}}function xd(x){return(x.mode&1)!==0&&(x.flags&128)===0}function $0(x){if(qo){var T=zc;if(T){var B=T;if(!Yo(x,T)){if(xd(x))throw Error(s(418));T=wn(B);var G=ai;T&&Yo(x,T)?AS(G,B):(x.flags=x.flags&-4097|2,qo=!1,ai=x)}}else{if(xd(x))throw Error(s(418));x.flags=x.flags&-4097|2,qo=!1,ai=x}}}function oO(x){for(x=x.return;x!==null&&x.tag!==5&&x.tag!==3&&x.tag!==13;)x=x.return;ai=x}function Ym(x){if(!pe||x!==ai)return!1;if(!qo)return oO(x),qo=!0,!1;if(x.tag!==3&&(x.tag!==5||Oa(x.type)&&!ie(x.type,x.memoizedProps))){var T=zc;if(T){if(xd(x))throw iO(),Error(s(418));for(;T;)AS(x,T),T=wn(T)}}if(oO(x),x.tag===13){if(!pe)throw Error(s(316));if(x=x.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(s(317));zc=$t(x)}else zc=ai?wn(x.stateNode):null;return!0}function iO(){for(var x=zc;x;)x=wn(x)}function Xm(){pe&&(zc=ai=null,Vc=qo=!1)}function Kw(x){Nl===null?Nl=[x]:Nl.push(x)}var sO=a.ReactCurrentBatchConfig;function ag(x,T){if(Du(x,T))return!0;if(typeof x!="object"||x===null||typeof T!="object"||T===null)return!1;var B=Object.keys(x),G=Object.keys(T);if(B.length!==G.length)return!1;for(G=0;G<B.length;G++){var Y=B[G];if(!SS.call(T,Y)||!Du(x[Y],T[Y]))return!1}return!0}function Km(x){switch(x.tag){case 5:return ig(x.type);case 16:return ig("Lazy");case 13:return ig("Suspense");case 19:return ig("SuspenseList");case 0:case 2:case 15:return x=Vm(x.type,!1),x;case 11:return x=Vm(x.type.render,!1),x;case 1:return x=Vm(x.type,!0),x;default:return""}}function H0(x,T,B){if(x=B.ref,x!==null&&typeof x!="function"&&typeof x!="object"){if(B._owner){if(B=B._owner,B){if(B.tag!==1)throw Error(s(309));var G=B.stateNode}if(!G)throw Error(s(147,x));var Y=G,te=""+x;return T!==null&&T.ref!==null&&typeof T.ref=="function"&&T.ref._stringRef===te?T.ref:(T=function(Te){var qe=Y.refs;Te===null?delete qe[te]:qe[te]=Te},T._stringRef=te,T)}if(typeof x!="string")throw Error(s(284));if(!B._owner)throw Error(s(290,x))}return x}function U0(x,T){throw x=Object.prototype.toString.call(T),Error(s(31,x==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":x))}function Qw(x){var T=x._init;return T(x._payload)}function TS(x){function T(lt,Xe){if(x){var mt=lt.deletions;mt===null?(lt.deletions=[Xe],lt.flags|=16):mt.push(Xe)}}function B(lt,Xe){if(!x)return null;for(;Xe!==null;)T(lt,Xe),Xe=Xe.sibling;return null}function G(lt,Xe){for(lt=new Map;Xe!==null;)Xe.key!==null?lt.set(Xe.key,Xe):lt.set(Xe.index,Xe),Xe=Xe.sibling;return lt}function Y(lt,Xe){return lt=Fu(lt,Xe),lt.index=0,lt.sibling=null,lt}function te(lt,Xe,mt){return lt.index=mt,x?(mt=lt.alternate,mt!==null?(mt=mt.index,mt<Xe?(lt.flags|=2,Xe):mt):(lt.flags|=2,Xe)):(lt.flags|=1048576,Xe)}function Te(lt){return x&<.alternate===null&&(lt.flags|=2),lt}function qe(lt,Xe,mt,en){return Xe===null||Xe.tag!==6?(Xe=FA(mt,lt.mode,en),Xe.return=lt,Xe):(Xe=Y(Xe,mt),Xe.return=lt,Xe)}function ut(lt,Xe,mt,en){var In=mt.type;return In===u?vn(lt,Xe,mt.props.children,en,mt.key):Xe!==null&&(Xe.elementType===In||typeof In=="object"&&In!==null&&In.$$typeof===S&&Qw(In)===Xe.type)?(en=Y(Xe,mt.props),en.ref=H0(lt,Xe,mt),en.return=lt,en):(en=Vh(mt.type,mt.key,mt.props,null,lt.mode,en),en.ref=H0(lt,Xe,mt),en.return=lt,en)}function Pt(lt,Xe,mt,en){return Xe===null||Xe.tag!==4||Xe.stateNode.containerInfo!==mt.containerInfo||Xe.stateNode.implementation!==mt.implementation?(Xe=ZS(mt,lt.mode,en),Xe.return=lt,Xe):(Xe=Y(Xe,mt.children||[]),Xe.return=lt,Xe)}function vn(lt,Xe,mt,en,In){return Xe===null||Xe.tag!==7?(Xe=Zf(mt,lt.mode,en,In),Xe.return=lt,Xe):(Xe=Y(Xe,mt),Xe.return=lt,Xe)}function rr(lt,Xe,mt){if(typeof Xe=="string"&&Xe!==""||typeof Xe=="number")return Xe=FA(""+Xe,lt.mode,mt),Xe.return=lt,Xe;if(typeof Xe=="object"&&Xe!==null){switch(Xe.$$typeof){case l:return mt=Vh(Xe.type,Xe.key,Xe.props,null,lt.mode,mt),mt.ref=H0(lt,null,Xe),mt.return=lt,mt;case c:return Xe=ZS(Xe,lt.mode,mt),Xe.return=lt,Xe;case S:var en=Xe._init;return rr(lt,en(Xe._payload),mt)}if(D(Xe)||_(Xe))return Xe=Zf(Xe,lt.mode,mt,null),Xe.return=lt,Xe;U0(lt,Xe)}return null}function on(lt,Xe,mt,en){var In=Xe!==null?Xe.key:null;if(typeof mt=="string"&&mt!==""||typeof mt=="number")return In!==null?null:qe(lt,Xe,""+mt,en);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case l:return mt.key===In?ut(lt,Xe,mt,en):null;case c:return mt.key===In?Pt(lt,Xe,mt,en):null;case S:return In=mt._init,on(lt,Xe,In(mt._payload),en)}if(D(mt)||_(mt))return In!==null?null:vn(lt,Xe,mt,en,null);U0(lt,mt)}return null}function Bo(lt,Xe,mt,en,In){if(typeof en=="string"&&en!==""||typeof en=="number")return lt=lt.get(mt)||null,qe(Xe,lt,""+en,In);if(typeof en=="object"&&en!==null){switch(en.$$typeof){case l:return lt=lt.get(en.key===null?mt:en.key)||null,ut(Xe,lt,en,In);case c:return lt=lt.get(en.key===null?mt:en.key)||null,Pt(Xe,lt,en,In);case S:var kt=en._init;return Bo(lt,Xe,mt,kt(en._payload),In)}if(D(en)||_(en))return lt=lt.get(mt)||null,vn(Xe,lt,en,In,null);U0(Xe,en)}return null}function Ro(lt,Xe,mt,en){for(var In=null,kt=null,Kn=Xe,Vr=Xe=0,ci=null;Kn!==null&&Vr<mt.length;Vr++){Kn.index>Vr?(ci=Kn,Kn=null):ci=Kn.sibling;var Zr=on(lt,Kn,mt[Vr],en);if(Zr===null){Kn===null&&(Kn=ci);break}x&&Kn&&Zr.alternate===null&&T(lt,Kn),Xe=te(Zr,Xe,Vr),kt===null?In=Zr:kt.sibling=Zr,kt=Zr,Kn=ci}if(Vr===mt.length)return B(lt,Kn),qo&&kf(lt,Vr),In;if(Kn===null){for(;Vr<mt.length;Vr++)Kn=rr(lt,mt[Vr],en),Kn!==null&&(Xe=te(Kn,Xe,Vr),kt===null?In=Kn:kt.sibling=Kn,kt=Kn);return qo&&kf(lt,Vr),In}for(Kn=G(lt,Kn);Vr<mt.length;Vr++)ci=Bo(Kn,lt,Vr,mt[Vr],en),ci!==null&&(x&&ci.alternate!==null&&Kn.delete(ci.key===null?Vr:ci.key),Xe=te(ci,Xe,Vr),kt===null?In=ci:kt.sibling=ci,kt=ci);return x&&Kn.forEach(function(kd){return T(lt,kd)}),qo&&kf(lt,Vr),In}function Fl(lt,Xe,mt,en){var In=_(mt);if(typeof In!="function")throw Error(s(150));if(mt=In.call(mt),mt==null)throw Error(s(151));for(var kt=In=null,Kn=Xe,Vr=Xe=0,ci=null,Zr=mt.next();Kn!==null&&!Zr.done;Vr++,Zr=mt.next()){Kn.index>Vr?(ci=Kn,Kn=null):ci=Kn.sibling;var kd=on(lt,Kn,Zr.value,en);if(kd===null){Kn===null&&(Kn=ci);break}x&&Kn&&kd.alternate===null&&T(lt,Kn),Xe=te(kd,Xe,Vr),kt===null?In=kd:kt.sibling=kd,kt=kd,Kn=ci}if(Zr.done)return B(lt,Kn),qo&&kf(lt,Vr),In;if(Kn===null){for(;!Zr.done;Vr++,Zr=mt.next())Zr=rr(lt,Zr.value,en),Zr!==null&&(Xe=te(Zr,Xe,Vr),kt===null?In=Zr:kt.sibling=Zr,kt=Zr);return qo&&kf(lt,Vr),In}for(Kn=G(lt,Kn);!Zr.done;Vr++,Zr=mt.next())Zr=Bo(Kn,lt,Vr,Zr.value,en),Zr!==null&&(x&&Zr.alternate!==null&&Kn.delete(Zr.key===null?Vr:Zr.key),Xe=te(Zr,Xe,Vr),kt===null?In=Zr:kt.sibling=Zr,kt=Zr);return x&&Kn.forEach(function($O){return T(lt,$O)}),qo&&kf(lt,Vr),In}function aa(lt,Xe,mt,en){if(typeof mt=="object"&&mt!==null&&mt.type===u&&mt.key===null&&(mt=mt.props.children),typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case l:e:{for(var In=mt.key,kt=Xe;kt!==null;){if(kt.key===In){if(In=mt.type,In===u){if(kt.tag===7){B(lt,kt.sibling),Xe=Y(kt,mt.props.children),Xe.return=lt,lt=Xe;break e}}else if(kt.elementType===In||typeof In=="object"&&In!==null&&In.$$typeof===S&&Qw(In)===kt.type){B(lt,kt.sibling),Xe=Y(kt,mt.props),Xe.ref=H0(lt,kt,mt),Xe.return=lt,lt=Xe;break e}B(lt,kt);break}else T(lt,kt);kt=kt.sibling}mt.type===u?(Xe=Zf(mt.props.children,lt.mode,en,mt.key),Xe.return=lt,lt=Xe):(en=Vh(mt.type,mt.key,mt.props,null,lt.mode,en),en.ref=H0(lt,Xe,mt),en.return=lt,lt=en)}return Te(lt);case c:e:{for(kt=mt.key;Xe!==null;){if(Xe.key===kt)if(Xe.tag===4&&Xe.stateNode.containerInfo===mt.containerInfo&&Xe.stateNode.implementation===mt.implementation){B(lt,Xe.sibling),Xe=Y(Xe,mt.children||[]),Xe.return=lt,lt=Xe;break e}else{B(lt,Xe);break}else T(lt,Xe);Xe=Xe.sibling}Xe=ZS(mt,lt.mode,en),Xe.return=lt,lt=Xe}return Te(lt);case S:return kt=mt._init,aa(lt,Xe,kt(mt._payload),en)}if(D(mt))return Ro(lt,Xe,mt,en);if(_(mt))return Fl(lt,Xe,mt,en);U0(lt,mt)}return typeof mt=="string"&&mt!==""||typeof mt=="number"?(mt=""+mt,Xe!==null&&Xe.tag===6?(B(lt,Xe.sibling),Xe=Y(Xe,mt),Xe.return=lt,lt=Xe):(B(lt,Xe),Xe=FA(mt,lt.mode,en),Xe.return=lt,lt=Xe),Te(lt)):B(lt,Xe)}return aa}var Ff=TS(!0),Zw=TS(!1),_S=lc(null),Qm=null,Bf=null,Jw=null;function IS(){Jw=Bf=Qm=null}function Ml(x,T,B){xe?(xo(_S,T._currentValue),T._currentValue=B):(xo(_S,T._currentValue2),T._currentValue2=B)}function z0(x){var T=_S.current;Io(_S),xe?x._currentValue=T:x._currentValue2=T}function lg(x,T,B){for(;x!==null;){var G=x.alternate;if((x.childLanes&T)!==T?(x.childLanes|=T,G!==null&&(G.childLanes|=T)):G!==null&&(G.childLanes&T)!==T&&(G.childLanes|=T),x===B)break;x=x.return}}function cg(x,T){Qm=x,Jw=Bf=null,x=x.dependencies,x!==null&&x.firstContext!==null&&(x.lanes&T&&(zn=!0),x.firstContext=null)}function hc(x){var T=xe?x._currentValue:x._currentValue2;if(Jw!==x)if(x={context:x,memoizedValue:T,next:null},Bf===null){if(Qm===null)throw Error(s(308));Bf=x,Qm.dependencies={lanes:0,firstContext:x}}else Bf=Bf.next=x;return T}var ug=null;function eA(x){ug===null?ug=[x]:ug.push(x)}function aO(x,T,B,G){var Y=T.interleaved;return Y===null?(B.next=B,eA(T)):(B.next=Y.next,Y.next=B),T.interleaved=B,wd(x,G)}function wd(x,T){x.lanes|=T;var B=x.alternate;for(B!==null&&(B.lanes|=T),B=x,x=x.return;x!==null;)x.childLanes|=T,B=x.alternate,B!==null&&(B.childLanes|=T),B=x,x=x.return;return B.tag===3?B.stateNode:null}var $f=!1;function Hf(x){x.updateQueue={baseState:x.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lO(x,T){x=x.updateQueue,T.updateQueue===x&&(T.updateQueue={baseState:x.baseState,firstBaseUpdate:x.firstBaseUpdate,lastBaseUpdate:x.lastBaseUpdate,shared:x.shared,effects:x.effects})}function kh(x,T){return{eventTime:x,lane:T,tag:0,payload:null,callback:null,next:null}}function Ad(x,T,B){var G=x.updateQueue;if(G===null)return null;if(G=G.shared,Ir&2){var Y=G.pending;return Y===null?T.next=T:(T.next=Y.next,Y.next=T),G.pending=T,wd(x,B)}return Y=G.interleaved,Y===null?(T.next=T,eA(G)):(T.next=Y.next,Y.next=T),G.interleaved=T,wd(x,B)}function V0(x,T,B){if(T=T.updateQueue,T!==null&&(T=T.shared,(B&4194240)!==0)){var G=T.lanes;G&=x.pendingLanes,B|=G,T.lanes=B,Po(x,B)}}function Fh(x,T){var B=x.updateQueue,G=x.alternate;if(G!==null&&(G=G.updateQueue,B===G)){var Y=null,te=null;if(B=B.firstBaseUpdate,B!==null){do{var Te={eventTime:B.eventTime,lane:B.lane,tag:B.tag,payload:B.payload,callback:B.callback,next:null};te===null?Y=te=Te:te=te.next=Te,B=B.next}while(B!==null);te===null?Y=te=T:te=te.next=T}else Y=te=T;B={baseState:G.baseState,firstBaseUpdate:Y,lastBaseUpdate:te,shared:G.shared,effects:G.effects},x.updateQueue=B;return}x=B.lastBaseUpdate,x===null?B.firstBaseUpdate=T:x.next=T,B.lastBaseUpdate=T}function dg(x,T,B,G){var Y=x.updateQueue;$f=!1;var te=Y.firstBaseUpdate,Te=Y.lastBaseUpdate,qe=Y.shared.pending;if(qe!==null){Y.shared.pending=null;var ut=qe,Pt=ut.next;ut.next=null,Te===null?te=Pt:Te.next=Pt,Te=ut;var vn=x.alternate;vn!==null&&(vn=vn.updateQueue,qe=vn.lastBaseUpdate,qe!==Te&&(qe===null?vn.firstBaseUpdate=Pt:qe.next=Pt,vn.lastBaseUpdate=ut))}if(te!==null){var rr=Y.baseState;Te=0,vn=Pt=ut=null,qe=te;do{var on=qe.lane,Bo=qe.eventTime;if((G&on)===on){vn!==null&&(vn=vn.next={eventTime:Bo,lane:0,tag:qe.tag,payload:qe.payload,callback:qe.callback,next:null});e:{var Ro=x,Fl=qe;switch(on=T,Bo=B,Fl.tag){case 1:if(Ro=Fl.payload,typeof Ro=="function"){rr=Ro.call(Bo,rr,on);break e}rr=Ro;break e;case 3:Ro.flags=Ro.flags&-65537|128;case 0:if(Ro=Fl.payload,on=typeof Ro=="function"?Ro.call(Bo,rr,on):Ro,on==null)break e;rr=i({},rr,on);break e;case 2:$f=!0}}qe.callback!==null&&qe.lane!==0&&(x.flags|=64,on=Y.effects,on===null?Y.effects=[qe]:on.push(qe))}else Bo={eventTime:Bo,lane:on,tag:qe.tag,payload:qe.payload,callback:qe.callback,next:null},vn===null?(Pt=vn=Bo,ut=rr):vn=vn.next=Bo,Te|=on;if(qe=qe.next,qe===null){if(qe=Y.shared.pending,qe===null)break;on=qe,qe=on.next,on.next=null,Y.lastBaseUpdate=on,Y.shared.pending=null}}while(1);if(vn===null&&(ut=rr),Y.baseState=ut,Y.firstBaseUpdate=Pt,Y.lastBaseUpdate=vn,T=Y.shared.interleaved,T!==null){Y=T;do Te|=Y.lane,Y=Y.next;while(Y!==T)}else te===null&&(Y.shared.lanes=0);qf|=Te,x.lanes=Te,x.memoizedState=rr}}function cO(x,T,B){if(x=T.effects,T.effects=null,x!==null)for(T=0;T<x.length;T++){var G=x[T],Y=G.callback;if(Y!==null){if(G.callback=null,G=B,typeof Y!="function")throw Error(s(191,Y));Y.call(G)}}}var G0={},Gc=lc(G0),Td=lc(G0),Na=lc(G0);function Lu(x){if(x===G0)throw Error(s(174));return x}function tA(x,T){xo(Na,T),xo(Td,x),xo(Gc,G0),x=U(T),Io(Gc),xo(Gc,x)}function Zm(){Io(Gc),Io(Td),Io(Na)}function uO(x){var T=Lu(Na.current),B=Lu(Gc.current);T=H(B,x.type,T),B!==T&&(xo(Td,x),xo(Gc,T))}function nA(x){Td.current===x&&(Io(Gc),Io(Td))}var Si=lc(0);function Bh(x){for(var T=x;T!==null;){if(T.tag===13){var B=T.memoizedState;if(B!==null&&(B=B.dehydrated,B===null||Ot(B)||Wt(B)))return T}else if(T.tag===19&&T.memoizedProps.revealOrder!==void 0){if(T.flags&128)return T}else if(T.child!==null){T.child.return=T,T=T.child;continue}if(T===x)break;for(;T.sibling===null;){if(T.return===null||T.return===x)return null;T=T.return}T.sibling.return=T.return,T=T.sibling}return null}var Ge=[];function vt(){for(var x=0;x<Ge.length;x++){var T=Ge[x];xe?T._workInProgressVersionPrimary=null:T._workInProgressVersionSecondary=null}Ge.length=0}var ct=a.ReactCurrentDispatcher,cn=a.ReactCurrentBatchConfig,$n=0,Fn=null,Mr=null,nr=null,Jm=!1,W0=!1,Ma=0,PS=0;function Da(){throw Error(s(321))}function Uf(x,T){if(T===null)return!1;for(var B=0;B<T.length&&B<x.length;B++)if(!Du(x[B],T[B]))return!1;return!0}function ey(x,T,B,G,Y,te){if($n=te,Fn=T,T.memoizedState=null,T.updateQueue=null,T.lanes=0,ct.current=x===null||x.memoizedState===null?lA:Z0,x=B(G,Y),W0){te=0;do{if(W0=!1,Ma=0,25<=te)throw Error(s(301));te+=1,nr=Mr=null,T.updateQueue=null,ct.current=cA,x=B(G,Y)}while(W0)}if(ct.current=OS,T=Mr!==null&&Mr.next!==null,$n=0,nr=Mr=Fn=null,Jm=!1,T)throw Error(s(300));return x}function ty(){var x=Ma!==0;return Ma=0,x}function _r(){var x={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nr===null?Fn.memoizedState=nr=x:nr=nr.next=x,nr}function Wc(){if(Mr===null){var x=Fn.alternate;x=x!==null?x.memoizedState:null}else x=Mr.next;var T=nr===null?Fn.memoizedState:nr.next;if(T!==null)nr=T,Mr=x;else{if(x===null)throw Error(s(310));Mr=x,x={memoizedState:Mr.memoizedState,baseState:Mr.baseState,baseQueue:Mr.baseQueue,queue:Mr.queue,next:null},nr===null?Fn.memoizedState=nr=x:nr=nr.next=x}return nr}function ny(x,T){return typeof T=="function"?T(x):T}function ry(x){var T=Wc(),B=T.queue;if(B===null)throw Error(s(311));B.lastRenderedReducer=x;var G=Mr,Y=G.baseQueue,te=B.pending;if(te!==null){if(Y!==null){var Te=Y.next;Y.next=te.next,te.next=Te}G.baseQueue=Y=te,B.pending=null}if(Y!==null){te=Y.next,G=G.baseState;var qe=Te=null,ut=null,Pt=te;do{var vn=Pt.lane;if(($n&vn)===vn)ut!==null&&(ut=ut.next={lane:0,action:Pt.action,hasEagerState:Pt.hasEagerState,eagerState:Pt.eagerState,next:null}),G=Pt.hasEagerState?Pt.eagerState:x(G,Pt.action);else{var rr={lane:vn,action:Pt.action,hasEagerState:Pt.hasEagerState,eagerState:Pt.eagerState,next:null};ut===null?(qe=ut=rr,Te=G):ut=ut.next=rr,Fn.lanes|=vn,qf|=vn}Pt=Pt.next}while(Pt!==null&&Pt!==te);ut===null?Te=G:ut.next=qe,Du(G,T.memoizedState)||(zn=!0),T.memoizedState=G,T.baseState=Te,T.baseQueue=ut,B.lastRenderedState=G}if(x=B.interleaved,x!==null){Y=x;do te=Y.lane,Fn.lanes|=te,qf|=te,Y=Y.next;while(Y!==x)}else Y===null&&(B.lanes=0);return[T.memoizedState,B.dispatch]}function rA(x){var T=Wc(),B=T.queue;if(B===null)throw Error(s(311));B.lastRenderedReducer=x;var G=B.dispatch,Y=B.pending,te=T.memoizedState;if(Y!==null){B.pending=null;var Te=Y=Y.next;do te=x(te,Te.action),Te=Te.next;while(Te!==Y);Du(te,T.memoizedState)||(zn=!0),T.memoizedState=te,T.baseQueue===null&&(T.baseState=te),B.lastRenderedState=te}return[te,G]}function dO(){}function hO(x,T){var B=Fn,G=Wc(),Y=T(),te=!Du(G.memoizedState,Y);if(te&&(G.memoizedState=Y,zn=!0),G=G.queue,iy(q0.bind(null,B,G,x),[x]),G.getSnapshot!==T||te||nr!==null&&nr.memoizedState.tag&1){if(B.flags|=2048,oy(9,$h.bind(null,B,G,Y,T),void 0,null),Us===null)throw Error(s(349));
vendor: 4,253 bytes, line 432
432$n&30||j0(B,T,Y)}return Y}function j0(x,T,B){x.flags|=16384,x={getSnapshot:T,value:B},T=Fn.updateQueue,T===null?(T={lastEffect:null,stores:null},Fn.updateQueue=T,T.stores=[x]):(B=T.stores,B===null?T.stores=[x]:B.push(x))}function $h(x,T,B,G){T.value=B,T.getSnapshot=G,oA(T)&&Y0(x)}function q0(x,T,B){return B(function(){oA(T)&&Y0(x)})}function oA(x){var T=x.getSnapshot;x=x.value;try{var B=T();return!Du(x,B)}catch{return!0}}function Y0(x){var T=wd(x,1);T!==null&&Ei(T,x,1,-1)}function iA(x){var T=_r();return typeof x=="function"&&(x=x()),T.memoizedState=T.baseState=x,x={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ny,lastRenderedState:x},T.queue=x,x=x.dispatch=La.bind(null,Fn,x),[T.memoizedState,x]}function oy(x,T,B,G){return x={tag:x,create:T,destroy:B,deps:G,next:null},T=Fn.updateQueue,T===null?(T={lastEffect:null,stores:null},Fn.updateQueue=T,T.lastEffect=x.next=x):(B=T.lastEffect,B===null?T.lastEffect=x.next=x:(G=B.next,B.next=x,x.next=G,T.lastEffect=x)),x}function X0(){return Wc().memoizedState}function K0(x,T,B,G){var Y=_r();Fn.flags|=x,Y.memoizedState=oy(1|T,B,void 0,G===void 0?null:G)}function zf(x,T,B,G){var Y=Wc();G=G===void 0?null:G;var te=void 0;if(Mr!==null){var Te=Mr.memoizedState;if(te=Te.destroy,G!==null&&Uf(G,Te.deps)){Y.memoizedState=oy(T,B,te,G);return}}Fn.flags|=x,Y.memoizedState=oy(1|T,B,te,G)}function Vf(x,T){return K0(8390656,8,x,T)}function iy(x,T){return zf(2048,8,x,T)}function fO(x,T){return zf(4,2,x,T)}function pO(x,T){return zf(4,4,x,T)}function gO(x,T){if(typeof T=="function")return x=x(),T(x),function(){T(null)};if(T!=null)return x=x(),T.current=x,function(){T.current=null}}function Q0(x,T,B){return B=B!=null?B.concat([x]):null,zf(4,4,gO.bind(null,T,x),B)}function sy(){}function RS(x,T){var B=Wc();T=T===void 0?null:T;var G=B.memoizedState;return G!==null&&T!==null&&Uf(T,G[1])?G[0]:(B.memoizedState=[x,T],x)}function mO(x,T){var B=Wc();T=T===void 0?null:T;var G=B.memoizedState;return G!==null&&T!==null&&Uf(T,G[1])?G[0]:(x=x(),B.memoizedState=[x,T],x)}function sA(x,T,B){return $n&21?(Du(B,T)||(B=An(),Fn.lanes|=B,qf|=B,x.baseState=!0),T):(x.baseState&&(x.baseState=!1,zn=!0),x.memoizedState=B)}function h$(x,T){var B=Bn;Bn=B!==0&&4>B?B:4,x(!0);var G=cn.transition;cn.transition={};try{x(!1),T()}finally{Bn=B,cn.transition=G}}function yO(){return Wc().memoizedState}function xs(x,T,B){var G=Xf(x);if(B={lane:G,action:B,hasEagerState:!1,eagerState:null,next:null},vO(x))bO(T,B);else if(B=aO(x,T,B,G),B!==null){var Y=Ba();Ei(B,x,G,Y),aA(B,T,G)}}function La(x,T,B){var G=Xf(x),Y={lane:G,action:B,hasEagerState:!1,eagerState:null,next:null};if(vO(x))bO(T,Y);else{var te=x.alternate;if(x.lanes===0&&(te===null||te.lanes===0)&&(te=T.lastRenderedReducer,te!==null))try{var Te=T.lastRenderedState,qe=te(Te,B);if(Y.hasEagerState=!0,Y.eagerState=qe,Du(qe,Te)){var ut=T.interleaved;ut===null?(Y.next=Y,eA(T)):(Y.next=ut.next,ut.next=Y),T.interleaved=Y;return}}catch{}finally{}B=aO(x,T,Y,G),B!==null&&(Y=Ba(),Ei(B,x,G,Y),aA(B,T,G))}}function vO(x){var T=x.alternate;return x===Fn||T!==null&&T===Fn}function bO(x,T){W0=Jm=!0;var B=x.pending;B===null?T.next=T:(T.next=B.next,B.next=T),x.pending=T}function aA(x,T,B){if(B&4194240){var G=T.lanes;G&=x.pendingLanes,B|=G,T.lanes=B,Po(x,B)}}var OS={readContext:hc,useCallback:Da,useContext:Da,useEffect:Da,useImperativeHandle:Da,useInsertionEffect:Da,useLayoutEffect:Da,useMemo:Da,useReducer:Da,useRef:Da,useState:Da,useDebugValue:Da,useDeferredValue:Da,useTransition:Da,useMutableSource:Da,useSyncExternalStore:Da,useId:Da,unstable_isNewReconciler:!1},lA={readContext:hc,useCallback:function(x,T){return _r().memoizedState=[x,T===void 0?null:T],x},useContext:hc,useEffect:Vf,useImperativeHandle:function(x,T,B){return B=B!=null?B.concat([x]):null,K0(4194308,4,gO.bind(null,T,x),B)},useLayoutEffect:function(x,T){return K0(4194308,4,x,T)},useInsertionEffect:function(x,T){return K0(4,2,x,T)},useMemo:function(x,T){var B=_r();return T=T===void 0?null:T,x=x(),B.memoizedState=[x,T],x},useReducer:function(x,T,B){var G=_r();return T=B!==void 0?B(T):T,G.memoizedState=G.baseState=T,x={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:x,lastRenderedState:T},G.queue=x,x=x.dispatch=xs.bind(null,Fn,x),[G.memoizedState,x]}
vendor: 7,494 bytes, lines 432-434
432,useRef:function(x){var T=_r();return x={current:x},T.memoizedState=x},useState:iA,useDebugValue:sy,useDeferredValue:function(x){return _r().memoizedState=x},useTransition:function(){var x=iA(!1),T=x[0];return x=h$.bind(null,x[1]),_r().memoizedState=x,[T,x]},useMutableSource:function(){},useSyncExternalStore:function(x,T,B){var G=Fn,Y=_r();if(qo){if(B===void 0)throw Error(s(407));B=B()}else{if(B=T(),Us===null)throw Error(s(349));$n&30||j0(G,T,B)}Y.memoizedState=B;var te={value:B,getSnapshot:T};return Y.queue=te,Vf(q0.bind(null,G,te,x),[x]),G.flags|=2048,oy(9,$h.bind(null,G,te,B,T),void 0,null),B},useId:function(){var x=_r(),T=Us.identifierPrefix;if(qo){var B=Ed,G=Sd;B=(G&~(1<<32-il(G)-1)).toString(32)+B,T=":"+T+"R"+B,B=Ma++,0<B&&(T+="H"+B.toString(32)),T+=":"}else B=PS++,T=":"+T+"r"+B.toString(32)+":";return x.memoizedState=T},unstable_isNewReconciler:!1},Z0={readContext:hc,useCallback:RS,useContext:hc,useEffect:iy,useImperativeHandle:Q0,useInsertionEffect:fO,useLayoutEffect:pO,useMemo:mO,useReducer:ry,useRef:X0,useState:function(){return ry(ny)},useDebugValue:sy,useDeferredValue:function(x){var T=Wc();return sA(T,Mr.memoizedState,x)},useTransition:function(){var x=ry(ny)[0],T=Wc().memoizedState;return[x,T]},useMutableSource:dO,useSyncExternalStore:hO,useId:yO,unstable_isNewReconciler:!1},cA={readContext:hc,useCallback:RS,useContext:hc,useEffect:iy,useImperativeHandle:Q0,useInsertionEffect:fO,useLayoutEffect:pO,useMemo:mO,useReducer:rA,useRef:X0,useState:function(){return rA(ny)},useDebugValue:sy,useDeferredValue:function(x){var T=Wc();return Mr===null?T.memoizedState=x:sA(T,Mr.memoizedState,x)},useTransition:function(){var x=rA(ny)[0],T=Wc().memoizedState;return[x,T]},useMutableSource:dO,useSyncExternalStore:hO,useId:yO,unstable_isNewReconciler:!1};function ka(x,T){if(x&&x.defaultProps){T=i({},T),x=x.defaultProps;for(var B in x)T[B]===void 0&&(T[B]=x[B]);return T}return T}function hg(x,T,B,G){T=x.memoizedState,B=B(G,T),B=B==null?T:i({},T,B),x.memoizedState=B,x.lanes===0&&(x.updateQueue.baseState=B)}var Gf={isMounted:function(x){return(x=x._reactInternals)?O(x)===x:!1},enqueueSetState:function(x,T,B){x=x._reactInternals;var G=Ba(),Y=Xf(x),te=kh(G,Y);te.payload=T,B!=null&&(te.callback=B),T=Ad(x,te,Y),T!==null&&(Ei(T,x,Y,G),V0(T,x,Y))},enqueueReplaceState:function(x,T,B){x=x._reactInternals;var G=Ba(),Y=Xf(x),te=kh(G,Y);te.tag=1,te.payload=T,B!=null&&(te.callback=B),T=Ad(x,te,Y),T!==null&&(Ei(T,x,Y,G),V0(T,x,Y))},enqueueForceUpdate:function(x,T){x=x._reactInternals;var B=Ba(),G=Xf(x),Y=kh(B,G);Y.tag=2,T!=null&&(Y.callback=T),T=Ad(x,Y,G),T!==null&&(Ei(T,x,G,B),V0(T,x,G))}};function J0(x,T,B,G,Y,te,Te){return x=x.stateNode,typeof x.shouldComponentUpdate=="function"?x.shouldComponentUpdate(G,te,Te):T.prototype&&T.prototype.isPureReactComponent?!ag(B,G)||!ag(Y,te):!0}function fg(x,T,B){var G=!1,Y=Fc,te=T.contextType;return typeof te=="object"&&te!==null?te=hc(te):(Y=ra(T)?Ru:rs.current,G=T.contextTypes,te=(G=G!=null)?Nf(x,Y):Fc),T=new T(B,te),x.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Gf,x.stateNode=T,T._reactInternals=x,G&&(x=x.stateNode,x.__reactInternalMemoizedUnmaskedChildContext=Y,x.__reactInternalMemoizedMaskedChildContext=te),T}function CO(x,T,B,G){x=T.state,typeof T.componentWillReceiveProps=="function"&&T.componentWillReceiveProps(B,G),typeof T.UNSAFE_componentWillReceiveProps=="function"&&T.UNSAFE_componentWillReceiveProps(B,G),T.state!==x&&Gf.enqueueReplaceState(T,T.state,null)}function uA(x,T,B,G){var Y=x.stateNode;Y.props=B,Y.state=x.memoizedState,Y.refs={},Hf(x);var te=T.contextType;typeof te=="object"&&te!==null?Y.context=hc(te):(te=ra(T)?Ru:rs.current,Y.context=Nf(x,te)),Y.state=x.memoizedState,te=T.getDerivedStateFromProps,typeof te=="function"&&(hg(x,T,te,B),Y.state=x.memoizedState),typeof T.getDerivedStateFromProps=="function"||typeof Y.getSnapshotBeforeUpdate=="function"||typeof Y.UNSAFE_componentWillMount!="function"&&typeof Y.componentWillMount!="function"||(T=Y.state,typeof Y.componentWillMount=="function"&&Y.componentWillMount(),typeof Y.UNSAFE_componentWillMount=="function"&&Y.UNSAFE_componentWillMount(),T!==Y.state&&Gf.enqueueReplaceState(Y,Y.state,null),dg(x,B,Y,G),Y.state=x.memoizedState),typeof Y.componentDidMount=="function"&&(x.flags|=4194308)}function ay(x,T){try{var B="",G=T;do B+=Km(G),G=G.return;while(G);var Y=B}catch(te){Y=` 433Error generating stack: `+te.message+` 434`+te.stack}return{value:x,source:T,stack:Y,digest:null}}function dA(x,T,B){return{value:x,source:null,stack:B??null,digest:T??null}}function hA(x,T){try{console.error(T.value)}catch(B){setTimeout(function(){throw B})}}var NS=typeof WeakMap=="function"?WeakMap:Map;function ly(x,T,B){B=kh(-1,B),B.tag=3,B.payload={element:null};var G=T.value;return B.callback=function(){vy||(vy=!0,WS=G),hA(x,T)},B}function fA(x,T,B){B=kh(-1,B),B.tag=3;var G=x.type.getDerivedStateFromError;if(typeof G=="function"){var Y=T.value;B.payload=function(){return G(Y)},B.callback=function(){hA(x,T)}}var te=x.stateNode;return te!==null&&typeof te.componentDidCatch=="function"&&(B.callback=function(){hA(x,T),typeof G!="function"&&(Md===null?Md=new Set([this]):Md.add(this));var Te=T.stack;this.componentDidCatch(T.value,{componentStack:Te!==null?Te:""})}),B}function me(x,T,B){var G=x.pingCache;if(G===null){G=x.pingCache=new NS;var Y=new Set;G.set(T,Y)}else Y=G.get(T),Y===void 0&&(Y=new Set,G.set(T,Y));Y.has(B)||(Y.add(B),x=v$.bind(null,x,T,B),T.then(x,x))}function pg(x){do{var T;if((T=x.tag===13)&&(T=x.memoizedState,T=T!==null?T.dehydrated!==null:!0),T)return x;x=x.return}while(x!==null);return null}function eb(x,T,B,G,Y){return x.mode&1?(x.flags|=65536,x.lanes=Y,x):(x===T?x.flags|=65536:(x.flags|=128,B.flags|=131072,B.flags&=-52805,B.tag===1&&(B.alternate===null?B.tag=17:(T=kh(-1,1),T.tag=2,Ad(B,T,1))),B.lanes|=1),x)}var jc=a.ReactCurrentOwner,zn=!1;function al(x,T,B,G){T.child=x===null?Zw(T,null,B,G):Ff(T,x.child,B,G)}function SO(x,T,B,G,Y){B=B.render;var te=T.ref;return cg(T,Y),G=ey(x,T,B,G,te,Y),B=ty(),x!==null&&!zn?(T.updateQueue=x.updateQueue,T.flags&=-2053,x.lanes&=~Y,ll(x,T,Y)):(qo&&B&&sl(T),T.flags|=1,al(x,T,G,Y),T.child)}function EO(x,T,B,G,Y){if(x===null){var te=B.type;return typeof te=="function"&&!kA(te)&&te.defaultProps===void 0&&B.compare===null&&B.defaultProps===void 0?(T.tag=15,T.type=te,Wf(x,T,te,G,Y)):(x=Vh(B.type,null,G,T,T.mode,Y),x.ref=T.ref,x.return=T,T.child=x)}if(te=x.child,!(x.lanes&Y)){var Te=te.memoizedProps;if(B=B.compare,B=B!==null?B:ag,B(Te,G)&&x.ref===T.ref)return ll(x,T,Y)}return T.flags|=1,x=Fu(te,G),x.ref=T.ref,x.return=T,T.child=x}function Wf(x,T,B,G,Y){if(x!==null){var te=x.memoizedProps;if(ag(te,G)&&x.ref===T.ref)if(zn=!1,T.pendingProps=G=te,(x.lanes&Y)!==0)x.flags&131072&&(zn=!0);else return T.lanes=x.lanes,ll(x,T,Y)}return pA(x,T,B,G,Y)}function xO(x,T,B){var G=T.pendingProps,Y=G.children,te=x!==null?x.memoizedState:null;if(G.mode==="hidden")if(!(T.mode&1))T.memoizedState={baseLanes:0,cachePool:null,transitions:null},xo(py,ul),ul|=B;else{if(!(B&1073741824))return x=te!==null?te.baseLanes|B:B,T.lanes=T.childLanes=1073741824,T.memoizedState={baseLanes:x,cachePool:null,transitions:null},T.updateQueue=null,xo(py,ul),ul|=x,null;T.memoizedState={baseLanes:0,cachePool:null,transitions:null},G=te!==null?te.baseLanes:B,xo(py,ul),ul|=G}else te!==null?(G=te.baseLanes|B,T.memoizedState=null):G=B,xo(py,ul),ul|=G;return al(x,T,Y,B),T.child}function wO(x,T){var B=T.ref;(x===null&&B!==null||x!==null&&x.ref!==B)&&(T.flags|=512,T.flags|=2097152)}
vendor: 48,721 bytes, line 434
434function pA(x,T,B,G,Y){var te=ra(B)?Ru:rs.current;return te=Nf(T,te),cg(T,Y),B=ey(x,T,B,G,te,Y),G=ty(),x!==null&&!zn?(T.updateQueue=x.updateQueue,T.flags&=-2053,x.lanes&=~Y,ll(x,T,Y)):(qo&&G&&sl(T),T.flags|=1,al(x,T,B,Y),T.child)}function AO(x,T,B,G,Y){if(ra(B)){var te=!0;sg(T)}else te=!1;if(cg(T,Y),T.stateNode===null)MS(x,T),fg(T,B,G),uA(T,B,G,Y),G=!0;else if(x===null){var Te=T.stateNode,qe=T.memoizedProps;Te.props=qe;var ut=Te.context,Pt=B.contextType;typeof Pt=="object"&&Pt!==null?Pt=hc(Pt):(Pt=ra(B)?Ru:rs.current,Pt=Nf(T,Pt));var vn=B.getDerivedStateFromProps,rr=typeof vn=="function"||typeof Te.getSnapshotBeforeUpdate=="function";rr||typeof Te.UNSAFE_componentWillReceiveProps!="function"&&typeof Te.componentWillReceiveProps!="function"||(qe!==G||ut!==Pt)&&CO(T,Te,G,Pt),$f=!1;var on=T.memoizedState;Te.state=on,dg(T,G,Te,Y),ut=T.memoizedState,qe!==G||on!==ut||na.current||$f?(typeof vn=="function"&&(hg(T,B,vn,G),ut=T.memoizedState),(qe=$f||J0(T,B,qe,G,on,ut,Pt))?(rr||typeof Te.UNSAFE_componentWillMount!="function"&&typeof Te.componentWillMount!="function"||(typeof Te.componentWillMount=="function"&&Te.componentWillMount(),typeof Te.UNSAFE_componentWillMount=="function"&&Te.UNSAFE_componentWillMount()),typeof Te.componentDidMount=="function"&&(T.flags|=4194308)):(typeof Te.componentDidMount=="function"&&(T.flags|=4194308),T.memoizedProps=G,T.memoizedState=ut),Te.props=G,Te.state=ut,Te.context=Pt,G=qe):(typeof Te.componentDidMount=="function"&&(T.flags|=4194308),G=!1)}else{Te=T.stateNode,lO(x,T),qe=T.memoizedProps,Pt=T.type===T.elementType?qe:ka(T.type,qe),Te.props=Pt,rr=T.pendingProps,on=Te.context,ut=B.contextType,typeof ut=="object"&&ut!==null?ut=hc(ut):(ut=ra(B)?Ru:rs.current,ut=Nf(T,ut));var Bo=B.getDerivedStateFromProps;(vn=typeof Bo=="function"||typeof Te.getSnapshotBeforeUpdate=="function")||typeof Te.UNSAFE_componentWillReceiveProps!="function"&&typeof Te.componentWillReceiveProps!="function"||(qe!==rr||on!==ut)&&CO(T,Te,G,ut),$f=!1,on=T.memoizedState,Te.state=on,dg(T,G,Te,Y);var Ro=T.memoizedState;qe!==rr||on!==Ro||na.current||$f?(typeof Bo=="function"&&(hg(T,B,Bo,G),Ro=T.memoizedState),(Pt=$f||J0(T,B,Pt,G,on,Ro,ut)||!1)?(vn||typeof Te.UNSAFE_componentWillUpdate!="function"&&typeof Te.componentWillUpdate!="function"||(typeof Te.componentWillUpdate=="function"&&Te.componentWillUpdate(G,Ro,ut),typeof Te.UNSAFE_componentWillUpdate=="function"&&Te.UNSAFE_componentWillUpdate(G,Ro,ut)),typeof Te.componentDidUpdate=="function"&&(T.flags|=4),typeof Te.getSnapshotBeforeUpdate=="function"&&(T.flags|=1024)):(typeof Te.componentDidUpdate!="function"||qe===x.memoizedProps&&on===x.memoizedState||(T.flags|=4),typeof Te.getSnapshotBeforeUpdate!="function"||qe===x.memoizedProps&&on===x.memoizedState||(T.flags|=1024),T.memoizedProps=G,T.memoizedState=Ro),Te.props=G,Te.state=Ro,Te.context=ut,G=Pt):(typeof Te.componentDidUpdate!="function"||qe===x.memoizedProps&&on===x.memoizedState||(T.flags|=4),typeof Te.getSnapshotBeforeUpdate!="function"||qe===x.memoizedProps&&on===x.memoizedState||(T.flags|=1024),G=!1)}return gA(x,T,B,G,te,Y)}function gA(x,T,B,G,Y,te){wO(x,T);var Te=(T.flags&128)!==0;if(!G&&!Te)return Y&&F0(T,B,!1),ll(x,T,te);G=T.stateNode,jc.current=T;var qe=Te&&typeof B.getDerivedStateFromError!="function"?null:G.render();return T.flags|=1,x!==null&&Te?(T.child=Ff(T,x.child,null,te),T.child=Ff(T,null,qe,te)):al(x,T,qe,te),T.memoizedState=G.state,Y&&F0(T,B,!0),T.child}function _d(x){var T=x.stateNode;T.pendingContext?Wm(x,T.pendingContext,T.pendingContext!==T.context):T.context&&Wm(x,T.context,!1),tA(x,T.containerInfo)}function TO(x,T,B,G,Y){return Xm(),Kw(Y),T.flags|=256,al(x,T,B,G),T.child}var mA={dehydrated:null,treeContext:null,retryLane:0};function yA(x){return{baseLanes:x,cachePool:null,transitions:null}}function _O(x,T,B){var G=T.pendingProps,Y=Si.current,te=!1,Te=(T.flags&128)!==0,qe;if((qe=Te)||(qe=x!==null&&x.memoizedState===null?!1:(Y&2)!==0),qe?(te=!0,T.flags&=-129):(x===null||x.memoizedState!==null)&&(Y|=1),xo(Si,Y&1),x===null)return $0(T),x=T.memoizedState,x!==null&&(x=x.dehydrated,x!==null)?(T.mode&1?Wt(x)?T.lanes=8:T.lanes=1073741824:T.lanes=1,null):(Te=G.children,x=G.fallback,te?(G=T.mode,te=T.child,Te={mode:"hidden",children:Te},!(G&1)&&te!==null?(te.childLanes=0,te.pendingProps=Te):te=hb(Te,G,0,null),x=Zf(x,G,B,null),te.return=T,x.return=T,te.sibling=x,T.child=te,T.child.memoizedState=yA(B),T.memoizedState=mA,x):vA(T,Te));if(Y=x.memoizedState,Y!==null&&(qe=Y.dehydrated,qe!==null))return f$(x,T,Te,G,qe,Y,B);if(te){te=G.fallback,Te=T.mode,Y=x.child,qe=Y.sibling;var ut={mode:"hidden",children:G.children};return!(Te&1)&&T.child!==Y?(G=T.child,G.childLanes=0,G.pendingProps=ut,T.deletions=null):(G=Fu(Y,ut),G.subtreeFlags=Y.subtreeFlags&14680064),qe!==null?te=Fu(qe,te):(te=Zf(te,Te,B,null),te.flags|=2),te.return=T,G.return=T,G.sibling=te,T.child=G,G=te,te=T.child,Te=x.child.memoizedState,Te=Te===null?yA(B):{baseLanes:Te.baseLanes|B,cachePool:null,transitions:Te.transitions},te.memoizedState=Te,te.childLanes=x.childLanes&~B,T.memoizedState=mA,G}return te=x.child,x=te.sibling,G=Fu(te,{mode:"visible",children:G.children}),!(T.mode&1)&&(G.lanes=B),G.return=T,G.sibling=null,x!==null&&(B=T.deletions,B===null?(T.deletions=[x],T.flags|=16):B.push(x)),T.child=G,T.memoizedState=null,G}function vA(x,T){return T=hb({mode:"visible",children:T},x.mode,0,null),T.return=x,x.child=T}function qc(x,T,B,G){return G!==null&&Kw(G),Ff(T,x.child,null,B),x=vA(T,T.pendingProps.children),x.flags|=2,T.memoizedState=null,x}function f$(x,T,B,G,Y,te,Te){if(B)return T.flags&256?(T.flags&=-257,G=dA(Error(s(422))),qc(x,T,Te,G)):T.memoizedState!==null?(T.child=x.child,T.flags|=128,null):(te=G.fallback,Y=T.mode,G=hb({mode:"visible",children:G.children},Y,0,null),te=Zf(te,Y,Te,null),te.flags|=2,G.return=T,te.return=T,G.sibling=te,T.child=G,T.mode&1&&Ff(T,x.child,null,Te),T.child.memoizedState=yA(Te),T.memoizedState=mA,te);if(!(T.mode&1))return qc(x,T,Te,null);if(Wt(Y))return G=sn(Y).digest,te=Error(s(419)),G=dA(te,G,void 0),qc(x,T,Te,G);if(B=(Te&x.childLanes)!==0,zn||B){if(G=Us,G!==null){switch(Te&-Te){case 4:Y=2;break;case 16:Y=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:Y=32;break;case 536870912:Y=268435456;break;default:Y=0}Y=Y&(G.suspendedLanes|Te)?0:Y,Y!==0&&Y!==te.retryLane&&(te.retryLane=Y,wd(x,Y),Ei(G,x,Y,-1))}return QS(),G=dA(Error(s(421))),qc(x,T,Te,G)}return Ot(Y)?(T.flags|=128,T.child=x.child,T=kO.bind(null,x),Jt(Y,T),null):(x=te.treeContext,pe&&(zc=ol(Y),ai=T,qo=!0,Nl=null,Vc=!1,x!==null&&(Ci[dc++]=Sd,Ci[dc++]=Ed,Ci[dc++]=Lf,Sd=x.id,Ed=x.overflow,Lf=T)),T=vA(T,G.children),T.flags|=4096,T)}function IO(x,T,B){x.lanes|=T;var G=x.alternate;G!==null&&(G.lanes|=T),lg(x.return,T,B)}function bA(x,T,B,G,Y){var te=x.memoizedState;te===null?x.memoizedState={isBackwards:T,rendering:null,renderingStartTime:0,last:G,tail:B,tailMode:Y}:(te.isBackwards=T,te.rendering=null,te.renderingStartTime=0,te.last=G,te.tail=B,te.tailMode=Y)}function PO(x,T,B){var G=T.pendingProps,Y=G.revealOrder,te=G.tail;if(al(x,T,G.children,B),G=Si.current,G&2)G=G&1|2,T.flags|=128;else{if(x!==null&&x.flags&128)e:for(x=T.child;x!==null;){if(x.tag===13)x.memoizedState!==null&&IO(x,B,T);else if(x.tag===19)IO(x,B,T);else if(x.child!==null){x.child.return=x,x=x.child;continue}if(x===T)break e;for(;x.sibling===null;){if(x.return===null||x.return===T)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}G&=1}if(xo(Si,G),!(T.mode&1))T.memoizedState=null;else switch(Y){case"forwards":for(B=T.child,Y=null;B!==null;)x=B.alternate,x!==null&&Bh(x)===null&&(Y=B),B=B.sibling;B=Y,B===null?(Y=T.child,T.child=null):(Y=B.sibling,B.sibling=null),bA(T,!1,Y,B,te);break;case"backwards":for(B=null,Y=T.child,T.child=null;Y!==null;){if(x=Y.alternate,x!==null&&Bh(x)===null){T.child=Y;break}x=Y.sibling,Y.sibling=B,B=Y,Y=x}bA(T,!0,B,null,te);break;case"together":bA(T,!1,null,null,void 0);break;default:T.memoizedState=null}return T.child}function MS(x,T){!(T.mode&1)&&x!==null&&(x.alternate=null,T.alternate=null,T.flags|=2)}function ll(x,T,B){if(x!==null&&(T.dependencies=x.dependencies),qf|=T.lanes,!(B&T.childLanes))return null;if(x!==null&&T.child!==x.child)throw Error(s(153));if(T.child!==null){for(x=T.child,B=Fu(x,x.pendingProps),T.child=B,B.return=T;x.sibling!==null;)x=x.sibling,B=B.sibling=Fu(x,x.pendingProps),B.return=T;B.sibling=null}return T.child}function p$(x,T,B){switch(T.tag){case 3:_d(T),Xm();break;case 5:uO(T);break;case 1:ra(T.type)&&sg(T);break;case 4:tA(T,T.stateNode.containerInfo);break;case 10:Ml(T,T.type._context,T.memoizedProps.value);break;case 13:var G=T.memoizedState;if(G!==null)return G.dehydrated!==null?(xo(Si,Si.current&1),T.flags|=128,null):B&T.child.childLanes?_O(x,T,B):(xo(Si,Si.current&1),x=ll(x,T,B),x!==null?x.sibling:null);xo(Si,Si.current&1);break;case 19:if(G=(B&T.childLanes)!==0,x.flags&128){if(G)return PO(x,T,B);T.flags|=128}var Y=T.memoizedState;if(Y!==null&&(Y.rendering=null,Y.tail=null,Y.lastEffect=null),xo(Si,Si.current),G)break;return null;case 22:case 23:return T.lanes=0,xO(x,T,B)}return ll(x,T,B)}function Id(x){x.flags|=4}function Yc(x,T){if(x!==null&&x.child===T.child)return!0;if(T.flags&16)return!1;for(x=T.child;x!==null;){if(x.flags&12854||x.subtreeFlags&12854)return!1;x=x.sibling}return!0}var tb,nb,DS,LS;if(ve)tb=function(x,T){for(var B=T.child;B!==null;){if(B.tag===5||B.tag===6)Q(x,B.stateNode);else if(B.tag!==4&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===T)break;for(;B.sibling===null;){if(B.return===null||B.return===T)return;B=B.return}B.sibling.return=B.return,B=B.sibling}},nb=function(){},DS=function(x,T,B,G,Y){if(x=x.memoizedProps,x!==G){var te=T.stateNode,Te=Lu(Gc.current);B=oe(te,B,x,G,Y,Te),(T.updateQueue=B)&&Id(T)}},LS=function(x,T,B,G){B!==G&&Id(T)};else if(Re){tb=function(x,T,B,G){for(var Y=T.child;Y!==null;){if(Y.tag===5){var te=Y.stateNode;B&&G&&(te=Pu(te,Y.type,Y.memoizedProps,Y)),Q(x,te)}else if(Y.tag===6)te=Y.stateNode,B&&G&&(te=ta(te,Y.memoizedProps,Y)),Q(x,te);else if(Y.tag!==4){if(Y.tag===22&&Y.memoizedState!==null)te=Y.child,te!==null&&(te.return=Y),tb(x,Y,!0,!0);else if(Y.child!==null){Y.child.return=Y,Y=Y.child;continue}}if(Y===T)break;for(;Y.sibling===null;){if(Y.return===null||Y.return===T)return;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}};var RO=function(x,T,B,G){for(var Y=T.child;Y!==null;){if(Y.tag===5){var te=Y.stateNode;B&&G&&(te=Pu(te,Y.type,Y.memoizedProps,Y)),Wo(x,te)}else if(Y.tag===6)te=Y.stateNode,B&&G&&(te=ta(te,Y.memoizedProps,Y)),Wo(x,te);else if(Y.tag!==4){if(Y.tag===22&&Y.memoizedState!==null)te=Y.child,te!==null&&(te.return=Y),RO(x,Y,!0,!0);else if(Y.child!==null){Y.child.return=Y,Y=Y.child;continue}}if(Y===T)break;for(;Y.sibling===null;){if(Y.return===null||Y.return===T)return;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}};nb=function(x,T){var B=T.stateNode;if(!Yc(x,T)){x=B.containerInfo;var G=Xn(x);RO(G,T,!1,!1),B.pendingChildren=G,Id(T),jo(x,G)}},DS=function(x,T,B,G,Y){var te=x.stateNode,Te=x.memoizedProps;if((x=Yc(x,T))&&Te===G)T.stateNode=te;else{var qe=T.stateNode,ut=Lu(Gc.current),Pt=null;Te!==G&&(Pt=oe(qe,B,Te,G,Y,ut)),x&&Pt===null?T.stateNode=te:(te=Cr(te,Pt,B,Te,G,T,x,qe),se(te,B,G,Y,ut)&&Id(T),T.stateNode=te,x?Id(T):tb(te,T,!1,!1))}},LS=function(x,T,B,G){B!==G?(x=Lu(Na.current),B=Lu(Gc.current),T.stateNode=ee(G,x,B,T),Id(T)):T.stateNode=x.stateNode}}else nb=function(){},DS=function(){},LS=function(){};function cy(x,T){if(!qo)switch(x.tailMode){case"hidden":T=x.tail;for(var B=null;T!==null;)T.alternate!==null&&(B=T),T=T.sibling;B===null?x.tail=null:B.sibling=null;break;case"collapsed":B=x.tail;for(var G=null;B!==null;)B.alternate!==null&&(G=B),B=B.sibling;G===null?T||x.tail===null?x.tail=null:x.tail.sibling=null:G.sibling=null}}function ia(x){var T=x.alternate!==null&&x.alternate.child===x.child,B=0,G=0;if(T)for(var Y=x.child;Y!==null;)B|=Y.lanes|Y.childLanes,G|=Y.subtreeFlags&14680064,G|=Y.flags&14680064,Y.return=x,Y=Y.sibling;else for(Y=x.child;Y!==null;)B|=Y.lanes|Y.childLanes,G|=Y.subtreeFlags,G|=Y.flags,Y.return=x,Y=Y.sibling;return x.subtreeFlags|=G,x.childLanes=B,T}function g$(x,T,B){var G=T.pendingProps;switch(Xw(T),T.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ia(T),null;case 1:return ra(T.type)&&Bc(),ia(T),null;case 3:return B=T.stateNode,Zm(),Io(na),Io(rs),vt(),B.pendingContext&&(B.context=B.pendingContext,B.pendingContext=null),(x===null||x.child===null)&&(Ym(T)?Id(T):x===null||x.memoizedState.isDehydrated&&!(T.flags&256)||(T.flags|=1024,Nl!==null&&(qS(Nl),Nl=null))),nb(x,T),ia(T),null;case 5:nA(T),B=Lu(Na.current);var Y=T.type;if(x!==null&&T.stateNode!=null)DS(x,T,Y,G,B),x.ref!==T.ref&&(T.flags|=512,T.flags|=2097152);else{if(!G){if(T.stateNode===null)throw Error(s(166));return ia(T),null}if(x=Lu(Gc.current),Ym(T)){if(!pe)throw Error(s(175));x=yt(T.stateNode,T.type,T.memoizedProps,B,x,T,!Vc),T.updateQueue=x,x!==null&&Id(T)}else{var te=J(Y,G,B,x,T);tb(te,T,!1,!1),T.stateNode=te,se(te,Y,G,B,x)&&Id(T)}T.ref!==null&&(T.flags|=512,T.flags|=2097152)}return ia(T),null;case 6:if(x&&T.stateNode!=null)LS(x,T,x.memoizedProps,G);else{if(typeof G!="string"&&T.stateNode===null)throw Error(s(166));if(x=Lu(Na.current),B=Lu(Gc.current),Ym(T)){if(!pe)throw Error(s(176));if(x=T.stateNode,B=T.memoizedProps,(G=pt(x,B,T,!Vc))&&(Y=ai,Y!==null))switch(Y.tag){case 3:Vw(Y.stateNode.containerInfo,x,B,(Y.mode&1)!==0);break;case 5:zm(Y.type,Y.memoizedProps,Y.stateNode,x,B,(Y.mode&1)!==0)}G&&Id(T)}else T.stateNode=ee(G,x,B,T)}return ia(T),null;case 13:if(Io(Si),G=T.memoizedState,x===null||x.memoizedState!==null&&x.memoizedState.dehydrated!==null){if(qo&&zc!==null&&T.mode&1&&!(T.flags&128))iO(),Xm(),T.flags|=98560,Y=!1;else if(Y=Ym(T),G!==null&&G.dehydrated!==null){if(x===null){if(!Y)throw Error(s(318));if(!pe)throw Error(s(344));if(Y=T.memoizedState,Y=Y!==null?Y.dehydrated:null,!Y)throw Error(s(317));Xt(Y,T)}else Xm(),!(T.flags&128)&&(T.memoizedState=null),T.flags|=4;ia(T),Y=!1}else Nl!==null&&(qS(Nl),Nl=null),Y=!0;if(!Y)return T.flags&65536?T:null}return T.flags&128?(T.lanes=B,T):(B=G!==null,B!==(x!==null&&x.memoizedState!==null)&&B&&(T.child.flags|=8192,T.mode&1&&(x===null||Si.current&1?Gi===0&&(Gi=3):QS())),T.updateQueue!==null&&(T.flags|=4),ia(T),null);case 4:return Zm(),nb(x,T),x===null&&ke(T.stateNode.containerInfo),ia(T),null;case 10:return z0(T.type._context),ia(T),null;case 17:return ra(T.type)&&Bc(),ia(T),null;case 19:if(Io(Si),Y=T.memoizedState,Y===null)return ia(T),null;if(G=(T.flags&128)!==0,te=Y.rendering,te===null)if(G)cy(Y,!1);else{if(Gi!==0||x!==null&&x.flags&128)for(x=T.child;x!==null;){if(te=Bh(x),te!==null){for(T.flags|=128,cy(Y,!1),x=te.updateQueue,x!==null&&(T.updateQueue=x,T.flags|=4),T.subtreeFlags=0,x=B,B=T.child;B!==null;)G=B,Y=x,G.flags&=14680066,te=G.alternate,te===null?(G.childLanes=0,G.lanes=Y,G.child=null,G.subtreeFlags=0,G.memoizedProps=null,G.memoizedState=null,G.updateQueue=null,G.dependencies=null,G.stateNode=null):(G.childLanes=te.childLanes,G.lanes=te.lanes,G.child=te.child,G.subtreeFlags=0,G.deletions=null,G.memoizedProps=te.memoizedProps,G.memoizedState=te.memoizedState,G.updateQueue=te.updateQueue,G.type=te.type,Y=te.dependencies,G.dependencies=Y===null?null:{lanes:Y.lanes,firstContext:Y.firstContext}),B=B.sibling;return xo(Si,Si.current&1|2),T.child}x=x.sibling}Y.tail!==null&&si()>PA&&(T.flags|=128,G=!0,cy(Y,!1),T.lanes=4194304)}else{if(!G)if(x=Bh(te),x!==null){if(T.flags|=128,G=!0,x=x.updateQueue,x!==null&&(T.updateQueue=x,T.flags|=4),cy(Y,!0),Y.tail===null&&Y.tailMode==="hidden"&&!te.alternate&&!qo)return ia(T),null}else 2*si()-Y.renderingStartTime>PA&&B!==1073741824&&(T.flags|=128,G=!0,cy(Y,!1),T.lanes=4194304);Y.isBackwards?(te.sibling=T.child,T.child=te):(x=Y.last,x!==null?x.sibling=te:T.child=te,Y.last=te)}return Y.tail!==null?(T=Y.tail,Y.rendering=T,Y.tail=T.sibling,Y.renderingStartTime=si(),T.sibling=null,x=Si.current,xo(Si,G?x&1|2:x&1),T):(ia(T),null);case 22:case 23:return XS(),B=T.memoizedState!==null,x!==null&&x.memoizedState!==null!==B&&(T.flags|=8192),B&&T.mode&1?ul&1073741824&&(ia(T),ve&&T.subtreeFlags&6&&(T.flags|=8192)):ia(T),null;case 24:return null;case 25:return null}throw Error(s(156,T.tag))}function m$(x,T){switch(Xw(T),T.tag){case 1:return ra(T.type)&&Bc(),x=T.flags,x&65536?(T.flags=x&-65537|128,T):null;case 3:return Zm(),Io(na),Io(rs),vt(),x=T.flags,x&65536&&!(x&128)?(T.flags=x&-65537|128,T):null;case 5:return nA(T),null;case 13:if(Io(Si),x=T.memoizedState,x!==null&&x.dehydrated!==null){if(T.alternate===null)throw Error(s(340));Xm()}return x=T.flags,x&65536?(T.flags=x&-65537|128,T):null;case 19:return Io(Si),null;case 4:return Zm(),null;case 10:return z0(T.type._context),null;case 22:case 23:return XS(),null;case 24:return null;default:return null}}var uy=!1,os=!1,kS=typeof WeakSet=="function"?WeakSet:Set,gn=null;function gg(x,T){var B=x.ref;if(B!==null)if(typeof B=="function")try{B(null)}catch(G){li(x,T,G)}else B.current=null}function CA(x,T,B){try{B()}catch(G){li(x,T,G)}}var Pd=!1;function SA(x,T){for(V(x.containerInfo),gn=T;gn!==null;)if(x=gn,T=x.child,(x.subtreeFlags&1028)!==0&&T!==null)T.return=x,gn=T;else for(;gn!==null;){x=gn;try{var B=x.alternate;if(x.flags&1024)switch(x.tag){case 0:case 11:case 15:break;case 1:if(B!==null){var G=B.memoizedProps,Y=B.memoizedState,te=x.stateNode,Te=te.getSnapshotBeforeUpdate(x.elementType===x.type?G:ka(x.type,G),Y);te.__reactInternalSnapshotBeforeUpdate=Te}break;case 3:ve&&jn(x.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(qe){li(x,x.return,qe)}if(T=x.sibling,T!==null){T.return=x.return,gn=T;break}gn=x.return}return B=Pd,Pd=!1,B}function ku(x,T,B){var G=T.updateQueue;if(G=G!==null?G.lastEffect:null,G!==null){var Y=G=G.next;do{if((Y.tag&x)===x){var te=Y.destroy;Y.destroy=void 0,te!==void 0&&CA(T,B,te)}Y=Y.next}while(Y!==G)}}function cl(x,T){if(T=T.updateQueue,T=T!==null?T.lastEffect:null,T!==null){var B=T=T.next;do{if((B.tag&x)===x){var G=B.create;B.destroy=G()}B=B.next}while(B!==T)}}function EA(x){var T=x.ref;if(T!==null){var B=x.stateNode;switch(x.tag){case 5:x=k(B);break;default:x=B}typeof T=="function"?T(x):T.current=x}}function xA(x){var T=x.alternate;T!==null&&(x.alternate=null,xA(T)),x.child=null,x.deletions=null,x.sibling=null,x.tag===5&&(T=x.stateNode,T!==null&&ot(T)),x.stateNode=null,x.return=null,x.dependencies=null,x.memoizedProps=null,x.memoizedState=null,x.pendingProps=null,x.stateNode=null,x.updateQueue=null}function wA(x){return x.tag===5||x.tag===3||x.tag===4}function dy(x){e:for(;;){for(;x.sibling===null;){if(x.return===null||wA(x.return))return null;x=x.return}for(x.sibling.return=x.return,x=x.sibling;x.tag!==5&&x.tag!==6&&x.tag!==18;){if(x.flags&2||x.child===null||x.tag===4)continue e;x.child.return=x,x=x.child}if(!(x.flags&2))return x.stateNode}}function Rd(x,T,B){var G=x.tag;if(G===5||G===6)x=x.stateNode,T?et(B,x,T):j(B,x);else if(G!==4&&(x=x.child,x!==null))for(Rd(x,T,B),x=x.sibling;x!==null;)Rd(x,T,B),x=x.sibling}function FS(x,T,B){var G=x.tag;if(G===5||G===6)x=x.stateNode,T?Ie(B,x,T):W(B,x);else if(G!==4&&(x=x.child,x!==null))for(FS(x,T,B),x=x.sibling;x!==null;)FS(x,T,B),x=x.sibling}var sa=null,Dl=!1;function Od(x,T,B){for(B=B.child;B!==null;)BS(x,T,B),B=B.sibling}function BS(x,T,B){if(Br&&typeof Br.onCommitFiberUnmount=="function")try{Br.onCommitFiberUnmount(uo,B)}catch{}switch(B.tag){case 5:os||gg(B,T);case 6:if(ve){var G=sa,Y=Dl;sa=null,Od(x,T,B),sa=G,Dl=Y,sa!==null&&(Dl?it(sa,B.stateNode):je(sa,B.stateNode))}else Od(x,T,B);break;case 18:ve&&sa!==null&&(Dl?Ra(sa,B.stateNode):tr(sa,B.stateNode));break;case 4:ve?(G=sa,Y=Dl,sa=B.stateNode.containerInfo,Dl=!0,Od(x,T,B),sa=G,Dl=Y):(Re&&(G=B.stateNode.containerInfo,Y=Xn(G),ri(G,Y)),Od(x,T,B));break;case 0:case 11:case 14:case 15:if(!os&&(G=B.updateQueue,G!==null&&(G=G.lastEffect,G!==null))){Y=G=G.next;do{var te=Y,Te=te.destroy;te=te.tag,Te!==void 0&&(te&2||te&4)&&CA(B,T,Te),Y=Y.next}while(Y!==G)}Od(x,T,B);break;case 1:if(!os&&(gg(B,T),G=B.stateNode,typeof G.componentWillUnmount=="function"))try{G.props=B.memoizedProps,G.state=B.memoizedState,G.componentWillUnmount()}catch(qe){li(B,T,qe)}Od(x,T,B);break;case 21:Od(x,T,B);break;case 22:B.mode&1?(os=(G=os)||B.memoizedState!==null,Od(x,T,B),os=G):Od(x,T,B);break;default:Od(x,T,B)}}function Hs(x){var T=x.updateQueue;if(T!==null){x.updateQueue=null;var B=x.stateNode;B===null&&(B=x.stateNode=new kS),T.forEach(function(G){var Y=b$.bind(null,x,G);B.has(G)||(B.add(G),G.then(Y,Y))})}}function fc(x,T){var B=T.deletions;if(B!==null)for(var G=0;G<B.length;G++){var Y=B[G];try{var te=x,Te=T;if(ve){var qe=Te;e:for(;qe!==null;){switch(qe.tag){case 5:sa=qe.stateNode,Dl=!1;break e;case 3:sa=qe.stateNode.containerInfo,Dl=!0;break e;case 4:sa=qe.stateNode.containerInfo,Dl=!0;break e}qe=qe.return}if(sa===null)throw Error(s(160));BS(te,Te,Y),sa=null,Dl=!1}else BS(te,Te,Y);var ut=Y.alternate;ut!==null&&(ut.return=null),Y.return=null}catch(Pt){li(Y,T,Pt)}}if(T.subtreeFlags&12854)for(T=T.child;T!==null;)AA(T,x),T=T.sibling}function AA(x,T){var B=x.alternate,G=x.flags;switch(x.tag){case 0:case 11:case 14:case 15:if(fc(T,x),ws(x),G&4){try{ku(3,x,x.return),cl(3,x)}catch(on){li(x,x.return,on)}try{ku(5,x,x.return)}catch(on){li(x,x.return,on)}}break;case 1:fc(T,x),ws(x),G&512&&B!==null&&gg(B,B.return);break;case 5:if(fc(T,x),ws(x),G&512&&B!==null&&gg(B,B.return),ve){if(x.flags&32){var Y=x.stateNode;try{xt(Y)}catch(on){li(x,x.return,on)}}if(G&4&&(Y=x.stateNode,Y!=null)){var te=x.memoizedProps;if(B=B!==null?B.memoizedProps:te,G=x.type,T=x.updateQueue,x.updateQueue=null,T!==null)try{Ce(Y,T,G,B,te,x)}catch(on){li(x,x.return,on)}}}break;case 6:if(fc(T,x),ws(x),G&4&&ve){if(x.stateNode===null)throw Error(s(162));Y=x.stateNode,te=x.memoizedProps,B=B!==null?B.memoizedProps:te;try{ue(Y,B,te)}catch(on){li(x,x.return,on)}}break;case 3:if(fc(T,x),ws(x),G&4){if(ve&&pe&&B!==null&&B.memoizedState.isDehydrated)try{Pn(T.containerInfo)}catch(on){li(x,x.return,on)}if(Re){Y=T.containerInfo,te=T.pendingChildren;try{ri(Y,te)}catch(on){li(x,x.return,on)}}}break;case 4:if(fc(T,x),ws(x),G&4&&Re){te=x.stateNode,Y=te.containerInfo,te=te.pendingChildren;try{ri(Y,te)}catch(on){li(x,x.return,on)}}break;case 13:fc(T,x),ws(x),Y=x.child,Y.flags&8192&&(te=Y.memoizedState!==null,Y.stateNode.isHidden=te,!te||Y.alternate!==null&&Y.alternate.memoizedState!==null||(GS=si())),G&4&&Hs(x);break;case 22:var Te=B!==null&&B.memoizedState!==null;if(x.mode&1?(os=(B=os)||Te,fc(T,x),os=B):fc(T,x),ws(x),G&8192){if(B=x.memoizedState!==null,(x.stateNode.isHidden=B)&&!Te&&x.mode&1)for(gn=x,G=x.child;G!==null;){for(T=gn=G;gn!==null;){Te=gn;var qe=Te.child;switch(Te.tag){case 0:case 11:case 14:case 15:ku(4,Te,Te.return);break;case 1:gg(Te,Te.return);var ut=Te.stateNode;if(typeof ut.componentWillUnmount=="function"){var Pt=Te,vn=Te.return;try{var rr=Pt;ut.props=rr.memoizedProps,ut.state=rr.memoizedState,ut.componentWillUnmount()}catch(on){li(Pt,vn,on)}}break;case 5:gg(Te,Te.return);break;case 22:if(Te.memoizedState!==null){_A(T);continue}}qe!==null?(qe.return=Te,gn=qe):_A(T)}G=G.sibling}if(ve){e:if(G=null,ve)for(T=x;;){if(T.tag===5){if(G===null){G=T;try{Y=T.stateNode,B?rt(Y):dn(T.stateNode,T.memoizedProps)}catch(on){li(x,x.return,on)}}}else if(T.tag===6){if(G===null)try{te=T.stateNode,B?Bt(te):kn(te,T.memoizedProps)}catch(on){li(x,x.return,on)}}else if((T.tag!==22&&T.tag!==23||T.memoizedState===null||T===x)&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===x)break e;for(;T.sibling===null;){if(T.return===null||T.return===x)break e;G===T&&(G=null),T=T.return}G===T&&(G=null),T.sibling.return=T.return,T=T.sibling}}}break;case 19:fc(T,x),ws(x),G&4&&Hs(x);break;case 21:break;default:fc(T,x),ws(x)}}function ws(x){var T=x.flags;if(T&2){try{if(ve){e:{for(var B=x.return;B!==null;){if(wA(B)){var G=B;break e}B=B.return}throw Error(s(160))}switch(G.tag){case 5:var Y=G.stateNode;G.flags&32&&(xt(Y),G.flags&=-33);var te=dy(x);FS(x,te,Y);break;case 3:case 4:var Te=G.stateNode.containerInfo,qe=dy(x);Rd(x,qe,Te);break;default:throw Error(s(161))}}}catch(ut){li(x,x.return,ut)}x.flags&=-3}T&4096&&(x.flags&=-4097)}function TA(x,T,B){gn=x,rb(x)}function rb(x,T,B){for(var G=(x.mode&1)!==0;gn!==null;){var Y=gn,te=Y.child;if(Y.tag===22&&G){var Te=Y.memoizedState!==null||uy;if(!Te){var qe=Y.alternate,ut=qe!==null&&qe.memoizedState!==null||os;qe=uy;var Pt=os;if(uy=Te,(os=ut)&&!Pt)for(gn=Y;gn!==null;)Te=gn,ut=Te.child,Te.tag===22&&Te.memoizedState!==null?Fa(Y):ut!==null?(ut.return=Te,gn=ut):Fa(Y);for(;te!==null;)gn=te,rb(te),te=te.sibling;gn=Y,uy=qe,os=Pt}jf(x)}else Y.subtreeFlags&8772&&te!==null?(te.return=Y,gn=te):jf(x)}}function jf(x){for(;gn!==null;){var T=gn;if(T.flags&8772){var B=T.alternate;try{if(T.flags&8772)switch(T.tag){case 0:case 11:case 15:os||cl(5,T);break;case 1:var G=T.stateNode;if(T.flags&4&&!os)if(B===null)G.componentDidMount();else{var Y=T.elementType===T.type?B.memoizedProps:ka(T.type,B.memoizedProps);G.componentDidUpdate(Y,B.memoizedState,G.__reactInternalSnapshotBeforeUpdate)}var te=T.updateQueue;te!==null&&cO(T,te,G);break;case 3:var Te=T.updateQueue;if(Te!==null){if(B=null,T.child!==null)switch(T.child.tag){case 5:B=k(T.child.stateNode);break;case 1:B=T.child.stateNode}cO(T,Te,B)}break;case 5:var qe=T.stateNode;B===null&&T.flags&4&&he(qe,T.type,T.memoizedProps,T);break;case 6:break;case 4:break;case 12:break;case 13:if(pe&&T.memoizedState===null){var ut=T.alternate;if(ut!==null){var Pt=ut.memoizedState;if(Pt!==null){var vn=Pt.dehydrated;vn!==null&&an(vn)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}os||T.flags&512&&EA(T)}catch(rr){li(T,T.return,rr)}}if(T===x){gn=null;break}if(B=T.sibling,B!==null){B.return=T.return,gn=B;break}gn=T.return}}function _A(x){for(;gn!==null;){var T=gn;if(T===x){gn=null;break}var B=T.sibling;if(B!==null){B.return=T.return,gn=B;break}gn=T.return}}function Fa(x){for(;gn!==null;){var T=gn;try{switch(T.tag){case 0:case 11:case 15:var B=T.return;try{cl(4,T)}catch(ut){li(T,B,ut)}break;case 1:var G=T.stateNode;if(typeof G.componentDidMount=="function"){var Y=T.return;try{G.componentDidMount()}catch(ut){li(T,Y,ut)}}var te=T.return;try{EA(T)}catch(ut){li(T,te,ut)}break;case 5:var Te=T.return;try{EA(T)}catch(ut){li(T,Te,ut)}}}catch(ut){li(T,T.return,ut)}if(T===x){gn=null;break}var qe=T.sibling;if(qe!==null){qe.return=T.return,gn=qe;break}gn=T.return}}var hy=0,$S=1,HS=2,US=3,fy=4;if(typeof Symbol=="function"&&Symbol.for){var ob=Symbol.for;hy=ob("selector.component"),$S=ob("selector.has_pseudo_class"),HS=ob("selector.role"),US=ob("selector.test_id"),fy=ob("selector.text")}function mg(x){var T=Be(x);if(T!=null){if(typeof T.memoizedProps["data-testname"]!="string")throw Error(s(364));return T}if(x=Se(x),x===null)throw Error(s(362));return x.stateNode.current}function zS(x,T){switch(T.$$typeof){case hy:if(x.type===T.value)return!0;break;case $S:e:{T=T.value,x=[x,0];for(var B=0;B<x.length;){var G=x[B++],Y=x[B++],te=T[Y];if(G.tag!==5||!_e(G)){for(;te!=null&&zS(G,te);)Y++,te=T[Y];if(Y===T.length){T=!0;break e}else for(G=G.child;G!==null;)x.push(G,Y),G=G.sibling}}T=!1}return T;case HS:if(x.tag===5&&Oe(x.stateNode,T.value))return!0;break;case fy:if((x.tag===5||x.tag===6)&&(x=Ue(x),x!==null&&0<=x.indexOf(T.value)))return!0;break;case US:if(x.tag===5&&(x=x.memoizedProps["data-testname"],typeof x=="string"&&x.toLowerCase()===T.value.toLowerCase()))return!0;break;default:throw Error(s(365))}return!1}function IA(x){switch(x.$$typeof){case hy:return"<"+(P(x.value)||"Unknown")+">";case $S:return":has("+(IA(x)||"")+")";case HS:return'[role="'+x.value+'"]';case fy:return'"'+x.value+'"';case US:return'[data-testname="'+x.value+'"]';default:throw Error(s(365))}}function OO(x,T){var B=[];x=[x,0];for(var G=0;G<x.length;){var Y=x[G++],te=x[G++],Te=T[te];if(Y.tag!==5||!_e(Y)){for(;Te!=null&&zS(Y,Te);)te++,Te=T[te];if(te===T.length)B.push(Y);else for(Y=Y.child;Y!==null;)x.push(Y,te),Y=Y.sibling}}return B}function yg(x,T){if(!be)throw Error(s(363));x=mg(x),x=OO(x,T),T=[],x=Array.from(x);for(var B=0;B<x.length;){var G=x[B++];if(G.tag===5)_e(G)||T.push(G.stateNode);else for(G=G.child;G!==null;)x.push(G),G=G.sibling}return T}var y$=Math.ceil,VS=a.ReactCurrentDispatcher,ib=a.ReactCurrentOwner,Fi=a.ReactCurrentBatchConfig,Ir=0,Us=null,is=null,zs=0,ul=0,py=lc(0),Gi=0,gy=null,qf=0,sb=0,my=0,ab=null,dl=null,GS=0,PA=1/0,Nd=null;function yy(){PA=si()+500}var vy=!1,WS=null,Md=null,jS=!1,Dd=null,cr=0,lb=0,RA=null,Yf=-1,cb=0;function Ba(){return Ir&6?si():Yf!==-1?Yf:Yf=si()}function Xf(x){return x.mode&1?Ir&2&&zs!==0?zs&-zs:sO.transition!==null?(cb===0&&(cb=An()),cb):(x=Bn,x!==0?x:Ne()):1}function Ei(x,T,B,G){if(50<lb)throw lb=0,RA=null,Error(s(185));At(x,B,G),(!(Ir&2)||x!==Us)&&(x===Us&&(!(Ir&2)&&(sb|=B),Gi===4&&ss(x,zs)),Ll(x,G),B===1&&Ir===0&&!(T.mode&1)&&(yy(),wS&&Fo()))}function Ll(x,T){var B=x.callbackNode;Qe(x,T);var G=Cd(x,x===Us?zs:0);if(G===0)B!==null&&Hc(B),x.callbackNode=null,x.callbackPriority=0;else if(T=G&-G,x.callbackPriority!==T){if(B!=null&&Hc(B),T===1)x.tag===0?d$(Hh.bind(null,x)):qw(Hh.bind(null,x)),ce?Ae(function(){!(Ir&6)&&Fo()}):uc(Mu,Fo),B=null;else{switch(bi(G)){case 1:B=Mu;break;case 4:B=Mh;break;case 16:B=jm;break;case 536870912:B=Dh;break;default:B=jm}B=LA(B,ub.bind(null,x))}x.callbackPriority=T,x.callbackNode=B}}function ub(x,T){if(Yf=-1,cb=0,Ir&6)throw Error(s(327));var B=x.callbackNode;if(zh()&&x.callbackNode!==B)return null;var G=Cd(x,x===Us?zs:0);if(G===0)return null;if(G&30||G&x.expiredLanes||T)T=by(x,G);else{T=G;var Y=Ir;Ir|=2;var te=KS();(Us!==x||zs!==T)&&(Nd=null,yy(),Ld(x,T));do try{Kf();break}catch(qe){OA(x,qe)}while(1);IS(),VS.current=te,Ir=Y,is!==null?T=0:(Us=null,zs=0,T=Gi)}if(T!==0){if(T===2&&(Y=Ut(x),Y!==0&&(G=Y,T=db(x,Y))),T===1)throw B=gy,Ld(x,0),ss(x,G),Ll(x,si()),B;if(T===6)ss(x,G);else{if(Y=x.current.alternate,!(G&30)&&!NO(Y)&&(T=by(x,G),T===2&&(te=Ut(x),te!==0&&(G=te,T=db(x,te))),T===1))throw B=gy,Ld(x,0),ss(x,G),Ll(x,si()),B;switch(x.finishedWork=Y,x.finishedLanes=G,T){case 0:case 1:throw Error(s(345));case 2:Qf(x,dl,Nd);break;case 3:if(ss(x,G),(G&130023424)===G&&(T=GS+500-si(),10<T)){if(Cd(x,0)!==0)break;if(Y=x.suspendedLanes,(Y&G)!==G){Ba(),x.pingedLanes|=x.suspendedLanes&Y;break}x.timeoutHandle=re(Qf.bind(null,x,dl,Nd),T);break}Qf(x,dl,Nd);break;case 4:if(ss(x,G),(G&4194240)===G)break;for(T=x.eventTimes,Y=-1;0<G;){var Te=31-il(G);te=1<<Te,Te=T[Te],Te>Y&&(Y=Te),G&=~te}if(G=Y,G=si()-G,G=(120>G?120:480>G?480:1080>G?1080:1920>G?1920:3e3>G?3e3:4320>G?4320:1960*y$(G/1960))-G,10<G){x.timeoutHandle=re(Qf.bind(null,x,dl,Nd),G);break}Qf(x,dl,Nd);break;case 5:Qf(x,dl,Nd);break;default:throw Error(s(329))}}}return Ll(x,si()),x.callbackNode===B?ub.bind(null,x):null}function db(x,T){var B=ab;return x.current.memoizedState.isDehydrated&&(Ld(x,T).flags|=256),x=by(x,T),x!==2&&(T=dl,dl=B,T!==null&&qS(T)),x}function qS(x){dl===null?dl=x:dl.push.apply(dl,x)}function NO(x){for(var T=x;;){if(T.flags&16384){var B=T.updateQueue;if(B!==null&&(B=B.stores,B!==null))for(var G=0;G<B.length;G++){var Y=B[G],te=Y.getSnapshot;Y=Y.value;try{if(!Du(te(),Y))return!1}catch{return!1}}}if(B=T.child,T.subtreeFlags&16384&&B!==null)B.return=T,T=B;else{if(T===x)break;for(;T.sibling===null;){if(T.return===null||T.return===x)return!0;T=T.return}T.sibling.return=T.return,T=T.sibling}}return!0}function ss(x,T){for(T&=~my,T&=~sb,x.suspendedLanes|=T,x.pingedLanes&=~T,x=x.expirationTimes;0<T;){var B=31-il(T),G=1<<B;x[B]=-1,T&=~G}}function Hh(x){if(Ir&6)throw Error(s(327));zh();var T=Cd(x,0);if(!(T&1))return Ll(x,si()),null;var B=by(x,T);if(x.tag!==0&&B===2){var G=Ut(x);G!==0&&(T=G,B=db(x,G))}if(B===1)throw B=gy,Ld(x,0),ss(x,T),Ll(x,si()),B;if(B===6)throw Error(s(345));return x.finishedWork=x.current.alternate,x.finishedLanes=T,Qf(x,dl,Nd),Ll(x,si()),null}function YS(x){Dd!==null&&Dd.tag===0&&!(Ir&6)&&zh();var T=Ir;Ir|=1;var B=Fi.transition,G=Bn;try{if(Fi.transition=null,Bn=1,x)return x()}finally{Bn=G,Fi.transition=B,Ir=T,!(Ir&6)&&Fo()}}function XS(){ul=py.current,Io(py)}function Ld(x,T){x.finishedWork=null,x.finishedLanes=0;var B=x.timeoutHandle;if(B!==we&&(x.timeoutHandle=we,fe(B)),is!==null)for(B=is.return;B!==null;){var G=B;switch(Xw(G),G.tag){case 1:G=G.type.childContextTypes,G!=null&&Bc();break;case 3:Zm(),Io(na),Io(rs),vt();break;case 5:nA(G);break;case 4:Zm();break;case 13:Io(Si);break;case 19:Io(Si);break;case 10:z0(G.type._context);break;case 22:case 23:XS()}B=B.return}if(Us=x,is=x=Fu(x.current,null),zs=ul=T,Gi=0,gy=null,my=sb=qf=0,dl=ab=null,ug!==null){for(T=0;T<ug.length;T++)if(B=ug[T],G=B.interleaved,G!==null){B.interleaved=null;var Y=G.next,te=B.pending;if(te!==null){var Te=te.next;te.next=Y,G.next=Te}B.pending=G}ug=null}return x}function OA(x,T){do{var B=is;try{if(IS(),ct.current=OS,Jm){for(var G=Fn.memoizedState;G!==null;){var Y=G.queue;Y!==null&&(Y.pending=null),G=G.next}Jm=!1}if($n=0,nr=Mr=Fn=null,W0=!1,Ma=0,ib.current=null,B===null||B.return===null){Gi=1,gy=T,is=null;break}e:{var te=x,Te=B.return,qe=B,ut=T;if(T=zs,qe.flags|=32768,ut!==null&&typeof ut=="object"&&typeof ut.then=="function"){var Pt=ut,vn=qe,rr=vn.tag;if(!(vn.mode&1)&&(rr===0||rr===11||rr===15)){var on=vn.alternate;on?(vn.updateQueue=on.updateQueue,vn.memoizedState=on.memoizedState,vn.lanes=on.lanes):(vn.updateQueue=null,vn.memoizedState=null)}var Bo=pg(Te);if(Bo!==null){Bo.flags&=-257,eb(Bo,Te,qe,te,T),Bo.mode&1&&me(te,Pt,T),T=Bo,ut=Pt;var Ro=T.updateQueue;if(Ro===null){var Fl=new Set;Fl.add(ut),T.updateQueue=Fl}else Ro.add(ut);break e}else{if(!(T&1)){me(te,Pt,T),QS();break e}ut=Error(s(426))}}else if(qo&&qe.mode&1){var aa=pg(Te);if(aa!==null){!(aa.flags&65536)&&(aa.flags|=256),eb(aa,Te,qe,te,T),Kw(ay(ut,qe));break e}}te=ut=ay(ut,qe),Gi!==4&&(Gi=2),ab===null?ab=[te]:ab.push(te),te=Te;do{switch(te.tag){case 3:te.flags|=65536,T&=-T,te.lanes|=T;var lt=ly(te,ut,T);Fh(te,lt);break e;case 1:qe=ut;var Xe=te.type,mt=te.stateNode;if(!(te.flags&128)&&(typeof Xe.getDerivedStateFromError=="function"||mt!==null&&typeof mt.componentDidCatch=="function"&&(Md===null||!Md.has(mt)))){te.flags|=65536,T&=-T,te.lanes|=T;var en=fA(te,qe,T);Fh(te,en);break e}}te=te.return}while(te!==null)}Uh(B)}catch(In){T=In,is===B&&B!==null&&(is=B=B.return);continue}break}while(1)}function KS(){var x=VS.current;return VS.current=OS,x===null?OS:x}function QS(){(Gi===0||Gi===3||Gi===2)&&(Gi=4),Us===null||!(qf&268435455)&&!(sb&268435455)||ss(Us,zs)}function by(x,T){var B=Ir;Ir|=2;var G=KS();(Us!==x||zs!==T)&&(Nd=null,Ld(x,T));do try{NA();break}catch(Y){OA(x,Y)}while(1);if(IS(),Ir=B,VS.current=G,is!==null)throw Error(s(261));return Us=null,zs=0,Gi}function NA(){for(;is!==null;)MO(is)}function Kf(){for(;is!==null&&!Nu();)MO(is)}function MO(x){var T=DA(x.alternate,x,ul);x.memoizedProps=x.pendingProps,T===null?Uh(x):is=T,ib.current=null}function Uh(x){var T=x;do{var B=T.alternate;if(x=T.return,T.flags&32768){if(B=m$(B,T),B!==null){B.flags&=32767,is=B;return}if(x!==null)x.flags|=32768,x.subtreeFlags=0,x.deletions=null;else{Gi=6,is=null;return}}else if(B=g$(B,T,ul),B!==null){is=B;return}if(T=T.sibling,T!==null){is=T;return}is=T=x}while(T!==null);Gi===0&&(Gi=5)}function Qf(x,T,B){var G=Bn,Y=Fi.transition;try{Fi.transition=null,Bn=1,DO(x,T,B,G)}finally{Fi.transition=Y,Bn=G}return null}function DO(x,T,B,G){do zh();while(Dd!==null);if(Ir&6)throw Error(s(327));B=x.finishedWork;var Y=x.finishedLanes;if(B===null)return null;if(x.finishedWork=null,x.finishedLanes=0,B===x.current)throw Error(s(177));x.callbackNode=null,x.callbackPriority=0;var te=B.lanes|B.childLanes;if(ir(x,te),x===Us&&(is=Us=null,zs=0),!(B.subtreeFlags&2064)&&!(B.flags&2064)||jS||(jS=!0,LA(jm,function(){return zh(),null})),te=(B.flags&15990)!==0,B.subtreeFlags&15990||te){te=Fi.transition,Fi.transition=null;var Te=Bn;Bn=1;var qe=Ir;Ir|=4,ib.current=null,SA(x,B),AA(B,x),q(x.containerInfo),x.current=B,TA(B),oa(),Ir=qe,Bn=Te,Fi.transition=te}else x.current=B;if(jS&&(jS=!1,Dd=x,cr=Y),te=x.pendingLanes,te===0&&(Md=null),c$(B.stateNode),Ll(x,si()),T!==null)for(G=x.onRecoverableError,B=0;B<T.length;B++)Y=T[B],G(Y.value,{componentStack:Y.stack,digest:Y.digest});if(vy)throw vy=!1,x=WS,WS=null,x;return cr&1&&x.tag!==0&&zh(),te=x.pendingLanes,te&1?x===RA?lb++:(lb=0,RA=x):lb=0,Fo(),null}function zh(){if(Dd!==null){var x=bi(cr),T=Fi.transition,B=Bn;try{if(Fi.transition=null,Bn=16>x?16:x,Dd===null)var G=!1;else{if(x=Dd,Dd=null,cr=0,Ir&6)throw Error(s(331));var Y=Ir;for(Ir|=4,gn=x.current;gn!==null;){var te=gn,Te=te.child;if(gn.flags&16){var qe=te.deletions;if(qe!==null){for(var ut=0;ut<qe.length;ut++){var Pt=qe[ut];for(gn=Pt;gn!==null;){var vn=gn;switch(vn.tag){case 0:case 11:case 15:ku(8,vn,te)}var rr=vn.child;if(rr!==null)rr.return=vn,gn=rr;else for(;gn!==null;){vn=gn;var on=vn.sibling,Bo=vn.return;if(xA(vn),vn===Pt){gn=null;break}if(on!==null){on.return=Bo,gn=on;break}gn=Bo}}}var Ro=te.alternate;if(Ro!==null){var Fl=Ro.child;if(Fl!==null){Ro.child=null;do{var aa=Fl.sibling;Fl.sibling=null,Fl=aa}while(Fl!==null)}}gn=te}}if(te.subtreeFlags&2064&&Te!==null)Te.return=te,gn=Te;else e:for(;gn!==null;){if(te=gn,te.flags&2048)switch(te.tag){case 0:case 11:case 15:ku(9,te,te.return)}var lt=te.sibling;if(lt!==null){lt.return=te.return,gn=lt;break e}gn=te.return}}var Xe=x.current;for(gn=Xe;gn!==null;){Te=gn;var mt=Te.child;if(Te.subtreeFlags&2064&&mt!==null)mt.return=Te,gn=mt;else e:for(Te=Xe;gn!==null;){if(qe=gn,qe.flags&2048)try{switch(qe.tag){case 0:case 11:case 15:cl(9,qe)}}catch(In){li(qe,qe.return,In)}if(qe===Te){gn=null;break e}var en=qe.sibling;if(en!==null){en.return=qe.return,gn=en;break e}gn=qe.return}}if(Ir=Y,Fo(),Br&&typeof Br.onPostCommitFiberRoot=="function")try{Br.onPostCommitFiberRoot(uo,x)}catch{}G=!0}return G}finally{Bn=B,Fi.transition=T}}return!1}function LO(x,T,B){T=ay(B,T),T=ly(x,T,1),x=Ad(x,T,1),T=Ba(),x!==null&&(At(x,1,T),Ll(x,T))}function li(x,T,B){if(x.tag===3)LO(x,x,B);else for(;T!==null;){if(T.tag===3){LO(T,x,B);break}else if(T.tag===1){var G=T.stateNode;if(typeof T.type.getDerivedStateFromError=="function"||typeof G.componentDidCatch=="function"&&(Md===null||!Md.has(G))){x=ay(B,x),x=fA(T,x,1),T=Ad(T,x,1),x=Ba(),T!==null&&(At(T,1,x),Ll(T,x));break}}T=T.return}}function v$(x,T,B){var G=x.pingCache;G!==null&&G.delete(T),T=Ba(),x.pingedLanes|=x.suspendedLanes&B,Us===x&&(zs&B)===B&&(Gi===4||Gi===3&&(zs&130023424)===zs&&500>si()-GS?Ld(x,0):my|=B),Ll(x,T)}function MA(x,T){T===0&&(x.mode&1?(T=$c,$c<<=1,!($c&130023424)&&($c=4194304)):T=1);var B=Ba();x=wd(x,T),x!==null&&(At(x,T,B),Ll(x,B))}function kO(x){var T=x.memoizedState,B=0;T!==null&&(B=T.retryLane),MA(x,B)}function b$(x,T){var B=0;switch(x.tag){case 13:var G=x.stateNode,Y=x.memoizedState;Y!==null&&(B=Y.retryLane);break;case 19:G=x.stateNode;break;default:throw Error(s(314))}G!==null&&G.delete(T),MA(x,B)}var DA;DA=function(x,T,B){if(x!==null)if(x.memoizedProps!==T.pendingProps||na.current)zn=!0;else{if(!(x.lanes&B)&&!(T.flags&128))return zn=!1,p$(x,T,B);zn=!!(x.flags&131072)}else zn=!1,qo&&T.flags&1048576&&Yw(T,qm,T.index);switch(T.lanes=0,T.tag){case 2:var G=T.type;MS(x,T),x=T.pendingProps;var Y=Nf(T,rs.current);cg(T,B),Y=ey(null,T,G,x,Y,B);var te=ty();return T.flags|=1,typeof Y=="object"&&Y!==null&&typeof Y.render=="function"&&Y.$$typeof===void 0?(T.tag=1,T.memoizedState=null,T.updateQueue=null,ra(G)?(te=!0,sg(T)):te=!1,T.memoizedState=Y.state!==null&&Y.state!==void 0?Y.state:null,Hf(T),Y.updater=Gf,T.stateNode=Y,Y._reactInternals=T,uA(T,G,x,B),T=gA(null,T,G,!0,te,B)):(T.tag=0,qo&&te&&sl(T),al(null,T,Y,B),T=T.child),T;case 16:G=T.elementType;e:{switch(MS(x,T),x=T.pendingProps,Y=G._init,G=Y(G._payload),T.type=G,Y=T.tag=C$(G),x=ka(G,x),Y){case 0:T=pA(null,T,G,x,B);break e;case 1:T=AO(null,T,G,x,B);break e;case 11:T=SO(null,T,G,x,B);break e;case 14:T=EO(null,T,G,ka(G.type,x),B);break e}throw Error(s(306,G,""))}return T;case 0:return G=T.type,Y=T.pendingProps,Y=T.elementType===G?Y:ka(G,Y),pA(x,T,G,Y,B);case 1:return G=T.type,Y=T.pendingProps,Y=T.elementType===G?Y:ka(G,Y),AO(x,T,G,Y,B);case 3:e:{if(_d(T),x===null)throw Error(s(387));G=T.pendingProps,te=T.memoizedState,Y=te.element,lO(x,T),dg(T,G,null,B);var Te=T.memoizedState;if(G=Te.element,pe&&te.isDehydrated)if(te={element:G,isDehydrated:!1,cache:Te.cache,pendingSuspenseBoundaries:Te.pendingSuspenseBoundaries,transitions:Te.transitions},T.updateQueue.baseState=te,T.memoizedState=te,T.flags&256){Y=ay(Error(s(423)),T),T=TO(x,T,G,B,Y);break e}else if(G!==Y){Y=ay(Error(s(424)),T),T=TO(x,T,G,B,Y);break e}else for(pe&&(zc=ii(T.stateNode.containerInfo),ai=T,qo=!0,Nl=null,Vc=!1),B=Zw(T,null,G,B),T.child=B;B;)B.flags=B.flags&-3|4096,B=B.sibling;else{if(Xm(),G===Y){T=ll(x,T,B);break e}al(x,T,G,B)}T=T.child}return T;case 5:return uO(T),x===null&&$0(T),G=T.type,Y=T.pendingProps,te=x!==null?x.memoizedProps:null,Te=Y.children,ie(G,Y)?Te=null:te!==null&&ie(G,te)&&(T.flags|=32),wO(x,T),al(x,T,Te,B),T.child;case 6:return x===null&&$0(T),null;case 13:return _O(x,T,B);case 4:return tA(T,T.stateNode.containerInfo),G=T.pendingProps,x===null?T.child=Ff(T,null,G,B):al(x,T,G,B),T.child;case 11:return G=T.type,Y=T.pendingProps,Y=T.elementType===G?Y:ka(G,Y),SO(x,T,G,Y,B);case 7:return al(x,T,T.pendingProps,B),T.child;case 8:return al(x,T,T.pendingProps.children,B),T.child;case 12:return al(x,T,T.pendingProps.children,B),T.child;case 10:e:{if(G=T.type._context,Y=T.pendingProps,te=T.memoizedProps,Te=Y.value,Ml(T,G,Te),te!==null)if(Du(te.value,Te)){if(te.children===Y.children&&!na.current){T=ll(x,T,B);break e}}else for(te=T.child,te!==null&&(te.return=T);te!==null;){var qe=te.dependencies;if(qe!==null){Te=te.child;for(var ut=qe.firstContext;ut!==null;){if(ut.context===G){if(te.tag===1){ut=kh(-1,B&-B),ut.tag=2;var Pt=te.updateQueue;if(Pt!==null){Pt=Pt.shared;var vn=Pt.pending;vn===null?ut.next=ut:(ut.next=vn.next,vn.next=ut),Pt.pending=ut}}te.lanes|=B,ut=te.alternate,ut!==null&&(ut.lanes|=B),lg(te.return,B,T),qe.lanes|=B;break}ut=ut.next}}else if(te.tag===10)Te=te.type===T.type?null:te.child;else if(te.tag===18){if(Te=te.return,Te===null)throw Error(s(341));Te.lanes|=B,qe=Te.alternate,qe!==null&&(qe.lanes|=B),lg(Te,B,T),Te=te.sibling}else Te=te.child;if(Te!==null)Te.return=te;else for(Te=te;Te!==null;){if(Te===T){Te=null;break}if(te=Te.sibling,te!==null){te.return=Te.return,Te=te;break}Te=Te.return}te=Te}al(x,T,Y.children,B),T=T.child}return T;case 9:return Y=T.type,G=T.pendingProps.children,cg(T,B),Y=hc(Y),G=G(Y),T.flags|=1,al(x,T,G,B),T.child;case 14:return G=T.type,Y=ka(G,T.pendingProps),Y=ka(G.type,Y),EO(x,T,G,Y,B);case 15:return Wf(x,T,T.type,T.pendingProps,B);case 17:return G=T.type,Y=T.pendingProps,Y=T.elementType===G?Y:ka(G,Y),MS(x,T),T.tag=1,ra(G)?(x=!0,sg(T)):x=!1,cg(T,B),fg(T,G,Y),uA(T,G,Y,B),gA(null,T,G,!0,x,B);case 19:return PO(x,T,B);case 22:return xO(x,T,B)}throw Error(s(156,T.tag))};function LA(x,T){return uc(x,T)}function kl(x,T,B,G){this.tag=x,this.key=B,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=G,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wi(x,T,B,G){return new kl(x,T,B,G)}function kA(x){return x=x.prototype,!(!x||!x.isReactComponent)}function C$(x){if(typeof x=="function")return kA(x)?1:0;if(x!=null){if(x=x.$$typeof,x===m)return 11;if(x===b)return 14}return 2}function Fu(x,T){var B=x.alternate;return B===null?(B=Wi(x.tag,T,x.key,x.mode),B.elementType=x.elementType,B.type=x.type,B.stateNode=x.stateNode,B.alternate=x,x.alternate=B):(B.pendingProps=T,B.type=x.type,B.flags=0,B.subtreeFlags=0,B.deletions=null),B.flags=x.flags&14680064,B.childLanes=x.childLanes,B.lanes=x.lanes,B.child=x.child,B.memoizedProps=x.memoizedProps,B.memoizedState=x.memoizedState,B.updateQueue=x.updateQueue,T=x.dependencies,B.dependencies=T===null?null:{lanes:T.lanes,firstContext:T.firstContext},B.sibling=x.sibling,B.index=x.index,B.ref=x.ref,B}function Vh(x,T,B,G,Y,te){var Te=2;if(G=x,typeof x=="function")kA(x)&&(Te=1);else if(typeof x=="string")Te=5;else e:switch(x){case u:return Zf(B.children,Y,te,T);case d:Te=8,Y|=8;break;case h:return x=Wi(12,B,T,Y|2),x.elementType=h,x.lanes=te,x;case y:return x=Wi(13,B,T,Y),x.elementType=y,x.lanes=te,x;case v:return x=Wi(19,B,T,Y),x.elementType=v,x.lanes=te,x;case w:return hb(B,Y,te,T);default:if(typeof x=="object"&&x!==null)switch(x.$$typeof){case f:Te=10;break e;case p:Te=9;break e;case m:Te=11;break e;case b:Te=14;break e;case S:Te=16,G=null;break e}throw Error(s(130,x==null?x:typeof x,""))}return T=Wi(Te,B,T,Y),T.elementType=x,T.type=G,T.lanes=te,T}function Zf(x,T,B,G){return x=Wi(7,x,G,T),x.lanes=B,x}function hb(x,T,B,G){return x=Wi(22,x,G,T),x.elementType=w,x.lanes=B,x.stateNode={isHidden:!1},x}function FA(x,T,B){return x=Wi(6,x,null,T),x.lanes=B,x}function ZS(x,T,B){return T=Wi(4,x.children!==null?x.children:[],x.key,T),T.lanes=B,T.stateNode={containerInfo:x.containerInfo,pendingChildren:null,implementation:x.implementation},T}function Cy(x,T,B,G,Y){this.tag=T,this.containerInfo=x,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=we,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pn(0),this.expirationTimes=pn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pn(0),this.identifierPrefix=G,this.onRecoverableError=Y,pe&&(this.mutableSourceEagerHydrationData=null)}function Sy(x,T,B,G,Y,te,Te,qe,ut){return x=new Cy(x,T,B,qe,ut),T===1?(T=1,te===!0&&(T|=8)):T=0,te=Wi(3,null,null,T),x.current=te,te.stateNode=x,te.memoizedState={element:G,isDehydrated:B,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hf(te),x}function FO(x){if(!x)return Fc;x=x._reactInternals;e:{if(O(x)!==x||x.tag!==1)throw Error(s(170));var T=x;do{switch(T.tag){case 3:T=T.stateNode.context;break e;case 1:if(ra(T.type)){T=T.stateNode.__reactInternalMemoizedMergedChildContext;break e}}T=T.return}while(T!==null);throw Error(s(171))}if(x.tag===1){var B=x.type;if(ra(B))return ES(x,B,T)}return T}function BA(x){var T=x._reactInternals;if(T===void 0)throw typeof x.render=="function"?Error(s(188)):(x=Object.keys(x).join(","),Error(s(268,x)));return x=L(T),x===null?null:x.stateNode}function $A(x,T){if(x=x.memoizedState,x!==null&&x.dehydrated!==null){var B=x.retryLane;x.retryLane=B!==0&&B<T?B:T}}function vg(x,T){$A(x,T),(x=x.alternate)&&$A(x,T)}function BO(x){return x=L(x),x===null?null:x.stateNode}function JS(){return null}return n.attemptContinuousHydration=function(x){if(x.tag===13){var T=wd(x,134217728);if(T!==null){var B=Ba();Ei(T,x,134217728,B)}vg(x,134217728)}},n.attemptDiscreteHydration=function(x){if(x.tag===13){var T=wd(x,1);if(T!==null){var B=Ba();Ei(T,x,1,B)}vg(x,1)}},n.attemptHydrationAtCurrentPriority=function(x){if(x.tag===13){var T=Xf(x),B=wd(x,T);if(B!==null){var G=Ba();Ei(B,x,T,G)}vg(x,T)}},n.attemptSynchronousHydration=function(x){switch(x.tag){case 3:var T=x.stateNode;if(T.current.memoizedState.isDehydrated){var B=Ou(T.pendingLanes);B!==0&&(Po(T,B|1),Ll(T,si()),!(Ir&6)&&(yy(),Fo()))}break;case 13:YS(function(){var G=wd(x,1);if(G!==null){var Y=Ba();Ei(G,x,1,Y)}}),vg(x,1)}},n.batchedUpdates=function(x,T){var B=Ir;Ir|=1;try{return x(T)}finally{Ir=B,Ir===0&&(yy(),wS&&Fo())}},n.createComponentSelector=function(x){return{$$typeof:hy,value:x}},n.createContainer=function(x,T,B,G,Y,te,Te){return Sy(x,T,!1,null,B,G,Y,te,Te)},n.createHasPseudoClassSelector=function(x){return{$$typeof:$S,value:x}},n.createHydrationContainer=function(x,T,B,G,Y,te,Te,qe,ut){return x=Sy(B,G,!0,x,Y,te,Te,qe,ut),x.context=FO(null),B=x.current,G=Ba(),Y=Xf(B),te=kh(G,Y),te.callback=T??null,Ad(B,te,Y),x.current.lanes=Y,At(x,Y,G),Ll(x,G),x},n.createPortal=function(x,T,B){var G=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:G==null?null:""+G,children:x,containerInfo:T,implementation:B}},n.createRoleSelector=function(x){return{$$typeof:HS,value:x}},n.createTestNameSelector=function(x){return{$$typeof:US,value:x}},n.createTextSelector=function(x){return{$$typeof:fy,value:x}},n.deferredUpdates=function(x){var T=Bn,B=Fi.transition;try{return Fi.transition=null,Bn=16,x()}finally{Bn=T,Fi.transition=B}},n.discreteUpdates=function(x,T,B,G,Y){var te=Bn,Te=Fi.transition;try{return Fi.transition=null,Bn=1,x(T,B,G,Y)}finally{Bn=te,Fi.transition=Te,Ir===0&&yy()}},n.findAllNodes=yg,n.findBoundingRects=function(x,T){if(!be)throw Error(s(363));T=yg(x,T),x=[];for(var B=0;B<T.length;B++)x.push(Pe(T[B]));for(T=x.length-1;0<T;T--){B=x[T];for(var G=B.x,Y=G+B.width,te=B.y,Te=te+B.height,qe=T-1;0<=qe;
434qe--)if(T!==qe){var ut=x[qe],Pt=ut.x,vn=Pt+ut.width,rr=ut.y,on=rr+ut.height;if(G>=Pt&&te>=rr&&Y<=vn&&Te<=on){x.splice(T,1);break}else if(G!==Pt||B.width!==ut.width||on<te||rr>Te){if(!(te!==rr||B.height!==ut.height||vn<G||Pt>Y)){Pt>G&&(ut.width+=Pt-G,ut.x=G),vn<Y&&(ut.width=Y-Pt),x.splice(T,1);break}}else{rr>te&&(ut.height+=rr-te,ut.y=te),on<Te&&(ut.height=Te-rr),x.splice(T,1);break}}}return x},n.findHostInstance=BA,n.findHostInstanceWithNoPortals=function(x){return x=M(x),x=x!==null?$(x):null,x===null?null:x.stateNode},n.findHostInstanceWithWarning=function(x){return BA(x)},n.flushControlled=function(x){var T=Ir;Ir|=1;var B=Fi.transition,G=Bn;try{Fi.transition=null,Bn=1,x()}finally{Bn=G,Fi.transition=B,Ir=T,Ir===0&&(yy(),Fo())}},n.flushPassiveEffects=zh,n.flushSync=YS,n.focusWithin=function(x,T){if(!be)throw Error(s(363));for(x=mg(x),T=OO(x,T),T=Array.from(T),x=0;x<T.length;){var B=T[x++];if(!_e(B)){if(B.tag===5&&ze(B.stateNode))return!0;for(B=B.child;B!==null;)T.push(B),B=B.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Bn},n.getFindAllNodesFailureDescription=function(x,T){if(!be)throw Error(s(363));var B=0,G=[];x=[mg(x),0];for(var Y=0;Y<x.length;){var te=x[Y++],Te=x[Y++],qe=T[Te];if((te.tag!==5||!_e(te))&&(zS(te,qe)&&(G.push(IA(qe)),Te++,Te>B&&(B=Te)),Te<T.length))for(te=te.child;te!==null;)x.push(te,Te),te=te.sibling}if(B<T.length){for(x=[];B<T.length;B++)x.push(IA(T[B]));return`findAllNodes was able to match part of the selector: 435 `+(G.join(" > ")+` 436 437No matching component was found for: 438 `)+x.join(" > ")}return null},n.getPublicRootInstance=function(x){if(x=x.current,!x.child)return null;switch(x.child.tag){case 5:return k(x.child.stateNode);default:return x.child.stateNode}},n.injectIntoDevTools=function(x){if(x={bundleType:x.bundleType,version:x.version,rendererPackageName:x.rendererPackageName,rendererConfig:x.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:BO,findFiberByHostInstance:x.findFiberByHostInstance||JS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")x=!1;else{var T=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(T.isDisabled||!T.supportsFiber)x=!0;else{try{uo=T.inject(x),Br=T}catch{}x=!!T.checkDCE}}return x},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(x,T,B,G){if(!be)throw Error(s(363));x=yg(x,T);var Y=ne(x,B,G).disconnect;return{disconnect:function(){Y()}}},n.registerMutableSourceForHydration=function(x,T){var B=T._getVersion;B=B(T._source),x.mutableSourceEagerHydrationData==null?x.mutableSourceEagerHydrationData=[T,B]:x.mutableSourceEagerHydrationData.push(T,B)},n.runWithPriority=function(x,T){var B=Bn;try{return Bn=x,T()}finally{Bn=B}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(x,T,B,G){var Y=T.current,te=Ba(),Te=Xf(Y);return B=FO(B),T.context===null?T.context=B:T.pendingContext=B,T=kh(te,Te),T.payload={element:x},G=G===void 0?null:G,G!==null&&(T.callback=G),x=Ad(Y,T,Te),x!==null&&(Ei(x,Y,Te,te),V0(x,Y,Te)),Te},n};Uge.exports=QSt;var ZSt=Uge.exports;const JSt=ud(ZSt);var zge={exports:{}},hS={};/** 439 * @license React 440 * react-reconciler-constants.production.min.js 441 * 442 * Copyright (c) Facebook, Inc. and its affiliates. 443 * 444 * This source code is licensed under the MIT license found in the 445 * LICENSE file in the root directory of this source tree. 446 */hS.ConcurrentRoot=1;hS.ContinuousEventPriority=4;hS.DefaultEventPriority=16;hS.DiscreteEventPriority=1;hS.IdleEventPriority=536870912;hS.LegacyRoot=0;zge.exports=hS;var Vge=zge.exports;const yee={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let vee=!1,bee=!1;const z6=".react-konva-event",eEt=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. 447Position of a node will be changed during drag&drop, so you should update state of the react app as well. 448Consider to add onDragMove or onDragEnd events. 449For more info see: https://github.com/konvajs/react-konva/issues/256 450`,tEt=`ReactKonva: You are using "zIndex" attribute for a Konva node. 451react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. 452For more info see: https://github.com/konvajs/react-konva/issues/194 453`,nEt={};function mB(t,e,n=nEt){if(!vee&&"zIndex"in e&&(console.warn(tEt),vee=!0),!bee&&e.draggable){var r=e.x!==void 0||e.y!==void 0,o=e.onDragEnd||e.onDragMove;r&&!o&&(console.warn(eEt),bee=!0)}for(var i in n)if(!yee[i]){var s=i.slice(0,2)==="on",a=n[i]!==e[i];if(s&&a){var l=i.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t.off(l,n[i])}var c=!e.hasOwnProperty(i);c&&t.setAttr(i,void 0)}var u=e._useStrictMode,d={},h=!1;const f={};for(var i in e)if(!yee[i]){var s=i.slice(0,2)==="on",p=n[i]!==e[i];if(s&&p){var l=i.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e[i]&&(f[l]=e[i])}!s&&(e[i]!==n[i]||u&&e[i]!==t.getAttr(i))&&(h=!0,d[i]=e[i])}h&&(t.setAttrs(d),I0(t));for(var l in f)t.on(l+z6,f[l])}function I0(t){if(!Cn.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}const Gge={},rEt={};BC.Node.prototype._applyProps=mB;function oEt(t,e){if(typeof e=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);return}t.add(e),I0(t)}function iEt(t,e,n){let r=BC[t];r||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=BC.Group);const o={},i={};for(var s in e){var a=s.slice(0,2)==="on";a?i[s]=e[s]:o[s]=e[s]}const l=new r(o);return mB(l,i),l}function sEt(t,e,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function aEt(t,e,n){return!1}function lEt(t){return t}function cEt(){return null}function uEt(){return null}function dEt(t,e,n,r){return rEt}
453function hEt(){}function fEt(t){}function pEt(t,e){return!1}function gEt(){return Gge}function mEt(){return Gge}const yEt=setTimeout,vEt=clearTimeout,bEt=-1;function CEt(t,e){return!1}const SEt=!1,EEt=!0,xEt=!0;function wEt(t,e){e.parent===t?e.moveToTop():t.add(e),I0(t)}function AEt(t,e){e.parent===t?e.moveToTop():t.add(e),I0(t)}function Wge(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),I0(t)}function TEt(t,e,n){Wge(t,e,n)}function _Et(t,e){e.destroy(),e.off(z6),I0(t)}function IEt(t,e){e.destroy(),e.off(z6),I0(t)}function PEt(t,e,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function REt(t,e,n){}function OEt(t,e,n,r,o){mB(t,o,r)}function NEt(t){t.hide(),I0(t)}function MEt(t){}function DEt(t,e){(e.visible==null||e.visible)&&t.show()}function LEt(t,e){}function kEt(t){}function FEt(){}const BEt=()=>Vge.DefaultEventPriority,$Et=Object.freeze(Object.defineProperty({__proto__:null,appendChild:wEt,appendChildToContainer:AEt,appendInitialChild:oEt,cancelTimeout:vEt,clearContainer:kEt,commitMount:REt,commitTextUpdate:PEt,commitUpdate:OEt,createInstance:iEt,createTextInstance:sEt,detachDeletedInstance:FEt,finalizeInitialChildren:aEt,getChildHostContext:mEt,getCurrentEventPriority:BEt,getPublicInstance:lEt,getRootHostContext:gEt,hideInstance:NEt,hideTextInstance:MEt,idlePriority:h_.unstable_IdlePriority,insertBefore:Wge,insertInContainerBefore:TEt,isPrimaryRenderer:SEt,noTimeout:bEt,now:h_.unstable_now,prepareForCommit:cEt,preparePortalMount:uEt,prepareUpdate:dEt,removeChild:_Et,removeChildFromContainer:IEt,resetAfterCommit:hEt,resetTextContent:fEt,run:h_.unstable_runWithPriority,scheduleTimeout:yEt,shouldDeprioritizeSubtree:pEt,shouldSetTextContent:CEt,supportsMutation:xEt,unhideInstance:DEt,unhideTextInstance:LEt,warnsIfNotActing:EEt},Symbol.toStringTag,{value:"Module"}));var HEt=Object.defineProperty,UEt=Object.defineProperties,zEt=Object.getOwnPropertyDescriptors,Cee=Object.getOwnPropertySymbols,VEt=Object.prototype.hasOwnProperty,GEt=Object.prototype.propertyIsEnumerable,See=(t,e,n)=>e in t?HEt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eee=(t,e)=>{for(var n in e||(e={}))VEt.call(e,n)&&See(t,n,e[n]);if(Cee)for(var n of Cee(e))GEt.call(e,n)&&See(t,n,e[n]);return t},WEt=(t,e)=>UEt(t,zEt(e)),xee,wee;typeof window<"u"&&((xee=window.document)!=null&&xee.createElement||((wee=window.navigator)==null?void 0:wee.product)==="ReactNative")?C.useLayoutEffect:C.useEffect;function jge(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=e?t.return:t.child;for(;r;){const o=jge(r,e,n);if(o)return o;r=e?null:r.sibling}}function qge(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const Aee=console.error;console.error=function(){const t=[...arguments].join("");if(t?.startsWith("Warning:")&&t.includes("useContext")){console.error=Aee;return}return Aee.apply(this,arguments)};const V6=qge(C.createContext(null));class Yge extends C.Component{render(){return C.createElement(V6.Provider,{value:this._reactInternals},this.props.children)}}function jEt(){const t=C.useContext(V6);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=C.useId();return C.useMemo(()=>{for(const r of[t,t?.alternate]){if(!r)continue;const o=jge(r,!1,i=>{let s=i.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(o)return o}},[t,e])}function qEt(){const t=jEt(),[e]=C.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const o=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;o&&o!==V6&&!e.has(o)&&e.set(o,C.useContext(qge(o)))}n=n.return}return e}function YEt(){const t=qEt();return C.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>C.createElement(e,null,C.createElement(n.Provider,WEt(Eee({},r),{value:t.get(n)}))),e=>C.createElement(Yge,Eee({},e))),[t])}function XEt(t){const e=qt.useRef({});return qt.useLayoutEffect(()=>{e.current=t}),qt.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}const KEt=t=>{const e=qt.useRef(),n=qt.useRef(),r=qt.useRef(),o=XEt(t),i=YEt(),s=a=>{const{forwardedRef:l}=t;l&&(typeof l=="function"?l(a):l.current=a)};return qt.useLayoutEffect(()=>
453(n.current=new BC.Stage({width:t.width,height:t.height,container:e.current}),s(n.current),r.current=n_.createContainer(n.current,Vge.LegacyRoot,!1,null),n_.updateContainer(qt.createElement(i,{},t.children),r.current),()=>{BC.isBrowser&&(s(null),n_.updateContainer(null,r.current,null),n.current.destroy())}),[]),qt.useLayoutEffect(()=>{s(n.current),mB(n.current,t,o),n_.updateContainer(qt.createElement(i,{},t.children),r.current,null)}),qt.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},Xge="Layer",fu="Group",yh="Rect",Em="Circle",Yv="Line",Yy="Text",n_=JSt($Et);n_.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:qt.version,rendererPackageName:"react-konva"});const QEt=qt.forwardRef((t,e)=>qt.createElement(Yge,{},qt.createElement(KEt,{...t,forwardedRef:e}))),ZEt=({pan:t,scale:e,blockSize:n=Ve.gridBlockSize,stage:r})=>{const{gridComponents:o,width:i,height:s,x:a,y:l}=C.useMemo(()=>{const c=Math.floor((-t.x-r.width)/e/n)*n,u=Math.floor((-t.x+r.width*1.5)/e/n)*n,d=Math.floor((-t.y-r.height)/e/n)*n,h=Math.floor((-t.y+r.height*1.5)/e/n)*n,f=[];for(let p=c;p<u;p+=n)f.push(g(Yv,{points:[p,d,p,h],strokeWidth:.2,stroke:"grey",listening:!1},`${p}-${d}-${p}-${h}`));for(let p=d;p<h;p+=n)f.push(g(Yv,{points:[c,p,u,p],strokeWidth:.2,stroke:"grey",listening:!1},`${c}-${p}-${u}-${p}`));return{gridComponents:f,x:c,y:d,width:-c+u,height:-d+h}},[t.x,t.y,e]);return K(Xge,{draggable:!1,imageSmoothingEnabled:!1,listening:!1,children:[g(yh,{width:i,height:s,x:a,y:l,fill:"rgb(238,241,245)",listening:!1}),o]})},Tb=22,JEt=g(Em,{x:Ve.gridBlockSize/2,y:Ve.gridBlockSize/2,radius:Tb,fill:"white"}),e1t=t=>K(gr,{children:[g(yh,{width:Tb,height:Tb,x:Ve.gridBlockSize/4+3,y:Ve.gridBlockSize/4+3,fill:"white"}),g(yh,{width:Tb,height:Tb,x:Ve.gridBlockSize/2,y:Ve.gridBlockSize/2,fill:"white"}),g(Em,{x:Ve.gridBlockSize/2,y:Ve.gridBlockSize/2,radius:Tb,fillOpacity:100,stroke:"white"}),g(Em,{x:Ve.gridBlockSize/2,y:Ve.gridBlockSize/2,radius:Tb+Ve.gridBlockSize/20,stroke:t,strokeWidth:Ve.gridBlockSize/10,fillOpacity:100})]}),t1t=({protocol:t,colorFill:e=""})=>{let n=JEt;return t===wt.SEC&&(n=e1t(e)),n},yB="#F2F7FA",vB="doubleMesh",bB="#DDD",CB="#CCC",Xv=1,fS=4,Kv="#00e0e0",Zc={targetMainColor:"#00859b",targetHoverColor:"#339daf",targetSelectedColor:"#006a7c",defaultTargetMainColor:"#149696",defaultTargetHoverColor:"#339daf",defaultTargetSelectedColor:"#006a7c"},n1t=({component:t,connected:e,selected:n,editorMode:r,onGroupMouseDown:o,onDragEnd:i,mouseDownHandler:s,mouseUpHandler:a,showConnectionContextMenu:l,fetchedComponents:c})=>{const[u,d]=C.useState(!1),[h,f]=C.useState(Zc.targetMainColor),[p,m]=C.useState(Zc.targetMainColor),y=g(t1t,{protocol:t.parameters.bus.protocol,colorFill:h});return C.useEffect(()=>{wt.SEC===t.parameters.bus.protocol?u?f(Zc.defaultTargetHoverColor):n?(f(Zc.defaultTargetSelectedColor),m(Zc.defaultTargetSelectedColor)):(f(Zc.defaultTargetMainColor),m(Zc.defaultTargetMainColor)):u?f(Zc.targetHoverColor):n?(f(Zc.targetSelectedColor),m(Zc.targetSelectedColor)):(f(Zc.targetMainColor),m(Zc.targetMainColor))},[n,u]),K(fu,{id:t.id,elementId:t.id,elementType:Kt.componentTypes.targets,x:t.coordinates.x,y:t.coordinates.y,draggable:!r?.propKey,onMouseDown:v=>o&&o({elementId:t.id,elementType:t.type}),onDragEnd:v=>i&&i({elementId:t.id,elementType:t.type,tempInclude:!1}),children:[K(fu,{elementId:t.id,elementType:Kt.componentTypes.targets,onMouseEnter:v=>{if(!(r&&(r.propKey==="initiators"||r.propKey==="routers"&&r.portType==="inGress"||r.propKey==="targets"||r.propId===t.id))){const S=v.target.getStage();if(S){const w=S.container();w.style.cursor="pointer"}d(!0)}},onMouseLeave:v=>{const b=v.target.getStage();if(b){const S=b.container();S.style.cursor="default"}u&&d(!1)},onMouseDown:v=>{s&&s({...Ap,e:v,propKey:t.type,propId:t.id})},onMouseUp:v=>{a&&a({...Ap,e:v,propKey:t.type,propId:t.id})},onContextMenu:v=>{const b=Uo();l({e:v,id:t.id,type:t.type,elementType:Kt.elementTypes.components,hasDelete:!1,createRouter:st.getCreatingComponent({type:Kt.componentTypes.routers,initialCoordinates:{x:t.coordinates.x-Cv-Zu[Kt.componentTypes.routers].size.width,y:t.coordinates.y-Ve.gridBlockSize},id:b,components:c}),disabledCreateRouter:e,routerConnection:st.getCreatingComponentConnection({type:pi.TARGETS,creatingComponentId:t.id,creatingComponentPort:0,presetComponentId:b})})},children:[g(yh,{elementId:t.id,elementType:Kt.componentTypes.targets,fill:h,width:Ve.gridBlockSize,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,y:Ve.routerStrokeWidth/4,strokeWidth:Ve.routerStrokeWidth/2,stroke:h,cornerRadius:[Ve.routerCornerRadius,0,0,Ve.routerCornerRadius]}),y,g(Em,{x:-Ve.routerStrokeWidth/2,y:Ve.gridBlockSize/2,radius:Ve.portCircleRadius,opacity:u?.85:1,fill:e||n?Zc.targetSelectedColor:"white",stroke:n?"white":Zc.targetSelectedColor,strokeWidth:Ve.portCircleRadius/2})]}),K(fu,{x:Ve.gridBlockSize,onMouseEnter:v=>{const b=v.target.getStage();if(b){const S=b.container();S.style.cursor="grab"}},onMouseLeave:v=>{const b=v.target.getStage();if(b){const S=b.container();S.style.cursor="default"}},onContextMenu:v=>l({e:v,id:t.id,type:t.type,elementType:Kt.elementTypes.components}),children:[g(yh,{elementId:t.id,elementType:Kt.componentTypes.targets,fill:"white",width:t.size.nameSize.width-Ve.routerStrokeWidth/2,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,y:Ve.routerStrokeWidth/4,strokeWidth:Ve.routerStrokeWidth/2,stroke:p,cornerRadius:[0,Ve.routerCornerRadius,Ve.routerCornerRadius,0]}),g(Yy,{text:`${t.name}`,align:"center",listening:!1,y:Ve.gridBlockSize/2-Ve.nameFontSize/2,width:t.size.nameSize.width,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,fontSize:Ve.nameFontSize})]})]},t.id)},r1t=({component:t,connectionIndexes:e={ingressIds:{},egressIds:{}},selected:n,editorMode:r,onGroupMouseDown:o,onDragEnd:i,mouseDownHandler:s,mouseUpHandler:a,showConnectionContextMenu:l,color:c,fetchedComponents:u})=>{const[d,h]=C.useState(NH),{themeColors:f}=Lc(),p=t.parameters.ports.inGress.length,m=t.parameters.ports.eGress.length,y=t.size.nameSize.height,v=t.size.height/p,b=t.size.height/m,{main:S,darker:w,lighter:A}=Eo.getDarkerLighterHexColors(c??"#1257fd");return K(fu,{id:t.id,x:t.coordinates.x,y:t.coordinates.y,draggable:!r?.propKey,onMouseDown:_=>o&&o({elementId:t.id,elementType:t.type}),onDragEnd:_=>i&&i({elementId:t.id,elementType:t.type,tempInclude:!1}),children:[K(fu,{onContextMenu:_=>l({e:_,id:t.id,type:t.type,elementType:Kt.elementTypes.components}),children:[g(yh,{elementId:t.id,elementType:Fe.ROUTERS,fill:n?w:S,width:t.size.width,height:t.size.height+t.size.nameSize.height,strokeWidth:Ve.routerStrokeWidth,stroke:n?w:S,cornerRadius:Ve.routerCornerRadius,onMouseLeave:_=>{const P=_.target.getStage();if(P){const R=P.container();R.style.cursor="default"}},onMouseEnter:_=>{const P=_.target.getStage();if(P){const R=P.container();R.style.cursor="grab"}}}),g(Yy,{fill:"white",text:`${t.name}`,align:"center",listening:!1,verticalAlign:"middle",width:t.size.width*.8,height:t.size.nameSize.height,x:t.size.width*.2/2,fontSize:Ve.nameFontSize,onMouseEnter:_=>{const P=_.target.getStage();if(P){const R=P.container();R.style.cursor="grab"}}})]}),t.parameters.ports.inGress.map((_,P)=>{const R=e.ingressIds[t.id]&&e.ingressIds[t.id].has(P),O=e.ingressIds[t.id]&&!R&&[...e.ingressIds[t.id]].some(L=>L>P);let N=R?n?w:S:"white";d.id===_.id&&(N=f.designBlue[200]);const M=r&&(r.propKey==="routers"&&r.portType==="inGress"||r.propKey==="targets"||r.propId===t.id);return M&&(N=R?n?w:S:"white"),K(fu,{x:Ve.routerStrokeWidth/2,y:y+v*P,onMouseEnter:L=>{if(!M){const F=L.target.getStage();if(F){const $=F.container();$.style.cursor="pointer"}h({id:_.id,message:O?`Skipped Port! (${P})`:""})}},onMouseLeave:L=>{const F=L.target.getStage();if(F){const $=F.container();$.style.cursor="default"}d.id&&h({...NH})},onMouseDown:L=>{s&&s({e:L,propKey:t.type,propId:t.id,portType:"inGress",portIdx:P,portId:_.id})},onMouseUp:L=>{a&&a({e:L,propKey:t.type,propId:t.id,portType:"inGress",portIdx:P,portId:_.id})},onContextMenu:L=>{const F=Uo();l({e:L,id:t.id,type:t.type,elementType:Kt.elementTypes.components,hasDelete:!1,createRouter:st.getCreatingComponent({type:Fe.ROUTERS,initialCoordinates:{x:t.coordinates.x-CL-Zu[Fe.ROUTERS].size.width,y:t.coordinates.y+P*Ve.gridBlockSize},id:F,components:u}),isCreateRouterMenuDisabled:R,routerConnection:st.getCreatingComponentConnection({type:pi.ROUTERS,creatingComponentId:t.id,creatingComponentPort:P,presetComponentId:F,presentComponentPort:0}),createInitiator:st.getCreatingComponent({type:Fe.INITIATORS,initialCoordinates:{x:t.coordinates.x-Zu[Fe.INITIATORS].size.nameSize.width-Ve.gridBlockSize-Cv,y:t.coordinates.y+t.size.nameSize.height+P*Ve.gridBlockSize},id:F,components:u}),isCreateInitiatorMenuDisabled:R,initiatorConnection:st.getCreatingComponentConnection({type:pi.INITIATORS,creatingComponentId:F,presetComponentId:t.id,presentComponentPort:P})})},children:[g(yh,{fill:N,elementId:t.id,elementType:Fe.ROUTERS,width:t.size.width/2-Ve.routerStrokeWidth,height:v+(P!==p-1?2:0)-Ve.routerStrokeWidth/2,cornerRadius:[0,0,0,P===p-1?Ve.routerCornerRadius:0]}),g(Em,{x:-Ve.routerStrokeWidth,y:v/2,radius:Ve.portCircleRadius,fill:R||n?w:"white",stroke:O?"red":n?"white":w,strokeWidth:Ve.portCircleRadius/2}),g(Yy,{text:`i ${P}`,fill:R?"white":n?w:S,verticalAlign:"center",listening:!1,x:t.size.width/10,y:v/2-Ve.portFontSize/2,width:t.size.width/2,fontSize:Ve.portFontSize}),d.id===_.id&&!M?g(Yy,{text:d.message,align:"center",listening:!1,x:-Ve.gridBlockSize*1.5,y:v/2-Ve.skippedPortFontSize/2,width:Ve.gridBlockSize*1.5,fontSize:Ve.skippedPortFontSize}):null]}
453,_.id)}),t.parameters.ports.eGress.map((_,P)=>{const R=e.egressIds[t.id]&&e.egressIds[t.id].has(P),O=e.egressIds[t.id]&&!R&&[...e.egressIds[t.id]].some(L=>L>P);let N=R?n?w:S:"white";d.id===_.id&&(N=A);const M=r&&(r.propKey==="routers"&&r.portType==="eGress"||r.propKey==="initiators"||r.propId===t.id);return M&&(N=R?n?w:S:"white"),K(fu,{x:t.size.width/2-Ve.routerStrokeWidth/2,y:y+b*P,onMouseEnter:L=>{if(!M){const F=L.target.getStage();if(F){const $=F.container();$.style.cursor="pointer"}h({id:_.id,message:O?`Skipped Port! (${P})`:""})}},onMouseLeave:L=>{const F=L.target.getStage();if(F){const $=F.container();$.style.cursor="default"}d.id&&h({...NH})},onMouseDown:L=>{s&&s({e:L,propKey:t.type,propId:t.id,portType:"eGress",portIdx:P,portId:_.id})},onMouseUp:L=>{a&&a({e:L,propKey:t.type,propId:t.id,portType:"eGress",portIdx:P,portId:_.id})},onContextMenu:L=>{const F=Uo();l({e:L,id:t.id,type:t.type,elementType:Kt.elementTypes.components,hasDelete:!1,createRouter:st.getCreatingComponent({type:Fe.ROUTERS,initialCoordinates:{x:t.coordinates.x+CL+Zu[Fe.ROUTERS].size.width,y:t.coordinates.y+P*Ve.gridBlockSize},id:F,components:u}),isCreateRouterMenuDisabled:R,routerConnection:st.getCreatingComponentConnection({type:pi.ROUTERS,creatingComponentId:F,creatingComponentPort:0,presetComponentId:t.id,presentComponentPort:P}),createTarget:st.getCreatingComponent({type:Fe.TARGETS,initialCoordinates:{x:t.coordinates.x+t.size.width+Cv,y:t.coordinates.y+t.size.nameSize.height+P*Ve.gridBlockSize},id:F,components:u}),isCreateTargetMenuDisabled:R,createDefaultTarget:P===0&&st.getCreatingComponent({type:Yt.DEFAULT_TARGET,initialCoordinates:{x:t.coordinates.x+t.size.width+Cv,y:t.coordinates.y+t.size.nameSize.height+P*Ve.gridBlockSize},id:F,components:u}),isCreateDefaultTargetMenuDisabled:R,targetConnection:st.getCreatingComponentConnection({type:pi.TARGETS,creatingComponentId:F,presetComponentId:t.id,presentComponentPort:P})})},children:[g(yh,{fill:N,elementId:t.id,elementType:Fe.ROUTERS,width:t.size.width/2,height:b+(P!==m-1?2:0)-Ve.routerStrokeWidth/2,cornerRadius:[0,0,P===m-1?Ve.routerCornerRadius:0,0]}),g(Em,{x:t.size.width/2+Ve.routerStrokeWidth,y:v/2,radius:Ve.portCircleRadius,fill:R||n?w:"white",stroke:O?"red":n?"white":w,strokeWidth:Ve.portCircleRadius/2}),g(Yy,{text:`e ${P}`,fill:R?"white":n?w:S,verticalAlign:"center",listening:!1,x:t.size.width/4,y:b/2-Ve.portFontSize/2,width:t.size.width/2,fontSize:Ve.portFontSize}),d.id===_.id&&!M?g(Yy,{text:d.message,align:"center",listening:!1,x:t.size.width/2,y:b/2-Ve.skippedPortFontSize/2,width:Ve.gridBlockSize*1.5,fontSize:Ve.skippedPortFontSize}):null]},_.id)})]},t.id)},o1t=({component:t,connected:e,selected:n,editorMode:r,onGroupMouseDown:o,onDragEnd:i,mouseDownHandler:s,mouseUpHandler:a,showConnectionContextMenu:l,fetchedComponents:c})=>{const[u,d]=C.useState(!1),{main:h,darker:f,lighter:p}=Eo.getDarkerLighterHexColors("#fc6239");return K(fu,{id:t.id,x:t.coordinates.x,y:t.coordinates.y,draggable:!r?.propKey,onMouseDown:m=>o&&o({elementId:t.id,elementType:t.type}),onDragEnd:m=>i&&i({elementId:t.id,elementType:t.type,tempInclude:!1}),children:[K(fu,{x:t.size.nameSize.width,onMouseEnter:m=>{if(!(r&&(r.propKey==="targets"||r.propKey==="routers"&&r.portType==="eGress"||r.propKey==="initiators"||r.propId===t.id))){const v=m.target.getStage();if(v){const b=v.container();b.style.cursor="pointer"}d(!0)}},onMouseLeave:m=>{const y=m.target.getStage();if(y){const v=y.container();v.style.cursor="default"}u&&d(!1)},onMouseDown:m=>{s&&s({...Ap,e:m,propKey:t.type,propId:t.id})},onMouseUp:m=>{a&&a({...Ap,e:m,propKey:t.type,propId:t.id})},onContextMenu:m=>{const y=Uo();l({e:m,id:t.id,type:t.type,elementType:Kt.elementTypes.components,hasDelete:!1,createRouter:st.getCreatingComponent({type:Kt.componentTypes.routers,initialCoordinates:{x:t.coordinates.x+t.size.nameSize.width+Ve.gridBlockSize+Cv,y:t.coordinates.y-Ve.gridBlockSize},id:y,components:c}),disabledCreateRouter:e,routerConnection:st.getCreatingComponentConnection({type:pi.INITIATORS,creatingComponentId:t.id,presetComponentId:y,presentComponentPort:0})})},children:[g(Yv,{fill:u?p:n?f:h,points:[0,0,Ve.gridBlockSize/5,0,Ve.gridBlockSize,Ve.gridBlockSize/2,Ve.gridBlockSize/5,Ve.gridBlockSize,0,Ve.gridBlockSize],closed:!0}),g(Em,{x:Ve.gridBlockSize,y:Ve.gridBlockSize/2,radius:Ve.portCircleRadius,fill:e||n?f:"white",stroke:n?"white":f,strokeWidth:Ve.portCircleRadius/2})]}),K(fu,{onMouseEnter:m=>{const y=m.target.getStage();if(y){const v=y.container();v.style.cursor="grab"}},onMouseLeave:m=>{const y=m.target.getStage();if(y){const v=y.container();v.style.cursor="default"}},onContextMenu:m=>l({e:m,id:t.id,type:t.type,elementType:Kt.elementTypes.components}),children:[g(yh,{elementId:t.id,elementType:Kt.componentTypes.initiators,fill:"white",width:t.size.nameSize.width+Ve.gridBlockSize/5-Ve.routerStrokeWidth/2,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,x:Ve.routerStrokeWidth/4+.1,y:Ve.routerStrokeWidth/4,strokeWidth:Ve.routerStrokeWidth/2,stroke:n?f:h,cornerRadius:[Ve.routerCornerRadius,0,0,Ve.routerCornerRadius]}),g(Yy,{elementId:t.id,elementType:Kt.componentTypes.initiators,text:`${t.name}`,align:"center",listening:!1,y:Ve.gridBlockSize/2-Ve.nameFontSize/2,width:t.size.nameSize.width+Ve.gridBlockSize/5,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,fontSize:Ve.nameFontSize})]})]},t.id)},i1t=({connections:t,fromElements:e,toElements:n,portType:r,showConnectionContextMenu:o,scale:i,selectConnection:s,highlightedRoutes:a,connectionContextMenuOpenId:l,connectionRoutes:c})=>{const{themeColors:u}=Lc(),d=bt(Zx);return t.length?g(gr,{children:t.map(h=>{const{id:f,parameters:{fromRouterId:p,fromEgressPortIdx:m,toTargetId:y}}=h,v=d.id===f||l===f,b=a&&a[f];return g(Yv,{elementId:f,points:st.getConnectionRoutePoints({route:c[f],lineParams:{fromElements:e,fromElementId:y,toElements:n,toElementId:p,portType:r,portIdx:m}}),strokeWidth:b?.reachable||v?10:Ve.connectionLineStrokeWidth,hitStrokeWidth:20/i,stroke:b?.disabled?"red":u.designCyan[100],onMouseUp:S=>s&&s(S,h),onMouseEnter:S=>{const w=S.target.getStage();if(w){const A=w.container();A.style.cursor="pointer"}},onMouseLeave:S=>{const w=S.target.getStage();if(w){const A=w.container();A.style.cursor="default"}},onContextMenu:S=>o({e:S,id:f,type:Kt.componentTypes.targets,elementType:Kt.elementTypes.connections})},f)})}):null},s1t=({components:t,fromId:e,toId:n})=>{let r=null,o=null;for(const i of t){if(i.id===e){r=i;continue}if(i.id===n){o=i;continue}if(r&&o)break}return{fromRouter:r,toRouter:o}},a1t=({connections:t,components:e,showConnectionContextMenu:n,scale:r,selectConnection:o,highlightedRoutes:i,connectionContextMenuOpenId:s,colors:a,connectionRoutes:l})=>{const{themeColors:c}=Lc(),u=bt(Zx);return t.length?g(gr,{children:t.map(d=>{const{id:h,parameters:{fromId:f,toId:p,fromEgressPortIdx:m,toInGressPortIdx:y}}=d,{fromRouter:v,toRouter:b}=s1t({components:e,fromId:f,toId:p}),S=a[p]??c.designBlue[300];if(v&&b){const w=v.parameters.ports.eGress.length,A=b.parameters.ports.inGress.length,_=v.size.height/w,P=b.size.height/A,R=v.size.nameSize.height,O=b.size.nameSize.height,N=v.coordinates.x+v.size.width+Ve.portCircleRadius/2,M=v.coordinates.y+R+(_/2+_*(m||0)),L=b.coordinates.x-Ve.portCircleRadius/2,F=b.coordinates.y+O+(P/2+P*(y||0)),$=u.id===h||s===h,D=i&&i[h];return g(Yv,{elementId:h,points:st.getConnectionRoutePoints({route:l[h],precalculatedPoints:[N,M,L,F]}
453),strokeWidth:D?.reachable||D?.disabled||$?10:Ve.connectionLineStrokeWidth,hitStrokeWidth:20/r,stroke:D?.disabled?"red":S,onMouseUp:k=>o&&o(k,d),onMouseEnter:k=>{const U=k.target.getStage();if(U){const H=U.container();H.style.cursor="pointer"}},onMouseLeave:k=>{const U=k.target.getStage();if(U){const H=U.container();H.style.cursor="default"}},onContextMenu:k=>n({e:k,id:h,type:Kt.componentTypes.routers,elementType:Kt.elementTypes.connections})},h)}return null})}):null},l1t=({connections:t,fromElements:e,toElements:n,portType:r,showConnectionContextMenu:o,scale:i,selectConnection:s,highlightedRoutes:a,connectionContextMenuOpenId:l,connectionRoutes:c})=>{const{themeColors:u}=Lc(),d=bt(Zx);return t.length?g(gr,{children:t.map(h=>{const{id:f,parameters:{fromInitiatorId:p,toRouterId:m,toRouterPortIdx:y}}=h,v=d.id===f||l===f,b=a&&a[f];return g(Yv,{elementId:f,points:st.getConnectionRoutePoints({route:c[f],lineParams:{fromElements:e,fromElementId:p,toElements:n,toElementId:m,portType:r,portIdx:y}}),strokeWidth:b?.reachable||v?10:Ve.connectionLineStrokeWidth,hitStrokeWidth:20/i,stroke:b?.disabled?"red":u.designOrange[300],onMouseUp:S=>s&&s(S,h),onMouseEnter:S=>{const w=S.target.getStage();if(w){const A=w.container();A.style.cursor="pointer"}},onMouseLeave:S=>{const w=S.target.getStage();if(w){const A=w.container();A.style.cursor="default"}},onContextMenu:S=>o({e:S,id:f,type:Kt.componentTypes.initiators,elementType:Kt.elementTypes.connections})},f)})}):null};function LR(t,e){return Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t}function kR(t,e,n,r){Object.defineProperty(t,e,{get:n,set:r,enumerable:!0,configurable:!0})}var FR={},Kge={};kR(Kge,"ContextMenu",()=>f1t);var Qge={};kR(Qge,"nestedMenuItemsFromObject",()=>EB);var Zge={};kR(Zge,"IconMenuItem",()=>G6);const c1t=$e(mr)({display:"flex",justifyContent:"space-between",paddingLeft:"4px",paddingRight:"4px"}),u1t=$e(Ke)({paddingLeft:"8px",paddingRight:"8px",textAlign:"left"}),d1t=$e(oLe)({display:"flex"}),G6=C.forwardRef(function({MenuItemProps:e,className:n,label:r,leftIcon:o,renderLabel:i,rightIcon:s,...a},l){return K(c1t,{...e,ref:l,className:n,...a,children:[K(d1t,{children:[o,i?i():g(u1t,{children:r})]}),s]})});var Jge={};kR(Jge,"NestedMenuItem",()=>SB);const h1t=t=>g(Hp,{...t,children:g("path",{d:"M9.29 6.71c-.39.39-.39 1.02 0 1.41L13.17 12l-3.88 3.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01z"})}),SB=C.forwardRef(function(e,n){const{parentMenuOpen:r,label:o,renderLabel:i,rightIcon:s=g(h1t,{}),leftIcon:a=null,children:l,className:c,tabIndex:u,ContainerProps:d={},MenuProps:h,delay:f=0,...p}=e,{ref:m,...y}=d,v=C.useRef(null);C.useImperativeHandle(n,()=>v.current);const b=C.useRef(null);C.useImperativeHandle(m,()=>b.current);const S=C.useRef(null),w=C.useRef(null),[A,_]=C.useState(!1),P=$=>{w.current=setTimeout(()=>{e.disabled||_(!0),y.onMouseEnter&&y.onMouseEnter($)},f)},R=$=>{w.current&&clearTimeout(w.current),_(!1),y.onMouseLeave&&y.onMouseLeave($)},O=()=>{const $=b.current?.ownerDocument.activeElement??null;if(S.current==null)return!1;for(const D of S.current.children)if(D===$)return!0;return!1},N=$=>{$.target===b.current&&!e.disabled&&_(!0),y.onFocus&&y.onFocus($)},M=$=>{if($.key==="Escape")return;O()&&$.stopPropagation();const D=b.current?.ownerDocument.activeElement;$.key==="ArrowLeft"&&O()&&b.current?.focus(),$.key==="ArrowRight"&&$.target===b.current&&$.target===D&&S.current?.children[0]?.focus()},L=A&&r;let F;return e.disabled||(F=u!==void 0?u:-1),K("div",{...y,ref:b,onFocus:N,tabIndex:F,onMouseEnter:P,onMouseLeave:R,onKeyDown:M,children:[g(G6,{MenuItemProps:p,className:c,ref:v,leftIcon:a,rightIcon:s,label:o,renderLabel:i}),g(Es,{style:{pointerEvents:"none"},anchorEl:v.current,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:L,autoFocus:!1,disableAutoFocus:!0,disableEnforceFocus:!0,onClose:()=>{_(!1)},...h,children:g("div",{ref:S,style:{pointerEvents:"auto"},children:l})})]})});SB.displayName="NestedMenuItem";function EB({menuItemsData:t,isOpen:e,handleClose:n}){return t.map(r=>{const{leftIcon:o,rightIcon:i,label:s,items:a,callback:l,sx:c,disabled:u,delay:d}=r;return a&&a.length>0?g(SB,{leftIcon:o,rightIcon:i,label:s,parentMenuOpen:e,sx:c,delay:d,disabled:u,children:EB({handleClose:n,isOpen:e,menuItemsData:a})},s):g(G6,{leftIcon:o,rightIcon:i,label:s,onClick:h=>{n(),l&&l(h,r)},sx:c,disabled:u},s)})}const f1t=C.forwardRef(function({children:e,menuItems:n,menuItemsData:r},o){const i=o??C.useRef(null),[s,a]=C.useState(null),[l,c]=C.useState(null),u=()=>a(null),d=p=>{if(s!==null&&a(null),p.button!==2)return;const m=i.current.getBoundingClientRect();p.clientX<m.left||p.clientX>m.right||p.clientY<m.top||p.clientY>m.bottom||c({left:p.clientX,top:p.clientY})},h=p=>{const m=p.clientY,y=p.clientX;l!==null&&l.top===m&&l.left===y&&a({left:p.clientX,top:p.clientY})},f=n??(r&&EB({handleClose:u,isOpen:!!s,menuItemsData:r}));return K("div",{ref:i,onContextMenu:p=>p.preventDefault(),onMouseDown:d,onMouseUp:h,children:[s&&g(Es,{onContextMenu:p=>p.preventDefault(),open:!!s,onClose:()=>a(null),anchorReference:"anchorPosition",anchorPosition:s,children:f}),e]})});var eme={};kR(eme,"NestedDropdown",()=>g1t);const p1t=t=>g(Hp,{...t,children:g("path",{d:"M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.9959.9959 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0z"})}),g1t=C.forwardRef(function(e,n){const[r,o]=C.useState(null),i=!!r,{menuItemsData:s,onClick:a,ButtonProps:l,MenuProps:c,...u}=e,d=p=>{o(p.currentTarget),a&&a(p)},h=()=>o(null),f=EB({handleClose:h,isOpen:i,menuItemsData:s?.items??[]});return K("div",{ref:n,...u,children:[g(Sn,{onClick:d,endIcon:g(p1t,{}),...l,children:s?.label??"Menu"}),g(Es,{anchorEl:r,open:i,onClose:h,...c,children:f})]})});LR(FR,Kge);LR(FR,Zge);LR(FR,eme);LR(FR,Jge);LR(FR,Qge);const wT=({label:t,submenuTitle:e,projectId:n="",open:r=!1,items:o=[],onClickHandler:i,mainItemOnClickHandler:s,updateProjectRoutesDisabledStatusIsLoading:a,rightIcon:l=g(b6e,{}),disabled:c=!1,...u})=>{const[d,h]=C.useState(null);return C.useEffect(()=>{!a&&d&&h(null)},[a,d]),K(SB,{label:t,parentMenuOpen:r,rightIcon:l,onClick:s||(()=>{}),disabled:c,...u,children:[e?K(gr,{children:[g(Ke,{children:t}),g(yi,{})]}):null,o.length?o.map(f=>{let p=null;
453return f.reachable&&(p=g(Vv,{color:"success"})),f.disabled&&(p=g(dR,{color:"error"})),a&&f.id===d&&(p=g(Ni,{size:20})),K(mr,{sx:{display:"flex",gap:2,justifyContent:"space-between"},onClick:f.itemOnClickHandler&&f.type?()=>{f.itemOnClickHandler&&(h(f.id),f.itemOnClickHandler({componentType:f.type,componentId:f.id,disabled:!f.disabled}))}:()=>{},children:[f.name,p]},f.id)}):null]})},m1t=()=>Qp(),y1t=()=>"",v1t=()=>"",Q5={getId:m1t,getBase:y1t,getLimit:v1t},b1t=(t,e)=>({id:Q5.getId(),base:Q5.getBase(),limit:Q5.getLimit(),targetId:t,projectId:e}),C1t=({inputAddress:t,targetId:e,projectId:n})=>({...Tt.omit(t,["createdAt","updatedAt"]),targetId:e,projectId:n}),S1t=({ncnocAddresses:t,inputAddresses:e,projectId:n})=>{const r=e.map(i=>C1t({inputAddress:i,targetId:i.targetId,projectId:n})),o=t.map(i=>Tt.omit(i,["createdAt","updatedAt"]));return{projectId:n,ncnocAddresses:Tt.isEqual(r,o)?[]:r}},xB={getCreatePayload:b1t,getBulkUpdatePayload:S1t},E1t=({initiator:t,connection:e,routers:n})=>{const r=$v.getParameterPipelineStagesCount(t.parameters.bus.protocol),o=n.find(s=>s.id===e.parameters.toRouterId);if(!o)return null;const i=`pipelineStagesCountPortI${e.parameters.toRouterPortIdx}`;return{...o,parameters:{...o.parameters,[i]:r}}},x1t=({target:t,connection:e,routers:n})=>{const r=$v.getParameterPipelineStagesCount(t.parameters.bus.protocol),o=n.find(s=>s.id===e.parameters.fromRouterId);if(!o)return null;const i=`pipelineStagesCountPortE${e.parameters.fromEgressPortIdx}`;return{...o,parameters:{...o.parameters,[i]:r}}},w1t=({component:t,connection:e,routers:n})=>t.type===Fe.INITIATORS?E1t({initiator:t,connection:e,routers:n}):x1t({target:t,connection:e,routers:n}),A1t=({routerId:t,routers:e,initiators:n,targets:r,initiatorConnections:o,targetConnections:i,createdConnection:s})=>{const l=e.find(u=>u.id===t);if(!l)return null;const c=Object.assign({},...Array.from({length:5},(u,d)=>{const h=T1t({initiators:n,initiatorConnections:o,activeRouter:l,createdConnection:s,portIndex:d,routerId:t}),f=_1t({targets:r,targetConnections:i,activeRouter:l,createdConnection:s,portIndex:d,routerId:t});return{...h,...f}}));return{...l,parameters:{...l.parameters,...c}}},T1t=({initiators:t,initiatorConnections:e,activeRouter:n,createdConnection:r,portIndex:o,routerId:i})=>{const a=r.type===pi.INITIATORS,c=(a?[...e,r]:e).find(f=>f.parameters.toRouterId===i&&f.parameters.toRouterPortIdx===o),u=t.find(f=>f.id===c?.parameters.fromInitiatorId),d=n.parameters[`pipelineStagesCountPortI${o}`]??0,h=u&&a&&r.parameters.toRouterPortIdx===o||u&&u.parameters.bus.protocol===wt.AXI&&d<1;return{[`pipelineStagesCountPortI${o}`]:h&&a?$v.getParameterPipelineStagesCount(u.parameters.bus.protocol):d}},_1t=({targets:t,targetConnections:e,activeRouter:n,createdConnection:r,portIndex:o,routerId:i})=>{const a=r.type===pi.TARGETS,c=(a?[...e,r]:e).find(f=>f.parameters.fromRouterId===i&&f.parameters.fromEgressPortIdx===o),u=t.find(f=>f.id===c?.parameters.toTargetId),d=n.parameters[`pipelineStagesCountPortE${o}`]??0,h=u&&a&&r.parameters.fromEgressPortIdx===o||u&&u.parameters.bus.protocol===wt.AXI&&d<1;return{[`pipelineStagesCountPortE${o}`]:h&&a?$v.getParameterPipelineStagesCount(u.parameters.bus.protocol):d}},I1t=({router:t,x:e,y:n})=>({...t,coordinates:{...t.coordinates,x:e,y:n}}),Pw={getUpdatePayload:w1t,getUpdatePayloadByCreateConnection:A1t,getUpdateCoordinatesPayload:I1t},P1t=({type:t,id:e,elementType:n,location:r,closeContextMenu:o,createConnectionHandler:i,deleteComponentHandler:s,projectId:a,memoizedNames:l,memoizedDeviceIds:c,createRouter:u,isCreateRouterMenuDisabled:d=!1,routerConnection:h,connections:f,createInitiator:p,isCreateInitiatorMenuDisabled:m=!1,initiatorConnection:y,createTarget:v,isCreateTargetMenuDisabled:b=!1,createDefaultTarget:S,isCreateDefaultTargetMenuDisabled:w=!1,targetConnection:A,hasDelete:_=!0})=>{const P=bt(gd),R=Nh.getAllByProjectId(a),O=Yn(),N=!!e,{data:M,error:L,isLoading:F}=aw(a),{data:$=Zk,error:D,isLoading:k}=nl(a,{skip:F||L}),[U,{isLoading:H}]=sue(),[V]=m6(),[q]=nS(),J=C.useCallback(re=>{switch(re.stopPropagation(),re.preventDefault(),n){case Kt.elementTypes.connections:O(Im({type:t,isConnection:!0,deleteElementId:e,anchorElId:`context-menu-${n}`,name:"connection",projectId:a}));break;case Kt.elementTypes.components:s({id:e,type:t,name:`${l[t][e]}:${c[t][e]}`,anchorElId:`context-menu-${n}`});break;default:console.log("Unknown elementType, ContextMenuComponent delete handler");break}},[e,a]),Q=re=>{O(d0(re?.id??"")),re&&!P&&O(pd(!0))},se=re=>{if(!(re.parameters?.bus?.protocol===wt.SEC)&&re.type===Fe.TARGETS){const we=xB.getCreatePayload(re.id,a);V(we)}},oe=({component:re,connection:fe})=>{re.projectId=a,fe&&(fe.projectId=a);const we=[];re.type===Kt.componentTypes.targets&&$[Kt.componentTypes.initiators].length&&$[Kt.componentTypes.initiators].forEac
453h(ve=>{we.push({id:Uo(),initiatorId:ve.id,targetId:re.id,latency:0,status:"disabled",projectId:a})}),re.type===Kt.componentTypes.initiators&&$[Kt.componentTypes.targets].length&&$[Kt.componentTypes.targets].forEach(ve=>{we.push({id:Uo(),initiatorId:re.id,targetId:ve.id,latency:0,status:"disabled",projectId:a})});const xe=M.data.find(ve=>ve.relationId===e);(re.componentId===void 0||re.componentId<0)&&(re.componentId=st.getComponentId({components:$,type:re.type})),U({projectId:a,component:re,componentTreeElement:{id:st.getMaxBy(M.data,"id")+1,relationId:re.id,parent:xe.parent,droppable:!1,data:{id:re.id,type:re.type}},addToMatrix:we,connection:fe}).then(ve=>{if(fe?.type){const Re=st.invalidateConnections({connection:fe,connections:f});i({connection:fe,invalidatedConnections:Re}),Q(re)}se(re),O(eF(!0)),O(Sv({id:re.id,type:re.type}))})},ie=(re,fe)=>{const we=Pw.getUpdatePayload({component:re,connection:fe,routers:R});q({projectId:a,component:we})},ee=(re,fe)=>{const we=$[t].find(Re=>Re.id===e),xe=$v.getParameterPipelineStagesCount(we.parameters.bus.protocol),ve={...re,parameters:{...re.parameters,...fe?{pipelineStagesCountPortI0:xe}:{pipelineStagesCountPortE0:xe}}};oe({component:ve,connection:h})};return K(Es,{open:N,onClose:o,anchorReference:"anchorPosition",anchorPosition:N?{top:r.y,left:r.x}:void 0,onContextMenu:re=>re.preventDefault(),sx:{"& .disabled":{pointer:"not-allowed",opacity:.35,"&:hover":{backgroundColor:"transparent"}}},children:[_?g(wT,{rightIcon:null,disabled:H,id:`context-menu-${n}`,label:`Delete ${n===Kt.elementTypes.connections?"Connection":"Component"}`,mainItemOnClickHandler:J,projectId:a}):null,u?g(wT,{rightIcon:null,disabled:d||H||$[Fe.ROUTERS].length>=ys[Yt.ROUTER],id:`context-menu-${n}-create${u.type}`,label:"Create Router",mainItemOnClickHandler:()=>{const re=t===Fe.INITIATORS,fe=t===Fe.TARGETS;(re||fe)&&ee(u,re),!re&&!fe&&oe({component:u,connection:h})},projectId:a}):null,p?g(wT,{rightIcon:null,disabled:m||H||$[Fe.INITIATORS].length>=ys[Yt.INITIATOR],id:`context-menu-${n}-create${p.type}`,label:"Create Initiator",mainItemOnClickHandler:()=>{ie(p,y),oe({component:p,connection:y})},projectId:a}):null,v?g(wT,{rightIcon:null,disabled:b||H||Ki.getNumberOfNonDefaultTargetsInProject($)>=ys[Yt.TARGET],id:`context-menu-${n}-create${v.type}`,label:"Create Target",mainItemOnClickHandler:()=>{oe({component:v,connection:A}),ie(v,A)},projectId:a}):null,S?g(wT,{rightIcon:null,disabled:w||H||Ki.getNumberOfDefaultTargetsInProject($[Fe.TARGETS])>=ys[Yt.DEFAULT_TARGET],id:`context-menu-${n}-create${S.type}`,label:"Create Default Target",mainItemOnClickHandler:()=>oe({component:S,connection:A}),projectId:a}):null]})},R1t=({component:t,selected:e,editorMode:n,onGroupMouseDown:r,onDragEnd:o,mouseDownHandler:i,mouseUpHandler:s,showConnectionContextMenu:a,colors:l,bridgeConnections:c})=>{const[u,d]=C.useState(!1),[h,f]=C.useState(!1),{themeColors:p}=Lc(),m=C.useCallback((N,M)=>c.filter(L=>M?L.parameters.toBridgeId===N:L.parameters.fromBridgeId===N)[0],[c]),y=m(t.id,!0),v=m(t.id,!1),b=C.useMemo(()=>l[y?.parameters?.fromRouterId]||p.grey[300],[l,y]),S=C.useMemo(()=>l[v?.parameters?.toRouterId]||p.grey[300],[l,v]),{incomingMainColor:w,incomingSelectedColor:A,incomingHoverColor:_}=C.useMemo(()=>{const{main:N,darker:M,lighter:L}=Eo.getDarkerLighterHexColors(b);return{incomingMainColor:N,incomingSelectedColor:M,incomingHoverColor:L}},[b]),{outgoingMainColor:P,outgoingSelectedColor:R,outgoingHoverColor:O}=C.useMemo(()=>{const{main:N,darker:M,lighter:L}=Eo.getDarkerLighterHexColors(S);return{outgoingMainColor:N,outgoingSelectedColor:M,outgoingHoverColor:L}},[S]);return K(fu,{elementId:t.id,elementType:Kt.componentTypes.bridges,draggable:!n?.propKey,onMouseDown:N=>r&&r({elementId:t.id,elementType:t.type}),onDragEnd:N=>o&&o({elementId:t.id,elementType:t.type,tempInclude:!1}),x:t.coordinates.x,y:t.coordinates.y,strokeWidth:Ve.routerStrokeWidth/2,stroke:"lightGray",cornerRadius:Ve.routerCornerRadius,children:[K(fu,{onMouseEnter:N=>{const M=N.target.getStage();if(M){const L=M.container();L.style.cursor="pointer",d(!0)}},onMouseLeave:N=>{const M=N.target.getStage();if(M){const L=M.container();L.style.cursor="default",d(!1)}},onMouseDown:N=>{i&&i({...Ap,e:N,propKey:t.type,propId:t.id})},onMouseUp:N=>{s&&s({...Ap,e:N,propKey:t.type,propId:t.id})},children:[g(yh,{fill:u?_:e?A:w,elementId:t.id,elementType:Fe.BRIDGES,width:Ve.gridBlockSize/2,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,strokeWidth:Ve.routerStrokeWidth/2,stroke:"lightGray",cornerRadius:[Ve.routerCornerRadius,0,0,Ve.routerCornerRadius]}),g(Em,{x:-Ve.routerStrokeWidth,y:Ve.gridBlockSize/2,offsetX:-Ve.portCircleRadius+Ve.routerStrokeWidth/2,radius:Ve.portCircleRadius,fill:A,stroke:e?"white":A,strokeWidth:Ve.portCircleRadius/2})]}),K(fu,{onMouseEnter:N=>{const M=N.target.getStage();if(M){const L=M.container();L.style.cursor="grab"}},onMouseLeave:N=>{const M=N.target.getStage();if(M){const L=M.container();L.style.cursor="default"}},onContextMenu:N=>a({e:N,id:t.id,type:t.type,elementType:Kt.elementTypes.components}),children:[g(yh,{fill:"white",elementId:t.id,elementType:Fe.BRIDGES,offsetX:-Ve.gridBlockSize/2,width:Ve.gridBlockSize,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,strokeWidth:Ve.routerStrokeWidth/2,stroke:"lightGray"}),g(Yy,{elementId:t.id,elementType:Fe.BRIDGES,text:t.name,align:"center",y:Ve.gridBlockSize/2-Ve.nameFontSize/2,offsetX:-Ve.gridBlockSize+Ve.gridBlockSize/2+4,width:t.size.nameSize.width+Ve.gridBlockSize/12,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,fontSize:Ve.nameFontSize})]}),K(fu,{onMouseEnter:N=>{const M=N.target.getStage();if(M){const L=M.container();L.style.cursor="pointer",f(!0)}},onMouseLeave:N=>{const M=N.target.getStage();if(M){const L=M.container();L.style.cursor="default",f(!1)}},onMouseDown:N=>{i&&i({...Ap,e:N,propKey:t.type,propId:t.id})},onMouseUp:N=>{s&&s({...Ap,e:N,propKey:t.type,propId:t.id})},children:[g(yh,{fill:h?O:e?R:P,elementId:t.id,elementType:Fe.BRIDGES,offsetX:-Ve.gridBlockSize-Ve.gridBlockSize/2,width:Ve.gridBlockSize/2,height:Ve.gridBlockSize-Ve.routerStrokeWidth/2,strokeWidth:Ve.routerStrokeWidth/2,stroke:"lightGray",cornerRadius:[0,Ve.routerCornerRadius,Ve.routerCornerRadius,0]}),g(Em,{x:-Ve.routerStrokeWidth,y:Ve.gridBlockSize/2,offsetX:-Ve.gridBlockSize*2-Ve.portCircleRadius/2-Ve.routerStrokeWidth/4,radius:Ve.portCircleRadius,fill:R,stroke:e?"white":R,strokeWidth:Ve.portCircleRadius/2})]})]})},O1t="modulepreload",N1t=function(t){return"/"+t},Tee={},s1=function(e,n,r){if(!n||n.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=N1t(i),i in Tee)return;Tee[i]=!0;const s=i.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let u=o.length-1;u>=0;u--){const d=o[u];if(d.href===i&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":O1t,s||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),s)return new Promise((u,d)=>{c.addEventListener("load",u),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};async function M1t(t,e={}){const n={env:Object.assign(Object.create(globalThis),e.env||{},{abort(c,u,d,h){c=s(c>>>0),u=s(u>>>0),d=d>>>0,h=h>>>0,(()=>{throw Error(`${c} in ${u}:${d}:${h}`)})()},"console.log"(c){c=s(c>>>0),console.log(c)}})},{exports:r}=await WebAssembly.instantiate(t,n),o=r.memory||e.env.memory,i=Object.
453setPrototypeOf({addSourceTarget(c,u,d,h,f){f=a(f)||l(),r.addSourceTarget(c,u,d,h,f)},route(c,u,d,h,f){return f=a(f)||l(),s(r.route(c,u,d,h,f)>>>0)},getRoute(c){return c=a(c)||l(),s(r.getRoute(c)>>>0)},print(c,u){c=a(c)||l(),u=u?1:0,r.__setArgumentsLength(arguments.length),r.print(c,u)}},r);function s(c){if(!c)return null;const u=c+new Uint32Array(o.buffer)[c-4>>>2]>>>1,d=new Uint16Array(o.buffer);let h=c>>>1,f="";for(;u-h>1024;)f+=String.fromCharCode(...d.subarray(h,h+=1024));return f+String.fromCharCode(...d.subarray(h,u))}function a(c){if(c==null)return 0;const u=c.length,d=r.__new(u<<1,2)>>>0,h=new Uint16Array(o.buffer);for(let f=0;f<u;++f)h[(d>>>1)+f]=c.charCodeAt(f);return d}function l(){throw TypeError("value must not be null")}return i}const{memory:D1t,init:tme,setBoundary:nme,addBlockage:rme,addSourceTarget:ome,prepare:ime,route:L1t,routeAll:sme,getRoute:ame,print:k1t,reset:F1t}=await(async t=>M1t(await(async()=>{try{return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(t))}catch{return globalThis.WebAssembly.compile(await(await s1(()=>import("./__vite-browser-external-b25bb000.js"),[])).readFile(t))}})(),{}))(new URL("/assets/release-0c4b84b2.wasm",self.location)),_ee=Object.freeze(Object.defineProperty({__proto__:null,addBlockage:rme,addSourceTarget:ome,getRoute:ame,init:tme,memory:D1t,prepare:ime,print:k1t,reset:F1t,route:L1t,routeAll:sme,setBoundary:nme},Symbol.toStringTag,{value:"Module"})),B1t=({connections:t,components:e,showConnectionContextMenu:n,scale:r,selectConnection:o,highlightedRoutes:i,connectionContextMenuOpenId:s,colors:a,connectionRoutes:l})=>{const{themeColors:c}=Lc(),u=bt(Zx),d=h=>e.find(f=>f.id===h);return g(gr,{children:t.map(h=>{const{id:f,parameters:{routerPortIdx:p,fromBridgeId:m,fromRouterId:y,toBridgeId:v,toRouterId:b}}=h,S=m??y,w=v??b,A=d(S),_=d(w),P=a[A?.type===Fe.ROUTERS?S:w]||c.grey[300];if(A&&_){const R=u.id===f||s===f,O=i&&i[f],N=Ve.gridBlockSize,M=Ve.gridBlockSize,L=Ve.gridBlockSize*2,F=A.coordinates.x+L+Ve.portCircleRadius/2,$=_.type===Fe.BRIDGES?A.coordinates.y+M+(N/2+N*(p??0)):A.coordinates.y+M/2,D=_.coordinates.x-Ve.portCircleRadius/2,k=_.type===Fe.ROUTERS?_.coordinates.y+M+(N/2+N*(p??0)):_.coordinates.y+M/2;return g(Yv,{elementId:f,points:st.getConnectionRoutePoints({route:l[f],precalculatedPoints:[F,$,D,k]}),strokeWidth:O?.reachable||O?.disabled||R?10:Ve.connectionLineStrokeWidth,hitStrokeWidth:20/r,stroke:O?.disabled?"red":P,onMouseUp:U=>o&&o(U,h),onMouseEnter:U=>{const H=U.target.getStage();if(H){const V=H.container();V.style.cursor="pointer"}},onMouseLeave:U=>{const H=U.target.getStage();if(H){const V=H.container();V.style.cursor="default"}},onContextMenu:U=>n({e:U,id:f,type:Fe.BRIDGES,elementType:Kt.elementTypes.connections})},f)}return null})})};function $1t(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function o(){var i,s=n.length,a,l=0,c=0;for(i=0;i<s;++i)a=n[i],l+=a.x,c+=a.y;for(l=(l/s-t)*r,c=(c/s-e)*r,i=0;i<s;++i)a=n[i],a.x-=l,a.y-=c}return o.initialize=function(i){n=i},o.x=function(i){return arguments.length?(t=+i,o):t},o.y=function(i){return arguments.length?(e=+i,o):e},o.strength=function(i){return arguments.length?(r=+i,o):r},o}function H1t(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return lme(this.cover(e,n),e,n,t)}function lme(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i=t._root,s={data:r},a=t._x0,l=t._y0,c=t._x1,u=t._y1,d,h,f,p,m,y,v,b;if(!i)return t._root=s,t;for(;i.length;)if((m=e>=(d=(a+c)/2))?a=d:c=d,(y=n>=(h=(l+u)/2))?l=h:u=h,o=i,!(i=i[v=y<<1|m]))return o[v]=s,t;if(f=+t._x.call(null,i.data),p=+t._y.call(null,i.data),e===f&&n===p)return s.next=i,o?o[v]=s:t._root=s,t;do o=o?o[v]=new Array(4):t._root=new Array(4),(m=e>=(d=(a+c)/2))?a=d:c=d,(y=n>=(h=(l+u)/2))?l=h:u=h;while((v=y<<1|m)===(b=(p>=h)<<1|f>=d));return o[b]=i,o[v]=s,t}function U1t(t){var e,n,r=t.length,o,i,s=new Array(r),a=new Array(r),l=1/0,c=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(o=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(s[n]=o,a[n]=i,o<l&&(l=o),o>u&&(u=o),i<c&&(c=i),i>d&&(d=i));if(l>u||c>d)return this;for(this.cover(l,c).cover(u,d),n=0;n<r;++n)lme(this,s[n],a[n],t[n]);return this}function z1t(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{for(var s=o-n||1,a=this._root,l,c;n>t||t>=o||r>e||e>=i;)switch(c=(e<r)<<1|t<n,l=new Array(4),l[c]=a,a=l,s*=2,c){case 0:o=n+s,i=r+s;break;case 1:n=o-s,i=r+s;break;case 2:o=n+s,r=i-s;break;case 3:n=o-s,r=i-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this}function V1t(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function G1t(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function _c(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function W1t(t,e,n){var r,o=this._x0,i=this._y0,s,a,l,c,u=this._x1,d=this._y1,h=[],f=this._root,p,m;
vendor: 4,707 bytes, line 453
453for(f&&h.push(new _c(f,o,i,u,d)),n==null?n=1/0:(o=t-n,i=e-n,u=t+n,d=e+n,n*=n);p=h.pop();)if(!(!(f=p.node)||(s=p.x0)>u||(a=p.y0)>d||(l=p.x1)<o||(c=p.y1)<i))if(f.length){var y=(s+l)/2,v=(a+c)/2;h.push(new _c(f[3],y,v,l,c),new _c(f[2],s,v,y,c),new _c(f[1],y,a,l,v),new _c(f[0],s,a,y,v)),(m=(e>=v)<<1|t>=y)&&(p=h[h.length-1],h[h.length-1]=h[h.length-1-m],h[h.length-1-m]=p)}else{var b=t-+this._x.call(null,f.data),S=e-+this._y.call(null,f.data),w=b*b+S*S;if(w<n){var A=Math.sqrt(n=w);o=t-A,i=e-A,u=t+A,d=e+A,r=f.data}}return r}function j1t(t){if(isNaN(u=+this._x.call(null,t))||isNaN(d=+this._y.call(null,t)))return this;var e,n=this._root,r,o,i,s=this._x0,a=this._y0,l=this._x1,c=this._y1,u,d,h,f,p,m,y,v;if(!n)return this;if(n.length)for(;;){if((p=u>=(h=(s+l)/2))?s=h:l=h,(m=d>=(f=(a+c)/2))?a=f:c=f,e=n,!(n=n[y=m<<1|p]))return this;if(!n.length)break;(e[y+1&3]||e[y+2&3]||e[y+3&3])&&(r=e,v=y)}for(;n.data!==t;)if(o=n,!(n=n.next))return this;return(i=n.next)&&delete n.next,o?(i?o.next=i:delete o.next,this):e?(i?e[y]=i:delete e[y],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[v]=n:this._root=n),this):(this._root=i,this)}function q1t(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function Y1t(){return this._root}function X1t(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function K1t(t){var e=[],n,r=this._root,o,i,s,a,l;for(r&&e.push(new _c(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,i=n.x0,s=n.y0,a=n.x1,l=n.y1)&&r.length){var c=(i+a)/2,u=(s+l)/2;(o=r[3])&&e.push(new _c(o,c,u,a,l)),(o=r[2])&&e.push(new _c(o,i,u,c,l)),(o=r[1])&&e.push(new _c(o,c,s,a,u)),(o=r[0])&&e.push(new _c(o,i,s,c,u))}return this}function Q1t(t){var e=[],n=[],r;for(this._root&&e.push(new _c(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var o=r.node;if(o.length){var i,s=r.x0,a=r.y0,l=r.x1,c=r.y1,u=(s+l)/2,d=(a+c)/2;(i=o[0])&&e.push(new _c(i,s,a,u,d)),(i=o[1])&&e.push(new _c(i,u,a,l,d)),(i=o[2])&&e.push(new _c(i,s,d,u,c)),(i=o[3])&&e.push(new _c(i,u,d,l,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Z1t(t){return t[0]}function J1t(t){return arguments.length?(this._x=t,this):this._x}function ext(t){return t[1]}function txt(t){return arguments.length?(this._y=t,this):this._y}function cme(t,e,n){var r=new W6(e??Z1t,n??ext,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function W6(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function Iee(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var kc=cme.prototype=W6.prototype;kc.copy=function(){var t=new W6(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Iee(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var o=0;o<4;++o)(r=e.source[o])&&(r.length?n.push({source:r,target:e.target[o]=new Array(4)}):e.target[o]=Iee(r));return t};kc.add=H1t;kc.addAll=U1t;kc.cover=z1t;kc.data=V1t;kc.extent=G1t;kc.find=W1t;kc.remove=j1t;kc.removeAll=q1t;kc.root=Y1t;kc.size=X1t;kc.visit=K1t;kc.visitAfter=Q1t;kc.x=J1t;kc.y=txt;function j_(t){return function(){return t}}function w2(t){return(t()-.5)*1e-6}function nxt(t){return t.x+t.vx}function rxt(t){return t.y+t.vy}function oxt(t){var e,n,r,o=1,i=1;typeof t!="function"&&(t=j_(t==null?1:+t));function s(){for(var c,u=e.length,d,h,f,p,m,y,v=0;v<i;++v)for(d=cme(e,nxt,rxt).visitAfter(a),c=0;c<u;++c)h=e[c],m=n[h.index],y=m*m,f=h.x+h.vx,p=h.y+h.vy,d.visit(b);function b(S,w,A,_,P){var R=S.data,O=S.r,N=m+O;if(R){if(R.index>h.index){var M=f-R.x-R.vx,L=p-R.y-R.vy,F=M*M+L*L;F<N*N&&(M===0&&(M=w2(r),F+=M*M),L===0&&(L=w2(r),F+=L*L),F=(N-(F=Math.sqrt(F)))/F*o,h.vx+=(M*=F)*(N=(O*=O)/(y+O)),h.vy+=(L*=F)*N,R.vx-=M*(N=1-N),R.vy-=L*N)}return}return w>f+N||_<f-N||A>p+N||P<p-N}}function a(c){if(c.data)return c.r=n[c.data.index];for(var u=c.r=0;u<4;++u)c[u]&&c[u].r>c.r&&(c.r=c[u].r)}function l(){if(e){var c,u=e.length,d;for(n=new Array(u),c=0;c<u;++c)d=e[c],n[d.index]=+t(d,c,e)}}return s.initialize=function(c,u){e=c,r=u,l()},s.iterations=function(c){return arguments.length?(i=+c,s):i},s.strength=function(c){return arguments.length?(o=+c,s):o},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:j_(+c),l(),s):t},s}function ixt(t){return t.index}function Pee(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function sxt(t){var e=ixt,n=d,r,o=j_(30),i,s,a,l,c,u=1;t==null&&(t=[]);function d(y){return 1/Math.min(a[y.source.index],a[y.target.index])}function h(y){for(var v=0,b=t.length;v<u;++v)for(var S=0,w,A,_,P,R,O,N;S<b;++S)w=t[S],A=w.source,_=w.target,P=_.x+_.vx-A.x-A.vx||w2(c),R=_.y+_.vy-A.
453y-A.vy||w2(c),O=Math.sqrt(P*P+R*R),O=(O-i[S])/O*y*r[S],P*=O,R*=O,_.vx-=P*(N=l[S]),_.vy-=R*N,A.vx+=P*(N=1-N),A.vy+=R*N}function f(){if(s){var y,v=s.length,b=t.length,S=new Map(s.map((A,_)=>[e(A,_,s),A])),w;for(y=0,a=new Array(v);y<b;++y)w=t[y],w.index=y,typeof w.source!="object"&&(w.source=Pee(S,w.source)),typeof w.target!="object"&&(w.target=Pee(S,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(y=0,l=new Array(b);y<b;++y)w=t[y],l[y]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(b),p(),i=new Array(b),m()}}function p(){if(s)for(var y=0,v=t.length;y<v;++y)r[y]=+n(t[y],y,t)}function m(){if(s)for(var y=0,v=t.length;y<v;++y)i[y]=+o(t[y],y,t)}return h.initialize=function(y,v){s=y,c=v,f()},h.links=function(y){return arguments.length?(t=y,f(),h):t},h.id=function(y){return arguments.length?(e=y,h):e},h.iterations=function(y){return arguments.length?(u=+y,h):u},h.strength=function(y){return arguments.length?(n=typeof y=="function"?y:j_(+y),p(),h):n},h.distance=function(y){return arguments.length?(o=typeof y=="function"?y:j_(+y),m(),h):o},h}var axt={value:()=>{}};function ume(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new yD(n)}function yD(t){this._=t}function lxt(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}yD.prototype=ume.prototype={constructor:yD,on:function(t,e){var n=this._,r=lxt(t+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(t=r[i]).type)&&(o=cxt(n[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<s;)if(o=(t=r[i]).type)n[o]=Ree(n[o],t.name,e);else if(e==null)for(o in n)n[o]=Ree(n[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new yD(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};function cxt(t,e){for(var n=0,r=t.length,o;n<r;++n)if((o=t[n]).name===e)return o.value}function Ree(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=axt,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var px=0,r_=0,AT=0,dme=1e3,A2,o_,T2=0,$C=0,wB=0,vP=typeof performance=="object"&&performance.now?performance:Date,hme=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function fme(){return $C||(hme(uxt),$C=vP.now()+wB)}function uxt(){$C=0}function tz(){this._call=this._time=this._next=null}tz.prototype=pme.prototype={constructor:tz,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?fme():+n)+(e==null?0:+e),!this._next&&o_!==this&&(o_?o_._next=this:A2=this,o_=this),this._call=t,this._time=n,nz()},stop:function(){this._call&&(this._call=null,this._time=1/0,nz())}};function pme(t,e,n){var r=new tz;return r.restart(t,e,n),r}function dxt(){fme(),++px;for(var t=A2,e;t;)(e=$C-t._time)>=0&&t._call.call(void 0,e),t=t._next;--px}function Oee(){$C=(T2=vP.now())+wB,px=r_=0;try{dxt()}finally{px=0,fxt(),$C=0}}function hxt(){var t=vP.now(),e=t-T2;e>dme&&(wB-=e,T2=t)}function fxt(){for(var t,e=A2,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:A2=n);o_=t,nz(r)}function nz(t){if(!px){r_&&(r_=clearTimeout(r_));var e=t-$C;e>24?(t<1/0&&(r_=setTimeout(Oee,t-vP.now()-wB)),AT&&(AT=clearInterval(AT))):(AT||(T2=vP.now(),AT=setInterval(hxt,dme)),px=1,hme(Oee))}}const pxt=1664525,gxt=1013904223,Nee=4294967296;function mxt(){let t=1;return()=>(t=(pxt*t+gxt)%Nee)/Nee}var yxt=10,vxt=Math.PI*(3-Math.sqrt(5));function bxt(t){var e,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,s=.6,a=new Map,l=pme(d),c=ume("tick","end"),u=mxt();t==null&&(t=[]);function d(){h(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function h(m){var y,v=t.length,b;m===void 0&&(m=1);for(var S=0;S<m;
453++S)for(n+=(i-n)*o,a.forEach(function(w){w(n)}),y=0;y<v;++y)b=t[y],b.fx==null?b.x+=b.vx*=s:(b.x=b.fx,b.vx=0),b.fy==null?b.y+=b.vy*=s:(b.y=b.fy,b.vy=0);return e}function f(){for(var m=0,y=t.length,v;m<y;++m){if(v=t[m],v.index=m,v.fx!=null&&(v.x=v.fx),v.fy!=null&&(v.y=v.fy),isNaN(v.x)||isNaN(v.y)){var b=yxt*Math.sqrt(.5+m),S=m*vxt;v.x=b*Math.cos(S),v.y=b*Math.sin(S)}(isNaN(v.vx)||isNaN(v.vy))&&(v.vx=v.vy=0)}}function p(m){return m.initialize&&m.initialize(t,u),m}return f(),e={tick:h,restart:function(){return l.restart(d),e},stop:function(){return l.stop(),e},nodes:function(m){return arguments.length?(t=m,f(),a.forEach(p),e):t},alpha:function(m){return arguments.length?(n=+m,e):n},alphaMin:function(m){return arguments.length?(r=+m,e):r},alphaDecay:function(m){return arguments.length?(o=+m,e):+o},alphaTarget:function(m){return arguments.length?(i=+m,e):i},velocityDecay:function(m){return arguments.length?(s=1-m,e):1-s},randomSource:function(m){return arguments.length?(u=m,a.forEach(p),e):u},force:function(m,y){return arguments.length>1?(y==null?a.delete(m):a.set(m,p(y)),e):a.get(m)},find:function(m,y,v){var b=0,S=t.length,w,A,_,P,R;for(v==null?v=1/0:v*=v,b=0;b<S;++b)P=t[b],w=m-P.x,A=y-P.y,_=w*w+A*A,_<v&&(R=P,v=_);return R},on:function(m,y){return arguments.length>1?(c.on(m,y),e):c.on(m)}}}const vD={convertComponentsToNodes:({components:t})=>[...t.routers,...t.initiators,...t.targets].map((e,n)=>({...e,vx:0,vy:0,x:e.coordinates.x,y:e.coordinates.y,index:n})),convertConnectionsToLinks:({connections:t})=>[...t.routers,...t.initiators,...t.targets].map(e=>({connection:e,source:e.parameters?.toId||e.parameters?.toRouterId||e.parameters?.toTargetId,target:e.parameters?.fromId||e.parameters?.fromInitiatorId||e.parameters?.fromRouterId})),forceInitiatorTarget:({alpha:t,nodes:e,linksTargetsObj:n,linksSourcesObj:r,nodesObj:o})=>{for(const i of e){let s=null,a=null;switch(i.type){case"initiators":if(s=n[i.id],!s||!s.source)break;a=o[s.source],i.vx=(1-t)*(a?.x-400-i.x),i.vy=(1-t)*(a?.y+100*(s.connection.parameters.toRouterPortIdx+1)-i.y);break;case"targets":if(s=r[i.id],!s||!s.target)break;a=o[s.target],i.vx=(1-t)*(a?.x+400-i.x),i.vy=(1-t)*(a?.y+100*(s.connection.parameters.fromEgressPortIdx+1)-i.y);break}}},updateCoordinates:({components:t,connections:e,onEnd:n,onTick:r})=>{const o=vD.convertComponentsToNodes({components:t}),i=vD.convertConnectionsToLinks({connections:e}),s=i.reduce((u,d)=>(d.source&&(u[d.source]=d),u),{}),a=i.reduce((u,d)=>(d.target&&(u[d.target]=d),u),{}),l=o.reduce((u,d)=>(u[d.id]=d,u),{}),c=i.filter(u=>u.connection.type==="routers");bxt(o).alphaMin(.05).alphaDecay(.1).force("link",sxt(c).id(u=>u.id).distance(700)).force("collide",oxt(u=>u?.type==="routers"?700:0)).force("center",$1t()).force("custom",u=>vD.forceInitiatorTarget({alpha:u,nodes:o,linksTargetsObj:a,linksSourcesObj:s,nodesObj:l})).on("tick",()=>r(o)).on("end",()=>n(o))}},Cxt=({projectId:t,fetchedComponents:e,connections:n,projectRoutes:r,connectionRoutes:o,stageCoordinates:i,selectedNcnocComponent:s,connectionIndexes:a,memoizedNames:l,memoizedDeviceIds:c,memoizedSubtopologyChildColors:u,setSelectedNcnocComponent:d,setConnectionRoutes:h,setStageCoordinates:f,deleteComponentHandler:p})=>{const m=Nh.getAllByProjectId(t),y=vd.getAllByProjectId(t),v=ea.getAllByProjectId(t),b=Vo.getAllTypeInitiatorByProjectId(t),S=Vo.getAllTypeTargetByProjectId(t),w=C.useRef(!0),{width:A,height:_}=sc(),{diagramWidth:P,diagramHeight:R}=st.getStageDimensions({width:A,height:_}),O=bt(PNe),N=bt(Zx),M=bt(BNe),L=bt(nae),{updatedStageCoordinates:F}=bt(ENe),$=rc.getById(t),[D,{isLoading:k}]=rS(),[U,{isLoading:H}]=nS(),[V,{isLoading:q}]=Z9e(),[J,{isLoading:Q}]=aue(),se=Yn(),oe=C.useRef(null),[ie,ee]=C.useState(null),[re,fe]=C.useState(null),[we,xe]=C.useState(!1),[ve,Re]=C.useState(Ap),[pe,Be]=C.useState({...Ud}),[ke,Ne]=C.useState({...Ud}),[ot,ce]=C.useState(!1),[Ae,be]=C.useState(!1),[Se,Pe]=C.useState(JSON.parse(JSON.stringify(BY))),[Ue,_e]=C.useState(null),[Oe,ze]=C.useState(null),[ne,W]=C.useState(!1),[j,ue]=C.useState(Zk),{themeColors:he}=Lc(),Ce=C.useCallback(()=>{Re({...Ap}),fe(null)},[]),Ie=C.useCallback((ft,Ot,Wt)=>{ue(sn=>({...sn,[ft]:sn[ft].map(Jt=>Jt.id===Ot?{...Jt,coordinates:Wt.target.position()}:Jt)})),ce(!1),W(!0)},[j.routers,j.targets,j.initiators,s]),et=C.useCallback(ft=>({x:Math.round(ft.coordinates.x/Ve.gridBlockSize)*Ve.gridBlockSize,y:Math.round(ft.coordinates.y/Ve.gridBlockSize)*Ve.gridBlockSize}),[]),je=C.useCallback(()=>
453{if(pe.id&&pe.type){const{id:ft,type:Ot}=pe,Wt=j[Ot].find(sn=>sn.id===ft);if(Wt){const sn={...Wt,coordinates:et(Wt)};s&&d(Jt=>({...Jt,coordinates:sn.coordinates})),ue(Jt=>({...Jt,[Ot]:Jt[Ot].map(wn=>wn.id===ft?sn:wn)})),U({projectId:$.id,component:sn,coordinatesOnly:!0}).then(Jt=>{Be({...Ud}),ce(!1),W(!0)})}}},[j,s,pe,ot]),it=C.useCallback(()=>{const ft=[];Object.entries(M).forEach(([Ot,{type:Wt}])=>{j[Wt].forEach((sn,Jt)=>{sn.id===Ot&&ke.id!==sn.id&&ft.push({...sn,coordinates:et(sn),idx:Jt})})}),ke.id&&ke.type&&j[ke.type].forEach((Ot,Wt)=>{Ot.id===ke.id&&ft.push({...Ot,coordinates:et(Ot),idx:Wt})}),N.id&&N.type&&j[N.type].forEach((Ot,Wt)=>{Ot.id===N.id&&ft.push({...Ot,coordinates:et(Ot),idx:Wt})}),ue(Ot=>{const Wt=Eo.deepCopy(Ot);return ft.forEach(({idx:sn,...Jt})=>{Wt[Jt.type][sn]=Jt}),Wt}),V({projectId:$.id,components:ft}).then(Ot=>{be(!1),ce(!1),Ne({...Ud}),Be({...Ud}),W(!0)})},[j,N,M,Ae,ke,ot,$.id]),xt=C.useCallback((ft,Ot=!1)=>{f(ft),Eo.setLocalStorage(`${Xse}_${$.id}`,ft),Ot&&se(AL(null))},[i.scale,i.pan,$.id]),rt=({e:ft,propKey:Ot,propId:Wt,portType:sn,portIdx:Jt})=>{ft.cancelBubble,ft.evt.button!==2&&(ee(st.transformMousePosition(oe)),Re({propKey:Ot,propId:Wt,portType:sn,portIdx:Jt,startingCoordinates:st.transformMousePosition(oe)}))},Bt=async({e:ft,propKey:Ot,propId:Wt,portType:sn,portIdx:Jt})=>{if(ft.cancelBubble,ft.evt.button!==2){if(ve.propKey&&Ot&&ve.propId!==Wt){const wn=st.createConnection({editorMode:ve,projectId:$.id,props:{propKey:Ot,propId:Wt,portIdx:Jt,portType:sn}});if(n[wn.type].find(ii=>ii.type===wn.type&&ii.projectId===wn.projectId&&Tt.isEqual(ii.parameters,wn.parameters)))return;if(wn.type){const ii=st.invalidateConnections({connection:wn,connections:n});await J({connection:wn,invalidatedConnections:ii});const ol=y.find(Pn=>Pn.id===wn.parameters.fromInitiatorId),yt=v.find(Pn=>Pn.id===wn.parameters.toTargetId),pt=wn.type===Fe.INITIATORS;if(!(pt?ol:yt))return;const $t=Pw.getUpdatePayloadByCreateConnection({routerId:pt?wn.parameters.toRouterId:wn.parameters.fromRouterId,routers:m,initiators:y,targets:v,initiatorConnections:b,targetConnections:S,createdConnection:wn});await U({projectId:t,component:$t})}}Ce()}},dn=(ft,Ot)=>{ft.evt.button===0&&se(Sv({id:Ot.id,type:Ot.type,group:!1}))},kn=()=>{ee(st.transformMousePosition(oe))};C.useCallback(({elementId:ft,elementType:Ot,deselect:Wt=!1})=>{se(Sv({id:ft,type:Ot,group:!0,deselect:Wt})),Be({...Ud}),ot&&ce(!1),Ae&&be(!1)},[ot,Ae]);const jn=({elementId:ft,elementType:Ot,tempInclude:Wt=!0})=>{Wt&&!ke.id||ke.id!==ft?Ne({id:ft,type:Ot}):Ne({...Ud})},Cr=({e:ft,elementId:Ot,elementType:Wt})=>{if(ft.evt.button===2)return;const sn=st.transformMousePosition(oe);if(!ie||!sn)return;const Jt=Math.abs(ie.x-sn.x),wn=Math.abs(ie.y-sn.y);if(Jt>Ve.gridBlockSize/10||wn>Ve.gridBlockSize/10)return;const Sr=j[Wt]?.find(ii=>ii.id===Ot);Sr&&(Be({...Ud}),ce(!1),d(Eo.deepCopy(Sr)),ee(null),se(Sv({id:Sr.id,type:Sr.type})))},Xn=C.useCallback(()=>{const ft=st.transformMousePosition(oe);if(!re)return;const Ot=Math.abs(re.x-ft.x),Wt=Math.abs(re.y-ft.y);Ot>1||Wt>1},[re]),Wo=C.useCallback(ft=>{ft.evt.stopPropagation();const Ot=oe.current,Wt=i.scale,sn=Ot.getPointerPosition(),Jt={x:sn.x/Wt-i.pan.x/Wt,y:sn.y/Wt-i.pan.y/Wt},wn=ft.evt.deltaY>0?Wt/Ve.stageZoomFactor:Wt*Ve.stageZoomFactor,Sr={x:Math.round(-(Jt.x-sn.x/wn)*wn),y:Math.round(-(Jt.y-sn.y/wn)*wn)};xt({scale:wn,pan:Sr})},[i.scale,i.pan,$.id]),jo=C.useCallback(({e:ft,id:Ot,type:Wt,elementType:sn,hasDelete:Jt,...wn})=>{ft.evt.stopPropagation(),ft.evt.preventDefault(),ft.evt.button===2&&Pe({type:Wt,id:Ot,elementType:sn,location:{x:ft.evt.clientX,y:ft.evt.clientY},hasDelete:Jt,...wn})},[]),ri=C.useCallback(()=>{se(Im(null)),Pe(JSON.parse(JSON.stringify(BY))),se(eF(!1))},[]),Pu=C.useCallback(Tt.debounce(async()=>{const ft=oe.current;if(ft){const Ot=ft.toDataURL({quality:.5});if($.thumbnail!==Ot){const Wt=await st.scaleDownProjectThumbnail({dataURL:Ot}),sn={id:$.id,thumbnail:Wt};D({requestBody:sn})}}},500),[$.id,e]),ta=C.useCallback(()=>{if(pe.id)return;const ft=st.transformMousePosition(oe);if(ft&&ie){const Ot=ft.x-ie.x,Wt=ft.y-ie.y;be(!0),ue(sn=>({...sn,[Kt.componentTypes.initiators]:sn.initiators.length?sn.initiators.map((Jt,wn)=>
453{if(M[Jt.id]||ke.id===Jt.id||N.id===Jt.id){const Sr=e.initiators[wn];return Sr?{...Jt,coordinates:{x:Sr.coordinates.x+Ot,y:Sr.coordinates.y+Wt}}:Jt}return Jt}):[],[Kt.componentTypes.targets]:sn.targets.length?sn.targets.map((Jt,wn)=>{if(M[Jt.id]||ke.id===Jt.id||N.id===Jt.id){const Sr=e.targets[wn];return Sr?{...Jt,coordinates:{x:Sr.coordinates.x+Ot,y:Sr.coordinates.y+Wt}}:Jt}return Jt}):[],[Kt.componentTypes.routers]:sn.routers.length?sn.routers.map((Jt,wn)=>{if(M[Jt.id]||ke.id===Jt.id||N.id===Jt.id){const Sr=e.routers[wn];return Sr?{...Jt,coordinates:{x:Sr.coordinates.x+Ot,y:Sr.coordinates.y+Wt}}:Jt}return Jt}):[],[Kt.componentTypes.bridges]:sn.bridges.length?sn.bridges.map((Jt,wn)=>{if(M[Jt.id]||ke.id===Jt.id||N.id===Jt.id){const Sr=e.bridges[wn];return Sr?{...Jt,coordinates:{x:Sr.coordinates.x+Ot,y:Sr.coordinates.y+Wt}}:Jt}return Jt}):[]})),W(!0)}},[j,ie,re,M,e,ot,ke,N,pe]),oi=()=>{vD.updateCoordinates({components:j,connections:n,onTick:ft=>{ue(Ot=>({...Ot,...ft.reduce((Wt,sn)=>((sn.type===Fe.ROUTERS||sn.type===Fe.INITIATORS||sn.type===Fe.TARGETS)&&(Wt[sn.type]||(Wt[sn.type]=[]),Wt[sn.type].push({...sn,coordinates:{x:sn.x,y:sn.y}})),Wt),{})}))},onEnd:async ft=>{await V({projectId:$.id,components:ft.map(Ot=>({...Ot,coordinates:{x:st.roundDownToGrid({coordinate:Ot.x}),y:st.roundDownToGrid({coordinate:Ot.y})}}))}),W(!0),se(Jse(!1))}})},Qr=C.useCallback(ft=>{se(AL(st.sceneFitObjects({elementsArray:[...ft.initiators,...ft.targets,...ft.routers],diagramWidth:P,diagramHeight:R})))},[P,R]);return C.useEffect(()=>{O&&ri()},[O]),C.useEffect(()=>{if(Se.elementType===Kt.elementTypes.connections&&r.length){const ft=r.find(Wt=>Wt.connectionId===Se.id),Ot={initiators:[],targets:[]};ft&&(Object.entries(ft.initiators).forEach(([Wt,sn])=>{Ot.initiators[c.initiators[Wt]]={componentId:Wt,...sn}}),Object.entries(ft.targets).forEach(([Wt,sn])=>{Ot.targets[c.targets[Wt]]={componentId:Wt,...sn}})),ze(Ot)}},[Se,r,c]),C.useEffect(()=>{!pe.id&&!ot&&!Tt.isEqual(e,j)&&ue(e)},[e,j.routers.length,j.targets.length,j.initiators.length,j.bridges.length,j.virtualTargets.length,pe.id,ot]),C.useEffect(()=>(document.addEventListener("mouseup",Ce),()=>document.removeEventListener("mouseup",Ce)),[Ce]),C.useEffect(()=>{if(!w.current&&$.id&&(j.initiators.length||j.routers.length||j.targets.length)){const ft=st.getStoredStageCoordinates({projectId:$.id});f(ft||st.sceneFitObjects({elementsArray:[...j.initiators,...j.routers,...j.targets],diagramWidth:P,diagramHeight:R})),w.current=!0}},[$,j,i]),C.useEffect(()=>{F&&xt(F,!0)},[F]),C.useEffect(()=>{w.current=!1},[$.id]),C.useEffect(()=>{oe.current&&$.id&&Pu()},[j,n,$.id,i]),C.useEffect(()=>{!s&&Ue&&_e(null)},[s,Ue]),C.useEffect(()=>{!Se.id&&Oe&&ze(null),Se.id&&(Be({...Ud}),ce(!1))},[Se.id,Oe]),C.useEffect(()=>{L&&oi()},[L,j.routers.length,j.targets.length,j.initiators.length,j.bridges.length,j.virtualTargets.length,n.routers.length,n.targets.length,n.initiators.length]),C.useLayoutEffect(()=>{L&&Qr(j)},[L,j]),C.useLayoutEffect(()=>{if(L){h({});return}if(!_ee||!j.routers.length&&!j.targets.length&&!j.initiators.length&&!j.bridges.length&&!n.routers.length&&!n.targets.length&&!n.initiators.length&&!n.bridges.length)return;const{boundary:ft,blockers:Ot}=st.getProjectComponentsBoundaryAndBlockers(j),Wt=st.getConnectionCoordinates(n,Ot);tme(),nme(ft.upperLeftX,ft.upperLeftY,ft.lowerRightX,ft.lowerRightY),Object.values(Ot).forEach(({upperLeftX:Jt,upperLeftY:wn,lowerRightX:Sr,lowerRightY:ii})=>{rme(Jt,wn,Sr,ii)}),ime(),Object.entries(Wt).forEach(([Jt,wn])=>ome(wn.startX,wn.startY,wn.endX,wn.endY,Jt)),sme();const sn=Object.entries(Wt).reduce((Jt,[wn,Sr])=>({...Jt,[wn]:JSON.parse(ame(wn))}),{});h(sn),W(!1)},[$.id,e,j.routers.length,j.targets.length,j.initiators.length,j.bridges.length,j.virtualTargets.length,n,n.routers.length,n.targets.length,n.initiators.length,n.bridges.length,ne,_ee,L]),K(gr,{children:[Se.id?g(P1t,{deleteComponentHandler:p,projectId:$.id,closeContextMenu:ri,memoizedNames:l,memoizedDeviceIds:{initiators:c.initiators,targets:c.targets,routers:c.routers,bridges:c.bridges},createConnectionHandler:J,connections:n,...Se}):null,$?K(QEt,{ref:oe,width:P,height:R,scaleX:i.scale,scaleY:i.scale,x:i.pan.x,y:i.pan.y,style:{position:"absolute",width:`${P}px`,height:`${R}px`,overflow:"hidden",left:0},draggable:!ve.propKey&&!pe.id&&!Se.id&&!ot,onMouseDown:ft=>{xe(!0),ft?.target?.attrs?.elementId&&ft.evt.button!==2&&(kn(),fe(st.transformMousePosition(oe)))},onMouseMove:()=>{we&&(ve.propKey||N.id)&&fe(st.transformMousePosition(oe))},onDragEnd:ft=>{!ve.propKey&&!pe.id&&xt({scale:i.scale,pan:ft.currentTarget.position()})},onMouseUp:ft=>{we&&xe(!1);const Ot=ft?.target?.attrs?.elementId;if(!Ot){if(ft.evt.button!==2){Xn();return}if(ft.evt.button!==2&&!pe.id){Xn();return}return}const Wt=ft.target.attrs?.elementType;Wt&&Cr({e:ft,elementId:Ot,elementType:Wt})},onWheel:Wo,children:[g(ZEt,{pan:i.pan,scale:i.scale,blockSize:Ve.gridBlockSize,stage:{width:P,height:R}}),K(Xge,{draggable:!1,onMouseDown:ft=>{if(Object.keys(M).length&&(ft.target.attrs.elementId&&ft.target.attrs.elementType||N.id&&N.type)&&M[ft.target.attrs.elementId||N.id]){ce(!0),Be({...Ud});return}if(ce(!1),ft.target.attrs.elementId&&ft.target.attrs.elementType){Be({id:ft.target.attrs.elementId,type:ft.target.attrs.elementType});return}if(N.id&&N.type){Be({id:N.id,type:N.type});return}},onDragMove:ft=>{!pe.id&&ot?ta():pe.id&&pe.type&&Ie(pe.type,pe.id,ft)},onMouseUp:ft=>
453{if(ot)it();else{const Ot=st.transformMousePosition(oe);if(Ot&&ie){const Wt=Math.abs(Ot.x-ie.x),sn=Math.abs(Ot.y-ie.y);(Wt>Ve.gridBlockSize/20||sn>Ve.gridBlockSize/20)&&je()}}},children:[ve.propKey&&re?g(Yv,{points:[ve.startingCoordinates.x,ve.startingCoordinates.y,re.x,re.y],strokeWidth:Ve.connectionLineStrokeWidth,stroke:ve.propKey==="initiators"?he.designOrange[100]:ve.propKey==="targets"?he.designCyan[100]:he.designBlue[100]},`${ve.propKey}-editorMode`):null,g(a1t,{connections:n.routers,components:e.routers,connectionRoutes:o,showConnectionContextMenu:jo,colors:u,scale:i.scale,selectConnection:dn,highlightedRoutes:Ue,connectionContextMenuOpenId:Se.id?Se.id:""}),g(l1t,{connections:n.initiators,fromElements:e.initiators,toElements:e.routers,connectionRoutes:o,portType:"inGress",showConnectionContextMenu:jo,scale:i.scale,selectConnection:dn,highlightedRoutes:Ue,connectionContextMenuOpenId:Se.id?Se.id:""}),g(i1t,{connections:n.targets,fromElements:e.targets,toElements:e.routers,connectionRoutes:o,portType:"eGress",showConnectionContextMenu:jo,scale:i.scale,selectConnection:dn,highlightedRoutes:Ue,connectionContextMenuOpenId:Se.id?Se.id:""}),g(B1t,{connections:n.bridges,components:[...e.routers,...e.bridges],connectionRoutes:o,showConnectionContextMenu:jo,colors:u,scale:i.scale,selectConnection:dn,highlightedRoutes:Ue,connectionContextMenuOpenId:Se.id?Se.id:""}),e.initiators.map(ft=>g(o1t,{component:ft,connected:!!a.initiatorIds[ft.id],selected:N.id===ft.id||M[ft.id]||Se.id===ft.id,editorMode:ve,mouseDownHandler:rt,mouseUpHandler:Bt,onGroupMouseDown:jn,onDragEnd:jn,showConnectionContextMenu:jo,fetchedComponents:e},ft.id)),e.targets.map(ft=>g(n1t,{component:ft,connected:!!a.targetIds[ft.id],selected:N.id===ft.id||M[ft.id]||Se.id===ft.id,editorMode:ve,mouseDownHandler:rt,mouseUpHandler:Bt,onGroupMouseDown:jn,onDragEnd:jn,showConnectionContextMenu:jo,fetchedComponents:e},ft.id)),e.routers.map(ft=>g(r1t,{component:ft,color:u[ft.id],selected:N.id===ft.id||M[ft.id]||Se.id===ft.id,connectionIndexes:a,editorMode:ve,onGroupMouseDown:jn,onDragEnd:jn,mouseDownHandler:rt,mouseUpHandler:Bt,showConnectionContextMenu:jo,fetchedComponents:e},ft.id)),e.bridges.map(ft=>g(R1t,{component:ft,colors:u,selected:N.id===ft.id||M[ft.id]||Se.id===ft.id,editorMode:ve,onGroupMouseDown:jn,onDragEnd:jn,mouseDownHandler:rt,mouseUpHandler:Bt,showConnectionContextMenu:jo,bridgeConnections:n.bridges},ft.id))]})]}):null]})},j6=({activeTab:t,handleActiveTabChange:e,tabs:n,leftPosition:r})=>g(le,{sx:{position:"absolute",bottom:0,left:r,width:"100%",backgroundColor:"#FAFAFA",borderTop:"1px solid lightgray"},children:g(tg,{value:t,onChange:e,"aria-label":"scrollable bottom nav tabs",sx:{"& .MuiTabs-indicator":{backgroundColor:tt}},children:n.filter(o=>o.isVisible).map(o=>g(Sa,{id:`bottom-panel-tab-${o.value}`,value:o.value,label:o.label,sx:{"&.Mui-selected":{color:tt}}},o.value))})}),Sxt=({projectId:t,activeTab:e,isAvailableConfigurableTest:n,leftPosition:r})=>{const o="Overview",i="Design",s="Access Map",a="Address Map",l="Configurable Test",c="Register Map",u="Network",d=Yn(),h=(y,v)=>{d(YP(v))},p=!!Wp.getByProjectId(t).isRegisterMapGenerationEnabled,m=C.useMemo(()=>[{value:Un.OVERVIEW,label:o,isVisible:!g1.isProd},{value:Un.DESIGN,label:i,isVisible:!0},{value:Un.DESIGN_X6,label:`${i} (X6)`,isVisible:!g1.isProd},{value:Un.NETWORK,label:`${u}`,isVisible:!g1.isProd},{value:Un.ACCESS_MAP,label:s,isVisible:!0},{value:Un.ADDRESS_MAP,label:a,isVisible:!0},{value:Un.REGISTER_MAP,label:c,isVisible:p},{value:Un.CONFIGURABLE_TEST,label:l,isVisible:n}],[p,n]);return C.useEffect(()=>{(!p&&e===Un.REGISTER_MAP||!n&&e===Un.CONFIGURABLE_TEST)&&h({},Un.DESIGN)},[e,p]),g(j6,{activeTab:e,handleActiveTabChange:h,tabs:m,leftPosition:r})},Bm=({folderIcon:t,icon:e,title:n,closeHandler:r,iconTooltipTitle:o})=>K(le,{pt:1,pb:1,pl:2,pr:2,display:"flex",justifyContent:"space-between",sx:{alignItems:"center",width:"100%",fontSize:"14px",'& [data-testid="AccountTreeIcon"]':{color:tt}},gap:2,children:[t||e?K(Mt,{direction:"row",spacing:1,children:[t||null,e||null]}):null,g(Ke,{variant:"h6",noWrap:!0,component:"div",sx:{textTransform:"uppercase"},children:n}),r?g(Vp,{tooltipProps:{title:o},IconButtonProps:{onClick:r},iconType:wa.closeIcon}):g(le,{sx:{px:1}})]}),Ext=({tabSelection:t,activeTab:e,selectActiveTab:n})=>
453g(tg,{value:e,onChange:(r,o)=>n(o),variant:"scrollable","aria-label":"scrollable nav tabs",sx:{"& .MuiTabScrollButton-horizontal":{width:20,color:"white",backgroundColor:tt}},children:t.map(r=>g(Sa,{value:r.id,label:r.name,sx:{py:0,height:1}},`${r.name}-register-tab`))}),AB={getCenterPanelTableHeight:t=>t-Rs.headerHeight-Rs.footerHeight/2},xxt=({mergedCellLabelOverlayRows:t,columnHeaderHeight:e=30,rowHeight:n=40})=>{const o=C.useRef(null);return C.useEffect(()=>{const i=document.querySelector(".MuiDataGrid-virtualScroller");return i&&o.current&&i.appendChild(o.current),()=>{i&&o.current&&o.current.isConnected&&i.contains(o.current)&&i.removeChild(o.current)}},[]),g(le,{ref:o,style:{position:"absolute",top:e,left:0,width:"100%",height:"100%",zIndex:2},children:t.map(i=>i.map((s,a)=>g(Ke,{style:{position:"absolute",height:n,width:s.width,top:s.top,left:s.left,display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"normal",wordBreak:"break-word",textAlign:"center",overflow:"hidden"},fontSize:11,children:s.label},`${s.rowId}-${a}`)))})},wxt=({registerMap:t})=>{const n="Address",r="Register ID",o="Default Value",i="Access",s=Array.from({length:32},(k,U)=>(31-U).toString()),a="address",l="register-id",c="register-default-value",u="register-access",d="bit",h="-",f=80,p=185,m=120,y=80,v=65,b=30,S=40,w=100,{height:A}=sc(),_=ei.getCenterPanelHeight(A),[P,R]=C.useState({pageSize:w,page:0}),O=k=>`${d}${k}`,N=(k,U)=>U?`${k}: ${U}`:k,M=k=>{const U={borderStyle:"solid",borderColor:"black"};switch(k){case 4:return{...U,borderWidth:"1px 1px 1px 0px"};case 2:return{...U,borderWidth:"1px 0px 1px 1px"};case 3:return{...U,borderWidth:"1px 0px 1px 0px"};case 1:return{...U,borderWidth:"1px"};default:return{borderWidth:"0px"}}},L=C.useMemo(()=>s.reduce((k,U)=>(k[O(U)]={description:"",mergedCellBorder:0},k),{}),[]),{registerMapRows:F,mergedCellLabelOverlayRowsPerPage:$}=C.useMemo(()=>{const k={};k[0]=[];const U=f+p+m+y;return{registerMapRows:t.map((V,q)=>{const J=q%w,Q=Math.floor(q/w);J===0&&(k[Q]=[]);const se=`register-row-${q}`,oe={},ie=[];return V.fields.forEach(ee=>{const re=N(ee.name,ee.description);if(ee.bitWidth===1){const fe=32-ee.bitOffset-1;ie.push({rowId:se,label:ee.name,top:J*S,left:U+fe*v,width:v}),oe[O(ee.bitOffset.toString())]={description:re,mergedCellBorder:1}}else{const fe=ee.bitWidth+ee.bitOffset-1,we=32-fe-1;ie.push({rowId:se,label:ee.name,top:J*S,left:U+we*v-1,width:v*ee.bitWidth});for(let xe=fe;xe>=ee.bitOffset;xe--){const ve=O(xe.toString());xe===fe?oe[ve]={description:re,mergedCellBorder:2}:xe===ee.bitOffset?oe[ve]={description:re,mergedCellBorder:4}:oe[ve]={description:re,mergedCellBorder:3}}}}),k[Q].push(ie),{id:se,...L,[a]:V.addressOffset,[l]:{name:V.name,description:V.description},[c]:V.defaultValue,[u]:V.access,...oe}}),mergedCellLabelOverlayRowsPerPage:k}},[t]),D=C.useMemo(()=>[{field:a,headerName:n,headerClassName:"center-align-address-header",width:f,hideable:!1,renderCell:k=>g(le,{sx:{backgroundColor:"white",pl:"8px",borderRight:"1px solid lightgray"},children:k.value})},{field:l,headerName:r,headerClassName:"center-align-register-id-header",width:p,hideable:!1,renderCell:k=>g(rn,{title:k.value.description,placement:"right-start",children:g(le,{sx:{backgroundColor:"white",pl:"8px",whiteSpace:"nowrap",borderRight:"1px solid lightgray"},children:k.value.name})})},{field:c,headerName:o,headerClassName:"center-align-address-header",width:m,hideable:!1,renderCell:k=>g(le,{sx:{backgroundColor:"white",pl:"8px",borderRight:"1px solid lightgray"},children:k.value})},{field:u,headerName:i,headerClassName:"center-align-address-header",width:y,hideable:!1,renderCell:k=>g(le,{sx:{backgroundColor:"white",pl:"8px",borderRight:"1px solid lightgray"},children:k.value})},...s.map(k=>({field:O(k),headerName:k,headerClassName:"center-align-bit-header",width:v,hideable:!1,renderCell:U=>{const H=!!U.value.description,V=H?"white":"inherit",q=H?"":h;return g(rn,{title:U.value.description,placement:"right-start",children:g(le,{sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:V,...M(U.value.mergedCellBorder)},children:q})})}}))],[]);return K(le,{sx:{position:"relative"},children:[g(Dm,{tableType:ps.REGISTER_MAP,wrapperSx:{p:0,flex:1,minHeight:"inherit"},dataGridSx:{height:AB.getCenterPanelTableHeight(_)-b,zIndex:1,minHeight:"inherit","& .center-align-address-header":{pl:"18px"},"& .center-align-register-id-header":{pl:"40px"},"& .center-align-bit-header":{pl:"26px"},"& .MuiDataGrid-columnHeader":{pointerEvents:"none"},"& .MuiDataGrid-columnHeaderTitle":{textAlign:"center",width:"100%"},"& .MuiDataGrid-cell":{backgroundColor:"lightgray",p:0,alignItems:"center",justifyContent:"center"}},rows:F,columns:D,rowHeight:S,columnHeaderHeight:b,paginationModel:P,onPaginationModelChange:R,pageSizeOptions:[w],hideFooter:t.length<w,disableColumnResize:!0,disableColumnSelector:!0,disableColumnMenu:!0,disableColumnFilter:!0,disableColumnSorting:!0,showColumnVerticalBorder:!0}),g(xxt,{mergedCellLabelOverlayRows:$[P.page],columnHeaderHeight:b,rowHeight:S}
453)]})},gme=({tabSelection:t,activeTab:e,selectActiveTab:n,isGetAllProjectRegisterLoading:r,registers:o})=>K(le,{children:[g(Ext,{tabSelection:t,activeTab:e,selectActiveTab:n}),r?g(tl,{}):g(le,{sx:{position:"relative"},children:g(wxt,{registerMap:o},`register-map-${e}`)})]}),mme=(t,e)=>{const n=Object.entries(e);return n.reduce((r,[o,i],s)=>{const a=s===n.length-1?"":"&";return i?r+`${o}=${i}${a}`:r},t+"?")},Axt=Nr.injectEndpoints({endpoints:t=>({getAllProjectNcnocRegister:t.query({query:({projectId:e,routerId:n})=>mme(dt.projectNcnocRegisters,{projectId:e,routerId:n}),providesTags:[We.ProjectRegister],transformResponse:e=>e})})}),{useGetAllProjectNcnocRegisterQuery:yme}=Axt,Txt=(t,e)=>{const{data:n=[]}=yme({projectId:t,routerId:e});return n},_xt=(t,e)=>{const{isLoading:n}=yme({projectId:t,routerId:e});return n},Mee={getAll:Txt,getAllProjectRegisterIsLoading:_xt},Ixt=({projectId:t})=>{const e="System",{data:n}=nl(t),r=C.useMemo(()=>[{id:"",name:e},...n.routers.map(c=>({id:c.id,name:c.name}))],[n.routers]),[o,i]=C.useState(""),s=Mee.getAll(t,o),a=Mee.getAllProjectRegisterIsLoading(t,o);return g(gme,{tabSelection:r,activeTab:o,selectActiveTab:i,isGetAllProjectRegisterLoading:a,registers:s})},Pxt=Nr.injectEndpoints({endpoints:t=>({getAllProjectCnocRegister:t.query({query:({projectId:e,type:n})=>mme(dt.projectCnocRegisters,{projectId:e,type:n}),providesTags:[We.ProjectRegister],transformResponse:e=>e})})}),{useGetAllProjectCnocRegisterQuery:vme}=Pxt,Rxt=(t,e)=>{const{data:n=[]}=vme({projectId:t,type:e});return n},Oxt=(t,e)=>{const{isLoading:n}=vme({projectId:t,type:e});return n},Dee={getAll:Rxt,getAllProjectRegisterIsLoading:Oxt};var _b=(t=>(t.SYSTEM="system",t.HOME_NODE="homeNode",t.SUBORDINATE_NODE="subordinateNode",t.REQUEST_NODE="requestNode",t.UCIE="ucie",t))(_b||{});const bme=Nr.injectEndpoints({endpoints:t=>({getAllProjectComponentCnocRouterByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectComponentCnocRouter}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectComponentCnocRouter],transformResponse:(e,n,r)=>e}),createProjectComponentCnocRouter:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentCnocRouter}`,method:nn.POST,body:{logicalCoordinateX:e.logicalCoordinateX,logicalCoordinateY:e.logicalCoordinateY,projectId:e.projectId,subtopologyId:e.subtopologyId}}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.ProjectConnectionCnocRouter,We.ProjectCnocAddress,We.ProjectRegister]}),updateProjectComponentCnocRouter:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentCnocRouter}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(bme.util.updateQueryData("getAllProjectComponentCnocRouterByProjectId",{projectId:e.projectId},i=>{const s=i.findIndex(a=>a.id===e.id);s>=0&&(i[s]=e)}));try{await r}catch{o.undo()}},transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectConnectionCnocRouter,We.ProjectComponentCnocDevice]}),deleteProjectComponentCnocRouter:t.mutation({query:({id:e,projectId:n})=>({url:`${dt.projectComponentCnocRouter}?id=${e}&projectId=${n}`,method:nn.DELETE}),transformErrorResponse:e=>({error:e}),transformResponse:e=>e,invalidatesTags:[We.ProjectComponentCnocRouter,We.ProjectComponentCnocDevice,We.ProjectComponentCnocBridges,We.ProjectConnectionCnocRouter,We.ProjectCnocSubtopology,We.ProjectCnocAddress,We.ProjectRegister]})})}),{useGetAllProjectComponentCnocRouterByProjectIdQuery:Cme,useCreateProjectComponentCnocRouterMutation:Nxt,useUpdateProjectComponentCnocRouterMutation:Mxt,useDeleteProjectComponentCnocRouterMutation:Dxt}=bme;var Ao=(t=>(t.HN_F_WITHOUT_L3="HN_F_NO_L3",t.HN_F_WITH_L3="HN_F_L3",t.DEVICE_ONLY="DeviceOnly",t.REPEATER="Repeater",t))(Ao||{});const Sme=Nr.injectEndpoints({endpoints:t=>({getAllProjectConnectionCnocRouterByProjectId:t.query({query:({projectId:e})=>`${dt.projectConnectionCnocRouter}/${e}`,providesTags:[We.ProjectConnectionCnocRouter],transformResponse:e=>e}),bulkCreateAllProjectConnectionCnocRouter:t.mutation({query:e=>({url:`${dt.projectConnectionCnocRouter}
453`,method:nn.POST,body:e}),async onQueryStarted(e,{dispatch:n,queryFulfilled:r}){const o=e[0].projectId,i=n(Sme.util.updateQueryData("getAllProjectConnectionCnocRouterByProjectId",{projectId:o},s=>{e.forEach(a=>{s.push(a)})}));try{await r}catch{i.undo()}},transformErrorResponse:e=>e,transformResponse:e=>e}),deleteProjectConnectionCnocRouter:t.mutation({query:({id:e,projectId:n})=>({url:`${dt.projectConnectionCnocRouter}?id=${e}&projectId=${n}`,method:nn.DELETE}),transformErrorResponse:e=>({error:e}),transformResponse:e=>e,invalidatesTags:[We.ProjectConnectionCnocRouter]})})}),{useGetAllProjectConnectionCnocRouterByProjectIdQuery:Eme,useBulkCreateAllProjectConnectionCnocRouterMutation:Lxt,useDeleteProjectConnectionCnocRouterMutation:kxt}=Sme,Fxt=t=>{const{data:e=[]}=Eme({projectId:t});return e},q6={getAllByProjectId:Fxt};var Kl=(t=>(t.ROUTER="ROUTER",t.DEVICE="DEVICE",t.BRIDGE="BRIDGE",t))(Kl||{});const BR=t=>{const{data:e=[]}=Cme({projectId:t});return e},Bxt=(t,e)=>BR(e).find(o=>o.id===t)??null,$xt=t=>{const n=BR(t).filter(r=>r.type===Ao.HN_F_WITH_L3||r.type===Ao.HN_F_WITHOUT_L3);return Tt.sortBy(n,"deviceId")},Hxt=t=>BR(t).filter(r=>(r.type===Ao.HN_F_WITH_L3||r.type===Ao.HN_F_WITHOUT_L3)&&r.isHashed).length,Uxt=(t,e)=>{const n=q6.getAllByProjectId(e),r=BR(e),o=n.filter(s=>s.type===Kl.BRIDGE&&s.connectedBridgeId===t),i=r.find(s=>s.id===Tt.head(o)?.fromRouterId);return i||null},Th={getAllByProjectId:BR,getById:Bxt,getHomeRoutersByProjectId:$xt,getHashedHomeRoutersCountByProjectId:Hxt,getParentRouterByConnectedCnocBridgeId:Uxt},xme=Nr.injectEndpoints({endpoints:t=>({getAllProjectComponentCnocDeviceByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectComponentCnocDevice}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectComponentCnocDevice],transformResponse:(e,n,r)=>e}),createProjectComponentCnocDevice:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentCnocDevice}`,method:nn.POST,body:{connectedPort:e.connectedPort,routerId:e.routerId,projectId:e.projectId,subtopologyId:e.subtopologyId}}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.ProjectComponentCnocRouter,We.ProjectConnectionCnocRouter,We.ProjectRegister]}),updateProjectComponentCnocDevice:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentCnocDevice}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(xme.util.updateQueryData("getAllProjectComponentCnocDeviceByProjectId",{projectId:e.projectId},i=>{const s=i.findIndex(a=>a.id===e.id);s>=0&&(i[s]=e)}));try{await r}catch{o.undo()}},transformResponse:e=>e,transformErrorResponse:e=>e}),deleteProjectComponentCnocDevice:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentCnocDevice}`,method:nn.DELETE,body:{id:e.id,projectId:e.projectId}}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.ProjectComponentCnocDevice,We.ProjectComponentCnocRouter,We.ProjectConnectionCnocRouter,We.ProjectCnocAddress,We.ProjectRegister]})})}),{useGetAllProjectComponentCnocDeviceByProjectIdQuery:wme,useCreateProjectComponentCnocDeviceMutation:zxt,useUpdateProjectComponentCnocDeviceMutation:Vxt,useDeleteProjectComponentCnocDeviceMutation:Gxt}=xme;var Yr=(t=>(t.RN="RN",t.SN="SN",t.MASTER="Master",t.SLAVE="Slave",t))(Yr||{});const Rw=t=>{const{data:e=[]}=wme({projectId:t});return e},Wxt=(t,e)=>{const r=Rw(e).find(o=>o.id===t);return r||null},jxt=t=>{const n=Rw(t).filter(r=>r.type===Yr.SN||r.type===Yr.SLAVE);return Tt.sortBy(n,"deviceId")},qxt=t=>{const n=Rw(t).filter(r=>r.type===Yr.RN||r.type===Yr.MASTER);return Tt.sortBy(n,"deviceId")},Yxt=t=>{const n=Rw(t).filter(r=>r.type===Yr.MASTER);return Tt.sortBy(n,"deviceId")},Xxt=t=>Rw(t).filter(r=>(r.type===Yr.SN||r.type===Yr.SLAVE)&&r.isInterleaved).length,Aa={getAllByProjectId:Rw,getById:Wxt,getSubordinateNodesByProjectId:jxt,getRequestNodesByProjectId:qxt,getAllTypeAxiMasterByProjectId:Yxt,getInterleavedSubordinateDevicesCountByProjectId:Xxt},Ame=Nr.injectEndpoints({endpoints:t=>({getAllProjectComponentCnocBridgeByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectComponentCnocBridge}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectComponentCnocBridges],transformResponse:(e,n,r)=>e}),createProjectComponentCnocBridge:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentCnocBridge}
453`,method:nn.POST,body:{diagramNodeOrientation:e.diagramNodeOrientation,routerId:e.routerId,projectId:e.projectId,subtopologyId:e.subtopologyId,locationId:e.locationId}}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.ProjectConnectionCnocRouter,We.ProjectRegister]}),updateProjectComponentCnocBridge:t.mutation({query:({requestBody:e})=>({url:`${dt.projectComponentCnocBridge}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(Ame.util.updateQueryData("getAllProjectComponentCnocBridgeByProjectId",{projectId:e.projectId},i=>{const s=i.findIndex(a=>a.id===e.id);s>=0&&(i[s]=e)}));try{await r}catch{o.undo()}},transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectRegister]}),deleteProjectComponentCnocBridge:t.mutation({query:({id:e,projectId:n})=>({url:`${dt.projectComponentCnocBridge}?id=${e}&projectId=${n}`,method:nn.DELETE}),transformErrorResponse:e=>({error:e}),transformResponse:e=>e,invalidatesTags:[We.ProjectComponentCnocBridges,We.ProjectConnectionCnocRouter,We.ProjectCnocAddress,We.ProjectRegister]})})}),{useGetAllProjectComponentCnocBridgeByProjectIdQuery:TB,useCreateProjectComponentCnocBridgeMutation:Kxt,useUpdateProjectComponentCnocBridgeMutation:Qxt,useDeleteProjectComponentCnocBridgeMutation:Zxt}=Ame,Tme=t=>{const{data:e=[]}=TB({projectId:t});return e},Jxt=(t,e)=>Tme(e).find(r=>r.id===t),_h={getAllByProjectId:Tme,getById:Jxt},ewt=({projectId:t})=>{const e="System",n="Home Node",r="Subordinate Node",o="Request Node",i="C2C Bridge",s=!!Th.getAllByProjectId(t).length,a=!!Aa.getSubordinateNodesByProjectId(t).length,l=!!Aa.getRequestNodesByProjectId(t).length,c=!!_h.getAllByProjectId(t).length,u=C.useMemo(()=>{const m=[{id:_b.SYSTEM,name:e}];return s&&m.push({id:_b.HOME_NODE,name:n}),a&&m.push({id:_b.SUBORDINATE_NODE,name:r}),l&&m.push({id:_b.REQUEST_NODE,name:o}),c&&m.push({id:_b.UCIE,name:i}),m},[s,a,l,c]),[d,h]=C.useState(_b.SYSTEM),f=Dee.getAll(t,d),p=Dee.getAllProjectRegisterIsLoading(t,d);return g(gme,{tabSelection:u,activeTab:d,selectActiveTab:h,isGetAllProjectRegisterLoading:p,registers:f})},_me=({projectId:t})=>{const e="Register Map",n=rc.getById(t);return K(le,{width:"100%",children:[g(Bm,{icon:g(z6e,{}),title:g(gr,{children:e})}),K(To,{sx:{backgroundColor:"white",m:1},children:[pr.NCNOC===n.type?g(Ixt,{projectId:t}):null,pr.CNOC===n.type?g(ewt,{projectId:t}):null]})]})};var Y6={},twt=hr;Object.defineProperty(Y6,"__esModule",{value:!0});var Ime=Y6.default=void 0,nwt=twt(yr()),rwt=vr;Ime=Y6.default=(0,nwt.default)((0,rwt.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"}),"GridOn");var X6={},owt=hr;Object.defineProperty(X6,"__esModule",{value:!0});var Pme=X6.default=void 0,iwt=owt(yr()),swt=vr;Pme=X6.default=(0,iwt.default)((0,swt.jsx)("path",{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83"}),"Speed");const Rme=t=>Object.values(kr).indexOf(t),Ome=t=>Object.values(zo).indexOf(t),awt=({anchorEl:t,selectedKey:e,handleSelectOption:n,handleCloseMenu:r})=>{const o=i=>{n(i),r()};return g(Es,{anchorEl:t,open:!!t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:6},onClose:()=>r(),children:Bse.map(({key:i,value:s})=>K(mr,{selected:i===e,onClick:()=>o(s),sx:{pl:0,pr:"8px"},children:[g(i4,{sx:{m:0,p:0,mr:"10px",color:L3[s]}}),s]},i))})},Lee=1e3,kee=1,Fee="Gbps",Bee=1,$ee=12,Hee="cycles",Nme="Read Bandwidth",Mme="Write Bandwidth",Dme="Read Latency",Lme="Write Latency";ql.READ_BANDWIDTH,ql.WRITE_BANDWIDTH,ql.READ_LATENCY,ql.WRITE_LATENCY;ql.READ_BANDWIDTH+"",ql.WRITE_BANDWIDTH+"",ql.READ_LATENCY+"",ql.WRITE_LATENCY+"";const kme=t=>Object.values(kr)[t],Fme=t=>Object.values(zo)[t],i_={computeTableValue:({base:t,multiplier:e,divisor:n,suffix:r})=>t!==void 0?`${Number(t*e/n).toFixed(2)} ${r}`:"-",generateNcnocTableData:({projectReachability:t,projectRoutes:e,initiatorConnectionEntries:n,targetConnectionEntries:r,initiatorComponentEntries:o,targetComponentEntries:i,virtualTargetComponentEntries:s})=>{const a={},l={};
453i.forEach(h=>{h.componentId!==0&&(l[h.id]=h.name)}),s.forEach(h=>{l[h.id]=l[h.parameters.parentTargetId]+h.name});const c=[...i,...s].filter(h=>h.componentId!==0);c.forEach(h=>{const f=l[h.id];a[f]||(a[f]={}),o.forEach(p=>{const m=p.name,y={},v=t.find(b=>b.initiatorId===p.id&&b.targetId===h.id);if(v){const b=n.find(P=>P.parameters.fromInitiatorId===v.initiatorId)?.id,S=r.find(P=>P.parameters.toTargetId===v.targetId)?.id,w=e.find(P=>P.connectionId===b),A=e.find(P=>P.connectionId===S);y.rootPolicy=kme(v.securityPolicy),y.interfacePolicy=Fme(v.interfaceSecurity);const _=kr.BLOCKED===y.rootPolicy;y.writeBandwidth=i_.computeTableValue({base:_?void 0:w?.targets[v.targetId]?.bw,multiplier:kee,divisor:Lee,suffix:Fee}),y.readBandwidth=i_.computeTableValue({base:_?void 0:A?.initiators[v.initiatorId]?.bw,multiplier:kee,divisor:Lee,suffix:Fee}),y.writeLatency=i_.computeTableValue({base:_?void 0:w?.targets[v.targetId]?.step,multiplier:$ee,divisor:Bee,suffix:Hee}),y.readLatency=i_.computeTableValue({base:_?void 0:A?.initiators[v.initiatorId]?.step,multiplier:$ee,divisor:Bee,suffix:Hee})}a[f][m]=y})});const u=o.reduce((h,f)=>(h[f.name]={componentId:f.id,deviceId:f.componentId},h),{}),d=c.reduce((h,f)=>(h[l[f.id]]={componentId:f.id,deviceId:f.componentId},h),{});return{tableDataMatrix:a,initiatorDeviceIdMapping:u,targetDeviceIdMapping:d}}},Uee={"& .MuiInputBase-root":{position:"initial"},"& .MuiFormLabel-root":{top:"-8px","&.MuiInputLabel-shrink":{top:"0px"}},"& input":{p:1},width:"50%",m:0},lwt=({projectId:t,tableType:e,fetchedComponents:n,componentReachabilities:r,connections:o,projectRoutes:i,centerPanelHeight:s})=>{const a=VP(),[l,c]=C.useState(null),[u,d]=C.useState(null),[h,f]=C.useState({}),[p,m]=C.useState(null),[y,v]=C.useState(void 0),[b,S]=C.useState(void 0),[w,A]=C.useState(null),_=C.useRef(null),[P]=C.useState(ql.READ_BANDWIDTH),[R]=cue(),O=({newRootPolicy:V,newInterfacePolicy:q})=>
453{if(!y||!b)return;const J=Rme(V),Q=Ome(q),se={...r.find(oe=>M[y].componentId===oe.initiatorId&&L[b].componentId===oe.targetId),policy:V,accessPolicy:q,securityPolicy:J,interfaceSecurity:Q};R({projectId:t,items:se})},{tableDataMatrix:N,initiatorDeviceIdMapping:M,targetDeviceIdMapping:L}=C.useMemo(()=>i_.generateNcnocTableData({projectReachability:r,projectRoutes:i,initiatorConnectionEntries:o.initiators,targetConnectionEntries:o.targets,initiatorComponentEntries:n.initiators,targetComponentEntries:n.targets,virtualTargetComponentEntries:n.virtualTargets}),[n,r,i,o]),{rows:F,cols:$}=C.useMemo(()=>{const V=Object.keys(L).sort((J,Q)=>L[J].deviceId-L[Q].deviceId).map(J=>({id:J,name:J,...Object.fromEntries(Object.entries(N[J]).map(([Q,se])=>[Q,se]))})),q=[{field:"name",headerName:"",width:150,hideable:!1,disableColumnMenu:!0},...Object.keys(M).sort((J,Q)=>M[J].deviceId-M[Q].deviceId).map(J=>({field:J,headerName:J,hideable:!1,filterable:!1,width:150,renderCell:Q=>{const se=Q.value?.rootPolicy+Q.value?.interfacePolicy,oe=Bse.find(ie=>ie.key===se)?.value??D3;return ps.ACCESS_MAP===e?se?g(rn,{title:oe,placement:"right-start",children:g(Di,{onClick:ie=>{ie.stopPropagation(),m(ie.currentTarget),v(Q.field),S(`${Q.id}`),A(Q.value.rootPolicy+(Q.value.accessPolicy?Q.value.accessPolicy:zo.SECURE))},ref:_,sx:{p:"1px",backgroundColor:tt},disabled:!se,children:g(i4,{sx:{m:0,color:L3[oe]}})})}):g(rn,{title:mOe,placement:"right-start",children:g(i4,{sx:{m:0,color:L3[D3]}})}):K(gr,{children:[ql.READ_BANDWIDTH===P&&(Q.value?.readBandwidth??"-"),ql.WRITE_BANDWIDTH===P&&(Q.value?.writeBandwidth??"-"),ql.READ_LATENCY===P&&(Q.value?.readLatency??"-"),ql.WRITE_LATENCY===P&&(Q.value?.writeLatency??"-")]})}}))];return{rows:V,cols:q}},[N,e,P]),{filteredRows:D,filteredColumns:k}=C.useMemo(()=>{const V=u&&u.toLocaleLowerCase(),q=l&&l.toLocaleLowerCase();return{filteredRows:V?F.filter(J=>J.name.toLowerCase().includes(V)):F,filteredColumns:q?$.filter(J=>!J.field||J.field==="name"?!0:J.field.toLowerCase().includes(q)):$}},[l,u,F,$]),U=V=>{V!==w&&O({newRootPolicy:OY[V].rootPolicy,newInterfacePolicy:OY[V].interfacePolicy})},H=()=>{m(null),v(void 0),S(void 0),A(null)};return C.useEffect(()=>{Object.keys(k).length&&f(V=>{const q=Eo.deepCopy(V);return Object.values(k).forEach(J=>{J.field&&!q.hasOwnProperty(J.field)&&(q[J.field]=!0)}),q})},[k]),C.useEffect(()=>{c(null),d(null)},[e]),C.useEffect(()=>{a(yNe(ql.READ_BANDWIDTH)),a(vNe(H1.SECURITY_POLICY))},[]),K(le,{sx:{width:"100%"},children:[g(Bm,{icon:e===ps.PERFORMANCE_MATRIX?g(Pme,{sx:{color:tt}}):g(Ime,{sx:{color:tt}}),title:e===ps.PERFORMANCE_MATRIX?g(gr,{children:sNe}):g(gr,{children:aNe})}),g(le,{sx:{display:"flex",justifyContent:"space-between",width:"100%",flexDirection:"row",gap:1,px:2,height:"33px"},children:K(le,{sx:{display:"flex",gap:1,width:"100%"},children:[g(lo,{variant:"outlined",placeholder:"Enter filter value...",label:"Filter Columns",fullWidth:!0,value:l||"",sx:{...Uee},onChange:V=>{c(V.target.value)}}),g(lo,{variant:"outlined",placeholder:"Enter filter value...",label:"Filter Rows",fullWidth:!0,value:u||"",sx:{...Uee},onChange:V=>{d(V.target.value)}})]})}),g(Dm,{wrapperSx:{p:1,minHeight:"inherit"},dataGridSx:{height:AB.getCenterPanelTableHeight(s),"& .MuiDataGrid-cell[data-field='name']":{position:"sticky",zIndex:1,left:0,backgroundColor:"white"},"& .MuiDataGrid-columnHeader[data-field='name']":{position:"sticky",zIndex:1,left:0,backgroundColor:"white"}},columnVisibilityModel:h,onColumnVisibilityModelChange:V=>f(V),tableType:e,rows:D,columns:k}),g(awt,{anchorEl:p,selectedKey:w,handleSelectOption:U,handleCloseMenu:H})]})},K6=({searchTerm:t,handleSearchInputValueChange:e})=>g(le,{sx:{display:"flex",justifyContent:"space-between",width:"100%",height:"33px",px:1},children:g(lo,{variant:"outlined",placeholder:"Enter filter value...",label:"Filter Rows",fullWidth:!0,value:t,onChange:n=>e(n.target.value),sx:{"& .MuiInputBase-root":{position:"initial"},"& .MuiFormLabel-root":{top:"-8px","&.MuiInputLabel-shrink":{top:"0px"}},"& input":{p:1},m:0}})}),zee={position:"sticky",zIndex:1,left:0,backgroundColor:"white"},cwt=({projectId:t,searchTerm:e,targets:n,targetNameList:r,ncnocAddresses:o})=>{const i="Name",s="Device ID",a="Base",l="Size",c="Limit",u="Target Device",d="Device ID",h="Start Address (Base)",f="Size",p="End Address (Limit)",{width:m,height:y}=sc(),v=bt(h0),b=bt(gd),S=Wp.getByProjectId(t),w=ei.getCenterPanelHeight(y),A=ei.getCenterPanelWidth({width:m,isLeftPanelOpen:v,isRightPanelOpen:b}),_=Math.floor(A/3)-15,P=AB.getCenterPanelTableHeight(w),R=C.useMemo(()=>e?n.filter(L=>(r.find($=>
453$.id===L.id)?.name??"").toLowerCase().includes(e.toLowerCase())):n,[n,e]),O=(L,F=!1)=>{const $=F?L:js+_t.getZeroPaddedAddressWithUnderscores(L,S.addressWidth/4);return g(Ke,{children:$})},N=C.useMemo(()=>R.reduce((F,$)=>{const D=o.find(U=>U.targetId===$.id);if(!D)return F;const k=r.find(U=>U.id===D.targetId)?.name??"";return F.push({id:D.targetId,[i]:k,[s]:$.componentId,[a]:D.base.toUpperCase(),[l]:_t.getDisplaySizeFromBaseAndLimit(D.base,D.limit),[c]:D.limit.toUpperCase()}),F},[]),[R,o,r]),M=C.useMemo(()=>[{field:i,headerName:u,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:_,flex:1,renderCell:({value:F})=>O(F,!0)},{field:s,headerName:d,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:_,flex:1,renderCell:({value:F})=>O(F,!0)},{field:a,headerName:h,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:_,flex:1,renderCell:({value:F})=>O(F)},{field:l,headerName:f,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:_,flex:1,renderCell:({value:F})=>O(F,!0)},{field:c,headerName:p,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:_,flex:1,renderCell:({value:F})=>O(F)}],[S.addressWidth,_]);return g(Dm,{tableType:ps.ADDRESS_MAP,wrapperSx:{p:1,minHeight:"inherit"},dataGridSx:{height:P,"& .MuiDataGrid-cell[data-field='name']":zee,"& .MuiDataGrid-columnHeader[data-field='name']":zee,"& .MuiDataGrid-cell":{display:"flex",alignItems:"center"}},rows:N,columns:M})},Bme=({handleEditAddressMap:t})=>g(Sn,{sx:{color:"white",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7},mr:1,height:"10%"},onClick:t,children:"Edit"}),Q6=({handleSave:t,handleCancel:e})=>K(Mt,{direction:"row",spacing:.5,sx:{width:"100%",justifyContent:"right"},children:[g(Sn,{sx:{color:"white",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7},"&:disabled":{backgroundColor:"grey"}},onClick:t,children:"Save"}),g(Sn,{sx:{border:"1px solid slategray",color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}},onClick:e,children:"Cancel"})]}),Z6=({title:t,accordionTitle:e="",subtitle:n=""})=>K(le,{sx:{textAlign:"center",width:"100%",pb:2},children:[K(Ke,{variant:"h6",noWrap:!0,sx:{flex:15},children:[g("strong",{children:e})," ",t]}),g(Ke,{sx:{fontSize:"12px"},children:n})]}),J6=({headerNames:t,headerWidths:e})=>g(Mt,{direction:"row",children:t.map((n,r)=>g(Ke,{sx:{backgroundColor:"#f2f0f0",height:wOe,width:e?e[r]??U1:U1,border:"1px solid slategray",textAlign:"center",alignContent:"center"},children:n},`edit-address-${r}`))}),e8="0x40000000",t8="0x7FFFFFFF",Ib={getAllFreeAddressRanges(t){const e=[25,24,23,22,21],n=Ib.getOccupiedAddressRanges(t),r=t.length-n.length,o=[];return e.some(i=>{const s=Ib.getAllBlocksBySizeExponent(i),a=Ib.getNonOverlappingBlocks({addressBlocks:s,addressMap:n});return a.length>=r?(o.push(...a),!0):!1}),Ib.convertAddressBlocksToRanges(o)},getOccupiedAddressRanges(t){return t.filter(e=>e.base||e.limit)},getAllBlocksBySizeExponent(t){const e=BigInt(2**t),n=[];for(let r=_t.getHexToBigInt(e8);r<_t.getHexToBigInt(t8);r+=e){const o=r+e-BigInt(1);n.push({start:r,end:o})}return n},getNonOverlappingBlocks({addressBlocks:t,addressMap:e}){return t.reduce((n,r)=>(Ib.isBlockOverlappingWithAddressMap(r,e)||n.push(r),n),[])},isBlockOverlappingWithAddressMap(t,e){return e.filter(n=>n.base&&n.limit).some(n=>{const r=_t.getHexToBigInt(n.base),o=_t.getHexToBigInt(n.limit);return Ib.isOverlappingAddressRegions({baseA:r,baseB:t.start,limitA:o,limitB:t.end})})},isOverlappingAddressRegions({baseA:t,baseB:e,limitA:n,limitB:r}){return t>=e&&t<=r||n<=r&&n>=e||t<=e&&n>=r},convertAddressBlocksToRanges(t){return t.map(e=>({base:_t.getBigIntToHex(e.start),limit:_t.getBigIntToHex(e.end)}))}},Hr=({controlValue:t,onChangeHandler:e,size:n="small",label:r="",labelPlacement:o="start",disabled:i,fclSX:s={},controlSX:a={}})=>g(le,{children:g(ec,{value:r,label:r,labelPlacement:o,className:"form-control-label-wrapper with-label",sx:{display:"flex",justifyContent:"space-between",height:32,mr:2,pt:.5,pb:.5,"& .MuiFormControlLabel-label":{"&:hover":{cursor:"default"}},...s},control:g(zb,{checked:t,value:t,size:n,sx:{height:"24px","& .MuiButtonBase-root":{height:"inherit"},"& .MuiSwitch-switchBase.Mui-checked":{color:tt},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:tt},...a},onChange:l=>e(l.target.checked),disabled:i}),componentsProps:{typography:{fontSize:"12px"}},disabled:i})}),uwt=({handleAutofill:t,disableAutofill:e,isAutofillApplied:n})=>{const r="Autofill Addresses",o=`Fills empty addresses only, does not overwrite existing addresses; Allocates 2MiB to 32MiB address ranges ${e8} to ${t8}`;return g(rn,{title:n?"Revert autofilled addresses applied":o,placement:"right",children:g(Hr,{controlValue:n,onChangeHandler:t,label:r,disabled:e,labelPlacement:"start",size:"small",fcl
453SX:{m:0}})})},dwt=({rows:t,disableAutofill:e,isAutofillApplied:n,handleSave:r,handleCancel:o,handleAutofill:i})=>{const s="70vh";return g(Iu,{open:!0,onClose:(p,m)=>{m!=="backdropClick"&&o()},PaperProps:{sx:{width:"1000px",height:s,overflow:"hidden"}},maxWidth:!1,children:K(To,{sx:{backgroundColor:"white",border:"1px solid lightgrey",height:"100%"},children:[K(le,{sx:{flex:1,width:"100%",overflowY:"auto"},children:[K(Mt,{direction:"column",sx:{alignItems:"center"},children:[g(Z6,{title:"Edit Address Map"}),g(Mt,{direction:"row",children:g(J6,{headerNames:["Target Device","Device ID","Start Address (Base)","Size","End Address (Limit)"],headerWidths:[U1,zse]})})]}),g(Mt,{direction:"column",sx:{width:"100%",alignItems:"center",height:`calc(${s} - 150px)`},children:t})]}),K(Mt,{direction:"row",sx:{mt:2},children:[g(le,{width:"100%",children:g(Mt,{direction:"row",spacing:1,children:g(uwt,{handleAutofill:i,disableAutofill:e,isAutofillApplied:n})})}),g(Q6,{handleSave:r,handleCancel:o})]})]})})},Vee=({addressValue:t,addressWidth:e,handleSubmit:n,handleFocus:r})=>{const[o,i]=C.useState(!1),[s,a]=C.useState(t),l=C.useRef(null),c=()=>{r(),i(!0)},u=v=>{if(_t.getIsValidHex(v.target.value)){const b=v.target.value.toUpperCase();a(b),n(b)}},d=()=>{n(s)},h=()=>{i(!1),d()},f=v=>{v.key==="Enter"&&(v.preventDefault(),h(),l.current?.blur())},p=o?s:_t.getZeroPaddedAddressWithUnderscores(s,e),m=`[0-9A-F]{0,${e}}`,y={height:hL,width:U1,border:"1px solid lightgray","&::after":{borderBottomColor:so},"&:hover:not(.Mui-disabled, .Mui-error)::before":{borderBottomColor:so},"& input":{caretColor:so}};return C.useEffect(()=>{a(t)},[t]),g(J1,{inputRef:l,value:p.toUpperCase(),onFocus:c,onChange:u,onSubmit:d,onBlur:h,onKeyDown:f,sx:y,inputProps:{maxLength:e,inputMode:"text",pattern:m,sx:{textAlign:"left"}},startAdornment:g(qr,{position:"start",children:g(To,{sx:{height:"27px",py:0,px:1,borderRight:"1px solid lightgray",alignContent:"center"},children:js})})})},hwt=({sizeValue:t,sizeUnit:e,setSizeValue:n,setSizeUnit:r,handleSubmit:o,handleFocus:i})=>{const s=C.useRef(null),a=Object.values(bv).filter(v=>typeof v=="string"),l=()=>{i(),n(_t.getExactDecimalString(t))},c=v=>{const b=v.target.value,[,S]=b.split("."),w=Number(b);(b===""||!Number.isNaN(w)&&w>=0&&w<=Number.MAX_SAFE_INTEGER&&(!S||S.length<=_t.SIZE_VALUE_PRECISION))&&(n(b),o(b,e))},u=()=>{o(t,e)},d=()=>{u()},h=v=>{v.key==="."&&t===""&&n("0."),v.key==="Enter"&&(v.preventDefault(),d(),s.current?.blur())},f=v=>{if(v!==e){r(v);const b=_t.getExactDecimalString(t);o(b,v)}},p={height:hL,width:U1,border:"1px solid lightgray","&::after":{borderBottomColor:so},"&:hover:not(.Mui-disabled, .Mui-error)::before":{borderBottomColor:so},"& input":{caretColor:so}},m={height:"28px",width:"120px","&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:so},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:so}},y={width:"60px","&.Mui-selected":{backgroundColor:XI},"&.Mui-selected:hover":{backgroundColor:XI,opacity:.7}};return g(le,{children:g(J1,{inputRef:s,value:t,onFocus:l,onChange:c,onSubmit:u,onBlur:d,onKeyDown:h,sx:p,inputProps:{inputMode:"text",sx:{textAlign:"right",pr:.6}},endAdornment:g(xa,{value:e,onOpen:i,onChange:v=>{f(Number(v.target.value))},variant:"outlined",sx:m,children:a.map((v,b)=>g(mr,{value:b,selected:b===e,sx:y,children:bv[b]},v))})})})},$me=({errorMessageTooltip:t,editableAddressName:e,editableAddressDeviceId:n,editableAddressBase:r,editableAddressLimit:o,addressWidth:i,hasError:s,handleBaseSubmit:a,handleLimitSubmit:l})=>{const[c,u]=C.useState(""),[d,h]=C.useState(bv.B),[f,p]=C.useState(!1),m=t?`${e}: ${t}`:e,y=(S,w)=>{if(u(S),h(w),!r.length)return;const A=_t.getLimitFromBaseAndSize(r,S,w);A!=o&&l(A)},v=()=>{p(!0)},b=()=>{p(!1)};return C.useEffect(()=>{const S=_t.getExactDecimalString(c);r.length&&o.length&&c!==""&&!isNaN(Number(S))&&y(S,d)},[r]),C.useEffect(()=>{if(f)return;const S=_t.getSizeFromBaseAndLimit(r,o),w={value:c,unit:d};_t.getAreSizesEquivalent(w,S)||(u(S.value),h(S.unit))},[o]),K(Mt,{direction:"row",sx:{alignItems:"center"},children:[g(le,{sx:{backgroundColor:"white",height:hL,width:U1,border:"1px solid lightgray",alignContent:"center",textAlign:"center",overflow:"hidden"},children:g(rn,{title:m,children:g(Ca,{invisible:!s,color:"error",variant:"dot",anchorOrigin:{vertical:"top",horizontal:"left"},sx:{maxWidth:"90%"},children:g(Ke,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})})})}),n?g(le,{sx:{backgroundColor:"white",height:hL,width:zse,border:"1px solid lightgray",alignContent:"center",textAlign:"center",overflow:"hidden"},children:g(Ke,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})}):null,g(Vee,{addressValue:r,addressWidth:i,handleSubmit:a,handleFocus:v}),g(hwt,{sizeValue:c,sizeUnit:d,setSizeValue:u,setSizeUnit:h,handleSubmit:y,handleFocus:v}),g(Vee,{addressValue:o,addressWidth:i,handleSubmit:l,handleFocus:b})]})},fwt=({projectId:t,targets:e,editableAddress:n,handleRowEdit:r,ncnocAddresses:o,targetNameList:i})=>{const s=ea.getById(n.targetId,t)??oB.getById(n.targetId,t),a="Address is required",l="Base address must be equal or less than the limit address",c="Targets must not overlap with other targets",u="Address exceeds N
453oC address width",d=Wp.getByProjectId(t),h=d.addressWidth/4,[f,p]=C.useState(n.base),[m,y]=C.useState(n.limit);C.useEffect(()=>{p(n.base),y(n.limit)},[n.base,n.limit]);const v=F=>{p(F),r({id:n.id,base:F})},b=F=>{y(F),r({id:n.id,limit:F})},S=F=>i.find(D=>D.id===F)?.name??"",w=_t.hasBlankAddress(n.base,n.limit),A=_t.getHasBaseExceededLimitAddress(n.base,n.limit),_=_t.getHasExceededAddressWidth(n.base,d.addressWidth),P=_t.getHasExceededAddressWidth(n.limit,d.addressWidth),R=mL.getOverlappedTargetNames({targets:e,targetId:n.targetId,inputBaseAddress:f,inputLimitAddress:m,ncnocAddresses:o,targetNameList:i}),O=w||A||_||P||!!R.length,M=(()=>w?a:A?l:_||P?u:R.length?c+` (${R})`:"")(),L=S(n.targetId);return g($me,{errorMessageTooltip:M,editableAddressName:L,editableAddressDeviceId:s.componentId,editableAddressBase:n.base,editableAddressLimit:n.limit,addressWidth:h,hasError:O,handleBaseSubmit:v,handleLimitSubmit:b})},pwt=({projectId:t,targetNameList:e,handleCancel:n})=>{const r=ea.getAllTypeNonDefaultByProjectId(t),o=oB.getAllByProjectId(t),i=wfe.getAllByProjectId(t),s=C.useRef(null),a=C.useRef(null),[l,c]=C.useState(i),[u]=Wut(),d=[...r,...o],h=!!s.current&&!Tt.isEqual(s.current,l),f=l.some(w=>!w.base&&!w.limit),p=!h&&!f,m=async()=>{const w=xB.getBulkUpdatePayload({ncnocAddresses:i,inputAddresses:l,projectId:t});w.ncnocAddresses.length&&await u({requestBody:w})},y=w=>{const A=l.map(_=>({..._,..._.id===w.id?w:{}}));c(A)},v=async()=>{await m(),n()},b=()=>{const w=`Not enough space to allocate 2MiB addresses from ${e8} to ${t8}`,A=Ib.getAllFreeAddressRanges(l),_=l.filter(R=>!R.base&&!R.limit).length;if(h&&s.current){const R=s.current,O=a.current;if(!O){c([...R]),s.current=null;return}const N=l.map(M=>{const L=R.find($=>$.id===M.id),F=O.find($=>$.id===M.id);return!L||!F?M:{...M,base:M.base===F.base?L.base:M.base,limit:M.limit===F.limit?L.limit:M.limit}});c(N),s.current=null,a.current=null;return}if(A.length<_){ln.error(w);return}const P=l.map(R=>{const O=A.shift();return!R.base&&!R.limit&&O?{...R,base:O.base,limit:O.limit}:R});_&&(s.current=[...l],a.current=[...P],c(P))},S=l.map(w=>g(fwt,{projectId:t,targets:d,editableAddress:w,handleRowEdit:y,ncnocAddresses:l,targetNameList:e},w.id));return g(dwt,{rows:S,handleSave:v,handleCancel:n,handleAutofill:b,disableAutofill:p,isAutofillApplied:h})},gwt=({projectId:t,targetComponents:e,virtualTargetComponents:n,ncnocAddresses:r})=>{const o="Address Map",[i,s]=C.useState(""),[a,l]=C.useState(!1),u=[...e.filter(m=>m.parameters.bus.protocol!==wt.SEC),...n].sort((m,y)=>m.componentId-y.componentId),d=u.reduce((m,y)=>{if(y.type===Fe.TARGETS&&m.push({id:y.id,name:y.name}),y.type===Fe.VIRTUAL_TARGETS){const v=y,b=m.find(w=>w.id===v.parameters.parentTargetId),S=b?b.name:"";m.push({id:y.id,name:S+y.name})}return m},[]);return K(le,{sx:{width:"100%",height:"100%",backgroundColor:"#fff"},children:[K(Mt,{direction:"row",alignItems:"center",children:[g(Bm,{icon:g(Mce,{}),title:g(gr,{children:o})}),g(Bme,{handleEditAddressMap:()=>{l(!0)}})]}),g(K6,{searchTerm:i,handleSearchInputValueChange:m=>{s(m)}}),g(cwt,{projectId:t,searchTerm:i,targets:u,targetNameList:d,ncnocAddresses:r}),a?g(pwt,{projectId:t,targetNameList:d,handleCancel:()=>{l(!1)}}):null]})},mwt=({configurableTestSequence:t})=>K(le,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%"},children:[g(Ke,{children:"Configurable Test is not yet available"}),K(Ke,{children:[t?.fileName," uploaded"]})]});typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);typeof window<"u"&&function(t){t.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value(...n){const r=document.createDocumentFragment();n.forEach(o=>{const i=o instanceof Node;r.appendChild(i?o:document.createTextNode(String(o)))}),this.appendChild(r)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class xm{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(t){function e(){return(n,r,o)=>{const i=o.value,s=n.__proto__;o.value=function(...a){this.disposed||(i.call(this,...a),s.dispose.call(this))}}}t.dispose=e})(xm||(xm={}));class Gee{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEac
vendor: 6,986 bytes, line 453
453h(e=>{e.dispose()}),this.items.clear())}contains(e){return this.items.has(e)}add(e){this.items.add(e)}remove(e){this.items.delete(e)}clear(){this.items.clear()}}(function(t){function e(n){const r=new t;return n.forEach(o=>{r.add(o)}),r}t.from=e})(Gee||(Gee={}));var ywt=typeof global=="object"&&global&&global.Object===Object&&global;const Hme=ywt;var vwt=typeof self=="object"&&self&&self.Object===Object&&self,bwt=Hme||vwt||Function("return this")();const Rf=bwt;var Cwt=Rf.Symbol;const Ih=Cwt;var Ume=Object.prototype,Swt=Ume.hasOwnProperty,Ewt=Ume.toString,TT=Ih?Ih.toStringTag:void 0;function xwt(t){var e=Swt.call(t,TT),n=t[TT];try{t[TT]=void 0;var r=!0}catch{}var o=Ewt.call(t);return r&&(e?t[TT]=n:delete t[TT]),o}var wwt=Object.prototype,Awt=wwt.toString;function Twt(t){return Awt.call(t)}var _wt="[object Null]",Iwt="[object Undefined]",Wee=Ih?Ih.toStringTag:void 0;function P0(t){return t==null?t===void 0?Iwt:_wt:Wee&&Wee in Object(t)?xwt(t):Twt(t)}function xf(t){return t!=null&&typeof t=="object"}var Pwt="[object Symbol]";function jp(t){return typeof t=="symbol"||xf(t)&&P0(t)==Pwt}function q_(t,e){for(var n=-1,r=t==null?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}var Rwt=Array.isArray;const oc=Rwt;var Owt=1/0,jee=Ih?Ih.prototype:void 0,qee=jee?jee.toString:void 0;function zme(t){if(typeof t=="string")return t;if(oc(t))return q_(t,zme)+"";if(jp(t))return qee?qee.call(t):"";var e=t+"";return e=="0"&&1/t==-Owt?"-0":e}var Nwt=/\s/;function Mwt(t){for(var e=t.length;e--&&Nwt.test(t.charAt(e)););return e}var Dwt=/^\s+/;function Lwt(t){return t&&t.slice(0,Mwt(t)+1).replace(Dwt,"")}function Qs(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Yee=0/0,kwt=/^[-+]0x[0-9a-f]+$/i,Fwt=/^0b[01]+$/i,Bwt=/^0o[0-7]+$/i,$wt=parseInt;function Y_(t){if(typeof t=="number")return t;if(jp(t))return Yee;if(Qs(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Qs(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Lwt(t);var n=Fwt.test(t);return n||Bwt.test(t)?$wt(t.slice(2),n?2:8):kwt.test(t)?Yee:+t}function Ow(t){return t}var Hwt="[object AsyncFunction]",Uwt="[object Function]",zwt="[object GeneratorFunction]",Vwt="[object Proxy]";function n8(t){if(!Qs(t))return!1;var e=P0(t);return e==Uwt||e==zwt||e==Hwt||e==Vwt}var Gwt=Rf["__core-js_shared__"];const Z5=Gwt;var Xee=function(){var t=/[^.]+$/.exec(Z5&&Z5.keys&&Z5.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Wwt(t){return!!Xee&&Xee in t}var jwt=Function.prototype,qwt=jwt.toString;function pS(t){if(t!=null){try{return qwt.call(t)}catch{}try{return t+""}catch{}}return""}var Ywt=/[\\^$.*+?()[\]{}|]/g,Xwt=/^\[object .+?Constructor\]$/,Kwt=Function.prototype,Qwt=Object.prototype,Zwt=Kwt.toString,Jwt=Qwt.hasOwnProperty,eAt=RegExp("^"+Zwt.call(Jwt).replace(Ywt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tAt(t){if(!Qs(t)||Wwt(t))return!1;var e=n8(t)?eAt:Xwt;return e.test(pS(t))}function nAt(t,e){return t?.[e]}function gS(t,e){var n=nAt(t,e);return tAt(n)?n:void 0}var rAt=gS(Rf,"WeakMap");const rz=rAt;var Kee=Object.create,oAt=function(){function t(){}return function(e){if(!Qs(e))return{};if(Kee)return Kee(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const iAt=oAt;function Vme(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function sAt(){}function Gme(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var aAt=800,lAt=16,cAt=Date.now;function uAt(t){var e=0,n=0;return function(){var r=cAt(),o=lAt-(r-n);if(n=r,o>0){if(++e>=aAt)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function dAt(t){return function(){return t}}var hAt=function(){try{var t=gS(Object,"defineProperty");return t({},"",{}),t}catch{}}();const _2=hAt;var fAt=_2?function(t,e){return _2(t,"toString",{configurable:!0,enumerable:!1,value:dAt(e),writable:!0})}:Ow;const pAt=fAt;var gAt=uAt(pAt);const mAt=gAt;function yAt(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function vAt(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function bAt(t){return t!==t}function CAt(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function SAt(t,e,n){return e===e?CAt(t,e,n):vAt(t,bAt,n)}function Wme(t,e){var n=t==null?0:t.length;return!!n&&SAt(t,e,0)>-1}var EAt=9007199254740991,xAt=/^(?:0|[1-9]\d*)$/;function r8(t,e){var n=typeof t;return e=e??EAt,!!e&&(n=="number"||n!="symbol"&&xAt.test(t))&&t>-1&&t%1==0&&t<e}function _B(t,e,n){e=="__proto__"&&_2?_2(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Nw(t,e){return t===e||t!==t&&e!==e}var wAt=Object.prototype,AAt=wAt.hasOwnProperty;function jme(t,e,n){var r=t[e];(!(AAt.call(t,e)&&Nw(r,n))||n===void 0&&!(e in t))&&_B(t,e,n)}function $R(t,e,n,r){var o=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var a=e[i],l=r?r(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),o?_B(n,a,l):jme(n,a,l)}return n}var Qee=Math.max;function TAt(t,e,n){return e=Qee(e===void 0?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Qee(r.length-e,0),s=Array(i);++o<i;)s[o]=r[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=r[o];return a[e]=n(s),Vme(t,this,a)}}function Mw(t,e){return mAt(TAt(t,e,Ow),t+"")}var _At=9007199254740991;function o8(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=_At}function mS(t){return t!=null&&o8(t.length)&&!n8(t)}function I2(t,e,n){if(!Qs(n))return!1;var r=typeof e;return(r=="number"?mS(n)&&r8(e,n.length):r=="string"&&e in n)?Nw(n[e],t):!1}function qme(t){return Mw(function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(o--,i):void 0,s&&I2(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),e=Object(e);++r<o;){var a=n[r];a&&t(e,a,r,i)}return e})}var IAt=Object.prototype;function IB(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||IAt;return t===n}function PAt(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var RAt="[object Arguments]";function Zee(t){return xf(t)&&P0(t)==RAt}var Yme=Object.prototype,OAt=Yme.hasOwnProperty,NAt=Yme.propertyIsEnumerable,MAt=Zee(function(){return arguments}())?Zee:function(t){return xf(t)&&OAt.call(t,"callee")&&!NAt.call(t,"callee")};const gx=MAt;function DAt(){return!1}var Xme=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jee=Xme&&typeof module=="object"&&module&&!module.nodeType&&module,LAt=Jee&&Jee.exports===Xme,ete=LAt?Rf.Buffer:void 0,kAt=ete?ete.isBuffer:void 0,FAt=kAt||DAt;const mx=FAt;var BAt="[object Arguments]",$At="[object Array]",HAt="[object Boolean]",UAt="[object Date]",zAt="[object Error]",VAt="[object Function]",GAt="[object Map]",WAt="[object Number]",jAt="[object Object]",qAt="[object RegExp]",YAt="[object Set]",XAt="[object String]",KAt="[object WeakMap]",QAt="[object ArrayBuffer]",ZAt="[object DataView]",JAt="[object Float32Array]",eTt="[object Float64Array
453]",tTt="[object Int8Array]",nTt="[object Int16Array]",rTt="[object Int32Array]",oTt="[object Uint8Array]",iTt="[object Uint8ClampedArray]",sTt="[object Uint16Array]",aTt="[object Uint32Array]",Ai={};Ai[JAt]=Ai[eTt]=Ai[tTt]=Ai[nTt]=Ai[rTt]=Ai[oTt]=Ai[iTt]=Ai[sTt]=Ai[aTt]=!0;Ai[BAt]=Ai[$At]=Ai[QAt]=Ai[HAt]=Ai[ZAt]=Ai[UAt]=Ai[zAt]=Ai[VAt]=Ai[GAt]=Ai[WAt]=Ai[jAt]=Ai[qAt]=Ai[YAt]=Ai[XAt]=Ai[KAt]=!1;function lTt(t){return xf(t)&&o8(t.length)&&!!Ai[P0(t)]}function HR(t){return function(e){return t(e)}}var Kme=typeof exports=="object"&&exports&&!exports.nodeType&&exports,X_=Kme&&typeof module=="object"&&module&&!module.nodeType&&module,cTt=X_&&X_.exports===Kme,J5=cTt&&Hme.process,uTt=function(){try{var t=X_&&X_.require&&X_.require("util").types;return t||J5&&J5.binding&&J5.binding("util")}catch{}}();const yx=uTt;var tte=yx&&yx.isTypedArray,dTt=tte?HR(tte):lTt;const PB=dTt;var hTt=Object.prototype,fTt=hTt.hasOwnProperty;function Qme(t,e){var n=oc(t),r=!n&&gx(t),o=!n&&!r&&mx(t),i=!n&&!r&&!o&&PB(t),s=n||r||o||i,a=s?PAt(t.length,String):[],l=a.length;for(var c in t)(e||fTt.call(t,c))&&!(s&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||r8(c,l)))&&a.push(c);return a}function Zme(t,e){return function(n){return t(e(n))}}var pTt=Zme(Object.keys,Object);const gTt=pTt;var mTt=Object.prototype,yTt=mTt.hasOwnProperty;function Jme(t){if(!IB(t))return gTt(t);var e=[];for(var n in Object(t))yTt.call(t,n)&&n!="constructor"&&e.push(n);return e}function UR(t){return mS(t)?Qme(t):Jme(t)}function vTt(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var bTt=Object.prototype,CTt=bTt.hasOwnProperty;function STt(t){if(!Qs(t))return vTt(t);var e=IB(t),n=[];for(var r in t)r=="constructor"&&(e||!CTt.call(t,r))||n.push(r);return n}function Dw(t){return mS(t)?Qme(t,!0):STt(t)}var ETt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xTt=/^\w*$/;function i8(t,e){if(oc(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||jp(t)?!0:xTt.test(t)||!ETt.test(t)||e!=null&&t in Object(e)}var wTt=gS(Object,"create");const bP=wTt;function ATt(){this.__data__=bP?bP(null):{},this.size=0}function TTt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var _Tt="__lodash_hash_undefined__",ITt=Object.prototype,PTt=ITt.hasOwnProperty;function RTt(t){var e=this.__data__;if(bP){var n=e[t];return n===_Tt?void 0:n}return PTt.call(e,t)?e[t]:void 0}var OTt=Object.prototype,NTt=OTt.hasOwnProperty;function MTt(t){var e=this.__data__;return bP?e[t]!==void 0:NTt.call(e,t)}var DTt="__lodash_hash_undefined__";function LTt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bP&&e===void 0?DTt:e,this}function HC(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}HC.prototype.clear=ATt;HC.prototype.delete=TTt;HC.prototype.get=RTt;HC.prototype.has=MTt;HC.prototype.set=LTt;function kTt(){this.__data__=[],this.size=0}function RB(t,e){for(var n=t.length;n--;)if(Nw(t[n][0],e))return n;return-1}var FTt=Array.prototype,BTt=FTt.splice;function $Tt(t){var e=this.__data__,n=RB(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():BTt.call(e,n,1),--this.size,!0}function HTt(t){var e=this.__data__,n=RB(e,t);return n<0?void 0:e[n][1]}function UTt(t){return RB(this.__data__,t)>-1}function zTt(t,e){var n=this.__data__,r=RB(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function $m(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}$m.prototype.clear=kTt;$m.prototype.delete=$Tt;$m.prototype.get=HTt;$m.prototype.has=UTt;$m.prototype.set=zTt;var VTt=gS(Rf,"Map");const CP=VTt;function GTt(){this.size=0,this.__data__={hash:new HC,map:new(CP||$m),string:new HC}}function WTt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function OB(t,e){var n=t.__data__;return WTt(e)?n[typeof e=="string"?"string":"hash"]:n.map}function jTt(t){var e=OB(this,t).delete(t);return this.size-=e?1:0,e}function qTt(t){return OB(this,t).get(t)}function YTt(t){return OB(this,t).has(t)}function XTt(t,e){var n=OB(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Hm(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Hm.prototype.clear=GTt;Hm.prototype.delete=jTt;Hm.prototype.get=qTt;Hm.prototype.has=YTt;Hm.prototype.set=XTt;var KTt="Expected a function";function s8(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(KTt);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(s8.Cache||Hm),n}s8.Cache=Hm;var QTt=500;function ZTt(t){var e=s8(t,function(r){return n.size===QTt&&n.clear(),r}),n=e.cache;return e}var JTt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e_t=/\\(\\)?/g,t_t=ZTt(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(JTt,function(n,r,o,i){e.push(o?i.replace(e_t,"$1"):r||n)}),e});
vendor: 3,946 bytes, line 453
453const n_t=t_t;function zR(t){return t==null?"":zme(t)}function eye(t,e){return oc(t)?t:i8(t,e)?[t]:n_t(zR(t))}var r_t=1/0;function NB(t){if(typeof t=="string"||jp(t))return t;var e=t+"";return e=="0"&&1/t==-r_t?"-0":e}function a8(t,e){e=eye(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[NB(e[n++])];return n&&n==r?t:void 0}function o_t(t,e,n){var r=t==null?void 0:a8(t,e);return r===void 0?n:r}function l8(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}var nte=Ih?Ih.isConcatSpreadable:void 0;function i_t(t){return oc(t)||gx(t)||!!(nte&&t&&t[nte])}function MB(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=i_t),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?MB(a,e-1,n,r,o):l8(o,a):r||(o[o.length]=a)}return o}var s_t=Zme(Object.getPrototypeOf,Object);const c8=s_t;var a_t="[object Object]",l_t=Function.prototype,c_t=Object.prototype,tye=l_t.toString,u_t=c_t.hasOwnProperty,d_t=tye.call(Object);function og(t){if(!xf(t)||P0(t)!=a_t)return!1;var e=c8(t);if(e===null)return!0;var n=u_t.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&tye.call(n)==d_t}function h_t(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),n=n>o?o:n,n<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i}function f_t(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:h_t(t,e,n)}var p_t="\\ud800-\\udfff",g_t="\\u0300-\\u036f",m_t="\\ufe20-\\ufe2f",y_t="\\u20d0-\\u20ff",v_t=g_t+m_t+y_t,b_t="\\ufe0e\\ufe0f",C_t="\\u200d",S_t=RegExp("["+C_t+p_t+v_t+b_t+"]");function nye(t){return S_t.test(t)}function E_t(t){return t.split("")}var rye="\\ud800-\\udfff",x_t="\\u0300-\\u036f",w_t="\\ufe20-\\ufe2f",A_t="\\u20d0-\\u20ff",T_t=x_t+w_t+A_t,__t="\\ufe0e\\ufe0f",I_t="["+rye+"]",oz="["+T_t+"]",iz="\\ud83c[\\udffb-\\udfff]",P_t="(?:"+oz+"|"+iz+")",oye="[^"+rye+"]",iye="(?:\\ud83c[\\udde6-\\uddff]){2}",sye="[\\ud800-\\udbff][\\udc00-\\udfff]",R_t="\\u200d",aye=P_t+"?",lye="["+__t+"]?",O_t="(?:"+R_t+"(?:"+[oye,iye,sye].join("|")+")"+lye+aye+")*",N_t=lye+aye+O_t,M_t="(?:"+[oye+oz+"?",oz,iye,sye,I_t].join("|")+")",D_t=RegExp(iz+"(?="+iz+")|"+M_t+N_t,"g");function L_t(t){return t.match(D_t)||[]}function k_t(t){return nye(t)?L_t(t):E_t(t)}function cye(t){return function(e){e=zR(e);var n=nye(e)?k_t(e):void 0,r=n?n[0]:e.charAt(0),o=n?f_t(n,1).join(""):e.slice(1);return r[t]()+o}}var F_t=cye("toUpperCase");const P2=F_t;function B_t(t){return P2(zR(t).toLowerCase())}function $_t(t,e,n,r){var o=-1,i=t==null?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function H_t(t){return function(e){return t?.[e]}}var U_t={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"},z_t=H_t(U_t);const V_t=z_t;
453var G_t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,W_t="\\u0300-\\u036f",j_t="\\ufe20-\\ufe2f",q_t="\\u20d0-\\u20ff",Y_t=W_t+j_t+q_t,X_t="["+Y_t+"]",K_t=RegExp(X_t,"g");function Q_t(t){return t=zR(t),t&&t.replace(G_t,V_t).replace(K_t,"")}var Z_t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function J_t(t){return t.match(Z_t)||[]}var eIt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function tIt(t){return eIt.test(t)}var uye="\\ud800-\\udfff",nIt="\\u0300-\\u036f",rIt="\\ufe20-\\ufe2f",oIt="\\u20d0-\\u20ff",iIt=nIt+rIt+oIt,dye="\\u2700-\\u27bf",hye="a-z\\xdf-\\xf6\\xf8-\\xff",sIt="\\xac\\xb1\\xd7\\xf7",aIt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lIt="\\u2000-\\u206f",cIt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fye="A-Z\\xc0-\\xd6\\xd8-\\xde",uIt="\\ufe0e\\ufe0f",pye=sIt+aIt+lIt+cIt,gye="['â]",rte="["+pye+"]",dIt="["+iIt+"]",mye="\\d+",hIt="["+dye+"]",yye="["+hye+"]",vye="[^"+uye+pye+mye+dye+hye+fye+"]",fIt="\\ud83c[\\udffb-\\udfff]",pIt="(?:"+dIt+"|"+fIt+")",gIt="[^"+uye+"]",bye="(?:\\ud83c[\\udde6-\\uddff]){2}",Cye="[\\ud800-\\udbff][\\udc00-\\udfff]",OE="["+fye+"]",mIt="\\u200d",ote="(?:"+yye+"|"+vye+")",yIt="(?:"+OE+"|"+vye+")",ite="(?:"+gye+"(?:d|ll|m|re|s|t|ve))?",ste="(?:"+gye+"(?:D|LL|M|RE|S|T|VE))?",Sye=pIt+"?",Eye="["+uIt+"]?",vIt="(?:"+mIt+"(?:"+[gIt,bye,Cye].join("|")+")"+Eye+Sye+")*",bIt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",CIt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",SIt=Eye+Sye+vIt,EIt="(?:"+[hIt,bye,Cye].join("|")+")"+SIt,xIt=RegExp([OE+"?"+yye+"+"+ite+"(?="+[rte,OE,"$"].join("|")+")",yIt+"+"+ste+"(?="+[rte,OE+ote,"$"].join("|")+")",OE+"?"+ote+"+"+ite,OE+"+"+ste,CIt,bIt,mye,EIt].join("|"),"g");function wIt(t){return t.match(xIt)||[]}function AIt(t,e,n){return t=zR(t),e=n?void 0:e,e===void 0?tIt(t)?wIt(t):J_t(t):t.match(e)||[]}var TIt="['â]",_It=RegExp(TIt,"g");function xye(t){return function(e){return $_t(AIt(Q_t(e).replace(_It,"")),t,"")}}var IIt=xye(function(t,e,n){return e=e.toLowerCase(),t+(n?B_t(e):e)});const DB=IIt;function PIt(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function hh(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Y_(n),n=n===n?n:0),e!==void 0&&(e=Y_(e),e=e===e?e:0),PIt(Y_(t),e,n)}function RIt(){this.__data__=new $m,this.size=0}function OIt(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function NIt(t){return this.__data__.get(t)}function MIt(t){return this.__data__.has(t)}var DIt=200;function LIt(t,e){var n=this.__data__;if(n instanceof $m){var r=n.__data__;if(!CP||r.length<DIt-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Hm(r)}return n.set(t,e),this.size=n.size,this}function mf(t){var e=this.__data__=new $m(t);this.size=e.size}mf.prototype.clear=RIt;mf.prototype.delete=OIt;mf.prototype.get=NIt;mf.prototype.has=MIt;mf.prototype.set=LIt;function kIt(t,e){return t&&$R(e,UR(e),t)}function FIt(t,e){return t&&$R(e,Dw(e),t)}var wye=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ate=wye&&typeof module=="object"&&module&&!module.nodeType&&module,BIt=ate&&ate.exports===wye,lte=BIt?Rf.Buffer:void 0,cte=lte?lte.allocUnsafe:void 0;function Aye(t,e){if(e)return t.slice();var n=t.length,r=cte?cte(n):new t.constructor(n);return t.copy(r),r}function $It(t,e){for(var n=-1,r=t==null?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function Tye(){return[]}var HIt=Object.prototype,UIt=HIt.propertyIsEnumerable,ute=Object.getOwnPropertySymbols,zIt=ute?function(t){return t==null?[]:(t=Object(t),$It(ute(t),function(e){return UIt.call(t,e)}))}:Tye;const u8=zIt;function VIt(t,e){return $R(t,u8(t),e)}var GIt=Object.getOwnPropertySymbols,WIt=GIt?function(t){for(var e=[];t;)l8(e,u8(t)),t=c8(t);return e}:Tye;const _ye=WIt;function jIt(t,e){return $R(t,_ye(t),e)}function Iye(t,e,n){var r=e(t);return oc(t)?r:l8(r,n(t))}function sz(t){return Iye(t,UR,u8)}function qIt(t){return Iye(t,Dw,_ye)}var YIt=gS(Rf,"DataView");const az=YIt;var XIt=gS(Rf,"Promise");const lz=XIt;var KIt=gS(Rf,"Set");const _1=KIt;var dte="[object Map]",QIt="[object Object]",hte="[object Promise]",fte="[object Set]",pte="[object WeakMap]",gte="[object DataView]",ZIt=pS(az),JIt=pS(CP),ePt=pS(lz),tPt=pS(_1),nPt=pS(rz),Pb=P0;(az&&Pb(new az(new ArrayBuffer(1)))!=gte||CP&&Pb(new CP)!=dte||lz&&Pb(lz.resolve())!=hte||_1&&Pb(new _1)!=fte||rz&&Pb(new rz)!=pte)&&(Pb=function(t){var e=P0(t),n=e==QIt?t.constructor:void 0,r=n?pS(n):"";if(r)switch(r){case ZIt:return gte;case JIt:return dte;case ePt:return hte;case tPt:return fte;case nPt:return pte}return e});const vx=Pb;var rPt=Object.prototype,oPt=rPt.hasOwnProperty;function iPt(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&oPt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var sPt=Rf.Uint8Array;const R2=sPt;function d8(t){var e=new t.constructor(t.byteLength);return new R2(e).set(new R2(t)),e}function aPt(t,e){var n=e?d8(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var lPt=/\w*$/;function cPt(t){var e=new t.constructor(t.source,lPt.exec(t));return e.lastIndex=t.lastIndex,e}var mte=Ih?Ih.prototype:void 0,yte=mte?mte.valueOf:void 0;function uPt(t){return yte?Object(yte.call(t)):{}}function Pye(t,e){var n=e?d8(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var dPt="[object Boolean]",hPt="[object Date]",fPt="[object Map]",pPt="[object Number]",gPt="[object RegExp]",mPt="[object Set]",yPt="[object String]",vPt="[object Symbol]",bPt="[object ArrayBuffer]",CPt="[object DataView]",SPt="[object Float32Array]",EPt="[object Float64Array
453]",xPt="[object Int8Array]",wPt="[object Int16Array]",APt="[object Int32Array]",TPt="[object Uint8Array]",_Pt="[object Uint8ClampedArray]",IPt="[object Uint16Array]",PPt="[object Uint32Array]";function RPt(t,e,n){var r=t.constructor;switch(e){case bPt:return d8(t);case dPt:case hPt:return new r(+t);case CPt:return aPt(t,n);case SPt:case EPt:case xPt:case wPt:case APt:case TPt:case _Pt:case IPt:case PPt:return Pye(t,n);case fPt:return new r;case pPt:case yPt:return new r(t);case gPt:return cPt(t);case mPt:return new r;case vPt:return uPt(t)}}function Rye(t){return typeof t.constructor=="function"&&!IB(t)?iAt(c8(t)):{}}var OPt="[object Map]";function NPt(t){return xf(t)&&vx(t)==OPt}var vte=yx&&yx.isMap,MPt=vte?HR(vte):NPt;const DPt=MPt;var LPt="[object Set]";function kPt(t){return xf(t)&&vx(t)==LPt}var bte=yx&&yx.isSet,FPt=bte?HR(bte):kPt;const BPt=FPt;var $Pt=1,HPt=2,UPt=4,Oye="[object Arguments]",zPt="[object Array]",VPt="[object Boolean]",GPt="[object Date]",WPt="[object Error]",Nye="[object Function]",jPt="[object GeneratorFunction]",qPt="[object Map]",YPt="[object Number]",Mye="[object Object]",XPt="[object RegExp]",KPt="[object Set]",QPt="[object String]",ZPt="[object Symbol]",JPt="[object WeakMap]",eRt="[object ArrayBuffer]",tRt="[object DataView]",nRt="[object Float32Array]",rRt="[object Float64Array]",oRt="[object Int8Array]",iRt="[object Int16Array]",sRt="[object Int32Array]",aRt="[object Uint8Array]",lRt="[object Uint8ClampedArray]",cRt="[object Uint16Array]",uRt="[object Uint32Array]",di={};di[Oye]=di[zPt]=di[eRt]=di[tRt]=di[VPt]=di[GPt]=di[nRt]=di[rRt]=di[oRt]=di[iRt]=di[sRt]=di[qPt]=di[YPt]=di[Mye]=di[XPt]=di[KPt]=di[QPt]=di[ZPt]=di[aRt]=di[lRt]=di[cRt]=di[uRt]=!0;di[WPt]=di[Nye]=di[JPt]=!1;function K_(t,e,n,r,o,i){var s,a=e&$Pt,l=e&HPt,c=e&UPt;if(n&&(s=o?n(t,r,o,i):n(t)),s!==void 0)return s;if(!Qs(t))return t;var u=oc(t);if(u){if(s=iPt(t),!a)return Gme(t,s)}else{var d=vx(t),h=d==Nye||d==jPt;if(mx(t))return Aye(t,a);if(d==Mye||d==Oye||h&&!o){if(s=l||h?{}:Rye(t),!a)return l?jIt(t,FIt(s,t)):VIt(t,kIt(s,t))}else{if(!di[d])return o?t:{};s=RPt(t,d,a)}}i||(i=new mf);var f=i.get(t);if(f)return f;i.set(t,s),BPt(t)?t.forEach(function(y){s.add(K_(y,e,n,y,t,i))}):DPt(t)&&t.forEach(function(y,v){s.set(v,K_(y,e,n,v,t,i))});var p=c?l?qIt:sz:l?Dw:UR,m=u?void 0:p(t);return yAt(m||t,function(y,v){m&&(v=y,y=t[v]),jme(s,v,K_(y,e,n,v,t,i))}),s}var dRt=4;function cz(t){return K_(t,dRt)}var hRt=1,fRt=4;function bs(t){return K_(t,hRt|fRt)}var pRt="__lodash_hash_undefined__";function gRt(t){return this.__data__.set(t,pRt),this}function mRt(t){return this.__data__.has(t)}function bx(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Hm;++e<n;)this.add(t[e])}bx.prototype.add=bx.prototype.push=gRt;bx.prototype.has=mRt;function yRt(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function h8(t,e){return t.has(e)}var vRt=1,bRt=2;function Dye(t,e,n,r,o,i){var s=n&vRt,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&bRt?new bx:void 0;for(i.set(t,e),i.set(e,t);++d<a;){var p=t[d],m=e[d];if(r)var y=s?r(m,p,d,e,t,i):r(p,m,d,t,e,i);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!yRt(e,function(v,b){if(!h8(f,b)&&(p===v||o(p,v,n,r,i)))return f.push(b)})){h=!1;break}}else if(!(p===m||o(p,m,n,r,i))){h=!1;break}}return i.delete(t),i.delete(e),h}function CRt(t){var e=-1,n=Array(t.size);return t.forEach(function(r,o){n[++e]=[o,r]}),n}function f8(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var SRt=1,ERt=2,xRt="[object Boolean]",wRt="[object Date]",ARt="[object Error]",TRt="[object Map]",_Rt="[object Number]",IRt="[object RegExp]",PRt="[object Set]",RRt="[object String]",ORt="[object Symbol]",NRt="[object ArrayBuffer]",MRt="[object DataView]",Cte=Ih?Ih.prototype:void 0,eU=Cte?Cte.valueOf:void 0;function DRt(t,e,n,r,o,i,s){switch(n){case MRt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case NRt:return!(t.byteLength!=e.byteLength||!i(new R2(t),new R2(e)));case xRt:case wRt:case _Rt:return Nw(+t,+e);case ARt:return t.name==e.name&&t.message==e.message;case IRt:case RRt:return t==e+"";case TRt:var a=CRt;case PRt:var l=r&SRt;if(a||(a=f8),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=ERt,s.set(t,e);var u=Dye(a(t),a(e),r,o,i,s);return s.delete(t),u;case ORt:if(eU)return eU.call(t)==eU.call(e)}return!1}var LRt=1,kRt=Object.prototype,FRt=kRt.hasOwnProperty;function BRt(t,e,n,r,o,i){var s=n&LRt,a=sz(t),l=a.length,c=sz(e),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=a[d];if(!(s?h in e:FRt.call(e,h)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var m=!0;i.set(t,e),i.set(e,t);for(var y=s;++d<l;){h=a[d];var v=t[h],b=e[h];if(r)var S=s?r(b,v,h,e,t,i):r(v,b,h,t,e,i);if(!(S===void 0?v===b||o(v,b,n,r,i):S)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var w=t.constructor,A=e.constructor;w!=A&&"constructor"in t&&"constructor"in e&&!(typeof w=="function"&&w instanceof w&&typeof A=="function"&&A instanceof A)&&(m=!1)}return i.delete(t),i.delete(e),m}var $Rt=1,Ste="[object Arguments]",Ete="[object Array]",sM="[object Object]",HRt=Object.prototype,xte=HRt.hasOwnProperty;function URt(t,e,n,r,o,i){var s=oc(t),a=oc(e),l=s?Ete:vx(t),c=a?Ete:vx(e);l=l==Ste?sM:l,c=c==Ste?sM:c;var u=l==sM,d=c==sM,h=l==c;if(h&&mx(t)){if(!mx(e))return!1;s=!0,u=!1}
vendor: 5,791 bytes, line 453
453if(h&&!u)return i||(i=new mf),s||PB(t)?Dye(t,e,n,r,o,i):DRt(t,e,l,n,r,o,i);if(!(n&$Rt)){var f=u&&xte.call(t,"__wrapped__"),p=d&&xte.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,y=p?e.value():e;return i||(i=new mf),o(m,y,n,r,i)}}return h?(i||(i=new mf),BRt(t,e,n,r,o,i)):!1}function LB(t,e,n,r,o){return t===e?!0:t==null||e==null||!xf(t)&&!xf(e)?t!==t&&e!==e:URt(t,e,n,r,LB,o)}var zRt=1,VRt=2;function GRt(t,e,n,r){var o=n.length,i=o,s=!r;if(t==null)return!i;for(t=Object(t);o--;){var a=n[o];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){a=n[o];var l=a[0],c=t[l],u=a[1];if(s&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new mf;if(r)var h=r(c,u,l,t,e,d);if(!(h===void 0?LB(u,c,zRt|VRt,r,d):h))return!1}}return!0}function Lye(t){return t===t&&!Qs(t)}function WRt(t){for(var e=UR(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Lye(o)]}return e}function kye(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function jRt(t){var e=WRt(t);return e.length==1&&e[0][2]?kye(e[0][0],e[0][1]):function(n){return n===t||GRt(n,t,e)}}function qRt(t,e){return t!=null&&e in Object(t)}function Fye(t,e,n){e=eye(e,t);for(var r=-1,o=e.length,i=!1;++r<o;){var s=NB(e[r]);if(!(i=t!=null&&n(t,s)))break;t=t[s]}return i||++r!=o?i:(o=t==null?0:t.length,!!o&&o8(o)&&r8(s,o)&&(oc(t)||gx(t)))}function YRt(t,e){return t!=null&&Fye(t,e,qRt)}var XRt=1,KRt=2;function QRt(t,e){return i8(t)&&Lye(e)?kye(NB(t),e):function(n){var r=o_t(n,t);return r===void 0&&r===e?YRt(n,t):LB(e,r,XRt|KRt)}}function ZRt(t){return function(e){return e?.[t]}}function JRt(t){return function(e){return a8(e,t)}}function eOt(t){return i8(t)?ZRt(NB(t)):JRt(t)}function p8(t){return typeof t=="function"?t:t==null?Ow:typeof t=="object"?oc(t)?QRt(t[0],t[1]):jRt(t):eOt(t)}function tOt(t,e,n,r){for(var o=-1,i=t==null?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function nOt(t){return function(e,n,r){for(var o=-1,i=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++o];if(n(i[l],l,i)===!1)break}return e}}var rOt=nOt();const Bye=rOt;function oOt(t,e){return t&&Bye(t,e,UR)}function iOt(t,e){return function(n,r){if(n==null)return n;if(!mS(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Object(n);(e?i--:++i<o)&&r(s[i],i,s)!==!1;);return n}}var sOt=iOt(oOt);const $ye=sOt;function aOt(t,e,n,r){return $ye(t,function(o,i,s){e(r,o,n(o),s)}),r}function lOt(t,e){return function(n,r){var o=oc(n)?tOt:aOt,i=e?e():{};return o(n,t,p8(r),i)}}var cOt=function(){return Rf.Date.now()};const tU=cOt;var uOt="Expected a function",dOt=Math.max,hOt=Math.min;function fOt(t,e,n){var r,o,i,s,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(uOt);e=Y_(e)||0,Qs(n)&&(u=!!n.leading,d="maxWait"in n,i=d?dOt(Y_(n.maxWait)||0,e):i,h="trailing"in n?!!n.trailing:h);function f(_){var P=r,R=o;return r=o=void 0,c=_,s=t.apply(R,P),s}function p(_){return c=_,a=setTimeout(v,e),u?f(_):s}function m(_){var P=_-l,R=_-c,O=e-P;return d?hOt(O,i-R):O}function y(_){var P=_-l,R=_-c;return l===void 0||P>=e||P<0||d&&R>=i}function v(){var _=tU();if(y(_))return b(_);a=setTimeout(v,m(_))}function b(_){return a=void 0,h&&r?f(_):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?s:b(tU())}function A(){var _=tU(),P=y(_);if(r=arguments,o=this,l=_,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(v,e),f(l)}return a===void 0&&(a=setTimeout(v,e)),s}return A.cancel=S,A.flush=w,A}var Hye=Object.prototype,pOt=Hye.hasOwnProperty,gOt=Mw(function(t,e){t=Object(t);var n=-1,r=e.length,o=r>2?e[2]:void 0;for(o&&I2(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],s=Dw(i),a=-1,l=s.length;++a<l;){var c=s[a],u=t[c];(u===void 0||Nw(u,Hye[c])&&!pOt.call(t,c))&&(t[c]=i[c])}return t});const mOt=gOt;function uz(t,e,n){(n!==void 0&&!Nw(t[e],n)||n===void 0&&!(e in t))&&_B(t,e,n)}function O2(t){return xf(t)&&mS(t)}function dz(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function yOt(t){return $R(t,Dw(t))}function vOt(t,e,n,r,o,i,s){var a=dz(t,n),l=dz(e,n),c=s.get(l);if(c){uz(t,n,c);return}var u=i?i(a,l,n+"",t,e,s):void 0,d=u===void 0;if(d){var h=oc(l),f=!h&&mx(l),p=!h&&!f&&PB(l);u=l,h||f||p?oc(a)?u=a:O2(a)?u=Gme(a):f?(d=!1,u=Aye(l,!0)):p?(d=!1,u=Pye(l,!0)):u=[]:og(l)||gx(l)?(u=a,gx(a)?u=yOt(a):(!Qs(a)||n8(a))&&(u=Rye(l))):d=!1}d&&(s.set(l,u),o(u,l,r,i,s),s.delete(l)),uz(t,n,u)}function kB(t,e,n,r,o){t!==e&&Bye(e,function(i,s){if(o||(o=new mf),Qs(i))vOt(t,e,s,n,kB,r,o);else{var a=r?r(dz(t,s),i,s+"",t,e,o):void 0;a===void 0&&(a=i),uz(t,s,a)}},Dw)}function Uye(t,e,n,r,o,i){return Qs(t)&&Qs(e)&&(i.set(e,t),kB(t,e,void 0,Uye,i),i.delete(e)),t}var bOt=qme(function(t,e,n,r){kB(t,e,n,r)});const COt=bOt;var SOt=Mw(function(t){return t.push(void 0,Uye),Vme(COt,void 0,t)});const zye=SOt;function Vye(t,e,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}var EOt=200;function xOt(t,e,n,r){var o=-1,i=Wme,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=q_(e,HR(n))),r?(i=Vye,s=!1):e.length>=EOt&&(i=h8,s=!1,e=new bx(e));e:for(;++o<a;){var u=t[o],d=n==null?u:n(u);if(u=r||u!==0?u:0,s&&d===d){for(var h=c;h--;)if(e[h]===d)continue e;l.push(u)}else i(e,d,r)||l.push(u)}return l}var wOt=Mw(function(t,e){return O2(t)?xOt(t,MB(e,1,O2,!0)):[]});const AOt=wOt;function TOt(t,e){var n=-1,r=mS(t)?Array(t.length):[];return $ye(t,function(o,i,s){r[++n]=e(o,i,s)}),r}var _Ot=Object.prototype,IOt=_Ot.hasOwnProperty,POt=lOt(function(t,e,n){IOt.call(t,n)?t[n].push(e):_B(t,n,[e])});const wte=POt;function ROt(t,e){return t>e}var OOt=Object.prototype,NOt=OOt.hasOwnProperty;function MOt(t,e){return t!=null&&NOt.call(t,e)}function aM(t,e){return t!=null&&Fye(t,e,MOt)}var DOt="[object Map]",LOt="[object Set]",kOt=Object.prototype,FOt=kOt.hasOwnProperty;function Gye(t){if(t==null)return!0;
453if(mS(t)&&(oc(t)||typeof t=="string"||typeof t.splice=="function"||mx(t)||PB(t)||gx(t)))return!t.length;var e=vx(t);if(e==DOt||e==LOt)return!t.size;if(IB(t))return!Jme(t).length;for(var n in t)if(FOt.call(t,n))return!1;return!0}function lm(t,e){return LB(t,e)}var BOt="[object Number]";function Ate(t){return typeof t=="number"||xf(t)&&P0(t)==BOt}var $Ot=cye("toLowerCase");const HOt=$Ot;function UOt(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],s=e(i);if(s!=null&&(a===void 0?s===s&&!jp(s):n(s,a)))var a=s,l=i}return l}function zOt(t){return t&&t.length?UOt(t,Ow,ROt):void 0}var VOt=qme(function(t,e,n){kB(t,e,n)});const Ks=VOt;function GOt(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function WOt(t,e){if(t!==e){var n=t!==void 0,r=t===null,o=t===t,i=jp(t),s=e!==void 0,a=e===null,l=e===e,c=jp(e);if(!a&&!c&&!i&&t>e||i&&s&&l&&!a&&!c||r&&s&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&t<e||c&&n&&o&&!r&&!i||a&&n&&o||!s&&o||!l)return-1}return 0}function jOt(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var l=WOt(o[r],i[r]);if(l){if(r>=a)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return t.index-e.index}function qOt(t,e,n){e.length?e=q_(e,function(i){return oc(i)?function(s){return a8(s,i.length===1?i[0]:i)}:i}):e=[Ow];var r=-1;e=q_(e,HR(p8));var o=TOt(t,function(i,s,a){var l=q_(e,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return GOt(o,function(i,s){return jOt(i,s,n)})}var YOt=Mw(function(t,e){if(t==null)return[];var n=e.length;return n>1&&I2(t,e[0],e[1])?e=[]:n>2&&I2(e[0],e[1],e[2])&&(e=[e[0]]),qOt(t,MB(e,1),[])});const XOt=YOt;var KOt=4294967295,QOt=KOt-1,ZOt=Math.floor,JOt=Math.min;function Wye(t,e,n,r){var o=0,i=t==null?0:t.length;if(i===0)return 0;e=n(e);for(var s=e!==e,a=e===null,l=jp(e),c=e===void 0;o<i;){var u=ZOt((o+i)/2),d=n(t[u]),h=d!==void 0,f=d===null,p=d===d,m=jp(d);if(s)var y=r||p;else c?y=p&&(r||h):a?y=p&&h&&(r||!f):l?y=p&&h&&!f&&(r||!m):f||m?y=!1:y=r?d<=e:d<e;y?o=u+1:i=u}return JOt(i,QOt)}var eNt=4294967295,tNt=eNt>>>1;function nNt(t,e,n){var r=0,o=t==null?r:t.length;if(typeof e=="number"&&e===e&&o<=tNt){for(;r<o;){var i=r+o>>>1,s=t[i];s!==null&&!jp(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return Wye(t,e,Ow,n)}function rNt(t,e){return nNt(t,e)}function oNt(t,e,n){return Wye(t,e,p8(n))}var iNt=xye(function(t,e,n){return t+(n?" ":"")+P2(e)});const sNt=iNt;var aNt="Expected a function";function lNt(t,e,n){var r=!0,o=!0;if(typeof t!="function")throw new TypeError(aNt);return Qs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),fOt(t,e,{leading:r,maxWait:e,trailing:o})}var cNt=1/0,uNt=_1&&1/f8(new _1([,-0]))[1]==cNt?function(t){return new _1(t)}:sAt;const dNt=uNt;var hNt=200;function jye(t,e,n){var r=-1,o=Wme,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=Vye;else if(i>=hNt){var c=e?null:dNt(t);if(c)return f8(c);s=!1,o=h8,l=new bx}else l=e?[]:a;e:for(;++r<i;){var u=t[r],d=e?e(u):u;if(u=n||u!==0?u:0,s&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),a.push(u)}else o(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var fNt=Mw(function(t){return jye(MB(t,1,O2,!0))});const Tte=fNt;function qye(t){return t&&t.length?jye(t):[]}function Yye(t,e,n){if(n)switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2]);case 4:return t.call(e,n[0],n[1],n[2],n[3]);case 5:return t.call(e,n[0],n[1],n[2],n[3],n[4]);case 6:return t.call(e,n[0],n[1],n[2],n[3],n[4],n[5]);default:return t.apply(e,n)}return t.call(e)}function Jn(t,e,...n){return Yye(t,e,n)}function pNt(t){return typeof t=="object"&&t.then&&typeof t.then=="function"}function _te(t){return t!=null&&(t instanceof Promise||pNt(t))}function Xye(...t){const e=[];if(t.forEach(r=>{Array.isArray(r)?e.push(...r):e.push(r)}),e.some(r=>_te(r))){const r=e.map(o=>_te(o)?o:Promise.resolve(o!==!1));return Promise.all(r).then(o=>o.reduce((i,s)=>s!==!1&&i,!0))}return e.every(r=>r!==!1)}function nU(t,e){const n=[];for(let r=0;r<t.length;r+=2){const o=t[r],i=t[r+1],s=Array.isArray(e)?e:[e],a=Yye(o,i,s);n.push(a)}return Xye(n)}class gNt{constructor(){this.listeners={}}on(e,n,r){return n==null?this:(this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(n,r),this)}once(e,n,r){const o=(...i)=>(this.off(e,o),nU([n,r],i));return this.on(e,o,this)}off(e,n,r){if(!(e||n||r))return this.listeners={},this;const o=this.listeners;
453return(e?[e]:Object.keys(o)).forEach(s=>{const a=o[s];if(a){if(!(n||r)){delete o[s];return}for(let l=a.length-2;l>=0;l-=2)n&&a[l]!==n||r&&a[l+1]!==r||a.splice(l,2)}}),this}trigger(e,...n){let r=!0;if(e!=="*"){const i=this.listeners[e];i!=null&&(r=nU([...i],n))}const o=this.listeners["*"];return o!=null?Xye([r,nU([...o],[e,...n])]):r}emit(e,...n){return this.trigger(e,...n)}}function mNt(t,...e){e.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{r!=="constructor"&&Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r))})})}const yNt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])};function vNt(t,e){yNt(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}class bNt{}const CNt=/^\s*class\s+/.test(`${bNt}`)||/^\s*class\s*\{/.test(`${class{}}`);function g8(t,e){let n;return CNt?n=class extends e{}:(n=function(){return e.apply(this,arguments)},vNt(n,e)),Object.defineProperty(n,"name",{value:t}),n}function Ite(t){return t==="__proto__"}function m8(t,e,n="/"){let r;const o=Array.isArray(e)?e:e.split(n);if(o.length)for(r=t;o.length;){const i=o.shift();if(Object(r)===r&&i&&i in r)r=r[i];else return}return r}function Lw(t,e,n,r="/"){const o=Array.isArray(e)?e:e.split(r),i=o.pop();if(i&&!Ite(i)){let s=t;o.forEach(a=>{Ite(a)||(s[a]==null&&(s[a]={}),s=s[a])}),s[i]=n}return t}function Pte(t,e,n="/"){const r=Array.isArray(e)?e.slice():e.split(n),o=r.pop();if(o)if(r.length>0){const i=m8(t,r);i&&delete i[o]}else delete t[o];return t}var SNt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class cd extends gNt{dispose(){this.off()}}SNt([xm.dispose()],cd.prototype,"dispose",null);(function(t){t.dispose=xm.dispose})(cd||(cd={}));mNt(cd,xm);const Kye=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Qye=Kye(t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase()),y8=Kye(t=>sNt(DB(t)).replace(/ /g,""));function rU(t){let e=2166136261,n=!1,r=t;for(let o=0,i=r.length;o<i;o+=1){let s=r.charCodeAt(o);s>127&&!n&&(r=unescape(encodeURIComponent(r)),s=r.charCodeAt(o),n=!0),e^=s,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function N2(){let t="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let n=0,r=e.length;n<r;n+=1){const o=e[n],i=Math.random()*16|0,s=o==="x"?i:o==="y"?i&3|8:o;t+=s.toString(16)}return t}function ENt(t,e,n){const r=Math.min(2,Math.floor(t.length*.34));let o=Math.floor(t.length*.4)+1,i,s=!1;const a=t.toLowerCase();for(const l of e){const c=n(l);if(c!==void 0&&Math.abs(c.length-a.length)<=r){const u=c.toLowerCase();if(u===a){if(c===t)continue;return l}if(s||c.length<3)continue;const d=xNt(a,u,o-1);if(d===void 0)continue;d<3?(s=!0,i=l):(o=d,i=l)}}return i}function xNt(t,e,n){let r=new Array(e.length+1),o=new Array(e.length+1);const i=n+1;for(let a=0;a<=e.length;a+=1)r[a]=a;for(let a=1;a<=t.length;a+=1){const l=t.charCodeAt(a-1),c=a>n?a-n:1,u=e.length>n+a?n+a:e.length;o[0]=a;let d=a;for(let f=1;f<c;f+=1)o[f]=i;for(let f=c;f<=u;f+=1){const p=l===e.charCodeAt(f-1)?r[f-1]:Math.min(r[f]+1,o[f-1]+1,r[f-1]+2);o[f]=p,d=Math.min(d,p)}for(let f=u+1;f<=e.length;f+=1)o[f]=i;if(d>n)return;const h=r;r=o,o=h}const s=r[e.length];return s>n?void 0:s}function wm(t){return typeof t=="string"&&t.slice(-1)==="%"}function yf(t,e){if(t==null)return 0;let n;if(typeof t=="string"){if(n=parseFloat(t),wm(t)&&(n/=100,Number.isFinite(n)))return n*e}else n=t;return Number.isFinite(n)?n>0&&n<1?n*e:n:0}function UC(t){if(typeof t=="object"){let n=0,r=0,o=0,i=0;return t.vertical!=null&&Number.isFinite(t.vertical)&&(r=i=t.vertical),t.horizontal!=null&&Number.isFinite(t.horizontal)&&(o=n=t.horizontal),t.left!=null&&Number.isFinite(t.left)&&(n=t.left),t.top!=null&&Number.isFinite(t.top)&&
453(r=t.top),t.right!=null&&Number.isFinite(t.right)&&(o=t.right),t.bottom!=null&&Number.isFinite(t.bottom)&&(i=t.bottom),{top:r,right:o,bottom:i,left:n}}let e=0;return t!=null&&Number.isFinite(t)&&(e=t),{top:e,right:e,bottom:e,left:e}}let v8=!1,Zye=!1,Jye=!1,eve=!1,tve=!1,nve=!1,rve=!1,ove=!1,ive=!1,sve=!1,ave=!1,lve=!1,cve=!1,uve=!1,dve=!1,hve=!1;if(typeof navigator=="object"){const t=navigator.userAgent;v8=t.indexOf("Macintosh")>=0,Zye=!!t.match(/(iPad|iPhone|iPod)/g),Jye=t.indexOf("Windows")>=0,eve=t.indexOf("MSIE")>=0,tve=!!t.match(/Trident\/7\./),nve=!!t.match(/Edge\//),rve=t.indexOf("Mozilla/")>=0&&t.indexOf("MSIE")<0&&t.indexOf("Edge/")<0,ive=t.indexOf("Chrome/")>=0&&t.indexOf("Edge/")<0,sve=t.indexOf("Opera/")>=0||t.indexOf("OPR/")>=0,ave=t.indexOf("Firefox/")>=0,lve=t.indexOf("AppleWebKit/")>=0&&t.indexOf("Chrome/")<0&&t.indexOf("Edge/")<0,typeof document=="object"&&(hve=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||t.indexOf("Opera/")>=0)}typeof window=="object"&&(ove=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,uve=window.PointerEvent!=null&&!v8);if(typeof document=="object"){cve="ontouchstart"in document.documentElement;try{const t=Object.defineProperty({},"passive",{get(){dve=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",()=>{},t)}catch{}}var Qv;(function(t){t.IS_MAC=v8,t.IS_IOS=Zye,t.IS_WINDOWS=Jye,t.IS_IE=eve,t.IS_IE11=tve,t.IS_EDGE=nve,t.IS_NETSCAPE=rve,t.IS_CHROME_APP=ove,t.IS_CHROME=ive,t.IS_OPERA=sve,t.IS_FIREFOX=ave,t.IS_SAFARI=lve,t.SUPPORT_TOUCH=cve,t.SUPPORT_POINTER=uve,t.SUPPORT_PASSIVE=dve,t.NO_FOREIGNOBJECT=hve,t.SUPPORT_FOREIGNOBJECT=!t.NO_FOREIGNOBJECT})(Qv||(Qv={}));(function(t){function e(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}t.getHMRStatus=e;function n(){return e()==="apply"}t.isApplyingHMR=n;const r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function o(i){const s=document.createElement(r[i]||"div"),a=`on${i}`;let l=a in s;return l||(s.setAttribute(a,"return;"),l=typeof s[a]=="function"),l}t.isEventSupported=o})(Qv||(Qv={}));const b8=/[\t\r\n\f]/g,C8=/\S+/g,Cx=t=>` ${t} `;function Sx(t){return t&&t.getAttribute&&t.getAttribute("class")||""}function VR(t,e){if(t==null||e==null)return!1;const n=Cx(Sx(t)),r=Cx(e);return t.nodeType===1?n.replace(b8," ").includes(r):!1}function ro(t,e){if(!(t==null||e==null)){if(typeof e=="function")return ro(t,e(Sx(t)));if(typeof e=="string"&&t.nodeType===1){const n=e.match(C8)||[],r=Cx(Sx(t)).replace(b8," ");let o=n.reduce((i,s)=>i.indexOf(Cx(s))<0?`${i}${s} `:i,r);o=o.trim(),r!==o&&t.setAttribute("class",o)}}}function fh(t,e){if(t!=null){if(typeof e=="function")return fh(t,e(Sx(t)));if((!e||typeof e=="string")&&t.nodeType===1){const n=(e||"").match(C8)||[],r=Cx(Sx(t)).replace(b8," ");let o=n.reduce((i,s)=>{const a=Cx(s);return i.indexOf(a)>-1?i.replace(a," "):i},r);o=e?o.trim():"",r!==o&&t.setAttribute("class",o)}}}function fve(t,e,n){if(!(t==null||e==null)){if(n!=null&&typeof e=="string"){n?ro(t,e):fh(t,e);return}if(typeof e=="function")return fve(t,e(Sx(t),n),n);typeof e=="string"&&(e.match(C8)||[]).forEach(o=>{VR(t,o)?fh(t,o):ro(t,o)})}}let Rte=0;function wNt(){return Rte+=1,`v${Rte}`}function S8(t){return(t.id==null||t.id==="")&&(t.id=wNt()),t.id}function Zv(t){return t==null?!1:typeof t.getScreenCTM=="function"&&t instanceof SVGElement}const ja={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},Ote="1.1";function Nte(t,e=document){return e.createElement(t)}function E8(t,e=ja.xhtml,n=document){return n.createElementNS(e,t)}function Of(t,e=document){return E8(t,ja.svg,e)}function M2(t){if(t){const n=`<svg xmlns="${ja.svg}" xmlns:xlink="${ja.xlink}" version="${Ote}">${t}</svg>`,{documentElement:r}=ANt(n,{async:!1});return r}const e=document.createElementNS(ja.svg,"svg");return e.setAttributeNS(ja.xmlns,"xmlns:xlink",ja.xlink),e.setAttribute("version",Ote),e}function ANt(t,e={}){let n;try{const r=new DOMParser;if(e.async!=null){const o=r;o.async=e.async}n=r.parseFromString(t,e.mimeType||"text/xml")}catch{n=void 0}if(!n||n.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${t}`);return n}function TNt(t,e=!0){const n=t.nodeName;return e?n.toLowerCase():n.toUpperCase()}function x8(t){let e=0,n=t.previousSibling;for(;n;)n.nodeType===1&&(e+=1),n=n.previousSibling;return e}function _Nt(t,e){return t.querySelectorAll(e)}function INt(t,e){return t.querySelector(e)}function pve(t,e,n){const r=t.ownerSVGElement;let o=t.parentNode;for(;o&&o!==n&&o!==r;){if(VR(o,e))return o;o=o.parentNode}return null}function gve(t,e){const n=e&&e.parentNode;return t===n||!!(n&&n.nodeType===1&&t.compareDocumentPosition(n)&16)}
453function Ex(t){t&&(Array.isArray(t)?t:[t]).forEach(n=>{n.parentNode&&n.parentNode.removeChild(n)})}function GR(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function WR(t,e){(Array.isArray(e)?e:[e]).forEach(r=>{r!=null&&t.appendChild(r)})}function PNt(t,e){const n=t.firstChild;return n?w8(n,e):WR(t,e)}function w8(t,e){const n=t.parentNode;n&&(Array.isArray(e)?e:[e]).forEach(o=>{o!=null&&n.insertBefore(o,t)})}function RNt(t,e){e?.appendChild(t)}function Mte(t){try{return t instanceof HTMLElement}catch{return typeof t=="object"&&t.nodeType===1&&typeof t.style=="object"&&typeof t.ownerDocument=="object"}}const mve=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function ONt(t,e){return t.getAttribute(e)}function yve(t,e){const n=bve(e);n.ns?t.hasAttributeNS(n.ns,n.local)&&t.removeAttributeNS(n.ns,n.local):t.hasAttribute(e)&&t.removeAttribute(e)}function A8(t,e,n){if(n==null)return yve(t,e);const r=bve(e);r.ns&&typeof n=="string"?t.setAttributeNS(r.ns,e,n):e==="id"?t.id=`${n}`:t.setAttribute(e,`${n}`)}function vve(t,e){Object.keys(e).forEach(n=>{A8(t,n,e[n])})}function ti(t,e,n){if(e==null){const r=t.attributes,o={};for(let i=0;i<r.length;i+=1)o[r[i].name]=r[i].value;return o}if(typeof e=="string"&&n===void 0)return t.getAttribute(e);typeof e=="object"?vve(t,e):A8(t,e,n)}function bve(t){if(t.indexOf(":")!==-1){const e=t.split(":");return{ns:ja[e[0]],local:e[1]}}return{ns:null,local:t}}function SP(t){const e={};return Object.keys(t).forEach(n=>{const r=mve.includes(n)?n:Qye(n);e[r]=t[n]}),e}function lM(t){const e={};return t.split(";").forEach(r=>{const o=r.trim();if(o){const i=o.split("=");
453i.length&&(e[i[0].trim()]=i[1]?i[1].trim():"")}}),e}function hz(t,e){return Object.keys(e).forEach(n=>{if(n==="class")t[n]=t[n]?`${t[n]} ${e[n]}`:e[n];else if(n==="style"){const r=typeof t[n]=="object",o=typeof e[n]=="object";let i,s;r&&o?(i=t[n],s=e[n]):r?(i=t[n],s=lM(e[n])):o?(i=lM(t[n]),s=e[n]):(i=lM(t[n]),s=lM(e[n])),t[n]=hz(i,s)}else t[n]=e[n]}),t}function NNt(t,e,n={}){const r=n.offset||0,o=[],i=[];let s,a,l=null;for(let c=0;c<t.length;c+=1){s=i[c]=t[c];for(let u=0,d=e.length;u<d;u+=1){const h=e[u],f=h.start+r,p=h.end+r;c>=f&&c<p&&(typeof s=="string"?s=i[c]={t:t[c],attrs:h.attrs}:s.attrs=hz(hz({},s.attrs),h.attrs),n.includeAnnotationIndices&&(s.annotations==null&&(s.annotations=[]),s.annotations.push(u)))}a=i[c-1],a?Qs(s)&&Qs(a)?(l=l,JSON.stringify(s.attrs)===JSON.stringify(a.attrs)?l.t+=s.t:(o.push(l),l=s)):Qs(s)||Qs(a)?(l=l,o.push(l),l=s):l=(l||"")+s:l=s}return l!=null&&o.push(l),o}function MNt(t){return t.replace(/ /g,"Â ")}var Dte;(function(t){function e(c){const u="data:";return c.substr(0,u.length)===u}t.isDataUrl=e;function n(c,u){if(!c||e(c)){setTimeout(()=>u(null,c));return}const d=()=>{u(new Error(`Failed to load image: ${c}`))},h=window.FileReader?p=>{if(p.status===200){const m=new FileReader;m.onload=y=>{const v=y.target.result;u(null,v)},m.onerror=d,m.readAsDataURL(p.response)}else d()}:p=>{const m=y=>{const b=[];for(let S=0;S<y.length;S+=32768)b.push(String.fromCharCode.apply(null,y.subarray(S,S+32768)));return b.join("")};if(p.status===200){let y=c.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const v=`data:image/${y};base64,`,b=new Uint8Array(p.response),S=v+btoa(m(b));u(null,S)}else d()},f=new XMLHttpRequest;f.responseType=window.FileReader?"blob":"arraybuffer",f.open("GET",c,!0),f.addEventListener("error",d),f.addEventListener("load",()=>h(f)),f.send()}t.imageToDataUri=n;function r(c){let u=c.replace(/\s/g,"");u=decodeURIComponent(u);const d=u.indexOf(","),h=u.slice(0,d),f=h.split(":")[1].split(";")[0],p=u.slice(d+1);let m;h.indexOf("base64")>=0?m=atob(p):m=unescape(encodeURIComponent(p));const y=new Uint8Array(m.length);for(let v=0;v<m.length;v+=1)y[v]=m.charCodeAt(v);return new Blob([y],{type:f})}t.dataUriToBlob=r;function o(c,u){const d=window.navigator.msSaveBlob;if(d)d(c,u);else{const h=window.URL.createObjectURL(c),f=document.createElement("a");f.href=h,f.download=u,document.body.appendChild(f),f.click(),document.body.removeChild(f),window.URL.revokeObjectURL(h)}}t.downloadBlob=o;function i(c,u){const d=r(c);o(d,u)}t.downloadDataUri=i;function s(c){const u=c.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return u&&u[2]?u[2].replace(/\s+/," ").split(" "):null}function a(c){const u=parseFloat(c);return Number.isNaN(u)?null:u}function l(c,u={}){let d=null;const h=S=>(d==null&&(d=s(c)),d!=null?a(d[S]):null),f=S=>{const w=c.match(S);return w&&w[2]?a(w[2]):null};let p=u.width;if(p==null&&(p=f(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),p==null&&(p=h(2)),p==null)throw new Error("Can not parse width from svg string");let m=u.height;if(m==null&&(m=f(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=h(3)),m==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(c).replace(/'/g,"%27").replace(/"/g,"%22")}`}t.svgToDataUrl=l})(Dte||(Dte={}));let Nb;const DNt={px(t){return t},mm(t){return Nb*t},cm(t){return Nb*t*10},in(t){return Nb*t*25.4},pt(t){return Nb*(25.4*t/72)},pc(t){return Nb*(25.4*t/6)}};var Lte;(function(t){function e(r,o,i){const s=document.createElement("div"),a=s.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=r+(i||"px"),a.height=o+(i||"px"),document.body.appendChild(s);const l=s.getBoundingClientRect(),c={width:l.width||0,height:l.height||0};return document.body.removeChild(s),c}t.measure=e;function n(r,o){Nb==null&&(Nb=e("1","1","mm").width);const i=o?DNt[o]:null;return i?i(r):r}t.toPx=n})(Lte||(Lte={}));const LNt=/-(.)/g;function kNt(t){return t.replace(LNt,(e,n)=>n.toUpperCase())}const oU={},kte=["webkit","ms","moz","o"],Cve=typeof document<"u"?document.createElement("div").style:{};function FNt(t){for(let e=0;e<kte.length;e+=1){const n=kte[e]+t;if(n in Cve)return n}return null}function BNt(t){const e=kNt(t);if(oU[e]==null){const n=e.charAt(0).toUpperCase()+e.slice(1);oU[e]=e in Cve?e:FNt(n)}return oU[e]}function Fte(t,e){const n=t.ownerDocument&&t.ownerDocument.defaultView&&t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):window.getComputedStyle(t,null);return n&&e?n.getPropertyValue(e)||n[e]:n}const $Nt={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function HNt(t){return/^--/.test(t)}function UNt(t,e,n){const r=window.getComputedStyle(t,null);return n?r.getPropertyValue(e)||void 0:r[e]||t.style[e]}function zNt(t,e){return!$Nt[t]&&typeof e=="number"?`${e}px`:e}function jR(t,e,n){if(typeof e=="string"){const r=HNt(e);if(r||(e=BNt(e)),n===void 0)return UNt(t,e,r);r||(n=zNt(e,n));const o=t.style;r?o.setProperty(e,n):o[e]=n;return}for(const r in e)jR(t,r,e[r])}const D2=new WeakMap;function Bte(t,e){const n=DB(e),r=D2.get(t);if(r)return r[n]}function VNt(t,e,n){const r=DB(e),o=D2.get(t);o?o[r]=n:D2.set(t,{[r]:n})}function zC(t,e,n){if(!e){const r={};return Object.keys(D2).forEach(o=>{r[o]=Bte(t,o)}),r}if(typeof e=="string"){if(n===void 0)return Bte(t,e);VNt(t,e,n);return}for(const r in e)zC(t,r,e[r])}class Qn{get[Symbol.toStringTag](){return Qn.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(e){this.node.id=e}constructor(e,n,r){if(!e)throw new TypeError("Invalid element to create vector");let o;if(Qn.isVector(e))o=e.node;else if(typeof e=="string")if(e.toLowerCase()==="svg")o=M2();else if(e[0]==="<"){const i=M2(e);o=document.importNode(i.firstChild,!0)}else o=document.createElementNS(ja.svg,e);else o=e;this.node=o,n&&this.setAttributes(n),r&&this.append(r)}transform(e,n){return e==null?xx(this.node):(xx(this.node,e,n),this)}translate(e,n=0,r={}){return e==null?Hte(this.node):(Hte(this.node,e,n,r),this)}rotate(e,n,r,o={}){return e==null?gz(this.node):(gz(this.node,e,n,r,o),this)}scale(e,n){return e==null?mz(this.node):(mz(this.node,e,n),this)}getTransformToElement(e){const n=Qn.toNode(e);return Z_(this.node,n)}removeAttribute(e){return yve(this.node,e),this}getAttribute(e){return ONt(this.node,e)}setAttribute(e,n){return A8(this.node,e,n),this}setAttributes(e){return vve(this.node,e),this}attr(e,n){return e==null?ti(this.node):typeof e=="string"&&n===void 0?ti(this.node,e):(typeof e=="object"?ti(this.node,e):ti(this.node,e,n),this)}svg(){return this.node instanceof SVGSVGElement?this:Qn.create(this.node.ownerSVGElement)}defs(){const e=this.svg()||this,n=e.node.getElementsByTagName("defs")[0];return n?Qn.create(n):Qn.create("defs").appendTo(e)}text(e,n={}){return Eve(this.node,e,n),this}tagName(){return TNt(this.node)}
453clone(){return Qn.create(this.node.cloneNode(!0))}remove(){return Ex(this.node),this}empty(){return GR(this.node),this}append(e){return WR(this.node,Qn.toNodes(e)),this}appendTo(e){return RNt(this.node,Qn.isVector(e)?e.node:e),this}prepend(e){return PNt(this.node,Qn.toNodes(e)),this}before(e){return w8(this.node,Qn.toNodes(e)),this}replace(e){return this.node.parentNode&&this.node.parentNode.replaceChild(Qn.toNode(e),this.node),Qn.create(e)}first(){return this.node.firstChild?Qn.create(this.node.firstChild):null}last(){return this.node.lastChild?Qn.create(this.node.lastChild):null}get(e){const n=this.node.childNodes[e];return n?Qn.create(n):null}indexOf(e){return Array.prototype.slice.call(this.node.childNodes).indexOf(Qn.toNode(e))}find(e){const n=[],r=_Nt(this.node,e);if(r)for(let o=0,i=r.length;o<i;o+=1)n.push(Qn.create(r[o]));return n}findOne(e){const n=INt(this.node,e);return n?Qn.create(n):null}findParentByClass(e,n){const r=pve(this.node,e,n);return r?Qn.create(r):null}matches(e){const n=this.node;this.node.matches;const r=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return r&&r.call(n,e)}contains(e){return gve(this.node,Qn.isVector(e)?e.node:e)}wrap(e){const n=Qn.create(e),r=this.node.parentNode;return r?.insertBefore(n.node,this.node),n.append(this)}parent(e){let n=this;if(n.node.parentNode==null)return null;if(n=Qn.create(n.node.parentNode),e==null)return n;do if(typeof e=="string"?n.matches(e):n instanceof e)return n;while(n=Qn.create(n.node.parentNode));return n}children(){const e=this.node.childNodes,n=[];for(let r=0;r<e.length;r+=1)e[r].nodeType===1&&n.push(Qn.create(e[r]));return n}eachChild(e,n){const r=this.children();for(let o=0,i=r.length;o<i;o+=1)e.call(r[o],r[o],o,r),n&&r[o].eachChild(e,n);return this}index(){return x8(this.node)}hasClass(e){return VR(this.node,e)}addClass(e){return ro(this.node,e),this}removeClass(e){return fh(this.node,e),this}toggleClass(e,n){return fve(this.node,e,n),this}toLocalPoint(e,n){return cMt(this.node,e,n)}sample(e=1){return this.node instanceof SVGPathElement?qNt(this.node,e):[]}toPath(){return Qn.create(eMt(this.node))}toPathData(){return Tve(this.node)}}(function(t){t.toStringTag=`X6.${t.name}`;function e(s){if(s==null)return!1;if(s instanceof t)return!0;const a=s[Symbol.toStringTag],l=s;return(a==null||a===t.toStringTag)&&l.node instanceof SVGElement&&typeof l.sample=="function"&&typeof l.toPath=="function"}t.isVector=e;function n(s,a,l){return new t(s,a,l)}t.create=n;function r(s){if(s[0]==="<"){const a=M2(s),l=[];for(let c=0,u=a.childNodes.length;c<u;c+=1){const d=a.childNodes[c];l.push(n(document.importNode(d,!0)))}return l}return[n(s)]}t.createVectors=r;function o(s){return e(s)?s.node:s}t.toNode=o;function i(s){return Array.isArray(s)?s.map(a=>o(a)):[o(s)]}t.toNodes=i})(Qn||(Qn={}));function GNt(t,e){const n=Qn.create(e),r=Qn.create("textPath"),o=t.d;if(o&&t["xlink:href"]===void 0){const i=Qn.create("path").attr("d",o).appendTo(n.defs());r.attr("xlink:href",`#${i.id}`)}return typeof t=="object"&&r.attr(t),r.node}function WNt(t,e,n){const r=n.eol,o=n.baseSize,i=n.lineHeight;let s=0,a;const l={},c=e.length-1;for(let u=0;u<=c;u+=1){let d=e[u],h=null;if(typeof d=="object"){const f=d.attrs,p=Qn.create("tspan",f);a=p.node;let m=d.t;r&&u===c&&(m+=r),a.textContent=m;const y=f.class;y&&p.addClass(y),n.includeAnnotationIndices&&p.attr("annotations",d.annotations.join(",")),h=parseFloat(f["font-size"]),h===void 0&&(h=o),h&&h>s&&(s=h)}else r&&u===c&&(d+=r),a=document.createTextNode(d||" "),o&&o>s&&(s=o);t.appendChild(a)}return s&&(l.maxFontSize=s),i?l.lineHeight=i:s&&(l.lineHeight=s*1.2),l}const Sve=/em$/;function cM(t,e){const n=parseFloat(t);return Sve.test(t)?n*e:n}function jNt(t,e,n,r){if(!Array.isArray(e))return 0;const o=e.length;if(!o)return 0;let i=e[0];const s=cM(i.maxFontSize,n)||n;let a=0;const l=cM(r,n);for(let d=1;d<o;d+=1){i=e[d];const h=cM(i.lineHeight,n)||l;a+=h}const c=cM(i.maxFontSize,n)||n;let u;switch(t){case"middle":u=s/2-.15*c-a/2;break;case"bottom":u=-(.25*c)-a;break;case"top":default:u=.8*s;break}return u}function Eve(t,e,n={}){e=MNt(e);const r=n.eol;let o=n.textPath;const i=n.textVerticalAnchor,s=i==="middle"||i==="bottom"||i==="top";let a=n.x;a===void 0&&(a=t.getAttribute("x")||0);const l=n.includeAnnotationIndices;let c=n.annotations;c&&!Array.isArray(c)&&(c=[c]);const u=n.lineHeight,d=u==="auto",h=d?"1.5em":u||"1em";let f=!0;const p=t.childNodes;if(p.length===1){const O=p[0];O&&O.tagName.toUpperCase()==="TITLE"&&(f=!1)}f&&GR(t),ti(t,{"xml:space":"preserve",display:e||n.displayEmpty?null:"none"});const m=ti(t,"font-size");let y=parseFloat(m);y||(y=16,(s||c)&&!m&&ti(t,"font-size",`${y}`));let v;
453o?(typeof o=="string"&&(o={d:o}),v=GNt(o,t)):v=document.createDocumentFragment();let b,S=0,w;const A=e.split(` 454`),_=[],P=A.length-1;for(let O=0;O<=P;O+=1){b=h;let N="v-line";const M=Of("tspan");let L,F=A[O];if(F)if(c){const $=NNt(F,c,{offset:-S,includeAnnotationIndices:l});L=WNt(M,$,{eol:O!==P&&r,baseSize:y,lineHeight:d?null:h,includeAnnotationIndices:l});const D=L.lineHeight;D&&d&&O!==0&&(b=D),O===0&&(w=L.maxFontSize*.8)}else r&&O!==P&&(F+=r),M.textContent=F;else{M.textContent="-",N+=" v-empty-line";const $=M.style;$.fillOpacity=0,$.strokeOpacity=0,c&&(L={})}L&&_.push(L),O>0&&M.setAttribute("dy",b),(O>0||o)&&M.setAttribute("x",a),M.className.baseVal=N,v.appendChild(M),S+=F.length+1}if(s)if(c)b=jNt(i,_,y,h);else if(i==="top")b="0.8em";else{let O;switch(P>0?(O=parseFloat(h)||1,O*=P,Sve.test(h)||(O/=y)):O=0,i){case"middle":b=`${.3-O/2}em`;break;case"bottom":b=`${-O-.3}em`;break}}else i===0?b="0em":i?b=i:(b=0,t.getAttribute("y")==null&&t.setAttribute("y",`${w||"0.8em"}`));v.firstChild.setAttribute("dy",b),t.appendChild(v)}function Q_(t,e={}){const n=document.createElement("canvas").getContext("2d");if(!t)return{width:0};const r=[],o=e["font-size"]?`${parseFloat(e["font-size"])}px`:"14px";return r.push(e["font-style"]||"normal"),r.push(e["font-variant"]||"normal"),r.push(e["font-weight"]||400),r.push(o),r.push(e["font-family"]||"sans-serif"),n.font=r.join(" "),n.measureText(t)}function $te(t,e,n,r={}){if(e>=n)return[t,""];const o=t.length,i={};let s=Math.round(e/n*o-1);for(s<0&&(s=0);s>=0&&s<o;){const a=t.slice(0,s),l=i[a]||Q_(a,r).width,c=t.slice(0,s+1),u=i[c]||Q_(c,r).width;if(i[a]=l,i[c]=u,l>e)s-=1;else if(u<=e)s+=1;else break}return[t.slice(0,s),t.slice(s)]}function xve(t,e,n={},r={}){const o=e.width,i=e.height,s=r.eol||` 455`,a=n.fontSize||14,l=n.lineHeight?parseFloat(n.lineHeight):Math.ceil(a*1.4),c=Math.floor(i/l);if(t.indexOf(s)>-1){const y=N2(),v=[];return t.split(s).map(b=>{const S=xve(b,Object.assign(Object.assign({},e),{height:Number.MAX_SAFE_INTEGER}),n,Object.assign(Object.assign({},r),{eol:y}));S&&v.push(...S.split(y))}),v.slice(0,c).join(s)}const{width:u}=Q_(t,n);if(u<o)return t;const d=[];let h=t,f=u,p=r.ellipsis,m=0;p&&(typeof p!="string"&&(p="â¦"),m=Q_(p,n).width);for(let y=0;y<c;y+=1)if(f>o)if(y===c-1){const[b]=$te(h,o-m,f,n);d.push(p?`${b}${p}`:b)}else{const[b,S]=$te(h,o,f,n);d.push(b),h=S,f=Q_(h,n).width}else{d.push(h);break}return d.join(s)}const fz=.551784;function xl(t,e,n=NaN){const r=t.getAttribute(e);if(r==null)return n;const o=parseFloat(r);return Number.isNaN(o)?n:o}function qNt(t,e=1){const n=t.getTotalLength(),r=[];let o=0,i;for(;o<n;)i=t.getPointAtLength(o),r.push({distance:o,x:i.x,y:i.y}),o+=e;return r}function YNt(t){return["M",xl(t,"x1"),xl(t,"y1"),"L",xl(t,"x2"),xl(t,"y2")].join(" ")}function XNt(t){const e=L2(t);return e.length===0?null:`${wve(e)} Z`}function KNt(t){const e=L2(t);return e.length===0?null:wve(e)}function wve(t){return`M ${t.map(n=>`${n.x} ${n.y}`).join(" L")}`}function L2(t){const e=[],n=t.points;if(n)for(let r=0,o=n.numberOfItems;r<o;r+=1)e.push(n.getItem(r));return e}function QNt(t){const e=xl(t,"cx",0),n=xl(t,"cy",0),r=xl(t,"r"),o=r*fz;return["M",e,n-r,"C",e+o,n-r,e+r,n-o,e+r,n,"C",e+r,n+o,e+o,n+r,e,n+r,"C",e-o,n+r,e-r,n+o,e-r,n,"C",e-r,n-o,e-o,n-r,e,n-r,"Z"].join(" ")}function ZNt(t){const e=xl(t,"cx",0),n=xl(t,"cy",0),r=xl(t,"rx"),o=xl(t,"ry")||r,i=r*fz,s=o*fz;return["M",e,n-o,"C",e+i,n-o,e+r,n-s,e+r,n,"C",e+r,n+s,e+i,n+o,e,n+o,"C",e-i,n+o,e-r,n+s,e-r,n,"C",e-r,n-s,e-i,n-o,e,n-o,"Z"].join(" ")}function JNt(t){return Ave({x:xl(t,"x",0),y:xl(t,"y",0),width:xl(t,"width",0),height:xl(t,"height",0),rx:xl(t,"rx",0),ry:xl(t,"ry",0)})}function Ave(t){let e;const n=t.x,r=t.y,o=t.width,i=t.height,s=Math.min(t.rx||t["top-rx"]||0,o/2),a=Math.min(t.rx||t["bottom-rx"]||0,o/2),l=Math.min(t.ry||t["top-ry"]||0,i/2),c=Math.min(t.ry||t["bottom-ry"]||0,i/2);return s||a||l||c?e=["M",n,r+l,"v",i-l-c,"a",a,c,0,0,0,a,c,"h",o-2*a,"a",a,c,0,0,0,a,-c,"v",-(i-c-l),"a",s,l,0,0,0,-s,-l,"h",-(o-2*s),"a",s,l,0,0,0,-s,l,"Z"]:e=["M",n,r,"H",n+o,"V",r+i,"H",n,"V",r,"Z"],e.join(" ")}function eMt(t){const e=Of("path");ti(e,ti(t));const n=Tve(t);return n&&e.setAttribute("d",n),e}function Tve(t){const e=t.tagName.toLowerCase();switch(e){case"path":return t.getAttribute("d");case"line":return YNt(t);case"polygon":return XNt(t);case"polyline":return KNt(t);case"ellipse":return ZNt(t);case"circle":return QNt(t);
455case"rect":return JNt(t)}throw new Error(`"${e}" cannot be converted to svg path element.`)}const tMt=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,_ve=/[ ,]+/,nMt=/^(\w+)\((.*)\)/;function rMt(t,e){const r=Of("svg").createSVGPoint();return r.x=t,r.y=e,r}function Qa(t){const n=Of("svg").createSVGMatrix();if(t!=null){const r=t,o=n;for(const i in r)o[i]=r[i]}return n}function s_(t){const e=Of("svg");return t!=null?(t instanceof DOMMatrix||(t=Qa(t)),e.createSVGTransformFromMatrix(t)):e.createSVGTransform()}function EP(t){let e=Qa();const n=t!=null&&t.match(tMt);if(!n)return e;for(let r=0,o=n.length;r<o;r+=1){const s=n[r].match(nMt);if(s){let a,l,c,u,d,h=Qa();const f=s[2].split(_ve);switch(s[1].toLowerCase()){case"scale":a=parseFloat(f[0]),l=f[1]===void 0?a:parseFloat(f[1]),h=h.scaleNonUniform(a,l);break;case"translate":c=parseFloat(f[0]),u=parseFloat(f[1]),h=h.translate(c,u);break;case"rotate":d=parseFloat(f[0]),c=parseFloat(f[1])||0,u=parseFloat(f[2])||0,c!==0||u!==0?h=h.translate(c,u).rotate(d).translate(-c,-u):h=h.rotate(d);break;case"skewx":d=parseFloat(f[0]),h=h.skewX(d);break;case"skewy":d=parseFloat(f[0]),h=h.skewY(d);break;case"matrix":h.a=parseFloat(f[0]),h.b=parseFloat(f[1]),h.c=parseFloat(f[2]),h.d=parseFloat(f[3]),h.e=parseFloat(f[4]),h.f=parseFloat(f[5]);break;default:continue}e=e.multiply(h)}}return e}function kw(t){const e=t||{},n=e.a!=null?e.a:1,r=e.b!=null?e.b:0,o=e.c!=null?e.c:0,i=e.d!=null?e.d:1,s=e.e!=null?e.e:0,a=e.f!=null?e.f:0;return`matrix(${n},${r},${o},${i},${s},${a})`}function FB(t){let e,n,r;if(t){const i=_ve;if(t.trim().indexOf("matrix")>=0){const s=EP(t),a=oMt(s);e=[a.translateX,a.translateY],n=[a.rotation],r=[a.scaleX,a.scaleY];const l=[];(e[0]!==0||e[1]!==0)&&l.push(`translate(${e.join(",")})`),(r[0]!==1||r[1]!==1)&&l.push(`scale(${r.join(",")})`),n[0]!==0&&l.push(`rotate(${n[0]})`),t=l.join(" ")}else{const s=t.match(/translate\((.*?)\)/);s&&(e=s[1].split(i));const a=t.match(/rotate\((.*?)\)/);a&&(n=a[1].split(i));const l=t.match(/scale\((.*?)\)/);l&&(r=l[1].split(i))}}const o=r&&r[0]?parseFloat(r[0]):1;return{raw:t||"",translation:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotation:{angle:n&&n[0]?parseInt(n[0],10):0,cx:n&&n[1]?parseInt(n[1],10):void 0,cy:n&&n[2]?parseInt(n[2],10):void 0},scale:{sx:o,sy:r&&r[1]?parseFloat(r[1]):o}}}function pz(t,e){const n=e.x*t.a+e.y*t.c+0,r=e.x*t.b+e.y*t.d+0;return{x:n,y:r}}function oMt(t){const e=pz(t,{x:0,y:1}),n=pz(t,{x:1,y:0}),r=180/Math.PI*Math.atan2(e.y,e.x)-90,o=180/Math.PI*Math.atan2(n.y,n.x);return{skewX:r,skewY:o,translateX:t.e,translateY:t.f,scaleX:Math.sqrt(t.a*t.a+t.b*t.b),scaleY:Math.sqrt(t.c*t.c+t.d*t.d),rotation:r}}function iMt(t){let e,n,r,o;return t?(e=t.a==null?1:t.a,o=t.d==null?1:t.d,n=t.b,r=t.c):e=o=1,{sx:n?Math.sqrt(e*e+n*n):e,sy:r?Math.sqrt(r*r+o*o):o}}function sMt(t){let e={x:0,y:1};t&&(e=pz(t,e));const n=180*Math.atan2(e.y,e.x)/Math.PI%360-90;return{angle:n%360+(n<0?360:0)}}function aMt(t){return{tx:t&&t.e||0,ty:t&&t.f||0}}function xx(t,e,n={}){if(e==null)return EP(ti(t,"transform"));if(n.absolute){t.setAttribute("transform",kw(e));return}const r=t.transform,o=s_(e);r.baseVal.appendItem(o)}function Hte(t,e,n=0,r={}){let o=ti(t,"transform");const i=FB(o);if(e==null)return i.translation;o=i.raw,o=o.replace(/translate\([^)]*\)/g,"").trim();const s=r.absolute?e:i.translation.tx+e,a=r.absolute?n:i.translation.ty+n,l=`translate(${s},${a})`;t.setAttribute("transform",`${l} ${o}`.trim())}function gz(t,e,n,r,o={}){let i=ti(t,"transform");const s=FB(i);if(e==null)return s.rotation;i=s.raw,i=i.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;const a=o.absolute?e:s.rotation.angle+e,l=n!=null&&r!=null?`,${n},${r}`:"",c=`rotate(${a}${l})`;t.setAttribute("transform",`${i} ${c}`.trim())}function mz(t,e,n){let r=ti(t,"transform");const o=FB(r);if(e==null)return o.scale;n=n??e,r=o.raw,r=r.replace(/scale\([^)]*\)/g,"").trim();const i=`scale(${e},${n})`;t.setAttribute("transform",`${r} ${i}`.trim())}function Z_(t,e){if(Zv(e)&&Zv(t)){const n=e.getScreenCTM(),r=t.getScreenCTM();if(n&&r)return n.inverse().multiply(r)}return Qa()}function lMt(t,e){let n=Qa();if(Zv(e)&&Zv(t)){let r=t;const o=[];for(;r&&r!==e;){const i=r.getAttribute("transform")||null,s=EP(i);o.push(s),r=r.parentNode}
455o.reverse().forEach(i=>{n=n.multiply(i)})}return n}function cMt(t,e,n){const r=t instanceof SVGSVGElement?t:t.ownerSVGElement,o=r.createSVGPoint();o.x=e,o.y=n;try{const i=r.getScreenCTM(),s=o.matrixTransform(i.inverse()),a=Z_(t,r).inverse();return s.matrixTransform(a)}catch{return o}}var sh;(function(t){const e={};function n(i){return e[i]||{}}t.get=n;function r(i,s){e[i]=s}t.register=r;function o(i){delete e[i]}t.unregister=o})(sh||(sh={}));var Yb;(function(t){const e=new WeakMap;function n(i){return e.has(i)||e.set(i,{events:Object.create(null)}),e.get(i)}t.ensure=n;function r(i){return e.get(i)}t.get=r;function o(i){return e.delete(i)}t.remove=o})(Yb||(Yb={}));var ur;(function(t){t.returnTrue=()=>!0,t.returnFalse=()=>!1;function e(o){o.stopPropagation()}t.stopPropagationCallback=e;function n(o,i,s){o.addEventListener!=null&&o.addEventListener(i,s)}t.addEventListener=n;function r(o,i,s){o.removeEventListener!=null&&o.removeEventListener(i,s)}t.removeEventListener=r})(ur||(ur={}));(function(t){const e=/[^\x20\t\r\n\f]+/g,n=/^([^.]*)(?:\.(.+)|)/;function r(a){return(a||"").match(e)||[""]}t.splitType=r;function o(a){const l=n.exec(a)||[];return{originType:l[1]?l[1].trim():l[1],namespaces:l[2]?l[2].split(".").map(c=>c.trim()).sort():[]}}t.normalizeType=o;function i(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType}t.isValidTarget=i;function s(a,l){if(l){const c=a;return c.querySelector!=null&&c.querySelector(l)!=null}return!0}t.isValidSelector=s})(ur||(ur={}));(function(t){let e=0;const n=new WeakMap;function r(a){return n.has(a)||(n.set(a,e),e+=1),n.get(a)}t.ensureHandlerId=r;function o(a){return n.get(a)}t.getHandlerId=o;function i(a){return n.delete(a)}t.removeHandlerId=i;function s(a,l){return n.set(a,l)}t.setHandlerId=s})(ur||(ur={}));(function(t){function e(n,r){const o=[],i=Yb.get(n),s=i&&i.events&&i.events[r.type],a=s&&s.handlers||[],l=s?s.delegateCount:0;if(l>0&&!(r.type==="click"&&typeof r.button=="number"&&r.button>=1)){for(let c=r.target;c!==n;c=c.parentNode||n)if(c.nodeType===1&&!(r.type==="click"&&c.disabled===!0)){const u=[],d={};for(let h=0;h<l;h+=1){const f=a[h],p=f.selector;if(p!=null&&d[p]==null){const m=n,y=[];m.querySelectorAll(p).forEach(v=>{y.push(v)}),d[p]=y.includes(c)}d[p]&&u.push(f)}u.length&&o.push({elem:c,handlers:u})}}return l<a.length&&o.push({elem:n,handlers:a.slice(l)}),o}t.getHandlerQueue=e})(ur||(ur={}));(function(t){function e(n){return n!=null&&n===n.window}t.isWindow=e})(ur||(ur={}));(function(t){function e(n,r){const o=n.nodeType===9?n.documentElement:n,i=r&&r.parentNode;return n===i||!!(i&&i.nodeType===1&&(o.contains?o.contains(i):n.compareDocumentPosition&&n.compareDocumentPosition(i)&16))}t.contains=e})(ur||(ur={}));class kp{constructor(e,n){this.isDefaultPrevented=ur.returnFalse,this.isPropagationStopped=ur.returnFalse,this.isImmediatePropagationStopped=ur.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const r=this.originalEvent;this.isDefaultPrevented=ur.returnTrue,r&&!this.isSimulated&&r.preventDefault()},this.stopPropagation=()=>{const r=this.originalEvent;this.isPropagationStopped=ur.returnTrue,r&&!this.isSimulated&&r.stopPropagation()},this.stopImmediatePropagation=()=>{const r=this.originalEvent;this.isImmediatePropagationStopped=ur.returnTrue,r&&!this.isSimulated&&r.stopImmediatePropagation(),this.stopPropagation()},typeof e=="string"?this.type=e:e.type&&(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?ur.returnTrue:ur.returnFalse,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.timeStamp=e.timeStamp),n&&Object.assign(this,n),this.timeStamp||(this.timeStamp=Date.now())}}(function(t){function e(n){return n instanceof t?n:new t(n)}t.create=e})(kp||(kp={}));(function(t){function e(n,r){Object.defineProperty(t.prototype,n,{enumerable:!0,configurable:!0,get:typeof r=="function"?function(){if(this.originalEvent)return r(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[n]},set(o){Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:o})}})}t.addProperty=e})(kp||(kp={}));(function(t){const e={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(e).forEach(n=>t.addProperty(n,e[n]))})(kp||(kp={}));(function(t){sh.register("load",{noBubble:!0})})();(function(t){sh.register("beforeunload",{postDispatch(e,n){n.result!==void 0&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}})})();(function(t){sh.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(e,n){let r;const o=n.relatedTarget,i=n.handleObj;return(!o||o!==e&&!ur.contains(e,o))&&(n.type=i.originType,r=i.handler.call(e,n),n.type="mouseover"),r}}),sh.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(e,n){let r;const o=n.relatedTarget,i=n.handleObj;return(!o||o!==e&&!ur.contains(e,o))&&(n.type=i.originType,r=i.handler.call(e,n),n.type="mouseout"),r}})})();var uMt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n},xP;(function(t){let e;function n(s,a,l,c,u){if(!ur.isValidTarget(s))return;let d;if(typeof l!="function"){const{handler:m,selector:y}=l,v=uMt(l,["handler","selector"]);l=m,u=y,d=v}const h=Yb.ensure(s);let f=h.handler;f==null&&(f=h.handler=function(m,...y){return e!==m.type?o(s,m,...y):void 0});const p=ur.ensureHandlerId(l);
455ur.splitType(a).forEach(m=>{const{originType:y,namespaces:v}=ur.normalizeType(m);if(!y)return;let b=y,S=sh.get(b);b=(u?S.delegateType:S.bindType)||b,S=sh.get(b);const w=Object.assign({type:b,originType:y,data:c,selector:u,guid:p,handler:l,namespace:v.join(".")},d),A=h.events;let _=A[b];_||(_=A[b]={handlers:[],delegateCount:0},(!S.setup||S.setup(s,c,v,f)===!1)&&ur.addEventListener(s,b,f)),S.add&&(ur.removeHandlerId(w.handler),S.add(s,w),ur.setHandlerId(w.handler,p)),u?(_.handlers.splice(_.delegateCount,0,w),_.delegateCount+=1):_.handlers.push(w)})}t.on=n;function r(s,a,l,c,u){const d=Yb.get(s);if(!d)return;const h=d.events;h&&(ur.splitType(a).forEach(f=>{const{originType:p,namespaces:m}=ur.normalizeType(f);if(!p){Object.keys(h).forEach(A=>{r(s,A+f,l,c,!0)});return}let y=p;const v=sh.get(y);y=(c?v.delegateType:v.bindType)||y;const b=h[y];if(!b)return;const S=m.length>0?new RegExp(`(^|\\.)${m.join("\\.(?:.*\\.|)")}(\\.|$)`):null,w=b.handlers.length;for(let A=b.handlers.length-1;A>=0;A-=1){const _=b.handlers[A];(u||p===_.originType)&&(!l||ur.getHandlerId(l)===_.guid)&&(S==null||_.namespace&&S.test(_.namespace))&&(c==null||c===_.selector||c==="**"&&_.selector)&&(b.handlers.splice(A,1),_.selector&&(b.delegateCount-=1),v.remove&&v.remove(s,_))}w&&b.handlers.length===0&&((!v.teardown||v.teardown(s,m,d.handler)===!1)&&ur.removeEventListener(s,y,d.handler),delete h[y])}),Object.keys(h).length===0&&Yb.remove(s))}t.off=r;function o(s,a,...l){const c=kp.create(a);c.delegateTarget=s;const u=sh.get(c.type);if(u.preDispatch&&u.preDispatch(s,c)===!1)return;const d=ur.getHandlerQueue(s,c);for(let h=0,f=d.length;h<f&&!c.isPropagationStopped();h+=1){const p=d[h];c.currentTarget=p.elem;for(let m=0,y=p.handlers.length;m<y&&!c.isImmediatePropagationStopped();m+=1){const v=p.handlers[m];if(c.rnamespace==null||v.namespace&&c.rnamespace.test(v.namespace)){c.handleObj=v,c.data=v.data;const b=sh.get(v.originType).handle,S=b?b(p.elem,c,...l):v.handler.call(p.elem,c,...l);S!==void 0&&(c.result=S,S===!1&&(c.preventDefault(),c.stopPropagation()))}}}return u.postDispatch&&u.postDispatch(s,c),c.result}t.dispatch=o;function i(s,a,l,c){let u=s,d=typeof s=="string"?s:s.type,h=typeof s=="string"||u.namespace==null?[]:u.namespace.split(".");const f=l;if(f.nodeType===3||f.nodeType===8)return;d.indexOf(".")>-1&&(h=d.split("."),d=h.shift(),h.sort());const p=d.indexOf(":")<0&&`on${d}`;u=s instanceof kp?s:new kp(d,typeof s=="object"?s:null),u.namespace=h.join("."),u.rnamespace=u.namespace?new RegExp(`(^|\\.)${h.join("\\.(?:.*\\.|)")}(\\.|$)`):null,u.result=void 0,u.target||(u.target=f);const m=[u];Array.isArray(a)?m.push(...a):m.push(a);const y=sh.get(d);if(!c&&y.trigger&&y.trigger(f,u,a)===!1)return;let v;const b=[f];if(!c&&!y.noBubble&&!ur.isWindow(f)){v=y.delegateType||d;let w=f,A=f.parentNode;for(;A!=null;)b.push(A),w=A,A=A.parentNode;const _=f.ownerDocument||document;if(w===_){const P=w.defaultView||w.parentWindow||window;b.push(P)}}let S=f;for(let w=0,A=b.length;w<A&&!u.isPropagationStopped();w+=1){const _=b[w];S=_,u.type=w>1?v:y.bindType||d;const P=Yb.get(_);P&&P.events[u.type]&&P.handler&&P.handler.call(_,...m);const R=p&&_[p]||null;R&&ur.isValidTarget(_)&&(u.result=R.call(_,...m),u.result===!1&&u.preventDefault())}if(u.type=d,!c&&!u.isDefaultPrevented()){const w=y.preventDefault;if((w==null||w(b.pop(),u,a)===!1)&&ur.isValidTarget(f)&&p&&typeof f[d]=="function"&&!ur.isWindow(f)){const A=f[p];A&&(f[p]=null),e=d,u.isPropagationStopped()&&S.addEventListener(d,ur.stopPropagationCallback),f[d](),u.isPropagationStopped()&&S.removeEventListener(d,ur.stopPropagationCallback),e=void 0,A&&(f[p]=A)}}return u.result}t.trigger=i})(xP||(xP={}));var bl;(function(t){function e(i,s,a,l,c){return J_.on(i,s,a,l,c),i}t.on=e;function n(i,s,a,l,c){return J_.on(i,s,a,l,c,!0),i}t.once=n;function r(i,s,a,l){return J_.off(i,s,a,l),i}t.off=r;function o(i,s,a,l){return xP.trigger(s,a,i,l),i}t.trigger=o})(bl||(bl={}));var J_;(function(t){function e(r,o,i,s,a,l){if(typeof o=="object"){typeof i!="string"&&(s=s||i,i=void 0),Object.keys(o).forEach(c=>e(r,c,i,s,o[c],l));return}if(s==null&&a==null?(a=i,s=i=void 0):a==null&&(typeof i=="string"?(a=s,s=void 0):(a=s,s=i,i=void 0)),a===!1)a=ur.returnFalse;else if(!a)return;if(l){const c=a;a=function(u,...d){return t.off(r,u),c.call(this,u,...d)},ur.setHandlerId(a,ur.ensureHandlerId(c))}xP.on(r,o,a,s,i)}t.on=e;function n(r,o,i,s){const a=o;if(a&&a.preventDefault!=null&&a.handleObj!=null){const l=a.handleObj;n(a.delegateTarget,l.namespace?`${l.originType}.${l.namespace}`:l.originType,l.selector,l.handler);return}if(typeof o=="object"){const l=o;Object.keys(l).forEach(c=>n(r,c,i,l[c]));return}(i===!1||typeof i=="function")&&(s=i,i=void 0),s===!1&&(s=ur.returnFalse),xP.off(r,o,s,i)}t.off=n})(J_||(J_={}));class Ive{constructor(e,n,r){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=Qv.isEventSupported("wheel")?"wheel":"mousewheel",this.target=e,this.onWheelCallback=n,this.onWheelGuard=r,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(e){if(this.onWheelGuard!=null&&!this.onWheelGuard(e))return;this.deltaX+=e.deltaX,this.deltaY+=e.deltaY,e.preventDefault();let n;(this.deltaX!==0||this.deltaY!==0)&&(e.stopPropagation(),n=!0),n===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(e)}))}didWheel(e){this.animationFrameId=0,this.onWheelCallback(e,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function Pve(t,e=60){let n=null;return(...r)=>{n&&clearTimeout(n),n=window.setTimeout(()=>{t.apply(this,r)},e)}}function dMt(t){let e=null,n=[];const r=()=>{if(getComputedStyle(t).position==="static"){const c=t.style;c.position="relative"}const l=document.createElement("object");return l.onload=()=>{l.contentDocument.defaultView.addEventListener("resize",o),o()},l.style.display="block",l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.height="100%",l.style.width="100%",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.zIndex="-1",l.style.opacity="0",l.setAttribute("tabindex","-1"),l.type="text/html",t.appendChild(l),l.data="about:blank",l},o=Pve(()=>
455{n.forEach(l=>l(t))}),i=l=>{e||(e=r()),n.indexOf(l)===-1&&n.push(l)},s=()=>{e&&e.parentNode&&(e.contentDocument&&e.contentDocument.defaultView.removeEventListener("resize",o),e.parentNode.removeChild(e),e=null,n=[])};return{element:t,bind:i,destroy:s,unbind:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),n.length===0&&e&&s()}}}function hMt(t){let e=null,n=[];const r=Pve(()=>{n.forEach(l=>{l(t)})}),o=()=>{const l=new ResizeObserver(r);return l.observe(t),r(),l},i=l=>{e||(e=o()),n.indexOf(l)===-1&&n.push(l)},s=()=>{e&&(e.disconnect(),n=[],e=null)};return{element:t,bind:i,destroy:s,unbind:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),n.length===0&&e&&s()}}}const fMt=typeof ResizeObserver<"u"?hMt:dMt;var k2;(function(t){const e=new WeakMap;function n(o){let i=e.get(o);return i||(i=fMt(o),e.set(o,i),i)}function r(o){o.destroy(),e.delete(o.element)}t.bind=(o,i)=>{const s=n(o);return s.bind(i),()=>s.unbind(i)},t.clear=o=>{const i=n(o);r(i)}})(k2||(k2={}));class wP{constructor(e={}){this.comparator=e.comparator||wP.defaultComparator,this.index={},this.data=e.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(e,n,r){const o={priority:e,value:n},i=this.data.length;return r&&(o.id=r,this.index[r]=i),this.data.push(o),this.bubbleUp(i),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}
455updatePriority(e,n){const r=this.index[e];if(typeof r>"u")throw new Error(`Node with id '${e}' was not found in the heap.`);const o=this.data,i=o[r].priority,s=this.comparator(n,i);s<0?(o[r].priority=n,this.bubbleUp(r)):s>0&&(o[r].priority=n,this.bubbleDown(r))}remove(){const e=this.data,n=e[0],r=e.pop();return n.id&&delete this.index[n.id],e.length>0&&(e[0]=r,r.id&&(this.index[r.id]=0),this.bubbleDown(0)),n?n.value:null}heapify(){for(let e=0;e<this.data.length;e+=1)this.bubbleUp(e)}bubbleUp(e){const n=this.data;let r,o,i=e;for(;i>0&&(o=i-1>>>1,this.comparator(n[i].priority,n[o].priority)<0);){r=n[o],n[o]=n[i];let s=n[i].id;s!=null&&(this.index[s]=o),n[i]=r,s=n[i].id,s!=null&&(this.index[s]=i),i=o}}bubbleDown(e){const n=this.data,r=n.length-1;let o=e;for(;;){const i=(o<<1)+1,s=i+1;let a=o;if(i<=r&&this.comparator(n[i].priority,n[a].priority)<0&&(a=i),s<=r&&this.comparator(n[s].priority,n[a].priority)<0&&(a=s),a!==o){const l=n[a];n[a]=n[o];let c=n[o].id;c!=null&&(this.index[c]=a),n[o]=l,c=n[o].id,c!=null&&(this.index[c]=o),o=a}else break}}}(function(t){t.defaultComparator=(e,n)=>e-n})(wP||(wP={}));var yz;(function(t){function e(n,r,o=(i,s)=>1){const i={},s={},a={},l=new wP;for(i[r]=0,Object.keys(n).forEach(c=>{c!==r&&(i[c]=1/0),l.insert(i[c],c,c)});!l.isEmpty();){const c=l.remove();a[c]=!0;const u=n[c]||[];for(let d=0;d<u.length;d+=1){const h=u[d];if(!a[h]){const f=i[c]+o(c,h);f<i[h]&&(i[h]=f,s[h]=c,l.updatePriority(h,f))}}}return s}t.run=e})(yz||(yz={}));class Jg{constructor(e,n,r,o){if(e==null)return this.set(255,255,255,1);if(typeof e=="number")return this.set(e,n,r,o);if(typeof e=="string")return Jg.fromString(e)||this;if(Array.isArray(e))return this.set(e);this.set(e.r,e.g,e.b,e.a==null?1:e.a)}blend(e,n,r){this.set(e.r+(n.r-e.r)*r,e.g+(n.g-e.g)*r,e.b+(n.b-e.b)*r,e.a+(n.a-e.a)*r)}lighten(e){const n=Jg.lighten(this.toArray(),e);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}darken(e){this.lighten(-e)}set(e,n,r,o){const i=Array.isArray(e)?e[0]:e,s=Array.isArray(e)?e[1]:n,a=Array.isArray(e)?e[2]:r,l=Array.isArray(e)?e[3]:o;return this.r=Math.round(hh(i,0,255)),this.g=Math.round(hh(s,0,255)),this.b=Math.round(hh(a,0,255)),this.a=l==null?1:hh(l,0,1),this}toHex(){return`#${["r","g","b"].map(n=>{const r=this[n].toString(16);return r.length<2?`0${r}`:r}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return Jg.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(e){const n=`${this.r},${this.g},${this.b},`;return e?`rgb(${n})`:`rgba(${n},${this.a})`}toGrey(){return Jg.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(t){function e(S){return new t(S)}t.fromArray=e;function n(S){return new t([...p(S),1])}t.fromHex=n;function r(S){const w=S.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(w){const A=w[1].split(/\s*,\s*/).map(_=>parseInt(_,10));return new t(A)}return null}t.fromRGBA=r;function o(S,w,A){A<0&&++A,A>1&&--A;const _=6*A;return _<1?S+(w-S)*_:2*A<1?w:3*A<2?S+(w-S)*(2/3-A)*6:S}function i(S){const w=S.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(w){const A=w[2].split(/\s*,\s*/),_=(parseFloat(A[0])%360+360)%360/360,P=parseFloat(A[1])/100,R=parseFloat(A[2])/100,O=A[3]==null?1:parseInt(A[3],10);return new t(c(_,P,R,O))}return null}t.fromHSLA=i;function s(S){if(S.startsWith("#"))return n(S);if(S.startsWith("rgb"))return r(S);const w=t.named[S];return w?n(w):i(S)}t.fromString=s;function a(S,w){return t.fromArray([S,S,S,w])}t.makeGrey=a;function l(S,w,A,_){const P=Array.isArray(S)?S[0]:S,R=Array.isArray(S)?S[1]:w,O=Array.isArray(S)?S[2]:A,N=Array.isArray(S)?S[3]:_,M=Math.max(P,R,O),L=Math.min(P,R,O),F=(M+L)/2;let $=0,D=0;if(L!==M){const k=M-L;switch(D=F>.5?k/(2-M-L):k/(M+L),M){case P:$=(R-O)/k+(R<O?6:0);break;case R:$=(O-P)/k+2;break;case O:$=(P-R)/k+4;break}$/=6}return[$,D,F,N??1]}t.rgba2hsla=l;function c(S,w,A,_){const P=Array.isArray(S)?S[0]:S,R=Array.isArray(S)?S[1]:w,O=Array.isArray(S)?S[2]:A,N=Array.isArray(S)?S[3]:_,M=O<=.5?O*(R+1):O+R-O*R,L=2*O-M;return[o(L,M,P+1/3)*256,o(L,M,P)*256,o(L,M,P-1/3)*256,N??1]}t.hsla2rgba=c;function u(S){return new t(Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),S?void 0:parseFloat(Math.random().toFixed(2)))}t.random=u;function d(){const S="0123456789ABCDEF";let w="#";for(let A=0;A<6;A+=1)w+=S[Math.floor(Math.random()*16)];return w}t.randomHex=d;function h(S){return u(S).toString()}t.randomRGBA=h;function f(S,w){if(typeof S=="string"){const O=S[0]==="#",[N,M,L]=p(S);return w?N*.299+M*.587+L*.114>
455186?"#000000":"#ffffff":`${O?"#":""}${m(255-N,255-M,255-L)}`}const A=S[0],_=S[1],P=S[2],R=S[3];return w?A*.299+_*.587+P*.114>186?[0,0,0,R]:[255,255,255,R]:[255-A,255-_,255-P,R]}t.invert=f;function p(S){const w=S.indexOf("#")===0?S:`#${S}`;let A=+`0x${w.substr(1)}`;if(!(w.length===4||w.length===7)||Number.isNaN(A))throw new Error("Invalid hex color.");const _=w.length===4?4:8,P=(1<<_)-1,R=["b","g","r"].map(()=>{const O=A&P;return A>>=_,_===4?17*O:O});return[R[2],R[1],R[0]]}function m(S,w,A){const _=P=>P.length<2?`0${P}`:P;return`${_(S.toString(16))}${_(w.toString(16))}${_(A.toString(16))}`}function y(S,w){return b(S,w)}t.lighten=y;function v(S,w){return b(S,-w)}t.darken=v;function b(S,w){if(typeof S=="string"){const P=S[0]==="#",R=parseInt(P?S.substr(1):S,16),O=hh((R>>16)+w,0,255),N=hh((R>>8&255)+w,0,255),M=hh((R&255)+w,0,255);return`${P?"#":""}${(M|N<<8|O<<16).toString(16)}`}const A=m(S[0],S[1],S[2]),_=p(b(A,w));return[_[0],_[1],_[2],S[3]]}})(Jg||(Jg={}));(function(t){t.named={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}})(Jg||(Jg={}));class vz{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(e){return this.map.has(e)}get(e){return this.map.get(e)}set(e,n){this.map.set(e,n),this.arr.push(e)}delete(e){const n=this.arr.indexOf(e);n>=0&&this.arr.splice(n,1);const r=this.map.get(e);return this.map.delete(e),r}each(e){this.arr.forEach(n=>{const r=this.map.get(n);e(r,n)})}dispose(){this.clear()}}var wx;(function(t){function e(o){const i=[],s=[];return Array.isArray(o)?i.push(...o):o.split("|").forEach(a=>{a.indexOf("&")===-1?i.push(a):s.push(...a.split("&"))}),{or:i,and:s}}t.parse=e;function n(o,i){if(o!=null&&i!=null){const s=e(o),a=e(i),l=s.or.sort(),c=a.or.sort(),u=s.and.sort(),d=a.and.sort(),h=(f,p)=>f.length===p.length&&(f.length===0||f.every((m,y)=>m===p[y]));return h(l,c)&&h(u,d)}return o==null&&i==null}t.equals=n;function r(o,i,s){if(i==null||Array.isArray(i)&&i.length===0)return s?o.altKey!==!0&&o.ctrlKey!==!0&&o.metaKey!==!0&&o.shiftKey!==!0:!0;const{or:a,and:l}=e(i),c=u=>{const d=`${u.toLowerCase()}Key`;return o[d]===!0};return a.some(u=>c(u))&&l.every(u=>c(u))}t.isMatch=r})(wx||(wx={}));var VC;(function(t){t.linear=e=>e,t.quad=e=>e*e,t.cubic=e=>e*e*e,t.inout=e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*e,r=n*e;return 4*(e<.5?r:3*(e-n)+r-.75)},t.exponential=e=>Math.pow(2,10*(e-1)),t.bounce=e=>{for(let n=0,r=1;;n+=r,r/=2)if(e>=(7-4*n)/11){const o=(11-6*n-11*e)/4;return-o*o+r*r}}})(VC||(VC={}));(function(t){t.decorators={reverse(e){return n=>1-e(1-n)},reflect(e){return n=>.5*(n<.5?e(2*n):2-e(2-2*n))},clamp(e,n=0,r=1){return o=>{const i=e(o);return i<n?n:i>r?r:i}},back(e=1.70158){return n=>n*n*((e+1)*n-e)},elastic(e=1.5){return n=>Math.pow(2,10*(n-1))*Math.cos(20*Math.PI*e/3*n)}}})(VC||(VC={}));(function(t){function e(D){return-1*Math.cos(D*(Math.PI/2))+1}t.easeInSine=e;function n(D){return Math.sin(D*(Math.PI/2))}t.easeOutSine=n;function r(D){return-.5*(Math.cos(Math.PI*D)-1)}t.easeInOutSine=r;function o(D){return D*D}t.easeInQuad=o;function i(D){return D*(2-D)}t.easeOutQuad=i;function s(D){return D<.5?2*D*D:-1+(4-2*D)*D}t.easeInOutQuad=s;function a(D){return D*D*D}t.easeInCubic=a;function l(D){const k=D-1;return k*k*k+1}t.easeOutCubic=l;function c(D){return D<.5?4*D*D*D:(D-1)*(2*D-2)*(2*D-2)+1}t.easeInOutCubic=c;function u(D){return D*D*D*D}t.easeInQuart=u;function d(D){const k=D-1;return 1-k*k*k*k}t.easeOutQuart=d;function h(D){const k=D-1;return D<.5?8*D*D*D*D:1-8*k*k*k*k}t.easeInOutQuart=h;function f(D){return D*D*D*D*D}t.easeInQuint=f;function p(D){const k=D-1;return 1+k*k*k*k*k}t.easeOutQuint=p;function m(D){const k=D-1;return D<.5?16*D*D*D*D*D:1+16*k*k*k*k*k}t.easeInOutQuint=m;function y(D){return D===0?0:Math.pow(2,10*(D-1))}t.easeInExpo=y;function v(D){return D===1?1:-Math.pow(2,-10*D)+1}t.easeOutExpo=v;function b(D){if(D===0||D===1)return D;const k=D*2,U=k-1;return k<1?.5*Math.pow(2,10*U):.5*(-Math.pow(2,-10*U)+2)}t.easeInOutExpo=b;function S(D){const k=D/1;return-1*(Math.sqrt(1-k*D)-1)}t.easeInCirc=S;function w(D){const k=D-1;return Math.sqrt(1-k*k)}t.easeOutCirc=w;function A(D){const k=D*2,U=k-2;return k<1?-.5*(Math.sqrt(1-k*k)-1):.5*(Math.sqrt(1-U*U)+1)}t.easeInOutCirc=A;
455function _(D,k=1.70158){return D*D*((k+1)*D-k)}t.easeInBack=_;function P(D,k=1.70158){const U=D/1-1;return U*U*((k+1)*U+k)+1}t.easeOutBack=P;function R(D,k=1.70158){const U=D*2,H=U-2,V=k*1.525;return U<1?.5*U*U*((V+1)*U-V):.5*(H*H*((V+1)*H+V)+2)}t.easeInOutBack=R;function O(D,k=.7){if(D===0||D===1)return D;const H=D/1-1,V=1-k,q=V/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*H)*Math.sin((H-q)*(2*Math.PI)/V))}t.easeInElastic=O;function N(D,k=.7){const U=1-k,H=D*2;if(D===0||D===1)return D;const V=U/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*H)*Math.sin((H-V)*(2*Math.PI)/U)+1}t.easeOutElastic=N;function M(D,k=.65){const U=1-k;if(D===0||D===1)return D;const H=D*2,V=H-1,q=U/(2*Math.PI)*Math.asin(1);return H<1?-.5*(Math.pow(2,10*V)*Math.sin((V-q)*(2*Math.PI)/U)):Math.pow(2,-10*V)*Math.sin((V-q)*(2*Math.PI)/U)*.5+1}t.easeInOutElastic=M;function L(D){const k=D/1;if(k<1/2.75)return 7.5625*k*k;if(k<2/2.75){const U=k-.5454545454545454;return 7.5625*U*U+.75}if(k<2.5/2.75){const U=k-.8181818181818182;return 7.5625*U*U+.9375}{const U=k-.9545454545454546;return 7.5625*U*U+.984375}}t.easeOutBounce=L;function F(D){return 1-L(1-D)}t.easeInBounce=F;function $(D){return D<.5?F(D*2)*.5:L(D*2-1)*.5+.5}t.easeInOutBounce=$})(VC||(VC={}));var Xb;(function(t){t.number=(e,n)=>{const r=n-e;return o=>e+r*o},t.object=(e,n)=>{const r=Object.keys(e);return o=>{const i={};for(let s=r.length-1;s!==-1;s-=1){const a=r[s];i[a]=e[a]+(n[a]-e[a])*o}return i}},t.unit=(e,n)=>{const r=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,o=r.exec(e),i=r.exec(n),s=i?i[1]:"",a=o?+o[1]:0,l=i?+i[1]:0,c=s.indexOf("."),u=c>0?s[1].length-c-1:0,d=l-a,h=o?o[2]:"";return f=>(a+d*f).toFixed(u)+h},t.color=(e,n)=>{const r=parseInt(e.slice(1),16),o=parseInt(n.slice(1),16),i=r&255,s=(o&255)-i,a=r&65280,l=(o&65280)-a,c=r&16711680,u=(o&16711680)-c;return d=>{const h=i+s*d&255,f=a+l*d&65280,p=c+u*d&16711680;return`#${(1<<24|h|f|p).toString(16).slice(1)}`}}})(Xb||(Xb={}));const eI=[];function pMt(t,e){const n=eI.find(r=>r.name===t);if(!(n&&(n.loadTimes+=1,n.loadTimes>1))&&!Qv.isApplyingHMR()){const r=document.createElement("style");r.setAttribute("type","text/css"),r.textContent=e;const o=document.querySelector("head");o&&o.insertBefore(r,o.firstChild),eI.push({name:t,loadTimes:1,styleElement:r})}}function gMt(t){const e=eI.findIndex(n=>n.name===t);if(e>-1){const n=eI[e];if(n.loadTimes-=1,n.loadTimes>0)return;let r=n.styleElement;r&&r.parentNode&&r.parentNode.removeChild(r),r=null,eI.splice(e,1)}}var Zo;(function(t){function e(r){return 180*r/Math.PI%360}t.toDeg=e,t.toRad=function(r,o=!1){return(o?r:r%360)*Math.PI/180};function n(r){return r%360+(r<0?360:0)}t.normalize=n})(Zo||(Zo={}));var Ko;(function(t){function e(a,l=0){return Number.isInteger(a)?a:+a.toFixed(l)}t.round=e;function n(a,l){let c,u;if(l==null?(u=a??1,c=0):(u=l,c=a??0),u<c){const d=c;c=u,u=d}return Math.floor(Math.random()*(u-c+1)+c)}t.random=n;function r(a,l,c){return Number.isNaN(a)?NaN:Number.isNaN(l)||Number.isNaN(c)?0:l<c?a<l?l:a>c?c:a:a<c?c:a>l?l:a}t.clamp=r;function o(a,l){return l*Math.round(a/l)}t.snapToGrid=o;function i(a,l){return l!=null&&a!=null&&l.x>=a.x&&l.x<=a.x+a.width&&l.y>=a.y&&l.y<=a.y+a.height}t.containsPoint=i;function s(a,l){const c=a.x-l.x,u=a.y-l.y;return c*c+u*u}t.squaredLength=s})(Ko||(Ko={}));class R0{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class De extends R0{constructor(e,n){super(),this.x=e??0,this.y=n??0}round(e=0){return this.x=Ko.round(this.x,e),this.y=Ko.round(this.y,e),this}add(e,n){const r=De.create(e,n);return this.x+=r.x,this.y+=r.y,this}update(e,n){const r=De.create(e,n);return this.x=r.x,this.y=r.y,this}translate(e,n){const r=De.create(e,n);return this.x+=r.x,this.y+=r.y,this}rotate(e,n){const r=De.rotate(this,e,n);return this.x=r.x,this.y=r.y,this}scale(e,n,r=new De){const o=De.create(r);return this.x=o.x+e*(this.x-o.x),this.y=o.y+n*(this.y-o.y),this}closest(e){if(e.length===1)return De.create(e[0]);let n=null,r=1/0;return e.forEach(o=>{const i=this.squaredDistance(o);i<r&&(n=o,r=i)}),n?De.create(n):null}distance(e){return Math.sqrt(this.squaredDistance(e))}squaredDistance(e){const n=De.create(e),r=this.x-n.x,o=this.y-n.y;return r*r+o*o}manhattanDistance(e){const n=De.create(e);return Math.abs(n.x-this.x)+Math.abs(n.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(e=new De){const n=De.create(e),r=-(n.y-this.y),o=n.x-this.x;let i=Math.atan2(r,o);return i<0&&(i=2*Math.PI+i),180*i/Math.PI}angleBetween(e,n){if(this.equals(e)||this.equals(n))return NaN;let r=this.theta(n)-this.theta(e);return r<0&&(r+=360),r}vectorAngle(e){return new De(0,0).angleBetween(this,e)}toPolar(e){return this.update(De.toPolar(this,e)),this}changeInAngle(e,n,r=new De){return this.clone().translate(-e,-n).theta(r)-this.theta(r)}adhereToRect(e){return Ko.containsPoint(e,this)||(this.x=Math.min(Math.max(this.x,e.x),e.x+e.width),this.y=Math.min(Math.max(this.y,e.y),e.y+e.height)),this}bearing(e){const n=De.create(e),r=Zo.toRad(this.y),o=Zo.toRad(n.y),i=this.x,s=n.x,a=Zo.toRad(s-i),l=Math.sin(a)*Math.cos(o),c=Math.cos(r)*Math.sin(o)-Math.sin(r)*Math.cos(o)*Math.cos(a),u=Zo.toDeg(Math.atan2(l,c)),d=["NE","E","SE","S","SW","W","NW","N"];let h=u-22.5;return h<0&&(h+=360),h=parseInt(h/45,10),d[h]}cross(e,n){if(e!=null&&n!=null){const r=De.create(e),o=De.create(n);return(o.x-this.x)*(r.y-this.y)-(o.y-this.y)*(r.x-this.x)}return NaN}dot(e){const n=De.create(e);return this.x*n.x+this.y*n.y}diff(e,n){if(typeof e=="number")return new De(this.x-e,this.y-n);const r=De.create(e);return new De(this.x-r.x,this.y-r.y)}lerp(e,n){const r=De.create(e);return new De((1-n)*this.x+n*r.x,(1-n)*this.y+n*r.y)}normalize(e=1){const n=e/this.magnitude();return this.scale(n,n)}move(e,n){const r=De.create(e),o=Zo.toRad(r.theta(this));return this.translate(Math.cos(o)*n,-Math.sin(o)*n)}reflection(e){return De.create(e).move(this,this.distance(e))}
455snapToGrid(e,n){return this.x=Ko.snapToGrid(this.x,e),this.y=Ko.snapToGrid(this.y,n??e),this}equals(e){const n=De.create(e);return n!=null&&n.x===this.x&&n.y===this.y}clone(){return De.clone(this)}toJSON(){return De.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(t){function e(n){return n!=null&&n instanceof t}t.isPoint=e})(De||(De={}));(function(t){function e(r){return r!=null&&typeof r=="object"&&typeof r.x=="number"&&typeof r.y=="number"}t.isPointLike=e;function n(r){return r!=null&&Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}t.isPointData=n})(De||(De={}));(function(t){function e(d,h){return d==null||typeof d=="number"?new t(d,h):n(d)}t.create=e;function n(d){return t.isPoint(d)?new t(d.x,d.y):Array.isArray(d)?new t(d[0],d[1]):new t(d.x,d.y)}t.clone=n;function r(d){return t.isPoint(d)?{x:d.x,y:d.y}:Array.isArray(d)?{x:d[0],y:d[1]}:{x:d.x,y:d.y}}t.toJSON=r;function o(d,h,f=new t){let p=Math.abs(d*Math.cos(h)),m=Math.abs(d*Math.sin(h));const y=n(f),v=Zo.normalize(Zo.toDeg(h));return v<90?m=-m:v<180?(p=-p,m=-m):v<270&&(p=-p),new t(y.x+p,y.y+m)}t.fromPolar=o;function i(d,h=new t){const f=n(d),p=n(h),m=f.x-p.x,y=f.y-p.y;return new t(Math.sqrt(m*m+y*y),Zo.toRad(p.theta(f)))}t.toPolar=i;function s(d,h){return d===h?!0:d!=null&&h!=null?d.x===h.x&&d.y===h.y:!1}t.equals=s;
455function a(d,h){if(d==null&&h!=null||d!=null&&h==null||d!=null&&h!=null&&d.length!==h.length)return!1;if(d!=null&&h!=null){for(let f=0,p=d.length;f<p;f+=1)if(!s(d[f],h[f]))return!1}return!0}t.equalPoints=a;function l(d,h,f,p){return new t(Ko.random(d,h),Ko.random(f,p))}t.random=l;function c(d,h,f){const p=Zo.toRad(Zo.normalize(-h)),m=Math.sin(p),y=Math.cos(p);return u(d,y,m,f)}t.rotate=c;function u(d,h,f,p=new t){const m=n(d),y=n(p),v=m.x-y.x,b=m.y-y.y,S=v*h-b*f,w=b*h+v*f;return new t(S+y.x,w+y.y)}t.rotateEx=u})(De||(De={}));class Gt extends R0{get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new De(this.x,this.y)}get topLeft(){return new De(this.x,this.y)}get topCenter(){return new De(this.x+this.width/2,this.y)}get topRight(){return new De(this.x+this.width,this.y)}get center(){return new De(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new De(this.x,this.y+this.height)}get bottomCenter(){return new De(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new De(this.x+this.width,this.y+this.height)}get corner(){return new De(this.x+this.width,this.y+this.height)}get rightMiddle(){return new De(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new De(this.x,this.y+this.height/2)}get topLine(){return new fn(this.topLeft,this.topRight)}get rightLine(){return new fn(this.topRight,this.bottomRight)}get bottomLine(){return new fn(this.bottomLeft,this.bottomRight)}get leftLine(){return new fn(this.topLeft,this.bottomLeft)}constructor(e,n,r,o){super(),this.x=e??0,this.y=n??0,this.width=r??0,this.height=o??0}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(e){if(!e)return this.clone();const n=Zo.toRad(e),r=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n)),i=this.width*o+this.height*r,s=this.width*r+this.height*o;return new Gt(this.x+(this.width-i)/2,this.y+(this.height-s)/2,i,s)}round(e=0){return this.x=Ko.round(this.x,e),this.y=Ko.round(this.y,e),this.width=Ko.round(this.width,e),this.height=Ko.round(this.height,e),this}add(e,n,r,o){const i=Gt.create(e,n,r,o),s=Math.min(this.x,i.x),a=Math.min(this.y,i.y),l=Math.max(this.x+this.width,i.x+i.width),c=Math.max(this.y+this.height,i.y+i.height);return this.x=s,this.y=a,this.width=l-s,this.height=c-a,this}update(e,n,r,o){const i=Gt.create(e,n,r,o);return this.x=i.x,this.y=i.y,this.width=i.width,this.height=i.height,this}inflate(e,n){const r=e,o=n??e;return this.x-=r,this.y-=o,this.width+=2*r,this.height+=2*o,this}
455snapToGrid(e,n){const r=this.origin.snapToGrid(e,n),o=this.corner.snapToGrid(e,n);return this.x=r.x,this.y=r.y,this.width=o.x-r.x,this.height=o.y-r.y,this}translate(e,n){const r=De.create(e,n);return this.x+=r.x,this.y+=r.y,this}scale(e,n,r=new De){const o=this.origin.scale(e,n,r);return this.x=o.x,this.y=o.y,this.width*=e,this.height*=n,this}rotate(e,n=this.getCenter()){if(e!==0){const r=Zo.toRad(e),o=Math.cos(r),i=Math.sin(r);let s=this.getOrigin(),a=this.getTopRight(),l=this.getBottomRight(),c=this.getBottomLeft();s=De.rotateEx(s,o,i,n),a=De.rotateEx(a,o,i,n),l=De.rotateEx(l,o,i,n),c=De.rotateEx(c,o,i,n);const u=new Gt(s.x,s.y,0,0);u.add(a.x,a.y,0,0),u.add(l.x,l.y,0,0),u.add(c.x,c.y,0,0),this.update(u)}return this}rotate90(){const e=(this.width-this.height)/2;this.x+=e,this.y-=e;const n=this.width;return this.width=this.height,this.height=n,this}moveAndExpand(e){const n=Gt.clone(e);return this.x+=n.x||0,this.y+=n.y||0,this.width+=n.width||0,this.height+=n.height||0,this}getMaxScaleToFit(e,n=this.center){const r=Gt.clone(e),o=n.x,i=n.y;let s=1/0,a=1/0,l=1/0,c=1/0,u=1/0,d=1/0,h=1/0,f=1/0;const p=r.topLeft;p.x<o&&(s=(this.x-o)/(p.x-o)),p.y<i&&(u=(this.y-i)/(p.y-i));const m=r.bottomRight;m.x>o&&(a=(this.x+this.width-o)/(m.x-o)),m.y>i&&(d=(this.y+this.height-i)/(m.y-i));const y=r.topRight;y.x>o&&(l=(this.x+this.width-o)/(y.x-o)),y.y<i&&(h=(this.y-i)/(y.y-i));const v=r.bottomLeft;return v.x<o&&(c=(this.x-o)/(v.x-o)),v.y>i&&(f=(this.y+this.height-i)/(v.y-i)),{sx:Math.min(s,a,l,c),sy:Math.min(u,d,h,f)}}getMaxUniformScaleToFit(e,n=this.center){const r=this.getMaxScaleToFit(e,n);return Math.min(r.sx,r.sy)}containsPoint(e,n){return Ko.containsPoint(this,De.create(e,n))}containsRect(e,n,r,o){const i=Gt.create(e,n,r,o),s=this.x,a=this.y,l=this.width,c=this.height,u=i.x,d=i.y,h=i.width,f=i.height;return l===0||c===0||h===0||f===0?!1:u>=s&&d>=a&&u+h<=s+l&&d+f<=a+c}intersectsWithLine(e){const n=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],r=[],o=[];return n.forEach(i=>{const s=e.intersectsWithLine(i);s!==null&&o.indexOf(s.toString())<0&&(r.push(s),o.push(s.toString()))}),r.length>0?r:null}intersectsWithLineFromCenterToPoint(e,n){const r=De.clone(e),o=this.center;let i=null;n!=null&&n!==0&&r.rotate(n,o);const s=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],a=new fn(o,r);for(let l=s.length-1;l>=0;l-=1){const c=s[l].intersectsWithLine(a);if(c!==null){i=c;break}}return i&&n!=null&&n!==0&&i.rotate(-n,o),i}intersectsWithRect(e,n,r,o){const i=Gt.create(e,n,r,o);if(!this.isIntersectWithRect(i))return null;const s=this.origin,a=this.corner,l=i.origin,c=i.corner,u=Math.max(s.x,l.x),d=Math.max(s.y,l.y);return new Gt(u,d,Math.min(a.x,c.x)-u,Math.min(a.y,c.y)-d)}isIntersectWithRect(e,n,r,o){const i=Gt.create(e,n,r,o),s=this.origin,a=this.corner,l=i.origin,c=i.corner;return!(c.x<=s.x||c.y<=s.y||l.x>=a.x||l.y>=a.y)}normalize(){let e=this.x,n=this.y,r=this.width,o=this.height;return this.width<0&&(e=this.x+this.width,r=-this.width),this.height<0&&(n=this.y+this.height,o=-this.height),this.x=e,this.y=n,this.width=r,this.height=o,this}union(e){const n=Gt.clone(e),r=this.origin,o=this.corner,i=n.origin,s=n.corner,a=Math.min(r.x,i.x),l=Math.min(r.y,i.y),c=Math.max(o.x,s.x),u=Math.max(o.y,s.y);return new Gt(a,l,c-a,u-l)}getNearestSideToPoint(e){const n=De.clone(e),r=n.x-this.x,o=this.x+this.width-n.x,i=n.y-this.y,s=this.y+this.height-n.y;let a=r,l="left";return o<a&&(a=o,l="right"),i<a&&(a=i,l="top"),s<a&&(l="bottom"),l}getNearestPointToPoint(e){const n=De.clone(e);if(this.containsPoint(n)){const r=this.getNearestSideToPoint(n);if(r==="left")return new De(this.x,n.y);if(r==="top")return new De(n.x,this.y);if(r==="right")return new De(this.x+this.width,n.y);if(r==="bottom")return new De(n.x,this.y+this.height)}return n.adhereToRect(this)}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}clone(){return new Gt(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}(function(t){function e(n){return n!=null&&n instanceof t}
455t.isRectangle=e})(Gt||(Gt={}));(function(t){function e(n){return n!=null&&typeof n=="object"&&typeof n.x=="number"&&typeof n.y=="number"&&typeof n.width=="number"&&typeof n.height=="number"}t.isRectangleLike=e})(Gt||(Gt={}));(function(t){function e(s,a,l,c){return s==null||typeof s=="number"?new t(s,a,l,c):n(s)}t.create=e;function n(s){return t.isRectangle(s)?s.clone():Array.isArray(s)?new t(s[0],s[1],s[2],s[3]):new t(s.x,s.y,s.width,s.height)}t.clone=n;function r(s){return new t(s.x-s.a,s.y-s.b,2*s.a,2*s.b)}t.fromEllipse=r;function o(s){return new t(0,0,s.width,s.height)}t.fromSize=o;function i(s,a){return new t(s.x,s.y,a.width,a.height)}t.fromPositionAndSize=i})(Gt||(Gt={}));class fn extends R0{get center(){return new De((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(e,n,r,o){super(),typeof e=="number"&&typeof n=="number"?(this.start=new De(e,n),this.end=new De(r,o)):(this.start=De.create(e),this.end=De.create(n))}getCenter(){return this.center}round(e=0){return this.start.round(e),this.end.round(e),this}translate(e,n){return typeof e=="number"?(this.start.translate(e,n),this.end.translate(e,n)):(this.start.translate(e),this.end.translate(e)),this}rotate(e,n){return this.start.rotate(e,n),this.end.rotate(e,n),this}scale(e,n,r){return this.start.scale(e,n,r),this.end.scale(e,n,r),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const e=this.start.x-this.end.x,n=this.start.y-this.end.y;return e*e+n*n}setLength(e){const n=this.length();if(!n)return this;const r=e/n;return this.scale(r,r,this.start)}parallel(e){const n=this.clone();if(!n.isDifferentiable())return n;const{start:r,end:o}=n,i=r.clone().rotate(270,o),s=o.clone().rotate(90,r);return r.move(s,e),o.move(i,e),n}vector(){return new De(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const e=new De(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,e)}bbox(){const e=Math.min(this.start.x,this.end.x),n=Math.min(this.start.y,this.end.y),r=Math.max(this.start.x,this.end.x),o=Math.max(this.start.y,this.end.y);return new Gt(e,n,r-e,o-n)}bearing(){return this.start.bearing(this.end)}closestPoint(e){return this.pointAt(this.closestPointNormalizedLength(e))}closestPointLength(e){return this.closestPointNormalizedLength(e)*this.length()}closestPointTangent(e){return this.tangentAt(this.closestPointNormalizedLength(e))}closestPointNormalizedLength(e){const n=this.vector().dot(new fn(this.start,e).vector()),r=Math.min(1,Math.max(0,n/this.squaredLength()));return Number.isNaN(r)?0:r}pointAt(e){const n=this.start,r=this.end;return e<=0?n.clone():e>=1?r.clone():n.lerp(r,e)}pointAtLength(e){const n=this.start,r=this.end;let o=!0;e<0&&(o=!1,e=-e);const i=this.length();if(e>=i)return o?r.clone():n.clone();const s=(o?e:i-e)/i;return this.pointAt(s)}divideAt(e){const n=this.pointAt(e);return[new fn(this.start,n),new fn(n,this.end)]}divideAtLength(e){const n=this.pointAtLength(e);return[new fn(this.start,n),new fn(n,this.end)]}containsPoint(e){const n=this.start,r=this.end;if(n.cross(e,r)!==0)return!1;const o=this.length();return!(new fn(n,e).length()>o||new fn(e,r).length()>o)}intersect(e,n){const r=e.intersectsWithLine(this,n);return r?Array.isArray(r)?r:[r]:null}intersectsWithLine(e){const n=new De(this.end.x-this.start.x,this.end.y-this.start.y),r=new De(e.end.x-e.start.x,e.end.y-e.start.y),o=n.x*r.y-n.y*r.x,i=new De(e.start.x-this.start.x,e.start.y-this.start.y),s=i.x*r.y-i.y*r.x,a=i.x*n.y-i.y*n.x;if(o===0||s*o<0||a*o<0)return null;if(o>0){if(s>o||a>o)return null}else if(s<o||a<o)return null;return new De(this.start.x+s*n.x/o,this.start.y+s*n.y/o)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(e){const n=De.clone(e),r=this.start,o=this.end;return((o.x-r.x)*(n.y-r.y)-(o.y-r.y)*(n.x-r.x))/this.length()}pointSquaredDistance(e,n){const r=De.create(e,n);return this.closestPoint(r).squaredDistance(r)}pointDistance(e,n){const r=De.create(e,n);return this.closestPoint(r).distance(r)}tangentAt(e){if(!this.isDifferentiable())return null;const n=this.start,r=this.end,o=this.pointAt(e),i=new fn(n,r);return i.translate(o.x-n.x,o.y-n.y),i}tangentAtLength(e){if(!this.isDifferentiable())return null;const n=this.start,r=this.end,o=this.pointAtLength(e),i=new fn(n,r);return i.translate(o.x-n.x,o.y-n.y),i}relativeCcw(e,n){const r=De.create(e,n);let o=r.x-this.start.x,i=r.y-this.start.y;const s=this.end.x-this.start.x,a=this.end.y-this.start.y;let l=o*a-i*s;return l===0&&(l=o*s+i*a,l>0&&(o-=s,i-=a,l=o*s+i*a,l<0&&(l=0))),l<0?-1:l>0?1:0}equals(e){return e!=null&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.end.x===e.end.x&&this.end.y===e.end.y}clone(){return new fn(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(t){function e(n){return n!=null&&n instanceof t}
455t.isLine=e})(fn||(fn={}));class wf extends R0{get center(){return new De(this.x,this.y)}constructor(e,n,r,o){super(),this.x=e??0,this.y=n??0,this.a=r??0,this.b=o??0}bbox(){return Gt.fromEllipse(this)}getCenter(){return this.center}inflate(e,n){const r=e,o=n??e;return this.a+=2*r,this.b+=2*o,this}normalizedDistance(e,n){const r=De.create(e,n),o=r.x-this.x,i=r.y-this.y,s=this.a,a=this.b;return o*o/(s*s)+i*i/(a*a)}containsPoint(e,n){return this.normalizedDistance(e,n)<=1}intersectsWithLine(e){const n=[],r=this.a,o=this.b,i=e.start,s=e.end,a=e.vector(),l=i.diff(new De(this.x,this.y)),c=new De(a.x/(r*r),a.y/(o*o)),u=new De(l.x/(r*r),l.y/(o*o)),d=a.dot(c),h=a.dot(u),f=l.dot(u)-1,p=h*h-d*f;if(p<0)return null;if(p>0){const m=Math.sqrt(p),y=(-h-m)/d,v=(-h+m)/d;if((y<0||y>1)&&(v<0||v>1))return null;y>=0&&y<=1&&n.push(i.lerp(s,y)),v>=0&&v<=1&&n.push(i.lerp(s,v))}else{const m=-h/d;if(m>=0&&m<=1)n.push(i.lerp(s,m));else return null}return n}intersectsWithLineFromCenterToPoint(e,n=0){const r=De.clone(e);n&&r.rotate(n,this.getCenter());const o=r.x-this.x,i=r.y-this.y;let s;if(o===0)return s=this.bbox().getNearestPointToPoint(r),n?s.rotate(-n,this.getCenter()):s;const a=i/o,l=a*a,c=this.a*this.a,u=this.b*this.b;let d=Math.sqrt(1/(1/c+l/u));d=o<0?-d:d;const h=a*d;return s=new De(this.x+d,this.y+h),n?s.rotate(-n,this.getCenter()):s}tangentTheta(e){const n=De.clone(e),r=n.x,o=n.y,i=this.a,s=this.b,a=this.bbox().center,l=a.x,c=a.y,u=30,d=r>a.x+i/2,h=r<a.x-i/2;let f,p;return d||h?(p=r>a.x?o-u:o+u,f=i*i/(r-l)-i*i*(o-c)*(p-c)/(s*s*(r-l))+l):(f=o>a.y?r+u:r-u,p=s*s/(o-c)-s*s*(r-l)*(f-l)/(i*i*(o-c))+c),new De(f,p).theta(n)}scale(e,n){return this.a*=e,this.b*=n,this}rotate(e,n){const r=Gt.fromEllipse(this);r.rotate(e,n);const o=wf.fromRect(r);return this.a=o.a,this.b=o.b,this.x=o.x,this.y=o.y,this}translate(e,n){const r=De.create(e,n);return this.x+=r.x,this.y+=r.y,this}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.a===this.a&&e.b===this.b}clone(){return new wf(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(t){function e(n){return n!=null&&n instanceof t}t.isEllipse=e})(wf||(wf={}));(function(t){function e(o,i,s,a){return o==null||typeof o=="number"?new t(o,i,s,a):n(o)}t.create=e;function n(o){return t.isEllipse(o)?o.clone():Array.isArray(o)?new t(o[0],o[1],o[2],o[3]):new t(o.x,o.y,o.a,o.b)}t.parse=n;function r(o){const i=o.center;return new t(i.x,i.y,o.width/2,o.height/2)}t.fromRect=r})(wf||(wf={}));const mMt=new RegExp("^[\\s\\dLMCZz,.]*$");function yMt(t){return typeof t!="string"?!1:mMt.test(t)}function iU(t,e){return(t%e+e)%e}function vMt(t,e,n,r,o){const i=[],s=t[t.length-1],a=e!=null&&e>0,l=e||0;if(r&&a){t=t.slice();const d=t[0],h=new De(s.x+(d.x-s.x)/2,s.y+(d.y-s.y)/2);t.splice(0,0,h)}let c=t[0],u=1;for(n?i.push("M",c.x,c.y):i.push("L",c.x,c.y);u<(r?t.length:t.length-1);){let d=t[iU(u,t.length)],h=c.x-d.x,f=c.y-d.y;if(a&&(h!==0||f!==0)&&(o==null||o.indexOf(u-1)<0)){let p=Math.sqrt(h*h+f*f);const m=h*Math.min(l,p/2)/p,y=f*Math.min(l,p/2)/p,v=d.x+m,b=d.y+y;i.push("L",v,b);let S=t[iU(u+1,t.length)];for(;u<t.length-2&&Math.round(S.x-d.x)===0&&Math.round(S.y-d.y)===0;)S=t[iU(u+2,t.length)],u+=1;h=S.x-d.x,f=S.y-d.y,p=Math.max(1,Math.sqrt(h*h+f*f));const w=h*Math.min(l,p/2)/p,A=f*Math.min(l,p/2)/p,_=d.x+w,P=d.y+A;i.push("Q",d.x,d.y,_,P),d=new De(_,P)}else i.push("L",d.x,d.y);c=d,u+=1}return r?i.push("Z"):i.push("L",s.x,s.y),i.map(d=>typeof d=="string"?d:+d.toFixed(3)).join(" ")}function Rve(t,e={}){const n=[];return t&&t.length&&t.forEach(r=>{Array.isArray(r)?n.push({x:r[0],y:r[1]}):n.push({x:r.x,y:r.y})}),vMt(n,e.round,e.initialMove==null||e.initialMove,e.close,e.exclude)}function F2(t,e,n,r,o=0,i=0,s=0,a,l){if(n===0||r===0)return[];a-=t,l-=e,n=Math.abs(n),r=Math.abs(r);const c=-a/2,u=-l/2,d=Math.cos(o*Math.PI/180),h=Math.sin(o*Math.PI/180),f=d*c+h*u,p=-1*h*c+d*u,m=f*f,y=p*p,v=n*n,b=r*r,S=m/v+y/b;let w;if(S>1)n=Math.sqrt(S)*n,r=Math.sqrt(S)*r,w=0;else{let re=1;i===s&&(re=-1),w=re*Math.sqrt((v*b-v*y-b*m)/(v*y+b*m))}const A=w*n*p/r,_=-1*w*r*f/n,P=d*A-h*_+a/2,R=h*A+d*_+l/2;let O=Math.atan2((p-_)/r,(f-A)/n)-Math.atan2(0,1),N=O>=0?O:2*Math.PI+O;
455O=Math.atan2((-p-_)/r,(-f-A)/n)-Math.atan2((p-_)/r,(f-A)/n);let M=O>=0?O:2*Math.PI+O;s===0&&M>0?M-=2*Math.PI:s!==0&&M<0&&(M+=2*Math.PI);const L=M*2/Math.PI,F=Math.ceil(L<0?-1*L:L),$=M/F,D=8/3*Math.sin($/4)*Math.sin($/4)/Math.sin($/2),k=d*n,U=d*r,H=h*n,V=h*r;let q=Math.cos(N),J=Math.sin(N),Q=-D*(k*J+V*q),se=-D*(H*J-U*q),oe=0,ie=0;const ee=[];for(let re=0;re<F;re+=1){N+=$,q=Math.cos(N),J=Math.sin(N),oe=k*q-V*J+P,ie=H*q+U*J+R;const fe=-D*(k*J+V*q),we=-D*(H*J-U*q),xe=re*6;ee[xe]=Number(Q+t),ee[xe+1]=Number(se+e),ee[xe+2]=Number(oe-fe+t),ee[xe+3]=Number(ie-we+e),ee[xe+4]=Number(oe+t),ee[xe+5]=Number(ie+e),Q=oe+fe,se=ie+we}return ee.map(re=>+re.toFixed(2))}function bMt(t,e,n,r,o=0,i=0,s=0,a,l){const c=[],u=F2(t,e,n,r,o,i,s,a,l);if(u!=null)for(let d=0,h=u.length;d<h;d+=6)c.push("C",u[d],u[d+1],u[d+2],u[d+3],u[d+4],u[d+5]);return c.join(" ")}class Ms extends R0{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(e){if(super(),e!=null){if(typeof e=="string")return Ms.parse(e);this.points=e.map(n=>De.create(n))}else this.points=[]}scale(e,n,r=new De){return this.points.forEach(o=>o.scale(e,n,r)),this}rotate(e,n){return this.points.forEach(r=>r.rotate(e,n)),this}translate(e,n){const r=De.create(e,n);return this.points.forEach(o=>o.translate(r.x,r.y)),this}round(e=0){return this.points.forEach(n=>n.round(e)),this}bbox(){if(this.points.length===0)return new Gt;let e=1/0,n=-1/0,r=1/0,o=-1/0;const i=this.points;for(let s=0,a=i.length;s<a;s+=1){const l=i[s],c=l.x,u=l.y;c<e&&(e=c),c>n&&(n=c),u<r&&(r=u),u>o&&(o=u)}return new Gt(e,r,n-e,o-r)}closestPoint(e){const n=this.closestPointLength(e);return this.pointAtLength(n)}closestPointLength(e){const n=this.points,r=n.length;if(r===0||r===1)return 0;let o=0,i=0,s=1/0;for(let a=0,l=r-1;a<l;a+=1){const c=new fn(n[a],n[a+1]),u=c.length(),d=c.closestPointNormalizedLength(e),f=c.pointAt(d).squaredDistance(e);f<s&&(s=f,i=o+d*u),o+=u}return i}closestPointNormalizedLength(e){const n=this.length();return n===0?0:this.closestPointLength(e)/n}closestPointTangent(e){const n=this.closestPointLength(e);return this.tangentAtLength(n)}containsPoint(e){if(this.points.length===0)return!1;const n=De.clone(e),r=n.x,o=n.y,i=this.points,s=i.length;let a=s-1,l=0;for(let c=0;c<s;c+=1){const u=i[a],d=i[c];if(n.equals(u))return!0;const h=new fn(u,d);if(h.containsPoint(e))return!0;if(o<=u.y&&o>d.y||o>u.y&&o<=d.y){const f=u.x-r>d.x-r?u.x-r:d.x-r;if(f>=0){const p=new De(r+f,o),m=new fn(e,p);h.intersectsWithLine(m)&&(l+=1)}}a=c}return l%2===1}intersectsWithLine(e){const n=[];for(let r=0,o=this.points.length-1;r<o;r+=1){const i=this.points[r],s=this.points[r+1],a=e.intersectsWithLine(new fn(i,s));a&&n.push(a)}return n.length>0?n:null}isDifferentiable(){for(let e=0,n=this.points.length-1;e<n;e+=1){const r=this.points[e],o=this.points[e+1];if(new fn(r,o).isDifferentiable())return!0}return!1}length(){let e=0;for(let n=0,r=this.points.length-1;n<r;n+=1){const o=this.points[n],i=this.points[n+1];e+=o.distance(i)}return e}pointAt(e){const n=this.points,r=n.length;if(r===0)return null;if(r===1||e<=0)return n[0].clone();if(e>=1)return n[r-1].clone();const i=this.length()*e;return this.pointAtLength(i)}pointAtLength(e){const n=this.points,r=n.length;if(r===0)return null;if(r===1)return n[0].clone();let o=!0;e<0&&(o=!1,e=-e);let i=0;for(let a=0,l=r-1;a<l;a+=1){const c=o?a:l-1-a,u=n[c],d=n[c+1],h=new fn(u,d),f=u.distance(d);if(e<=i+f)return h.pointAtLength((o?1:-1)*(e-i));i+=f}return(o?n[r-1]:n[0]).clone()}tangentAt(e){const r=this.points.length;if(r===0||r===1)return null;e<0&&(e=0),e>1&&(e=1);const i=this.length()*e;return this.tangentAtLength(i)}tangentAtLength(e){const n=this.points,r=n.length;if(r===0||r===1)return null;let o=!0;e<0&&(o=!1,e=-e);let i,s=0;for(let a=0,l=r-1;a<l;a+=1){const c=o?a:l-1-a,u=n[c],d=n[c+1],h=new fn(u,d),f=u.distance(d);if(h.isDifferentiable()){if(e<=s+f)return h.tangentAtLength((o?1:-1)*(e-s));i=h}s+=f}if(i){const a=o?1:0;return i.tangentAt(a)}return null}simplify(e={}){const n=this.points;if(n.length<3)return this;const r=e.threshold||0;let o=0;for(;n[o+2];){const i=o,s=o+1,a=o+2,l=n[i],c=n[s],u=n[a];new fn(l,u).closestPoint(c).distance(c)<=r?n.splice(s,1):o+=1}return this}toHull(){const e=this.points,n=e.length;if(n===0)return new Ms;let r=e[0];for(let h=1;h<n;h+=1)(e[h].y<r.y||e[h].y===r.y&&e[h].x>r.x)&&(r=e[h]);const o=[];for(let h=0;h<n;h+=1){let f=r.theta(e[h]);f===0&&(f=360),o.push([e[h],h,f])}if(o.sort((h,f)=>{let p=h[2]-f[2];
455return p===0&&(p=f[1]-h[1]),p}),o.length>2){const h=o[o.length-1];o.unshift(h)}const i={},s=[],a=h=>`${h[0].toString()}@${h[1]}`;for(;o.length!==0;){const h=o.pop(),f=h[0];if(i[a(h)])continue;let p=!1;for(;!p;)if(s.length<2)s.push(h),p=!0;else{const m=s.pop(),y=m[0],v=s.pop(),b=v[0],S=b.cross(y,f);if(S<0)s.push(v),s.push(m),s.push(h),p=!0;else if(S===0){const A=y.angleBetween(b,f);Math.abs(A-180)<1e-10||y.equals(f)||b.equals(y)?(i[a(m)]=y,s.push(v)):Math.abs((A+1)%360-1)<1e-10&&(s.push(v),o.push(m))}else i[a(m)]=y,s.push(v)}}s.length>2&&s.pop();let l,c=-1;for(let h=0,f=s.length;h<f;h+=1){const p=s[h][1];(l===void 0||p<l)&&(l=p,c=h)}let u=[];if(c>0){const h=s.slice(c),f=s.slice(0,c);u=h.concat(f)}else u=s;const d=[];for(let h=0,f=u.length;h<f;h+=1)d.push(u[h][0]);return new Ms(d)}equals(e){return e==null||e.points.length!==this.points.length?!1:e.points.every((n,r)=>n.equals(this.points[r]))}clone(){return new Ms(this.points.map(e=>e.clone()))}toJSON(){return this.points.map(e=>e.toJSON())}serialize(){return this.points.map(e=>`${e.serialize()}`).join(" ")}}(function(t){function e(n){return n!=null&&n instanceof t}t.isPolyline=e})(Ms||(Ms={}));(function(t){function e(n){const r=n.trim();if(r==="")return new t;const o=[],i=r.split(/\s*,\s*|\s+/);for(let s=0,a=i.length;s<a;s+=2)o.push({x:+i[s],y:+i[s+1]});return new t(o)}t.parse=e})(Ms||(Ms={}));class vs extends R0{constructor(e,n,r,o){super(),this.PRECISION=3,this.start=De.create(e),this.controlPoint1=De.create(n),this.controlPoint2=De.create(r),this.end=De.create(o)}bbox(){const e=this.start,n=this.controlPoint1,r=this.controlPoint2,o=this.end,i=e.x,s=e.y,a=n.x,l=n.y,c=r.x,u=r.y,d=o.x,h=o.y,f=[],p=[[],[]];let m,y,v,b,S,w,A,_;for(let k=0;k<2;k+=1){if(k===0?(y=6*i-12*a+6*c,m=-3*i+9*a-9*c+3*d,v=3*a-3*i):(y=6*s-12*l+6*u,m=-3*s+9*l-9*u+3*h,v=3*l-3*s),Math.abs(m)<1e-12){if(Math.abs(y)<1e-12)continue;b=-v/y,b>0&&b<1&&f.push(b);continue}A=y*y-4*v*m,_=Math.sqrt(A),!(A<0)&&(S=(-y+_)/(2*m),S>0&&S<1&&f.push(S),w=(-y-_)/(2*m),w>0&&w<1&&f.push(w))}let P,R,O,N=f.length;const M=N;for(;N;)N-=1,b=f[N],O=1-b,P=O*O*O*i+3*O*O*b*a+3*O*b*b*c+b*b*b*d,p[0][N]=P,R=O*O*O*s+3*O*O*b*l+3*O*b*b*u+b*b*b*h,p[1][N]=R;f[M]=0,f[M+1]=1,p[0][M]=i,p[1][M]=s,p[0][M+1]=d,p[1][M+1]=h,f.length=M+2,p[0].length=M+2,p[1].length=M+2;const L=Math.min.apply(null,p[0]),F=Math.min.apply(null,p[1]),$=Math.max.apply(null,p[0]),D=Math.max.apply(null,p[1]);return new Gt(L,F,$-L,D-F)}closestPoint(e,n={}){return this.pointAtT(this.closestPointT(e,n))}closestPointLength(e,n={}){const r=this.getOptions(n);return this.lengthAtT(this.closestPointT(e,r),r)}closestPointNormalizedLength(e,n={}){const r=this.getOptions(n),o=this.closestPointLength(e,r);if(!o)return 0;const i=this.length(r);return i===0?0:o/i}closestPointT(e,n={}){const r=this.getPrecision(n),o=this.getDivisions(n),i=Math.pow(10,-r);let s=null,a=0,l=0,c=0,u=0,d=0,h=null;const f=o.length;let p=f>0?1/f:0;for(o.forEach((m,y)=>{const v=m.start.distance(e),b=m.end.distance(e),S=v+b;(h==null||S<h)&&(s=m,a=y*p,l=(y+1)*p,c=v,u=b,h=S,d=m.endpointDistance())});;){const m=c?Math.abs(c-u)/c:0,y=u!=null?Math.abs(c-u)/u:0,v=m<i||y<i,b=c?c<d*i:!0,S=u?u<d*i:!0;if(v||(b||S))return c<=u?a:l;const A=s.divide(.5);p/=2;const _=A[0].start.distance(e),P=A[0].end.distance(e),R=_+P,O=A[1].start.distance(e),N=A[1].end.distance(e),M=O+N;R<=M?(s=A[0],l-=p,c=_,u=P):(s=A[1],a+=p,c=O,u=N)}}closestPointTangent(e,n={}){return this.tangentAtT(this.closestPointT(e,n))}containsPoint(e,n={}){return this.toPolyline(n).containsPoint(e)}divideAt(e,n={}){if(e<=0)return this.divideAtT(0);if(e>=1)return this.divideAtT(1);const r=this.tAt(e,n);return this.divideAtT(r)}divideAtLength(e,n={}){const r=this.tAtLength(e,n);return this.divideAtT(r)}divide(e){return this.divideAtT(e)}divideAtT(e){const n=this.start,r=this.controlPoint1,o=this.controlPoint2,i=this.end;if(e<=0)return[new vs(n,n,n,n),new vs(n,r,o,i)];if(e>=1)return[new vs(n,r,o,i),new vs(i,i,i,i)];const s=this.getSkeletonPoints(e),a=s.startControlPoint1,l=s.startControlPoint2,c=s.divider,u=s.dividerControlPoint1,d=s.dividerControlPoint2;return[new vs(n,a,l,c),new vs(c,u,d,i)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(e){const n=this.start,r=this.controlPoint1,o=this.controlPoint2,i=this.end;if(e<=0)return{startControlPoint1:n.clone(),startControlPoint2:n.clone(),divider:n.clone(),dividerControlPoint1:r.clone(),dividerControlPoint2:o.clone()};if(e>=1)return{startControlPoint1:r.clone(),startControlPoint2:o.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};const s=new fn(n,r).pointAt(e),a=new fn(r,o).pointAt(e),l=new fn(o,i).pointAt(e),c=new fn(s,a).pointAt(e),u=new fn(a,l).pointAt(e),d=new fn(c,u).pointAt(e);return{startControlPoint1:s,startControlPoint2:c,divider:d,dividerControlPoint1:u,dividerControlPoint2:l}}getSubdivisions(e={}
455){const n=this.getPrecision(e);let r=[new vs(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(n===0)return r;let o=this.endpointDistance();const i=Math.pow(10,-n);let s=0;for(;;){s+=1;const a=[];r.forEach(u=>{const d=u.divide(.5);a.push(d[0],d[1])});const l=a.reduce((u,d)=>u+d.endpointDistance(),0),c=l!==0?(l-o)/l:0;if(s>1&&c<i)return a;r=a,o=l}}length(e={}){return this.getDivisions(e).reduce((r,o)=>r+o.endpointDistance(),0)}lengthAtT(e,n={}){if(e<=0)return 0;const r=n.precision===void 0?this.PRECISION:n.precision;return this.divide(e)[0].length({precision:r})}pointAt(e,n={}){if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const r=this.tAt(e,n);return this.pointAtT(r)}pointAtLength(e,n={}){const r=this.tAtLength(e,n);return this.pointAtT(r)}pointAtT(e){return e<=0?this.start.clone():e>=1?this.end.clone():this.getSkeletonPoints(e).divider}isDifferentiable(){const e=this.start,n=this.controlPoint1,r=this.controlPoint2,o=this.end;return!(e.equals(n)&&n.equals(r)&&r.equals(o))}tangentAt(e,n={}){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);const r=this.tAt(e,n);return this.tangentAtT(r)}tangentAtLength(e,n={}){if(!this.isDifferentiable())return null;const r=this.tAtLength(e,n);return this.tangentAtT(r)}tangentAtT(e){if(!this.isDifferentiable())return null;e<0&&(e=0),e>1&&(e=1);const n=this.getSkeletonPoints(e),r=n.startControlPoint2,o=n.dividerControlPoint1,i=n.divider,s=new fn(r,o);return s.translate(i.x-r.x,i.y-r.y),s}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getDivisions(e={}){if(e.subdivisions!=null)return e.subdivisions;const n=this.getPrecision(e);return this.getSubdivisions({precision:n})}getOptions(e={}){const n=this.getPrecision(e),r=this.getDivisions(e);return{precision:n,subdivisions:r}}tAt(e,n={}){if(e<=0)return 0;if(e>=1)return 1;const r=this.getOptions(n),i=this.length(r)*e;return this.tAtLength(i,r)}tAtLength(e,n={}){let r=!0;e<0&&(r=!1,e=-e);const o=this.getPrecision(n),i=this.getDivisions(n),s={precision:o,subdivisions:i};let a=null,l,c,u=0,d=0,h=0;const f=i.length;let p=f>0?1/f:0;for(let v=0;v<f;v+=1){const b=r?v:f-1-v,S=i[v],w=S.endpointDistance();if(e<=h+w){a=S,l=b*p,c=(b+1)*p,u=r?e-h:w+h-e,d=r?w+h-e:e-h;break}h+=w}if(a==null)return r?1:0;const m=this.length(s),y=Math.pow(10,-o);for(;;){let v;if(v=m!==0?u/m:0,v<y)return l;if(v=m!==0?d/m:0,v<y)return c;let b,S;const w=a.divide(.5);p/=2;const A=w[0].endpointDistance(),_=w[1].endpointDistance();u<=A?(a=w[0],c-=p,b=u,S=A-b):(a=w[1],l+=p,b=u-A,S=_-b),u=b,d=S}}toPoints(e={}){const n=this.getDivisions(e),r=[n[0].start.clone()];return n.forEach(o=>r.push(o.end.clone())),r}toPolyline(e={}){return new Ms(this.toPoints(e))}scale(e,n,r){return this.start.scale(e,n,r),this.controlPoint1.scale(e,n,r),this.controlPoint2.scale(e,n,r),this.end.scale(e,n,r),this}rotate(e,n){return this.start.rotate(e,n),this.controlPoint1.rotate(e,n),this.controlPoint2.rotate(e,n),this.end.rotate(e,n),this}translate(e,n){return typeof e=="number"?(this.start.translate(e,n),this.controlPoint1.translate(e,n),this.controlPoint2.translate(e,n),this.end.translate(e,n)):(this.start.translate(e),this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return e!=null&&this.start.equals(e.start)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)&&this.end.equals(e.end)}clone(){return new vs(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(t){function e(n){return n!=null&&n instanceof t}t.isCurve=e})(vs||(vs={}));(function(t){function e(o){const i=o.length,s=[],a=[];let l=2;s[0]=o[0]/l;for(let c=1;c<i;c+=1)a[c]=1/l,l=(c<i-1?4:3.5)-a[c],s[c]=(o[c]-s[c-1])/l;for(let c=1;c<i;c+=1)s[i-c-1]-=a[i-c]*s[i-c];return s}function n(o){const i=o.map(h=>De.clone(h)),s=[],a=[],l=i.length-1;if(l===1)return s[0]=new De((2*i[0].x+i[1].x)/3,(2*i[0].y+i[1].y)/3),a[0]=new De(2*s[0].x-i[0].x,2*s[0].y-i[0].y),[s,a];const c=[];for(let h=1;h<l-1;h+=1)c[h]=4*i[h].x+2*i[h+1].x;c[0]=i[0].x+2*i[1].x,c[l-1]=(8*i[l-1].x+i[l].x)/2;const u=e(c);for(let h=1;h<l-1;h+=1)c[h]=4*i[h].y+2*i[h+1].y;c[0]=i[0].y+2*i[1].y,c[l-1]=(8*i[l-1].y+i[l].y)/2;const d=e(c);for(let h=0;h<l;h+=1)s.push(new De(u[h],d[h])),h<l-1?a.push(new De(2*i[h+1].x-u[h+1],2*i[h+1].y-d[h+1])):a.push(new De((i[l].x+u[l-1])/2,(i[l].y+d[l-1])/2));return[s,a]}function r(o){if(o==null||Array.isArray(o)&&o.length<2)throw new Error("At least 2 points are required");const i=n(o),s=[];for(let a=0,l=i[0].length;a<l;a+=1){const c=new De(i[0][a].x,i[0][a].y),u=new De(i[1][a].x,i[1][a].y);s.push(new t(o[a],c,u,o[a+1]))}return s}t.throughPoints=r})(vs||(vs={}));class BB extends R0{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}
455get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(e,n){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(e);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(e,n){if(e<=0)return 0;const r=this.length();return e>=1?r:r*e}divideAtT(e){if(this.divideAt)return this.divideAt(e);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(e){if(this.pointAt)return this.pointAt(e);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(e){if(this.tangentAt)return this.tangentAt(e);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class Ql extends BB{constructor(e,n){super(),fn.isLine(e)?this.endPoint=e.end.clone().round(2):this.endPoint=De.create(e,n).round(2)}get type(){return"L"}get line(){return new fn(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const n=this.line.divideAt(e);return[new Ql(n[0]),new Ql(n[1])]}divideAtLength(e){const n=this.line.divideAtLength(e);return[new Ql(n[0]),new Ql(n[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new Ql(this.end)}scale(e,n,r){return this.end.scale(e,n,r),this}rotate(e,n){return this.end.rotate(e,n),this}translate(e,n){return typeof e=="number"?this.end.translate(e,n):this.end.translate(e),this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(t){function e(...n){const r=n.length,o=n[0];if(fn.isLine(o))return new t(o);if(De.isPointLike(o))return r===1?new t(o):n.map(s=>new t(s));if(r===2)return new t(+n[0],+n[1]);const i=[];for(let s=0;s<r;s+=2){const a=+n[s],l=+n[s+1];i.push(new t(a,l))}return i}t.create=e})(Ql||(Ql={}));class Ax extends BB{get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new fn(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const n=this.line.divideAt(e);return[n[1].isDifferentiable()?new Ql(n[0]):this.clone(),new Ql(n[1])]}divideAtLength(e){const n=this.line.divideAtLength(e);return[n[1].isDifferentiable()?new Ql(n[0]):this.clone(),new Ql(n[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}clone(){return new Ax}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(t){function e(){return new t}t.create=e})(Ax||(Ax={}));class Tx extends BB{constructor(e,n){super(),this.isVisible=!1,this.isSubpathStart=!0,fn.isLine(e)||vs.isCurve(e)?this.endPoint=e.end.clone().round(2):this.endPoint=De.create(e,n).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(e,n,r){return this.end.scale(e,n,r),this}rotate(e,n){return this.end.rotate(e,n),this}translate(e,n){return typeof e=="number"?this.end.translate(e,n):this.end.translate(e),this}clone(){return new Tx(this.end)}equals(e){return this.type===e.type&&this.end.equals(e.end)}
455toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(t){function e(...n){const r=n.length,o=n[0];if(fn.isLine(o))return new t(o);if(vs.isCurve(o))return new t(o);if(De.isPointLike(o)){if(r===1)return new t(o);const s=[];for(let a=0;a<r;a+=1)a===0?s.push(new t(n[a])):s.push(new Ql(n[a]));return s}if(r===2)return new t(+n[0],+n[1]);const i=[];for(let s=0;s<r;s+=2){const a=+n[s],l=+n[s+1];s===0?i.push(new t(a,l)):i.push(new Ql(a,l))}return i}t.create=e})(Tx||(Tx={}));class Jd extends BB{constructor(e,n,r,o,i,s){super(),vs.isCurve(e)?(this.controlPoint1=e.controlPoint1.clone().round(2),this.controlPoint2=e.controlPoint2.clone().round(2),this.endPoint=e.end.clone().round(2)):typeof e=="number"?(this.controlPoint1=new De(e,n).round(2),this.controlPoint2=new De(r,o).round(2),this.endPoint=new De(i,s).round(2)):(this.controlPoint1=De.create(e).round(2),this.controlPoint2=De.create(n).round(2),this.endPoint=De.create(r).round(2))}get type(){return"C"}get curve(){return new vs(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(e){return this.curve.closestPoint(e)}closestPointLength(e){return this.curve.closestPointLength(e)}closestPointNormalizedLength(e){return this.curve.closestPointNormalizedLength(e)}closestPointTangent(e){return this.curve.closestPointTangent(e)}length(){return this.curve.length()}divideAt(e,n={}){const r=this.curve.divideAt(e,n);return[new Jd(r[0]),new Jd(r[1])]}divideAtLength(e,n={}){const r=this.curve.divideAtLength(e,n);return[new Jd(r[0]),new Jd(r[1])]}divideAtT(e){const n=this.curve.divideAtT(e);return[new Jd(n[0]),new Jd(n[1])]}getSubdivisions(){return[]}pointAt(e){return this.curve.pointAt(e)}pointAtLength(e){return this.curve.pointAtLength(e)}tangentAt(e){return this.curve.tangentAt(e)}tangentAtLength(e){return this.curve.tangentAtLength(e)}isDifferentiable(){if(!this.previousSegment)return!1;const e=this.start,n=this.controlPoint1,r=this.controlPoint2,o=this.end;return!(e.equals(n)&&n.equals(r)&&r.equals(o))}scale(e,n,r){return this.controlPoint1.scale(e,n,r),this.controlPoint2.scale(e,n,r),this.end.scale(e,n,r),this}rotate(e,n){return this.controlPoint1.rotate(e,n),this.controlPoint2.rotate(e,n),this.end.rotate(e,n),this}translate(e,n){return typeof e=="number"?(this.controlPoint1.translate(e,n),this.controlPoint2.translate(e,n),this.end.translate(e,n)):(this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return this.start.equals(e.start)&&this.end.equals(e.end)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)}clone(){return new Jd(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.controlPoint1,n=this.controlPoint2,r=this.end;return[this.type,e.x,e.y,n.x,n.y,r.x,r.y].join(" ")}}(function(t){function e(...n){const r=n.length,o=n[0];if(vs.isCurve(o))return new t(o);if(De.isPointLike(o)){if(r===3)return new t(n[0],n[1],n[2]);const s=[];for(let a=0;a<r;a+=3)s.push(new t(n[a],n[a+1],n[a+2]));return s}if(r===6)return new t(n[0],n[1],n[2],n[3],n[4],n[5]);const i=[];for(let s=0;s<r;s+=6)i.push(new t(n[s],n[s+1],n[s+2],n[s+3],n[s+4],n[s+5]));return i}t.create=e})(Jd||(Jd={}));function uM(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ute(t,e,n,r,o,i){const s=.3333333333333333,a=2/3;return[s*t+a*n,s*e+a*r,s*o+a*n,s*i+a*r,o,i]}function Ove(t,e,n,r,o,i,s,a,l,c){const u=Math.PI*120/180,d=Math.PI/180*(+o||0);let h=[],f,p,m,y,v;if(c)p=c[0],m=c[1],y=c[2],v=c[3];else{f=uM(t,e,-d),t=f.x,e=f.y,f=uM(a,l,-d),a=f.x,l=f.y;const $=(t-a)/2,D=(e-l)/2;let k=$*$/(n*n)+D*D/(r*r);k>1&&(k=Math.sqrt(k),n=k*n,r=k*r);const U=n*n,H=r*r,V=(i===s?-1:1)*Math.sqrt(Math.abs((U*H-U*D*D-H*$*$)/(U*D*D+H*$*$)));y=V*n*D/r+(t+a)/2,v=V*-r*$/n+(e+l)/2,p=Math.asin((e-v)/r),m=Math.asin((l-v)/r),p=t<y?Math.PI-p:p,m=a<y?Math.PI-m:m,p<0&&(p=Math.PI*2+p),m<0&&(m=Math.PI*2+m),s&&p>m&&(p-=Math.PI*2),!s&&m>p&&(m-=Math.PI*2)}let b=m-p;if(Math.abs(b)>u){const $=m,D=a,k=l;m=p+u*(s&&m>p?1:-1),a=y+n*Math.cos(m),l=v+r*Math.sin(m),h=Ove(a,l,n,r,o,0,s,D,k,[m,$,y,v])}b=m-p;const S=Math.cos(p),w=Math.sin(p),A=Math.cos(m),_=Math.sin(m),P=Math.tan(b/4),R=4/3*(n*P),O=4/3*(r*P),N=[t,e],M=[t+R*w,e-O*S],L=[a+R*_,l-O*A],F=[a,l];if(M[0]=2*N[0]-M[0],M[1]=2*N[1]-M[1],c)return[M,L,F].concat(h);{h=[M,L,F].concat(h).join().split(",");const $=[],D=h.length;for(let k=0;k<D;k+=1)$[k]=k%2?uM(+h[k-1],+h[k],d).y:uM(+h[k],+h[k+1],d).x;return $}}function CMt(t){if(!t)return null;const e=` 456\v\f\r  áá ââââââ ââââââ¯âã\u2028\u2029`,n=new RegExp(`([a-z])[${e},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${e}]*,?[${e}
456]*)+)`,"ig"),r=new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${e}]*,?[${e}]*`,"ig"),o={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return t.replace(n,(s,a,l)=>{const c=[];let u=a.toLowerCase();l.replace(r,(h,f)=>(f&&c.push(+f),h)),u==="m"&&c.length>2&&(i.push([a,...c.splice(0,2)]),u="l",a=a==="m"?"l":"L");const d=o[u];for(;c.length>=d&&(i.push([a,...c.splice(0,d)]),!!d););return s}),i}function SMt(t){const e=CMt(t);if(!e||!e.length)return[["M",0,0]];let n=0,r=0,o=0,i=0;const s=[];for(let a=0,l=e.length;a<l;a+=1){const c=[];s.push(c);const u=e[a],d=u[0];if(d!==d.toUpperCase())switch(c[0]=d.toUpperCase(),c[0]){case"A":c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5],c[6]=+u[6]+n,c[7]=+u[7]+r;break;case"V":c[1]=+u[1]+r;break;case"H":c[1]=+u[1]+n;break;case"M":o=+u[1]+n,i=+u[2]+r;for(let h=1,f=u.length;h<f;h+=1)c[h]=+u[h]+(h%2?n:r);break;default:for(let h=1,f=u.length;h<f;h+=1)c[h]=+u[h]+(h%2?n:r);break}else for(let h=0,f=u.length;h<f;h+=1)c[h]=u[h];switch(c[0]){case"Z":n=+o,r=+i;break;case"H":n=c[1];break;case"V":r=c[1];break;case"M":o=c[c.length-2],i=c[c.length-1],n=c[c.length-2],r=c[c.length-1];break;default:n=c[c.length-2],r=c[c.length-1];break}}return s}function EMt(t){const e=SMt(t),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function r(l,c,u){let d,h;if(!l)return["C",c.x,c.y,c.x,c.y,c.x,c.y];switch(l[0]in{T:1,Q:1}||(c.qx=null,c.qy=null),l[0]){case"M":c.X=l[1],c.Y=l[2];break;case"A":return parseFloat(l[1])===0||parseFloat(l[2])===0?["L",l[6],l[7]]:["C"].concat(Ove.apply(0,[c.x,c.y].concat(l.slice(1))));case"S":return u==="C"||u==="S"?(d=c.x*2-c.bx,h=c.y*2-c.by):(d=c.x,h=c.y),["C",d,h].concat(l.slice(1));case"T":return u==="Q"||u==="T"?(c.qx=c.x*2-c.qx,c.qy=c.y*2-c.qy):(c.qx=c.x,c.qy=c.y),["C"].concat(Ute(c.x,c.y,c.qx,c.qy,l[1],l[2]));case"Q":return c.qx=l[1],c.qy=l[2],["C"].concat(Ute(c.x,c.y,l[1],l[2],l[3],l[4]));case"H":return["L"].concat(l[1],c.y);case"V":return["L"].concat(c.x,l[1])}return l}function o(l,c){if(l[c].length>7){l[c].shift();const u=l[c];for(;u.length;)i[c]="A",c+=1,l.splice(c,0,["C"].concat(u.splice(0,6)));l.splice(c,1),a=e.length}}const i=[];let s="",a=e.length;for(let l=0;l<a;l+=1){let c="";e[l]&&(c=e[l][0]),c!=="C"&&(i[l]=c,l>0&&(s=i[l-1])),e[l]=r(e[l],n,s),i[l]!=="A"&&c==="C"&&(i[l]="C"),o(e,l);const u=e[l],d=u.length;n.x=u[d-2],n.y=u[d-1],n.bx=parseFloat(u[d-4])||n.x,n.by=parseFloat(u[d-3])||n.y}return(!e[0][0]||e[0][0]!=="M")&&e.unshift(["M",0,0]),e}function xMt(t){return EMt(t).map(e=>e.map(n=>typeof n=="string"?n:Ko.round(n,2))).join(",").split(",").join(" ")}class Mn extends R0{constructor(e){if(super(),this.PRECISION=3,this.segments=[],Array.isArray(e))if(fn.isLine(e[0])||vs.isCurve(e[0])){let n=null;e.forEach((o,i)=>{i===0&&this.appendSegment(Mn.createSegment("M",o.start)),n!=null&&!n.end.equals(o.start)&&this.appendSegment(Mn.createSegment("M",o.start)),fn.isLine(o)?this.appendSegment(Mn.createSegment("L",o.end)):vs.isCurve(o)&&this.appendSegment(Mn.createSegment("C",o.controlPoint1,o.controlPoint2,o.end)),n=o})}else e.forEach(r=>{r.isSegment&&this.appendSegment(r)});else e!=null&&(fn.isLine(e)?(this.appendSegment(Mn.createSegment("M",e.start)),this.appendSegment(Mn.createSegment("L",e.end))):vs.isCurve(e)?(this.appendSegment(Mn.createSegment("M",e.start)),this.appendSegment(Mn.createSegment("C",e.controlPoint1,e.controlPoint2,e.end))):Ms.isPolyline(e)?e.points&&e.points.length&&e.points.forEach((n,r)=>{const o=r===0?Mn.createSegment("M",n):Mn.createSegment("L",n);this.appendSegment(o)}):e.isSegment&&this.appendSegment(e))}get start(){const e=this.segments,n=e.length;if(n===0)return null;for(let r=0;r<n;r+=1){const o=e[r];if(o.isVisible)return o.start}return e[n-1].end}get end(){const e=this.segments,n=e.length;if(n===0)return null;for(let r=n-1;r>=0;r-=1){const o=e[r];if(o.isVisible)return o.end}return e[n-1].end}moveTo(...e){return this.appendSegment(Tx.create.call(null,...e))}lineTo(...e){return this.appendSegment(Ql.create.call(null,...e))}curveTo(...e){return this.appendSegment(Jd.create.call(null,...e))}arcTo(e,n,r,o,i,s,a){const l=this.end||new De,c=typeof s=="number"?F2(l.x,l.y,e,n,r,o,i,s,a):F2(l.x,l.y,e,n,r,o,i,s.x,s.y);if(c!=null)for(let u=0,d=c.length;u<d;
456u+=6)this.curveTo(c[u],c[u+1],c[u+2],c[u+3],c[u+4],c[u+5]);return this}quadTo(e,n,r,o){const i=this.end||new De,s=["M",i.x,i.y];if(typeof e=="number")s.push("Q",e,n,r,o);else{const l=n;s.push("Q",e.x,e.y,l.x,l.y)}const a=Mn.parse(s.join(" "));return this.appendSegment(a.segments.slice(1)),this}close(){return this.appendSegment(Ax.create())}drawPoints(e,n={}){const r=Rve(e,n),o=Mn.parse(r);o&&o.segments&&this.appendSegment(o.segments)}bbox(){const e=this.segments,n=e.length;if(n===0)return null;let r;for(let i=0;i<n;i+=1){const s=e[i];if(s.isVisible){const a=s.bbox();a!=null&&(r=r?r.union(a):a)}}if(r!=null)return r;const o=e[n-1];return new Gt(o.end.x,o.end.y,0,0)}appendSegment(e){const n=this.segments.length;let r=n!==0?this.segments[n-1]:null,o;const i=null;if(Array.isArray(e))for(let s=0,a=e.length;s<a;s+=1){const l=e[s];o=this.prepareSegment(l,r,i),this.segments.push(o),r=o}else e!=null&&e.isSegment&&(o=this.prepareSegment(e,r,i),this.segments.push(o));return this}insertSegment(e,n){const r=this.segments.length;if(e<0&&(e=r+e+1),e>r||e<0)throw new Error("Index out of range.");let o,i=null,s=null;if(r!==0&&(e>=1?(i=this.segments[e-1],s=i.nextSegment):(i=null,s=this.segments[0])),!Array.isArray(n))o=this.prepareSegment(n,i,s),this.segments.splice(e,0,o);else for(let a=0,l=n.length;a<l;a+=1){const c=n[a];o=this.prepareSegment(c,i,s),this.segments.splice(e+a,0,o),i=o}return this}removeSegment(e){const n=this.fixIndex(e),r=this.segments.splice(n,1)[0],o=r.previousSegment,i=r.nextSegment;return o&&(o.nextSegment=i),i&&(i.previousSegment=o),r.isSubpathStart&&i&&this.updateSubpathStartSegment(i),r}replaceSegment(e,n){const r=this.fixIndex(e);let o;const i=this.segments[r];let s=i.previousSegment;const a=i.nextSegment;let l=i.isSubpathStart;if(!Array.isArray(n))o=this.prepareSegment(n,s,a),this.segments.splice(r,1,o),l&&o.isSubpathStart&&(l=!1);else{this.segments.splice(e,1);for(let c=0,u=n.length;c<u;c+=1){const d=n[c];o=this.prepareSegment(d,s,a),this.segments.splice(e+c,0,o),s=o,l&&o.isSubpathStart&&(l=!1)}}l&&a&&this.updateSubpathStartSegment(a)}getSegment(e){const n=this.fixIndex(e);return this.segments[n]}fixIndex(e){const n=this.segments.length;if(n===0)throw new Error("Path has no segments.");let r=e;for(;r<0;)r=n+r;if(r>=n||r<0)throw new Error("Index out of range.");return r}segmentAt(e,n={}){const r=this.segmentIndexAt(e,n);return r?this.getSegment(r):null}segmentAtLength(e,n={}){const r=this.segmentIndexAtLength(e,n);return r?this.getSegment(r):null}segmentIndexAt(e,n={}){if(this.segments.length===0)return null;const r=Ko.clamp(e,0,1),o=this.getOptions(n),s=this.length(o)*r;return this.segmentIndexAtLength(s,o)}segmentIndexAtLength(e,n={}){const r=this.segments.length;if(r===0)return null;let o=!0;e<0&&(o=!1,e=-e);const i=this.getPrecision(n),s=this.getSubdivisions(n);let a=0,l=null;for(let c=0;c<r;c+=1){const u=o?c:r-1-c,d=this.segments[u],h=s[u],f=d.length({precision:i,subdivisions:h});if(d.isVisible){if(e<=a+f)return u;l=u}a+=f}return l}getSegmentSubdivisions(e={}){const n=this.getPrecision(e),r=[];for(let o=0,i=this.segments.length;o<i;o+=1){const a=this.segments[o].getSubdivisions({precision:n});r.push(a)}return r}updateSubpathStartSegment(e){let n=e.previousSegment,r=e;for(;r&&!r.isSubpathStart;)n!=null?r.subpathStartSegment=n.subpathStartSegment:r.subpathStartSegment=null,n=r,r=r.nextSegment}prepareSegment(e,n,r){e.previousSegment=n,e.nextSegment=r,n!=null&&(n.nextSegment=e),r!=null&&(r.previousSegment=e);let o=e;return e.isSubpathStart&&(e.subpathStartSegment=e,o=r),o!=null&&this.updateSubpathStartSegment(o),e}closestPoint(e,n={}){const r=this.closestPointT(e,n);return r?this.pointAtT(r):null}closestPointLength(e,n={}){const r=this.getOptions(n),o=this.closestPointT(e,r);return o?this.lengthAtT(o,r):0}closestPointNormalizedLength(e,n={}){const r=this.getOptions(n),o=this.closestPointLength(e,r);if(o===0)return 0;const i=this.length(r);return i===0?0:o/i}closestPointT(e,n={}){if(this.segments.length===0)return null;const r=this.getPrecision(n),o=this.getSubdivisions(n);let i,s=1/0;for(let a=0,l=this.segments.length;a<l;a+=1){const c=this.segments[a],u=o[a];if(c.isVisible){const d=c.closestPointT(e,{precision:r,subdivisions:u}),h=c.pointAtT(d),f=Ko.squaredLength(h,e);f<s&&(i={segmentIndex:a,value:d},s=f)}}return i||{segmentIndex:this.segments.length-1,value:1}}closestPointTangent(e,n={}){if(this.segments.length===0)return null;
456const r=this.getPrecision(n),o=this.getSubdivisions(n);let i,s=1/0;for(let a=0,l=this.segments.length;a<l;a+=1){const c=this.segments[a],u=o[a];if(c.isDifferentiable()){const d=c.closestPointT(e,{precision:r,subdivisions:u}),h=c.pointAtT(d),f=Ko.squaredLength(h,e);f<s&&(i=c.tangentAtT(d),s=f)}}return i||null}containsPoint(e,n={}){const r=this.toPolylines(n);if(!r)return!1;let o=0;for(let i=0,s=r.length;i<s;i+=1)r[i].containsPoint(e)&&(o+=1);return o%2===1}pointAt(e,n={}){if(this.segments.length===0)return null;if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const r=this.getOptions(n),i=this.length(r)*e;return this.pointAtLength(i,r)}pointAtLength(e,n={}){if(this.segments.length===0)return null;if(e===0)return this.start.clone();let r=!0;e<0&&(r=!1,e=-e);const o=this.getPrecision(n),i=this.getSubdivisions(n);let s,a=0;for(let c=0,u=this.segments.length;c<u;c+=1){const d=r?c:u-1-c,h=this.segments[d],f=i[d],p=h.length({precision:o,subdivisions:f});if(h.isVisible){if(e<=a+p)return h.pointAtLength((r?1:-1)*(e-a),{precision:o,subdivisions:f});s=h}a+=p}return s?r?s.end:s.start:this.segments[this.segments.length-1].end.clone()}pointAtT(e){const n=this.segments,r=n.length;if(r===0)return null;const o=e.segmentIndex;if(o<0)return n[0].pointAtT(0);if(o>=r)return n[r-1].pointAtT(1);const i=Ko.clamp(e.value,0,1);return n[o].pointAtT(i)}divideAt(e,n={}){if(this.segments.length===0)return null;const r=Ko.clamp(e,0,1),o=this.getOptions(n),s=this.length(o)*r;return this.divideAtLength(s,o)}divideAtLength(e,n={}){if(this.segments.length===0)return null;let r=!0;e<0&&(r=!1,e=-e);const o=this.getPrecision(n),i=this.getSubdivisions(n);let s=0,a,l,c,u,d;for(let A=0,_=this.segments.length;A<_;A+=1){const P=r?A:_-1-A,R=this.getSegment(P),O=i[P],N={precision:o,subdivisions:O},M=R.length(N);if(R.isDifferentiable()&&(c=R,u=P,e<=s+M)){l=P,a=R.divideAtLength((r?1:-1)*(e-s),N);break}s+=M}if(!c)return null;a||(l=u,d=r?1:0,a=c.divideAtT(d));const h=this.clone(),f=l;h.replaceSegment(f,a);const p=f;let m=f+1,y=f+2;a[0].isDifferentiable()||(h.removeSegment(p),m-=1,y-=1);const v=h.getSegment(m).start;h.insertSegment(m,Mn.createSegment("M",v)),y+=1,a[1].isDifferentiable()||(h.removeSegment(y-1),y-=1);const b=y-p-1;for(let A=y,_=h.segments.length;A<_;A+=1){const P=this.getSegment(A-b),R=h.getSegment(A);if(R.type==="Z"&&!P.subpathStartSegment.end.equals(R.subpathStartSegment.end)){const O=Mn.createSegment("L",P.end);h.replaceSegment(A,O)}}const S=new Mn(h.segments.slice(0,m)),w=new Mn(h.segments.slice(m));return[S,w]}intersectsWithLine(e,n={}){const r=this.toPolylines(n);if(r==null)return null;let o=null;for(let i=0,s=r.length;i<s;i+=1){const a=r[i],l=e.intersect(a);l&&(o==null&&(o=[]),Array.isArray(l)?o.push(...l):o.push(l))}return o}isDifferentiable(){for(let e=0,n=this.segments.length;e<n;e+=1)if(this.segments[e].isDifferentiable())return!0;return!1}isValid(){const e=this.segments;return e.length===0||e[0].type==="M"}length(e={}){if(this.segments.length===0)return 0;const n=this.getSubdivisions(e);let r=0;for(let o=0,i=this.segments.length;o<i;o+=1){const s=this.segments[o],a=n[o];r+=s.length({subdivisions:a})}return r}lengthAtT(e,n={}){const r=this.segments.length;if(r===0)return 0;let o=e.segmentIndex;if(o<0)return 0;let i=Ko.clamp(e.value,0,1);o>=r&&(o=r-1,i=1);const s=this.getPrecision(n),a=this.getSubdivisions(n);let l=0;for(let d=0;d<o;d+=1){const h=this.segments[d],f=a[d];l+=h.length({precision:s,subdivisions:f})}const c=this.segments[o],u=a[o];return l+=c.lengthAtT(i,{precision:s,subdivisions:u}),l}tangentAt(e,n={}){if(this.segments.length===0)return null;const r=Ko.clamp(e,0,1),o=this.getOptions(n),s=this.length(o)*r;return this.tangentAtLength(s,o)}tangentAtLength(e,n={}){if(this.segments.length===0)return null;let r=!0;e<0&&(r=!1,e=-e);const o=this.getPrecision(n),i=this.getSubdivisions(n);let s,a=0;for(let l=0,c=this.segments.length;l<c;l+=1){const u=r?l:c-1-l,d=this.segments[u],h=i[u],f=d.length({precision:o,subdivisions:h});if(d.isDifferentiable()){if(e<=a+f)return d.tangentAtLength((r?1:-1)*(e-a),{precision:o,subdivisions:h});s=d}a+=f}if(s){const l=r?1:0;return s.tangentAtT(l)}return null}tangentAtT(e){const n=this.segments.length;if(n===0)return null;const r=e.segmentIndex;if(r<0)return this.segments[0].tangentAtT(0);if(r>=n)return this.segments[n-1].tangentAtT(1);const o=Ko.clamp(e.value,0,1);return this.segments[r].tangentAtT(o)}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getSubdivisions(e={}
456){if(e.segmentSubdivisions==null){const n=this.getPrecision(e);return this.getSegmentSubdivisions({precision:n})}return e.segmentSubdivisions}getOptions(e={}){const n=this.getPrecision(e),r=this.getSubdivisions(e);return{precision:n,segmentSubdivisions:r}}toPoints(e={}){const n=this.segments,r=n.length;if(r===0)return null;const o=this.getSubdivisions(e),i=[];let s=[];for(let a=0;a<r;a+=1){const l=n[a];if(l.isVisible){const c=o[a];c.length>0?c.forEach(u=>s.push(u.start)):s.push(l.start)}else s.length>0&&(s.push(n[a-1].end),i.push(s),s=[])}return s.length>0&&(s.push(this.end),i.push(s)),i}toPolylines(e={}){const n=this.toPoints(e);return n?n.map(r=>new Ms(r)):null}scale(e,n,r){return this.segments.forEach(o=>o.scale(e,n,r)),this}rotate(e,n){return this.segments.forEach(r=>r.rotate(e,n)),this}translate(e,n){return typeof e=="number"?this.segments.forEach(r=>r.translate(e,n)):this.segments.forEach(r=>r.translate(e)),this}clone(){const e=new Mn;return this.segments.forEach(n=>e.appendSegment(n.clone())),e}equals(e){if(e==null)return!1;const n=this.segments,r=e.segments,o=n.length;if(r.length!==o)return!1;for(let i=0;i<o;i+=1){const s=n[i],a=r[i];if(s.type!==a.type||!s.equals(a))return!1}return!0}toJSON(){return this.segments.map(e=>e.toJSON())}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map(e=>e.serialize()).join(" ")}toString(){return this.serialize()}}(function(t){function e(n){return n!=null&&n instanceof t}t.isPath=e})(Mn||(Mn={}));(function(t){function e(r){if(!r)return new t;const o=new t,i=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,s=t.normalize(r).match(i);if(s!=null)for(let a=0,l=s.length;a<l;a+=1){const c=s[a],u=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,d=c.match(u);if(d!=null){const h=d[0],f=d.slice(1).map(m=>+m),p=n.call(null,h,...f);o.appendSegment(p)}}return o}t.parse=e;function n(r,...o){if(r==="M")return Tx.create.call(null,...o);if(r==="L")return Ql.create.call(null,...o);if(r==="C")return Jd.create.call(null,...o);if(r==="z"||r==="Z")return Ax.create();throw new Error(`Invalid path segment type "${r}"`)}t.createSegment=n})(Mn||(Mn={}));(function(t){t.normalize=xMt,t.isValid=yMt,t.drawArc=bMt,t.drawPoints=Rve,t.arcToCurves=F2})(Mn||(Mn={}));class ks{constructor(e){this.options=Object.assign({},e),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(e,n,r=!1){if(typeof e=="object"){Object.entries(e).forEach(([s,a])=>{this.register(s,a,n)});return}this.exist(e)&&!r&&!Qv.isApplyingHMR()&&this.onDuplicated(e);const o=this.options.process,i=o?Jn(o,this,e,n):n;return this.data[e]=i,i}unregister(e){const n=e?this.data[e]:null;return delete this.data[e],n}get(e){return e?this.data[e]:null}exist(e){return e?this.data[e]!=null:!1}onDuplicated(e){try{throw this.options.onConflict&&Jn(this.options.onConflict,this,e),new Error(`${P2(this.options.type)} with name '${e}' already registered.`)}catch(n){throw n}}onNotFound(e,n){throw new Error(this.getSpellingSuggestion(e,n))}getSpellingSuggestion(e,n){const r=this.getSpellingSuggestionForName(e),o=n?`${n} ${HOt(this.options.type)}`:this.options.type;return`${P2(o)} with name '${e}' does not exist.${r?` Did you mean '${r}'?`:""}`}getSpellingSuggestionForName(e){return ENt(e,Object.keys(this.data),n=>n)}}(function(t){function e(n){return new t(n)}t.create=e})(ks||(ks={}));const wMt={color:"#aaaaaa",thickness:1,markup:"rect",update(t,e){const n=e.thickness*e.sx,r
456=e.thickness*e.sy;ti(t,{width:n,height:r,rx:n,ry:r,fill:e.color})}},AMt={color:"#aaaaaa",thickness:1,markup:"rect",update(t,e){const n=e.sx<=1?e.thickness*e.sx:e.thickness;ti(t,{width:n,height:n,rx:n,ry:n,fill:e.color})}},TMt={color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(t,e){let n;const r=e.width,o=e.height,i=e.thickness;r-i>=0&&o-i>=0?n=["M",r,0,"H0 M0 0 V0",o].join(" "):n="M 0 0 0 0",ti(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}},_Mt=[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(t,e){let n;const r=e.width,o=e.height,i=e.thickness;r-i>=0&&o-i>=0?n=["M",r,0,"H0 M0 0 V0",o].join(" "):n="M 0 0 0 0",ti(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(t,e){let n;const r=e.factor||1,o=e.width*r,i=e.height*r,s=e.thickness;o-s>=0&&i-s>=0?n=["M",o,0,"H0 M0 0 V0",i].join(" "):n="M 0 0 0 0",e.width=o,e.height=i,ti(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}}],IMt=Object.freeze(Object.defineProperty({__proto__:null,dot:wMt,doubleMesh:_Mt,fixedDot:AMt,mesh:TMt},Symbol.toStringTag,{value:"Module"}));class av{constructor(){this.patterns={},this.root=Qn.create(M2(),{width:"100%",height:"100%"},[Of("defs")]).node}add(e,n){const r=this.root.childNodes[0];r&&r.appendChild(n),this.patterns[e]=n,Qn.create("rect",{width:"100%",height:"100%",fill:`url(#${e})`}).appendTo(this.root)}get(e){return this.patterns[e]}has(e){return this.patterns[e]!=null}}(function(t){t.presets=IMt,t.registry=ks.create({type:"grid"}),t.registry.register(t.presets,!0)})(av||(av={}));const Nve=function(t){const e=document.createElement("canvas"),n=t.width,r=t.height;e.width=n*2,e.height=r;const o=e.getContext("2d");return o.drawImage(t,0,0,n,r),o.translate(2*n,0),o.scale(-1,1),o.drawImage(t,0,0,n,r),e},Mve=function(t){const e=document.createElement("canvas"),n=t.width,r=t.height;e.width=n,e.height=r*2;const o=e.getContext("2d");return o.drawImage(t,0,0,n,r),o.translate(0,2*r),o.scale(1,-1),o.drawImage(t,0,0,n,r),e},Dve=function(t){const e=document.createElement("canvas"),n=t.width,r=t.height;e.width=2*n,e.height=2*r;const o=e.getContext("2d");return o.drawImage(t,0,0,n,r),o.setTransform(-1,0,0,-1,e.width,e.height),o.drawImage(t,0,0,n,r),o.setTransform(-1,0,0,1,e.width,0),o.drawImage(t,0,0,n,r),o.setTransform(1,0,0,-1,0,e.height),o.drawImage(t,0,0,n,r),e},PMt=function(t,e){const n=t.width,r=t.height,o=document.createElement("canvas");o.width=n*3,o.height=r*3;const i=o.getContext("2d"),s=e.angle!=null?-e.angle:-20,a=Zo.toRad(s),l=o.width/4,c=o.height/4;for(let u=0;u<4;u+=1)for(let d=0;d<4;d+=1)(u+d)%2>0&&(i.setTransform(1,0,0,1,(2*u-1)*l,(2*d-1)*c),i.rotate(a),i.drawImage(t,-n/2,-r/2,n,r));return o},RMt=Object.freeze(Object.defineProperty({__proto__:null,flipX:Nve,flipXY:Dve,flipY:Mve,watermark:PMt},Symbol.toStringTag,{value:"Module"}));var AP;(function(t){t.presets=Object.assign({},RMt),t.presets["flip-x"]=Nve,t.presets["flip-y"]=Mve,t.presets["flip-xy"]=Dve,t.registry=ks.create({type:"background pattern"}),t.registry.register(t.presets,!0)})(AP||(AP={}));function T8(t,e){return t??e}function Ya(t,e){return t!=null&&Number.isFinite(t)?t:e}function OMt(t={}){const e=T8(t.color,"blue"),n=Ya(t.width,1),r=Ya(t.margin,2),o=Ya(t.opacity,1),i=r,s=r+n;return` 457 <filter> 458 <feFlood flood-color="${e}" flood-opacity="${o}" result="colored"/> 459 <feMorphology in="SourceAlpha" result="morphedOuter" operator="dilate" radius="${s}" /> 460 <feMorphology in="SourceAlpha" result="morphedInner" operator="dilate" radius="${i}" /> 461 <feComposite result="morphedOuterColored" in="colored" in2="morphedOuter" operator="in"/> 462 <feComposite operator="xor" in="morphedOuterColored" in2="morphedInner" result="outline"/> 463 <feMerge> 464 <feMergeNode in="outline"/> 465 <feMergeNode in="SourceGraphic"/> 466 </feMerge> 467 </filter> 468 `.trim()}function NMt(t={}){const e=T8(t.color,"red"),n=Ya(t.blur,0),r=Ya(t.width,1),o=Ya(t.opacity,1);return` 469 <filter> 470 <feFlood flood-color="${e}" flood-opacity="${o}" result="colored"/> 471 <feMorphology result="morphed" in="SourceGraphic" operator="dilate" radius="${r}"/> 472 <feComposite result="composed" in="colored" in2="morphed" operator="in"/> 473 <feGaussianBlur result="blured" in="composed" stdDeviation="${n}"/> 474 <feBlend in="SourceGraphic" in2="blured" mode="normal"/> 475 </filter> 476 `.trim()}function MMt(t={}){const e=Ya(t.x,2);return` 477 <filter> 478 <feGaussianBlur stdDeviation="${t.y!=null&&Number.isFinite(t.y)?[e,t.y]:e}"/> 479 </filter> 480 `.trim()}function DMt(t={}){const e=Ya(t.dx,0),n=Ya(t.dy,0),r=T8(t.color,"black"),o=Ya(t.blur,4),i=Ya(t.opacity,1);return"SVGFEDropShadowElement"in window?`<filter> 481 <feDropShadow stdDeviation="${o}" dx="${e}" dy="${n}" flood-color="${r}" flood-opacity="${i}" /> 482 </filter>`.trim():`<filter> 483 <feGaussianBlur in="SourceAlpha" stdDeviation="${o}" /> 484 <feOffset dx="${e}" dy="${n}" result="offsetblur" /> 485 <feFlood flood-color="${r}" /> 486 <feComposite in2="offsetblur" operator="in" /> 487 <feComponentTransfer> 488 <feFuncA type="linear" slope="${i}" /> 489 </feComponentTransfer> 490 <feMerge> 491 <feMergeNode/> 492 <feMergeNode in="SourceGraphic"/> 493 </feMerge> 494 </filter>`.trim()}function LMt(t={}){const e=Ya(t.amount,1),n=.2126+.7874*(1-e),r=.7152-.7152*(1-e),o=.0722-.0722*(1-e),i=.2126-.2126*(1-e),s=.7152+.2848*(1-e),a=.0722-.0722*(1-e),l=.2126-.2126*(1-e),c=.0722+.9278*(1-e);return` 495 <filter> 496 <feColorMatrix type="matrix" values="${n} ${r} ${o} 0 0 ${i} ${s} ${a} 0 0 ${l} ${r} ${c} 0 0 0 0 0 1 0"/> 497 </filter> 498 `.trim()}function kMt(t={}){const e=Ya(t.amount,1),n=.393+.607*(1-e),r=.769-.769*(1-e),o=.189-.189*(1-e),i=.349-.349*(1-e),s=.686+.314*(1-e),a=.168-.168*(1-e),l=.272-.272*(1-e),c=.534-.534*(1-e),u=.131+.869*(1-e);return` 499 <filter> 500 <feColorMatrix type="matrix" values="${n} ${r} ${o} 0 0 ${i} ${s} ${a} 0 0 ${l} ${c} ${u} 0 0 0 0 0 1 0"/> 501 </filter> 502 `.trim()}function FMt(t={}){return` 503 <filter> 504 <feColorMatrix type="saturate" values="${1-Ya(t.amount,1)}"/> 505 </filter> 506 `.trim()}function BMt(t={}){return` 507 <filter> 508 <feColorMatrix type="hueRotate" values="${Ya(t.angle,0)}"/> 509 </filter> 510 `.trim()}function $Mt(t={}){const e=Ya(t.amount,1),n=1-e;return` 511 <filter> 512 <feComponentTransfer> 513 <feFuncR type="table" tableValues="${e} ${n}"/> 514 <feFuncG type="table" tableValues="${e} ${n}"/> 515 <feFuncB type="table" tableValues="${e} ${n}"/> 516 </feComponentTransfer> 517 </filter> 518 `.trim()}function HMt(t={}){const e=Ya(t.amount,1);return` 519 <filter> 520 <feComponentTransfer> 521 <feFuncR type="linear" slope="${e}"/> 522 <feFuncG type="linear" slope="${e}"/> 523 <feFuncB type="linear" slope="${e}"/> 524 </feComponentTransfer> 525 </filter> 526 `.trim()}function UMt(t={}){const e=Ya(t.amount,1),n=.5-e/2;return` 527 <filter> 528 <feComponentTransfer> 529 <feFuncR type="linear" slope="${e}" intercept="${n}"/> 530 <feFuncG type="linear" slope="${e}" intercept="${n}"/> 531 <feFuncB type="linear" slope="${e}" intercept="${n}"/> 532 </feComponentTransfer> 533 </filter> 534 `.trim()}const zMt=Object.freeze(Object.defineProperty({__proto__:null,blur:MMt,brightness:HMt,contrast:UMt,dropShadow:DMt,grayScale:LMt,highlight:NMt,hueRotate:BMt,invert:$Mt,outline:OMt,saturate:FMt,sepia:kMt},Symbol.toStringTag,{value:"Module"}));var _x;(function(t){t.presets=zMt,t.registry=ks.create({type:"filter"}),t.registry.register(t.presets,!0)})(_x||(_x={}));const VMt={xlinkHref:"xlink:href",xlinkShow:"xlink:show",xlinkRole:"xlink:role",xlinkType:"xlink:type",xlinkArcrole:"xlink:arcrole",xlinkTitle:"xlink:title",xlinkActuate:"xlink:actuate",xmlSpace:"xml:space",xmlBase:"xml:base",xmlLang:"xml:lang",preserveAspectRatio:"preserveAspectRatio",requiredExtension:"requiredExtension",requiredFeatures:"requiredFeatures",systemLanguage:"systemLanguage",externalResourcesRequired:"externalResourceRequired"},GMt={},Lve={position:$B("x","width","origin")},kve={position:$B("y","height","origin")},WMt={position:$B("x","width","corner")},jMt={position:$B("y","height","corner")},Fve={set:Jv("width","width")},Bve={set:Jv("height","height")},qMt={set:Jv("rx","width")},YMt={set:Jv("ry","height")},$ve={set:(t=>{const e=Jv(t,"width"),n=Jv(t,"height");return function(r,o){const i=o.refBBox,s=i.height>i.width?e:n;return Jn(s,this,r,o)}})("r")},XMt={set(t,{refBBox:e}){let n=parseFloat(t);const r=wm(t);r&&(n/=100);const o=Math.sqrt(e.height*e.height+e.width*e.width);let i;return Number.isFinite(n)&&(r||n>=0&&n<=1?i=n*o:i=Math.max(n+o,0)),{r:i}}},KMt={set:Jv("cx","width")},QMt={set:Jv("cy","height")}
534,Hve={set:Vve({resetOffset:!0})},ZMt={set:Vve({resetOffset:!1})},Uve={set:Gve({resetOffset:!0})},JMt={set:Gve({resetOffset:!1})},eDt=$ve,tDt=Hve,nDt=Uve,rDt=Lve,oDt=kve,iDt=Fve,sDt=Bve;function $B(t,e,n){return(r,{refBBox:o})=>{if(r==null)return null;let i=parseFloat(r);const s=wm(r);s&&(i/=100);let a;if(Number.isFinite(i)){const c=o[n];s||i>0&&i<1?a=c[t]+o[e]*i:a=c[t]+i}const l=new De;return l[t]=a||0,l}}function Jv(t,e){return function(n,{refBBox:r}){let o=parseFloat(n);const i=wm(n);i&&(o/=100);const s={};if(Number.isFinite(o)){const a=i||o>=0&&o<=1?o*r[e]:Math.max(o+r[e],0);s[t]=a}return s}}function zve(t,e){const n="x6-shape",r=e&&e.resetOffset;return function(o,{elem:i,refBBox:s}){let a=zC(i,n);if(!a||a.value!==o){const m=t(o);a={value:o,shape:m,shapeBBox:m.bbox()},zC(i,n,a)}const l=a.shape.clone(),c=a.shapeBBox.clone(),u=c.getOrigin(),d=s.getOrigin();c.x=d.x,c.y=d.y;const h=s.getMaxScaleToFit(c,d),f=c.width===0||s.width===0?1:h.sx,p=c.height===0||s.height===0?1:h.sy;return l.scale(f,p,u),r&&l.translate(-u.x,-u.y),l}}function Vve(t){function e(r){return Mn.parse(r)}const n=zve(e,t);return(r,o)=>({d:n(r,o).serialize()})}function Gve(t){const e=zve(n=>new Ms(n),t);return(n,r)=>({points:e(n,r).serialize()})}const aDt={qualify:og,set(t,{view:e}){return`url(#${e.graph.defineGradient(t)})`}},lDt={qualify:og,set(t,{view:e}){const n=e.cell,r=Object.assign({},t);if(n.isEdge()&&r.type==="linearGradient"){const o=e,i=o.sourcePoint,s=o.targetPoint;r.id=`gradient-${r.type}-${n.id}`,r.attrs=Object.assign(Object.assign({},r.attrs),{x1:i.x,y1:i.y,x2:s.x,y2:s.y,gradientUnits:"userSpaceOnUse"}),e.graph.defs.remove(r.id)}return`url(#${e.graph.defineGradient(r)})`}},Wve={qualify(t,{attrs:e}){return e.textWrap==null||!og(e.textWrap)},set(t,{view:e,elem:n,attrs:r}){const o="x6-text",i=zC(n,o),s=u=>{try{return JSON.parse(u)}catch{return u}},a={x:r.x,eol:r.eol,annotations:s(r.annotations),textPath:s(r["text-path"]||r.textPath),textVerticalAnchor:r["text-vertical-anchor"]||r.textVerticalAnchor,displayEmpty:(r["display-empty"]||r.displayEmpty)==="true",lineHeight:r["line-height"]||r.lineHeight},l=r["font-size"]||r.fontSize,c=JSON.stringify([t,a]);if(l&&n.setAttribute("font-size",l),i==null||i!==c){const u=a.textPath;if(u!=null&&typeof u=="object"){const d=u.selector;if(typeof d=="string"){const h=e.find(d)[0];h instanceof SVGPathElement&&(S8(h),a.textPath=Object.assign({"xlink:href":`#${h.id}`},u))}}Eve(n,`${t}`,a),zC(n,o,c)}}},cDt={qualify:og,set(t,{view:e,elem:n,attrs:r,refBBox:o}){const i=t,s=i.width||0;wm(s)?o.width*=parseFloat(s)/100:s<=0?o.width+=s:o.width=s;const a=i.height||0;wm(a)?o.height*=parseFloat(a)/100:a<=0?o.height+=a:o.height=a;let l,c=i.text;c==null&&(c=r.text||n?.textContent),c!=null?l=xve(`${c}`,o,{"font-weight":r["font-weight"]||r.fontWeight,"font-size":r["font-size"]||r.fontSize,"font-family":r["font-family"]||r.fontFamily,lineHeight:r.lineHeight},{ellipsis:i.ellipsis}):l="",Jn(Wve.set,this,l,{view:e,elem:n,attrs:r,refBBox:o,cell:e.cell})}},Fw=(t,{attrs:e})=>e.text!==void 0,uDt={qualify:Fw},dDt={qualify:Fw},hDt={qualify:Fw},fDt={qualify:Fw},pDt={qualify:Fw},gDt={qualify:Fw},mDt={qualify(t,{elem:e}){return e instanceof SVGElement},set(t,{elem:e}){const n="x6-title",r=`${t}`,o=zC(e,n);if(o==null||o!==r){zC(e,n,r);const i=e.firstChild;if(i&&i.tagName.toUpperCase()==="TITLE"){const s=i;s.textContent=r}else{const s=document.createElementNS(e.namespaceURI,"title");s.textContent=r,e.insertBefore(s,i)}}}},yDt={offset:jve("x","width","right")},vDt={offset:jve("y","height","bottom")},bDt={offset(t,{refBBox:e}){return t?{x:-e.x,y:-e.y}:{x:0,y:0}}};function jve(t,e,n){return(r,{refBBox:o})=>{const i=new De;let s;return r==="middle"?s=o[e]/2:r===n?s=o[e]:typeof r=="number"&&Number.isFinite(r)?s=r>-1&&r<1?-o[e]*r:-r:wm(r)?s=o[e]*parseFloat(r)/100:s=0,i[t]=-(o[t]+s),i}}const CDt={qualify:og,set(t,{elem:e}){jR(e,t)}},SDt={set(t,{elem:e}){e.innerHTML=`${t}`}},EDt={qualify:og,set(t,{view:e}){return`url(#${e.graph.defineFilter(t)})`}},xDt={set(t){return t!=null&&typeof t=="object"&&t.id?t.id:t}};function O0(t,e,n){let r,o;typeof e=="object"?(r=e.x,o=e.y):(r=e,o=n);const i=Mn.parse(t),s=i.bbox();if(s){let a=-s.height/2-s.y,l=-s.width/2-s.x;
534typeof r=="number"&&(l-=r),typeof o=="number"&&(a-=o),i.translate(l,a)}return i.serialize()}var qve=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const wDt=t=>{var{size:e,width:n,height:r,offset:o,open:i}=t,s=qve(t,["size","width","height","offset","open"]);return Yve({size:e,width:n,height:r,offset:o},i===!0,!0,void 0,s)},ADt=t=>{var{size:e,width:n,height:r,offset:o,factor:i}=t,s=qve(t,["size","width","height","offset","factor"]);return Yve({size:e,width:n,height:r,offset:o},!1,!1,i,s)};function Yve(t,e,n,r=3/4,o={}){const i=t.size||10,s=t.width||i,a=t.height||i,l=new Mn,c={};if(e)l.moveTo(s,0).lineTo(0,a/2).lineTo(s,a),c.fill="none";else{if(l.moveTo(0,a/2),l.lineTo(s,0),!n){const u=hh(r,0,1);l.lineTo(s*u,a/2)}l.lineTo(s,a),l.close()}return Object.assign(Object.assign(Object.assign({},c),o),{tagName:"path",d:O0(l.serialize(),{x:t.offset!=null?t.offset:-s/2})})}var TDt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const _Dt=t=>{var{size:e,width:n,height:r,offset:o}=t,i=TDt(t,["size","width","height","offset"]);const s=e||10,a=n||s,l=r||s,c=new Mn;return c.moveTo(0,l/2).lineTo(a/2,0).lineTo(a,l/2).lineTo(a/2,l).close(),Object.assign(Object.assign({},i),{tagName:"path",d:O0(c.serialize(),o??-a/2)})};var IDt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const PDt=t=>{var{d:e,offsetX:n,offsetY:r}=t,o=IDt(t,["d","offsetX","offsetY"]);return Object.assign(Object.assign({},o),{tagName:"path",d:O0(e,n,r)})};var RDt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const ODt=t=>{var{size:e,width:n,height:r,offset:o}=t,i=RDt(t,["size","width","height","offset"]);const s=e||10,a=n||s,l=r||s,c=new Mn;return c.moveTo(0,0).lineTo(a,l).moveTo(0,l).lineTo(a,0),Object.assign(Object.assign({},i),{tagName:"path",fill:"none",d:O0(c.serialize(),o||-a/2)})};var NDt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const MDt=t=>{var{width:e,height:n,offset:r,open:o,flip:i}=t,s=NDt(t,["width","height","offset","open","flip"]);let a=n||6;const l=e||10,c=o===!0,u=i===!0,d=Object.assign(Object.assign({},s),{tagName:"path"});u&&(a=-a);const h=new Mn;return h.moveTo(0,a).lineTo(l,0),c?d.fill="none":(h.lineTo(l,a),h.close()),d.d=O0(h.serialize(),{x:r||-l/2,y:a/2}),d};var Xve=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Kve=t=>{var{r:e}=t,n=Xve(t,["r"]);const r=e||5;return Object.assign(Object.assign({cx:r},n),{tagName:"circle",r})},DDt=t=>{var{r:e}=t,n=Xve(t,["r"]);const r=e||5,o=new Mn;return o.moveTo(r,0).lineTo(r,r*2),o.moveTo(0,r).lineTo(r*2,r),{children:[Object.assign(Object.assign({},Kve({r})),{fill:"none"}),Object.assign(Object.assign({},n),{tagName:"path",d:O0(o.serialize(),-r)})]}};var LDt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const kDt=t=>{var{rx:e,ry:n}=t,r=LDt(t,["rx","ry"]);const o=e||5,i=n||5;return Object.assign(Object.assign({cx:o},r),{tagName:"ellipse",rx:o,ry:i})},FDt=Object.freeze(Object.defineProperty({__proto__:null,async:MDt,block:wDt,circle:Kve,circlePlus:DDt,classic:ADt,cross:ODt,diamond:_Dt,ellipse:kDt,path:PDt},Symbol.toStringTag,{value:"Module"}));var e0;(function(t){t.presets=FDt,t.registry=ks.create({type:"marker"}),t.registry.register(t.presets,!0)})(e0||(e0={}));
534(function(t){t.normalize=O0})(e0||(e0={}));var BDt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function _8(t){return typeof t=="string"||og(t)}const $Dt={qualify:_8,set(t,{view:e,attrs:n}){return I8("marker-start",t,e,n)}},HDt={qualify:_8,set(t,{view:e,attrs:n}){return I8("marker-end",t,e,n,{transform:"rotate(180)"})}},UDt={qualify:_8,set(t,{view:e,attrs:n}){return I8("marker-mid",t,e,n)}};function I8(t,e,n,r,o={}){const i=typeof e=="string"?{name:e}:e,{name:s,args:a}=i,l=BDt(i,["name","args"]);let c=l;if(s&&typeof s=="string"){const d=e0.registry.get(s);if(d)c=d(Object.assign(Object.assign({},l),a));else return e0.registry.onNotFound(s)}const u=Object.assign(Object.assign(Object.assign({},zDt(r,t)),o),c);return{[t]:`url(#${n.graph.defineMarker(u)})`}}function zDt(t,e){const n={},r=t.stroke;typeof r=="string"&&(n.stroke=r,n.fill=r);let o=t.strokeOpacity;if(o==null&&(o=t["stroke-opacity"]),o==null&&(o=t.opacity),o!=null&&(n["stroke-opacity"]=o,n["fill-opacity"]=o),e!=="marker-mid"){const i=parseFloat(t.strokeWidth||t["stroke-width"]);if(Number.isFinite(i)&&i>1){const s=Math.ceil(i/2);n.refX=e==="marker-start"?s:-s}}return n}const qR=(t,{view:e})=>e.cell.isEdge(),VDt={qualify:qR,set(t,e){var n,r,o,i;const s=e.view,a=t.reverse||!1,l=t.stubs||0;let c;if(Number.isFinite(l)&&l!==0)if(a){let u,d;const h=s.getConnectionLength()||0;l<0?(u=(h+l)/2,d=-l):(u=l,d=h-l*2);const f=s.getConnection();c=(i=(o=(r=(n=f?.divideAtLength(u))===null||n===void 0?void 0:n[1])===null||r===void 0?void 0:r.divideAtLength(d))===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.serialize()}else{let u;l<0?u=((s.getConnectionLength()||0)+l)/2:u=l;const d=s.getConnection();if(d){const h=d.divideAtLength(u),f=d.divideAtLength(-u);h&&f&&(c=`${h[0].serialize()} ${f[1].serialize()}`)}}return{d:c||s.getConnectionPathData()}}},Qve={qualify:qR,set:HB("getTangentAtLength",{rotate:!0})},GDt={qualify:qR,set:HB("getTangentAtLength",{rotate:!1})},Zve={qualify:qR,set:HB("getTangentAtRatio",{rotate:!0})},WDt={qualify:qR,set:HB("getTangentAtRatio",{rotate:!1})},jDt=Qve,qDt=Zve;function HB(t,e){const n={x:1,y:0};return(r,o)=>{let i,s;const a=o.view,l=a[t](Number(r));return l?(s=e.rotate?l.vector().vectorAngle(n):0,i=l.start):(i=a.path.start,s=0),s===0?{transform:`translate(${i.x},${i.y}')`}:{transform:`translate(${i.x},${i.y}') rotate(${s})`}}}const YDt=Object.freeze(Object.defineProperty({__proto__:null,annotations:fDt,atConnectionLength:jDt,atConnectionLengthIgnoreGradient:GDt,atConnectionLengthKeepGradient:Qve,atConnectionRatio:qDt,atConnectionRatioIgnoreGradient:WDt,atConnectionRatioKeepGradient:Zve,connection:VDt,displayEmpty:gDt,eol:pDt,fill:aDt,filter:EDt,html:SDt,lineHeight:uDt,port:xDt,ref:GMt,refCx:KMt,refCy:QMt,refD:tDt,refDKeepOffset:ZMt,refDResetOffset:Hve,refDx:WMt,refDy:jMt,refHeight:Bve,refHeight2:sDt,refPoints:nDt,refPointsKeepOffset:JMt,refPointsResetOffset:Uve,refR:eDt,refRCircumscribed:XMt,refRInscribed:$ve,refRx:qMt,refRy:YMt,refWidth:Fve,refWidth2:iDt,refX:Lve,refX2:rDt,refY:kve,refY2:oDt,resetOffset:bDt,sourceMarker:$Dt,stroke:lDt,style:CDt,targetMarker:HDt,text:Wve,textPath:hDt,textVerticalAnchor:dDt,textWrap:cDt,title:mDt,vertexMarker:UDt,xAlign:yDt,yAlign:vDt},Symbol.toStringTag,{value:"Module"}));var qp;(function(t){function e(n,r,o){return!!(n!=null&&(typeof n=="string"||typeof n.qualify!="function"||Jn(n.qualify,this,r,o)))}t.isValidDefinition=e})(qp||(qp={}));(function(t){t.presets=Object.assign(Object.assign({},VMt),YDt),t.registry=ks.create({type:"attribute definition"}),t.registry.register(t.presets,!0)})(qp||(qp={}));const Af={prefixCls:"x6",autoInsertCSS:!0,useCSSSelector:!0,prefix(t){return`${Af.prefixCls}-${t}`}},zte=Af.prefix("highlighted"),XDt={highlight(t,e,n){const r=n&&n.className||zte;ro(e,r)},unhighlight(t,e,n){const r=n&&n.className||zte;fh(e,r)}},Vte=Af.prefix("highlight-opacity"),KDt={highlight(t,e){ro(e,Vte)},unhighlight(t,e){fh(e,Vte)}};var No;
534(function(t){t.normalizeMarker=O0;function e(h,f){const p=rMt(h.x,h.y).matrixTransform(f);return new De(p.x,p.y)}t.transformPoint=e;function n(h,f){return new fn(e(h.start,f),e(h.end,f))}t.transformLine=n;function r(h,f){let p=h instanceof Ms?h.points:h;return Array.isArray(p)||(p=[]),new Ms(p.map(m=>e(m,f)))}t.transformPolyline=r;function o(h,f){const m=Of("svg").createSVGPoint();m.x=h.x,m.y=h.y;const y=m.matrixTransform(f);m.x=h.x+h.width,m.y=h.y;const v=m.matrixTransform(f);m.x=h.x+h.width,m.y=h.y+h.height;const b=m.matrixTransform(f);m.x=h.x,m.y=h.y+h.height;const S=m.matrixTransform(f),w=Math.min(y.x,v.x,b.x,S.x),A=Math.max(y.x,v.x,b.x,S.x),_=Math.min(y.y,v.y,b.y,S.y),P=Math.max(y.y,v.y,b.y,S.y);return new Gt(w,_,A-w,P-_)}t.transformRectangle=o;function i(h,f,p){let m;const y=h.ownerSVGElement;if(!y)return new Gt(0,0,0,0);try{m=h.getBBox()}catch{m={x:h.clientLeft,y:h.clientTop,width:h.clientWidth,height:h.clientHeight}}if(f)return Gt.create(m);const v=Z_(h,p||y);return o(m,v)}t.bbox=i;function s(h,f={}){let p;if(!h.ownerSVGElement||!Zv(h)){if(Mte(h)){const{left:b,top:S,width:w,height:A}=a(h);return new Gt(b,S,w,A)}return new Gt(0,0,0,0)}let y=f.target;if(!f.recursive){try{p=h.getBBox()}catch{p={x:h.clientLeft,y:h.clientTop,width:h.clientWidth,height:h.clientHeight}}if(!y)return Gt.create(p);const b=Z_(h,y);return o(p,b)}{const b=h.childNodes,S=b.length;if(S===0)return s(h,{target:y});y||(y=h);for(let w=0;w<S;w+=1){const A=b[w];let _;A.childNodes.length===0?_=s(A,{target:y}):_=s(A,{target:y,recursive:!0}),p?p=p.union(_):p=_}return p}}t.getBBox=s;function a(h){let f=0,p=0,m=0,y=0;if(h){let v=h;for(;v;)f+=v.offsetLeft,p+=v.offsetTop,v=v.offsetParent,v&&(f+=parseInt(Fte(v,"borderLeft"),10),p+=parseInt(Fte(v,"borderTop"),10));m=h.offsetWidth,y=h.offsetHeight}return{left:f,top:p,width:m,height:y}}t.getBoundingOffsetRect=a;function l(h){const f=p=>{const m=h.getAttribute(p),y=m?parseFloat(m):0;return Number.isNaN(y)?0:y};switch(h instanceof SVGElement&&h.nodeName.toLowerCase()){case"rect":return new Gt(f("x"),f("y"),f("width"),f("height"));case"circle":return new wf(f("cx"),f("cy"),f("r"),f("r"));case"ellipse":return new wf(f("cx"),f("cy"),f("rx"),f("ry"));case"polyline":{const p=L2(h);return new Ms(p)}case"polygon":{const p=L2(h);return p.length>1&&p.push(p[0]),new Ms(p)}case"path":{let p=h.getAttribute("d");return Mn.isValid(p)||(p=Mn.normalize(p)),Mn.parse(p)}case"line":return new fn(f("x1"),f("y1"),f("x2"),f("y2"))}return s(h)}t.toGeometryShape=l;function c(h,f,p,m){const y=De.create(f),v=De.create(p);m||(m=h instanceof SVGSVGElement?h:h.ownerSVGElement);const b=mz(h);h.setAttribute("transform","");const S=s(h,{target:m}).scale(b.sx,b.sy),w=s_();w.setTranslate(-S.x-S.width/2,-S.y-S.height/2);const A=s_(),_=y.angleBetween(v,y.clone().translate(1,0));_&&A.setRotate(_,0,0);const P=s_(),R=y.clone().move(v,S.width/2);P.setTranslate(2*y.x-R.x,2*y.y-R.y);const O=Z_(h,m),N=s_();N.setMatrix(P.matrix.multiply(A.matrix.multiply(w.matrix.multiply(O.scale(b.sx,b.sy))))),h.setAttribute("transform",kw(N.matrix))}t.translateAndAutoOrient=c;function u(h){if(h==null)return null;let f=h;do{let p=f.tagName;if(typeof p!="string")return null;if(p=p.toUpperCase(),VR(f,"x6-port"))f=f.nextElementSibling;else if(p==="G")f=f.firstElementChild;else if(p==="TITLE")f=f.nextElementSibling;else break}while(f);return f}t.findShapeNode=u;function d(h){const f=u(h);if(!Zv(f)){if(Mte(h)){const{left:y,top:v,width:b,height:S}=a(h);return new Gt(y,v,b,S)}return new Gt(0,0,0,0)}return l(f).bbox()||Gt.create()}t.getBBoxV2=d})(No||(No={}));const QDt={padding:3,rx:0,ry:0,attrs:{"stroke-width":3,stroke:"#FEB663"}},ZDt={highlight(t,e,n){const r=Hy.getHighlighterId(e,n);if(Hy.hasCache(r))return;n=zye({},n,QDt);const o=Qn.create(e);let i,s;try{i=o.toPathData()}catch{s=No.bbox(o.node,!0),i=Ave(Object.assign(Object.assign({},n),s))}const a=Of("path");if(ti(a,Object.assign({d:i,"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},n.attrs?SP(n.attrs):null)),t.isEdgeElement(e))ti(a,"d",t.getConnectionPathData());else{let u=o.getTransformToElement(t.container);const d=n.padding;if(d){s==null&&(s=No.bbox(o.node,!0));const h=s.x+s.width/2,f=s.y+s.height/2;s=No.transformRectangle(s,u);const p=Math.max(s.width,1),m=Math.max(s.height,1),y=(p+d)/p,v=(m+d)/m,b=Qa({a:y,b:0,c:0,d:v,e:h-y*h,f:f-v*f});u=u.multiply(b)}xx(a,u)}ro(a,Af.prefix("highlight-stroke"));const l=t.cell,c=()=>Hy.removeHighlighter(r);l.on("removed",c),l.model&&l.model.on("reseted",c),t.container.appendChild(a),Hy.setCache(r,a)},unhighlight(t,e,n){Hy.removeHighlighter(Hy.getHighlighterId(e,n
534))}};var Hy;(function(t){function e(s,a){return S8(s),s.id+JSON.stringify(a)}t.getHighlighterId=e;const n={};function r(s,a){n[s]=a}t.setCache=r;function o(s){return n[s]!=null}t.hasCache=o;function i(s){const a=n[s];a&&(Ex(a),delete n[s])}t.removeHighlighter=i})(Hy||(Hy={}));const JDt=Object.freeze(Object.defineProperty({__proto__:null,className:XDt,opacity:KDt,stroke:ZDt},Symbol.toStringTag,{value:"Module"}));var cm;(function(t){function e(n,r){if(typeof r.highlight!="function")throw new Error(`Highlighter '${n}' is missing required \`highlight()\` method`);if(typeof r.unhighlight!="function")throw new Error(`Highlighter '${n}' is missing required \`unhighlight()\` method`)}t.check=e})(cm||(cm={}));(function(t){t.presets=JDt,t.registry=ks.create({type:"highlighter"}),t.registry.register(t.presets,!0)})(cm||(cm={}));function bz(t,e={}){return new De(yf(e.x,t.width),yf(e.y,t.height))}function P8(t,e,n){return Object.assign({angle:e,position:t.toJSON()},n)}const eLt=(t,e)=>t.map(({x:n,y:r,angle:o})=>P8(bz(e,{x:n,y:r}),o||0)),tLt=(t,e,n)=>{const r=n.start||0,o=n.step||20;return Jve(t,e,r,(i,s)=>(i+.5-s/2)*o)},nLt=(t,e,n)=>{const r=n.start||0,o=n.step||360/t.length;return Jve(t,e,r,i=>i*o)};function Jve(t,e,n,r){const o=e.getCenter(),i=e.getTopCenter(),s=e.width/e.height,a=wf.fromRect(e),l=t.length;return t.map((c,u)=>{const d=n+r(u,l),h=i.clone().rotate(-d,o).scale(s,1,o),f=c.compensateRotate?-a.tangentTheta(h):0;return(c.dx||c.dy)&&h.translate(c.dx||0,c.dy||0),c.dr&&h.move(o,c.dr),P8(h.round(),f,c)})}var rLt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const oLt=(t,e,n)=>{const r=bz(e,n.start||e.getOrigin()),o=bz(e,n.end||e.getCorner());return YR(t,r,o,n)},iLt=(t,e,n)=>YR(t,e.getTopLeft(),e.getBottomLeft(),n),sLt=(t,e,n)=>YR(t,e.getTopRight(),e.getBottomRight(),n),aLt=(t,e,n)=>YR(t,e.getTopLeft(),e.getTopRight(),n),lLt=(t,e,n)=>YR(t,e.getBottomLeft(),e.getBottomRight(),n);function YR(t,e,n,r){const o=new fn(e,n),i=t.length;return t.map((s,a)=>{var{strict:l}=s,c=rLt(s,["strict"]);const u=l||r.strict?(a+1)/(i+1):(a+.5)/i,d=o.pointAt(u);return(c.dx||c.dy)&&d.translate(c.dx||0,c.dy||0),P8(d.round(),0,c)})}const cLt=Object.freeze(Object.defineProperty({__proto__:null,absolute:eLt,bottom:lLt,ellipse:tLt,ellipseSpread:nLt,left:iLt,line:oLt,right:sLt,top:aLt},Symbol.toStringTag,{value:"Module"}));var lC;(function(t){t.presets=cLt,t.registry=ks.create({type:"port layout"}),t.registry.register(t.presets,!0)})(lC||(lC={}));const uLt={position:{x:0,y:0},angle:0,attrs:{".":{y:"0","text-anchor":"start"}}};function N0(t,e){const{x:n,y:r,angle:o,attrs:i}=e||{};return zye({},{angle:o,attrs:i,position:{x:n,y:r}},t,uLt)}const dLt=(t,e,n)=>N0({position:e.getTopLeft()},n),hLt=(t,e,n)=>N0({position:{x:-15,y:0},attrs:{".":{y:".3em","text-anchor":"end"}}},n),fLt=(t,e,n)=>N0({position:{x:15,y:0},attrs:{".":{y:".3em","text-anchor":"start"}}},n),pLt=(t,e,n)=>N0({position:{x:0,y:-15},attrs:{".":{"text-anchor":"middle"}}},n),gLt=(t,e,n)=>N0({position:{x:0,y:15},attrs:{".":{y:".6em","text-anchor":"middle"}}},n),mLt=(t,e,n)=>e0e(t,e,!1,n),yLt=(t,e,n)=>e0e(t,e,!0,n),vLt=(t,e,n)=>t0e(t,e,!1,n),bLt=(t,e,n)=>t0e(t,e,!0,n);function e0e(t,e,n,r){const o=r.offset!=null?r.offset:15,i=e.getCenter().theta(t),s=n0e(e);let a,l,c,u,d=0;return i<s[1]||i>s[2]?(a=".3em",l=o,c=0,u="start"):i<s[0]?(a="0",l=0,c=-o,n?(d=-90,u="start"):u="middle"):i<s[3]?(a=".3em",l=-o,c=0,u="end"):(a=".6em",l=0,c=o,n?(d=90,u="start"):u="middle"),N0({position:{x:Math.round(l),y:Math.round(c)},angle:d,attrs:{".":{y:a,"text-anchor":u}}},r)}function t0e(t,e,n,r){const o=r.offset!=null?r.offset:15,i=e.getCenter().theta(t),s=n0e(e);let a,l,c,u,d=0;return i<s[1]||i>s[2]?(a=".3em",l=-o,c=0,u="end"):i<s[0]?(a=".6em",l=0,c=o,n?(d=90,u="start"):u="middle"):i<s[3]?(a=".3em",l=o,c=0,u="start"):(a="0em",l=0,c=-o,n?(d=-90,u="start"):u="middle"),N0({position:{x:Math.round(l),y:Math.round(c)},angle:d,attrs:{".":{y:a,"text-anchor":u}}},r)}function n0e(t){const e=t.getCenter(),n=e.theta(t.getTopLeft()),r=e.theta(t.getBottomLeft()),o=e.theta(t.getBottomRight()),i=e.theta(t.getTopRight());return[n,i,o,r]}const CLt=(t,e,n)=>r0e(t.diff(e.getCenter()),!1,n),SLt=(t,e,n)=>r0e(t.diff(e.getCenter()),!0,n);function r0e(t,e,n){const r=n.offset!=null?n.offset:20,o=new De(0,0),i=-t.theta(o),s=t.clone().move(o,r).diff(t).round();let a=".3em",l,c=i;return(i+90)%180===0?(l=e?"end":"middle",!e&&i===-270&&(a="0em")):i>-270&&i<-90?(l="start",c=i-180):l="end",N0({position:s.round().toJSON(),angle:e?c:0,attrs:{".":{y:a,"text-anchor":l}}},n)}const ELt=Object.freeze(Object.defineProperty({__proto__:null,bottom:gLt,inside:vLt,insideOriented:bLt,left:hLt,manual:dLt,outside:mLt,outsideOriented:yLt,radial:CLt,radialOriented:SLt,right:fLt,top:pLt},Symbol.toStringTag,{value:"Module"}));var Ix;(function(t){t.presets=ELt,t.registry=ks.create({type:"port label layout"}),t.registry.register(t.presets,!0)})(Ix||(Ix={}));var xLt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;
534a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class ki extends cd{get priority(){return 2}get disposeContainer(){return!0}constructor(){super(),this.cid=Cz.uniqueId(),ki.views[this.cid]=this}confirmUpdate(e,n){return 0}empty(e=this.container){return GR(e),this}unmount(e=this.container){return Ex(e),this}remove(e=this.container){return e===this.container?(this.removeEventListeners(document),this.onRemove(),delete ki.views[this.cid],this.disposeContainer&&this.unmount(e)):this.unmount(e),this}onRemove(){}setClass(e,n=this.container){n.classList.value=Array.isArray(e)?e.join(" "):e}addClass(e,n=this.container){return ro(n,Array.isArray(e)?e.join(" "):e),this}removeClass(e,n=this.container){return fh(n,Array.isArray(e)?e.join(" "):e),this}setStyle(e,n=this.container){return jR(n,e),this}setAttrs(e,n=this.container){return e!=null&&n!=null&&ti(n,e),this}findAttr(e,n=this.container){let r=n;for(;r&&r.nodeType===1;){const o=r.getAttribute(e);if(o!=null)return o;if(r===this.container)return null;r=r.parentNode}return null}find(e,n=this.container,r=this.selectors){return ki.find(e,n,r).elems}findOne(e,n=this.container,r=this.selectors){const o=this.find(e,n,r);return o.length>0?o[0]:null}findByAttr(e,n=this.container){let r=n;for(;r&&r.getAttribute;){const o=r.getAttribute(e);if((o!=null||r===this.container)&&o!=="false")return r;r=r.parentNode}return null}getSelector(e,n){let r;if(e===this.container)return typeof n=="string"&&(r=`> ${n}`),r;if(e){const o=x8(e)+1;r=`${e.tagName.toLowerCase()}:nth-child(${o})`,n&&(r+=` > ${n}`),r=this.getSelector(e.parentNode,r)}return r}prefixClassName(e){return Af.prefix(e)}delegateEvents(e,n){if(e==null)return this;n||this.undelegateEvents();const r=/^(\S+)\s*(.*)$/;return Object.keys(e).forEach(o=>{const i=o.match(r);if(i==null)return;const s=this.getEventHandler(e[o]);typeof s=="function"&&this.delegateEvent(i[1],i[2],s)}),this}undelegateEvents(){return bl.off(this.container,this.getEventNamespace()),this}delegateDocumentEvents(e,n){return this.addEventListeners(document,e,n),this}undelegateDocumentEvents(){return this.removeEventListeners(document),this}delegateEvent(e,n,r){return bl.on(this.container,e+this.getEventNamespace(),n,r),this}undelegateEvent(e,n,r){const o=e+this.getEventNamespace();return n==null?bl.off(this.container,o):typeof n=="string"?bl.off(this.container,o,n,r):bl.off(this.container,o,n),this}addEventListeners(e,n,r){if(n==null)return this;const o=this.getEventNamespace();return Object.keys(n).forEach(i=>{const s=this.getEventHandler(n[i]);typeof s=="function"&&bl.on(e,i+o,r,s)}),this}removeEventListeners(e){return e!=null&&bl.off(e,this.getEventNamespace()),this}getEventNamespace(){return`.${Af.prefixCls}-event-${this.cid}`}getEventHandler(e){let n;if(typeof e=="string"){const r=this[e];typeof r=="function"&&(n=(...o)=>r.call(this,...o))}else n=(...r)=>e.call(this,...r);return n}getEventTarget(e,n={}){const{target:r,type:o,clientX:i=0,clientY:s=0}=e;return n.fromPoint||o==="touchmove"||o==="touchend"?document.elementFromPoint(i,s):r}stopPropagation(e){return this.setEventData(e,{propagationStopped:!0}),this}isPropagationStopped(e){return this.getEventData(e).propagationStopped===!0}getEventData(e){return this.eventData(e)}setEventData(e,n){return this.eventData(e,n)}eventData(e,n){if(e==null)throw new TypeError("Event object required");let r=e.data;const o=`__${this.cid}__`;return n==null?r==null?{}:r[o]||{}:(r==null&&(r=e.data={}),r[o]==null?r[o]=Object.assign({},n):r[o]=Object.assign(Object.assign({},r[o]),n),r[o])}normalizeEvent(e){return ki.normalizeEvent(e)}dispose(){this.remove()}}xLt([ki.dispose()],ki.prototype,"dispose",null);(function(t){function e(o,i){return i?Of(o||"g"):E8(o||"div")}t.createElement=e;function n(o,i,s){if(!o||o===".")return{elems:[i]};if(s){const a=s[o];if(a)return{elems:Array.isArray(a)?a:[a]}}{const a=o.includes(">")?`:scope ${o}`:o;return{isCSSSelector:!0,elems:Array.prototype.slice.call(i.querySelectorAll(a))}}}t.find=n;function r(o){let i=o;const s=o.originalEvent,a=s&&s.changedTouches&&s.changedTouches[0];if(a){for(const l in o)a[l]===void 0&&(a[l]=o[l]);i=a}return i}t.normalizeEvent=r})(ki||(ki={}));(function(t){t.views={};function e(n){return t.views[n]||null}t.getView=e})(ki||(ki={}));var Cz;(function(t){let e=0;function n(){const r=`v${e}`;return e+=1,r}t.uniqueId=n})(Cz||(Cz={}));class wLt{constructor(e){this.view=e,this.clean()}clean(){this.elemCache&&this.elemCache.dispose(),this.elemCache=new vz,this.pathCache={}}get(e){return this.elemCache.has(e)||this.elemCache.set(e,{}),this.elemCache.get(e)}getData(e){const n=this.get(e);return n.data||(n.data={}),n.data}getMatrix(e){const n=this.get(e);if(n.matrix==null){const r=this.view.container;n.matrix=lMt(e,r)}
534return Qa(n.matrix)}getShape(e){const n=this.get(e);return n.shape==null&&(n.shape=No.toGeometryShape(e)),n.shape.clone()}getBoundingRect(e){const n=this.get(e);return n.boundingRect==null&&(n.boundingRect=No.getBBoxV2(e)),n.boundingRect.clone()}}var Oi;(function(t){function e(c){return c!=null&&!n(c)}t.isJSONMarkup=e;function n(c){return c!=null&&typeof c=="string"}t.isStringMarkup=n;function r(c){return c==null||n(c)?c:bs(c)}t.clone=r;function o(c){return`${c}`.trim().replace(/[\r|\n]/g," ").replace(/>\s+</g,"><")}t.sanitize=o;function i(c,u={ns:ja.svg}){const d=document.createDocumentFragment(),h={},f={},p=[{markup:Array.isArray(c)?c:[c],parent:d,ns:u.ns}];for(;p.length>0;){const m=p.pop();let y=m.ns||ja.svg;const v=m.markup,b=m.parent;v.forEach(S=>{const w=S.tagName;if(!w)throw new TypeError("Invalid tagName");S.ns&&(y=S.ns);const A=y?E8(w,y):Nte(w),_=S.attrs;_&&ti(A,SP(_));const P=S.style;P&&jR(A,P);const R=S.className;R!=null&&A.setAttribute("class",Array.isArray(R)?R.join(" "):R),S.textContent&&(A.textContent=S.textContent);const O=S.selector;if(O!=null){if(f[O])throw new TypeError("Selector must be unique");f[O]=A}if(S.groupSelector){let M=S.groupSelector;Array.isArray(M)||(M=[M]),M.forEach(L=>{h[L]||(h[L]=[]),h[L].push(A)})}b.appendChild(A);const N=S.children;Array.isArray(N)&&p.push({ns:y,markup:N,parent:A})})}return Object.keys(h).forEach(m=>{if(f[m])throw new Error("Ambiguous group selector");f[m]=h[m]}),{fragment:d,selectors:f,groups:h}}t.parseJSONMarkup=i;function s(c){return c instanceof SVGElement?Of("g"):Nte("div")}function a(c){if(n(c)){const f=Qn.createVectors(c),p=f.length;if(p===1)return{elem:f[0].node};if(p>1){const m=s(f[0].node);return f.forEach(y=>{m.appendChild(y.node)}),{elem:m}}return{}}const u=i(c),d=u.fragment;let h=null;return d.childNodes.length>1?(h=s(d.firstChild),h.appendChild(d)):h=d.firstChild,{elem:h,selectors:u.selectors}}t.renderMarkup=a;function l(c){const u=Qn.createVectors(c),d=document.createDocumentFragment();for(let h=0,f=u.length;h<f;h+=1){const p=u[h].node;d.appendChild(p)}return{fragment:d,selectors:{}}}t.parseLabelStringMarkup=l})(Oi||(Oi={}));(function(t){function e(n,r,o){if(n!=null){let i;const s=n.tagName.toLowerCase();if(n===r)return typeof o=="string"?i=`> ${s} > ${o}`:i=`> ${s}`,i;const a=n.parentNode;if(a&&a.childNodes.length>1){const l=x8(n)+1;i=`${s}:nth-child(${l})`}else i=s;return o&&(i+=` > ${o}`),e(n.parentNode,r,i)}return o}t.getSelector=e})(Oi||(Oi={}));(function(t){function e(){return"g"}t.getPortContainerMarkup=e;function n(){return{tagName:"circle",selector:"circle",attrs:{r:10,fill:"#FFFFFF",stroke:"#000000"}}}t.getPortMarkup=n;function r(){return{tagName:"text",selector:"text",attrs:{fill:"#000000"}}}t.getPortLabelMarkup=r})(Oi||(Oi={}));(function(t){function e(){return[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}]}t.getEdgeMarkup=e})(Oi||(Oi={}));(function(t){function e(n=!1){return{tagName:"foreignObject",selector:"fo",children:[{ns:ja.xhtml,tagName:"body",selector:"foBody",attrs:{xmlns:ja.xhtml},style:{width:"100%",height:"100%",background:"transparent"},children:n?[]:[{tagName:"div",selector:"foContent",style:{width:"100%",height:"100%"}}]}]}}t.getForeignObjectMarkup=e})(Oi||(Oi={}));class o0e{constructor(e){this.view=e}get cell(){return this.view.cell}getDefinition(e){return this.cell.getAttrDefinition(e)}processAttrs(e,n){let r,o,i,s;const a=[];return Object.keys(n).forEach(l=>{const c=n[l],u=this.getDefinition(l),d=Jn(qp.isValidDefinition,this.view,u,c,{elem:e,attrs:n,cell:this.cell,view:this.view});if(u&&d)typeof u=="string"?(r==null&&(r={}),r[u]=c):c!==null&&a.push({name:l,definition:u});else{r==null&&(r={});const h=mve.includes(l)?l:Qye(l);r[h]=c}}),a.forEach(({name:l,definition:c})=>{const u=n[l];typeof c.set=="function"&&(o==null&&(o={}),o[l]=u),typeof c.offset=="function"&&(i==null&&(i={}),i[l]=u),typeof c.position=="function"&&(s==null&&(s={}),s[l]=u)}),{raw:n,normal:r,set:o,offset:i,position:s}}mergeProcessedAttrs(e,n){e.set=Object.assign(Object.assign({},e.set),n.set),e.position=Object.assign(Object.assign({},e.position),n.position),e.offset=Object.assign(Object.assign({},e.offset),n.offset);const r=e.normal&&e.normal.transform;r!=null&&n.normal&&(n.normal.transform=r),e.normal=n.normal}findAttrs(e,n,r,o){const i=[],s=new vz;return Object.keys(e).forEach(a=>{const l=e[a];if(!og(l))return;const{isCSSSelector:c,elems:u}=ki.find(a,n,o);r[a]=u;for(let d=0,h=u.length;d<h;d+=1){const f=u[d],p=o&&o[a]===f,m=s.get(f);if(m){m.array||(i.push(f),m.array=!0,m.attrs=[m.attrs],m.priority=[m.priority]);const y=m.attrs,v=m.priority;if(p)y.unshift(l),v.unshift(-1);else{const b=rNt(v,c?-1:h);y.splice(b,0,l),v.splice(b,0,h)}}else s.set(f,{elem:f,attrs:l,priority:p?-1:h,array:!1})}}
534),i.forEach(a=>{const l=s.get(a),c=l.attrs;l.attrs=c.reduceRight((u,d)=>Ks(u,d),{})}),s}updateRelativeAttrs(e,n,r){const o=n.raw||{};let i=n.normal||{};const s=n.set,a=n.position,l=n.offset,c=()=>({elem:e,cell:this.cell,view:this.view,attrs:o,refBBox:r.clone()});if(s!=null&&Object.keys(s).forEach(y=>{const v=s[y],b=this.getDefinition(y);if(b!=null){const S=Jn(b.set,this.view,v,c());typeof S=="object"?i=Object.assign(Object.assign({},i),S):S!=null&&(i[y]=S)}}),e instanceof HTMLElement){this.view.setAttrs(i,e);return}const u=i.transform,d=u?`${u}`:null,h=EP(d),f=new De(h.e,h.f);u&&(delete i.transform,h.e=0,h.f=0);let p=!1;a!=null&&Object.keys(a).forEach(y=>{const v=a[y],b=this.getDefinition(y);if(b!=null){const S=Jn(b.position,this.view,v,c());S!=null&&(p=!0,f.translate(De.create(S)))}}),this.view.setAttrs(i,e);let m=!1;if(l!=null){const y=this.view.getBoundingRectOfElement(e);if(y.width>0&&y.height>0){const v=No.transformRectangle(y,h);Object.keys(l).forEach(b=>{const S=l[b],w=this.getDefinition(b);if(w!=null){const A=Jn(w.offset,this.view,S,{elem:e,cell:this.cell,view:this.view,attrs:o,refBBox:v});A!=null&&(m=!0,f.translate(De.create(A)))}})}}(u!=null||p||m)&&(f.round(1),h.e=f.x,h.f=f.y,e.setAttribute("transform",kw(h)))}update(e,n,r){const o={},i=this.findAttrs(r.attrs||n,e,o,r.selectors),s=r.attrs?this.findAttrs(n,e,o,r.selectors):i,a=[];i.each(u=>{const d=u.elem,h=u.attrs,f=this.processAttrs(d,h);if(f.set==null&&f.position==null&&f.offset==null)this.view.setAttrs(f.normal,d);else{const p=s.get(d),m=p?p.attrs:null,y=m&&h.ref==null?m.ref:h.ref;let v;if(y){if(v=(o[y]||this.view.find(y,e,r.selectors))[0],!v)throw new Error(`"${y}" reference does not exist.`)}else v=null;const b={node:d,refNode:v,attributes:m,processedAttributes:f},S=a.findIndex(w=>w.refNode===d);S>-1?a.splice(S,0,b):a.push(b)}});const l=new vz;let c;a.forEach(u=>{const d=u.node,h=u.refNode;let f;const p=h!=null&&r.rotatableNode!=null&&gve(r.rotatableNode,h);if(h&&(f=l.get(h)),!f){const v=p?r.rotatableNode:e;f=h?No.getBBox(h,{target:v}):r.rootBBox,h&&l.set(h,f)}let m;r.attrs&&u.attributes?(m=this.processAttrs(d,u.attributes),this.mergeProcessedAttrs(m,u.processedAttributes)):m=u.processedAttributes;let y=f;p&&r.rotatableNode!=null&&!r.rotatableNode.contains(d)&&(c||(c=EP(ti(r.rotatableNode,"transform"))),y=No.transformRectangle(f,c)),this.updateRelativeAttrs(d,m,y)})}}class i0e{get cell(){return this.view.cell}constructor(e,n,r=[]){this.view=e;const o={},i={};let s=0;Object.keys(n).forEach(l=>{let c=n[l];Array.isArray(c)||(c=[c]),c.forEach(u=>{let d=o[u];d||(s+=1,d=o[u]=1<<s),i[l]|=d})});let a=r;if(Array.isArray(a)||(a=[a]),a.forEach(l=>{o[l]||(s+=1,o[l]=1<<s)}),s>25)throw new Error("Maximum number of flags exceeded.");this.flags=o,this.attrs=i,this.bootstrap=r}getFlag(e){const n=this.flags;return n==null?0:Array.isArray(e)?e.reduce((r,o)=>r|n[o],0):n[e]|0}hasAction(e,n){return e&this.getFlag(n)}removeAction(e,n){return e^e&this.getFlag(n)}getBootstrapFlag(){return this.getFlag(this.bootstrap)}getChangedFlag(){let e=0;return this.attrs&&Object.keys(this.attrs).forEach(n=>{this.cell.hasChanged(n)&&(e|=this.attrs[n])}),e}}var ALt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},TLt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class Ds extends ki{static getDefaults(){return this.defaults}static config(e){this.defaults=this.getOptions(e)}static getOptions(e){const n=(c,u)=>u!=null?qye([...Array.isArray(c)?c:[c],...Array.isArray(u)?u:[u]]):Array.isArray(c)?[...c]:[c],r=bs(this.getDefaults()),{bootstrap:o,actions:i,events:s,documentEvents:a}=e,l=TLt(e,["bootstrap","actions","events","documentEvents"]);return o&&(r.bootstrap=n(r.bootstrap,o)),i&&Object.entries(i).forEac
534h(([c,u])=>{const d=r.actions[c];u&&d?r.actions[c]=n(d,u):u&&(r.actions[c]=n(u))}),s&&(r.events=Object.assign(Object.assign({},r.events),s)),e.documentEvents&&(r.documentEvents=Object.assign(Object.assign({},r.documentEvents),a)),Ks(r,l)}get[Symbol.toStringTag](){return Ds.toStringTag}constructor(e,n={}){super(),this.cell=e,this.options=this.ensureOptions(n),this.graph=this.options.graph,this.attr=new o0e(this),this.flag=new i0e(this,this.options.actions,this.options.bootstrap),this.cache=new wLt(this),this.setContainer(this.ensureContainer()),this.setup(),this.init()}init(){}onRemove(){this.removeTools()}get priority(){return this.options.priority}get rootSelector(){return this.options.rootSelector}getConstructor(){return this.constructor}ensureOptions(e){return this.getConstructor().getOptions(e)}getContainerTagName(){return this.options.isSvgElement?"g":"div"}getContainerStyle(){}getContainerAttrs(){return{"data-cell-id":this.cell.id,"data-shape":this.cell.shape}}getContainerClassName(){return this.prefixClassName("cell")}ensureContainer(){return ki.createElement(this.getContainerTagName(),this.options.isSvgElement)}setContainer(e){if(this.container!==e){this.undelegateEvents(),this.container=e,this.options.events!=null&&this.delegateEvents(this.options.events);const n=this.getContainerAttrs();n!=null&&this.setAttrs(n,e);const r=this.getContainerStyle();r!=null&&this.setStyle(r,e);const o=this.getContainerClassName();o!=null&&this.addClass(o,e)}return this}isNodeView(){return!1}isEdgeView(){return!1}render(){return this}confirmUpdate(e,n={}){return 0}getBootstrapFlag(){return this.flag.getBootstrapFlag()}getFlag(e){return this.flag.getFlag(e)}hasAction(e,n){return this.flag.hasAction(e,n)}removeAction(e,n){return this.flag.removeAction(e,n)}handleAction(e,n,r,o){if(this.hasAction(e,n)){r();const i=[n];return o&&(typeof o=="string"?i.push(o):i.push(...o)),this.removeAction(e,i)}return e}setup(){this.cell.on("changed",this.onCellChanged,this)}onCellChanged({options:e}){this.onAttrsChange(e)}onAttrsChange(e){let n=this.flag.getChangedFlag();e.updated||!n||(e.dirty&&this.hasAction(n,"update")&&(n|=this.getFlag("render")),e.toolId&&(e.async=!1),this.graph!=null&&this.graph.renderer.requestViewUpdate(this,n,e))}parseJSONMarkup(e,n){const r=Oi.parseJSONMarkup(e),o=r.selectors,i=this.rootSelector;if(n&&i){if(o[i])throw new Error("Invalid root selector");o[i]=n}return r}can(e){let n=this.graph.options.interacting;if(typeof n=="function"&&(n=Jn(n,this.graph,this)),typeof n=="object"){let r=n[e];return typeof r=="function"&&(r=Jn(r,this.graph,this)),r!==!1}return typeof n=="boolean"?n:!1}cleanCache(){return this.cache.clean(),this}getCache(e){return this.cache.get(e)}getDataOfElement(e){return this.cache.getData(e)}getMatrixOfElement(e){return this.cache.getMatrix(e)}getShapeOfElement(e){return this.cache.getShape(e)}getBoundingRectOfElement(e){return this.cache.getBoundingRect(e)}getBBoxOfElement(e){const n=this.getBoundingRectOfElement(e),r=this.getMatrixOfElement(e),o=this.getRootRotatedMatrix(),i=this.getRootTranslatedMatrix();return No.transformRectangle(n,i.multiply(o).multiply(r))}getUnrotatedBBoxOfElement(e){const n=this.getBoundingRectOfElement(e),r=this.getMatrixOfElement(e),o=this.getRootTranslatedMatrix();return No.transformRectangle(n,o.multiply(r))}getBBox(e={}){let n;if(e.useCellGeometry){const r=this.cell,o=r.isNode()?r.getAngle():0;n=r.getBBox().bbox(o)}else n=this.getBBoxOfElement(this.container);return this.graph.coord.localToGraphRect(n)}getRootTranslatedMatrix(){const e=this.cell,n=e.isNode()?e.getPosition():{x:0,y:0};return Qa().translate(n.x,n.y)}getRootRotatedMatrix(){let e=Qa();const n=this.cell,r=n.isNode()?n.getAngle():0;if(r){const o=n.getBBox(),i=o.width/2,s=o.height/2;e=e.translate(i,s).rotate(r).translate(-i,-s)}return e}findMagnet(e=this.container){return this.findByAttr("magnet",e)}updateAttrs(e,n,r={}){r.rootBBox==null&&(r.rootBBox=new Gt),r.selectors==null&&(r.selectors=this.selectors),this.attr.update(e,n,r)}isEdgeElement(e){return this.cell.isEdge()&&(e==null||e===this.container)}prepareHighlight(e,n={}){const r=e||this.container;return n.partial=r===this.container,r}highlight(e,n={}){const r=this.prepareHighlight(e,n);return this.notify("cell:highlight",{magnet:r,options:n,view:this,cell:this.cell}),this.isEdgeView()?this.notify("edge:highlight",{magnet:r,options:n,view:this,edge:this.cell,cell:this.cell}):this.isNodeView()&&this.notify("node:highlight",{magnet:r,options:n,view:this,node:this.cell,cell:this.cell}),this}unhighlight(e,n={}){const r=this.prepareHighlight(e,n);return this.notify("cell:unhighlight",{magnet:r,options:n,view:this,cell:this.cell}),this.isNodeView()?this.notify("node:unhighlight",{magnet:r,options:n,view:this,node:this.cell,cell:this.cell}):this.isEdgeView()&&this.notify("edge:unhighlight",{magnet:r,options:n,view:this,edge:this.cell,cell:this.cell}),this}notifyUnhighlight(e,n){}getEdgeTerminal(e,n,r,o,i){const s=this.cell,a=this.findAttr("port",e),l=e.getAttribute("data-selector"),c={cell:s.id};return l!=null&&(c.magnet=l),a!=null?(c.port=a,s.isNode()&&!s.hasPort(a)&&l==null&&(c.selector=this.getSelector(e))):l==null&&this.container!==e&&(c.selector=this.getSelector(e)),c}getMagnetFromEdgeTerminal(e){const n=this.cell,r=this.container,o=e.port;let i=e.magnet,s;return o!=null&&n.isNode()&&n.hasPort(o)?s=this.findPortElem(o,i)||r:(i||(i=e.selector),!i&&o!=null&&(i=`[port="${o}"]`),s=this.findOne(i,r,this.selectors)),s}hasTools(e){const n=this.tools;return n==null?!1:e==null?!0:n.name===e}addTools(e){if(this.removeTools(),e){if(!this.can("toolsAddable"))return this;const n=Js.isToolsView(e)?e:new Js(e);this.tools=n,n.config({view:this}),n.mount()}return this}updateTools(e={}){return this.tools&&this.tools.update(e),this}removeTools(){return this.tools&&(this.tools.remove(),this.tools=null),this}hideTools(){return this.tools&&this.tools.hide(),this}showTools(){return this.tools&&this.tools.show(),this}renderTools(){const e=this.cell.getTools();return this.addTools(e),this}notify(e,n){return this.trigger(e,n),this.graph.trigger(e,n),this}getEventArgs(e,n,r){const o=this,i=o.cell;return n==null||r==null?{e,view:o,cell:i}:{e,x:n,y:r,view:o,cell:i}}onClick(e,n,r){this.notify("cell:click",this.getEventArgs(e,n,r))}onDblClick(e,n,r){this.notify("cell:dblclick",this.getEventArgs(e,n,r))}onContextMenu(e,n,r){this.notify("cell:contextmenu",this.getEventArgs(e,n,r))}onMouseDown(e,n,r){this.cell.model&&(this.cachedModelForMouseEvent=this.cell.model,this.cachedModelForMouseEvent.startBatch("mouse")),this.notify("cell:mousedown",this.getEventArgs(e,n,r))}onMouseUp(e,n,r){this.notify("cell:mouseup",this.getEventArgs(e,n,r)),this.cachedModelForMouseEvent&&(this.cachedModelForMouseEvent.stopBatch("mouse",{cell:this.cell}),this.cachedModelForMouseEvent=null)}onMouseMove(e,n,r){this.notify("cell:mousemove",this.getEventArgs(e,n,r))}onMouseOver(e){this.notify("cell:mouseover",this.getEventArgs(e))}onMouseOut(e){this.notify("cell:mouseout",this.getEventArgs(e))}onMouseEnter(e){this.notify("cell:mouseenter",this.getEventArgs(e))}onMouseLeave(e){this.notify("cell:mouseleave",this.getEventArgs(e))}onMouseWheel(e,n,r,o){this.notify("cell:mousewheel",Object.assign({delta:o},this.getEventArgs(e,n,r)))}onCustomEvent(e,n,r,o){this.notify("cell:customevent",Object.assign({name:n},this.getEventArgs(e,r,o))),this.notify(n,Object.assign({},this.getEventArgs(e,r,o)))}onMagnetMouseDown(e,n,r,o){}onMagnetDblClick(e,n,r,o){}onMagnetContextMenu(e,n,r,o){}onLabelMouseDown(e,n,r){}checkMouseleave(e){const n=this.getEventTarget(e,{fromPoint:!0}),r=this.graph.findViewByElem(n);r!==this&&(this.onMouseLeave(e),r&&r.onMouseEnter(e))}dispose(){this.cell.off("changed",this.onCellChanged,this)}}Ds.defaults={isSvgElement:!0,rootSelector:"root",priority:0,bootstrap:[],actions:{}};ALt([Ds.dispose()],Ds.prototype,"dispose",null);(function(t){t.Flag=i0e,t.Attr=o0e})(Ds||(Ds={}));(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&typeof o.isNodeView=="function"&&typeof o.isEdgeView=="function"&&typeof o.confirmUpdate=="function"}t.isCellView=e})(Ds||(Ds={}));(function(t){function e(r){return function(o){o.config({priority:r})}}t.priority=e;function n(r){return function(o){o.config({bootstrap:r})}}t.bootstrap=n})(Ds||(Ds={}));(function(t){t.registry=ks.create({type:"view"})})(Ds||(Ds={}));class Js extends ki{get name(){return this.options.name}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get[Symbol.toStringTag](){return Js.toStringTag}constructor(e={}){super(),this.svgContainer=this.createContainer(!0,e),this.htmlContainer=this.createContainer(!1,e),this.config(e)}createContainer(e,n){const r=e?ki.createElement("g",!0):ki.createElement("div",!1);return ro(r,this.prefixClassName("cell-tools")),n.className&&ro(r,n.className),r}config(e){if(this.options=Object.assign(Object.assign({},this.options),e),!Ds.isCellView(e.view)||e.view===this.cellView)return this;this.cellView=e.view,this.cell.isEdge()?(ro(this.svgContainer,this.prefixClassName("edge-tools")),ro(this.htmlContainer,this.prefixClassName("edge-tools"))):this.cell.isNode()&&(ro(this.svgContainer,this.prefixClassName("node-tools")),ro(this.htmlContainer,this.prefixClassName("node-tools"))),this.svgContainer.setAttribute("data-cell-id",this.cell.id),this.htmlContainer.setAttribute("data-cell-id",this.cell.id),this.name&&(this.svgContainer.setAttribute("data-tools-name",this.name),this.htmlContainer.setAttribute("data-tools-name",this.name));const n=this.options.items;if(!Array.isArray(n))return this;this.tools=[];const r=[];
534n.forEach(o=>{Js.ToolItem.isToolItem(o)?o.name==="vertices"?r.unshift(o):r.push(o):(typeof o=="object"?o.name:o)==="vertices"?r.unshift(o):r.push(o)});for(let o=0;o<r.length;o+=1){const i=r[o];let s;if(Js.ToolItem.isToolItem(i))s=i;else{const a=typeof i=="object"?i.name:i,l=typeof i=="object"?i.args||{}:{};if(a){if(this.cell.isNode()){const c=Rx.registry.get(a);if(c)s=new c(l);else return Rx.registry.onNotFound(a)}else if(this.cell.isEdge()){const c=Ox.registry.get(a);if(c)s=new c(l);else return Ox.registry.onNotFound(a)}}}s&&(s.config(this.cellView,this),s.render(),(s.options.isSVGElement!==!1?this.svgContainer:this.htmlContainer).appendChild(s.container),this.tools.push(s))}return this}update(e={}){const n=this.tools;return n&&n.forEach(r=>{e.toolId!==r.cid&&r.isVisible()&&r.update()}),this}focus(e){const n=this.tools;return n&&n.forEach(r=>{e===r?r.show():r.hide()}),this}blur(e){const n=this.tools;return n&&n.forEach(r=>{r!==e&&!r.isVisible()&&(r.show(),r.update())}),this}hide(){return this.focus(null)}show(){return this.blur(null)}remove(){const e=this.tools;return e&&(e.forEach(n=>n.remove()),this.tools=null),Ex(this.svgContainer),Ex(this.htmlContainer),super.remove()}mount(){const e=this.tools,n=this.cellView;if(n&&e){const r=e.some(i=>i.options.isSVGElement!==!1),o=e.some(i=>i.options.isSVGElement===!1);r&&(this.options.local?n.container:n.graph.view.decorator).appendChild(this.svgContainer),o&&this.graph.container.appendChild(this.htmlContainer)}return this}}(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&o.graph!=null&&o.cell!=null&&typeof o.config=="function"&&typeof o.update=="function"&&typeof o.focus=="function"&&typeof o.blur=="function"&&typeof o.show=="function"&&typeof o.hide=="function"}t.isToolsView=e})(Js||(Js={}));(function(t){class e extends ki{static getDefaults(){return this.defaults}static config(r){this.defaults=this.getOptions(r)}static getOptions(r){return Ks(bs(this.getDefaults()),r)}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get name(){return this.options.name}get[Symbol.toStringTag](){return e.toStringTag}constructor(r={}){super(),this.visible=!0,this.options=this.getOptions(r),this.container=ki.createElement(this.options.tagName||"g",this.options.isSVGElement!==!1),ro(this.container,this.prefixClassName("cell-tool")),typeof this.options.className=="string"&&ro(this.container,this.options.className),this.init()}init(){}getOptions(r){return this.constructor.getOptions(r)}delegateEvents(){return this.options.events&&super.delegateEvents(this.options.events),this}config(r,o){return this.cellView=r,this.parent=o,this.stamp(this.container),this.cell.isEdge()?ro(this.container,this.prefixClassName("edge-tool")):this.cell.isNode()&&ro(this.container,this.prefixClassName("node-tool")),this.name&&this.container.setAttribute("data-tool-name",this.name),this.delegateEvents(),this}render(){this.empty();const r=this.options.markup;if(r){const o=Oi.parseJSONMarkup(r);this.container.appendChild(o.fragment),this.childNodes=o.selectors}return this.onRender(),this}onRender(){}update(){return this}stamp(r){r&&r.setAttribute("data-cell-id",this.cellView.cell.id)}show(){return this.container.style.display="",this.visible=!0,this}hide(){return this.container.style.display="none",this.visible=!1,this}isVisible(){return this.visible}focus(){const r=this.options.focusOpacity;return r!=null&&Number.isFinite(r)&&(this.container.style.opacity=`${r}`),this.parent.focus(this),this}blur(){return this.container.style.opacity="",this.parent.blur(this),this}guard(r){return this.graph==null||this.cellView==null?!0:this.graph.view.guard(r,this.cellView)}}e.defaults={isSVGElement:!0,tagName:"g"},t.ToolItem=e,function(n){let r=0;function o(s){return s?y8(s):(r+=1,`CustomTool${r}`)}function i(s){const a=g8(o(s.name),this);return a.config(s),a}n.define=i}(e=t.ToolItem||(t.ToolItem={})),function(n){n.toStringTag=`X6.${n.name}`;function r(o){if(o==null)return!1;if(o instanceof n)return!0;const i=o[Symbol.toStringTag],s=o;return(i==null||i===n.toStringTag)&&s.graph!=null&&s.cell!=null&&typeof s.config=="function"&&typeof s.update=="function"&&typeof s.focus=="function"&&typeof s.blur=="function"&&typeof s.show=="function"&&typeof s.hide=="function"&&typeof s.isVisible=="function"}n.isToolItem=r}(e=t.ToolItem||(t.ToolItem={}))})(Js||(Js={}));const _Lt=t=>t;function Gte(t,e){return e===0?"0%":`${Math.round(t/e*100)}%`}function s0e(t){return(n,r,o,i)=>r.isEdgeElement(o)?PLt(t,n,r,o,i):ILt(t,n,r,o,i)}function ILt(t,e,n,r,o){const i=n.cell,s=i.getAngle(),a=n.getUnrotatedBBoxOfElement(r),l=i.getBBox().getCenter(),c=De.create(o).rotate(s,l);let u=c.x-a.x,d=c.y-a.y;return t&&(u=Gte(u,a.width),d=Gte(d,a.height)),e.anchor={name:"topLeft",args:{dx:u,dy:d,rotate:!0}},e}function PLt(t,e,n,r,o){const i=n.getConnection();if(!i)return e;
534const s=i.closestPointLength(o);if(t){const a=i.length();e.anchor={name:"ratio",args:{ratio:s/a}}}else e.anchor={name:"length",args:{length:s}};return e}const RLt=s0e(!0),OLt=s0e(!1),NLt=Object.freeze(Object.defineProperty({__proto__:null,noop:_Lt,pinAbsolute:OLt,pinRelative:RLt},Symbol.toStringTag,{value:"Module"}));var Sz;(function(t){t.presets=NLt,t.registry=ks.create({type:"connection strategy"}),t.registry.register(t.presets,!0)})(Sz||(Sz={}));function a0e(t,e,n,r){return Jn(Sz.presets.pinRelative,this.graph,{},e,n,t,this.cell,r,{}).anchor}function l0e(t,e){return e?t.cell.getBBox():t.cell.isEdge()?t.getConnection().bbox():t.getUnrotatedBBoxOfElement(t.container)}class t0 extends Js.ToolItem{onRender(){ro(this.container,this.prefixClassName("cell-tool-button")),this.update()}update(){return this.updatePosition(),this}updatePosition(){const n=this.cellView.cell.isEdge()?this.getEdgeMatrix():this.getNodeMatrix();xx(this.container,n,{absolute:!0})}getNodeMatrix(){const e=this.cellView,n=this.options;let{x:r=0,y:o=0}=n;const{offset:i,useCellGeometry:s,rotate:a}=n;let l=l0e(e,s);const c=e.cell.getAngle();a||(l=l.bbox(c));let u=0,d=0;typeof i=="number"?(u=i,d=i):typeof i=="object"&&(u=i.x,d=i.y),r=yf(r,l.width),o=yf(o,l.height);let h=Qa().translate(l.x+l.width/2,l.y+l.height/2);return a&&(h=h.rotate(c)),h=h.translate(r+u-l.width/2,o+d-l.height/2),h}getEdgeMatrix(){const e=this.cellView,n=this.options,{offset:r=0,distance:o=0,rotate:i}=n;let s,a,l;const c=yf(o,1);c>=0&&c<=1?s=e.getTangentAtRatio(c):s=e.getTangentAtLength(c),s?(a=s.start,l=s.vector().vectorAngle(new De(1,0))||0):(a=e.getConnection().start,l=0);let u=Qa().translate(a.x,a.y).rotate(l);return typeof r=="object"?u=u.translate(r.x||0,r.y||0):u=u.translate(0,r),i||(u=u.rotate(-l)),u}onMouseDown(e){if(this.guard(e))return;e.stopPropagation(),e.preventDefault();const n=this.options.onClick;typeof n=="function"&&Jn(n,this.cellView,{e,view:this.cellView,cell:this.cellView.cell,btn:this})}}(function(t){t.config({name:"button",useCellGeometry:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"}})})(t0||(t0={}));(function(t){t.Remove=t.define({name:"button-remove",markup:[{tagName:"circle",selector:"button",attrs:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attrs:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],distance:60,offset:0,useCellGeometry:!0,onClick({view:e,btn:n}){n.parent.remove(),e.cell.remove({ui:!0,toolId:n.cid})}})})(t0||(t0={}));var MLt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class B2 extends Js.ToolItem{onRender(){if(ro(this.container,this.prefixClassName("cell-tool-boundary")),this.options.attrs){const e=this.options.attrs,{class:n}=e,r=MLt(e,["class"]);ti(this.container,SP(r)),n&&ro(this.container,n)}this.update()}update(){const e=this.cellView,n=this.options,{useCellGeometry:r,rotate:o}=n,i=UC(n.padding);let s=l0e(e,r).moveAndExpand({x:-i.left,y:-i.top,width:i.left+i.right,height:i.top+i.bottom});const a=e.cell;if(a.isNode()){const l=a.getAngle();if(l)if(o){const c=a.getBBox().getCenter();gz(this.container,l,c.x,c.y,{absolute:!0})}else s=s.bbox(l)}return ti(this.container,s.toJSON()),this}}(function(t){t.config({name:"boundary",tagName:"rect",padding:10,useCellGeometry:!0,attrs:{fill:"none",stroke:"#333","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"}})})(B2||(B2={}));class TP extends Js.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}onRender(){return this.addClass(this.prefixClassName("edge-tool-vertices")),this.options.addable&&this.updatePath(),this.resetHandles(),this.renderHandles(),this}update(){return this.vertices.length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.addable&&this.updatePath(),this}resetHandles(){const e=this.handles;this.handles=[],e&&e.forEach(n=>{this.stopHandleListening(n),n.remove()})}renderHandles(){const e=this.vertices;for(let n=0,r=e.length;n<r;n+=1){const o=e[n],i=this.options.createHandle,s=this.options.processHandle,a=i({index:n,graph:this.graph,guard:l=>this.guard(l),attrs:this.options.attrs||{}});s&&s(a),a.updatePosition(o.x,o.y),this.stamp(a.container),this.container.appendChild(a.container),this.handles.push(a),this.startHandleListening(a)}}updateHandles(){const e=this.vertices;for(let n=0,r=e.length;n<r;n+=1){const o=e[n],i=this.handles[n];i&&i.updatePosition(o.x,o.y)}}updatePath(){const e=this.childNodes.connection;e&&e.setAttribute("d",this.cellView.getConnectionPathData())}startHandleListening(e){const n=this.cellView;n.can("vertexMovable")&&(e.on("change",this.onHandleChange,this),e.on("changing",this.onHandleChanging,this),e.on("changed",this.onHandleChanged,this)),n.can("vertexDeletable")&&e.on("remove",this.onHandleRemove,this)}stopHandleListening(e){const n=this.cellView;n.can("vertexMovable")&&(e.off("change",this.onHandleChange,this),e.off("changing",this.onHandleChanging,this),e.off("changed",this.onHandleChanged,this)),n.can("vertexDeletable")&&e.off("remove",this.onHandleRemove,this)}getNeighborPoints(e){const n=this.cellView,r=this.vertices,o=e>0?r[e-1]:n.sourceAnchor,i=e<r.length-1?r[e+1]:n.targetAnchor;return{prev:De.create(o),next:De.create(i)}}getMouseEventArgs(e){const n=this.normalizeEvent(e),{x:r,y:o}
534=this.graph.snapToGrid(n.clientX,n.clientY);return{e:n,x:r,y:o}}onHandleChange({e}){this.focus();const n=this.cellView;if(n.cell.startBatch("move-vertex",{ui:!0,toolId:this.cid}),!this.options.stopPropagation){const{e:r,x:o,y:i}=this.getMouseEventArgs(e);this.eventData(r,{start:{x:o,y:i}}),n.notifyMouseDown(r,o,i)}}onHandleChanging({handle:e,e:n}){const r=this.cellView,o=e.options.index,{e:i,x:s,y:a}=this.getMouseEventArgs(n),l={x:s,y:a};this.snapVertex(l,o),r.cell.setVertexAt(o,l,{ui:!0,toolId:this.cid}),e.updatePosition(l.x,l.y),this.options.stopPropagation||r.notifyMouseMove(i,s,a)}stopBatch(e){this.cell.stopBatch("move-vertex",{ui:!0,toolId:this.cid}),e&&this.cell.stopBatch("add-vertex",{ui:!0,toolId:this.cid})}onHandleChanged({e}){const n=this.options,r=this.cellView;if(n.addable&&this.updatePath(),!n.removeRedundancies){this.stopBatch(this.eventData(e).vertexAdded);return}r.removeRedundantLinearVertices({ui:!0,toolId:this.cid})&&this.render(),this.blur(),this.stopBatch(this.eventData(e).vertexAdded);const{e:i,x:s,y:a}=this.getMouseEventArgs(e);if(!this.options.stopPropagation){r.notifyMouseUp(i,s,a);const{start:l}=this.eventData(i);if(l){const{x:c,y:u}=l;c===s&&u===a&&r.onClick(i,s,a)}}r.checkMouseleave(i),n.onChanged&&n.onChanged({edge:r.cell,edgeView:r})}snapVertex(e,n){const r=this.options.snapRadius||0;if(r>0){const o=this.getNeighborPoints(n),i=o.prev,s=o.next;Math.abs(e.x-i.x)<r?e.x=i.x:Math.abs(e.x-s.x)<r&&(e.x=s.x),Math.abs(e.y-i.y)<r?e.y=o.prev.y:Math.abs(e.y-s.y)<r&&(e.y=s.y)}}onHandleRemove({handle:e,e:n}){if(this.options.removable){const r=e.options.index,o=this.cellView;o.cell.removeVertexAt(r,{ui:!0}),this.options.addable&&this.updatePath(),o.checkMouseleave(this.normalizeEvent(n))}}allowAddVertex(e){const n=this.guard(e),r=this.options.addable&&this.cellView.can("vertexAddable"),o=this.options.modifiers?wx.isMatch(e,this.options.modifiers):!0;return!n&&r&&o}onPathMouseDown(e){const n=this.cellView;if(!this.allowAddVertex(e))return;e.stopPropagation(),e.preventDefault();const r=this.normalizeEvent(e),o=this.graph.snapToGrid(r.clientX,r.clientY).toJSON();n.cell.startBatch("add-vertex",{ui:!0,toolId:this.cid});const i=n.getVertexIndex(o.x,o.y);this.snapVertex(o,i),n.cell.insertVertex(o,i,{ui:!0,toolId:this.cid}),this.render();const s=this.handles[i];this.eventData(r,{vertexAdded:!0}),s.onMouseDown(r)}onRemove(){this.resetHandles()}}(function(t){class e extends ki{get graph(){return this.options.graph}constructor(r){super(),this.options=r,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDoubleClick"})}render(){this.container=ki.createElement("circle",!0);const r=this.options.attrs;if(typeof r=="function"){const o=t.getDefaults();this.setAttrs(Object.assign(Object.assign({},o.attrs),r(this)))}else this.setAttrs(r);this.addClass(this.prefixClassName("edge-tool-vertex"))}updatePosition(r,o){this.setAttrs({cx:r,cy:o})}onMouseDown(r){this.options.guard(r)||(r.stopPropagation(),r.preventDefault(),this.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},r.data),this.emit("change",{e:r,handle:this}))}onMouseMove(r){this.emit("changing",{e:r,handle:this})}onMouseUp(r){this.emit("changed",{e:r,handle:this}),this.undelegateDocumentEvents(),this.graph.view.delegateEvents()}onDoubleClick(r){this.emit("remove",{e:r,handle:this})}}t.Handle=e})(TP||(TP={}));(function(t){const e=Af.prefix("edge-tool-vertex-path");t.config({name:"vertices",snapRadius:20,addable:!0,removable:!0,removeRedundancies:!0,stopPropagation:!0,attrs:{r:6,fill:"#333",stroke:"#fff",cursor:"move","stroke-width":2},createHandle:n=>new t.Handle(n),markup:[{tagName:"path",selector:"connection",className:e,attrs:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"pointer"}}],events:{[`mousedown .${e}`]:"onPathMouseDown",[`touchstart .${e}`]:"onPathMouseDown"}})})(TP||(TP={}));class _P extends Js.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}update(){return this.render(),this}onRender(){ro(this.container,this.prefixClassName("edge-tool-segments")),this.resetHandles();const e=this.cellView,n=[...this.vertices];n.unshift(e.sourcePoint),n.push(e.targetPoint);for(let r=0,o=n.length;r<o-1;r+=1){const i=n[r],s=n[r+1],a=this.renderHandle(i,s,r);this.stamp(a.container),this.handles.push(a)}return this}renderHandle(e,n,r){const o=this.options.createHandle({index:r,graph:this.graph,guard:i=>this.guard(i),attrs:this.options.attrs||{}});return this.options.processHandle&&this.options.processHandle(o),this.updateHandle(o,e,n),this.container.appendChild(o.container),this.startHandleListening(o),o}startHandleListening(e){e.on("change",this.onHandleChange,this),e.on("changing",this.onHandleChanging,this),e.on("changed",this.onHandleChanged,this)}stopHandleListening(e){e.off("change",this.onHandleChange,this),e.off("changing",this.onHandleChanging,this),e.off("changed",this.onHandleChanged,this)}resetHandles(){const e=this.handles;this.handles=[],e&&e.forEach(n=>{this.stopHandleListening(n),n.remove()})}shiftHandleIndexes(e){const n=this.handles;for(let r=0,o=n.length;r<o;r+=1)n[r].options.index+=e}resetAnchor(e,n){const r=this.cellView.cell,o={ui:!0,toolId:this.cid};n?r.prop([e,"anchor"],n,o):r.removeProp([e,"anchor"],o)}snapHandle(e,n,r){const o=e.options.axis,i=e.options.index,l=this.cellView.cell.getVertices(),c=l[i-2]||r.sourceAnchor,u=l[i+1]||r.targetAnchor,d=this.options.snapRadius;return Math.abs(n[o]-c[o])<d?n[o]=c[o]:Math.abs(n[o]-u[o])<d&&(n[o]=u[o]),n}onHandleChanging({handle:e,e:n}){const r=this.graph,o=this.options,i=this.cellView,s=o.anchor,a=e.options.axis,l=e.options.index-1,c=this.getEventData(n),u=this.normalizeEvent(n),d=r.snapToGri
534d(u.clientX,u.clientY),h=this.snapHandle(e,d.clone(),c),f=bs(this.vertices);let p=f[l],m=f[l+1];const y=i.sourceView,v=i.sourceBBox;let b=!1,S=!1;if(p?l===0?v.containsPoint(p)?(f.shift(),this.shiftHandleIndexes(-1),b=!0):(p[a]=h[a],S=!0):p[a]=h[a]:(p=i.sourceAnchor.toJSON(),p[a]=h[a],v.containsPoint(p)?b=!0:(f.unshift(p),this.shiftHandleIndexes(1),S=!0)),typeof s=="function"&&y){if(b){const R=c.sourceAnchor.clone();R[a]=h[a];const O=Jn(s,i,R,y,i.sourceMagnet||y.container,"source",i,this);this.resetAnchor("source",O)}S&&this.resetAnchor("source",c.sourceAnchorDef)}const w=i.targetView,A=i.targetBBox;let _=!1,P=!1;if(m?l===f.length-2?A.containsPoint(m)?(f.pop(),_=!0):(m[a]=h[a],P=!0):m[a]=h[a]:(m=i.targetAnchor.toJSON(),m[a]=h[a],A.containsPoint(m)?_=!0:(f.push(m),P=!0)),typeof s=="function"&&w){if(_){const R=c.targetAnchor.clone();R[a]=h[a];const O=Jn(s,i,R,w,i.targetMagnet||w.container,"target",i,this);this.resetAnchor("target",O)}P&&this.resetAnchor("target",c.targetAnchorDef)}De.equalPoints(f,this.vertices)||this.cellView.cell.setVertices(f,{ui:!0,toolId:this.cid}),this.updateHandle(e,p,m,0),o.stopPropagation||i.notifyMouseMove(u,d.x,d.y)}onHandleChange({handle:e,e:n}){const r=this.options,o=this.handles,i=this.cellView,s=e.options.index;if(Array.isArray(o)){for(let a=0,l=o.length;a<l;a+=1)a!==s&&o[a].hide();if(this.focus(),this.setEventData(n,{sourceAnchor:i.sourceAnchor.clone(),targetAnchor:i.targetAnchor.clone(),sourceAnchorDef:bs(this.cell.prop(["source","anchor"])),targetAnchorDef:bs(this.cell.prop(["target","anchor"]))}),this.cell.startBatch("move-segment",{ui:!0,toolId:this.cid}),!r.stopPropagation){const a=this.normalizeEvent(n),l=this.graph.snapToGrid(a.clientX,a.clientY);i.notifyMouseDown(a,l.x,l.y)}}}onHandleChanged({e}){const n=this.options,r=this.cellView;n.removeRedundancies&&r.removeRedundantLinearVertices({ui:!0,toolId:this.cid});const o=this.normalizeEvent(e),i=this.graph.snapToGrid(o.clientX,o.clientY);this.render(),this.blur(),this.cell.stopBatch("move-segment",{ui:!0,toolId:this.cid}),n.stopPropagation||r.notifyMouseUp(o,i.x,i.y),r.checkMouseleave(o),n.onChanged&&n.onChanged({edge:r.cell,edgeView:r})}updateHandle(e,n,r,o=0){const i=this.options.precision||0,s=Math.abs(n.x-r.x)<i,a=Math.abs(n.y-r.y)<i;if(s||a){const l=new fn(n,r);if(l.length()<this.options.threshold)e.hide();else{const u=l.getCenter(),d=s?"x":"y";u[d]+=o||0;const h=l.vector().vectorAngle(new De(1,0));e.updatePosition(u.x,u.y,h,this.cellView),e.show(),e.options.axis=d}}else e.hide()}onRemove(){this.resetHandles()}}(function(t){class e extends ki{constructor(r){super(),this.options=r,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown"})}render(){this.container=ki.createElement("rect",!0);const r=this.options.attrs;if(typeof r=="function"){const o=t.getDefaults();this.setAttrs(Object.assign(Object.assign({},o.attrs),r(this)))}else this.setAttrs(r);this.addClass(this.prefixClassName("edge-tool-segment"))}updatePosition(r,o,i,s){const a=s.getClosestPoint(new De(r,o))||new De(r,o);let l=Qa().translate(a.x,a.y);if(a.equals({x:r,y:o}))l=l.rotate(i);else{let u=new fn(r,o,a.x,a.y).vector().vectorAngle(new De(1,0));u!==0&&(u+=90),l=l.rotate(u)}this.setAttrs({transform:kw(l),cursor:i%180===0?"row-resize":"col-resize"})}onMouseDown(r){this.options.guard(r)||(this.trigger("change",{e:r,handle:this}),r.stopPropagation(),r.preventDefault(),this.options.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},r.data))}onMouseMove(r){this.emit("changing",{e:r,handle:this})}onMouseUp(r){this.emit("changed",{e:r,handle:this}),this.undelegateDocumentEvents(),this.options.graph.view.delegateEvents()}show(){this.container.style.display=""}hide(){this.container.style.display="none"}}t.Handle=e})(_P||(_P={}));(function(t){t.config({name:"segments",precision:.5,threshold:40,snapRadius:10,stopPropagation:!0,removeRedundancies:!0,attrs:{width:20,height:8,x:-10,y:-4,rx:4,ry:4,fill:"#333",stroke:"#fff","stroke-width":2},createHandle:e=>new t.Handle(e),anchor:a0e})})(_P||(_P={}));class $2 extends Js.ToolItem{get type(){return this.options.type}onRender(){ro(this.container,this.prefixClassName(`edge-tool-${this.type}-anchor`)),this.toggleArea(!1),this.update()}update(){const e=this.type;return this.cellView.getTerminalView(e)?(this.updateAnchor(),this.updateArea(),this.container.style.display=""):this.container.style.display="none",this}updateAnchor(){const e=this.childNodes;if(!e)return;const n=e.anchor;if(!n)return;
534const r=this.type,o=this.cellView,i=this.options,s=o.getTerminalAnchor(r),a=o.cell.prop([r,"anchor"]);n.setAttribute("transform",`translate(${s.x}, ${s.y})`);const l=a?i.customAnchorAttrs:i.defaultAnchorAttrs;l&&Object.keys(l).forEach(c=>{n.setAttribute(c,l[c])})}updateArea(){const e=this.childNodes;if(!e)return;const n=e.area;if(!n)return;const r=this.type,o=this.cellView,i=o.getTerminalView(r);if(i){const s=i.cell,a=o.getTerminalMagnet(r);let l=this.options.areaPadding||0;Number.isFinite(l)||(l=0);let c,u,d;i.isEdgeElement(a)?(c=i.getBBox(),u=0,d=c.getCenter()):(c=i.getUnrotatedBBoxOfElement(a),u=s.getAngle(),d=c.getCenter(),u&&d.rotate(-u,s.getBBox().getCenter())),c.inflate(l),ti(n,{x:-c.width/2,y:-c.height/2,width:c.width,height:c.height,transform:`translate(${d.x}, ${d.y}) rotate(${u})`})}}toggleArea(e){if(this.childNodes){const n=this.childNodes.area;n&&(n.style.display=e?"":"none")}}onMouseDown(e){this.guard(e)||(e.stopPropagation(),e.preventDefault(),this.graph.view.undelegateEvents(),this.options.documentEvents&&this.delegateDocumentEvents(this.options.documentEvents),this.focus(),this.toggleArea(this.options.restrictArea),this.cell.startBatch("move-anchor",{ui:!0,toolId:this.cid}))}resetAnchor(e){const n=this.type,r=this.cell;e?r.prop([n,"anchor"],e,{rewrite:!0,ui:!0,toolId:this.cid}):r.removeProp([n,"anchor"],{ui:!0,toolId:this.cid})}onMouseMove(e){const n=this.type,r=this.cellView,o=r.getTerminalView(n);if(o==null)return;const i=this.normalizeEvent(e),s=o.cell,a=r.getTerminalMagnet(n);let l=this.graph.coord.clientToLocalPoint(i.clientX,i.clientY);const c=this.options.snap;if(typeof c=="function"){const h=Jn(c,r,l,o,a,n,r,this);l=De.create(h)}if(this.options.restrictArea)if(o.isEdgeElement(a)){const h=o.getClosestPoint(l);h&&(l=h)}else{const h=o.getUnrotatedBBoxOfElement(a),f=s.getAngle(),p=s.getBBox().getCenter(),m=l.clone().rotate(f,p);h.containsPoint(m)||(l=h.getNearestPointToPoint(m).rotate(-f,p))}let u;const d=this.options.anchor;typeof d=="function"&&(u=Jn(d,r,l,o,a,n,r,this)),this.resetAnchor(u),this.update()}onMouseUp(e){this.graph.view.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);const n=this.cellView;this.options.removeRedundancies&&n.removeRedundantLinearVertices({ui:!0,toolId:this.cid}),this.cell.stopBatch("move-anchor",{ui:!0,toolId:this.cid})}onDblClick(){const e=this.options.resetAnchor;e&&this.resetAnchor(e===!0?void 0:e),this.update()}}(function(t){t.config({tagName:"g",markup:[{tagName:"circle",selector:"anchor",attrs:{cursor:"pointer"}},{tagName:"rect",selector:"area",attrs:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDblClick"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},customAnchorAttrs:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttrs:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,resetAnchor:!0,restrictArea:!0,removeRedundancies:!0,anchor:a0e,snap(e,n,r,o,i,s){const a=s.options.snapRadius||0,l=o==="source",c=l?0:-1,u=this.cell.getVertexAt(c)||this.getTerminalAnchor(l?"target":"source");return u&&(Math.abs(u.x-e.x)<a&&(e.x=u.x),Math.abs(u.y-e.y)<a&&(e.y=u.y)),e}})})($2||($2={}));const DLt=$2.define({name:"source-anchor",type:"source"}),LLt=$2.define({name:"target-anchor",type:"target"});var kLt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class H2 extends Js.ToolItem{get type(){return this.options.type}get ratio(){return this.options.ratio}init(){if(this.options.attrs){const e=this.options.attrs,{class:n}=e,r=kLt(e,["class"]);this.setAttrs(r,this.container),n&&ro(this.container,n)}}onRender(){ro(this.container,this.prefixClassName(`edge-tool-${this.type}-arrowhead`)),this.update()}update(){const e=this.ratio,n=this.cellView,r=n.getTangentAtRatio(e),o=r?r.start:n.getPointAtRatio(e),i=r&&r.vector().vectorAngle(new De(1,0))||0;if(!o)return this;const s=Qa().translate(o.x,o.y).rotate(i);return xx(this.container,s,{absolute:!0}),this}onMouseDown(e){if(this.guard(e))return;e.stopPropagation(),e.preventDefault();const n=this.cellView;if(n.can("arrowheadMovable")){n.cell.startBatch("move-arrowhead",{ui:!0,toolId:this.cid});
534const r=this.graph.snapToGrid(e.clientX,e.clientY),o=n.prepareArrowheadDragging(this.type,{x:r.x,y:r.y,options:Object.assign(Object.assign({},this.options),{toolId:this.cid})});this.cellView.setEventData(e,o),this.delegateDocumentEvents(this.options.documentEvents,e.data),n.graph.view.undelegateEvents(),this.container.style.pointerEvents="none"}this.focus()}onMouseMove(e){const n=this.normalizeEvent(e),r=this.graph.snapToGrid(n.clientX,n.clientY);this.cellView.onMouseMove(n,r.x,r.y),this.update()}onMouseUp(e){this.undelegateDocumentEvents();const n=this.normalizeEvent(e),r=this.cellView,o=this.graph.snapToGrid(n.clientX,n.clientY);r.onMouseUp(n,o.x,o.y),this.graph.view.delegateEvents(),this.blur(),this.container.style.pointerEvents="",r.cell.stopBatch("move-arrowhead",{ui:!0,toolId:this.cid})}}(function(t){t.config({tagName:"path",isSVGElement:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"}})})(H2||(H2={}));const FLt=H2.define({name:"source-arrowhead",type:"source",ratio:0,attrs:{d:"M 10 -8 -10 0 10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}}),BLt=H2.define({name:"target-arrowhead",type:"target",ratio:1,attrs:{d:"M -10 -8 10 0 -10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}});class Px extends Js.ToolItem{constructor(){super(...arguments),this.labelIndex=-1,this.distance=.5,this.dblClick=this.onCellDblClick.bind(this)}onRender(){const e=this.cellView;e&&e.on("cell:dblclick",this.dblClick)}createElement(){const e=[this.prefixClassName(`${this.cell.isEdge()?"edge":"node"}-tool-editor`),this.prefixClassName("cell-tool-editor")];this.editor=Js.createElement("div",!1),this.addClass(e,this.editor),this.editor.contentEditable="true",this.container.appendChild(this.editor)}removeElement(){this.undelegateDocumentEvents(),this.editor&&(this.container.removeChild(this.editor),this.editor=null)}updateEditor(){const{cell:e,editor:n}=this;if(!n)return;const{style:r}=n;e.isNode()?this.updateNodeEditorTransform():e.isEdge()&&this.updateEdgeEditorTransform();const{attrs:o}=this.options;r.fontSize=`${o.fontSize}px`,r.fontFamily=o.fontFamily,r.color=o.color,r.backgroundColor=o.backgroundColor;const i=this.getCellText()||"";return n.innerText=i,this.setCellText(""),this}updateNodeEditorTransform(){const{graph:e,cell:n,editor:r}=this;if(!r)return;let o=De.create(),i=20,s="",{x:a,y:l}=this.options;const{width:c,height:u}=this.options;if(typeof a<"u"&&typeof l<"u"){const f=n.getBBox();a=yf(a,f.width),l=yf(l,f.height),o=f.topLeft.translate(a,l),i=f.width-a*2}else{const f=n.getBBox();o=f.center,i=f.width-4,s="translate(-50%, -50%)"}const d=e.scale(),{style:h}=r;o=e.localToGraph(o),h.left=`${o.x}px`,h.top=`${o.y}px`,h.transform=`scale(${d.sx}, ${d.sy}) ${s}`,h.minWidth=`${i}px`,typeof c=="number"&&(h.width=`${c}px`),typeof u=="number"&&(h.height=`${u}px`)}updateEdgeEditorTransform(){if(!this.event)return;const{graph:e,editor:n}=this;if(!n)return;let r=De.create(),o=20;const{style:i}=n,s=this.event.target,a=s.parentElement;if(a&&VR(a,this.prefixClassName("edge-label"))){const u=a.getAttribute("data-index")||"0";this.labelIndex=parseInt(u,10);const d=a.getAttribute("transform"),{translation:h}=FB(d);r=new De(h.tx,h.ty),o=No.getBBox(s).width}else{if(!this.options.labelAddable)return this;r=e.clientToLocal(De.create(this.event.clientX,this.event.clientY));const d=this.cellView.path.closestPointLength(r);this.distance=d,this.labelIndex=-1}r=e.localToGraph(r);const c=e.scale();i.left=`${r.x}px`,i.top=`${r.y}px`,i.minWidth=`${o}px`,i.transform=`scale(${c.sx}, ${c.sy}) translate(-50%, -50%)`}onDocumentMouseUp(e){if(this.editor&&e.target!==this.editor){const n=this.editor.innerText.replace(/\n$/,"")||"";this.setCellText(n!==""?n:null),this.removeElement()}}onCellDblClick({e}){this.editor||(e.stopPropagation(),this.removeElement(),this.event=e,this.createElement(),this.updateEditor(),this.autoFocus(),this.delegateDocumentEvents(this.options.documentEvents))}onMouseDown(e){e.stopPropagation()}autoFocus(){setTimeout(()=>{this.editor&&(this.editor.focus(),this.selectText())})}selectText(){if(window.getSelection&&this.editor){const e=document.createRange(),n=window.getSelection();e.selectNodeContents(this.editor),n.removeAllRanges(),n.addRange(e)}}getCellText(){const{getText:e}=this.options;if(typeof e=="function")return Jn(e,this.cellView,{cell:this.cell,index:this.labelIndex});if(typeof e=="string"){if(this.cell.isNode())return this.cell.attr(e);if(this.cell.isEdge()&&this.labelIndex!==-1)return this.cell.prop(`labels/${this.labelIndex}/attrs/${e}`)}}setCellText(e){const n=this.options.setText;if(typeof n=="function"){Jn(n,this.cellView,{cell:this.cell,value:e,index:this.labelIndex,distance:this.distance});return}if(typeof n=="string"){if(this.cell.isNode()){e!==null&&this.cell.attr(n,e);return}if(this.cell.isEdge()){const r=this.cell;if(this.labelIndex===-1){if(e){const o={position:{distance:this.distance},attrs:{}};Lw(o,`attrs/${n}`,e),r.appendLabel(o)}}else e!==null?r.prop(`labels/${this.labelIndex}/attrs/${n}`,e):typeof this.labelIndex=="number"&&r.removeLabelAt(this.labelIndex)}}}onRemove(){const e=this.cellView;e&&e.off("cell:dblclick",this.dblClick),this.removeElement()}}(function(t){t.config({tagName:"div",isSVGElement:!1,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mouseup:"onDocumentMouseUp",touchend:"onDocumentMouseUp",touchcancel:"onDocumentMouseUp"}})})(Px||(Px={}));(function(t){t.NodeEditor=t.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},getText:"text/text",setText:"text/text"}),t.EdgeEditor=t.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},labelAddable:!0,getText:"label/text",setText:"label/text"})})(Px||(Px={}));var c0e=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n},Rx;(function(t){t.presets={boundary:B2,button:t0,"button-remove":t0.Remove,"no
534de-editor":Px.NodeEditor},t.registry=ks.create({type:"node tool",process(e,n){if(typeof n=="function")return n;let r=Js.ToolItem;const{inherit:o}=n,i=c0e(n,["inherit"]);if(o){const s=this.get(o);s==null?this.onNotFound(o,"inherited"):r=s}return i.name==null&&(i.name=e),r.define.call(r,i)}}),t.registry.register(t.presets,!0)})(Rx||(Rx={}));var Ox;(function(t){t.presets={boundary:B2,vertices:TP,segments:_P,button:t0,"button-remove":t0.Remove,"source-anchor":DLt,"target-anchor":LLt,"source-arrowhead":FLt,"target-arrowhead":BLt,"edge-editor":Px.EdgeEditor},t.registry=ks.create({type:"edge tool",process(e,n){if(typeof n=="function")return n;let r=Js.ToolItem;const{inherit:o}=n,i=c0e(n,["inherit"]);if(o){const s=this.get(o);s==null?this.onNotFound(o,"inherited"):r=s}return i.name==null&&(i.name=e),r.define.call(r,i)}}),t.registry.register(t.presets,!0)})(Ox||(Ox={}));const $Lt=Um("center"),HLt=Um("topCenter"),ULt=Um("bottomCenter"),zLt=Um("leftMiddle"),VLt=Um("rightMiddle"),GLt=Um("topLeft"),WLt=Um("topRight"),jLt=Um("bottomLeft"),qLt=Um("bottomRight");function Um(t){return function(e,n,r,o={}){const i=o.rotate?e.getUnrotatedBBoxOfElement(n):e.getBBoxOfElement(n),s=i[t];s.x+=yf(o.dx,i.width),s.y+=yf(o.dy,i.height);const a=e.cell;return o.rotate?s.rotate(-a.getAngle(),a.getBBox().getCenter()):s}}function UB(t){return function(e,n,r,o){if(r instanceof Element){const i=this.graph.findViewByElem(r);let s;if(i)if(i.isEdgeElement(r)){const a=o.fixedAt!=null?o.fixedAt:"50%";s=u0e(i,a)}else s=i.getBBoxOfElement(r).getCenter();else s=new De;return t.call(this,e,n,s,o)}return t.apply(this,arguments)}}function u0e(t,e){const n=wm(e),r=typeof e=="string"?parseFloat(e):e;return n?t.getPointAtRatio(r/100):t.getPointAtLength(r)}const YLt=function(t,e,n,r){const o=Zo.normalize(t.cell.getAngle()),i=t.getBBoxOfElement(e),s=i.getCenter(),a=i.getTopLeft(),l=i.getBottomRight();let c=r.padding;if(Number.isFinite(c)||(c=0),a.y+c<=n.y&&n.y<=l.y-c){const u=n.y-s.y;s.x+=o===0||o===180?0:u*1/Math.tan(Zo.toRad(o)),s.y+=u}else if(a.x+c<=n.x&&n.x<=l.x-c){const u=n.x-s.x;s.y+=o===90||o===270?0:u*Math.tan(Zo.toRad(o)),s.x+=u}return s},XLt=UB(YLt),KLt=function(t,e,n,r,o){const i=t.cell.getConnectionPoint(this.cell,o);return(r.dx||r.dy)&&i.translate(r.dx||0,r.dy||0),i},QLt=function(t,e,n,r){let o,i=0,s;const a=t.cell;r.rotate?(o=t.getUnrotatedBBoxOfElement(e),s=a.getBBox().getCenter(),i=a.getAngle()):o=t.getBBoxOfElement(e);const l=r.padding;l!=null&&Number.isFinite(l)&&o.inflate(l),r.rotate&&n.rotate(i,s);const c=o.getNearestSideToPoint(n);let u;switch(c){case"left":u=o.getLeftMiddle();break;case"right":u=o.getRightMiddle();break;case"top":u=o.getTopCenter();break;case"bottom":u=o.getBottomCenter();break}const d=r.direction;return d==="H"?(c==="top"||c==="bottom")&&(n.x<=o.x+o.width?u=o.getLeftMiddle():u=o.getRightMiddle()):d==="V"&&(n.y<=o.y+o.height?u=o.getTopCenter():u=o.getBottomCenter()),r.rotate?u.rotate(-i,s):u},ZLt=UB(QLt),JLt=Object.freeze(Object.defineProperty({__proto__:null,bottom:ULt,bottomLeft:jLt,bottomRight:qLt,center:$Lt,left:zLt,midSide:ZLt,nodeCenter:KLt,orth:XLt,right:VLt,top:HLt,topLeft:GLt,topRight:WLt},Symbol.toStringTag,{value:"Module"}));var Nx;(function(t){t.presets=JLt,t.registry=ks.create({type:"node endpoint"}),t.registry.register(t.presets,!0)})(Nx||(Nx={}));const e2t=function(t,e,n,r){let o=r.ratio!=null?r.ratio:.5;return o>1&&(o/=100),t.getPointAtRatio(o)},t2t=function(t,e,n,r){const o=r.length!=null?r.length:20;return t.getPointAtLength(o)},d0e=function(t,e,n,r){const o=t.getClosestPoint(n);return o??new De},n2t=UB(d0e),r2t=function(t,e,n,r){const i=t.getConnection(),s=t.getConnectionSubdivisions(),a=new fn(n.clone().translate(0,1e6),n.clone().translate(0,-1e6)),l=new fn(n.clone().translate(1e6,0),n.clone().translate(-1e6,0)),c=a.intersect(i,{segmentSubdivisions:s}),u=l.intersect(i,{segmentSubdivisions:s}),d=[];return c&&d.push(...c),u&&d.push(...u),d.length>0?n.closest(d):r.fallbackAt!=null?u0e(t,r.fallbackAt):Jn(d0e,this,t,e,n,r)},o2t=UB(r2t),i2t=Object.freeze(Object.defineProperty({__proto__:null,closest:n2t,length:t2t,orth:o2t,ratio:e2t},Symbol.toStringTag,{value:"Module"}));var Mx;(function(t){t.presets=i2t,t.registry=ks.create({type:"edge endpoint"}),t.registry.register(t.presets,!0)})(Mx||(Mx={}));function zB(t,e,n){let r;if(typeof n=="object"){if(Number.isFinite(n.y)){const i=new fn(e,t),{start:s,end:a}=i.parallel(n.y);e=s,t=a}r=n.x}else r=n;if(r==null||!Number.isFinite(r))return t;const o=t.distance(e);return r===0&&o>0?t:t.move(e,-Math.min(r,o-1))}function U2(t){const e=t.getAttribute("stroke-width");return e===null?0:parseFloat(e)||0}function s2t(t){if(t==null)return null;let e=t;do{let n=e.tagName;
534if(typeof n!="string")return null;if(n=n.toUpperCase(),n==="G")e=e.firstElementChild;else if(n==="TITLE")e=e.nextElementSibling;else break}while(e);return e}const h0e=function(t,e,n,r){const o=e.getBBoxOfElement(n);r.stroked&&o.inflate(U2(n)/2);const i=t.intersect(o),s=i&&i.length?t.start.closest(i):t.end;return zB(s,t.start,r.offset)},a2t=function(t,e,n,r,o){const i=e.cell,s=i.isNode()?i.getAngle():0;if(s===0)return Jn(h0e,this,t,e,n,r,o);const a=e.getUnrotatedBBoxOfElement(n);r.stroked&&a.inflate(U2(n)/2);const l=a.getCenter(),c=t.clone().rotate(s,l),u=c.setLength(1e6).intersect(a),d=u&&u.length?c.start.closest(u).rotate(-s,l):t.end;return zB(d,t.start,r.offset)},l2t=function(t,e,n,r){let o,i;const s=t.end,a=r.selector;if(typeof a=="string"?o=e.findOne(a):Array.isArray(a)?o=m8(n,a):o=s2t(n),!Zv(o)){if(o===n||!Zv(n))return s;o=n}const l=e.getShapeOfElement(o),c=e.getMatrixOfElement(o),u=e.getRootTranslatedMatrix(),d=e.getRootRotatedMatrix(),h=u.multiply(d).multiply(c),f=h.inverse(),p=No.transformLine(t,f),m=p.start.clone(),y=e.getDataOfElement(o);if(r.insideout===!1){y.shapeBBox==null&&(y.shapeBBox=l.bbox());const w=y.shapeBBox;if(w!=null&&w.containsPoint(m))return s}r.extrapolate===!0&&p.setLength(1e6);let v;if(Mn.isPath(l)){const w=r.precision||2;y.segmentSubdivisions==null&&(y.segmentSubdivisions=l.getSegmentSubdivisions({precision:w})),v={precision:w,segmentSubdivisions:y.segmentSubdivisions},i=p.intersect(l,v)}else i=p.intersect(l);i?Array.isArray(i)&&(i=m.closest(i)):r.sticky===!0&&(Gt.isRectangle(l)?i=l.getNearestPointToPoint(m):wf.isEllipse(l)?i=l.intersectsWithLineFromCenterToPoint(m):i=l.closestPoint(m,v));const b=i?No.transformPoint(i,h):s;let S=r.offset||0;return r.stroked!==!1&&(typeof S=="object"?(S=Object.assign({},S),S.x==null&&(S.x=0),S.x+=U2(o)/2):S+=U2(o)/2),zB(b,t.start,S)};function c2t(t,e,n=0){const{start:r,end:o}=t;let i,s,a,l;switch(e){case"left":l="x",i=o,s=r,a=-1;break;case"right":l="x",i=r,s=o,a=1;break;case"top":l="y",i=o,s=r,a=-1;break;case"bottom":l="y",i=r,s=o,a=1;break;default:return}r[l]<o[l]?i[l]=s[l]:s[l]=i[l],Number.isFinite(n)&&(i[l]+=a*n,s[l]+=a*n)}const u2t=function(t,e,n,r){const{alignOffset:o,align:i}=r;return i&&c2t(t,i,o),zB(t.end,t.start,r.offset)},d2t=Object.freeze(Object.defineProperty({__proto__:null,anchor:u2t,bbox:h0e,boundary:l2t,rect:a2t},Symbol.toStringTag,{value:"Module"}));var Dx;(function(t){t.presets=d2t,t.registry=ks.create({type:"connection point"}),t.registry.register(t.presets,!0)})(Dx||(Dx={}));const h2t=function(t){return[...t]},f2t=function(t,e,n){const r=e.side||"bottom",o=UC(e.padding||40),i=n.sourceBBox,s=n.targetBBox,a=i.getCenter(),l=s.getCenter();let c,u,d;switch(r){case"top":d=-1,c="y",u="height";break;case"left":d=-1,c="x",u="width";break;case"right":d=1,c="x",u="width";break;case"bottom":default:d=1,c="y",u="height";break}return a[c]+=d*(i[u]/2+o[r]),l[c]+=d*(s[u]/2+o[r]),d*(a[c]-l[c])>0?l[c]=a[c]:a[c]=l[c],[a.toJSON(),...t,l.toJSON()]};function dM(t){return new Gt(t.x,t.y,0,0)}function z2(t={}){const e=UC(t.padding||20);return{x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}function f0e(t,e={}){return t.sourceBBox.clone().moveAndExpand(z2(e))}function p0e(t,e={}){return t.targetBBox.clone().moveAndExpand(z2(e))}function p2t(t,e={}){return t.sourceAnchor?t.sourceAnchor:f0e(t,e).getCenter()}function g2t(t,e={}){return t.targetAnchor?t.targetAnchor:p0e(t,e).getCenter()}const g0e=function(t,e,n){let r=f0e(n,e),o=p0e(n,e);const i=p2t(n,e),s=g2t(n,e);r=r.union(dM(i)),o=o.union(dM(s));const a=t.map(u=>De.create(u));a.unshift(i),a.push(s);let l=null;const c=[];for(let u=0,d=a.length-1;u<d;u+=1){let h=null;const f=a[u],p=a[u+1],m=zd.getBearing(f,p)!=null;if(u===0)u+1===d?r.intersectsWithRect(o.clone().inflate(1))?h=zd.insideNode(f,p,r,o):m||(h=zd.nodeToNode(f,p,r,o)):r.containsPoint(p)?h=zd.insideNode(f,p,r,dM(p).moveAndExpand(z2(e))):m||(h=zd.nodeToVertex(f,p,r));else if(u+1===d){const y=m&&zd.getBearing(p,f)===l;o.containsPoint(f)||y?h=zd.insideNode(f,p,dM(f).moveAndExpand(z2(e)),o,l):m||(h=zd.vertexToNode(f,p,o,l))}else m||(h=zd.vertexToVertex(f,p,l));h?(c.push(...h.points),l=h.direction):l=zd.getBearing(f,p),u+1<d&&c.push(p)}return c};var zd;
534(function(t){const e={N:"S",S:"N",E:"W",W:"E"},n={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function r(d,h,f){let p=new De(d.x,h.y);return f.containsPoint(p)&&(p=new De(h.x,d.y)),p}function o(d,h){return d[h==="W"||h==="E"?"width":"height"]}t.getBBoxSize=o;function i(d,h){return d.x===h.x?d.y>h.y?"N":"S":d.y===h.y?d.x>h.x?"W":"E":null}t.getBearing=i;function s(d,h,f){const p=new De(d.x,h.y),m=new De(h.x,d.y),y=i(d,p),v=i(d,m),b=f?e[f]:null,S=y===f||y!==b&&(v===b||v!==f)?p:m;return{points:[S],direction:i(S,h)}}t.vertexToVertex=s;function a(d,h,f){const p=r(d,h,f);return{points:[p],direction:i(p,h)}}t.nodeToVertex=a;function l(d,h,f,p){const m=[new De(d.x,h.y),new De(h.x,d.y)],y=m.filter(S=>!f.containsPoint(S)),v=y.filter(S=>i(S,d)!==p);let b;if(v.length>0)return b=v.filter(S=>i(d,S)===p).pop(),b=b||v[0],{points:[b],direction:i(b,h)};{b=AOt(m,y)[0];const S=De.create(h).move(b,-o(f,p)/2);return{points:[r(S,d,f),S],direction:i(S,h)}}}t.vertexToNode=l;function c(d,h,f,p){let m=a(h,d,p);const y=m.points[0];if(f.containsPoint(y)){m=a(d,h,f);const v=m.points[0];if(p.containsPoint(v)){const b=De.create(d).move(v,-o(f,i(d,v))/2),S=De.create(h).move(y,-o(p,i(h,y))/2),w=new fn(b,S).getCenter(),A=a(d,w,f),_=s(w,h,A.direction);m.points=[A.points[0],_.points[0]],m.direction=_.direction}}return m}t.nodeToNode=c;function u(d,h,f,p,m){const y=f.union(p).inflate(1),v=y.getCenter(),b=v.distance(h)>v.distance(d),S=b?h:d,w=b?d:h;let A,_,P;m?(A=De.fromPolar(y.width+y.height,n[m],S),A=y.getNearestPointToPoint(A).move(A,-1)):A=y.getNearestPointToPoint(S).move(S,1),_=r(A,w,y);let R;A.round().equals(_.round())?(_=De.fromPolar(y.width+y.height,Zo.toRad(A.theta(S))+Math.PI/2,w),_=y.getNearestPointToPoint(_).move(w,1).round(),P=r(A,_,y),R=b?[_,P,A]:[A,P,_]):R=b?[_,A]:[A,_];const O=i(b?A:_,h);return{points:R,direction:O}}t.insideNode=u})(zd||(zd={}));const m2t={step:10,maxLoopCount:2e3,precision:1,maxDirectionChange:90,perpendicular:!0,excludeTerminals:[],excludeNodes:[],excludeShapes:[],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost(){return Xy(this.step,this)},directions(){const t=Xy(this.step,this),e=Xy(this.cost,this);return[{cost:e,offsetX:t,offsetY:0},{cost:e,offsetX:-t,offsetY:0},{cost:e,offsetX:0,offsetY:t},{cost:e,offsetX:0,offsetY:-t}]},penalties(){const t=Xy(this.step,this);return{0:0,45:t/2,90:t/2}},paddingBox(){const t=Xy(this.step,this);return{x:-t,y:-t,width:2*t,height:2*t}},fallbackRouter:g0e,draggingRouter:null,snapToGrid:!0};function Xy(t,e){return typeof t=="function"?t.call(e):t}function y2t(t){const e=Object.keys(t).reduce((n,r)=>{const o=n;return r==="fallbackRouter"||r==="draggingRouter"||r==="fallbackRoute"?o[r]=t[r]:o[r]=Xy(t[r],t),n},{});if(e.padding){const n=UC(e.padding);e.paddingBox={x:-n.left,y:-n.top,width:n.left+n.right,height:n.top+n.bottom}}return e.directions.forEach(n=>{const r=new De(0,0),o=new De(n.offsetX,n.offsetY);n.angle=Zo.normalize(r.theta(o))}),e}const Wte=1,jte=2;class v2t{constructor(){this.items=[],this.hash={},this.values={}}add(e,n){this.hash[e]?this.items.splice(this.items.indexOf(e),1):this.hash[e]=Wte,this.values[e]=n;const r=oNt(this.items,e,o=>this.values[o]);this.items.splice(r,0,e)}pop(){const e=this.items.shift();return e&&(this.hash[e]=jte),e}isOpen(e){return this.hash[e]===Wte}isClose(e){return this.hash[e]===jte}isEmpty(){return this.items.length===0}}class b2t{constructor(e){this.options=e,this.mapGridSize=100,this.map={}}build(e,n){const r=this.options,o=r.excludeTerminals.reduce((c,u)=>{const d=n[u];if(d){const h=e.getCell(d.cell);h&&c.push(h)}return c},[]);let i=[];const s=e.getCell(n.getSourceCellId());s&&(i=Tte(i,s.getAncestors().map(c=>c.id)));const a=e.getCell(n.getTargetCellId());a&&(i=Tte(i,a.getAncestors().map(c=>c.id)));const l=this.mapGridSize;return e.getNodes().reduce((c,u)=>{const d=o.some(y=>y.id===u.id),h=u.shape?r.excludeShapes.includes(u.shape):!1,f=r.excludeNodes.some(y=>typeof y=="string"?u.id===y:y===u),p=i.includes(u.id),m=h||d||f||p;if(u.isVisible()&&!m){const y=u.getBBox().moveAndExpand(r.paddingBox),v=y.getOrigin().snapToGri
534d(l),b=y.getCorner().snapToGrid(l);for(let S=v.x;S<=b.x;S+=l)for(let w=v.y;w<=b.y;w+=l){const A=new De(S,w).toString();c[A]==null&&(c[A]=[]),c[A].push(y)}}return c},this.map),this}isAccessible(e){const n=e.clone().snapToGrid(this.mapGridSize).toString(),r=this.map[n];return r?r.every(o=>!o.containsPoint(e)):!0}}function m0e(t,e){const n=t.sourceBBox.clone();return e&&e.paddingBox?n.moveAndExpand(e.paddingBox):n}function y0e(t,e){const n=t.targetBBox.clone();return e&&e.paddingBox?n.moveAndExpand(e.paddingBox):n}function v0e(t,e){return t.sourceAnchor?t.sourceAnchor:m0e(t,e).getCenter()}function C2t(t,e){return t.targetAnchor?t.targetAnchor:y0e(t,e).getCenter()}function sU(t,e,n,r,o){const i=360/n,s=t.theta(S2t(t,e,r,o)),a=Zo.normalize(s+i/2);return i*Math.floor(a/i)}function S2t(t,e,n,r){const o=r.step,i=e.x-t.x,s=e.y-t.y,a=i/n.x,l=s/n.y,c=a*o,u=l*o;return new De(t.x+c,t.y+u)}function qte(t,e){const n=Math.abs(t-e);return n>180?360-n:n}function E2t(t,e){const n=e.step;return e.directions.forEach(r=>{r.gridOffsetX=r.offsetX/n*t.x,r.gridOffsetY=r.offsetY/n*t.y}),e.directions}function x2t(t,e,n){return{source:e.clone(),x:Yte(n.x-e.x,t),y:Yte(n.y-e.y,t)}}function Yte(t,e){if(!t)return e;const n=Math.abs(t),r=Math.round(n/e);if(!r)return n;const o=r*e,s=(n-o)/r;return e+s}function w2t(t,e){const n=e.source,r=Ko.snapToGrid(t.x-n.x,e.x)+n.x,o=Ko.snapToGrid(t.y-n.y,e.y)+n.y;return new De(r,o)}function a_(t,e){return t.round(e)}function bD(t,e,n){return a_(w2t(t.clone(),e),n)}function tI(t){return t.toString()}function aU(t){return new De(t.x===0?0:Math.abs(t.x)/t.x,t.y===0?0:Math.abs(t.y)/t.y)}function Xte(t,e){let n=1/0;for(let r=0,o=e.length;r<o;r+=1){const i=t.manhattanDistance(e[r]);i<n&&(n=i)}return n}function Kte(t,e,n,r,o){const i=o.precision,s=o.directionMap,a=t.diff(e.getCenter()),l=Object.keys(s).reduce((c,u)=>{if(n.includes(u)){const d=s[u],h=new De(t.x+d.x*(Math.abs(a.x)+e.width),t.y+d.y*(Math.abs(a.y)+e.height)),p=new fn(t,h).intersect(e)||[];let m,y=null;for(let v=0;v<p.length;v+=1){const b=p[v],S=t.squaredDistance(b);(m==null||S>m)&&(m=S,y=b)}if(y){let v=bD(y,r,i);e.containsPoint(v)&&(v=bD(v.translate(d.x*r.x,d.y*r.y),r,i)),c.push(v)}}return c},[]);return e.containsPoint(t)||l.push(bD(t,r,i)),l}function A2t(t,e,n,r,o){const i=[];let s=aU(o.diff(n)),a=tI(n),l=t[a],c;for(;l;){c=e[a];const h=aU(c.diff(l));h.equals(s)||(i.unshift(c),s=h),a=tI(l),l=t[a]}const u=e[a];return aU(u.diff(r)).equals(s)||i.unshift(u),i}function T2t(t,e,n,r,o){const i=o.precision;let s,a;Gt.isRectangle(e)?s=a_(v0e(t,o).clone(),i):s=a_(e.clone(),i),Gt.isRectangle(n)?a=a_(C2t(t,o).clone(),i):a=a_(n.clone(),i);const l=x2t(o.step,s,a),c=s,u=a;let d,h;if(Gt.isRectangle(e)?d=Kte(c,e,o.startDirections,l,o):d=[c],Gt.isRectangle(n)?h=Kte(a,n,o.endDirections,l,o):h=[u],d=d.filter(f=>r.isAccessible(f)),h=h.filter(f=>r.isAccessible(f)),d.length>0&&h.length>0){const f=new v2t,p={},m={},y={};for(let N=0,M=d.length;N<M;N+=1){const L=d[N],F=tI(L);f.add(F,Xte(L,h)),p[F]=L,y[F]=0}const v=o.previousDirectionAngle,b=v===void 0;let S,w;const A=E2t(l,o),_=A.length,P=h.reduce((N,M)=>{const L=tI(M);return N.push(L),N},[]),R=De.equalPoints(d,h);let O=o.maxLoopCount;for(;!f.isEmpty()&&O>0;){const N=f.pop(),M=p[N],L=m[N],F=y[N],$=M.equals(c),D=L==null;let k;if(D?b?$?k=null:k=sU(c,M,_,l,o):k=v:k=sU(L,M,_,l,o),!(D&&R)&&P.indexOf(N)>=0)return o.previousDirectionAngle=k,A2t(m,p,M,c,u);for(let H=0;H<_;H+=1){S=A[H];const V=S.angle;if(w=qte(k,V),!(b&&$)&&w>o.maxDirectionChange)continue;const q=bD(M.clone().translate(S.gridOffsetX||0,S.gridOffsetY||0),l,i),J=tI(q);if(f.isClose(J)||!r.isAccessible(q))continue;if(P.indexOf(J)>=0&&!q.equals(u)){const ee=sU(q,u,_,l,o);if(qte(V,ee)>o.maxDirectionChange)continue}const Q=S.cost,se=$?0:o.penalties[w],oe=F+Q+se;(!f.isOpen(J)||oe<y[J])&&(p[J]=q,m[J]=M,y[J]=oe,f.add(J,oe+Xte(q,h)))}O-=1}}return o.fallbackRoute?Jn(o.fallbackRoute,this,c,u,o):null}function _2t(t,e=10){if(t.length<=1)return t;for(let n=0,r=t.length;n<r-1;n+=1){const o=t[n],i=t[n+1];if(o.x===i.x){const s=e*Math.round(o.x/e);o.x!==s&&(o.x=s,i.x=s)}else if(o.y===i.y){const s=e*Math.round(o.y/e);o.y!==s&&(o.y=s,i.y=s)}}return t}const I2t=function(t,e,n){const r=y2t(e),o=m0e(n,r),i=y0e(n,r),s=v0e(n,r),a=new b2t(r).build(n.graph.model,n.cell),l=t.map(f=>De.create(f)),c=[];let u=s,d,h;for(let f=0,p=l.length;f<=p;f+=1){let m=null;if(d=h||o,h=l[f],h==null){h=i;const v=n.cell;if((v.getSourceCellId()==null||v.getTargetCellId()==null)&&typeof r.draggingRouter=="function"){const S=d===o?s:d,w=h.getOrigin();m=Jn(r.draggingRouter,n,S,w,r)}}if(m==null&&(m=T2t(n,d,h,a,r)),m===null)return console.warn("Unable to execute manhattan algorithm, use orth instead"),Jn(r.fallbackRouter,this,t,r,n);const y=m[0];
534y&&y.equals(u)&&m.shift(),u=m[m.length-1]||u,c.push(...m)}return r.snapToGrid?_2t(c,n.graph.grid.getGridSize()):c},b0e=function(t,e,n){return Jn(I2t,this,t,Object.assign(Object.assign({},m2t),e),n)},P2t={maxDirectionChange:45,directions(){const t=Xy(this.step,this),e=Xy(this.cost,this),n=Math.ceil(Math.sqrt(t*t<<1));return[{cost:e,offsetX:t,offsetY:0},{cost:n,offsetX:t,offsetY:t},{cost:e,offsetX:0,offsetY:t},{cost:n,offsetX:-t,offsetY:t},{cost:e,offsetX:-t,offsetY:0},{cost:n,offsetX:-t,offsetY:-t},{cost:e,offsetX:0,offsetY:-t},{cost:n,offsetX:t,offsetY:-t}]},fallbackRoute(t,e,n){const r=t.theta(e),o=[];let i={x:e.x,y:t.y},s={x:t.x,y:e.y};if(r%180>90){const S=i;i=s,s=S}const a=r%90<45?i:s,l=new fn(t,a),c=90*Math.ceil(r/90),u=De.fromPolar(l.squaredLength(),Zo.toRad(c+135),a),d=new fn(e,u),h=l.intersectsWithLine(d),f=h||e,p=h?f:t,m=360/n.directions.length,y=p.theta(e),v=Zo.normalize(y+m/2),b=m*Math.floor(v/m);return n.previousDirectionAngle=b,f&&o.push(f.round()),o.push(e),o}},R2t=function(t,e,n){return Jn(b0e,this,t,Object.assign(Object.assign({},P2t),e),n)},O2t=function(t,e,n){const r=e.offset||32,o=e.min==null?16:e.min;let i=0,s=e.direction;const a=n.sourceBBox,l=n.targetBBox,c=a.getCenter(),u=l.getCenter();if(typeof r=="number"&&(i=r),s==null){let v=l.left-a.right,b=l.top-a.bottom;v>=0&&b>=0?s=v>=b?"L":"T":v<=0&&b>=0?(v=a.left-l.right,v>=0?s=v>=b?"R":"T":s="T"):v>=0&&b<=0?(b=a.top-l.bottom,b>=0?s=v>=b?"L":"B":s="L"):(v=a.left-l.right,b=a.top-l.bottom,v>=0&&b>=0?s=v>=b?"R":"B":v<=0&&b>=0?s="B":v>=0&&b<=0?s="R":s=Math.abs(v)>Math.abs(b)?"R":"B")}s==="H"?s=u.x-c.x>=0?"L":"R":s==="V"&&(s=u.y-c.y>=0?"T":"B"),r==="center"&&(s==="L"?i=(l.left-a.right)/2:s==="R"?i=(a.left-l.right)/2:s==="T"?i=(l.top-a.bottom)/2:s==="B"&&(i=(a.top-l.bottom)/2));let d,h,f;const p=s==="L"||s==="R";if(p){if(u.y===c.y)return[...t];f=s==="L"?1:-1,d="x",h="width"}else{if(u.x===c.x)return[...t];f=s==="T"?1:-1,d="y",h="height"}const m=c.clone(),y=u.clone();if(m[d]+=f*(a[h]/2+i),y[d]-=f*(l[h]/2+i),p){const v=m.x,b=y.x,S=a.width/2+o,w=l.width/2+o;u.x>c.x?b<=v&&(m.x=Math.max(b,c.x+S),y.x=Math.min(v,u.x-w)):b>=v&&(m.x=Math.min(b,c.x-S),y.x=Math.max(v,u.x+w))}else{const v=m.y,b=y.y,S=a.height/2+o,w=l.height/2+o;u.y>c.y?b<=v&&(m.y=Math.max(b,c.y+S),y.y=Math.min(v,u.y-w)):b>=v&&(m.y=Math.min(b,c.y-S),y.y=Math.max(v,u.y+w))}return[m.toJSON(),...t,y.toJSON()]};function EE(t,e){if(e!=null&&e!==!1){const n=typeof e=="boolean"?0:e;if(n>0){const r=De.create(t[1]).move(t[2],n),o=De.create(t[1]).move(t[0],n);return[r.toJSON(),...t,o.toJSON()]}{const r=t[1];return[Object.assign({},r),...t,Object.assign({},r)]}}return t}const N2t=function(t,e,n){const r=e.width||50,i=(e.height||80)/2,s=e.angle||"auto",a=n.sourceAnchor,l=n.targetAnchor,c=n.sourceBBox,u=n.targetBBox;if(a.equals(l)){const d=v=>{const b=Zo.toRad(v),S=Math.sin(b),w=Math.cos(b),A=new De(a.x+w*r,a.y+S*r),_=new De(A.x-w*i,A.y-S*i),P=_.clone().rotate(-90,A),R=_.clone().rotate(90,A);return[P.toJSON(),A.toJSON(),R.toJSON()]},h=v=>{const b=a.clone().move(v,-1),S=new fn(b,v);return!c.containsPoint(v)&&!c.intersectsWithLine(S)},f=[0,90,180,270,45,135,225,315];if(typeof s=="number")return EE(d(s),e.merge);const p=c.getCenter();if(p.equals(a))return EE(d(0),e.merge);const m=p.angleBetween(a,p.clone().translate(1,0));let y=d(m);if(h(y[1]))return EE(y,e.merge);for(let v=1,b=f.length;v<b;v+=1)if(y=d(m+f[v]),h(y[1]))return EE(y,e.merge);return EE(y,e.merge)}{const d=new fn(a,l);let h=d.parallel(-r),f=h.getCenter(),p=h.start.clone().move(h.end,i),m=h.end.clone().move(h.start,i);const y=d.parallel(-1),v=new fn(y.start,f),b=new fn(y.end,f);if((c.containsPoint(f)||u.containsPoint(f)||c.intersectsWithLine(v)||c.intersectsWithLine(b)||u.intersectsWithLine(v)||u.intersectsWithLine(b))&&(h=d.parallel(r),f=h.getCenter(),p=h.start.clone().move(h.end,i),m=h.end.clone().move(h.start,i)),e.merge){const S=new fn(a,l),w=new fn(f,S.center).setLength(Number.MAX_SAFE_INTEGER),A=c.intersectsWithLine(w),_=u.intersectsWithLine(w),P=A?Array.isArray(A)?A:[A]:[];_&&(Array.isArray(_)?P.push(..._):P.push(_));const R=S.center.closest(P);R?(n.sourceAnchor=R.clone(),n.targetAnchor=R.clone()):(n.sourceAnchor=S.center.clone(),n.targetAnchor=S.center.clone())}return EE([p.toJSON(),f.toJSON(),m.toJSON()],e.merge)}},M2t=Object.freeze(Object.defineProperty({__proto__:null,er:O2t,loop:N2t,manhattan:b0e,metro:R2t,normal:h2t,oneSide:f2t,orth:g0e},Symbol.toStringTag,{value:"Module"}));var em;(function(t){t.presets=M2t,t.registry=ks.create({type:"router"}),t.registry.register(t.presets,!0)})(em||(em={}));const D2t=function(t,e,n,r={}){const o=[t,...n,e],i=new Ms(o),s=new Mn(i);return r.raw?s:s.serialize()},L2t=function(t,e,n,r={}){const o=n.length===3?0:1,i=De.create(n[0+o]),s=De.create(n[2+o]),a=De.create(n[1+o]);if(!De.equals(t,e)){const c=new De((t.x+e.x)/2,(t.y+e.y)/2),u=c.angleBetween(De.create(t).rotate(90,c),a);u>1&&(i.rotate(180-u,c),s.rotate(180-u,c),a.rotate(180-u,c))}const l=` 535 M ${t.x} ${t.y} 536 Q ${i.x} ${i.y} ${a.x} ${a.y} 537 Q ${s.x} ${s.y} ${e.x} ${e.y} 538 `;return r.raw?Mn.parse(l):l},k2t=function(t,e,n,r={}){const o=new Mn;o.appendSegment(Mn.createSegment("M",t));const i=1/3,s=2/3,a=r.radius||10;let l,c;for(let u=0,d=n.length;u<d;u+=1){const h=De.create(n[u]),f=n[u-1]||t,p=n[u+1]||e;l=c||h.distance(f)/2,c=h.distance(p)/2;
538const m=-Math.min(a,l),y=-Math.min(a,c),v=h.clone().move(f,m).round(),b=h.clone().move(p,y).round(),S=new De(i*v.x+s*h.x,s*h.y+i*v.y),w=new De(i*b.x+s*h.x,s*h.y+i*b.y);o.appendSegment(Mn.createSegment("L",v)),o.appendSegment(Mn.createSegment("C",S,w,b))}return o.appendSegment(Mn.createSegment("L",e)),r.raw?o:o.serialize()},F2t=function(t,e,n,r={}){let o,i=r.direction;if(n&&n.length!==0){const s=[t,...n,e],a=vs.throughPoints(s);o=new Mn(a)}else if(o=new Mn,o.appendSegment(Mn.createSegment("M",t)),i||(i=Math.abs(t.x-e.x)>=Math.abs(t.y-e.y)?"H":"V"),i==="H"){const s=(t.x+e.x)/2;o.appendSegment(Mn.createSegment("C",s,t.y,s,e.y,e.x,e.y))}else{const s=(t.y+e.y)/2;o.appendSegment(Mn.createSegment("C",t.x,s,e.x,s,e.x,e.y))}return r.raw?o:o.serialize()},Qte=1,hM=1/3,fM=2/3;function B2t(t){let e=t.graph._jumpOverUpdateList;if(e==null&&(e=t.graph._jumpOverUpdateList=[],t.graph.on("cell:mouseup",()=>{const n=t.graph._jumpOverUpdateList;setTimeout(()=>{for(let r=0;r<n.length;r+=1)n[r].update()})}),t.graph.on("model:reseted",()=>{e=t.graph._jumpOverUpdateList=[]})),e.indexOf(t)<0){e.push(t);const n=()=>e.splice(e.indexOf(t),1);t.cell.once("change:connector",n),t.cell.once("removed",n)}}function lU(t,e,n=[]){const r=[t,...n,e],o=[];return r.forEach((i,s)=>{const a=r[s+1];a!=null&&o.push(new fn(i,a))}),o}function $2t(t,e){const n=[];return e.forEach(r=>{const o=t.intersectsWithLine(r);o&&n.push(o)}),n}function Zte(t,e){return new fn(t,e).squaredLength()}function H2t(t,e,n){return e.reduce((r,o,i)=>{if(V2.includes(o))return r;const s=r.pop()||t,a=De.create(o).move(s.start,-n);let l=De.create(o).move(s.start,+n);const c=e[i+1];if(c!=null){const h=l.distance(c);h<=n&&(l=c.move(s.start,h),V2.push(c))}else if(a.distance(s.end)<n*2+Qte)return r.push(s),r;if(l.distance(s.start)<n*2+Qte)return r.push(s),r;const d=new fn(a,l);return IP.push(d),r.push(new fn(s.start,a),d,new fn(l,s.end)),r},[])}function Jte(t,e,n,r){const o=new Mn;let i;return i=Mn.createSegment("M",t[0].start),o.appendSegment(i),t.forEach((s,a)=>
538{if(IP.includes(s)){let l,c,u,d;if(n==="arc"){l=-90,c=s.start.diff(s.end),(c.x<0||c.x===0&&c.y<0)&&(l+=180);const f=s.getCenter(),p=new fn(f,s.end).rotate(l,f);let m;m=new fn(s.start,f),u=m.pointAt(2/3).rotate(l,s.start),d=p.pointAt(1/3).rotate(-l,p.end),i=Mn.createSegment("C",u,d,p.end),o.appendSegment(i),m=new fn(f,s.end),u=p.pointAt(1/3).rotate(l,p.end),d=m.pointAt(1/3).rotate(-l,s.end),i=Mn.createSegment("C",u,d,s.end),o.appendSegment(i)}else if(n==="gap")i=Mn.createSegment("M",s.end),o.appendSegment(i);else if(n==="cubic"){l=s.start.theta(s.end);const h=e*.6;let f=e*1.35;c=s.start.diff(s.end),(c.x<0||c.x===0&&c.y<0)&&(f*=-1),u=new De(s.start.x+h,s.start.y+f).rotate(l,s.start),d=new De(s.end.x-h,s.end.y+f).rotate(l,s.end),i=Mn.createSegment("C",u,d,s.end),o.appendSegment(i)}}else{const l=t[a+1];r===0||!l||IP.includes(l)?(i=Mn.createSegment("L",s.end),o.appendSegment(i)):U2t(r,o,s.end,s.start,l.end)}}),o}function U2t(t,e,n,r,o){const i=n.distance(r)/2,s=n.distance(o)/2,a=-Math.min(t,i),l=-Math.min(t,s),c=n.clone().move(r,a).round(),u=n.clone().move(o,l).round(),d=new De(hM*c.x+fM*n.x,fM*n.y+hM*c.y),h=new De(hM*u.x+fM*n.x,fM*n.y+hM*u.y);let f;f=Mn.createSegment("L",c),e.appendSegment(f),f=Mn.createSegment("C",d,h,u),e.appendSegment(f)}let IP,V2;const z2t=function(t,e,n,r={}){IP=[],V2=[],B2t(this);const o=r.size||5,i=r.type||"arc",s=r.radius||0,a=r.ignoreConnectors||["smooth"],l=this.graph,u=l.model.getEdges();if(u.length===1)return Jte(lU(t,e,n),o,i,s);const d=this.cell,h=u.indexOf(d),f=l.options.connecting.connector||{},p=u.filter((w,A)=>{const _=w.getConnector()||f;return a.includes(_.name)?!1:A>h?_.name!=="jumpover":!0}),m=p.map(w=>l.findViewByCell(w)),y=lU(t,e,n),v=m.map(w=>w==null?[]:w===this?y:lU(w.sourcePoint,w.targetPoint,w.routePoints)),b=[];y.forEach(w=>{const A=p.reduce((_,P,R)=>{if(P!==d){const O=$2t(w,v[R]);_.push(...O)}return _},[]).sort((_,P)=>Zte(w.start,_)-Zte(w.start,P));A.length>0?b.push(...H2t(w,A,o)):b.push(w)});const S=Jte(b,o,i,s);return IP=[],V2=[],r.raw?S:S.serialize()},V2t=Object.freeze(Object.defineProperty({__proto__:null,jumpover:z2t,loop:L2t,normal:D2t,rounded:k2t,smooth:F2t},Symbol.toStringTag,{value:"Module"}));var cC;(function(t){t.presets=V2t,t.registry=ks.create({type:"connector"}),t.registry.register(t.presets,!0)})(cC||(cC={}));var G2t=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class C0e extends cd{constructor(e={}){super(),this.pending=!1,this.changing=!1,this.data={},this.mutate(bs(e)),this.changed={}}mutate(e,n={}){const r=n.unset===!0,o=n.silent===!0,i=[],s=this.changing;this.changing=!0,s||(this.previous=bs(this.data),this.changed={});const a=this.data,l=this.previous,c=this.changed;if(Object.keys(e).forEach(u=>{const d=u,h=e[d];lm(a[d],h)||i.push(d),lm(l[d],h)?delete c[d]:c[d]=h,r?delete a[d]:a[d]=h}),!o&&i.length>0&&(this.pending=!0,this.pendingOptions=n,i.forEach(u=>{this.emit("change:*",{key:u,options:n,store:this,current:a[u],previous:l[u]})})),s)return this;if(!o)for(;this.pending;)this.pending=!1,this.emit("changed",{current:a,previous:l,store:this,options:this.pendingOptions});return this.pending=!1,this.changing=!1,this.pendingOptions=null,this}get(e,n){if(e==null)return this.data;const r=this.data[e];return r??n}getPrevious(e){if(this.previous){const n=this.previous[e];return n??void 0}}set(e,n,r){return e!=null&&(typeof e=="object"?this.mutate(e,n):this.mutate({[e]:n},r)),this}remove(e,n){const o={};let i;if(typeof e=="string")o[e]=void 0,i=n;else if(Array.isArray(e))e.forEach(s=>o[s]=void 0),i=n;else{for(const s in this.data)o[s]=void 0;i=e}return this.mutate(o,Object.assign(Object.assign({},i),{unset:!0})),this}getByPath(e){return m8(this.data,e,"/")}setByPath(e,n,r={}){const o="/",i=Array.isArray(e)?[...e]:e.split(o),s=Array.isArray(e)?e.join(o):e,a=i[0],l=i.length;if(r.propertyPath=s,r.propertyValue=n,r.propertyPathArray=i,l===1)this.set(a,n,r);else{const c={};let u=c,d=a;for(let p=1;p<l;p+=1){const m=i[p],y=Number.isFinite(Number(m));u=u[d]=y?[]:{},d=m}Lw(c,i,n,o);const h=bs(this.data);r.rewrite&&Pte(h,e,o);const f=Ks(h,c);this.set(a,f[a],r)}return this}removeByPath(e,n){const r=Array.isArray(e)?e:e.split("/"),o=r[0];if(r.length===1)this.remove(o,n);else{const i=r.slice(1),s=bs(this.get(o));s&&Pte(s,i),this.set(o,s,n)}return this}
538hasChanged(e){return e==null?Object.keys(this.changed).length>0:e in this.changed}getChanges(e){if(e==null)return this.hasChanged()?bs(this.changed):null;const n=this.changing?this.previous:this.data,r={};let o;for(const i in e){const s=e[i];lm(n[i],s)||(r[i]=s,o=!0)}return o?bs(r):null}toJSON(){return bs(this.data)}clone(){const e=this.constructor;return new e(this.data)}dispose(){this.off(),this.data={},this.previous={},this.changed={},this.pending=!1,this.changing=!1,this.pendingOptions=null,this.trigger("disposed",{store:this})}}G2t([cd.dispose()],C0e.prototype,"dispose",null);class PP{constructor(e){this.cell=e,this.ids={},this.cache={}}get(){return Object.keys(this.ids)}start(e,n,r={},o="/"){const i=this.cell.getPropByPath(e),s=mOt(r,PP.defaultOptions),a=this.getTiming(s.timing),l=this.getInterp(s.interp,i,n);let c=0;const u=Array.isArray(e)?e.join(o):e,d=Array.isArray(e)?e:e.split(o),h=()=>{const f=new Date().getTime();c===0&&(c=f);let m=(f-c)/s.duration;m<1?this.ids[u]=requestAnimationFrame(h):m=1;const y=l(a(m));this.cell.setPropByPath(d,y),r.progress&&r.progress(Object.assign({progress:m,currentValue:y},this.getArgs(u))),m===1&&(this.cell.notify("transition:complete",this.getArgs(u)),r.complete&&r.complete(this.getArgs(u)),this.cell.notify("transition:finish",this.getArgs(u)),r.finish&&r.finish(this.getArgs(u)),this.clean(u))};return setTimeout(()=>{this.stop(e,void 0,o),this.cache[u]={startValue:i,targetValue:n,options:s},this.ids[u]=requestAnimationFrame(h),this.cell.notify("transition:start",this.getArgs(u)),r.start&&r.start(this.getArgs(u))},r.delay),this.stop.bind(this,e,o,r)}stop(e,n={},r="/"){const o=Array.isArray(e)?e:e.split(r);return Object.keys(this.ids).filter(i=>lm(o,i.split(r).slice(0,o.length))).forEach(i=>{cancelAnimationFrame(this.ids[i]);const s=this.cache[i],a=this.getArgs(i),l=Object.assign(Object.assign({},s.options),n),c=l.jumpedToEnd;c&&s.targetValue!=null&&(this.cell.setPropByPath(i,s.targetValue),this.cell.notify("transition:end",Object.assign({},a)),this.cell.notify("transition:complete",Object.assign({},a)),l.complete&&l.complete(Object.assign({},a)));const u=Object.assign({jumpedToEnd:c},a);this.cell.notify("transition:stop",Object.assign({},u)),l.stop&&l.stop(Object.assign({},u)),this.cell.notify("transition:finish",Object.assign({},a)),l.finish&&l.finish(Object.assign({},a)),this.clean(i)}),this}clean(e){delete this.ids[e],delete this.cache[e]}getTiming(e){return typeof e=="string"?VC[e]:e}getInterp(e,n,r){return e?e(n,r):typeof r=="number"?Xb.number(n,r):typeof r=="string"?r[0]==="#"?Xb.color(n,r):Xb.unit(n,r):Xb.object(n,r)}getArgs(e){const n=this.cache[e];return{path:e,startValue:n.startValue,targetValue:n.targetValue,cell:this.cell}}}(function(t){t.defaultOptions={delay:10,duration:100,timing:"linear"}})(PP||(PP={}));var W2t=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},S0e=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class Ur extends cd{static config(e){const{markup:n,propHooks:r,attrHooks:o}=e,i=S0e(e,["markup","propHooks","attrHooks"]);n!=null&&(this.markup=n),r&&(this.propHooks=this.propHooks.slice(),Array.isArray(r)?this.propHooks.push(...r):typeof r=="function"?this.propHooks.push(r):Object.values(r).forEach(s=>{typeof s=="function"&&this.propHooks.push(s)})),o&&(this.attrHooks=Object.assign(Object.assign({},this.attrHooks),o)),this.defaults=Ks({},this.defaults,i)}static getMarkup(){return this.markup}static getDefaults(e){return e?this.defaults:bs(this.defaults)}static getAttrHooks(){return this.attrHooks}static applyPropHooks(e,n){return this.propHooks.reduce((r,o)=>o?Jn(o,e,r):r,n)}get[Symbol.toStringTag](){return Ur.toStringTag}constructor(e={}){super();const r=this.constructor.getDefaults(!0),o=Ks({},this.preprocess(r),this.preprocess(e));this.id=o.id||N2(),this.store=new C0e(o),this.animation=new PP(this),this.setup(),this.init(),this.postprocess(e)}init(){}get model(){return this._model}set model(e){this._model!==e&&(this._model=e)}preprocess(e,n){const r=e.id,i=this.constructor.applyPropHooks(this,e);return r==null&&n!==!0&&(i.id=N2()),i}postprocess(e){}setup(){this.store.on("change:*",e=>{const{key:n,current:r,previous:o,options:i}=e;
538this.notify("change:*",{key:n,options:i,current:r,previous:o,cell:this}),this.notify(`change:${n}`,{options:i,current:r,previous:o,cell:this});const s=n;(s==="source"||s==="target")&&this.notify("change:terminal",{type:s,current:r,previous:o,options:i,cell:this})}),this.store.on("changed",({options:e})=>this.notify("changed",{options:e,cell:this}))}notify(e,n){this.trigger(e,n);const r=this.model;return r&&(r.notify(`cell:${e}`,n),this.isNode()?r.notify(`node:${e}`,Object.assign(Object.assign({},n),{node:this})):this.isEdge()&&r.notify(`edge:${e}`,Object.assign(Object.assign({},n),{edge:this}))),this}isNode(){return!1}isEdge(){return!1}isSameStore(e){return this.store===e.store}get view(){return this.store.get("view")}get shape(){return this.store.get("shape","")}getProp(e,n){return e==null?this.store.get():this.store.get(e,n)}setProp(e,n,r){if(typeof e=="string")this.store.set(e,n,r);else{const o=this.preprocess(e,!0);this.store.set(Ks({},this.getProp(),o),n),this.postprocess(e)}return this}removeProp(e,n){return typeof e=="string"||Array.isArray(e)?this.store.removeByPath(e,n):this.store.remove(n),this}hasChanged(e){return e==null?this.store.hasChanged():this.store.hasChanged(e)}getPropByPath(e){return this.store.getByPath(e)}setPropByPath(e,n,r={}){return this.model&&(e==="children"?this._children=n?n.map(o=>this.model.getCell(o)).filter(o=>o!=null):null:e==="parent"&&(this._parent=n?this.model.getCell(n):null)),this.store.setByPath(e,n,r),this}removePropByPath(e,n={}){const r=Array.isArray(e)?e:e.split("/");return r[0]==="attrs"&&(n.dirty=!0),this.store.removeByPath(r,n),this}prop(e,n,r){return e==null?this.getProp():typeof e=="string"||Array.isArray(e)?arguments.length===1?this.getPropByPath(e):n==null?this.removePropByPath(e,r||{}):this.setPropByPath(e,n,r||{}):this.setProp(e,n||{})}previous(e){return this.store.getPrevious(e)}get zIndex(){return this.getZIndex()}set zIndex(e){e==null?this.removeZIndex():this.setZIndex(e)}getZIndex(){return this.store.get("zIndex")}setZIndex(e,n={}){return this.store.set("zIndex",e,n),this}removeZIndex(e={}){return this.store.remove("zIndex",e),this}toFront(e={}){const n=this.model;if(n){let r=n.getMaxZIndex(),o;e.deep?(o=this.getDescendants({deep:!0,breadthFirst:!0}),o.unshift(this)):o=[this],r=r-o.length+1;const i=n.total();let s=n.indexOf(this)!==i-o.length;s||(s=o.some((a,l)=>a.getZIndex()!==r+l)),s&&this.batchUpdate("to-front",()=>{r+=o.length,o.forEach((a,l)=>{a.setZIndex(r+l,e)})})}return this}toBack(e={}){const n=this.model;if(n){let r=n.getMinZIndex(),o;e.deep?(o=this.getDescendants({deep:!0,breadthFirst:!0}),o.unshift(this)):o=[this];let i=n.indexOf(this)!==0;i||(i=o.some((s,a)=>s.getZIndex()!==r+a)),i&&this.batchUpdate("to-back",()=>{r-=o.length,o.forEach((s,a)=>{s.setZIndex(r+a,e)})})}return this}get markup(){return this.getMarkup()}set markup(e){e==null?this.removeMarkup():this.setMarkup(e)}getMarkup(){let e=this.store.get("markup");return e==null&&(e=this.constructor.getMarkup()),e}setMarkup(e,n={}){return this.store.set("markup",e,n),this}removeMarkup(e={}){return this.store.remove("markup",e),this}get attrs(){return this.getAttrs()}set attrs(e){e==null?this.removeAttrs():this.setAttrs(e)}getAttrs(){const e=this.store.get("attrs");return e?Object.assign({},e):{}}setAttrs(e,n={}){if(e==null)this.removeAttrs(n);else{const r=o=>this.store.set("attrs",o,n);if(n.overwrite===!0)r(e);else{const o=this.getAttrs();n.deep===!1?r(Object.assign(Object.assign({},o),e)):r(Ks({},o,e))}}return this}replaceAttrs(e,n={}){return this.setAttrs(e,Object.assign(Object.assign({},n),{overwrite:!0}))}updateAttrs(e,n={}){return this.setAttrs(e,Object.assign(Object.assign({},n),{deep:!1}))}removeAttrs(e={}){return this.store.remove("attrs",e),this}getAttrDefinition(e){if(!e)return null;const r=this.constructor.getAttrHooks()||{};let o=r[e]||qp.registry.get(e);if(!o){const i=DB(e);o=r[i]||qp.registry.get(i)}return o||null}getAttrByPath(e){return e==null||e===""?this.getAttrs():this.getPropByPath(this.prefixAttrPath(e))}setAttrByPath(e,n,r={}){return this.setPropByPath(this.prefixAttrPath(e),n,r),this}removeAttrByPath(e,n={}){return this.removePropByPath(this.prefixAttrPath(e),n),this}prefixAttrPath(e){return Array.isArray(e)?["attrs"].concat(e):`attrs/${e}`}attr(e,n,r){return e==null?this.getAttrByPath():typeof e=="string"||Array.isArray(e)?arguments.length===1?this.getAttrByPath(e):n==null?this.removeAttrByPath(e,r||{}):this.setAttrByPath(e,n,r||{}):this.setAttrs(e,n||{})}get visible(){return this.isVisible()}set visible(e){this.setVisible(e)}setVisible(e,n={}){return this.store.set("visible",e,n),this}isVisible(){return this.store.get("visible")!==!1}show(e={}){return this.isVisible()||this.setVisible(!0,e),this}hide(e={}){return this.isVisible()&&this.setVisible(!1,e),this}toggleVisible(e,n={}){const r=typeof e=="boolean"?e:!this.isVisible(),o=typeof e=="boolean"?n:e;return r?this.show(o):this.hide(o),this}get data(){return this.getData()}set data(e){this.setData(e)}getData(){return this.store.get("data")}setData(e,n={}){if(e==null)this.removeData(n);else{const r=o=>this.store.set("data",o,n);if(n.overwrite===!0)r(e);else{const o=this.getData();n.deep===!1?r(typeof e=="object"?Object.assign(Object.assign({},o),e):e):r(Ks({},o,e))}}return this}replaceData(e,n={}){return this.setData(e,Object.assign(Object.assign({},n),{overwrite:!0}))}updateData(e,n={}){return this.setData(e,Object.assign(Object.assign({},n),{deep:!1}))}removeData(e={}){return this.store.remove("data",e),this}get parent(){return this.getParent()}get children(){return this.getChildren()}getParentId(){return this.store.get("parent")}getParent(){const e=this.getParentId();if(e&&this.model){const n=this.model.getCell(e);return this._parent=n,n}return null}getChildren(){const e=this.store.get("children");if(e&&e.length&&this.model){const n=e.map(r=>{var o;return(o=this.model)===null||o===void 0?void 0:o.getCell(r)}).filter(r=>r!=null);return this._children=n,[...n]}return null}hasParent(){return this.parent!=null}isParentOf(e){return e!=null&&e.getParent()===this}isChildOf(e){return e!=null&&this.getParent()===e}
538eachChild(e,n){return this.children&&this.children.forEach(e,n),this}filterChild(e,n){return this.children?this.children.filter(e,n):[]}getChildCount(){return this.children==null?0:this.children.length}getChildIndex(e){return this.children==null?-1:this.children.indexOf(e)}getChildAt(e){return this.children!=null&&e>=0?this.children[e]:null}getAncestors(e={}){const n=[];let r=this.getParent();for(;r;)n.push(r),r=e.deep!==!1?r.getParent():null;return n}getDescendants(e={}){if(e.deep!==!1){if(e.breadthFirst){const n=[],r=this.getChildren()||[];for(;r.length>0;){const o=r.shift(),i=o.getChildren();n.push(o),i&&r.push(...i)}return n}{const n=this.getChildren()||[];return n.forEach(r=>{n.push(...r.getDescendants(e))}),n}}return this.getChildren()||[]}isDescendantOf(e,n={}){if(e==null)return!1;if(n.deep!==!1){let r=this.getParent();for(;r;){if(r===e)return!0;r=r.getParent()}return!1}return this.isChildOf(e)}isAncestorOf(e,n={}){return e==null?!1:e.isDescendantOf(this,n)}contains(e){return this.isAncestorOf(e)}getCommonAncestor(...e){return Ur.getCommonAncestor(this,...e)}setParent(e,n={}){return this._parent=e,e?this.store.set("parent",e.id,n):this.store.remove("parent",n),this}setChildren(e,n={}){return this._children=e,e!=null?this.store.set("children",e.map(r=>r.id),n):this.store.remove("children",n),this}unembed(e,n={}){const r=this.children;if(r!=null&&e!=null){const o=this.getChildIndex(e);o!==-1&&(r.splice(o,1),e.setParent(null,n),this.setChildren(r,n))}return this}embed(e,n={}){return e.addTo(this,n),this}addTo(e,n={}){return Ur.isCell(e)?e.addChild(this,n):e.addCell(this,n),this}insertTo(e,n,r={}){return e.insertChild(this,n,r),this}addChild(e,n={}){return this.insertChild(e,void 0,n)}insertChild(e,n,r={}){if(e!=null&&e!==this){const o=e.getParent(),i=this!==o;let s=n;if(s==null&&(s=this.getChildCount(),i||(s-=1)),o){const l=o.getChildren();if(l){const c=l.indexOf(e);c>=0&&(e.setParent(null,r),l.splice(c,1),o.setChildren(l,r))}}let a=this.children;if(a==null?(a=[],a.push(e)):a.splice(s,0,e),e.setParent(this,r),this.setChildren(a,r),i&&this.model){const l=this.model.getIncomingEdges(this),c=this.model.getOutgoingEdges(this);l&&l.forEach(u=>u.updateParent(r)),c&&c.forEach(u=>u.updateParent(r))}this.model&&this.model.addCell(e,r)}return this}removeFromParent(e={}){const n=this.getParent();if(n!=null){const r=n.getChildIndex(this);n.removeChildAt(r,e)}return this}removeChild(e,n={}){const r=this.getChildIndex(e);return this.removeChildAt(r,n)}removeChildAt(e,n={}){const r=this.getChildAt(e);return this.children!=null&&r!=null&&(this.unembed(r,n),r.remove(n)),r}remove(e={}){return this.batchUpdate("remove",()=>{const n=this.getParent();n&&n.removeChild(this,e),e.deep!==!1&&this.eachChild(r=>r.remove(e)),this.model&&this.model.removeCell(this,e)}),this}transition(e,n,r={},o="/"){return this.animation.start(e,n,r,o)}stopTransition(e,n,r="/"){return this.animation.stop(e,n,r),this}getTransitions(){return this.animation.get()}translate(e,n,r){return this}scale(e,n,r,o){return this}addTools(e,n,r){const o=Array.isArray(e)?e:[e],i=typeof n=="string"?n:null,s=typeof n=="object"?n:typeof r=="object"?r:{};if(s.reset)return this.setTools({name:i,items:o,local:s.local},s);let a=bs(this.getTools());if(a==null||i==null||a.name===i)return a==null&&(a={}),a.items||(a.items=[]),a.name=i,a.items=[...a.items,...o],this.setTools(Object.assign({},a),s)}setTools(e,n={}){return e==null?this.removeTools():this.store.set("tools",Ur.normalizeTools(e),n),this}getTools(){return this.store.get("tools")}removeTools(e={}){return this.store.remove("tools",e),this}hasTools(e){const n=this.getTools();return n==null?!1:e==null?!0:n.name===e}hasTool(e){const n=this.getTools();return n==null?!1:n.items.some(r=>typeof r=="string"?r===e:r.name===e)}removeTool(e,n={}){const r=bs(this.getTools());if(r){let o=!1;const i=r.items.slice(),s=a=>{i.splice(a,1),o=!0};if(typeof e=="number")s(e);else for(let a=i.length-1;a>=0;a-=1){const l=i[a];(typeof l=="string"?l===e:l.name===e)&&s(a)}o&&(r.items=i,this.setTools(r,n))}return this}getBBox(e){return new Gt}getConnectionPoint(e,n){return new De}toJSON(e={}){const n=Object.assign({},this.store.get()),r=Object.prototype.toString,o=this.isNode()?"node":this.isEdge(
538)?"edge":"cell";if(!n.shape){const p=this.constructor;throw new Error(`Unable to serialize ${o} missing "shape" prop, check the ${o} "${p.name||r.call(p)}"`)}const i=this.constructor,s=e.diff===!0,a=n.attrs||{},l=i.getDefaults(!0),c=s?this.preprocess(l,!0):l,u=c.attrs||{},d={};Object.entries(n).forEach(([p,m])=>{if(m!=null&&!Array.isArray(m)&&typeof m=="object"&&!og(m))throw new Error(`Can only serialize ${o} with plain-object props, but got a "${r.call(m)}" type of key "${p}" on ${o} "${this.id}"`);if(p!=="attrs"&&p!=="shape"&&s){const y=c[p];lm(m,y)&&delete n[p]}}),Object.keys(a).forEach(p=>{const m=a[p],y=u[p];Object.keys(m).forEach(v=>{const b=m[v],S=y?y[v]:null;b!=null&&typeof b=="object"&&!Array.isArray(b)?Object.keys(b).forEach(w=>{const A=b[w];if(y==null||S==null||!Qs(S)||!lm(S[w],A)){d[p]==null&&(d[p]={}),d[p][v]==null&&(d[p][v]={});const _=d[p][v];_[w]=A}}):(y==null||!lm(S,b))&&(d[p]==null&&(d[p]={}),d[p][v]=b)})});const h=Object.assign(Object.assign({},n),{attrs:Gye(d)?void 0:d});h.attrs==null&&delete h.attrs;const f=h;return f.angle===0&&delete f.angle,bs(f)}clone(e={}){if(!e.deep){const r=Object.assign({},this.store.get());e.keepId||delete r.id,delete r.parent,delete r.children;const o=this.constructor;return new o(r)}return Ur.deepClone(this)[this.id]}findView(e){return e.findViewByCell(this)}startBatch(e,n={},r=this.model){return this.notify("batch:start",{name:e,data:n,cell:this}),r&&r.startBatch(e,Object.assign(Object.assign({},n),{cell:this})),this}stopBatch(e,n={},r=this.model){return r&&r.stopBatch(e,Object.assign(Object.assign({},n),{cell:this})),this.notify("batch:stop",{name:e,data:n,cell:this}),this}batchUpdate(e,n,r){const o=this.model;this.startBatch(e,r,o);const i=n();return this.stopBatch(e,r,o),i}dispose(){this.removeFromParent(),this.store.dispose()}}Ur.defaults={};Ur.attrHooks={};Ur.propHooks=[];W2t([cd.dispose()],Ur.prototype,"dispose",null);(function(t){function e(n){return typeof n=="string"?{items:[n]}:Array.isArray(n)?{items:n}:n.items?n:{items:[n]}}t.normalizeTools=e})(Ur||(Ur={}));(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&typeof o.isNode=="function"&&typeof o.isEdge=="function"&&typeof o.prop=="function"&&typeof o.attr=="function"}t.isCell=e})(Ur||(Ur={}));(function(t){function e(...i){const s=i.filter(l=>l!=null).map(l=>l.getAncestors()).sort((l,c)=>l.length-c.length);return s.shift().find(l=>s.every(c=>c.includes(l)))||null}t.getCommonAncestor=e;function n(i,s={}){let a=null;for(let l=0,c=i.length;l<c;l+=1){const u=i[l];let d=u.getBBox(s);if(d){if(u.isNode()){const h=u.getAngle();h!=null&&h!==0&&(d=d.bbox(h))}a=a==null?d:a.union(d)}}return a}t.getCellsBBox=n;function r(i){const s=[i,...i.getDescendants({deep:!0})];return t.cloneCells(s)}t.deepClone=r;function o(i){const s=qye(i),a=s.reduce((l,c)=>(l[c.id]=c.clone(),l),{});return s.forEach(l=>{const c=a[l.id];if(c.isEdge()){const h=c.getSourceCellId(),f=c.getTargetCellId();h&&a[h]&&c.setSource(Object.assign(Object.assign({},c.getSource()),{cell:a[h].id})),f&&a[f]&&c.setTarget(Object.assign(Object.assign({},c.getTarget()),{cell:a[f].id}))}const u=l.getParent();u&&a[u.id]&&c.setParent(a[u.id]);const d=l.getChildren();if(d&&d.length){const h=d.reduce((f,p)=>(a[p.id]&&f.push(a[p.id]),f),[]);h.length>0&&c.setChildren(h)}}),a}t.cloneCells=o})(Ur||(Ur={}));(function(t){t.config({propHooks(e){var{tools:n}=e,r=S0e(e,["tools"]);return n&&(r.tools=t.normalizeTools(n)),r}})})(Ur||(Ur={}));var Lx;(function(t){let e,n;function r(s,a){return a?e!=null&&e.exist(s):n!=null&&n.exist(s)}t.exist=r;function o(s){e=s}t.setEdgeRegistry=o;function i(s){n=s}t.setNodeRegistry=i})(Lx||(Lx={}));class j2t{constructor(e){this.ports=[],this.groups={},this.init(bs(e))}getPorts(){return this.ports}getGroup(e){return e!=null?this.groups[e]:null}getPortsByGroup(e){return this.ports.filter(n=>n.group===e||n.group==null&&e==null)}getPortsLayoutByGroup(e,n){const r=this.getPortsByGroup(e),o=e?this.getGroup(e):null,i=o?o.position:null,s=i?i.name:null;let a;if(s!=null){const d=lC.registry.get(s);if(d==null)return lC.registry.onNotFound(s);a=d}else a=lC.presets.left;const l=r.map(d=>d&&d.position&&d.position.args||{}),c=i&&i.args||{};return a(l,n,c).map((d,h)=>{const f=r[h];return{portLayout:d,portId:f.id,portSize:f.size,portAttrs:f.attrs,labelSize:f.label.size,labelLayout:this.getPortLabelLayout(f,De.create(d.position),n)}})}init(e){const{groups:n,items:r}=e;
538n!=null&&Object.keys(n).forEach(o=>{this.groups[o]=this.parseGroup(n[o])}),Array.isArray(r)&&r.forEach(o=>{this.ports.push(this.parsePort(o))})}parseGroup(e){return Object.assign(Object.assign({},e),{label:this.getLabel(e,!0),position:this.getPortPosition(e.position,!0)})}parsePort(e){const n=Object.assign({},e),r=this.getGroup(e.group)||{};return n.markup=n.markup||r.markup,n.attrs=Ks({},r.attrs,n.attrs),n.position=this.createPosition(r,n),n.label=Ks({},r.label,this.getLabel(n)),n.zIndex=this.getZIndex(r,n),n.size=Object.assign(Object.assign({},r.size),n.size),n}getZIndex(e,n){return typeof n.zIndex=="number"?n.zIndex:typeof e.zIndex=="number"||e.zIndex==="auto"?e.zIndex:"auto"}createPosition(e,n){return Ks({name:"left",args:{}},e.position,{args:n.args})}getPortPosition(e,n=!1){if(e==null){if(n)return{name:"left",args:{}}}else{if(typeof e=="string")return{name:e,args:{}};if(Array.isArray(e))return{name:"absolute",args:{x:e[0],y:e[1]}};if(typeof e=="object")return e}return{args:{}}}getPortLabelPosition(e,n=!1){if(e==null){if(n)return{name:"left",args:{}}}else{if(typeof e=="string")return{name:e,args:{}};if(typeof e=="object")return e}return{args:{}}}getLabel(e,n=!1){const r=e.label||{};return r.position=this.getPortLabelPosition(r.position,n),r}getPortLabelLayout(e,n,r){const o=e.label.position.name||"left",i=e.label.position.args||{},s=Ix.registry.get(o)||Ix.presets.left;return s?s(n,r,i):null}}var VB=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let _a=class E0e extends Ur{get[Symbol.toStringTag](){return E0e.toStringTag}constructor(e={}){super(e),this.initPorts()}preprocess(e,n){const{x:r,y:o,width:i,height:s}=e,a=VB(e,["x","y","width","height"]);if(r!=null||o!=null){const l=a.position;a.position=Object.assign(Object.assign({},l),{x:r??(l?l.x:0),y:o??(l?l.y:0)})}if(i!=null||s!=null){const l=a.size;a.size=Object.assign(Object.assign({},l),{width:i??(l?l.width:0),height:s??(l?l.height:0)})}return super.preprocess(a,n)}isNode(){return!0}size(e,n,r){return e===void 0?this.getSize():typeof e=="number"?this.setSize(e,n,r):this.setSize(e,n)}getSize(){const e=this.store.get("size");return e?Object.assign({},e):{width:1,height:1}}setSize(e,n,r){return typeof e=="object"?this.resize(e.width,e.height,n):this.resize(e,n,r),this}resize(e,n,r={}){this.startBatch("resize",r);const o=r.direction;if(o){const i=this.getSize();switch(o){case"left":case"right":n=i.height;break;case"top":case"bottom":e=i.width;break}let a={right:0,"top-right":0,top:1,"top-left":1,left:2,"bottom-left":2,bottom:3,"bottom-right":3}[o];const l=Zo.normalize(this.getAngle()||0);r.absolute&&(a+=Math.floor((l+45)/90),a%=4);const c=this.getBBox();let u;a===0?u=c.getBottomLeft():a===1?u=c.getCorner():a===2?u=c.getTopRight():u=c.getOrigin();const d=u.clone().rotate(-l,c.getCenter()),h=Math.sqrt(e*e+n*n)/2;let f=a*Math.PI/2;f+=Math.atan(a%2===0?n/e:e/n),f-=Zo.toRad(l);const m=De.fromPolar(h,f,d).clone().translate(e/-2,n/-2);this.store.set("size",{width:e,height:n},r),this.setPosition(m.x,m.y,r)}else this.store.set("size",{width:e,height:n},r);return this.stopBatch("resize",r),this}scale(e,n,r,o={}){const i=this.getBBox().scale(e,n,r??void 0);return this.startBatch("scale",o),this.setPosition(i.x,i.y,o),this.resize(i.width,i.height,o),this.stopBatch("scale"),this}position(e,n,r){return typeof e=="number"?this.setPosition(e,n,r):this.getPosition(e)}getPosition(e={}){if(e.relative){const r=this.getParent();if(r!=null&&r.isNode()){const o=this.getPosition(),i=r.getPosition();return{x:o.x-i.x,y:o.y-i.y}}}const n=this.store.get("position");return n?Object.assign({},n):{x:0,y:0}}setPosition(e,n,r={}){let o,i,s;if(typeof e=="object"?(o=e.x,i=e.y,s=n||{}):(o=e,i=n,s=r||{}),s.relative){const a=this.getParent();if(a!=null&&a.isNode()){const l=a.getPosition();o+=l.x,i+=l.y}}if(s.deep){const a=this.getPosition();this.translate(o-a.x,i-a.y,s)}else this.store.set("position",{x:o,y:i},s);return this}translate(e=0,n=0,r={}){if(e===0&&n===0)return this;r.translateBy=r.translateBy||this.id;const o=this.getPosition();if(r.restrict!=null&&r.translateBy===this.id){const s=this.getBBox({deep:!0}),a=r.restrict,l=o.x-s.x,c=o.y-s.y,u=Math.max(a.x+l,Math.min(a.x+a.width+l-s.width,o.x+e)),d=Math.max(a.y+c,Math.min(a.y+a.height+c-s.height,o.y+n));e=u-o.x,n=d-o.y}const i={x:o.x+e,y:o.y+n};return r.tx=e,r.ty=n,r.transition?(typeof r.transition!="object"&&(r.transition={}),this.transition("position",i,Object.assign(Object.assign({},r.transition),{interp:Xb.object})),this.eachChild(s=>{var a;((a=r.exclude)===null||a===void 0?void 0:a.includes(s))||s.translate(e,n,r)})):(this.startBatch("translate",r),this.store.set("position",i,r),this.eachChild(s=>{var a;((a=r.exclude)===null||a===void 0?void 0:a.includes(s))||s.translate(e,n,r)}),this.stopBatch("translate",r)),this}angle(e,n){return e==null?this.getAngle():this.rotate(e,n)}getAngle(){return this.store.get("angle",0)}rotate(e,n={}){const r=this.getAngle();if(n.center){const o=this.getSize(),i=this.getPosition(),s=this.getBBox().getCenter();s.rotate(r-e,n.center);const a=s.x-o.width/2-i.x,l=s.y-o.height/2-i.y;this.startBatch("rotate",{angle:e,options:n}),this.setPosition(i.x+a,i.y+l,n),this.rotate(e,Object.assign(Object.assign({}
538,n),{center:null})),this.stopBatch("rotate")}else this.store.set("angle",n.absolute?e:(r+e)%360,n);return this}getBBox(e={}){if(e.deep){const n=this.getDescendants({deep:!0,breadthFirst:!0});return n.push(this),Ur.getCellsBBox(n)}return Gt.fromPositionAndSize(this.getPosition(),this.getSize())}getConnectionPoint(e,n){const r=this.getBBox(),o=r.getCenter(),i=e.getTerminal(n);if(i==null)return o;const s=i.port;if(!s||!this.hasPort(s))return o;const a=this.getPort(s);if(!a||!a.group)return o;const c=this.getPortsPosition(a.group)[s].position,u=De.create(c).translate(r.getOrigin()),d=this.getAngle();return d&&u.rotate(-d,o),u}fit(e={}){const r=(this.getChildren()||[]).filter(c=>c.isNode());if(r.length===0)return this;this.startBatch("fit-embeds",e),e.deep&&r.forEach(c=>c.fit(e));let{x:o,y:i,width:s,height:a}=Ur.getCellsBBox(r);const l=UC(e.padding);return o-=l.left,i-=l.top,s+=l.left+l.right,a+=l.bottom+l.top,this.store.set({position:{x:o,y:i},size:{width:s,height:a}},e),this.stopBatch("fit-embeds"),this}get portContainerMarkup(){return this.getPortContainerMarkup()}set portContainerMarkup(e){this.setPortContainerMarkup(e)}getDefaultPortContainerMarkup(){return this.store.get("defaultPortContainerMarkup")||Oi.getPortContainerMarkup()}getPortContainerMarkup(){return this.store.get("portContainerMarkup")||this.getDefaultPortContainerMarkup()}setPortContainerMarkup(e,n={}){return this.store.set("portContainerMarkup",Oi.clone(e),n),this}get portMarkup(){return this.getPortMarkup()}set portMarkup(e){this.setPortMarkup(e)}getDefaultPortMarkup(){return this.store.get("defaultPortMarkup")||Oi.getPortMarkup()}getPortMarkup(){return this.store.get("portMarkup")||this.getDefaultPortMarkup()}setPortMarkup(e,n={}
538){return this.store.set("portMarkup",Oi.clone(e),n),this}get portLabelMarkup(){return this.getPortLabelMarkup()}set portLabelMarkup(e){this.setPortLabelMarkup(e)}getDefaultPortLabelMarkup(){return this.store.get("defaultPortLabelMarkup")||Oi.getPortLabelMarkup()}getPortLabelMarkup(){return this.store.get("portLabelMarkup")||this.getDefaultPortLabelMarkup()}setPortLabelMarkup(e,n={}){return this.store.set("portLabelMarkup",Oi.clone(e),n),this}get ports(){const e=this.store.get("ports",{items:[]});return e.items==null&&(e.items=[]),e}getPorts(){return bs(this.ports.items)}getPortsByGroup(e){return this.getPorts().filter(n=>n.group===e)}getPort(e){return bs(this.ports.items.find(n=>n.id&&n.id===e))}getPortAt(e){return this.ports.items[e]||null}hasPorts(){return this.ports.items.length>0}hasPort(e){return this.getPortIndex(e)!==-1}getPortIndex(e){const n=typeof e=="string"?e:e.id;return n!=null?this.ports.items.findIndex(r=>r.id===n):-1}getPortsPosition(e){const n=this.getSize();return this.port.getPortsLayoutByGroup(e,new Gt(0,0,n.width,n.height)).reduce((o,i)=>{const s=i.portLayout;return o[i.portId]={position:Object.assign({},s.position),angle:s.angle||0},o},{})}getPortProp(e,n){return this.getPropByPath(this.prefixPortPath(e,n))}setPortProp(e,n,r,o){if(typeof n=="string"||Array.isArray(n)){const a=this.prefixPortPath(e,n),l=r;return this.setPropByPath(a,l,o)}const i=this.prefixPortPath(e),s=n;return this.setPropByPath(i,s,r)}removePortProp(e,n,r){return typeof n=="string"||Array.isArray(n)?this.removePropByPath(this.prefixPortPath(e,n),r):this.removePropByPath(this.prefixPortPath(e),n)}portProp(e,n,r,o){return n==null?this.getPortProp(e):typeof n=="string"||Array.isArray(n)?arguments.length===2?this.getPortProp(e,n):r==null?this.removePortProp(e,n,o):this.setPortProp(e,n,r,o):this.setPortProp(e,n,r)}prefixPortPath(e,n){const r=this.getPortIndex(e);if(r===-1)throw new Error(`Unable to find port with id: "${e}"`);return n==null||n===""?["ports","items",`${r}`]:Array.isArray(n)?["ports","items",`${r}`,...n]:`ports/items/${r}/${n}`}addPort(e,n){const r=[...this.ports.items];return r.push(e),this.setPropByPath("ports/items",r,n),this}addPorts(e,n){return this.setPropByPath("ports/items",[...this.ports.items,...e],n),this}insertPort(e,n,r){const o=[...this.ports.items];return o.splice(e,0,n),this.setPropByPath("ports/items",o,r),this}removePort(e,n={}){return this.removePortAt(this.getPortIndex(e),n)}removePortAt(e,n={}){if(e>=0){const r=[...this.ports.items];r.splice(e,1),n.rewrite=!0,this.setPropByPath("ports/items",r,n)}return this}removePorts(e,n){let r;if(Array.isArray(e)){if(r=n||{},e.length){r.rewrite=!0;const i=[...this.ports.items].filter(s=>!e.some(a=>{const l=typeof a=="string"?a:a.id;return s.id===l}));this.setPropByPath("ports/items",i,r)}}else r=e||{},r.rewrite=!0,this.setPropByPath("ports/items",[],r);return this}getParsedPorts(){return this.port.getPorts()}getParsedGroups(){return this.port.groups}getPortsLayoutByGroup(e,n){return this.port.getPortsLayoutByGroup(e,n)}initPorts(){this.updatePortData(),this.on("change:ports",()=>{this.processRemovedPort(),this.updatePortData()})}processRemovedPort(){const e=this.ports,n={};e.items.forEach(s=>{s.id&&(n[s.id]=!0)});const r={};(this.store.getPrevious("ports")||{items:[]}).items.forEach(s=>{s.id&&!n[s.id]&&(r[s.id]=!0)});const i=this.model;i&&!Gye(r)&&(i.getConnectedEdges(this,{incoming:!0}).forEach(l=>{const c=l.getTargetPortId();c&&r[c]&&l.remove()}),i.getConnectedEdges(this,{outgoing:!0}).forEach(l=>{const c=l.getSourcePortId();c&&r[c]&&l.remove()}))}validatePorts(){const e={},n=[];return this.ports.items.forEach(r=>{typeof r!="object"&&n.push(`Invalid port ${r}.`),r.id==null&&(r.id=this.generatePortId()),e[r.id]&&n.push("Duplicitied port id."),e[r.id]=!0}),n}generatePortId(){return N2()}updatePortData(){const e=this.validatePorts();if(e.length>0)throw this.store.set("ports",this.store.getPrevious("ports")),new Error(e.join(" "));const n=this.port?this.port.getPorts():null;this.port=new j2t(this.ports);const r=this.port.getPorts(),o=n?r.filter(s=>n.find(a=>a.id===s.id)?null:s):[...r],i=n?n.filter(s=>r.find(a=>a.id===s.id)?null:s):[];o.length>0&&this.notify("ports:added",{added:o,cell:this,node:this}),i.length>0&&this.notify("ports:removed",{removed:i,cell:this,node:this})}};_a.defaults={angle:0,position:{x:0,y:0}
538,size:{width:1,height:1}};(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&typeof o.isNode=="function"&&typeof o.isEdge=="function"&&typeof o.prop=="function"&&typeof o.attr=="function"&&typeof o.size=="function"&&typeof o.position=="function"}t.isNode=e})(_a||(_a={}));(function(t){t.config({propHooks(e){var{ports:n}=e,r=VB(e,["ports"]);return n&&(r.ports=Array.isArray(n)?{items:n}:n),r}})})(_a||(_a={}));(function(t){t.registry=ks.create({type:"node",process(e,n){if(Lx.exist(e,!0))throw new Error(`Node with name '${e}' was registered by anthor Edge`);if(typeof n=="function")return n.config({shape:e}),n;let r=t;const{inherit:o}=n,i=VB(n,["inherit"]);if(o)if(typeof o=="string"){const a=this.get(o);a==null?this.onNotFound(o,"inherited"):r=a}else r=o;i.constructorName==null&&(i.constructorName=e);const s=r.define.call(r,i);return s.config({shape:e}),s}}),Lx.setNodeRegistry(t.registry)})(_a||(_a={}));(function(t){let e=0;function n(i){return i?y8(i):(e+=1,`CustomNode${e}`)}function r(i){const{constructorName:s,overwrite:a}=i,l=VB(i,["constructorName","overwrite"]),c=g8(n(s||l.shape),this);return c.config(l),l.shape&&t.registry.register(l.shape,c,a),c}t.define=r;function o(i){const s=i.shape||"rect",a=t.registry.get(s);return a?new a(i):t.registry.onNotFound(s)}t.create=o})(_a||(_a={}));var GB=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let Ss=class x0e extends Ur{get[Symbol.toStringTag](){return x0e.toStringTag}constructor(e={}){super(e)}preprocess(e,n){const{source:r,sourceCell:o,sourcePort:i,sourcePoint:s,target:a,targetCell:l,targetPort:c,targetPoint:u}=e,h=GB(e,["source","sourceCell","sourcePort","sourcePoint","target","targetCell","targetPort","targetPoint"]),f=p=>typeof p=="string"||typeof p=="number";if(r!=null)if(Ur.isCell(r))h.source={cell:r.id};else if(f(r))h.source={cell:r};else if(De.isPoint(r))h.source=r.toJSON();else if(Array.isArray(r))h.source={x:r[0],y:r[1]};else{const p=r.cell;Ur.isCell(p)?h.source=Object.assign(Object.assign({},r),{cell:p.id}):h.source=r}if(o!=null||i!=null){let p=h.source;if(o!=null){const m=f(o)?o:o.id;p?p.cell=m:p=h.source={cell:m}}i!=null&&p&&(p.port=i)}else s!=null&&(h.source=De.create(s).toJSON());if(a!=null)if(Ur.isCell(a))h.target={cell:a.id};else if(f(a))h.target={cell:a};else if(De.isPoint(a))h.target=a.toJSON();else if(Array.isArray(a))h.target={x:a[0],y:a[1]};else{const p=a.cell;Ur.isCell(p)?h.target=Object.assign(Object.assign({},a),{cell:p.id}):h.target=a}if(l!=null||c!=null){let p=h.target;if(l!=null){const m=f(l)?l:l.id;p?p.cell=m:p=h.target={cell:m}}c!=null&&p&&(p.port=c)}else u!=null&&(h.target=De.create(u).toJSON());return super.preprocess(h,n)}setup(){super.setup(),this.on("change:labels",e=>this.onLabelsChanged(e)),this.on("change:vertices",e=>this.onVertexsChanged(e))}isEdge(){return!0}disconnect(e={}){return this.store.set({source:{x:0,y:0},target:{x:0,y:0}},e),this}get source(){return this.getSource()}set source(e){this.setSource(e)}getSource(){return this.getTerminal("source")}getSourceCellId(){return this.source.cell}getSourcePortId(){return this.source.port}setSource(e,n,r={}){return this.setTerminal("source",e,n,r)}get target(){return this.getTarget()}set target(e){this.setTarget(e)}getTarget(){return this.getTerminal("target")}getTargetCellId(){return this.target.cell}getTargetPortId(){return this.target.port}setTarget(e,n,r={}){return this.setTerminal("target",e,n,r)}getTerminal(e){return Object.assign({},this.store.get(e))}setTerminal(e,n,r,o={}){if(Ur.isCell(n))return this.store.set(e,Ks({},r,{cell:n.id}),o),this;const i=n;return De.isPoint(n)||i.x!=null&&i.y!=null?(this.store.set(e,Ks({},r,{x:i.x,y:i.y}),o),this):(this.store.set(e,bs(n),o),this)}getSourcePoint(){return this.getTerminalPoint("source")}getTargetPoint(){return this.getTerminalPoint("target")}getTerminalPoint(e){const n=this[e];if(De.isPointLike(n))return De.create(n);const r=this.getTerminalCell(e);return r?r.getConnectionPoint(this,e):new De}getSourceCell(){return this.getTerminalCell("source")}getTargetCell(){return this.getTerminalCell("target")}
538getTerminalCell(e){if(this.model){const n=e==="source"?this.getSourceCellId():this.getTargetCellId();if(n)return this.model.getCell(n)}return null}getSourceNode(){return this.getTerminalNode("source")}getTargetNode(){return this.getTerminalNode("target")}getTerminalNode(e){let n=this;const r={};for(;n&&n.isEdge();){if(r[n.id])return null;r[n.id]=!0,n=n.getTerminalCell(e)}return n&&n.isNode()?n:null}get router(){return this.getRouter()}set router(e){e==null?this.removeRouter():this.setRouter(e)}getRouter(){return this.store.get("router")}setRouter(e,n,r){return typeof e=="object"?this.store.set("router",e,n):this.store.set("router",{name:e,args:n},r),this}removeRouter(e={}){return this.store.remove("router",e),this}get connector(){return this.getConnector()}set connector(e){e==null?this.removeConnector():this.setConnector(e)}getConnector(){return this.store.get("connector")}setConnector(e,n,r){return typeof e=="object"?this.store.set("connector",e,n):this.store.set("connector",{name:e,args:n},r),this}removeConnector(e={}){return this.store.remove("connector",e)}getDefaultLabel(){const e=this.constructor,n=this.store.get("defaultLabel")||e.defaultLabel||{};return bs(n)}get labels(){return this.getLabels()}set labels(e){this.setLabels(e)}getLabels(){return[...this.store.get("labels",[])].map(e=>this.parseLabel(e))}setLabels(e,n={}){return this.store.set("labels",Array.isArray(e)?e:[e],n),this}insertLabel(e,n,r={}){const o=this.getLabels(),i=o.length;let s=n!=null&&Number.isFinite(n)?n:i;return s<0&&(s=i+s+1),o.splice(s,0,this.parseLabel(e)),this.setLabels(o,r)}appendLabel(e,n={}){return this.insertLabel(e,-1,n)}getLabelAt(e){const n=this.getLabels();return e!=null&&Number.isFinite(e)?this.parseLabel(n[e]):null}setLabelAt(e,n,r={}){if(e!=null&&Number.isFinite(e)){const o=this.getLabels();o[e]=this.parseLabel(n),this.setLabels(o,r)}return this}removeLabelAt(e,n={}){const r=this.getLabels(),o=e!=null&&Number.isFinite(e)?e:-1,i=r.splice(o,1);return this.setLabels(r,n),i.length?i[0]:null}parseLabel(e){return typeof e=="string"?this.constructor.parseStringLabel(e):e}onLabelsChanged({previous:e,current:n}){const r=e&&n?n.filter(i=>e.find(s=>i===s||lm(i,s))?null:i):n?[...n]:[],o=e&&n?e.filter(i=>n.find(s=>i===s||lm(i,s))?null:i):e?[...e]:[];r.length>0&&this.notify("labels:added",{added:r,cell:this,edge:this}),o.length>0&&this.notify("labels:removed",{removed:o,cell:this,edge:this})}get vertices(){return this.getVertices()}set vertices(e){this.setVertices(e)}getVertices(){return[...this.store.get("vertices",[])]}setVertices(e,n={}){const r=Array.isArray(e)?e:[e];return this.store.set("vertices",r.map(o=>De.toJSON(o)),n),this}insertVertex(e,n,r={}){const o=this.getVertices(),i=o.length;let s=n!=null&&Number.isFinite(n)?n:i;return s<0&&(s=i+s+1),o.splice(s,0,De.toJSON(e)),this.setVertices(o,r)}appendVertex(e,n={}){return this.insertVertex(e,-1,n)}getVertexAt(e){return e!=null&&Number.isFinite(e)?this.getVertices()[e]:null}setVertexAt(e,n,r={}){if(e!=null&&Number.isFinite(e)){const o=this.getVertices();o[e]=n,this.setVertices(o,r)}return this}removeVertexAt(e,n={}){const r=this.getVertices(),o=e!=null&&Number.isFinite(e)?e:-1;return r.splice(o,1),this.setVertices(r,n)}onVertexsChanged({previous:e,current:n}){const r=e&&n?n.filter(i=>e.find(s=>De.equals(i,s))?null:i):n?[...n]:[],o=e&&n?e.filter(i=>n.find(s=>De.equals(i,s))?null:i):e?[...e]:[];r.length>0&&this.notify("vertexs:added",{added:r,cell:this,edge:this}),o.length>0&&this.notify("vertexs:removed",{removed:o,cell:this,edge:this})}getDefaultMarkup(){return this.store.get("defaultMarkup")||Oi.getEdgeMarkup()}getMarkup(){return super.getMarkup()||this.getDefaultMarkup()}translate(e,n,r={}){return r.translateBy=r.translateBy||this.id,r.tx=e,r.ty=n,this.applyToPoints(o=>({x:(o.x||0)+e,y:(o.y||0)+n}),r)}scale(e,n,r,o={}){return this.applyToPoints(i=>De.create(i).scale(e,n,r).toJSON(),o)}applyToPoints(e,n={}){const r={},o=this.getSource(),i=this.getTarget();De.isPointLike(o)&&(r.source=e(o)),De.isPointLike(i)&&(r.target=e(i));const s=this.getVertices();return s.length>0&&(r.vertices=s.map(e)),this.store.set(r,n),this}getBBox(){return this.getPolyline().bbox()}getConnectionPoint(){return this.getPolyline().pointAt(.5)}
538getPolyline(){const e=[this.getSourcePoint(),...this.getVertices().map(n=>De.create(n)),this.getTargetPoint()];return new Ms(e)}updateParent(e){let n=null;const r=this.getSourceCell(),o=this.getTargetCell(),i=this.getParent();return r&&o&&(r===o||r.isDescendantOf(o)?n=o:o.isDescendantOf(r)?n=r:n=Ur.getCommonAncestor(r,o)),i&&n&&n.id!==i.id&&i.unembed(this,e),n&&(!i||i.id!==n.id)&&n.embed(this,e),n}hasLoop(e={}){const n=this.getSource(),r=this.getTarget(),o=n.cell,i=r.cell;if(!o||!i)return!1;let s=o===i;if(!s&&e.deep&&this._model){const a=this.getSourceCell(),l=this.getTargetCell();a&&l&&(s=a.isAncestorOf(l,e)||l.isAncestorOf(a,e))}return s}getFragmentAncestor(){const e=[this,this.getSourceNode(),this.getTargetNode()].filter(n=>n!=null);return this.getCommonAncestor(...e)}isFragmentDescendantOf(e){const n=this.getFragmentAncestor();return!!n&&(n.id===e.id||n.isDescendantOf(e))}};Ss.defaults={};(function(t){function e(n,r){const o=n,i=r;return o.cell===i.cell?o.port===i.port||o.port==null&&i.port==null:!1}t.equalTerminals=e})(Ss||(Ss={}));(function(t){t.defaultLabel={markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}],attrs:{text:{fill:"#000",fontSize:14,textAnchor:"middle",textVerticalAnchor:"middle",pointerEvents:"none"},rect:{ref:"label",fill:"#fff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}};function e(n){return{attrs:{label:{text:n}}}}t.parseStringLabel=e})(Ss||(Ss={}));(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&typeof o.isNode=="function"&&typeof o.isEdge=="function"&&typeof o.prop=="function"&&typeof o.attr=="function"&&typeof o.disconnect=="function"&&typeof o.getSource=="function"&&typeof o.getTarget=="function"}t.isEdge=e})(Ss||(Ss={}));(function(t){t.registry=ks.create({type:"edge",process(e,n){if(Lx.exist(e,!1))throw new Error(`Edge with name '${e}' was registered by anthor Node`);if(typeof n=="function")return n.config({shape:e}),n;let r=t;const{inherit:o="edge"}=n,i=GB(n,["inherit"]);if(typeof o=="string"){const a=this.get(o||"edge");a==null&&o?this.onNotFound(o,"inherited"):r=a}else r=o;i.constructorName==null&&(i.constructorName=e);const s=r.define.call(r,i);return s.config({shape:e}),s}}),Lx.setEdgeRegistry(t.registry)})(Ss||(Ss={}));(function(t){let e=0;function n(i){return i?y8(i):(e+=1,`CustomEdge${e}`)}function r(i){const{constructorName:s,overwrite:a}=i,l=GB(i,["constructorName","overwrite"]),c=g8(n(s||l.shape),this);return c.config(l),l.shape&&t.registry.register(l.shape,c,a),c}t.define=r;function o(i){const s=i.shape||"edge",a=t.registry.get(s);return a?new a(i):t.registry.onNotFound(s)}t.create=o})(Ss||(Ss={}));(function(t){const e="basic.edge";t.config({shape:e,propHooks(n){const{label:r,vertices:o}=n,i=GB(n,["label","vertices"]);if(r){i.labels==null&&(i.labels=[]);const s=typeof r=="string"?t.parseStringLabel(r):r;i.labels.push(s)}return o&&Array.isArray(o)&&(i.vertices=o.map(s=>De.create(s).toJSON())),i}}),t.registry.register(e,t)})(Ss||(Ss={}));var q2t=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class Ez extends cd{constructor(e,n={}){super(),this.length=0,this.comparator=n.comparator||"zIndex",this.clean(),e&&this.reset(e,{silent:!0})}toJSON(){return this.cells.map(e=>e.toJSON())}add(e,n,r){let o,i;typeof n=="number"?(o=n,i=Object.assign({merge:!1},r)):(o=this.length,i=Object.assign({merge:!1},n)),o>this.length&&(o=this.length),o<0&&(o+=this.length+1);const s=Array.isArray(e)?e:[e],a=this.comparator&&typeof n!="number"&&i.sort!==!1,l=this.comparator||null;
538let c=!1;const u=[],d=[];return s.forEach(h=>{const f=this.get(h);f?i.merge&&!h.isSameStore(f)&&(f.setProp(h.getProp(),r),d.push(f),a&&!c&&(l==null||typeof l=="function"?c=f.hasChanged():typeof l=="string"?c=f.hasChanged(l):c=l.some(p=>f.hasChanged(p)))):(u.push(h),this.reference(h))}),u.length&&(a&&(c=!0),this.cells.splice(o,0,...u),this.length=this.cells.length),c&&this.sort({silent:!0}),i.silent||(u.forEach((h,f)=>{const p={cell:h,index:o+f,options:i};this.trigger("added",p),i.dryrun||h.notify("added",Object.assign({},p))}),c&&this.trigger("sorted"),(u.length||d.length)&&this.trigger("updated",{added:u,merged:d,removed:[],options:i})),this}remove(e,n={}){const r=Array.isArray(e)?e:[e],o=this.removeCells(r,n);return!n.silent&&o.length>0&&this.trigger("updated",{options:n,removed:o,added:[],merged:[]}),Array.isArray(e)?o:o[0]}removeCells(e,n){const r=[];for(let o=0;o<e.length;o+=1){const i=this.get(e[o]);if(i==null)continue;const s=this.cells.indexOf(i);this.cells.splice(s,1),this.length-=1,delete this.map[i.id],r.push(i),this.unreference(i),n.dryrun||i.remove(),n.silent||(this.trigger("removed",{cell:i,index:s,options:n}),n.dryrun||i.notify("removed",{cell:i,index:s,options:n}))}return r}reset(e,n={}){const r=this.cells.slice();if(r.forEach(o=>this.unreference(o)),this.clean(),this.add(e,Object.assign({silent:!0},n)),!n.silent){const o=this.cells.slice();this.trigger("reseted",{options:n,previous:r,current:o});const i=[],s=[];o.forEach(a=>{r.some(c=>c.id===a.id)||i.push(a)}),r.forEach(a=>{o.some(c=>c.id===a.id)||s.push(a)}),this.trigger("updated",{options:n,added:i,removed:s,merged:[]})}return this}push(e,n){return this.add(e,this.length,n)}pop(e){const n=this.at(this.length-1);return this.remove(n,e)}unshift(e,n){return this.add(e,0,n)}shift(e){const n=this.at(0);return this.remove(n,e)}get(e){if(e==null)return null;const n=typeof e=="string"||typeof e=="number"?e:e.id;return this.map[n]||null}has(e){return this.get(e)!=null}at(e){return e<0&&(e+=this.length),this.cells[e]||null}first(){return this.at(0)}last(){return this.at(-1)}indexOf(e){return this.cells.indexOf(e)}toArray(){return this.cells.slice()}sort(e={}){return this.comparator!=null&&(this.cells=XOt(this.cells,this.comparator),e.silent||this.trigger("sorted")),this}clone(){const e=this.constructor;return new e(this.cells.slice(),{comparator:this.comparator})}reference(e){this.map[e.id]=e,e.on("*",this.notifyCellEvent,this)}unreference(e){e.off("*",this.notifyCellEvent,this),delete this.map[e.id]}notifyCellEvent(e,n){const r=n.cell;this.trigger(`cell:${e}`,n),r&&(r.isNode()?this.trigger(`node:${e}`,Object.assign(Object.assign({},n),{node:r})):r.isEdge()&&this.trigger(`edge:${e}`,Object.assign(Object.assign({},n),{edge:r})))}clean(){this.length=0,this.cells=[],this.map={}}dispose(){this.reset([])}}q2t([Ez.dispose()],Ez.prototype,"dispose",null);var Y2t=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class vf extends cd{get[Symbol.toStringTag](){return vf.toStringTag}constructor(e=[]){super(),this.batches={},this.addings=new WeakMap,this.nodes={},this.edges={},this.outgoings={},this.incomings={},this.collection=new Ez(e),this.setup()}notify(e,n){this.trigger(e,n);const r=this.graph;return r&&(e==="sorted"||e==="reseted"||e==="updated"?r.trigger(`model:${e}`,n):r.trigger(e,n)),this}setup(){const e=this.collection;e.on("sorted",()=>this.notify("sorted",null)),e.on("updated",n=>this.notify("updated",n)),e.on("cell:change:zIndex",()=>this.sortOnChangeZ()),e.on("added",({cell:n})=>{this.onCellAdded(n)}),e.on("removed",n=>{const r=n.cell;this.onCellRemoved(r,n.options),this.notify("cell:removed",n),r.isNode()?this.notify("node:removed",Object.assign(Object.assign({},n),{node:r})):r.isEdge()&&this.notify("edge:removed",Object.assign(Object.assign({},n),{edge:r}))}),e.on("reseted",n=>{this.onReset(n.current),this.notify("reseted",n)}),e.on("edge:change:source",({edge:n})=>this.onEdgeTerminalChanged(n,"source")),e.on("edge:change:target",({edge:n})=>{this.onEdgeTerminalChanged(n,"target")})}sortOnChangeZ(){this.collection.sort()}onCellAdded(e){const n=e.id;e.isEdge()?(e.updateParent(),this.edges[n]=!0,this.onEdgeTerminalChanged(e,"source"),this.onEdgeTerminalChanged(e,"target")):this.nodes[n]=!0}onCellRemoved(e,n){const r=e.id;if(e.isEdge()){delete this.edges[r];const o=e.getSource(),i=e.getTarget();if(o&&o.cell){const s=this.outgoings[o.cell],a=s?s.indexOf(r):-1;a>=0&&(s.splice(a,1),s.length===0&&delete this.outgoings[o.cell])}if(i&&i.cell){const s=this.incomings[i.cell],a=s?s.indexOf(r):-1;a>=0&&(s.splice(a,1),s.length===0&&delete this.incomings[i.cell])}}else delete this.nodes[r];
538n.clear||(n.disconnectEdges?this.disconnectConnectedEdges(e,n):this.removeConnectedEdges(e,n)),e.model===this&&(e.model=null)}onReset(e){this.nodes={},this.edges={},this.outgoings={},this.incomings={},e.forEach(n=>this.onCellAdded(n))}onEdgeTerminalChanged(e,n){const r=n==="source"?this.outgoings:this.incomings,o=e.previous(n);if(o&&o.cell){const s=Ur.isCell(o.cell)?o.cell.id:o.cell,a=r[s],l=a?a.indexOf(e.id):-1;l>=0&&(a.splice(l,1),a.length===0&&delete r[s])}const i=e.getTerminal(n);if(i&&i.cell){const s=Ur.isCell(i.cell)?i.cell.id:i.cell,a=r[s]||[];a.indexOf(e.id)===-1&&a.push(e.id),r[s]=a}}prepareCell(e,n){return!e.model&&(!n||!n.dryrun)&&(e.model=this),e.zIndex==null&&e.setZIndex(this.getMaxZIndex()+1,{silent:!0}),e}resetCells(e,n={}){return e.map(r=>this.prepareCell(r,Object.assign(Object.assign({},n),{dryrun:!0}))),this.collection.reset(e,n),e.map(r=>this.prepareCell(r,{options:n})),this}clear(e={}){const n=this.getCells();if(n.length===0)return this;const r=Object.assign(Object.assign({},e),{clear:!0});return this.batchUpdate("clear",()=>{const o=n.sort((i,s)=>{const a=i.isEdge()?1:2,l=s.isEdge()?1:2;return a-l});for(;o.length>0;){const i=o.shift();i&&i.remove(r)}},r),this}addNode(e,n={}){const r=_a.isNode(e)?e:this.createNode(e);return this.addCell(r,n),r}updateNode(e,n={}){const r=this.createNode(e),o=r.getProp();return r.dispose(),this.updateCell(o,n)}createNode(e){return _a.create(e)}addEdge(e,n={}){const r=Ss.isEdge(e)?e:this.createEdge(e);return this.addCell(r,n),r}createEdge(e){return Ss.create(e)}updateEdge(e,n={}){const r=this.createEdge(e),o=r.getProp();return r.dispose(),this.updateCell(o,n)}addCell(e,n={}){return Array.isArray(e)?this.addCells(e,n):(!this.collection.has(e)&&!this.addings.has(e)&&(this.addings.set(e,!0),this.collection.add(this.prepareCell(e,n),n),e.eachChild(r=>this.addCell(r,n)),this.addings.delete(e)),this)}addCells(e,n={}){const r=e.length;if(r===0)return this;const o=Object.assign(Object.assign({},n),{position:r-1,maxPosition:r-1});return this.startBatch("add",Object.assign(Object.assign({},o),{cells:e})),e.forEach(i=>{this.addCell(i,o),o.position-=1}),this.stopBatch("add",Object.assign(Object.assign({},o),{cells:e})),this}updateCell(e,n={}){const r=e.id&&this.getCell(e.id);return r?this.batchUpdate("update",()=>(Object.entries(e).forEach(([o,i])=>r.setProp(o,i,n)),!0),e):!1}removeCell(e,n={}){const r=typeof e=="string"?this.getCell(e):e;return r&&this.has(r)?this.collection.remove(r,n):null}updateCellId(e,n){if(e.id===n)return;this.startBatch("update",{id:n}),e.prop("id",n);const r=e.clone({keepId:!0});return this.addCell(r),this.getConnectedEdges(e).forEach(i=>{const s=i.getSourceCell(),a=i.getTargetCell();s===e&&i.setSource(Object.assign(Object.assign({},i.getSource()),{cell:n})),a===e&&i.setTarget(Object.assign(Object.assign({},i.getTarget()),{cell:n}))}),this.removeCell(e),this.stopBatch("update",{id:n}),r}removeCells(e,n={}){return e.length?this.batchUpdate("remove",()=>e.map(r=>this.removeCell(r,n))):[]}removeConnectedEdges(e,n={}){const r=this.getConnectedEdges(e);return r.forEach(o=>{o.remove(n)}),r}disconnectConnectedEdges(e,n={}){const r=typeof e=="string"?e:e.id;this.getConnectedEdges(e).forEach(o=>{const i=o.getSourceCellId(),s=o.getTargetCellId();i===r&&o.setSource({x:0,y:0},n),s===r&&o.setTarget({x:0,y:0},n)})}has(e){return this.collection.has(e)}total(){return this.collection.length}indexOf(e){return this.collection.indexOf(e)}getCell(e){return this.collection.get(e)}getCells(){return this.collection.toArray()}getFirstCell(){return this.collection.first()}getLastCell(){return this.collection.last()}getMinZIndex(){const e=this.collection.first();return e&&e.getZIndex()||0}getMaxZIndex(){const e=this.collection.last();return e&&e.getZIndex()||0}getCellsFromCache(e){return e?Object.keys(e).map(n=>this.getCell(n)).filter(n=>n!=null):[]}getNodes(){return this.getCellsFromCache(this.nodes)}getEdges(){return this.getCellsFromCache(this.edges)}getOutgoingEdges(e){const n=typeof e=="string"?e:e.id,r=this.outgoings[n];return r?r.map(o=>this.getCell(o)).filter(o=>o&&o.isEdge()):null}getIncomingEdges(e){const n=typeof e=="string"?e:e.id,r=this.incomings[n];return r?r.map(o=>this.getCell(o)).filter(o=>
538o&&o.isEdge()):null}getConnectedEdges(e,n={}){const r=[],o=typeof e=="string"?this.getCell(e):e;if(o==null)return r;const i={},s=n.indirect;let a=n.incoming,l=n.outgoing;a==null&&l==null&&(a=l=!0);const c=(u,d)=>{const h=d?this.getOutgoingEdges(u):this.getIncomingEdges(u);if(h?.forEach(f=>{i[f.id]||(r.push(f),i[f.id]=!0,s&&(a&&c(f,!1),l&&c(f,!0)))}),s&&u.isEdge()){const f=d?u.getTargetCell():u.getSourceCell();f&&f.isEdge()&&(i[f.id]||(r.push(f),c(f,d)))}};if(l&&c(o,!0),a&&c(o,!1),n.deep){const u=o.getDescendants({deep:!0}),d={};u.forEach(f=>{f.isNode()&&(d[f.id]=!0)});const h=(f,p)=>{const m=p?this.getOutgoingEdges(f.id):this.getIncomingEdges(f.id);m?.forEach(y=>{if(!i[y.id]){const v=y.getSourceCell(),b=y.getTargetCell();if(!n.enclosed&&v&&d[v.id]&&b&&d[b.id])return;r.push(y),i[y.id]=!0}})};u.forEach(f=>{f.isEdge()||(l&&h(f,!0),a&&h(f,!1))})}return r}isBoundary(e,n){const r=typeof e=="string"?this.getCell(e):e,o=n?this.getIncomingEdges(r):this.getOutgoingEdges(r);return o==null||o.length===0}getBoundaryNodes(e){const n=[];return Object.keys(this.nodes).forEach(r=>{if(this.isBoundary(r,e)){const o=this.getCell(r);o&&n.push(o)}}),n}getRoots(){return this.getBoundaryNodes(!0)}getLeafs(){return this.getBoundaryNodes(!1)}isRoot(e){return this.isBoundary(e,!0)}isLeaf(e){return this.isBoundary(e,!1)}getNeighbors(e,n={}){let r=n.incoming,o=n.outgoing;r==null&&o==null&&(r=o=!0);const s=this.getConnectedEdges(e,n).reduce((a,l)=>{const c=l.hasLoop(n),u=l.getSourceCell(),d=l.getTargetCell();return r&&u&&u.isNode()&&!a[u.id]&&(c||u!==e&&(!n.deep||!u.isDescendantOf(e)))&&(a[u.id]=u),o&&d&&d.isNode()&&!a[d.id]&&(c||d!==e&&(!n.deep||!d.isDescendantOf(e)))&&(a[d.id]=d),a},{});if(e.isEdge()){if(r){const a=e.getSourceCell();a&&a.isNode()&&!s[a.id]&&(s[a.id]=a)}if(o){const a=e.getTargetCell();a&&a.isNode()&&!s[a.id]&&(s[a.id]=a)}}return Object.keys(s).map(a=>s[a])}isNeighbor(e,n,r={}){let o=r.incoming,i=r.outgoing;return o==null&&i==null&&(o=i=!0),this.getConnectedEdges(e,r).some(s=>{const a=s.getSourceCell(),l=s.getTargetCell();return!!(o&&a&&a.id===n.id||i&&l&&l.id===n.id)})}getSuccessors(e,n={}){const r=[];return this.search(e,(o,i)=>{o!==e&&this.matchDistance(i,n.distance)&&r.push(o)},Object.assign(Object.assign({},n),{outgoing:!0})),r}isSuccessor(e,n,r={}){let o=!1;return this.search(e,(i,s)=>{if(i===n&&i!==e&&this.matchDistance(s,r.distance))return o=!0,!1},Object.assign(Object.assign({},r),{outgoing:!0})),o}getPredecessors(e,n={}){const r=[];return this.search(e,(o,i)=>{o!==e&&this.matchDistance(i,n.distance)&&r.push(o)},Object.assign(Object.assign({},n),{incoming:!0})),r}isPredecessor(e,n,r={}){let o=!1;return this.search(e,(i,s)=>{if(i===n&&i!==e&&this.matchDistance(s,r.distance))return o=!0,!1},Object.assign(Object.assign({},r),{incoming:!0})),o}matchDistance(e,n){return n==null?!0:typeof n=="function"?n(e):Array.isArray(n)&&n.includes(e)?!0:e===n}getCommonAncestor(...e){const n=[];return e.forEach(r=>{r&&(Array.isArray(r)?n.push(...r):n.push(r))}),Ur.getCommonAncestor(...n)}getSubGraph(e,n={}){const r=[],o={},i=[],s=[],a=l=>{o[l.id]||(r.push(l),o[l.id]=l,l.isEdge()&&s.push(l),l.isNode()&&i.push(l))};return e.forEach(l=>{a(l),n.deep&&l.getDescendants({deep:!0}).forEach(u=>a(u))}),s.forEach(l=>{const c=l.getSourceCell(),u=l.getTargetCell();c&&!o[c.id]&&(r.push(c),o[c.id]=c,c.isNode()&&i.push(c)),u&&!o[u.id]&&(r.push(u),o[u.id]=u,u.isNode()&&i.push(u))}
538),i.forEach(l=>{this.getConnectedEdges(l,n).forEach(u=>{const d=u.getSourceCell(),h=u.getTargetCell();!o[u.id]&&d&&o[d.id]&&h&&o[h.id]&&(r.push(u),o[u.id]=u)})}),r}cloneSubGraph(e,n={}){const r=this.getSubGraph(e,n);return this.cloneCells(r)}cloneCells(e){return Ur.cloneCells(e)}getNodesFromPoint(e,n){const r=typeof e=="number"?{x:e,y:n||0}:e;return this.getNodes().filter(o=>o.getBBox().containsPoint(r))}getNodesInArea(e,n,r,o,i){const s=typeof e=="number"?new Gt(e,n,r,o):Gt.create(e),a=typeof e=="number"?i:n,l=a&&a.strict;return this.getNodes().filter(c=>{const u=c.getBBox();return l?s.containsRect(u):s.isIntersectWithRect(u)})}getEdgesInArea(e,n,r,o,i){const s=typeof e=="number"?new Gt(e,n,r,o):Gt.create(e),a=typeof e=="number"?i:n,l=a&&a.strict;return this.getEdges().filter(c=>{const u=c.getBBox();return u.width===0?u.inflate(1,0):u.height===0&&u.inflate(0,1),l?s.containsRect(u):s.isIntersectWithRect(u)})}getNodesUnderNode(e,n={}){const r=e.getBBox();return(n.by==null||n.by==="bbox"?this.getNodesInArea(r):this.getNodesFromPoint(r[n.by])).filter(i=>e.id!==i.id&&!i.isDescendantOf(e))}getAllCellsBBox(){return this.getCellsBBox(this.getCells())}getCellsBBox(e,n={}){return Ur.getCellsBBox(e,n)}search(e,n,r={}){r.breadthFirst?this.breadthFirstSearch(e,n,r):this.depthFirstSearch(e,n,r)}breadthFirstSearch(e,n,r={}){const o=[],i={},s={};for(o.push(e),s[e.id]=0;o.length>0;){const a=o.shift();if(a==null||i[a.id]||(i[a.id]=!0,Jn(n,this,a,s[a.id])===!1))continue;this.getNeighbors(a,r).forEach(c=>{s[c.id]=s[a.id]+1,o.push(c)})}}depthFirstSearch(e,n,r={}){const o=[],i={},s={};for(o.push(e),s[e.id]=0;o.length>0;){const a=o.pop();if(a==null||i[a.id]||(i[a.id]=!0,Jn(n,this,a,s[a.id])===!1))continue;const l=this.getNeighbors(a,r),c=o.length;l.forEach(u=>{s[u.id]=s[a.id]+1,o.splice(c,0,u)})}}getShortestPath(e,n,r={}){const o={};
538this.getEdges().forEach(c=>{const u=c.getSourceCellId(),d=c.getTargetCellId();u&&d&&(o[u]||(o[u]=[]),o[d]||(o[d]=[]),o[u].push(d),r.directed||o[d].push(u))});const i=typeof e=="string"?e:e.id,s=yz.run(o,i,r.weight),a=[];let l=typeof n=="string"?n:n.id;for(s[l]&&a.push(l);l=s[l];)a.unshift(l);return a}translate(e,n,r){return this.getCells().filter(o=>!o.hasParent()).forEach(o=>o.translate(e,n,r)),this}resize(e,n,r){return this.resizeCells(e,n,this.getCells(),r)}resizeCells(e,n,r,o={}){const i=this.getCellsBBox(r);if(i){const s=Math.max(e/i.width,0),a=Math.max(n/i.height,0),l=i.getOrigin();r.forEach(c=>c.scale(s,a,l,o))}return this}toJSON(e={}){return vf.toJSON(this.getCells(),e)}parseJSON(e){return vf.fromJSON(e)}fromJSON(e,n={}){const r=this.parseJSON(e);return this.resetCells(r,n),this}startBatch(e,n={}){return this.batches[e]=(this.batches[e]||0)+1,this.notify("batch:start",{name:e,data:n}),this}stopBatch(e,n={}){return this.batches[e]=(this.batches[e]||0)-1,this.notify("batch:stop",{name:e,data:n}),this}batchUpdate(e,n,r={}){this.startBatch(e,r);const o=n();return this.stopBatch(e,r),o}hasActiveBatch(e=Object.keys(this.batches)){return(Array.isArray(e)?e:[e]).some(r=>this.batches[r]>0)}dispose(){this.collection.dispose()}}Y2t([vf.dispose()],vf.prototype,"dispose",null);(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&typeof o.addNode=="function"&&typeof o.addEdge=="function"&&o.collection!=null}t.isModel=e})(vf||(vf={}));(function(t){function e(r,o={}){return{cells:r.map(i=>i.toJSON(o))}}t.toJSON=e;function n(r){const o=[];return Array.isArray(r)?o.push(...r):(r.cells&&o.push(...r.cells),r.nodes&&r.nodes.forEach(i=>{i.shape==null&&(i.shape="rect"),o.push(i)}
538),r.edges&&r.edges.forEach(i=>{i.shape==null&&(i.shape="edge"),o.push(i)})),o.map(i=>{const s=i.shape;if(s){if(_a.registry.exist(s))return _a.create(i);if(Ss.registry.exist(s))return Ss.create(i)}throw new Error("The `shape` should be specified when creating a node/edge instance")})}t.fromJSON=n})(vf||(vf={}));var X2t=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let n0=class extends _a{get label(){return this.getLabel()}set label(e){this.setLabel(e)}getLabel(){return this.getAttrByPath("text/text")}setLabel(e,n){return e==null?this.removeLabel():this.setAttrByPath("text/text",e,n),this}removeLabel(){return this.removeAttrByPath("text/text"),this}};(function(t){t.bodyAttr={fill:"#ffffff",stroke:"#333333",strokeWidth:2},t.labelAttr={fontSize:14,fill:"#000000",refX:.5,refY:.5,textAnchor:"middle",textVerticalAnchor:"middle",fontFamily:"Arial, helvetica, sans-serif"},t.config({attrs:{text:Object.assign({},t.labelAttr)},propHooks(e){const{label:n}=e,r=X2t(e,["label"]);return n&&Lw(r,"attrs/text/text",n),r},visible:!0})})(n0||(n0={}));var K2t=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function Q2t(t,e="body"){return[{tagName:t,selector:e},{tagName:"text",selector:"label"}]}function Z2t(t="xlink:href"){return n=>{const{imageUrl:r,imageWidth:o,imageHeight:i}=n,s=K2t(n,["imageUrl","imageWidth","imageHeight"]);if(r!=null||o!=null||i!=null){const a=()=>{if(s.attrs){const l=s.attrs.image;r!=null&&(l[t]=r),o!=null&&(l.width=o),i!=null&&(l.height=i),s.attrs.image=l}};s.attrs?(s.attrs.image==null&&(s.attrs.image={}),a()):(s.attrs={image:{}},a())}return s}}function Bw(t,e,n={}){const r={constructorName:t,markup:Q2t(t,n.selector),attrs:{[t]:Object.assign({},n0.bodyAttr)}};return(n.parent||n0).define(Ks(r,e,{shape:t}))}Bw("rect",{attrs:{body:{refWidth:"100%",refHeight:"100%"}}});const J2t=Ss.define({shape:"edge",markup:[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}],attrs:{lines:{connection:!0,strokeLinejoin:"round"},wrap:{strokeWidth:10},line:{stroke:"#333",strokeWidth:2,targetMarker:"classic"}}});Bw("ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%"}}});var ekt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class kx extends n0{get points(){return this.getPoints()}set points(e){this.setPoints(e)}getPoints(){return this.getAttrByPath("body/refPoints")}
538setPoints(e,n){return e==null?this.removePoints():this.setAttrByPath("body/refPoints",kx.pointsToString(e),n),this}removePoints(){return this.removeAttrByPath("body/refPoints"),this}}(function(t){function e(n){return typeof n=="string"?n:n.map(r=>Array.isArray(r)?r.join(","):De.isPointLike(r)?`${r.x}, ${r.y}`:"").join(" ")}t.pointsToString=e,t.config({propHooks(n){const{points:r}=n,o=ekt(n,["points"]);if(r){const i=e(r);i&&Lw(o,"attrs/body/refPoints",i)}return o}})})(kx||(kx={}));Bw("polygon",{},{parent:kx});Bw("polyline",{},{parent:kx});var tkt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};n0.define({shape:"path",markup:[{tagName:"rect",selector:"bg"},{tagName:"path",selector:"body"},{tagName:"text",selector:"label"}],attrs:{bg:{refWidth:"100%",refHeight:"100%",fill:"none",stroke:"none",pointerEvents:"all"},body:{fill:"none",stroke:"#000",strokeWidth:2}},propHooks(t){const{path:e}=t,n=tkt(t,["path"]);return e&&Lw(n,"attrs/body/refD",e),n}});var nkt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};n0.define({shape:"text-block",markup:[{tagName:"rect",selector:"body"},Qv.SUPPORT_FOREIGNOBJECT?{tagName:"foreignObject",selector:"foreignObject",children:[{tagName:"div",ns:ja.xhtml,selector:"label",style:{width:"100%",height:"100%",position:"static",backgroundColor:"transparent",textAlign:"center",margin:0,padding:"0px 5px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}]}:{tagName:"text",selector:"label",attrs:{textAnchor:"middle"}}],attrs:{body:Object.assign(Object.assign({},n0.bodyAttr),{refWidth:"100%",refHeight:"100%"}),foreignObject:{refWidth:"100%",refHeight:"100%"},label:{style:{fontSize:14}}},propHooks(t){const{text:e}=t,n=nkt(t,["text"]);return e&&Lw(n,"attrs/label/text",e),n},attrHooks:{text:{set(t,{cell:e,view:n,refBBox:r,elem:o,attrs:i}){if(o instanceof HTMLElement)o.textContent=t;else{const s=i.style||{},a={text:t,width:-5,height:"100%"},l=Object.assign({textVerticalAnchor:"middle"},s),c=qp.presets.textWrap;return Jn(c.set,this,a,{cell:e,view:n,elem:o,refBBox:r,attrs:l}),{fill:s.color||null}}},position(t,{refBBox:e,elem:n}){if(n instanceof SVGElement)return e.getCenter()}}}});Bw("image",{attrs:{image:{refWidth:"100%",refHeight:"100%"}},propHooks:Z2t()},{selector:"image"});Bw("circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%"}}});class Tf extends Ds{constructor(){super(...arguments),this.portsCache={}}get[Symbol.toStringTag](){return Tf.toStringTag}getContainerClassName(){const e=[super.getContainerClassName(),this.prefixClassName("node")];return this.can("nodeMovable")||e.push(this.prefixClassName("node-immovable")),e.join(" ")}updateClassName(e){const n=e.target;if(n.hasAttribute("magnet")){const r=this.prefixClassName("port-unconnectable");this.can("magnetConnectable")?fh(n,r):ro(n,r)}else{const r=this.prefixClassName("node-immovable");this.can("nodeMovable")?this.removeClass(r):this.addClass(r)}}isNodeView(){return!0}confirmUpdate(e,n={}){let r=e;return this.hasAction(r,"ports")&&(this.removePorts(),this.cleanPortsCache()),this.hasAction(r,"render")?(this.render(),r=this.removeAction(r,["render","update","resize","translate","rotate","ports","tools"])):(r=this.handleAction(r,"resize",()=>this.resize(),"update"),r=this.handleAction(r,"update",()=>this.update(),"ports"),r=this.handleAction(r,"translate",()=>this.translate()),r=this.handleAction(r,"rotate",()=>this.rotate()),r=this.handleAction(r,"ports",()=>this.renderPorts()),r=this.handleAction(r,"tools",()=>{this.getFlag("tools")===e?this.renderTools():this.updateTools(n)})),r}update(e){this.cleanCache(),this.removePorts();const n=this.cell,r=n.getSize(),o=n.getAttrs();this.updateAttrs(this.container,o,{attrs:e===o?null:e,rootBBox:new Gt(0,0,r.width,r.height),selectors:this.selectors}),this.renderPorts()}renderMarkup(){const e=this.cell.markup;if(e){if(typeof e=="string")throw new TypeError("Not support string markup.");return this.renderJSONMarkup(e)}throw new TypeError("Invalid node markup.")}renderJSONMarkup(e){const n=this.parseJSONMarkup(e,this.container);this.selectors=n.selectors,this.container.appendChild(n.fragment)}render(){return this.empty(),this.renderMarkup(),this.resize(),this.updateTransform(),this.renderTools(),this}resize(){this.cell.getAngle()&&this.rotate(),this.update()}translate(){this.updateTransform()}rotate(){this.updateTransform()}getTranslationString(){const e=this.cell.getPosition();return`translate(${e.x},${e.y})`}getRotationString(){const e=this.cell.getAngle();if(e){const n=this.cell.getSize();return`rotate(${e},${n.width/2},${n.height/2})`}}updateTransform(){let e=this.getTranslationString();const n=this.getRotationString();n&&(e+=` ${n}`),this.container.setAttribute("transform",e)}findPortElem(e,n){const r=e?this.portsCache[e]:null;if(!r)return null;const o=r.portContentElement,i=r.portContentSelectors||{};return this.findOne(n,o,i)}cleanPortsCache(){this.portsCache={}}
538removePorts(){Object.values(this.portsCache).forEach(e=>{Ex(e.portElement)})}renderPorts(){const e=this.container,n=[];e.childNodes.forEach(s=>{n.push(s)});const r=this.cell.getParsedPorts(),o=wte(r,"zIndex"),i="auto";o[i]&&o[i].forEach(s=>{const a=this.getPortElement(s);e.append(a),n.push(a)}),Object.keys(o).forEach(s=>{if(s!==i){const a=parseInt(s,10);this.appendPorts(o[s],a,n)}}),this.updatePorts()}appendPorts(e,n,r){const o=e.map(i=>this.getPortElement(i));r[n]||n<0?w8(r[Math.max(n,0)],o):WR(this.container,o)}getPortElement(e){const n=this.portsCache[e.id];return n?n.portElement:this.createPortElement(e)}createPortElement(e){let n=Oi.renderMarkup(this.cell.getPortContainerMarkup());const r=n.elem;if(r==null)throw new Error("Invalid port container markup.");n=Oi.renderMarkup(this.getPortMarkup(e));const o=n.elem,i=n.selectors;if(o==null)throw new Error("Invalid port markup.");this.setAttrs({port:e.id,"port-group":e.group},o);let s="x6-port";e.group&&(s+=` x6-port-${e.group}`),ro(r,s),ro(r,"x6-port"),ro(o,"x6-port-body"),r.appendChild(o);let a=i,l,c;if(this.existPortLabel(e)){if(n=Oi.renderMarkup(this.getPortLabelMarkup(e.label)),l=n.elem,c=n.selectors,l==null)throw new Error("Invalid port label markup.");if(i&&c){for(const d in c)if(i[d]&&d!==this.rootSelector)throw new Error("Selectors within port must be unique.");a=Object.assign(Object.assign({},i),c)}ro(l,"x6-port-label"),r.appendChild(l)}return this.portsCache[e.id]={portElement:r,portSelectors:a,portLabelElement:l,portLabelSelectors:c,portContentElement:o,portContentSelectors:i},this.graph.options.onPortRendered&&this.graph.options.onPortRendered({port:e,node:this.cell,container:r,selectors:a,labelContainer:l,labelSelectors:c,contentContainer:o,contentSelectors:i}),r}updatePorts(){const e=this.cell.getParsedGroups(),n=Object.keys(e);n.length===0?this.updatePortGroup():n.forEach(r=>this.updatePortGroup(r))}updatePortGroup(e){const n=Gt.fromSize(this.cell.getSize()),r=this.cell.getPortsLayoutByGroup(e,n);for(let o=0,i=r.length;o<i;o+=1){const s=r[o],a=s.portId,l=this.portsCache[a]||{},c=s.portLayout;if(this.applyPortTransform(l.portElement,c),s.portAttrs!=null){const d={selectors:l.portSelectors||{}};s.portSize&&(d.rootBBox=Gt.fromSize(s.portSize)),this.updateAttrs(l.portElement,s.portAttrs,d)}const u=s.labelLayout;if(u&&l.portLabelElement&&(this.applyPortTransform(l.portLabelElement,u,-(c.angle||0)),u.attrs)){const d={selectors:l.portLabelSelectors||{}};s.labelSize&&(d.rootBBox=Gt.fromSize(s.labelSize)),this.updateAttrs(l.portLabelElement,u.attrs,d)}}}applyPortTransform(e,n,r=0){const o=n.angle,i=n.position,s=Qa().rotate(r).translate(i.x||0,i.y||0).rotate(o||0);xx(e,s,{absolute:!0})}getPortMarkup(e){return e.markup||this.cell.portMarkup}getPortLabelMarkup(e){return e.markup||this.cell.portLabelMarkup}existPortLabel(e){return e.attrs&&e.attrs.text}getEventArgs(e,n,r){const o=this,i=o.cell,s=i;return n==null||r==null?{e,view:o,node:i,cell:s}:{e,x:n,y:r,view:o,node:i,cell:s}}getPortEventArgs(e,n,r){const o=this,i=o.cell,s=i;return r?{e,x:r.x,y:r.y,view:o,node:i,cell:s,port:n}:{e,view:o,node:i,cell:s,port:n}}notifyMouseDown(e,n,r){super.onMouseDown(e,n,r),this.notify("node:mousedown",this.getEventArgs(e,n,r))}notifyMouseMove(e,n,r){super.onMouseMove(e,n,r),this.notify("node:mousemove",this.getEventArgs(e,n,r))}notifyMouseUp(e,n,r){super.onMouseUp(e,n,r),this.notify("node:mouseup",this.getEventArgs(e,n,r))}notifyPortEvent(e,n,r){const o=this.findAttr("port",n.target);if(o){const i=n.type;e==="node:port:mouseenter"?n.type="mouseenter":e==="node:port:mouseleave"&&(n.type="mouseleave"),this.notify(e,this.getPortEventArgs(n,o,r)),n.type=i}}onClick(e,n,r){super.onClick(e,n,r),this.notify("node:click",this.getEventArgs(e,n,r)),this.notifyPortEvent("node:port:click",e,{x:n,y:r})}onDblClick(e,n,r){super.onDblClick(e,n,r),this.notify("node:dblclick",this.getEventArgs(e,n,r)),this.notifyPortEvent("node:port:dblclick",e,{x:n,y:r})}onContextMenu(e,n,r){super.onContextMenu(e,n,r),this.notify("node:contextmenu",this.getEventArgs(e,n,r)),this.notifyPortEvent("node:port:contextmenu",e,{x:n,y:r})}onMouseDown(e,n,r){this.isPropagationStopped(e)||(this.notifyMouseDown(e,n,r),this.notifyPortEvent("node:port:mousedown",e,{x:n,y:r}),this.startNodeDragging(e,n,r))}onMouseMove(e,n,r){const o=this.getEventData(e),i=o.action;if(i==="magnet")this.dragMagnet(e,n,r);else{if(i==="move"){const a=o.targetView||this;a.dragNode(e,n,r),a.notify("node:moving",{e,x:n,y:r,view:a,cell:a.cell,
538node:a.cell})}this.notifyMouseMove(e,n,r),this.notifyPortEvent("node:port:mousemove",e,{x:n,y:r})}this.setEventData(e,o)}onMouseUp(e,n,r){const o=this.getEventData(e),i=o.action;i==="magnet"?this.stopMagnetDragging(e,n,r):(this.notifyMouseUp(e,n,r),this.notifyPortEvent("node:port:mouseup",e,{x:n,y:r}),i==="move"&&(o.targetView||this).stopNodeDragging(e,n,r));const s=o.targetMagnet;s&&this.onMagnetClick(e,s,n,r),this.checkMouseleave(e)}onMouseOver(e){super.onMouseOver(e),this.notify("node:mouseover",this.getEventArgs(e)),this.notifyPortEvent("node:port:mouseenter",e),this.notifyPortEvent("node:port:mouseover",e)}onMouseOut(e){super.onMouseOut(e),this.notify("node:mouseout",this.getEventArgs(e)),this.notifyPortEvent("node:port:mouseleave",e),this.notifyPortEvent("node:port:mouseout",e)}onMouseEnter(e){this.updateClassName(e),super.onMouseEnter(e),this.notify("node:mouseenter",this.getEventArgs(e))}onMouseLeave(e){super.onMouseLeave(e),this.notify("node:mouseleave",this.getEventArgs(e))}onMouseWheel(e,n,r,o){super.onMouseWheel(e,n,r,o),this.notify("node:mousewheel",Object.assign({delta:o},this.getEventArgs(e,n,r)))}onMagnetClick(e,n,r,o){const i=this.graph;i.view.getMouseMovedCount(e)>i.options.clickThreshold||this.notify("node:magnet:click",Object.assign({magnet:n},this.getEventArgs(e,r,o)))}onMagnetDblClick(e,n,r,o){this.notify("node:magnet:dblclick",Object.assign({magnet:n},this.getEventArgs(e,r,o)))}onMagnetContextMenu(e,n,r,o){this.notify("node:magnet:contextmenu",Object.assign({magnet:n},this.getEventArgs(e,r,o)))}onMagnetMouseDown(e,n,r,o){this.startMagnetDragging(e,r,o)}onCustomEvent(e,n,r,o){this.notify("node:customevent",Object.assign({name:n},this.getEventArgs(e,r,o))),super.onCustomEvent(e,n,r,o)}prepareEmbedding(e){const n=this.graph,o=this.getEventData(e).cell||this.cell,i=n.findViewByCell(o),s=n.snapToGrid(e.clientX,e.clientY);this.notify("node:embed",{e,node:o,view:i,cell:o,x:s.x,y:s.y,currentParent:o.getParent()})}processEmbedding(e,n){const r=n.cell||this.cell,o=n.graph||this.graph,i=o.options.embedding,s=i.findParent;let a=typeof s=="function"?Jn(s,o,{view:this,node:this.cell}).filter(h=>Ur.isCell(h)&&this.cell.id!==h.id&&!h.isDescendantOf(this.cell)):o.model.getNodesUnderNode(r,{by:s});if(i.frontOnly&&a.length>0){const h=wte(a,"zIndex"),f=zOt(Object.keys(h).map(p=>parseInt(p,10)));f&&(a=h[f])}a=a.filter(h=>h.visible);let l=null;const c=n.candidateEmbedView,u=i.validate;for(let h=a.length-1;h>=0;h-=1){const f=a[h];if(c&&c.cell.id===f.id){l=c;break}else{const p=f.findView(o);if(u&&Jn(u,o,{child:this.cell,parent:p.cell,childView:this,parentView:p})){l=p;break}}}this.clearEmbedding(n),l&&l.highlight(null,{type:"embedding"}),n.candidateEmbedView=l;const d=o.snapToGrid(e.clientX,e.clientY);this.notify("node:embedding",{e,cell:r,node:r,view:o.findViewByCell(r),x:d.x,y:d.y,currentParent:r.getParent(),candidateParent:l?l.cell:null})}clearEmbedding(e){const n=e.candidateEmbedView;n&&(n.unhighlight(null,{type:"embedding"}),e.candidateEmbedView=null)}finalizeEmbedding(e,n){this.graph.startBatch("embedding");const r=n.cell||this.cell,o=n.graph||this.graph,i=o.findViewByCell(r),s=r.getParent(),a=n.candidateEmbedView;if(a?(a.unhighlight(null,{type:"embedding"}),n.candidateEmbedView=null,(s==null||s.id!==a.cell.id)&&a.cell.insertChild(r,void 0,{ui:!0})):s&&s.unembed(r,{ui:!0}),o.model.getConnectedEdges(r,{deep:!0}).forEach(l=>{l.updateParent({ui:!0})}),i&&a){const l=o.snapToGrid(e.clientX,e.clientY);i.notify("node:embedded",{e,cell:r,x:l.x,y:l.y,node:r,view:o.findViewByCell(r),previousParent:s,currentParent:r.getParent()})}this.graph.stopBatch("embedding")}getDelegatedView(){let e=this.cell,n=this;for(;n&&!e.isEdge();){if(!e.hasParent()||n.can("stopDelegateOnDragging"))return n;e=e.getParent(),n=this.graph.findViewByCell(e)}return null}validateMagnet(e,n,r){if(n.getAttribute("magnet")!=="passive"){const o=this.graph.options.connecting.validateMagnet;return o?Jn(o,this.graph,{e:r,magnet:n,view:e,cell:e.cell}):!0}return!1}startMagnetDragging(e,n,r){if(!this.can("magnetConnectable"))return;e.stopPropagation();const o=e.currentTarget,i=this.graph;this.setEventData(e,{targetMagnet:o}),this.validateMagnet(this,o,e)?(i.options.magnetThreshold<=0&&this.startConnectting(e,o,n,r),this.setEventData(e,{action:"magnet"}),this.stopPropagation(e)):this.onMouseDown(e,n,r),i.view.delegateDragEvents(e,this)}startConnectting(e,n,r,o){this.graph.model.startBatch("add-edge");const i=this.createEdgeFromMagnet(n,r,o);i.setEventData(e,i.prepareArrowheadDragging("target",{x:r,y:o,isNewEdge:!0,fallbackAction:"remove"})),this.setEventData(e,{edgeView:i}),i.notifyMouseDown(e,r,o)}getDefaultEdge(e,n){let r;const o=this.graph.options.connecting.createEdge;return o&&(r=Jn(o,this.graph,{sourceMagnet:n,sourceView:e,sourceCell:e.cell})),r}createEdgeFromMagnet(e,n,r){const o=this.graph,i=o.model,s=this.getDefaultEdge(this,e);return s.setSource(Object.assign(Object.assign({},s.getSource()),this.getEdgeTerminal(e,n,r,s,"source"))),s.setTarget(Object.assign(Object.assign({},s.getTarget()),{x:n,y:r})),s.addTo(i,{async:!1,ui:!0}),s.findView(o)}dragMagnet(e,n,r){const o=this.getEventData(e),i=o.edgeView;if(i)i.onMouseMove(e,n,r),this.autoScrollGraph(e.clientX,e.clientY);else{const s=this.graph,a=s.options.magnetThreshold,l=this.getEventTarget(e),c=o.targetMagnet;if(a==="onleave"){if(c===l||c.contains(l))return}else if(s.view.getMouseMovedCount(e)<=a)return;this.startConnectting(e,c,n,r)}}stopMagnetDragging(e,n,r){const i=this.eventData(e).edgeView;i&&(i.onMouseUp(e,n,r),this.graph.model.stopBatch("add-edge"))}notifyUnhandledMouseDown(e,n,r){this.notify("node:unhandled:mousedown",{e,x:n,y:r,view:this,cell:this.cell,node:this.cell})}notifyNodeMove(e,n,r,o,i){let s=[i];const a=this.graph.getPlugin("selection");if(a&&a.isSelectionMovable()){const l=a.getSelectedCells();l.includes(i)&&(s=l.filter(c=>c.isNode()))}s.forEach(l=>{this.notify(e,{e:n,x:r,y:o,cell:l,node:l,view:l.findView(this.graph)})})}getRestrictArea(e){const n=this.graph.options.translating.restrict,r=typeof n=="function"?Jn(n,this.graph,e):n;return typeof r=="number"?this.graph.transform.getGraphArea().inflate(r):r===!0?this.graph.transform.getGraphArea():r||null}startNodeDragging(e,n,r){const o=this.getDelegatedView();if(o==null||!o.can("nodeMovable"))return this.notifyUnhandledMouseDown(e,n,r);this.setEventData(e,{targetView:o,action:"move"});const i=De.create(o.cell.getPosition());o.setEventData(e,{moving:!1,offset:i.diff(n,r),restrict:this.getRestrictArea(o)})}dragNode(e,n,r){const o=this.cell,i=this.graph,s=i.getGridSize(),a=this.getEventData(e),l=a.offset,c=a.restrict;
538a.moving||(a.moving=!0,this.addClass("node-moving"),this.notifyNodeMove("node:move",e,n,r,this.cell)),this.autoScrollGraph(e.clientX,e.clientY);const u=Ko.snapToGrid(n+l.x,s),d=Ko.snapToGrid(r+l.y,s);o.setPosition(u,d,{restrict:c,deep:!0,ui:!0}),i.options.embedding.enabled&&(a.embedding||(this.prepareEmbedding(e),a.embedding=!0),this.processEmbedding(e,a))}stopNodeDragging(e,n,r){const o=this.getEventData(e);o.embedding&&this.finalizeEmbedding(e,o),o.moving&&(this.removeClass("node-moving"),this.notifyNodeMove("node:moved",e,n,r,this.cell)),o.moving=!1,o.embedding=!1}autoScrollGraph(e,n){const r=this.graph.getPlugin("scroller");r&&r.autoScroll(e,n)}}(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&typeof o.isNodeView=="function"&&typeof o.isEdgeView=="function"&&typeof o.confirmUpdate=="function"&&typeof o.update=="function"&&typeof o.findPortElem=="function"&&typeof o.resize=="function"&&typeof o.rotate=="function"&&typeof o.translate=="function"}t.isNodeView=e})(Tf||(Tf={}));Tf.config({isSvgElement:!0,priority:0,bootstrap:["render"],actions:{view:["render"],markup:["render"],attrs:["update"],size:["resize","ports","tools"],angle:["rotate","tools"],position:["translate","tools"],ports:["ports"],tools:["tools"]}});Tf.registry.register("node",Tf,!0);var rkt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class Am extends Ds{constructor(){super(...arguments),this.POINT_ROUNDING=2,this.labelDestroyFn={}}get[Symbol.toStringTag](){return Am.toStringTag}getContainerClassName(){return[super.getContainerClassName(),this.prefixClassName("edge")].join(" ")}get sourceBBox(){const e=this.sourceView;if(!e){const r=this.cell.getSource();return new Gt(r.x,r.y)}const n=this.sourceMagnet;return e.isEdgeElement(n)?new Gt(this.sourceAnchor.x,this.sourceAnchor.y):e.getBBoxOfElement(n||e.container)}get targetBBox(){const e=this.targetView;if(!e){const r=this.cell.getTarget();return new Gt(r.x,r.y)}const n=this.targetMagnet;return e.isEdgeElement(n)?new Gt(this.targetAnchor.x,this.targetAnchor.y):e.getBBoxOfElement(n||e.container)}isEdgeView(){return!0}confirmUpdate(e,n={}){let r=e;if(this.hasAction(r,"source")){if(!this.updateTerminalProperties("source"))return r;r=this.removeAction(r,"source")}if(this.hasAction(r,"target")){if(!this.updateTerminalProperties("target"))return r;r=this.removeAction(r,"target")}return this.hasAction(r,"render")?(this.render(),r=this.removeAction(r,["render","update","labels","tools"]),r):(r=this.handleAction(r,"update",()=>this.update(n)),r=this.handleAction(r,"labels",()=>this.onLabelsChange(n)),r=this.handleAction(r,"tools",()=>this.renderTools()),r)}render(){return this.empty(),this.renderMarkup(),this.labelContainer=null,this.renderLabels(),this.update(),this.renderTools(),this}renderMarkup(){const e=this.cell.markup;if(e){if(typeof e=="string")throw new TypeError("Not support string markup.");return this.renderJSONMarkup(e)}throw new TypeError("Invalid edge markup.")}renderJSONMarkup(e){const n=this.parseJSONMarkup(e,this.container);this.selectors=n.selectors,this.container.append(n.fragment)}customizeLabels(){if(this.labelContainer){const e=this.cell,n=e.labels;for(let r=0,o=n.length;r<o;r+=1){const i=n[r],s=this.labelCache[r],a=this.labelSelectors[r],l=this.graph.options.onEdgeLabelRendered;if(l){const c=l({edge:e,label:i,container:s,selectors:a});c&&(this.labelDestroyFn[r]=c)}}}}destroyCustomizeLabels(){const e=this.cell.labels;if(this.labelCache&&this.labelSelectors&&this.labelDestroyFn)for(let n=0,r=e.length;n<r;n+=1){const o=this.labelDestroyFn[n],i=this.labelCache[n],s=this.labelSelectors[n];o&&i&&s&&o({edge:this.cell,label:e[n],container:i,selectors:s})}this.labelDestroyFn={}}renderLabels(){const e=this.cell,n=e.getLabels(),r=n.length;let o=this.labelContainer;if(this.labelCache={},this.labelSelectors={},r<=0)return o&&o.parentNode&&o.parentNode.removeChild(o),this;o?this.empty(o):(o=Of("g"),this.addClass(this.prefixClassName("edge-labels"),o),this.labelContainer=o);for(let i=0,s=n.length;i<s;i+=1){const a=n[i],l=this.normalizeLabelMarkup(this.parseLabelMarkup(a.markup));let c,u;if(l)c=l.node,u=l.selectors;else{const h=e.getDefaultLabel(),f=this.normalizeLabelMarkup(this.parseLabelMarkup(h.markup));c=f.node,u=f.selectors}c.setAttribute("data-index",`${i}`),o.appendChild(c);const d=this.rootSelector;if(u[d])throw new Error("Ambiguous label root selector.");u[d]=c,this.labelCache[i]=c,this.labelSelectors[i]=u}return o.parentNode==null&&this.container.appendChild(o),this.updateLabels(),this.customizeLabels(),this}onLabelsChange(e={}){this.destroyCustomizeLabels(),this.shouldRerenderLabels(e)?this.renderLabels():this.updateLabels(),this.updateLabelPositions()}shouldRerenderLabels(e={}){const n=this.cell.previous("labels");if(n==null)return!0;
538if("propertyPathArray"in e&&"propertyValue"in e){const r=e.propertyPathArray||[],o=r.length;if(o>1){const i=r[1];if(n[i]){if(o===2)return typeof e.propertyValue=="object"&&aM(e.propertyValue,"markup");if(r[2]!=="markup")return!1}}}return!0}parseLabelMarkup(e){return e?typeof e=="string"?this.parseLabelStringMarkup(e):this.parseJSONMarkup(e):null}parseLabelStringMarkup(e){const n=Qn.createVectors(e),r=document.createDocumentFragment();for(let o=0,i=n.length;o<i;o+=1){const s=n[o].node;r.appendChild(s)}return{fragment:r,selectors:{}}}normalizeLabelMarkup(e){if(e==null)return;const n=e.fragment;if(!(n instanceof DocumentFragment)||!n.hasChildNodes())throw new Error("Invalid label markup.");let r;const o=n.childNodes;return o.length>1||o[0].nodeName.toUpperCase()!=="G"?r=Qn.create("g").append(n):r=Qn.create(o[0]),r.addClass(this.prefixClassName("edge-label")),{node:r.node,selectors:e.selectors}}updateLabels(){if(this.labelContainer){const e=this.cell,n=e.labels,r=this.can("edgeLabelMovable"),o=e.getDefaultLabel();for(let i=0,s=n.length;i<s;i+=1){const a=this.labelCache[i],l=this.labelSelectors[i];a.setAttribute("cursor",r?"move":"default");const c=n[i],u=Ks({},o.attrs,c.attrs);this.updateAttrs(a,u,{selectors:l,rootBBox:c.size?Gt.fromSize(c.size):void 0})}}}renderTools(){const e=this.cell.getTools();return this.addTools(e),this}update(e={}){this.cleanCache(),this.updateConnection(e);const n=this.cell.getAttrs(),r=rkt(n,["text"]);return r!=null&&this.updateAttrs(this.container,r,{selectors:this.selectors}),this.updateLabelPositions(),this.updateTools(e),this}removeRedundantLinearVertices(e={}){const n=this.cell,r=n.getVertices(),o=[this.sourceAnchor,...r,this.targetAnchor],i=o.length,s=new Ms(o);s.simplify({threshold:.01});const a=s.points.map(c=>c.toJSON()),l=a.length;return i===l?0:(n.setVertices(a.slice(1,l-1),e),i-l)}getTerminalView(e){switch(e){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error(`Unknown terminal type '${e}'`)}}getTerminalAnchor(e){switch(e){case"source":return De.create(this.sourceAnchor);case"target":return De.create(this.targetAnchor);default:throw new Error(`Unknown terminal type '${e}'`)}}getTerminalConnectionPoint(e){switch(e){case"source":return De.create(this.sourcePoint);case"target":return De.create(this.targetPoint);default:throw new Error(`Unknown terminal type '${e}'`)}}getTerminalMagnet(e,n={}){switch(e){case"source":{if(n.raw)return this.sourceMagnet;const r=this.sourceView;return r?this.sourceMagnet||r.container:null}case"target":{if(n.raw)return this.targetMagnet;const r=this.targetView;return r?this.targetMagnet||r.container:null}default:throw new Error(`Unknown terminal type '${e}'`)}}updateConnection(e={}){const n=this.cell;if(e.translateBy&&n.isFragmentDescendantOf(e.translateBy)){const r=e.tx||0,o=e.ty||0;this.routePoints=new Ms(this.routePoints).translate(r,o).points,this.translateConnectionPoints(r,o),this.path.translate(r,o)}else{const r=n.getVertices(),o=this.findAnchors(r);this.sourceAnchor=o.source,this.targetAnchor=o.target,this.routePoints=this.findRoutePoints(r);const i=this.findConnectionPoints(this.routePoints,this.sourceAnchor,this.targetAnchor);this.sourcePoint=i.source,this.targetPoint=i.target;const s=this.findMarkerPoints(this.routePoints,this.sourcePoint,this.targetPoint);this.path=this.findPath(this.routePoints,s.source||this.sourcePoint,s.target||this.targetPoint)}this.cleanCache()}findAnchors(e){const n=this.cell,r=n.source,o=n.target,i=e[0],s=e[e.length-1];return o.priority&&!r.priority?this.findAnchorsOrdered("target",s,"source",i):this.findAnchorsOrdered("source",i,"target",s)}findAnchorsOrdered(e,n,r,o){let i,s;const a=this.cell,l=a[e],c=a[r],u=this.getTerminalView(e),d=this.getTerminalView(r),h=this.getTerminalMagnet(e),f=this.getTerminalMagnet(r);if(u){let p;n?p=De.create(n):d?p=f:p=De.create(c),i=this.getAnchor(l.anchor,u,h,p,e)}else i=De.create(l);if(d){const p=De.create(o||i);s=this.getAnchor(c.anchor,d,f,p,r)}else s=De.isPointLike(c)?De.create(c):new De;return{[e]:i,[r]:s}}getAnchor(e,n,r,o,i){const s=n.isEdgeElement(r),a=this.graph.options.connecting;let l=typeof e=="string"?{name:e}:e;if(!l){const d=s?(i==="source"?a.sourceEdgeAnchor:a.targetEdgeAnchor)||a.edgeAnchor:(i==="source"?a.sourceAnchor:a.targetAnchor)||a.anchor;
538l=typeof d=="string"?{name:d}:d}if(!l)throw new Error("Anchor should be specified.");let c;const u=l.name;if(s){const d=Mx.registry.get(u);if(typeof d!="function")return Mx.registry.onNotFound(u);c=Jn(d,this,n,r,o,l.args||{},i)}else{const d=Nx.registry.get(u);if(typeof d!="function")return Nx.registry.onNotFound(u);c=Jn(d,this,n,r,o,l.args||{},i)}return c?c.round(this.POINT_ROUNDING):new De}findRoutePoints(e=[]){const n=this.graph.options.connecting.router||em.presets.normal,r=this.cell.getRouter()||n;let o;if(typeof r=="function")o=Jn(r,this,e,{},this);else{const i=typeof r=="string"?r:r.name,s=typeof r=="string"?{}:r.args||{},a=i?em.registry.get(i):em.presets.normal;if(typeof a!="function")return em.registry.onNotFound(i);o=Jn(a,this,e,s,this)}return o==null?e.map(i=>De.create(i)):o.map(i=>De.create(i))}findConnectionPoints(e,n,r){const o=this.cell,i=this.graph.options.connecting,s=o.getSource(),a=o.getTarget(),l=this.sourceView,c=this.targetView,u=e[0],d=e[e.length-1];let h;if(l&&!l.isEdgeElement(this.sourceMagnet)){const p=this.sourceMagnet||l.container,m=u||r,y=new fn(m,n),v=s.connectionPoint||i.sourceConnectionPoint||i.connectionPoint;h=this.getConnectionPoint(v,l,p,y,"source")}else h=n;let f;if(c&&!c.isEdgeElement(this.targetMagnet)){const p=this.targetMagnet||c.container,m=a.connectionPoint||i.targetConnectionPoint||i.connectionPoint,y=d||n,v=new fn(y,r);f=this.getConnectionPoint(m,c,p,v,"target")}else f=r;return{source:h,target:f}}getConnectionPoint(e,n,r,o,i){const s=o.end;if(e==null)return s;const a=typeof e=="string"?e:e.name,l=typeof e=="string"?{}:e.args,c=Dx.registry.get(a);if(typeof c!="function")return Dx.registry.onNotFound(a);const u=Jn(c,this,o,n,r,l||{},i);return u?u.round(this.POINT_ROUNDING):s}findMarkerPoints(e,n,r){const o=d=>{const h=this.cell.getAttrs(),f=Object.keys(h);for(let p=0,m=f.length;p<m;p+=1){const y=h[f[p]];if(y[`${d}Marker`]||y[`${d}-marker`]){const v=y.strokeWidth||y["stroke-width"];if(v)return parseFloat(v);break}}return null},i=e[0],s=e[e.length-1];let a,l;const c=o("source");c&&(a=n.clone().move(i||r,-c));const u=o("target");return u&&(l=r.clone().move(s||n,-u)),this.sourceMarkerPoint=a||n.clone(),this.targetMarkerPoint=l||r.clone(),{source:a,target:l}}findPath(e,n,r){const o=this.cell.getConnector()||this.graph.options.connecting.connector;let i,s,a;if(typeof o=="string"?i=o:(i=o.name,s=o.args),i){const c=cC.registry.get(i);if(typeof c!="function")return cC.registry.onNotFound(i);a=c}else a=cC.presets.normal;const l=Jn(a,this,n,r,e,Object.assign(Object.assign({},s),{raw:!0}),this);return typeof l=="string"?Mn.parse(l):l}translateConnectionPoints(e,n){this.sourcePoint.translate(e,n),this.targetPoint.translate(e,n),this.sourceAnchor.translate(e,n),this.targetAnchor.translate(e,n),this.sourceMarkerPoint.translate(e,n),this.targetMarkerPoint.translate(e,n)}updateLabelPositions(){if(this.labelContainer==null)return this;if(!this.path)return this;const n=this.cell,r=n.getLabels();if(r.length===0)return this;const o=n.getDefaultLabel(),i=this.normalizeLabelPosition(o.position);for(let s=0,a=r.length;s<a;s+=1){const l=r[s],c=this.labelCache[s];if(!c)continue;const u=this.normalizeLabelPosition(l.position),d=Ks({},i,u),h=this.getLabelTransformationMatrix(d);c.setAttribute("transform",kw(h))}return this}updateTerminalProperties(e){const n=this.cell,r=this.graph,o=n[e],i=o&&o.cell,s=`${e}View`;if(!i)return this[s]=null,this.updateTerminalMagnet(e),!0;const a=r.getCellById(i);if(!a)throw new Error(`Edge's ${e} node with id "${i}" not exists`);const l=a.findView(r);return l?(this[s]=l,this.updateTerminalMagnet(e),!0):!1}updateTerminalMagnet(e){const n=`${e}Magnet`,r=this.getTerminalView(e);if(r){let o=r.getMagnetFromEdgeTerminal(this.cell[e]);o===r.container&&(o=null),this[n]=o}else this[n]=null}getLabelPositionAngle(e){const n=this.cell.getLabelAt(e);return n&&n.position&&typeof n.position=="object"&&n.position.angle||0}getLabelPositionArgs(e){const n=this.cell.getLabelAt(e);if(n&&n.position&&typeof n.position=="object")return n.position.options}getDefaultLabelPositionArgs(){const e=this.cell.getDefaultLabel();if(e&&e.position&&typeof e.position=="object")return e.position.options}mergeLabelPositionArgs(e,n){return e===null?null:e===void 0?n===null?null:n:Ks({},n,e)}getConnection(){return this.path!=null?this.path.clone():null}getConnectionPathData(){if(this.path==null)return"";const e=this.cache.pathCache;return aM(e,"data")||(e.data=this.path.serialize()),e.data||""}getConnectionSubdivisions(){if(this.path==null)return null;const e=this.cache.pathCache;return aM(e,"segmentSubdivisions")||(e.segmentSubdivisions=this.path.getSegmentSubdivisions()),e.segmentSubdivisions}getConnectionLength(){if(this.path==null)return 0;const e=this.cache.pathCache;return aM(e,"length")||(e.length=this.path.length({segmentSubdivisions:this.getConnectionSubdivisions()})),e.length}getPointAtLength(e){return this.path==null?null:this.path.pointAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()})}getPointAtRatio(e){return this.path==null?null:(wm(e)&&(e=parseFloat(e)/100),this.path.pointAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()}))}getTangentAtLength(e){return this.path==null?null:this.path.tangentAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()})}getTangentAtRatio(e){return this.path==null?null:this.path.tangentAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPoint(e){return this.path==null?null:this.path.closestPoint(e,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPointLength(e){return this.path==null?null:this.path.closestPointLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPointRatio(e){return this.path==null?null:this.path.closestPointNormalizedLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()})}getLabelPosition(e,n,r,o){const i={distance:0};let s=0,a;typeof r=="number"?(s=r,a=o):a=r,a!=null&&(i.options=a);const l=a&&a.absoluteOffset,c=!(a&&a.absoluteDistance),u=a&&a.absoluteDistance&&a.reverseDistance,d=this.path,h={segmentSubdivisions:this.getConnectionSubdivisions()},f=new De(e,n),p=d.closestPointT(f,h),m=this.getConnectionLength()||0;let y=d.lengthAtT(p,h);c&&(y=m>0?y/m:0),u&&(y=-1*(m-y)||1),i.distance=y;let v;l||(v=d.tangentAtT(p));let b;if(v)b=v.pointOffset(f);else{const S=d.pointAtT(p),w=f.diff(S);b={x:w.x,y:w.y}}return i.offset=b,i.angle=s,i}normalizeLabelPosition(e){return typeof e=="number"?{distance:e}:e}getLabelTransformationMatrix(e){const n=this.normalizeLabelPosition(e),r=n.options||{},o=n.angle||0,i=n.distance,s=i>0&&i<=1;let a=0;const l={x:0,y:0},c=n.offset;
538c&&(typeof c=="number"?a=c:(c.x!=null&&(l.x=c.x),c.y!=null&&(l.y=c.y)));const u=l.x!==0||l.y!==0||a===0,d=r.keepGradient,h=r.ensureLegibility,f=this.path,p={segmentSubdivisions:this.getConnectionSubdivisions()},m=s?i*this.getConnectionLength():i,y=f.tangentAtLength(m,p);let v,b=o;if(y){if(u)v=y.start,v.translate(l);else{const S=y.clone();S.rotate(-90,y.start),S.setLength(a),v=S.end}d&&(b=y.angle()+o,h&&(b=Zo.normalize((b+90)%180-90)))}else v=f.start,u&&v.translate(l);return Qa().translate(v.x,v.y).rotate(b)}getVertexIndex(e,n){const o=this.cell.getVertices(),i=this.getClosestPointLength(new De(e,n));let s=0;if(i!=null)for(const a=o.length;s<a;s+=1){const l=o[s],c=this.getClosestPointLength(l);if(c!=null&&i<c)break}return s}getEventArgs(e,n,r){const o=this,i=o.cell,s=i;return n==null||r==null?{e,view:o,edge:i,cell:s}:{e,x:n,y:r,view:o,edge:i,cell:s}}notifyUnhandledMouseDown(e,n,r){this.notify("edge:unhandled:mousedown",{e,x:n,y:r,view:this,cell:this.cell,edge:this.cell})}notifyMouseDown(e,n,r){super.onMouseDown(e,n,r),this.notify("edge:mousedown",this.getEventArgs(e,n,r))}notifyMouseMove(e,n,r){super.onMouseMove(e,n,r),this.notify("edge:mousemove",this.getEventArgs(e,n,r))}notifyMouseUp(e,n,r){super.onMouseUp(e,n,r),this.notify("edge:mouseup",this.getEventArgs(e,n,r))}onClick(e,n,r){super.onClick(e,n,r),this.notify("edge:click",this.getEventArgs(e,n,r))}onDblClick(e,n,r){super.onDblClick(e,n,r),this.notify("edge:dblclick",this.getEventArgs(e,n,r))}onContextMenu(e,n,r){super.onContextMenu(e,n,r),this.notify("edge:contextmenu",this.getEventArgs(e,n,r))}onMouseDown(e,n,r){this.notifyMouseDown(e,n,r),this.startEdgeDragging(e,n,r)}onMouseMove(e,n,r){const o=this.getEventData(e);switch(o.action){case"drag-label":{this.dragLabel(e,n,r);break}case"drag-arrowhead":{this.dragArrowhead(e,n,r);break}case"drag-edge":{this.dragEdge(e,n,r);break}}return this.notifyMouseMove(e,n,r),o}onMouseUp(e,n,r){const o=this.getEventData(e);switch(o.action){case"drag-label":{this.stopLabelDragging(e,n,r);break}case"drag-arrowhead":{this.stopArrowheadDragging(e,n,r);break}case"drag-edge":{this.stopEdgeDragging(e,n,r);break}}return this.notifyMouseUp(e,n,r),this.checkMouseleave(e),o}onMouseOver(e){super.onMouseOver(e),this.notify("edge:mouseover",this.getEventArgs(e))}onMouseOut(e){super.onMouseOut(e),this.notify("edge:mouseout",this.getEventArgs(e))}onMouseEnter(e){super.onMouseEnter(e),this.notify("edge:mouseenter",this.getEventArgs(e))}onMouseLeave(e){super.onMouseLeave(e),this.notify("edge:mouseleave",this.getEventArgs(e))}onMouseWheel(e,n,r,o){super.onMouseWheel(e,n,r,o),this.notify("edge:mousewheel",Object.assign({delta:o},this.getEventArgs(e,n,r)))}onCustomEvent(e,n,r,o){if(pve(e.target,"edge-tool",this.container)){if(e.stopPropagation(),this.can("useEdgeTools")){if(n==="edge:remove"){this.cell.remove({ui:!0});return}this.notify("edge:customevent",Object.assign({name:n},this.getEventArgs(e,r,o)))}this.notifyMouseDown(e,r,o)}else this.notify("edge:customevent",Object.assign({name:n},this.getEventArgs(e,r,o))),super.onCustomEvent(e,n,r,o)}onLabelMouseDown(e,n,r){this.notifyMouseDown(e,n,r),this.startLabelDragging(e,n,r),this.getEventData(e).stopPropagation&&e.stopPropagation()}startEdgeDragging(e,n,r){if(!this.can("edgeMovable")){this.notifyUnhandledMouseDown(e,n,r);return}this.setEventData(e,{x:n,y:r,moving:!1,action:"drag-edge"})}dragEdge(e,n,r){const o=this.getEventData(e);o.moving||(o.moving=!0,this.addClass("edge-moving"),this.notify("edge:move",{e,x:n,y:r,view:this,cell:this.cell,edge:this.cell})),this.cell.translate(n-o.x,r-o.y,{ui:!0}),this.setEventData(e,{x:n,y:r}),this.notify("edge:moving",{e,x:n,y:r,view:this,cell:this.cell,edge:this.cell})}stopEdgeDragging(e,n,r){const o=this.getEventData(e);o.moving&&(this.removeClass("edge-moving"),this.notify("edge:moved",{e,x:n,y:r,view:this,cell:this.cell,edge:this.cell})),o.moving=!1}prepareArrowheadDragging(e,n){const r=this.getTerminalMagnet(e),o={action:"drag-arrowhead",x:n.x,y:n.y,isNewEdge:n.isNewEdge===!0,terminalType:e,initialMagnet:r,initialTerminal:cz(this.cell[e]),fallbackAction:n.fallbackAction||"revert",getValidateConnectionArgs:this.createValidateConnectionArgs(e),options:n.options};return this.beforeArrowheadDragging(o),o}createValidateConnectionArgs(e){const n=[];n[4]=e,n[5]=this;let r,o=0,i=0;e==="source"?(o=2,r="target"):(i=2,r="source");const s=this.cell[r],a=s.cell;if(a){let l;const c=n[o]=this.graph.findViewByCell(a);c&&(l=c.getMagnetFromEdgeTerminal(s),l===c.container&&(l=void 0)),n[o+1]=l}return(l,c)=>(n[i]=l,n[i+1]=l.container===c?void 0:c,n)}beforeArrowheadDragging(e){e.zIndex=this.cell.zIndex,this.cell.toFront();const n=this.container.style;e.pointerEvents=n.pointerEvents,n.pointerEvents="none",this.graph.options.connecting.highlight&&this.highlightAvailableMagnets(e)}afterArrowheadDragging(e){e.zIndex!=null&&(this.cell.setZIndex(e.zIndex,{ui:!0}),e.zIndex=null);const n=this.container;n.style.pointerEvents=e.pointerEvents||"",this.graph.options.connecting.highlight&&this.unhighlightAvailableMagnets(e)}validateConnection(e,n,r,o,i,s,a){const l=this.graph.options.connecting,c=l.allowLoop,u=l.allowNode,d=l.allowEdge,h=l.allowPort,f=l.allowMulti,p=l.validateConnection,m=s?s.cell:null,y=i==="target"?r:e,v=i==="target"?o:n;let b=!0;const S=w=>{const A=i==="source"?a?a.port:null:m?m.getSourcePortId():null,_=i==="target"?a?a.port:null:m?m.getTargetPortId():null;return Jn(w,this.graph,{edge:m,edgeView:s,sourceView:e,targetView:r,sourcePort:A,targetPort:_,sourceMagnet:n,targetMagnet:o,sourceCell:e?e.cell:null,targetCell:r?r.cell:null,type:i})};if(c!=null&&(typeof c=="boolean"?!c&&e===r&&(b=!1):b=S(c)),b&&h!=null&&(typeof h=="boolean"?!h&&v&&(b=!1):b=S(h)),b&&d!=null&&(typeof d=="boolean"?!d&&Am.isEdgeView(y)&&(b=!1):b=S(d)),b&&u!=null&&v==null&&(typeof u=="boolean"?!u&&Tf.isNodeView(y)&&(b=!1):b=S(u)),b&&f!=null&&s){const w=s.cell,A=i==="source"?a:w.getSource(),_=i==="target"?a:w.getTarget(),P=a?this.graph.getCellById(a.cell):null;if(A&&_&&A.cell&&_.cell&&P)if(typeof f=="function")b=S(f);else{const R=this.graph.model.getConnectedEdges(P,{outgoing:i==="source",incoming:i==="target"});R.length&&(f==="withPort"?R.some(N=>{const M=N.getSource(),L=N.getTarget();return M&&L&&M.cell===A.cell&&L.cell===_.cell&&M.port!=null&&M.port===A.port&&L.port!=null&&L.port===_.port})&&(b=!1):f||R.some(N=>{const M=N.getSource(),L=N.getTarget();return M&&L&&M.cell===A.cell&&L.cell===_.cell})&&(b=!1))}}return b&&p!=null&&(b=S(p)),b}allowConnectToBlank(e){const n=this.graph,o=n.options.connecting.allowBlank;if(typeof o!="function")return!!o;const i=n.findViewByCell(e),s=e.getSourceCell(),a=e.getTargetCell(),l=n.findViewByCell(s),c=n.findViewByCell(a);return Jn(o,n,{edge:e,edgeView:i,sourceCell:s,targetCell:a,sourceView:l,targetView:c,sourcePort:e.getSourcePortId(),targetPort:e.getTargetPortId(),sourceMagnet:i.sourceMagnet,targetMagnet:i.targetMagnet})}validateEdge(e,n,r){const o=this.graph;if(!this.allowConnectToBlank(e)){const s=e.getSourceCellId(),a=e.getTargetCellId();if(!(s&&a))return!1}const i=o.options.connecting.validateEdge;return i?Jn(i,o,{edge:e,type:n,previous:r}):!0}arrowheadDragging(e,n,r,o){o.x=n,o.y=r,o.currentTarget!==e&&(o.currentMagnet&&o.currentView&&o.currentView.unhighlight(o.currentMagnet,{type:"magnetAdsorbed"}),o.currentView=this.graph.findViewByElem(e),o.currentView?(o.currentMagnet=o.currentView.findMagnet(e),o.currentMagnet&&this.validateConnection(...o.getValidateConnectionArgs(o.currentView,o.currentMagnet),o.currentView.getEdgeTerminal(o.currentMagnet,n,r,this.cell,o.terminalType))?o.
538currentView.highlight(o.currentMagnet,{type:"magnetAdsorbed"}):o.currentMagnet=null):o.currentMagnet=null),o.currentTarget=e,this.cell.prop(o.terminalType,{x:n,y:r},Object.assign(Object.assign({},o.options),{ui:!0}))}arrowheadDragged(e,n,r){const o=e.currentView,i=e.currentMagnet;if(!i||!o)return;o.unhighlight(i,{type:"magnetAdsorbed"});const s=e.terminalType,a=o.getEdgeTerminal(i,n,r,this.cell,s);this.cell.setTerminal(s,a,{ui:!0})}snapArrowhead(e,n,r){const o=this.graph,{snap:i,allowEdge:s}=o.options.connecting,a=typeof i=="object"&&i.radius||50,l=typeof i=="object"&&i.anchor||"center",c=o.renderer.findViewsInArea({x:e-a,y:n-a,width:2*a,height:2*a},{nodeOnly:!0});if(s){const w=o.renderer.findEdgeViewsFromPoint({x:e,y:n},a).filter(A=>A!==this);c.push(...w)}const u=r.closestView||null,d=r.closestMagnet||null;r.closestView=null,r.closestMagnet=null;let h,f=Number.MAX_SAFE_INTEGER;const p=new De(e,n);c.forEach(w=>{if(w.container.getAttribute("magnet")!=="false"){if(w.isNodeView())h=l==="center"?w.cell.getBBox().getCenter().distance(p):w.cell.getBBox().getNearestPointToPoint(p).distance(p);else if(w.isEdgeView()){const A=w.getClosestPoint(p);A?h=A.distance(p):h=Number.MAX_SAFE_INTEGER}h<a&&h<f&&(d===w.container||this.validateConnection(...r.getValidateConnectionArgs(w,null),w.getEdgeTerminal(w.container,e,n,this.cell,r.terminalType)))&&(f=h,r.closestView=w,r.closestMagnet=w.container)}w.container.querySelectorAll("[magnet]").forEach(A=>{if(A.getAttribute("magnet")!=="false"){const _=w.getBBoxOfElement(A);h=p.distance(_.getCenter()),h<a&&h<f&&(d===A||this.validateConnection(...r.getValidateConnectionArgs(w,A),w.getEdgeTerminal(A,e,n,this.cell,r.terminalType)))&&(f=h,r.closestView=w,r.closestMagnet=A)}})});let m;const y=r.terminalType,v=r.closestView,b=r.closestMagnet,S=d!==b;if(u&&S&&u.unhighlight(d,{type:"magnetAdsorbed"}),v){if(!S)return;v.highlight(b,{type:"magnetAdsorbed"}),m=v.getEdgeTerminal(b,e,n,this.cell,y)}else m={x:e,y:n};this.cell.setTerminal(y,m,{},Object.assign(Object.assign({},r.options),{ui:!0}))}snapArrowheadEnd(e){const n=e.closestView,r=e.closestMagnet;n&&r&&(n.unhighlight(r,{type:"magnetAdsorbed"}),e.currentMagnet=n.findMagnet(r)),e.closestView=null,e.closestMagnet=null}finishEmbedding(e){this.graph.options.embedding.enabled&&this.cell.updateParent()&&(e.zIndex=null)}fallbackConnection(e){switch(e.fallbackAction){case"remove":this.cell.remove({ui:!0});break;case"revert":default:this.cell.prop(e.terminalType,e.initialTerminal,{ui:!0});break}}notifyConnectionEvent(e,n){const r=e.terminalType,o=e.initialTerminal,i=this.cell[r];if(i&&!Ss.equalTerminals(o,i)){const a=this.graph,l=o,c=l.cell?a.getCellById(l.cell):null,u=l.port,d=c?a.findViewByCell(c):null,h=c||e.isNewEdge?null:De.create(o).toJSON(),f=i,p=f.cell?a.getCellById(f.cell):null,m=f.port,y=p?a.findViewByCell(p):null,v=p?null:De.create(i).toJSON();this.notify("edge:connected",{e:n,previousCell:c,previousPort:u,previousView:d,previousPoint:h,currentCell:p,currentView:y,currentPort:m,currentPoint:v,previousMagnet:e.initialMagnet,currentMagnet:e.currentMagnet,edge:this.cell,view:this,type:r,isNew:e.isNewEdge})}}highlightAvailableMagnets(e){const n=this.graph,r=n.model.getCells();e.marked={};for(let o=0,i=r.length;o<i;o+=1){const s=n.findViewByCell(r[o]);if(!s||s.cell.id===this.cell.id)continue;const a=Array.prototype.slice.call(s.container.querySelectorAll("[magnet]"));s.container.getAttribute("magnet")!=="false"&&a.push(s.container);const l=a.filter(c=>this.validateConnection(...e.getValidateConnectionArgs(s,c),s.getEdgeTerminal(c,e.x,e.y,this.cell,e.terminalType)));if(l.length>0){for(let c=0,u=l.length;c<u;c+=1)s.highlight(l[c],{type:"magnetAvailable"});s.highlight(null,{type:"nodeAvailable"}),e.marked[s.cell.id]=l}}}unhighlightAvailableMagnets(e){const n=e.marked||{};Object.keys(n).forEach(r=>{const o=this.graph.findViewByCell(r);o&&(n[r].forEach(s=>{o.unhighlight(s,{type:"magnetAvailable"})}),o.unhighlight(null,{type:"nodeAvailable"}))}),e.marked=null}startArrowheadDragging(e,n,r){if(!this.can("arrowheadMovable")){this.notifyUnhandledMouseDown(e,n,r);return}const i=e.target.getAttribute("data-terminal"),s=this.prepareArrowheadDragging(i,{x:n,y:r});this.setEventData(e,s)}dragArrowhead(e,n,r){const o=this.getEventData(e);this.graph.options.connecting.snap?this.snapArrowhead(n,r,o):this.arrowheadDragging(this.getEventTarget(e),n,r,o)}stopArrowheadDragging(e,n,r){const o=this.graph,i=this.getEventData(e);o.options.connecting.snap?this.snapArrowheadEnd(i):this.arrowheadDragged(i,n,r),this.validateEdge(this.cell,i.terminalType,i.initialTerminal)?(this.finishEmbedding(i),this.notifyConnectionEvent(i,e)):this.fallbackConnection(i),this.afterArrowheadDragging(i)}startLabelDragging(e,n,r){if(this.can("edgeLabelMovable")){const o=e.currentTarget,i=p
538arseInt(o.getAttribute("data-index"),10),s=this.getLabelPositionAngle(i),a=this.getLabelPositionArgs(i),l=this.getDefaultLabelPositionArgs(),c=this.mergeLabelPositionArgs(a,l);this.setEventData(e,{index:i,positionAngle:s,positionArgs:c,stopPropagation:!0,action:"drag-label"})}else this.setEventData(e,{stopPropagation:!0});this.graph.view.delegateDragEvents(e,this)}dragLabel(e,n,r){const o=this.getEventData(e),i=this.cell.getLabelAt(o.index),s=Ks({},i,{position:this.getLabelPosition(n,r,o.positionAngle,o.positionArgs)});this.cell.setLabelAt(o.index,s)}stopLabelDragging(e,n,r){}}(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag],o=n;return(r==null||r===t.toStringTag)&&typeof o.isNodeView=="function"&&typeof o.isEdgeView=="function"&&typeof o.confirmUpdate=="function"&&typeof o.update=="function"&&typeof o.getConnection=="function"}t.isEdgeView=e})(Am||(Am={}));Am.config({isSvgElement:!0,priority:1,bootstrap:["render","source","target"],actions:{view:["render"],markup:["render"],attrs:["update"],source:["source","update"],target:["target","update"],router:["update"],connector:["update"],labels:["labels"],defaultLabel:["labels"],tools:["tools"],vertices:["vertices","update"]}});Am.registry.register("edge",Am,!0);var okt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class Yp extends ki{get disposeContainer(){return!1}get options(){return this.graph.options}constructor(e){super(),this.graph=e;const{selectors:n,fragment:r}=Oi.parseJSONMarkup(Yp.markup);this.background=n.background,this.grid=n.grid,this.svg=n.svg,this.defs=n.defs,this.viewport=n.viewport,this.primer=n.primer,this.stage=n.stage,this.decorator=n.decorator,this.overlay=n.overlay,this.container=this.options.container,this.restore=Yp.snapshoot(this.container),ro(this.container,this.prefixClassName("graph")),WR(this.container,r),this.delegateEvents()}delegateEvents(){const e=this.constructor;return super.delegateEvents(e.events),this}guard(e,n){return e.type==="mousedown"&&e.button===2||this.options.guard&&this.options.guard(e,n)?!0:e.data&&e.data.guarded!==void 0?e.data.guarded:!(n&&n.cell&&Ur.isCell(n.cell)||this.svg===e.target||this.container===e.target||this.svg.contains(e.target))}findView(e){return this.graph.findViewByElem(e)}onDblClick(e){this.options.preventDefaultDblClick&&e.preventDefault();const n=this.normalizeEvent(e),r=this.findView(n.target);if(this.guard(n,r))return;const o=this.graph.snapToGrid(n.clientX,n.clientY);r?r.onDblClick(n,o.x,o.y):this.graph.trigger("blank:dblclick",{e:n,x:o.x,y:o.y})}onClick(e){if(this.getMouseMovedCount(e)<=this.options.clickThreshold){const n=this.normalizeEvent(e),r=this.findView(n.target);if(this.guard(n,r))return;const o=this.graph.snapToGrid(n.clientX,n.clientY);r?r.onClick(n,o.x,o.y):this.graph.trigger("blank:click",{e:n,x:o.x,y:o.y})}}isPreventDefaultContextMenu(e){let n=this.options.preventDefaultContextMenu;return typeof n=="function"&&(n=Jn(n,this.graph,{view:e})),n}onContextMenu(e){const n=this.normalizeEvent(e),r=this.findView(n.target);if(this.isPreventDefaultContextMenu(r)&&e.preventDefault(),this.guard(n,r))return;const o=this.graph.snapToGrid(n.clientX,n.clientY);r?r.onContextMenu(n,o.x,o.y):this.graph.trigger("blank:contextmenu",{e:n,x:o.x,y:o.y})}delegateDragEvents(e,n){e.data==null&&(e.data={}),this.setEventData(e,{currentView:n||null,mouseMovedCount:0,startPosition:{x:e.clientX,y:e.clientY}});const r=this.constructor;this.delegateDocumentEvents(r.documentEvents,e.data),this.undelegateEvents()}getMouseMovedCount(e){return this.getEventData(e).mouseMovedCount||0}onMouseDown(e){const n=this.normalizeEvent(e),r=this.findView(n.target);if(this.guard(n,r))return;this.options.preventDefaultMouseDown&&e.preventDefault();
538const o=this.graph.snapToGrid(n.clientX,n.clientY);r?r.onMouseDown(n,o.x,o.y):(this.options.preventDefaultBlankAction&&["touchstart"].includes(n.type)&&e.preventDefault(),this.graph.trigger("blank:mousedown",{e:n,x:o.x,y:o.y})),this.delegateDragEvents(n,r)}onMouseMove(e){const n=this.getEventData(e),r=n.startPosition;if(r&&r.x===e.clientX&&r.y===e.clientY||(n.mouseMovedCount==null&&(n.mouseMovedCount=0),n.mouseMovedCount+=1,n.mouseMovedCount<=this.options.moveThreshold))return;const i=this.normalizeEvent(e),s=this.graph.snapToGrid(i.clientX,i.clientY),a=n.currentView;a?a.onMouseMove(i,s.x,s.y):this.graph.trigger("blank:mousemove",{e:i,x:s.x,y:s.y}),this.setEventData(i,n)}onMouseUp(e){this.undelegateDocumentEvents();const n=this.normalizeEvent(e),r=this.graph.snapToGrid(n.clientX,n.clientY),i=this.getEventData(e).currentView;if(i?i.onMouseUp(n,r.x,r.y):this.graph.trigger("blank:mouseup",{e:n,x:r.x,y:r.y}),!e.isPropagationStopped()){const s=new kp(e,{type:"click",data:e.data});this.onClick(s)}e.stopImmediatePropagation(),this.delegateEvents()}onMouseOver(e){const n=this.normalizeEvent(e),r=this.findView(n.target);if(!this.guard(n,r))if(r)r.onMouseOver(n);else{if(this.container===n.target)return;this.graph.trigger("blank:mouseover",{e:n})}}onMouseOut(e){const n=this.normalizeEvent(e),r=this.findView(n.target);if(!this.guard(n,r))if(r)r.onMouseOut(n);else{if(this.container===n.target)return;this.graph.trigger("blank:mouseout",{e:n})}}onMouseEnter(e){const n=this.normalizeEvent(e),r=this.findView(n.target);if(this.guard(n,r))return;const o=this.graph.findViewByElem(n.relatedTarget);if(r){if(o===r)return;r.onMouseEnter(n)}else{if(o)return;this.graph.trigger("graph:mouseenter",{e:n})}}onMouseLeave(e){const n=this.normalizeEvent(e),r=this.findView(n.target);if(this.guard(n,r))return;const o=this.graph.findViewByElem(n.relatedTarget);if(r){if(o===r)return;r.onMouseLeave(n)}else{if(o)return;this.graph.trigger("graph:mouseleave",{e:n})}}onMouseWheel(e){const n=this.normalizeEvent(e),r=this.findView(n.target);if(this.guard(n,r))return;const o=n.originalEvent,i=this.graph.snapToGrid(o.clientX,o.clientY),s=Math.max(-1,Math.min(1,o.wheelDelta||-o.detail));r?r.onMouseWheel(n,i.x,i.y,s):this.graph.trigger("blank:mousewheel",{e:n,delta:s,x:i.x,y:i.y})}onCustomEvent(e){const n=e.currentTarget,r=n.getAttribute("event")||n.getAttribute("data-event");if(r){const o=this.findView(n);if(o){const i=this.normalizeEvent(e);if(this.guard(i,o))return;const s=this.graph.snapToGrid(i.clientX,i.clientY);o.onCustomEvent(i,r,s.x,s.y)}}}handleMagnetEvent(e,n){const r=e.currentTarget,o=r.getAttribute("magnet");if(o&&o.toLowerCase()!=="false"){const i=this.findView(r);if(i){const s=this.normalizeEvent(e);if(this.guard(s,i))return;const a=this.graph.snapToGrid(s.clientX,s.clientY);Jn(n,this.graph,i,s,r,a.x,a.y)}}}onMagnetMouseDown(e){this.handleMagnetEvent(e,(n,r,o,i,s)=>{n.onMagnetMouseDown(r,o,i,s)})}onMagnetDblClick(e){this.handleMagnetEvent(e,(n,r,o,i,s)=>{n.onMagnetDblClick(r,o,i,s)})}onMagnetContextMenu(e){const n=this.findView(e.target);this.isPreventDefaultContextMenu(n)&&e.preventDefault(),this.handleMagnetEvent(e,(r,o,i,s,a)=>{r.onMagnetContextMenu(o,i,s,a)})}onLabelMouseDown(e){const n=e.currentTarget,r=this.findView(n);if(r){const o=this.normalizeEvent(e);if(this.guard(o,r))return;const i=this.graph.snapToGrid(o.clientX,o.clientY);r.onLabelMouseDown(o,i.x,i.y)}}onImageDragStart(){return!1}dispose(){this.undelegateEvents(),this.undelegateDocumentEvents(),this.restore(),this.restore=()=>{}}}okt([ki.dispose()],Yp.prototype,"dispose",null);(function(t){const e=`${Af.prefixCls}-graph`;t.markup=[{ns:ja.xhtml,tagName:"div",selector:"background",className:`${e}-background`},{ns:ja.xhtml,tagName:"div",selector:"grid",className:`${e}-grid`},{ns:ja.svg,tagName:"svg",selector:"svg",className:`${e}-svg`,attrs:{width:"100%",height:"100%","xmlns:xlink":ja.xlink},children:[{tagName:"defs",selector:"defs"},{tagName:"g",selector:"viewport",className:`${e}-svg-viewport`,children:[{tagName:"g",selector:"primer",className:`${e}-svg-primer`},{tagName:"g",selector:"stage",className:`${e}-svg-stage`},{tagName:"g",selector:"decorator",className:`${e}-svg-decorator`},{tagName:"g",selector:"overlay",className:`${e}-svg-overlay`}]}]}];function n(r){const o=r.cloneNode();
538return r.childNodes.forEach(i=>o.appendChild(i)),()=>{for(GR(r);r.attributes.length>0;)r.removeAttribute(r.attributes[0].name);for(let i=0,s=o.attributes.length;i<s;i+=1){const a=o.attributes[i];r.setAttribute(a.name,a.value)}o.childNodes.forEach(i=>r.appendChild(i))}}t.snapshoot=n})(Yp||(Yp={}));(function(t){const e=Af.prefixCls;t.events={dblclick:"onDblClick",contextmenu:"onContextMenu",touchstart:"onMouseDown",mousedown:"onMouseDown",mouseover:"onMouseOver",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousewheel:"onMouseWheel",DOMMouseScroll:"onMouseWheel",[`mouseenter .${e}-cell`]:"onMouseEnter",[`mouseleave .${e}-cell`]:"onMouseLeave",[`mouseenter .${e}-cell-tools`]:"onMouseEnter",[`mouseleave .${e}-cell-tools`]:"onMouseLeave",[`mousedown .${e}-cell [event]`]:"onCustomEvent",[`touchstart .${e}-cell [event]`]:"onCustomEvent",[`mousedown .${e}-cell [data-event]`]:"onCustomEvent",[`touchstart .${e}-cell [data-event]`]:"onCustomEvent",[`dblclick .${e}-cell [magnet]`]:"onMagnetDblClick",[`contextmenu .${e}-cell [magnet]`]:"onMagnetContextMenu",[`mousedown .${e}-cell [magnet]`]:"onMagnetMouseDown",[`touchstart .${e}-cell [magnet]`]:"onMagnetMouseDown",[`dblclick .${e}-cell [data-magnet]`]:"onMagnetDblClick",[`contextmenu .${e}-cell [data-magnet]`]:"onMagnetContextMenu",[`mousedown .${e}-cell [data-magnet]`]:"onMagnetMouseDown",[`touchstart .${e}-cell [data-magnet]`]:"onMagnetMouseDown",[`dragstart .${e}-cell image`]:"onImageDragStart",[`mousedown .${e}-edge .${e}-edge-label`]:"onLabelMouseDown",[`touchstart .${e}-edge .${e}-edge-label`]:"onLabelMouseDown"},t.documentEvents={mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"}})(Yp||(Yp={}));const ikt=`.x6-graph { 539 position: relative; 540 overflow: hidden; 541 outline: none; 542 touch-action: none; 543} 544.x6-graph-background, 545.x6-graph-grid, 546.x6-graph-svg { 547 position: absolute; 548 top: 0; 549 right: 0; 550 bottom: 0; 551 left: 0; 552} 553.x6-graph-background-stage, 554.x6-graph-grid-stage, 555.x6-graph-svg-stage { 556 user-select: none; 557} 558.x6-graph.x6-graph-pannable { 559 cursor: grab; 560 cursor: -moz-grab; 561 cursor: -webkit-grab; 562} 563.x6-graph.x6-graph-panning { 564 cursor: grabbing; 565 cursor: -moz-grabbing; 566 cursor: -webkit-grabbing; 567 user-select: none; 568} 569.x6-node { 570 cursor: move; 571 /* stylelint-disable-next-line */ 572} 573.x6-node.x6-node-immovable { 574 cursor: default; 575} 576.x6-node * { 577 -webkit-user-drag: none; 578} 579.x6-node .scalable * { 580 vector-effect: non-scaling-stroke; 581} 582.x6-node [magnet='true'] { 583 cursor: crosshair; 584 transition: opacity 0.3s; 585} 586.x6-node [magnet='true']:hover { 587 opacity: 0.7; 588} 589.x6-node foreignObject { 590 display: block; 591 overflow: visible; 592 background-color: transparent; 593} 594.x6-node foreignObject > body { 595 position: static; 596 width: 100%; 597 height: 100%; 598 margin: 0; 599 padding: 0; 600 overflow: visible; 601 background-color: transparent; 602} 603.x6-edge .source-marker, 604.x6-edge .target-marker { 605 vector-effect: non-scaling-stroke; 606} 607.x6-edge .connection { 608 stroke-linejoin: round; 609 fill: none; 610} 611.x6-edge .connection-wrap { 612 cursor: move; 613 opacity: 0; 614 fill: none; 615 stroke: #000; 616 stroke-width: 15; 617 stroke-linecap: round; 618 stroke-linejoin: round; 619} 620.x6-edge .connection-wrap:hover { 621 opacity: 0.4; 622 stroke-opacity: 0.4; 623} 624.x6-edge .vertices { 625 cursor: move; 626 opacity: 0; 627} 628.x6-edge .vertices .vertex { 629 fill: #1abc9c; 630} 631.x6-edge .vertices .vertex :hover { 632 fill: #34495e; 633 stroke: none; 634} 635.x6-edge .vertices .vertex-remove { 636 cursor: pointer; 637 fill: #fff; 638} 639.x6-edge .vertices .vertex-remove-area { 640 cursor: pointer; 641 opacity: 0.1; 642} 643.x6-edge .vertices .vertex-group:hover .vertex-remove-area { 644 opacity: 1; 645} 646.x6-edge .arrowheads { 647 cursor: move; 648 opacity: 0; 649} 650.x6-edge .arrowheads .arrowhead { 651 fill: #1abc9c; 652} 653.x6-edge .arrowheads .arrowhead :hover { 654 fill: #f39c12; 655 stroke: none; 656} 657.x6-edge .tools { 658 cursor: pointer; 659 opacity: 0; 660} 661.x6-edge .tools .tool-options { 662 display: none; 663} 664.x6-edge .tools .tool-remove circle { 665 fill: #f00; 666} 667.x6-edge .tools .tool-remove path { 668 fill: #fff; 669} 670.x6-edge:hover .vertices, 671.x6-edge:hover .arrowheads, 672.x6-edge:hover .tools { 673 opacity: 1; 674} 675.x6-highlight-opacity { 676 opacity: 0.3; 677} 678.x6-cell-tool-editor { 679 position: relative; 680 display: inline-block; 681 min-height: 1em; 682 margin: 0; 683 padding: 0; 684 line-height: 1; 685 white-space: normal; 686 text-align: center; 687 vertical-align: top; 688 overflow-wrap: normal; 689 outline: none; 690 transform-origin: 0 0;
691 -webkit-user-drag: none; 692} 693.x6-edge-tool-editor { 694 border: 1px solid #275fc5; 695 border-radius: 2px; 696} 697`;class rl extends xm{get options(){return this.graph.options}get model(){return this.graph.model}get view(){return this.graph.view}constructor(e){super(),this.graph=e,this.init()}init(){}}var skt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class xz extends rl{init(){pMt("core",ikt)}dispose(){gMt("core")}}skt([xz.dispose()],xz.prototype,"dispose",null);var akt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n},RP;(function(t){function e(n){const{grid:r,panning:o,mousewheel:i,embedding:s}=n,a=akt(n,["grid","panning","mousewheel","embedding"]),l=n.container;if(l!=null)a.width==null&&(a.width=l.clientWidth),a.height==null&&(a.height=l.clientHeight);else throw new Error("Ensure the container of the graph is specified and valid");const c=Ks({},t.defaults,a),u={size:10,visible:!1};return typeof r=="number"?c.grid={size:r,visible:!1}:typeof r=="boolean"?c.grid=Object.assign(Object.assign({},u),{visible:r}):c.grid=Object.assign(Object.assign({},u),r),["panning","mousewheel","embedding"].forEach(h=>{const f=n[h];typeof f=="boolean"?c[h].enabled=f:c[h]=Object.assign(Object.assign({},c[h]),f)}),c}t.get=e})(RP||(RP={}));(function(t){t.defaults={x:0,y:0,scaling:{min:.01,max:16},grid:{size:10,visible:!1},background:!1,panning:{enabled:!1,eventTypes:["leftMouseDown"]},mousewheel:{enabled:!1,factor:1.2,zoomAtMousePosition:!0},highlighting:{default:{name:"stroke",args:{padding:3}},nodeAvailable:{name:"className",args:{className:Af.prefix("available-node")}},magnetAvailable:{name:"className",args:{className:Af.prefix("available-magnet")}}},connecting:{snap:!1,allowLoop:!0,allowNode:!0,allowEdge:!1,allowPort:!0,allowBlank:!0,allowMulti:!0,highlight:!1,anchor:"center",edgeAnchor:"ratio",connectionPoint:"boundary",router:"normal",connector:"normal",validateConnection({type:e,sourceView:n,targetView:r}){return(e==="target"?r:n)!=null},createEdge(){return new J2t}},translating:{restrict:!1},embedding:{enabled:!1,findParent:"bbox",frontOnly:!0,validate:()=>!0},moveThreshold:0,clickThreshold:0,magnetThreshold:0,preventDefaultDblClick:!0,preventDefaultMouseDown:!1,preventDefaultContextMenu:!0,preventDefaultBlankAction:!0,interacting:{edgeLabelMovable:!1},async:!0,virtual:!1,guard:()=>!1}})(RP||(RP={}));var lkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},ckt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class R8 extends rl{get elem(){return this.view.grid}get grid(){return this.options.grid}init(){this.startListening(),this.draw(this.grid)}startListening(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}stopListening(){this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this)}setVisible(e){this.grid.visible!==e&&(this.grid.visible=e,this.update())}getGridSize(){return this.grid.size}setGridSize(e){this.grid.size=Math.max(e,1),this.update()}
697show(){this.setVisible(!0),this.update()}hide(){this.setVisible(!1),this.update()}clear(){this.elem.style.backgroundImage=""}draw(e){this.clear(),this.instance=null,Object.assign(this.grid,e),this.patterns=this.resolveGrid(e),this.update()}update(e={}){const n=this.grid.size;if(n<=1||!this.grid.visible)return this.clear();const r=this.graph.matrix(),o=this.getInstance(),i=Array.isArray(e)?e:[e];this.patterns.forEach((l,c)=>{const u=`pattern_${c}`,d=r.a||1,h=r.d||1,{update:f,markup:p}=l,m=ckt(l,["update","markup"]),y=Object.assign(Object.assign(Object.assign({},m),i[c]),{sx:d,sy:h,ox:r.e||0,oy:r.f||0,width:n*d,height:n*h});o.has(u)||o.add(u,Qn.create("pattern",{id:u,patternUnits:"userSpaceOnUse"},Qn.createVectors(p)).node);const v=o.get(u);typeof f=="function"&&f(v.childNodes[0],y);let b=y.ox%y.width;b<0&&(b+=y.width);let S=y.oy%y.height;S<0&&(S+=y.height),ti(v,{x:b,y:S,width:y.width,height:y.height})});const s=new XMLSerializer().serializeToString(o.root),a=`url(data:image/svg+xml;base64,${btoa(s)})`;this.elem.style.backgroundImage=a}getInstance(){return this.instance||(this.instance=new av),this.instance}resolveGrid(e){if(!e)return[];const n=e.type;if(n==null)return[Object.assign(Object.assign({},av.presets.dot),e.args)];const r=av.registry.get(n);if(r){let o=e.args||[];return Array.isArray(o)||(o=[o]),Array.isArray(r)?r.map((i,s)=>Object.assign(Object.assign({},i),o[s])):[Object.assign(Object.assign({},r),o[0])]}return av.registry.onNotFound(n)}dispose(){this.stopListening(),this.clear()}}lkt([rl.dispose()],R8.prototype,"dispose",null);class w0e extends rl{get container(){return this.graph.view.container}get viewport(){return this.graph.view.viewport}get stage(){return this.graph.view.stage}init(){this.resize()}getMatrix(){const e=this.viewport.getAttribute("transform");return e!==this.viewportTransformString&&(this.viewportMatrix=this.viewport.getCTM(),this.viewportTransformString=e),Qa(this.viewportMatrix)}setMatrix(e){const n=Qa(e),r=kw(n);this.viewport.setAttribute("transform",r),this.viewportMatrix=n,this.viewportTransformString=r}resize(e,n){let r=e===void 0?this.options.width:e,o=n===void 0?this.options.height:n;this.options.width=r,this.options.height=o,typeof r=="number"&&(r=Math.round(r)),typeof o=="number"&&(o=Math.round(o)),this.container.style.width=r==null?"":`${r}px`,this.container.style.height=o==null?"":`${o}px`;const i=this.getComputedSize();return this.graph.trigger("resize",Object.assign({},i)),this}getComputedSize(){let e=this.options.width,n=this.options.height;return Ate(e)||(e=this.container.clientWidth),Ate(n)||(n=this.container.clientHeight),{width:e,height:n}}getScale(){return iMt(this.getMatrix())}scale(e,n=e,r=0,o=0){if(e=this.clampScale(e),n=this.clampScale(n),r||o){const s=this.getTranslation(),a=s.tx-r*(e-1),l=s.ty-o*(n-1);(a!==s.tx||l!==s.ty)&&this.translate(a,l)}const i=this.getMatrix();return i.a=e,i.d=n,this.setMatrix(i),this.graph.trigger("scale",{sx:e,sy:n,ox:r,oy:o}),this}clampScale(e){const n=this.graph.options.scaling;return hh(e,n.min||.01,n.max||16)}getZoom(){return this.getScale().sx}zoom(e,n){n=n||{};let r=e,o=e;const i=this.getScale(),s=this.getComputedSize();let a=s.width/2,l=s.height/2;if(n.absolute||(r+=i.sx,o+=i.sy),n.scaleGrid&&(r=Math.round(r/n.scaleGrid)*n.scaleGrid,o=Math.round(o/n.scaleGrid)*n.scaleGrid),n.maxScale&&(r=Math.min(n.maxScale,r),o=Math.min(n.maxScale,o)),n.minScale&&(r=Math.max(n.minScale,r),o=Math.max(n.minScale,o)),n.center&&(a=n.center.x,l=n.center.y),r=this.clampScale(r),o=this.clampScale(o),a||l){const c=this.getTranslation(),u=a-(a-c.tx)*(r/i.sx),d=l-(l-c.ty)*(o/i.sy);(u!==c.tx||d!==c.ty)&&this.translate(u,d)}return this.scale(r,o),this}getRotation(){return sMt(this.getMatrix())}rotate(e,n,r){if(n==null||r==null){const i=No.getBBox(this.stage);n=i.width/2,r=i.height/2}const o=this.getMatrix().translate(n,r).rotate(e).translate(-n,-r);return this.setMatrix(o),this}getTranslation(){return aMt(this.getMatrix())}translate(e,n){const r=this.getMatrix();r.e=e||0,r.f=n||0,this.setMatrix(r);const o=this.getTranslation();return this.options.x=o.tx,this.options.y=o.ty,this.graph.trigger("translate",Object.assign({},o)),this}setOrigin(e,n){return this.translate(e||0,n||0)}fitToContent(e,n,r,o){if(typeof e=="object"){const S=e;
697e=S.gridWidth||1,n=S.gridHeight||1,r=S.padding||0,o=S}else e=e||1,n=n||1,r=r||0,o==null&&(o={});const i=UC(r),s=o.border||0,a=o.contentArea?Gt.create(o.contentArea):this.getContentArea(o);s>0&&a.inflate(s);const l=this.getScale(),c=this.getTranslation(),u=l.sx,d=l.sy;a.x*=u,a.y*=d,a.width*=u,a.height*=d;let h=Math.max(Math.ceil((a.width+a.x)/e),1)*e,f=Math.max(Math.ceil((a.height+a.y)/n),1)*n,p=0,m=0;(o.allowNewOrigin==="negative"&&a.x<0||o.allowNewOrigin==="positive"&&a.x>=0||o.allowNewOrigin==="any")&&(p=Math.ceil(-a.x/e)*e,p+=i.left,h+=p),(o.allowNewOrigin==="negative"&&a.y<0||o.allowNewOrigin==="positive"&&a.y>=0||o.allowNewOrigin==="any")&&(m=Math.ceil(-a.y/n)*n,m+=i.top,f+=m),h+=i.right,f+=i.bottom,h=Math.max(h,o.minWidth||0),f=Math.max(f,o.minHeight||0),h=Math.min(h,o.maxWidth||Number.MAX_SAFE_INTEGER),f=Math.min(f,o.maxHeight||Number.MAX_SAFE_INTEGER);const y=this.getComputedSize(),v=h!==y.width||f!==y.height;return(p!==c.tx||m!==c.ty)&&this.translate(p,m),v&&this.resize(h,f),new Gt(-p/u,-m/d,h/u,f/d)}scaleContentToFit(e={}){this.scaleContentToFitImpl(e)}scaleContentToFitImpl(e={},n=!0){let r,o;if(e.contentArea){const v=e.contentArea;r=this.graph.localToGraph(v),o=De.create(v)}else r=this.getContentBBox(e),o=this.graph.graphToLocal(r);if(!r.width||!r.height)return;const i=UC(e.padding),s=e.minScale||0,a=e.maxScale||Number.MAX_SAFE_INTEGER,l=e.minScaleX||s,c=e.maxScaleX||a,u=e.minScaleY||s,d=e.maxScaleY||a;let h;if(e.viewportArea)h=e.viewportArea;else{const v=this.getComputedSize(),b=this.getTranslation();h={x:b.tx,y:b.ty,width:v.width,height:v.height}}h=Gt.create(h).moveAndExpand({x:i.left,y:i.top,width:-i.left-i.right,height:-i.top-i.bottom});const f=this.getScale();let p=h.width/r.width*f.sx,m=h.height/r.height*f.sy;e.preserveAspectRatio!==!1&&(p=m=Math.min(p,m));const y=e.scaleGrid;if(y&&(p=y*Math.floor(p/y),m=y*Math.floor(m/y)),p=hh(p,l,c),m=hh(m,u,d),this.scale(p,m),n){const v=this.options,b=h.x-o.x*p-v.x,S=h.y-o.y*m-v.y;this.translate(b,S)}}getContentArea(e={}){return e.useCellGeometry!==!1?this.model.getAllCellsBBox()||new Gt:No.getBBox(this.stage)}getContentBBox(e={}){return this.graph.localToGraph(this.getContentArea(e))}getGraphArea(){const e=Gt.fromSize(this.getComputedSize());return this.graph.graphToLocal(e)}zoomToRect(e,n={}){const r=Gt.create(e),o=this.graph;n.contentArea=r,n.viewportArea==null&&(n.viewportArea={x:o.options.x,y:o.options.y,width:this.options.width,height:this.options.height}),this.scaleContentToFitImpl(n,!1);const i=r.getCenter();return this.centerPoint(i.x,i.y),this}zoomToFit(e={}){return this.zoomToRect(this.getContentArea(e),e)}centerPoint(e,n){const r=this.getComputedSize(),o=this.getScale(),i=this.getTranslation(),s=r.width/2,a=r.height/2;e=typeof e=="number"?e:s,n=typeof n=="number"?n:a,e=s-e*o.sx,n=a-n*o.sy,(i.tx!==e||i.ty!==n)&&this.translate(e,n)}centerContent(e){const r=this.graph.getContentArea(e).getCenter();this.centerPoint(r.x,r.y)}centerCell(e){return this.positionCell(e,"center")}positionPoint(e,n,r){const o=this.getComputedSize();n=yf(n,Math.max(0,o.width)),n<0&&(n=o.width+n),r=yf(r,Math.max(0,o.height)),r<0&&(r=o.height+r);const i=this.getTranslation(),s=this.getScale(),a=n-e.x*s.sx,l=r-e.y*s.sy;(i.tx!==a||i.ty!==l)&&this.translate(a,l)}positionRect(e,n){const r=Gt.create(e);switch(n){case"center":return this.positionPoint(r.getCenter(),"50%","50%");case"top":return this.positionPoint(r.getTopCenter(),"50%",0);case"top-right":return this.positionPoint(r.getTopRight(),"100%",0);case"right":return this.positionPoint(r.getRightMiddle(),"100%","50%");case"bottom-right":return this.positionPoint(r.getBottomRight(),"100%","100%");case"bottom":return this.positionPoint(r.getBottomCenter(),"50%","100%");case"bottom-left":return this.positionPoint(r.getBottomLeft(),0,"100%");case"left":return this.positionPoint(r.getLeftMiddle(),0,"50%");case"top-left":return this.positionPoint(r.getTopLeft(),0,0);default:return this}}positionCell(e,n){const r=e.getBBox();return this.positionRect(r,n)}positionContent(e,n){const r=this.graph.getContentArea(n);return this.positionRect(r,e)}}var ukt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;
697a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class O8 extends rl{get elem(){return this.view.background}init(){this.startListening(),this.options.background&&this.draw(this.options.background)}startListening(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}stopListening(){this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this)}updateBackgroundImage(e={}){let n=e.size||"auto auto",r=e.position||"center";const o=this.graph.transform.getScale(),i=this.graph.translate();if(typeof r=="object"){const s=i.tx+o.sx*(r.x||0),a=i.ty+o.sy*(r.y||0);r=`${s}px ${a}px`}typeof n=="object"&&(n=Gt.fromSize(n).scale(o.sx,o.sy),n=`${n.width}px ${n.height}px`),this.elem.style.backgroundSize=n,this.elem.style.backgroundPosition=r}drawBackgroundImage(e,n={}){if(!(e instanceof HTMLImageElement)){this.elem.style.backgroundImage="";return}const r=this.optionsCache;if(r&&r.image!==n.image)return;let o;const i=n.opacity,s=n.size;let a=n.repeat||"no-repeat";const l=AP.registry.get(a);if(typeof l=="function"){const u=n.quality||1;e.width*=u,e.height*=u;const d=l(e,n);if(!(d instanceof HTMLCanvasElement))throw new Error("Background pattern must return an HTML Canvas instance");o=d.toDataURL("image/png"),n.repeat&&a!==n.repeat?a=n.repeat:a="repeat",typeof s=="object"?(s.width*=d.width/e.width,s.height*=d.height/e.height):s===void 0&&(n.size={width:d.width/u,height:d.height/u})}else o=e.src,s===void 0&&(n.size={width:e.width,height:e.height});r!=null&&typeof n.size=="object"&&n.image===r.image&&n.repeat===r.repeat&&n.quality===r.quality&&(r.size=cz(n.size));const c=this.elem.style;c.backgroundImage=`url(${o})`,c.backgroundRepeat=a,c.opacity=i==null||i>=1?"":`${i}
697`,this.updateBackgroundImage(n)}updateBackgroundColor(e){this.elem.style.backgroundColor=e||""}updateBackgroundOptions(e){this.graph.options.background=e}update(){this.optionsCache&&this.updateBackgroundImage(this.optionsCache)}draw(e){const n=e||{};if(this.updateBackgroundOptions(e),this.updateBackgroundColor(n.color),n.image){this.optionsCache=cz(n);const r=document.createElement("img");r.onload=()=>this.drawBackgroundImage(r,e),r.setAttribute("crossorigin","anonymous"),r.src=n.image}else this.drawBackgroundImage(null),this.optionsCache=null}clear(){this.draw()}dispose(){this.clear(),this.stopListening()}}ukt([rl.dispose()],O8.prototype,"dispose",null);var dkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class N8 extends rl{get widgetOptions(){return this.options.panning}get pannable(){return this.widgetOptions&&this.widgetOptions.enabled===!0}init(){this.onRightMouseDown=this.onRightMouseDown.bind(this),this.onSpaceKeyDown=this.onSpaceKeyDown.bind(this),this.onSpaceKeyUp=this.onSpaceKeyUp.bind(this),this.startListening(),this.updateClassName()}startListening(){this.graph.on("blank:mousedown",this.onMouseDown,this),this.graph.on("node:unhandled:mousedown",this.onMouseDown,this),this.graph.on("edge:unhandled:mousedown",this.onMouseDown,this),bl.on(this.graph.container,"mousedown",this.onRightMouseDown),bl.on(document.body,{keydown:this.onSpaceKeyDown,keyup:this.onSpaceKeyUp}),this.mousewheelHandle=new Ive(this.graph.container,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.mousewheelHandle.enable()}stopListening(){this.graph.off("blank:mousedown",this.onMouseDown,this),this.graph.off("node:unhandled:mousedown",this.onMouseDown,this),this.graph.off("edge:unhandled:mousedown",this.onMouseDown,this),bl.off(this.graph.container,"mousedown",this.onRightMouseDown),bl.off(document.body,{keydown:this.onSpaceKeyDown,keyup:this.onSpaceKeyUp}),this.mousewheelHandle&&this.mousewheelHandle.disable()}allowPanning(e,n){return e.spaceKey=this.isSpaceKeyPressed,this.pannable&&wx.isMatch(e,this.widgetOptions.modifiers,n)}startPanning(e){const n=this.view.normalizeEvent(e);this.clientX=n.clientX,this.clientY=n.clientY,this.panning=!0,this.updateClassName(),bl.on(document.body,{"mousemove.panning touchmove.panning":this.pan.bind(this),"mouseup.panning touchend.panning":this.stopPanning.bind(this),"mouseleave.panning":this.stopPanning.bind(this)}),bl.on(window,"mouseup.panning",this.stopPanning.bind(this))}pan(e){const n=this.view.normalizeEvent(e),r=n.clientX-this.clientX,o=n.clientY-this.clientY;this.clientX=n.clientX,this.clientY=n.clientY,this.graph.translateBy(r,o)}stopPanning(e){this.panning=!1,this.updateClassName(),bl.off(document.body,".panning"),bl.off(window,".panning")}updateClassName(){const e=this.view.container,n=this.view.prefixClassName("graph-panning"),r=this.view.prefixClassName("graph-pannable");this.pannable?this.panning?(ro(e,n),fh(e,r)):(fh(e,n),ro(e,r)):(fh(e,n),fh(e,r))}onMouseDown({e}){if(!this.allowBlankMouseDown(e))return;const n=this.graph.getPlugin("selection"),r=n&&n.allowRubberband(e,!0);(this.allowPanning(e,!0)||this.allowPanning(e)&&!r)&&this.startPanning(e)}onRightMouseDown(e){const n=this.widgetOptions.eventTypes;n?.includes("rightMouseDown")&&e.button===2&&this.allowPanning(e,!0)&&this.startPanning(e)}onMouseWheel(e,n,r){this.graph.translateBy(-n,-r)}onSpaceKeyDown(e){e.which===32&&(this.isSpaceKeyPressed=!0)}onSpaceKeyUp(e){e.which===32&&(this.isSpaceKeyPressed=!1)}allowBlankMouseDown(e){const n=this.widgetOptions.eventTypes;return n?.includes("leftMouseDown")&&e.button===0||n?.includes("mouseWheelDown")&&e.button===1}allowMouseWheel(e){var n;return this.pannable&&!e.ctrlKey&&((n=this.widgetOptions.eventTypes)===null||n===void 0?void 0:n.includes("mouseWheel"))}autoPanning(e,n){const o=this.graph.getGraphArea();let i=0,s=0;e<=o.left+10&&(i=-10),n<=o.top+10&&(s=-10),e>=o.right-10&&(i=10),n>=o.bottom-10&&(s=10),(i!==0||s!==0)&&this.graph.translateBy(-i,-s)}enablePanning(){this.pannable||(this.widgetOptions.enabled=!0,this.updateClassName())}disablePanning(){this.pannable&&(this.widgetOptions.enabled=!1,this.updateClassName())}dispose(){this.stopListening()}}dkt([rl.dispose()],N8.prototype,"dispose",null);var hkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;
697a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class M8 extends rl{constructor(){super(...arguments),this.cumulatedFactor=1}get widgetOptions(){return this.options.mousewheel}init(){this.container=this.graph.container,this.target=this.widgetOptions.global?document:this.container,this.mousewheelHandle=new Ive(this.target,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.widgetOptions.enabled&&this.enable(!0)}get disabled(){return this.widgetOptions.enabled!==!0}enable(e){(this.disabled||e)&&(this.widgetOptions.enabled=!0,this.mousewheelHandle.enable())}disable(){this.disabled||(this.widgetOptions.enabled=!1,this.mousewheelHandle.disable())}allowMouseWheel(e){const n=this.widgetOptions.guard;return(n==null||n(e))&&wx.isMatch(e,this.widgetOptions.modifiers)}onMouseWheel(e){const n=this.widgetOptions.guard;if((n==null||n(e))&&wx.isMatch(e,this.widgetOptions.modifiers)){const r=this.widgetOptions.factor||1.2;this.currentScale==null&&(this.startPos={x:e.clientX,y:e.clientY},this.currentScale=this.graph.transform.getScale().sx),e.deltaY<0?this.currentScale<.15?this.cumulatedFactor=(this.currentScale+.01)/this.currentScale:(this.cumulatedFactor=Math.round(this.currentScale*r*20)/20/this.currentScale,this.cumulatedFactor===1&&(this.cumulatedFactor=1.05)):this.currentScale<=.15?this.cumulatedFactor=(this.currentScale-.01)/this.currentScale:(this.cumulatedFactor=Math.round(this.currentScale*(1/r)*20)/20/this.currentScale,this.cumulatedFactor===1&&(this.cumulatedFactor=.95)),this.cumulatedFactor=Math.max(.01,Math.min(this.currentScale*this.cumulatedFactor,160)/this.currentScale);const i=this.currentScale;let s=this.graph.transform.clampScale(i*this.cumulatedFactor);const a=this.widgetOptions.minScale||Number.MIN_SAFE_INTEGER,l=this.widgetOptions.maxScale||Number.MAX_SAFE_INTEGER;if(s=hh(s,a,l),s!==i)if(this.widgetOptions.zoomAtMousePosition){const u=!!this.graph.getPlugin("scroller")?this.graph.clientToLocal(this.startPos):this.graph.clientToGraph(this.startPos);this.graph.zoom(s,{absolute:!0,center:u.clone()})}else this.graph.zoom(s,{absolute:!0});this.currentScale=null,this.cumulatedFactor=1}}dispose(){this.disable()}}hkt([xm.dispose()],M8.prototype,"dispose",null);var fkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class A0e extends rl{init(){this.resetRenderArea=lNt(this.resetRenderArea,200,{leading:!0}),this.resetRenderArea(),this.startListening()}startListening(){this.graph.on("translate",this.resetRenderArea,this),this.graph.on("scale",this.resetRenderArea,this),this.graph.on("resize",this.resetRenderArea,this)}stopListening(){this.graph.off("translate",this.resetRenderArea,this),this.graph.off("scale",this.resetRenderArea,this),this.graph.off("resize",this.resetRenderArea,this)}enableVirtualRender(){this.options.virtual=!0,this.resetRenderArea()}disableVirtualRender(){this.options.virtual=!1,this.graph.renderer.setRenderArea(void 0)}resetRenderArea(){if(this.options.virtual){const e=this.graph.getGraphArea();this.graph.renderer.setRenderArea(e)}}dispose(){this.stopListening()}}fkt([rl.dispose()],A0e.prototype,"dispose",null);class pkt{constructor(){this.isFlushing=!1,this.isFlushPending=!1,this.scheduleId=0,this.queue=[],this.frameInterval=33,this.initialTime=Date.now()}queueJob(e){if(e.priority&Vg.PRIOR)e.cb();else{const n=this.findInsertionIndex(e);n>=0&&this.queue.splice(n,0,e)}}queueFlush(){!this.isFlushing&&!this.isFlushPending&&(this.isFlushPending=!0,this.scheduleJob())}queueFlushSync(){!this.isFlushing&&!this.isFlushPending&&(this.isFlushPending=!0,this.flushJobsSync())}clearJobs(){this.queue.length=0,this.isFlushing=!1,this.isFlushPending=!1,this.cancelScheduleJob()}flushJobs(){this.isFlushPending=!1,this.isFlushing=!0;const e=this.getCurrentTime();let n;for(;(n=this.queue.shift())&&(n.cb(),!(this.getCurrentTime()-e>=this.frameInterval)););this.isFlushing=!1,this.queue.length&&this.queueFlush()}flushJobsSync(){this.isFlushPending=!1,this.isFlushing=!0;let e;for(;e=this.queue.shift();)try{e.cb()}catch(n){console.log(n)}this.isFlushing=!1}findInsertionIndex(e){let n=0,r=this.queue.length,o=r-1;const i=e.priority;for(;n<=o;){const s=(o-n>>1)+n;i<=this.queue[s].priority?n=s+1:(r=s,o=s-1)}return r}scheduleJob(){"requestIdleCallback"in window?(this.scheduleId&&this.cancelScheduleJob(),this.scheduleId=window.requestIdleCallback(this.flushJobs.bind(this),{timeout:100})):(this.scheduleId&&this.cancelScheduleJob(),this.scheduleId=window.setTimeout(this.flushJobs.bind(this)))}cancelScheduleJob(){"cancelIdleCallback"in window?(this.scheduleId&&window.cancelIdleCallback(this.scheduleId),this.scheduleId=0):(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduleId=0)}getCurrentTime(){return typeof performance=="object"&&typeof performance.now=="function"?performance.now():Date.now()-this.initialTime}}var Vg;(function(t){t[t.Update=2]="Update",t[t.RenderEdge=4]="RenderEdge",t[t.RenderNode=8]="RenderNode",t[t.PRIOR=1048576]="PRIOR"})(Vg||(Vg={}));var gkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;
697a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class ha extends xm{get model(){return this.graph.model}get container(){return this.graph.view.stage}constructor(e){super(),this.views={},this.willRemoveViews={},this.queue=new pkt,this.graph=e,this.init()}init(){this.startListening(),this.renderViews(this.model.getCells())}startListening(){this.model.on("reseted",this.onModelReseted,this),this.model.on("cell:added",this.onCellAdded,this),this.model.on("cell:removed",this.onCellRemoved,this),this.model.on("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.on("cell:change:visible",this.onCellVisibleChanged,this)}stopListening(){this.model.off("reseted",this.onModelReseted,this),this.model.off("cell:added",this.onCellAdded,this),this.model.off("cell:removed",this.onCellRemoved,this),this.model.off("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.off("cell:change:visible",this.onCellVisibleChanged,this)}onModelReseted({options:e}){this.queue.clearJobs(),this.removeZPivots(),this.resetViews();const n=this.model.getCells();this.renderViews(n,Object.assign(Object.assign({},e),{queue:n.map(r=>r.id)}))}onCellAdded({cell:e,options:n}){this.renderViews([e],n)}onCellRemoved({cell:e}){this.removeViews([e])}onCellZIndexChanged({cell:e,options:n}){const r=this.views[e.id];r&&this.requestViewUpdate(r.view,ha.FLAG_INSERT,n,Vg.Update,!0)}onCellVisibleChanged({cell:e,current:n}){this.toggleVisible(e,!!n)}requestViewUpdate(e,n,r={},o=Vg.Update,i=!0){const s=e.cell.id,a=this.views[s];if(!a)return;a.flag=n,a.options=r,(e.hasAction(n,["translate","resize","rotate"])||r.async===!1)&&(o=Vg.PRIOR,i=!1),this.queue.queueJob({id:s,priority:o,cb:()=>{this.renderViewInArea(e,n,r);const u=r.queue;if(u){const d=u.indexOf(e.cell.id);d>=0&&u.splice(d,1),u.length===0&&this.graph.trigger("render:done")}}}),this.getEffectedEdges(e).forEach(u=>{this.requestViewUpdate(u.view,u.flag,r,o,!1)}),i&&this.flush()}setRenderArea(e){this.renderArea=e,this.flushWaitingViews()}isViewMounted(e){if(e==null)return!1;const n=this.views[e.cell.id];return n?n.state===ha.ViewState.MOUNTED:!1}renderViews(e,n={}){e.sort((r,o)=>r.isNode()&&o.isEdge()?-1:0),e.forEach(r=>{const o=r.id,i=this.views;let s=0,a=i[o];if(a)s=ha.FLAG_INSERT;else{const l=this.createCellView(r);l&&(l.graph=this.graph,s=ha.FLAG_INSERT|l.getBootstrapFlag(),a={view:l,flag:s,options:n,state:ha.ViewState.CREATED},this.views[o]=a)}a&&this.requestViewUpdate(a.view,s,n,this.getRenderPriority(a.view),!1)}),this.flush()}renderViewInArea(e,n,r={}){const o=e.cell,i=o.id,s=this.views[i];if(!s)return;let a=0;this.isUpdatable(e)?(a=this.updateView(e,n,r),s.flag=a):s.state===ha.ViewState.MOUNTED?(a=this.updateView(e,n,r),s.flag=a):s.state=ha.ViewState.WAITING,a&&o.isEdge()&&!(a&e.getFlag(["source","target"]))&&this.queue.queueJob({id:i,priority:Vg.RenderEdge,cb:()=>{this.updateView(e,n,r)}})}removeViews(e){e.forEach(n=>{const r=n.id,o=this.views[r];o&&(this.willRemoveViews[r]=o,delete this.views[r],this.queue.queueJob({id:r,priority:this.getRenderPriority(o.view),cb:()=>{this.removeView(o.view)}}))}),this.flush()}flush(){this.graph.options.async?this.queue.queueFlush():this.queue.queueFlushSync()}flushWaitingViews(){Object.values(this.views).forEach(e=>{if(e&&e.state===ha.ViewState.WAITING){const{view:n,flag:r,options:o}=e;this.requestViewUpdate(n,r,o,this.getRenderPriority(n),!1)}}),this.flush()}updateView(e,n,r={}){if(e==null)return 0;if(Ds.isCellView(e)){if(n&ha.FLAG_REMOVE)return this.removeView(e.cell),0;n&ha.FLAG_INSERT&&(this.insertView(e),n^=ha.FLAG_INSERT)}return n?e.confirmUpdate(n,r):0}insertView(e){const n=this.views[e.cell.id];if(n){const r=e.cell.getZIndex(),o=this.addZPivot(r);this.container.insertBefore(e.container,o),e.cell.isVisible()||this.toggleVisible(e.cell,!1),n.state=ha.ViewState.MOUNTED,this.graph.trigger("view:mounted",{view:e})}}resetViews(){this.willRemoveViews=Object.assign(Object.assign({},this.views),this.willRemoveViews),Object.values(this.willRemoveViews).forEach(e=>{e&&this.removeView(e.view)}),this.views={},this.willRemoveViews={}}removeView(e){const n=e.cell,r=this.willRemoveViews[n.id];r&&e&&(r.view.remove(),delete this.willRemoveViews[n.id],this.graph.trigger("view:unmounted",{view:e}))}toggleVisible(e,n){const r=this.model.getConnectedEdges(e);for(let i=0,s=r.length;i<s;i+=1){const a=r[i];if(n){const l=a.getSourceCell(),c=a.getTargetCell();if(l&&!l.isVisible()||c&&!c.isVisible())continue;this.toggleVisible(a,!0)}else this.toggleVisible(a,!1)}const o=this.views[e.id];o&&jR(o.view.container,{display:n?"unset":"none"})}addZPivot(e=0){this.zPivots==null&&(this.zPivots={});const n=this.zPivots;let r=n[e];if(r)return r;r=n[e]=document.createComment(`z-index:${e+1}`);let o=-1/0;for(const s in n){const a=+s;a<e&&a>o&&(o=a,e-1)}const i=this.container;if(o!==-1/0){const s=n[o];
697i.insertBefore(r,s.nextSibling)}else i.insertBefore(r,i.firstChild);return r}removeZPivots(){this.zPivots&&Object.values(this.zPivots).forEach(e=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),this.zPivots={}}createCellView(e){const n={graph:this.graph},r=this.graph.options.createCellView;if(r){const i=Jn(r,this.graph,e);if(i)return new i(e,n);if(i===null)return null}const o=e.view;if(o!=null&&typeof o=="string"){const i=Ds.registry.get(o);return i?new i(e,n):Ds.registry.onNotFound(o)}return e.isNode()?new Tf(e,n):e.isEdge()?new Am(e,n):null}getEffectedEdges(e){const n=[],r=e.cell,o=this.model.getConnectedEdges(r);for(let i=0,s=o.length;i<s;i+=1){const a=o[i],l=this.views[a.id];if(!l)continue;const c=l.view;if(!this.isViewMounted(c))continue;const u=["update"];a.getTargetCell()===r&&u.push("target"),a.getSourceCell()===r&&u.push("source"),n.push({id:a.id,view:c,flag:c.getFlag(u)})}return n}isUpdatable(e){if(e.isNodeView())return this.renderArea?this.renderArea.isIntersectWithRect(e.cell.getBBox()):!0;if(e.isEdgeView()){const n=e.cell,r=n.getSourceCell(),o=n.getTargetCell();if(this.renderArea&&r&&o)return this.renderArea.isIntersectWithRect(r.getBBox())||this.renderArea.isIntersectWithRect(o.getBBox())}return!0}getRenderPriority(e){return e.cell.isNode()?Vg.RenderNode:Vg.RenderEdge}dispose(){this.stopListening(),Object.keys(this.views).forEach(e=>{this.views[e].view.dispose()}),this.views={}}}gkt([xm.dispose()],ha.prototype,"dispose",null);(function(t){t.FLAG_INSERT=1<<30,t.FLAG_REMOVE=1<<29,t.FLAG_RENDER=(1<<26)-1})(ha||(ha={}));(function(t){(function(e){e[e.CREATED=0]="CREATED",e[e.MOUNTED=1]="MOUNTED",e[e.WAITING=2]="WAITING"})(t.ViewState||(t.ViewState={}))})(ha||(ha={}));var mkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class D8 extends rl{constructor(){super(...arguments),this.schedule=new ha(this.graph)}requestViewUpdate(e,n,r={}){this.schedule.requestViewUpdate(e,n,r)}isViewMounted(e){return this.schedule.isViewMounted(e)}setRenderArea(e){this.schedule.setRenderArea(e)}findViewByElem(e){if(e==null)return null;const n=this.options.container,r=typeof e=="string"?n.querySelector(e):e instanceof Element?e:e[0];if(r){const o=this.graph.view.findAttr("data-cell-id",r);
697if(o){const i=this.schedule.views;if(i[o])return i[o].view}}return null}findViewByCell(e){if(e==null)return null;const n=Ur.isCell(e)?e.id:e,r=this.schedule.views;return r[n]?r[n].view:null}findViewsFromPoint(e){const n={x:e.x,y:e.y};return this.model.getCells().map(r=>this.findViewByCell(r)).filter(r=>r!=null?No.getBBox(r.container,{target:this.view.stage}).containsPoint(n):!1)}findEdgeViewsFromPoint(e,n=5){return this.model.getEdges().map(r=>this.findViewByCell(r)).filter(r=>{if(r!=null){const o=r.getClosestPoint(e);if(o)return o.distance(e)<=n}return!1})}findViewsInArea(e,n={}){const r=Gt.create(e);return this.model.getCells().map(o=>this.findViewByCell(o)).filter(o=>{if(o){if(n.nodeOnly&&!o.isNodeView())return!1;const i=No.getBBox(o.container,{target:this.view.stage});return i.width===0?i.inflate(1,0):i.height===0&&i.inflate(0,1),n.strict?r.containsRect(i):r.isIntersectWithRect(i)}return!1})}dispose(){this.schedule.dispose()}}mkt([rl.dispose()],D8.prototype,"dispose",null);var ene=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class T0e extends rl{get cid(){return this.graph.view.cid}get svg(){return this.view.svg}get defs(){return this.view.defs}isDefined(e){return this.svg.getElementById(e)!=null}filter(e){let n=e.id;const r=e.name;if(n||(n=`filter-${r}-${this.cid}-${rU(JSON.stringify(e))}`),!this.isDefined(n)){const o=_x.registry.get(r);if(o==null)return _x.registry.onNotFound(r);const i=o(e.args||{}),s=Object.assign(Object.assign({x:-1,y:-1,width:3,height:3,filterUnits:"objectBoundingBox"},e.attrs),{id:n});Qn.create(Oi.sanitize(i),s).appendTo(this.defs)}return n}gradient(e){let n=e.id;const r=e.type;if(n||(n=`gradient-${r}-${this.cid}-${rU(JSON.stringify(e))}`),!this.isDefined(n)){const i=e.stops.map(l=>{const c=l.opacity!=null&&Number.isFinite(l.opacity)?l.opacity:1;return`<stop offset="${l.offset}" stop-color="${l.color}" stop-opacity="${c}"/>`}),s=`<${r}>${i.join("")}</${r}>`,a=Object.assign({id:n},e.attrs);Qn.create(s,a).appendTo(this.defs)}return n}marker(e){const{id:n,refX:r,refY:o,markerUnits:i,markerOrient:s,tagName:a,children:l}=e,c=ene(e,["id","refX","refY","markerUnits","markerOrient","tagName","children"]);let u=n;if(u||(u=`marker-${this.cid}-${rU(JSON.stringify(e))}`),!this.isDefined(u)){a!=="path"&&delete c.d;const d=Qn.create("marker",{refX:r,refY:o,id:u,overflow:"visible",orient:s??"auto",markerUnits:i||"userSpaceOnUse"},l?l.map(h=>{var{tagName:f}=h,p=ene(h,["tagName"]);return Qn.create(`${f}`||"path",SP(Object.assign(Object.assign({},c),p)))}):[Qn.create(a||"path",SP(c))]);this.defs.appendChild(d.node)}return u}remove(e){const n=this.svg.getElementById(e);n&&n.parentNode&&n.parentNode.removeChild(n)}}class _0e extends rl{getClientMatrix(){return Qa(this.view.stage.getScreenCTM())}getClientOffset(){const e=this.view.svg.getBoundingClientRect();return new De(e.left,e.top)}getPageOffset(){return this.getClientOffset().translate(window.scrollX,window.scrollY)}snapToGrid(e,n){return(typeof e=="number"?this.clientToLocalPoint(e,n):this.clientToLocalPoint(e.x,e.y)).snapToGrid(this.graph.getGridSize())}localToGraphPoint(e,n){const r=De.create(e,n);return No.transformPoint(r,this.graph.matrix())}localToClientPoint(e,n){const r=De.create(e,n);return No.transformPoint(r,this.getClientMatrix())}localToPagePoint(e,n){return(typeof e=="number"?this.localToGraphPoint(e,n):this.localToGraphPoint(e)).translate(this.getPageOffset())}localToGraphRect(e,n,r,o){const i=Gt.create(e,n,r,o);return No.transformRectangle(i,this.graph.matrix())}localToClientRect(e,n,r,o){const i=Gt.create(e,n,r,o);return No.transformRectangle(i,this.getClientMatrix())}localToPageRect(e,n,r,o){return(typeof e=="number"?this.localToGraphRect(e,n,r,o):this.localToGraphRect(e)).translate(this.getPageOffset())}graphToLocalPoint(e,n){const r=De.create(e,n);return No.transformPoint(r,this.graph.matrix().inverse())}clientToLocalPoint(e,n){const r=De.create(e,n);return No.transformPoint(r,this.getClientMatrix().inverse())}clientToGraphPoint(e,n){const r=De.create(e,n);return No.transformPoint(r,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalPoint(e,n){const o=De.create(e,n).diff(this.getPageOffset());return this.graphToLocalPoint(o)}graphToLocalRect(e,n,r,o){const i=Gt.create(e,n,r,o);return No.transformRectangle(i,this.graph.matrix().inverse())}clientToLocalRect(e,n,r,o){const i=Gt.create(e,n,r,o);return No.transformRectangle(i,this.getClientMatrix().inverse())}clientToGraphRect(e,n,r,o){const i=Gt.create(e,n,r,o);return No.transformRectangle(i,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalRect(e,n,r,o){const i=Gt.create(e,n,r,o),s=this.getPageOffset();return i.x-=s.x,i.y-=s.y,this.graphToLocalRect(i)}}var ykt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;
697a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class G2 extends rl{constructor(){super(...arguments),this.highlights={}}init(){this.startListening()}startListening(){this.graph.on("cell:highlight",this.onCellHighlight,this),this.graph.on("cell:unhighlight",this.onCellUnhighlight,this)}stopListening(){this.graph.off("cell:highlight",this.onCellHighlight,this),this.graph.off("cell:unhighlight",this.onCellUnhighlight,this)}onCellHighlight({view:e,magnet:n,options:r={}}){const o=this.resolveHighlighter(r);if(!o)return;const i=this.getHighlighterId(n,o);if(!this.highlights[i]){const s=o.highlighter;s.highlight(e,n,Object.assign({},o.args)),this.highlights[i]={cellView:e,magnet:n,highlighter:s,args:o.args}}}onCellUnhighlight({magnet:e,options:n={}}){const r=this.resolveHighlighter(n);if(!r)return;const o=this.getHighlighterId(e,r);this.unhighlight(o)}resolveHighlighter(e){const n=this.options;let r=e.highlighter;if(r==null){const a=e.type;r=a&&n.highlighting[a]||n.highlighting.default}if(r==null)return null;const o=typeof r=="string"?{name:r}:r,i=o.name,s=cm.registry.get(i);return s==null?cm.registry.onNotFound(i):(cm.check(i,s),{name:i,highlighter:s,args:o.args||{}})}getHighlighterId(e,n){return S8(e),n.name+e.id+JSON.stringify(n.args)}unhighlight(e){const n=this.highlights[e];n&&(n.highlighter.unhighlight(n.cellView,n.magnet,n.args),delete this.highlights[e])}dispose(){Object.keys(this.highlights).forEach(e=>this.unhighlight(e)),this.stopListening()}}ykt([G2.dispose()],G2.prototype,"dispose",null);var vkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class I0e extends rl{getScroller(){const e=this.graph.getPlugin("scroller");return e&&e.options.enabled?e:null}getContainer(){const e=this.getScroller();return e?e.container.parentElement:this.graph.container.parentElement}getSensorTarget(){const e=this.options.autoResize;if(e)return typeof e=="boolean"?this.getContainer():e}init(){if(this.options.autoResize){const n=this.getSensorTarget();n&&k2.bind(n,()=>{const r=n.offsetWidth,o=n.offsetHeight;this.resize(r,o)})}}resize(e,n){const r=this.getScroller();r?r.resize(e,n):this.graph.transform.resize(e,n)}dispose(){k2.clear(this.graph.container)}}vkt([rl.dispose()],I0e.prototype,"dispose",null);var bkt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};class Gr extends cd{get container(){return this.options.container}get[Symbol.toStringTag](){return Gr.toStringTag}constructor(e){super(),this.installedPlugins=new Set,this.options=RP.get(e),this.css=new xz(this),this.view=new Yp(this),this.defs=new T0e(this),this.coord=new _0e(this),this.transform=new w0e(this),this.highlight=new G2(this),this.grid=new R8(this),this.background=new O8(this),this.options.model?this.model=this.options.model:(this.model=new vf,this.model.graph=this),this.renderer=new D8(this),this.panning=new N8(this),this.mousewheel=new M8(this),this.virtualRender=new A0e(this),this.size=new I0e(this)}isNode(e){return e.isNode()}isEdge(e){return e.isEdge()}resetCells(e,n={}){return this.model.resetCells(e,n),this}clearCells(e={}){return this.model.clear(e),this}toJSON(e={}){return this.model.toJSON(e)}parseJSON(e){return this.model.parseJSON(e)}fromJSON(e,n={}){return this.model.fromJSON(e,n),this}getCellById(e){return this.model.getCell(e)}addNode(e,n={}){return this.model.addNode(e,n)}addNodes(e,n={}){return this.addCell(e.map(r=>_a.isNode(r)?r:this.createNode(r)),n)}createNode(e){return this.model.createNode(e)}removeNode(e,n={}){return this.model.removeCell(e,n)}addEdge(e,n={}){return this.model.addEdge(e,n)}addEdges(e,n={}){return this.addCell(e.map(r=>Ss.isEdge(r)?r:this.createEdge(r)),n)}removeEdge(e,n={}){return this.model.removeCell(e,n)}createEdge(e){return this.model.createEdge(e)}addCell(e,n={}){return this.model.addCell(e,n),this}removeCell(e,n={}){return this.model.removeCell(e,n)}removeCells(e,n={}
697){return this.model.removeCells(e,n)}removeConnectedEdges(e,n={}){return this.model.removeConnectedEdges(e,n)}disconnectConnectedEdges(e,n={}){return this.model.disconnectConnectedEdges(e,n),this}hasCell(e){return this.model.has(e)}getCells(){return this.model.getCells()}getCellCount(){return this.model.total()}getNodes(){return this.model.getNodes()}getEdges(){return this.model.getEdges()}getOutgoingEdges(e){return this.model.getOutgoingEdges(e)}getIncomingEdges(e){return this.model.getIncomingEdges(e)}getConnectedEdges(e,n={}){return this.model.getConnectedEdges(e,n)}getRootNodes(){return this.model.getRoots()}getLeafNodes(){return this.model.getLeafs()}isRootNode(e){return this.model.isRoot(e)}isLeafNode(e){return this.model.isLeaf(e)}getNeighbors(e,n={}){return this.model.getNeighbors(e,n)}isNeighbor(e,n,r={}){return this.model.isNeighbor(e,n,r)}getSuccessors(e,n={}){return this.model.getSuccessors(e,n)}isSuccessor(e,n,r={}){return this.model.isSuccessor(e,n,r)}getPredecessors(e,n={}){return this.model.getPredecessors(e,n)}isPredecessor(e,n,r={}){return this.model.isPredecessor(e,n,r)}getCommonAncestor(...e){return this.model.getCommonAncestor(...e)}getSubGraph(e,n={}){return this.model.getSubGraph(e,n)}cloneSubGraph(e,n={}){return this.model.cloneSubGraph(e,n)}cloneCells(e){return this.model.cloneCells(e)}getNodesFromPoint(e,n){return this.model.getNodesFromPoint(e,n)}getNodesInArea(e,n,r,o,i){return this.model.getNodesInArea(e,n,r,o,i)}getNodesUnderNode(e,n={}){return this.model.getNodesUnderNode(e,n)}searchCell(e,n,r={}){return this.model.search(e,n,r),this}getShortestPath(e,n,r={}){return this.model.getShortestPath(e,n,r)}getAllCellsBBox(){return this.model.getAllCellsBBox()}getCellsBBox(e,n={}){return this.model.getCellsBBox(e,n)}startBatch(e,n={}){this.model.startBatch(e,n)}stopBatch(e,n={}){this.model.stopBatch(e,n)}batchUpdate(e,n,r){const o=typeof e=="string"?e:"update",i=typeof e=="string"?n:e,s=typeof n=="function"?r:n;this.startBatch(o,s);const a=i();return this.stopBatch(o,s),a}updateCellId(e,n){return this.model.updateCellId(e,n)}findView(e){return Ur.isCell(e)?this.findViewByCell(e):this.findViewByElem(e)}findViews(e){return Gt.isRectangleLike(e)?this.findViewsInArea(e):De.isPointLike(e)?this.findViewsFromPoint(e):[]}findViewByCell(e){return this.renderer.findViewByCell(e)}findViewByElem(e){return this.renderer.findViewByElem(e)}findViewsFromPoint(e,n){const r=typeof e=="number"?{x:e,y:n}:e;return this.renderer.findViewsFromPoint(r)}findViewsInArea(e,n,r,o,i){const s=typeof e=="number"?{x:e,y:n,width:r,height:o}:e,a=typeof e=="number"?i:n;return this.renderer.findViewsInArea(s,a)}matrix(e){return typeof e>"u"?this.transform.getMatrix():(this.transform.setMatrix(e),this)}resize(e,n){const r=this.getPlugin("scroller");return r?r.resize(e,n):this.transform.resize(e,n),this}scale(e,n=e,r=0,o=0){return typeof e>"u"?this.transform.getScale():(this.transform.scale(e,n,r,o),this)}zoom(e,n){const r=this.getPlugin("scroller");if(r){if(typeof e>"u")return r.zoom();r.zoom(e,n)}else{if(typeof e>"u")return this.transform.getZoom();this.transform.zoom(e,n)}return this}zoomTo(e,n={}){const r=this.getPlugin("scroller");return r?r.zoom(e,Object.assign(Object.assign({},n),{absolute:!0})):this.transform.zoom(e,Object.assign(Object.assign({},n),{absolute:!0})),this}zoomToRect(e,n={}){const r=this.getPlugin("scroller");return r?r.zoomToRect(e,n):this.transform.zoomToRect(e,n),this}zoomToFit(e={}){const n=this.getPlugin("scroller");return n?n.zoomToFit(e):this.transform.zoomToFit(e),this}rotate(e,n,r){return typeof e>"u"?this.transform.getRotation():(this.transform.rotate(e,n,r),this)}translate(e,n){return typeof e>"u"?this.transform.getTranslation():(this.transform.translate(e,n),this)}translateBy(e,n){const r=this.translate(),o=r.tx+e,i=r.ty+n;return this.translate(o,i)}getGraphArea(){return this.transform.getGraphArea()}getContentArea(e={}){return this.transform.getContentArea(e)}getContentBBox(e={}){return this.transform.getContentBBox(e)}fitToContent(e,n,r,o){return this.transform.fitToContent(e,n,r,o)}scaleContentToFit(e={}){return this.transform.scaleContentToFit(e),this}center(e){return this.centerPoint(e)}centerPoint(e,n,r){const o=this.getPlugin("scroller");return o?o.centerPoint(e,n,r):this.transform.centerPoint(e,n),this}centerContent(e){const n=this.getPlugin("scroller");return n?n.centerContent(e):this.transform.centerContent(e),this}centerCell(e,n){const r=this.getPlugin("scroller");return r?r.centerCell(e,n):this.transform.centerCell(e),this}positionPoint(e,n,r,o={}){const i=this.getPlugin("scroller");return i?i.positionPoint(e,n,r,o):this.transform.positionPoint(e,n,r),this}positionRect(e,n,r){const o=this.getPlugin("scroller");return o?o.positionRect(e,n,r):this.transform.positionRect(e,n),this}positionCell(e,n,r){const o=this.getPlugin("scroller");return o?o.positionCell(e,n,r):this.transform.positionCell(e,n),this}positionContent(e,n){const r=this.getPlugin("scroller");return r?r.positionContent(e,n):this.transform.positionContent(e,n),this}
697snapToGrid(e,n){return this.coord.snapToGrid(e,n)}pageToLocal(e,n,r,o){return Gt.isRectangleLike(e)?this.coord.pageToLocalRect(e):typeof e=="number"&&typeof n=="number"&&typeof r=="number"&&typeof o=="number"?this.coord.pageToLocalRect(e,n,r,o):this.coord.pageToLocalPoint(e,n)}localToPage(e,n,r,o){return Gt.isRectangleLike(e)?this.coord.localToPageRect(e):typeof e=="number"&&typeof n=="number"&&typeof r=="number"&&typeof o=="number"?this.coord.localToPageRect(e,n,r,o):this.coord.localToPagePoint(e,n)}clientToLocal(e,n,r,o){return Gt.isRectangleLike(e)?this.coord.clientToLocalRect(e):typeof e=="number"&&typeof n=="number"&&typeof r=="number"&&typeof o=="number"?this.coord.clientToLocalRect(e,n,r,o):this.coord.clientToLocalPoint(e,n)}localToClient(e,n,r,o){return Gt.isRectangleLike(e)?this.coord.localToClientRect(e):typeof e=="number"&&typeof n=="number"&&typeof r=="number"&&typeof o=="number"?this.coord.localToClientRect(e,n,r,o):this.coord.localToClientPoint(e,n)}localToGraph(e,n,r,o){return Gt.isRectangleLike(e)?this.coord.localToGraphRect(e):typeof e=="number"&&typeof n=="number"&&typeof r=="number"&&typeof o=="number"?this.coord.localToGraphRect(e,n,r,o):this.coord.localToGraphPoint(e,n)}graphToLocal(e,n,r,o){return Gt.isRectangleLike(e)?this.coord.graphToLocalRect(e):typeof e=="number"&&typeof n=="number"&&typeof r=="number"&&typeof o=="number"?this.coord.graphToLocalRect(e,n,r,o):this.coord.graphToLocalPoint(e,n)}clientToGraph(e,n,r,o){return Gt.isRectangleLike(e)?this.coord.clientToGraphRect(e):typeof e=="number"&&typeof n=="number"&&typeof r=="number"&&typeof o=="number"?this.coord.clientToGraphRect(e,n,r,o):this.coord.clientToGraphPoint(e,n)}defineFilter(e){return this.defs.filter(e)}defineGradient(e){return this.defs.gradient(e)}defineMarker(e){return this.defs.marker(e)}getGridSize(){return this.grid.getGridSize()}setGridSize(e){return this.grid.setGridSize(e),this}showGrid(){return this.grid.show(),this}hideGrid(){return this.grid.hide(),this}clearGrid(){return this.grid.clear(),this}drawGrid(e){return this.grid.draw(e),this}
697updateBackground(){return this.background.update(),this}drawBackground(e,n){const r=this.getPlugin("scroller");return r!=null&&(this.options.background==null||!n)?r.drawBackground(e,n):this.background.draw(e),this}clearBackground(e){const n=this.getPlugin("scroller");return n!=null&&(this.options.background==null||!e)?n.clearBackground(e):this.background.clear(),this}enableVirtualRender(){return this.virtualRender.enableVirtualRender(),this}disableVirtualRender(){return this.virtualRender.disableVirtualRender(),this}isMouseWheelEnabled(){return!this.mousewheel.disabled}enableMouseWheel(){return this.mousewheel.enable(),this}disableMouseWheel(){return this.mousewheel.disable(),this}toggleMouseWheel(e){return e==null?this.isMouseWheelEnabled()?this.disableMouseWheel():this.enableMouseWheel():e?this.enableMouseWheel():this.disableMouseWheel(),this}isPannable(){const e=this.getPlugin("scroller");return e?e.isPannable():this.panning.pannable}enablePanning(){const e=this.getPlugin("scroller");return e?e.enablePanning():this.panning.enablePanning(),this}disablePanning(){const e=this.getPlugin("scroller");return e?e.disablePanning():this.panning.disablePanning(),this}togglePanning(e){return e==null?this.isPannable()?this.disablePanning():this.enablePanning():e!==this.isPannable()&&(e?this.enablePanning():this.disablePanning()),this}use(e,...n){return this.installedPlugins.has(e)||(this.installedPlugins.add(e),e.init(this,...n)),this}getPlugin(e){return Array.from(this.installedPlugins).find(n=>n.name===e)}getPlugins(e){return Array.from(this.installedPlugins).filter(n=>e.includes(n.name))}enablePlugins(e){let n=e;Array.isArray(n)||(n=[n]);const r=this.getPlugins(n);return r?.forEach(o=>{var i;(i=o?.enable)===null||i===void 0||i.call(o)}),this}disablePlugins(e){let n=e;Array.isArray(n)||(n=[n]);const r=this.getPlugins(n);return r?.forEach(o=>{var i;(i=o?.disable)===null||i===void 0||i.call(o)}),this}isPluginEnabled(e){var n;const r=this.getPlugin(e);return(n=r?.isEnabled)===null||n===void 0?void 0:n.call(r)}disposePlugins(e){let n=e;Array.isArray(n)||(n=[n]);const r=this.getPlugins(n);return r?.forEach(o=>{o.dispose(),this.installedPlugins.delete(o)}),this}dispose(e=!0){e&&this.model.dispose(),this.css.dispose(),this.defs.dispose(),this.grid.dispose(),this.coord.dispose(),this.transform.dispose(),this.highlight.dispose(),this.background.dispose(),this.mousewheel.dispose(),this.panning.dispose(),this.view.dispose(),this.renderer.dispose(),this.installedPlugins.forEach(n=>{n.dispose()})}}bkt([cd.dispose()],Gr.prototype,"dispose",null);(function(t){t.View=Yp,t.Renderer=D8,t.MouseWheel=M8,t.DefsManager=T0e,t.GridManager=R8,t.CoordManager=_0e,t.TransformManager=w0e,t.HighlightManager=G2,t.BackgroundManager=O8,t.PanningManager=N8})(Gr||(Gr={}));(function(t){t.toStringTag=`X6.${t.name}`;function e(n){if(n==null)return!1;if(n instanceof t)return!0;const r=n[Symbol.toStringTag];return r==null||r===t.toStringTag}t.isGraph=e})(Gr||(Gr={}));(function(t){function e(n,r){const o=n instanceof HTMLElement?new t({container:n}):new t(n);return r!=null&&o.fromJSON(r),o}t.render=e})(Gr||(Gr={}));(function(t){t.registerNode=_a.registry.register,t.registerEdge=Ss.registry.register,t.registerView=Ds.registry.register,t.registerAttr=qp.registry.register,t.registerGrid=av.registry.register,t.registerFilter=_x.registry.register,t.registerNodeTool=Rx.registry.register,t.registerEdgeTool=Ox.registry.register,t.registerBackground=AP.registry.register,t.registerHighlighter=cm.registry.register,t.registerPortLayout=lC.registry.register,t.registerPortLabelLayout=Ix.registry.register,t.registerMarker=e0.registry.register,t.registerRouter=em.registry.register,t.registerConnector=cC.registry.register,t.registerAnchor=Nx.registry.register,t.registerEdgeAnchor=Mx.registry.register,t.registerConnectionPoint=Dx.registry.register})(Gr||(Gr={}));(function(t){t.unregisterNode=_a.registry.unregister,t.unregisterEdge=Ss.registry.unregister,t.unregisterView=Ds.registry.unregister,t.unregisterAttr=qp.registry.unregister,t.unregisterGrid=av.registry.unregister,t.unregisterFilter=_x.registry.unregister,t.unregisterNodeTool=Rx.registry.unregister,t.unregisterE
697dgeTool=Ox.registry.unregister,t.unregisterBackground=AP.registry.unregister,t.unregisterHighlighter=cm.registry.unregister,t.unregisterPortLayout=lC.registry.unregister,t.unregisterPortLabelLayout=Ix.registry.unregister,t.unregisterMarker=e0.registry.unregister,t.unregisterRouter=em.registry.unregister,t.unregisterConnector=cC.registry.unregister,t.unregisterAnchor=Nx.registry.unregister,t.unregisterEdgeAnchor=Mx.registry.unregister,t.unregisterConnectionPoint=Dx.registry.unregister})(Gr||(Gr={}));var Ckt=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,n,i):s(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},Skt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};class Fx extends _a{}(function(t){class e extends Tf{init(){super.init(),this.cell.on("change:*",this.onCellChangeAny,this)}onCellChangeAny({key:r}){const o=t.shapeMaps[this.cell.shape];if(o){const{effect:i}=o;(!i||i.includes(r))&&this.renderHTMLComponent()}}confirmUpdate(r){const o=super.confirmUpdate(r);return this.handleAction(o,e.action,()=>this.renderHTMLComponent())}renderHTMLComponent(){const r=this.selectors&&this.selectors.foContent;if(r){GR(r);const o=t.shapeMaps[this.cell.shape];if(!o)return;let{html:i}=o;typeof i=="function"&&(i=i(this.cell)),i&&(typeof i=="string"?r.innerHTML=i:WR(r,i))}}dispose(){this.cell.off("change:*",this.onCellChangeAny,this)}}Ckt([e.dispose()],e.prototype,"dispose",null),t.View=e,function(n){n.action="html",n.config({bootstrap:[n.action],actions:{html:n.action}}),Tf.registry.register("html-view",n,!0)}(e=t.View||(t.View={}))})(Fx||(Fx={}));(function(t){t.config({view:"html-view",markup:[{tagName:"rect",selector:"body"},Object.assign({},Oi.getForeignObjectMarkup()),{tagName:"text",selector:"label"}],attrs:{body:{fill:"none",stroke:"none",refWidth:"100%",refHeight:"100%"},fo:{refWidth:"100%",refHeight:"100%"}}}),_a.registry.register("html",t,!0)})(Fx||(Fx={}));(function(t){t.shapeMaps={};function e(n){const{shape:r,html:o,effect:i,inherit:s}=n,a=Skt(n,["shape","html","effect","inherit"]);if(!r)throw new Error("should specify shape in config");t.shapeMaps[r]={html:o,effect:i},Gr.registerNode(r,Object.assign({inherit:s||"html"},a),!0)}t.register=e}
697)(Fx||(Fx={}));const CD={width:520},vl={width:120,height:40},xc={network:"network-node",ingress:"ingress-node",egress:"egress-node"},Ekt=({graphRef:t,projectId:e})=>{const n=vd.getAllByProjectIdX6(e),r=ea.getAllByProjectIdX6(e),o=vl.height,i=Math.max(n.length,r.length),s=i+1,a=i*o+s*o,l=()=>{Gr.registerNode(xc.network,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"}],inherit:"rect",width:CD.width,zIndex:2,attrs:{body:{strokeWidth:3,fill:"#fff",cursor:"pointer",stroke:XW}}},!0)},c=d=>{const h=d.container.getBoundingClientRect(),f=Rs.leftPanelWidth,p=window.innerWidth-Rs.rightPanelWidth,m=Rs.headerHeight+Rs.actionBarHeight,y=window.innerHeight-Rs.footerHeight,v=Math.max(h.left,f),b=Math.min(h.right,p),S=Math.max(h.top,m),w=Math.min(h.bottom,y);return d.clientToLocal((v+b)/2,(S+w)/2)},u=d=>{if(!i)return;const h=c(d);d.addNode({id:xc.network,shape:xc.network,width:CD.width,height:a,x:h.x-CD.width/2,y:h.y-a/2})};return C.useEffect(()=>{l()},[]),C.useEffect(()=>{u(t)},[t,i,a]),null},xkt=({graphRef:t,projectId:e})=>{const n="ingress-port",r=vd.getAllByProjectIdX6(e),o=()=>{Gr.registerNode(xc.ingress,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"},{tagName:"text",selector:"label"}],inherit:"rect",width:vl.width,height:vl.height,zIndex:2,attrs:{body:{strokeWidth:3,fill:"#fff",cursor:"pointer",stroke:hs.ORANGE},highlight:{stroke:Kv,strokeWidth:5,fill:"none",visibility:"hidden",pointerEvents:"none",width:vl.width,height:vl.height},label:{cursor:"pointer",pointerEvents:"none",textWrap:{width:"65%",height:"95%",ellipsis:!0,breakWord:!0}}},ports:{groups:{[n]:i()}}},!0)},i=()=>
697({markup:[{tagName:"rect",selector:"port",magnet:!0}],position:"absolute",attrs:{port:{stroke:"#8f8f8f",strokeWidth:1,fill:"#fff",width:10,height:20,magnet:!0,x:-5,y:-10}}}),s=l=>[{id:`ingress-${l}`,group:n,args:{x:vl.width,y:vl.height/2}}],a=l=>{const c=l.getNodes().find(h=>h.shape===xc.network);if(!c)return;const u=c.getPosition();Tt.sortBy(r,"componentId").forEach((h,f)=>{const p=l.addNode({id:h.id,shape:xc.ingress,label:`${h.name}`,ports:{items:s(h.componentId)}}),m=u.y+vl.height+f*(vl.height*2);p.position(u.x-vl.width,m)})};return C.useEffect(()=>{o()},[]),C.useEffect(()=>{a(t)},[t,r]),null},wkt=({graphRef:t,projectId:e})=>{const r=Yn(),o=bt(gd),i=C.useRef(new Map),s=m=>{r(d0(m)),o||r(pd(!0))},a=m=>{m.batchUpdate(()=>{m.getEdges().forEach(y=>{y.attr("line/opacity",1)})})},l=m=>{m.batchUpdate(()=>{m.getEdges().forEach(y=>{const v=i.current.get(y.id);v!==void 0&&(cancelAnimationFrame(v),i.current.delete(y.id)),y.attr("flowParticle/visibility","hidden"),y.attr("flowParticle/atConnectionRatio",0),y.attr("line/strokeDasharray",null),y.attr("line/strokeDashoffset",null),y.attr("line/style/animation",null)})})},c=({edge:m,animationFrames:y,startTime:v,timestamp:b})=>{const w=(b-v)%4e3/4e3;m.attr("flowParticle/atConnectionRatio",w);const A=requestAnimationFrame(_=>{c({edge:m,animationFrames:y,startTime:v,timestamp:_})});y.set(m.id,A)},u=(m,y)=>{const v=m.getEdges();m.batchUpdate(()=>{v.forEach(b=>{const S=b.getSourceCellId()===y||b.getTargetCellId()===y,w=i.current.get(b.id);if(w!==void 0&&(cancelAnimationFrame(w),i.current.delete(b.id)),!S){b.attr("line/opacity",0),b.attr("flowParticle/visibility","hidden"),b.attr("flowParticle/atConnectionRatio",0),b.attr("line/strokeDasharray",null),b.attr("line/strokeDashoffset",null),b.attr("line/style/animation",null);return}b.attr("line/opacity",1),b.attr("flowParticle/visibility","visible"),b.attr("line/strokeDasharray","10 6"),b.attr("line/style/animation","network-edge-flow 3s linear infinite");const A=performance.now(),_=requestAnimationFrame(P=>{c({edge:b,animationFrames:i.current,startTime:A,timestamp:P})});i.current.set(b.id,Number(_))})})},d=m=>{m.on("node:mouseover",({node:y})=>{(y.shape===xc.ingress||y.shape===xc.egress)&&y.attr("highlight/visibility","visible")})},h=m=>{m.on("node:mouseout",({node:y})=>{(y.shape===xc.ingress||y.shape===xc.egress)&&y.attr("highlight/visibility","hidden")})},f=m=>{m.on("node:click",({node:y})=>{y.shape!==xc.ingress&&y.shape!==xc.egress||(s(y.id),u(m,y.id))})},p=m=>{m.on("blank:click",()=>{a(m),l(m)})};return C.useEffect(()=>(f(t),p(t),()=>{t.off("node:click"),t.off("blank:click"),i.current.forEach(m=>{cancelAnimationFrame(m)}),i.current.clear()}),[t]),C.useEffect(()=>(d(t),h(t),()=>{t.off("node:mouseover"),t.off("node:mouseout")}),[t]),g("style",{children:` 698 @keyframes network-edge-flow { 699 from { 700 stroke-dashoffset: 0; 701 } 702 703 to { 704 stroke-dashoffset: -32; 705 } 706 } 707 `})},Akt=({graphRef:t,projectId:e})=>{const n="egress-port",r=ea.getAllTypeNonDefaultByProjectIdX6(e),o=()=>{Gr.registerNode(xc.egress,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"},{tagName:"text",selector:"label"}],inherit:"rect",width:vl.width,height:vl.height,zIndex:2,attrs:{body:{strokeWidth:3,fill:"#fff",cursor:"pointer",stroke:hs.CYAN},highlight:{stroke:Kv,strokeWidth:5,fill:"none",visibility:"hidden",pointerEvents:"none",width:vl.width,height:vl.height},label:{cursor:"pointer",pointerEvents:"none",textWrap:{width:"65%",height:"95%",ellipsis:!0,breakWord:!0}}},ports:{groups:{[n]:i()}}},!0)},i=()=>
707({markup:[{tagName:"rect",selector:"port",magnet:!0}],position:"absolute",attrs:{port:{stroke:"#8f8f8f",strokeWidth:1,fill:"#fff",width:10,height:20,magnet:!0,x:-5,y:-10}}}),s=l=>[{id:`egress-${l}`,group:n,args:{x:0,y:vl.height/2}}],a=l=>{const c=l.getNodes().find(h=>h.shape===xc.network);if(!c)return;const u=c.getPosition();Tt.sortBy(r,"componentId").forEach((h,f)=>{const p=l.addNode({id:h.id,shape:xc.egress,label:`${h.name}`,ports:{items:s(h.componentId)}}),m=u.y+vl.height+f*(vl.height*2);p.position(u.x+CD.width,m)})};return C.useEffect(()=>{o()},[]),C.useEffect(()=>{a(t)},[t,r]),null},Tkt=Nr.injectEndpoints({endpoints:t=>({getProjectNcnocPhysicalConnectivity:t.query({query:e=>`${dt.projectNcnocPhysicalConnectivity}?projectId=${e}`,providesTags:[We.ProjectNcnocPhysicalConnectivity],transformResponse:e=>e})})}),{useGetProjectNcnocPhysicalConnectivityQuery:L8}=Tkt,_kt=t=>{const{data:e=[]}=L8(t);return e},Ikt=t=>{const{isLoading:e}=L8({projectId:t});return e},tne={getAllByProjectId:_kt,getProjectNcnocPhysicalConnectivityIsLoading:Ikt},Pkt=({graphRef:t,projectId:e})=>{const n="Loading network...",{width:r,height:o}=sc(),i=bt(h0),s=bt(gd),a=tne.getProjectNcnocPhysicalConnectivityIsLoading(e),l=tne.getAllByProjectId(e),c=vd.getAllByProjectIdX6(e),u=ea.getAllTypeNonDefaultByProjectIdX6(e),[d,h]=C.useState(!0);return C.useEffect(()=>{const f=new Map(c.map(y=>[y.id,y])),p=new Map(u.map(y=>[y.id,y])),m=[];l.forEach(y=>{if(t.hasCell(y.id))return;const v=f.get(y.ingressId),b=p.get(y.egressId);!v||!b||!t.hasCell(y.ingressId)||!t.hasCell(y.egressId)||m.push({id:y.id,source:{cell:y.ingressId,port:`ingress-${v.componentId}`},target:{cell:y.egressId,port:`egress-${b.componentId}`},markup:[{tagName:"path",selector:"line"},{tagName:"circle",selector:"flowParticle"}],attrs:{line:{connection:!0,targetMarker:null,sourceMarker:null},flowParticle:{r:4,fill:"#000",stroke:"#000",strokeWidth:2,atConnectionRatio:0,visibility:"hidden",pointerEvents:"none"}}})}),m.length&&t.addEdges(m),h(!1)},[t,c,u,l,d]),a||d?g(le,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,backgroundColor:"rgba(255, 255, 255, 0.5)",left:0,width:ei.getCenterPanelWidth({width:r,isLeftPanelOpen:i,isRightPanelOpen:s}),height:ei.getCenterPanelHeight(o)},children:K(le,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g(Ni,{}),g(Ke,{children:n})]})}):null},Rkt=({projectId:t})=>{const{width:e,height:n}=sc(),{diagramWidth:r,diagramHeight:o}=st.getStageDimensions({width:e,height:n}),i=C.useRef(null),[s,a]=C.useState(null);return C.useEffect(()=>{const l=new Gr({container:i.current,background:{color:yB},autoResize:!0,grid:{visible:!0,type:vB,args:[{color:bB,thickness:Xv},{color:CB,thickness:Xv,factor:fS}]},panning:!0,mousewheel:!0,interacting:{nodeMovable:!1,magnetConnectable:!0,edgeMovable:!0,edgeLabelMovable:!1},connecting:{snap:!0,allowPort(){return!0},allowMulti(){return!1},allowBlank(){return!1},allowNode(){return!1},allowEdge(){return!0},allowLoop(){return!0}}});return a(l),()=>{l&&(l.getNodes().forEach(c=>{l.removeNode(c.id)}
707),l.getEdges().forEach(c=>{l.removeEdge(c.id)}),l.dispose())}},[]),K(le,{sx:{width:r,height:o,position:"absolute",left:0},children:[g("div",{ref:i,style:{width:"100%",height:"100%"}}),s?K(gr,{children:[g(Ekt,{graphRef:s,projectId:t}),g(xkt,{graphRef:s,projectId:t}),g(Akt,{graphRef:s,projectId:t}),g(Pkt,{graphRef:s,projectId:t}),g(wkt,{graphRef:s,projectId:t})]}):null]})},uC=({value:t,options:e,onChangeHandler:n,isError:r,sx:o})=>{const i={height:"24px",width:"100%","&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:so},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:so}},s={"&.Mui-selected":{backgroundColor:XI},"&.Mui-selected:hover":{backgroundColor:XI,opacity:.7}},a=e.map(({key:l,value:c,displayName:u,isOptionDisabled:d})=>g(mr,{value:String(c),disabled:d,sx:s,children:u??c},l));return g(xa,{variant:"outlined",size:"medium",value:String(t),onChange:n,error:r,sx:{...i,...o},children:a})};var Vd=(t=>(t[t.AUTO=0]="AUTO",t[t.LAYER=1]="LAYER",t[t.RING=2]="RING",t[t.MESH=3]="MESH",t[t.STAR=4]="STAR",t))(Vd||{});const Ho={EDIT_SYSTEM:"Edit System Config",NOC_PARAMETERS:"NoC Parameters",ADDRESS_WIDTH:"Address Width",DATA_WIDTH:"Data Width",CLOCK_FREQUENCY_VALIDATION:"Clock Frequency Validation",CUSTOM_TRAFFIC_SIMULATION:"Custom Traffic Simulation",POWER_PARAMETERS:"Power Parameters",POWER_NET_NAME:"Power Net Name",POWER_VOLTAGE:"Power Voltage",GROUND_NET_NAME:"Ground Net Name",GROUND_VOLTAGE:"Ground",USER_SIGNAL_PARAMETERS:"User Signal Parameters",USER_REQUEST_WIDTH:"User Request Width",USER_DATA_WIDTH:"User Data Width",USER_RESPONSE_WIDTH:"User Response Width",REGISTER_MAP_GENERATION:"Register Map Generation",ADDRESS_INTERLEAVING_PARAMETERS:"Address Interleaving Parameters",ADDRESS_INTERLEAVING:"Address Interleaving",INTERLEAVED_CHANNEL_SIZE:"Interleaved Channel Size",INTERLEAVING_SPLIT:"Interleaving Split",SIG_NATIVE_CROSS_TOPOLOGY:"SIG_NATIVE Cross Topology",COMPUTED_BITS_BUFFER_ID:"Computed Bits Buffer ID",COMPUTED_READ_ID_WIDTH_MASTER_COMMON:"Computed Read ID Width Master Common",COMPUTED_WRITE_ID_WIDTH_MASTER_COMMON:"Computed Write ID Width Master Common",CONNECTED_BITS_BUFFER_ID:"Connected Bits Buffer ID",CONNECTED_READ_ID_WIDTH_MASTER_COMMON:"Connected Read ID Width Master Common",CONNECTED_WRITE_ID_WIDTH_MASTER_COMMON:"Connected Write ID Width Master Common"},P0e=[{key:256,value:256},{key:512,value:512},{key:1024,value:1024}],R0e=[{key:32,value:32},{key:64,value:64}],Okt=[{key:Vd.AUTO,value:Vd.AUTO,displayName:"Auto"},{key:Vd.LAYER,value:Vd.LAYER,displayName:"Layer",isOptionDisabled:!0},{key:Vd.RING,value:Vd.RING,displayName:"Ring",isOptionDisabled:!0},{key:Vd.MESH,value:Vd.MESH,displayName:"Mesh",isOptionDisabled:!0},{key:Vd.STAR,value:Vd.STAR,displayName:"Star",isOptionDisabled:!0}],dC=.5,hC=1.5,_T=1,IT=64,nne=BigInt(1),rne=BigInt(Math.pow(2,63)),cU=1,uU=8,pM=1,gM=32,Nkt=({currentNcnocSystem:t,currentNetworkConfiguration:e,setCurrentNcnocSystem:n,setCurrentNetworkConfiguration:r})=>{const o="NoC Address Width",i="NoC Data Width",s="Preferred Network Configuration",a=l=>{const c={...t,...l};n(c)};return K(le,{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:2,sx:{p:2,width:"80%"},children:[g(Ke,{gridColumn:1,gridRow:1,children:o}),g(uC,{sx:{gridColumn:2,gridRow:1},value:t.addressWidth,options:R0e,onChangeHandler:l=>a({addressWidth:Number(l.target.value)})}),g(Ke,{gridColumn:1,gridRow:2,children:i}),g(uC,{sx:{gridColumn:2,gridRow:2},value:t.dataWidth,options:P0e,onChangeHandler:l=>a({dataWidth:Number(l.target.value)})}),g(Ke,{gridColumn:4,gridRow:1,children:s}),g(uC,{sx:{gridColumn:5,gridRow:1},value:e,options:Okt,onChangeHandler:l=>r(Number(l.target.value))})]})},Mkt=()=>2,Dkt=()=>Qp(),Lkt=t=>{const e=nt.AXI_FOUR_FULL;return`${wC[e]}${t}`},kkt=()=>nt.AXI_FOUR_FULL,Fkt=()=>64,O0e=()=>0,Bkt=()=>{const t=nt.SEC;return`${wC[t]}${O0e()}`},$kt=()=>Fe.TARGETS,Hkt=()=>nt.SEC,Ukt=()=>0,of={getParameterReadDataBufferDepth:Mkt,getId:Dkt,getName:Lkt,getCompleteProtocol:kkt,getPortDataWidth:Fkt,getDefaultSlaveDeviceId:O0e,getDefaultSlaveName:Bkt,getDefaultSlaveType:$kt,getDefaultSlaveProtocol:Hkt,getDefaultSlaveDataWidth:Ukt};var Yg=(t=>(t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTED=1]="CONNECTED",t))(Yg||{});const zkt=({ncnocSystem:t,groupedComponents:e,ncnocPhysicalConnectivities:n})=>{const r=e.initiators.map(c=>({id:c.id,name:c.name,deviceId:c.componentId,type:c.type,protocol:sm({busProtocol:c.parameters.bus.protocol,busVersion:c.parameters.bus.version,busVariant:c.parameters.bus.variant}),dataWidth:c.parameters.portDataWidth})),o=e.targets.filter(c=>c.componentId!==0).map(c=>({id:c.id,name:c.name,deviceId:c.componentId,type:c.type,protocol:sm({busProtocol:c.parameters.bus.protocol,busVersion:c.parameters.bus.version,busVariant:c.parameters.bus.variant}),dataWidth:c.parameters.portDataWidth})),i=e.targets.find(c=>c.parameters.bus.protocol===wt.SEC&&c.componentId===0),a=[{id:i?.id??of.getId(),name:i?.name??of.getDefaultSlaveName(),deviceId:i?.componentId??of.getDefaultSlaveDeviceId(),type:i?.type??of.getDefaultSlaveType(),protocol:i?sm({busProtocol:i.parameters.bus.protocol,busVersion:i.parameters.bus.version,busVariant:i.parameters.bus.variant}):of.getDefaultSlaveProtocol(),dataWidth:i?.parameters?.portDataWidth??of.getDefaultSlaveDataWidth()},...o],l=Vkt({ncnocPhysicalConnectivities:n,initiators:e.initiators,targets:e.targets});return{projectId:t.projectId,networkConfiguration:Vd.AUTO,ingresses:r,egresses:a,physicalConnectivityMap:l}},Vkt=({ncnocPhysicalConnectivities:t,initiators:e,targets:n})=>{if(!t.length){const r=n.map(o=>({egressId:o.id,access:Yg.CONNECTED}));return e.map(o=>({ingressId:o.id,egresses:r}))}return e.map(r=>{const o=n.map(i=>{const s=Tt.find(t,{ingressId:r.id,egressId:i.id});return{egressId:i.id,access:+!!s}});return{ingressId:r.id,egresses:o}})},Gkt=({phyiscalConnectivityMap:t,ingressId:e,egressId:n})=>{const r=Tt.find(t,{ingressId:e});return Tt.find(r?.egresses,{egressId:n})?.access??Yg.CONNECTED},Wkt=({phyiscalConnectivityMap:t,ingressId:e,egressId:n,access:r})=>{const o={egressId:n,access:r};return t.map(i=>i.ingressId!==e?i:{ingressId:e,egresses:Tt.unionBy([o],i.egresses,"egressId")})},SD={getOverviewFromSystemAndComponents:zkt,getAccessByInterfaceIds:Gkt,getUpdatedConnectivityAccess:Wkt},jkt=(t,e,n,r)=>{const o=`${wC[e]}${r}`;return t===o?`${wC[n]}${r}`:t},qkt=({nocDataWidth:t,type:e,rows:n,filteredRows:r,setRows:o,rowSelectionModel:i,setRowSelectionModel:s})=>{const{themeColors:a}=Lc(),l="name",c="protocol",u="dataWidth",d="deviceId",h="Name",f="Interface Protocol",p="Port Data Width",m=`${e===Fe.INITIATORS?"Ingress":"Egress"} Device ID`,y="Interface Name should be a unique 2-100 characters alphanumeric (or underscore) string, and doesn't start with a number",v=25,b=100,S=e===Fe.INITIATORS?a.designOrange[300]:a.designCyan[300],w=md(S,.8),A=UG(S,.1),[_,P]=C.useState({pageSize:b,page:0}),R=H=>{const V=xh.componentNameIsValid(H),q=n.filter(J=>J.name===H).length>1;return V&&!q},O=n.filter(H=>!R(H.name)).length,N=e===Fe.INITIATORS?U3.filter(H=>H.key!=nt.SRAM):U3,M=(H,V)=>{const q=n.map(J=>J.id===H?{...J,...V}:J);o(q)},L=H=>(M(H.id,{name:H.name}),H),F=H=>{i.includes(H.id)?s([]):s([H.id])},$=H=>H===nt.SEC,D=H=>{switch(H){case nt.APB_THREE:case nt.APB_FIVE:return 32;case nt.SIG_NATIVE:case nt.SRAM:return 0;case nt.NONE:case nt.AXI_FOUR_FULL:case nt.AXI_FOUR_LITE:case nt.AXI_FOUR_STREAM:case nt.AXI_THREE:case nt.AHB_FIVE:case nt.AHB_THREE_LITE:default:return 64}},k=H=>{const V=ZOe.filter(q=>Number(q.value)<=t);return H===nt.APB_FIVE||H===nt.APB_THREE?V.filter(q=>Number(q.value)<=32):H===nt.AXI_FOUR_LITE?V.filter(q=>Number(q.value)<=64):H===nt.SIG_NATIVE||H===nt.SRAM||H===nt.SEC?[]:V},U=[{field:d,headerName:m,width:150},{field:l,width:300,editable:!0,cellClassName:H=>R(H.row.name)?"":"error-name",renderHeader:()=>g(le,{sx:{width:"52px",height:"40px",alignContent:"center",textAlign:"center",overflow:"hidden"},children:g(rn,{title:y,children:g(Ca,{badgeContent:O,color:"error",children:h})})})},{field:c,headerName:f,width:220,renderCell:H=>$(H.row.protocol)?K(Ke,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g(OF,{sx:{color:"grey"}}),qh[H.row.protocol]]}):g(uC,{value:H.row.protocol,options:N,onChangeHandler:V=>{const q=Number(V.target.value);M(H.row.id,{protocol:q,dataWidth:D(q),name:jkt(H.row.name,H.row.protocol,q,H.row.deviceId)})}})},{field:u,headerName:p,width:150,renderCell:H=>{if($(H.row.protocol))return g(gr,{});const V=k(H.row.protocol);return V.length?g(uC,{value:H.row.dataWidth,options:V,onChangeHandler:q=>M(H.row.id,{dataWidth:Number(q.target.value)})}):g(le,{})}}];return g(Jj,{sx:{width:"100%",height:"50%",zIndex:1,borderColor:S,"& .error-name":{backgroundColor:"error.light",borderBottom:"2px s
707olid red"},"& .MuiDataGrid-cell:focus":{outline:"none"},"& .MuiDataGrid-cell:focus-within":{outline:"none"},"& .MuiDataGrid-columnHeader:focus":{outline:"none"},"& .MuiDataGrid-columnHeader:focus-within":{outline:"none"},"& .MuiDataGrid-row.Mui-selected":{backgroundColor:w},"& .MuiDataGrid-row.Mui-selected:hover":{backgroundColor:A},"& .MuiDataGrid-cell.MuiDataGrid-cell--editing:focus-within":{outline:`1px solid ${so}`}},rows:r,rowHeight:v,columns:U,rowSelectionModel:i,onRowClick:F,paginationModel:_,onPaginationModelChange:P,pageSizeOptions:[b],hideFooter:r.length<b,processRowUpdate:L,disableColumnFilter:!0,disableColumnSelector:!0,checkboxSelection:!1,disableColumnMenu:!0})},Ykt=({selectedRowId:t,handleAdd:e,handleRemove:n,handleDuplicate:r,handleMoveUp:o,handleMoveDown:i,filter:s,handleFilter:a,type:l,nocInterfaces:c})=>{const u=`Filter ${l===Fe.INITIATORS?"Ingress":"Egress"}`,d=c.length>=(l===Fe.INITIATORS?ys[Fe.INITIATORS]:ys[Fe.TARGETS]),h=!c.length,f=c.find(R=>R.protocol===nt.SEC),p=!!t&&!!f&&t===f.id,m=h||!t,y=m||p,v=m||!!s.length,b=g(eS,{}),S=g(Q6e,{}),w=g(I6e,{}),A=g(C6e,{}),_=g(y6e,{}),P=R=>{t&&R(String(t))};return K(Mt,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",width:"100%"},children:[K(Mt,{direction:"row",spacing:.5,sx:{alignItems:"center"},children:[g(Qo,{icon:b,disabled:d,onClick:e,sx:{color:"success.light"}}),g(Qo,{icon:S,disabled:y,onClick:()=>P(n),sx:{color:"error.main"}}),g(Qo,{icon:w,disabled:y,onClick:()=>P(r),sx:{color:tt}}),g(Qo,{icon:A,disabled:v,onClick:()=>P(o),sx:{color:tt}}),g(Qo,{icon:_,disabled:v,onClick:()=>P(i),sx:{color:tt}})]}),g(lo,{id:"filter",placeholder:u,value:s,onChange:R=>a(R.target.value),InputProps:{startAdornment:g(qr,{position:"start",children:g(Nce,{})})},variant:"outlined",size:"small",sx:{my:0,height:"40px",width:"220px",...Ic}})]})},Xkt=(t,e)=>{const n=e.map(o=>o.deviceId);let r=t===Fe.TARGETS?1:0;for(;n.includes(r)&&r<ys[t];)r++;return r},N0e=(t,e)=>{const n=Xkt(t,e);return t===Fe.INITIATORS?{id:qE.getId(),name:qE.getName(n),type:t,deviceId:n,protocol:qE.getCompleteProtocol(),dataWidth:qE.getPortDataWidth()}:{id:of.getId(),name:of.getName(n),type:t,deviceId:n,protocol:of.getCompleteProtocol(),dataWidth:of.getPortDataWidth()}},Kkt=(t,e)=>{const n=N0e(t.type,e),r=`${wC[t.protocol]}${t.deviceId}`,o=t.name===r?`${wC[t.protocol]}${n.deviceId}`:`${t.name}_${n.deviceId}`;return{...n,name:o,protocol:t.protocol,dataWidth:t.dataWidth}},one={create:N0e,duplicate:Kkt},ine=({nocDataWidth:t,type:e,nocInterfaces:n,setNocInterfaces:r})=>{const[o,i]=C.useState(""),[s,a]=C.useState([]),l=n.filter(p=>p.name.toLowerCase().includes(o.toLowerCase())||p.deviceId.toString().includes(o)||p.dataWidth.toString().includes(o)||U3.find(m=>m.key===p.protocol)?.displayName?.toLowerCase().includes(o.toLowerCase())),c=()=>{const p=one.create(e,n),m=[...n,p];if(s.length){const y=n.findIndex(b=>b.id===s[0]),v=y===-1?m:[...n.slice(0,y+1),p,...n.slice(y+1)];r(v)}else r(m)},u=()=>{if(!s.length)return;const p=s[0],m=n.findIndex(b=>b.id===p),y=n.filter(b=>b.id!==p);if(r(y),y.length===0){a([]);return}const v=Math.min(m,y.length-1);a([y[v].id])},d=()=>{if(!s.length)return;const p=n.find(b=>b.id===s[0]);if(!p)return;const m=one.duplicate(p,n),y=n.findIndex(b=>b.id===s[0]);if(y===-1)return;const v=[...n.slice(0,y+1),m,...n.slice(y+1)];r(v)},h=()=>{if(!s.length)return;const p=n.findIndex(A=>A.id===s[0]);if(p===0)return;const m=n[p],y=n.slice(0,p),v=n.slice(p+1),b=y.slice(0,p-1),S=[...y.slice(p-1),...v],w=[...b,m,...S];r(w)},f=()=>{if(!s.length)return;const p=n.findIndex(A=>A.id===s[0]);if(p===n.length)return;const m=n[p],y=n.slice(0,p),v=n.slice(p+1),b=v.slice(1),w=[...[...y,...v.slice(0,1)],m,...b];r(w)};return K(Mt,{direction:"column",sx:{mx:1,width:"50%"},children:[g(Ykt,{selectedRowId:s[0]??null,handleAdd:c,handleRemove:u,handleDuplicate:d,handleMoveUp:h,handleMoveDown:f,filter:o,handleFilter:i,type:e,nocInterfaces:n}),g(qkt,{nocDataWidth:t,type:e,rows:n,filteredRows:l,setRows:r,rowSelectionModel:s,setRowSelectionModel:a})]})},Qkt=({currentNcnocSystem:t,currentIngresses:e,currentEgresses:n,setCurrentIngresses:r,setCurrentEgresses:o})=>K(Mt,{direction:"row",spacing:1.5,sx:{mx:1,width:"100%",height:"56vh"},children:[g(ine,{nocDataWidth:t.dataWidth,type:Fe.INITIATORS,nocInterfaces:e,setNocInterfaces:r}),g(ine,{nocDataWidth:t.dataWidth,type:Fe.TARGETS,nocInterfaces:n,setNocInterfaces:o})]}),Zkt=Nr.injectEndpoints({endpoints:t=>({updateProjectNcnocOverview:t.mutation({query:e=>({url:`${dt.projectNcnocOverview}
707`,method:nn.POST,body:e}),invalidatesTags:["ProjectComponents",We.ProjectNcnocAddress,We.ProjectNcnocPhysicalConnectivity],transformErrorResponse:e=>e,transformResponse:e=>e})})}),{useUpdateProjectNcnocOverviewMutation:Jkt}=Zkt,sne=t=>{const e=new Set;return t.some(r=>e.has(r.name)?!0:(e.add(r.name),!1))},wz={initiators:[],routers:[],targets:[],topologies:[],bridges:[],virtualTargets:[]},eFt=({currentIngresses:t,currentEgresses:e,currentPhysicalConnectivityMap:n,setCurrentPhysicalConnectivityMap:r})=>{const a="130px",l="100px",c=Object.entries(Yg).length/2,u=C.useCallback((y,v)=>{const S=(SD.getAccessByInterfaceIds({phyiscalConnectivityMap:n,ingressId:y,egressId:v})-1+c)%c,w=SD.getUpdatedConnectivityAccess({phyiscalConnectivityMap:n,ingressId:y,egressId:v,access:S});r(w)},[n]),d=y=>{switch(y){case Yg.DISCONNECTED:return g(dR,{sx:{color:"error.main"},fontSize:"large"});case Yg.CONNECTED:default:return g(Vv,{sx:{color:"success.main"},fontSize:"large"})}},h=y=>{switch(y){case Yg.DISCONNECTED:return"Disconnected";case Yg.CONNECTED:default:return"Required Connected"}},f={width:a,height:41,display:"flex",px:.5,borderBottom:"1px black solid"},p={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},m={borderRadius:2,minWidth:0,width:40,height:40,padding:0,margin:"1px",border:"1px solid black",boxSizing:"border-box","&:hover":{border:`3px ${so} solid`},"&.Mui-disabled":{backgroundColor:"lightgrey"}};return K(le,{sx:{display:"grid",minWidth:"100%",minHeight:"100%",height:"100%",p:1,gridTemplateColumns:`${a} repeat(${e.length}, 41px)`,gridTemplateRows:`${l} repeat(${t.length}, 41px)`},children:[g(le,{sx:{width:a,height:l}}),e.map(y=>g(Ke,{sx:{...f,width:"140px",alignItems:"end",justifyContent:"left",transform:"translateY(-41px) rotate(-45deg)",transformOrigin:"bottom right"},children:g(le,{component:"span",sx:p,children:y.name})},y.id)),t.map(y=>K(C.Fragment,{children:[g(Ke,{sx:{...f,alignItems:"center",justifyContent:"right"},children:g(le,{component:"span",sx:p,children:y.name})},y.id),e.map(v=>{const b=SD.getAccessByInterfaceIds({phyiscalConnectivityMap:n,ingressId:y.id,egressId:v.id});return g(rn,{title:`${y.name} to ${v.name}: ${h(b)}`,children:g(Di,{disabled:v.deviceId===0,sx:m,onClick:()=>u(y.id,v.id),children:d(b)},`toggle-${y.id}-${v.id}`)},`tooltip-${y.id}-${v.id}`)})]},`row-${y.id}`))]})},M0e=({activeTab:t,handleActiveTabChange:e,children:n})=>g(tg,{value:t,onChange:e,variant:"scrollable",sx:{"& .MuiTabs-indicator":{backgroundColor:so,height:"3px"},"& .Mui-selected":{color:`${so} !important`}},children:n});function tFt(t){return Ft("MuiLoadingButton",t)}const nFt=Dt("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),Tg=nFt,rFt=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],o
707Ft=t=>{const{loading:e,loadingPosition:n,classes:r}=t,o={root:["root",e&&"loading"],startIcon:[e&&`startIconLoading${ht(n)}`],endIcon:[e&&`endIconLoading${ht(n)}`],loadingIndicator:["loadingIndicator",e&&`loadingIndicator${ht(n)}`]},i=Lt(o,tFt,r);return X({},r,i)},iFt=t=>t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"&&t!=="classes",sFt=$e(Sn,{shouldForwardProp:t=>iFt(t)||t==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(t,e)=>[e.root,e.startIconLoadingStart&&{[`& .${Tg.startIconLoadingStart}`]:e.startIconLoadingStart},e.endIconLoadingEnd&&{[`& .${Tg.endIconLoadingEnd}`]:e.endIconLoadingEnd}]})(({ownerState:t,theme:e})=>X({[`& .${Tg.startIconLoadingStart}, & .${Tg.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},t.loadingPosition==="center"&&{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Tg.loading}`]:{color:"transparent"}},t.loadingPosition==="start"&&t.fullWidth&&{[`& .${Tg.startIconLoadingStart}, & .${Tg.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginRight:-8}},t.loadingPosition==="end"&&t.fullWidth&&{[`& .${Tg.startIconLoadingStart}, & .${Tg.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginLeft:-8}})),aFt=$e("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.loadingIndicator,e[`loadingIndicator${ht(n.loadingPosition)}`]]}})(({theme:t,ownerState:e})=>X({position:"absolute",visibility:"visible",display:"flex"},e.loadingPosition==="start"&&(e.variant==="outlined"||e.variant==="contained")&&{left:e.size==="small"?10:14},e.loadingPosition==="start"&&e.variant==="text"&&{left:6},e.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled},e.loadingPosition==="end"&&(e.variant==="outlined"||e.variant==="contained")&&{right:e.size==="small"?10:14},e.loadingPosition==="end"&&e.variant==="text"&&{right:6},e.loadingPosition==="start"&&e.fullWidth&&{position:"relative",left:-10},e.loadingPosition==="end"&&e.fullWidth&&{position:"relative",right:-10})),lFt=C.forwardRef(function(e,n){const r=C.useContext(Ble),o=hF(r,e),i=Ht({props:o,name:"MuiLoadingButton"}),{children:s,disabled:a=!1,id:l,loading:c=!1,loadingIndicator:u,loadingPosition:d="center",variant:h="text"}=i,f=at(i,rFt),p=sd(l),m=u??g(Ni,{"aria-labelledby":p,color:"inherit",size:16}),y=X({},i,{disabled:a,loading:c,loadingIndicator:m,loadingPosition:d,variant:h}),v=oFt(y),b=c?g(aFt,{className:v.loadingIndicator,ownerState:y,children:m}):null;return K(sFt,X({disabled:a||c,id:p,ref:n},f,{variant:h,classes:v,ownerState:y,children:[y.loadingPosition==="end"?s:b,y.loadingPosition==="end"?b:s]}))}),W2=lFt,D0e=C.createContext(null);function cFt(){const[t,e]=C.useState(null);return C.useEffect(()=>{e(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),t}function uFt(t){const{children:e,value:n}=t,r=cFt(),o=C.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return g(D0e.Provider,{value:o,children:e})}function dFt(){return C.useContext(D0e)}function hFt(t,e){const{idPrefix:n}=t;return n===null?null:`${t.idPrefix}-P-${e}`}function fFt(t,e){const{idPrefix:n}=t;return n===null?null:`${t.idPrefix}-T-${e}`}function pFt(t){return Ft("MuiTabPanel",t)}Dt("MuiTabPanel",["root"]);const gFt=["children","className","value"],mFt=t=>{const{classes:e}=t;return Lt({root:["root"]},pFt,e)},yFt=$e("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({padding:t.spacing(3)})),vFt=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTabPanel"}),{children:o,className:i,value:s}=r,a=at(r,gFt),l=X({},r),c=mFt(l),u=dFt();if(u===null)throw new TypeError("No TabContext provided");const d=hFt(u,s),h=fFt(u,s);return g(yFt,X({"aria-labelledby":h,className:Ye(c.root,i),hidden:s!==u.value,id:d,ref:n,role:"tabpanel",ownerState:l},a,{children:s===u.value&&o}))}),ane=vFt,lne=({warningMessage:t,labelReturn:e,labelContinue:n,handleReturn:r,handleContinue:o,isErrorConfirmButton:i})=>{const s="20%",a="20%",l=[{id:"return",label:e,handleClick:()=>r(),isEnabled:!0,sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"continue",label:n,handleClick:()=>o(),isEnabled:!0,sx:{backgroundColor:i?"error.main":tt,"&:hover":{backgroundColor:i?"darkred":"black"},my:"5px",ml:1}}];return g(Iu,{open:!0,PaperProps:{sx:{minWidth:s,minHeight:a,py:2}},children:K(Mt,{direction:"column",sx:{alignItems:"center"},children:[K(le,{sx:{textAlign:"center",width:"100%"},children:[g(NW,{sx:{fontSize:72,color:"warning.main"}}),g(Ke,{variant:"h5",noWrap:!0,sx:{flex:15,my:1},children:t})]}),g(Mt,{direction:"row",spacing:.5,sx:{pt:2,justifyContent:"flex-end"},children:l.map(c=>g(PR,{id:c.id,label:c.label,handleClick:c.handleClick,isEnabled:c.isEnabled,sx:c.sx},c.id))})]})})},bFt=({projectId:t})=>{const e="Project Overview",n="Reset Changes",r="Configure",o="Reconfigure",i="Go back to overview",s="Discard changes",a="Changes in this overview will be discarded",l="This action will over
707write the current project design",c="Switching out from Overview tab will discard all changes",u="Project design is reconfigured",d="Failed to reconfigure project design";let h;(Ne=>{Ne.INTERFACES="Interfaces",Ne.CONNECTIVITY="Connectivity"})(h||(h={}));const f=Yn(),{data:p=wz}=nl(t),{data:m=[]}=L8(t),y=Wp.getByProjectId(t),v=C.useMemo(()=>SD.getOverviewFromSystemAndComponents({ncnocSystem:y,groupedComponents:p,ncnocPhysicalConnectivities:m}),[p,m]),[b]=g6(),[S,{isLoading:w}]=Jkt(),[A,_]=C.useState("Interfaces"),[P,R]=C.useState(!1),[O,N]=C.useState(!1),[M,L]=C.useState(y),[F,$]=C.useState(v.ingresses),[D,k]=C.useState(v.egresses),[U,H]=C.useState(v.networkConfiguration),[V,q]=C.useState(v.physicalConnectivityMap),J=!p.routers.length&&!p.initiators.length&&!p.targets.filter(Ne=>Ne.componentId!==0).length&&!m.length,Q=!Tt.isEqual(y,M),se=!Tt.isEqual(v.ingresses,F)||!Tt.isEqual(v.egresses,D),oe=sne(F),ie=F.some(Ne=>!xh.componentNameIsValid(Ne.name)),ee=sne(D),re=D.some(Ne=>!xh.componentNameIsValid(Ne.name)),fe=!oe&&!ee&&!ie&&!re,we=!Tt.isEqual(v.physicalConnectivityMap,V),xe=fe,ve=Q||se||we,Re=()=>{if(Q){const ot={...M};b({requestBody:ot})}S({projectId:t,networkConfiguration:U,ingresses:F,egresses:D,physicalConnectivityMap:V}).unwrap().then(()=>{ln.success(u,{autoClose:3e3}),f(YP(Un.DESIGN))}).catch(()=>ln.error(d,{autoClose:3e3}))},pe=()=>{L(y),$(v.ingresses),k(v.egresses),H(v.networkConfiguration),q(v.physicalConnectivityMap),R(!1)},Be=()=>{N(!1),Re()},ke=[{id:n,label:n,handleClick:()=>R(!0),isEnabled:ve,sx:{backgroundColor:"error.main","&:hover":{backgroundColor:"darkred"}}},{id:r,label:J?r:o,handleClick:()=>ve&&!J?N(!0):Be(),isEnabled:xe,sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:1}}];return C.useEffect(()=>{const Ne=D.map(ce=>({egressId:ce.id,access:Yg.CONNECTED})),ot=F.map(ce=>{const Ae=Tt.find(V,{ingressId:ce.id});if(!Ae)return{ingressId:ce.id,egresses:Ne};const be=Tt.unionBy(Ae.egresses,Ne,"egressId");return{ingressId:Ae.ingressId,egresses:be}});q(ot)},[F.length,D.length]),w?g(tl,{}):K(le,{sx:{width:"100%",height:"100%",backgroundColor:"#fff"},children:[K(Mt,{direction:"column",spacing:0,sx:{alignItems:"center"},children:[g(Bm,{icon:g(s8e,{}),title:g(gr,{children:e})}),g(le,{sx:{alignItems:"left",width:"100%",height:"11vh",border:"1px lightgrey solid"},children:g(Nkt,{currentNcnocSystem:M,currentNetworkConfiguration:U,setCurrentNcnocSystem:L,setCurrentNetworkConfiguration:H})}),K(uFt,{value:A,children:[g(M0e,{activeTab:A,handleActiveTabChange:(Ne,ot)=>{_(ot)},children:Object.values(h).map(Ne=>g(Sa,{label:Ne,value:Ne},Ne))}),K(le,{sx:{alignItems:"left",width:"100%",height:"58vh",overflow:"auto",border:`1px solid ${tt}`},children:[g(ane,{sx:{p:1,display:"flex",alignItems:"center",justifyContent:"center"},value:"Interfaces",children:g(Qkt,{currentNcnocSystem:M,currentIngresses:F,currentEgresses:D,setCurrentIngresses:$,setCurrentEgresses:k})}),g(ane,{value:"Connectivity",children:g(eFt,{currentIngresses:F,currentEgresses:D,currentPhysicalConnectivityMap:V,setCurrentPhysicalConnectivityMap:q})})]})]}),K(Mt,{direction:"row",sx:{mt:1,px:3,justifyContent:"space-between",width:"100%"},children:[g(le,{sx:{display:"flex",alignItems:"center"},children:ve?K(Ke,{sx:{display:"flex",alignItems:"center"},children:[g(NW,{sx:{fontSize:25,color:"warning.main"}}),c]}):null}),g(Mt,{direction:"row",spacing:.5,sx:{justifyContent:"flex-end"},children:ke.map(Ne=>g(PR,{id:Ne.id,label:Ne.label,handleClick:Ne.handleClick,isEnabled:Ne.isEnabled,sx:Ne.sx},Ne.id))})]})]}),P?g(lne,{warningMessage:a,labelReturn:i,labelContinue:s,handleReturn:()=>R(!1),handleContinue:pe,isErrorConfirmButton:!0}):null,O?g(lne,{warningMessage:l,labelReturn:i,labelContinue:J?r:o,handleReturn:()=>N(!1),handleContinue:Be,isErrorConfirmButton:!J}):null]})},CFt=({leftPosition:t,panelWidth:e,panelHeight:n,projectId:r,activeTab:o,fetchedComponents:i,componentReachabilities:s,connections:a,projectRoutes:l,configurableTestSequence:c,ncnocAddresses:u})=>K(le,{display:o!==Un.DESIGN?"block":"none",sx:{position:"absolute",left:t,width:e,height:n},children:[o===Un.OVERVIEW?g(bFt,{projectId:r}):null,o===Un.ACCESS_MAP?g(lwt,{projectId:r,tableType:ps.ACCESS_MAP,fetchedComponents:i,componentReachabilities:s,connections:a,projectRoutes:l,centerPanelHeight:n}):null,o===Un.ADDRESS_MAP?g(gwt,{projectId:r,targetComponents:i.targets,virtualTargetComponents:i.virtualTargets,ncnocAddresses:u}):null,o===Un.CONFIGURABLE_TEST&&c?g(mwt,{configurableTestSequence:c}):null,o===Un.REGISTER_MAP?g(_me,{projectId:r}):null,o===Un.NETWORK?g(Rkt,{projectId:r}):null]}),k8=()=>{const t="Collapse left panel",e="Expand left panel",n=Yn(),r=bt(h0),o=i=>{i.currentTarget.blur(),n(eae(!r))};return g(le,{sx:{top:"50%",position:"absolute",left:r?Rs.leftPanelWidth-5:0,zIndex:3},children:g(rn,{title:r?t:e,placement:"right",children:g(Di,{onClick:i=>o(i),sx:{width:0,borderRadius:"3px",backgroundColor:KI,boxShadow:"4px 0 6px -2px rgba(0,0,0,0.2)","&:hover":{backgroundColor:KI}},size:"small",children:r?g(Ice,{sx:{color:tt,fontSize:15}}):g(PF,{sx:{color:tt,fontSize:15}})})})})},SFt=({components:t,stageCoordinates:e,projectId:n,tree:r,connectionIndexes:o})=>{const i=Nh.getAllByProjectId(n),s=bt(gd),a=bt(Zx),{width:l,height:c}=sc(),{diagramWidth:u,diagramHeight:d}=st.getStageDimensions({width:l,height:c}),{data:h,error:f,isLoading:p}=aw(n),{data:m=Zk,error:y,isLoading:v}=Rm(n,{skip:p||f}),[b,{isLoading:S}]=WW(),[w,{isLoading:A}]=sue(),[_,{isLoading:P}]=aue(),[R,O]=C.useState(0),[N,M]=C.useState(0),[L]=m6(),[F]=nS(),$=Yn(),{themeColors:D}=Lc(),[k,U]=C.useState({[Yt.ROUTER]:!1,[Yt.INITIATOR]:!1,[Yt.TARGET]:!1,[Yt.DEFAULT_TARGET]:!1,[Yt.BRIDGE]:!1}),H="rgb(0,0,0,0.26)";C.useEffect(()=>{O(Ki.getNumberOfDefaultTargetsInProject(t.targets)),M(Ki.getNumberOfNonDefaultTargetsInProject(t))},[t,t.targets,t.virtualTargets]);const V=ee=>{$(d0(ee?.id??"")),ee&&!s&&$(pd(!0))},q=(ee,re)=>{U(fe=>({...fe,[ee]:re}))},J=(ee,re)=>{switch(!0){case ee.type===Fe.BRIDGES:return 0;case!re:return r.find(fe=>fe&&fe.data.type===Fe.TOPOLOGIES)?.id;case!!re:return re.id;default:return 0}},Q=ee=>{if(!(ee.parameters?.bus?.protocol===wt.SEC)&&ee.type===Fe.TARGETS){const fe=xB.getCreatePayload(ee.i
707d,n);L(fe)}},se=(ee,re)=>{const fe=[];ee.type===Fe.TARGETS&&t[Fe.INITIATORS].length&&t[Fe.INITIATORS].forEach(xe=>{fe.push({id:Uo(),initiatorId:xe.id,targetId:ee.id,latency:0,status:"disabled",projectId:n})}),ee.type===Fe.INITIATORS&&t[Fe.TARGETS].length&&t[Fe.TARGETS].forEach(xe=>{fe.push({id:Uo(),initiatorId:ee.id,targetId:xe.id,latency:0,status:"disabled",projectId:n})});const we=a?.type===Fe.TOPOLOGIES?r.find(xe=>xe.relationId===a.id):null;(ee.componentId===void 0||ee.componentId<0)&&(ee.componentId=st.getComponentId({components:t,type:ee.type})),ee.projectId=n,b({projectId:n,component:ee,componentTreeElement:{id:st.getMaxBy(h.data,"id")+1,relationId:ee.id,parent:J(ee,we),droppable:!1,data:{id:ee.id,type:ee.type}},addToMatrix:fe}).then(xe=>{Q(ee),$(Sv({id:ee.id,type:ee.type})),V(ee)}).finally(()=>{q(re,!1)})},oe=({component:ee,connection:re},fe)=>{ee.projectId=n,re&&(re.projectId=n);const we=[];ee.type===Fe.TARGETS&&t[Fe.INITIATORS].length&&t[Fe.INITIATORS].forEach(ve=>{we.push({id:Uo(),initiatorId:ve.id,targetId:ee.id,latency:0,status:"disabled",projectId:n})}),ee.type===Fe.INITIATORS&&t[Fe.TARGETS].length&&t[Fe.TARGETS].forEach(ve=>{we.push({id:Uo(),initiatorId:ee.id,targetId:ve.id,latency:0,status:"disabled",projectId:n})});const xe=r.find(ve=>ve.relationId===a.id);(ee.componentId===void 0||ee.componentId<0)&&(ee.componentId=st.getComponentId({components:t,type:ee.type})),w({projectId:n,component:ee,componentTreeElement:{id:st.getMaxBy(h.data,"id")+1,relationId:ee.id,parent:xe.parent,droppable:!1,data:{id:ee.id,type:ee.type}},addToMatrix:we,connection:re}).then(ve=>{if(re?.type){const Re=st.invalidateConnections({connection:re,connections:m});_({connection:re,invalidatedConnections:Re}).then(()=>{if(ee.type===Fe.TARGETS||ee.type===Fe.INITIATORS){const pe=Pw.getUpdatePayload({component:ee,connection:re,routers:i});F({projectId:n,component:pe})}}),V(ee)}Q(ee),$(eF(!0)),$(Sv({id:ee.id,type:ee.type}))}).finally(()=>{q(fe,!1)})},ie=()=>{const ee=Uo(),re=t[a.type].find(ke=>ke.id===a.id);let fe={x:0,y:0};switch(a.type){case Fe.INITIATORS:fe={x:re.coordinates.x+re.size.nameSize.width+Ve.gridBlockSize+CL,y:re.coordinates.y-Ve.gridBlockSize};break;case Fe.TARGETS:fe={x:re.coordinates.x-CL-Zu[Fe.ROUTERS].size.width,y:re.coordinates.y-Ve.gridBlockSize};break}const we=a.type===Fe.INITIATORS,xe=a.type===Fe.TARGETS,ve=$v.getParameterPipelineStagesCount(re.parameters.bus.protocol),Re=we?{pipelineStagesCountPortI0:ve}:xe?{pipelineStagesCountPortE0:ve}:{},pe=st.getCreatingComponent({type:Fe.ROUTERS,initialCoordinates:fe,id:ee,components:t,parameterOverrides:Re}),Be=st.getCreatingComponentConnection({type:a.type,creatingComponentId:re.id,presetComponentId:ee,presentComponentPort:0});oe({component:pe,connection:{...Be,projectId:n}},Yt.ROUTER)};return g(gr,{children:K(Mt,{direction:"row",spacing:1,sx:{mx:1,mb:1},children:[K(Mt,{direction:"column",spacing:1,children:[g(rn,{title:cT[Yt.ROUTER],placement:"bottom-start",children:g(Sn,{variant:"contained",startIcon:k[Yt.ROUTER]?g(Ni,{size:18}):g(BF,{}),disabled:k[Yt.ROUTER]||S||A||t.routers.length>=ys[Yt.ROUTER],sx:{backgroundColor:D.designBlue[300],"&:hover":{backgroundColor:D.designBlue[100]},fontSize:"0.875rem",width:"100%"},onClick:()=>{if(q(Yt.ROUTER,!0),a.id&&a.type!==Fe.ROUTERS&&a.type!==Fe.TOPOLOGIES&&a.type!==Fe.BRIDGES&&!o[a.type][a.id]){ie();return}se(st.getCreatingComponent({type:Fe.ROUTERS,initialCoordinates:st.getRoundedComponentCoordinates({x:e.pan.x,y:e.pan.y,scale:e.scale,diagramHeight:d,diagramWidth:u,offsetY:-200}),id:Uo(),components:t}),Yt.ROUTER)},children:lT[Yt.ROUTER]})}),g(rn,{title:cT[Yt.INITIATOR],placement:"bottom-start",children:g(Sn,{variant:"contained",startIcon:k[Yt.INITIATOR]?g(Ni,{size:18}):g(lj,{fontSize:"large"}),disabled:k[Yt.INITIATOR]||S||A||t.initiators.length>=ys[Yt.INITIATOR],sx:{backgroundColor:D.designOrange[300],"&:hover":{backgroundColor:D.designOrange[100]},fontSize:"0.875rem",width:"100%"},onClick:()=>{if(q(Yt.INITIATOR,!0),a.id&&a.type===Fe.ROUTERS&&a.type!==Fe.TOPOLOGIES&&(!o.ingressIds[a.id]||o.ingressIds[a.id]&&o.ingressIds[a.id].size<DN.length)){const ee=o.ingressIds[a.id]?DN.find(re=>!o.ingressIds[a.id].has(re)):0;if(ee>=0){const re=Uo(),fe=t[a.type].find(ve=>ve.id===a.id),we=st.getCreatingComponent({type:Fe.INITIATORS,initialCoordinates:{x:fe.coordinates.x-Zu[Fe.INITIATORS].size.nameSize.width-Ve.gridBlockSize-Cv,y:fe.coordinates.y+fe.size.nameSize.height+ee*Ve.gridBlockSize},id:re,components:t}),xe=st.getCreatingComponentConnection({type:pi.INITIATORS,creatingComponentId:re,presetComponentId:fe.id,presentComponentPort:ee});oe({component:we,connection:xe},Yt.INITIATOR);return}}se(st.getCreatingComponent({type:Fe.INITIATORS,initialCoordinates:st.getRoundedComponentCoordinates({x:e.pan.x,y:e.pan.y,scale:e.scale,diagramHeight:d,diagramWidth:u}),id:Uo(),components:t}),Yt.INITIATOR)},children:lT[Yt.INITIATOR]})}),g(rn,{title:cT[Yt.BRIDGE],placement:"bottom-start",children:g(Sn,{variant:"contained",startIcon:k[Yt.BRIDGE]?g(Ni,{size:18}):g($F,{invert:!0,fill:t.bridges.length>=ys[Yt.BRIDGE]?H:D.grey[300]}),disabled:k[Yt.BRIDGE]||S||A||t.bridges.length>=ys[Yt.BRIDGE],sx:{backgroundColor:D.grey[300],"&:hover":{backgroundColor:D.grey[100]},fontSize:"0.875rem",width:"100%"},onClick:()=>{q(Yt.BRIDGE,!0),se(st.getCreatingComponent({type:Fe.BRIDGES,initialCoordinates:st.getRoundedComponentCoordinates({x:e.pan.x,y:e.pan.y,scale:e.scale,diagramHeight:d,diagramWidth:u}),id:Uo(),components:t}),Yt.BRIDGE)},children:lT[Yt.BRIDGE]})})]}),K(Mt,{direction:"column",spacing:1,children:[g(rn,{title:cT[Yt.TARGET],placement:"bottom-start",children:g(Sn,{variant:"contained",startIcon:k[Yt.TARGET]?g(Ni,{size:18}):g(Tj,{invert:!0,fill:N>=ys[Yt.TARGET]?H:void 0}),disabled:k[Yt.TARGET]||S||A||N>=ys[Yt.TARGET],sx:{backgroundColor:D.designCyan[300],"&:hover":{backgroundColor:D.designCyan[100],"& .MuiSvgIcon-root circle":{transition:"all 300ms ease-in-out",fill:D.designCyan[100]}},fontSize:"0.875rem",width:"100%"},onClick:()=>
707{if(q(Yt.TARGET,!0),a.id&&a.type===Fe.ROUTERS&&a.type!==Fe.TOPOLOGIES&&(!o.egressIds[a.id]||o.egressIds[a.id]&&o.egressIds[a.id].size<DN.length)){const ee=o.egressIds[a.id]?DN.find(re=>!o.egressIds[a.id].has(re)):0;if(ee>=0){const re=Uo(),fe=t[a.type].find(ve=>ve.id===a.id),we=st.getCreatingComponent({type:Fe.TARGETS,initialCoordinates:{x:fe.coordinates.x+fe.size.width+Cv,y:fe.coordinates.y+fe.size.nameSize.height+ee*Ve.gridBlockSize},id:re,components:t}),xe=st.getCreatingComponentConnection({type:pi.TARGETS,creatingComponentId:re,presetComponentId:fe.id,presentComponentPort:ee});oe({component:we,connection:xe},Yt.TARGET);return}}se(st.getCreatingComponent({type:Fe.TARGETS,initialCoordinates:st.getRoundedComponentCoordinates({x:e.pan.x,y:e.pan.y,scale:e.scale,diagramHeight:d,diagramWidth:u}),id:Uo(),components:t}),Yt.TARGET)},children:lT[Yt.TARGET]})}),g(rn,{title:cT[Yt.DEFAULT_TARGET],placement:"bottom-start",children:g(Sn,{variant:"contained",startIcon:k[Yt.DEFAULT_TARGET]?g(Ni,{size:18}):g(_j,{invert:!0,fill:R>=ys[Yt.DEFAULT_TARGET]?H:D.designCyan[400]}),disabled:k[Yt.DEFAULT_TARGET]||S||A||R>=ys[Yt.DEFAULT_TARGET],sx:{backgroundColor:D.designCyan[400],"&:hover":{backgroundColor:D.designCyan[200],"& .MuiSvgIcon-root circle":{transition:"all 300ms ease-in-out",fill:D.designCyan[200]}},fontSize:"0.875rem",width:"100%"},onClick:()=>{q(Yt.DEFAULT_TARGET,!0);const ee=Uo(),re=0;if(a.id&&a.type===Fe.ROUTERS&&a.type!==Fe.TOPOLOGIES&&(!o.egressIds[a.id]||o.egressIds[a.id]&&!o.egressIds[a.id].has(re))){const fe=t[a.type].find(ve=>ve.id===a.id),we=st.getCreatingComponent({type:Yt.DEFAULT_TARGET,initialCoordinates:{x:fe.coordinates.x+fe.size.width+Cv,y:fe.coordinates.y+fe.size.nameSize.height+re*Ve.gridBlockSize},id:ee,components:t}),xe=st.getCreatingComponentConnection({type:pi.TARGETS,creatingComponentId:ee,presetComponentId:fe.id,presentComponentPort:re});oe({component:we,connection:xe},Yt.DEFAULT_TARGET);return}se(st.getCreatingComponent({type:Yt.DEFAULT_TARGET,initialCoordinates:st.getRoundedComponentCoordinates({x:e.pan.x,y:e.pan.y,scale:e.scale,diagramHeight:d,diagramWidth:u}),id:ee,components:t}),Yt.DEFAULT_TARGET)},children:lT[Yt.DEFAULT_TARGET]})})]})]})})},EFt=({subtopologies:t,selectedComponentSubtopologyId:e,handleMove:n,handleCloseMenu:r,subtopologyColorById:o})=>g(le,{children:t.map(i=>K(mr,{selected:i.id===e,onClick:()=>{i.id!==e&&n(i.id),r()},sx:{pl:4,pr:"8px"},children:[g(_W,{sx:{fontSize:"small",mr:"10px",color:o[i.id]}}),g(rn,{title:i.id===e?"Already in this Subtopology":null,children:g(Ke,{sx:{fontSize:"12px",maxWidth:"120px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:i.name})})]},`move-to-${i.id}`))}),xFt=({anchorEl:t,subtopologies:e,subtopologyColorById:n,selectedComponentSubtopologyId:r,isOnlySubtopology:o,handleMove:i,handleDelete:s,handleZoom:a,handleCloseMenu:l})=>g(Es,{anchorEl:t,open:!!t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:4},"aria-hidden":!1,onClose:()=>l(),children:K(aR,{dense:!0,disablePadding:!0,children:[g(rn,{title:o?"Unable to Delete Last Subtopology":null,children:K(mr,{sx:{pl:2,display:"flex",alignItems:"center"},id:"delete-menu-id",onClick:c=>{s("delete-menu-id",c.currentTarget)},disabled:o,children:[g(RF,{sx:{fontSize:"medium",mr:"10px",color:"red"}})," ","Delete"]},"delete")}),r&&K(le,{children:[g(yi,{}),K(mr,{sx:{pl:2,pointerEvents:"none"},children:[g(N6e,{sx:{fontSize:"medium",mr:"10px"}}),"Move to:"]},"move"),g(EFt,{subtopologies:e,selectedComponentSubtopologyId:r,handleMove:i,handleCloseMenu:l,subtopologyColorById:n}),g(yi,{}),K(mr,{sx:{pl:2},onClick:()=>{a(),l()},children:[g(D6e,{sx:{fontSize:"medium",mr:"10px"}}),"Focus Component"]},"focus")]})]})});function L0e(t){return t&&t.ownerDocument||document}function wFt(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function k0e(...t){return C.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{wFt(n,e)})},t)}function AFt(t){return typeof t=="string"}function TFt(t,e,n){return t===void 0||AFt(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function _Ft(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEac
707h(r=>{n[r]=t[r]}),n}function IFt(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function PFt(...t){return C.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{IFt(n,e)})},t)}function cne(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function RFt(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const f=Ye(n?.className,i,o?.className,r?.className),p={...n?.style,...o?.style,...r?.style},m={...n,...o,...r};return f.length>0&&(m.className=f),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:void 0}}const s=_Ft({...o,...r}),a=cne(r),l=cne(o),c=e(s),u=Ye(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},h={...c,...n,...l,...a};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function OFt(t,e,n){return typeof t=="function"?t(e,n):t}function NFt(t){const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=t,s=o?{}:OFt(n,r),{props:a,internalRef:l}=RFt({...i,externalSlotProps:s}),c=PFt(l,s?.ref,t.additionalProps?.ref);return TFt(e,{...a,ref:c},r)}function MFt(t,e,n=void 0){const r={};for(const o in t){const i=t[o];let s="",a=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(s+=(a===!0?"":" ")+e(c),a=!1,n&&n[c]&&(s+=" "+n[c]))}r[o]=s}return r}const DFt=typeof window<"u"?C.useLayoutEffect:C.useEffect,F0e=DFt,LFt=["element"];function kFt(t,e){for(let n=0;n<t.length;n+=1)if(e(t[n]))return n;return-1}function FFt(t,e){let n=0,r=t.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(t[o].element===e)return o;t[o].element.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING?r=o-1:n=o+1}return n}const B0e=C.createContext({});function BFt(t){const e=C.useRef(null);return C.useEffect(()=>{e.current=t},[t]),e.current}const une=()=>{};function $Ft(t){const[,e]=C.useState(),{registerDescendant:n=une,unregisterDescendant:r=une,descendants:o=[],parentId:i=null}=C.useContext(B0e),s=kFt(o,c=>c.element===t.element),a=BFt(o),l=o.some((c,u)=>a&&a[u]&&a[u].element!==c.element);return F0e(()=>{if(t.element)return n(X({},t,{index:s})),()=>{r(t.element)};e({})},[n,r,s,l,t]),{parentId:i,index:s}}function $0e(t){const{children:e,id:n}=t,[r,o]=C.useState([]),i=C.useCallback(l=>{let{element:c}=l,u=at(l,LFt);o(d=>{if(d.length===0)return[X({},u,{element:c,index:0})];const h=FFt(d,c);let f;if(d[h]&&d[h].element===c)f=d;else{const p=X({},u,{element:c,index:h});f=d.slice(),f.splice(h,0,p)}return f.forEach((p,m)=>{p.index=m}),f})},[]),s=C.useCallback(l=>{o(c=>c.filter(u=>l!==u.element))},[]),a=C.useMemo(()=>({descendants:r,registerDescendant:i,unregisterDescendant:s,parentId:n}),[r,i,s,n]);return g(B0e.Provider,{value:a,children:e})}const H0e={instance:null,multiSelect:!1,disabledItemsFocusable:!1,treeId:void 0,icons:{defaultCollapseIcon:null,defaultExpandIcon:null,defaultParentIcon:null,defaultEndIcon:null}},U0e=C.createContext(H0e),z0e=()=>C.useContext(U0e);function HFt(t){const{instance:e,multiSelect:n}=z0e(),r=e?e.isNodeExpandable(t):!1,o=e?e.isNodeExpanded(t):!1,i=e?e.isNodeFocused(t):!1,s=e?e.isNodeSelected(t):!1,a=e?e.isNodeDisabled(t):!1;return{disabled:a,expanded:o,selected:s,focused:i,handleExpansion:d=>{if(e&&!a){i||e.focusNode(d,t);const h=n&&(d.shiftKey||d.ctrlKey||d.metaKey);r&&!(h&&e.isNodeExpanded(t))&&e.toggleNodeExpansion(d,t)}},handleSelection:d=>{e&&!a&&(i||e.focusNode(d,t),n&&(d.shiftKey||d.ctrlKey||d.metaKey)?d.shiftKey?e.selectRange(d,{end:t}):e.selectNode(d,t,!0):e.selectNode(d,t))},preventSelection:d=>{(d.shiftKey||d.ctrlKey||d.metaKey||a)&&d.preventDefault()}}}const UFt=["classes","className","displayIcon","expansionIcon","icon","label","nodeId","onClick","onMouseDown"],V0e=C.forwardRef(function(e,n){const{classes:r,className:o,displayIcon:i,expansionIcon:s,icon:a,label:l,nodeId:c,onClick:u,onMouseDown:d}=e,h=at(e,UFt),{disabled:f,expanded:p,selected:m,focused:y,handleExpansion:v,handleSelection:b,preventSelection:S}=HFt(c),w=a||s||i,A=P=>{S(P),d&&d(P)},_=P=>{v(P),b(P),u&&u(P)};return K("div",X({},h,{className:Ye(o,r.root,p&&r.expanded,m&&r.selected,y&&r.focused,f&&r.disabled),onClick:_,onMouseDown:A,ref:n,children:[g("div",{className:r.iconContainer,children:w}),g("div",{className:r.label,children:l})]}))}),dne=t=>t,zFt=()=>{let t=dne;return{configure(e){t=e},generate(e){return t(e)}
707,reset(){t=dne}}},VFt=zFt(),GFt=VFt,WFt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function F8(t,e,n="Mui"){const r=WFt[e];return r?`${n}-${r}`:`${GFt.generate(t)}-${e}`}function G0e(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=F8(t,o,n)}),r}function jFt(t){return F8("MuiTreeItem",t)}const Py=G0e("MuiTreeItem",["root","group","content","expanded","selected","focused","disabled","iconContainer","label"]),qFt=["children","className","collapseIcon","ContentComponent","ContentProps","endIcon","expandIcon","disabled","icon","id","label","nodeId","onClick","onMouseDown","TransitionComponent","TransitionProps"],YFt=t=>{const{classes:e}=t;return MFt({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],label:["label"],group:["group"]},jFt,e)},XFt=$e("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(t,e)=>e.root})({listStyle:"none",margin:0,padding:0,outline:0}),KFt=$e(V0e,{name:"MuiTreeItem",slot:"Content",overridesResolver:(t,e)=>[e.content,e.iconContainer&&{[`& .${Py.iconContainer}`]:e.iconContainer},e.label&&{[`& .${Py.label}`]:e.label}]})(({theme:t})=>({padding:"0 8px",width:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Py.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${Py.focused}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Py.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Tl(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Tl(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Tl(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Py.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Tl(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`& .${Py.iconContainer}`]:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${Py.label}`]:X({paddingLeft:4,width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},t.typography.body1)})),QFt=$e(ZG,{name:"MuiTreeItem",slot:"Group",overridesResolver:(t,e)=>e.group})({margin:0,padding:0,marginLeft:17}),W0e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTreeItem"}),{children:o,className:i,collapseIcon:s,ContentComponent:a=V0e,ContentProps:l,endIcon:c,expandIcon:u,disabled:d,icon:h,id:f,label:p,nodeId:m,onClick:y,onMouseDown:v,TransitionComponent:b=ZG,TransitionProps:S}=r,w=at(r,qFt),{icons:A,multiSelect:_,disabledItemsFocusable:P,treeId:R,instance:O}=z0e();let N;f!=null?N=f:R&&m&&(N=`${R}-${m}`);const[M,L]=C.useState(null),F=C.useRef(null),$=k0e(L,n),D=C.useMemo(()=>({element:M,id:m}),[m,M]),{index:k,parentId:U}=$Ft(D),H=!!(Array.isArray(o)?o.length:o),V=O?O.isNodeExpanded(m):!1,q=O?O.isNodeFocused(m):!1,J=O?O.isNodeSelected(m):!1,Q=O?O.isNodeDisabled(m):!1,se=X({},r,{expanded:V,focused:q,selected:J,disabled:Q}),oe=YFt(se);let ie,ee;H&&(V?ee=s||A.defaultCollapseIcon:ee=u||A.defaultExpandIcon),H?ie=A.defaultParentIcon:ie=c||A.defaultEndIcon,C.useEffect(()=>{if(O&&k!==-1)return O.updateNode({id:m,idAttribute:N,index:k,parentId:U,expandable:H,disabled:d}),()=>O.removeNode(m)},[O,U,k,m,H,d,N]),C.useEffect(()=>{if(O&&p){var we,xe;return O.mapFirstChar(m,((we=(xe=F.current)==null?void 0:xe.textContent)!=null?we:"").substring(0,1).toLowerCase())}},[O,m,p]);let re;_?re=J:J&&(re=!0);function fe(we){if(we.target===we.currentTarget){let ve;typeof we.target.getRootNode=="function"?ve=we.target.getRootNode():ve=L0e(we.target),ve.getElementById(R).focus({preventScroll:!0})}const xe=!P&&Q;O&&!q&&we.currentTarget===we.target&&!xe&&O.focusNode(we,m)}return K(XFt,X({className:Ye(oe.root,i),role:"treeitem","aria-expanded":H?V:void 0,"aria-selected":re,"aria-disabled":Q||void 0,id:N,tabIndex:-1},w,{ownerState:se,onFocus:fe,ref:$,children:[g(KFt,X({as:a,ref:F,classes:{root:oe.content,expanded:oe.expanded,selected:oe.selected,focused:oe.focu
707sed,disabled:oe.disabled,iconContainer:oe.iconContainer,label:oe.label},label:p,nodeId:m,onClick:y,onMouseDown:v,icon:h,expansionIcon:ee,displayIcon:ie,ownerState:se},l)),o&&g($0e,{id:m,children:g(QFt,X({as:b,unmountOnExit:!0,className:oe.group,in:V,component:"ul",role:"group"},S,{children:o}))})]}))});function ZFt(t,e,n=void 0){const r={};return Object.keys(t).forEach(o=>{r[o]=t[o].reduce((i,s)=>{if(s){const a=e(s);a!==""&&i.push(a),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}function JFt(t){return F8("MuiTreeView",t)}G0e("MuiTreeView",["root"]);const eBt=(t,e)=>{const n=C.useRef({}),[r,o]=C.useState(()=>{const s={};return t.forEach(a=>{a.models&&Object.entries(a.models).forEach(([l,c])=>{n.current[l]={controlledProp:c.controlledProp,defaultProp:c.defaultProp,isControlled:e[c.controlledProp]!==void 0},s[l]=e[c.defaultProp]})}),s});return Object.fromEntries(Object.entries(n.current).map(([s,a])=>{const l=a.isControlled?e[a.controlledProp]:r[s];return[s,{value:l,setValue:c=>{a.isControlled||o(u=>X({},u,{[s]:c}))}}]}))};class tBt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,n,r={}){let o=this.events[e];o||(o={highPriority:new Map,regular:new Map},this.events[e]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(e,n){this.events[e]&&(this.events[e].regular.delete(n),this.events[e].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(e,...n){const r=this.events[e];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let s=o.length-1;s>=0;s-=1){const a=o[s];r.highPriority.has(a)&&a.apply(this,n)}for(let s=0;s<i.length;s+=1){const a=i[s];r.regular.has(a)&&a.apply(this,n)}}once(e,n){const r=this;this.on(e,function o(...i){r.removeListener(e,o),n.apply(r,i)})}}const dU=(t,e)=>{const n=t.getNode(e),r=t.getNavigableChildrenIds(n.parentId),o=r.indexOf(e);if(o===0)return n.parentId;let i=r[o-1];for(;t.isNodeExpanded(i)&&t.getNavigableChildrenIds(i).length>0;)i=t.getNavigableChildrenIds(i).pop();return i},l_=(t,e)=>{if(t.isNodeExpanded(e)&&t.getNavigableChildrenIds(e).length>0)return t.getNavigableChildrenIds(e)[0];let n=t.getNode(e);for(;n!=null;){const r=t.getNavigableChildrenIds(n.parentId),o=r[r.indexOf(n.id)+1];if(o)return o;n=t.getNode(n.parentId)}return null},Az=t=>{let e=t.getNavigableChildrenIds(null).pop();for(;t.isNodeExpanded(e);)e=t.getNavigableChildrenIds(e).pop();return e},Tz=t=>t.getNavigableChildrenIds(null)[0],$w=(t,e)=>{Object.assign(t,e)},nBt=t=>t.isPropagationStopped!==void 0,rBt=({instance:t})=>{const[e]=C.useState(()=>new tBt),n=C.useCallback((...o)=>{const[i,s,a={}]=o;a.defaultMuiPrevented=!1,!(nBt(a)&&a.isPropagationStopped())&&e.emit(i,s,a)},[e]),r=C.useCallback((o,i)=>(e.on(o,i),()=>{e.removeListener(o,i)}),[e]);$w(t,{$$publishEvent:n,$$subscribeEvent:r})},oBt=[rBt],iBt=t=>{const e=[...oBt,...t.plugins],n=e.reduce((p,m)=>m.getDefaultizedParams?m.getDefaultizedParams(p):p,t),r=eBt(e,n),i=C.useRef({}).current,s=C.useRef(null),a=k0e(s,t.rootRef),[l,c]=C.useState(()=>{const p={};return e.forEach(m=>{m.getInitialState&&Object.assign(p,m.getInitialState(n))}),p}),u=[];let d=H0e;const h=p=>{const m=p({instance:i,params:n,state:l,setState:c,rootRef:s,models:r})||{};m.getRootProps&&u.push(m.getRootProps),m.contextValue&&(d=m.contextValue)};return e.forEach(h),{getRootProps:(p={})=>{const m=X({role:"tree",tabIndex:0},p,{ref:a});return u.forEach(y=>{Object.assign(m,y(p))}),m},rootRef:a,contextValue:d}};function sBt(t){const{value:e,children:n}=t;return g(U0e.Provider,{value:e,children:g($0e,{children:n})})}function OP(t){const e=C.useRef(t);return F0e(()=>{e.current=t}),C.useRef((...n)=>(0,e.current)(...n)).current}const aBt=(t,e,n)=>{t.$$publishEvent(e,n)},lBt=({instance:t,params:e})=>{const n=C.useRef({}),r=C.useCallback(c=>n.current[c],[]),o=C.useCallback(c=>{n.current[c.id]=c},[]),i=C.useCallback(c=>{const u=X({},n.current);delete u[c],n.current=u,aBt(t,"removeNode",{id:c})},[t]),s=C.useCallback(c=>{if(c==null)return!1;let u=t.getNode(c);if(!u)return!1;if(u.disabled)return!0;for(;u.parentId!=null;)if(u=t.getNode(u.parentId),u.disabled)return!0;return!1},[t]),a=OP(c=>Object.values(n.current).filter(u=>u.parentId===c).sort((u,d)=>u.index-d.index).map(u=>u.id));$w(t,{getNode:r,updateNode:o,removeNode:i,getChildrenIds:a,getNavigableChildrenIds:c=>{let u=t.getChildrenIds(c);return e.disabledItemsFocusable||(u=u.filter(d=>!t.isNodeDisabled(d))),u},isNodeDisabled:s})}
707,B8=({instance:t,params:e,models:n})=>{const r=C.useCallback(a=>Array.isArray(n.expanded.value)?n.expanded.value.indexOf(a)!==-1:!1,[n.expanded.value]),o=C.useCallback(a=>{var l;return!!((l=t.getNode(a))!=null&&l.expandable)},[t]),i=OP((a,l)=>{if(l==null)return;let c;n.expanded.value.indexOf(l)!==-1?c=n.expanded.value.filter(u=>u!==l):c=[l].concat(n.expanded.value),e.onNodeToggle&&e.onNodeToggle(a,c),n.expanded.setValue(c)});$w(t,{isNodeExpanded:r,isNodeExpandable:o,toggleNodeExpansion:i,expandAllSiblings:(a,l)=>{const c=t.getNode(l),d=t.getChildrenIds(c.parentId).filter(f=>t.isNodeExpandable(f)&&!t.isNodeExpanded(f)),h=n.expanded.value.concat(d);d.length>0&&(n.expanded.setValue(h),e.onNodeToggle&&e.onNodeToggle(a,h))}})};B8.models={expanded:{controlledProp:"expanded",defaultProp:"defaultExpanded"}};const cBt=[];B8.getDefaultizedParams=t=>{var e;return X({},t,{defaultExpanded:(e=t.defaultExpanded)!=null?e:cBt})};const uBt=(t,e,n)=>{if(e===n)return[e,n];const r=t.getNode(e),o=t.getNode(n);if(r.parentId===o.id||o.parentId===r.id)return o.parentId===r.id?[r.id,o.id]:[o.id,r.id];const i=[r.id],s=[o.id];let a=r.parentId,l=o.parentId,c=s.indexOf(a)!==-1,u=i.indexOf(l)!==-1,d=!0,h=!0;for(;!u&&!c;)d&&(i.push(a),c=s.indexOf(a)!==-1,d=a!==null,!c&&d&&(a=t.getNode(a).parentId)),h&&!c&&(s.push(l),u=i.indexOf(l)!==-1,h=l!==null,!u&&h&&(l=t.getNode(l).parentId));const f=c?a:l,p=t.getChildrenIds(f),m=i[i.indexOf(f)-1],y=s[s.indexOf(f)-1];return p.indexOf(m)<p.indexOf(y)?[e,n]:[n,e]},$8=({instance:t,params:e,models:n})=>{const r=C.useRef(null),o=C.useRef(!1),i=C.useRef([]),s=p=>Array.isArray(n.selected.value)?n.selected.value.indexOf(p)!==-1:n.selected.value===p,a=(p,m,y=!1)=>
707{if(!e.disableSelection){if(y){if(Array.isArray(n.selected.value)){let v;n.selected.value.indexOf(m)!==-1?v=n.selected.value.filter(b=>b!==m):v=[m].concat(n.selected.value),e.onNodeSelect&&e.onNodeSelect(p,v),n.selected.setValue(v)}}else{const v=e.multiSelect?[m]:m;e.onNodeSelect&&e.onNodeSelect(p,v),n.selected.setValue(v)}r.current=m,o.current=!1,i.current=[]}},l=(p,m)=>{const[y,v]=uBt(t,p,m),b=[y];let S=y;for(;S!==v;)S=l_(t,S),b.push(S);return b},c=(p,m)=>{let y=n.selected.value.slice();const{start:v,next:b,current:S}=m;!b||!S||(i.current.indexOf(S)===-1&&(i.current=[]),o.current?i.current.indexOf(b)!==-1?(y=y.filter(w=>w===v||w!==S),i.current=i.current.filter(w=>w===v||w!==S)):(y.push(b),i.current.push(b)):(y.push(b),i.current.push(S,b)),e.onNodeSelect&&e.onNodeSelect(p,y),n.selected.setValue(y))},u=(p,m)=>{let y=n.selected.value.slice();const{start:v,end:b}=m;o.current&&(y=y.filter(A=>i.current.indexOf(A)===-1));let S=l(v,b);S=S.filter(A=>!t.isNodeDisabled(A)),i.current=S;let w=y.concat(S);w=w.filter((A,_)=>w.indexOf(A)===_),e.onNodeSelect&&e.onNodeSelect(p,w),n.selected.setValue(w)};return $w(t,{isNodeSelected:s,selectNode:a,selectRange:(p,m,y=!1)=>
707{if(e.disableSelection)return;const{start:v=r.current,end:b,current:S}=m;y?c(p,{start:v,next:b,current:S}):v!=null&&b!=null&&u(p,{start:v,end:b}),o.current=!0},rangeSelectToLast:(p,m)=>{r.current||(r.current=m);const y=o.current?r.current:m;t.selectRange(p,{start:y,end:Az(t)})},rangeSelectToFirst:(p,m)=>{r.current||(r.current=m);const y=o.current?r.current:m;t.selectRange(p,{start:y,end:Tz(t)})}}),{getRootProps:()=>({"aria-multiselectable":e.multiSelect})}};$8.models={selected:{controlledProp:"selected",defaultProp:"defaultSelected"}};const dBt=[];$8.getDefaultizedParams=t=>{var e,n,r;return X({},t,{disableSelection:(e=t.disableSelection)!=null?e:!1,multiSelect:(n=t.multiSelect)!=null?n:!1,defaultSelected:(r=t.defaultSelected)!=null?r:t.multiSelect?dBt:null})};const hne=1e3;class hBt{constructor(e=hne){this.timeouts=new Map,this.cleanupTimeout=hne,this.cleanupTimeout=e}register(e,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(e){const n=this.timeouts.get(e.cleanupToken);n&&(this.timeouts.delete(e.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((e,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class fBt{constructor(){this.registry=new FinalizationRegistry(e=>{typeof e=="function"&&e()})}register(e,n,r){this.registry.register(e,n,r)}unregister(e){this.registry.unregister(e)}reset(){}}class pBt{}function gBt(t){let e=0;return function(r,o,i){t.registry===null&&(t.registry=typeof FinalizationRegistry<"u"?new fBt:new hBt);const[s]=C.useState(new pBt),a=C.useRef(null),l=C.useRef();l.current=i;const c=C.useRef(null);if(!a.current&&l.current){const u=(d,h)=>{if(!h.defaultMuiPrevented){var f;(f=l.current)==null||f.call(l,d,h)}};a.current=r.$$subscribeEvent(o,u),e+=1,c.current={cleanupToken:e},t.registry.register(s,()=>{var d;(d=a.current)==null||d.call(a),a.current=null,c.current=null},c.current)}else!l.current&&a.current&&(a.current(),a.current=null,c.current&&(t.registry.unregister(c.current),c.current=null));C.useEffect(()=>{if(!a.current&&l.current){const u=(d,h)=>{if(!h.defaultMuiPrevented){var f;(f=l.current)==null||f.call(l,d,h)}};a.current=r.$$subscribeEvent(o,u)}return c.current&&t.registry&&(t.registry.unregister(c.current),c.current=null),()=>{var u;(u=a.current)==null||u.call(a),a.current=null}},[r,o])}}const mBt={registry:null},yBt=gBt(mBt),H8=({instance:t,params:e,state:n,setState:r,models:o,rootRef:i})=>{const s=OP(f=>{const p=typeof f=="function"?f(n.focusedNodeId):f;r(m=>X({},m,{focusedNodeId:p}))}),a=C.useCallback(f=>n.focusedNodeId===f,[n.focusedNodeId]),l=OP((f,p)=>{p&&(s(p),e.onNodeFocus&&e.onNodeFocus(f,p))});$w(t,{isNodeFocused:a,focusNode:l}),yBt(t,"removeNode",({id:f})=>{s(p=>p===f&&i.current===L0e(i.current).activeElement?t.getChildrenIds(null)[0]:p)});const c=f=>p=>{var m;if((m=f.onFocus)==null||m.call(f,p),p.target===p.currentTarget){const y=b=>{const S=t.getNode(b);return S&&(S.parentId==null||t.isNodeExpanded(S.parentId))};let v;Array.isArray(o.selected.value)?v=o.selected.value.find(y):o.selected.value!=null&&y(o.selected.value)&&(v=o.selected.value),v==null&&(v=t.getNavigableChildrenIds(null)[0]),t.focusNode(p,v)}},u=f=>p=>{var m;(m=f.onBlur)==null||m.call(f,p),s(null)},d=t.getNode(n.focusedNodeId),h=d?d.idAttribute:null;return{getRootProps:f=>({onFocus:c(f),onBlur:u(f),"aria-activedescendant":h??void 0})}};H8.getInitialState=()=>({focusedNodeId:null});H8.getDefaultizedParams=t=>{var e;return X({},t,{disabledItemsFocusable:(e=t.disabledItemsFocusable)!=null?e:!1})};function vBt(t){return t&&t.length===1&&t.match(/\S/)}function fne(t,e,n){for(let r=e;r<t.length;r+=1)if(n===t[r])return r;return-1}const bBt=({instance:t,params:e,state:n})=>{const o=Tu().direction==="rtl",i=C.useRef({}),s=OP((f,p)=>(i.current[f]=p,()=>{const m=X({},i.current);delete m[f],i.current=m}));$w(t,{mapFirstChar:s});const a=f=>(n.focusedNodeId!=null&&t.isNodeExpandable(n.focusedNodeId)&&(t.isNodeExpanded(n.focusedNodeId)?t.focusNode(f,l_(t,n.focusedNodeId)):t.isNodeDisabled(n.focusedNodeId)||t.toggleNodeExpansion(f,n.focusedNodeId)),!0),l=f=>
707{if(n.focusedNodeId==null)return!1;if(t.isNodeExpanded(n.focusedNodeId)&&!t.isNodeDisabled(n.focusedNodeId))return t.toggleNodeExpansion(f,n.focusedNodeId),!0;const p=t.getNode(n.focusedNodeId).parentId;return p?(t.focusNode(f,p),!0):!1},c=(f,p,m)=>{let y,v;const b=m.toLowerCase(),S=[],w=[];Object.keys(i.current).forEach(A=>{const _=t.getNode(A),P=_.parentId?t.isNodeExpanded(_.parentId):!0,R=e.disabledItemsFocusable?!1:t.isNodeDisabled(A);P&&!R&&(S.push(A),w.push(i.current[A]))}),y=S.indexOf(p)+1,y>=S.length&&(y=0),v=fne(w,y,b),v===-1&&(v=fne(w,0,b)),v>-1&&t.focusNode(f,S[v])},u=(f,p)=>{t.isNodeDisabled(l_(t,p))||t.selectRange(f,{end:l_(t,p),current:p},!0)},d=(f,p)=>{t.isNodeDisabled(dU(t,p))||t.selectRange(f,{end:dU(t,p),current:p},!0)},h=f=>p=>{var m;(m=f.onKeyDown)==null||m.call(f,p);let y=!1;const v=p.key;if(p.altKey||p.currentTarget!==p.target||n.focusedNodeId==null)return;const b=p.ctrlKey||p.metaKey;switch(v){case" ":!e.disableSelection&&!t.isNodeDisabled(n.focusedNodeId)&&(y=!0,e.multiSelect&&p.shiftKey?t.selectRange(p,{end:n.focusedNodeId}):e.multiSelect?t.selectNode(p,n.focusedNodeId,!0):t.selectNode(p,n.focusedNodeId)),p.stopPropagation();break;case"Enter":t.isNodeDisabled(n.focusedNodeId)||(t.isNodeExpandable(n.focusedNodeId)?(t.toggleNodeExpansion(p,n.focusedNodeId),y=!0):e.disableSelection||(y=!0,e.multiSelect?t.selectNode(p,n.focusedNodeId,!0):t.selectNode(p,n.focusedNodeId))),p.stopPropagation();break;case"ArrowDown":e.multiSelect&&p.shiftKey&&!e.disableSelection&&u(p,n.focusedNodeId),t.focusNode(p,l_(t,n.focusedNodeId)),y=!0;break;case"ArrowUp":e.multiSelect&&p.shiftKey&&!e.disableSelection&&d(p,n.focusedNodeId),t.focusNode(p,dU(t,n.focusedNodeId)),y=!0;break;case"ArrowRight":o?y=l(p):y=a(p);break;case"ArrowLeft":o?y=a(p):y=l(p);break;case"Home":e.multiSelect&&b&&p.shiftKey&&!e.disableSelection&&!t.isNodeDisabled(n.focusedNodeId)&&t.rangeSelectToFirst(p,n.focusedNodeId),t.focusNode(p,Tz(t)),y=!0;break;case"End":e.multiSelect&&b&&p.shiftKey&&!e.disableSelection&&!t.isNodeDisabled(n.focusedNodeId)&&t.rangeSelectToLast(p,n.focusedNodeId),t.focusNode(p,Az(t)),y=!0;break;default:v==="*"?(t.expandAllSiblings(p,n.focusedNodeId),y=!0):e.multiSelect&&b&&v.toLowerCase()==="a"&&!e.disableSelection?(t.selectRange(p,{start:Tz(t),end:Az(t)}),y=!0):!b&&!p.shiftKey&&vBt(v)&&(c(p,n.focusedNodeId,v),y=!0)}y&&(p.preventDefault(),p.stopPropagation())};return{getRootProps:f=>({onKeyDown:h(f)})}};let pne=0;function CBt(t){const[e,n]=C.useState(t),r=t||e;return C.useEffect(()=>{e==null&&(pne+=1,n(`mui-${pne}`))},[e]),r}const gne=fC["useId".toString()];function SBt(t){if(gne!==void 0){const e=gne();return t??e}return CBt(t)}const EBt=({instance:t,params:e})=>{const n=SBt(e.id);return{getRootProps:()=>({id:n}),contextValue:{treeId:n,instance:t,multiSelect:e.multiSelect,disabledItemsFocusable:e.disabledItemsFocusable,icons:{defaultCollapseIcon:e.defaultCollapseIcon,defaultEndIcon:e.defaultEndIcon,defaultExpandIcon:e.defaultExpandIcon,defaultParentIcon:e.defaultParentIcon}}}},xBt=[lBt,B8,$8,H8,bBt,EBt],wBt=["disabledItemsFocusable","expanded","defaultExpanded","onNodeToggle","onNodeFocus","disableSelection","defaultSelected","selected","multiSelect","onNodeSelect","id","defaultCollapseIcon","defaultEndIcon","defaultExpandIcon","defaultParentIcon","children"],ABt=t=>{const{classes:e}=t;return ZFt({root:["root"]},JFt,e)},mne=$e("ul",{name:"MuiTreeView",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:0,margin:0,listStyle:"none",outline:0}),j0e=C.forwardRef(function(e,n){const r=Ht({props:e,name:"MuiTreeView"}),o=r,i=r,{disabledItemsFocusable:s,expanded:a,defaultExpanded:l,onNodeToggle:c,onNodeFocus:u,disableSelection:d,defaultSelected:h,selected:f,multiSelect:p,onNodeSelect:m,id:y,defaultCollapseIcon:v,defaultEndIcon:b,defaultExpandIcon:S,defaultParentIcon:w,children:A}=i,_=at(i,wBt),{getRootProps:P,contextValue:R}=iBt({disabledItemsFocusable:s,expanded:a,defaultExpanded:l,onNodeToggle:c,onNodeFocus:u,disableSelection:d,defaultSelected:h,selected:f,multiSelect:p,onNodeSelect:m,id:y,defaultCollapseIcon:v,defaultEndIcon:b,defaultExpandIcon:S,defaultParentIcon:w,plugins:xBt,rootRef:n}),O=ABt(r),N=NFt({elementType:mne,externalSlotProps:{},externalForwardedProps:_,className:O.root,getSlotProps:P,ownerState:o});return g(sBt,{value:R,children:g(mne,X({},N,{children:A}))})}),mM=t=>{const{children:e,nodeId:n,label:r,type:o,icon:i,handleSelect:s,setExplorerItemAnchorEl:a,setEditSettings:l}=t,c=u=>u===Fe.TOPOLOGIES?-2:u===Fe.ROUTERS?0:u===Fe.VIRTUAL_TARGETS?4:2;return g(W0e,{sx:{ml:-1,"& .MuiTreeItem-label":{paddingLeft:"0px"},"& .MuiTreeItem-content":{paddingRight:0}},nodeId:n,label:K(le,{id:`${r}
707-box`,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pl:-1,py:1,pr:"32px",position:"relative"},children:[K(le,{sx:{display:"flex",alignItems:"center",overflow:"hidden",flex:1,minWidth:0},children:[i,g(Ke,{sx:{fontSize:"12px",pl:"5px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},title:r,children:r})]}),g(Qo,{id:`${r}-button`,sx:{color:tt,position:"absolute",right:c(o)},icon:g(j6e,{}),onClick:u=>{u.stopPropagation(),a(u.currentTarget),l(),s(n)}})]}),onClick:u=>{u.stopPropagation(),l(),s(n)},children:e},`${r}-item`)},TBt=({projectId:t,components:e,explorerTree:n,allComponentsMappedById:r,subtopologyColorById:o,setSelectedComponentId:i,setExplorerItemAnchorEl:s,setSelectedNcnocComponent:a,isUpdating:l})=>{const{themeColors:c}=Lc(),u=VP(),d=Vo.getAllTypeInitiatorByProjectId(t),h=Vo.getAllTypeTargetByProjectId(t),[f,p]=C.useState(null),m=b=>{p(b),i(b)},y=b=>{a(r[b]),u(Sv({id:b,type:r[b].type}))},v=({componentType:b,tableId:S,deviceId:w})=>{switch(b){case Fe.TOPOLOGIES:return g(_W,{fontSize:"small",sx:{color:o[S??""]}});case Fe.ROUTERS:return g(BF,{fontSize:"small",sx:{color:c.designBlue[300]}});case Fe.INITIATORS:return g(X6e,{fontSize:"small",sx:{color:c.designOrange[300]}});case Fe.TARGETS:return w===0?g(_j,{fontSize:"small",sx:{color:c.designCyan[400]}}):g(Tj,{fontSize:"small",sx:{color:c.designCyan[300]}});case Fe.VIRTUAL_TARGETS:return g(Que,{fontSize:"small",sx:{color:c.designCyan[300]}});case Fe.BRIDGES:return g($F,{fontSize:"small",sx:{color:c.grey[300]}})}};return g(j0e,{defaultExpandIcon:g(PF,{sx:{fontSize:"1px",mr:-1}}),defaultCollapseIcon:g(Gv,{sx:{mr:-1}}),sx:{ml:-1,"& .MuiCollapse-wrapper":{marginLeft:"2px",paddingLeft:"0px",borderLeft:"1px dashed black"},maxWidth:"100%",pointerEvents:l?"none":"auto"},selected:f,children:n.filter(b=>Fe.TOPOLOGIES===b.data.type).map(b=>g(mM,{nodeId:b.data.id,label:e.topologies.find(S=>S.id===b.data.id)?.name||"Subtopology_",type:r[b.data.id]?.type,icon:v({componentType:Fe.TOPOLOGIES,tableId:b.data.id}),handleSelect:m,setExplorerItemAnchorEl:s,setEditSettings:()=>y(b.data.id),children:n.reduce((S,w)=>{const A=e.routers.find(R=>R.id===w.data.id);if(!A||Fe.ROUTERS!==w.data.type||b.id!==w.parent)return S;const _=[...d,...h].reduce((R,O)=>{const N=O.parameters,M=O.parameters,L=N.toRouterId===A.id||M.fromRouterId===A.id,F=N.fromInitiatorId??M.toTargetId;return L?[...R,F]:R},[]),P=[...e.initiators,...e.targets].reduce((R,O)=>{if(!_.includes(O.id))return R;const N=e.virtualTargets.reduce((M,L)=>L.parameters.parentTargetId!==O.id?M:[...M,g(mM,{nodeId:L.id,label:O.name+L.name,type:Fe.VIRTUAL_TARGETS,icon:v({componentType:Fe.VIRTUAL_TARGETS}),handleSelect:m,setExplorerItemAnchorEl:s,setEditSettings:()=>y(O.id)},L.id)],[]);return[...R,g(mM,{nodeId:O.id,label:O.name,type:O.type,icon:v({componentType:O.type}),handleSelect:m,setExplorerItemAnchorEl:s,setEditSettings:()=>y(O.id),children:N},O.id)]},[]);return[...S,g(mM,{nodeId:A.id,label:A.name,type:A.type,icon:v({componentType:A.type}),handleSelect:m,setExplorerItemAnchorEl:s,setEditSettings:()=>y(A.id),children:P},A.id)]},[])},b.data.id))})},XR=({open:t,onCloseHandler:e,onConfirmHandler:n,dialogTitle:r,confirmLabel:o,anchorPosition:i,anchorEl:s})=>{const a=!!i;return K(lR,{id:"confirm-delete-popover",open:t,anchorReference:a?"anchorPosition":"anchorEl",anchorPosition:a?i:void 0,anchorEl:a?void 0:s,onClose:()=>e(),anchorOrigin:{vertical:"bottom",horizontal:"left"},transitionDuration:1,children:[g(eg,{sx:{maxWidth:400,whiteSpace:"normal",wordBreak:"break-word"},children:r}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:()=>e(),sx:{color:tt,borderColor:tt,"&:hover":{borderColor:tt,backgroundColor:Ef}},children:"Cancel"}),g(Sn,{variant:"contained",color:"error",onClick:()=>n(),children:o})]})]})},_Bt=({projectId:t,subtopologyColorById:e,components:n,explorerTree:r,setSelectedNcnocComponent:o,activeTab:i})=>{const s=VP(),{width:a,height:l}=sc(),{diagramWidth:c,diagramHeight:u}=st.getStageDimensions({width:a,height:l}),[d,h]=C.useState(null),[f,p]=C.useState(""),[m,y]=C.useState(""),[v,b]=C.useState(null),S=vw.getFirstSubtopologyByProjectId(t,f),[w,{isLoading:A}]=WW(),[_]=jW(),[P,{isLoading:R}]=qW(),O=C.useMemo(()=>Object.values(n).reduce((k,U)=>(U.forEach(H=>{k[H.id]=H}),k),{}),[n]),N=k=>r.find(U=>k===U.data.id)?.id??-1,M=()=>{h(null)},L=()=>{b(null),M()},F=async()=>{const k=N(f),U=r.filter(H=>H.parent===k&&H.data.type===Fe.ROUTERS);for(const H of U)await P({projectId:t,treeElementRelation:H.data.id,newParentId:N(S.id
707)});await _({componentId:f,type:Fe.TOPOLOGIES,projectId:t})},$=()=>{const k=st.getComponentId({components:n,type:Fe.TOPOLOGIES}),U={...Zu[Fe.TOPOLOGIES],id:Uo(),name:st.getUniqueComponentName({componentName:YL[Fe.TOPOLOGIES],index:k})};w({projectId:t,component:{...U,componentId:k,parameters:{...U.parameters,colors:{...U.parameters.colors,routers:st.getUniqueTopologyFolderColor(n[Kt.componentTypes.topologies])}}},componentTreeElement:{id:st.getMaxBy(r,"id")+1,relationId:U.id,parent:0,droppable:!0,data:{id:U.id,type:U.type}}})},D=k=>{const U=r.find(H=>H.data.id===k);return!U||U.data.type!==Fe.ROUTERS?null:r.find(H=>H.id===U.parent&&H.data.type===Fe.TOPOLOGIES)?.data.id??null};return K(le,{children:[K(le,{sx:{display:"flex",alignItems:"center",width:"100%",pl:"4px",pr:"10px",py:0},children:[g(Ke,{noWrap:!0,component:"span",sx:{fontSize:"13px",width:"100%"},children:"Topology_0"}),g(rn,{title:Un.DESIGN===i||Un.DESIGN_X6===i?"Add new Subtopology":"Available in DESIGN View",placement:"right",children:g(Qo,{icon:g(P6e,{}),sxPropsOverride:{color:tt,right:-1},onClick:$,disabled:Un.DESIGN!==i&&Un.DESIGN_X6!==i||R||A})})]}),g(TBt,{projectId:t,components:n,explorerTree:r,allComponentsMappedById:O,subtopologyColorById:e,setSelectedComponentId:p,setExplorerItemAnchorEl:h,setSelectedNcnocComponent:o,isUpdating:R}),g(xFt,{anchorEl:d,subtopologies:n.topologies,subtopologyColorById:e,selectedComponentSubtopologyId:D(f),isOnlySubtopology:!!f&&O[f]&&O[f].type===Fe.TOPOLOGIES&&n.topologies.length===1,handleMove:k=>{k&&P({projectId:t,treeElementRelation:f,newParentId:N(k)})},handleDelete:(k,U)=>{if(f&&O[f]){let H=O[f].name;if(O[f].type===Fe.VIRTUAL_TARGETS){const V=O[f].parameters.parentTargetId;H=O[V].name+H}O[f].type!==Fe.TOPOLOGIES&&(M(),s(Im({type:O[f].type,deleteElementId:f,anchorElId:k,name:H,projectId:t,tree:r}))),O[f].type===Fe.TOPOLOGIES&&(b(U),y(H))}},handleZoom:()=>{f&&O[f]&&s(AL(st.sceneFitObjects({elementsArray:[O[f]],diagramWidth:c,diagramHeight:u})))},handleCloseMenu:M}),d?g(XR,{open:!!v,anchorEl:v,onCloseHandler:L,onConfirmHandler:()=>{L(),M(),F()}
707,dialogTitle:`This action will move all components in ${m} to ${S?.name}. Please confirm if you would like to delete.`,confirmLabel:"Delete"}):null]})},q0e=({label:t,isEnabled:e,handleClick:n,startIcon:r,sx:o,tooltipMessage:i=""})=>g(rn,{title:i,placement:"bottom-start",children:g(Sn,{variant:"contained",startIcon:r,disabled:!e,sx:{...o},onClick:n,children:t})}),IBt=({projectId:t})=>{const e="Router",n=bt(rae),r=Yn(),o=bt(gd),{themeColors:i}=Lc(),{data:s=[],refetch:a}=GW({projectId:t}),[l,{isLoading:c}]=K9e(),u=vw.getAllByProjectId(t),d=ys[Yt.ROUTER],h=`Create Router (max ${d})`,f=()=>u.find(b=>b.id===n)?.id??u[0].id,p=()=>s.length<d&&!c,m=async()=>{if(await l({projectId:t,subtopologyId:f()})){const{data:b}=await a();if(!b?.length)return;const S=Tt.sortBy(b,"createdAt"),w=S[S.length-1];y(w.id)}},y=v=>{r(d0(v)),o||r(pd(!0))};return g(q0e,{label:e,tooltipMessage:h,isEnabled:p(),handleClick:m,startIcon:c?g(Ni,{size:18}):g(BF,{}),sx:{backgroundColor:i.designBlue[300],"&:hover":{backgroundColor:i.designBlue[100]},fontSize:"0.875rem",width:"100%"}})},Yu={width:200,height:280},ou={width:50,height:26,labelWidth:80,labelMargin:10,offsetX:120},Yd={width:50,height:26,offsetX:70,labelWidth:80,labelMargin:10},up={width:140,height:50,offsetX:70},dp={width:140,height:50},yl={size:30,offset:20,yPositions:[10,30,50,70,90]},Rn={router:"router-node",initiator:"initiator-node",target:"target-node",bridge:"bridge-node",defaultTarget:"default-target-node",addInitiatorButton:"add-initiator-button-node",addTargetButton:"add-target-button-node"},PBt=({projectId:t})=>{const e="Bridge",n=Yn(),r=bt(gd),{themeColors:o}=Lc(),{data:i=[],refetch:s}=_fe({projectId:t}),[a,{isLoading:l}]=odt(),c=()=>!l,u=()=>{const y=10*fS,v=(1415-dp.width)/2,b=(808-dp.height)/2,S=Math.round(v/y)*y,w=Math.round(b/y)*y;return{projectId:t,coordinateX:S,coordinateY:w}},d=async()=>{const f=u();if(await a({requestBody:f})){const{data:m}=await s();if(!m?.length)return;const y=Tt.sortBy(m,"createdAt"),v=y[y.length-1];h(v.id)}},h=f=>{n(d0(f)),r||n(pd(!0))};return g(q0e,{label:e,isEnabled:c(),handleClick:d,startIcon:l?g(Ni,{size:18}):g($F,{invert:!0,fill:o.grey[300]}),sx:{backgroundColor:tt,"&:hover":{backgroundColor:tt},fontSize:"0.875rem",width:"100%"}})},RBt=({projectId:t})=>K(Mt,{direction:"row",spacing:1,sx:{mx:1,mb:1},children:[g(Mt,{direction:"column",spacing:1,children:g(IBt,{projectId:t})}),g(PBt,{projectId:t})]}),OBt=({label:t,expanded:e,handleAccordionChange:n,accordionSummaryChildren:r,accordionDetailsChildren:o})=>K(Hv,{expanded:e,onChange:n(t),sx:{width:Rs.leftPanelWidth,borderBottom:"1px solid #ccc","&.Mui-disabled":{border:"#ccc"}},disableGutters:!0,children:[g(zv,{expandIcon:g(Gv,{}),"aria-controls":`${t}-content`,id:`${t}-header`,sx:{padding:"0 8px",minHeight:"32px","& .MuiAccordionSummary-content":{margin:0,color:tt}},children:r}),g(Uv,{sx:{px:1},children:o})]},t),NBt=({projectId:t,expandedPanels:e,handleAccordionChange:n})=>{const r="Components";return g(OBt,{label:r,expanded:e.includes(r),handleAccordionChange:n,accordionSummaryChildren:K(gr,{children:[g(kce,{})," ",g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:r})]}),accordionDetailsChildren:g(RBt,{projectId:t})})},MBt=({isLeftPanelOpen:t,components:e,stageCoordinates:n,projectId:r,explorerTree:o,connectionIndexes:i,subtopologyColorById:s,activeTab:a,setSelectedNcnocComponent:l})=>{const c="Components",u="Explorer",[d,h]=C.useState([c,u]),f=p=>()=>{h(m=>m.includes(p)?m.filter(y=>y!==p):[...m,p])};return K(le,{sx:{backgroundColor:"#FAFAFA",boxShadow:"0 3px 10px rgb(0 0 0 / 0.2);",width:ei.getLeftPanelWidth(t),height:"100%",overflowY:"auto",overflowX:"hidden",zIndex:2,left:0,position:"absolute"},children:[a===Un.DESIGN?K(Hv,{expanded:d.includes(c),onChange:f(c),sx:{width:"100%",borderBottom:"1px solid #ccc","&.Mui-disabled":{border:"#ccc"}},disableGutters:!0,children:[K(zv,{expandIcon:g(Gv,{}),"aria-controls":`${c}-content`,id:`${c}-header`,sx:{padding:"0 8px",minHeight:"32px","& .MuiAccordionSummary-content":{margin:0,color:tt}},children:[g(kce,{})," ",g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:c})]}),g(Uv,{sx:{px:1},children:g(SFt,{components:e,stageCoordinates:n,tree:o,projectId:r,connectionIndexes:{...i,initiators:i.initiatorIds,targets:i.targetIds}})})]},c):null,a===Un.DESIGN_X6?g(NBt,{projectId:r,expandedPanels:d,handleAccordionChange:f}):null,K(Hv,{expanded:d.includes(u),onChange:f(u),sx:{width:"100%",borderBottom:"1px solid #ccc","&.Mui-disabled":{border:"#ccc"}},disableGutters:!0,children:[K(zv,{expandIcon:g(Gv,{}),"aria-controls":`${u}-content`,id:`${u}-header`,sx:{padding:"0 8px",minHeight:"32px","& .MuiAccordionSummary-content":{margin:0,color:tt}},children:[g(qI,{})," ",g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:u})]}),g(Uv,{sx:{px:1},children:g(_Bt,{projectId:r,subtopologyColorById:s,explorerTree:o,components:e,setSelectedNcnocComponent:l,activeTab:a})})]},u)]})};var U8={},DBt=hr;
707Object.defineProperty(U8,"__esModule",{value:!0});var Y0e=U8.default=void 0,LBt=DBt(yr()),kBt=vr;Y0e=U8.default=(0,LBt.default)((0,kBt.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");const yne=({handleClick:t,iconEl:e,type:n})=>{const r=n==="submit"?"contained":"outlined",o={width:"30px",height:"24px",padding:0,fontSize:"12px",boxShadow:"2px 2px 5px #bbb8b8",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"unset"},i={...o,backgroundColor:tt,"&:hover":{backgroundColor:Zs}},s={...o,color:tt,backgroundColor:KI,borderColor:tt,"&:hover":{borderColor:Zs,color:Zs,backgroundColor:y9e}};return g(Sn,{id:n,variant:r,size:"small",sx:n==="submit"?i:s,onClick:t,children:e})},z8=({handleConfirmAction:t,handleCancelAction:e})=>K(le,{sx:{display:"flex",gap:.2,position:"absolute",top:"115%",right:"8px",transform:"translateY(-50%)",zIndex:2},children:[g(yne,{handleClick:t,iconEl:g(Y0e,{fontSize:"small"}),type:"submit"}),g(yne,{handleClick:e,iconEl:g(ej,{fontSize:"small"}),type:"cancel"})]}),xn=({controlValue:t,isConfirmCancelButtonsEnabled:e,onChangeHandler:n,onSubmitHandler:r,onCancelHandler:o,onFocusHandler:i,label:s="",labelPlacement:a="start",controlChangeParameter:l,controlChangeKey:c,helperText:u="",disabled:d,error:h,isWarning:f=!1,textFieldLabel:p="",InputPropsOverride:m={type:"text"},inputPropsOverride:y={},fclSX:v={},maxRows:b=1,multiline:S=!1})=>{const[w]=C.useState(t),[A,_]=C.useState(e),[P,R]=C.useState(!1),O=C.useRef(void 0),N=k=>{const U=k.relatedTarget;if(U&&U.id==="cancel"){setTimeout(()=>{_(!1)},100),o();return}r(),_(!1),R(!1)},M=k=>{_(w!==k.target.value),n(l||c?{parameter:l,key:c,value:k.target.value}:k.target.value)},L=k=>{k.stopPropagation(),k.key==="Enter"&&O.current&&(k.preventDefault(),O.current.blur())},F=()=>{O.current&&O.current.blur()},$=()=>{R(!0),i?.()},D=P&&g(le,{sx:{position:"absolute",zIndex:2,backgroundColor:h?"darkred":f?"darkorange":"darkred",px:"2px",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"50%"},component:"span",children:g(Ke,{sx:{fontSize:"12px",color:"white"},component:"span",children:u})});return g(le,{children:g(ec,{value:s,label:s,labelPlacement:a,className:"form-control-label-wrapper with-label",sx:{display:"flex",justifyContent:"space-between",height:32,mr:2,pt:.5,pb:.5,"& .MuiFormControlLabel-label":{"&:hover":{cursor:"default"}},...v},control:K(le,{sx:{position:"relative",width:"50%"},children:[g(lo,{inputRef:O,value:t,label:p,variant:"outlined",sx:{width:"100%",height:"24px","& .MuiInputBase-root":{height:"inherit",fontSize:"12px"},"& .MuiInputLabel-root":{fontSize:"12px",transform:"translate(14px, -6px) scale(0.75)"}},onChange:M,onBlur:N,onKeyDown:L,onFocus:$,error:h,maxRows:b,multiline:S,helperText:D,InputProps:{...m},InputLabelProps:{shrink:!0},inputProps:{...y}}),A&&e?g(z8,{handleConfirmAction:F,handleCancelAction:o}):null]}),componentsProps:{typography:{fontSize:"12px"}},disabled:d})})},X0e=t=>{switch(t){case"powerDomainName":return"Power Net Name";case"groundDomainName":return"Ground Net Name";default:return""}},Hw=(t,e)=>{switch(!0){case!e:return to.emptyValue(t);case e.length<OC:return to.minCharLengthNotReach(t);case!xh.isNameValid(e):return to.invalidName(t);case xh.hasNameExceededMaxCharLength(e):return to.maxCharLengthExceeded(t,YI);default:return""}},ga=({value:t,minimum:e,formControlLabelName:n,maximum:r})=>!Number.isInteger(Number(t))||Number(t)<e||Number(t)>Number(r)||t?.toString()==="e"||t?.toString()===""?`${n}
707 is invalid`:"",FBt=({value:t,minimum:e,formControlLabelName:n,maximum:r})=>!Number.isInteger(Number(t))||BigInt(t)<e||BigInt(t)>BigInt(r)||t?.toString()==="e"||t?.toString()===""?`${n} is invalid`:"",V8=({value:t,minimum:e,maximum:n,formControlLabelName:r})=>(t?Number(t)!==Number(Number(t).toFixed(2)):!1)||Number(t)<e||Number(t)>n||t?.toString()===""||t?.toString()==="e"?`${r} is invalid`:"",K0e=({value:t,minimum:e,maximum:n,formControlLabelName:r})=>(t?Number(t)!==Number(Number(t).toFixed(6)):!1)||t<e||t>n||t?.toString()===""||t?.toString().includes("e")?`${r} is invalid`:"",WB=(t,e)=>Math.abs(t-e)<1e-7,tm=(t,e)=>t===e,Ar=({controlValue:t,onChangeHandler:e,options:n,label:r,labelPlacement:o="start",fclSX:i={},controlSX:s={},disabled:a,maxValue:l,placeholder:c="",units:u="",colorPicker:d=!1,readOnly:h=!1,selectLabel:f,isError:p=!1,helperText:m,...y})=>{const[v,b]=C.useState(!1),S=String(t),w=(P,R)=>(!!(l&&Number(P)>l)||R)??!1,A=n.some(P=>P.value.toString()===S&&P?.isOptionDisabled),_=v&&p&&m?g(le,{sx:{position:"absolute",zIndex:2,backgroundColor:"darkred",px:"2px",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"75%",top:"28px",left:"10px"},component:"span",children:g(Ke,{sx:{fontSize:"12px",color:"white"},component:"span",children:m})}):null;return g(le,{children:g(ec,{value:r,label:r,labelPlacement:o,className:"form-control-label-wrapper with-label",sx:{display:"flex",justifyContent:"space-between",height:32,mr:2,pt:.5,pb:.5,"& .MuiFormControlLabel-label":{"&:hover":{cursor:"default"}},...i},control:K(v0,{sx:{width:"50%",position:"relative"},onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onMouseDown:()=>b(!1),children:[g(_F,{id:`${f}
707-label`,sx:{fontSize:"12px",top:"1px"},children:f}),K(xa,{labelId:`${f}-label`,label:f,error:p||!!(l&&Number(S)>l)||A,value:S,displayEmpty:!0,placeholder:c,endAdornment:g(qr,{position:"end",sx:{mr:2},children:u}),sx:{height:"24px",fontSize:"12px","& .color-picker":{mt:"2px",height:16,backgroundColor:d?S:"inherit"},...s},onChange:P=>{e(P.target.value)},onMouseDown:()=>b(!1),readOnly:h,...y,children:[!t&&c?g(mr,{disabled:!0,value:"",children:g("em",{children:c})}):null,n.map(({key:P,value:R,displayName:O,isOptionDisabled:N,tooltipMessage:M})=>{const L=w(R,N),F=g(mr,{value:R,sx:{fontSize:"12px",backgroundColor:d?R:"inherit","&.MuiButtonBase-root.Mui-selected":{backgroundColor:d?R:""},"&:hover":{backgroundColor:d?R:"",opacity:d?.65:1}},disabled:L,children:d?g(le,{className:"color-picker",sx:{height:"8px"}}):O??R},P);return L&&M?g(rn,{title:M,children:g("span",{children:F})}):F})]}),_]}),componentsProps:{typography:{fontSize:"12px"}},disabled:a})})},BBt=({ncnocSystem:t,handleFormInputValueChange:e})=>{const[n,r]=C.useState(BigInt(t.interleaveChannelSize)),[o,i]=C.useState(Number(t.interleaveChannelSize)),[s,a]=C.useState(""),l=()=>`[2^${Math.ceil(Math.log2(o))} bytes] min: 2^0, max: 2^63`,c=({storedInterleavedChannelSizeValue:d,currentInterleavedChannelSizeValue:h,formControlLabelName:f,setInterleavedChannelSizeValueError:p,field:m})=>{const y=FBt({value:h,minimum:nne,maximum:rne,formControlLabelName:f});p(y),!y&&!tm(d,h)&&e({field:m,value:h})},u=()=>{r(BigInt(t.interleaveChannelSize)),i(Number(t.interleaveChannelSize)),a("")};return C.useEffect(()=>{n.toString()===t.interleaveChannelSize.toString()&&a("")},[n,t.interleaveChannelSize]),K(le,{children:[g(Hr,{label:Ho.ADDRESS_INTERLEAVING,onChangeHandler:d=>e({field:"isAddressInterleavingEnabled",value:d}),controlValue:t.isAddressInterleavingEnabled}),t.isAddressInterleavingEnabled?K(le,{children:[g(xn,{label:Ho.INTERLEAVED_CHANNEL_SIZE,controlValue:n.toString(),onChangeHandler:d=>{i(Number(d)),r(BigInt(d))},onSubmitHandler:()=>c({storedInterleavedChannelSizeValue:t.interleaveChannelSize,currentInterleavedChannelSizeValue:n.toString(),formControlLabelName:Ho.INTERLEAVED_CHANNEL_SIZE,setInterleavedChannelSizeValueError:a,field:"interleaveChannelSize"}),onCancelHandler:()=>u(),isConfirmCancelButtonsEnabled:!tm(t.interleaveChannelSize.toString(),n.toString()),InputPropsOverride:{type:"number",endAdornment:"Bytes"},inputPropsOverride:{min:nne,max:rne},helperText:s,error:!!s,textFieldLabel:l()}),g(Hr,{label:Ho.INTERLEAVING_SPLIT,onChangeHandler:d=>e({field:"isInterleavingSplitEnabled",value:d}),controlValue:t.isInterleavingSplitEnabled})]}):null]})};var Mg=(t=>(t.NOC="NoC Parameters",t.POWER="Power",t.USER_SIGNAL="User Signal",t.ADDRESS_INTERLEAVING="Address Interleaving",t.CROSS_TOPOLOGY="Cross Topology",t))(Mg||{});const yS=({activeTab:t,tabOptions:e,handleActiveTabChange:n})=>g(tg,{value:t,onChange:(r,o)=>n(r,o),variant:"scrollable",scrollButtons:!0,allowScrollButtonsMobile:!0,"aria-label":"scrollable force tabs",sx:{marginBottom:2,"& .MuiTabs-indicator":{backgroundColor:tt}},children:e.map(({value:r,label:o})=>g(Sa,{value:r,label:o,sx:{color:tt,"&.Mui-selected":{color:tt}}},r))}),Jo=({label:t,value:e})=>K(le,{sx:{display:"flex",justifyContent:"space-between",pl:2,pt:1,pb:.5,width:"50%"},children:[g(Ke,{sx:{fontSize:"12px",minWidth:"108%"},children:t}),g(Ke,{sx:{fontSize:"12px",textAlign:"right",whiteSpace:"nowrap"},children:e})]}),$Bt=({ncnocSystem:t,handleFormInputValueChange:e})=>{const n=`min: ${cU}, max: ${uU}`,r=`min: ${pM}, max: ${gM}`,[o,i]=C.useState(t.connectedBitsBufferId),[s,a]=C.useState(t.connectedReadIdWidthMasterCommon),[l,c]=C.useState(t.connectedWriteIdWidthMasterCommon),u=({field:d,value:h,setStateFunction:f,isBitsBuffer:p})=>{const m=p?cU:pM,y=p?uU:gM;if(console.log(d,h),h<m){e({field:d,value:m}),f(m);return}if(h>y){e({field:d,value:y}),f(y);return}e({field:d,value:h})};return K(le,{children:[g(Hr,{label:Ho.SIG_NATIVE_CROSS_TOPOLOGY,onChangeHandler:d=>e({field:"isCrossTopologyEnabled",value:d}),controlValue:t.isCrossTopologyEnabled}),g(Jo,{label:Ho.COMPUTED_BITS_BUFFER_ID,value:t.computedBitsBufferId}),t.isCrossTopologyEnabled?g(xn,{label:Ho.CONNECTED_BITS_BUFFER_ID,controlValue:o.toString(),onChangeHandler:d=>{i(Number(d))},onSubmitHandler:()=>u({field:"connectedBitsBufferId",value:o,setStateFunction:i,isBitsBuffer:!0}),onCancelHandler:()=>i(Number(t.connectedBitsBufferId)),isConfirmCancelButtonsEnabled:!tm(t.connectedBitsBufferId.toString(),o.toString()),InputPropsOverride:{type:"number"},inputPropsOverride:{min:cU,max:uU},textFieldLabel:n}):null,g(Jo,{label:Ho.COMPUTED_READ_ID_WIDTH_MASTER_COMMON,value:t.computedRead
707IdWidthMasterCommon}),t.isCrossTopologyEnabled?g(xn,{label:Ho.CONNECTED_READ_ID_WIDTH_MASTER_COMMON,controlValue:s.toString(),onChangeHandler:d=>{a(Number(d))},onSubmitHandler:()=>u({field:"connectedReadIdWidthMasterCommon",value:s,setStateFunction:a,isBitsBuffer:!1}),onCancelHandler:()=>a(Number(t.connectedReadIdWidthMasterCommon)),isConfirmCancelButtonsEnabled:!tm(t.connectedReadIdWidthMasterCommon.toString(),s.toString()),InputPropsOverride:{type:"number"},inputPropsOverride:{min:pM,max:gM},textFieldLabel:r}):null,g(Jo,{label:Ho.COMPUTED_WRITE_ID_WIDTH_MASTER_COMMON,value:t.computedWriteIdWidthMasterCommon}),t.isCrossTopologyEnabled?g(xn,{label:Ho.CONNECTED_WRITE_ID_WIDTH_MASTER_COMMON,controlValue:l.toString(),onChangeHandler:d=>{c(Number(d))},onSubmitHandler:()=>u({field:"connectedWriteIdWidthMasterCommon",value:l,setStateFunction:c,isBitsBuffer:!1}),onCancelHandler:()=>c(Number(t.connectedWriteIdWidthMasterCommon)),isConfirmCancelButtonsEnabled:!tm(t.connectedWriteIdWidthMasterCommon.toString(),l.toString()),InputPropsOverride:{type:"number"},inputPropsOverride:{min:pM,max:gM},textFieldLabel:r}):null]})},HBt=({projectId:t})=>{const e=`min: ${_T}, max: ${IT}`,n=bt(VRe),r=Wp.getByProjectId(t),[o]=rS(),[i]=g6(),[s,a]=C.useState(Mg.NOC),[l,c]=C.useState(""),[u,d]=C.useState(""),[h,f]=C.useState(""),[p,m]=C.useState(""),[y,v]=C.useState(""),[b,S]=C.useState(""),[w,A]=C.useState(r.powerDomainName),[_,P]=C.useState(r.groundDomainName),[R,O]=C.useState(r.primaryPower),[N,M]=C.useState(r.userRequestWidth),[L,F]=C.useState(r.userDataWidth),[$,D]=C.useState(r.userResponseWidth),k=async({updateNcnocSystemRequestPayload:Q})=>{if(await i({requestBody:Q})){const oe={id:r.projectId};await o({requestBody:oe})}},U=({field:Q,value:se})=>{const oe={...r,[Q]:se};k({updateNcnocSystemRequestPayload:oe})},H=({storedValue:Q,currentValue:se,setCurrentValue:oe,setError:ie})=>{oe(se),tm(Q.toString(),se)&&ie("")},V=({storedName:Q,currentName:se,formControlLabelName:oe,setNameError:ie,field:ee})=>{const re=Hw(oe,se);ie(re),!re&&se!==Q&&U({field:ee,value:se})},q=({storedUserSignalValue:Q,currentUserSignalValue:se,formControlLabelName:oe,setUserSignalError:ie,field:ee})=>{const re=ga({value:se,minimum:_T,maximum:IT,formControlLabelName:oe});ie(re),!re&&se!==Q&&U({field:ee,value:se})},J=(Q,se)=>{a(se)};return K(le,{children:[g(Bm,{icon:g(OW,{sx:{color:tt}}),title:g(gr,{children:Ho.EDIT_SYSTEM})}),g(le,{sx:{background:tt,height:36.56}}),g(yS,{activeTab:s,handleActiveTabChange:J,tabOptions:Object.values(Mg).filter(Q=>n||Q!==Mg.CROSS_TOPOLOGY).map(Q=>({value:Q,label:Q}))}),K(le,{sx:{mt:2},children:[s===Mg.NOC?K(le,{children:[g(Ar,{label:Ho.ADDRESS_WIDTH,controlValue:r.addressWidth.toString(),onChangeHandler:Q=>U({field:"addressWidth",value:Q}),options:R0e}),g(Ar,{label:Ho.DATA_WIDTH,controlValue:r.dataWidth.toString(),onChangeHandler:Q=>U({field:"dataWidth",value:Q}),options:P0e}),g(yi,{sx:{my:2}}),g(Hr,{label:Ho.CLOCK_FREQUENCY_VALIDATION,onChangeHandler:Q=>U({field:"isFrequencyValidationEnabled",value:Q}),controlValue:r.isFrequencyValidationEnabled}),g(Hr,{label:Ho.REGISTER_MAP_GENERATION,onChangeHandler:Q=>U({field:"isRegisterMapGenerationEnabled",value:Q}),controlValue:r.isRegisterMapGenerationEnabled})]}
707):null,s===Mg.POWER?K(le,{children:[g(xn,{label:Ho.POWER_NET_NAME,controlValue:w,onChangeHandler:Q=>{H({storedValue:r.powerDomainName,currentValue:Q,setCurrentValue:A,setError:c})},onSubmitHandler:()=>{V({storedName:r.powerDomainName,currentName:w,formControlLabelName:Ho.POWER_NET_NAME,setNameError:c,field:"powerDomainName"})},onCancelHandler:()=>{A(r.powerDomainName),c("")},isConfirmCancelButtonsEnabled:r.powerDomainName!==w,helperText:l,error:!!l}),g(xn,{label:Ho.POWER_VOLTAGE,controlValue:R.toString(),onChangeHandler:Q=>{H({storedValue:r.primaryPower.toString(),currentValue:Q,setCurrentValue:O,setError:f})},onSubmitHandler:()=>{const Q=V8({value:R.toString(),minimum:dC,maximum:hC,formControlLabelName:Ho.POWER_VOLTAGE});f(Q),!Q&&R!==r.primaryPower&&U({field:"primaryPower",value:R})},onCancelHandler:()=>{f(""),O(r.primaryPower)},isConfirmCancelButtonsEnabled:!WB(r.primaryPower,R),textFieldLabel:`min: ${dC}, max: ${hC}`,InputPropsOverride:{type:"number"},inputPropsOverride:{step:.01,min:dC,max:hC},error:!!h,helperText:h}),g(xn,{label:Ho.GROUND_NET_NAME,controlValue:_,onChangeHandler:Q=>{H({storedValue:r.groundDomainName,currentValue:Q,setCurrentValue:P,setError:d})},onSubmitHandler:()=>{V({storedName:r.groundDomainName,currentName:_,formControlLabelName:Ho.GROUND_NET_NAME,setNameError:d,field:"groundDomainName"})},onCancelHandler:()=>{P(r.groundDomainName),d("")},isConfirmCancelButtonsEnabled:r.groundDomainName!==_,helperText:u,error:!!u})]}
707):null,s===Mg.USER_SIGNAL?K(le,{children:[g(xn,{label:Ho.USER_REQUEST_WIDTH,controlValue:N.toString(),onChangeHandler:Q=>{H({storedValue:r.userRequestWidth,currentValue:Q,setCurrentValue:M,setError:m})},onSubmitHandler:()=>{q({storedUserSignalValue:r.userRequestWidth,currentUserSignalValue:N,formControlLabelName:Ho.USER_REQUEST_WIDTH,setUserSignalError:m,field:"userRequestWidth"})},onCancelHandler:()=>{M(r.userRequestWidth),m("")},isConfirmCancelButtonsEnabled:!tm(r.userRequestWidth,Number(N)),textFieldLabel:e,InputPropsOverride:{type:"number"},inputPropsOverride:{min:_T,max:IT},helperText:p,error:!!p}),g(xn,{label:Ho.USER_DATA_WIDTH,controlValue:L.toString(),onChangeHandler:Q=>{H({storedValue:r.userDataWidth,currentValue:Q,setCurrentValue:F,setError:v})},onSubmitHandler:()=>{q({storedUserSignalValue:r.userDataWidth,currentUserSignalValue:L,formControlLabelName:Ho.USER_DATA_WIDTH,setUserSignalError:v,field:"userDataWidth"})},onCancelHandler:()=>{F(r.userDataWidth),v("")},isConfirmCancelButtonsEnabled:!tm(r.userDataWidth,Number(L)),textFieldLabel:e,InputPropsOverride:{type:"number"},inputPropsOverride:{min:_T,max:IT},helperText:y,error:!!y}),g(xn,{label:Ho.USER_RESPONSE_WIDTH,controlValue:$.toString(),onChangeHandler:Q=>{H({storedValue:r.userResponseWidth,currentValue:Q,setCurrentValue:D,setError:S})},onSubmitHandler:()=>{q({storedUserSignalValue:r.userResponseWidth,currentUserSignalValue:$,formControlLabelName:Ho.USER_RESPONSE_WIDTH,setUserSignalError:S,field:"userResponseWidth"})},onCancelHandler:()=>{D(r.userResponseWidth),S("")},isConfirmCancelButtonsEnabled:!tm(r.userResponseWidth,Number($)),textFieldLabel:e,InputPropsOverride:{type:"number"},inputPropsOverride:{min:_T,max:IT},helperText:b,error:!!b})]}):null,s===Mg.ADDRESS_INTERLEAVING?g(BBt,{ncnocSystem:r,handleFormInputValueChange:U}):null,s===Mg.CROSS_TOPOLOGY?g($Bt,{ncnocSystem:r,handleFormInputValueChange:U}):null]})]})},UBt=(t,e,n)=>{const r=t;return r.parameters.trafficPattern||(r.parameters.trafficPattern=r.type===Fe.INITIATORS?Yse:H3),r.parameters.trafficPattern={...r.parameters.trafficPattern,[e]:n},r},Q0e=({settings:t,handleChangeNormalizedFields:e})=>{const n=()=>t.parameters.bus.protocol===wt.AXI&&t.parameters.bus.version===Co.FOUR&&t.parameters.bus.variant===Ui.LITE,r=s=>a=>{e({field:s,value:a})},o=t,i=t;return K(gr,{children:[t.type===Fe.INITIATORS?K(gr,{children:[g(Ar,{label:"Transaction Type",controlValue:o.parameters.trafficPattern?.accessType||m1.READ_WRITE,onChangeHandler:r("accessType"),options:WOe}),o.parameters.bus.protocol===wt.APB||n()?null:g(Ar,{label:"Burst Length",controlValue:o.parameters.trafficPattern?.burstLength||Wy.ANY,onChangeHandler:r("burstLength"),options:jOe}),g(Ar,{label:"Request Speed",controlValue:o.parameters.trafficPattern?.requestSpeed||RI.FAST,onChangeHandler:r("requestSpeed"),options:qOe})]}):null,t.type===Fe.TARGETS&&!(t.parameters.bus.protocol===wt.SEC||t.parameters.bus.protocol===wt.SRAM)?g(Ar,{label:"Response Speed",controlValue:i.parameters.trafficPattern?.responseSpeed||OI.FAST,onChangeHandler:r("responseSpeed"),options:YOe}):null]})},G8=({deviceId:t})=>K(le,{sx:{display:"flex",pl:2,pt:1,pb:1},children:[g(Ke,{sx:{fontSize:"12px",pr:"38.5%"},children:"Device Id"}),g(Ke,{children:t})]}),vne=[{key:vc.DISABLED,value:vc.DISABLED,displayName:"Disabled"},{key:vc.READ_ONLY,value:vc.READ_ONLY,displayName:"Read Only"},{key:vc.WRITE_ONLY,value:vc.WRITE_ONLY,displayName:"Write Only"},{key:vc.READ_WRITE_INDEPENDENT,value:vc.READ_WRITE_INDEPENDENT,displayName:"Read-Write Independent"},{key:vc.READ_WRITE_COMBINED,value:vc.READ_WRITE_COMBINED,displayName:"Read-Write Combined"}],_z=[{key:$b.MHZ,value:$b.MHZ,displayName:"MHz"},{key:$b.GHZ,value:$b.GHZ,displayName:"GHz"}],Z0e=({label:t,textfieldLabel:e,currentTextfieldValue:n,activeTextfieldValue:r,activeSelectValue:o,selectOptions:i,errorMessage:s,handleTextfieldSubmit:a,handleTextfieldCancel:l,handleTextfieldValueChange:c,handleSelectValueChange:u})=>{const[d,h]=C.useState(null),f=i.find(m=>m.value===o),p=f?.displayName??f?.value;return K(le,{children:[g(xn,{label:t,controlValue:String(n),onChangeHandler:c,onSubmitHandler:a,onCancelHandler:l,isConfirmCancelButtonsEnabled:!Tt.isEqual(n,String(r)),inputPropsOverride:{step:.1},InputPropsOverride:{sx:{pr:0},endAdornment:K(Sn,{onClick:m=>{m.stopPropagation(),h(m.currentTarget)},sx:{p:0,height:"22px",borderLeft:"1px solid #b5b5b5",borderRadius:0},children:[g(Ke,{sx:{fontSize:"12px",color:tt},children:p}),g(v6e,{sx:{color:"#757575"}})]})},textFieldLabel:e,error:!!s,helperText:s}),g(Es,{anchorEl:d,open:!!d,sx:{zIndex:2},onClose:()=>h(null),children:i.map(({key:m,value:y,displayName:v})=>g(mr,{selected:y===o,onClick:()=>{y!==o&&u(y),h(null)},sx:{px:"8px"},children:v},m))})]})},W8=({component:t,handleChange:e,useSubtopologyClock:n,parentSubtopologyComponent:r})=>{const o="Clock Frequency",[s,a]=C.useState(""),[l,c]=C.useState(String(t.frequency)),u=Number(l),d=_z.find(v=>v.value===t.frequencyUnit)?.displayName??$b.MHZ,h=`${r?.frequency} ${d}`,f=()=>{const v=K0e({value:u,minimum:0,maximum:Number.MAX_VALUE,formControl
707LabelName:o});if(a(v),isNaN(u)){c(String(t.frequency));return}!v&&!WB(u,t.frequency)&&e({field:"frequency",value:u})},p=v=>{e({field:"frequencyUnit",value:v})},m=v=>{Tt.isEqual(Number(v),t.frequency)&&a(""),c(v)},y=()=>{a(""),c(String(t.frequency))};return C.useEffect(()=>{a(""),c(String(t.frequency))},[t]),n?g(Jo,{label:o,value:h}):g(Z0e,{label:o,textfieldLabel:"min: 0, up to 6 decimals",currentTextfieldValue:l,activeTextfieldValue:t.frequency,activeSelectValue:t.frequencyUnit,selectOptions:_z,errorMessage:s,handleTextfieldSubmit:()=>f(),handleTextfieldCancel:()=>y(),handleTextfieldValueChange:v=>m(v),handleSelectValueChange:v=>p(v)})},zBt=({updateHandler:t,initiatorId:e,projectId:n})=>{const r="Write Data Buffer",o="isWriteDataBufferEnabled",i=vd.getById(e,n);return g(Hr,{label:r,controlValue:!!i?.parameters.isWriteDataBufferEnabled,onChangeHandler:s=>t({parameter:o,value:s})})},VBt=({updateHandler:t,initiatorId:e,projectId:n})=>{const r="Number of Virtual Channels",o=`This value is no longer valid because the ${r} exceeds Outstanding Reads. Please select a supported value.`,i="virtualChannelsCount",s=[{key:0,value:0},{key:1,value:1},{key:2,value:2},{key:4,value:4},{key:8,value:8},{key:16,value:16}],a=vd.getById(e,n);return g(Ar,{label:r,controlValue:a?.parameters.virtualChannelsCount,onChangeHandler:l=>{t({parameter:i,value:l})},options:s,isError:a?.parameters.virtualChannelsCount>a?.parameters.outstandingRead,helperText:o})},bne=({ncnocSystem:t,settings:e,updateHandler:n,handleChangeNormalizedFields:r,activeTab:o,componentIdToTopologyMap:i,groupedComponentsByType:s,projectId:a})=>{const[l]=nS(),c=Nh.getAllByProjectId(a),u=Vo.getAllTypeInitiatorByProjectId(a),d=ea.getAllByProjectId(a),h=ea.getAllAddressInterleavingEnabledByProjectId(a),f=cf.getIsTargetAddressInterleavingEnabled(d,t.isAddressInterleavingEnabled),m=`This option is not supported when Address Interleaving Merger is enabled for a target: 708${h.map(pe=>`- ${pe.name}`).join(` 709`)}`,y=f?m:"",v=String(e.parameters.writeTransactionWidth),b=String(e.parameters.readTransactionWidth),S=String(e.parameters.outstandingWrite),w=String(e.parameters.outstandingRead),A=String(e.parameters.writeDataBufferDepth??yL),[_,P]=C.useState(v),[R,O]=C.useState(b),[N,M]=C.useState(S),[L,F]=C.useState(w),[$,D]=C.useState(A),[k,U]=C.useState(""),[H,V]=C.useState(""),[q,J]=C.useState(""),[Q,se]=C.useState(""),[oe,ie]=C.useState(""),ee=[{key:wt.AXI,value:wt.AXI,displayName:"AXI Slave"},{key:wt.AHB,value:wt.AHB,displayName:"AHB Slave",isOptionDisabled:f,tooltipMessage:y},{key:wt.APB,value:wt.APB,displayName:"APB Slave",isOptionDisabled:f,tooltipMessage:y},{key:wt.SIG_NATIVE,value:wt.SIG_NATIVE,isOptionDisabled:f,tooltipMessage:y}],re=[{key:Ui.FULL,value:Ui.FULL},{key:Ui.LITE,value:Ui.LITE,isOptionDisabled:f,tooltipMessage:y},{key:Ui.STREAM,value:Ui.STREAM,isOptionDisabled:f,tooltipMessage:y}],fe=C.useMemo(()=>st.filterDataWidthOptions(e),[e.parameters.bus]),we=C.useMemo(()=>{const pe=cf.getTargetsWithAddressInterleaving(s.targets),Be=cf.getIsTargetAddressInterleavingEnabled(s.targets,t.isAddressInterleavingEnabled),ke=Ki.getMinimumValueByParameter({components:pe,parameter:"minimumTransactionSize"});return cf.getReorderBufferOptions(Be,ke)},[s.targets]),xe=C.useMemo(()=>sm({busProtocol:e.parameters.bus.protocol,busVersion:e.parameters.bus.version,busVariant:e.parameters.bus.variant}),[e.parameters.bus]),ve=(pe,Be)=>ke=>{n({parameter:pe,key:Be,value:ke}),Be==="protocol"&&Re(ke)},Re=pe=>{const Be=u.find(ot=>ot.parameters.fromInitiatorId===e.id);if(!Be)return;const ke={...e,parameters:{...e.parameters,bus:{...e.parameters.bus,protocol:pe}}},Ne=Pw.getUpdatePayload({component:ke,connection:Be,routers:c});l({projectId:a,component:Ne})};return C.useEffect(()=>{U(""),V(""),J(""),se(""),ie(""),P(v),O(b),M(S),F(w),D(A)},[e]),C.useEffect(()=>{Number(_)===e.parameters.writeTransactionWidth&&U(""),Number(R)===e.parameters.readTransactionWidth&&V(""),Number(N)===e.parameters.outstandingWrite&&J(""),Number(L)===e.parameters.outstandingRead&&se(""),Number($)===Number(A)&&ie("")},[_,R,N,L,$]),K(le,{children:[o===qn.PARAMETERS?K(le,{children:[g(G8,{deviceId:e.componentId}),g(Ar,{label:"Interface Protocol",controlValue:e.parameters.bus.protocol,onCh
709angeHandler:ve("bus","protocol"),options:ee}),xe!==nt.SIG_NATIVE?g(Ar,{label:"Interface Protocol Version",controlValue:e.parameters.bus.version,onChangeHandler:ve("bus","version"),options:En[e.type].bus.versions[e.parameters.bus.protocol]}):null,xe===nt.AXI_FOUR_FULL||xe===nt.AXI_FOUR_LITE||xe===nt.AXI_FOUR_STREAM||xe===nt.AHB_THREE_LITE?g(Ar,{label:"Interface Variant",controlValue:e.parameters.bus.variant,onChangeHandler:ve("bus","variant"),options:re}):null,xe===nt.AXI_THREE||xe===nt.AXI_FOUR_FULL||xe===nt.AXI_FOUR_STREAM?K(le,{children:[g(xn,{label:"Write Transaction ID Width",controlValue:_,onChangeHandler:pe=>{P(pe)},onSubmitHandler:()=>{const pe=ga({value:_,minimum:En[e.type].writeTransactionWidth.min,maximum:En[e.type].writeTransactionWidth.max,formControlLabelName:"Write Transaction ID Width"});U(pe),!pe&&Number(_)!==e.parameters.writeTransactionWidth&&n({parameter:"writeTransactionWidth",value:Number(_)})},onCancelHandler:()=>{U(""),P(v)},isConfirmCancelButtonsEnabled:Number(_)!==e.parameters.writeTransactionWidth,InputPropsOverride:{type:"number",endAdornment:g(qr,{position:"end",children:"bits"})},textFieldLabel:`min: ${En[e.type].writeTransactionWidth.min}, max: ${En[e.type].writeTransactionWidth.max}`,error:!!k,helperText:k}),g(xn,{label:"Read Transaction ID Width",controlValue:R,onChangeHandler:pe=>{O(pe)},onSubmitHandler:()=>{const pe=ga({value:R,minimum:En[e.type].readTransactionWidth.min,maximum:En[e.type].readTransactionWidth.max,formControlLabelName:"Read Transaction ID Width"});V(pe),!pe&&Number(R)!==e.parameters.readTransactionWidth&&n({parameter:"readTransactionWidth",value:Number(R)})},onCancelHandler:()=>{V(""),O(b)},isConfirmCancelButtonsEnabled:Number(R)!==e.parameters.readTransactionWidth,InputPropsOverride:{type:"number",endAdornment:g(qr,{position:"end",children:"bits"})},textFieldLabel:`min: ${En[e.type].readTransactionWidth.min}, max: ${En[e.type].readTransactionWidth.max}`,error:!!H,helperText:H})]}):null,xe!==nt.SIG_NATIVE?g(Ar,{label:"Port Data Width",controlValue:e.parameters.portDataWidth,onChangeHandler:ve("portDataWidth"),options:fe,maxValue:t.dataWidth,units:"bits"}):null,xe!==nt.AXI_FOUR_STREAM&&xe!==nt.AXI_FOUR_LITE&&xe!==nt.AHB_FIVE&&xe!==nt.AHB_THREE_LITE&&xe!==nt.APB_FIVE&&xe!==nt.APB_THREE?g(Ar,{label:"Flit Write Packet Size",controlValue:e.parameters.flitPacketSize,onChangeHandler:ve("flitPacketSize"),options:En[e.type].flitPacketSize,units:"beats"}):null,xe!==nt.AXI_FOUR_STREAM&&xe!==nt.AXI_FOUR_LITE&&xe!==nt.AHB_FIVE&&xe!==nt.AHB_THREE_LITE&&xe!==nt.APB_FIVE&&xe!==nt.APB_THREE?g(Ar,{label:"Flit Read Buffer Size",controlValue:e.parameters.flitBufferSize,onChangeHandler:ve("flitBufferSize"),options:En[e.type].flitBufferSize,units:"beats"}):null,xe!==nt.SIG_NATIVE&&xe!==nt.AXI_FOUR_LITE&&xe!==nt.AXI_FOUR_STREAM&&xe!==nt.AHB_FIVE&&xe!==nt.AHB_THREE_LITE&&xe!==nt.APB_FIVE&&xe!==nt.APB_THREE?K(le,{children:[K(le,{sx:{mb:q?1:0},children:[g(xn,{label:"Outstanding Writes",controlValue:N,onChangeHandler:pe=>M(pe),onSubmitHandler:()=>{const pe=ga({value:N,minimum:En[e.type].outstandingWrite.min,maximum:En[e.type].outstandingWrite.max,formControlLabelName:"Outstanding Writes"});J(pe),!pe&&Number(N)!==e.parameters.outstandingWrite&&n({parameter:"outstandingWrite",value:Number(N)})},onCancelHandler:()=>{J(""),M(S)},isConfirmCancelButtonsEnabled:Number(N)!==e.parameters.outstandingWrite,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${En[e.type].outstandingWrite.min}, max: ${En[e.type].outstandingWrite.max}`,helperText:q,error:!!q}),g(xn,{label:"Outstanding Reads",controlValue:L,onChangeHandler:pe=>F(pe),onSubmitHandler:()=>{const pe=ga({value:L,minimum:En[e.type].outstandingRead.min,maximum:En[e.type].outstandingRead.max,formControlLabelName:"Outstanding Reads"});se(pe),!pe&&Number(L)!==e.parameters.outstandingRead&&n({parameter:"outstandingRead",value:Number(L)})},onCancelHandler:()=>{se(""),F(w)},isConfirmCancelButtonsEnabled:Number(L)!==e.parameters.outstandingRead,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${En[e.type].outstandingRead.min}, max: ${En[e.type].outstandingRead.max}`,helperText:Q,error:!!Q})]}),g(Ar,{label:pOe,controlValue:e.parameters.readReorderBufferSize,onChangeHandler:ve("readReorderBufferSize"),options:we}),g(Ar,{label:gOe,controlValue:e.parameters.writeReorderBufferSize,onChangeHandler:ve("writeReorderBufferSize"),options:we}),g(zBt,{updateHandler:n,initiatorId:e.id,projectId:a}),e.parameters?.isWriteDataBufferEnabled?g(xn,{label:"Write Data Buffer Depth",controlValue:$,onChangeHandler:pe=>{D(pe)},onSubmitHandler:()=>
709{const pe=ga({value:$,minimum:vL,maximum:bL,formControlLabelName:"Write Data Buffer Depth"});ie(pe),!pe&&Number($)!==Number(A)&&n({parameter:"writeDataBufferDepth",value:Number($)})},onCancelHandler:()=>{ie(""),D(A)},isConfirmCancelButtonsEnabled:Number($)!==Number(A),InputPropsOverride:{type:"number"},inputPropsOverride:{step:1},textFieldLabel:`min: ${vL}, max: ${bL}`,error:!!oe,helperText:oe}):null]}):null,xe===nt.AXI_FOUR_FULL?g(VBt,{updateHandler:n,initiatorId:e.id,projectId:a}):null]}):null,t.isCustomTrafficEnabled&&o===qn.TRAFFIC_PATTERN?g(Q0e,{settings:e,handleChangeNormalizedFields:r}):null,o===qn.SECURITY?K(le,{children:[g(Ke,{variant:"inherit",noWrap:!0,component:"div",pl:2,pb:1,fontWeight:600,children:"Root Policy"}),g(Ar,{label:"Security Policy",controlValue:NI[e.parameters.rootPolicy]??kr.PASSTHROUGH,onChangeHandler:ve("rootPolicy"),options:gG,fclSX:e.parameters.accessPolicy?{}:{mb:3}}),e.parameters.accessPolicy?g(Ar,{label:"Interface Security",controlValue:NI[e.parameters.accessPolicy]??zo.SECURE,onChangeHandler:ve("accessPolicy"),options:mG,fclSX:{mb:3}}):null]}):null,o===qn.TIMING?K(le,{children:[g(Hr,{label:"Use Subtopology Clock",controlValue:e.parameters.isSameClock??!0,onChangeHandler:ve("isSameClock")}),g(W8,{component:e,handleChange:r,useSubtopologyClock:e.parameters.isSameClock,parentSubtopologyComponent:i.get(e.id)})]}):null,o===qn.OTHERS?K(le,{children:[g(Ar,{label:"Traffic Regulation Policy 1",onChangeHandler:ve("trafficRegulationPolicy1"),controlValue:e.parameters?.trafficRegulationPolicy1??vc.DISABLED,options:vne}),g(Ar,{label:"Traffic Regulation Policy 2",onChangeHandler:ve("trafficRegulationPolicy2"),controlValue:e.parameters?.trafficRegulationPolicy2??vc.DISABLED,options:vne})]}):null]})},GBt=({ncnocSystem:t,target:e,handleChangeSelectOrSwitchInputValue:n,globalMinInitiatorFlitBufferSize:r,globalMinInitiatorFlitPacketSize:o})=>{const i="Address Interleaving Merger",s="Minimum Transaction Size",a="bytes",l=vd.getAllTypeNonAxiThreeOrFullByProjectId(e.projectId),c=t.dataWidth/e.parameters.portDataWidth<32,u=!l.length&&t.isAddressInterleavingEnabled&&e.parameters.isTargetAddressInterleavingEnabled&&c,d=cf.getMaxPossibleMinTransactionSize({globalMinInitiatorFlitBufferSize:r,globalMinInitiatorFlitPacketSize:o,isTargetAddressInterleavingEnabled:u,systemDataWidth:t.dataWidth,targetPortDataWidth:e.parameters.portDataWidth});return K(le,{children:[g(rn,{title:(()=>t.isAddressInterleavingEnabled?c?l.length?`Address Interleaving Merger is not supported when there are Non AXI3 or AXI4FULL present in the topology: 710${l.map(p=>`- ${p.name}`).join(` 711`)}`:"":"Address Interleaving Merger is not supported when NoC Data Width is 1024 and Port Data Width is 32":"Enable Address Interleaving in System Config")(),children:g(Hr,{label:i,onChangeHandler:n("isTargetAddressInterleavingEnabled"),controlValue:u,disabled:!t.isAddressInterleavingEnabled||!c||!!l.length})}),g(Ar,{label:s,controlValue:e.parameters.minimumTransactionSize.toString(),onChangeHandler:n("minimumTransactionSize"),options:KOe,maxValue:d,units:a})]})},WBt=(t,e)=>{const n=of.getParameterReadDataBufferDepth(),r=e.readDataBufferDepth<n;return t==="isReadDataBufferEnabled"&&r?n:e.readDataBufferDepth},jBt=({component:t,parameter:e,value:n,key:r})=>{const o=t.parameters,i=r?{...o[e],[r]:n}:n,s=WBt(e,o);return{...t,parameters:{...t.parameters,[e]:i,readDataBufferDepth:s}}},J0e={getUpdatePayload:jBt},qBt=({targetId:t,projectId:e})=>{const[n]=nS(),r="Read Data Buffer",o="isReadDataBufferEnabled",i=ea.getById(t,e),s=a=>{const l=J0e.getUpdatePayload({component:i,parameter:o,value:a});n({projectId:e,component:l})};return g(Hr,{label:r,controlValue:!!i.parameters.isReadDataBufferEnabled,onChangeHandler:a=>s(a)})},Cne=({ncnocSystem:t,settings:e,updateHandler:n,handleChangeNormalizedFields:r,activeTab:o,componentIdToTopologyMap:i,groupedComponentsByType:s})=>{const[a]=nS(),l=Nh.getAllByProjectId(e.projectId),c=Vo.getAllTypeTargetByProjectId(e.projectId),u=e.parameters?.exclusiveAccessLutSize??$se,d=e.parameters?.readDataBufferDepth??yL,[h,f]=C.useState(!1),p=String(e.parameters.writeTransactionWidth),m=String(e.parameters.readTransactionWidth),y=String(e.parameters.readTransactionWidth),v=String(e.parameters.maxOutstandingWrite),b=String(e.parameters.maxOutstandingRead),S=String(u),w=String(d),[A,_]=C.useState(p),[P,R]=C.useState(m),[O,N]=C.useState(y),[M,L]=C.useState(v),[F,$]=C.useState(b),[D,k]=C.useState(S),[U,H]=C.useState(w),[V,q]=C.useState(""),[J,Q]=C.useState(""),[se,oe]=C.useState(""),[ie,ee]=C.useState(""),[re,fe]=C.useState(""),[we,xe]=C.useState(""),[ve,Re]=C.useState(""),[pe,Be]=C.useState(""),[ke,Ne]=C.useState(""),[ot,ce]=C.useState(""),Ae=C.useMemo(()=>sm({busProtocol:e.parameters.bus.protocol,busVersion:e.parameters.bus.version,busVariant:e.parameters.bus.variant}),[e.parameters.bus]),be=C.useMemo(()=>Ae!==nt.SEC?st.filterDataWidthOptions(e):[],[e.parameters.bus]),Se=Ki.getMinimumValueByParameter({components:s.initiators,parameter:"flitBufferSize"}),Pe=Ki.getMinimumValueByParameter({components:s.initiators,parameter:"flitPacketSize"}),Ue=rt=>{N(rt);const dn=2**(Number(rt)-1),kn=st.isExclusiveAccessEnabledForAxi3OrAxi4Full(e)&&(Number(F)>dn||Number(M)>dn||Number(D)>dn)?`Max Outstanding Reads/Writes and/or LUT Size will be adjusted to 2^(${rt}-1)`:"";ce(kn)},_e=()=>{const rt=ga({value:O,minimum:En[e.type].readTransactionWidth.min,maximum:En[e.type].readTransactionWidth.max,formControl
711LabelName:"R/W Transaction ID Width"});oe(rt),ce(""),!rt&&Number(O)!==e.parameters.readTransactionWidth&&n({parameter:"readTransactionWidth",value:Number(O),componentToUpdate:{...e,parameters:{...e.parameters,writeTransactionWidth:Number(O)}}})},Oe=()=>{oe(""),ce(""),N(y)},ze=rt=>{R(rt);const Bt=2**Number(rt),dn=st.isExclusiveAccessDisabledForAxi3OrAxi4Full(e)&&Number(F)>Bt?`Max Outstanding Reads will be adjusted to 2^${rt}`:"";Be(dn)},ne=()=>{const rt=ga({value:P,minimum:En[e.type].readTransactionWidth.min,maximum:En[e.type].readTransactionWidth.max,formControlLabelName:"Read Transaction ID Width"});Q(rt),Be(""),!rt&&Number(P)!==e.parameters.readTransactionWidth&&n({parameter:"readTransactionWidth",value:Number(P)})},W=()=>{Q(""),Be(""),R(m)},j=rt=>{_(rt);const Bt=2**Number(rt),dn=st.isExclusiveAccessDisabledForAxi3OrAxi4Full(e)&&Number(M)>Bt?`Max Outstanding Writes will be adjusted to 2^${rt}`:"";Ne(dn)},ue=()=>{const rt=ga({value:A,minimum:En[e.type].writeTransactionWidth.min,maximum:En[e.type].writeTransactionWidth.max,formControlLabelName:"Write Transaction ID Width"});q(rt),Ne(""),!rt&&Number(A)!==e.parameters.writeTransactionWidth&&n({parameter:"writeTransactionWidth",value:Number(A)})},he=()=>{q(""),Ne(""),_(p)},Ce=()=>{const rt=ga({value:F,minimum:st.getMaxOutstandingReadMin(e),maximum:st.getMaxOutstandingReadMax(e),formControlLabelName:"Max Outstanding Reads"});fe(rt),!rt&&Number(F)!==e.parameters.maxOutstandingRead&&n({parameter:"maxOutstandingRead",value:Number(F)})},Ie=()=>{fe(""),$(b)},et=()=>{const rt=ga({value:M,minimum:st.getMaxOutstandingWriteMin(e),maximum:st.getMaxOutstandingWriteMax(e),formControlLabelName:"Max Outstanding Writes"});ee(rt),!rt&&Number(M)!==e.parameters.maxOutstandingWrite&&n({parameter:"maxOutstandingWrite",value:Number(M)})},je=()=>{ee(""),L(v)},it=(rt,Bt)=>dn=>{n({parameter:rt,key:Bt,value:dn}),Bt==="protocol"&&xt(dn)},xt=rt=>{const Bt=c.find(jn=>jn.parameters.toTargetId===e.id);if(!Bt)return;const dn={...e,parameters:{...e.parameters,bus:{...e.parameters.bus,protocol:rt}}},kn=Pw.getUpdatePayload({component:dn,connection:Bt,routers:l});a({projectId:e.projectId,component:kn})};return C.useEffect(()=>{f(e.parameters.isVirtualDevicesEnabled)},[e.parameters.isVirtualDevicesEnabled]),C.useEffect(()=>{q(""),Q(""),oe(""),ce(""),ee(""),fe(""),xe(""),Re(""),Be(""),Ne(""),_(p),R(m),N(y),L(v),$(b),k(S),H(w)},[e]),C.useEffect(()=>{Number(A)===e.parameters.writeTransactionWidth&&(q(""),Ne("")),Number(P)===e.parameters.readTransactionWidth&&(Q(""),Be("")),Number(O)===e.parameters.readTransactionWidth&&(oe(""),ce("")),Number(M)===e.parameters.maxOutstandingWrite&&ee(""),Number(F)===e.parameters.maxOutstandingRead&&fe(""),Number(D)===u&&xe(""),Number(U)===d&&Re("")},[A,P,O,M,F,D,U]),K(le,{children:[o===qn.PARAMETERS?K(le,{children:[g(G8,{deviceId:e.componentId}),Ae!==nt.SEC?g(Ar,{label:"Interface Protocol",controlValue:e.parameters.bus.protocol,onChangeHandler:it("bus","protocol"),options:En[e.type].bus.protocols}):g(Jo,{label:"Interface Protocol",value:"Default"}),Ae!==nt.SIG_NATIVE&&Ae!==nt.SRAM&&Ae!==nt.SEC?g(Ar,{label:"Interface Protocol Version",controlValue:e.parameters.bus.version,onChangeHandler:it("bus","version"),options:En[e.type].bus.versions[e.parameters.bus.protocol]}):null,e.parameters.bus.variant?g(Ar,{label:"Interface Variant",controlValue:e.parameters.bus.variant,onChangeHandler:it("bus","variant"),options:En[e.type].bus.variants[e.parameters.bus.protocol][e.parameters.bus.version]}):null,Ae!==nt.SEC&&Ae!==nt.SIG_NATIVE&&e.parameters.portDataWidth?g(Ar,{label:"Port Data Width",controlValue:e.parameters.portDataWidth,onChangeHandler:it("portDataWidth"),options:be,maxValue:t.dataWidth,units:"bits"}):null,st.isExclusiveAccessEnabledForAxi3OrAxi4Full(e)?g(xn,{label:"R/W Transaction ID Width",controlValue:O,onChangeHandler:rt=>Ue(rt),onSubmitHandler:_e,onCancelHandler:Oe,isConfirmCancelButtonsEnabled:Number(O)!==e.parameters.readTransactionWidth,InputPropsOverride:{type:"number",endAdornment:g(qr,{position:"end",children:"bits"})},textFieldLabel:`min: ${En[e.type].readTransactionWidth.min}, max: ${En[e.type].readTransactionWidth.max}`,error:!!se,isWarning:!!ot,helperText:se||ot}):K(le,{children:[Ae===nt.AXI_THREE||Ae===nt.AXI_FOUR_FULL||Ae===nt.AXI_FOUR_STREAM?g(xn,{label:"Read Transaction ID Width",controlValue:P,onChangeHandler:rt=>ze(rt),onSubmitHandler:ne,onCancelHandler:W,isConfirmCancelButtonsEnabled:Number(P)!==e.parameters.readTransactionWidth,InputPropsOverride:{type:"number",endAdornment:g(qr,{position:"end",children:"bits"})},textFieldLabel:`min: ${En[e.type].readTransactionWidth.min}, max: ${En[e.type].readTransactionWidth.max}`,error:!!J,isWarning:!!pe,helperText:J||pe}):null,Ae===nt.AXI_THREE||Ae===nt.AXI_FOUR_FULL||Ae===nt.AXI_FOUR_STREAM?g(xn,{label:"Write Transaction ID Width",controlValue:A,onChangeHandler:rt=>j(rt),onSubmitHandler:ue,onCancelHandler:he,isConfirmCancelButtonsEnabled:Number(A)!==e.parameters.writeTransactionWidth,InputPropsOverride:{type:"number",endAdornment:g(qr,{position:"end",children:"bits"})},textFieldLabel:`min: ${En[e.type].writeTransactionWidth.min}, max: ${En[e.type].writeTransactionWidth.max}`,error:!!V,isWarning:!!ke,helperText:V||ke}):null]}),Ae===nt.AXI_THREE||Ae===nt.AXI_FOUR_FULL?g(xn,{label:"Max Outstanding Reads",controlValue:F,onChangeHandler:rt=>$(rt),onSubmitHandler:Ce,onCancelHandler:Ie,isConfirmCancelButtonsEnabled:Number(F)!==e.parameters.maxOutstandingRead,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${st.getMaxOutstandingReadMin(e)}, max: ${st.getMaxOutstandingReadMax(e,!0)}`,error:!!re,helperText:re}):null,Ae===nt.AXI_THREE||Ae===nt.AXI_FOUR_FULL?g(xn,{label:"Max Outstanding Writes",controlValue:M,onChangeHandler:rt=>L(rt),onSubmitHandler:et,onCancelHandler:je,isConfirmCancelButtonsEnabled:Number(M)!==e.parameters.maxOutstandingWrite,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${st.getMaxOutstandingWriteMin(e)}, max: ${st.getMaxOutstandingWriteMax(e,!0)}`,error:!!ie,helperText:ie}):null,Ae===nt.SRAM?g(Ar,{label:"Read Data Delay",controlValue:e.parameters.readDataDelay,onChangeHandler:it("readDataDelay"),options:En[e.type].readDataDelay}):null,Ae===nt.SRAM?g(Ar,{label:"Channel",controlValue:e.parameters.channel||tv.SINGLE,onChangeHandler:it("channel"),options:En[e.type].channel}):null,Ae===nt.AXI_THREE||Ae===nt.AXI_FOUR_FULL?K(le,{children:[g(Hr,{label:"Out Of Order Transaction",controlValue:e.parameters?.isOutOfOrderTransactionEnabled??!1,onChangeHandler:it("isOutOfOrderTransactionEnabled")}),g(rn,{title:e.parameters?.isOutOfOrderTransactionEnabled?"":"Out of Order Transaction is required",placement:"top-end",PopperProps:{modifiers:[{name:"offset",options:{offset:[0,-20]}}]},children:g(Hr,{label:"Exclusive Access",controlValue:e.parameters.isExclusiveAccessEnabled??!1,disabled:!e.parameters?.isOutOfOrderTransactionEnabled,onChangeHandler:it("isExclusiveAccessEnabled")})}),e.parameters.isExclusiveAccessEnabled?g(xn,{label:"Exclusive Access LUT Size",controlValue:D,onChangeHandler:rt=>{k(rt)},onSubmitHandler:()=>{const rt=ga({value:D,minimum:En[e.type].exclusiveAccessLutSize.min,maximum:st.getExclusiveAccessLutSizeMax(e),formControl
711LabelName:"Exclusive Access LUT Size"});xe(rt),!rt&&Number(D)!==u&&n({parameter:"exclusiveAccessLutSize",value:Number(D)})},onCancelHandler:()=>{xe(""),k(S)},isConfirmCancelButtonsEnabled:Number(D)!==u,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${En[e.type].exclusiveAccessLutSize.min}, max: ${st.getExclusiveAccessLutSizeMax(e,!0)}`,error:!!we,helperText:we}):null]}):null,Ae!==nt.SEC&&Ae!==nt.SIG_NATIVE?g(Hr,{label:"Aligned Addresses",controlValue:e.parameters?.isAddressAlignmentEnabled??!1,onChangeHandler:it("isAddressAlignmentEnabled")}):null,Ae!==nt.SEC&&Ae!==nt.SIG_NATIVE&&Ae!==nt.SRAM?K(le,{children:[g(qBt,{targetId:e.id,projectId:e.projectId}),e.parameters?.isReadDataBufferEnabled?g(xn,{label:"Read Data Buffer Depth",controlValue:U,onChangeHandler:rt=>{H(rt)},onSubmitHandler:()=>{const rt=ga({value:U,minimum:vL,maximum:bL,formControlLabelName:"Read Data Buffer Depth"});Re(rt),!rt&&Number(U)!==d&&n({parameter:"readDataBufferDepth",value:Number(U)})},onCancelHandler:()=>{Re(""),H(w)},isConfirmCancelButtonsEnabled:Number(U)!==d,InputPropsOverride:{type:"number"},inputPropsOverride:{step:1},textFieldLabel:`min: ${vL}, max: ${bL}`,error:!!ve,helperText:ve}):null]}):null,Ae!==nt.SEC&&Ae!==nt.SIG_NATIVE?g(GBt,{ncnocSystem:t,target:e,handleChangeSelectOrSwitchInputValue:it,globalMinInitiatorFlitBufferSize:Se,globalMinInitiatorFlitPacketSize:Pe}):null]}):null,t.isCustomTrafficEnabled&&o===qn.TRAFFIC_PATTERN?g(Q0e,{settings:e,handleChangeNormalizedFields:r}):null,o===qn.TIMING&&Ae!==nt.SEC?K(le,{children:[g(Hr,{label:"Use Subtopology Clock",controlValue:e.parameters.isSameClock??!0,onChangeHandler:it("isSameClock")}),g(W8,{component:e,handleChange:r,useSubtopologyClock:e.parameters.isSameClock,parentSubtopologyComponent:i.get(e.id)})]}):null,o===qn.OTHERS&&Ae!==nt.SEC&&!e.parameters.isVirtualDevicesEnabled?g(Hr,{label:"Address Translation",disabled:h,controlValue:e.parameters.isAddressTranslationEnabled??!1,onChangeHandler:it("isAddressTranslationEnabled")}):null]})},YBt=({activeTab:t,handleActiveTabChange:e})=>K(tg,{value:t,onChange:e,variant:"standard","aria-label":"routing type tabs",centered:!0,sx:{marginBottom:2},children:[g(Sa,{value:Bb.REQUEST,label:Tt.upperFirst(Bb.REQUEST)}),g(Sa,{value:Bb.RESPONSE,label:Tt.upperFirst(Bb.RESPONSE)})]}),ebe="Incoming Port",tbe="Destination",nbe="Outgoing Port",XBt="ADD/EDIT ROUTES",rbe="Add/Edit Routes",KBt="Cancel",QBt=({sourceRouterPortOptions:t,selectedSourceRouterPort:e,setSelectedSourceRouterPort:n,sourcePortPrefix:r})=>g(v0,{children:g(rn,{title:t.length?"":"Connect a component to ingress port to enable",children:g(xa,{id:"source-port-select",value:e,onChange:o=>{const i=o.target.value;n(i)},renderValue:o=>g(le,{children:g(m0,{label:`${r}${o}`,color:"info",sx:{height:"16px"}})}),sx:{height:"32px"},disabled:!t.length,children:t.map(o=>g(mr,{value:o,children:g(le,{sx:{mx:"auto"},children:g(Il,{primary:`${r}${o}`})})},o))})})}),ZBt=({destinationDevicesOptions:t,selectedDestinationDeviceIds:e,setSelectedDestinationDeviceIds:n,selectedSourceRouterPort:r,selectedDestinationRouterPort:o})=>{const i=!Tt.isNumber(o)||!Tt.isNumber(r);return g(v0,{children:g(rn,{title:i?"Configure incoming and outgoing port to enable":"",children:g(xa,{id:"destination-devices-select",multiple:!0,value:e,onChange:s=>{const a=s.target.value;n(a)},renderValue:s=>{const a=s.length===1?t.find(l=>l.value.id===s[0])?.key:`${s.length} Devices`;return g(le,{children:g(rn,{title:a,children:g(m0,{label:a,color:"info",sx:{height:"16px"}})})})},disabled:i,sx:{height:"32px",width:"120px"},children:t.map(s=>g(mr,{value:s.value.id,children:g(rn,{title:s.key,children:K(le,{sx:{display:"flex",alignItems:"center",width:"120px"},children:[g(_u,{checked:!!e.includes(s.value.id)}),g(Il,{primary:s.key,primaryTypographyProps:{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]})})},s.key))})})})},JBt=({destinationRouterPortOptions:t,selectedDestinationRouterPort:e,setSelectedDestinationRouterPort:n,destinationPortPrefix:r})=>g(v0,{children:g(rn,{title:t.length?"":"Connect a component to egress port to enable",children:g(xa,{id:"destination-port-select",value:e,onCh
711ange:o=>{const i=o.target.value;n(i)},renderValue:o=>g(le,{children:g(m0,{label:`${r}${o}`,color:"info",sx:{height:"16px"}})}),sx:{height:"32px"},disabled:!t.length,children:t.map(o=>g(mr,{value:o,children:g(le,{sx:{mx:"auto"},children:g(Il,{primary:`${r}${o}`})})},o))})})}),e$t=({routerId:t,destinationRouterPortToRoutingEntriesMap:e,destinationComponentType:n,connectedSourceRouterPorts:r,connectedDestinationRouterPorts:o,sourcePortPrefix:i,destinationPortPrefix:s,handleUpdateRoutingTable:a,isAddEditRoutingEntryModeEnabled:l,setIsAddEditRoutingEntryModeEnabled:c})=>{const[u,d]=C.useState(!1),[h,f]=C.useState(""),[p,m]=C.useState(""),[y,v]=C.useState([]),[b,S]=C.useState([]),w=Su[wa.addIcon],A=C.useMemo(()=>{const _=Tt.isNumber(p)?e.get(p):[];return _?_.reduce((P,R)=>{const O=P.map(N=>N.value.id);return R.toPort===p&&!O.includes(R.id)&&!R.isComponentVirtual&&P.push({key:R.name,value:R}),P.sort((N,M)=>N.value.deviceId-M.value.deviceId)},[]):[]},[e,n,p]);return C.useEffect(()=>{v([])},[p]),C.useEffect(()=>{f(""),m(""),v([])},[t,n,l]),C.useEffect(()=>{const P=(e.get(Number(p))??[]).reduce((R,O)=>(O.toPort===p&&O.fromPort===h&&!O.isComponentVirtual&&R.push(O.id),R),[]);S(P),v(P)},[h,p]),K(le,{sx:{mt:2,mb:4},children:[g(le,{sx:{display:"flex",justifyContent:"center",mt:3,mb:2},children:g(Ke,{variant:"h6",children:XBt})}),g(cce,{component:To,children:K(gW,{"aria-label":"routing table",children:[g(yW,{children:K(ex,{children:[g(no,{align:"center",children:ebe}),g(no,{align:"center",children:tbe}),g(no,{align:"center",children:nbe})]})}),g(mW,{children:K(ex,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[g(no,{component:"th",scope:"row",align:"center",padding:"none",children:g(QBt,{sourceRouterPortOptions:r,sourcePortPrefix:i,selectedSourceRouterPort:h,setSelectedSourceRouterPort:f})}),g(no,{component:"th",scope:"row",align:"center",padding:"none",children:g(ZBt,{destinationDevicesOptions:A,selectedDestinationDeviceIds:y,setSelectedDestinationDeviceIds:v,selectedSourceRouterPort:h,selectedDestinationRouterPort:p})}),g(no,{component:"th",scope:"row",align:"center",padding:"none",children:g(JBt,{destinationRouterPortOptions:o,selectedDestinationRouterPort:p,setSelectedDestinationRouterPort:m,destinationPortPrefix:s})})]})})]})}),K(le,{sx:{display:"flex",justifyContent:"flex-end",my:2},children:[g(le,{sx:{mx:1},children:g(Sn,{onClick:()=>{c(!1)},variant:"outlined",color:"error",children:g("span",{children:KBt})})}),g(le,{sx:{mr:2},children:g(W2,{onClick:()=>{d(!0),a({selectedSourceRouterPort:h,selectedDestinationRouterPort:p,selectedDestinationDeviceIds:y}).finally(()=>{d(!1),c(!1)})},startIcon:g(w,{}),variant:"contained",color:"primary",loading:u,loadingPosition:"start",disabled:!(Tt.isNumber(h)&&Tt.isNumber(p)&&y.length&&!Tt.isEqual(b.sort(),y.sort())),children:g("span",{children:rbe})})})]})]})},t$t=({routerId:t,destinationRouterPortToRoutingEntriesMap:e,connectedSourceRouterPorts:n,connectedDestinationRouterPorts:r,destinationComponentType:o,handleUpdateRoutingTable:i,handleDeleteRoutingEntriesRow:s})=>{const[a,l]=C.useState(!1),c=o===Fe.TARGETS?"i":"e",u=o===Fe.TARGETS?"e":"i",d=Su[wa.addIcon];return K(le,{sx:{mx:.5},children:[g(cce,{component:To,children:K(gW,{"aria-label":"routing table",children:[g(yW,{children:K(ex,{children:[g(no,{align:"center",children:ebe}),g(no,{align:"center",children:tbe}),g(no,{align:"center",children:nbe}),g(no,{align:"center"})]})}),g(mW,{children:n.reduce((h,f)=>(r.forEach(p=>{const y=(e.get(p)?.sort((v,b)=>v.deviceId-b.deviceId)??[]).reduce((v,b)=>(b.toPort===p&&b.fromPort===f&&!v.includes(b.name)&&v.push(b.name),v),[]);y.length&&h.push(K(ex,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[g(no,{component:"th",scope:"row",align:"center",children:g(Ke,{children:`${c}${f}`})}),g(no,{align:"center",children:y.map(v=>g(Ke,{sx:{fontSize:"12px"},children:v},v))}),g(no,{align:"center",children:g(Ke,{children:`${u}${p}`})}),g(no,{align:"center",children:g(le,{sx:{display:"flex",mx:0,px:0},children:g(Vp,{fontSize:"medium",tooltipProps:{title:"Delete Row"},IconButtonProps:{disabled:!1,id:"delete-routing-entries-row",onClick:v=>{v.stopPropagation(),v.preventDefault(),s({id:t,type:"routing-entries",name:"a routing entries row",anchorElId:"delete-routing-entries-row",sourcePort:f,destinationPort:p})}},iconPropsSx:{color:"error.light","&:hover":{color:"error.dark"}},iconType:wa.deleteIcon})})})]},`${f}${p}`))}),h),[])})]})}),a?null:g(le,{sx:{display:"flex",justifyContent:"center",margin:"12px auto"},children:g(Sn,{onClick:()=>{l(!0)},startIcon:g(d,{}),variant:"outlined",sx:{width:"50%"},children:g("span",{children:rbe})})}),a?g(e$t,{routerId:t,destinationRouterPortToRoutingEntriesMap:e,destinationComponentType:o,connectedSourceRouterPorts:n,connectedDestinationRouterPorts:r,sourcePortPrefix:c,destinationPortPrefix:u,handleUpdateRoutingTable:i,isAddEditRoutingEntryM
711odeEnabled:a,setIsAddEditRoutingEntryModeEnabled:l}):null]})},n$t=({projectId:t,routerId:e,connectionIndexes:n,component:r,componentNames:o,componentDeviceIds:i})=>{const s=Yn(),[a,l]=C.useState(Bb.REQUEST),[c,u]=C.useState(Fe.TARGETS),{data:d,error:h,isLoading:f,refetch:p}=a7e({projectId:t,routerId:e},{skip:!c}),[m,{isLoading:y}]=hue(),v=M=>{const L=`${M}Ids`;return n[L][r.id]??[]},b=(M,L)=>{const F=L===Bb.REQUEST?Fe.TARGETS:Fe.INITIATORS;l(L),u(F)},S=async({selectedSourceRouterPort:M,selectedDestinationRouterPort:L,selectedDestinationDeviceIds:F})=>{const $=w({selectedSourceRouterPort:M,selectedDestinationRouterPort:L,selectedDestinationDeviceIds:F});$&&await m($)},w=({selectedSourceRouterPort:M,selectedDestinationRouterPort:L,selectedDestinationDeviceIds:F})=>{const $=F.map(D=>({forComponentId:D,to_port:L,from_port:M}));if(d){const D=d[c].reduce((k,U,H)=>(!(U.from_port===M&&U.to_port===L)&&Tt.isNumber(U.from_port)&&k[H]!==U&&k.push(U),k),[]);return{...d,[c]:[...D,...$]}}},A=M=>{s(Im({type:M.type,deleteElementId:M.id,anchorElId:M.anchorElId,name:M.name,routingTable:_({sourcePort:M.sourcePort,destinationPort:M.destinationPort})}))},_=({sourcePort:M,destinationPort:L})=>{if(d){const F=d[c].filter($=>!($.from_port===M&&$.to_port===L));return{...d,[c]:F}}},P=C.useMemo(()=>{const M=[],L=c===Fe.TARGETS?"ingress":"egress";return v(L).forEach(F=>{M.push(F)}),M.sort()},[d,c,n]),R=C.useMemo(()=>{const M=new Map,L=[],F=c===Fe.TARGETS?"egress":"ingress";return d&&v(F).forEach($=>{L.push($),M.set(c,L.sort())}),M},[d,c,n,r]),O=C.useMemo(()=>{const M=new Map,L=R.get(c)??[],F=Tt.sortBy([],["deviceId",$=>$.fromPort===void 0?-1:$.fromPort]);return d&&L.forEach($=>{d[c].forEach(D=>{$===D.to_port&&F.push({id:D.forComponentId,fromPort:D.from_port,toPort:D.to_port,name:`${o[c][D.forComponentId]}`,deviceId:i[c][D.forComponentId],isComponentVirtual:D.isComponentVirtual}),M.set($,F)})}),M},[d,c,R,o,i,r]),N=C.useMemo(()=>R.get(c)??[],[d,R,c,r]);return K(le,{sx:{borderTop:1,borderColor:"divider"},children:[g(YBt,{activeTab:a,handleActiveTabChange:b}),g(t$t,{routerId:e,destinationRouterPortToRoutingEntriesMap:O,connectedSourceRouterPorts:P,connectedDestinationRouterPorts:N,destinationComponentType:c,handleUpdateRoutingTable:S,handleDeleteRoutingEntriesRow:A})]})},r$t=({activeTab:t,setActiveTab:e})=>{const n=[{value:qn.ROUTER,label:"Router"},{value:qn.ROUTING_TABLE,label:"Routing Table"},{value:qn.PIPELINES,label:"Pipelines"}];return g(yS,{activeTab:t,tabOptions:n,handleActiveTabChange:(o,i)=>e(i)})},obe=({label:t,currentPipelineStagesCount:e,handleChangePipelineStagesCount:n,handleSubmitPipelineStagesCount:r,handleCancelPipelineStagesCount:o,pipelineStagesCountError:i,isConfirmCancelButtonsEnabled:s})=>{const a=`min: ${xC}, max: ${vG}`;return g(le,{children:g(xn,{label:`${t}`,controlValue:e,onChangeHandler:n,onSubmitHandler:r,onCancelHandler:o,isConfirmCancelButtonsEnabled:s,InputPropsOverride:{type:"number"},textFieldLabel:a,error:!!i,helperText:i})})},yM=({router:t,label:e,field:n,handleChange:r})=>{const[o,i]=C.useState(t.parameters[n].toString()),[s,a]=C.useState(""),l=()=>{const d=ga({value:o,minimum:xC,maximum:vG,formControlLabelName:`${e}`});a(d),!d&&Number(o)!==t.parameters[n]&&r({parameter:n,value:Number(o)})},c=()=>{i(t.parameters[n].toString()),a("")},u=d=>{i(d)};return C.useEffect(()=>{i(t.parameters[n].toString()),a("")},[t]),g(obe,{label:e,currentPipelineStagesCount:o,handleChangePipelineStagesCount:u,handleSubmitPipelineStagesCount:l,handleCancelPipelineStagesCount:c,isConfirmCancelButtonsEnabled:Number(o)!==t.parameters[n],pipelineStagesCountError:s})},o$t=({routerId:t,projectId:e,handleChange:n})=>{const r="Interface Module Pipeline Stages",o="Internal Arbiter Pipeline Stages",s=Nh.getById(t,e),a=vd.getAllByProjectId(e),l=ea.getAllByProjectId(e),c=Vo.getAllTypeInitiatorByProjectId(e),u=Vo.getAllTypeTargetByProjectId(e),d=Vo.getAllTypeRouterByProjectId(e),h=Vo.getAllTypeBridgeByProjectId(e),f=(P,R)=>{const O=c.find(M=>M.parameters.toRouterId===t&&M.parameters.toRouterPortIdx===P);if(!O)return!1;const N=a.find(M=>M.id===O.parameters.fromInitiatorId);return N?R?!0:N.parameters.bus.protocol!==wt.SIG_NATIVE:!1},p=(P,R)=>{const O=u.find(F=>F.parameters.fromRouterId===t&&F.parameters.fromEgressPortIdx===P);if(!O)return!1;const N=l.find(F=>F.id===O.parameters.toTargetId);if(!N)return!1;const M=N.parameters.bus.protocol,L=M===wt.SEC;return(R||M!==wt.SIG_NATIVE)&&!L},m=P=>!!d.find(O=>O.parameters.toId===t&&O.parameters.toInGressPortIdx===P),y=P=>!!d.find(O=>O.parameters.fromId===t&&O.parameters.fromEgressPortIdx===P),v=P=>!!h.find(O=>O.parameters.toRouterId===t&&O.parameters.routerPortIdx===P),b=P=>!!h.find(O=>O.parameters.fromRouterId===t&&O.parameters.routerPortIdx===P),S=Array.from({length:5},(P,R)=>({portLabel:`Ingress Port ${R}`,isVisible:f(R),field:`pipelineStagesCountPortI${R}`})),w=Array.from({length:5},(P,R)=>({portLabel:`Egress Port ${R}`,isVisible:p(R)||y(R)||b(R),field:`pipelineStagesCountPortE${R}`})),A=Array.from({length:5},(P,R)=>({portLabel:`Ingress Port ${R}`,isVisible:f(R,!0)||m(R)||v(R),field:`internalArbiterPipelineStagesI${R}`})),_=Array.from({length:5},(P,R)=>({portLabel:`Egress Port ${R}`,isVisible:p(R,!0)||y(R)||b(R),field:`internalArbiterPipelineStagesE${R}`}));return K(le,{children:[g(Ke,{variant:"inherit",noWrap:!0,component:"div",pl:2,pb:1,mt:2,fontWeight:600,children:r}),S.map(({portLabel:P,isVisible:R,field:O})=>R?g(yM,{router:s,label:P,field:O,handleChange:n},P):null),w.map(({portLabel:P,isVisible:R,field:O})=>R?g(yM,{router:s,label:P,field:O,handleChange:n},P):null),g(Ke,{variant:"inherit",noWrap:!0,component:"div",pl:2,pb:1,mt:2,fontWeight:600,children:o}),A.map(({portLabel:P,isVisible:R,field:O})=>R?g(yM,{router:s,label:P,field:O,handleChange:n},P):null),_.map(({portLabel:P,isVisible:R,field:O})=>R?g(yM,{router:s,label:P,field:O,handleChange:n},P):null)]})},i$t=({ncnocSystem:t,settings:e,updateHandler:n,handleChangeNormalizedFields:r,componentNames:o,componentDeviceIds:i,connectionIndexes:s,componentIdToTopologyMap:a})=>{const l="primaryPower",c="powerDomainName",u="groundDomainName",d="useParentPowerDomain",h="powerManagementEnabled",f="Power Voltage",p="Power Net Name",m="Ground Net Name",y="Use Subtopology Power Domain",v="Power Management",[b,S]=C.useState(""),[w,A]=C.useState(""),[_,P]=C.useState(""),[R,O]=C.useState(e.powerDomainName),[N,M]=C.useState(e.primaryPower.toString()),[L,F]=C.useState(e.groundDomainName),[$,D]=C.useState(qn.ROUTER),k=WB(Number(N),e.primaryPower),U=()=>{const V=a?.get(e.id);return e.useParentPowerDomain?V?V.useParentPowerDomain?t.primaryPower:V.primaryPower:t.primaryPower:e.primaryPower},H=({field:V,name:q})=>{const J=X0e(V),Q=Hw(J,q);V===c&&S(Q),V===u&&A(Q),!Q&&r({field:V,value:q})};return C.useEffect(()=>{S(""),A(""),P(""),O(e.powerDomainName),M(e.primaryPower.toString()),F(e.groundDomainName)},[e]),C.useEffect(()=>{R===e.powerDomainName&&S(""),L===e.groundDomainName&&A(""),N===e.primaryPower.toString()&&P("")},[R,L,N]),K(gr,{children:[K(le,{sx:{mb:1},children:[g(r$t,{activeTab:$,setActiveTab:D}),$===qn.ROUTER?K(le,{children:[g(Jo,{label:"Device ID",value:e.componentId}),g(Hr,{label:v,controlValue:e.parameters.powerManagementEnabled??!1,onChangeHandler:V=>{n({parameter:h,value:V}
711)}}),g(Hr,{label:y,controlValue:e.useParentPowerDomain,onChangeHandler:V=>{r({field:d,value:V})}}),e.useParentPowerDomain?g(Jo,{label:"Power Voltage",value:U()}):K(gr,{children:[g(xn,{label:p,controlValue:R||"",onChangeHandler:V=>{O(V)},onSubmitHandler:()=>{H({field:c,name:R})},onCancelHandler:()=>{O(e.powerDomainName),S("")},isConfirmCancelButtonsEnabled:R!==e.powerDomainName,helperText:b,error:!!b}),g(xn,{label:f,controlValue:N,onChangeHandler:V=>{M(V)},onSubmitHandler:()=>{const V=V8({value:N,minimum:dC,maximum:hC,formControlLabelName:f});P(V),!V&&!k&&r({field:l,value:Number(N)})},onCancelHandler:()=>{P(""),M(e.primaryPower.toString())},isConfirmCancelButtonsEnabled:!k,textFieldLabel:`min: ${dC}, max: ${hC}`,inputPropsOverride:{step:.01},InputPropsOverride:{type:"number"},error:!!_,helperText:_}),g(xn,{label:m,controlValue:L||"",onChangeHandler:V=>{F(V)},onSubmitHandler:()=>{H({field:u,name:L})},onCancelHandler:()=>{F(e.groundDomainName),A("")},isConfirmCancelButtonsEnabled:L!==e.groundDomainName,helperText:w,error:!!w})]})]}):null]}),$===qn.ROUTING_TABLE?g(n$t,{projectId:e.projectId,routerId:e.id,connectionIndexes:s,component:e,componentNames:o,componentDeviceIds:i}):null,$===qn.PIPELINES?g(o$t,{routerId:e.id,projectId:e.projectId,handleChange:n}):null]})};var ap=(t=>(t[t.NONE=0]="NONE",t[t.Q=1]="Q",t[t.P=2]="P",t))(ap||{});const s$t=({ncnocSystem:t,settings:e,updateHandler:n,handleChangeNormalizedFields:r})=>{const o="powerDomainName",i="groundDomainName",s="useParentPowerDomain",a="channelType",l="syncStagesCount",c="primaryPower",u="colors",d="comment",h="Use Project Power Domain",f="Q/P Channels",p="Number of Sync Stages",m="Power Net Name",y="Power Voltage",v="Ground Net Name",b="Color",S="Comment",P=[{key:ap.NONE,value:ap.NONE,displayName:"None"},{key:ap.Q,value:ap.Q,displayName:"Q-Channel"},{key:ap.P,value:ap.P,displayName:"P-Channel"}],R=C.useMemo(()=>e.parameters.syncStagesCount??2,[e.parameters.syncStagesCount]),O=String(R),[N,M]=C.useState(""),[L,F]=C.useState(""),[$,D]=C.useState(""),[k,U]=C.useState(""),[H,V]=C.useState(e.powerDomainName),[q,J]=C.useState(e.primaryPower.toString()),[Q,se]=C.useState(e.groundDomainName),[oe,ie]=C.useState(e.comment),[ee,re]=C.useState(O),[fe,we]=C.useState(e.parameters.channelType??ap.NONE),xe=WB(Number(q),e.primaryPower),ve=({field:pe,name:Be})=>{const ke=X0e(pe),Ne=Hw(ke,Be);pe===o&&M(Ne),pe===i&&F(Ne),!Ne&&r({field:pe,value:Be})},Re=pe=>Be=>{r({field:pe,value:Be})};return C.useEffect(()=>{M(""),F(""),D(""),U(""),V(e.powerDomainName),se(e.groundDomainName),J(e.primaryPower.toString()),ie(e.comment),re(O),we(e.parameters.channelType??ap.NONE)},[e]),C.useEffect(()=>{H===e.powerDomainName&&M(""),Q===e.groundDomainName&&F(""),Number(q)===e.primaryPower&&D(""),Number(ee)===R&&U("")},[H,Q,q,ee]),K(le,{children:[g(Ke,{variant:"h6",noWrap:!0,component:"div",pl:2,children:"PARAMETERS"}),K(le,{children:[g(Hr,{label:h,controlValue:e.useParentPowerDomain,onChangeHandler:Re(s)}),e.useParentPowerDomain?g(Jo,{label:"Power Voltage",value:t.primaryPower.toString()}):K(le,{children:[g(xn,{label:m,controlValue:H||"",onChangeHandler:pe=>{V(pe)},onSubmitHandler:()=>{ve({field:o,name:H})},onCancelHandler:()=>{V(e.powerDomainName),M("")},isConfirmCancelButtonsEnabled:H!==e.powerDomainName,helperText:N,error:!!N}),g(xn,{label:y,controlValue:q,onChangeHandler:pe=>{J(pe)},onSubmitHandler:()=>{const pe=V8({value:q,minimum:dC,maximum:hC,formControlLabelName:y});D(pe),!pe&&!xe&&r({field:c,value:Number(q)})},onCancelHandler:()=>{D(""),J(e.primaryPower.toString())},isConfirmCancelButtonsEnabled:!xe,textFieldLabel:`min: ${dC}, max: ${hC}`,inputPropsOverride:{step:.01},InputPropsOverride:{type:"number"},error:!!$,helperText:$}),g(xn,{label:v,controlValue:Q||"",onChangeHandler:pe=>{se(pe)},onSubmitHandler:()=>{ve({field:i,name:Q})},onCancelHandler:()=>{se(e.groundDomainName),F("")},isConfirmCancelButtonsEnabled:Q!==e.groundDomainName,helperText:L,error:!!L})]}),g(W8,{component:e,handleChange:r}),g(Ar,{label:f,controlValue:fe.toString(),onChangeHandler:pe=>{we(pe),n({parameter:a,value:pe})},options:P}),fe!==ap.NONE?g(xn,{label:p,controlValue:ee,onChangeHandler:pe=>{re(pe)},onSubmitHandler:()=>
711{const pe=ga({value:ee,minimum:0,maximum:32,formControlLabelName:p});U(pe),!pe&&Number(ee)!==R&&n({parameter:l,value:Number(ee)})},onCancelHandler:()=>{U(""),re(O)},isConfirmCancelButtonsEnabled:Number(ee)!==R,textFieldLabel:"min: 0, max: 32",InputPropsOverride:{type:"number",inputProps:{min:0,max:32}},error:!!k,helperText:k}):null,e?.parameters?.colors?.routers?g(Ar,{label:b,controlValue:e.parameters.colors.routers,onChangeHandler:pe=>{n({parameter:u,key:"routers",value:pe,changeColor:!0})},options:yue,colorPicker:!0}):null,g(xn,{label:S,controlValue:oe,onChangeHandler:pe=>{ie(pe)},onSubmitHandler:()=>{r({field:d,value:oe})},onCancelHandler:()=>{ie(e.comment)},isConfirmCancelButtonsEnabled:oe!==e.comment,fclSX:{height:"auto","& .MuiFormControl-root":{height:"inherit"}},maxRows:4,multiline:!0})]})]})},a$t=({settings:t,handleChangeNormalizedFields:e,groupedComponentsByType:n,connections:r})=>{const o=String(t.parameters.pipelineStagesCount),[i,s]=C.useState(o),[a,l]=C.useState(""),c=r.bridges.find(f=>f.parameters.toBridgeId===t.id),u=r.bridges.find(f=>f.parameters.fromBridgeId===t.id),d=n.routers.find(f=>f.id===c?.parameters?.fromRouterId),h=n.routers.find(f=>f.id===u?.parameters?.toRouterId);return C.useEffect(()=>{l(""),s(o)},[t]),C.useEffect(()=>{Number(i)===t.parameters.pipelineStagesCount&&l("")},[i]),K(le,{children:[[{label:"Incoming Link",value:d?.name??"N/A"},{label:"Outgoing Link",value:h?.name??"N/A"}].map((f,p)=>K(le,{sx:{display:"flex",px:2,py:1},children:[g(Ke,{variant:"inherit",noWrap:!0,component:"div",sx:{fontSize:"12px",mr:14},children:f.label}),g(Ke,{variant:"inherit",noWrap:!0,component:"div",sx:{fontSize:"12px"},children:f.value})]},p)),g(le,{children:g(xn,{label:"Number of Pipeline Stages",controlValue:i,onChangeHandler:f=>{s(f)},onSubmitHandler:()=>{const f=ga({value:i,minimum:xC,maximum:FY,formControlLabelName:"Number of Pipeline Stages"});l(f),!f&&Number(i)!==t.parameters.pipelineStagesCount&&e({field:"pipelineStagesCount",value:Number(i)})},onCancelHandler:()=>{l(""),s(o)},isConfirmCancelButtonsEnabled:Number(i)!==t.parameters.pipelineStagesCount,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${xC}, max: ${FY}`,error:!!a,helperText:a})})]})},Sne=({control:t,name:e,value:n,options:r,disabled:o,handleUpdateComponentReachability:i})=>g(o6e,{control:t,name:e,defaultValue:n,render:({field:s})=>g(gr,{children:o?g(Ke,{sx:{fontSize:"12px",textTransform:"capitalize"},children:s.value}):g(xa,{...s,onChange:a=>{i(a)},sx:{height:"24px",p:0,width:"90%",m:.5,fontSize:"12px"},value:n,children:r.map(a=>g(mr,{value:NI[a.key],sx:{fontSize:"12px"},children:a.value},NI[a.key]))})})}),l$t=({component:t,componentNames:e,defaultTargetId:n})=>{const r="securityPolicy",o="interfaceSecurity",i="Device Policies",s="Interface Name",a="Security Policy",l="Interface Security",{projectId:c}=Wx(),{data:u=[],isLoading:d}=e7e({projectId:c,componentId:t.id,column:t.type===Kt.componentTypes.initiators?"initiatorId":"targetId"}),[h]=cue(),[,f]=C.useState(),{control:p,getValues:m,watch:y,setValue:v}=JC({mode:"all",shouldUnregister:!0}),b=t.type===Kt.componentTypes.initiators?"targetId":"initiatorId",S=C.useMemo(()=>u.reduce((_,P)=>{const R=!!Object.values(_).find(N=>N[b]===P[b]),O=!!(P.targetId&&P.initiatorId);return R||(O&&t.type===Kt.componentTypes.initiators&&P.targetId!==n||O&&t.type===Kt.componentTypes.targets||t.type===Fe.VIRTUAL_TARGETS)&&(_[P.id]=P),_},{}),[u,t.id,n,t.type]),w=C.useMemo(()=>Object.values(S||{}),[S]),A=_=>{const[P,R]=_.target.name.split("_"),O=NI[_.target.value],N=S[P],M=R===r?O:N.policy,L=Rme(M),F=R===r?zo.SECURE:O,$=Ome(F),D={...N,policy:M,securityPolicy:L,interfaceSecurity:$,accessPolicy:F};h({projectId:c,items:[D]})};return C.useEffect(()=>{const _=y();f(_)},[S]),K(le,{children:[w.length?K(le,{children:[g(Ke,{variant:"inherit",noWrap:!0,component:"div",pl:2,pb:1,fontWeight:600,children:i}),K(le,{display:"flex",width:"100%",pb:1,children:[g(le,{flex:"30%",children:g(Ke,{variant:"inherit",sx:{fontSize:"12px",pl:2},children:s})}),g(le,{flex:"38%",children:g(Ke,{variant:"inherit",sx:{fontSize:"12px",pl:.3},children:a})}),g(le,{flex:"32%",children:g(Ke,{variant:"inherit",sx:{fontSize:"12px",pr:2},children:l})})]})]}):null,g("form",{children:w.map(_=>{const P=`${_.id}_${r}`,R=`${_.id}_${o}`,O=kme(_.securityPolicy),N=Fme(_.interfaceSecurity);return K(le,{display:"flex",width:"100%",alignItems:"center",pr:1,children:[g(le,{width:"30%",maxWidth:"30%",children:g(Ke,{sx:{fontSize:"12px",pl:2,overflow:"hidden",textOverflow:"ellipsis"},children:e[_[b]]})}),g(le,{width:"38%",children:g(Sne,{options:gG,control:p,name:P,value:O,disabled:!1,handleUpdate
711ComponentReachability:A})}),g(le,{width:"32%",children:O===kr.PROGRAMMABLE&&g(Sne,{options:mG,control:p,name:R,value:N,disabled:O!==kr.PROGRAMMABLE,handleUpdateComponentReachability:A})})]},_.id)})})]})},Ene=({settings:t,activeTab:e})=>g(gr,{children:e===qn.PARAMETERS?g(G8,{deviceId:t.componentId}):null}),j8=({settings:t,defaultTargetId:e,componentNames:n,componentDeviceIds:r,connectionIndexes:o,handleChange:i,handleChangeNormalizedFields:s,groupedComponentsByType:a,connections:l,componentIdToTopologyMap:c})=>{const{projectId:u}=Wx(),d=Wp.getByProjectId(u),[h,f]=C.useState(qn.PARAMETERS),m={routers:i$t,initiators:bne,targets:Cne,topologies:s$t,bridges:a$t,virtualTargets:Ene}[t.type],y=(_,P)=>f(P),v=t,b=v.parameters.bus?.protocol!==wt.SEC&&t.type!==Fe.VIRTUAL_TARGETS,S=d.isCustomTrafficEnabled&&t.type!==Fe.VIRTUAL_TARGETS&&!(v.parameters.bus?.protocol===wt.SEC||v.parameters.bus?.protocol===wt.SRAM),w=v.parameters.bus?.protocol!==wt.SEC,A=(t.type===Fe.TARGETS&&!v.parameters.isVirtualDevicesEnabled||t.type===Fe.INITIATORS)&&v.parameters.bus?.protocol!==wt.SEC;return(qn.TIMING===h&&!b||qn.TRAFFIC_PATTERN===h&&!S||qn.SECURITY===h&&!w||qn.OTHERS===h&&!A)&&f(qn.PARAMETERS),K(le,{children:[m===bne||m===Cne||m===Ene?K(tg,{value:h,onChange:y,variant:"scrollable",scrollButtons:!0,allowScrollButtonsMobile:!0,"aria-label":"scrollable force tabs",sx:{marginBottom:2},children:[g(Sa,{value:qn.PARAMETERS,label:"Parameters"}),b?g(Sa,{value:qn.TIMING,label:"Timing"}):null,w?g(Sa,{value:qn.SECURITY,label:"Security"}):null,A?g(Sa,{value:qn.OTHERS,label:"Others"}):null]}):null,g(m,{ncnocSystem:d,settings:t,updateHandler:i,handleChangeNormalizedFields:s,componentNames:n,componentDeviceIds:r,connectionIndexes:o,activeTab:h,groupedComponentsByType:a,connections:l,componentIdToTopologyMap:c,projectId:u}),(t.type===Fe.INITIATORS||t.type===Fe.TARGETS||t.type===Fe.VIRTUAL_TARGETS)&&v.parameters.bus?.protocol!==wt.SEC&&h===qn.SECURITY?g(l$t,{component:t,componentNames:n[t.type===Fe.TARGETS||t.type===Fe.VIRTUAL_TARGETS?Fe.INITIATORS:Fe.TARGETS],defaultTargetId:e}):null]})},c$t=({settings:t,defaultTargetId:e,componentNames:n,componentDeviceIds:r,connectionIndexes:o,handleChange:i,handleChangeNormalizedFields:s,componentIdToTopologyMap:a,groupedComponentsByType:l,connections:c})=>{const u=Su[wa.expandMoreIcon];return K(Hv,{defaultExpanded:!0,sx:{px:0,borderBottom:"1px solid #ccc","&.Mui-disabled":{border:"#ccc"}},disableGutters:!0,children:[g(zv,{expandIcon:g(u,{}),children:g(Ke,{children:t.name})}),g(Uv,{sx:{px:0},children:g(j8,{settings:t,defaultTargetId:e,componentNames:n,componentDeviceIds:r,connectionIndexes:o,handleChange:i,handleChangeNormalizedFields:s,componentIdToTopologyMap:a,groupedComponentsByType:l,connections:c})})]})},u$t=({component:t,defaultTargetId:e,componentNames:n,componentDeviceIds:r,connectionIndexes:o,handleChange:i,handleChangeNormalizedFields:s,virtualTargetName:a,deleteHandler:l,componentIdToTopologyMap:c,groupedComponentsByType:u,connections:d})=>{const h=Su[wa.expandMoreIcon],f=Su[wa.virtualTargets];return K(Hv,{sx:{px:0,borderBottom:"1px solid #ccc","&.Mui-disabled":{border:"#ccc"}},disableGutters:!0,children:[g(zv,{expandIcon:g(h,{}),children:K(le,{sx:{display:"flex",justifyContent:"space-between",width:"100%"},children:[K(le,{sx:{display:"flex",alignItems:"center"},children:[g(f,{fontSize:"small"}),g(Ke,{pl:.5,children:a})]}),g(Vp,{fontSize:"medium",tooltipProps:{title:`Delete Component ${a}`},IconButtonProps:{disabled:!1,id:`settings-delete-component-${t.id}`,onClick:p=>{p.stopPropagation(),p.preventDefault(),l({id:t.id,type:t.type,name:a,anchorElId:`settings-delete-component-${t.id}`})}},iconPropsSx:{color:"error.light","&:hover":{color:"error.dark"}},iconType:wa.deleteIcon})]})}),g(Uv,{sx:{px:0},children:g(j8,{settings:t,defaultTargetId:e,componentNames:n,componentDeviceIds:r,connectionIndexes:o,handleChange:i,handleChangeNormalizedFields:s,componentIdToTopologyMap:c,groupedComponentsByType:u,connections:d})})]})},d$t=(t,e)=>{const n=qE.getParameterWriteDataBufferDepth(),r=e.writeDataBufferDepth<n;return t==="isWriteDataBufferEnabled"&&r?n:e.writeDataBufferDepth},h$t=({component:t,parameter:e,value:n,key:r})=>{const o=t.parameters,i=r?{...o[e],[r]:n}:n,s=d$t(e,o);return{...t,parameters:{...t.parameters,[e]:i,writeDataBufferDepth:s}}},f$t=({initiator:t,x:e,y:n})=>
711({...t,coordinates:{...t.coordinates,x:e,y:n}}),p$t={getUpdatePayload:h$t,getUpdateCoordinatesPayload:f$t},g$t=({component:t,parameter:e,value:n,key:r})=>t.type===Fe.INITIATORS?p$t.getUpdatePayload({component:t,parameter:e,value:n,key:r}):t.type===Fe.TARGETS?J0e.getUpdatePayload({component:t,parameter:e,value:n,key:r}):t,m$t={getUpdatePayload:g$t},y$t=(t,e)=>{const{data:n={}}=nl(e),{data:r=[]}=GW({projectId:e});return[...Tt.flatten(Object.values(n)),...r].find(s=>s.id===t)},v$t=t=>{const{isLoading:e}=nl(t);return e},j2={getById:y$t,isGetAllProjectComponentNcnocByProjectIdLoading:v$t},b$t=({ncnocRouterId:t,projectId:e})=>{const n="Subtopology",r=vw.getAllByProjectId(e),{data:o={data:[]}}=aw(e),[i]=qW(),s=o.data.reduce((c,u)=>{const d=r.find(f=>f.id===u.relationId);if(u.data.type!==Fe.TOPOLOGIES||!d)return c;const h={key:u.id,value:u.id,displayName:d.name};return[...c,h]},[]),a=o.data.find(c=>c.relationId===t)?.parent,l=c=>{i({projectId:e,treeElementRelation:t,newParentId:c})};return a?g(le,{sx:{mt:1},children:g(Ar,{label:n,controlValue:a,onChangeHandler:c=>l(c),options:s})}):null},C$t={routers:"router",initiators:"initiator",targets:"target",topologies:"topologies",bridges:"bridge",defaultTarget:"default target"},S$t=({projectId:t,component:e,connectionIndexes:n,deleteHandler:r,defaultTargetId:o,componentNames:i,componentDeviceIds:s,componentColorsById:a,createComponentHandler:l,refetchcomponentsReachabilities:c,groupedComponents:u,connections:d,explorerTree:h,componentIdToTopologyMap:f})=>{const p=Yn(),m=C.useRef(void 0),y=j2.getById(e.id,t),v=vw.getFirstSubtopologyByProjectId(t,y.id),[b,S]=C.useState(!1),[w,A]=C.useState(null),[_,P]=C.useState(!1),[R,O]=C.useState(u),[N,M]=C.useState(y.name),[L,F]=C.useState(!1),[$,D]=C.useState(!1),[k,U]=C.useState(""),[H,V]=C.useState(!1),[q,J]=C.useState(null),{themeColors:Q}=Lc(),[se,{isLoading:oe}]=nS(),[ie]=jW(),[ee]=qW(),re=y,fe=Su[st.checkTypeAndIsSecurityDevice(re)],we=Su[Fe.TOPOLOGIES],xe=Su[wa.addIcon],ve={routers:Q.designBlue[300],initiators:Q.designOrange[300],targets:Q.designCyan[300],defaultTarget:Q.designCyan[400],topologies:"black",bridges:Q.grey[300]},Re=ze=>h.find(ne=>ne.relationId===ze),pe=ze=>h.find(ne=>ze===ne.data.id)?.id??-1,Be=()=>{V(!1),J(null)},ke=async()=>{const ze=pe(y.id),ne=h.filter(W=>W.parent===ze&&W.data.type===Fe.ROUTERS);for(const W of ne)await ee({projectId:t,treeElementRelation:W.data.id,newParentId:pe(v.id)});await ie({componentId:y.id,type:Fe.TOPOLOGIES,projectId:t})},Ne=({parameter:ze,key:ne="",value:W,changeColor:j=!1,componentToUpdate:ue})=>{let he=Eo.deepCopy({...ue??y,coordinates:e.coordinates});if(j)he.parameters[ze][ne]=W;else if(ne&&he.parameters[ze][ne]!==W)he.parameters[ze][ne]=W;else if(he.parameters[ze]!==W)he.parameters[ze]=W;else return;switch(ze){case"rootPolicy":he=st.checkAccessPolicies(he,ze,W);break;case"bus":he=st.checkBusValues(he,ne,W),he=st.resetTransactionWidthMaxOutstandingAndLutSizeToDefault(he);break;case"readTransactionWidth":case"writeTransactionWidth":case"exclusiveAccessLutSize":he=st.getTargetWithAdjustedMaxOutstandingValue(he,ze);break;case"isOutOfOrderTransactionEnabled":W||(he.parameters.isExclusiveAccessEnabled=!1);break;case"isExclusiveAccessEnabled":he=st.resetTransactionWidthMaxOutstandingAndLutSizeToDefault(he);break}const Ce=R.virtualTargets.map(et=>et.id===he.id?he:et),Ie=m$t.getUpdatePayload({component:he,parameter:ze,value:W,key:ne});he.type===Fe.VIRTUAL_TARGETS&&O({...R,virtualTargets:Ce}),(he.name||he.type===Fe.VIRTUAL_TARGETS)&&se({projectId:t,component:Ie})},ot=y.name,ce=y.type!==Fe.TOPOLOGIES&&y.type!==Fe.ROUTERS?"Interface Name":"Name",Ae=({name:ze=""})=>{const ne=Eo.deepCopy({...y,coordinates:e.coordinates});if(ne.name=ze||"",D(!1),!xh.componentNameIsValid(ze)){A(ze.length<OC?to.minCharLengthNotReach("Component Name"):to.invalidName("Component Name"));return}if(xh.isComponentNameAlreadyUsed({name:ze,groupedProjectComponents:u,component:y})){A(to.nameAlreadyUsed("Component Name"));return}w&&A(null),ze&&se({projectId:t,component:ne})},be=({field:ze,value:ne})=>{let W=Eo.deepCopy({...y,coordinates:e.coordinates});switch(ze){case"accessType":case"burstLength":case"requestSpeed":case"responseSpeed":W=UBt(W,ze,ne);break;case"isLocalSRAMEnabled":case"addressWidth":case"baseAddress":case"limitAddress":case"readDataDelay":case"addressTranslation":W=yG.getComponentWithUpdatedLocalSRAM(W,ze,ne);break;case"pipelineStagesCount":case"isVirtualDevicesEnabled":W.parameters[ze]=ne;break;default:W[ze]=ne}W.name&&se({projectId:t,component:W})},Se=ze=>{const ne=ze.relatedTarget;if(ne&&ne.id==="cancel"){setTimeout(()=>{D(!1)},100),_e();return}Ae({name:N}),D(!1)},Pe=ze=>{ze.stopPropagation(),ze.key==="Enter"&&m.current&&(ze.preventDefault(),m.current.blur())},Ue=()=>{m.current&&m.current.blur()},_e=()=>{M(y.name),A("")},Oe=ze=>{R.virtualTargets.length?p(DI({anchorElId:MH,warningText:cNe})):be({field:"isVirtualDevicesEnabled",value:ze}),re.parameters.isVirtualDevicesEnabled||p(DI({anchorElId:MH,warningText:uNe}))};return C.useEffect(()=>{_e()},[e]),C.useEffect(()=>{e.name&&A(null)},[e]),C.useEffect(()=>{const ze=u.virtualTargets.filter(ne=>ne.parameters.parentTargetId===y.id);O({...u,virtualTargets:ze})},[u,y]),C.useEffect(()=>{S(re.parameters.isAddressTranslationEnabled)},[re.parameters.isAddressTranslationEnabled]),C.useEffect(()=>{M(y.name)},[y.name]),C.useEffect(()=>{y.name===N&&A("")},[N]),C.useEffect(()=>{F(Ki.getNumberOfNonDefaultTargetsInProject(u)>=ys[Fe.TARGETS])},[u,u.virtualTargets,u.targets]),K(le,{children:[g(Bm,{folderIcon:y.type!==Fe.TOPOLOGIES?g(we,{sx:{color:a[y.id]||Q.grey[300]}}):null,icon:g(fe,{sx:{color:y.type===Fe.ROUTERS||y.type===Fe.TOPOLOGIES?a[y.id]:ve[y.type]},fill:ve[st.checkTypeAndIsSecurityDevice(re)]}),iconTooltipTitle:"Close Settings",title:K(le,{children:[`Edit ${C$t[st.checkTypeAndIsSecurityDevice(re)]} [ `,g(Ke,{variant:"h6",noWrap:!0,component:"span",sx:{textTransform:"uppercase",color:tt,fontSize:"12px"},children:ot})," ]",Tt.isEqual(y,e)?"":"*"]})}),g(le,{sx:{background:tt},children:g(Mt,{direction:"row",justifyContent:"flex-end",pr:1.4,children:g(Vp,{fontSize:"medium",tooltipProps:{title:y.type===Fe.TOPOLOGIES&&u[y.type].length===1?"Cannot delete last Topology":`Delete Component ${ot}`},IconButtonProps:{disabled:y.type===Fe.TOPOLOGIES&&u[y.type].length===1,id:`settings-delete-component-${y.id}`,onClick:ze=>{ze.stopPropagation(),ze.preventDefault(),y.type===Fe.TOPOLOGIES&&(J(ze.currentTarget),V(!0),U(y.name)),y.type!==Fe.TOPOLOGIES&&r({id:y.id,type:y.type,name:ot,anchorElId:`settings-delete-component-${y.id}`})}},iconPropsSx:{color:"error.light","&:hover":{color:"error.dark"}},iconType:wa.deleteIcon})})}),y.type===Fe.ROUTERS?g(b$t,{ncnocRouterId:y.id,projectId:t}):null,K(le,{sx:{px:2,mb:1,position:"relative"},children:[g(lo,{inputRef:m,id:"outlined-controlled",label:ce,fullWidth:!0,error:!y.name||!!w,helperText:g(le,{sx:{position:"absolute",zIndex:2,backgroundColor:"darkRed",px:"2px",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"70%"},component:"span",children:g(Ke,{sx:{fontSize:"12px",color:"white"},component:"span",children:y.name?w||"":"Name is required."})}),value:N,onKeyDown:Pe,onBlur:Se,onChange:ze=>{D(ze.target.value!==y.name),M(ze.target.value)},inputProps:{spellCheck:"false"},FormHelperTextProps:{sx:{fontSize:"12px"}},InputLabelProps:{sx:{fontSize:"16px"}}}),$&&g(z8,{handleConfirmAction:Ue,handleCancelAction:_e})]}),g(le,{sx:{mb:1},children:g(yi,{})}),y.type===Fe.TARGETS&&re.parameters.bus.protocol!==wt.SEC?g(le,{id:MH,children:g(Hr,{label:"Enable Virtual Devices",controlValue:re.parameters.isVirtualDevicesEnabled??!1,disabled:b,onChangeHandler:ze=>Oe(ze)})}):null,re.parameters.isVirtualDevicesEnabled?K(le,{sx:{px:0,margin:"8px auto",width:"99%"},children:[g(c$t,{settings:re,defaultTargetId:o,componentNames:i,componentDeviceIds:s,connectionIndexes:n,handleChange:Ne,handleChangeNormalizedFields:be,componentIdToTopologyMap:f,groupedComponentsByType:R,connections:d}),R.virtualTargets.map(ze=>{const ne=y.name+ze.name;return g(u$t,{component:ze,defaultTargetId:o,componentNames:i,componentDeviceIds:s,connectionIndexes:n,handleChange:Ne,handleChangeNormalizedFields:be,virtualTargetName:ne,deleteHandler:r,componentIdToTopologyMap:f,groupedComponentsByType:R,connections:d},ze.id)}),g(le,{sx:{display:"flex",justifyContent:"center",mt:"12px",mb:"20px",mx:"auto"},children:g(rn,{title:L?"Max 31 Targets":"",children:g(W2,{disabled:L,onClick:()=>{P(!0),l({componentType:Fe.VIRTUAL_TARGETS,newParentId:Re(y.id)?.id,virtualDeviceParentComponent:y}).finally(()=>{c(),P(!1)})},startIcon:g(xe,{}),loading:_,loadingPosition:"start",variant:"outlined",sx:{width:"100%"},children:g("span",{children:"Add Virtual Device"})})})})]}):g(j8,{settings:y,defaultTargetId:o,componentNames:i,componentDeviceIds:s,connectionIndexes:n,handleChange:Ne,handleChangeNormalizedFields:be,groupedComponentsByType:R,connections:d,componentIdToTopologyMap:f}),q?g(XR,{open:H&&!!q,anchorEl:q,onCloseHandler:Be,onConfirmHandler:()=>{Be(),ke()}
711,dialogTitle:`This action will move all components in ${k} to ${v?.name}. Please confirm if you would like to delete.`,confirmLabel:"Delete"}):null]})},E$t=({isRightPanelOpen:t,projectId:e,selectedNcnocComponent:n,memoizedInitiatorDeviceIds:r,memoizedTargetDeviceIds:o,memoizedRouterDeviceIds:i,connectionIndexes:s,deleteComponentHandler:a,memoizedSubtopologyChildColors:l,memoizedSubtopologySettingsColors:c,memoizedInitiatorNames:u,memoizedTargetNames:d,memoizedRouterNames:h,memoizedSubtopologyNames:f,createComponentHandler:p,refetchcomponentsReachabilities:m,fetchedComponents:y,connections:v,explorerTree:b,componentIdToTopologyMap:S})=>{const w=y.targets.find(A=>A.componentId===0&&A.parameters.bus.protocol===wt.SEC)?.id??"";return g(le,{sx:{backgroundColor:"#FAFAFA",boxShadow:"0 3px 10px rgb(0 0 0 / 0.2);",width:ei.getRightPanelWidth(t),height:"100%",overflowY:"auto",overflowX:"hidden",zIndex:2,right:0,position:"absolute"},children:n?g(S$t,{projectId:e,component:n,componentDeviceIds:{initiators:r,targets:o,routers:i},connectionIndexes:s,defaultTargetId:w,deleteHandler:a,componentColorsById:{...l,...c},componentNames:{initiators:u,targets:d,routers:h,topologies:f},createComponentHandler:p,refetchcomponentsReachabilities:m,groupedComponents:y,connections:v,explorerTree:b,componentIdToTopologyMap:S}):g(HBt,{projectId:e})})},q8=()=>{const t="Collapse right panel",e="Expand right panel",n=Yn(),r=bt(gd),o=i=>{i.currentTarget.blur(),n(pd(!r))};return g(le,{sx:{top:"50%",position:"absolute",right:r?Rs.rightPanelWidth-5:0,zIndex:3},children:g(rn,{title:r?t:e,placement:"left",children:g(Di,{onClick:i=>o(i),sx:{width:0,borderRadius:"3px",backgroundColor:KI,boxShadow:"-4px 0 6px -2px rgba(0,0,0,0.2)","&:hover":{backgroundColor:KI}},size:"small",children:r?g(PF,{sx:{color:tt,fontSize:15}}):g(Ice,{sx:{color:tt,fontSize:15}})})})})},x$t=t=>{const e=Wp.getByProjectId(t);return!Wp.getProjectNcnocSystemByProjectIdIsLoading(t)&&!!e},w$t={getProjectNcnocSystemByProjectId:x$t},A$t=t=>{const{data:e=[]}=aw(t);return e},T$t={getByProjectId:A$t},ibe="/assets/addBox-5b34fae1.svg",_$t=({projectId:t,graphRef:e})=>{const n="ingressRouterPort",r="egressRouterPort",i=Nh.getAllByProjectIdX6(t),s=vw.getAllByProjectId(t),a=T$t.getByProjectId(t),l=Vo.getAllTypeInitiatorByProjectId(t),c=Vo.getAllTypeTargetByProjectId(t),u=Vo.getAllTypeRouterByProjectId(t),d=Vo.getAllTypeBridgeByProjectId(t),h=vd.getAllByProjectIdX6(t),f=ea.getAllByProjectIdX6(t),p=()=>{Gr.registerNode(Rn.router,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"},{tagName:"rect",selector:"labelBackground"},{tagName:"text",selector:"label"}],inherit:"rect",width:Yu.width,height:Yu.height,zIndex:2,attrs:{body:{strokeWidth:3,fill:"#fff",cursor:"pointer",rx:20,ry:20},label:{cursor:"pointer",textWrap:{width:"65%",height:"95%",ellipsis:!0,breakWord:!0}},labelBackground:{fill:"#fff",stroke:"#fff",rx:4,ry:4,refX:-12.5,refY:.3},highlight:{stroke:Kv,strokeWidth:5,fill:"none",visibility:"hidden",pointerEvents:"none",rx:20,ry:20,width:Yu.width,height:Yu.height}},ports:{groups:{[n]:y(),[r]:y()}}},!0)},m=L=>{Gr.registerNode(L,{inherit:"rect",zIndex:2,attrs:{body:{stroke:"#8f8f8f",strokeWidth:1,fill:"#fff"},image:{"xlink:href":ibe,width:yl.size,height:yl.size,cursor:"pointer"},highlight:{stroke:Kv,strokeWidth:3,fill:"none",visibility:"hidden",pointerEvents:"none",rx:1,ry:1,refX:5,refY:5,width:yl.size-10,height:yl.size-10}},markup:[{tagName:"image",selector:"image"},{tagName:"rect",selector:"highlight"}]},!0)},y=()=>({markup:[{tagName:"circle",selector:"dot",magnet:!0}],position:"absolute",attrs:{dot:{stroke:"#8f8f8f",strokeWidth:1,fill:"#fff",r:7,magnet:!0}}}),v=L=>{const F=a.data.find(D=>D.data.id===L);return F?a.data.find(D=>D.id===F.parent)?.data.id??s[0].id:s[0].id},b=L=>{const F="#1257fd",$=a.data.find(U=>U.data.id===L);if(!$)return F;const D=a.data.find(U=>U.id===$.parent);return s.find(U=>U.id===D?.data.id)?.parameters.colors.routers??F},S=()=>{const L=["10%","30%","50%","70%","90%"];return[...L.map((F,$)=>({id:`ingress-${$}`,group:n,args:{x:0,y:F}})),...L.map((F,$)=>({id:`egress-${$}`,group:r,args:{x:"100%",y:F}}))]},w=(L,F)=>{const $=Yu.height/10;return L+$*(F*2+1)-yl.size/2},A=(L,F)=>l.some($=>$.parameters.toRouterId===L&&$.parameters.toRouterPortIdx===F),_=(L,F)=>c.some($=>$.parameters.fromRouterId===L&&$.parameters.fromEgressPortIdx===F),P=(L,F)=>u.some($=>$.parameters.fromId===L&&$.parameters.fromEgressPortIdx===F),R=(L,F)=>u.some($=>$.parameters.toId===L&&$.parameters.toInGressPortIdx===F),O=(L,F)=>d.some($=>$.parameters.fromRouterId===L&&$.parameters.routerPortIdx===F),N=(L,F)=>d.some($=>$.parameters.toRouterId===L&&$.parameters.routerPortIdx===F),M=L=>
711{i.forEach(F=>{L.getCellById(F.id)||L.addNode({id:F.id,shape:Rn.router,x:F.coordinates.x,y:F.coordinates.y,label:F.name,attrs:{body:{stroke:b(F.id)}},ports:{items:S()}});const $=L.getCellById(F.id);$&&Array.from({length:5}).forEach((D,k)=>{const H={y:w(F.coordinates.y,k),width:yl.size,height:yl.size},V=`${F.id}-add-initiator-${k}`,q=`${F.id}-add-target-${k}`,J=L.getCellById(V),Q=L.getCellById(q),se=A(F.id,k),oe=_(F.id,k),ie=P(F.id,k),ee=R(F.id,k),re=O(F.id,k),fe=N(F.id,k);if((se||ee||fe)&&J?.remove(),(oe||ie||re)&&Q?.remove(),!se&&!J&&!ee&&!fe){const we=L.addNode({...H,id:V,shape:Rn.addInitiatorButton,x:F.coordinates.x-yl.size-yl.offset,data:{routerId:F.id,routerPortIndex:k,subtopologyId:v(F.id),portDirection:"ingress"}});$.addChild(we)}if(!oe&&!Q&&!ie&&!re){const we=L.addNode({...H,id:q,shape:Rn.addTargetButton,x:F.coordinates.x+Yu.width+yl.offset,data:{routerId:F.id,routerPortIndex:k,subtopologyId:v(F.id),portDirection:"egress"}});$.addChild(we)}})})};return C.useEffect(()=>{p(),m(Rn.addInitiatorButton),m(Rn.addTargetButton)},[]),C.useEffect(()=>{M(e)},[e,i,s,a,h,l,f,c,u,d]),null},sbe="/assets/loadingSpinner-3e3f170f.svg",Y8=({open:t,anchorPosition:e,onCloseHandler:n,menuItems:r})=>g(Es,{open:t,anchorPosition:e,anchorReference:"anchorPosition",onClose:()=>n(),sx:{"& .disabled":{pointer:"not-allowed",opacity:.35,"&:hover":{backgroundColor:"transparent"}}},children:r.map(o=>g(rn,{title:o.tooltipMessage??"",children:g(mr,{onClick:()=>o.handleClickEvent(o),disabled:o.disabled,children:o.label},o.label)},o.label))}),I$t=({bridge:t,x:e,y:n})=>({...t,coordinates:{...t.coordinates,x:e,y:n}}),P$t={getUpdateCoordinatesPayload:I$t};var Iz=(t=>(t.INCOMING="INCOMING",t.OUTGOING="OUTGOING",t))(Iz||{});const R$t=({projectId:t,graphRef:e})=>{const o="Create Target",i="Create Default Target",s="The maximum of 127 targets has been reached",a=Yn(),l=bt(gd),c=C.useRef(!1),u=C.useRef(!1),d=C.useRef(!1),h=C.useRef({}),f=C.useRef({}),p=C.useRef(!1),m=C.useRef({}),y=C.useRef({}),[v]=fdt(),[b]=qut(),[S]=Nbt(),[w]=Q9e(),[A]=idt(),_=Nh.getAllByProjectIdX6(t),P=Vo.getAllTypeInitiatorByProjectId(t),R=Vo.getAllTypeTargetByProjectId(t),O=Vo.getAllTypeRouterByProjectId(t),N=Vo.getAllTypeBridgeByProjectId(t),M=ea.getDefaultTargetByProjectIdX6(t),L=ea.getAllTypeNonDefaultByProjectIdX6(t),F=bw.getAllByProjectIdX6(t),{data:$=[],refetch:D}=Pfe({projectId:t}),{data:k=[],refetch:U}=xfe({projectId:t}),[H,V]=C.useState(!1),[q,J]=C.useState({top:0,left:0}),[Q,se]=C.useState(null),oe=({routerNode:he,graph:Ce})=>{const Ie=he.getPosition(),et={left:Ie.x-yl.size-yl.offset,top:Ie.y,right:Ie.x+Yu.width+yl.offset+yl.size,bottom:Ie.y+Yu.height};return re({routerNode:he,graph:Ce,connections:[...P,...R]}).forEach(je=>{fe(et,je)}),{x:et.left,y:et.top,width:et.right-et.left,height:et.bottom-et.top}},ie=he=>{switch(he.type){case pi.INITIATORS:return he.parameters.toRouterId;case pi.TARGETS:default:return he.parameters.fromRouterId}},ee=he=>{switch(he.type){case pi.INITIATORS:return he.parameters.fromInitiatorId;case pi.TARGETS:default:return he.parameters.toTargetId}},re=({routerNode:he,graph:Ce,connections:Ie})=>Ie.reduce((et,je)=>{if(ie(je)!==he.id)return et;const xt=ee(je),rt=Ce.getCellById(xt);return rt&&et.push(rt),et},[]),fe=(he,Ce)=>{const Ie=Ce.getPosition();he.top=Math.min(he.top,Ie.y),Ce.shape===Rn.initiator&&(he.left=Math.min(he.left,Ie.x-ou.labelWidth-ou.labelMargin),he.right=Math.max(he.right,Ie.x+ou.width),he.bottom=Math.max(he.bottom,Ie.y+ou.height)),Ce.shape===Rn.target&&(he.left=Math.min(he.left,Ie.x),he.right=Math.max(he.right,Ie.x+Yd.width+Yd.labelWidth+Yd.labelMargin),he.bottom=Math.max(he.bottom,Ie.y+Yd.height)),Ce.shape===Rn.defaultTarget&&(he.left=Math.min(he.left,Ie.x),he.right=Math.max(he.right,Ie.x+up.width),he.bottom=Math.max(he.bottom,Ie.y+up.height))},we=he=>{const Ce=he.getPosition();return he.shape===Rn.initiator?{x:Ce.x-ou.labelWidth-ou.labelMargin,y:Ce.y,width:ou.width+ou.labelWidth+ou.labelMargin,height:ou.height}:he.shape===Rn.target?{x:Ce.x,y:Ce.y,width:Yd.width+Yd.labelWidth+Yd.labelMargin,height:Yd.height}:he.getBBox()},xe=({currentNode:he,graph:Ce})=>{const Ie=he.getBBox();return Ce.getNodes().some(et=>{if(et.id===he.id)return!1;const je=we(et),it=Ie.x<je.x+je.width,xt=Ie.x+Ie.width>je.x,rt=Ie.y<je.y+je.height,Bt=Ie.y+Ie.height>je.y;return it&&xt&&rt&&Bt})},ve=({currentNode:he,graph:Ce})=>{const Ie=oe({routerNode:he,graph:Ce});return Ce.getNodes().some(et=>{if(et.id===he.id||et.shape!==Rn.router&&et.shape!==Rn.bridge)return!1;const je=oe({routerNode:et,graph:Ce}),it=Ie.x<je.x+je.width,xt=Ie.x+Ie.width>je.x,rt=Ie.y<je.y+je.height,Bt=Ie.y+Ie.height>je.y;return it&&xt&&rt&&Bt})},Re=({graph:he,currentPosition:Ce})=>{const Ie=he.getGridSize()*fS;return Math.round(Ce/Ie)*Ie},pe=async({nodeId:he,finalPosition:Ce})=>{const Ie=F.find(je=>je.id===he),et=P$t.getUpdateCoordinatesPayload({bridge:Ie,x:Ce.x,y:Ce.y});await A({requestBody:et})},Be=async({nodeId:he,finalPosition:Ce})=>{const Ie=_.find(je=>
711je.id===he),et=Pw.getUpdateCoordinatesPayload({router:Ie,x:Ce.x,y:Ce.y});await w({requestBody:et})},ke=he=>{a(d0(he)),l||a(pd(!0))},Ne=async(he,Ce)=>{const Ie=m.current[he.id],et=he.getPosition(),je=Re({graph:Ce,currentPosition:et.x}),it=Re({graph:Ce,currentPosition:et.y}),xt=je-et.x,rt=it-et.y;he.translate(xt,rt);const Bt=he.getPosition(),dn=xe({currentNode:he,graph:Ce});dn&&he.position(Ie.x,Ie.y);const kn=dn?Ie:Bt;(Ie.x!==kn.x||Ie.y!==kn.y)&&await pe({nodeId:he.id,finalPosition:kn}),p.current=!1,delete y.current[he.id]},ot=async(he,Ce)=>{const Ie=h.current[he.id],et=he.getPosition(),je=Re({graph:Ce,currentPosition:et.x}),it=Re({graph:Ce,currentPosition:et.y}),xt=je-et.x,rt=it-et.y;he.translate(xt,rt),Se({routerNode:he,deltaX:xt,deltaY:rt,graph:Ce,connections:[...P,...R]});const Bt=he.getPosition(),dn=ve({currentNode:he,graph:Ce});if(dn){const Cr=Ie.x-Bt.x,Xn=Ie.y-Bt.y;he.translate(Cr,Xn),Se({routerNode:he,deltaX:Cr,deltaY:Xn,graph:Ce,connections:[...P,...R]})}const kn=dn?Ie:he.getPosition();(Ie.x!==kn.x||Ie.y!==kn.y)&&await Be({nodeId:he.id,finalPosition:kn}),d.current=!1,delete f.current[he.id]},ce=he=>{he.attr("image/visibility","hidden"),he.attr("body/pointer-events","none"),he.attr("highlight/visibility","none"),he.attr({image:{"xlink:href":sbe,visibility:"visible"},body:{"pointer-events":"none"}})},Ae=async({node:he,isCreatedComponentTarget:Ce,isSecurityDevice:Ie})=>{const et=Ce?u:c;if(!et.current){et.current=!0,ce(he);try{const{routerId:je,routerPortIndex:it,subtopologyId:xt}=he.getData(),rt={projectId:t,routerId:je,routerPortIndex:it,subtopologyId:xt,isSecurityDevice:Ie};if(Ce?await b({requestBody:rt}):await v({requestBody:rt})){const{data:dn}=Ce?await U():await D(),kn=dn,jn=Tt.sortBy(kn,"createdAt"),Cr=jn[jn.length-1];Cr&&ke(Cr.id)}}finally{et.current=!1}}},be=[{label:o,handleClickEvent:()=>{V(!1),Q&&Ae({node:Q,isCreatedComponentTarget:!0})},disabled:L.length>=127,tooltipMessage:L.length>=127?s:""},{label:i,handleClickEvent:()=>{V(!1),Q&&Ae({node:Q,isCreatedComponentTarget:!0,isSecurityDevice:!0})}}],Se=({routerNode:he,deltaX:Ce,deltaY:Ie,graph:et,connections:je})=>{je.forEach(it=>{if(ie(it)!==he.id)return;const rt=ee(it),Bt=et.getCellById(rt);Bt&&Bt.translate(Ce,Ie)},[])},Pe=he=>{he.on("node:click",async({node:Ce,e:Ie})=>{if((Ce.shape===Rn.router||Ce.shape===Rn.initiator||Ce.shape===Rn.target||Ce.shape===Rn.defaultTarget||Ce.shape===Rn.bridge)&&ke(Ce.id),Ce.shape===Rn.addInitiatorButton){if($.length>=128)return;await Ae({node:Ce})}if(Ce.shape===Rn.addTargetButton){const et=L.length>=127,je=M!==null,{routerPortIndex:it,portDirection:xt}=Ce.getData(),Bt=it===0&&xt==="egress"&&!je;if(et&&!Bt)return;if(Bt){se(Ce),J({top:Ie.clientY,left:Ie.clientX}),V(!0);return}await Ae({node:Ce,isCreatedComponentTarget:!0})}})},Ue=he=>{he.on("node:mouseover",({node:Ce})=>{Ce.attr("highlight/visibility","visible")})},_e=he=>{he.on("node:mouseout",({node:Ce})=>{Ce.attr("highlight/visibility","hidden")})},Oe=he=>{he.on("node:mousedown",({node:Ce})=>{Ce.shape===Rn.router&&(d.current=!1,h.current[Ce.id]=Ce.getPosition(),f.current[Ce.id]=Ce.getPosition()),Ce.shape===Rn.bridge&&(p.current=!1,m.current[Ce.id]=Ce.getPosition(),y.current[Ce.id]=Ce.getPosition())})},ze=he=>{he.on("node:moving",({node:Ce})=>{if(Ce.shape===Rn.router){d.current=!0;const Ie=f.current[Ce.id];if(!Ie)return;const et=Ce.getPosition(),je=et.x-Ie.x,it=et.y-Ie.y;Se({routerNode:Ce,deltaX:je,deltaY:it,graph:he,connections:[...P,...R]}),f.current[Ce.id]=et,j(e)}Ce.shape===Rn.bridge&&(p.current=!0,y.current[Ce.id]=Ce.getPosition(),j(e))})},ne=he=>{he.on("node:mouseup",async({node:Ce})=>{if(Ce.shape===Rn.router&&d.current){ot(Ce,he);return}Ce.shape===Rn.bridge&&p.current&&Ne(Ce,he)})},W=he=>{he.on("edge:connected",async({edge:Ce})=>{const Ie=Ce.getSourceCell(),et=Ce.getTargetCell();if(!Ie||!et){he.removeEdge(Ce);return}if(!Ie.isNode()||!et.isNode()){he.removeEdge(Ce);return}const je=Ie,it=et,xt=Ce.getSourcePortId(),rt=Ce.getTargetPortId();if(!xt||!rt){he.removeEdge(Ce);return}if(je.shape===Rn.router&&it.shape===Rn.router){const Bt=Number(xt.replace("egress-","")),dn=Number(rt.replace("ingress-",""));if(!Number.isInteger(Bt)||!Number.isInteger(dn)){he.removeEdge(Ce);return}await S({requestBody:{type:Fe.ROUTERS,fromId:je.id,toId:it.id,projectId:t,fromRouterPort:Bt,toRouterPort:dn}});return}if(je.shape===Rn.router&&it.shape===Rn.bridge){const Bt=Number(xt.replace("egress-",""));if(!Number.isInteger(Bt)||rt!=="ingress"){he.removeEdge(Ce);return}await S({requestBody:{type:Fe.BRIDGES,fromId:je.id,toId:it.id,projectId:t,fromRouterPort:Bt,bridgeConnectionType:Iz.INCOMING}});return}if(je.shape===Rn.bridge&&it.shape===Rn.router){const Bt=Number(rt.replace("ingress-",""));if(!Number.isInteger(Bt)||xt!=="egress"){he.removeEdge(Ce);return}await S({requestBody:{type:Fe.BRIDGES,fromId:je.id,toId:it.id,projectId:t,toRouterPort:Bt,bridgeConnectionType:Iz.OUTGOING}});return}he.removeEdge(Ce)})},j=he=>
711{[...O,...N].forEach(Ce=>{const Ie=he.getCellById(Ce.id);if(!Ie?.isEdge())return;he.findViewByCell(Ie).update()})},ue=he=>{he.on("node:added",({node:Ce})=>{(Ce.shape===Rn.bridge||Ce.shape===Rn.router)&&j(he)})};return C.useEffect(()=>(ze(e),()=>{e.off("node:moving")}),[e,_,$,P,k,R,M,F,O]),C.useEffect(()=>(ne(e),()=>{e.off("node:mouseup")}),[e,_,$,P,k,R,M,F]),C.useEffect(()=>(Pe(e),()=>{e.off("node:click")}),[e,$,k,F]),C.useEffect(()=>(W(e),()=>{e.off("edge:connected")}),[e]),C.useEffect(()=>{Ue(e),_e(e),Oe(e),ue(e)},[e]),g(gr,{children:g(Y8,{open:H,anchorPosition:q,onCloseHandler:()=>{V(!1),se(null)},menuItems:be})})},O$t=({projectId:t,graphRef:e})=>{const n="0,0 40,0 58,10 70,18 58,26 40,36 0,36",r="initiatorPort",o=vd.getAllByProjectIdX6(t),i=Vo.getAllTypeInitiatorByProjectId(t),s=Nh.getAllByProjectIdX6(t),a=()=>{Gr.registerNode(Rn.initiator,{width:ou.width,height:ou.height,markup:[{tagName:"polygon",selector:"body"},{tagName:"text",selector:"label"},{tagName:"polygon",selector:"highlight"}],attrs:{body:{refPoints:n,fill:"#FFFFFF",stroke:hs.ORANGE,strokeWidth:2,cursor:"pointer"},label:{refX:0,refX2:-15,refY:"50%",textAnchor:"end",textVerticalAnchor:"middle",fontSize:12,fill:"#000",pointerEvents:"none",textWrap:{width:60,height:60,ellipsis:!0}},highlight:{refPoints:n,fill:"none",stroke:Kv,strokeWidth:5,visibility:"hidden"}},ports:{groups:{[r]:l()}}},!0)},l=()=>({markup:[{tagName:"circle",selector:"dot"}],position:"right",attrs:{dot:{r:6,magnet:!0,fill:"#fff",stroke:"#8f8f8f",strokeWidth:1}}}),c=h=>[{id:`ingress-${h}`,group:r}],u=(h,f)=>({x:h.x-ou.offsetX,y:h.y+Yu.height*yl.yPositions[f]/100-ou.height/2}),d=()=>{o.forEach(h=>{const f=i.find(y=>y.parameters.fromInitiatorId===h.id),p=f&&s.find(y=>y.id===f.parameters.toRouterId);if(!f||!p)return;const m=u(p.coordinates,f.parameters.toRouterPortIdx);e.addNode({id:h.id,shape:Rn.initiator,x:m.x,y:m.y,attrs:{label:{text:h.name}},ports:{items:c(h.componentId)}})})};return C.useEffect(()=>{a()},[]),C.useEffect(()=>{d()},[e,o,i,s]),null},N$t=({projectId:t,graphRef:e})=>{const n=Vo.getAllTypeInitiatorByProjectId(t),r=vd.getAllByProjectIdX6(t),o=()=>{n.forEach(i=>{const s=r.find(a=>a.id===i.parameters.fromInitiatorId);s&&e.addEdge({id:i.id,source:{cell:i.parameters.fromInitiatorId,port:`ingress-${s.componentId}`},target:{cell:i.parameters.toRouterId,port:`ingress-${i.parameters.toRouterPortIdx}`}})})};return C.useEffect(()=>{o()},[e,n,r]),null},M$t=({projectId:t,graphRef:e})=>{const n="0,0 40,0 58,10 70,18 58,26 40,36 0,36",r="targetPort",o=ea.getAllTypeNonDefaultByProjectIdX6(t),i=Vo.getAllTypeTargetByProjectId(t),s=Nh.getAllByProjectIdX6(t),a=()=>{Gr.registerNode(Rn.target,{width:Yd.width,height:Yd.height,markup:[{tagName:"polygon",selector:"body"},{tagName:"text",selector:"label"},{tagName:"polygon",selector:"highlight"}],attrs:{body:{refPoints:n,fill:"#FFFFFF",stroke:hs.CYAN,strokeWidth:2,cursor:"pointer"},label:{refX:"100%",refX2:15,refY:"50%",textAnchor:"start",textVerticalAnchor:"middle",fontSize:12,fill:"#000",pointerEvents:"none",textWrap:{width:60,height:60,ellipsis:!0}},highlight:{refPoints:n,fill:"none",stroke:Kv,strokeWidth:5,visibility:"hidden"}},ports:{groups:{[r]:l()}}},!0)},l=()=>({markup:[{tagName:"circle",selector:"dot"}],position:"left",attrs:{dot:{r:6,magnet:!0,fill:"#fff",stroke:"#8f8f8f",strokeWidth:1}}}),c=h=>[{id:`egress-${h}`,group:r}],u=(h,f)=>({x:h.x+Yu.width+Yd.offsetX,y:h.y+Yu.height*yl.yPositions[f]/100-Yd.height/2}),d=()=>{o.forEach(h=>{const f=i.find(y=>y.parameters.toTargetId===h.id),p=f&&s.find(y=>y.id===f.parameters.fromRouterId);if(!f||!p)return;const m=u(p.coordinates,f.parameters.fromEgressPortIdx);e.addNode({id:h.id,shape:Rn.target,x:m.x,y:m.y,attrs:{label:{text:h.name}},ports:{items:c(h.componentId)}})})};return C.useEffect(()=>{a()},[]),C.useEffect(()=>{d()},[e,o,i,s]),null},D$t=({projectId:t,graphRef:e})=>{const n=Vo.getAllTypeTargetByProjectId(t),r=ea.getAllTypeNonDefaultByProjectIdX6(t),o=()=>{n.forEach(i=>{const s=r.find(a=>a.id===i.parameters.toTargetId);s&&e.addEdge({id:i.id,source:{cell:i.parameters.fromRouterId,port:`egress-${i.parameters.fromEgressPortIdx}`}
711,target:{cell:i.parameters.toTargetId,port:`egress-${s.componentId}`}})})};return C.useEffect(()=>{o()},[e,n,r]),null},L$t=({projectId:t,graphRef:e})=>{const n=Vo.getAllTypeTargetByProjectId(t),r=ea.getDefaultTargetByProjectIdX6(t),o=()=>{if(!r)return;const i=n.find(s=>s.parameters.toTargetId===r.id);i&&e.addEdge({id:i.id,source:{cell:i.parameters.fromRouterId,port:`egress-${i.parameters.fromEgressPortIdx}`},target:{cell:r.id,port:`egress-${r.componentId}`}})};return C.useEffect(()=>{o()},[e,n,r]),null},k$t=({projectId:t,graphRef:e})=>{const n="defaultTargetPort",r=ea.getDefaultTargetByProjectIdX6(t),o=Vo.getAllTypeTargetByProjectId(t),i=Nh.getAllByProjectIdX6(t),s=()=>{Gr.registerNode(Rn.defaultTarget,{width:up.width,height:up.height,markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"},{tagName:"rect",selector:"highlight"}],attrs:{body:{x:0,y:0,width:up.width,height:up.height,rx:5,ry:5,fill:hs.CYAN,stroke:"#006B6B",strokeWidth:2,cursor:"pointer"},label:{refX:"50%",refY:"50%",textAnchor:"middle",textVerticalAnchor:"middle",fontSize:12,fontWeight:400,fill:"#FFFFFF",pointerEvents:"none",textWrap:{width:-20,height:-10,ellipsis:!0}},highlight:{x:0,y:0,width:up.width,height:up.height,rx:5,ry:5,fill:"none",stroke:Kv,strokeWidth:5,visibility:"hidden"}},ports:{groups:{[n]:a()}}},!0)},a=()=>({markup:[{tagName:"circle",selector:"dot"}],position:"left",attrs:{dot:{r:6,magnet:!0,fill:"#fff",stroke:"#8f8f8f",strokeWidth:1}}}),l=d=>[{id:`egress-${d}`,group:n}],c=(d,h)=>({x:d.x+Yu.width+up.offsetX,y:d.y+Yu.height*yl.yPositions[h]/100-up.height/2}),u=()=>{if(!r)return;const d=o.find(p=>p.parameters.toTargetId===r.id),h=d&&i.find(p=>p.id===d.parameters.fromRouterId);if(!d||!h)return;const f=c(h.coordinates,d.parameters.fromEgressPortIdx);e.addNode({id:r.id,shape:Rn.defaultTarget,x:f.x,y:f.y,attrs:{label:{text:r.name}},ports:{items:l(r.componentId)}})};return C.useEffect(()=>{s()},[]),C.useEffect(()=>{u()},[e,r,o,i]),null},F$t=({projectId:t,graphRef:e})=>{const n="ingressBridgePort",r="egressBridgePort",o=bw.getAllByProjectIdX6(t),i=()=>{Gr.registerNode(Rn.bridge,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"leftSection"},{tagName:"rect",selector:"rightSection"},{tagName:"rect",selector:"highlight"},{tagName:"text",selector:"label"}],inherit:"rect",width:dp.width,height:dp.height,zIndex:2,attrs:{body:{stroke:tt,fill:"#fff",rx:5,ry:5},leftSection:{fill:"none",stroke:tt,strokeWidth:1,refX:"20%",width:1,height:dp.height},rightSection:{fill:"none",stroke:tt,strokeWidth:1,refX:"80%",width:1,height:dp.height},label:{textAnchor:"middle",textVerticalAnchor:"middle",refX:"50%",refY:"50%",cursor:"pointer",fontSize:12,textWrap:{width:dp.width-80,height:dp.height-10,ellipsis:!0}},highlight:{stroke:Kv,strokeWidth:5,fill:"none",visibility:"hidden",pointerEvents:"none",rx:5,ry:5,width:dp.width,height:dp.height}},ports:{groups:{[n]:s("left"),[r]:s("right")}}},!0)},s=c=>({markup:[{tagName:"circle",selector:"dot"}],position:{name:"absolute"},attrs:{dot:{stroke:"#8f8f8f",strokeWidth:1,fill:"#fff",r:6,magnet:!0}},args:{x:c==="left"?0:"100%",y:"50%"}}),a=()=>[{id:"ingress",group:n,args:{x:0,y:"50%"}},{id:"egress",group:r,args:{x:"100%",y:"50%"}}],l=c=>{o.forEach(u=>{c.addNode({id:u.id,shape:Rn.bridge,x:u.coordinates.x,y:u.coordinates.y,attrs:{label:{text:u.name}},ports:{items:a()}})})};return C.useEffect(()=>{i()},[]),C.useEffect(()=>{l(e)},[e,o]),null},KR="ncnoc-simple-manhattan",Yl=.001,B$t=fS*10,$$t=20,H$t=20,U$t=12,z$t=10,abe=t=>{const e=t.getSourceCell(),n=t.getTargetCell();if(!e?.isNode()||!n?.isNode())return!1;const r=e.shape===Rn.router,o=e.shape===Rn.bridge,i=n.shape===Rn.router,s=n.shape===Rn.bridge;return r&&i||r&&s||o&&i},NP=({start:t,end:e})=>Math.abs(t.y-e.y)<Yl,Pz=({start:t,end:e})=>Math.abs(t.x-e.x)<Yl,q2=({firstStart:t,firstEnd:e,secondStart:n,secondEnd:r})=>{const o=Math.min(t,e),i=Math.max(t,e),s=Math.min(n,r),a=Math.max(n,r),l=Math.max(o,s);return Math.min(i,a)-l},M0=t=>t.slice(0,-1).reduce((r,o,i)=>{const s=t[i+1];return r.push({start:o,end:s}),r},[]),V$t=(t,e)=>{const n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y),o=n<Yl,i=r<Yl;return o&&i},G$t=t=>
711t.filter((e,n)=>{if(n===0)return!0;const o=t[n-1];return!V$t(e,o)}),GC=t=>{const n=G$t(t);if(n.length<=2)return n;const r=n[0],o=n.length-1,i=n[o];return[...n.slice(1,o).reduce((l,c,u)=>{const d=l[l.length-1],h=u+2,f=n[h],p=Math.abs(d.x-c.x)<Yl&&Math.abs(c.x-f.x)<Yl,m=Math.abs(d.y-c.y)<Yl&&Math.abs(c.y-f.y)<Yl;return p||m||l.push(c),l},[r]),i]},W$t=t=>M0(t).reduce((r,{start:o,end:i})=>{const s=Math.abs(i.x-o.x),a=Math.abs(i.y-o.y),l=s+a;return r+l},0),j$t=({graph:t,edge:e,padding:n})=>{const r=e.getSourceCellId(),o=e.getTargetCellId();return t.getNodes().reduce((i,s)=>{const a=s.id===r,l=s.id===o;if(a||l)return i;const c=s.getBBox(),u=c.x-n,d=c.y-n,h=c.x+c.width+n,f=c.y+c.height+n;return[...i,{left:u,top:d,right:h,bottom:f}]},[])},Rz=(t,e)=>{if(NP(t)){const n=t.start.y,r=n>e.top+Yl&&n<e.bottom-Yl,i=q2({firstStart:t.start.x,firstEnd:t.end.x,secondStart:e.left,secondEnd:e.right})>Yl;return r&&i}if(Pz(t)){const n=t.start.x,r=n>e.left+Yl&&n<e.right-Yl,i=q2({firstStart:t.start.y,firstEnd:t.end.y,secondStart:e.top,secondEnd:e.bottom})>Yl;return r&&i}return!0},lbe=(t,e)=>M0(t).reduce((o,i)=>{const s=e.filter(a=>Rz(i,a)).length;return o+s},0),q$t=(t,e)=>{const n=M0(t),r=n.findIndex(a=>e.some(l=>Rz(a,l)));if(r<0)return null;const i=n[r],s=e.find(a=>Rz(i,a));return s?{segmentIndex:r,bound:s}:null},cbe=({firstSegment:t,secondSegment:e,gap:n})=>{if(NP(t)&&NP(e)){const s=Math.abs(t.start.y-e.start.y)<n,l=q2({firstStart:t.start.x,firstEnd:t.end.x,secondStart:e.start.x,secondEnd:e.end.x})>Yl;return s&&l}if(Pz(t)&&Pz(e)){const s=Math.abs(t.start.x-e.start.x)<n,l=q2({firstStart:t.start.y,firstEnd:t.end.y,secondStart:e.start.y,secondEnd:e.end.y})>Yl;return s&&l}return!1},c_=(t,e,n)=>M0(t).reduce((i,s)=>{const a=e.filter(l=>cbe({firstSegment:s,secondSegment:l,gap:n})).length;return i+a},0),Y$t=(t,e,n)=>M0(t).findIndex(i=>e.some(a=>cbe({firstSegment:i,secondSegment:a,gap:n}))),X$t=(t,e,n)=>{const r=em.presets.manhattan.call(t,[],{step:e,padding:{top:n,right:n,bottom:n,left:n}},t)??[],o=t.cell;if(!o.isEdge())return[];const s=o.getSourcePoint(),a=o.getTargetPoint(),l=[s,...r,a];return GC(l)},ube=({routePoints:t,segmentIndex:e,replacementPoints:n})=>{const r=t.slice(0,e),o=e+2,i=t.slice(o),s=[...r,...n,...i];return GC(s)},K$t=(t,e)=>{if(NP(t)){const s=t.end.x>=t.start.x,a=s?e.left:e.right,l=s?e.right:e.left;return[e.top,e.bottom].map(u=>[t.start,{x:a,y:t.start.y},{x:a,y:u},{x:l,y:u},{x:l,y:t.end.y},t.end])}const n=t.end.y>=t.start.y,r=n?e.top:e.bottom,o=n?e.bottom:e.top;return[e.left,e.right].map(s=>[t.start,{x:t.start.x,y:r},{x:s,y:r},{x:s,y:o},{x:t.end.x,y:o},t.end])},xne=({route:t,bounds:e,occupiedSegments:n,edgeGap:r})=>{const s=lbe(t,e)*1e6,a=c_(t,n,r)*1e4,l=W$t(t);return s+a+l},dbe=({currentRoute:t,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o,attempt:i})=>{if(i>=o)return t;const a=q$t(t,e);if(!a)return t;const c=M0(t)[a.segmentIndex],f=K$t(c,a.bound).map(p=>ube({routePoints:t,segmentIndex:a.segmentIndex,replacementPoints:p})).reduce((p,m)=>{if(!p)return m;const y=xne({route:m,bounds:e,occupiedSegments:n,edgeGap:r}),v=xne({route:p,bounds:e,occupiedSegments:n,edgeGap:r});return y<v?m:p},null)??t;return dbe({currentRoute:f,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o,attempt:i+1})},wne=({route:t,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o})=>{const s=GC(t);return dbe({currentRoute:s,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o,attempt:0})},Q$t=(t,e)=>{const n=Math.ceil(t/2),o=t%2===1?1:-1;return n*e*o},Ane=t=>{const n=t/3;return Math.min(z$t,n)},Z$t=({segment:t,segmentIndex:e,segmentCount:n,laneOffset:r})=>{const o=e===0,i=n-1,s=e===i;if(NP(t)){const m=t.end.x>=t.start.x?1:-1,y=Math.abs(t.end.x-t.start.x),v=Ane(y),b=t.start.y+r,S=o?{x:t.start.x+m*v,y:t.start.y}:t.start,w=s?{x:t.end.x-m*v,y:t.end.y}:t.end;return GC([t.start,S,{x:S.x,y:b},{x:w.x,y:b},w,t.end])}const l=t.end.y>=t.start.y?1:-1,c=Math.abs(t.end.y-t.start.y),u=Ane(c),d=t.start.x+r,h=o?{x:t.start.x,y:t.start.y+l*u}:t.start,f=s?{x:t.end.x,y:t.end.y-l*u}:t.end;return GC([t.start,h,{x:d,y:h.y},{x:d,y:f.y},f,t.end])},J$t=({currentRoute:t,conflictSegmentIndex:e,bounds:n,occupiedSegments:r,edgeGap:o,maxAttempts:i})=>{const s=M0(t),a=s[e],l=c_(t,r,o),u=Array.from({length:i},(f,p)=>p+1).reduce((f,p)=>{const m=Q$t(p,o),y=Z$t({segment:a,segmentIndex:e,segmentCount:s.length,laneOffset:m}),v=ube({routePoints:t,segmentIndex:e,replacementPoints:y});if(lbe(v,n)>0)return f;const w=c_(v,r,o),A=c_(f,r,o);return w<A?v:f},t);return c_(u,r,o)<l?u:t},hbe=({currentRoute:t,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o,attempt:i})=>{if(i>=o)return t;const a=Y$t(t,n,r);if(a<0)return t;const c=J$t({currentRoute:t,conflictSegmentIndex:a,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o});return c===t?t:hbe({currentRoute:c,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o,attempt:i+1})},Tne=({route:t,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o})=>{const i=GC(t);return hbe({currentRoute:i,bounds:e,occupiedSegments:n,edgeGap:r,maxAttempts:o,attempt:0})},Oz=({edgeView:t,occupiedSegments:e,step:n,padding:r,edgeGap:o,maxAttempts:i})=>{const s=t.cell;
711if(!s.isEdge())return[];const a=j$t({graph:t.graph,edge:s,padding:r}),l=X$t(t,n,r),c=wne({route:l,bounds:a,occupiedSegments:e,edgeGap:o,maxAttempts:i}),u=Tne({route:c,bounds:a,occupiedSegments:e,edgeGap:o,maxAttempts:i}),d=wne({route:u,bounds:a,occupiedSegments:e,edgeGap:o,maxAttempts:i}),h=Tne({route:d,bounds:a,occupiedSegments:e,edgeGap:o,maxAttempts:i});return GC(h)},eHt=t=>t.getEdges().reduce((r,o)=>abe(o)?[...r,o]:r,[]).sort((r,o)=>r.id.localeCompare(o.id)),tHt=(t,e)=>{const n=t.findViewByCell(e);return n||null},nHt=({graph:t,previousEdges:e,step:n,padding:r,edgeGap:o,maxAttempts:i})=>e.reduce((s,a)=>{const l=tHt(t,a);if(!l)return s;const c=Oz({edgeView:l,occupiedSegments:s,step:n,padding:r,edgeGap:o,maxAttempts:i}),u=M0(c);return s.push(...u),s},[]),rHt=({currentEdgeView:t,step:e,padding:n,edgeGap:r,maxAttempts:o})=>{const a=t.graph,l=t.cell;if(!l.isEdge())return[];const c=eHt(a),u=c.findIndex(p=>p.id===l.id);if(u===-1)return Oz({edgeView:t,occupiedSegments:[],step:e,padding:n,edgeGap:r,maxAttempts:o});const d=c.slice(0,u),h=nHt({graph:a,previousEdges:d,step:e,padding:n,edgeGap:r,maxAttempts:o});return Oz({edgeView:t,occupiedSegments:h,step:e,padding:n,edgeGap:r,maxAttempts:o})};Gr.registerRouter(KR,function(t,e,n){const r=n.cell;if(!r.isEdge()||!abe(r))return[];const o=rHt({currentEdgeView:n,step:e.step??B$t,padding:e.padding??$$t,edgeGap:e.edgeGap??H$t,maxAttempts:e.maxAttempts??U$t}),i=2,s=1,a=-1;return o.length>i?o.slice(s,a):[]},!0);const oHt=({projectId:t,graphRef:e})=>{const n=Vo.getAllTypeRouterByProjectIdX6(t),r=()=>{n.forEach(o=>{const i=o.parameters.fromId,s=o.parameters.toId,a=o.parameters.fromEgressPortIdx,l=o.parameters.toInGressPortIdx;!i||!s||a===void 0||l===void 0||e.getCellById(o.id)||e.addEdge({id:o.id,source:{cell:i,port:`egress-${a}`},target:{cell:s,port:`ingress-${l}`},router:{name:KR,args:{padding:40}},connector:"normal"})})};return C.useEffect(()=>{r()},[e,n]),null},iHt=({projectId:t,graphRef:e})=>{const n=Vo.getAllTypeBridgeByProjectId(t),r=bw.getAllByProjectIdX6(t),o=()=>{n.forEach(i=>{const s=i.parameters.fromRouterId,a=i.parameters.toBridgeId,l=i.parameters.routerPortIdx;if(!s||!a||l===void 0||!r.find(f=>f.id===a))return;const u=`egress-${l}`,d="ingress";if(e.getCellById(i.id))return;const h=e.getEdges().find(f=>f.getSourceCellId()===s&&f.getSourcePortId()===u&&f.getTargetCellId()===a&&f.getTargetPortId()===d);h&&e.removeEdge(h),e.addEdge({id:i.id,source:{cell:s,port:u},target:{cell:a,port:d},router:{name:KR,args:{padding:40}},connector:"normal"})})};return C.useEffect(()=>{o()},[e,n,r]),null},sHt=({projectId:t,graphRef:e})=>{const n=Vo.getAllTypeBridgeByProjectId(t),r=bw.getAllByProjectIdX6(t),o=()=>{n.forEach(i=>{const s=i.parameters.toRouterId,a=i.parameters.fromBridgeId,l=i.parameters.routerPortIdx;if(!s||!a||l===void 0||!r.find(f=>f.id===a))return;const u="egress",d=`ingress-${l}`;if(e.getCellById(i.id))return;const h=e.getEdges().find(f=>f.getSourceCellId()===a&&f.getSourcePortId()===u&&f.getTargetCellId()===s&&f.getTargetPortId()===d);h&&e.removeEdge(h),e.addEdge({id:i.id,source:{cell:a,port:u},target:{cell:s,port:d},router:{name:KR,args:{padding:40}},connector:"normal"})})};return C.useEffect(()=>{o()},[e,n,r]),null},aHt=({projectId:t})=>{const{width:e,height:n}=sc(),{diagramWidth:r,diagramHeight:o}=st.getStageDimensions({width:e,height:n}),i=C.useRef(null),[s,a]=C.useState(null),l=c=>{if(!c)return null;const{tx:u,ty:d}=c.translate();return{tx:u,ty:d,zoomFactor:c.zoom()}};return C.useEffect(()=>{const c=l(s),u=new Gr({container:i.current,background:{color:yB},autoResize:!0,grid:{visible:!0,type:vB,args:[{color:bB,thickness:Xv},{color:CB,thickness:Xv,factor:fS}]},panning:!0,mousewheel:!0,interacting(d){const h=d.cell.shape===Rn.addInitiatorButton||d.cell.shape===Rn.addTargetButton,f=d.cell.shape===Rn.initiator,p=d.cell.shape===Rn.target;return{nodeMovable:!(h||f||p),magnetConnectable:!0,edgeMovable:!0,edgeLabelMovable:!1}},connecting:{snap:!0,createEdge({sourceCell:d}){return d.shape===Rn.router||d.shape===Rn.bridge?this.createEdge({router:{name:KR,args:{padding:40}},connector:"normal"}):this.createEdge({})},validateConnection({sourceView:d,targetView:h,sourcePort:f,targetPort:p,edge:m}){if(!d||!h||!f||!p||!m)return!1;const y=d.cell,v=h.cell,b=y.shape,S=v.shape;if(!y.isNode()||!v.isNode()||y.id===v.id)return!1;const w=u.getEdges().some(_=>_.id!==m.id&&_.getSourceCellId()===y.id&&_.getSourcePortId()===f),A=u.getEdges().some(_=>_.id!==m.id&&_.getTargetCellId()===v.id&&_.getTargetPortId()===p);return w||A?!1:b===Rn.router&&S===Rn.router?f.startsWith("egress-")&&p.startsWith("ingress-"):b===Rn.router&&S===Rn.bridge?f.startsWith("egress-")&&p==="ingress":b===Rn.bridge&&S===Rn.router?f==="egress"&&p.startsWith("ingress-"):!1}
711,validateEdge({edge:d}){return!!(d.getSourceCell()&&d.getTargetCell()&&d.getSourcePortId()&&d.getTargetPortId())}}});return a(u),c&&(u.zoom(c.zoomFactor,{absolute:!0}),u.translate(c.tx,c.ty)),()=>{l(s),u&&(u.getNodes().forEach(d=>{u.removeNode(d.id)}),u.getEdges().forEach(d=>{u.removeEdge(d.id)}),u.dispose())}},[]),K(le,{sx:{width:r,height:o,position:"absolute",left:0},children:[g("div",{ref:i,style:{width:"100%",height:"100%"}}),s?K(gr,{children:[g(R$t,{projectId:t,graphRef:s}),g(_$t,{projectId:t,graphRef:s}),g(O$t,{projectId:t,graphRef:s}),g(M$t,{projectId:t,graphRef:s}),g(k$t,{projectId:t,graphRef:s}),g(F$t,{projectId:t,graphRef:s}),g(oHt,{projectId:t,graphRef:s}),g(N$t,{projectId:t,graphRef:s}),g(D$t,{projectId:t,graphRef:s}),g(iHt,{projectId:t,graphRef:s}),g(sHt,{projectId:t,graphRef:s}),g(L$t,{projectId:t,graphRef:s})]}):null]})},lHt=({projectId:t,user:e})=>{const n=[Un.OVERVIEW],r=Yn(),{width:o,height:i}=sc(),{diagramWidth:s,diagramHeight:a}=st.getStageDimensions({width:o,height:i}),l=bt(h0),c=bt(gd),u=bt(nF),d=bt(rae),h=!n.includes(u),f=h?ei.getCenterPanelWidth({width:o,isLeftPanelOpen:l,isRightPanelOpen:c}):o,p=ei.getCenterPanelHeight(i),m=h?ei.getLeftPanelWidth(l):0,y=w$t.getProjectNcnocSystemByProjectId(t),v=j2.isGetAllProjectComponentNcnocByProjectIdLoading(t),b=j2.getById(d,t),[S,w]=C.useState(null),[A,_]=C.useState({}),[P,R]=C.useState(st.getStoredStageCoordinates({projectId:t})||Eo.deepCopy(V3)),[O]=WW(),[N]=m6(),M=Se=>{r(d0(Se?.id??"")),Se&&!c&&r(pd(!0))},{data:L=wz}=nl(t),{data:F=wz,isLoading:$}=Rm(t),{data:D=[],isLoading:k}=n7e(t),{data:U={data:[]},isLoading:H}=aw(t),{data:V=[],isLoading:q}=Sfe({projectId:t}),{data:J=[],refetch:Q,isLoading:se}=lue(t);C.useEffect(()=>{b&&r(Sv({id:b.id,type:b.type}))},[r,b]);const oe=async({componentType:Se,newParentId:Pe,connection:Ue,virtualDeviceParentComponent:_e})=>{const Oe=Ki.getCreateComponentPayload({projectId:t,componentType:Se,connection:Ue,newParentId:Pe,componentIdToTopologyMap:ee,groupedComponents:L,projectComponentsTree:U,connectionRoutes:A,virtualDeviceParentComponent:_e});if(await O(Oe),Se===Fe.VIRTUAL_TARGETS){const ze=xB.getCreatePayload(Oe.component.id,t);await N(ze)}},ie=Se=>{r(Im({type:Se.type,deleteElementId:Se.id,anchorElId:Se.anchorElId,name:Se.name,projectId:t,tree:Se.type===Fe.TOPOLOGIES||Se.type===Fe.TARGETS?U.data:[]}))},ee=C.useMemo(()=>{const Se=new Map;return U.data.forEach(Pe=>{const Ue=U.data.find(_e=>_e.id===Pe.parent)?.data.id;Se.set(Pe.data.id,L.topologies.find(_e=>_e.id===Ue))}),Se},[U,L.topologies]),{idToName:re,idToDeviceId:fe}=C.useMemo(()=>L.initiators.reduce((Se,Pe)=>(Se.idToName[Pe.id]=Pe.name,Se.idToDeviceId[Pe.id]=Pe.componentId,Se),{idToName:{},idToDeviceId:{}}),[L.initiators]),{idToName:we,idToDeviceId:xe}=C.useMemo(()=>L.targets.reduce((Se,Pe)=>(Se.idToName[Pe.id]=Pe.name,Se.idToDeviceId[Pe.id]=Pe.componentId,Pe.parameters.isVirtualDevicesEnabled&&L.virtualTargets.filter(_e=>_e.parameters.parentTargetId===Pe.id).forEach(_e=>{Se.idToName[_e.id]=Pe.name+_e.name,Se.idToDeviceId[_e.id]=_e.componentId}),Se),{idToName:{},idToDeviceId:{}}),[L.targets,L.virtualTargets]),{idToName:ve,idToDeviceId:Re}=C.useMemo(()=>L.routers.reduce((Se,Pe)=>(Se.idToName[Pe.id]=Pe.name,Se.idToDeviceId[Pe.id]=Pe.componentId,Se),{idToName:{},idToDeviceId:{}}),[L.routers]),{idToName:pe,idToDeviceId:Be}=C.useMemo(()=>L.bridges.reduce((Se,Pe)=>(Se.idToName[Pe.id]=Pe.name,Se.idToDeviceId[Pe.id]=Pe.componentId,Se),{idToName:{},idToDeviceId:{}}),[L.bridges]),{idToName:ke,idToColor:Ne,idToDataWidth:ot}=C.useMemo(()=>L.topologies.reduce((Se,Pe)=>(Se.idToName[Pe.id]=Pe.name,Se.idToColor[Pe.id]=Pe.parameters.colors.routers,Se.idToDataWidth[Pe.id]=Pe.dataWidth,Se),{idToName:{},idToColor:{},idToDataWidth:{}}),[L.topologies]),{memoizedRouterColorsFromSubtopology:ce,memoizedSubtopologySettingsColors:Ae}=C.useMemo(()=>{const Se={},Pe={},Ue={},_e={};return U?.data&&U.data.length&&(U.data.forEach(Oe=>{if(!(!Oe||!Oe.data||!Oe.relationId)&&Oe.data.type===Fe.TOPOLOGIES){Se[Oe.id]=Oe.data.id,Ue[Oe.id]=Ne[Oe.relationId],Pe[Oe.relationId]=Ne[Oe.relationId];return}}),U.data.forEach(Oe=>{if(!Oe||!Oe.data||Oe.data.type===Fe.TOPOLOGIES)return;const ze=Ne[Se[Oe.parent]];_e[Oe.data.id]=ze})),{memoizedSubtopologySettingsColors:Pe,memoizedRouterColorsFromSubtopology:_e}},[U.data,ke,Ne,ot]),be=C.useMemo(()=>{const Se={},Pe={},Ue={},_e={};return F.initiators.map(Oe=>{Oe&&(Se[Oe.parameters.toRouterId]||(Se[Oe.parameters.toRouterId]=new Set),Ue[Oe.parameters.fromInitiatorId]=!0,Se[Oe.parameters.toRouterId].add(Oe.parameters.toRouterPortIdx))}),F.targets.map(Oe=>{Oe&&(Pe[Oe.parameters.fromRouterId]||(Pe[Oe.parameters.fromRouterId]=new Set),_e[Oe.parameters.toTargetId]=!0,Pe[Oe.parameters.fromRouterId].add(Oe.parameters.fromEgressPortIdx))}),F.routers.map(Oe=>{Oe?.parameters?.fromId&&(Pe[Oe.parameters.fromId]||(Pe[Oe.parameters.fromId]=new Set),Pe[Oe.parameters.fromId].add(Oe.parameters.fromEgressPortIdx)),Oe?.parameters?.toId&&(Se[Oe.parameters.toId]||(Se[Oe.parameters.toId]=new Set),Se[Oe.parameters.toId].add(Oe.parameters.toInGressPortIdx))}),F.bridges.map(Oe=>{if(Oe){const ze=Oe.parameters.fromRouterId,ne=Oe.parameters.toRouterId;Pe[ze]||(Pe[ze]=new Set),Se[ne]||(Se[ne]=new Set),Pe[ze].add(Oe.parameters.routerPortIdx),Se[ne].add(Oe.parameters.routerPortIdx)}}),{ingressIds:Se,egressIds:Pe,initiatorIds:Ue,targetIds:_e}},[F]);return $||$||k||H||se||q||v||!y?g(tl,{}):K(le,{children:[g(Hbt,{projectId:t,user:e,activeTab:u,components:L,configurableTestSequence:S,setConfigurableTestSequence:w,setSelectedNcnocComponent:M}),K(le,{sx:{position:"relative"},children:[g(le,{display:u===Un.DESIGN?"block":"none",sx:{width:"100%",position:"absolute",left:0,zIndex:1},children:g(Cxt,{projectId:t,fetchedComponents:L,connections:F,projectRoutes:D,connectionRoutes:A,stageCoordinates:P,selectedNcnocComponent:b,connectionIndexes:be,memoizedNames:{initiators:re,targets:we,routers:ve,bridges:pe,topologies:ke},memoizedDeviceIds:{initiators:fe,targets:xe,routers:Re,bridges:Be},memoizedSubtopologyChildColors:ce,setSelectedNcnocComponent:M,setConnectionRoutes:_,setStageCoordinates:R,deleteComponentHandler:ie})}),g(le,{display:u===Un.DESIGN_X6?"block":"none",sx:{position:"absolute",left:0,width:s,height:a,zIndex:1},children:g(aHt,{projectId:t})}),K(le,{sx:{zIndex:2,height:ei.getLeftRightPanelHeight(i)},children:[h?K(le,{children:[g(k8,{}),g(MBt,{isLeftPanelOpen:l,components:L,stageCoordinates:P,explorerTree:U.data,projectId:t,connectionIndexes:{...be,initiators:be.initiatorIds,targets:be.targetIds},subtopologyColorById:Ne,activeTab:u,setSelectedNcnocComponent:M})]}):null,g(CFt,{leftPosition:m,panelWidth:f,panelHeight:p,projectId:t,activeTab:u,fetchedComponents:L,componentReachabilities:J,connections:F,projectRoutes:D,configurableTestSequence:S,ncnocAddresses:V}),g(Sxt,{projectId:t,activeTab:u,isAvailableConfigurableTest:!!S,leftPosition:m}),h?K(le,{children:[g(q8,{}),g(E$t,{isRightPanelOpen:c,projectId:t,selectedNcnocComponent:b,memoizedInitiatorDeviceIds:fe,memoizedTargetDeviceIds:xe,memoizedRouterDeviceIds:Re,connectionIndexes:be,deleteComponentHandler:ie,memoizedSubtopologyChildColors:ce,memoizedSubtopologySettingsColors:Ae,memoizedInitiatorNames:re,memoizedTargetNames:we,memoizedRouterNames:ve,memoizedSubtopologyNames:ke,createComponentHandler:oe,refetchcomponentsReachabilities:Q,fetchedComponents:L,connections:F,explorerTree:U.data,componentIdToTopologyMap:ee})]}):null]})]})]})},Vn={ROUTER_NAME:"Router Name",PARAMETERS:"Parameters",ROUTER_TYPE:"Router Type",DEVICE_PORT_SETTINGS:"Device Port Settings",INTERCONNECT_PORT_SETTINGS:"Interconnect Port Settings",DIRECTORY_CACHE_CONTROLLER_SETTINGS:"Directory Cache Controller Settings",L3_CACHE_CONTROLLER_SETTINGS:"L3 Cache Controller Settings",RX_REQ_FIFO_PTR_WIDTH:"Rx REQ FIFO Ptr Width",RX_RSP_FIFO_PTR_WIDTH:"Rx RSP FIFO Ptr Width",RX_DAT_FIFO_PTR_WIDTH:"Rx DAT FIFO Ptr Width",TX_REQ_FIFO_PTR_WIDTH:"Tx REQ FIFO Ptr Width",TX_RSP_FIFO_PTR_WIDTH:"Tx RSP FIFO Ptr Width",TX_DAT_FIFO_PTR_WIDTH:"Tx DAT FIFO Ptr Width",REQ_FIFO_PTR_WIDTH:"REQ FIFO Ptr Width",RESP_FIFO_PTR_WIDTH:"RESP FIFO Ptr Width",DATA_FIFO_PTR_WIDTH:"DATA FIFO Ptr Width",CACHE_BYTE_OFFSET_WIDTH:"Cache Byte Offset Width",CACHE_INDEX_WIDTH:"Cache Index Width",CACHE_N_SET:"Cache N-Set",REQ_CMD_FIFO_PTR_WIDTH:"REQ CMD FIFO Ptr Width",RSP_CMD_FIFO_PTR_WIDTH:"RSP CMD FIFO Ptr Width",DAT_CMD_FIFO_PTR_WIDTH:"DAT CMD FIFO Ptr Width",DAT_RSP_CMD_FIFO_SIZE:"DAT RSP CMD FIFO Size",REQ_CMD_FIFO_SIZE:"REQ CMD FIFO Size",RSP_CMD_FIFO_SIZE:"RSP CMD FIFO Size",DAT_CMD_FIFO_SIZE:"DAT CMD FIFO Size",REQ_OUTSTANDING_BUFFER_SIZE:"REQ Outstanding Buffer Size",HDR_FIFO_PTR_WIDTH:"HDR FIFO Ptr Width",L3_CACHE_BYTE_OFFSET_WIDTH:"L3 Cache Byte Offset Width",L3_CACHE_INDEX_WIDTH:"L3 Cache Index Width",L3_CACHE_N_SET:"L3 Cache N-Set"},X8={[Ao.HN_F_WITHOUT_L3]:"HN-F w/o L3",[Ao.HN_F_WITH_L3]:"HN-F w/ L3",[Ao.DEVICE_ONLY]:"Device Only",[Ao.REPEATER]:"Repeater"},_i={NAME:"name",TYPE:"type",DEVICE_PORT_RX_REQ_FIFO_PTR_WIDTH:"devicePortRxReqFifoPtrWidth",DEVICE_PORT_RX_RSP_FIFO_PTR_WIDTH:"devicePortRxRspFifoPtrWidth",DEVICE_PORT_RX_DAT_FIFO_PTR_WIDTH:"devicePortRxDatFifoPtrWidth",DEVICE_PORT_TX_REQ_FIFO_PTR_WIDTH:"devicePortTxReqFifoPtrWidth",DEVICE_PORT_TX_RSP_FIFO_PTR_WIDTH:"devicePortTxRspFifoPtrWidth",DEVICE_PORT_TX_DAT_FIFO_PTR_WIDTH:"devicePortTxDatFifoPtrWidth",IC_PORT_REQ_FIFO_PTR_WIDTH:"icPortReqFifoPtrWidth",IC_PORT_RESP_FIFO_PTR_WIDTH:"icPortRespFifoPtrWidth",IC_PORT_DATA_FIFO_PTR_WIDTH:"icPortDataFifoPtrWidth",DCC_RX_REQ_FIFO_PTR_WIDTH:"dccRxReqFifoPtrWidth",DCC_RX_RSP_FIFO_PTR_WIDTH:"dccRxRspFifoPtrWidth",DCC_RX_DAT_FIFO_PTR_WIDTH:"dccRxDatFifoPtrWidth",DCC_TX_REQ_FIFO_PTR_WIDTH:"dccTxReqFifoPtrWidth",DCC_TX_RSP_FIFO_PTR_WIDTH:"dccTxRspFifoPtrWidth",DCC_TX_DAT_FIFO_PTR_WIDTH:"dccTxDatFifoPtrWidth",DCC_CACHE_INDEX_WIDTH:"dccCacheIndexWidth",DCC_CACHE_N_SET:"dccCacheNSet",DCC_REQ_CMD_FIFO_PTR_WIDTH:"dccReqCmdFifoPtrWidth",DCC_RSP_CMD_FIFO_PTR_WIDTH:"dccRspCmdFifoPtrWidth",DCC_DAT_CMD_FIFO_PTR_WIDTH:"dccDatCmdFifoPtrWidth",DCC_DAT_RSP_CMD_FIFO_SIZE:"dccDatRspCmdFifoSize",L3_CACHE_BYTE_OFFSET_WIDTH:"l3CacheByteOffsetWidth",L3_CACHE_INDEX_WIDTH:"l3CacheIndexWidth",L3_CACHE_N_SET:"l3CacheNSet"},Zt={MINIMUM:1,MAXIMUM:5},vM={MINIMUM:1,MAXIMUM:10},lv={MINIMUM:1,MAXIMUM:32},Xd={MINIMUM:1,MAXIMUM:20};var Hn=(t=>(t[t.CACHEABLE=0]="CACHEABLE",t[t.NON_CACHEABLE=1]="NON_CACHEABLE",t[t.SNOOPABLE=2]="SNOOPABLE",t))(Hn||{});const Fp={getIsProjectComponentCnocRouter:t=>t?"devicePortRxReqFifoPtrWidth"in t:!1,getIsProjectComponentCnocDevice:t=>t?"connectedPort"in t:!1,getIsProjectComponentCnocBridge:t=>t?"diagramNodeOrientation"in t:!1},Zn={getMemoryTypeName:t=>{switch(t){case Hn.CACHEABLE:return"Cacheable";case Hn.NON_CACHEABLE:return"Non-cacheable";case Hn.SNOOPABLE:default:return"Snoopable"}},getMemoryTypeFromComponentName:t=>t.includes("Non-cacheable")?Hn.NON_CACHEABLE:t.includes("Cacheable")?Hn.CACHEABLE:Hn.SNOOPABLE,getComponentName:({regionName:t,memoryType:e,componentName:n})=>`${n} [${t} - ${Zn.getMemoryTypeName(e)}]`,getRegionName:(t,e)=>e?`${t} - ${Zn.getMemoryTypeName(e)}`:`${t}`,hasBaseAddressExceedingLimitAddress:(t,e)=>t>e,hasOverlappingAddressRegions:({currentBase:t,comparisonBase:e,currentLimit:n,comparisonLimit:r})=>t>=e&&t<=r||n<=r&&n>=e||t<=e&&n>=r,hasServicingHomeNode:({subordinateDeviceBase:t,homeNodeBase:e,subordinateDeviceLimit:n,homeNodeLimit:r})=>t>=e&&n<=r,hasSimilarMemoryType:(t,e)=>t===e,isServicingHomeNodeEqualToOne:t=>t===1,getCnocAccordionTitle:t=>{if(Fp.getIsProjectComponentCnocBridge(t))return`${t.name}: C2C`;const r=new Map(Object.entries(X8)).get(t.type)??t.type,o=Zn.getNodeIdLabel(t);return`${t.name}: ${r} (${o}: 0x${t.nodeId})`},getNodeIdLabel:t=>Fp.getIsProjectComponentCnocRouter(t)?"Cluster ID":"Node ID",getIsDeviceAddressWithinHomeNodeRange:(t,e)=>{if(!e.base||!e.limit||!t.base||!t.limit)return!1;const n=_t.getHexToBigInt(e.base),r=_t.getHexToBigInt(e.limit),o=_t.getHexToBigInt(t.base),i=_t.getHexToBigInt(t.limit);return n>=o&&r<=i},getAreAddressesOverlapping:({components:t,activeComponent:e,inputBaseAddress:n,inputLimitAddress:r})=>{if(!(n&&r))return!1;const o=e.type===Ao.HN_F_WITHOUT_L3||e.type===Ao.HN_F_WITH_L3,i=e.type===Yr.SN||e.type===Yr.SLAVE;return!!t.find(a=>{const l=a.baseAddress,c=a.limitAddress,u=a.type===Ao.HN_F_WITHOUT_L3||a.type===Ao.HN_F_WITH_L3,d=a.type===Yr.SN||a.type===Yr.SLAVE;return a.id===e.id||o&&!u||i&&!d||!(l&&c)?!1:_t.getConvertedStrAddressToBigInt(c)>=_t.getConvertedStrAddressToBigInt(n)&&_t.getConvertedStrAddressToBigInt(l)<=_t.getConvertedStrAddressToBigInt(r)})},getRegionNumber:t=>parseInt(t.replace("Region",""),10)};var Tm=(t=>(t[t.HOME=0]="HOME",t[t.SUBORDINATE=1]="SUBORDINATE",t[t.REQUEST=2]="REQUEST",t))(Tm||{});const cHt=({nodeType:t,hnfRouters:e,cnocBridges:n,subordinateDevices:r,isBridgeIncluded:o})=>{switch(t){case Tm.HOME:return e;case Tm.SUBORDINATE:default:return o?[...r,...n]:[...r]}},uHt=({nodeType:t,address:e,componentId:n}
711)=>{switch(t){case Tm.HOME:return e.cnocRouterId===n;case Tm.SUBORDINATE:default:return e.cnocDeviceId===n||e.cnocBridgeId===n}},dHt=({nodeType:t,hnfRouters:e,cnocBridges:n,subordinateDevices:r,cnocAddresses:o,isBridgeIncluded:i})=>cHt({nodeType:t,hnfRouters:e,cnocBridges:n,subordinateDevices:r,isBridgeIncluded:i}).map(a=>{const l=o.reduce((c,u)=>(uHt({nodeType:t,address:u,componentId:a.id})&&c.push({regionName:u.regionName,base:u.base,limit:u.limit,memoryType:u.memoryType}),c),[]);return{id:a.id,name:a.name,addresses:l}}),hHt=t=>t.reduce((e,n)=>(n.addresses.length?n.addresses.forEach(r=>{if(_t.hasBlankAddress(r.base,r.limit)){const o=Zn.getComponentName({regionName:r.regionName,memoryType:r.memoryType,componentName:n.name});e.push(o)}}):e.push(`${n.name}`),e),[]),fHt=(t,e)=>e?t.reduce((n,r)=>{if(_t.hasBlankAddress(r.base,r.limit)){const o=Zn.getRegionName(r.regionName,r.memoryType);return[...n,o]}return n},[]):[],pHt=(t,e)=>t.length?[]:e.reduce((n,r)=>(r.addresses.forEach(o=>{const i=_t.getHexToBigInt(o.base),s=_t.getHexToBigInt(o.limit);if(Zn.hasBaseAddressExceedingLimitAddress(i,s)){const a=Zn.getComponentName({regionName:o.regionName,memoryType:o.memoryType,componentName:r.name});n.push(a)}}),n),[]),gHt=({componentsAndRegionsWithBlankAddresses:t,addresses:e,hasAxiMasterDevices:n})=>t.length||!n?[]:e.reduce((r,o)=>{const i=_t.getHexToBigInt(o.base),s=_t.getHexToBigInt(o.limit);if(Zn.hasBaseAddressExceedingLimitAddress(i,s)){const a=Zn.getRegionName(o.regionName,o.memoryType);return[...r,a]}return r},[]),mHt=(t,e)=>{if(t.length)return[];const n=[];return e.forEach((r,o)=>{const i=vHt(r),s=bHt({addressMap:e,currentComponent:r,idx:o});n.push(...i,...s)}),n},yHt=({componentsAndRegionsWithBlankAddresses:t,addresses:e,hasAxiMasterDevices:n})=>t.length||!n?[]:e.flatMap((r,o)=>{const i=_t.getHexToBigInt(r.base),s=_t.getHexToBigInt(r.limit);return e.slice(o+1).flatMap(a=>{const l=_t.getHexToBigInt(a.base),c=_t.getHexToBigInt(a.limit);if(!Zn.hasOverlappingAddressRegions({currentBase:i,currentLimit:s,comparisonBase:l,comparisonLimit:c}))return[];const d=Zn.getRegionName(r.regionName),h=Zn.getRegionName(a.regionName);return[`${d} and ${h}`]})}),vHt=t=>{const e=[];return t.addresses.forEach((n,r)=>{const o=fbe({currentAddress:n,comparisonComponentAddresses:t.addresses.slice(r+1),currentComponentName:t.name,comparisonComponentName:t.name});e.push(...o)}),e},bHt=({addressMap:t,currentComponent:e,idx:n})=>{const r=[];return t.slice(n+1).forEach(o=>{e.addresses.forEach(i=>{const s=fbe({currentAddress:i,comparisonComponentAddresses:o.addresses,currentComponentName:e.name,comparisonComponentName:o.name});r.push(...s)})}),r},fbe=({currentAddress:t,comparisonComponentAddresses:e,currentComponentName:n,comparisonComponentName:r})=>{const o=[],i=_t.getHexToBigInt(t.base),s=_t.getHexToBigInt(t.limit);return e.forEach(a=>{const l=_t.getHexToBigInt(a.base),c=_t.getHexToBigInt(a.limit);if(Zn.hasOverlappingAddressRegions({currentBase:i,comparisonBase:l,currentLimit:s,comparisonLimit:c})){const d=`${Zn.getComponentName({regionName:t.regionName,memoryType:t.memoryType,componentName:n})} and ${Zn.getComponentName({regionName:a.regionName,memoryType:a.memoryType,componentName:r})}`;o.push(d)}}),o},CHt=({homeNodeAddressMap:t,deviceAddressMap:e,componentsAndRegionsWithBlankAddresses:n})=>{const r=[];return n.length?[]:(e.forEach(o=>{o.addresses.forEach(i=>{const s=_t.getHexToBigInt(i.base),a=_t.getHexToBigInt(i.limit),l=SHt({homeNodeAddressMap:t,subordinateDeviceBase:s,subordinateDeviceLimit:a});if(!Zn.isServicingHomeNodeEqualToOne(l)){const u=Zn.getComponentName({regionName:i.regionName,memoryType:i.memoryType,componentName:o.name});r.push(u);return}const c=EHt({homeNodeAddressMap:t,subordinateNode:o,subordinateNodeAddress:i});r.push(...c)})}),r)},SHt=({homeNodeAddressMap:t,subordinateDeviceBase:e,subordinateDeviceLimit:n})=>t.reduce((r,o)=>{const i=o.addresses.filter(s=>{const a=_t.getHexToBigInt(s.base),l=_t.getHexToBigInt(s.limit);return Zn.hasServicingHomeNode({subordinateDeviceBase:e,homeNodeBase:a,subordinateDeviceLimit:n,homeNodeLimit:l})});return r+i.length},0),EHt=({homeNodeAddressMap:t,subordinateNode:e,subordinateNodeAddress:n})=>{const r=[];return t.forEach(o=>
711{o.addresses.forEach(i=>{const s=_t.getHexToBigInt(n.base),a=_t.getHexToBigInt(n.limit),l=_t.getHexToBigInt(i.base),c=_t.getHexToBigInt(i.limit),u=Zn.hasSimilarMemoryType(n.memoryType,i.memoryType),d=Zn.hasServicingHomeNode({subordinateDeviceBase:s,homeNodeBase:l,subordinateDeviceLimit:a,homeNodeLimit:c});if(!u&&d){const h=`${Zn.getComponentName({regionName:n.regionName,memoryType:n.memoryType,componentName:e.name})} - Mismatched memory type`;r.push(h)}})}),r},xHt=({addressMap:t,base:e,limit:n,componentId:r,regionName:o,memoryType:i})=>{if(_t.hasBlankAddress(e,n))return[];const s=_t.getHexToBigInt(e),a=_t.getHexToBigInt(n);return t.reduce((l,c)=>(c.addresses.forEach(u=>{const d=u.regionName===o&&c.id===r&&i===u.memoryType;if(_t.hasBlankAddress(u.base,u.limit)||d)return;const h=_t.getHexToBigInt(u.base),f=_t.getHexToBigInt(u.limit);Zn.hasOverlappingAddressRegions({currentBase:s,currentLimit:a,comparisonBase:h,comparisonLimit:f})&&l.push(Zn.getComponentName({regionName:u.regionName,memoryType:u.memoryType,componentName:c.name}))}),l),[])},wHt=({addresses:t,base:e,limit:n,addressId:r})=>{if(_t.hasBlankAddress(e,n))return[];const o=_t.getHexToBigInt(e),i=_t.getHexToBigInt(n);return t.reduce((s,a)=>{const l=a.id===r;if(_t.hasBlankAddress(a.base,a.limit)||l)return s;const c=_t.getHexToBigInt(a.base),u=_t.getHexToBigInt(a.limit);return Zn.hasOverlappingAddressRegions({currentBase:o,currentLimit:i,comparisonBase:c,comparisonLimit:u})?[...s,Zn.getRegionName(a.regionName)]:s},[])},AHt=({homeNodeAddressMap:t,subordinateDeviceBase:e,subordinateDeviceLimit:n})=>t.flatMap(r=>r.addresses.reduce((o,i)=>{if(_t.hasBlankAddress(i.base,i.limit))return o;const s=_t.getHexToBigInt(i.base),a=_t.getHexToBigInt(i.limit);return Zn.hasServicingHomeNode({subordinateDeviceBase:e,homeNodeBase:s,subordinateDeviceLimit:n,homeNodeLimit:a})?[...o,Zn.getComponentName({regionName:i.regionName,memoryType:i.memoryType,componentName:r.name})]:o},[])),THt=(t,e)=>t.reduce((n,r)=>{const o=Zn.getMemoryTypeFromComponentName(r);return Zn.hasSimilarMemoryType(e,o)||n.push(`${r} - Mismatched memory type`),n},[]),_Ht=({homeNodeAddressMap:t,base:e,limit:n,memoryType:r})=>{if(_t.hasBlankAddress(e,n))return[];const o=_t.getHexToBigInt(e),i=_t.getHexToBigInt(n),s=AHt({homeNodeAddressMap:t,subordinateDeviceBase:o,subordinateDeviceLimit:i});return Zn.isServicingHomeNodeEqualToOne(s.length)?THt(s,r):s.length?s:["Currently in none"]},pbe=({addresses:t,regionName:e,memoryType:n})=>t.some(r=>r.regionName===e&&r.memoryType===n),gbe=({addresses:t,regionName:e,memoryType:n,editedAddress:r})=>t.map(o=>o.regionName===e&&o.memoryType===n?r:o),IHt=({addressMap:t,componentId:e,editableAddress:n})=>t.map(r=>{if(r.id!==e)return r;const o={regionName:n.regionName,base:n.base,limit:n.limit,memoryType:n.memoryType},i=r.addresses,s=pbe({addresses:i,regionName:n.regionName,memoryType:n.memoryType}),a=gbe({addresses:i,regionName:n.regionName,memoryType:n.memoryType,editedAddress:o}),l=s?a:[...i,o];return{...r,addresses:l}}),PHt=({addressMap:t,componentId:e,editableAddresses:n})=>n.reduce((r,o)=>e===null?r:IHt({addressMap:r,componentId:e,editableAddress:o}),t),RHt=({editableAddresses:t,snoopableAddresses:e})=>t.reduce((n,r)=>r.cnocDeviceId===null&&r.cnocBridgeId===null&&r.cnocRouterId===null?pbe({addresses:n,regionName:r.regionName,memoryType:r.memoryType})?gbe({addresses:n,regionName:r.regionName,memoryType:r.memoryType,editedAddress:r}):[...n,r]:n,e),OHt=({editableAddress:t,mergedHomeNodeAddressMap:e,mergedSubordinateNodeAddressMap:n,mergedSnoopableAddresses:r})=>{const o={base:t.base,limit:t.limit},i=t.cnocDeviceId??t.cnocBridgeId??t.cnocRouterId;if(i!==null){const s=t.cnocRouterId!==null?e:n;return xHt({...o,addressMap:s,componentId:i,regionName:t.regionName,memoryType:t.memoryType})}return wHt({...o,addresses:r,addressId:t.id})},NHt=({editableAddress:t,homeNodeAddressMap:e})=>t.cnocDeviceId!==null?_Ht({homeNodeAddressMap:e,base:t.base,limit:t.limit,memoryType:t.memoryType}):[],Ws={getAddressMap:dHt,getComponentNamesWithBlankAddresses:hHt,getRegionNamesWithBlankAddresses:fHt,getComponentNamesWithBaseAddressExceedingLimitAddress:pHt,getRegionNamesWithBaseAddressExceedingLimitAddress:gHt,getComponentNamesWithOverlappingAddresses:mHt,getRegionNamesWithOverlappingAddresses:yHt,getComponentNamesWithNoneOrMoreThanOneServicingHn:CHt,getMergedAddressMap:PHt,getMergedSnoopableAddressMap:RHt,getOverlappingNamesByAddressInputRange:OHt,getInvalidServicingHomeNodeNamesByAddressInputRange:NHt},Al={getMaxCnocRouterLogicalCoordinateY:t=>Tt.maxBy(t,"logicalCoordinateY")?.logicalCoordinateY??null,getMaxCnocRouterLogicalCoordinateX:t=>Tt.maxBy(t,"logicalCoordinateX")?.logicalCoordinateX??null,getMinCnocRouterLogicalCoordinateY:t=>Tt.minBy(t,"logicalCoordinateY")?.logicalCoordinateY??null,getMinCnocRouterLogicalCoordinateX:t=>Tt.minBy(t,"logicalCoordinateX")?.logicalCoordinateX??null,getCnocRouterInCurrentCoordinate:({cnocRouters:t,logicalCoordinateX:e,logicalCoordinateY:n})=>t.find(r=>r.logicalCoordinateX===e&&r.logicalCoordinateY===n)||null,getHasCnocRouterInAdjacentCoordinates:({cnocRouters:t,logicalCoordinateX:e,logicalCoordinateY:n})=>!!t.find(r=>{const o=(r.logicalCoordinateY===n-1||r.logicalCoordinateY===n+1)&&r.logicalCoordinateX===e,i=(r.logicalCoordinateX===e-1||r.logicalCoordinateX===e+1)&&r.logicalCoordinateY===n;return o||i}),getNextCnocRouterXAxis:({cnocRouters:t,currentCnocRouterXAxisIndex:e,currentCnocRouterYAxisIndex:n})=>t.find(r=>r.logicalCoordinateX===e+1&&r.logicalCoordinateY===n)||null,getNextCnocRouterYAxis:({cnocRouters:t,currentCnocRouterXAxisIndex:e,currentCnocRouterYAxisIndex:n})=>t.find(r=>r.logicalCoordinateX===e&&r.logicalCoordinateY===n+1)||null,getEnabledDevicePortsByUpdatePayload:({value:t,activeCnocRouterEnabledDevicePorts:e})=>t===Ao.REPEATER?[]:e,getUpdatePayload:({field:t,value:e,cnocRouter:n})=>{const r=Al.getEnabledDevicePortsByUpdatePayload({value:e,activeCnocRouterEnabledDevicePorts:n.enabledDevicePorts});return{...n,[t]:e,enabledDevicePorts:r}}};var xr=(t=>(t.NORTH_INGRESS="ICN_INGRESS",t.NORTH_EGRESS="ICN_EGRESS",t.EAST_INGRESS="ICE_INGRESS",t.EAST_EGRESS="ICE_EGRESS",t.SOUTH_INGRESS="ICS_INGRESS",t.SOUTH_EGRESS="ICS_EGRESS",t.WEST_INGRESS="ICW_INGRESS",t.WEST_EGRESS="ICW_EGRESS",t))(xr||{}),wr=(t=>(t[t.NORTH=0]="NORTH",t[t.EAST=1]="EAST",t[t.SOUTH=2]="SOUTH",t[t.WEST=3]="WEST",t))(wr||{});const xE={getId:()=>Qp(),getType:()=>Kl.ROUTER,getFromPort:t=>{switch(t){case wr.NORTH:return xr.NORTH_EGRESS;case wr.EAST:return xr.EAST_EGRESS;case wr.SOUTH:return xr.SOUTH_EGRESS;case wr.WEST:default:return xr.WEST_EGRESS}},getToPort:t=>{switch(t){case wr.NORTH:return xr.SOUTH_INGRESS;case wr.EAST:return xr.WEST_INGRESS;case wr.SOUTH:return xr.NORTH_INGRESS;case wr.WEST:default:return xr.EAST_INGRESS}}},MHt=256,mbe=0,ybe=0,Ry=360,_ne="_",bc={getRouterInterconnectCellId:(t,e)=>`${t}${_ne}${e}`,getRouterIdAndInterconnectDirectionByCellId:t=>{const e=t.lastIndexOf(_ne),n=Number(t.slice(e+1));return{routerId:t.slice(0,e),direction:n}},getOppositeInterconnectDirection:t=>(t+2)%4,getLogicalCoordinatesIncrement:({currentRouterlogicalCoordinateX:t,currentRouterlogicalCoordinateY:e,direction:n,maxCnocRouterLogicalCoordinateX:r,maxCnocRouterLogicalCoordinateY:o})=>{const i={logicalCoordinateX:0,logicalCoordinateY:0};switch(n){case wr.NORTH:if(e>=o)return null;i.logicalCoordinateY=1;break;case wr.EAST:if(t>=r)return null;i.logicalCoordinateX=1;break;case wr.SOUTH:if(e<=ybe)return null;i.logicalCoordinateY=-1;break;case wr.WEST:default:if(t<=mbe)return null;i.logicalCoordinateX=-1}return i},getIsCoordinatesWithinSubtopology:({currentLogicalCoordinates:t,maxCnocRouterLogicalCoordinateX:e,maxCnocRouterLogicalCoordinateY:n})=>t.logicalCoordinateX>=0&&t.logicalCoordinateX<=e&&t.logicalCoordinateY>=0&&t.logicalCoordinateY<=n,getNextRouterAlongInterconnectDirection:({routerId:t,direction:e,cnocRouters:n,maxCnocRouterLogicalCoordinateX:r,maxCnocRouterLogicalCoordinateY:o})=>{const i=n.find(u=>u.id===t);if(!i)return null;const s=i.logicalCoordinateX,a=i.logicalCoordinateY,l=bc.getLogicalCoordinatesIncrement({currentRouterlogicalCoordinateX:s,currentRouterlogicalCoordinateY:a,direction:e,maxCnocRouterLogicalCoordinateX:r,maxCnocRouterLogicalCoordinateY:o});if(!l)return null;const c={logicalCoordinateX:s+l.logicalCoordinateX,logicalCoordinateY:a+l.logicalCoordinateY};do{const u=n.find(d=>d.logicalCoordinateX===c.logicalCoordinateX&&d.logicalCoordinateY===c.logicalCoordinateY);if(u)return u;c.logicalCoordinateX=c.logicalCoordinateX+l.logicalCoordinateX,c.logicalCoordinateY=c.logicalCoordinateY+l.logicalCoordinateY}while(bc.getIsCoordinatesWithinSubtopology({currentLogicalCoordinates:c,maxCnocRouterLogicalCoordinateX:r,maxCnocRouterLogicalCoordinateY:o}));return null},getAllAvailableRouterConnection:(t,e)=>{const n=[],r=um.getIsRouterEgressConnectedAtInterconnectDirection({routerId:t.fromRouterId,direction:t.direction,cnocRouterConnections:e}),o=um.getIsRouterIngressConnectedAtInterconnectDirection({routerId:t.fromRouterId,direction:t.direction,cnocRouterConnections:e});if(r||n.push(t),!o){const i=bc.getOppositeInterconnectDirection(t.direction);n.push({fromRouterId:t.toRouterId,toRouterId:t.fromRouterId,direction:i})}return n},getAllPointsBetweenTwoPoints:({a:t,b:e})=>
711{const n=e.logicalCoordinateX-t.logicalCoordinateX,r=e.logicalCoordinateY-t.logicalCoordinateY;if(!n&&!r)return[];const o=Math.max(Math.abs(n),Math.abs(r))-1,i=Math.sign(n),s=Math.sign(r);return Array.from({length:o},(a,l)=>({logicalCoordinateX:t.logicalCoordinateX+i*(l+1),logicalCoordinateY:t.logicalCoordinateY+s*(l+1)}))},getRouterCoordinatesWithConnectionOver:({cnocRouters:t,cnocRouterConnections:e})=>{const n=e.reduce((o,i)=>{const s=t.find(l=>l.id===i.fromRouterId),a=t.find(l=>l.id===i.toRouterId);if(s&&a){const l=bc.getAllPointsBetweenTwoPoints({a:{logicalCoordinateX:s.logicalCoordinateX,logicalCoordinateY:s.logicalCoordinateY},b:{logicalCoordinateX:a.logicalCoordinateX,logicalCoordinateY:a.logicalCoordinateY}});l.length&&o.push(...l)}return o},[]);return Array.from(new Map(n.map(o=>[`${o.logicalCoordinateX},${o.logicalCoordinateY}`,o])).values())}},um={getIsInterRouterConnectionExisting:({cnocRouterConnections:t,fromRouterId:e,toRouterId:n})=>t.some(r=>r.fromRouterId===e&&r.toRouterId===n),getCreateProjectConnectionCnocRouterPayload:({fromRouterId:t,toRouterId:e,projectId:n,subtopologyId:r,fromDirection:o})=>({id:xE.getId(),type:xE.getType(),fromPort:xE.getFromPort(o),toPort:xE.getToPort(o),fromRouterId:t,toRouterId:e,connectedDeviceId:null,connectedBridgeId:null,projectId:n,subtopologyId:r}),getIsRouterEgressConnectedAtInterconnectDirection:({routerId:t,direction:e,cnocRouterConnections:n})=>{const r=xE.getFromPort(e);return!!n.find(o=>t===o.fromRouterId&&r===o.fromPort)},getIsRouterIngressConnectedAtInterconnectDirection:({routerId:t,direction:e,cnocRouterConnections:n})=>{const r=xE.getToPort(bc.getOppositeInterconnectDirection(e));return!!n.find(o=>t===o.toRouterId&&r===o.toPort)},getIsRouterFullyConnectedAtInterconnectDirection:({routerId:t,direction:e,cnocRouterConnections:n})=>um.getIsRouterEgressConnectedAtInterconnectDirection({routerId:t,direction:e,cnocRouterConnections:n})&&um.getIsRouterIngressConnectedAtInterconnectDirection({routerId:t,direction:e,cnocRouterConnections:n})},Y2={getCoordinatesWithMissingRouter:t=>{const e=[],n=Al.getMaxCnocRouterLogicalCoordinateY(t),r=Al.getMaxCnocRouterLogicalCoordinateX(t);return!Tt.isNumber(n)||!Tt.isNumber(r)||Array.from({length:n+1},(o,i)=>{Array.from({length:r+1},(s,a)=>{const l=i,c=a;Al.getCnocRouterInCurrentCoordinate({cnocRouters:t,logicalCoordinateX:c,logicalCoordinateY:l})||e.push(`( x: ${c}, y: ${l})`)})}),e},getDisconnectedPaths:(t,e)=>t.reduce((n,r)=>{const o=r.logicalCoordinateX,i=r.logicalCoordinateY,s=Al.getNextCnocRouterXAxis({cnocRouters:t,currentCnocRouterXAxisIndex:o,currentCnocRouterYAxisIndex:i}),a=Al.getNextCnocRouterYAxis({cnocRouters:t,currentCnocRouterXAxisIndex:o,currentCnocRouterYAxisIndex:i});if(s){const l=Y2.hasMissingInterRouterConnections({currentCnocRouter:r,nextCnocRouter:s,cnocRouterConnections:e});n.push(...l)}if(a){const l=Y2.hasMissingInterRouterConnections({currentCnocRouter:r,nextCnocRouter:a,cnocRouterConnections:e});n.push(...l)}return n},[]),hasMissingInterRouterConnections:({currentCnocRouter:t,nextCnocRouter:e,cnocRouterConnections:n})=>{const r=[],o=um.getIsInterRouterConnectionExisting({cnocRouterConnections:n,fromRouterId:t.id,toRouterId:e.id}),i=um.getIsInterRouterConnectionExisting({cnocRouterConnections:n,fromRouterId:e.id,toRouterId:t.id});return(!o||!i)&&r.push(`${t.name} and ${e.name}`),r}},Ine={getHasInitiator:t=>t.some(e=>e.type===Yr.RN||e.type===Yr.MASTER),getHasTarget:t=>t.some(e=>e.type===Yr.SN||e.type===Yr.SLAVE)},DHt=({hasInitiator:t,hasTarget:e,hasMinimumConfiguration:n})=>K(le,{children:[g(dr,{isValid:n,label:"Meets minimum configuration:",typographySx:{fontWeight:"bold"},names:[]}),K(le,{pl:2,children:[g(dr,{isValid:t,label:"At least 1 Initiator (RN or Master)",names:[]}),g(dr,{isValid:e,label:"At least 1 Target (SN or Slave)",names:[]})]})]}),LHt=({coordinatesWithMissingRouter:t,disconnectedPaths:e})=>{const n="Topology: No missing router on coordinates",r="Topology: No disconnected paths";return K(le,{children:[g(dr,{isValid:!t.length,label:n,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:r,typographySx:{fontWeight:"bold"},names:e})]})},kHt=({componentsAndRegionsWithBlankAddresses:t,componentsAndRegionsWithBaseExceedingLimit:e,homeNodesWithOverlappingAddresses:n,subordinateDevicesWithOverlappingAddresses:r,snoopableRegionsWithOverlappingAddresses:o,subordinateDevicesWithNoneOrMoreThanOneServicingHn:i})=>{const s="Address Map: No blank addresses",a="Address Map: No HN address blocks overlapping",l="Address Map: No SN address blocks overlapping",c="Address Map: No Snoopable address blocks overlapping",u="Address Map: No base address exceeds its limit address",d="Address Map: All address range of SN regions lies within exactly 1 HN region";return K(le,{children:[g(dr,{isValid:!t.length,label:s,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:u,typographySx:{fontWeight:"bold"},names:e}),g(dr,{isValid:!n.length,label:a,typographySx:{fontWeight:"bold"},names:n}),g(dr,{isValid:!r.length,label:l,typographySx:{fontWeight:"bold"},names:r}),g(dr,{isValid:!o.length,label:c,typographySx:{fontWeight:"bold"},names:o}),g(dr,{isValid:!i.length,label:d,typographySx:{fontWeight:"bold"},names:i})]})};var Oo=(t=>(t[t.NORTH=0]="NORTH",t[t.EAST=1]="EAST",t[t.SOUTH=2]="SOUTH",t[t.WEST=3]="WEST",t))(Oo||{}),Fg=(t=>(t.INGRESS="C2C_INGRESS",t.EGRESS="C2C_EGRESS",t))(Fg||{});const FHt=(t,e)=>t.filter(n=>n.logicalCoordinateX===e.logicalCoordinateX),BHt=(t,e)=>t.filter(n=>n.logicalCoordinateY===e.logicalCoordinateY),$Ht=(t,e)=>{const n=FHt(e,t),r=BHt(e,t);return{minCnocRouterLogicalCoordinateX:Al.getMinCnocRouterLogicalCoordinateX(r),minCnocRouterLogicalCoordinateY:Al.getMinCnocRouterLogicalCoordinateY
711(n),maxCnocRouterLogicalCoordinateX:Al.getMaxCnocRouterLogicalCoordinateX(r),maxCnocRouterLogicalCoordinateY:Al.getMaxCnocRouterLogicalCoordinateY(n)}},HHt=(t,e)=>t.find(n=>n.type===Kl.BRIDGE&&n.fromPort===Fg.EGRESS&&n.connectedBridgeId===e)||null,UHt=(t,e)=>e.find(n=>t.fromRouterId===n.id)||null,zHt=({diagramNodeOrientation:t,parentCnocRouterLogicalCoordinateX:e,parentCnocRouterLogicalCoordinateY:n,minCnocRouterLogicalCoordinateX:r,minCnocRouterLogicalCoordinateY:o,maxCnocRouterLogicalCoordinateX:i,maxCnocRouterLogicalCoordinateY:s})=>{switch(t){case Oo.NORTH:return bM(n,s);case Oo.EAST:return bM(e,i);case Oo.SOUTH:return bM(n,o);case Oo.WEST:default:return bM(e,r)}},bM=(t,e)=>t===e,VHt=({cnocRouters:t,cnocRouterConnections:e,cnocBridges:n})=>n.reduce((r,o)=>{const i=HHt(e,o.id);if(!i)return r;const s=UHt(i,t);if(!s)return r;const{minCnocRouterLogicalCoordinateX:a,minCnocRouterLogicalCoordinateY:l,maxCnocRouterLogicalCoordinateX:c,maxCnocRouterLogicalCoordinateY:u}=$Ht(s,t);if(!Tt.isNumber(a)||!Tt.isNumber(l)||!Tt.isNumber(c)||!Tt.isNumber(u))return r;const d=s.logicalCoordinateX,h=s.logicalCoordinateY;return zHt({diagramNodeOrientation:o.diagramNodeOrientation,parentCnocRouterLogicalCoordinateX:d,parentCnocRouterLogicalCoordinateY:h,minCnocRouterLogicalCoordinateX:a,minCnocRouterLogicalCoordinateY:l,maxCnocRouterLogicalCoordinateX:c,maxCnocRouterLogicalCoordinateY:u})?r:[...r,o.name]},[]),GHt=(t,e)=>{const n=e.length?e[0]:null;return n?t.reduce((r,o)=>{const i=o.topologyLogicalCoordinateX===n.logicalCoordinateX,s=o.topologyLogicalCoordinateY===n.logicalCoordinateY;return i&&s?[...r,o.name]:r},[]):[]},Pne={getNamesOfCnocBridgesNotPositionedAtMeshEdge:VHt,getNamesOfCnocBridgesWithInvalidCoordinates:GHt},WHt=({namesOfCnocBridgesNotPositionedAtMeshEdge:t,namesOfCnocBridgesWithInvalidCoordinates:e})=>{const n="Bridges: All bridges positioned at mesh edge",r="Bridges: All bridge coordinates differ from active topology coordinates";return K(le,{children:[g(dr,{isValid:!t.length,label:n,typographySx:{fontWeight:"bold"},names:t}),g(dr,{isValid:!e.length,label:r,typographySx:{fontWeight:"bold"},names:e})]})},jHt=Nr.injectEndpoints({endpoints:t=>({getAllProjectCnocAddressByProjectId:t.query({query:({projectId:e})=>`${dt.projectCnocAddress}?projectId=${e}`,providesTags:[We.ProjectCnocAddress],transformResponse:e=>e}),bulkUpdateAllProjectCnocAddress:t.mutation({query:({requestBody:e})=>({url:`${dt.projectCnocAddress}`,method:nn.PUT,body:e}),transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.ProjectCnocAddress,We.ProjectRegister]})})}),{useGetAllProjectCnocAddressByProjectIdQuery:qHt,useBulkUpdateAllProjectCnocAddressMutation:vbe}=jHt,K8=t=>{const{data:e=[]}=qHt({projectId:t});return e},bbe=t=>{const e=K8(t),n=Th.getHomeRoutersByProjectId(t);return e.filter(r=>n.some(o=>o.id===r.cnocRouterId))},Cbe=t=>{const e=K8(t),n=Aa.getSubordinateNodesByProjectId(t),r=_h.getAllByProjectId(t);return e.filter(o=>n.some(i=>i.id===o.cnocDeviceId)||r.some(i=>i.id===o.cnocBridgeId)?o.memoryType===Hn.CACHEABLE||o.memoryType===Hn.NON_CACHEABLE:!1)},YHt=t=>K8(t).filter(n=>n.memoryType===Hn.SNOOPABLE),XHt=t=>{const e=bbe(t),n=Cbe(t);return[...e,...n]},Ov={getAllForHomeNodesByProjectId:bbe,getAllForSubordinateNodesByProjectId:Cbe,getAllSnoopableByProjectId:YHt,getAllVisibleByProjectId:XHt},KHt=Nr.injectEndpoints({endpoints:t=>({getAllProjectCnocSubtopologyByProjectId:t.query({query:({projectId:e})=>`${dt.projectCnocSubtopology}/${e}`,providesTags:[We.ProjectCnocSubtopology],transformResponse:(e,n,r)=>e}),createProjectCnocSubtopology:t.mutation({query:({requestBody:e})=>({url:`${dt.projectCnocSubtopology}`,method:nn.POST,body:{projectId:e.projectId,diagramCoordinateX:e.diagramCoordinateX,diagramCoordinateY:e.diagramCoordinateY,routerColumnCount:e.routerColumnCount,routerRowCount:e.routerRowCount,dataWidth:e.dataWidth}}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.ProjectCnocSubtopology,We.ProjectComponentCnocRouter,We.ProjectConnectionCnocRouter]}),updateProjectCnocSubtopology:t.mutation({query:({requestBody:e})=>({url:`${dt.projectCnocSubtopology}`,method:nn.PUT,body:e}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.ProjectCnocSubtopology]}),deleteProjectCnocSubtopology:t.mutation({query:({requestBody:e})=>({url:`${dt.projectCnocSubtopology}`,method:nn.DELETE,body:{id:e.id,projectId:e.projectId}}),transformErrorResponse:e=>e,transformResponse:(e,n,r)=>e,invalidatesTags:[We.ProjectCnocSubtopology,We.ProjectComponentCnocRouter,We.ProjectComponentCnocDevice,We.ProjectComponentCnocBridges,We.ProjectConnectionCnocRouter,We.ProjectCnocAddress]})})}),{useGetAllProjectCnocSubtopologyByProjectIdQuery:Q8,useCreateProjectCnocSubtopologyMutation:QHt,useUpdateProjectCnocSubtopologyMutation:ZHt,useDeleteProjectCnocSubtopologyMutation:JHt}=KHt,e5t=t=>{const{data:e=[]}=Q8({projectId:t});return e},jB={getAllByProjectId:e5t},t5t=({projectId:t,cnocValidationMenuAnchorEl:e,setCnocValidationMenuAnchorEl:n,setIsCnocTopologyValid:r})=>{const o=Aa.getAllByProjectId(t),i=Th.getAllByProjectId(t),s=Tt.sortBy(_h.getAllByProjectId(t),"deviceId"),a=q6.getAllByProjectId(t),l=Th.getHomeRoutersByProjectId(t),c=Aa.get
711SubordinateNodesByProjectId(t),u=Aa.getAllTypeAxiMasterByProjectId(t),d=Ov.getAllForHomeNodesByProjectId(t),h=Ov.getAllForSubordinateNodesByProjectId(t),f=Tt.sortBy(Ov.getAllSnoopableByProjectId(t),ie=>Zn.getRegionNumber(ie.regionName)),p=jB.getAllByProjectId(t),m=Ine.getHasInitiator(o),y=Ine.getHasTarget(o),v=m&&y,b=!!u.length,S=Ws.getAddressMap({nodeType:Tm.HOME,hnfRouters:l,cnocBridges:s,subordinateDevices:c,cnocAddresses:d}),w={nodeType:Tm.SUBORDINATE,hnfRouters:l,cnocBridges:s,subordinateDevices:c,cnocAddresses:h},A=Ws.getAddressMap({...w,isBridgeIncluded:!0}),_=Ws.getAddressMap({...w,isBridgeIncluded:!1}),P=Ws.getComponentNamesWithBlankAddresses(S),R=Ws.getComponentNamesWithBlankAddresses(A),O=Ws.getRegionNamesWithBlankAddresses(f,b),N=[...P,...R,...O],M=Ws.getComponentNamesWithBaseAddressExceedingLimitAddress(N,S),L=Ws.getComponentNamesWithBaseAddressExceedingLimitAddress(N,A),F=Ws.getRegionNamesWithBaseAddressExceedingLimitAddress({componentsAndRegionsWithBlankAddresses:N,addresses:f,hasAxiMasterDevices:b}),$=[...M,...L,...F],D=Ws.getComponentNamesWithOverlappingAddresses(N,S),k=Ws.getComponentNamesWithOverlappingAddresses(N,A),U=Ws.getRegionNamesWithOverlappingAddresses({componentsAndRegionsWithBlankAddresses:N,addresses:f,hasAxiMasterDevices:b}),H=Ws.getComponentNamesWithNoneOrMoreThanOneServicingHn({componentsAndRegionsWithBlankAddresses:N,homeNodeAddressMap:S,deviceAddressMap:_}),V=Y2.getCoordinatesWithMissingRouter(i),q=Y2.getDisconnectedPaths(i,a),J=Pne.getNamesOfCnocBridgesNotPositionedAtMeshEdge({cnocRouters:i,cnocRouterConnections:a,cnocBridges:s}),Q=Pne.getNamesOfCnocBridgesWithInvalidCoordinates(s,p),se=()=>v&&!V.length&&!q.length&&!J.length&&!Q.length&&!N.length&&!$.length&&!D.length&&!k.length&&!U.length&&!H.length,oe=(ie,ee)=>{(ee==="backdropClick"||ee==="escapeKeyDown")&&n(null)};return C.useEffect(()=>{r(se())},[se()]),K(Es,{sx:{"& .MuiMenu-paper":{p:2}},anchorEl:e,open:!!e,onClose:oe,MenuListProps:{onClick:ie=>ie.stopPropagation()},children:[g(DHt,{hasInitiator:m,hasTarget:y,hasMinimumConfiguration:v}),g(LHt,{coordinatesWithMissingRouter:V,disconnectedPaths:q}),g(WHt,{namesOfCnocBridgesNotPositionedAtMeshEdge:J,namesOfCnocBridgesWithInvalidCoordinates:Q}),g(kHt,{componentsAndRegionsWithBlankAddresses:N,componentsAndRegionsWithBaseExceedingLimit:$,homeNodesWithOverlappingAddresses:D,subordinateDevicesWithOverlappingAddresses:k,snoopableRegionsWithOverlappingAddresses:U,subordinateDevicesWithNoneOrMoreThanOneServicingHn:H})]})},n5t=({user:t,projectId:e,activeTab:n})=>{const r=Yn(),o=bt(jP),i=bt(Qx),s=i&&o.isUserBranchControlVisible?i:o.rtlBranchId,a=rc.getById(e),[l,c]=C.useState(!1),[u,d]=C.useState(!1),[h,f]=C.useState(!1),[p,m]=C.useState(!1),[y,v]=C.useState(null),[b,S]=C.useState(null),[w,A]=C.useState(go.GENERATE_NCNOC),[_,P]=C.useState(""),[R,O]=C.useState(Object.values(Nn).reduce((Q,se)=>(Q[se]=!0,Q),{})),{data:N=[]}=Eue(e,{skip:!e,pollingInterval:h||p?yfe:0}),[M,{isLoading:L}]=xue(),[F]=wue(),$=({event:Q,activeTaskType:se})=>{Q.stopPropagation(),S(Q.currentTarget),A(se)},D=()=>{M({projectId:e,userId:t.id,rtlBranchId:s}).then(Q=>{if(Q?.data){const se=document.createElement("a"),oe=new Blob([JSON.stringify(Q?.data,null,4)],{type:"text/plain"});se.href=URL.createObjectURL(oe),se.download=`${a.name}.json`,se.click()}else ln.error(Ep.DOWNLOAD_JSON_FAILED)}).catch(()=>{ln.error(Ep.DOWNLOAD_JSON_FAILED)})},k=async({event:Q,taskId:se})=>{Q.stopPropagation(),ln.info(Ep.DOWNLOAD_INITIATED);const oe=await F({projectId:e,taskId:se}).unwrap();oe.includes("http")?setTimeout(()=>window.location.href=oe,100):ln.error(Ep.DOWNLOAD_FAILED)},U=(Q,se)=>{O(oe=>({...oe,[Q]:se}))},H=Q=>{O(()=>Object.values(Nn).reduce((oe,ie)=>(oe[ie]=Q,oe),{}))},V=Q=>R[Q]?Nn.GENERATE_RTL===Q?Nn.GENERATE_RTL:Q:_,q=()=>{r(AC("")),r(pd(!0))},J=Q=>{f(!1),m(!1),Q.forEach(se=>{if(se.status===fo.PENDING||se.status===fo.RUNNING)switch(se.description){case go.GENERATE_CNOC:f(!0);break;case go.EXPORT_CNOC:m(!0)}})};return C.useEffect(()=>{J(N)},[N]),C.useEffect(()=>{if(!u){d(!0);return}h||p||ln.info(Ep.RESULTS_UPDATED)},[h,p]),C.useEffect(()=>{H(!1),U(Nn.TOPOLOGY_VALIDATION,!0),U(Nn.SYSTEM_CONFIG,!0),U(Nn.GENERATE_RTL,!0),U(Nn.RESULTS,!0),U(Nn.DOWNLOAD_JSON,!0),U(Nn.EXPORT_RTL,!0),P(`Feature not available in C-NoC ${lge.getActiveCenterPanelView(n)}`)}
711,[n]),K(Mt,{direction:"row",sx:{p:"5px",width:"100%",flexWrap:"wrap",alignItems:"center",backgroundColor:tt},children:[g(Pi,{tooltipMessage:V(Nn.TOPOLOGY_VALIDATION),icon:g(h6,{isValid:l}),isFeatureEnabled:R[Nn.TOPOLOGY_VALIDATION],handleActionBarButtonClick:Q=>{Q.stopPropagation(),v(Q.currentTarget)}}),g(qg,{}),g(Pi,{tooltipMessage:V(Nn.AUTO_ROUTE),icon:g($ce,{}),isFeatureEnabled:R[Nn.AUTO_ROUTE]}),g(qg,{}),g(Pi,{tooltipMessage:V(Nn.GENERATE_RTL),icon:g(Ca,{invisible:!h,color:"warning",variant:"dot",children:g(wW,{})}),isFeatureEnabled:R[Nn.GENERATE_RTL],handleActionBarButtonClick:Q=>$({event:Q,activeTaskType:go.GENERATE_CNOC})}),g(Pi,{tooltipMessage:V(Nn.SIMULATE_RTL),icon:g(Oce,{}),isFeatureEnabled:R[Nn.SIMULATE_RTL]}),g(Pi,{tooltipMessage:V(Nn.EXPORT_RTL),icon:g(Ca,{invisible:!p,color:"warning",variant:"dot",children:g(Dce,{})}),isFeatureEnabled:R[Nn.EXPORT_RTL],handleActionBarButtonClick:Q=>$({event:Q,activeTaskType:go.EXPORT_CNOC})}),g(Pi,{tooltipMessage:V(Nn.IMPLEMENT),icon:g(Bce,{}),isFeatureEnabled:R[Nn.IMPLEMENT]}),o.canDownloadJson?K(le,{display:"flex",alignItems:"center",children:[g(qg,{}),g(Pi,{tooltipMessage:V(Nn.DOWNLOAD_JSON),icon:L?g(Ni,{size:20}):g(Rce,{}),isFeatureEnabled:R[Nn.DOWNLOAD_JSON],handleActionBarButtonClick:D})]}):null,g(le,{sx:{flexGrow:1}}),g(Pi,{tooltipMessage:V(Nn.SYSTEM_CONFIG),icon:g(OW,{}),isFeatureEnabled:R[Nn.SYSTEM_CONFIG],handleActionBarButtonClick:()=>q()}),g(t5t,{projectId:e,cnocValidationMenuAnchorEl:y,setCnocValidationMenuAnchorEl:v,setIsCnocTopologyValid:c}),g(Ape,{project:a,tasks:N,user:t,userGroup:o,tasksMenuAnchorEl:b,activeTaskType:w,setTasksMenuAnchorEl:S,handleDownloadTaskResult:k,isTopologyInvalid:!l,exportAuthLevel:o.exportAuthLevel})]})};var Sbe=(t=>(t[t.BITS_128=128]="BITS_128",t[t.BITS_256=256]="BITS_256",t[t.BITS_512=512]="BITS_512",t))(Sbe||{}),Z8=(t=>(t[t.BITS_32=32]="BITS_32",t[t.BITS_64=64]="BITS_64",t[t.BITS_128=128]="BITS_128",t[t.BITS_256=256]="BITS_256",t[t.BITS_512=512]="BITS_512",t[t.BITS_1024=1024]="BITS_1024",t))(Z8||{}),Ebe=(t=>(t[t.BITS_4=4]="BITS_4",t[t.BITS_8=8]="BITS_8",t[t.BITS_12=12]="BITS_12",t[t.BITS_16=16]="BITS_16",t[t.BITS_32=32]="BITS_32",t))(Ebe||{});const r0=t=>Object.entries(t).filter(([e,n])=>isNaN(Number(e))).map(([e,n])=>({key:e,value:n}));var Or=(t=>(t[t.CHI_RN=0]="CHI_RN",t[t.CHI_SN=1]="CHI_SN",t[t.AXI_MASTER=2]="AXI_MASTER",t[t.AXI_SLAVE=3]="AXI_SLAVE",t[t.NONE=4]="NONE",t))(Or||{}),MP=(t=>(t.CHI="CHI",t.AXI="AXI",t))(MP||{});const Nz=(t,e)=>{const n=t===MP.AXI,r=t===MP.CHI,o=e===Yr.RN,i=e===Yr.SN,s=e===Yr.MASTER,a=e===Yr.SLAVE;return r&&o?Or.CHI_RN:r&&i?Or.CHI_SN:n&&s?Or.AXI_MASTER:n&&a?Or.AXI_SLAVE:Or.NONE},r5t=({completeProtocol:t,handleFormInputSelectValueChange:e})=>{const n="Interface Protocol",r=[{key:Or.CHI_RN,value:Or.CHI_RN,displayName:"CHI RN"},{key:Or.CHI_SN,value:Or.CHI_SN,displayName:"CHI SN"},{key:Or.AXI_MASTER,value:Or.AXI_MASTER,displayName:"AXI w/ Slave"},{key:Or.AXI_SLAVE,value:Or.AXI_SLAVE,displayName:"AXI w/ Master"}];return g(Ar,{label:n,controlValue:t,onChangeHandler:o=>{e({field:"protocol",value:o})},options:r})},o5t=({controlValue:t,handleFormInputValueChange:e})=>{const n="Interleaved Subordinate Node",r="isInterleaved";return g(Hr,{label:n,controlValue:t,onChangeHandler:o=>{e({field:r,value:o})}})},i5t=t=>{switch(t){case Or.CHI_RN:case Or.CHI_SN:return MP.CHI;case Or.AXI_MASTER:case Or.AXI_SLAVE:default:return MP.AXI}},s5t=t=>{switch(t){case Or.CHI_RN:return Yr.RN;case Or.CHI_SN:return Yr.SN;case Or.AXI_MASTER:return Yr.MASTER;case Or.AXI_SLAVE:default:return Yr.SLAVE}},a5t=(t,e)=>{switch(t){case Or.CHI_RN:return`CHI_RN_${e}`;case Or.CHI_SN:return`CHI_SN_${e}`;case Or.AXI_MASTER:return`AXI_S_${e}`;case Or.AXI_SLAVE:default:return`AXI_M_${e}`}},l5t=t=>t===Or.AXI_MASTER||t===Or.AXI_SLAVE?Z8.BITS_32:Sbe.BITS_512,DP={getProtocol:i5t,getType:s5t,getName:a5t,getPortDataWidth:l5t},c5t=({field:t,protocol:e,value:n})=>t==="protocol"?DP.getProtocol(n):e,u5t=({field:t,type:e,value:n})=>t==="protocol"?DP.getType(n):e,d5t=({field:t,portDataWidth:e,protocol:n,value:r})=>t==="portDataWidth"?r:t==="protocol"&&DP.getProtocol(r)!==n?DP.getPortDataWidth(r):e,h5t=({field:t,value:e,cnocDevice:n})=>{if(t==="name")return e;const r=[`CHI_RN_${n.deviceId}`,`CHI_SN_${n.deviceId}`,`AXI_M_${n.deviceId}`,`AXI_S_${n.deviceId}`];return t==="protocol"&&r.includes(n.name)?DP.getName(e,n.deviceId):n.name},f5t=({field:t,value:e,cnocDevice:n})=>{const r=u5t({field:t,type:n.type,value:e}),o=c5t({field:t,protocol:n.protocol,value:e}),i=h5t({field:t,value:e,cnocDevice:n}),s=d5t({field:t,portDataWidth:n.portDataWidth,protocol:n.protocol,value:e});return{...n,[t]:e,portDataWidth:s,type:r,protocol:o,name:i}},Mz={getUpdatePayload:f5t},xbe=({controlValue:t,handleFormInputValueChange:e,label:n})=>{const r="isAddressTranslationEnabled";return g(Hr,{label:n,controlValue:t,onChangeHandler:o=>{e({field:r,value:o})}})},J8=({activeComponentName:t,componentType:e})=>g(Bm,{icon:g(RW,{sx:{color:tt}}),title:K(gr,{children:[`Edit ${e} [ `,g(Ke,{variant:"h6",noWrap:!0,component:"span",sx:{textTransform:"uppercase",color:tt,fontSize:"12px"},children:t})," ]"]})}
711),e9=({name:t,label:e,errorMessage:n,currentName:r,setCurrentName:o,isConfirmCancelButtonsVisible:i,setIsConfirmCancelButtonsVisible:s,handleKeyDown:a,handleFormControlNameBlur:l,handleFormControlNameConfirmAction:c,handleCancelNameAction:u,textFieldInputRef:d})=>K(le,{sx:{px:2,mb:1,position:"relative"},children:[g(lo,{inputRef:d,id:"outlined-controlled",label:e,fullWidth:!0,value:r,error:!!n,helperText:g(le,{sx:{position:"absolute",zIndex:2,backgroundColor:"darkRed",px:"2px",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"50%"},component:"span",children:g(Ke,{sx:{fontSize:"12px",color:"white"},component:"span",children:n})}),onKeyDown:a,onBlur:l,onChange:h=>{o(h.target.value),s(h.target.value!==t)},inputProps:{spellCheck:"false"},FormHelperTextProps:{sx:{fontSize:"12px"}},InputLabelProps:{sx:{fontSize:"16px"}}}),i&&g(z8,{handleConfirmAction:c,handleCancelAction:u})]}),p5t=({activeCnocDevice:t,projectId:e,triggerUpdateCnocDeviceRequest:n,setSelectedCnocComponent:r})=>{const o="Interface Name",i="name",s=Aa.getAllByProjectId(e),a=C.useRef(void 0),[l,c]=C.useState(t.name),[u,d]=C.useState(""),[h,f]=C.useState(l!==t.name),p=({name:w=""})=>!!s.filter(P=>P.id!==t.id).find(P=>P.name===w),m=()=>{const w=p({name:l}),A=Hw("Device Name",l);if(d(w?to.nameAlreadyUsed("Device Name"):A),w||A||!h)return;const _=Mz.getUpdatePayload({field:i,value:l,cnocDevice:t});n({updateCnocDeviceRequestPayload:_})},y=()=>{c(t.name),d("")},v=w=>{const A=w.relatedTarget;if(A&&A.id==="cancel"){setTimeout(()=>{f(!1)},100),y();return}m(),f(!1)},b=w=>{w.stopPropagation(),w.key==="Enter"&&a.current&&(w.preventDefault(),a.current.blur())},S=()=>{a.current&&a.current.blur()};return C.useEffect(()=>{d(""),c(t.name),r(t.id)},[t]),C.useEffect(()=>{t.name===l&&d("")},[l,t.name]),g(e9,{name:t.name,label:o,errorMessage:u,currentName:l,setCurrentName:c,isConfirmCancelButtonsVisible:h,setIsConfirmCancelButtonsVisible:f,handleKeyDown:b,handleFormControlNameBlur:v,handleFormControlNameConfirmAction:S,handleCancelNameAction:y,textFieldInputRef:a})},g5t=({cnocDeviceId:t,projectId:e,handleFormControlNumberSubmit:n})=>{const r="Transaction ID Width",o="transactionIdWidth",l=Aa.getById(t,e),c=l?l.transactionIdWidth:8,[u,d]=C.useState(c.toString()),[h,f]=C.useState(""),p=()=>{d(c.toString()),f("")},m=y=>{d(y),y===c.toString()&&f("")};return C.useEffect(()=>{f(""),d(c.toString())},[l]),g(le,{children:g(xn,{label:r,controlValue:u,onChangeHandler:m,onSubmitHandler:()=>{n({currentValue:u,originalValue:c.toString(),minimum:1,maximum:12,setError:f,field:o,formControlLabelName:r})},onCancelHandler:p,isConfirmCancelButtonsEnabled:u!==c.toString(),InputPropsOverride:{type:"number"},textFieldLabel:"min: 1, max: 12",error:!!h,helperText:h,inputPropsOverride:{min:1,max:12}})})},m5t=({cnocDeviceId:t,projectId:e,handleFormControlNumberSubmit:n})=>{const r="User Width",o="userWidth",l=Aa.getById(t,e),c=l?l.userW
711idth:4,[u,d]=C.useState(c.toString()),[h,f]=C.useState(""),p=()=>{d(c.toString()),f("")},m=y=>{d(y),y===c.toString()&&f("")};return C.useEffect(()=>{f(""),d(c.toString())},[l]),g(le,{children:g(xn,{label:r,controlValue:u,onChangeHandler:m,onSubmitHandler:()=>{n({currentValue:u,originalValue:c.toString(),minimum:1,maximum:32,setError:f,field:o,formControlLabelName:r})},onCancelHandler:p,isConfirmCancelButtonsEnabled:u!==c.toString(),InputPropsOverride:{type:"number"},textFieldLabel:"min: 1, max: 32",error:!!h,helperText:h,inputPropsOverride:{min:1,max:32}})})},y5t=({cnocDeviceId:t,projectId:e,handleFormControlNumberSubmit:n})=>{const r="Address Width",o="addressWidth",l=Aa.getById(t,e),c=l?l.addressWidth:40,[u,d]=C.useState(c.toString()),[h,f]=C.useState(""),p=()=>{d(c.toString()),f("")},m=y=>{d(y),y===c.toString()&&f("")};return C.useEffect(()=>{f(""),d(c.toString())},[l]),g(le,{children:g(xn,{label:r,controlValue:u,onChangeHandler:m,onSubmitHandler:()=>{n({currentValue:u,originalValue:c.toString(),minimum:1,maximum:52,setError:f,field:o,formControlLabelName:r})},onCancelHandler:p,isConfirmCancelButtonsEnabled:u!==c.toString(),InputPropsOverride:{type:"number"},textFieldLabel:"min: 1, max: 52",error:!!h,helperText:h,inputPropsOverride:{min:1,max:52}})})},v5t=({projectId:t,cnocDevice:e,setSelectedCnocDevice:n,triggerUpdateProjectTimestamp:r})=>{const o="Node ID",i="Device",s="Parameters",a="Port Data Width",l=`${js}${e.nodeId} (${parseInt(e.nodeId,16)})`,[c]=Vxt(),[u,d]=C.useState(qn.PARAMETERS),h=Nz(e.protocol,e.type),f=async({updateCnocDeviceRequestPayload:v})=>{await c({requestBody:v})&&(await r(),n(v.id))},p=(v,b)=>d(b),m=({field:v,value:b})=>{const S=Mz.getUpdatePayload({field:v,value:b,cnocDevice:e});f({updateCnocDeviceRequestPayload:S})},y=({currentValue:v,originalValue:b,minimum:S,maximum:w,setError:A,field:_,formControlLabelName:P})=>{const R=ga({value:v,minimum:S,maximum:w,formControlLabelName:P});if(A(R),!R&&Number(v)!==Number(b)){const O=Mz.getUpdatePayload({field:_,value:v,cnocDevice:e});f({updateCnocDeviceRequestPayload:O})}};return K(le,{children:[g(J8,{activeComponentName:e.name,componentType:i}),g(le,{sx:{background:tt,height:36.56}}),g(p5t,{activeCnocDevice:e,projectId:t,triggerUpdateCnocDeviceRequest:f,setSelectedCnocComponent:n}),g(le,{sx:{mb:1},children:g(yi,{})}),g(yS,{activeTab:u,tabOptions:[{value:qn.PARAMETERS,label:s}],handleActiveTabChange:p}),u===qn.PARAMETERS?K(le,{children:[g(Jo,{label:o,value:l}),g(r5t,{completeProtocol:h,handleFormInputSelectValueChange:m}),h===Or.CHI_SN||h===Or.AXI_SLAVE?K(le,{children:[g(o5t,{controlValue:e.isInterleaved,handleFormInputValueChange:m}),g(xbe,{controlValue:e.isAddressTranslationEnabled,handleFormInputValueChange:m,label:"Use Address Translation"})]}):null,h===Or.CHI_RN||h===Or.CHI_SN?g(Jo,{label:a,value:e.portDataWidth}):g(Ar,{label:a,controlValue:e.portDataWidth.toString(),onChangeHandler:v=>{m({field:"portDataWidth",value:v})},options:r0(Z8)}),g(Ar,{label:"Reserved Port Data Width",controlValue:e.reservedPortDataWidth.toString(),onChangeHandler:v=>{m({field:"reservedPortDataWidth",value:v})},options:r0(Ebe)}),h===Or.AXI_MASTER||h===Or.AXI_SLAVE?K(le,{children:[g(g5t,{cnocDeviceId:e.id,projectId:t,handleFormControlNumberSubmit:y}),g(m5t,{cnocDeviceId:e.id,projectId:t,handleFormControlNumberSubmit:y}),g(y5t,{cnocDeviceId:e.id,projectId:t,handleFormControlNumberSubmit:y})]}):null]}):null]})},b5t=({cnocRouter:t,handleFormControlIntegerSubmit:e})=>{const[n,r]=C.useState(t.devicePortRxReqFifoPtrWidth.toString()),[o,i]=C.useState(t.devicePortRxRspFifoPtrWidth.toString()),[s,a]=C.useState(t.devicePortRxDatFifoPtrWidth.toString()),[l,c]=C.useState(t.devicePortTxReqFifoPtrWidth.toString()),[u,d]=C.useState(t.devicePortTxRspFifoPtrWidth.toString()),[h,f]=C.useState(t.devicePortTxDatFifoPtrWidth.toString()),[p,m]=C.useState(""),[y,v]=C.useState(""),[b,S]=C.useState(""),[w,A]=C.useState(""),[_,P]=C.useState(""),[R,O]=C.useState("");return C.useEffect(()=>{m(""),v(""),S(""),A(""),P(""),O(""),r(t.devicePortRxReqFifoPtrWidth.toString()),i(t.devicePortRxRspFifoPtrWidth.toString()),a(t.devicePortRxDatFifoPtrWidth.toString()),c(t.devicePortTxReqFifoPtrWidth.toString()),d(t.devicePortTxRspFifoPtrWidth.toString()),f(t.devicePortTxDatFifoPtrWidth.toString())},[t]),C.useEffect(()=>{Number(n)===t.devicePortRxReqFifoPtrWidth&&m(""),Number(o)===t.devicePortRxRspFifoPtrWidth&&v(""),Number(s)===t.devicePortRxDatFifoPtrWidth&&S(""),Number(l)===t.devicePortTxReqFifoPtrWidth&&A(""),Number(u)===t.devicePortTxRspFifoPtrWidth&&P(""),Number(h)===t.devicePortTxDatFifoPtrWidth&&O("")},[n,o,s,l,u,h]),K(le,{pb:2,children:[g(xn,{label:Vn.RX_REQ_FIFO_PTR_WIDTH,controlValue:n,onChangeHandler:N=>{r(N)},onSubmitHandler:()=>{e({currentValue:n,originalValue:t.devicePortRxReqFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:m,field:_i.DEVICE_PORT_RX_REQ_FIFO_PTR_WIDTH,formControl
711LabelName:Vn.RX_REQ_FIFO_PTR_WIDTH})},onCancelHandler:()=>{m(""),r(t.devicePortRxReqFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(n)!==t.devicePortRxReqFifoPtrWidth,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,error:!!p,helperText:p}),g(xn,{label:Vn.RX_RSP_FIFO_PTR_WIDTH,controlValue:o,onChangeHandler:N=>{i(N)},onSubmitHandler:()=>{e({currentValue:o,originalValue:t.devicePortRxRspFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:v,field:_i.DEVICE_PORT_RX_RSP_FIFO_PTR_WIDTH,formControlLabelName:Vn.RX_RSP_FIFO_PTR_WIDTH})},onCancelHandler:()=>{v(""),i(t.devicePortRxRspFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(o)!==t.devicePortRxRspFifoPtrWidth,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,error:!!y,helperText:y}),g(xn,{label:Vn.RX_DAT_FIFO_PTR_WIDTH,controlValue:s,onChangeHandler:N=>{a(N)},onSubmitHandler:()=>{e({currentValue:s,originalValue:t.devicePortRxDatFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:S,field:_i.DEVICE_PORT_RX_DAT_FIFO_PTR_WIDTH,formControlLabelName:Vn.RX_DAT_FIFO_PTR_WIDTH})},onCancelHandler:()=>{S(""),a(t.devicePortRxDatFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(s)!==t.devicePortRxDatFifoPtrWidth,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,error:!!b,helperText:b}),g(xn,{label:Vn.TX_REQ_FIFO_PTR_WIDTH,controlValue:l,onChangeHandler:N=>{c(N)},onSubmitHandler:()=>{e({currentValue:l,originalValue:t.devicePortTxReqFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:A,field:_i.DEVICE_PORT_TX_REQ_FIFO_PTR_WIDTH,formControlLabelName:Vn.TX_REQ_FIFO_PTR_WIDTH})},onCancelHandler:()=>{A(""),c(t.devicePortTxReqFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(l)!==t.devicePortTxReqFifoPtrWidth,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,error:!!w,helperText:w}),g(xn,{label:Vn.TX_RSP_FIFO_PTR_WIDTH,controlValue:u,onChangeHandler:N=>{d(N)},onSubmitHandler:()=>{e({currentValue:u,originalValue:t.devicePortTxRspFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:P,field:_i.DEVICE_PORT_TX_RSP_FIFO_PTR_WIDTH,formControlLabelName:Vn.TX_RSP_FIFO_PTR_WIDTH})},onCancelHandler:()=>{P(""),d(t.devicePortTxRspFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(u)!==t.devicePortTxRspFifoPtrWidth,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,error:!!_,helperText:_}),g(xn,{label:Vn.TX_DAT_FIFO_PTR_WIDTH,controlValue:h,onChangeHandler:N=>{f(N)},onSubmitHandler:()=>{e({currentValue:h,originalValue:t.devicePortTxDatFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:O,field:_i.DEVICE_PORT_TX_DAT_FIFO_PTR_WIDTH,formControlLabelName:Vn.TX_DAT_FIFO_PTR_WIDTH})},onCancelHandler:()=>{O(""),f(t.devicePortTxDatFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(h)!==t.devicePortTxDatFifoPtrWidth,InputPropsOverride:{type:"number"},textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,error:!!R,helperText:R})]})},C5t=({cnocRouter:t,handleFormControlIntegerSubmit:e})=>{const[n,r]=C.useState(t.icPortReqFifoPtrWidth.toString()),[o,i]=C.useState(t.icPortRespFifoPtrWidth.toString()),[s,a]=C.useState(t.icPortDataFifoPtrWidth.toString()),[l,c]=C.useState(""),[u,d]=C.useState(""),[h,f]=C.useState("");return C.useEffect(()=>{c(""),d(""),f(""),r(t.icPortReqFifoPtrWidth.toString()),i(t.icPortRespFifoPtrWidth.toString()),a(t.icPortDataFifoPtrWidth.toString())},[t]),C.useEffect(()=>{Number(n)===t.icPortReqFifoPtrWidth&&c(""),Number(o)===t.icPortRespFifoPtrWidth&&d(""),Number(s)===t.icPortDataFifoPtrWidth&&f("")},[n,o,s]),K(le,{pb:2,children:[g(xn,{label:Vn.REQ_FIFO_PTR_WIDTH,controlValue:n,onChangeHandler:p=>{r(p)},onSubmitHandler:()=>{e({currentValue:n,originalValue:t.icPortReqFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:c,field:_i.IC_PORT_REQ_FIFO_PTR_WIDTH,formControlLabelName:Vn.REQ_FIFO_PTR_WIDTH})},onCancelHandler:()=>{c(""),r(t.icPortReqFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(n)!==t.icPortReqFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!l,helperText:l}),g(xn,{label:Vn.RESP_FIFO_PTR_WIDTH,controlValue:o,onChangeHandler:p=>{i(p)},onSubmitHandler:()=>{e({currentValue:o,originalValue:t.icPortRespFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:d,field:_i.IC_PORT_RESP_FIFO_PTR_WIDTH,formControl
711LabelName:Vn.RESP_FIFO_PTR_WIDTH})},onCancelHandler:()=>{d(""),i(t.icPortRespFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(o)!==t.icPortRespFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!u,helperText:u}),g(xn,{label:Vn.DATA_FIFO_PTR_WIDTH,controlValue:s,onChangeHandler:p=>{a(p)},onSubmitHandler:()=>{e({currentValue:s,originalValue:t.icPortDataFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:f,field:_i.IC_PORT_DATA_FIFO_PTR_WIDTH,formControlLabelName:Vn.DATA_FIFO_PTR_WIDTH})},onCancelHandler:()=>{f(""),a(t.icPortDataFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(s)!==t.icPortDataFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!h,helperText:h})]})};var t9=(t=>(t[t.ONE=1]="ONE",t[t.TWO=2]="TWO",t[t.FOUR=4]="FOUR",t[t.EIGHT=8]="EIGHT",t[t.SIXTEEN=16]="SIXTEEN",t[t.THIRTY_TWO=32]="THIRTY_TWO",t))(t9||{});const S5t=({routerId:t,collisionBufferSize:e,handleFormControlIntegerSubmit:n})=>{const r="REQ Collision Buffer Size",o="dccReqCollisionBufferSize",[i,s]=C.useState(e.toString()),[a,l]=C.useState("");return C.useEffect(()=>{l(""),s(e.toString())},[t]),C.useEffect(()=>{Number(i)===e&&l("")},[i]),g(xn,{label:r,controlValue:i,onChangeHandler:c=>{s(c)},onSubmitHandler:()=>{n({currentValue:i,originalValue:e,minimum:lv.MINIMUM,maximum:lv.MAXIMUM,setError:l,field:o,formControlLabelName:r})},onCancelHandler:()=>{l(""),s(e.toString())},isConfirmCancelButtonsEnabled:Number(i)!==e,textFieldLabel:`min: ${lv.MINIMUM}, max: ${lv.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!a,helperText:a})},E5t=({routerId:t,outstandingBufferSize:e,handleFormControlIntegerSubmit:n})=>{const r="REQ Outstanding Buffer Size",o="dccReqOutstandingBufferSize",[i,s]=C.useState(e.toString()),[a,l]=C.useState("");return C.useEffect(()=>{l(""),s(e.toString())},[t]),C.useEffect(()=>{Number(i)===e&&l("")},[i]),g(xn,{label:r,controlValue:i,onChangeHandler:c=>{s(c)},onSubmitHandler:()=>{n({currentValue:i,originalValue:e,minimum:lv.MINIMUM,maximum:lv.MAXIMUM,setError:l,field:o,formControlLabelName:r})},onCancelHandler:()=>{l(""),s(e.toString())},isConfirmCancelButtonsEnabled:Number(i)!==e,textFieldLabel:`min: ${lv.MINIMUM}, max: ${lv.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!a,helperText:a})},x5t=({routerId:t,hdrFifoPtrWidth:e,handleFormControlIntegerSubmit:n})=>{const r="HDR FIFO Ptr Width",o="dccHdrFifoPtrWidth",[i,s]=C.useState(e.toString()),[a,l]=C.useState("");return C.useEffect(()=>{l(""),s(e.toString())},[t]),C.useEffect(()=>{Number(i)===e&&l("")},[i]),g(xn,{label:r,controlValue:i,onChangeHandler:c=>{s(c)},onSubmitHandler:()=>{n({currentValue:i,originalValue:e,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:l,field:o,formControlLabelName:r})},onCancelHandler:()=>{l(""),s(e.toString())},isConfirmCancelButtonsEnabled:Number(i)!==e,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!a,helperText:a})};var wbe=(t=>(t[t.TWO=2]="TWO",t[t.FOUR=4]="FOUR",t[t.EIGHT=8]="EIGHT",t[t.SIXTEEN=16]="SIXTEEN",t[t.THIRTY_TWO=32]="THIRTY_TWO",t))(wbe||{});const w5t=({routerId:t,cacheByteOffsetWidth:e,handleFormControlIntegerSubmit:n})=>{const r="Cache Byte Offset Width",o="dccCacheByteOffsetWidth",[i,s]=C.useState(e.toString()),[a,l]=C.useState("");return C.useEffect(()=>{l(""),s(e.toString())},[t]),C.useEffect(()=>{Number(i)===e&&l("")},[i]),g(xn,{label:r,controlValue:i,onChangeHandler:c=>{s(c)},onSubmitHandler:()=>{n({currentValue:i,originalValue:e,minimum:vM.MINIMUM,maximum:vM.MAXIMUM,setError:l,field:o,formControlLabelName:r})},onCancelHandler:()=>{l(""),s(e.toString())},isConfirmCancelButtonsEnabled:Number(i)!==e,textFieldLabel:`min: ${vM.MINIMUM}, max: ${vM.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!a,helperText:a})},A5t=({cnocRouter:t,handleFormInputSelectValueChange:e,handleFormControlIntegerSubmit:n})=>{const[r,o]=C.useState(t.dccRxReqFifoPtrWidth.toString()),[i,s]=C.useState(t.dccRxRspFifoPtrWidth.toString()),[a,l]=C.useState(t.dccRxDatFifoPtrWidth.toString()),[c,u]=C.useState(t.dccTxReqFifoPtrWidth.toString()),[d,h]=C.useState(t.dccTxRspFifoPtrWidth.toString()),[f,p]=C.useState(t.dccTxDatFifoPtrWidth.toString()),[m,y]=C.useState(t.dccCacheIndexWidth.toString()),[v,b]=C.useState(t.dccReq
711CmdFifoPtrWidth.toString()),[S,w]=C.useState(t.dccRspCmdFifoPtrWidth.toString()),[A,_]=C.useState(t.dccDatCmdFifoPtrWidth.toString()),[P,R]=C.useState(""),[O,N]=C.useState(""),[M,L]=C.useState(""),[F,$]=C.useState(""),[D,k]=C.useState(""),[U,H]=C.useState(""),[V,q]=C.useState(""),[J,Q]=C.useState(""),[se,oe]=C.useState(""),[ie,ee]=C.useState(""),re=fe=>2**fe;return C.useEffect(()=>{R(""),N(""),L(""),$(""),k(""),H(""),q(""),Q(""),oe(""),ee(""),o(t.dccRxReqFifoPtrWidth.toString()),s(t.dccRxRspFifoPtrWidth.toString()),l(t.dccRxDatFifoPtrWidth.toString()),u(t.dccTxReqFifoPtrWidth.toString()),h(t.dccTxRspFifoPtrWidth.toString()),p(t.dccTxDatFifoPtrWidth.toString()),y(t.dccCacheIndexWidth.toString()),b(t.dccReqCmdFifoPtrWidth.toString()),w(t.dccRspCmdFifoPtrWidth.toString()),_(t.dccDatCmdFifoPtrWidth.toString())},[t]),C.useEffect(()=>{Number(r)===t.dccRxReqFifoPtrWidth&&R(""),Number(i)===t.dccRxRspFifoPtrWidth&&N(""),Number(a)===t.dccRxDatFifoPtrWidth&&L(""),Number(c)===t.dccTxReqFifoPtrWidth&&$(""),Number(d)===t.dccTxRspFifoPtrWidth&&k(""),Number(f)===t.dccTxDatFifoPtrWidth&&H(""),Number(m)===t.dccCacheIndexWidth&&q(""),Number(v)===t.dccReqCmdFifoPtrWidth&&Q(""),Number(S)===t.dccRspCmdFifoPtrWidth&&oe(""),Number(A)===t.dccDatCmdFifoPtrWidth&&ee("")},[r,i,a,c,d,f,m,v,S,A]),K(le,{pb:2,children:[g(xn,{label:Vn.RX_REQ_FIFO_PTR_WIDTH,controlValue:r,onChangeHandler:fe=>{o(fe)},onSubmitHandler:()=>{n({currentValue:r,originalValue:t.dccRxReqFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:R,field:_i.DCC_RX_REQ_FIFO_PTR_WIDTH,formControlLabelName:Vn.RX_REQ_FIFO_PTR_WIDTH})},onCancelHandler:()=>{R(""),o(t.dccRxReqFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(r)!==t.dccRxReqFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!P,helperText:P}),g(xn,{label:Vn.RX_RSP_FIFO_PTR_WIDTH,controlValue:i,onChangeHandler:fe=>{s(fe)},onSubmitHandler:()=>{n({currentValue:i,originalValue:t.dccRxRspFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:N,field:_i.DCC_RX_RSP_FIFO_PTR_WIDTH,formControlLabelName:Vn.RX_RSP_FIFO_PTR_WIDTH})},onCancelHandler:()=>{N(""),s(t.dccRxRspFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(i)!==t.dccRxRspFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!O,helperText:O}),g(xn,{label:Vn.RX_DAT_FIFO_PTR_WIDTH,controlValue:a,onChangeHandler:fe=>{l(fe)},onSubmitHandler:()=>{n({currentValue:a,originalValue:t.dccRxDatFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:L,field:_i.DCC_RX_DAT_FIFO_PTR_WIDTH,formControlLabelName:Vn.RX_DAT_FIFO_PTR_WIDTH})},onCancelHandler:()=>{L(""),l(t.dccRxDatFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(a)!==t.dccRxDatFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!M,helperText:M}),g(xn,{label:Vn.TX_REQ_FIFO_PTR_WIDTH,controlValue:c,onChangeHandler:fe=>{u(fe)},onSubmitHandler:()=>{n({currentValue:c,originalValue:t.dccTxReqFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:$,field:_i.DCC_TX_REQ_FIFO_PTR_WIDTH,formControlLabelName:Vn.TX_REQ_FIFO_PTR_WIDTH})},onCancelHandler:()=>{$(""),u(t.dccTxReqFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(c)!==t.dccTxReqFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!F,helperText:F}),g(xn,{label:Vn.TX_RSP_FIFO_PTR_WIDTH,controlValue:d,onChangeHandler:fe=>{h(fe)},onSubmitHandler:()=>{n({currentValue:d,originalValue:t.dccTxRspFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:k,field:_i.DCC_TX_RSP_FIFO_PTR_WIDTH,formControlLabelName:Vn.TX_RSP_FIFO_PTR_WIDTH})},onCancelHandler:()=>{k(""),h(t.dccTxRspFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(d)!==t.dccTxRspFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!D,helperText:D}),g(xn,{label:Vn.TX_DAT_FIFO_PTR_WIDTH,controlValue:f,onChangeHandler:fe=>{p(fe)},onSubmitHandler:()=>{n({currentValue:f,originalValue:t.dccTxDatFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:H,field:_i.DCC_TX_DAT_FIFO_PTR_WIDTH,formControl
711LabelName:Vn.TX_DAT_FIFO_PTR_WIDTH})},onCancelHandler:()=>{H(""),p(t.dccTxDatFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(f)!==t.dccTxDatFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!U,helperText:U}),g(w5t,{routerId:t.id,cacheByteOffsetWidth:t.dccCacheByteOffsetWidth,handleFormControlIntegerSubmit:n}),g(xn,{label:Vn.CACHE_INDEX_WIDTH,controlValue:m,onChangeHandler:fe=>{y(fe)},onSubmitHandler:()=>{n({currentValue:m,originalValue:t.dccCacheIndexWidth,minimum:Xd.MINIMUM,maximum:Xd.MAXIMUM,setError:q,field:_i.DCC_CACHE_INDEX_WIDTH,formControlLabelName:Vn.CACHE_INDEX_WIDTH})},onCancelHandler:()=>{q(""),y(t.dccCacheIndexWidth.toString())},isConfirmCancelButtonsEnabled:Number(m)!==t.dccCacheIndexWidth,textFieldLabel:`min: ${Xd.MINIMUM}, max: ${Xd.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!V,helperText:V}),g(Ar,{label:Vn.CACHE_N_SET,controlValue:t.dccCacheNSet.toString(),onChangeHandler:fe=>{e({field:_i.DCC_CACHE_N_SET,value:fe})},options:r0(t9)}),g(xn,{label:Vn.REQ_CMD_FIFO_PTR_WIDTH,controlValue:v,onChangeHandler:fe=>{b(fe)},onSubmitHandler:()=>{n({currentValue:v,originalValue:t.dccReqCmdFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:Q,field:_i.DCC_REQ_CMD_FIFO_PTR_WIDTH,formControlLabelName:Vn.REQ_CMD_FIFO_PTR_WIDTH})},onCancelHandler:()=>{Q(""),b(t.dccReqCmdFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(v)!==t.dccReqCmdFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!J,helperText:J}),g(Jo,{label:Vn.REQ_CMD_FIFO_SIZE,value:re(t.dccReqCmdFifoPtrWidth)}),g(xn,{label:Vn.RSP_CMD_FIFO_PTR_WIDTH,controlValue:S,onChangeHandler:fe=>{w(fe)},onSubmitHandler:()=>{n({currentValue:S,originalValue:t.dccRspCmdFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:oe,field:_i.DCC_RSP_CMD_FIFO_PTR_WIDTH,formControlLabelName:Vn.RSP_CMD_FIFO_PTR_WIDTH})},onCancelHandler:()=>{oe(""),w(t.dccRspCmdFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(S)!==t.dccRspCmdFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!se,helperText:se}),g(Jo,{label:Vn.RSP_CMD_FIFO_SIZE,value:re(t.dccRspCmdFifoPtrWidth)}),g(xn,{label:Vn.DAT_CMD_FIFO_PTR_WIDTH,controlValue:A,onChangeHandler:fe=>{_(fe)},onSubmitHandler:()=>{n({currentValue:A,originalValue:t.dccDatCmdFifoPtrWidth,minimum:Zt.MINIMUM,maximum:Zt.MAXIMUM,setError:ee,field:_i.DCC_DAT_CMD_FIFO_PTR_WIDTH,formControlLabelName:Vn.DAT_CMD_FIFO_PTR_WIDTH})},onCancelHandler:()=>{ee(""),_(t.dccDatCmdFifoPtrWidth.toString())},isConfirmCancelButtonsEnabled:Number(A)!==t.dccDatCmdFifoPtrWidth,textFieldLabel:`min: ${Zt.MINIMUM}, max: ${Zt.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!ie,helperText:ie}),g(Jo,{label:Vn.DAT_CMD_FIFO_SIZE,value:re(t.dccDatCmdFifoPtrWidth)}),g(Ar,{label:Vn.DAT_RSP_CMD_FIFO_SIZE,controlValue:t.dccDatRspCmdFifoSize.toString(),onChangeHandler:fe=>{e({field:_i.DCC_DAT_RSP_CMD_FIFO_SIZE,value:fe})},options:r0(wbe)}),g(S5t,{routerId:t.id,collisionBufferSize:t.dccReqCollisionBufferSize,handleFormControlIntegerSubmit:n}),g(E5t,{routerId:t.id,outstandingBufferSize:t.dccReqOutstandingBufferSize,handleFormControlIntegerSubmit:n}),g(x5t,{routerId:t.id,hdrFifoPtrWidth:t.dccHdrFifoPtrWidth,handleFormControlIntegerSubmit:n})]})},T5t=({cnocRouter:t,handleFormInputSelectValueChange:e,handleFormControlIntegerSubmit:n})=>{const[r,o]=C.useState(t.l3CacheByteOffsetWidth.toString()),[i,s]=C.useState(t.l3CacheIndexWidth.toString()),[a,l]=C.useState(""),[c,u]=C.useState("");return C.useEffect(()=>{l(""),u(""),o(t.l3CacheByteOffsetWidth.toString()),s(t.l3CacheIndexWidth.toString())},[t]),C.useEffect(()=>{Number(r)===t.l3CacheByteOffsetWidth&&l(""),Number(i)===t.l3CacheIndexWidth&&u("")},[r,i]),K(le,{pb:2,children:[g(xn,{label:Vn.L3_CACHE_BYTE_OFFSET_WIDTH,controlValue:r,onChangeHandler:d=>{o(d)},onSubmitHandler:()=>{n({currentValue:r,originalValue:t.l3CacheByteOffsetWidth,minimum:Xd.MINIMUM,maximum:Xd.MAXIMUM,setError:l,field:_i.L3_CACHE_BYTE_OFFSET_WIDTH,formControl
711LabelName:Vn.L3_CACHE_BYTE_OFFSET_WIDTH})},onCancelHandler:()=>{l(""),o(t.l3CacheByteOffsetWidth.toString())},isConfirmCancelButtonsEnabled:Number(r)!==t.l3CacheByteOffsetWidth,textFieldLabel:`min: ${Xd.MINIMUM}, max: ${Xd.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!a,helperText:a}),g(xn,{label:Vn.L3_CACHE_INDEX_WIDTH,controlValue:i,onChangeHandler:d=>{s(d)},onSubmitHandler:()=>{n({currentValue:i,originalValue:t.l3CacheIndexWidth,minimum:Xd.MINIMUM,maximum:Xd.MAXIMUM,setError:u,field:_i.L3_CACHE_INDEX_WIDTH,formControlLabelName:Vn.L3_CACHE_INDEX_WIDTH})},onCancelHandler:()=>{u(""),s(t.l3CacheIndexWidth.toString())},isConfirmCancelButtonsEnabled:Number(i)!==t.l3CacheIndexWidth,textFieldLabel:`min: ${Xd.MINIMUM}, max: ${Xd.MAXIMUM}`,InputPropsOverride:{type:"number"},error:!!c,helperText:c}),g(Ar,{label:Vn.L3_CACHE_N_SET,controlValue:t.l3CacheNSet.toString(),onChangeHandler:d=>{e({field:_i.L3_CACHE_N_SET,value:d})},options:r0(t9)})]})},_5t=({controlValue:t,handleFormInputValueChange:e})=>{const n="Hashed Home Node",r="isHashed";return g(Hr,{label:n,controlValue:t,onChangeHandler:o=>{e({field:r,value:o})}})};var qu=(t=>(t[t.DEVICE=0]="DEVICE",t[t.INTERCONNECT=1]="INTERCONNECT",t[t.DIRECTORY_CACHE_CONTROLLER=2]="DIRECTORY_CACHE_CONTROLLER",t[t.L3_CACHE_CONTROLLER=3]="L3_CACHE_CONTROLLER",t))(qu||{});const I5t=({activeRouterParameterTab:t,setActiveRouterParameterTab:e,routerType:n})=>{const r=(a,l)=>e(l),o=n===Ao.HN_F_WITH_L3||n===Ao.HN_F_WITHOUT_L3,i=n===Ao.HN_F_WITH_L3,s=[{value:qu.DEVICE,label:"Device Port"},{value:qu.INTERCONNECT,label:"Interconnect Port"},...o?[{value:qu.DIRECTORY_CACHE_CONTROLLER,label:"Directory Cache Controller"}]:[],...i?[{value:qu.L3_CACHE_CONTROLLER,label:"L3 Cache Controller"}]:[]];return C.useEffect(()=>{const a=t===qu.DIRECTORY_CACHE_CONTROLLER,l=t===qu.L3_CACHE_CONTROLLER;(a&&!o||l&&!i)&&e(qu.DEVICE)},[t,o,i,e]),g(yS,{activeTab:t,tabOptions:s,handleActiveTabChange:r})},P5t=({activeCnocRouter:t,componentType:e,projectId:n,triggerUpdateCnocRouterRequest:r,setSelectedCnocComponent:o})=>{const i=`${e} Name`,s="name",a=Th.getAllByProjectId(n),l=C.useRef(void 0),[c,u]=C.useState(t.name),[d,h]=C.useState(""),[f,p]=C.useState(c!==t.name),m=({name:A=""})=>!!a.find(P=>P.name===A&&P.id!==t.id),y=()=>{const A=m({name:c}),_=Hw(Vn.ROUTER_NAME,c);if(h(A?to.nameAlreadyUsed(Vn.ROUTER_NAME):_),A||_||!f)return;const P=Al.getUpdatePayload({field:s,value:c,cnocRouter:t});r({updateCnocRouterRequestPayload:P}).then(()=>{o(P.id)})},v=()=>{u(t.name),h("")},b=A=>{const _=A.relatedTarget;if(_&&_.id==="cancel"){setTimeout(()=>{p(!1)},100),v();return}y(),p(!1)},S=A=>{A.stopPropagation(),A.key==="Enter"&&l.current&&(A.preventDefault(),l.current.blur())},w=()=>{l.current&&l.current.blur()};return C.useEffect(()=>{u(t.name),o(t.id),h("")},[t]),C.useEffect(()=>{c===t.name&&h("")},[c,t.name]),g(e9,{name:t.name,label:i,errorMessage:d,currentName:c,setCurrentName:u,isConfirmCancelButtonsVisible:f,setIsConfirmCancelButtonsVisible:p,handleKeyDown:S,handleFormControlNameBlur:b,handleFormControlNameConfirmAction:w,handleCancelNameAction:v,textFieldInputRef:l})},R5t=({projectId:t,activeCnocRouter:e,setSelectedCnocRouter:n,triggerUpdateProjectTimestamp:r})=>{const o="Device ID",i="Cluster ID",s="Router",a="Parameters",l=`${js}${e.nodeId} (${parseInt(e.nodeId,16)})`,[c]=Mxt(),[u,d]=C.useState(qn.PARAMETERS),[h,f]=C.useState(qu.DEVICE),p=async({updateCnocRouterRequestPayload:b})=>{await c({requestBody:b})&&await r()},m=(b,S)=>d(S),y=({field:b,value:S})=>{const w=Al.getUpdatePayload({field:b,value:S,cnocRouter:e});p({updateCnocRouterRequestPayload:w}).then(()=>{n(w.id)})},v=({currentValue:b,originalValue:S,minimum:w,maximum:A,setError:_,field:P,formControlLabelName:R})=>{const O=ga({value:b,minimum:w,maximum:A,formControlLabelName:R});if(_(O),!O&&Number(b)!==S){const N=Al.getUpdatePayload({field:P,value:Number(b),cnocRouter:e});p({updateCnocRouterRequestPayload:N}).then(()=>{n(N.id)})}};return K(le,{children:[g(J8,{activeComponentName:e.name,componentType:s}),g(le,{sx:{background:tt,height:36.56}}),g(P5t,{activeCnocRouter:e,componentType:s,projectId:t,triggerUpdateCnocRouterRequest:p,setSelectedCnocComponent:n}),g(le,{sx:{mb:1},children:g(yi,{})}),g(yS,{activeTab:u,tabOptions:[{value:qn.PARAMETERS,label:a}],handleActiveTabChange:m}),u===qn.PARAMETERS?K(gr,{children:[K(le,{pb:2,children:[g(Jo,{label:o,value:e.deviceId}),g(Jo,{label:i,value:l}
711),g(Ar,{label:Vn.ROUTER_TYPE,controlValue:e.type,onChangeHandler:b=>{y({field:_i.TYPE,value:b})},options:r0(Ao).map(({key:b,value:S})=>({key:b,value:S,displayName:X8[S]??b}))}),e.type===Ao.HN_F_WITH_L3||e.type===Ao.HN_F_WITHOUT_L3?g(_5t,{controlValue:e.isHashed,handleFormInputValueChange:y}):null]}),g(I5t,{activeRouterParameterTab:h,setActiveRouterParameterTab:f,routerType:e.type}),h===qu.DEVICE?g(b5t,{cnocRouter:e,handleFormControlIntegerSubmit:v}):null,h===qu.INTERCONNECT?g(C5t,{cnocRouter:e,handleFormControlIntegerSubmit:v}):null,(e.type===Ao.HN_F_WITH_L3||e.type===Ao.HN_F_WITHOUT_L3)&&h===qu.DIRECTORY_CACHE_CONTROLLER?g(A5t,{cnocRouter:e,handleFormInputSelectValueChange:y,handleFormControlIntegerSubmit:v}):null,e.type===Ao.HN_F_WITH_L3&&h===qu.L3_CACHE_CONTROLLER?g(T5t,{cnocRouter:e,handleFormInputSelectValueChange:y,handleFormControlIntegerSubmit:v}):null]}):null]})},Abe=Nr.injectEndpoints({endpoints:t=>({getProjectCnocSystemByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectCnocSystem}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectCnocSystem],transformResponse:(e,n,r)=>e}),updateProjectCnocSystem:t.mutation({query:({requestBody:e})=>({url:`${dt.projectCnocSystem}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(Abe.util.updateQueryData("getProjectCnocSystemByProjectId",{projectId:e.projectId},()=>e));try{await r}catch{o.undo()}},transformErrorResponse:e=>e,transformResponse:e=>e})})}),{useGetProjectCnocSystemByProjectIdQuery:Tbe,useUpdateProjectCnocSystemMutation:O5t}=Abe,hi={EDIT_SYSTEM:"Edit System Config",PROJECT_NAME:"Project Name",CHI_VERSION:"CHI Version",NOC_ADDRESS_WIDTH:"NoC Address Width",NOC_ADDRESS_MASK_WIDTH:"Noc Address Mask Width",NOC_DATA_WIDTH:"NoC Data Width",RSVDC_IN_REQUEST_FLIT:"RSVDC in Request Flit",RSVDC_IN_DATA_FLIT:"RSVDC in Data Flit",DATACHECK_IN_DATA_FLIT:"DATACHECK in Data Flit",POISTON_IN_DATA_FLIT:"POISON in Data Flit",MPAM:"MPAM",PROGRAMMABLE_SAM:"Programmable SAM",UCIE_BRIDGE:"UCIE Bridge",PROGRAMMING_INTERFACE:"Programming Interface",CLUSTER_COMMON_REGISTERS:"Cluster Common Registers",ASYNC_CC_CLOCK:"Async CC Clock",ASYNC_DEVICE_CLOCK:"Async Device Clock",APB_ADDRESS_WIDTH:"APB Address Width",APB_DATA_WIDTH:"APB Data Width",LOW_POWER_INTERFACE:"Low Power Interface",P_CHANNEL_WIDTH:"P-Channel Width",P_CHANNEL_ACTIVE_WIDTH:"P-Channel Active Width",CHI_INACTIVE_THRESHOLD:"CHI Inactive Threshold",AXI_INACTIVE_THRESHOLD:"AXI Inactive Threshold",DISABLE_ASSERTIONS:"Disable Assertions",ASYNC_BRIDGE_PORTS:"Async Bridge Ports",PERFORMANCE_MONITORING:"Performance Monitoring",NODE_ID_WIDTH_7_BIT:"7-Bit Node ID Width"},fi={NAME:"name",CHI_VERSION:"chiVersion",IS_REQUEST_FLIT_RSVDC_ENABLED:"isRequestFlitRsvdcEnabled",IS_DATA_FLIT_RSVDC_ENABLED:"isDataFlitRsvdcEnabled",IS_DATA_FLIT_DATA_CHECK_ENABLED:"isDataFlitDataCheckEnabled",IS_DATA_FLIT_POISON_ENABLED:"isDataFlitPoisonEnabled",IS_MPAM_ENABLED:"isMpamEnabled",IS_PROGRAMMABLE_SAM_ENABLED:"isProgrammableSamEnabled",IS_BRIDGE_ENABLED:"isBridgeEnabled",IS_PROGRAMMING_INTERFACE_ENABLED:"isProgrammingInterfaceEnabled",IS_CLUSTER_COMMON_REGISTERS_ENABLED:"isClusterCommonRegistersEnabled",IS_ASYNC_CC_CLOCK_ENABLED:"isAsyncCcClockEnabled",IS_ASYNC_DEVICE_CLOCK_ENABLED:"isAsyncDeviceClockEnabled",LOW_POWER_INTERFACE:"lowPowerInterface",CHI_INACTIVE_THRESHOLD:"chiInactiveThreshold",AXI_INACTIVE_THRESHOLD:"axiInactiveThreshold",IS_ASSERTION_DISABLED:"isAssertionDisabled",IS_ASYNC_BRIDGE_PORTS_ENABLED:"isAsyncBridgePortsEnabled",IS_PERFORMANCE_MONITORING_ENABLED:"isPerformanceMonitoringEnabled",IS_7_BIT_NODE_ID_WIDTH_ENABLED:"is7BitNodeIdWidthEnabled",SUBTOPOLOGY_CLOCK_UNIT:"subtopologyClockUnit",SUBTOPOLOGY_CLOCK:"subtopologyClock",AXI_CLOCK_UNIT:"axiClockUnit",AXI_CLOCK:"axiClock"},X2={ADDRESS:24,ADDRESS_MASK:52,DATA:512,APB_ADDR_DATA_WIDTH:32,P_CHANNEL_WIDTH:1},N5t=t=>{const{data:e}=Tbe({projectId:t});return e},M5t=t=>{const{isLoading:e}=Tbe({projectId:t});return e},o0={getByProjectId:N5t,getProjectCnocSystemByProjectIdIsLoading:M5t},D5t=({storedPipelineStagesCount:t,handleFormControlNumberSubmit:e})=>{const n="Number of Pipeline Stages",r="pipelineStagesCount",[o,i]=C.useState(t.toString()),[s,a]=C.useState("");return g(obe,{label:n,currentPipelineStagesCount:o,handleChangePipelineStagesCount:u=>{i(u),u===t.toString()&&a("")},handleSubmitPipelineStagesCount:()=>{e({currentValue:o,originalValue:t.toString(),minimum:xC,maximum:vG,setError:a,field:r,formControl
711LabelName:n})},handleCancelPipelineStagesCount:()=>{i(t.toString()),a("")},isConfirmCancelButtonsEnabled:o!==t.toString(),pipelineStagesCountError:s})},L5t=({activeTab:t})=>{const e=Yn(),n=[{value:qn.PARAMETERS,label:"Parameters"},{value:qn.TIMING,label:"Timing"},{value:qn.QP_CHANNEL,label:"Q/P Channel"},{value:qn.PIPELINE,label:"Pipeline"},{value:qn.INTERLEAVING,label:"Interleaving"}];return g(yS,{activeTab:t,tabOptions:n,handleActiveTabChange:(o,i)=>{e(Zse(i))}})};var Dz=(t=>(t.B="B",t.EB="E.b",t))(Dz||{});const k5t=({controlValue:t,handleFormInputValueChange:e})=>g(Hr,{label:hi.ASYNC_BRIDGE_PORTS,controlValue:t,onChangeHandler:n=>{e({field:fi.IS_ASYNC_BRIDGE_PORTS_ENABLED,value:n})}}),F5t=({controlValue:t,handleFormInputValueChange:e})=>g(Hr,{label:hi.DISABLE_ASSERTIONS,controlValue:t,onChangeHandler:n=>{e({field:fi.IS_ASSERTION_DISABLED,value:n})}}),B5t=({controlValue:t,handleFormInputValueChange:e})=>g(Hr,{label:hi.PERFORMANCE_MONITORING,controlValue:t,onChangeHandler:n=>{e({field:fi.IS_PERFORMANCE_MONITORING_ENABLED,value:n})}}),$5t=({controlValue:t,handleFormInputValueChange:e})=>{const n="Register Map Generation",r="isRegisterMapGenerationEnabled";return g(Hr,{label:n,controlValue:t,onChangeHandler:o=>{e({field:r,value:o})}})},H5t=({projectId:t,handleFormInputValueChange:e,getSwitchElementId:n})=>{const r=o0.getByProjectId(t);return K(le,{children:[g(Ar,{label:hi.CHI_VERSION,controlValue:r.chiVersion,onChangeHandler:o=>{e({field:"chiVersion",value:o})},options:r0(Dz)}),g(Jo,{label:hi.NOC_ADDRESS_WIDTH,value:r.addressWidth}),g(Jo,{label:hi.NOC_ADDRESS_MASK_WIDTH,value:r.addressMaskWidth}),g(Jo,{label:hi.NOC_DATA_WIDTH,value:r.dataWidth}),g(Hr,{label:hi.RSVDC_IN_REQUEST_FLIT,controlValue:r.isRequestFlitRsvdcEnabled,onChangeHandler:o=>{e({field:fi.IS_REQUEST_FLIT_RSVDC_ENABLED,value:o})}}),g(Hr,{label:hi.RSVDC_IN_DATA_FLIT,controlValue:r.isDataFlitRsvdcEnabled,onChangeHandler:o=>{e({field:fi.IS_DATA_FLIT_RSVDC_ENABLED,value:o})}}),g(Hr,{label:hi.DATACHECK_IN_DATA_FLIT,controlValue:r.isDataFlitDataCheckEnabled,onChangeHandler:o=>{e({field:fi.IS_DATA_FLIT_DATA_CHECK_ENABLED,value:o})}}),g(Hr,{label:hi.POISTON_IN_DATA_FLIT,controlValue:r.isDataFlitPoisonEnabled,onChangeHandler:o=>{e({field:fi.IS_DATA_FLIT_POISON_ENABLED,value:o})}}),r.chiVersion===Dz.EB?K(le,{children:[g(Hr,{label:hi.NODE_ID_WIDTH_7_BIT,controlValue:r.is7BitNodeIdWidthEnabled,onChangeHandler:o=>{e({field:fi.IS_7_BIT_NODE_ID_WIDTH_ENABLED,value:o})}}),g(Hr,{label:hi.MPAM,controlValue:r.isMpamEnabled,onChangeHandler:o=>{e({field:fi.IS_MPAM_ENABLED,value:o})}})]}):null,g(le,{id:n(fi.IS_PROGRAMMABLE_SAM_ENABLED),children:g(Hr,{label:hi.PROGRAMMABLE_SAM,controlValue:r.isProgrammableSamEnabled,onChangeHandler:o=>{e({field:fi.IS_PROGRAMMABLE_SAM_ENABLED,value:o})}})}),g(Hr,{label:hi.PROGRAMMING_INTERFACE,controlValue:r.isProgrammingInterfaceEnabled,onChangeHandler:o=>{e({field:fi.IS_PROGRAMMING_INTERFACE_ENABLED,value:o})}}),g(Hr,{label:hi.CLUSTER_COMMON_REGISTERS,controlValue:r.isClusterCommonRegistersEnabled,onChangeHandler:o=>{e({field:fi.IS_CLUSTER_COMMON_REGISTERS_ENABLED,value:o})}}),g(Hr,{label:hi.ASYNC_CC_CLOCK,controlValue:r.isAsyncCcClockEnabled,onChangeHandler:o=>{e({field:fi.IS_ASYNC_CC_CLOCK_ENABLED,value:o})}}),g(Hr,{label:hi.ASYNC_DEVICE_CLOCK,controlValue:r.isAsyncDeviceClockEnabled,onChangeHandler:o=>{e({field:fi.IS_ASYNC_DEVICE_CLOCK_ENABLED,value:o})}}),g(Jo,{label:hi.APB_ADDRESS_WIDTH,value:X2.APB_ADDR_DATA_WIDTH}),g(Jo,{label:hi.APB_DATA_WIDTH,value:X2.APB_ADDR_DATA_WIDTH}),g(F5t,{controlValue:r.isAssertionDisabled,handleFormInputValueChange:e}),g(xbe,{controlValue:r.isAddressTranslationEnabled,handleFormInputValueChange:e,label:"Address Translation"}),g(k5t,{controlValue:r.isAsyncBridgePortsEnabled,handleFormInputValueChange:e}),g(B5t,{controlValue:r.isPerformanceMonitoringEnabled,handleFormInputValueChange:e}),g($5t,{controlValue:r.isRegisterMapGenerationEnabled,handleFormInputValueChange:e})]})};var Uy=(t=>(t[t.NONE=0]="NONE",t[t.Q_CHANNEL=1]="Q_CHANNEL",t[t.P_CHANNEL=2]="P_CHANNEL",t))(Uy||{});const U5t=()=>Math.pow(2,32)-1,Rne=({label:t,field:e,storedInactiveThresholdValue:n,handleFormControlNumberSubmit:r})=>{const i=U5t(),[s,a]=C.useState(n.toString()),[l,c]=C.useState(""),u=h=>{a(h),h===n.toString()&&c("")};return g(xn,{label:t,controlValue:s,onChangeHandler:h=>u(h),onSubmitHandler:()=>{r({currentValue:s,originalValue:n,minimum:0,maximum:i,setError:c,field:e,formControl
711LabelName:t})},onCancelHandler:()=>{c(""),a(n.toString())},isConfirmCancelButtonsEnabled:s!==n.toString(),textFieldLabel:"min: 0, max: 2^32 - 1",InputPropsOverride:{type:"number"},error:!!l,helperText:l})},z5t=({controlValue:t,handleFormInputValueChange:e})=>{const n=[{key:Uy.NONE,value:Uy.NONE,displayName:"None"},{key:Uy.Q_CHANNEL,value:Uy.Q_CHANNEL,displayName:"Q-Channel"},{key:Uy.P_CHANNEL,value:Uy.P_CHANNEL,displayName:"P-Channel"}];return g(Ar,{label:hi.LOW_POWER_INTERFACE,controlValue:t.toString(),onChangeHandler:r=>e({field:fi.LOW_POWER_INTERFACE,value:r}),options:n})},V5t=({projectId:t,handleFormInputValueChange:e,handleFormControlNumberSubmit:n})=>{const r=o0.getByProjectId(t);return K(le,{children:[g(z5t,{controlValue:r.lowPowerInterface,handleFormInputValueChange:e}),r.lowPowerInterface===Uy.P_CHANNEL?K(le,{children:[g(Jo,{label:hi.P_CHANNEL_WIDTH,value:X2.P_CHANNEL_WIDTH}),g(Jo,{label:hi.P_CHANNEL_ACTIVE_WIDTH,value:X2.P_CHANNEL_WIDTH})]}):null,g(Rne,{label:hi.CHI_INACTIVE_THRESHOLD,field:fi.CHI_INACTIVE_THRESHOLD,storedInactiveThresholdValue:Number(r.chiInactiveThreshold),handleFormControlNumberSubmit:n}),g(Rne,{label:hi.AXI_INACTIVE_THRESHOLD,field:fi.AXI_INACTIVE_THRESHOLD,storedInactiveThresholdValue:Number(r.axiInactiveThreshold),handleFormControlNumberSubmit:n})]})},_be=Nr.injectEndpoints({endpoints:t=>({getProjectCnocInterleavingByProjectId:t.query({query:({projectId:e})=>({url:`${dt.projectCnocInterleaving}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectCnocInterleaving],transformResponse:(e,n,r)=>e}),updateProjectCnocInterleaving:t.mutation({query:({requestBody:e})=>({url:`${dt.projectCnocInterleaving}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(_be.util.updateQueryData("getProjectCnocInterleavingByProjectId",{projectId:e.projectId},()=>e));try{await r}catch{o.undo()}},transformErrorResponse:e=>e,transformResponse:e=>e})})}),{useGetProjectCnocInterleavingByProjectIdQuery:Ibe,useUpdateProjectCnocInterleavingMutation:G5t}=_be,W5t=t=>{const{data:e}=Ibe({projectId:t});return e},j5t=t=>{const{isLoading:e}=Ibe({projectId:t});return e},Lz={getByProjectId:W5t,getProjectCnocInterleavingByProjectIdIsLoading:j5t},One=({label:t,field:e,handleFormInputValueChange:n,storedStepSizeValue:r})=>{const o=[{key:0,value:0,displayName:"64 Bytes"},{key:1,value:1,displayName:"128 Bytes"},{key:2,value:2,displayName:"256 Bytes"},{key:3,value:3,displayName:"512 Bytes"},{key:4,value:4,displayName:"1 KB"},{key:5,value:5,displayName:"2 KB"},{key:6,value:6,displayName:"4 KB"}];return g(Ar,{label:t,controlValue:r.toString(),onChangeHandler:i=>{n(e,i)},options:o})},CM=({label:t,field:e,storedLimitAddress:n,storedBaseAddress:r,handleFormControlAddressSubmit:o,addressInputType:i})=>{const l=i==="base"?r:n,[c,u]=C.useState(l),[d,h]=C.useState(""),[f,p]=C.useState(!1),m=S=>{_t.getIsValidHex(S)&&u(S.toUpperCase()),S===l&&h("")},y=()=>{h(""),u(l.toUpperCase()),p(!1)},v=()=>p(!0),b=f?c:_t.getZeroPaddedAddressWithUnderscores(c,13);return g(xn,{label:t,controlValue:b.toUpperCase(),onChangeHandler:S=>{m(S)},onSubmitHandler:()=>{o({addressInput:c,storedBaseAddress:r,storedLimitAddress:n,setError:h,field:e,formControlLabelName:t,addressInputType:i}),p(!1)},onCancelHandler:y,onFocusHandler:v,isConfirmCancelButtonsEnabled:c!==l,inputPropsOverride:{pattern:"[0-9A-F]{0,13}",maxLength:13},InputPropsOverride:{startAdornment:g(qr,{position:"start",children:js})},error:!!d,helperText:d})},q5t=({projectId:t})=>{const e="Interleaved SN Count",n="Interleaved Step Size",r="Interleaved Full Base Address",o="Interleaved Full Limit Address",i="Hashed HN Count",s="Hashed Step Size",a="Hashed Full Base Address",l="Hashed Full Limit Address",c="interleavedStepSize",u="interleavedFullBase",d="interleavedFullLimit",h="hashedStepSize",f="hashedFullBase",p="hashedFullLimit",m="base",y="limit",v=Lz.getByProjectId(t),b=Th.getHashedHomeRoutersCountByProjectId(t),S=Aa.getInterleavedSubordinateDevicesCountByProjectId(t),[w]=G5t(),A=(O,N)=>({...v,[O]:N}),_=(O,N)=>{const M=A(O,N);w({requestBody:M})}
711,P=({addressInput:O,storedAddress:N,formControlLabelName:M,addressInputType:L})=>{if(!O)return`${M} cannot be empty`;const F=L===m;return(F?_t.getHasBaseExceededLimitAddress(O,N):_t.getHasBaseExceededLimitAddress(N,O))?`${M} should be ${F?"less than its Limit Address":"greater than its Base Address"}`:""},R=({addressInput:O,storedBaseAddress:N,storedLimitAddress:M,setError:L,field:F,formControlLabelName:$,addressInputType:D})=>{const k=D===m,H=P({addressInput:O,storedAddress:k?M:N,formControlLabelName:$,addressInputType:D});if(L(H),!H&&(k?O!==N:O!==M)){const q=A(F,O);w({requestBody:q})}};return K(le,{children:[g(CM,{label:r,field:u,storedBaseAddress:v.interleavedFullBase,storedLimitAddress:v.interleavedFullLimit,handleFormControlAddressSubmit:R,addressInputType:m}),g(CM,{label:o,field:d,storedBaseAddress:v.interleavedFullBase,storedLimitAddress:v.interleavedFullLimit,handleFormControlAddressSubmit:R,addressInputType:y}),g(Jo,{label:e,value:S}),g(One,{label:n,field:c,handleFormInputValueChange:_,storedStepSizeValue:v.interleavedStepSize}),g(CM,{label:a,field:f,storedBaseAddress:v.hashedFullBase,storedLimitAddress:v.hashedFullLimit,handleFormControlAddressSubmit:R,addressInputType:m}),g(CM,{label:l,field:p,storedBaseAddress:v.hashedFullBase,storedLimitAddress:v.hashedFullLimit,handleFormControlAddressSubmit:R,addressInputType:y}),g(Jo,{label:i,value:b}),g(One,{label:s,field:h,handleFormInputValueChange:_,storedStepSizeValue:v.hashedStepSize})]})},Nne=({clockFrequency:t,clockFrequencyUnit:e,label:n,fieldClockFrequency:r,fieldClockFrequencyUnit:o,handleFormInputValueChange:i})=>{const a=`min: ${.1}, up to 6 decimals`,[l,c]=C.useState(""),[u,d]=C.useState(String(t)),h=Number(u.replaceAll(",","")),f=()=>{const v=K0e({value:h,minimum:.1,maximum:Number.MAX_VALUE,formControlLabelName:n});if(c(v),isNaN(h)){d(String(t));return}!v&&!Tt.isEqual(h,t)&&i({field:r,value:h})},p=()=>{c(""),d(String(t))},m=v=>{Tt.isEqual(Number(v),t)&&c(""),d(v)},y=v=>{i({field:o,value:v})};return g(Z0e,{label:n,textfieldLabel:a,currentTextfieldValue:u,activeTextfieldValue:t,activeSelectValue:e,selectOptions:_z,errorMessage:l,handleTextfieldSubmit:()=>f(),handleTextfieldCancel:()=>p(),handleTextfieldValueChange:v=>m(v),handleSelectValueChange:v=>y(v)})},Y5t=({cnocSystem:t,handleFormInputValueChange:e})=>K(le,{children:[g(Nne,{clockFrequency:t.subtopologyClock,clockFrequencyUnit:t.subtopologyClockUnit,label:"Subtopology Clock Frequency",fieldClockFrequency:fi.SUBTOPOLOGY_CLOCK,fieldClockFrequencyUnit:fi.SUBTOPOLOGY_CLOCK_UNIT,handleFormInputValueChange:({field:n,value:r})=>e({field:n,value:r})}),g(Nne,{clockFrequency:t.axiClock,clockFrequencyUnit:t.axiClockUnit,label:"AXI Clock Frequecy",fieldClockFrequency:fi.AXI_CLOCK,fieldClockFrequencyUnit:fi.AXI_CLOCK_UNIT,handleFormInputValueChange:({field:n,value:r})=>e({field:n,value:r})})]}),X5t=({projectId:t,triggerUpdateProjectTimestamp:e})=>{const n="Cannot disable due to existing UCIE bridge/s in the topology",r=o0.getByProjectId(t),{data:o=[]}=TB({projectId:t}),i=Yn(),s=bt(MNe),[a]=O5t(),l=({field:f,value:p})=>{const m={...r,[f]:p};switch(f){case fi.CHI_VERSION:return{...m,isMpamEnabled:!1};case fi.IS_PROGRAMMABLE_SAM_ENABLED:return{...m,isBridgeEnabled:!1};default:return m}},c=async f=>{await a({requestBody:f})&&await e()},u=f=>`cnoc-switch-${f}`,d=({field:f,value:p})=>{const m=l({field:f,value:p});if((f===fi.IS_PROGRAMMABLE_SAM_ENABLED||f===fi.IS_BRIDGE_ENABLED)&&o.length&&!p){i(DI({anchorElId:u(f),warningText:n}));return}c(m)},h=({currentValue:f,originalValue:p,minimum:m,maximum:y,setError:v,field:b,formControlLabelName:S})=>{const w=ga({value:f,minimum:m,maximum:y,formControlLabelName:S});if(v(w),!w&&Number(f)!==Number(p)){const A=l({field:b,value:f});c(A)}};return K(le,{children:[g(Bm,{icon:g(RW,{sx:{color:tt}}),title:g(gr,{children:hi.EDIT_SYSTEM})}),g(le,{sx:{background:tt,height:36.56,mb:1}}),g(L5t,{activeTab:s}),s===qn.PARAMETERS?g(H5t,{projectId:t,handleFormInputValueChange:d,getSwitchElementId:u}):null,s===qn.TIMING?g(Y5t,{cnocSystem:r,handleFormInputValueChange:({field:f,value:p})=>d({field:f,value:p})}
711):null,s===qn.QP_CHANNEL?g(V5t,{projectId:t,handleFormControlNumberSubmit:h,handleFormInputValueChange:d}):null,s===qn.PIPELINE?g(D5t,{storedPipelineStagesCount:r.pipelineStagesCount,handleFormControlNumberSubmit:h}):null,s===qn.INTERLEAVING?g(q5t,{projectId:t}):null]})},Pbe=()=>0,Rbe=()=>0,K5t=({parentRouter:t,diagramNodeOrientation:e,topologyLogicalCoordinateX:n,topologyLogicalCoordinateY:r})=>{const o=n??Pbe(),s=(r??Rbe())<<9|t.logicalCoordinateY<<7|o<<5|t.logicalCoordinateX<<3|e;return _t.getNumberToHex(s)},Obe={getTopologyLogicalCoordinateX:Pbe,getTopologyLogicalCoordinateY:Rbe,getLocationId:K5t},Q5t=({field:t,value:e,cnocBridge:n,parentRouter:r})=>{if(r===null)return n.locationId;const o=t==="topologyLogicalCoordinateX",i=t==="topologyLogicalCoordinateY";if(o||i){const s=e,a=o?s:n.topologyLogicalCoordinateX,l=i?s:n.topologyLogicalCoordinateY;return Obe.getLocationId({parentRouter:r,diagramNodeOrientation:n.diagramNodeOrientation,topologyLogicalCoordinateX:a,topologyLogicalCoordinateY:l})}return n.locationId},Z5t=({diagramNodeOrientation:t,routerId:e,subtopologyId:n,projectId:r,parentRouter:o})=>o===null?null:{diagramNodeOrientation:t,locationId:Obe.getLocationId({parentRouter:o,diagramNodeOrientation:t}),routerId:e,projectId:r,subtopologyId:n},J5t=({field:t,value:e,cnocBridge:n,parentRouter:r})=>{const o=Q5t({field:t,value:e,cnocBridge:n,parentRouter:r});return{...n,[t]:e,locationId:o}},n9={getUpdatePayload:J5t,getCreateParamsPayload:Z5t},eUt=({activeCnocBridge:t,componentType:e,projectId:n,triggerUpdateCnocBridgeRequest:r,setSelectedCnocComponent:o})=>{const i=`${e} Name`,s="name",{data:a=[]}=TB({projectId:n}),l=C.useRef(void 0),[c,u]=C.useState(t.name),[d,h]=C.useState(""),[f,p]=C.useState(c!==t.name),m=A=>!!a.filter(R=>R.id!==t.id).find(R=>R.name===A),y=()=>{const A=m(c),_=Hw(i,c);if(h(A?to.nameAlreadyUsed(i):_),A||_||!f)return;const P=n9.getUpdatePayload({field:s,value:c,cnocBridge:t,parentRouter:null});r(P)},v=A=>{const _=A.relatedTarget;if(_&&_.id==="cancel"){setTimeout(()=>{p(!1)},100),w();return}y(),p(!1)},b=A=>{A.stopPropagation(),A.key==="Enter"&&l.current&&(A.preventDefault(),l.current.blur())},S=()=>{l.current&&l.current.blur()},w=()=>{u(t.name),h("")};return C.useEffect(()=>{h(""),u(t.name),o(t.id)},[t]),C.useEffect(()=>{t.name===c&&h("")},[c,t.name]),g(e9,{name:t.name,label:i,errorMessage:d,currentName:c,setCurrentName:u,isConfirmCancelButtonsVisible:f,setIsConfirmCancelButtonsVisible:p,handleKeyDown:b,handleFormControlNameBlur:v,handleFormControlNameConfirmAction:S,handleCancelNameAction:w,textFieldInputRef:l})},tUt=({activeCnocBridge:t,cnocSubtopology:e,handleFormInputSelectValueChange:n})=>{const r="Connected Topology X",o="Connected Topology Y",i="topologyLogicalCoordinateX",s="topologyLogicalCoordinateY",l=Th.getParentRouterByConnectedCnocBridgeId(t.id,t.projectId),c=e?.logicalCoordinateX===t.topologyLogicalCoordinateX&&e?.logicalCoordinateY===t.topologyLogicalCoordinateY,u=[{label:r,field:i,controlValue:t.topologyLogicalCoordinateX.toString()},{label:o,field:s,controlValue:t.topologyLogicalCoordinateY.toString()}],d=Array.from({length:3+1},(h,f)=>({key:f,value:f}));return g(le,{children:u.map(({label:h,field:f,controlValue:p})=>g(Ar,{label:h,controlValue:p,onChangeHandler:m=>n({field:f,value:m,parentRouter:l}),options:d,isError:c},f))})},Nbe=(t,e)=>e<<2|t;var Mbe=(t=>(t.UCIE="UCIE",t.CXL="CXL",t))(Mbe||{});const nUt=({activeCnocBridge:t,handleFormInputSelectValueChange:e})=>{const n="Bridge Type",r="type",o=r0(Mbe);return g(le,{children:g(Ar,{label:n,controlValue:t.type,onChangeHandler:i=>e({field:r,value:i,parentRouter:null}),options:o})})},rUt=({projectId:t,cnocBridgeId:e,setSelectedCnocBridge:n,triggerUpdateProjectTimestamp:r})=>{const o="Connected Topology ID",i="Bridge",s="Parameters",a="Node ID",l="Location ID",c=jB.getAllByProjectId(t),u=_h.getById(e,t),[d]=Qxt(),[h,f]=C.useState(qn.PARAMETERS),p=async w=>{await d({requestBody:w})&&(await r(),n(w.id))},m=({field:w,value:A,parentRouter:_})=>{const P=n9.getUpdatePayload({field:w,value:A,cnocBridge:u,parentRouter:_??null});p(P)},y=(w,A)=>f(A),v=Nbe(u.topologyLogicalCoordinateX,u.topologyLogicalCoordinateY),b=`${_t.getAddressWithPrefixHexadecimal(_t.getNumberToHex(v))} (${v})`,S=`${_t.getAddressWithPrefixHexadecimal(u.locationId)} (${parseInt(u.locationId,Kx)})`;return K(le,{children:[g(J8,{activeComponentName:u.name,componentType:i}),g(le,{sx:{background:tt,height:36.56}}),g(eUt,{activeCnocBridge:u,projectId:t,componentType:i,triggerUpdateCnocBridgeRequest:p,setSelectedCnocComponent:n}),g(le,{sx:{mb:1},children:g(yi,{})}),g(yS,{activeTab:h,tabOptions:[{value:qn.PARAMETERS,label:s}],handleActiveTabChange:y}),g(Jo,{label:a,value:b}),g(Jo,{label:l,value:S}),g(Jo,{label:o,value:v}),g(nUt,{activeCnocBridge:u,handleFormInputSelectValueChange:m}),g(tUt,{activeCnocBridge:u,cnocSubtopology:c[0],handleFormInputSelectValueChange:m})]})},oUt=({isRightPanelOpen:t,projectId:e,triggerUpdateProjectTimestamp:n})=>{const r=Yn(),o=bt(oae),i=Th.getById(o,e),s=Aa.getById(o,e),a=_h.getById(o,e),l=i||s||a,c=u=>{r(AC(u)),u&&!t&&r(pd(!0))};return g(le,{sx:{backgroundColor:"#FAFAFA",boxShadow:"0 3px 10px rgb(0 0 0 / 0.2);",width:ei.getRightPanelWidth(t),height:"100%",overflowY:"auto",overflowX:"hidden",zIndex:2,right:0,position:"absolute"},children:Fp.getIsProjectComponentCnocDevice(l)?g(v5t,{projectId:e,cnocDevice:l,setSelectedCnocDevice:c,triggerUpdateProjectTimestamp:n}):Fp.getIsProjectComponentCnocRouter(l)?g(R5t,{projectId:e,activeCnocRouter:l,setSelectedCnocRouter:c,triggerUpdateProjectTimestamp:n}):Fp.getIsProjectComponentCnocBridge(l)?g(rUt,{projectId:e,cnocBridgeId:o,setSelectedCnocBridge:c,triggerUpdateProjectTimestamp:n}):g(X5t,{projectId:e,triggerUpdateProjectTimestamp:n})})};var tu=(t=>(t.P0="P0",t.P1="P1",t.P2="P2",t.P3="P3",t))(tu||{});const iUt="/assets/plusIcon-2f5d1aee.svg",r9={[Ao.HN_F_WITHOUT_L3]:hs.GREEN,[Ao.HN_F_WITH_L3]:hs.RED,[Ao.DEVICE_ONLY]:XW,[Ao.REPEATER]:hs.GRAY},qB={[Yr.RN]:hs.PINK,[Yr.SN]:hs.PURPLE,[Yr.MASTER]:hs.CYAN,[Yr.SLAVE]:hs.ORANGE};var cs=(t=>(t[t.UNSUPPORTED=0]="UNSUPPORTED",t[t.ROUTER=1]="ROUTER",t[t.DEVICE=2]="DEVICE",t[t.BRIDGE=3]="BRIDGE",t[t.ROUTER_DIRECTION=4]="ROUTER_DIRECTION",t[t.ROUTER_ROUTER_CONNECTION=5]="ROUTER_ROUTER_CONNECTION",t))(cs||{});const sUt=({projectId:t})=>{const r="router-node",o="device-node",i="bridge-node",s="add-device-button-node",a="add-router-button-node",l="router-north-direction-node",c="router-east-direction-node",u="router-south-direction-node",d="router-west-direction-node",h="interRouterPort",f="devicePort",p="egressBridgePort",m="ingressBridgePort",y="Delete Component",v="Delete Connection",b="Connect to Adjacent Router",S="Connect to C2C Bridge",w="Delete",A="Enable Programmable SAM to create bridge",_="Delete conflicting connections to create bridge",P="#00e0e0",R="30,0 90,0 120,30 120,90 90,120 30,120 0,90 0,30",O=Yn(),N=o0.getByProjectId(t),{width:M,height:L}=sc(),{themeColors:F}=Lc(),{diagramWidth:$,diagramHeight:D}=st.getStageDimensions({width:M,height:L}),k=C.useRef(null),U=C.useRef(null),H=C.useRef(null),[V,q]=C.useState(!1),[J,Q]=C.useState(void 0),[se,oe]=C.useState(void 0),[ie,ee]=C.useState(!1),[re,fe]=C.useState(!1),[we,xe]=C.useState(null),[ve,Re]=C.useState(""),[pe,Be]=C.useState([]),{data:ke=[]}=Q8({projectId:t}),{data:Ne=[],refetch:ot}=Cme({projectId:t}),{data:ce=[],refetch:Ae}=wme({projectId:t}),{data:be=[],refetch:Se}=TB({projectId:t}),{data:Pe=[]}=Eme({projectId:t}),[Ue]=zxt(),[_e]=Gxt(),[Oe]=Nxt(),[ze]=Dxt(),[ne,{isLoading:W}]=Kxt(),[j]=Zxt(),[ue]=kxt(),[he]=Lxt(),[Ce]=rS(),Ie=()=>{Gr.registerNode(r,{inherit:"polygon",width:120,height:120,zIndex:2,markup:[{tagName:"polygon",selector:"body"},{tagName:"polygon",selector:"highlight"},{tagName:"text",selector:"label"}],attrs:{body:{points:R,strokeWidth:3,fill:"#fff",cursor:"pointer"},label:{cursor:"pointer",textWrap:{width:"65%",height:"95%",ellipsis:!0,breakWord:!0}
711},highlight:{points:R,stroke:P,strokeWidth:5,fill:"none",visibility:"hidden",pointerEvents:"none"}},ports:{groups:{[f]:je()}}},!0)},et=()=>({markup:[{tagName:"rect",selector:"rect"},{tagName:"rect",selector:"highlight"}],position:"absolute",attrs:{rect:{magnet:!1,stroke:"#8f8f8f",strokeWidth:1,width:12,height:12,x:-6,y:-6,pointerEvents:"none",cursor:"pointer"},highlight:{stroke:P,strokeWidth:2,width:12,height:12,x:-6,y:-6,fill:"none",visibility:"hidden",pointerEvents:"none"}}}),je=()=>({markup:[{tagName:"circle",selector:"dot"},{tagName:"text",selector:"portLabel"}],position:"absolute",attrs:{dot:{stroke:"#8f8f8f",strokeWidth:1,fill:"lightgray",r:5,magnet:!0},portLabel:{fill:"darkgreen",fontSize:8,textAnchor:"middle",textVerticalAnchor:"middle",y:.5}}}),it=Qe=>{const Ut=Xn(Qe);Gr.registerNode(Cr(Qe),{inherit:"polygon",zIndex:3,markup:[{tagName:"polyline",selector:"body"},{tagName:"text",selector:"label"},{tagName:"polygon",selector:"highlight"}],attrs:{body:{points:Ut,fill:"white",strokeWidth:1,cursor:"pointer",zIndex:1,event:"node:contextmenu"},label:{...Wo(Qe),fill:"green",fontSize:10,cursor:"pointer"},highlight:{points:Ut,stroke:P,strokeWidth:3,fill:"none",visibility:"hidden",pointerEvents:"none"}},ports:{groups:{[h]:et()}}},!0)},xt=()=>{Gr.registerNode(o,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"},{tagName:"rect",selector:"labelBackground"},{tagName:"text",selector:"label"}],inherit:"rect",width:40,height:40,zIndex:2,attrs:{body:{strokeWidth:3,fill:"#fff",cursor:"pointer",rx:5,ry:5},label:{cursor:"pointer"},labelBackground:{fill:"#fff",stroke:"#fff",rx:4,ry:4,refX:-12.5,refY:.3,refWidth:25,refHeight:.4},highlight:{stroke:P,strokeWidth:5,fill:"none",visibility:"hidden",pointerEvents:"none",rx:5,ry:5,width:40,height:40}},ports:{groups:{[f]:je()}}},!0)},rt=()=>{Gr.registerNode(s,{inherit:"rect",zIndex:2,attrs:{body:{stroke:"#8f8f8f",strokeWidth:1,fill:"#fff"},image:{"xlink:href":ibe,width:30,height:30,cursor:"pointer"},highlight:{stroke:P,strokeWidth:3,fill:"none",visibility:"hidden",pointerEvents:"none",rx:1,ry:1,refX:5,refY:5,width:30-10,height:30-10}},markup:[{tagName:"image",selector:"image"},{tagName:"rect",selector:"highlight"}]},!0)},Bt=()=>{Gr.registerNode(a,{inherit:"polygon",zIndex:2,attrs:{body:{points:R,stroke:"#48752C",strokeWidth:3,fill:"none"},image:{"xlink:href":iUt,width:120,height:120,cursor:"pointer"},highlight:{points:R,stroke:P,strokeWidth:5,fill:"none",visibility:"hidden",width:120-40,height:120-40}},markup:[{tagName:"polygon",selector:"body"},{tagName:"polygon",selector:"highlight"},{tagName:"image",selector:"image"}]},!0)},dn=Qe=>Qe.map(Ut=>({id:Ut,group:h,args:kn(Ut),attrs:{rect:{fill:ri(Ut)}}})),kn=Qe=>{switch(Qe){case xr.NORTH_INGRESS:return{x:40,y:0,angle:0};case xr.NORTH_EGRESS:return{x:80,y:0,angle:0};case xr.EAST_INGRESS:return{x:120,y:40,angle:0};case xr.EAST_EGRESS:return{x:120,y:80,angle:0};case xr.SOUTH_INGRESS:return{x:80,y:120,angle:0};case xr.SOUTH_EGRESS:return{x:40,y:120,angle:0};case xr.WEST_INGRESS:return{x:0,y:80,angle:0};case xr.SOUTH_EGRESS:default:return{x:0,y:40,angle:0}}},jn=Qe=>{switch(Qe){case xr.NORTH_INGRESS:case xr.NORTH_EGRESS:return wr.NORTH;case xr.EAST_INGRESS:case xr.EAST_EGRESS:return wr.EAST;case xr.SOUTH_INGRESS:case xr.SOUTH_EGRESS:return wr.SOUTH;case xr.WEST_INGRESS:case xr.WEST_EGRESS:default:return wr.WEST}},Cr=Qe=>{switch(Qe){case wr.NORTH:return l;case wr.EAST:return c;case wr.SOUTH:return u;case wr.WEST:default:return d}},Xn=Qe=>{switch(Qe){case wr.NORTH:return"75,0 60,20 45,0";case wr.EAST:return"120,75 100,60 120,45";case wr.SOUTH:return"75,120 60,100 45,120";case wr.WEST:default:return"0,75 20,60 0,45"}},Wo=Qe=>{switch(Qe){case wr.NORTH:return{text:"N",x:60,y:7};case wr.EAST:return{text:"E",x:113,y:60};case wr.SOUTH:return{text:"S",x:60,y:113};case wr.WEST:default:return{text:"W",x:7,y:60}}},jo=Qe=>{switch(Qe){case wr.NORTH:return[xr.NORTH_INGRESS,xr.NORTH_EGRESS];case wr.EAST:return[xr.EAST_INGRESS,xr.EAST_EGRESS];case wr.SOUTH:return[xr.SOUTH_INGRESS,xr.SOUTH_EGRESS];case wr.WEST:default:return[xr.WEST_INGRESS,xr.WEST_EGRESS]}},ri=Qe=>{const Ut="lightyellow",An="lightblue";return Qe.includes("INGRESS")?Ut:An},Pu=Qe=>Object.values(tu).map((An,pn)=>{const At=Qe.enabledDevicePorts.includes(An)?An:"";return{id:An,group:f,args:oi(An),...ft(At,pn)}}),ta=Qe=>({id:Qe.connectedPort,group:f,args:Qr(Qe.connectedPort),...Ot(Qe.connectedPort)}),oi=Qe=>{switch(Qe){case tu.P0:return{x:15,y:105,angle:0};case tu.P1:return{x:105,y:105,angle:0};case tu.P2:return{x:15,y:15,angle:0};case tu.P3:default:return{x:105,y:15,angle:0}}},Qr=Qe=>{switch(Qe){case tu.P0:return{x:40,y:0,angle:0};case tu.P1:return{x:0,y:0,angle:0};case tu.P2:return{x:40,y:40,angle:0};case tu.P3:default:return{x:0,y:40,angle:0}}},ft=(Qe,Ut)=>({attrs:{...Ot(Qe)?.attrs,portLabel:{text:Ut}}}),Ot=Qe=>Qe?{attrs:{dot:{fill:"white"}}}:{},Wt=(Qe,Ut)=>{const An={id:`${Qe.id}_${Ut}`,shape:s,label:`Add ${Ut} Device`};return Ut===tu.P0?{...An,x:Qe.diagramCoordinateX-30,y:Qe.diagramCoordinateY-Ry+120}:Ut===tu.P1?{...An,x:Qe.diagramCoordinateX+120,y:Qe.diagramCoordinateY-Ry+120}:Ut===tu.P2?{...An,x:Qe.diagramCoordinateX-30,y:Qe.diagramCoordinateY-Ry-30}:{...An,x:Qe.diagramCoordinateX+120,y:Qe.diagramCoordinateY-Ry-30}},sn=Qe=>240+480*Qe,Jt=Qe=>-240+-480*Qe,wn=(Qe,Ut)=>{const An=Jt(Qe),pn=sn(Ut);return{id:`add_router_button_y_${Qe}_x_${Ut}`,shape:a,label:"Add new router",x:pn,y:An-Ry}},Sr=()=>{Gr.registerNode(i,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"},{tagName:"text",selector:"label"}],inherit:"rect",zIndex:2,attrs:{body:{stroke:F.grey[300],strokeWidth:3,fill:"#fff",cursor:"pointer",rx:5,ry:5},highlight:{stroke:P,strokeWidth:5,fill:"none",visibility:"hidden",pointerEvents:"none",rx:5,ry:5},label:{cursor:"pointer",textWrap:{width:"120%",height:"100%",ellipsis:!0,breakWord:!0}
711},labelBackground:{fill:"#fff",stroke:"#fff",rx:4,ry:4,refX:-12.5,refY:.3,refWidth:25,refHeight:.4}},ports:{groups:{[p]:ii(),[m]:ol()}}},!0)},ii=()=>({markup:[{tagName:"rect",selector:p},{tagName:"rect",selector:"highlight"}],position:"absolute",attrs:{[p]:{fill:"lightblue",stroke:F.grey[300],strokeWidth:1,width:12,height:12,r:5,pointerEvents:"none",cursor:"pointer"},highlight:{stroke:P,strokeWidth:2,width:12,height:12,fill:"none",visibility:"hidden",pointerEvents:"none"}}}),ol=()=>({markup:[{tagName:"rect",selector:m},{tagName:"rect",selector:"highlight"}],position:"absolute",attrs:{[m]:{fill:"lightyellow",stroke:F.grey[300],strokeWidth:1,width:12,height:12,r:5,pointerEvents:"none",cursor:"pointer"},highlight:{stroke:P,strokeWidth:2,width:12,height:12,fill:"none",visibility:"hidden",pointerEvents:"none"}}}),yt=Qe=>[{id:`${Qe.id}_${Qe.diagramNodeOrientation}_${Fg.EGRESS}`,group:p,args:pt(Qe.diagramNodeOrientation)},{id:`${Qe.id}_${Qe.diagramNodeOrientation}_${Fg.INGRESS}`,group:m,args:Xt(Qe.diagramNodeOrientation)}],pt=Qe=>{switch(Qe){case Oo.SOUTH:return{x:54,y:14,angle:0};case Oo.WEST:return{x:14,y:54,angle:0};case Oo.NORTH:case Oo.EAST:default:return{x:14,y:14,angle:0}}},Xt=Qe=>{switch(Qe){case Oo.NORTH:return{x:54,y:14,angle:0};case Oo.EAST:return{x:14,y:54,angle:0};case Oo.SOUTH:case Oo.WEST:default:return{x:14,y:14,angle:0}}},$t=Qe=>{switch(Qe){case Oo.EAST:case Oo.WEST:return 40;case Oo.NORTH:case Oo.SOUTH:default:return 80}},Pn=Qe=>{switch(Qe){case Oo.EAST:case Oo.WEST:return 80;case Oo.NORTH:case Oo.SOUTH:default:return 40}},an=Qe=>{switch(Qe){case Oo.EAST:return 55;case Oo.WEST:return-55;case Oo.NORTH:case Oo.SOUTH:default:return 0}},tr=Qe=>{switch(Qe){case Oo.NORTH:return-40;case Oo.SOUTH:return 40;case Oo.EAST:case Oo.WEST:default:return 0}},Ra=Qe=>{const Ut=Qe.id.split("_")[0],An=Qe.id.split("_")[1],pn=Ne.find(ir=>ir.id===Ut),At=ke.find(ir=>ir.id===pn?.subtopologyId)?.id;if(!(!An&&!pn&&!At))return{connectedPort:An,routerId:pn.id,projectId:t,subtopologyId:At}},Oa=Qe=>{O(AC(Qe)),O(pd(!0))},Vw=async Qe=>{const Ut=Ra(Qe);if(!Ut)return;if(await Ue({requestBody:Ut})){const{data:pn}=await Ae();if(!pn?.length)return;const At=pn[pn.length-1];Oa(At.id)}},zm=async Qe=>{const Ut=Tt.head(ke),An=Number(Qe.id.split("_")[4]),pn=Number(Qe.id.split("_")[6]);if(!(Ut?.id&&Tt.isNumber(An)&&Tt.isNumber(pn)))return;if(await Oe({requestBody:{logicalCoordinateX:pn,logicalCoordinateY:An,subtopologyId:Ut.id,projectId:t}})){const{data:ir}=await ot();if(!ir?.length)return;const Po=ir[ir.length-1];Oa(Po.id)}},L0=Qe=>{const Ut=Qe.id.split("_")[0],An=Qe.id.split("_")[1],pn=Ne.find(Po=>Po.id===Ut),At=ke.find(Po=>Po.id===pn?.subtopologyId)?.id;if(!An||!pn||!At)return null;const ir=n9.getCreateParamsPayload({diagramNodeOrientation:An,routerId:pn.id,subtopologyId:At,projectId:t,parentRouter:pn??null});return ir||null},ig=async Qe=>{lc();const Ut=L0(Qe);if(Ut===null)return;if(await ne({requestBody:Ut})){const{data:pn}=await Se();if(!pn?.length)return;const At=pn[pn.length-1];Oa(At.id)}},k0=async Qe=>{const Ut=Qe.id;Ut&&await _e({requestBody:{id:Ut,projectId:t}})},Vm=async Qe=>{const Ut=Qe.id;Ut&&await ze({id:Ut,projectId:t})},SS=async Qe=>{const Ut=Qe.id;Ut&&await ue({id:Ut,projectId:t})},Gm=async Qe=>{const Ut=Qe.id;Ut&&await j({id:Ut,projectId:t})},bd=()=>{O(AC(""))},lc=()=>{fe(!1),xe(null)},Io=({cell:Qe,top:Ut,left:An})=>{xe(Qe),oe({top:Ut,left:An}),Q({top:Ut+50,left:An+50}),fe(!0)},xo=()=>{ee(!0)},Fc=()=>{ee(!1),lc()},rs=Qe=>{switch(Qe.shape){case r:return cs.ROUTER;case o:return cs.DEVICE;case i:return cs.BRIDGE;case l:case c:case u:case d:return cs.ROUTER_DIRECTION;default:return Pe.find(An=>An.id===Qe.id)?.type===Kl.ROUTER?cs.ROUTER_ROUTER_CONNECTION:cs.UNSUPPORTED}},na=Qe=>{switch(Qe){case cs.ROUTER:case cs.DEVICE:case cs.BRIDGE:return y;case cs.ROUTER_ROUTER_CONNECTION:return v;case cs.ROUTER_DIRECTION:default:return[b,S]}},Ru=Qe=>N.isProgrammableSamEnabled?Wm(Qe)?_:"":A,Nf=Qe=>!N.isProgrammableSamEnabled||Wm(Qe)||W,ra=(Qe,Ut)=>{const An=na(Qe);switch(Qe){case cs.ROUTER:case cs.DEVICE:case cs.BRIDGE:case cs.ROUTER_ROUTER_CONNECTION:return[{handleClickEvent:xo,label:An}];case cs.ROUTER_DIRECTION:const pn=Gw(Ut.id);return[{handleClickEvent:async()=>await ig(Ut),label:An[1],disabled:Nf(Ut),tooltipMessage:Ru(Ut)},...pn?[pn]:[]];default:return[]}},Bc=({routerId:Qe,egressPort:Ut,ingressPort:An})=>Pe.some(pn=>pn.fromRouterId===Qe&&pn.fromPort===Ut||pn.toRouterId===Qe&&pn.toPort===An||pn.fromRouterId===Qe&&pn.fromPort===Fg.EGRESS&&pn.toPort===An||pn.toRouterId===Qe&&pn.toPort===Fg.INGRESS&&pn.fromPort===Ut),Wm=Qe=>{const Ut=Qe.id.split("_")[0];switch(Qe.shape){case l:return Bc({routerId:Ut,egressPort:xr.NORTH_EGRESS,ingressPort:xr.NORTH_INGRESS});case c:return Bc({routerId:Ut,egressPort:xr.EAST_EGRESS,ingressPort:xr.EAST_INGRESS});case u:return Bc({routerId:Ut,egressPort:xr.SOUTH_EGRESS,ingressPort:xr.SOUTH_INGRESS});case d:default:return Bc({routerId:Ut,egressPort:xr.WEST_EGRESS,ingressPort:xr.WEST_INGRESS})}},ES=Qe=>Qe===cs.ROUTER_ROUTER_CONNECTION?"connection":Qe===cs.DEVICE?"device":Qe===cs.BRIDGE?"bridge":"router and all connected devices and bridges",sg=Qe=>{const Ut=Qe.getAttrByPath("text/text"),An=rs(Qe),pn=ES(An),At=An===cs.ROUTER_ROUTER_CONNECTION?"":` deletion of ${Ut}`;Re(`This action will permanently delete the selected ${pn}. Please confirm if you would like to proceed${At}.`)},F0=async()=>{we&&(we.shape===o&&await k0(we).then(()=>{bd()}),we.shape===r&&await Vm(we).then(()=>{bd()}),we.shape===i&&await Gm(we).then(()=>{bd()}),we.isEdge()&&await SS(we),Fc())},il=async Qe=>{const Ut=Tt.head(ke);if(!Ut)return;const An=Qe.map(pn=>um.getCreateProjectConnectionCnocRouterPayload({fromRouterId:pn.fromRouterId,toRouterId:pn.toRouterId,projectId:t,subtopologyId:Ut.id,fromDirection:pn.direction}));await he(An),lc()},Gw=Qe=>{const Ut={handleClickEvent:()=>{},label:b,disabled:!0};if(!Tt.isNumber(Ou)||!Tt.isNumber(Cd))return Ut;const{routerId:An,direction:pn}=bc.getRouterIdAndInterconnectDirectionByCellId(Qe),At=bc.getNextRouterAlongInterconnectDirection({routerId:An,direction:pn,cnocRouters:Ne,maxCnocRouterLogicalCoordinateX:Ou,maxCnocRouterLogicalCoordinateY:Cd});if(!At)return null;if(um.getIsRouterFullyConnectedAtInterconnectDirection({routerId:An,direction:pn,cnocRouterConnections:Pe})||um.getIsRouterFullyConnectedAtInterconnectDirection({routerId:At.id,direction:bc.getOppositeInterconnectDirection(pn),cnocRouterConnections:Pe}))return Ut;const Bn=bc.getAllAvailableRouterConnection({fromRouterId:An,toRouterId:At.id,direction:pn},Pe);return{handleClickEvent:()=>il(Bn),label:b}},xS=async Qe=>{if(!Qe)return;const Ut=Qe.querySelector("svg"),An="http://www.w3.org/2000/svg";if(!Ut)return;const pn=Ut.cloneNode(!0);pn.setAttribute("xmlns",An),pn.setAttribute("width",Ut.clientWidth.toString()),pn.setAttribute("height",Ut.clientHeight.toString());const At=document.createElementNS(An,"rect");At.setAttribute("width","100%"),At.setAttribute("height","100%"),At.setAttribute("fill","#F2F7FA"),pn.insertBefore(At,pn.firstChild);const ir=new XMLSerializer().serializeToString(pn),Po="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(ir);
711return await st.scaleDownProjectThumbnail({dataURL:Po})},cc=C.useCallback(Tt.debounce(async()=>{const Qe=await xS(k.current);Qe&&await Ce({requestBody:{id:t,thumbnail:Qe}})},500),[t]),Mf=Qe=>{Qe.on("node:moved",cc),Qe.on("edge:created",cc),Qe.on("edge:removed",cc),Qe.on("node:added",cc),Qe.on("node:removed",cc),Qe.on("edge:connected",cc),Qe.on("edge:disconnected",cc),Qe.on("scale",cc),Qe.on("translate",cc)},$c=Qe=>{if(Qe){const{tx:Ut,ty:An}=Qe.translate(),pn=Qe.zoom();H.current={tx:Ut,ty:An,zoomFactor:pn}}},Ou=Al.getMaxCnocRouterLogicalCoordinateX(Ne),Cd=Al.getMaxCnocRouterLogicalCoordinateY(Ne),Ww=bc.getRouterCoordinatesWithConnectionOver({cnocRouters:Ne,cnocRouterConnections:Pe});return C.useEffect(()=>{if(!k.current)return;$c(U.current);const Qe=new Gr({container:k.current,background:{color:yB},autoResize:!0,grid:{visible:!0,type:vB,args:[{color:bB,thickness:Xv},{color:CB,thickness:Xv,factor:fS}]},panning:!0,mousewheel:!0,interacting:{nodeMovable:!1,magnetConnectable:!0,edgeMovable:!0,edgeLabelMovable:!1},connecting:{snap:!0,allowPort(){return!0},allowMulti(){return!1},allowBlank(){return!1},allowNode(){return!1},allowEdge(){return!0},allowLoop(){return!0}}});U.current=Qe,Ie(),xt(),Sr(),rt(),Bt(),it(wr.NORTH),it(wr.EAST),it(wr.SOUTH),it(wr.WEST),Tt.isNumber(Cd)&&Tt.isNumber(Ou)&&Array.from({length:Cd+2},(At,ir)=>{Array.from({length:Ou+2},(Po,Bn)=>{const Hc=ir,Nu=Bn,oa=Al.getCnocRouterInCurrentCoordinate({cnocRouters:Ne,logicalCoordinateX:Nu,logicalCoordinateY:Hc}),si=Al.getHasCnocRouterInAdjacentCoordinates({cnocRouters:Ne,logicalCoordinateX:Nu,logicalCoordinateY:Hc});if(Hc>=8||Nu>=16)return;const Mu=Ww.some(Mh=>Mh.logicalCoordinateX===Nu&&Mh.logicalCoordinateY===Hc);if(!oa&&si&&!Mu&&Qe.addNode(wn(Hc,Nu)),oa){const Mh={x:oa.diagramCoordinateX,y:oa.diagramCoordinateY-Ry,attrs:{body:{stroke:r9[oa.type]}}};[{id:oa.id,shape:r,label:oa.name,ports:{items:Pu(oa)},...Mh},...[wr.NORTH,wr.EAST,wr.SOUTH,wr.WEST].map(Dh=>({id:bc.getRouterInterconnectCellId(oa.id,Dh),shape:Cr(Dh),ports:{items:dn(jo(Dh))},...Mh}))].forEach(Dh=>Qe.addNode(Dh))}})}),ce.forEach(At=>{Qe.addNode({id:At.id,shape:o,x:At.diagramCoordinateX,y:At.diagramCoordinateY-Ry,label:At.name,ports:{items:[ta(At)]},attrs:{body:{stroke:qB[At.type]}}})});const Ut=[];Ne.forEach(At=>{Object.values(tu).forEach(Po=>{At.enabledDevicePorts.includes(Po)||At.type===Ao.REPEATER||Ut.push(Qe.addNode(Wt(At,Po)))})}),be.forEach(At=>{const ir=At.diagramNodeOrientation;Qe.addNode({id:At.id,shape:i,width:$t(ir),height:Pn(ir),x:At.diagramCoordinateX,y:At.diagramCoordinateY-Ry,label:At.name,attrs:{highlight:{width:$t(ir),height:Pn(ir)},label:{x:an(ir),y:tr(ir)}},ports:{items:yt(At)}})}),Pe.forEach(At=>{const ir=At.fromRouterId,Po=At.connectedDeviceId??At.connectedBridgeId??At.toRouterId,Bn="block";if(At.type===Kl.ROUTER){const bi=Ne.find(Mu=>Mu.id===ir),uc=ke.find(Mu=>Mu.id===bi?.subtopologyId),Hc=jn(At.fromPort),Nu=jn(At.toPort),oa=bc.getRouterInterconnectCellId(ir,Hc),si=bc.getRouterInterconnectCellId(Po,Nu);return!bi||!uc?void 0:Qe.addEdge({id:At.id,source:{cell:oa,port:At.fromPort},target:{cell:si,port:At.toPort},attrs:{line:{targetMarker:Bn}},labels:[{attrs:{label:{text:"512b"}}}]})}if(At.type===Kl.DEVICE){const bi=ce.find(uc=>uc.id===Po);return bi?Qe.addEdge({id:At.id,source:{cell:ir,port:At.fromPort},target:{cell:Po,port:At.toPort},attrs:{line:{sourceMarker:Bn,targetMarker:Bn}},labels:[{attrs:{label:{text:`${bi.portDataWidth}b`}}}]}):void 0}if(At.type===Kl.BRIDGE){const bi=be.find(uo=>uo.id===Po);if(!bi)return;const uc=At.fromPort===Fg.EGRESS,Hc=bc.getRouterInterconnectCellId(At.fromRouterId,bi.diagramNodeOrientation),Nu=bc.getRouterInterconnectCellId(At.toRouterId,bi.diagramNodeOrientation),oa=`${bi.id}_${bi.diagramNodeOrientation}_${Fg.INGRESS}`,si=`${bi.id}_${bi.diagramNodeOrientation}_${Fg.EGRESS}`,Mu=uc?At.connectedBridgeId:Hc,Mh=uc?Nu:At.connectedBridgeId,jm=uc?si:At.fromPort,Dh=uc?At.toPort:oa;return Qe.addEdge({id:At.id,source:{cell:Mu,port:jm},target:{cell:Mh,port:Dh},attrs:{line:{targetMarker:Bn}}})}});let An=!0,pn=!0;if(Qe.on("node:click",async({cell:At,view:ir,e:Po})=>{if(At.shape===s&&An&&(An=!1,await Vw(At),An=!0),At.shape===a&&pn&&(pn=!1,At.attr("image/xlink:href",sbe),await zm(At),An=!0),At.shape===o){const Bn=ce.find(bi=>bi.id===At.id);Oa(Bn?.id)}if(At.shape===r){const Bn=Ne.find(bi=>bi.id===At.id);Oa(Bn?.id)}if(At.shape===i){const Bn=be.find(bi=>bi.id===At.id);Oa(Bn?.id)}}),Qe.on("cell:contextmenu",({e:At,cell:ir})=>{At.preventDefault();const Po=rs(ir);if(Po===cs.UNSUPPORTED)return;const Bn=ra(Po,ir);Be(Bn),sg(ir),Io({cell:ir,top:At.clientY,left:At.clientX})}),Qe.on("edge:mouseenter",({cell:At})=>{At.addTools([]),At.attr("line/stroke",P)}),Qe.on("edge:mouseleave",({cell:At})=>{At.removeTools(),At.attr("line/stroke","#000")}),Qe.on("node:mouseover",({node:At})=>
711{At.attr("highlight/visibility","visible"),At.getPorts().forEach(ir=>{ir.id&&At.portProp(ir.id,"attrs/highlight/visibility","visible")})}),Qe.on("node:mouseout",({node:At})=>{At.attr("highlight/visibility","hidden"),At.getPorts().forEach(ir=>{ir.id&&At.portProp(ir.id,"attrs/highlight/visibility","hidden")})}),Mf(Qe),H.current){const{tx:At,ty:ir,zoomFactor:Po}=H.current;Qe.zoom(Po,{absolute:!0}),Qe.translate(At,ir)}return!V&&Ne.length&&(Qe.centerContent(),q(!0)),ke.length||q(!1),()=>{$c(U.current),Qe&&(Qe.getNodes().forEach(At=>{Qe.removeNode(At.id)}),Qe.getEdges().forEach(At=>{Qe.removeEdge(At.id)}),Qe.dispose())}},[ke,Ne,ce,be,Pe,N.isProgrammableSamEnabled,N.isBridgeEnabled]),K(le,{sx:{width:$,height:D,position:"absolute",left:0},children:[g("div",{ref:k,style:{width:"100%",height:"100%"}}),re?g(Y8,{open:re,anchorPosition:se,onCloseHandler:lc,menuItems:pe}):null,J?g(XR,{open:ie,anchorPosition:J,onCloseHandler:Fc,onConfirmHandler:F0,dialogTitle:ve,confirmLabel:w}):null]})},Mne=({label:t,colorLegendItems:e})=>K(le,{children:[g(le,{sx:{display:"flex",justifyContent:"center",mb:2},children:g(Ke,{sx:{fontSize:"14px",fontWeight:600},children:t})}),g(iw,{sx:{padding:0},children:e.map(n=>K(RC,{sx:{py:0},children:[g(le,{sx:{width:25,height:15,backgroundColor:n.color,mr:1}}),g(Il,{primary:n.label})]},n.label))})]}),YB=({label:t,expanded:e,handleAccordionChange:n,accordionSummaryChildren:r,accordionDetailsChildren:o})=>K(Hv,{expanded:e,onChange:n(t),sx:{width:Rs.leftPanelWidth,borderBottom:"1px solid #ccc","&.Mui-disabled":{border:"#ccc"}},disableGutters:!0,children:[g(zv,{expandIcon:g(Gv,{}),"aria-controls":`${t}-content`,id:`${t}-header`,sx:{padding:"0 8px",minHeight:"32px","& .MuiAccordionSummary-content":{margin:0,color:tt}},children:r}),g(Uv,{sx:{px:1},children:o})]},t),aUt=({expandedPanels:t,handleAccordionChange:e})=>{const n="Color Legend",r={[Yr.RN]:"CHI RN",[Yr.SN]:"CHI SN",[Yr.MASTER]:"AXI w/ Slave",[Yr.SLAVE]:"AXI w/ Master"},o=Object.values(Ao).map(s=>({color:r9[s],label:X8[s]})),i=Object.values(Yr).map(s=>({color:qB[s],label:r[s]}));return g(YB,{label:n,expanded:t.includes(n),handleAccordionChange:e,accordionSummaryChildren:K(le,{children:[g(_6e,{})," ",g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:n})]}),accordionDetailsChildren:K(le,{children:[g(Mne,{label:"Router",colorLegendItems:o}),g(Mne,{label:"Device",colorLegendItems:i})]})})},lUt=({label:t,controlValue:e,handleSelectInputChange:n,isSelectEnabled:r})=>g(le,{children:g(ec,{value:t,label:t,labelPlacement:"start",sx:{display:"flex",justifyContent:"space-between",height:32,mr:2,pt:.5,pb:.5,"& .MuiFormControlLabel-label":{fontSize:"12px","&:hover":{cursor:"default"}}},disabled:!r,control:g(v0,{sx:{width:"55%"},children:g(xa,{value:e,sx:{height:"24px",fontSize:"12px","& .color-picker":{mt:"2px",height:16,backgroundColor:"inherit"},ml:2},onChange:n,disabled:!r,children:Array.from({length:3+1},(i,s)=>g(mr,{value:s,sx:{fontSize:"12px",backgroundColor:"inherit"},children:s},s))})})})}),cUt=({label:t,value:e})=>K(le,{sx:{display:"flex",justifyContent:"space-between",pl:2,pt:1,pb:.5,width:"50%"},children:[g(Ke,{sx:{fontSize:"12px",minWidth:"124%"},children:t}),g(Ke,{sx:{fontSize:"12px",textAlign:"right",whiteSpace:"nowrap"},children:e})]}),uUt=({cnocSubtopology:t,hasCnocBridges:e})=>
711{const n="X-Coordinate",r="Y-Coordinate",o="Topology ID",i="Create bridge to enable",[s]=ZHt(),a=f=>{switch(f){case n:return"logicalCoordinateX";case r:default:return"logicalCoordinateY"}},l=(f,p)=>({...t,[f]:p}),c=async(f,p)=>{const m=a(f),y=l(m,p);await s({requestBody:y})},u=e?"":i,d=Nbe(t.logicalCoordinateX,t.logicalCoordinateY),h=[{label:n,controlValue:t.logicalCoordinateX},{label:r,controlValue:t.logicalCoordinateY}];return K(le,{children:[g(cUt,{label:o,value:d}),h.map(({label:f,controlValue:p})=>g(rn,{title:u,children:g(lUt,{label:f,controlValue:p,handleSelectInputChange:m=>c(f,m.target.value),isSelectEnabled:e})},f))]})},dUt=({expandedPanels:t,handleAccordionChange:e,cnocSubtopology:n,hasCnocBridges:r})=>{const o="Topology Coordinate";return g(YB,{label:o,expanded:t.includes(o),handleAccordionChange:e,accordionSummaryChildren:K(le,{children:[g(k6e,{})," ",g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:o})]}),accordionDetailsChildren:g(uUt,{cnocSubtopology:n,hasCnocBridges:r})})},hU=({label:t,component:e,icon:n,handleSelect:r,children:o})=>g(W0e,{sx:{ml:-1,"& .MuiTreeItem-label":{paddingLeft:"0px"},"& .MuiTreeItem-content":{paddingRight:0}},nodeId:e.id,label:g(le,{id:`${t}-box`,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pl:-1,py:1,pr:"32px",position:"relative"},children:K(le,{sx:{display:"flex",alignItems:"center",overflow:"hidden",flex:1,minWidth:0},children:[n,g(Ke,{sx:{fontSize:"12px",pl:"5px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},title:t,children:t})]})}),onClick:i=>{i.stopPropagation(),r(e)},children:o},`${t}-item`),hUt=()=>K(Hp,{sx:{fontSize:20},children:[g("rect",{x:"3",y:"2",width:"18",height:"20",rx:"3",ry:"3",fill:"none",stroke:"#444",strokeWidth:"1.5"}),g("rect",{x:"10",y:"6",width:"4",height:"4",fill:"lightblue",stroke:"#444",strokeWidth:"0.5"}),g("rect",{x:"10",y:"14",width:"4",height:"4",fill:"lightyellow",stroke:"#444",strokeWidth:"0.5"})]}),fU=({connectionType:t,routerType:e=Ao.HN_F_WITHOUT_L3,deviceType:n=Yr.RN})=>{switch(t){case Kl.ROUTER:return g(Z6e,{sx:{color:r9[e],"& path:last-of-type":{fill:"transparent"}}});case Kl.DEVICE:return g(R6e,{sx:{color:qB[n]}});case Kl.BRIDGE:default:return g(hUt,{})}},fUt=({projectId:t})=>{const e=Yn(),n=bt(oae),r=Tt.sortBy(Th.getAllByProjectId(t),"deviceId"),o=Aa.getAllByProjectId(t),i=_h.getAllByProjectId(t),s=q6.getAllByProjectId(t),a=jB.getAllByProjectId(t),l=Th.getById(n,t),c=Aa.getById(n,t),u=_h.getById(n,t),d=a[0],h=l||c||u,f=(b,S)=>s.filter(w=>w.type===b&&w.fromRouterId===S),p=(b,S)=>f(Kl.DEVICE,b).reduce((_,P)=>{const R=S.find(O=>O.id===P.connectedDeviceId);return R?[..._,R]:_},[]),m=(b,S)=>{const w=new Set;return f(Kl.BRIDGE,b).forEach(_=>{const P=S.find(R=>R.id===_.connectedBridgeId);P&&w.add(P)}),Array.from(w)},y=({cnocRouters:b,cnocDevices:S,cnocBridges:w})=>b.map(A=>{const _=Tt.sortBy(p(A.id,S),"connectedPort"),P=Tt.sortBy(m(A.id,w),"diagramNodeOrientation");return{router:A,devices:_,bridges:P}}),v=b=>{e(AC(b.id))};return K(j0e,{defaultExpandIcon:g(PF,{sx:{ml:"12px"}}),defaultCollapseIcon:g(Gv,{sx:{ml:"12px"}}),sx:{ml:-1,"& .MuiCollapse-wrapper":{marginLeft:"2px",paddingLeft:"0px",borderLeft:"1px dashed black"},maxWidth:"100%"},selected:h?.id??"",children:[K(le,{sx:{display:"flex",alignItems:"center",minHeight:36,pl:"8px",gap:1},children:[g(_W,{sx:{fontSize:20}}),g(Ke,{fontSize:12,children:d?.name??"Subtopology_0"})]}),g(le,{children:y({cnocRouters:r,cnocDevices:o,cnocBridges:i}).map(b=>g(hU,{component:b.router,label:b.router.name,icon:fU({connectionType:Kl.ROUTER,routerType:b.router.type}),handleSelect:v,children:K(le,{children:[b.devices.map(S=>g(hU,{component:S,label:S.name,icon:fU({connectionType:Kl.DEVICE,deviceType:S.type}),handleSelect:v},S.id)),b.bridges.map(S=>g(hU,{component:S,label:S.name,icon:fU({connectionType:Kl.BRIDGE}),handleSelect:v},S.id))]})},b.router.id))})]})},pUt=({projectId:t,expandedPanels:e,handleAccordionChange:n})=>{const r="Explorer";return g(YB,{label:r,expanded:e.includes(r),handleAccordionChange:n,accordionSummaryChildren:K(le,{children:[g(qI,{}),g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:r})]}
711),accordionDetailsChildren:g(fUt,{projectId:t})})},gUt=({projectId:t,openAddSubtopologyMenu:e,handleClose:n})=>{const[a]=QHt(),[l,c]=C.useState(0),[u,d]=C.useState(0),h=Array.from({length:8},(S,w)=>w+1),f=Array.from({length:16},(S,w)=>w+1),p=async()=>{if(l>0&&u>0){const S=m();await a({requestBody:S})}},m=()=>({diagramCoordinateX:mbe,diagramCoordinateY:ybe*l,routerColumnCount:u,routerRowCount:l,dataWidth:MHt,projectId:t}),y=()=>{p(),b(),n()},v=(S,w)=>{d(S),c(w)},b=()=>{d(0),c(0)};return K(Es,{open:!!e,anchorEl:e,onClose:n,children:[g(Ke,{sx:{display:"flex",justifyContent:"center"},children:`Create ${u} x ${l} Topology`}),g(le,{sx:{display:"grid",position:"relative",gridTemplateColumns:`repeat(16, ${24+1}px)`,gridTemplateRows:`repeat(8, ${24+1}px)`,width:"fit-content"},children:h.map(S=>f.map(w=>{const A=S===l&&w===u,_=S<=l&&w<=u;return g(Sn,{"data-hovered":A||void 0,"data-in-range":_&&!A?!0:void 0,sx:{borderRadius:0,minWidth:0,width:24,height:24,padding:0,margin:"1px",border:"1px solid black",boxSizing:"border-box",'&[data-hovered="true"]':{borderColor:"orange",borderWidth:"3px",margin:0,width:24+2*1,height:24+2*1},'&[data-in-range="true"]':{borderColor:"orange"}},onClick:()=>y(),onMouseEnter:()=>v(w,S),onMouseLeave:()=>b()},`create-button-${S}-${w}`)}))})]})},mUt=({projectId:t})=>{const e=Su[wa.addIcon],n="Configure Topology",r="Create Topology",o="Clear Topology",i="This action will permanently remove all existing routers, devices, and connections. Please confirm if you would like to proceed.",s="Clear",a=Yn(),[l,c]=C.useState(null),[u,d]=C.useState(!0),[h,f]=C.useState(!0),[p,m]=C.useState(null),{data:y=[],isLoading:v,isFetching:b}=Q8({projectId:t}),[S]=JHt(),w=()=>{a(AC(""))},A=async()=>{const O=R();await S({requestBody:O}),w(),P()},_=O=>{c({top:O.clientY,left:O.clientX})},P=()=>{c(null)},R=()=>({id:y[0].id,projectId:t});return C.useEffect(()=>{if(d(v||b),!v&&!b){const O=!!y.length;f(!O)}},[y,v,b]),K(le,{children:[g(le,{sx:{display:"flex",justifyContent:"center",mb:2},children:g(Ke,{sx:{fontSize:"14px",fontWeight:600},children:n})}),g(le,{sx:{display:"flex",justifyContent:"center"},children:h?g(W2,{onClick:O=>{O.stopPropagation(),m(O.currentTarget)},startIcon:g(e,{}),variant:"contained",loading:u,loadingPosition:"start",sx:{backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7}},children:g("span",{children:r})}):g(W2,{onClick:O=>_(O),startIcon:g(RF,{}),variant:"contained",color:"error",children:g("span",{children:o})})}),l?g(XR,{open:!!l,anchorPosition:l,onCloseHandler:P,onConfirmHandler:A,dialogTitle:i,confirmLabel:s}):null,p?g(gUt,{projectId:t,openAddSubtopologyMenu:p,handleClose:()=>m(null)}):null]})},yUt=({projectId:t,expandedPanels:e,handleAccordionChange:n})=>{const r="Configure Topology";return g(YB,{label:r,expanded:e.includes(r),handleAccordionChange:n,accordionSummaryChildren:K(le,{children:[g(Pce,{})," ",g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:r})]}),accordionDetailsChildren:g(mUt,{projectId:t})})},vUt=({isLeftPanelOpen:t,projectId:e,activeTab:n})=>{const r="Configure Topology",o="Color Legend",i="Topology Coordinate",s="Explorer",a=o0.getByProjectId(e),l=jB.getAllByProjectId(e),c=_h.getAllByProjectId(e),[u,d]=C.useState([r,o,i,s]),h=f=>()=>{d(p=>p.includes(f)?p.filter(m=>m!==f):[...p,f])};return K(le,{sx:{backgroundColor:"#FAFAFA",boxShadow:"0 3px 10px rgb(0 0 0 / 0.2);",width:ei.getLeftPanelWidth(t),height:"100%",overflowY:"auto",overflowX:"hidden",zIndex:2,left:0,position:"absolute"},children:[g(yUt,{projectId:e,expandedPanels:u,handleAccordionChange:h}),a.isProgrammableSamEnabled&&l.length?g(dUt,{expandedPanels:u,handleAccordionChange:h,cnocSubtopology:l[0],hasCnocBridges:!!c.length}):null,g(pUt,{projectId:e,expandedPanels:u,handleAccordionChange:h}),n===Un.DESIGN?g(aUt,{expandedPanels:u,handleAccordionChange:h}):null]})},bUt=({componentName:t,addresses:e})=>{const n="Region Name",r="Base",o="Size",i="Limit",[u,d]=C.useState({pageSize:100,page:0}),h=(m,y=!1)=>{const v=y?m.value:js+_t.getZeroPaddedAddressWithUnderscores(m.value,7).toUpperCase();return g(rn,{title:m.errorMessage,placement:"bottom-start",children:g(le,{sx:{width:"100%",background:m.hasCellError||m.hasRegionError?"lightpink":"inherit"},children:g(Ca,{invisible:!m.hasCellError,color:"error",variant:"dot",anchorOrigin:{vertical:"top",horizontal:"left"},sx:{"& .MuiBadge-dot:not(.MuiBadge-invisible)":{transform:"translate(-6px, 2px)"}},children:v})})})},f=C.useMemo(()=>e.map((m,y)=>{const v={[n]:{value:m.regionName,hasRegionError:m.hasRegionError,hasCellError:m.hasRegionError,errorMessage:m.regionErrorMessage},[r]:{value:m.base,hasRegionError:m.hasRegionError,hasCellError:m.hasBaseError,errorMessage:m.baseErrorMessage},[o]:{value:_t.getDisplaySizeFromBaseAndLimit(m.base,m.limit),hasRegionError:m.hasRegionError,hasCellError:m.hasSizeError,errorMessage:m.sizeErrorMessage},[i]:{value:m.limit,hasRegionError:m.hasRegionError,hasCellError:m.hasLimitError,errorMessage:m.limitErrorMessage}};return{id:`${t}-${y}`,...v}}),[e,t]),p=C.useMemo(()=>[{field:n,headerName:n,flex:1,headerAlign:"center",align:"center",hideable:!1,renderCell:y=>h(y.value,!0)},{field:r,headerName:r,flex:1,headerAlign:"center",align:"center",hideable:!1,renderCell:y=>h(y.value)},{field:o,headerName:o,flex:1,headerAlign:"center",align:"center",hideable:!1,renderCell:y=>h(y.value,!0)},{field:i,headerName:i,flex:1,headerAlign:"center",align:"center",hideable:!1,renderCell:y=>h(y.value)}],[]);return g(Dm,{tableType:ps.ADDRESS_MAP,wrapperSx:{p:0,flex:1},dataGridSx:{p:0,height:"100%",minHeight:"inherit","& .MuiDataGrid-columnHeader":{pointerEvents:"none"},"& .MuiDataGrid-cell":{p:0,alignItems:"center",justifyContent:"center",borderWidth:"1px 1px 0 0",borderColor:"lightgray",borderStyle:"solid"}},rows:f,columns:p,rowHeight:30,columnHeaderHeight:20,paginationModel:u,onPaginationModelChange:d,pageSizeOptions:[100],disableColumnResize:!0,disableColumnSelector:!0,disableColumnMenu:!0,disableColumnFilter:!0,disableColumnSorting:!0,showColumnVerticalBorder:!0,hideFooter:e.length<100})},CUt=({isHomeNode:t,isHighlighted:e,handleEdit:n,handleHighlight:r,handleUnhighlight:o})=>
711{const i="Edit entries",s="Highlight with all Subordinate nodes",a="Highlight with parent Home node",l="Remove highlight",c=t?s:a,u={p:"3px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7}};return K(Mt,{direction:"row",spacing:.5,sx:{alignContent:"center",pr:1,mr:"10px"},children:[g(rn,{title:i,children:g(Qo,{icon:g(hR,{fontSize:"small"}),sxPropsOverride:u,onClick:d=>{d.stopPropagation(),n()}})}),e?g(rn,{title:l,children:g(Qo,{icon:g(dR,{fontSize:"small"}),sxPropsOverride:u,onClick:d=>{d.stopPropagation(),o()}})}):g(rn,{title:c,children:g(Qo,{icon:g(H6e,{fontSize:"small"}),sxPropsOverride:u,onClick:d=>{d.stopPropagation(),r()}})})]})},SUt=({component:t,addresses:e,accordionColor:n,allAccodionsExpandStatePair:r,isHighlighted:o,isEmptyAddress:i,handleHighlight:s,handleUnhighlight:a,handleEdit:l})=>{const c="lightpink",u="cornflowerblue",d="cyan",[h,f]=C.useState(r[0]),[p,m]=C.useState(!1),y=i||e.some(A=>A.hasRegionError||A.hasBaseError||A.hasLimitError||!!A.regionErrorMessage||!!A.baseErrorMessage||!!A.limitErrorMessage),v=o?`3px solid ${p?u:d}`:"none",b=o?0:"3px",S=y?c:n,w=()=>{m(!0),s(e)};return C.useEffect(()=>{o||m(!1)},[o]),C.useEffect(()=>{f(r[0])},[r]),g(le,{sx:{border:v,m:b},children:K(Hv,{expanded:h,onChange:()=>f(!h),disableGutters:!0,children:[K(zv,{expandIcon:g(Gv,{}),id:`${t.name}-address-header`,sx:{padding:"0",minHeight:"30px",borderBottom:"1px solid lightgrey","& .MuiAccordionSummary-content":{margin:0,color:tt},backgroundColor:S},children:[g(Ke,{sx:{alignContent:"center",width:"100%",ml:"4px"},fontWeight:600,children:g(Ca,{invisible:!y,color:"error",variant:"dot",sx:{zIndex:0},anchorOrigin:{vertical:"top",horizontal:"left"},children:Zn.getCnocAccordionTitle(t)})}),g(CUt,{isHomeNode:Fp.getIsProjectComponentCnocRouter(t),isHighlighted:o,handleEdit:()=>l(t,e),handleHighlight:w,handleUnhighlight:a})]}),g(Uv,{sx:{p:0},children:g(bUt,{componentName:t.name,addresses:e})})]},`${t.name}-accordion`)})},EUt=({allAccordionsExpandStateToggleValue:t,setAllAccordionsExpandStatePair:e})=>{const n="Expand all",r="Collapse all",o={p:"4px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7}};return K(Mt,{direction:"row",spacing:.5,sx:{alignContent:"center",pr:1},children:[g(rn,{title:n,children:g(Qo,{icon:g(o8e,{}),sxPropsOverride:o,onClick:()=>e([!0,!t])})}),g(rn,{title:r,children:g(Qo,{icon:g(r8e,{}),sxPropsOverride:o,onClick:()=>e([!1,!t])})})]})},Dne=({columnLabel:t,memoryType:e,components:n,addresses:r,emptyComponentIds:o,highlightedComponentIds:i,handleHighlight:s,handleUnhighlight:a,handleEdit:l})=>{const c="lightcyan",u="lightgrey",d=qB[Yr.MASTER],[h,f]=C.useState([!0,!0]),[p,m]=C.useState(""),v=(A=>{switch(A){case Hn.CACHEABLE:return c;case Hn.NON_CACHEABLE:return u;case Hn.SNOOPABLE:default:return d}})(e),b=C.useCallback(A=>{m(A)},[n]),S=C.useMemo(()=>p?n.filter(A=>Zn.getCnocAccordionTitle(A).toLowerCase().includes(p.toLowerCase())):n,[p,n]),w=C.useMemo(()=>{const A={};return n.forEach(_=>{A[_.id]=r.filter(P=>P.cnocRouterId===_.id||P.cnocDeviceId===_.id||P.cnocBridgeId===_.id)}),A},[n,r]);return C.useEffect(()=>{m(""),f([!0,!h[1]])},[e,n]),g(To,{sx:{backgroundColor:"white",border:"1px solid lightgrey",height:"100%",width:"50%"},children:K(Mt,{direction:"column",spacing:.5,sx:{height:"100%"},children:[K(Mt,{direction:"row",sx:{pt:2,alignContent:"center",width:"100%"},children:[g(Ke,{variant:"h6",noWrap:!0,sx:{ml:"60px",textTransform:"uppercase",flex:1,textAlign:"center"},children:t}),g(EUt,{allAccordionsExpandStateToggleValue:h[1],setAllAccordionsExpandStatePair:f})]}),g(K6,{searchTerm:p,handleSearchInputValueChange:b}),g(le,{sx:{flex:1,overflow:"auto",height:"100%"},children:S.map(A=>g(SUt,{component:A,addresses:w[A.id],accordionColor:v,allAccodionsExpandStatePair:h,isHighlighted:i.includes(A.id),isEmptyAddress:o.includes(A.id),handleHighlight:s,handleUnhighlight:a,handleEdit:l},`${A.id}`))})]})})},Dbe=({isMultiSelectEnabled:t,isAllItemsSelected:e,isAnyItemSelected:n,handleEnableMultiSelect:r,handleCancelMultiSelect:o,handleSelectAll:i,handleUnselectAll:s,handleDeleteMultipleRows:a})=>{const l="Delete selected Regions",c="Select multiple",u="Cancel multiple select",d="Select all",h="Unselect all",f={p:"3px",color:tt,"&:hover":{opacity:.7}};return g(le,{flex:1,children:t?K(Mt,{direction:"row",width:"100%",children:[e?g(rn,{title:h,children:g(Qo,{icon:g(x6e,{sx:{p:"2px"}}),sxPropsOverride:f,onClick:s})}):g(rn,{title:d,children:g(Qo,{icon:n?g($6e,{sx:{p:"2px"}}):g(U6e,{sx:{p:"2px"}}),sxPropsOverride:f,onClick:i})}),n?g(rn,{title:l,children:g(Qo,{icon:g(O6e,{sx:{p:"2px"}}),sxPropsOverride:{...f,color:"red"},onClick:a})}):g(rn,{title:u,children:g(Qo,{icon:g(E6e,{sx:{p:"2px"}}),sxPropsOverride:f,onClick:o})})]}):g(rn,{title:c,children:g(Qo,{icon:g(M6e,{sx:{p:"4px"}}),sxPropsOverride:f,onClick:r})})})},xUt=({isMultiSelectEnabled:t,isSelectedForRemoval:e,handleToggleSelect:n,handleDeleteRowByIndex:r})=>g(le,{flex:1,children:t?g(_u,{checked:e,onChange:n,inputProps:{"aria-label":"controlled"},size:"small",sx:{p:"5px",color:tt,"&.Mui-checked":{color:"red"}}}):g(rn,{title:"Delete Region",children:g(Qo,{icon:g(RF,{sx:{p:"1px"}}),sxPropsOverride:{p:"3.3px",color:"red","&:hover":{opacity:.7}},onClick:r})})}),Lbe=({editableAddress:t,editableAddresses:e,isMultiSelectEnabled:n,isSelectedForRemoval:r,handleRowEdit:o,handleToggleSelect:i,handleDeleteRowByIndex:s})=>{const a=t.projectId,l=Tt.sortBy(_h.getAllByProjectId(a),"deviceId"),c=Th.getHomeRoutersByProjectId(a),u=Aa.getSubordinateNodesByProjectId(a),d=Ov.getAllForHomeNodesByProjectId(a),h=Ov.getAllForSubordinateNodesByProjectId(a),f=Tt.sortBy(Ov.getAllSnoopableByProjectId(a),Q=>Zn.getRegionNumber(Q.regionName)),p="Address is required",m="Base address must be equal or less than the limit address",y="Region must not overlap with other regions",v="Subordinate home node region must be in 1 home node region",b="Address exceeds N
711oC address width",S=7,w=28,A=Q=>{o({...t,base:Q})},_=Q=>{o({...t,limit:Q})},P=Ws.getAddressMap({nodeType:Tm.HOME,hnfRouters:c,cnocBridges:l,subordinateDevices:u,cnocAddresses:d}),R=Ws.getAddressMap({nodeType:Tm.SUBORDINATE,hnfRouters:c,cnocBridges:l,subordinateDevices:u,cnocAddresses:h,isBridgeIncluded:!0}),O=Ws.getMergedAddressMap({addressMap:P,componentId:t.cnocRouterId,editableAddresses:e}),N=Ws.getMergedAddressMap({addressMap:R,componentId:t.cnocDeviceId??t.cnocBridgeId,editableAddresses:e}),M=Ws.getMergedSnoopableAddressMap({editableAddresses:e,snoopableAddresses:f}),L=_t.hasBlankAddress(t.base,t.limit),F=_t.getHasBaseExceededLimitAddress(t.base,t.limit),$=_t.getHasExceededAddressWidth(t.base,w),D=_t.getHasExceededAddressWidth(t.limit,w),k=Ws.getOverlappingNamesByAddressInputRange({editableAddress:t,mergedHomeNodeAddressMap:O,mergedSubordinateNodeAddressMap:N,mergedSnoopableAddresses:M}),U=Ws.getInvalidServicingHomeNodeNamesByAddressInputRange({editableAddress:t,homeNodeAddressMap:P}),H=Q=>Q.map(se=>` - ${se}`).join(` 712`),q=(()=>L?p:F?m:$||D?b:k.length?`${y} 713${H(k)}`:U.length?`${v} 714${H(U)}`:"")(),J=L||F||$||D||!!k.length||!!U.length;return K(Mt,{direction:"row",width:"100%",children:[g($me,{errorMessageTooltip:q,editableAddressName:t.regionName,editableAddressBase:t.base,editableAddressLimit:t.limit,addressWidth:S,hasError:J,handleBaseSubmit:A,handleLimitSubmit:_}),g(le,{flex:.25,children:g(xUt,{isMultiSelectEnabled:n,isSelectedForRemoval:r,handleToggleSelect:i,handleDeleteRowByIndex:s})})]})},wUt=()=>Qp(),AUt=()=>"",TUt=()=>"",_Ut=()=>"",SM={getId:wUt,getRegionName:AUt,getBase:TUt,getLimit:_Ut},IUt=({cnocRouterId:t,cnocDeviceId:e,cnocBridgeId:n,projectId:r,memoryType:o})=>({id:SM.getId(),cnocRouterId:t,cnocDeviceId:e,cnocBridgeId:n,projectId:r,memoryType:o,regionName:SM.getRegionName(),base:SM.getBase(),limit:SM.getLimit()}),PUt=({cnocRouterId:t,cnocDeviceId:e,cnocBridgeId:n,projectId:r,memoryType:o})=>{const i="Address is required";return{...IUt({cnocRouterId:t,cnocDeviceId:e,cnocBridgeId:n,projectId:r,memoryType:o}),hasRegionError:!1,hasBaseError:!0,hasSizeError:!1,hasLimitError:!0,regionErrorMessage:"",baseErrorMessage:i,sizeErrorMessage:"",limitErrorMessage:i}},kbe={getCreatePayloadWithErrorInfo:PUt},RUt=({projectId:t,memoryType:e,component:n,componentAddresses:r,addressesByMemoryType:o,handleCancel:i,handleUnhighlight:s})=>{const a="70vh",l="910px",c="Region Name",u="Start Address (Base)",d="Size",h="End Address (Limit)",f="Address Regions",p="(Only upper 28-bits are configurable. Lower 24-bits are not configurable)",m="Add Address Region",y={p:"4px",mt:"6px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7}},[v,b]=C.useState(Tt.cloneDeep(r)),[S,w]=C.useState([]),[A,_]=C.useState(!1),[P]=vbe(),R=U=>{const H=v.map(V=>V.id===U.id?U:V);b(H)},O=U=>{const H=v.filter((V,q)=>q!==U);b(H)},N=()=>{const U=v.filter((H,V)=>!S.includes(V));b(U),$()},M=()=>{const U=Fp.getIsProjectComponentCnocRouter(n),H=Fp.getIsProjectComponentCnocDevice(n),V=Fp.getIsProjectComponentCnocBridge(n),q=kbe.getCreatePayloadWithErrorInfo({cnocRouterId:U?n.id:null,cnocDeviceId:H?n.id:null,cnocBridgeId:V?n.id:null,projectId:t,memoryType:e});b([...v,q])},L=()=>{const U=v.map((H,V)=>V);w(U)},F=U=>{if(S.includes(U)){const H=S.filter(V=>V!==U);w(H)}else w([...S,U])},$=()=>{w([])},D=U=>{const{id:H,cnocRouterId:V,cnocDeviceId:q,cnocBridgeId:J,projectId:Q,memoryType:se,regionName:oe,base:ie,limit:ee}=U;return{id:H,cnocRouterId:V,cnocDeviceId:q,cnocBridgeId:J,projectId:Q,memoryType:se,regionName:oe,base:ie,limit:ee}},k=()=>{const U=v.map(se=>se.id),V=r.filter(se=>!U.includes(se.id)).map(se=>se.id),q=o.filter(se=>!V.includes(se.id)),J=Array.from([...q,...v].reduce((se,oe)=>se.set(oe.id,D(oe)),new Map).values());P({requestBody:{projectId:t,memoryType:e,cnocAddresses:J}}),i(),s()};return g(Iu,{open:!0,onClose:(U,H)=>{H!=="backdropClick"&&i()},PaperProps:{sx:{width:l,height:a,overflow:"hidden"}},maxWidth:!1,children:g(Mt,{direction:"column",sx:{width:"100%",height:"100%"},children:K(To,{sx:{backgroundColor:"white",border:"1px solid lightgrey",height:"100%",display:"flex",flexDirection:"column"},children:[K(Mt,{direction:"column",sx:{flex:1,alignItems:"center",overflow:"hidden"},children:[g(Z6,{accordionTitle:Zn.getCnocAccordionTitle(n),title:f,subtitle:p}),K(Mt,{direction:"row",width:"100%",children:[g(J6,{headerNames:[c,u,d,h]}),g(le,{flex:.34,children:g(Dbe,{isMultiSelectEnabled:A,isAllItemsSelected:S.length===v.length,isAnyItemSelected:!!S.length,handleEnableMultiSelect:()=>_(!0),handleCancelMultiSelect:()=>_(!1),handleSelectAll:L,handleUnselectAll:$,handleDeleteMultipleRows:N})})]}),g(Mt,{direction:"column",sx:{width:"100%",alignItems:"center",flex:1,mt:-.4,minHeight:0},children:K(Mt,{direction:"column",sx:{width:"100%",alignItems:"center",flex:1,overflowY:"auto"},children:[v.map((U,H)=>(U.regionName=`Region${H}`,g(Lbe,{editableAddress:U,editableAddresses:v,isMultiSelectEnabled:A,isSelectedForRemoval:S.includes(H),handleRowEdit:R,handleToggleSelect:()=>F(H),handleDeleteRowByIndex:()=>O(H)},U.id))),g(le,{sx:{position:"sticky",bottom:0,width:"100%",display:"flex",justifyContent:"center",backgroundColor:"white",py:.5,zIndex:1},children:g(rn,{title:m,children:g(Qo,{icon:g(eS,{}),sxPropsOverride:y,onClick:M})})})]})})]}),g(Q6,{handleSave:k,handleCancel:i})]})})})},OUt=({searchTerm:t,addresses:e})=>{const i="Region Name",s="Base",a="Size",l="Limit",{width:c,height:u}=sc(),d=bt(h0),h=bt(gd),f=ei.getCenterPanelHeight(u)-75,p=ei.getCenterPanelWidth({width:c,isLeftPanelOpen:d,isRightPanelOpen:h}
714),m=Math.floor(p/3)-15,y=AB.getCenterPanelTableHeight(f),v=()=>e.map(_=>_.regionName),b=()=>t?e.filter(_=>v().find(R=>R===_.regionName)?.toLowerCase().includes(t.toLowerCase())):e,S=(_,P=!1)=>{const R=P?_.value:js+_t.getZeroPaddedAddressWithUnderscores(_.value,7);return g(rn,{title:_.errorMessage,placement:"bottom-start",children:g(le,{sx:{width:"100%",background:_.hasCellError||_.hasRegionError?"lightpink":"inherit"},children:g(Ca,{invisible:!_.hasCellError,color:"error",variant:"dot",anchorOrigin:{vertical:"top",horizontal:"left"},sx:{"& .MuiBadge-dot:not(.MuiBadge-invisible)":{transform:"translate(-6px, 2px)"}},children:R})})})},w=()=>b().map((_,P)=>{const R={[i]:{value:_.regionName,hasRegionError:_.hasRegionError,hasCellError:_.hasRegionError,errorMessage:_.regionErrorMessage},[s]:{value:_.base,hasRegionError:_.hasRegionError,hasCellError:_.hasBaseError,errorMessage:_.baseErrorMessage},[a]:{value:_t.getDisplaySizeFromBaseAndLimit(_.base,_.limit),hasRegionError:_.hasRegionError,hasCellError:_.hasSizeError,errorMessage:_.sizeErrorMessage},[l]:{value:_.limit,hasRegionError:_.hasRegionError,hasCellError:_.hasLimitError,errorMessage:_.limitErrorMessage}};return{id:`${_.regionName}-${P}`,...R}}),A=[{field:i,headerName:i,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:m,flex:1,headerAlign:"center",align:"center",renderCell:({value:_})=>S(_,!0)},{field:s,headerName:s,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:m,flex:1,headerAlign:"center",align:"center",renderCell:({value:_})=>S(_)},{field:a,headerName:a,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:m,flex:1,headerAlign:"center",align:"center",renderCell:({value:_})=>S(_,!0)},{field:l,headerName:l,filterable:!1,sortable:!0,hideable:!1,disableColumnMenu:!0,width:m,flex:1,headerAlign:"center",align:"center",renderCell:({value:_})=>S(_)}];return g(Dm,{tableType:ps.ADDRESS_MAP,wrapperSx:{p:1,minHeight:"inherit"},dataGridSx:{height:y,"& .MuiDataGrid-columnHeader":{pointerEvents:"none",borderWidth:"1px",borderColor:"lightgray",borderStyle:"solid"},"& .MuiDataGrid-cell":{p:0,alignItems:"center",justifyContent:"center",borderWidth:"1px",borderColor:"lightgray",borderStyle:"solid"}},rows:w(),columns:A,columnHeaderHeight:40,disableColumnResize:!0,disableColumnSelector:!0,disableColumnMenu:!0,disableColumnFilter:!0,disableColumnSorting:!0,showColumnVerticalBorder:!0})},NUt=({projectId:t,addresses:e,handleCancel:n})=>{const r="70vh",o="Region Name",i="Base",s="Size",a="Limit",l="Snoopable Address Map",c="Add Address Region",u={p:"4px",mt:"6px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7}},[d,h]=C.useState(Tt.cloneDeep(e)),[f,p]=C.useState([]),[m,y]=C.useState(!1),[v]=vbe(),b=M=>{const L=d.map(F=>F.id===M.id?M:F);h(L)},S=M=>{const L=d.filter((F,$)=>$!==M);h(L)},w=()=>{const M=d.filter((L,F)=>!f.includes(F));h(M),R()},A=()=>{const M=kbe.getCreatePayloadWithErrorInfo({cnocRouterId:null,cnocDeviceId:null,cnocBridgeId:null,projectId:t,memoryType:Hn.SNOOPABLE});h([...d,M])},_=()=>{const M=d.map((L,F)=>F);p(M)},P=M=>{if(f.includes(M)){const L=f.filter(F=>F!==M);p(L)}else p([...f,M])},R=()=>{p([])},O=M=>{const{id:L,cnocRouterId:F,cnocDeviceId:$,cnocBridgeId:D,projectId:k,memoryType:U,regionName:H,base:V,limit:q}=M;return{id:L,cnocRouterId:F,cnocDeviceId:$,cnocBridgeId:D,projectId:k,memoryType:U,regionName:H,base:V,limit:q}},N=()=>{const M=d.map(U=>U.id),F=e.filter(U=>!M.includes(U.id)).map(U=>U.id),$=e.filter(U=>!F.includes(U.id)),D=Array.from([...$,...d].reduce((U,H)=>U.set(H.id,O(H)),new Map).values()),k={projectId:t,memoryType:Hn.SNOOPABLE,cnocAddresses:D};v({requestBody:k}),n()};return g(Iu,{open:!0,onClose:(M,L)=>{L!=="backdropClick"&&n()},PaperProps:{sx:{width:"900px",height:r,overflow:"hidden"}},maxWidth:!1,children:g(Mt,{direction:"column",sx:{width:"100%",height:"100%"},children:K(To,{sx:{backgroundColor:"white",border:"1px solid lightgrey",height:"100%",display:"flex",flexDirection:"column"},children:[K(Mt,{direction:"column",sx:{flex:1,alignItems:"center",overflow:"hidden"},children:[g(Z6,{accordionTitle:l,title:""}),K(Mt,{direction:"row",width:"100%",children:[g(J6,{headerNames:[o,i,s,a]}),g(le,{flex:.34,children:g(Dbe,{isMultiSelectEnabled:m,isAllItemsSelected:f.length===d.length,isAnyItemSelected:!!f.length,handleEnableMultiSelect:()=>y(!0),handleCancelMultiSelect:()=>y(!1),handleSelectAll:_,handleUnselectAll:R,handleDeleteMultipleRows:w})})]}),g(Mt,{direction:"column",sx:{width:"100%",alignItems:"center",flex:1,mt:-.4,minHeight:0},children:K(Mt,{direction:"column",sx:{width:"100%",alignItems:"center",flex:1,overflowY:"auto"},children:[d.map((M,L)=>(M.regionName=`Region${L}`,g(Lbe,{editableAddress:M,editableAddresses:d,isMultiSelectEnabled:m,isSelectedForRemoval:f.includes(L),handleRowEdit:b,handleToggleSelect:()=>P(L),handleDeleteRowByIndex:()=>S(L)},M.id))),g(le,{sx:{position:"sticky",bottom:0,width:"100%",display:"flex",justifyContent:"center",backgroundColor:"white",py:.5,zIndex:1},children:g(rn,{title:c,children:g(Qo,{icon:g(eS,{}),sxPropsOverride:u,onClick:A})})})]})})]}),g(Q6,{handleSave:N,handleCancel:n})]})})})},MUt=({projectId:t,addresses:e})=>{const n="Snoopable Address Map",[r,o]=C.useState(""),[i,s]=C.useState(!1);return K(le,{sx:{width:"100%",height:"100%",backgroundColor:"#fff"},children:[K(Mt,{direction:"row",alignItems:"center",children:[g(Bm,{icon:g(Mce,{}),title:g(gr,{children:n})}),g(Bme,{handleEditAddressMap:()=>{s(!0)}})]}),g(K6,{searchTerm:r,handleSearchInputValueChange:u=>{o(u)}}),g(OUt,{searchTerm:r,addresses:e}),i?g(NUt,{projectId:t,addresses:e,handleCancel:()=>{s(!1)}}):null]})},DUt=({projectId:t})=>{const e="Home Node Address Map",n="Subordinate Node Address Map",[o,i]=C.useState(Hn.CACHEABLE),[s,a]=C.useState(null),[l,c]=C.useState([]),u=Tt.sortBy(_h.getAllByProjectId(t),"deviceId"),d=Th.getHomeRoutersByProjectId(t),h=Aa.getSubordinateNodesByProjectId(t),f=Aa.getAllTypeAxiMasterByProjectId(t),p=Ov.getAllVisibleByProjectId(t),m=Ov.getAllSnoopableByProjectId(t),[y,v]=C.useState(!1),[b,S]=C.useState([]),[w,A]=C.useState([]),_=ie=>{if(ie.memoryType===Hn.SNOOPABLE)return`[${ie.regionName}]`;const ee=P(ie);return ee?Fp.getIsProjectComponentCnocBridge(ee)?`[${ee?.name} (${Zn.getMemoryTypeName(ie.memoryType)}): ${ie.regionName}]`:`[${ee?.name} 0x${ee?.nodeId} (${Zn.getMemoryTypeName(ie.memoryType)}): ${ie.regionName}]`:""},P=ie=>ie.cnocRouterId!==null?d.find(ee=>ee.id===ie.cnocRouterId):ie.cnocDeviceId!==null&&(ie.memoryType===Hn.CACHEABLE||ie.memoryType===Hn.NON_CACHEABLE)?h.find(ee=>ee.id===ie.cnocDeviceId):u.find(ee=>ee.id===ie.cnocBridgeId),R=ie=>{const ee={...ie,hasRegionError:!1,hasBaseError:!1,hasSizeError:!1,hasLimitError:!1,regionErrorMessage:"",baseErrorMessage:"",sizeErrorMessage:"",limitErrorMessage:""};if(_t.hasBlankAddress(ie.base,ie.limit))return ie.base||(ee.hasBaseError=!0,ee.baseErrorMessage="Address is required"),ie.limit||(ee.hasLimitError=!0,ee.limitErrorMessage="Address is required"),ee;const re=_t.getHexToBigInt(ie.base),fe=_t.getHexToBigInt(ie.limit);if(Zn.hasBaseAddressExceedingLimitAddress(re,fe))return ee.hasRegionError=!0,ee.hasBaseError=!0,ee.hasLimitError=!0,ee.regi
714onErrorMessage="Base address must be equal or less than the limit address",ee.baseErrorMessage="Must be less than or equal to limit address",ee.limitErrorMessage="Must be greater than or equal to base address",ee;if(_t.getHasExceededAddressWidth(ie.base,28))return ee.hasBaseError=!0,ee.baseErrorMessage="Address width must be less than or equal to 28 bits",ee;if(_t.getHasExceededAddressWidth(ie.limit,28))return ee.hasLimitError=!0,ee.limitErrorMessage="Address width must be less than or equal to 28 bits",ee;const xe=[...p,...m].filter(ve=>{const Re=ie.memoryType===Hn.SNOOPABLE&&ve.memoryType===Hn.SNOOPABLE,pe=ie.memoryType!==Hn.SNOOPABLE&&ve.memoryType!==Hn.SNOOPABLE,Be=ve.base.length&&ve.limit.length,ke=!!ie.cnocRouterId,Ne=!!ve.cnocRouterId,ot=!!(ie.cnocDeviceId||ie.cnocBridgeId),ce=!!(ve.cnocDeviceId||ve.cnocBridgeId),Ae=ie.cnocRouterId!==ve.cnocRouterId||ie.memoryType!==ve.memoryType||ie.regionName!==ve.regionName,be=ie.cnocDeviceId!==ve.cnocDeviceId||ie.cnocBridgeId!==ve.cnocBridgeId||ie.memoryType!==ve.memoryType||ie.regionName!==ve.regionName,Se=ie.regionName!==ve.regionName;return Be&&ke&&Ne&&Ae&&pe||Be&&ot&&ce&&be&&pe||Be&&Re&&Se}).reduce((ve,Re)=>{const pe=_t.getHexToBigInt(Re.base),Be=_t.getHexToBigInt(Re.limit);return Zn.hasOverlappingAddressRegions({currentBase:re,comparisonBase:pe,currentLimit:fe,comparisonLimit:Be})&&ve.push(Re),ve},[]);if(xe.length){const ve=_(xe[0]);return ee.hasRegionError=!0,ee.regionErrorMessage=`Region must not overlap with other address regions ${ve}`,ee}if(ie.memoryType!==Hn.SNOOPABLE&&ie.cnocDeviceId!==null){const Re=p.filter(pe=>{const Be=!!pe.cnocRouterId,ke=Zn.hasSimilarMemoryType(pe.memoryType,ie.memoryType),Ne=pe.base.length&&pe.limit.length;return ke&&(Be&&Ne)}).reduce((pe,Be)=>{const ke=_t.getHexToBigInt(Be.base),Ne=_t.getHexToBigInt(Be.limit);return Zn.hasServicingHomeNode({subordinateDeviceBase:re,homeNodeBase:ke,subordinateDeviceLimit:fe,homeNodeLimit:Ne})&&pe.push(Be),pe},[]);if(!Zn.isServicingHomeNodeEqualToOne(Re.length)){const pe=Re.length?Array.from(Re,Be=>_(Be)).join(", "):"Currently in none";return ee.hasRegionError=!0,ee.regionErrorMessage=`Subordinate node region must be inside 1 home node region (${pe})`,ee}}return ee},O=ie=>ie.some(ee=>ee.hasRegionError||ee.hasBaseError||ee.hasLimitError||!!ee.regionErrorMessage||!!ee.baseErrorMessage||!!ee.limitErrorMessage),N=C.useMemo(()=>p.filter(ie=>o===ie.memoryType),[p,o]),M=C.useMemo(()=>p.map(ie=>R(ie)),[p,o]),L=C.useMemo(()=>m.map(ie=>R(ie)),[m,o]),F=C.useMemo(()=>{const ie={[Hn.CACHEABLE]:[],[Hn.NON_CACHEABLE]:[],[Hn.SNOOPABLE]:[]};return ie[Hn.CACHEABLE]=M.filter(ee=>ee.memoryType===Hn.CACHEABLE&&ee.cnocRouterId),ie[Hn.NON_CACHEABLE]=M.filter(ee=>ee.memoryType===Hn.NON_CACHEABLE&&ee.cnocRouterId),ie},[M]),$=C.useMemo(()=>{const ie={[Hn.CACHEABLE]:[],[Hn.NON_CACHEABLE]:[],[Hn.SNOOPABLE]:[]};return ie[Hn.CACHEABLE]=M.filter(ee=>ee.memoryType===Hn.CACHEABLE&&(ee.cnocDeviceId||ee.cnocBridgeId)),ie[Hn.NON_CACHEABLE]=M.filter(ee=>ee.memoryType===Hn.NON_CACHEABLE&&(ee.cnocDeviceId||ee.cnocBridgeId)),ie},[M]),D=C.useMemo(()=>{const ie=[];return d.filter(ee=>{M.find(re=>re.cnocRouterId===ee.id)||ie.push(ee.id)}),h.filter(ee=>{M.find(re=>re.cnocDeviceId===ee.id)||ie.push(ee.id)}),u.filter(ee=>{M.find(re=>re.cnocBridgeId===ee.id)||ie.push(ee.id)}),ie},[d,u,h,M]),k=C.useMemo(()=>{const ie=M.filter(ee=>ee.memoryType===Hn.CACHEABLE);return g(Ca,{invisible:!(O(ie)||D.length),color:"error",variant:"dot",anchorOrigin:{vertical:"top",horizontal:"left"},children:Zn.getMemoryTypeName(Hn.CACHEABLE)})},[M,D]),U=C.useMemo(()=>{const ie=M.filter(ee=>ee.memoryType===Hn.NON_CACHEABLE);return g(Ca,{invisible:!(O(ie)||D.length),color:"error",variant:"dot",anchorOrigin:{vertical:"top",horizontal:"left"},children:Zn.getMemoryTypeName(Hn.NON_CACHEABLE)})},[M,D]),H=C.useMemo(()=>g(Ca,{invisible:!O(L),color:"error",variant:"dot",anchorOrigin:{vertical:"top",horizontal:"left"},children:Zn.getMemoryTypeName(Hn.SNOOPABLE)}),[L]),V=C.useCallback(ie=>{const ee=M.filter(fe=>(fe.cnocDeviceId||fe.cnocBridgeId)&&fe.memoryType===o),re=ie.reduce((fe,we)=>(ee.forEach(xe=>{const ve=Zn.getIsDeviceAddressWithinHomeNodeRange(we,xe);xe.cnocDeviceId&&ve&&fe.push(xe.cnocDeviceId),xe.cnocBridgeId&&ve&&fe.push(xe.cnocBridgeId)}),fe),[]);A(re),S(ie.map(fe=>fe.cnocRouterId))},[M]),q=C.useCallback(ie=>{const re=M.filter(fe=>{const we=fe.cnocRouterId,xe=fe.memoryType===o;return we&&xe}).reduce((fe,we)=>(ie.forEach(xe=>{const ve=Zn.getIsDeviceAddressWithinHomeNodeRange(we,xe);we.cnocRouterId&&ve&&fe.push(we.cnocRouterId)}),fe),[]);A(ie.map(fe=>fe.cnocDeviceId||fe.cnocBridgeId)),S(re)},[M]),J=()=>{S([]),A([])},Q=(ie,ee)=>{a(ie),c(ee),v(!0)},se=()=>{a(null),c([]),v(!1)},oe=ie=>{i(ie),J()};return K(Mt,{direction:"column",sx:{flex:1,width:"100%",height:"100%"},children:[K(tg,{value:o,onChange:(ie,ee)=>oe(ee),variant:"scrollable","aria-label":"scrollable nav tabs",children:[g(Sa,{value:Hn.CACHEABLE,label:k},`${Hn.CACHEABLE}-address-tab`),g(Sa,{value:Hn.NON_CACHEABLE,label:U},`${Hn.NON_CACHEABLE}-address-tab`),f.length?g(Sa,{value:Hn.SNOOPABLE,label:H},`${Hn.SNOOPABLE}-address-tab`):null]}),g(To,{sx:{flex:1,backgroundColor:"white",height:"100%",overflowY:"auto"},children:K(Mt,{direction:"row",sx:{flex:1,height:"100%"},children:[o===Hn.CACHEABLE||o===Hn.NON_CACHEABLE?K(gr,{children:[g(Dne,{columnLabel:e,memoryType:o,components:d,addresses:F[o],emptyComponentIds:D,highlightedComponentIds:b,handleHighlight:V,handleUnhighlight:J,handleEdit:Q}),g(Dne,{columnLabel:n,memoryType:o,components:[...h,...u],addresses:$[o],emptyComponentIds:D,highlightedComponentIds:w,handleHighlight:q,handleUnhighlight:J,handleEdit:Q})]}):null,o===Hn.SNOOPABLE?g(MUt,{projectId:t,addresses:Tt.sortBy(L,ie=>Zn.getRegionNumber(ie.regionName))}):null]})}),y&&s?g(RUt,{projectId:t,memoryType:o,component:s,componentAddresses:l,addressesByMemoryType:N,handleCancel:se,handleUnhighlight:J}):null]})},LUt=({leftPosition:t,panelWidth:e,panelHeight:n,projectId:r,activeTab:o})=>K(le,{display:o!==Un.DESIGN?"block":"none",sx:{position:"absolute",left:t,width:e,height:n},children:[o===Un.ADDRESS_MAP?g(DUt,{projectId:r}):null,o===Un.REGISTER_MAP?g(_me,{projectId:r}):null]}),kUt=({activeTab:t,projectId:e,leftPosition:n})=>{const r=o0.getByProjectId(e),o="Design",i="Address Map",s="Register Map",a=Yn(),l=(u,d)=>{a(YP(d))},c=[{value:Un.DESIGN,label:o,isVisible:!0},{value:Un.ADDRESS_MAP,label:i,isVisible:!0},{value:Un.REGISTER_MAP,label:s,isVisible:r.isRegisterMapGenerationEnabled}];return C.useEffect(()=>{!r.isRegisterMapGenerationEnabled&&t===Un.REGISTER_MAP&&l({},Un.DESIGN)},[r.isRegisterMapGenerationEnabled]),g(j6,{activeTab:t,handleActiveTabChange:l,tabs:c,leftPosition:n})},FUt=t=>{const e=o0.getByProjectId(t);return!o0.getProjectCnocSystemByProjectIdIsLoading(t)&&!!e},BUt={getProjectCnocSystemByProjectId:FUt},$Ut=t=>{const e=Lz.getByProjectId(t);return!Lz.getProjectCnocInterleavingByProjectIdIsLoading(t)&&!!e},HUt={getProjectCnocInterleavingByProjectId:$Ut},UUt=({projectId:t,user:e})=>{const{width:n,height:r}=sc(),o=bt(h0),i=bt(gd),s=bt(nF),a=BUt.getProjectCnocSystemByProjectId(t),l=HUt.getProjectCnocInterleavingByProjectId(t),c=ei.getCenterPanelWidth({width:n,isLeftPanelOpen:o,isRightPanelOpen:i}),u=ei.getCenterPanelHeight(r),d=ei.getLeftPanelWidth(o),[h]=rS(),f=async()=>{await h({requestBody:{id:t}})};return!a||!l?g(tl,{}):K(le,{children:[g(n5t,{projectId:t,user:e,activeTab:s}),K(le,{sx:{position:"relative"},children:[g(le,{sx:{width:"100%",position:"absolute",left:0,zIndex:1,visibility:s===Un.DESIGN?"visible":"hidden"},children:s===Un.DESIGN?g(sUt,{projectId:t}):null}),K(le,{sx:{zIndex:2,height:ei.getLeftRightPanelHeight(r)},children:[g(k8,{}),g(vUt,{isLeftPanelOpen:o,projectId:t,activeTab:s}),g(LUt,{leftPosition:d,panelWidth:c,panelHeight:u,projectId:t,activeTab:s}),g(kUt,{activeTab:s,projectId:t,leftPosition:d}),g(q8,{}),g(oUt,{isRightPanelOpen:i,projectId:t,triggerUpdateProjectTimestamp:f})]})]})]})},zUt=({projectId:t})=>{const e=rc.getById(t);return K(le,{sx:{position:"absolute",top:"13px",left:"106px",display:"flex",alignItems:"center",width:"50%"},children:[g(qg,{}),g(Ke,{variant:"h5",fontWeight:700,sx:{color:Ef,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",alignItems:"center",marginLeft:"5px",maxWidth:"auto",minWidth:"10px"},children:e.name})]})},VUt=t=>{const e=rc.getById(t);return!rc.getProjectIsLoading(t)&&!!e},GUt={getProject:VUt},EM="getAllProjectIntegrationTopologyNodeByIntegrationId",ED=Nr.injectEndpoints({endpoints:t=>({[EM]:t.query({query:({integrationId:e})=>({url:`${dt.projectIntegrationTopologyNode}?projectId=${e}`,method:nn.GET}),providesTags:[We.ProjectIntegrationTopologyNodes],transformResponse:e=>e}),bulkCreateAllProjectIntegrationTopologyNode:t.mutation({query:e=>({url:`${dt.projectIntegrationTopologyNode}
714`,method:nn.POST,body:e}),async onQueryStarted(e,{dispatch:n,queryFulfilled:r}){const o=n(ED.util.updateQueryData(EM,{integrationId:e[0].integrationId},i=>{i.push(...e)}));try{await r}catch{o.undo()}},transformResponse:e=>e,transformErrorResponse:e=>e,invalidatesTags:[We.ProjectsByIntegrationId,"ProjectComponents",We.ProjectComponentCnocDevice,We.ProjectComponentCnocBridges]}),updateProjectIntegrationTopologyNode:t.mutation({query:({requestBody:e})=>({url:`${dt.projectIntegrationTopologyNode}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){await C0({dispatch:n,api:ED,endpointName:EM,queryArg:{integrationId:e.integrationId},requestBody:e,queryFulfilled:r})},transformErrorResponse:e=>e,transformResponse:e=>e}),deleteProjectIntegrationTopologyNode:t.mutation({query:({id:e,projectId:n})=>({url:`${dt.projectIntegrationTopologyNode}?id=${e}&projectId=${n}`,method:nn.DELETE}),async onQueryStarted({id:e,projectId:n},{dispatch:r,queryFulfilled:o}){await fR({dispatch:r,api:ED,endpointName:EM,queryArg:{integrationId:n},queryFulfilled:o,id:e})},transformErrorResponse:e=>e,transformResponse:e=>e,invalidatesTags:[We.ProjectsByIntegrationId]})})}),{useGetAllProjectIntegrationTopologyNodeByIntegrationIdQuery:WUt,useBulkCreateAllProjectIntegrationTopologyNodeMutation:jUt,useUpdateProjectIntegrationTopologyNodeMutation:qUt,useDeleteProjectIntegrationTopologyNodeMutation:YUt}=ED,XUt=t=>{const{data:e=[],isLoading:n}=WUt({integrationId:t});return{topologyNodes:e,isGetAllByIntegrationIdLoading:n}},QR={getAllByIntegrationId:XUt},Fbe=600,Bbe="top",$be=-30,KUt=({projectId:t,graphRef:e})=>{const n="ncnoc-topology-node",r="ncnoc-ingress-port",o="ncnoc-egress-port",i="ncnoc-bridge-port",s="lightgreen",{topologyNodes:a}=QR.getAllByIntegrationId(t),l=rc.getAllByIntegrationId(t),c=vd.getAllByProjectId(t),u=ea.getAllByProjectId(t),d=bw.getAllByProjectId(t),h=()=>{Gr.registerNode(n,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"},{tagName:"rect",selector:"labelBackground"},{tagName:"text",selector:"label"}],inherit:"rect",zIndex:2,attrs:{body:{strokeWidth:2,fill:"#fff",cursor:"pointer",rx:0,ry:0},label:{cursor:"pointer"},labelBackground:{fill:"#fff",stroke:"#fff",rx:4,ry:4,refX:-12.5,refY:.3,refWidth:0,refHeight:.4},highlight:{stroke:s,strokeWidth:2,fill:"none",visibility:"hidden",pointerEvents:"none",rx:0,ry:0,width:400,height:400}},ports:{groups:{[r]:f(),[o]:f(),[i]:f()}}},!0)},f=()=>({markup:[{tagName:"rect",selector:"port"},{tagName:"text",selector:"portLabel"},{tagName:"rect",selector:"highlight"}],position:"absolute",attrs:{port:{fill:"lightblue",stroke:"#8f8f8f",strokeWidth:1,width:12,height:12,r:5,pointerEvents:"none",cursor:"pointer"},portLabel:{fill:"darkgreen",fontSize:14,textVerticalAnchor:"middle"},highlight:{stroke:s,strokeWidth:1,width:12,height:12,fill:"none",visibility:"hidden",pointerEvents:"none"}}}),p=(S,w)=>w.filter(A=>A.projectId===S&&A.parameters.bus?.protocol!==wt.SEC),m=S=>{const w=p(S,c),A=p(S,u),_=p(S,d),P=w.map((N,M)=>({id:`${N.id}_ingress`,group:r,args:y(N,M,S),attrs:{portLabel:{text:N.name,y:-8,x:-5,textAnchor:"end"}}})),R=A.map((N,M)=>({id:`${N.id}_egress`,group:o,args:y(N,M,S),attrs:{portLabel:{text:N.name,y:-8,x:18,textAnchor:"start"}}})),O=_.map((N,M)=>({id:`${N.id}_bridge`,group:i,args:y(N,M,S),attrs:{portLabel:{text:N.name,y:40+(M%2===0?0:40),textAnchor:"middle"}},position:{angle:90}}));return[...P,...R,...O]},y=(S,w,A)=>{const O=40*w+54;switch(S.type){case Fe.INITIATORS:return{x:-6,y:O};case Fe.TARGETS:return{x:b(A)-6,y:O};case Fe.BRIDGES:default:return{x:O,y:v(A)-6}}},v=S=>{const _=p(S,c),P=p(S,u);return 40*(Tt.max([_.length,P.length])??0)+80},b=S=>{const R=40*p(S,d).length+80;return R<200?200:R};return C.useEffect(()=>{h()},[]),C.useEffect(()=>{a.forEach(S=>{const w=l.find(A=>A.id===S.projectId);w?.type===pr.NCNOC&&e.addNode({id:S.id,shape:n,x:S.diagramCoordinateX,y:S.diagramCoordinateY,width:b(S.projectId),height:v(S.projectId),ports:{items:m(S.projectId)},attrs:{body:{stroke:NC[1]},label:{text:w.name,textVerticalAnchor:Bbe,refY:$be},highlight:{width:b(S.projectId),height:v(S.projectId)}}})})},[a,l,c,u,d]),null},QUt=({projectId:t,graphRef:e})=>{const n="cnoc-topology-node",r="cnoc-ingress-port",o="cnoc-egress-port",i="cnoc-bridge-port",s="lightgreen",{topologyNodes:a}=QR.getAllByIntegrationId(t),l=rc.getAllByIntegrationId(t),c=Aa.getAllByProjectId(t),u=_h.getAllByProjectId(t),d=()=>{Gr.registerNode(n,{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"highlight"}
714,{tagName:"rect",selector:"labelBackground"},{tagName:"text",selector:"label"}],inherit:"rect",zIndex:2,attrs:{body:{strokeWidth:2,fill:"#fff",cursor:"pointer",rx:0,ry:0},label:{cursor:"pointer"},labelBackground:{fill:"#fff",stroke:"#fff",rx:4,ry:4,refX:-12.5,refY:.3,refWidth:0,refHeight:.4},highlight:{stroke:s,strokeWidth:2,fill:"none",visibility:"hidden",pointerEvents:"none",rx:0,ry:0,width:400,height:400}},ports:{groups:{[r]:h(),[o]:h(),[i]:h()}}},!0)},h=()=>({markup:[{tagName:"rect",selector:"port"},{tagName:"text",selector:"portLabel"},{tagName:"rect",selector:"highlight"}],position:"absolute",attrs:{port:{fill:"lightblue",stroke:"#8f8f8f",strokeWidth:1,width:12,height:12,r:5,pointerEvents:"none",cursor:"pointer"},portLabel:{fill:"darkgreen",fontSize:14,textVerticalAnchor:"middle"},highlight:{stroke:s,strokeWidth:1,width:12,height:12,fill:"none",visibility:"hidden",pointerEvents:"none"}}}),f=(w,A)=>c.filter(_=>{const P=Nz(_.protocol,_.type),R=A==="requestNode"&&(P===Or.AXI_MASTER||P===Or.CHI_RN),O=A==="subordinateNode"&&(P===Or.AXI_SLAVE||P===Or.CHI_SN);return _.projectId===w&&(R||O)}),p=w=>u.filter(A=>A.projectId===w),m=w=>{const A=f(w,"requestNode"),_=f(w,"subordinateNode"),P=p(w),R=A.map((M,L)=>({id:`${M.id}_ingress`,group:r,args:y(M,L),attrs:{portLabel:{text:M.name,y:-8,x:-5,textAnchor:"end"}}})),O=_.map((M,L)=>({id:`${M.id}_egress`,group:o,args:y(M,L),attrs:{portLabel:{text:M.name,y:-8,x:18,textAnchor:"start"}}})),N=P.map((M,L)=>({id:`${M.id}_bridge`,group:i,args:v(M,L),attrs:{portLabel:{text:M.name,y:40+(L%2===0?0:40),textAnchor:"middle"}},position:{angle:90}}));return[...R,...O,...N]},y=(w,A)=>{const O=40*A+54,N=Nz(w.protocol,w.type);return{x:N===Or.AXI_MASTER||N===Or.CHI_RN?-6:S(w.projectId)-6,y:O}},v=(w,A)=>({x:40*A+54,y:b(w.projectId)-6}),b=w=>{const P=f(w,"requestNode"),R=f(w,"subordinateNode");return 40*(Tt.max([P.length,R.length])??0)+80},S=w=>{const O=40*p(w).length+80;return O<200?200:O};return C.useEffect(()=>{d()},[]),C.useEffect(()=>{a.forEach(w=>{const A=l.find(_=>_.id===w.projectId);A?.type===pr.CNOC&&e.addNode({id:w.id,shape:n,x:w.diagramCoordinateX,y:w.diagramCoordinateY,width:S(w.projectId),height:b(w.projectId),ports:{items:m(w.projectId)},attrs:{body:{stroke:NC[2]},label:{text:A.name,textVerticalAnchor:Bbe,refY:$be},highlight:{width:S(w.projectId),height:b(w.projectId)}}})})},[a,l,c,u]),null},ZUt=({projectId:t,graphRef:e})=>{const n="Delete",r="ncnoc-topology-node",o="cnoc-topology-node",[i,s]=C.useState(null),[a,l]=C.useState(!1),[c,u]=C.useState([]),[d,h]=C.useState(null),[f,p]=C.useState(!1),[m,y]=C.useState(""),[v,b]=C.useState(null),[S]=YUt(),w=({node:M,top:L,left:F})=>{s(M),h({top:L,left:F}),b({top:L+50,left:F+50}),l(!0)},A=()=>{l(!1),s(null)},_=()=>{p(!1),A()},P=async()=>{if(!i)return;await S({id:i.id,projectId:t})&&(e.removeNode(i.id),_())},R=()=>{p(!0)},O=()=>[{handleClickEvent:R,label:"Delete Topology"}],N=M=>{const L=M.getAttrByPath("label/text");y(`This action will remove imported topology in this integration project. Please confirm if you would like to proceed with removal of ${L}.`)};return C.useEffect(()=>{e.on("node:contextmenu",({e:M,node:L})=>{if(M.preventDefault(),![r,o].includes(L.shape))return;const $=O();u($),N(L),w({node:L,top:M.clientY,left:M.clientX})})},[e]),K(gr,{children:[a?g(Y8,{open:a,anchorPosition:d,onCloseHandler:A,menuItems:c}):null,v?g(XR,{open:f,anchorPosition:v,onCloseHandler:_,onConfirmHandler:P,dialogTitle:m,confirmLabel:n}):null]})},JUt=({projectId:t,graphRef:e})=>{const n="ncnoc-topology-node",{topologyNodes:r}=QR.getAllByIntegrationId(t),o=C.useRef(null),i=C.useRef(!1),[s]=qUt(),a=()=>{o.current=null,i.current=!1},l=()=>{e.on("node:mousedown",({node:d})=>{const{x:h,y:f}=d.getPosition();o.current={x:h,y:f},i.current=!1})},c=()=>{e.on("node:change:position",({node:d})=>{const h=d.getBBox(),f=e.getNodes();let p=!1;f.forEach(m=>{if(m.id===d.id)return;const y=NC[m.shape===n?1:2],v=m.getBBox();!(h.x+h.width<=v.x||h.x>=v.x+v.width||h.y+h.height<=v.y||h.y>=v.y+v.height)?(p=!0,m.attr("body/stroke","#ff4d4f")):m.attr("body/stroke",y)}),p?d.attr("body/fill","rgba(255, 77, 79, 0.15)"):d.attr("body/fill","#ffffff"),i.current=p})},u=()=>{e.on("node:mouseup",async({node:d})=>{const h=d.getPosition(),f=r.find(m=>m.id===d.id),p=NC[d.shape===n?1:2];if(d.attr("body/fill","#ffffff"),d.attr("body/stroke",p),i.current&&o.current){d.setPosition(o.current.x,o.current.y),a();return}if(f){const m={...f,diagramCoordinateX:h.x,diagramCoordinateY:h.y};s({requestBody:m})}a()})};return C.useEffect(()=>(l(),c(),u(),()=>{e.off("node:mouseup"),e.off("node:mousedown"),e.off("node:change:position")}),[e,r]),null},e3t=({projectId:t})=>{const e=C.useRef(null),[n,r]=C.useState(null);return C.useEffect(()=>{if(n)return;const o=new Gr({container:e.current,background:{color:yB},autoResize:!0,grid:{visible:!0,type:vB,args:[{color:bB,thickness:Xv},{color:CB,thickness:Xv,factor:fS}]},panning:!0,mousewheel:!0,interacting:{nodeMovable:!0,magnetConnectable:!0,edgeMovable:!0,edgeLabelMovable:!1},connecting:{snap:!0,allowPort(){return!0},allowMulti(){return!1},allowBlank(){return!1},allowNode(){return!1},allowEdge(){return!0},allowLoop(){return!0}}});return r(o),o.centerContent(),o.on("node:mouseover",({node:i})=>
714{i.attr("highlight/visibility","visible"),i.getPorts().forEach(s=>{s.id&&i.portProp(s.id,"attrs/highlight/visibility","visible")})}),o.on("node:mouseout",({node:i})=>{i.attr("highlight/visibility","hidden"),i.getPorts().forEach(s=>{s.id&&i.portProp(s.id,"attrs/highlight/visibility","hidden")})}),()=>{o&&(o.getNodes().forEach(i=>{o.removeNode(i.id)}),o.getEdges().forEach(i=>{o.removeEdge(i.id)}),o.dispose())}},[]),K(le,{sx:{width:"100%",height:"100%"},children:[g("div",{ref:e,style:{width:"100%",height:"100%"}}),n?K(gr,{children:[g(KUt,{projectId:t,graphRef:n}),g(QUt,{projectId:t,graphRef:n}),g(ZUt,{projectId:t,graphRef:n}),g(JUt,{projectId:t,graphRef:n})]}):null]})},t3t=({projectId:t})=>{const e=bt(nF),{width:n,height:r}=sc(),{diagramWidth:o,diagramHeight:i}=st.getStageDimensions({width:n,height:r});return g(le,{sx:{position:"absolute",left:0,width:o,height:i},children:e===Un.DESIGN?g(e3t,{projectId:t}):null})},n3t=({label:t,expanded:e,handleAccordionChange:n,accordionSummaryChildren:r,accordionDetailsChildren:o})=>K(Hv,{expanded:e,onChange:()=>{n(t)},sx:{width:Rs.leftPanelWidth,borderBottom:"1px solid #ccc","&.Mui-disabled":{border:"#ccc"}},disableGutters:!0,children:[g(zv,{expandIcon:g(Gv,{}),"aria-controls":`${t}-content`,id:`${t}-header`,sx:{padding:"0 8px",minHeight:"32px","& .MuiAccordionSummary-content":{margin:0,color:tt}},children:r}),g(Uv,{sx:{px:1},children:o})]},t),r3t=({integrationProjectId:t,project:e,setSelectedProjectIds:n})=>{const r=rc.getAllByIntegrationId(t),[o,i]=C.useState(!1),s=!!r.find(a=>a.id===e.id);return K(Hle,{sx:{height:"272px",width:"272px",position:"relative",borderTop:`5px solid ${NC[e.type]}`,...s?{}:{"&:hover":{cursor:"pointer",opacity:.7}}},onClick:()=>{s||(n(a=>o?a.filter(c=>c!==e.id):[...a,e.id]),i(!o))},children:[g(zle,{image:st.convertToBase64FromBuffer(e.thumbnail).toString(),sx:{height:"160px"}}),g(Ule,{sx:{padding:0,mt:2},children:g(Ke,{sx:{overflowWrap:"anywhere"},children:e.name})}),g(_u,{sx:{position:"absolute",top:2,right:2,color:tt,"&.Mui-checked":{color:tt},"&.Mui-disabled":{color:"#b0bec5"}},checked:o||s,disabled:s})]})},Hbe=()=>g(mi,{item:!0,xs:12,children:K(le,{sx:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",py:3,flexDirection:"column",gap:1.5,backgroundColor:"background.paper",borderTop:"1px solid rgba(0, 0, 0, 0.08)",mt:2,mb:2},children:[g(Ni,{size:50,color:"primary"}),g(Ke,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:"Loading more projects..."})]})}),o3t=()=>Qp(),i3t=t=>{const e=Tt.maxBy(t,"diagramCoordinateX")?.diagramCoordinateX??0;return t.length?e+Fbe:0},s3t=()=>0,pU={getId:o3t,getDiagramCoordinateX:i3t,getDiagramCoordinateY:s3t},a3t=({projectIds:t,integrationId:e,topologyNodes:n})=>t.map((r,o)=>({id:pU.getId(),diagramCoordinateX:o*Fbe+pU.getDiagramCoordinateX(n),diagramCoordinateY:pU.getDiagramCoordinateY(),projectId:r,integrationId:e})),l3t={getBulkCreatePayload:a3t},c3t=({projectId:t,isModalOpen:e,handleToggleModalState:n})=>{const r="Import Topologies",o="Import",i="Cancel",a={userId:bt(qP),searchTerm:"",types:[pr.NCNOC,pr.CNOC],activeTab:Sl.MY_PROJECTS},[l,c]=C.useState(25),[u,d]=C.useState([]),{data:h=[],isFetching:f}=bue({...a,limit:l},{refetchOnMountOrArgChange:!0}),p=rc.getAllCount(a),{topologyNodes:m}=QR.getAllByIntegrationId(t),[y]=jUt(),v=w=>{const{scrollTop:_,scrollHeight:P,clientHeight:R}=w.currentTarget,O=_+R>=P-200,N=l>=p;O&&!N&&!f&&c(l+25)},b=()=>{const w=l3t.getBulkCreatePayload({projectIds:u,integrationId:t,topologyNodes:m});y(w)},S=()=>{n(),d([])};return K(Iu,{fullWidth:!0,maxWidth:"xl",open:e,onClose:n,scroll:"paper",children:[g(eg,{children:r}),K(ZC,{onScroll:v,children:[g(le,{sx:{display:"flex",justifyContent:"start",flexWrap:"wrap",gap:2,pt:2},children:h.map(w=>g(r3t,{integrationProjectId:t,project:w,setSelectedProjectIds:d},w.id))}),f&&h.length?g(Hbe,{}):null]}),g(Jp,{children:K(le,{sx:{display:"flex",justifyContent:"end"},children:[g(Sn,{onClick:()=>{S()},variant:"outlined",sx:{color:tt,borderColor:tt,mr:1,"&:hover":{borderColor:tt,opacity:.7}},children:i}),g(Sn,{onClick:()=>{b(),S()},sx:{color:"white",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.7},"&.Mui-disabled":{backgroundColor:"#eaeaea",color:"#c0c0c0"}},disabled:!u.length,children:o})]})})]})},u3t=({projectId:t,expandedAccordions:e,handleToggleAccordionState:n})=>{const r="Import Topologies",o="Open Modal",[i,s]=C.useState(!1),a=()=>{s(!i)};return K(le,{children:[g(n3t,{label:r,expanded:e.includes(r),handleAccordionChange:n,accordionSummaryChildren:K(le,{children:[g(Pce,{}),g("span",{style:{marginLeft:"8px",fontSize:"12px"},children:r})]}
714),accordionDetailsChildren:K(le,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[g(Ke,{sx:{fontWeight:"bold"},children:r}),g(Sn,{onClick:()=>s(!0),sx:{color:"white",backgroundColor:tt,mt:2,width:"100%","&:hover":{backgroundColor:tt,opacity:.7}},children:o})]})}),g(c3t,{projectId:t,isModalOpen:i,handleToggleModalState:a})]})},d3t=({projectId:t})=>{const e="Import Topologies",n=bt(h0),[r,o]=C.useState([e]),i=s=>{const a=r.includes(s)?r.filter(l=>l!==s):[...r,s];o(a)};return g(le,{sx:{backgroundColor:"#FAFAFA",boxShadow:"0 3px 10px rgb(0 0 0 / 0.2);",width:ei.getLeftPanelWidth(n),height:"100%",overflowY:"auto",overflowX:"hidden",zIndex:2,left:0,position:"absolute"},children:g(u3t,{projectId:t,expandedAccordions:r,handleToggleAccordionState:i})})},h3t=()=>g(Pi,{tooltipMessage:Nn.GENERATE_RTL,icon:g(Ca,{invisible:!0,color:"warning",variant:"dot",children:g(wW,{})}),isFeatureEnabled:!1,handleActionBarButtonClick:t=>{}}),f3t=()=>g(Mt,{direction:"row",sx:{p:"5px",width:"100%",flexWrap:"wrap",alignItems:"center",backgroundColor:tt},children:g(h3t,{})}),p3t=()=>{const t="Design",e=bt(h0),n=ei.getLeftPanelWidth(e),r=bt(nF),o=Yn(),i=[{value:Un.DESIGN,label:t,isVisible:!0}];return g(j6,{activeTab:r,handleActiveTabChange:(a,l)=>{o(YP(l))},tabs:i,leftPosition:n})},g3t=()=>{const t=bt(gd);return g(le,{sx:{backgroundColor:"#FAFAFA",boxShadow:"0 3px 10px rgb(0 0 0 / 0.2);",width:ei.getRightPanelWidth(t),height:"100%",overflowY:"auto",overflowX:"hidden",zIndex:2,right:0,position:"absolute"}})},m3t=({projectId:t})=>{const e=j2.isGetAllProjectComponentNcnocByProjectIdLoading(t),{isGetAllByIntegrationIdLoading:n}=QR.getAllByIntegrationId(t),r=Aa.getAllByProjectId(t),o=_h.getAllByProjectId(t),{width:i,height:s}=sc();return e||n||!r||!o?g(tl,{}):K(le,{children:[g(f3t,{}),K(le,{sx:{position:"relative",height:ei.getLeftRightPanelHeight(s)},children:[g(k8,{}),g(d3t,{projectId:t}),g(t3t,{projectId:t}),g(p3t,{}),g(q8,{}),g(g3t,{})]})]})},y3t=()=>{const t=bt(Dc),n=Wx().projectId,r=GUt.getProject(n),o=rc.getById(n);return r?K(le,{children:[g(zUt,{projectId:n}),o.type===pr.NCNOC?g(lHt,{projectId:n,user:t}):null,o.type===pr.CNOC?g(UUt,{projectId:n,user:t}):null,o.type===pr.INTEGRATION?g(m3t,{projectId:n}):null]}):g(tl,{})};var o9={},v3t=hr;Object.defineProperty(o9,"__esModule",{value:!0});var Ube=o9.default=void 0,b3t=v3t(yr()),C3t=vr;Ube=o9.default=(0,b3t.default)((0,C3t.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");const S3t=({setIsOpenCreateProjectDialog:t})=>g(le,{children:g(rn,{title:"Add New Project",placement:"bottom",children:g(Di,{size:"small",sx:{bgcolor:tc,color:"white",borderRadius:"4px","&:hover":{bgcolor:"#d25a3fe0"}},onClick:()=>{document.activeElement?.blur(),t(!0)},children:g(Ube,{})})})});var i9={},E3t=hr;Object.defineProperty(i9,"__esModule",{value:!0});var zbe=i9.default=void 0,x3t=E3t(yr()),w3t=vr;zbe=i9.default=(0,x3t.default)((0,w3t.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");var s9={},A3t=hr;Object.defineProperty(s9,"__esModule",{value:!0});var Vbe=s9.default=void 0,T3t=A3t(yr()),_3t=vr;Vbe=s9.default=(0,T3t.default)((0,_3t.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");const I3t=()=>{const t=bt(XP),[e,n]=C.useState(t),r=Yn(),o=C.useCallback(Tt.debounce(a=>{r(HY(a)),r(z1(1))},1200),[r]),i=a=>{n(a),o(a)};return K(le,{sx:{display:"flex",alignItems:"center",gap:2,borderRadius:"8px",border:"1px solid lightgray"},children:[g(QC,{sx:{px:2,width:"350px",fontSize:"0.875rem"},placeholder:"Search projects",value:e,onChange:a=>i(a.target.value),inputProps:{"aria-label":"search projects"}}),e?g(Di,{onClick:()=>{n(""),o.cancel(),r(z1(1)),r(HY(""))},sx:{p:"8px",mr:"4px"},"aria-label":"clear search",children:g(Vbe,{fontSize:"small"})}):g(Di,{type:"button",sx:{p:"8px",mr:"4px"},"aria-label":"search",children:g(zbe,{})})]})},P3t=({setIsOpenCreateProjectDialog:t})=>K(le,{sx:{display:"flex",alignItems:"center",px:2,py:2,width:{xs:"100%",sm:"95%",md:"85%",lg:"100%",xl:"70%"},margin:"0 auto",justifyContent:"space-between"},children:[K(le,{sx:{display:"flex",alignItems:"center",gap:1},children:[g(Ke,{variant:"h5",component:"h1",sx:{fontWeight:600,color:"text.primary",fontSize:"2rem"},children:"Projects"}),g(S3t,{setIsOpenCreateProjectDialog:t})]}),g(I3t,{})]});var a9={},R3t=hr;
714Object.defineProperty(a9,"__esModule",{value:!0});var Gbe=a9.default=void 0,O3t=R3t(yr()),N3t=vr;Gbe=a9.default=(0,O3t.default)((0,N3t.jsx)("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z"}),"AccountTree");var l9={},M3t=hr;Object.defineProperty(l9,"__esModule",{value:!0});var Wbe=l9.default=void 0,D3t=M3t(yr()),L3t=vr;Wbe=l9.default=(0,D3t.default)((0,L3t.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2z"}),"FolderShared");const c9=()=>[pr.NCNOC,pr.CNOC],k3t=()=>{const t=bt(tF),e=Yn(),n=bt(qP),r=bt(XP),o=bt(_G),i=c9(),s=o.length?o:i,a=rc.getAllCount({userId:n,searchTerm:r,types:s,activeTab:t}),l=rc.getAllSharedByUserIdCount({userId:n,searchTerm:r,types:o}),c=(d,h)=>{e(mNe(h)),e(z1(1))},u=[{value:Sl.MY_PROJECTS,icon:g(Gbe,{}),label:"My Projects",count:a},{value:Sl.STARRED,icon:g(Aj,{}),label:"Starred",count:a},{value:Sl.SHARED_TO_ME,icon:g(Wbe,{}),label:"Shared to Me",count:l}];return g(tg,{value:t,onChange:c,"aria-label":"project navigation tabs",sx:{width:"100%",minHeight:"45px","& .MuiTabs-flexContainer":{justifyContent:"left"},"& .MuiTab-root":{minHeight:"40px",padding:"16px 12px",fontSize:".875rem",textTransform:"none",overflow:"visible",position:"relative","&.Mui-selected":{paddingRight:"25px"}},"& .MuiTab-iconWrapper":{marginRight:"6px","& > svg":{fontSize:"1.2rem"}}},children:u.map(({value:d,icon:h,label:f,count:p})=>g(Sa,{value:d,icon:h,iconPosition:"start",label:g(Ca,{badgeContent:t===d?p:0,sx:{"& .MuiBadge-badge":{right:-17,top:0,backgroundColor:tc,color:"white"}},max:p,color:"warning",children:f})},d))})};var u9={},F3t=hr;Object.defineProperty(u9,"__esModule",{value:!0});var jbe=u9.default=void 0,B3t=F3t(yr()),$3t=vr;jbe=u9.default=(0,B3t.default)((0,$3t.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList");const Lne=({label:t,isChecked:e,isIndeterminate:n})=>K(le,{sx:{display:"flex",alignItems:"center"},children:[g(_u,{sx:{"& .MuiSvgIcon-root":{color:tt}},checked:e,indeterminate:n}),g(Il,{primary:t})]}),H3t=()=>{const[t,e]=C.useState(null),[n,r]=C.useState([]),o=Yn(),i=bt(_G),s=c9(),a=n.length===s.length,l=[{type:pr.NCNOC,label:"NC-NoC Projects"},{type:pr.CNOC,label:"C-NoC Projects"}],c=m=>{e(m.currentTarget),r([...i])},u=()=>{e(null)},d=()=>{r(a?[]:s)},h=m=>{r((()=>n.includes(m)?n.filter(b=>b!==m):[...n,m])())},f=()=>{o(kNe(n)),o(z1(1)),u()};return K(le,{children:[g(pW,{title:"Filter by project type",children:g(Ca,{badgeContent:(()=>i.length)(),sx:{"& .MuiBadge-badge":{backgroundColor:tc,color:"white"}},children:g(Di,{onClick:c,sx:{p:"8px",border:"1px solid lightgray",borderRadius:"8px"},children:g(jbe,{})})})}),K(Es,{anchorEl:t,open:!!t,onClose:u,children:[g(mr,{onClick:d,children:g(Lne,{label:"Select All",isChecked:a,isIndeterminate:!!n.length&&!a})}),g(yi,{}),l.map(m=>g(mr,{onClick:()=>h(m.type),children:g(Lne,{label:m.label,isChecked:n.includes(m.type)})},m.type)),g(yi,{}),g(Sn,{variant:"contained",sx:{width:"90%",mx:"8px",backgroundColor:tt,"&:hover":{backgroundColor:tt,opacity:.8}},onClick:f,disabled:!n.length,children:"Apply Filter"})]})]})},U3t=()=>K(le,{sx:{display:"flex",alignItems:"center",px:2,width:{xs:"100%",sm:"95%",md:"85%",lg:"100%",xl:"70%"},margin:"0 auto"},children:[g(k3t,{}),g(H3t,{})]}),z3t=({setIsOpenCreateProjectDialog:t})=>K(le,{sx:{width:"100%"},children:[g(P3t,{setIsOpenCreateProjectDialog:t}),g(U3t,{})]}),V3t=({projectName:t,highlightedProjectNameData:e})=>e?K(Ke,{gutterBottom:!0,variant:"h5",component:"div",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[e.before,g("span",{style:{backgroundColor:"#ffe84f",borderRadius:"2px"},children:e.match}),e.after]}):g(Ke,{gutterBottom:!0,variant:"h5",component:"div",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),G3t=({tag:t,value:e})=>K(Ke,{variant:"body2",fontSize:10,children:[g("span",{style:{color:so},children:`${t}: `}),g("span",{style:{color:tt,fontWeight:"bold"},children:e})]}),W3t=({project:t,currentProjectName:e,projectNameError:n,onProjectNameInputFieldChange:r,onSubmitProjectName:o,isEditProjectName:i})=>{const s="Created By",a="Shared By",l="Created and Shared By",c="Last Updated",u="Shared",d="Access",h=bt(XP),p=((y,v)=>{if(!v)return null;const b=y.toLowerCase().indexOf(v.toLowerCase());return b===-1?null:{before:y.slice(0,b),match:y.slice(b,b+v.length),after:y.slice(b+v.length)}})(t.name,h),m=[{tag:t?.sharedBy&&Tt.isEqual(t.user,t?.sharedBy)?l:s,value:st.getUserDisplayName(t.user)},{tag:c,value:st.getCardTimeAgo(t.updatedAt)},...t?.sharedBy&&!Tt.isEqual(t?.sharedBy,t.user)?[{tag:a,value:st.getUserDisplayName(t.sharedBy)}]:[],...t?.sharedDate?[{tag:u,value:st.getCardTimeAgo(t.sharedDate)}]:[],...t?.permission?[{tag:d,value:st.getCardPermission(t.permission)}]:[]];return K(Ule,{sx:{padding:1,pb:{xs:"48px",sm:"56px",md:"64px"}}
714,children:[i?g(lo,{autoFocus:!0,value:e,onChange:y=>{r(y.target.value)},onBlur:()=>o(),onClick:y=>y.stopPropagation(),onKeyDown:y=>{y.key==="Enter"&&o()},helperText:g(le,{sx:{position:"absolute",zIndex:2,backgroundColor:"darkRed",px:"2px",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"90%"},component:"span",children:g(Ke,{sx:{fontSize:"9px",color:"white"},component:"span",children:n})}),error:!!n,sx:{mt:-1}}):g(V3t,{projectName:t.name,highlightedProjectNameData:p}),m.map(y=>g(G3t,{tag:y.tag,value:y.value},y.tag))]})},j3t=({cardActions:t})=>g(J5e,{sx:{height:"20px",padding:1.2,position:"absolute",bottom:"5%",right:1},children:g(Mt,{direction:"row",spacing:.5,children:t.map(e=>e.isVisible&&g(Ca,{badgeContent:e.badgeContent,color:"secondary",sx:{"& .MuiBadge-badge":{backgroundColor:tc,color:"white"}},children:g(Vp,{fontSize:"medium",tooltipProps:{title:e.tooltipMessage},IconButtonProps:{onClick:n=>{n.stopPropagation(),e.onIconClick()},...e.iconButtonProps},iconType:e.iconType})},e.key))})}),q3t=({project:t,projectThumbnail:e})=>{const n="Unstar project",r="Star project",[o]=rS(),s=bt(tF)!==Sl.SHARED_TO_ME,a=async l=>{const c={requestBody:{...t,thumbnail:e,isStarred:!t.isStarred}};l.stopPropagation(),await o(c)};return s?g(le,{sx:{position:"absolute",top:10,right:10},children:g(rn,{title:t.isStarred?n:r,placement:"bottom",children:g(Vp,{iconType:"starIcon",fontSize:"small",IconButtonProps:{onClick:l=>a(l)},IconButtonPropsSx:{"&:hover":{backgroundColor:"action.hover"},color:t.isStarred?"#ffd600":"#f5f5f5"},iconPropsSx:{stroke:t.isStarred?"#ffab00":"#424242",strokeWidth:4,paintOrder:"stroke fill"}})})}):null};var qbe=(t=>(t.isLogoutModalOpen="isLogoutModalOpen",t.shareProject="shareProject",t.cloneProject="cloneProject",t))(qbe||{});const Y3t=({project:t,userId:e,isViewingSharedProjectsPage:n,setCurrentProject:r,openShareProjectModal:o,openDeleteProjectModal:i})=>{const s="Edit Project Name",a="Copy Project",l="Share Project",c="Delete Project",u="Project Name",d=Yn(),h=Za(),f=bt(NNe),[p]=rS(),[m,y]=C.useState(t.name),[v,b]=C.useState(""),[S,w]=C.useState(!1),A=async()=>{const $=KW.getNameErrorMessage(m);if(b($),$)return;const D={id:t.id,name:m,ownerId:e};if((await p({requestBody:D})).error?.status===ox.CONFLICT){b(to.nameAlreadyUsed(u));return}r(null)},_=$=>{r($),o()},P=$=>{r($),i()},R=()=>[{key:`edit-${t.id}`,isVisible:!n,iconType:"editIcon",tooltipMessage:s,badgeContent:0,onIconClick:()=>{w(!0)}},{key:`copy-${t.id}`,isVisible:t.type!==pr.INTEGRATION,iconType:"copyIcon",tooltipMessage:a,badgeContent:0,onIconClick:()=>{document.activeElement?.blur(),d(AG({modalKey:qbe.cloneProject,data:{projectId:t.id,name:t.name,type:t.type}}))}},{key:`share-${t.id}`,isVisible:!n||t.permission===ch.CO_OWNER,iconType:"shareIcon",tooltipMessage:l,badgeContent:t.sharedCount??0,onIconClick:()=>{_(t)}},{key:`delete-${t.id}`,isVisible:!n,iconType:"deleteIcon",tooltipMessage:c,badgeContent:0,onIconClick:()=>{t.sharedCount?P(t):O(`card-${t.id}`,t.id,t.type,t.name)},iconButtonProps:{id:`card-${t.id}`}}],O=($,D,k,U)=>{d(Im({type:"project",deleteElementId:D,projectType:k,anchorElId:$,ownerId:e,name:U})),r(null)},N=()=>{if(!t.thumbnail)return"";switch(typeof t.thumbnail){case"string":return t.thumbnail;default:return st.convertToBase64FromBuffer(t.thumbnail).toString()}},M=$=>{if(S){F(),$.stopPropagation();return}const D=`/projects/${t.id}`,k=t.id!==f,U=t.type===pr.NCNOC&&!g1.isProd?Un.OVERVIEW:Un.DESIGN;k&&(d(bNe(t.id)),d(eae(!0)),d(pd(!0)),d(YP(U)),d(Zse(qn.PARAMETERS)),d(d0("")),d(AC("")),d(I_()),d(zT(SL)),d(z1(1))),h(D)},L=$=>{y($)},F=()=>{t.name!==m?A():r(null),w(!1)};return C.useEffect(()=>{m===t.name&&b("")},[m,t.name]),g(mi,{item:!0,xs:12,sm:6,md:4,lg:2.4,sx:{height:{xs:"250px",sm:"250px",md:"250px",lg:"calc((100vh - 82px) / 3)",xl:"calc((100vh - 82px) / 4)"},minHeight:{xs:"250px"}},children:K(Hle,{sx:{height:"100%",position:"relative",display:"flex",flexDirection:"column","&:hover":{cursor:"pointer"},color:v9e[t.type],borderTop:`5px solid ${NC[t.type]}`},onClick:$=>M($),children:[g(zle,{component:"img",alt:"project thumbnail",sx:{minHeight:"100px",maxHeight:"200px",height:{xs:"50%",sm:"50%",md:"70%",lg:"80%",xl:"80%"},...t.type===pr.CNOC?{objectFit:"scale-down"}:{},backgroundColor:"#F2F7FA"},image:N()}
714),g(q3t,{project:t,projectThumbnail:N()}),g(W3t,{project:t,currentProjectName:m,projectNameError:v,onProjectNameInputFieldChange:$=>L($),onSubmitProjectName:()=>F(),isEditProjectName:S}),g(j3t,{cardActions:R()})]})},t.id)},kne=25;function Uw(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function zw(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Fne(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Bne(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var X3t=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function ZR(t,e){var n=K3t(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>
7140?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function K3t(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),o=X3t.get(r);o&&Object.defineProperty(t,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return t}var Q3t=[".DS_Store","Thumbs.db"];function Z3t(t){return Uw(this,void 0,void 0,function(){return zw(this,function(e){return K2(t)&&J3t(t.dataTransfer)?[2,r4t(t.dataTransfer,t.type)]:e4t(t)?[2,t4t(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,n4t(t)]:[2,[]]})})}function J3t(t){return K2(t)}function e4t(t){return K2(t)&&K2(t.target)}function K2(t){return typeof t=="object"&&t!==null}function t4t(t){return kz(t.target.files).map(function(e){return ZR(e)})}function n4t(t){return Uw(this,void 0,void 0,function(){var e;return zw(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return ZR(r)})]}})})}function r4t(t,e){return Uw(this,void 0,void 0,function(){var n,r;return zw(this,function(o){switch(o.label){case 0:return t.items?(n=kz(t.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(o4t))]):[3,2];case 1:return r=o.sent(),[2,$ne(Ybe(r))];case 2:return[2,$ne(kz(t.files).map(function(i){return ZR(i)}))]}})})}function $ne(t){return t.filter(function(e){return Q3t.indexOf(e.name)===-1})}function kz(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function o4t(t){if(typeof t.webkitGetAsEntry!="function")return Hne(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Xbe(e):Hne(t)}function Ybe(t){return t.reduce(function(e,n){return Bne(Bne([],Fne(e),!1),Fne(Array.isArray(n)?Ybe(n):[n]),!1)},[])}function Hne(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=ZR(e);return Promise.resolve(n)}function i4t(t){return Uw(this,void 0,void 0,function(){return zw(this,function(e){return[2,t.isDirectory?Xbe(t):s4t(t)]})})}function Xbe(t){var e=t.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;e.readEntries(function(a){return Uw(s,void 0,void 0,function(){var l,c,u;return zw(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(i4t)),o.push(u),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function s4t(t){return Uw(this,void 0,void 0,function(){return zw(this,function(e){return[2,new Promise(function(n,r){t.file(function(o){var i=ZR(o,t.fullPath);n(i)},function(o){r(o)})})]})})}var a4t=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",o=(t.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Une(t){return u4t(t)||c4t(t)||Qbe(t)||l4t()}function l4t(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 715In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c4t(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function u4t(t){if(Array.isArray(t))return Fz(t)}function zne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Vne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zne(Object(n),!0).forEach(function(r){Kbe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zne(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kbe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function LP(t,e){return f4t(t)||h4t(t,e)||Qbe(t,e)||d4t()}
vendor: 11,223 bytes, lines 715-718
715function d4t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 716In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qbe(t,e){if(t){if(typeof t=="string")return Fz(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fz(t,e)}}function Fz(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h4t(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function f4t(t){if(Array.isArray(t))return t}var p4t="file-invalid-type",g4t="file-too-large",m4t="file-too-small",y4t="too-many-files",v4t=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:p4t,message:"File type must be ".concat(n)}},Gne=function(e){return{code:g4t,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Wne=function(e){return{code:m4t,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},b4t={code:y4t,message:"Too many files"};function Zbe(t,e){var n=t.type==="application/x-moz-file"||a4t(t,e);return[n,n?null:v4t(e)]}function Jbe(t,e,n){if(Mb(t.size))if(Mb(e)&&Mb(n)){if(t.size>n)return[!1,Gne(n)];if(t.size<e)return[!1,Wne(e)]}else{if(Mb(e)&&t.size<e)return[!1,Wne(e)];if(Mb(n)&&t.size>n)return[!1,Gne(n)]}return[!0,null]}function Mb(t){return t!=null}function C4t(t){var e=t.files,n=t.accept,r=t.minSize,o=t.maxSize,i=t.multiple,s=t.maxFiles,a=t.validator;return!i&&e.length>1||i&&s>=1&&e.length>s?!1:e.every(function(l){var c=Zbe(l,n),u=LP(c,1),d=u[0],h=Jbe(l,r,o),f=LP(h,1),p=f[0],m=a?a(l):null;return d&&p&&!m})}function Q2(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function xM(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function jne(t){t.preventDefault()}function S4t(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function E4t(t){return t.indexOf("Edge/")!==-1}function x4t(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return S4t(t)||E4t(t)}function op(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return e.some(function(a){return!Q2(r)&&a&&a.apply(void 0,[r].concat(i)),Q2(r)})}}function w4t(){return"showOpenFilePicker"in window}function A4t(t){if(Mb(t)){var e=Object.entries(t).filter(function(n){var r=LP(n,2),o=r[0],i=r[1],s=!0;return eCe(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(tCe))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=LP(r,2),i=o[0],s=o[1];return Vne(Vne({},n),{},Kbe({},i,s))},{});return[{description:"Files",accept:e}]}return t}function T4t(t){if(Mb(t))return Object.entries(t).reduce(function(e,n){var r=LP(n,2),o=r[0],i=r[1];return[].concat(Une(e),[o],Une(i))},[]).filter(function(e){return eCe(e)||tCe(e)}).join(",")}function _4t(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function I4t(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function eCe(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function tCe(t){return/^.*\.[\w]+$/.test(t)}var P4t=["children"],R4t=["open"],O4t=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],N4t=["refKey","onChange","onClick"];function M4t(t){return k4t(t)||L4t(t)||nCe(t)||D4t()}function D4t(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 717In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L4t(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function k4t(t){if(Array.isArray(t))return Bz(t)}function gU(t,e){return $4t(t)||B4t(t,e)||nCe(t,e)||F4t()}function F4t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 718In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nCe(t,e){if(t){if(typeof t=="string")return Bz(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bz(t,e)}}function Bz(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function B4t(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function $4t(t){if(Array.isArray(t))return t}function qne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Yi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qne(Object(n),!0).forEach(function(r){$z(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qne(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $z(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z2(t,e){if(t==null)return{};var n=H4t(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function H4t(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var d9=C.forwardRef(function(t,e){var n=t.children,r=Z2(t,P4t),o=oCe(r),i=o.open,s=Z2(o,R4t);return C.useImperativeHandle(e,function(){return{open:i}},[i]),qt.createElement(C.Fragment,null,n(Yi(Yi({},s),{},{open:i})))});d9.displayName="Dropzone";var rCe={disabled:!1,getFilesFromEvent:Z3t,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};d9.defaultProps=rCe;d9.propTypes={children:ge.func,accept:ge.objectOf(ge.arrayOf(ge.string)),multiple:ge.bool,preventDropOnDocument:ge.bool,noClick:ge.bool,noKeyboard:ge.bool,noDrag:ge.bool,noDragEventsBubbling:ge.bool,minSize:ge.number,maxSize:ge.number,maxFiles:ge.number,disabled:ge.bool,getFilesFromEvent:ge.func,onFileDialogCancel:ge.func,onFileDialogOpen:ge.func,useFsAccessApi:ge.bool,autoFocus:ge.bool,onDragEnter:ge.func,onDragLeave:ge.func,onDragOver:ge.func,onDrop:ge.func,onDropAccepted:ge.func,onDropRejected:ge.func,onError:ge.func,validator:ge.func};var Hz={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function oCe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Yi(Yi({},rCe),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,d=e.onDragOver,h=e.onDrop,f=e.onDropAccepted,p=e.onDropRejected,m=e.onFileDialogCancel,y=e.onFileDialogOpen,v=e.useFsAccessApi,b=e.autoFocus,S=e.preventDropOnDocument,w=e.noClick,A=e.noKeyboard,_=e.noDrag,P=e.noDragEventsBubbling,R=e.onError,O=e.validator,N=C.useMemo(function(){return T4t(n)},[n]),M=C.useMemo(function(){return A4t(n)},[n]),L=C.useMemo(function(){return typeof y=="function"?y:Yne},[y]),F=C.useMemo(function(){return typeof m=="function"?m:Yne},[m]),$=C.useRef(null),D=C.useRef(null),k=C.useReducer(U4t,Hz),U=gU(k,2),H=U[0],V=U[1],q=H.isFocused,J=H.isFileDialogActive,Q=C.useRef(typeof window<"u"&&window.isSecureContext&&v&&w4t()),se=function(){!Q.current&&J&&setTimeout(function(){if(D.current){var Oe=D.current.files;Oe.length||(V({type:"closeDialog"}),F())}},300)};C.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[D,J,F,Q]);var oe=C.useRef([]),ie=function(Oe){$.current&&$.current.contains(Oe.target)||(Oe.preventDefault(),oe.current=[])};C.useEffect(function(){return S&&(document.addEventListener("dragover",jne,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",jne),document.removeEventListener("drop",ie))}},[$,S]),C.useEffect(function(){return!r&&b&&$.current&&$.current.focus(),function(){}},[$,b,r]);var ee=C.useCallback(function(_e){R?R(_e):console.error(_e)},[R]),re=C.useCallback(function(_e){_e.preventDefault(),_e.persist(),be(_e),oe.current=[].concat(M4t(oe.current),[_e.target]),xM(_e)&&Promise.resolve(o(_e)).then(function(Oe){if(!(Q2(_e)&&!P)){var ze=Oe.length,ne=ze>0&&C4t({files:Oe,accept:N,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:O}),W=ze>0&&!ne;V({isDragAccept:ne,isDragReject:W,isDragActive:!0,type:"setDraggedFiles"}),c&&c(_e)}}).catch(function(Oe){return ee(Oe)})},[o,c,ee,P,N,s,i,a,l,O]),fe=C.useCallback(function(_e){_e.preventDefault(),_e.persist(),be(_e);var Oe=xM(_e);if(Oe&&_e.dataTransfer)try{_e.dataTransfer.dropEffect="copy"}catch{}return Oe&&d&&d(_e),!1},[d,P]),we=C.useCallback(function(_e){_e.preventDefault(),_e.persist(),be(_e);var Oe=oe.current.filter(function(ne){return $.current&&$.current.contains(ne)}),ze=Oe.indexOf(_e.target);ze!==-1&&Oe.splice(ze,1),oe.current=Oe,!(Oe.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),xM(_e)&&u&&u(_e))},[$,u,P]),xe=C.useCallback(function(_e,Oe){var ze=[],ne=[];_e.forEach(function(W){var j=Zbe(W,N),ue=gU(j,2),he=ue[0],Ce=ue[1],Ie=Jbe(W,s,i),et=gU(Ie,2),je=et[0],it=et[1],xt=O?O(W):null;if(he&&je&&!xt)ze.push(W);else{var rt=[Ce,it];xt&&(rt=rt.concat(xt)),ne.push({file:W,errors:rt.filter(function(Bt){return Bt})})}}),(!a&&ze.length>1||a&&l>=1&&ze.length>l)&&(ze.forEach(function(W){ne.push({file:W,errors:[b4t]})}),ze.splice(0)),V({acceptedFiles:ze,fileRejections:ne,type:"setFiles"}),h&&h(ze,ne,Oe),ne.length>0&&p&&p(ne,Oe),ze.length>0&&f&&f(ze,Oe)},[V,a,N,s,i,l,h,f,p,O]),ve=C.useCallback(function(_e){_e.preventDefault(),_e.persist(),be(_e),oe.current=[],xM(_e)&&Promise.resolve(o(_e)).then(function(Oe){Q2(_e)&&!P||xe(Oe,_e)}
718).catch(function(Oe){return ee(Oe)}),V({type:"reset"})},[o,xe,ee,P]),Re=C.useCallback(function(){if(Q.current){V({type:"openDialog"}),L();var _e={multiple:a,types:M};window.showOpenFilePicker(_e).then(function(Oe){return o(Oe)}).then(function(Oe){xe(Oe,null),V({type:"closeDialog"})}).catch(function(Oe){_4t(Oe)?(F(Oe),V({type:"closeDialog"})):I4t(Oe)?(Q.current=!1,D.current?(D.current.value=null,D.current.click()):ee(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ee(Oe)});return}D.current&&(V({type:"openDialog"}),L(),D.current.value=null,D.current.click())},[V,L,F,v,xe,ee,M,a]),pe=C.useCallback(function(_e){!$.current||!$.current.isEqualNode(_e.target)||(_e.key===" "||_e.key==="Enter"||_e.keyCode===32||_e.keyCode===13)&&(_e.preventDefault(),Re())},[$,Re]),Be=C.useCallback(function(){V({type:"focus"})},[]),ke=C.useCallback(function(){V({type:"blur"})},[]),Ne=C.useCallback(function(){w||(x4t()?setTimeout(Re,0):Re())},[w,Re]),ot=function(Oe){return r?null:Oe},ce=function(Oe){return A?null:ot(Oe)},Ae=function(Oe){return _?null:ot(Oe)},be=function(Oe){P&&Oe.stopPropagation()},Se=C.useMemo(function(){return function(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=_e.refKey,ze=Oe===void 0?"ref":Oe,ne=_e.role,W=_e.onKeyDown,j=_e.onFocus,ue=_e.onBlur,he=_e.onClick,Ce=_e.onDragEnter,Ie=_e.onDragOver,et=_e.onDragLeave,je=_e.onDrop,it=Z2(_e,O4t);return Yi(Yi($z({onKeyDown:ce(op(W,pe)),onFocus:ce(op(j,Be)),onBlur:ce(op(ue,ke)),onClick:ot(op(he,Ne)),onDragEnter:Ae(op(Ce,re)),onDragOver:Ae(op(Ie,fe)),onDragLeave:Ae(op(et,we)),onDrop:Ae(op(je,ve)),role:typeof ne=="string"&&ne!==""?ne:"presentation"},ze,$),!r&&!A?{tabIndex:0}:{}),it)}},[$,pe,Be,ke,Ne,re,fe,we,ve,A,_,r]),Pe=C.useCallback(function(_e){_e.stopPropagation()},[]),Ue=C.useMemo(function(){return function(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=_e.refKey,ze=Oe===void 0?"ref":Oe,ne=_e.onChange,W=_e.onClick,j=Z2(_e,N4t),ue=$z({accept:N,multiple:a,type:"file",style:{display:"none"},onChange:ot(op(ne,ve)),onClick:ot(op(W,Pe)),tabIndex:-1},ze,D);return Yi(Yi({},ue),j)}},[D,n,a,ve,r]);return Yi(Yi({},H),{},{isFocused:q&&!r,getRootProps:Se,getInputProps:Ue,rootRef:$,inputRef:D,open:ot(Re)})}function U4t(t,e){switch(e.type){case"focus":return Yi(Yi({},t),{},{isFocused:!0});case"blur":return Yi(Yi({},t),{},{isFocused:!1});case"openDialog":return Yi(Yi({},Hz),{},{isFileDialogActive:!0});case"closeDialog":return Yi(Yi({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Yi(Yi({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Yi(Yi({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Yi({},Hz);default:return t}}function Yne(){}const z4t={border:"2px dashed #cccccc",borderRadius:"4px",padding:"20px",textAlign:"center",cursor:"pointer"},V4t={border:"2px dashed #cccccc",borderRadius:"4px",padding:"20px",textAlign:"center",color:"#cccccc"},G4t=({setIsOpenCreateProjectDialog:t})=>{const e=bt(Dc),n=bt(jP),r=[{key:pr.NCNOC,value:"Non-Coherent NoC"},{key:pr.CNOC,value:"Coherent NoC"},{key:pr.INTEGRATION,value:"Integration",disabled:g1.isProd}],o="Create Project",i="Project Type",s="Project Name",a=`Upload Topology XLSX file ${n.canDownloadJson?"or JSON file":""}`,l="(Drag & drop here, or click to browse local files)",c="Selected File:",u="Create",d="Cancel",h=`Topology XLSX ${n.canDownloadJson?"or JSON":""} is restricted to NC-NOC`,f="Project Name",p="",[m,{isLoading:y}]=O7e(),[v,{isLoading:b}]=N7e(),[S,w]=C.useState(null),[A,_]=C.useState(pr.NCNOC),[P,R]=C.useState(p),[O,N]=C.useState(""),M=H=>{if(H.length===1){const V=H[0],q=V.name.endsWith(".xlsx"),J=V.name.endsWith(".json");if(q||J&&n.canDownloadJson){w(V);return}const Q=n.canDownloadJson?"XLSX or JSON file":"XLSX file";alert(`Please upload an ${Q}.`);return}alert("Please upload only one file.")},{getRootProps:L,getInputProps:F}=oCe({onDrop:M,disabled:pr.NCNOC!==A}),$=async H=>{S&&await v({requestBody:{createParams:H,file:S}}).then(V=>{if(V.error?.status===ox.CONFLICT){N(to.nameAlreadyUsed(f));return}"error"in V?ln.error("Failed to create project using uploaded file",{autoClose:3e3}):(ln.success("Project created",{autoClose:3e3}),U())}).catch(V=>{ln.error("An unexpected error occurred while uploading the file",{autoClose:3e3}),console.error(V)})},D=H=>{const V=H.target.value,q=KW.getNameErrorMessage(V);R(V),N(q)},k=async()=>
718{if(y||b)return;const H={name:P,type:A,userId:e.id};if(S)await $(H);else{if((await m({requestBody:H})).error?.status===ox.CONFLICT){N(to.nameAlreadyUsed(f));return}U()}},U=()=>{w(null),_(pr.NCNOC),R(p),N(""),t(!1)};return K(Iu,{open:!0,onClose:()=>U(),fullWidth:!0,sx:{width:"100%","& .MuiPaper-root":{maxWidth:"50vw"}},children:[y||b?g(tl,{}):null,g(eg,{children:o}),g(yi,{}),K(le,{children:[g(rn,{title:S?h:null,placement:"bottom-end",children:g(ec,{label:g(Ke,{fontWeight:"bold",fontSize:16,children:i}),labelPlacement:"start",control:g(xa,{id:"projectType",value:A,disabled:!!S,onChange:H=>_(Number(H.target.value)),sx:{ml:3,height:30,width:180,"&.Mui-disabled":{backgroundColor:"#e0e0e0",color:"rgba(0, 0, 0, 0.87)",opacity:1}},children:r.map(H=>g(mr,{value:H.key,disabled:H?.disabled,children:K(le,{display:"flex",children:[g(le,{sx:{width:5,height:18,backgroundColor:NC[H.key],mr:1,ml:-1}}),H.value]})},H.key))}),sx:{px:5,mb:2,mt:2,ml:0}})}),g(yi,{}),K(le,{sx:{px:5,mt:3,mb:-2},children:[K(le,{...L(),style:pr.NCNOC!==A?V4t:z4t,children:[g("input",{id:"fileInput",...F()}),g(Ke,{sx:{userSelect:pr.NCNOC!==A?"none":"auto"},children:a}),g(Ke,{fontSize:11,sx:{userSelect:pr.NCNOC!==A?"none":"auto"},children:l})]}),S?K(le,{display:"flex",alignItems:"center",flexDirection:"row",children:[g(Ke,{sx:{pr:1},children:c}),g(Ke,{fontWeight:"bold",children:S.name}),g(Qo,{icon:g(dR,{}),sx:{color:"red"},onClick:()=>w(null)})]}):null]})]}),g(ZC,{sx:{width:"100%"},children:K(le,{sx:{p:2,"& .settings-row":{mt:2,display:"grid",gridTemplateColumns:"repeat(auto-fit, 50%)",alignItems:"left"}},children:[g(lo,{required:!0,fullWidth:!0,value:P,label:s,onChange:H=>D(H),onKeyDown:H=>{H.key==="Enter"&&!O&&k()},error:!!O,helperText:g(le,{sx:{position:"absolute",zIndex:2,backgroundColor:"darkRed",px:"2px",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"50%"},component:"span",children:g(Ke,{sx:{fontSize:"12px",color:"white"},component:"span",children:O})})}),K(Jp,{children:[g(Sn,{variant:"outlined",onClick:()=>U(),children:d}),g(Sn,{variant:"contained",sx:{backgroundColor:tt,"&:hover":{backgroundColor:Zs}},onClick:k,disabled:!!O||!P.length,children:u})]})]})})]})};var h9={},W4t=hr;Object.defineProperty(h9,"__esModule",{value:!0});var iCe=h9.default=void 0,j4t=W4t(yr()),Xne=vr;iCe=h9.default=(0,j4t.default)([(0,Xne.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z"},"0"),(0,Xne.jsx)("path",{d:"M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z"},"1")],"SearchOff");const q4t=()=>{const t=bt(XP),e=bt(tF),n="No shared projects found",r="No starred projects found",o="No projects found",i="Ask a project owner to share their project with you",s="Create a new project by clicking the + button",a="Try using a different search term to find the projects you're looking for",l="Star a project by clicking the star icon on my projects tab",c=f=>({[Sl.MY_PROJECTS]:o,[Sl.SHARED_TO_ME]:n,[Sl.STARRED]:r})[f],u=(f,p)=>p?a:{[Sl.MY_PROJECTS]:s,[Sl.SHARED_TO_ME]:i,[Sl.STARRED]:l}[f],d=c(e),h=u(e,t);return K(le,{sx:{mt:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:[t?g(iCe,{sx:{fontSize:64,color:"text.secondary",mb:2}}):g(ZL,{sx:{fontSize:64,color:"text.secondary",mb:2}}),g(Ke,{variant:"h5",component:"h3",sx:{mb:1,fontWeight:"medium"},children:d}),g(Ke,{variant:"body1",color:"text.secondary",sx:{mb:3},children:h})]})},sCe=Nr.injectEndpoints({endpoints:t=>({getByProjectIdAndUserId:t.query({query:({projectId:e,userId:n})=>({url:`${dt.projectSharing}?projectId=${e}&userId=${n}`,method:nn.GET}),providesTags:[We.ProjectSharing],transformResponse:e=>e}),updateProjectSharing:t.mutation({query:({requestBody:e})=>({url:`${dt.projectSharing}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){const o=n(sCe.util.updateQueryData("getByProjectIdAndUserId",{projectId:e.projectId,userId:e.userId},i=>{const s={};e.usersArray.forEach(a=>{s[a.id]={isShared:a.isShared,permission:a.permission}}
718),Object.values(i).forEach(a=>{a.forEach(l=>{l.id in s&&(l.isShared=s[l.id].isShared,l.permission=s[l.id].permission)})})}));try{await r}catch{o.undo()}},invalidatesTags:(e,n,{skipProjectInvalidation:r})=>r?[We.SharedProject]:[We.Projects,We.SharedProject],transformErrorResponse:e=>e,transformResponse:e=>e})})}),{useGetByProjectIdAndUserIdQuery:Y4t,useUpdateProjectSharingMutation:aCe}=sCe,X4t=(t,e)=>{const{projectSharing:n,isLoadingProjectSharing:r}=lCe(t,e);return{internalSharedUsers:[...n.Internal??[]].filter(i=>i.isShared),isLoadingSharedInternalUsers:r}},lCe=(t,e)=>{const{data:n={},isLoading:r}=Y4t({projectId:t,userId:e});return{projectSharing:n,isLoadingProjectSharing:r}},Uz={getByProjectIdAndUserId:lCe,getInternalSharedUsersByProjectIdAndUserId:X4t},cCe=({label:t,isChecked:e,isDisabled:n,onChangeHandler:r})=>{const o=md(so,.95);return K(le,{display:"flex",alignItems:"center",children:[g(_u,{sx:{"&.Mui-checked":{color:so},"&:hover":{backgroundColor:o}},checked:e,disabled:n,onChange:r}),g(Ke,{children:t})]})},K4t=({isChecked:t,isIndeterminate:e,isDisabled:n,handleOnChange:r})=>{const o="Select All",i=md(so,.95);return K(Mt,{direction:"row",sx:{alignItems:"center"},children:[g(_u,{sx:{"&.Mui-checked":{color:so},"&.MuiCheckbox-indeterminate":{color:so},"&:hover":{backgroundColor:i},justifyContent:"flex-start",ml:1},checked:t,indeterminate:e,disabled:n,onChange:r}),g(Ke,{children:o})]})},Q4t=({activeTab:t,projectSharing:e,setProjectSharing:n})=>{const r="<Empty>",o="500px",i="500px",s=e[t]??[],a=s.filter(m=>m.isShared),l=s.length>0&&a.length===s.length,c=a.length>0&&a.length<s.length,u=(m,y)=>{const v=s.map(S=>S.id===m?{...S,...y}:S),b={...e,[t]:v};n(b)},d=(m,y)=>{u(m,{isShared:y})},h=(m,y)=>{const v=Number(y);u(m,{permission:v})},f=m=>{const y=s.map(b=>({...b,isShared:m})),v={...e,[t]:y};n(v)},p=[{key:ch.COLLABORATOR,value:ch.COLLABORATOR,displayName:"Collaborator (can Edit)"},{key:ch.CO_OWNER,value:ch.CO_OWNER,displayName:"Co-owner (can Edit and re-share)"}];return K(Mt,{direction:"column",children:[g(K4t,{isChecked:l,isIndeterminate:c,isDisabled:!s.length,handleOnChange:()=>{f(!l)}}),g(Mt,{direction:"column",sx:{p:1,border:"1px solid grey",borderRadius:2,minHeight:o,maxHeight:i,overflowY:"auto"},children:s?s.map(m=>K(mi,{container:!0,spacing:2,alignItems:"center",children:[g(mi,{item:!0,xs:!0,children:g(cCe,{label:`${m.name} <${m.email}>`,isChecked:m.isShared,isDisabled:!1,onChangeHandler:y=>d(m.id,y.target.checked)},m.id)}),g(mi,{item:!0,children:m.isShared?g(uC,{options:p,value:Number(m.permission),onChangeHandler:y=>h(m.id,y.target.value),sx:{minWidth:"250px"}},m.id):g(le,{})})]},m.id)):g(le,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:g(Ke,{variant:"h5",children:r})})})]})},Z4t=({projectId:t,userId:e,projectSharing:n})=>{const r=Object.values(n).flat().map(o=>({...o,isShared:!1}));return{projectId:t,userId:e,usersArray:r}},J4t=({projectId:t,userId:e,projectSharing:n,unshareUserId:r})=>{const o=Object.values(n).flat().map(i=>({...i,isShared:i.id===r?!1:i.isShared}));return{projectId:t,userId:e,usersArray:o}},ezt=({projectId:t,userId:e,projectSharing:n})=>{const r=Object.values(n).flat().map(o=>({...o}));return{projectId:t,userId:e,usersArray:r}},zz={getUpdatePayload:ezt,getUpdatePayloadByUnshare:Z4t,getUpdatePayloadByUnshareUser:J4t},tzt=t=>!!Object.values(t).flat().filter(n=>n.isShared).length,Kne={getHasSelectedUser:tzt},nzt=({project:t,handleClose:e})=>{const n=`Share Project: ${t.name}`,r="Cancel",o="Share",i="No Access",s="Internal",a="800px",l=bt(Dc),{projectSharing:c,isLoadingProjectSharing:u}=Uz.getByProjectIdAndUserId(t.id,l.id),[d,{isLoading:h}]=aCe(),[f,p]=C.useState(s),[m,y]=C.useState(c),v=Object.keys(m).includes(s),b=(A,_)=>{p(_)},S=async()=>{const A="Project access successfully updated",_="Failed to update project access";if(!!Tt.isEqual(c,m)){ln.success(A),e();return}const R=zz.getUpdatePayload({projectId:t.id,userId:l.id,projectSharing:m});"data"in await d({requestBody:R})?ln.success(A):ln.error(_),e()},w=[{id:"cancel",label:r,handleClick:()=>e(),isEnabled:!0,sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"share",label:o,handleClick:()=>S(),isEnabled:Kne.getHasSelectedUser(c)||Kne.getHasSelectedUser(m),sx:{backgroundColor:tt,"&:hover":{backgroundColor:"black"},my:"5px",ml:1}}];return C.useEffect(()=>{y(c)},[u]),g(Iu,{open:!0,onClose:e,fullWidth:!0,PaperProps:{sx:{minWidth:a}},children:K(Mt,{direction:"column",spacing:.5,sx:{px:2},children:[g(le,{sx:{textAlign:"center"},children:g(Ke,{variant:"h5",noWrap:!0,sx:{flex:15,my:1},children:n})}),v?K(Mt,{direction:"column",spacing:.5,children:[g(M0e,{activeTab:f,handleActiveTabChange:b,children:Object.keys(m).map(A=>g(Sa,{value:A,label:A},A))}),g(Q4t,{activeTab:f,projectSharing:m,setProjectSharing:y},f)]}):g(le,{flex:1,children:i}),g(Mt,{direction:"row",spacing:.5,sx:{mt:2,justifyContent:"flex-end"},children:w.map(A=>g(PR,{id:A.id,label:A.label,handleClick:A.handleClick,isEnabled:A.isEnabled&&!h,sx:A.sx},A.id))})]})})},rzt=({isChecked:t,onChangeHandler:e})=>g(cCe,{label:"I understand that deleting this project is permanent and cannot be undone",isChecked:t,isDisabled:!1,onChangeHandler:e}
718),ozt=({options:t,selectedValue:e,onChangeHandler:n})=>{const r={"&.Mui-checked":{color:so}};return g(sce,{value:e,onChange:n,children:t.map(o=>g(rn,{title:o.isEnabled?"":o.tooltipMessage,placement:"left",children:g(ec,{value:o.value,control:g(jI,{sx:r}),label:g(Ke,{variant:"h6",sx:{color:o.isEnabled?"inherit":"text.disabled"},children:o.label}),disabled:!o.isEnabled,sx:{m:0}},o.value)},o.value))})},izt=({options:t,selectedValue:e,onChangeHandler:n})=>g(ozt,{options:t,selectedValue:e,onChangeHandler:n}),szt=({value:t,options:e,onChangeHandler:n})=>g(le,{sx:{pl:4.9,pb:1},children:g(uC,{value:t,options:e,onChangeHandler:n,sx:{width:"90%"}})}),uCe=Nr.injectEndpoints({endpoints:t=>({getAllSharedProjectByProjectId:t.query({query:({projectId:e})=>({url:`${dt.sharedProject}?projectId=${e}`,method:nn.GET}),providesTags:[We.SharedProject],transformResponse:(e,n,r)=>e}),updateSharedProject:t.mutation({query:({requestBody:e})=>({url:`${dt.sharedProject}`,method:nn.PUT,body:e}),async onQueryStarted({requestBody:e},{dispatch:n,queryFulfilled:r}){await C0({dispatch:n,api:uCe,endpointName:"getAllSharedProjectByProjectId",queryArg:{projectId:e.projectId},requestBody:e,queryFulfilled:r})},transformErrorResponse:e=>e,transformResponse:e=>e})})}),{useGetAllSharedProjectByProjectIdQuery:azt,useUpdateSharedProjectMutation:lzt}=uCe,czt=t=>{const{data:e=[]}=azt({projectId:t});return e},uzt={getAllByProjectId:czt},dzt=({sharedProject:t,field:e,value:n})=>({...t,[e]:n}),hzt={getUpdatePayload:dzt},fzt=({project:t,handleClose:e})=>{const n="Cancel",r="Delete",o="700px",i="#FE0000",l=bt(Dc),{internalSharedUsers:c,isLoadingSharedInternalUsers:u}=Uz.getInternalSharedUsersByProjectIdAndUserId(t.id,l.id),{projectSharing:d}=Uz.getByProjectIdAndUserId(t.id,l.id),h=tB.getAll(),f=uzt.getAllByProjectId(t.id),[p,m]=C.useState(!1),[y,v]=C.useState(0),[b,S]=C.useState(null),[w]=aCe(),[A]=Cue(),[_]=rS(),[P]=lzt(),R=async()=>{e(),y===0&&await M(),y===1&&await N()},O=({response:k,successMessage:U,failedMessage:H})=>{"data"in k?ln.success(U):ln.error(H)},N=async()=>{const k=c.find(J=>J.id===b)?.email,U=h.find(J=>J.email===k),H={...zz.getUpdatePayloadByUnshareUser({projectId:t.id,userId:l.id,projectSharing:d,unshareUserId:Number(b)}),isOwnershipTransferred:!0};await w({requestBody:H,skipProjectInvalidation:!0}),await w({requestBody:H,skipProjectInvalidation:!0});const V=f.filter(J=>J.projectId===t.id&&J.ownerId===l.id&&J.userId!==U?.id);for(const J of V){const Q=hzt.getUpdatePayload({sharedProject:J,field:"ownerId",value:Number(U?.id)});await P({requestBody:Q})}const q=await _({requestBody:{id:t.id,ownerId:U?.id}});O({response:q,successMessage:"Project ownership has been transferred",failedMessage:"Failed to transfer project ownership"})},M=async()=>{const k=zz.getUpdatePayloadByUnshare({projectId:t.id,userId:l.id,projectSharing:d});await w({requestBody:k,skipProjectInvalidation:!0});const U=await A({projectId:t.id});O({response:U,successMessage:"Project deleted",failedMessage:"Failed to deleteProject"})},L=[{id:"cancel",label:n,handleClick:()=>e(),isEnabled:!0,sx:{border:`1px solid ${tt}`,color:"black",backgroundColor:"white","&:hover":{backgroundColor:"lightgray",opacity:.7}}},{id:"delete",label:r,handleClick:()=>R(),isEnabled:p,sx:{backgroundColor:i,"&:hover":{backgroundColor:md(i,.8)},my:"5px",ml:1}}],F=k=>{switch(k){case ch.COLLABORATOR:return"Collaborator";case ch.CO_OWNER:return"Co-owner";case ch.GUEST:default:return"Guest"}},$=[...c].sort((k,U)=>U.permission-k.permission).map(k=>({key:k.id,value:k.id,displayName:`${k.name} <${k.email}> - ${F(k.permission)}`}))??[],D=[{value:0,label:"Delete and unshare from all users",isEnabled:!0,tooltipMessage:""},{value:1,label:"Delete and transfer ownership",isEnabled:$.length,tooltipMessage:"No internal users are available to transfer ownership to"}];return C.useEffect(()=>{b===null&&$.length&&S($[0].value)},[$,b]),u?g(tl,{}):K(Iu,{open:!0,onClose:e,fullWidth:!0,PaperProps:{sx:{minWidth:o}},children:[g(eg,{children:`Delete Project [${t.name}]`}),g(yi,{}),g(ZC,{children:K(Mt,{direction:"column",spacing:.5,sx:{px:2},children:[g(izt,{options:D,selectedValue:y,onChangeHandler:k=>v(Number(k.target.value))}),y===1?g(szt,{value:Number(b),options:$,onChangeHandler:k=>S(Number(k.target.value))}
718):null,g(rzt,{isChecked:p,onChangeHandler:k=>m(k.target.checked)}),g(Mt,{direction:"row",spacing:.5,sx:{mt:2,justifyContent:"flex-end"},children:L.map(k=>g(PR,{id:k.id,label:k.label,handleClick:k.handleClick,isEnabled:k.isEnabled,sx:k.sx},k.id))})]})})]})},pzt=()=>{const t=Yn(),e=C.useRef(null),n=bt(qP),r=bt(tF),o=bt(ONe),i=bt(XP),s=bt(_G),[a,l]=C.useState(!1),[c,u]=C.useState(null),[d,h]=C.useState(!1),[f,p]=C.useState(!1),m=c9();let y=0;const v=s.length!==y,b=r===Sl.MY_PROJECTS,S=r===Sl.SHARED_TO_ME,w=r===Sl.STARRED,A=o*kne,_=s.length?s:m,{data:P=[],isLoading:R,isFetching:O}=P7e({userId:n,limit:A,searchTerm:i,types:_},{refetchOnMountOrArgChange:!0,skip:!n||b||w}),{data:N=[],isLoading:M,isFetching:L}=bue({userId:n,limit:A,searchTerm:i,types:_,activeTab:r},{refetchOnMountOrArgChange:!0,skip:!n||S}),F=rc.getAllCount({userId:n,searchTerm:i,types:s,activeTab:r}),$=rc.getAllSharedByUserIdCount({userId:n,searchTerm:i,types:s}),D=S?P:N,k=S?O:L,U=S?R:M,H=S?$:F,V=C.useCallback(()=>{if(!e.current)return;const Q=H>o*kne,{scrollTop:se,scrollHeight:oe,clientHeight:ie}=e.current;se+ie>=oe-100&&!k&&Q&&t(z1(o+1))},[k,t,H,o]),q=()=>{h(!1),u(null)},J=()=>{p(!1),u(null)};return C.useEffect(()=>{const Q=e.current;return Q&&Q.addEventListener("scroll",V),()=>{Q&&Q.removeEventListener("scroll",V)}},[V]),C.useEffect(()=>{y=s.length},[s]),K(le,{children:[g(z3t,{setIsOpenCreateProjectDialog:l}),K(le,{ref:e,sx:{position:"relative",width:"100%",mt:"6px",pb:"30px",px:"8px",display:"flex",flexDirection:"column",height:"calc(100vh - 165px)",overflowY:"auto"},children:[K(mi,{container:!0,spacing:1,sx:{width:{xs:"100%",sm:"95%",md:"85%",lg:"100%",xl:"70%"},margin:"0 auto"},children:[D.map(Q=>g(Y3t,{project:Q,userId:n,isViewingSharedProjectsPage:S,setCurrentProject:u,openShareProjectModal:()=>h(!0),openDeleteProjectModal:()=>p(!0)},Q.id)),k&&o>1&&D.length?g(Hbe,{}):null]}),U||k&&o==1&&(i||v)?g(tl,{customSX:{position:"absolute"}}):null,a?g(G4t,{setIsOpenCreateProjectDialog:l}):null,!D.length&&!U?g(q4t,{}):null]}),d&&c?g(nzt,{project:c,handleClose:q}):null,f&&c?g(fzt,{project:c,handleClose:J}):null]})},gzt=()=>{const t="Set new password",e=bt(Yx),{token:n}=Wx(),r=Za(),o=Yn(),{register:i,handleSubmit:s,formState:{errors:a}}=JC({resolver:sw(Zg.resetPasswordConfirm)}),{data:l,error:c,isLoading:u}=p9e(n),[d,{isLoading:h,error:f}]=g9e(),[p,m]=C.useState(!0),y=()=>{m(S=>!S)},v=({password:S})=>{d({id:l.id,password:btoa(S)}).then(w=>{"error"in w?ln.error(w.error.message,{autoClose:rx}):"data"in w&&(r(un.login.path),ln.success(w.data.success,{autoClose:rx}))})},b=C.useCallback(S=>e&&e[S.target.name]&&o(CC(S.target.name)),[e]);return C.useEffect(()=>()=>{o(Bv({}))},[]),g(le,{sx:{mt:"25vh"},children:g(Wv,{title:K(le,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"center"},children:[g(n8e,{fontSize:"large"}),g(Ke,{variant:"h3",children:t})]}),sx:{width:{xl:"30%",lg:"45%",md:"45%",sm:"65%",xs:"95%"}},children:K("form",{onSubmit:s(v),children:[g(le,{sx:{width:"80%",mx:"auto",mt:4,mb:2},children:K(mi,{container:!0,spacing:1,children:[K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"password",label:"New Password",variant:"outlined",type:p?"password":"input",fullWidth:!0,onFocus:b,...i("password"),error:!!(a.password||e?.password),sx:Ic,InputProps:{endAdornment:p?g(qr,{position:"end",children:g(tx,{onClick:y,sx:{cursor:"pointer"}})}):g(qr,{position:"end",children:g(nx,{onClick:y,sx:{cursor:"pointer"}})})}}),g(Ke,{variant:"inherit",color:"error",children:a.password?.message||e?.password})]}),K(mi,{item:!0,xs:12,sm:12,children:[g(lo,{required:!0,id:"confirmPassword",label:"Confirm New Password",variant:"outlined",type:p?"password":"input",fullWidth:!0,onFocus:b,...i("confirmPassword"),error:!!(a.confirmPassword||e?.password),sx:Ic,InputProps:{endAdornment:p?g(qr,{position:"end",children:g(tx,{onClick:y,sx:{cursor:"pointer"}})}):g(qr,{position:"end",children:g(nx,{onClick:y,sx:{cursor:"pointer"}})})}}),g(Ke,{variant:"inherit",color:"error",children:a.confirmPassword?.message||e?.password})]})]})}),g(le,{sx:{textAlign:"center"},children:g(Sn,{variant:"contained",size:"large",type:"submit",sx:{mt:2,mb:1,backgroundColor:tt,"&:hover":{backgroundColor:tt}},disabled:h||!!c||!!Object.keys(a).length,startIcon:h?g(Ni,{size:18}):null,children:h?"Resetting...":"Reset"})}),g(le,{mt:1,sx:{display:"flex",gap:1,justifyContent:"center",textDecoration:"underline",color:tt,"& .MuiTypography-root":{fontWeight:"400","&:hover":{cursor:"pointer",color:tt}}},children:g(Ke,{onClick:()=>r(un.login.path),children:"Log in"})})]})})})};var dCe={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ac,function(){var n="week",r="year";return function(o,i,s){var a=i.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(r).add(1,r).date(c),d=s(this).endOf(n);if(u.isBefore(d))return 1}var h=s(this).startOf(r).date(c).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?s(this).startOf("week").week():Math.ceil(f)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(dCe);var mzt=dCe.exports;const yzt=ud(mzt);var hCe={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ac,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},l=function(m){return(m=+m)+(m>68?1900:2e3)},c=function(m){return function(y){this[m]=+y}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),b=60*v[1]+(+v[2]||0);return b===0?0:v[0]==="+"?-b:b}(m)}],d=function(m){var y=a[m];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(m,y){var v,b=a.meridiem;if(b){for(var S=1;S<=24;S+=1)if(m.indexOf(b(S,0,y))>-1){v=S>12;break}}else v=m===(y?"pm":"PM");return v},f={A:[s,function(m){this.afternoon=h(m,!1)}],a:[s,function(m){this.afternoon=h(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[o,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[i,c("seconds")],ss:[i,c("seconds")],m:[i,c("minutes")],mm:[i,c("minutes")],H:[i,c("hours")],h:[i,c("hours")],HH:[i,c("hours")],hh:[i,c("hours")],D:[i,c("day")],DD:[o,c("day")],Do:[s,function(m){var y=a.ordinal,v=m.match(/\d+/);if(this.day=v[0],y)for(var b=1;b<=31;b+=1)y(b).replace(/\[|\]/g,"")===m&&(this.day=b)}
718],M:[i,c("month")],MM:[o,c("month")],MMM:[s,function(m){var y=d("months"),v=(d("monthsShort")||y.map(function(b){return b.slice(0,3)})).indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[s,function(m){var y=d("months").indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,c("year")],YY:[o,function(m){this.year=l(m)}],YYYY:[/\d{4}/,c("year")],Z:u,ZZ:u};function p(m){var y,v;y=m,v=a&&a.formats;for(var b=(m=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,N,M){var L=M&&M.toUpperCase();return N||v[M]||n[M]||v[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,$,D){return $||D.slice(1)})})).match(r),S=b.length,w=0;w<S;w+=1){var A=b[w],_=f[A],P=_&&_[0],R=_&&_[1];b[w]=R?{regex:P,parser:R}:A.replace(/^\[|\]$/g,"")}return function(O){for(var N={},M=0,L=0;M<S;M+=1){var F=b[M];if(typeof F=="string")L+=F.length;else{var $=F.regex,D=F.parser,k=O.slice(L),U=$.exec(k)[0];D.call(N,U),O=O.replace(U,"")}}return function(H){var V=H.afternoon;if(V!==void 0){var q=H.hours;V?q<12&&(H.hours+=12):q===12&&(H.hours=0),delete H.afternoon}}(N),N}}return function(m,y,v){v.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(l=m.parseTwoDigitYear);var b=y.prototype,S=b.parse;b.parse=function(w){var A=w.date,_=w.utc,P=w.args;this.$u=_;var R=P[1];if(typeof R=="string"){var O=P[2]===!0,N=P[3]===!0,M=O||N,L=P[2];N&&(L=P[2]),a=this.$locale(),!O&&L&&(a=v.Ls[L]),this.$d=function(k,U,H){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*k);var V=p(U)(k),q=V.year,J=V.month,Q=V.day,se=V.hours,oe=V.minutes,ie=V.seconds,ee=V.milliseconds,re=V.zone,fe=new Date,we=Q||(q||J?1:fe.getDate()),xe=q||fe.getFullYear(),ve=0;q&&!J||(ve=J>0?J-1:fe.getMonth());var Re=se||0,pe=oe||0,Be=ie||0,ke=ee||0;return re?new Date(Date.UTC(xe,ve,we,Re,pe,Be,ke+60*re.offset*1e3)):H?new Date(Date.UTC(xe,ve,we,Re,pe,Be,ke)):new Date(xe,ve,we,Re,pe,Be,ke)}catch{return new Date("")}}(A,R,_),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),M&&A!=this.format(R)&&(this.$d=new Date("")),a={}}else if(R instanceof Array)for(var F=R.length,$=1;$<=F;$+=1){P[1]=R[$-1];var D=v.apply(this,P);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}$===F&&(this.$d=new Date(""))}else S.call(this,w)}}})})(hCe);var vzt=hCe.exports;const bzt=ud(vzt);var fCe={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ac,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var s=o.prototype,a=s.format;i.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,u=function(d,h){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(f,p,m){var y=m&&m.toUpperCase();return p||h[m]||n[m]||h[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,b,S){return b||S.slice(1)})})}(l,c===void 0?{}:c);return a.call(this,u)}}})})(fCe);var Czt=fCe.exports;const Szt=ud(Czt);var pCe={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ac,function(){return function(n,r,o){r.prototype.isBetween=function(i,s,a,l){var c=o(i),u=o(s),d=(l=l||"()")[0]==="(",h=l[1]===")";return(d?this.isAfter(c,a):!this.isBefore(c,a))&&(h?this.isBefore(u,a):!this.isAfter(u,a))||(d?this.isBefore(c,a):!this.isAfter(c,a))&&(h?this.isAfter(u,a):!this.isBefore(u,a))}}})})(pCe);var Ezt=pCe.exports;const xzt=ud(Ezt);Ti.extend(bzt);Ti.extend(Szt);Ti.extend(xzt);const wzt=Zhe(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),Azt={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Tzt={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},mU=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(` 719`),Qne=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(` 720`),_zt=(t,e)=>e?(...n)=>t(...n).locale(e):t;class Izt{constructor({locale:e,formats:n,instance:r}={}){var o;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=Azt,this.setLocaleToValue=i=>{const s=this.getCurrentLocaleCode();return s===i.locale()?i:i.locale(s)},this.hasUTCPlugin=()=>typeof Ti.utc<"u",this.hasTimezonePlugin=()=>typeof Ti.tz<"u",this.isSame=(i,s,a)=>{const l=this.setTimezone(s,this.getTimezone(i));return i.format(a)===l.format(a)},this.cleanTimezone=i=>{switch(i){case"default":return;case"system":return Ti.tz.guess();default:return i}},this.createSystemDate=i=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(i);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const s=Ti.tz.guess();return s!=="UTC"?Ti.tz(i,s):Ti(i)}return Ti(i)},this.createUTCDate=i=>{if(!this.hasUTCPlugin())throw new Error(mU);return Ti.utc(i)},this.createTZDate=(i,s)=>{if(!this.hasUTCPlugin())throw new Error(mU);if(!this.hasTimezonePlugin())throw new Error(Qne);const a=i!==void 0&&!i.endsWith("Z");return Ti(i).tz(this.cleanTimezone(s),a)},this.getLocaleFormats=()=>{const i=Ti.Ls,s=this.locale||"en";let a=i[s];return a===void 0&&(wzt(),a=i.en),a.formats},this.adjustOffset=i=>{if(!this.hasTimezonePlugin())return i;const s=this.getTimezone(i);if(s!=="UTC"){var a,l;const c=i.tz(this.cleanTimezone(s),!0);if(((a=c.$offset)!=null?a:0)===((l=i.$offset)!=null?l:0))return i;i.$offset=c.$offset}return i},this.date=i=>i===null?null:this.dayjs(i),this.dateWithTimezone=(i,s)=>{if(i===null)return null;let a;return s==="UTC"?a=this.createUTCDate(i):s==="system"||s==="default"&&!this.hasTimezonePlugin()?a=this.createSystemDate(i):a=this.createTZDate(i,s),this.locale===void 0?a:a.locale(this.locale)},this.getTimezone=i=>{if(this.hasTimezonePlugin()){var s;const a=(s=i.$x)==null?void 0:s.$timezone;if(a)return a}return this.hasUTCPlugin()&&i.isUTC()?"UTC":"system"},this.setTimezone=(i,s)=>{if(this.getTimezone(i)===s)return i;if(s==="UTC"){if(!this.hasUTCPlugin())throw new Error(mU);return i.utc()}if(s==="system")return i.local();
720if(!this.hasTimezonePlugin()){if(s==="default")return i;throw new Error(Qne)}return Ti.tz(i,this.cleanTimezone(s))},this.toJsDate=i=>i.toDate(),this.parseISO=i=>this.dayjs(i),this.toISO=i=>i.toISOString(),this.parse=(i,s)=>i===""?null:this.dayjs(i,s,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=i=>{const s=this.getLocaleFormats(),a=l=>l.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(c,u,d)=>u||d.slice(1));return i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(l,c,u)=>{const d=u&&u.toUpperCase();return c||s[u]||a(s[d])})},this.getFormatHelperText=i=>this.expandFormat(i).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=i=>i===null,this.isValid=i=>this.dayjs(i).isValid(),this.format=(i,s)=>this.formatByString(i,this.formats[s]),this.formatByString=(i,s)=>this.dayjs(i).format(s),this.formatNumber=i=>i,this.getDiff=(i,s,a)=>i.diff(s,a),this.isEqual=(i,s)=>i===null&&s===null?!0:this.dayjs(i).toDate().getTime()===this.dayjs(s).toDate().getTime(),this.isSameYear=(i,s)=>this.isSame(i,s,"YYYY"),this.isSameMonth=(i,s)=>this.isSame(i,s,"YYYY-MM"),this.isSameDay=(i,s)=>this.isSame(i,s,"YYYY-MM-DD"),this.isSameHour=(i,s)=>i.isSame(s,"hour"),this.isAfter=(i,s)=>i>s,this.isAfterYear=(i,s)=>this.hasUTCPlugin()?!this.isSameYear(i,s)&&i.utc()>s.utc():i.isAfter(s,"year"),this.isAfterDay=(i,s)=>this.hasUTCPlugin()?!this.isSameDay(i,s)&&i.utc()>s.utc():i.isAfter(s,"day"),this.isBefore=(i,s)=>i<s,this.isBeforeYear=(i,s)=>this.hasUTCPlugin()?!this.isSameYear(i,s)&&i.utc()<s.utc():i.isBefore(s,"year"),this.isBeforeDay=(i,s)=>this.hasUTCPlugin()?!this.isSameDay(i,s)&&i.utc()<s.utc():i.isBefore(s,"day"),this.isWithinRange=(i,[s,a])=>i>=s&&i<=a,this.startOfYear=i=>this.adjustOffset(i.startOf("year")),this.startOfMonth=i=>this.adjustOffset(i.startOf("month")),this.startOfWeek=i=>this.adjustOffset(i.startOf("week")),this.startOfDay=i=>this.adjustOffset(i.startOf("day")),this.endOfYear=i=>this.adjustOffset(i.endOf("year")),this.endOfMonth=i=>this.adjustOffset(i.endOf("month")),this.endOfWeek=i=>this.adjustOffset(i.endOf("week")),this.endOfDay=i=>this.adjustOffset(i.endOf("day")),this.addYears=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"year"):i.add(s,"year")),this.addMonths=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"month"):i.add(s,"month")),this.addWeeks=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"week"):i.add(s,"week")),this.addDays=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"day"):i.add(s,"day")),this.addHours=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"hour"):i.add(s,"hour")),this.addMinutes=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"minute"):i.add(s,"minute")),this.addSeconds=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"second"):i.add(s,"second")),this.getYear=i=>i.year(),this.getMonth=i=>i.month(),this.getDate=i=>i.date(),this.getHours=i=>i.hour(),this.getMinutes=i=>i.minute(),this.getSeconds=i=>i.second(),this.getMilliseconds=i=>i.millisecond(),this.setYear=(i,s)=>this.adjustOffset(i.set("year",s)),this.setMonth=(i,s)=>this.adjustOffset(i.set("month",s)),this.setDate=(i,s)=>this.adjustOffset(i.set("date",s)),this.setHours=(i,s)=>this.adjustOffset(i.set("hour",s)),this.setMinutes=(i,s)=>this.adjustOffset(i.set("minute",s)),this.setSeconds=(i,s)=>this.adjustOffset(i.set("second",s)),this.setMilliseconds=(i,s)=>this.adjustOffset(i.set("millisecond",s)),this.getDaysInMonth=i=>i.daysInMonth(),this.getNextMonth=i=>this.addMonths(i,1),this.getPreviousMonth=i=>this.addMonths(i,-1),this.getMonthArray=i=>{const a=[i.startOf("year")];for(;a.length<12;){const l=a[a.length-1];a.push(this.addMonths(l,1))}return a},this.mergeDateAndTime=(i,s)=>i.hour(s.hour()).minute(s.minute()).second(s.second()),this.getWeekdays=()=>{const i=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(s=>this.formatByString(this.addDays(i,s),"dd"))},this.getWeekArray=i=>{const s=this.setLocaleToValue(i),a=s.startOf("month").startOf("week"),l=s.endOf("month").endOf("week");let c=0,u=a;const d=[];for(;u<l;){const h=Math.floor(c/7);d[h]=d[h]||[],d[h].push(u),u=this.addDays(u,1),c+=1}return d},this.getWeekNumber=i=>i.week(),this.getYearRange=(i,s)=>{const a=i.startOf("year"),l=s.endOf("year"),c=[];let u=a;for(;u<l;)c.push(u),u=this.addYears(u,1);return c},this.getMeridiemText=i=>i==="am"?"AM":"PM",this.rawDayJsInstance=r,this.dayjs=_zt((o=this.rawDayJsInstance)!=null?o:Ti,e),this.locale=e,this.formats=X({},Tzt,n),Ti.extend(yzt)}}const Pzt=()=>{const t=Za();return K(le,{sx:{p:1,width:"100%",backgroundColor:tt,display:"flex",justifyContent:"space-between",alignItems:"center",height:"45px"},children:[g(due,{isUserLoggedIn:!1}),g(le,{sx:{display:"flex",alignItems:"center",height:"50px",justifyContent:"flex-end"},children:g(rn,{title:"Go to Log in page",placement:"bottom",children:g(Sn,{variant:"contained",onClick:()=>{t(un.login.path)},startIcon:g(IW,{}),sx:{backgroundColor:"#d35400",color:"#fff",mx:2,fontWeight:600,textTransform:"none",borderRadius:"8px",width:"120px","&:hover":{backgroundColor:"#e67e22",transform:"translateY(-1px)",boxShadow:"0 4px 12px rgba(211, 84, 0, 0.3)"},transition:"all 0.3s ease"},children:"Log In"})})})]})},Rzt=()=>{const t=Za();return K(le,{sx:{position:"relative",minHeight:"100vh",backgroundColor:"#0a0a0a",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(le,{sx:{position:"absolute",inset:0,zIndex:0},children:K("svg",{width:"100%",height:"100%",viewBox:"0 0 1200 800",preserveAspectRatio:"xMidYMid slice",children:[g("defs",{children:K("linearGradient",{id:"glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[g("stop",{offset:"0%",stopColor:"#ff6b35"}),g("stop",{offset:"100%",stopColor:"#ffd166"})]})}),K("path",{d:"M100 400 L300 400 L300 200 L500 200 L500 600 L700 600 L700 300 L900 300 L900 500 L1100 500",fill:"none",stroke:"url
720(#glow)",strokeWidth:"2",strokeDasharray:"1000",strokeDashoffset:"1000",children:[g("animate",{attributeName:"stroke-dashoffset",from:"1000",to:"0",dur:"4s",repeatCount:"indefinite"}),g("animate",{attributeName:"opacity",values:"1;0.3;1",dur:"2s",repeatCount:"indefinite"})]})]})}),K(le,{sx:{zIndex:1,textAlign:"center",maxWidth:"1000px"},children:[g(Ke,{variant:"h1",sx:{fontWeight:"bold",mb:2,background:"linear-gradient(to right, #ffffff, #ffcc80)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Simplify your Interconnect design"}),g(Ke,{variant:"h6",sx:{mb:4,color:"#ccc"},children:` 721 Your Network-on-Chip (NoC) design doesn't have to be a headache. 722 Weâve automated the development process from architectural exploration to RTL 723 in an easy-to-use, flexible and secure cloud-based platform. 724 `}),g(Sn,{variant:"contained",onClick:()=>t(un.requestAccess.path),sx:{width:"200px",backgroundColor:"#d35400",fontWeight:600,borderRadius:"8px",minHeight:"48px","&:hover":{backgroundColor:"#e67e22",transform:"translateY(-1px)",boxShadow:"0 4px 12px rgba(211, 84, 0, 0.3)"},transition:"all 0.3s ease"},children:"Get Started"})]})]})};var f9={},Ozt=hr;
724Object.defineProperty(f9,"__esModule",{value:!0});var gCe=f9.default=void 0;Dzt(C);var Nzt=Ozt(yr()),Mzt=vr;function mCe(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(mCe=function(r){return r?n:e})(t)}function Dzt(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=mCe(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}gCe=f9.default=(0,Nzt.default)((0,Mzt.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"}),"X");var p9={},Lzt=hr;Object.defineProperty(p9,"__esModule",{value:!0});var yCe=p9.default=void 0;Bzt(C);var kzt=Lzt(yr()),Fzt=vr;function vCe(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(vCe=function(r){return r?n:e})(t)}function Bzt(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=vCe(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}yCe=p9.default=(0,kzt.default)((0,Fzt.jsx)("path",{d:"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z"}),"LinkedIn");var g9={},$zt=hr;
724Object.defineProperty(g9,"__esModule",{value:!0});var bCe=g9.default=void 0;zzt(C);var Hzt=$zt(yr()),Uzt=vr;function CCe(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(CCe=function(r){return r?n:e})(t)}function zzt(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=CCe(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}bCe=g9.default=(0,Hzt.default)((0,Uzt.jsx)("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"}),"Facebook");const Vzt="/assets/signatureIp-logo_white-a49c2de9.png",Gzt=()=>{const t="Contact Us",e={facebook:"https://www.facebook.com/people/SIgnature-IP/100090804705100/",x:"https://x.com/SignatureIp",linkedin:"https://www.linkedin.com/company/signature-ip-corporation/",signatureip:"https://signatureip.ai",contactus:"https://signatureip.ai/contact"},n="© 2025 Signature IP - Inoculator. All rights reserved.";return K(le,{component:"footer",sx:{position:"absolute",bottom:0,width:"100%",backgroundColor:tt,pt:2},children:[K(mi,{container:!0,spacing:2,alignItems:"center",sx:{px:{xs:3,sm:6}},children:[g(mi,{item:!0,xs:12,sm:4,textAlign:{xs:"center",sm:"left"},children:g(o4,{href:e.signatureip,underline:"none",target:"_blank",children:g(le,{component:"img",src:Vzt,alt:"Signature IP Logo",sx:{height:40,maxWidth:"180"}})})}),K(mi,{item:!0,xs:12,sm:4,textAlign:"center",children:[g(Qo,{icon:g(gCe,{}),onClick:()=>window.open(e.x,"_blank"),sx:{color:"#fff",mx:1,"&:hover":{color:"#1DA1F2"}}}),g(Qo,{icon:g(yCe,{}),onClick:()=>window.open(e.linkedin,"_blank"),sx:{color:"#fff",mx:1,"&:hover":{color:"#0077B5"}}}),g(Qo,{icon:g(bCe,{}),onClick:()=>window.open(e.facebook,"_blank"),sx:{color:"#fff",mx:1,"&:hover":{color:"#1877F2"}}})]}),g(mi,{item:!0,xs:12,sm:4,textAlign:{xs:"center",sm:"right"},children:g(o4,{href:e.contactus,underline:"hover",target:"_blank",sx:{color:"#fff",fontWeight:500,"&:hover":{color:"#1DA1F2"}},children:t})})]}),g(le,{sx:{borderTop:"1px solid rgba(255,255,255,0.1)",mt:2,pt:2,pb:2,backgroundColor:tt},children:g(Ke,{variant:"body2",align:"center",sx:{color:"#888"},children:n})})]})},Wzt=()=>K(le,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[g(Pzt,{}),g(Rzt,{}),g(Gzt,{})]});var nI={};nI.d=(t,e)=>{for(var n in e)nI.o(e,n)&&!nI.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})};nI.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var er=globalThis.pdfjsLib={};nI.d(er,{AbortException:()=>bS,AnnotationEditorLayer:()=>Bg,AnnotationEditorParamsType:()=>sr,AnnotationEditorType:()=>eo,AnnotationEditorUIManager:()=>i0,AnnotationLayer:()=>VGt,AnnotationMode:()=>Ky,CMapCompressionType:()=>Gz,ColorPicker:()=>fp,DOMSVGFactory:()=>v9,DrawLayer:()=>Vl,FeatureTest:()=>pu,GlobalWorkerOptions:()=>kP,ImageKind:()=>xD,InvalidPDFException:()=>ECe,MissingPDFException:()=>vS,OPS:()=>Jh,Outliner:()=>Zz,PDFDataRangeTransport:()=>$Ce,PDFDateString:()=>ICe,PDFWorker:()=>eh,PasswordResponses:()=>Xzt,PermissionFlag:()=>Yzt,PixelsPerInch:()=>Bx,RenderingCancelledException:()=>b9,TextLayer:()=>tk,UnexpectedResponseException:()=>ZB,Util:()=>On,VerbosityLevel:()=>XB,XfaLayer:()=>UCe,build:()=>xGt,createValidAbsoluteUrl:()=>Jzt,fetchData:()=>o$,getDocument:()=>pGt,getFilenameFromUrl:()=>cVt,getPdfFilenameFromUrl:()=>uVt,getXfaPageViewport:()=>dVt,isDataScheme:()=>C9,isPdfFile:()=>S9,noContextMenu:()=>Eu,normalizeUnicode:()=>iVt,renderTextLayer:()=>iGt,setLayerDimensions:()=>WC,shadow:()=>oo,updateTextLayer:()=>sGt,version:()=>EGt});const Jl=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),SCe=[1,0,0,1,0,0],Vz=[.001,0,0,.001,0,0],jzt=1e7,yU=1.35,Kd={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OP
724LIST:256},Ky={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},qzt="pdfjs_internal_editor_",eo={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},sr={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},Yzt={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},zl={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},xD={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},ca={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},PT={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},XB={ERRORS:0,WARNINGS:1,INFOS:5},Gz={NONE:0,BINARY:1},Jh={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},Xzt={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let KB=XB.WARNINGS;function Kzt(t){Number.isInteger(t)&&(KB=t)}function Qzt(){return KB}function QB(t){KB>=XB.INFOS&&console.log(`Info: ${t}`)}function Fr(t){KB>=XB.WARNINGS&&console.log(`Warning: ${t}`)}function Go(t){throw new Error(t)}function va(t,e){t||Go(e)}function Zzt(t){switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Jzt(t,e=null,n=null){if(!t)return null;try{if(n&&typeof t=="string"&&(n.addDefaultProtocol&&t.startsWith("www.")&&t.match(/\./g)?.length>=2&&(t=`http://${t}`),n.tryConvertEncoding))try{t=oVt(t)}catch{}const r=e?new URL(t,e):new URL(t);if(Zzt(r))return r}catch{}return null}function oo(t,e,n,r=!1){return Object.defineProperty(t,e,{value:n,enumerable:!r,configurable:!0,writable:!1}),n}const D0=function(){function e(n,r){this.constructor===e&&Go("Cannot initialize BaseException."),this.message=n,this.name=r}return e.prototype=new Error,e.constructor=e,e}();class Wz extends D0{constructor(e,n){super(e,"PasswordException"),this.code=n}}class jz extends D0{constructor(e,n){super(e,"UnknownErrorException"),this.details=n}}class ECe extends D0{constructor(e){super(e,"InvalidPDFException")}}class vS extends D0{constructor(e){super(e,"MissingPDFException")}}class ZB extends D0{constructor(e,n){super(e,"UnexpectedResponseException"),this.status=n}}class eVt extends D0{constructor(e){super(e,"FormatError")}}class bS extends D0{constructor(e){super(e,"AbortException")}}function xCe(t){(typeof t!="object"||t?.length===void 0)&&Go("Invalid argument for bytesToString");const e=t.length,n=8192;if(e<n)return String.fromCharCode.apply(null,t);const r=[];for(let o=0;o<e;o+=n){const i=Math.min(o+n,e),s=t.subarray(o,i);r.push(String.fromCharCode.apply(null,s))}return r.join("")}function JB(t){typeof t!="string"&&Go("Invalid argument for stringToBytes");const e=t.length,n=new Uint8Array(e);for(let r=0;r<e;++r)n[r]=t.charCodeAt(r)&255;return n}function tVt(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,t&255)}function m9(t){const e=Object.create(null);for(const[n,r]of t)e[n]=r;return e}function nVt(){const t=new Uint8Array(4);return t[0]=1,new Uint32Array(t.buffer,0,1)[0]===1}function rVt(){try{return new Function(""),!0}catch{return!1}}class pu{static get isLittleEndian(){return oo(this,"isLittleEndian",nVt())}static get isEvalSupported(){return oo(this,"isEvalSupported",rVt())}static get isOffscreenCanvasSupported(){return oo(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof navigator?.platform=="string"?oo(this,"platform",{isMac:navigator.platform.includes("Mac")}):oo(this,"platform",{isMac:!1})}static get isCSSRoundSupported(){return oo(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const vU=Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0"));class On{static makeHexColor(e,n,r){return`#${vU[e]}${vU[n]}${vU[r]}`}static scaleMinMax(e,n){let r;e[0]?(e[0]<0&&(r=n[0],n[0]=n[2],n[2]=r),n[0]*=e[0],n[2]*=e[0],e[3]<0&&(r=n[1],n[1]=n[3],n[3]=r),n[1]*=e[3],n[3]*=e[3]):(r=n[0],n[0]=n[1],n[1]=r,r=n[2],n[2]=n[3],n[3]=r,e[1]<0&&(r=n[1],n[1]=n[3],n[3]=r),n[1]*=e[1],n[3]*=e[1],e[2]<0&&(r=n[0],n[0]=n[2],n[2]=r),n[0]*=e[2],n[2]*=e[2]),n[0]+=e[4],n[1]+=e[5],n[2]+=e[4],n[3]+=e[5]}static transform(e,n){return[e[0]*n[0]+e[2]*n[1],e[1]*n[0]+e[3]*n[1],e[0]*n[2]+e[2]*n[3],e[1]*n[2]+e[3]*n[3],e[0]*n[4]+e[2]*n[5]+e[4],e[1]*n[4]+e[3]*n[5]+e[5]]}static applyTransform(e,n){const r=e[0]*n[0]+e[1]*n[2]+n[4],o=e[0]*n[1]+e[1]*n[3]+n[5];return[r,o]}static applyInverseTransform(e,n){const r=n[0]*n[3]-n[1]*n[2],o=(e[0]*n[3]-e[1]*n[2]+n[2]*n[5]-n[4]*n[3])/r,i=(-e[0]*n[1]+e[1]*n[0]+n[4]*n[1]-n[5]*n[0])/r;return[o,i]}static getAxialAlignedBoundingBox(e,n){const r=this.applyTransform(e,n),o=this.applyTransform(e.slice(2,4),n),i=this.applyTransform([e[0],e[3]],n),s=this.applyTransform([e[2],e[1]],n);return[Math.min(r[0],o[0],i[0],s[0]),Math.min(r[1],o[1],i[1],s[1]),Math.max(r[0],o[0],i[0],s[0]),Math.max(r[1],o[1],i[1],s[1])]}static inverseTransform(e){const n=e[0]*e[3]-e[1]*e[2];return[e[3]/n,-e[1]/n,-e[2]/n,e[0]/n,(e[2]*e[5]-e[4]*e[3])/n,(e[4]*e[1]-e[5]*e[0])/n]}static singularValueDecompose2dScale(e){const n=[e[0],e[2],e[1],e[3]],r=e[0]*n[0]+e[1]*n[2],o=e[0]*n[1]+e[1]*n[3],i=e[2]*n[0]+e[3]*n[2],s=e[2]*n[1]+e[3]*n[3],a=(r+s)/2,l=Math.sqrt((r+s)**2-4*(r*s-i*o))/2,c=a+l||1,u=a-l||1;return[Math.sqrt(c),Math.sqrt(u)]}static normalizeRect(e){const n=e.slice(0);return e[0]>e[2]&&(n[0]=e[2],n[2]=e[0]),e[1]>e[3]&&(n[1]=e[3],n[3]=e[1]),n}static intersect(e,n){const r=Math.max(Math.min(e[0],e[2]),Math.min(n[0],n[2])),o=Math.min(Math.max(e[0],e[2]),Math.max(n[0],n[2]));if(r>o)return null;const i=Math.max(Math.min(e[1],e[3]),Math.min(n[1],n[3])),s=Math.min(Math.max(e[1],e[3]),Math.max(n[1],n[3]));return i>s?null:[r,i,o,s]}static#e(e,n,r,o,i,s,a,l,c,u){if(c<=0||c>=1)return;const d=1-c,h=c*c,f=h*c,p=d*(d*(d*e+3*c*n)+3*h*r)+f*o,m=d*(d*(d*i+3*c*s)+3*h*a)+f*l;u[0]=Math.min(u[0],p),u[1]=Math.min(u[1],m),u[2]=Math.max(u[2],p),u[3]=Math.max(u[3],m)}static#t(e,n,r,o,i,s,a,l,c,u,d,h){if(Math.abs(c)<1e-12){Math.abs(u)>=1e-12&&this.#e(e,n,r,o,i,s,a,l,-d/u,h);return}const f=u**2-4*d*c;if(f<0)return;const p=Math.sqrt(f),m=2*c;this.#e(e,n,r,o,i,s,a,l,(-u+p)/m,h),this.#e(e,n,r,o,i,s,a,l,(-u-p)/m,h)}static bezierBoundingBox(e,n,r,o,i,s,a,l,c){return c?(c[0]=Math.min(c[0],e,a),c[1]=Math.min(c[1],n,l),c[2]=Math.max(c[2],e,a),c[3]=Math.max(c[3],n,l)):c=[Math.min(e,a),Math.min(n,l),Math.max(e,a),Math.max(n,l)],this.#t(e,r,i,a,n,o,s,l,3*(-e+3*(r-i)+a),6*(e-2*r+i),3*(r-e),c),this.#t(e,r,i,a,n,o,s,l,3*(-n+3*(o-s)+l),6*(n-2*o+s),3*(o-n),c),c}}function oVt(t){return decodeURIComponent(escape(t))}let bU=null,Zne=null;function iVt(t){return bU||(bU=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Zne=new Map([["ï¬
","ſt"]])),t.replaceAll(bU,(e,n,r)=>n?n.normalize("NFKC"):Zne.get(r))}function sVt(){if(typeof crypto<"u"&&typeof crypto?.randomUUID=="function")return crypto.randomUUID();const t=new Uint8Array(32);if(typeof crypto<"u"&&typeof crypto?.getRandomValues=="function")crypto.getRandomValues(t);else for(let e=0;e<32;e++)t[e]=Math.floor(Math.random()*255);return xCe(t)}const wCe="pdfjs_internal_id_",_g={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};class e${constructor(){this.constructor===e$&&Go("Cannot initialize BaseFilterFactory.")}addFilter(e){return"none"}addHCMFilter(e,n){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,n,r,o,i){return"none"}destroy(e=!1){}}class t${constructor(){this.constructor===t$&&Go("Cannot initialize BaseCanvasFactory.")}create(e,n){if(e<=0||n<=0)throw new Error("Invalid canvas size");const r=this._createCanvas(e,n);return{canvas:r,context:r.getContext("2d")}}reset(e,n,r){if(!e.canvas)throw new Error("Canvas is not specified");if(n<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=n,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,n){Go("Abstract method `_createCanvas` called.")}}class n${constructor({baseUrl:e=null,isCompressed:n=!0}){this.constructor===n$&&Go("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=n}async fetch({name:e}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const n=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?Gz.BINARY:Gz.NONE;return this._fetchData(n,r).catch(o=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${n}`)})}_fetchData(e,n){Go("Abstract method `_fetchData` called.")}}class r${constructor({baseUrl:e=null}){this.constructor===r$&&Go("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const n=`${this.baseUrl}${e}`;return this._fetchData(n).catch(r=>{throw new Error(`Unable to load font data at: ${n}`)})}_fetchData(e){Go("Abstract method `_fetchData` called.")}}class y9{constructor(){this.constructor===y9&&Go("Cannot initialize BaseSVGFactory.")}create(e,n,r=!1){if(e<=0||n<=0)throw new Error("Invalid SVG dimensions");const o=this._createSVG("svg:svg");return o.setAttribute("version","1.1"),r||(o.setAttribute("width",`${e}px`),o.setAttribute("height",`${n}px`)),o.setAttribute("preserveAspectRatio","none"),o.setAttribute("viewBox",`0 0 ${e} ${n}`),o}createElement(e){if(typeof e!="string")throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){Go("Abstract method `_createSVG` called.")}}const Dg="http://www.w3.org/2000/svg";class Bx{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}class aVt extends e${#e;#t;#n;#o;#s;#r=0;constructor({docId:e,ownerDocument:n=globalThis.document}={}){super(),this.#n=e,this.#o=n}get#i(){return this.#e||=new Map}get#c(){return this.#s||=new Map}get#l(){if(!this.#t){const e=this.#o.createElement("div"),{style:n}=e;n.visibility="hidden",n.contain="strict",n.width=n.height=0,n.position="absolute",n.top=n.left=0,n.zIndex=-1;const r=this.#o.createElementNS(Dg,"svg");r.setAttribute("width",0),r.setAttribute("height",0),this.#t=this.#o.createElementNS(Dg,"defs"),e.append(r),r.append(this.#t),this.#o.body.append(e)}return this.#t}#d(e){if(e.length===1){const l=e[0],c=new Array(256);for(let d=0;d<256;d++)c[d]=l[d]/255;const u=c.join(",");return[u,u,u]}const[n,r,o]=e,i=new Array(256),s=new Array(256),a=new Array(256);for(let l=0;l<256;l++)i[l]=n[l]/255,s[l]=r[l]/255,a[l]=o[l]/255;return[i.join(","),s.join(","),a.join(",")]}addFilter(e){if(!e)return"none";let n=this.#i.get(e);if(n)return n;const[r,o,i]=this.#d(e),s=e.length===1?r:`${r}${o}${i}`;if(n=this.#i.get(s),n)return this.#i.set(e,n),n;const a=`g_${this.#n}_transfer_map_${this.#r++}`,l=`url(#${a})`;this.#i.set(e,l),this.#i.set(s,l);const c=this.#a(a);return this.#g(r,o,i,c),l}addHCMFilter(e,n){const r=`${e}-${n}`,o="base";let i=this.#c.get(o);if(i?.key===r||(i?(i.filter?.remove(),i.key=r,i.url="none",i.filter=null):(i={key:r,url:"none",filter:null},this.#c.set(o,i)),!e||!n))return i.url;const s=this.#v(e);e=On.makeHexColor(...s);const a=this.#v(n);if(n=On.makeHexColor(...a),this.#l.style.color="",e==="#000000"&&n==="#ffffff"||e===n)return i.url;const l=new Array(256);for(let f=0;f<=255;f++){const p=f/255;l[f]=p<=.03928?p/12.92:((p+.055)/1.055)**2.4}const c=l.join(","),u=`g_${this.#n}_hcm_filter`,d=i.filter=this.#a(u);this.#g(c,c,c,d),this.#u(d);const h=(f,p)=>{const m=s[f]/255,y=a[f]/255,v=new Array(p+1);for(let b=0;b<=p;b++)v[b]=m+b/p*(y-m);return v.join(",")};return this.#g(h(0,5),h(1,5),h(2,5),d),i.url=`url(#${u})`,i.url}addAlphaFilter(e){let n=this.#i.get(e);if(n)return n;const[r]=this.#d([e]),o=`alpha_${r}`;if(n=this.#i.get(o),n)return this.#i.set(e,n),n;const i=`g_${this.#n}_alpha_map_${this.#r++}`,s=`url(#${i})`;this.#i.set(e,s),this.#i.set(o,s);const a=this.#a(i);return this.#h(r,a),s}addLuminosityFilter(e){let n=this.#i.get(e||"luminosity");if(n)return n;let r,o;if(e?([r]=this.#d([e]),o=`luminosity_${r}`):o="luminosity",n=this.#i.get(o),n)return this.#i.set(e,n),n;const i=`g_${this.#n}_luminosity_map_${this.#r++}`,s=`url(#${i})`;this.#i.set(e,s),this.#i.set(o,s);const a=this.#a(i);return this.#f(a),e&&this.#h(r,a),s}addHighlightHCMFilter(e,n,r,o,i){const s=`${n}-${r}-${o}-${i}`;let a=this.#c.get(e);if(a?.key===s||(a?(a.filter?.remove(),a.key=s,a.url="none",a.filter=null):(a={key:s,url:"none",filter:null},this.#c.set(e,a)),!n||!r))return a.url;const[l,c]=[n,r].map(this.#v.bind(this));let u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),d=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[h,f]=[o,i].map(this.#v.bind(this));d<u&&([u,d,h,f]=[d,u,f,h]),this.#l.style.color="";const p=(v,b,S)=>{const w=new Array(256),A=(d-u)/S,_=v/255,P=(b-v)/(255*S);let R=0;for(let O=0;O<=S;O++){const N=Math.round(u+O*A),M=_+O*P;for(let L=R;L<=N;L++)w[L]=M;R=N+1}for(let O=R;O<256;O++)w[O]=w[R-1];return w.join(",")},m=`g_${this.#n}_hcm_${e}_filter`,y=a.filter=this.#a(m);return this.#u(y),this.#g(p(h[0],f[0],5),p(h[1],f[1],5),p(h[2],f[2],5),y),a.url=`url(#${m})`,a.url}destroy(e=!1){e&&this.#c.size!==0||(this.#t&&(this.#t.parentNode.parentNode.remove(),this.#t=null),this.#e&&(this.#e.clear(),this.#e=null),this.#r=0)}#f(e){const n=this.#o.createElementNS(Dg,"feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.a
724ppend(n)}#u(e){const n=this.#o.createElementNS(Dg,"feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(n)}#a(e){const n=this.#o.createElementNS(Dg,"filter");return n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("id",e),this.#l.append(n),n}#p(e,n,r){const o=this.#o.createElementNS(Dg,n);o.setAttribute("type","discrete"),o.setAttribute("tableValues",r),e.append(o)}#g(e,n,r,o){const i=this.#o.createElementNS(Dg,"feComponentTransfer");o.append(i),this.#p(i,"feFuncR",e),this.#p(i,"feFuncG",n),this.#p(i,"feFuncB",r)}#h(e,n){const r=this.#o.createElementNS(Dg,"feComponentTransfer");n.append(r),this.#p(r,"feFuncA",e)}#v(e){return this.#l.style.color=e,E9(getComputedStyle(this.#l).getPropertyValue("color"))}}class lVt extends t${constructor({ownerDocument:e=globalThis.document}={}){super(),this._document=e}_createCanvas(e,n){const r=this._document.createElement("canvas");return r.width=e,r.height=n,r}}async function o$(t,e="text"){if(u_(t,document.baseURI)){const n=await fetch(t);if(!n.ok)throw new Error(n.statusText);switch(e){case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"json":return n.json()}return n.text()}return new Promise((n,r)=>{const o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType=e,o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE){if(o.status===200||o.status===0){switch(e){case"arraybuffer":case"blob":case"json":n(o.response);return}n(o.responseText);return}r(new Error(o.statusText))}},o.send(null)})}class ACe extends n${_fetchData(e,n){return o$(e,this.isCompressed?"arraybuffer":"text").then(r=>({cMapData:r instanceof ArrayBuffer?new Uint8Array(r):JB(r),compressionType:n}))}}class TCe extends r${_fetchData(e){return o$(e,"arraybuffer").then(n=>new Uint8Array(n))}}class v9 extends y9{_createSVG(e){return document.createElementNS(Dg,e)}}class JR{constructor({viewBox:e,scale:n,rotation:r,offsetX:o=0,offsetY:i=0,dontFlip:s=!1}){this.viewBox=e,this.scale=n,this.rotation=r,this.offsetX=o,this.offsetY=i;const a=(e[2]+e[0])/2,l=(e[3]+e[1])/2;let c,u,d,h;switch(r%=360,r<0&&(r+=360),r){case 180:c=-1,u=0,d=0,h=1;break;case 90:c=0,u=1,d=1,h=0;break;case 270:c=0,u=-1,d=-1,h=0;break;case 0:c=1,u=0,d=0,h=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(d=-d,h=-h);let f,p,m,y;c===0?(f=Math.abs(l-e[1])*n+o,p=Math.abs(a-e[0])*n+i,m=(e[3]-e[1])*n,y=(e[2]-e[0])*n):(f=Math.abs(a-e[0])*n+o,p=Math.abs(l-e[1])*n+i,m=(e[2]-e[0])*n,y=(e[3]-e[1])*n),this.transform=[c*n,u*n,d*n,h*n,f-c*n*a-d*n*l,p-u*n*a-h*n*l],this.width=m,this.height=y}get rawDims(){const{viewBox:e}=this;return oo(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:n=this.rotation,offsetX:r=this.offsetX,offsetY:o=this.offsetY,dontFlip:i=!1}={}){return new JR({viewBox:this.viewBox.slice(),scale:e,rotation:n,offsetX:r,offsetY:o,dontFlip:i})}convertToViewportPoint(e,n){return On.applyTransform([e,n],this.transform)}convertToViewportRectangle(e){const n=On.applyTransform([e[0],e[1]],this.transform),r=On.applyTransform([e[2],e[3]],this.transform);return[n[0],n[1],r[0],r[1]]}convertToPdfPoint(e,n){return On.applyInverseTransform([e,n],this.transform)}}class b9 extends D0{constructor(e,n=0){super(e,"RenderingCancelledException"),this.extraDelay=n}}function C9(t){const e=t.length;let n=0;for(;n<e&&t[n].trim()==="";)n++;return t.substring(n,n+5).toLowerCase()==="data:"}function S9(t){return typeof t=="string"&&/\.pdf$/i.test(t)}function cVt(t){return[t]=t.split(/[#?]/,1),t.substring(t.lastIndexOf("/")+1)}function uVt(t,e="document.pdf"){if(typeof t!="string")return e;if(C9(t))return Fr('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,o=n.exec(t);let i=r.exec(o[1])||r.exec(o[2])||r.exec(o[3]);if(i&&(i=i[0],i.includes("%")))try{i=r.exec(decodeURIComponent(i))[0]}catch{}return i||e}class Jne{started=Object.create(null);times=[];time(e){e in this.started&&Fr(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||Fr(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let n=0;for(const{name:r}of this.times)n=Math.max(r.length,n);for(const{name:r,start:o,end:i}of this.times)e.push(`${r.padEnd(n)} ${i-o}ms 725`);return e.join("")}}function u_(t,e){try{const{protocol:n}=e?new URL(t,e):new URL(t);return n==="http:"||n==="https:"}catch{return!1}}function Eu(t){t.preventDefault()}function _Ce(t){console.log("Deprecated API usage: "+t)}let ere;class ICe{static toDateObject(e){if(!e||typeof e!="string")return null;ere||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const n=ere.exec(e);if(!n)return null;const r=parseInt(n[1],10);let o=parseInt(n[2],10);o=o>=1&&o<=12?o-1:0;let i=parseInt(n[3],10);i=i>=1&&i<=31?i:1;let s=parseInt(n[4],10);s=s>=0&&s<=23?s:0;let a=parseInt(n[5],10);a=a>=0&&a<=59?a:0;let l=parseInt(n[6],10);l=l>=0&&l<=59?l:0;const c=n[7]||"Z";let u=parseInt(n[8],10);u=u>=0&&u<=23?u:0;let d=parseInt(n[9],10)||0;return d=d>=0&&d<=59?d:0,c==="-"?(s+=u,a+=d):c==="+"&&(s-=u,a-=d),new Date(Date.UTC(r,o,i,s,a,l))}}function dVt(t,{scale:e=1,rotation:n=0}){const{width:r,height:o}=t.attributes.style,i=[0,0,parseInt(r),parseInt(o)];return new JR({viewBox:i,scale:e,rotation:n})}function E9(t){if(t.startsWith("#")){const e=parseInt(t.slice(1),16);return[(e&16711680)>>16,(e&65280)>>8,e&255]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map(e=>parseInt(e)):t.startsWith("rgba(")?t.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(Fr(`Not a valid color format: "${t}"`),[0,0,0])}function hVt(t){const e=document.createElement("span");e.style.visibility="hidden",document.body.append(e);for(const n of t.keys()){e.style.color=n;const r=window.getComputedStyle(e).color;t.set(n,E9(r))}e.remove()}function qi(t){const{a:e,b:n,c:r,d:o,e:i,f:s}=t.getTransform();return[e,n,r,o,i,s]}function Ig(t){const{a:e,b:n,c:r,d:o,e:i,f:s}=t.getTransform().invertSelf();return[e,n,r,o,i,s]}function WC(t,e,n=!1,r=!0){if(e instanceof JR){const{pageWidth:o,pageHeight:i}=e.rawDims,{style:s}=t,a=pu.isCSSRoundSupported,l=`var(--scale-factor) * ${o}px`,c=`var(--scale-factor) * ${i}px`,u=a?`round(${l}, 1px)`:`calc(${l})`,d=a?`round(${c}, 1px)`:`calc(${c})`;!n||e.rotation%180===0?(s.width=u,s.height=d):(s.width=d,s.height=u)}r&&t.setAttribute("data-main-rotation",e.rotation)}class x9{#e=null;#t=null;#n;#o=null;constructor(e){this.#n=e}render(){const e=this.#e=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",Eu),e.addEventListener("pointerdown",x9.#s);const n=this.#o=document.createElement("div");n.className="buttons",e.append(n);const r=this.#n.toolbarPosition;if(r){const{style:o}=e,i=this.#n._uiManager.direction==="ltr"?1-r[0]:r[0];o.insetInlineEnd=`${100*i}%`,o.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return this.#l(),e}static#s(e){e.stopPropagation()}#r(e){this.#n._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()}#i(e){this.#n._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()}#c(e){e.addEventListener("focusin",this.#r.bind(this),{capture:!0}),e.addEventListener("focusout",this.#i.bind(this),{capture:!0}),e.addEventListener("contextmenu",Eu)}hide(){this.#e.classList.add("hidden"),this.#t?.hideDropdown()}show(){this.#e.classList.remove("hidden")}#l(){const e=document.createElement("button");e.className="delete",e.tabIndex=0,e.setAttribute("data-l10n-id",`pdfjs-editor-remove-${this.#n.editorType}-button`),this.#c(e),e.addEventListener("click",n=>{this.#n._uiManager.delete()}),this.#o.append(e)}get#d(){const e=document.createElement("div");return e.className="divider",e}addAltTextButton(e){this.#c(e),this.#o.prepend(e,this.#d)}addColorPicker(e){this.#t=e;const n=e.renderButton();this.#c(n),this.#o.prepend(n,this.#d)}remove(){this.#e.remove(),this.#t?.destroy(),this.#t=null}}class fVt{#e=null;#t=null;#n;constructor(e){this.#n=e}#o(){const e=this.#t=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",Eu);const n=this.#e=document.createElement("div");return n.className="buttons",e.append(n),this.#r(),e}#s(e,n){let r=0,o=0;for(const i of e){const s=i.y+i.height;if(s<r)continue;const a=i.x+(n?i.width:0);if(s>r){o=a,r=s;continue}n?a>o&&(o=a):a<o&&(o=a)}return[n?1-o:o,r]}show(e,n,r){const[o,i]=this.#s(n,r),{style:s}=this.#t||=this.#o();e.append(this.#t),s.insetInlineEnd=`${100*o}%`,s.top=`calc(${100*i}% + var(--editor-toolbar-vert-offset))`}hide(){this.#t.remove()}#r(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const n=document.createElement("span");e.append(n),n.className="visuallyHidden",n.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label"),e.addEventListener("contextmenu",Eu),e.addEventListener("click",()=>{this.#n.highlightSelection("floating_button")}),this.#e.append(e)}}function J2(t,e,n){for(const r of n)e.addEventListener(r,t[r].bind(t))}function pVt(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")}class gVt{#e=0;get id(){return`${qzt}${this.#e++}`}}class w9{#e=sVt();#t=0;#n=null;static get _isSVGFittingCanvas(){const e='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',r=new OffscreenCanvas(1,3).getContext("2d"),o=new Image;o.src=e;const i=o.decode().then(()=>(r.drawImage(o,0,0,1,1,0,0,1,3),new Uint32Array(r.getImageData(0,0,1,1).data.buffer)[0]===0));return oo(this,"_isSVGFittingCanvas",i)}async#o(e,n){this.#n||=new Map;let r=this.#n.get(e);if(r===null)return null;if(r?.bitmap)return r.refCounter+=1,r;try{r||={bitmap:null,id:`image_${this.#e}_${this.#t++}`,refCounter:0,isSvg:!1};let o;if(typeof n=="string"?(r.url=n,o=await o$(n,"blob")):o=r.file=n,o.type==="image/svg+xml"){const i=w9._isSVGFittingCanvas,s=new FileReader,a=new Image,l=new Promise((c,u)=>{a.onload=()=>{r.bitmap=a,r.isSvg=!0,c()},s.onload=async()=>{const d=r.svgUrl=s.result;a.src=await i?`${d}#svgView(preserveAspectRatio(none))`:d},a.onerror=s.onerror=u});s.readAsDataURL(o),await l}else r.bitmap=await createImageBitmap(o);r.refCounter=1}catch(o){console.error(o),r=null}return this.#n.set(e,r),r&&this.#n.set(r.id,r),r}async getFromFile(e){const{lastModified:n,name:r,size:o,type:i}=e;return this.#o(`${n}_${r}_${o}_${i}`,e)}async getFromUrl(e){return this.#o(e,e)}async getFromId(e){this.#n||=new Map;const n=this.#n.get(e);return n?n.bitmap?(n.refCounter+=1,n):n.file?this.getFromFile(n.file):this.getFromUrl(n.url):null}getSvgUrl(e){const n=this.#n.get(e);return n?.isSvg?n.svgUrl:null}deleteId(e){this.#n||=new Map;const n=this.#n.get(e);n&&(n.refCounter-=1,n.refCounter===0&&(n.bitmap=null))}isValidId(e){return e.startsWith(`image_${this.#e}_`)}}class mVt{#e=[];#t=!1;#n;#o=-1;constructor(e=128){this.#n=e}add({cmd:e,undo:n,post:r,mustExec:o,type:i=NaN,overwriteIfSameType:s=!1,keepUndo:a=!1}){if(o&&e(),this.#t)return;const l={cmd:e,undo:n,post:r,type:i};if(this.#o===-1){this.#e.length>0&&(this.#e.length=0),this.#o=0,this.#e.push(l);return}if(s&&this.#e[this.#o].type===i){a&&(l.undo=this.#e[this.#o].undo),this.#e[this.#o]=l;return}const c=this.#o+1;c===this.#n?this.#e.splice(0,1):(this.#o=c,c<this.#e.length&&this.#e.splice(c)),this.#e.push(l)}undo(){if(this.#o===-1)return;this.#t=!0;const{undo:e,post:n}=this.#e[this.#o];e(),n?.(),this.#t=!1,this.#o-=1}redo(){if(this.#o<this.#e.length-1){this.#o+=1,this.#t=!0;const{cmd:e,post:n}=this.#e[this.#o];e(),n?.(),this.#t=!1}}hasSomethingToUndo(){return this.#o!==-1}hasSomethingToRedo(){return this.#o<this.#e.length-1}destroy(){this.#e=null}}class eO{constructor(e){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:n}=pu.platform;for(const[r,o,i={}]of e)for(const s of r){const a=s.startsWith("mac+");n&&a?(this.callbacks.set(s.slice(4),{callback:o,options:i}),this.allKeys.add(s.split("+").at(-1))):!n&&!a&&(this.callbacks.set(s,{callback:o,options:i}),this.allKeys.add(s.split("+").at(-1)))}}#e(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const n=this.buffer.join("+");return this.buffer.length=0,n}
725exec(e,n){if(!this.allKeys.has(n.key))return;const r=this.callbacks.get(this.#e(n));if(!r)return;const{callback:o,options:{bubbles:i=!1,args:s=[],checker:a=null}}=r;a&&!a(e,n)||(o.bind(e,...s,n)(),i||(n.stopPropagation(),n.preventDefault()))}}class A9{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return hVt(e),oo(this,"_colors",e)}convert(e){const n=E9(e);if(!window.matchMedia("(forced-colors: active)").matches)return n;for(const[r,o]of this._colors)if(o.every((i,s)=>i===n[s]))return A9._colorsMapping.get(r);return n}getHexCode(e){const n=this._colors.get(e);return n?On.makeHexColor(...n):e}}class i0{#e=null;#t=new Map;#n=new Map;#o=null;#s=null;#r=null;#i=new mVt;#c=0;#l=new Set;#d=null;#f=null;#u=new Set;#a=!1;#p=null;#g=null;#h=null;#v=!1;#m=null;#b=new gVt;#S=!1;#w=!1;#A=null;#I=null;#T=null;#C=eo.NONE;#y=new Set;#E=null;#x=null;#R=null;#P=this.blur.bind(this);#M=this.focus.bind(this);#O=this.copy.bind(this);#D=this.cut.bind(this);#N=this.paste.bind(this);#L=this.keydown.bind(this);#U=this.keyup.bind(this);#G=this.onEditingAction.bind(this);#W=this.onPageChanging.bind(this);#z=this.onScaleChanging.bind(this);#$=this.#ie.bind(this);#k=this.onRotationChanging.bind(this);#X={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#V=[0,0];#F=null;#H=null;#K=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const e=i0.prototype,n=s=>s.#H.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&s.hasSomethingToControl(),r=(s,{target:a})=>{if(a instanceof HTMLInputElement){const{type:l}=a;return l!=="text"&&l!=="number"}return!0},o=this.TRANSLATE_SMALL,i=this.TRANSLATE_BIG;return oo(this,"_keyboardManager",new eO([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],e.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:r}
725],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(s,{target:a})=>!(a instanceof HTMLButtonElement)&&s.#H.contains(a)&&!s.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(s,{target:a})=>!(a instanceof HTMLButtonElement)&&s.#H.contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-o,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:n}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[o,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:n}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-o],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:n}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,o],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:n}]]))}constructor(e,n,r,o,i,s,a,l,c){this.#H=e,this.#K=n,this.#o=r,this._eventBus=o,this._eventBus._on("editingaction",this.#G),this._eventBus._on("pagechanging",this.#W),this._eventBus._on("scalechanging",this.#z),this._eventBus._on("rotationchanging",this.#k),this.#se(),this.#Z(),this.#s=i.annotationStorage,this.#p=i.filterFactory,this.#x=s,this.#h=a||null,this.#a=l,this.#T=c||null,this.viewParameters={realScale:Bx.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}destroy(){this.#J(),this.#Q(),this._eventBus._off("editingaction",this.#G),this._eventBus._off("pagechanging",this.#W),this._eventBus._off("scalechanging",this.#z),this._eventBus._off("rotationchanging",this.#k);for(const e of this.#n.values())e.destroy();this.#n.clear(),this.#t.clear(),this.#u.clear(),this.#e=null,this.#y.clear(),this.#i.destroy(),this.#o?.destroy(),this.#m?.hide(),this.#m=null,this.#g&&(clearTimeout(this.#g),this.#g=null),this.#F&&(clearTimeout(this.#F),this.#F=null),this.#ae()}async mlGuess(e){return this.#T?.guess(e)||null}get hasMLManager(){return!!this.#T}get hcmFilter(){return oo(this,"hcmFilter",this.#x?this.#p.addHCMFilter(this.#x.foreground,this.#x.background):"none")}get direction(){return oo(this,"direction",getComputedStyle(this.#H).direction)}get highlightColors(){return oo(this,"highlightColors",this.#h?new Map(this.#h.split(",").map(e=>e.split("=").map(n=>n.trim()))):null)}get highlightColorNames(){return oo(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}setMainHighlightColorPicker(e){this.#I=e}editAltText(e){this.#o?.editAltText(this,e)}onPageChanging({pageNumber:e}){this.#c=e-1}focusMainContainer(){this.#H.focus()}findParent(e,n){for(const r of this.#n.values()){const{x:o,y:i,width:s,height:a}=r.div.getBoundingClientRect();if(e>=o&&e<=o+s&&n>=i&&n<=i+a)return r}return null}disableUserSelect(e=!1){this.#K.classList.toggle("noUserSelect",e)}addShouldRescale(e){this.#u.add(e)}removeShouldRescale(e){this.#u.delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*Bx.PDF_TO_CSS_UNITS;for(const n of this.#u)n.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}#q({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e}highlightSelection(e=""){const n=document.getSelection();if(!n||n.isCollapsed)return;const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=n,a=n.toString(),c=this.#q(n).closest(".textLayer"),u=this.getSelectionBoxes(c);if(u){n.empty(),this.#C===eo.NONE&&(this._eventBus.dispatch("showannotationeditorui",{source:this,mode:eo.HIGHLIGHT}),this.showAllEditors("highlight",!0,!0));for(const d of this.#n.values())if(d.hasTextLayer(c)){d.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:u,anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s,text:a});break}}}#oe(){const e=document.getSelection();if(!e||e.isCollapsed)return;const r=this.#q(e).closest(".textLayer"),o=this.getSelectionBoxes(r);o&&(this.#m||=new fVt(this),this.#m.show(r,o,this.direction==="ltr"))}addToAnnotationStorage(e){!e.isEmpty()&&this.#s&&!this.#s.has(e.id)&&this.#s.setValue(e.id,e)}#ie(){const e=document.getSelection();
725if(!e||e.isCollapsed){this.#E&&(this.#m?.hide(),this.#E=null,this.#_({hasSelectedText:!1}));return}const{anchorNode:n}=e;if(n===this.#E)return;if(!this.#q(e).closest(".textLayer")){this.#E&&(this.#m?.hide(),this.#E=null,this.#_({hasSelectedText:!1}));return}if(this.#m?.hide(),this.#E=n,this.#_({hasSelectedText:!0}),!(this.#C!==eo.HIGHLIGHT&&this.#C!==eo.NONE)&&(this.#C===eo.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#v=this.isShiftKeyDown,!this.isShiftKeyDown)){const i=s=>{s.type==="pointerup"&&s.button!==0||(window.removeEventListener("pointerup",i),window.removeEventListener("blur",i),s.type==="pointerup"&&this.#Y("main_toolbar"))};window.addEventListener("pointerup",i),window.addEventListener("blur",i)}}#Y(e=""){this.#C===eo.HIGHLIGHT?this.highlightSelection(e):this.#a&&this.#oe()}#se(){document.addEventListener("selectionchange",this.#$)}#ae(){document.removeEventListener("selectionchange",this.#$)}#le(){window.addEventListener("focus",this.#M),window.addEventListener("blur",this.#P)}#Q(){window.removeEventListener("focus",this.#M),window.removeEventListener("blur",this.#P)}blur(){if(this.isShiftKeyDown=!1,this.#v&&(this.#v=!1,this.#Y("main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const n of this.#y)if(n.div.contains(e)){this.#A=[n,e],n._focusEventsAllowed=!1;break}}focus(){if(!this.#A)return;const[e,n]=this.#A;this.#A=null,n.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0}),n.focus()}#Z(){window.addEventListener("keydown",this.#L),window.addEventListener("keyup",this.#U)}#J(){window.removeEventListener("keydown",this.#L),window.removeEventListener("keyup",this.#U)}#ee(){document.addEventListener("copy",this.#O),document.addEventListener("cut",this.#D),document.addEventListener("paste",this.#N)}#te(){document.removeEventListener("copy",this.#O),document.removeEventListener("cut",this.#D),document.removeEventListener("paste",this.#N)}addEditListeners(){this.#Z(),this.#ee()}removeEditListeners(){this.#J(),this.#te()}copy(e){if(e.preventDefault(),this.#e?.commitOrRemove(),!this.hasSelection)return;const n=[];for(const r of this.#y){const o=r.serialize(!0);o&&n.push(o)}n.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(n))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();const{clipboardData:n}=e;for(const i of n.items)for(const s of this.#f)if(s.isHandlingMimeForPasting(i.type)){s.paste(i,this.currentLayer);return}let r=n.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(i){Fr(`paste: "${i.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const o=this.currentLayer;try{const i=[];for(const l of r){const c=o.deserialize(l);if(!c)return;i.push(c)}const s=()=>{for(const l of i)this.#ne(l);this.#re(i)},a=()=>{for(const l of i)l.remove()};this.addCommands({cmd:s,undo:a,mustExec:!0})}catch(i){Fr(`paste: "${i.message}".`)}}keydown(e){!this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!0),this.#C!==eo.NONE&&!this.isEditorHandlingKeyboard&&i0._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,this.#v&&(this.#v=!1,this.#Y("main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#_(e){Object.entries(e).some(([r,o])=>this.#X[r]!==o)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#X,e)}),this.#C===eo.HIGHLIGHT&&e.hasSelectedEditor===!1&&this.#B([[sr.HIGHLIGHT_FREE,!0]]))}#B(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#le(),this.#ee(),this.#_({isEditing:this.#C!==eo.NONE,isEmpty:this.#j(),hasSomethingToUndo:this.#i.hasSomethingToUndo(),hasSomethingToRedo:this.#i.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Q(),this.#te(),this.#_({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!this.#f){this.#f=e;for(const n of this.#f)this.#B(n.defaultPropertiesToUpdate)}}getId(){return this.#b.id}get currentLayer(){return this.#n.get(this.#c)}getLayer(e){return this.#n.get(e)}get currentPageIndex(){return this.#c}addLayer(e){this.#n.set(e.pageIndex,e),this.#S?e.enable():e.disable()}removeLayer(e){this.#n.delete(e.pageIndex)}updateMode(e,n=null,r=!1){if(this.#C!==e){if(this.#C=e,e===eo.NONE){this.setEditingState(!1),this.#ue();return}this.setEditingState(!0),this.#ce(),this.unselectAll();for(const o of this.#n.values())o.updateMode(e);if(!n&&r){this.addNewEditorFromKeyboard();return}if(n){for(const o of this.#t.values())if(o.annotationElementId===n){this.setSelected(o),o.enterInEditMode();break}}}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==this.#C&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,n){if(this.#f){switch(e){case sr.CREATE:this.currentLayer.addNewEditor();return;case sr.HIGHLIGHT_DEFAULT_COLOR:this.#I?.updateColor(n);break;case sr.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#R||=new Map).set(e,n),this.showAllEditors("highlight",n);break}for(const r of this.#y)r.updateParams(e,n);for(const r of this.#f)r.updateDefaultParams(e,n)}}showAllEditors(e,n,r=!1){for(const i of this.#t.values())i.editorType===e&&i.show(n);(this.#R?.get(sr.HIGHLIGHT_SHOW_ALL)??!0)!==n&&this.#B([[sr.HIGHLIGHT_SHOW_ALL,n]])}enableWaiting(e=!1){if(this.#w!==e){this.#w=e;for(const n of this.#n.values())e?n.disableClick():n.enableClick(),n.div.classList.toggle("waiting",e)}}#ce(){if(!this.#S){this.#S=!0;for(const e of this.#n.values())e.enable();for(const e of this.#t.values())e.enable()}}#ue(){if(this.unselectAll(),this.#S){this.#S=!1;for(const e of this.#n.values())e.disable();for(const e of this.#t.values())e.disable()}}getEditors(e){const n=[];for(const r of this.#t.values())r.pageIndex===e&&n.push(r);return n}getEditor(e){return this.#t.get(e)}addEditor(e){this.#t.set(e.id,e)}removeEditor(e){e.div.contains(document.activeElement)&&(this.#g&&clearTimeout(this.#g),this.#g=setTimeout(()=>{this.focusMainContainer(),this.#g=null},0)),this.#t.delete(e.id),this.unselect(e),(!e.annotationElementId||!this.#l.has(e.annotationElementId))&&this.#s?.remove(e.id)}addDeletedAnnotationElement(e){this.#l.add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}
725isDeletedAnnotationElement(e){return this.#l.has(e)}removeDeletedAnnotationElement(e){this.#l.delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}#ne(e){const n=this.#n.get(e.pageIndex);n?n.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))}setActiveEditor(e){this.#e!==e&&(this.#e=e,e&&this.#B(e.propertiesToUpdate))}get#de(){let e=null;for(e of this.#y);return e}updateUI(e){this.#de===e&&this.#B(e.propertiesToUpdate)}toggleSelected(e){if(this.#y.has(e)){this.#y.delete(e),e.unselect(),this.#_({hasSelectedEditor:this.hasSelection});return}this.#y.add(e),e.select(),this.#B(e.propertiesToUpdate),this.#_({hasSelectedEditor:!0})}setSelected(e){for(const n of this.#y)n!==e&&n.unselect();this.#y.clear(),this.#y.add(e),e.select(),this.#B(e.propertiesToUpdate),this.#_({hasSelectedEditor:!0})}isSelected(e){return this.#y.has(e)}get firstSelectedEditor(){return this.#y.values().next().value}unselect(e){e.unselect(),this.#y.delete(e),this.#_({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#y.size!==0}get isEnterHandled(){return this.#y.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#i.undo(),this.#_({hasSomethingToUndo:this.#i.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#j()})}redo(){this.#i.redo(),this.#_({hasSomethingToUndo:!0,hasSomethingToRedo:this.#i.hasSomethingToRedo(),isEmpty:this.#j()})}addCommands(e){this.#i.add(e),this.#_({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#j()})}#j(){if(this.#t.size===0)return!0;if(this.#t.size===1)for(const e of this.#t.values())return e.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...this.#y],n=()=>{for(const o of e)o.remove()},r=()=>{for(const o of e)this.#ne(o)};this.addCommands({cmd:n,undo:r,mustExec:!0})}commitOrRemove(){this.#e?.commitOrRemove()}hasSomethingToControl(){return this.#e||this.hasSelection}#re(e){for(const n of this.#y)n.unselect();this.#y.clear();for(const n of e)n.isEmpty()||(this.#y.add(n),n.select());this.#_({hasSelectedEditor:this.hasSelection})}selectAll(){for(const e of this.#y)e.commit();this.#re(this.#t.values())}unselectAll(){if(!(this.#e&&(this.#e.commitOrRemove(),this.#C!==eo.NONE))&&this.hasSelection){for(const e of this.#y)e.unselect();this.#y.clear(),this.#_({hasSelectedEditor:!1})}}translateSelectedEditors(e,n,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;this.#V[0]+=e,this.#V[1]+=n;const[o,i]=this.#V,s=[...this.#y],a=1e3;this.#F&&clearTimeout(this.#F),this.#F=setTimeout(()=>{this.#F=null,this.#V[0]=this.#V[1]=0,this.addCommands({cmd:()=>{for(const l of s)this.#t.has(l.id)&&l.translateInPage(o,i)},undo:()=>{for(const l of s)this.#t.has(l.id)&&l.translateInPage(-o,-i)},mustExec:!1})},a);for(const l of s)l.translateInPage(e,n)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#d=new Map;for(const e of this.#y)this.#d.set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#d)return!1;this.disableUserSelect(!1);const e=this.#d;this.#d=null;let n=!1;for(const[{x:o,y:i,pageIndex:s},a]of e)a.newX=o,a.newY=i,a.newPageIndex=s,n||=o!==a.savedX||i!==a.savedY||s!==a.savedPageIndex;if(!n)return!1;const r=(o,i,s,a)=>{if(this.#t.has(o.id)){const l=this.#n.get(a);l?o._setParentAndPosition(l,i,s):(o.pageIndex=a,o.x=i,o.y=s)}};return this.addCommands({cmd:()=>{for(const[o,{newX:i,newY:s,newPageIndex:a}]of e)r(o,i,s,a)},undo:()=>{for(const[o,{savedX:i,savedY:s,savedPageIndex:a}]of e)r(o,i,s,a)},mustExec:!0}),!0}dragSelectedEditors(e,n){if(this.#d)for(const r of this.#d.keys())r.drag(e,n)}rebuild(e){if(e.parent===null){const n=this.getLayer(e.pageIndex);n?(n.changeParent(e),n.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#y.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return this.#e===e}getActive(){return this.#e}getMode(){return this.#C}get imageManager(){return oo(this,"imageManager",new w9)}getSelectionBoxes(e){if(!e)return null;const n=document.getSelection();for(let c=0,u=n.rangeCount;c<u;c++)if(!e.contains(n.getRangeAt(c).commonAncestorContainer))return null;const{x:r,y:o,width:i,height:s}=e.getBoundingClientRect();let a;switch(e.getAttribute("data-main-rotation")){case"90":a=(c,u,d,h)=>({x:(u-o)/s,y:1-(c+d-r)/i,width:h/s,height:d/i});break;case"180":a=(c,u,d,h)=>({x:1-(c+d-r)/i,y:1-(u+h-o)/s,width:d/i,height:h/s});break;case"270":a=(c,u,d,h)=>({x:1-(u+h-o)/s,y:(c-r)/i,width:h/s,height:d/i});break;default:a=(c,u,d,h)=>({x:(c-r)/i,y:(u-o)/s,width:d/i,height:h/s});break}const l=[];for(let c=0,u=n.rangeCount;c<u;c++){const d=n.getRangeAt(c);if(!d.collapsed)for(const{x:h,y:f,width:p,height:m}of d.getClientRects())p===0||m===0||l.push(a(h,f,p,m))}return l.length===0?null:l}addChangedExistingAnnotation({annotationElementId:e,id:n}){(this.#r||=new Map).set(e,n)}removeChangedExistingAnnotation({annotationElementId:e}){this.#r?.delete(e)}renderAnnotationElement(e){const n=this.#r?.get(e.data.id);if(!n)return;const r=this.#s.getRawValue(n);r&&(this.#C===eo.NONE&&!r.hasBeenModified||r.renderAnnotationElement(e))}}class Kb{#e="";#t=!1;#n=null;#o=null;#s=null;#r=!1;#i=null;static _l10nPromise=null;constructor(e){this.#i=e}static initialize(e){Kb._l10nPromise||=e}async render(){const e=this.#n=document.createElement("button");e.className="altText";const n=await Kb._l10nPromise.get("pdfjs-editor-alt-text-button-label");e.textContent=n,e.setAttribute("aria-label",n),e.tabIndex="0",e.addEventListener("contextmenu",Eu),e.addEventListener("pointerdown",o=>o.stopPropagation());const r=o=>{o.preventDefault(),this.#i._uiManager.editAltText(this.#i)};return e.addEventListener("click",r,{capture:!0}),e.addEventListener("keydown",o=>{o.target===e&&o.key==="Enter"&&(this.#r=!0,r(o))}),await this.#c(),e}finish(){this.#n&&(this.#n.focus({focusVisible:this.#r}),this.#r=!1)}isEmpty(){return!this.#e&&!this.#t}get data(){return{altText:this.#e,decorative:this.#t}}set data({altText:e,decorative:n}){this.#e===e&&this.#t===n||(this.#e=e,this.#t=n,this.#c())}toggle(e=!1){this.#n&&(!e&&this.#s&&(clearTimeout(this.#s),this.#s=null),this.#n.disabled=!e)}destroy(){this.#n?.remove(),this.#n=null,this.#o=null}async#c(){const e=this.#n;if(!e)return;if(!this.#e&&!this.#t){e.classList.remove("done"),this.#o?.remove();return}e.classList.add("done"),Kb._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(o=>{e.setAttribute("aria-label",o)});let n=this.#o;if(!n){this.#o=n=document.createElement("span"),n.className="tooltip",n.setAttribute("role","tooltip");const o=n.id=`alt-text-tooltip-${this.#i.id}`;e.setAttribute("aria-describedby",o);const i=100;e.addEventListener("mouseenter",()=>{this.#s=setTimeout(()=>{this.#s=null,this.#o.classList.add("show"),this.#i._reportTelemetry({action:"alt_text_tooltip"})},i)}),e.addEventListener("mouseleave",()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.#o?.classList.remove("show")})}n.innerText=this.#t?await Kb._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):this.#e,n.parentNode||e.append(n),this.#i.getImageForAltText()?.setAttribute("aria-describedby",n.id)}}class or{#e=null;#t=null;#n=!1;#o=!1;#s=null;#r=null;#i=this.focusin.bind(this);#c=this.focusout.bind(this);#l=null;#d="";#f=!1;#u=null;#a=!1;#p=!1;#g=!1;#h=null;#v=0;#m=0;#b=null;_initialOptions=Object.create(null);_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#S=!1;#w=or._zIndex++;static _borderLineWidth=-1;static _colorManager=new A9;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const e=or.prototype._resizeWithKeyboard,n=i0.TRANSLATE_SMALL,r=i0.TRANSLATE_BIG;return oo(this,"_resizerKeyboardManager",new eO([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-n,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[n,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-n]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,n]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,r]}],[["Escape","mac+Escape"],or.prototype._stopResizingWithKeyboard]]))}constructor(e){this.constructor===or&&Go("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:n,rawDims:{pageWidth:r,pageHeight:o,pageX:i,pageY:s}}=this.parent.viewport;this.rotation=n,this.pageRotation=(360+n-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,o],this.pageTranslation=[i,s];const[a,l]=this.parentDimensions;this.x=e.x/a,this.y=e.y/l,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return oo(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const n=new yVt({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});n.annotationElementId=e.annotationElementId,n.deleted=!0,n._uiManager.addToAnnotationStorage(n)}static initialize(e,n,r){if(or._l10nPromise||=new Map(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-resizer-label-topLeft","pdfjs-editor-resizer-label-topMiddle","pdfjs-editor-resizer-label-topRight","pdfjs-editor-resizer-label-middleRight","pdfjs-editor-resizer-label-bottomRight","pdfjs-editor-resizer-label-bottomMiddle","pdfjs-editor-resizer-label-bottomLeft","pdfjs-editor-resizer-label-middleLeft"].map(i=>[i,e.get(i.replaceAll(/([A-Z])/g,s=>`-${s.toLowerCase()}`))])),r?.strings)for(const i of r.strings)or._l10nPromise.set(i,e.get(i));if(or._borderLineWidth!==-1)return;const o=getComputedStyle(document.documentElement);or._borderLineWidth=parseFloat(o.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,n){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,n){Go("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#S}set _isDraggable(e){this.#S=e,this.div?.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,n]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*n/(e*2),this.y+=this.width*e/(n*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*n/(e*2),this.y-=this.width*e/(n*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}
725setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#w}setParent(e){e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):this.#L(),this.parent=e}focusin(e){this._focusEventsAllowed&&(this.#f?this.#f=!1:this.parent.setSelected(this))}focusout(e){!this._focusEventsAllowed||!this.isAttachedToDOM||e.relatedTarget?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,n,r,o){const[i,s]=this.parentDimensions;[r,o]=this.screenToPageTranslation(r,o),this.x=(e+r)/i,this.y=(n+o)/s,this.fixAndSetPosition()}#A([e,n],r,o){[r,o]=this.screenToPageTranslation(r,o),this.x+=r/e,this.y+=o/n,this.fixAndSetPosition()}translate(e,n){this.#A(this.parentDimensions,e,n)}translateInPage(e,n){this.#u||=[this.x,this.y],this.#A(this.pageDimensions,e,n),this.div.scrollIntoView({block:"nearest"})}drag(e,n){this.#u||=[this.x,this.y];const[r,o]=this.parentDimensions;if(this.x+=e/r,this.y+=n/o,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:c,y:u}=this.div.getBoundingClientRect();this.parent.findNewParent(this,c,u)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:i,y:s}=this;const[a,l]=this.getBaseTranslation();i+=a,s+=l,this.div.style.left=`${(100*i).toFixed(2)}%`,this.div.style.top=`${(100*s).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!this.#u&&(this.#u[0]!==this.x||this.#u[1]!==this.y)}getBaseTranslation(){const[e,n]=this.parentDimensions,{_borderLineWidth:r}=or,o=r/e,i=r/n;switch(this.rotation){case 90:return[-o,i];case 180:return[o,i];case 270:return[o,-i];default:return[-o,-i]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const[n,r]=this.pageDimensions;let{x:o,y:i,width:s,height:a}=this;if(s*=n,a*=r,o*=n,i*=r,this._mustFixPosition)switch(e){case 0:o=Math.max(0,Math.min(n-s,o)),i=Math.max(0,Math.min(r-a,i));break;case 90:o=Math.max(0,Math.min(n-a,o)),i=Math.min(r,Math.max(s,i));break;case 180:o=Math.min(n,Math.max(s,o)),i=Math.min(r,Math.max(a,i));break;case 270:o=Math.min(n,Math.max(a,o)),i=Math.max(0,Math.min(r-s,i));break}this.x=o/=n,this.y=i/=r;const[l,c]=this.getBaseTranslation();o+=l,i+=c;const{style:u}=this.div;u.left=`${(100*o).toFixed(2)}%`,u.top=`${(100*i).toFixed(2)}%`,this.moveInDOM()}static#I(e,n,r){switch(r){case 90:return[n,-e];case 180:return[-e,-n];case 270:return[-n,e];default:return[e,n]}}screenToPageTranslation(e,n){return or.#I(e,n,this.parentRotation)}pageTranslationToScreen(e,n){return or.#I(e,n,360-this.parentRotation)}#T(e){switch(e){case 90:{const[n,r]=this.pageDimensions;return[0,-n/r,r/n,0]}case 180:return[-1,0,0,-1];case 270:{const[n,r]=this.pageDimensions;return[0,n/r,-r/n,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[n,r]}=this,o=n*e,i=r*e;return pu.isCSSRoundSupported?[Math.round(o),Math.round(i)]:[o,i]}setDims(e,n){const[r,o]=this.parentDimensions;this.div.style.width=`${(100*e/r).toFixed(2)}%`,this.#o||(this.div.style.height=`${(100*n/o).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:n,width:r}=e,o=r.endsWith("%"),i=!this.#o&&n.endsWith("%");if(o&&i)return;const[s,a]=this.parentDimensions;o||(e.width=`${(100*parseFloat(r)/s).toFixed(2)}%`),!this.#o&&!i&&(e.height=`${(100*parseFloat(n)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#C(){if(this.#s)return;this.#s=document.createElement("div"),this.#s.classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"];for(const n of e){const r=document.createElement("div");this.#s.append(r),r.classList.add("resizer",n),r.setAttribute("data-resizer-name",n),r.addEventListener("pointerdown",this.#y.bind(this,n)),r.addEventListener("contextmenu",Eu),r.tabIndex=-1}this.div.prepend(this.#s)}#y(e,n){n.preventDefault();const{isMac:r}=pu.platform;if(n.button!==0||n.ctrlKey&&r)return;this.#t?.toggle(!1);const o=this.#x.bind(this,e),i=this._isDraggable;this._isDraggable=!1;const s={passive:!0,capture:!0};this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",o,s),window.addEventListener("contextmenu",Eu);const a=this.x,l=this.y,c=this.width,u=this.height,d=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(n.target).cursor;const f=()=>{this.parent.togglePointerEvents(!0),this.#t?.toggle(!0),this._isDraggable=i,window.removeEventListener("pointerup",f),window.removeEventListener("blur",f),window.removeEventListener("pointermove",o,s),window.removeEventListener("contextmenu",Eu),this.parent.div.style.cursor=d,this.div.style.cursor=h,this.#E(a,l,c,u)};window.addEventListener("pointerup",f),window.addEventListener("blur",f)}#E(e,n,r,o){const i=this.x,s=this.y,a=this.width,l=this.height;i===e&&s===n&&a===r&&l===o||this.addCommands({cmd:()=>{this.width=a,this.height=l,this.x=i,this.y=s;const[c,u]=this.parentDimensions;this.setDims(c*a,u*l),this.fixAndSetPosition()},undo:()=>{this.width=r,this.height=o,this.x=e,this.y=n;const[c,u]=this.parentDimensions;this.setDims(c*r,u*o),this.fixAndSetPosition()},mustExec:!0})}#x(e,n){const[r,o]=this.parentDimensions,i=this.x,s=this.y,a=this.width,l=this.height,c=or.MIN_SIZE/r,u=or.MIN_SIZE/o,d=U=>
725Math.round(U*1e4)/1e4,h=this.#T(this.rotation),f=(U,H)=>[h[0]*U+h[2]*H,h[1]*U+h[3]*H],p=this.#T(360-this.rotation),m=(U,H)=>[p[0]*U+p[2]*H,p[1]*U+p[3]*H];let y,v,b=!1,S=!1;switch(e){case"topLeft":b=!0,y=(U,H)=>[0,0],v=(U,H)=>[U,H];break;case"topMiddle":y=(U,H)=>[U/2,0],v=(U,H)=>[U/2,H];break;case"topRight":b=!0,y=(U,H)=>[U,0],v=(U,H)=>[0,H];break;case"middleRight":S=!0,y=(U,H)=>[U,H/2],v=(U,H)=>[0,H/2];break;case"bottomRight":b=!0,y=(U,H)=>[U,H],v=(U,H)=>[0,0];break;case"bottomMiddle":y=(U,H)=>[U/2,H],v=(U,H)=>[U/2,0];break;case"bottomLeft":b=!0,y=(U,H)=>[0,H],v=(U,H)=>[U,0];break;case"middleLeft":S=!0,y=(U,H)=>[0,H/2],v=(U,H)=>[U,H/2];break}const w=y(a,l),A=v(a,l);let _=f(...A);const P=d(i+_[0]),R=d(s+_[1]);let O=1,N=1,[M,L]=this.screenToPageTranslation(n.movementX,n.movementY);if([M,L]=m(M/r,L/o),b){const U=Math.hypot(a,l);O=N=Math.max(Math.min(Math.hypot(A[0]-w[0]-M,A[1]-w[1]-L)/U,1/a,1/l),c/a,u/l)}else S?O=Math.max(c,Math.min(1,Math.abs(A[0]-w[0]-M)))/a:N=Math.max(u,Math.min(1,Math.abs(A[1]-w[1]-L)))/l;const F=d(a*O),$=d(l*N);_=f(...v(F,$));const D=P-_[0],k=R-_[1];this.width=F,this.height=$,this.x=D,this.y=k,this.setDims(r*F,o*$),this.fixAndSetPosition()}altTextFinish(){this.#t?.finish()}async addEditToolbar(){return this.#l||this.#p?this.#l:(this.#l=new x9(this),this.div.append(this.#l.render()),this.#t&&this.#l.addAltTextButton(await this.#t.render()),this.#l)}removeEditToolbar(){this.#l&&(this.#l.remove(),this.#l=null,this.#t?.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){this.#t||(Kb.initialize(or._l10nPromise),this.#t=new Kb(this),await this.addEditToolbar())}get altTextData(){return this.#t?.data}set altTextData(e){this.#t&&(this.#t.data=e)}hasAltText(){return!this.#t?.isEmpty()}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=this.#n?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),this.div.addEventListener("focusin",this.#i),this.div.addEventListener("focusout",this.#c);const[e,n]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*n/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/n).toFixed(2)}%`);const[r,o]=this.getInitialTranslation();return this.translate(r,o),J2(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:n}=pu.platform;if(e.button!==0||e.ctrlKey&&n){e.preventDefault();return}if(this.#f=!0,this._isDraggable){this.#P(e);return}this.#R(e)}#R(e){const{isMac:n}=pu.platform;e.ctrlKey&&!n||e.shiftKey||e.metaKey&&n?this.parent.toggleSelected(this):this.parent.setSelected(this)}#P(e){const n=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let r,o;n&&(this.div.classList.add("moving"),r={passive:!0,capture:!0},this.#v=e.clientX,this.#m=e.clientY,o=s=>{const{clientX:a,clientY:l}=s,[c,u]=this.screenToPageTranslation(a-this.#v,l-this.#m);this.#v=a,this.#m=l,this._uiManager.dragSelectedEditors(c,u)},window.addEventListener("pointermove",o,r));const i=()=>{window.removeEventListener("pointerup",i),window.removeEventListener("blur",i),n&&(this.div.classList.remove("moving"),window.removeEventListener("pointermove",o,r)),this.#f=!1,this._uiManager.endDragSession()||this.#R(e)};window.addEventListener("pointerup",i),window.addEventListener("blur",i)}moveInDOM(){this.#h&&clearTimeout(this.#h),this.#h=setTimeout(()=>{this.#h=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(e,n,r){e.changeParent(this),this.x=n,this.y=r,this.fixAndSetPosition()}getRect(e,n,r=this.rotation){const o=this.parentScale,[i,s]=this.pageDimensions,[a,l]=this.pageTranslation,c=e/o,u=n/o,d=this.x*i,h=this.y*s,f=this.width*i,p=this.height*s;switch(r){case 0:return[d+c+a,s-h-u-p+l,d+c+f+a,s-h-u+l];case 90:return[d+u+a,s-h+c+l,d+u+p+a,s-h+c+f+l];case 180:return[d-c-f+a,s-h+u+l,d-c+a,s-h+u+p+l];case 270:return[d-u-p+a,s-h-c-f+l,d-u+a,s-h-c+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,n){const[r,o,i,s]=e,a=i-r,l=s-o;switch(this.rotation){case 0:return[r,n-s,a,l];case 90:return[r,n-o,l,a];case 180:return[i,n-o,a,l];case 270:return[i,n-s,l,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#p=!0}disableEditMode(){this.#p=!1}isInEditMode(){return this.#p}shouldGetKeyboardEvents(){return this.#g}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#i),this.div?.addEventListener("focusout",this.#c)}rotate(e){}serialize(e=!1,n=null){Go("An editor must be serializable")}static deserialize(e,n,r){const o=new this.prototype.constructor({parent:n,id:n.getNextId(),uiManager:r});o.rotation=e.rotation;const[i,s]=o.pageDimensions,[a,l,c,u]=o.getRectInCurrentCoords(e.rect,s);return o.x=a/i,o.y=l/s,o.width=c/i,o.height=u/s,o}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.div.removeEventListener("focusin",this.#i),this.div.removeEventListener("focusout",this.#c),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#h&&(clearTimeout(this.#h),this.#h=null),this.#L(),this.removeEditToolbar(),this.#b){for(const e of this.#b.values())clearTimeout(e);this.#b=null}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#C(),this.#s.classList.remove("hidden"),J2(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),this.#r={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const n=this.#s.children;if(!this.#e){this.#e=Array.from(n);const s=this.#M.bind(this),a=this.#O.bind(this);for(const l of this.#e){const c=l.getAttribute("data-resizer-name");l.setAttribute("role","spinbutton"),l.addEventListener("keydown",s),l.addEventListener("blur",a),l.addEventListener("focus",this.#D.bind(this,c)),or._l10nPromise.get(`pdfjs-editor-resizer-label-${c}`).then(u=>l.setAttribute("aria-label",u))}}const r=this.#e[0];let o=0;for(const s of n){if(s===r)break;o++}const i=(360-this.rotation+this.parentRotation)%360/90*(this.#e.length/4);if(i!==o){if(i<o)for(let a=0;a<o-i;a++)this.#s.append(this.#s.firstChild);else if(i>o)for(let a=0;a<i-o;a++)this.#s.firstChild.before(this.#s.lastChild);let s=0;for(const a of n){const c=this.#e[s++].getAttribute("data-resizer-name");or._l10nPromise.get(`pdfjs-editor-resizer-label-${c}`).then(u=>a.setAttribute("aria-label",u))}}this.#N(0),this.#g=!0,this.#s.firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}#M(e){or._resizerKeyboardManager.exec(this,e)}#O(e){this.#g&&e.relatedTarget?.parentNode!==this.#s&&this.#L()}#D(e){this.#d=this.#g?e:""}#N(e){if(this.#e)for(const n of this.#e)n.tabIndex=e}_resizeWithKeyboard(e,n){this.#g&&this.#x(this.#d,{movementX:e,movementY:n})}
725#L(){if(this.#g=!1,this.#N(-1),this.#r){const{savedX:e,savedY:n,savedWidth:r,savedHeight:o}=this.#r;this.#E(e,n,r,o),this.#r=null}}_stopResizingWithKeyboard(){this.#L(),this.div.focus()}select(){if(this.makeResizable(),this.div?.classList.add("selectedEditor"),!this.#l){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this.#l?.show()});return}this.#l?.show()}unselect(){this.#s?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this.#l?.hide()}updateParams(e,n){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return this.#a}set isEditing(e){this.#a=e,this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,n){this.#o=!0;const r=e/n,{style:o}=this.div;o.aspectRatio=r,o.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,n=!1){if(n){this.#b||=new Map;const{action:r}=e;let o=this.#b.get(r);o&&clearTimeout(o),o=setTimeout(()=>{this._reportTelemetry(e),this.#b.delete(r),this.#b.size===0&&(this.#b=null)},or._telemetryTimeout),this.#b.set(r,o);return}e.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),this.#n=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#n=!0}renderAnnotationElement(e){let n=e.container.querySelector(".annotationContent");if(!n)n=document.createElement("div"),n.classList.add("annotationContent",this.editorType),e.container.prepend(n);else if(n.nodeName==="CANVAS"){const r=n;n=document.createElement("div"),n.classList.add("annotationContent",this.editorType),r.before(n)}return n}resetAnnotationElement(e){const{firstChild:n}=e.container;n.nodeName==="DIV"&&n.classList.contains("annotationContent")&&n.remove()}}class yVt extends or{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const tre=3285377520,Hd=4294901760,ip=65535;class PCe{constructor(e){this.h1=e?e&4294967295:tre,this.h2=e?e&4294967295:tre}update(e){let n,r;if(typeof e=="string"){n=new Uint8Array(e.length*2),r=0;for(let m=0,y=e.length;m<y;m++){const v=e.charCodeAt(m);v<=255?n[r++]=v:(n[r++]=v>>>8,n[r++]=v&255)}}else if(ArrayBuffer.isView(e))n=e.slice(),r=n.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const o=r>>2,i=r-o*4,s=new Uint32Array(n.buffer,0,o);let a=0,l=0,c=this.h1,u=this.h2;const d=3432918353,h=461845907,f=d&ip,p=h&ip;for(let m=0;m<o;m++)m&1?(a=s[m],a=a*d&Hd|a*f&ip,a=a<<15|a>>>17,a=a*h&Hd|a*p&ip,c^=a,c=c<<13|c>>>19,c=c*5+3864292196):(l=s[m],l=l*d&Hd|l*f&ip,l=l<<15|l>>>17,l=l*h&Hd|l*p&ip,u^=l,u=u<<13|u>>>19,u=u*5+3864292196);switch(a=0,i){case 3:a^=n[o*4+2]<<16;case 2:a^=n[o*4+1]<<8;case 1:a^=n[o*4],a=a*d&Hd|a*f&ip,a=a<<15|a>>>17,a=a*h&Hd|a*p&ip,o&1?c^=a:u^=a}this.h1=c,this.h2=u}hexdigest(){let e=this.h1,n=this.h2;return e^=n>>>1,e=e*3981806797&Hd|e*36045&ip,n=n*4283543511&Hd|((n<<16|e>>>16)*2950163797&Hd)>>>16,e^=n>>>1,e=e*444984403&Hd|e*60499&ip,n=n*3301882366&Hd|((n<<16|e>>>16)*3120437893&Hd)>>>16,e^=n>>>1,(e>>>0).toString(16).padStart(8,"0")+(n>>>0).toString(16).padStart(8,"0")}}const qz=Object.freeze({map:null,hash:"",transfer:void 0});class T9{#e=!1;#t=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,n){const r=this.#t.get(e);return r===void 0?n:Object.assign(n,r)}getRawValue(e){return this.#t.get(e)}remove(e){if(this.#t.delete(e),this.#t.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const n of this.#t.values())if(n instanceof or)return;this.onAnnotationEditor(null)}}setValue(e,n){const r=this.#t.get(e);let o=!1;if(r!==void 0)for(const[i,s]of Object.entries(n))r[i]!==s&&(o=!0,r[i]=s);else o=!0,this.#t.set(e,n);o&&this.#n(),n instanceof or&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(n.constructor._type)}has(e){return this.#t.has(e)}getAll(){return this.#t.size>0?m9(this.#t):null}setAll(e){for(const[n,r]of Object.entries(e))this.setValue(n,r)}get size(){return this.#t.size}#n(){this.#e||(this.#e=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#e&&(this.#e=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new RCe(this)}get serializable(){if(this.#t.size===0)return qz;const e=new Map,n=new PCe,r=[],o=Object.create(null);let i=!1;for(const[s,a]of this.#t){const l=a instanceof or?a.serialize(!1,o):a;l&&(e.set(s,l),n.update(`${s}:${JSON.stringify(l)}`),i||=!!l.bitmap)}if(i)for(const s of e.values())s.bitmap&&r.push(s.bitmap);return e.size>0?{map:e,hash:n.hexdigest(),transfer:r}:qz}get editorStats(){let e=null;const n=new Map;for(const r of this.#t.values()){if(!(r instanceof or))continue;const o=r.telemetryFinalData;if(!o)continue;const{type:i}=o;n.has(i)||n.set(i,Object.getPrototypeOf(r).constructor),e||=Object.create(null);
725const s=e[i]||=new Map;for(const[a,l]of Object.entries(o)){if(a==="type")continue;let c=s.get(a);c||(c=new Map,s.set(a,c));const u=c.get(l)??0;c.set(l,u+1)}}for(const[r,o]of n)e[r]=o.computeTelemetryFinalData(e[r]);return e}}class RCe extends T9{#e;constructor(e){super();const{map:n,hash:r,transfer:o}=e.serializable,i=structuredClone(n,o?{transfer:o}:null);this.#e={map:i,hash:r,transfer:o}}get print(){Go("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#e}}class vVt{#e=new Set;constructor({ownerDocument:e=globalThis.document,styleElement:n=null}){this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const n=this.styleElement.sheet;n.insertRule(e,n.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#e.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:n}){if(!(!e||this.#e.has(e.loadedName))){if(va(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:o,style:i}=e,s=new FontFace(r,o,i);this.addNativeFontFace(s);try{await s.load(),this.#e.add(r),n?.(e)}catch{Fr(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}return}Go("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){const r=e.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(o){throw Fr(`Failed to load font '${r.family}': '${o}'.`),e.disableFontFace=!0,o}}return}const n=e.createFontFaceRule();if(n){if(this.insertRule(n),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const o=this._queueLoadingCallback(r);this._prepareFontLoadEvent(e,o)})}}get isFontLoadingAPISupported(){const e=!!this._document?.fonts;return oo(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){let e=!1;return(Jl||typeof navigator<"u"&&typeof navigator?.userAgent=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),oo(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){function n(){for(va(!o.done,"completeRequest() cannot be called twice."),o.done=!0;r.length>0&&r[0].done;){const i=r.shift();setTimeout(i.callback,0)}}const{loadingRequests:r}=this,o={done:!1,complete:n,callback:e};return r.push(o),o}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return oo(this,"_loadTestFont",e)}
725_prepareFontLoadEvent(e,n){function r(w,A){return w.charCodeAt(A)<<24|w.charCodeAt(A+1)<<16|w.charCodeAt(A+2)<<8|w.charCodeAt(A+3)&255}function o(w,A,_,P){const R=w.substring(0,A),O=w.substring(A+_);return R+P+O}let i,s;const a=this._document.createElement("canvas");a.width=1,a.height=1;const l=a.getContext("2d");let c=0;function u(w,A){if(++c>30){Fr("Load test font never loaded."),A();return}if(l.font="30px "+w,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){A();return}setTimeout(u.bind(null,w,A))}const d=`lt${Date.now()}${this.loadTestFontId++}`;let h=this._loadTestFont;h=o(h,976,d.length,d);const p=16,m=1482184792;let y=r(h,p);for(i=0,s=d.length-3;i<s;i+=4)y=y-m+r(d,i)|0;i<d.length&&(y=y-m+r(d+"XXX",i)|0),h=o(h,p,4,tVt(y));const v=`url(data:font/opentype;base64,${btoa(h)});`,b=`@font-face {font-family:"${d}";src:${v}}`;this.insertRule(b);const S=this._document.createElement("div");S.style.visibility="hidden",S.style.width=S.style.height="10px",S.style.position="absolute",S.style.top=S.style.left="0px";for(const w of[e.loadedName,d]){const A=this._document.createElement("span");A.textContent="Hi",A.style.fontFamily=w,S.append(A)}this._document.body.append(S),u(d,()=>{S.remove(),n.complete()})}}class bVt{constructor(e,{disableFontFace:n=!1,inspectFont:r=null}){this.compiledGlyphs=Object.create(null);for(const o in e)this[o]=e[o];this.disableFontFace=n===!0,this._inspectFont=r}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{const n={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(n.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,n)}return this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=xCe(this.data),n=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(!this.cssFontInfo)r=`@font-face {font-family:"${this.loadedName}";src:${n}}`;else{let o=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(o+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${o}src:${n}}`}return this._inspectFont?.(this,n),r}getPathGenerator(e,n){if(this.compiledGlyphs[n]!==void 0)return this.compiledGlyphs[n];let r;try{r=e.get(this.loadedName+"_path_"+n)}catch(i){Fr(`getPathGenerator - ignoring character: "${i}".`)}if(!Array.isArray(r)||r.length===0)return this.compiledGlyphs[n]=function(i,s){};const o=[];for(let i=0,s=r.length;i<s;)switch(r[i++]){case _g.BEZIER_CURVE_TO:{const[a,l,c,u,d,h]=r.slice(i,i+6);o.push(f=>f.bezierCurveTo(a,l,c,u,d,h)),i+=6}break;case _g.MOVE_TO:{const[a,l]=r.slice(i,i+2);o.push(c=>c.moveTo(a,l)),i+=2}break;case _g.LINE_TO:{const[a,l]=r.slice(i,i+2);o.push(c=>c.lineTo(a,l)),i+=2}break;case _g.QUADRATIC_CURVE_TO:{const[a,l,c,u]=r.slice(i,i+4);o.push(d=>d.quadraticCurveTo(a,l,c,u)),i+=4}break;case _g.RESTORE:o.push(a=>a.restore());break;case _g.SAVE:o.push(a=>a.save());break;case _g.SCALE:va(o.length===2,"Scale command is only valid at the third position.");break;case _g.TRANSFORM:{const[a,l,c,u,d,h]=r.slice(i,i+6);o.push(f=>f.transform(a,l,c,u,d,h)),i+=6}break;case _g.TRANSLATE:{const[a,l]=r.slice(i,i+2);o.push(c=>c.translate(a,l)),i+=2}break}return this.compiledGlyphs[n]=function(s,a){o[0](s),o[1](s),s.scale(a,-a);for(let l=2,c=o.length;l<c;l++)o[l](s)}}}if(Jl){var Yz=Promise.withResolvers(),Xz=null;(async()=>{const e=await s1(()=>import("./__vite-browser-external-b25bb000.js"),[]),n=await s1(()=>import("./__vite-browser-external-b25bb000.js"),[]),r=await s1(()=>import("./__vite-browser-external-b25bb000.js"),[]),o=await s1(()=>import("./__vite-browser-external-b25bb000.js"),[]);let i,s;return new Map(Object.entries({fs:e,http:n,https:r,url:o,canvas:i,path2d:s}))})().then(e=>{Xz=e,Yz.resolve()},e=>{Fr(`loadPackages: ${e}`),Xz=new Map,Yz.resolve()})}class Xp{static get promise(){return Yz.promise}static get(e){return Xz?.get(e)}}const OCe=function(t){return Xp.get("fs").promises.readFile(t).then(n=>
vendor: 4,232 bytes, line 725
725new Uint8Array(n))};class CVt extends e${}class SVt extends t${_createCanvas(e,n){return Xp.get("canvas").createCanvas(e,n)}}class EVt extends n${_fetchData(e,n){return OCe(e).then(r=>({cMapData:r,compressionType:n}))}}class xVt extends r${_fetchData(e){return OCe(e)}}const wc={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Kz(t,e){if(!e)return;const n=e[2]-e[0],r=e[3]-e[1],o=new Path2D;o.rect(e[0],e[1],n,r),t.clip(o)}class tO{constructor(){this.constructor===tO&&Go("Cannot initialize BaseShadingPattern.")}getPattern(){Go("Abstract method `getPattern` called.")}}class wVt extends tO{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let n;this._type==="axial"?n=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(n=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const r of this._colorStops)n.addColorStop(r[0],r[1]);return n}getPattern(e,n,r,o){let i;if(o===wc.STROKE||o===wc.FILL){const s=n.current.getClippedPathBoundingBox(o,qi(e))||[0,0,0,0],a=Math.ceil(s[2]-s[0])||1,l=Math.ceil(s[3]-s[1])||1,c=n.cachedCanvases.getCanvas("pattern",a,l,!0),u=c.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-s[0],-s[1]),r=On.transform(r,[1,0,0,1,s[0],s[1]]),u.transform(...n.baseTransform),this.matrix&&u.transform(...this.matrix),Kz(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),i=e.createPattern(c.canvas,"no-repeat");const d=new DOMMatrix(r);i.setTransform(d)}else Kz(e,this._bbox),i=this._createGradient(e);return i}}function CU(t,e,n,r,o,i,s,a){const l=e.coords,c=e.colors,u=t.data,d=t.width*4;let h;l[n+1]>l[r+1]&&(h=n,n=r,r=h,h=i,i=s,s=h),l[r+1]>l[o+1]&&(h=r,r=o,o=h,h=s,s=a,a=h),l[n+1]>l[r+1]&&(h=n,n=r,r=h,h=i,i=s,s=h);const f=(l[n]+e.offsetX)*e.scaleX,p=(l[n+1]+e.offsetY)*e.scaleY,m=(l[r]+e.offsetX)*e.scaleX,y=(l[r+1]+e.offsetY)*e.scaleY,v=(l[o]+e.offsetX)*e.scaleX,b=(l[o+1]+e.offsetY)*e.scaleY;if(p>=b)return;const S=c[i],w=c[i+1],A=c[i+2],_=c[s],P=c[s+1],R=c[s+2],O=c[a],N=c[a+1],M=c[a+2],L=Math.round(p),F=Math.round(b);let $,D,k,U,H,V,q,J;for(let Q=L;Q<=F;Q++){if(Q<y){const re=Q<p?0:(p-Q)/(p-y);$=f-(f-m)*re,D=S-(S-_)*re,k=w-(w-P)*re,U=A-(A-R)*re}else{let re;Q>b?re=1:y===b?re=0:re=(y-Q)/(y-b),$=m-(m-v)*re,D=_-(_-O)*re,k=P-(P-N)*re,U=R-(R-M)*re}let se;Q<p?se=0:Q>b?se=1:se=(p-Q)/(p-b),H=f-(f-v)*se,V=S-(S-O)*se,q=w-(w-N)*se,J=A-(A-M)*se;const oe=Math.round(Math.min($,H)),ie=Math.round(Math.max($,H));let ee=d*Q+oe*4;for(let re=oe;re<=ie;re++)se=($-re)/($-H),se<0?se=0:se>1&&(se=1),u[ee++]=D-(D-V)*se|0,u[ee++]=k-(k-q)*se|0,u[ee++]=U-(U-J)*se|0,u[ee++]=255}}function AVt(t,e,n){const r=e.coords,o=e.colors;let i,s;switch(e.type){case"lattice":const a=e.verticesPerRow,l=Math.floor(r.length/a)-1,c=a-1;for(i=0;i<l;i++){let u=i*a;for(let d=0;d<c;d++,u++)CU(t,n,r[u],r[u+1],r[u+a],o[u],o[u+1],o[u+a]),CU(t,n,r[u+a+1],r[u+1],r[u+a],o[u+a+1],o[u+1],o[u+a])}break;case"triangles":for(i=0,s=r.length;i<s;i+=3)CU(t,n,r[i],r[i+1],r[i+2],o[i],o[i+1],o[i+2]);break;default:throw new Error("illegal figure")}}class TVt extends tO{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,n,r){const a=Math.floor(this._bounds[0]),l=Math.floor(this._bounds[1]),c=Math.ceil(this._bounds[2])-a,u=Math.ceil(this._bounds[3])-l,d=Math.min(Math.ceil(Math.abs(c*e[0]*1.1)),3e3),h=Math.min(Math.ceil(Math.abs(u*e[1]*1.1)),3e3),f=c/d,p=u/h,m={coords:this._coords,colors:this._colors,offsetX:-a,offsetY:-l,scaleX:1/f,scaleY:1/p},y=d+2*2,v=h+2*2,b=r.getCanvas("mesh",y,v,!1),S=b.context,w=S.createImageData(d,h);if(n){const _=w.data;for(let P=0,R=_.length;P<R;P+=4)_[P]=n[0],_[P+1]=n[1],_[P+2]=n[2],_[P+3]=255}for(const _ of this._figures)AVt(w,_,m);return S.putImageData(w,2,2),{canvas:b.canvas,offsetX:a-2*f,offsetY:l-2*p,scaleX:f,scaleY:p}}getPattern(e,n,r,o){Kz(e,this._bbox);let i;if(o===wc.SHADING)i=On.singularValueDecompose2dScale(qi(e));else if(i=On.singularValueDecompose2dScale(n.baseTransform),this.matrix
725){const a=On.singularValueDecompose2dScale(this.matrix);i=[i[0]*a[0],i[1]*a[1]]}const s=this._createMeshCanvas(i,o===wc.SHADING?null:this._background,n.cachedCanvases);return o!==wc.SHADING&&(e.setTransform(...n.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class _Vt extends tO{getPattern(){return"hotpink"}}function IVt(t){switch(t[0]){case"RadialAxial":return new wVt(t);case"Mesh":return new TVt(t);case"Dummy":return new _Vt}throw new Error(`Unknown IR type: ${t[0]}`)}const nre={COLORED:1,UNCOLORED:2};class _9{static MAX_PATTERN_SIZE=3e3;constructor(e,n,r,o,i){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=n,this.ctx=r,this.canvasGraphicsFactory=o,this.baseTransform=i}createPatternCanvas(e){const n=this.operatorList,r=this.bbox,o=this.xstep,i=this.ystep,s=this.paintType,a=this.tilingType,l=this.color,c=this.canvasGraphicsFactory;QB("TilingType: "+a);const u=r[0],d=r[1],h=r[2],f=r[3],p=On.singularValueDecompose2dScale(this.matrix),m=On.singularValueDecompose2dScale(this.baseTransform),y=[p[0]*m[0],p[1]*m[1]],v=this.getSizeAndScale(o,this.ctx.canvas.width,y[0]),b=this.getSizeAndScale(i,this.ctx.canvas.height,y[1]),S=e.cachedCanvases.getCanvas("pattern",v.size,b.size,!0),w=S.context,A=c.createCanvasGraphics(w);A.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(A,s,l);let _=u,P=d,R=h,O=f;return u<0&&(_=0,R+=Math.abs(u)),d<0&&(P=0,O+=Math.abs(d)),w.translate(-(v.scale*_),-(b.scale*P)),A.transform(v.scale,0,0,b.scale,0,0),w.save(),this.clipBbox(A,_,P,R,O),A.baseTransform=qi(A.ctx),A.executeOperatorList(n),A.endDrawing(),{canvas:S.canvas,scaleX:v.scale,scaleY:b.scale,offsetX:_,offsetY:P}}getSizeAndScale(e,n,r){e=Math.abs(e);const o=Math.max(_9.MAX_PATTERN_SIZE,n);let i=Math.ceil(e*r);return i>=o?i=o:r=i/e,{scale:r,size:i}}clipBbox(e,n,r,o,i){const s=o-n,a=i-r;e.ctx.rect(n,r,s,a),e.current.updateRectMinMax(qi(e.ctx),[n,r,o,i]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,n,r){const o=e.ctx,i=e.current;switch(n){case nre.COLORED:const s=this.ctx;o.fillStyle=s.fillStyle,o.strokeStyle=s.strokeStyle,i.fillColor=s.fillStyle,i.strokeColor=s.strokeStyle;break;case nre.UNCOLORED:const a=On.makeHexColor(r[0],r[1],r[2]);o.fillStyle=a,o.strokeStyle=a,i.fillColor=a,i.strokeColor=a;break;default:throw new eVt(`Unsupported paint type: ${n}`)}}getPattern(e,n,r,o){let i=r;o!==wc.SHADING&&(i=On.transform(i,n.baseTransform),this.matrix&&(i=On.transform(i,this.matrix)));const s=this.createPatternCanvas(n);let a=new DOMMatrix(i);a=a.translate(s.offsetX,s.offsetY),a=a.scale(1/s.scaleX,1/s.scaleY);const l=e.createPattern(s.canvas,"repeat");return l.setTransform(a),l}}function PVt({src:t,srcPos:e=0,dest:n,width:r,height:o,nonBlackColor:i=4294967295,inverseDecode:s=!1}){const a=pu.isLittleEndian?4278190080:255,[l,c]=s?[i,a]:[a,i],u=r>>3,d=r&7,h=t.length;n=new Uint32Array(n.buffer);let f=0;for(let p=0;p<o;p++){for(const y=e+u;e<y;e++){const v=e<h?t[e]:255;n[f++]=v&128?c:l,n[f++]=v&64?c:l,n[f++]=v&32?c:l,n[f++]=v&16?c:l,n[f++]=v&8?c:l,n[f++]=v&4?c:l,n[f++]=v&2?c:l,n[f++]=v&1?c:l}if(d===0)continue;const m=e<h?t[e++]:255;for(let y=0;y<d;y++)n[f++]=m&1<<7-y?c:l}return{srcPos:e,destPos:f}}const rre=16,ore=100,RVt=15,ire=10,sre=1e3,iu=16;function OVt(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=()=>{t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()}
vendor: 5,051 bytes, line 725
725,t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(r,o){e.translate(r,o),this.__originalTranslate(r,o)},t.scale=function(r,o){e.scale(r,o),this.__originalScale(r,o)},t.transform=function(r,o,i,s,a,l){e.transform(r,o,i,s,a,l),this.__originalTransform(r,o,i,s,a,l)},t.setTransform=function(r,o,i,s,a,l){e.setTransform(r,o,i,s,a,l),this.__originalSetTransform(r,o,i,s,a,l)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(r){e.rotate(r),this.__originalRotate(r)},t.clip=function(r){e.clip(r),this.__originalClip(r)},t.moveTo=function(n,r){e.moveTo(n,r),this.__originalMoveTo(n,r)},t.lineTo=function(n,r){e.lineTo(n,r),this.__originalLineTo(n,r)},t.bezierCurveTo=function(n,r,o,i,s,a){e.bezierCurveTo(n,r,o,i,s,a),this.__originalBezierCurveTo(n,r,o,i,s,a)},t.rect=function(n,r,o,i){e.rect(n,r,o,i),this.__originalRect(n,r,o,i)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}class NVt{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,n,r){let o;return this.cache[e]!==void 0?(o=this.cache[e],this.canvasFactory.reset(o,n,r)):(o=this.canvasFactory.create(n,r),this.cache[e]=o),o}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const n=this.cache[e];this.canvasFactory.destroy(n),delete this.cache[e]}}}function wM(t,e,n,r,o,i,s,a,l,c){const[u,d,h,f,p,m]=qi(t);if(d===0&&h===0){const b=s*u+p,S=Math.round(b),w=a*f+m,A=Math.round(w),_=(s+l)*u+p,P=Math.abs(Math.round(_)-S)||1,R=(a+c)*f+m,O=Math.abs(Math.round(R)-A)||1;return t.setTransform(Math.sign(u),0,0,Math.sign(f),S,A),t.drawImage(e,n,r,o,i,0,0,P,O),t.setTransform(u,d,h,f,p,m),[P,O]}if(u===0&&f===0){const b=a*h+p,S=Math.round(b),w=s*d+m,A=Math.round(w),_=(a+c)*h+p,P=Math.abs(Math.round(_)-S)||1,R=(s+l)*d+m,O=Math.abs(Math.round(R)-A)||1;return t.setTransform(0,Math.sign(d),Math.sign(h),0,S,A),t.drawImage(e,n,r,o,i,0,0,O,P),t.setTransform(u,d,h,f,p,m),[O,P]}t.drawImage(e,n,r,o,i,s,a,l,c);const y=Math.hypot(u,d),v=Math.hypot(h,f);return[y*l,v*c]}function MVt(t){const{width:e,height:n}=t;if(e>sre||n>sre)return null;const r=1e3,o=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=e+1;let s=new Uint8Array(i*(n+1)),a,l,c;const u=e+7&-8;let d=new Uint8Array(u*n),h=0;for(const v of t.data){let b=128;for(;b>0;)d[h++]=v&b?0:255,b>>=1}let f=0;for(h=0,d[h]!==0&&(s[0]=1,++f),l=1;l<e;l++)d[h]!==d[h+1]&&(s[l]=d[h]?2:1,++f),h++;for(d[h]!==0&&(s[l]=2,++f),a=1;a<n;a++){h=a*u,c=a*i,d[h-u]!==d[h]&&(s[c]=d[h]?1:8,++f);let v=(d[h]?4:0)+(d[h-u]?8:0);for(l=1;l<e;l++)v=(v>>2)+(d[h+1]?4:0)+(d[h-u+1]?8:0),o[v]&&(s[c+l]=o[v],++f),h++;if(d[h-u]!==d[h]&&(s[c+l]=d[h]?2:4,++f),f>r)return null}for(h=u*(n-1),c=a*i,d[h]!==0&&(s[c]=8,++f),l=1;l<e;l++)d[h]!==d[h+1]&&(s[c+l]=d[h]?4:8,++f),h++;if(d[h]!==0&&(s[c+l]=4,++f),f>r)return null;const p=new Int32Array([0,i,-1,0,-i,0,0,0,1]),m=new Path2D;for(a=0;f&&a<=n;a++){let v=a*i;const b=v+e;for(;v<b&&!s[v];)v++;if(v===b)continue;m.moveTo(v%i,a);const S=v;let w=s[v];do{const A=p[w];do v+=A;while(!s[v]);const _=s[v];_!==5&&_!==10?(w=_,s[v]=0):(w=_&51*w>>4,s[v]&=w>>2|w<<2),m.lineTo(v%i,v/i|0),s[v]||--f}while(S!==v);--a}return d=null,s=null,function(v){v.save(),v.scale(1/e,-1/n),v.translate(0,-n),v.fill(m),v.beginPath(),v.restore()}}class are{constructor(e,n){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=SCe,this.textMatrixScale=1,this.fontMatrix=Vz,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=zl.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,n])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,n){this.x=e,this.y=n}updatePathMinMax(e,n,r){[n,r]=On.applyTransform([n,r],e),this.minX=Math.min(this.minX,n),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,n),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(e,n){const r=On.applyTransform(n,e),o=On.applyTransform(n.slice(2),e),i=On.applyTransform([n[0],n[3]],e),s=On.applyTransform([n[2],n[1]],e);this.minX=Math.min(this.minX,r[0],o[0],i[0],s[0]),this.minY=Math.min(this.minY,r[1],o[1],i[1],s[1]),this.maxX=Math.max(this.maxX,r[0],o[0],i[0],s[0]),this.maxY=Math.max(this.maxY,r[1],o[1],i[1],s[1])}updateScalingPathMinMax(e,n){On.scaleMinMax(e,n),this.minX=Math.min(this.minX,n[0]),this.minY=Math.min(this.minY,n[1]),this.maxX=Math.max(this.maxX,n[2]),this.maxY=Math.max(this.maxY,n[3])}updateCurvePathMinMax(e,n,r,o,i,s,a,l,c,u){const d=On.bezierBoundingBox(n,r,o,i,s,a,l,c,u);u||this.updateRectMinMax(e,d)}getPathBoundingBox(e=wc.FILL,n=null){const r=[this.minX,this.minY,this.maxX,this.maxY];if(e===wc.STROKE){n||Go("Stroke bounding box must include transform.");const o=On.singularValueDecompose2dScale(n),i=o[0]*this.lineWidth/2,s=o[1]
725*this.lineWidth/2;r[0]-=i,r[1]-=s,r[2]+=i,r[3]+=s}return r}updateClipFromPath(){const e=On.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=wc.FILL,n=null){return On.intersect(this.clipBox,this.getPathBoundingBox(e,n))}}function lre(t,e){if(typeof ImageData<"u"&&e instanceof ImageData){t.putImageData(e,0,0);return}const n=e.height,r=e.width,o=n%iu,i=(n-o)/iu,s=o===0?i:i+1,a=t.createImageData(r,iu);let l=0,c;const u=e.data,d=a.data;let h,f,p,m;if(e.kind===xD.GRAYSCALE_1BPP){const y=u.byteLength,v=new Uint32Array(d.buffer,0,d.byteLength>>2),b=v.length,S=r+7>>3,w=4294967295,A=pu.isLittleEndian?4278190080:255;for(h=0;h<s;h++){for(p=h<i?iu:o,c=0,f=0;f<p;f++){const _=y-l;let P=0;const R=_>S?r:_*8-7,O=R&-8;let N=0,M=0;for(;P<O;P+=8)M=u[l++],v[c++]=M&128?w:A,v[c++]=M&64?w:A,v[c++]=M&32?w:A,v[c++]=M&16?w:A,v[c++]=M&8?w:A,v[c++]=M&4?w:A,v[c++]=M&2?w:A,v[c++]=M&1?w:A;for(;P<R;P++)N===0&&(M=u[l++],N=128),v[c++]=M&N?w:A,N>>=1}for(;c<b;)v[c++]=0;t.putImageData(a,0,h*iu)}}else if(e.kind===xD.RGBA_32BPP){for(f=0,m=r*iu*4,h=0;h<i;h++)d.set(u.subarray(l,l+m)),l+=m,t.putImageData(a,0,f),f+=iu;h<s&&(m=r*o*4,d.set(u.subarray(l,l+m)),t.putImageData(a,0,f))}else if(e.kind===xD.RGB_24BPP)for(p=iu,m=r*p,h=0;h<s;h++){for(h>=i&&(p=o,m=r*p),c=0,f=m;f--;)d[c++]=u[l++],d[c++]=u[l++],d[c++]=u[l++],d[c++]=255;t.putImageData(a,0,h*iu)}else throw new Error(`bad image kind: ${e.kind}`)}function cre(t,e){if(e.bitmap){t.drawImage(e.bitmap,0,0);return}const n=e.height,r=e.width,o=n%iu,i=(n-o)/iu,s=o===0?i:i+1,a=t.createImageData(r,iu);let l=0;const c=e.data,u=a.data;for(let d=0;d<s;d++){const h=d<i?iu:o;({srcPos:l}=PVt({src:c,srcPos:l,dest:u,width:r,height:h,nonBlackColor:0})),t.putImageData(a,0,d*iu)}}function RT(t,e){const n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of n)t[r]!==void 0&&(e[r]=t[r]);t.setLineDash!==void 0&&(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset)}function AM(t){if(t.strokeStyle=t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",t.setLineDash!==void 0&&(t.setLineDash([]),t.lineDashOffset=0),!Jl){const{filter:e}=t;e!=="none"&&e!==""&&(t.filter="none")}}function ure(t,e){if(e)return!0;const n=On.singularValueDecompose2dScale(t);n[0]=Math.fround(n[0]),n[1]=Math.fround(n[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*Bx.PDF_TO_CSS_UNITS);return n[0]<=r&&n[1]<=r}const DVt=["butt","round","square"],LVt=["miter","round","bevel"],kVt={},dre={};class I1{constructor(e,n,r,o,i,{optionalContentConfig:s,markedContentStack:a=null},l,c){this.ctx=e,this.current=new are(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=n,this.objs=r,this.canvasFactory=o,this.filterFactory=i,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=s,this.cachedCanvases=new NVt(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=l,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=c,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,n=null){return typeof e=="string"?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):n}beginDrawing({transform:e,viewport:n,transparency:r=!1,background:o=null}){const i=this.ctx.canvas.width,s=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=o||"#ffffff",this.ctx.fillRect(0,0,i,s),this.ctx.fillStyle=a,r){const l=this.cachedCanvases.getCanvas("transparent",i,s);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform(...qi(this.compositeCtx))}this.ctx.save(),AM(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...n.transform),this.viewportScale=n.scale,this.baseTransform=qi(this.ctx)}executeOperatorList(e,n,r,o){const i=e.argsArray,s=e.fnArray;let a=n||0;const l=i.length;if(l===a)return a;const c=l-a>ire&&typeof r=="function",u=c?Date.now()+RVt:0;let d=0;const h=this.commonObjs,f=this.objs;let p;for(;;){if(o!==void 0&&a===o.nextBreakPoint)return o.breakIt(a,r),a;if(p=s[a],p!==Jh.dependency)this[p].apply(this,i[a]);else for(const m of i[a]){const y=m.startsWith("g_")?h:f;if(!y.has(m))return y.get(m,r),a}if(a++,a===l)return a;
vendor: 4,959 bytes, line 725
725if(c&&++d>ire){if(Date.now()>u)return r(),a;d=0}}}#e(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#e(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const n of e.values())typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&(n.width=n.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#t()}#t(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){const n=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=n}}}_scaleImage(e,n){const r=e.width,o=e.height;let i=Math.max(Math.hypot(n[0],n[1]),1),s=Math.max(Math.hypot(n[2],n[3]),1),a=r,l=o,c="prescale1",u,d;for(;i>2&&a>1||s>2&&l>1;){let h=a,f=l;i>2&&a>1&&(h=a>=16384?Math.floor(a/2)-1||1:Math.ceil(a/2),i/=a/h),s>2&&l>1&&(f=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,s/=l/f),u=this.cachedCanvases.getCanvas(c,h,f),d=u.context,d.clearRect(0,0,h,f),d.drawImage(e,0,0,a,l,0,0,h,f),e=u.canvas,a=h,l=f,c=c==="prescale1"?"prescale2":"prescale1"}return{img:e,paintWidth:a,paintHeight:l}}_createMaskCanvas(e){const n=this.ctx,{width:r,height:o}=e,i=this.current.fillColor,s=this.current.patternFill,a=qi(n);let l,c,u,d;if((e.bitmap||e.data)&&e.count>1){const R=e.bitmap||e.data.buffer;c=JSON.stringify(s?a:[a.slice(0,4),i]),l=this._cachedBitmapsMap.get(R),l||(l=new Map,this._cachedBitmapsMap.set(R,l));const O=l.get(c);if(O&&!s){const N=Math.round(Math.min(a[0],a[2])+a[4]),M=Math.round(Math.min(a[1],a[3])+a[5]);return{canvas:O,offsetX:N,offsetY:M}}u=O}u||(d=this.cachedCanvases.getCanvas("maskCanvas",r,o),cre(d.context,e));let h=On.transform(a,[1/r,0,0,-1/o,0,0]);h=On.transform(h,[1,0,0,1,0,-o]);const[f,p,m,y]=On.getAxialAlignedBoundingBox([0,0,r,o],h),v=Math.round(m-f)||1,b=Math.round(y-p)||1,S=this.cachedCanvases.getCanvas("fillCanvas",v,b),w=S.context,A=f,_=p;w.translate(-A,-_),w.transform(...h),u||(u=this._scaleImage(d.canvas,Ig(w)),u=u.img,l&&s&&l.set(c,u)),w.imageSmoothingEnabled=ure(qi(w),e.interpolate),wM(w,u,0,0,u.width,u.height,0,0,r,o),w.globalCompositeOperation="source-in";const P=On.transform(Ig(w),[1,0,0,1,-A,-_]);return w.fillStyle=s?i.getPattern(n,this,P,wc.FILL):i,w.fillRect(0,0,r,o),l&&!s&&(this.cachedCanvases.delete("fillCanvas"),l.set(c,S.canvas)),{canvas:S.canvas,offsetX:Math.round(A),offsetY:Math.round(_)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=DVt[e]}setLineJoin(e){this.ctx.lineJoin=LVt[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,n){const r=this.ctx;r.setLineDash!==void 0&&(r.setLineDash(e),r.lineDashOffset=n)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[n,r]of e)switch(n){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r[0],r[1]);break;case"CA":this.current.strokeAlpha=r;break;case"ca":this.current.fillAlpha=r,this.ctx.globalAlpha=r;break;case"BM":this.ctx.globalCompositeOperation=r;break;case"SMask":this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,n=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,o=this.cachedCanvases.getCanvas(r,e,n);this.suspendedCtx=this.ctx,this.ctx=o.context;const i=this.ctx;i.setTransform(...qi(this.suspendedCtx)),RT(this.suspendedCtx,i),OVt(i,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),RT(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const n=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,n,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore(
725)}composeSMask(e,n,r,o){const i=o[0],s=o[1],a=o[2]-i,l=o[3]-s;a===0||l===0||(this.genericComposeSMask(n.context,r,a,l,n.subtype,n.backdrop,n.transferMap,i,s,n.offsetX,n.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}genericComposeSMask(e,n,r,o,i,s,a,l,c,u,d){let h=e.canvas,f=l-u,p=c-d;if(s){if(f<0||p<0||f+r>h.width||p+o>h.height){const y=this.cachedCanvases.getCanvas("maskExtension",r,o),v=y.context;v.drawImage(h,-f,-p),s.some(b=>b!==0)&&(v.globalCompositeOperation="destination-atop",v.fillStyle=On.makeHexColor(...s),v.fillRect(0,0,r,o),v.globalCompositeOperation="source-over"),h=y.canvas,f=p=0}else if(s.some(y=>y!==0)){e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const y=new Path2D;y.rect(f,p,r,o),e.clip(y),e.globalCompositeOperation="destination-atop",e.fillStyle=On.makeHexColor(...s),e.fillRect(f,p,r,o),e.restore()}}n.save(),n.globalAlpha=1,n.setTransform(1,0,0,1,0,0),i==="Alpha"&&a?n.filter=this.filterFactory.addAlphaFilter(a):i==="Luminosity"&&(n.filter=this.filterFactory.addLuminosityFilter(a));const m=new Path2D;m.rect(l,c,r,o),n.clip(m),n.globalCompositeOperation="destination-in",n.drawImage(h,f,p,r,o,l,c,r,o),n.restore()}save(){this.inSMaskMode?(RT(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),RT(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,n,r,o,i,s){this.ctx.transform(e,n,r,o,i,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,n,r){const o=this.ctx,i=this.current;let s=i.x,a=i.y,l,c;const u=qi(o),d=u[0]===0&&u[3]===0||u[1]===0&&u[2]===0,h=d?r.slice(0):null;for(let f=0,p=0,m=e.length;f<m;f++)switch(e[f]|0){case Jh.rectangle:s=n[p++],a=n[p++];const y=n[p++],v=n[p++],b=s+y,S=a+v;o.moveTo(s,a),y===0||v===0?o.lineTo(b,S):(o.lineTo(b,a),o.lineTo(b,S),o.lineTo(s,S)),d||i.updateRectMinMax(u,[s,a,b,S]),o.closePath();break;case Jh.moveTo:s=n[p++],a=n[p++],o.moveTo(s,a),d||i.updatePathMinMax(u,s,a);break;case Jh.lineTo:s=n[p++],a=n[p++],o.lineTo(s,a),d||i.updatePathMinMax(u,s,a);break;case Jh.curveTo:l=s,c=a,s=n[p+4],a=n[p+5],o.bezierCurveTo(n[p],n[p+1],n[p+2],n[p+3],s,a),i.updateCurvePathMinMax(u,l,c,n[p],n[p+1],n[p+2],n[p+3],s,a,h),p+=6;break;case Jh.curveTo2:l=s,c=a,o.bezierCurveTo(s,a,n[p],n[p+1],n[p+2],n[p+3]),i.updateCurvePathMinMax(u,l,c,s,a,n[p],n[p+1],n[p+2],n[p+3],h),s=n[p+2],a=n[p+3],p+=4;break;case Jh.curveTo3:l=s,c=a,s=n[p+2],a=n[p+3],o.bezierCurveTo(n[p],n[p+1],s,a,s,a),i.updateCurvePathMinMax(u,l,c,n[p],n[p+1],s,a,s,a,h),p+=4;break;case Jh.closePath:o.closePath();break}d&&i.updateScalingPathMinMax(u,h),i.setCurrentPoint(s,a)}closePath(){this.ctx.closePath()}stroke(e=!0){const n=this.ctx,r=this.current.strokeColor;n.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof r=="object"&&r?.getPattern?(n.save(),n.strokeStyle=r.getPattern(n,this,Ig(n),wc.STROKE),this.rescaleAndStroke(!1),n.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),n.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const n=this.ctx,r=this.current.fillColor,o=this.current.patternFill;let i=!1;o&&(n.save(),n.fillStyle=r.getPattern(n,this,Ig(n),wc.FILL),i=!0);const s=this.current.getClippedPathBoundingBox();this.contentVisible&&s!==null&&(this.pendingEOFill?(n.fill("evenodd"),this.pendingEOFill=!1):n.fill()),i&&n.restore(),e&&this.consumePath(s)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=kVt}eoClip(){this.pendingClip=dre}beginText(){this.current.textMatrix=SCe,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,n=this.ctx;if(e===void 0){n.beginPath();return}n.save(),n.beginPath();for(const r of e)n.setTransform(...r.transform),n.translate(r.x,r.y),r.addToPath(n,r.fontSize);
725n.restore(),n.clip(),n.beginPath(),delete this.pendingTextPaths}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,n){const r=this.commonObjs.get(e),o=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(o.fontMatrix=r.fontMatrix||Vz,(o.fontMatrix[0]===0||o.fontMatrix[3]===0)&&Fr("Invalid font matrix for font "+e),n<0?(n=-n,o.fontDirection=-1):o.fontDirection=1,this.current.font=r,this.current.fontSize=n,r.isType3Font)return;const i=r.loadedName||"sans-serif",s=r.systemFontInfo?.css||`"${i}", ${r.fallbackName}`;let a="normal";r.black?a="900":r.bold&&(a="bold");const l=r.italic?"italic":"normal";let c=n;n<rre?c=rre:n>ore&&(c=ore),this.current.fontSizeScale=n/c,this.ctx.font=`${l} ${a} ${c}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,n){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=n}setLeadingMoveText(e,n){this.setLeading(-n),this.moveText(e,n)}setTextMatrix(e,n,r,o,i,s){this.current.textMatrix=[e,n,r,o,i,s],this.current.textMatrixScale=Math.hypot(e,n),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,n,r,o){const i=this.ctx,s=this.current,a=s.font,l=s.textRenderingMode,c=s.fontSize/s.fontSizeScale,u=l&zl.FILL_STROKE_MASK,d=!!(l&zl.ADD_TO_PATH_FLAG),h=s.patternFill&&!a.missingFile;let f;(a.disableFontFace||d||h)&&(f=a.getPathGenerator(this.commonObjs,e)),a.disableFontFace||h?(i.save(),i.translate(n,r),i.beginPath(),f(i,c),o&&i.setTransform(...o),(u===zl.FILL||u===zl.FILL_STROKE)&&i.fill(),(u===zl.STROKE||u===zl.FILL_STROKE)&&i.stroke(),i.restore()):((u===zl.FILL||u===zl.FILL_STROKE)&&i.fillText(e,n,r),(u===zl.STROKE||u===zl.FILL_STROKE)&&i.strokeText(e,n,r)),d&&(this.pendingTextPaths||=[]).push({transform:qi(i),x:n,y:r,fontSize:c,addToPath:f})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const n=e.getImageData(0,0,10,10).data;let r=!1;for(let o=3;o<n.length;o+=4)if(n[o]>0&&n[o]<255){r=!0;break}return oo(this,"isFontSubpixelAAEnabled",r)}showText(e){const n=this.current,r=n.font;if(r.isType3Font)return this.showType3Text(e);const o=n.fontSize;if(o===0)return;const i=this.ctx,s=n.fontSizeScale,a=n.charSpacing,l=n.wordSpacing,c=n.fontDirection,u=n.textHScale*c,d=e.length,h=r.vertical,f=h?1:-1,p=r.defaultVMetrics,m=o*n.fontMatrix[0],y=n.textRenderingMode===zl.FILL&&!r.disableFontFace&&!n.patternFill;i.save(),i.transform(...n.textMatrix),i.translate(n.x,n.y+n.textRise),c>0?i.scale(u,-1):i.scale(u,1);let v;if(n.patternFill){i.save();const _=n.fillColor.getPattern(i,this,Ig(i),wc.FILL);v=qi(i),i.restore(),i.fillStyle=_}let b=n.lineWidth;const S=n.textMatrixScale;if(S===0||b===0){const _=n.textRenderingMode&zl.FILL_STROKE_MASK;(_===zl.STROKE||_===zl.FILL_STROKE)&&(b=this.getSinglePixelWidth())}else b/=S;if(s!==1&&(i.scale(s,s),b/=s),i.lineWidth=b,r.isInvalidPDFjsFont){const _=[];let P=0;for(const R of e)_.push(R.unicode),P+=R.width;i.fillText(_.join(""),0,0),n.x+=P*m*u,i.restore(),this.compose();return}let w=0,A;for(A=0;A<d;++A){const _=e[A];if(typeof _=="number"){w+=f*_*o/1e3;continue}let P=!1;const R=(_.isSpace?l:0)+a,O=_.fontChar,N=_.accent;let M,L,F=_.width;if(h){const D=_.vmetric||p,k=-(_.vmetric?D[1]:F*.5)*m,U=D[2]*m;F=D?-D[0]:F,M=k/s,L=(w+U)/s}else M=w/s,L=0;if(r.remeasure&&F>0){const D=i.measureText(O).width*1e3/o*s;if(F<D&&this.isFontSubpixelAAEnabled){const k=F/D;P=!0,i.save(),i.scale(k,1),M/=k}else F!==D&&(M+=(F-D)/2e3*o/s)}if(this.contentVisible&&(_.isInFont||r.missingFile)){if(y&&!N)i.fillText(O,M,L);else if(this.paintChar(O,M,L,v),N){const D=M+o*N.offset.x/s,k=L-o*N.offset.y/s;this.paintChar(N.fontChar,D,k,v)}}const $=h?F*m-R*c:F*m+R*c;w+=$,P&&i.restore()}h?n.y-=w:n.x+=w*u,i.restore(),this.compose()}showType3Text(e){const n=this.ctx,r=this.current,o=r.font,i=r.fontSize,s=r.fontDirection,a=o.vertical?1:-1,l=r.charSpacing,c=r.wordSpacing,u=r.textHScale*s,d=r.fontMatrix||Vz,h=e.length,f=r.textRenderingMode===zl.INVISIBLE;let p,m,y,v;if(!(f||i===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,n.save(),n.transform(...r.textMatrix),n.translate(r.x,r.y),n.scale(u,s),p=0;p<h;++p){if(m=e[p],typeof m=="number"){v=a*m*i/1e3,this.ctx.translate(v,0),r.x+=v*u;continue}const b=(m.isSpace?c:0)+l,S=o.charProcOperatorList[m.operatorListId];if(!S){Fr(`Type3 character "${m.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=m,this.save(),n.scale(i,i),n.transform(...d),this.executeOperatorList(S),this.restore(
725)),y=On.applyTransform([m.width,0],d)[0]*i+b,n.translate(y,0),r.x+=y*u}n.restore(),this.processingType3=null}}setCharWidth(e,n){}setCharWidthAndBounds(e,n,r,o,i,s){this.ctx.rect(r,o,i-r,s-o),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let n;if(e[0]==="TilingPattern"){const r=e[1],o=this.baseTransform||qi(this.ctx),i={createCanvasGraphics:s=>new I1(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};n=new _9(e,r,this.ctx,i,o)}else n=this._getPattern(e[1],e[2]);return n}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,n,r){const o=On.makeHexColor(e,n,r);this.ctx.strokeStyle=o,this.current.strokeColor=o}setFillRGBColor(e,n,r){const o=On.makeHexColor(e,n,r);this.ctx.fillStyle=o,this.current.fillColor=o,this.current.patternFill=!1}_getPattern(e,n=null){let r;return this.cachedPatterns.has(e)?r=this.cachedPatterns.get(e):(r=IVt(this.getObject(e)),this.cachedPatterns.set(e,r)),n&&(r.matrix=n),r}shadingFill(e){if(!this.contentVisible)return;const n=this.ctx;this.save();const r=this._getPattern(e);n.fillStyle=r.getPattern(n,this,Ig(n),wc.SHADING);const o=Ig(n);if(o){const{width:i,height:s}=n.canvas,[a,l,c,u]=On.getAxialAlignedBoundingBox([0,0,i,s],o);this.ctx.fillRect(a,l,c-a,u-l)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Go("Should not call beginInlineImage")}beginImageData(){Go("Should not call beginImageData")}paintFormXObjectBegin(e,n){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=qi(this.ctx),n)){const r=n[2]-n[0],o=n[3]-n[1];this.ctx.rect(n[0],n[1],r,o),this.current.updateRectMinMax(qi(this.ctx),n),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const n=this.ctx;e.isolated||QB("TODO: Support non-isolated groups."),e.knockout&&Fr("Knockout groups not supported.");const r=qi(n);if(e.matrix&&n.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let o=On.getAxialAlignedBoundingBox(e.bbox,qi(n));const i=[0,0,n.canvas.width,n.canvas.height];o=On.intersect(o,i)||[0,0,0,0];const s=Math.floor(o[0]),a=Math.floor(o[1]),l=Math.max(Math.ceil(o[2])-s,1),c=Math.max(Math.ceil(o[3])-a,1);this.current.startNewPathAndClipBox([0,0,l,c]);let u="groupAt"+this.groupLevel;e.smask&&(u+="_smask_"+this.smaskCounter++%2);const d=this.cachedCanvases.getCanvas(u,l,c),h=d.context;h.translate(-s,-a),h.transform(...r),e.smask?this.smaskStack.push({canvas:d.canvas,context:h,offsetX:s,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(n.setTransform(1,0,0,1,0,0),n.translate(s,a),n.save()),RT(n,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(n),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const n=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const o=qi(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...o);const i=On.getAxialAlignedBoundingBox([0,0,n.canvas.width,n.canvas.height],o);this.ctx.drawImage(n.canvas,0,0),this.ctx.restore(),this.compose(i)}}beginAnnotation(e,n,r,o,i){if(this.#e(),AM(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),n){const s=n[2]-n[0],a=n[3]-n[1];if(i&&this.annotationCanvasMap){r=r.slice(),r[4]-=n[0],r[5]-=n[1],n=n.slice(),n[0]=n[1]=0,n[2]=s,n[3]=a;const[l,c]=On.singularValueDecompose2dScale(qi(this.ctx)),{viewportScale:u}=this,d=Math.ceil(s*this.outputScaleX*u),h=Math.ceil(a*this.outputScaleY*u);this.annotationCanvas=this.canvasFactory.create(d,h);const{canvas:f,context:p}=this.annotationCanvas;this.annotationCanvasMap.set(e,f),this.annotationCanvas.savedCtx=this.ctx,this.ctx=p,this.ctx.save(),this.ctx.setTransform(l,0,0,-c,0,a*c),AM(this.ctx)}else AM(this.ctx),this.ctx.rect(n[0],n[1],s,a),this.ctx.clip(),this.endPath()}
vendor: 5,515 bytes, line 725
725this.current=new are(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...o)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#t(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const n=e.count;e=this.getObject(e.data,e),e.count=n;const r=this.ctx,o=this.processingType3;if(o&&(o.compiled===void 0&&(o.compiled=MVt(e)),o.compiled)){o.compiled(r);return}const i=this._createMaskCanvas(e),s=i.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(s,i.offsetX,i.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,n,r=0,o=0,i,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);const a=this.ctx;a.save();const l=qi(a);a.transform(n,r,o,i,0,0);const c=this._createMaskCanvas(e);a.setTransform(1,0,0,1,c.offsetX-l[4],c.offsetY-l[5]);for(let u=0,d=s.length;u<d;u+=2){const h=On.transform(l,[n,r,o,i,s[u],s[u+1]]),[f,p]=On.applyTransform([0,0],h);a.drawImage(c.canvas,f,p)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const n=this.ctx,r=this.current.fillColor,o=this.current.patternFill;for(const i of e){const{data:s,width:a,height:l,transform:c}=i,u=this.cachedCanvases.getCanvas("maskCanvas",a,l),d=u.context;d.save();const h=this.getObject(s,i);cre(d,h),d.globalCompositeOperation="source-in",d.fillStyle=o?r.getPattern(d,this,Ig(n),wc.FILL):r,d.fillRect(0,0,a,l),d.restore(),n.save(),n.transform(...c),n.scale(1,-1),wM(n,u.canvas,0,0,a,l,0,-1,1,1),n.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const n=this.getObject(e);if(!n){Fr("Dependent image isn't ready yet");return}this.paintInlineImageXObject(n)}paintImageXObjectRepeat(e,n,r,o){if(!this.contentVisible)return;const i=this.getObject(e);if(!i){Fr("Dependent image isn't ready yet");return}const s=i.width,a=i.height,l=[];for(let c=0,u=o.length;c<u;c+=2)l.push({transform:[n,0,0,r,o[c],o[c+1]],x:0,y:0,w:s,h:a});this.paintInlineImageXObjectGroup(i,l)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return e.bitmap;const{bitmap:n,width:r,height:o}=e,i=this.cachedCanvases.getCanvas("inlineImage",r,o),s=i.context;return s.filter=this.current.transferMaps,s.drawImage(n,0,0),s.filter="none",i.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const n=e.width,r=e.height,o=this.ctx;if(this.save(),!Jl){const{filter:a}=o;a!=="none"&&a!==""&&(o.filter="none")}o.scale(1/n,-1/r);let i;if(e.bitmap)i=this.applyTransferMapsToBitmap(e);else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)i=e;else{const l=this.cachedCanvases.getCanvas("inlineImage",n,r).context;lre(l,e),i=this.applyTransferMapsToCanvas(l)}const s=this._scaleImage(i,Ig(o));o.imageSmoothingEnabled=ure(qi(o),e.interpolate),wM(o,s.img,0,0,s.paintWidth,s.paintHeight,0,-r,n,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,n){if(!this.contentVisible)return;const r=this.ctx;let o;if(e.bitmap)o=e.bitmap;else{const i=e.width,s=e.height,l=this.cachedCanvases.getCanvas("inlineImage",i,s).context;lre(l,e),o=this.applyTransferMapsToCanvas(l)}for(const i of n)r.save(),r.transform(...i.transform),r.scale(1,-1),wM(r,o,i.x,i.y,i.w,i.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,n){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,n){e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(n)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const n=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const r=this.ctx;this.pendingClip&&(n||(this.pendingClip===dre?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=qi(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const n=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),o=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,o)/n}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e}=this.current,{a:n,b:r,c:o,d:i}=this.ctx.getTransform();let s,a;if(r===0&&o===0){const l=Math.abs(n),c=Math.abs(i);if(l===c)if(e===0)s=a=1/l;else{const u=l*e;s=a=u<1?1/u:1}else if(e===0)s=1/l,a=1/c;else{const u=l*e,d=c*e;s=u<1?1/u:1,a=d<1?1/d:1}}else{const l=Math.abs(n*i-r*o),c=Math.hypot(n,r),u=Math.hypot(o,i);if(e===0)s=u/l,a=c/l;else{const d=e*l;s=u>d?u/d:1,a=c>d?c/d:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:n}=this,{lineWidth:r}=this.current,[o,i]=this.getScaleForStroking();if(n.lineWidth=r||1,o===1&&i===1){n.stroke();return}const s=n.getLineDash();if(e&&n.save(),n.scale(o,i),s.length>0){const a=Math.max(o,i);n.setLineDash(s.map(l=>l/a)),n.lineDashOffset/=a}
725n.stroke(),e&&n.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}for(const t in Jh)I1.prototype[t]!==void 0&&(I1.prototype[Jh[t]]=I1.prototype[t]);class kP{static#e=null;static#t="";static get workerPort(){return this.#e}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");this.#e=e}static get workerSrc(){return this.#t}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");this.#t=e}}const TM={UNKNOWN:0,DATA:1,ERROR:2},Vs={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function Uu(t){switch(t instanceof Error||typeof t=="object"&&t!==null||Go('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new bS(t.message);case"MissingPDFException":return new vS(t.message);case"PasswordException":return new Wz(t.message,t.code);case"UnexpectedResponseException":return new ZB(t.message,t.status);case"UnknownErrorException":return new jz(t.message,t.details);default:return new jz(t.message,t.toString())}}class d_{constructor(e,n,r){this.sourceName=e,this.targetName=n,this.comObj=r,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=o=>{const i=o.data;if(i.targetName!==this.sourceName)return;if(i.stream){this.#t(i);return}if(i.callback){const a=i.callbackId,l=this.callbackCapabilities[a];if(!l)throw new Error(`Cannot resolve callback ${a}`);if(delete this.callbackCapabilities[a],i.callback===TM.DATA)l.resolve(i.data);else if(i.callback===TM.ERROR)l.reject(Uu(i.reason));else throw new Error("Unexpected callback case");return}const s=this.actionHandler[i.action];if(!s)throw new Error(`Unknown action from worker: ${i.action}`);if(i.callbackId){const a=this.sourceName,l=i.sourceName;new Promise(function(c){c(s(i.data))}).then(function(c){r.postMessage({sourceName:a,targetName:l,callback:TM.DATA,callbackId:i.callbackId,data:c})},function(c){r.postMessage({sourceName:a,targetName:l,callback:TM.ERROR,callbackId:i.callbackId,reason:Uu(c)})});return}if(i.streamId){this.#e(i);return}s(i.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,n){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=n}send(e,n,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:n},r)}sendWithPromise(e,n,r){const o=this.callbackId++,i=Promise.withResolvers();this.callbackCapabilities[o]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:o,data:n},r)}catch(s){i.reject(s)}return i.promise}sendWithStream(e,n,r,o){const i=this.streamId++,s=this.sourceName,a=this.targetName,l=this.comObj;return new ReadableStream({start:c=>{const u=Promise.withResolvers();return this.streamControllers[i]={controller:c,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:s,targetName:a,action:e,streamId:i,data:n,desiredSize:c.desiredSize},o),u.promise},pull:c=>{const u=Promise.withResolvers();return this.streamControllers[i].pullCall=u,l.postMessage({sourceName:s,targetName:a,stream:Vs.PULL,streamId:i,desiredSize:c.desiredSize}),u.promise},cancel:c=>{va(c instanceof Error,"cancel must have a valid reason");const u=Promise.withResolvers();return this.streamControllers[i].cancelCall=u,this.streamControllers[i].isClosed=!0,l.postMessage({sourceName:s,targetName:a,stream:Vs.CANCEL,streamId:i,reason:Uu(c)}),u.promise}},r)}#e(e){const n=e.streamId,r=this.sourceName,o=e.sourceName,i=this.comObj,s=this,a=this.actionHandler[e.action],l={enqueue(c,u=1,d){if(this.isCancelled)return;const h=this.desiredSize;this.desiredSize-=u,h>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:r,targetName:o,stream:Vs.ENQUEUE,streamId:n,chunk:c},d)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:o,stream:Vs.CLOSE,streamId:n}),delete s.streamSinks[n])},error(c){va(c instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:o,stream:Vs.ERROR,streamId:n,reason:Uu(c)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[n]=l,new Promise(function(c){c(a(e.data,l))}).then(function(){i.postMessage({sourceName:r,targetName:o,stream:Vs.START_COMPLETE,streamId:n,success:!0})},function(c){i.postMessage({sourceName:r,targetName:o,stream:Vs.START_COMPLETE,streamId:n,reason:Uu(c)})})}
725#t(e){const n=e.streamId,r=this.sourceName,o=e.sourceName,i=this.comObj,s=this.streamControllers[n],a=this.streamSinks[n];switch(e.stream){case Vs.START_COMPLETE:e.success?s.startCall.resolve():s.startCall.reject(Uu(e.reason));break;case Vs.PULL_COMPLETE:e.success?s.pullCall.resolve():s.pullCall.reject(Uu(e.reason));break;case Vs.PULL:if(!a){i.postMessage({sourceName:r,targetName:o,stream:Vs.PULL_COMPLETE,streamId:n,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise(function(l){l(a.onPull?.())}).then(function(){i.postMessage({sourceName:r,targetName:o,stream:Vs.PULL_COMPLETE,streamId:n,success:!0})},function(l){i.postMessage({sourceName:r,targetName:o,stream:Vs.PULL_COMPLETE,streamId:n,reason:Uu(l)})});break;case Vs.ENQUEUE:if(va(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case Vs.CLOSE:if(va(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),this.#n(s,n);break;case Vs.ERROR:va(s,"error should have stream controller"),s.controller.error(Uu(e.reason)),this.#n(s,n);break;case Vs.CANCEL_COMPLETE:e.success?s.cancelCall.resolve():s.cancelCall.reject(Uu(e.reason)),this.#n(s,n);break;case Vs.CANCEL:if(!a)break;new Promise(function(l){l(a.onCancel?.(Uu(e.reason)))}).then(function(){i.postMessage({sourceName:r,targetName:o,stream:Vs.CANCEL_COMPLETE,streamId:n,success:!0})},function(l){i.postMessage({sourceName:r,targetName:o,stream:Vs.CANCEL_COMPLETE,streamId:n,reason:Uu(l)})}),a.sinkCapability.reject(Uu(e.reason)),a.isCancelled=!0,delete this.streamSinks[n];break;default:throw new Error("Unexpected stream case")}}async#n(e,n){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[n]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}class FVt{#e;#t;constructor({parsedData:e,rawData:n}){this.#e=e,this.#t=n}getRaw(){return this.#t}get(e){return this.#e.get(e)??null}getAll(){return m9(this.#e)}has(e){return this.#e.has(e)}}const My=Symbol("INTERNAL");class BVt{#e=!1;#t=!1;#n=!1;#o=!0;constructor(e,{name:n,intent:r,usage:o}){this.#e=!!(e&Kd.DISPLAY),this.#t=!!(e&Kd.PRINT),this.name=n,this.intent=r,this.usage=o}get visible(){if(this.#n)return this.#o;if(!this.#o)return!1;const{print:e,view:n}=this.usage;return this.#e?n?.viewState!=="OFF":this.#t?e?.printState!=="OFF":!0}_setVisible(e,n,r=!1){e!==My&&Go("Internal method `_setVisible` called."),this.#n=r,this.#o=n}}class $Vt{#e=null;#t=new Map;#n=null;#o=null;constructor(e,n=Kd.DISPLAY){if(this.renderingIntent=n,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,this.#o=e.order;for(const r of e.groups)this.#t.set(r.id,new BVt(n,r));if(e.baseState==="OFF")for(const r of this.#t.values())r._setVisible(My,!1);for(const r of e.on)this.#t.get(r)._setVisible(My,!0);for(const r of e.off)this.#t.get(r)._setVisible(My,!1);this.#n=this.getHash()}}#s(e){const n=e.length;if(n<2)return!0;const r=e[0];for(let o=1;o<n;o++){const i=e[o];let s;if(Array.isArray(i))s=this.#s(i);else if(this.#t.has(i))s=this.#t.get(i).visible;else return Fr(`Optional content group not found: ${i}`),!0;switch(r){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return r==="And"}isVisible(e){if(this.#t.size===0)return!0;if(!e)return QB("Optional content group not defined."),!0;if(e.type==="OCG")return this.#t.has(e.id)?this.#t.get(e.id).visible:(Fr(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return this.#s(e.expression);if(!e.policy||e.policy==="AnyOn"){for(const n of e.ids){if(!this.#t.has(n))return Fr(`Optional content group not found: ${n}`),!0;if(this.#t.get(n).visible)return!0}return!1}else if(e.policy==="AllOn"){for(const n of e.ids){if(!this.#t.has(n))return Fr(`Optional content group not found: ${n}`),!0;if(!this.#t.get(n).visible)return!1}return!0}else if(e.policy==="AnyOff"){for(const n of e.ids){if(!this.#t.has(n))return Fr(`Optional content group not found: ${n}`),!0;if(!this.#t.get(n).visible)return!0}return!1}else if(e.policy==="AllOff"){for(const n of e.ids){if(!this.#t.has(n))return Fr(`Optional content group not found: ${n}`),!0;if(this.#t.get(n).visible)return!1}return!0}return Fr(`Unknown optional content policy ${e.policy}.`),!0}return Fr(`Unknown group type ${e.type}.`),!0}setVisibility(e,n=!0){const r=this.#t.get(e);if(!r){Fr(`Optional content group not found: ${e}`);return}r._setVisible(My,!!n,!0),this.#e=null}setOCGState({state:e,preserveRB:n}){let r;for(const o of e){switch(o){case"ON":case"OFF":case"Toggle":r=o;continue}const i=this.#t.get(o);if(i)switch(r){case"ON":i._setVisible(My,!0);break;case"OFF":i._setVisible(My,!1);break;case"Toggle":i._setVisible(My,!i.visible);break}}this.#e=null}get hasInitialVisibility(){return this.#n===null||this.getHash()===this.#n}getOrder(){return this.#t.size?this.#o?this.#o.slice():[...this.#t.keys()]:null}getGroups(){return this.#t.size>0?m9(this.#t):null}getGroup(e){return this.#t.get(e)||null}getHash(){if(this.#e!==null)return this.#e;
725const e=new PCe;for(const[n,r]of this.#t)e.update(`${n}:${r.visible}`);return this.#e=e.hexdigest()}}class HVt{constructor(e,{disableRange:n=!1,disableStream:r=!1}){va(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:o,initialData:i,progressiveDone:s,contentDispositionFilename:a}=e;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=a,i?.length>0){const l=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!r,this._isRangeSupported=!n,this._contentLength=o,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((l,c)=>{this._onReceiveData({begin:l,chunk:c})}),e.addProgressListener((l,c)=>{this._onProgress({loaded:l,total:c})}),e.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:n}){const r=n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer;if(e===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{const o=this._rangeReaders.some(function(i){return i._begin!==e?!1:(i._enqueue(r),!0)});va(o,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){e.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const n=this._rangeReaders.indexOf(e);n>=0&&this._rangeReaders.splice(n,1)}getFullReader(){va(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new UVt(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,n){if(n<=this._progressiveDataLength)return null;const r=new zVt(this,e,n);return this._pdfDataRangeTransport.requestDataRange(e,n),this._rangeReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const n of this._rangeReaders.slice(0))n.cancel(e);this._pdfDataRangeTransport.abort()}}class UVt{constructor(e,n,r=!1,o=null){this._stream=e,this._done=r||!1,this._filename=S9(o)?o:null,this._queuedChunks=n||[],this._loaded=0;for(const i of this._queuedChunks)this._loaded+=i.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class zVt{constructor(e,n,r){this._stream=e,this._begin=n,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function VVt(t){let e=!0,n=r("filename\\*","i").exec(t);if(n){n=n[1];let u=a(n);return u=unescape(u),u=l(u),u=c(u),i(u)}if(n=s(t),n){const u=c(n);return i(u)}
725if(n=r("filename","i").exec(t),n){n=n[1];let u=a(n);return u=c(u),i(u)}function r(u,d){return new RegExp("(?:^|;)\\s*"+u+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',d)}function o(u,d){if(u){if(!/^[\x00-\xFF]+$/.test(d))return d;try{const h=new TextDecoder(u,{fatal:!0}),f=JB(d);d=h.decode(f),e=!1}catch{}}return d}function i(u){return e&&/[\x80-\xff]/.test(u)&&(u=o("utf-8",u),e&&(u=o("iso-8859-1",u))),u}function s(u){const d=[];let h;const f=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(h=f.exec(u))!==null;){let[,m,y,v]=h;if(m=parseInt(m,10),m in d){if(m===0)break;continue}d[m]=[y,v]}const p=[];for(let m=0;m<d.length&&m in d;++m){let[y,v]=d[m];v=a(v),y&&(v=unescape(v),m===0&&(v=l(v))),p.push(v)}return p.join("")}function a(u){if(u.startsWith('"')){const d=u.slice(1).split('\\"');for(let h=0;h<d.length;++h){const f=d[h].indexOf('"');f!==-1&&(d[h]=d[h].slice(0,f),d.length=h+1),d[h]=d[h].replaceAll(/\\(.)/g,"$1")}u=d.join('"')}return u}function l(u){const d=u.indexOf("'");if(d===-1)return u;const h=u.slice(0,d),p=u.slice(d+1).replace(/^[^']*'/,"");return o(h,p)}function c(u){return!u.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(u)?u:u.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(d,h,f,p){if(f==="q"||f==="Q")return p=p.replaceAll("_"," "),p=p.replaceAll(/=([0-9a-fA-F]{2})/g,function(m,y){return String.fromCharCode(parseInt(y,16))}),o(h,p);try{p=atob(p)}catch{}return o(h,p)})}return""}function I9({getResponseHeader:t,isHttp:e,rangeChunkSize:n,disableRange:r}){const o={allowRangeRequests:!1,suggestedLength:void 0},i=parseInt(t("Content-Length"),10);return!Number.isInteger(i)||(o.suggestedLength=i,i<=2*n)||r||!e||t("Accept-Ranges")!=="bytes"||(t("Content-Encoding")||"identity")!=="identity"||(o.allowRangeRequests=!0),o}function P9(t){const e=t("Content-Disposition");if(e){let n=VVt(e);if(n.includes("%"))try{n=decodeURIComponent(n)}catch{}if(S9(n))return n}return null}function i$(t,e){return t===404||t===0&&e.startsWith("file:")?new vS('Missing PDF "'+e+'".'):new ZB(`Unexpected server response (${t}) while retrieving PDF "${e}".`,t)}function NCe(t){return t===200||t===206}function MCe(t,e,n){return{method:"GET",headers:t,signal:n.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function DCe(t){const e=new Headers;for(const n in t){const r=t[n];r!==void 0&&e.append(n,r)}return e}function LCe(t){return t instanceof Uint8Array?t.buffer:t instanceof ArrayBuffer?t:(Fr(`getArrayBuffer - unexpected data format: ${t}`),new Uint8Array(t).buffer)}class hre{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return va(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new GVt(this),this._fullRequestReader}getRangeReader(e,n){if(n<=this._progressiveDataLength)return null;const r=new WVt(this,e,n);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const n of this._rangeRequestReaders.slice(0))n.cancel(e)}}class GVt{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const n=e.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=Promise.withResolvers(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=DCe(this._stream.httpHeaders);const r=n.url;fetch(r,MCe(this._headers,this._withCredentials,this._abortController)).then(o=>{if(!NCe(o.status))throw i$(o.status,r);this._reader=o.body.getReader(),this._headersCapability.resolve();const i=l=>o.headers.get(l),{allowRangeRequests:s,suggestedLength:a}=I9({getResponseHeader:i,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=a||this._contentLength,this._filename=P9(i),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new bS("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:n}=await this._reader.read();return n?{value:e,done:n}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:LCe(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class WVt{constructor(e,n,r){this._stream=e,this._reader=null,this._loaded=0;const o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!o.disableStream,this._abortController=new AbortController,this._headers=DCe(this._stream.httpHeaders),this._headers.append("Range",`bytes=${n}-${r-1}`);const i=o.url;fetch(i,MCe(this._headers,this._withCredentials,this._abortController)).then(s=>{if(!NCe(s.status))throw i$(s.status,i);this._readCapability.resolve(),this._reader=s.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:n}=await this._reader.read();return n?{value:e,done:n}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:LCe(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}const SU=200,EU=206;function jVt(t){const e=t.response;return typeof e!="string"?e:JB(e).buffer}class qVt{constructor(e,n={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&n.httpHeaders||Object.create(null),this.withCredentials=n.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,n,r){const o={begin:e,end:n};for(const i in r)o[i]=r[i];return this.request(o)}requestFull(e){return this.request(e)}request(e){const n=new XMLHttpRequest,r=this.currXhrId++,o=this.pendingRequests[r]={x
725hr:n};n.open("GET",this.url),n.withCredentials=this.withCredentials;for(const i in this.httpHeaders){const s=this.httpHeaders[i];s!==void 0&&n.setRequestHeader(i,s)}return this.isHttp&&"begin"in e&&"end"in e?(n.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),o.expectedStatus=EU):o.expectedStatus=SU,n.responseType="arraybuffer",e.onError&&(n.onerror=function(i){e.onError(n.status)}),n.onreadystatechange=this.onStateChange.bind(this,r),n.onprogress=this.onProgress.bind(this,r),o.onHeadersReceived=e.onHeadersReceived,o.onDone=e.onDone,o.onError=e.onError,o.onProgress=e.onProgress,n.send(null),r}onProgress(e,n){const r=this.pendingRequests[e];r&&r.onProgress?.(n)}onStateChange(e,n){const r=this.pendingRequests[e];if(!r)return;const o=r.xhr;if(o.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),o.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],o.status===0&&this.isHttp){r.onError?.(o.status);return}const i=o.status||SU;if(!(i===SU&&r.expectedStatus===EU)&&i!==r.expectedStatus){r.onError?.(o.status);return}const a=jVt(o);if(i===EU){const l=o.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);r.onDone({begin:parseInt(c[1],10),chunk:a})}else a?r.onDone({begin:0,chunk:a}):r.onError?.(o.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const n=this.pendingRequests[e].xhr;delete this.pendingRequests[e],n.abort()}}class YVt{constructor(e){this._source=e,this._manager=new qVt(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const n=this._rangeRequestReaders.indexOf(e);n>=0&&this._rangeRequestReaders.splice(n,1)}getFullReader(){return va(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new XVt(this._manager,this._source),this._fullRequestReader}getRangeReader(e,n){const r=new KVt(this._manager,e,n);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const n of this._rangeRequestReaders.slice(0))n.cancel(e)}}class XVt{constructor(e,n){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=n.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=n.disableRange||!1,this._contentLength=n.length,this._rangeChunkSize=n.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,n=this._manager.getRequestXhr(e),r=s=>n.getResponseHeader(s),{allowRangeRequests:o,suggestedLength:i}=I9({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});o&&(this._isRangeSupported=!0),this._contentLength=i||this._contentLength,this._filename=P9(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=i$(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const n of this._requests)n.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest
725(this._fullRequestId),this._fullRequestReader=null}}class KVt{constructor(e,n,r){this._manager=e;const o={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(n,r,o),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){const n=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:n,done:!1}):this._queuedChunk=n,this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=i$(e,this._url);for(const n of this._requests)n.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const kCe=/^file:\/\/\/[a-zA-Z]:\//;function QVt(t){const e=Xp.get("url"),n=e.parse(t);return n.protocol==="file:"||n.host?n:/^[a-z]:[/\\]/i.test(t)?e.parse(`file:///${t}`):(n.host||(n.protocol="file:"),n)}class ZVt{constructor(e){this.source=e,this.url=QVt(e.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return va(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new tGt(this):new JVt(this),this._fullRequestReader}getRangeReader(e,n){if(n<=this._progressiveDataLength)return null;const r=this.isFsUrl?new nGt(this,e,n):new eGt(this,e,n);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const n of this._rangeRequestReaders.slice(0))n.cancel(e)}}class FCe{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const n=e.source;this._contentLength=n.length,this._loaded=0,this._filename=null,this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",n=>{this._error(n)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new bS("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class BCe{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const n=e.source;this._isStreamingSupported=!n.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",n=>{this._error(n)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function ek(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class JVt extends FCe{constructor(e){super(e);const n=r=>{if(r.statusCode===404){const a=new vS(`Missing PDF "${this._url}".`);this._storedError=a,this._headersCapability.reject(a);return}this._headersCapability.resolve(),this._setReadableStream(r);const o=a=>this._readableStream.headers[a.toLowerCase()],{allowRangeRequests:i,suggestedLength:s}=I9({getResponseHeader:o,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=s||this._contentLength,this._filename=P9(o)};if(this._request=null,this._url.protocol==="http:"){const r=Xp.get("http");this._request=r.request(ek(this._url,e.httpHeaders),n)}else{const r=Xp.get("https");this._request=r.request(ek(this._url,e.httpHeaders),n)}this._request.on("error",r=>{this._storedError=r,this._headersCapability.reject(r)}),this._request.end()}}class eGt extends BCe{constructor(e,n,r){super(e),this._httpHeaders={};for(const i in e.httpHeaders){const s=e.httpHeaders[i];s!==void 0&&(this._httpHeaders[i]=s)}this._httpHeaders.Range=`bytes=${n}-${r-1}`;const o=i=>{if(i.statusCode===404){const s=new vS(`Missing PDF "${this._url}".`);this._storedError=s;return}this._setReadableStream(i)};if(this._request=null,this._url.protocol==="http:"){const i=Xp.get("http");this._request=i.request(ek(this._url,this._httpHeaders),o)}else{const i=Xp.get("https");this._request=i.request(ek(this._url,this._httpHeaders),o)}this._request.on("error",i=>{this._storedError=i}),this._request.end()}}class tGt extends FCe{constructor(e){super(e);let n=decodeURIComponent(this._url.path);kCe.test(this._url.href)&&(n=n.replace(/^\//,""));const r=Xp.get("fs");r.promises.lstat(n).then(o=>{this._contentLength=o.size,this._setReadableStream(r.createReadStream(n)),this._headersCapability.resolve()},o=>{o.code==="ENOENT"&&(o=new vS(`Missing PDF "${n}".`)),this._storedError=o,this._headersCapability.reject(o)})}}class nGt extends BCe{constructor(e,n,r){super(e);let o=decodeURIComponent(this._url.path);kCe.test(this._url.href)&&(o=o.replace(/^\//,""));const i=Xp.get("fs");this._setReadableStream(i.createReadStream(o,{start:n,end:r-1}))}}const rGt=1e5,Jc=30,oGt=.8;let tk=class NE{#e=Promise.withResolvers();#t=null;#n=!1;#o=!!globalThis.FontInspector?.enabled;#s=null;#r=null;#i=0;#c=0;#l=null;#d=null;#f=0;#u=0;#a=Object.create(null);#p=[];#g=null;#h=[];#v=new WeakMap;#m=null;static#b=new Map;static#S=new Map;static#w=new Set;constructor({textContentSource:e,container:n,viewport:r}){if(e instanceof ReadableStream)this.#g=e;else if(typeof e=="object")this.#g=new ReadableStream({start(l){l.enqueue(e),l.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#t=this.#d=n,this.#u=r.scale*(globalThis.devicePixelRatio||1),this.#f=r.rotation,this.#r={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null};const{pageWidth:o,pageHeight:i,pageX:s,pageY:a}=r.rawDims;this.#m=[1,0,0,-1,-s,a+i],this.#c=o,this.#i=i,WC(n,r),this.#e.promise.catch(()=>{}).then(()=>{NE.#w.delete(this),this.#r=null,this.#a=null})}render(){const e=()=>{this.#l.read().then(({value:n,done:r})=>{if(r){this.#e.resolve();return}this.#s??=n.lang,Object.assign(this.#a,n.styles),this.#A(n.items),e()},this.#e.reject)};return this.#l=this.#g.getReader(),NE.#w.add(this),e(),this.#e.promise}update({viewport:e,onBefore:n=null}){const r=e.scale*(globalThis.devicePixelRatio||1),o=e.rotation;if(o!==this.#f&&(n?.(),this.#f=o,WC(this.#d,{rotation:o})),r!==this.#u){n?.(),this.#u=r;const i={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:NE.#C(this.#s)};for(const s of this.#h)i.properties=this.#v.get(s),i.div=s,this.#T(i)}}cancel(){const e=new bS("TextLayer task cancelled.");this.#l?.cancel(e).catch(()=>{}),this.#l=null,this.#e.reject(e)}get textDivs(){return this.#h}get textContentItemsStr(){return this.#p}#A(e){if(this.#n)return;this.#r.ctx||=NE.#C(this.#s);const n=this.#h,r=this.#p;for(const o of e){if(n.length>rGt){Fr("Ignoring additional textDivs for performance reasons."),this.#n=!0;return}if(o.str===void 0){if(o.type==="beginMarkedContentProps"||o.type==="beginMarkedContent"){const i=this.#t;this.#t=document.createElement("span"),this.#t.classList.add("markedContent"),o.id!==null&&this.#t.setAttribute("id",`${o.id}`),i.append(this.#t)}else o.type==="endMarkedContent"&&(this.#t=this.#t.parentNode);continue}r.push(o.str),this.#I(o)}}#I(e){const n=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};this.#h.push(n);const o=On.transform(this.#m,e.transform);let i=Math.atan2(o[1],o[0]);const s=this.#a[e.fontName];s.vertical&&(i+=Math.PI/2);const a=this.#o&&s.fontSubstitution||s.fontFamily,l=Math.hypot(o[2],o[3]),c=l*NE.#y(a,this.#s);let u,d;i===0?(u=o[4],d=o[5]-c):(u=o[4]+c*Math.sin(i),d=o[5]-c*Math.cos(i));const h="calc(var(--scale-factor)*",f=n.style;this.#t===this.#d?(f.left=`${(100*u/this.#c).toFixed(2)}%`,f.top=`${(100*d/this.#i).toFixed(2)}%`):(f.left=`${h}${u.toFixed(2)}px)`,f.top=`${h}${d.toFixed(2)}px)`),f.fontSize=`${h}${l.toFixed(2)}px)`,f.fontFamily=a,r.fontSize=l,n.setAttribute("role","presentation"),n.textContent=e.str,n.dir=e.dir,this.#o&&(n.dataset.fontName=s.fontSubstitutionLoadedName||e.fontName),i!==0&&(r.angle=i*(180/Math.PI));let p=!1;if(e.str.length>1)p=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){const m=Math.abs(e.transform[0]),y=Math.abs(e.transform[3]);m!==y&&Math.max(m,y)/Math.min(m,y)>1.5&&(p=!0)}
725if(p&&(r.canvasWidth=s.vertical?e.height:e.width),this.#v.set(n,r),this.#r.div=n,this.#r.properties=r,this.#T(this.#r),r.hasText&&this.#t.append(n),r.hasEOL){const m=document.createElement("br");m.setAttribute("role","presentation"),this.#t.append(m)}}#T(e){const{div:n,properties:r,ctx:o,prevFontSize:i,prevFontFamily:s}=e,{style:a}=n;let l="";if(r.canvasWidth!==0&&r.hasText){const{fontFamily:c}=a,{canvasWidth:u,fontSize:d}=r;(i!==d||s!==c)&&(o.font=`${d*this.#u}px ${c}`,e.prevFontSize=d,e.prevFontFamily=c);const{width:h}=o.measureText(n.textContent);h>0&&(l=`scaleX(${u*this.#u/h})`)}r.angle!==0&&(l=`rotate(${r.angle}deg) ${l}`),l.length>0&&(a.transform=l)}static cleanup(){if(!(this.#w.size>0)){this.#b.clear();for(const{canvas:e}of this.#S.values())e.remove();this.#S.clear()}}static#C(e=null){let n=this.#S.get(e||="");if(!n){const r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=e,document.body.append(r),n=r.getContext("2d",{alpha:!1}),this.#S.set(e,n)}return n}static#y(e,n){const r=this.#b.get(e);if(r)return r;const o=this.#C(n),i=o.font;o.canvas.width=o.canvas.height=Jc,o.font=`${Jc}px ${e}`;const s=o.measureText("");let a=s.fontBoundingBoxAscent,l=Math.abs(s.fontBoundingBoxDescent);if(a){const d=a/(a+l);return this.#b.set(e,d),o.canvas.width=o.canvas.height=0,o.font=i,d}o.strokeStyle="red",o.clearRect(0,0,Jc,Jc),o.strokeText("g",0,0);let c=o.getImageData(0,0,Jc,Jc).data;l=0;for(let d=c.length-1-3;d>=0;d-=4)if(c[d]>0){l=Math.ceil(d/4/Jc);break}o.clearRect(0,0,Jc,Jc),o.strokeText("A",0,Jc),c=o.getImageData(0,0,Jc,Jc).data,a=0;for(let d=0,h=c.length;d<h;d+=4)if(c[d]>0){a=Jc-Math.floor(d/4/Jc);break}o.canvas.width=o.canvas.height=0,o.font=i;const u=a?a/(a+l):oGt;return this.#b.set(e,u),u}};function iGt(){_Ce("`renderTextLayer`, please use `TextLayer` instead.");const{textContentSource:t,container:e,viewport:n,...r}=arguments[0],o=Object.keys(r);o.length>0&&Fr("Ignoring `renderTextLayer` parameters: "+o.join(", "));const i=new tk({textContentSource:t,container:e,viewport:n}),{textDivs:s,textContentItemsStr:a}=i;return{promise:i.render(),textDivs:s,textContentItemsStr:a}}function sGt(){_Ce("`updateTextLayer`, please use `TextLayer` instead.")}class FP{static textContent(e){const n=[],r={items:n,styles:Object.create(null)};function o(i){if(!i)return;let s=null;const a=i.name;if(a==="#text")s=i.value;else if(FP.shouldBuildText(a))i?.attributes?.textContent?s=i.attributes.textContent:i.value&&(s=i.value);else return;if(s!==null&&n.push({str:s}),!!i.children)for(const l of i.children)o(l)}return o(e),r}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}}const aGt=65536,lGt=100,cGt=5e3,uGt=Jl?SVt:lVt,dGt=Jl?EVt:ACe,hGt=Jl?CVt:aVt,fGt=Jl?xVt:TCe;function pGt(t){if(typeof t=="string"||t instanceof URL?t={url:t}:(t instanceof ArrayBuffer||ArrayBuffer.isView(t))&&(t={data:t}),typeof t!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const e=new R9,{docId:n}=e,r=t.url?gGt(t.url):null,o=t.data?mGt(t.data):null,i=t.httpHeaders||null,s=t.withCredentials===!0,a=t.password??null,l=t.range instanceof $Ce?t.range:null,c=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:aGt;let u=t.worker instanceof eh?t.worker:null;const d=t.verbosity,h=typeof t.docBaseUrl=="string"&&!C9(t.docBaseUrl)?t.docBaseUrl:null,f=typeof t.cMapUrl=="string"?t.cMapUrl:null,p=t.cMapPacked!==!1,m=t.CMapReaderFactory||dGt,y=typeof t.standardFontDataUrl=="string"?t.standardFontDataUrl:null,v=t.StandardFontDataFactory||fGt,b=t.stopAtErrors!==!0,S=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,w=t.isEvalSupported!==!1,A=typeof t.isOffscreenCanvasSupported=="boolean"?t.isOffscreenCanvasSupported:!Jl,_=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,P=typeof t.disableFontFace=="boolean"?t.disableFontFace:Jl,R=t.fontExtraProperties===!0,O=t.enableXfa===!0,N=t.ownerDocument||globalThis.document,M=t.disableRange===!0,L=t.disableStream===!0,F=t.disableAutoFetch===!0,$=t.pdfBug
725===!0,D=l?l.length:t.length??NaN,k=typeof t.useSystemFonts=="boolean"?t.useSystemFonts:!Jl&&!P,U=typeof t.useWorkerFetch=="boolean"?t.useWorkerFetch:m===ACe&&v===TCe&&f&&y&&u_(f,document.baseURI)&&u_(y,document.baseURI),H=t.canvasFactory||new uGt({ownerDocument:N}),V=t.filterFactory||new hGt({docId:n,ownerDocument:N}),q=null;Kzt(d);const J={canvasFactory:H,filterFactory:V};if(U||(J.cMapReaderFactory=new m({baseUrl:f,isCompressed:p}),J.standardFontDataFactory=new v({baseUrl:y})),!u){const oe={verbosity:d,port:kP.workerPort};u=oe.port?eh.fromPort(oe):new eh(oe),e._worker=u}const Q={docId:n,apiVersion:"4.3.136",data:o,password:a,disableAutoFetch:F,rangeChunkSize:c,length:D,docBaseUrl:h,enableXfa:O,evaluatorOptions:{maxImageSize:S,disableFontFace:P,ignoreErrors:b,isEvalSupported:w,isOffscreenCanvasSupported:A,canvasMaxAreaInBytes:_,fontExtraProperties:R,useSystemFonts:k,cMapUrl:U?f:null,standardFontDataUrl:U?y:null}},se={disableFontFace:P,fontExtraProperties:R,ownerDocument:N,pdfBug:$,styleElement:q,loadingParams:{disableAutoFetch:F,enableXfa:O}};return u.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const oe=u.messageHandler.sendWithPromise("GetDocRequest",Q,o?[o.buffer]:null);let ie;return l?ie=new HVt(l,{disableRange:M,disableStream:L}):o||(ie=(re=>Jl?function(){return typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype}()&&u_(re.url)?new hre(re):new ZVt(re):u_(re.url)?new hre(re):new YVt(re))({url:r,length:D,httpHeaders:i,withCredentials:s,rangeChunkSize:c,disableRange:M,disableStream:L})),oe.then(ee=>{if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const re=new d_(n,ee,u.port),fe=new CGt(re,e,ie,se,J);e._transport=fe,re.send("Ready",null)})}).catch(e._capability.reject),e}function gGt(t){if(t instanceof URL)return t.href;try{return new URL(t,window.location).href}catch{if(Jl&&typeof t=="string")return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function mGt(t){if(Jl&&typeof Buffer<"u"&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if(typeof t=="string")return JB(t);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)||typeof t=="object"&&!isNaN(t?.length))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function fre(t){return typeof t=="object"&&Number.isInteger(t?.num)&&t.num>=0&&Number.isInteger(t?.gen)&&t.gen>=0}class R9{static#e=0;constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${R9.#e++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}let $Ce=class{constructor(e,n,r=!1,o=null){this.length=e,this.initialData=n,this.progressiveDone=r,this.contentDispositionFilename=o,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,n){for(const r of this._rangeListeners)r(e,n)}onDataProgress(e,n){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(e,n)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(const n of this._progressiveReadListeners)n(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,n){Go("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class yGt{constructor(e,n){this._pdfInfo=e,this._transport=n}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return oo(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}
725getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:n}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(n)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class vGt{#e=null;#t=!1;constructor(e,n,r,o=!1){this._pageIndex=e,this._pageInfo=n,this._transport=r,this._stats=o?new Jne:null,this._pdfBug=o,this.commonObjs=r.commonObjs,this.objs=new HCe,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:n=this.rotate,offsetX:r=0,offsetY:o=0,dontFlip:i=!1}={}){return new JR({viewBox:this.view,scale:e,rotation:n,offsetX:r,offsetY:o,dontFlip:i})}getAnnotations({intent:e="display"}={}){const{renderingIntent:n}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,n)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return oo(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:n,intent:r="display",annotationMode:o=Ky.ENABLE,transform:i=null,background:s=null,optionalContentConfigPromise:a=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:u=null}){this._stats?.time("Overall");const d=this._transport.getRenderingIntent(r,o,u),{renderingIntent:h,cacheKey:f}=d;this.#t=!1,this.#o(),a||=this._transport.getOptionalContentConfig(h);let p=this._intentStates.get(f);p||(p=Object.create(null),this._intentStates.set(f,p)),p.streamReaderCancelTimeout&&(clearTimeout(p.streamReaderCancelTimeout),p.streamReaderCancelTimeout=null);const m=!!(h&Kd.PRINT);p.displayReadyCapability||(p.displayReadyCapability=Promise.withResolvers(),p.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(d));const y=S=>{p.renderTasks.delete(v),(this._maybeCleanupAfterRender||m)&&(this.#t=!0),this.#n(!m),S?(v.capability.reject(S),this._abortOperatorList({intentState:p,reason:S instanceof Error?S:new Error(S)})):v.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},v=new a1({callback:y,params:{canvasContext:e,viewport:n,transform:i,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:p.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!m,pdfBug:this._pdfBug,page
725Colors:c});(p.renderTasks||=new Set).add(v);const b=v.task;return Promise.all([p.displayReadyCapability.promise,a]).then(([S,w])=>{if(this.destroyed){y();return}if(this._stats?.time("Rendering"),!(w.renderingIntent&h))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");v.initializeGraphics({transparency:S,optionalContentConfig:w}),v.operatorListChanged()}).catch(y),b}getOperatorList({intent:e="display",annotationMode:n=Ky.ENABLE,printAnnotationStorage:r=null}={}){function o(){s.operatorList.lastChunk&&(s.opListReadCapability.resolve(s.operatorList),s.renderTasks.delete(a))}const i=this._transport.getRenderingIntent(e,n,r,!0);let s=this._intentStates.get(i.cacheKey);s||(s=Object.create(null),this._intentStates.set(i.cacheKey,s));let a;return s.opListReadCapability||(a=Object.create(null),a.operatorListChanged=o,s.opListReadCapability=Promise.withResolvers(),(s.renderTasks||=new Set).add(a),s.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(i)),s.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:n=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:n===!0},{highWaterMark:100,size(o){return o.items.length}})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>FP.textContent(r));const n=this.streamTextContent(e);return new Promise(function(r,o){function i(){s.read().then(function({value:l,done:c}){if(c){r(a);return}a.lang??=l.lang,Object.assign(a.styles,l.styles),a.items.push(...l.items),i()},o)}const s=n.getReader(),a={items:[],styles:Object.create(null),lang:null};i()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const n of this._intentStates.values())if(this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),!n.opListReadCapability)for(const r of n.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),this.#t=!1,this.#o(),Promise.all(e)}cleanup(e=!1){this.#t=!0;const n=this.#n(!1);return e&&n&&(this._stats&&=new Jne),n}#n(e=!1){if(this.#o(),!this.#t||this.destroyed)return!1;if(e)return this.#e=setTimeout(()=>{this.#e=null,this.#n(!1)},cGt),!1;for(const{renderTasks:n,operatorList:r}of this._intentStates.values())if(n.size>0||!r.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#t=!1,!0}#o(){this.#e&&(clearTimeout(this.#e),this.#e=null)}_startRenderPage(e,n){const r=this._intentStates.get(n);r&&(this._stats?.timeEnd("Page Request"),r.displayReadyCapability?.resolve(e))}_renderPageChunk(e,n){for(let r=0,o=e.length;r<o;r++)n.operatorList.fnArray.push(e.fnArray[r]),n.operatorList.argsArray.push(e.argsArray[r]);n.operatorList.lastChunk=e.lastChunk,n.operatorList.separateAnnots=e.separateAnnots;for(const r of n.renderTasks)r.operatorListChanged();e.lastChunk&&this.#n(!0)}_pumpOperatorList({renderingIntent:e,cacheKey:n,annotationStorageSerializable:r}){const{map:o,transfer:i}=r,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:n,annotationStorage:o},i).getReader(),l=this._intentStates.get(n);l.streamReader=a;const c=()=>{a.read().then(({value:u,done:d})=>{if(d){l.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(u,l),c())},u=>{if(l.streamReader=null,!this._transport.destroyed){if(l.operatorList){l.operatorList.lastChunk=!0;for(const d of l.renderTasks)d.operatorListChanged();this.#n(!0)}if(l.displayReadyCapability)l.displayReadyCapability.reject(u);else if(l.opListReadCapability)l.opListReadCapability.reject(u);else throw u}})};c()}_abortOperatorList({intentState:e,reason:n,force:r=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(n instanceof b9){let o=lGt;n.extraDelay>0&&n.extraDelay<1e3&&(o+=n.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:n,force:!0})},o);return}}if(e.streamReader.cancel(new bS(n.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[o,i]of this._intentStates)if(i===e){this._intentStates.delete(o);break}this.cleanup()}}}get stats(){return this._stats}}class bGt{#e=new Set;#t=Promise.resolve();postMessage(e,n){const r={data:structuredClone(e,n?{transfer:n}:null)};this.#t.then(()=>{for(const o of this.#e)o.call(this,r)})}addEventListener(e,n){this.#e.add(n)}removeEventListener(e,n){this.#e.delete(n)}terminate(){this.#e.clear()}}const Gg={isWorkerDisabled:!1,fakeWorkerId:0};Jl&&(Gg.isWorkerDisabled=!0,kP.workerSrc||="./pdf.worker.mjs"),Gg.isSameOrigin=function(t,e){let n;try{if(n=new URL(t),!n.origin||n.origin==="null")return!1}catch{return!1}
725const r=new URL(e,n);return n.origin===r.origin},Gg.createCDNWrapper=function(t){const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};class eh{static#e;constructor({name:e=null,port:n=null,verbosity:r=Qzt()}={}){if(this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,n){if(eh.#e?.has(n))throw new Error("Cannot use more than one PDFWorker per port.");(eh.#e||=new WeakMap).set(n,this),this._initializeFromPort(n);return}this._initialize()}get promise(){return Jl?Promise.all([Xp.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new d_("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!Gg.isWorkerDisabled&&!eh.#t){let{workerSrc:e}=eh;try{Gg.isSameOrigin(window.location.href,e)||(e=Gg.createCDNWrapper(new URL(e,window.location).href));const n=new Worker(e,{type:"module"}),r=new d_("main","worker",n),o=()=>{n.removeEventListener("error",i),r.destroy(),n.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},i=()=>{this._webWorker||o()};n.addEventListener("error",i),r.on("test",a=>{if(n.removeEventListener("error",i),this.destroyed){o();return}a?(this._messageHandler=r,this._port=n,this._webWorker=n,this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),n.terminate())}),r.on("ready",a=>{if(n.removeEventListener("error",i),this.destroyed){o();return}try{s()}catch{this._setupFakeWorker()}});const s=()=>{const a=new Uint8Array;r.send("test",a,[a.buffer])};s();return}catch{QB("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){Gg.isWorkerDisabled||(Fr("Setting up fake worker."),Gg.isWorkerDisabled=!0),eh._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const n=new bGt;this._port=n;const r=`fake${Gg.fakeWorkerId++}`,o=new d_(r+"_worker",r,n);e.setup(o,n);const i=new d_(r,r+"_worker",n);this._messageHandler=i,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})}).catch(e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),eh.#e?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const n=this.#e?.get(e.port);if(n){if(n._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return n}return new eh(e)}static get workerSrc(){if(kP.workerSrc)return kP.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#t(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return oo(this,"_setupFakeWorkerGlobal",(async()=>this.#t?this.#t:(await s1(()=>import(this.workerSrc),[])).WorkerMessageHandler)())}}class CGt{#e=new Map;#t=new Map;#n=new Map;#o=new Map;#s=null;constructor(e,n,r,o,i){this.messageHandler=e,this.loadingTask=n,this.commonObjs=new HCe,this.fontLoader=new vVt({ownerDocument:o.ownerDocument,styleElement:o.styleElement}),this.loadingParams=o.loadingParams,this._params=o,this.canvasFactory=i.canvasFactory,this.filterFactory=i.filterFactory,this.cMapReaderFactory=i.cMapReaderFactory,this.standardFontDataFactory=i.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#r(e,n=null){const r=this.#e.get(e);if(r)return r;
725const o=this.messageHandler.sendWithPromise(e,n);return this.#e.set(e,o),o}get annotationStorage(){return oo(this,"annotationStorage",new T9)}getRenderingIntent(e,n=Ky.ENABLE,r=null,o=!1){let i=Kd.DISPLAY,s=qz;switch(e){case"any":i=Kd.ANY;break;case"display":break;case"print":i=Kd.PRINT;break;default:Fr(`getRenderingIntent - invalid intent: ${e}`)}switch(n){case Ky.DISABLE:i+=Kd.ANNOTATIONS_DISABLE;break;case Ky.ENABLE:break;case Ky.ENABLE_FORMS:i+=Kd.ANNOTATIONS_FORMS;break;case Ky.ENABLE_STORAGE:i+=Kd.ANNOTATIONS_STORAGE,s=(i&Kd.PRINT&&r instanceof RCe?r:this.annotationStorage).serializable;break;default:Fr(`getRenderingIntent - invalid annotationMode: ${n}`)}return o&&(i+=Kd.OPLIST),{renderingIntent:i,cacheKey:`${i}_${s.hash}`,annotationStorageSerializable:s}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#s?.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const r of this.#t.values())e.push(r._destroy());this.#t.clear(),this.#n.clear(),this.#o.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const n=this.messageHandler.sendWithPromise("Terminate",null);return e.push(n),Promise.all(e).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(),tk.cleanup(),this._networkStream?.cancelAllRequests(new bS("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:n}=this;e.on("GetReader",(r,o)=>{va(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=i=>{this._lastProgress={loaded:i.loaded,total:i.total}},o.onPull=()=>{this._fullReader.read().then(function({value:i,done:s}){if(s){o.close();return}va(i instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),o.enqueue(new Uint8Array(i),1,[i])}).catch(i=>{o.error(i)})},o.onCancel=i=>{this._fullReader.cancel(i),o.ready.catch(s=>{if(!this.destroyed)throw s})}}),e.on("ReaderHeadersReady",r=>{const o=Promise.withResolvers(),i=this._fullReader;return i.headersReady.then(()=>{(!i.isStreamingSupported||!i.isRangeSupported)&&(this._lastProgress&&n.onProgress?.(this._lastProgress),i.onProgress=s=>{n.onProgress?.({loaded:s.loaded,total:s.total})}),o.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})},o.reject),o.promise}),e.on("GetRangeReader",(r,o)=>{va(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(r.begin,r.end);if(!i){o.close();return}o.onPull=()=>{i.read().then(function({value:s,done:a}){if(a){o.close();return}va(s instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),o.enqueue(new Uint8Array(s),1,[s])}).catch(s=>{o.error(s)})},o.onCancel=s=>{i.cancel(s),o.ready.catch(a=>{if(!this.destroyed)throw a})}}),e.on("GetDoc",({pdfInfo:r})=>{this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,n._capability.resolve(new yGt(r,this))}),e.on("DocException",function(r){let o;switch(r.name){case"PasswordException":o=new Wz(r.message,r.code);break;case"InvalidPDFException":o=new ECe(r.message);break;case"MissingPDFException":o=new vS(r.message);break;case"UnexpectedResponseException":o=new ZB(r.message,r.status);break;case"UnknownErrorException":o=new jz(r.message,r.details);break;default:Go("DocException - expected a valid Error.")}n._capability.reject(o)}),e.on("PasswordRequest",r=>{if(this.#s=Promise.withResolvers(),n.onPassword){const o=i=>{i instanceof Error?this.#s.reject(i):this.#s.resolve({password:i})};try{n.onPassword(o,r.code)}catch(i){this.#s.reject(i)}}else this.#s.reject(new Wz(r.message,r.code));return this.#s.promise}),e.on("DataLoaded",r=>{n.onProgress?.({loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),e.on("StartRenderPage",r=>{if(this.destroyed)return;this.#t.get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),e.on("commonobj",([r,o,i])=>{if(this.destroyed||this.commonObjs.has(r))return null;switch(o){case"Font":const{disableFontFace:s,fontExtraProperties:a,pdfBug:l}=this._params;if("error"in i){const h=i.error;Fr(`Error during font loading: ${h}`),this.commonObjs.resolve(r,h);break}const c=l&&globalThis.FontInspector?.enabled?(h,f)=>globalThis.FontInspector.fontAdded(h,f):null,u=new bVt(i,{disableFontFace:s,inspectFont:c});this.fontLoader.bind(u).catch(()=>
725e.sendWithPromise("FontFallback",{id:r})).finally(()=>{!a&&u.data&&(u.data=null),this.commonObjs.resolve(r,u)});break;case"CopyLocalImage":const{imageRef:d}=i;va(d,"The imageRef must be defined.");for(const h of this.#t.values())for(const[,f]of h.objs)if(f?.ref===d)return f.dataLen?(this.commonObjs.resolve(r,structuredClone(f)),f.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(r,i);break;default:throw new Error(`Got unknown common object type ${o}`)}return null}),e.on("obj",([r,o,i,s])=>{if(this.destroyed)return;const a=this.#t.get(o);if(!a.objs.has(r)){if(a._intentStates.size===0){s?.bitmap?.close();return}switch(i){case"Image":a.objs.resolve(r,s),s?.dataLen>jzt&&(a._maybeCleanupAfterRender=!0);break;case"Pattern":a.objs.resolve(r,s);break;default:throw new Error(`Got unknown object type ${i}`)}}}),e.on("DocProgress",r=>{this.destroyed||n.onProgress?.({loaded:r.loaded,total:r.total})}),e.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),e.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&Fr("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:n}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},n).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const n=e-1,r=this.#n.get(n);if(r)return r;const o=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(i=>{if(this.destroyed)throw new Error("Transport destroyed");i.refStr&&this.#o.set(i.refStr,e);const s=new vGt(n,i,this,this._params.pdfBug);return this.#t.set(n,s),s});return this.#n.set(n,o),o}getPageIndex(e){return fre(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,n){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:n})}getFieldObjects(){return this.#r("GetFieldObjects")}hasJSActions(){return this.#r("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#r("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return this.#r("GetOptionalContentConfig").then(n=>new $Vt(n,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",n=this.#e.get(e);if(n)return n;
725const r=this.messageHandler.sendWithPromise(e,null).then(o=>({info:o[0],metadata:o[1]?new FVt(o[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#e.set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const n of this.#t.values())if(!n.cleanup())throw new Error(`startCleanup: Page ${n.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(!0),tk.cleanup()}}cachedPageNumber(e){if(!fre(e))return null;const n=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return this.#o.get(n)??null}}const _M=Symbol("INITIAL_DATA");class HCe{#e=Object.create(null);#t(e){return this.#e[e]||={...Promise.withResolvers(),data:_M}}get(e,n=null){if(n){const o=this.#t(e);return o.promise.then(()=>n(o.data)),null}const r=this.#e[e];if(!r||r.data===_M)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const n=this.#e[e];return!!n&&n.data!==_M}resolve(e,n=null){const r=this.#t(e);r.data=n,r.resolve()}clear(){for(const e in this.#e){const{data:n}=this.#e[e];n?.bitmap?.close()}this.#e=Object.create(null)}*[Symbol.iterator](){for(const e in this.#e){const{data:n}=this.#e[e];n!==_M&&(yield[e,n])}}}class SGt{#e=null;constructor(e){this.#e=e,this.onContinue=null}get promise(){return this.#e.capability.promise}cancel(e=0){this.#e.cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=this.#e.operatorList;if(!e)return!1;const{annotationCanvasMap:n}=this.#e;return e.form||e.canvas&&n?.size>0}}class a1{static#e=new WeakSet;constructor({callback:e,params:n,objs:r,commonObjs:o,annotationCanvasMap:i,operatorList:s,pageIndex:a,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:u=!1,pdfBug:d=!1,pageColors:h=null}){this.callback=e,this.params=n,this.objs=r,this.commonObjs=o,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=a,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=d,this.pageColors=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=u===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new SGt(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:n}){if(this.cancelled)return;if(this._canvas){if(a1.#e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");a1.#e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:o,transform:i,background:s}=this.params;this.gfx=new I1(r,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:n},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:i,viewport:o,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,n=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),a1.#e.delete(this._canvas),this.callback(e||new b9(`Rendering cancelled, page ${this._pageIndex+1}`,n))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}
725):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),a1.#e.delete(this._canvas),this.callback())))}}const EGt="4.3.136",xGt="0cec64437";function pre(t){return Math.floor(Math.max(0,Math.min(1,t))*255).toString(16).padStart(2,"0")}function OT(t){return Math.max(0,Math.min(255,255*t))}class gre{static CMYK_G([e,n,r,o]){return["G",1-Math.min(1,.3*e+.59*r+.11*n+o)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return e=OT(e),[e,e,e]}static G_HTML([e]){const n=pre(e);return`#${n}${n}${n}`}static RGB_G([e,n,r]){return["G",.3*e+.59*n+.11*r]}static RGB_rgb(e){return e.map(OT)}static RGB_HTML(e){return`#${e.map(pre).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,n,r,o]){return["RGB",1-Math.min(1,e+o),1-Math.min(1,r+o),1-Math.min(1,n+o)]}static CMYK_rgb([e,n,r,o]){return[OT(1-Math.min(1,e+o)),OT(1-Math.min(1,r+o)),OT(1-Math.min(1,n+o))]}static CMYK_HTML(e){const n=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(n)}static RGB_CMYK([e,n,r]){const o=1-e,i=1-n,s=1-r,a=Math.min(o,i,s);return["CMYK",o,i,s,a]}}class UCe{static setupStorage(e,n,r,o,i){const s=o.getValue(n,{value:null});switch(r.name){case"textarea":if(s.value!==null&&(e.textContent=s.value),i==="print")break;e.addEventListener("input",a=>{o.setValue(n,{value:a.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(s.value===r.attributes.xfaOn?e.setAttribute("checked",!0):s.value===r.attributes.xfaOff&&e.removeAttribute("checked"),i==="print")break;e.addEventListener("change",a=>{o.setValue(n,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})})}else{if(s.value!==null&&e.setAttribute("value",s.value),i==="print")break;e.addEventListener("input",a=>{o.setValue(n,{value:a.target.value})})}break;case"select":if(s.value!==null){e.setAttribute("value",s.value);for(const a of r.children)a.attributes.value===s.value?a.attributes.selected=!0:a.attributes.hasOwnProperty("selected")&&delete a.attributes.selected}e.addEventListener("input",a=>{const l=a.target.options,c=l.selectedIndex===-1?"":l[l.selectedIndex].value;o.setValue(n,{value:c})});break}}static setAttributes({html:e,element:n,storage:r=null,intent:o,linkService:i}){const{attributes:s}=n,a=e instanceof HTMLAnchorElement;s.type==="radio"&&(s.name=`${s.name}-${o}`);for(const[l,c]of Object.entries(s))if(c!=null)switch(l){case"class":c.length&&e.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",c);break;case"style":Object.assign(e.style,c);break;case"textContent":e.textContent=c;break;default:(!a||l!=="href"&&l!=="newWindow")&&e.setAttribute(l,c)}a&&i.addLinkAttributes(e,s.href,s.newWindow),r&&s.dataId&&this.setupStorage(e,s.dataId,n,r)}static render(e){const n=e.annotationStorage,r=e.linkService,o=e.xfaHtml,i=e.intent||"display",s=document.createElement(o.name);o.attributes&&this.setAttributes({html:s,element:o,intent:i,linkService:r});const a=i!=="richText",l=e.div;if(l.append(s),e.viewport){const d=`matrix(${e.viewport.transform.join(",")})`;l.style.transform=d}a&&l.setAttribute("class","xfaLayer xfaFont");const c=[];if(o.children.length===0){if(o.value){const d=document.createTextNode(o.value);s.append(d),a&&FP.shouldBuildText(o.name)&&c.push(d)}return{textDivs:c}}const u=[[o,-1,s]];for(;u.length>0;){const[d,h,f]=u.at(-1);if(h+1===d.children.length){u.pop();continue}const p=d.children[++u.at(-1)[1]];if(p===null)continue;const{name:m}=p;if(m==="#text"){const v=document.createTextNode(p.value);c.push(v),f.append(v);continue}const y=p?.attributes?.xmlns?document.createElementNS(p.attributes.xmlns,m):document.createElement(m);if(f.append(y),p.attributes&&this.setAttributes({html:y,element:p,storage:n,intent:i,linkService:r}),p.children?.length>0)u.push([p,-1,y]);else if(p.value){const v=document.createTextNode(p.value);a&&FP.shouldBuildText(m)&&c.push(v),y.append(v)}}for(const d of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))d.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){const n=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=n,e.div.hidden=!1}}const nO=1e3,wGt=9,jC=new WeakSet;function dm(t){return{width:t[2]-t[0],height:t[3]-t[1]}}class AGt{static create(e){switch(e.data.annotationType){case ca.LINK:return new zCe(e);case ca.TEXT:return new TGt(e);case ca.WIDGET:switch(e.data.fieldType){case"Tx":return new _Gt(e);case"Btn":return e.data.radioButton?new VCe(e):e.data.checkBox?new PGt(e):new RGt(e);case"Ch":return new OGt(e);case"Sig":return new IGt(e)}return new CS(e);case ca.POPUP:return new Qz(e);case ca.FREETEXT:return new GCe(e);case ca.LINE:return new MGt(e);case ca.SQUARE:return new DGt(e);case ca.CIRCLE:return new LGt(e);case ca.POLYLINE:return new WCe(e);case ca.CARET:return new FGt(e);case ca.INK:return new jCe(e);case ca.POLYGON:return new kGt(e);case ca.HIGHLIGHT:return new BGt(e);case ca.UNDERLINE:return new $Gt(e);case ca.SQUIGGLY:return new HGt(e);case ca.STRIKEOUT:return new UGt(e);case ca.STAMP:return new qCe(e);case ca.FILEATTACHMENT:return new zGt(e);default:return new Fs(e)}}}class Fs{#e=null;#t=!1;#n=null;constructor(e,{isRenderable:n=!1,ignoreBorder:r=!1,createQuadrilaterals:o=!1}={}){this.isRenderable=n,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,n&&
725(this.container=this._createContainer(r)),o&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:n,richText:r}){return!!(e?.str||n?.str||r?.str)}get hasPopupData(){return Fs._hasPopupData(this.data)}updateEdited(e){if(!this.container)return;this.#e||={rect:this.data.rect.slice(0)};const{rect:n}=e;n&&this.#o(n),this.#n?.popup.updateEdited(e)}resetEdited(){this.#e&&(this.#o(this.#e.rect),this.#n?.popup.resetEdited(),this.#e=null)}#o(e){const{container:{style:n},data:{rect:r,rotation:o},parent:{viewport:{rawDims:{pageWidth:i,pageHeight:s,pageX:a,pageY:l}}}}=this;r?.splice(0,4,...e);const{width:c,height:u}=dm(e);n.left=`${100*(e[0]-a)/i}%`,n.top=`${100*(s-e[3]+l)/s}%`,o===0?(n.width=`${100*c/i}%`,n.height=`${100*u/s}%`):this.setRotation(o)}_createContainer(e){const{data:n,parent:{page:r,viewport:o}}=this,i=document.createElement("section");i.setAttribute("data-annotation-id",n.id),this instanceof CS||(i.tabIndex=nO);const{style:s}=i;if(s.zIndex=this.parent.zIndex++,n.popupRef&&i.setAttribute("aria-haspopup","dialog"),n.alternativeText&&(i.title=n.alternativeText),n.noRotate&&i.classList.add("norotate"),!n.rect||this instanceof Qz){const{rotation:m}=n;return!n.hasOwnCanvas&&m!==0&&this.setRotation(m,i),i}const{width:a,height:l}=dm(n.rect);if(!e&&n.borderStyle.width>0){s.borderWidth=`${n.borderStyle.width}px`;const m=n.borderStyle.horizontalCornerRadius,y=n.borderStyle.verticalCornerRadius;if(m>0||y>0){const b=`calc(${m}px * var(--scale-factor)) / calc(${y}px * var(--scale-factor))`;s.borderRadius=b}else if(this instanceof VCe){const b=`calc(${a}px * var(--scale-factor)) / calc(${l}px * var(--scale-factor))`;s.borderRadius=b}switch(n.borderStyle.style){case PT.SOLID:s.borderStyle="solid";break;case PT.DASHED:s.borderStyle="dashed";break;case PT.BEVELED:Fr("Unimplemented border style: beveled");break;case PT.INSET:Fr("Unimplemented border style: inset");break;case PT.UNDERLINE:s.borderBottomStyle="solid";break}const v=n.borderColor||null;v?(this.#t=!0,s.borderColor=On.makeHexColor(v[0]|0,v[1]|0,v[2]|0)):s.borderWidth=0}const c=On.normalizeRect([n.rect[0],r.view[3]-n.rect[1]+r.view[1],n.rect[2],r.view[3]-n.rect[3]+r.view[1]]),{pageWidth:u,pageHeight:d,pageX:h,pageY:f}=o.rawDims;s.left=`${100*(c[0]-h)/u}%`,s.top=`${100*(c[1]-f)/d}%`;const{rotation:p}=n;return n.hasOwnCanvas||p===0?(s.width=`${100*a/u}%`,s.height=`${100*l/d}%`):this.setRotation(p,i),i}setRotation(e,n=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:o}=this.parent.viewport.rawDims,{width:i,height:s}=dm(this.data.rect);let a,l;e%180===0?(a=100*i/r,l=100*s/o):(a=100*s/r,l=100*i/o),n.style.width=`${a}%`,n.style.height=`${l}%`,n.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(n,r,o)=>{const i=o.detail[n],s=i[0],a=i.slice(1);o.target.style[r]=gre[`${s}_HTML`](a),this.annotationStorage.setValue(this.data.id,{[r]:gre[`${s}_rgb`](a)})};return oo(this,"_commonActions",{display:n=>{const{display:r}=n.detail,o=r%2===1;this.container.style.visibility=o?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:o,noPrint:r===1||r===2})},print:n=>{this.annotationStorage.setValue(this.data.id,{noPrint:!n.detail.print})},hidden:n=>{const{hidden:r}=n.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:n=>{setTimeout(()=>n.target.focus({preventScroll:!1}),0)},userName:n=>{n.target.title=n.detail.userName},readonly:n=>{n.target.disabled=n.detail.readonly},required:n=>{this._setRequired(n.target,n.detail.required)},bgColor:n=>{e("bgColor","backgroundColor",n)},fillColor:n=>{e("fillColor","backgroundColor",n)},fgColor:n=>{e("fgColor","color",n)},textColor:n=>{e("textColor","color",n)},borderColor:n=>{e("borderColor","borderColor",n)},strokeColor:n=>{e("strokeColor","borderColor",n)},rotation:n=>{const r=n.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(e,n){const r=this._commonActions;for(const o of Object.keys(n.detail))(e[o]||r[o])?.(n)}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const n=this.annotationStorage.getRawValue(this.data.id);if(!n)return;const r=this._commonActions;for(const[o,i]of Object.entries(n)){const s=r[o];if(s){const a={detail:{[o]:i},target:e};s(a),delete n[o]}}}
725_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[n,r,o,i]=this.data.rect;if(e.length===1){const[,{x:m,y},{x:v,y:b}]=e[0];if(o===m&&i===y&&n===v&&r===b)return}const{style:s}=this.container;let a;if(this.#t){const{borderColor:m,borderWidth:y}=s;s.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${m}" stroke-width="${y}">`],this.container.classList.add("hasBorder")}const l=o-n,c=i-r,{svgFactory:u}=this,d=u.createElement("svg");d.classList.add("quadrilateralsContainer"),d.setAttribute("width",0),d.setAttribute("height",0);const h=u.createElement("defs");d.append(h);const f=u.createElement("clipPath"),p=`clippath_${this.data.id}`;f.setAttribute("id",p),f.setAttribute("clipPathUnits","objectBoundingBox"),h.append(f);for(const[,{x:m,y},{x:v,y:b}]of e){const S=u.createElement("rect"),w=(v-n)/l,A=(i-y)/c,_=(m-v)/l,P=(y-b)/c;S.setAttribute("x",w),S.setAttribute("y",A),S.setAttribute("width",_),S.setAttribute("height",P),f.append(S),a?.push(`<rect vector-effect="non-scaling-stroke" x="${w}" y="${A}" width="${_}" height="${P}"/>`)}this.#t&&(a.push("</g></svg>')"),s.backgroundImage=a.join("")),this.container.append(d),this.container.style.clipPath=`url(#${p})`}_createPopup(){const{container:e,data:n}=this;e.setAttribute("aria-haspopup","dialog");const r=this.#n=new Qz({data:{color:n.color,titleObj:n.titleObj,modificationDate:n.modificationDate,contentsObj:n.contentsObj,richText:n.richText,parentRect:n.rect,borderStyle:0,id:`popup_${n.id}`,rotation:n.rotation},parent:this.parent,elements:[this]});this.parent.div.append(r.render())}render(){Go("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,n=null){const r=[];if(this._fieldObjects){const o=this._fieldObjects[e];if(o)for(const{page:i,id:s,exportValues:a}of o){if(i===-1||s===n)continue;const l=typeof a=="string"?a:null,c=document.querySelector(`[data-element-id="${s}"]`);if(c&&!jC.has(c)){Fr(`_getElementsByName - element not allowed: ${s}`);continue}r.push({id:s,exportValue:l,domElement:c})}return r}for(const o of document.getElementsByName(e)){const{exportValue:i}=o,s=o.getAttribute("data-element-id");s!==n&&jC.has(o)&&r.push({id:s,exportValue:i,domElement:o})}return r}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const n of e)n.classList.add("highlightArea");else e.classList.add("highlightArea")}get _isEditable(){return!1}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:n}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:n})})}}class zCe extends Fs{constructor(e,n=null){super(e,{isRenderable:!0,ignoreBorder:!!n?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:n}=this,r=document.createElement("a");r.setAttribute("data-element-id",e.id);let o=!1;return e.url?(n.addLinkAttributes(r,e.url,e.newWindow),o=!0):e.action?(this._bindNamedAction(r,e.action),o=!0):e.attachment?(this.#t(r,e.attachment,e.attachmentDest),o=!0):e.setOCGState?(this.#n(r,e.setOCGState),o=!0):e.dest?(this._bindLink(r,e.dest),o=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,e),o=!0),e.resetForm?(this._bindResetFormAction(r,e.resetForm),o=!0):this.isTooltipOnly&&!o&&(this._bindLink(r,""),o=!0)),this.container.classList.add("linkAnnotation"),o&&this.container.append(r),this.container}#e(){this.container.setAttribute("data-internal-link","")}_bindLink(e,n){e.href=this.linkService.getDestinationHash(n),e.onclick=()=>(n&&this.linkService.goToDestination(n),!1),(n||n==="")&&this.#e()}_bindNamedAction(e,n){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(n),!1),this.#e()}
725#t(e,n,r=null){e.href=this.linkService.getAnchorUrl(""),n.description&&(e.title=n.description),e.onclick=()=>(this.downloadManager?.openOrDownloadData(n.content,n.filename,r),!1),this.#e()}#n(e,n){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(n),!1),this.#e()}_bindJSAction(e,n){e.href=this.linkService.getAnchorUrl("");const r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const o of Object.keys(n.actions)){const i=r.get(o);i&&(e[i]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n.id,name:o}}),!1))}e.onclick||(e.onclick=()=>!1),this.#e()}_bindResetFormAction(e,n){const r=e.onclick;if(r||(e.href=this.linkService.getAnchorUrl("")),this.#e(),!this._fieldObjects){Fr('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),r||(e.onclick=()=>!1);return}e.onclick=()=>{r?.();const{fields:o,refs:i,include:s}=n,a=[];if(o.length!==0||i.length!==0){const u=new Set(i);for(const d of o){const h=this._fieldObjects[d]||[];for(const{id:f}of h)u.add(f)}for(const d of Object.values(this._fieldObjects))for(const h of d)u.has(h.id)===s&&a.push(h)}else for(const u of Object.values(this._fieldObjects))a.push(...u);const l=this.annotationStorage,c=[];for(const u of a){const{id:d}=u;switch(c.push(d),u.type){case"text":{const f=u.defaultValue||"";l.setValue(d,{value:f});break}case"checkbox":case"radiobutton":{const f=u.defaultValue===u.exportValues;l.setValue(d,{value:f});break}case"combobox":case"listbox":{const f=u.defaultValue||"";l.setValue(d,{value:f});break}default:continue}const h=document.querySelector(`[data-element-id="${d}"]`);if(h){if(!jC.has(h)){Fr(`_bindResetFormAction - element not allowed: ${d}`);continue}}else continue;h.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}}),!1}}}class TGt extends Fs{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class CS extends Fs{render(){return this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&(e.previousSibling?.nodeName==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return pu.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,n,r,o,i){r.includes("mouse")?e.addEventListener(r,s=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:o,value:i(s),shift:s.shiftKey,modifier:this._getKeyModifier(s)}})}):e.addEventListener(r,s=>{if(r==="blur"){if(!n.focused||!s.relatedTarget)return;n.focused=!1}else if(r==="focus"){if(n.focused)return;n.focused=!0}i&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:o,value:i(s)}})})}_setEventListeners(e,n,r,o){for(const[i,s]of r)(s==="Action"||this.data.actions?.[s])&&((s==="Focus"||s==="Blur")&&(n||={focused:!1}),this._setEventListener(e,n,i,s,o),s==="Focus"&&!this.data.actions?.Blur?this._setEventListener(e,n,"blur","Blur",null):s==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(e,n,"focus","Focus",null))}_setBackgroundColor(e){const n=this.data.backgroundColor||null;e.style.backgroundColor=n===null?"transparent":On.makeHexColor(n[0],n[1],n[2])}_setTextStyle(e){const n=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,o=this.data.defaultAppearanceData.fontSize||wGt,i=e.style;let s;const a=2,l=c=>Math.round(10*c)/10;if(this.data.multiLine){const c=Math.abs(this.data.rect[3]-this.data.rect[1]-a),u=Math.round(c/(yU*o))||1,d=c/u;s=Math.min(o,l(d/yU))}else{const c=Math.abs(this.data.rect[3]-this.data.rect[1]-a);s=Math.min(o,l(c/yU))}i.fontSize=`calc(${s}px * var(--scale-factor))`,i.color=On.makeHexColor(r[0],r[1],r[2]),this.data.textAlignment!==null&&(i.textAlign=n[this.data.textAlignment])}
vendor: 8,208 bytes, lines 725-726
725_setRequired(e,n){n?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",n)}}class _Gt extends CS{constructor(e){const n=e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue;super(e,{isRenderable:n})}setPropertyOnSiblings(e,n,r,o){const i=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[n]=r),i.setValue(s.id,{[o]:r})}render(){const e=this.annotationStorage,n=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const o=e.getValue(n,{value:this.data.fieldValue});let i=o.value||"";const s=e.getValue(n,{charLimit:this.data.maxLen}).charLimit;s&&i.length>s&&(i=i.slice(0,s));let a=o.formattedValue||this.data.textContent?.join(` 726`)||null;a&&this.data.comb&&(a=a.replaceAll(/\s+/g,""));const l={userValue:i,formattedValue:a,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=a??i,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type="text",r.setAttribute("value",a??i),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),jC.add(r),r.setAttribute("data-element-id",n),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=nO,this._setRequired(r,this.data.required),s&&(r.maxLength=s),r.addEventListener("input",u=>{e.setValue(n,{value:u.target.value}),this.setPropertyOnSiblings(r,"value",u.target.value,"value"),l.formattedValue=null}),r.addEventListener("resetform",u=>{const d=this.data.defaultFieldValue??"";r.value=l.userValue=d,l.formattedValue=null});let c=u=>{const{formattedValue:d}=l;d!=null&&(u.target.value=d),u.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",d=>{if(l.focused)return;const{target:h}=d;l.userValue&&(h.value=l.userValue),l.lastCommittedValue=h.value,l.commitKey=1,this.data.actions?.Focus||(l.focused=!0)}),r.addEventListener("updatefromsandbox",d=>{this.showElementAndHideCanvas(d.target);const h={value(f){l.userValue=f.detail.value??"",e.setValue(n,{value:l.userValue.toString()}),f.target.value=l.userValue},formattedValue(f){const{formattedValue:p}=f.detail;l.formattedValue=p,p!=null&&f.target!==document.activeElement&&(f.target.value=p),e.setValue(n,{formattedValue:p})},selRange(f){f.target.setSelectionRange(...f.detail.selRange)},charLimit:f=>{const{charLimit:p}=f.detail,{target:m}=f;if(p===0){m.removeAttribute("maxLength");return}m.setAttribute("maxLength",p);let y=l.userValue;!y||y.length<=p||(y=y.slice(0,p),m.value=l.userValue=y,e.setValue(n,{value:y}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:y,willCommit:!0,commitKey:1,selStart:m.selectionStart,selEnd:m.selectionEnd}}))}};this._dispatchEventFromSandbox(h,d)}),r.addEventListener("keydown",d=>{l.commitKey=1;let h=-1;if(d.key==="Escape"?h=0:d.key==="Enter"&&!this.data.multiLine?h=2:d.key==="Tab"&&(l.commitKey=3),h===-1)return;const{value:f}=d.target;l.lastCommittedValue!==f&&(l.lastCommittedValue=f,l.userValue=f,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:f,willCommit:!0,commitKey:h,selStart:d.target.selectionStart,selEnd:d.target.selectionEnd}}))});const u=c;c=null,r.addEventListener("blur",d=>{if(!l.focused||!d.relatedTarget)return;this.data.actions?.Blur||(l.focused=!1);const{value:h}=d.target;l.userValue=h,l.lastCommittedValue!==h&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:h,willCommit:!0,commitKey:l.commitKey,selStart:d.target.selectionStart,selEnd:d.target.selectionEnd}}),u(d)}),this.data.actions?.Keystroke&&r.addEventListener("beforeinput",d=>{l.lastCommittedValue=null;const{data:h,target:f}=d,{value:p,selectionStart:m,selectionEnd:y}=f;let v=m,b=y;switch(d.inputType){case"deleteWordBackward":{const S=p.substring(0,m).match(/\w*[^\w]*$/);S&&(v-=S[0].length);break}case"deleteWordForward":{const S=p.substring(m).match(/^[^\w]*\w*/);S&&(b+=S[0].length);break}case"deleteContentBackward":m===y&&(v-=1);break;case"deleteContentForward":m===y&&(b+=1);break}d.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:p,change:h||"",willCommit:!1,selStart:v,selEnd:b}})}),this._setEventListeners(r,l,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],d=>d.target.value)}if(c&&r.addEventListener("blur",c),this.data.comb){const d=(this.data.rect[2]-this.data.rect[0])/s;r.classList.add("comb"),r.style.letterSpacing=`calc(${d}px * var(--scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell",this.data.hasOwnCanvas&&(r.hidden=!0);return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class IGt extends CS{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class PGt extends CS{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,n=this.data,r=n.id;let o=e.getValue(r,{value:n.exportValue===n.fieldValue}).value;typeof o=="string"&&(o=o!=="Off",e.setValue(r,{value:o})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const i=document.createElement("input");return jC.add(i),i.setAttribute("data-element-id",r),i.disabled=n.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=n.fieldName,o&&i.setAttribute("checked",!0),i.setAttribute("exportValue",n.exportValue),i.tabIndex=nO,i.addEventListener("change",s=>{const{name:a,checked:l}=s.target;for(const c of this._getElementsByName(a,r)){const u=l&&c.exportValue===n.exportValue;c.domElement&&(c.domElement.checked=u),e.setValue(c.id,{value:u})}e.setValue(r,{value:l})}),i.addEventListener("resetform",s=>{const a=n.defaultFieldValue||"Off";s.target.checked=a===n.exportValue}),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",s=>{const a={value(l){l.target.checked=l.detail.value!=="Off",e.setValue(r,{value:l.target.checked})}};this._dispatchEventFromSandbox(a,s)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],s=>s.target.checked)),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class VCe extends CS{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,n=this.data,r=n.id;let o=e.getValue(r,{value:n.fieldValue===n.buttonValue}).value;if(typeof o=="string"&&(o=o!==n.buttonValue,e.setValue(r,{value:o})),o)for(const s of this._getElementsByName(n.fieldName,r))e.setValue(s.id,{value:!1});const i=document.createElement("input");if(jC.add(i),i.setAttribute("data-element-id",r),i.disabled=n.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=n.fieldName,o&&i.setAttribute("checked",!0),i.tabIndex=nO,i.addEventListener("change",s=>{const{name:a,checked:l}=s.target;for(const c of this._getElementsByName(a,r))e.setValue(c.id,{value:!1});e.setValue(r,{value:l})}),i.addEventListener("resetform",s=>{const a=n.defaultFieldValue;s.target.checked=a!=null&&a===n.buttonValue}),this.enableScripting&&this.hasJSActions){const s=n.buttonValue;i.addEventListener("updatefromsandbox",a=>{const l={value:c=>{const u=s===c.detail.value;for(const d of this._getElementsByName(c.target.name)){const h=u&&d.id===r;d.domElement&&(d.domElement.checked=h),e.setValue(d.id,{value:h})}}};this._dispatchEventFromSandbox(l,a)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)}
vendor: 4,673 bytes, line 726
726return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class RGt extends zCe{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const n=e.lastChild;return this.enableScripting&&this.hasJSActions&&n&&(this._setDefaultPropertiesFromJS(n),n.addEventListener("updatefromsandbox",r=>{this._dispatchEventFromSandbox({},r)})),e}}class OGt extends CS{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,n=this.data.id,r=e.getValue(n,{value:this.data.fieldValue}),o=document.createElement("select");jC.add(o),o.setAttribute("data-element-id",n),o.disabled=this.data.readOnly,this._setRequired(o,this.data.required),o.name=this.data.fieldName,o.tabIndex=nO;let i=this.data.combo&&this.data.options.length>0;this.data.combo||(o.size=this.data.options.length,this.data.multiSelect&&(o.multiple=!0)),o.addEventListener("resetform",u=>{const d=this.data.defaultFieldValue;for(const h of o.options)h.selected=h.value===d});for(const u of this.data.options){const d=document.createElement("option");d.textContent=u.displayValue,d.value=u.exportValue,r.value.includes(u.exportValue)&&(d.setAttribute("selected",!0),i=!1),o.append(d)}let s=null;if(i){const u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),o.prepend(u),s=()=>{u.remove(),o.removeEventListener("input",s),s=null},o.addEventListener("input",s)}const a=u=>{const d=u?"value":"textContent",{options:h,multiple:f}=o;return f?Array.prototype.filter.call(h,p=>p.selected).map(p=>p[d]):h.selectedIndex===-1?null:h[h.selectedIndex][d]};let l=a(!1);const c=u=>{const d=u.target.options;return Array.prototype.map.call(d,h=>({displayValue:h.textContent,exportValue:h.value}))};return this.enableScripting&&this.hasJSActions?(o.addEventListener("updatefromsandbox",u=>{const d={value(h){s?.();const f=h.detail.value,p=new Set(Array.isArray(f)?f:[f]);for(const m of o.options)m.selected=p.has(m.value);e.setValue(n,{value:a(!0)}),l=a(!1)},multipleSelection(h){o.multiple=!0},remove(h){const f=o.options,p=h.detail.remove;f[p].selected=!1,o.remove(p),f.length>0&&Array.prototype.findIndex.call(f,y=>y.selected)===-1&&(f[0].selected=!0),e.setValue(n,{value:a(!0),items:c(h)}),l=a(!1)},clear(h){for(;o.length!==0;)o.remove(0);e.setValue(n,{value:null,items:[]}),l=a(!1)},insert(h){const{index:f,displayValue:p,exportValue:m}=h.detail.insert,y=o.children[f],v=document.createElement("option");v.textContent=p,v.value=m,y?y.before(v):o.append(v),e.setValue(n,{value:a(!0),items:c(h)}),l=a(!1)},items(h){const{items:f}=h.detail;for(;o.length!==0;)o.remove(0);for(const p of f){const{displayValue:m,exportValue:y}=p,v=document.createElement("option");v.textContent=m,v.value=y,o.append(v)}o.options.length>0&&(o.options[0].selected=!0),e.setValue(n,{value:a(!0),items:c(h)}),l=a(!1)},indices(h){const f=new Set(h.detail.indices);for(const p of h.target.options)p.selected=f.has(p.index);e.setValue(n,{value:a(!0)}),l=a(!1)},editable(h){h.target.disabled=!h.detail.editable}};this._dispatchEventFromSandbox(d,u)}),o.addEventListener("input",u=>{const d=a(!0),h=a(!1);e.setValue(n,{value:d}),u.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:l,change:h,changeEx:d,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(o,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],u=>u.target.value)):o.addEventListener("input",function(u){e.setValue(n,{value:a(!0)})}),this.data.combo&&this._setTextStyle(o),this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class Qz extends Fs{constructor(e){const{data:n,elements:r}=e;super(e,{isRenderable:Fs._hasPopupData(n)}),this.elements=r,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e=this.popup=new NGt({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),n=[];for(const r of this.elements)r.popup=e,n.push(r.data.id),r.addHighlightArea();return this.container.setAttribute("aria-controls",n.map(r=>`${wCe}${r}`).join(",")),this.container}}
726class NGt{#e=this.#T.bind(this);#t=this.#x.bind(this);#n=this.#E.bind(this);#o=this.#y.bind(this);#s=null;#r=null;#i=null;#c=null;#l=null;#d=null;#f=null;#u=!1;#a=null;#p=null;#g=null;#h=null;#v=null;#m=null;#b=!1;constructor({container:e,color:n,elements:r,titleObj:o,modificationDate:i,contentsObj:s,richText:a,parent:l,rect:c,parentRect:u,open:d}){this.#r=e,this.#v=o,this.#i=s,this.#h=a,this.#d=l,this.#s=n,this.#g=c,this.#f=u,this.#l=r,this.#c=ICe.toDateObject(i),this.trigger=r.flatMap(h=>h.getElementsToTriggerPopup());for(const h of this.trigger)h.addEventListener("click",this.#o),h.addEventListener("mouseenter",this.#n),h.addEventListener("mouseleave",this.#t),h.classList.add("popupTriggerArea");for(const h of r)h.container?.addEventListener("keydown",this.#e);this.#r.hidden=!0,d&&this.#y()}render(){if(this.#a)return;const e=this.#a=document.createElement("div");if(e.className="popup",this.#s){const i=e.style.outlineColor=On.makeHexColor(...this.#s);CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?e.style.backgroundColor=`color-mix(in srgb, ${i} 30%, white)`:e.style.backgroundColor=On.makeHexColor(...this.#s.map(a=>Math.floor(.7*(255-a)+a)))}const n=document.createElement("span");n.className="header";const r=document.createElement("h1");if(n.append(r),{dir:r.dir,str:r.textContent}=this.#v,e.append(n),this.#c){const i=document.createElement("span");i.classList.add("popupDate"),i.setAttribute("data-l10n-id","pdfjs-annotation-date-string"),i.setAttribute("data-l10n-args",JSON.stringify({date:this.#c.toLocaleDateString(),time:this.#c.toLocaleTimeString()})),n.append(i)}const o=this.#S;if(o)UCe.render({xfaHtml:o,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{const i=this._formatContents(this.#i);e.append(i)}this.#r.append(e)}get#S(){const e=this.#h,n=this.#i;return e?.str&&(!n?.str||n.str===e.str)&&this.#h.html||null}get#w(){return this.#S?.attributes?.style?.fontSize||0}get#A(){return this.#S?.attributes?.style?.color||null}#I(e){const n=[],r={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:n}]}},o={style:{color:this.#A,fontSize:this.#w?`calc(${this.#w}px * var(--scale-factor))`:""}};for(const i of e.split(` 727`))n.push({name:"span",value:i,attributes:o});return r}_formatContents({str:e,dir:n}){const r=document.createElement("p");r.classList.add("popupContent"),r.dir=n;const o=e.split(/(?:\r\n?|\n)/);for(let i=0,s=o.length;i<s;++i){const a=o[i];r.append(document.createTextNode(a)),i<s-1&&r.append(document.createElement("br"))}return r}#T(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key==="Enter"||e.key==="Escape"&&this.#u)&&this.#y()}updateEdited({rect:e,popupContent:n}){this.#m||={contentsObj:this.#i,richText:this.#h},e&&(this.#p=null),n&&(this.#h=this.#I(n),this.#i=null),this.#a?.remove(),this.#a=null}resetEdited(){this.#m&&({contentsObj:this.#i,richText:this.#h}=this.#m,this.#m=null,this.#a?.remove(),this.#a=null,this.#p=null)}#C(){if(this.#p!==null)return;const{page:{view:e},viewport:{rawDims:{pageWidth:n,pageHeight:r,pageX:o,pageY:i}}}=this.#d;let s=!!this.#f,a=s?this.#f:this.#g;for(const p of this.#l)if(!a||On.intersect(p.data.rect,a)!==null){a=p.data.rect,s=!0;break}const l=On.normalizeRect([a[0],e[3]-a[1]+e[1],a[2],e[3]-a[3]+e[1]]),c=5,u=s?a[2]-a[0]+c:0,d=l[0]+u,h=l[1];this.#p=[100*(d-o)/n,100*(h-i)/r];const{style:f}=this.#r;f.left=`${this.#p[0]}%`,f.top=`${this.#p[1]}%`}#y(){this.#u=!this.#u,this.#u?(this.#E(),this.#r.addEventListener("click",this.#o),this.#r.addEventListener("keydown",this.#e)):(this.#x(),this.#r.removeEventListener("click",this.#o),this.#r.removeEventListener("keydown",this.#e))}#E(){this.#a||this.render(),this.isVisible?this.#u&&this.#r.classList.add("focused"):(this.#C(),this.#r.hidden=!1,this.#r.style.zIndex=parseInt(this.#r.style.zIndex)+1e3)}#x(){this.#r.classList.remove("focused"),!(this.#u||!this.isVisible)&&(this.#r.hidden=!0,this.#r.style.zIndex=parseInt(this.#r.style.zIndex)-1e3)}forceHide(){this.#b=this.isVisible,this.#b&&(this.#r.hidden=!0)}maybeShow(){this.#b&&(this.#a||this.#E(),this.#b=!1,this.#r.hidden=!1)}get isVisible(){return this.#r.hidden===!1}}class GCe extends Fs{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=eo.FREETEXT}
727render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const n of this.textContent){const r=document.createElement("span");r.textContent=n,e.append(r)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}get _isEditable(){return this.data.hasOwnCanvas}}class MGt extends Fs{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const e=this.data,{width:n,height:r}=dm(e.rect),o=this.svgFactory.create(n,r,!0),i=this.#e=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),o.append(i),this.container.append(o),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class DGt extends Fs{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const e=this.data,{width:n,height:r}=dm(e.rect),o=this.svgFactory.create(n,r,!0),i=e.borderStyle.width,s=this.#e=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",i/2),s.setAttribute("y",i/2),s.setAttribute("width",n-i),s.setAttribute("height",r-i),s.setAttribute("stroke-width",i||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),o.append(s),this.container.append(o),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class LGt extends Fs{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const e=this.data,{width:n,height:r}=dm(e.rect),o=this.svgFactory.create(n,r,!0),i=e.borderStyle.width,s=this.#e=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",n/2),s.setAttribute("cy",r/2),s.setAttribute("rx",n/2-i/2),s.setAttribute("ry",r/2-i/2),s.setAttribute("stroke-width",i||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),o.append(s),this.container.append(o),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class WCe extends Fs{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:n,height:r}=dm(e.rect),o=this.svgFactory.create(n,r,!0);let i=[];for(const a of e.vertices){const l=a.x-e.rect[0],c=e.rect[3]-a.y;i.push(l+","+c)}i=i.join(" ");const s=this.#e=this.svgFactory.createElement(this.svgElementName);return s.setAttribute("points",i),s.setAttribute("stroke-width",e.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),o.append(s),this.container.append(o),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class kGt extends WCe{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class FGt extends Fs{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class jCe extends Fs{#e=[];constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=eo.INK}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:n,height:r}=dm(e.rect),o=this.svgFactory.create(n,r,!0);for(const i of e.inkLists){let s=[];for(const l of i){const c=l.x-e.rect[0],u=e.rect[3]-l.y;s.push(`${c},${u}`)}s=s.join(" ");const a=this.svgFactory.createElement(this.svgElementName);this.#e.push(a),a.setAttribute("points",s),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),!e.popupRef&&this.hasPopupData&&this._createPopup(),o.append(a)}return this.container.append(o),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class BGt extends Fs{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}
727class $Gt extends Fs{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class HGt extends Fs{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class UGt extends Fs{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class qCe extends Fs{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class zGt extends Fs{#e=null;constructor(e){super(e,{isRenderable:!0});const{file:n}=this.data;this.filename=n.filename,this.content=n.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...n})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:n}=this;let r;n.hasAppearance||n.fillAlpha===0?r=document.createElement("div"):(r=document.createElement("img"),r.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(n.name)?"paperclip":"pushpin"}.svg`,n.fillAlpha&&n.fillAlpha<1&&(r.style=`filter: opacity(${Math.round(n.fillAlpha*100)}%);`)),r.addEventListener("dblclick",this.#t.bind(this)),this.#e=r;const{isMac:o}=pu.platform;return e.addEventListener("keydown",i=>{i.key==="Enter"&&(o?i.metaKey:i.ctrlKey)&&this.#t()}),!n.popupRef&&this.hasPopupData?this._createPopup():r.classList.add("popupTriggerArea"),e.append(r),e}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}#t(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}let VGt=class{#e=null;#t=null;#n=new Map;constructor({div:e,accessibilityManager:n,annotationCanvasMap:r,annotationEditorUIManager:o,page:i,viewport:s}){this.div=e,this.#e=n,this.#t=r,this.page=i,this.viewport=s,this.zIndex=0,this._annotationEditorUIManager=o}#o(e,n){const r=e.firstChild||e;r.id=`${wCe}${n}`,this.div.append(e),this.#e?.moveElementInDOM(this.div,e,r,!1)}async render(e){const{annotations:n}=e,r=this.div;WC(r,this.viewport);const o=new Map,i={data:null,layer:r,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:e.renderForms!==!1,svgFactory:new v9,annotationStorage:e.annotationStorage||new T9,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const s of n){if(s.noHTML)continue;const a=s.annotationType===ca.POPUP;if(a){const u=o.get(s.id);if(!u)continue;i.elements=u}else{const{width:u,height:d}=dm(s.rect);if(u<=0||d<=0)continue}i.data=s;const l=AGt.create(i);if(!l.isRenderable)continue;if(!a&&s.popupRef){const u=o.get(s.popupRef);u?u.push(l):o.set(s.popupRef,[l])}const c=l.render();s.hidden&&(c.style.visibility="hidden"),this.#o(c,s.id),l.annotationEditorType>0&&(this.#n.set(l.data.id,l),this._annotationEditorUIManager?.renderAnnotationElement(l))}this.#s()}update({viewport:e}){const n=this.div;this.viewport=e,WC(n,{rotation:e.rotation}),this.#s(),n.hidden=!1}#s(){if(!this.#t)return;const e=this.div;for(const[n,r]of this.#t){const o=e.querySelector(`[data-annotation-id="${n}"]`);if(!o)continue;r.className="annotationContent";const{firstChild:i}=o;i?i.nodeName==="CANVAS"?i.replaceWith(r):i.classList.contains("annotationContent")?i.after(r):i.before(r):o.append(r)}this.#t.clear()}getEditableAnnotations(){return Array.from(this.#n.values())}getEditableAnnotation(e){return this.#n.get(e)}};const IM=/\r\n?|\n/g;class da extends or{#e=this.editorDivBlur.bind(this);#t=this.editorDivFocus.bind(this);#n=this.editorDivInput.bind(this);#o=this.editorDivKeydown.bind(this);#s=this.editorDivPaste.bind(this);#r;#i="";#c=`${this.id}-editor`;#l;#d=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const e=da.prototype,n=i=>i.isEmpty(),r=i0.TRANSLATE_SMALL,o=i0.TRANSLATE_BIG;return oo(this,"_keyboardManager",new eO([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-o,0],checker:n}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[r,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[o,0],checker:n}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-o],checker:n}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,r],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,o],checker:n}]]))}static _type="freetext";static _editorType=eo.FREETEXT;constructor(e){super({...e,name:"freeTextEditor"}),this.#r=e.color||da._defaultColor||or._defaultLineColor,this.#l=e.fontSize||da._defaultFontSize}static initialize(e,n){or.initialize(e,n,{strings:["pdfjs-free-text-default-content"]});const r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}
727static updateDefaultParams(e,n){switch(e){case sr.FREETEXT_SIZE:da._defaultFontSize=n;break;case sr.FREETEXT_COLOR:da._defaultColor=n;break}}updateParams(e,n){switch(e){case sr.FREETEXT_SIZE:this.#f(n);break;case sr.FREETEXT_COLOR:this.#u(n);break}}static get defaultPropertiesToUpdate(){return[[sr.FREETEXT_SIZE,da._defaultFontSize],[sr.FREETEXT_COLOR,da._defaultColor||or._defaultLineColor]]}get propertiesToUpdate(){return[[sr.FREETEXT_SIZE,this.#l],[sr.FREETEXT_COLOR,this.#r]]}#f(e){const n=o=>{this.editorDiv.style.fontSize=`calc(${o}px * var(--scale-factor))`,this.translate(0,-(o-this.#l)*this.parentScale),this.#l=o,this.#p()},r=this.#l;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:sr.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#u(e){const n=o=>{this.#r=this.editorDiv.style.color=o},r=this.#r;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:sr.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,n){this._uiManager.translateSelectedEditors(e,n,!0)}getInitialTranslation(){const e=this.parentScale;return[-da._internalPadding*e,-(da._internalPadding+this.#l)*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(eo.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",this.#o),this.editorDiv.addEventListener("focus",this.#t),this.editorDiv.addEventListener("blur",this.#e),this.editorDiv.addEventListener("input",this.#n),this.editorDiv.addEventListener("paste",this.#s))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#c),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#o),this.editorDiv.removeEventListener("focus",this.#t),this.editorDiv.removeEventListener("blur",this.#e),this.editorDiv.removeEventListener("input",this.#n),this.editorDiv.removeEventListener("paste",this.#s),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#a(){const e=[];this.editorDiv.normalize();for(const n of this.editorDiv.childNodes)e.push(da.#g(n));return e.join(` 728`)}#p(){const[e,n]=this.parentDimensions;let r;if(this.isAttachedToDOM)r=this.div.getBoundingClientRect();else{const{currentLayer:o,div:i}=this,s=i.style.display,a=i.classList.contains("hidden");i.classList.remove("hidden"),i.style.display="hidden",o.div.append(this.div),r=i.getBoundingClientRect(),i.remove(),i.style.display=s,i.classList.toggle("hidden",a)}this.rotation%180===this.parentRotation%180?(this.width=r.width/e,this.height=r.height/n):(this.width=r.height/e,this.height=r.width/n),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=this.#i,n=this.#i=this.#a().trimEnd();if(e===n)return;const r=o=>{if(this.#i=o,!o){this.remove();return}this.#h(),this._uiManager.rebuild(this),this.#p()};this.addCommands({cmd:()=>{r(n)},undo:()=>{r(e)},mustExec:!1}),this.#p()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){da._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}
728render(){if(this.div)return this.div;let e,n;this.width&&(e=this.x,n=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#c),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text"),this.enableEditing(),or._l10nPromise.get("pdfjs-free-text-default-content").then(o=>this.editorDiv?.setAttribute("default-content",o)),this.editorDiv.contentEditable=!0;const{style:r}=this.editorDiv;if(r.fontSize=`calc(${this.#l}px * var(--scale-factor))`,r.color=this.#r,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),J2(this,this.div,["dblclick","keydown"]),this.width){const[o,i]=this.parentDimensions;if(this.annotationElementId){const{position:s}=this.#d;let[a,l]=this.getInitialTranslation();[a,l]=this.pageTranslationToScreen(a,l);const[c,u]=this.pageDimensions,[d,h]=this.pageTranslation;let f,p;switch(this.rotation){case 0:f=e+(s[0]-d)/c,p=n+this.height-(s[1]-h)/u;break;case 90:f=e+(s[0]-d)/c,p=n-(s[1]-h)/u,[a,l]=[l,-a];break;case 180:f=e-this.width+(s[0]-d)/c,p=n-(s[1]-h)/u,[a,l]=[-a,-l];break;case 270:f=e+(s[0]-d-this.height*u)/c,p=n+(s[1]-h-this.width*c)/u,[a,l]=[-l,a];break}this.setAt(f*o,p*i,a,l)}else this.setAt(e*o,n*i,this.width*o,this.height*i);this.#h(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#g(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(IM,"")}editorDivPaste(e){const n=e.clipboardData||window.clipboardData,{types:r}=n;if(r.length===1&&r[0]==="text/plain")return;e.preventDefault();const o=da.#m(n.getData("text")||"").replaceAll(IM,` 729`);if(!o)return;const i=window.getSelection();if(!i.rangeCount)return;this.editorDiv.normalize(),i.deleteFromDocument();const s=i.getRangeAt(0);if(!o.includes(` 730`)){s.insertNode(document.createTextNode(o)),this.editorDiv.normalize(),i.collapseToStart();return}const{startContainer:a,startOffset:l}=s,c=[],u=[];if(a.nodeType===Node.TEXT_NODE){const f=a.parentElement;if(u.push(a.nodeValue.slice(l).replaceAll(IM,"")),f!==this.editorDiv){let p=c;for(const m of this.editorDiv.childNodes){if(m===f){p=u;continue}p.push(da.#g(m))}}c.push(a.nodeValue.slice(0,l).replaceAll(IM,""))}else if(a===this.editorDiv){let f=c,p=0;for(const m of this.editorDiv.childNodes)p++===l&&(f=u),f.push(da.#g(m))}this.#i=`${c.join(` 731`)}${o}${u.join(` 732`)}`,this.#h();const d=new Range;let h=c.reduce((f,p)=>f+p.length,0);for(const{firstChild:f}of this.editorDiv.childNodes)if(f.nodeType===Node.TEXT_NODE){const p=f.nodeValue.length;if(h<=p){d.setStart(f,h),d.setEnd(f,h);break}h-=p}i.removeAllRanges(),i.addRange(d)}#h(){if(this.editorDiv.replaceChildren(),!!this.#i)for(const e of this.#i.split(` 733`)){const n=document.createElement("div");n.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(n)}}#v(){return this.#i.replaceAll("Â "," ")}static#m(e){return e.replaceAll(" ","Â ")}get contentDiv(){return this.editorDiv}static deserialize(e,n,r){let o=null;if(e instanceof GCe){const{data:{defaultAppearanceData:{fontSize:s,fontColor:a},rect:l,rotation:c,id:u},textContent:d,textPosition:h,parent:{page:{pageNumber:f}}}=e;if(!d||d.length===0)return null;o=e={annotationType:eo.FREETEXT,color:Array.from(a),fontSize:s,value:d.join(` 734`),position:h,pageIndex:f-1,rect:l.slice(0),rotation:c,id:u,deleted:!1}}const i=super.deserialize(e,n,r);return i.#l=e.fontSize,i.#r=On.makeHexColor(...e.color),i.#i=da.#m(e.value),i.annotationElementId=e.id||null,i.#d=o,i}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const n=da._internalPadding*this.parentScale,r=this.getRect(n,n),o=or._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#r),i={annotationType:eo.FREETEXT,color:o,fontSize:this.#l,value:this.#v(),pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?i:this.annotationElementId&&!this.#b(i)?null:(i.id=this.annotationElementId,i)}#b(e){const{value:n,fontSize:r,color:o,pageIndex:i}=this.#d;return this._hasBeenMoved||e.value!==n||e.fontSize!==r||e.color.some((s,a)=>s!==o[a])||e.pageIndex!==i}renderAnnotationElement(e){const n=super.renderAnnotationElement(e);
vendor: 5,635 bytes, lines 734-735
734if(this.deleted)return n;const{style:r}=n;r.fontSize=`calc(${this.#l}px * var(--scale-factor))`,r.color=this.#r,n.replaceChildren();for(const i of this.#i.split(` 735`)){const s=document.createElement("div");s.append(i?document.createTextNode(i):document.createElement("br")),n.append(s)}const o=da._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(o,o),popupContent:this.#i}),n}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}}class Zz{#e;#t=[];#n=[];constructor(e,n=0,r=0,o=!0){let i=1/0,s=-1/0,a=1/0,l=-1/0;const u=10**-4;for(const{x:v,y:b,width:S,height:w}of e){const A=Math.floor((v-n)/u)*u,_=Math.ceil((v+S+n)/u)*u,P=Math.floor((b-n)/u)*u,R=Math.ceil((b+w+n)/u)*u,O=[A,P,R,!0],N=[_,P,R,!1];this.#t.push(O,N),i=Math.min(i,A),s=Math.max(s,_),a=Math.min(a,P),l=Math.max(l,R)}const d=s-i+2*r,h=l-a+2*r,f=i-r,p=a-r,m=this.#t.at(o?-1:-2),y=[m[0],m[2]];for(const v of this.#t){const[b,S,w]=v;v[0]=(b-f)/d,v[1]=(S-p)/h,v[2]=(w-p)/h}this.#e={x:f,y:p,width:d,height:h,lastPoint:y}}getOutlines(){this.#t.sort((n,r)=>n[0]-r[0]||n[1]-r[1]||n[2]-r[2]);const e=[];for(const n of this.#t)n[3]?(e.push(...this.#c(n)),this.#r(n)):(this.#i(n),e.push(...this.#c(n)));return this.#o(e)}#o(e){const n=[],r=new Set;for(const s of e){const[a,l,c]=s;n.push([a,l,s],[a,c,s])}n.sort((s,a)=>s[1]-a[1]||s[0]-a[0]);for(let s=0,a=n.length;s<a;s+=2){const l=n[s][2],c=n[s+1][2];l.push(c),c.push(l),r.add(l),r.add(c)}const o=[];let i;for(;r.size>0;){const s=r.values().next().value;let[a,l,c,u,d]=s;r.delete(s);let h=a,f=l;for(i=[a,c],o.push(i);;){let p;if(r.has(u))p=u;else if(r.has(d))p=d;else break;r.delete(p),[a,l,c,u,d]=p,h!==a&&(i.push(h,f,a,f===l?l:c),h=a),f=f===l?c:l}i.push(h,f)}return new GGt(o,this.#e)}#s(e){const n=this.#n;let r=0,o=n.length-1;for(;r<=o;){const i=r+o>>1,s=n[i][0];if(s===e)return i;s<e?r=i+1:o=i-1}return o+1}#r([,e,n]){const r=this.#s(e);this.#n.splice(r,0,[e,n])}#i([,e,n]){const r=this.#s(e);for(let o=r;o<this.#n.length;o++){const[i,s]=this.#n[o];if(i!==e)break;if(i===e&&s===n){this.#n.splice(o,1);return}}for(let o=r-1;o>=0;o--){const[i,s]=this.#n[o];if(i!==e)break;if(i===e&&s===n){this.#n.splice(o,1);return}}}#c(e){const[n,r,o]=e,i=[[n,r,o]],s=this.#s(o);for(let a=0;a<s;a++){const[l,c]=this.#n[a];for(let u=0,d=i.length;u<d;u++){const[,h,f]=i[u];if(!(c<=h||f<=l)){if(h>=l){if(f>c)i[u][1]=c;else{if(d===1)return[];i.splice(u,1),u--,d--}continue}i[u][2]=l,f>c&&i.push([n,c,f])}}}return i}}class YCe{toSVGPath(){throw new Error("Abstract method `toSVGPath` must be implemented.")}get box(){throw new Error("Abstract getter `box` must be implemented.")}serialize(e,n){throw new Error("Abstract method `serialize` must be implemented.")}get free(){return this instanceof Jz}}class GGt extends YCe{#e;#t;constructor(e,n){super(),this.#t=e,this.#e=n}toSVGPath(){const e=[];for(const n of this.#t){let[r,o]=n;e.push(`M${r} ${o}`);for(let i=2;i<n.length;i+=2){const s=n[i],a=n[i+1];s===r?(e.push(`V${a}`),o=a):a===o&&(e.push(`H${s}`),r=s)}e.push("Z")}return e.join(" ")}serialize([e,n,r,o],i){const s=[],a=r-e,l=o-n;for(const c of this.#t){const u=new Array(c.length);for(let d=0;d<c.length;d+=2)u[d]=e+c[d]*a,u[d+1]=o-c[d+1]*l;s.push(u)}return s}get box(){return this.#e}}class Qb{#e;#t=[];#n;#o;#s=[];#r=new Float64Array(18);#i;#c;#l;#d;#f;#u;#a=[];static#p=8;static#g=2;static#h=Qb.#p+Qb.#g;constructor({x:e,y:n},r,o,i,s,a=0){this.#e=r,this.#u=i*o,this.#o=s,this.#r.set([NaN,NaN,NaN,NaN,e,n],6),this.#n=a,this.#d=Qb.#p*o,this.#l=Qb.#h*o,this.#f=o,this.#a.push(e,n)}get free(){return!0}isEmpty(){return isNaN(this.#r[8])}#v(){const e=this.#r.subarray(4,6),n=this.#r.subarray(16,18),[r,o,i,s]=this.#e;return[(this.#i+(e[0]-n[0])/2-r)/i,(this.#c+(e[1]-n[1])/2-o)/s,(this.#i+(n[0]-e[0])/2-r)/i,(this.#c+(n[1]-e[1])/2-o)/s]}add({x:e,y:n}){this.#i=e,this.#c=n;const[r,o,i,s]=this.#e;let[a,l,c,u]=this.#r.subarray(8,12);const d=e-c,h=n-u,f=Math.hypot(d,h);if(f<this.#l)return!1;const p=f-this.#d,m=p/f,y=m*d,v=m*h;let b=a,S=l;a=c,l=u,c+=y,u+=v,this.#a?.push(e,n);const w=-v/p,A=y/p,_=w*this.#u,P=A*this.#u;return this.#r.set(this.#r.subarray(2,8),0),this.#r.set([c+_,u+P],4),this.#r.set(this.#r.subarray(14,18),12),this.#r.set([c-_,u-P],16),isNaN(this.#r[6])?(this.#s.length===0&&(this.#r.set([a+_,l+P],2),this.#s.push(NaN,NaN,NaN,NaN,(a+_-r)/i,(l+P-o)/s),this.#r.set([a-_,l-P],14),this.#t.push(NaN,NaN,NaN,NaN,(a-_-r)/i,(l-P-o)/s)),this.#r.set([b,S,a,l,c,u],6),!this.isEmpty()):(this.#r.set([b,S,a,l,c,u],6),Math.abs(Math.atan2(S-l,b-a)-Math.atan2(v,y))<Math.PI/2?([a,l,c,u]=this.#r.subarray(2,6),this.#s.push(NaN,NaN,NaN,NaN,((a+c)/2-r)/i,((l+u)/2-o)/s),[a,l,b,S]=this.#r.subarray(14,18),this.#t.push(NaN,NaN,NaN,NaN,((b+a)/2-r)/i,((S+l)/2-o)/s),!0):([b,S,a,l,c,u]=this.#r.subarray(0,6),this.#s.push(((b+5*a)/6-r)/i,((S+5*l)/6-o)/s,((5*a+c)/6-r)/i,((5*l+u)/6-o)/s,((a+c)/2-r)/i,((l+u)/2-o)/s),[c,u,a,l,b,S]=this.#r.subarray(12,18),this.#t.push(((b+5*a)/6-r)/i,((S+5*l)/6-o)/s,((5*a+c)/6-r)/i,((5*l+u)/6-o)/s,((a+c)/2-r)/i,((l+u)/2-o)/s),!0))}toSVGPath(){if(this.isEmpty())return"";const e=this.#s,n=this.#t,r=this.#r.subarray(4,6),o=this.#r.subarray(16,18),[i,s,a,l]=this.#e,[c,u,d,h]=this.#v();if(isNaN(this.#r[6])&&!this.isEmpty())return`M${(this.#r[2]-i)/a} ${(this.#r[3]-s)/l} L${(this.#r[4]-i)/a} ${(this.#r[5]-s)/l} L${c} ${u} L${d} ${h} L${(this.#r[16]-i)/a} ${(this.#r[17]-s)/l} L${(this.#r[14]-i)/a} ${(this.#r[15]-s)/l} Z`;const f=[];f.push(`M${e[4]} ${e[5]}`);for(let p=6;p<e.length;p+=6)isNaN(e[p])?f.push(`L${e[p+4]} ${e[p+5]}`):f.push(`C${e[p]} ${e[p+1]} ${e[p+2]} ${e[p+3]} ${e[p+4]} ${e[p+5]}`);f.push(`L${(r[0]-i)/a} ${(r[1]-s)/l} L${c} ${u} L${d} ${h} L${(o[0]-i)/a}
735 ${(o[1]-s)/l}`);for(let p=n.length-6;p>=6;p-=6)isNaN(n[p])?f.push(`L${n[p+4]} ${n[p+5]}`):f.push(`C${n[p]} ${n[p+1]} ${n[p+2]} ${n[p+3]} ${n[p+4]} ${n[p+5]}`);return f.push(`L${n[4]} ${n[5]} Z`),f.join(" ")}getOutlines(){const e=this.#s,n=this.#t,r=this.#r,o=r.subarray(4,6),i=r.subarray(16,18),[s,a,l,c]=this.#e,u=new Float64Array((this.#a?.length??0)+2);for(let v=0,b=u.length-2;v<b;v+=2)u[v]=(this.#a[v]-s)/l,u[v+1]=(this.#a[v+1]-a)/c;u[u.length-2]=(this.#i-s)/l,u[u.length-1]=(this.#c-a)/c;const[d,h,f,p]=this.#v();if(isNaN(r[6])&&!this.isEmpty()){const v=new Float64Array(36);return v.set([NaN,NaN,NaN,NaN,(r[2]-s)/l,(r[3]-a)/c,NaN,NaN,NaN,NaN,(r[4]-s)/l,(r[5]-a)/c,NaN,NaN,NaN,NaN,d,h,NaN,NaN,NaN,NaN,f,p,NaN,NaN,NaN,NaN,(r[16]-s)/l,(r[17]-a)/c,NaN,NaN,NaN,NaN,(r[14]-s)/l,(r[15]-a)/c],0),new Jz(v,u,this.#e,this.#f,this.#n,this.#o)}const m=new Float64Array(this.#s.length+24+this.#t.length);let y=e.length;for(let v=0;v<y;v+=2){if(isNaN(e[v])){m[v]=m[v+1]=NaN;continue}m[v]=e[v],m[v+1]=e[v+1]}m.set([NaN,NaN,NaN,NaN,(o[0]-s)/l,(o[1]-a)/c,NaN,NaN,NaN,NaN,d,h,NaN,NaN,NaN,NaN,f,p,NaN,NaN,NaN,NaN,(i[0]-s)/l,(i[1]-a)/c],y),y+=24;for(let v=n.length-6;v>=6;v-=6)for(let b=0;b<6;b+=2){if(isNaN(n[v+b])){m[y]=m[y+1]=NaN,y+=2;continue}m[y]=n[v+b],m[y+1]=n[v+b+1],y+=2}return m.set([NaN,NaN,NaN,NaN,n[4],n[5]],y),new Jz(m,u,this.#e,this.#f,this.#n,this.#o)}}class Jz extends YCe{#e;#t=null;#n;#o;#s;#r;#i;constructor(e,n,r,o,i,s){super(),this.#i=e,this.#s=n,this.#e=r,this.#r=o,this.#n=i,this.#o=s,this.#d(s);const{x:a,y:l,width:c,height:u}=this.#t;for(let d=0,h=e.length;d<h;d+=2)e[d]=(e[d]-a)/c,e[d+1]=(e[d+1]-l)/u;for(let d=0,h=n.length;d<h;d+=2)n[d]=(n[d]-a)/c,n[d+1]=(n[d+1]-l)/u}toSVGPath(){const e=[`M${this.#i[4]} ${this.#i[5]}`];for(let n=6,r=this.#i.length;n<r;n+=6){if(isNaN(this.#i[n])){e.push(`L${this.#i[n+4]} ${this.#i[n+5]}`);continue}e.push(`C${this.#i[n]} ${this.#i[n+1]} ${this.#i[n+2]} ${this.#i[n+3]} ${this.#i[n+4]} ${this.#i[n+5]}`)}return e.push("Z"),e.join(" ")}serialize([e,n,r,o],i){const s=r-e,a=o-n;let l,c;switch(i){case 0:l=this.#c(this.#i,e,o,s,-a),c=this.#c(this.#s,e,o,s,-a);break;case 90:l=this.#l(this.#i,e,n,s,a),c=this.#l(this.#s,e,n,s,a);break;case 180:l=this.#c(this.#i,r,n,-s,a),c=this.#c(this.#s,r,n,-s,a);break;case 270:l=this.#l(this.#i,r,o,-s,-a),c=this.#l(this.#s,r,o,-s,-a);break}return{outline:Array.from(l),points:[Array.from(c)]}}#c(e,n,r,o,i){const s=new Float64Array(e.length);for(let a=0,l=e.length;a<l;a+=2)s[a]=n+e[a]*o,s[a+1]=r+e[a+1]*i;return s}#l(e,n,r,o,i){const s=new Float64Array(e.length);for(let a=0,l=e.length;a<l;a+=2)s[a]=n+e[a+1]*o,s[a+1]=r+e[a]*i;return s}#d(e){const n=this.#i;let r=n[4],o=n[5],i=r,s=o,a=r,l=o,c=r,u=o;const d=e?Math.max:Math.min;for(let y=6,v=n.length;y<v;y+=6){if(isNaN(n[y]))i=Math.min(i,n[y+4]),s=Math.min(s,n[y+5]),a=Math.max(a,n[y+4]),l=Math.max(l,n[y+5]),u<n[y+5]?(c=n[y+4],u=n[y+5]):u===n[y+5]&&(c=d(c,n[y+4]));else{const b=On.bezierBoundingBox(r,o,...n.slice(y,y+6));i=Math.min(i,b[0]),s=Math.min(s,b[1]),a=Math.max(a,b[2]),l=Math.max(l,b[3]),u<b[3]?(c=b[2],u=b[3]):u===b[3]&&(c=d(c,b[2]))}r=n[y+4],o=n[y+5]}const h=i-this.#n,f=s-this.#n,p=a-i+2*this.#n,m=l-s+2*this.#n;this.#t={x:h,y:f,width:p,height:m,lastPoint:[c,u]}}get box(){return this.#t}getNewOutline(e,n){const{x:r,y:o,width:i,height:s}=this.#t,[a,l,c,u]=this.#e,d=i*c,h=s*u,f=r*c+a,p=o*u+l,m=new Qb({x:this.#s[0]*d+f,y:this.#s[1]*h+p},this.#e,this.#r,e,this.#o,n??this.#n);for(let y=2;y<this.#s.length;y+=2)m.add({x:this.#s[y]*d+f,y:this.#s[y+1]*h+p});return m.getOutlines()}}class fp{#e=this.#g.bind(this);#t=this.#v.bind(this);#n=null;#o=null;#s;#r=null;#i=!1;#c=!1;#l=null;#d;#f=null;#u;static get _keyboardManager(){return oo(this,"_keyboardManager",new eO([[["Escape","mac+Escape"],fp.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],fp.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],fp.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],fp.prototype._moveToPrevious],[["Home","mac+Home"],fp.prototype._moveToBeginning],[["End","mac+End"],fp.prototype._moveToEnd]]))}constructor({editor:e=null,uiManager:n=null}){e?(this.#c=!1,this.#u=sr.HIGHLIGHT_COLOR,this.#l=e):(this.#c=!0,this.#u=sr.HIGHLIGHT_DEFAULT_COLOR),this.#f=e?._uiManager||n,this.#d=this.#f._eventBus,this.#s=e?.color||this.#f?.highlightColors.values().next().value||"#FFFF98"}renderButton(){const e=this.#n=document.createElement("button");
735e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.setAttribute("aria-haspopup",!0),e.addEventListener("click",this.#h.bind(this)),e.addEventListener("keydown",this.#e);const n=this.#o=document.createElement("span");return n.className="swatch",n.setAttribute("aria-hidden",!0),n.style.backgroundColor=this.#s,e.append(n),e}renderMainDropdown(){const e=this.#r=this.#a();return e.setAttribute("aria-orientation","horizontal"),e.setAttribute("aria-labelledby","highlightColorPickerLabel"),e}#a(){const e=document.createElement("div");e.addEventListener("contextmenu",Eu),e.className="dropdown",e.role="listbox",e.setAttribute("aria-multiselectable",!1),e.setAttribute("aria-orientation","vertical"),e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(const[n,r]of this.#f.highlightColors){const o=document.createElement("button");o.tabIndex="0",o.role="option",o.setAttribute("data-color",r),o.title=n,o.setAttribute("data-l10n-id",`pdfjs-editor-colorpicker-${n}`);const i=document.createElement("span");o.append(i),i.className="swatch",i.style.backgroundColor=r,o.setAttribute("aria-selected",r===this.#s),o.addEventListener("click",this.#p.bind(this,r)),e.append(o)}return e.addEventListener("keydown",this.#e),e}#p(e,n){n.stopPropagation(),this.#d.dispatch("switchannotationeditorparams",{source:this,type:this.#u,value:e})}_colorSelectFromKeyboard(e){if(e.target===this.#n){this.#h(e);return}const n=e.target.getAttribute("data-color");n&&this.#p(n,e)}_moveToNext(e){if(!this.#m){this.#h(e);return}if(e.target===this.#n){this.#r.firstChild?.focus();return}e.target.nextSibling?.focus()}_moveToPrevious(e){if(e.target===this.#r?.firstChild||e.target===this.#n){this.#m&&this._hideDropdownFromKeyboard();return}this.#m||this.#h(e),e.target.previousSibling?.focus()}_moveToBeginning(e){if(!this.#m){this.#h(e);return}this.#r.firstChild?.focus()}_moveToEnd(e){if(!this.#m){this.#h(e);return}this.#r.lastChild?.focus()}#g(e){fp._keyboardManager.exec(this,e)}#h(e){if(this.#m){this.hideDropdown();return}if(this.#i=e.detail===0,window.addEventListener("pointerdown",this.#t),this.#r){this.#r.classList.remove("hidden");return}const n=this.#r=this.#a();this.#n.append(n)}#v(e){this.#r?.contains(e.target)||this.hideDropdown()}hideDropdown(){this.#r?.classList.add("hidden"),window.removeEventListener("pointerdown",this.#t)}get#m(){return this.#r&&!this.#r.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#c){if(!this.#m){this.#l?.unselect();return}this.hideDropdown(),this.#n.focus({preventScroll:!0,focusVisible:this.#i})}}updateColor(e){if(this.#o&&(this.#o.style.backgroundColor=e),!this.#r)return;const n=this.#f.highlightColors.values();for(const r of this.#r.children)r.setAttribute("aria-selected",n.next().value===e)}destroy(){this.#n?.remove(),this.#n=null,this.#o=null,this.#r?.remove(),this.#r=null}}class Gs extends or{#e=null;#t=0;#n;#o=null;#s=null;#r=null;#i=null;#c=0;#l=null;#d=null;#f=null;#u=!1;#a=this.#x.bind(this);#p=null;#g;#h=null;#v="";#m;#b="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _l10nPromise;static _type="highlight";static _editorType=eo.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const e=Gs.prototype;return oo(this,"_keyboardManager",new eO([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}constructor(e){super({...e,name:"highlightEditor"}),this.color=e.color||Gs._defaultColor,this.#m=e.thickness||Gs._defaultThickness,this.#g=e.opacity||Gs._defaultOpacity,this.#n=e.boxes||null,this.#b=e.methodOfCreation||"",this.#v=e.text||"",this._isDraggable=!1,e.highlightId>-1?(this.#u=!0,this.#w(e),this.#y()):(this.#e=e.anchorNode,this.#t=e.anchorOffset,this.#i=e.focusNode,this.#c=e.focusOffset,this.#S(),this.#y(),this.rotate(this.rotation))}get telemetryInitialData(){return{action:"added",type:this.#u?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:this.#m,methodOfCreation:this.#b}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("
735color").size}}#S(){const e=new Zz(this.#n,.001);this.#d=e.getOutlines(),{x:this.x,y:this.y,width:this.width,height:this.height}=this.#d.box;const n=new Zz(this.#n,.0025,.001,this._uiManager.direction==="ltr");this.#r=n.getOutlines();const{lastPoint:r}=this.#r.box;this.#p=[(r[0]-this.x)/this.width,(r[1]-this.y)/this.height]}#w({highlightOutlines:e,highlightId:n,clipPathId:r}){this.#d=e;const o=1.5;if(this.#r=e.getNewOutline(this.#m/2+o,.0025),n>=0)this.#f=n,this.#o=r,this.parent.drawLayer.finalizeLine(n,e),this.#h=this.parent.drawLayer.highlightOutline(this.#r);else if(this.parent){const u=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(this.#f,e),this.parent.drawLayer.updateBox(this.#f,Gs.#E(this.#d.box,(u-this.rotation+360)%360)),this.parent.drawLayer.updateLine(this.#h,this.#r),this.parent.drawLayer.updateBox(this.#h,Gs.#E(this.#r.box,u))}const{x:i,y:s,width:a,height:l}=e.box;switch(this.rotation){case 0:this.x=i,this.y=s,this.width=a,this.height=l;break;case 90:{const[u,d]=this.parentDimensions;this.x=s,this.y=1-i,this.width=a*d/u,this.height=l*u/d;break}case 180:this.x=1-i,this.y=1-s,this.width=a,this.height=l;break;case 270:{const[u,d]=this.parentDimensions;this.x=1-s,this.y=i,this.width=a*d/u,this.height=l*u/d;break}}const{lastPoint:c}=this.#r.box;this.#p=[(c[0]-i)/a,(c[1]-s)/l]}static initialize(e,n){or.initialize(e,n),Gs._defaultColor||=n.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(e,n){switch(e){case sr.HIGHLIGHT_DEFAULT_COLOR:Gs._defaultColor=n;break;case sr.HIGHLIGHT_THICKNESS:Gs._defaultThickness=n;break}}translateInPage(e,n){}get toolbarPosition(){return this.#p}updateParams(e,n){switch(e){case sr.HIGHLIGHT_COLOR:this.#A(n);break;case sr.HIGHLIGHT_THICKNESS:this.#I(n);break}}static get defaultPropertiesToUpdate(){return[[sr.HIGHLIGHT_DEFAULT_COLOR,Gs._defaultColor],[sr.HIGHLIGHT_THICKNESS,Gs._defaultThickness]]}get propertiesToUpdate(){return[[sr.HIGHLIGHT_COLOR,this.color||Gs._defaultColor],[sr.HIGHLIGHT_THICKNESS,this.#m||Gs._defaultThickness],[sr.HIGHLIGHT_FREE,this.#u]]}#A(e){const n=o=>{this.color=o,this.parent?.drawLayer.changeColor(this.#f,o),this.#s?.updateColor(o)},r=this.color;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:sr.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)}#I(e){const n=this.#m,r=o=>{this.#m=o,this.#T(o)};this.addCommands({cmd:r.bind(this,e),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:sr.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)}async addEditToolbar(){const e=await super.addEditToolbar();return e?(this._uiManager.highlightColors&&(this.#s=new fp({editor:this}),e.addColorPicker(this.#s)),e):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#P())}getBaseTranslation(){return[0,0]}getRect(e,n){return super.getRect(e,n,this.#P())}onceAdded(){this.parent.addUndoableEditor(this),this.div.focus()}remove(){this.#C(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#y(),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let n=!1;this.parent&&!e?this.#C():e&&(this.#y(e),n=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),this.show(this._isVisible),n&&this.select()}#T(e){if(!this.#u)return;this.#w({highlightOutlines:this.#d.getNewOutline(e/2)}),this.fixAndSetPosition();const[n,r]=this.parentDimensions;this.setDims(this.width*n,this.height*r)}#C(){this.#f===null||!this.parent||(this.parent.drawLayer.remove(this.#f),this.#f=null,this.parent.drawLayer.remove(this.#h),this.#h=null)}#y(e=this.parent){this.#f===null&&({id:this.#f,clipPathId:this.#o}=e.drawLayer.highlight(this.#d,this.color,this.#g),this.#h=e.drawLayer.highlightOutline(this.#r),this.#l&&(this.#l.
735style.clipPath=this.#o))}static#E({x:e,y:n,width:r,height:o},i){switch(i){case 90:return{x:1-n-o,y:e,width:o,height:r};case 180:return{x:1-e-r,y:1-n-o,width:r,height:o};case 270:return{x:n,y:1-e-r,width:o,height:r}}return{x:e,y:n,width:r,height:o}}rotate(e){const{drawLayer:n}=this.parent;let r;this.#u?(e=(e-this.rotation+360)%360,r=Gs.#E(this.#d.box,e)):r=Gs.#E(this,e),n.rotate(this.#f,e),n.rotate(this.#h,e),n.updateBox(this.#f,r),n.updateBox(this.#h,Gs.#E(this.#r.box,e))}render(){if(this.div)return this.div;const e=super.render();this.#v&&(e.setAttribute("aria-label",this.#v),e.setAttribute("role","mark")),this.#u?e.classList.add("free"):this.div.addEventListener("keydown",this.#a);const n=this.#l=document.createElement("div");e.append(n),n.setAttribute("aria-hidden","true"),n.className="internal",n.style.clipPath=this.#o;const[r,o]=this.parentDimensions;return this.setDims(this.width*r,this.height*o),J2(this,this.#l,["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.parent.drawLayer.addClass(this.#h,"hovered")}pointerleave(){this.parent.drawLayer.removeClass(this.#h,"hovered")}#x(e){Gs._keyboardManager.exec(this,e)}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:this.#R(!0);break;case 1:case 3:this.#R(!1);break}}#R(e){if(!this.#e)return;const n=window.getSelection();e?n.setPosition(this.#e,this.#t):n.setPosition(this.#i,this.#c)}select(){super.select(),this.#h&&(this.parent?.drawLayer.removeClass(this.#h,"hovered"),this.parent?.drawLayer.addClass(this.#h,"selected"))}unselect(){super.unselect(),this.#h&&(this.parent?.drawLayer.removeClass(this.#h,"selected"),this.#u||this.#R(!1))}get _mustFixPosition(){return!this.#u}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.show(this.#f,e),this.parent.drawLayer.show(this.#h,e))}#P(){return this.#u?this.rotation:0}#M(){if(this.#u)return null;const[e,n]=this.pageDimensions,r=this.#n,o=new Array(r.length*8);let i=0;for(const{x:s,y:a,width:l,height:c}of r){const u=s*e,d=(1-a-c)*n;o[i]=o[i+4]=u,o[i+1]=o[i+3]=d,o[i+2]=o[i+6]=u+l*e,o[i+5]=o[i+7]=d+c*n,i+=8}return o}#O(e){return this.#d.serialize(e,this.#P())}static startHighlighting(e,n,{target:r,x:o,y:i}){const{x:s,y:a,width:l,height:c}=r.getBoundingClientRect(),u=p=>{this.#D(e,p)},d={capture:!0,passive:!1},h=p=>{p.preventDefault(),p.stopPropagation()},f=p=>{r.removeEventListener("pointermove",u),window.removeEventListener("blur",f),window.removeEventListener("pointerup",f),window.removeEventListener("pointerdown",h,d),window.removeEventListener("contextmenu",Eu),this.#N(e,p)};window.addEventListener("blur",f),window.addEventListener("pointerup",f),window.addEventListener("pointerdown",h,d),window.addEventListener("contextmenu",Eu),r.addEventListener("pointermove",u),this._freeHighlight=new Qb({x:o,y:i},[s,a,l,c],e.scale,this._defaultThickness/2,n,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.highlight(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0)}static#D(e,n){this._freeHighlight.add(n)&&e.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)}static#N(e,n){this._freeHighlight.isEmpty()?e.drawLayer.removeFreeHighlight(this._freeHighlightId):e.createAndAddNewEditor(n,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static deserialize(e,n,r){const o=super.deserialize(e,n,r),{rect:[i,s,a,l],color:c,quadPoints:u}=e;o.color=On.makeHexColor(...c),o.#g=e.opacity;const[d,h]=o.pageDimensions;o.width=(a-i)/d,o.height=(l-s)/h;const f=o.#n=[];for(let p=0;p<u.length;p+=8)f.push({x:(u[4]-a)/d,y:(l-(1-u[p+5]))/h,width:(u[p+2]-u[p])/d,height:(u[p+5]-u[p+1])/h});return o.#S(),o}serialize(e=!1){if(this.isEmpty()||e)return null;const n=this.getRect(0,0),r=or._colorManager.convert(this.color);return{annotationType:eo.HIGHLIGHT,color:r,opacity:this.#g,thickness:this.#m,quadPoints:this.#M(),outlines:this.#O(n),pageIndex:this.pageIndex,rect:n,rotation:this.#P(),structTreeParentId:this._structTreeParentId}}static canCreateNewEmptyEditor(){return!1}}class fl extends or{#e=0;#t=0;#n=this.canvasPointermove.bind(this);#o=this.canvasPointerleave.bind(this);#s=this.canvasPointerup.bind(this);#r=this.canvasPointerdown.bind(this);#i=null;#c=new Path2D;#l=!1;#d=!1;#f=!1;#u=null;#a=0;#p=0;#g=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";static _editorType=eo.INK;constructor(e){super({...e,name:"inkEditor"}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e,n){or.initialize(e,n)}static updateDefaultParams(e,n){switch(e){case sr.INK_THICKNESS:fl._defaultThickness=n;break;case sr.INK_COLOR:fl._defaultColor=n;break;case sr.INK_OPACITY:fl._defaultOpacity=n/100;break}}updateParams(e,n){switch(e){case sr.INK_THICKNESS:this.#h(n);break;case sr.INK_COLOR:this.#v(n);break;case sr.INK_OPACITY:this.#m(n);break}}static get defaultPropertiesToUpdate(){return[[sr.INK_THICKNESS,fl._defaultThickness],[sr.INK_COLOR,fl._defaultColor||or._defaultLineColor],[sr.INK_OPACITY,Math.round(fl._defaultOpacity*100)]]}get propertiesToUpdate(){return[[sr.INK_THICKNESS,this.thickness||fl._defaultThickness],[sr.INK_COLOR,this.color||fl._defaultColor||or._defaultLineColor],[sr.INK_OPACITY,Math.round(100*(this.opacity??fl._defaultOpacity))]]}#h(e){const n=o=>{this.thickness=o,this.#k()},r=this.thickness;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:sr.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#v(e){const n=o=>{this.color=o,this.#x()},r=this.color;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:sr.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#m(e){const n=o=>{this.opacity=o,this.#x()};e/=100;const r=this.opacity;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:sr.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(this.#P(),this.#M()),this.isAttachedToDOM||(this.parent.add(this),this.#O()),this.#k()))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#i&&(clearTimeout(this.#i),this.#i=null),this.#u.disconnect(),this.#u=null,super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&e===null&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,n]=this.parentDimensions,r=this.width*e,o=this.height*n;this.setDimensions(r,o)}enableEditMode(){this.#l||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#r))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#r))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}#b(){const{parentRotation:e,parentDimensions:[n,r]}=this;switch(e){case 90:return[0,r,r,n];case 180:return[n,r,n,r];case 270:return[n,0,r,n];default:return[0,0,n,r]}}#S(){const{ctx:e,color:n,opacity:r,thickness:o,parentScale:i,scaleFactor:s}=this;e.lineWidth=o*i/s,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${n}${pVt(r)}`}#w(e,n){this.canvas.addEventListener("contextmenu",Eu),this.canvas.addEventListener("pointerleave",this.#o),this.canvas.addEventListener("pointermove",this.#n),this.canvas.addEventListener("pointerup",this.#s),this.canvas.removeEventListener("pointerdown",this.#r),this.isEditing=!0,this.#f||(this.#f=!0,this.#O(),this.thickness||=fl._defaultThickness,this.color||=fl._defaultColor||or._defaultLineColor,this.opacity??=fl._defaultOpacity),this.currentPath.push([e,n]),this.#d=!1,this.#S(),this.#g=()=>{this.#C(),this.#g&&window.requestAnimationFrame(this.#g)},window.requestAnimationFrame(this.#g)}#A(e,n){const[r,o]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===r&&n===o)return;const i=this.currentPath;let s=this.#c;if(i.push([e,n]),this.#d=!0,i.length<=2){s.moveTo(...i[0]),s.lineTo(e,n);return}i.length===3&&(this.#c=s=new Path2D,s.moveTo(...i[0])),this.#y(s,...i.at(-3),...i.at(-2),e,n)}#I(){if(this.currentPath.length===0)return;const e=this.currentPath.at(-1);this.#c.lineTo(...e)}#T(e,n){this.#g=null,e=Math.min(Math.max(e,0),this.canvas.width),n=Math.min(Math.max(n,0),this.canvas.height),this.#A(e,n),this.#I();let r;if(this.currentPath.length!==1)r=this.#E();else{const l=[e,n];r=[[l,l.slice(),l.slice(),l]]}const o=this.#c,i=this.currentPath;this.currentPath=[],this.#c=new Path2D;const s=()=>{this.allRawPaths.push(i),this.paths.push(r),this.bezierPath2D.push(o),this._uiManager.rebuild(this)},a=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(this.#P(),this.#M()),this.#k())};this.addCommands({cmd:s,undo:a,mustExec:!0})}#C(){if(!this.#d)return;this.#d=!1;const e=Math.ceil(this.thickness*this.parentScale),n=this.currentPath.slice(-3),r=n.map(s=>s[0]),o=n.map(s=>s[1]);Math.min(...r)-e,Math.max(...r)+e,Math.min(...o)-e,Math.max(...o)+e;const{ctx:i}=this;i.save(),i.clearRect(0,0,this.canvas.width,this.canvas.height);for(const s of this.bezierPath2D)i.stroke(s);
735i.stroke(this.#c),i.restore()}#y(e,n,r,o,i,s,a){const l=(n+o)/2,c=(r+i)/2,u=(o+s)/2,d=(i+a)/2;e.bezierCurveTo(l+2*(o-l)/3,c+2*(i-c)/3,u+2*(o-u)/3,d+2*(i-d)/3,u,d)}#E(){const e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];const n=[];let r,[o,i]=e[0];for(r=1;r<e.length-2;r++){const[h,f]=e[r],[p,m]=e[r+1],y=(h+p)/2,v=(f+m)/2,b=[o+2*(h-o)/3,i+2*(f-i)/3],S=[y+2*(h-y)/3,v+2*(f-v)/3];n.push([[o,i],b,S,[y,v]]),[o,i]=[y,v]}const[s,a]=e[r],[l,c]=e[r+1],u=[o+2*(s-o)/3,i+2*(a-i)/3],d=[l+2*(s-l)/3,c+2*(a-c)/3];return n.push([[o,i],u,d,[l,c]]),n}#x(){if(this.isEmpty()){this.#N();return}this.#S();const{canvas:e,ctx:n}=this;n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),this.#N();for(const r of this.bezierPath2D)n.stroke(r)}commit(){this.#l||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#l=!0,this.div.classList.add("disabled"),this.#k(!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){e.button!==0||!this.isInEditMode()||this.#l||(this.setInForeground(),e.preventDefault(),this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0}),this.#w(e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),this.#A(e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),this.#R(e)}canvasPointerleave(e){this.#R(e)}#R(e){this.canvas.removeEventListener("pointerleave",this.#o),this.canvas.removeEventListener("pointermove",this.#n),this.canvas.removeEventListener("pointerup",this.#s),this.canvas.addEventListener("pointerdown",this.#r),this.#i&&clearTimeout(this.#i),this.#i=setTimeout(()=>{this.#i=null,this.canvas.removeEventListener("contextmenu",Eu)},10),this.#T(e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#P(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#M(){this.#u=new ResizeObserver(e=>{const n=e[0].contentRect;n.width&&n.height&&this.setDimensions(n.width,n.height)}),this.#u.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#l}render(){if(this.div)return this.div;let e,n;this.width&&(e=this.x,n=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");const[r,o,i,s]=this.#b();if(this.setAt(r,o,0,0),this.setDims(i,s),this.#P(),this.width){const[a,l]=this.parentDimensions;this.setAspectRatio(this.width*a,this.height*l),this.setAt(e*a,n*l,this.width*a,this.height*l),this.#f=!0,this.#O(),this.setDims(this.width*a,this.height*l),this.#x(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#M(),this.div}#O(){if(!this.#f)return;const[e,n]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*n),this.#N()}setDimensions(e,n){const r=Math.round(e),o=Math.round(n);if(this.#a===r&&this.#p===o)return;this.#a=r,this.#p=o,this.canvas.style.visibility="hidden";const[i,s]=this.parentDimensions;this.width=e/i,this.height=n/s,this.fixAndSetPosition(),this.#l&&this.#D(e,n),this.#O(),this.#x(),this.canvas.style.visibility="visible",this.fixDims()}#D(e,n){const r=this.#$(),o=(e-r)/this.#t,i=(n-r)/this.#e;this.scaleFactor=Math.min(o,i)}#N(){const e=this.#$()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}static#L(e){const n=new Path2D;for(let r=0,o=e.length;r<o;r++){const[i,s,a,l]=e[r];r===0&&n.moveTo(...i),n.bezierCurveTo(s[0],s[1],a[0],a[1],l[0],l[1])}return n}static#U(e,n,r){const[o,i,s,a]=n;switch(r){case 0:for(let l=0,c=e.length;l<c;l+=2)e[l]+=o,e[l+1]=a-e[l+1];break;case 90:for(let l=0,c=e.length;l<c;l+=2){const u=e[l];e[l]=e[l+1]+o,e[l+1]=u+i}break;case 180:for(let l=0,c=e.length;l<c;l+=2)e[l]=s-e[l],e[l+1]+=i;break;case 270:for(let l=0,c=e.length;l<c;l+=2){const u=e[l];e[l]=s-e[l+1],e[l+1]=a-u}break;default:throw new Error("Invalid rotation")}return e}static#G(e,n,r){const[o,i,s,a]=n;switch(r){case 0:for(let l=0,c=e.length;l<c;l+=2)e[l]-=o,e[l+1]=a-e[l+1];break;case 90:for(let l=0,c=e.length;l<c;l+=2){const u=e[l];e[l]=e[l+1]-i,e[l+1]=u-o}break;case 180:for(let l=0,c=e.length;l<c;l+=2)e[l]=s-e[l],e[l+1]-=i;break;case 270:for(let l=0,c=e.length;l<c;l+=2){const u=e[l];e[l]=a-e[l+1],e[l+1]=s-u}break;default:throw new Error("Invalid rotation")}return e}#W(e,n,r,o){const i=[],s=this.thickness/2,a=e*n+s,l=e*r+s;for(const c of this.paths){const u=[],d=[];for(let h=0,f=c.length;h<f;h++){const[p,m,y,v]=c[h];if(p[0]===v[0]&&p[1]===v[1]&&f===1){const N=e*p[0]+a,M=e*p[1]+l;u.push(N,M),d.push(N,M);break}const b=e*p[0]+a,S=e*p[1]+l,w=e*m[0]+a,A=e*m[1]+l,_=e*y[0]+a,P=e*y[1]+l,R=e*v[0]+a,O=e*v[1]+l;
735h===0&&(u.push(b,S),d.push(b,S)),u.push(w,A,_,P,R,O),d.push(w,A),h===f-1&&d.push(R,O)}i.push({bezier:fl.#U(u,o,this.rotation),points:fl.#U(d,o,this.rotation)})}return i}#z(){let e=1/0,n=-1/0,r=1/0,o=-1/0;for(const i of this.paths)for(const[s,a,l,c]of i){const u=On.bezierBoundingBox(...s,...a,...l,...c);e=Math.min(e,u[0]),r=Math.min(r,u[1]),n=Math.max(n,u[2]),o=Math.max(o,u[3])}return[e,r,n,o]}#$(){return this.#l?Math.ceil(this.thickness*this.parentScale):0}#k(e=!1){if(this.isEmpty())return;if(!this.#l){this.#x();return}const n=this.#z(),r=this.#$();this.#t=Math.max(or.MIN_SIZE,n[2]-n[0]),this.#e=Math.max(or.MIN_SIZE,n[3]-n[1]);const o=Math.ceil(r+this.#t*this.scaleFactor),i=Math.ceil(r+this.#e*this.scaleFactor),[s,a]=this.parentDimensions;this.width=o/s,this.height=i/a,this.setAspectRatio(o,i);const l=this.translationX,c=this.translationY;this.translationX=-n[0],this.translationY=-n[1],this.#O(),this.#x(),this.#a=o,this.#p=i,this.setDims(o,i);const u=e?r/this.scaleFactor/2:0;this.translate(l-this.translationX-u,c-this.translationY-u)}static deserialize(e,n,r){if(e instanceof jCe)return null;const o=super.deserialize(e,n,r);o.thickness=e.thickness,o.color=On.makeHexColor(...e.color),o.opacity=e.opacity;const[i,s]=o.pageDimensions,a=o.width*i,l=o.height*s,c=o.parentScale,u=e.thickness/2;o.#l=!0,o.#a=Math.round(a),o.#p=Math.round(l);const{paths:d,rect:h,rotation:f}=e;for(let{bezier:m}of d){m=fl.#G(m,h,f);const y=[];o.paths.push(y);let v=c*(m[0]-u),b=c*(m[1]-u);for(let w=2,A=m.length;w<A;w+=6){const _=c*(m[w]-u),P=c*(m[w+1]-u),R=c*(m[w+2]-u),O=c*(m[w+3]-u),N=c*(m[w+4]-u),M=c*(m[w+5]-u);y.push([[v,b],[_,P],[R,O],[N,M]]),v=N,b=M}const S=this.#L(y);o.bezierPath2D.push(S)}const p=o.#z();return o.#t=Math.max(or.MIN_SIZE,p[2]-p[0]),o.#e=Math.max(or.MIN_SIZE,p[3]-p[1]),o.#D(a,l),o}serialize(){if(this.isEmpty())return null;const e=this.getRect(0,0),n=or._colorManager.convert(this.ctx.strokeStyle);return{annotationType:eo.INK,color:n,thickness:this.thickness,opacity:this.opacity,paths:this.#W(this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}class O9 extends or{#e=null;#t=null;#n=null;#o=null;#s=null;#r="";#i=null;#c=null;#l=null;#d=!1;#f=!1;static _type="stamp";static _editorType=eo.STAMP;constructor(e){super({...e,name:"stampEditor"}),this.#o=e.bitmapUrl,this.#s=e.bitmapFile}static initialize(e,n){or.initialize(e,n)}static get supportedTypes(){return oo(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(n=>`image/${n}`))}static get supportedTypesStr(){return oo(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,n){n.pasteEditor(eo.STAMP,{bitmapFile:e.getAsFile()})}#u(e,n=!1){if(!e){this.remove();return}this.#e=e.bitmap,n||(this.#t=e.id,this.#d=e.isSvg),e.file&&(this.#r=e.file.name),this.#g()}#a(){this.#n=null,this._uiManager.enableWaiting(!1),this.#i&&this.div.focus()}#p(){if(this.#t){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#t).then(n=>this.#u(n,!0)).finally(()=>this.#a());return}if(this.#o){const n=this.#o;this.#o=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromUrl(n).then(r=>this.#u(r)).finally(()=>this.#a());return}if(this.#s){const n=this.#s;this.#s=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromFile(n).then(r=>this.#u(r)).finally(()=>this.#a());return}const e=document.createElement("input");e.type="file",e.accept=O9.supportedTypesStr,this.#n=new Promise(n=>{e.addEventListener("change",async()=>{if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const r=await this._uiManager.imageManager.getFromFile(e.files[0]);this.#u(r)}n()}),e.addEventListener("cancel",()=>{this.remove(),n()})}).finally(()=>this.#a()),e.click()}remove(){this.#t&&(this.#e=null,this._uiManager.imageManager.deleteId(this.#t),this.#i?.remove(),this.#i=null,this.#c?.disconnect(),this.#c=null,this.#l&&(clearTimeout(this.#l),this.#l=null)),super.remove()}rebuild(){if(!this.parent){this.#t&&this.#p();return}super.rebuild(),this.div!==null&&(this.#t&&this.#i===null&&this.#p(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#n||this.#e||this.#o||this.#s||this.#t)}get isResizable(){return!0}
735render(){if(this.div)return this.div;let e,n;if(this.width&&(e=this.x,n=this.y),super.render(),this.div.hidden=!0,this.addAltTextButton(),this.#e?this.#g():this.#p(),this.width){const[r,o]=this.parentDimensions;this.setAt(e*r,n*o,this.width*r,this.height*o)}return this.div}#g(){const{div:e}=this;let{width:n,height:r}=this.#e;const[o,i]=this.pageDimensions,s=.75;if(this.width)n=this.width*o,r=this.height*i;else if(n>s*o||r>s*i){const u=Math.min(s*o/n,s*i/r);n*=u,r*=u}const[a,l]=this.parentDimensions;this.setDims(n*a/o,r*l/i),this._uiManager.enableWaiting(!1);const c=this.#i=document.createElement("canvas");e.append(c),e.hidden=!1,this.#m(n,r),this.#S(),this.#f||(this.parent.addUndoableEditor(this),this.#f=!0),this._reportTelemetry({action:"inserted_image"}),this.#r&&c.setAttribute("aria-label",this.#r)}#h(e,n){const[r,o]=this.parentDimensions;this.width=e/r,this.height=n/o,this.setDims(e,n),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this.#l!==null&&clearTimeout(this.#l);const i=200;this.#l=setTimeout(()=>{this.#l=null,this.#m(e,n)},i)}#v(e,n){const{width:r,height:o}=this.#e;let i=r,s=o,a=this.#e;for(;i>2*e||s>2*n;){const l=i,c=s;i>2*e&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2)),s>2*n&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const u=new OffscreenCanvas(i,s);u.getContext("2d").drawImage(a,0,0,l,c,0,0,i,s),a=u.transferToImageBitmap()}return a}#m(e,n){e=Math.ceil(e),n=Math.ceil(n);const r=this.#i;if(!r||r.width===e&&r.height===n)return;r.width=e,r.height=n;const o=this.#d?this.#e:this.#v(e,n);if(this._uiManager.hasMLManager&&!this.hasAltText()){const a=new OffscreenCanvas(e,n).getContext("2d");a.drawImage(o,0,0,o.width,o.height,0,0,e,n),this._uiManager.mlGuess({service:"image-to-text",request:{data:a.getImageData(0,0,e,n).data,width:e,height:n,channels:4}}).then(l=>{const c=l?.output||"";this.parent&&c&&!this.hasAltText()&&(this.altTextData={altText:c,decorative:!1})})}const i=r.getContext("2d");i.filter=this._uiManager.hcmFilter,i.drawImage(o,0,0,o.width,o.height,0,0,e,n)}getImageForAltText(){return this.#i}#b(e){if(e){if(this.#d){const o=this._uiManager.imageManager.getSvgUrl(this.#t);if(o)return o}const n=document.createElement("canvas");return{width:n.width,height:n.height}=this.#e,n.getContext("2d").drawImage(this.#e,0,0),n.toDataURL()}if(this.#d){const[n,r]=this.pageDimensions,o=Math.round(this.width*n*Bx.PDF_TO_CSS_UNITS),i=Math.round(this.height*r*Bx.PDF_TO_CSS_UNITS),s=new OffscreenCanvas(o,i);return s.getContext("2d").drawImage(this.#e,0,0,this.#e.width,this.#e.height,0,0,o,i),s.transferToImageBitmap()}return structuredClone(this.#e)}#S(){this.#c=new ResizeObserver(e=>{const n=e[0].contentRect;n.width&&n.height&&this.#h(n.width,n.height)}),this.#c.observe(this.div)}static deserialize(e,n,r){if(e instanceof qCe)return null;const o=super.deserialize(e,n,r),{rect:i,bitmapUrl:s,bitmapId:a,isSvg:l,accessibilityData:c}=e;a&&r.imageManager.isValidId(a)?o.#t=a:o.#o=s,o.#d=l;const[u,d]=o.pageDimensions;return o.width=(i[2]-i[0])/u,o.height=(i[3]-i[1])/d,c&&(o.altTextData=c),o}serialize(e=!1,n=null){if(this.isEmpty())return null;const r={annotationType:eo.STAMP,bitmapId:this.#t,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#d,structTreeParentId:this._structTreeParentId};if(e)return r.bitmapUrl=this.#b(!0),r.accessibilityData=this.altTextData,r;const{decorative:o,altText:i}=this.altTextData;if(!o&&i&&(r.accessibilityData={type:"Figure",alt:i}),n===null)return r;n.stamps||=new Map;const s=this.#d?(r.rect[2]-r.rect[0])*(r.rect[3]-r.rect[1]):null;if(!n.stamps.has(this.#t))n.stamps.set(this.#t,{area:s,serialized:r}),r.bitmap=this.#b(!1);else if(this.#d){const a=n.stamps.get(this.#t);s>a.area&&(a.area=s,a.serialized.bitmap.close(),a.serialized.bitmap=this.#b(!1))}return r}}class Bg{#e;#t=!1;#n=null;#o=null;#s=null;#r=null;#i=null;#c=new Map;#l=!1;#d=!1;#f=!1;#u=null;#a;static _initialized=!1;static#p=new Map([da,fl,O9,Gs].map(e=>[e._editorType,e]));constructor({uiManager:e,pageIndex:n,div:r,accessibilityManager:o,annotationLayer:i,drawLayer:s,textLayer:a,viewport:l,l10n:c}){const u=[...Bg.#p.values()];if(!Bg._initialized){Bg._initialized=!0;for(const d of u)d.initialize(c,e)}
735e.registerEditorTypes(u),this.#a=e,this.pageIndex=n,this.div=r,this.#e=o,this.#n=i,this.viewport=l,this.#u=a,this.drawLayer=s,this.#a.addLayer(this)}get isEmpty(){return this.#c.size===0}get isInvisible(){return this.isEmpty&&this.#a.getMode()===eo.NONE}updateToolbar(e){this.#a.updateToolbar(e)}updateMode(e=this.#a.getMode()){switch(this.#b(),e){case eo.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case eo.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case eo.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:n}=this.div;for(const r of Bg.#p.values())n.toggle(`${r._type}Editing`,e===r._editorType);this.div.hidden=!1}hasTextLayer(e){return e===this.#u?.div}addInkEditorIfNeeded(e){if(this.#a.getMode()!==eo.INK)return;if(!e){for(const r of this.#c.values())if(r.isEmpty()){r.setInBackground();return}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(e){this.#a.setEditingState(e)}addCommands(e){this.#a.addCommands(e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){this.#n?.div.classList.toggle("disabled",!e)}enable(){this.div.tabIndex=0,this.togglePointerEvents(!0);const e=new Set;for(const r of this.#c.values())r.enableEditing(),r.show(!0),r.annotationElementId&&(this.#a.removeChangedExistingAnnotation(r),e.add(r.annotationElementId));if(!this.#n)return;const n=this.#n.getEditableAnnotations();for(const r of n){if(r.hide(),this.#a.isDeletedAnnotationElement(r.data.id)||e.has(r.data.id))continue;const o=this.deserialize(r);o&&(this.addOrRebuild(o),o.enableEditing())}}disable(){this.#f=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1);const e=new Map,n=new Map;for(const o of this.#c.values())if(o.disableEditing(),!!o.annotationElementId){if(o.serialize()!==null){e.set(o.annotationElementId,o);continue}else n.set(o.annotationElementId,o);this.getEditableAnnotation(o.annotationElementId)?.show(),o.remove()}if(this.#n){const o=this.#n.getEditableAnnotations();for(const i of o){const{id:s}=i.data;if(this.#a.isDeletedAnnotationElement(s))continue;let a=n.get(s);if(a){a.resetAnnotationElement(i),a.show(!1),i.show();continue}a=e.get(s),a&&(this.#a.addChangedExistingAnnotation(a),a.renderAnnotationElement(i),a.show(!1)),i.show()}}this.#b(),this.isEmpty&&(this.div.hidden=!0);const{classList:r}=this.div;for(const o of Bg.#p.values())r.remove(`${o._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#f=!1}getEditableAnnotation(e){return this.#n?.getEditableAnnotation(e)||null}setActiveEditor(e){this.#a.getActive()!==e&&this.#a.setActiveEditor(e)}enableTextSelection(){this.div.tabIndex=-1,this.#u?.div&&!this.#r&&(this.#r=this.#g.bind(this),this.#u.div.addEventListener("pointerdown",this.#r),this.#u.div.classList.add("highlighting"))}disableTextSelection(){this.div.tabIndex=0,this.#u?.div&&this.#r&&(this.#u.div.removeEventListener("pointerdown",this.#r),this.#r=null,this.#u.div.classList.remove("highlighting"))}#g(e){if(this.#a.unselectAll(),e.target===this.#u.div){const{isMac:n}=pu.platform;if(e.button!==0||e.ctrlKey&&n)return;this.#a.showAllEditors("highlight",!0,!0),this.#u.div.classList.add("free"),Gs.startHighlighting(this,this.#a.direction==="ltr",e),this.#u.div.addEventListener("pointerup",()=>{this.#u.div.classList.remove("free")},{once:!0}),e.preventDefault()}}enableClick(){this.#s||(this.#s=this.pointerdown.bind(this),this.#o=this.pointerup.bind(this),this.div.addEventListener("pointerdown",this.#s),this.div.addEventListener("pointerup",this.#o))}disableClick(){this.#s&&(this.div.removeEventListener("pointerdown",this.#s),this.div.removeEventListener("pointerup",this.#o),this.#s=null,this.#o=null)}attach(e){this.#c.set(e.id,e);const{annotationElementId:n}=e;n&&this.#a.isDeletedAnnotationElement(n)&&this.#a.removeDeletedAnnotationElement(e)}detach(e){this.#c.delete(e.id),this.#e?.removePointerInTextLayer(e.contentDiv),!this.#f&&e.annotationElementId&&this.#a.addDeletedAnnotationElement(e)}remove(e){this.detach(e),this.#a.removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1,this.#d||this.addInkEditorIfNeeded(!1)}changeParent(e){e.parent!==this&&(e.parent&&e.annotationElementId&&(this.#a.addDeletedAnnotationElement(e.annotationElementId),or.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}
735add(e){if(!(e.parent===this&&e.isAttachedToDOM)){if(this.changeParent(e),this.#a.addEditor(e),this.attach(e),!e.isAttachedToDOM){const n=e.render();this.div.append(n),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(),this.#a.addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){if(!e.isAttachedToDOM)return;const{activeElement:n}=document;e.div.contains(n)&&!this.#i&&(e._focusEventsAllowed=!1,this.#i=setTimeout(()=>{this.#i=null,e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0}),n.focus())},0)),e._structTreeParentId=this.#e?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||=this,e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){const n=()=>e._uiManager.rebuild(e),r=()=>{e.remove()};this.addCommands({cmd:n,undo:r,mustExec:!1})}getNextId(){return this.#a.getId()}get#h(){return Bg.#p.get(this.#a.getMode())}#v(e){const n=this.#h;return n?new n.prototype.constructor(e):null}canCreateNewEmptyEditor(){return this.#h?.canCreateNewEmptyEditor()}pasteEditor(e,n){this.#a.updateToolbar(e),this.#a.updateMode(e);const{offsetX:r,offsetY:o}=this.#m(),i=this.getNextId(),s=this.#v({parent:this,id:i,x:r,y:o,uiManager:this.#a,isCentered:!0,...n});s&&this.add(s)}deserialize(e){return Bg.#p.get(e.annotationType??e.annotationEditorType)?.deserialize(e,this,this.#a)||null}createAndAddNewEditor(e,n,r={}){const o=this.getNextId(),i=this.#v({parent:this,id:o,x:e.offsetX,y:e.offsetY,uiManager:this.#a,isCentered:n,...r});return i&&this.add(i),i}#m(){const{x:e,y:n,width:r,height:o}=this.div.getBoundingClientRect(),i=Math.max(0,e),s=Math.max(0,n),a=Math.min(window.innerWidth,e+r),l=Math.min(window.innerHeight,n+o),c=(i+a)/2-e,u=(s+l)/2-n,[d,h]=this.viewport.rotation%180===0?[c,u]:[u,c];return{offsetX:d,offsetY:h}}addNewEditor(){this.createAndAddNewEditor(this.#m(),!0)}setSelected(e){this.#a.setSelected(e)}toggleSelected(e){this.#a.toggleSelected(e)}isSelected(e){return this.#a.isSelected(e)}unselect(e){this.#a.unselect(e)}pointerup(e){const{isMac:n}=pu.platform;if(!(e.button!==0||e.ctrlKey&&n)&&e.target===this.div&&this.#l){if(this.#l=!1,!this.#t){this.#t=!0;return}if(this.#a.getMode()===eo.STAMP){this.#a.unselectAll();return}this.createAndAddNewEditor(e,!1)}}pointerdown(e){if(this.#a.getMode()===eo.HIGHLIGHT&&this.enableTextSelection(),this.#l){this.#l=!1;return}const{isMac:n}=pu.platform;if(e.button!==0||e.ctrlKey&&n||e.target!==this.div)return;this.#l=!0;const r=this.#a.getActive();this.#t=!r||r.isEmpty()}findNewParent(e,n,r){const o=this.#a.findParent(n,r);return o===null||o===this?!1:(o.changeParent(e),!0)}destroy(){this.#a.getActive()?.parent===this&&(this.#a.commitOrRemove(),this.#a.setActiveEditor(null)),this.#i&&(clearTimeout(this.#i),this.#i=null);for(const e of this.#c.values())this.#e?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#c.clear(),this.#a.removeLayer(this)}#b(){this.#d=!0;for(const e of this.#c.values())e.isEmpty()&&e.remove();this.#d=!1}render({viewport:e}){this.viewport=e,WC(this.div,e);for(const n of this.#a.getEditors(this.pageIndex))this.add(n),n.rebuild();this.updateMode()}update({viewport:e}){this.#a.commitOrRemove(),this.#b();const n=this.viewport.rotation,r=e.rotation;if(this.viewport=e,WC(this.div,{rotation:r}),n!==r)for(const o of this.#c.values())o.rotate(r);this.addInkEditorIfNeeded(!1)}get pageDimensions(){const{pageWidth:e,pageHeight:n}=this.viewport.rawDims;return[e,n]}get scale(){return this.#a.viewParameters.realScale}}class Vl{#e=null;#t=0;#n=new Map;#o=new Map;constructor({pageIndex:e}){this.pageIndex=e}setParent(e){if(!this.#e){this.#e=e;return}if(this.#e!==e){if(this.#n.size>0)for(const n of this.#n.values())n.remove(),e.append(n);this.#e=e}}static get _svgFactory(){return oo(this,"_svgFactory",new v9)}static#s(e,{x:n=0,y:r=0,width:o=1,height:i=1}={}){const{style:s}=e;s.top=`${100*r}%`,s.left=`${100*n}%`,s.width=`${100*o}%`,s.height=`${100*i}%`}#r(e){const n=Vl._svgFactory.create(1,1,!0);return this.#e.append(n),n.setAttribute("aria-hidden",!0),Vl.#s(n,e),n}
735#i(e,n){const r=Vl._svgFactory.createElement("clipPath");e.append(r);const o=`clip_${n}`;r.setAttribute("id",o),r.setAttribute("clipPathUnits","objectBoundingBox");const i=Vl._svgFactory.createElement("use");return r.append(i),i.setAttribute("href",`#${n}`),i.classList.add("clip"),o}highlight(e,n,r,o=!1){const i=this.#t++,s=this.#r(e.box);s.classList.add("highlight"),e.free&&s.classList.add("free");const a=Vl._svgFactory.createElement("defs");s.append(a);const l=Vl._svgFactory.createElement("path");a.append(l);const c=`path_p${this.pageIndex}_${i}`;l.setAttribute("id",c),l.setAttribute("d",e.toSVGPath()),o&&this.#o.set(i,l);const u=this.#i(a,c),d=Vl._svgFactory.createElement("use");return s.append(d),s.setAttribute("fill",n),s.setAttribute("fill-opacity",r),d.setAttribute("href",`#${c}`),this.#n.set(i,s),{id:i,clipPathId:`url(#${u})`}}highlightOutline(e){const n=this.#t++,r=this.#r(e.box);r.classList.add("highlightOutline");const o=Vl._svgFactory.createElement("defs");r.append(o);const i=Vl._svgFactory.createElement("path");o.append(i);const s=`path_p${this.pageIndex}_${n}`;i.setAttribute("id",s),i.setAttribute("d",e.toSVGPath()),i.setAttribute("vector-effect","non-scaling-stroke");let a;if(e.free){r.classList.add("free");const u=Vl._svgFactory.createElement("mask");o.append(u),a=`mask_p${this.pageIndex}_${n}`,u.setAttribute("id",a),u.setAttribute("maskUnits","objectBoundingBox");const d=Vl._svgFactory.createElement("rect");u.append(d),d.setAttribute("width","1"),d.setAttribute("height","1"),d.setAttribute("fill","white");const h=Vl._svgFactory.createElement("use");u.append(h),h.setAttribute("href",`#${s}`),h.setAttribute("stroke","none"),h.setAttribute("fill","black"),h.setAttribute("fill-rule","nonzero"),h.classList.add("mask")}const l=Vl._svgFactory.createElement("use");r.append(l),l.setAttribute("href",`#${s}`),a&&l.setAttribute("mask",`url(#${a})`);const c=l.cloneNode();return r.append(c),l.classList.add("mainOutline"),c.classList.add("secondaryOutline"),this.#n.set(n,r),n}finalizeLine(e,n){const r=this.#o.get(e);this.#o.delete(e),this.updateBox(e,n.box),r.setAttribute("d",n.toSVGPath())}updateLine(e,n){this.#n.get(e).firstChild.firstChild.setAttribute("d",n.toSVGPath())}removeFreeHighlight(e){this.remove(e),this.#o.delete(e)}updatePath(e,n){this.#o.get(e).setAttribute("d",n.toSVGPath())}updateBox(e,n){Vl.#s(this.#n.get(e),n)}show(e,n){this.#n.get(e).classList.toggle("hidden",!n)}rotate(e,n){this.#n.get(e).setAttribute("data-main-rotation",n)}changeColor(e,n){this.#n.get(e).setAttribute("fill",n)}changeOpacity(e,n){this.#n.get(e).setAttribute("fill-opacity",n)}addClass(e,n){this.#n.get(e).classList.add(n)}removeClass(e,n){this.#n.get(e).classList.remove(n)}remove(e){this.#e!==null&&(this.#n.get(e).remove(),this.#n.delete(e))}destroy(){this.#e=null;for(const e of this.#n.values())e.remove();this.#n.clear()}}var WGt=er.AbortException,jGt=er.AnnotationEditorLayer,qGt=er.AnnotationEditorParamsType,YGt=er.AnnotationEditorType,XGt=er.AnnotationEditorUIManager,XCe=er.AnnotationLayer,KCe=er.AnnotationMode,KGt=er.CMapCompressionType,QGt=er.ColorPicker,ZGt=er.DOMSVGFactory,JGt=er.DrawLayer,eWt=er.FeatureTest,N9=er.GlobalWorkerOptions,tWt=er.ImageKind,nWt=er.InvalidPDFException,rWt=er.MissingPDFException,oWt=er.OPS,iWt=er.Outliner,sWt=er.PDFDataRangeTransport,aWt=er.PDFDateString,lWt=er.PDFWorker,cWt=er.PasswordResponses,uWt=er.PermissionFlag,dWt=er.PixelsPerInch,hWt=er.RenderingCancelledException,QCe=er.TextLayer,fWt=er.UnexpectedResponseException,pWt=er.Util,gWt=er.VerbosityLevel,mWt=er.XfaLayer,yWt=er.build,vWt=er.createValidAbsoluteUrl,bWt=er.fetchData,ZCe=er.getDocument,CWt=er.getFilenameFromUrl,SWt=er.getPdfFilenameFromUrl,EWt=er.getXfaPageViewport,xWt=er.isDataScheme,wWt=er.isPdfFile,AWt=er.noContextMenu,TWt=er.normalizeUnicode,_Wt=er.renderTextLayer,IWt=er.setLayerDimensions,PWt=er.shadow,RWt=er.updateTextLayer,OWt=er.version;const NWt=Object.freeze(Object.defineProperty({__proto__:null,AbortException:WGt,AnnotationEditorLayer:jGt,AnnotationEditorParamsType:qGt,AnnotationEditorType:YGt,AnnotationEditorUIManager:XGt,AnnotationLayer:XCe,AnnotationMode:KCe,CMapCompressionType:KGt,ColorPicker:QGt,DOMSVGFactory:ZGt,DrawLayer:JGt,FeatureTest:eWt,GlobalWorkerOptions:N9,ImageKind:tWt,InvalidPDFException:nWt,MissingPDFException:rWt,OPS:oWt,Outliner:iWt,PDFDataRangeTransport:sWt,PDFDateString:aWt,PDFWorker:lWt,PasswordResponses:cWt,PermissionFlag:uWt,PixelsPerInch:dWt,RenderingCancelledException:hWt,TextLayer:QCe,UnexpectedResponseException:fWt,Util:pWt,VerbosityLevel:gWt,XfaLayer:mWt,build:yWt,createValidAbsoluteUrl:vWt,fetchData:bWt,getDocument:ZCe,getFilenameFromUrl:CWt,getPdfFilenameFromUrl:SWt,getXfaPageViewport:EWt,isDataScheme:xWt,isPdfFile:wWt,noContextMenu:AWt,normalizeUnicode:TWt,renderTextLayer:_Wt,setLayerDimensions:IWt,shadow:PWt,updateTextLayer:RWt,version:OWt},Symbol.toStringTag,{value:"Module"}));var Ha=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},MWt=["onCopy","onCut","onPaste"],DWt=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],LWt=["onFocus","onBlur"],kWt=["onInput","onInvalid","onReset","onSubmit"],FWt=["onLoad","onError"],BWt=["onKeyDown","onKeyPress","onKeyUp"],$Wt=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],HWt=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],UWt=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],zWt=["onSelect"],VWt=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],GWt=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],WWt=["onScroll"],jWt=["onWheel"],qWt=["onAnimationStart","onAnimationEnd","onAnimationIteration"],YWt=["onTransitionEnd"],XWt=["onToggle"],KWt=["onChange"],QWt=Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha(Ha([],MWt,!0),DWt,!0),LWt,!0),kWt,!0),FWt,!0),BWt,!0),$Wt,!0),HWt,!0),UWt,!0),zWt,!0),VWt,!0),GWt,!0),WWt,!0),jWt,!0),qWt,!0),YWt,!0),KWt,!0),XWt,!0);function JCe(t,e){var n={};return QWt.forEach(function(r){var o=t[r];o&&(e?n[r]=function(i){return o(i,e(r))}:n[r]=o)}),n}function rO(t){var e=!1,n=new Promise(function(r,o){t.then(function(i){return!e&&r(i)}).catch(function(i){return!e&&o(i)})});return{promise:n,cancel:function(){e=!0}}}var ZWt=!0,xU="Invariant failed";function Xo(t,e){if(!t){if(ZWt)throw new Error(xU);var n=typeof e=="function"?e():e,r=n?"".concat(xU,": ").concat(n):xU;throw new Error(r)}}var JWt=function(){},ejt=JWt;const Zl=ud(ejt);var mre=Object.prototype.hasOwnProperty;function yre(t,e,n){for(n of t.keys())if(P1(n,e))return n}function P1(t,e){var n,r,o;
735if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&P1(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(o=r,o&&typeof o=="object"&&(o=yre(e,o),!o)||!e.has(o))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(o=r[0],o&&typeof o=="object"&&(o=yre(e,o),!o)||!P1(r[1],e.get(o)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(mre.call(t,n)&&++r&&!mre.call(e,n)||!(n in e)||!P1(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}const eSe=C.createContext(null);function R1({children:t,type:e}){return g("div",{className:`react-pdf__message react-pdf__message--${e}`,children:t})}const tjt="noopener noreferrer nofollow";class njt{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return Xo(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(e){Xo(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}goToDestination(e){return new Promise(n=>{Xo(this.pdfDocument,"PDF document not loaded."),Xo(e,"Destination is not specified."),typeof e=="string"?this.pdfDocument.getDestination(e).then(n):Array.isArray(e)?n(e):e.then(n)}).then(n=>{Xo(Array.isArray(n),`"${n}" is not a valid destination array.`);const r=n[0];new Promise(o=>{Xo(this.pdfDocument,"PDF document not loaded."),r instanceof Object?this.pdfDocument.getPageIndex(r).then(i=>{o(i)}).catch(()=>{Xo(!1,`"${r}" is not a valid page reference.`)}):typeof r=="number"?o(r):Xo(!1,`"${r}" is not a valid destination reference.`)}).then(o=>{const i=o+1;Xo(this.pdfViewer,"PDF viewer is not initialized."),Xo(i>=1&&i<=this.pagesCount,`"${i}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:n,pageIndex:o,pageNumber:i})})})}navigateTo(e){this.goToDestination(e)}goToPage(e){const n=e-1;Xo(this.pdfViewer,"PDF viewer is not initialized."),Xo(e>=1&&e<=this.pagesCount,`"${e}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:n,pageNumber:e})}addLinkAttributes(e,n,r){e.href=n,e.rel=this.externalLinkRel||tjt,e.target=r?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}const rjt={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},vre=rjt,s$=typeof document<"u",tSe=s$&&window.location.protocol==="file:";function ojt(t){return typeof t<"u"}function vb(t){return ojt(t)&&t!==null}function ijt(t){return typeof t=="string"}function sjt(t){return t instanceof ArrayBuffer}function ajt(t){return Xo(s$,"isBlob can only be used in a browser environment"),t instanceof Blob}function eV(t){return ijt(t)&&/^data:/.test(t)}function bre(t){Xo(eV(t),"Invalid data URI.");const[e="",n=""]=t.split(",");return e.split(";").indexOf("base64")!==-1?atob(n):unescape(n)}function ljt(){return s$&&window.devicePixelRatio||1}const nSe="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function Cre(){Zl(!tSe,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${nSe}`)}function cjt(){Zl(!tSe,`Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${nSe}`)}function qC(t){t&&t.cancel&&t.cancel()}function tV(t,e){return Object.defineProperty(t,"width",{get(){return this.view[2]*e},configurable:!0}),Object.defineProperty(t,"height",{get(){return this.view[3]*e},configurable:!0}),Object.defineProperty(t,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(t,"originalHeight",{get(){return this.view[3]},configurable:!0}),t}function ujt(t){return t.name==="RenderingCancelledException"}
735function djt(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=()=>{if(!r.result)return n(new Error("Error while reading a file."));e(r.result)},r.onerror=o=>{if(!o.target)return n(new Error("Error while reading a file."));const{error:i}=o.target;if(!i)return n(new Error("Error while reading a file."));switch(i.code){case i.NOT_FOUND_ERR:return n(new Error("Error while reading a file: File not found."));case i.SECURITY_ERR:return n(new Error("Error while reading a file: Security error."));case i.ABORT_ERR:return n(new Error("Error while reading a file: Aborted."));default:return n(new Error("Error while reading a file."))}},r.readAsArrayBuffer(t)})}function hjt(t,e){switch(e.type){case"RESOLVE":return{value:e.value,error:void 0};case"REJECT":return{value:!1,error:e.error};case"RESET":return{value:void 0,error:void 0};default:return t}}function $x(){return C.useReducer(hjt,{value:void 0,error:void 0})}var fjt=globalThis&&globalThis.__awaiter||function(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})},Sre=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const{PDFDataRangeTransport:pjt}=NWt,gjt=(t,e)=>{switch(e){case vre.NEED_PASSWORD:{const n=prompt("Enter the password to open this PDF file.");t(n);break}case vre.INCORRECT_PASSWORD:{const n=prompt("Invalid password. Please try again.");t(n);break}}};function Ere(t){return typeof t=="object"&&t!==null&&("data"in t||"range"in t||"url"in t)}const mjt=C.forwardRef(function(e,n){var{children:r,className:o,error:i="Failed to load PDF file.",externalLinkRel:s,externalLinkTarget:a,file:l,inputRef:c,imageResourcesPath:u,loading:d="Loading PDFâ¦",noData:h="No PDF file specified.",onItemClick:f,onLoadError:p,onLoadProgress:m,onLoadSuccess:y,onPassword:v=gjt,onSourceError:b,onSourceSuccess:S,options:w,renderMode:A,rotate:_}=e,P=Sre(e,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);const[R,O]=$x(),{value:N,error:M}=R,[L,F]=$x(),{value:$,error:D}=L,k=C.useRef(new njt),U=C.useRef([]),H=C.useRef(void 0),V=C.useRef(void 0);l&&l!==H.current&&Ere(l)&&(Zl(!P1(l,H.current),`File prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.`),H.current=l),w&&w!==V.current&&(Zl(!P1(w,V.current),`Options prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.`),V.current=w);const q=C.useRef({scrollPageIntoView:Ne=>{const{dest:ot,pageNumber:ce,pageIndex:Ae=ce-1}=Ne;if(f){f({dest:ot,pageIndex:Ae,pageNumber:ce});return}const be=U.current[Ae];if(be){be.scrollIntoView();return}Zl(!1,`An internal link leading to page ${ce} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});C.useImperativeHandle(n,()=>({linkService:k,pages:U,viewer:q}),[]);function J(){S&&S()}function Q(){M&&(Zl(!1,M.toString()),b&&b(M))}function se(){O({type:"RESET"})}C.useEffect(se,[l,O]);const oe=C.useCallback(()=>fjt(this,void 0,void 0,function*(){if(!l)return null;if(typeof l=="string")return eV(l)?{data:bre(l)}:(Cre(),{url:l});if(l instanceof pjt)return{range:l};if(sjt(l))return{data:l};if(s$&&ajt(l))return{data:yield djt(l)};if(Xo(typeof l=="object","Invalid parameter in file, need either Uint8Array, string or a parameter object"),Xo(Ere(l),"Invalid parameter object: need either .data, .range or .url"),"url"in l&&typeof l.url=="string"){if(eV(l.url)){const{url:Ne}=l,ot=Sre(l,["url"]),ce=bre(Ne);return Object.assign({data:ce},ot)}Cre()}return l}),[l]);C.useEffect(()=>{const Ne=rO(oe());return Ne.promise.then(ot=>{O({type:"RESOLVE",value:ot})}).catch(ot=>{O({type:"REJECT",error:ot})}),()=>{qC(Ne)}},[oe,O]),C.useEffect(()=>{if(!(typeof N>"u")){if(N===!1){Q();return}J()}},[N]);
735function ie(){$&&(y&&y($),U.current=new Array($.numPages),k.current.setDocument($))}function ee(){D&&(Zl(!1,D.toString()),p&&p(D))}function re(){F({type:"RESET"})}C.useEffect(re,[F,N]);function fe(){if(!N)return;const Ne=Object.assign(Object.assign({},N),w),ot=ZCe(Ne);m&&(ot.onProgress=m),v&&(ot.onPassword=v);const ce=ot;return ce.promise.then(Ae=>{F({type:"RESOLVE",value:Ae})}).catch(Ae=>{ce.destroyed||F({type:"REJECT",error:Ae})}),()=>{ce.destroy()}}C.useEffect(fe,[w,F,N]),C.useEffect(()=>{if(!(typeof $>"u")){if($===!1){ee();return}ie()}},[$]);function we(){k.current.setViewer(q.current),k.current.setExternalLinkRel(s),k.current.setExternalLinkTarget(a)}C.useEffect(we,[s,a]);function xe(Ne,ot){U.current[Ne]=ot}function ve(Ne){delete U.current[Ne]}const Re=C.useMemo(()=>({imageResourcesPath:u,linkService:k.current,onItemClick:f,pdf:$,registerPage:xe,renderMode:A,rotate:_,unregisterPage:ve}),[u,f,$,A,_]),pe=C.useMemo(()=>JCe(P,()=>$),[P,$]);function Be(){return g(eSe.Provider,{value:Re,children:r})}function ke(){return l?$==null?g(R1,{type:"loading",children:typeof d=="function"?d():d}):$===!1?g(R1,{type:"error",children:typeof i=="function"?i():i}):Be():g(R1,{type:"no-data",children:typeof h=="function"?h():h})}return g("div",Object.assign({className:Ye("react-pdf__Document",o),ref:c,style:{"--scale-factor":"1"}},pe,{children:ke()}))}),rSe=mjt;function oSe(){return C.useContext(eSe)}function iSe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.filter(Boolean);if(n.length<=1){var r=n[0];return r||null}return function(i){n.forEach(function(s){typeof s=="function"?s(i):s&&(s.current=i)})}}const sSe=C.createContext(null),aSe={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},yjt=/^H(\d+)$/;function vjt(t){return t in aSe}function a$(t){return"children"in t}function lSe(t){return a$(t)?t.children.length===1&&0 in t.children&&"id"in t.children[0]:!1}function bjt(t){const e={};if(a$(t)){const{role:n}=t,r=n.match(yjt);if(r)e.role="heading",e["aria-level"]=Number(r[1]);else if(vjt(n)){const o=aSe[n];o&&(e.role=o)}}return e}function cSe(t){const e={};if(a$(t)){if(t.alt!==void 0&&(e["aria-label"]=t.alt),t.lang!==void 0&&(e.lang=t.lang),lSe(t)){const[n]=t.children;if(n){const r=cSe(n);return Object.assign(Object.assign({},e),r)}}}else"id"in t&&(e["aria-owns"]=t.id);return e}function Cjt(t){return t?Object.assign(Object.assign({},bjt(t)),cSe(t)):null}function uSe({className:t,node:e}){const n=C.useMemo(()=>Cjt(e),[e]),r=C.useMemo(()=>!a$(e)||lSe(e)?null:e.children.map((o,i)=>g(uSe,{node:o},i)),[e]);return g("span",Object.assign({className:t},n,{children:r}))}function l$(){return C.useContext(sSe)}function Sjt(){const t=l$();Xo(t,"Unable to find Page context.");const{onGetStructTreeError:e,onGetStructTreeSuccess:n}=t,[r,o]=$x(),{value:i,error:s}=r,{customTextRenderer:a,page:l}=t;function c(){i&&n&&n(i)}function u(){s&&(Zl(!1,s.toString()),e&&e(s))}function d(){o({type:"RESET"})}C.useEffect(d,[o,l]);function h(){if(a||!l)return;const f=rO(l.getStructTree()),p=f;return f.promise.then(m=>{o({type:"RESOLVE",value:m})}).catch(m=>{o({type:"REJECT",error:m})}),()=>qC(p)}return C.useEffect(h,[a,l,o]),C.useEffect(()=>{if(i!==void 0){if(i===!1){u();return}c()}},[i]),i?g(uSe,{className:"react-pdf__Page__structTree structTree",node:i}):null}const xre=KCe;function Ejt(t){const e=l$();Xo(e,"Unable to find Page context.");const n=Object.assign(Object.assign({},e),t),{_className:r,canvasBackground:o,devicePixelRatio:i=ljt(),onRenderError:s,onRenderSuccess:a,page:l,renderForms:c,renderTextLayer:u,rotate:d,scale:h}=n,{canvasRef:f}=t;Xo(l,"Attempted to render page canvas, but no page was specified.");const p=C.useRef(null);function m(){l&&a&&a(tV(l,h))}function y(A){ujt(A)||(Zl(!1,A.toString()),s&&s(A))}const v=C.useMemo(()=>l.getViewport({scale:h*i,rotation:d}),[i,l,d,h]),b=C.useMemo(()=>l.getViewport({scale:h,rotation:d}),[l,d,h]);function S(){if(!l)return;l.cleanup();const{current:A}=p;if(!A)return;A.width=v.width,A.height=v.height,A.style.width=`${Math.floor(b.width)}px`,A.style.height=`${Math.floor(b.height)}px`,A.style.visibility="hidden";const _={annotationMode:c?xre.ENABLE_FORMS:xre.ENABLE,canvasContext:A.getContext("2d",{alpha:!1}),viewport:v};o&&(_.background=o);const P=l.render(_),R=P;return P.promise.then(()=>{A.style.visibility="",m()}).catch(y),()=>qC(R)}C.useEffect(S,[o,p,i,l,c,v,b]);const w=C.useCallback(()=>{const{current:A}=p;A&&(A.width=0,A.height=0)},[p]);return C.useEffect(()=>w,[w]),g("canvas",{className:`${r}__canvas`,dir:"ltr",ref:iSe(f,p),style:{display:"block",userSelect:"none"},children:u?g(Sjt,{}):null})}function xjt(t){return"str"in t}function wjt(){const t=l$();Xo(t,"Unable to find Page context.");const{customTextRenderer:e,onGetTextError:n,onGetTextSuccess:r,onRenderTextLayerError:o,onRenderTextLayerSuccess:i,page:s,pageIndex:a,pageNumber:l,rotate:c,scale:u}=t;Xo(s,"Attempted to load page text content, but no page was specified.");const[d,h]=$x(),{value:f,error:p}=d,m=C.useRef(null),y=C.useRef(void 0);Zl(parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10)===1,"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");function v(){f&&r&&r(f)}function b(){p&&(Zl(!1,p.toString()),n&&n(p))}function S(){h({type:"RESET"})}C.useEffect(S,[s,h]);function w(){if(!s)return;const M=rO(s.getTextContent()),L=M;return M.promise.then(F=>{h({type:"RESOLVE",value:F})}).catch(F=>{h({type:"REJECT",error:F})}),()=>qC(L)}C.useEffect(w,[s,h]),C.useEffect(()=>{if(f!==void 0){if(f===!1){b();return}v()}},[f]);const A=C.useCallback(()=>{i&&i()},[i]),_=C.useCallback(M=>{Zl(!1,M.toString()),o&&o(M)},[o]);function P(){const M=y.current;M&&M.classList.add("active")}function R(){const M=y.current;M&&M.classList.remove("active")}const O=C.useMemo(()=>s.getViewport({scale:u,rotation:c}),[s,c,u]);function N(){if(!s||!f)return;const{current:M}=m;if(!M)return;M.innerHTML="";const L=s.streamTextContent({includeMarkedContent:!0}),F={container:M,textContentSource:L,viewport:O},$=new QCe(F),D=$;return $.render().then(()=>{const k=document.createElement("div");k.className="endOfContent",M.append(k),y.current=k;const U=M.querySelectorAll('[role="presentation"]');if(e){let H=0;
735f.items.forEach((V,q)=>{if(!xjt(V))return;const J=U[H];if(!J)return;const Q=e(Object.assign({pageIndex:a,pageNumber:l,itemIndex:q},V));J.innerHTML=Q,H+=V.str&&V.hasEOL?2:1})}A()}).catch(_),()=>qC(D)}return C.useLayoutEffect(N,[e,_,A,s,a,l,f,O]),g("div",{className:Ye("react-pdf__Page__textContent","textLayer"),onMouseUp:R,onMouseDown:P,ref:m})}function Ajt(){const t=oSe(),e=l$();Xo(e,"Unable to find Page context.");const n=Object.assign(Object.assign({},t),e),{imageResourcesPath:r,linkService:o,onGetAnnotationsError:i,onGetAnnotationsSuccess:s,onRenderAnnotationLayerError:a,onRenderAnnotationLayerSuccess:l,page:c,pdf:u,renderForms:d,rotate:h,scale:f=1}=n;Xo(u,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),Xo(c,"Attempted to load page annotations, but no page was specified."),Xo(o,"Attempted to load page annotations, but no linkService was specified.");const[p,m]=$x(),{value:y,error:v}=p,b=C.useRef(null);Zl(parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10)===1,"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");function S(){y&&s&&s(y)}function w(){v&&(Zl(!1,v.toString()),i&&i(v))}function A(){m({type:"RESET"})}C.useEffect(A,[m,c]);function _(){if(!c)return;const M=rO(c.getAnnotations()),L=M;return M.promise.then(F=>{m({type:"RESOLVE",value:F})}).catch(F=>{m({type:"REJECT",error:F})}),()=>{qC(L)}}C.useEffect(_,[m,c,d]),C.useEffect(()=>{if(y!==void 0){if(y===!1){w();return}S()}},[y]);function P(){l&&l()}function R(M){Zl(!1,`${M}`),a&&a(M)}const O=C.useMemo(()=>c.getViewport({scale:f,rotation:h}),[c,h,f]);function N(){if(!u||!c||!o||!y)return;const{current:M}=b;if(!M)return;const L=O.clone({dontFlip:!0}),F={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:M,l10n:null,page:c,viewport:L},$={annotations:y,annotationStorage:u.annotationStorage,div:M,imageResourcesPath:r,linkService:o,page:c,renderForms:d,viewport:L};M.innerHTML="";try{new XCe(F).render($),P()}catch(D){R(D)}return()=>{}}return C.useEffect(N,[y,r,o,c,d,O]),g("div",{className:Ye("react-pdf__Page__annotations","annotationLayer"),ref:b})}var Tjt=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const wre=1;function dSe(t){const e=oSe(),n=Object.assign(Object.assign({},e),t),{_className:r="react-pdf__Page",_enableRegisterUnregisterPage:o=!0,canvasBackground:i,canvasRef:s,children:a,className:l,customRenderer:c,customTextRenderer:u,devicePixelRatio:d,error:h="Failed to load the page.",height:f,inputRef:p,loading:m="Loading pageâ¦",noData:y="No page specified.",onGetAnnotationsError:v,onGetAnnotationsSuccess:b,onGetStructTreeError:S,onGetStructTreeSuccess:w,onGetTextError:A,onGetTextSuccess:_,onLoadError:P,onLoadSuccess:R,onRenderAnnotationLayerError:O,onRenderAnnotationLayerSuccess:N,onRenderError:M,onRenderSuccess:L,onRenderTextLayerError:F,onRenderTextLayerSuccess:$,pageIndex:D,pageNumber:k,pdf:U,registerPage:H,renderAnnotationLayer:V=!0,renderForms:q=!1,renderMode:J="canvas",renderTextLayer:Q=!0,rotate:se,scale:oe=wre,unregisterPage:ie,width:ee}=n,re=Tjt(n,["_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[fe,we]=$x(),{value:xe,error:ve}=fe,Re=C.useRef(null);Xo(U,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");const pe=vb(k)?k-1:D??null,Be=k??(vb(D)?D+1:null),ke=se??(xe?xe.rotate:null),Ne=C.useMemo(()=>
735{if(!xe)return null;let ue=1;const he=oe??wre;if(ee||f){const Ce=xe.getViewport({scale:1,rotation:ke});ee?ue=ee/Ce.width:f&&(ue=f/Ce.height)}return he*ue},[f,xe,ke,oe,ee]);function ot(){return()=>{vb(pe)&&o&&ie&&ie(pe)}}C.useEffect(ot,[o,U,pe,ie]);function ce(){if(R){if(!xe||!Ne)return;R(tV(xe,Ne))}if(o&&H){if(!vb(pe)||!Re.current)return;H(pe,Re.current)}}function Ae(){ve&&(Zl(!1,ve.toString()),P&&P(ve))}function be(){we({type:"RESET"})}C.useEffect(be,[we,U,pe]);function Se(){if(!U||!Be)return;const ue=rO(U.getPage(Be)),he=ue;return ue.promise.then(Ce=>{we({type:"RESOLVE",value:Ce})}).catch(Ce=>{we({type:"REJECT",error:Ce})}),()=>qC(he)}C.useEffect(Se,[we,U,pe,Be,H]),C.useEffect(()=>{if(xe!==void 0){if(xe===!1){Ae();return}ce()}},[xe,Ne]);const Pe=C.useMemo(()=>xe&&vb(pe)&&Be&&vb(ke)&&vb(Ne)?{_className:r,canvasBackground:i,customTextRenderer:u,devicePixelRatio:d,onGetAnnotationsError:v,onGetAnnotationsSuccess:b,onGetStructTreeError:S,onGetStructTreeSuccess:w,onGetTextError:A,onGetTextSuccess:_,onRenderAnnotationLayerError:O,onRenderAnnotationLayerSuccess:N,onRenderError:M,onRenderSuccess:L,onRenderTextLayerError:F,onRenderTextLayerSuccess:$,page:xe,pageIndex:pe,pageNumber:Be,renderForms:q,renderTextLayer:Q,rotate:ke,scale:Ne}:null,[r,i,u,d,v,b,S,w,A,_,O,N,M,L,F,$,xe,pe,Be,q,Q,ke,Ne]),Ue=C.useMemo(()=>JCe(re,()=>xe&&(Ne?tV(xe,Ne):void 0)),[re,xe,Ne]),_e=`${pe}@${Ne}/${ke}`;function Oe(){switch(J){case"custom":return Xo(c,'renderMode was set to "custom", but no customRenderer was passed.'),g(c,{},`${_e}_custom`);case"none":return null;case"canvas":default:return g(Ejt,{canvasRef:s},`${_e}_canvas`)}}function ze(){return Q?g(wjt,{},`${_e}_text`):null}function ne(){return V?g(Ajt,{},`${_e}_annotations`):null}function W(){return K(sSe.Provider,{value:Pe,children:[Oe(),ze(),ne(),a]})}function j(){return Be?U===null||xe===void 0||xe===null?g(R1,{type:"loading",children:typeof m=="function"?m():m}):U===!1||xe===!1?g(R1,{type:"error",children:typeof h=="function"?h():h}):W():g(R1,{type:"no-data",children:typeof y=="function"?y():y})}return g("div",Object.assign({className:Ye(r,l),"data-page-number":Be,ref:iSe(p,Re),style:{"--scale-factor":`${Ne}`,backgroundColor:i||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},Ue,{children:j()}))}cjt();N9.workerSrc="pdf.worker.mjs";const hSe="/assets/iNoCulator.AI-Terms-of-Service-37cabab4.pdf",fSe="/assets/Signature-IP-iNoCulator-Software-Evaluation-Agreement-bfef2e5f.pdf";N9.workerSrc=new URL("/assets/pdf.worker.min-65f36864.mjs",self.location).toString();const wU=()=>{const[t,e]=C.useState(),[n,r]=C.useState(1),[o,i]=C.useState(""),[s,a]=C.useState(window.innerWidth),l=window.location.pathname,c=Su[wa.navigateBeforeIcon],u=Su[wa.navigateNextIcon],d=Su[wa.downloadIcon],h=({numPages:p})=>{e(p)},f=p=>{r(p==="next"?n+1:n-1)};return C.useEffect(()=>{switch(l){case un.tosAndPrivacyPolicy.path:i(hSe);break;case un.softwareEvaluationAgreement.path:i(fSe);break}}),C.useEffect(()=>{const p=()=>a(window.innerWidth);return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[window.innerWidth]),K(le,{sx:{display:"flex",justifyContent:"space-evenly",mt:3,height:"87vh",overflowY:"auto"},children:[g(D3e,{href:o,color:"primary",size:"large","aria-label":"download",target:"_blank",download:!0,sx:{position:"absolute",top:"6rem",right:"3rem",visibility:l===un.userGuide.path?"hidden":"visible"},children:g(d,{})}),g(le,{sx:{visibility:n>=2?"visible":"hidden",my:"auto"},children:g(c,{color:"action",sx:{"&:hover":{cursor:"pointer",opacity:.7},fontSize:"10rem"},onClick:()=>f("back"),hidden:!0})}),g(le,{sx:{my:"auto"},children:K(To,{children:[g(rSe,{file:o,onLoadSuccess:h,children:g(dSe,{pageNumber:n,renderTextLayer:!1,scale:s<1444?.7:1})}),K(Ke,{children:["Page ",n," of ",t]})]})}),g(le,{sx:{visibility:n!==t?"visible":"hidden",my:"auto"},children:g(u,{color:"action",sx:{"&:hover":{cursor:"pointer",opacity:.7},fontSize:"10rem"},onClick:()=>f("next")})})]})},AU=K(gr,{children:[g("span",{style:{color:tt},children:"i"}),g("span",{style:{color:so},children:"NoC"}),g("span",{style:{color:tt},children:"ulatorâ¢"})]}),Are="[email protected]",_jt=()=>{const t="We received your Request for an Account to access ",e=Za();return g(Wv,{title:K(le,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"center"},children:[g(L6e,{fontSize:"large"}),K(Ke,{variant:"h3",children:[t," ",AU]})]}),sx:{mt:"20vh !important",width:"50%"},children:K(le,{sx:{display:"flex",flexDirection:"column"},children:[g(le,{sx:{my:2,mx:"auto"},children:K(Ke,{textAlign:"center",children:["A representative from our team will review your request to access "," ",AU," ",".",g("br",{}),"Once your eligibility is confirmed, you will be notified via email.",g("br",{}),g("br",{}),"Confirmation will be done within 24 hours.",g("br",{}),g("br",{}),"If you need support in relation to your request, please don't hesitate to reach us at ",g(o4,{href:`mailto:${{SIGNATUREIP_SUPPORT_EMAIL:Are}}`,underline:"hover",children:Are}),"."]})}),g(le,{sx:{mx:"auto"},children:K(Ke,{children:["Thank you for choosing ",AU]})}),g(le,{sx:{mt:2,mx:"auto"},children:g(Ke,{sx:{ml:1,color:"primary.light","&:hover":{cursor:"pointer",color:"primary.dark",textDecoration:"underline"}},onClick:()=>e(un.landingPage.path),children:"Back to Home Page"})})]})})};var Wd=(t=>(t[t.TOS_AND_PRIVACY_POLICY=0]="TOS_AND_PRIVACY_POLICY",t[t.SOFTWARE_EVALUATION_AGREEMENT=1]="SOFTWARE_EVALUATION_AGREEMENT",t))(Wd||{});const Ijt=({activeTab:t,setActiveTab:e,isSoftwareAgreementTabEnabled:n})=>
735{const r="Terms of Service and Privacy Policy",o="Software Evaluation Agreement",i=[{value:Wd.TOS_AND_PRIVACY_POLICY,label:r,isTabEnabled:!0},{value:Wd.SOFTWARE_EVALUATION_AGREEMENT,label:o,isTabEnabled:n}],s=(a,l)=>e(l);return g(tg,{value:t,onChange:(a,l)=>s(a,l),centered:!0,sx:{"& .MuiTabs-indicator":{backgroundColor:tt}},children:i.map(({value:a,label:l,isTabEnabled:c})=>g(Sa,{value:a,label:l,disabled:!c,sx:{color:tt,"&.Mui-selected":{color:tt}}},a))})},Pjt=({label:t,isChecked:e,isEnabled:n,handleChange:r})=>g(ec,{control:g(_u,{checked:e,disabled:!n,onChange:()=>r(),sx:{color:so,"&.Mui-checked":{color:so}}}),label:t}),Tre=({tabType:t,file:e,handleScroll:n,totalPageCount:r,isChecked:o,isCheckboxEnabled:i,handleChangeCheckbox:s,documentType:a})=>{const l=`I agree to the ${a}`;return K(le,{sx:{mt:2},children:[g(le,{onScroll:c=>n(t,c),sx:{height:"50vh",overflowY:"auto",border:"1px solid #ccc",p:2},children:g(rSe,{file:e,children:Array.from(new Array(r),(c,u)=>g(dSe,{pageNumber:u+1,renderTextLayer:!1},u))})}),g(Pjt,{label:l,isChecked:o,isEnabled:i,handleChange:()=>s()})]})},Rjt=({label:t,isEnabled:e,isLoading:n,handleClick:r})=>g(Sn,{variant:"contained",fullWidth:!0,disabled:!e,onClick:()=>r(),startIcon:n?g(Ni,{size:18}):null,sx:{mt:4,py:1.5,backgroundColor:"#2a2c2e","&:hover":{backgroundColor:"#1f2022"},"&.Mui-disabled":{backgroundColor:"#ccc"}},children:t}),Ojt=({label:t,isEnabled:e,isLoading:n,handleClick:r})=>g(Rjt,{label:t,isEnabled:e,isLoading:n,handleClick:r}),Njt=()=>{const t=Za(),e=u0(),n="We have updated our Terms of Service, Privacy Policy, and Software Evaluation Agreement",r="Continue",o="Confirm",i=9,s=2,a=e.state?.email,l=e.state?.password,[c]=eue(
735),[u,d]=C.useState(Wd.TOS_AND_PRIVACY_POLICY),[h,f]=C.useState(!1),[p,m]=C.useState(!1),[y,v]=C.useState(!1),[b,S]=C.useState(!1),[w,A]=C.useState(!1),_=(L,F)=>{Math.abs(F.currentTarget.scrollHeight-(F.currentTarget.scrollTop+F.currentTarget.clientHeight))<=1&&(L===Wd.TOS_AND_PRIVACY_POLICY&&f(!0),L===Wd.SOFTWARE_EVALUATION_AGREEMENT&&m(!0))},P=()=>{A(!0),c({email:a,password:l,isAgreementAccepted:!0}).then(L=>{"data"in L&&t(un.login.path,{state:{email:a,password:l,isTokenSent:!0,isAgreementAccepted:!0,otp:L.data?.otp??""}})})},R=()=>{d(Wd.SOFTWARE_EVALUATION_AGREEMENT)},O=y,N=y&&b&&!w,M=u===Wd.TOS_AND_PRIVACY_POLICY;return!a||!l?(t(un.landingPage.path),g(gr,{})):g(le,{sx:{mt:"5vh",height:"100%",maxHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center"},children:g(Wv,{title:K(le,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"center"},children:[g(F6e,{fontSize:"large"}),g(Ke,{variant:"h5",children:n})]}),children:K(le,{children:[g(Ijt,{activeTab:u,setActiveTab:d,isSoftwareAgreementTabEnabled:y}),u===Wd.TOS_AND_PRIVACY_POLICY?g(Tre,{tabType:Wd.TOS_AND_PRIVACY_POLICY,file:hSe,handleScroll:_,totalPageCount:i,isChecked:y,isCheckboxEnabled:y||h,handleChangeCheckbox:()=>v(!y),documentType:"Terms of Service and Privacy Policy"}):null,u===Wd.SOFTWARE_EVALUATION_AGREEMENT?g(Tre,{tabType:Wd.SOFTWARE_EVALUATION_AGREEMENT,file:fSe,handleScroll:_,totalPageCount:s,isChecked:b,isCheckboxEnabled:b||p,handleChangeCheckbox:()=>S(!b),documentType:"Software Evaluation Agreement"}):null,g(Ojt,{label:M?r:o,isEnabled:M?O:N,isLoading:w,handleClick:M?R:P})]})})})},Mjt=()=>{const{theme:t}=Qje();return uue({}),K(fke,{theme:t,children:[K(e6,{dateAdapter:Izt,children:[g(O3,{limit:3,position:"bottom-left",autoClose:3e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),g(oIe,{children:K(Ua,{path:un.base,element:g(G7e,{}),children:[g(Ua,{path:`${un.activateUser.base}/:token`,element:g(L9e,{})}),g(Ua,{path:un.login.base,element:g(M9e,{})}),g(Ua,{path:un.requestAccess.base,element:g($9e,{})}),g(Ua,{path:un.requestAccessConfirmation.base,element:g(_jt,{})}),g(Ua,{path:un.resetPassword.base,element:g(D9e,{})}),g(Ua,{path:`${un.resetPasswordConfirm.base}/:token`,element:g(gzt,{})}),g(Ua,{path:un.tosAndPrivacyPolicy.base,element:g(wU,{})}),g(Ua,{path:un.softwareEvaluationAgreement.base,element:g(wU,{})}),g(Ua,{path:un.userAgreement.base,element:g(Njt,{})}),K(Ua,{element:g(j7e,{}),children:[g(Ua,{path:un.landingPage.base,element:g(Wzt,{})}),g(Ua,{path:un.userGuide.path,element:g(wU,{})}),g(Ua,{path:un.projects.path,element:g(pzt,{})}),g(Ua,{path:`${un.projects.path}/:projectId`,element:g(y3t,{})}),g(Ua,{path:un.admin.path,element:g(Qct,{})}),g(Ua,{path:un.profile.path,element:g(Zct,{})})]})]})})]}),g(zUe,{})]})},Djt=C.createContext(null),TU={didCatch:!1,error:null};class Ljt extends C.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=TU}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(TU)}}componentDidCatch(e,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,e,n)}componentDidUpdate(e,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&kjt(e.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:e.resetKeys,reason:"keys"}),this.setState(TU)}}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=e;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=C.createElement(r,l);else if(o===null||C.isValidElement(o))a=o;else throw s}return C.createElement(Djt.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function kjt(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.length!==e.length||t.some((n,r)=>!Object.is(n,e[r]))}const Fjt=Nr.injectEndpoints({endpoints:t=>
735({sendErrorExceptionEmail:t.mutation({query:e=>({url:dt.exceptionEmail,method:"POST",body:{...e}})})})}),{useSendErrorExceptionEmailMutation:Bjt}=Fjt,$jt=({error:t})=>K(le,{children:[g("h2",{children:"Something went wrong."}),K("details",{style:{whiteSpace:"pre-wrap"},children:[t&&K("span",{children:["Message: ",t.message.toString()]}),g("br",{}),t&&t.stack&&t.stack.toString()]})]}),Hjt=({children:t})=>{const{email:e}=bt(Dc),[n]=Bjt(),r=C.useCallback((o,i)=>{const s=JSON.stringify(o,["error","filename","timeStamp","message","lineno","stack"]);e&&n({error:s,info:i,email:e,date:new Date}),ln.error(`Something Went Wrong! ${JSON.stringify(JSON.parse(s).message)}`)},[e,n]);return g(Ljt,{FallbackComponent:$jt,onError:r,children:t})};_U.createRoot(document.getElementById("root")).render(g(YIe,{store:IG,children:g(aIe,{children:g(Hjt,{children:g(Mjt,{})})})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.