(function(){const tt=document.createElement("link").relList;if(tt&&tt.supports&&tt.supports("modulepreload"))return;for(const ot of document.querySelectorAll('link[rel="modulepreload"]'))rt(ot);new MutationObserver(ot=>{for(const st of ot)if(st.type==="childList")for(const ut of st.addedNodes)ut.tagName==="LINK"&&ut.rel==="modulepreload"&&rt(ut)}).observe(document,{childList:!0,subtree:!0});function nt(ot){const st={};return ot.integrity&&(st.integrity=ot.integrity),ot.referrerpolicy&&(st.referrerPolicy=ot.referrerpolicy),ot.crossorigin==="use-credentials"?st.credentials="include":ot.crossorigin==="anonymous"?st.credentials="omit":st.credentials="same-origin",st}function rt(ot){if(ot.ep)return;ot.ep=!0;const st=nt(ot);fetch(ot.href,st)}})();window.CONFIG||(window.CONFIG={});window.CONFIG.WEAVE_BACKEND_HOST="/__weave";window.CONFIG.ANALYTICS_DISABLED=!0;window.CONFIG.DISABLE_TELEMETRY=!0;const careyfontEmbedded="",JupyterViewer="",Tags="",Toast$2="",Base="",DragDrop="",EditableField$1="",Markdown$2="",NumberInput$1="",index$8="",baseTable="",ControlBox="",katex$2="",styles$J="",reactDatetime="",styles$I="",reactTable="",ReactToastify_min="",semantic_min="";var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(et){return et&&et.__esModule&&Object.prototype.hasOwnProperty.call(et,"default")?et.default:et}function getAugmentedNamespace(et){var tt=et.default;if(typeof tt=="function"){var nt=function(){return tt.apply(this,arguments)};nt.prototype=tt.prototype}else nt={};return Object.defineProperty(nt,"__esModule",{value:!0}),Object.keys(et).forEach(function(rt){var ot=Object.getOwnPropertyDescriptor(et,rt);Object.defineProperty(nt,rt,ot.get?ot:{enumerable:!0,get:function(){return et[rt]}})}),nt}var react={exports:{}},react_production_min={};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var getOwnPropertySymbols$1=Object.getOwnPropertySymbols,hasOwnProperty$i=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject$1(et){if(et==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(et)}function shouldUseNative(){try{if(!Object.assign)return!1;var et=new String("abc");if(et[5]="de",Object.getOwnPropertyNames(et)[0]==="5")return!1;for(var tt={},nt=0;nt<10;nt++)tt["_"+String.fromCharCode(nt)]=nt;var rt=Object.getOwnPropertyNames(tt).map(function(st){return tt[st]});if(rt.join("")!=="0123456789")return!1;var ot={};return"abcdefghijklmnopqrst".split("").forEach(function(st){ot[st]=st}),Object.keys(Object.assign({},ot)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var objectAssign=shouldUseNative()?Object.assign:function(et,tt){for(var nt,rt=toObject$1(et),ot,st=1;st<arguments.length;st++){nt=Object(arguments[st]);for(var ut in nt)hasOwnProperty$i.call(nt,ut)&&(rt[ut]=nt[ut]);if(getOwnPropertySymbols$1){ot=getOwnPropertySymbols$1(nt);for(var ct=0;ct<ot.length;ct++)propIsEnumerable.call(nt,ot[ct])&&(rt[ot[ct]]=nt[ot[ct]])}}return rt};/** @license React v17.0.2
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var l$3=objectAssign,n$6=60103,p$5=60106;react_production_min.Fragment=60107;react_production_min.StrictMode=60108;react_production_min.Profiler=60114;var q$4=60109,r$6=60110,t$4=60112;react_production_min.Suspense=60113;var u$3=60115,v$5=60116;if(typeof Symbol=="function"&&Symbol.for){var w$6=Symbol.for;n$6=w$6("react.element"),p$5=w$6("react.portal"),react_production_min.Fragment=w$6("react.fragment"),react_production_min.StrictMode=w$6("react.strict_mode"),react_production_min.Profiler=w$6("react.profiler"),q$4=w$6("react.provider"),r$6=w$6("react.context"),t$4=w$6("react.forward_ref"),react_production_min.Suspense=w$6("react.suspense"),u$3=w$6("react.memo"),v$5=w$6("react.lazy")}var x$9=typeof Symbol=="function"&&Symbol.iterator;function y$8(et){return et===null||typeof et!="object"?null:(et=x$9&&et[x$9]||et["@@iterator"],typeof et=="function"?et:null)}function z$4(et){for(var tt="https://reactjs.org/docs/error-decoder.html?invariant="+et,nt=1;nt<arguments.length;nt++)tt+="&args[]="+encodeURIComponent(arguments[nt]);return"Minified React error #"+et+"; visit "+tt+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var A$5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B$6={};function C$3(et,tt,nt){this.props=et,this.context=tt,this.refs=B$6,this.updater=nt||A$5}C$3.prototype.isReactComponent={};C$3.prototype.setState=function(et,tt){if(typeof et!="object"&&typeof et!="function"&&et!=null)throw Error(z$4(85));this.updater.enqueueSetState(this,et,tt,"setState")};C$3.prototype.forceUpdate=function(et){this.updater.enqueueForceUpdate(this,et,"forceUpdate")};function D$5(){}D$5.prototype=C$3.prototype;function E$5(et,tt,nt){this.props=et,this.context=tt,this.refs=B$6,this.updater=nt||A$5}var F$3=E$5.prototype=new D$5;F$3.constructor=E$5;l$3(F$3,C$3.prototype);F$3.isPureReactComponent=!0;var G$4={current:null},H$4=Object.prototype.hasOwnProperty,I$4={key:!0,ref:!0,__self:!0,__source:!0};function J$1(et,tt,nt){var rt,ot={},st=null,ut=null;if(tt!=null)for(rt in tt.ref!==void 0&&(ut=tt.ref),tt.key!==void 0&&(st=""+tt.key),tt)H$4.call(tt,rt)&&!I$4.hasOwnProperty(rt)&&(ot[rt]=tt[rt]);var ct=arguments.length-2;if(ct===1)ot.children=nt;else if(1<ct){for(var ft=Array(ct),pt=0;pt<ct;pt++)ft[pt]=arguments[pt+2];ot.children=ft}if(et&&et.defaultProps)for(rt in ct=et.defaultProps,ct)ot[rt]===void 0&&(ot[rt]=ct[rt]);return{$$typeof:n$6,type:et,key:st,ref:ut,props:ot,_owner:G$4.current}}function K$2(et,tt){return{$$typeof:n$6,type:et.type,key:tt,ref:et.ref,props:et.props,_owner:et._owner}}function L$2(et){return typeof et=="object"&&et!==null&&et.$$typeof===n$6}function escape$3(et){var tt={"=":"=0",":":"=2"};return"$"+et.replace(/[=:]/g,function(nt){return tt[nt]})}var M$4=/\/+/g;function N$3(et,tt){return typeof et=="object"&&et!==null&&et.key!=null?escape$3(""+et.key):tt.toString(36)}function O$3(et,tt,nt,rt,ot){var st=typeof et;(st==="undefined"||st==="boolean")&&(et=null);var ut=!1;if(et===null)ut=!0;else switch(st){case"string":case"number":ut=!0;break;case"object":switch(et.$$typeof){case n$6:case p$5:ut=!0}}if(ut)return ut=et,ot=ot(ut),et=rt===""?"."+N$3(ut,0):rt,Array.isArray(ot)?(nt="",et!=null&&(nt=et.replace(M$4,"$&/")+"/"),O$3(ot,tt,nt,"",function(pt){return pt})):ot!=null&&(L$2(ot)&&(ot=K$2(ot,nt+(!ot.key||ut&&ut.key===ot.key?"":(""+ot.key).replace(M$4,"$&/")+"/")+et)),tt.push(ot)),1;if(ut=0,rt=rt===""?".":rt+":",Array.isArray(et))for(var ct=0;ct<et.length;ct++){st=et[ct];var ft=rt+N$3(st,ct);ut+=O$3(st,tt,nt,ft,ot)}else if(ft=y$8(et),typeof ft=="function")for(et=ft.call(et),ct=0;!(st=et.next()).done;)st=st.value,ft=rt+N$3(st,ct++),ut+=O$3(st,tt,nt,ft,ot);else if(st==="object")throw tt=""+et,Error(z$4(31,tt==="[object Object]"?"object with keys {"+Object.keys(et).join(", ")+"}":tt));return ut}function P$3(et,tt,nt){if(et==null)return et;var rt=[],ot=0;return O$3(et,rt,"","",function(st){return tt.call(nt,st,ot++)}),rt}function Q$2(et){if(et._status===-1){var tt=et._result;tt=tt(),et._status=0,et._result=tt,tt.then(function(nt){et._status===0&&(nt=nt.default,et._status=1,et._result=nt)},function(nt){et._status===0&&(et._status=2,et._result=nt)})}if(et._status===1)return et._result;throw et._result}var R$2={current:null};function S$3(){var et=R$2.current;if(et===null)throw Error(z$4(321));return et}var T$2={ReactCurrentDispatcher:R$2,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:G$4,IsSomeRendererActing:{current:!1},assign:l$3};react_production_min.Children={map:P$3,forEach:function(et,tt,nt){P$3(et,function(){tt.apply(this,arguments)},nt)},count:function(et){var tt=0;return P$3(et,function(){tt++}),tt},toArray:function(et){return P$3(et,function(tt){return tt})||[]},only:function(et){if(!L$2(et))throw Error(z$4(143));return et}};react_production_min.Component=C$3;react_production_min.PureComponent=E$5;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T$2;react_production_min.cloneElement=function(et,tt,nt){if(et==null)throw Error(z$4(267,et));var rt=l$3({},et.props),ot=et.key,st=et.ref,ut=et._owner;if(tt!=null){if(tt.ref!==void 0&&(st=tt.ref,ut=G$4.current),tt.key!==void 0&&(ot=""+tt.key),et.type&&et.type.defaultProps)var ct=et.type.defaultProps;for(ft in tt)H$4.call(tt,ft)&&!I$4.hasOwnProperty(ft)&&(rt[ft]=tt[ft]===void 0&&ct!==void 0?ct[ft]:tt[ft])}var ft=arguments.length-2;if(ft===1)rt.children=nt;else if(1<ft){ct=Array(ft);for(var pt=0;pt<ft;pt++)ct[pt]=arguments[pt+2];rt.children=ct}return{$$typeof:n$6,type:et.type,key:ot,ref:st,props:rt,_owner:ut}};react_production_min.createContext=function(et,tt){return tt===void 0&&(tt=null),et={$$typeof:r$6,_calculateChangedBits:tt,_currentValue:et,_currentValue2:et,_threadCount:0,Provider:null,Consumer:null},et.Provider={$$typeof:q$4,_context:et},et.Consumer=et};react_production_min.createElement=J$1;react_production_min.createFactory=function(et){var tt=J$1.bind(null,et);return tt.type=et,tt};react_production_min.createRef=function(){return{current:null}};react_production_min.forwardRef=function(et){return{$$typeof:t$4,render:et}};react_production_min.isValidElement=L$2;react_production_min.lazy=function(et){return{$$typeof:v$5,_payload:{_status:-1,_result:et},_init:Q$2}};react_production_min.memo=function(et,tt){return{$$typeof:u$3,type:et,compare:tt===void 0?null:tt}};react_production_min.useCallback=function(et,tt){return S$3().useCallback(et,tt)};react_production_min.useContext=function(et,tt){return S$3().useContext(et,tt)};react_production_min.useDebugValue=function(){};react_production_min.useEffect=function(et,tt){return S$3().useEffect(et,tt)};react_production_min.useImperativeHandle=function(et,tt,nt){return S$3().useImperativeHandle(et,tt,nt)};react_production_min.useLayoutEffect=function(et,tt){return S$3().useLayoutEffect(et,tt)};react_production_min.useMemo=function(et,tt){return S$3().useMemo(et,tt)};react_production_min.useReducer=function(et,tt,nt){return S$3().useReducer(et,tt,nt)};react_production_min.useRef=function(et){return S$3().useRef(et)};react_production_min.useState=function(et){return S$3().useState(et)};react_production_min.version="17.0.2";(function(et){et.exports=react_production_min})(react);const Wt=getDefaultExportFromCjs$1(react.exports);var reactDom={exports:{}},reactDom_production_min={},scheduler$1={exports:{}},scheduler_production_min={};/** @license React v0.20.2
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(et){var tt,nt,rt,ot;if(typeof performance=="object"&&typeof performance.now=="function"){var st=performance;et.unstable_now=function(){return st.now()}}else{var ut=Date,ct=ut.now();et.unstable_now=function(){return ut.now()-ct}}if(typeof window>"u"||typeof MessageChannel!="function"){var ft=null,pt=null,ht=function(){if(ft!==null)try{var _n=et.unstable_now();ft(!0,_n),ft=null}catch(En){throw setTimeout(ht,0),En}};tt=function(_n){ft!==null?setTimeout(tt,0,_n):(ft=_n,setTimeout(ht,0))},nt=function(_n,En){pt=setTimeout(_n,En)},rt=function(){clearTimeout(pt)},et.unstable_shouldYield=function(){return!1},ot=et.unstable_forceFrameRate=function(){}}else{var mt=window.setTimeout,yt=window.clearTimeout;if(typeof console<"u"){var vt=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof vt!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var Tt=!1,Et=null,xt=-1,At=5,Ct=0;et.unstable_shouldYield=function(){return et.unstable_now()>=Ct},ot=function(){},et.unstable_forceFrameRate=function(_n){0>_n||125<_n?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):At=0<_n?Math.floor(1e3/_n):5};var $t=new MessageChannel,Ot=$t.port2;$t.port1.onmessage=function(){if(Et!==null){var _n=et.unstable_now();Ct=_n+At;try{Et(!0,_n)?Ot.postMessage(null):(Tt=!1,Et=null)}catch(En){throw Ot.postMessage(null),En}}else Tt=!1},tt=function(_n){Et=_n,Tt||(Tt=!0,Ot.postMessage(null))},nt=function(_n,En){xt=mt(function(){_n(et.unstable_now())},En)},rt=function(){yt(xt),xt=-1}}function Rt(_n,En){var Ln=_n.length;_n.push(En);e:for(;;){var wn=Ln-1>>>1,Dn=_n[wn];if(Dn!==void 0&&0<Mt(Dn,En))_n[wn]=En,_n[Ln]=Dn,Ln=wn;else break e}}function It(_n){return _n=_n[0],_n===void 0?null:_n}function kt(_n){var En=_n[0];if(En!==void 0){var Ln=_n.pop();if(Ln!==En){_n[0]=Ln;e:for(var wn=0,Dn=_n.length;wn<Dn;){var $n=2*(wn+1)-1,Gn=_n[$n],Jn=$n+1,zn=_n[Jn];if(Gn!==void 0&&0>Mt(Gn,Ln))zn!==void 0&&0>Mt(zn,Gn)?(_n[wn]=zn,_n[Jn]=Ln,wn=Jn):(_n[wn]=Gn,_n[$n]=Ln,wn=$n);else if(zn!==void 0&&0>Mt(zn,Ln))_n[wn]=zn,_n[Jn]=Ln,wn=Jn;else break e}}return En}return null}function Mt(_n,En){var Ln=_n.sortIndex-En.sortIndex;return Ln!==0?Ln:_n.id-En.id}var Ft=[],zt=[],Vt=1,Zt=null,Ut=3,Xt=!1,Jt=!1,gn=!1;function An(_n){for(var En=It(zt);En!==null;){if(En.callback===null)kt(zt);else if(En.startTime<=_n)kt(zt),En.sortIndex=En.expirationTime,Rt(Ft,En);else break;En=It(zt)}}function sn(_n){if(gn=!1,An(_n),!Jt)if(It(Ft)!==null)Jt=!0,tt(Sn);else{var En=It(zt);En!==null&&nt(sn,En.startTime-_n)}}function Sn(_n,En){Jt=!1,gn&&(gn=!1,rt()),Xt=!0;var Ln=Ut;try{for(An(En),Zt=It(Ft);Zt!==null&&(!(Zt.expirationTime>En)||_n&&!et.unstable_shouldYield());){var wn=Zt.callback;if(typeof wn=="function"){Zt.callback=null,Ut=Zt.priorityLevel;var Dn=wn(Zt.expirationTime<=En);En=et.unstable_now(),typeof Dn=="function"?Zt.callback=Dn:Zt===It(Ft)&&kt(Ft),An(En)}else kt(Ft);Zt=It(Ft)}if(Zt!==null)var $n=!0;else{var Gn=It(zt);Gn!==null&&nt(sn,Gn.startTime-En),$n=!1}return $n}finally{Zt=null,Ut=Ln,Xt=!1}}var In=ot;et.unstable_IdlePriority=5,et.unstable_ImmediatePriority=1,et.unstable_LowPriority=4,et.unstable_NormalPriority=3,et.unstable_Profiling=null,et.unstable_UserBlockingPriority=2,et.unstable_cancelCallback=function(_n){_n.callback=null},et.unstable_continueExecution=function(){Jt||Xt||(Jt=!0,tt(Sn))},et.unstable_getCurrentPriorityLevel=function(){return Ut},et.unstable_getFirstCallbackNode=function(){return It(Ft)},et.unstable_next=function(_n){switch(Ut){case 1:case 2:case 3:var En=3;break;default:En=Ut}var Ln=Ut;Ut=En;try{return _n()}finally{Ut=Ln}},et.unstable_pauseExecution=function(){},et.unstable_requestPaint=In,et.unstable_runWithPriority=function(_n,En){switch(_n){case 1:case 2:case 3:case 4:case 5:break;default:_n=3}var Ln=Ut;Ut=_n;try{return En()}finally{Ut=Ln}},et.unstable_scheduleCallback=function(_n,En,Ln){var wn=et.unstable_now();switch(typeof Ln=="object"&&Ln!==null?(Ln=Ln.delay,Ln=typeof Ln=="number"&&0<Ln?wn+Ln:wn):Ln=wn,_n){case 1:var Dn=-1;break;case 2:Dn=250;break;case 5:Dn=1073741823;break;case 4:Dn=1e4;break;default:Dn=5e3}return Dn=Ln+Dn,_n={id:Vt++,callback:En,priorityLevel:_n,startTime:Ln,expirationTime:Dn,sortIndex:-1},Ln>wn?(_n.sortIndex=Ln,Rt(zt,_n),It(Ft)===null&&_n===It(zt)&&(gn?rt():gn=!0,nt(sn,Ln-wn))):(_n.sortIndex=Dn,Rt(Ft,_n),Jt||Xt||(Jt=!0,tt(Sn))),_n},et.unstable_wrapCallback=function(_n){var En=Ut;return function(){var Ln=Ut;Ut=En;try{return _n.apply(this,arguments)}finally{Ut=Ln}}}})(scheduler_production_min);(function(et){et.exports=scheduler_production_min})(scheduler$1);/** @license React v17.0.2
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var aa=react.exports,m$5=objectAssign,r$5=scheduler$1.exports;function y$7(et){for(var tt="https://reactjs.org/docs/error-decoder.html?invariant="+et,nt=1;nt<arguments.length;nt++)tt+="&args[]="+encodeURIComponent(arguments[nt]);return"Minified React error #"+et+"; visit "+tt+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(y$7(227));var ba=new Set,ca={};function da(et,tt){ea$1(et,tt),ea$1(et+"Capture",tt)}function ea$1(et,tt){for(ca[et]=tt,et=0;et<tt.length;et++)ba.add(tt[et])}var fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ha=/^[: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]*$/,ia=Object.prototype.hasOwnProperty,ja={},ka={};function la(et){return ia.call(ka,et)?!0:ia.call(ja,et)?!1:ha.test(et)?ka[et]=!0:(ja[et]=!0,!1)}function ma$1(et,tt,nt,rt){if(nt!==null&&nt.type===0)return!1;switch(typeof tt){case"function":case"symbol":return!0;case"boolean":return rt?!1:nt!==null?!nt.acceptsBooleans:(et=et.toLowerCase().slice(0,5),et!=="data-"&&et!=="aria-");default:return!1}}function na(et,tt,nt,rt){if(tt===null||typeof tt>"u"||ma$1(et,tt,nt,rt))return!0;if(rt)return!1;if(nt!==null)switch(nt.type){case 3:return!tt;case 4:return tt===!1;case 5:return isNaN(tt);case 6:return isNaN(tt)||1>tt}return!1}function B$5(et,tt,nt,rt,ot,st,ut){this.acceptsBooleans=tt===2||tt===3||tt===4,this.attributeName=rt,this.attributeNamespace=ot,this.mustUseProperty=nt,this.propertyName=et,this.type=tt,this.sanitizeURL=st,this.removeEmptyString=ut}var D$4={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(et){D$4[et]=new B$5(et,0,!1,et,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(et){var tt=et[0];D$4[tt]=new B$5(tt,1,!1,et[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(et){D$4[et]=new B$5(et,2,!1,et.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(et){D$4[et]=new B$5(et,2,!1,et,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(et){D$4[et]=new B$5(et,3,!1,et.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(et){D$4[et]=new B$5(et,3,!0,et,null,!1,!1)});["capture","download"].forEach(function(et){D$4[et]=new B$5(et,4,!1,et,null,!1,!1)});["cols","rows","size","span"].forEach(function(et){D$4[et]=new B$5(et,6,!1,et,null,!1,!1)});["rowSpan","start"].forEach(function(et){D$4[et]=new B$5(et,5,!1,et.toLowerCase(),null,!1,!1)});var oa=/[\-:]([a-z])/g;function pa$1(et){return et[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(et){var tt=et.replace(oa,pa$1);D$4[tt]=new B$5(tt,1,!1,et,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(et){var tt=et.replace(oa,pa$1);D$4[tt]=new B$5(tt,1,!1,et,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(et){var tt=et.replace(oa,pa$1);D$4[tt]=new B$5(tt,1,!1,et,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(et){D$4[et]=new B$5(et,1,!1,et.toLowerCase(),null,!1,!1)});D$4.xlinkHref=new B$5("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(et){D$4[et]=new B$5(et,1,!1,et.toLowerCase(),null,!0,!0)});function qa(et,tt,nt,rt){var ot=D$4.hasOwnProperty(tt)?D$4[tt]:null,st=ot!==null?ot.type===0:rt?!1:!(!(2<tt.length)||tt[0]!=="o"&&tt[0]!=="O"||tt[1]!=="n"&&tt[1]!=="N");st||(na(tt,nt,ot,rt)&&(nt=null),rt||ot===null?la(tt)&&(nt===null?et.removeAttribute(tt):et.setAttribute(tt,""+nt)):ot.mustUseProperty?et[ot.propertyName]=nt===null?ot.type===3?!1:"":nt:(tt=ot.attributeName,rt=ot.attributeNamespace,nt===null?et.removeAttribute(tt):(ot=ot.type,nt=ot===3||ot===4&&nt===!0?"":""+nt,rt?et.setAttributeNS(rt,tt,nt):et.setAttribute(tt,nt))))}var ra=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sa$2=60103,ta=60106,ua=60107,wa=60108,xa=60114,ya=60109,za=60110,Aa=60112,Ba=60113,Ca=60120,Da=60115,Ea=60116,Fa=60121,Ga=60128,Ha=60129,Ia=60130,Ja=60131;if(typeof Symbol=="function"&&Symbol.for){var E$4=Symbol.for;sa$2=E$4("react.element"),ta=E$4("react.portal"),ua=E$4("react.fragment"),wa=E$4("react.strict_mode"),xa=E$4("react.profiler"),ya=E$4("react.provider"),za=E$4("react.context"),Aa=E$4("react.forward_ref"),Ba=E$4("react.suspense"),Ca=E$4("react.suspense_list"),Da=E$4("react.memo"),Ea=E$4("react.lazy"),Fa=E$4("react.block"),E$4("react.scope"),Ga=E$4("react.opaque.id"),Ha=E$4("react.debug_trace_mode"),Ia=E$4("react.offscreen"),Ja=E$4("react.legacy_hidden")}var Ka=typeof Symbol=="function"&&Symbol.iterator;function La(et){return et===null||typeof et!="object"?null:(et=Ka&&et[Ka]||et["@@iterator"],typeof et=="function"?et:null)}var Ma;function Na(et){if(Ma===void 0)try{throw Error()}catch(nt){var tt=nt.stack.trim().match(/\n( *(at )?)/);Ma=tt&&tt[1]||""}return`
`+Ma+et}var Oa=!1;function Pa(et,tt){if(!et||Oa)return"";Oa=!0;var nt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(tt)if(tt=function(){throw Error()},Object.defineProperty(tt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(tt,[])}catch(ft){var rt=ft}Reflect.construct(et,[],tt)}else{try{tt.call()}catch(ft){rt=ft}et.call(tt.prototype)}else{try{throw Error()}catch(ft){rt=ft}et()}}catch(ft){if(ft&&rt&&typeof ft.stack=="string"){for(var ot=ft.stack.split(`
`),st=rt.stack.split(`
`),ut=ot.length-1,ct=st.length-1;1<=ut&&0<=ct&&ot[ut]!==st[ct];)ct--;for(;1<=ut&&0<=ct;ut--,ct--)if(ot[ut]!==st[ct]){if(ut!==1||ct!==1)do if(ut--,ct--,0>ct||ot[ut]!==st[ct])return`
`+ot[ut].replace(" at new "," at ");while(1<=ut&&0<=ct);break}}}finally{Oa=!1,Error.prepareStackTrace=nt}return(et=et?et.displayName||et.name:"")?Na(et):""}function Qa(et){switch(et.tag){case 5:return Na(et.type);case 16:return Na("Lazy");case 13:return Na("Suspense");case 19:return Na("SuspenseList");case 0:case 2:case 15:return et=Pa(et.type,!1),et;case 11:return et=Pa(et.type.render,!1),et;case 22:return et=Pa(et.type._render,!1),et;case 1:return et=Pa(et.type,!0),et;default:return""}}function Ra(et){if(et==null)return null;if(typeof et=="function")return et.displayName||et.name||null;if(typeof et=="string")return et;switch(et){case ua:return"Fragment";case ta:return"Portal";case xa:return"Profiler";case wa:return"StrictMode";case Ba:return"Suspense";case Ca:return"SuspenseList"}if(typeof et=="object")switch(et.$$typeof){case za:return(et.displayName||"Context")+".Consumer";case ya:return(et._context.displayName||"Context")+".Provider";case Aa:var tt=et.render;return tt=tt.displayName||tt.name||"",et.displayName||(tt!==""?"ForwardRef("+tt+")":"ForwardRef");case Da:return Ra(et.type);case Fa:return Ra(et._render);case Ea:tt=et._payload,et=et._init;try{return Ra(et(tt))}catch{}}return null}function Sa(et){switch(typeof et){case"boolean":case"number":case"object":case"string":case"undefined":return et;default:return""}}function Ta(et){var tt=et.type;return(et=et.nodeName)&&et.toLowerCase()==="input"&&(tt==="checkbox"||tt==="radio")}function Ua(et){var tt=Ta(et)?"checked":"value",nt=Object.getOwnPropertyDescriptor(et.constructor.prototype,tt),rt=""+et[tt];if(!et.hasOwnProperty(tt)&&typeof nt<"u"&&typeof nt.get=="function"&&typeof nt.set=="function"){var ot=nt.get,st=nt.set;return Object.defineProperty(et,tt,{configurable:!0,get:function(){return ot.call(this)},set:function(ut){rt=""+ut,st.call(this,ut)}}),Object.defineProperty(et,tt,{enumerable:nt.enumerable}),{getValue:function(){return rt},setValue:function(ut){rt=""+ut},stopTracking:function(){et._valueTracker=null,delete et[tt]}}}}function Va(et){et._valueTracker||(et._valueTracker=Ua(et))}function Wa(et){if(!et)return!1;var tt=et._valueTracker;if(!tt)return!0;var nt=tt.getValue(),rt="";return et&&(rt=Ta(et)?et.checked?"true":"false":et.value),et=rt,et!==nt?(tt.setValue(et),!0):!1}function Xa(et){if(et=et||(typeof document<"u"?document:void 0),typeof et>"u")return null;try{return et.activeElement||et.body}catch{return et.body}}function Ya(et,tt){var nt=tt.checked;return m$5({},tt,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:nt??et._wrapperState.initialChecked})}function Za(et,tt){var nt=tt.defaultValue==null?"":tt.defaultValue,rt=tt.checked!=null?tt.checked:tt.defaultChecked;nt=Sa(tt.value!=null?tt.value:nt),et._wrapperState={initialChecked:rt,initialValue:nt,controlled:tt.type==="checkbox"||tt.type==="radio"?tt.checked!=null:tt.value!=null}}function $a(et,tt){tt=tt.checked,tt!=null&&qa(et,"checked",tt,!1)}function ab$1(et,tt){$a(et,tt);var nt=Sa(tt.value),rt=tt.type;if(nt!=null)rt==="number"?(nt===0&&et.value===""||et.value!=nt)&&(et.value=""+nt):et.value!==""+nt&&(et.value=""+nt);else if(rt==="submit"||rt==="reset"){et.removeAttribute("value");return}tt.hasOwnProperty("value")?bb(et,tt.type,nt):tt.hasOwnProperty("defaultValue")&&bb(et,tt.type,Sa(tt.defaultValue)),tt.checked==null&&tt.defaultChecked!=null&&(et.defaultChecked=!!tt.defaultChecked)}function cb(et,tt,nt){if(tt.hasOwnProperty("value")||tt.hasOwnProperty("defaultValue")){var rt=tt.type;if(!(rt!=="submit"&&rt!=="reset"||tt.value!==void 0&&tt.value!==null))return;tt=""+et._wrapperState.initialValue,nt||tt===et.value||(et.value=tt),et.defaultValue=tt}nt=et.name,nt!==""&&(et.name=""),et.defaultChecked=!!et._wrapperState.initialChecked,nt!==""&&(et.name=nt)}function bb(et,tt,nt){(tt!=="number"||Xa(et.ownerDocument)!==et)&&(nt==null?et.defaultValue=""+et._wrapperState.initialValue:et.defaultValue!==""+nt&&(et.defaultValue=""+nt))}function db(et){var tt="";return aa.Children.forEach(et,function(nt){nt!=null&&(tt+=nt)}),tt}function eb(et,tt){return et=m$5({children:void 0},tt),(tt=db(tt.children))&&(et.children=tt),et}function fb(et,tt,nt,rt){if(et=et.options,tt){tt={};for(var ot=0;ot<nt.length;ot++)tt["$"+nt[ot]]=!0;for(nt=0;nt<et.length;nt++)ot=tt.hasOwnProperty("$"+et[nt].value),et[nt].selected!==ot&&(et[nt].selected=ot),ot&&rt&&(et[nt].defaultSelected=!0)}else{for(nt=""+Sa(nt),tt=null,ot=0;ot<et.length;ot++){if(et[ot].value===nt){et[ot].selected=!0,rt&&(et[ot].defaultSelected=!0);return}tt!==null||et[ot].disabled||(tt=et[ot])}tt!==null&&(tt.selected=!0)}}function gb$1(et,tt){if(tt.dangerouslySetInnerHTML!=null)throw Error(y$7(91));return m$5({},tt,{value:void 0,defaultValue:void 0,children:""+et._wrapperState.initialValue})}function hb(et,tt){var nt=tt.value;if(nt==null){if(nt=tt.children,tt=tt.defaultValue,nt!=null){if(tt!=null)throw Error(y$7(92));if(Array.isArray(nt)){if(!(1>=nt.length))throw Error(y$7(93));nt=nt[0]}tt=nt}tt==null&&(tt=""),nt=tt}et._wrapperState={initialValue:Sa(nt)}}function ib(et,tt){var nt=Sa(tt.value),rt=Sa(tt.defaultValue);nt!=null&&(nt=""+nt,nt!==et.value&&(et.value=nt),tt.defaultValue==null&&et.defaultValue!==nt&&(et.defaultValue=nt)),rt!=null&&(et.defaultValue=""+rt)}function jb(et){var tt=et.textContent;tt===et._wrapperState.initialValue&&tt!==""&&tt!==null&&(et.value=tt)}var kb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function lb(et){switch(et){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 mb$1(et,tt){return et==null||et==="http://www.w3.org/1999/xhtml"?lb(tt):et==="http://www.w3.org/2000/svg"&&tt==="foreignObject"?"http://www.w3.org/1999/xhtml":et}var nb,ob=function(et){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(tt,nt,rt,ot){MSApp.execUnsafeLocalFunction(function(){return et(tt,nt,rt,ot)})}:et}(function(et,tt){if(et.namespaceURI!==kb.svg||"innerHTML"in et)et.innerHTML=tt;else{for(nb=nb||document.createElement("div"),nb.innerHTML="<svg>"+tt.valueOf().toString()+"</svg>",tt=nb.firstChild;et.firstChild;)et.removeChild(et.firstChild);for(;tt.firstChild;)et.appendChild(tt.firstChild)}});function pb(et,tt){if(tt){var nt=et.firstChild;if(nt&&nt===et.lastChild&&nt.nodeType===3){nt.nodeValue=tt;return}}et.textContent=tt}var qb={animationIterationCount:!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},rb=["Webkit","ms","Moz","O"];Object.keys(qb).forEach(function(et){rb.forEach(function(tt){tt=tt+et.charAt(0).toUpperCase()+et.substring(1),qb[tt]=qb[et]})});function sb(et,tt,nt){return tt==null||typeof tt=="boolean"||tt===""?"":nt||typeof tt!="number"||tt===0||qb.hasOwnProperty(et)&&qb[et]?(""+tt).trim():tt+"px"}function tb(et,tt){et=et.style;for(var nt in tt)if(tt.hasOwnProperty(nt)){var rt=nt.indexOf("--")===0,ot=sb(nt,tt[nt],rt);nt==="float"&&(nt="cssFloat"),rt?et.setProperty(nt,ot):et[nt]=ot}}var ub=m$5({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 vb(et,tt){if(tt){if(ub[et]&&(tt.children!=null||tt.dangerouslySetInnerHTML!=null))throw Error(y$7(137,et));if(tt.dangerouslySetInnerHTML!=null){if(tt.children!=null)throw Error(y$7(60));if(!(typeof tt.dangerouslySetInnerHTML=="object"&&"__html"in tt.dangerouslySetInnerHTML))throw Error(y$7(61))}if(tt.style!=null&&typeof tt.style!="object")throw Error(y$7(62))}}function wb(et,tt){if(et.indexOf("-")===-1)return typeof tt.is=="string";switch(et){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}}function xb(et){return et=et.target||et.srcElement||window,et.correspondingUseElement&&(et=et.correspondingUseElement),et.nodeType===3?et.parentNode:et}var yb=null,zb=null,Ab=null;function Bb(et){if(et=Cb(et)){if(typeof yb!="function")throw Error(y$7(280));var tt=et.stateNode;tt&&(tt=Db(tt),yb(et.stateNode,et.type,tt))}}function Eb(et){zb?Ab?Ab.push(et):Ab=[et]:zb=et}function Fb(){if(zb){var et=zb,tt=Ab;if(Ab=zb=null,Bb(et),tt)for(et=0;et<tt.length;et++)Bb(tt[et])}}function Gb(et,tt){return et(tt)}function Hb(et,tt,nt,rt,ot){return et(tt,nt,rt,ot)}function Ib(){}var Jb=Gb,Kb=!1,Lb=!1;function Mb(){(zb!==null||Ab!==null)&&(Ib(),Fb())}function Nb(et,tt,nt){if(Lb)return et(tt,nt);Lb=!0;try{return Jb(et,tt,nt)}finally{Lb=!1,Mb()}}function Ob(et,tt){var nt=et.stateNode;if(nt===null)return null;var rt=Db(nt);if(rt===null)return null;nt=rt[tt];e:switch(tt){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(rt=!rt.disabled)||(et=et.type,rt=!(et==="button"||et==="input"||et==="select"||et==="textarea")),et=!rt;break e;default:et=!1}if(et)return null;if(nt&&typeof nt!="function")throw Error(y$7(231,tt,typeof nt));return nt}var Pb=!1;if(fa)try{var Qb={};Object.defineProperty(Qb,"passive",{get:function(){Pb=!0}}),window.addEventListener("test",Qb,Qb),window.removeEventListener("test",Qb,Qb)}catch{Pb=!1}function Rb(et,tt,nt,rt,ot,st,ut,ct,ft){var pt=Array.prototype.slice.call(arguments,3);try{tt.apply(nt,pt)}catch(ht){this.onError(ht)}}var Sb=!1,Tb=null,Ub=!1,Vb=null,Wb={onError:function(et){Sb=!0,Tb=et}};function Xb(et,tt,nt,rt,ot,st,ut,ct,ft){Sb=!1,Tb=null,Rb.apply(Wb,arguments)}function Yb(et,tt,nt,rt,ot,st,ut,ct,ft){if(Xb.apply(this,arguments),Sb){if(Sb){var pt=Tb;Sb=!1,Tb=null}else throw Error(y$7(198));Ub||(Ub=!0,Vb=pt)}}function Zb(et){var tt=et,nt=et;if(et.alternate)for(;tt.return;)tt=tt.return;else{et=tt;do tt=et,(tt.flags&1026)!==0&&(nt=tt.return),et=tt.return;while(et)}return tt.tag===3?nt:null}function $b(et){if(et.tag===13){var tt=et.memoizedState;if(tt===null&&(et=et.alternate,et!==null&&(tt=et.memoizedState)),tt!==null)return tt.dehydrated}return null}function ac(et){if(Zb(et)!==et)throw Error(y$7(188))}function bc(et){var tt=et.alternate;if(!tt){if(tt=Zb(et),tt===null)throw Error(y$7(188));return tt!==et?null:et}for(var nt=et,rt=tt;;){var ot=nt.return;if(ot===null)break;var st=ot.alternate;if(st===null){if(rt=ot.return,rt!==null){nt=rt;continue}break}if(ot.child===st.child){for(st=ot.child;st;){if(st===nt)return ac(ot),et;if(st===rt)return ac(ot),tt;st=st.sibling}throw Error(y$7(188))}if(nt.return!==rt.return)nt=ot,rt=st;else{for(var ut=!1,ct=ot.child;ct;){if(ct===nt){ut=!0,nt=ot,rt=st;break}if(ct===rt){ut=!0,rt=ot,nt=st;break}ct=ct.sibling}if(!ut){for(ct=st.child;ct;){if(ct===nt){ut=!0,nt=st,rt=ot;break}if(ct===rt){ut=!0,rt=st,nt=ot;break}ct=ct.sibling}if(!ut)throw Error(y$7(189))}}if(nt.alternate!==rt)throw Error(y$7(190))}if(nt.tag!==3)throw Error(y$7(188));return nt.stateNode.current===nt?et:tt}function cc(et){if(et=bc(et),!et)return null;for(var tt=et;;){if(tt.tag===5||tt.tag===6)return tt;if(tt.child)tt.child.return=tt,tt=tt.child;else{if(tt===et)break;for(;!tt.sibling;){if(!tt.return||tt.return===et)return null;tt=tt.return}tt.sibling.return=tt.return,tt=tt.sibling}}return null}function dc(et,tt){for(var nt=et.alternate;tt!==null;){if(tt===et||tt===nt)return!0;tt=tt.return}return!1}var ec,fc,gc,hc,ic=!1,jc=[],kc=null,lc=null,mc$1=null,nc=new Map,oc=new Map,pc=[],qc="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 rc(et,tt,nt,rt,ot){return{blockedOn:et,domEventName:tt,eventSystemFlags:nt|16,nativeEvent:ot,targetContainers:[rt]}}function sc(et,tt){switch(et){case"focusin":case"focusout":kc=null;break;case"dragenter":case"dragleave":lc=null;break;case"mouseover":case"mouseout":mc$1=null;break;case"pointerover":case"pointerout":nc.delete(tt.pointerId);break;case"gotpointercapture":case"lostpointercapture":oc.delete(tt.pointerId)}}function tc(et,tt,nt,rt,ot,st){return et===null||et.nativeEvent!==st?(et=rc(tt,nt,rt,ot,st),tt!==null&&(tt=Cb(tt),tt!==null&&fc(tt)),et):(et.eventSystemFlags|=rt,tt=et.targetContainers,ot!==null&&tt.indexOf(ot)===-1&&tt.push(ot),et)}function uc(et,tt,nt,rt,ot){switch(tt){case"focusin":return kc=tc(kc,et,tt,nt,rt,ot),!0;case"dragenter":return lc=tc(lc,et,tt,nt,rt,ot),!0;case"mouseover":return mc$1=tc(mc$1,et,tt,nt,rt,ot),!0;case"pointerover":var st=ot.pointerId;return nc.set(st,tc(nc.get(st)||null,et,tt,nt,rt,ot)),!0;case"gotpointercapture":return st=ot.pointerId,oc.set(st,tc(oc.get(st)||null,et,tt,nt,rt,ot)),!0}return!1}function vc(et){var tt=wc$1(et.target);if(tt!==null){var nt=Zb(tt);if(nt!==null){if(tt=nt.tag,tt===13){if(tt=$b(nt),tt!==null){et.blockedOn=tt,hc(et.lanePriority,function(){r$5.unstable_runWithPriority(et.priority,function(){gc(nt)})});return}}else if(tt===3&&nt.stateNode.hydrate){et.blockedOn=nt.tag===3?nt.stateNode.containerInfo:null;return}}}et.blockedOn=null}function xc(et){if(et.blockedOn!==null)return!1;for(var tt=et.targetContainers;0<tt.length;){var nt=yc(et.domEventName,et.eventSystemFlags,tt[0],et.nativeEvent);if(nt!==null)return tt=Cb(nt),tt!==null&&fc(tt),et.blockedOn=nt,!1;tt.shift()}return!0}function zc(et,tt,nt){xc(et)&&nt.delete(tt)}function Ac(){for(ic=!1;0<jc.length;){var et=jc[0];if(et.blockedOn!==null){et=Cb(et.blockedOn),et!==null&&ec(et);break}for(var tt=et.targetContainers;0<tt.length;){var nt=yc(et.domEventName,et.eventSystemFlags,tt[0],et.nativeEvent);if(nt!==null){et.blockedOn=nt;break}tt.shift()}et.blockedOn===null&&jc.shift()}kc!==null&&xc(kc)&&(kc=null),lc!==null&&xc(lc)&&(lc=null),mc$1!==null&&xc(mc$1)&&(mc$1=null),nc.forEach(zc),oc.forEach(zc)}function Bc(et,tt){et.blockedOn===tt&&(et.blockedOn=null,ic||(ic=!0,r$5.unstable_scheduleCallback(r$5.unstable_NormalPriority,Ac)))}function Cc(et){function tt(ot){return Bc(ot,et)}if(0<jc.length){Bc(jc[0],et);for(var nt=1;nt<jc.length;nt++){var rt=jc[nt];rt.blockedOn===et&&(rt.blockedOn=null)}}for(kc!==null&&Bc(kc,et),lc!==null&&Bc(lc,et),mc$1!==null&&Bc(mc$1,et),nc.forEach(tt),oc.forEach(tt),nt=0;nt<pc.length;nt++)rt=pc[nt],rt.blockedOn===et&&(rt.blockedOn=null);for(;0<pc.length&&(nt=pc[0],nt.blockedOn===null);)vc(nt),nt.blockedOn===null&&pc.shift()}function Dc(et,tt){var nt={};return nt[et.toLowerCase()]=tt.toLowerCase(),nt["Webkit"+et]="webkit"+tt,nt["Moz"+et]="moz"+tt,nt}var Ec={animationend:Dc("Animation","AnimationEnd"),animationiteration:Dc("Animation","AnimationIteration"),animationstart:Dc("Animation","AnimationStart"),transitionend:Dc("Transition","TransitionEnd")},Fc={},Gc={};fa&&(Gc=document.createElement("div").style,"AnimationEvent"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),"TransitionEvent"in window||delete Ec.transitionend.transition);function Hc(et){if(Fc[et])return Fc[et];if(!Ec[et])return et;var tt=Ec[et],nt;for(nt in tt)if(tt.hasOwnProperty(nt)&&nt in Gc)return Fc[et]=tt[nt];return et}var Ic=Hc("animationend"),Jc=Hc("animationiteration"),Kc=Hc("animationstart"),Lc=Hc("transitionend"),Mc=new Map,Nc=new Map,Oc=["abort","abort",Ic,"animationEnd",Jc,"animationIteration",Kc,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lc,"transitionEnd","waiting","waiting"];function Pc(et,tt){for(var nt=0;nt<et.length;nt+=2){var rt=et[nt],ot=et[nt+1];ot="on"+(ot[0].toUpperCase()+ot.slice(1)),Nc.set(rt,tt),Mc.set(rt,ot),da(ot,[rt])}}var Qc=r$5.unstable_now;Qc();var F$2=8;function Rc(et){if((1&et)!==0)return F$2=15,1;if((2&et)!==0)return F$2=14,2;if((4&et)!==0)return F$2=13,4;var tt=24&et;return tt!==0?(F$2=12,tt):(et&32)!==0?(F$2=11,32):(tt=192&et,tt!==0?(F$2=10,tt):(et&256)!==0?(F$2=9,256):(tt=3584&et,tt!==0?(F$2=8,tt):(et&4096)!==0?(F$2=7,4096):(tt=4186112&et,tt!==0?(F$2=6,tt):(tt=62914560&et,tt!==0?(F$2=5,tt):et&67108864?(F$2=4,67108864):(et&134217728)!==0?(F$2=3,134217728):(tt=805306368&et,tt!==0?(F$2=2,tt):(1073741824&et)!==0?(F$2=1,1073741824):(F$2=8,et))))))}function Sc(et){switch(et){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Tc(et){switch(et){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(y$7(358,et))}}function Uc(et,tt){var nt=et.pendingLanes;if(nt===0)return F$2=0;var rt=0,ot=0,st=et.expiredLanes,ut=et.suspendedLanes,ct=et.pingedLanes;if(st!==0)rt=st,ot=F$2=15;else if(st=nt&134217727,st!==0){var ft=st&~ut;ft!==0?(rt=Rc(ft),ot=F$2):(ct&=st,ct!==0&&(rt=Rc(ct),ot=F$2))}else st=nt&~ut,st!==0?(rt=Rc(st),ot=F$2):ct!==0&&(rt=Rc(ct),ot=F$2);if(rt===0)return 0;if(rt=31-Vc(rt),rt=nt&((0>rt?0:1<<rt)<<1)-1,tt!==0&&tt!==rt&&(tt&ut)===0){if(Rc(tt),ot<=F$2)return tt;F$2=ot}if(tt=et.entangledLanes,tt!==0)for(et=et.entanglements,tt&=rt;0<tt;)nt=31-Vc(tt),ot=1<<nt,rt|=et[nt],tt&=~ot;return rt}function Wc(et){return et=et.pendingLanes&-1073741825,et!==0?et:et&1073741824?1073741824:0}function Xc(et,tt){switch(et){case 15:return 1;case 14:return 2;case 12:return et=Yc(24&~tt),et===0?Xc(10,tt):et;case 10:return et=Yc(192&~tt),et===0?Xc(8,tt):et;case 8:return et=Yc(3584&~tt),et===0&&(et=Yc(4186112&~tt),et===0&&(et=512)),et;case 2:return tt=Yc(805306368&~tt),tt===0&&(tt=268435456),tt}throw Error(y$7(358,et))}function Yc(et){return et&-et}function Zc(et){for(var tt=[],nt=0;31>nt;nt++)tt.push(et);return tt}function $c(et,tt,nt){et.pendingLanes|=tt;var rt=tt-1;et.suspendedLanes&=rt,et.pingedLanes&=rt,et=et.eventTimes,tt=31-Vc(tt),et[tt]=nt}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd$1=Math.LN2;function ad(et){return et===0?32:31-(bd(et)/cd$1|0)|0}var dd$1=r$5.unstable_UserBlockingPriority,ed=r$5.unstable_runWithPriority,fd=!0;function gd(et,tt,nt,rt){Kb||Ib();var ot=hd,st=Kb;Kb=!0;try{Hb(ot,et,tt,nt,rt)}finally{(Kb=st)||Mb()}}function id$2(et,tt,nt,rt){ed(dd$1,hd.bind(null,et,tt,nt,rt))}function hd(et,tt,nt,rt){if(fd){var ot;if((ot=(tt&4)===0)&&0<jc.length&&-1<qc.indexOf(et))et=rc(null,et,tt,nt,rt),jc.push(et);else{var st=yc(et,tt,nt,rt);if(st===null)ot&&sc(et,rt);else{if(ot){if(-1<qc.indexOf(et)){et=rc(st,et,tt,nt,rt),jc.push(et);return}if(uc(st,et,tt,nt,rt))return;sc(et,rt)}jd(et,tt,rt,null,nt)}}}}function yc(et,tt,nt,rt){var ot=xb(rt);if(ot=wc$1(ot),ot!==null){var st=Zb(ot);if(st===null)ot=null;else{var ut=st.tag;if(ut===13){if(ot=$b(st),ot!==null)return ot;ot=null}else if(ut===3){if(st.stateNode.hydrate)return st.tag===3?st.stateNode.containerInfo:null;ot=null}else st!==ot&&(ot=null)}}return jd(et,tt,rt,ot,nt),null}var kd=null,ld=null,md$1=null;function nd(){if(md$1)return md$1;var et,tt=ld,nt=tt.length,rt,ot="value"in kd?kd.value:kd.textContent,st=ot.length;for(et=0;et<nt&&tt[et]===ot[et];et++);var ut=nt-et;for(rt=1;rt<=ut&&tt[nt-rt]===ot[st-rt];rt++);return md$1=ot.slice(et,1<rt?1-rt:void 0)}function od(et){var tt=et.keyCode;return"charCode"in et?(et=et.charCode,et===0&&tt===13&&(et=13)):et=tt,et===10&&(et=13),32<=et||et===13?et:0}function pd(){return!0}function qd(){return!1}function rd(et){function tt(nt,rt,ot,st,ut){this._reactName=nt,this._targetInst=ot,this.type=rt,this.nativeEvent=st,this.target=ut,this.currentTarget=null;for(var ct in et)et.hasOwnProperty(ct)&&(nt=et[ct],this[ct]=nt?nt(st):st[ct]);return this.isDefaultPrevented=(st.defaultPrevented!=null?st.defaultPrevented:st.returnValue===!1)?pd:qd,this.isPropagationStopped=qd,this}return m$5(tt.prototype,{preventDefault:function(){this.defaultPrevented=!0;var nt=this.nativeEvent;nt&&(nt.preventDefault?nt.preventDefault():typeof nt.returnValue!="unknown"&&(nt.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var nt=this.nativeEvent;nt&&(nt.stopPropagation?nt.stopPropagation():typeof nt.cancelBubble!="unknown"&&(nt.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),tt}var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(et){return et.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=m$5({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=m$5({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(et){return et.relatedTarget===void 0?et.fromElement===et.srcElement?et.toElement:et.fromElement:et.relatedTarget},movementX:function(et){return"movementX"in et?et.movementX:(et!==yd&&(yd&&et.type==="mousemove"?(wd=et.screenX-yd.screenX,xd=et.screenY-yd.screenY):xd=wd=0,yd=et),wd)},movementY:function(et){return"movementY"in et?et.movementY:xd}}),Bd=rd(Ad),Cd=m$5({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=m$5({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=m$5({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=m$5({},sd,{clipboardData:function(et){return"clipboardData"in et?et.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=m$5({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={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"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(et){var tt=this.nativeEvent;return tt.getModifierState?tt.getModifierState(et):(et=Od[et])?!!tt[et]:!1}function zd(){return Pd}var Qd=m$5({},ud,{key:function(et){if(et.key){var tt=Md[et.key]||et.key;if(tt!=="Unidentified")return tt}return et.type==="keypress"?(et=od(et),et===13?"Enter":String.fromCharCode(et)):et.type==="keydown"||et.type==="keyup"?Nd[et.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(et){return et.type==="keypress"?od(et):0},keyCode:function(et){return et.type==="keydown"||et.type==="keyup"?et.keyCode:0},which:function(et){return et.type==="keypress"?od(et):et.type==="keydown"||et.type==="keyup"?et.keyCode:0}}),Rd=rd(Qd),Sd=m$5({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=m$5({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=m$5({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=m$5({},Ad,{deltaX:function(et){return"deltaX"in et?et.deltaX:"wheelDeltaX"in et?-et.wheelDeltaX:0},deltaY:function(et){return"deltaY"in et?et.deltaY:"wheelDeltaY"in et?-et.wheelDeltaY:"wheelDelta"in et?-et.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae$1=fa&&"CompositionEvent"in window,be$1=null;fa&&"documentMode"in document&&(be$1=document.documentMode);var ce$1=fa&&"TextEvent"in window&&!be$1,de$2=fa&&(!ae$1||be$1&&8<be$1&&11>=be$1),ee$1=String.fromCharCode(32),fe$1=!1;function ge$1(et,tt){switch(et){case"keyup":return $d.indexOf(tt.keyCode)!==-1;case"keydown":return tt.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he$1(et){return et=et.detail,typeof et=="object"&&"data"in et?et.data:null}var ie$1=!1;function je$1(et,tt){switch(et){case"compositionend":return he$1(tt);case"keypress":return tt.which!==32?null:(fe$1=!0,ee$1);case"textInput":return et=tt.data,et===ee$1&&fe$1?null:et;default:return null}}function ke$1(et,tt){if(ie$1)return et==="compositionend"||!ae$1&&ge$1(et,tt)?(et=nd(),md$1=ld=kd=null,ie$1=!1,et):null;switch(et){case"paste":return null;case"keypress":if(!(tt.ctrlKey||tt.altKey||tt.metaKey)||tt.ctrlKey&&tt.altKey){if(tt.char&&1<tt.char.length)return tt.char;if(tt.which)return String.fromCharCode(tt.which)}return null;case"compositionend":return de$2&&tt.locale!=="ko"?null:tt.data;default:return null}}var le={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 me$1(et){var tt=et&&et.nodeName&&et.nodeName.toLowerCase();return tt==="input"?!!le[et.type]:tt==="textarea"}function ne$1(et,tt,nt,rt){Eb(rt),tt=oe$1(tt,"onChange"),0<tt.length&&(nt=new td("onChange","change",null,nt,rt),et.push({event:nt,listeners:tt}))}var pe$1=null,qe$1=null;function re$4(et){se$1(et,0)}function te$1(et){var tt=ue$1(et);if(Wa(tt))return et}function ve$1(et,tt){if(et==="change")return tt}var we$1=!1;if(fa){var xe$1;if(fa){var ye="oninput"in document;if(!ye){var ze$1=document.createElement("div");ze$1.setAttribute("oninput","return;"),ye=typeof ze$1.oninput=="function"}xe$1=ye}else xe$1=!1;we$1=xe$1&&(!document.documentMode||9<document.documentMode)}function Ae$1(){pe$1&&(pe$1.detachEvent("onpropertychange",Be$1),qe$1=pe$1=null)}function Be$1(et){if(et.propertyName==="value"&&te$1(qe$1)){var tt=[];if(ne$1(tt,qe$1,et,xb(et)),et=re$4,Kb)et(tt);else{Kb=!0;try{Gb(et,tt)}finally{Kb=!1,Mb()}}}}function Ce$1(et,tt,nt){et==="focusin"?(Ae$1(),pe$1=tt,qe$1=nt,pe$1.attachEvent("onpropertychange",Be$1)):et==="focusout"&&Ae$1()}function De$1(et){if(et==="selectionchange"||et==="keyup"||et==="keydown")return te$1(qe$1)}function Ee$1(et,tt){if(et==="click")return te$1(tt)}function Fe$1(et,tt){if(et==="input"||et==="change")return te$1(tt)}function Ge$1(et,tt){return et===tt&&(et!==0||1/et===1/tt)||et!==et&&tt!==tt}var He$1=typeof Object.is=="function"?Object.is:Ge$1,Ie=Object.prototype.hasOwnProperty;function Je(et,tt){if(He$1(et,tt))return!0;if(typeof et!="object"||et===null||typeof tt!="object"||tt===null)return!1;var nt=Object.keys(et),rt=Object.keys(tt);if(nt.length!==rt.length)return!1;for(rt=0;rt<nt.length;rt++)if(!Ie.call(tt,nt[rt])||!He$1(et[nt[rt]],tt[nt[rt]]))return!1;return!0}function Ke(et){for(;et&&et.firstChild;)et=et.firstChild;return et}function Le(et,tt){var nt=Ke(et);et=0;for(var rt;nt;){if(nt.nodeType===3){if(rt=et+nt.textContent.length,et<=tt&&rt>=tt)return{node:nt,offset:tt-et};et=rt}e:{for(;nt;){if(nt.nextSibling){nt=nt.nextSibling;break e}nt=nt.parentNode}nt=void 0}nt=Ke(nt)}}function Me$1(et,tt){return et&&tt?et===tt?!0:et&&et.nodeType===3?!1:tt&&tt.nodeType===3?Me$1(et,tt.parentNode):"contains"in et?et.contains(tt):et.compareDocumentPosition?!!(et.compareDocumentPosition(tt)&16):!1:!1}function Ne$1(){for(var et=window,tt=Xa();tt instanceof et.HTMLIFrameElement;){try{var nt=typeof tt.contentWindow.location.href=="string"}catch{nt=!1}if(nt)et=tt.contentWindow;else break;tt=Xa(et.document)}return tt}function Oe(et){var tt=et&&et.nodeName&&et.nodeName.toLowerCase();return tt&&(tt==="input"&&(et.type==="text"||et.type==="search"||et.type==="tel"||et.type==="url"||et.type==="password")||tt==="textarea"||et.contentEditable==="true")}var Pe=fa&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re$1=null,Se$1=null,Te$1=!1;function Ue$1(et,tt,nt){var rt=nt.window===nt?nt.document:nt.nodeType===9?nt:nt.ownerDocument;Te$1||Qe==null||Qe!==Xa(rt)||(rt=Qe,"selectionStart"in rt&&Oe(rt)?rt={start:rt.selectionStart,end:rt.selectionEnd}:(rt=(rt.ownerDocument&&rt.ownerDocument.defaultView||window).getSelection(),rt={anchorNode:rt.anchorNode,anchorOffset:rt.anchorOffset,focusNode:rt.focusNode,focusOffset:rt.focusOffset}),Se$1&&Je(Se$1,rt)||(Se$1=rt,rt=oe$1(Re$1,"onSelect"),0<rt.length&&(tt=new td("onSelect","select",null,tt,nt),et.push({event:tt,listeners:rt}),tt.target=Qe)))}Pc("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);Pc("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Pc(Oc,2);for(var Ve$1="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),We$1=0;We$1<Ve$1.length;We$1++)Nc.set(Ve$1[We$1],0);ea$1("onMouseEnter",["mouseout","mouseover"]);ea$1("onMouseLeave",["mouseout","mouseover"]);ea$1("onPointerEnter",["pointerout","pointerover"]);ea$1("onPointerLeave",["pointerout","pointerover"]);da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));da("onBeforeInput",["compositionend","keypress","textInput","paste"]);da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye$1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xe));function Ze(et,tt,nt){var rt=et.type||"unknown-event";et.currentTarget=nt,Yb(rt,tt,void 0,et),et.currentTarget=null}function se$1(et,tt){tt=(tt&4)!==0;for(var nt=0;nt<et.length;nt++){var rt=et[nt],ot=rt.event;rt=rt.listeners;e:{var st=void 0;if(tt)for(var ut=rt.length-1;0<=ut;ut--){var ct=rt[ut],ft=ct.instance,pt=ct.currentTarget;if(ct=ct.listener,ft!==st&&ot.isPropagationStopped())break e;Ze(ot,ct,pt),st=ft}else for(ut=0;ut<rt.length;ut++){if(ct=rt[ut],ft=ct.instance,pt=ct.currentTarget,ct=ct.listener,ft!==st&&ot.isPropagationStopped())break e;Ze(ot,ct,pt),st=ft}}}if(Ub)throw et=Vb,Ub=!1,Vb=null,et}function G$3(et,tt){var nt=$e$1(tt),rt=et+"__bubble";nt.has(rt)||(af(tt,et,2,!1),nt.add(rt))}var bf="_reactListening"+Math.random().toString(36).slice(2);function cf(et){et[bf]||(et[bf]=!0,ba.forEach(function(tt){Ye$1.has(tt)||df(tt,!1,et,null),df(tt,!0,et,null)}))}function df(et,tt,nt,rt){var ot=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,st=nt;if(et==="selectionchange"&&nt.nodeType!==9&&(st=nt.ownerDocument),rt!==null&&!tt&&Ye$1.has(et)){if(et!=="scroll")return;ot|=2,st=rt}var ut=$e$1(st),ct=et+"__"+(tt?"capture":"bubble");ut.has(ct)||(tt&&(ot|=4),af(st,et,ot,tt),ut.add(ct))}function af(et,tt,nt,rt){var ot=Nc.get(tt);switch(ot===void 0?2:ot){case 0:ot=gd;break;case 1:ot=id$2;break;default:ot=hd}nt=ot.bind(null,tt,nt,et),ot=void 0,!Pb||tt!=="touchstart"&&tt!=="touchmove"&&tt!=="wheel"||(ot=!0),rt?ot!==void 0?et.addEventListener(tt,nt,{capture:!0,passive:ot}):et.addEventListener(tt,nt,!0):ot!==void 0?et.addEventListener(tt,nt,{passive:ot}):et.addEventListener(tt,nt,!1)}function jd(et,tt,nt,rt,ot){var st=rt;if((tt&1)===0&&(tt&2)===0&&rt!==null)e:for(;;){if(rt===null)return;var ut=rt.tag;if(ut===3||ut===4){var ct=rt.stateNode.containerInfo;if(ct===ot||ct.nodeType===8&&ct.parentNode===ot)break;if(ut===4)for(ut=rt.return;ut!==null;){var ft=ut.tag;if((ft===3||ft===4)&&(ft=ut.stateNode.containerInfo,ft===ot||ft.nodeType===8&&ft.parentNode===ot))return;ut=ut.return}for(;ct!==null;){if(ut=wc$1(ct),ut===null)return;if(ft=ut.tag,ft===5||ft===6){rt=st=ut;continue e}ct=ct.parentNode}}rt=rt.return}Nb(function(){var pt=st,ht=xb(nt),mt=[];e:{var yt=Mc.get(et);if(yt!==void 0){var vt=td,Tt=et;switch(et){case"keypress":if(od(nt)===0)break e;case"keydown":case"keyup":vt=Rd;break;case"focusin":Tt="focus",vt=Fd;break;case"focusout":Tt="blur",vt=Fd;break;case"beforeblur":case"afterblur":vt=Fd;break;case"click":if(nt.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":vt=Bd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":vt=Dd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":vt=Vd;break;case Ic:case Jc:case Kc:vt=Hd;break;case Lc:vt=Xd;break;case"scroll":vt=vd;break;case"wheel":vt=Zd;break;case"copy":case"cut":case"paste":vt=Jd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":vt=Td}var Et=(tt&4)!==0,xt=!Et&&et==="scroll",At=Et?yt!==null?yt+"Capture":null:yt;Et=[];for(var Ct=pt,$t;Ct!==null;){$t=Ct;var Ot=$t.stateNode;if($t.tag===5&&Ot!==null&&($t=Ot,At!==null&&(Ot=Ob(Ct,At),Ot!=null&&Et.push(ef(Ct,Ot,$t)))),xt)break;Ct=Ct.return}0<Et.length&&(yt=new vt(yt,Tt,null,nt,ht),mt.push({event:yt,listeners:Et}))}}if((tt&7)===0){e:{if(yt=et==="mouseover"||et==="pointerover",vt=et==="mouseout"||et==="pointerout",yt&&(tt&16)===0&&(Tt=nt.relatedTarget||nt.fromElement)&&(wc$1(Tt)||Tt[ff]))break e;if((vt||yt)&&(yt=ht.window===ht?ht:(yt=ht.ownerDocument)?yt.defaultView||yt.parentWindow:window,vt?(Tt=nt.relatedTarget||nt.toElement,vt=pt,Tt=Tt?wc$1(Tt):null,Tt!==null&&(xt=Zb(Tt),Tt!==xt||Tt.tag!==5&&Tt.tag!==6)&&(Tt=null)):(vt=null,Tt=pt),vt!==Tt)){if(Et=Bd,Ot="onMouseLeave",At="onMouseEnter",Ct="mouse",(et==="pointerout"||et==="pointerover")&&(Et=Td,Ot="onPointerLeave",At="onPointerEnter",Ct="pointer"),xt=vt==null?yt:ue$1(vt),$t=Tt==null?yt:ue$1(Tt),yt=new Et(Ot,Ct+"leave",vt,nt,ht),yt.target=xt,yt.relatedTarget=$t,Ot=null,wc$1(ht)===pt&&(Et=new Et(At,Ct+"enter",Tt,nt,ht),Et.target=$t,Et.relatedTarget=xt,Ot=Et),xt=Ot,vt&&Tt)t:{for(Et=vt,At=Tt,Ct=0,$t=Et;$t;$t=gf($t))Ct++;for($t=0,Ot=At;Ot;Ot=gf(Ot))$t++;for(;0<Ct-$t;)Et=gf(Et),Ct--;for(;0<$t-Ct;)At=gf(At),$t--;for(;Ct--;){if(Et===At||At!==null&&Et===At.alternate)break t;Et=gf(Et),At=gf(At)}Et=null}else Et=null;vt!==null&&hf(mt,yt,vt,Et,!1),Tt!==null&&xt!==null&&hf(mt,xt,Tt,Et,!0)}}e:{if(yt=pt?ue$1(pt):window,vt=yt.nodeName&&yt.nodeName.toLowerCase(),vt==="select"||vt==="input"&&yt.type==="file")var Rt=ve$1;else if(me$1(yt))if(we$1)Rt=Fe$1;else{Rt=De$1;var It=Ce$1}else(vt=yt.nodeName)&&vt.toLowerCase()==="input"&&(yt.type==="checkbox"||yt.type==="radio")&&(Rt=Ee$1);if(Rt&&(Rt=Rt(et,pt))){ne$1(mt,Rt,nt,ht);break e}It&&It(et,yt,pt),et==="focusout"&&(It=yt._wrapperState)&&It.controlled&&yt.type==="number"&&bb(yt,"number",yt.value)}switch(It=pt?ue$1(pt):window,et){case"focusin":(me$1(It)||It.contentEditable==="true")&&(Qe=It,Re$1=pt,Se$1=null);break;case"focusout":Se$1=Re$1=Qe=null;break;case"mousedown":Te$1=!0;break;case"contextmenu":case"mouseup":case"dragend":Te$1=!1,Ue$1(mt,nt,ht);break;case"selectionchange":if(Pe)break;case"keydown":case"keyup":Ue$1(mt,nt,ht)}var kt;if(ae$1)e:{switch(et){case"compositionstart":var Mt="onCompositionStart";break e;case"compositionend":Mt="onCompositionEnd";break e;case"compositionupdate":Mt="onCompositionUpdate";break e}Mt=void 0}else ie$1?ge$1(et,nt)&&(Mt="onCompositionEnd"):et==="keydown"&&nt.keyCode===229&&(Mt="onCompositionStart");Mt&&(de$2&&nt.locale!=="ko"&&(ie$1||Mt!=="onCompositionStart"?Mt==="onCompositionEnd"&&ie$1&&(kt=nd()):(kd=ht,ld="value"in kd?kd.value:kd.textContent,ie$1=!0)),It=oe$1(pt,Mt),0<It.length&&(Mt=new Ld(Mt,et,null,nt,ht),mt.push({event:Mt,listeners:It}),kt?Mt.data=kt:(kt=he$1(nt),kt!==null&&(Mt.data=kt)))),(kt=ce$1?je$1(et,nt):ke$1(et,nt))&&(pt=oe$1(pt,"onBeforeInput"),0<pt.length&&(ht=new Ld("onBeforeInput","beforeinput",null,nt,ht),mt.push({event:ht,listeners:pt}),ht.data=kt))}se$1(mt,tt)})}function ef(et,tt,nt){return{instance:et,listener:tt,currentTarget:nt}}function oe$1(et,tt){for(var nt=tt+"Capture",rt=[];et!==null;){var ot=et,st=ot.stateNode;ot.tag===5&&st!==null&&(ot=st,st=Ob(et,nt),st!=null&&rt.unshift(ef(et,st,ot)),st=Ob(et,tt),st!=null&&rt.push(ef(et,st,ot))),et=et.return}return rt}function gf(et){if(et===null)return null;do et=et.return;while(et&&et.tag!==5);return et||null}function hf(et,tt,nt,rt,ot){for(var st=tt._reactName,ut=[];nt!==null&&nt!==rt;){var ct=nt,ft=ct.alternate,pt=ct.stateNode;if(ft!==null&&ft===rt)break;ct.tag===5&&pt!==null&&(ct=pt,ot?(ft=Ob(nt,st),ft!=null&&ut.unshift(ef(nt,ft,ct))):ot||(ft=Ob(nt,st),ft!=null&&ut.push(ef(nt,ft,ct)))),nt=nt.return}ut.length!==0&&et.push({event:tt,listeners:ut})}function jf(){}var kf=null,lf=null;function mf(et,tt){switch(et){case"button":case"input":case"select":case"textarea":return!!tt.autoFocus}return!1}function nf(et,tt){return et==="textarea"||et==="option"||et==="noscript"||typeof tt.children=="string"||typeof tt.children=="number"||typeof tt.dangerouslySetInnerHTML=="object"&&tt.dangerouslySetInnerHTML!==null&&tt.dangerouslySetInnerHTML.__html!=null}var of=typeof setTimeout=="function"?setTimeout:void 0,pf=typeof clearTimeout=="function"?clearTimeout:void 0;function qf(et){et.nodeType===1?et.textContent="":et.nodeType===9&&(et=et.body,et!=null&&(et.textContent=""))}function rf(et){for(;et!=null;et=et.nextSibling){var tt=et.nodeType;if(tt===1||tt===3)break}return et}function sf(et){et=et.previousSibling;for(var tt=0;et;){if(et.nodeType===8){var nt=et.data;if(nt==="$"||nt==="$!"||nt==="$?"){if(tt===0)return et;tt--}else nt==="/$"&&tt++}et=et.previousSibling}return null}var tf=0;function uf(et){return{$$typeof:Ga,toString:et,valueOf:et}}var vf=Math.random().toString(36).slice(2),wf="__reactFiber$"+vf,xf$1="__reactProps$"+vf,ff="__reactContainer$"+vf,yf="__reactEvents$"+vf;function wc$1(et){var tt=et[wf];if(tt)return tt;for(var nt=et.parentNode;nt;){if(tt=nt[ff]||nt[wf]){if(nt=tt.alternate,tt.child!==null||nt!==null&&nt.child!==null)for(et=sf(et);et!==null;){if(nt=et[wf])return nt;et=sf(et)}return tt}et=nt,nt=et.parentNode}return null}function Cb(et){return et=et[wf]||et[ff],!et||et.tag!==5&&et.tag!==6&&et.tag!==13&&et.tag!==3?null:et}function ue$1(et){if(et.tag===5||et.tag===6)return et.stateNode;throw Error(y$7(33))}function Db(et){return et[xf$1]||null}function $e$1(et){var tt=et[yf];return tt===void 0&&(tt=et[yf]=new Set),tt}var zf=[],Af=-1;function Bf(et){return{current:et}}function H$3(et){0>Af||(et.current=zf[Af],zf[Af]=null,Af--)}function I$3(et,tt){Af++,zf[Af]=et.current,et.current=tt}var Cf={},M$3=Bf(Cf),N$2=Bf(!1),Df=Cf;function Ef(et,tt){var nt=et.type.contextTypes;if(!nt)return Cf;var rt=et.stateNode;if(rt&&rt.__reactInternalMemoizedUnmaskedChildContext===tt)return rt.__reactInternalMemoizedMaskedChildContext;var ot={},st;for(st in nt)ot[st]=tt[st];return rt&&(et=et.stateNode,et.__reactInternalMemoizedUnmaskedChildContext=tt,et.__reactInternalMemoizedMaskedChildContext=ot),ot}function Ff(et){return et=et.childContextTypes,et!=null}function Gf(){H$3(N$2),H$3(M$3)}function Hf(et,tt,nt){if(M$3.current!==Cf)throw Error(y$7(168));I$3(M$3,tt),I$3(N$2,nt)}function If(et,tt,nt){var rt=et.stateNode;if(et=tt.childContextTypes,typeof rt.getChildContext!="function")return nt;rt=rt.getChildContext();for(var ot in rt)if(!(ot in et))throw Error(y$7(108,Ra(tt)||"Unknown",ot));return m$5({},nt,rt)}function Jf(et){return et=(et=et.stateNode)&&et.__reactInternalMemoizedMergedChildContext||Cf,Df=M$3.current,I$3(M$3,et),I$3(N$2,N$2.current),!0}function Kf(et,tt,nt){var rt=et.stateNode;if(!rt)throw Error(y$7(169));nt?(et=If(et,tt,Df),rt.__reactInternalMemoizedMergedChildContext=et,H$3(N$2),H$3(M$3),I$3(M$3,et)):H$3(N$2),I$3(N$2,nt)}var Lf=null,Mf=null,Nf=r$5.unstable_runWithPriority,Of=r$5.unstable_scheduleCallback,Pf=r$5.unstable_cancelCallback,Qf=r$5.unstable_shouldYield,Rf=r$5.unstable_requestPaint,Sf=r$5.unstable_now,Tf=r$5.unstable_getCurrentPriorityLevel,Uf=r$5.unstable_ImmediatePriority,Vf=r$5.unstable_UserBlockingPriority,Wf=r$5.unstable_NormalPriority,Xf=r$5.unstable_LowPriority,Yf=r$5.unstable_IdlePriority,Zf={},$f=Rf!==void 0?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O$2=1e4>dg?Sf:function(){return Sf()-dg};function eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y$7(332))}}function fg(et){switch(et){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y$7(332))}}function gg(et,tt){return et=fg(et),Nf(et,tt)}function hg(et,tt,nt){return et=fg(et),Of(et,tt,nt)}function ig(){if(bg!==null){var et=bg;bg=null,Pf(et)}jg()}function jg(){if(!cg&&ag!==null){cg=!0;var et=0;try{var tt=ag;gg(99,function(){for(;et<tt.length;et++){var nt=tt[et];do nt=nt(!0);while(nt!==null)}}),ag=null}catch(nt){throw ag!==null&&(ag=ag.slice(et+1)),Of(Uf,ig),nt}finally{cg=!1}}}var kg=ra.ReactCurrentBatchConfig;function lg(et,tt){if(et&&et.defaultProps){tt=m$5({},tt),et=et.defaultProps;for(var nt in et)tt[nt]===void 0&&(tt[nt]=et[nt]);return tt}return tt}var mg=Bf(null),ng$1=null,og=null,pg=null;function qg(){pg=og=ng$1=null}function rg(et){var tt=mg.current;H$3(mg),et.type._context._currentValue=tt}function sg(et,tt){for(;et!==null;){var nt=et.alternate;if((et.childLanes&tt)===tt){if(nt===null||(nt.childLanes&tt)===tt)break;nt.childLanes|=tt}else et.childLanes|=tt,nt!==null&&(nt.childLanes|=tt);et=et.return}}function tg(et,tt){ng$1=et,pg=og=null,et=et.dependencies,et!==null&&et.firstContext!==null&&((et.lanes&tt)!==0&&(ug=!0),et.firstContext=null)}function vg(et,tt){if(pg!==et&&tt!==!1&&tt!==0)if((typeof tt!="number"||tt===1073741823)&&(pg=et,tt=1073741823),tt={context:et,observedBits:tt,next:null},og===null){if(ng$1===null)throw Error(y$7(308));og=tt,ng$1.dependencies={lanes:0,firstContext:tt,responders:null}}else og=og.next=tt;return et._currentValue}var wg=!1;function xg(et){et.updateQueue={baseState:et.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function yg(et,tt){et=et.updateQueue,tt.updateQueue===et&&(tt.updateQueue={baseState:et.baseState,firstBaseUpdate:et.firstBaseUpdate,lastBaseUpdate:et.lastBaseUpdate,shared:et.shared,effects:et.effects})}function zg(et,tt){return{eventTime:et,lane:tt,tag:0,payload:null,callback:null,next:null}}function Ag(et,tt){if(et=et.updateQueue,et!==null){et=et.shared;var nt=et.pending;nt===null?tt.next=tt:(tt.next=nt.next,nt.next=tt),et.pending=tt}}function Bg(et,tt){var nt=et.updateQueue,rt=et.alternate;if(rt!==null&&(rt=rt.updateQueue,nt===rt)){var ot=null,st=null;if(nt=nt.firstBaseUpdate,nt!==null){do{var ut={eventTime:nt.eventTime,lane:nt.lane,tag:nt.tag,payload:nt.payload,callback:nt.callback,next:null};st===null?ot=st=ut:st=st.next=ut,nt=nt.next}while(nt!==null);st===null?ot=st=tt:st=st.next=tt}else ot=st=tt;nt={baseState:rt.baseState,firstBaseUpdate:ot,lastBaseUpdate:st,shared:rt.shared,effects:rt.effects},et.updateQueue=nt;return}et=nt.lastBaseUpdate,et===null?nt.firstBaseUpdate=tt:et.next=tt,nt.lastBaseUpdate=tt}function Cg(et,tt,nt,rt){var ot=et.updateQueue;wg=!1;var st=ot.firstBaseUpdate,ut=ot.lastBaseUpdate,ct=ot.shared.pending;if(ct!==null){ot.shared.pending=null;var ft=ct,pt=ft.next;ft.next=null,ut===null?st=pt:ut.next=pt,ut=ft;var ht=et.alternate;if(ht!==null){ht=ht.updateQueue;var mt=ht.lastBaseUpdate;mt!==ut&&(mt===null?ht.firstBaseUpdate=pt:mt.next=pt,ht.lastBaseUpdate=ft)}}if(st!==null){mt=ot.baseState,ut=0,ht=pt=ft=null;do{ct=st.lane;var yt=st.eventTime;if((rt&ct)===ct){ht!==null&&(ht=ht.next={eventTime:yt,lane:0,tag:st.tag,payload:st.payload,callback:st.callback,next:null});e:{var vt=et,Tt=st;switch(ct=tt,yt=nt,Tt.tag){case 1:if(vt=Tt.payload,typeof vt=="function"){mt=vt.call(yt,mt,ct);break e}mt=vt;break e;case 3:vt.flags=vt.flags&-4097|64;case 0:if(vt=Tt.payload,ct=typeof vt=="function"?vt.call(yt,mt,ct):vt,ct==null)break e;mt=m$5({},mt,ct);break e;case 2:wg=!0}}st.callback!==null&&(et.flags|=32,ct=ot.effects,ct===null?ot.effects=[st]:ct.push(st))}else yt={eventTime:yt,lane:ct,tag:st.tag,payload:st.payload,callback:st.callback,next:null},ht===null?(pt=ht=yt,ft=mt):ht=ht.next=yt,ut|=ct;if(st=st.next,st===null){if(ct=ot.shared.pending,ct===null)break;st=ct.next,ct.next=null,ot.lastBaseUpdate=ct,ot.shared.pending=null}}while(1);ht===null&&(ft=mt),ot.baseState=ft,ot.firstBaseUpdate=pt,ot.lastBaseUpdate=ht,Dg|=ut,et.lanes=ut,et.memoizedState=mt}}function Eg(et,tt,nt){if(et=tt.effects,tt.effects=null,et!==null)for(tt=0;tt<et.length;tt++){var rt=et[tt],ot=rt.callback;if(ot!==null){if(rt.callback=null,rt=nt,typeof ot!="function")throw Error(y$7(191,ot));ot.call(rt)}}}var Fg=new aa.Component().refs;function Gg(et,tt,nt,rt){tt=et.memoizedState,nt=nt(rt,tt),nt=nt==null?tt:m$5({},tt,nt),et.memoizedState=nt,et.lanes===0&&(et.updateQueue.baseState=nt)}var Kg={isMounted:function(et){return(et=et._reactInternals)?Zb(et)===et:!1},enqueueSetState:function(et,tt,nt){et=et._reactInternals;var rt=Hg(),ot=Ig(et),st=zg(rt,ot);st.payload=tt,nt!=null&&(st.callback=nt),Ag(et,st),Jg(et,ot,rt)},enqueueReplaceState:function(et,tt,nt){et=et._reactInternals;var rt=Hg(),ot=Ig(et),st=zg(rt,ot);st.tag=1,st.payload=tt,nt!=null&&(st.callback=nt),Ag(et,st),Jg(et,ot,rt)},enqueueForceUpdate:function(et,tt){et=et._reactInternals;var nt=Hg(),rt=Ig(et),ot=zg(nt,rt);ot.tag=2,tt!=null&&(ot.callback=tt),Ag(et,ot),Jg(et,rt,nt)}};function Lg(et,tt,nt,rt,ot,st,ut){return et=et.stateNode,typeof et.shouldComponentUpdate=="function"?et.shouldComponentUpdate(rt,st,ut):tt.prototype&&tt.prototype.isPureReactComponent?!Je(nt,rt)||!Je(ot,st):!0}function Mg(et,tt,nt){var rt=!1,ot=Cf,st=tt.contextType;return typeof st=="object"&&st!==null?st=vg(st):(ot=Ff(tt)?Df:M$3.current,rt=tt.contextTypes,st=(rt=rt!=null)?Ef(et,ot):Cf),tt=new tt(nt,st),et.memoizedState=tt.state!==null&&tt.state!==void 0?tt.state:null,tt.updater=Kg,et.stateNode=tt,tt._reactInternals=et,rt&&(et=et.stateNode,et.__reactInternalMemoizedUnmaskedChildContext=ot,et.__reactInternalMemoizedMaskedChildContext=st),tt}function Ng(et,tt,nt,rt){et=tt.state,typeof tt.componentWillReceiveProps=="function"&&tt.componentWillReceiveProps(nt,rt),typeof tt.UNSAFE_componentWillReceiveProps=="function"&&tt.UNSAFE_componentWillReceiveProps(nt,rt),tt.state!==et&&Kg.enqueueReplaceState(tt,tt.state,null)}function Og(et,tt,nt,rt){var ot=et.stateNode;ot.props=nt,ot.state=et.memoizedState,ot.refs=Fg,xg(et);var st=tt.contextType;typeof st=="object"&&st!==null?ot.context=vg(st):(st=Ff(tt)?Df:M$3.current,ot.context=Ef(et,st)),Cg(et,nt,ot,rt),ot.state=et.memoizedState,st=tt.getDerivedStateFromProps,typeof st=="function"&&(Gg(et,tt,st,nt),ot.state=et.memoizedState),typeof tt.getDerivedStateFromProps=="function"||typeof ot.getSnapshotBeforeUpdate=="function"||typeof ot.UNSAFE_componentWillMount!="function"&&typeof ot.componentWillMount!="function"||(tt=ot.state,typeof ot.componentWillMount=="function"&&ot.componentWillMount(),typeof ot.UNSAFE_componentWillMount=="function"&&ot.UNSAFE_componentWillMount(),tt!==ot.state&&Kg.enqueueReplaceState(ot,ot.state,null),Cg(et,nt,ot,rt),ot.state=et.memoizedState),typeof ot.componentDidMount=="function"&&(et.flags|=4)}var Pg=Array.isArray;function Qg(et,tt,nt){if(et=nt.ref,et!==null&&typeof et!="function"&&typeof et!="object"){if(nt._owner){if(nt=nt._owner,nt){if(nt.tag!==1)throw Error(y$7(309));var rt=nt.stateNode}if(!rt)throw Error(y$7(147,et));var ot=""+et;return tt!==null&&tt.ref!==null&&typeof tt.ref=="function"&&tt.ref._stringRef===ot?tt.ref:(tt=function(st){var ut=rt.refs;ut===Fg&&(ut=rt.refs={}),st===null?delete ut[ot]:ut[ot]=st},tt._stringRef=ot,tt)}if(typeof et!="string")throw Error(y$7(284));if(!nt._owner)throw Error(y$7(290,et))}return et}function Rg(et,tt){if(et.type!=="textarea")throw Error(y$7(31,Object.prototype.toString.call(tt)==="[object Object]"?"object with keys {"+Object.keys(tt).join(", ")+"}":tt))}function Sg(et){function tt(xt,At){if(et){var Ct=xt.lastEffect;Ct!==null?(Ct.nextEffect=At,xt.lastEffect=At):xt.firstEffect=xt.lastEffect=At,At.nextEffect=null,At.flags=8}}function nt(xt,At){if(!et)return null;for(;At!==null;)tt(xt,At),At=At.sibling;return null}function rt(xt,At){for(xt=new Map;At!==null;)At.key!==null?xt.set(At.key,At):xt.set(At.index,At),At=At.sibling;return xt}function ot(xt,At){return xt=Tg(xt,At),xt.index=0,xt.sibling=null,xt}function st(xt,At,Ct){return xt.index=Ct,et?(Ct=xt.alternate,Ct!==null?(Ct=Ct.index,Ct<At?(xt.flags=2,At):Ct):(xt.flags=2,At)):At}function ut(xt){return et&&xt.alternate===null&&(xt.flags=2),xt}function ct(xt,At,Ct,$t){return At===null||At.tag!==6?(At=Ug(Ct,xt.mode,$t),At.return=xt,At):(At=ot(At,Ct),At.return=xt,At)}function ft(xt,At,Ct,$t){return At!==null&&At.elementType===Ct.type?($t=ot(At,Ct.props),$t.ref=Qg(xt,At,Ct),$t.return=xt,$t):($t=Vg(Ct.type,Ct.key,Ct.props,null,xt.mode,$t),$t.ref=Qg(xt,At,Ct),$t.return=xt,$t)}function pt(xt,At,Ct,$t){return At===null||At.tag!==4||At.stateNode.containerInfo!==Ct.containerInfo||At.stateNode.implementation!==Ct.implementation?(At=Wg(Ct,xt.mode,$t),At.return=xt,At):(At=ot(At,Ct.children||[]),At.return=xt,At)}function ht(xt,At,Ct,$t,Ot){return At===null||At.tag!==7?(At=Xg(Ct,xt.mode,$t,Ot),At.return=xt,At):(At=ot(At,Ct),At.return=xt,At)}function mt(xt,At,Ct){if(typeof At=="string"||typeof At=="number")return At=Ug(""+At,xt.mode,Ct),At.return=xt,At;if(typeof At=="object"&&At!==null){switch(At.$$typeof){case sa$2:return Ct=Vg(At.type,At.key,At.props,null,xt.mode,Ct),Ct.ref=Qg(xt,null,At),Ct.return=xt,Ct;case ta:return At=Wg(At,xt.mode,Ct),At.return=xt,At}if(Pg(At)||La(At))return At=Xg(At,xt.mode,Ct,null),At.return=xt,At;Rg(xt,At)}return null}function yt(xt,At,Ct,$t){var Ot=At!==null?At.key:null;if(typeof Ct=="string"||typeof Ct=="number")return Ot!==null?null:ct(xt,At,""+Ct,$t);if(typeof Ct=="object"&&Ct!==null){switch(Ct.$$typeof){case sa$2:return Ct.key===Ot?Ct.type===ua?ht(xt,At,Ct.props.children,$t,Ot):ft(xt,At,Ct,$t):null;case ta:return Ct.key===Ot?pt(xt,At,Ct,$t):null}if(Pg(Ct)||La(Ct))return Ot!==null?null:ht(xt,At,Ct,$t,null);Rg(xt,Ct)}return null}function vt(xt,At,Ct,$t,Ot){if(typeof $t=="string"||typeof $t=="number")return xt=xt.get(Ct)||null,ct(At,xt,""+$t,Ot);if(typeof $t=="object"&&$t!==null){switch($t.$$typeof){case sa$2:return xt=xt.get($t.key===null?Ct:$t.key)||null,$t.type===ua?ht(At,xt,$t.props.children,Ot,$t.key):ft(At,xt,$t,Ot);case ta:return xt=xt.get($t.key===null?Ct:$t.key)||null,pt(At,xt,$t,Ot)}if(Pg($t)||La($t))return xt=xt.get(Ct)||null,ht(At,xt,$t,Ot,null);Rg(At,$t)}return null}function Tt(xt,At,Ct,$t){for(var Ot=null,Rt=null,It=At,kt=At=0,Mt=null;It!==null&&kt<Ct.length;kt++){It.index>kt?(Mt=It,It=null):Mt=It.sibling;var Ft=yt(xt,It,Ct[kt],$t);if(Ft===null){It===null&&(It=Mt);break}et&&It&&Ft.alternate===null&&tt(xt,It),At=st(Ft,At,kt),Rt===null?Ot=Ft:Rt.sibling=Ft,Rt=Ft,It=Mt}if(kt===Ct.length)return nt(xt,It),Ot;if(It===null){for(;kt<Ct.length;kt++)It=mt(xt,Ct[kt],$t),It!==null&&(At=st(It,At,kt),Rt===null?Ot=It:Rt.sibling=It,Rt=It);return Ot}for(It=rt(xt,It);kt<Ct.length;kt++)Mt=vt(It,xt,kt,Ct[kt],$t),Mt!==null&&(et&&Mt.alternate!==null&&It.delete(Mt.key===null?kt:Mt.key),At=st(Mt,At,kt),Rt===null?Ot=Mt:Rt.sibling=Mt,Rt=Mt);return et&&It.forEach(function(zt){return tt(xt,zt)}),Ot}function Et(xt,At,Ct,$t){var Ot=La(Ct);if(typeof Ot!="function")throw Error(y$7(150));if(Ct=Ot.call(Ct),Ct==null)throw Error(y$7(151));for(var Rt=Ot=null,It=At,kt=At=0,Mt=null,Ft=Ct.next();It!==null&&!Ft.done;kt++,Ft=Ct.next()){It.index>kt?(Mt=It,It=null):Mt=It.sibling;var zt=yt(xt,It,Ft.value,$t);if(zt===null){It===null&&(It=Mt);break}et&&It&&zt.alternate===null&&tt(xt,It),At=st(zt,At,kt),Rt===null?Ot=zt:Rt.sibling=zt,Rt=zt,It=Mt}if(Ft.done)return nt(xt,It),Ot;if(It===null){for(;!Ft.done;kt++,Ft=Ct.next())Ft=mt(xt,Ft.value,$t),Ft!==null&&(At=st(Ft,At,kt),Rt===null?Ot=Ft:Rt.sibling=Ft,Rt=Ft);return Ot}for(It=rt(xt,It);!Ft.done;kt++,Ft=Ct.next())Ft=vt(It,xt,kt,Ft.value,$t),Ft!==null&&(et&&Ft.alternate!==null&&It.delete(Ft.key===null?kt:Ft.key),At=st(Ft,At,kt),Rt===null?Ot=Ft:Rt.sibling=Ft,Rt=Ft);return et&&It.forEach(function(Vt){return tt(xt,Vt)}),Ot}return function(xt,At,Ct,$t){var Ot=typeof Ct=="object"&&Ct!==null&&Ct.type===ua&&Ct.key===null;Ot&&(Ct=Ct.props.children);var Rt=typeof Ct=="object"&&Ct!==null;if(Rt)switch(Ct.$$typeof){case sa$2:e:{for(Rt=Ct.key,Ot=At;Ot!==null;){if(Ot.key===Rt){switch(Ot.tag){case 7:if(Ct.type===ua){nt(xt,Ot.sibling),At=ot(Ot,Ct.props.children),At.return=xt,xt=At;break e}break;default:if(Ot.elementType===Ct.type){nt(xt,Ot.sibling),At=ot(Ot,Ct.props),At.ref=Qg(xt,Ot,Ct),At.return=xt,xt=At;break e}}nt(xt,Ot);break}else tt(xt,Ot);Ot=Ot.sibling}Ct.type===ua?(At=Xg(Ct.props.children,xt.mode,$t,Ct.key),At.return=xt,xt=At):($t=Vg(Ct.type,Ct.key,Ct.props,null,xt.mode,$t),$t.ref=Qg(xt,At,Ct),$t.return=xt,xt=$t)}return ut(xt);case ta:e:{for(Ot=Ct.key;At!==null;){if(At.key===Ot)if(At.tag===4&&At.stateNode.containerInfo===Ct.containerInfo&&At.stateNode.implementation===Ct.implementation){nt(xt,At.sibling),At=ot(At,Ct.children||[]),At.return=xt,xt=At;break e}else{nt(xt,At);break}else tt(xt,At);At=At.sibling}At=Wg(Ct,xt.mode,$t),At.return=xt,xt=At}return ut(xt)}if(typeof Ct=="string"||typeof Ct=="number")return Ct=""+Ct,At!==null&&At.tag===6?(nt(xt,At.sibling),At=ot(At,Ct),At.return=xt,xt=At):(nt(xt,At),At=Ug(Ct,xt.mode,$t),At.return=xt,xt=At),ut(xt);if(Pg(Ct))return Tt(xt,At,Ct,$t);if(La(Ct))return Et(xt,At,Ct,$t);if(Rt&&Rg(xt,Ct),typeof Ct>"u"&&!Ot)switch(xt.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y$7(152,Ra(xt.type)||"Component"))}return nt(xt,At)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch$1=Bf($g);function dh(et){if(et===$g)throw Error(y$7(174));return et}function eh(et,tt){switch(I$3(ch$1,tt),I$3(bh,et),I$3(ah,$g),et=tt.nodeType,et){case 9:case 11:tt=(tt=tt.documentElement)?tt.namespaceURI:mb$1(null,"");break;default:et=et===8?tt.parentNode:tt,tt=et.namespaceURI||null,et=et.tagName,tt=mb$1(tt,et)}H$3(ah),I$3(ah,tt)}function fh(){H$3(ah),H$3(bh),H$3(ch$1)}function gh(et){dh(ch$1.current);var tt=dh(ah.current),nt=mb$1(tt,et.type);tt!==nt&&(I$3(bh,et),I$3(ah,nt))}function hh(et){bh.current===et&&(H$3(ah),H$3(bh))}var P$2=Bf(0);function ih(et){for(var tt=et;tt!==null;){if(tt.tag===13){var nt=tt.memoizedState;if(nt!==null&&(nt=nt.dehydrated,nt===null||nt.data==="$?"||nt.data==="$!"))return tt}else if(tt.tag===19&&tt.memoizedProps.revealOrder!==void 0){if((tt.flags&64)!==0)return tt}else if(tt.child!==null){tt.child.return=tt,tt=tt.child;continue}if(tt===et)break;for(;tt.sibling===null;){if(tt.return===null||tt.return===et)return null;tt=tt.return}tt.sibling.return=tt.return,tt=tt.sibling}return null}var jh=null,kh=null,lh=!1;function mh(et,tt){var nt=nh(5,null,null,0);nt.elementType="DELETED",nt.type="DELETED",nt.stateNode=tt,nt.return=et,nt.flags=8,et.lastEffect!==null?(et.lastEffect.nextEffect=nt,et.lastEffect=nt):et.firstEffect=et.lastEffect=nt}function oh(et,tt){switch(et.tag){case 5:var nt=et.type;return tt=tt.nodeType!==1||nt.toLowerCase()!==tt.nodeName.toLowerCase()?null:tt,tt!==null?(et.stateNode=tt,!0):!1;case 6:return tt=et.pendingProps===""||tt.nodeType!==3?null:tt,tt!==null?(et.stateNode=tt,!0):!1;case 13:return!1;default:return!1}}function ph(et){if(lh){var tt=kh;if(tt){var nt=tt;if(!oh(et,tt)){if(tt=rf(nt.nextSibling),!tt||!oh(et,tt)){et.flags=et.flags&-1025|2,lh=!1,jh=et;return}mh(jh,nt)}jh=et,kh=rf(tt.firstChild)}else et.flags=et.flags&-1025|2,lh=!1,jh=et}}function qh(et){for(et=et.return;et!==null&&et.tag!==5&&et.tag!==3&&et.tag!==13;)et=et.return;jh=et}function rh(et){if(et!==jh)return!1;if(!lh)return qh(et),lh=!0,!1;var tt=et.type;if(et.tag!==5||tt!=="head"&&tt!=="body"&&!nf(tt,et.memoizedProps))for(tt=kh;tt;)mh(et,tt),tt=rf(tt.nextSibling);if(qh(et),et.tag===13){if(et=et.memoizedState,et=et!==null?et.dehydrated:null,!et)throw Error(y$7(317));e:{for(et=et.nextSibling,tt=0;et;){if(et.nodeType===8){var nt=et.data;if(nt==="/$"){if(tt===0){kh=rf(et.nextSibling);break e}tt--}else nt!=="$"&&nt!=="$!"&&nt!=="$?"||tt++}et=et.nextSibling}kh=null}}else kh=jh?rf(et.stateNode.nextSibling):null;return!0}function sh(){kh=jh=null,lh=!1}var th=[];function uh(){for(var et=0;et<th.length;et++)th[et]._workInProgressVersionPrimary=null;th.length=0}var vh=ra.ReactCurrentDispatcher,wh=ra.ReactCurrentBatchConfig,xh=0,R$1=null,S$2=null,T$1=null,yh$1=!1,zh=!1;function Ah(){throw Error(y$7(321))}function Bh(et,tt){if(tt===null)return!1;for(var nt=0;nt<tt.length&&nt<et.length;nt++)if(!He$1(et[nt],tt[nt]))return!1;return!0}function Ch(et,tt,nt,rt,ot,st){if(xh=st,R$1=tt,tt.memoizedState=null,tt.updateQueue=null,tt.lanes=0,vh.current=et===null||et.memoizedState===null?Dh:Eh,et=nt(rt,ot),zh){st=0;do{if(zh=!1,!(25>st))throw Error(y$7(301));st+=1,T$1=S$2=null,tt.updateQueue=null,vh.current=Fh,et=nt(rt,ot)}while(zh)}if(vh.current=Gh,tt=S$2!==null&&S$2.next!==null,xh=0,T$1=S$2=R$1=null,yh$1=!1,tt)throw Error(y$7(300));return et}function Hh(){var et={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return T$1===null?R$1.memoizedState=T$1=et:T$1=T$1.next=et,T$1}function Ih(){if(S$2===null){var et=R$1.alternate;et=et!==null?et.memoizedState:null}else et=S$2.next;var tt=T$1===null?R$1.memoizedState:T$1.next;if(tt!==null)T$1=tt,S$2=et;else{if(et===null)throw Error(y$7(310));S$2=et,et={memoizedState:S$2.memoizedState,baseState:S$2.baseState,baseQueue:S$2.baseQueue,queue:S$2.queue,next:null},T$1===null?R$1.memoizedState=T$1=et:T$1=T$1.next=et}return T$1}function Jh(et,tt){return typeof tt=="function"?tt(et):tt}function Kh(et){var tt=Ih(),nt=tt.queue;if(nt===null)throw Error(y$7(311));nt.lastRenderedReducer=et;var rt=S$2,ot=rt.baseQueue,st=nt.pending;if(st!==null){if(ot!==null){var ut=ot.next;ot.next=st.next,st.next=ut}rt.baseQueue=ot=st,nt.pending=null}if(ot!==null){ot=ot.next,rt=rt.baseState;var ct=ut=st=null,ft=ot;do{var pt=ft.lane;if((xh&pt)===pt)ct!==null&&(ct=ct.next={lane:0,action:ft.action,eagerReducer:ft.eagerReducer,eagerState:ft.eagerState,next:null}),rt=ft.eagerReducer===et?ft.eagerState:et(rt,ft.action);else{var ht={lane:pt,action:ft.action,eagerReducer:ft.eagerReducer,eagerState:ft.eagerState,next:null};ct===null?(ut=ct=ht,st=rt):ct=ct.next=ht,R$1.lanes|=pt,Dg|=pt}ft=ft.next}while(ft!==null&&ft!==ot);ct===null?st=rt:ct.next=ut,He$1(rt,tt.memoizedState)||(ug=!0),tt.memoizedState=rt,tt.baseState=st,tt.baseQueue=ct,nt.lastRenderedState=rt}return[tt.memoizedState,nt.dispatch]}function Lh(et){var tt=Ih(),nt=tt.queue;if(nt===null)throw Error(y$7(311));nt.lastRenderedReducer=et;var rt=nt.dispatch,ot=nt.pending,st=tt.memoizedState;if(ot!==null){nt.pending=null;var ut=ot=ot.next;do st=et(st,ut.action),ut=ut.next;while(ut!==ot);He$1(st,tt.memoizedState)||(ug=!0),tt.memoizedState=st,tt.baseQueue===null&&(tt.baseState=st),nt.lastRenderedState=st}return[st,rt]}function Mh(et,tt,nt){var rt=tt._getVersion;rt=rt(tt._source);var ot=tt._workInProgressVersionPrimary;if(ot!==null?et=ot===rt:(et=et.mutableReadLanes,(et=(xh&et)===et)&&(tt._workInProgressVersionPrimary=rt,th.push(tt))),et)return nt(tt._source);throw th.push(tt),Error(y$7(350))}function Nh(et,tt,nt,rt){var ot=U$2;if(ot===null)throw Error(y$7(349));var st=tt._getVersion,ut=st(tt._source),ct=vh.current,ft=ct.useState(function(){return Mh(ot,tt,nt)}),pt=ft[1],ht=ft[0];ft=T$1;var mt=et.memoizedState,yt=mt.refs,vt=yt.getSnapshot,Tt=mt.source;mt=mt.subscribe;var Et=R$1;return et.memoizedState={refs:yt,source:tt,subscribe:rt},ct.useEffect(function(){yt.getSnapshot=nt,yt.setSnapshot=pt;var xt=st(tt._source);if(!He$1(ut,xt)){xt=nt(tt._source),He$1(ht,xt)||(pt(xt),xt=Ig(Et),ot.mutableReadLanes|=xt&ot.pendingLanes),xt=ot.mutableReadLanes,ot.entangledLanes|=xt;for(var At=ot.entanglements,Ct=xt;0<Ct;){var $t=31-Vc(Ct),Ot=1<<$t;At[$t]|=xt,Ct&=~Ot}}},[nt,tt,rt]),ct.useEffect(function(){return rt(tt._source,function(){var xt=yt.getSnapshot,At=yt.setSnapshot;try{At(xt(tt._source));var Ct=Ig(Et);ot.mutableReadLanes|=Ct&ot.pendingLanes}catch($t){At(function(){throw $t})}})},[tt,rt]),He$1(vt,nt)&&He$1(Tt,tt)&&He$1(mt,rt)||(et={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:ht},et.dispatch=pt=Oh.bind(null,R$1,et),ft.queue=et,ft.baseQueue=null,ht=Mh(ot,tt,nt),ft.memoizedState=ft.baseState=ht),ht}function Ph(et,tt,nt){var rt=Ih();return Nh(rt,et,tt,nt)}function Qh(et){var tt=Hh();return typeof et=="function"&&(et=et()),tt.memoizedState=tt.baseState=et,et=tt.queue={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:et},et=et.dispatch=Oh.bind(null,R$1,et),[tt.memoizedState,et]}function Rh(et,tt,nt,rt){return et={tag:et,create:tt,destroy:nt,deps:rt,next:null},tt=R$1.updateQueue,tt===null?(tt={lastEffect:null},R$1.updateQueue=tt,tt.lastEffect=et.next=et):(nt=tt.lastEffect,nt===null?tt.lastEffect=et.next=et:(rt=nt.next,nt.next=et,et.next=rt,tt.lastEffect=et)),et}function Sh(et){var tt=Hh();return et={current:et},tt.memoizedState=et}function Th(){return Ih().memoizedState}function Uh(et,tt,nt,rt){var ot=Hh();R$1.flags|=et,ot.memoizedState=Rh(1|tt,nt,void 0,rt===void 0?null:rt)}function Vh(et,tt,nt,rt){var ot=Ih();rt=rt===void 0?null:rt;var st=void 0;if(S$2!==null){var ut=S$2.memoizedState;if(st=ut.destroy,rt!==null&&Bh(rt,ut.deps)){Rh(tt,nt,st,rt);return}}R$1.flags|=et,ot.memoizedState=Rh(1|tt,nt,st,rt)}function Wh(et,tt){return Uh(516,4,et,tt)}function Xh(et,tt){return Vh(516,4,et,tt)}function Yh(et,tt){return Vh(4,2,et,tt)}function Zh(et,tt){if(typeof tt=="function")return et=et(),tt(et),function(){tt(null)};if(tt!=null)return et=et(),tt.current=et,function(){tt.current=null}}function $h(et,tt,nt){return nt=nt!=null?nt.concat([et]):null,Vh(4,2,Zh.bind(null,tt,et),nt)}function ai(){}function bi(et,tt){var nt=Ih();tt=tt===void 0?null:tt;var rt=nt.memoizedState;return rt!==null&&tt!==null&&Bh(tt,rt[1])?rt[0]:(nt.memoizedState=[et,tt],et)}function ci(et,tt){var nt=Ih();tt=tt===void 0?null:tt;var rt=nt.memoizedState;return rt!==null&&tt!==null&&Bh(tt,rt[1])?rt[0]:(et=et(),nt.memoizedState=[et,tt],et)}function di(et,tt){var nt=eg();gg(98>nt?98:nt,function(){et(!0)}),gg(97<nt?97:nt,function(){var rt=wh.transition;wh.transition=1;try{et(!1),tt()}finally{wh.transition=rt}})}function Oh(et,tt,nt){var rt=Hg(),ot=Ig(et),st={lane:ot,action:nt,eagerReducer:null,eagerState:null,next:null},ut=tt.pending;if(ut===null?st.next=st:(st.next=ut.next,ut.next=st),tt.pending=st,ut=et.alternate,et===R$1||ut!==null&&ut===R$1)zh=yh$1=!0;else{if(et.lanes===0&&(ut===null||ut.lanes===0)&&(ut=tt.lastRenderedReducer,ut!==null))try{var ct=tt.lastRenderedState,ft=ut(ct,nt);if(st.eagerReducer=ut,st.eagerState=ft,He$1(ft,ct))return}catch{}finally{}Jg(et,ot,rt)}}var Gh={readContext:vg,useCallback:Ah,useContext:Ah,useEffect:Ah,useImperativeHandle:Ah,useLayoutEffect:Ah,useMemo:Ah,useReducer:Ah,useRef:Ah,useState:Ah,useDebugValue:Ah,useDeferredValue:Ah,useTransition:Ah,useMutableSource:Ah,useOpaqueIdentifier:Ah,unstable_isNewReconciler:!1},Dh={readContext:vg,useCallback:function(et,tt){return Hh().memoizedState=[et,tt===void 0?null:tt],et},useContext:vg,useEffect:Wh,useImperativeHandle:function(et,tt,nt){return nt=nt!=null?nt.concat([et]):null,Uh(4,2,Zh.bind(null,tt,et),nt)},useLayoutEffect:function(et,tt){return Uh(4,2,et,tt)},useMemo:function(et,tt){var nt=Hh();return tt=tt===void 0?null:tt,et=et(),nt.memoizedState=[et,tt],et},useReducer:function(et,tt,nt){var rt=Hh();return tt=nt!==void 0?nt(tt):tt,rt.memoizedState=rt.baseState=tt,et=rt.queue={pending:null,dispatch:null,lastRenderedReducer:et,lastRenderedState:tt},et=et.dispatch=Oh.bind(null,R$1,et),[rt.memoizedState,et]},useRef:Sh,useState:Qh,useDebugValue:ai,useDeferredValue:function(et){var tt=Qh(et),nt=tt[0],rt=tt[1];return Wh(function(){var ot=wh.transition;wh.transition=1;try{rt(et)}finally{wh.transition=ot}},[et]),nt},useTransition:function(){var et=Qh(!1),tt=et[0];return et=di.bind(null,et[1]),Sh(et),[et,tt]},useMutableSource:function(et,tt,nt){var rt=Hh();return rt.memoizedState={refs:{getSnapshot:tt,setSnapshot:null},source:et,subscribe:nt},Nh(rt,et,tt,nt)},useOpaqueIdentifier:function(){if(lh){var et=!1,tt=uf(function(){throw et||(et=!0,nt("r:"+(tf++).toString(36))),Error(y$7(355))}),nt=Qh(tt)[1];return(R$1.mode&2)===0&&(R$1.flags|=516,Rh(5,function(){nt("r:"+(tf++).toString(36))},void 0,null)),tt}return tt="r:"+(tf++).toString(36),Qh(tt),tt},unstable_isNewReconciler:!1},Eh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Kh,useRef:Th,useState:function(){return Kh(Jh)},useDebugValue:ai,useDeferredValue:function(et){var tt=Kh(Jh),nt=tt[0],rt=tt[1];return Xh(function(){var ot=wh.transition;wh.transition=1;try{rt(et)}finally{wh.transition=ot}},[et]),nt},useTransition:function(){var et=Kh(Jh)[0];return[Th().current,et]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Kh(Jh)[0]},unstable_isNewReconciler:!1},Fh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Lh,useRef:Th,useState:function(){return Lh(Jh)},useDebugValue:ai,useDeferredValue:function(et){var tt=Lh(Jh),nt=tt[0],rt=tt[1];return Xh(function(){var ot=wh.transition;wh.transition=1;try{rt(et)}finally{wh.transition=ot}},[et]),nt},useTransition:function(){var et=Lh(Jh)[0];return[Th().current,et]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Lh(Jh)[0]},unstable_isNewReconciler:!1},ei=ra.ReactCurrentOwner,ug=!1;function fi(et,tt,nt,rt){tt.child=et===null?Zg(tt,null,nt,rt):Yg(tt,et.child,nt,rt)}function gi(et,tt,nt,rt,ot){nt=nt.render;var st=tt.ref;return tg(tt,ot),rt=Ch(et,tt,nt,rt,st,ot),et!==null&&!ug?(tt.updateQueue=et.updateQueue,tt.flags&=-517,et.lanes&=~ot,hi(et,tt,ot)):(tt.flags|=1,fi(et,tt,rt,ot),tt.child)}function ii(et,tt,nt,rt,ot,st){if(et===null){var ut=nt.type;return typeof ut=="function"&&!ji(ut)&&ut.defaultProps===void 0&&nt.compare===null&&nt.defaultProps===void 0?(tt.tag=15,tt.type=ut,ki(et,tt,ut,rt,ot,st)):(et=Vg(nt.type,null,rt,tt,tt.mode,st),et.ref=tt.ref,et.return=tt,tt.child=et)}return ut=et.child,(ot&st)===0&&(ot=ut.memoizedProps,nt=nt.compare,nt=nt!==null?nt:Je,nt(ot,rt)&&et.ref===tt.ref)?hi(et,tt,st):(tt.flags|=1,et=Tg(ut,rt),et.ref=tt.ref,et.return=tt,tt.child=et)}function ki(et,tt,nt,rt,ot,st){if(et!==null&&Je(et.memoizedProps,rt)&&et.ref===tt.ref)if(ug=!1,(st&ot)!==0)(et.flags&16384)!==0&&(ug=!0);else return tt.lanes=et.lanes,hi(et,tt,st);return li$1(et,tt,nt,rt,st)}function mi(et,tt,nt){var rt=tt.pendingProps,ot=rt.children,st=et!==null?et.memoizedState:null;if(rt.mode==="hidden"||rt.mode==="unstable-defer-without-hiding")if((tt.mode&4)===0)tt.memoizedState={baseLanes:0},ni(tt,nt);else if((nt&1073741824)!==0)tt.memoizedState={baseLanes:0},ni(tt,st!==null?st.baseLanes:nt);else return et=st!==null?st.baseLanes|nt:nt,tt.lanes=tt.childLanes=1073741824,tt.memoizedState={baseLanes:et},ni(tt,et),null;else st!==null?(rt=st.baseLanes|nt,tt.memoizedState=null):rt=nt,ni(tt,rt);return fi(et,tt,ot,nt),tt.child}function oi(et,tt){var nt=tt.ref;(et===null&&nt!==null||et!==null&&et.ref!==nt)&&(tt.flags|=128)}function li$1(et,tt,nt,rt,ot){var st=Ff(nt)?Df:M$3.current;return st=Ef(tt,st),tg(tt,ot),nt=Ch(et,tt,nt,rt,st,ot),et!==null&&!ug?(tt.updateQueue=et.updateQueue,tt.flags&=-517,et.lanes&=~ot,hi(et,tt,ot)):(tt.flags|=1,fi(et,tt,nt,ot),tt.child)}function pi$4(et,tt,nt,rt,ot){if(Ff(nt)){var st=!0;Jf(tt)}else st=!1;if(tg(tt,ot),tt.stateNode===null)et!==null&&(et.alternate=null,tt.alternate=null,tt.flags|=2),Mg(tt,nt,rt),Og(tt,nt,rt,ot),rt=!0;else if(et===null){var ut=tt.stateNode,ct=tt.memoizedProps;ut.props=ct;var ft=ut.context,pt=nt.contextType;typeof pt=="object"&&pt!==null?pt=vg(pt):(pt=Ff(nt)?Df:M$3.current,pt=Ef(tt,pt));var ht=nt.getDerivedStateFromProps,mt=typeof ht=="function"||typeof ut.getSnapshotBeforeUpdate=="function";mt||typeof ut.UNSAFE_componentWillReceiveProps!="function"&&typeof ut.componentWillReceiveProps!="function"||(ct!==rt||ft!==pt)&&Ng(tt,ut,rt,pt),wg=!1;var yt=tt.memoizedState;ut.state=yt,Cg(tt,rt,ut,ot),ft=tt.memoizedState,ct!==rt||yt!==ft||N$2.current||wg?(typeof ht=="function"&&(Gg(tt,nt,ht,rt),ft=tt.memoizedState),(ct=wg||Lg(tt,nt,ct,rt,yt,ft,pt))?(mt||typeof ut.UNSAFE_componentWillMount!="function"&&typeof ut.componentWillMount!="function"||(typeof ut.componentWillMount=="function"&&ut.componentWillMount(),typeof ut.UNSAFE_componentWillMount=="function"&&ut.UNSAFE_componentWillMount()),typeof ut.componentDidMount=="function"&&(tt.flags|=4)):(typeof ut.componentDidMount=="function"&&(tt.flags|=4),tt.memoizedProps=rt,tt.memoizedState=ft),ut.props=rt,ut.state=ft,ut.context=pt,rt=ct):(typeof ut.componentDidMount=="function"&&(tt.flags|=4),rt=!1)}else{ut=tt.stateNode,yg(et,tt),ct=tt.memoizedProps,pt=tt.type===tt.elementType?ct:lg(tt.type,ct),ut.props=pt,mt=tt.pendingProps,yt=ut.context,ft=nt.contextType,typeof ft=="object"&&ft!==null?ft=vg(ft):(ft=Ff(nt)?Df:M$3.current,ft=Ef(tt,ft));var vt=nt.getDerivedStateFromProps;(ht=typeof vt=="function"||typeof ut.getSnapshotBeforeUpdate=="function")||typeof ut.UNSAFE_componentWillReceiveProps!="function"&&typeof ut.componentWillReceiveProps!="function"||(ct!==mt||yt!==ft)&&Ng(tt,ut,rt,ft),wg=!1,yt=tt.memoizedState,ut.state=yt,Cg(tt,rt,ut,ot);var Tt=tt.memoizedState;ct!==mt||yt!==Tt||N$2.current||wg?(typeof vt=="function"&&(Gg(tt,nt,vt,rt),Tt=tt.memoizedState),(pt=wg||Lg(tt,nt,pt,rt,yt,Tt,ft))?(ht||typeof ut.UNSAFE_componentWillUpdate!="function"&&typeof ut.componentWillUpdate!="function"||(typeof ut.componentWillUpdate=="function"&&ut.componentWillUpdate(rt,Tt,ft),typeof ut.UNSAFE_componentWillUpdate=="function"&&ut.UNSAFE_componentWillUpdate(rt,Tt,ft)),typeof ut.componentDidUpdate=="function"&&(tt.flags|=4),typeof ut.getSnapshotBeforeUpdate=="function"&&(tt.flags|=256)):(typeof ut.componentDidUpdate!="function"||ct===et.memoizedProps&&yt===et.memoizedState||(tt.flags|=4),typeof ut.getSnapshotBeforeUpdate!="function"||ct===et.memoizedProps&&yt===et.memoizedState||(tt.flags|=256),tt.memoizedProps=rt,tt.memoizedState=Tt),ut.props=rt,ut.state=Tt,ut.context=ft,rt=pt):(typeof ut.componentDidUpdate!="function"||ct===et.memoizedProps&&yt===et.memoizedState||(tt.flags|=4),typeof ut.getSnapshotBeforeUpdate!="function"||ct===et.memoizedProps&&yt===et.memoizedState||(tt.flags|=256),rt=!1)}return qi(et,tt,nt,rt,st,ot)}function qi(et,tt,nt,rt,ot,st){oi(et,tt);var ut=(tt.flags&64)!==0;if(!rt&&!ut)return ot&&Kf(tt,nt,!1),hi(et,tt,st);rt=tt.stateNode,ei.current=tt;var ct=ut&&typeof nt.getDerivedStateFromError!="function"?null:rt.render();return tt.flags|=1,et!==null&&ut?(tt.child=Yg(tt,et.child,null,st),tt.child=Yg(tt,null,ct,st)):fi(et,tt,ct,st),tt.memoizedState=rt.state,ot&&Kf(tt,nt,!0),tt.child}function ri(et){var tt=et.stateNode;tt.pendingContext?Hf(et,tt.pendingContext,tt.pendingContext!==tt.context):tt.context&&Hf(et,tt.context,!1),eh(et,tt.containerInfo)}var si={dehydrated:null,retryLane:0};function ti(et,tt,nt){var rt=tt.pendingProps,ot=P$2.current,st=!1,ut;return(ut=(tt.flags&64)!==0)||(ut=et!==null&&et.memoizedState===null?!1:(ot&2)!==0),ut?(st=!0,tt.flags&=-65):et!==null&&et.memoizedState===null||rt.fallback===void 0||rt.unstable_avoidThisFallback===!0||(ot|=1),I$3(P$2,ot&1),et===null?(rt.fallback!==void 0&&ph(tt),et=rt.children,ot=rt.fallback,st?(et=ui(tt,et,ot,nt),tt.child.memoizedState={baseLanes:nt},tt.memoizedState=si,et):typeof rt.unstable_expectedLoadTime=="number"?(et=ui(tt,et,ot,nt),tt.child.memoizedState={baseLanes:nt},tt.memoizedState=si,tt.lanes=33554432,et):(nt=vi({mode:"visible",children:et},tt.mode,nt,null),nt.return=tt,tt.child=nt)):et.memoizedState!==null?st?(rt=wi(et,tt,rt.children,rt.fallback,nt),st=tt.child,ot=et.child.memoizedState,st.memoizedState=ot===null?{baseLanes:nt}:{baseLanes:ot.baseLanes|nt},st.childLanes=et.childLanes&~nt,tt.memoizedState=si,rt):(nt=xi(et,tt,rt.children,nt),tt.memoizedState=null,nt):st?(rt=wi(et,tt,rt.children,rt.fallback,nt),st=tt.child,ot=et.child.memoizedState,st.memoizedState=ot===null?{baseLanes:nt}:{baseLanes:ot.baseLanes|nt},st.childLanes=et.childLanes&~nt,tt.memoizedState=si,rt):(nt=xi(et,tt,rt.children,nt),tt.memoizedState=null,nt)}function ui(et,tt,nt,rt){var ot=et.mode,st=et.child;return tt={mode:"hidden",children:tt},(ot&2)===0&&st!==null?(st.childLanes=0,st.pendingProps=tt):st=vi(tt,ot,0,null),nt=Xg(nt,ot,rt,null),st.return=et,nt.return=et,st.sibling=nt,et.child=st,nt}function xi(et,tt,nt,rt){var ot=et.child;return et=ot.sibling,nt=Tg(ot,{mode:"visible",children:nt}),(tt.mode&2)===0&&(nt.lanes=rt),nt.return=tt,nt.sibling=null,et!==null&&(et.nextEffect=null,et.flags=8,tt.firstEffect=tt.lastEffect=et),tt.child=nt}function wi(et,tt,nt,rt,ot){var st=tt.mode,ut=et.child;et=ut.sibling;var ct={mode:"hidden",children:nt};return(st&2)===0&&tt.child!==ut?(nt=tt.child,nt.childLanes=0,nt.pendingProps=ct,ut=nt.lastEffect,ut!==null?(tt.firstEffect=nt.firstEffect,tt.lastEffect=ut,ut.nextEffect=null):tt.firstEffect=tt.lastEffect=null):nt=Tg(ut,ct),et!==null?rt=Tg(et,rt):(rt=Xg(rt,st,ot,null),rt.flags|=2),rt.return=tt,nt.return=tt,nt.sibling=rt,tt.child=nt,rt}function yi(et,tt){et.lanes|=tt;var nt=et.alternate;nt!==null&&(nt.lanes|=tt),sg(et.return,tt)}function zi(et,tt,nt,rt,ot,st){var ut=et.memoizedState;ut===null?et.memoizedState={isBackwards:tt,rendering:null,renderingStartTime:0,last:rt,tail:nt,tailMode:ot,lastEffect:st}:(ut.isBackwards=tt,ut.rendering=null,ut.renderingStartTime=0,ut.last=rt,ut.tail=nt,ut.tailMode=ot,ut.lastEffect=st)}function Ai(et,tt,nt){var rt=tt.pendingProps,ot=rt.revealOrder,st=rt.tail;if(fi(et,tt,rt.children,nt),rt=P$2.current,(rt&2)!==0)rt=rt&1|2,tt.flags|=64;else{if(et!==null&&(et.flags&64)!==0)e:for(et=tt.child;et!==null;){if(et.tag===13)et.memoizedState!==null&&yi(et,nt);else if(et.tag===19)yi(et,nt);else if(et.child!==null){et.child.return=et,et=et.child;continue}if(et===tt)break e;for(;et.sibling===null;){if(et.return===null||et.return===tt)break e;et=et.return}et.sibling.return=et.return,et=et.sibling}rt&=1}if(I$3(P$2,rt),(tt.mode&2)===0)tt.memoizedState=null;else switch(ot){case"forwards":for(nt=tt.child,ot=null;nt!==null;)et=nt.alternate,et!==null&&ih(et)===null&&(ot=nt),nt=nt.sibling;nt=ot,nt===null?(ot=tt.child,tt.child=null):(ot=nt.sibling,nt.sibling=null),zi(tt,!1,ot,nt,st,tt.lastEffect);break;case"backwards":for(nt=null,ot=tt.child,tt.child=null;ot!==null;){if(et=ot.alternate,et!==null&&ih(et)===null){tt.child=ot;break}et=ot.sibling,ot.sibling=nt,nt=ot,ot=et}zi(tt,!0,nt,null,st,tt.lastEffect);break;case"together":zi(tt,!1,null,null,void 0,tt.lastEffect);break;default:tt.memoizedState=null}return tt.child}function hi(et,tt,nt){if(et!==null&&(tt.dependencies=et.dependencies),Dg|=tt.lanes,(nt&tt.childLanes)!==0){if(et!==null&&tt.child!==et.child)throw Error(y$7(153));if(tt.child!==null){for(et=tt.child,nt=Tg(et,et.pendingProps),tt.child=nt,nt.return=tt;et.sibling!==null;)et=et.sibling,nt=nt.sibling=Tg(et,et.pendingProps),nt.return=tt;nt.sibling=null}return tt.child}return null}var Bi,Ci,Di,Ei;Bi=function(et,tt){for(var nt=tt.child;nt!==null;){if(nt.tag===5||nt.tag===6)et.appendChild(nt.stateNode);else if(nt.tag!==4&&nt.child!==null){nt.child.return=nt,nt=nt.child;continue}if(nt===tt)break;for(;nt.sibling===null;){if(nt.return===null||nt.return===tt)return;nt=nt.return}nt.sibling.return=nt.return,nt=nt.sibling}};Ci=function(){};Di=function(et,tt,nt,rt){var ot=et.memoizedProps;if(ot!==rt){et=tt.stateNode,dh(ah.current);var st=null;switch(nt){case"input":ot=Ya(et,ot),rt=Ya(et,rt),st=[];break;case"option":ot=eb(et,ot),rt=eb(et,rt),st=[];break;case"select":ot=m$5({},ot,{value:void 0}),rt=m$5({},rt,{value:void 0}),st=[];break;case"textarea":ot=gb$1(et,ot),rt=gb$1(et,rt),st=[];break;default:typeof ot.onClick!="function"&&typeof rt.onClick=="function"&&(et.onclick=jf)}vb(nt,rt);var ut;nt=null;for(pt in ot)if(!rt.hasOwnProperty(pt)&&ot.hasOwnProperty(pt)&&ot[pt]!=null)if(pt==="style"){var ct=ot[pt];for(ut in ct)ct.hasOwnProperty(ut)&&(nt||(nt={}),nt[ut]="")}else pt!=="dangerouslySetInnerHTML"&&pt!=="children"&&pt!=="suppressContentEditableWarning"&&pt!=="suppressHydrationWarning"&&pt!=="autoFocus"&&(ca.hasOwnProperty(pt)?st||(st=[]):(st=st||[]).push(pt,null));for(pt in rt){var ft=rt[pt];if(ct=ot?.[pt],rt.hasOwnProperty(pt)&&ft!==ct&&(ft!=null||ct!=null))if(pt==="style")if(ct){for(ut in ct)!ct.hasOwnProperty(ut)||ft&&ft.hasOwnProperty(ut)||(nt||(nt={}),nt[ut]="");for(ut in ft)ft.hasOwnProperty(ut)&&ct[ut]!==ft[ut]&&(nt||(nt={}),nt[ut]=ft[ut])}else nt||(st||(st=[]),st.push(pt,nt)),nt=ft;else pt==="dangerouslySetInnerHTML"?(ft=ft?ft.__html:void 0,ct=ct?ct.__html:void 0,ft!=null&&ct!==ft&&(st=st||[]).push(pt,ft)):pt==="children"?typeof ft!="string"&&typeof ft!="number"||(st=st||[]).push(pt,""+ft):pt!=="suppressContentEditableWarning"&&pt!=="suppressHydrationWarning"&&(ca.hasOwnProperty(pt)?(ft!=null&&pt==="onScroll"&&G$3("scroll",et),st||ct===ft||(st=[])):typeof ft=="object"&&ft!==null&&ft.$$typeof===Ga?ft.toString():(st=st||[]).push(pt,ft))}nt&&(st=st||[]).push("style",nt);var pt=st;(tt.updateQueue=pt)&&(tt.flags|=4)}};Ei=function(et,tt,nt,rt){nt!==rt&&(tt.flags|=4)};function Fi(et,tt){if(!lh)switch(et.tailMode){case"hidden":tt=et.tail;for(var nt=null;tt!==null;)tt.alternate!==null&&(nt=tt),tt=tt.sibling;nt===null?et.tail=null:nt.sibling=null;break;case"collapsed":nt=et.tail;for(var rt=null;nt!==null;)nt.alternate!==null&&(rt=nt),nt=nt.sibling;rt===null?tt||et.tail===null?et.tail=null:et.tail.sibling=null:rt.sibling=null}}function Gi(et,tt,nt){var rt=tt.pendingProps;switch(tt.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ff(tt.type)&&Gf(),null;case 3:return fh(),H$3(N$2),H$3(M$3),uh(),rt=tt.stateNode,rt.pendingContext&&(rt.context=rt.pendingContext,rt.pendingContext=null),(et===null||et.child===null)&&(rh(tt)?tt.flags|=4:rt.hydrate||(tt.flags|=256)),Ci(tt),null;case 5:hh(tt);var ot=dh(ch$1.current);if(nt=tt.type,et!==null&&tt.stateNode!=null)Di(et,tt,nt,rt,ot),et.ref!==tt.ref&&(tt.flags|=128);else{if(!rt){if(tt.stateNode===null)throw Error(y$7(166));return null}if(et=dh(ah.current),rh(tt)){rt=tt.stateNode,nt=tt.type;var st=tt.memoizedProps;switch(rt[wf]=tt,rt[xf$1]=st,nt){case"dialog":G$3("cancel",rt),G$3("close",rt);break;case"iframe":case"object":case"embed":G$3("load",rt);break;case"video":case"audio":for(et=0;et<Xe.length;et++)G$3(Xe[et],rt);break;case"source":G$3("error",rt);break;case"img":case"image":case"link":G$3("error",rt),G$3("load",rt);break;case"details":G$3("toggle",rt);break;case"input":Za(rt,st),G$3("invalid",rt);break;case"select":rt._wrapperState={wasMultiple:!!st.multiple},G$3("invalid",rt);break;case"textarea":hb(rt,st),G$3("invalid",rt)}vb(nt,st),et=null;for(var ut in st)st.hasOwnProperty(ut)&&(ot=st[ut],ut==="children"?typeof ot=="string"?rt.textContent!==ot&&(et=["children",ot]):typeof ot=="number"&&rt.textContent!==""+ot&&(et=["children",""+ot]):ca.hasOwnProperty(ut)&&ot!=null&&ut==="onScroll"&&G$3("scroll",rt));switch(nt){case"input":Va(rt),cb(rt,st,!0);break;case"textarea":Va(rt),jb(rt);break;case"select":case"option":break;default:typeof st.onClick=="function"&&(rt.onclick=jf)}rt=et,tt.updateQueue=rt,rt!==null&&(tt.flags|=4)}else{switch(ut=ot.nodeType===9?ot:ot.ownerDocument,et===kb.html&&(et=lb(nt)),et===kb.html?nt==="script"?(et=ut.createElement("div"),et.innerHTML="<script><\/script>",et=et.removeChild(et.firstChild)):typeof rt.is=="string"?et=ut.createElement(nt,{is:rt.is}):(et=ut.createElement(nt),nt==="select"&&(ut=et,rt.multiple?ut.multiple=!0:rt.size&&(ut.size=rt.size))):et=ut.createElementNS(et,nt),et[wf]=tt,et[xf$1]=rt,Bi(et,tt,!1,!1),tt.stateNode=et,ut=wb(nt,rt),nt){case"dialog":G$3("cancel",et),G$3("close",et),ot=rt;break;case"iframe":case"object":case"embed":G$3("load",et),ot=rt;break;case"video":case"audio":for(ot=0;ot<Xe.length;ot++)G$3(Xe[ot],et);ot=rt;break;case"source":G$3("error",et),ot=rt;break;case"img":case"image":case"link":G$3("error",et),G$3("load",et),ot=rt;break;case"details":G$3("toggle",et),ot=rt;break;case"input":Za(et,rt),ot=Ya(et,rt),G$3("invalid",et);break;case"option":ot=eb(et,rt);break;case"select":et._wrapperState={wasMultiple:!!rt.multiple},ot=m$5({},rt,{value:void 0}),G$3("invalid",et);break;case"textarea":hb(et,rt),ot=gb$1(et,rt),G$3("invalid",et);break;default:ot=rt}vb(nt,ot);var ct=ot;for(st in ct)if(ct.hasOwnProperty(st)){var ft=ct[st];st==="style"?tb(et,ft):st==="dangerouslySetInnerHTML"?(ft=ft?ft.__html:void 0,ft!=null&&ob(et,ft)):st==="children"?typeof ft=="string"?(nt!=="textarea"||ft!=="")&&pb(et,ft):typeof ft=="number"&&pb(et,""+ft):st!=="suppressContentEditableWarning"&&st!=="suppressHydrationWarning"&&st!=="autoFocus"&&(ca.hasOwnProperty(st)?ft!=null&&st==="onScroll"&&G$3("scroll",et):ft!=null&&qa(et,st,ft,ut))}switch(nt){case"input":Va(et),cb(et,rt,!1);break;case"textarea":Va(et),jb(et);break;case"option":rt.value!=null&&et.setAttribute("value",""+Sa(rt.value));break;case"select":et.multiple=!!rt.multiple,st=rt.value,st!=null?fb(et,!!rt.multiple,st,!1):rt.defaultValue!=null&&fb(et,!!rt.multiple,rt.defaultValue,!0);break;default:typeof ot.onClick=="function"&&(et.onclick=jf)}mf(nt,rt)&&(tt.flags|=4)}tt.ref!==null&&(tt.flags|=128)}return null;case 6:if(et&&tt.stateNode!=null)Ei(et,tt,et.memoizedProps,rt);else{if(typeof rt!="string"&&tt.stateNode===null)throw Error(y$7(166));nt=dh(ch$1.current),dh(ah.current),rh(tt)?(rt=tt.stateNode,nt=tt.memoizedProps,rt[wf]=tt,rt.nodeValue!==nt&&(tt.flags|=4)):(rt=(nt.nodeType===9?nt:nt.ownerDocument).createTextNode(rt),rt[wf]=tt,tt.stateNode=rt)}return null;case 13:return H$3(P$2),rt=tt.memoizedState,(tt.flags&64)!==0?(tt.lanes=nt,tt):(rt=rt!==null,nt=!1,et===null?tt.memoizedProps.fallback!==void 0&&rh(tt):nt=et.memoizedState!==null,rt&&!nt&&(tt.mode&2)!==0&&(et===null&&tt.memoizedProps.unstable_avoidThisFallback!==!0||(P$2.current&1)!==0?V$1===0&&(V$1=3):((V$1===0||V$1===3)&&(V$1=4),U$2===null||(Dg&134217727)===0&&(Hi&134217727)===0||Ii(U$2,W$2))),(rt||nt)&&(tt.flags|=4),null);case 4:return fh(),Ci(tt),et===null&&cf(tt.stateNode.containerInfo),null;case 10:return rg(tt),null;case 17:return Ff(tt.type)&&Gf(),null;case 19:if(H$3(P$2),rt=tt.memoizedState,rt===null)return null;if(st=(tt.flags&64)!==0,ut=rt.rendering,ut===null)if(st)Fi(rt,!1);else{if(V$1!==0||et!==null&&(et.flags&64)!==0)for(et=tt.child;et!==null;){if(ut=ih(et),ut!==null){for(tt.flags|=64,Fi(rt,!1),st=ut.updateQueue,st!==null&&(tt.updateQueue=st,tt.flags|=4),rt.lastEffect===null&&(tt.firstEffect=null),tt.lastEffect=rt.lastEffect,rt=nt,nt=tt.child;nt!==null;)st=nt,et=rt,st.flags&=2,st.nextEffect=null,st.firstEffect=null,st.lastEffect=null,ut=st.alternate,ut===null?(st.childLanes=0,st.lanes=et,st.child=null,st.memoizedProps=null,st.memoizedState=null,st.updateQueue=null,st.dependencies=null,st.stateNode=null):(st.childLanes=ut.childLanes,st.lanes=ut.lanes,st.child=ut.child,st.memoizedProps=ut.memoizedProps,st.memoizedState=ut.memoizedState,st.updateQueue=ut.updateQueue,st.type=ut.type,et=ut.dependencies,st.dependencies=et===null?null:{lanes:et.lanes,firstContext:et.firstContext}),nt=nt.sibling;return I$3(P$2,P$2.current&1|2),tt.child}et=et.sibling}rt.tail!==null&&O$2()>Ji&&(tt.flags|=64,st=!0,Fi(rt,!1),tt.lanes=33554432)}else{if(!st)if(et=ih(ut),et!==null){if(tt.flags|=64,st=!0,nt=et.updateQueue,nt!==null&&(tt.updateQueue=nt,tt.flags|=4),Fi(rt,!0),rt.tail===null&&rt.tailMode==="hidden"&&!ut.alternate&&!lh)return tt=tt.lastEffect=rt.lastEffect,tt!==null&&(tt.nextEffect=null),null}else 2*O$2()-rt.renderingStartTime>Ji&&nt!==1073741824&&(tt.flags|=64,st=!0,Fi(rt,!1),tt.lanes=33554432);rt.isBackwards?(ut.sibling=tt.child,tt.child=ut):(nt=rt.last,nt!==null?nt.sibling=ut:tt.child=ut,rt.last=ut)}return rt.tail!==null?(nt=rt.tail,rt.rendering=nt,rt.tail=nt.sibling,rt.lastEffect=tt.lastEffect,rt.renderingStartTime=O$2(),nt.sibling=null,tt=P$2.current,I$3(P$2,st?tt&1|2:tt&1),nt):null;case 23:case 24:return Ki(),et!==null&&et.memoizedState!==null!=(tt.memoizedState!==null)&&rt.mode!=="unstable-defer-without-hiding"&&(tt.flags|=4),null}throw Error(y$7(156,tt.tag))}function Li(et){switch(et.tag){case 1:Ff(et.type)&&Gf();var tt=et.flags;return tt&4096?(et.flags=tt&-4097|64,et):null;case 3:if(fh(),H$3(N$2),H$3(M$3),uh(),tt=et.flags,(tt&64)!==0)throw Error(y$7(285));return et.flags=tt&-4097|64,et;case 5:return hh(et),null;case 13:return H$3(P$2),tt=et.flags,tt&4096?(et.flags=tt&-4097|64,et):null;case 19:return H$3(P$2),null;case 4:return fh(),null;case 10:return rg(et),null;case 23:case 24:return Ki(),null;default:return null}}function Mi(et,tt){try{var nt="",rt=tt;do nt+=Qa(rt),rt=rt.return;while(rt);var ot=nt}catch(st){ot=`
Error generating stack: `+st.message+`
`+st.stack}return{value:et,source:tt,stack:ot}}function Ni(et,tt){try{console.error(tt.value)}catch(nt){setTimeout(function(){throw nt})}}var Oi=typeof WeakMap=="function"?WeakMap:Map;function Pi(et,tt,nt){nt=zg(-1,nt),nt.tag=3,nt.payload={element:null};var rt=tt.value;return nt.callback=function(){Qi||(Qi=!0,Ri=rt),Ni(et,tt)},nt}function Si(et,tt,nt){nt=zg(-1,nt),nt.tag=3;var rt=et.type.getDerivedStateFromError;if(typeof rt=="function"){var ot=tt.value;nt.payload=function(){return Ni(et,tt),rt(ot)}}var st=et.stateNode;return st!==null&&typeof st.componentDidCatch=="function"&&(nt.callback=function(){typeof rt!="function"&&(Ti===null?Ti=new Set([this]):Ti.add(this),Ni(et,tt));var ut=tt.stack;this.componentDidCatch(tt.value,{componentStack:ut!==null?ut:""})}),nt}var Ui=typeof WeakSet=="function"?WeakSet:Set;function Vi(et){var tt=et.ref;if(tt!==null)if(typeof tt=="function")try{tt(null)}catch(nt){Wi(et,nt)}else tt.current=null}function Xi(et,tt){switch(tt.tag){case 0:case 11:case 15:case 22:return;case 1:if(tt.flags&256&&et!==null){var nt=et.memoizedProps,rt=et.memoizedState;et=tt.stateNode,tt=et.getSnapshotBeforeUpdate(tt.elementType===tt.type?nt:lg(tt.type,nt),rt),et.__reactInternalSnapshotBeforeUpdate=tt}return;case 3:tt.flags&256&&qf(tt.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y$7(163))}function Yi(et,tt,nt){switch(nt.tag){case 0:case 11:case 15:case 22:if(tt=nt.updateQueue,tt=tt!==null?tt.lastEffect:null,tt!==null){et=tt=tt.next;do{if((et.tag&3)===3){var rt=et.create;et.destroy=rt()}et=et.next}while(et!==tt)}if(tt=nt.updateQueue,tt=tt!==null?tt.lastEffect:null,tt!==null){et=tt=tt.next;do{var ot=et;rt=ot.next,ot=ot.tag,(ot&4)!==0&&(ot&1)!==0&&(Zi(nt,et),$i(nt,et)),et=rt}while(et!==tt)}return;case 1:et=nt.stateNode,nt.flags&4&&(tt===null?et.componentDidMount():(rt=nt.elementType===nt.type?tt.memoizedProps:lg(nt.type,tt.memoizedProps),et.componentDidUpdate(rt,tt.memoizedState,et.__reactInternalSnapshotBeforeUpdate))),tt=nt.updateQueue,tt!==null&&Eg(nt,tt,et);return;case 3:if(tt=nt.updateQueue,tt!==null){if(et=null,nt.child!==null)switch(nt.child.tag){case 5:et=nt.child.stateNode;break;case 1:et=nt.child.stateNode}Eg(nt,tt,et)}return;case 5:et=nt.stateNode,tt===null&&nt.flags&4&&mf(nt.type,nt.memoizedProps)&&et.focus();return;case 6:return;case 4:return;case 12:return;case 13:nt.memoizedState===null&&(nt=nt.alternate,nt!==null&&(nt=nt.memoizedState,nt!==null&&(nt=nt.dehydrated,nt!==null&&Cc(nt))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y$7(163))}function aj(et,tt){for(var nt=et;;){if(nt.tag===5){var rt=nt.stateNode;if(tt)rt=rt.style,typeof rt.setProperty=="function"?rt.setProperty("display","none","important"):rt.display="none";else{rt=nt.stateNode;var ot=nt.memoizedProps.style;ot=ot!=null&&ot.hasOwnProperty("display")?ot.display:null,rt.style.display=sb("display",ot)}}else if(nt.tag===6)nt.stateNode.nodeValue=tt?"":nt.memoizedProps;else if((nt.tag!==23&&nt.tag!==24||nt.memoizedState===null||nt===et)&&nt.child!==null){nt.child.return=nt,nt=nt.child;continue}if(nt===et)break;for(;nt.sibling===null;){if(nt.return===null||nt.return===et)return;nt=nt.return}nt.sibling.return=nt.return,nt=nt.sibling}}function bj(et,tt){if(Mf&&typeof Mf.onCommitFiberUnmount=="function")try{Mf.onCommitFiberUnmount(Lf,tt)}catch{}switch(tt.tag){case 0:case 11:case 14:case 15:case 22:if(et=tt.updateQueue,et!==null&&(et=et.lastEffect,et!==null)){var nt=et=et.next;do{var rt=nt,ot=rt.destroy;if(rt=rt.tag,ot!==void 0)if((rt&4)!==0)Zi(tt,nt);else{rt=tt;try{ot()}catch(st){Wi(rt,st)}}nt=nt.next}while(nt!==et)}break;case 1:if(Vi(tt),et=tt.stateNode,typeof et.componentWillUnmount=="function")try{et.props=tt.memoizedProps,et.state=tt.memoizedState,et.componentWillUnmount()}catch(st){Wi(tt,st)}break;case 5:Vi(tt);break;case 4:cj(et,tt)}}function dj(et){et.alternate=null,et.child=null,et.dependencies=null,et.firstEffect=null,et.lastEffect=null,et.memoizedProps=null,et.memoizedState=null,et.pendingProps=null,et.return=null,et.updateQueue=null}function ej(et){return et.tag===5||et.tag===3||et.tag===4}function fj(et){e:{for(var tt=et.return;tt!==null;){if(ej(tt))break e;tt=tt.return}throw Error(y$7(160))}var nt=tt;switch(tt=nt.stateNode,nt.tag){case 5:var rt=!1;break;case 3:tt=tt.containerInfo,rt=!0;break;case 4:tt=tt.containerInfo,rt=!0;break;default:throw Error(y$7(161))}nt.flags&16&&(pb(tt,""),nt.flags&=-17);e:t:for(nt=et;;){for(;nt.sibling===null;){if(nt.return===null||ej(nt.return)){nt=null;break e}nt=nt.return}for(nt.sibling.return=nt.return,nt=nt.sibling;nt.tag!==5&&nt.tag!==6&&nt.tag!==18;){if(nt.flags&2||nt.child===null||nt.tag===4)continue t;nt.child.return=nt,nt=nt.child}if(!(nt.flags&2)){nt=nt.stateNode;break e}}rt?gj(et,nt,tt):hj(et,nt,tt)}function gj(et,tt,nt){var rt=et.tag,ot=rt===5||rt===6;if(ot)et=ot?et.stateNode:et.stateNode.instance,tt?nt.nodeType===8?nt.parentNode.insertBefore(et,tt):nt.insertBefore(et,tt):(nt.nodeType===8?(tt=nt.parentNode,tt.insertBefore(et,nt)):(tt=nt,tt.appendChild(et)),nt=nt._reactRootContainer,nt!=null||tt.onclick!==null||(tt.onclick=jf));else if(rt!==4&&(et=et.child,et!==null))for(gj(et,tt,nt),et=et.sibling;et!==null;)gj(et,tt,nt),et=et.sibling}function hj(et,tt,nt){var rt=et.tag,ot=rt===5||rt===6;if(ot)et=ot?et.stateNode:et.stateNode.instance,tt?nt.insertBefore(et,tt):nt.appendChild(et);else if(rt!==4&&(et=et.child,et!==null))for(hj(et,tt,nt),et=et.sibling;et!==null;)hj(et,tt,nt),et=et.sibling}function cj(et,tt){for(var nt=tt,rt=!1,ot,st;;){if(!rt){rt=nt.return;e:for(;;){if(rt===null)throw Error(y$7(160));switch(ot=rt.stateNode,rt.tag){case 5:st=!1;break e;case 3:ot=ot.containerInfo,st=!0;break e;case 4:ot=ot.containerInfo,st=!0;break e}rt=rt.return}rt=!0}if(nt.tag===5||nt.tag===6){e:for(var ut=et,ct=nt,ft=ct;;)if(bj(ut,ft),ft.child!==null&&ft.tag!==4)ft.child.return=ft,ft=ft.child;else{if(ft===ct)break e;for(;ft.sibling===null;){if(ft.return===null||ft.return===ct)break e;ft=ft.return}ft.sibling.return=ft.return,ft=ft.sibling}st?(ut=ot,ct=nt.stateNode,ut.nodeType===8?ut.parentNode.removeChild(ct):ut.removeChild(ct)):ot.removeChild(nt.stateNode)}else if(nt.tag===4){if(nt.child!==null){ot=nt.stateNode.containerInfo,st=!0,nt.child.return=nt,nt=nt.child;continue}}else if(bj(et,nt),nt.child!==null){nt.child.return=nt,nt=nt.child;continue}if(nt===tt)break;for(;nt.sibling===null;){if(nt.return===null||nt.return===tt)return;nt=nt.return,nt.tag===4&&(rt=!1)}nt.sibling.return=nt.return,nt=nt.sibling}}function ij(et,tt){switch(tt.tag){case 0:case 11:case 14:case 15:case 22:var nt=tt.updateQueue;if(nt=nt!==null?nt.lastEffect:null,nt!==null){var rt=nt=nt.next;do(rt.tag&3)===3&&(et=rt.destroy,rt.destroy=void 0,et!==void 0&&et()),rt=rt.next;while(rt!==nt)}return;case 1:return;case 5:if(nt=tt.stateNode,nt!=null){rt=tt.memoizedProps;var ot=et!==null?et.memoizedProps:rt;et=tt.type;var st=tt.updateQueue;if(tt.updateQueue=null,st!==null){for(nt[xf$1]=rt,et==="input"&&rt.type==="radio"&&rt.name!=null&&$a(nt,rt),wb(et,ot),tt=wb(et,rt),ot=0;ot<st.length;ot+=2){var ut=st[ot],ct=st[ot+1];ut==="style"?tb(nt,ct):ut==="dangerouslySetInnerHTML"?ob(nt,ct):ut==="children"?pb(nt,ct):qa(nt,ut,ct,tt)}switch(et){case"input":ab$1(nt,rt);break;case"textarea":ib(nt,rt);break;case"select":et=nt._wrapperState.wasMultiple,nt._wrapperState.wasMultiple=!!rt.multiple,st=rt.value,st!=null?fb(nt,!!rt.multiple,st,!1):et!==!!rt.multiple&&(rt.defaultValue!=null?fb(nt,!!rt.multiple,rt.defaultValue,!0):fb(nt,!!rt.multiple,rt.multiple?[]:"",!1))}}}return;case 6:if(tt.stateNode===null)throw Error(y$7(162));tt.stateNode.nodeValue=tt.memoizedProps;return;case 3:nt=tt.stateNode,nt.hydrate&&(nt.hydrate=!1,Cc(nt.containerInfo));return;case 12:return;case 13:tt.memoizedState!==null&&(jj=O$2(),aj(tt.child,!0)),kj(tt);return;case 19:kj(tt);return;case 17:return;case 23:case 24:aj(tt,tt.memoizedState!==null);return}throw Error(y$7(163))}function kj(et){var tt=et.updateQueue;if(tt!==null){et.updateQueue=null;var nt=et.stateNode;nt===null&&(nt=et.stateNode=new Ui),tt.forEach(function(rt){var ot=lj.bind(null,et,rt);nt.has(rt)||(nt.add(rt),rt.then(ot,ot))})}}function mj(et,tt){return et!==null&&(et=et.memoizedState,et===null||et.dehydrated!==null)?(tt=tt.memoizedState,tt!==null&&tt.dehydrated===null):!1}var nj=Math.ceil,oj=ra.ReactCurrentDispatcher,pj=ra.ReactCurrentOwner,X$4=0,U$2=null,Y$3=null,W$2=0,qj=0,rj=Bf(0),V$1=0,sj=null,tj=0,Dg=0,Hi=0,uj=0,vj=null,jj=0,Ji=1/0;function wj(){Ji=O$2()+500}var Z$2=null,Qi=!1,Ri=null,Ti=null,xj=!1,yj=null,zj=90,Aj=[],Bj=[],Cj=null,Dj=0,Ej=null,Fj=-1,Gj=0,Hj=0,Ij=null,Jj=!1;function Hg(){return(X$4&48)!==0?O$2():Fj!==-1?Fj:Fj=O$2()}function Ig(et){if(et=et.mode,(et&2)===0)return 1;if((et&4)===0)return eg()===99?1:2;if(Gj===0&&(Gj=tj),kg.transition!==0){Hj!==0&&(Hj=vj!==null?vj.pendingLanes:0),et=Gj;var tt=4186112&~Hj;return tt&=-tt,tt===0&&(et=4186112&~et,tt=et&-et,tt===0&&(tt=8192)),tt}return et=eg(),(X$4&4)!==0&&et===98?et=Xc(12,Gj):(et=Sc(et),et=Xc(et,Gj)),et}function Jg(et,tt,nt){if(50<Dj)throw Dj=0,Ej=null,Error(y$7(185));if(et=Kj(et,tt),et===null)return null;$c(et,tt,nt),et===U$2&&(Hi|=tt,V$1===4&&Ii(et,W$2));var rt=eg();tt===1?(X$4&8)!==0&&(X$4&48)===0?Lj(et):(Mj(et,nt),X$4===0&&(wj(),ig())):((X$4&4)===0||rt!==98&&rt!==99||(Cj===null?Cj=new Set([et]):Cj.add(et)),Mj(et,nt)),vj=et}function Kj(et,tt){et.lanes|=tt;var nt=et.alternate;for(nt!==null&&(nt.lanes|=tt),nt=et,et=et.return;et!==null;)et.childLanes|=tt,nt=et.alternate,nt!==null&&(nt.childLanes|=tt),nt=et,et=et.return;return nt.tag===3?nt.stateNode:null}function Mj(et,tt){for(var nt=et.callbackNode,rt=et.suspendedLanes,ot=et.pingedLanes,st=et.expirationTimes,ut=et.pendingLanes;0<ut;){var ct=31-Vc(ut),ft=1<<ct,pt=st[ct];if(pt===-1){if((ft&rt)===0||(ft&ot)!==0){pt=tt,Rc(ft);var ht=F$2;st[ct]=10<=ht?pt+250:6<=ht?pt+5e3:-1}}else pt<=tt&&(et.expiredLanes|=ft);ut&=~ft}if(rt=Uc(et,et===U$2?W$2:0),tt=F$2,rt===0)nt!==null&&(nt!==Zf&&Pf(nt),et.callbackNode=null,et.callbackPriority=0);else{if(nt!==null){if(et.callbackPriority===tt)return;nt!==Zf&&Pf(nt)}tt===15?(nt=Lj.bind(null,et),ag===null?(ag=[nt],bg=Of(Uf,jg)):ag.push(nt),nt=Zf):tt===14?nt=hg(99,Lj.bind(null,et)):(nt=Tc(tt),nt=hg(nt,Nj.bind(null,et))),et.callbackPriority=tt,et.callbackNode=nt}}function Nj(et){if(Fj=-1,Hj=Gj=0,(X$4&48)!==0)throw Error(y$7(327));var tt=et.callbackNode;if(Oj()&&et.callbackNode!==tt)return null;var nt=Uc(et,et===U$2?W$2:0);if(nt===0)return null;var rt=nt,ot=X$4;X$4|=16;var st=Pj();(U$2!==et||W$2!==rt)&&(wj(),Qj(et,rt));do try{Rj();break}catch(ct){Sj(et,ct)}while(1);if(qg(),oj.current=st,X$4=ot,Y$3!==null?rt=0:(U$2=null,W$2=0,rt=V$1),(tj&Hi)!==0)Qj(et,0);else if(rt!==0){if(rt===2&&(X$4|=64,et.hydrate&&(et.hydrate=!1,qf(et.containerInfo)),nt=Wc(et),nt!==0&&(rt=Tj(et,nt))),rt===1)throw tt=sj,Qj(et,0),Ii(et,nt),Mj(et,O$2()),tt;switch(et.finishedWork=et.current.alternate,et.finishedLanes=nt,rt){case 0:case 1:throw Error(y$7(345));case 2:Uj(et);break;case 3:if(Ii(et,nt),(nt&62914560)===nt&&(rt=jj+500-O$2(),10<rt)){if(Uc(et,0)!==0)break;if(ot=et.suspendedLanes,(ot&nt)!==nt){Hg(),et.pingedLanes|=et.suspendedLanes&ot;break}et.timeoutHandle=of(Uj.bind(null,et),rt);break}Uj(et);break;case 4:if(Ii(et,nt),(nt&4186112)===nt)break;for(rt=et.eventTimes,ot=-1;0<nt;){var ut=31-Vc(nt);st=1<<ut,ut=rt[ut],ut>ot&&(ot=ut),nt&=~st}if(nt=ot,nt=O$2()-nt,nt=(120>nt?120:480>nt?480:1080>nt?1080:1920>nt?1920:3e3>nt?3e3:4320>nt?4320:1960*nj(nt/1960))-nt,10<nt){et.timeoutHandle=of(Uj.bind(null,et),nt);break}Uj(et);break;case 5:Uj(et);break;default:throw Error(y$7(329))}}return Mj(et,O$2()),et.callbackNode===tt?Nj.bind(null,et):null}function Ii(et,tt){for(tt&=~uj,tt&=~Hi,et.suspendedLanes|=tt,et.pingedLanes&=~tt,et=et.expirationTimes;0<tt;){var nt=31-Vc(tt),rt=1<<nt;et[nt]=-1,tt&=~rt}}function Lj(et){if((X$4&48)!==0)throw Error(y$7(327));if(Oj(),et===U$2&&(et.expiredLanes&W$2)!==0){var tt=W$2,nt=Tj(et,tt);(tj&Hi)!==0&&(tt=Uc(et,tt),nt=Tj(et,tt))}else tt=Uc(et,0),nt=Tj(et,tt);if(et.tag!==0&&nt===2&&(X$4|=64,et.hydrate&&(et.hydrate=!1,qf(et.containerInfo)),tt=Wc(et),tt!==0&&(nt=Tj(et,tt))),nt===1)throw nt=sj,Qj(et,0),Ii(et,tt),Mj(et,O$2()),nt;return et.finishedWork=et.current.alternate,et.finishedLanes=tt,Uj(et),Mj(et,O$2()),null}function Vj(){if(Cj!==null){var et=Cj;Cj=null,et.forEach(function(tt){tt.expiredLanes|=24&tt.pendingLanes,Mj(tt,O$2())})}ig()}function Wj(et,tt){var nt=X$4;X$4|=1;try{return et(tt)}finally{X$4=nt,X$4===0&&(wj(),ig())}}function Xj(et,tt){var nt=X$4;X$4&=-2,X$4|=8;try{return et(tt)}finally{X$4=nt,X$4===0&&(wj(),ig())}}function ni(et,tt){I$3(rj,qj),qj|=tt,tj|=tt}function Ki(){qj=rj.current,H$3(rj)}function Qj(et,tt){et.finishedWork=null,et.finishedLanes=0;var nt=et.timeoutHandle;if(nt!==-1&&(et.timeoutHandle=-1,pf(nt)),Y$3!==null)for(nt=Y$3.return;nt!==null;){var rt=nt;switch(rt.tag){case 1:rt=rt.type.childContextTypes,rt!=null&&Gf();break;case 3:fh(),H$3(N$2),H$3(M$3),uh();break;case 5:hh(rt);break;case 4:fh();break;case 13:H$3(P$2);break;case 19:H$3(P$2);break;case 10:rg(rt);break;case 23:case 24:Ki()}nt=nt.return}U$2=et,Y$3=Tg(et.current,null),W$2=qj=tj=tt,V$1=0,sj=null,uj=Hi=Dg=0}function Sj(et,tt){do{var nt=Y$3;try{if(qg(),vh.current=Gh,yh$1){for(var rt=R$1.memoizedState;rt!==null;){var ot=rt.queue;ot!==null&&(ot.pending=null),rt=rt.next}yh$1=!1}if(xh=0,T$1=S$2=R$1=null,zh=!1,pj.current=null,nt===null||nt.return===null){V$1=1,sj=tt,Y$3=null;break}e:{var st=et,ut=nt.return,ct=nt,ft=tt;if(tt=W$2,ct.flags|=2048,ct.firstEffect=ct.lastEffect=null,ft!==null&&typeof ft=="object"&&typeof ft.then=="function"){var pt=ft;if((ct.mode&2)===0){var ht=ct.alternate;ht?(ct.updateQueue=ht.updateQueue,ct.memoizedState=ht.memoizedState,ct.lanes=ht.lanes):(ct.updateQueue=null,ct.memoizedState=null)}var mt=(P$2.current&1)!==0,yt=ut;do{var vt;if(vt=yt.tag===13){var Tt=yt.memoizedState;if(Tt!==null)vt=Tt.dehydrated!==null;else{var Et=yt.memoizedProps;vt=Et.fallback===void 0?!1:Et.unstable_avoidThisFallback!==!0?!0:!mt}}if(vt){var xt=yt.updateQueue;if(xt===null){var At=new Set;At.add(pt),yt.updateQueue=At}else xt.add(pt);if((yt.mode&2)===0){if(yt.flags|=64,ct.flags|=16384,ct.flags&=-2981,ct.tag===1)if(ct.alternate===null)ct.tag=17;else{var Ct=zg(-1,1);Ct.tag=2,Ag(ct,Ct)}ct.lanes|=1;break e}ft=void 0,ct=tt;var $t=st.pingCache;if($t===null?($t=st.pingCache=new Oi,ft=new Set,$t.set(pt,ft)):(ft=$t.get(pt),ft===void 0&&(ft=new Set,$t.set(pt,ft))),!ft.has(ct)){ft.add(ct);var Ot=Yj.bind(null,st,pt,ct);pt.then(Ot,Ot)}yt.flags|=4096,yt.lanes=tt;break e}yt=yt.return}while(yt!==null);ft=Error((Ra(ct.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.

Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}V$1!==5&&(V$1=2),ft=Mi(ft,ct),yt=ut;do{switch(yt.tag){case 3:st=ft,yt.flags|=4096,tt&=-tt,yt.lanes|=tt;var Rt=Pi(yt,st,tt);Bg(yt,Rt);break e;case 1:st=ft;var It=yt.type,kt=yt.stateNode;if((yt.flags&64)===0&&(typeof It.getDerivedStateFromError=="function"||kt!==null&&typeof kt.componentDidCatch=="function"&&(Ti===null||!Ti.has(kt)))){yt.flags|=4096,tt&=-tt,yt.lanes|=tt;var Mt=Si(yt,st,tt);Bg(yt,Mt);break e}}yt=yt.return}while(yt!==null)}Zj(nt)}catch(Ft){tt=Ft,Y$3===nt&&nt!==null&&(Y$3=nt=nt.return);continue}break}while(1)}function Pj(){var et=oj.current;return oj.current=Gh,et===null?Gh:et}function Tj(et,tt){var nt=X$4;X$4|=16;var rt=Pj();U$2===et&&W$2===tt||Qj(et,tt);do try{ak();break}catch(ot){Sj(et,ot)}while(1);if(qg(),X$4=nt,oj.current=rt,Y$3!==null)throw Error(y$7(261));return U$2=null,W$2=0,V$1}function ak(){for(;Y$3!==null;)bk(Y$3)}function Rj(){for(;Y$3!==null&&!Qf();)bk(Y$3)}function bk(et){var tt=ck(et.alternate,et,qj);et.memoizedProps=et.pendingProps,tt===null?Zj(et):Y$3=tt,pj.current=null}function Zj(et){var tt=et;do{var nt=tt.alternate;if(et=tt.return,(tt.flags&2048)===0){if(nt=Gi(nt,tt,qj),nt!==null){Y$3=nt;return}if(nt=tt,nt.tag!==24&&nt.tag!==23||nt.memoizedState===null||(qj&1073741824)!==0||(nt.mode&4)===0){for(var rt=0,ot=nt.child;ot!==null;)rt|=ot.lanes|ot.childLanes,ot=ot.sibling;nt.childLanes=rt}et!==null&&(et.flags&2048)===0&&(et.firstEffect===null&&(et.firstEffect=tt.firstEffect),tt.lastEffect!==null&&(et.lastEffect!==null&&(et.lastEffect.nextEffect=tt.firstEffect),et.lastEffect=tt.lastEffect),1<tt.flags&&(et.lastEffect!==null?et.lastEffect.nextEffect=tt:et.firstEffect=tt,et.lastEffect=tt))}else{if(nt=Li(tt),nt!==null){nt.flags&=2047,Y$3=nt;return}et!==null&&(et.firstEffect=et.lastEffect=null,et.flags|=2048)}if(tt=tt.sibling,tt!==null){Y$3=tt;return}Y$3=tt=et}while(tt!==null);V$1===0&&(V$1=5)}function Uj(et){var tt=eg();return gg(99,dk.bind(null,et,tt)),null}function dk(et,tt){do Oj();while(yj!==null);if((X$4&48)!==0)throw Error(y$7(327));var nt=et.finishedWork;if(nt===null)return null;if(et.finishedWork=null,et.finishedLanes=0,nt===et.current)throw Error(y$7(177));et.callbackNode=null;var rt=nt.lanes|nt.childLanes,ot=rt,st=et.pendingLanes&~ot;et.pendingLanes=ot,et.suspendedLanes=0,et.pingedLanes=0,et.expiredLanes&=ot,et.mutableReadLanes&=ot,et.entangledLanes&=ot,ot=et.entanglements;for(var ut=et.eventTimes,ct=et.expirationTimes;0<st;){var ft=31-Vc(st),pt=1<<ft;ot[ft]=0,ut[ft]=-1,ct[ft]=-1,st&=~pt}if(Cj!==null&&(rt&24)===0&&Cj.has(et)&&Cj.delete(et),et===U$2&&(Y$3=U$2=null,W$2=0),1<nt.flags?nt.lastEffect!==null?(nt.lastEffect.nextEffect=nt,rt=nt.firstEffect):rt=nt:rt=nt.firstEffect,rt!==null){if(ot=X$4,X$4|=32,pj.current=null,kf=fd,ut=Ne$1(),Oe(ut)){if("selectionStart"in ut)ct={start:ut.selectionStart,end:ut.selectionEnd};else e:if(ct=(ct=ut.ownerDocument)&&ct.defaultView||window,(pt=ct.getSelection&&ct.getSelection())&&pt.rangeCount!==0){ct=pt.anchorNode,st=pt.anchorOffset,ft=pt.focusNode,pt=pt.focusOffset;try{ct.nodeType,ft.nodeType}catch{ct=null;break e}var ht=0,mt=-1,yt=-1,vt=0,Tt=0,Et=ut,xt=null;t:for(;;){for(var At;Et!==ct||st!==0&&Et.nodeType!==3||(mt=ht+st),Et!==ft||pt!==0&&Et.nodeType!==3||(yt=ht+pt),Et.nodeType===3&&(ht+=Et.nodeValue.length),(At=Et.firstChild)!==null;)xt=Et,Et=At;for(;;){if(Et===ut)break t;if(xt===ct&&++vt===st&&(mt=ht),xt===ft&&++Tt===pt&&(yt=ht),(At=Et.nextSibling)!==null)break;Et=xt,xt=Et.parentNode}Et=At}ct=mt===-1||yt===-1?null:{start:mt,end:yt}}else ct=null;ct=ct||{start:0,end:0}}else ct=null;lf={focusedElem:ut,selectionRange:ct},fd=!1,Ij=null,Jj=!1,Z$2=rt;do try{ek()}catch(Ft){if(Z$2===null)throw Error(y$7(330));Wi(Z$2,Ft),Z$2=Z$2.nextEffect}while(Z$2!==null);Ij=null,Z$2=rt;do try{for(ut=et;Z$2!==null;){var Ct=Z$2.flags;if(Ct&16&&pb(Z$2.stateNode,""),Ct&128){var $t=Z$2.alternate;if($t!==null){var Ot=$t.ref;Ot!==null&&(typeof Ot=="function"?Ot(null):Ot.current=null)}}switch(Ct&1038){case 2:fj(Z$2),Z$2.flags&=-3;break;case 6:fj(Z$2),Z$2.flags&=-3,ij(Z$2.alternate,Z$2);break;case 1024:Z$2.flags&=-1025;break;case 1028:Z$2.flags&=-1025,ij(Z$2.alternate,Z$2);break;case 4:ij(Z$2.alternate,Z$2);break;case 8:ct=Z$2,cj(ut,ct);var Rt=ct.alternate;dj(ct),Rt!==null&&dj(Rt)}Z$2=Z$2.nextEffect}}catch(Ft){if(Z$2===null)throw Error(y$7(330));Wi(Z$2,Ft),Z$2=Z$2.nextEffect}while(Z$2!==null);if(Ot=lf,$t=Ne$1(),Ct=Ot.focusedElem,ut=Ot.selectionRange,$t!==Ct&&Ct&&Ct.ownerDocument&&Me$1(Ct.ownerDocument.documentElement,Ct)){for(ut!==null&&Oe(Ct)&&($t=ut.start,Ot=ut.end,Ot===void 0&&(Ot=$t),"selectionStart"in Ct?(Ct.selectionStart=$t,Ct.selectionEnd=Math.min(Ot,Ct.value.length)):(Ot=($t=Ct.ownerDocument||document)&&$t.defaultView||window,Ot.getSelection&&(Ot=Ot.getSelection(),ct=Ct.textContent.length,Rt=Math.min(ut.start,ct),ut=ut.end===void 0?Rt:Math.min(ut.end,ct),!Ot.extend&&Rt>ut&&(ct=ut,ut=Rt,Rt=ct),ct=Le(Ct,Rt),st=Le(Ct,ut),ct&&st&&(Ot.rangeCount!==1||Ot.anchorNode!==ct.node||Ot.anchorOffset!==ct.offset||Ot.focusNode!==st.node||Ot.focusOffset!==st.offset)&&($t=$t.createRange(),$t.setStart(ct.node,ct.offset),Ot.removeAllRanges(),Rt>ut?(Ot.addRange($t),Ot.extend(st.node,st.offset)):($t.setEnd(st.node,st.offset),Ot.addRange($t)))))),$t=[],Ot=Ct;Ot=Ot.parentNode;)Ot.nodeType===1&&$t.push({element:Ot,left:Ot.scrollLeft,top:Ot.scrollTop});for(typeof Ct.focus=="function"&&Ct.focus(),Ct=0;Ct<$t.length;Ct++)Ot=$t[Ct],Ot.element.scrollLeft=Ot.left,Ot.element.scrollTop=Ot.top}fd=!!kf,lf=kf=null,et.current=nt,Z$2=rt;do try{for(Ct=et;Z$2!==null;){var It=Z$2.flags;if(It&36&&Yi(Ct,Z$2.alternate,Z$2),It&128){$t=void 0;var kt=Z$2.ref;if(kt!==null){var Mt=Z$2.stateNode;switch(Z$2.tag){case 5:$t=Mt;break;default:$t=Mt}typeof kt=="function"?kt($t):kt.current=$t}}Z$2=Z$2.nextEffect}}catch(Ft){if(Z$2===null)throw Error(y$7(330));Wi(Z$2,Ft),Z$2=Z$2.nextEffect}while(Z$2!==null);Z$2=null,$f(),X$4=ot}else et.current=nt;if(xj)xj=!1,yj=et,zj=tt;else for(Z$2=rt;Z$2!==null;)tt=Z$2.nextEffect,Z$2.nextEffect=null,Z$2.flags&8&&(It=Z$2,It.sibling=null,It.stateNode=null),Z$2=tt;if(rt=et.pendingLanes,rt===0&&(Ti=null),rt===1?et===Ej?Dj++:(Dj=0,Ej=et):Dj=0,nt=nt.stateNode,Mf&&typeof Mf.onCommitFiberRoot=="function")try{Mf.onCommitFiberRoot(Lf,nt,void 0,(nt.current.flags&64)===64)}catch{}if(Mj(et,O$2()),Qi)throw Qi=!1,et=Ri,Ri=null,et;return(X$4&8)!==0||ig(),null}function ek(){for(;Z$2!==null;){var et=Z$2.alternate;Jj||Ij===null||((Z$2.flags&8)!==0?dc(Z$2,Ij)&&(Jj=!0):Z$2.tag===13&&mj(et,Z$2)&&dc(Z$2,Ij)&&(Jj=!0));var tt=Z$2.flags;(tt&256)!==0&&Xi(et,Z$2),(tt&512)===0||xj||(xj=!0,hg(97,function(){return Oj(),null})),Z$2=Z$2.nextEffect}}function Oj(){if(zj!==90){var et=97<zj?97:zj;return zj=90,gg(et,fk)}return!1}function $i(et,tt){Aj.push(tt,et),xj||(xj=!0,hg(97,function(){return Oj(),null}))}function Zi(et,tt){Bj.push(tt,et),xj||(xj=!0,hg(97,function(){return Oj(),null}))}function fk(){if(yj===null)return!1;var et=yj;if(yj=null,(X$4&48)!==0)throw Error(y$7(331));var tt=X$4;X$4|=32;var nt=Bj;Bj=[];for(var rt=0;rt<nt.length;rt+=2){var ot=nt[rt],st=nt[rt+1],ut=ot.destroy;if(ot.destroy=void 0,typeof ut=="function")try{ut()}catch(ft){if(st===null)throw Error(y$7(330));Wi(st,ft)}}for(nt=Aj,Aj=[],rt=0;rt<nt.length;rt+=2){ot=nt[rt],st=nt[rt+1];try{var ct=ot.create;ot.destroy=ct()}catch(ft){if(st===null)throw Error(y$7(330));Wi(st,ft)}}for(ct=et.current.firstEffect;ct!==null;)et=ct.nextEffect,ct.nextEffect=null,ct.flags&8&&(ct.sibling=null,ct.stateNode=null),ct=et;return X$4=tt,ig(),!0}function gk(et,tt,nt){tt=Mi(nt,tt),tt=Pi(et,tt,1),Ag(et,tt),tt=Hg(),et=Kj(et,1),et!==null&&($c(et,1,tt),Mj(et,tt))}function Wi(et,tt){if(et.tag===3)gk(et,et,tt);else for(var nt=et.return;nt!==null;){if(nt.tag===3){gk(nt,et,tt);break}else if(nt.tag===1){var rt=nt.stateNode;if(typeof nt.type.getDerivedStateFromError=="function"||typeof rt.componentDidCatch=="function"&&(Ti===null||!Ti.has(rt))){et=Mi(tt,et);var ot=Si(nt,et,1);if(Ag(nt,ot),ot=Hg(),nt=Kj(nt,1),nt!==null)$c(nt,1,ot),Mj(nt,ot);else if(typeof rt.componentDidCatch=="function"&&(Ti===null||!Ti.has(rt)))try{rt.componentDidCatch(tt,et)}catch{}break}}nt=nt.return}}function Yj(et,tt,nt){var rt=et.pingCache;rt!==null&&rt.delete(tt),tt=Hg(),et.pingedLanes|=et.suspendedLanes&nt,U$2===et&&(W$2&nt)===nt&&(V$1===4||V$1===3&&(W$2&62914560)===W$2&&500>O$2()-jj?Qj(et,0):uj|=nt),Mj(et,tt)}function lj(et,tt){var nt=et.stateNode;nt!==null&&nt.delete(tt),tt=0,tt===0&&(tt=et.mode,(tt&2)===0?tt=1:(tt&4)===0?tt=eg()===99?1:2:(Gj===0&&(Gj=tj),tt=Yc(62914560&~Gj),tt===0&&(tt=4194304))),nt=Hg(),et=Kj(et,tt),et!==null&&($c(et,tt,nt),Mj(et,nt))}var ck;ck=function(et,tt,nt){var rt=tt.lanes;if(et!==null)if(et.memoizedProps!==tt.pendingProps||N$2.current)ug=!0;else if((nt&rt)!==0)ug=(et.flags&16384)!==0;else{switch(ug=!1,tt.tag){case 3:ri(tt),sh();break;case 5:gh(tt);break;case 1:Ff(tt.type)&&Jf(tt);break;case 4:eh(tt,tt.stateNode.containerInfo);break;case 10:rt=tt.memoizedProps.value;var ot=tt.type._context;I$3(mg,ot._currentValue),ot._currentValue=rt;break;case 13:if(tt.memoizedState!==null)return(nt&tt.child.childLanes)!==0?ti(et,tt,nt):(I$3(P$2,P$2.current&1),tt=hi(et,tt,nt),tt!==null?tt.sibling:null);I$3(P$2,P$2.current&1);break;case 19:if(rt=(nt&tt.childLanes)!==0,(et.flags&64)!==0){if(rt)return Ai(et,tt,nt);tt.flags|=64}if(ot=tt.memoizedState,ot!==null&&(ot.rendering=null,ot.tail=null,ot.lastEffect=null),I$3(P$2,P$2.current),rt)break;return null;case 23:case 24:return tt.lanes=0,mi(et,tt,nt)}return hi(et,tt,nt)}else ug=!1;switch(tt.lanes=0,tt.tag){case 2:if(rt=tt.type,et!==null&&(et.alternate=null,tt.alternate=null,tt.flags|=2),et=tt.pendingProps,ot=Ef(tt,M$3.current),tg(tt,nt),ot=Ch(null,tt,rt,et,ot,nt),tt.flags|=1,typeof ot=="object"&&ot!==null&&typeof ot.render=="function"&&ot.$$typeof===void 0){if(tt.tag=1,tt.memoizedState=null,tt.updateQueue=null,Ff(rt)){var st=!0;Jf(tt)}else st=!1;tt.memoizedState=ot.state!==null&&ot.state!==void 0?ot.state:null,xg(tt);var ut=rt.getDerivedStateFromProps;typeof ut=="function"&&Gg(tt,rt,ut,et),ot.updater=Kg,tt.stateNode=ot,ot._reactInternals=tt,Og(tt,rt,et,nt),tt=qi(null,tt,rt,!0,st,nt)}else tt.tag=0,fi(null,tt,ot,nt),tt=tt.child;return tt;case 16:ot=tt.elementType;e:{switch(et!==null&&(et.alternate=null,tt.alternate=null,tt.flags|=2),et=tt.pendingProps,st=ot._init,ot=st(ot._payload),tt.type=ot,st=tt.tag=hk(ot),et=lg(ot,et),st){case 0:tt=li$1(null,tt,ot,et,nt);break e;case 1:tt=pi$4(null,tt,ot,et,nt);break e;case 11:tt=gi(null,tt,ot,et,nt);break e;case 14:tt=ii(null,tt,ot,lg(ot.type,et),rt,nt);break e}throw Error(y$7(306,ot,""))}return tt;case 0:return rt=tt.type,ot=tt.pendingProps,ot=tt.elementType===rt?ot:lg(rt,ot),li$1(et,tt,rt,ot,nt);case 1:return rt=tt.type,ot=tt.pendingProps,ot=tt.elementType===rt?ot:lg(rt,ot),pi$4(et,tt,rt,ot,nt);case 3:if(ri(tt),rt=tt.updateQueue,et===null||rt===null)throw Error(y$7(282));if(rt=tt.pendingProps,ot=tt.memoizedState,ot=ot!==null?ot.element:null,yg(et,tt),Cg(tt,rt,null,nt),rt=tt.memoizedState.element,rt===ot)sh(),tt=hi(et,tt,nt);else{if(ot=tt.stateNode,(st=ot.hydrate)&&(kh=rf(tt.stateNode.containerInfo.firstChild),jh=tt,st=lh=!0),st){if(et=ot.mutableSourceEagerHydrationData,et!=null)for(ot=0;ot<et.length;ot+=2)st=et[ot],st._workInProgressVersionPrimary=et[ot+1],th.push(st);for(nt=Zg(tt,null,rt,nt),tt.child=nt;nt;)nt.flags=nt.flags&-3|1024,nt=nt.sibling}else fi(et,tt,rt,nt),sh();tt=tt.child}return tt;case 5:return gh(tt),et===null&&ph(tt),rt=tt.type,ot=tt.pendingProps,st=et!==null?et.memoizedProps:null,ut=ot.children,nf(rt,ot)?ut=null:st!==null&&nf(rt,st)&&(tt.flags|=16),oi(et,tt),fi(et,tt,ut,nt),tt.child;case 6:return et===null&&ph(tt),null;case 13:return ti(et,tt,nt);case 4:return eh(tt,tt.stateNode.containerInfo),rt=tt.pendingProps,et===null?tt.child=Yg(tt,null,rt,nt):fi(et,tt,rt,nt),tt.child;case 11:return rt=tt.type,ot=tt.pendingProps,ot=tt.elementType===rt?ot:lg(rt,ot),gi(et,tt,rt,ot,nt);case 7:return fi(et,tt,tt.pendingProps,nt),tt.child;case 8:return fi(et,tt,tt.pendingProps.children,nt),tt.child;case 12:return fi(et,tt,tt.pendingProps.children,nt),tt.child;case 10:e:{rt=tt.type._context,ot=tt.pendingProps,ut=tt.memoizedProps,st=ot.value;var ct=tt.type._context;if(I$3(mg,ct._currentValue),ct._currentValue=st,ut!==null)if(ct=ut.value,st=He$1(ct,st)?0:(typeof rt._calculateChangedBits=="function"?rt._calculateChangedBits(ct,st):1073741823)|0,st===0){if(ut.children===ot.children&&!N$2.current){tt=hi(et,tt,nt);break e}}else for(ct=tt.child,ct!==null&&(ct.return=tt);ct!==null;){var ft=ct.dependencies;if(ft!==null){ut=ct.child;for(var pt=ft.firstContext;pt!==null;){if(pt.context===rt&&(pt.observedBits&st)!==0){ct.tag===1&&(pt=zg(-1,nt&-nt),pt.tag=2,Ag(ct,pt)),ct.lanes|=nt,pt=ct.alternate,pt!==null&&(pt.lanes|=nt),sg(ct.return,nt),ft.lanes|=nt;break}pt=pt.next}}else ut=ct.tag===10&&ct.type===tt.type?null:ct.child;if(ut!==null)ut.return=ct;else for(ut=ct;ut!==null;){if(ut===tt){ut=null;break}if(ct=ut.sibling,ct!==null){ct.return=ut.return,ut=ct;break}ut=ut.return}ct=ut}fi(et,tt,ot.children,nt),tt=tt.child}return tt;case 9:return ot=tt.type,st=tt.pendingProps,rt=st.children,tg(tt,nt),ot=vg(ot,st.unstable_observedBits),rt=rt(ot),tt.flags|=1,fi(et,tt,rt,nt),tt.child;case 14:return ot=tt.type,st=lg(ot,tt.pendingProps),st=lg(ot.type,st),ii(et,tt,ot,st,rt,nt);case 15:return ki(et,tt,tt.type,tt.pendingProps,rt,nt);case 17:return rt=tt.type,ot=tt.pendingProps,ot=tt.elementType===rt?ot:lg(rt,ot),et!==null&&(et.alternate=null,tt.alternate=null,tt.flags|=2),tt.tag=1,Ff(rt)?(et=!0,Jf(tt)):et=!1,tg(tt,nt),Mg(tt,rt,ot),Og(tt,rt,ot,nt),qi(null,tt,rt,!0,et,nt);case 19:return Ai(et,tt,nt);case 23:return mi(et,tt,nt);case 24:return mi(et,tt,nt)}throw Error(y$7(156,tt.tag))};function ik(et,tt,nt,rt){this.tag=et,this.key=nt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=tt,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=rt,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function nh(et,tt,nt,rt){return new ik(et,tt,nt,rt)}function ji(et){return et=et.prototype,!(!et||!et.isReactComponent)}function hk(et){if(typeof et=="function")return ji(et)?1:0;if(et!=null){if(et=et.$$typeof,et===Aa)return 11;if(et===Da)return 14}return 2}function Tg(et,tt){var nt=et.alternate;return nt===null?(nt=nh(et.tag,tt,et.key,et.mode),nt.elementType=et.elementType,nt.type=et.type,nt.stateNode=et.stateNode,nt.alternate=et,et.alternate=nt):(nt.pendingProps=tt,nt.type=et.type,nt.flags=0,nt.nextEffect=null,nt.firstEffect=null,nt.lastEffect=null),nt.childLanes=et.childLanes,nt.lanes=et.lanes,nt.child=et.child,nt.memoizedProps=et.memoizedProps,nt.memoizedState=et.memoizedState,nt.updateQueue=et.updateQueue,tt=et.dependencies,nt.dependencies=tt===null?null:{lanes:tt.lanes,firstContext:tt.firstContext},nt.sibling=et.sibling,nt.index=et.index,nt.ref=et.ref,nt}function Vg(et,tt,nt,rt,ot,st){var ut=2;if(rt=et,typeof et=="function")ji(et)&&(ut=1);else if(typeof et=="string")ut=5;else e:switch(et){case ua:return Xg(nt.children,ot,st,tt);case Ha:ut=8,ot|=16;break;case wa:ut=8,ot|=1;break;case xa:return et=nh(12,nt,tt,ot|8),et.elementType=xa,et.type=xa,et.lanes=st,et;case Ba:return et=nh(13,nt,tt,ot),et.type=Ba,et.elementType=Ba,et.lanes=st,et;case Ca:return et=nh(19,nt,tt,ot),et.elementType=Ca,et.lanes=st,et;case Ia:return vi(nt,ot,st,tt);case Ja:return et=nh(24,nt,tt,ot),et.elementType=Ja,et.lanes=st,et;default:if(typeof et=="object"&&et!==null)switch(et.$$typeof){case ya:ut=10;break e;case za:ut=9;break e;case Aa:ut=11;break e;case Da:ut=14;break e;case Ea:ut=16,rt=null;break e;case Fa:ut=22;break e}throw Error(y$7(130,et==null?et:typeof et,""))}return tt=nh(ut,nt,tt,ot),tt.elementType=et,tt.type=rt,tt.lanes=st,tt}function Xg(et,tt,nt,rt){return et=nh(7,et,rt,tt),et.lanes=nt,et}function vi(et,tt,nt,rt){return et=nh(23,et,rt,tt),et.elementType=Ia,et.lanes=nt,et}function Ug(et,tt,nt){return et=nh(6,et,null,tt),et.lanes=nt,et}function Wg(et,tt,nt){return tt=nh(4,et.children!==null?et.children:[],et.key,tt),tt.lanes=nt,tt.stateNode={containerInfo:et.containerInfo,pendingChildren:null,implementation:et.implementation},tt}function jk(et,tt,nt){this.tag=tt,this.containerInfo=et,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=nt,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Zc(0),this.expirationTimes=Zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zc(0),this.mutableSourceEagerHydrationData=null}function kk(et,tt,nt){var rt=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ta,key:rt==null?null:""+rt,children:et,containerInfo:tt,implementation:nt}}function lk(et,tt,nt,rt){var ot=tt.current,st=Hg(),ut=Ig(ot);e:if(nt){nt=nt._reactInternals;t:{if(Zb(nt)!==nt||nt.tag!==1)throw Error(y$7(170));var ct=nt;do{switch(ct.tag){case 3:ct=ct.stateNode.context;break t;case 1:if(Ff(ct.type)){ct=ct.stateNode.__reactInternalMemoizedMergedChildContext;break t}}ct=ct.return}while(ct!==null);throw Error(y$7(171))}if(nt.tag===1){var ft=nt.type;if(Ff(ft)){nt=If(nt,ft,ct);break e}}nt=ct}else nt=Cf;return tt.context===null?tt.context=nt:tt.pendingContext=nt,tt=zg(st,ut),tt.payload={element:et},rt=rt===void 0?null:rt,rt!==null&&(tt.callback=rt),Ag(ot,tt),Jg(ot,ut,st),ut}function mk(et){if(et=et.current,!et.child)return null;switch(et.child.tag){case 5:return et.child.stateNode;default:return et.child.stateNode}}function nk(et,tt){if(et=et.memoizedState,et!==null&&et.dehydrated!==null){var nt=et.retryLane;et.retryLane=nt!==0&&nt<tt?nt:tt}}function ok$6(et,tt){nk(et,tt),(et=et.alternate)&&nk(et,tt)}function pk(){return null}function qk(et,tt,nt){var rt=nt!=null&&nt.hydrationOptions!=null&&nt.hydrationOptions.mutableSources||null;if(nt=new jk(et,tt,nt!=null&&nt.hydrate===!0),tt=nh(3,null,null,tt===2?7:tt===1?3:0),nt.current=tt,tt.stateNode=nt,xg(tt),et[ff]=nt.current,cf(et.nodeType===8?et.parentNode:et),rt)for(et=0;et<rt.length;et++){tt=rt[et];var ot=tt._getVersion;ot=ot(tt._source),nt.mutableSourceEagerHydrationData==null?nt.mutableSourceEagerHydrationData=[tt,ot]:nt.mutableSourceEagerHydrationData.push(tt,ot)}this._internalRoot=nt}qk.prototype.render=function(et){lk(et,this._internalRoot,null,null)};qk.prototype.unmount=function(){var et=this._internalRoot,tt=et.containerInfo;lk(null,et,null,function(){tt[ff]=null})};function rk(et){return!(!et||et.nodeType!==1&&et.nodeType!==9&&et.nodeType!==11&&(et.nodeType!==8||et.nodeValue!==" react-mount-point-unstable "))}function sk(et,tt){if(tt||(tt=et?et.nodeType===9?et.documentElement:et.firstChild:null,tt=!(!tt||tt.nodeType!==1||!tt.hasAttribute("data-reactroot"))),!tt)for(var nt;nt=et.lastChild;)et.removeChild(nt);return new qk(et,0,tt?{hydrate:!0}:void 0)}function tk(et,tt,nt,rt,ot){var st=nt._reactRootContainer;if(st){var ut=st._internalRoot;if(typeof ot=="function"){var ct=ot;ot=function(){var pt=mk(ut);ct.call(pt)}}lk(tt,ut,et,ot)}else{if(st=nt._reactRootContainer=sk(nt,rt),ut=st._internalRoot,typeof ot=="function"){var ft=ot;ot=function(){var pt=mk(ut);ft.call(pt)}}Xj(function(){lk(tt,ut,et,ot)})}return mk(ut)}ec=function(et){if(et.tag===13){var tt=Hg();Jg(et,4,tt),ok$6(et,4)}};fc=function(et){if(et.tag===13){var tt=Hg();Jg(et,67108864,tt),ok$6(et,67108864)}};gc=function(et){if(et.tag===13){var tt=Hg(),nt=Ig(et);Jg(et,nt,tt),ok$6(et,nt)}};hc=function(et,tt){return tt()};yb=function(et,tt,nt){switch(tt){case"input":if(ab$1(et,nt),tt=nt.name,nt.type==="radio"&&tt!=null){for(nt=et;nt.parentNode;)nt=nt.parentNode;for(nt=nt.querySelectorAll("input[name="+JSON.stringify(""+tt)+'][type="radio"]'),tt=0;tt<nt.length;tt++){var rt=nt[tt];if(rt!==et&&rt.form===et.form){var ot=Db(rt);if(!ot)throw Error(y$7(90));Wa(rt),ab$1(rt,ot)}}}break;case"textarea":ib(et,nt);break;case"select":tt=nt.value,tt!=null&&fb(et,!!nt.multiple,tt,!1)}};Gb=Wj;Hb=function(et,tt,nt,rt,ot){var st=X$4;X$4|=4;try{return gg(98,et.bind(null,tt,nt,rt,ot))}finally{X$4=st,X$4===0&&(wj(),ig())}};Ib=function(){(X$4&49)===0&&(Vj(),Oj())};Jb=function(et,tt){var nt=X$4;X$4|=2;try{return et(tt)}finally{X$4=nt,X$4===0&&(wj(),ig())}};function uk$1(et,tt){var nt=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rk(tt))throw Error(y$7(200));return kk(et,tt,null,nt)}var vk={Events:[Cb,ue$1,Db,Eb,Fb,Oj,{current:!1}]},wk={findFiberByHostInstance:wc$1,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},xk={bundleType:wk.bundleType,version:wk.version,rendererPackageName:wk.rendererPackageName,rendererConfig:wk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ra.ReactCurrentDispatcher,findHostInstanceByFiber:function(et){return et=cc(et),et===null?null:et.stateNode},findFiberByHostInstance:wk.findFiberByHostInstance||pk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yk.isDisabled&&yk.supportsFiber)try{Lf=yk.inject(xk),Mf=yk}catch{}}reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;reactDom_production_min.createPortal=uk$1;reactDom_production_min.findDOMNode=function(et){if(et==null)return null;if(et.nodeType===1)return et;var tt=et._reactInternals;if(tt===void 0)throw typeof et.render=="function"?Error(y$7(188)):Error(y$7(268,Object.keys(et)));return et=cc(tt),et=et===null?null:et.stateNode,et};reactDom_production_min.flushSync=function(et,tt){var nt=X$4;if((nt&48)!==0)return et(tt);X$4|=1;try{if(et)return gg(99,et.bind(null,tt))}finally{X$4=nt,ig()}};reactDom_production_min.hydrate=function(et,tt,nt){if(!rk(tt))throw Error(y$7(200));return tk(null,et,tt,!0,nt)};reactDom_production_min.render=function(et,tt,nt){if(!rk(tt))throw Error(y$7(200));return tk(null,et,tt,!1,nt)};reactDom_production_min.unmountComponentAtNode=function(et){if(!rk(et))throw Error(y$7(40));return et._reactRootContainer?(Xj(function(){tk(null,null,et,!1,function(){et._reactRootContainer=null,et[ff]=null})}),!0):!1};reactDom_production_min.unstable_batchedUpdates=Wj;reactDom_production_min.unstable_createPortal=function(et,tt){return uk$1(et,tt,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};reactDom_production_min.unstable_renderSubtreeIntoContainer=function(et,tt,nt,rt){if(!rk(nt))throw Error(y$7(200));if(et==null||et._reactInternals===void 0)throw Error(y$7(38));return tk(et,tt,nt,!1,rt)};reactDom_production_min.version="17.0.2";(function(et){function tt(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tt)}catch(nt){console.error(nt)}}tt(),et.exports=reactDom_production_min})(reactDom);const ReactDOM=getDefaultExportFromCjs$1(reactDom.exports),WEAVE_BACKEND_HOST=window.CONFIG?.WEAVE_BACKEND_HOST??"",backendWeaveExecutionUrl=(et=!1)=>et?WEAVE_BACKEND_HOST+"/shadow_execute":WEAVE_BACKEND_HOST+"/execute",backendWeaveOpsUrl=()=>WEAVE_BACKEND_HOST+"/ops",backendWeaveViewerUrl=()=>WEAVE_BACKEND_HOST+"/wb_viewer",DEFAULT_CONFIG={urlPrefixed:et=>et,backendWeaveExecutionUrl,backendWeaveOpsUrl,backendWeaveViewerUrl,ENABLE_DEBUG_FEATURES:!1};let config$1={...DEFAULT_CONFIG};function getConfig(){return config$1}var lodash$2={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */(function(et,tt){(function(){var nt,rt="4.17.21",ot=200,st="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",ut="Expected a function",ct="Invalid `variable` option passed into `_.template`",ft="__lodash_hash_undefined__",pt=500,ht="__lodash_placeholder__",mt=1,yt=2,vt=4,Tt=1,Et=2,xt=1,At=2,Ct=4,$t=8,Ot=16,Rt=32,It=64,kt=128,Mt=256,Ft=512,zt=30,Vt="...",Zt=800,Ut=16,Xt=1,Jt=2,gn=3,An=1/0,sn=9007199254740991,Sn=17976931348623157e292,In=0/0,_n=4294967295,En=_n-1,Ln=_n>>>1,wn=[["ary",kt],["bind",xt],["bindKey",At],["curry",$t],["curryRight",Ot],["flip",Ft],["partial",Rt],["partialRight",It],["rearg",Mt]],Dn="[object Arguments]",$n="[object Array]",Gn="[object AsyncFunction]",Jn="[object Boolean]",zn="[object Date]",Qn="[object DOMException]",Bn="[object Error]",jn="[object Function]",Ar="[object GeneratorFunction]",Er="[object Map]",Pr="[object Number]",Nr="[object Null]",Ir="[object Object]",no="[object Promise]",ro="[object Proxy]",ao="[object RegExp]",Xr="[object Set]",Jr="[object String]",So="[object Symbol]",va="[object Undefined]",$o="[object WeakMap]",Qr="[object WeakSet]",jo="[object ArrayBuffer]",Bo="[object DataView]",ss="[object Float32Array]",Us="[object Float64Array]",Eo="[object Int8Array]",Do="[object Int16Array]",bo="[object Int32Array]",Vo="[object Uint8Array]",Ts="[object Uint8ClampedArray]",xs="[object Uint16Array]",Qo="[object Uint32Array]",Gs=/\b__p \+= '';/g,Es=/\b(__p \+=) '' \+/g,Il=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ws=/&(?:amp|lt|gt|quot|#39);/g,vn=/[&<>"']/g,Rn=RegExp(ws.source),Zr=RegExp(vn.source),Wn=/<%-([\s\S]+?)%>/g,Kn=/<%([\s\S]+?)%>/g,Ur=/<%=([\s\S]+?)%>/g,Kr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Go=/^\w*$/,io=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hr=/[\\^$.*+?()[\]{}|]/g,Lo=RegExp(Hr.source),Ro=/^\s+/,No=/\s/,lr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ho=/\{\n\/\* \[wrapped with (.+)\] \*/,Cr=/,? & /,Bs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dl=/[()=,{}\[\]\/\s]/,Sl=/\\(\\)?/g,Os=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dl=/\w*$/,As=/^[-+]0x[0-9a-f]+$/i,ol=/^0b[01]+$/i,_l=/^\[object .+?Constructor\]$/,Ul=/^0o[0-7]+$/i,zo=/^(?:0|[1-9]\d*)$/,Zo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Cs=/($^)/,Rs=/['\n\r\u2028\u2029\\]/g,Nl="\\ud800-\\udfff",wu="\\u0300-\\u036f",um="\\ufe20-\\ufe2f",yu="\\u20d0-\\u20ff",Ou=wu+um+yu,o1="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Bm="\\xac\\xb1\\xd7\\xf7",m0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vp="\\u2000-\\u206f",s1=" \\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",Wp="A-Z\\xc0-\\xd6\\xd8-\\xde",bp="\\ufe0e\\ufe0f",Yo=Bm+m0+vp+s1,ko="['\u2019]",po="["+Nl+"]",qo="["+Yo+"]",Wl="["+Ou+"]",Vl="\\d+",Zs="["+o1+"]",_d="["+Ru+"]",vu="[^"+Nl+Yo+Vl+o1+Ru+Wp+"]",Tp="\\ud83c[\\udffb-\\udfff]",P1="(?:"+Wl+"|"+Tp+")",cm="[^"+Nl+"]",Ep="(?:\\ud83c[\\udde6-\\uddff]){2}",Ap="[\\ud800-\\udbff][\\udc00-\\udfff]",_f="["+Wp+"]",uu="\\u200d",Hp="(?:"+_d+"|"+vu+")",$v="(?:"+_f+"|"+vu+")",by="(?:"+ko+"(?:d|ll|m|re|s|t|ve))?",g0="(?:"+ko+"(?:D|LL|M|RE|S|T|VE))?",Ty=P1+"?",Ey="["+bp+"]?",zm="(?:"+uu+"(?:"+[cm,Ep,Ap].join("|")+")"+Ey+Ty+")*",v0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",dm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",xp=Ey+Ty+zm,Up="(?:"+[Zs,Ep,Ap].join("|")+")"+xp,wv="(?:"+[cm+Wl+"?",Wl,Ep,Ap,po].join("|")+")",Wr=RegExp(ko,"g"),ks=RegExp(Wl,"g"),Jl=RegExp(Tp+"(?="+Tp+")|"+wv+xp,"g"),M1=RegExp([_f+"?"+_d+"+"+by+"(?="+[qo,_f,"$"].join("|")+")",$v+"+"+g0+"(?="+[qo,_f+Hp,"$"].join("|")+")",_f+"?"+Hp+"+"+by,_f+"+"+g0,dm,v0,Vl,Up].join("|"),"g"),Iu=RegExp("["+uu+Nl+Ou+bp+"]"),Ay=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wm=["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"],Bl=-1,gl={};gl[ss]=gl[Us]=gl[Eo]=gl[Do]=gl[bo]=gl[Vo]=gl[Ts]=gl[xs]=gl[Qo]=!0,gl[Dn]=gl[$n]=gl[jo]=gl[Jn]=gl[Bo]=gl[zn]=gl[Bn]=gl[jn]=gl[Er]=gl[Pr]=gl[Ir]=gl[ao]=gl[Xr]=gl[Jr]=gl[$o]=!1;var Qs={};Qs[Dn]=Qs[$n]=Qs[jo]=Qs[Bo]=Qs[Jn]=Qs[zn]=Qs[ss]=Qs[Us]=Qs[Eo]=Qs[Do]=Qs[bo]=Qs[Er]=Qs[Pr]=Qs[Ir]=Qs[ao]=Qs[Xr]=Qs[Jr]=Qs[So]=Qs[Vo]=Qs[Ts]=Qs[xs]=Qs[Qo]=!0,Qs[Bn]=Qs[jn]=Qs[$o]=!1;var b0={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},xy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jm={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Cp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hm=parseFloat,ds=parseInt,Sp=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,iu=typeof self=="object"&&self&&self.Object===Object&&self,Pl=Sp||iu||Function("return this")(),T0=tt&&!tt.nodeType&&tt,l1=T0&&!0&&et&&!et.nodeType&&et,Cy=l1&&l1.exports===T0,E0=Cy&&Sp.process,qs=function(){try{var Dr=l1&&l1.require&&l1.require("util").types;return Dr||E0&&E0.binding&&E0.binding("util")}catch{}}(),ep=qs&&qs.isArrayBuffer,A0=qs&&qs.isDate,C0=qs&&qs.isMap,fm=qs&&qs.isRegExp,F1=qs&&qs.isSet,Js=qs&&qs.isTypedArray;function Gl(Dr,eo,qr){switch(qr.length){case 0:return Dr.call(eo);case 1:return Dr.call(eo,qr[0]);case 2:return Dr.call(eo,qr[0],qr[1]);case 3:return Dr.call(eo,qr[0],qr[1],qr[2])}return Dr.apply(eo,qr)}function pm(Dr,eo,qr,Jo){for(var Ps=-1,Ys=Dr==null?0:Dr.length;++Ps<Ys;){var Kl=Dr[Ps];eo(Jo,Kl,qr(Kl),Dr)}return Jo}function ql(Dr,eo){for(var qr=-1,Jo=Dr==null?0:Dr.length;++qr<Jo&&eo(Dr[qr],qr,Dr)!==!1;);return Dr}function cu(Dr,eo){for(var qr=Dr==null?0:Dr.length;qr--&&eo(Dr[qr],qr,Dr)!==!1;);return Dr}function L1(Dr,eo){for(var qr=-1,Jo=Dr==null?0:Dr.length;++qr<Jo;)if(!eo(Dr[qr],qr,Dr))return!1;return!0}function tp(Dr,eo){for(var qr=-1,Jo=Dr==null?0:Dr.length,Ps=0,Ys=[];++qr<Jo;){var Kl=Dr[qr];eo(Kl,qr,Dr)&&(Ys[Ps++]=Kl)}return Ys}function xo(Dr,eo){var qr=Dr==null?0:Dr.length;return!!qr&&u1(Dr,eo,0)>-1}function bu(Dr,eo,qr){for(var Jo=-1,Ps=Dr==null?0:Dr.length;++Jo<Ps;)if(qr(eo,Dr[Jo]))return!0;return!1}function $l(Dr,eo){for(var qr=-1,Jo=Dr==null?0:Dr.length,Ps=Array(Jo);++qr<Jo;)Ps[qr]=eo(Dr[qr],qr,Dr);return Ps}function Du(Dr,eo){for(var qr=-1,Jo=eo.length,Ps=Dr.length;++qr<Jo;)Dr[Ps+qr]=eo[qr];return Dr}function du(Dr,eo,qr,Jo){var Ps=-1,Ys=Dr==null?0:Dr.length;for(Jo&&Ys&&(qr=Dr[++Ps]);++Ps<Ys;)qr=eo(qr,Dr[Ps],Ps,Dr);return qr}function Vp(Dr,eo,qr,Jo){var Ps=Dr==null?0:Dr.length;for(Jo&&Ps&&(qr=Dr[--Ps]);Ps--;)qr=eo(qr,Dr[Ps],Ps,Dr);return qr}function Ol(Dr,eo){for(var qr=-1,Jo=Dr==null?0:Dr.length;++qr<Jo;)if(eo(Dr[qr],qr,Dr))return!0;return!1}var Um=_0("length");function Sy(Dr){return Dr.split("")}function _y(Dr){return Dr.match(Bs)||[]}function S0(Dr,eo,qr){var Jo;return qr(Dr,function(Ps,Ys,Kl){if(eo(Ps,Ys,Kl))return Jo=Ys,!1}),Jo}function _p(Dr,eo,qr,Jo){for(var Ps=Dr.length,Ys=qr+(Jo?1:-1);Jo?Ys--:++Ys<Ps;)if(eo(Dr[Ys],Ys,Dr))return Ys;return-1}function u1(Dr,eo,qr){return eo===eo?P0(Dr,eo,qr):_p(Dr,$y,qr)}function B1(Dr,eo,qr,Jo){for(var Ps=qr-1,Ys=Dr.length;++Ps<Ys;)if(Jo(Dr[Ps],eo))return Ps;return-1}function $y(Dr){return Dr!==Dr}function Vm(Dr,eo){var qr=Dr==null?0:Dr.length;return qr?hm(Dr,eo)/qr:In}function _0(Dr){return function(eo){return eo==null?nt:eo[Dr]}}function $0(Dr){return function(eo){return Dr==null?nt:Dr[eo]}}function sp(Dr,eo,qr,Jo,Ps){return Ps(Dr,function(Ys,Kl,sl){qr=Jo?(Jo=!1,Ys):eo(qr,Ys,Kl,sl)}),qr}function w0(Dr,eo){var qr=Dr.length;for(Dr.sort(eo);qr--;)Dr[qr]=Dr[qr].value;return Dr}function hm(Dr,eo){for(var qr,Jo=-1,Ps=Dr.length;++Jo<Ps;){var Ys=eo(Dr[Jo]);Ys!==nt&&(qr=qr===nt?Ys:qr+Ys)}return qr}function O0(Dr,eo){for(var qr=-1,Jo=Array(Dr);++qr<Dr;)Jo[qr]=eo(qr);return Jo}function Gm(Dr,eo){return $l(eo,function(qr){return[qr,Dr[qr]]})}function R0(Dr){return Dr&&Dr.slice(0,Ry(Dr)+1).replace(Ro,"")}function Nu(Dr){return function(eo){return Dr(eo)}}function c1(Dr,eo){return $l(eo,function(qr){return Dr[qr]})}function d1(Dr,eo){return Dr.has(eo)}function I0(Dr,eo){for(var qr=-1,Jo=Dr.length;++qr<Jo&&u1(eo,Dr[qr],0)>-1;);return qr}function D0(Dr,eo){for(var qr=Dr.length;qr--&&u1(eo,Dr[qr],0)>-1;);return qr}function Ov(Dr,eo){for(var qr=Dr.length,Jo=0;qr--;)Dr[qr]===eo&&++Jo;return Jo}var wy=$0(b0),$p=$0(xy);function z1(Dr){return"\\"+Cp[Dr]}function N0(Dr,eo){return Dr==null?nt:Dr[eo]}function Gp(Dr){return Iu.test(Dr)}function k0(Dr){return Ay.test(Dr)}function f1(Dr){for(var eo,qr=[];!(eo=Dr.next()).done;)qr.push(eo.value);return qr}function qp(Dr){var eo=-1,qr=Array(Dr.size);return Dr.forEach(function(Jo,Ps){qr[++eo]=[Ps,Jo]}),qr}function j1(Dr,eo){return function(qr){return Dr(eo(qr))}}function Kp(Dr,eo){for(var qr=-1,Jo=Dr.length,Ps=0,Ys=[];++qr<Jo;){var Kl=Dr[qr];(Kl===eo||Kl===ht)&&(Dr[qr]=ht,Ys[Ps++]=qr)}return Ys}function p1(Dr){var eo=-1,qr=Array(Dr.size);return Dr.forEach(function(Jo){qr[++eo]=Jo}),qr}function h1(Dr){var eo=-1,qr=Array(Dr.size);return Dr.forEach(function(Jo){qr[++eo]=[Jo,Jo]}),qr}function P0(Dr,eo,qr){for(var Jo=qr-1,Ps=Dr.length;++Jo<Ps;)if(Dr[Jo]===eo)return Jo;return-1}function Oy(Dr,eo,qr){for(var Jo=qr+1;Jo--;)if(Dr[Jo]===eo)return Jo;return Jo}function m1(Dr){return Gp(Dr)?M0(Dr):Um(Dr)}function qu(Dr){return Gp(Dr)?Dy(Dr):Sy(Dr)}function Ry(Dr){for(var eo=Dr.length;eo--&&No.test(Dr.charAt(eo)););return eo}var Iy=$0(jm);function M0(Dr){for(var eo=Jl.lastIndex=0;Jl.test(Dr);)++eo;return eo}function Dy(Dr){return Dr.match(Jl)||[]}function Yp(Dr){return Dr.match(M1)||[]}var Ny=function Dr(eo){eo=eo==null?Pl:H1.defaults(Pl.Object(),eo,H1.pick(Pl,Wm));var qr=eo.Array,Jo=eo.Date,Ps=eo.Error,Ys=eo.Function,Kl=eo.Math,sl=eo.Object,Xp=eo.RegExp,Zp=eo.String,Ku=eo.TypeError,Yu=qr.prototype,ky=Ys.prototype,U1=sl.prototype,mm=eo["__core-js_shared__"],qm=ky.toString,El=U1.hasOwnProperty,Py=0,gm=function(){var Dt=/[^.]+$/.exec(mm&&mm.keys&&mm.keys.IE_PROTO||"");return Dt?"Symbol(src)_1."+Dt:""}(),ym=U1.toString,F0=qm.call(sl),My=Pl._,Fy=Xp("^"+qm.call(El).replace(Hr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V1=Cy?eo.Buffer:nt,Hu=eo.Symbol,vm=eo.Uint8Array,G1=V1?V1.allocUnsafe:nt,bm=j1(sl.getPrototypeOf,sl),L0=sl.create,Tm=U1.propertyIsEnumerable,q1=Yu.splice,Km=Hu?Hu.isConcatSpreadable:nt,ku=Hu?Hu.iterator:nt,Uu=Hu?Hu.toStringTag:nt,wp=function(){try{var Dt=am(sl,"defineProperty");return Dt({},"",{}),Dt}catch{}}(),Ly=eo.clearTimeout!==Pl.clearTimeout&&eo.clearTimeout,By=Jo&&Jo.now!==Pl.Date.now&&Jo.now,zy=eo.setTimeout!==Pl.setTimeout&&eo.setTimeout,Op=Kl.ceil,g1=Kl.floor,lp=sl.getOwnPropertySymbols,Rv=V1?V1.isBuffer:nt,B0=eo.isFinite,Iv=Yu.join,yl=j1(sl.keys,sl),jl=Kl.max,Hl=Kl.min,ll=Jo.now,Cl=eo.parseInt,rs=Kl.random,j0=Yu.reverse,Ym=am(eo,"DataView"),K1=am(eo,"Map"),H0=am(eo,"Promise"),Tu=am(eo,"Set"),Pu=am(eo,"WeakMap"),Qp=am(sl,"create"),Xm=Pu&&new Pu,Q1={},Dv=Nm(Ym),U0=Nm(K1),Nv=Nm(H0),Wy=Nm(Tu),jy=Nm(Pu),Zm=Hu?Hu.prototype:nt,Jp=Zm?Zm.valueOf:nt,Hy=Zm?Zm.toString:nt;function Tn(Dt){if(hs(Dt)&&!Ao(Dt)&&!(Dt instanceof nl)){if(Dt instanceof Mu)return Dt;if(El.call(Dt,"__wrapped__"))return MT(Dt)}return new Mu(Dt)}var vl=function(){function Dt(){}return function(Bt){if(!$s(Bt))return{};if(L0)return L0(Bt);Dt.prototype=Bt;var pn=new Dt;return Dt.prototype=nt,pn}}();function J1(){}function Mu(Dt,Bt){this.__wrapped__=Dt,this.__actions__=[],this.__chain__=!!Bt,this.__index__=0,this.__values__=nt}Tn.templateSettings={escape:Wn,evaluate:Kn,interpolate:Ur,variable:"",imports:{_:Tn}},Tn.prototype=J1.prototype,Tn.prototype.constructor=Tn,Mu.prototype=vl(J1.prototype),Mu.prototype.constructor=Mu;function nl(Dt){this.__wrapped__=Dt,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=_n,this.__views__=[]}function cp(){var Dt=new nl(this.__wrapped__);return Dt.__actions__=hu(this.__actions__),Dt.__dir__=this.__dir__,Dt.__filtered__=this.__filtered__,Dt.__iteratees__=hu(this.__iteratees__),Dt.__takeCount__=this.__takeCount__,Dt.__views__=hu(this.__views__),Dt}function Rp(){if(this.__filtered__){var Dt=new nl(this);Dt.__dir__=-1,Dt.__filtered__=!0}else Dt=this.clone(),Dt.__dir__*=-1;return Dt}function Ip(){var Dt=this.__wrapped__.value(),Bt=this.__dir__,pn=Ao(Dt),On=Bt<0,Vn=pn?Dt.length:0,sr=pv(0,Vn,this.__views__),xr=sr.start,wr=sr.end,Lr=wr-xr,go=On?wr:xr-1,yo=this.__iteratees__,_o=yo.length,Xo=0,bs=Hl(Lr,this.__takeCount__);if(!pn||!On&&Vn==Lr&&bs==Lr)return vT(Dt,this.__actions__);var Ds=[];e:for(;Lr--&&Xo<bs;){go+=Bt;for(var al=-1,Ns=Dt[go];++al<_o;){var hl=yo[al],Tl=hl.iteratee,Bp=hl.type,op=Tl(Ns);if(Bp==Jt)Ns=op;else if(!op){if(Bp==Xt)continue e;break e}}Ds[Xo++]=Ns}return Ds}nl.prototype=vl(J1.prototype),nl.prototype.constructor=nl;function eu(Dt){var Bt=-1,pn=Dt==null?0:Dt.length;for(this.clear();++Bt<pn;){var On=Dt[Bt];this.set(On[0],On[1])}}function v1(){this.__data__=Qp?Qp(null):{},this.size=0}function Qm(Dt){var Bt=this.has(Dt)&&delete this.__data__[Dt];return this.size-=Bt?1:0,Bt}function Em(Dt){var Bt=this.__data__;if(Qp){var pn=Bt[Dt];return pn===ft?nt:pn}return El.call(Bt,Dt)?Bt[Dt]:nt}function Uy(Dt){var Bt=this.__data__;return Qp?Bt[Dt]!==nt:El.call(Bt,Dt)}function V0(Dt,Bt){var pn=this.__data__;return this.size+=this.has(Dt)?0:1,pn[Dt]=Qp&&Bt===nt?ft:Bt,this}eu.prototype.clear=v1,eu.prototype.delete=Qm,eu.prototype.get=Em,eu.prototype.has=Uy,eu.prototype.set=V0;function Fu(Dt){var Bt=-1,pn=Dt==null?0:Dt.length;for(this.clear();++Bt<pn;){var On=Dt[Bt];this.set(On[0],On[1])}}function Vy(){this.__data__=[],this.size=0}function kv(Dt){var Bt=this.__data__,pn=fl(Bt,Dt);if(pn<0)return!1;var On=Bt.length-1;return pn==On?Bt.pop():q1.call(Bt,pn,1),--this.size,!0}function Am(Dt){var Bt=this.__data__,pn=fl(Bt,Dt);return pn<0?nt:Bt[pn][1]}function xm(Dt){return fl(this.__data__,Dt)>-1}function _h(Dt,Bt){var pn=this.__data__,On=fl(pn,Dt);return On<0?(++this.size,pn.push([Dt,Bt])):pn[On][1]=Bt,this}Fu.prototype.clear=Vy,Fu.prototype.delete=kv,Fu.prototype.get=Am,Fu.prototype.has=xm,Fu.prototype.set=_h;function Ql(Dt){var Bt=-1,pn=Dt==null?0:Dt.length;for(this.clear();++Bt<pn;){var On=Dt[Bt];this.set(On[0],On[1])}}function Mn(){this.size=0,this.__data__={hash:new eu,map:new(K1||Fu),string:new eu}}function jt(Dt){var Bt=cy(this,Dt).delete(Dt);return this.size-=Bt?1:0,Bt}function Kt(Dt){return cy(this,Dt).get(Dt)}function Yt(Dt){return cy(this,Dt).has(Dt)}function mn(Dt,Bt){var pn=cy(this,Dt),On=pn.size;return pn.set(Dt,Bt),this.size+=pn.size==On?0:1,this}Ql.prototype.clear=Mn,Ql.prototype.delete=jt,Ql.prototype.get=Kt,Ql.prototype.has=Yt,Ql.prototype.set=mn;function Cn(Dt){var Bt=-1,pn=Dt==null?0:Dt.length;for(this.__data__=new Ql;++Bt<pn;)this.add(Dt[Bt])}function kn(Dt){return this.__data__.set(Dt,ft),this}function qn(Dt){return this.__data__.has(Dt)}Cn.prototype.add=Cn.prototype.push=kn,Cn.prototype.has=qn;function er(Dt){var Bt=this.__data__=new Fu(Dt);this.size=Bt.size}function pr(){this.__data__=new Fu,this.size=0}function $r(Dt){var Bt=this.__data__,pn=Bt.delete(Dt);return this.size=Bt.size,pn}function Mr(Dt){return this.__data__.get(Dt)}function Yr(Dt){return this.__data__.has(Dt)}function ho(Dt,Bt){var pn=this.__data__;if(pn instanceof Fu){var On=pn.__data__;if(!K1||On.length<ot-1)return On.push([Dt,Bt]),this.size=++pn.size,this;pn=this.__data__=new Ql(On)}return pn.set(Dt,Bt),this.size=pn.size,this}er.prototype.clear=pr,er.prototype.delete=$r,er.prototype.get=Mr,er.prototype.has=Yr,er.prototype.set=ho;function wo(Dt,Bt){var pn=Ao(Dt),On=!pn&&ps(Dt),Vn=!pn&&!On&&ys(Dt),sr=!pn&&!On&&!Vn&&Mp(Dt),xr=pn||On||Vn||sr,wr=xr?O0(Dt.length,Zp):[],Lr=wr.length;for(var go in Dt)(Bt||El.call(Dt,go))&&!(xr&&(go=="length"||Vn&&(go=="offset"||go=="parent")||sr&&(go=="buffer"||go=="byteLength"||go=="byteOffset")||r1(go,Lr)))&&wr.push(go);return wr}function Mo(Dt){var Bt=Dt.length;return Bt?Dt[ou(0,Bt-1)]:nt}function os(Dt,Bt){return Ev(hu(Dt),zl(Bt,0,Dt.length))}function Ms(Dt){return Ev(hu(Dt))}function Fs(Dt,Bt,pn){(pn!==nt&&!Ss(Dt[Bt],pn)||pn===nt&&!(Bt in Dt))&&Al(Dt,Bt,pn)}function Ls(Dt,Bt,pn){var On=Dt[Bt];(!(El.call(Dt,Bt)&&Ss(On,pn))||pn===nt&&!(Bt in Dt))&&Al(Dt,Bt,pn)}function fl(Dt,Bt){for(var pn=Dt.length;pn--;)if(Ss(Dt[pn][0],Bt))return pn;return-1}function ml(Dt,Bt,pn,On){return fu(Dt,function(Vn,sr,xr){Bt(On,Vn,pn(Vn),xr)}),On}function Rl(Dt,Bt){return Dt&&ip(Bt,ju(Bt),Dt)}function Ml(Dt,Bt){return Dt&&ip(Bt,gp(Bt),Dt)}function Al(Dt,Bt,pn){Bt=="__proto__"&&wp?wp(Dt,Bt,{configurable:!0,enumerable:!0,value:pn,writable:!0}):Dt[Bt]=pn}function tu(Dt,Bt){for(var pn=-1,On=Bt.length,Vn=qr(On),sr=Dt==null;++pn<On;)Vn[pn]=sr?nt:bE(Dt,Bt[pn]);return Vn}function zl(Dt,Bt,pn){return Dt===Dt&&(pn!==nt&&(Dt=Dt<=pn?Dt:pn),Bt!==nt&&(Dt=Dt>=Bt?Dt:Bt)),Dt}function Ks(Dt,Bt,pn,On,Vn,sr){var xr,wr=Bt&mt,Lr=Bt&yt,go=Bt&vt;if(pn&&(xr=Vn?pn(Dt,On,Vn,sr):pn(Dt)),xr!==nt)return xr;if(!$s(Dt))return Dt;var yo=Ao(Dt);if(yo){if(xr=dy(Dt),!wr)return hu(Dt,xr)}else{var _o=Xl(Dt),Xo=_o==jn||_o==Ar;if(ys(Dt))return ry(Dt,wr);if(_o==Ir||_o==Dn||Xo&&!Vn){if(xr=Lr||Xo?{}:hv(Dt),!wr)return Lr?v2(Dt,Ml(xr,Dt)):y2(Dt,Rl(xr,Dt))}else{if(!Qs[_o])return Vn?Dt:{};xr=_2(Dt,_o,wr)}}sr||(sr=new er);var bs=sr.get(Dt);if(bs)return bs;sr.set(Dt,xr),D1(Dt)?Dt.forEach(function(Ns){xr.add(Ks(Ns,Bt,pn,Ns,Dt,sr))}):xl(Dt)&&Dt.forEach(function(Ns,hl){xr.set(hl,Ks(Ns,Bt,pn,hl,Dt,sr))});var Ds=go?Lr?Gv:uv:Lr?gp:ju,al=yo?nt:Ds(Dt);return ql(al||Dt,function(Ns,hl){al&&(hl=Ns,Ns=Dt[hl]),Ls(xr,hl,Ks(Ns,Bt,pn,hl,Dt,sr))}),xr}function Xu(Dt){var Bt=ju(Dt);return function(pn){return Dp(pn,Dt,Bt)}}function Dp(Dt,Bt,pn){var On=pn.length;if(Dt==null)return!On;for(Dt=sl(Dt);On--;){var Vn=pn[On],sr=Bt[Vn],xr=Dt[Vn];if(xr===nt&&!(Vn in Dt)||!sr(xr))return!1}return!0}function Zu(Dt,Bt,pn){if(typeof Dt!="function")throw new Ku(ut);return l0(function(){Dt.apply(nt,pn)},Bt)}function Yl(Dt,Bt,pn,On){var Vn=-1,sr=xo,xr=!0,wr=Dt.length,Lr=[],go=Bt.length;if(!wr)return Lr;pn&&(Bt=$l(Bt,Nu(pn))),On?(sr=bu,xr=!1):Bt.length>=ot&&(sr=d1,xr=!1,Bt=new Cn(Bt));e:for(;++Vn<wr;){var yo=Dt[Vn],_o=pn==null?yo:pn(yo);if(yo=On||yo!==0?yo:0,xr&&_o===_o){for(var Xo=go;Xo--;)if(Bt[Xo]===_o)continue e;Lr.push(yo)}else sr(Bt,_o,On)||Lr.push(yo)}return Lr}var fu=jv(rp),dp=jv(e0,!0);function Gy(Dt,Bt){var pn=!0;return fu(Dt,function(On,Vn,sr){return pn=!!Bt(On,Vn,sr),pn}),pn}function Jm(Dt,Bt,pn){for(var On=-1,Vn=Dt.length;++On<Vn;){var sr=Dt[On],xr=Bt(sr);if(xr!=null&&(wr===nt?xr===xr&&!su(xr):pn(xr,wr)))var wr=xr,Lr=sr}return Lr}function b1(Dt,Bt,pn,On){var Vn=Dt.length;for(pn=Vs(pn),pn<0&&(pn=-pn>Vn?0:Vn+pn),On=On===nt||On>Vn?Vn:Vs(On),On<0&&(On+=Vn),On=pn>On?0:a2(On);pn<On;)Dt[pn++]=Bt;return Dt}function np(Dt,Bt){var pn=[];return fu(Dt,function(On,Vn,sr){Bt(On,Vn,sr)&&pn.push(On)}),pn}function kl(Dt,Bt,pn,On,Vn){var sr=-1,xr=Dt.length;for(pn||(pn=IT),Vn||(Vn=[]);++sr<xr;){var wr=Dt[sr];Bt>0&&pn(wr)?Bt>1?kl(wr,Bt-1,pn,On,Vn):Du(Vn,wr):On||(Vn[Vn.length]=wr)}return Vn}var T1=TT(),Cm=TT(!0);function rp(Dt,Bt){return Dt&&T1(Dt,Bt,ju)}function e0(Dt,Bt){return Dt&&Cm(Dt,Bt,ju)}function n0(Dt,Bt){return tp(Bt,function(pn){return To(Dt[pn])})}function Qu(Dt,Bt){Bt=rm(Bt,Dt);for(var pn=0,On=Bt.length;Dt!=null&&pn<On;)Dt=Dt[i1(Bt[pn++])];return pn&&pn==On?Dt:nt}function fp(Dt,Bt,pn){var On=Bt(Dt);return Ao(Dt)?On:Du(On,pn(Dt))}function au(Dt){return Dt==null?Dt===nt?va:Nr:Uu&&Uu in sl(Dt)?RT(Dt):$2(Dt)}function Sm(Dt,Bt){return Dt>Bt}function r0(Dt,Bt){return Dt!=null&&El.call(Dt,Bt)}function f2(Dt,Bt){return Dt!=null&&Bt in sl(Dt)}function qy(Dt,Bt,pn){return Dt>=Hl(Bt,pn)&&Dt<jl(Bt,pn)}function Ky(Dt,Bt,pn){for(var On=pn?bu:xo,Vn=Dt[0].length,sr=Dt.length,xr=sr,wr=qr(sr),Lr=1/0,go=[];xr--;){var yo=Dt[xr];xr&&Bt&&(yo=$l(yo,Nu(Bt))),Lr=Hl(yo.length,Lr),wr[xr]=!pn&&(Bt||Vn>=120&&yo.length>=120)?new Cn(xr&&yo):nt}yo=Dt[0];var _o=-1,Xo=wr[0];e:for(;++_o<Vn&&go.length<Lr;){var bs=yo[_o],Ds=Bt?Bt(bs):bs;if(bs=pn||bs!==0?bs:0,!(Xo?d1(Xo,Ds):On(go,Ds,pn))){for(xr=sr;--xr;){var al=wr[xr];if(!(al?d1(al,Ds):On(Dt[xr],Ds,pn)))continue e}Xo&&Xo.push(Ds),go.push(bs)}}return go}function lT(Dt,Bt,pn,On){return rp(Dt,function(Vn,sr,xr){Bt(On,pn(Vn),sr,xr)}),On}function ul(Dt,Bt,pn){Bt=rm(Bt,Dt),Dt=Dm(Dt,Bt);var On=Dt==null?Dt:Dt[i1(hp(Bt))];return On==null?nt:Gl(On,Dt,pn)}function uT(Dt){return hs(Dt)&&au(Dt)==Dn}function cT(Dt){return hs(Dt)&&au(Dt)==jo}function Yy(Dt){return hs(Dt)&&au(Dt)==zn}function G0(Dt,Bt,pn,On,Vn){return Dt===Bt?!0:Dt==null||Bt==null||!hs(Dt)&&!hs(Bt)?Dt!==Dt&&Bt!==Bt:p2(Dt,Bt,pn,On,G0,Vn)}function p2(Dt,Bt,pn,On,Vn,sr){var xr=Ao(Dt),wr=Ao(Bt),Lr=xr?$n:Xl(Dt),go=wr?$n:Xl(Bt);Lr=Lr==Dn?Ir:Lr,go=go==Dn?Ir:go;var yo=Lr==Ir,_o=go==Ir,Xo=Lr==go;if(Xo&&ys(Dt)){if(!ys(Bt))return!1;xr=!0,yo=!1}if(Xo&&!yo)return sr||(sr=new er),xr||Mp(Dt)?wT(Dt,Bt,pn,On,Vn,sr):S2(Dt,Bt,Lr,pn,On,Vn,sr);if(!(pn&Tt)){var bs=yo&&El.call(Dt,"__wrapped__"),Ds=_o&&El.call(Bt,"__wrapped__");if(bs||Ds){var al=bs?Dt.value():Dt,Ns=Ds?Bt.value():Bt;return sr||(sr=new er),Vn(al,Ns,pn,On,sr)}}return Xo?(sr||(sr=new er),OT(Dt,Bt,pn,On,Vn,sr)):!1}function Xy(Dt){return hs(Dt)&&Xl(Dt)==Er}function Zy(Dt,Bt,pn,On){var Vn=pn.length,sr=Vn,xr=!On;if(Dt==null)return!sr;for(Dt=sl(Dt);Vn--;){var wr=pn[Vn];if(xr&&wr[2]?wr[1]!==Dt[wr[0]]:!(wr[0]in Dt))return!1}for(;++Vn<sr;){wr=pn[Vn];var Lr=wr[0],go=Dt[Lr],yo=wr[1];if(xr&&wr[2]){if(go===nt&&!(Lr in Dt))return!1}else{var _o=new er;if(On)var Xo=On(go,yo,Lr,Dt,Bt,_o);if(!(Xo===nt?G0(yo,go,Tt|Et,On,_o):Xo))return!1}}return!0}function q0(Dt){if(!$s(Dt)||yv(Dt))return!1;var Bt=To(Dt)?Fy:_l;return Bt.test(Nm(Dt))}function Qy(Dt){return hs(Dt)&&au(Dt)==ao}function Eu(Dt){return hs(Dt)&&Xl(Dt)==Xr}function Pv(Dt){return hs(Dt)&&il(Dt.length)&&!!gl[au(Dt)]}function Jy(Dt){return typeof Dt=="function"?Dt:Dt==null?yp:typeof Dt=="object"?Ao(Dt)?E1(Dt[0],Dt[1]):fT(Dt):FE(Dt)}function em(Dt){if(!s0(Dt))return yl(Dt);var Bt=[];for(var pn in sl(Dt))El.call(Dt,pn)&&pn!="constructor"&&Bt.push(pn);return Bt}function h2(Dt){if(!$s(Dt))return NT(Dt);var Bt=s0(Dt),pn=[];for(var On in Dt)On=="constructor"&&(Bt||!El.call(Dt,On))||pn.push(On);return pn}function Mv(Dt,Bt){return Dt<Bt}function dT(Dt,Bt){var pn=-1,On=Ko(Dt)?qr(Dt.length):[];return fu(Dt,function(Vn,sr,xr){On[++pn]=Bt(Vn,sr,xr)}),On}function fT(Dt){var Bt=qv(Dt);return Bt.length==1&&Bt[0][2]?Im(Bt[0][0],Bt[0][1]):function(pn){return pn===Dt||Zy(pn,Dt,Bt)}}function E1(Dt,Bt){return mv(Dt)&&Yv(Bt)?Im(i1(Dt),Bt):function(pn){var On=bE(pn,Dt);return On===nt&&On===Bt?TE(pn,Dt):G0(Bt,On,Tt|Et)}}function K0(Dt,Bt,pn,On,Vn){Dt!==Bt&&T1(Bt,function(sr,xr){if(Vn||(Vn=new er),$s(sr))i0(Dt,Bt,xr,pn,K0,On,Vn);else{var wr=On?On(bv(Dt,xr),sr,xr+"",Dt,Bt,Vn):nt;wr===nt&&(wr=sr),Fs(Dt,xr,wr)}},gp)}function i0(Dt,Bt,pn,On,Vn,sr,xr){var wr=bv(Dt,pn),Lr=bv(Bt,pn),go=xr.get(Lr);if(go){Fs(Dt,pn,go);return}var yo=sr?sr(wr,Lr,pn+"",Dt,Bt,xr):nt,_o=yo===nt;if(_o){var Xo=Ao(Lr),bs=!Xo&&ys(Lr),Ds=!Xo&&!bs&&Mp(Lr);yo=Lr,Xo||bs||Ds?Ao(wr)?yo=wr:gs(wr)?yo=hu(wr):bs?(_o=!1,yo=ry(Lr,!0)):Ds?(_o=!1,yo=Cu(Lr,!0)):yo=[]:zu(Lr)||ps(Lr)?(yo=wr,ps(wr)?yo=s2(wr):(!$s(wr)||To(wr))&&(yo=hv(Lr))):_o=!1}_o&&(xr.set(Lr,yo),Vn(yo,Lr,On,sr,xr),xr.delete(Lr)),Fs(Dt,pn,yo)}function Au(Dt,Bt){var pn=Dt.length;if(!!pn)return Bt+=Bt<0?pn:0,r1(Bt,pn)?Dt[Bt]:nt}function Fv(Dt,Bt,pn){Bt.length?Bt=$l(Bt,function(sr){return Ao(sr)?function(xr){return Qu(xr,sr.length===1?sr[0]:sr)}:sr}):Bt=[yp];var On=-1;Bt=$l(Bt,Nu(_s()));var Vn=dT(Dt,function(sr,xr,wr){var Lr=$l(Bt,function(go){return go(sr)});return{criteria:Lr,index:++On,value:sr}});return w0(Vn,function(sr,xr){return g2(sr,xr,pn)})}function pT(Dt,Bt){return Lv(Dt,Bt,function(pn,On){return TE(Dt,On)})}function Lv(Dt,Bt,pn){for(var On=-1,Vn=Bt.length,sr={};++On<Vn;){var xr=Bt[On],wr=Qu(Dt,xr);pn(wr,xr)&&nm(sr,rm(xr,Dt),wr)}return sr}function hT(Dt){return function(Bt){return Qu(Bt,Dt)}}function ev(Dt,Bt,pn,On){var Vn=On?B1:u1,sr=-1,xr=Bt.length,wr=Dt;for(Dt===Bt&&(Bt=hu(Bt)),pn&&(wr=$l(Dt,Nu(pn)));++sr<xr;)for(var Lr=0,go=Bt[sr],yo=pn?pn(go):go;(Lr=Vn(wr,yo,Lr,On))>-1;)wr!==Dt&&q1.call(wr,Lr,1),q1.call(Dt,Lr,1);return Dt}function Bv(Dt,Bt){for(var pn=Dt?Bt.length:0,On=pn-1;pn--;){var Vn=Bt[pn];if(pn==On||Vn!==sr){var sr=Vn;r1(Vn)?q1.call(Dt,Vn,1):J0(Dt,Vn)}}return Dt}function ou(Dt,Bt){return Dt+g1(rs()*(Bt-Dt+1))}function Fl(Dt,Bt,pn,On){for(var Vn=-1,sr=jl(Op((Bt-Dt)/(pn||1)),0),xr=qr(sr);sr--;)xr[On?sr:++Vn]=Dt,Dt+=pn;return xr}function zv(Dt,Bt){var pn="";if(!Dt||Bt<1||Bt>sn)return pn;do Bt%2&&(pn+=Dt),Bt=g1(Bt/2),Bt&&(Dt+=Dt);while(Bt);return pn}function rl(Dt,Bt){return u0(Xv(Dt,Bt,yp),Dt+"")}function m2(Dt){return Mo(_v(Dt))}function Ll(Dt,Bt){var pn=_v(Dt);return Ev(pn,zl(Bt,0,pn.length))}function nm(Dt,Bt,pn,On){if(!$s(Dt))return Dt;Bt=rm(Bt,Dt);for(var Vn=-1,sr=Bt.length,xr=sr-1,wr=Dt;wr!=null&&++Vn<sr;){var Lr=i1(Bt[Vn]),go=pn;if(Lr==="__proto__"||Lr==="constructor"||Lr==="prototype")return Dt;if(Vn!=xr){var yo=wr[Lr];go=On?On(yo,Lr,wr):nt,go===nt&&(go=$s(yo)?yo:r1(Bt[Vn+1])?[]:{})}Ls(wr,Lr,go),wr=wr[Lr]}return Dt}var Wv=Xm?function(Dt,Bt){return Xm.set(Dt,Bt),Dt}:yp,mT=wp?function(Dt,Bt){return wp(Dt,"toString",{configurable:!0,enumerable:!1,value:AE(Bt),writable:!0})}:yp;function a0(Dt){return Ev(_v(Dt))}function pp(Dt,Bt,pn){var On=-1,Vn=Dt.length;Bt<0&&(Bt=-Bt>Vn?0:Vn+Bt),pn=pn>Vn?Vn:pn,pn<0&&(pn+=Vn),Vn=Bt>pn?0:pn-Bt>>>0,Bt>>>=0;for(var sr=qr(Vn);++On<Vn;)sr[On]=Dt[On+Bt];return sr}function Q0(Dt,Bt){var pn;return fu(Dt,function(On,Vn,sr){return pn=Bt(On,Vn,sr),!pn}),!!pn}function nv(Dt,Bt,pn){var On=0,Vn=Dt==null?On:Dt.length;if(typeof Bt=="number"&&Bt===Bt&&Vn<=Ln){for(;On<Vn;){var sr=On+Vn>>>1,xr=Dt[sr];xr!==null&&!su(xr)&&(pn?xr<=Bt:xr<Bt)?On=sr+1:Vn=sr}return Vn}return rv(Dt,Bt,yp,pn)}function rv(Dt,Bt,pn,On){var Vn=0,sr=Dt==null?0:Dt.length;if(sr===0)return 0;Bt=pn(Bt);for(var xr=Bt!==Bt,wr=Bt===null,Lr=su(Bt),go=Bt===nt;Vn<sr;){var yo=g1((Vn+sr)/2),_o=pn(Dt[yo]),Xo=_o!==nt,bs=_o===null,Ds=_o===_o,al=su(_o);if(xr)var Ns=On||Ds;else go?Ns=Ds&&(On||Xo):wr?Ns=Ds&&Xo&&(On||!bs):Lr?Ns=Ds&&Xo&&!bs&&(On||!al):bs||al?Ns=!1:Ns=On?_o<=Bt:_o<Bt;Ns?Vn=yo+1:sr=yo}return Hl(sr,En)}function gT(Dt,Bt){for(var pn=-1,On=Dt.length,Vn=0,sr=[];++pn<On;){var xr=Dt[pn],wr=Bt?Bt(xr):xr;if(!pn||!Ss(wr,Lr)){var Lr=wr;sr[Vn++]=xr===0?0:xr}}return sr}function yT(Dt){return typeof Dt=="number"?Dt:su(Dt)?In:+Dt}function Lu(Dt){if(typeof Dt=="string")return Dt;if(Ao(Dt))return $l(Dt,Lu)+"";if(su(Dt))return Hy?Hy.call(Dt):"";var Bt=Dt+"";return Bt=="0"&&1/Dt==-An?"-0":Bt}function S1(Dt,Bt,pn){var On=-1,Vn=xo,sr=Dt.length,xr=!0,wr=[],Lr=wr;if(pn)xr=!1,Vn=bu;else if(sr>=ot){var go=Bt?null:E2(Dt);if(go)return p1(go);xr=!1,Vn=d1,Lr=new Cn}else Lr=Bt?[]:wr;e:for(;++On<sr;){var yo=Dt[On],_o=Bt?Bt(yo):yo;if(yo=pn||yo!==0?yo:0,xr&&_o===_o){for(var Xo=Lr.length;Xo--;)if(Lr[Xo]===_o)continue e;Bt&&Lr.push(_o),wr.push(yo)}else Vn(Lr,_o,pn)||(Lr!==wr&&Lr.push(_o),wr.push(yo))}return wr}function J0(Dt,Bt){return Bt=rm(Bt,Dt),Dt=Dm(Dt,Bt),Dt==null||delete Dt[i1(hp(Bt))]}function _g(Dt,Bt,pn,On){return nm(Dt,Bt,pn(Qu(Dt,Bt)),On)}function iv(Dt,Bt,pn,On){for(var Vn=Dt.length,sr=On?Vn:-1;(On?sr--:++sr<Vn)&&Bt(Dt[sr],sr,Dt););return pn?pp(Dt,On?0:sr,On?sr+1:Vn):pp(Dt,On?sr+1:0,On?Vn:sr)}function vT(Dt,Bt){var pn=Dt;return pn instanceof nl&&(pn=pn.value()),du(Bt,function(On,Vn){return Vn.func.apply(Vn.thisArg,Du([On],Vn.args))},pn)}function ey(Dt,Bt,pn){var On=Dt.length;if(On<2)return On?S1(Dt[0]):[];for(var Vn=-1,sr=qr(On);++Vn<On;)for(var xr=Dt[Vn],wr=-1;++wr<On;)wr!=Vn&&(sr[Vn]=Yl(sr[Vn]||xr,Dt[wr],Bt,pn));return S1(kl(sr,1),Bt,pn)}function ty(Dt,Bt,pn){for(var On=-1,Vn=Dt.length,sr=Bt.length,xr={};++On<Vn;){var wr=On<sr?Bt[On]:nt;pn(xr,Dt[On],wr)}return xr}function pu(Dt){return gs(Dt)?Dt:[]}function _m(Dt){return typeof Dt=="function"?Dt:yp}function rm(Dt,Bt){return Ao(Dt)?Dt:mv(Dt,Bt)?[Dt]:PT(wl(Dt))}var ny=rl;function e1(Dt,Bt,pn){var On=Dt.length;return pn=pn===nt?On:pn,!Bt&&pn>=On?Dt:pp(Dt,Bt,pn)}var Np=Ly||function(Dt){return Pl.clearTimeout(Dt)};function ry(Dt,Bt){if(Bt)return Dt.slice();var pn=Dt.length,On=G1?G1(pn):new Dt.constructor(pn);return Dt.copy(On),On}function iy(Dt){var Bt=new Dt.constructor(Dt.byteLength);return new vm(Bt).set(new vm(Dt)),Bt}function xu(Dt,Bt){var pn=Bt?iy(Dt.buffer):Dt.buffer;return new Dt.constructor(pn,Dt.byteOffset,Dt.byteLength)}function av(Dt){var Bt=new Dt.constructor(Dt.source,dl.exec(Dt));return Bt.lastIndex=Dt.lastIndex,Bt}function Bu(Dt){return Jp?sl(Jp.call(Dt)):{}}function Cu(Dt,Bt){var pn=Bt?iy(Dt.buffer):Dt.buffer;return new Dt.constructor(pn,Dt.byteOffset,Dt.length)}function bT(Dt,Bt){if(Dt!==Bt){var pn=Dt!==nt,On=Dt===null,Vn=Dt===Dt,sr=su(Dt),xr=Bt!==nt,wr=Bt===null,Lr=Bt===Bt,go=su(Bt);if(!wr&&!go&&!sr&&Dt>Bt||sr&&xr&&Lr&&!wr&&!go||On&&xr&&Lr||!pn&&Lr||!Vn)return 1;if(!On&&!sr&&!go&&Dt<Bt||go&&pn&&Vn&&!On&&!sr||wr&&pn&&Vn||!xr&&Vn||!Lr)return-1}return 0}function g2(Dt,Bt,pn){for(var On=-1,Vn=Dt.criteria,sr=Bt.criteria,xr=Vn.length,wr=pn.length;++On<xr;){var Lr=bT(Vn[On],sr[On]);if(Lr){if(On>=wr)return Lr;var go=pn[On];return Lr*(go=="desc"?-1:1)}}return Dt.index-Bt.index}function im(Dt,Bt,pn,On){for(var Vn=-1,sr=Dt.length,xr=pn.length,wr=-1,Lr=Bt.length,go=jl(sr-xr,0),yo=qr(Lr+go),_o=!On;++wr<Lr;)yo[wr]=Bt[wr];for(;++Vn<xr;)(_o||Vn<sr)&&(yo[pn[Vn]]=Dt[Vn]);for(;go--;)yo[wr++]=Dt[Vn++];return yo}function o0(Dt,Bt,pn,On){for(var Vn=-1,sr=Dt.length,xr=-1,wr=pn.length,Lr=-1,go=Bt.length,yo=jl(sr-wr,0),_o=qr(yo+go),Xo=!On;++Vn<yo;)_o[Vn]=Dt[Vn];for(var bs=Vn;++Lr<go;)_o[bs+Lr]=Bt[Lr];for(;++xr<wr;)(Xo||Vn<sr)&&(_o[bs+pn[xr]]=Dt[Vn++]);return _o}function hu(Dt,Bt){var pn=-1,On=Dt.length;for(Bt||(Bt=qr(On));++pn<On;)Bt[pn]=Dt[pn];return Bt}function ip(Dt,Bt,pn,On){var Vn=!pn;pn||(pn={});for(var sr=-1,xr=Bt.length;++sr<xr;){var wr=Bt[sr],Lr=On?On(pn[wr],Dt[wr],wr,pn,Dt):nt;Lr===nt&&(Lr=Dt[wr]),Vn?Al(pn,wr,Lr):Ls(pn,wr,Lr)}return pn}function y2(Dt,Bt){return ip(Dt,dv(Dt),Bt)}function v2(Dt,Bt){return ip(Dt,fv(Dt),Bt)}function _1(Dt,Bt){return function(pn,On){var Vn=Ao(pn)?pm:ml,sr=Bt?Bt():{};return Vn(pn,Dt,_s(On,2),sr)}}function $m(Dt){return rl(function(Bt,pn){var On=-1,Vn=pn.length,sr=Vn>1?pn[Vn-1]:nt,xr=Vn>2?pn[2]:nt;for(sr=Dt.length>3&&typeof sr=="function"?(Vn--,sr):nt,xr&&Gu(pn[0],pn[1],xr)&&(sr=Vn<3?nt:sr,Vn=1),Bt=sl(Bt);++On<Vn;){var wr=pn[On];wr&&Dt(Bt,wr,On,sr)}return Bt})}function jv(Dt,Bt){return function(pn,On){if(pn==null)return pn;if(!Ko(pn))return Dt(pn,On);for(var Vn=pn.length,sr=Bt?Vn:-1,xr=sl(pn);(Bt?sr--:++sr<Vn)&&On(xr[sr],sr,xr)!==!1;);return pn}}function TT(Dt){return function(Bt,pn,On){for(var Vn=-1,sr=sl(Bt),xr=On(Bt),wr=xr.length;wr--;){var Lr=xr[Dt?wr:++Vn];if(pn(sr[Lr],Lr,sr)===!1)break}return Bt}}function ET(Dt,Bt,pn){var On=Bt&xt,Vn=Om(Dt);function sr(){var xr=this&&this!==Pl&&this instanceof sr?Vn:Dt;return xr.apply(On?pn:this,arguments)}return sr}function AT(Dt){return function(Bt){Bt=wl(Bt);var pn=Gp(Bt)?qu(Bt):nt,On=pn?pn[0]:Bt.charAt(0),Vn=pn?e1(pn,1).join(""):Bt.slice(1);return On[Dt]()+Vn}}function wm(Dt){return function(Bt){return du(PE(kE(Bt).replace(Wr,"")),Dt,"")}}function Om(Dt){return function(){var Bt=arguments;switch(Bt.length){case 0:return new Dt;case 1:return new Dt(Bt[0]);case 2:return new Dt(Bt[0],Bt[1]);case 3:return new Dt(Bt[0],Bt[1],Bt[2]);case 4:return new Dt(Bt[0],Bt[1],Bt[2],Bt[3]);case 5:return new Dt(Bt[0],Bt[1],Bt[2],Bt[3],Bt[4]);case 6:return new Dt(Bt[0],Bt[1],Bt[2],Bt[3],Bt[4],Bt[5]);case 7:return new Dt(Bt[0],Bt[1],Bt[2],Bt[3],Bt[4],Bt[5],Bt[6])}var pn=vl(Dt.prototype),On=Dt.apply(pn,Bt);return $s(On)?On:pn}}function b2(Dt,Bt,pn){var On=Om(Dt);function Vn(){for(var sr=arguments.length,xr=qr(sr),wr=sr,Lr=Rm(Vn);wr--;)xr[wr]=arguments[wr];var go=sr<3&&xr[0]!==Lr&&xr[sr-1]!==Lr?[]:Kp(xr,Lr);if(sr-=go.length,sr<pn)return Uv(Dt,Bt,ov,Vn.placeholder,nt,xr,go,nt,nt,pn-sr);var yo=this&&this!==Pl&&this instanceof Vn?On:Dt;return Gl(yo,this,xr)}return Vn}function ay(Dt){return function(Bt,pn,On){var Vn=sl(Bt);if(!Ko(Bt)){var sr=_s(pn,3);Bt=ju(Bt),pn=function(wr){return sr(Vn[wr],wr,Vn)}}var xr=Dt(Bt,pn,On);return xr>-1?Vn[sr?Bt[xr]:xr]:nt}}function xT(Dt){return w1(function(Bt){var pn=Bt.length,On=pn,Vn=Mu.prototype.thru;for(Dt&&Bt.reverse();On--;){var sr=Bt[On];if(typeof sr!="function")throw new Ku(ut);if(Vn&&!xr&&cv(sr)=="wrapper")var xr=new Mu([],!0)}for(On=xr?On:pn;++On<pn;){sr=Bt[On];var wr=cv(sr),Lr=wr=="wrapper"?uy(sr):nt;Lr&&gv(Lr[0])&&Lr[1]==(kt|$t|Rt|Mt)&&!Lr[4].length&&Lr[9]==1?xr=xr[cv(Lr[0])].apply(xr,Lr[3]):xr=sr.length==1&&gv(sr)?xr[wr]():xr.thru(sr)}return function(){var go=arguments,yo=go[0];if(xr&&go.length==1&&Ao(yo))return xr.plant(yo).value();for(var _o=0,Xo=pn?Bt[_o].apply(this,go):yo;++_o<pn;)Xo=Bt[_o].call(this,Xo);return Xo}})}function ov(Dt,Bt,pn,On,Vn,sr,xr,wr,Lr,go){var yo=Bt&kt,_o=Bt&xt,Xo=Bt&At,bs=Bt&($t|Ot),Ds=Bt&Ft,al=Xo?nt:Om(Dt);function Ns(){for(var hl=arguments.length,Tl=qr(hl),Bp=hl;Bp--;)Tl[Bp]=arguments[Bp];if(bs)var op=Rm(Ns),zp=Ov(Tl,op);if(On&&(Tl=im(Tl,On,Vn,bs)),sr&&(Tl=o0(Tl,sr,xr,bs)),hl-=zp,bs&&hl<go){var lu=Kp(Tl,op);return Uv(Dt,Bt,ov,Ns.placeholder,pn,Tl,lu,wr,Lr,go-hl)}var k1=_o?pn:this,Lm=Xo?k1[Dt]:Dt;return hl=Tl.length,wr?Tl=Zv(Tl,wr):Ds&&hl>1&&Tl.reverse(),yo&&Lr<hl&&(Tl.length=Lr),this&&this!==Pl&&this instanceof Ns&&(Lm=al||Om(Lm)),Lm.apply(k1,Tl)}return Ns}function CT(Dt,Bt){return function(pn,On){return lT(pn,Dt,Bt(On),{})}}function sv(Dt,Bt){return function(pn,On){var Vn;if(pn===nt&&On===nt)return Bt;if(pn!==nt&&(Vn=pn),On!==nt){if(Vn===nt)return On;typeof pn=="string"||typeof On=="string"?(pn=Lu(pn),On=Lu(On)):(pn=yT(pn),On=yT(On)),Vn=Dt(pn,On)}return Vn}}function Hv(Dt){return w1(function(Bt){return Bt=$l(Bt,Nu(_s())),rl(function(pn){var On=this;return Dt(Bt,function(Vn){return Gl(Vn,On,pn)})})})}function oy(Dt,Bt){Bt=Bt===nt?" ":Lu(Bt);var pn=Bt.length;if(pn<2)return pn?zv(Bt,Dt):Bt;var On=zv(Bt,Op(Dt/m1(Bt)));return Gp(Bt)?e1(qu(On),0,Dt).join(""):On.slice(0,Dt)}function T2(Dt,Bt,pn,On){var Vn=Bt&xt,sr=Om(Dt);function xr(){for(var wr=-1,Lr=arguments.length,go=-1,yo=On.length,_o=qr(yo+Lr),Xo=this&&this!==Pl&&this instanceof xr?sr:Dt;++go<yo;)_o[go]=On[go];for(;Lr--;)_o[go++]=arguments[++wr];return Gl(Xo,Vn?pn:this,_o)}return xr}function ST(Dt){return function(Bt,pn,On){return On&&typeof On!="number"&&Gu(Bt,pn,On)&&(pn=On=nt),Bt=gu(Bt),pn===nt?(pn=Bt,Bt=0):pn=gu(pn),On=On===nt?Bt<pn?1:-1:gu(On),Fl(Bt,pn,On,Dt)}}function lv(Dt){return function(Bt,pn){return typeof Bt=="string"&&typeof pn=="string"||(Bt=mp(Bt),pn=mp(pn)),Dt(Bt,pn)}}function Uv(Dt,Bt,pn,On,Vn,sr,xr,wr,Lr,go){var yo=Bt&$t,_o=yo?xr:nt,Xo=yo?nt:xr,bs=yo?sr:nt,Ds=yo?nt:sr;Bt|=yo?Rt:It,Bt&=~(yo?It:Rt),Bt&Ct||(Bt&=~(xt|At));var al=[Dt,Bt,Vn,bs,_o,Ds,Xo,wr,Lr,go],Ns=pn.apply(nt,al);return gv(Dt)&&kT(Ns,al),Ns.placeholder=On,hy(Ns,Dt,Bt)}function Vv(Dt){var Bt=Kl[Dt];return function(pn,On){if(pn=mp(pn),On=On==null?0:Hl(Vs(On),292),On&&B0(pn)){var Vn=(wl(pn)+"e").split("e"),sr=Bt(Vn[0]+"e"+(+Vn[1]+On));return Vn=(wl(sr)+"e").split("e"),+(Vn[0]+"e"+(+Vn[1]-On))}return Bt(pn)}}var E2=Tu&&1/p1(new Tu([,-0]))[1]==An?function(Dt){return new Tu(Dt)}:SE;function sy(Dt){return function(Bt){var pn=Xl(Bt);return pn==Er?qp(Bt):pn==Xr?h1(Bt):Gm(Bt,Dt(Bt))}}function $1(Dt,Bt,pn,On,Vn,sr,xr,wr){var Lr=Bt&At;if(!Lr&&typeof Dt!="function")throw new Ku(ut);var go=On?On.length:0;if(go||(Bt&=~(Rt|It),On=Vn=nt),xr=xr===nt?xr:jl(Vs(xr),0),wr=wr===nt?wr:Vs(wr),go-=Vn?Vn.length:0,Bt&It){var yo=On,_o=Vn;On=Vn=nt}var Xo=Lr?nt:uy(Dt),bs=[Dt,Bt,pn,On,Vn,yo,_o,sr,xr,wr];if(Xo&&fy(bs,Xo),Dt=bs[0],Bt=bs[1],pn=bs[2],On=bs[3],Vn=bs[4],wr=bs[9]=bs[9]===nt?Lr?0:Dt.length:jl(bs[9]-go,0),!wr&&Bt&($t|Ot)&&(Bt&=~($t|Ot)),!Bt||Bt==xt)var Ds=ET(Dt,Bt,pn);else Bt==$t||Bt==Ot?Ds=b2(Dt,Bt,wr):(Bt==Rt||Bt==(xt|Rt))&&!Vn.length?Ds=T2(Dt,Bt,pn,On):Ds=ov.apply(nt,bs);var al=Xo?Wv:kT;return hy(al(Ds,bs),Dt,Bt)}function _T(Dt,Bt,pn,On){return Dt===nt||Ss(Dt,U1[pn])&&!El.call(On,pn)?Bt:Dt}function $T(Dt,Bt,pn,On,Vn,sr){return $s(Dt)&&$s(Bt)&&(sr.set(Bt,Dt),K0(Dt,Bt,nt,$T,sr),sr.delete(Bt)),Dt}function x2(Dt){return zu(Dt)?nt:Dt}function wT(Dt,Bt,pn,On,Vn,sr){var xr=pn&Tt,wr=Dt.length,Lr=Bt.length;if(wr!=Lr&&!(xr&&Lr>wr))return!1;var go=sr.get(Dt),yo=sr.get(Bt);if(go&&yo)return go==Bt&&yo==Dt;var _o=-1,Xo=!0,bs=pn&Et?new Cn:nt;for(sr.set(Dt,Bt),sr.set(Bt,Dt);++_o<wr;){var Ds=Dt[_o],al=Bt[_o];if(On)var Ns=xr?On(al,Ds,_o,Bt,Dt,sr):On(Ds,al,_o,Dt,Bt,sr);if(Ns!==nt){if(Ns)continue;Xo=!1;break}if(bs){if(!Ol(Bt,function(hl,Tl){if(!d1(bs,Tl)&&(Ds===hl||Vn(Ds,hl,pn,On,sr)))return bs.push(Tl)})){Xo=!1;break}}else if(!(Ds===al||Vn(Ds,al,pn,On,sr))){Xo=!1;break}}return sr.delete(Dt),sr.delete(Bt),Xo}function S2(Dt,Bt,pn,On,Vn,sr,xr){switch(pn){case Bo:if(Dt.byteLength!=Bt.byteLength||Dt.byteOffset!=Bt.byteOffset)return!1;Dt=Dt.buffer,Bt=Bt.buffer;case jo:return!(Dt.byteLength!=Bt.byteLength||!sr(new vm(Dt),new vm(Bt)));case Jn:case zn:case Pr:return Ss(+Dt,+Bt);case Bn:return Dt.name==Bt.name&&Dt.message==Bt.message;case ao:case Jr:return Dt==Bt+"";case Er:var wr=qp;case Xr:var Lr=On&Tt;if(wr||(wr=p1),Dt.size!=Bt.size&&!Lr)return!1;var go=xr.get(Dt);if(go)return go==Bt;On|=Et,xr.set(Dt,Bt);var yo=wT(wr(Dt),wr(Bt),On,Vn,sr,xr);return xr.delete(Dt),yo;case So:if(Jp)return Jp.call(Dt)==Jp.call(Bt)}return!1}function OT(Dt,Bt,pn,On,Vn,sr){var xr=pn&Tt,wr=uv(Dt),Lr=wr.length,go=uv(Bt),yo=go.length;if(Lr!=yo&&!xr)return!1;for(var _o=Lr;_o--;){var Xo=wr[_o];if(!(xr?Xo in Bt:El.call(Bt,Xo)))return!1}var bs=sr.get(Dt),Ds=sr.get(Bt);if(bs&&Ds)return bs==Bt&&Ds==Dt;var al=!0;sr.set(Dt,Bt),sr.set(Bt,Dt);for(var Ns=xr;++_o<Lr;){Xo=wr[_o];var hl=Dt[Xo],Tl=Bt[Xo];if(On)var Bp=xr?On(Tl,hl,Xo,Bt,Dt,sr):On(hl,Tl,Xo,Dt,Bt,sr);if(!(Bp===nt?hl===Tl||Vn(hl,Tl,pn,On,sr):Bp)){al=!1;break}Ns||(Ns=Xo=="constructor")}if(al&&!Ns){var op=Dt.constructor,zp=Bt.constructor;op!=zp&&"constructor"in Dt&&"constructor"in Bt&&!(typeof op=="function"&&op instanceof op&&typeof zp=="function"&&zp instanceof zp)&&(al=!1)}return sr.delete(Dt),sr.delete(Bt),al}function w1(Dt){return u0(Xv(Dt,nt,d0),Dt+"")}function uv(Dt){return fp(Dt,ju,dv)}function Gv(Dt){return fp(Dt,gp,fv)}var uy=Xm?function(Dt){return Xm.get(Dt)}:SE;function cv(Dt){for(var Bt=Dt.name+"",pn=Q1[Bt],On=El.call(Q1,Bt)?pn.length:0;On--;){var Vn=pn[On],sr=Vn.func;if(sr==null||sr==Dt)return Vn.name}return Bt}function Rm(Dt){var Bt=El.call(Tn,"placeholder")?Tn:Dt;return Bt.placeholder}function _s(){var Dt=Tn.iteratee||xE;return Dt=Dt===xE?Jy:Dt,arguments.length?Dt(arguments[0],arguments[1]):Dt}function cy(Dt,Bt){var pn=Dt.__data__;return DT(Bt)?pn[typeof Bt=="string"?"string":"hash"]:pn.map}function qv(Dt){for(var Bt=ju(Dt),pn=Bt.length;pn--;){var On=Bt[pn],Vn=Dt[On];Bt[pn]=[On,Vn,Yv(Vn)]}return Bt}function am(Dt,Bt){var pn=N0(Dt,Bt);return q0(pn)?pn:nt}function RT(Dt){var Bt=El.call(Dt,Uu),pn=Dt[Uu];try{Dt[Uu]=nt;var On=!0}catch{}var Vn=ym.call(Dt);return On&&(Bt?Dt[Uu]=pn:delete Dt[Uu]),Vn}var dv=lp?function(Dt){return Dt==null?[]:(Dt=sl(Dt),tp(lp(Dt),function(Bt){return Tm.call(Dt,Bt)}))}:_E,fv=lp?function(Dt){for(var Bt=[];Dt;)Du(Bt,dv(Dt)),Dt=bm(Dt);return Bt}:_E,Xl=au;(Ym&&Xl(new Ym(new ArrayBuffer(1)))!=Bo||K1&&Xl(new K1)!=Er||H0&&Xl(H0.resolve())!=no||Tu&&Xl(new Tu)!=Xr||Pu&&Xl(new Pu)!=$o)&&(Xl=function(Dt){var Bt=au(Dt),pn=Bt==Ir?Dt.constructor:nt,On=pn?Nm(pn):"";if(On)switch(On){case Dv:return Bo;case U0:return Er;case Nv:return no;case Wy:return Xr;case jy:return $o}return Bt});function pv(Dt,Bt,pn){for(var On=-1,Vn=pn.length;++On<Vn;){var sr=pn[On],xr=sr.size;switch(sr.type){case"drop":Dt+=xr;break;case"dropRight":Bt-=xr;break;case"take":Bt=Hl(Bt,Dt+xr);break;case"takeRight":Dt=jl(Dt,Bt-xr);break}}return{start:Dt,end:Bt}}function Vu(Dt){var Bt=Dt.match(Ho);return Bt?Bt[1].split(Cr):[]}function Kv(Dt,Bt,pn){Bt=rm(Bt,Dt);for(var On=-1,Vn=Bt.length,sr=!1;++On<Vn;){var xr=i1(Bt[On]);if(!(sr=Dt!=null&&pn(Dt,xr)))break;Dt=Dt[xr]}return sr||++On!=Vn?sr:(Vn=Dt==null?0:Dt.length,!!Vn&&il(Vn)&&r1(xr,Vn)&&(Ao(Dt)||ps(Dt)))}function dy(Dt){var Bt=Dt.length,pn=new Dt.constructor(Bt);return Bt&&typeof Dt[0]=="string"&&El.call(Dt,"index")&&(pn.index=Dt.index,pn.input=Dt.input),pn}function hv(Dt){return typeof Dt.constructor=="function"&&!s0(Dt)?vl(bm(Dt)):{}}function _2(Dt,Bt,pn){var On=Dt.constructor;switch(Bt){case jo:return iy(Dt);case Jn:case zn:return new On(+Dt);case Bo:return xu(Dt,pn);case ss:case Us:case Eo:case Do:case bo:case Vo:case Ts:case xs:case Qo:return Cu(Dt,pn);case Er:return new On;case Pr:case Jr:return new On(Dt);case ao:return av(Dt);case Xr:return new On;case So:return Bu(Dt)}}function n1(Dt,Bt){var pn=Bt.length;if(!pn)return Dt;var On=pn-1;return Bt[On]=(pn>1?"& ":"")+Bt[On],Bt=Bt.join(pn>2?", ":" "),Dt.replace(lr,`{
/* [wrapped with `+Bt+`] */
`)}function IT(Dt){return Ao(Dt)||ps(Dt)||!!(Km&&Dt&&Dt[Km])}function r1(Dt,Bt){var pn=typeof Dt;return Bt=Bt??sn,!!Bt&&(pn=="number"||pn!="symbol"&&zo.test(Dt))&&Dt>-1&&Dt%1==0&&Dt<Bt}function Gu(Dt,Bt,pn){if(!$s(pn))return!1;var On=typeof Bt;return(On=="number"?Ko(pn)&&r1(Bt,pn.length):On=="string"&&Bt in pn)?Ss(pn[Bt],Dt):!1}function mv(Dt,Bt){if(Ao(Dt))return!1;var pn=typeof Dt;return pn=="number"||pn=="symbol"||pn=="boolean"||Dt==null||su(Dt)?!0:Go.test(Dt)||!Kr.test(Dt)||Bt!=null&&Dt in sl(Bt)}function DT(Dt){var Bt=typeof Dt;return Bt=="string"||Bt=="number"||Bt=="symbol"||Bt=="boolean"?Dt!=="__proto__":Dt===null}function gv(Dt){var Bt=cv(Dt),pn=Tn[Bt];if(typeof pn!="function"||!(Bt in nl.prototype))return!1;if(Dt===pn)return!0;var On=uy(pn);return!!On&&Dt===On[0]}function yv(Dt){return!!gm&&gm in Dt}var vv=mm?To:$E;function s0(Dt){var Bt=Dt&&Dt.constructor,pn=typeof Bt=="function"&&Bt.prototype||U1;return Dt===pn}function Yv(Dt){return Dt===Dt&&!$s(Dt)}function Im(Dt,Bt){return function(pn){return pn==null?!1:pn[Dt]===Bt&&(Bt!==nt||Dt in sl(pn))}}function O1(Dt){var Bt=Fr(Dt,function(On){return pn.size===pt&&pn.clear(),On}),pn=Bt.cache;return Bt}function fy(Dt,Bt){var pn=Dt[1],On=Bt[1],Vn=pn|On,sr=Vn<(xt|At|kt),xr=On==kt&&pn==$t||On==kt&&pn==Mt&&Dt[7].length<=Bt[8]||On==(kt|Mt)&&Bt[7].length<=Bt[8]&&pn==$t;if(!(sr||xr))return Dt;On&xt&&(Dt[2]=Bt[2],Vn|=pn&xt?0:Ct);var wr=Bt[3];if(wr){var Lr=Dt[3];Dt[3]=Lr?im(Lr,wr,Bt[4]):wr,Dt[4]=Lr?Kp(Dt[3],ht):Bt[4]}return wr=Bt[5],wr&&(Lr=Dt[5],Dt[5]=Lr?o0(Lr,wr,Bt[6]):wr,Dt[6]=Lr?Kp(Dt[5],ht):Bt[6]),wr=Bt[7],wr&&(Dt[7]=wr),On&kt&&(Dt[8]=Dt[8]==null?Bt[8]:Hl(Dt[8],Bt[8])),Dt[9]==null&&(Dt[9]=Bt[9]),Dt[0]=Bt[0],Dt[1]=Vn,Dt}function NT(Dt){var Bt=[];if(Dt!=null)for(var pn in sl(Dt))Bt.push(pn);return Bt}function $2(Dt){return ym.call(Dt)}function Xv(Dt,Bt,pn){return Bt=jl(Bt===nt?Dt.length-1:Bt,0),function(){for(var On=arguments,Vn=-1,sr=jl(On.length-Bt,0),xr=qr(sr);++Vn<sr;)xr[Vn]=On[Bt+Vn];Vn=-1;for(var wr=qr(Bt+1);++Vn<Bt;)wr[Vn]=On[Vn];return wr[Bt]=pn(xr),Gl(Dt,this,wr)}}function Dm(Dt,Bt){return Bt.length<2?Dt:Qu(Dt,pp(Bt,0,-1))}function Zv(Dt,Bt){for(var pn=Dt.length,On=Hl(Bt.length,pn),Vn=hu(Dt);On--;){var sr=Bt[On];Dt[On]=r1(sr,pn)?Vn[sr]:nt}return Dt}function bv(Dt,Bt){if(!(Bt==="constructor"&&typeof Dt[Bt]=="function")&&Bt!="__proto__")return Dt[Bt]}var kT=Tv(Wv),l0=zy||function(Dt,Bt){return Pl.setTimeout(Dt,Bt)},u0=Tv(mT);function hy(Dt,Bt,pn){var On=Bt+"";return u0(Dt,n1(On,w2(Vu(On),pn)))}function Tv(Dt){var Bt=0,pn=0;return function(){var On=ll(),Vn=Ut-(On-pn);if(pn=On,Vn>0){if(++Bt>=Zt)return arguments[0]}else Bt=0;return Dt.apply(nt,arguments)}}function Ev(Dt,Bt){var pn=-1,On=Dt.length,Vn=On-1;for(Bt=Bt===nt?On:Bt;++pn<Bt;){var sr=ou(pn,Vn),xr=Dt[sr];Dt[sr]=Dt[pn],Dt[pn]=xr}return Dt.length=Bt,Dt}var PT=O1(function(Dt){var Bt=[];return Dt.charCodeAt(0)===46&&Bt.push(""),Dt.replace(io,function(pn,On,Vn,sr){Bt.push(Vn?sr.replace(Sl,"$1"):On||pn)}),Bt});function i1(Dt){if(typeof Dt=="string"||su(Dt))return Dt;var Bt=Dt+"";return Bt=="0"&&1/Dt==-An?"-0":Bt}function Nm(Dt){if(Dt!=null){try{return qm.call(Dt)}catch{}try{return Dt+""}catch{}}return""}function w2(Dt,Bt){return ql(wn,function(pn){var On="_."+pn[0];Bt&pn[1]&&!xo(Dt,On)&&Dt.push(On)}),Dt.sort()}function MT(Dt){if(Dt instanceof nl)return Dt.clone();var Bt=new Mu(Dt.__wrapped__,Dt.__chain__);return Bt.__actions__=hu(Dt.__actions__),Bt.__index__=Dt.__index__,Bt.__values__=Dt.__values__,Bt}function O2(Dt,Bt,pn){(pn?Gu(Dt,Bt,pn):Bt===nt)?Bt=1:Bt=jl(Vs(Bt),0);var On=Dt==null?0:Dt.length;if(!On||Bt<1)return[];for(var Vn=0,sr=0,xr=qr(Op(On/Bt));Vn<On;)xr[sr++]=pp(Dt,Vn,Vn+=Bt);return xr}function R2(Dt){for(var Bt=-1,pn=Dt==null?0:Dt.length,On=0,Vn=[];++Bt<pn;){var sr=Dt[Bt];sr&&(Vn[On++]=sr)}return Vn}function I2(){var Dt=arguments.length;if(!Dt)return[];for(var Bt=qr(Dt-1),pn=arguments[0],On=Dt;On--;)Bt[On-1]=arguments[On];return Du(Ao(pn)?hu(pn):[pn],kl(Bt,1))}var D2=rl(function(Dt,Bt){return gs(Dt)?Yl(Dt,kl(Bt,1,gs,!0)):[]}),N2=rl(function(Dt,Bt){var pn=hp(Bt);return gs(pn)&&(pn=nt),gs(Dt)?Yl(Dt,kl(Bt,1,gs,!0),_s(pn,2)):[]}),k2=rl(function(Dt,Bt){var pn=hp(Bt);return gs(pn)&&(pn=nt),gs(Dt)?Yl(Dt,kl(Bt,1,gs,!0),nt,pn):[]});function P2(Dt,Bt,pn){var On=Dt==null?0:Dt.length;return On?(Bt=pn||Bt===nt?1:Vs(Bt),pp(Dt,Bt<0?0:Bt,On)):[]}function M2(Dt,Bt,pn){var On=Dt==null?0:Dt.length;return On?(Bt=pn||Bt===nt?1:Vs(Bt),Bt=On-Bt,pp(Dt,0,Bt<0?0:Bt)):[]}function c0(Dt,Bt){return Dt&&Dt.length?iv(Dt,_s(Bt,3),!0,!0):[]}function F2(Dt,Bt){return Dt&&Dt.length?iv(Dt,_s(Bt,3),!0):[]}function my(Dt,Bt,pn,On){var Vn=Dt==null?0:Dt.length;return Vn?(pn&&typeof pn!="number"&&Gu(Dt,Bt,pn)&&(pn=0,On=Vn),b1(Dt,Bt,pn,On)):[]}function nu(Dt,Bt,pn){var On=Dt==null?0:Dt.length;if(!On)return-1;var Vn=pn==null?0:Vs(pn);return Vn<0&&(Vn=jl(On+Vn,0)),_p(Dt,_s(Bt,3),Vn)}function FT(Dt,Bt,pn){var On=Dt==null?0:Dt.length;if(!On)return-1;var Vn=On-1;return pn!==nt&&(Vn=Vs(pn),Vn=pn<0?jl(On+Vn,0):Hl(Vn,On-1)),_p(Dt,_s(Bt,3),Vn,!0)}function d0(Dt){var Bt=Dt==null?0:Dt.length;return Bt?kl(Dt,1):[]}function Av(Dt){var Bt=Dt==null?0:Dt.length;return Bt?kl(Dt,An):[]}function B2(Dt,Bt){var pn=Dt==null?0:Dt.length;return pn?(Bt=Bt===nt?1:Vs(Bt),kl(Dt,Bt)):[]}function z2(Dt){for(var Bt=-1,pn=Dt==null?0:Dt.length,On={};++Bt<pn;){var Vn=Dt[Bt];On[Vn[0]]=Vn[1]}return On}function BT(Dt){return Dt&&Dt.length?Dt[0]:nt}function W2(Dt,Bt,pn){var On=Dt==null?0:Dt.length;if(!On)return-1;var Vn=pn==null?0:Vs(pn);return Vn<0&&(Vn=jl(On+Vn,0)),u1(Dt,Bt,Vn)}function j2(Dt){var Bt=Dt==null?0:Dt.length;return Bt?pp(Dt,0,-1):[]}var H2=rl(function(Dt){var Bt=$l(Dt,pu);return Bt.length&&Bt[0]===Dt[0]?Ky(Bt):[]}),U2=rl(function(Dt){var Bt=hp(Dt),pn=$l(Dt,pu);return Bt===hp(pn)?Bt=nt:pn.pop(),pn.length&&pn[0]===Dt[0]?Ky(pn,_s(Bt,2)):[]}),V2=rl(function(Dt){var Bt=hp(Dt),pn=$l(Dt,pu);return Bt=typeof Bt=="function"?Bt:nt,Bt&&pn.pop(),pn.length&&pn[0]===Dt[0]?Ky(pn,nt,Bt):[]});function zT(Dt,Bt){return Dt==null?"":Iv.call(Dt,Bt)}function hp(Dt){var Bt=Dt==null?0:Dt.length;return Bt?Dt[Bt-1]:nt}function G2(Dt,Bt,pn){var On=Dt==null?0:Dt.length;if(!On)return-1;var Vn=On;return pn!==nt&&(Vn=Vs(pn),Vn=Vn<0?jl(On+Vn,0):Hl(Vn,On-1)),Bt===Bt?Oy(Dt,Bt,Vn):_p(Dt,$y,Vn,!0)}function WT(Dt,Bt){return Dt&&Dt.length?Au(Dt,Vs(Bt)):nt}var Su=rl(Qv);function Qv(Dt,Bt){return Dt&&Dt.length&&Bt&&Bt.length?ev(Dt,Bt):Dt}function q2(Dt,Bt,pn){return Dt&&Dt.length&&Bt&&Bt.length?ev(Dt,Bt,_s(pn,2)):Dt}function jT(Dt,Bt,pn){return Dt&&Dt.length&&Bt&&Bt.length?ev(Dt,Bt,nt,pn):Dt}var HT=w1(function(Dt,Bt){var pn=Dt==null?0:Dt.length,On=tu(Dt,Bt);return Bv(Dt,$l(Bt,function(Vn){return r1(Vn,pn)?+Vn:Vn}).sort(bT)),On});function K2(Dt,Bt){var pn=[];if(!(Dt&&Dt.length))return pn;var On=-1,Vn=[],sr=Dt.length;for(Bt=_s(Bt,3);++On<sr;){var xr=Dt[On];Bt(xr,On,Dt)&&(pn.push(xr),Vn.push(On))}return Bv(Dt,Vn),pn}function Jv(Dt){return Dt==null?Dt:j0.call(Dt)}function UT(Dt,Bt,pn){var On=Dt==null?0:Dt.length;return On?(pn&&typeof pn!="number"&&Gu(Dt,Bt,pn)?(Bt=0,pn=On):(Bt=Bt==null?0:Vs(Bt),pn=pn===nt?On:Vs(pn)),pp(Dt,Bt,pn)):[]}function Q2(Dt,Bt){return nv(Dt,Bt)}function J2(Dt,Bt,pn){return rv(Dt,Bt,_s(pn,2))}function a1(Dt,Bt){var pn=Dt==null?0:Dt.length;if(pn){var On=nv(Dt,Bt);if(On<pn&&Ss(Dt[On],Bt))return On}return-1}function eE(Dt,Bt){return nv(Dt,Bt,!0)}function tE(Dt,Bt,pn){return rv(Dt,Bt,_s(pn,2),!0)}function nE(Dt,Bt){var pn=Dt==null?0:Dt.length;if(pn){var On=nv(Dt,Bt,!0)-1;if(Ss(Dt[On],Bt))return On}return-1}function rE(Dt){return Dt&&Dt.length?gT(Dt):[]}function iE(Dt,Bt){return Dt&&Dt.length?gT(Dt,_s(Bt,2)):[]}function _b(Dt){var Bt=Dt==null?0:Dt.length;return Bt?pp(Dt,1,Bt):[]}function R1(Dt,Bt,pn){return Dt&&Dt.length?(Bt=pn||Bt===nt?1:Vs(Bt),pp(Dt,0,Bt<0?0:Bt)):[]}function VT(Dt,Bt,pn){var On=Dt==null?0:Dt.length;return On?(Bt=pn||Bt===nt?1:Vs(Bt),Bt=On-Bt,pp(Dt,Bt<0?0:Bt,On)):[]}function eT(Dt,Bt){return Dt&&Dt.length?iv(Dt,_s(Bt,3),!1,!0):[]}function km(Dt,Bt){return Dt&&Dt.length?iv(Dt,_s(Bt,3)):[]}var aE=rl(function(Dt){return S1(kl(Dt,1,gs,!0))}),f0=rl(function(Dt){var Bt=hp(Dt);return gs(Bt)&&(Bt=nt),S1(kl(Dt,1,gs,!0),_s(Bt,2))}),qT=rl(function(Dt){var Bt=hp(Dt);return Bt=typeof Bt=="function"?Bt:nt,S1(kl(Dt,1,gs,!0),nt,Bt)});function ap(Dt){return Dt&&Dt.length?S1(Dt):[]}function oE(Dt,Bt){return Dt&&Dt.length?S1(Dt,_s(Bt,2)):[]}function om(Dt,Bt){return Bt=typeof Bt=="function"?Bt:nt,Dt&&Dt.length?S1(Dt,nt,Bt):[]}function xv(Dt){if(!(Dt&&Dt.length))return[];var Bt=0;return Dt=tp(Dt,function(pn){if(gs(pn))return Bt=jl(pn.length,Bt),!0}),O0(Bt,function(pn){return $l(Dt,_0(pn))})}function tT(Dt,Bt){if(!(Dt&&Dt.length))return[];var pn=xv(Dt);return Bt==null?pn:$l(pn,function(On){return Gl(Bt,nt,On)})}var nT=rl(function(Dt,Bt){return gs(Dt)?Yl(Dt,Bt):[]}),rT=rl(function(Dt){return ey(tp(Dt,gs))}),KT=rl(function(Dt){var Bt=hp(Dt);return gs(Bt)&&(Bt=nt),ey(tp(Dt,gs),_s(Bt,2))}),h0=rl(function(Dt){var Bt=hp(Dt);return Bt=typeof Bt=="function"?Bt:nt,ey(tp(Dt,gs),nt,Bt)}),gy=rl(xv);function sE(Dt,Bt){return ty(Dt||[],Bt||[],Ls)}function YT(Dt,Bt){return ty(Dt||[],Bt||[],nm)}var XT=rl(function(Dt){var Bt=Dt.length,pn=Bt>1?Dt[Bt-1]:nt;return pn=typeof pn=="function"?(Dt.pop(),pn):nt,tT(Dt,pn)});function iT(Dt){var Bt=Tn(Dt);return Bt.__chain__=!0,Bt}function lE(Dt,Bt){return Bt(Dt),Dt}function pl(Dt,Bt){return Bt(Dt)}var ZT=w1(function(Dt){var Bt=Dt.length,pn=Bt?Dt[0]:0,On=this.__wrapped__,Vn=function(sr){return tu(sr,Dt)};return Bt>1||this.__actions__.length||!(On instanceof nl)||!r1(pn)?this.thru(Vn):(On=On.slice(pn,+pn+(Bt?1:0)),On.__actions__.push({func:pl,args:[Vn],thisArg:nt}),new Mu(On,this.__chain__).thru(function(sr){return Bt&&!sr.length&&sr.push(nt),sr}))});function uE(){return iT(this)}function cE(){return new Mu(this.value(),this.__chain__)}function dE(){this.__values__===nt&&(this.__values__=yy(this.value()));var Dt=this.__index__>=this.__values__.length,Bt=Dt?nt:this.__values__[this.__index__++];return{done:Dt,value:Bt}}function QT(){return this}function JT(Dt){for(var Bt,pn=this;pn instanceof J1;){var On=MT(pn);On.__index__=0,On.__values__=nt,Bt?Vn.__wrapped__=On:Bt=On;var Vn=On;pn=pn.__wrapped__}return Vn.__wrapped__=Dt,Bt}function n2(){var Dt=this.__wrapped__;if(Dt instanceof nl){var Bt=Dt;return this.__actions__.length&&(Bt=new nl(this)),Bt=Bt.reverse(),Bt.__actions__.push({func:pl,args:[Jv],thisArg:nt}),new Mu(Bt,this.__chain__)}return this.thru(Jv)}function r2(){return vT(this.__wrapped__,this.__actions__)}var fE=_1(function(Dt,Bt,pn){El.call(Dt,pn)?++Dt[pn]:Al(Dt,pn,1)});function pE(Dt,Bt,pn){var On=Ao(Dt)?L1:Gy;return pn&&Gu(Dt,Bt,pn)&&(Bt=nt),On(Dt,_s(Bt,3))}function aT(Dt,Bt){var pn=Ao(Dt)?tp:np;return pn(Dt,_s(Bt,3))}var i2=ay(nu),Pm=ay(FT);function hE(Dt,Bt){return kl(Ht(Dt,Bt),1)}function Mm(Dt,Bt){return kl(Ht(Dt,Bt),An)}function _t(Dt,Bt,pn){return pn=pn===nt?1:Vs(pn),kl(Ht(Dt,Bt),pn)}function bt(Dt,Bt){var pn=Ao(Dt)?ql:fu;return pn(Dt,_s(Bt,3))}function St(Dt,Bt){var pn=Ao(Dt)?cu:dp;return pn(Dt,_s(Bt,3))}var wt=_1(function(Dt,Bt,pn){El.call(Dt,pn)?Dt[pn].push(Bt):Al(Dt,pn,[Bt])});function Nt(Dt,Bt,pn,On){Dt=Ko(Dt)?Dt:_v(Dt),pn=pn&&!On?Vs(pn):0;var Vn=Dt.length;return pn<0&&(pn=jl(Vn+pn,0)),N1(Dt)?pn<=Vn&&Dt.indexOf(Bt,pn)>-1:!!Vn&&u1(Dt,Bt,pn)>-1}var Pt=rl(function(Dt,Bt,pn){var On=-1,Vn=typeof Bt=="function",sr=Ko(Dt)?qr(Dt.length):[];return fu(Dt,function(xr){sr[++On]=Vn?Gl(Bt,xr,pn):ul(xr,Bt,pn)}),sr}),Lt=_1(function(Dt,Bt,pn){Al(Dt,pn,Bt)});function Ht(Dt,Bt){var pn=Ao(Dt)?$l:dT;return pn(Dt,_s(Bt,3))}function qt(Dt,Bt,pn,On){return Dt==null?[]:(Ao(Bt)||(Bt=Bt==null?[]:[Bt]),pn=On?nt:pn,Ao(pn)||(pn=pn==null?[]:[pn]),Fv(Dt,Bt,pn))}var Gt=_1(function(Dt,Bt,pn){Dt[pn?0:1].push(Bt)},function(){return[[],[]]});function Qt(Dt,Bt,pn){var On=Ao(Dt)?du:sp,Vn=arguments.length<3;return On(Dt,_s(Bt,4),pn,Vn,fu)}function hn(Dt,Bt,pn){var On=Ao(Dt)?Vp:sp,Vn=arguments.length<3;return On(Dt,_s(Bt,4),pn,Vn,dp)}function yn(Dt,Bt){var pn=Ao(Dt)?tp:np;return pn(Dt,_r(_s(Bt,3)))}function xn(Dt){var Bt=Ao(Dt)?Mo:m2;return Bt(Dt)}function bn(Dt,Bt,pn){(pn?Gu(Dt,Bt,pn):Bt===nt)?Bt=1:Bt=Vs(Bt);var On=Ao(Dt)?os:Ll;return On(Dt,Bt)}function Nn(Dt){var Bt=Ao(Dt)?Ms:a0;return Bt(Dt)}function Pn(Dt){if(Dt==null)return 0;if(Ko(Dt))return N1(Dt)?m1(Dt):Dt.length;var Bt=Xl(Dt);return Bt==Er||Bt==Xr?Dt.size:em(Dt).length}function Fn(Dt,Bt,pn){var On=Ao(Dt)?Ol:Q0;return pn&&Gu(Dt,Bt,pn)&&(Bt=nt),On(Dt,_s(Bt,3))}var Un=rl(function(Dt,Bt){if(Dt==null)return[];var pn=Bt.length;return pn>1&&Gu(Dt,Bt[0],Bt[1])?Bt=[]:pn>2&&Gu(Bt[0],Bt[1],Bt[2])&&(Bt=[Bt[0]]),Fv(Dt,kl(Bt,1),[])}),Hn=By||function(){return Pl.Date.now()};function nr(Dt,Bt){if(typeof Bt!="function")throw new Ku(ut);return Dt=Vs(Dt),function(){if(--Dt<1)return Bt.apply(this,arguments)}}function mr(Dt,Bt,pn){return Bt=pn?nt:Bt,Bt=Dt&&Bt==null?Dt.length:Bt,$1(Dt,kt,nt,nt,nt,nt,Bt)}function gr(Dt,Bt){var pn;if(typeof Bt!="function")throw new Ku(ut);return Dt=Vs(Dt),function(){return--Dt>0&&(pn=Bt.apply(this,arguments)),Dt<=1&&(Bt=nt),pn}}var rr=rl(function(Dt,Bt,pn){var On=xt;if(pn.length){var Vn=Kp(pn,Rm(rr));On|=Rt}return $1(Dt,On,Bt,pn,Vn)}),hr=rl(function(Dt,Bt,pn){var On=xt|At;if(pn.length){var Vn=Kp(pn,Rm(hr));On|=Rt}return $1(Bt,On,Dt,pn,Vn)});function ar(Dt,Bt,pn){Bt=pn?nt:Bt;var On=$1(Dt,$t,nt,nt,nt,nt,nt,Bt);return On.placeholder=ar.placeholder,On}function vr(Dt,Bt,pn){Bt=pn?nt:Bt;var On=$1(Dt,Ot,nt,nt,nt,nt,nt,Bt);return On.placeholder=vr.placeholder,On}function Tr(Dt,Bt,pn){var On,Vn,sr,xr,wr,Lr,go=0,yo=!1,_o=!1,Xo=!0;if(typeof Dt!="function")throw new Ku(ut);Bt=mp(Bt)||0,$s(pn)&&(yo=!!pn.leading,_o="maxWait"in pn,sr=_o?jl(mp(pn.maxWait)||0,Bt):sr,Xo="trailing"in pn?!!pn.trailing:Xo);function bs(lu){var k1=On,Lm=Vn;return On=Vn=nt,go=lu,xr=Dt.apply(Lm,k1),xr}function Ds(lu){return go=lu,wr=l0(hl,Bt),yo?bs(lu):xr}function al(lu){var k1=lu-Lr,Lm=lu-go,LE=Bt-k1;return _o?Hl(LE,sr-Lm):LE}function Ns(lu){var k1=lu-Lr,Lm=lu-go;return Lr===nt||k1>=Bt||k1<0||_o&&Lm>=sr}function hl(){var lu=Hn();if(Ns(lu))return Tl(lu);wr=l0(hl,al(lu))}function Tl(lu){return wr=nt,Xo&&On?bs(lu):(On=Vn=nt,xr)}function Bp(){wr!==nt&&Np(wr),go=0,On=Lr=Vn=wr=nt}function op(){return wr===nt?xr:Tl(Hn())}function zp(){var lu=Hn(),k1=Ns(lu);if(On=arguments,Vn=this,Lr=lu,k1){if(wr===nt)return Ds(Lr);if(_o)return Np(wr),wr=l0(hl,Bt),bs(Lr)}return wr===nt&&(wr=l0(hl,Bt)),xr}return zp.cancel=Bp,zp.flush=op,zp}var dr=rl(function(Dt,Bt){return Zu(Dt,1,Bt)}),Sr=rl(function(Dt,Bt,pn){return Zu(Dt,mp(Bt)||0,pn)});function yr(Dt){return $1(Dt,Ft)}function Fr(Dt,Bt){if(typeof Dt!="function"||Bt!=null&&typeof Bt!="function")throw new Ku(ut);var pn=function(){var On=arguments,Vn=Bt?Bt.apply(this,On):On[0],sr=pn.cache;if(sr.has(Vn))return sr.get(Vn);var xr=Dt.apply(this,On);return pn.cache=sr.set(Vn,xr)||sr,xr};return pn.cache=new(Fr.Cache||Ql),pn}Fr.Cache=Ql;function _r(Dt){if(typeof Dt!="function")throw new Ku(ut);return function(){var Bt=arguments;switch(Bt.length){case 0:return!Dt.call(this);case 1:return!Dt.call(this,Bt[0]);case 2:return!Dt.call(this,Bt[0],Bt[1]);case 3:return!Dt.call(this,Bt[0],Bt[1],Bt[2])}return!Dt.apply(this,Bt)}}function Rr(Dt){return gr(2,Dt)}var zr=ny(function(Dt,Bt){Bt=Bt.length==1&&Ao(Bt[0])?$l(Bt[0],Nu(_s())):$l(kl(Bt,1),Nu(_s()));var pn=Bt.length;return rl(function(On){for(var Vn=-1,sr=Hl(On.length,pn);++Vn<sr;)On[Vn]=Bt[Vn].call(this,On[Vn]);return Gl(Dt,this,On)})}),Vr=rl(function(Dt,Bt){var pn=Kp(Bt,Rm(Vr));return $1(Dt,Rt,nt,Bt,pn)}),ga=rl(function(Dt,Bt){var pn=Kp(Bt,Rm(ga));return $1(Dt,It,nt,Bt,pn)}),jr=w1(function(Dt,Bt){return $1(Dt,Mt,nt,nt,nt,Bt)});function _i(Dt,Bt){if(typeof Dt!="function")throw new Ku(ut);return Bt=Bt===nt?Bt:Vs(Bt),rl(Dt,Bt)}function co(Dt,Bt){if(typeof Dt!="function")throw new Ku(ut);return Bt=Bt==null?0:jl(Vs(Bt),0),rl(function(pn){var On=pn[Bt],Vn=e1(pn,0,Bt);return On&&Du(Vn,On),Gl(Dt,this,Vn)})}function mo(Dt,Bt,pn){var On=!0,Vn=!0;if(typeof Dt!="function")throw new Ku(ut);return $s(pn)&&(On="leading"in pn?!!pn.leading:On,Vn="trailing"in pn?!!pn.trailing:Vn),Tr(Dt,Bt,{leading:On,maxWait:Bt,trailing:Vn})}function uo(Dt){return mr(Dt,1)}function so(Dt,Bt){return Vr(_m(Bt),Dt)}function Br(){if(!arguments.length)return[];var Dt=arguments[0];return Ao(Dt)?Dt:[Dt]}function fo(Dt){return Ks(Dt,vt)}function vo(Dt,Bt){return Bt=typeof Bt=="function"?Bt:nt,Ks(Dt,vt,Bt)}function Io(Dt){return Ks(Dt,mt|vt)}function Fo(Dt,Bt){return Bt=typeof Bt=="function"?Bt:nt,Ks(Dt,mt|vt,Bt)}function Is(Dt,Bt){return Bt==null||Dp(Dt,Bt,ju(Bt))}function Ss(Dt,Bt){return Dt===Bt||Dt!==Dt&&Bt!==Bt}var Wo=lv(Sm),Po=lv(function(Dt,Bt){return Dt>=Bt}),ps=uT(function(){return arguments}())?uT:function(Dt){return hs(Dt)&&El.call(Dt,"callee")&&!Tm.call(Dt,"callee")},Ao=qr.isArray,Uo=ep?Nu(ep):cT;function Ko(Dt){return Dt!=null&&il(Dt.length)&&!To(Dt)}function gs(Dt){return hs(Dt)&&Ko(Dt)}function zs(Dt){return Dt===!0||Dt===!1||hs(Dt)&&au(Dt)==Jn}var ys=Rv||$E,Oo=A0?Nu(A0):Yy;function ur(Dt){return hs(Dt)&&Dt.nodeType===1&&!zu(Dt)}function Gr(Dt){if(Dt==null)return!0;if(Ko(Dt)&&(Ao(Dt)||typeof Dt=="string"||typeof Dt.splice=="function"||ys(Dt)||Mp(Dt)||ps(Dt)))return!Dt.length;var Bt=Xl(Dt);if(Bt==Er||Bt==Xr)return!Dt.size;if(s0(Dt))return!em(Dt).length;for(var pn in Dt)if(El.call(Dt,pn))return!1;return!0}function Co(Dt,Bt){return G0(Dt,Bt)}function lo(Dt,Bt,pn){pn=typeof pn=="function"?pn:nt;var On=pn?pn(Dt,Bt):nt;return On===nt?G0(Dt,Bt,nt,pn):!!On}function oo(Dt){if(!hs(Dt))return!1;var Bt=au(Dt);return Bt==Bn||Bt==Qn||typeof Dt.message=="string"&&typeof Dt.name=="string"&&!zu(Dt)}function Ws(Dt){return typeof Dt=="number"&&B0(Dt)}function To(Dt){if(!$s(Dt))return!1;var Bt=au(Dt);return Bt==jn||Bt==Ar||Bt==Gn||Bt==ro}function ls(Dt){return typeof Dt=="number"&&Dt==Vs(Dt)}function il(Dt){return typeof Dt=="number"&&Dt>-1&&Dt%1==0&&Dt<=sn}function $s(Dt){var Bt=typeof Dt;return Dt!=null&&(Bt=="object"||Bt=="function")}function hs(Dt){return Dt!=null&&typeof Dt=="object"}var xl=C0?Nu(C0):Xy;function Hs(Dt,Bt){return Dt===Bt||Zy(Dt,Bt,qv(Bt))}function Xs(Dt,Bt,pn){return pn=typeof pn=="function"?pn:nt,Zy(Dt,Bt,qv(Bt),pn)}function Zl(Dt){return mu(Dt)&&Dt!=+Dt}function _u(Dt){if(vv(Dt))throw new Ps(st);return q0(Dt)}function kp(Dt){return Dt===null}function Pp(Dt){return Dt==null}function mu(Dt){return typeof Dt=="number"||hs(Dt)&&au(Dt)==Pr}function zu(Dt){if(!hs(Dt)||au(Dt)!=Ir)return!1;var Bt=bm(Dt);if(Bt===null)return!0;var pn=El.call(Bt,"constructor")&&Bt.constructor;return typeof pn=="function"&&pn instanceof pn&&qm.call(pn)==F0}var $u=fm?Nu(fm):Qy;function I1(Dt){return ls(Dt)&&Dt>=-sn&&Dt<=sn}var D1=F1?Nu(F1):Eu;function N1(Dt){return typeof Dt=="string"||!Ao(Dt)&&hs(Dt)&&au(Dt)==Jr}function su(Dt){return typeof Dt=="symbol"||hs(Dt)&&au(Dt)==So}var Mp=Js?Nu(Js):Pv;function Cv(Dt){return Dt===nt}function Fm(Dt){return hs(Dt)&&Xl(Dt)==$o}function Ju(Dt){return hs(Dt)&&au(Dt)==Qr}var Wu=lv(Mv),_c=lv(function(Dt,Bt){return Dt<=Bt});function yy(Dt){if(!Dt)return[];if(Ko(Dt))return N1(Dt)?qu(Dt):hu(Dt);if(ku&&Dt[ku])return f1(Dt[ku]());var Bt=Xl(Dt),pn=Bt==Er?qp:Bt==Xr?p1:_v;return pn(Dt)}function gu(Dt){if(!Dt)return Dt===0?Dt:0;if(Dt=mp(Dt),Dt===An||Dt===-An){var Bt=Dt<0?-1:1;return Bt*Sn}return Dt===Dt?Dt:0}function Vs(Dt){var Bt=gu(Dt),pn=Bt%1;return Bt===Bt?pn?Bt-pn:Bt:0}function a2(Dt){return Dt?zl(Vs(Dt),0,_n):0}function mp(Dt){if(typeof Dt=="number")return Dt;if(su(Dt))return In;if($s(Dt)){var Bt=typeof Dt.valueOf=="function"?Dt.valueOf():Dt;Dt=$s(Bt)?Bt+"":Bt}if(typeof Dt!="string")return Dt===0?Dt:+Dt;Dt=R0(Dt);var pn=ol.test(Dt);return pn||Ul.test(Dt)?ds(Dt.slice(2),pn?2:8):As.test(Dt)?In:+Dt}function s2(Dt){return ip(Dt,gp(Dt))}function mE(Dt){return Dt?zl(Vs(Dt),-sn,sn):Dt===0?Dt:0}function wl(Dt){return Dt==null?"":Lu(Dt)}var gE=$m(function(Dt,Bt){if(s0(Bt)||Ko(Bt)){ip(Bt,ju(Bt),Dt);return}for(var pn in Bt)El.call(Bt,pn)&&Ls(Dt,pn,Bt[pn])}),l2=$m(function(Dt,Bt){ip(Bt,gp(Bt),Dt)}),sm=$m(function(Dt,Bt,pn,On){ip(Bt,gp(Bt),Dt,On)}),oT=$m(function(Dt,Bt,pn,On){ip(Bt,ju(Bt),Dt,On)}),Sv=w1(tu);function u2(Dt,Bt){var pn=vl(Dt);return Bt==null?pn:Rl(pn,Bt)}var c2=rl(function(Dt,Bt){Dt=sl(Dt);var pn=-1,On=Bt.length,Vn=On>2?Bt[2]:nt;for(Vn&&Gu(Bt[0],Bt[1],Vn)&&(On=1);++pn<On;)for(var sr=Bt[pn],xr=gp(sr),wr=-1,Lr=xr.length;++wr<Lr;){var go=xr[wr],yo=Dt[go];(yo===nt||Ss(yo,U1[go])&&!El.call(Dt,go))&&(Dt[go]=sr[go])}return Dt}),yE=rl(function(Dt){return Dt.push(nt,$T),Gl(wE,nt,Dt)});function Fp(Dt,Bt){return S0(Dt,_s(Bt,3),rp)}function sT(Dt,Bt){return S0(Dt,_s(Bt,3),e0)}function d2(Dt,Bt){return Dt==null?Dt:T1(Dt,_s(Bt,3),gp)}function vy(Dt,Bt){return Dt==null?Dt:Cm(Dt,_s(Bt,3),gp)}function Lp(Dt,Bt){return Dt&&rp(Dt,_s(Bt,3))}function vE(Dt,Bt){return Dt&&e0(Dt,_s(Bt,3))}function BE(Dt){return Dt==null?[]:n0(Dt,ju(Dt))}function zE(Dt){return Dt==null?[]:n0(Dt,gp(Dt))}function bE(Dt,Bt,pn){var On=Dt==null?nt:Qu(Dt,Bt);return On===nt?pn:On}function WE(Dt,Bt){return Dt!=null&&Kv(Dt,Bt,r0)}function TE(Dt,Bt){return Dt!=null&&Kv(Dt,Bt,f2)}var jE=CT(function(Dt,Bt,pn){Bt!=null&&typeof Bt.toString!="function"&&(Bt=ym.call(Bt)),Dt[Bt]=pn},AE(yp)),HE=CT(function(Dt,Bt,pn){Bt!=null&&typeof Bt.toString!="function"&&(Bt=ym.call(Bt)),El.call(Dt,Bt)?Dt[Bt].push(pn):Dt[Bt]=[pn]},_s),UE=rl(ul);function ju(Dt){return Ko(Dt)?wo(Dt):em(Dt)}function gp(Dt){return Ko(Dt)?wo(Dt,!0):h2(Dt)}function VE(Dt,Bt){var pn={};return Bt=_s(Bt,3),rp(Dt,function(On,Vn,sr){Al(pn,Bt(On,Vn,sr),On)}),pn}function GE(Dt,Bt){var pn={};return Bt=_s(Bt,3),rp(Dt,function(On,Vn,sr){Al(pn,Vn,Bt(On,Vn,sr))}),pn}var qE=$m(function(Dt,Bt,pn){K0(Dt,Bt,pn)}),wE=$m(function(Dt,Bt,pn,On){K0(Dt,Bt,pn,On)}),KE=w1(function(Dt,Bt){var pn={};if(Dt==null)return pn;var On=!1;Bt=$l(Bt,function(sr){return sr=rm(sr,Dt),On||(On=sr.length>1),sr}),ip(Dt,Gv(Dt),pn),On&&(pn=Ks(pn,mt|yt|vt,x2));for(var Vn=Bt.length;Vn--;)J0(pn,Bt[Vn]);return pn});function YE(Dt,Bt){return OE(Dt,_r(_s(Bt)))}var XE=w1(function(Dt,Bt){return Dt==null?{}:pT(Dt,Bt)});function OE(Dt,Bt){if(Dt==null)return{};var pn=$l(Gv(Dt),function(On){return[On]});return Bt=_s(Bt),Lv(Dt,pn,function(On,Vn){return Bt(On,Vn[0])})}function ZE(Dt,Bt,pn){Bt=rm(Bt,Dt);var On=-1,Vn=Bt.length;for(Vn||(Vn=1,Dt=nt);++On<Vn;){var sr=Dt==null?nt:Dt[i1(Bt[On])];sr===nt&&(On=Vn,sr=pn),Dt=To(sr)?sr.call(Dt):sr}return Dt}function QE(Dt,Bt,pn){return Dt==null?Dt:nm(Dt,Bt,pn)}function JE(Dt,Bt,pn,On){return On=typeof On=="function"?On:nt,Dt==null?Dt:nm(Dt,Bt,pn,On)}var RE=sy(ju),DE=sy(gp);function eA(Dt,Bt,pn){var On=Ao(Dt),Vn=On||ys(Dt)||Mp(Dt);if(Bt=_s(Bt,4),pn==null){var sr=Dt&&Dt.constructor;Vn?pn=On?new sr:[]:$s(Dt)?pn=To(sr)?vl(bm(Dt)):{}:pn={}}return(Vn?ql:rp)(Dt,function(xr,wr,Lr){return Bt(pn,xr,wr,Lr)}),pn}function tA(Dt,Bt){return Dt==null?!0:J0(Dt,Bt)}function nA(Dt,Bt,pn){return Dt==null?Dt:_g(Dt,Bt,_m(pn))}function rA(Dt,Bt,pn,On){return On=typeof On=="function"?On:nt,Dt==null?Dt:_g(Dt,Bt,_m(pn),On)}function _v(Dt){return Dt==null?[]:c1(Dt,ju(Dt))}function iA(Dt){return Dt==null?[]:c1(Dt,gp(Dt))}function aA(Dt,Bt,pn){return pn===nt&&(pn=Bt,Bt=nt),pn!==nt&&(pn=mp(pn),pn=pn===pn?pn:0),Bt!==nt&&(Bt=mp(Bt),Bt=Bt===Bt?Bt:0),zl(mp(Dt),Bt,pn)}function oA(Dt,Bt,pn){return Bt=gu(Bt),pn===nt?(pn=Bt,Bt=0):pn=gu(pn),Dt=mp(Dt),qy(Dt,Bt,pn)}function sA(Dt,Bt,pn){if(pn&&typeof pn!="boolean"&&Gu(Dt,Bt,pn)&&(Bt=pn=nt),pn===nt&&(typeof Bt=="boolean"?(pn=Bt,Bt=nt):typeof Dt=="boolean"&&(pn=Dt,Dt=nt)),Dt===nt&&Bt===nt?(Dt=0,Bt=1):(Dt=gu(Dt),Bt===nt?(Bt=Dt,Dt=0):Bt=gu(Bt)),Dt>Bt){var On=Dt;Dt=Bt,Bt=On}if(pn||Dt%1||Bt%1){var Vn=rs();return Hl(Dt+Vn*(Bt-Dt+Hm("1e-"+((Vn+"").length-1))),Bt)}return ou(Dt,Bt)}var lA=wm(function(Dt,Bt,pn){return Bt=Bt.toLowerCase(),Dt+(pn?NE(Bt):Bt)});function NE(Dt){return EE(wl(Dt).toLowerCase())}function kE(Dt){return Dt=wl(Dt),Dt&&Dt.replace(Zo,wy).replace(ks,"")}function uA(Dt,Bt,pn){Dt=wl(Dt),Bt=Lu(Bt);var On=Dt.length;pn=pn===nt?On:zl(Vs(pn),0,On);var Vn=pn;return pn-=Bt.length,pn>=0&&Dt.slice(pn,Vn)==Bt}function cA(Dt){return Dt=wl(Dt),Dt&&Zr.test(Dt)?Dt.replace(vn,$p):Dt}function dA(Dt){return Dt=wl(Dt),Dt&&Lo.test(Dt)?Dt.replace(Hr,"\\$&"):Dt}var fA=wm(function(Dt,Bt,pn){return Dt+(pn?"-":"")+Bt.toLowerCase()}),pA=wm(function(Dt,Bt,pn){return Dt+(pn?" ":"")+Bt.toLowerCase()}),hA=AT("toLowerCase");function mA(Dt,Bt,pn){Dt=wl(Dt),Bt=Vs(Bt);var On=Bt?m1(Dt):0;if(!Bt||On>=Bt)return Dt;var Vn=(Bt-On)/2;return oy(g1(Vn),pn)+Dt+oy(Op(Vn),pn)}function gA(Dt,Bt,pn){Dt=wl(Dt),Bt=Vs(Bt);var On=Bt?m1(Dt):0;return Bt&&On<Bt?Dt+oy(Bt-On,pn):Dt}function yA(Dt,Bt,pn){Dt=wl(Dt),Bt=Vs(Bt);var On=Bt?m1(Dt):0;return Bt&&On<Bt?oy(Bt-On,pn)+Dt:Dt}function vA(Dt,Bt,pn){return pn||Bt==null?Bt=0:Bt&&(Bt=+Bt),Cl(wl(Dt).replace(Ro,""),Bt||0)}function bA(Dt,Bt,pn){return(pn?Gu(Dt,Bt,pn):Bt===nt)?Bt=1:Bt=Vs(Bt),zv(wl(Dt),Bt)}function TA(){var Dt=arguments,Bt=wl(Dt[0]);return Dt.length<3?Bt:Bt.replace(Dt[1],Dt[2])}var EA=wm(function(Dt,Bt,pn){return Dt+(pn?"_":"")+Bt.toLowerCase()});function AA(Dt,Bt,pn){return pn&&typeof pn!="number"&&Gu(Dt,Bt,pn)&&(Bt=pn=nt),pn=pn===nt?_n:pn>>>0,pn?(Dt=wl(Dt),Dt&&(typeof Bt=="string"||Bt!=null&&!$u(Bt))&&(Bt=Lu(Bt),!Bt&&Gp(Dt))?e1(qu(Dt),0,pn):Dt.split(Bt,pn)):[]}var xA=wm(function(Dt,Bt,pn){return Dt+(pn?" ":"")+EE(Bt)});function CA(Dt,Bt,pn){return Dt=wl(Dt),pn=pn==null?0:zl(Vs(pn),0,Dt.length),Bt=Lu(Bt),Dt.slice(pn,pn+Bt.length)==Bt}function SA(Dt,Bt,pn){var On=Tn.templateSettings;pn&&Gu(Dt,Bt,pn)&&(Bt=nt),Dt=wl(Dt),Bt=sm({},Bt,On,_T);var Vn=sm({},Bt.imports,On.imports,_T),sr=ju(Vn),xr=c1(Vn,sr),wr,Lr,go=0,yo=Bt.interpolate||Cs,_o="__p += '",Xo=Xp((Bt.escape||Cs).source+"|"+yo.source+"|"+(yo===Ur?Os:Cs).source+"|"+(Bt.evaluate||Cs).source+"|$","g"),bs="//# sourceURL="+(El.call(Bt,"sourceURL")?(Bt.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bl+"]")+`
`;Dt.replace(Xo,function(Ns,hl,Tl,Bp,op,zp){return Tl||(Tl=Bp),_o+=Dt.slice(go,zp).replace(Rs,z1),hl&&(wr=!0,_o+=`' +
__e(`+hl+`) +
'`),op&&(Lr=!0,_o+=`';
`+op+`;
__p += '`),Tl&&(_o+=`' +
((__t = (`+Tl+`)) == null ? '' : __t) +
'`),go=zp+Ns.length,Ns}),_o+=`';
`;var Ds=El.call(Bt,"variable")&&Bt.variable;if(!Ds)_o=`with (obj) {
`+_o+`
}
`;else if(Dl.test(Ds))throw new Ps(ct);_o=(Lr?_o.replace(Gs,""):_o).replace(Es,"$1").replace(Il,"$1;"),_o="function("+(Ds||"obj")+`) {
`+(Ds?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(wr?", __e = _.escape":"")+(Lr?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+_o+`return __p
}`;var al=ME(function(){return Ys(sr,bs+"return "+_o).apply(nt,xr)});if(al.source=_o,oo(al))throw al;return al}function _A(Dt){return wl(Dt).toLowerCase()}function $A(Dt){return wl(Dt).toUpperCase()}function wA(Dt,Bt,pn){if(Dt=wl(Dt),Dt&&(pn||Bt===nt))return R0(Dt);if(!Dt||!(Bt=Lu(Bt)))return Dt;var On=qu(Dt),Vn=qu(Bt),sr=I0(On,Vn),xr=D0(On,Vn)+1;return e1(On,sr,xr).join("")}function OA(Dt,Bt,pn){if(Dt=wl(Dt),Dt&&(pn||Bt===nt))return Dt.slice(0,Ry(Dt)+1);if(!Dt||!(Bt=Lu(Bt)))return Dt;var On=qu(Dt),Vn=D0(On,qu(Bt))+1;return e1(On,0,Vn).join("")}function RA(Dt,Bt,pn){if(Dt=wl(Dt),Dt&&(pn||Bt===nt))return Dt.replace(Ro,"");if(!Dt||!(Bt=Lu(Bt)))return Dt;var On=qu(Dt),Vn=I0(On,qu(Bt));return e1(On,Vn).join("")}function IA(Dt,Bt){var pn=zt,On=Vt;if($s(Bt)){var Vn="separator"in Bt?Bt.separator:Vn;pn="length"in Bt?Vs(Bt.length):pn,On="omission"in Bt?Lu(Bt.omission):On}Dt=wl(Dt);var sr=Dt.length;if(Gp(Dt)){var xr=qu(Dt);sr=xr.length}if(pn>=sr)return Dt;var wr=pn-m1(On);if(wr<1)return On;var Lr=xr?e1(xr,0,wr).join(""):Dt.slice(0,wr);if(Vn===nt)return Lr+On;if(xr&&(wr+=Lr.length-wr),$u(Vn)){if(Dt.slice(wr).search(Vn)){var go,yo=Lr;for(Vn.global||(Vn=Xp(Vn.source,wl(dl.exec(Vn))+"g")),Vn.lastIndex=0;go=Vn.exec(yo);)var _o=go.index;Lr=Lr.slice(0,_o===nt?wr:_o)}}else if(Dt.indexOf(Lu(Vn),wr)!=wr){var Xo=Lr.lastIndexOf(Vn);Xo>-1&&(Lr=Lr.slice(0,Xo))}return Lr+On}function DA(Dt){return Dt=wl(Dt),Dt&&Rn.test(Dt)?Dt.replace(ws,Iy):Dt}var NA=wm(function(Dt,Bt,pn){return Dt+(pn?" ":"")+Bt.toUpperCase()}),EE=AT("toUpperCase");function PE(Dt,Bt,pn){return Dt=wl(Dt),Bt=pn?nt:Bt,Bt===nt?k0(Dt)?Yp(Dt):_y(Dt):Dt.match(Bt)||[]}var ME=rl(function(Dt,Bt){try{return Gl(Dt,nt,Bt)}catch(pn){return oo(pn)?pn:new Ps(pn)}}),kA=w1(function(Dt,Bt){return ql(Bt,function(pn){pn=i1(pn),Al(Dt,pn,rr(Dt[pn],Dt))}),Dt});function PA(Dt){var Bt=Dt==null?0:Dt.length,pn=_s();return Dt=Bt?$l(Dt,function(On){if(typeof On[1]!="function")throw new Ku(ut);return[pn(On[0]),On[1]]}):[],rl(function(On){for(var Vn=-1;++Vn<Bt;){var sr=Dt[Vn];if(Gl(sr[0],this,On))return Gl(sr[1],this,On)}})}function MA(Dt){return Xu(Ks(Dt,mt))}function AE(Dt){return function(){return Dt}}function FA(Dt,Bt){return Dt==null||Dt!==Dt?Bt:Dt}var LA=xT(),BA=xT(!0);function yp(Dt){return Dt}function xE(Dt){return Jy(typeof Dt=="function"?Dt:Ks(Dt,mt))}function zA(Dt){return fT(Ks(Dt,mt))}function WA(Dt,Bt){return E1(Dt,Ks(Bt,mt))}var jA=rl(function(Dt,Bt){return function(pn){return ul(pn,Dt,Bt)}}),HA=rl(function(Dt,Bt){return function(pn){return ul(Dt,pn,Bt)}});function CE(Dt,Bt,pn){var On=ju(Bt),Vn=n0(Bt,On);pn==null&&!($s(Bt)&&(Vn.length||!On.length))&&(pn=Bt,Bt=Dt,Dt=this,Vn=n0(Bt,ju(Bt)));var sr=!($s(pn)&&"chain"in pn)||!!pn.chain,xr=To(Dt);return ql(Vn,function(wr){var Lr=Bt[wr];Dt[wr]=Lr,xr&&(Dt.prototype[wr]=function(){var go=this.__chain__;if(sr||go){var yo=Dt(this.__wrapped__),_o=yo.__actions__=hu(this.__actions__);return _o.push({func:Lr,args:arguments,thisArg:Dt}),yo.__chain__=go,yo}return Lr.apply(Dt,Du([this.value()],arguments))})}),Dt}function UA(){return Pl._===this&&(Pl._=My),this}function SE(){}function VA(Dt){return Dt=Vs(Dt),rl(function(Bt){return Au(Bt,Dt)})}var GA=Hv($l),qA=Hv(L1),KA=Hv(Ol);function FE(Dt){return mv(Dt)?_0(i1(Dt)):hT(Dt)}function YA(Dt){return function(Bt){return Dt==null?nt:Qu(Dt,Bt)}}var XA=ST(),ZA=ST(!0);function _E(){return[]}function $E(){return!1}function QA(){return{}}function JA(){return""}function t5(){return!0}function n5(Dt,Bt){if(Dt=Vs(Dt),Dt<1||Dt>sn)return[];var pn=_n,On=Hl(Dt,_n);Bt=_s(Bt),Dt-=_n;for(var Vn=O0(On,Bt);++pn<Dt;)Bt(pn);return Vn}function r5(Dt){return Ao(Dt)?$l(Dt,i1):su(Dt)?[Dt]:hu(PT(wl(Dt)))}function i5(Dt){var Bt=++Py;return wl(Dt)+Bt}var a5=sv(function(Dt,Bt){return Dt+Bt},0),o5=Vv("ceil"),s5=sv(function(Dt,Bt){return Dt/Bt},1),l5=Vv("floor");function u5(Dt){return Dt&&Dt.length?Jm(Dt,yp,Sm):nt}function c5(Dt,Bt){return Dt&&Dt.length?Jm(Dt,_s(Bt,2),Sm):nt}function d5(Dt){return Vm(Dt,yp)}function f5(Dt,Bt){return Vm(Dt,_s(Bt,2))}function p5(Dt){return Dt&&Dt.length?Jm(Dt,yp,Mv):nt}function h5(Dt,Bt){return Dt&&Dt.length?Jm(Dt,_s(Bt,2),Mv):nt}var m5=sv(function(Dt,Bt){return Dt*Bt},1),g5=Vv("round"),y5=sv(function(Dt,Bt){return Dt-Bt},0);function v5(Dt){return Dt&&Dt.length?hm(Dt,yp):0}function b5(Dt,Bt){return Dt&&Dt.length?hm(Dt,_s(Bt,2)):0}return Tn.after=nr,Tn.ary=mr,Tn.assign=gE,Tn.assignIn=l2,Tn.assignInWith=sm,Tn.assignWith=oT,Tn.at=Sv,Tn.before=gr,Tn.bind=rr,Tn.bindAll=kA,Tn.bindKey=hr,Tn.castArray=Br,Tn.chain=iT,Tn.chunk=O2,Tn.compact=R2,Tn.concat=I2,Tn.cond=PA,Tn.conforms=MA,Tn.constant=AE,Tn.countBy=fE,Tn.create=u2,Tn.curry=ar,Tn.curryRight=vr,Tn.debounce=Tr,Tn.defaults=c2,Tn.defaultsDeep=yE,Tn.defer=dr,Tn.delay=Sr,Tn.difference=D2,Tn.differenceBy=N2,Tn.differenceWith=k2,Tn.drop=P2,Tn.dropRight=M2,Tn.dropRightWhile=c0,Tn.dropWhile=F2,Tn.fill=my,Tn.filter=aT,Tn.flatMap=hE,Tn.flatMapDeep=Mm,Tn.flatMapDepth=_t,Tn.flatten=d0,Tn.flattenDeep=Av,Tn.flattenDepth=B2,Tn.flip=yr,Tn.flow=LA,Tn.flowRight=BA,Tn.fromPairs=z2,Tn.functions=BE,Tn.functionsIn=zE,Tn.groupBy=wt,Tn.initial=j2,Tn.intersection=H2,Tn.intersectionBy=U2,Tn.intersectionWith=V2,Tn.invert=jE,Tn.invertBy=HE,Tn.invokeMap=Pt,Tn.iteratee=xE,Tn.keyBy=Lt,Tn.keys=ju,Tn.keysIn=gp,Tn.map=Ht,Tn.mapKeys=VE,Tn.mapValues=GE,Tn.matches=zA,Tn.matchesProperty=WA,Tn.memoize=Fr,Tn.merge=qE,Tn.mergeWith=wE,Tn.method=jA,Tn.methodOf=HA,Tn.mixin=CE,Tn.negate=_r,Tn.nthArg=VA,Tn.omit=KE,Tn.omitBy=YE,Tn.once=Rr,Tn.orderBy=qt,Tn.over=GA,Tn.overArgs=zr,Tn.overEvery=qA,Tn.overSome=KA,Tn.partial=Vr,Tn.partialRight=ga,Tn.partition=Gt,Tn.pick=XE,Tn.pickBy=OE,Tn.property=FE,Tn.propertyOf=YA,Tn.pull=Su,Tn.pullAll=Qv,Tn.pullAllBy=q2,Tn.pullAllWith=jT,Tn.pullAt=HT,Tn.range=XA,Tn.rangeRight=ZA,Tn.rearg=jr,Tn.reject=yn,Tn.remove=K2,Tn.rest=_i,Tn.reverse=Jv,Tn.sampleSize=bn,Tn.set=QE,Tn.setWith=JE,Tn.shuffle=Nn,Tn.slice=UT,Tn.sortBy=Un,Tn.sortedUniq=rE,Tn.sortedUniqBy=iE,Tn.split=AA,Tn.spread=co,Tn.tail=_b,Tn.take=R1,Tn.takeRight=VT,Tn.takeRightWhile=eT,Tn.takeWhile=km,Tn.tap=lE,Tn.throttle=mo,Tn.thru=pl,Tn.toArray=yy,Tn.toPairs=RE,Tn.toPairsIn=DE,Tn.toPath=r5,Tn.toPlainObject=s2,Tn.transform=eA,Tn.unary=uo,Tn.union=aE,Tn.unionBy=f0,Tn.unionWith=qT,Tn.uniq=ap,Tn.uniqBy=oE,Tn.uniqWith=om,Tn.unset=tA,Tn.unzip=xv,Tn.unzipWith=tT,Tn.update=nA,Tn.updateWith=rA,Tn.values=_v,Tn.valuesIn=iA,Tn.without=nT,Tn.words=PE,Tn.wrap=so,Tn.xor=rT,Tn.xorBy=KT,Tn.xorWith=h0,Tn.zip=gy,Tn.zipObject=sE,Tn.zipObjectDeep=YT,Tn.zipWith=XT,Tn.entries=RE,Tn.entriesIn=DE,Tn.extend=l2,Tn.extendWith=sm,CE(Tn,Tn),Tn.add=a5,Tn.attempt=ME,Tn.camelCase=lA,Tn.capitalize=NE,Tn.ceil=o5,Tn.clamp=aA,Tn.clone=fo,Tn.cloneDeep=Io,Tn.cloneDeepWith=Fo,Tn.cloneWith=vo,Tn.conformsTo=Is,Tn.deburr=kE,Tn.defaultTo=FA,Tn.divide=s5,Tn.endsWith=uA,Tn.eq=Ss,Tn.escape=cA,Tn.escapeRegExp=dA,Tn.every=pE,Tn.find=i2,Tn.findIndex=nu,Tn.findKey=Fp,Tn.findLast=Pm,Tn.findLastIndex=FT,Tn.findLastKey=sT,Tn.floor=l5,Tn.forEach=bt,Tn.forEachRight=St,Tn.forIn=d2,Tn.forInRight=vy,Tn.forOwn=Lp,Tn.forOwnRight=vE,Tn.get=bE,Tn.gt=Wo,Tn.gte=Po,Tn.has=WE,Tn.hasIn=TE,Tn.head=BT,Tn.identity=yp,Tn.includes=Nt,Tn.indexOf=W2,Tn.inRange=oA,Tn.invoke=UE,Tn.isArguments=ps,Tn.isArray=Ao,Tn.isArrayBuffer=Uo,Tn.isArrayLike=Ko,Tn.isArrayLikeObject=gs,Tn.isBoolean=zs,Tn.isBuffer=ys,Tn.isDate=Oo,Tn.isElement=ur,Tn.isEmpty=Gr,Tn.isEqual=Co,Tn.isEqualWith=lo,Tn.isError=oo,Tn.isFinite=Ws,Tn.isFunction=To,Tn.isInteger=ls,Tn.isLength=il,Tn.isMap=xl,Tn.isMatch=Hs,Tn.isMatchWith=Xs,Tn.isNaN=Zl,Tn.isNative=_u,Tn.isNil=Pp,Tn.isNull=kp,Tn.isNumber=mu,Tn.isObject=$s,Tn.isObjectLike=hs,Tn.isPlainObject=zu,Tn.isRegExp=$u,Tn.isSafeInteger=I1,Tn.isSet=D1,Tn.isString=N1,Tn.isSymbol=su,Tn.isTypedArray=Mp,Tn.isUndefined=Cv,Tn.isWeakMap=Fm,Tn.isWeakSet=Ju,Tn.join=zT,Tn.kebabCase=fA,Tn.last=hp,Tn.lastIndexOf=G2,Tn.lowerCase=pA,Tn.lowerFirst=hA,Tn.lt=Wu,Tn.lte=_c,Tn.max=u5,Tn.maxBy=c5,Tn.mean=d5,Tn.meanBy=f5,Tn.min=p5,Tn.minBy=h5,Tn.stubArray=_E,Tn.stubFalse=$E,Tn.stubObject=QA,Tn.stubString=JA,Tn.stubTrue=t5,Tn.multiply=m5,Tn.nth=WT,Tn.noConflict=UA,Tn.noop=SE,Tn.now=Hn,Tn.pad=mA,Tn.padEnd=gA,Tn.padStart=yA,Tn.parseInt=vA,Tn.random=sA,Tn.reduce=Qt,Tn.reduceRight=hn,Tn.repeat=bA,Tn.replace=TA,Tn.result=ZE,Tn.round=g5,Tn.runInContext=Dr,Tn.sample=xn,Tn.size=Pn,Tn.snakeCase=EA,Tn.some=Fn,Tn.sortedIndex=Q2,Tn.sortedIndexBy=J2,Tn.sortedIndexOf=a1,Tn.sortedLastIndex=eE,Tn.sortedLastIndexBy=tE,Tn.sortedLastIndexOf=nE,Tn.startCase=xA,Tn.startsWith=CA,Tn.subtract=y5,Tn.sum=v5,Tn.sumBy=b5,Tn.template=SA,Tn.times=n5,Tn.toFinite=gu,Tn.toInteger=Vs,Tn.toLength=a2,Tn.toLower=_A,Tn.toNumber=mp,Tn.toSafeInteger=mE,Tn.toString=wl,Tn.toUpper=$A,Tn.trim=wA,Tn.trimEnd=OA,Tn.trimStart=RA,Tn.truncate=IA,Tn.unescape=DA,Tn.uniqueId=i5,Tn.upperCase=NA,Tn.upperFirst=EE,Tn.each=bt,Tn.eachRight=St,Tn.first=BT,CE(Tn,function(){var Dt={};return rp(Tn,function(Bt,pn){El.call(Tn.prototype,pn)||(Dt[pn]=Bt)}),Dt}(),{chain:!1}),Tn.VERSION=rt,ql(["bind","bindKey","curry","curryRight","partial","partialRight"],function(Dt){Tn[Dt].placeholder=Tn}),ql(["drop","take"],function(Dt,Bt){nl.prototype[Dt]=function(pn){pn=pn===nt?1:jl(Vs(pn),0);var On=this.__filtered__&&!Bt?new nl(this):this.clone();return On.__filtered__?On.__takeCount__=Hl(pn,On.__takeCount__):On.__views__.push({size:Hl(pn,_n),type:Dt+(On.__dir__<0?"Right":"")}),On},nl.prototype[Dt+"Right"]=function(pn){return this.reverse()[Dt](pn).reverse()}}),ql(["filter","map","takeWhile"],function(Dt,Bt){var pn=Bt+1,On=pn==Xt||pn==gn;nl.prototype[Dt]=function(Vn){var sr=this.clone();return sr.__iteratees__.push({iteratee:_s(Vn,3),type:pn}),sr.__filtered__=sr.__filtered__||On,sr}}),ql(["head","last"],function(Dt,Bt){var pn="take"+(Bt?"Right":"");nl.prototype[Dt]=function(){return this[pn](1).value()[0]}}),ql(["initial","tail"],function(Dt,Bt){var pn="drop"+(Bt?"":"Right");nl.prototype[Dt]=function(){return this.__filtered__?new nl(this):this[pn](1)}}),nl.prototype.compact=function(){return this.filter(yp)},nl.prototype.find=function(Dt){return this.filter(Dt).head()},nl.prototype.findLast=function(Dt){return this.reverse().find(Dt)},nl.prototype.invokeMap=rl(function(Dt,Bt){return typeof Dt=="function"?new nl(this):this.map(function(pn){return ul(pn,Dt,Bt)})}),nl.prototype.reject=function(Dt){return this.filter(_r(_s(Dt)))},nl.prototype.slice=function(Dt,Bt){Dt=Vs(Dt);var pn=this;return pn.__filtered__&&(Dt>0||Bt<0)?new nl(pn):(Dt<0?pn=pn.takeRight(-Dt):Dt&&(pn=pn.drop(Dt)),Bt!==nt&&(Bt=Vs(Bt),pn=Bt<0?pn.dropRight(-Bt):pn.take(Bt-Dt)),pn)},nl.prototype.takeRightWhile=function(Dt){return this.reverse().takeWhile(Dt).reverse()},nl.prototype.toArray=function(){return this.take(_n)},rp(nl.prototype,function(Dt,Bt){var pn=/^(?:filter|find|map|reject)|While$/.test(Bt),On=/^(?:head|last)$/.test(Bt),Vn=Tn[On?"take"+(Bt=="last"?"Right":""):Bt],sr=On||/^find/.test(Bt);!Vn||(Tn.prototype[Bt]=function(){var xr=this.__wrapped__,wr=On?[1]:arguments,Lr=xr instanceof nl,go=wr[0],yo=Lr||Ao(xr),_o=function(hl){var Tl=Vn.apply(Tn,Du([hl],wr));return On&&Xo?Tl[0]:Tl};yo&&pn&&typeof go=="function"&&go.length!=1&&(Lr=yo=!1);var Xo=this.__chain__,bs=!!this.__actions__.length,Ds=sr&&!Xo,al=Lr&&!bs;if(!sr&&yo){xr=al?xr:new nl(this);var Ns=Dt.apply(xr,wr);return Ns.__actions__.push({func:pl,args:[_o],thisArg:nt}),new Mu(Ns,Xo)}return Ds&&al?Dt.apply(this,wr):(Ns=this.thru(_o),Ds?On?Ns.value()[0]:Ns.value():Ns)})}),ql(["pop","push","shift","sort","splice","unshift"],function(Dt){var Bt=Yu[Dt],pn=/^(?:push|sort|unshift)$/.test(Dt)?"tap":"thru",On=/^(?:pop|shift)$/.test(Dt);Tn.prototype[Dt]=function(){var Vn=arguments;if(On&&!this.__chain__){var sr=this.value();return Bt.apply(Ao(sr)?sr:[],Vn)}return this[pn](function(xr){return Bt.apply(Ao(xr)?xr:[],Vn)})}}),rp(nl.prototype,function(Dt,Bt){var pn=Tn[Bt];if(pn){var On=pn.name+"";El.call(Q1,On)||(Q1[On]=[]),Q1[On].push({name:Bt,func:pn})}}),Q1[ov(nt,At).name]=[{name:"wrapper",func:nt}],nl.prototype.clone=cp,nl.prototype.reverse=Rp,nl.prototype.value=Ip,Tn.prototype.at=ZT,Tn.prototype.chain=uE,Tn.prototype.commit=cE,Tn.prototype.next=dE,Tn.prototype.plant=JT,Tn.prototype.reverse=n2,Tn.prototype.toJSON=Tn.prototype.valueOf=Tn.prototype.value=r2,Tn.prototype.first=Tn.prototype.head,ku&&(Tn.prototype[ku]=QT),Tn},H1=Ny();l1?((l1.exports=H1)._=H1,T0._=H1):Pl._=H1}).call(commonjsGlobal$1)})(lodash$2,lodash$2.exports);const _$2=lodash$2.exports;function constType(et,tt){return{type:"const",valType:tt,val:et}}function constNodeUnsafe(et,tt){if(typeof tt>"u")throw new Error("Cannot create const node undefined value");return{nodeType:"const",type:et,val:tt}}function constNode(et,tt){if(typeof tt>"u")throw new Error("Cannot create const node undefined value");return{nodeType:"const",type:et,val:tt}}function constString(et){return constNodeUnsafe("string",et)}function constNumber(et){return constNodeUnsafe("number",et)}function constTimestampList(et){return constNodeUnsafe({type:"list",objectType:{type:"timestamp"}},et)}function constStringList(et){return constNodeUnsafe({type:"list",objectType:"string"},et)}function constBoolean(et){return constNodeUnsafe("boolean",et)}function constFunction(et,tt){const nt=lodash$2.exports.mapValues(et,(ot,st)=>varNode(ot,st)),rt=tt(nt);return constNodeUnsafe({type:"function",inputTypes:et,outputType:rt.type},rt)}function constLink(et,tt){return constNodeUnsafe("link",{name:et,url:tt})}function constDate(et){return constNodeUnsafe("date",et)}function constNone(){return constNodeUnsafe("none",null)}function varNode(et,tt){return{nodeType:"var",type:et,varName:tt}}function voidNode(){return{nodeType:"void",type:"invalid"}}const cyrb53=(et,tt=0)=>{let nt=3735928559^tt,rt=1103547991^tt;for(let ot=0,st;ot<et.length;ot++)st=et.charCodeAt(ot),nt=Math.imul(nt^st,2654435761),rt=Math.imul(rt^st,1597334677);return nt=Math.imul(nt^nt>>>16,2246822507)^Math.imul(rt^rt>>>13,3266489909),rt=Math.imul(rt^rt>>>16,2246822507)^Math.imul(nt^nt>>>13,3266489909),4294967296*(2097151&rt)+(nt>>>0)};function hash$2(et){return cyrb53(et).toString()}class MemoizedHasher{constructor(){this.typedNodeId=_$2.memoize(this._typedNodeId.bind(this)),this.nodeId=_$2.memoize(this._nodeId.bind(this)),this.opId=_$2.memoize(this._opId.bind(this))}clear(){this.typedNodeId.cache.clear?.(),this.nodeId.cache.clear?.(),this.opId.cache.clear?.()}_typedNodeId(tt){if(tt.nodeType==="const")return hash$2(JSON.stringify({type:tt.type,val:tt.val}));if(tt.nodeType==="output")return hash$2(JSON.stringify({name:tt.fromOp.name,type:tt.type,inputs:_$2.mapValues(tt.fromOp.inputs,this.typedNodeId)}));if(tt.nodeType==="var")return hash$2(JSON.stringify(tt));if(tt.nodeType==="void")return"void";throw console.error("nodeId not valid for node",tt),new Error("invalid: nodeId not valid for node")}_nodeId(tt){if(tt.nodeType==="const")return hash$2(JSON.stringify(tt.val));if(tt.nodeType==="output")return this.opId(tt.fromOp);if(tt.nodeType==="var")return hash$2(JSON.stringify(tt));if(tt.nodeType==="void")return"void";throw console.error("nodeId not valid for node",tt),new Error("invalid: nodeId not valid for node")}_opId(tt){return hash$2(JSON.stringify({name:tt.name,inputs:_$2.mapValues(tt.inputs,this.typedNodeId)}))}}function nodesEqual(et,tt){if(et.nodeType==="void"&&tt.nodeType==="void")return!0;if(!_$2.isEqual(et.type,tt.type))return!1;if(et.nodeType==="const"&&tt.nodeType==="const")return et.val===tt.val;if(et.nodeType==="var"&&tt.nodeType==="var")return et.varName===tt.varName;if(et.nodeType==="output"&&tt.nodeType==="output"){const nt=et.fromOp,rt=tt.fromOp;if(nt.name!==rt.name)return!1;for(const ot of Array.from(new Set(Object.keys(nt.inputs).concat(Object.keys(rt.inputs)))))if(nt.inputs[ot]!==rt.inputs[ot])return!1;return!0}return!1}let globalId=0;function visitOp(et,tt){const nt=et.ops.get(tt);if(nt!=null)return nt;const rt=globalId++;et.ops.set(tt,rt);for(const ot of Object.values(tt.inputs))visitNode(et,ot);return rt}function visitNode(et,tt){if(tt.nodeType==="const"){const nt=et.constNodes.get(tt);if(nt!=null)return nt;const rt=globalId++;return et.constNodes.set(tt,rt),rt}else if(tt.nodeType==="var"){const nt=et.varNodes.get(tt);if(nt!=null)return nt;const rt=globalId++;return et.varNodes.set(tt,rt),rt}else if(tt.nodeType==="output"){const nt=et.outputNodes.get(tt);if(nt!=null)return nt;const rt=globalId++;return et.outputNodes.set(tt,rt),visitOp(et,tt.fromOp),rt}else if(tt.nodeType==="void"){const nt=et.voidNodes.get(tt);if(nt!=null)return nt;const rt=globalId++;return et.voidNodes.set(tt,rt),rt}throw new Error("graphNorm: unknown node type")}function graphNorm(et){const tt={ops:new Map,constNodes:new Map,varNodes:new Map,outputNodes:new Map,voidNodes:new Map};return visitNode(tt,et),tt}const opDefIsLowLevel=et=>et.resolver!=null,opDefIsWeave=et=>et.body!=null,opDefIsGeneratedWeave=et=>et.expansion!=null,localBToA=typeof btoa<"u"?btoa:et=>Buffer.from(et).toString("base64");function hexToId(et){try{let tt="";for(let nt=0;nt<et.length;nt+=2)tt+=String.fromCharCode(parseInt(et.substr(nt,2),16));return localBToA(tt)}catch{return console.error("Unable to decode digest: ",et),et}}const has$3=(et,tt)=>typeof tt=="object"&&tt!=null&&et in tt;function baseName(et){const tt=et.split("/");return tt[tt.length-1]}function extension$1(et){const nt=baseName(et).split(".");return nt[nt.length-1]}function splitOnce(et,tt){const nt=_$2.indexOf(et,tt);return nt===-1?[et,null]:[et.slice(0,nt),et.slice(nt+1)]}function sanitizeGQLAlias(et){return et.replace(/\W+/g,"__")}function indent(et,tt){let nt="";for(let rt=0;rt<tt;rt++)nt+="  ";return nt+et}const ALL_BASIC_TYPES=["invalid","any","unknown","string","id","number","boolean","date","report","artifact","artifactMembership","artifactVersion","artifactType","artifactAlias","run","entity","project","org","user","type","link","none","runQueue","histogram","int","float","sqlconnection"],WANDB_DOMAIN_TYPES=["report","artifact","artifactVersion","artifactType","run","entity","project","org","user","image-file","video-file","audio-file","html-file","bokeh-file","object3D-file","molecule-file","table","joined-table","partitioned-table","file","dir","runQueue","wb_trace_tree","histogram"],BASIC_MEDIA_TYPES=[{type:"image-file"},{type:"video-file"},{type:"audio-file"},{type:"html-file"},{type:"bokeh-file"},{type:"object3D-file"},{type:"molecule-file"},{type:"pytorch-model-file"},{type:"table",columnTypes:{}},{type:"joined-table",columnTypes:{}},{type:"partitioned-table",columnTypes:{}},{type:"wb_trace_tree"}],TYPES_WITH_PAGES=[...ALL_BASIC_TYPES.filter(et=>!["none","invalid","any","unknown"].includes(et)),...BASIC_MEDIA_TYPES,...lodash$2.exports.compact(WANDB_DOMAIN_TYPES.map(et=>BASIC_MEDIA_TYPES.find(tt=>tt.type===et)?null:{type:et})),{type:"ndarray",serializationPath:{key:"",path:""},shape:[]},{type:"timestamp",unit:"ms"}],SORTABLE_TYPES=["id","string","number","boolean","none"],TYPES_WITH_DIGEST=[{type:"image-file"},{type:"video-file"},{type:"audio-file"},{type:"object3D-file"},{type:"molecule-file"},{type:"pytorch-model-file"}],GROUPABLE_TYPES=SORTABLE_TYPES.concat(SORTABLE_TYPES.map(et=>({type:"dict",objectType:{type:"union",members:["none",et]}})),SORTABLE_TYPES.map(et=>({type:"list",maxLength:10,objectType:{type:"union",members:["none",et]}}))).concat(TYPES_WITH_DIGEST),ALL_LIST_TYPES=["list","ArrowWeaveList","dataframeTable","groupresult","runs"],ALL_DIR_TYPE={type:"union",members:[{type:"dir"},{type:"localdir"}]};function isSimpleTypeShape(et){return typeof et=="string"}function allObjPaths(et,tt=1/0){let nt=[];if(et=nullableTaggableValue(et),isTypedDictLike(et))for(const[rt,ot]of Object.entries(typedDictPropertyTypes(et))){if(ot==null)throw new Error("allObjPaths: found null property type");let st=[];tt>0&&(st=allObjPaths(ot,tt-1).map(ut=>({path:[rt,...ut.path],type:ut.type}))),st.length===0&&(st=[{path:[rt],type:ot}]),nt=[...nt,...st]}else if(isObjectTypeLike(et)&&!isMediaType(et))for(const[rt,ot]of Object.entries(unionObjectTypeAttrTypes(et))){if(ot==null)throw new Error("allObjPaths: found null property type");const st="__object__"+rt;let ut=[];ut.length===0&&(ut=[{path:[st],type:ot}]),nt=[...nt,...ut]}else if(isListLike(et)&&tt>0){const rt=listObjectType(et),ot=allObjPaths(rt,tt-1).filter(st=>st.path.length>0).map(st=>({path:["*",...st.path],type:st.type}));nt=[...nt,...ot]}return nt}const filePrefixToMediaType=et=>et==="image-file"?{type:"image-file"}:et==="video-file"?{type:"video-file"}:et==="audio-file"?{type:"audio-file"}:et==="html-file"?{type:"html-file"}:et==="bokeh-file"?{type:"bokeh-file"}:et==="object3D-file"?{type:"object3D-file"}:et==="molecule-file"?{type:"molecule-file"}:et==="pytorch-model-file"?{type:"pytorch-model-file"}:et==="table"?{type:"table",columnTypes:{}}:et==="joined-table"?{type:"joined-table",columnTypes:{}}:et==="partitioned-table"?{type:"partitioned-table",columnTypes:{}}:null,filePathToType=et=>{const tt=et,nt={type:"file",extension:extension$1(tt)},rt=et.match(/.+\.(trace)(.json)?(?:.gz|.zip)?$/);if(rt!=null){const ot=rt.slice(1);nt.extension=ot.join("")}else if(tt.endsWith(".json")){const ot=tt.split(".");if(ot.length>=3){const st=ot[ot.length-2],ut=filePrefixToMediaType(st);ut!=null&&(nt.wbObjectType=ut)}}return nt};function getIdAndPathFromURI(et){if(et.startsWith("//"))et=et.slice(2);else if(et.startsWith("/"))et=et.slice(1);else throw new Error("Invalid artifact reference "+et);const[tt,nt]=splitOnce(et,"/");if(nt==null)throw new Error("Invalid artifact reference "+et);return{id:tt,path:nt}}const WANDB_ARTIFACT_SCHEME="wandb-artifact:",WANDB_ARTIFACT_CLIENT_SCHEME="wandb-client-artifact:";function parseArtifactRef(et){if(et.startsWith(WANDB_ARTIFACT_SCHEME)){const{id:tt,path:nt}=getIdAndPathFromURI(et.slice(WANDB_ARTIFACT_SCHEME.length));return{artifactId:hexToId(tt),assetPath:nt}}else if(et.startsWith(WANDB_ARTIFACT_CLIENT_SCHEME)){const{id:tt,path:nt}=getIdAndPathFromURI(et.slice(WANDB_ARTIFACT_CLIENT_SCHEME.length));return{artifactId:tt,assetPath:nt}}throw new Error("invalid artifact reference: "+et)}function tagAssignable(et,tt){return isTaggedValue(et)?isAssignableTo(et.value,tt)||tagAssignable(et.tag,tt):isTaggedValueUnion(et)?et.members.some(nt=>tagAssignable(nt,tt)):isAssignableTo(et,tt)}function isAssignableTo(et,tt){if(tt==="any"||isTaggedValue(et)&&isAssignableTo(et.value,tt))return!0;if(isUnion(et))return et.members.length===0?!1:et.members.every(nt=>isAssignableTo(nt,tt));if(isUnion(tt))return tt.members.some(nt=>isAssignableTo(et,nt));if(isTaggedValue(et))return isTaggedValue(tt)&&isAssignableTo(et.value,tt.value)?isTaggedValueLike(tt.tag)?isAssignableTo(tt.tag,et.tag):tagAssignable(et.tag,tt.tag):!1;if(isConstType(et))return isConstType(tt)?isAssignableTo(et.valType,tt.valType)&&_$2.isEqual(et.val,tt.val):isAssignableTo(et.valType,tt);if(isFunctionType(et)&&!isFunctionType(tt)&&isAssignableTo(et.outputType,tt))return!0;if(isSimpleTypeShape(et)&&isSimpleTypeShape(tt))return(et==="int"||et==="float")&&tt==="number"||et==="number"&&(tt==="int"||tt==="float")||et==="int"&&tt==="float"?!0:et===tt;if(!isSimpleTypeShape(et)&&!isSimpleTypeShape(tt)){if(et.type==="dict"&&tt.type==="dict")return isAssignableTo(et.objectType,tt.objectType);if(et.type==="dict"&&tt.type==="typedDict"){for(const nt of Object.values(tt.propertyTypes))if(!isAssignableTo(et.objectType,nt))return!1;return!0}else{if(et.type==="plot"&&tt.type==="plot")return!0;if(et.type==="table"&&tt.type==="table")return!0;if(et.type==="joined-table"&&tt.type==="joined-table")return!0;if(et.type==="partitioned-table"&&tt.type==="partitioned-table")return!0;if(et.type==="typedDict"&&tt.type==="typedDict"){for(const nt of Object.keys(tt.propertyTypes)){const rt=tt.propertyTypes[nt],ot=et.propertyTypes[nt];if(!((tt.notRequiredKeys??[]).includes(nt)&&ot===void 0)&&(ot===void 0||!isAssignableTo(ot,rt)))return!1}return!0}else if(et.type==="typedDict"&&tt.type==="dict"){const nt=Object.keys(et.propertyTypes);if(nt.length===0)return!1;for(const rt of nt){const ot=et.propertyTypes[rt];if(!isAssignableTo(ot,tt.objectType))return!1}return!0}else return isList(et)&&tt.type==="list"?tt.maxLength!=null&&(et.maxLength==null||et.maxLength>tt.maxLength)||tt.minLength!=null&&(et.minLength??0)<tt.minLength?!1:isAssignableTo(et.objectType,tt.objectType):et.type==="file"&&tt.type==="file"?!(tt.wbObjectType!=null&&!isAssignableTo(et.wbObjectType??"none",tt.wbObjectType)||tt.extension!=null&&et.extension!==tt.extension):et.type==="dir"&&tt.type==="dir"?!0:et.type==="function"&&tt.type==="function"?isAssignableTo(et.outputType,tt.outputType):et.type==="ndarray"&&tt.type==="ndarray"||et.type==="image-file"&&tt.type==="image-file"||et.type==="video-file"&&tt.type==="video-file"||et.type==="audio-file"&&tt.type==="audio-file"||et.type==="html-file"&&tt.type==="html-file"||et.type==="bokeh-file"&&tt.type==="bokeh-file"||et.type==="wb_trace_tree"&&tt.type==="wb_trace_tree"||et.type==="object3D-file"&&tt.type==="object3D-file"||et.type==="molecule-file"&&tt.type==="molecule-file"||et.type==="pytorch-model-file"&&tt.type==="pytorch-model-file"||et.type==="timestamp"&&tt.type==="timestamp"||et.type==="container_panel_type"&&tt.type==="Panel"?!0:isTypeOrDescendent(et,tt.type)?!isSimpleTypeShape(et)&&!isSimpleTypeShape(tt)&&et.type==="tablePanel"&&tt.type==="tablePanel"||et.type==="Query"&&tt.type==="Query"?!0:_$2.every(Object.keys(tt).filter(nt=>nt!=="type"&&!nt.startsWith("_")).map(nt=>{const rt=et[nt];if(rt==null)return!1;const ot=tt[nt];return isAssignableTo(rt,ot)})):!1}}else if(!isSimpleTypeShape(et)&&isSimpleTypeShape(tt)&&et.type==="histogram"&&tt==="histogram")return!0;return!1}function withNamedTag(et,tt,nt){return isTaggedValueLike(tt)?taggedValue(taggedValueTagType(tt),taggedValue(typedDict({[et]:taggedValueValueType(tt)}),nt)):taggedValue(typedDict({[et]:tt}),nt)}function concreteWithNamedTag(et,tt,nt){return isConcreteTaggedValue(tt)?concreteTaggedValue(tt._tag,concreteTaggedValue({[et]:tt._value},nt)):concreteTaggedValue({[et]:tt},nt)}function withGroupTag(et,tt){return withNamedTag("groupKey",tt,et)}function withJoinTag(et,tt){return taggedValue(typedDict({joinKey:"string",joinObj:tt}),et)}function withTableRowTag(et,tt){return withNamedTag("table",tt,et)}function withFileTag(et,tt){return taggedValue(typedDict({file:tt}),et)}function nDims(et){return et=nullableTaggableValue(et),isListLike(et)?1+nDims(listObjectType(et)):0}function maybe(et){return isNullable(et)?et:isUnion(et)?{type:"union",members:["none",...et.members]}:{type:"union",members:["none",et]}}function oneOrMany(et){return{type:"union",members:[list$1(et),et]}}function nullableOneOrMany(et){return maybe(oneOrMany(maybe(et)))}function nonNullable(et){return isUnion(et)?union$2(et.members.filter(tt=>tt!=="none")):et}function nonNullableDeep(et){return isTaggedValue(et)?taggedValue(et.tag,nonNullableDeep(et.value)):isUnion(et)?union$2(et.members.map(tt=>nonNullableDeep(tt)).filter(tt=>!isAssignableTo(tt,"none"))):et}function isNullable(et){return isUnion(et)&&et.members.findIndex(tt=>tt==="none")!==-1}function union$2(et){if(et.length===0)return"invalid";let tt=[];for(const ft of et)!isSimpleTypeShape(ft)&&ft?.type==="union"?tt=tt.concat(ft.members):isTaggedValue(ft)&&isUnion(ft.value)?tt=tt.concat(ft.value.members.map(pt=>taggedValue(ft.tag,pt))):tt.push(ft);const nt=_$2.uniqWith(tt,(ft,pt)=>_$2.isEqual(ft,pt)||ft&&pt&&isAssignableTo(ft,pt)&&isAssignableTo(pt,ft)),rt=[],ot=[];for(const ft of nt)isTaggedValue(ft)?ot.push(ft):rt.push(ft);const st=_$2.groupBy(ot,ft=>JSON.stringify(ft.tag)),ut=Object.values(st).map(ft=>({type:"tagged",tag:ft[0].tag,value:union$2(ft.map(pt=>pt.value))})),ct=rt.concat(ut);return ct.length===1?ct[0]:{type:"union",members:ct}}function isTaggedValue(et){return!isSimpleTypeShape(et)&&et?.type==="tagged"}function isConstType(et){return!isSimpleTypeShape(et)&&et.type==="const"}function isTaggedValueUnion(et){return isUnion(et)&&et.members.every(isTaggedValue)}function isTaggedValueLike(et){return isTaggedValue(et)?!0:!!isTaggedValueUnion(et)}function taggedValueValueType(et){if(isTaggedValue(et))return et.value;if(isUnion(et))return union$2(et.members.map(tt=>tt.value));throw new Error("taggedValueValueType: expected union or tagged value")}function withoutTags(et){if(isTaggedValue(et))return withoutTags(et.value);if(isUnion(et))return union$2(et.members.map(tt=>withoutTags(tt)));if(isList(et))return list$1(withoutTags(et.objectType),et.minLength,et.maxLength);if(isDict(et))return dict(withoutTags(et.objectType));if(isTypedDict(et)){const tt=lodash$2.exports.mapValues(et.propertyTypes,withoutTags);return typedDict(tt)}return et}function taggedValueTagType(et){if(isTaggedValue(et))return et.tag;if(isUnion(et))return union$2(et.members.map(tt=>tt.tag));throw new Error("taggedValueTagType: expected union or tagged value")}function taggedValue(et,tt){return et==null?tt:isUnion(tt)?union$2(tt.members.map(nt=>taggedValue(et,nt))):isTaggedValue(tt)?taggedValue(taggedValue(et,tt.tag),tt.value):{type:"tagged",tag:et,value:tt}}function isConcreteTaggedValue(et){return has$3("_tag",et)&&has$3("_value",et)}function concreteTaggedValue(et,tt){return isConcreteTaggedValue(tt)&&tt._tag===et?tt:isConcreteTaggedValue(tt)?{_tag:concreteTaggedValue(et,tt._tag),_value:tt._value}:{_tag:et,_value:tt}}function unwrapTaggedValues(et){return et!=null&&et._tag!==void 0?unwrapTaggedValues(et._value):lodash$2.exports.isArray(et)?et.map(tt=>unwrapTaggedValues(tt)):lodash$2.exports.isObject(et)&&!(et instanceof Date)?lodash$2.exports.mapValues(et,tt=>unwrapTaggedValues(tt)):et}function isUnion(et){return!isSimpleTypeShape(et)&&et?.type==="union"}function isTypedDict(et){return!isSimpleTypeShape(et)&&et?.type==="typedDict"}function isObjectType(et){return!isSimpleTypeShape(et)&&et?._is_object}function isFunctionType(et){return typeof et=="object"&&et.type==="function"}function isTypedDictLike(et){return isTypedDict(et)||isTaggedValue(et)&&isTypedDictLike(et.value)||isUnion(et)&&et.members.every(isTypedDictLike)}function isObjectTypeLike(et){return isObjectType(et)||isTaggedValue(et)&&isObjectTypeLike(et.value)||isUnion(et)&&et.members.every(isObjectTypeLike)}function typedDict(et){return{type:"typedDict",propertyTypes:et}}function rootObject(){return{type:"Object"}}function isDict(et){return!isSimpleTypeShape(et)&&et?.type==="dict"}function dict(et){return{type:"dict",objectType:et}}function isList(et){return!isSimpleTypeShape(et)&&ALL_LIST_TYPES.includes(et.type)}function isListLike(et){return isList(et)||isTaggedValue(et)&&isList(et.value)||isFunction$b(et)&&isListLike(et.outputType)||isUnion(et)&&et.members.every(tt=>isList(tt)||isTaggedValue(tt)&&isList(tt.value))}function list$1(et,tt,nt){return tt!=null&&nt!=null?{type:"list",objectType:et,minLength:tt,maxLength:nt}:tt!=null?{type:"list",objectType:et,minLength:tt}:nt!=null?{type:"list",objectType:et,maxLength:nt}:{type:"list",objectType:et}}function listWithLength(et,tt){return list$1(tt,et,et)}function isTypeOrDescendent(et,tt){for(;;){if(isSimpleTypeShape(et))return!1;if(et.type===tt)return!0;if(et._base_type==null)return!1;et=et._base_type}}function isFile$1(et){return isTypeOrDescendent(et,"file")}function isFileLike(et){return et=nullableTaggableValue(et),isFile$1(et)}function fileWbObjectType(et){if(et=nullableTaggableValue(et),!isFile$1(et))throw new Error("fileWbObjectType: incoming type is not a file");return et.wbObjectType}function isFunction$b(et){return!isSimpleTypeShape(et)&&et?.type==="function"}function isTable(et){return!isSimpleTypeShape(et)&&et?.type==="table"}function isPartitionedTable(et){return!isSimpleTypeShape(et)&&et?.type==="partitioned-table"}function isJoinedTable(et){return!isSimpleTypeShape(et)&&et?.type==="joined-table"}function isTimestamp(et){return!isSimpleTypeShape(et)&&et.type==="timestamp"}function functionType(et,tt){return{type:"function",inputTypes:et,outputType:tt}}const canSortType=et=>et==null?!1:isAssignableTo(et,union$2(SORTABLE_TYPES)),canGroupType=et=>et==null?!1:isAssignableTo(et,union$2(GROUPABLE_TYPES)),numberBin=typedDict({start:"number",stop:"number"}),timestampBin=typedDict({start:{type:"timestamp"},stop:{type:"timestamp"}}),listObjectType=et=>{if(et=nullableTaggableValue(et),isUnion(et))return union$2(et.members.map(tt=>listObjectType(tt)));if(isFunction$b(et))return listObjectType(et.outputType);if(!isList(et))throw new Error("listObjectType: incoming type is not a list");return et.objectType},listLength=et=>{const tt=listMaxLength(et),nt=listMinLength(et);if(tt!=null&&tt===nt)return tt},listMaxLength=et=>{if(et=nullableTaggableValue(et),isUnion(et)){const tt=et.members.map(nt=>listMaxLength(nt));return tt.some(nt=>nt==null)?void 0:Math.max(...tt)}if(!isList(et))throw new Error("listMaxLength: incoming type is not a list");return et.maxLength},listMinLength=et=>{if(et=nullableTaggableValue(et),isUnion(et)){const tt=et.members.map(nt=>listMinLength(nt));return tt.some(nt=>nt==null)?void 0:Math.min(...tt)}if(!isList(et))throw new Error("listMinLength: incoming type is not a list");return et.minLength},taggableValue=et=>(isTaggedValueLike(et)&&(et=taggedValueValueType(et)),isUnion(et)&&et.members.every(isTaggedValue)&&(et=union$2(et.members.map(tt=>tt.value))),et),nonFunction=et=>isFunction$b(et)?et.outputType:et,nullableTaggableValue=et=>nonFunction(nonNullable(taggableValue(nonNullable(nonFunction(et))))),typedDictPropertyTypes=et=>{if(et=nullableTaggableValue(et),isUnion(et))return et.members.reduce((tt,nt,rt)=>{const ot=nullableTaggableValue(nt);if(!isTypedDict(ot)&&ot!=="none")throw new Error("typedDictPropertyTypes: incoming union type contains non-dict");let st={};if(rt===0)st=ot!=="none"?ot.propertyTypes??{}:{};else{for(const ut in tt)if(tt[ut]!=null){const ct=tt[ut];if(ot!=="none"&&ot.propertyTypes[ut]){const ft=ot.propertyTypes[ut];ft?st[ut]=union$2([ct,ft]):st[ut]=union$2([ct,"none"])}else st[ut]=union$2([ct,"none"])}else st[ut]=tt[ut];if(ot!=="none"){for(const ut in ot.propertyTypes)if(ot.propertyTypes[ut]){const ct=ot.propertyTypes[ut];ct!=null&&tt[ut]==null&&(st[ut]=union$2([ct,"none"]))}}}return st},{});if(!isTypedDict(et))throw new Error("typedDictPropertyTypes: expected a typed dict");return et.propertyTypes},objectTypeAttrTypes=et=>_$2.fromPairs(Object.keys(et).filter(tt=>tt!=="type"&&!tt.startsWith("_")).map(tt=>[tt,et[tt]])),unionObjectTypeAttrTypes=et=>{if(et=nullableTaggableValue(et),isUnion(et))return et.members.reduce((tt,nt,rt)=>{const ot=nullableTaggableValue(nt);if(!isObjectType(ot)&&ot!=="none")throw new Error("objectTypeAttrTypes: incoming union type contains non-dict");const st=ot==="none"?{}:objectTypeAttrTypes(ot);let ut={};if(rt===0)ut=ot!=="none"?st:{};else{for(const ct in tt)if(tt[ct]!=null){const ft=tt[ct];if(ot!=="none"&&st[ct]){const pt=st[ct];pt?ut[ct]=union$2([ft,pt]):ut[ct]=union$2([ft,"none"])}else ut[ct]=union$2([ft,"none"])}else ut[ct]=tt[ct];if(ot!=="none"){for(const ct in st)if(st[ct]){const ft=st[ct];ft!=null&&tt[ct]==null&&(ut[ct]=union$2([ft,"none"]))}}}return ut},{});if(!isObjectType(et))throw new Error("unionObjectTypeAttrTypes: expected an ObjectType");return objectTypeAttrTypes(et)},isMediaType=et=>!isSimpleTypeShape(et)&&BASIC_MEDIA_TYPES.filter(tt=>et.type===tt.type).length>0,isMediaTypeLike=et=>BASIC_MEDIA_TYPES.some(tt=>isAssignableTo(tt,et)),findNamedTagInType=(et,tt,nt)=>isTaggedValue(et)?isAssignableTo(et.tag,typedDict({[tt]:maybe(nt)}))?isTaggedValue(et.tag)?taggedValue(et.tag.tag,typedDictPropertyTypes(et.tag)[tt]):typedDictPropertyTypes(et.tag)[tt]:findNamedTagInType(et.tag,tt,nt):isTaggedValueUnion(et)?union$2(et.members.map(rt=>findNamedTagInType(rt,tt,nt))):"none",findNamedTagInVal=(et,tt)=>{if(!isConcreteTaggedValue(et))return null;const nt=getNamedTagFromValue(et,tt);return nt!=null?isConcreteTaggedValue(nt)?concreteTaggedValue(nt._tag,nt._value[tt]):nt?.[tt]??null:null},getTypeDimDepth=et=>{if(isTaggedValue(et))return getTypeDimDepth(et.value);if(isUnion(et)){const tt=_$2.uniq(et.members.filter(nt=>!isAssignableTo(nt,"none")).map(getTypeDimDepth));if(tt.length===0)return 0;if(tt.length!==1)throw new TypeError("Type has ambiguous number of dimensions");return tt[0]}else return isList(et)?getTypeDimDepth(et.objectType)+1:0},getValueDimDepth=et=>{if(isConcreteTaggedValue(et))return getValueDimDepth(et._value);if(_$2.isArray(et)){let tt=0;for(const nt of et){const rt=getValueDimDepth(nt);if(rt!==null){tt=rt;break}}return tt+1}else return et==null?null:0},objectKeyType=(et,tt)=>{const nt=typedDictPropertyTypes(et)[tt];return nt??"none"},objectKeyVal=(et,tt)=>et[tt]==null?null:et[tt],getValueFromTaggedValue=et=>isConcreteTaggedValue(et)?et._value:et,getTagFromTaggedValue=et=>isConcreteTaggedValue(et)?et._tag:null,getNamedTagFromValue=(et,tt)=>{if(et==null)throw new Error("getNamedTagFromValue: val is null");const nt=et._tag;return isConcreteTaggedValue(nt)?tt in nt._value?nt:getNamedTagFromValue(nt,tt):nt!=null&&tt in nt?nt:null},getActualNamedTagFromValue=(et,tt)=>getValueFromTaggedValue(getNamedTagFromValue(et,tt));class GraphNormalizer{constructor(){this.nextId=0,this.ng=null,this.roots=new Set,this.hasher=new MemoizedHasher}normalize(tt){return this.reset(),this.visitNode(tt),this.ng}normalizeBatch(tt){this.reset();for(const nt of tt)this.roots.add(nt),this.visitNode(nt);return{ng:this.ng,roots:new Set(this.roots)}}reset(){this.nextId=0,this.ng={ops:new Map,constNodes:new Map,varNodes:new Map,voidNodes:new Map,outputNodes:new Map},this.roots.clear()}visitOp(tt){const nt=this.hasher.opId(tt);if(this.ng.ops.get(nt)!=null)return;const ot=this.nextId++;this.ng.ops.set(nt,{ref:ot,op:tt});for(const st of Object.values(tt.inputs))this.visitNode(st)}visitNode(tt){const nt=this.hasher.nodeId(tt);if(tt.nodeType==="const"){if(this.ng.constNodes.get(nt)!=null)return;const ot=this.nextId++;this.ng.constNodes.set(nt,{ref:ot,node:tt}),typeof tt.type=="object"&&tt.type.type==="function"&&this.visitNode(tt.val);return}else if(tt.nodeType==="var"){if(this.ng.varNodes.get(nt)!=null)return;const ot=this.nextId++;this.ng.varNodes.set(nt,{ref:ot,node:tt});return}else if(tt.nodeType==="void"){if(this.ng.voidNodes.get(nt)!=null)return;const ot=this.nextId++;this.ng.voidNodes.set(nt,{ref:ot,node:tt});return}else if(tt.nodeType==="output"){if(this.ng.outputNodes.get(nt)!=null)return;const ot=this.nextId++;this.ng.outputNodes.set(nt,{ref:ot,node:tt}),this.visitOp(tt.fromOp);return}throw new Error(`invalid node: ${JSON.stringify(tt)}`)}}function lookup$5(et,tt,nt){if(typeof nt.name<"u"){const rt=nt,ot=et.opId(rt);return tt.ops.get(ot)?.ref}else{const rt=nt,ot=et.nodeId(rt);switch(rt.nodeType){case"const":return tt.constNodes.get(ot)?.ref;case"output":return tt.outputNodes.get(ot)?.ref;case"var":return tt.varNodes.get(ot)?.ref;case"void":return tt.voidNodes.get(ot)?.ref}}}function flattenGraph(et){return[...Object.entries(et.constNodes),...Object.entries(et.outputNodes),...Object.entries(et.varNodes),...Object.entries(et.voidNodes),...Object.entries(et.ops)].sort((tt,nt)=>parseInt(tt[0],10)-parseInt(nt[0],10)).map(tt=>tt[1])}function serialize(et){const tt=new MemoizedHasher,nt=new GraphNormalizer().normalizeBatch(et),rt=st=>lookup$5(tt,nt.ng,st),ot={ops:Object.fromEntries(Array.from(nt.ng.ops).map(([st,{op:ut,ref:ct}])=>{const ft={name:ut.name,inputs:{}};for(const pt of Object.keys(ut.inputs))ft.inputs[pt]=rt(ut.inputs[pt]);return[ct,ft]})),constNodes:Object.fromEntries(Array.from(nt.ng.constNodes).map(([st,{node:ut,ref:ct}])=>{const ft={nodeType:ut.nodeType,type:ut.type,val:null};return ut.val!==null&&typeof ut.val=="object"&&!_$2.isArray(ut.val)?ut.val.nodeType==="output"?ft.val={nodeType:ut.val.nodeType,fromOp:rt(ut.val.fromOp)}:ut.val instanceof Date?ft.val={type:"date",val:ut.val}:ft.val=ut.val:ft.val=ut.val,[ct,ft]})),varNodes:Object.fromEntries(Array.from(nt.ng.varNodes).map(([st,{node:ut,ref:ct}])=>[ct,ut])),voidNodes:Object.fromEntries(Array.from(nt.ng.voidNodes).map(([st,{node:ut,ref:ct}])=>[ct,ut])),outputNodes:Object.fromEntries(Array.from(nt.ng.outputNodes).map(([st,{node:ut,ref:ct}])=>{const ft={nodeType:ut.nodeType,fromOp:rt(ut.fromOp),type:ut.type,id:tt.typedNodeId(ut)};return[ct,ft]}))};return{nodes:flattenGraph(ot),targetNodes:et.map(st=>{const ut=rt(st);if(typeof ut>"u")throw new Error(`cannot find node ${JSON.stringify(st)}`);return ut})}}function getDisjointGraphs(et){const tt=new Map;let nt=0,rt=1;function ot(ft,pt){tt.set(ft,pt),ft.nodeType==="output"&&Object.values(ft.fromOp.inputs).forEach(ht=>{ot(ht,pt)})}function st(ft,pt){const ht=tt.get(ft);if(ht!=null)return ot(pt,ht),!0;if(tt.set(ft,nt),ft.nodeType==="output"){for(const mt of Object.values(ft.fromOp.inputs))if(st(mt,pt))return!0}return!1}for(const ft of et)st(ft,ft)||(nt=rt++);const ut=[],ct=[];for(let ft=0;ft<et.length;ft++){const pt=et[ft],ht=tt.get(pt);ut[ht]==null&&(ut[ht]=[],ct[ht]=[]),ut[ht].push(pt),ct[ht].push(ft)}return[ut,ct]}function serializeMulti(et){const[tt,nt]=getDisjointGraphs(et);return[tt.map(serialize),nt]}const pushFrame=(et,tt,nt)=>{const rt=[...et];for(const[ot,st]of Object.entries(tt??{})){if(st==null)throw new Error("encountered null value! Programming error");rt.splice(0,0,{name:ot,value:st,...nt})}return rt},toFrame=et=>{const tt=[...et];tt.reverse();const nt={};for(const{name:rt,value:ot}of tt)nt[rt]=ot;return nt},resolveVar=(et,tt)=>{const nt=et.findIndex(rt=>rt.name===tt);return nt===-1?null:{closure:{stack:et.slice(nt+1),value:et[nt].value},entry:et[nt]}};function isBaseNode(et){return has$3("type",et)}function isConstNode(et){return isBaseNode(et)&&has$3("nodeType",et)&&et.nodeType==="const"}function isVarNode(et){return isBaseNode(et)&&has$3("nodeType",et)&&et.nodeType==="var"}function isOutputNode(et){return isBaseNode(et)&&has$3("nodeType",et)&&et.nodeType==="output"}function isVoidNode(et){return isBaseNode(et)&&has$3("nodeType",et)&&et.nodeType==="void"}function isNodeOrVoidNode(et){return isOutputNode(et)||isVarNode(et)||isConstNode(et)||isVoidNode(et)}function isConstNodeWithType(et,tt){return isAssignableTo(et.type,tt)}const outputTypeIsType=et=>!outputTypeIsExecutable(et)&&!outputTypeIsFunctionNode(et),outputTypeIsExecutable=et=>typeof et=="function",outputTypeIsFunctionNode=et=>isConstNode(et)&&typeof et.type=="object"&&et.type.type==="function",isConstWBType=et=>et.wb_type==="const",isPythonObjectWBType=et=>et.wb_type==="pythonObject"||et.wb_type==="object",isTypedDictWBType=et=>et.wb_type==="dictionary"||et.wb_type==="typedDict",isListWBType=et=>et.wb_type==="list",isUnionWBType=et=>et.wb_type==="union",isForeignKeyWBType=et=>et.wb_type==="wandb.TableForeignKey"||et.wb_type==="foreignKey",isForeignIndexWBType=et=>et.wb_type==="wandb.TableForeignIndex"||et.wb_type==="foreignIndex",isPrimaryKeyWBType=et=>et.wb_type==="wandb.TablePrimaryKey"||et.wb_type==="primaryKey",isNDArrayWBType=et=>et.wb_type==="ndarray",isClassesIdWBType=et=>et.wb_type==="wandb.Classes_id"||et.wb_type==="ClassesId",isTableWBType=et=>et.wb_type==="wandb.Table"||et.wb_type==="table",isImageFileWBType=et=>et.wb_type==="wandb.Image"||et.wb_type==="image-file",isVideoFileWBType=et=>et.wb_type==="video-file",isAudioFileWBType=et=>et.wb_type==="audio-file",isHtmlFileWBType=et=>et.wb_type==="html-file",isBokehFileWBType=et=>et.wb_type==="bokeh-file",isObject3DFileWBType=et=>et.wb_type==="object3D-file",isMoleculeFileWBType=et=>et.wb_type==="molecule-file",isTimestampWBType=et=>et.wb_type==="timestamp",isJoinedTableWBType=et=>et.wb_type==="joined-table",isPartitionedTableWBType=et=>et.wb_type==="partitioned-table",isWBTraceTreeWBType=et=>et.wb_type==="wb_trace_tree",SPECIAL_ID_COLUMN_NAMES=["id","uuid"];function valToMediaType(et,tt){if(SPECIAL_ID_COLUMN_NAMES.includes(tt.toString()))return"id";if(typeof et=="string"||et===null)return"string";if(typeof et=="number")return"number";if(typeof et=="boolean")return"boolean";if(lodash$2.exports.isArray(et))return et.length===0?"unknown":{type:"list",objectType:valToMediaType(et[0],tt)};if(lodash$2.exports.isObject(et)){if(et.type==="image-file")return{type:"image-file"};if(["image-file","video-file","audio-file","html-file","bokeh-file","object3D-file","molecule-file","pytorch-model-file","wb_trace_tree"].includes(et._type))return{type:et._type}}return"unknown"}function wbTypeToMediaType(et){if(et.wb_type==="number")return"number";if(et.wb_type==="string")return"string";if(et.wb_type==="boolean")return"boolean";if(et.wb_type==="any")return"any";if(et.wb_type==="none")return"none";if(et.wb_type==="unknown")return"unknown";if(et.wb_type==="invalid")return"invalid";if(isConstWBType(et))return valToMediaType(et.params.val,"");if(isTypedDictWBType(et)){const tt={},nt=et.params.type_map;return Object.keys(nt).forEach(rt=>{tt[rt]=wbTypeToMediaType(nt[rt])}),{type:"typedDict",propertyTypes:tt}}else{if(isListWBType(et))return et.params?.length!=null?listWithLength(et.params?.length,wbTypeToMediaType(et.params.element_type)):list$1(wbTypeToMediaType(et.params.element_type));if(isForeignIndexWBType(et))return"number";if(isForeignKeyWBType(et))return"string";if(isPrimaryKeyWBType(et))return"string";if(isNDArrayWBType(et))return{type:"ndarray",serializationPath:et.params.serialization_path,shape:et.params.shape};if(isPythonObjectWBType(et))return et.params.class_name==="Video"?{type:"video-file"}:et.params.class_name==="Audio"?{type:"audio-file"}:et.params.class_name==="Html"?{type:"html-file"}:et.params.class_name==="Bokeh"?{type:"bokeh-file"}:et.params.class_name==="Object3D"?{type:"object3D-file"}:et.params.class_name==="Molecule"?{type:"molecule-file"}:"unknown";if(isClassesIdWBType(et))return"unknown";if(isImageFileWBType(et))return et.params?.class_map?.params?.val!=null?{type:"image-file",boxLayers:et.params?.box_layers?.params?.val??{},boxScoreKeys:et.params?.box_score_keys?.params?.val??[],maskLayers:et.params?.mask_layers?.params?.val??{},classMap:et.params?.class_map?.params?.val??{}}:{type:"image-file"};if(isTableWBType(et))return{type:"table",columnTypes:{}};if(isVideoFileWBType(et))return{type:"video-file"};if(isAudioFileWBType(et))return{type:"audio-file"};if(isHtmlFileWBType(et))return{type:"html-file"};if(isBokehFileWBType(et))return{type:"bokeh-file"};if(isObject3DFileWBType(et))return{type:"object3D-file"};if(isMoleculeFileWBType(et))return{type:"molecule-file"};if(isPythonObjectWBType(et))return{type:"pytorch-model-file"};if(isTimestampWBType(et))return{type:"timestamp",unit:et.params?.unit||"ms"};if(isWBTraceTreeWBType(et))return{type:"wb_trace_tree"};if(isPartitionedTableWBType(et)||isJoinedTableWBType(et))return"unknown";if(isUnionWBType(et))return union$2(et.params.allowed_types.map(wbTypeToMediaType))}return"unknown"}const tableNeedsFloatColumnConversion=et=>lodash$2.exports.isEqual(new Set(lodash$2.exports.keys(et.column_types?.params?.type_map??{})),new Set((et.columns??[]).map(tt=>`${tt}.0`))),detectColumnTypes=et=>{const tt=tableNeedsFloatColumnConversion(et);return et.columns.map((rt,ot)=>{let st=null;if(SPECIAL_ID_COLUMN_NAMES.includes(rt.toString()))return"id";const ut=tt?`${rt}.0`:rt;return et.column_types&&et.column_types.params.type_map[ut]&&(st=wbTypeToMediaType(et.column_types.params.type_map[ut])),(st==null||st==="unknown"||st==="any"||isUnion(st)&&st.members.some(ct=>ct==="any"||ct==="unknown"))&&(et.data.length>0?st=valToMediaType(et.data[0][ot],rt):st="unknown"),st})},mappable=(et,tt)=>isList(et)?list$1(tt(listObjectType(et)),et.minLength,et.maxLength):tt(et),mappableAsync=async(et,tt)=>isList(et)?list$1(await tt(listObjectType(et)),et.minLength,et.maxLength):tt(et),mappableStrip=et=>isList(et)?listObjectType(et):et,mappableVal=(et,tt)=>lodash$2.exports.isArray(et)?et.map(nt=>tt(nt)):tt(et),mappableValAsync=(et,tt)=>lodash$2.exports.isArray(et)?Promise.all(et.map((nt,rt)=>tt(nt,!0,rt))):tt(et,!1,void 0),nullable$1=(et,tt)=>et==="none"?"none":isNullable(et)?union$2(["none",tt(nonNullable(et))]):tt(et),nullableAsync=async(et,tt)=>et==="none"?"none":isNullable(et)?union$2(["none",await tt(nonNullable(et))]):tt(et),nullableStrip=et=>et==="none"?"none":isNullable(et)?nonNullable(et):et,nullableVal=(et,tt)=>et==null?null:tt(et),nullableValAsync=async(et,tt)=>et==null?null:tt(et),skipNullable=(et,tt)=>et==="none"?"none":isNullable(et)?tt(nonNullable(et)):tt(et),taggable=(et,tt)=>isTaggedValue(et)?taggedValue(et.tag,tt(et.value)):isTaggedValueUnion(et)?union$2(et.members.map(nt=>taggedValue(nt.tag,tt(nt.value)))):tt(et),taggableAsync=async(et,tt)=>{if(isTaggedValue(et))return taggedValue(et.tag,await tt(et.value));if(isTaggedValueUnion(et)){const nt=await Promise.all(et.members.map(rt=>tt(rt.value)));return union$2(et.members.map((rt,ot)=>taggedValue(rt.tag,nt[ot])))}return tt(et)},taggableStrip=et=>isTaggedValueLike(et)?taggedValueValueType(et):et,taggableVal=(et,tt)=>isConcreteTaggedValue(et)?concreteTaggedValue(et._tag,tt(et._value)):tt(et),taggableValAsync=async(et,tt)=>isConcreteTaggedValue(et)?concreteTaggedValue(et._tag,await tt(et._value)):tt(et),skipTaggable=(et,tt)=>isTaggedValueLike(et)?tt(taggedValueValueType(et),taggedValueTagType(et)):tt(et),skipTaggableValAsync=async(et,tt)=>isConcreteTaggedValue(et)?tt(et._value,et):tt(et),nullableTaggable=(et,tt)=>nullable$1(et,nt=>taggable(nt,rt=>nullable$1(rt,tt))),nullableTaggableAsync=async(et,tt)=>nullableAsync(et,nt=>taggableAsync(nt,rt=>nullableAsync(rt,tt))),nullableTaggableStrip=et=>nullableStrip(taggableStrip(nullableStrip(et))),nullableTaggableVal=(et,tt)=>nullableVal(et,nt=>taggableVal(nt,rt=>nullableVal(rt,tt))),nullableTaggableValAsync=(et,tt)=>nullableValAsync(et,nt=>taggableValAsync(nt,rt=>nullableValAsync(rt,ot=>tt(ot)))),nullableSkipTaggable=(et,tt)=>nullable$1(et,nt=>skipTaggable(nt,(rt,ot)=>nullable$1(rt,st=>tt(st,ot)))),nullableSkipTaggableValAsync=(et,tt)=>nullableValAsync(et,nt=>skipTaggableValAsync(nt,(rt,ot)=>nullableValAsync(rt,st=>tt(st,ot)))),mappableNullable=(et,tt)=>nullable$1(et,nt=>mappable(nt,rt=>nullable$1(rt,tt))),mappableNullableVal=(et,tt)=>nullableVal(et,nt=>mappableVal(nt,rt=>nullableVal(rt,tt))),mappableTaggableVal=(et,tt)=>taggableVal(et,nt=>mappableVal(nt,rt=>taggableVal(rt,tt))),mappableNullableTaggable=(et,tt)=>nullableTaggable(et,nt=>mappable(nt,rt=>nullableTaggable(rt,tt))),mappableNullableTaggableAsync=(et,tt)=>nullableTaggableAsync(et,nt=>mappableAsync(nt,rt=>nullableTaggableAsync(rt,tt))),mappableNullableTaggableStrip=et=>nullableTaggableStrip(mappableStrip(nullableTaggableStrip(et))),mappableNullableTaggableVal=(et,tt)=>nullableTaggableVal(et,nt=>mappableVal(nt,rt=>nullableTaggableVal(rt,tt))),mappableNullableTaggableValAsync=async(et,tt)=>{if(et==null)return et;let nt;if(isConcreteTaggedValue(et)){if(et._value==null)return et;nt=et._tag,et=et._value}if(lodash$2.exports.isArray(et)){const rt=[];for(const ot of et)ot==null?rt.push(null):isConcreteTaggedValue(ot)?ot._value==null?rt.push(ot):rt.push(concreteTaggedValue(ot._tag,await tt(ot._value))):rt.push(await tt(ot));et=rt}else et=await tt(et);return nt!==void 0?concreteTaggedValue(nt,et):et},mappableNullableSkipTaggable=(et,tt)=>nullableSkipTaggable(et,nt=>mappable(nt,rt=>nullableSkipTaggable(rt,tt))),mappableNullableSkipTaggableValAsync=(et,tt)=>nullableSkipTaggableValAsync(et,(nt,rt)=>mappableValAsync(nt,(ot,st,ut)=>nullableSkipTaggableValAsync(ot,(ct,ft)=>tt(ct,st?ft:rt,ut)))),mntTypeApply=(et,tt,nt)=>{const rt=nt?.dims??0;let ot=null;if(rt>0){const st=getTypeDimDepth(et);if(st<rt)return console.warn("TypeApply: Type does not have enough dimensions"),"invalid";ot=st-rt}return mntTypeApplyHelper(et,tt,ot,nt?.tags??!1,nt?.nones??!1,null,{cache:null})},mntTypeApplyAsync=async(et,tt,nt)=>{const rt=nt?.dims??0;let ot=null;if(rt>0){const st=getTypeDimDepth(et);if(st<rt)return console.warn("ApplyAsync: Type does not have enough dimensions"),Promise.resolve("invalid");ot=st-rt}return mntTypeApplyAsyncHelper(et,tt,ot,nt?.tags??!1,nt?.nones??!1,null,{cache:null})},mntTypeStrip=(et,tt)=>{const nt=tt?.dims??0;let rt=null;if(nt>0){const ot=getTypeDimDepth(et);if(ot<nt)return console.warn("TypeStrip: Type does not have enough dimensions"),"invalid";rt=ot-nt}return mntTypeStripHelper(et,rt,tt?.tags??!1,tt?.nones??!1)},mntValueApply=(et,tt,nt)=>{const rt=nt?.dims??0;let ot=null;if(rt>0){const st=getValueDimDepth(et);if(st!=null){if(st<rt){console.warn("ValueApply: Type does not have enough dimensions");return}ot=st-rt}}return mntValueApplyHelper(et,tt,ot,nt?.tags??!1,nt?.nones??!1,null,{cache:null,valid:!1})},mntValueApplyAsync=async(et,tt,nt)=>{const rt=nt?.dims??0;let ot=null;if(rt>0){const st=getValueDimDepth(et);if(st!=null){if(st<rt)throw new TypeError("ValueApplyAsync: Type does not have enough dimensions");ot=st-rt}}return mntValueApplyAsyncHelper(et,tt,ot,nt?.tags??!1,nt?.nones??!1,null,{cache:null,valid:!1})},mntTypeApplyHelper=(et,tt,nt,rt,ot,st,ut)=>{if(isTaggedValue(et))return rt?mntTypeApplyHelper(et.value,tt,nt,rt,ot,taggedValue(st,et.tag),ut):taggedValue(taggedValue(st,et.tag),mntTypeApplyHelper(et.value,tt,nt,rt,ot,null,ut));if(isList(et)&&(nt==null||nt>0)){const ct=nt!=null?nt-1:null;return list$1(mntTypeApplyHelper(et.objectType,tt,ct,rt,ot,st,ut),et.minLength,et.maxLength)}else{if(isUnion(et))return union$2(et.members.map(ct=>mntTypeApplyHelper(ct,tt,nt,rt,ot,st,ut)));(ot||et!=="none")&&(rt&&(et=taggedValue(st,et),st=null),et==="none"?(ut.cache==null&&(ut.cache=tt(et)),et=ut.cache):et=tt(et))}return et=taggedValue(st,et),et},mntTypeApplyAsyncHelper=async(et,tt,nt,rt,ot,st,ut)=>{if(isTaggedValue(et))return rt?mntTypeApplyAsyncHelper(et.value,tt,nt,rt,ot,taggedValue(st,et.tag),ut):taggedValue(taggedValue(st,et.tag),await mntTypeApplyAsyncHelper(et.value,tt,nt,rt,ot,null,ut));if(isList(et)&&(nt==null||nt>0)){const ct=nt!=null?nt-1:null;return list$1(await mntTypeApplyAsyncHelper(et.objectType,tt,ct,rt,ot,st,ut),et.minLength,et.maxLength)}else{if(isUnion(et))return union$2(await Promise.all(et.members.map(ct=>mntTypeApplyAsyncHelper(ct,tt,nt,rt,ot,st,ut))));(ot||et!=="none")&&(rt&&(et=taggedValue(st,et),st=null),et==="none"?(ut.cache==null&&(ut.cache=await tt(et)),et=ut.cache):et=await tt(et))}return et=taggedValue(st,et),et},mntTypeStripHelper=(et,tt,nt,rt)=>{if(isTaggedValue(et)){const ot=mntTypeStripHelper(et.value,tt,nt,rt);return nt?taggedValue(et.tag,ot):ot}else if(isList(et)&&(tt==null||tt>0)){const ot=tt!=null?tt-1:null;return mntTypeStripHelper(et.objectType,ot,nt,rt)}else if(isUnion(et)){const ot=et.members.filter(st=>rt||st!=="none"&&!(isTaggedValue(st)&&st.value==="none")).map(st=>mntTypeStripHelper(st,tt,nt,rt));return ot.length>0?union$2(ot):"none"}return et},mntValueApplyHelper=(et,tt,nt,rt,ot,st,ut)=>{if(isConcreteTaggedValue(et))return rt?mntValueApplyHelper(et._value,tt,nt,rt,ot,st!=null?concreteTaggedValue(st,et._tag):et._tag,ut):concreteTaggedValue(st!=null?concreteTaggedValue(st,et._tag):et._tag,mntValueApplyHelper(et._value,tt,nt,rt,ot,null,ut));if(lodash$2.exports.isArray(et)&&(nt==null||nt>0)){const ct=nt!=null?nt-1:null;return et.map(ft=>mntValueApplyHelper(ft,tt,ct,rt,ot,st,ut))}else(ot||et!=null)&&(rt&&st!=null&&(et=concreteTaggedValue(st,et),st=null),et==="none"?(ut.valid||(ut.cache=tt(et),ut.valid=!0),et=ut.cache):et=tt(et));return st!=null&&(et=concreteTaggedValue(st,et)),et},mntValueApplyAsyncHelper=async(et,tt,nt,rt,ot,st,ut)=>{if(isConcreteTaggedValue(et))return rt?mntValueApplyAsyncHelper(et._value,tt,nt,rt,ot,st!=null?concreteTaggedValue(st,et._tag):et._tag,ut):concreteTaggedValue(st!=null?concreteTaggedValue(st,et._tag):et._tag,await mntValueApplyAsyncHelper(et._value,tt,nt,rt,ot,null,ut));if(lodash$2.exports.isArray(et)&&(nt==null||nt>0)){const ct=nt!=null?nt-1:null;return Promise.all(et.map(ft=>mntValueApplyAsyncHelper(ft,tt,ct,rt,ot,st,ut)))}else(ot||et!=null)&&(rt&&st!=null&&(et=concreteTaggedValue(st,et),st=null),et==="none"?(ut.valid||(ut.cache=tt(et),ut.valid=!0),et=ut.cache):et=await tt(et));return st!=null&&(et=concreteTaggedValue(st,et)),et};function callFunction(et,tt){const{node:nt}=dereferenceVariablesFromFrame(et,tt);return nt}function dereferenceVariablesFromFrame(et,tt){const nt=new Set;return{node:mapNodes(et,ot=>{if(ot.nodeType==="var"){const st=tt[ot.varName];return st==null?ot:(nt.add(ot.varName),st)}else if(ot.nodeType==="const"&&isFunction$b(ot.type)){const st=ot.type.inputTypes,ut={...tt};if(st!=null)for(const pt of Object.keys(st))delete ut[pt];const{node:ct,usedVarNames:ft}=dereferenceVariablesFromFrame(ot.val,ut);for(const pt of ft)nt.add(pt);return ot.val===ct?ot:{...ot,val:ct}}return ot},!0),usedVarNames:Array.from(nt)}}const VAR_NODE_NAME="__funcParam__";function dereferenceAllVars(et,tt){const nt=[];return{node:mapNodes(et,ot=>{if(ot.nodeType==="var"){const st=resolveVar(tt,ot.varName);if(st==null)return ot;const{closure:ut}=st;if(ut.value==null)throw new Error("HOW!!!!");if(nt.splice(0,0,{name:ot.varName,value:ut.value}),ut.value.nodeType==="var"&&ut.value.varName===VAR_NODE_NAME)return ot;const{node:ct,usedStack:ft}=dereferenceAllVars(ut.value,ut.stack);for(const pt of ft)nt.splice(0,0,pt);return ct}else if(ot.nodeType==="const"&&isFunction$b(ot.type)){const st=pushFrame(tt,lodash$2.exports.mapValues(ot.type.inputTypes,()=>varNode("invalid",VAR_NODE_NAME))),{node:ut,usedStack:ct}=dereferenceAllVars(ot.val,st);for(const ft of ct)nt.splice(0,0,ft);return{...ot,val:ut}}return ot},!0),usedStack:nt}}function getUnresolvedVarNodes(et){const tt=new Set;return mapNodes(et,nt=>(nt.nodeType==="var"&&tt.add(nt.varName),nt),!0),Array.from(tt.keys())}function mapNodes(et,tt,nt){if(et.nodeType==="output"){if(et.fromOp.name==="internal-lambdaClosureArgBridge")return et;const rt=lodash$2.exports.mapValues(et.fromOp.inputs,st=>mapNodes(st,tt,nt));let ot=!1;for(const st of Object.keys(et.fromOp.inputs))rt[st]!==et.fromOp.inputs[st]&&(ot=!0);return tt(ot?{...et,fromOp:{...et.fromOp,inputs:rt}}:et)}else if(isFunctionLiteral(et)&&!nt){const rt=mapNodes(et.val,tt,nt);return nodesEqual(et.val,rt)?tt(et):tt({...et,val:rt})}else return tt(et)}function callOpVeryUnsafe(et,tt,nt="any"){return{nodeType:"output",type:nt,fromOp:{name:et,inputs:tt}}}function isFunctionLiteral(et){return et.nodeType==="const"&&isFunctionType(et.type)}const opLambdaClosureArgBridge=et=>callOpVeryUnsafe("internal-lambdaClosureArgBridge",et);function isRootOp(et){return Object.values(et.inputs).every(tt=>tt.nodeType!=="output")}function isTagConsumer(et){return et.op.name==="tag-run"||et.op.name==="tag-project"||et.op.name==="group-groupkey"}function isTagCreator(et,tt){return(tt==="tag-run"||tt==="tag-project")&&et.op.name.startsWith(tt.substring(4))||tt==="group-groupkey"&&et.op.name==="groupby"}function getTagProvidingInputNodes(et,tt){if(tt.op.name==="tag-run"||tt.op.name==="tag-project"){const nt=et.op.inputs[tt.op.name.substring(4)];if(nt!=null&&nt.nodeType==="output")return[nt]}if(tt.op.name==="group-groupkey"&&et.op.name==="groupby"){const nt=getLambdaFunctionNodes(et);if(nt!=null)return nt}throw new Error(`No tag provided for ${tt.op.name} from ${et.op.name}`)}function getLambdaFunctionNodes(et){if(et.outputNode.lambdaFnNodes==null){let tt;if(et.op.name==="groupby")tt=makeStandardArrLambdaFunctionNode(et,"arr","groupByFn"),tt!=null&&(et.outputNode.lambdaFnNodes=[tt]);else if(et.op.name==="filter")tt=makeStandardArrLambdaFunctionNode(et,"arr","filterFn"),tt!=null&&(et.outputNode.lambdaFnNodes=[tt]);else if(et.op.name==="sort")tt=makeStandardArrLambdaFunctionNode(et,"arr","compFn"),tt!=null&&(et.outputNode.lambdaFnNodes=[tt]);else if(et.op.name==="map"){const nt=getFnNode(et,"mapFn");nt!=null&&(tt=callFunction(nt,{row:callOpVeryUnsafe("index",{arr:opLambdaClosureArgBridge({arg:et.op.inputs.arr}),index:constNumber(0)}),index:constNumber(0)}),et.outputNode.lambdaFnNodes=[tt])}else if(et.op.name==="join"){tt=makeStandardArrLambdaFunctionNode(et,"arr1","join1Fn");const nt=makeStandardArrLambdaFunctionNode(et,"arr2","join2Fn");tt!=null&&nt!=null&&(et.outputNode.lambdaFnNodes=[tt,nt])}else if(et.op.name==="joinAll"){const nt=getFnNode(et,"joinFn");nt!=null&&(tt=callFunction(nt,{row:callOpVeryUnsafe("index",{arr:callOpVeryUnsafe("index",{arr:opLambdaClosureArgBridge({arg:et.op.inputs.arrs}),index:constNumber(0)}),index:constNumber(0)})}),et.outputNode.lambdaFnNodes=[tt])}else if(et.op.name==="mapEach"){const nt=getFnNode(et,"mapFn");nt!=null&&(tt=callFunction(nt,{row:opLambdaClosureArgBridge({arg:et.op.inputs.obj})}),et.outputNode.lambdaFnNodes=[tt])}}return et.outputNode.lambdaFnNodes}function getFnNode(et,tt){const nt=et.op.inputs[tt];return nt!=null&&nt.nodeType==="const"&&nt.type instanceof Object&&nt.type.type==="function"&&nt.val.nodeType==="output"?nt.val:null}function makeStandardArrLambdaFunctionNode(et,tt,nt){const rt=getFnNode(et,nt);return rt!=null?callFunction(rt,{row:callOpVeryUnsafe("index",{arr:opLambdaClosureArgBridge({arg:et.op.inputs[tt]}),index:constNumber(0)})}):null}function forwardOpFromNode(et){return{op:et.fromOp,outputNode:{node:et,inputTo:new Set,descendantTagConsumersWithAncestorProvider:{},consumedAsTagBy:new Set,consumesTagFrom:new Set}}}function getDescendantTagConsumersFromDownstreamOp(et){let tt={};if(et!=null&&(tt={...et.outputNode.descendantTagConsumersWithAncestorProvider},isTagConsumer(et))){const nt=et.op.name;if(tt[nt]==null)tt[nt]=new Set;else throw new Error("invalid");tt[nt].add(et)}return tt}function extractTagConsumers(et,tt){const nt=new Set,rt={},ot=getDescendantTagConsumersFromDownstreamOp(tt);return Object.keys(ot).forEach(st=>{isTagCreator(et,st)?ot[st].forEach(ut=>{nt.add(ut)}):rt[st]=new Set(ot[st])}),{createsTagFor:nt,remainingTagConsumers:rt}}function removeUnresolvedDescendants(et){const tt={};Object.keys(et.outputNode.descendantTagConsumersWithAncestorProvider).forEach(nt=>{const rt=et.outputNode.descendantTagConsumersWithAncestorProvider[nt];rt.size>0&&rt.values().next().value.outputNode.consumesTagFrom.size>0&&(tt[nt]=et.outputNode.descendantTagConsumersWithAncestorProvider[nt])}),et.outputNode.descendantTagConsumersWithAncestorProvider=tt}function updateForwardOpWithRemainingTagConsumers(et,tt){const nt=[];return Object.keys(tt).forEach(rt=>{if(et.op.name===rt)throw new Error("updateForwardOpWithRemainingTagConsumers: forwardOp is the same as consumerOp");if(et.outputNode.descendantTagConsumersWithAncestorProvider[rt]==null)nt.push(rt),et.outputNode.descendantTagConsumersWithAncestorProvider[rt]=tt[rt];else{const ot=et.outputNode.descendantTagConsumersWithAncestorProvider[rt].values().next().value.outputNode.consumesTagFrom;if(ot.size>0)tt[rt].forEach(st=>{et.outputNode.descendantTagConsumersWithAncestorProvider[rt].add(st),ot.forEach(ut=>{ut.outputNode.consumedAsTagBy.add(st),st.outputNode.consumesTagFrom.add(ut)})});else throw new Error("updateForwardOpWithRemainingTagConsumers: consumesTagFrom is empty")}}),nt}class BaseForwardGraph{constructor(tt){this.storage=tt}getRoots(){return this.storage.getRoots()}getOp(tt){return this.storage.getOp(tt)}setOp(tt){return this.storage.setOp(tt)}update(tt){this.updateForwardGraphVisitNode(tt)}size(){return this.storage.size()}updateForwardGraphVisitOp(tt,nt,rt){const ot=tt.fromOp,st=this.getOp(ot),ut=st==null,ct=st??forwardOpFromNode(tt),ft=ct.op.name==="internal-lambdaClosureArgBridge";if(!ft&&ut&&rt)throw new Error("updateForwardGraphVisitOp: tagsOnly should only be set on existing ops or lambda bridge ops");rt=rt||ft,rt||(nt!=null&&ct.outputNode.inputTo.add(nt),ut&&(isRootOp(ot)&&this.getRoots().add(ct),this.setOp(ct)));const{createsTagFor:pt,remainingTagConsumers:ht}=extractTagConsumers(ct,nt),mt=updateForwardOpWithRemainingTagConsumers(ct,ht),yt=getLambdaFunctionNodes(ct);if(!ut&&mt.length>0)if(ct.outputNode.consumesTagFrom.size>0)ct.outputNode.consumesTagFrom.forEach(vt=>{this.updateForwardGraphVisitNode(vt.outputNode.node,ct,!0)});else{yt?.forEach(vt=>{this.updateForwardGraphVisitNode(vt)});for(const vt of Object.values(ot.inputs))this.updateForwardGraphVisitNode(vt,ct,!0)}else if(ut){yt?.forEach(vt=>{this.updateForwardGraphVisitNode(vt)});for(const vt of Object.values(ot.inputs))this.updateForwardGraphVisitNode(vt,ct)}this.connectTagProviderToConsumers(ct,pt),removeUnresolvedDescendants(ct)}updateForwardGraphVisitNode(tt,nt,rt){tt.nodeType==="output"&&this.updateForwardGraphVisitOp(tt,nt,rt)}connectTagProviderToConsumers(tt,nt){nt.forEach(rt=>{getTagProvidingInputNodes(tt,rt).forEach(st=>{const ut=this.getOp(st.fromOp);ut!=null&&(ut.outputNode.consumedAsTagBy.add(rt),rt.outputNode.consumesTagFrom.add(ut))})})}}class RefStorage{constructor(){this.roots=new Set,this.ops=new Map}getRoots(){return this.roots}getOp(tt){return this.ops.get(tt)}setOp(tt){this.ops.set(tt.op,tt)}size(){return this.ops.size}}function forwardOpInputs(et,tt){return lodash$2.exports.mapValues(tt.op.inputs,nt=>{if(nt.nodeType==="output")return et.getOp(nt.fromOp).outputNode.result;if(nt.nodeType==="const")return nt.val;if(nt.nodeType==="var")return})}function newRefForwardGraph(){return new BaseForwardGraph(new RefStorage)}const isPromise$1=et=>et instanceof Promise||typeof et=="object"&&et!==null&&typeof et.then=="function",executeSync=(et,tt,nt,rt)=>{let ot=tt.get(et);if(ot!==void 0)return ot;if(et.nodeType==="output"){const st=et.fromOp,ut={};for(const ft of Object.keys(et.fromOp.inputs))ut[ft]=executeSync(et.fromOp.inputs[ft],tt,nt,rt);const ct=rt.getOpDef(st.name);if(opDefIsLowLevel(ct)){const ft=ct.resolver(ut,nt,nt.getOp(st),syncResolverContext,engineFactory);if(isPromise$1(ft))throw new Error(`Cannot execute executeSync on async node: ${ct.name}`);ot=ft}else throw new Error(`Cannot execute executeSync on non-low level op: ${ct.name}`)}else if(et.nodeType==="const")ot=et.val;else throw new Error("invalid node");return tt.set(et,ot),ot};class ThrowingPlaceholderServer{async execute(tt){throw new Error("Cannot query")}async resetExecutionCache(){throw new Error("Cannot resetExecutionCache")}getArtifactFileContents(tt,nt){throw new Error("Cannot getArtifactFileContents")}getRunFileContents(tt,nt,rt,ot){throw new Error("Cannot getRunFileContents")}getArtifactFileDirectUrl(tt,nt){throw new Error("Cannot getArtifactFileDirectUrl")}getArtifactFileMetadata(tt,nt){throw new Error("Cannot getArtifactFileMetadata")}}const syncResolverContext={backend:new ThrowingPlaceholderServer,frame:{},trace:(et,tt)=>tt()},engineFactory=()=>{throw new Error("Cannot use sub engine with synchronous execution")};function filterNodes(et,tt,nt){let rt=tt(et)?[et]:[];if(et.nodeType==="const"&&typeof et.type=="object"&&et.type?.type==="function"&&!nt)rt=[...rt,...filterNodes(et.val,tt)];else if(et.nodeType==="output"){const ot=Object.values(et.fromOp.inputs).flatMap(st=>filterNodes(st,tt));rt=rt.concat(ot)}return rt}const getOpDefsByDisplayName=(et,tt)=>Object.values(tt.allOps()).filter(nt=>opDisplayName({name:nt.name},tt)===et);function opDisplayName(et,tt){return isBinaryOp(et,tt)||isUnaryOp(et,tt)?opSymbol(et,tt):et.name.indexOf("-")!==-1?splitOnce(et.name,"-")[1]:et.name}function opSymbol(et,tt){const nt=tt.getOpDef(et.name);if(nt.renderInfo.repr==null)throw new Error(`op ${et.name} does not have a symbolic representation`);return nt.renderInfo.repr}function isUnaryOp(et,tt){return tt.getOpDef(et.name).renderInfo.type==="unary"}function isBinaryOp(et,tt){return tt.getOpDef(et.name).renderInfo.type==="binary"}function isDotChainedOp(et,tt){return tt.getOpDef(et.name).renderInfo.type==="chain"}function isBracketsOp(et,tt){return tt.getOpDef(et.name).renderInfo.type==="brackets"}function isGetAttr(et,tt){return et.name==="Object-__getattr__"}function getOpAssociativity(et){return et==="number-powBinary"?1:0}const opPrecedences=[["or"],["and"],["number-equal","number-notEqual"],["number-less","number-greater","number-lessEqual","number-greaterEqual"],["number-add","number-sub"],["number-mult","number-div","number-modulo"],["number-negate","boolean-not"],["number-powBinary"]];function getOpPrecedence(et){const tt=opPrecedences.findIndex(rt=>rt.includes(et));return tt===-1?opPrecedences.length:tt}function opNeedsParens(et,tt,nt){if(!isBinaryOp(et,nt))return!1;let rt;try{rt=findOutputOf(et,tt)}catch{}if(!rt)return!1;const{outputNode:ot,argIndex:st}=findConsumingOp(rt,tt)||{};if(!ot)return!1;if(isDotChainedOp(ot.fromOp,nt)||isBracketsOp(ot.fromOp,nt))return st===0;const ut=getOpPrecedence(et.name);let ct,ft;st===0?(ct=et.inputs.rhs,ft="lhs"):(ct=et.inputs.lhs,ft="rhs");const pt=nt.getOpDef(ot.fromOp.name);if(!nodeIsValidAsNamedArg(pt,ft,ct))return!1;const mt=getOpPrecedence(ot.fromOp.name),yt=getOpAssociativity(ot.fromOp.name),vt=st!==0?1:0;if(yt===0){if(vt===0&&mt>ut||vt===1&&mt>=ut)return!0}else if(vt===0&&mt>=ut||vt===1&&mt>ut)return!0;return!1}function findConsumingOp(et,tt){const nt=filterNodes(tt,ct=>ct.nodeType==="output"?Object.values(ct.fromOp.inputs).find(pt=>pt===et)!=null:!1);if(nt.length===0)return;if(nt.length>1)throw new Error("too many consuming ops, this is not an expression");const rt=nt[0];if(rt.nodeType!=="output")throw new Error("findConsumingOp: found non-output consumingOpNode");const ot=Object.keys(rt.fromOp.inputs),ut=Object.values(rt.fromOp.inputs).findIndex(ct=>ct===et);return{argIndex:ut,argName:ot[ut],outputNode:rt}}function findOutputOf(et,tt){const nt=filterNodes(tt,rt=>rt.nodeType==="output"&&rt.fromOp===et);if(nt.length!==1)throw new Error(`Expected exactly one output node for op ${et.name} in ${JSON.stringify(tt)}, but found ${nt.length}`);return nt[0]}function nodeIsValidAsNamedArg(et,tt,nt){const rt=et.inputTypes[tt];return rt==null||isAssignableTo(nt.type,rt)||!isSimpleTypeShape(nt.type)&&nt.type.type==="run-type"&&isAssignableTo(nt.type._output,rt)}function opInputsAreValid(et,tt){let nt=!0;for(const[rt,ot]of Object.entries(et))nodeIsValidAsNamedArg(tt,rt,ot)||(nt=!1);return nt}function nodeToString(et,tt,nt=0,rt){if(et.nodeType==="const"){if(et.type._is_object)return`<${et.type.type}>`;if(isFunction$b(et.type)){nt!=null&&(nt+=2);const ot=Object.keys(et.type.inputTypes),st=`(${lodash$2.exports.uniq(ot).join(", ")}) => `+nodeToString(et.val,tt,nt!=null?0:null,rt);return nt!=null?st.split(`
`).map((ct,ft)=>ft===0?ct:indent(ct,nt)).join(`
`):st}else if(et.type==="none")return"null";return typeof et.val=="string"&&et.val.includes('"')&&!et.val.includes("'")?indent(`'${et.val}'`,nt):indent(JSON.stringify(et.val).replace(/\\\\/g,"\\"),nt)}else return et.nodeType==="void"?"":et.nodeType==="var"?`${et.varName}`:et.nodeType==null?"":opToString(et.fromOp,rt||et,tt,nt)}function opToString(et,tt,nt,rt=0){const ot=Object.values(et.inputs),st=ct=>nodeToString(ct,nt,rt,tt),ut=nt.getOpDef(et.name);if(et.name.endsWith("__getattr__"))return`${st(ot[0])}.${st(ot[1]).slice(1,-1)}`;switch(ut.renderInfo.type){case"arrayLiteral":{let ht="[";const mt=[];for(const yt of Object.keys(et.inputs))mt.push(`${st(et.inputs[yt])}`);return ht+=mt.join(", "),ht+="]",ht}case"dictionaryLiteral":{let ht="{";const mt=[];for(const yt of Object.keys(et.inputs))mt.push(`${yt}: ${st(et.inputs[yt])}`);return ht+=mt.join(", "),ht+="}",ht}case"unary":{const ht=opNeedsParens(et,tt,nt);return`${ut.renderInfo.repr}${ht?"(":""}${st(ot[0])}${ht?")":""}`}case"binary":{const ht=opNeedsParens(et,tt,nt);return`${ht?"(":""}${st(ot[0])} ${ut.renderInfo.repr} ${st(ot[1])}${ht?")":""}`}case"brackets":return`${st(ot[0])}[${st(ot[1])}]`;case"chain":const ct=ot.slice(1),ft=ct.length>0?`(${ct.map(st).join(", ")})`:"";return`${ot.length>0?st(ot[0]):""}${rt!=null?`
  `:""}.${opDisplayName(et,nt)}${ft}`;case"function":const pt=ot.map(st).map(ht=>rt!=null?ht.split(`
`).map(mt=>indent(mt,2)).join(`
`):ht).join(`,${rt!=null?`
`:" "}`);return`${opDisplayName(et,nt)}(${rt!=null?`
`:""}${pt})`;default:throw new Error(`op ${et.name} has invalid renderInfo.type ${ut.renderInfo.type}`)}}function typeToString(et,tt=!0,nt=0,rt=!1){if(et===void 0)return"INVALID_TYPE_ERROR";if(rt&&isTaggedValue(et))return typeToString(taggedValueValueType(et),tt,nt,rt);if(isSimpleTypeShape(et))return et;if(et.type==="typedDict")return tt?"dict":["{",..._$2.map(et.propertyTypes,(ot,st)=>indent(st+":"+typeToString(ot,tt,nt+1),nt+1)),indent("}",nt)].join(`
`);if(et.type==="table")return tt?"(table)":_$2.isEmpty(et.columnTypes)?"Table":["Table<",..._$2.map(et.columnTypes,(ot,st)=>indent(st+":"+typeToString(ot,tt,nt+1),nt+1)),indent(">",nt)].join(`
`);if(et.type==="joined-table")return tt?"(joined table)":_$2.isEmpty(et.columnTypes)?"JoinedTable":["JoinedTable<",..._$2.map(et.columnTypes,(ot,st)=>indent(st+":"+typeToString(ot,tt,nt+1),nt+1)),indent(">",nt)].join(`
`);if(et.type==="partitioned-table")return tt?"(partitioned table)":_$2.isEmpty(et.columnTypes)?"PartitionedTable":["PartitionedTable<",..._$2.map(et.columnTypes,(ot,st)=>indent(st+":"+typeToString(ot,tt,nt+1),nt+1)),indent(">",nt)].join(`
`);if(et.type==="dict")return tt?"(dictionary)":`{[k]: ${typeToString(et.objectType,tt,nt+1)}}`;if(et.type==="tagged")return tt?typeToString(et.value,tt,nt):["Tagged<",indent("tag: "+typeToString(et.tag,tt,nt+1),nt+1),indent("value: "+typeToString(et.value,tt,nt+1),nt+1),indent(">",nt)].join(`
`);if(et.type==="list")return`List<${typeToString(et.objectType,tt,nt)}>`;if(et.type==="function")return`Function<outputType: ${typeToString(et.outputType,tt,nt)}>`;if(et.type==="file")return et.wbObjectType!=null?`File<${typeToString(et.wbObjectType,tt,nt)}>`:`File<{${et.extension!=null?"extension: "+et.extension:""}}>`;if(et.type==="dir")return"Dir";if(et.type==="union"){if(et.members.length===2&&et.members.includes("none")){const ot=et.members.filter(st=>st!=="none")[0];return`Maybe<${typeToString(ot,tt,nt+1)}>`}return tt?"Union<...>":["Union<",et.members.map(ot=>indent(typeToString(ot,tt,nt+1),nt+1)).join(` |
`),indent(">",nt)].join(`
`)}else{if(et.type==="ndarray")return`NDArray<${et.shape}>`;if(et.type==="const")return typeToString(et.valType,tt,nt);if(isMediaType(et))return et.type;if(et.type!=null)return et.type}throw new Error(`unhandled type ${JSON.stringify(et)}`)}const MAX_RUN_LIMIT=50,MAX_DATE_MS=864e13,DEBUG_ATTACH_TO_GLOBAL_THIS=!1,defaultCachePolicy={ttlSeconds:30},replaceConstTypeWithNode=et=>lodash$2.exports.mapValues(et,tt=>isConstType(tt.type)?constNode(tt.type.valType,tt.type.val):tt),determineOutputType=(et,tt)=>{let nt="any";if(outputTypeIsExecutable(et.outputType))tt=replaceConstTypeWithNode(tt),nt=et.outputType(tt);else if(outputTypeIsFunctionNode(et.outputType)){if(nt=executeNodeSync(callFunction(et.outputType.val,{input_types:constNode(dict("type"),lodash$2.exports.mapValues(tt,inputNodeToType))})),nt==null)return"unknown";isConstType(nt)&&(nt.valType==="type"?nt=nt.val:nt=nt.valType)}else if(outputTypeIsType(et.outputType))nt=et.outputType;else throw new Error("Invalid output type");return nt},inputNodeToType=et=>isConstNode(et)?isConstType(et.type)?et.type:constType(et.val,et.type):constType(et.type,"type"),executeNodeSync=et=>{if(et.nodeType==="void")return null;const tt=newRefForwardGraph();return tt.update(et),executeSync(et,new Map,tt,StaticOpStore.getInstance())};class BaseOpStore{constructor(){this.allOps=()=>this.registeredOps,this.registeredOps={}}getOpDef(tt){const nt=this.registeredOps[tt];if(nt==null)throw console.log("not found",tt,this.registeredOps),new Error("op not registered: "+tt);return nt}registerOp(tt){this.registeredOps[tt.name]!=null&&console.warn(`programming error: double registered op ${tt.name} (is this a duplicate?)`),this.registeredOps[tt.name]={...tt,cachePolicy:tt.cachePolicy!=null?tt.cachePolicy:defaultCachePolicy}}makeOp(tt){const{name:nt,argTypes:rt,returnType:ot,renderInfo:st,resolver:ut,resolveOutputType:ct,hidden:ft,kind:pt,cachePolicy:ht}=tt;if(!nt.startsWith("local-artifact")&&nt.split("-").length>2)throw new Error(`Op name ${nt} cannot contain more than 1 dash`);let{description:mt,argDescriptions:yt,returnValueDescription:vt,supportedEngines:Tt}=tt;if(mt==null)if(ft)mt="HIDDEN OP";else throw new Error("op description is required for non-hidden ops");if(yt==null)if(ft)yt=lodash$2.exports.mapValues(rt,()=>"HIDDEN OP");else throw new Error("op argDescriptions is required for non-hidden ops");if(vt==null)if(ft)vt="HIDDEN OP";else throw new Error("op returnValueDescription is required for non-hidden ops");Tt==null&&(Tt=new Set(["ts"]));const Et={name:nt,inputTypes:rt,outputType:ot,renderInfo:st||{type:"chain"},description:mt,argDescriptions:yt,returnValueDescription:vt,supportedEngines:Tt,refineNode:ct,hidden:ft,kind:pt,cachePolicy:ht},xt=Ct=>({nodeType:"output",type:determineOutputType(Et,Ct),fromOp:{name:nt,inputs:Ct}}),At=ut??(Ct=>{throw new Error("resolver not implemented for "+nt)});return Et.op=xt,Et.resolver=At,this.registerOp(Et),xt}debugMeta(){return{id:"BaseOpStore"}}}class StaticOpStore extends BaseOpStore{static getInstance(){return this.instance||(this.instance=new this)}constructor(){if(super(),StaticOpStore.instance)throw new Error("Error: Instantiation failed: Use SingletonClass.getInstance() instead of new.");this.registeredOps={},StaticOpStore.instance=this}registerOp(tt){super.registerOp(tt),tt.name==="boolean-not"&&(this.registeredOps.not=this.registeredOps["boolean-not"])}debugMeta(){return{id:"StaticOpStore"}}}function registerGeneratedWeaveOp(et){const{name:tt,inputTypes:nt,outputType:rt,expansionFn:ot}=et;StaticOpStore.getInstance().registerOp({name:tt,inputTypes:nt,outputType:rt,renderInfo:{type:"chain"},expansion:ot,description:"",argDescriptions:{},returnValueDescription:"",cachePolicy:defaultCachePolicy,supportedEngines:new Set(["ts"])})}function makeOp(et){return StaticOpStore.getInstance().makeOp(et)}typeof globalThis<"u"&&DEBUG_ATTACH_TO_GLOBAL_THIS&&(globalThis.op=et=>{const tt=StaticOpStore.getInstance().allOps()[et];if(!tt)throw new TypeError(`unknown op: '${et}'`);return(...nt)=>{const rt=Object.keys(tt.inputTypes).reduce((ot,st,ut)=>{let ct=nt[ut];if(typeof ct>"u")throw new TypeError(`missing value for input '${st}'`);return typeof ct!="object"&&(ct={nodeType:"const",type:typeof ct,val:ct}),ot[st]=ct,ot},{});return opDefIsLowLevel(tt)?tt.op(rt):null}});class CGEventTracker{constructor(){this.routedServerRemote=0,this.routedServerLocal=0,this.cachedClientSubscriptions=0,this.cachedClientCacheHits=0,this.basicClientSubscriptions=0,this.localServerQueryBatchRequests=0,this.remoteHttpServerQueryBatchRequests=0,this.engineForwardGraphNodes=0,this.engineResolves=0,this.shadowServerRequests=0,this.startDate=0,this.startDate=Date.now()}reset(){this.routedServerRemote=0,this.routedServerLocal=0,this.cachedClientSubscriptions=0,this.cachedClientCacheHits=0,this.basicClientSubscriptions=0,this.localServerQueryBatchRequests=0,this.remoteHttpServerQueryBatchRequests=0,this.engineForwardGraphNodes=0,this.engineResolves=0,this.shadowServerRequests=0,this.startDate=Date.now()}summary(){const tt=this.cachedClientSubscriptions-this.routedServerRemote,nt=this.cachedClientSubscriptions-this.cachedClientCacheHits,rt=this.basicClientSubscriptions-this.routedServerLocal-nt,ot=this.engineForwardGraphNodes-this.engineResolves;return{__duration:Date.now()-this.startDate,_1_nodeSubscriptions:{toRouted:{toRemoteCache:this.routedServerRemote,toBasicClientLocal:this.routedServerLocal},toEcosystem:{toRemoteCache:tt},toProduction:{toBasicClientLocal:rt}},_2_remoteCache:{resolvedWithCache:this.cachedClientCacheHits,toBasicClientRemote:nt},_3_basicClientBatchQueries:{toLocalEngine:this.localServerQueryBatchRequests,resolvedWithRemoteEngine:this.remoteHttpServerQueryBatchRequests,shadowServerRequests:this.shadowServerRequests},_4_localEngine:{resolvedWithOp:this.engineResolves,resolvedWithCache:ot}}}}const GlobalCGEventTracker=new CGEventTracker;var Observable$1={};Object.defineProperty(Observable$1,"__esModule",{value:!0});Observable$1.Observable=void 0;const hasSymbol$1=et=>Boolean(Symbol[et]),getSymbol=et=>hasSymbol$1(et)?Symbol[et]:"@@"+et,SymbolIterator=getSymbol("iterator"),SymbolObservable=getSymbol("observable"),SymbolSpecies=getSymbol("species");function getMethod(et,tt){let nt=et[tt];if(nt!=null){if(typeof nt!="function")throw new TypeError(nt+" is not a function");return nt}}function getSpecies(et){let tt=et.constructor;return tt!==void 0&&(tt=tt[SymbolSpecies],tt===null&&(tt=void 0)),tt!==void 0?tt:Observable}function isObservable(et){return et instanceof Observable}function hostReportError(et){hostReportError.log?hostReportError.log(et):setTimeout(()=>{throw et})}function enqueue$1(et){Promise.resolve().then(()=>{try{et()}catch(tt){hostReportError(tt)}})}function cleanupSubscription(et){let tt=et._cleanup;if(tt!==void 0&&(et._cleanup=void 0,!!tt))try{if(typeof tt=="function")tt();else{let nt=getMethod(tt,"unsubscribe");nt&&nt.call(tt)}}catch(nt){hostReportError(nt)}}function closeSubscription(et){et._observer=void 0,et._queue=void 0,et._state="closed"}function flushSubscription(et){let tt=et._queue;if(!!tt){et._queue=void 0,et._state="ready";for(let nt=0;nt<tt.length&&(notifySubscription(et,tt[nt].type,tt[nt].value),et._state!=="closed");++nt);}}function notifySubscription(et,tt,nt){et._state="running";let rt=et._observer;try{let ot=getMethod(rt,tt);switch(tt){case"next":ot&&ot.call(rt,nt);break;case"error":if(closeSubscription(et),ot)ot.call(rt,nt);else throw nt;break;case"complete":closeSubscription(et),ot&&ot.call(rt);break}}catch(ot){hostReportError(ot)}et._state==="closed"?cleanupSubscription(et):et._state==="running"&&(et._state="ready")}function onNotify(et,tt,nt){if(et._state!=="closed"){if(et._state==="buffering"){et._queue.push({type:tt,value:nt});return}if(et._state!=="ready"){et._state="buffering",et._queue=[{type:tt,value:nt}],enqueue$1(()=>flushSubscription(et));return}notifySubscription(et,tt,nt)}}class Subscription{constructor(tt,nt){this._cleanup=void 0,this._observer=tt,this._queue=void 0,this._state="initializing";let rt=this,ot={get closed(){return rt._state==="closed"},next(st){onNotify(rt,"next",st)},error(st){onNotify(rt,"error",st)},complete(){onNotify(rt,"complete")}};try{this._cleanup=nt.call(void 0,ot)}catch(st){ot.error(st)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(closeSubscription(this),cleanupSubscription(this))}}class Observable{constructor(tt){if(!(this instanceof Observable))throw new TypeError("Observable cannot be called as a function");if(typeof tt!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=tt}subscribe(tt){return(typeof tt!="object"||tt===null)&&(tt={next:tt,error:arguments[1],complete:arguments[2]}),new Subscription(tt,this._subscriber)}forEach(tt){return new Promise((nt,rt)=>{if(typeof tt!="function"){rt(new TypeError(tt+" is not a function"));return}function ot(){st.unsubscribe(),nt()}let st=this.subscribe({next(ut){try{tt(ut,ot)}catch(ct){rt(ct),st.unsubscribe()}},error:rt,complete:nt})})}map(tt){if(typeof tt!="function")throw new TypeError(tt+" is not a function");let nt=getSpecies(this);return new nt(rt=>this.subscribe({next(ot){try{ot=tt(ot)}catch(st){return rt.error(st)}rt.next(ot)},error(ot){rt.error(ot)},complete(){rt.complete()}}))}filter(tt){if(typeof tt!="function")throw new TypeError(tt+" is not a function");let nt=getSpecies(this);return new nt(rt=>this.subscribe({next(ot){try{if(!tt(ot))return}catch(st){return rt.error(st)}rt.next(ot)},error(ot){rt.error(ot)},complete(){rt.complete()}}))}reduce(tt){if(typeof tt!="function")throw new TypeError(tt+" is not a function");let nt=getSpecies(this),rt=arguments.length>1,ot=!1,ut=arguments[1];return new nt(ct=>this.subscribe({next(ft){let pt=!ot;if(ot=!0,!pt||rt)try{ut=tt(ut,ft)}catch(ht){return ct.error(ht)}else ut=ft},error(ft){ct.error(ft)},complete(){if(!ot&&!rt)return ct.error(new TypeError("Cannot reduce an empty sequence"));ct.next(ut),ct.complete()}}))}async all(){let tt=[];return await this.forEach(nt=>tt.push(nt)),tt}concat(...tt){let nt=getSpecies(this);return new nt(rt=>{let ot,st=0;function ut(ct){ot=ct.subscribe({next(ft){rt.next(ft)},error(ft){rt.error(ft)},complete(){st===tt.length?(ot=void 0,rt.complete()):ut(nt.from(tt[st++]))}})}return ut(this),()=>{ot&&(ot.unsubscribe(),ot=void 0)}})}flatMap(tt){if(typeof tt!="function")throw new TypeError(tt+" is not a function");let nt=getSpecies(this);return new nt(rt=>{let ot=[],st=this.subscribe({next(ct){if(tt)try{ct=tt(ct)}catch(pt){return rt.error(pt)}let ft=nt.from(ct).subscribe({next(pt){rt.next(pt)},error(pt){rt.error(pt)},complete(){let pt=ot.indexOf(ft);pt>=0&&ot.splice(pt,1),ut()}});ot.push(ft)},error(ct){rt.error(ct)},complete(){ut()}});function ut(){st.closed&&ot.length===0&&rt.complete()}return()=>{ot.forEach(ct=>ct.unsubscribe()),st.unsubscribe()}})}[SymbolObservable](){return this}static from(tt){let nt=typeof this=="function"?this:Observable;if(tt==null)throw new TypeError(tt+" is not an object");let rt=getMethod(tt,SymbolObservable);if(rt){let ot=rt.call(tt);if(Object(ot)!==ot)throw new TypeError(ot+" is not an object");return isObservable(ot)&&ot.constructor===nt?ot:new nt(st=>ot.subscribe(st))}if(hasSymbol$1("iterator")&&(rt=getMethod(tt,SymbolIterator),rt))return new nt(ot=>{enqueue$1(()=>{if(!ot.closed){for(let st of rt.call(tt))if(ot.next(st),ot.closed)return;ot.complete()}})});if(Array.isArray(tt))return new nt(ot=>{enqueue$1(()=>{if(!ot.closed){for(let st=0;st<tt.length;++st)if(ot.next(tt[st]),ot.closed)return;ot.complete()}})});throw new TypeError(tt+" is not observable")}static of(...tt){let nt=typeof this=="function"?this:Observable;return new nt(rt=>{enqueue$1(()=>{if(!rt.closed){for(let ot=0;ot<tt.length;++ot)if(rt.next(tt[ot]),rt.closed)return;rt.complete()}})})}static get[SymbolSpecies](){return this}}Observable$1.Observable=Observable;Object.defineProperty(Observable,Symbol("extensions"),{value:{symbol:SymbolObservable,hostReportError},configurable:!0});var zenObservable=Observable$1.Observable,iterator$1,hasRequiredIterator$1;function requireIterator$1(){return hasRequiredIterator$1||(hasRequiredIterator$1=1,iterator$1=function(et){et.prototype[Symbol.iterator]=function*(){for(let tt=this.head;tt;tt=tt.next)yield tt.value}}),iterator$1}var yallist$1=Yallist$3;Yallist$3.Node=Node$5;Yallist$3.create=Yallist$3;function Yallist$3(et){var tt=this;if(tt instanceof Yallist$3||(tt=new Yallist$3),tt.tail=null,tt.head=null,tt.length=0,et&&typeof et.forEach=="function")et.forEach(function(ot){tt.push(ot)});else if(arguments.length>0)for(var nt=0,rt=arguments.length;nt<rt;nt++)tt.push(arguments[nt]);return tt}Yallist$3.prototype.removeNode=function(et){if(et.list!==this)throw new Error("removing node which does not belong to this list");var tt=et.next,nt=et.prev;return tt&&(tt.prev=nt),nt&&(nt.next=tt),et===this.head&&(this.head=tt),et===this.tail&&(this.tail=nt),et.list.length--,et.next=null,et.prev=null,et.list=null,tt};Yallist$3.prototype.unshiftNode=function(et){if(et!==this.head){et.list&&et.list.removeNode(et);var tt=this.head;et.list=this,et.next=tt,tt&&(tt.prev=et),this.head=et,this.tail||(this.tail=et),this.length++}};Yallist$3.prototype.pushNode=function(et){if(et!==this.tail){et.list&&et.list.removeNode(et);var tt=this.tail;et.list=this,et.prev=tt,tt&&(tt.next=et),this.tail=et,this.head||(this.head=et),this.length++}};Yallist$3.prototype.push=function(){for(var et=0,tt=arguments.length;et<tt;et++)push$2(this,arguments[et]);return this.length};Yallist$3.prototype.unshift=function(){for(var et=0,tt=arguments.length;et<tt;et++)unshift$1(this,arguments[et]);return this.length};Yallist$3.prototype.pop=function(){if(!!this.tail){var et=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,et}};Yallist$3.prototype.shift=function(){if(!!this.head){var et=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,et}};Yallist$3.prototype.forEach=function(et,tt){tt=tt||this;for(var nt=this.head,rt=0;nt!==null;rt++)et.call(tt,nt.value,rt,this),nt=nt.next};Yallist$3.prototype.forEachReverse=function(et,tt){tt=tt||this;for(var nt=this.tail,rt=this.length-1;nt!==null;rt--)et.call(tt,nt.value,rt,this),nt=nt.prev};Yallist$3.prototype.get=function(et){for(var tt=0,nt=this.head;nt!==null&&tt<et;tt++)nt=nt.next;if(tt===et&&nt!==null)return nt.value};Yallist$3.prototype.getReverse=function(et){for(var tt=0,nt=this.tail;nt!==null&&tt<et;tt++)nt=nt.prev;if(tt===et&&nt!==null)return nt.value};Yallist$3.prototype.map=function(et,tt){tt=tt||this;for(var nt=new Yallist$3,rt=this.head;rt!==null;)nt.push(et.call(tt,rt.value,this)),rt=rt.next;return nt};Yallist$3.prototype.mapReverse=function(et,tt){tt=tt||this;for(var nt=new Yallist$3,rt=this.tail;rt!==null;)nt.push(et.call(tt,rt.value,this)),rt=rt.prev;return nt};Yallist$3.prototype.reduce=function(et,tt){var nt,rt=this.head;if(arguments.length>1)nt=tt;else if(this.head)rt=this.head.next,nt=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var ot=0;rt!==null;ot++)nt=et(nt,rt.value,ot),rt=rt.next;return nt};Yallist$3.prototype.reduceReverse=function(et,tt){var nt,rt=this.tail;if(arguments.length>1)nt=tt;else if(this.tail)rt=this.tail.prev,nt=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var ot=this.length-1;rt!==null;ot--)nt=et(nt,rt.value,ot),rt=rt.prev;return nt};Yallist$3.prototype.toArray=function(){for(var et=new Array(this.length),tt=0,nt=this.head;nt!==null;tt++)et[tt]=nt.value,nt=nt.next;return et};Yallist$3.prototype.toArrayReverse=function(){for(var et=new Array(this.length),tt=0,nt=this.tail;nt!==null;tt++)et[tt]=nt.value,nt=nt.prev;return et};Yallist$3.prototype.slice=function(et,tt){tt=tt||this.length,tt<0&&(tt+=this.length),et=et||0,et<0&&(et+=this.length);var nt=new Yallist$3;if(tt<et||tt<0)return nt;et<0&&(et=0),tt>this.length&&(tt=this.length);for(var rt=0,ot=this.head;ot!==null&&rt<et;rt++)ot=ot.next;for(;ot!==null&&rt<tt;rt++,ot=ot.next)nt.push(ot.value);return nt};Yallist$3.prototype.sliceReverse=function(et,tt){tt=tt||this.length,tt<0&&(tt+=this.length),et=et||0,et<0&&(et+=this.length);var nt=new Yallist$3;if(tt<et||tt<0)return nt;et<0&&(et=0),tt>this.length&&(tt=this.length);for(var rt=this.length,ot=this.tail;ot!==null&&rt>tt;rt--)ot=ot.prev;for(;ot!==null&&rt>et;rt--,ot=ot.prev)nt.push(ot.value);return nt};Yallist$3.prototype.splice=function(et,tt){et>this.length&&(et=this.length-1),et<0&&(et=this.length+et);for(var nt=0,rt=this.head;rt!==null&&nt<et;nt++)rt=rt.next;for(var ot=[],nt=0;rt&&nt<tt;nt++)ot.push(rt.value),rt=this.removeNode(rt);rt===null&&(rt=this.tail),rt!==this.head&&rt!==this.tail&&(rt=rt.prev);for(var nt=2;nt<arguments.length;nt++)rt=insert$2(this,rt,arguments[nt]);return ot};Yallist$3.prototype.reverse=function(){for(var et=this.head,tt=this.tail,nt=et;nt!==null;nt=nt.prev){var rt=nt.prev;nt.prev=nt.next,nt.next=rt}return this.head=tt,this.tail=et,this};function insert$2(et,tt,nt){var rt=tt===et.head?new Node$5(nt,null,tt,et):new Node$5(nt,tt,tt.next,et);return rt.next===null&&(et.tail=rt),rt.prev===null&&(et.head=rt),et.length++,rt}function push$2(et,tt){et.tail=new Node$5(tt,et.tail,null,et),et.head||(et.head=et.tail),et.length++}function unshift$1(et,tt){et.head=new Node$5(tt,null,et.head,et),et.tail||(et.tail=et.head),et.length++}function Node$5(et,tt,nt,rt){if(!(this instanceof Node$5))return new Node$5(et,tt,nt,rt);this.list=rt,this.value=et,tt?(tt.next=this,this.prev=tt):this.prev=null,nt?(nt.prev=this,this.next=nt):this.next=null}try{requireIterator$1()(Yallist$3)}catch{}const Yallist$2=yallist$1,MAX$1=Symbol("max"),LENGTH$1=Symbol("length"),LENGTH_CALCULATOR$1=Symbol("lengthCalculator"),ALLOW_STALE$1=Symbol("allowStale"),MAX_AGE$1=Symbol("maxAge"),DISPOSE$1=Symbol("dispose"),NO_DISPOSE_ON_SET$1=Symbol("noDisposeOnSet"),LRU_LIST$1=Symbol("lruList"),CACHE$2=Symbol("cache"),UPDATE_AGE_ON_GET$1=Symbol("updateAgeOnGet"),naiveLength$1=()=>1;class LRUCache$1{constructor(tt){if(typeof tt=="number"&&(tt={max:tt}),tt||(tt={}),tt.max&&(typeof tt.max!="number"||tt.max<0))throw new TypeError("max must be a non-negative number");this[MAX$1]=tt.max||1/0;const nt=tt.length||naiveLength$1;if(this[LENGTH_CALCULATOR$1]=typeof nt!="function"?naiveLength$1:nt,this[ALLOW_STALE$1]=tt.stale||!1,tt.maxAge&&typeof tt.maxAge!="number")throw new TypeError("maxAge must be a number");this[MAX_AGE$1]=tt.maxAge||0,this[DISPOSE$1]=tt.dispose,this[NO_DISPOSE_ON_SET$1]=tt.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET$1]=tt.updateAgeOnGet||!1,this.reset()}set max(tt){if(typeof tt!="number"||tt<0)throw new TypeError("max must be a non-negative number");this[MAX$1]=tt||1/0,trim$2(this)}get max(){return this[MAX$1]}set allowStale(tt){this[ALLOW_STALE$1]=!!tt}get allowStale(){return this[ALLOW_STALE$1]}set maxAge(tt){if(typeof tt!="number")throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE$1]=tt,trim$2(this)}get maxAge(){return this[MAX_AGE$1]}set lengthCalculator(tt){typeof tt!="function"&&(tt=naiveLength$1),tt!==this[LENGTH_CALCULATOR$1]&&(this[LENGTH_CALCULATOR$1]=tt,this[LENGTH$1]=0,this[LRU_LIST$1].forEach(nt=>{nt.length=this[LENGTH_CALCULATOR$1](nt.value,nt.key),this[LENGTH$1]+=nt.length})),trim$2(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR$1]}get length(){return this[LENGTH$1]}get itemCount(){return this[LRU_LIST$1].length}rforEach(tt,nt){nt=nt||this;for(let rt=this[LRU_LIST$1].tail;rt!==null;){const ot=rt.prev;forEachStep$1(this,tt,rt,nt),rt=ot}}forEach(tt,nt){nt=nt||this;for(let rt=this[LRU_LIST$1].head;rt!==null;){const ot=rt.next;forEachStep$1(this,tt,rt,nt),rt=ot}}keys(){return this[LRU_LIST$1].toArray().map(tt=>tt.key)}values(){return this[LRU_LIST$1].toArray().map(tt=>tt.value)}reset(){this[DISPOSE$1]&&this[LRU_LIST$1]&&this[LRU_LIST$1].length&&this[LRU_LIST$1].forEach(tt=>this[DISPOSE$1](tt.key,tt.value)),this[CACHE$2]=new Map,this[LRU_LIST$1]=new Yallist$2,this[LENGTH$1]=0}dump(){return this[LRU_LIST$1].map(tt=>isStale$1(this,tt)?!1:{k:tt.key,v:tt.value,e:tt.now+(tt.maxAge||0)}).toArray().filter(tt=>tt)}dumpLru(){return this[LRU_LIST$1]}set(tt,nt,rt){if(rt=rt||this[MAX_AGE$1],rt&&typeof rt!="number")throw new TypeError("maxAge must be a number");const ot=rt?Date.now():0,st=this[LENGTH_CALCULATOR$1](nt,tt);if(this[CACHE$2].has(tt)){if(st>this[MAX$1])return del$1(this,this[CACHE$2].get(tt)),!1;const ft=this[CACHE$2].get(tt).value;return this[DISPOSE$1]&&(this[NO_DISPOSE_ON_SET$1]||this[DISPOSE$1](tt,ft.value)),ft.now=ot,ft.maxAge=rt,ft.value=nt,this[LENGTH$1]+=st-ft.length,ft.length=st,this.get(tt),trim$2(this),!0}const ut=new Entry$2(tt,nt,st,ot,rt);return ut.length>this[MAX$1]?(this[DISPOSE$1]&&this[DISPOSE$1](tt,nt),!1):(this[LENGTH$1]+=ut.length,this[LRU_LIST$1].unshift(ut),this[CACHE$2].set(tt,this[LRU_LIST$1].head),trim$2(this),!0)}has(tt){if(!this[CACHE$2].has(tt))return!1;const nt=this[CACHE$2].get(tt).value;return!isStale$1(this,nt)}get(tt){return get$9(this,tt,!0)}peek(tt){return get$9(this,tt,!1)}pop(){const tt=this[LRU_LIST$1].tail;return tt?(del$1(this,tt),tt.value):null}del(tt){del$1(this,this[CACHE$2].get(tt))}load(tt){this.reset();const nt=Date.now();for(let rt=tt.length-1;rt>=0;rt--){const ot=tt[rt],st=ot.e||0;if(st===0)this.set(ot.k,ot.v);else{const ut=st-nt;ut>0&&this.set(ot.k,ot.v,ut)}}}prune(){this[CACHE$2].forEach((tt,nt)=>get$9(this,nt,!1))}}const get$9=(et,tt,nt)=>{const rt=et[CACHE$2].get(tt);if(rt){const ot=rt.value;if(isStale$1(et,ot)){if(del$1(et,rt),!et[ALLOW_STALE$1])return}else nt&&(et[UPDATE_AGE_ON_GET$1]&&(rt.value.now=Date.now()),et[LRU_LIST$1].unshiftNode(rt));return ot.value}},isStale$1=(et,tt)=>{if(!tt||!tt.maxAge&&!et[MAX_AGE$1])return!1;const nt=Date.now()-tt.now;return tt.maxAge?nt>tt.maxAge:et[MAX_AGE$1]&&nt>et[MAX_AGE$1]},trim$2=et=>{if(et[LENGTH$1]>et[MAX$1])for(let tt=et[LRU_LIST$1].tail;et[LENGTH$1]>et[MAX$1]&&tt!==null;){const nt=tt.prev;del$1(et,tt),tt=nt}},del$1=(et,tt)=>{if(tt){const nt=tt.value;et[DISPOSE$1]&&et[DISPOSE$1](nt.key,nt.value),et[LENGTH$1]-=nt.length,et[CACHE$2].delete(nt.key),et[LRU_LIST$1].removeNode(tt)}};class Entry$2{constructor(tt,nt,rt,ot,st){this.key=tt,this.value=nt,this.length=rt,this.now=ot,this.maxAge=st||0}}const forEachStep$1=(et,tt,nt,rt)=>{let ot=nt.value;isStale$1(et,ot)&&(del$1(et,nt),et[ALLOW_STALE$1]||(ot=void 0)),ot&&tt.call(rt,ot.value,ot.key,et)};var lruCache$2=LRUCache$1;class DependencyAwareCache{constructor(){this.dependencyMap=new Map}set(tt,nt,rt,ot,st){const ut=this.outerKeyToInnerKey(tt);return st!=null&&(this.dependencyMap.has(ut)?st.forEach(ct=>this.dependencyMap.get(ut).add(this.outerKeyToInnerKey(ct))):this.dependencyMap.set(ut,new Set(st.map(this.outerKeyToInnerKey.bind(this))))),ot?.forEach(ct=>{const ft=this.outerKeyToInnerKey(ct);this.dependencyMap.has(ft)?this.dependencyMap.get(ft).add(ut):this.dependencyMap.set(ft,new Set([ut]))}),this.setKey(ut,nt,rt)}cascadeDelete(tt){this.delKey(tt),this.dependencyMap.has(tt)&&this.dependencyMap.get(tt).forEach(nt=>{this.cascadeDelete(nt),this.dependencyMap.delete(nt)})}invalidate(tt){return Promise.resolve(this.cascadeDelete(this.outerKeyToInnerKey(tt)))}getMulti(tt){return Promise.all(tt.map(nt=>this.get(nt)))}async setMulti(tt){return(await Promise.all(tt.map(rt=>this.set(rt.key,rt.value,rt.ttlSeconds,rt.dependsOn,rt.dependencies)))).every(rt=>!!rt)}hasMulti(tt){return Promise.all(tt.map(nt=>this.has(nt)))}get(tt){return this.getKey(this.outerKeyToInnerKey(tt))}has(tt){return this.hasKey(this.outerKeyToInnerKey(tt))}}class InMemoryCache extends DependencyAwareCache{constructor(tt){super(),this.optsIn=tt,this.opts=_$2.defaults({},tt,{maxElements:2e4,keyFn:nt=>nt}),this.lru=new lruCache$2({max:this.opts.maxElements,length:(nt,rt)=>1,maxAge:1e3*60*60*24,dispose:this.onDispose.bind(this)})}onDispose(tt,nt){this.dependencyMap.has(nt)&&this.dependencyMap.delete(nt)}outerKeyToInnerKey(tt){return this.opts.keyFn(tt)}getKey(tt){return this.lru.get(tt)}setKey(tt,nt,rt){return this.lru.set(tt,nt,rt?rt*1e3:void 0)}delKey(tt){return Promise.resolve(this.lru.del(tt))}hasKey(tt){return this.lru.has(tt)}reset(){return Promise.resolve(this.lru.reset())}}function opInputsAreNonVoid(et){return!Object.values(et).some(tt=>tt.nodeType==="void")}function nodeIsExecutable(et){const tt=filterNodes(et,nt=>nt.nodeType==="void").length;return tt===0||tt===1&&et.nodeType==="void"}function isEditingNode(et){return"nodeType"in et}function isEditingOp(et){return!isEditingNode(et)}async function mapNodesAsync(et,tt,nt){if(et.nodeType==="output"){if(et.fromOp.name==="internal-lambdaClosureArgBridge")return Promise.resolve(et);const rt=lodash$2.exports.mapValues(et.fromOp.inputs,st=>mapNodesAsync(st,tt,nt));let ot=!1;for(const st of Object.keys(et.fromOp.inputs))await rt[st]!==et.fromOp.inputs[st]&&(ot=!0);if(ot){const st=lodash$2.exports.fromPairs(lodash$2.exports.zip(Object.keys(rt),await Promise.all(Object.values(rt))));return tt({...et,fromOp:{...et.fromOp,inputs:st}})}else return tt(et)}else if(isFunctionLiteral(et)&&!nt){const rt=await mapNodesAsync(et.val,tt,nt);return nodesEqual(et.val,rt)?tt(et):tt({...et,val:rt})}else return tt(et)}function expandAll(et,tt,nt){return mapNodesAsync(tt,async rt=>{if(rt.nodeType==="output"){const ot=et.opStore.getOpDef(rt.fromOp.name);if(opDefIsGeneratedWeave(ot)){const st=await expandGeneratedWeaveOp(et,ot,rt,nt);return await expandAll(et,st,nt)}else if(opDefIsWeave(ot)){const st=expandWeaveOp(ot,rt);return await expandAll(et,st,nt)}}return Promise.resolve(rt)})}function findChainedAncestor(et,tt,nt){if(tt(et))return et;if(!!nt(et)&&!(et.nodeType!=="output"||Object.keys(et.fromOp.inputs).length===0))return findChainedAncestor(Object.values(et.fromOp.inputs)[0],tt,nt)}function getFreeVars(et){return et.nodeType==="void"?[]:filterNodes(et,tt=>tt.nodeType==="var",!0)}function replaceNode(et,tt,nt){const rt=mapNodes(et,ot=>ot===tt?nt:ot);if(rt===et)throw new Error("didnt find node to replace");return rt}function maybeReplaceNode(et,tt,nt){return mapNodes(et,rt=>rt===tt?nt:rt)}function expandWeaveOp(et,tt){return callFunction(et.body,tt.fromOp.inputs)}function expandGeneratedWeaveOp(et,tt,nt,rt){const ot=pushFrame(rt,nt.fromOp.inputs);return tt.expansion(nt.fromOp.inputs,st=>refineEditingNode(et,st,ot),et)}function getFunctionFrame(et,tt,nt,rt){let ot={};if(tt=dereferenceAllVars(tt,nt).node,et==="groupby"||et==="filter"||et==="sort"||et==="join"||et==="map")ot={row:callOpValid("index",{arr:callOpValid("dropna",{arr:tt},rt),index:{nodeType:"const",type:"number",val:0}},rt)};else if(et==="joinAll")ot={row:callOpValid("index",{arr:callOpValid("index",{arr:callOpValid("dropna",{arr:tt},rt),index:{nodeType:"const",type:"number",val:0}},rt),index:{nodeType:"const",type:"number",val:0}},rt)};else if(et.startsWith("objectConstructor"))ot={};else throw new Error("Invalid: function editor for unknown op: "+et);return ot}async function refineEditingNode(et,tt,nt,rt){if(rt?.has(tt))return Promise.resolve(rt.get(tt));const ot=st=>(rt?.set(tt,st),rt?.set(st,st),st);if(tt.nodeType==="void")return tt;if(tt.nodeType==="var"){const st=resolveVar(nt,tt.varName);if(st!=null){const ut=st.closure.value;let ct=ut.type;ut.nodeType==="const"&&!isConstType(ut.type)&&(ct={type:"const",valType:ut.type,val:ut.val});const ft={...tt,type:ct};return nodesEqual(tt,ft)?ot(tt):ot(ft)}return ot(tt)}else{if(tt.nodeType==="const")return ot(tt);if(tt.nodeType==="output"){const st=tt.fromOp;let ut;try{ut=et.opStore.getOpDef(st.name)}catch{return tt}const ct=Object.keys(st.inputs),ft=Object.values(st.inputs),pt=await Promise.all(ft.map(async(vt,Tt)=>{if(isFunctionLiteral(vt)){const Et=getFunctionFrame(st.name,ft[0],nt,et.opStore),xt=pushFrame(nt,Et),At=await refineEditingNode(et,vt.val,xt,rt),Ct=Object.values(ut.inputTypes)[Tt];let $t=vt.type.inputTypes;if(isFunctionType(Ct)&&Object.values(vt.type.inputTypes).length===0){$t=Ct.inputTypes;for(const Rt of Object.keys($t))Et[Rt]&&($t[Rt]=Et[Rt].type)}const Ot={...vt,type:{...vt.type,inputTypes:$t,outputType:At.type},val:At};return nodesEqual(vt,Ot)?ot(vt):ot(Ot)}return ot(await refineEditingNode(et,vt,nt,rt))})),ht={};if(ct.forEach((vt,Tt)=>{try{const Et=parseInt(vt,10);isNaN(Et)||(vt=Et)}catch{}ht[vt]=pt[Tt]}),!opInputsAreValid(ht,ut)||!opInputsAreNonVoid(ht)){console.warn("Refine got invalid input for",tt.fromOp.name,"opDef input types:",ut.inputTypes,"actual types:",ht);const vt={...tt,nodeType:"output",fromOp:{...st,inputs:ht},type:"invalid"};return nodesEqual(tt,vt)?ot(tt):ot(vt)}const yt={...tt,nodeType:"output",type:tt.type,fromOp:{...st,inputs:ht}};if(opDefIsWeave(ut)){const vt=await refineEditingNode(et,expandWeaveOp(ut,yt),nt,rt);return ot({...yt,type:vt.type})}else if(opDefIsGeneratedWeave(ut)){const vt=await refineEditingNode(et,await expandAll(et,yt,nt),nt,rt);return ot({...yt,type:vt.type})}else if(ut.refineNode!=null){const Tt=dereferenceAllVars(yt,nt).node;if(Tt.nodeType!=="output")throw new Error("refineEditingNode: expected dereffedNode.nodeType to be output, found "+Tt.nodeType);const Et=Tt.fromOp,xt=Et.inputs;if(!opInputsAreNonVoid(xt))throw new Error("refineEditingNode: expected dereffed node inputs to be non-void");const At={...Et,inputs:xt},Ct={...tt,nodeType:"output",fromOp:At,type:"none"},$t=await ut.refineNode(yt,Ct,et,nt);return nodesEqual(tt,$t)?ot(tt):ot($t)}else{const vt={...yt,type:determineOutputType(ut,ht)};return nodesEqual(tt,vt)?ot(tt):ot(vt)}}else throw new Error("refineEditingNode: unexpected node type")}}async function refineNode(et,tt,nt){return tt.nodeType!=="output"?tt:await refineEditingNode(et,tt,nt)}function isProducibleType(et){return isFunction$b(et)?isProducibleType(et.outputType):["string","number","boolean","none",maybe("string"),maybe("number"),maybe("boolean")].find(nt=>isAssignableTo(nt,et))!=null}function validReplacementOps(et,tt){const nt=(ut,ct)=>!ct||!opInputsAreNonVoid(ct)?"any":determineOutputType(ut,ct),rt=Object.values(et.inputs),ot=rt.map(ut=>ut.type),st=nt(tt.getOpDef(et.name),et.inputs);return Object.values(tt.allOps()).filter(ut=>{if(ut.hidden)return!1;const ct=Object.values(ut.inputTypes);if(ct.length!==ot.length)return!1;for(const[mt,yt]of ot.entries()){const vt=ct[mt];if(!isAssignableTo(yt,vt))return!1}const ft=Object.keys(ut.inputTypes),pt={};ft.forEach((mt,yt)=>pt[mt]=rt[yt]);const ht=nt(ut,pt);return isAssignableTo(st,ht)})}function isValidRootOp(et){return et.name==="range"||et.name==="root-project"}const setIntersection=(et,tt)=>new Set([...et].filter(nt=>tt.has(nt)));function availableOps(et,tt){return Object.values(tt.allOps()).filter(rt=>!rt.hidden&&setIntersection(et,rt.supportedEngines).size>0)}const defaultEngineSet=new Set(["ts","py"]);function rootOps(et){return Object.values(availableOps(defaultEngineSet,et)).filter(isValidRootOp)}const supportedEngineForNode=(et,tt)=>{let nt=defaultEngineSet;return et.nodeType==="output"&&mapNodes(et,rt=>(rt.nodeType==="output"&&(nt=setIntersection(nt,tt.getOpDef(rt.fromOp.name).supportedEngines)),rt)),nt};function availableOpsForChain(et,tt){return Object.values(availableOps(supportedEngineForNode(et,tt),tt)).filter(nt=>{if(isValidRootOp(nt))return!1;const rt=Object.values(nt.inputTypes),ot=rt[0],st=rt.slice(1);return ot!=null&&isAssignableTo(et.type,ot)&&st.every(isProducibleType)})}function pickSuggestions(et){et=taggableStrip(et),isNullable(et)&&(et=nonNullable(et)),isTaggedValue(et)&&(et=et.value),isListLike(et)&&(et=listObjectType(et)),isTaggedValue(et)&&(et=et.value);let tt=[];if(isTypedDictLike(et)){const nt=allObjPaths(et).map(ot=>ot.path.map(st=>st.replace(new RegExp("\\.","g"),"\\."))),rt=lodash$2.exports.groupBy(nt,ot=>`${ot.length}-${ot[ot.length-1]}`);tt=Object.values(rt).flatMap(ot=>{if(ot.length===1)return ot;const st=ot[0];return[lodash$2.exports.range(st.length-1).map(ct=>"*").concat([st[st.length-1]])].concat(ot)}).map(ot=>ot.join("."))}return tt}function callOpValid(et,tt,nt){const rt=nt.getOpDef(et);return{nodeType:"output",type:determineOutputType(rt,tt),fromOp:{name:et,inputs:tt}}}function someNodes(et,tt,nt){return tt(et)?!0:et.nodeType==="const"&&typeof et.type=="object"&&et.type?.type==="function"&&!nt?someNodes(et.val,tt,nt):et.nodeType==="output"?Object.values(et.fromOp.inputs).flatMap(ot=>someNodes(ot,tt,nt)).some(ot=>ot):!1}function expressionVariables(et){return filterNodes(et,isVarNode,!0)}function couldBeReplacedByType(et,tt,nt,rt){const ot=findConsumingOp(et,tt);return ot!=null&&isAssignableTo(nt,rt.getOpDef(ot.outputNode.fromOp.name).inputTypes[ot.argName])}const getPlaceholderArg=(et,tt)=>{const nt=et.inputTypes[tt];return isAssignableTo("string",nt)?constString(""):null};function shouldSkipOpFirstInput(et){return["chain","brackets","binary"].includes(et.renderInfo.type)}const simpleNodeString$1=(et,tt)=>et.nodeType==="var"?et.varName:et.nodeType==="output"?simpleOpString$1(et.fromOp,tt):et.nodeType==="const"?et.type==="number"||et.type==="int"||et.type==="float"?et.val.toString():et.type==="string"?et.val:isFunctionType(et.type)?simpleNodeString$1(et.val,tt):"?":"-";function simpleArgsString$1(et,tt){return"("+Object.values(et).map(nt=>simpleNodeString$1(nt,tt)).join(", ")+")"}function simpleOpString$1(et,tt){const nt=Object.keys(et.inputs),rt=Object.values(et.inputs);if(isUnaryOp(et,tt))return`${opSymbol(et,tt)}${simpleNodeString$1(rt[0],tt)}`;if(isBinaryOp(et,tt))return`${simpleNodeString$1(rt[0],tt)} ${opSymbol(et,tt)} ${simpleNodeString$1(rt[1],tt)}`;if(isGetAttr(et)){const ot=rt[0],st=rt[1];return ot.nodeType==="var"&&st.nodeType==="const"?st.val:`${simpleNodeString$1(ot,tt)}.${simpleNodeString$1(st,tt)}`}if(isBracketsOp(et,tt)){const ot=rt[0],st=rt[1];return ot.nodeType==="var"&&st.nodeType==="const"?st.val:`${simpleNodeString$1(ot,tt)}[${simpleNodeString$1(st,tt)}]`}return isDotChainedOp(et,tt)?`${rt[0].nodeType==="var"?"":simpleNodeString$1(rt[0],tt)}${opDisplayName(et,tt)}${nt.length>1?simpleArgsString$1(lodash$2.exports.pickBy(et.inputs,(ut,ct)=>ct!==nt[0]),tt):""}`:`${opDisplayName(et,tt)} ${simpleArgsString$1(et.inputs,tt)} `}function linearize(et){function tt(nt){const rt=Object.values(nt.fromOp.inputs)[0];return rt==null?[nt]:rt.nodeType!=="output"?[nt]:[...tt(rt),nt]}if(et.nodeType==="output")return tt(et)}function unfetch_module(et,tt){return tt=tt||{},new Promise(function(nt,rt){var ot=new XMLHttpRequest,st=[],ut=[],ct={},ft=function(){return{ok:(ot.status/100|0)==2,statusText:ot.statusText,status:ot.status,url:ot.responseURL,text:function(){return Promise.resolve(ot.responseText)},json:function(){return Promise.resolve(ot.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([ot.response]))},clone:ft,headers:{keys:function(){return st},entries:function(){return ut},get:function(ht){return ct[ht.toLowerCase()]},has:function(ht){return ht.toLowerCase()in ct}}}};for(var pt in ot.open(tt.method||"get",et,!0),ot.onload=function(){ot.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(ht,mt,yt){st.push(mt=mt.toLowerCase()),ut.push([mt,yt]),ct[mt]=ct[mt]?ct[mt]+","+yt:yt}),nt(ft())},ot.onerror=rt,ot.withCredentials=tt.credentials=="include",tt.headers)ot.setRequestHeader(pt,tt.headers[pt]);ot.send(tt.body||null)})}const unfetch_module$1=Object.freeze(Object.defineProperty({__proto__:null,default:unfetch_module},Symbol.toStringTag,{value:"Module"})),require$$0$3=getAugmentedNamespace(unfetch_module$1);var browser$4=self.fetch||(self.fetch=require$$0$3.default||require$$0$3),browser$3={},performance$1;Object.defineProperty(browser$3,"__esModule",{value:!0});browser$3.PerformanceObserver=performance$1=browser$3.performance=void 0;performance$1=browser$3.performance=window.performance,browser$3.PerformanceObserver=window.PerformanceObserver;function isWeaveDebugEnabled(){return typeof globalThis<"u"&&globalThis.WEAVE_DEBUG}function batchIntervalOverride(){return typeof globalThis<"u"?globalThis.WEAVE_BATCH_INTERVAL:void 0}const BATCH_INTERVAL_MS=()=>batchIntervalOverride()??50,defaultOpts={weaveUrl:"https://localhost:9004/execute",tokenFunc:()=>Promise.resolve(""),useAdminPrivileges:!1,isShadow:!1,contiguousBatchesOnly:!1,maxConcurrentRequests:1,maxBatchSize:1/0,maxRetries:5,backoffBase:500,backoffMax:2e4,backoffExpScalar:.8,fetch:browser$4.bind(globalThis)};class RemoteHttpServer{constructor(tt,nt){this.opStore=nt,this.pendingNodes=new Map,this.pendingRequests=new Set,this.nextFlushTime=0,this.backoffCount=0,this.opts=_$2.defaults({},tt,defaultOpts),this.flushInterval=setInterval(()=>this.flush().catch(rt=>{console.error("Error flushing RemoteHttpServer",rt),clearInterval(this.flushInterval)}),BATCH_INTERVAL_MS()),this.trace=isWeaveDebugEnabled()?(...rt)=>console.debug(`[Weave:RemoteHttpServer] [${(performance$1.now()/1e3).toFixed(3)}s]`,...rt):()=>{}}close(){clearInterval(this.flushInterval)}async query(tt){return GlobalCGEventTracker.remoteHttpServerQueryBatchRequests++,this.trace(`Enqueue ${tt.length} nodes`),await Promise.all(tt.map(nt=>new Promise((rt,ot)=>{this.pendingNodes.set(nt,{node:nt,resolve:rt,reject:ot,state:"waiting",retries:0})})))}async queryEach(tt){return GlobalCGEventTracker.remoteHttpServerQueryBatchRequests++,this.trace(`Enqueue ${tt.length} nodes`),await Promise.allSettled(tt.map(nt=>new Promise((rt,ot)=>{this.pendingNodes.set(nt,{node:nt,resolve:rt,reject:ot,state:"waiting",retries:0})})))}debugMeta(){return{id:"RemoteHttpServer",opStore:this.opStore.debugMeta()}}resolveNode(tt,nt){const rt=this.pendingNodes.get(tt);if(rt==null)throw new Error("resolveNode called on node that was not awaiting a result");this.pendingNodes.delete(tt),rt.resolve(nt)}rejectNode(tt,nt){const rt=this.pendingNodes.get(tt);if(rt==null)throw new Error("resolveNode called on node that was not awaiting a result");this.pendingNodes.delete(tt),rt.reject(nt)}getWaitingNodes(){return Array.from(this.pendingNodes.values()).filter(tt=>tt.state==="waiting").slice(0,this.opts.maxBatchSize)}backoff(tt=1){const nt=Math.min(this.opts.backoffMax,this.opts.backoffBase*Math.exp((this.backoffCount+=tt)*this.opts.backoffExpScalar));this.trace(`Backing off for ${Math.round(nt)}ms`),this.nextFlushTime=Date.now()+nt}resetBackoff(){this.backoffCount>0&&(this.trace("Got OK response, reset backoff"),this.backoffCount=0)}async flush(){if(Date.now()<this.nextFlushTime)return;const tt=this.opts.maxConcurrentRequests-this.pendingRequests.size;if(tt<=0){this.trace(`Too many requests in-flight (${this.pendingRequests.size})`);return}const nt=this.getWaitingNodes();if(nt.length===0)return;this.trace(`Flushing ${nt.length} nodes`);const rt=nt.map(ut=>ut.node),[ot,st]=this.opts.contiguousBatchesOnly?serializeMulti(rt):[[serialize(rt)],[_$2.range(rt.length)]];for(let ut=0;ut<Math.min(tt,ot.length);ut++){const ct=ot[ut],ft=st[ut],pt=Tt=>ft.forEach(Et=>nt[Et].state=Tt),ht=()=>ft.forEach(Tt=>{const Et=nt[Tt];Et.retries>=this.opts.maxRetries?(this.trace(`Cancelling node after ${Et.retries} retries`),this.resolveNode(Et.node,null)):(Et.state="waiting",Et.retries++)}),mt=Tt=>ft.forEach(Et=>this.rejectNode(nt[Et].node,Tt)),yt=Tt=>{ft.forEach((Et,xt)=>{const At=nt[Et].node;if(Tt.node_to_error!=null&&Tt.errors!=null){const Ct=Tt.node_to_error[xt];if(Ct!=null){this.rejectNode(At,Tt.errors[Ct]);return}}this.resolveNode(At,Tt.data[xt])})};pt("active");const vt=new Promise(async Tt=>{const Et={graphs:ct},xt=JSON.stringify(Et),At={};this.opts.useAdminPrivileges&&(At["use-admin-privileges"]="true"),this.opts.anonApiKey!=null&&this.opts.anonApiKey!==""&&(At["x-wandb-anonymous-auth-id"]=btoa(this.opts.anonApiKey)),this.opts.isShadow?(At["weave-shadow"]="true",At["x-weave-include-execution-time"]="true"):At["weave-shadow"]="false";let Ct={data:new Array(rt.length).fill(null)},$t=null;try{$t=await this.opts.fetch(this.opts.weaveUrl,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json",...At},body:xt})}catch(Ot){this.trace(`fetch failed: ${Ot.message}`,Ot),this.backoff(),pt("waiting")}if(!this.opts.isShadow&&$t!=null)if($t.ok){try{const Ot=await $t.json();this.resetBackoff(),Ot.data==null?this.trace(`Weave response was missing data. Fetch Details:
`,JSON.stringify({payloadJSON:Et,nodes:rt,resp:Ot},null,2)):Ct=Ot}catch(Ot){throw this.trace(`Weave response deserialization failed. Fetch Details:
`,JSON.stringify({payloadJSON:Et,nodes:rt,err:Ot},null,2)),new Error("Weave response deserialization failed"+Ot)}yt(Ct)}else[502,503,504].includes($t.status)?(this.backoff(),ht()):[429].includes($t.status)?(this.backoff(10),ht()):mt("Weave request failed: "+$t.status);this.pendingRequests.delete(vt),Tt(!0)});this.pendingRequests.add(vt)}}}function ID$1(et=9){return Math.random().toString(36).substr(2,et)}const POLL_INTERVAL=15e3;class BasicClient{constructor(tt){this.server=tt,this.requestInFlight=!1,this.makeRequestWhenDone=!1,this.observables=new Map,this.loadingListeners=new Map,this.loading=new zenObservable(nt=>{const rt=ID$1();return this.loadingListeners.set(rt,nt),()=>this.loadingListeners.delete(rt)}),this.shouldPoll=!1,this.pollingListeners=[],this.hasher=new MemoizedHasher,tt instanceof RemoteHttpServer&&setTimeout(this.pollIteration.bind(this),POLL_INTERVAL),this.opStore=tt.opStore}setPolling(tt){this.shouldPoll=tt,this.pollingListeners.forEach(nt=>nt(tt))}isPolling(){return this.shouldPoll}addOnPollingChangeListener(tt){this.pollingListeners.includes(tt)||this.pollingListeners.push(tt)}removeOnPollingChangeListener(tt){this.pollingListeners=this.pollingListeners.filter(nt=>nt!==tt)}subscribe(tt){GlobalCGEventTracker.basicClientSubscriptions++;const nt=this.hasher.typedNodeId(tt);if(this.observables.has(nt)){const ot=this.observables.get(nt);if(ot==null)throw new Error("This should never happen");return ot.observable}const rt=new zenObservable(ot=>{const st=this.observables.get(nt);if(st!=null)return st.observers.add(ot),st.hasResult?ot.next(st.lastResult):this.setIsLoading(!0),()=>{st.observers.delete(ot),st.observers.size===0&&this.observables.delete(nt)}});return this.observables.set(nt,{id:nt,observable:rt,observers:new Set,node:tt,hasResult:!1,lastResult:void 0}),this.scheduleRequest(),rt}query(tt){const nt=this.subscribe(tt);return new Promise((rt,ot)=>{const st=nt.subscribe(ut=>{rt(ut),st.unsubscribe()},ut=>{ot(ut),st.unsubscribe()})})}action(tt){return new Promise((nt,rt)=>{this.server.query([tt]).then(ot=>nt(ot[0])).catch(rt)})}loadingObservable(){return this.loading}refreshAll(){if(this.resolveRefreshRequest==null){let tt=()=>{};const nt=new Promise((rt,ot)=>{tt=rt});this.resolveRefreshRequest={promise:nt,resolve:tt},this.scheduleRequest()}return this.resolveRefreshRequest.promise}debugMeta(){return{id:"BasicClient",opStore:this.opStore.debugMeta(),server:this.server.debugMeta()}}scheduleRequest(){this.nextRequestTimer!=null&&clearTimeout(this.nextRequestTimer),this.nextRequestTimer=setTimeout(()=>this.requestBatch(),50)}pollIteration(){this.shouldPoll&&this.refreshAll(),setTimeout(this.pollIteration.bind(this),POLL_INTERVAL)}setIsLoading(tt){this.loadingListeners.forEach(nt=>nt.next(tt))}async requestBatch(){this.nextRequestTimer=void 0,this.requestInFlight?this.makeRequestWhenDone=!0:(this.requestInFlight=!0,await this.doRequestBatch(),this.requestInFlight=!1,this.makeRequestWhenDone&&(this.makeRequestWhenDone=!1,this.requestBatch()))}async doRequestBatch(){const tt=Array.from(this.observables.values()).filter(nt=>!nt.hasResult||this.resolveRefreshRequest!=null);if(tt.length>0){const nt=(st,ut)=>{st.hasResult=!0;for(const ct of st.observers)ct.error(ut)},rt=(st,ut)=>{st.hasResult=!0,st.lastResult=ut;for(const ct of st.observers)ct.next(ut)},ot=st=>{for(const ut of tt)nt(ut,st)};if(this.server instanceof RemoteHttpServer){let st=[];try{st=await this.server.queryEach(tt.map(ut=>ut.node))}catch(ut){ot(ut)}for(const[ut,ct]of _$2.zip(st,tt))ut==null||ct==null||(ut.status==="rejected"?nt(ct,ut.reason):rt(ct,ut.value))}else{let st=[];try{st=await this.executeForwardListeners(tt.map(ut=>ut.node),this.resolveRefreshRequest!=null)}catch(ut){ot(ut)}for(let ut=0;ut<tt.length;ut++)rt(tt[ut],st[ut])}}if(Array.from(this.observables.values()).every(nt=>nt.hasResult)&&this.setIsLoading(!1),this.resolveRefreshRequest!=null){const nt=this.resolveRefreshRequest.resolve;this.resolveRefreshRequest=void 0,nt()}}async executeForwardListeners(tt,nt){return this.server.query(tt,nt)}}class CachedClient{constructor(tt){this.client=tt,this.hasher=new MemoizedHasher,this.cache=new InMemoryCache({maxElements:1e3,keyFn:this.hasher.typedNodeId}),this.opStore=tt.opStore}subscribe(tt){return this.client.subscribe(tt)}setPolling(tt){this.client.setPolling(tt)}isPolling(){return this.client.isPolling()}addOnPollingChangeListener(tt){return this.client.addOnPollingChangeListener(tt)}removeOnPollingChangeListener(tt){return this.client.removeOnPollingChangeListener(tt)}async query(tt){if(this.cache.has(tt))return this.cache.get(tt);const nt=new Promise((rt,ot)=>{const ut=this.subscribe(tt).subscribe(ct=>{rt(ct),ut.unsubscribe()},ct=>{ot(ct),ut.unsubscribe()})});return this.cache.set(tt,nt,30),nt}async action(tt){return this.client.action(tt)}loadingObservable(){return this.client.loadingObservable()}refreshAll(){return this.client.refreshAll()}debugMeta(){return{id:"CachedClient",opStore:this.opStore.debugMeta(),client:this.client.debugMeta()}}}class EngineClient{constructor(tt){this.engine=tt,this.opStore=tt.opStore}subscribe(tt){throw new Error("not implemented")}async query(tt){return(await this.engine.executeNodes([tt],!0))[0]}loadingObservable(){throw new Error("not implemented")}refreshAll(){throw new Error("not implemented")}action(tt){throw new Error("not implemented")}setPolling(tt){}setIsPolling(tt){}isPolling(){return!1}addOnPollingChangeListener(tt){}removeOnPollingChangeListener(tt){}debugMeta(){return{id:"EngineClient",opStore:this.opStore.debugMeta()}}}class DefaultLanguageBinding{parse(tt,nt){throw new Error("Method not implemented.")}printGraph(tt,nt){return nodeToString(tt,StaticOpStore.getInstance(),nt)}printType(tt,nt){return typeToString(tt,nt)}}const defaultLanguageBinding=new DefaultLanguageBinding;//! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(et){hookCallback=et}function isArray$o(et){return et instanceof Array||Object.prototype.toString.call(et)==="[object Array]"}function isObject$i(et){return et!=null&&Object.prototype.toString.call(et)==="[object Object]"}function hasOwnProp(et,tt){return Object.prototype.hasOwnProperty.call(et,tt)}function isObjectEmpty(et){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(et).length===0;var tt;for(tt in et)if(hasOwnProp(et,tt))return!1;return!0}function isUndefined$1(et){return et===void 0}function isNumber$3(et){return typeof et=="number"||Object.prototype.toString.call(et)==="[object Number]"}function isDate$3(et){return et instanceof Date||Object.prototype.toString.call(et)==="[object Date]"}function map$5(et,tt){var nt=[],rt,ot=et.length;for(rt=0;rt<ot;++rt)nt.push(tt(et[rt],rt));return nt}function extend$5(et,tt){for(var nt in tt)hasOwnProp(tt,nt)&&(et[nt]=tt[nt]);return hasOwnProp(tt,"toString")&&(et.toString=tt.toString),hasOwnProp(tt,"valueOf")&&(et.valueOf=tt.valueOf),et}function createUTC(et,tt,nt,rt){return createLocalOrUTC(et,tt,nt,rt,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags(et){return et._pf==null&&(et._pf=defaultParsingFlags()),et._pf}var some$2;Array.prototype.some?some$2=Array.prototype.some:some$2=function(et){var tt=Object(this),nt=tt.length>>>0,rt;for(rt=0;rt<nt;rt++)if(rt in tt&&et.call(this,tt[rt],rt,tt))return!0;return!1};function isValid$1(et){if(et._isValid==null){var tt=getParsingFlags(et),nt=some$2.call(tt.parsedDateParts,function(ot){return ot!=null}),rt=!isNaN(et._d.getTime())&&tt.overflow<0&&!tt.empty&&!tt.invalidEra&&!tt.invalidMonth&&!tt.invalidWeekday&&!tt.weekdayMismatch&&!tt.nullInput&&!tt.invalidFormat&&!tt.userInvalidated&&(!tt.meridiem||tt.meridiem&&nt);if(et._strict&&(rt=rt&&tt.charsLeftOver===0&&tt.unusedTokens.length===0&&tt.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(et))et._isValid=rt;else return rt}return et._isValid}function createInvalid(et){var tt=createUTC(NaN);return et!=null?extend$5(getParsingFlags(tt),et):getParsingFlags(tt).userInvalidated=!0,tt}var momentProperties=hooks.momentProperties=[],updateInProgress=!1;function copyConfig(et,tt){var nt,rt,ot,st=momentProperties.length;if(isUndefined$1(tt._isAMomentObject)||(et._isAMomentObject=tt._isAMomentObject),isUndefined$1(tt._i)||(et._i=tt._i),isUndefined$1(tt._f)||(et._f=tt._f),isUndefined$1(tt._l)||(et._l=tt._l),isUndefined$1(tt._strict)||(et._strict=tt._strict),isUndefined$1(tt._tzm)||(et._tzm=tt._tzm),isUndefined$1(tt._isUTC)||(et._isUTC=tt._isUTC),isUndefined$1(tt._offset)||(et._offset=tt._offset),isUndefined$1(tt._pf)||(et._pf=getParsingFlags(tt)),isUndefined$1(tt._locale)||(et._locale=tt._locale),st>0)for(nt=0;nt<st;nt++)rt=momentProperties[nt],ot=tt[rt],isUndefined$1(ot)||(et[rt]=ot);return et}function Moment(et){copyConfig(this,et),this._d=new Date(et._d!=null?et._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),updateInProgress===!1&&(updateInProgress=!0,hooks.updateOffset(this),updateInProgress=!1)}function isMoment(et){return et instanceof Moment||et!=null&&et._isAMomentObject!=null}function warn$2(et){hooks.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+et)}function deprecate(et,tt){var nt=!0;return extend$5(function(){if(hooks.deprecationHandler!=null&&hooks.deprecationHandler(null,et),nt){var rt=[],ot,st,ut,ct=arguments.length;for(st=0;st<ct;st++){if(ot="",typeof arguments[st]=="object"){ot+=`
[`+st+"] ";for(ut in arguments[0])hasOwnProp(arguments[0],ut)&&(ot+=ut+": "+arguments[0][ut]+", ");ot=ot.slice(0,-2)}else ot=arguments[st];rt.push(ot)}warn$2(et+`
Arguments: `+Array.prototype.slice.call(rt).join("")+`
`+new Error().stack),nt=!1}return tt.apply(this,arguments)},tt)}var deprecations={};function deprecateSimple(et,tt){hooks.deprecationHandler!=null&&hooks.deprecationHandler(et,tt),deprecations[et]||(warn$2(tt),deprecations[et]=!0)}hooks.suppressDeprecationWarnings=!1;hooks.deprecationHandler=null;function isFunction$a(et){return typeof Function<"u"&&et instanceof Function||Object.prototype.toString.call(et)==="[object Function]"}function set$7(et){var tt,nt;for(nt in et)hasOwnProp(et,nt)&&(tt=et[nt],isFunction$a(tt)?this[nt]=tt:this["_"+nt]=tt);this._config=et,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(et,tt){var nt=extend$5({},et),rt;for(rt in tt)hasOwnProp(tt,rt)&&(isObject$i(et[rt])&&isObject$i(tt[rt])?(nt[rt]={},extend$5(nt[rt],et[rt]),extend$5(nt[rt],tt[rt])):tt[rt]!=null?nt[rt]=tt[rt]:delete nt[rt]);for(rt in et)hasOwnProp(et,rt)&&!hasOwnProp(tt,rt)&&isObject$i(et[rt])&&(nt[rt]=extend$5({},nt[rt]));return nt}function Locale(et){et!=null&&this.set(et)}var keys$g;Object.keys?keys$g=Object.keys:keys$g=function(et){var tt,nt=[];for(tt in et)hasOwnProp(et,tt)&&nt.push(tt);return nt};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar$2(et,tt,nt){var rt=this._calendar[et]||this._calendar.sameElse;return isFunction$a(rt)?rt.call(tt,nt):rt}function zeroFill(et,tt,nt){var rt=""+Math.abs(et),ot=tt-rt.length,st=et>=0;return(st?nt?"+":"":"-")+Math.pow(10,Math.max(0,ot)).toString().substr(1)+rt}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(et,tt,nt,rt){var ot=rt;typeof rt=="string"&&(ot=function(){return this[rt]()}),et&&(formatTokenFunctions[et]=ot),tt&&(formatTokenFunctions[tt[0]]=function(){return zeroFill(ot.apply(this,arguments),tt[1],tt[2])}),nt&&(formatTokenFunctions[nt]=function(){return this.localeData().ordinal(ot.apply(this,arguments),et)})}function removeFormattingTokens(et){return et.match(/\[[\s\S]/)?et.replace(/^\[|\]$/g,""):et.replace(/\\/g,"")}function makeFormatFunction(et){var tt=et.match(formattingTokens),nt,rt;for(nt=0,rt=tt.length;nt<rt;nt++)formatTokenFunctions[tt[nt]]?tt[nt]=formatTokenFunctions[tt[nt]]:tt[nt]=removeFormattingTokens(tt[nt]);return function(ot){var st="",ut;for(ut=0;ut<rt;ut++)st+=isFunction$a(tt[ut])?tt[ut].call(ot,et):tt[ut];return st}}function formatMoment(et,tt){return et.isValid()?(tt=expandFormat(tt,et.localeData()),formatFunctions[tt]=formatFunctions[tt]||makeFormatFunction(tt),formatFunctions[tt](et)):et.localeData().invalidDate()}function expandFormat(et,tt){var nt=5;function rt(ot){return tt.longDateFormat(ot)||ot}for(localFormattingTokens.lastIndex=0;nt>=0&&localFormattingTokens.test(et);)et=et.replace(localFormattingTokens,rt),localFormattingTokens.lastIndex=0,nt-=1;return et}var defaultLongDateFormat={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"};function longDateFormat(et){var tt=this._longDateFormat[et],nt=this._longDateFormat[et.toUpperCase()];return tt||!nt?tt:(this._longDateFormat[et]=nt.match(formattingTokens).map(function(rt){return rt==="MMMM"||rt==="MM"||rt==="DD"||rt==="dddd"?rt.slice(1):rt}).join(""),this._longDateFormat[et])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal$1(et){return this._ordinal.replace("%d",et)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(et,tt,nt,rt){var ot=this._relativeTime[nt];return isFunction$a(ot)?ot(et,tt,nt,rt):ot.replace(/%d/i,et)}function pastFuture(et,tt){var nt=this._relativeTime[et>0?"future":"past"];return isFunction$a(nt)?nt(tt):nt.replace(/%s/i,tt)}var aliases$1={};function addUnitAlias(et,tt){var nt=et.toLowerCase();aliases$1[nt]=aliases$1[nt+"s"]=aliases$1[tt]=et}function normalizeUnits(et){return typeof et=="string"?aliases$1[et]||aliases$1[et.toLowerCase()]:void 0}function normalizeObjectUnits(et){var tt={},nt,rt;for(rt in et)hasOwnProp(et,rt)&&(nt=normalizeUnits(rt),nt&&(tt[nt]=et[rt]));return tt}var priorities={};function addUnitPriority(et,tt){priorities[et]=tt}function getPrioritizedUnits(et){var tt=[],nt;for(nt in et)hasOwnProp(et,nt)&&tt.push({unit:nt,priority:priorities[nt]});return tt.sort(function(rt,ot){return rt.priority-ot.priority}),tt}function isLeapYear(et){return et%4===0&&et%100!==0||et%400===0}function absFloor(et){return et<0?Math.ceil(et)||0:Math.floor(et)}function toInt(et){var tt=+et,nt=0;return tt!==0&&isFinite(tt)&&(nt=absFloor(tt)),nt}function makeGetSet(et,tt){return function(nt){return nt!=null?(set$1$1(this,et,nt),hooks.updateOffset(this,tt),this):get$8(this,et)}}function get$8(et,tt){return et.isValid()?et._d["get"+(et._isUTC?"UTC":"")+tt]():NaN}function set$1$1(et,tt,nt){et.isValid()&&!isNaN(nt)&&(tt==="FullYear"&&isLeapYear(et.year())&&et.month()===1&&et.date()===29?(nt=toInt(nt),et._d["set"+(et._isUTC?"UTC":"")+tt](nt,et.month(),daysInMonth(nt,et.month()))):et._d["set"+(et._isUTC?"UTC":"")+tt](nt))}function stringGet(et){return et=normalizeUnits(et),isFunction$a(this[et])?this[et]():this}function stringSet(et,tt){if(typeof et=="object"){et=normalizeObjectUnits(et);var nt=getPrioritizedUnits(et),rt,ot=nt.length;for(rt=0;rt<ot;rt++)this[nt[rt].unit](et[nt[rt].unit])}else if(et=normalizeUnits(et),isFunction$a(this[et]))return this[et](tt);return this}var match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,regexes;regexes={};function addRegexToken(et,tt,nt){regexes[et]=isFunction$a(tt)?tt:function(rt,ot){return rt&&nt?nt:tt}}function getParseRegexForToken(et,tt){return hasOwnProp(regexes,et)?regexes[et](tt._strict,tt._locale):new RegExp(unescapeFormat(et))}function unescapeFormat(et){return regexEscape(et.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(tt,nt,rt,ot,st){return nt||rt||ot||st}))}function regexEscape(et){return et.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var tokens={};function addParseToken(et,tt){var nt,rt=tt,ot;for(typeof et=="string"&&(et=[et]),isNumber$3(tt)&&(rt=function(st,ut){ut[tt]=toInt(st)}),ot=et.length,nt=0;nt<ot;nt++)tokens[et[nt]]=rt}function addWeekParseToken(et,tt){addParseToken(et,function(nt,rt,ot,st){ot._w=ot._w||{},tt(nt,ot._w,ot,st)})}function addTimeToArrayFromToken(et,tt,nt){tt!=null&&hasOwnProp(tokens,et)&&tokens[et](tt,nt._a,nt,et)}var YEAR$1=0,MONTH$1=1,DATE$1=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK$1=7,WEEKDAY=8;function mod(et,tt){return(et%tt+tt)%tt}var indexOf;Array.prototype.indexOf?indexOf=Array.prototype.indexOf:indexOf=function(et){var tt;for(tt=0;tt<this.length;++tt)if(this[tt]===et)return tt;return-1};function daysInMonth(et,tt){if(isNaN(et)||isNaN(tt))return NaN;var nt=mod(tt,12);return et+=(tt-nt)/12,nt===1?isLeapYear(et)?29:28:31-nt%7%2}addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1});addFormatToken("MMM",0,0,function(et){return this.localeData().monthsShort(this,et)});addFormatToken("MMMM",0,0,function(et){return this.localeData().months(this,et)});addUnitAlias("month","M");addUnitPriority("month",8);addRegexToken("M",match1to2);addRegexToken("MM",match1to2,match2);addRegexToken("MMM",function(et,tt){return tt.monthsShortRegex(et)});addRegexToken("MMMM",function(et,tt){return tt.monthsRegex(et)});addParseToken(["M","MM"],function(et,tt){tt[MONTH$1]=toInt(et)-1});addParseToken(["MMM","MMMM"],function(et,tt,nt,rt){var ot=nt._locale.monthsParse(et,rt,nt._strict);ot!=null?tt[MONTH$1]=ot:getParsingFlags(nt).invalidMonth=et});var defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;function localeMonths(et,tt){return et?isArray$o(this._months)?this._months[et.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(tt)?"format":"standalone"][et.month()]:isArray$o(this._months)?this._months:this._months.standalone}function localeMonthsShort(et,tt){return et?isArray$o(this._monthsShort)?this._monthsShort[et.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(tt)?"format":"standalone"][et.month()]:isArray$o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(et,tt,nt){var rt,ot,st,ut=et.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],rt=0;rt<12;++rt)st=createUTC([2e3,rt]),this._shortMonthsParse[rt]=this.monthsShort(st,"").toLocaleLowerCase(),this._longMonthsParse[rt]=this.months(st,"").toLocaleLowerCase();return nt?tt==="MMM"?(ot=indexOf.call(this._shortMonthsParse,ut),ot!==-1?ot:null):(ot=indexOf.call(this._longMonthsParse,ut),ot!==-1?ot:null):tt==="MMM"?(ot=indexOf.call(this._shortMonthsParse,ut),ot!==-1?ot:(ot=indexOf.call(this._longMonthsParse,ut),ot!==-1?ot:null)):(ot=indexOf.call(this._longMonthsParse,ut),ot!==-1?ot:(ot=indexOf.call(this._shortMonthsParse,ut),ot!==-1?ot:null))}function localeMonthsParse(et,tt,nt){var rt,ot,st;if(this._monthsParseExact)return handleStrictParse.call(this,et,tt,nt);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),rt=0;rt<12;rt++){if(ot=createUTC([2e3,rt]),nt&&!this._longMonthsParse[rt]&&(this._longMonthsParse[rt]=new RegExp("^"+this.months(ot,"").replace(".","")+"$","i"),this._shortMonthsParse[rt]=new RegExp("^"+this.monthsShort(ot,"").replace(".","")+"$","i")),!nt&&!this._monthsParse[rt]&&(st="^"+this.months(ot,"")+"|^"+this.monthsShort(ot,""),this._monthsParse[rt]=new RegExp(st.replace(".",""),"i")),nt&&tt==="MMMM"&&this._longMonthsParse[rt].test(et))return rt;if(nt&&tt==="MMM"&&this._shortMonthsParse[rt].test(et))return rt;if(!nt&&this._monthsParse[rt].test(et))return rt}}function setMonth(et,tt){var nt;if(!et.isValid())return et;if(typeof tt=="string"){if(/^\d+$/.test(tt))tt=toInt(tt);else if(tt=et.localeData().monthsParse(tt),!isNumber$3(tt))return et}return nt=Math.min(et.date(),daysInMonth(et.year(),tt)),et._d["set"+(et._isUTC?"UTC":"")+"Month"](tt,nt),et}function getSetMonth(et){return et!=null?(setMonth(this,et),hooks.updateOffset(this,!0),this):get$8(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(et){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),et?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&et?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(et){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),et?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&et?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function et(ut,ct){return ct.length-ut.length}var tt=[],nt=[],rt=[],ot,st;for(ot=0;ot<12;ot++)st=createUTC([2e3,ot]),tt.push(this.monthsShort(st,"")),nt.push(this.months(st,"")),rt.push(this.months(st,"")),rt.push(this.monthsShort(st,""));for(tt.sort(et),nt.sort(et),rt.sort(et),ot=0;ot<12;ot++)tt[ot]=regexEscape(tt[ot]),nt[ot]=regexEscape(nt[ot]);for(ot=0;ot<24;ot++)rt[ot]=regexEscape(rt[ot]);this._monthsRegex=new RegExp("^("+rt.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+tt.join("|")+")","i")}addFormatToken("Y",0,0,function(){var et=this.year();return et<=9999?zeroFill(et,4):"+"+et});addFormatToken(0,["YY",2],0,function(){return this.year()%100});addFormatToken(0,["YYYY",4],0,"year");addFormatToken(0,["YYYYY",5],0,"year");addFormatToken(0,["YYYYYY",6,!0],0,"year");addUnitAlias("year","y");addUnitPriority("year",1);addRegexToken("Y",matchSigned);addRegexToken("YY",match1to2,match2);addRegexToken("YYYY",match1to4,match4);addRegexToken("YYYYY",match1to6,match6);addRegexToken("YYYYYY",match1to6,match6);addParseToken(["YYYYY","YYYYYY"],YEAR$1);addParseToken("YYYY",function(et,tt){tt[YEAR$1]=et.length===2?hooks.parseTwoDigitYear(et):toInt(et)});addParseToken("YY",function(et,tt){tt[YEAR$1]=hooks.parseTwoDigitYear(et)});addParseToken("Y",function(et,tt){tt[YEAR$1]=parseInt(et,10)});function daysInYear(et){return isLeapYear(et)?366:365}hooks.parseTwoDigitYear=function(et){return toInt(et)+(toInt(et)>68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function createDate(et,tt,nt,rt,ot,st,ut){var ct;return et<100&&et>=0?(ct=new Date(et+400,tt,nt,rt,ot,st,ut),isFinite(ct.getFullYear())&&ct.setFullYear(et)):ct=new Date(et,tt,nt,rt,ot,st,ut),ct}function createUTCDate(et){var tt,nt;return et<100&&et>=0?(nt=Array.prototype.slice.call(arguments),nt[0]=et+400,tt=new Date(Date.UTC.apply(null,nt)),isFinite(tt.getUTCFullYear())&&tt.setUTCFullYear(et)):tt=new Date(Date.UTC.apply(null,arguments)),tt}function firstWeekOffset(et,tt,nt){var rt=7+tt-nt,ot=(7+createUTCDate(et,0,rt).getUTCDay()-tt)%7;return-ot+rt-1}function dayOfYearFromWeeks(et,tt,nt,rt,ot){var st=(7+nt-rt)%7,ut=firstWeekOffset(et,rt,ot),ct=1+7*(tt-1)+st+ut,ft,pt;return ct<=0?(ft=et-1,pt=daysInYear(ft)+ct):ct>daysInYear(et)?(ft=et+1,pt=ct-daysInYear(et)):(ft=et,pt=ct),{year:ft,dayOfYear:pt}}function weekOfYear(et,tt,nt){var rt=firstWeekOffset(et.year(),tt,nt),ot=Math.floor((et.dayOfYear()-rt-1)/7)+1,st,ut;return ot<1?(ut=et.year()-1,st=ot+weeksInYear(ut,tt,nt)):ot>weeksInYear(et.year(),tt,nt)?(st=ot-weeksInYear(et.year(),tt,nt),ut=et.year()+1):(ut=et.year(),st=ot),{week:st,year:ut}}function weeksInYear(et,tt,nt){var rt=firstWeekOffset(et,tt,nt),ot=firstWeekOffset(et+1,tt,nt);return(daysInYear(et)-rt+ot)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addUnitAlias("week","w");addUnitAlias("isoWeek","W");addUnitPriority("week",5);addUnitPriority("isoWeek",5);addRegexToken("w",match1to2);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(et,tt,nt,rt){tt[rt.substr(0,1)]=toInt(et)});function localeWeek(et){return weekOfYear(et,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(et){var tt=this.localeData().week(this);return et==null?tt:this.add((et-tt)*7,"d")}function getSetISOWeek(et){var tt=weekOfYear(this,1,4).week;return et==null?tt:this.add((et-tt)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(et){return this.localeData().weekdaysMin(this,et)});addFormatToken("ddd",0,0,function(et){return this.localeData().weekdaysShort(this,et)});addFormatToken("dddd",0,0,function(et){return this.localeData().weekdays(this,et)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addUnitAlias("day","d");addUnitAlias("weekday","e");addUnitAlias("isoWeekday","E");addUnitPriority("day",11);addUnitPriority("weekday",11);addUnitPriority("isoWeekday",11);addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(et,tt){return tt.weekdaysMinRegex(et)});addRegexToken("ddd",function(et,tt){return tt.weekdaysShortRegex(et)});addRegexToken("dddd",function(et,tt){return tt.weekdaysRegex(et)});addWeekParseToken(["dd","ddd","dddd"],function(et,tt,nt,rt){var ot=nt._locale.weekdaysParse(et,rt,nt._strict);ot!=null?tt.d=ot:getParsingFlags(nt).invalidWeekday=et});addWeekParseToken(["d","e","E"],function(et,tt,nt,rt){tt[rt]=toInt(et)});function parseWeekday(et,tt){return typeof et!="string"?et:isNaN(et)?(et=tt.weekdaysParse(et),typeof et=="number"?et:null):parseInt(et,10)}function parseIsoWeekday(et,tt){return typeof et=="string"?tt.weekdaysParse(et)%7||7:isNaN(et)?null:et}function shiftWeekdays(et,tt){return et.slice(tt,7).concat(et.slice(0,tt))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(et,tt){var nt=isArray$o(this._weekdays)?this._weekdays:this._weekdays[et&&et!==!0&&this._weekdays.isFormat.test(tt)?"format":"standalone"];return et===!0?shiftWeekdays(nt,this._week.dow):et?nt[et.day()]:nt}function localeWeekdaysShort(et){return et===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):et?this._weekdaysShort[et.day()]:this._weekdaysShort}function localeWeekdaysMin(et){return et===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):et?this._weekdaysMin[et.day()]:this._weekdaysMin}function handleStrictParse$1(et,tt,nt){var rt,ot,st,ut=et.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],rt=0;rt<7;++rt)st=createUTC([2e3,1]).day(rt),this._minWeekdaysParse[rt]=this.weekdaysMin(st,"").toLocaleLowerCase(),this._shortWeekdaysParse[rt]=this.weekdaysShort(st,"").toLocaleLowerCase(),this._weekdaysParse[rt]=this.weekdays(st,"").toLocaleLowerCase();return nt?tt==="dddd"?(ot=indexOf.call(this._weekdaysParse,ut),ot!==-1?ot:null):tt==="ddd"?(ot=indexOf.call(this._shortWeekdaysParse,ut),ot!==-1?ot:null):(ot=indexOf.call(this._minWeekdaysParse,ut),ot!==-1?ot:null):tt==="dddd"?(ot=indexOf.call(this._weekdaysParse,ut),ot!==-1||(ot=indexOf.call(this._shortWeekdaysParse,ut),ot!==-1)?ot:(ot=indexOf.call(this._minWeekdaysParse,ut),ot!==-1?ot:null)):tt==="ddd"?(ot=indexOf.call(this._shortWeekdaysParse,ut),ot!==-1||(ot=indexOf.call(this._weekdaysParse,ut),ot!==-1)?ot:(ot=indexOf.call(this._minWeekdaysParse,ut),ot!==-1?ot:null)):(ot=indexOf.call(this._minWeekdaysParse,ut),ot!==-1||(ot=indexOf.call(this._weekdaysParse,ut),ot!==-1)?ot:(ot=indexOf.call(this._shortWeekdaysParse,ut),ot!==-1?ot:null))}function localeWeekdaysParse(et,tt,nt){var rt,ot,st;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,et,tt,nt);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),rt=0;rt<7;rt++){if(ot=createUTC([2e3,1]).day(rt),nt&&!this._fullWeekdaysParse[rt]&&(this._fullWeekdaysParse[rt]=new RegExp("^"+this.weekdays(ot,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[rt]=new RegExp("^"+this.weekdaysShort(ot,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[rt]=new RegExp("^"+this.weekdaysMin(ot,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[rt]||(st="^"+this.weekdays(ot,"")+"|^"+this.weekdaysShort(ot,"")+"|^"+this.weekdaysMin(ot,""),this._weekdaysParse[rt]=new RegExp(st.replace(".",""),"i")),nt&&tt==="dddd"&&this._fullWeekdaysParse[rt].test(et))return rt;if(nt&&tt==="ddd"&&this._shortWeekdaysParse[rt].test(et))return rt;if(nt&&tt==="dd"&&this._minWeekdaysParse[rt].test(et))return rt;if(!nt&&this._weekdaysParse[rt].test(et))return rt}}function getSetDayOfWeek(et){if(!this.isValid())return et!=null?this:NaN;var tt=this._isUTC?this._d.getUTCDay():this._d.getDay();return et!=null?(et=parseWeekday(et,this.localeData()),this.add(et-tt,"d")):tt}function getSetLocaleDayOfWeek(et){if(!this.isValid())return et!=null?this:NaN;var tt=(this.day()+7-this.localeData()._week.dow)%7;return et==null?tt:this.add(et-tt,"d")}function getSetISODayOfWeek(et){if(!this.isValid())return et!=null?this:NaN;if(et!=null){var tt=parseIsoWeekday(et,this.localeData());return this.day(this.day()%7?tt:tt-7)}else return this.day()||7}function weekdaysRegex(et){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),et?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&et?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(et){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),et?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&et?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(et){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),et?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&et?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function et(ht,mt){return mt.length-ht.length}var tt=[],nt=[],rt=[],ot=[],st,ut,ct,ft,pt;for(st=0;st<7;st++)ut=createUTC([2e3,1]).day(st),ct=regexEscape(this.weekdaysMin(ut,"")),ft=regexEscape(this.weekdaysShort(ut,"")),pt=regexEscape(this.weekdays(ut,"")),tt.push(ct),nt.push(ft),rt.push(pt),ot.push(ct),ot.push(ft),ot.push(pt);tt.sort(et),nt.sort(et),rt.sort(et),ot.sort(et),this._weekdaysRegex=new RegExp("^("+ot.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+rt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+tt.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(et,tt){addFormatToken(et,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),tt)})}meridiem("a",!0);meridiem("A",!1);addUnitAlias("hour","h");addUnitPriority("hour",13);function matchMeridiem(et,tt){return tt._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2);addRegexToken("h",match1to2);addRegexToken("k",match1to2);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(et,tt,nt){var rt=toInt(et);tt[HOUR]=rt===24?0:rt});addParseToken(["a","A"],function(et,tt,nt){nt._isPm=nt._locale.isPM(et),nt._meridiem=et});addParseToken(["h","hh"],function(et,tt,nt){tt[HOUR]=toInt(et),getParsingFlags(nt).bigHour=!0});addParseToken("hmm",function(et,tt,nt){var rt=et.length-2;tt[HOUR]=toInt(et.substr(0,rt)),tt[MINUTE]=toInt(et.substr(rt)),getParsingFlags(nt).bigHour=!0});addParseToken("hmmss",function(et,tt,nt){var rt=et.length-4,ot=et.length-2;tt[HOUR]=toInt(et.substr(0,rt)),tt[MINUTE]=toInt(et.substr(rt,2)),tt[SECOND]=toInt(et.substr(ot)),getParsingFlags(nt).bigHour=!0});addParseToken("Hmm",function(et,tt,nt){var rt=et.length-2;tt[HOUR]=toInt(et.substr(0,rt)),tt[MINUTE]=toInt(et.substr(rt))});addParseToken("Hmmss",function(et,tt,nt){var rt=et.length-4,ot=et.length-2;tt[HOUR]=toInt(et.substr(0,rt)),tt[MINUTE]=toInt(et.substr(rt,2)),tt[SECOND]=toInt(et.substr(ot))});function localeIsPM(et){return(et+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(et,tt,nt){return et>11?nt?"pm":"PM":nt?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(et,tt){var nt,rt=Math.min(et.length,tt.length);for(nt=0;nt<rt;nt+=1)if(et[nt]!==tt[nt])return nt;return rt}function normalizeLocale(et){return et&&et.toLowerCase().replace("_","-")}function chooseLocale(et){for(var tt=0,nt,rt,ot,st;tt<et.length;){for(st=normalizeLocale(et[tt]).split("-"),nt=st.length,rt=normalizeLocale(et[tt+1]),rt=rt?rt.split("-"):null;nt>0;){if(ot=loadLocale(st.slice(0,nt).join("-")),ot)return ot;if(rt&&rt.length>=nt&&commonPrefix(st,rt)>=nt-1)break;nt--}tt++}return globalLocale}function isLocaleNameSane(et){return et.match("^[^/\\\\]*$")!=null}function loadLocale(et){var tt=null,nt;if(locales[et]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(et))try{tt=globalLocale._abbr,nt=require,nt("./locale/"+et),getSetGlobalLocale(tt)}catch{locales[et]=null}return locales[et]}function getSetGlobalLocale(et,tt){var nt;return et&&(isUndefined$1(tt)?nt=getLocale(et):nt=defineLocale(et,tt),nt?globalLocale=nt:typeof console<"u"&&console.warn&&console.warn("Locale "+et+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(et,tt){if(tt!==null){var nt,rt=baseConfig;if(tt.abbr=et,locales[et]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),rt=locales[et]._config;else if(tt.parentLocale!=null)if(locales[tt.parentLocale]!=null)rt=locales[tt.parentLocale]._config;else if(nt=loadLocale(tt.parentLocale),nt!=null)rt=nt._config;else return localeFamilies[tt.parentLocale]||(localeFamilies[tt.parentLocale]=[]),localeFamilies[tt.parentLocale].push({name:et,config:tt}),null;return locales[et]=new Locale(mergeConfigs(rt,tt)),localeFamilies[et]&&localeFamilies[et].forEach(function(ot){defineLocale(ot.name,ot.config)}),getSetGlobalLocale(et),locales[et]}else return delete locales[et],null}function updateLocale(et,tt){if(tt!=null){var nt,rt,ot=baseConfig;locales[et]!=null&&locales[et].parentLocale!=null?locales[et].set(mergeConfigs(locales[et]._config,tt)):(rt=loadLocale(et),rt!=null&&(ot=rt._config),tt=mergeConfigs(ot,tt),rt==null&&(tt.abbr=et),nt=new Locale(tt),nt.parentLocale=locales[et],locales[et]=nt),getSetGlobalLocale(et)}else locales[et]!=null&&(locales[et].parentLocale!=null?(locales[et]=locales[et].parentLocale,et===getSetGlobalLocale()&&getSetGlobalLocale(et)):locales[et]!=null&&delete locales[et]);return locales[et]}function getLocale(et){var tt;if(et&&et._locale&&et._locale._abbr&&(et=et._locale._abbr),!et)return globalLocale;if(!isArray$o(et)){if(tt=loadLocale(et),tt)return tt;et=[et]}return chooseLocale(et)}function listLocales(){return keys$g(locales)}function checkOverflow(et){var tt,nt=et._a;return nt&&getParsingFlags(et).overflow===-2&&(tt=nt[MONTH$1]<0||nt[MONTH$1]>11?MONTH$1:nt[DATE$1]<1||nt[DATE$1]>daysInMonth(nt[YEAR$1],nt[MONTH$1])?DATE$1:nt[HOUR]<0||nt[HOUR]>24||nt[HOUR]===24&&(nt[MINUTE]!==0||nt[SECOND]!==0||nt[MILLISECOND]!==0)?HOUR:nt[MINUTE]<0||nt[MINUTE]>59?MINUTE:nt[SECOND]<0||nt[SECOND]>59?SECOND:nt[MILLISECOND]<0||nt[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(et)._overflowDayOfYear&&(tt<YEAR$1||tt>DATE$1)&&(tt=DATE$1),getParsingFlags(et)._overflowWeeks&&tt===-1&&(tt=WEEK$1),getParsingFlags(et)._overflowWeekday&&tt===-1&&(tt=WEEKDAY),getParsingFlags(et).overflow=tt),et}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(et){var tt,nt,rt=et._i,ot=extendedIsoRegex.exec(rt)||basicIsoRegex.exec(rt),st,ut,ct,ft,pt=isoDates.length,ht=isoTimes.length;if(ot){for(getParsingFlags(et).iso=!0,tt=0,nt=pt;tt<nt;tt++)if(isoDates[tt][1].exec(ot[1])){ut=isoDates[tt][0],st=isoDates[tt][2]!==!1;break}if(ut==null){et._isValid=!1;return}if(ot[3]){for(tt=0,nt=ht;tt<nt;tt++)if(isoTimes[tt][1].exec(ot[3])){ct=(ot[2]||" ")+isoTimes[tt][0];break}if(ct==null){et._isValid=!1;return}}if(!st&&ct!=null){et._isValid=!1;return}if(ot[4])if(tzRegex.exec(ot[4]))ft="Z";else{et._isValid=!1;return}et._f=ut+(ct||"")+(ft||""),configFromStringAndFormat(et)}else et._isValid=!1}function extractFromRFC2822Strings(et,tt,nt,rt,ot,st){var ut=[untruncateYear(et),defaultLocaleMonthsShort.indexOf(tt),parseInt(nt,10),parseInt(rt,10),parseInt(ot,10)];return st&&ut.push(parseInt(st,10)),ut}function untruncateYear(et){var tt=parseInt(et,10);return tt<=49?2e3+tt:tt<=999?1900+tt:tt}function preprocessRFC2822(et){return et.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(et,tt,nt){if(et){var rt=defaultLocaleWeekdaysShort.indexOf(et),ot=new Date(tt[0],tt[1],tt[2]).getDay();if(rt!==ot)return getParsingFlags(nt).weekdayMismatch=!0,nt._isValid=!1,!1}return!0}function calculateOffset(et,tt,nt){if(et)return obsOffsets[et];if(tt)return 0;var rt=parseInt(nt,10),ot=rt%100,st=(rt-ot)/100;return st*60+ot}function configFromRFC2822(et){var tt=rfc2822.exec(preprocessRFC2822(et._i)),nt;if(tt){if(nt=extractFromRFC2822Strings(tt[4],tt[3],tt[2],tt[5],tt[6],tt[7]),!checkWeekday(tt[1],nt,et))return;et._a=nt,et._tzm=calculateOffset(tt[8],tt[9],tt[10]),et._d=createUTCDate.apply(null,et._a),et._d.setUTCMinutes(et._d.getUTCMinutes()-et._tzm),getParsingFlags(et).rfc2822=!0}else et._isValid=!1}function configFromString(et){var tt=aspNetJsonRegex.exec(et._i);if(tt!==null){et._d=new Date(+tt[1]);return}if(configFromISO(et),et._isValid===!1)delete et._isValid;else return;if(configFromRFC2822(et),et._isValid===!1)delete et._isValid;else return;et._strict?et._isValid=!1:hooks.createFromInputFallback(et)}hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(et){et._d=new Date(et._i+(et._useUTC?" UTC":""))});function defaults$4(et,tt,nt){return et??tt??nt}function currentDateArray(et){var tt=new Date(hooks.now());return et._useUTC?[tt.getUTCFullYear(),tt.getUTCMonth(),tt.getUTCDate()]:[tt.getFullYear(),tt.getMonth(),tt.getDate()]}function configFromArray(et){var tt,nt,rt=[],ot,st,ut;if(!et._d){for(ot=currentDateArray(et),et._w&&et._a[DATE$1]==null&&et._a[MONTH$1]==null&&dayOfYearFromWeekInfo(et),et._dayOfYear!=null&&(ut=defaults$4(et._a[YEAR$1],ot[YEAR$1]),(et._dayOfYear>daysInYear(ut)||et._dayOfYear===0)&&(getParsingFlags(et)._overflowDayOfYear=!0),nt=createUTCDate(ut,0,et._dayOfYear),et._a[MONTH$1]=nt.getUTCMonth(),et._a[DATE$1]=nt.getUTCDate()),tt=0;tt<3&&et._a[tt]==null;++tt)et._a[tt]=rt[tt]=ot[tt];for(;tt<7;tt++)et._a[tt]=rt[tt]=et._a[tt]==null?tt===2?1:0:et._a[tt];et._a[HOUR]===24&&et._a[MINUTE]===0&&et._a[SECOND]===0&&et._a[MILLISECOND]===0&&(et._nextDay=!0,et._a[HOUR]=0),et._d=(et._useUTC?createUTCDate:createDate).apply(null,rt),st=et._useUTC?et._d.getUTCDay():et._d.getDay(),et._tzm!=null&&et._d.setUTCMinutes(et._d.getUTCMinutes()-et._tzm),et._nextDay&&(et._a[HOUR]=24),et._w&&typeof et._w.d<"u"&&et._w.d!==st&&(getParsingFlags(et).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(et){var tt,nt,rt,ot,st,ut,ct,ft,pt;tt=et._w,tt.GG!=null||tt.W!=null||tt.E!=null?(st=1,ut=4,nt=defaults$4(tt.GG,et._a[YEAR$1],weekOfYear(createLocal(),1,4).year),rt=defaults$4(tt.W,1),ot=defaults$4(tt.E,1),(ot<1||ot>7)&&(ft=!0)):(st=et._locale._week.dow,ut=et._locale._week.doy,pt=weekOfYear(createLocal(),st,ut),nt=defaults$4(tt.gg,et._a[YEAR$1],pt.year),rt=defaults$4(tt.w,pt.week),tt.d!=null?(ot=tt.d,(ot<0||ot>6)&&(ft=!0)):tt.e!=null?(ot=tt.e+st,(tt.e<0||tt.e>6)&&(ft=!0)):ot=st),rt<1||rt>weeksInYear(nt,st,ut)?getParsingFlags(et)._overflowWeeks=!0:ft!=null?getParsingFlags(et)._overflowWeekday=!0:(ct=dayOfYearFromWeeks(nt,rt,ot,st,ut),et._a[YEAR$1]=ct.year,et._dayOfYear=ct.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(et){if(et._f===hooks.ISO_8601){configFromISO(et);return}if(et._f===hooks.RFC_2822){configFromRFC2822(et);return}et._a=[],getParsingFlags(et).empty=!0;var tt=""+et._i,nt,rt,ot,st,ut,ct=tt.length,ft=0,pt,ht;for(ot=expandFormat(et._f,et._locale).match(formattingTokens)||[],ht=ot.length,nt=0;nt<ht;nt++)st=ot[nt],rt=(tt.match(getParseRegexForToken(st,et))||[])[0],rt&&(ut=tt.substr(0,tt.indexOf(rt)),ut.length>0&&getParsingFlags(et).unusedInput.push(ut),tt=tt.slice(tt.indexOf(rt)+rt.length),ft+=rt.length),formatTokenFunctions[st]?(rt?getParsingFlags(et).empty=!1:getParsingFlags(et).unusedTokens.push(st),addTimeToArrayFromToken(st,rt,et)):et._strict&&!rt&&getParsingFlags(et).unusedTokens.push(st);getParsingFlags(et).charsLeftOver=ct-ft,tt.length>0&&getParsingFlags(et).unusedInput.push(tt),et._a[HOUR]<=12&&getParsingFlags(et).bigHour===!0&&et._a[HOUR]>0&&(getParsingFlags(et).bigHour=void 0),getParsingFlags(et).parsedDateParts=et._a.slice(0),getParsingFlags(et).meridiem=et._meridiem,et._a[HOUR]=meridiemFixWrap(et._locale,et._a[HOUR],et._meridiem),pt=getParsingFlags(et).era,pt!==null&&(et._a[YEAR$1]=et._locale.erasConvertYear(pt,et._a[YEAR$1])),configFromArray(et),checkOverflow(et)}function meridiemFixWrap(et,tt,nt){var rt;return nt==null?tt:et.meridiemHour!=null?et.meridiemHour(tt,nt):(et.isPM!=null&&(rt=et.isPM(nt),rt&&tt<12&&(tt+=12),!rt&&tt===12&&(tt=0)),tt)}function configFromStringAndArray(et){var tt,nt,rt,ot,st,ut,ct=!1,ft=et._f.length;if(ft===0){getParsingFlags(et).invalidFormat=!0,et._d=new Date(NaN);return}for(ot=0;ot<ft;ot++)st=0,ut=!1,tt=copyConfig({},et),et._useUTC!=null&&(tt._useUTC=et._useUTC),tt._f=et._f[ot],configFromStringAndFormat(tt),isValid$1(tt)&&(ut=!0),st+=getParsingFlags(tt).charsLeftOver,st+=getParsingFlags(tt).unusedTokens.length*10,getParsingFlags(tt).score=st,ct?st<rt&&(rt=st,nt=tt):(rt==null||st<rt||ut)&&(rt=st,nt=tt,ut&&(ct=!0));extend$5(et,nt||tt)}function configFromObject(et){if(!et._d){var tt=normalizeObjectUnits(et._i),nt=tt.day===void 0?tt.date:tt.day;et._a=map$5([tt.year,tt.month,nt,tt.hour,tt.minute,tt.second,tt.millisecond],function(rt){return rt&&parseInt(rt,10)}),configFromArray(et)}}function createFromConfig(et){var tt=new Moment(checkOverflow(prepareConfig(et)));return tt._nextDay&&(tt.add(1,"d"),tt._nextDay=void 0),tt}function prepareConfig(et){var tt=et._i,nt=et._f;return et._locale=et._locale||getLocale(et._l),tt===null||nt===void 0&&tt===""?createInvalid({nullInput:!0}):(typeof tt=="string"&&(et._i=tt=et._locale.preparse(tt)),isMoment(tt)?new Moment(checkOverflow(tt)):(isDate$3(tt)?et._d=tt:isArray$o(nt)?configFromStringAndArray(et):nt?configFromStringAndFormat(et):configFromInput(et),isValid$1(et)||(et._d=null),et))}function configFromInput(et){var tt=et._i;isUndefined$1(tt)?et._d=new Date(hooks.now()):isDate$3(tt)?et._d=new Date(tt.valueOf()):typeof tt=="string"?configFromString(et):isArray$o(tt)?(et._a=map$5(tt.slice(0),function(nt){return parseInt(nt,10)}),configFromArray(et)):isObject$i(tt)?configFromObject(et):isNumber$3(tt)?et._d=new Date(tt):hooks.createFromInputFallback(et)}function createLocalOrUTC(et,tt,nt,rt,ot){var st={};return(tt===!0||tt===!1)&&(rt=tt,tt=void 0),(nt===!0||nt===!1)&&(rt=nt,nt=void 0),(isObject$i(et)&&isObjectEmpty(et)||isArray$o(et)&&et.length===0)&&(et=void 0),st._isAMomentObject=!0,st._useUTC=st._isUTC=ot,st._l=nt,st._i=et,st._f=tt,st._strict=rt,createFromConfig(st)}function createLocal(et,tt,nt,rt){return createLocalOrUTC(et,tt,nt,rt,!1)}var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var et=createLocal.apply(null,arguments);return this.isValid()&&et.isValid()?et<this?this:et:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var et=createLocal.apply(null,arguments);return this.isValid()&&et.isValid()?et>this?this:et:createInvalid()});function pickBy(et,tt){var nt,rt;if(tt.length===1&&isArray$o(tt[0])&&(tt=tt[0]),!tt.length)return createLocal();for(nt=tt[0],rt=1;rt<tt.length;++rt)(!tt[rt].isValid()||tt[rt][et](nt))&&(nt=tt[rt]);return nt}function min$6(){var et=[].slice.call(arguments,0);return pickBy("isBefore",et)}function max$6(){var et=[].slice.call(arguments,0);return pickBy("isAfter",et)}var now$5=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(et){var tt,nt=!1,rt,ot=ordering.length;for(tt in et)if(hasOwnProp(et,tt)&&!(indexOf.call(ordering,tt)!==-1&&(et[tt]==null||!isNaN(et[tt]))))return!1;for(rt=0;rt<ot;++rt)if(et[ordering[rt]]){if(nt)return!1;parseFloat(et[ordering[rt]])!==toInt(et[ordering[rt]])&&(nt=!0)}return!0}function isValid$1$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(et){var tt=normalizeObjectUnits(et),nt=tt.year||0,rt=tt.quarter||0,ot=tt.month||0,st=tt.week||tt.isoWeek||0,ut=tt.day||0,ct=tt.hour||0,ft=tt.minute||0,pt=tt.second||0,ht=tt.millisecond||0;this._isValid=isDurationValid(tt),this._milliseconds=+ht+pt*1e3+ft*6e4+ct*1e3*60*60,this._days=+ut+st*7,this._months=+ot+rt*3+nt*12,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(et){return et instanceof Duration}function absRound(et){return et<0?Math.round(-1*et)*-1:Math.round(et)}function compareArrays(et,tt,nt){var rt=Math.min(et.length,tt.length),ot=Math.abs(et.length-tt.length),st=0,ut;for(ut=0;ut<rt;ut++)(nt&&et[ut]!==tt[ut]||!nt&&toInt(et[ut])!==toInt(tt[ut]))&&st++;return st+ot}function offset$6(et,tt){addFormatToken(et,0,0,function(){var nt=this.utcOffset(),rt="+";return nt<0&&(nt=-nt,rt="-"),rt+zeroFill(~~(nt/60),2)+tt+zeroFill(~~nt%60,2)})}offset$6("Z",":");offset$6("ZZ","");addRegexToken("Z",matchShortOffset);addRegexToken("ZZ",matchShortOffset);addParseToken(["Z","ZZ"],function(et,tt,nt){nt._useUTC=!0,nt._tzm=offsetFromString(matchShortOffset,et)});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(et,tt){var nt=(tt||"").match(et),rt,ot,st;return nt===null?null:(rt=nt[nt.length-1]||[],ot=(rt+"").match(chunkOffset)||["-",0,0],st=+(ot[1]*60)+toInt(ot[2]),st===0?0:ot[0]==="+"?st:-st)}function cloneWithOffset(et,tt){var nt,rt;return tt._isUTC?(nt=tt.clone(),rt=(isMoment(et)||isDate$3(et)?et.valueOf():createLocal(et).valueOf())-nt.valueOf(),nt._d.setTime(nt._d.valueOf()+rt),hooks.updateOffset(nt,!1),nt):createLocal(et).local()}function getDateOffset(et){return-Math.round(et._d.getTimezoneOffset())}hooks.updateOffset=function(){};function getSetOffset(et,tt,nt){var rt=this._offset||0,ot;if(!this.isValid())return et!=null?this:NaN;if(et!=null){if(typeof et=="string"){if(et=offsetFromString(matchShortOffset,et),et===null)return this}else Math.abs(et)<16&&!nt&&(et=et*60);return!this._isUTC&&tt&&(ot=getDateOffset(this)),this._offset=et,this._isUTC=!0,ot!=null&&this.add(ot,"m"),rt!==et&&(!tt||this._changeInProgress?addSubtract(this,createDuration(et-rt,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?rt:getDateOffset(this)}function getSetZone(et,tt){return et!=null?(typeof et!="string"&&(et=-et),this.utcOffset(et,tt),this):-this.utcOffset()}function setOffsetToUTC(et){return this.utcOffset(0,et)}function setOffsetToLocal(et){return this._isUTC&&(this.utcOffset(0,et),this._isUTC=!1,et&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var et=offsetFromString(matchOffset,this._i);et!=null?this.utcOffset(et):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(et){return this.isValid()?(et=et?createLocal(et).utcOffset():0,(this.utcOffset()-et)%60===0):!1}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined$1(this._isDSTShifted))return this._isDSTShifted;var et={},tt;return copyConfig(et,this),et=prepareConfig(et),et._a?(tt=et._isUTC?createUTC(et._a):createLocal(et._a),this._isDSTShifted=this.isValid()&&compareArrays(et._a,tt.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(et,tt){var nt=et,rt=null,ot,st,ut;return isDuration(et)?nt={ms:et._milliseconds,d:et._days,M:et._months}:isNumber$3(et)||!isNaN(+et)?(nt={},tt?nt[tt]=+et:nt.milliseconds=+et):(rt=aspNetRegex.exec(et))?(ot=rt[1]==="-"?-1:1,nt={y:0,d:toInt(rt[DATE$1])*ot,h:toInt(rt[HOUR])*ot,m:toInt(rt[MINUTE])*ot,s:toInt(rt[SECOND])*ot,ms:toInt(absRound(rt[MILLISECOND]*1e3))*ot}):(rt=isoRegex.exec(et))?(ot=rt[1]==="-"?-1:1,nt={y:parseIso(rt[2],ot),M:parseIso(rt[3],ot),w:parseIso(rt[4],ot),d:parseIso(rt[5],ot),h:parseIso(rt[6],ot),m:parseIso(rt[7],ot),s:parseIso(rt[8],ot)}):nt==null?nt={}:typeof nt=="object"&&("from"in nt||"to"in nt)&&(ut=momentsDifference(createLocal(nt.from),createLocal(nt.to)),nt={},nt.ms=ut.milliseconds,nt.M=ut.months),st=new Duration(nt),isDuration(et)&&hasOwnProp(et,"_locale")&&(st._locale=et._locale),isDuration(et)&&hasOwnProp(et,"_isValid")&&(st._isValid=et._isValid),st}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(et,tt){var nt=et&&parseFloat(et.replace(",","."));return(isNaN(nt)?0:nt)*tt}function positiveMomentsDifference(et,tt){var nt={};return nt.months=tt.month()-et.month()+(tt.year()-et.year())*12,et.clone().add(nt.months,"M").isAfter(tt)&&--nt.months,nt.milliseconds=+tt-+et.clone().add(nt.months,"M"),nt}function momentsDifference(et,tt){var nt;return et.isValid()&&tt.isValid()?(tt=cloneWithOffset(tt,et),et.isBefore(tt)?nt=positiveMomentsDifference(et,tt):(nt=positiveMomentsDifference(tt,et),nt.milliseconds=-nt.milliseconds,nt.months=-nt.months),nt):{milliseconds:0,months:0}}function createAdder(et,tt){return function(nt,rt){var ot,st;return rt!==null&&!isNaN(+rt)&&(deprecateSimple(tt,"moment()."+tt+"(period, number) is deprecated. Please use moment()."+tt+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),st=nt,nt=rt,rt=st),ot=createDuration(nt,rt),addSubtract(this,ot,et),this}}function addSubtract(et,tt,nt,rt){var ot=tt._milliseconds,st=absRound(tt._days),ut=absRound(tt._months);!et.isValid()||(rt=rt??!0,ut&&setMonth(et,get$8(et,"Month")+ut*nt),st&&set$1$1(et,"Date",get$8(et,"Date")+st*nt),ot&&et._d.setTime(et._d.valueOf()+ot*nt),rt&&hooks.updateOffset(et,st||ut))}var add$5=createAdder(1,"add"),subtract=createAdder(-1,"subtract");function isString$4(et){return typeof et=="string"||et instanceof String}function isMomentInput(et){return isMoment(et)||isDate$3(et)||isString$4(et)||isNumber$3(et)||isNumberOrStringArray(et)||isMomentInputObject(et)||et===null||et===void 0}function isMomentInputObject(et){var tt=isObject$i(et)&&!isObjectEmpty(et),nt=!1,rt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],ot,st,ut=rt.length;for(ot=0;ot<ut;ot+=1)st=rt[ot],nt=nt||hasOwnProp(et,st);return tt&&nt}function isNumberOrStringArray(et){var tt=isArray$o(et),nt=!1;return tt&&(nt=et.filter(function(rt){return!isNumber$3(rt)&&isString$4(et)}).length===0),tt&&nt}function isCalendarSpec(et){var tt=isObject$i(et)&&!isObjectEmpty(et),nt=!1,rt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],ot,st;for(ot=0;ot<rt.length;ot+=1)st=rt[ot],nt=nt||hasOwnProp(et,st);return tt&&nt}function getCalendarFormat(et,tt){var nt=et.diff(tt,"days",!0);return nt<-6?"sameElse":nt<-1?"lastWeek":nt<0?"lastDay":nt<1?"sameDay":nt<2?"nextDay":nt<7?"nextWeek":"sameElse"}function calendar$1$1(et,tt){arguments.length===1&&(arguments[0]?isMomentInput(arguments[0])?(et=arguments[0],tt=void 0):isCalendarSpec(arguments[0])&&(tt=arguments[0],et=void 0):(et=void 0,tt=void 0));var nt=et||createLocal(),rt=cloneWithOffset(nt,this).startOf("day"),ot=hooks.calendarFormat(this,rt)||"sameElse",st=tt&&(isFunction$a(tt[ot])?tt[ot].call(this,nt):tt[ot]);return this.format(st||this.localeData().calendar(ot,this,createLocal(nt)))}function clone$2(){return new Moment(this)}function isAfter(et,tt){var nt=isMoment(et)?et:createLocal(et);return this.isValid()&&nt.isValid()?(tt=normalizeUnits(tt)||"millisecond",tt==="millisecond"?this.valueOf()>nt.valueOf():nt.valueOf()<this.clone().startOf(tt).valueOf()):!1}function isBefore(et,tt){var nt=isMoment(et)?et:createLocal(et);return this.isValid()&&nt.isValid()?(tt=normalizeUnits(tt)||"millisecond",tt==="millisecond"?this.valueOf()<nt.valueOf():this.clone().endOf(tt).valueOf()<nt.valueOf()):!1}function isBetween(et,tt,nt,rt){var ot=isMoment(et)?et:createLocal(et),st=isMoment(tt)?tt:createLocal(tt);return this.isValid()&&ot.isValid()&&st.isValid()?(rt=rt||"()",(rt[0]==="("?this.isAfter(ot,nt):!this.isBefore(ot,nt))&&(rt[1]===")"?this.isBefore(st,nt):!this.isAfter(st,nt))):!1}function isSame(et,tt){var nt=isMoment(et)?et:createLocal(et),rt;return this.isValid()&&nt.isValid()?(tt=normalizeUnits(tt)||"millisecond",tt==="millisecond"?this.valueOf()===nt.valueOf():(rt=nt.valueOf(),this.clone().startOf(tt).valueOf()<=rt&&rt<=this.clone().endOf(tt).valueOf())):!1}function isSameOrAfter(et,tt){return this.isSame(et,tt)||this.isAfter(et,tt)}function isSameOrBefore(et,tt){return this.isSame(et,tt)||this.isBefore(et,tt)}function diff(et,tt,nt){var rt,ot,st;if(!this.isValid())return NaN;if(rt=cloneWithOffset(et,this),!rt.isValid())return NaN;switch(ot=(rt.utcOffset()-this.utcOffset())*6e4,tt=normalizeUnits(tt),tt){case"year":st=monthDiff(this,rt)/12;break;case"month":st=monthDiff(this,rt);break;case"quarter":st=monthDiff(this,rt)/3;break;case"second":st=(this-rt)/1e3;break;case"minute":st=(this-rt)/6e4;break;case"hour":st=(this-rt)/36e5;break;case"day":st=(this-rt-ot)/864e5;break;case"week":st=(this-rt-ot)/6048e5;break;default:st=this-rt}return nt?st:absFloor(st)}function monthDiff(et,tt){if(et.date()<tt.date())return-monthDiff(tt,et);var nt=(tt.year()-et.year())*12+(tt.month()-et.month()),rt=et.clone().add(nt,"months"),ot,st;return tt-rt<0?(ot=et.clone().add(nt-1,"months"),st=(tt-rt)/(rt-ot)):(ot=et.clone().add(nt+1,"months"),st=(tt-rt)/(ot-rt)),-(nt+st)||0}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString$b(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(et){if(!this.isValid())return null;var tt=et!==!0,nt=tt?this.clone().utc():this;return nt.year()<0||nt.year()>9999?formatMoment(nt,tt?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$a(Date.prototype.toISOString)?tt?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(nt,"Z")):formatMoment(nt,tt?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var et="moment",tt="",nt,rt,ot,st;return this.isLocal()||(et=this.utcOffset()===0?"moment.utc":"moment.parseZone",tt="Z"),nt="["+et+'("]',rt=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",ot="-MM-DD[T]HH:mm:ss.SSS",st=tt+'[")]',this.format(nt+rt+ot+st)}function format$5(et){et||(et=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var tt=formatMoment(this,et);return this.localeData().postformat(tt)}function from(et,tt){return this.isValid()&&(isMoment(et)&&et.isValid()||createLocal(et).isValid())?createDuration({to:this,from:et}).locale(this.locale()).humanize(!tt):this.localeData().invalidDate()}function fromNow(et){return this.from(createLocal(),et)}function to(et,tt){return this.isValid()&&(isMoment(et)&&et.isValid()||createLocal(et).isValid())?createDuration({from:this,to:et}).locale(this.locale()).humanize(!tt):this.localeData().invalidDate()}function toNow(et){return this.to(createLocal(),et)}function locale$3(et){var tt;return et===void 0?this._locale._abbr:(tt=getLocale(et),tt!=null&&(this._locale=tt),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(et){return et===void 0?this.localeData():this.locale(et)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(et,tt){return(et%tt+tt)%tt}function localStartOfDate(et,tt,nt){return et<100&&et>=0?new Date(et+400,tt,nt)-MS_PER_400_YEARS:new Date(et,tt,nt).valueOf()}function utcStartOfDate(et,tt,nt){return et<100&&et>=0?Date.UTC(et+400,tt,nt)-MS_PER_400_YEARS:Date.UTC(et,tt,nt)}function startOf(et){var tt,nt;if(et=normalizeUnits(et),et===void 0||et==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,et){case"year":tt=nt(this.year(),0,1);break;case"quarter":tt=nt(this.year(),this.month()-this.month()%3,1);break;case"month":tt=nt(this.year(),this.month(),1);break;case"week":tt=nt(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":tt=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":tt=nt(this.year(),this.month(),this.date());break;case"hour":tt=this._d.valueOf(),tt-=mod$1(tt+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":tt=this._d.valueOf(),tt-=mod$1(tt,MS_PER_MINUTE);break;case"second":tt=this._d.valueOf(),tt-=mod$1(tt,MS_PER_SECOND);break}return this._d.setTime(tt),hooks.updateOffset(this,!0),this}function endOf(et){var tt,nt;if(et=normalizeUnits(et),et===void 0||et==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,et){case"year":tt=nt(this.year()+1,0,1)-1;break;case"quarter":tt=nt(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":tt=nt(this.year(),this.month()+1,1)-1;break;case"week":tt=nt(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":tt=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":tt=nt(this.year(),this.month(),this.date()+1)-1;break;case"hour":tt=this._d.valueOf(),tt+=MS_PER_HOUR-mod$1(tt+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":tt=this._d.valueOf(),tt+=MS_PER_MINUTE-mod$1(tt,MS_PER_MINUTE)-1;break;case"second":tt=this._d.valueOf(),tt+=MS_PER_SECOND-mod$1(tt,MS_PER_SECOND)-1;break}return this._d.setTime(tt),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate$1(){return new Date(this.valueOf())}function toArray$2(){var et=this;return[et.year(),et.month(),et.date(),et.hour(),et.minute(),et.second(),et.millisecond()]}function toObject(){var et=this;return{years:et.year(),months:et.month(),date:et.date(),hours:et.hours(),minutes:et.minutes(),seconds:et.seconds(),milliseconds:et.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid$1(this)}function parsingFlags(){return extend$5({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(et,tt,nt,rt){var ot=nt._locale.erasParse(et,rt,nt._strict);ot?getParsingFlags(nt).era=ot:getParsingFlags(nt).invalidEra=et});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR$1);addParseToken(["yo"],function(et,tt,nt,rt){var ot;nt._locale._eraYearOrdinalRegex&&(ot=et.match(nt._locale._eraYearOrdinalRegex)),nt._locale.eraYearOrdinalParse?tt[YEAR$1]=nt._locale.eraYearOrdinalParse(et,ot):tt[YEAR$1]=parseInt(et,10)});function localeEras(et,tt){var nt,rt,ot,st=this._eras||getLocale("en")._eras;for(nt=0,rt=st.length;nt<rt;++nt){switch(typeof st[nt].since){case"string":ot=hooks(st[nt].since).startOf("day"),st[nt].since=ot.valueOf();break}switch(typeof st[nt].until){case"undefined":st[nt].until=1/0;break;case"string":ot=hooks(st[nt].until).startOf("day").valueOf(),st[nt].until=ot.valueOf();break}}return st}function localeErasParse(et,tt,nt){var rt,ot,st=this.eras(),ut,ct,ft;for(et=et.toUpperCase(),rt=0,ot=st.length;rt<ot;++rt)if(ut=st[rt].name.toUpperCase(),ct=st[rt].abbr.toUpperCase(),ft=st[rt].narrow.toUpperCase(),nt)switch(tt){case"N":case"NN":case"NNN":if(ct===et)return st[rt];break;case"NNNN":if(ut===et)return st[rt];break;case"NNNNN":if(ft===et)return st[rt];break}else if([ut,ct,ft].indexOf(et)>=0)return st[rt]}function localeErasConvertYear(et,tt){var nt=et.since<=et.until?1:-1;return tt===void 0?hooks(et.since).year():hooks(et.since).year()+(tt-et.offset)*nt}function getEraName(){var et,tt,nt,rt=this.localeData().eras();for(et=0,tt=rt.length;et<tt;++et)if(nt=this.clone().startOf("day").valueOf(),rt[et].since<=nt&&nt<=rt[et].until||rt[et].until<=nt&&nt<=rt[et].since)return rt[et].name;return""}function getEraNarrow(){var et,tt,nt,rt=this.localeData().eras();for(et=0,tt=rt.length;et<tt;++et)if(nt=this.clone().startOf("day").valueOf(),rt[et].since<=nt&&nt<=rt[et].until||rt[et].until<=nt&&nt<=rt[et].since)return rt[et].narrow;return""}function getEraAbbr(){var et,tt,nt,rt=this.localeData().eras();for(et=0,tt=rt.length;et<tt;++et)if(nt=this.clone().startOf("day").valueOf(),rt[et].since<=nt&&nt<=rt[et].until||rt[et].until<=nt&&nt<=rt[et].since)return rt[et].abbr;return""}function getEraYear(){var et,tt,nt,rt,ot=this.localeData().eras();for(et=0,tt=ot.length;et<tt;++et)if(nt=ot[et].since<=ot[et].until?1:-1,rt=this.clone().startOf("day").valueOf(),ot[et].since<=rt&&rt<=ot[et].until||ot[et].until<=rt&&rt<=ot[et].since)return(this.year()-hooks(ot[et].since).year())*nt+ot[et].offset;return this.year()}function erasNameRegex(et){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),et?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(et){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),et?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(et){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),et?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(et,tt){return tt.erasAbbrRegex(et)}function matchEraName(et,tt){return tt.erasNameRegex(et)}function matchEraNarrow(et,tt){return tt.erasNarrowRegex(et)}function matchEraYearOrdinal(et,tt){return tt._eraYearOrdinalRegex||matchUnsigned}function computeErasParse(){var et=[],tt=[],nt=[],rt=[],ot,st,ut=this.eras();for(ot=0,st=ut.length;ot<st;++ot)tt.push(regexEscape(ut[ot].name)),et.push(regexEscape(ut[ot].abbr)),nt.push(regexEscape(ut[ot].narrow)),rt.push(regexEscape(ut[ot].name)),rt.push(regexEscape(ut[ot].abbr)),rt.push(regexEscape(ut[ot].narrow));this._erasRegex=new RegExp("^("+rt.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+tt.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+et.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+nt.join("|")+")","i")}addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100});addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken(et,tt){addFormatToken(0,[et,et.length],0,tt)}addWeekYearFormatToken("gggg","weekYear");addWeekYearFormatToken("ggggg","weekYear");addWeekYearFormatToken("GGGG","isoWeekYear");addWeekYearFormatToken("GGGGG","isoWeekYear");addUnitAlias("weekYear","gg");addUnitAlias("isoWeekYear","GG");addUnitPriority("weekYear",1);addUnitPriority("isoWeekYear",1);addRegexToken("G",matchSigned);addRegexToken("g",matchSigned);addRegexToken("GG",match1to2,match2);addRegexToken("gg",match1to2,match2);addRegexToken("GGGG",match1to4,match4);addRegexToken("gggg",match1to4,match4);addRegexToken("GGGGG",match1to6,match6);addRegexToken("ggggg",match1to6,match6);addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(et,tt,nt,rt){tt[rt.substr(0,2)]=toInt(et)});addWeekParseToken(["gg","GG"],function(et,tt,nt,rt){tt[rt]=hooks.parseTwoDigitYear(et)});function getSetWeekYear(et){return getSetWeekYearHelper.call(this,et,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(et){return getSetWeekYearHelper.call(this,et,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var et=this.localeData()._week;return weeksInYear(this.year(),et.dow,et.doy)}function getWeeksInWeekYear(){var et=this.localeData()._week;return weeksInYear(this.weekYear(),et.dow,et.doy)}function getSetWeekYearHelper(et,tt,nt,rt,ot){var st;return et==null?weekOfYear(this,rt,ot).year:(st=weeksInYear(et,rt,ot),tt>st&&(tt=st),setWeekAll.call(this,et,tt,nt,rt,ot))}function setWeekAll(et,tt,nt,rt,ot){var st=dayOfYearFromWeeks(et,tt,nt,rt,ot),ut=createUTCDate(st.year,0,st.dayOfYear);return this.year(ut.getUTCFullYear()),this.month(ut.getUTCMonth()),this.date(ut.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addUnitAlias("quarter","Q");addUnitPriority("quarter",7);addRegexToken("Q",match1);addParseToken("Q",function(et,tt){tt[MONTH$1]=(toInt(et)-1)*3});function getSetQuarter(et){return et==null?Math.ceil((this.month()+1)/3):this.month((et-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addUnitAlias("date","D");addUnitPriority("date",9);addRegexToken("D",match1to2);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(et,tt){return et?tt._dayOfMonthOrdinalParse||tt._ordinalParse:tt._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE$1);addParseToken("Do",function(et,tt){tt[DATE$1]=toInt(et.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias("dayOfYear","DDD");addUnitPriority("dayOfYear",4);addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(et,tt,nt){nt._dayOfYear=toInt(et)});function getSetDayOfYear(et){var tt=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return et==null?tt:this.add(et-tt,"d")}addFormatToken("m",["mm",2],0,"minute");addUnitAlias("minute","m");addUnitPriority("minute",14);addRegexToken("m",match1to2);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addUnitAlias("second","s");addUnitPriority("second",15);addRegexToken("s",match1to2);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias("millisecond","ms");addUnitPriority("millisecond",16);addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token,getSetMillisecond;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);function parseMs(et,tt){tt[MILLISECOND]=toInt(("0."+et)*1e3)}for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto$7=Moment.prototype;proto$7.add=add$5;proto$7.calendar=calendar$1$1;proto$7.clone=clone$2;proto$7.diff=diff;proto$7.endOf=endOf;proto$7.format=format$5;proto$7.from=from;proto$7.fromNow=fromNow;proto$7.to=to;proto$7.toNow=toNow;proto$7.get=stringGet;proto$7.invalidAt=invalidAt;proto$7.isAfter=isAfter;proto$7.isBefore=isBefore;proto$7.isBetween=isBetween;proto$7.isSame=isSame;proto$7.isSameOrAfter=isSameOrAfter;proto$7.isSameOrBefore=isSameOrBefore;proto$7.isValid=isValid$2;proto$7.lang=lang;proto$7.locale=locale$3;proto$7.localeData=localeData;proto$7.max=prototypeMax;proto$7.min=prototypeMin;proto$7.parsingFlags=parsingFlags;proto$7.set=stringSet;proto$7.startOf=startOf;proto$7.subtract=subtract;proto$7.toArray=toArray$2;proto$7.toObject=toObject;proto$7.toDate=toDate$1;proto$7.toISOString=toISOString;proto$7.inspect=inspect;typeof Symbol<"u"&&Symbol.for!=null&&(proto$7[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto$7.toJSON=toJSON;proto$7.toString=toString$b;proto$7.unix=unix;proto$7.valueOf=valueOf;proto$7.creationData=creationData;proto$7.eraName=getEraName;proto$7.eraNarrow=getEraNarrow;proto$7.eraAbbr=getEraAbbr;proto$7.eraYear=getEraYear;proto$7.year=getSetYear;proto$7.isLeapYear=getIsLeapYear;proto$7.weekYear=getSetWeekYear;proto$7.isoWeekYear=getSetISOWeekYear;proto$7.quarter=proto$7.quarters=getSetQuarter;proto$7.month=getSetMonth;proto$7.daysInMonth=getDaysInMonth;proto$7.week=proto$7.weeks=getSetWeek;proto$7.isoWeek=proto$7.isoWeeks=getSetISOWeek;proto$7.weeksInYear=getWeeksInYear;proto$7.weeksInWeekYear=getWeeksInWeekYear;proto$7.isoWeeksInYear=getISOWeeksInYear;proto$7.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto$7.date=getSetDayOfMonth;proto$7.day=proto$7.days=getSetDayOfWeek;proto$7.weekday=getSetLocaleDayOfWeek;proto$7.isoWeekday=getSetISODayOfWeek;proto$7.dayOfYear=getSetDayOfYear;proto$7.hour=proto$7.hours=getSetHour;proto$7.minute=proto$7.minutes=getSetMinute;proto$7.second=proto$7.seconds=getSetSecond;proto$7.millisecond=proto$7.milliseconds=getSetMillisecond;proto$7.utcOffset=getSetOffset;proto$7.utc=setOffsetToUTC;proto$7.local=setOffsetToLocal;proto$7.parseZone=setOffsetToParsedOffset;proto$7.hasAlignedHourOffset=hasAlignedHourOffset;proto$7.isDST=isDaylightSavingTime;proto$7.isLocal=isLocal;proto$7.isUtcOffset=isUtcOffset;proto$7.isUtc=isUtc;proto$7.isUTC=isUtc;proto$7.zoneAbbr=getZoneAbbr;proto$7.zoneName=getZoneName;proto$7.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto$7.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);proto$7.years=deprecate("years accessor is deprecated. Use year instead",getSetYear);proto$7.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto$7.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(et){return createLocal(et*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(et){return et}var proto$1$1=Locale.prototype;proto$1$1.calendar=calendar$2;proto$1$1.longDateFormat=longDateFormat;proto$1$1.invalidDate=invalidDate;proto$1$1.ordinal=ordinal$1;proto$1$1.preparse=preParsePostFormat;proto$1$1.postformat=preParsePostFormat;proto$1$1.relativeTime=relativeTime;proto$1$1.pastFuture=pastFuture;proto$1$1.set=set$7;proto$1$1.eras=localeEras;proto$1$1.erasParse=localeErasParse;proto$1$1.erasConvertYear=localeErasConvertYear;proto$1$1.erasAbbrRegex=erasAbbrRegex;proto$1$1.erasNameRegex=erasNameRegex;proto$1$1.erasNarrowRegex=erasNarrowRegex;proto$1$1.months=localeMonths;proto$1$1.monthsShort=localeMonthsShort;proto$1$1.monthsParse=localeMonthsParse;proto$1$1.monthsRegex=monthsRegex;proto$1$1.monthsShortRegex=monthsShortRegex;proto$1$1.week=localeWeek;proto$1$1.firstDayOfYear=localeFirstDayOfYear;proto$1$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1$1.weekdays=localeWeekdays;proto$1$1.weekdaysMin=localeWeekdaysMin;proto$1$1.weekdaysShort=localeWeekdaysShort;proto$1$1.weekdaysParse=localeWeekdaysParse;proto$1$1.weekdaysRegex=weekdaysRegex;proto$1$1.weekdaysShortRegex=weekdaysShortRegex;proto$1$1.weekdaysMinRegex=weekdaysMinRegex;proto$1$1.isPM=localeIsPM;proto$1$1.meridiem=localeMeridiem;function get$1$1(et,tt,nt,rt){var ot=getLocale(),st=createUTC().set(rt,tt);return ot[nt](st,et)}function listMonthsImpl(et,tt,nt){if(isNumber$3(et)&&(tt=et,et=void 0),et=et||"",tt!=null)return get$1$1(et,tt,nt,"month");var rt,ot=[];for(rt=0;rt<12;rt++)ot[rt]=get$1$1(et,rt,nt,"month");return ot}function listWeekdaysImpl(et,tt,nt,rt){typeof et=="boolean"?(isNumber$3(tt)&&(nt=tt,tt=void 0),tt=tt||""):(tt=et,nt=tt,et=!1,isNumber$3(tt)&&(nt=tt,tt=void 0),tt=tt||"");var ot=getLocale(),st=et?ot._week.dow:0,ut,ct=[];if(nt!=null)return get$1$1(tt,(nt+st)%7,rt,"day");for(ut=0;ut<7;ut++)ct[ut]=get$1$1(tt,(ut+st)%7,rt,"day");return ct}function listMonths(et,tt){return listMonthsImpl(et,tt,"months")}function listMonthsShort(et,tt){return listMonthsImpl(et,tt,"monthsShort")}function listWeekdays(et,tt,nt){return listWeekdaysImpl(et,tt,nt,"weekdays")}function listWeekdaysShort(et,tt,nt){return listWeekdaysImpl(et,tt,nt,"weekdaysShort")}function listWeekdaysMin(et,tt,nt){return listWeekdaysImpl(et,tt,nt,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(et){var tt=et%10,nt=toInt(et%100/10)===1?"th":tt===1?"st":tt===2?"nd":tt===3?"rd":"th";return et+nt}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs$3(){var et=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),et.milliseconds=mathAbs(et.milliseconds),et.seconds=mathAbs(et.seconds),et.minutes=mathAbs(et.minutes),et.hours=mathAbs(et.hours),et.months=mathAbs(et.months),et.years=mathAbs(et.years),this}function addSubtract$1(et,tt,nt,rt){var ot=createDuration(tt,nt);return et._milliseconds+=rt*ot._milliseconds,et._days+=rt*ot._days,et._months+=rt*ot._months,et._bubble()}function add$1$1(et,tt){return addSubtract$1(this,et,tt,1)}function subtract$1(et,tt){return addSubtract$1(this,et,tt,-1)}function absCeil(et){return et<0?Math.floor(et):Math.ceil(et)}function bubble(){var et=this._milliseconds,tt=this._days,nt=this._months,rt=this._data,ot,st,ut,ct,ft;return et>=0&&tt>=0&&nt>=0||et<=0&&tt<=0&&nt<=0||(et+=absCeil(monthsToDays(nt)+tt)*864e5,tt=0,nt=0),rt.milliseconds=et%1e3,ot=absFloor(et/1e3),rt.seconds=ot%60,st=absFloor(ot/60),rt.minutes=st%60,ut=absFloor(st/60),rt.hours=ut%24,tt+=absFloor(ut/24),ft=absFloor(daysToMonths(tt)),nt+=ft,tt-=absCeil(monthsToDays(ft)),ct=absFloor(nt/12),nt%=12,rt.days=tt,rt.months=nt,rt.years=ct,this}function daysToMonths(et){return et*4800/146097}function monthsToDays(et){return et*146097/4800}function as(et){if(!this.isValid())return NaN;var tt,nt,rt=this._milliseconds;if(et=normalizeUnits(et),et==="month"||et==="quarter"||et==="year")switch(tt=this._days+rt/864e5,nt=this._months+daysToMonths(tt),et){case"month":return nt;case"quarter":return nt/3;case"year":return nt/12}else switch(tt=this._days+Math.round(monthsToDays(this._months)),et){case"week":return tt/7+rt/6048e5;case"day":return tt+rt/864e5;case"hour":return tt*24+rt/36e5;case"minute":return tt*1440+rt/6e4;case"second":return tt*86400+rt/1e3;case"millisecond":return Math.floor(tt*864e5)+rt;default:throw new Error("Unknown unit "+et)}}function valueOf$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6:NaN}function makeAs(et){return function(){return this.as(et)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y");function clone$1$1(){return createDuration(this)}function get$2$1(et){return et=normalizeUnits(et),this.isValid()?this[et+"s"]():NaN}function makeGetter(et){return function(){return this.isValid()?this._data[et]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round$3=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(et,tt,nt,rt,ot){return ot.relativeTime(tt||1,!!nt,et,rt)}function relativeTime$1(et,tt,nt,rt){var ot=createDuration(et).abs(),st=round$3(ot.as("s")),ut=round$3(ot.as("m")),ct=round$3(ot.as("h")),ft=round$3(ot.as("d")),pt=round$3(ot.as("M")),ht=round$3(ot.as("w")),mt=round$3(ot.as("y")),yt=st<=nt.ss&&["s",st]||st<nt.s&&["ss",st]||ut<=1&&["m"]||ut<nt.m&&["mm",ut]||ct<=1&&["h"]||ct<nt.h&&["hh",ct]||ft<=1&&["d"]||ft<nt.d&&["dd",ft];return nt.w!=null&&(yt=yt||ht<=1&&["w"]||ht<nt.w&&["ww",ht]),yt=yt||pt<=1&&["M"]||pt<nt.M&&["MM",pt]||mt<=1&&["y"]||["yy",mt],yt[2]=tt,yt[3]=+et>0,yt[4]=rt,substituteTimeAgo.apply(null,yt)}function getSetRelativeTimeRounding(et){return et===void 0?round$3:typeof et=="function"?(round$3=et,!0):!1}function getSetRelativeTimeThreshold(et,tt){return thresholds[et]===void 0?!1:tt===void 0?thresholds[et]:(thresholds[et]=tt,et==="s"&&(thresholds.ss=tt-1),!0)}function humanize(et,tt){if(!this.isValid())return this.localeData().invalidDate();var nt=!1,rt=thresholds,ot,st;return typeof et=="object"&&(tt=et,et=!1),typeof et=="boolean"&&(nt=et),typeof tt=="object"&&(rt=Object.assign({},thresholds,tt),tt.s!=null&&tt.ss==null&&(rt.ss=tt.s-1)),ot=this.localeData(),st=relativeTime$1(this,!nt,rt,ot),nt&&(st=ot.pastFuture(+this,st)),ot.postformat(st)}var abs$1$1=Math.abs;function sign$3(et){return(et>0)-(et<0)||+et}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var et=abs$1$1(this._milliseconds)/1e3,tt=abs$1$1(this._days),nt=abs$1$1(this._months),rt,ot,st,ut,ct=this.asSeconds(),ft,pt,ht,mt;return ct?(rt=absFloor(et/60),ot=absFloor(rt/60),et%=60,rt%=60,st=absFloor(nt/12),nt%=12,ut=et?et.toFixed(3).replace(/\.?0+$/,""):"",ft=ct<0?"-":"",pt=sign$3(this._months)!==sign$3(ct)?"-":"",ht=sign$3(this._days)!==sign$3(ct)?"-":"",mt=sign$3(this._milliseconds)!==sign$3(ct)?"-":"",ft+"P"+(st?pt+st+"Y":"")+(nt?pt+nt+"M":"")+(tt?ht+tt+"D":"")+(ot||rt||et?"T":"")+(ot?mt+ot+"H":"")+(rt?mt+rt+"M":"")+(et?mt+ut+"S":"")):"P0D"}var proto$2$1=Duration.prototype;proto$2$1.isValid=isValid$1$1;proto$2$1.abs=abs$3;proto$2$1.add=add$1$1;proto$2$1.subtract=subtract$1;proto$2$1.as=as;proto$2$1.asMilliseconds=asMilliseconds;proto$2$1.asSeconds=asSeconds;proto$2$1.asMinutes=asMinutes;proto$2$1.asHours=asHours;proto$2$1.asDays=asDays;proto$2$1.asWeeks=asWeeks;proto$2$1.asMonths=asMonths;proto$2$1.asQuarters=asQuarters;proto$2$1.asYears=asYears;proto$2$1.valueOf=valueOf$1;proto$2$1._bubble=bubble;proto$2$1.clone=clone$1$1;proto$2$1.get=get$2$1;proto$2$1.milliseconds=milliseconds;proto$2$1.seconds=seconds;proto$2$1.minutes=minutes;proto$2$1.hours=hours;proto$2$1.days=days;proto$2$1.weeks=weeks;proto$2$1.months=months;proto$2$1.years=years;proto$2$1.humanize=humanize;proto$2$1.toISOString=toISOString$1;proto$2$1.toString=toISOString$1;proto$2$1.toJSON=toISOString$1;proto$2$1.locale=locale$3;proto$2$1.localeData=localeData;proto$2$1.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2$1.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(et,tt,nt){nt._d=new Date(parseFloat(et)*1e3)});addParseToken("x",function(et,tt,nt){nt._d=new Date(toInt(et))});//! moment.js
hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto$7;hooks.min=min$6;hooks.max=max$6;hooks.now=now$5;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate$3;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto$7;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var treeSitter={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(__viteBrowserExternal$1);(function(module,exports){var Module=Module!==void 0?Module:{},TreeSitter=function(){var initPromise,document=typeof window=="object"?{currentScript:window.document.currentScript}:null;class _Parser{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(moduleOptions){return initPromise||(Module=Object.assign({},Module,moduleOptions),initPromise=new Promise(resolveInitPromise=>{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(et,tt)=>{throw tt},ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",scriptDirectory="",read_,readAsync,readBinary;function locateFile(et){return Module.locateFile?Module.locateFile(et,scriptDirectory):scriptDirectory+et}function logExceptionOnExit(et){et instanceof ExitStatus||err("exiting due to exception: "+et)}if(ENVIRONMENT_IS_NODE){var fs=require$$0$2,nodePath=require$$0$2;scriptDirectory=ENVIRONMENT_IS_WORKER?nodePath.dirname(scriptDirectory)+"/":__dirname+"/",read_=(et,tt)=>(et=isFileURI(et)?new URL(et):nodePath.normalize(et),fs.readFileSync(et,tt?void 0:"utf8")),readBinary=et=>{var tt=read_(et,!0);return tt.buffer||(tt=new Uint8Array(tt)),tt},readAsync=(et,tt,nt)=>{et=isFileURI(et)?new URL(et):nodePath.normalize(et),fs.readFile(et,function(rt,ot){rt?nt(rt):tt(ot.buffer)})},process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),module.exports=Module,quit_=(et,tt)=>{if(keepRuntimeAlive())throw process.exitCode=et,tt;logExceptionOnExit(tt),process.exit(et)},Module.inspect=function(){return"[Emscripten Module object]"}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:document!==void 0&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=scriptDirectory.indexOf("blob:")!==0?scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1):"",read_=et=>{var tt=new XMLHttpRequest;return tt.open("GET",et,!1),tt.send(null),tt.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=et=>{var tt=new XMLHttpRequest;return tt.open("GET",et,!1),tt.responseType="arraybuffer",tt.send(null),new Uint8Array(tt.response)}),readAsync=(et,tt,nt)=>{var rt=new XMLHttpRequest;rt.open("GET",et,!0),rt.responseType="arraybuffer",rt.onload=()=>{rt.status==200||rt.status==0&&rt.response?tt(rt.response):nt()},rt.onerror=nt,rt.send(null)});Module.print||console.log.bind(console);var err=Module.printErr||console.warn.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var STACK_ALIGN=16,dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var noExitRuntime=Module.noExitRuntime||!0,wasmMemory;typeof WebAssembly!="object"&&abort("no native wasm support detected");var ABORT=!1,EXITSTATUS,UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,buffer,HEAP8,HEAPU8,HEAP16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function UTF8ArrayToString(et,tt,nt){for(var rt=tt+nt,ot=tt;et[ot]&&!(ot>=rt);)++ot;if(ot-tt>16&&et.buffer&&UTF8Decoder)return UTF8Decoder.decode(et.subarray(tt,ot));for(var st="";tt<ot;){var ut=et[tt++];if(128&ut){var ct=63&et[tt++];if((224&ut)!=192){var ft=63&et[tt++];if((ut=(240&ut)==224?(15&ut)<<12|ct<<6|ft:(7&ut)<<18|ct<<12|ft<<6|63&et[tt++])<65536)st+=String.fromCharCode(ut);else{var pt=ut-65536;st+=String.fromCharCode(55296|pt>>10,56320|1023&pt)}}else st+=String.fromCharCode((31&ut)<<6|ct)}else st+=String.fromCharCode(ut)}return st}function UTF8ToString(et,tt){return et?UTF8ArrayToString(HEAPU8,et,tt):""}function stringToUTF8Array(et,tt,nt,rt){if(!(rt>0))return 0;for(var ot=nt,st=nt+rt-1,ut=0;ut<et.length;++ut){var ct=et.charCodeAt(ut);if(ct>=55296&&ct<=57343&&(ct=65536+((1023&ct)<<10)|1023&et.charCodeAt(++ut)),ct<=127){if(nt>=st)break;tt[nt++]=ct}else if(ct<=2047){if(nt+1>=st)break;tt[nt++]=192|ct>>6,tt[nt++]=128|63&ct}else if(ct<=65535){if(nt+2>=st)break;tt[nt++]=224|ct>>12,tt[nt++]=128|ct>>6&63,tt[nt++]=128|63&ct}else{if(nt+3>=st)break;tt[nt++]=240|ct>>18,tt[nt++]=128|ct>>12&63,tt[nt++]=128|ct>>6&63,tt[nt++]=128|63&ct}}return tt[nt]=0,nt-ot}function stringToUTF8(et,tt,nt){return stringToUTF8Array(et,HEAPU8,tt,nt)}function lengthBytesUTF8(et){for(var tt=0,nt=0;nt<et.length;++nt){var rt=et.charCodeAt(nt);rt<=127?tt++:rt<=2047?tt+=2:rt>=55296&&rt<=57343?(tt+=4,++nt):tt+=3}return tt}function updateGlobalBufferAndViews(et){buffer=et,Module.HEAP8=HEAP8=new Int8Array(et),Module.HEAP16=HEAP16=new Int16Array(et),Module.HEAP32=HEAP32=new Int32Array(et),Module.HEAPU8=HEAPU8=new Uint8Array(et),Module.HEAPU16=new Uint16Array(et),Module.HEAPU32=HEAPU32=new Uint32Array(et),Module.HEAPF32=HEAPF32=new Float32Array(et),Module.HEAPF64=HEAPF64=new Float64Array(et)}var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;wasmMemory=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:32768}),wasmMemory&&(buffer=wasmMemory.buffer),INITIAL_MEMORY=buffer.byteLength,updateGlobalBufferAndViews(buffer);var wasmTable=new WebAssembly.Table({initial:20,element:"anyfunc"}),__ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function keepRuntimeAlive(){return noExitRuntime}function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(et){__ATPRERUN__.unshift(et)}function addOnInit(et){__ATINIT__.unshift(et)}function addOnPostRun(et){__ATPOSTRUN__.unshift(et)}var runDependencies=0,dependenciesFulfilled=null;function addRunDependency(et){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(et){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&dependenciesFulfilled){var tt=dependenciesFulfilled;dependenciesFulfilled=null,tt()}}function abort(et){throw Module.onAbort&&Module.onAbort(et),err(et="Aborted("+et+")"),ABORT=!0,EXITSTATUS=1,et+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(et)}var dataURIPrefix="data:application/octet-stream;base64,",wasmBinaryFile,tempDouble,tempI64;function isDataURI(et){return et.startsWith(dataURIPrefix)}function isFileURI(et){return et.startsWith("file://")}function getBinary(et){try{if(et==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(et);throw"both async and sync fetching of the wasm failed"}catch(tt){abort(tt)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile))return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(et){if(!et.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";return et.arrayBuffer()}).catch(function(){return getBinary(wasmBinaryFile)});if(readAsync)return new Promise(function(et,tt){readAsync(wasmBinaryFile,function(nt){et(new Uint8Array(nt))},tt)})}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var et={env:asmLibraryArg,wasi_snapshot_preview1:asmLibraryArg,"GOT.mem":new Proxy(asmLibraryArg,GOTHandler),"GOT.func":new Proxy(asmLibraryArg,GOTHandler)};function tt(ot,st){var ut=ot.exports;ut=relocateExports(ut,1024);var ct=getDylinkMetadata(st);ct.neededDynlibs&&(dynamicLibraries=ct.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(ut),Module.asm=ut,addOnInit(Module.asm.__wasm_call_ctors),__RELOC_FUNCS__.push(Module.asm.__wasm_apply_data_relocs),removeRunDependency()}function nt(ot){tt(ot.instance,ot.module)}function rt(ot){return getBinaryPromise().then(function(st){return WebAssembly.instantiate(st,et)}).then(function(st){return st}).then(ot,function(st){err("failed to asynchronously prepare wasm: "+st),abort(st)})}if(addRunDependency(),Module.instantiateWasm)try{return Module.instantiateWasm(et,tt)}catch(ot){return err("Module.instantiateWasm callback failed with error: "+ot),!1}return wasmBinary||typeof WebAssembly.instantiateStreaming!="function"||isDataURI(wasmBinaryFile)||isFileURI(wasmBinaryFile)||ENVIRONMENT_IS_NODE||typeof fetch!="function"?rt(nt):fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(ot){return WebAssembly.instantiateStreaming(ot,et).then(nt,function(st){return err("wasm streaming compile failed: "+st),err("falling back to ArrayBuffer instantiation"),rt(nt)})}),{}}wasmBinaryFile="tree-sitter.wasm",isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));function ExitStatus(et){this.name="ExitStatus",this.message="Program terminated with exit("+et+")",this.status=et}var GOT={},CurrentModuleWeakSymbols=new Set([]),GOTHandler={get:function(et,tt){var nt=GOT[tt];return nt||(nt=GOT[tt]=new WebAssembly.Global({value:"i32",mutable:!0})),CurrentModuleWeakSymbols.has(tt)||(nt.required=!0),nt}};function callRuntimeCallbacks(et){for(;et.length>0;)et.shift()(Module)}function getDylinkMetadata(et){var tt=0,nt=0;function rt(){for(var At=0,Ct=1;;){var $t=et[tt++];if(At+=(127&$t)*Ct,Ct*=128,!(128&$t))break}return At}function ot(){var At=rt();return UTF8ArrayToString(et,(tt+=At)-At,At)}function st(At,Ct){if(At)throw new Error(Ct)}var ut="dylink.0";if(et instanceof WebAssembly.Module){var ct=WebAssembly.Module.customSections(et,ut);ct.length===0&&(ut="dylink",ct=WebAssembly.Module.customSections(et,ut)),st(ct.length===0,"need dylink section"),nt=(et=new Uint8Array(ct[0])).length}else{st(new Uint32Array(new Uint8Array(et.subarray(0,24)).buffer)[0]!=1836278016,"need to see wasm magic number"),st(et[8]!==0,"need the dylink section to be first"),tt=9;var ft=rt();nt=tt+ft,ut=ot()}var pt={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(ut=="dylink"){pt.memorySize=rt(),pt.memoryAlign=rt(),pt.tableSize=rt(),pt.tableAlign=rt();for(var ht=rt(),mt=0;mt<ht;++mt){var yt=ot();pt.neededDynlibs.push(yt)}}else for(st(ut!=="dylink.0");tt<nt;){var vt=et[tt++],Tt=rt();if(vt===1)pt.memorySize=rt(),pt.memoryAlign=rt(),pt.tableSize=rt(),pt.tableAlign=rt();else if(vt===2)for(ht=rt(),mt=0;mt<ht;++mt)yt=ot(),pt.neededDynlibs.push(yt);else if(vt===3)for(var Et=rt();Et--;){var xt=ot();256&rt()&&pt.tlsExports.add(xt)}else if(vt===4)for(Et=rt();Et--;)ot(),xt=ot(),(3&rt())==1&&pt.weakImports.add(xt);else tt+=Tt}return pt}function getValue(et,tt="i8"){switch(tt.endsWith("*")&&(tt="*"),tt){case"i1":case"i8":return HEAP8[et>>0];case"i16":return HEAP16[et>>1];case"i32":case"i64":return HEAP32[et>>2];case"float":return HEAPF32[et>>2];case"double":return HEAPF64[et>>3];case"*":return HEAPU32[et>>2];default:abort("invalid type for getValue: "+tt)}return null}function asmjsMangle(et){return et.indexOf("dynCall_")==0||["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"].includes(et)?et:"_"+et}function mergeLibSymbols(et,tt){for(var nt in et)if(et.hasOwnProperty(nt)){asmLibraryArg.hasOwnProperty(nt)||(asmLibraryArg[nt]=et[nt]);var rt=asmjsMangle(nt);Module.hasOwnProperty(rt)||(Module[rt]=et[nt]),nt=="__main_argc_argv"&&(Module._main=et[nt])}}var LDSO={loadedLibsByName:{},loadedLibsByHandle:{}};function dynCallLegacy(et,tt,nt){var rt=Module["dynCall_"+et];return nt&&nt.length?rt.apply(null,[tt].concat(nt)):rt.call(null,tt)}var wasmTableMirror=[];function getWasmTableEntry(et){var tt=wasmTableMirror[et];return tt||(et>=wasmTableMirror.length&&(wasmTableMirror.length=et+1),wasmTableMirror[et]=tt=wasmTable.get(et)),tt}function dynCall(et,tt,nt){return et.includes("j")?dynCallLegacy(et,tt,nt):getWasmTableEntry(tt).apply(null,nt)}function createInvokeFunction(et){return function(){var tt=stackSave();try{return dynCall(et,arguments[0],Array.prototype.slice.call(arguments,1))}catch(nt){if(stackRestore(tt),nt!==nt+0)throw nt;_setThrew(1,0)}}}var ___heap_base=78144;function zeroMemory(et,tt){return HEAPU8.fill(0,et,et+tt),et}function getMemory(et){if(runtimeInitialized)return zeroMemory(_malloc(et),et);var tt=___heap_base,nt=tt+et+15&-16;return ___heap_base=nt,GOT.__heap_base.value=nt,tt}function isInternalSym(et){return["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm"].includes(et)}function uleb128Encode(et,tt){et<128?tt.push(et):tt.push(et%128|128,et>>7)}function sigToWasmTypes(et){for(var tt={i:"i32",j:"i32",f:"f32",d:"f64",p:"i32"},nt={parameters:[],results:et[0]=="v"?[]:[tt[et[0]]]},rt=1;rt<et.length;++rt)nt.parameters.push(tt[et[rt]]),et[rt]==="j"&&nt.parameters.push("i32");return nt}function generateFuncType(et,tt){var nt=et.slice(0,1),rt=et.slice(1),ot={i:127,p:127,j:126,f:125,d:124};tt.push(96),uleb128Encode(rt.length,tt);for(var st=0;st<rt.length;++st)tt.push(ot[rt[st]]);nt=="v"?tt.push(0):tt.push(1,ot[nt])}function convertJsFunctionToWasm(et,tt){if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(tt),et);var nt=[1];generateFuncType(tt,nt);var rt=[0,97,115,109,1,0,0,0,1];uleb128Encode(nt.length,rt),rt.push.apply(rt,nt),rt.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var ot=new WebAssembly.Module(new Uint8Array(rt));return new WebAssembly.Instance(ot,{e:{f:et}}).exports.f}function updateTableMap(et,tt){if(functionsInTableMap)for(var nt=et;nt<et+tt;nt++){var rt=getWasmTableEntry(nt);rt&&functionsInTableMap.set(rt,nt)}}var functionsInTableMap=void 0,freeTableIndexes=[];function getEmptyTableSlot(){if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(et){throw et instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":et}return wasmTable.length-1}function setWasmTableEntry(et,tt){wasmTable.set(et,tt),wasmTableMirror[et]=wasmTable.get(et)}function addFunction(et,tt){if(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.has(et))return functionsInTableMap.get(et);var nt=getEmptyTableSlot();try{setWasmTableEntry(nt,et)}catch(rt){if(!(rt instanceof TypeError))throw rt;setWasmTableEntry(nt,convertJsFunctionToWasm(et,tt))}return functionsInTableMap.set(et,nt),nt}function updateGOT(et,tt){for(var nt in et)if(!isInternalSym(nt)){var rt=et[nt];nt.startsWith("orig$")&&(nt=nt.split("$")[1],tt=!0),GOT[nt]||(GOT[nt]=new WebAssembly.Global({value:"i32",mutable:!0})),(tt||GOT[nt].value==0)&&(typeof rt=="function"?GOT[nt].value=addFunction(rt):typeof rt=="number"?GOT[nt].value=rt:err("unhandled export type for `"+nt+"`: "+typeof rt))}}function relocateExports(et,tt,nt){var rt={};for(var ot in et){var st=et[ot];typeof st=="object"&&(st=st.value),typeof st=="number"&&(st+=tt),rt[ot]=st}return updateGOT(rt,nt),rt}function resolveGlobalSymbol(et,tt){var nt;return tt&&(nt=asmLibraryArg["orig$"+et]),nt||(nt=asmLibraryArg[et])&&nt.stub&&(nt=void 0),nt||(nt=Module[asmjsMangle(et)]),!nt&&et.startsWith("invoke_")&&(nt=createInvokeFunction(et.split("_")[1])),nt}function alignMemory(et,tt){return Math.ceil(et/tt)*tt}function loadWebAssemblyModule(binary,flags,handle){var metadata=getDylinkMetadata(binary);function loadModule(){var firstLoad=!handle||!HEAP8[handle+12>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign);memAlign=Math.max(memAlign,STACK_ALIGN);var memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+12>>0]=1,HEAPU32[handle+16>>2]=memoryBase,HEAP32[handle+20>>2]=metadata.memorySize,HEAPU32[handle+24>>2]=tableBase,HEAP32[handle+28>>2]=metadata.tableSize)}else memoryBase=HEAPU32[handle+16>>2],tableBase=HEAPU32[handle+24>>2];var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length,moduleExports;function resolveSymbol(et){var tt=resolveGlobalSymbol(et,!1);return tt||(tt=moduleExports[et]),tt}tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var proxyHandler={get:function(et,tt){switch(tt){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(tt in asmLibraryArg)return asmLibraryArg[tt];var nt;return tt in et||(et[tt]=function(){return nt||(nt=resolveSymbol(tt)),nt.apply(null,arguments)}),et[tt]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(instance){function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func="("+args+" ) => { "+body+"};";eval(func)}if(updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols(),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(instance))}return WebAssembly.instantiate(binary,info).then(function(et){return postInstantiation(et.instance)})}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(instance)}return CurrentModuleWeakSymbols=metadata.weakImports,flags.loadAsync?metadata.neededDynlibs.reduce(function(et,tt){return et.then(function(){return loadDynamicLibrary(tt,flags)})},Promise.resolve()).then(function(){return loadModule()}):(metadata.neededDynlibs.forEach(function(et){loadDynamicLibrary(et,flags)}),loadModule())}function loadDynamicLibrary(et,tt,nt){tt=tt||{global:!0,nodelete:!0};var rt=LDSO.loadedLibsByName[et];if(rt)return tt.global&&!rt.global&&(rt.global=!0,rt.module!=="loading"&&mergeLibSymbols(rt.module)),tt.nodelete&&rt.refcount!==1/0&&(rt.refcount=1/0),rt.refcount++,nt&&(LDSO.loadedLibsByHandle[nt]=rt),!tt.loadAsync||Promise.resolve(!0);function ot(ct){if(tt.fs&&tt.fs.findObject(ct)){var ft=tt.fs.readFile(ct,{encoding:"binary"});return ft instanceof Uint8Array||(ft=new Uint8Array(ft)),tt.loadAsync?Promise.resolve(ft):ft}if(ct=locateFile(ct),tt.loadAsync)return new Promise(function(pt,ht){readAsync(ct,mt=>pt(new Uint8Array(mt)),ht)});if(!readBinary)throw new Error(ct+": file not found, and synchronous loading of external files is not available");return readBinary(ct)}function st(){if(typeof preloadedWasm<"u"&&preloadedWasm[et]){var ct=preloadedWasm[et];return tt.loadAsync?Promise.resolve(ct):ct}return tt.loadAsync?ot(et).then(function(ft){return loadWebAssemblyModule(ft,tt,nt)}):loadWebAssemblyModule(ot(et),tt,nt)}function ut(ct){rt.global&&mergeLibSymbols(ct),rt.module=ct}return rt={refcount:tt.nodelete?1/0:1,name:et,module:"loading",global:tt.global},LDSO.loadedLibsByName[et]=rt,nt&&(LDSO.loadedLibsByHandle[nt]=rt),tt.loadAsync?st().then(function(ct){return ut(ct),!0}):(ut(st()),!0)}function reportUndefinedSymbols(){for(var et in GOT)if(GOT[et].value==0){var tt=resolveGlobalSymbol(et,!0);if(!tt&&!GOT[et].required)continue;if(typeof tt=="function")GOT[et].value=addFunction(tt,tt.sig);else{if(typeof tt!="number")throw new Error("bad export type for `"+et+"`: "+typeof tt);GOT[et].value=tt}}}function preloadDylibs(){dynamicLibraries.length?(addRunDependency(),dynamicLibraries.reduce(function(et,tt){return et.then(function(){return loadDynamicLibrary(tt,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})})},Promise.resolve()).then(function(){reportUndefinedSymbols(),removeRunDependency()})):reportUndefinedSymbols()}function setValue(et,tt,nt="i8"){switch(nt.endsWith("*")&&(nt="*"),nt){case"i1":case"i8":HEAP8[et>>0]=tt;break;case"i16":HEAP16[et>>1]=tt;break;case"i32":HEAP32[et>>2]=tt;break;case"i64":tempI64=[tt>>>0,(tempDouble=tt,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[et>>2]=tempI64[0],HEAP32[et+4>>2]=tempI64[1];break;case"float":HEAPF32[et>>2]=tt;break;case"double":HEAPF64[et>>3]=tt;break;case"*":HEAPU32[et>>2]=tt;break;default:abort("invalid type for setValue: "+nt)}}var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78144),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),nowIsMonotonic=!0,_emscripten_get_now;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function _abort(){abort("")}function _emscripten_memcpy_big(et,tt,nt){HEAPU8.copyWithin(et,tt,tt+nt)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(et){try{return wasmMemory.grow(et-buffer.byteLength+65535>>>16),updateGlobalBufferAndViews(wasmMemory.buffer),1}catch{}}function _emscripten_resize_heap(et){var tt=HEAPU8.length;et>>>=0;var nt=getHeapMax();if(et>nt)return!1;for(var rt=1;rt<=4;rt*=2){var ot=tt*(1+.2/rt);if(ot=Math.min(ot,et+100663296),emscripten_realloc_buffer(Math.min(nt,(st=Math.max(et,ot))+((ut=65536)-st%ut)%ut)))return!0}var st,ut;return!1}__emscripten_get_now_is_monotonic.sig="i",Module._abort=_abort,_abort.sig="v",_emscripten_get_now=ENVIRONMENT_IS_NODE?()=>{var et=process.hrtime();return 1e3*et[0]+et[1]/1e6}:()=>performance.now(),_emscripten_get_now.sig="d",_emscripten_memcpy_big.sig="vppp",_emscripten_resize_heap.sig="ip";var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(et,tt,nt){if(PATH.isAbs(tt))return tt;var rt;if(et===-100?rt=FS.cwd():rt=SYSCALLS.getStreamFromFD(et).path,tt.length==0){if(!nt)throw new FS.ErrnoError(44);return rt}return PATH.join2(rt,tt)},doStat:function(et,tt,nt){try{var rt=et(tt)}catch(ct){if(ct&&ct.node&&PATH.normalize(tt)!==PATH.normalize(FS.getPath(ct.node)))return-54;throw ct}HEAP32[nt>>2]=rt.dev,HEAP32[nt+8>>2]=rt.ino,HEAP32[nt+12>>2]=rt.mode,HEAPU32[nt+16>>2]=rt.nlink,HEAP32[nt+20>>2]=rt.uid,HEAP32[nt+24>>2]=rt.gid,HEAP32[nt+28>>2]=rt.rdev,tempI64=[rt.size>>>0,(tempDouble=rt.size,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[nt+40>>2]=tempI64[0],HEAP32[nt+44>>2]=tempI64[1],HEAP32[nt+48>>2]=4096,HEAP32[nt+52>>2]=rt.blocks;var ot=rt.atime.getTime(),st=rt.mtime.getTime(),ut=rt.ctime.getTime();return tempI64=[Math.floor(ot/1e3)>>>0,(tempDouble=Math.floor(ot/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[nt+56>>2]=tempI64[0],HEAP32[nt+60>>2]=tempI64[1],HEAPU32[nt+64>>2]=ot%1e3*1e3,tempI64=[Math.floor(st/1e3)>>>0,(tempDouble=Math.floor(st/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[nt+72>>2]=tempI64[0],HEAP32[nt+76>>2]=tempI64[1],HEAPU32[nt+80>>2]=st%1e3*1e3,tempI64=[Math.floor(ut/1e3)>>>0,(tempDouble=Math.floor(ut/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[nt+88>>2]=tempI64[0],HEAP32[nt+92>>2]=tempI64[1],HEAPU32[nt+96>>2]=ut%1e3*1e3,tempI64=[rt.ino>>>0,(tempDouble=rt.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[nt+104>>2]=tempI64[0],HEAP32[nt+108>>2]=tempI64[1],0},doMsync:function(et,tt,nt,rt,ot){if(!FS.isFile(tt.node.mode))throw new FS.ErrnoError(43);if(2&rt)return 0;var st=HEAPU8.slice(et,et+nt);FS.msync(tt,st,ot,nt,rt)},varargs:void 0,get:function(){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(et){return UTF8ToString(et)},getStreamFromFD:function(et){var tt=FS.getStream(et);if(!tt)throw new FS.ErrnoError(8);return tt}};function _proc_exit(et){EXITSTATUS=et,keepRuntimeAlive()||(Module.onExit&&Module.onExit(et),ABORT=!0),quit_(et,new ExitStatus(et))}function exitJS(et,tt){EXITSTATUS=et,_proc_exit(et)}_proc_exit.sig="vi";var _exit=exitJS;function _fd_close(et){try{var tt=SYSCALLS.getStreamFromFD(et);return FS.close(tt),0}catch(nt){if(typeof FS>"u"||!(nt instanceof FS.ErrnoError))throw nt;return nt.errno}}function convertI32PairToI53Checked(et,tt){return tt+2097152>>>0<4194305-!!et?(et>>>0)+4294967296*tt:NaN}function _fd_seek(et,tt,nt,rt,ot){try{var st=convertI32PairToI53Checked(tt,nt);if(isNaN(st))return 61;var ut=SYSCALLS.getStreamFromFD(et);return FS.llseek(ut,st,rt),tempI64=[ut.position>>>0,(tempDouble=ut.position,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ot>>2]=tempI64[0],HEAP32[ot+4>>2]=tempI64[1],ut.getdents&&st===0&&rt===0&&(ut.getdents=null),0}catch(ct){if(typeof FS>"u"||!(ct instanceof FS.ErrnoError))throw ct;return ct.errno}}function doWritev(et,tt,nt,rt){for(var ot=0,st=0;st<nt;st++){var ut=HEAPU32[tt>>2],ct=HEAPU32[tt+4>>2];tt+=8;var ft=FS.write(et,HEAP8,ut,ct,rt);if(ft<0)return-1;ot+=ft,rt!==void 0&&(rt+=ft)}return ot}function _fd_write(et,tt,nt,rt){try{var ot=doWritev(SYSCALLS.getStreamFromFD(et),tt,nt);return HEAPU32[rt>>2]=ot,0}catch(st){if(typeof FS>"u"||!(st instanceof FS.ErrnoError))throw st;return st.errno}}function _tree_sitter_log_callback(et,tt){if(currentLogCallback){const nt=UTF8ToString(tt);currentLogCallback(nt,et!==0)}}function _tree_sitter_parse_callback(et,tt,nt,rt,ot){var st=currentParseCallback(tt,{row:nt,column:rt});typeof st=="string"?(setValue(ot,st.length,"i32"),stringToUTF16(st,et,10240)):setValue(ot,0,"i32")}function handleException(et){if(et instanceof ExitStatus||et=="unwind")return EXITSTATUS;quit_(1,et)}function allocateUTF8OnStack(et){var tt=lengthBytesUTF8(et)+1,nt=stackAlloc(tt);return stringToUTF8Array(et,HEAP8,nt,tt),nt}function stringToUTF16(et,tt,nt){if(nt===void 0&&(nt=2147483647),nt<2)return 0;for(var rt=tt,ot=(nt-=2)<2*et.length?nt/2:et.length,st=0;st<ot;++st){var ut=et.charCodeAt(st);HEAP16[tt>>1]=ut,tt+=2}return HEAP16[tt>>1]=0,tt-rt}function AsciiToString(et){for(var tt="";;){var nt=HEAPU8[et++>>0];if(!nt)return tt;tt+=String.fromCharCode(nt)}}_exit.sig="vi",_fd_close.sig="ii",_fd_seek.sig="iijip",_fd_write.sig="iippp";var asmLibraryArg={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,abort:_abort,emscripten_get_now:_emscripten_get_now,emscripten_memcpy_big:_emscripten_memcpy_big,emscripten_resize_heap:_emscripten_resize_heap,exit:_exit,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback};createWasm(),Module.___wasm_call_ctors=function(){return(Module.___wasm_call_ctors=Module.asm.__wasm_call_ctors).apply(null,arguments)},Module.___wasm_apply_data_relocs=function(){return(Module.___wasm_apply_data_relocs=Module.asm.__wasm_apply_data_relocs).apply(null,arguments)};var _malloc=Module._malloc=function(){return(_malloc=Module._malloc=Module.asm.malloc).apply(null,arguments)};Module._calloc=function(){return(Module._calloc=Module.asm.calloc).apply(null,arguments)},Module._realloc=function(){return(Module._realloc=Module.asm.realloc).apply(null,arguments)},Module._free=function(){return(Module._free=Module.asm.free).apply(null,arguments)},Module._ts_language_symbol_count=function(){return(Module._ts_language_symbol_count=Module.asm.ts_language_symbol_count).apply(null,arguments)},Module._ts_language_version=function(){return(Module._ts_language_version=Module.asm.ts_language_version).apply(null,arguments)},Module._ts_language_field_count=function(){return(Module._ts_language_field_count=Module.asm.ts_language_field_count).apply(null,arguments)},Module._ts_language_symbol_name=function(){return(Module._ts_language_symbol_name=Module.asm.ts_language_symbol_name).apply(null,arguments)},Module._ts_language_symbol_for_name=function(){return(Module._ts_language_symbol_for_name=Module.asm.ts_language_symbol_for_name).apply(null,arguments)},Module._ts_language_symbol_type=function(){return(Module._ts_language_symbol_type=Module.asm.ts_language_symbol_type).apply(null,arguments)},Module._ts_language_field_name_for_id=function(){return(Module._ts_language_field_name_for_id=Module.asm.ts_language_field_name_for_id).apply(null,arguments)},Module._memset=function(){return(Module._memset=Module.asm.memset).apply(null,arguments)},Module._memcpy=function(){return(Module._memcpy=Module.asm.memcpy).apply(null,arguments)},Module._ts_parser_delete=function(){return(Module._ts_parser_delete=Module.asm.ts_parser_delete).apply(null,arguments)},Module._ts_parser_reset=function(){return(Module._ts_parser_reset=Module.asm.ts_parser_reset).apply(null,arguments)},Module._ts_parser_set_language=function(){return(Module._ts_parser_set_language=Module.asm.ts_parser_set_language).apply(null,arguments)},Module._ts_parser_timeout_micros=function(){return(Module._ts_parser_timeout_micros=Module.asm.ts_parser_timeout_micros).apply(null,arguments)},Module._ts_parser_set_timeout_micros=function(){return(Module._ts_parser_set_timeout_micros=Module.asm.ts_parser_set_timeout_micros).apply(null,arguments)},Module._memmove=function(){return(Module._memmove=Module.asm.memmove).apply(null,arguments)},Module._memcmp=function(){return(Module._memcmp=Module.asm.memcmp).apply(null,arguments)},Module._ts_query_new=function(){return(Module._ts_query_new=Module.asm.ts_query_new).apply(null,arguments)},Module._ts_query_delete=function(){return(Module._ts_query_delete=Module.asm.ts_query_delete).apply(null,arguments)},Module._iswspace=function(){return(Module._iswspace=Module.asm.iswspace).apply(null,arguments)},Module._iswalnum=function(){return(Module._iswalnum=Module.asm.iswalnum).apply(null,arguments)},Module._ts_query_pattern_count=function(){return(Module._ts_query_pattern_count=Module.asm.ts_query_pattern_count).apply(null,arguments)},Module._ts_query_capture_count=function(){return(Module._ts_query_capture_count=Module.asm.ts_query_capture_count).apply(null,arguments)},Module._ts_query_string_count=function(){return(Module._ts_query_string_count=Module.asm.ts_query_string_count).apply(null,arguments)},Module._ts_query_capture_name_for_id=function(){return(Module._ts_query_capture_name_for_id=Module.asm.ts_query_capture_name_for_id).apply(null,arguments)},Module._ts_query_string_value_for_id=function(){return(Module._ts_query_string_value_for_id=Module.asm.ts_query_string_value_for_id).apply(null,arguments)},Module._ts_query_predicates_for_pattern=function(){return(Module._ts_query_predicates_for_pattern=Module.asm.ts_query_predicates_for_pattern).apply(null,arguments)},Module._ts_tree_copy=function(){return(Module._ts_tree_copy=Module.asm.ts_tree_copy).apply(null,arguments)},Module._ts_tree_delete=function(){return(Module._ts_tree_delete=Module.asm.ts_tree_delete).apply(null,arguments)},Module._ts_init=function(){return(Module._ts_init=Module.asm.ts_init).apply(null,arguments)},Module._ts_parser_new_wasm=function(){return(Module._ts_parser_new_wasm=Module.asm.ts_parser_new_wasm).apply(null,arguments)},Module._ts_parser_enable_logger_wasm=function(){return(Module._ts_parser_enable_logger_wasm=Module.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},Module._ts_parser_parse_wasm=function(){return(Module._ts_parser_parse_wasm=Module.asm.ts_parser_parse_wasm).apply(null,arguments)},Module._ts_language_type_is_named_wasm=function(){return(Module._ts_language_type_is_named_wasm=Module.asm.ts_language_type_is_named_wasm).apply(null,arguments)},Module._ts_language_type_is_visible_wasm=function(){return(Module._ts_language_type_is_visible_wasm=Module.asm.ts_language_type_is_visible_wasm).apply(null,arguments)},Module._ts_tree_root_node_wasm=function(){return(Module._ts_tree_root_node_wasm=Module.asm.ts_tree_root_node_wasm).apply(null,arguments)},Module._ts_tree_edit_wasm=function(){return(Module._ts_tree_edit_wasm=Module.asm.ts_tree_edit_wasm).apply(null,arguments)},Module._ts_tree_get_changed_ranges_wasm=function(){return(Module._ts_tree_get_changed_ranges_wasm=Module.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},Module._ts_tree_cursor_new_wasm=function(){return(Module._ts_tree_cursor_new_wasm=Module.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},Module._ts_tree_cursor_delete_wasm=function(){return(Module._ts_tree_cursor_delete_wasm=Module.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},Module._ts_tree_cursor_reset_wasm=function(){return(Module._ts_tree_cursor_reset_wasm=Module.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_first_child_wasm=function(){return(Module._ts_tree_cursor_goto_first_child_wasm=Module.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_next_sibling_wasm=function(){return(Module._ts_tree_cursor_goto_next_sibling_wasm=Module.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_parent_wasm=function(){return(Module._ts_tree_cursor_goto_parent_wasm=Module.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_type_id_wasm=function(){return(Module._ts_tree_cursor_current_node_type_id_wasm=Module.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_named_wasm=function(){return(Module._ts_tree_cursor_current_node_is_named_wasm=Module.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_missing_wasm=function(){return(Module._ts_tree_cursor_current_node_is_missing_wasm=Module.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_id_wasm=function(){return(Module._ts_tree_cursor_current_node_id_wasm=Module.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_position_wasm=function(){return(Module._ts_tree_cursor_start_position_wasm=Module.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_position_wasm=function(){return(Module._ts_tree_cursor_end_position_wasm=Module.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_index_wasm=function(){return(Module._ts_tree_cursor_start_index_wasm=Module.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_index_wasm=function(){return(Module._ts_tree_cursor_end_index_wasm=Module.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_field_id_wasm=function(){return(Module._ts_tree_cursor_current_field_id_wasm=Module.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_wasm=function(){return(Module._ts_tree_cursor_current_node_wasm=Module.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},Module._ts_node_symbol_wasm=function(){return(Module._ts_node_symbol_wasm=Module.asm.ts_node_symbol_wasm).apply(null,arguments)},Module._ts_node_child_count_wasm=function(){return(Module._ts_node_child_count_wasm=Module.asm.ts_node_child_count_wasm).apply(null,arguments)},Module._ts_node_named_child_count_wasm=function(){return(Module._ts_node_named_child_count_wasm=Module.asm.ts_node_named_child_count_wasm).apply(null,arguments)},Module._ts_node_child_wasm=function(){return(Module._ts_node_child_wasm=Module.asm.ts_node_child_wasm).apply(null,arguments)},Module._ts_node_named_child_wasm=function(){return(Module._ts_node_named_child_wasm=Module.asm.ts_node_named_child_wasm).apply(null,arguments)},Module._ts_node_child_by_field_id_wasm=function(){return(Module._ts_node_child_by_field_id_wasm=Module.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},Module._ts_node_next_sibling_wasm=function(){return(Module._ts_node_next_sibling_wasm=Module.asm.ts_node_next_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_sibling_wasm=function(){return(Module._ts_node_prev_sibling_wasm=Module.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},Module._ts_node_next_named_sibling_wasm=function(){return(Module._ts_node_next_named_sibling_wasm=Module.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_named_sibling_wasm=function(){return(Module._ts_node_prev_named_sibling_wasm=Module.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},Module._ts_node_parent_wasm=function(){return(Module._ts_node_parent_wasm=Module.asm.ts_node_parent_wasm).apply(null,arguments)},Module._ts_node_descendant_for_index_wasm=function(){return(Module._ts_node_descendant_for_index_wasm=Module.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_index_wasm=function(){return(Module._ts_node_named_descendant_for_index_wasm=Module.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_descendant_for_position_wasm=function(){return(Module._ts_node_descendant_for_position_wasm=Module.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_position_wasm=function(){return(Module._ts_node_named_descendant_for_position_wasm=Module.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_start_point_wasm=function(){return(Module._ts_node_start_point_wasm=Module.asm.ts_node_start_point_wasm).apply(null,arguments)},Module._ts_node_end_point_wasm=function(){return(Module._ts_node_end_point_wasm=Module.asm.ts_node_end_point_wasm).apply(null,arguments)},Module._ts_node_start_index_wasm=function(){return(Module._ts_node_start_index_wasm=Module.asm.ts_node_start_index_wasm).apply(null,arguments)},Module._ts_node_end_index_wasm=function(){return(Module._ts_node_end_index_wasm=Module.asm.ts_node_end_index_wasm).apply(null,arguments)},Module._ts_node_to_string_wasm=function(){return(Module._ts_node_to_string_wasm=Module.asm.ts_node_to_string_wasm).apply(null,arguments)},Module._ts_node_children_wasm=function(){return(Module._ts_node_children_wasm=Module.asm.ts_node_children_wasm).apply(null,arguments)},Module._ts_node_named_children_wasm=function(){return(Module._ts_node_named_children_wasm=Module.asm.ts_node_named_children_wasm).apply(null,arguments)},Module._ts_node_descendants_of_type_wasm=function(){return(Module._ts_node_descendants_of_type_wasm=Module.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},Module._ts_node_is_named_wasm=function(){return(Module._ts_node_is_named_wasm=Module.asm.ts_node_is_named_wasm).apply(null,arguments)},Module._ts_node_has_changes_wasm=function(){return(Module._ts_node_has_changes_wasm=Module.asm.ts_node_has_changes_wasm).apply(null,arguments)},Module._ts_node_has_error_wasm=function(){return(Module._ts_node_has_error_wasm=Module.asm.ts_node_has_error_wasm).apply(null,arguments)},Module._ts_node_is_missing_wasm=function(){return(Module._ts_node_is_missing_wasm=Module.asm.ts_node_is_missing_wasm).apply(null,arguments)},Module._ts_query_matches_wasm=function(){return(Module._ts_query_matches_wasm=Module.asm.ts_query_matches_wasm).apply(null,arguments)},Module._ts_query_captures_wasm=function(){return(Module._ts_query_captures_wasm=Module.asm.ts_query_captures_wasm).apply(null,arguments)},Module.___cxa_atexit=function(){return(Module.___cxa_atexit=Module.asm.__cxa_atexit).apply(null,arguments)},Module._iswdigit=function(){return(Module._iswdigit=Module.asm.iswdigit).apply(null,arguments)},Module._iswalpha=function(){return(Module._iswalpha=Module.asm.iswalpha).apply(null,arguments)},Module._iswlower=function(){return(Module._iswlower=Module.asm.iswlower).apply(null,arguments)},Module._memchr=function(){return(Module._memchr=Module.asm.memchr).apply(null,arguments)},Module._strlen=function(){return(Module._strlen=Module.asm.strlen).apply(null,arguments)},Module._towupper=function(){return(Module._towupper=Module.asm.towupper).apply(null,arguments)};var _setThrew=Module._setThrew=function(){return(_setThrew=Module._setThrew=Module.asm.setThrew).apply(null,arguments)},stackSave=Module.stackSave=function(){return(stackSave=Module.stackSave=Module.asm.stackSave).apply(null,arguments)},stackRestore=Module.stackRestore=function(){return(stackRestore=Module.stackRestore=Module.asm.stackRestore).apply(null,arguments)},stackAlloc=Module.stackAlloc=function(){return(stackAlloc=Module.stackAlloc=Module.asm.stackAlloc).apply(null,arguments)};Module.__Znwm=function(){return(Module.__Znwm=Module.asm._Znwm).apply(null,arguments)},Module.__ZdlPv=function(){return(Module.__ZdlPv=Module.asm._ZdlPv).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw).apply(null,arguments)},Module.dynCall_jiji=function(){return(Module.dynCall_jiji=Module.asm.dynCall_jiji).apply(null,arguments)},Module._orig$ts_parser_timeout_micros=function(){return(Module._orig$ts_parser_timeout_micros=Module.asm.orig$ts_parser_timeout_micros).apply(null,arguments)},Module._orig$ts_parser_set_timeout_micros=function(){return(Module._orig$ts_parser_set_timeout_micros=Module.asm.orig$ts_parser_set_timeout_micros).apply(null,arguments)};var calledRun;function callMain(et){var tt=Module._main;if(tt){(et=et||[]).unshift(thisProgram);var nt=et.length,rt=stackAlloc(4*(nt+1)),ot=rt>>2;et.forEach(ut=>{HEAP32[ot++]=allocateUTF8OnStack(ut)}),HEAP32[ot]=0;try{var st=tt(nt,rt);return exitJS(st,!0),st}catch(ut){return handleException(ut)}}}Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,dependenciesFulfilled=function et(){calledRun||run(),calledRun||(dependenciesFulfilled=et)};var dylibsLoaded=!1;function run(et){function tt(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(et),postRun()))}et=et||arguments_,runDependencies>0||!dylibsLoaded&&(preloadDylibs(),dylibsLoaded=!0,runDependencies>0)||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),tt()},1)):tt()))}if(Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();const C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/;var VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(tt){let nt;if(tt){if(tt.constructor!==Language)throw new Error("Argument must be a Language");{nt=tt[0];const rt=C._ts_language_version(nt);if(rt<MIN_COMPATIBLE_VERSION||VERSION<rt)throw new Error(`Incompatible language version ${rt}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${VERSION}.`)}}else nt=0,tt=null;return this.language=tt,C._ts_parser_set_language(this[0],nt),this}getLanguage(){return this.language}parse(tt,nt,rt){if(typeof tt=="string")currentParseCallback=(ft,pt,ht)=>tt.slice(ft,ht);else{if(typeof tt!="function")throw new Error("Argument must be a string or a function");currentParseCallback=tt}this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let ot=0,st=0;if(rt&&rt.includedRanges){ot=rt.includedRanges.length,st=C._calloc(ot,SIZE_OF_RANGE);let ft=st;for(let pt=0;pt<ot;pt++)marshalRange(ft,rt.includedRanges[pt]),ft+=SIZE_OF_RANGE}const ut=C._ts_parser_parse_wasm(this[0],this[1],nt?nt[0]:0,st,ot);if(!ut)throw currentParseCallback=null,currentLogCallback=null,new Error("Parsing failed");const ct=new Tree(INTERNAL,ut,this.language,currentParseCallback);return currentParseCallback=null,currentLogCallback=null,ct}reset(){C._ts_parser_reset(this[0])}setTimeoutMicros(tt){C._ts_parser_set_timeout_micros(this[0],tt)}getTimeoutMicros(){return C._ts_parser_timeout_micros(this[0])}setLogger(tt){if(tt){if(typeof tt!="function")throw new Error("Logger callback must be a function")}else tt=null;return this.logCallback=tt,this}getLogger(){return this.logCallback}}class Tree{constructor(tt,nt,rt,ot){assertInternal(tt),this[0]=nt,this.language=rt,this.textCallback=ot}copy(){const tt=C._ts_tree_copy(this[0]);return new Tree(INTERNAL,tt,this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}edit(tt){marshalEdit(tt),C._ts_tree_edit_wasm(this[0])}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}getLanguage(){return this.language}walk(){return this.rootNode.walk()}getChangedRanges(tt){if(tt.constructor!==Tree)throw new TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],tt[0]);const nt=getValue(TRANSFER_BUFFER,"i32"),rt=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),ot=new Array(nt);if(nt>0){let st=rt;for(let ut=0;ut<nt;ut++)ot[ut]=unmarshalRange(st),st+=SIZE_OF_RANGE;C._free(rt)}return ot}}class Node{constructor(tt,nt){assertInternal(tt),this.tree=nt}get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get text(){return getText(this.tree,this.startIndex,this.endIndex)}isNamed(){return marshalNode(this),C._ts_node_is_named_wasm(this.tree[0])===1}hasError(){return marshalNode(this),C._ts_node_has_error_wasm(this.tree[0])===1}hasChanges(){return marshalNode(this),C._ts_node_has_changes_wasm(this.tree[0])===1}isMissing(){return marshalNode(this),C._ts_node_is_missing_wasm(this.tree[0])===1}equals(tt){return this.id===tt.id}child(tt){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],tt),unmarshalNode(this.tree)}namedChild(tt){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],tt),unmarshalNode(this.tree)}childForFieldId(tt){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],tt),unmarshalNode(this.tree)}childForFieldName(tt){const nt=this.tree.language.fields.indexOf(tt);if(nt!==-1)return this.childForFieldId(nt)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);const tt=getValue(TRANSFER_BUFFER,"i32"),nt=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=new Array(tt),tt>0){let rt=nt;for(let ot=0;ot<tt;ot++)this._children[ot]=unmarshalNode(this.tree,rt),rt+=SIZE_OF_NODE;C._free(nt)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);const tt=getValue(TRANSFER_BUFFER,"i32"),nt=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=new Array(tt),tt>0){let rt=nt;for(let ot=0;ot<tt;ot++)this._namedChildren[ot]=unmarshalNode(this.tree,rt),rt+=SIZE_OF_NODE;C._free(nt)}}return this._namedChildren}descendantsOfType(tt,nt,rt){Array.isArray(tt)||(tt=[tt]),nt||(nt=ZERO_POINT),rt||(rt=ZERO_POINT);const ot=[],st=this.tree.language.types;for(let ht=0,mt=st.length;ht<mt;ht++)tt.includes(st[ht])&&ot.push(ht);const ut=C._malloc(SIZE_OF_INT*ot.length);for(let ht=0,mt=ot.length;ht<mt;ht++)setValue(ut+ht*SIZE_OF_INT,ot[ht],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],ut,ot.length,nt.row,nt.column,rt.row,rt.column);const ct=getValue(TRANSFER_BUFFER,"i32"),ft=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),pt=new Array(ct);if(ct>0){let ht=ft;for(let mt=0;mt<ct;mt++)pt[mt]=unmarshalNode(this.tree,ht),ht+=SIZE_OF_NODE}return C._free(ft),C._free(ut),pt}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(tt,nt=tt){if(typeof tt!="number"||typeof nt!="number")throw new Error("Arguments must be numbers");marshalNode(this);let rt=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(rt,tt,"i32"),setValue(rt+SIZE_OF_INT,nt,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(tt,nt=tt){if(typeof tt!="number"||typeof nt!="number")throw new Error("Arguments must be numbers");marshalNode(this);let rt=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(rt,tt,"i32"),setValue(rt+SIZE_OF_INT,nt,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(tt,nt=tt){if(!isPoint(tt)||!isPoint(nt))throw new Error("Arguments must be {row, column} objects");marshalNode(this);let rt=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(rt,tt),marshalPoint(rt+SIZE_OF_POINT,nt),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(tt,nt=tt){if(!isPoint(tt)||!isPoint(nt))throw new Error("Arguments must be {row, column} objects");marshalNode(this);let rt=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(rt,tt),marshalPoint(rt+SIZE_OF_POINT,nt),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}toString(){marshalNode(this);const tt=C._ts_node_to_string_wasm(this.tree[0]),nt=AsciiToString(tt);return C._free(tt),nt}}class TreeCursor{constructor(tt,nt){assertInternal(tt),this.tree=nt,unmarshalTreeCursor(this)}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(tt){marshalNode(tt),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){marshalTreeCursor(this);const tt=C._ts_tree_cursor_start_index_wasm(this.tree[0]),nt=C._ts_tree_cursor_end_index_wasm(this.tree[0]);return getText(this.tree,tt,nt)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){marshalTreeCursor(this);const tt=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),tt===1}gotoNextSibling(){marshalTreeCursor(this);const tt=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),tt===1}gotoParent(){marshalTreeCursor(this);const tt=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),tt===1}}class Language{constructor(tt,nt){assertInternal(tt),this[0]=nt,this.types=new Array(C._ts_language_symbol_count(this[0]));for(let rt=0,ot=this.types.length;rt<ot;rt++)C._ts_language_symbol_type(this[0],rt)<2&&(this.types[rt]=UTF8ToString(C._ts_language_symbol_name(this[0],rt)));this.fields=new Array(C._ts_language_field_count(this[0])+1);for(let rt=0,ot=this.fields.length;rt<ot;rt++){const st=C._ts_language_field_name_for_id(this[0],rt);this.fields[rt]=st!==0?UTF8ToString(st):null}}get version(){return C._ts_language_version(this[0])}get fieldCount(){return this.fields.length-1}fieldIdForName(tt){const nt=this.fields.indexOf(tt);return nt!==-1?nt:null}fieldNameForId(tt){return this.fields[tt]||null}idForNodeType(tt,nt){const rt=lengthBytesUTF8(tt),ot=C._malloc(rt+1);stringToUTF8(tt,ot,rt+1);const st=C._ts_language_symbol_for_name(this[0],ot,rt,nt);return C._free(ot),st||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(tt){const nt=C._ts_language_symbol_name(this[0],tt);return nt?UTF8ToString(nt):null}nodeTypeIsNamed(tt){return!!C._ts_language_type_is_named_wasm(this[0],tt)}nodeTypeIsVisible(tt){return!!C._ts_language_type_is_visible_wasm(this[0],tt)}query(tt){const nt=lengthBytesUTF8(tt),rt=C._malloc(nt+1);stringToUTF8(tt,rt,nt+1);const ot=C._ts_query_new(this[0],rt,nt,TRANSFER_BUFFER,TRANSFER_BUFFER+SIZE_OF_INT);if(!ot){const Et=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),xt=UTF8ToString(rt,getValue(TRANSFER_BUFFER,"i32")).length,At=tt.substr(xt,100).split(`
`)[0];let Ct,$t=At.match(QUERY_WORD_REGEX)[0];switch(Et){case 2:Ct=new RangeError(`Bad node name '${$t}'`);break;case 3:Ct=new RangeError(`Bad field name '${$t}'`);break;case 4:Ct=new RangeError(`Bad capture name @${$t}`);break;case 5:Ct=new TypeError(`Bad pattern structure at offset ${xt}: '${At}'...`),$t="";break;default:Ct=new SyntaxError(`Bad syntax at offset ${xt}: '${At}'...`),$t=""}throw Ct.index=xt,Ct.length=$t.length,C._free(rt),Ct}const st=C._ts_query_string_count(ot),ut=C._ts_query_capture_count(ot),ct=C._ts_query_pattern_count(ot),ft=new Array(ut),pt=new Array(st);for(let Et=0;Et<ut;Et++){const xt=C._ts_query_capture_name_for_id(ot,Et,TRANSFER_BUFFER),At=getValue(TRANSFER_BUFFER,"i32");ft[Et]=UTF8ToString(xt,At)}for(let Et=0;Et<st;Et++){const xt=C._ts_query_string_value_for_id(ot,Et,TRANSFER_BUFFER),At=getValue(TRANSFER_BUFFER,"i32");pt[Et]=UTF8ToString(xt,At)}const ht=new Array(ct),mt=new Array(ct),yt=new Array(ct),vt=new Array(ct),Tt=new Array(ct);for(let Et=0;Et<ct;Et++){const xt=C._ts_query_predicates_for_pattern(ot,Et,TRANSFER_BUFFER),At=getValue(TRANSFER_BUFFER,"i32");vt[Et]=[],Tt[Et]=[];const Ct=[];let $t=xt;for(let Ot=0;Ot<At;Ot++){const Rt=getValue($t,"i32");$t+=SIZE_OF_INT;const It=getValue($t,"i32");if($t+=SIZE_OF_INT,Rt===PREDICATE_STEP_TYPE_CAPTURE)Ct.push({type:"capture",name:ft[It]});else if(Rt===PREDICATE_STEP_TYPE_STRING)Ct.push({type:"string",value:pt[It]});else if(Ct.length>0){if(Ct[0].type!=="string")throw new Error("Predicates must begin with a literal value");const kt=Ct[0].value;let Mt=!0;switch(kt){case"not-eq?":Mt=!1;case"eq?":if(Ct.length!==3)throw new Error("Wrong number of arguments to `#eq?` predicate. Expected 2, got "+(Ct.length-1));if(Ct[1].type!=="capture")throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${Ct[1].value}"`);if(Ct[2].type==="capture"){const Zt=Ct[1].name,Ut=Ct[2].name;Tt[Et].push(function(Xt){let Jt,gn;for(const An of Xt)An.name===Zt&&(Jt=An.node),An.name===Ut&&(gn=An.node);return Jt===void 0||gn===void 0||Jt.text===gn.text===Mt})}else{const Zt=Ct[1].name,Ut=Ct[2].value;Tt[Et].push(function(Xt){for(const Jt of Xt)if(Jt.name===Zt)return Jt.node.text===Ut===Mt;return!0})}break;case"not-match?":Mt=!1;case"match?":if(Ct.length!==3)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${Ct.length-1}.`);if(Ct[1].type!=="capture")throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${Ct[1].value}".`);if(Ct[2].type!=="string")throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${Ct[2].value}.`);const Ft=Ct[1].name,zt=new RegExp(Ct[2].value);Tt[Et].push(function(Zt){for(const Ut of Zt)if(Ut.name===Ft)return zt.test(Ut.node.text)===Mt;return!0});break;case"set!":if(Ct.length<2||Ct.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${Ct.length-1}.`);if(Ct.some(Zt=>Zt.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');ht[Et]||(ht[Et]={}),ht[Et][Ct[1].value]=Ct[2]?Ct[2].value:null;break;case"is?":case"is-not?":if(Ct.length<2||Ct.length>3)throw new Error(`Wrong number of arguments to \`#${kt}\` predicate. Expected 1 or 2. Got ${Ct.length-1}.`);if(Ct.some(Zt=>Zt.type!=="string"))throw new Error(`Arguments to \`#${kt}\` predicate must be a strings.".`);const Vt=kt==="is?"?mt:yt;Vt[Et]||(Vt[Et]={}),Vt[Et][Ct[1].value]=Ct[2]?Ct[2].value:null;break;default:vt[Et].push({operator:kt,operands:Ct.slice(1)})}Ct.length=0}}Object.freeze(ht[Et]),Object.freeze(mt[Et]),Object.freeze(yt[Et])}return C._free(rt),new Query(INTERNAL,ot,ft,Tt,vt,Object.freeze(ht),Object.freeze(mt),Object.freeze(yt))}static load(tt){let nt;if(tt instanceof Uint8Array)nt=Promise.resolve(tt);else{const ot=tt;if(typeof process<"u"&&process.versions&&process.versions.node){const st=require$$0$2;nt=Promise.resolve(st.readFileSync(ot))}else nt=fetch(ot).then(st=>st.arrayBuffer().then(ut=>{if(st.ok)return new Uint8Array(ut);{const ct=new TextDecoder("utf-8").decode(ut);throw new Error(`Language.load failed with status ${st.status}.

${ct}`)}}))}const rt=typeof loadSideModule=="function"?loadSideModule:loadWebAssemblyModule;return nt.then(ot=>rt(ot,{loadAsync:!0})).then(ot=>{const st=Object.keys(ot),ut=st.find(ft=>LANGUAGE_FUNCTION_REGEX.test(ft)&&!ft.includes("external_scanner_"));ut||console.log(`Couldn't find language function in WASM file. Symbols:
${JSON.stringify(st,null,2)}`);const ct=ot[ut]();return new Language(INTERNAL,ct)})}}class Query{constructor(tt,nt,rt,ot,st,ut,ct,ft){assertInternal(tt),this[0]=nt,this.captureNames=rt,this.textPredicates=ot,this.predicates=st,this.setProperties=ut,this.assertedProperties=ct,this.refutedProperties=ft,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(tt,nt,rt,ot){nt||(nt=ZERO_POINT),rt||(rt=ZERO_POINT),ot||(ot={});let st=ot.matchLimit;if(st===void 0)st=0;else if(typeof st!="number")throw new Error("Arguments must be numbers");marshalNode(tt),C._ts_query_matches_wasm(this[0],tt.tree[0],nt.row,nt.column,rt.row,rt.column,st);const ut=getValue(TRANSFER_BUFFER,"i32"),ct=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),ft=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),pt=new Array(ut);this.exceededMatchLimit=!!ft;let ht=0,mt=ct;for(let yt=0;yt<ut;yt++){const vt=getValue(mt,"i32");mt+=SIZE_OF_INT;const Tt=getValue(mt,"i32");mt+=SIZE_OF_INT;const Et=new Array(Tt);if(mt=unmarshalCaptures(this,tt.tree,mt,Et),this.textPredicates[vt].every(xt=>xt(Et))){pt[ht++]={pattern:vt,captures:Et};const xt=this.setProperties[vt];xt&&(pt[yt].setProperties=xt);const At=this.assertedProperties[vt];At&&(pt[yt].assertedProperties=At);const Ct=this.refutedProperties[vt];Ct&&(pt[yt].refutedProperties=Ct)}}return pt.length=ht,C._free(ct),pt}captures(tt,nt,rt,ot){nt||(nt=ZERO_POINT),rt||(rt=ZERO_POINT),ot||(ot={});let st=ot.matchLimit;if(st===void 0)st=0;else if(typeof st!="number")throw new Error("Arguments must be numbers");marshalNode(tt),C._ts_query_captures_wasm(this[0],tt.tree[0],nt.row,nt.column,rt.row,rt.column,st);const ut=getValue(TRANSFER_BUFFER,"i32"),ct=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),ft=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),pt=[];this.exceededMatchLimit=!!ft;const ht=[];let mt=ct;for(let yt=0;yt<ut;yt++){const vt=getValue(mt,"i32");mt+=SIZE_OF_INT;const Tt=getValue(mt,"i32");mt+=SIZE_OF_INT;const Et=getValue(mt,"i32");if(mt+=SIZE_OF_INT,ht.length=Tt,mt=unmarshalCaptures(this,tt.tree,mt,ht),this.textPredicates[vt].every(xt=>xt(ht))){const xt=ht[Et],At=this.setProperties[vt];At&&(xt.setProperties=At);const Ct=this.assertedProperties[vt];Ct&&(xt.assertedProperties=Ct);const $t=this.refutedProperties[vt];$t&&(xt.refutedProperties=$t),pt.push(xt)}}return C._free(ct),pt}predicatesForPattern(tt){return this.predicates[tt]}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(et,tt,nt){const rt=nt-tt;let ot=et.textCallback(tt,null,nt);for(tt+=ot.length;tt<nt;){const st=et.textCallback(tt,null,nt);if(!(st&&st.length>0))break;tt+=st.length,ot+=st}return tt>nt&&(ot=ot.slice(0,rt)),ot}function unmarshalCaptures(et,tt,nt,rt){for(let ot=0,st=rt.length;ot<st;ot++){const ut=getValue(nt,"i32"),ct=unmarshalNode(tt,nt+=SIZE_OF_INT);nt+=SIZE_OF_NODE,rt[ot]={name:et.captureNames[ut],node:ct}}return nt}function assertInternal(et){if(et!==INTERNAL)throw new Error("Illegal constructor")}function isPoint(et){return et&&typeof et.row=="number"&&typeof et.column=="number"}function marshalNode(et){let tt=TRANSFER_BUFFER;setValue(tt,et.id,"i32"),tt+=SIZE_OF_INT,setValue(tt,et.startIndex,"i32"),tt+=SIZE_OF_INT,setValue(tt,et.startPosition.row,"i32"),tt+=SIZE_OF_INT,setValue(tt,et.startPosition.column,"i32"),tt+=SIZE_OF_INT,setValue(tt,et[0],"i32")}function unmarshalNode(et,tt=TRANSFER_BUFFER){const nt=getValue(tt,"i32");if(nt===0)return null;const rt=getValue(tt+=SIZE_OF_INT,"i32"),ot=getValue(tt+=SIZE_OF_INT,"i32"),st=getValue(tt+=SIZE_OF_INT,"i32"),ut=getValue(tt+=SIZE_OF_INT,"i32"),ct=new Node(INTERNAL,et);return ct.id=nt,ct.startIndex=rt,ct.startPosition={row:ot,column:st},ct[0]=ut,ct}function marshalTreeCursor(et,tt=TRANSFER_BUFFER){setValue(tt+0*SIZE_OF_INT,et[0],"i32"),setValue(tt+1*SIZE_OF_INT,et[1],"i32"),setValue(tt+2*SIZE_OF_INT,et[2],"i32")}function unmarshalTreeCursor(et){et[0]=getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),et[1]=getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,"i32"),et[2]=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32")}function marshalPoint(et,tt){setValue(et,tt.row,"i32"),setValue(et+SIZE_OF_INT,tt.column,"i32")}function unmarshalPoint(et){return{row:getValue(et,"i32"),column:getValue(et+SIZE_OF_INT,"i32")}}function marshalRange(et,tt){marshalPoint(et,tt.startPosition),marshalPoint(et+=SIZE_OF_POINT,tt.endPosition),setValue(et+=SIZE_OF_POINT,tt.startIndex,"i32"),setValue(et+=SIZE_OF_INT,tt.endIndex,"i32"),et+=SIZE_OF_INT}function unmarshalRange(et){const tt={};return tt.startPosition=unmarshalPoint(et),et+=SIZE_OF_POINT,tt.endPosition=unmarshalPoint(et),et+=SIZE_OF_POINT,tt.startIndex=getValue(et,"i32"),et+=SIZE_OF_INT,tt.endIndex=getValue(et,"i32"),tt}function marshalEdit(et){let tt=TRANSFER_BUFFER;marshalPoint(tt,et.startPosition),tt+=SIZE_OF_POINT,marshalPoint(tt,et.oldEndPosition),tt+=SIZE_OF_POINT,marshalPoint(tt,et.newEndPosition),tt+=SIZE_OF_POINT,setValue(tt,et.startIndex,"i32"),tt+=SIZE_OF_INT,setValue(tt,et.oldEndIndex,"i32"),tt+=SIZE_OF_INT,setValue(tt,et.newEndIndex,"i32"),tt+=SIZE_OF_INT}for(const et of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(_Parser.prototype,et,{value:ParserImpl.prototype[et],enumerable:!1,writable:!1});_Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}}))}}return _Parser}();module.exports=TreeSitter})(treeSitter);const Parser$4=treeSitter.exports,treeSitterWasmUrl="/__frontend/assets/tree-sitter.17382e1a.wasm";var numeral$1={exports:{}};/*! @preserve
 * numeral.js
 * version : 2.0.6
 * author : Adam Draper
 * license : MIT
 * http://adamwdraper.github.com/Numeral-js/
 */(function(et){(function(tt,nt){et.exports?et.exports=nt():tt.numeral=nt()})(commonjsGlobal$1,function(){var tt,nt,rt="2.0.6",ot={},st={},ut={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},ct={currentLocale:ut.currentLocale,zeroFormat:ut.zeroFormat,nullFormat:ut.nullFormat,defaultFormat:ut.defaultFormat,scalePercentBy100:ut.scalePercentBy100};function ft(pt,ht){this._input=pt,this._value=ht}return tt=function(pt){var ht,mt,yt,vt;if(tt.isNumeral(pt))ht=pt.value();else if(pt===0||typeof pt>"u")ht=0;else if(pt===null||nt.isNaN(pt))ht=null;else if(typeof pt=="string")if(ct.zeroFormat&&pt===ct.zeroFormat)ht=0;else if(ct.nullFormat&&pt===ct.nullFormat||!pt.replace(/[^0-9]+/g,"").length)ht=null;else{for(mt in ot)if(vt=typeof ot[mt].regexps.unformat=="function"?ot[mt].regexps.unformat():ot[mt].regexps.unformat,vt&&pt.match(vt)){yt=ot[mt].unformat;break}yt=yt||tt._.stringToNumber,ht=yt(pt)}else ht=Number(pt)||null;return new ft(pt,ht)},tt.version=rt,tt.isNumeral=function(pt){return pt instanceof ft},tt._=nt={numberToFormat:function(pt,ht,mt){var yt=st[tt.options.currentLocale],vt=!1,Tt=!1,Et=0,xt="",At=1e12,Ct=1e9,$t=1e6,Ot=1e3,Rt="",It=!1,kt,Mt,Ft,zt,Vt,Zt,Ut;if(pt=pt||0,Mt=Math.abs(pt),tt._.includes(ht,"(")?(vt=!0,ht=ht.replace(/[\(|\)]/g,"")):(tt._.includes(ht,"+")||tt._.includes(ht,"-"))&&(Vt=tt._.includes(ht,"+")?ht.indexOf("+"):pt<0?ht.indexOf("-"):-1,ht=ht.replace(/[\+|\-]/g,"")),tt._.includes(ht,"a")&&(kt=ht.match(/a(k|m|b|t)?/),kt=kt?kt[1]:!1,tt._.includes(ht," a")&&(xt=" "),ht=ht.replace(new RegExp(xt+"a[kmbt]?"),""),Mt>=At&&!kt||kt==="t"?(xt+=yt.abbreviations.trillion,pt=pt/At):Mt<At&&Mt>=Ct&&!kt||kt==="b"?(xt+=yt.abbreviations.billion,pt=pt/Ct):Mt<Ct&&Mt>=$t&&!kt||kt==="m"?(xt+=yt.abbreviations.million,pt=pt/$t):(Mt<$t&&Mt>=Ot&&!kt||kt==="k")&&(xt+=yt.abbreviations.thousand,pt=pt/Ot)),tt._.includes(ht,"[.]")&&(Tt=!0,ht=ht.replace("[.]",".")),Ft=pt.toString().split(".")[0],zt=ht.split(".")[1],Zt=ht.indexOf(","),Et=(ht.split(".")[0].split(",")[0].match(/0/g)||[]).length,zt?(tt._.includes(zt,"[")?(zt=zt.replace("]",""),zt=zt.split("["),Rt=tt._.toFixed(pt,zt[0].length+zt[1].length,mt,zt[1].length)):Rt=tt._.toFixed(pt,zt.length,mt),Ft=Rt.split(".")[0],tt._.includes(Rt,".")?Rt=yt.delimiters.decimal+Rt.split(".")[1]:Rt="",Tt&&Number(Rt.slice(1))===0&&(Rt="")):Ft=tt._.toFixed(pt,0,mt),xt&&!kt&&Number(Ft)>=1e3&&xt!==yt.abbreviations.trillion)switch(Ft=String(Number(Ft)/1e3),xt){case yt.abbreviations.thousand:xt=yt.abbreviations.million;break;case yt.abbreviations.million:xt=yt.abbreviations.billion;break;case yt.abbreviations.billion:xt=yt.abbreviations.trillion;break}if(tt._.includes(Ft,"-")&&(Ft=Ft.slice(1),It=!0),Ft.length<Et)for(var Xt=Et-Ft.length;Xt>0;Xt--)Ft="0"+Ft;return Zt>-1&&(Ft=Ft.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+yt.delimiters.thousands)),ht.indexOf(".")===0&&(Ft=""),Ut=Ft+Rt+(xt||""),vt?Ut=(vt&&It?"(":"")+Ut+(vt&&It?")":""):Vt>=0?Ut=Vt===0?(It?"-":"+")+Ut:Ut+(It?"-":"+"):It&&(Ut="-"+Ut),Ut},stringToNumber:function(pt){var ht=st[ct.currentLocale],mt=pt,yt={thousand:3,million:6,billion:9,trillion:12},vt,Tt,Et;if(ct.zeroFormat&&pt===ct.zeroFormat)Tt=0;else if(ct.nullFormat&&pt===ct.nullFormat||!pt.replace(/[^0-9]+/g,"").length)Tt=null;else{Tt=1,ht.delimiters.decimal!=="."&&(pt=pt.replace(/\./g,"").replace(ht.delimiters.decimal,"."));for(vt in yt)if(Et=new RegExp("[^a-zA-Z]"+ht.abbreviations[vt]+"(?:\\)|(\\"+ht.currency.symbol+")?(?:\\))?)?$"),mt.match(Et)){Tt*=Math.pow(10,yt[vt]);break}Tt*=(pt.split("-").length+Math.min(pt.split("(").length-1,pt.split(")").length-1))%2?1:-1,pt=pt.replace(/[^0-9\.]+/g,""),Tt*=Number(pt)}return Tt},isNaN:function(pt){return typeof pt=="number"&&isNaN(pt)},includes:function(pt,ht){return pt.indexOf(ht)!==-1},insert:function(pt,ht,mt){return pt.slice(0,mt)+ht+pt.slice(mt)},reduce:function(pt,ht){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof ht!="function")throw new TypeError(ht+" is not a function");var mt=Object(pt),yt=mt.length>>>0,vt=0,Tt;if(arguments.length===3)Tt=arguments[2];else{for(;vt<yt&&!(vt in mt);)vt++;if(vt>=yt)throw new TypeError("Reduce of empty array with no initial value");Tt=mt[vt++]}for(;vt<yt;vt++)vt in mt&&(Tt=ht(Tt,mt[vt],vt,mt));return Tt},multiplier:function(pt){var ht=pt.toString().split(".");return ht.length<2?1:Math.pow(10,ht[1].length)},correctionFactor:function(){var pt=Array.prototype.slice.call(arguments);return pt.reduce(function(ht,mt){var yt=nt.multiplier(mt);return ht>yt?ht:yt},1)},toFixed:function(pt,ht,mt,yt){var vt=pt.toString().split("."),Tt=ht-(yt||0),Et,xt,At,Ct;return vt.length===2?Et=Math.min(Math.max(vt[1].length,Tt),ht):Et=Tt,At=Math.pow(10,Et),Ct=(mt(pt+"e+"+Et)/At).toFixed(Et),yt>ht-Et&&(xt=new RegExp("\\.?0{1,"+(yt-(ht-Et))+"}$"),Ct=Ct.replace(xt,"")),Ct}},tt.options=ct,tt.formats=ot,tt.locales=st,tt.locale=function(pt){return pt&&(ct.currentLocale=pt.toLowerCase()),ct.currentLocale},tt.localeData=function(pt){if(!pt)return st[ct.currentLocale];if(pt=pt.toLowerCase(),!st[pt])throw new Error("Unknown locale : "+pt);return st[pt]},tt.reset=function(){for(var pt in ut)ct[pt]=ut[pt]},tt.zeroFormat=function(pt){ct.zeroFormat=typeof pt=="string"?pt:null},tt.nullFormat=function(pt){ct.nullFormat=typeof pt=="string"?pt:null},tt.defaultFormat=function(pt){ct.defaultFormat=typeof pt=="string"?pt:"0.0"},tt.register=function(pt,ht,mt){if(ht=ht.toLowerCase(),this[pt+"s"][ht])throw new TypeError(ht+" "+pt+" already registered.");return this[pt+"s"][ht]=mt,mt},tt.validate=function(pt,ht){var mt,yt,vt,Tt,Et,xt,At,Ct;if(typeof pt!="string"&&(pt+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",pt)),pt=pt.trim(),pt.match(/^\d+$/))return!0;if(pt==="")return!1;try{At=tt.localeData(ht)}catch{At=tt.localeData(tt.locale())}return vt=At.currency.symbol,Et=At.abbreviations,mt=At.delimiters.decimal,At.delimiters.thousands==="."?yt="\\.":yt=At.delimiters.thousands,Ct=pt.match(/^[^\d]+/),Ct!==null&&(pt=pt.substr(1),Ct[0]!==vt)||(Ct=pt.match(/[^\d]+$/),Ct!==null&&(pt=pt.slice(0,-1),Ct[0]!==Et.thousand&&Ct[0]!==Et.million&&Ct[0]!==Et.billion&&Ct[0]!==Et.trillion))?!1:(xt=new RegExp(yt+"{2}"),pt.match(/[^\d.,]/g)?!1:(Tt=pt.split(mt),Tt.length>2?!1:Tt.length<2?!!Tt[0].match(/^\d+.*\d$/)&&!Tt[0].match(xt):Tt[0].length===1?!!Tt[0].match(/^\d+$/)&&!Tt[0].match(xt)&&!!Tt[1].match(/^\d+$/):!!Tt[0].match(/^\d+.*\d$/)&&!Tt[0].match(xt)&&!!Tt[1].match(/^\d+$/)))},tt.fn=ft.prototype={clone:function(){return tt(this)},format:function(pt,ht){var mt=this._value,yt=pt||ct.defaultFormat,vt,Tt,Et;if(ht=ht||Math.round,mt===0&&ct.zeroFormat!==null)Tt=ct.zeroFormat;else if(mt===null&&ct.nullFormat!==null)Tt=ct.nullFormat;else{for(vt in ot)if(yt.match(ot[vt].regexps.format)){Et=ot[vt].format;break}Et=Et||tt._.numberToFormat,Tt=Et(mt,yt,ht)}return Tt},value:function(){return this._value},input:function(){return this._input},set:function(pt){return this._value=Number(pt),this},add:function(pt){var ht=nt.correctionFactor.call(null,this._value,pt);function mt(yt,vt,Tt,Et){return yt+Math.round(ht*vt)}return this._value=nt.reduce([this._value,pt],mt,0)/ht,this},subtract:function(pt){var ht=nt.correctionFactor.call(null,this._value,pt);function mt(yt,vt,Tt,Et){return yt-Math.round(ht*vt)}return this._value=nt.reduce([pt],mt,Math.round(this._value*ht))/ht,this},multiply:function(pt){function ht(mt,yt,vt,Tt){var Et=nt.correctionFactor(mt,yt);return Math.round(mt*Et)*Math.round(yt*Et)/Math.round(Et*Et)}return this._value=nt.reduce([this._value,pt],ht,1),this},divide:function(pt){function ht(mt,yt,vt,Tt){var Et=nt.correctionFactor(mt,yt);return Math.round(mt*Et)/Math.round(yt*Et)}return this._value=nt.reduce([this._value,pt],ht),this},difference:function(pt){return Math.abs(tt(this._value).subtract(pt).value())}},tt.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(pt){var ht=pt%10;return~~(pt%100/10)===1?"th":ht===1?"st":ht===2?"nd":ht===3?"rd":"th"},currency:{symbol:"$"}}),function(){tt.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(pt,ht,mt){var yt=tt._.includes(ht," BPS")?" ":"",vt;return pt=pt*1e4,ht=ht.replace(/\s?BPS/,""),vt=tt._.numberToFormat(pt,ht,mt),tt._.includes(vt,")")?(vt=vt.split(""),vt.splice(-1,0,yt+"BPS"),vt=vt.join("")):vt=vt+yt+"BPS",vt},unformat:function(pt){return+(tt._.stringToNumber(pt)*1e-4).toFixed(15)}})}(),function(){var pt={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},ht={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},mt=pt.suffixes.concat(ht.suffixes.filter(function(vt){return pt.suffixes.indexOf(vt)<0})),yt=mt.join("|");yt="("+yt.replace("B","B(?!PS)")+")",tt.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(yt)},format:function(vt,Tt,Et){var xt,At=tt._.includes(Tt,"ib")?ht:pt,Ct=tt._.includes(Tt," b")||tt._.includes(Tt," ib")?" ":"",$t,Ot,Rt;for(Tt=Tt.replace(/\s?i?b/,""),$t=0;$t<=At.suffixes.length;$t++)if(Ot=Math.pow(At.base,$t),Rt=Math.pow(At.base,$t+1),vt===null||vt===0||vt>=Ot&&vt<Rt){Ct+=At.suffixes[$t],Ot>0&&(vt=vt/Ot);break}return xt=tt._.numberToFormat(vt,Tt,Et),xt+Ct},unformat:function(vt){var Tt=tt._.stringToNumber(vt),Et,xt;if(Tt){for(Et=pt.suffixes.length-1;Et>=0;Et--){if(tt._.includes(vt,pt.suffixes[Et])){xt=Math.pow(pt.base,Et);break}if(tt._.includes(vt,ht.suffixes[Et])){xt=Math.pow(ht.base,Et);break}}Tt*=xt||1}return Tt}})}(),function(){tt.register("format","currency",{regexps:{format:/(\$)/},format:function(pt,ht,mt){var yt=tt.locales[tt.options.currentLocale],vt={before:ht.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:ht.match(/([\+|\-|\)|\s|\$]*)$/)[0]},Tt,Et,xt;for(ht=ht.replace(/\s?\$\s?/,""),Tt=tt._.numberToFormat(pt,ht,mt),pt>=0?(vt.before=vt.before.replace(/[\-\(]/,""),vt.after=vt.after.replace(/[\-\)]/,"")):pt<0&&!tt._.includes(vt.before,"-")&&!tt._.includes(vt.before,"(")&&(vt.before="-"+vt.before),xt=0;xt<vt.before.length;xt++)switch(Et=vt.before[xt],Et){case"$":Tt=tt._.insert(Tt,yt.currency.symbol,xt);break;case" ":Tt=tt._.insert(Tt," ",xt+yt.currency.symbol.length-1);break}for(xt=vt.after.length-1;xt>=0;xt--)switch(Et=vt.after[xt],Et){case"$":Tt=xt===vt.after.length-1?Tt+yt.currency.symbol:tt._.insert(Tt,yt.currency.symbol,-(vt.after.length-(1+xt)));break;case" ":Tt=xt===vt.after.length-1?Tt+" ":tt._.insert(Tt," ",-(vt.after.length-(1+xt)+yt.currency.symbol.length-1));break}return Tt}})}(),function(){tt.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(pt,ht,mt){var yt,vt=typeof pt=="number"&&!tt._.isNaN(pt)?pt.toExponential():"0e+0",Tt=vt.split("e");return ht=ht.replace(/e[\+|\-]{1}0/,""),yt=tt._.numberToFormat(Number(Tt[0]),ht,mt),yt+"e"+Tt[1]},unformat:function(pt){var ht=tt._.includes(pt,"e+")?pt.split("e+"):pt.split("e-"),mt=Number(ht[0]),yt=Number(ht[1]);yt=tt._.includes(pt,"e-")?yt*=-1:yt;function vt(Tt,Et,xt,At){var Ct=tt._.correctionFactor(Tt,Et),$t=Tt*Ct*(Et*Ct)/(Ct*Ct);return $t}return tt._.reduce([mt,Math.pow(10,yt)],vt,1)}})}(),function(){tt.register("format","ordinal",{regexps:{format:/(o)/},format:function(pt,ht,mt){var yt=tt.locales[tt.options.currentLocale],vt,Tt=tt._.includes(ht," o")?" ":"";return ht=ht.replace(/\s?o/,""),Tt+=yt.ordinal(pt),vt=tt._.numberToFormat(pt,ht,mt),vt+Tt}})}(),function(){tt.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(pt,ht,mt){var yt=tt._.includes(ht," %")?" ":"",vt;return tt.options.scalePercentBy100&&(pt=pt*100),ht=ht.replace(/\s?\%/,""),vt=tt._.numberToFormat(pt,ht,mt),tt._.includes(vt,")")?(vt=vt.split(""),vt.splice(-1,0,yt+"%"),vt=vt.join("")):vt=vt+yt+"%",vt},unformat:function(pt){var ht=tt._.stringToNumber(pt);return tt.options.scalePercentBy100?ht*.01:ht}})}(),function(){tt.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(pt,ht,mt){var yt=Math.floor(pt/60/60),vt=Math.floor((pt-yt*60*60)/60),Tt=Math.round(pt-yt*60*60-vt*60);return yt+":"+(vt<10?"0"+vt:vt)+":"+(Tt<10?"0"+Tt:Tt)},unformat:function(pt){var ht=pt.split(":"),mt=0;return ht.length===3?(mt=mt+Number(ht[0])*60*60,mt=mt+Number(ht[1])*60,mt=mt+Number(ht[2])):ht.length===2&&(mt=mt+Number(ht[0])*60,mt=mt+Number(ht[1])),Number(mt)}})}(),tt})})(numeral$1);const numeral=numeral$1.exports,TYPE_DOC_URL="https://docs.wandb.ai/ref/weave";function urlSafeTypeId(et){return lodash$2.exports.kebabCase(et)}function docType(et,tt={}){const nt=tt?.plural??!1;let rt=et;return nt&&(rt==="W&B Entity"?rt="W&B Entities":rt+="s"),TYPES_WITH_PAGES.some(ot=>ot===et)?`[${rt}](${TYPE_DOC_URL}/${urlSafeTypeId(et)})`:`_${rt}_`}function notEmpty$1(et){return et!=null}const makeEcosystemMixedOpStore=(et,tt)=>{const nt=new BaseOpStore,rt=et.allOps(),ot=tt.allOps();for(const st in rt)rt[st]!=null&&st!=="not"&&nt.registerOp({...rt[st],supportedEngines:new Set(["ts","py"])});for(const st in ot){if(ot[st]==null||rt[st]!=null)continue;const ut=ot[st];nt.registerOp({...ut})}return nt},serverOpIsPanel=et=>outputTypeIsFunctionNode(et.output_type)?!1:isAssignableTo(et.output_type,{type:"Panel"}),serverOpReturnsType=et=>outputTypeIsFunctionNode(et.output_type)?!1:isSimpleTypeShape(et.output_type)&&et.output_type==="type",buildOpStoreFromOpList=et=>{const tt=new BaseOpStore,nt=[],rt={};for(const ot of et.data){const st={};for(const ht of Object.keys(ot.input_types))st[ht]="none";let ut=!1;(serverOpIsPanel(ot)||ot.name.endsWith("_initialize"))&&(ut=!0,nt.push(ot)),ot.refine_output_type_op_name!=null&&(rt[ot.name]=ot.refine_output_type_op_name);let ct,ft;const pt=Object.keys(ot.input_types)[0];ot.mappable?(ft={[pt]:nullableOneOrMany(ot.input_types[pt]),...lodash$2.exports.omit(ot.input_types,[pt])},ct=makeStandardOpReturnType(()=>ot.output_type)):(ft=ot.input_types,ct=ot.output_type),tt.makeOp({name:ot.name,hidden:ot.hidden||ut||serverOpReturnsType(ot),argTypes:ft,returnType:ct,description:ot.name,argDescriptions:st,returnValueDescription:ot.name,renderInfo:ot.render_info,supportedEngines:new Set(["py"])})}for(const ot in rt)if(rt[ot]!=null){const st=rt[ot],ut=tt.getOpDef(ot);ut!=null&&opDefIsLowLevel(ut)&&(ut.refineNode=async(ct,ft,pt)=>{const ht=callOpVeryUnsafe(st,ft.fromOp.inputs),mt=await pt.query(ht);return{...ct,type:mt}})}return{remoteOpStore:tt,userPanelOps:nt}},loadRemoteOpStore=et=>browser$4(et).then(tt=>tt.json()).then(buildOpStoreFromOpList).catch(tt=>(console.warn("Failed to load Ops from Remote Weave Server: ",tt),{remoteOpStore:new BaseOpStore,userPanelOps:[]})),makeBasicOpReturnType=et=>tt=>{const nt=Object.keys(tt)[0];return nullableTaggable(tt[nt].type,rt=>et({[nt]:rt,...lodash$2.exports.omit(lodash$2.exports.mapValues(tt,ot=>ot.type),[nt])},tt))},makeBasicOpResolver=(et,tt)=>(nt,rt,ot,st,ut)=>{const ct=Object.keys(nt)[0],ft=lodash$2.exports.mapValues(ot.op.inputs,ht=>ht.type);return(tt?nullableTaggableVal:nullableTaggableValAsync)(nt[ct],ht=>et({[ct]:ht,...lodash$2.exports.mapValues(lodash$2.exports.omit(nt,[ct]),getValueFromTaggedValue)},{[ct]:nullableTaggableStrip(ft[ct]),...lodash$2.exports.omit(ft,[ct])},nt,rt,ot,st,ut))},makeBasicOpResolveOutputType=et=>async(tt,nt,rt,ot)=>{const st=tt.fromOp.inputs,ut=Object.keys(st)[0];return{...tt,type:await nullableTaggableAsync(st[ut].type,ct=>et({[ut]:ct,...lodash$2.exports.omit(lodash$2.exports.mapValues(st,ft=>ft.type),[ut])},tt,nt,rt,ot))}},makeStandardOpReturnType=et=>tt=>{const nt=Object.keys(tt)[0];return mappableNullableTaggable(tt[nt].type,rt=>et({[nt]:rt,...lodash$2.exports.omit(lodash$2.exports.mapValues(tt,ot=>ot.type),[nt])},tt))},makeStandardOpResolver=(et,tt)=>(nt,rt,ot,st,ut)=>{const ct=Object.keys(nt),ft=ct[0],pt={[ft]:mappableNullableTaggableStrip(ot.op.inputs[ft].type)};for(const yt of ct.slice(1))pt[yt]=ot.op.inputs[yt].type;const ht={[ft]:null};for(const yt of ct.slice(1))ht[yt]=getValueFromTaggedValue(nt[yt]);return(tt?mappableNullableTaggableVal:mappableNullableTaggableValAsync)(nt[ft],yt=>(ht[ft]=yt,et(ht,pt,nt,rt,ot,st,ut)))},makeStandardOpResolveOutputType=et=>async(tt,nt,rt,ot)=>{const st=tt.fromOp.inputs,ut=Object.keys(st)[0];return{...tt,type:await mappableNullableTaggableAsync(st[ut].type,ct=>et({[ut]:ct,...lodash$2.exports.omit(lodash$2.exports.mapValues(st,ft=>ft.type),[ut])},tt,nt,rt,ot))}},makeConfigurableStandardOpReturnType=(et,tt)=>nt=>{const rt=Object.keys(nt)[0];return mntTypeApply(nt[rt].type,ot=>et({[rt]:ot,...lodash$2.exports.omit(lodash$2.exports.mapValues(nt,st=>st.type),[rt])},nt),tt)},makeTagConsumingStandardOpReturnType=et=>makeConfigurableStandardOpReturnType(et,{tags:!0}),makeConfigurableStandardOpResolver=(et,tt,nt)=>(rt,ot,st,ut,ct)=>{const ft=Object.keys(rt),pt=ft[0],ht={[pt]:mntTypeStrip(st.op.inputs[pt].type,tt)};for(const vt of ft.slice(1))ht[vt]=st.op.inputs[vt].type;const mt={[pt]:null};for(const vt of ft.slice(1))mt[vt]=getValueFromTaggedValue(rt[vt]);return(nt?mntValueApply:mntValueApplyAsync)(rt[pt],vt=>(mt[pt]=vt,et(mt,ht,rt,ot,st,ut,ct)),tt)},makeTagConsumingStandardOpResolver=(et,tt)=>makeConfigurableStandardOpResolver(et,{tags:!0},tt),makeConfigurableStandardOpResolveOutputType=(et,tt)=>async(nt,rt,ot,st)=>{const ut=nt.fromOp.inputs,ct=Object.keys(ut)[0];return{...nt,type:await mntTypeApplyAsync(ut[ct].type,ft=>et({[ct]:ft,...lodash$2.exports.omit(lodash$2.exports.mapValues(ut,pt=>pt.type),[ct])},nt,rt,ot,st),tt)}},makeTagConsumingStandardOpResolveOutputType=et=>makeConfigurableStandardOpResolveOutputType(et,{tags:!0}),makeBasicOp=({name:et,argTypes:tt,returnType:nt,resolver:rt,resolveOutputType:ot,hidden:st,renderInfo:ut,description:ct,argDescriptions:ft,returnValueDescription:pt,resolverIsSync:ht})=>{const mt=Object.keys(tt)[0],yt={[mt]:maybe(tt[mt]),...lodash$2.exports.omit(tt,[mt])};return makeOp({name:et,argTypes:yt,returnType:makeBasicOpReturnType(nt),resolver:makeBasicOpResolver(rt,ht),resolveOutputType:ot!=null?makeBasicOpResolveOutputType(ot):void 0,hidden:st,renderInfo:ut,kind:"basic",description:ct,argDescriptions:ft,returnValueDescription:pt})},makeBasicDimDownOp=({name:et,argTypes:tt,returnType:nt,resolver:rt,resolveOutputType:ot,hidden:st,description:ut,argDescriptions:ct,returnValueDescription:ft,resolverIsSync:pt})=>{const ht=Object.keys(tt)[0],mt={[ht]:maybe(tt[ht]),...lodash$2.exports.omit(tt,[ht])};return makeOp({name:et,argTypes:mt,returnType:makeBasicOpReturnType(nt),resolver:makeBasicOpResolver((yt,vt,Tt,Et,xt,At,Ct)=>{const $t=Object.keys(yt)[0],Ot={[$t]:yt[$t].map(It=>getValueFromTaggedValue(It)),...lodash$2.exports.omit(yt,[$t])},Rt={[$t]:mappableStrip(taggableStrip(vt[$t])),...lodash$2.exports.omit(vt,[$t])};return rt(Ot,Rt,Tt,Et,xt,At,Ct)},pt),resolveOutputType:ot!=null?makeBasicOpResolveOutputType(ot):void 0,hidden:st,kind:"basic-dim-down",description:ut,argDescriptions:ct,returnValueDescription:ft})},makeEqualOp=({name:et,argType:tt,hidden:nt})=>makeOp({name:et,renderInfo:{type:"binary",repr:"=="},argTypes:{lhs:nullableOneOrMany(tt),rhs:maybe(tt)},description:"Determines equality of two values.",argDescriptions:{lhs:"The first value to compare.",rhs:"The second value to compare."},returnValueDescription:"Whether the two values are equal.",returnType:rt=>mappableNullableTaggable(rt.lhs.type,ot=>"boolean"),resolver:({lhs:rt,rhs:ot})=>mappableTaggableVal(rt,st=>st===getValueFromTaggedValue(ot)),hidden:nt,kind:"equal"}),makeNotEqualOp=({name:et,argType:tt,hidden:nt})=>makeOp({name:et,renderInfo:{type:"binary",repr:"!="},argTypes:{lhs:nullableOneOrMany(tt),rhs:maybe(tt)},description:"Determines inequality of two values.",argDescriptions:{lhs:"The first value to compare.",rhs:"The second value to compare."},returnValueDescription:"Whether the two values are not equal.",returnType:rt=>mappableNullableTaggable(rt.lhs.type,ot=>"boolean"),resolver:({lhs:rt,rhs:ot})=>mappableTaggableVal(rt,st=>st!==getValueFromTaggedValue(ot)),hidden:nt,kind:"not-equal"}),makeStandardOp=({name:et,argTypes:tt,returnType:nt,renderInfo:rt,resolver:ot,resolveOutputType:st,hidden:ut,description:ct,argDescriptions:ft,returnValueDescription:pt,resolverIsSync:ht})=>{const mt=Object.keys(tt)[0],yt={[mt]:nullableOneOrMany(tt[mt]),...lodash$2.exports.omit(tt,[mt])};return makeOp({name:et,argTypes:yt,renderInfo:rt,returnType:makeStandardOpReturnType(nt),resolver:makeStandardOpResolver(ot,ht),resolveOutputType:st!=null?makeStandardOpResolveOutputType(st):void 0,hidden:ut,kind:"standard",description:ct,argDescriptions:ft,returnValueDescription:pt})},makeConfigurableStandardOp=({name:et,argTypes:tt,returnType:nt,renderInfo:rt,resolver:ot,resolveOutputType:st,hidden:ut,typeConfig:ct,description:ft,argDescriptions:pt,returnValueDescription:ht,resolverIsSync:mt})=>{const yt=Object.keys(tt)[0],vt={[yt]:nullableOneOrMany(tt[yt]),...lodash$2.exports.omit(tt,[yt])};return makeOp({name:et,argTypes:vt,renderInfo:rt,returnType:makeConfigurableStandardOpReturnType(nt,ct),resolver:makeConfigurableStandardOpResolver(ot,ct,mt),resolveOutputType:st!=null?makeConfigurableStandardOpResolveOutputType(st,ct):void 0,hidden:ut,kind:"standard-tag-consuming",description:ft,argDescriptions:pt,returnValueDescription:ht})},makeTagConsumingStandardOp=({name:et,argTypes:tt,returnType:nt,renderInfo:rt,resolver:ot,resolveOutputType:st,hidden:ut,description:ct,argDescriptions:ft,returnValueDescription:pt,resolverIsSync:ht})=>{const mt=Object.keys(tt)[0],yt={[mt]:nullableOneOrMany(tt[mt]),...lodash$2.exports.omit(tt,[mt])};return makeOp({name:et,argTypes:yt,renderInfo:rt,returnType:makeTagConsumingStandardOpReturnType(nt),resolver:makeTagConsumingStandardOpResolver(ot,ht),resolveOutputType:st!=null?makeTagConsumingStandardOpResolveOutputType(st):void 0,hidden:ut,kind:"standard-tag-consuming",description:ct,argDescriptions:ft,returnValueDescription:pt})},makeBinaryStandardOp=(et,tt)=>makeStandardOp({...tt,renderInfo:{type:"binary",repr:et}}),isPromise=et=>et instanceof Promise||typeof et=="object"&&et!==null&&typeof et.then=="function",makeTaggingStandardOp=({name:et,argTypes:tt,returnType:nt,resolver:rt,resolveOutputType:ot,renderInfo:st,hidden:ut,description:ct,argDescriptions:ft,returnValueDescription:pt,resolverIsSync:ht})=>{const mt=Object.keys(tt)[0],yt={[mt]:nullableOneOrMany(tt[mt]),...lodash$2.exports.omit(tt,[mt])};return makeOp({name:et,argTypes:yt,returnType:makeStandardOpReturnType((vt,Tt)=>taggedValue(typedDict(vt),nt(vt,Tt))),renderInfo:st,resolver:makeStandardOpResolver((vt,Tt,Et,xt,At,Ct,$t)=>{const Ot=rt(vt,Tt,Et,xt,At,Ct,$t);return ht||!isPromise(Ot)?concreteTaggedValue({_opName:et,...vt},Ot):Ot.then(Rt=>concreteTaggedValue({_opName:et,...vt},Rt))},ht),resolveOutputType:ot!=null?makeStandardOpResolveOutputType(async(vt,Tt,Et,xt,At)=>taggedValue(typedDict(vt),await ot(vt,Tt,Et,xt,At))):void 0,hidden:ut,kind:"standard-tag",description:ct,argDescriptions:ft,returnValueDescription:pt})},makeTagGetterOp=({name:et,tagName:tt,tagType:nt,hidden:rt,description:ot,argDescriptions:st,returnValueDescription:ut})=>makeOp({name:et,argTypes:{obj:nullableOneOrMany(taggedValue(typedDict({[tt]:nt}),"any"))},returnType:ct=>nullable$1(ct.obj.type,ft=>{let pt=null,ht=ft;if(isTaggedValueLike(ft)&&(pt=taggedValueTagType(ft),ht=taggedValueValueType(ft)),isListLike(ht)){const yt=mappableNullable(ht,Tt=>{const Et=findNamedTagInType(Tt,tt,nt);return Et!=="none"&&pt!=null?taggedValue(pt,Et):Et});if(yt.objectType!=="none")return yt}const mt=findNamedTagInType(ft,tt,nt);return mt!=="none"?mt:"none"}),resolver:ct=>nullableVal(ct.obj,ft=>{let pt=null,ht=ft;if(isConcreteTaggedValue(ft)&&(pt=ft._tag,ht=ft._value),lodash$2.exports.isArray(ht)){const yt=mappableNullableVal(ht,Tt=>{const Et=findNamedTagInVal(Tt,tt);return Et!=null&&pt!=null?concreteTaggedValue(pt,Et):Et});if(yt.some(Tt=>Tt!=null))return yt}const mt=findNamedTagInVal(ft,tt);return mt??null}),hidden:rt,kind:"tag-getter",description:ot??`Returns the first ${tt} tag of type ${nt} found in the given object.`,argDescriptions:st??{obj:"The object to get the tag value from."},returnValueDescription:ut??`The first ${tt} tag of type ${nt} found in the given object.`});function generateArrayWithUniformOnes(et,tt){if(tt>et)throw new Error("S must be less than or equal to N.");const nt=new Array(et).fill(!1);for(let rt=0;rt<tt;rt++){let ot=Math.floor(Math.random()*et);for(;nt[ot];)ot=Math.floor(Math.random()*et);nt[ot]=!0}return nt}function randomlyDownsample(et,tt){if(tt<0||!Number.isInteger(tt))throw new Error("Invalid input: n must be a non-negative integer.");if(tt>=et.length)return et;const nt=generateArrayWithUniformOnes(et.length,tt);return et.filter((rt,ot)=>nt[ot])}const opArray=makeOp({hidden:!0,name:"list",argTypes:{manyX:"invalid"},renderInfo:{type:"arrayLiteral"},description:`Creates a ${docType("list")} from a variable number of arguments`,argDescriptions:{manyX:`The values to add to the ${docType("list")}: Note: in Weave, the arguments are {[index:number]: value}`},returnValueDescription:`The ${docType("list")}`,returnType:et=>{const tt=Object.values(et);return listWithLength(tt.length,tt.length>0?union$2(tt.map(nt=>nt.type)):"unknown")},resolver:et=>Object.values(et)}),opList=opArray,opDict=makeOp({hidden:!0,name:"dict",argTypes:{manyX:"invalid"},description:`Creates a ${docType("typedDict")} from a variable number of arguments`,argDescriptions:{manyX:`The values to add to the ${docType("typedDict")}: Note: in Weave, the arguments are {[key:string]: value}`},returnValueDescription:`The ${docType("typedDict")}`,renderInfo:{type:"dictionaryLiteral"},returnType:et=>typedDict(lodash$2.exports.mapValues(et,tt=>tt.type)),resolver:et=>et}),opTimestamp=makeOp({hidden:!0,name:"timestamp",argTypes:{timestampISO:"string"},description:`Creates a ${docType("timestamp")} from a variable number of arguments`,argDescriptions:{dateISO:`An ISO date string to convert to a ${docType("timestamp")}`},returnValueDescription:`The ${docType("timestamp")}`,renderInfo:{type:"function"},returnType:et=>({type:"union",members:["none",{type:"timestamp"}]}),resolver:et=>{const nt=new Date(et.timestampISO).getTime();return isNaN(nt)?null:nt}}),makeNumbersOp=makeBasicDimDownOp,numbersArgTypes={numbers:{type:"list",objectType:{type:"union",members:["none","number"]}}};makeNumbersOp({name:"numbers-sum",argTypes:numbersArgTypes,description:`Sum of ${docType("number",{plural:!0})}`,argDescriptions:{numbers:`${docType("list")} of ${docType("number",{plural:!0})} to sum`},returnValueDescription:`Sum of ${docType("number",{plural:!0})}`,returnType:et=>"number",resolver:({numbers:et})=>lodash$2.exports.sum(et.filter(tt=>tt!=null))});makeNumbersOp({name:"numbers-avg",argTypes:numbersArgTypes,description:`Average of ${docType("number",{plural:!0})}`,argDescriptions:{numbers:`${docType("list")} of ${docType("number",{plural:!0})} to average`},returnValueDescription:`Average of ${docType("number",{plural:!0})}`,returnType:et=>"number",resolver:({numbers:et})=>{const tt=et.filter(nt=>nt!=null);return lodash$2.exports.sum(tt)/tt.length}});makeNumbersOp({name:"numbers-argmax",argTypes:numbersArgTypes,description:`Finds the index of maximum ${docType("number")}`,argDescriptions:{numbers:`${docType("list")} of ${docType("number",{plural:!0})} to find the index of maximum ${docType("number")}`},returnValueDescription:`Index of maximum ${docType("number")}`,returnType:et=>"number",resolver:({numbers:et})=>lodash$2.exports.indexOf(et,lodash$2.exports.max(et))});makeNumbersOp({name:"numbers-argmin",argTypes:numbersArgTypes,description:`Finds the index of minimum ${docType("number")}`,argDescriptions:{numbers:`${docType("list")} of ${docType("number",{plural:!0})} to find the index of minimum ${docType("number")}`},returnValueDescription:`Index of minimum ${docType("number")}`,returnType:et=>"number",resolver:({numbers:et})=>lodash$2.exports.indexOf(et,lodash$2.exports.min(et))});makeNumbersOp({name:"numbers-stddev",argTypes:numbersArgTypes,description:`Standard deviation of ${docType("number",{plural:!0})}`,argDescriptions:{numbers:`${docType("list")} of ${docType("number",{plural:!0})} to calculate the standard deviation`},returnValueDescription:`Standard deviation of ${docType("number",{plural:!0})}`,returnType:et=>"number",resolver:({numbers:et})=>{const tt=et.filter(notEmpty$1),nt=lodash$2.exports.sum(tt)/tt.length;return Math.sqrt(lodash$2.exports.sum(tt.map(rt=>(rt-nt)*(rt-nt)))/tt.length)}});const opNumbersMin=makeNumbersOp({name:"numbers-min",argTypes:numbersArgTypes,description:"Minimum number",argDescriptions:{numbers:`${docType("list")} of ${docType("number",{plural:!0})} to find the minimum ${docType("number")}`},returnValueDescription:`Minimum ${docType("number")}`,returnType:et=>"number",resolver:({numbers:et})=>lodash$2.exports.min(et.filter(tt=>tt!=null))}),opNumbersMax=makeNumbersOp({name:"numbers-max",argTypes:numbersArgTypes,description:"Maximum number",argDescriptions:{numbers:`${docType("list")} of ${docType("number",{plural:!0})} to find the maximum ${docType("number")}`},returnValueDescription:`Maximum ${docType("number")}`,returnType:et=>"number",resolver:({numbers:et})=>lodash$2.exports.max(et.filter(tt=>tt!=null))}),makeNumberOp=makeBinaryStandardOp,numberArgTypes={lhs:"number",rhs:{type:"union",members:["none","number"]}},opNumberAdd=makeNumberOp("+",{name:"number-add",argTypes:numberArgTypes,description:`Add two ${docType("number",{plural:!0})}`,argDescriptions:{lhs:`First ${docType("number")}`,rhs:`Second ${docType("number")}`},returnValueDescription:`Sum of two ${docType("number",{plural:!0})}`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:et+tt});makeNumberOp("-",{name:"number-sub",argTypes:numberArgTypes,description:`Subtract a ${docType("number")} from another`,argDescriptions:{lhs:`${docType("number")} to subtract from`,rhs:`${docType("number")} to subtract`},returnValueDescription:`Difference of two ${docType("number",{plural:!0})}`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:et-tt});const opNumberMult=makeNumberOp("*",{name:"number-mult",argTypes:numberArgTypes,description:`Multiply two ${docType("number",{plural:!0})}`,argDescriptions:{lhs:`First ${docType("number")}`,rhs:`Second ${docType("number")}`},returnValueDescription:`Product of two ${docType("number",{plural:!0})}`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:et*tt}),opNumberDiv=makeNumberOp("/",{name:"number-div",argTypes:numberArgTypes,description:`Divide a ${docType("number")} by another`,argDescriptions:{lhs:`${docType("number")} to divide`,rhs:`${docType("number")} to divide by`},returnValueDescription:`Quotient of two ${docType("number",{plural:!0})}`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:et/tt});makeNumberOp("//",{name:"number-floorDiv",argTypes:numberArgTypes,description:`Divide a ${docType("number")} by another then rounds down to the nearest whole number`,argDescriptions:{lhs:`${docType("number")} to divide`,rhs:`${docType("number")} to divide by`},returnValueDescription:`Truncated quotient of two ${docType("number",{plural:!0})}`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:Math.floor(et/tt)});makeNumberOp("%",{name:"number-modulo",argTypes:numberArgTypes,description:`Divide a ${docType("number")} by another and return remainder`,argDescriptions:{lhs:`${docType("number")} to divide`,rhs:`${docType("number")} to divide by`},returnValueDescription:`Modulo of two ${docType("number",{plural:!0})}`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:et%tt});makeNumberOp("**",{name:"number-powBinary",argTypes:numberArgTypes,description:`Raise a ${docType("number")} to an exponent`,argDescriptions:{lhs:`Base ${docType("number")}`,rhs:`Exponent ${docType("number")}`},returnValueDescription:`The base ${docType("number",{plural:!0})} raised to nth power`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:Math.pow(et,tt)});makeStandardOp({hidden:!0,name:"number-pow",argTypes:numberArgTypes,description:`Raise a base ${docType("number")} by an exponent ${docType("number")}`,argDescriptions:{base:`Base ${docType("number")}`,exp:`Exponent ${docType("number")}`},renderInfo:{type:"function"},returnValueDescription:`The base ${docType("number",{plural:!0})} raised to nth power`,returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:Math.pow(et,tt)});const opNumberEqual=makeEqualOp({name:"number-equal",argType:"number"}),opNumberNotEqual=makeNotEqualOp({name:"number-notEqual",argType:"number"});makeNumberOp("<",{name:"number-less",argTypes:numberArgTypes,description:`Check if a ${docType("number")} is less than another`,argDescriptions:{lhs:`${docType("number")} to compare`,rhs:`${docType("number")} to compare to`},returnValueDescription:`Whether the first ${docType("number")} is less than the second`,returnType:et=>nullableSkipTaggable(et.rhs,tt=>"boolean"),resolver:({lhs:et,rhs:tt})=>tt==null?null:et<tt});makeNumberOp(">",{name:"number-greater",argTypes:numberArgTypes,description:`Check if a ${docType("number")} is greater than another`,argDescriptions:{lhs:`${docType("number")} to compare`,rhs:`${docType("number")} to compare to`},returnValueDescription:`Whether the first ${docType("number")} is greater than the second`,returnType:et=>nullableSkipTaggable(et.rhs,tt=>"boolean"),resolver:({lhs:et,rhs:tt})=>tt==null?null:et>tt});const opNumberLessEqual=makeNumberOp("<=",{name:"number-lessEqual",argTypes:numberArgTypes,description:`Check if a ${docType("number")} is less than or equal to another`,argDescriptions:{lhs:`${docType("number")} to compare`,rhs:`${docType("number")} to compare to`},returnValueDescription:`Whether the first ${docType("number")} is less than or equal to the second`,returnType:et=>nullableSkipTaggable(et.rhs,tt=>"boolean"),resolver:({lhs:et,rhs:tt})=>tt==null?null:et<=tt}),opNumberGreaterEqual=makeNumberOp(">=",{name:"number-greaterEqual",argTypes:numberArgTypes,description:`Check if a ${docType("number")} is greater than or equal to another`,argDescriptions:{lhs:`${docType("number")} to compare`,rhs:`${docType("number")} to compare to`},returnValueDescription:`Whether the first ${docType("number")} is greater than or equal to the second`,returnType:et=>nullableSkipTaggable(et.rhs,tt=>"boolean"),resolver:({lhs:et,rhs:tt})=>tt==null?null:et>=tt}),opNumberFloor=makeStandardOp({hidden:!0,name:"number-floor",argTypes:{in:"number"},description:`Round a ${docType("number")} down to the nearest integer`,argDescriptions:{in:`${docType("number")} to round`},returnValueDescription:`Rounded ${docType("number")}`,returnType:et=>"number",resolver:et=>Math.floor(et.in)});makeStandardOp({hidden:!0,name:"number-roundthousand",argTypes:{in:"number"},description:`Round a ${docType("number")} to the nearest thousand`,argDescriptions:{in:`${docType("number")} to round`},returnValueDescription:`Rounded ${docType("number")}`,returnType:et=>"number",resolver:et=>Math.round(et.in/1e3)*1e3});makeStandardOp({hidden:!0,name:"number-roundHundredth",argTypes:{in:"number"},description:"Round a number to the nearest hundredth",argDescriptions:{in:"Number to round"},returnValueDescription:"Rounded number",returnType:et=>"number",resolver:et=>Math.round(et.in*100)/100});makeStandardOp({hidden:!0,name:"number-roundtenth",argTypes:{in:"number"},description:`Round a ${docType("number")} to the nearest tenth`,argDescriptions:{in:`${docType("number")} to round`},returnValueDescription:`Rounded ${docType("number")}`,returnType:et=>"number",resolver:et=>Math.round(et.in*10)/10});makeStandardOp({hidden:!0,name:"number-toFixed",argTypes:{in:"number",digits:"number"},description:`Round a ${docType("number")} to a fixed ${docType("number")} of digits`,argDescriptions:{in:`${docType("number")} to round`,digits:`${docType("number")} of digits to round to`},returnValueDescription:`Rounded ${docType("number")}`,returnType:et=>"number",resolver:et=>Number(et.in.toFixed(et.digits))});makeStandardOp({name:"number-toString",argTypes:{in:"number"},description:`Convert a ${docType("number")} to a string`,argDescriptions:{in:"Number to convert"},returnValueDescription:`String representation of the ${docType("number")}`,returnType:et=>"string",resolver:et=>String(et.in)});makeStandardOp({hidden:!0,name:"number-toByteString",argTypes:{in:"number"},description:`Convert a ${docType("number")} to a byte string`,argDescriptions:{in:"Number to convert"},returnValueDescription:`String representation of the ${docType("number")} interpreted as bytes.`,returnType:et=>"string",resolver:et=>String(numeral(et.in).format("0.00b"))});const opNumberBinsFixed=makeStandardOp({hidden:!0,name:"root_number-binsfixed",renderInfo:{type:"function"},argTypes:{step:"number"},description:"",argDescriptions:{step:""},returnValueDescription:"",returnType:et=>({type:"function",inputTypes:{row:maybe("number")},outputType:numberBin}),resolver:et=>{const tt=1/et.step;return opDict({start:opNumberDiv({lhs:opNumberFloor({in:opNumberMult({lhs:varNode("number","row"),rhs:constNumber(tt)})}),rhs:constNumber(tt)}),stop:opNumberAdd({lhs:opNumberDiv({lhs:opNumberFloor({in:opNumberMult({lhs:varNode("number","row"),rhs:constNumber(tt)})}),rhs:constNumber(tt)}),rhs:constNumber(et.step)})})}}),opNumbersBinEqual=makeBasicOp({hidden:!0,name:"numbers-binsequal",argTypes:{arr:{type:"list",objectType:{type:"union",members:["none","number"]}},bins:"number"},description:"",argDescriptions:{arr:"",bins:""},returnValueDescription:"",returnType:et=>({type:"function",inputTypes:{row:"number"},outputType:numberBin}),resolver:async(et,tt,nt,rt,ot,st,ut)=>{const ct=et.bins,ft=lodash$2.exports.min(et.arr)??0,ht=((lodash$2.exports.max(et.arr)??0)-ft)/ct,mt=opNumberBinsFixed({step:constNumber(ht)});return(await ut().executeNodes([mt],!0))[0]}}),opNumberBin=makeStandardOp({hidden:!0,name:"number-bin",argTypes:{in:maybe("number"),binFn:{type:"function",inputTypes:{row:"number"},outputType:numberBin}},description:"",argDescriptions:{in:"",binFn:""},returnValueDescription:"",returnType:et=>numberBin,resolver:async(et,tt,nt,rt,ot,st,ut)=>{const ct=getValueFromTaggedValue(et.in),ft=et.binFn,pt={...st.frame,row:constNumber(ct)},ht=callFunction(ft,pt);return(await ut().executeNodes([ht],!0))[0]}});makeStandardOp({hidden:!0,name:"root_number-range",argTypes:{stop:"number"},description:`Create a range of ${docType("number",{plural:!0})} from 0 to stop`,argDescriptions:{stop:"Max value"},returnValueDescription:`Range of ${docType("number",{plural:!0})} from 0 to stop`,returnType:et=>list$1("number"),resolver:et=>lodash$2.exports.range(0,et.stop)});makeStandardOp({name:"number-abs",renderInfo:{type:"function"},argTypes:{n:"number"},description:`Calculates the absolute value of a ${docType("number")}`,argDescriptions:{n:`A ${docType("number")}`},returnValueDescription:`The absolute value of the ${docType("number")}`,returnType:et=>"number",resolver:({n:et})=>Math.abs(et)});makeStandardOp({name:"number-sin",renderInfo:{type:"function"},argTypes:{n:"number"},description:`Calculates the sine of a ${docType("number")} in radians`,argDescriptions:{n:"Radians to calculate the sine of"},returnValueDescription:`Sine of the ${docType("number")}`,returnType:et=>"number",resolver:({n:et})=>Math.sin(et)});makeStandardOp({name:"number-cos",renderInfo:{type:"function"},argTypes:{n:"number"},description:`Calculates the cosine of a ${docType("number")} in radians`,argDescriptions:{n:"Radians to calculate the cosine of"},returnValueDescription:`Sine of the ${docType("number")}`,returnType:et=>"number",resolver:({n:et})=>Math.cos(et)});const timestampSecondUpperBound=60*60*24*365*1e3,timestampMilliSecondUpperBound=timestampSecondUpperBound*1e3,timestampMicroSecondUpperBound=timestampMilliSecondUpperBound*1e3,timestampNanoSecondUpperBound=timestampMicroSecondUpperBound*1e3,opNumberToTimestamp=makeStandardOp({name:"number-toTimestamp",argTypes:{val:"number"},description:`Converts a ${docType("number")} to a ${docType("timestamp")}. Values less than ${timestampSecondUpperBound} will be converted to seconds, values less than ${timestampMilliSecondUpperBound} will be converted to milliseconds, values less than ${timestampMicroSecondUpperBound} will be converted to microseconds, and values less than ${timestampNanoSecondUpperBound} will be converted to nanoseconds.`,argDescriptions:{val:"Number to convert to a timestamp"},returnValueDescription:"Timestamp",returnType:et=>({type:"timestamp",unit:"ms"}),resolver:({val:et})=>et<timestampSecondUpperBound?Math.floor(et*1e3):et<timestampMilliSecondUpperBound?Math.floor(et):et<timestampMicroSecondUpperBound?Math.floor(et/1e3):et<timestampNanoSecondUpperBound?Math.floor(et/1e3/1e3):null}),opNumberNegate=makeStandardOp({name:"number-negate",argTypes:{val:"number"},renderInfo:{type:"unary",repr:"-"},description:`Negate a ${docType("number")}`,argDescriptions:{val:"Number to negate"},returnValueDescription:`A ${docType("number")}`,returnType:et=>"number",resolver:({val:et})=>et*-1});makeStandardOp({hidden:!0,name:"throwError",argTypes:{obj:"any"},description:"Throw an error",argDescriptions:{obj:"any"},returnValueDescription:"Returns nothing; always throws an error",returnType:et=>"string",resolver:et=>{throw new Error("Weave Error")}});var jsLevenshtein=function(){function et(tt,nt,rt,ot,st){return tt<nt||rt<nt?tt>rt?rt+1:tt+1:ot===st?nt:nt+1}return function(tt,nt){if(tt===nt)return 0;if(tt.length>nt.length){var rt=tt;tt=nt,nt=rt}for(var ot=tt.length,st=nt.length;ot>0&&tt.charCodeAt(ot-1)===nt.charCodeAt(st-1);)ot--,st--;for(var ut=0;ut<ot&&tt.charCodeAt(ut)===nt.charCodeAt(ut);)ut++;if(ot-=ut,st-=ut,ot===0||st<3)return st;var ct=0,ft,pt,ht,mt,yt,vt,Tt,Et,xt,At,Ct,$t,Ot=[];for(ft=0;ft<ot;ft++)Ot.push(ft+1),Ot.push(tt.charCodeAt(ut+ft));for(var Rt=Ot.length-1;ct<st-3;)for(xt=nt.charCodeAt(ut+(pt=ct)),At=nt.charCodeAt(ut+(ht=ct+1)),Ct=nt.charCodeAt(ut+(mt=ct+2)),$t=nt.charCodeAt(ut+(yt=ct+3)),vt=ct+=4,ft=0;ft<Rt;ft+=2)Tt=Ot[ft],Et=Ot[ft+1],pt=et(Tt,pt,ht,xt,Et),ht=et(pt,ht,mt,At,Et),mt=et(ht,mt,yt,Ct,Et),vt=et(mt,yt,vt,$t,Et),Ot[ft]=vt,yt=mt,mt=ht,ht=pt,pt=Tt;for(;ct<st;)for(xt=nt.charCodeAt(ut+(pt=ct)),vt=++ct,ft=0;ft<Rt;ft+=2)Tt=Ot[ft],Ot[ft]=vt=et(Tt,pt,vt,xt,Ot[ft+1]),pt=Tt;return vt}}();const opStringEqual=makeEqualOp({name:"string-equal",argType:"string"}),opStringNotEqual=makeNotEqualOp({name:"string-notEqual",argType:"string"}),makeStringOp=makeStandardOp;makeStringOp({hidden:!0,name:"string-in",argTypes:{lhs:{type:"union",members:["none","string"]},rhs:{type:"union",members:["none",{type:"list",objectType:"string"}]}},description:`Checks if a ${docType("string")} is in a ${docType("list")} of ${docType("string",{plural:!0})}`,argDescriptions:{lhs:`The ${docType("string")} to check`,rhs:`The ${docType("list")} of ${docType("string",{plural:!0})} to check against`},returnValueDescription:`Whether the ${docType("string")} is in the ${docType("list")}`,returnType:et=>nullableSkipTaggable(et.rhs,tt=>"boolean"),resolver:({lhs:et,rhs:tt})=>tt==null?!1:tt.includes(et??"")});makeStringOp({name:"string-len",argTypes:{str:{type:"union",members:["none","string"]}},description:`Returns the length of a ${docType("string")}`,argDescriptions:{str:`The ${docType("string")} to check`},returnValueDescription:`The length of the ${docType("string")}`,returnType:et=>"number",resolver:({str:et})=>[...et??""].length});const opStringAdd=makeBinaryStandardOp("+",{name:"string-add",argTypes:{lhs:{type:"union",members:["none","string"]},rhs:{type:"union",members:["none","string"]}},description:`Concatenates two ${docType("string",{plural:!0})}`,argDescriptions:{lhs:`The first ${docType("string")}`,rhs:`The second ${docType("string")}`},returnValueDescription:`The concatenated ${docType("string")}`,returnType:et=>"string",resolver:({lhs:et,rhs:tt})=>""+(et??"")+(tt??"")});makeStringOp({name:"string-append",argTypes:{str:{type:"union",members:["none","string"]},suffix:{type:"union",members:["none","string"]}},description:`Appends a suffix to a ${docType("string")}`,argDescriptions:{str:`The ${docType("string")} to append to`,suffix:"The suffix to append"},returnValueDescription:`The ${docType("string")} with the suffix appended`,returnType:et=>"string",resolver:({str:et,suffix:tt})=>(et??"")+(tt??"")});makeStringOp({name:"string-prepend",argTypes:{str:{type:"union",members:["none","string"]},prefix:{type:"union",members:["none","string"]}},description:`Prepends a prefix to a ${docType("string")}`,argDescriptions:{str:`The ${docType("string")} to prepend to`,prefix:"The prefix to prepend"},returnValueDescription:`The ${docType("string")} with the prefix prepended`,returnType:et=>"string",resolver:({str:et,prefix:tt})=>""+(tt??"")+(et??"")});makeStringOp({name:"string-split",argTypes:{str:{type:"union",members:["none","string"]},sep:{type:"union",members:["none","string"]}},description:`Splits a ${docType("string")} into a ${docType("list")} of ${docType("string",{plural:!0})}`,argDescriptions:{str:`The ${docType("string")} to split`,sep:"The separator to split on"},returnValueDescription:`The ${docType("list")} of ${docType("string",{plural:!0})}`,returnType:et=>({type:"list",objectType:"string"}),resolver:({str:et,sep:tt})=>et?.split(tt??"")??[]});makeStringOp({name:"string-partition",argTypes:{str:{type:"union",members:["none","string"]},sep:{type:"union",members:["none","string"]}},description:`Partitions a ${docType("string")} into a ${docType("list")} of the ${docType("string",{plural:!0})}`,argDescriptions:{str:`The ${docType("string")} to split`,sep:"The separator to split on"},returnValueDescription:`A ${docType("list")} of ${docType("string",{plural:!0})}: the ${docType("string")} before the separator, the separator, and the ${docType("string")} after the separator`,returnType:et=>({type:"list",objectType:"string"}),resolver:({str:et,sep:tt})=>{let nt;const rt=et?.split(tt??"")??[];return rt.length===1&&(nt=[rt[0],null,null]),nt=[rt[0],tt,rt.slice(1).join(tt??"")],nt}});makeStringOp({name:"string-startsWith",argTypes:{str:{type:"union",members:["none","string"]},prefix:{type:"union",members:["none","string"]}},description:`Checks if a ${docType("string")} starts with a prefix`,argDescriptions:{str:`The ${docType("string")} to check`,prefix:"The prefix to check for"},returnValueDescription:`Whether the ${docType("string")} starts with the prefix`,returnType:et=>"boolean",resolver:({str:et,prefix:tt})=>tt?et?.startsWith(tt)??!1:!0});makeStringOp({name:"string-endsWith",argTypes:{str:{type:"union",members:["none","string"]},suffix:{type:"union",members:["none","string"]}},description:`Checks if a ${docType("string")} ends with a suffix`,argDescriptions:{str:`The ${docType("string")} to check`,suffix:"The suffix to check for"},returnValueDescription:`Whether the ${docType("string")} ends with the suffix`,returnType:et=>"boolean",resolver:({str:et,suffix:tt})=>tt?et?.endsWith(tt)??!1:!0});makeStringOp({name:"string-isAlpha",argTypes:{str:{type:"union",members:["none","string"]}},description:`Checks if a ${docType("string")} is alphabetic`,argDescriptions:{str:`The ${docType("string")} to check`},returnValueDescription:`Whether the ${docType("string")} is alphabetic`,returnType:et=>"boolean",resolver:({str:et})=>et?.match(/^[a-z]+$/i)!==null});makeStringOp({name:"string-isNumeric",argTypes:{str:{type:"union",members:["none","string"]}},description:`Checks if a ${docType("string")} is numeric`,argDescriptions:{str:`The ${docType("string")} to check`},returnValueDescription:`Whether the ${docType("string")} is numeric`,returnType:et=>"boolean",resolver:({str:et})=>(et?.length??0)>0&&et?.match(/^-?\d*(\.\d+)?$/i)!==null});makeStringOp({name:"string-isAlnum",argTypes:{str:{type:"union",members:["none","string"]}},description:`Checks if a ${docType("string")} is alphanumeric`,argDescriptions:{str:`The ${docType("string")} to check`},returnValueDescription:`Whether the ${docType("string")} is alphanumeric`,returnType:et=>"boolean",resolver:({str:et})=>et?.match(/^[a-z0-9]+$/i)!==null});makeStringOp({name:"string-lower",argTypes:{str:{type:"union",members:["none","string"]}},description:`Converts a ${docType("string")} to lowercase`,argDescriptions:{str:`The ${docType("string")} to convert to lowercase`},returnValueDescription:`The lowercase ${docType("string")}`,returnType:et=>"string",resolver:({str:et})=>et?.toLocaleLowerCase()??""});makeStringOp({name:"string-upper",argTypes:{str:{type:"union",members:["none","string"]}},description:`Converts a ${docType("string")} to uppercase`,argDescriptions:{str:`The ${docType("string")} to convert to uppercase`},returnValueDescription:`The uppercase ${docType("string")}`,returnType:et=>"string",resolver:({str:et})=>et?.toLocaleUpperCase()??""});makeStringOp({name:"string-slice",argTypes:{str:{type:"union",members:["none","string"]},begin:{type:"union",members:["none","number"]},end:{type:"union",members:["none","number"]}},description:`Slices a ${docType("string")} into a substring based on beginning and end indices`,argDescriptions:{str:`The ${docType("string")} to slice`,begin:"The beginning index of the substring",end:"The ending index of the substring"},returnValueDescription:"The substring",returnType:et=>"string",resolver:({str:et,begin:tt,end:nt})=>tt==null&&nt!=null?et?.slice(0,nt)??"":et?.slice(tt??void 0,nt??void 0)??""});makeStringOp({name:"string-replace",argTypes:{str:{type:"union",members:["none","string"]},sub:{type:"union",members:["none","string"]},newSub:{type:"union",members:["none","string"]}},description:`Replaces all occurrences of a substring in a ${docType("string")}`,argDescriptions:{str:`The ${docType("string")} to replace contents of`,sub:"The substring to replace",newSub:"The substring to replace the old substring with"},returnValueDescription:`The ${docType("string")} with the replacements`,returnType:et=>"string",resolver:({str:et,sub:tt,newSub:nt})=>et?.replace(new RegExp(tt??"","g"),nt??"")});makeStringOp({name:"string-findAll",argTypes:{str:{type:"union",members:["none","string"]},sub:{type:"union",members:["none","string"]}},description:`Finds all occurrences of a substring in a ${docType("string")}`,argDescriptions:{str:`The ${docType("string")} to find occurrences of the substring in`,sub:"The substring to find"},returnValueDescription:`The ${docType("list")} of indices of the substring in the ${docType("string")}`,returnType:et=>({type:"list",objectType:"string"}),resolver:({str:et,sub:tt})=>Array.from(et?.match(new RegExp(tt??"","g"))||[])});makeStringOp({name:"string-contains",argTypes:{str:{type:"union",members:["none","string"]},sub:{type:"union",members:["none","string"]}},description:`Checks if a ${docType("string")} contains a substring`,argDescriptions:{str:`The ${docType("string")} to check`,sub:"The substring to check for"},returnValueDescription:`Whether the ${docType("string")} contains the substring`,returnType:et=>"boolean",resolver:({str:et,sub:tt})=>et?.match(new RegExp(tt??"","g"))!=null});makeStringOp({name:"string-strip",argTypes:{str:{type:"union",members:["none","string"]}},description:`Strip whitespace from both ends of a ${docType("string")}.`,argDescriptions:{str:`The ${docType("string")} to strip.`},returnValueDescription:`The stripped ${docType("string")}.`,returnType:et=>"string",resolver:({str:et})=>et?.trim()??""});makeStringOp({name:"string-lStrip",argTypes:{str:{type:"union",members:["none","string"]}},description:"Strip leading whitespace",argDescriptions:{str:`The ${docType("string")} to strip.`},returnValueDescription:`The stripped ${docType("string")}.`,returnType:et=>"string",resolver:({str:et})=>et?.trimStart()??""});makeStringOp({name:"string-rStrip",argTypes:{str:{type:"union",members:["none","string"]}},description:"Strip trailing whitespace",argDescriptions:{str:`The ${docType("string")} to strip.`},returnValueDescription:`The stripped ${docType("string")}.`,returnType:et=>"string",resolver:({str:et})=>et?.trimEnd()??""});makeStringOp({name:"string-levenshtein",renderInfo:{type:"function"},argTypes:{str1:{type:"union",members:["none","string"]},str2:{type:"union",members:["none","string"]}},description:`Calculates the Levenshtein distance between two ${docType("string",{plural:!0})}.`,argDescriptions:{str1:`The first ${docType("string")}.`,str2:`The second ${docType("string")}.`},returnValueDescription:`The Levenshtein distance between the two ${docType("string",{plural:!0})}.`,returnType:et=>"number",resolver:({str1:et,str2:tt})=>jsLevenshtein(et??"",tt??"")});const makeDateOp=makeStandardOp,makeDimDownDateOp=makeBasicDimDownOp;makeDateOp({hidden:!0,name:"date-sub",argTypes:{lhs:list$1("date"),rhs:list$1("date")},renderInfo:{type:"binary",repr:"-"},description:`Returns the difference between two ${docType("date",{plural:!0})} in milliseconds`,argDescriptions:{lhs:`First ${docType("date")}`,rhs:`Second ${docType("date")}`},returnValueDescription:`The difference between the two ${docType("date",{plural:!0})} in milliseconds`,returnType:et=>list$1("number"),resolver:et=>et.lhs.map((tt,nt)=>tt.getTime()-et.rhs[nt].getTime())});const opDateToNumber=makeDateOp({hidden:!0,name:"date-toNumber",argTypes:{date:"date"},description:"Returns the number of milliseconds since the epoch",argDescriptions:{date:"The date"},returnValueDescription:"The number of milliseconds since the epoch",returnType:et=>"number",resolver:et=>{const{date:tt}=et;return hooks(tt).unix()}});makeDimDownDateOp({hidden:!0,name:"dates-max",argTypes:{dates:{type:"union",members:[{type:"list",objectType:{type:"union",members:["none","date"]}},{type:"list",objectType:{type:"union",members:["none",{type:"timestamp"}]}}]}},description:`Returns the earliest ${docType("date")}`,argDescriptions:{dates:"The list of dates"},returnValueDescription:`The earliest ${docType("date")}`,returnType:et=>{const tt=listObjectType(et.dates);return nonNullable(tt)==="date"?maybe("date"):maybe({type:"timestamp"})},resolver:et=>et.dates.reduce((nt,rt)=>nt>rt?nt:rt)});makeDimDownDateOp({hidden:!0,name:"dates-min",argTypes:{dates:{type:"union",members:[{type:"list",objectType:{type:"union",members:["none","date"]}},{type:"list",objectType:{type:"union",members:["none",{type:"timestamp"}]}}]}},description:`Returns the earliest ${docType("date")}`,argDescriptions:{dates:"The list of dates"},returnValueDescription:`The earliest ${docType("date")}`,returnType:et=>{const tt=listObjectType(et.dates);return nonNullable(tt)==="date"?maybe("date"):maybe({type:"timestamp"})},resolver:et=>et.dates.reduce((nt,rt)=>nt<rt?nt:rt)});makeDateOp({hidden:!0,name:"dates-equal",argTypes:{lhs:"date",rhs:"date"},description:`Returns whether two ${docType("date")}s are equal`,argDescriptions:{lhs:"First date",rhs:"Second date"},returnValueDescription:`Whether the two ${docType("date")}s are equal`,returnType:et=>"boolean",resolver:et=>{const{lhs:tt,rhs:nt}=et;return tt.getTime()===nt.getTime()}});const dateRounder=et=>makeDateOp({hidden:!0,name:`date_round-${et}`,argTypes:{date:"date"},description:`Returns the ${docType("date")} rounded to the nearest ${et}`,argDescriptions:{date:`The ${docType("date")}`},returnValueDescription:`The ${docType("date")} rounded to the nearest ${et}`,returnType:tt=>"date",resolver:tt=>{const{date:nt}=tt;return typeof nt=="number"?hooks.unix(nt).startOf(et).toDate():hooks(nt).startOf(et).toDate()}});dateRounder("year");dateRounder("quarter");dateRounder("month");dateRounder("week");dateRounder("day");dateRounder("hour");dateRounder("minute");const makeBooleanOp=makeStandardOp,booleanArgTypes={lhs:"boolean",rhs:{type:"union",members:["none","boolean"]}},opAnd=makeBooleanOp({name:"and",argTypes:booleanArgTypes,renderInfo:{type:"binary",repr:"and"},description:"Returns the logical `and` of the two values",argDescriptions:{lhs:"First binary value",rhs:"Second binary value"},returnValueDescription:"The logical `and` of the two values",returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:et&&tt}),opOr=makeBooleanOp({name:"or",argTypes:booleanArgTypes,renderInfo:{type:"binary",repr:"or"},description:"Returns the logical `or` of the two values",argDescriptions:{lhs:"First binary value",rhs:"Second binary value"},returnValueDescription:"The logical `or` of the two values",returnType:et=>skipTaggable(et.rhs,tt=>tt),resolver:({lhs:et,rhs:tt})=>tt==null?null:et||tt}),opNot=makeBooleanOp({name:"boolean-not",argTypes:{bool:"boolean"},renderInfo:{type:"unary",repr:"!"},description:"Returns the logical inverse of the value",argDescriptions:{bool:"The boolean value"},returnValueDescription:"The logical inverse of the value",returnType:et=>"boolean",resolver:({bool:et})=>!et}),opBooleanEqual=makeEqualOp({hidden:!0,name:"boolean-equal",argType:"boolean"});makeNotEqualOp({hidden:!0,name:"boolean-notEqual",argType:"boolean"});const opIsNone=makeOp({name:"isNone",argTypes:{val:maybe("any")},description:"Determines if the value is None.",argDescriptions:{val:"Possibly None value."},returnValueDescription:"True if the value is None.",returnType:et=>"boolean",resolver:({val:et})=>(isConcreteTaggedValue(et)&&(et=et._value),et==null)});makeOp({hidden:!0,name:"type-string",argTypes:{type:"type"},description:`Returns the ${docType("string")} representation of a ${docType("type")}`,argDescriptions:{type:`The ${docType("type")}`},returnValueDescription:`The ${docType("string")} representation of the ${docType("type")}`,returnType:"string",resolver:async(et,tt,nt,rt)=>defaultLanguageBinding.printType(et.type)});const opTypeName=makeOp({hidden:!0,name:"type-name",argTypes:{type:{type:"type"}},returnType:"string",resolver:async(et,tt,nt,rt)=>{const ot=et.type;return isSimpleTypeShape(ot)?ot:ot.type}}),typedDictPathVal=(et,tt)=>nullableTaggableVal(et,rt=>{if(!_$2.isObject(rt))return null;if(tt[0]==="*"){const ut={};for(const ct of Object.keys(rt))ut[ct]=typedDictOrListPathVal(rt[ct],tt.slice(1));return ut}const st=objectKeyVal(rt,tt[0]);return st==null?null:tt.length>1?typedDictOrListPathVal(st,tt.slice(1)):st}),typedDictOrListPathVal=(et,tt)=>nullableTaggableVal(et,nt=>!_$2.isObject(nt)&&!_$2.isArray(nt)?null:_$2.isArray(nt)&&tt[0]==="*"?tt.length===1?nt:nt.map(rt=>typedDictOrListPathVal(rt,tt.slice(1))):_$2.isObject(nt)?typedDictPathVal(nt,tt):"none"),typedDictPathType=(et,tt)=>nullableTaggable(et,nt=>{if(!isTypedDictLike(nt))return"none";if(tt[0]==="*"){const st={};for(const[ut,ct]of Object.entries(typedDictPropertyTypes(nt))){if(ct==null)throw new Error("typedDictPathType: found null property type");st[ut]=typedDictOrListPathType(ct,tt.slice(1))}return typedDict(st)}const ot=objectKeyType(nt,tt[0]);return tt.length>1?typedDictOrListPathType(ot,tt.slice(1)):ot}),typedDictOrListPathType=(et,tt)=>nullableTaggable(et,nt=>{if(!isTypedDictLike(nt)&&!isListLike(nt))return"none";if(isTypedDictLike(nt))return typedDictPathType(nt,tt);if(isListLike(nt)&&tt[0]==="*"){const rt=listObjectType(nt);return tt.length===1?{type:"list",objectType:rt,maxLength:nt.maxLength??void 0,minLength:nt.minLength??void 0}:{type:"list",objectType:typedDictOrListPathType(rt,tt.slice(1)),maxLength:nt.maxLength??void 0,minLength:nt.minLength??void 0}}else return"none"}),splitEscapedStringCache=new lruCache$2({max:1048576*8,length:et=>et.reduce((tt,nt)=>tt+nt.length,0),updateAgeOnGet:!0}),splitEscapedString=et=>{const tt=splitEscapedStringCache.get(et);if(typeof tt<"u")return tt;const nt="__wb_escaped_sep__",rt=et.replace(new RegExp("\\\\\\.","g"),nt).split(".").map(ot=>ot.replace(new RegExp(nt,"g"),"."));return splitEscapedStringCache.set(et,rt),rt},escapeDots=et=>et.replace(new RegExp("\\.","g"),"\\."),makeObjectOp=makeStandardOp,objectArgTypes={obj:typedDict({}),key:{type:"union",members:["none","string"]}},opPickArgs={name:"pick",argTypes:objectArgTypes,renderInfo:{type:"brackets"},returnType:(et,tt)=>{const{obj:nt}=et,{key:rt}=tt;if(rt.nodeType!=="const"){if(isDict(nt))return maybe(nt.objectType);if(isTypedDictLike(nt))return maybe(union$2(Object.values(typedDictPropertyTypes(nt)).filter(notEmpty$1)));throw new Error("opPick: expected dict-like object")}if(isUnion(rt.type)){const ut=[];for(const pt of rt.type.members){if(isSimpleTypeShape(pt)||pt.type!=="const")throw new Error("cannot handle non-const members of union type for key arg");ut.push(pt.val)}if(!isTypedDictLike(nt))throw new Error("cannot calculate keyof type for non-typedDict");const ct=typedDictPropertyTypes(nt),ft=ut.map(pt=>ct[pt]??"none");return union$2(ft)}const ot=rt.val,st=splitEscapedString(ot);return typedDictPathType(nt,st)},description:`Selects a value from a ${docType("typedDict")} by key`,argDescriptions:{obj:`The input ${docType("typedDict")}`,key:"The key for the value to select"},returnValueDescription:"Value at the given key",resolverIsSync:!0,resolver:et=>{if(et.key==null)return null;const tt=splitEscapedString(et.key);return typedDictPathVal(et.obj,tt)}},opPick=makeObjectOp(opPickArgs);makeObjectOp({...opPickArgs,name:"dict-pick",hidden:!0});makeOp({hidden:!0,name:"typedDict-values",argTypes:{obj:maybe(oneOrMany(maybe(typedDict({}))))},returnType:et=>{const{obj:tt}=et,nt=tt.type;return mappableNullableTaggable(nt,rt=>{const ot=Object.values(typedDictPropertyTypes(rt));return ot.length===0?list$1("invalid"):list$1(union$2(ot))})},description:`Returns the values of all the keys in a ${docType("typedDict")}`,argDescriptions:{obj:`The input ${docType("typedDict")}`},returnValueDescription:`List of the ${docType("typedDict")} values`,resolver:async et=>mappableNullableTaggableVal(et.obj,tt=>Object.values(tt))});const opObjectKeyTypes=makeObjectOp({hidden:!0,name:"object-keytypes",argTypes:{obj:{type:"typedDict",propertyTypes:{}}},returnType:({obj:et})=>list$1(typedDict({key:"string",type:"type"})),description:`Returns a ${docType("typedDict")} of the key types of the input ${docType("typedDict")}`,argDescriptions:{obj:`The input ${docType("typedDict")}`},returnValueDescription:`${docType("typedDict")} with same keys as the input, and values corresponding the the ${docType("type")}.`,resolver:async({obj:et},tt,nt,rt,ot,st)=>{const ut=ot.outputNode.node.fromOp.inputs.obj.type;return lodash$2.exports.map(typedDictPropertyTypes(ut),(ct,ft)=>({key:ft,type:ct}))}}),extractTaggedPropertyTypes=et=>{let tt={};if(isTaggedValue(et)){const nt=et.value;tt=lodash$2.exports.fromPairs(Object.keys(nt.propertyTypes).map(rt=>[rt,taggedValue(et.tag,nt.propertyTypes[rt])]))}else isTypedDict(et)&&(tt=et.propertyTypes);return tt},extractConcreteProperties=et=>{if(isConcreteTaggedValue(et)){const tt=et._value,nt=et._tag;et=lodash$2.exports.fromPairs(Object.keys(tt).map(rt=>[rt,concreteTaggedValue(nt,tt[rt])]))}return et},opMerge=makeOp({description:`Merges two ${docType("typedDict",{plural:!0})}`,argDescriptions:{lhs:`The base ${docType("typedDict")}`,rhs:`The ${docType("typedDict")} to merge into the base`},returnValueDescription:`A new ${docType("typedDict")} with the values from both inputs`,hidden:!0,name:"merge",argTypes:{lhs:{type:"typedDict",propertyTypes:{}},rhs:{type:"typedDict",propertyTypes:{}}},returnType:et=>({type:"typedDict",propertyTypes:{...extractTaggedPropertyTypes(et.lhs.type),...extractTaggedPropertyTypes(et.rhs.type)}}),resolver:et=>({...extractConcreteProperties(et.lhs),...extractConcreteProperties(et.rhs)})}),scriptRel="modulepreload",assetsURL=function(et){return"/__frontend/"+et},seen={},__vitePreload=function et(tt,nt,rt){return!nt||nt.length===0?tt():Promise.all(nt.map(ot=>{if(ot=assetsURL(ot),ot in seen)return;seen[ot]=!0;const st=ot.endsWith(".css"),ut=st?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${ot}"]${ut}`))return;const ct=document.createElement("link");if(ct.rel=st?"stylesheet":scriptRel,st||(ct.as="script",ct.crossOrigin=""),ct.href=ot,document.head.appendChild(ct),st)return new Promise((ft,pt)=>{ct.addEventListener("load",ft),ct.addEventListener("error",()=>pt(new Error(`Unable to preload CSS for ${ot}`)))})})).then(()=>tt())},replaceInputVariables=(et,tt)=>mapNodes(et,nt=>nt.nodeType==="output"&&nt.fromOp.name==="index"&&nt.fromOp.inputs.index.nodeType==="var"?callOpValid("limit",{arr:callOpValid("flatten",{arr:nt.fromOp.inputs.arr},tt),limit:{nodeType:"const",type:"number",val:10}},tt):nt);function getStackAtNodeOrOp(et,tt,nt,rt){if(et===tt)return nt;if(isFunctionLiteral(et))return getStackAtNodeOrOp(et.val,tt,nt,rt);if(et.nodeType==="output"){if(et.fromOp===tt)return nt;const ot=Object.keys(et.fromOp.inputs);for(const st of ot){const ut=et.fromOp.inputs[st];if(isFunctionLiteral(ut)){const ft=getFunctionFrame(et.fromOp.name,et.fromOp.inputs[ot[0]],nt,rt),pt=pushFrame(nt,ft),ht=getStackAtNodeOrOp(ut,tt,pt,rt);if(ht!==null)return ht;continue}const ct=getStackAtNodeOrOp(ut,tt,nt,rt);if(ct!==null)return ct}}return null}const isTableTypeHistoryKeyType$1=et=>["table-file","partitioned-table","joined-table"].includes(et),jsValToCGType=et=>et==null?"none":typeof et=="string"?"string":typeof et=="number"?"number":typeof et=="boolean"?"boolean":Array.isArray(et)?list$1(union$2(et.map(tt=>jsValToCGType(tt)))):isTableTypeHistoryKeyType$1(et._type)?et.artifact_path!=null?filePathToType(parseArtifactRef(et.artifact_path).assetPath):filePathToType(et.path):et._type==="wb_trace_tree"?{type:"wb_trace_tree"}:typeof et=="object"?typedDict(lodash$2.exports.mapValues(et,tt=>jsValToCGType(tt))):"unknown";function artifact(et){return`/${et.entityName}/${et.projectName}/artifacts/${encodeURIComponent(et.artifactTypeName)}/${encodeURIComponent(et.artifactSequenceName)}/${et.artifactCommitHash}`}function artifactCollection(et){return`/${et.entityName}/${et.projectName}/artifacts/${encodeURIComponent(et.artifactTypeName)}/${encodeURIComponent(et.artifactCollectionName)}`}function project$2(et){return`/${et.entityName}/${et.name}`}function run$1(et){return`/${et.entityName}/${et.projectName}/runs/${et.name}`}function reportView(et){return`/${et.entityName}/${et.projectName}/reports/${makeNameAndID(et.reportID,et.reportName)}`}function makeNameAndID(et,tt){return et=et.replace(/=/g,""),tt!=null&&(tt=tt.replace(/\W/g,"-").replace(/-+/g,"-")),tt!=null?`${encodeURIComponent(tt)}--${et}`:et}function fixupIndex(et,tt,nt){typeof nt=="string"?nt==="NaN"||nt==="nan"?et[tt]=NaN:nt==="Infinity"||nt==="Inf"?et[tt]=1/0:(nt==="-Infinity"||nt==="-Inf")&&(et[tt]=-1/0):(lodash$2.exports.isObject(nt)||lodash$2.exports.isArray(nt))&&fixupNaN(nt)}function fixupNaN(et){if(lodash$2.exports.isArray(et))et.forEach((tt,nt)=>fixupIndex(et,nt,tt));else if(lodash$2.exports.isObject(et))for(const tt of Object.keys(et))fixupIndex(et,tt,et[tt])}function JSONparseNaN(et){if(et==null)return et;const tt=JSON.parse(et);return fixupNaN(tt),tt}const connectionToNodes=et=>(et?.edges??[]).map(tt=>tt?.node).filter(tt=>tt!=null),makeEntityOp=makeTaggingStandardOp,entityArgTypes={entity:"entity"},entityArgDescription=`A ${docType("entity")}`;makeEntityOp({hidden:!0,name:"entity-internalId",argTypes:entityArgTypes,description:`Returns the internalId of the ${docType("entity")}`,argDescriptions:{entity:entityArgDescription},returnValueDescription:`The internalId of the ${docType("entity")}`,returnType:et=>"string",resolver:({entity:et})=>et.id});const opEntityName=makeEntityOp({name:"entity-name",argTypes:entityArgTypes,description:`Returns the name of the ${docType("entity")}`,argDescriptions:{entity:entityArgDescription},returnValueDescription:`The name of the ${docType("entity")}`,returnType:et=>"string",resolver:({entity:et})=>et.name});makeEntityOp({hidden:!0,name:"entity-isTeam",argTypes:entityArgTypes,returnType:et=>"boolean",resolver:({entity:et})=>et.isTeam});makeEntityOp({name:"entity-link",argTypes:entityArgTypes,description:`Returns the link of the ${docType("entity")}`,argDescriptions:{entity:entityArgDescription},returnValueDescription:`The link of the ${docType("entity")}`,returnType:et=>"link",resolver:({entity:et})=>({name:et.name,url:`/${et.name}`})});const opEntityProjects=makeEntityOp({hidden:!0,name:"entity-projects",argTypes:entityArgTypes,description:`Returns the ${docType("project"),{plural:!0}} of the ${docType("entity")}`,argDescriptions:{entity:entityArgDescription},returnValueDescription:`The ${docType("project"),{plural:!0}} of the ${docType("entity")}`,returnType:et=>list$1("project"),resolver:({entity:et})=>connectionToNodes(et.projects)});makeEntityOp({hidden:!0,name:"entity-portfolios",argTypes:entityArgTypes,description:`Returns the ${docType("artifact")} portfolios of the ${docType("entity")}`,argDescriptions:{entity:entityArgDescription},returnValueDescription:`The ${docType("artifact")} portfolios of the ${docType("entity")}`,returnType:et=>list$1("artifact"),resolver:({entity:et})=>connectionToNodes(et?.entityPortfolios)});makeEntityOp({hidden:!0,name:"entity-org",argTypes:entityArgTypes,returnType:et=>maybe("org"),resolver:({entity:et})=>et.organization});const memoJSONParseSafe=lodash$2.exports.memoize(et=>{const tt="Infinity",nt="___wb___Infinity___wb___",rt="-Infinity",ot="___wb___-Infinity___wb___";let st=0;for(let ct=0;ct<et.length;ct++)et[ct]==='"'&&(ct===0||et[ct-1]!=="\\"||ct>1&&et[ct-2]==="\\")?st++:st%2===0&&(et[ct]===tt[0]&&ct+tt.length<=et.length&&et.substring(ct,ct+tt.length)===tt?(et=et.slice(0,ct)+'"'+nt+'"'+et.slice(ct+tt.length,et.length),ct+=1+nt.length):et[ct]===rt[0]&&ct+rt.length<=et.length&&et.substring(ct,ct+rt.length)===rt&&(et=et.slice(0,ct)+'"'+ot+'"'+et.slice(ct+rt.length,et.length),ct+=1+ot.length));return JSON.parse(et,(ct,ft)=>ft===nt?1/0:ft===ot?-1/0:ft)}),makeFileOp=makeStandardOp,fileArgTypes={file:{type:"file"}},fileArgDescription=`A ${docType("file")}`,opFileType=makeFileOp({hidden:!0,name:"file-type",argTypes:fileArgTypes,description:`Returns the type of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The type of the ${docType("file")}`,returnType:et=>maybe("type"),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const ft=await st.backend.getArtifactFileMetadata(ut.id,ct);let pt="none";return ft!=null&&(ft.type==="dir"?pt={type:"dir"}:pt=filePathToType(ct)),pt}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFileDir=makeFileOp({hidden:!0,name:"file-dir",argTypes:fileArgTypes,description:`Returns the ${docType("dir")} of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The ${docType("dir")} of the ${docType("file")}`,returnType:et=>maybe({type:"dir"}),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const ft=await st.backend.getArtifactFileMetadata(ut.id,ct);if(ft==null)return;if(ft.type!=="dir")throw new Error("expected dir");return ft}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opDirAsW0Dict=makeFileOp({hidden:!0,name:"dir-_as_w0_dict_",argTypes:{dir:ALL_DIR_TYPE},returnType:et=>typedDict({}),resolver:({dir:et})=>et}),opFilePath=makeFileOp({hidden:!0,name:"file-path",argTypes:fileArgTypes,description:`Returns the path of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The path of the ${docType("file")}`,returnType:et=>"string",resolver:({file:et})=>et.path}),opFileSize=makeFileOp({name:"file-size",argTypes:fileArgTypes,description:`Returns the size of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The size of the ${docType("file")}`,returnType:et=>maybe("number"),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const ft=await st.backend.getArtifactFileMetadata(ut.id,ct);if(ft==null)return;if(ft.type==="dir")throw new Error("expected file");return ft.size}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFileDigest=makeFileOp({name:"file-digest",argTypes:fileArgTypes,description:`Returns the digest of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The digest of the ${docType("file")}`,returnType:et=>maybe("string"),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const ft=await st.backend.getArtifactFileMetadata(ut.id,ct);if(ft==null)return;if(ft.type==="dir")throw new Error("expected file");return ft.digest}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFileTable=makeTagConsumingStandardOp({name:"file-table",argTypes:fileArgTypes,description:`Returns the contents of the ${docType("file")} as a ${docType("table")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The contents of the ${docType("file")} as a ${docType("table")}`,returnType:et=>taggedValue(isTaggedValue(et.file)?et.file.tag:null,withFileTag(maybe({type:"table",columnTypes:{}}),{type:"file",extension:"json",wbObjectType:{type:"table",columnTypes:{}}})),resolver:async({file:et},tt,nt,rt,ot,st,ut)=>taggableValAsync(et,async ct=>{let ft,pt={file:ct};const{artifact:ht,path:mt}=ct;if(ht==null){const yt=getActualNamedTagFromValue(et,"run"),vt=getActualNamedTagFromValue(et,"entityName"),Tt=getActualNamedTagFromValue(et,"projectName");if(yt?.run?.name&&vt?.entityName&&Tt?.projectName){const Et=await st.backend.getRunFileContents(Tt.projectName,yt.run.name,mt,vt.entityName);if(Et.contents!=null)try{ft=memoJSONParseSafe(Et.contents)}catch{console.warn("Error parsing table contents",ct)}}}else if(ht!=null)try{const{refFileId:yt,contents:vt}=await st.backend.getArtifactFileContents(ht.id,mt);if(vt!=null)try{ft=memoJSONParseSafe(vt),yt!=null&&(pt={file:{artifact:{id:yt.artifactId},path:yt.path}})}catch{console.warn("Error parsing table contents",ct)}}catch(yt){console.warn("Error loading artifact",{err:yt,artifact:ht,path:mt})}return concreteTaggedValue(pt,ft)})}),opFileJoinedTable=makeFileOp({name:"file-joinedTable",argTypes:{file:maybe({type:"file",extension:"json",wbObjectType:{type:"joined-table",columnTypes:{}}})},description:`Returns the contents of the ${docType("file")} as a ${docType("joined-table")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The contents of the ${docType("file")} as a ${docType("joined-table")}`,returnType:et=>maybe({type:"joined-table",columnTypes:{}}),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const pt=(await st.backend.getArtifactFileContents(ut.id,ct)).contents;if(pt==null)return;const ht=memoJSONParseSafe(pt);return{artifact:{id:ut.id},path:ct,joinedTable:ht}}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFilePartitionedTable=makeFileOp({name:"file-partitionedTable",argTypes:{file:maybe({type:"file",extension:"json",wbObjectType:{type:"partitioned-table",columnTypes:{}}})},description:`Returns the contents of the ${docType("file")} as a ${docType("partitioned-table")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The contents of the ${docType("file")} as a ${docType("partitioned-table")}`,returnType:et=>maybe({type:"partitioned-table",columnTypes:{}}),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const pt=(await st.backend.getArtifactFileContents(ut.id,ct)).contents;if(pt==null)return;const ht=memoJSONParseSafe(pt);return{artifact:{id:ut.id},path:ct,partitionedTable:ht}}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFileContents=makeFileOp({name:"file-contents",argTypes:fileArgTypes,description:`Returns the contents of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The contents of the ${docType("file")}`,returnType:et=>maybe("string"),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const pt=(await st.backend.getArtifactFileContents(ut.id,ct)).contents;return pt??void 0}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFileDirectUrl=makeFileOp({hidden:!0,name:"file-directUrl",argTypes:fileArgTypes,description:`Returns the direct url of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The direct url of the ${docType("file")}`,returnType:et=>maybe("string"),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{return(await st.backend.getArtifactFileDirectUrl(ut.id,ct)).directUrl}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFileDirectUrlAsOf=makeFileOp({hidden:!0,name:"file-directUrlAsOf",argTypes:{...fileArgTypes,asOf:"number"},description:`Returns the direct url of the ${docType("file")}. The \`asOf\` parameter can be used to ensure that we do not return cached results - modify the \`asOf\` parameter to force a new result.`,argDescriptions:{file:fileArgDescription,asOf:"The value to use for caching"},returnValueDescription:`The direct url of the ${docType("file")}`,returnType:et=>maybe("string"),resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{return(await st.backend.getArtifactFileDirectUrl(ut.id,ct)).directUrl}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),null}}}),opFileMedia=makeFileOp({hidden:!0,name:"file-media",argTypes:fileArgTypes,description:`Returns a ${docType("file")} as its Media type`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The ${docType("file")} as its Media type`,returnType:({file:et})=>{if(!isFile$1(et))throw new Error("opFileMedia: file must be a File");const tt=et.wbObjectType;if(tt==null)throw new Error("opFileMedia: file must have a wbObjectType");return withFileTag(tt,maybe(et))},resolver:async({file:et},tt,nt,rt,ot,st)=>{const{artifact:ut,path:ct}=et;if(ut!=null)try{const{contents:ft}=await st.backend.getArtifactFileContents(ut.id,ct);return ft==null?void 0:concreteTaggedValue({file:et},JSON.parse(ft))}catch(ft){return console.warn("Error loading artifact",{err:ft,artifact:ut,path:ct}),concreteTaggedValue({file:et},null)}}}),opFileArtifactVersion=makeFileOp({hidden:!0,name:"file-artifactVersion",argTypes:fileArgTypes,description:`Returns the ${docType("artifactVersion")} of the ${docType("file")}`,argDescriptions:{file:fileArgDescription},returnValueDescription:`The ${docType("artifactVersion")} of the ${docType("file")}`,returnType:et=>"artifactVersion",resolver:({file:et})=>et.artifact}),makeProjectOp=makeTaggingStandardOp,projectArgTypes={project:"project"},projectArgDescription=`A ${docType("project")}`;makeTagGetterOp({name:"tag-project",tagName:"project",tagType:"project"});makeProjectOp({hidden:!0,name:"project-internalId",argTypes:projectArgTypes,description:`Returns the internal id of the ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The internal id of the ${docType("project")}`,returnType:et=>"string",resolver:({project:et})=>et.id});const opProjectEntity=makeProjectOp({hidden:!0,name:"project-entity",argTypes:projectArgTypes,description:`Returns the internal id of the ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The internal id of the ${docType("project")}`,returnType:et=>"entity",resolver:({project:et})=>et.entity});makeProjectOp({name:"project-createdAt",argTypes:projectArgTypes,description:`Returns the creation time of the ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The creation time of the ${docType("project")}`,returnType:et=>"date",resolver:({project:et})=>new Date(et.createdAt+"Z")});const opProjectUpdatedAt=makeProjectOp({name:"project-updatedAt",argTypes:projectArgTypes,description:`Returns the update time of the ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The update time of the ${docType("project")}`,returnType:et=>"date",resolver:({project:et})=>new Date(et.updatedAt+"Z")}),opProjectName=makeProjectOp({name:"project-name",argTypes:projectArgTypes,description:`Returns the name of the ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The name of the ${docType("project")}`,returnType:et=>"string",resolver:({project:et})=>et.name});makeProjectOp({hidden:!0,name:"project-link",argTypes:projectArgTypes,description:`Returns the link to the ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The link to the ${docType("project")}`,returnType:et=>"link",resolver:({project:et})=>({name:et.name,url:project$2({name:et.name,entityName:et.entityName})})});const opProjectRun=makeProjectOp({hidden:!0,name:"project-run",argTypes:{...projectArgTypes,runName:"string"},description:`Returns the ${docType("run")} with the given name from a ${docType("project")}`,argDescriptions:{project:projectArgDescription,runName:`The name of the ${docType("run")}`},returnValueDescription:`The ${docType("run")} with the given name from a ${docType("project")}`,returnType:et=>"run",resolver:({project:et,runName:tt})=>{const nt=`run_${hash$2(tt)}`;return et[nt]}}),opProjectRuns=makeProjectOp({name:"project-runs",argTypes:projectArgTypes,description:`Returns the ${docType("run",{plural:!0})} from a ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The ${docType("run",{plural:!0})} from a ${docType("project")}`,returnType:et=>list$1("run"),resolver:({project:et})=>connectionToNodes(et.runs)});makeProjectOp({hidden:!0,name:"project-filteredRuns",argTypes:{...projectArgTypes,filter:"string",order:"string"},description:`Returns the ${docType("run",{plural:!0})} from a ${docType("project")} with a filter applied`,argDescriptions:{project:projectArgDescription,filter:`The filter to apply to the ${docType("run",{plural:!0})}`,order:`The order to return the ${docType("run",{plural:!0})}`},returnValueDescription:`The ${docType("run",{plural:!0})} from a ${docType("project")} with a filter applied`,returnType:et=>list$1("run"),resolver:({project:et,filter:tt})=>{const nt=`filteredRuns_${hash$2(tt)}`;if(typeof et[nt]>"u")throw new Error(`opProjectedFilteredRuns couldn't find expected project field ${nt}`);return connectionToNodes(et[nt])}});const opProjectArtifactType=makeProjectOp({name:"project-artifactType",argTypes:{...projectArgTypes,artifactType:"string"},description:`Returns the ${docType("artifactType")} for a given name within a ${docType("project")}`,argDescriptions:{project:projectArgDescription,artifactType:`The name of the ${docType("artifactType")}`},returnValueDescription:`The ${docType("artifactType")} for a given name within a ${docType("project")}`,returnType:et=>"artifactType",resolver:({project:et,artifactType:tt})=>{const nt=`artifactType_${hash$2(tt)}`;return et[nt]}}),opProjectArtifactTypes=makeProjectOp({name:"project-artifactTypes",argTypes:{...projectArgTypes},description:`Returns the ${docType("artifactType",{plural:!0})} for a ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The ${docType("artifactType",{plural:!0})} for a ${docType("project")}`,returnType:et=>list$1("artifactType"),resolver:({project:et})=>connectionToNodes(et.artifactTypes)}),opProjectArtifact=makeProjectOp({name:"project-artifact",argTypes:{...projectArgTypes,artifactName:"string"},description:`Returns the ${docType("artifact")} for a given name within a ${docType("project")}`,argDescriptions:{project:projectArgDescription,artifactName:`The name of the ${docType("artifact")}`},returnValueDescription:`The ${docType("artifact")} for a given name within a ${docType("project")}`,returnType:et=>"artifact",resolver:({project:et,artifactName:tt})=>{const nt=`artifactCollection_${hash$2(tt)}`;return et[nt]??null}});makeProjectOp({name:"project-artifactVersion",argTypes:{...projectArgTypes,artifactName:"string",artifactVersionAlias:"string"},description:`Returns the ${docType("artifactVersion")} for a given name and version within a ${docType("project")}`,argDescriptions:{project:projectArgDescription,artifactName:`The name of the ${docType("artifactVersion")}`,artifactVersionAlias:`The version alias of the ${docType("artifactVersion")}`},returnValueDescription:`The ${docType("artifactVersion")} for a given name and version within a ${docType("project")}`,returnType:et=>"artifactVersion",resolver:({project:et,artifactName:tt,artifactVersionAlias:nt})=>{const rt=tt+":"+nt,ot=`artifact_${hash$2(rt)}`;return et[ot]}});makeProjectOp({hidden:!0,name:"project-reports",argTypes:projectArgTypes,description:`Returns the ${docType("report",{plural:!0})} for a ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The ${docType("report",{plural:!0})} for a ${docType("project")}`,returnType:et=>list$1("report"),resolver:({project:et})=>connectionToNodes(et.allViews)});const opProjectArtifacts=makeProjectOp({hidden:!0,name:"project-artifacts",argTypes:projectArgTypes,description:`Returns the ${docType("artifact",{plural:!0})} for a ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The ${docType("artifact",{plural:!0})} for a ${docType("project")}`,returnType:et=>list$1("artifact"),resolver:({project:et})=>connectionToNodes(et.artifactCollections)});makeProjectOp({hidden:!0,name:"project-runQueues",argTypes:projectArgTypes,description:`Returns the ${docType("runQueue",{plural:!0})} for a ${docType("project")}`,argDescriptions:{project:projectArgDescription},returnValueDescription:`The ${docType("runQueue",{plural:!0})} for a ${docType("project")}`,returnType:et=>list$1("runQueue"),resolver:({project:et})=>et.runQueues});const LIMIT_ALL_PROJECTS=1e4,LIMIT_ALL_REPORTS=1e4,LIMIT_ALL_ARTIFACTS=1e4,LIMIT_ARTIFACTTYPE_ARTIFACTS=100,LIMIT_ARTIFACTTYPE_ARTIFACTVERSIONS=100,LIMIT_ARTIFACT_VERSIONS=100,LIMIT_ENTITY_PROJECTS=100,LIMIT_ORG_ARTIFACTS=100,LIMIT_ORG_PROJECTS=100,LIMIT_ORG_REPORTS=100,LIMIT_PROJECT_REPORTS=100,LIMIT_PROJECT_ARTIFACT_TYPES=10,LIMIT_PROJECT_RUNS=100,LIMIT_REPORT_STARGAZERS=100,LIMIT_USER_RUNS=100,LIMIT_USER_TEAMS=100,gqlBasicField=(et,tt)=>[{name:et,args:tt,fields:[]}],gqlArgs=et=>{if(Object.keys(et).length!==0)return lodash$2.exports.map(et,(tt,nt)=>({name:nt,value:tt}))},gqlObjectField=(et,tt,nt,rt,ot)=>{const st=ot?.extraFields??[],ut=ot?.alias;return{name:nt,args:rt,fields:[{name:"id",fields:[]},...gqlObjectSubfields(et,tt),...st??[]],alias:ut}},getSubfieldOps=et=>[...Array.from(et.outputNode.inputTo),...Array.from(et.outputNode.consumedAsTagBy).flatMap(getSubfieldOps)],gqlObjectSubfields=(et,tt)=>[...getSubfieldOps(tt).flatMap(nt=>nt.op.name==="dict"?gqlObjectSubfieldsForDict(et,tt,nt):toGqlField(et,nt))],gqlObjectSubfieldsForDict=(et,tt,nt)=>{if(nt.op.name!=="dict")throw new Error(`Expected 'dict' op, found ${nt.op.name}`);return[...getSubfieldOps(nt).flatMap(rt=>{if(rt.op.name==="pick"){const ot=rt.op.inputs.key;if(ot.nodeType==="const"&&ot.type==="string"){const st=nt.op.inputs[splitEscapedString(ot.val).join(".")];if(st!=null&&st.nodeType==="output"){const ut=et.getOp(st.fromOp);if(ut!=null&&(ut===tt||ut.outputNode.consumesTagFrom.has(tt)))return gqlObjectSubfields(et,rt)}}}return[]})]},forwardOpHasVarInputOfName=et=>tt=>Object.values(tt.op.inputs).some(nt=>nt.nodeType==="var"&&nt.varName===et),toGqlField=(et,tt)=>{if(tt.outputNode.node.type==="invalid")return[];const nt=forwardOpInputs(et,tt);function rt(ot){for(const st of tt.outputNode.inputTo.values())if(st.op.name==="limit")return forwardOpInputs(et,st).limit;return ot}if(tt.op.name==="map"){const ot=nt.mapFn,st=newRefForwardGraph();st.update(ot);const ct=Array.from(st.getRoots()).filter(forwardOpHasVarInputOfName("row")).map(pt=>toGqlField(st,pt));return lodash$2.exports.concat(ct[0],...ct.slice(1)).concat(gqlObjectSubfields(et,tt)).filter(pt=>pt!=null)}else if(tt.op.name==="groupby"){const ot=nt.groupByFn,st=newRefForwardGraph();st.update(ot);const ct=Array.from(st.getRoots()).filter(forwardOpHasVarInputOfName("row")).map(pt=>toGqlField(st,pt));return lodash$2.exports.concat(ct[0],...ct.slice(1)).concat(gqlObjectSubfields(et,tt)).filter(pt=>pt!=null)}else if(tt.op.name==="filter"){const ot=nt.filterFn,st=newRefForwardGraph();st.update(ot);const ct=Array.from(st.getRoots()).filter(forwardOpHasVarInputOfName("row")).map(pt=>toGqlField(st,pt));return lodash$2.exports.concat(ct[0],...ct.slice(1)).concat(gqlObjectSubfields(et,tt)).filter(pt=>pt!=null)}else if(tt.op.name==="sort"){const ot=nt.compFn,st=newRefForwardGraph();st.update(ot);const ct=Array.from(st.getRoots()).filter(forwardOpHasVarInputOfName("row")).map(pt=>toGqlField(st,pt));return lodash$2.exports.concat(ct[0],...ct.slice(1)).concat(gqlObjectSubfields(et,tt)).filter(pt=>pt!=null)}else{if(tt.op.name==="offset"||tt.op.name==="limit"||tt.op.name==="index"||tt.op.name==="concat"||tt.op.name==="contains"||tt.op.name==="list"||tt.op.name==="concat"||tt.op.name==="flatten"||tt.op.name==="dropna"||tt.op.name==="list-createIndexCheckpointTag")return gqlObjectSubfields(et,tt);if(tt.op.name!=="dict")if(tt.op.name==="root-entity"){const ot=`entity_${hash$2(nt.entityName)}`;return[gqlObjectField(et,tt,"entity",gqlArgs({name:nt.entityName}),{alias:ot})]}else if(tt.op.name==="root-project"){const ot=`project_${hash$2(nt.entityName+"/"+nt.projectName)}`;return[gqlObjectField(et,tt,"project",gqlArgs({entityName:nt.entityName,name:nt.projectName}),{alias:ot})]}else if(tt.op.name==="root-artifactVersion"){const ot=`project_${hash$2(nt.entityName+"/"+nt.projectName)}`,st=`artifactType_${hash$2(nt.artifactTypeName)}`,ut=`artifact_${hash$2(nt.artifactVersionName)}`;return[{alias:ot,name:"project",args:gqlArgs({entityName:nt.entityName,name:nt.projectName}),fields:[{name:"id",fields:[]},{alias:st,name:"artifactType",args:gqlArgs({name:nt.artifactTypeName}),fields:[{name:"id",fields:[]},gqlObjectField(et,tt,"artifact",gqlArgs({name:nt.artifactVersionName}),{alias:ut})]}]}]}else if(tt.op.name==="root-org"){const ot=`organization_${hash$2(nt.orgName)}`;return[gqlObjectField(et,tt,"organization",gqlArgs({name:nt.orgName}),{alias:ot})]}else if(tt.op.name==="root-user"){const ot=`user_${hash$2(nt.userName)}`;return[gqlObjectField(et,tt,"user",gqlArgs({userName:nt.userName}),{alias:ot})]}else{if(tt.op.name==="root-viewer")return[gqlObjectField(et,tt,"viewer")];if(tt.op.name==="root-allProjects")return[{name:"instance",args:gqlArgs({}),fields:[{name:"projects",args:gqlArgs({first:rt(LIMIT_ALL_PROJECTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}]}];if(tt.op.name==="root-allReports")return[{name:"instance",args:gqlArgs({}),fields:[{name:"views",args:gqlArgs({first:rt(LIMIT_ALL_REPORTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",gqlArgs({}),{extraFields:gqlBasicField("type")})]}]}]}];if(tt.op.name==="root-allArtifacts")return[{name:"instance",args:gqlArgs({}),fields:[{name:"artifactSequences",args:gqlArgs({first:rt(LIMIT_ALL_ARTIFACTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}]}];if(tt.op.name==="root-allEntities")return[{name:"instance",args:gqlArgs({}),fields:[gqlObjectField(et,tt,"entities")]}];if(tt.op.name.includes("rpt_"))return[{alias:`repoInsights_${hash$2(nt.repoName)}_${hash$2(tt.op.name)}`,name:"repoInsightsPlotData",args:gqlArgs({plotName:tt.op.name,repoName:nt.repoName,first:1e5}),fields:[{name:"edges",fields:[{name:"node",fields:[{name:"row",fields:[]}]}]},{name:"schema",fields:[]},{name:"isNormalizedUserCount",fields:[]}]}];if(tt.op.name==="entity-name"||tt.op.name==="entity-link")return gqlBasicField("name");if(tt.op.name==="entity-isTeam")return gqlBasicField("isTeam");if(tt.op.name==="entity-portfolios")return[{name:"artifactCollections(collectionTypes: [PORTFOLIO])",args:[],fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}],alias:"entityPortfolios"}];if(tt.op.name==="entity-projects")return[{name:"projects",args:gqlArgs({first:rt(LIMIT_ENTITY_PROJECTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="entity-org")return[gqlObjectField(et,tt,"organization")];if(tt.op.name==="project-id")return gqlBasicField("id");if(tt.op.name==="project-entity")return[gqlObjectField(et,tt,"entity")];if(tt.op.name==="project-createdAt")return gqlBasicField("createdAt");if(tt.op.name==="project-updatedAt")return gqlBasicField("updatedAt");if(tt.op.name==="project-name")return gqlBasicField("name");if(tt.op.name==="project-link")return gqlBasicField("name").concat(gqlBasicField("entityName"));if(tt.op.name==="project-runs")return[{name:"runs",args:gqlArgs({first:rt(LIMIT_PROJECT_RUNS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",void 0,{extraFields:[{name:"name",fields:[]}]})]}]}];if(tt.op.name==="project-runQueues")return[gqlObjectField(et,tt,"runQueues")];if(tt.op.name==="project-filteredRuns")return[{alias:`filteredRuns_${hash$2(nt.filter)}`,name:"runs",args:gqlArgs({first:rt(LIMIT_PROJECT_RUNS),filters:nt.filter,order:nt.order??void 0}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",void 0,{extraFields:[{name:"name",fields:[]}]})]}]}];if(tt.op.name==="project-run"){const ot=forwardOpInputs(et,tt).runName,st=`run_${hash$2(ot)}`;return[gqlObjectField(et,tt,"run",gqlArgs({name:ot}),{alias:st,extraFields:[{name:"name",fields:[]}]})]}else{if(tt.op.name==="project-artifactTypes")return[{name:"artifactTypes",args:gqlArgs({first:rt(LIMIT_PROJECT_ARTIFACT_TYPES)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="project-artifactType"){const ot=forwardOpInputs(et,tt).artifactType,st=`artifactType_${hash$2(ot)}`;return[gqlObjectField(et,tt,"artifactType",gqlArgs({name:ot}),{alias:st})]}else if(tt.op.name==="project-artifact"){const ot=forwardOpInputs(et,tt).artifactName,st=`artifactCollection_${hash$2(ot)}`;return[gqlObjectField(et,tt,"artifactCollection",gqlArgs({name:ot}),{alias:st})]}else if(tt.op.name==="project-artifactVersion"){const ot=forwardOpInputs(et,tt).artifactName,st=forwardOpInputs(et,tt).artifactVersionAlias,ut=ot+":"+st,ct=`artifact_${hash$2(ut)}`;return[gqlObjectField(et,tt,"artifact",gqlArgs({name:ut}),{alias:ct})]}else{if(tt.op.name==="project-reports")return[{name:"allViews",args:gqlArgs({viewType:"runs",first:rt(LIMIT_PROJECT_REPORTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="project-artifacts")return[{name:"artifactCollections",fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="runQueue-name")return gqlBasicField("name");if(tt.op.name==="org-artifacts")return[{name:"artifactCollections",args:gqlArgs({first:rt(LIMIT_ORG_ARTIFACTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="org-name")return gqlBasicField("name");if(tt.op.name==="org-teams")return[gqlObjectField(et,tt,"teams")];if(tt.op.name==="report-name")return gqlBasicField("displayName");if(tt.op.name==="report-link")return gqlBasicField("displayName").concat(gqlBasicField("id")).concat([gqlObjectField(et,tt,"project",gqlArgs({}),{extraFields:gqlBasicField("entityName").concat(gqlBasicField("name"))})]);if(tt.op.name==="report-description")return gqlBasicField("description");if(tt.op.name==="report-createdAt")return gqlBasicField("createdAt");if(tt.op.name==="report-project")return[gqlObjectField(et,tt,"project")];if(tt.op.name==="report-creator")return[gqlObjectField(et,tt,"user")];if(tt.op.name==="report-viewcount")return gqlBasicField("viewCount");if(tt.op.name==="report-stargazers")return[{name:"stargazers",args:gqlArgs({first:rt(LIMIT_REPORT_STARGAZERS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="org-members")return[{name:"members",fields:[gqlObjectField(et,tt,"user")]}];if(tt.op.name==="org-reports")return[{name:"views",args:gqlArgs({first:rt(LIMIT_ORG_REPORTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",gqlArgs({}),{extraFields:gqlBasicField("type")})]}]}];if(tt.op.name==="org-projects")return[{name:"projects",args:gqlArgs({first:rt(LIMIT_ORG_PROJECTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="user-runs")return[{name:"runs",args:gqlArgs({first:rt(LIMIT_USER_RUNS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="user-entities")return[{name:"teams",args:gqlArgs({first:rt(LIMIT_USER_TEAMS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="user-username")return gqlBasicField("username");if(tt.op.name==="user-name")return gqlBasicField("name");if(tt.op.name==="user-link")return gqlBasicField("name").concat(gqlBasicField("username"));if(tt.op.name==="artifact-type")return[gqlObjectField(et,tt,"defaultArtifactType")];if(tt.op.name==="artifact-rawTags")return[{name:"tags",fields:[{name:"edges",fields:[{name:"node",fields:gqlBasicField("id").concat(gqlBasicField("name")).concat(gqlBasicField("tagCategoryName")).concat(gqlBasicField("attributes"))}]}]}];if(tt.op.name==="artifact-versions")return[{name:"artifacts",args:gqlArgs({first:rt(LIMIT_ARTIFACT_VERSIONS)}),fields:[{name:"edges",fields:[{name:"version",fields:[]},gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="artifact-name")return gqlBasicField("name");if(tt.op.name==="artifact-aliases")return[{name:"aliases",fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="artifact-createdAt")return gqlBasicField("createdAt");if(tt.op.name==="artifact-description")return gqlBasicField("description");if(tt.op.name==="artifact-project")return[gqlObjectField(et,tt,"project")];if(tt.op.name==="artifact-link")return[{name:"defaultArtifactType",fields:gqlBasicField("id").concat([{name:"name",fields:[]}])},{name:"name",fields:[]},{name:"project",fields:gqlBasicField("id").concat([{name:"name",fields:[]},{name:"entity",fields:gqlBasicField("id").concat([{name:"name",fields:[]}])}])}];if(tt.op.name==="artifactVersion-updateAliasActions")return[{name:"artifactActions",args:gqlArgs({}),fields:[{name:"edges",fields:[{name:"node",args:[],fields:[gqlObjectField(et,tt,"... on UpdateArtifactAction",gqlArgs({}),{extraFields:[gqlBasicField("id")[0],gqlBasicField("createdAt")[0],{name:"initiator",args:[],fields:[{name:"... on User",args:[],fields:[gqlBasicField("id")[0],gqlBasicField("username")[0]]},{name:"... on Run",args:[],fields:[gqlBasicField("id")[0]]}]},{name:"artifact",args:[],fields:[{name:"id",args:gqlArgs({}),fields:[]},{name:"versionIndex",args:gqlArgs({}),fields:[]},{name:"commitHash",args:gqlArgs({}),fields:[]},{name:"artifactType",args:gqlArgs({}),fields:[gqlBasicField("id")[0],gqlBasicField("name")[0]]},{name:"artifactSequence",args:gqlArgs({}),fields:[gqlBasicField("id")[0],gqlBasicField("name")[0]].concat([{name:"project",args:gqlArgs({}),fields:[gqlBasicField("id")[0],gqlBasicField("name")[0]].concat([{name:"entity",args:gqlArgs({}),fields:[gqlBasicField("id")[0],gqlBasicField("name")[0]]}])}])}]},{name:"oldAliases",args:[],fields:[gqlBasicField("id")[0],gqlBasicField("alias")[0]]},{name:"newAliases",args:[],fields:[gqlBasicField("id")[0],gqlBasicField("alias")[0]]}]})]}]}]}];if(tt.op.name==="artifactType-artifacts")return[{name:"artifactCollections",args:gqlArgs({first:rt(LIMIT_ARTIFACTTYPE_ARTIFACTS)}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="artifactType-sequences")return[{name:`artifactCollections(first: ${rt(LIMIT_ARTIFACTTYPE_ARTIFACTS)}, collectionTypes: [SEQUENCE])`,fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}],alias:"artifactSequences"}];if(tt.op.name==="artifactType-portfolios")return[{name:`artifactCollections(first: ${rt(LIMIT_ARTIFACTTYPE_ARTIFACTS)}, collectionTypes: [PORTFOLIO])`,fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}],alias:"artifactPortfolios"}];if(tt.op.name==="artifactType-artifactVersions")return[{name:"artifactCollections",args:gqlArgs({first:rt(LIMIT_ARTIFACTTYPE_ARTIFACTVERSIONS)}),fields:[{name:"edges",fields:[{name:"node",fields:[{name:"id",fields:[]},{name:"artifacts",fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}]}]}]}];if(tt.op.name==="artifactType-name")return gqlBasicField("name");if(tt.op.name==="artifactVersion-size")return gqlBasicField("size");if(tt.op.name==="artifactVersion-state")return gqlBasicField("state");if(tt.op.name==="artifactVersion-description")return gqlBasicField("description");if(tt.op.name==="artifactVersion-createdAt")return gqlBasicField("createdAt");if(tt.op.name==="artifactVersion-referenceCount")return gqlBasicField("usedCount");if(tt.op.name==="artifactVersion-historyStep")return gqlBasicField("historyStep");if(tt.op.name==="artifactVersion-metadata")return gqlBasicField("metadata");if(tt.op.name==="artifactVersion-artifactType")return[gqlObjectField(et,tt,"artifactType")];if(tt.op.name==="artifactVersion-artifactCollections")return[{name:"artifactCollections",fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="artifactVersion-memberships")return[{name:"artifactMemberships",fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="artifactVersion-createdBy")return[{name:"createdBy",args:gqlArgs({}),fields:[gqlObjectField(et,tt,"... on Run"),{name:"... on User",fields:[{name:"id",fields:[]}]}],alias:"createdByRun"}];if(tt.op.name==="artifactVersion-createdByUser")return[{name:"createdBy",args:gqlArgs({}),fields:[gqlObjectField(et,tt,"... on User"),{name:"... on Run",fields:[{name:"id",fields:[]}]}],alias:"createdByUser"}];if(tt.op.name==="artifactVersion-digest")return gqlBasicField("digest");if(tt.op.name==="artifactVersion-hash")return gqlBasicField("commitHash");if(tt.op.name==="artifactVersion-artifactSequence")return[gqlObjectField(et,tt,"artifactSequence")];if(tt.op.name==="artifactVersion-link")return[{name:"commitHash",args:gqlArgs({}),fields:[]},{name:"versionIndex",args:gqlArgs({}),fields:[]},{name:"artifactType",args:gqlArgs({}),fields:gqlBasicField("id").concat([{name:"name",fields:[]}])},{name:"artifactSequence",args:gqlArgs({}),fields:gqlBasicField("id").concat([{name:"name",fields:[]},{name:"project",args:gqlArgs({}),fields:gqlBasicField("id").concat([{name:"name",fields:[]},{name:"entity",args:gqlArgs({}),fields:gqlBasicField("id").concat([{name:"name",fields:[]}])}])}])}];if(tt.op.name==="artifactVersion-aliases")return[gqlObjectField(et,tt,"aliases",void 0,{extraFields:gqlBasicField("alias")})];if(tt.op.name==="artifactVersion-name")return gqlBasicField("versionIndex").concat([{name:"aliases",args:gqlArgs({}),fields:gqlBasicField("id").concat(gqlBasicField("alias"))},{name:"artifactSequence",args:gqlArgs({}),fields:gqlBasicField("id").concat(gqlBasicField("name"))}]);if(tt.op.name==="artifactVersion-versionId")return gqlBasicField("versionIndex");if(tt.op.name==="artifactVersion-usedBy")return[{name:"usedBy",args:gqlArgs({}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",gqlArgs({}))]}]}];if(tt.op.name==="artifactAlias-alias")return gqlBasicField("alias");if(tt.op.name==="artifactAlias-artifact")return[gqlObjectField(et,tt,"artifactCollection")];if(tt.op.name==="run-id")return gqlBasicField("name");if(tt.op.name==="run-name")return gqlBasicField("displayName");if(tt.op.name==="run-jobType")return gqlBasicField("jobType");if(tt.op.name==="run-link")return gqlBasicField("displayName").concat(gqlBasicField("name")).concat([gqlObjectField(et,tt,"project",gqlArgs({}),{extraFields:gqlBasicField("name").concat(gqlBasicField("entityName"))})]);if(tt.op.name==="run-user")return[gqlObjectField(et,tt,"user")];if(tt.op.name==="run-createdAt")return gqlBasicField("createdAt");if(tt.op.name==="run-heartbeatAt")return gqlBasicField("heartbeatAt");if(tt.op.name==="run-project")return[gqlObjectField(et,tt,"project")];if(tt.op.name==="run-jobtype")return gqlBasicField("jobType");if(tt.op.name==="run-loggedArtifactVersion")return[{name:"outputArtifacts",args:gqlArgs({}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",gqlArgs({}),{extraFields:[gqlBasicField("versionIndex")[0],{name:"aliases",args:gqlArgs({}),fields:gqlBasicField("id").concat(gqlBasicField("alias"))},{name:"artifactSequence",args:gqlArgs({}),fields:gqlBasicField("id").concat(gqlBasicField("name"))}]})]}]}];if(tt.op.name==="run-loggedArtifactVersions")return[{name:"outputArtifacts",args:gqlArgs({}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",gqlArgs({}))]}]}];if(tt.op.name==="run-usedArtifactVersions")return[{name:"inputArtifacts",args:gqlArgs({}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node",gqlArgs({}))]}]}];if(tt.op.name==="_run-historykeyinfo"||tt.op.name==="refine_history_type")return gqlBasicField("historyKeys");if(tt.op.name==="run-history"||tt.op.name==="refine_history_type")return gqlBasicField("history");if(tt.op.name==="run-historyAsOf"){const st=nt.asOfStep??0,ut=st+1;return[{name:"history",args:gqlArgs({minStep:st,maxStep:ut}),fields:[],alias:`historyAsOf_${nt.asOfStep}`}]}else{if(tt.op.name==="run-summary"||tt.op.name==="refine_summary_type")return gqlBasicField("summaryMetrics");if(tt.op.name==="run-runtime")return gqlBasicField("computeSeconds");if(tt.op.name==="run-config")return gqlBasicField("config");if(tt.op.name==="artifactMembership-id")return gqlBasicField("id");if(tt.op.name==="artifactMembership-collection")return[gqlObjectField(et,tt,"artifactCollection")];if(tt.op.name==="artifactMembership-artifactVersion")return[gqlObjectField(et,tt,"artifact")];if(tt.op.name==="artifactMembership-createdAt")return gqlBasicField("createdAt");if(tt.op.name==="artifactMembership-commitHash")return gqlBasicField("commitHash");if(tt.op.name==="artifactMembership-versionIndex")return gqlBasicField("versionIndex");if(tt.op.name==="artifactMembership-aliases")return[gqlObjectField(et,tt,"aliases",void 0,{extraFields:gqlBasicField("alias")})];if(tt.op.name==="artifactMembership-link")return[{name:"versionIndex",fields:[]},{name:"artifactCollection",fields:gqlBasicField("id").concat([{name:"defaultArtifactType",fields:gqlBasicField("id").concat([{name:"name",fields:[]}])},{name:"name",fields:[]},{name:"project",fields:gqlBasicField("id").concat([{name:"name",fields:[]},{name:"entity",fields:gqlBasicField("id").concat([{name:"name",fields:[]}])}])}])}];if(tt.op.name==="artifact-memberships")return[{name:"artifactMemberships",fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}];if(tt.op.name==="artifact-membershipForAlias"){const ot=sanitizeGQLAlias(`artifactMembership_${nt.aliasName}`);return[gqlObjectField(et,tt,"artifactMembership",gqlArgs({aliasName:nt.aliasName}),{alias:ot})]}else if(tt.op.name==="artifact-lastMembership")return[{alias:"lastMembership",name:"artifactMemberships",args:gqlArgs({first:1}),fields:[{name:"edges",fields:[gqlObjectField(et,tt,"node")]}]}]}}}}}return[]};function mergeArgs(et,tt,nt){if(tt=tt??[],nt=nt??[],tt?.length!==nt?.length){if(["summaryMetrics","config"].includes(et))return;throw new Error(`Invalid args merge: Cannot merge ${JSON.stringify(tt)} and ${JSON.stringify(nt)}`)}const rt=new Map;for(const ot of tt||[])rt.set(ot.name,ot);for(const ot of nt||[]){const st=rt.get(ot.name);if(st)if(ot.name==="keys"){const ut={name:"keys",value:[...new Set([...st.value,...ot.value])]};rt.set("keys",ut)}else console.warn(`[CG GraphQL] Naively merging arg "${ot.name}" for field "${et}"`),rt.set(ot.name,ot);else throw new Error(`Invalid args merge: previous args do not have new arg key "${ot.name}" (field = ${et})`)}return Array.from(rt.values())}function mergeField(et,tt){if(et.alias!==tt.alias)throw new Error(`Attempt to merge fields with different aliases: "${et.alias}" and "${tt.alias}"`);if(et.name!==tt.name)throw new Error(`Attempt to merge fields with different names: "${et.name}" and "${tt.name}"`);return{name:tt.name,alias:tt.alias,args:mergeArgs(et.name,et.args,tt.args),fields:mergeFields(et.fields.concat(tt.fields))}}function mergeFields(et){const tt=new Map;for(const nt of et){const rt=nt.alias??nt.name,ot=tt.get(rt);if(!ot)nt.fields=mergeFields(nt.fields),tt.set(rt,nt);else{if(lodash$2.exports.isEqual(ot,nt))continue;tt.set(rt,mergeField(ot,nt))}}return Array.from(tt.values())}const toGqlQuery=(et,tt)=>{const nt=toGqlField(et,tt);return mergeFields(nt)},entityNameArgDescription=`The name of a ${docType("user")} or ${docType("org")}`,projectNameArgDescription=`The name of the ${docType("project")}`,artifactTypeNameArgDescription=`The type name of the ${docType("artifactType")}`,artifactVersionNameArgDescription=`The version name of the ${docType("artifact")}: \`<ArtifactName>:<version>\``,orgNameArgDescription=`The name of the ${docType("org")}`,userNameArgDescription=`The name of the ${docType("user")}`,opRootEntity=makeTaggingStandardOp({hidden:!0,name:"root-entity",argTypes:{entityName:"string"},description:`Directly fetch a ${docType("entity")} by name`,argDescriptions:{entityName:entityNameArgDescription},renderInfo:{type:"function"},returnValueDescription:`A ${docType("entity")}`,returnType:()=>"entity",resolver:async(et,tt,nt,rt,ot,st)=>{const ut={queryFields:toGqlQuery(rt,ot)},ct=await st.backend.execute(ut),ft=`entity_${hash$2(et.entityName)}`;return ct[ft]}}),opRootProject=makeTaggingStandardOp({name:"root-project",argTypes:{entityName:"string",projectName:"string"},description:`Directly fetch a ${docType("project")}`,argDescriptions:{entityName:entityNameArgDescription,projectName:projectNameArgDescription},returnValueDescription:`A ${docType("project")}`,returnType:()=>"project",renderInfo:{type:"function"},resolver:async(et,tt,nt,rt,ot,st)=>{const ut={queryFields:toGqlQuery(rt,ot)},ct=await st.backend.execute(ut),ft=`project_${hash$2(et.entityName+"/"+et.projectName)}`;return ct[ft]}});makeOp({hidden:!0,name:"root-artifactVersion",argTypes:{entityName:"string",projectName:"string",artifactTypeName:"string",artifactVersionName:"string"},description:`Directly fetch a ${docType("artifactVersion")}`,argDescriptions:{entityName:entityNameArgDescription,projectName:projectNameArgDescription,artifactTypeName:artifactTypeNameArgDescription,artifactVersionName:artifactVersionNameArgDescription},returnValueDescription:`A ${docType("artifactVersion")}`,returnType:"artifactVersion",renderInfo:{type:"function"},resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)},st=await rt.backend.execute(ot),ut=`project_${hash$2(et.entityName+"/"+et.projectName)}`,ct=`artifactType_${hash$2(et.artifactTypeName)}`,ft=`artifact_${hash$2(et.artifactVersionName)}`;return st?.[ut]?.[ct]?.[ft]}});makeOp({hidden:!0,name:"root-org",argTypes:{orgName:"string"},description:`Directly fetch a ${docType("org")}`,argDescriptions:{orgName:orgNameArgDescription},returnValueDescription:`A ${docType("org")}`,returnType:"org",renderInfo:{type:"function"},resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)},st=await rt.backend.execute(ot),ut=`organization_${hash$2(et.orgName)}`;return st[ut]}});makeOp({hidden:!0,name:"root-user",argTypes:{userName:"string"},description:`Directly fetch a ${docType("user")}`,argDescriptions:{userName:userNameArgDescription},returnValueDescription:`A ${docType("user")}`,returnType:"user",renderInfo:{type:"function"},resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)},st=await rt.backend.execute(ot),ut=`user_${hash$2(et.userName)}`;return st[ut]}});const opRootViewer=makeOp({hidden:!0,name:"root-viewer",argTypes:{},description:`Directly fetch the current ${docType("user")}`,argDescriptions:{},returnValueDescription:`Current ${docType("user")}`,returnType:"user",resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)};return(await rt.backend.execute(ot)).viewer}});makeOp({hidden:!0,name:"root-featuredreports",argTypes:{},returnType:{type:"list",objectType:"report"},renderInfo:{type:"function"},description:`Directly fetch the featured ${docType("report",{plural:!0})}`,argDescriptions:{},returnValueDescription:`A ${docType("list")} of featured ${docType("report",{plural:!0})}`,resolver:async(et,tt,nt,rt)=>{const ot={queryFields:[{name:"featuredReports",fields:[{name:"id",fields:[]},{name:"spec",fields:[]}]}]},st=await rt.backend.execute(ot),ct=JSON.parse(st.featuredReports.spec).reports.map(ht=>ht.id),ft={queryFields:[{name:"views",args:gqlArgs({ids:ct}),fields:[{name:"edges",fields:[gqlObjectField(tt,nt,"node")]}]}]},pt=await rt.backend.execute(ft);return connectionToNodes(pt.views)}});makeOp({hidden:!0,name:"root-allProjects",argTypes:{},returnType:{type:"list",objectType:"project"},renderInfo:{type:"function"},description:`Directly fetch all visible ${docType("project",{plural:!0})} - only available in local W&B deployments`,argDescriptions:{},returnValueDescription:`A ${docType("list")} of all visible ${docType("project",{plural:!0})}`,resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)},st=await rt.backend.execute(ot);return connectionToNodes(st?.instance?.projects)}});makeOp({hidden:!0,name:"root-allReports",argTypes:{},returnType:{type:"list",objectType:"report"},renderInfo:{type:"function"},description:`Directly fetch all ${docType("report",{plural:!0})} - only available in local W&B deployments`,argDescriptions:{},returnValueDescription:`A ${docType("list")} of ${docType("report",{plural:!0})}`,resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)},st=await rt.backend.execute(ot);return connectionToNodes(st?.instance?.views).filter(ut=>ut.type==="runs")}});makeOp({hidden:!0,name:"root-allArtifacts",argTypes:{},returnType:{type:"list",objectType:"artifact"},renderInfo:{type:"function"},description:`Directly fetch all ${docType("artifact",{plural:!0})} - only available in local W&B deployments`,argDescriptions:{},returnValueDescription:`A ${docType("list")} of ${docType("artifact",{plural:!0})}`,resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)},st=await rt.backend.execute(ot);return connectionToNodes(st?.instance?.artifactSequences)}});makeOp({hidden:!0,name:"root-allEntities",argTypes:{},returnType:{type:"list",objectType:"entity"},renderInfo:{type:"function"},description:`Directly fetch all ${docType("entity",{plural:!0})} - only available in local W&B deployments`,argDescriptions:{},returnValueDescription:`A ${docType("list")} of ${docType("entity",{plural:!0})}`,resolver:async(et,tt,nt,rt)=>{const ot={queryFields:toGqlQuery(tt,nt)};return(await rt.backend.execute(ot))?.instance?.entities}});const repoInsightsRowTypes={rpt_weekly_users_by_country_by_repo:typedDict({user_fraction:"number",country:"string",created_week:"date",framework:"string"}),rpt_weekly_repo_users_by_persona:typedDict({created_week:"date",framework:"string",persona:"string",percentage:"number"}),rpt_weekly_engaged_user_count_by_repo:typedDict({created_week:"date",framework:"string",user_count:"number"}),rpt_repo_gpu_backends:typedDict({created_week:"date",framework:"string",gpu:"string",percentage:"number"}),rpt_versus_other_repos:typedDict({created_week:"date",framework:"string",percentage:"number"}),rpt_runtime_buckets:typedDict({created_week:"date",framework:"string",bucket:"string",bucket_run_percentage:"number"}),rpt_user_model_train_freq:typedDict({created_week:"date",framework:"string",train_freq:"string",percentage:"number"}),rpt_runs_versus_other_repos:typedDict({created_week:"date",framework:"string",percentage:"number"}),rpt_product_usage:typedDict({created_week:"date",framework:"string",product:"string",percentage:"number"})},makeRepoInsightsOp=(et,tt)=>makeOp({hidden:!0,name:et,argTypes:{repoName:"string"},description:`Fetch the data needed to render the ${et} plot for a given repo`,argDescriptions:{repoName:"The name of the repo to fetch data for"},returnValueDescription:"",returnType:typedDict({rows:{type:"list",objectType:tt},isNormalizedUserCount:"boolean"}),renderInfo:{type:"function"},resolver:async(nt,rt,ot,st)=>{const ut={queryFields:toGqlQuery(rt,ot)},ct=await st.backend.execute(ut),ft=`repoInsights_${hash$2(nt.repoName)}_${hash$2(et)}`,pt=ct[ft]?.schema;if(!pt)throw new Error(`No schema for ${ft}`);const ht=vt=>{const Tt={};for(let Et=0;Et<pt.length;Et++){const{Name:xt,Type:At}=pt[Et];At==="TIMESTAMP"?Tt[xt]=new Date(vt[Et]):Tt[xt]=vt[Et]}return Tt},mt=connectionToNodes(ct[ft]).map(vt=>ht(vt.row)),yt=ct[ft]?.isNormalizedUserCount;return{rows:mt,isNormalizedUserCount:yt}}});makeRepoInsightsOp("rpt_weekly_users_by_country_by_repo",repoInsightsRowTypes.rpt_weekly_users_by_country_by_repo);makeRepoInsightsOp("rpt_weekly_repo_users_by_persona",repoInsightsRowTypes.rpt_weekly_repo_users_by_persona);makeRepoInsightsOp("rpt_weekly_engaged_user_count_by_repo",repoInsightsRowTypes.rpt_weekly_engaged_user_count_by_repo);makeRepoInsightsOp("rpt_repo_gpu_backends",repoInsightsRowTypes.rpt_repo_gpu_backends);makeRepoInsightsOp("rpt_versus_other_repos",repoInsightsRowTypes.rpt_versus_other_repos);makeRepoInsightsOp("rpt_runtime_buckets",repoInsightsRowTypes.rpt_runtime_buckets);makeRepoInsightsOp("rpt_user_model_train_freq",repoInsightsRowTypes.rpt_user_model_train_freq);makeRepoInsightsOp("rpt_runs_versus_other_repos",repoInsightsRowTypes.rpt_runs_versus_other_repos);makeRepoInsightsOp("rpt_product_usage",repoInsightsRowTypes.rpt_product_usage);makeOp({hidden:!0,name:"root-_root_audit_logs_",argTypes:{url:"string",numDays:"number",anonymize:"boolean"},returnType:typedDict({data:list$1(typedDict({timestamp:"string",action:"string",actor_email:"string",user_email:"string",entity_name:"string",project_name:"string",report_name:"string",artifact_digest:"string",artifact_sequence_name:"string",artifact_version_index:"number",response_code:"number",cli_version:"string",actor_ip:"string",actor_user_id:"number",audit_log_error:"string",entity_asset:"number",user_asset:"number",artifact_asset:"number",artifact_sequence_asset:"number",project_asset:"number",report_asset:"number"})),error:"string"}),renderInfo:{type:"function"},description:`Directly fetch all ${docType("artifact",{plural:!0})} - only available in local W&B deployments`,argDescriptions:{},returnValueDescription:`A ${docType("list")} of ${docType("artifact",{plural:!0})}`,resolver:async(et,tt,nt,rt)=>{const ot=et.url+et.numDays+et.anonymize,st=auditLogDataCache.get(ot);if(st){const{data:ft,time:pt}=st;if(new Date().getTime()-pt<5*60*1e3)return{data:ft,error:""}}const{data:ut,error:ct}=await getAuditLogData(et.url,et.numDays,et.anonymize);return ct.length===0&&auditLogDataCache.set(ot,{data:ut,time:new Date().getTime()}),{data:ut,error:ct}}});const auditLogDataCache=new Map,getAuditLogData=async(et,tt,nt)=>{try{const rt=et+"?numDays="+tt+"&anonymize="+nt,ot=await browser$4(rt,{method:"GET"});return ot.ok?{data:(await ot.text()).split(`
`).filter(ft=>ft.length>0).map(ft=>JSON.parse(ft)),error:""}:{data:[],error:"res is not ok: "+await ot.text()}}catch(rt){return{data:[],error:"error parsing audit log data: "+String(rt)}}},makeRunOp=makeTaggingStandardOp,runArgTypes={run:"run"},runArgDescriptions=`A ${docType("run")}`,isTableTypeHistoryKeyType=et=>["table-file","partitioned-table","joined-table"].includes(et),opGetRunTag=makeTagGetterOp({name:"tag-run",tagName:"run",tagType:"run"});makeRunOp({hidden:!0,name:"run-internalId",argTypes:runArgTypes,description:`Returns the internal id of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The internal id of the ${docType("run")}`,returnType:et=>"string",resolver:({run:et})=>et.id});const opRunId=makeRunOp({hidden:!0,name:"run-id",argTypes:runArgTypes,description:`Returns the id of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The id of the ${docType("run")}`,returnType:et=>"string",resolver:({run:et})=>et.name}),opRunName=makeRunOp({name:"run-name",argTypes:runArgTypes,description:`Returns the name of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The name of the ${docType("run")}`,returnType:et=>"string",resolver:({run:et})=>et.displayName});makeRunOp({name:"run-jobType",argTypes:runArgTypes,description:`Returns the job type of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The job type of the ${docType("run")}`,returnType:et=>"string",resolver:({run:et})=>et.jobType});makeRunOp({hidden:!0,name:"run-link",argTypes:runArgTypes,description:`Returns the link to the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The link to the ${docType("run")}`,returnType:et=>"link",resolver:({run:et})=>({name:et.displayName,url:run$1({entityName:et.project.entityName,projectName:et.project.name,name:et.name})})});const opRunProject=makeRunOp({hidden:!0,name:"run-project",argTypes:runArgTypes,description:`Returns the ${docType("project")} of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The ${docType("project")} of the ${docType("run")}`,returnType:et=>"project",resolver:({run:et})=>et.project}),opRunUser=makeRunOp({name:"run-user",argTypes:runArgTypes,description:`Returns the ${docType("user")} of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The ${docType("user")} of the ${docType("run")}`,returnType:et=>"user",resolver:({run:et})=>et.user}),opRunCreatedAt=makeRunOp({name:"run-createdAt",argTypes:runArgTypes,description:`Returns the created at datetime of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The created at datetime of the ${docType("run")}`,returnType:et=>"date",resolver:({run:et})=>new Date(et.createdAt+"Z")}),opRunHeartbeatAt=makeRunOp({name:"run-heartbeatAt",argTypes:runArgTypes,description:`Returns the last heartbeat datetime of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The last heartbeat datetime of the ${docType("run")}`,returnType:et=>"date",resolver:({run:et})=>new Date(et.heartbeatAt+"Z")}),opRunJobtype=makeRunOp({hidden:!0,name:"run-jobtype",argTypes:runArgTypes,description:`Returns the job type of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The job type of the ${docType("run")}`,returnType:et=>"string",resolver:({run:et})=>et.jobType}),wandbJsonType=et=>{const tt={};for(const nt of Object.keys(et??{}))tt[nt]=jsValToCGType(et[nt]);return{type:"typedDict",propertyTypes:tt}},wandbJsonWithArtifacts=et=>lodash$2.exports.mapValues(et,tt=>{if(tt!=null&&isTableTypeHistoryKeyType(tt._type)&&tt.artifact_path!=null){const nt=parseArtifactRef(tt.artifact_path);return{...tt,artifact:{id:nt.artifactId},path:nt.assetPath}}return tt}),removeWandbKeys=et=>lodash$2.exports.pickBy(et,(tt,nt)=>nt!=="_wandb"),opRunConfig=makeRunOp({name:"run-config",argTypes:runArgTypes,description:`Returns the config ${docType("typedDict")} of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The config ${docType("typedDict")} of the ${docType("run")}`,returnType:et=>typedDict({}),resolver:({run:et})=>{const tt=JSONparseNaN(et.config)??{},nt=lodash$2.exports.mapValues(tt,rt=>rt.value);return wandbJsonWithArtifacts(removeWandbKeys(nt))},resolveOutputType:async(et,tt,nt,rt)=>{const ot=replaceInputVariables(nt,rt.opStore),st=await rt.query(ot);return lodash$2.exports.isArray(st)?st.length===0?typedDict({}):union$2(st.map(wandbJsonType)):wandbJsonType(st)}}),coerceSummaryMetricsStringToJSON=et=>wandbJsonWithArtifacts(removeWandbKeys(JSONparseNaN(et??"{}"))),opRunSummaryType=makeBasicOp({hidden:!0,name:"refine_summary_type",argTypes:{run:nullableOneOrMany("run")},description:`Returns the type of a ${docType("run")} summary.`,argDescriptions:{run:`A ${docType("run")}`},returnValueDescription:`The type of the ${docType("run")} summary`,returnType:et=>"type",resolver:async({run:et})=>et==null?"none":lodash$2.exports.isArray(et)?et.length===0?list$1(typedDict({})):list$1(union$2(et.map(tt=>wandbJsonType(coerceSummaryMetricsStringToJSON(getValueFromTaggedValue(tt).summaryMetrics))))):wandbJsonType(coerceSummaryMetricsStringToJSON(et.summaryMetrics))}),opRunSummary=makeRunOp({name:"run-summary",argTypes:runArgTypes,description:`Returns the summary ${docType("typedDict")} of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The summary ${docType("typedDict")} of the ${docType("run")}`,returnType:et=>typedDict({}),resolver:({run:et})=>{const tt=JSONparseNaN(et.summaryMetrics)??{};return wandbJsonWithArtifacts(removeWandbKeys(tt))},resolveOutputType:async(et,tt,nt,rt)=>{const ot=replaceInputVariables(nt.fromOp.inputs.run,rt.opStore),st=await refineNode(rt,ot,[]),ut=opRunSummaryType({run:st});let ct=nullableTaggableStrip(await rt.query(ut));return isListLike(st.type)&&(ct=listObjectType(ct),ct=nullableTaggableStrip(ct)),ct}}),opRunHistoryKeyInfo=makeRunOp({hidden:!0,name:"_run-historykeyinfo",argTypes:runArgTypes,description:`Returns the history key info for each key of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The history key info for each key of the ${docType("run")}`,returnType:et=>typedDict({}),resolver:({run:et})=>et.historyKeys??{keys:{},sets:[]}}),opRunHistoryTypeResolver=async(et,tt)=>{const nt=new EngineClient(tt()),rt=constNode("run",et),ot=opRunHistory({run:rt}),st=await nt.query(ot),ut=opRunHistoryKeyInfo({run:rt}),ct=await nt.query(ut),ft=lodash$2.exports.isArray(ct),pt=(ht,mt)=>{const yt={};for(const vt of Object.keys(mt?.keys??{})){const Et=mt.keys[vt].typeCounts[0].type;if(Et==="string")yt[vt]="string";else if(Et==="number")yt[vt]="number";else if(Et==="wb_trace_tree")yt[vt]={type:"wb_trace_tree"};else if(isTableTypeHistoryKeyType(Et)){const xt=ht.map(At=>At[vt]).filter(notEmpty$1);if(xt.length!==0){const At=xt[0];if(At.artifact_path==null)throw new Error("opRunHistory: expected artifact_path to be non-null");isTableTypeHistoryKeyType(At._type)&&(At.artifact_path!=null?yt[vt]=filePathToType(parseArtifactRef(At.artifact_path).assetPath):yt[vt]=filePathToType(At.path))}}}return{type:"list",objectType:{type:"typedDict",propertyTypes:yt}}};return ft?list$1(union$2(st.map((ht,mt)=>pt(ht,ct[mt])))):pt(st,ct)},opRunHistoryType=makeBasicOp({hidden:!0,name:"refine_history_type",argTypes:{run:nullableOneOrMany("run")},description:`Returns the type of a ${docType("run")} history.`,argDescriptions:{run:`A ${docType("run")}`},returnValueDescription:`The type of the ${docType("run")} history`,returnType:et=>"type",resolver:async({run:et},tt,nt,rt,ot,st,ut)=>opRunHistoryTypeResolver(et,ut)}),opRunHistoryType2=makeBasicOp({hidden:!0,name:"refine_history2_type",argTypes:{run:nullableOneOrMany("run")},description:`Returns the type of a ${docType("run")} history.`,argDescriptions:{run:`A ${docType("run")}`},returnValueDescription:`The type of the ${docType("run")} history`,returnType:et=>"type",resolver:async({run:et},tt,nt,rt,ot,st,ut)=>opRunHistoryTypeResolver(et,ut)}),opRunHistoryResolveOutputType=async(et,tt,nt)=>{const ot=mapNodes(et,ct=>ct.nodeType==="output"&&ct.fromOp.name==="index"&&ct.fromOp.inputs.index.nodeType==="var"?{nodeType:"output",type:"invalid",fromOp:{...ct.fromOp,inputs:{...ct.fromOp.inputs,index:constNumber(0)}}}:ct).fromOp.inputs.run,st=await refineNode(tt,ot,[]);let ut=nullableTaggableStrip(nt===1?await tt.query(opRunHistoryType({run:ot})):await tt.query(opRunHistoryType2({run:ot})));return isListLike(st.type)&&(ut=listObjectType(ut),ut=nullableTaggableStrip(ut)),ut},opRunHistoryResolver=et=>et?.history?.map(tt=>{const nt=JSONparseNaN(tt);return wandbJsonWithArtifacts(nt)})??[],opRunHistory=makeRunOp({name:"run-history",argTypes:runArgTypes,description:`Returns the log history of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The log history of the ${docType("run")}`,returnType:et=>list$1(typedDict({})),resolver:({run:et})=>opRunHistoryResolver(et),resolveOutputType:async(et,tt,nt,rt)=>opRunHistoryResolveOutputType(nt,rt,1)});makeRunOp({name:"run-history2",argTypes:runArgTypes,description:`Returns the log history of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The log history of the ${docType("run")}`,returnType:et=>list$1(typedDict({})),hidden:!0,resolver:({run:et})=>opRunHistoryResolver(et),resolveOutputType:async(et,tt,nt,rt)=>opRunHistoryResolveOutputType(nt,rt,2)});const opRunHistoryAsOfStep=makeRunOp({hidden:!0,name:"run-historyAsOf",argTypes:{run:"run",asOfStep:"number"},returnType:et=>list$1(typedDict({})),resolver:({run:et,asOfStep:tt})=>{const nt=et?.[`historyAsOf_${tt}`];return nt==null?{}:wandbJsonWithArtifacts(JSONparseNaN(nt[0]))},resolveOutputType:async(et,tt,nt,rt)=>{const ot=await rt.query(replaceInputVariables(nt,rt.opStore));return lodash$2.exports.isArray(ot)?ot.length===0?typedDict({}):union$2(ot.map(wandbJsonType)):wandbJsonType(ot)}});makeRunOp({name:"run-loggedArtifactVersion",argTypes:{...runArgTypes,artifactVersionName:"string"},description:`Returns the ${docType("artifactVersion")} logged by the ${docType("run")} for a given name and alias`,argDescriptions:{run:runArgDescriptions,artifactVersionName:`The name:alias of the ${docType("artifactVersion")}`},returnValueDescription:`The ${docType("artifactVersion")} logged by the ${docType("run")} for a given name and alias`,returnType:et=>"artifactVersion",resolver:({run:et,artifactVersionName:tt})=>{let[nt,rt]=splitOnce(tt,":");rt==null&&(rt="latest");const ot=connectionToNodes(et.outputArtifacts).find(st=>(st.versionIndex.toString()===rt?.slice(1)||st.aliases.some(ut=>ut.alias===rt))&&st.artifactSequence.name===nt);return ot??null}});const opRunLoggedArtifactVersions=makeRunOp({name:"run-loggedArtifactVersions",argTypes:runArgTypes,description:`Returns all of the ${docType("artifactVersion",{plural:!0})} logged by the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The ${docType("artifactVersion",{plural:!0})} logged by the ${docType("run")}`,returnType:et=>list$1("artifactVersion"),resolver:({run:et})=>connectionToNodes(et.outputArtifacts)});makeRunOp({name:"run-usedArtifactVersions",argTypes:runArgTypes,description:`Returns all of the ${docType("artifactVersion",{plural:!0})} used by the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The ${docType("artifactVersion",{plural:!0})} used by the ${docType("run")}`,returnType:et=>list$1("artifactVersion"),resolver:({run:et})=>connectionToNodes(et.inputArtifacts)});makeRunOp({name:"run-runtime",argTypes:runArgTypes,description:`Returns the runtime in seconds of the ${docType("run")}`,argDescriptions:{run:runArgDescriptions},returnValueDescription:`The runtime in seconds of the ${docType("run")}`,returnType:et=>"number",resolver:({run:et})=>et.computeSeconds});const makeArtifactVersionOp=makeStandardOp,artifactVersionArgTypes={artifactVersion:"artifactVersion"},artifactVersionArgDescription=`A ${docType("artifactVersion")}`,opArtifactVersionName=makeArtifactVersionOp({name:"artifactVersion-name",argTypes:artifactVersionArgTypes,description:`Returns the name of the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The name of the ${docType("artifactVersion")}`,returnType:et=>"string",resolver:({artifactVersion:et})=>et.artifactSequence.name+":v"+et.versionIndex});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-state",argTypes:artifactVersionArgTypes,returnType:et=>"string",resolver:({artifactVersion:et})=>et.state});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-digest",argTypes:artifactVersionArgTypes,returnType:et=>"string",resolver:({artifactVersion:et})=>et.digest});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-description",argTypes:artifactVersionArgTypes,returnType:et=>"string",resolver:({artifactVersion:et})=>et.description});const opArtifactVersionVersionId=makeArtifactVersionOp({name:"artifactVersion-versionId",argTypes:artifactVersionArgTypes,description:`Returns the versionId of the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The versionId of the ${docType("artifactVersion")}`,returnType:et=>"number",resolver:({artifactVersion:et})=>et.versionIndex});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-id",argTypes:artifactVersionArgTypes,description:`Returns the id of the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The id of the ${docType("artifactVersion")}`,returnType:et=>"string",resolver:({artifactVersion:et})=>et.id});makeArtifactVersionOp({name:"artifactVersion-size",argTypes:artifactVersionArgTypes,description:`Returns the size of the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The size of the ${docType("artifactVersion")}`,returnType:et=>"number",resolver:({artifactVersion:et})=>et.size});const opArtifactVersionCreatedAt=makeArtifactVersionOp({name:"artifactVersion-createdAt",argTypes:artifactVersionArgTypes,description:`Returns the datetime at which the ${docType("artifactVersion")} was created`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The datetime at which the ${docType("artifactVersion")} was created`,returnType:et=>({type:"timestamp",unit:"ms"}),resolver:({artifactVersion:et})=>et.createdAt}),opArtifactVersionFiles=makeArtifactVersionOp({name:"artifactVersion-files",argTypes:artifactVersionArgTypes,description:`Returns the ${docType("list")} of ${docType("file",{plural:!0})} of the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The ${docType("list")} of ${docType("file",{plural:!0})} of the ${docType("artifactVersion")}`,returnType:et=>list$1({type:"file"}),resolver:async({artifactVersion:et},tt,nt,rt,ot,st)=>{try{const ut=await st.backend.getArtifactFileMetadata(et.id,"");if(ut==null||ut.type!=="dir")throw new Error("opArtifactVersionFiles: not a directory");return Object.keys(ut.files).map(ct=>({artifact:{id:et.id},path:ct}))}catch(ut){return console.warn("Error loading artifact",{err:ut,artifactVersion:et}),[]}}}),mediaTypeExtensions=BASIC_MEDIA_TYPES.map(et=>et.type),isMediaFilePath=et=>mediaTypeExtensions.some(tt=>et.endsWith(`.${tt}.json`));makeArtifactVersionOp({hidden:!0,name:"artifactVersion-defaultFile",argTypes:artifactVersionArgTypes,returnType:et=>maybe({type:"file"}),resolver:async({artifactVersion:et},tt,nt,rt,ot,st)=>{try{const ut=await st.backend.getArtifactFileMetadata(et.id,"");if(ut==null||ut.type!=="dir")throw new Error("opArtifactVersionDefaultFile: not a directory");let ct=null,ft=null;for(const ht in ut.files)if(ht.indexOf("/")===-1&&isMediaFilePath(ht))if(ht.startsWith("index")){ft=ht;break}else ct=ht;const pt=ft??ct;return pt!=null?{artifact:{id:et.id},path:pt}:null}catch(ut){return console.warn("Error loading artifact",{err:ut,artifactVersion:et}),null}}});const opArtifactVersionFile=makeArtifactVersionOp({name:"artifactVersion-file",argTypes:{...artifactVersionArgTypes,path:"string"},description:`Returns the ${docType("file")} of the ${docType("artifactVersion")} for the given path`,argDescriptions:{artifactVersion:artifactVersionArgDescription,path:`The path of the ${docType("file")}`},returnValueDescription:`The ${docType("file")} of the ${docType("artifactVersion")} for the given path`,returnType:et=>maybe({type:"file"}),resolver:async(et,tt,nt,rt,ot,st)=>{if(et.artifactVersion==null)throw new Error("opArtifactVersionFile missing artifactVersion");const ut={artifact:et.artifactVersion,path:et.path},{artifact:ct,path:ft}=ut;try{return await st.backend.getArtifactFileMetadata(ct.id,ft)==null?null:{artifact:et.artifactVersion,path:et.path}}catch(pt){return console.warn("Error loading artifact",{err:pt,artifact:ct,path:ft}),null}},resolveOutputType:async(et,tt,nt,rt)=>{const ot=opFileType({file:nt});let st=await rt.query(ot);return st==null?"none":(lodash$2.exports.isArray(st)&&(st=union$2(st.map(ut=>ut??"none"))),isTaggedValue(st)&&(st=taggedValueValueType(st)),isList(st)&&(st=st.objectType),st??"none")}});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-referenceCount",argTypes:artifactVersionArgTypes,description:`Returns the count of references to the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The count of references to the ${docType("artifactVersion")}`,returnType:et=>"number",resolver:({artifactVersion:et})=>et.usedCount});makeArtifactVersionOp({name:"artifactVersion-usedBy",argTypes:artifactVersionArgTypes,description:`Returns the ${docType("run",{plural:!0})} that use the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The ${docType("run",{plural:!0})} that use the ${docType("artifactVersion")}`,returnType:et=>list$1("run"),resolver:({artifactVersion:et})=>connectionToNodes(et.usedBy)});const opArtifactVersionCreatedBy=makeArtifactVersionOp({hidden:!0,name:"artifactVersion-createdBy",argTypes:artifactVersionArgTypes,description:`Returns the ${docType("run")} that created the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The ${docType("run")} that created the ${docType("artifactVersion")}`,returnType:et=>maybe("run"),resolver:({artifactVersion:et})=>et.createdByRun?.__typename==="Run"?et.createdByRun:null});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-createdByUser",argTypes:artifactVersionArgTypes,description:`Returns the ${docType("user")} that created the ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The ${docType("user")} that created the ${docType("artifactVersion")}`,returnType:et=>maybe("user"),resolver:({artifactVersion:et})=>et.createdByUser?.__typename==="User"?et.createdByUser:null});const opArtifactVersionMetadata=makeArtifactVersionOp({name:"artifactVersion-metadata",argTypes:artifactVersionArgTypes,description:`Returns the ${docType("artifactVersion")} metadata dictionary`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The ${docType("artifactVersion")} metadata dictionary`,returnType:et=>typedDict({}),resolver:({artifactVersion:et})=>{const tt=et.metadata!==null?JSONparseNaN(et.metadata)??{}:{};return wandbJsonWithArtifacts(tt)},resolveOutputType:async(et,tt,nt,rt)=>{const ot=replaceInputVariables(nt,rt.opStore),st=await rt.query(ot);if(st==null||st.length===0)return typedDict({});const ut=st[0];return lodash$2.exports.isArray(ut)?ut.length===0?typedDict({}):union$2(ut.map(wandbJsonType)):wandbJsonType(ut)}}),versionRegex=/^v(\d+)$/;makeArtifactVersionOp({name:"artifactVersion-aliases",argTypes:{...artifactVersionArgTypes,hideVersions:"boolean"},description:`Returns the aliases for a ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The aliases for a ${docType("artifactVersion")}`,returnType:et=>list$1("artifactAlias"),resolver:({artifactVersion:et,hideVersions:tt})=>(et.aliases??[]).filter(nt=>nt!=null&&(!tt||!versionRegex.test(nt.alias)))});makeArtifactVersionOp({name:"artifactVersion-link",argTypes:artifactVersionArgTypes,description:`Returns the url for a ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The url for a ${docType("artifactVersion")}`,returnType:et=>"link",resolver:({artifactVersion:et})=>({name:`${et.artifactSequence.name}:v${et.versionIndex}`,url:artifact({entityName:et.artifactSequence.project.entity.name,projectName:et.artifactSequence.project.name,artifactTypeName:et.artifactType.name,artifactSequenceName:et.artifactSequence.name,artifactCommitHash:et.commitHash})})});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-hash",argTypes:artifactVersionArgTypes,description:`Returns the hash for a ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The hash for a ${docType("artifactVersion")}`,returnType:et=>"string",resolver:({artifactVersion:et})=>et.commitHash});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-artifactSequence",argTypes:artifactVersionArgTypes,description:`Returns the artifactSequence for a ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The artifactSequence for a ${docType("artifactVersion")}`,returnType:et=>"artifact",resolver:({artifactVersion:et})=>et.artifactSequence});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-artifactType",argTypes:artifactVersionArgTypes,description:`Returns the type for a ${docType("artifactVersion")}`,argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:`The type for a ${docType("artifactVersion")}`,returnType:et=>"artifactType",resolver:({artifactVersion:et})=>et.artifactType});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-updateAliasActions",argTypes:artifactVersionArgTypes,description:"",argDescriptions:{artifactVersion:artifactVersionArgDescription},returnValueDescription:"",returnType:et=>typedDict({}),resolver:({artifactVersion:et})=>connectionToNodes(et?.artifactActions).filter(tt=>tt.__typename==="UpdateArtifactAction"&&(tt.newAliases!=null||tt.oldAliases!=null))});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-artifactCollections",argTypes:artifactVersionArgTypes,returnType:et=>list$1("artifact"),resolver:({artifactVersion:et})=>connectionToNodes(et.artifactCollections)});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-memberships",argTypes:artifactVersionArgTypes,returnType:et=>list$1("artifactMembership"),resolver:({artifactVersion:et})=>connectionToNodes(et.artifactMemberships)});const opArtifactVersionHistoryStep=makeArtifactVersionOp({hidden:!0,name:"artifactVersion-historyStep",argTypes:artifactVersionArgTypes,returnType:et=>maybe("number"),resolver:({artifactVersion:et})=>et.historyStep});makeArtifactVersionOp({hidden:!0,name:"artifactVersion-isWeaveObject",argTypes:artifactVersionArgTypes,returnType:et=>"boolean",resolver:async({artifactVersion:et},tt,nt,rt,ot,st)=>{try{const ut=await st.backend.getArtifactFileMetadata(et.id,"");if(ut==null||ut.type!=="dir")throw new Error("opArtifactVersionFiles: not a directory");return Object.keys(ut.files).some(ct=>ct.endsWith("obj.type.json"))}catch(ut){return console.warn("Error loading artifact",{err:ut,artifactVersion:et}),!1}}});makeBasicOp({hidden:!0,name:"artifactVersion-historyMetrics",argTypes:{artifactVersion:nullableOneOrMany("artifactVersion")},returnType:et=>mappableNullableTaggableVal(et,tt=>typedDict({})),resolver:async(et,tt,nt,rt,ot,st,ut)=>{const ct=ut(),ft=opArtifactVersionCreatedBy({artifactVersion:ot.op.inputs.artifactVersion}),pt=opRunProject({run:ft}),ht=opProjectEntity({project:pt}),mt=opDict({historyStep:opArtifactVersionHistoryStep({artifactVersion:ot.op.inputs.artifactVersion}),runName:opRunId({run:ft}),projectName:opProjectName({project:pt}),entityName:opEntityName({entity:ht})}),[yt]=await ct.executeNodes([mt]);if(lodash$2.exports.isArray(yt.runName)){const vt=yt.runName.map((Tt,Et)=>{const xt=yt.historyStep[Et],At=yt.projectName[Et],Ct=yt.entityName[Et];return xt==null?opDict({}):opRunHistoryAsOfStep({run:opProjectRun({project:opRootProject({entityName:constString(Ct),projectName:constString(At)}),runName:constString(Tt)}),asOfStep:constNumber(Math.max(0,xt-1))})});return ct.executeNodes(vt)}else return yt==null||yt.historyStep==null?Promise.resolve({}):(await ct.executeNodes([opRunHistoryAsOfStep({run:opProjectRun({project:opRootProject({entityName:constString(yt.entityName),projectName:constString(yt.projectName)}),runName:constString(yt.runName)}),asOfStep:constNumber(Math.max(0,yt.historyStep-1))})]))[0]},resolveOutputType:async(et,tt,nt,rt)=>{const ot=ft=>isListLike(et.artifactVersion)?list$1(ft):ft,st=replaceInputVariables(nt,rt.opStore),ut=await rt.query(st);if(ut==null||ut.length===0)return typedDict({});const ct=ut;return lodash$2.exports.isArray(ct)?ct.length===0?ot(typedDict({})):ot(union$2(ct.map(wandbJsonType))):wandbJsonType(ct)}});const opAssetArtifactVersion=makeOp({hidden:!0,name:"asset-artifactVersion",argTypes:{asset:nullableOneOrMany(union$2([withFileTag("any",{type:"file"})]))},description:`Returns the ${docType("artifactVersion")} of the asset`,argDescriptions:{asset:"The asset"},returnValueDescription:`The ${docType("artifactVersion")} of the asset`,returnType:et=>mappableNullable(et.asset.type,tt=>maybe("artifactVersion")),resolver:et=>mappableNullableVal(et.asset,nt=>{const rt=getActualNamedTagFromValue(nt,"file"),ot=rt?.file?.artifact?.id;return ot==null?(console.warn("opAssetArtifactVersion: unable to locate `artifactId` for asset with file tag",{asset:nt,fileTag:rt}),null):{id:ot}})}),mediaAssetArgTypes={asset:nullableOneOrMany(union$2(BASIC_MEDIA_TYPES))},opAssetFile=makeOp({name:"asset-file",argTypes:mediaAssetArgTypes,description:`Returns the ${docType("file")} of the asset`,argDescriptions:{asset:"The asset"},returnValueDescription:`The ${docType("file")} of the asset`,returnType:et=>mappableNullableTaggable(et.asset.type,tt=>({type:"file"})),resolver:async(et,tt,nt,rt,ot)=>{const st=constNode(nt.outputNode.node.type,et.asset);return await mappableNullableTaggableValAsync(et.asset,async ct=>(await ot().executeNodes([opArtifactVersionFile({artifactVersion:opAssetArtifactVersion({asset:st}),path:constString(ct.path)})],!1))[0])}}),assert$2=function(et,tt){if(!et)throw tt||"Assertion failed"},getopt=function(et,tt,nt){return et.hasOwnProperty(tt)?et[tt]:nt};let return_v=!1,v_val=0;const gaussRandom=function(){if(return_v)return return_v=!1,v_val;const et=2*Math.random()-1,tt=2*Math.random()-1,nt=et*et+tt*tt;if(nt===0||nt>1)return gaussRandom();const rt=Math.sqrt(-2*Math.log(nt)/nt);return v_val=tt*rt,return_v=!0,et*rt},randn=function(et,tt){return et+gaussRandom()*tt},zeros=function(et){if(typeof et>"u"||isNaN(et))return[];if(typeof ArrayBuffer>"u"){const tt=new Array(et);for(let nt=0;nt<et;nt++)tt[nt]=0;return tt}else return new Float64Array(et)},randn2d=function(et,tt,nt){const rt=typeof nt<"u",ot=[];for(let st=0;st<et;st++){const ut=[];for(let ct=0;ct<tt;ct++)rt?ut.push(nt):ut.push(randn(0,1e-4));ot.push(ut)}return ot},L2=function(et,tt){const nt=et.length;let rt=0;for(let ot=0;ot<nt;ot++){const st=et[ot],ut=tt[ot];rt+=(st-ut)*(st-ut)}return rt},xtod=function(et){const tt=et.length,nt=zeros(tt*tt);for(let rt=0;rt<tt;rt++)for(let ot=rt+1;ot<tt;ot++){const st=L2(et[rt],et[ot]);nt[rt*tt+ot]=st,nt[ot*tt+rt]=st}return nt},d2p=function(et,tt,nt){const rt=Math.sqrt(et.length),ot=Math.floor(rt);assert$2(ot===rt,"D should have square number of elements.");const st=Math.log(tt),ut=zeros(ot*ot),ct=zeros(ot);for(let ht=0;ht<ot;ht++){let mt=-1/0,yt=1/0,vt=1,Tt=!1;const Et=50;let xt=0;for(;!Tt;){let At=0;for(let Ot=0;Ot<ot;Ot++){let Rt=Math.exp(-et[ht*ot+Ot]*vt);ht===Ot&&(Rt=0),ct[Ot]=Rt,At+=Rt}let Ct=0,$t;for(let Ot=0;Ot<ot;Ot++)At===0?$t=0:$t=ct[Ot]/At,ct[Ot]=$t,$t>1e-7&&(Ct-=$t*Math.log($t));Ct>st?(mt=vt,yt===1/0?vt=vt*2:vt=(vt+yt)/2):(yt=vt,mt===-1/0?vt=vt/2:vt=(vt+mt)/2),xt++,Math.abs(Ct-st)<nt&&(Tt=!0),xt>=Et&&(Tt=!0)}for(let At=0;At<ot;At++)ut[ht*ot+At]=ct[At]}const ft=zeros(ot*ot),pt=ot*2;for(let ht=0;ht<ot;ht++)for(let mt=0;mt<ot;mt++)ft[ht*ot+mt]=Math.max((ut[ht*ot+mt]+ut[mt*ot+ht])/pt,1e-100);return ft};function sign$2(et){return et>0?1:et<0?-1:0}class tSNE{constructor(tt){tt=tt||{},this.perplexity=getopt(tt,"perplexity",30),this.dim=getopt(tt,"dim",2),this.epsilon=getopt(tt,"epsilon",10),this.iter=0}initDataRaw(tt){const nt=tt.length,rt=tt[0].length;assert$2(nt>0," X is empty? You must have some data!"),assert$2(rt>0," X[0] is empty? Where is the data?");const ot=xtod(tt);this.P=d2p(ot,this.perplexity,1e-4),this.N=nt,this.initSolution()}initDataDist(tt){const nt=tt.length;assert$2(nt>0," X is empty? You must have some data!");const rt=zeros(nt*nt);for(let ot=0;ot<nt;ot++)for(let st=ot+1;st<nt;st++){const ut=tt[ot][st];rt[ot*nt+st]=ut,rt[st*nt+ot]=ut}this.P=d2p(rt,this.perplexity,1e-4),this.N=nt,this.initSolution()}initSolution(){this.Y=randn2d(this.N,this.dim,void 0),this.gains=randn2d(this.N,this.dim,1),this.ystep=randn2d(this.N,this.dim,0),this.iter=0}getSolution(){return this.Y}step(){this.iter+=1;const tt=this.N,nt=this.costGrad(this.Y),rt=nt.cost,ot=nt.grad,st=zeros(this.dim);for(let ut=0;ut<tt;ut++)for(let ct=0;ct<this.dim;ct++){const ft=ot[ut][ct],pt=this.ystep[ut][ct],ht=this.gains[ut][ct];let mt=sign$2(ft)===sign$2(pt)?ht*.8:ht+.2;mt<.01&&(mt=.01),this.gains[ut][ct]=mt;const vt=(this.iter<250?.5:.8)*pt-this.epsilon*mt*ot[ut][ct];this.ystep[ut][ct]=vt,this.Y[ut][ct]+=vt,st[ct]+=this.Y[ut][ct]}for(let ut=0;ut<tt;ut++)for(let ct=0;ct<this.dim;ct++)this.Y[ut][ct]-=st[ct]/tt;return rt}debugGrad(){const tt=this.N,rt=this.costGrad(this.Y).grad,ot=1e-5;for(let st=0;st<tt;st++)for(let ut=0;ut<this.dim;ut++){const ct=this.Y[st][ut];this.Y[st][ut]=ct+ot;const ft=this.costGrad(this.Y);this.Y[st][ut]=ct-ot;const pt=this.costGrad(this.Y),ht=rt[st][ut],mt=(ft.cost-pt.cost)/(2*ot);console.log(st+","+ut+": gradcheck analytic: "+ht+" vs. numerical: "+mt),this.Y[st][ut]=ct}}costGrad(tt){const nt=this.N,rt=this.dim,ot=this.P,st=this.iter<100?4:1,ut=zeros(nt*nt);let ct=0;for(let yt=0;yt<nt;yt++)for(let vt=yt+1;vt<nt;vt++){let Tt=0;for(let xt=0;xt<rt;xt++){const At=tt[yt][xt]-tt[vt][xt];Tt+=At*At}const Et=1/(1+Tt);ut[yt*nt+vt]=Et,ut[vt*nt+yt]=Et,ct+=2*Et}const ft=nt*nt,pt=zeros(ft);for(let yt=0;yt<ft;yt++)pt[yt]=Math.max(ut[yt]/ct,1e-100);let ht=0;const mt=[];for(let yt=0;yt<nt;yt++){const vt=new Array(rt);for(let Tt=0;Tt<rt;Tt++)vt[Tt]=0;for(let Tt=0;Tt<nt;Tt++){ht+=-ot[yt*nt+Tt]*Math.log(pt[yt*nt+Tt]);const Et=4*(st*ot[yt*nt+Tt]-pt[yt*nt+Tt])*ut[yt*nt+Tt];for(let xt=0;xt<rt;xt++)vt[xt]+=Et*(tt[yt][xt]-tt[Tt][xt])}mt.push(vt)}return{cost:ht,grad:mt}}}const listArg0={arr:{type:"list",objectType:"any"}},makeListOp=makeBasicOp,unwrapConcreteList=et=>{if(isConcreteTaggedValue(et)){const tt=getTagFromTaggedValue(et),nt=getValueFromTaggedValue(et);if(lodash$2.exports.isArray(nt)&&tt!=null)return nt.map(rt=>concreteTaggedValue(tt,rt))}return et},toSafeCall=et=>{const tt=nullableTaggableValue(et.type);if(TYPES_WITH_DIGEST.some(nt=>isAssignableTo(tt,nt)))return opFileDigest({file:opAssetFile({asset:et})});if(isTypedDict(et.type)){const nt={};for(const rt in et.type.propertyTypes)et.type.propertyTypes[rt]!=null&&(nt[rt]=toSafeCall(opPick({obj:et,key:constString(escapeDots(rt))})));return opDict(nt)}else return et},opCount=makeListOp({name:"count",argTypes:{arr:{type:"list",objectType:"any"}},description:`Returns the count of elements in the ${docType("list")}.`,argDescriptions:{arr:`The ${docType("list")} to count.`},returnValueDescription:`The count of elements in the ${docType("list")}.`,returnType:et=>"number",resolver:({arr:et})=>et.length});makeListOp({name:"joinToStr",argTypes:{arr:{type:"list",objectType:"any"},sep:"string"},description:`Joins the elements of the ${docType("list")} into a ${docType("string")}.`,argDescriptions:{arr:`The ${docType("list")} to join.`,sep:"The separator to use between elements."},returnValueDescription:`The joined ${docType("string")}.`,returnType:et=>"string",resolver:({arr:et,sep:tt})=>et.length>0&&isConcreteTaggedValue(et[0])?et.map(unwrapTaggedValues).join(tt):et.join(tt)});makeOp({hidden:!0,name:"mapcount",argTypes:{arr:{type:"list",objectType:{type:"list",objectType:"any"}}},description:`Returns the count of elements in each ${docType("list")} in a ${docType("list")} of ${docType("list")}.`,argDescriptions:{arr:`The ${docType("list")} of ${docType("list",{plural:!0})} to count.`},returnValueDescription:`The count of elements in each ${docType("list")}`,returnType:{type:"list",objectType:"number"},resolver:et=>{const{arr:tt}=et;if(lodash$2.exports.isArray(tt)&&lodash$2.exports.isArray(tt[0])||tt[0]?._value!=null&&lodash$2.exports.isArray(tt[0]._value))return tt.map(nt=>nt._value!=null?nt._value.length:nt.length);throw new Error("opCountInner: not a list of lists")}});const opIndex=makeListOp({name:"index",description:`Retrieve a value from a ${docType("list")} by index`,argDescriptions:{arr:`The ${docType("list")} to index into.`,index:"The index to retrieve"},returnValueDescription:`A value from the ${docType("list")}`,argTypes:{arr:{type:"list",objectType:"any"},index:{type:"union",members:["number",{type:"list",objectType:{type:"union",members:["number","none"]}}]}},renderInfo:{type:"brackets"},returnType:({arr:et,index:tt})=>isListLike(tt)?et:listObjectType(et),resolver:({arr:et,index:tt})=>lodash$2.exports.isArray(tt)?tt.map(nt=>nt==null?null:et[nt]):et[tt],resolverIsSync:!0}),opOffset=makeListOp({hidden:!0,name:"offset",argTypes:{arr:{type:"list",objectType:"any"},offset:"number"},description:`Returns a ${docType("list")} with the first \`offset\` elements removed.`,argDescriptions:{arr:`The ${docType("list")} to remove elements from.`,offset:"The count of elements to remove."},returnValueDescription:`The ${docType("list")} with the first \`offset\` elements removed.`,returnType:({arr:et})=>et,resolver:({arr:et,offset:tt})=>et.slice(tt)}),opLimit=makeListOp({hidden:!0,name:"limit",argTypes:{arr:{type:"list",objectType:"any"},limit:"number"},description:`Returns a ${docType("list")} of the first \`limit\` elements.`,argDescriptions:{arr:`The ${docType("list")} to limit.`,limit:"The count of elements to limit to."},returnValueDescription:`The ${docType("list")} with the first \`limit\` elements.`,returnType:({arr:et},tt)=>tt.limit.nodeType==="const"?{...et,maxLength:tt.limit.val}:et,resolver:({arr:et,limit:tt})=>et.slice(0,tt)}),compareItems=(et,tt)=>{if(lodash$2.exports.isArray(et))for(let nt=0;nt<et.length;nt++){const rt=compareItems(et[nt],tt[nt]);if(rt!==0)return rt}else{if(et==null)return-1;if(tt==null)return 1;if(et<tt)return-1;if(et>tt)return 1}return 0},opSort=makeListOp({name:"sort",argTypes:{arr:{type:"list",objectType:"any"},compFn:{type:"function",inputTypes:{row:"any"},outputType:{type:"list",objectType:"any"}},columnDirs:{type:"list",objectType:"string"}},description:`Sorts the ${docType("list")}.`,argDescriptions:{arr:`The ${docType("list")} to sort.`,compFn:`A function to apply to each element of the array. The return value is a ${docType("list")} of values to sort by.`,columnDirs:`A ${docType("list")} of directions for each element in the value ${docType("list")}`},returnValueDescription:`The sorted ${docType("list")}.`,returnType:et=>et.arr,resolver:async(et,tt,nt,rt,ot,st,ut)=>{const ct=await ut().mapNode(et.compFn,unwrapConcreteList(nt.arr),!0);return et.arr.map((ft,pt)=>({row:ft,comparableObj:ct[pt]})).sort((ft,pt)=>{for(let ht=0;ht<et.columnDirs.length;ht++){const mt=compareItems(ft.comparableObj[ht],pt.comparableObj[ht]);if(mt!==0)return mt*(et.columnDirs[ht]==="asc"?1:-1)}return 0}).map(ft=>ft.row)}}),opFilter=makeListOp({name:"filter",argTypes:{arr:{type:"list",objectType:"any"},filterFn:{type:"function",inputTypes:{row:"any"},outputType:maybe("boolean")}},description:`Filters the ${docType("list")}.`,argDescriptions:{arr:`The ${docType("list")} to filter.`,filterFn:`A function to apply to each element of the ${docType("list")}. The return value is a boolean indicating whether the element should be included in the result.`},returnValueDescription:`The filtered ${docType("list")}.`,returnType:({arr:et})=>et,resolver:async(et,tt,nt,rt,ot,st,ut)=>{const{arr:ct}=et,ft=[],pt=await ut().mapNode(et.filterFn,unwrapConcreteList(nt.arr),!0);for(let ht=0;ht<pt.length;ht++){const mt=pt[ht],yt=ct[ht];mt&&ft.push(yt)}return ft}}),opIndexCheckpoint=makeListOp({name:"list-createIndexCheckpointTag",hidden:!0,argTypes:{arr:{type:"list",objectType:"any"}},description:`Tags each item in the ${docType("list")} with its index`,argDescriptions:{arr:`The ${docType("list")} to tag with indices`},returnValueDescription:`The ${docType("list")} with each element tagged with its index`,returnType:({arr:et})=>list$1(taggedValue(typedDict({indexCheckpoint:"number"}),listObjectType(et)),listMinLength(et),listMaxLength(et)),resolver:async({arr:et},tt)=>et.map((nt,rt)=>concreteTaggedValue({indexCheckpoint:rt},nt))}),opGetIndexCheckpointTag=makeTagGetterOp({name:"tag-indexCheckpoint",tagName:"indexCheckpoint",tagType:"number",hidden:!0}),opDropNa=makeConfigurableStandardOp({name:"dropna",typeConfig:{dims:1},argTypes:{arr:{type:"list",objectType:"any"}},description:`Drops elements of a ${docType("list")} which are null`,argDescriptions:{arr:`The ${docType("list")} to drop elements from.`},returnValueDescription:`The ${docType("list")} with null elements removed.`,returnType:({arr:et})=>{const tt=et.objectType,nt=isTaggedValue(tt)?tt.tag:null,rt=isTaggedValue(tt)?tt.value:tt,ot=(isUnion(rt)?rt.members:[rt]).filter(ut=>taggableStrip(ut)!=="none"),st=ot.length>0?taggedValue(nt,union$2(ot)):"none";return list$1(st,0,listMaxLength(et))},resolver:async({arr:et})=>et.filter(tt=>(isConcreteTaggedValue(tt)?tt._value:tt)!=null)}),opMap=makeListOp({name:"map",argTypes:{...listArg0,mapFn:{type:"function",inputTypes:{row:"any",index:"number"},outputType:"any"}},description:`Applies a map function to each element in the ${docType("list")}`,argDescriptions:{arr:`The ${docType("list")} to map over.`,mapFn:`A function to apply to each element of the ${docType("list")}.`},returnValueDescription:`The ${docType("list")} with each element mapped over.`,returnType:({arr:et,mapFn:tt})=>{if(!isFunction$b(tt))throw new Error("opMap: expected mapFn to be a function");return list$1(tt.outputType,listMinLength(et),listMaxLength(et))},resolver:async(et,tt,nt,rt,ot,st,ut)=>await ut().mapNode(et.mapFn,unwrapConcreteList(nt.arr),!1),resolveOutputType:async(et,tt,nt,rt,ot)=>{const ut=tt.fromOp.inputs.mapFn,ct=et.arr;if(ut.nodeType!=="const")throw new Error("invalid, mapFn must be const");const ft=replaceInputVariables(nt.fromOp.inputs.arr,rt.opStore);let pt=await rt.query(opCount({arr:ft}));pt>MAX_RUN_LIMIT&&(console.warn("Dropping types in opMap refine"),pt=MAX_RUN_LIMIT);const ht=lodash$2.exports.range(pt).map(vt=>refineNode(rt,ut.val,pushFrame(ot,{row:opIndex({arr:ft,index:constNumber(vt)})}))),mt=await Promise.all(ht);return{type:"list",objectType:pt===0?"none":union$2(mt.map(vt=>vt.type)),minLength:ct.minLength,maxLength:ct.maxLength}}}),applyOpToOneOrMany=(et,tt,nt,rt)=>isListLike(nt.type)?opMap({arr:nt,mapFn:constFunction({row:listObjectType(nt.type)},({row:ot})=>et({[tt]:ot,...rt}))}):et({[tt]:nt,...rt}),opMapEach=makeTagConsumingStandardOp({name:"mapEach",hidden:!0,argTypes:{obj:"any",mapFn:{type:"function",inputTypes:{row:"any"},outputType:"any"}},description:`Applies a map function to each "cell" in a multi-dimensional ${docType("list")}`,argDescriptions:{obj:`The ${docType("list")} to map over.`,mapFn:`A function to apply to each element of the ${docType("list")}.`},returnValueDescription:`The ${docType("list")} with each element mapped over.`,returnType:({obj:et,mapFn:tt})=>{if(!isFunction$b(tt))throw new Error("opMapEach: expected mapFn to be a function");return tt.outputType},resolver:async({obj:et,mapFn:tt},nt,rt,ot,st,ut,ct)=>new Promise(async ft=>ft((await ct().executeNodes([callFunction(tt,{row:constNodeUnsafe(nt.obj,et)})],!1))[0]))});function groupKeyObjToString(et){let tt="";return lodash$2.exports.isObject(et)?tt=JSON.stringify(unwrapTaggedValues(et)):et!=null&&(tt=""+et),tt}const opGroupby=makeListOp({hidden:!0,name:"groupby",argTypes:{arr:{type:"list",objectType:"any"},groupByFn:{type:"function",inputTypes:{row:"any"},outputType:"any"}},description:`Groups elements of a ${docType("list")} based on a function`,argDescriptions:{arr:`The ${docType("list")} to group.`,groupByFn:`A function to group the ${docType("list")} by.`},returnValueDescription:`A ${docType("list")} of ${docType("list")}, each containing the elements of the original ${docType("list")} grouped by the function.`,returnType:({arr:et,groupByFn:tt})=>{const nt=listObjectType(et);if(!isFunction$b(tt))throw new Error("invalid group by arg");return list$1(withGroupTag(list$1(nt),tt.outputType))},resolver:async(et,tt,nt,rt,ot,st,ut)=>{const ct=et.arr,ft=et.groupByFn,pt=ft.nodeType==="void"?ft:toSafeCall(ft),ht=ut(),mt=someNodes(ft,Et=>Et.nodeType==="var",!0);let yt,vt;if(mt)yt=await st.trace("groupRawKeys",async()=>(await ht.mapNode(ft,ct,!1)).map(Et=>Et??"")),vt=await st.trace("groupSafeKeys",async()=>(await ht.mapNode(pt,ct,!0)).map(Et=>Et??""));else{const Et=(await ht.executeNodes([ft],!1))[0];yt=Array(ct.length).fill(Et),vt=yt}const Tt={};return await st.trace("final",async()=>{for(let Et=0;Et<yt.length;Et++){const xt=yt[Et],At=groupKeyObjToString(vt[Et]),Ct=ct[Et];Tt[At]==null&&(Tt[At]=concreteWithNamedTag("groupKey",xt,[])),Tt[At]._value.push(Ct)}}),Object.values(Tt)},resolveOutputType:async(et,tt,nt,rt,ot)=>{const st=tt.fromOp.inputs,{arr:ut,groupByFn:ct}=st,ft=et.arr.objectType;if(ct.nodeType!=="const")throw new Error("invalid, mapFn must be const");const pt=await refineNode(rt,ct.val,pushFrame(ot,{row:opIndex({arr:ut,index:constNumber(0)})}));return list$1(withGroupTag(list$1(ft),pt.type))}}),opGroupGroupKey=makeTagGetterOp({hidden:!0,name:"group-groupkey",tagName:"groupKey",tagType:"any"}),listToDict=(et,tt,nt)=>(et[tt]||(et[tt]=[]),et[tt].push(nt),et),opJoin=makeOp({name:"join",argTypes:{arr1:maybe({type:"list",objectType:"any"}),arr2:maybe({type:"list",objectType:"any"}),join1Fn:{type:"function",inputTypes:{row:"any"},outputType:"any"},join2Fn:{type:"function",inputTypes:{row:"any"},outputType:"any"},alias1:"string",alias2:"string",leftOuter:"boolean",rightOuter:"boolean"},description:`Joins two ${docType("list")}`,argDescriptions:{arr1:`The first ${docType("list")} to join.`,arr2:`The second ${docType("list")} to join.`,join1Fn:`A function that returns the join key for each element in the first ${docType("list")}`,join2Fn:`A function that returns the join key for each element in the second ${docType("list")}`,alias1:`The alias to use for the first ${docType("list")}.`,alias2:`The alias to use for the second ${docType("list")}.`,leftOuter:`Whether the output should include rows in the first ${docType("list")} that do not match any rows in the second ${docType("list")}.`,rightOuter:`Whether the output should include rows in the second ${docType("list")} that do not match any rows in the first ${docType("list")}.`},returnValueDescription:`A ${docType("list")} of ${docType("typedDict")}. Each ${docType("typedDict")} has keys \`alias1\` and \`alias2\`. The values are the rows corresponding to the join.`,returnType:et=>{const{arr1:tt,arr2:nt,alias1:rt,alias2:ot,join1Fn:st,join2Fn:ut}=et;if(rt.nodeType!=="const"||ot.nodeType!=="const")throw new Error("opJoin only supports const aliases");const ct=listObjectType(tt.type),ft=listObjectType(nt.type);return list$1(withJoinTag(typedDict({[rt.val]:maybe(ct),[ot.val]:maybe(ft)}),maybe(union$2([st.type.outputType,ut.type.outputType]))))},resolver:async(et,tt,nt,rt,ot)=>{const{join1Fn:st,join2Fn:ut,alias1:ct,alias2:ft,leftOuter:pt,rightOuter:ht}=et;let mt=getValueFromTaggedValue(et.arr1),yt=getValueFromTaggedValue(et.arr2);const vt=listObjectType(nt.op.inputs.arr1.type),Tt=listObjectType(nt.op.inputs.arr1.type);mt==null&&(mt=[]),yt==null&&(yt=[]);let Et=mt.map(kt=>callFunction(st,{row:constNodeUnsafe(vt,kt)}));Et=Et.concat(yt.map(kt=>callFunction(ut,{row:constNodeUnsafe(Tt,kt)}))).map(toSafeCall);const xt=(await ot().executeNodes(Et,!0)).map(groupKeyObjToString),At=xt.slice(0,mt.length),Ct=xt.slice(mt.length),$t=At.reduce(listToDict,{}),Ot=Ct.reduce(listToDict,{});let Rt;pt&&ht?Rt=lodash$2.exports.union(At,Ct):pt?Rt=lodash$2.exports.uniq(At):ht?Rt=lodash$2.exports.uniq(Ct):Rt=lodash$2.exports.intersection(At,Ct);const It=[];for(const kt of Rt){let Mt=$t[kt],Ft=Ot[kt];ht&&!Mt&&(Mt=[null]),pt&&!Ft&&(Ft=[null]);for(const zt of Mt)for(const Vt of Ft)It.push(concreteTaggedValue({joinKey:kt},{[ct]:zt!=null?mt[zt]:null,[ft]:Vt!=null?yt[Vt]:null}))}return It},resolveOutputType:async(et,tt,nt,rt)=>{const{arr1:ot,arr2:st,alias1:ut,alias2:ct,join1Fn:ft,join2Fn:pt}=et.fromOp.inputs;if(ut.nodeType!=="const"||ct.nodeType!=="const"||ft.nodeType!=="const"||pt.nodeType!=="const")throw new Error("opJoin only supports const aliases & functions");const ht=await refineNode(nt,ot,[]),mt=await refineNode(nt,st,[]),yt=await refineNode(nt,ft.val,pushFrame(rt,{row:opIndex({arr:ht,index:constNumber(0)})})),vt=await refineNode(nt,pt.val,pushFrame(rt,{row:opIndex({arr:mt,index:constNumber(0)})})),Tt=listObjectType(ht.type),Et=listObjectType(mt.type);return{...et,type:list$1(withJoinTag(typedDict({[ut.val]:maybe(Tt),[ct.val]:maybe(Et)}),maybe(union$2([yt.type,vt.type]))))}}}),typedDictWithListProperties=(et,tt,nt)=>skipTaggable(et,(rt,ot)=>{if(!isTypedDictLike(rt))throw new Error("typedDictWithListProperties: expected type to be dict-like");return typedDict(lodash$2.exports.mapValues(typedDictPropertyTypes(rt),st=>list$1(st,void 0,tt)))}),objectPathWithTagsPushedToLeafs=(et,tt)=>nullableTaggableVal(et,nt=>tt.length===1?nt[tt[0]]:objectPathWithTagsPushedToLeafs(nt[tt[0]],tt.slice(1))),addItemAtPath=(et,tt,nt)=>{let rt=et;for(const st of tt.slice(0,tt.length-1))rt[st]==null&&(rt[st]={}),rt=rt[st];const ot=tt[tt.length-1];if(rt[ot]==null&&(rt[ot]=[]),!lodash$2.exports.isArray(rt[ot]))throw new Error("uh-ohhhhhh");rt[ot].push(nt)},cloneDeepObj=et=>lodash$2.exports.isArray(et)?[...et]:lodash$2.exports.isObject(et)?lodash$2.exports.mapValues(et,cloneDeepObj):et,opJoinAll=makeOp({hidden:!1,name:"joinAll",argTypes:{arrs:{type:"list",objectType:{type:"union",members:["none",{type:"list",objectType:{type:"typedDict",propertyTypes:{}}}]}},joinFn:{type:"function",inputTypes:{row:{type:"typedDict",propertyTypes:{}}},outputType:"any"},outer:"boolean"},description:`Join all ${docType("list")} together`,argDescriptions:{arrs:`${docType("list")} to join`,joinFn:"Function to calculate join key",outer:`Whether to include rows from ${docType("list")} which do not match others`},returnValueDescription:`A ${docType("list")} of ${docType("typedDict",{plural:!0})}. Each dictionary contains keys 0 - N, where N is the count of ${docType("list")}.`,returnType:et=>{const{arrs:tt,joinFn:nt}=et;if(!isFunction$b(nt.type))throw new Error("opJoinAll: expected joinFn to be a function");return opJoinAllReturnType(tt.type,nt.type)},resolver:async(et,tt,nt,rt,ot)=>{const{arrs:st,joinFn:ut,outer:ct}=et,ft=getValueFromTaggedValue(st).map(getValueFromTaggedValue).filter(Rt=>Rt!=null),pt=allObjPaths(listObjectType(listObjectType(nt.op.inputs.arrs.type)),0).map(Rt=>Rt.path),ht=lodash$2.exports.flatMap(ft,(Rt,It,kt)=>Rt.map(Mt=>callFunction(ut,{row:constNodeUnsafe({type:"typedDict",propertyTypes:{}},Mt)}))),mt=ht.map(toSafeCall),yt=ot(),vt=await yt.executeNodes(ht,!1),Tt=(await yt.executeNodes(mt,!0)).map(groupKeyObjToString),Et=lodash$2.exports.fromPairs(lodash$2.exports.zip(Tt,vt).filter(Rt=>Rt[1]!=null));let xt=0;const At=ft.map(Rt=>{const It=Tt.slice(xt,xt+Rt.length);return xt+=Rt.length,It}),Ct=At.map(Rt=>Rt.reduce(listToDict,{})),$t=ct?lodash$2.exports.union(...At):lodash$2.exports.intersection(...At),Ot=[];for(const Rt of $t)if(Rt!==""){let It=[];Ct.forEach((kt,Mt)=>{const Ft=kt[Rt]??[];if(It.length===0){if(Ft.forEach(zt=>{const Vt={},Zt=ft[Mt][zt];pt.forEach(Ut=>{const Xt=objectPathWithTagsPushedToLeafs(Zt,Ut);addItemAtPath(Vt,Ut,Xt)}),It.push(Vt)}),Ft.length===0&&ct){const zt={};pt.forEach(Zt=>{const Ut=objectPathWithTagsPushedToLeafs(null,Zt);addItemAtPath(zt,Zt,Ut)}),It.push(zt)}}else{const zt=[];It.forEach(Vt=>{if(Ft.forEach(Zt=>{const Ut=cloneDeepObj(Vt),Xt=ft[Mt][Zt];pt.forEach(Jt=>{const gn=objectPathWithTagsPushedToLeafs(Xt,Jt);addItemAtPath(Ut,Jt,gn)}),zt.push(Ut)}),Ft.length===0&&ct){const Zt=cloneDeepObj(Vt),Ut=null;pt.forEach(Xt=>{const Jt=objectPathWithTagsPushedToLeafs(Ut,Xt);addItemAtPath(Zt,Xt,Jt)}),zt.push(Zt)}}),It=zt}}),It.forEach(kt=>{Ot.push(concreteTaggedValue({joinKey:Rt,joinObj:Et[Rt]},kt))})}return Ot},resolveOutputType:async(et,tt,nt)=>{const rt=await nt.query(opCount({arr:tt.fromOp.inputs.arrs})),ot=et.fromOp.inputs,st=opJoinAllReturnType(ot.arrs.type,ot.joinFn.type,rt);return{...et,type:st}}}),opGetJoinedJoinObj=makeTagGetterOp({hidden:!0,name:"tag-joinObj",tagName:"joinObj",tagType:"any"}),opConcatArgs={arr:{type:"list",objectType:{type:"union",members:["none",{type:"list",objectType:"any"}]}}},opConcat=makeBasicOp({name:"concat",argTypes:opConcatArgs,description:`Concatenate all ${docType("list",{plural:!0})} together`,argDescriptions:{arr:`${docType("list")} of ${docType("list",{plural:!0})} to concatenate`},returnValueDescription:`Concatenated ${docType("list")}`,returnType:({arr:et})=>{const tt=nonNullable(et.objectType);if(isUnion(tt)){if(!tt.members.every(isListLike))throw new Error("opConcat: expected all members of inner type to be list-like");return list$1(union$2(tt.members.map(listObjectType)))}else if(isTaggedValue(tt)){const nt=taggedValueValueType(tt),rt=taggedValueTagType(tt),ot=listObjectType(nt);return list$1(taggedValue(rt,ot))}return tt},resolver:async et=>lodash$2.exports.concat([],...et.arr.map(tt=>isConcreteTaggedValue(tt)&&lodash$2.exports.isArray(tt._value)?tt._value.map(nt=>concreteTaggedValue(tt._tag,nt)):tt).filter(tt=>tt!=null))}),opUnnest=makeOp({hidden:!0,name:"unnest",argTypes:{arr:maybe({type:"list",objectType:{type:"typedDict",propertyTypes:{}}})},description:`Unnest a ${docType("list")} of ${docType("typedDict")} such that the result is a ${docType("list")} of ${docType("typedDict")} where each ${docType("typedDict")}'s properties are non-lists.`,argDescriptions:{arr:`${docType("list")} of ${docType("typedDict")} to unnest`},returnValueDescription:`Unnested ${docType("list")}`,returnType:et=>{const{arr:tt}=et,nt=listObjectType(tt.type);if(!isTypedDictLike(nt))throw new Error("opUnnest: expected arr object type to be typedDict");const rt={},ot=typedDictPropertyTypes(nt);for(const st of Object.keys(ot)){const ut=ot[st];if(ut==null)throw new Error("opUnnest: expected all property types to be non-null");rt[st]=isList(ut)?ut.objectType:ut}return maybe({type:"list",objectType:{type:"typedDict",propertyTypes:rt}})},resolver:async(et,tt,nt,rt)=>{const ot=nt.outputNode.node.fromOp.inputs.arr,st=listObjectType(ot.type),ut=[],ct=typedDictPropertyTypes(st);for(const ht of Object.keys(ct)){const mt=ct[ht];isListLike(mt)&&ut.push(ht)}const ft=getValueFromTaggedValue(et.arr);if(ft==null)return null;const pt=[];for(const ht of ft){const mt={};for(const yt of Object.keys(ht)){const vt=ht[yt];ut.includes(yt)||(mt[yt]=vt)}if(ut.length>0){const yt=[];for(const vt of ut){const Tt=ht[vt];isConcreteTaggedValue(Tt)?yt.push(Tt._value?.map(Et=>concreteTaggedValue(Tt._tag,Et))):yt.push(Tt)}for(const vt of lodash$2.exports.zip(...yt)){const Tt={...mt};for(const[Et,xt]of ut.entries())Tt[xt]=vt[Et];pt.push(Tt)}}else pt.push(mt)}return pt}}),comparableObjectType=union$2(["string","number","boolean"]),opContains=makeListOp({name:"contains",argTypes:{arr:{type:"list",objectType:comparableObjectType},element:comparableObjectType},description:`Check if a ${docType("list")} contains a ${docType("string")}`,argDescriptions:{arr:`${docType("list")} to check`,element:`${docType("string")} to check for`},returnValueDescription:`True if the ${docType("list")} contains <element>`,returnType:et=>"boolean",resolver:et=>{const{arr:tt}=et;let{element:nt}=et;return isConcreteTaggedValue(nt)&&(nt=unwrapTaggedValues(nt)),tt.length>0&&isConcreteTaggedValue(tt[0])?tt.some(rt=>unwrapTaggedValues(rt)===nt):tt.indexOf(nt)!==-1}}),opUnique=makeListOp({hidden:!0,name:"unique",argTypes:{arr:{type:"list",objectType:"any"}},description:"Compute unique elements",argDescriptions:{arr:`${docType("list")} to process`},returnValueDescription:`Return unique elements of ${docType("list")}`,returnType:et=>et.arr,resolver:et=>lodash$2.exports.uniqWith(et.arr,lodash$2.exports.isEqual)}),concreteTagSafeFlatten=(et,tt)=>{if(isConcreteTaggedValue(et)){const nt=getTagFromTaggedValue(et);tt!=null&&nt!=null?tt=concreteTaggedValue(tt,nt):nt!=null&&(tt=nt),et=getValueFromTaggedValue(et)}return lodash$2.exports.isArray(et)?lodash$2.exports.flatMap(et,nt=>concreteTagSafeFlatten(nt,tt)):tt!=null?concreteTaggedValue(tt,et):et},tagSafeFlatten=(et,tt)=>{if(isTaggedValue(et)){const nt=et.tag;tt!=null&&nt!=null?tt=taggedValue(tt,nt):nt!=null&&(tt=nt),et=et.value}return isListLike(et)?tagSafeFlatten(listObjectType(et),tt):tt!=null?taggedValue(tt,et):et},opFlatten=makeOp({hidden:!0,name:"flatten",argTypes:{arr:{type:"list",objectType:"any"}},description:`Flatten a ${docType("list")} of ${docType("list",{plural:!0})}`,argDescriptions:{arr:`${docType("list")} of ${docType("list",{plural:!0})} to flatten`},returnValueDescription:`Flattened ${docType("list")}`,returnType:et=>list$1(tagSafeFlatten(et.arr.type)),resolver:et=>concreteTagSafeFlatten(et.arr)});function opJoinAllReturnType(et,tt,nt){return nullableTaggable(et,st=>{if(!isListLike(st))throw new Error("opJoinAllReturnType: arrsType must be a list");const ut=listObjectType(st),ct=skipNullable(ut,pt=>skipTaggable(pt,(mt,yt)=>{if(!isListLike(mt))throw new Error("opJoinAllReturnType: innerListNonNullValueType must be a list, found "+typeToString(mt));const vt=listObjectType(mt);return skipNullable(vt,Et=>skipTaggable(Et,(xt,At)=>{if(!isTypedDictLike(xt))throw new Error("opJoinAllReturnType: innerListRowNonNullValueType object type must be a typed dict, found "+typeToString(xt));const Ct=kt=>taggedValue(yt,taggedValue(At,kt)),$t=typedDictPropertyTypes(xt),Ot=lodash$2.exports.mapValues($t,Ct),Rt=typedDict(Ot);return typedDictWithListProperties(Rt,nt)}))}));return list$1(withJoinTag(ct,tt.outputType))})}const projectableType={type:"list",objectType:maybe({type:"list",objectType:maybe("number")})},projectableToRawList=et=>et.map(tt=>tt==null?null:getValueFromTaggedValue(tt).map(getValueFromTaggedValue)),ensureNDimensions=(et,tt,nt)=>(tt=Math.min(tt,nt),et.map(rt=>(rt==null&&(rt=[]),rt.length<tt?rt.concat(Array(tt-rt.length).fill(0)):rt.length===tt?rt:rt.slice(0,nt)))),wrapConcreteNewListElementsWithOldListElementTags=(et,tt)=>{if(et.length!==tt.length)throw new Error("Expected both arrays to be of the same length");return et.map((nt,rt)=>{const ot=tt[rt];return isConcreteTaggedValue(ot)?concreteTaggedValue(getTagFromTaggedValue(ot),nt):nt})},replaceListElementType=(et,tt)=>{const nt=listObjectType(tt),rt=listMinLength(tt),ot=listMaxLength(tt);return isTaggedValue(nt)&&(et=taggedValue(taggedValueTagType(nt),et)),list$1(et,rt,ot)},opListTSNE=makeConfigurableStandardOp({name:"list-tSNE",hidden:!0,argTypes:{arr:maybe(projectableType),dimensions:"number",perplexity:"number",learningRate:"number",iterations:"number"},typeConfig:{dims:2},description:`Run t-SNE on a ${docType("list")} of ${docType("list",{plural:!0})} of numbers (vectors)`,argDescriptions:{arr:`List of ${docType("list",{plural:!0})} to run t-SNE on`,dimensions:"Number of dimensions to reduce to",perplexity:"Perplexity of the t-SNE algorithm",learningRate:"Learning rate of the t-SNE algorithm",iterations:"Number of iterations of the t-SNE algorithm"},returnValueDescription:`A t-SNE projected ${docType("list")} of ${docType("list",{plural:!0})} of numbers (vectors).`,returnType:({arr:et})=>replaceListElementType(list$1("number"),et),resolver:async({arr:et,dimensions:tt,perplexity:nt,learningRate:rt,iterations:ot})=>{const st=Date.now()+1e4,ut=ensureNDimensions(projectableToRawList(et),tt,MAX_PROJECTION_DIMENSIONS),ct=new tSNE({epsilon:rt,perplexity:nt,dim:tt});ct.initDataRaw(ut);for(let ft=0;ft<ot&&!(Date.now()>st);ft++)ct.step();return wrapConcreteNewListElementsWithOldListElementTags(ct.getSolution(),et)}}),opListUMAP=makeConfigurableStandardOp({name:"list-UMAP",hidden:!0,argTypes:{arr:maybe(projectableType),dimensions:"number",neighbors:"number",minDist:"number",spread:"number"},typeConfig:{dims:2},description:`Run UMAP on a ${docType("list")} of ${docType("list",{plural:!0})} of numbers (vectors)`,argDescriptions:{arr:`List of ${docType("list",{plural:!0})} to run UMAP on`,dimensions:"Number of dimensions to reduce to",neighbors:"Number of neighbors to use",minDist:"Minimum distance between neighbors",spread:"Spread of the neighborhood"},returnValueDescription:`A UMAP projected ${docType("list")} of ${docType("list",{plural:!0})} of numbers (vectors)`,returnType:({arr:et})=>replaceListElementType(list$1("number"),et),resolver:async({arr:et,dimensions:tt,neighbors:nt,minDist:rt,spread:ot})=>{const{UMAP:st}=await __vitePreload(()=>import("./index.1357e4e7.js").then(ft=>ft.i),[]),ut=ensureNDimensions(projectableToRawList(et),tt,MAX_PROJECTION_DIMENSIONS),ct=new st({nComponents:tt,nNeighbors:Math.min(nt,ut.length-1),minDist:rt,spread:ot});return wrapConcreteNewListElementsWithOldListElementTags(ct.fit(ut),et)}}),withDisabledConsoleLog=et=>{const tt=console.log;console.log=()=>{};const nt=et();return console.log=tt,nt},opListPCA=makeConfigurableStandardOp({name:"list-PCA",hidden:!0,argTypes:{arr:maybe(projectableType),dimensions:"number"},typeConfig:{dims:2},description:`Run PCA on a ${docType("list")} of ${docType("list",{plural:!0})} of numbers (vectors)`,argDescriptions:{arr:`List of ${docType("list",{plural:!0})} to run PCA on`,dimensions:"Number of dimensions to reduce to"},returnValueDescription:`A PCA projected ${docType("list")} of ${docType("list",{plural:!0})} of numbers (vectors)`,returnType:({arr:et})=>replaceListElementType(list$1("number"),et),resolver:async({arr:et,dimensions:tt})=>{const nt=await __vitePreload(()=>import("./pca.b229dd6b.js").then(st=>st.p),[]),rt=ensureNDimensions(projectableToRawList(et),tt,MAX_PROJECTION_DIMENSIONS),ot=withDisabledConsoleLog(()=>nt.getEigenVectors(rt));return wrapConcreteNewListElementsWithOldListElementTags(nt.transpose(nt.computeAdjustedData(rt,...ot.slice(0,tt)).adjustedData),et)}}),MAX_PROJECTION_RECORDS=1500,MAX_PROJECTION_DIMENSIONS=50,opTable2DProjection=makeConfigurableStandardOp({name:"table-2DProjection",hidden:!0,typeConfig:{dims:1},argTypes:{table:{type:"list",objectType:maybe({type:"typedDict",propertyTypes:{}})},projectionAlgorithm:"string",inputCardinality:"string",inputColumnNames:{type:"list",objectType:"string"},algorithmOptions:{type:"typedDict",propertyTypes:{tsne:{type:"typedDict",propertyTypes:{perplexity:"number",learningRate:"number",iterations:"number"}},pca:{type:"typedDict",propertyTypes:{}},umap:{type:"typedDict",propertyTypes:{neighbors:"number",minDist:"number",spread:"number"}}}}},description:`Apply a 2D projection to a ${docType("list")} of ${docType("typedDict",{plural:!0})}`,argDescriptions:{table:`${docType("list")} of ${docType("typedDict",{plural:!0})} to project`,projectionAlgorithm:"Algorithm to use (pca, tsne, umap)",inputCardinality:"Cardinality of the input data (single, multiple)",inputColumnNames:"List of column names to project",algorithmOptions:"Options for the algorithm"},returnValueDescription:`${docType("list")} of ${docType("typedDict",{plural:!0})} with projected columns`,returnType:({table:et})=>replaceListElementType(typedDict({projection:typedDict({x:"number",y:"number"}),source:listObjectType(et)}),et),resolver:async({table:et,inputCardinality:tt,inputColumnNames:nt,algorithmOptions:rt,projectionAlgorithm:ot},st,ut,ct,ft,pt,ht)=>{if(et=lodash$2.exports.sampleSize(et,MAX_PROJECTION_RECORDS),nt.length===0||et.length<2)return wrapConcreteNewListElementsWithOldListElementTags(et.map((At,Ct)=>({projection:{x:0,y:0},source:et[Ct]})),et);tt==="single"?nt=[nt[0]]:nt=lodash$2.exports.sampleSize(nt,MAX_PROJECTION_DIMENSIONS);const mt=et.map(At=>tt==="single"?typedDictPathVal(getValueFromTaggedValue(At),splitEscapedString(nt[0])):nt.map(Ct=>typedDictPathVal(getValueFromTaggedValue(At),splitEscapedString(Ct)))),yt=constNode(projectableType,mt),vt=rt;let Tt;if(ot==="pca")Tt=opListPCA({arr:yt,dimensions:constNumber(2)});else if(ot==="tsne")Tt=opListTSNE({arr:yt,dimensions:constNumber(2),perplexity:constNumber(vt.tsne.perplexity),learningRate:constNumber(vt.tsne.learningRate),iterations:constNumber(vt.tsne.iterations)});else if(ot==="umap")Tt=opListUMAP({arr:yt,dimensions:constNumber(2),neighbors:constNumber(vt.umap.neighbors),minDist:constNumber(vt.umap.minDist),spread:constNumber(vt.umap.spread)});else throw new Error("Invalid projectionAlgorithm");const xt=(await ht().executeNodes([Tt]))[0].map((At,Ct)=>({projection:{x:At[0],y:At[1]},source:et[Ct]}));return wrapConcreteNewListElementsWithOldListElementTags(xt,et)}});makeConfigurableStandardOp({name:"table-projection2D",hidden:!0,typeConfig:{dims:1},argTypes:{table:{type:"list",objectType:maybe({type:"typedDict",propertyTypes:{}})},projectionAlgorithm:"string",inputCardinality:"string",inputColumnNames:{type:"list",objectType:"string"},algorithmOptions:{type:"typedDict",propertyTypes:{tsne:{type:"typedDict",propertyTypes:{perplexity:"number",learningRate:"number",iterations:"number"}},pca:{type:"typedDict",propertyTypes:{}},umap:{type:"typedDict",propertyTypes:{neighbors:"number",minDist:"number",spread:"number"}}}}},description:`Apply a 2D projection to a ${docType("list")} of ${docType("typedDict",{plural:!0})}`,argDescriptions:{table:`${docType("list")} of ${docType("typedDict",{plural:!0})} to project`,projectionAlgorithm:"Algorithm to use (pca, tsne, umap)",inputCardinality:"Cardinality of the input data (single, multiple)",inputColumnNames:"List of column names to project",algorithmOptions:"Options for the algorithm"},returnValueDescription:`${docType("list")} of ${docType("typedDict",{plural:!0})} with projected columns`,returnType:({table:et})=>replaceListElementType(typedDict({projection:typedDict({x:"number",y:"number"}),source:listObjectType(et)}),et),resolver:async({table:et,inputCardinality:tt,inputColumnNames:nt,algorithmOptions:rt,projectionAlgorithm:ot},st,ut,ct,ft,pt,ht)=>{throw new Error("not implemented in js")}});makeOp({name:"range",argTypes:{start:"number",stop:"number",step:"number"},description:"TODO",renderInfo:{type:"function"},argDescriptions:{todo:"todo"},returnValueDescription:`The joined ${docType("string")}.`,returnType:et=>list$1("number"),resolver:({start:et,stop:tt,step:nt})=>{const rt=[];for(let ot=et;ot<tt;ot+=nt)rt.push(ot);return rt}});makeListOp({name:"randomlyDownsample",hidden:!0,argTypes:{arr:{type:"list",objectType:"any"},n:"number"},description:`Randomly downsamples the ${docType("list")} to n elements, preserving order.`,argDescriptions:{arr:`The ${docType("list")} to sample.`,n:"The number of elements to sample. Must be greater than 0 and less than the length of the list."},returnValueDescription:`The sampled ${docType("list")}.`,returnType:({arr:et})=>et,resolver:({arr:et,n:tt})=>randomlyDownsample(et,tt)});function gaussian$1(et,tt,nt){const rt=[];for(let ot=0;ot<nt;ot++){let st=0,ut=0;for(;st===0;)st=Math.random();for(;ut===0;)ut=Math.random();let ct=Math.sqrt(-2*Math.log(st))*Math.cos(2*Math.PI*ut);ct=ct*tt+et,rt.push(ct)}return rt}makeOp({name:"gauss",argTypes:{mean:"number",std:"number",n:"number"},description:"Sample from a gaussian distribution with mean and standard deviation.",argDescriptions:{mean:"The mean of the distribution.",std:"The standard deviation of the distribution."},returnValueDescription:"A sample from the gaussian distribution.",returnType:()=>({type:"list",objectType:"number"}),resolver:({mean:et,std:tt,n:nt})=>gaussian$1(et,tt,nt),renderInfo:{type:"function"}});makeOp({hidden:!0,name:"get-tag",argTypes:{value:maybe(taggedValue("any","any"))},description:`Returns the tag of a ${docType("tagged")}`,argDescriptions:{value:`The ${docType("tagged")}`},returnValueDescription:`The tag of the ${docType("tagged")}`,returnType:et=>mappableNullable(et.value.type,tt=>{if(isUnion(tt))throw new Error("opGetTag: expected input to not be a union");if(!isTaggedValue(tt))throw new Error("opGetTag: expected input to be a tagged value");return tt.tag}),resolver:et=>mappableNullableVal(et.value,tt=>tt._tag)});makeOp({name:"if",hidden:!0,argTypes:{condition:maybe("boolean"),then:"any",else:"any"},kind:"basic",description:"If the condition is true, returns the then value, otherwise returns the else value",argDescriptions:{condition:"Condition to evaluate",then:"Value to return if condition is true",else:"Value to return if condition is false"},returnValueDescription:"If the condition is true, returns the then value, otherwise returns the else value",returnType:et=>union$2([et.then.type,et.else.type]),resolver:({condition:et,then:tt,else:nt})=>et?tt:nt,resolveOutputType:async(et,tt,nt)=>{const rt=et.fromOp.inputs.condition,ot=et.fromOp.inputs.then,st=et.fromOp.inputs.else,ut=await nt.query(rt);let ct=et.type;return ut?ct=ot.type:ct=st.type,{...et,type:ct}}});makeOp({hidden:!0,name:"internal-lambdaClosureArgBridge",argTypes:{arg:"any"},description:"",argDescriptions:{arg:""},returnValueDescription:"",returnType:et=>et.arg.type,resolver:et=>et.arg});const makeArtifactOp=makeStandardOp,artifactArgDescription=`A ${docType("artifact")}`,artifactArgTypes$1={artifact:"artifact"};makeArtifactOp({hidden:!0,name:"artifact-id",argTypes:artifactArgTypes$1,returnType:et=>"string",resolver:({artifact:et})=>et.id});const opArtifactName=makeArtifactOp({name:"artifact-name",argTypes:artifactArgTypes$1,description:`Returns the name of the ${docType("artifact")}`,argDescriptions:{artifact:artifactArgDescription},returnValueDescription:`The name of the ${docType("artifact")}`,returnType:et=>"string",resolver:({artifact:et})=>et.name});makeArtifactOp({hidden:!0,name:"artifact-description",argTypes:artifactArgTypes$1,returnType:et=>"string",resolver:({artifact:et})=>et.description});makeArtifactOp({hidden:!0,name:"artifact-aliases",argTypes:artifactArgTypes$1,returnType:et=>list$1("artifactAlias"),resolver:({artifact:et})=>connectionToNodes(et.aliases)});const opArtifactType=makeArtifactOp({hidden:!0,name:"artifact-type",argTypes:artifactArgTypes$1,description:`Returns the type of the ${docType("artifact")}`,argDescriptions:{artifact:artifactArgDescription},returnValueDescription:`The type of the ${docType("artifact")}`,returnType:et=>maybe("artifactType"),resolver:({artifact:et})=>et.defaultArtifactType}),opArtifactVersions=makeArtifactOp({name:"artifact-versions",argTypes:artifactArgTypes$1,description:`Returns the versions of the ${docType("artifact")}`,argDescriptions:{artifact:artifactArgDescription},returnValueDescription:`The versions of the ${docType("artifact")}`,returnType:et=>list$1("artifactVersion"),resolver:({artifact:et})=>connectionToNodes(et.artifacts)});makeArtifactOp({hidden:!0,name:"artifact-lastMembership",argTypes:artifactArgTypes$1,returnType:et=>"artifactMembership",resolver:({artifact:et})=>connectionToNodes(et.lastMembership)[0]});const opArtifactCreatedAt=makeArtifactOp({hidden:!0,name:"artifact-createdAt",argTypes:artifactArgTypes$1,description:`Returns the creation date of the ${docType("artifact")}`,argDescriptions:{artifact:artifactArgDescription},returnValueDescription:`The creation date of the ${docType("artifact")}`,returnType:et=>"date",resolver:({artifact:et})=>hooks(et.createdAt+"Z").toDate()});makeArtifactOp({hidden:!0,name:"artifact-project",argTypes:artifactArgTypes$1,description:`Returns the ${docType("project")} of the ${docType("artifact")}`,argDescriptions:{artifact:artifactArgDescription},returnValueDescription:`The ${docType("project")} of the ${docType("artifact")}`,returnType:et=>"project",resolver:({artifact:et})=>et.project});makeArtifactOp({name:"artifact-link",argTypes:artifactArgTypes$1,description:`Returns the url for a ${docType("artifact")}`,argDescriptions:{artifact:artifactArgDescription},returnValueDescription:`The url for a ${docType("artifact")}`,returnType:et=>"link",resolver:({artifact:et})=>({name:et.name,url:artifactCollection({entityName:et.project.entity.name,projectName:et.project.name,artifactTypeName:et.defaultArtifactType.name,artifactCollectionName:et.name})})});makeArtifactOp({hidden:!0,name:"artifact-memberships",argTypes:artifactArgTypes$1,returnType:et=>list$1("artifactMembership"),resolver:({artifact:et})=>connectionToNodes(et.artifactMemberships)});const opArtifactMembershipForAlias=makeArtifactOp({hidden:!0,name:"artifact-membershipForAlias",argTypes:{artifact:"artifact",aliasName:"string"},returnType:et=>"artifactMembership",resolver:({artifact:et,aliasName:tt})=>et[sanitizeGQLAlias(`artifactMembership_${tt}`)]});makeArtifactOp({hidden:!0,name:"artifact-isPortfolio",argTypes:artifactArgTypes$1,returnType:et=>"boolean",resolver:({artifact:et})=>et.__typename==="ArtifactPortfolio"});makeArtifactOp({hidden:!0,name:"artifact-rawTags",argTypes:artifactArgTypes$1,returnType:et=>list$1(typedDict({id:"string",name:"string",tagCategoryName:"string",attributes:"string"})),resolver:({artifact:et})=>connectionToNodes(et.tags)});const artifactAliasArgTypes={artifactAlias:"artifactAlias"},opArtifactAliasAlias=makeStandardOp({hidden:!0,name:"artifactAlias-alias",argTypes:artifactAliasArgTypes,returnType:et=>"string",resolver:({artifactAlias:et})=>et.alias});makeStandardOp({hidden:!0,name:"artifactAlias-artifact",argTypes:artifactAliasArgTypes,returnType:et=>"artifact",resolver:({artifactAlias:et})=>et.artifactCollection});const artifactArgTypes={artifactMembership:"artifactMembership"};makeStandardOp({hidden:!0,name:"artifactMembership-id",argTypes:artifactArgTypes,returnType:et=>"string",resolver:({artifactMembership:et})=>et.id});makeStandardOp({hidden:!0,name:"artifactMembership-collection",argTypes:artifactArgTypes,returnType:et=>"artifact",resolver:({artifactMembership:et})=>et.artifactCollection});const opArtifactMembershipArtifactVersion=makeStandardOp({hidden:!0,name:"artifactMembership-artifactVersion",argTypes:artifactArgTypes,returnType:et=>"artifactVersion",resolver:({artifactMembership:et})=>et.artifact});makeStandardOp({hidden:!0,name:"artifactMembership-createdAt",argTypes:artifactArgTypes,returnType:et=>({type:"timestamp",unit:"ms"}),resolver:({artifactMembership:et})=>et.createdAt});makeStandardOp({hidden:!0,name:"artifactMembership-commitHash",argTypes:artifactArgTypes,returnType:et=>"string",resolver:({artifactMembership:et})=>et.commitHash});makeStandardOp({hidden:!0,name:"artifactMembership-versionIndex",argTypes:artifactArgTypes,returnType:et=>"number",resolver:({artifactMembership:et})=>et.versionIndex});makeStandardOp({hidden:!0,name:"artifactMembership-aliases",argTypes:artifactArgTypes,returnType:et=>list$1("artifactAlias"),resolver:({artifactMembership:et})=>et.aliases});makeStandardOp({hidden:!0,name:"artifactMembership-link",argTypes:artifactArgTypes,returnType:et=>"link",resolver:({artifactMembership:et})=>({name:`${et.artifactCollection.name}:v${et.versionIndex}`,url:artifact({entityName:et.artifactCollection.project.entity.name,projectName:et.artifactCollection.project.name,artifactTypeName:et.artifactCollection.defaultArtifactType.name,artifactSequenceName:et.artifactCollection.name,artifactCommitHash:`v${et.versionIndex}`})})});const makeArtifactTypeOp=makeStandardOp,artifactTypeArgTypes={artifactType:"artifactType"},artifactTypeArgDescription=`A ${docType("artifactType")}`,opArtifactTypeName=makeArtifactTypeOp({name:"artifactType-name",argTypes:artifactTypeArgTypes,description:`Returns the name of the ${docType("artifactType")}`,argDescriptions:{artifactType:artifactTypeArgDescription},returnValueDescription:`The name of the ${docType("artifactType")}`,returnType:et=>"string",resolver:({artifactType:et})=>et.name}),opArtifactTypeArtifacts=makeArtifactTypeOp({name:"artifactType-artifacts",argTypes:artifactTypeArgTypes,description:`Returns the ${docType("artifact",{plural:!0})} of the ${docType("artifactType")}`,argDescriptions:{artifactType:artifactTypeArgDescription},returnValueDescription:`The ${docType("artifact",{plural:!0})} of the ${docType("artifactType")}`,returnType:et=>list$1("artifact"),resolver:({artifactType:et})=>connectionToNodes(et.artifactCollections)});makeArtifactTypeOp({hidden:!0,name:"artifactType-sequences",argTypes:artifactTypeArgTypes,returnType:et=>list$1("artifact"),resolver:({artifactType:et})=>connectionToNodes(et.artifactSequences)});makeArtifactTypeOp({hidden:!0,name:"artifactType-portfolios",argTypes:artifactTypeArgTypes,returnType:et=>list$1("artifact"),resolver:({artifactType:et})=>connectionToNodes(et.artifactPortfolios)});makeArtifactTypeOp({name:"artifactType-artifactVersions",argTypes:artifactTypeArgTypes,description:`Returns the ${docType("artifactVersion",{plural:!0})} of all ${docType("artifact",{plural:!0})} of the ${docType("artifactType")}`,argDescriptions:{artifactType:artifactTypeArgDescription},returnValueDescription:`The ${docType("artifactVersion",{plural:!0})} of all ${docType("artifact",{plural:!0})} of the ${docType("artifactType")}`,returnType:et=>list$1("artifactVersion"),resolver:({artifactType:et})=>connectionToNodes(et.artifactCollections).flatMap(tt=>connectionToNodes(tt.artifacts))});const makeResolveOutputTypeFromOp=(et,tt=[])=>async(rt,ot,st)=>{const ut=tt.map(ht=>refineNode(st,replaceInputVariables(ot.fromOp.inputs[ht],st.opStore),[])),ct=await Promise.all(ut),ft={...ot.fromOp.inputs};tt.forEach((ht,mt)=>{ft[ht]=ct[mt]});const pt=await st.query(et(ft));return{...rt,type:pt}},patchImageFileTypes=async(et,tt,nt,rt,ot)=>(isAssignableTo(rt,maybe({type:"image-file"}))&&(rt=await nullableTaggableAsync(rt,async st=>{const ut=st;if(ut.classMap!=null)return ut;let ft=0,pt=[],ht=[];ut.boxScoreKeys=[],ut.classMap={};for(const yt of tt.data){const vt=yt[ot];if(vt!=null){if(vt.masks!=null&&(pt=lodash$2.exports.union(pt,Object.keys(vt.masks))),vt.boxes!=null){ht=lodash$2.exports.union(ht,Object.keys(vt.boxes));for(const Tt of Object.values(vt.boxes))Tt.scores!=null&&(ut.boxScoreKeys=lodash$2.exports.union(ut.boxScoreKeys,Object.keys(Tt.scores)))}if(vt.classes?.path!=null){const Tt=opFileContents({file:opArtifactVersionFile({artifactVersion:opAssetArtifactVersion({asset:nt}),path:constString(vt.classes?.path)})}),Et=await et.query(Tt),xt=JSON.parse(Et);if(xt.class_set!=null)for(const At of xt.class_set)At.id!=null&&At.name!=null&&ut.classMap[String(At.id)]==null&&(ut.classMap[String(At.id)]=String(At.name))}if(ft+=1,ft>=10)break}}const mt=Object.keys(ut.classMap);return ut.maskLayers=lodash$2.exports.fromPairs(lodash$2.exports.map(pt,yt=>[yt,mt])),ut.boxLayers=lodash$2.exports.fromPairs(lodash$2.exports.map(ht,yt=>[yt,mt])),ut})),rt),tableRowTypeFromTableData=async(et,tt,nt)=>{const rt=tt;if(rt==null)return"none";const ot=detectColumnTypes(rt),st=tableNeedsFloatColumnConversion(rt),ut={};for(let ct=0;ct<rt.columns.length;ct++)ut[rt.columns[ct]]=await patchImageFileTypes(et,rt,nt,ot[ct],ct);if(rt.column_types){const ct=opAssetArtifactVersion({asset:nt}),ft=rt.column_types.params.type_map;for(const pt of rt.columns){const ht=ft[st?`${pt}.0`:pt];if(ht!=null&&(isForeignIndexWBType(ht)||isForeignKeyWBType(ht))){const mt=opTableRows({table:opFileTable({file:opArtifactVersionFile({artifactVersion:ct,path:constString(ht.params.table)})})}),yt=await refineNode(et,mt,[]);yt&&yt.type&&isList(yt.type)&&(ut[pt]=yt.type.objectType)}}}return list$1(withTableRowTag(typedDict(ut),nt.type))},opTableRowsType=makeOp({hidden:!0,name:"table-rowsType",argTypes:{table:nullableOneOrMany({type:"table",columnTypes:{}})},description:`Returns the type of rows of a ${docType("table")}`,argDescriptions:{table:`A ${docType("table")}`},returnValueDescription:`The type of rows of the ${docType("table")}`,returnType:"type",resolver:async({table:et},tt,nt,rt,ot)=>{if(et==null)return"none";const st=new EngineClient(ot()),ut=nt.op.inputs.table,ct=getValueFromTaggedValue(et);if(isList(nullableTaggableValue(ut.type))){const ft=await Promise.all(ct.map((ht,mt)=>tableRowTypeFromTableData(st,getValueFromTaggedValue(ht),opIndex({arr:ut,index:constNumber(mt)})))),pt=ft.length===0?"none":union$2(ft);return list$1(pt,ft.length,ft.length)}return tableRowTypeFromTableData(st,ct,nt.op.inputs.table)}}),opTableRows=makeOp({name:"table-rows",argTypes:{table:nullableOneOrMany({type:"table",columnTypes:{}})},description:`Returns the rows of a ${docType("table")}`,argDescriptions:{table:`A ${docType("table")}`},returnValueDescription:`The rows of the ${docType("table")}`,returnType:et=>mappableNullableSkipTaggable(et.table.type,tt=>{if(!isTable(tt))throw new Error("opTableRows: expected table");return list$1(withTableRowTag(typedDict(tt.columnTypes),et.table.type))}),resolver:async(et,tt,nt,rt,ot)=>mappableNullableSkipTaggableValAsync(et.table,async(st,ut,ct)=>{const ft={},pt={};if(st.column_types){let ht=nt.op.inputs.table;ct!=null&&(ht=opIndex({arr:ht,index:constNumber(ct)}));const mt=opAssetArtifactVersion({asset:ht}),yt=st.column_types.params.type_map,vt=tableNeedsFloatColumnConversion(st);for(const Tt of st.columns){const Et=yt[vt?`${Tt}.0`:Tt];let xt=null;if(Et!=null&&(isForeignIndexWBType(Et)||isForeignKeyWBType(Et))){const At=opTableRows({table:opFileTable({file:opArtifactVersionFile({artifactVersion:mt,path:constString(Et.params.table)})})});xt=(await ot().executeNodes([At],!1))[0],isForeignIndexWBType(Et)?ft[Tt]=xt:(pt[Tt]={},xt.forEach(Ct=>{const $t=Ct._value?Ct._value:Ct;$t[Et.params.col_name]&&(pt[Tt][$t[Et.params.col_name]]=Ct)}))}}}return st.data.map((ht,mt)=>{const yt={};for(let vt=0;vt<st.columns.length;vt++)st.columns[vt]in ft?yt[st.columns[vt]]=ft[st.columns[vt]][ht[vt]]:st.columns[vt]in pt?yt[st.columns[vt]]=pt[st.columns[vt]][ht[vt]]:yt[st.columns[vt]]=ht[vt];return concreteWithNamedTag("table",ut,yt)})}),resolveOutputType:makeResolveOutputTypeFromOp(opTableRowsType,["table"])});makeTagGetterOp({hidden:!0,name:"tablerow-table",tagName:"table",tagType:{type:"table",columnTypes:{}}});const opPartitionedTableInputTypes={partitionedTable:maybe({type:"partitioned-table",columnTypes:{}})},partitionedTableExpansion=async(et,tt,nt)=>{const rt=opPartitionedTableFile({partitionedTable:nt.partitionedTable}),ot=opFileArtifactVersion({file:rt}),st=tt.parts_path,ut=opFileDir({file:opArtifactVersionFile({artifactVersion:ot,path:constString(st)})}),ft=(await et.query(ut)).files,ht=Object.keys(ft).filter(yt=>yt.endsWith("table.json")).map(yt=>opFileTable({file:opArtifactVersionFile({artifactVersion:ot,path:constString(st+"/"+yt)})})).map(yt=>opTableRows({table:yt})),mt=opArray(lodash$2.exports.fromPairs(ht.map((yt,vt)=>[""+vt,yt])));return opConcat({arr:mt})},opPartitionedTableRowsType=makeOp({hidden:!0,name:"partitionedtable-rowsType",argTypes:opPartitionedTableInputTypes,returnType:"type",resolver:async({partitionedTable:et},tt,nt,rt,ot)=>{if(et==null)return"none";const st=new EngineClient(ot()),ut=nt.op.inputs.partitionedTable;if(ut.nodeType!=="output")throw new Error("opPartitionedTableRows: expected output node");const ct=await st.query(ut);if(ct==null)return"none";const ft=await partitionedTableExpansion(st,ct.partitionedTable,nt.op.inputs);return(await refineNode(st,ft,[])).type}}),opPartitionedTableRows=makeOp({name:"partitionedtable-rows",argTypes:opPartitionedTableInputTypes,description:`Returns the rows of a ${docType("partitioned-table")}`,argDescriptions:{partitionedTable:`The ${docType("partitioned-table")} to get rows from`},returnValueDescription:`Rows of the ${docType("partitioned-table")}`,returnType:et=>mappableNullableSkipTaggable(et.partitionedTable.type,tt=>{if(!isPartitionedTable(tt))throw new Error("opPartitionedTableRows: expected partitioned table");return list$1(withTableRowTag(typedDict({}),et.partitionedTable.type))}),resolver:async(et,tt,nt,rt,ot)=>{const st=ot();return mappableNullableSkipTaggableValAsync(et.partitionedTable,async(ut,ct)=>{const ft=await partitionedTableExpansion(new EngineClient(st),ut.partitionedTable,nt.outputNode.node.fromOp.inputs);return(await st.executeNodes([ft],!1))[0]})},resolveOutputType:makeResolveOutputTypeFromOp(opPartitionedTableRowsType,["partitionedTable"])}),opPartitionedTableFile=makeOp({name:"partitionedtable-file",argTypes:opPartitionedTableInputTypes,description:`Returns the ${docType("file")} of a ${docType("partitioned-table")}`,argDescriptions:{partitionedTable:`The ${docType("partitioned-table")}`},returnValueDescription:`${docType("file")} of the ${docType("partitioned-table")}`,returnType:et=>mappableNullableTaggable(et.partitionedTable.type,tt=>({type:"file"})),resolver:async et=>await mappableNullableTaggableVal(et.partitionedTable,tt=>tt)}),opJoinedTableInputsTypes={joinedTable:maybe({type:"joined-table",columnTypes:{}}),leftOuter:"boolean",rightOuter:"boolean"},joinedTableExpansion=async(et,tt)=>{const nt=opJoinedTableFile({joinedTable:tt.joinedTable}),rt=opFileArtifactVersion({file:nt}),ot=et.table1,st=et.table2,ut=et.join_key,ct=et.join_key,ft=opArtifactVersionFile({artifactVersion:rt,path:constString(ot)}),pt=ot.endsWith(".partitioned-table.json")?opPartitionedTableRows({partitionedTable:opFilePartitionedTable({file:ft})}):opTableRows({table:opFileTable({file:ft})}),ht=opArtifactVersionFile({artifactVersion:rt,path:constString(st)}),mt=st.endsWith(".partitioned-table.json")?opPartitionedTableRows({partitionedTable:opFilePartitionedTable({file:ht})}):opTableRows({table:opFileTable({file:ht})});return opJoin({arr1:pt,arr2:mt,join1Fn:constFunction({row:typedDict({[ut]:"any"})},({row:yt})=>opPick({obj:yt,key:constString(ut)})),join2Fn:constFunction({row:typedDict({[ut]:"any"})},({row:yt})=>opPick({obj:yt,key:constString(ct)})),alias1:constString("0"),alias2:constString("1"),leftOuter:tt.leftOuter,rightOuter:tt.rightOuter})},opJoinedTableRowsType=makeOp({hidden:!0,name:"joinedtable-rowsType",argTypes:opJoinedTableInputsTypes,returnType:"type",resolver:async({joinedTable:et},tt,nt,rt,ot)=>{if(et==null)return"none";const st=new EngineClient(ot()),ut=nt.op.inputs.joinedTable;if(ut.nodeType!=="output")throw new Error("opJoinedTableRows: expected output node");const ct=await st.query(ut);if(ct==null)return"none";const ft=await joinedTableExpansion(ct.joinedTable,nt.op.inputs);return(await refineNode(st,ft,[])).type}}),opJoinedTableRows=makeOp({name:"joinedtable-rows",argTypes:opJoinedTableInputsTypes,description:`Returns the rows of a ${docType("joined-table")}`,argDescriptions:{joinedTable:`The ${docType("joined-table")}`,leftOuter:"Whether to include rows from the left table that do not have a matching row in the right table",rightOuter:"Whether to include rows from the right table that do not have a matching row in the left table"},returnValueDescription:`The rows of the ${docType("joined-table")}`,returnType:et=>mappableNullableSkipTaggable(et.joinedTable.type,tt=>{if(!isJoinedTable(tt))throw new Error("opJoinedTableRows: input must be a joined table");return list$1(withTableRowTag(typedDict({}),et.joinedTable.type))}),resolver:async(et,tt,nt,rt,ot)=>mappableNullableSkipTaggableValAsync(et.joinedTable,async(st,ut)=>{const ct=await joinedTableExpansion(st.joinedTable,nt.outputNode.node.fromOp.inputs);return(await ot().executeNodes([ct],!1))[0]}),resolveOutputType:makeResolveOutputTypeFromOp(opJoinedTableRowsType,["joinedTable"])}),opJoinedTableFile=makeOp({name:"joinedtable-file",argTypes:{joinedTable:maybe({type:"joined-table",columnTypes:{}})},description:`Returns the ${docType("file")} of a ${docType("joined-table")}`,argDescriptions:{joinedTable:`The ${docType("joined-table")}`},returnValueDescription:`The  ${docType("file")} of a ${docType("joined-table")}`,returnType:et=>mappableNullableTaggable(et.joinedTable.type,tt=>({type:"file"})),resolver:async et=>await mappableNullableTaggableVal(et.joinedTable,tt=>tt)}),getFirstError=et=>{if(et.status_code==="ERROR")return et.status_message??"";for(const tt of et.child_spans??[]){const nt=getFirstError(tt);if(nt!=null)return nt}return null},getSpanRepr=et=>{const tt=et.name??et.span_kind??"Unknown",nt=[];for(const rt of et.child_spans??[])nt.push(getSpanRepr(rt));return nt.length===0?tt:`${tt}(${nt.join(", ")})`},getSpanInputAsMarkdownString=et=>(et.results??[]).map((tt,nt)=>Object.entries(tt.inputs??{}).map(([rt,ot],st)=>`**${nt}.${rt}:** ${ot}`).join(`

`)).join(`

`),getSpanOutputAsMarkdownString=et=>(et.results??[]).map((tt,nt)=>Object.entries(tt.outputs??{}).map(([rt,ot],st)=>`**${nt}.${rt}:** ${ot}`).join(`

`)).join(`

`),opWBTraceTreeStartTime=makeTaggingStandardOp({name:"wb_trace_tree-startTime",argTypes:{trace_tree:{type:"wb_trace_tree"}},hidden:!0,returnType:et=>maybe("number"),resolver:({trace_tree:et})=>{try{return JSON.parse(et.root_span_dumps).start_time_ms}catch(tt){return console.error(tt),null}}}),opWBTraceTreeSummary=makeTaggingStandardOp({name:"wb_trace_tree-traceSummaryDict",argTypes:{trace_tree:{type:"wb_trace_tree"}},hidden:!0,returnType:et=>typedDict({isSuccess:maybe("boolean"),startTime:maybe("number"),formattedInput:"string",formattedOutput:"string",formattedChain:"string",error:maybe("string"),modelHash:maybe("string")}),resolver:({trace_tree:et})=>{const{root_span_dumps:tt,model_hash:nt}=et;let rt={};try{rt=JSON.parse(tt)}catch(ot){console.error(ot)}return{isSuccess:rt.status_code==null||rt.status_code==="SUCCESS",startTime:rt.start_time_ms,formattedInput:getSpanInputAsMarkdownString(rt),formattedOutput:getSpanOutputAsMarkdownString(rt),formattedChain:getSpanRepr(rt),error:getFirstError(rt),modelHash:nt}}});function valToTypeSimple(et){return typeof et=="string"||et===null?"string":typeof et=="number"?"number":typeof et=="boolean"?"boolean":"any"}const opDirOpenReturnType=makeOp({hidden:!0,name:"dir-pathReturnType",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{dir:{type:"dir"},path:"string"},returnType:et=>"type",resolver:({path:et})=>{throw new Error("not implemented")}}),opDirOpen=makeOp({hidden:!0,name:"dir-path",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{dir:ALL_DIR_TYPE,path:"string"},returnType:et=>({type:"file"}),resolver:({path:et})=>{throw new Error("not implemented")},resolveOutputType:async(et,tt,nt)=>{const rt=opDirOpenReturnType(tt.fromOp.inputs);let ot=await nt.query(rt);return!isSimpleTypeShape(ot)&&ot.type==="local_file"&&(ot=filePathToType(tt.fromOp.inputs.path.val)),{...et,type:ot}}});makeOp({hidden:!0,name:"root-localArtifact",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",renderInfo:{type:"function"},argTypes:{path:"string"},returnType:et=>"artifactVersion",resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"root-string",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",renderInfo:{type:"function"},argTypes:{v:"string"},returnType:et=>"string",resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"localArtifact-get",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{artifact:"artifactVersion",name:"string"},returnType:et=>({type:"file",extension:"json",wbObjectType:{type:"image-file"}}),resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"local-snowflaketable",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",renderInfo:{type:"function"},argTypes:{path:"string"},returnType:et=>list$1(typedDict({})),resolver:({path:et})=>{throw new Error("not implemented")},resolveOutputType:async(et,tt,nt)=>{const rt=opIndex({arr:tt,index:constNumber(1)}),ot=await nt.query(rt);let st=list$1(typedDict({}));return ot!=null&&(st=list$1(typedDict(lodash$2.exports.mapValues(ot,ut=>valToTypeSimple(ut))))),{...et,type:st}}});makeOp({name:"local-sqlconnection",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",renderInfo:{type:"function"},argTypes:{path:"string"},returnType:et=>"sqlconnection",resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"sqlconnection-tables",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{conn:"sqlconnection"},returnType:et=>typedDict({}),resolver:({path:et})=>{throw new Error("not implemented")},resolveOutputType:async(et,tt,nt)=>{const rt=opSqlConnTablesType({conn:tt.fromOp.inputs.conn}),ot=await nt.query(rt);return{...et,type:ot}}});const opSqlConnTablesType=makeOp({hidden:!0,name:"sqlconnection-tablesType",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",renderInfo:{type:"function"},argTypes:{conn:"sqlconnection"},returnType:et=>"type",resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"sqlconnection-table",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{conn:"sqlconnection",name:"string"},returnType:et=>typedDict({}),resolver:({path:et})=>{throw new Error("not implemented")},resolveOutputType:async(et,tt,nt)=>{const rt=opIndex({arr:tt,index:constNumber(1)}),ot=await nt.query(rt);let st=list$1(typedDict({}));return ot!=null&&(st=list$1(typedDict(lodash$2.exports.mapValues(ot,ut=>valToTypeSimple(ut))))),{...et,type:st}}});const opGetReturnType=makeOp({hidden:!0,name:"getReturnType",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",renderInfo:{type:"function"},argTypes:{path:"string"},returnType:et=>"type",resolver:({path:et})=>{throw new Error("not implemented")}}),opGet=makeOp({hidden:!0,name:"get",renderInfo:{type:"function"},description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{uri:"string"},returnType:et=>"any",resolver:({path:et})=>{throw new Error("not implemented")},resolveOutputType:async(et,tt,nt)=>{const rt=opGetReturnType(tt.fromOp.inputs),ot=await nt.query(rt);return{...et,type:ot}}});makeOp({hidden:!0,name:"save",description:"hello",argDescriptions:{obj:"hello",name:"hello"},returnValueDescription:"hello",argTypes:{obj:"any",name:"string"},returnType:et=>et.obj.type,resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"artifactVersion-fileReturnType",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",renderInfo:{type:"function"},argTypes:{path:"string"},returnType:et=>"type",resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!1,name:"Ref-get",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{self:{type:"union",members:[{type:"Ref",objectType:"any"},{type:"FilesystemArtifactRef",objectType:"any"}]}},returnType:et=>{const tt=et.self.type;return isUnion(tt)?union$2(tt.members.map(nt=>nt.objectType)):et.self.type.objectType},resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"execute",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{node:{type:"function",inputTypes:{},outputType:"any"}},returnType:et=>et.node.type.outputType,resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"function-__call__",argTypes:{self:{type:"function",inputTypes:{},outputType:"any"}},returnType:et=>et.self.type.outputType,resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"Scatter-selected",argTypes:{self:{type:"Scatter"}},returnType:et=>et.self.type.input_node.outputType,resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"Geo-selected",argTypes:{self:{type:"Geo"}},returnType:et=>et.self.type.input_node.outputType,resolver:({path:et})=>{throw new Error("not implemented")}});makeOp({hidden:!0,name:"Facet-selected",argTypes:{self:{type:"Facet"}},returnType:et=>et.self.type.input_node.outputType,resolver:({path:et})=>{throw new Error("not implemented")}});const unwrapConstType=et=>isConstType(et)?et.valType==="type"?unwrapConstType(et.val):unwrapConstType(et.valType):et,opObjGetAttr=makeStandardOp({hidden:!0,name:"Object-__getattr__",argTypes:{self:"any",name:"string"},returnType:(et,tt)=>{const nt=unwrapConstType(et.self);if(tt.name.nodeType!=="const")return"unknown";const rt=tt.name.val;return isSimpleTypeShape(nt)&&nt==="type"?rt==="property_types"||rt==="propertyTypes"?dict("type"):rt==="members"?list$1("type"):"type":unionObjectTypeAttrTypes(nt)[rt]??"unknown"},resolverIsSync:!0,resolver:et=>{let tt=et.self;if(tt==null)return null;if(tt.type==="const"){if(et.name==="val")return tt.val;if(et.name==="valType")return tt.valType;tt=unwrapConstType(tt)}return(et.name==="property_types"||et.name==="propertyTypes")&&tt.propertyTypes!=null?tt.propertyTypes:(et.name==="object_type"||et.name==="objectType")&&tt.objectType!=null?tt.objectType:tt[et.name]}});makeOp({hidden:!0,name:"type-__newType__",argTypes:{name:"string",manyX:"unknown"},returnType:"type",resolver:et=>ALL_BASIC_TYPES.includes(et.name)?et.name:{type:et.name,...lodash$2.exports.mapValues(lodash$2.exports.omit(et,"name"),(tt,nt)=>(tt.type==="const"&&(tt.valType==="type"?tt=tt.val:tt=tt.valType),tt))}});makeOp({hidden:!0,name:"op_get_tag_type",argTypes:{obj_type:"type"},returnType:"type",resolver:et=>isTaggedValue(et.obj_type)?et.obj_type.tag:"none"});makeOp({hidden:!0,name:"op_make_type_tagged",argTypes:{obj_type:"type",tag_type:"type"},returnType:"type",resolver:et=>(isTypedDict(et.tag_type)&&taggedValue(et.tag_type,et.obj_type),et.obj_type)});makeOp({hidden:!0,name:"op_make_type_key_tag",argTypes:{obj_type:"type",key:"string",tag_type:"type"},returnType:"type",resolver:et=>{let tt={[et.key]:et.tag_type};return isTaggedValue(et.tag_type)&&isTypedDict(et.tag_type.tag)&&(tt={...tt,...et.tag_type.tag.propertyTypes}),isTypedDict(et.tag_type)&&taggedValue(et.tag_type,et.obj_type),taggedValue(typedDict(tt),et.obj_type)}});makeOp({hidden:!0,name:"op-non_none",argTypes:{obj_type:"type"},returnType:"type",resolver:et=>nonNullable(et.obj_type)});makeOp({hidden:!0,name:"op-to_py",argTypes:{self:"any"},returnType:et=>et.self.type,resolver:et=>{throw new Error("cant resolve op-to_py in js")}});makeOp({name:"op-cross_product",renderInfo:{type:"function"},description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{obj:{type:"dict",objectType:{type:"list",objectType:"any"}}},returnType:et=>{const tt=et.obj.type;if(isTypedDict(tt)){const nt=lodash$2.exports.mapValues(tt.propertyTypes,rt=>rt.objectType);return{type:"list",objectType:typedDict(nt)}}throw new Error("unhandled type in op-cross-product")}});makeStandardOp({name:"Chain-run",description:"hello",argDescriptions:{conf:"hello",size:"hello"},returnValueDescription:"hello",argTypes:{chain:{type:"Chain"},query:"string"},returnType:et=>({type:"ChainRunResult",_is_object:!0,_base_type:{type:"Object"},chain:et.chain,query:"string",result:"string",latency:"number",trace:{type:"wb_trace_tree"}}),resolver:et=>{throw new Error("cant resolve op-chain-run in js")}});const nullable=et=>et==="none"||isNullable(et),listLike=et=>isListLike(nonNullable(et)),listObjIsNullable=et=>nullable(listObjectType(nonNullable(et))),NLN=et=>nullable(et)&&listLike(et)&&listObjIsNullable(et),NLC=et=>nullable(et)&&listLike(et)&&!listObjIsNullable(et),NS$8=et=>nullable(et)&&!listLike(et),CLN=et=>!nullable(et)&&listLike(et)&&listObjIsNullable(et),CLC=et=>!nullable(et)&&listLike(et)&&!listObjIsNullable(et),CS=et=>!nullable(et)&&!listLike(et),opNoneCoalesce=makeOp({hidden:!0,name:"none-coalesce",argTypes:{lhs:nullableOneOrMany("any"),rhs:nullableOneOrMany("any")},description:"Returns the second value if the first is null, otherwise the first value",argDescriptions:{lhs:"The first value",rhs:"The second value"},returnValueDescription:"The second value if the first is null, otherwise the first value",returnType:et=>{const tt=isTaggedValue(et.lhs.type)?et.lhs.type.value:et.lhs.type,nt=st=>isTaggedValue(et.lhs.type)?taggedValue(et.lhs.type.tag,st):st,rt=isTaggedValue(et.rhs.type)?et.rhs.type.value:et.rhs.type,ot=st=>isTaggedValue(et.rhs.type)?taggedValue(et.rhs.type.tag,st):st;if(CS(tt))return nt(tt);if(NS$8(tt))return nonNullable(tt)==="none"?et.rhs.type:union$2([nt(nonNullable(tt)),et.rhs.type]);if(CLC(tt))return nt(tt);if(CLN(tt)){if(CS(rt)||NS$8(rt))return list$1(union$2([nt(nonNullable(listObjectType(tt))),ot(rt)]));if(CLC(rt)||CLN(rt))return list$1(union$2([nt(nonNullable(listObjectType(tt))),ot(listObjectType(rt))]));if(NLC(rt)||NLN(rt))return union$2([tt,list$1(union$2([nt(nonNullable(listObjectType(tt))),ot(listObjectType(rt))]))])}if(NLC(tt))return union$2([nt(nonNullable(tt)),ot(rt)]);if(NLN(tt)){if(CS(rt)||NS$8(rt))return union$2([ot(rt),list$1(union$2([nt(nonNullable(listObjectType(nonNullable(tt)))),ot(rt)]))]);if(CLC(rt)||CLN(rt))return union$2([ot(rt),list$1(union$2([nt(nonNullable(listObjectType(nonNullable(tt)))),ot(listObjectType(rt))]))]);if(NLC(rt)||NLN(rt))return union$2([ot(rt),list$1(maybe(union$2([nt(nonNullable(listObjectType(nonNullable(tt)))),ot(listObjectType(nonNullable(rt)))])))])}return"none"},resolver:async(et,tt,nt,rt)=>{const ot=getValueFromTaggedValue(et.lhs),st=ft=>isConcreteTaggedValue(et.lhs)?concreteTaggedValue(et.lhs._tag,ft):ft,ut=getValueFromTaggedValue(et.rhs),ct=ft=>isConcreteTaggedValue(et.rhs)?concreteTaggedValue(et.rhs._tag,ft):ft;if(ot==null)return ut!=null?ct(ut):null;if(ut==null)return st(ot);if(_$2.isArray(ot))if(_$2.isArray(ut)){const ft=[],pt=lodash$2.exports.max([ot.length,ut.length])??0;for(let ht=0;ht<pt;ht++)ht<ot.length&&(ot[ht]==null?ht<ut.length?ft.push(ct(ut[ht])):ft.push(null):ft.push(st(ot[ht])));return ft}else{const ft=[];return ot.forEach(pt=>{pt==null?ft.push(ct(ut)):ft.push(st(pt))}),ft}else return st(ot)}}),orgArgDescription=`A ${docType("org")}`,makeOrgOp=makeTaggingStandardOp;makeOp({hidden:!0,name:"org-members",argTypes:{org:"org"},description:`Returns the ${docType("user",{plural:!0})} belonging of an ${docType("org")}`,argDescriptions:{org:orgArgDescription},returnValueDescription:`The ${docType("user",{plural:!0})} belonging of the ${docType("org")}`,returnType:{type:"list",objectType:"user"},resolver:et=>{const{org:tt}=et;return tt.members.map(nt=>nt.user)}});makeOp({hidden:!0,name:"org-reports",argTypes:{org:"org"},description:`Returns the ${docType("report",{plural:!0})} of an ${docType("org")}`,argDescriptions:{org:orgArgDescription},returnValueDescription:`The ${docType("report",{plural:!0})} of the ${docType("org")}`,returnType:{type:"list",objectType:"report"},resolver:et=>{const{org:tt}=et;return connectionToNodes(tt.views).filter(nt=>nt.type==="runs")}});makeOp({hidden:!0,name:"org-projects",argTypes:{org:"org"},description:`Returns the ${docType("project",{plural:!0})} of an ${docType("org")}`,argDescriptions:{org:orgArgDescription},returnValueDescription:`The ${docType("project",{plural:!0})} of the ${docType("org")}`,returnType:{type:"list",objectType:"project"},resolver:et=>{const{org:tt}=et;return connectionToNodes(tt.projects)}});makeOp({hidden:!0,name:"org-artifacts",argTypes:{org:"org"},description:`Returns the ${docType("artifact",{plural:!0})} of an ${docType("org")}`,argDescriptions:{org:orgArgDescription},returnValueDescription:`The ${docType("artifact",{plural:!0})} of the ${docType("org")}`,returnType:{type:"list",objectType:"artifact"},resolver:et=>{const{org:tt}=et;return connectionToNodes(tt.artifactCollections)}});makeOrgOp({hidden:!0,name:"org-name",argTypes:{org:"org"},returnType:et=>"string",resolver:({org:et})=>et.name});makeOrgOp({hidden:!0,name:"org-teams",argTypes:{org:"org"},returnType:et=>({type:"list",objectType:"entity"}),resolver:({org:et})=>et.teams});const reportArgTypes={report:maybe(oneOrMany(maybe("report")))},reportArgDescription=`A ${docType("report")}`,makeReportReturnType=et=>tt=>mappableNullableTaggable(tt.report.type,nt=>et),makeReportResolver=et=>tt=>mappableNullableTaggableVal(tt.report,nt=>et(nt));makeOp({hidden:!0,name:"report-name",argTypes:reportArgTypes,description:`Returns the name of the ${docType("report")}`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The name of the ${docType("report")}`,returnType:makeReportReturnType("string"),resolver:makeReportResolver(et=>et.displayName)});makeOp({hidden:!0,name:"report-link",argTypes:reportArgTypes,description:`Returns the link to the ${docType("report")}`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The link to the ${docType("report")}`,returnType:makeReportReturnType("link"),resolver:makeReportResolver(et=>({name:et.displayName,url:reportView({entityName:et.project.entityName,projectName:et.project.name,reportID:et.id,reportName:et.displayName})}))});makeOp({hidden:!0,name:"report-description",argTypes:reportArgTypes,description:`Returns the description of the ${docType("report")}`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The description of the ${docType("report")}`,returnType:makeReportReturnType("string"),resolver:makeReportResolver(et=>et.description)});makeOp({hidden:!0,name:"report-createdAt",argTypes:reportArgTypes,description:`Returns the creation time of the ${docType("report")}`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The creation time of the ${docType("report")}`,returnType:makeReportReturnType("date"),resolver:makeReportResolver(et=>new Date(et.createdAt+"Z"))});makeOp({hidden:!0,name:"report-project",argTypes:reportArgTypes,description:`Returns the ${docType("project")} of the ${docType("report")}`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The ${docType("project")} of the ${docType("report")}`,returnType:makeReportReturnType("project"),resolver:makeReportResolver(et=>et.project)});makeOp({hidden:!0,name:"report-creator",argTypes:reportArgTypes,description:`Returns the ${docType("user")} who created the ${docType("report")}`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The ${docType("user")} who created the ${docType("report")}`,returnType:makeReportReturnType("user"),resolver:makeReportResolver(et=>et.user)});makeOp({hidden:!0,name:"report-viewcount",argTypes:reportArgTypes,description:`Returns the number of times the ${docType("report")} has been viewed`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The number of times the ${docType("report")} has been viewed`,returnType:makeReportReturnType("number"),resolver:makeReportResolver(et=>et.viewCount)});makeOp({hidden:!0,name:"report-stargazers",argTypes:reportArgTypes,description:`Returns the number of users who starred the ${docType("report")}`,argDescriptions:{report:reportArgDescription},returnValueDescription:`The number of users who starred the ${docType("report")}`,returnType:makeReportReturnType(list$1("user")),resolver:makeReportResolver(et=>connectionToNodes(et.stargazers))});const makeRunQueueOp=makeTaggingStandardOp,runQueueArgTypes={runQueue:"runQueue"};makeRunQueueOp({hidden:!0,name:"runQueue-id",argTypes:runQueueArgTypes,returnType:et=>"string",resolver:({runQueue:et})=>et.Id});const makeUserOp=makeStandardOp,userArgType={user:"user"},userArgDescription=`A ${docType("user")}`;makeUserOp({hidden:!0,name:"user-id",argTypes:userArgType,description:`Returns the internal id of the ${docType("user")}`,argDescriptions:{user:userArgDescription},returnValueDescription:`The internal id of the ${docType("user")}`,returnType:et=>"string",resolver:({user:et})=>et.id});const opUserUsername=makeUserOp({name:"user-username",argTypes:userArgType,description:`Returns the username of the ${docType("user")}`,argDescriptions:{user:userArgDescription},returnValueDescription:`The username of the ${docType("user")}`,returnType:et=>"string",resolver:({user:et})=>et.username}),opUserName=makeUserOp({hidden:!0,name:"user-name",argTypes:userArgType,description:`Returns the name of the ${docType("user")}`,argDescriptions:{user:userArgDescription},returnValueDescription:`The name of the ${docType("user")}`,returnType:et=>"string",resolver:({user:et})=>et.name});makeUserOp({hidden:!0,name:"user-link",argTypes:userArgType,description:`Returns the link to the ${docType("user")}`,argDescriptions:{user:userArgDescription},returnValueDescription:`The link to the ${docType("user")}`,returnType:et=>"link",resolver:({user:et})=>({name:et.name,url:`/${et.username}`})});makeUserOp({hidden:!0,name:"user-runs",argTypes:userArgType,description:`Returns the ${docType("list")} of ${docType("run",{plural:!0})} for the ${docType("user")}`,argDescriptions:{user:userArgDescription},returnValueDescription:`The ${docType("list")} of ${docType("run",{plural:!0})} for the ${docType("user")}`,returnType:et=>({type:"list",objectType:"run"}),resolver:({user:et})=>connectionToNodes(et.runs)});const opUserEntities=makeUserOp({hidden:!0,name:"user-entities",argTypes:userArgType,description:`Returns the ${docType("list")} of ${docType("entity",{plural:!0})} for the ${docType("user")}`,argDescriptions:{user:userArgDescription},returnValueDescription:`The ${docType("list")} of ${docType("entity",{plural:!0})} for the ${docType("user")}`,returnType:et=>({type:"list",objectType:"entity"}),resolver:({user:et})=>connectionToNodes(et.teams)});makeBasicOp({hidden:!0,name:"normalizeUserCounts",argTypes:{arr:"any",normalize:"boolean"},description:"Normalizes a list of user counts if the 'normalize' argument is true",argDescriptions:{arr:"The list of user counts to normalize.",normalize:"Whether to normalize the list."},returnValueDescription:"The potentially normalized list of user counts.",returnType:({arr:et,normalize:tt})=>et,resolver:async({arr:et,normalize:tt})=>{if(et.length===0||!tt)return et;const nt=[];let rt=new Date(MAX_DATE_MS);for(const ut of et){if(ut.created_week==null||ut.user_count==null)return et;const{created_week:ct}=ut;ct<rt&&(rt=ct),nt.push(ut)}const st=nt.filter(ut=>ut.created_week.getTime()===rt.getTime()).reduce((ut,ct)=>ut+unwrapTaggedValues(ct.user_count),0);return nt.map(ut=>({...ut,user_count:unwrapTaggedValues(ut.user_count)/st}))}});const languageModuleUrl="/__frontend/assets/tree-sitter-weave.c29f3733.wasm";async function _getParser(){await Parser$4.init({locateFile:(nt,rt)=>nt==="tree-sitter.wasm"?treeSitterWasmUrl:`/${nt}`});const et=new Parser$4,tt=await Parser$4.Language.load(languageModuleUrl);return et.setLanguage(tt),et}const getParser=lodash$2.exports.memoize(_getParser);function logEvent(et,tt){if(!isWeaveDebugEnabled())return;let nt=defaultLanguageBinding.printGraph(et,null);nt.length>100&&(nt=nt.slice(0,40)+"..."+nt.slice(-40)),console.debug(`[Weave] [${(performance$1.now()/1e3).toFixed(3)}s] ${tt}: ${nt}`)}async function parseCG(et,tt,nt){const rt=await getParser();let ot=null,st=voidNode();const ut=new Converter(et);try{ot=rt.parse(tt)}catch{}if(ot!=null)try{st=await ut.tsTreeToCG(ot.rootNode,nt)}catch{}logEvent(st,"parser.final.refine");const ct=await ut.refineNode(st,nt,ut.refineCache),ft=new Map;return{expr:mapNodes(ct,ht=>{const mt=lodash$2.exports.omit(ht,["__syntaxKeyRef"]);return ft.set(ht.__syntaxKeyRef,mt),mt}),parseTree:ot?.rootNode,nodeMap:ft,extraText:ut.extraText}}class Converter{constructor(tt){this.weave=tt,this.tsTreeToCG=lodash$2.exports.memoize(this._tsTreeToCG.bind(this));const nt=this.weave.refineEditingNode.bind(this.weave);this.refineCache=new Map,this.refineNode=(rt,ot)=>nt(rt,ot,this.refineCache)}async _tsTreeToCG(tt,nt,rt){const ot=st=>this.record(tt,st);switch(tt.type){case"program":case"expression_statement":case"parenthesized_expression":return tt.firstNamedChild==null?ot(voidNode()):this.tsTreeToCG(tt.firstNamedChild,nt,rt);case"identifier":const st=resolveVar(nt,tt.text);return ot(varNode(st?.closure.value?.type??"any",tt.text));case"number":return ot(constNumber(Number(tt.text)));case"string":return ot(constString(stripQuotesAndUnescape(tt.text)));case"true":return ot(constBoolean(!0));case"false":return ot(constBoolean(!1));case"null":return ot(constNone());case"array":{const vt=tt.namedChildren,Tt=await Promise.all(vt.map(xt=>this.tsTreeToCG(xt,nt))),Et=Object.fromEntries(vt.map((xt,At)=>[At,Tt[At]]));return ot(opArray(Et))}case"object":{const vt=tt.namedChildren,Tt=await Promise.all(vt.map(xt=>{const At=xt.namedChildren[1];return this.tsTreeToCG(At,nt)})),Et=Object.fromEntries(vt.map((xt,At)=>{const Ct=xt.namedChildren[0].text;return[stripQuotesAndUnescape(Ct),Tt[At]]}));return ot(opDict(Et))}case"arrow_function":const ut={},ct={},[ft,pt]=tt.namedChildren;for(const vt of ft.namedChildren||[]){if(vt.type!=="identifier")throw new Error(`Invalid function argument: ${JSON.stringify(vt)}`);const Tt=vt.text,Et=resolveVar(nt,Tt)?.closure.value;ut[Tt]=resolveVar(nt,Tt)?.closure.value?.type??"any",ct[Tt]=Et??varNode("any",Tt)}let ht;if(typeof rt=="object"&&rt.type==="function"){ht=rt.outputType;for(const vt of Object.keys(ct)){const Tt=rt.inputTypes[vt];Tt&&(ut[vt]==null||ut[vt]==="any")&&(ut[vt]=Tt,ct[vt]=varNode(Tt,vt))}}const mt=pushFrame(nt,ct),yt=await this.tsTreeToCG(pt,mt);return ot({nodeType:"const",type:{type:"function",inputTypes:ut,outputType:ht||"any"},val:yt});case"unary_expression":{const[vt,Tt]=tt.children;switch(vt.text){case"-":return ot(opNumberNegate({val:await this.tsTreeToCG(Tt,nt)}));case"!":return ot(opNot({bool:await this.tsTreeToCG(Tt,nt)}));default:return ot(voidNode())}}case"binary_expression":{const[vt,Tt,Et]=tt.children;let xt=Tt.text;switch(xt){case"&&":xt="and";break;case"||":xt="or";break;case"=":case"===":xt="==";break;case"!=":case"!==":xt="!=";break}return ot(await this.binaryExpression(nt,xt,vt,Et))}case"call_expression":{const[vt,Tt]=tt.namedChildren;if(vt.text==="Date"){const[Et]=Tt.namedChildren;return ot(constDate(hooks(stripQuotesAndUnescape(Et.text)).toDate()))}if(vt.text==="Link"){const[Et,xt]=Tt.namedChildren,At=(xt??Et).text;return ot(constLink(stripQuotesAndUnescape(At),stripQuotesAndUnescape(Et.text)))}return ot(await this.callExpressionToCG(tt,nt))}case"subscript_expression":{const[vt,Tt]=tt.namedChildren;try{const Et=await this.buildOutputNodeFromNameAndArgs(nt,"pick",[vt,Tt],"brackets");return ot(Et)}catch(Et){if(Et instanceof Error){const xt=await this.buildOutputNodeFromNameAndArgs(nt,"index",[vt,Tt],"brackets");return ot(xt)}throw Et}}case"member_expression":{const[vt,Tt]=tt.namedChildren;try{const Et=callOpVeryUnsafe("Object-__getattr__",{self:await this.tsTreeToCG(vt,nt),name:await ot(constString(Tt.text))});logEvent(Et,"parser.getattr.refine");const xt=await this.refineNode(Et,nt),At=nullableTaggableValue(xt.type);if(At==="unknown"||isListLike(At)&&nullableTaggableValue(listObjectType(At))==="unknown")throw new Error("Invalid getattr call");return ot(Et)}catch{}try{const Et=await this.buildOutputNodeFromNameAndArgs(nt,Tt.text,[vt],"chain");return ot(Et)}catch{}return this.extraText="."+Tt.text,this.tsTreeToCG(vt,nt)}case"ERROR":{const{text:vt,namedChildren:Tt}=tt;if(vt===".")return this.extraText=".",ot(voidNode());if(vt.length>1&&vt.endsWith(".")&&Tt.length===1)return this.extraText=".",this.tsTreeToCG(Tt[0],nt,rt);if(vt.length>1&&vt.endsWith("[")&&Tt.length===1)return this.extraText="[",this.tsTreeToCG(Tt[0],nt,rt);if(vt.length>2&&Tt.length>=1){const Et=Tt[0],xt=vt.slice(Et.text.length);if(xt.match(/\[["'].*$/))return this.extraText=xt,this.tsTreeToCG(Tt[0],nt,rt)}if(vt.length>1&&Tt.length===1){const Et=Tt[0],xt=vt.slice(Et.text.length).trim();return ot(await this.binaryExpression(nt,xt,Et))}return ot(voidNode())}default:return ot(voidNode())}}record(tt,nt){return nt.__syntaxKeyRef=tt.id,Promise.resolve(nt)}async binaryExpression(tt,nt,rt,ot){let st=nt;switch(st){case"&&":st="and";break;case"||":st="or";break;case"=":case"===":st="==";break;case"!=":case"!==":st="!=";break}return await this.buildOutputNodeFromNameAndArgs(tt,st,ot?[rt,ot]:[rt],"binary")}async buildOutputNodeFromNameAndArgs(tt,nt,rt,ot){const ut=(rt.length>0?await this.tsTreeToCG(rt[0],tt):voidNode()).type,ct=getOpDefsByDisplayName(nt,this.weave.client.opStore).filter(ht=>{const mt=Object.values(ht.inputTypes)[0]??"invalid";return ht.renderInfo.type===ot&&this.weave.typeIsAssignableTo(ut,mt)});if(ct.length===0)throw new Error(`Call to unknown ${ot} op ${nt} for type ${this.weave.typeToString(ut)}`);let pt=(await Promise.all(ct.map(async ht=>{const mt=await Promise.all(rt.map(async(Et,xt)=>{if(Et.type==="arrow_function"){let At=Object.values(ht.inputTypes)[xt];if(!isFunctionType(At))return await this.tsTreeToCG(Et,tt,At);const Ct=getFunctionFrame(ht.name,await this.tsTreeToCG(rt[0],tt),tt,this.weave.client.opStore),$t=lodash$2.exports.mapValues(Ct,Rt=>Rt.type);At={...At,inputTypes:$t};let Ot;try{Ot=await this.tsTreeToCG(Et,pushFrame(tt,Ct),At)}catch{Ot=voidNode()}return Ot}return this.tsTreeToCG(Et,tt)})),yt=argsAsOpInputs(ht,mt),vt=callOpVeryUnsafe(ht.name,yt,determineOutputType(ht,yt));let Tt=voidNode();try{logEvent(vt,"parser.dispatch.refine"),Tt=await this.refineNode(vt,tt)}catch(Et){console.warn("Converter: Weave parser failed to refine node",vt,Et)}return Tt}))).filter(ht=>ht.type!=="invalid");if(pt.length===0)throw new Error(`Invalid call to op ${nt}: args are invalid:
  ${rt.map(ht=>`${ht.text} (${ht.type})`).join(`
  `)} `);if(pt.length>1){if(nt==="-")return pt.find(mt=>mt.fromOp.name==="number-sub");pt.map(mt=>this.weave.client.opStore.getOpDef(mt.fromOp.name));const ht=pt.map(mt=>mt.fromOp.name);if(ht.length===2&&ht.includes("file-table")&&ht.includes("panel-table"))pt=pt.filter(mt=>mt.fromOp.name==="file-table");else{const mt=pt.filter(yt=>!isMappedOpForInput(this.weave.client.opStore.getOpDef(yt.fromOp.name),ut));if(mt.length>0&&(pt=mt),pt.length>1){const yt=pt.filter(vt=>!isTagGetterOp(this.weave.client.opStore.getOpDef(vt.fromOp.name)));yt.length>0&&(pt=yt),pt.length>1}}}return pt[0]}async callExpressionToCG(tt,nt){const[rt,ot]=tt.namedChildren;if(rt.type==="identifier")return this.buildOutputNodeFromNameAndArgs(nt,rt.text,ot.namedChildren,"function");if(rt.type==="member_expression"){const[st,ut]=rt.namedChildren;if(ut.type!=="property_identifier")throw new Error(`Invalid call: chained operator must be a property_identifier, but was ${JSON.stringify(ut)}`);return this.buildOutputNodeFromNameAndArgs(nt,rt.lastNamedChild.text,[st,...ot.namedChildren],"chain")}return voidNode()}}function argsAsOpInputs(et,tt){const nt=Object.keys(et.inputTypes);return Object.fromEntries(nt.map((rt,ot)=>[rt,tt[ot]??getPlaceholderArg(et,rt)??varNode("any","")]))}function stripQuotesAndUnescape(et){return(['"',"'"].includes(et[0])?et.slice(1,-1):et).replace(/\\"/g,'"')}function isMappedOpForInput(et,tt){const nt=Object.values(et.inputTypes)[0],rt=nullableTaggableStrip(tt);return isList(rt)&&isAssignableTo(listObjectType(rt),nt)}function isTagGetterOp(et){return et.kind==="tag-getter"}class JSLanguageBinding{constructor(tt){this.weave=tt}parse(tt,nt){return parseCG(this.weave,tt,nt??[])}printGraph(tt,nt){return nodeToString(tt,this.weave.client.opStore,nt)}printType(tt,nt){return typeToString(tt,nt)}}function bindClientToGlobalThis(et){typeof globalThis<"u"&&DEBUG_ATTACH_TO_GLOBAL_THIS&&(globalThis.cgquery=et.query.bind(et))}function createRemoteServer(et,tt,nt,rt=!1,ot=!1,st,ut){return new RemoteHttpServer({weaveUrl:et,tokenFunc:tt,anonApiKey:st,useAdminPrivileges:rt,isShadow:ot,fetch:ut},nt)}function createRemoteClient(et,tt,nt=!1,rt,ot,st){const ut=createRemoteServer(et,tt,rt,nt,!1,ot,st),ct=new CachedClient(new BasicClient(ut));return bindClientToGlobalThis(ct),ct}function groupByFnToFilterPred(et,tt){if(et.type==="string")return opStringEqual({lhs:et,rhs:constString(tt)});if(et.type==="number")return opNumberEqual({lhs:et,rhs:constNumber(tt)});if(!isTypedDict(et.type))return;const nt=[];for(const rt of Object.keys(et.type.propertyTypes)){const ot=et.type.propertyTypes[rt];if(ot==="string")nt.push(opStringEqual({lhs:et.fromOp.inputs[rt],rhs:constString(tt[rt])}));else if(ot==="number")nt.push(opNumberEqual({lhs:et.fromOp.inputs[rt],rhs:constNumber(tt[rt])}));else return}return nt.reduce((rt,ot)=>opAnd({lhs:rt,rhs:ot}))}async function simplifyNode(et,tt){if(tt.nodeType!=="output")return;const{fromOp:nt}=tt;if(nt.name==="index"){const rt=nt.inputs.index;if(rt.nodeType!=="const")return;const ot=rt.val,st=nt.inputs.arr;if(st.nodeType!=="output")return;const ut=st.fromOp;if(ut.name==="limit"){const ft=ut.inputs.arr,pt=ut.inputs.limit;return pt.nodeType!=="const"||pt.val<=ot?void 0:{...tt,fromOp:{name:"index",inputs:{arr:ft,index:constNumber(ot)}}}}else if(ut.name==="offset"){const ft=ut.inputs.arr,pt=ut.inputs.offset;return pt.nodeType!=="const"?void 0:{...tt,fromOp:{name:"index",inputs:{arr:ft,index:constNumber(ot+pt.val)}}}}const ct=findChainedAncestor(st,ft=>ft.nodeType==="output"&&ft.fromOp.name==="groupby",ft=>ft.nodeType==="output"&&(ft.fromOp.name==="filter"||ft.fromOp.name==="sort"||ft.fromOp.name==="map"));if(ct!=null){if(ct.nodeType!=="output")throw new Error("simplifyNode: expected foundGroupBy.nodeType to be output, found "+ct.nodeType);const ft=ct.fromOp,pt=ft.inputs.arr,ht=ft.inputs.groupByFn;if(!isFunction$b(ht.type)||ht.type.inputTypes==null)throw new Error("simplifyNode: expected groupByFn to be a parameterized function");if(ht.nodeType!=="const")return;const mt=opGroupGroupKey({obj:opIndex({arr:st,index:constNumber(ot)})}),yt=await et.query(mt),vt=groupByFnToFilterPred(ht.val,yt);return vt==null?void 0:{...tt,fromOp:{name:"filter",inputs:{arr:pt,filterFn:constFunction(ht.type.inputTypes,Tt=>vt)}}}}if(isAssignableTo(tt.type,"artifact")){const ft=findChainedAncestor(st,vt=>vt.nodeType==="output"&&vt.type==="project",vt=>!0);if(ft==null)return;if(ft.nodeType!=="output")throw new Error("simplifyNode: expected projectNode.nodeType to be output, found "+ft.nodeType);const pt=opArtifactTypeName({artifactType:opArtifactType({artifact:tt})}),ht=opArtifactName({artifact:tt}),[mt,yt]=await Promise.all([et.query(pt),et.query(ht)]);return{...tt,fromOp:{name:"project-artifact",inputs:{project:ft,artifactType:constString(mt),artifactName:constString(yt)}}}}if(isAssignableTo(tt.type,"artifactVersion")){const ft=findChainedAncestor(st,mt=>mt.nodeType==="output"&&mt.type==="project",mt=>!0);if(ft==null)return;if(ft.nodeType!=="output")throw new Error("simplifyNode: expected projectNode.nodeType to be output, found "+ft.nodeType);const pt=opArtifactVersionName({artifactVersion:tt}),[ht]=await et.query(pt);return{...tt,fromOp:{name:"project-artifactVersion",inputs:{project:ft,artifactVersionName:constString(ht)}}}}}}async function simplifyPass(et,tt){let nt=tt;for(;nt!=null;)nt=await simplifyNode(et,tt),nt!=null&&(tt=nt);if(tt.nodeType!=="output")return tt;const rt=await Promise.all(Object.values(tt.fromOp.inputs).map(ut=>simplify(et,ut))),ot={},st=Object.keys(tt.fromOp.inputs);for(let ut=0;ut<st.length;ut++)ot[st[ut]]=rt[ut];return{...tt,fromOp:{...tt.fromOp,inputs:ot}}}async function simplify(et,tt){return filterNodes(tt,nt=>nt.nodeType==="output"&&nt.fromOp.name==="group-groupkey").length>0?tt:simplifyPass(et,tt)}var safeIsNaN$2=Number.isNaN||function et(tt){return typeof tt=="number"&&tt!==tt};function isEqual$4(et,tt){return!!(et===tt||safeIsNaN$2(et)&&safeIsNaN$2(tt))}function areInputsEqual$2(et,tt){if(et.length!==tt.length)return!1;for(var nt=0;nt<et.length;nt++)if(!isEqual$4(et[nt],tt[nt]))return!1;return!0}function memoizeOne$2(et,tt){tt===void 0&&(tt=areInputsEqual$2);var nt=null;function rt(){for(var ot=[],st=0;st<arguments.length;st++)ot[st]=arguments[st];if(nt&&nt.lastThis===this&&tt(ot,nt.lastArgs))return nt.lastResult;var ut=et.apply(this,ot);return nt={lastResult:ut,lastArgs:ot,lastThis:this},ut}return rt.clear=function(){nt=null},rt}const MAX_SUGGESTIONS=500;async function autosuggestNodes(et,tt,nt,rt){let ot=[];const st=findConsumingOp(tt,nt),ut=st?.outputNode.fromOp,ct=st?.outputNode==null?new Set:supportedEngineForNode(st.outputNode,et.opStore);if(tt.nodeType==="const"||tt.nodeType==="void"){if(ut!=null){const ft=et.opStore.getOpDef(ut.name),pt=Object.values(ft.inputTypes);if(st&&isFunctionType(ft.inputTypes[st.argName]))ot=[{nodeType:"const",type:ft.inputTypes[st.argName],val:voidNode()}];else if(ut.name==="pick"){const ht=ut.inputs.obj;ot=pickSuggestions(ht.type).map(yt=>constString(yt))}else if(ut.name==="root-project"&&ct.has("ts")){let ht=[];if(st?.argName==="entityName"){const mt=opEntityName({entity:opUserEntities({user:opRootViewer({})})});ht=await et.query(mt)}else if(st?.argName==="projectName"){const mt=opProjectName({project:opEntityProjects({entity:opRootEntity({entityName:ut.inputs.entityName})})});ht=await et.query(mt)}ot=ht.map(mt=>constString(mt))}else if(ut.name==="root-user"&&ct.has("ts")){let ht=[];st?.argName==="userName"&&(ht=["shawn","stacey","l2k2"]),ot=ht.map(mt=>constString(mt))}else if(ut.name==="project-artifact"&&ct.has("ts")){let ht=[];const mt=dereferenceAllVars(ut.inputs.project,rt).node;if(mt.nodeType==="void")throw new Error("autosuggestNodes: project-artifactVersion input projectNode.nodeType is void");const yt=opArtifactName({artifact:opProjectArtifacts({project:mt})}),vt=await et.query(yt);ht=lodash$2.exports.uniq(lodash$2.exports.flatten(vt)),ot=ht.map(Tt=>constString(Tt))}else if(ut.name==="project-artifactType"&&ct.has("ts")){let ht=[];const mt=dereferenceAllVars(ut.inputs.project,rt).node;if(mt.nodeType==="void")throw new Error("autosuggestNodes: project-artifactType input projectNode.nodeType is void");if(st?.argName==="artifactType"){const yt=opArtifactTypeName({artifactType:opProjectArtifactTypes({project:mt})}),vt=await et.query(yt);ht=lodash$2.exports.uniq(lodash$2.exports.flatten(vt))}ot=ht.map(yt=>constString(yt))}else if(ut.name==="project-artifactVersion"&&ct.has("ts")){let ht=[];const mt=dereferenceAllVars(ut.inputs.project,rt).node;if(mt.nodeType==="void")throw new Error("autosuggestNodes: project-artifactVersion input projectNode.nodeType is void");if(st?.argName==="artifactName"){const yt=opArtifactName({artifact:opProjectArtifacts({project:mt})}),vt=await et.query(yt);ht=lodash$2.exports.uniq(lodash$2.exports.flatten(vt))}else if(st?.argName==="artifactVersionAlias"){if(ut.inputs.artifactName.nodeType==="void")return{refinedNode:tt,suggestions:[]};const yt=opArtifactVersionVersionId({artifactVersion:opArtifactVersions({artifact:opProjectArtifact({project:mt,artifactName:ut.inputs.artifactName})})}),vt=await et.query(yt);ht=lodash$2.exports.uniq(lodash$2.exports.flatten(vt))}ot=ht.map(yt=>constString(Number.isInteger(yt)?`v${yt}`:`${yt}`))}else if(ut.name==="run-loggedArtifactVersion"&&ct.has("ts")){let ht=[];if(st?.argName==="artifactVersionName"){const mt=ut.inputs.run;if(mt.nodeType==="void")throw new Error("autosuggestNodes: run-loggedArtifactVersion input runNode.nodeType is void");let yt=dereferenceAllVars(mt,rt).node;yt.nodeType==="output"&&yt.fromOp.name==="index"&&yt.fromOp.inputs.index.nodeType==="var"&&(yt={...yt,fromOp:{...yt.fromOp,inputs:{...yt.fromOp.inputs,index:constNumber(0)}}});const vt=opMap({arr:opRunLoggedArtifactVersions({run:yt}),mapFn:constFunction({row:"artifactVersion"},({row:Et})=>opArtifactVersionName({artifactVersion:Et}))}),Tt=await et.query(vt);ht=lodash$2.exports.uniq(lodash$2.exports.flatten(Tt))}ot=ht.map(mt=>constString(mt))}else if(ut.name==="artifactVersion-file"&&ct.has("ts")){let ht=[];if(st?.argName==="path"){const mt=ut.inputs.artifactVersion;if(mt.nodeType==="void")throw new Error("autosuggestNodes: artifactVersion-file input artifactNode.nodeType is void");const yt=dereferenceAllVars(mt,rt).node,vt=applyOpToOneOrMany(opFilePath,"file",opArtifactVersionFiles({artifactVersion:yt}),{}),Tt=await et.query(vt);ht=lodash$2.exports.uniq(lodash$2.exports.flatten(Tt))}ot=ht.map(mt=>constString(mt))}else if(ut.name==="string-equal"||ut.name==="string-notEqual"){if(st?.argName!=="rhs")throw new Error("autosuggestNodes: string-equal/notEqual argName is not rhs");const ht=ut.inputs.lhs;if(ht.nodeType==="void")throw new Error("autosuggestNodes: string-equal/notEqual input lhsNode.nodeType is void");const mt=dereferenceAllVars(ht,rt).node,yt=mapNodes(mt,Tt=>{if(Tt.nodeType!=="output")return Tt;const Et=Tt.fromOp;return Et.name==="filter"||Et.name==="index"&&Et.inputs.index.nodeType==="var"?opFlatten({arr:Et.inputs.arr}):Tt}),vt=await refineEditingNode(et,yt,rt);if(vt.nodeType==="void"||!isAssignableTo(vt.type,maybe(list$1(maybe("string")))))console.error("Could not generalize node for suggest, you probably need to make ops in this chain project. "+nodeToString(vt,et.opStore)),ot=[];else{const Tt=await et.query(vt);let Et=(At,Ct)=>0;if(isConstNode(tt)&&typeof tt.val=="string"&&tt.val.length>0){const At=tt.val.toLocaleLowerCase();Et=(Ct,$t)=>{const Ot=Ct.toLocaleLowerCase().includes(At),Rt=$t.toLocaleLowerCase().includes(At);return Ot&&!Rt?-1:Rt&&!Ot?1:0}}ot=(Tt==null?[]:lodash$2.exports.uniq(Tt).filter(notEmpty$1).sort(Et)).map(At=>constString(At))}}else if(ut.name==="contains"){const ht=ut.inputs.arr;if(ht.nodeType==="void")throw new Error("autosuggestNodes: contains input arrNode.nodeType is void");const mt=dereferenceAllVars(ht,rt).node,yt=opFlatten({arr:mapNodes(mt,Tt=>{if(Tt.nodeType!=="output")return Tt;const Et=Tt.fromOp;return Et.name==="filter"||Et.name==="index"&&Et.inputs.index.nodeType==="var"?opFlatten({arr:Et.inputs.arr}):Tt})}),vt=await refineEditingNode(et,yt,rt);if(vt.nodeType==="void"||!isAssignableTo(vt.type,maybe(list$1(maybe("string")))))console.error("Could not generalize node for suggest, you probably need to make ops in this chain project. "+nodeToString(vt,et.opStore)),ot=[];else{const Tt=await et.query(vt);ot=(Tt==null?[]:lodash$2.exports.uniq(Tt).filter(notEmpty$1)).map(xt=>constString(xt))}}else isBinaryOp(ut,et.opStore)&&isAssignableTo("number",pt[1])&&ot.push(constNumber(3.14159));(ut.name.endsWith("-equal")||ut.name.endsWith("-notEqual"))&&(isNullable(ut.inputs.lhs.type)||isListLike(ut.inputs.lhs.type)&&isNullable(listObjectType(ut.inputs.lhs.type)))&&ot.push(constNone())}if(tt.nodeType==="void"){const ft=toFrame(rt),pt=Object.keys(ft);if(pt.length>0)for(const ht of pt){const mt=varNode(ft[ht].type,ht);ot.push(mt)}else nt.nodeType==="void"&&(ot=ot.concat(rootOps(et.opStore).map(ht=>{const mt=lodash$2.exports.mapValues(ht.inputTypes,(yt,vt)=>getPlaceholderArg(ht,vt)??voidNode());return callOpVeryUnsafe(ht.name,mt)})))}else{const ft=availableOpsForChain(tt,et.opStore);ot=ot.concat(ft.flatMap(pt=>callOpVeryUnsafe(pt.name,{lhs:tt,rhs:getPlaceholderArg(pt,"rhs")??voidNode()})))}}else if((tt.nodeType==="var"||tt.nodeType==="output")&&(tt.type==="any"&&(tt=await refineEditingNode(et,tt,rt)),ot=availableOpsForChain(tt,et.opStore).flatMap(pt=>{if(pt.name==="pick")return[...pickSuggestions(tt.type).map(mt=>callOpVeryUnsafe("pick",{obj:tt,key:constString(mt)})),callOpVeryUnsafe("pick",{obj:tt,key:voidNode()})];{const ht=Object.keys(pt.inputTypes),mt={[ht[0]]:tt};for(const yt of ht.slice(1))isAssignableTo(pt.inputTypes[yt],functionType({row:"any"},"any"))?mt[yt]=constFunction({row:"any",...pt.name==="map"?{index:"any"}:{}},()=>varNode("any","row")):mt[yt]=getPlaceholderArg(pt,yt)??voidNode();return callOpVeryUnsafe(pt.name,mt)}}),tt.type._is_object)){const pt=Object.keys(tt.type).filter(ht=>!ht.startsWith("_")).map(ht=>callOpVeryUnsafe("Object-__getattr__",{self:tt,name:constString(ht)}));ot=[...ot,...pt]}return ot.length>MAX_SUGGESTIONS&&(console.warn(`Too many suggestions (${ot.length}) for node ${nodeToString(tt,et.opStore)}`),ot=ot.slice(0,MAX_SUGGESTIONS)),{refinedNode:tt,suggestions:ot}}async function _autosuggestOps(et,tt){return validReplacementOps(et,tt).filter(nt=>!nt.hidden).map(nt=>({name:nt.name,inputs:et.inputs}))}const autosuggestOps=memoizeOne$2(_autosuggestOps);function isTagGetterNodeOrOp(et,tt){return!!(isEditingNode(et)&&et.nodeType==="output"&&tt.getOpDef(et.fromOp.name).name?.startsWith("tag-"))}function isBinaryNodeOrOp(et,tt){return isEditingNode(et)&&et.nodeType==="output"?isBinaryOp(et.fromOp,tt):!1}function isVarNodeOrOp(et){return!!(isEditingNode(et)&&et.nodeType==="var")}async function autosuggest(et,tt,nt,rt,ot){const st=getStackAtNodeOrOp(nt,tt,rt,et.opStore)||rt;let ut=[];if(isEditingOp(tt))ut=(await autosuggestOps(tt,et.opStore)).map(yt=>({newNodeOrOp:yt,suggestionString:opDisplayName(yt,et.opStore)}));else{const mt=await autosuggestNodes(et,tt,nt,st);ut=mt.suggestions.map(yt=>({newNodeOrOp:yt,suggestionString:nodeToString(maybeReplaceNode(yt,mt.refinedNode,varNode("any","")),et.opStore,null)}))}ut.sort((mt,yt)=>{const vt=mt.newNodeOrOp.nodeType==="const",Tt=yt.newNodeOrOp.nodeType==="const";if(vt&&!Tt)return-1;if(!vt&&Tt)return 1;const Et=mt.newNodeOrOp.nodeType==="output"&&mt.newNodeOrOp.fromOp.name==="pick",xt=yt.newNodeOrOp.nodeType==="output"&&yt.newNodeOrOp.fromOp.name==="pick";if(Et&&!xt)return-1;if(!Et&&xt)return 1;const At=isTagGetterNodeOrOp(mt.newNodeOrOp,et.opStore),Ct=isTagGetterNodeOrOp(yt.newNodeOrOp,et.opStore);if(At&&!Ct)return 1;if(!At&&Ct)return-1;const $t=isVarNodeOrOp(mt.newNodeOrOp),Ot=isVarNodeOrOp(yt.newNodeOrOp);if($t&&!Ot)return-1;if(!$t&&Ot)return 1;const Rt=isBinaryNodeOrOp(mt.newNodeOrOp,et.opStore),It=isBinaryNodeOrOp(yt.newNodeOrOp,et.opStore);return Rt&&!It?-1:!Rt&&It?1:mt.suggestionString<yt.suggestionString?-1:1});const ct=isEditingNode(tt)&&tt.nodeType==="const"&&unwrapTaggedValues(tt.type)==="string",ft=isEditingNode(tt)&&couldBeReplacedByType(tt,nt,"string",et.opStore),pt=mt=>mt===ot||ct&&mt===`"${ot}"`,ht=ut.some(mt=>pt(mt.suggestionString));return ot==null&&isConstNode(tt)&&tt.type==="string"&&(ot=tt.val),ot&&(ft&&(ut=lodash$2.exports.uniqBy([{newNodeOrOp:constString(ot),suggestionString:`"${ot}"`},...ut],mt=>mt.suggestionString)),ht?ut=ut.filter(mt=>!pt(mt.suggestionString)):ut=ut.sort((mt,yt)=>(yt.suggestionString.includes(ot)||yt.suggestionString.startsWith('"')?1:-1)-(mt.suggestionString.includes(ot)||mt.suggestionString.startsWith('"')?1:-1))),ut}class Weave{constructor(tt){this.client=tt,this.languageBinding=new JSLanguageBinding(this)}typeIsAssignableTo(tt,nt){return isAssignableTo(tt,nt)}typeToString(tt,nt){return this.languageBinding.printType(tt,nt)}op(tt){const nt=this.client.opStore.getOpDef(tt);if(nt==null)throw new Error(`Cannot find op with id "${tt}"`);return nt}callOp(tt,nt){return callOpVeryUnsafe(tt,nt)}async expression(tt,nt=[]){const rt=await this.languageBinding.parse(tt,nt);return{...rt,expr:rt.expr??voidNode()}}forwardExpression(tt){const nt=[];let rt=tt;for(;rt!=null;)switch(nt.push(rt),rt.nodeType){case"void":case"const":case"var":rt=null;break;case"output":const ot=this.op(rt.fromOp.name);shouldSkipOpFirstInput(ot)?rt=Object.values(rt.fromOp.inputs)[0]:rt=null;break}return nt.reverse()}expToString(tt,nt=0){return this.languageBinding.printGraph(tt,nt)}nodeIsExecutable(tt){return nodeIsExecutable(tt)}dereferenceAllVars(tt,nt){return dereferenceAllVars(tt,nt).node}callFunction(tt,nt){return callFunction(tt,nt)}expandAll(tt,nt){return expandAll(this.client,tt,nt)}expandGeneratedWeaveOp(tt,nt,rt){return expandGeneratedWeaveOp(this.client,tt,nt,rt)}refineEditingNode(tt,nt,rt){return refineEditingNode(this.client,tt,nt,rt)}refineNode(tt,nt){return refineNode(this.client,tt,nt)}suggestions(tt,nt,rt,ot){return autosuggest(this.client,tt,nt,rt,ot)}}var observerMap$1=new Map,RootIds=new WeakMap,rootId=0,unsupportedValue=void 0;function getRootId(et){return et?(RootIds.has(et)||(rootId+=1,RootIds.set(et,rootId.toString())),RootIds.get(et)):"0"}function optionsToId(et){return Object.keys(et).sort().filter(function(tt){return et[tt]!==void 0}).map(function(tt){return tt+"_"+(tt==="root"?getRootId(et.root):et[tt])}).toString()}function createObserver(et){var tt=optionsToId(et),nt=observerMap$1.get(tt);if(!nt){var rt=new Map,ot,st=new IntersectionObserver(function(ut){ut.forEach(function(ct){var ft,pt=ct.isIntersecting&&ot.some(function(ht){return ct.intersectionRatio>=ht});et.trackVisibility&&typeof ct.isVisible>"u"&&(ct.isVisible=pt),(ft=rt.get(ct.target))==null||ft.forEach(function(ht){ht(pt,ct)})})},et);ot=st.thresholds||(Array.isArray(et.threshold)?et.threshold:[et.threshold||0]),nt={id:tt,observer:st,elements:rt},observerMap$1.set(tt,nt)}return nt}function observe$1(et,tt,nt,rt){if(nt===void 0&&(nt={}),rt===void 0&&(rt=unsupportedValue),typeof window.IntersectionObserver>"u"&&rt!==void 0){var ot=et.getBoundingClientRect();return tt(rt,{isIntersecting:rt,target:et,intersectionRatio:typeof nt.threshold=="number"?nt.threshold:0,time:0,boundingClientRect:ot,intersectionRect:ot,rootBounds:ot}),function(){}}var st=createObserver(nt),ut=st.id,ct=st.observer,ft=st.elements,pt=ft.get(et)||[];return ft.has(et)||ft.set(et,pt),pt.push(tt),ct.observe(et),function(){pt.splice(pt.indexOf(tt),1),pt.length===0&&(ft.delete(et),ct.unobserve(et)),ft.size===0&&(ct.disconnect(),observerMap$1.delete(ut))}}function useInView(et){var tt=et===void 0?{}:et,nt=tt.threshold,rt=tt.delay,ot=tt.trackVisibility,st=tt.rootMargin,ut=tt.root,ct=tt.triggerOnce,ft=tt.skip,pt=tt.initialInView,ht=tt.fallbackInView,mt=react.exports.useRef(),yt=react.exports.useState({inView:!!pt}),vt=yt[0],Tt=yt[1],Et=react.exports.useCallback(function(At){mt.current!==void 0&&(mt.current(),mt.current=void 0),!ft&&At&&(mt.current=observe$1(At,function(Ct,$t){Tt({inView:Ct,entry:$t}),$t.isIntersecting&&ct&&mt.current&&(mt.current(),mt.current=void 0)},{root:ut,rootMargin:st,threshold:nt,trackVisibility:ot,delay:rt},ht))},[Array.isArray(nt)?nt.toString():nt,ut,st,ct,ft,ot,ht,rt]);react.exports.useEffect(function(){!mt.current&&vt.entry&&!ct&&!ft&&Tt({inView:!!pt})});var xt=[Et,vt.inView,vt.entry];return xt.ref=xt[0],xt.inView=xt[1],xt.entry=xt[2],xt}function usePrevious$1(et){const tt=react.exports.useRef();return react.exports.useEffect(()=>{tt.current=et}),tt.current}const useDeepMemo$1=(et,tt)=>{tt=tt??_$2.isEqual;const nt=react.exports.useRef(),rt=usePrevious$1(et);return tt(et,rt)||(nt.current=et),nt.current},useGatedValue=(et,tt)=>{const nt=react.exports.useRef(et);return et!==nt.current&&tt(et)&&(nt.current=et),nt.current};function useStateWithRef(et){const[tt,nt]=react.exports.useState(et),rt=react.exports.useRef(tt),ot=react.exports.useCallback(st=>{rt.current=isNewStateFunction(st)?st(rt.current):st,nt(st)},[]);return[tt,ot,rt]}function isNewStateFunction(et){return typeof et=="function"}const useUpdatingState=et=>{const[tt,nt]=react.exports.useState(et);return react.exports.useEffect(()=>{nt(et)},[et]),[tt,nt]};function useWhenOnScreenAfterNewValueDebounced(et,tt=100){const{ref:nt,inView:rt}=useInView(),ot=usePrevious$1(et),[st,ut]=react.exports.useState(!1),[ct,ft]=react.exports.useState(null),[pt,ht]=react.exports.useState(null),mt=react.exports.useRef(Date.now()),yt=Date.now();return react.exports.useEffect(()=>{rt?!st&&yt-mt.current<1e3?(ft(yt),ut(!0)):ct==null?(ft(yt),setTimeout(()=>{pt===null&&ht(yt)},tt+1)):!st&&ct+tt<yt&&ut(!0):et!==ot&&ft(null)},[rt,ct,ot,et,pt,tt,yt,st]),[nt,st]}var toggleSelection=function(){var et=document.getSelection();if(!et.rangeCount)return function(){};for(var tt=document.activeElement,nt=[],rt=0;rt<et.rangeCount;rt++)nt.push(et.getRangeAt(rt));switch(tt.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":tt.blur();break;default:tt=null;break}return et.removeAllRanges(),function(){et.type==="Caret"&&et.removeAllRanges(),et.rangeCount||nt.forEach(function(ot){et.addRange(ot)}),tt&&tt.focus()}},deselectCurrent=toggleSelection,clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format$4(et){var tt=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return et.replace(/#{\s*key\s*}/g,tt)}function copy$4(et,tt){var nt,rt,ot,st,ut,ct,ft=!1;tt||(tt={}),nt=tt.debug||!1;try{ot=deselectCurrent(),st=document.createRange(),ut=document.getSelection(),ct=document.createElement("span"),ct.textContent=et,ct.ariaHidden="true",ct.style.all="unset",ct.style.position="fixed",ct.style.top=0,ct.style.clip="rect(0, 0, 0, 0)",ct.style.whiteSpace="pre",ct.style.webkitUserSelect="text",ct.style.MozUserSelect="text",ct.style.msUserSelect="text",ct.style.userSelect="text",ct.addEventListener("copy",function(ht){if(ht.stopPropagation(),tt.format)if(ht.preventDefault(),typeof ht.clipboardData>"u"){nt&&console.warn("unable to use e.clipboardData"),nt&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var mt=clipboardToIE11Formatting[tt.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(mt,et)}else ht.clipboardData.clearData(),ht.clipboardData.setData(tt.format,et);tt.onCopy&&(ht.preventDefault(),tt.onCopy(ht.clipboardData))}),document.body.appendChild(ct),st.selectNodeContents(ct),ut.addRange(st);var pt=document.execCommand("copy");if(!pt)throw new Error("copy command was unsuccessful");ft=!0}catch(ht){nt&&console.error("unable to copy using execCommand: ",ht),nt&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(tt.format||"text",et),tt.onCopy&&tt.onCopy(window.clipboardData),ft=!0}catch(mt){nt&&console.error("unable to copy using clipboardData: ",mt),nt&&console.error("falling back to prompt"),rt=format$4("message"in tt?tt.message:defaultMessage),window.prompt(rt,et)}}finally{ut&&(typeof ut.removeRange=="function"?ut.removeRange(st):ut.removeAllRanges()),ct&&document.body.removeChild(ct),ot()}return ft}var copyToClipboard=copy$4;function _typeof$8(et){return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof$8(et)}const _typeof$9=Object.freeze(Object.defineProperty({__proto__:null,default:_typeof$8},Symbol.toStringTag,{value:"Module"}));var handleRef=function et(tt,nt){if(typeof tt=="function"){tt(nt);return}tt!==null&&_typeof$8(tt)==="object"&&(tt.current=nt)};const handleRef$1=handleRef;var isRefObject$1=function et(tt){return tt!==null&&_typeof$8(tt)==="object"&&tt.hasOwnProperty("current")};const isRefObject$2=isRefObject$1;var nullRefObject={current:null},refObjects=new WeakMap,toRefObject=function et(tt){if(tt===null)return nullRefObject;if(refObjects.has(tt))return refObjects.get(tt);var nt={current:tt};return refObjects.set(tt,nt),nt};const toRefObject$1=toRefObject;var propTypes$1={exports:{}},ReactPropTypesSecret$1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret$1,ReactPropTypesSecret=ReactPropTypesSecret_1;function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function et(rt,ot,st,ut,ct,ft){if(ft!==ReactPropTypesSecret){var pt=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 pt.name="Invariant Violation",pt}}et.isRequired=et;function tt(){return et}var nt={array:et,bigint:et,bool:et,func:et,number:et,object:et,string:et,symbol:et,any:et,arrayOf:tt,element:et,elementType:et,instanceOf:tt,node:et,objectOf:tt,oneOf:tt,oneOfType:tt,shape:tt,exact:tt,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return nt.PropTypes=nt,nt};propTypes$1.exports=factoryWithThrowingShims();var reactIs$2={exports:{}},reactIs_production_min$1={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var b$5=typeof Symbol=="function"&&Symbol.for,c$4=b$5?Symbol.for("react.element"):60103,d$2=b$5?Symbol.for("react.portal"):60106,e$3=b$5?Symbol.for("react.fragment"):60107,f$3=b$5?Symbol.for("react.strict_mode"):60108,g$3=b$5?Symbol.for("react.profiler"):60114,h$5=b$5?Symbol.for("react.provider"):60109,k$3=b$5?Symbol.for("react.context"):60110,l$2=b$5?Symbol.for("react.async_mode"):60111,m$4=b$5?Symbol.for("react.concurrent_mode"):60111,n$5=b$5?Symbol.for("react.forward_ref"):60112,p$4=b$5?Symbol.for("react.suspense"):60113,q$3=b$5?Symbol.for("react.suspense_list"):60120,r$4=b$5?Symbol.for("react.memo"):60115,t$3=b$5?Symbol.for("react.lazy"):60116,v$4=b$5?Symbol.for("react.block"):60121,w$5=b$5?Symbol.for("react.fundamental"):60117,x$8=b$5?Symbol.for("react.responder"):60118,y$6=b$5?Symbol.for("react.scope"):60119;function z$3(et){if(typeof et=="object"&&et!==null){var tt=et.$$typeof;switch(tt){case c$4:switch(et=et.type,et){case l$2:case m$4:case e$3:case g$3:case f$3:case p$4:return et;default:switch(et=et&&et.$$typeof,et){case k$3:case n$5:case t$3:case r$4:case h$5:return et;default:return tt}}case d$2:return tt}}}function A$4(et){return z$3(et)===m$4}reactIs_production_min$1.AsyncMode=l$2;reactIs_production_min$1.ConcurrentMode=m$4;reactIs_production_min$1.ContextConsumer=k$3;reactIs_production_min$1.ContextProvider=h$5;reactIs_production_min$1.Element=c$4;reactIs_production_min$1.ForwardRef=n$5;reactIs_production_min$1.Fragment=e$3;reactIs_production_min$1.Lazy=t$3;reactIs_production_min$1.Memo=r$4;reactIs_production_min$1.Portal=d$2;reactIs_production_min$1.Profiler=g$3;reactIs_production_min$1.StrictMode=f$3;reactIs_production_min$1.Suspense=p$4;reactIs_production_min$1.isAsyncMode=function(et){return A$4(et)||z$3(et)===l$2};reactIs_production_min$1.isConcurrentMode=A$4;reactIs_production_min$1.isContextConsumer=function(et){return z$3(et)===k$3};reactIs_production_min$1.isContextProvider=function(et){return z$3(et)===h$5};reactIs_production_min$1.isElement=function(et){return typeof et=="object"&&et!==null&&et.$$typeof===c$4};reactIs_production_min$1.isForwardRef=function(et){return z$3(et)===n$5};reactIs_production_min$1.isFragment=function(et){return z$3(et)===e$3};reactIs_production_min$1.isLazy=function(et){return z$3(et)===t$3};reactIs_production_min$1.isMemo=function(et){return z$3(et)===r$4};reactIs_production_min$1.isPortal=function(et){return z$3(et)===d$2};reactIs_production_min$1.isProfiler=function(et){return z$3(et)===g$3};reactIs_production_min$1.isStrictMode=function(et){return z$3(et)===f$3};reactIs_production_min$1.isSuspense=function(et){return z$3(et)===p$4};reactIs_production_min$1.isValidElementType=function(et){return typeof et=="string"||typeof et=="function"||et===e$3||et===m$4||et===g$3||et===f$3||et===p$4||et===q$3||typeof et=="object"&&et!==null&&(et.$$typeof===t$3||et.$$typeof===r$4||et.$$typeof===h$5||et.$$typeof===k$3||et.$$typeof===n$5||et.$$typeof===w$5||et.$$typeof===x$8||et.$$typeof===y$6||et.$$typeof===v$4)};reactIs_production_min$1.typeOf=z$3;(function(et){et.exports=reactIs_production_min$1})(reactIs$2);function _classCallCheck$2(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}const classCallCheck$2=Object.freeze(Object.defineProperty({__proto__:null,default:_classCallCheck$2},Symbol.toStringTag,{value:"Module"}));function _toPrimitive$5(et,tt){if(_typeof$8(et)!=="object"||et===null)return et;var nt=et[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(et,tt||"default");if(_typeof$8(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(tt==="string"?String:Number)(et)}function _toPropertyKey$5(et){var tt=_toPrimitive$5(et,"string");return _typeof$8(tt)==="symbol"?tt:String(tt)}function _defineProperties$2(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,_toPropertyKey$5(rt.key),rt)}}function _createClass$2(et,tt,nt){return tt&&_defineProperties$2(et.prototype,tt),nt&&_defineProperties$2(et,nt),Object.defineProperty(et,"prototype",{writable:!1}),et}const createClass$2=Object.freeze(Object.defineProperty({__proto__:null,default:_createClass$2},Symbol.toStringTag,{value:"Module"}));function _assertThisInitialized$2(et){if(et===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}const assertThisInitialized=Object.freeze(Object.defineProperty({__proto__:null,default:_assertThisInitialized$2},Symbol.toStringTag,{value:"Module"}));function _possibleConstructorReturn$2(et,tt){if(tt&&(_typeof$8(tt)==="object"||typeof tt=="function"))return tt;if(tt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$2(et)}const possibleConstructorReturn=Object.freeze(Object.defineProperty({__proto__:null,default:_possibleConstructorReturn$2},Symbol.toStringTag,{value:"Module"}));function _getPrototypeOf$2(et){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$2(et)}const getPrototypeOf$1=Object.freeze(Object.defineProperty({__proto__:null,default:_getPrototypeOf$2},Symbol.toStringTag,{value:"Module"}));function _setPrototypeOf$4(et,tt){return _setPrototypeOf$4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$4(et,tt)}function _inherits$2(et,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),Object.defineProperty(et,"prototype",{writable:!1}),tt&&_setPrototypeOf$4(et,tt)}const inherits$2=Object.freeze(Object.defineProperty({__proto__:null,default:_inherits$2},Symbol.toStringTag,{value:"Module"}));function _defineProperty$d(et,tt,nt){return tt=_toPropertyKey$5(tt),tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}const defineProperty$9=Object.freeze(Object.defineProperty({__proto__:null,default:_defineProperty$d},Symbol.toStringTag,{value:"Module"}));var RefFindNode=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"prevNode",null),rt}return _createClass$2(tt,[{key:"componentDidMount",value:function(){this.prevNode=reactDom.exports.findDOMNode(this),handleRef$1(this.props.innerRef,this.prevNode)}},{key:"componentDidUpdate",value:function(rt){var ot=reactDom.exports.findDOMNode(this);this.prevNode!==ot&&(this.prevNode=ot,handleRef$1(this.props.innerRef,ot)),rt.innerRef!==this.props.innerRef&&handleRef$1(this.props.innerRef,ot)}},{key:"componentWillUnmount",value:function(){handleRef$1(this.props.innerRef,null)}},{key:"render",value:function(){var rt=this.props.children;return rt}}]),tt}(react.exports.Component);_defineProperty$d(RefFindNode,"displayName","RefFindNode");_defineProperty$d(RefFindNode,"propTypes",{});var RefForward=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleRefOverride",function(ct){var ft=rt.props,pt=ft.children,ht=ft.innerRef;handleRef$1(pt.ref,ct),handleRef$1(ht,ct)}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props.children;return react.exports.cloneElement(rt,{ref:this.handleRefOverride})}}]),tt}(react.exports.Component);_defineProperty$d(RefForward,"displayName","RefForward");_defineProperty$d(RefForward,"propTypes",{});var Ref=function et(tt){var nt=tt.children,rt=tt.innerRef,ot=react.exports.Children.only(nt),st=reactIs$2.exports.isForwardRef(ot)?RefForward:RefFindNode;return react.exports.createElement(st,{innerRef:rt},ot)};Ref.displayName="Ref";const Ref$1=Ref;function _extends$a(){return _extends$a=Object.assign?Object.assign.bind():function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$a.apply(this,arguments)}const _extends$b=Object.freeze(Object.defineProperty({__proto__:null,default:_extends$a},Symbol.toStringTag,{value:"Module"}));var isArray$n=Array.isArray,isArray_1=isArray$n,freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$h=freeGlobal||freeSelf||Function("return this")(),_root=root$h,root$g=_root,Symbol$8=root$g.Symbol,_Symbol=Symbol$8,Symbol$7=_Symbol,objectProto$i=Object.prototype,hasOwnProperty$h=objectProto$i.hasOwnProperty,nativeObjectToString$2=objectProto$i.toString,symToStringTag$1=Symbol$7?Symbol$7.toStringTag:void 0;function getRawTag$1(et){var tt=hasOwnProperty$h.call(et,symToStringTag$1),nt=et[symToStringTag$1];try{et[symToStringTag$1]=void 0;var rt=!0}catch{}var ot=nativeObjectToString$2.call(et);return rt&&(tt?et[symToStringTag$1]=nt:delete et[symToStringTag$1]),ot}var _getRawTag=getRawTag$1,objectProto$h=Object.prototype,nativeObjectToString$1=objectProto$h.toString;function objectToString$2(et){return nativeObjectToString$1.call(et)}var _objectToString=objectToString$2,Symbol$6=_Symbol,getRawTag=_getRawTag,objectToString$1=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$6?Symbol$6.toStringTag:void 0;function baseGetTag$a(et){return et==null?et===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(et)?getRawTag(et):objectToString$1(et)}var _baseGetTag=baseGetTag$a;function isObjectLike$f(et){return et!=null&&typeof et=="object"}var isObjectLike_1=isObjectLike$f,baseGetTag$9=_baseGetTag,isObjectLike$e=isObjectLike_1,symbolTag$3="[object Symbol]";function isSymbol$5(et){return typeof et=="symbol"||isObjectLike$e(et)&&baseGetTag$9(et)==symbolTag$3}var isSymbol_1=isSymbol$5,isArray$m=isArray_1,isSymbol$4=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$3(et,tt){if(isArray$m(et))return!1;var nt=typeof et;return nt=="number"||nt=="symbol"||nt=="boolean"||et==null||isSymbol$4(et)?!0:reIsPlainProp.test(et)||!reIsDeepProp.test(et)||tt!=null&&et in Object(tt)}var _isKey=isKey$3;function isObject$h(et){var tt=typeof et;return et!=null&&(tt=="object"||tt=="function")}var isObject_1=isObject$h,baseGetTag$8=_baseGetTag,isObject$g=isObject_1,asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$9(et){if(!isObject$g(et))return!1;var tt=baseGetTag$8(et);return tt==funcTag$2||tt==genTag$1||tt==asyncTag||tt==proxyTag}var isFunction_1=isFunction$9,root$f=_root,coreJsData$1=root$f["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var et=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return et?"Symbol(src)_1."+et:""}();function isMasked$1(et){return!!maskSrcKey&&maskSrcKey in et}var _isMasked=isMasked$1,funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource$2(et){if(et!=null){try{return funcToString$2.call(et)}catch{}try{return et+""}catch{}}return""}var _toSource=toSource$2,isFunction$8=isFunction_1,isMasked=_isMasked,isObject$f=isObject_1,toSource$1=_toSource,reRegExpChar$1=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$g=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$g=objectProto$g.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$g).replace(reRegExpChar$1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(et){if(!isObject$f(et)||isMasked(et))return!1;var tt=isFunction$8(et)?reIsNative:reIsHostCtor;return tt.test(toSource$1(et))}var _baseIsNative=baseIsNative$1;function getValue$4(et,tt){return et?.[tt]}var _getValue=getValue$4,baseIsNative=_baseIsNative,getValue$3=_getValue;function getNative$7(et,tt){var nt=getValue$3(et,tt);return baseIsNative(nt)?nt:void 0}var _getNative=getNative$7,getNative$6=_getNative,nativeCreate$4=getNative$6(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(et){var tt=this.has(et)&&delete this.__data__[et];return this.size-=tt?1:0,tt}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$f=Object.prototype,hasOwnProperty$f=objectProto$f.hasOwnProperty;function hashGet$1(et){var tt=this.__data__;if(nativeCreate$2){var nt=tt[et];return nt===HASH_UNDEFINED$2?void 0:nt}return hasOwnProperty$f.call(tt,et)?tt[et]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$e=Object.prototype,hasOwnProperty$e=objectProto$e.hasOwnProperty;function hashHas$1(et){var tt=this.__data__;return nativeCreate$1?tt[et]!==void 0:hasOwnProperty$e.call(tt,et)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet$1(et,tt){var nt=this.__data__;return this.size+=this.has(et)?0:1,nt[et]=nativeCreate&&tt===void 0?HASH_UNDEFINED$1:tt,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(et){var tt=-1,nt=et==null?0:et.length;for(this.clear();++tt<nt;){var rt=et[tt];this.set(rt[0],rt[1])}}Hash$1.prototype.clear=hashClear;Hash$1.prototype.delete=hashDelete;Hash$1.prototype.get=hashGet;Hash$1.prototype.has=hashHas;Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$7(et,tt){return et===tt||et!==et&&tt!==tt}var eq_1$1=eq$7,eq$6=eq_1$1;function assocIndexOf$4(et,tt){for(var nt=et.length;nt--;)if(eq$6(et[nt][0],tt))return nt;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(et){var tt=this.__data__,nt=assocIndexOf$3(tt,et);if(nt<0)return!1;var rt=tt.length-1;return nt==rt?tt.pop():splice.call(tt,nt,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(et){var tt=this.__data__,nt=assocIndexOf$2(tt,et);return nt<0?void 0:tt[nt][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(et){return assocIndexOf$1(this.__data__,et)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(et,tt){var nt=this.__data__,rt=assocIndexOf(nt,et);return rt<0?(++this.size,nt.push([et,tt])):nt[rt][1]=tt,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(et){var tt=-1,nt=et==null?0:et.length;for(this.clear();++tt<nt;){var rt=et[tt];this.set(rt[0],rt[1])}}ListCache$4.prototype.clear=listCacheClear;ListCache$4.prototype.delete=listCacheDelete;ListCache$4.prototype.get=listCacheGet;ListCache$4.prototype.has=listCacheHas;ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,getNative$5=_getNative,root$e=_root,Map$4=getNative$5(root$e,"Map"),_Map=Map$4,Hash=_Hash,ListCache$3=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$3),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(et){var tt=typeof et;return tt=="string"||tt=="number"||tt=="symbol"||tt=="boolean"?et!=="__proto__":et===null}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(et,tt){var nt=et.__data__;return isKeyable(tt)?nt[typeof tt=="string"?"string":"hash"]:nt.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(et){var tt=getMapData$3(this,et).delete(et);return this.size-=tt?1:0,tt}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(et){return getMapData$2(this,et).get(et)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(et){return getMapData$1(this,et).has(et)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(et,tt){var nt=getMapData(this,et),rt=nt.size;return nt.set(et,tt),this.size+=nt.size==rt?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$2(et){var tt=-1,nt=et==null?0:et.length;for(this.clear();++tt<nt;){var rt=et[tt];this.set(rt[0],rt[1])}}MapCache$2.prototype.clear=mapCacheClear;MapCache$2.prototype.delete=mapCacheDelete;MapCache$2.prototype.get=mapCacheGet;MapCache$2.prototype.has=mapCacheHas;MapCache$2.prototype.set=mapCacheSet;var _MapCache=MapCache$2,memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var et=_MapCache,tt="Expected a function";function nt(rt,ot){if(typeof rt!="function"||ot!=null&&typeof ot!="function")throw new TypeError(tt);var st=function(){var ut=arguments,ct=ot?ot.apply(this,ut):ut[0],ft=st.cache;if(ft.has(ct))return ft.get(ct);var pt=rt.apply(this,ut);return st.cache=ft.set(ct,pt)||ft,pt};return st.cache=new(nt.Cache||et),st}return nt.Cache=et,memoize_1=nt,memoize_1}var memoize$4=requireMemoize(),MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(et){var tt=memoize$4(et,function(rt){return nt.size===MAX_MEMOIZE_SIZE&&nt.clear(),rt}),nt=tt.cache;return tt}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName$1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$3=memoizeCapped(function(et){var tt=[];return et.charCodeAt(0)===46&&tt.push(""),et.replace(rePropName$1,function(nt,rt,ot,st){tt.push(ot?st.replace(reEscapeChar$1,"$1"):rt||nt)}),tt}),_stringToPath=stringToPath$3;function arrayMap$7(et,tt){for(var nt=-1,rt=et==null?0:et.length,ot=Array(rt);++nt<rt;)ot[nt]=tt(et[nt],nt,et);return ot}var _arrayMap=arrayMap$7,Symbol$5=_Symbol,arrayMap$6=_arrayMap,isArray$l=isArray_1,isSymbol$3=isSymbol_1,INFINITY$3=1/0,symbolProto$2=Symbol$5?Symbol$5.prototype:void 0,symbolToString=symbolProto$2?symbolProto$2.toString:void 0;function baseToString$1(et){if(typeof et=="string")return et;if(isArray$l(et))return arrayMap$6(et,baseToString$1)+"";if(isSymbol$3(et))return symbolToString?symbolToString.call(et):"";var tt=et+"";return tt=="0"&&1/et==-INFINITY$3?"-0":tt}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$a(et){return et==null?"":baseToString(et)}var toString_1=toString$a,isArray$k=isArray_1,isKey$2=_isKey,stringToPath$2=_stringToPath,toString$9=toString_1;function castPath$5(et,tt){return isArray$k(et)?et:isKey$2(et,tt)?[et]:stringToPath$2(toString$9(et))}var _castPath=castPath$5,baseGetTag$7=_baseGetTag,isObjectLike$d=isObjectLike_1,argsTag$3="[object Arguments]";function baseIsArguments$1(et){return isObjectLike$d(et)&&baseGetTag$7(et)==argsTag$3}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$c=isObjectLike_1,objectProto$d=Object.prototype,hasOwnProperty$d=objectProto$d.hasOwnProperty,propertyIsEnumerable$1=objectProto$d.propertyIsEnumerable,isArguments$8=baseIsArguments(function(){return arguments}())?baseIsArguments:function(et){return isObjectLike$c(et)&&hasOwnProperty$d.call(et,"callee")&&!propertyIsEnumerable$1.call(et,"callee")},isArguments_1=isArguments$8,MAX_SAFE_INTEGER$3=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$5(et,tt){var nt=typeof et;return tt=tt??MAX_SAFE_INTEGER$3,!!tt&&(nt=="number"||nt!="symbol"&&reIsUint.test(et))&&et>-1&&et%1==0&&et<tt}var _isIndex=isIndex$5,MAX_SAFE_INTEGER$2=9007199254740991;function isLength$3(et){return typeof et=="number"&&et>-1&&et%1==0&&et<=MAX_SAFE_INTEGER$2}var isLength_1=isLength$3,isSymbol$2=isSymbol_1,INFINITY$2=1/0;function toKey$7(et){if(typeof et=="string"||isSymbol$2(et))return et;var tt=et+"";return tt=="0"&&1/et==-INFINITY$2?"-0":tt}var _toKey=toKey$7,castPath$4=_castPath,isArguments$7=isArguments_1,isArray$j=isArray_1,isIndex$4=_isIndex,isLength$2=isLength_1,toKey$6=_toKey;function hasPath$2(et,tt,nt){tt=castPath$4(tt,et);for(var rt=-1,ot=tt.length,st=!1;++rt<ot;){var ut=toKey$6(tt[rt]);if(!(st=et!=null&&nt(et,ut)))break;et=et[ut]}return st||++rt!=ot?st:(ot=et==null?0:et.length,!!ot&&isLength$2(ot)&&isIndex$4(ut,ot)&&(isArray$j(et)||isArguments$7(et)))}var _hasPath=hasPath$2;function apply$7(et,tt,nt){switch(nt.length){case 0:return et.call(tt);case 1:return et.call(tt,nt[0]);case 2:return et.call(tt,nt[0],nt[1]);case 3:return et.call(tt,nt[0],nt[1],nt[2])}return et.apply(tt,nt)}var _apply=apply$7;function last$2(et){var tt=et==null?0:et.length;return tt?et[tt-1]:void 0}var last_1=last$2,castPath$3=_castPath,toKey$5=_toKey;function baseGet$4(et,tt){tt=castPath$3(tt,et);for(var nt=0,rt=tt.length;et!=null&&nt<rt;)et=et[toKey$5(tt[nt++])];return nt&&nt==rt?et:void 0}var _baseGet=baseGet$4;function baseSlice$3(et,tt,nt){var rt=-1,ot=et.length;tt<0&&(tt=-tt>ot?0:ot+tt),nt=nt>ot?ot:nt,nt<0&&(nt+=ot),ot=tt>nt?0:nt-tt>>>0,tt>>>=0;for(var st=Array(ot);++rt<ot;)st[rt]=et[rt+tt];return st}var _baseSlice=baseSlice$3,baseGet$3=_baseGet,baseSlice$2=_baseSlice;function parent$2(et,tt){return tt.length<2?et:baseGet$3(et,baseSlice$2(tt,0,-1))}var _parent=parent$2,apply$6=_apply,castPath$2=_castPath,last$1=last_1,parent$1=_parent,toKey$4=_toKey;function baseInvoke$1(et,tt,nt){tt=castPath$2(tt,et),et=parent$1(et,tt);var rt=et==null?et:et[toKey$4(last$1(tt))];return rt==null?void 0:apply$6(rt,et,nt)}var _baseInvoke=baseInvoke$1;function identity$f(et){return et}var identity_1=identity$f,apply$5=_apply,nativeMax$7=Math.max;function overRest$2(et,tt,nt){return tt=nativeMax$7(tt===void 0?et.length-1:tt,0),function(){for(var rt=arguments,ot=-1,st=nativeMax$7(rt.length-tt,0),ut=Array(st);++ot<st;)ut[ot]=rt[tt+ot];ot=-1;for(var ct=Array(tt+1);++ot<tt;)ct[ot]=rt[ot];return ct[tt]=nt(ut),apply$5(et,this,ct)}}var _overRest=overRest$2;function constant$9(et){return function(){return et}}var constant_1=constant$9,getNative$4=_getNative,defineProperty$8=function(){try{var et=getNative$4(Object,"defineProperty");return et({},"",{}),et}catch{}}(),_defineProperty$c=defineProperty$8,constant$8=constant_1,defineProperty$7=_defineProperty$c,identity$e=identity_1,baseSetToString$1=defineProperty$7?function(et,tt){return defineProperty$7(et,"toString",{configurable:!0,enumerable:!1,value:constant$8(tt),writable:!0})}:identity$e,_baseSetToString=baseSetToString$1,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut$2(et){var tt=0,nt=0;return function(){var rt=nativeNow(),ot=HOT_SPAN-(rt-nt);if(nt=rt,ot>0){if(++tt>=HOT_COUNT)return arguments[0]}else tt=0;return et.apply(void 0,arguments)}}var _shortOut=shortOut$2,baseSetToString=_baseSetToString,shortOut$1=_shortOut,setToString$3=shortOut$1(baseSetToString),_setToString=setToString$3,identity$d=identity_1,overRest$1=_overRest,setToString$2=_setToString;function baseRest$6(et,tt){return setToString$2(overRest$1(et,tt,identity$d),et+"")}var _baseRest=baseRest$6,baseInvoke=_baseInvoke,baseRest$5=_baseRest,invoke$1=baseRest$5(baseInvoke),invoke_1=invoke$1;function _objectSpread$g(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?Object(arguments[tt]):{},rt=Object.keys(nt);typeof Object.getOwnPropertySymbols=="function"&&rt.push.apply(rt,Object.getOwnPropertySymbols(nt).filter(function(ot){return Object.getOwnPropertyDescriptor(nt,ot).enumerable})),rt.forEach(function(ot){_defineProperty$d(et,ot,nt[ot])})}return et}function isUndefined(et){return et===void 0}var isUndefined_1=isUndefined,reWhitespace$1=/\s/;function trimmedEndIndex$1(et){for(var tt=et.length;tt--&&reWhitespace$1.test(et.charAt(tt)););return tt}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(et){return et&&et.slice(0,trimmedEndIndex(et)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$e=isObject_1,isSymbol$1=isSymbol_1,NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$4(et){if(typeof et=="number")return et;if(isSymbol$1(et))return NAN;if(isObject$e(et)){var tt=typeof et.valueOf=="function"?et.valueOf():et;et=isObject$e(tt)?tt+"":tt}if(typeof et!="string")return et===0?et:+et;et=baseTrim(et);var nt=reIsBinary.test(et);return nt||reIsOctal.test(et)?freeParseInt(et.slice(2),nt?2:8):reIsBadHex.test(et)?NAN:+et}var toNumber_1=toNumber$4,toNumber$3=toNumber_1,INFINITY$1=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$2(et){if(!et)return et===0?et:0;if(et=toNumber$3(et),et===INFINITY$1||et===-INFINITY$1){var tt=et<0?-1:1;return tt*MAX_INTEGER}return et===et?et:0}var toFinite_1=toFinite$2,toFinite$1=toFinite_1;function toInteger$4(et){var tt=toFinite$1(et),nt=tt%1;return tt===tt?nt?tt-nt:tt:0}var toInteger_1=toInteger$4;function arrayFilter$2(et,tt){for(var nt=-1,rt=et==null?0:et.length,ot=0,st=[];++nt<rt;){var ut=et[nt];tt(ut,nt,et)&&(st[ot++]=ut)}return st}var _arrayFilter=arrayFilter$2;function createBaseFor$1(et){return function(tt,nt,rt){for(var ot=-1,st=Object(tt),ut=rt(tt),ct=ut.length;ct--;){var ft=ut[et?ct:++ot];if(nt(st[ft],ft,st)===!1)break}return tt}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$2=createBaseFor(),_baseFor=baseFor$2;function baseTimes$1(et,tt){for(var nt=-1,rt=Array(et);++nt<et;)rt[nt]=tt(nt);return rt}var _baseTimes=baseTimes$1,isBuffer$8={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;(function(et,tt){var nt=_root,rt=stubFalse_1,ot=tt&&!tt.nodeType&&tt,st=ot&&!0&&et&&!et.nodeType&&et,ut=st&&st.exports===ot,ct=ut?nt.Buffer:void 0,ft=ct?ct.isBuffer:void 0,pt=ft||rt;et.exports=pt})(isBuffer$8,isBuffer$8.exports);var baseGetTag$6=_baseGetTag,isLength$1=isLength_1,isObjectLike$b=isObjectLike_1,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$4="[object Boolean]",dateTag$3="[object Date]",errorTag$3="[object Error]",funcTag$1="[object Function]",mapTag$7="[object Map]",numberTag$4="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$7="[object Set]",stringTag$4="[object String]",weakMapTag$3="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$4]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$3]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$7]=typedArrayTags[numberTag$4]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$7]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$3]=!1;function baseIsTypedArray$1(et){return isObjectLike$b(et)&&isLength$1(et.length)&&!!typedArrayTags[baseGetTag$6(et)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$5(et){return function(tt){return et(tt)}}var _baseUnary=baseUnary$5,_nodeUtil={exports:{}};(function(et,tt){var nt=_freeGlobal,rt=tt&&!tt.nodeType&&tt,ot=rt&&!0&&et&&!et.nodeType&&et,st=ot&&ot.exports===rt,ut=st&&nt.process,ct=function(){try{var ft=ot&&ot.require&&ot.require("util").types;return ft||ut&&ut.binding&&ut.binding("util")}catch{}}();et.exports=ct})(_nodeUtil,_nodeUtil.exports);var baseIsTypedArray=_baseIsTypedArray,baseUnary$4=_baseUnary,nodeUtil$2=_nodeUtil.exports,nodeIsTypedArray=nodeUtil$2&&nodeUtil$2.isTypedArray,isTypedArray$4=nodeIsTypedArray?baseUnary$4(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$4,baseTimes=_baseTimes,isArguments$6=isArguments_1,isArray$i=isArray_1,isBuffer$7=isBuffer$8.exports,isIndex$3=_isIndex,isTypedArray$3=isTypedArray_1,objectProto$c=Object.prototype,hasOwnProperty$c=objectProto$c.hasOwnProperty;function arrayLikeKeys$2(et,tt){var nt=isArray$i(et),rt=!nt&&isArguments$6(et),ot=!nt&&!rt&&isBuffer$7(et),st=!nt&&!rt&&!ot&&isTypedArray$3(et),ut=nt||rt||ot||st,ct=ut?baseTimes(et.length,String):[],ft=ct.length;for(var pt in et)(tt||hasOwnProperty$c.call(et,pt))&&!(ut&&(pt=="length"||ot&&(pt=="offset"||pt=="parent")||st&&(pt=="buffer"||pt=="byteLength"||pt=="byteOffset")||isIndex$3(pt,ft)))&&ct.push(pt);return ct}var _arrayLikeKeys=arrayLikeKeys$2,objectProto$b=Object.prototype;function isPrototype$4(et){var tt=et&&et.constructor,nt=typeof tt=="function"&&tt.prototype||objectProto$b;return et===nt}var _isPrototype=isPrototype$4;function overArg$2(et,tt){return function(nt){return et(tt(nt))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$3=_isPrototype,nativeKeys=_nativeKeys,objectProto$a=Object.prototype,hasOwnProperty$b=objectProto$a.hasOwnProperty;function baseKeys$3(et){if(!isPrototype$3(et))return nativeKeys(et);var tt=[];for(var nt in Object(et))hasOwnProperty$b.call(et,nt)&&nt!="constructor"&&tt.push(nt);return tt}var _baseKeys=baseKeys$3,isFunction$7=isFunction_1,isLength=isLength_1;function isArrayLike$a(et){return et!=null&&isLength(et.length)&&!isFunction$7(et)}var isArrayLike_1=isArrayLike$a,arrayLikeKeys$1=_arrayLikeKeys,baseKeys$2=_baseKeys,isArrayLike$9=isArrayLike_1;function keys$f(et){return isArrayLike$9(et)?arrayLikeKeys$1(et):baseKeys$2(et)}var keys_1=keys$f,baseFor$1=_baseFor,keys$e=keys_1;function baseForOwn$2(et,tt){return et&&baseFor$1(et,tt,keys$e)}var _baseForOwn=baseForOwn$2,isArrayLike$8=isArrayLike_1;function createBaseEach$1(et,tt){return function(nt,rt){if(nt==null)return nt;if(!isArrayLike$8(nt))return et(nt,rt);for(var ot=nt.length,st=tt?ot:-1,ut=Object(nt);(tt?st--:++st<ot)&&rt(ut[st],st,ut)!==!1;);return nt}}var _createBaseEach=createBaseEach$1,baseForOwn$1=_baseForOwn,createBaseEach=_createBaseEach,baseEach$6=createBaseEach(baseForOwn$1),_baseEach=baseEach$6,baseEach$5=_baseEach;function baseFilter$1(et,tt){var nt=[];return baseEach$5(et,function(rt,ot,st){tt(rt,ot,st)&&nt.push(rt)}),nt}var _baseFilter=baseFilter$1,ListCache$2=_ListCache;function stackClear$1(){this.__data__=new ListCache$2,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(et){var tt=this.__data__,nt=tt.delete(et);return this.size=tt.size,nt}var _stackDelete=stackDelete$1;function stackGet$1(et){return this.__data__.get(et)}var _stackGet=stackGet$1;function stackHas$1(et){return this.__data__.has(et)}var _stackHas=stackHas$1,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE$2=200;function stackSet$1(et,tt){var nt=this.__data__;if(nt instanceof ListCache$1){var rt=nt.__data__;if(!Map$2||rt.length<LARGE_ARRAY_SIZE$2-1)return rt.push([et,tt]),this.size=++nt.size,this;nt=this.__data__=new MapCache$1(rt)}return nt.set(et,tt),this.size=nt.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$5(et){var tt=this.__data__=new ListCache(et);this.size=tt.size}Stack$5.prototype.clear=stackClear;Stack$5.prototype.delete=stackDelete;Stack$5.prototype.get=stackGet;Stack$5.prototype.has=stackHas;Stack$5.prototype.set=stackSet;var _Stack=Stack$5,HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(et){return this.__data__.set(et,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(et){return this.__data__.has(et)}var _setCacheHas=setCacheHas$1,MapCache=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$4(et){var tt=-1,nt=et==null?0:et.length;for(this.__data__=new MapCache;++tt<nt;)this.add(et[tt])}SetCache$4.prototype.add=SetCache$4.prototype.push=setCacheAdd;SetCache$4.prototype.has=setCacheHas;var _SetCache=SetCache$4;function arraySome$2(et,tt){for(var nt=-1,rt=et==null?0:et.length;++nt<rt;)if(tt(et[nt],nt,et))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$4(et,tt){return et.has(tt)}var _cacheHas=cacheHas$4,SetCache$3=_SetCache,arraySome$1=_arraySome,cacheHas$3=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(et,tt,nt,rt,ot,st){var ut=nt&COMPARE_PARTIAL_FLAG$5,ct=et.length,ft=tt.length;if(ct!=ft&&!(ut&&ft>ct))return!1;var pt=st.get(et),ht=st.get(tt);if(pt&&ht)return pt==tt&&ht==et;var mt=-1,yt=!0,vt=nt&COMPARE_UNORDERED_FLAG$3?new SetCache$3:void 0;for(st.set(et,tt),st.set(tt,et);++mt<ct;){var Tt=et[mt],Et=tt[mt];if(rt)var xt=ut?rt(Et,Tt,mt,tt,et,st):rt(Tt,Et,mt,et,tt,st);if(xt!==void 0){if(xt)continue;yt=!1;break}if(vt){if(!arraySome$1(tt,function(At,Ct){if(!cacheHas$3(vt,Ct)&&(Tt===At||ot(Tt,At,nt,rt,st)))return vt.push(Ct)})){yt=!1;break}}else if(!(Tt===Et||ot(Tt,Et,nt,rt,st))){yt=!1;break}}return st.delete(et),st.delete(tt),yt}var _equalArrays=equalArrays$2,root$d=_root,Uint8Array$3=root$d.Uint8Array,_Uint8Array=Uint8Array$3;function mapToArray$1(et){var tt=-1,nt=Array(et.size);return et.forEach(function(rt,ot){nt[++tt]=[ot,rt]}),nt}var _mapToArray=mapToArray$1;function setToArray$3(et){var tt=-1,nt=Array(et.size);return et.forEach(function(rt){nt[++tt]=rt}),nt}var _setToArray=setToArray$3,Symbol$4=_Symbol,Uint8Array$2=_Uint8Array,eq$5=eq_1$1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray$2=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$3="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$6="[object Map]",numberTag$3="[object Number]",regexpTag$2="[object RegExp]",setTag$6="[object Set]",stringTag$3="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$1=Symbol$4?Symbol$4.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function equalByTag$1(et,tt,nt,rt,ot,st,ut){switch(nt){case dataViewTag$3:if(et.byteLength!=tt.byteLength||et.byteOffset!=tt.byteOffset)return!1;et=et.buffer,tt=tt.buffer;case arrayBufferTag$2:return!(et.byteLength!=tt.byteLength||!st(new Uint8Array$2(et),new Uint8Array$2(tt)));case boolTag$3:case dateTag$2:case numberTag$3:return eq$5(+et,+tt);case errorTag$2:return et.name==tt.name&&et.message==tt.message;case regexpTag$2:case stringTag$3:return et==tt+"";case mapTag$6:var ct=mapToArray;case setTag$6:var ft=rt&COMPARE_PARTIAL_FLAG$4;if(ct||(ct=setToArray$2),et.size!=tt.size&&!ft)return!1;var pt=ut.get(et);if(pt)return pt==tt;rt|=COMPARE_UNORDERED_FLAG$2,ut.set(et,tt);var ht=equalArrays$1(ct(et),ct(tt),rt,ot,st,ut);return ut.delete(et),ht;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(et)==symbolValueOf$1.call(tt)}return!1}var _equalByTag=equalByTag$1;function arrayPush$3(et,tt){for(var nt=-1,rt=tt.length,ot=et.length;++nt<rt;)et[ot+nt]=tt[nt];return et}var _arrayPush=arrayPush$3,arrayPush$2=_arrayPush,isArray$h=isArray_1;function baseGetAllKeys$2(et,tt,nt){var rt=tt(et);return isArray$h(et)?rt:arrayPush$2(rt,nt(et))}var _baseGetAllKeys=baseGetAllKeys$2;function stubArray$2(){return[]}var stubArray_1=stubArray$2,arrayFilter$1=_arrayFilter,stubArray$1=stubArray_1,objectProto$9=Object.prototype,propertyIsEnumerable=objectProto$9.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols$3=nativeGetSymbols$1?function(et){return et==null?[]:(et=Object(et),arrayFilter$1(nativeGetSymbols$1(et),function(tt){return propertyIsEnumerable.call(et,tt)}))}:stubArray$1,_getSymbols=getSymbols$3,baseGetAllKeys$1=_baseGetAllKeys,getSymbols$2=_getSymbols,keys$d=keys_1;function getAllKeys$2(et){return baseGetAllKeys$1(et,keys$d,getSymbols$2)}var _getAllKeys=getAllKeys$2,getAllKeys$1=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$8=Object.prototype,hasOwnProperty$a=objectProto$8.hasOwnProperty;function equalObjects$1(et,tt,nt,rt,ot,st){var ut=nt&COMPARE_PARTIAL_FLAG$3,ct=getAllKeys$1(et),ft=ct.length,pt=getAllKeys$1(tt),ht=pt.length;if(ft!=ht&&!ut)return!1;for(var mt=ft;mt--;){var yt=ct[mt];if(!(ut?yt in tt:hasOwnProperty$a.call(tt,yt)))return!1}var vt=st.get(et),Tt=st.get(tt);if(vt&&Tt)return vt==tt&&Tt==et;var Et=!0;st.set(et,tt),st.set(tt,et);for(var xt=ut;++mt<ft;){yt=ct[mt];var At=et[yt],Ct=tt[yt];if(rt)var $t=ut?rt(Ct,At,yt,tt,et,st):rt(At,Ct,yt,et,tt,st);if(!($t===void 0?At===Ct||ot(At,Ct,nt,rt,st):$t)){Et=!1;break}xt||(xt=yt=="constructor")}if(Et&&!xt){var Ot=et.constructor,Rt=tt.constructor;Ot!=Rt&&"constructor"in et&&"constructor"in tt&&!(typeof Ot=="function"&&Ot instanceof Ot&&typeof Rt=="function"&&Rt instanceof Rt)&&(Et=!1)}return st.delete(et),st.delete(tt),Et}var _equalObjects=equalObjects$1,getNative$3=_getNative,root$c=_root,DataView$2=getNative$3(root$c,"DataView"),_DataView=DataView$2,getNative$2=_getNative,root$b=_root,Promise$2=getNative$2(root$b,"Promise"),_Promise=Promise$2,getNative$1=_getNative,root$a=_root,Set$3=getNative$1(root$a,"Set"),_Set=Set$3,getNative=_getNative,root$9=_root,WeakMap$3=getNative(root$9,"WeakMap"),_WeakMap=WeakMap$3,DataView$1=_DataView,Map$1=_Map,Promise$1=_Promise,Set$2=_Set,WeakMap$2=_WeakMap,baseGetTag$5=_baseGetTag,toSource=_toSource,mapTag$5="[object Map]",objectTag$3="[object Object]",promiseTag="[object Promise]",setTag$5="[object Set]",weakMapTag$2="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$2),weakMapCtorString=toSource(WeakMap$2),getTag$7=baseGetTag$5;(DataView$1&&getTag$7(new DataView$1(new ArrayBuffer(1)))!=dataViewTag$2||Map$1&&getTag$7(new Map$1)!=mapTag$5||Promise$1&&getTag$7(Promise$1.resolve())!=promiseTag||Set$2&&getTag$7(new Set$2)!=setTag$5||WeakMap$2&&getTag$7(new WeakMap$2)!=weakMapTag$2)&&(getTag$7=function(et){var tt=baseGetTag$5(et),nt=tt==objectTag$3?et.constructor:void 0,rt=nt?toSource(nt):"";if(rt)switch(rt){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$5;case promiseCtorString:return promiseTag;case setCtorString:return setTag$5;case weakMapCtorString:return weakMapTag$2}return tt});var _getTag=getTag$7,Stack$4=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag$6=_getTag,isArray$g=isArray_1,isBuffer$6=isBuffer$8.exports,isTypedArray$2=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",objectTag$2="[object Object]",objectProto$7=Object.prototype,hasOwnProperty$9=objectProto$7.hasOwnProperty;function baseIsEqualDeep$1(et,tt,nt,rt,ot,st){var ut=isArray$g(et),ct=isArray$g(tt),ft=ut?arrayTag$1:getTag$6(et),pt=ct?arrayTag$1:getTag$6(tt);ft=ft==argsTag$1?objectTag$2:ft,pt=pt==argsTag$1?objectTag$2:pt;var ht=ft==objectTag$2,mt=pt==objectTag$2,yt=ft==pt;if(yt&&isBuffer$6(et)){if(!isBuffer$6(tt))return!1;ut=!0,ht=!1}if(yt&&!ht)return st||(st=new Stack$4),ut||isTypedArray$2(et)?equalArrays(et,tt,nt,rt,ot,st):equalByTag(et,tt,ft,nt,rt,ot,st);if(!(nt&COMPARE_PARTIAL_FLAG$2)){var vt=ht&&hasOwnProperty$9.call(et,"__wrapped__"),Tt=mt&&hasOwnProperty$9.call(tt,"__wrapped__");if(vt||Tt){var Et=vt?et.value():et,xt=Tt?tt.value():tt;return st||(st=new Stack$4),ot(Et,xt,nt,rt,st)}}return yt?(st||(st=new Stack$4),equalObjects(et,tt,nt,rt,ot,st)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$a=isObjectLike_1;function baseIsEqual$3(et,tt,nt,rt,ot){return et===tt?!0:et==null||tt==null||!isObjectLike$a(et)&&!isObjectLike$a(tt)?et!==et&&tt!==tt:baseIsEqualDeep(et,tt,nt,rt,baseIsEqual$3,ot)}var _baseIsEqual=baseIsEqual$3,Stack$3=_Stack,baseIsEqual$2=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(et,tt,nt,rt){var ot=nt.length,st=ot,ut=!rt;if(et==null)return!st;for(et=Object(et);ot--;){var ct=nt[ot];if(ut&&ct[2]?ct[1]!==et[ct[0]]:!(ct[0]in et))return!1}for(;++ot<st;){ct=nt[ot];var ft=ct[0],pt=et[ft],ht=ct[1];if(ut&&ct[2]){if(pt===void 0&&!(ft in et))return!1}else{var mt=new Stack$3;if(rt)var yt=rt(pt,ht,ft,et,tt,mt);if(!(yt===void 0?baseIsEqual$2(ht,pt,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,rt,mt):yt))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject$d=isObject_1;function isStrictComparable$2(et){return et===et&&!isObject$d(et)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$c=keys_1;function getMatchData$1(et){for(var tt=keys$c(et),nt=tt.length;nt--;){var rt=tt[nt],ot=et[rt];tt[nt]=[rt,ot,isStrictComparable$1(ot)]}return tt}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(et,tt){return function(nt){return nt==null?!1:nt[et]===tt&&(tt!==void 0||et in Object(nt))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(et){var tt=getMatchData(et);return tt.length==1&&tt[0][2]?matchesStrictComparable$1(tt[0][0],tt[0][1]):function(nt){return nt===et||baseIsMatch(nt,et,tt)}}var _baseMatches=baseMatches$1,baseGet$2=_baseGet;function get$7(et,tt,nt){var rt=et==null?void 0:baseGet$2(et,tt);return rt===void 0?nt:rt}var get_1=get$7;function baseHasIn$1(et,tt){return et!=null&&tt in Object(et)}var _baseHasIn=baseHasIn$1,baseHasIn=_baseHasIn,hasPath$1=_hasPath;function hasIn$2(et,tt){return et!=null&&hasPath$1(et,tt,baseHasIn)}var hasIn_1=hasIn$2,baseIsEqual$1=_baseIsEqual,get$6=get_1,hasIn$1=hasIn_1,isKey$1=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(et,tt){return isKey$1(et)&&isStrictComparable(tt)?matchesStrictComparable(toKey$3(et),tt):function(nt){var rt=get$6(nt,et);return rt===void 0&&rt===tt?hasIn$1(nt,et):baseIsEqual$1(tt,rt,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function baseProperty$2(et){return function(tt){return tt?.[et]}}var _baseProperty=baseProperty$2,baseGet$1=_baseGet;function basePropertyDeep$1(et){return function(tt){return baseGet$1(tt,et)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty$1=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey=_isKey,toKey$2=_toKey;function property$2(et){return isKey(et)?baseProperty$1(toKey$2(et)):basePropertyDeep(et)}var property_1=property$2,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity$c=identity_1,isArray$f=isArray_1,property$1=property_1;function baseIteratee$8(et){return typeof et=="function"?et:et==null?identity$c:typeof et=="object"?isArray$f(et)?baseMatchesProperty(et[0],et[1]):baseMatches(et):property$1(et)}var _baseIteratee=baseIteratee$8,arrayFilter=_arrayFilter,baseFilter=_baseFilter,baseIteratee$7=_baseIteratee,isArray$e=isArray_1;function filter$3(et,tt){var nt=isArray$e(et)?arrayFilter:baseFilter;return nt(et,baseIteratee$7(tt))}var filter_1=filter$3,baseKeys$1=_baseKeys,getTag$5=_getTag,isArguments$5=isArguments_1,isArray$d=isArray_1,isArrayLike$7=isArrayLike_1,isBuffer$5=isBuffer$8.exports,isPrototype$2=_isPrototype,isTypedArray$1=isTypedArray_1,mapTag$4="[object Map]",setTag$4="[object Set]",objectProto$6=Object.prototype,hasOwnProperty$8=objectProto$6.hasOwnProperty;function isEmpty$3(et){if(et==null)return!0;if(isArrayLike$7(et)&&(isArray$d(et)||typeof et=="string"||typeof et.splice=="function"||isBuffer$5(et)||isTypedArray$1(et)||isArguments$5(et)))return!et.length;var tt=getTag$5(et);if(tt==mapTag$4||tt==setTag$4)return!et.size;if(isPrototype$2(et))return!baseKeys$1(et).length;for(var nt in et)if(hasOwnProperty$8.call(et,nt))return!1;return!0}var isEmpty_1=isEmpty$3;function baseFindIndex$2(et,tt,nt,rt){for(var ot=et.length,st=nt+(rt?1:-1);rt?st--:++st<ot;)if(tt(et[st],st,et))return st;return-1}var _baseFindIndex=baseFindIndex$2;function baseIsNaN$1(et){return et!==et}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(et,tt,nt){for(var rt=nt-1,ot=et.length;++rt<ot;)if(et[rt]===tt)return rt;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex$1=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(et,tt,nt){return tt===tt?strictIndexOf(et,tt,nt):baseFindIndex$1(et,baseIsNaN,nt)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function arrayIncludes$4(et,tt){var nt=et==null?0:et.length;return!!nt&&baseIndexOf$1(et,tt,0)>-1}var _arrayIncludes=arrayIncludes$4;function arrayIncludesWith$3(et,tt,nt){for(var rt=-1,ot=et==null?0:et.length;++rt<ot;)if(nt(tt,et[rt]))return!0;return!1}var _arrayIncludesWith=arrayIncludesWith$3,SetCache$2=_SetCache,arrayIncludes$3=_arrayIncludes,arrayIncludesWith$2=_arrayIncludesWith,arrayMap$5=_arrayMap,baseUnary$3=_baseUnary,cacheHas$2=_cacheHas,nativeMin$4=Math.min;function baseIntersection$1(et,tt,nt){for(var rt=nt?arrayIncludesWith$2:arrayIncludes$3,ot=et[0].length,st=et.length,ut=st,ct=Array(st),ft=1/0,pt=[];ut--;){var ht=et[ut];ut&&tt&&(ht=arrayMap$5(ht,baseUnary$3(tt))),ft=nativeMin$4(ht.length,ft),ct[ut]=!nt&&(tt||ot>=120&&ht.length>=120)?new SetCache$2(ut&&ht):void 0}ht=et[0];var mt=-1,yt=ct[0];e:for(;++mt<ot&&pt.length<ft;){var vt=ht[mt],Tt=tt?tt(vt):vt;if(vt=nt||vt!==0?vt:0,!(yt?cacheHas$2(yt,Tt):rt(pt,Tt,nt))){for(ut=st;--ut;){var Et=ct[ut];if(!(Et?cacheHas$2(Et,Tt):rt(et[ut],Tt,nt)))continue e}yt&&yt.push(Tt),pt.push(vt)}}return pt}var _baseIntersection=baseIntersection$1,isArrayLike$6=isArrayLike_1,isObjectLike$9=isObjectLike_1;function isArrayLikeObject$5(et){return isObjectLike$9(et)&&isArrayLike$6(et)}var isArrayLikeObject_1=isArrayLikeObject$5,isArrayLikeObject$4=isArrayLikeObject_1;function castArrayLikeObject$1(et){return isArrayLikeObject$4(et)?et:[]}var _castArrayLikeObject=castArrayLikeObject$1,arrayMap$4=_arrayMap,baseIntersection=_baseIntersection,baseRest$4=_baseRest,castArrayLikeObject=_castArrayLikeObject;baseRest$4(function(et){var tt=arrayMap$4(et,castArrayLikeObject);return tt.length&&tt[0]===et[0]?baseIntersection(tt):[]});var each={exports:{}};function arrayEach$3(et,tt){for(var nt=-1,rt=et==null?0:et.length;++nt<rt&&tt(et[nt],nt,et)!==!1;);return et}var _arrayEach=arrayEach$3,identity$b=identity_1;function castFunction$1(et){return typeof et=="function"?et:identity$b}var _castFunction=castFunction$1,arrayEach$2=_arrayEach,baseEach$4=_baseEach,castFunction=_castFunction,isArray$c=isArray_1;function forEach$1(et,tt){var nt=isArray$c(et)?arrayEach$2:baseEach$4;return nt(et,castFunction(tt))}var forEach_1=forEach$1;(function(et){et.exports=forEach_1})(each);var getDefaultPropName=function et(tt){return"default".concat(tt[0].toUpperCase()+tt.slice(1))},getAutoControlledStateValue=function et(tt,nt,rt){var ot=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,st=nt[tt];if(st!==void 0)return st;if(ot){var ut=nt[getDefaultPropName(tt)];if(ut!==void 0)return ut;if(rt){var ct=rt[tt];if(ct!==void 0)return ct}}if(tt==="checked")return!1;if(tt==="value")return nt.multiple?[]:""},AutoControlledComponent=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"trySetState",function(ht,mt){var yt=Object.keys(ht).reduce(function(vt,Tt){return rt.props[Tt]!==void 0||(vt[Tt]=ht[Tt]),vt},{});Object.keys(yt).length>0&&rt.setState(yt,mt)});var ct=rt.constructor.autoControlledProps,ft=invoke_1(_assertThisInitialized$2(rt),"getInitialAutoControlledState",rt.props)||{},pt=ct.reduce(function(ht,mt){return ht[mt]=getAutoControlledStateValue(mt,rt.props,ft,!0),ht},{});return rt.state=_objectSpread$g({},ft,pt),rt}return _createClass$2(tt,[{key:"UNSAFE_componentWillReceiveProps",value:function(rt){var ot=this.constructor.autoControlledProps,st=ot.reduce(function(ut,ct){var ft=!isUndefined_1(rt[ct]);return ft&&(ut[ct]=rt[ct]),ut},{});Object.keys(st).length>0&&this.setState(st)}}]),tt}(react.exports.Component);function _arrayWithHoles$1(et){if(Array.isArray(et))return et}function _iterableToArrayLimit$1(et,tt){var nt=et==null?null:typeof Symbol<"u"&&et[Symbol.iterator]||et["@@iterator"];if(nt!=null){var rt,ot,st,ut,ct=[],ft=!0,pt=!1;try{if(st=(nt=nt.call(et)).next,tt===0){if(Object(nt)!==nt)return;ft=!1}else for(;!(ft=(rt=st.call(nt)).done)&&(ct.push(rt.value),ct.length!==tt);ft=!0);}catch(ht){pt=!0,ot=ht}finally{try{if(!ft&&nt.return!=null&&(ut=nt.return(),Object(ut)!==ut))return}finally{if(pt)throw ot}}return ct}}function _arrayLikeToArray$1(et,tt){(tt==null||tt>et.length)&&(tt=et.length);for(var nt=0,rt=new Array(tt);nt<tt;nt++)rt[nt]=et[nt];return rt}function _unsupportedIterableToArray$1(et,tt){if(!!et){if(typeof et=="string")return _arrayLikeToArray$1(et,tt);var nt=Object.prototype.toString.call(et).slice(8,-1);if(nt==="Object"&&et.constructor&&(nt=et.constructor.name),nt==="Map"||nt==="Set")return Array.from(et);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$1(et,tt)}}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _slicedToArray$1(et,tt){return _arrayWithHoles$1(et)||_iterableToArrayLimit$1(et,tt)||_unsupportedIterableToArray$1(et,tt)||_nonIterableRest$1()}const slicedToArray=Object.freeze(Object.defineProperty({__proto__:null,default:_slicedToArray$1},Symbol.toStringTag,{value:"Module"}));var defineProperty$6=_defineProperty$c;function baseAssignValue$3(et,tt,nt){tt=="__proto__"&&defineProperty$6?defineProperty$6(et,tt,{configurable:!0,enumerable:!0,value:nt,writable:!0}):et[tt]=nt}var _baseAssignValue=baseAssignValue$3,baseIteratee$6=_baseIteratee,isArrayLike$5=isArrayLike_1,keys$b=keys_1;function createFind$1(et){return function(tt,nt,rt){var ot=Object(tt);if(!isArrayLike$5(tt)){var st=baseIteratee$6(nt);tt=keys$b(tt),nt=function(ct){return st(ot[ct],ct,ot)}}var ut=et(tt,nt,rt);return ut>-1?ot[st?tt[ut]:ut]:void 0}}var _createFind=createFind$1,baseFindIndex=_baseFindIndex,baseIteratee$5=_baseIteratee,toInteger$3=toInteger_1,nativeMax$6=Math.max;function findIndex$4(et,tt,nt){var rt=et==null?0:et.length;if(!rt)return-1;var ot=nt==null?0:toInteger$3(nt);return ot<0&&(ot=nativeMax$6(rt+ot,0)),baseFindIndex(et,baseIteratee$5(tt),ot)}var findIndex_1=findIndex$4,createFind=_createFind,findIndex$3=findIndex_1,find$a=createFind(findIndex$3),find_1$2=find$a,baseEach$3=_baseEach;function baseSome$1(et,tt){var nt;return baseEach$3(et,function(rt,ot,st){return nt=tt(rt,ot,st),!nt}),!!nt}var _baseSome=baseSome$1,eq$4=eq_1$1,isArrayLike$4=isArrayLike_1,isIndex$2=_isIndex,isObject$c=isObject_1;function isIterateeCall$3(et,tt,nt){if(!isObject$c(nt))return!1;var rt=typeof tt;return(rt=="number"?isArrayLike$4(nt)&&isIndex$2(tt,nt.length):rt=="string"&&tt in nt)?eq$4(nt[tt],et):!1}var _isIterateeCall=isIterateeCall$3,arraySome=_arraySome,baseIteratee$4=_baseIteratee,baseSome=_baseSome,isArray$b=isArray_1,isIterateeCall$2=_isIterateeCall;function some$1(et,tt,nt){var rt=isArray$b(et)?arraySome:baseSome;return nt&&isIterateeCall$2(et,tt,nt)&&(tt=void 0),rt(et,baseIteratee$4(tt))}var some_1=some$1,someByType=function et(tt,nt){return some_1(react.exports.Children.toArray(tt),{type:nt})},isNil$1=function et(tt){return tt==null||Array.isArray(tt)&&tt.length===0},numberToWordMap={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function numberToWord(et){var tt=_typeof$8(et);return tt==="string"||tt==="number"?numberToWordMap[et]||et:""}var useKeyOnly=function et(tt,nt){return tt&&nt},useValueAndKey=function et(tt,nt){return tt&&tt!==!0&&"".concat(tt," ").concat(nt)},useKeyOrValueAndKey=function et(tt,nt){return tt&&(tt===!0?nt:"".concat(tt," ").concat(nt))},useMultipleProp=function et(tt,nt){return!tt||tt===!0?null:tt.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(rt){return"".concat(rt.replace("-"," ")," ").concat(nt)}).join(" ")},useTextAlignProp=function et(tt){return tt==="justified"?"justified":useValueAndKey(tt,"aligned")},useVerticalAlignProp=function et(tt){return useValueAndKey(tt,"aligned")},useWidthProp=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(rt&&tt==="equal")return"equal width";var ot=_typeof$8(tt);return(ot==="string"||ot==="number")&&nt?"".concat(numberToWord(tt)," ").concat(nt):numberToWord(tt)};function _arrayWithoutHoles$1(et){if(Array.isArray(et))return _arrayLikeToArray$1(et)}function _iterableToArray$1(et){if(typeof Symbol<"u"&&et[Symbol.iterator]!=null||et["@@iterator"]!=null)return Array.from(et)}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray$1(et){return _arrayWithoutHoles$1(et)||_iterableToArray$1(et)||_unsupportedIterableToArray$1(et)||_nonIterableSpread$1()}const toConsumableArray=Object.freeze(Object.defineProperty({__proto__:null,default:_toConsumableArray$1},Symbol.toStringTag,{value:"Module"}));var _mapping={};(function(et){et.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},et.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},et.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},et.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},et.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},et.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},et.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},et.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},et.realToAlias=function(){var tt=Object.prototype.hasOwnProperty,nt=et.aliasToReal,rt={};for(var ot in nt){var st=nt[ot];tt.call(rt,st)?rt[st].push(ot):rt[st]=[ot]}return rt}(),et.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},et.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},et.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}})(_mapping);var placeholder,hasRequiredPlaceholder;function requirePlaceholder(){return hasRequiredPlaceholder||(hasRequiredPlaceholder=1,placeholder={}),placeholder}var mapping=_mapping,fallbackHolder=requirePlaceholder(),push$1=Array.prototype.push;function baseArity(et,tt){return tt==2?function(nt,rt){return et.apply(void 0,arguments)}:function(nt){return et.apply(void 0,arguments)}}function baseAry(et,tt){return tt==2?function(nt,rt){return et(nt,rt)}:function(nt){return et(nt)}}function cloneArray$1(et){for(var tt=et?et.length:0,nt=Array(tt);tt--;)nt[tt]=et[tt];return nt}function createCloner(et){return function(tt){return et({},tt)}}function flatSpread(et,tt){return function(){for(var nt=arguments.length,rt=nt-1,ot=Array(nt);nt--;)ot[nt]=arguments[nt];var st=ot[tt],ut=ot.slice(0,tt);return st&&push$1.apply(ut,st),tt!=rt&&push$1.apply(ut,ot.slice(tt+1)),et.apply(this,ut)}}function wrapImmutable(et,tt){return function(){var nt=arguments.length;if(!!nt){for(var rt=Array(nt);nt--;)rt[nt]=arguments[nt];var ot=rt[0]=tt.apply(void 0,rt);return et.apply(void 0,rt),ot}}}function baseConvert$1(et,tt,nt,rt){var ot=typeof tt=="function",st=tt===Object(tt);if(st&&(rt=nt,nt=tt,tt=void 0),nt==null)throw new TypeError;rt||(rt={});var ut={cap:"cap"in rt?rt.cap:!0,curry:"curry"in rt?rt.curry:!0,fixed:"fixed"in rt?rt.fixed:!0,immutable:"immutable"in rt?rt.immutable:!0,rearg:"rearg"in rt?rt.rearg:!0},ct=ot?nt:fallbackHolder,ft="curry"in rt&&rt.curry,pt="fixed"in rt&&rt.fixed,ht="rearg"in rt&&rt.rearg,mt=ot?nt.runInContext():void 0,yt=ot?nt:{ary:et.ary,assign:et.assign,clone:et.clone,curry:et.curry,forEach:et.forEach,isArray:et.isArray,isError:et.isError,isFunction:et.isFunction,isWeakMap:et.isWeakMap,iteratee:et.iteratee,keys:et.keys,rearg:et.rearg,toInteger:et.toInteger,toPath:et.toPath},vt=yt.ary,Tt=yt.assign,Et=yt.clone,xt=yt.curry,At=yt.forEach,Ct=yt.isArray,$t=yt.isError,Ot=yt.isFunction,Rt=yt.isWeakMap,It=yt.keys,kt=yt.rearg,Mt=yt.toInteger,Ft=yt.toPath,zt=It(mapping.aryMethod),Vt={castArray:function(Dn){return function(){var $n=arguments[0];return Ct($n)?Dn(cloneArray$1($n)):Dn.apply(void 0,arguments)}},iteratee:function(Dn){return function(){var $n=arguments[0],Gn=arguments[1],Jn=Dn($n,Gn),zn=Jn.length;return ut.cap&&typeof Gn=="number"?(Gn=Gn>2?Gn-2:1,zn&&zn<=Gn?Jn:baseAry(Jn,Gn)):Jn}},mixin:function(Dn){return function($n){var Gn=this;if(!Ot(Gn))return Dn(Gn,Object($n));var Jn=[];return At(It($n),function(zn){Ot($n[zn])&&Jn.push([zn,Gn.prototype[zn]])}),Dn(Gn,Object($n)),At(Jn,function(zn){var Qn=zn[1];Ot(Qn)?Gn.prototype[zn[0]]=Qn:delete Gn.prototype[zn[0]]}),Gn}},nthArg:function(Dn){return function($n){var Gn=$n<0?1:Mt($n)+1;return xt(Dn($n),Gn)}},rearg:function(Dn){return function($n,Gn){var Jn=Gn?Gn.length:0;return xt(Dn($n,Gn),Jn)}},runInContext:function(Dn){return function($n){return baseConvert$1(et,Dn($n),rt)}}};function Zt(Dn,$n){if(ut.cap){var Gn=mapping.iterateeRearg[Dn];if(Gn)return In($n,Gn);var Jn=!ot&&mapping.iterateeAry[Dn];if(Jn)return Sn($n,Jn)}return $n}function Ut(Dn,$n,Gn){return ft||ut.curry&&Gn>1?xt($n,Gn):$n}function Xt(Dn,$n,Gn){if(ut.fixed&&(pt||!mapping.skipFixed[Dn])){var Jn=mapping.methodSpread[Dn],zn=Jn&&Jn.start;return zn===void 0?vt($n,Gn):flatSpread($n,zn)}return $n}function Jt(Dn,$n,Gn){return ut.rearg&&Gn>1&&(ht||!mapping.skipRearg[Dn])?kt($n,mapping.methodRearg[Dn]||mapping.aryRearg[Gn]):$n}function gn(Dn,$n){$n=Ft($n);for(var Gn=-1,Jn=$n.length,zn=Jn-1,Qn=Et(Object(Dn)),Bn=Qn;Bn!=null&&++Gn<Jn;){var jn=$n[Gn],Ar=Bn[jn];Ar!=null&&!(Ot(Ar)||$t(Ar)||Rt(Ar))&&(Bn[jn]=Et(Gn==zn?Ar:Object(Ar))),Bn=Bn[jn]}return Qn}function An(Dn){return Ln.runInContext.convert(Dn)(void 0)}function sn(Dn,$n){var Gn=mapping.aliasToReal[Dn]||Dn,Jn=mapping.remap[Gn]||Gn,zn=rt;return function(Qn){var Bn=ot?mt:yt,jn=ot?mt[Jn]:$n,Ar=Tt(Tt({},zn),Qn);return baseConvert$1(Bn,Gn,jn,Ar)}}function Sn(Dn,$n){return _n(Dn,function(Gn){return typeof Gn=="function"?baseAry(Gn,$n):Gn})}function In(Dn,$n){return _n(Dn,function(Gn){var Jn=$n.length;return baseArity(kt(baseAry(Gn,Jn),$n),Jn)})}function _n(Dn,$n){return function(){var Gn=arguments.length;if(!Gn)return Dn();for(var Jn=Array(Gn);Gn--;)Jn[Gn]=arguments[Gn];var zn=ut.rearg?0:Gn-1;return Jn[zn]=$n(Jn[zn]),Dn.apply(void 0,Jn)}}function En(Dn,$n,Gn){var Jn,zn=mapping.aliasToReal[Dn]||Dn,Qn=$n,Bn=Vt[zn];return Bn?Qn=Bn($n):ut.immutable&&(mapping.mutate.array[zn]?Qn=wrapImmutable($n,cloneArray$1):mapping.mutate.object[zn]?Qn=wrapImmutable($n,createCloner($n)):mapping.mutate.set[zn]&&(Qn=wrapImmutable($n,gn))),At(zt,function(jn){return At(mapping.aryMethod[jn],function(Ar){if(zn==Ar){var Er=mapping.methodSpread[zn],Pr=Er&&Er.afterRearg;return Jn=Pr?Xt(zn,Jt(zn,Qn,jn),jn):Jt(zn,Xt(zn,Qn,jn),jn),Jn=Zt(zn,Jn),Jn=Ut(zn,Jn,jn),!1}}),!Jn}),Jn||(Jn=Qn),Jn==$n&&(Jn=ft?xt(Jn,1):function(){return $n.apply(this,arguments)}),Jn.convert=sn(zn,$n),Jn.placeholder=$n.placeholder=Gn,Jn}if(!st)return En(tt,nt,ct);var Ln=nt,wn=[];return At(zt,function(Dn){At(mapping.aryMethod[Dn],function($n){var Gn=Ln[mapping.remap[$n]||$n];Gn&&wn.push([$n,En($n,Gn,Ln)])})}),At(It(Ln),function(Dn){var $n=Ln[Dn];if(typeof $n=="function"){for(var Gn=wn.length;Gn--;)if(wn[Gn][0]==Dn)return;$n.convert=sn(Dn,$n),wn.push([Dn,$n])}}),At(wn,function(Dn){Ln[Dn[0]]=Dn[1]}),Ln.convert=An,Ln.placeholder=Ln,At(It(Ln),function(Dn){At(mapping.realToAlias[Dn]||[],function($n){Ln[$n]=Ln[Dn]})}),Ln}var _baseConvert=baseConvert$1,WeakMap$1=_WeakMap,metaMap$2=WeakMap$1&&new WeakMap$1,_metaMap=metaMap$2,identity$a=identity_1,metaMap$1=_metaMap,baseSetData$2=metaMap$1?function(et,tt){return metaMap$1.set(et,tt),et}:identity$a,_baseSetData=baseSetData$2,isObject$b=isObject_1,objectCreate=Object.create,baseCreate$3=function(){function et(){}return function(tt){if(!isObject$b(tt))return{};if(objectCreate)return objectCreate(tt);et.prototype=tt;var nt=new et;return et.prototype=void 0,nt}}(),_baseCreate=baseCreate$3,baseCreate$2=_baseCreate,isObject$a=isObject_1;function createCtor$4(et){return function(){var tt=arguments;switch(tt.length){case 0:return new et;case 1:return new et(tt[0]);case 2:return new et(tt[0],tt[1]);case 3:return new et(tt[0],tt[1],tt[2]);case 4:return new et(tt[0],tt[1],tt[2],tt[3]);case 5:return new et(tt[0],tt[1],tt[2],tt[3],tt[4]);case 6:return new et(tt[0],tt[1],tt[2],tt[3],tt[4],tt[5]);case 7:return new et(tt[0],tt[1],tt[2],tt[3],tt[4],tt[5],tt[6])}var nt=baseCreate$2(et.prototype),rt=et.apply(nt,tt);return isObject$a(rt)?rt:nt}}var _createCtor=createCtor$4,createCtor$3=_createCtor,root$8=_root,WRAP_BIND_FLAG$6=1;function createBind$1(et,tt,nt){var rt=tt&WRAP_BIND_FLAG$6,ot=createCtor$3(et);function st(){var ut=this&&this!==root$8&&this instanceof st?ot:et;return ut.apply(rt?nt:this,arguments)}return st}var _createBind=createBind$1,nativeMax$5=Math.max;function composeArgs$2(et,tt,nt,rt){for(var ot=-1,st=et.length,ut=nt.length,ct=-1,ft=tt.length,pt=nativeMax$5(st-ut,0),ht=Array(ft+pt),mt=!rt;++ct<ft;)ht[ct]=tt[ct];for(;++ot<ut;)(mt||ot<st)&&(ht[nt[ot]]=et[ot]);for(;pt--;)ht[ct++]=et[ot++];return ht}var _composeArgs=composeArgs$2,nativeMax$4=Math.max;function composeArgsRight$2(et,tt,nt,rt){for(var ot=-1,st=et.length,ut=-1,ct=nt.length,ft=-1,pt=tt.length,ht=nativeMax$4(st-ct,0),mt=Array(ht+pt),yt=!rt;++ot<ht;)mt[ot]=et[ot];for(var vt=ot;++ft<pt;)mt[vt+ft]=tt[ft];for(;++ut<ct;)(yt||ot<st)&&(mt[vt+nt[ut]]=et[ot++]);return mt}var _composeArgsRight=composeArgsRight$2;function countHolders$1(et,tt){for(var nt=et.length,rt=0;nt--;)et[nt]===tt&&++rt;return rt}var _countHolders=countHolders$1,_baseLodash,hasRequired_baseLodash;function require_baseLodash(){if(hasRequired_baseLodash)return _baseLodash;hasRequired_baseLodash=1;function et(){}return _baseLodash=et,_baseLodash}var baseCreate$1=_baseCreate,baseLodash$1=require_baseLodash(),MAX_ARRAY_LENGTH=4294967295;function LazyWrapper$3(et){this.__wrapped__=et,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=MAX_ARRAY_LENGTH,this.__views__=[]}LazyWrapper$3.prototype=baseCreate$1(baseLodash$1.prototype);LazyWrapper$3.prototype.constructor=LazyWrapper$3;var _LazyWrapper=LazyWrapper$3;function noop$g(){}var noop_1=noop$g,metaMap=_metaMap,noop$f=noop_1,getData$2=metaMap?function(et){return metaMap.get(et)}:noop$f,_getData=getData$2,_realNames,hasRequired_realNames;function require_realNames(){if(hasRequired_realNames)return _realNames;hasRequired_realNames=1;var et={};return _realNames=et,_realNames}var _getFuncName,hasRequired_getFuncName;function require_getFuncName(){if(hasRequired_getFuncName)return _getFuncName;hasRequired_getFuncName=1;var et=require_realNames(),tt=Object.prototype,nt=tt.hasOwnProperty;function rt(ot){for(var st=ot.name+"",ut=et[st],ct=nt.call(et,st)?ut.length:0;ct--;){var ft=ut[ct],pt=ft.func;if(pt==null||pt==ot)return ft.name}return st}return _getFuncName=rt,_getFuncName}var _LodashWrapper,hasRequired_LodashWrapper;function require_LodashWrapper(){if(hasRequired_LodashWrapper)return _LodashWrapper;hasRequired_LodashWrapper=1;var et=_baseCreate,tt=require_baseLodash();function nt(rt,ot){this.__wrapped__=rt,this.__actions__=[],this.__chain__=!!ot,this.__index__=0,this.__values__=void 0}return nt.prototype=et(tt.prototype),nt.prototype.constructor=nt,_LodashWrapper=nt,_LodashWrapper}function copyArray$5(et,tt){var nt=-1,rt=et.length;for(tt||(tt=Array(rt));++nt<rt;)tt[nt]=et[nt];return tt}var _copyArray=copyArray$5,LazyWrapper$2=_LazyWrapper,LodashWrapper$1=require_LodashWrapper(),copyArray$4=_copyArray;function wrapperClone$1(et){if(et instanceof LazyWrapper$2)return et.clone();var tt=new LodashWrapper$1(et.__wrapped__,et.__chain__);return tt.__actions__=copyArray$4(et.__actions__),tt.__index__=et.__index__,tt.__values__=et.__values__,tt}var _wrapperClone=wrapperClone$1,LazyWrapper$1=_LazyWrapper,LodashWrapper=require_LodashWrapper(),baseLodash=require_baseLodash(),isArray$a=isArray_1,isObjectLike$8=isObjectLike_1,wrapperClone=_wrapperClone,objectProto$5=Object.prototype,hasOwnProperty$7=objectProto$5.hasOwnProperty;function lodash$1(et){if(isObjectLike$8(et)&&!isArray$a(et)&&!(et instanceof LazyWrapper$1)){if(et instanceof LodashWrapper)return et;if(hasOwnProperty$7.call(et,"__wrapped__"))return wrapperClone(et)}return new LodashWrapper(et)}lodash$1.prototype=baseLodash.prototype;lodash$1.prototype.constructor=lodash$1;var wrapperLodash=lodash$1,LazyWrapper=_LazyWrapper,getData$1=_getData,getFuncName=require_getFuncName(),lodash=wrapperLodash;function isLaziable$1(et){var tt=getFuncName(et),nt=lodash[tt];if(typeof nt!="function"||!(tt in LazyWrapper.prototype))return!1;if(et===nt)return!0;var rt=getData$1(nt);return!!rt&&et===rt[0]}var _isLaziable=isLaziable$1,baseSetData$1=_baseSetData,shortOut=_shortOut,setData$2=shortOut(baseSetData$1),_setData=setData$2,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;function getWrapDetails$1(et){var tt=et.match(reWrapDetails);return tt?tt[1].split(reSplitDetails):[]}var _getWrapDetails=getWrapDetails$1,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails$1(et,tt){var nt=tt.length;if(!nt)return et;var rt=nt-1;return tt[rt]=(nt>1?"& ":"")+tt[rt],tt=tt.join(nt>2?", ":" "),et.replace(reWrapComment,`{
/* [wrapped with `+tt+`] */
`)}var _insertWrapDetails=insertWrapDetails$1,arrayEach$1=_arrayEach,arrayIncludes$2=_arrayIncludes,WRAP_BIND_FLAG$5=1,WRAP_BIND_KEY_FLAG$4=2,WRAP_CURRY_FLAG$5=8,WRAP_CURRY_RIGHT_FLAG$2=16,WRAP_PARTIAL_FLAG$2=32,WRAP_PARTIAL_RIGHT_FLAG$2=64,WRAP_ARY_FLAG$3=128,WRAP_REARG_FLAG$2=256,WRAP_FLIP_FLAG$1=512,wrapFlags=[["ary",WRAP_ARY_FLAG$3],["bind",WRAP_BIND_FLAG$5],["bindKey",WRAP_BIND_KEY_FLAG$4],["curry",WRAP_CURRY_FLAG$5],["curryRight",WRAP_CURRY_RIGHT_FLAG$2],["flip",WRAP_FLIP_FLAG$1],["partial",WRAP_PARTIAL_FLAG$2],["partialRight",WRAP_PARTIAL_RIGHT_FLAG$2],["rearg",WRAP_REARG_FLAG$2]];function updateWrapDetails$1(et,tt){return arrayEach$1(wrapFlags,function(nt){var rt="_."+nt[0];tt&nt[1]&&!arrayIncludes$2(et,rt)&&et.push(rt)}),et.sort()}var _updateWrapDetails=updateWrapDetails$1,getWrapDetails=_getWrapDetails,insertWrapDetails=_insertWrapDetails,setToString$1=_setToString,updateWrapDetails=_updateWrapDetails;function setWrapToString$2(et,tt,nt){var rt=tt+"";return setToString$1(et,insertWrapDetails(rt,updateWrapDetails(getWrapDetails(rt),nt)))}var _setWrapToString=setWrapToString$2,isLaziable=_isLaziable,setData$1=_setData,setWrapToString$1=_setWrapToString,WRAP_BIND_FLAG$4=1,WRAP_BIND_KEY_FLAG$3=2,WRAP_CURRY_BOUND_FLAG$1=4,WRAP_CURRY_FLAG$4=8,WRAP_PARTIAL_FLAG$1=32,WRAP_PARTIAL_RIGHT_FLAG$1=64;function createRecurry$2(et,tt,nt,rt,ot,st,ut,ct,ft,pt){var ht=tt&WRAP_CURRY_FLAG$4,mt=ht?ut:void 0,yt=ht?void 0:ut,vt=ht?st:void 0,Tt=ht?void 0:st;tt|=ht?WRAP_PARTIAL_FLAG$1:WRAP_PARTIAL_RIGHT_FLAG$1,tt&=~(ht?WRAP_PARTIAL_RIGHT_FLAG$1:WRAP_PARTIAL_FLAG$1),tt&WRAP_CURRY_BOUND_FLAG$1||(tt&=~(WRAP_BIND_FLAG$4|WRAP_BIND_KEY_FLAG$3));var Et=[et,tt,ot,vt,mt,Tt,yt,ct,ft,pt],xt=nt.apply(void 0,Et);return isLaziable(et)&&setData$1(xt,Et),xt.placeholder=rt,setWrapToString$1(xt,et,tt)}var _createRecurry=createRecurry$2;function getHolder$2(et){var tt=et;return tt.placeholder}var _getHolder=getHolder$2,copyArray$3=_copyArray,isIndex$1=_isIndex,nativeMin$3=Math.min;function reorder$1(et,tt){for(var nt=et.length,rt=nativeMin$3(tt.length,nt),ot=copyArray$3(et);rt--;){var st=tt[rt];et[rt]=isIndex$1(st,nt)?ot[st]:void 0}return et}var _reorder=reorder$1,PLACEHOLDER$1="__lodash_placeholder__";function replaceHolders$3(et,tt){for(var nt=-1,rt=et.length,ot=0,st=[];++nt<rt;){var ut=et[nt];(ut===tt||ut===PLACEHOLDER$1)&&(et[nt]=PLACEHOLDER$1,st[ot++]=nt)}return st}var _replaceHolders=replaceHolders$3,composeArgs$1=_composeArgs,composeArgsRight$1=_composeArgsRight,countHolders=_countHolders,createCtor$2=_createCtor,createRecurry$1=_createRecurry,getHolder$1=_getHolder,reorder=_reorder,replaceHolders$2=_replaceHolders,root$7=_root,WRAP_BIND_FLAG$3=1,WRAP_BIND_KEY_FLAG$2=2,WRAP_CURRY_FLAG$3=8,WRAP_CURRY_RIGHT_FLAG$1=16,WRAP_ARY_FLAG$2=128,WRAP_FLIP_FLAG=512;function createHybrid$2(et,tt,nt,rt,ot,st,ut,ct,ft,pt){var ht=tt&WRAP_ARY_FLAG$2,mt=tt&WRAP_BIND_FLAG$3,yt=tt&WRAP_BIND_KEY_FLAG$2,vt=tt&(WRAP_CURRY_FLAG$3|WRAP_CURRY_RIGHT_FLAG$1),Tt=tt&WRAP_FLIP_FLAG,Et=yt?void 0:createCtor$2(et);function xt(){for(var At=arguments.length,Ct=Array(At),$t=At;$t--;)Ct[$t]=arguments[$t];if(vt)var Ot=getHolder$1(xt),Rt=countHolders(Ct,Ot);if(rt&&(Ct=composeArgs$1(Ct,rt,ot,vt)),st&&(Ct=composeArgsRight$1(Ct,st,ut,vt)),At-=Rt,vt&&At<pt){var It=replaceHolders$2(Ct,Ot);return createRecurry$1(et,tt,createHybrid$2,xt.placeholder,nt,Ct,It,ct,ft,pt-At)}var kt=mt?nt:this,Mt=yt?kt[et]:et;return At=Ct.length,ct?Ct=reorder(Ct,ct):Tt&&At>1&&Ct.reverse(),ht&&ft<At&&(Ct.length=ft),this&&this!==root$7&&this instanceof xt&&(Mt=Et||createCtor$2(Mt)),Mt.apply(kt,Ct)}return xt}var _createHybrid=createHybrid$2,apply$4=_apply,createCtor$1=_createCtor,createHybrid$1=_createHybrid,createRecurry=_createRecurry,getHolder=_getHolder,replaceHolders$1=_replaceHolders,root$6=_root;function createCurry$1(et,tt,nt){var rt=createCtor$1(et);function ot(){for(var st=arguments.length,ut=Array(st),ct=st,ft=getHolder(ot);ct--;)ut[ct]=arguments[ct];var pt=st<3&&ut[0]!==ft&&ut[st-1]!==ft?[]:replaceHolders$1(ut,ft);if(st-=pt.length,st<nt)return createRecurry(et,tt,createHybrid$1,ot.placeholder,void 0,ut,pt,void 0,void 0,nt-st);var ht=this&&this!==root$6&&this instanceof ot?rt:et;return apply$4(ht,this,ut)}return ot}var _createCurry=createCurry$1,apply$3=_apply,createCtor=_createCtor,root$5=_root,WRAP_BIND_FLAG$2=1;function createPartial$1(et,tt,nt,rt){var ot=tt&WRAP_BIND_FLAG$2,st=createCtor(et);function ut(){for(var ct=-1,ft=arguments.length,pt=-1,ht=rt.length,mt=Array(ht+ft),yt=this&&this!==root$5&&this instanceof ut?st:et;++pt<ht;)mt[pt]=rt[pt];for(;ft--;)mt[pt++]=arguments[++ct];return apply$3(yt,ot?nt:this,mt)}return ut}var _createPartial=createPartial$1,composeArgs=_composeArgs,composeArgsRight=_composeArgsRight,replaceHolders=_replaceHolders,PLACEHOLDER="__lodash_placeholder__",WRAP_BIND_FLAG$1=1,WRAP_BIND_KEY_FLAG$1=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG$2=8,WRAP_ARY_FLAG$1=128,WRAP_REARG_FLAG$1=256,nativeMin$2=Math.min;function mergeData$1(et,tt){var nt=et[1],rt=tt[1],ot=nt|rt,st=ot<(WRAP_BIND_FLAG$1|WRAP_BIND_KEY_FLAG$1|WRAP_ARY_FLAG$1),ut=rt==WRAP_ARY_FLAG$1&&nt==WRAP_CURRY_FLAG$2||rt==WRAP_ARY_FLAG$1&&nt==WRAP_REARG_FLAG$1&&et[7].length<=tt[8]||rt==(WRAP_ARY_FLAG$1|WRAP_REARG_FLAG$1)&&tt[7].length<=tt[8]&&nt==WRAP_CURRY_FLAG$2;if(!(st||ut))return et;rt&WRAP_BIND_FLAG$1&&(et[2]=tt[2],ot|=nt&WRAP_BIND_FLAG$1?0:WRAP_CURRY_BOUND_FLAG);var ct=tt[3];if(ct){var ft=et[3];et[3]=ft?composeArgs(ft,ct,tt[4]):ct,et[4]=ft?replaceHolders(et[3],PLACEHOLDER):tt[4]}return ct=tt[5],ct&&(ft=et[5],et[5]=ft?composeArgsRight(ft,ct,tt[6]):ct,et[6]=ft?replaceHolders(et[5],PLACEHOLDER):tt[6]),ct=tt[7],ct&&(et[7]=ct),rt&WRAP_ARY_FLAG$1&&(et[8]=et[8]==null?tt[8]:nativeMin$2(et[8],tt[8])),et[9]==null&&(et[9]=tt[9]),et[0]=tt[0],et[1]=ot,et}var _mergeData=mergeData$1,baseSetData=_baseSetData,createBind=_createBind,createCurry=_createCurry,createHybrid=_createHybrid,createPartial=_createPartial,getData=_getData,mergeData=_mergeData,setData=_setData,setWrapToString=_setWrapToString,toInteger$2=toInteger_1,FUNC_ERROR_TEXT$2="Expected a function",WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_FLAG$1=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,nativeMax$3=Math.max;function createWrap$3(et,tt,nt,rt,ot,st,ut,ct){var ft=tt&WRAP_BIND_KEY_FLAG;if(!ft&&typeof et!="function")throw new TypeError(FUNC_ERROR_TEXT$2);var pt=rt?rt.length:0;if(pt||(tt&=~(WRAP_PARTIAL_FLAG|WRAP_PARTIAL_RIGHT_FLAG),rt=ot=void 0),ut=ut===void 0?ut:nativeMax$3(toInteger$2(ut),0),ct=ct===void 0?ct:toInteger$2(ct),pt-=ot?ot.length:0,tt&WRAP_PARTIAL_RIGHT_FLAG){var ht=rt,mt=ot;rt=ot=void 0}var yt=ft?void 0:getData(et),vt=[et,tt,nt,rt,ot,ht,mt,st,ut,ct];if(yt&&mergeData(vt,yt),et=vt[0],tt=vt[1],nt=vt[2],rt=vt[3],ot=vt[4],ct=vt[9]=vt[9]===void 0?ft?0:et.length:nativeMax$3(vt[9]-pt,0),!ct&&tt&(WRAP_CURRY_FLAG$1|WRAP_CURRY_RIGHT_FLAG)&&(tt&=~(WRAP_CURRY_FLAG$1|WRAP_CURRY_RIGHT_FLAG)),!tt||tt==WRAP_BIND_FLAG)var Tt=createBind(et,tt,nt);else tt==WRAP_CURRY_FLAG$1||tt==WRAP_CURRY_RIGHT_FLAG?Tt=createCurry(et,tt,ct):(tt==WRAP_PARTIAL_FLAG||tt==(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG))&&!ot.length?Tt=createPartial(et,tt,nt,rt):Tt=createHybrid.apply(void 0,vt);var Et=yt?baseSetData:setData;return setWrapToString(Et(Tt,vt),et,tt)}var _createWrap=createWrap$3,createWrap$2=_createWrap,WRAP_ARY_FLAG=128;function ary(et,tt,nt){return tt=nt?void 0:tt,tt=et&&tt==null?et.length:tt,createWrap$2(et,WRAP_ARY_FLAG,void 0,void 0,void 0,void 0,tt)}var ary_1=ary,baseAssignValue$2=_baseAssignValue,eq$3=eq_1$1,objectProto$4=Object.prototype,hasOwnProperty$6=objectProto$4.hasOwnProperty;function assignValue$3(et,tt,nt){var rt=et[tt];(!(hasOwnProperty$6.call(et,tt)&&eq$3(rt,nt))||nt===void 0&&!(tt in et))&&baseAssignValue$2(et,tt,nt)}var _assignValue=assignValue$3,assignValue$2=_assignValue,baseAssignValue$1=_baseAssignValue;function copyObject$5(et,tt,nt,rt){var ot=!nt;nt||(nt={});for(var st=-1,ut=tt.length;++st<ut;){var ct=tt[st],ft=rt?rt(nt[ct],et[ct],ct,nt,et):void 0;ft===void 0&&(ft=et[ct]),ot?baseAssignValue$1(nt,ct,ft):assignValue$2(nt,ct,ft)}return nt}var _copyObject=copyObject$5,copyObject$4=_copyObject,keys$a=keys_1;function baseAssign$1(et,tt){return et&&copyObject$4(tt,keys$a(tt),et)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(et){var tt=[];if(et!=null)for(var nt in Object(et))tt.push(nt);return tt}var _nativeKeysIn=nativeKeysIn$1,isObject$9=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$3=Object.prototype,hasOwnProperty$5=objectProto$3.hasOwnProperty;function baseKeysIn$1(et){if(!isObject$9(et))return nativeKeysIn(et);var tt=isPrototype$1(et),nt=[];for(var rt in et)rt=="constructor"&&(tt||!hasOwnProperty$5.call(et,rt))||nt.push(rt);return nt}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$3=isArrayLike_1;function keysIn$6(et){return isArrayLike$3(et)?arrayLikeKeys(et,!0):baseKeysIn(et)}var keysIn_1=keysIn$6,copyObject$3=_copyObject,keysIn$5=keysIn_1;function baseAssignIn$1(et,tt){return et&&copyObject$3(tt,keysIn$5(tt),et)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};(function(et,tt){var nt=_root,rt=tt&&!tt.nodeType&&tt,ot=rt&&!0&&et&&!et.nodeType&&et,st=ot&&ot.exports===rt,ut=st?nt.Buffer:void 0,ct=ut?ut.allocUnsafe:void 0;function ft(pt,ht){if(ht)return pt.slice();var mt=pt.length,yt=ct?ct(mt):new pt.constructor(mt);return pt.copy(yt),yt}et.exports=ft})(_cloneBuffer,_cloneBuffer.exports);var copyObject$2=_copyObject,getSymbols$1=_getSymbols;function copySymbols$1(et,tt){return copyObject$2(et,getSymbols$1(et),tt)}var _copySymbols=copySymbols$1,overArg=_overArg,getPrototype$3=overArg(Object.getPrototypeOf,Object),_getPrototype=getPrototype$3,arrayPush$1=_arrayPush,getPrototype$2=_getPrototype,getSymbols=_getSymbols,stubArray=stubArray_1,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols?function(et){for(var tt=[];et;)arrayPush$1(tt,getSymbols(et)),et=getPrototype$2(et);return tt}:stubArray,_getSymbolsIn=getSymbolsIn$2,copyObject$1=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(et,tt){return copyObject$1(et,getSymbolsIn$1(et),tt)}var _copySymbolsIn=copySymbolsIn$1,baseGetAllKeys=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$4=keysIn_1;function getAllKeysIn$1(et){return baseGetAllKeys(et,keysIn$4,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$1,objectProto$2=Object.prototype,hasOwnProperty$4=objectProto$2.hasOwnProperty;function initCloneArray$1(et){var tt=et.length,nt=new et.constructor(tt);return tt&&typeof et[0]=="string"&&hasOwnProperty$4.call(et,"index")&&(nt.index=et.index,nt.input=et.input),nt}var _initCloneArray=initCloneArray$1,Uint8Array$1=_Uint8Array;function cloneArrayBuffer$3(et){var tt=new et.constructor(et.byteLength);return new Uint8Array$1(tt).set(new Uint8Array$1(et)),tt}var _cloneArrayBuffer=cloneArrayBuffer$3,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneDataView$1(et,tt){var nt=tt?cloneArrayBuffer$2(et.buffer):et.buffer;return new et.constructor(nt,et.byteOffset,et.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(et){var tt=new et.constructor(et.source,reFlags.exec(et));return tt.lastIndex=et.lastIndex,tt}var _cloneRegExp=cloneRegExp$1,Symbol$3=_Symbol,symbolProto=Symbol$3?Symbol$3.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function cloneSymbol$1(et){return symbolValueOf?Object(symbolValueOf.call(et)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$1=_cloneArrayBuffer;function cloneTypedArray$2(et,tt){var nt=tt?cloneArrayBuffer$1(et.buffer):et.buffer;return new et.constructor(nt,et.byteOffset,et.length)}var _cloneTypedArray=cloneTypedArray$2,cloneArrayBuffer=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray$1=_cloneTypedArray,boolTag$2="[object Boolean]",dateTag$1="[object Date]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$1="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$1="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag$1(et,tt,nt){var rt=et.constructor;switch(tt){case arrayBufferTag$1:return cloneArrayBuffer(et);case boolTag$2:case dateTag$1:return new rt(+et);case dataViewTag$1:return cloneDataView(et,nt);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray$1(et,nt);case mapTag$3:return new rt;case numberTag$2:case stringTag$2:return new rt(et);case regexpTag$1:return cloneRegExp(et);case setTag$3:return new rt;case symbolTag$1:return cloneSymbol(et)}}var _initCloneByTag=initCloneByTag$1,baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype=_isPrototype;function initCloneObject$2(et){return typeof et.constructor=="function"&&!isPrototype(et)?baseCreate(getPrototype$1(et)):{}}var _initCloneObject=initCloneObject$2,getTag$4=_getTag,isObjectLike$7=isObjectLike_1,mapTag$2="[object Map]";function baseIsMap$1(et){return isObjectLike$7(et)&&getTag$4(et)==mapTag$2}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$2=_baseUnary,nodeUtil$1=_nodeUtil.exports,nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap$1=nodeIsMap?baseUnary$2(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$3=_getTag,isObjectLike$6=isObjectLike_1,setTag$2="[object Set]";function baseIsSet$1(et){return isObjectLike$6(et)&&getTag$3(et)==setTag$2}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary$1=_baseUnary,nodeUtil=_nodeUtil.exports,nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet$1=nodeIsSet?baseUnary$1(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack$2=_Stack,arrayEach=_arrayEach,assignValue$1=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer$1=_cloneBuffer.exports,copyArray$2=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys=_getAllKeys,getAllKeysIn=_getAllKeysIn,getTag$2=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject$1=_initCloneObject,isArray$9=isArray_1,isBuffer$4=isBuffer$8.exports,isMap=isMap_1,isObject$8=isObject_1,isSet=isSet_1,keys$9=keys_1,keysIn$3=keysIn_1,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG$1=4,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag$1="[object Boolean]",dateTag="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$1="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag$1]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$1]=cloneableTags[numberTag$1]=cloneableTags[objectTag$1]=cloneableTags[regexpTag]=cloneableTags[setTag$1]=cloneableTags[stringTag$1]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0;cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag$1]=!1;function baseClone$2(et,tt,nt,rt,ot,st){var ut,ct=tt&CLONE_DEEP_FLAG$1,ft=tt&CLONE_FLAT_FLAG,pt=tt&CLONE_SYMBOLS_FLAG$1;if(nt&&(ut=ot?nt(et,rt,ot,st):nt(et)),ut!==void 0)return ut;if(!isObject$8(et))return et;var ht=isArray$9(et);if(ht){if(ut=initCloneArray(et),!ct)return copyArray$2(et,ut)}else{var mt=getTag$2(et),yt=mt==funcTag||mt==genTag;if(isBuffer$4(et))return cloneBuffer$1(et,ct);if(mt==objectTag$1||mt==argsTag||yt&&!ot){if(ut=ft||yt?{}:initCloneObject$1(et),!ct)return ft?copySymbolsIn(et,baseAssignIn(ut,et)):copySymbols(et,baseAssign(ut,et))}else{if(!cloneableTags[mt])return ot?et:{};ut=initCloneByTag(et,mt,ct)}}st||(st=new Stack$2);var vt=st.get(et);if(vt)return vt;st.set(et,ut),isSet(et)?et.forEach(function(xt){ut.add(baseClone$2(xt,tt,nt,xt,et,st))}):isMap(et)&&et.forEach(function(xt,At){ut.set(At,baseClone$2(xt,tt,nt,At,et,st))});var Tt=pt?ft?getAllKeysIn:getAllKeys:ft?keysIn$3:keys$9,Et=ht?void 0:Tt(et);return arrayEach(Et||et,function(xt,At){Et&&(At=xt,xt=et[At]),assignValue$1(ut,At,baseClone$2(xt,tt,nt,At,et,st))}),ut}var _baseClone=baseClone$2,baseClone$1=_baseClone,CLONE_SYMBOLS_FLAG=4;function clone$1(et){return baseClone$1(et,CLONE_SYMBOLS_FLAG)}var clone_1=clone$1,createWrap$1=_createWrap,WRAP_CURRY_FLAG=8;function curry$1(et,tt,nt){tt=nt?void 0:tt;var rt=createWrap$1(et,WRAP_CURRY_FLAG,void 0,void 0,void 0,void 0,void 0,tt);return rt.placeholder=curry$1.placeholder,rt}curry$1.placeholder={};var curry_1=curry$1,baseGetTag$4=_baseGetTag,getPrototype=_getPrototype,isObjectLike$5=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto$1=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$3=objectProto$1.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$7(et){if(!isObjectLike$5(et)||baseGetTag$4(et)!=objectTag)return!1;var tt=getPrototype(et);if(tt===null)return!0;var nt=hasOwnProperty$3.call(tt,"constructor")&&tt.constructor;return typeof nt=="function"&&nt instanceof nt&&funcToString.call(nt)==objectCtorString}var isPlainObject_1=isPlainObject$7,baseGetTag$3=_baseGetTag,isObjectLike$4=isObjectLike_1,isPlainObject$6=isPlainObject_1,domExcTag="[object DOMException]",errorTag="[object Error]";function isError(et){if(!isObjectLike$4(et))return!1;var tt=baseGetTag$3(et);return tt==errorTag||tt==domExcTag||typeof et.message=="string"&&typeof et.name=="string"&&!isPlainObject$6(et)}var isError_1=isError,getTag$1=_getTag,isObjectLike$3=isObjectLike_1,weakMapTag="[object WeakMap]";function isWeakMap(et){return isObjectLike$3(et)&&getTag$1(et)==weakMapTag}var isWeakMap_1=isWeakMap,baseClone=_baseClone,baseIteratee$3=_baseIteratee,CLONE_DEEP_FLAG=1;function iteratee(et){return baseIteratee$3(typeof et=="function"?et:baseClone(et,CLONE_DEEP_FLAG))}var iteratee_1=iteratee,Symbol$2=_Symbol,isArguments$4=isArguments_1,isArray$8=isArray_1,spreadableSymbol=Symbol$2?Symbol$2.isConcatSpreadable:void 0;function isFlattenable$1(et){return isArray$8(et)||isArguments$4(et)||!!(spreadableSymbol&&et&&et[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$3(et,tt,nt,rt,ot){var st=-1,ut=et.length;for(nt||(nt=isFlattenable),ot||(ot=[]);++st<ut;){var ct=et[st];tt>0&&nt(ct)?tt>1?baseFlatten$3(ct,tt-1,nt,rt,ot):arrayPush(ot,ct):rt||(ot[ot.length]=ct)}return ot}var _baseFlatten=baseFlatten$3,baseFlatten$2=_baseFlatten;function flatten$3(et){var tt=et==null?0:et.length;return tt?baseFlatten$2(et,1):[]}var flatten_1=flatten$3,flatten$2=flatten_1,overRest=_overRest,setToString=_setToString;function flatRest$2(et){return setToString(overRest(et,void 0,flatten$2),et+"")}var _flatRest=flatRest$2,createWrap=_createWrap,flatRest$1=_flatRest,WRAP_REARG_FLAG=256,rearg=flatRest$1(function(et,tt){return createWrap(et,WRAP_REARG_FLAG,void 0,void 0,void 0,tt)}),rearg_1=rearg,arrayMap$3=_arrayMap,copyArray$1=_copyArray,isArray$7=isArray_1,isSymbol=isSymbol_1,stringToPath$1=_stringToPath,toKey$1=_toKey,toString$8=toString_1;function toPath(et){return isArray$7(et)?arrayMap$3(et,toKey$1):isSymbol(et)?[et]:copyArray$1(stringToPath$1(toString$8(et)))}var toPath_1=toPath,_util={ary:ary_1,assign:_baseAssign,clone:clone_1,curry:curry_1,forEach:_arrayEach,isArray:isArray_1,isError:isError_1,isFunction:isFunction_1,isWeakMap:isWeakMap_1,iteratee:iteratee_1,keys:_baseKeys,rearg:rearg_1,toInteger:toInteger_1,toPath:toPath_1},baseConvert=_baseConvert,util$3=_util;function convert$k(et,tt,nt){return baseConvert(util$3,et,tt,nt)}var convert_1$3=convert$k,SetCache$1=_SetCache,arrayIncludes$1=_arrayIncludes,arrayIncludesWith$1=_arrayIncludesWith,arrayMap$2=_arrayMap,baseUnary=_baseUnary,cacheHas$1=_cacheHas,LARGE_ARRAY_SIZE$1=200;function baseDifference$2(et,tt,nt,rt){var ot=-1,st=arrayIncludes$1,ut=!0,ct=et.length,ft=[],pt=tt.length;if(!ct)return ft;nt&&(tt=arrayMap$2(tt,baseUnary(nt))),rt?(st=arrayIncludesWith$1,ut=!1):tt.length>=LARGE_ARRAY_SIZE$1&&(st=cacheHas$1,ut=!1,tt=new SetCache$1(tt));e:for(;++ot<ct;){var ht=et[ot],mt=nt==null?ht:nt(ht);if(ht=rt||ht!==0?ht:0,ut&&mt===mt){for(var yt=pt;yt--;)if(tt[yt]===mt)continue e;ft.push(ht)}else st(tt,mt,rt)||ft.push(ht)}return ft}var _baseDifference=baseDifference$2,baseDifference$1=_baseDifference,baseFlatten$1=_baseFlatten,baseRest$3=_baseRest,isArrayLikeObject$3=isArrayLikeObject_1,difference$1=baseRest$3(function(et,tt){return isArrayLikeObject$3(et)?baseDifference$1(et,baseFlatten$1(tt,1,isArrayLikeObject$3,!0)):[]}),difference_1=difference$1,baseSlice$1=_baseSlice;function castSlice$1(et,tt,nt){var rt=et.length;return nt=nt===void 0?rt:nt,!tt&&nt>=rt?et:baseSlice$1(et,tt,nt)}var _castSlice=castSlice$1;function asciiToArray$1(et){return et.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange$3="\\ud800-\\udfff",rsComboMarksRange$4="\\u0300-\\u036f",reComboHalfMarksRange$4="\\ufe20-\\ufe2f",rsComboSymbolsRange$4="\\u20d0-\\u20ff",rsComboRange$4=rsComboMarksRange$4+reComboHalfMarksRange$4+rsComboSymbolsRange$4,rsVarRange$3="\\ufe0e\\ufe0f",rsZWJ$3="\\u200d",reHasUnicode=RegExp("["+rsZWJ$3+rsAstralRange$3+rsComboRange$4+rsVarRange$3+"]");function hasUnicode$3(et){return reHasUnicode.test(et)}var _hasUnicode=hasUnicode$3,rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsVarRange$2="\\ufe0e\\ufe0f",rsAstral$1="["+rsAstralRange$2+"]",rsCombo$3="["+rsComboRange$3+"]",rsFitz$2="\\ud83c[\\udffb-\\udfff]",rsModifier$2="(?:"+rsCombo$3+"|"+rsFitz$2+")",rsNonAstral$2="[^"+rsAstralRange$2+"]",rsRegional$2="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$2="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$2="\\u200d",reOptMod$2=rsModifier$2+"?",rsOptVar$2="["+rsVarRange$2+"]?",rsOptJoin$2="(?:"+rsZWJ$2+"(?:"+[rsNonAstral$2,rsRegional$2,rsSurrPair$2].join("|")+")"+rsOptVar$2+reOptMod$2+")*",rsSeq$2=rsOptVar$2+reOptMod$2+rsOptJoin$2,rsSymbol$1="(?:"+[rsNonAstral$2+rsCombo$3+"?",rsCombo$3,rsRegional$2,rsSurrPair$2,rsAstral$1].join("|")+")",reUnicode$1=RegExp(rsFitz$2+"(?="+rsFitz$2+")|"+rsSymbol$1+rsSeq$2,"g");function unicodeToArray$1(et){return et.match(reUnicode$1)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$2=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(et){return hasUnicode$2(et)?unicodeToArray(et):asciiToArray(et)}var _stringToArray=stringToArray$1,_falseOptions,hasRequired_falseOptions;function require_falseOptions(){return hasRequired_falseOptions||(hasRequired_falseOptions=1,_falseOptions={cap:!1,curry:!1,fixed:!1,immutable:!1,rearg:!1}),_falseOptions}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject$7=isObject_1,toKey=_toKey;function baseSet$2(et,tt,nt,rt){if(!isObject$7(et))return et;tt=castPath$1(tt,et);for(var ot=-1,st=tt.length,ut=st-1,ct=et;ct!=null&&++ot<st;){var ft=toKey(tt[ot]),pt=nt;if(ft==="__proto__"||ft==="constructor"||ft==="prototype")return et;if(ot!=ut){var ht=ct[ft];pt=rt?rt(ht,ft,ct):void 0,pt===void 0&&(pt=isObject$7(ht)?ht:isIndex(tt[ot+1])?[]:{})}assignValue(ct,ft,pt),ct=ct[ft]}return et}var _baseSet=baseSet$2,baseGet=_baseGet,baseSet$1=_baseSet,castPath=_castPath;function basePickBy$1(et,tt,nt){for(var rt=-1,ot=tt.length,st={};++rt<ot;){var ut=tt[rt],ct=baseGet(et,ut);nt(ct,ut)&&baseSet$1(st,castPath(ut,et),ct)}return st}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(et,tt){return basePickBy(et,tt,function(nt,rt){return hasIn(et,rt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick$4=flatRest(function(et,tt){return et==null?{}:basePick(et,tt)}),pick_1=pick$4;function compact$1(et){for(var tt=-1,nt=et==null?0:et.length,rt=0,ot=[];++tt<nt;){var st=et[tt];st&&(ot[rt++]=st)}return ot}var compact_1=compact$1;function isNil(et){return et==null}var isNil_1=isNil,baseEach$2=_baseEach,isArrayLike$2=isArrayLike_1;function baseMap$1(et,tt){var nt=-1,rt=isArrayLike$2(et)?Array(et.length):[];return baseEach$2(et,function(ot,st,ut){rt[++nt]=tt(ot,st,ut)}),rt}var _baseMap=baseMap$1,arrayMap$1=_arrayMap,baseIteratee$2=_baseIteratee,baseMap=_baseMap,isArray$6=isArray_1;function map$4(et,tt){var nt=isArray$6(et)?arrayMap$1:baseMap;return nt(et,baseIteratee$2(tt))}var map_1=map$4,convert$j=convert_1$3,func$7=convert$j("map",map_1);func$7.placeholder=requirePlaceholder();var map$3=func$7,_createFlow,hasRequired_createFlow;function require_createFlow(){if(hasRequired_createFlow)return _createFlow;hasRequired_createFlow=1;var et=require_LodashWrapper(),tt=_flatRest,nt=_getData,rt=require_getFuncName(),ot=isArray_1,st=_isLaziable,ut="Expected a function",ct=8,ft=32,pt=128,ht=256;function mt(yt){return tt(function(vt){var Tt=vt.length,Et=Tt,xt=et.prototype.thru;for(yt&&vt.reverse();Et--;){var At=vt[Et];if(typeof At!="function")throw new TypeError(ut);if(xt&&!Ct&&rt(At)=="wrapper")var Ct=new et([],!0)}for(Et=Ct?Et:Tt;++Et<Tt;){At=vt[Et];var $t=rt(At),Ot=$t=="wrapper"?nt(At):void 0;Ot&&st(Ot[0])&&Ot[1]==(pt|ct|ft|ht)&&!Ot[4].length&&Ot[9]==1?Ct=Ct[rt(Ot[0])].apply(Ct,Ot[3]):Ct=At.length==1&&st(At)?Ct[$t]():Ct.thru(At)}return function(){var Rt=arguments,It=Rt[0];if(Ct&&Rt.length==1&&ot(It))return Ct.plant(It).value();for(var kt=0,Mt=Tt?vt[kt].apply(this,Rt):It;++kt<Tt;)Mt=vt[kt].call(this,Mt);return Mt}})}return _createFlow=mt,_createFlow}var flow_1,hasRequiredFlow;function requireFlow(){if(hasRequiredFlow)return flow_1;hasRequiredFlow=1;var et=require_createFlow(),tt=et();return flow_1=tt,flow_1}var convert$i=convert_1$3,func$6=convert$i("flow",requireFlow());func$6.placeholder=requirePlaceholder();var flow=func$6,lib$4={exports:{}},eventStack_production={},exenv={exports:{}};/*!
  Copyright (c) 2015 Jed Watson.
  Based on code that is Copyright 2013-2015, Facebook, Inc.
  All rights reserved.
*/(function(et){(function(){var tt=!!(typeof window<"u"&&window.document&&window.document.createElement),nt={canUseDOM:tt,canUseWorkers:typeof Worker<"u",canUseEventListeners:tt&&!!(window.addEventListener||window.attachEvent),canUseViewport:tt&&!!window.screen};et.exports?et.exports=nt:window.ExecutionEnvironment=nt})()})(exenv);Object.defineProperty(eventStack_production,"__esModule",{value:!0});var env=exenv.exports,React$3=react.exports;function _typeof$7(et){return(_typeof$7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt})(et)}function _classCallCheck$1(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}function _createClass$1(et,tt,nt){return tt&&_defineProperties$1(et.prototype,tt),nt&&_defineProperties$1(et,nt),et}function _defineProperty$b(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function _inherits$1(et,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&_setPrototypeOf$3(et,tt)}function _getPrototypeOf$1(et){return(_getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)})(et)}function _setPrototypeOf$3(et,tt){return(_setPrototypeOf$3=Object.setPrototypeOf||function(nt,rt){return nt.__proto__=rt,nt})(et,tt)}function _assertThisInitialized$1(et){if(et===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}function _possibleConstructorReturn$1(et,tt){return!tt||typeof tt!="object"&&typeof tt!="function"?_assertThisInitialized$1(et):tt}var EventSet=function(){function et(tt){_classCallCheck$1(this,et),_defineProperty$b(this,"handlers",void 0),this.handlers=tt.slice(0)}return _createClass$1(et,[{key:"addHandlers",value:function(tt){for(var nt=this.handlers.slice(0),rt=tt.length,ot=0;ot<rt;ot+=1)nt.push(tt[ot]);return new et(nt)}},{key:"dispatchEvent",value:function(tt,nt){var rt=this.handlers.length-1;if(nt){for(var ot=rt;ot>=0;ot-=1)this.handlers[ot].called||(this.handlers[ot].called=!0,this.handlers[ot](tt));for(var st=rt;st>=0;st-=1)this.handlers[st].called=!1}else(0,this.handlers[rt])(tt)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(tt){for(var nt=[],rt=this.handlers.length,ot=0;ot<rt;ot+=1){var st=this.handlers[ot];tt.indexOf(st)===-1&&nt.push(st)}return new et(nt)}}]),et}();function cloneMap(et){var tt=new Map;return et.forEach(function(nt,rt){tt.set(rt,nt)}),tt}function normalizeHandlers(et){return Array.isArray(et)?et:[et]}var isRefObject=function(et){return et!==null&&_typeof$7(et)==="object"&&et.hasOwnProperty("current")};function normalizeTarget(et){return et==="document"?document:et==="window"?window:isRefObject(et)?et.current||document:et||document}var EventPool=function(){function et(tt,nt){_classCallCheck$1(this,et),_defineProperty$b(this,"handlerSets",void 0),_defineProperty$b(this,"poolName",void 0),this.handlerSets=nt,this.poolName=tt}return _createClass$1(et,[{key:"addHandlers",value:function(tt,nt){var rt=cloneMap(this.handlerSets);if(rt.has(tt)){var ot=rt.get(tt);rt.set(tt,ot.addHandlers(nt))}else rt.set(tt,new EventSet(nt));return new et(this.poolName,rt)}},{key:"dispatchEvent",value:function(tt,nt){var rt=this.handlerSets.get(tt),ot=this.poolName==="default";rt&&rt.dispatchEvent(nt,ot)}},{key:"hasHandlers",value:function(tt){if(!tt)return this.handlerSets.size>0;var nt=this.handlerSets.get(tt);return!!nt&&nt.hasHandlers()}},{key:"removeHandlers",value:function(tt,nt){var rt=cloneMap(this.handlerSets);if(!rt.has(tt))return new et(this.poolName,rt);var ot=rt.get(tt).removeHandlers(nt);return ot.hasHandlers()?rt.set(tt,ot):rt.delete(tt),new et(this.poolName,rt)}}]),et}();_defineProperty$b(EventPool,"createByType",function(et,tt,nt){var rt=new Map;return rt.set(tt,new EventSet(nt)),new EventPool(et,rt)});var EventTarget=function(){function et(tt){var nt=this;_classCallCheck$1(this,et),_defineProperty$b(this,"handlers",new Map),_defineProperty$b(this,"pools",new Map),_defineProperty$b(this,"target",void 0),_defineProperty$b(this,"createEmitter",function(rt){return function(ot){nt.pools.forEach(function(st){st.dispatchEvent(rt,ot)})}}),this.target=tt}return _createClass$1(et,[{key:"addHandlers",value:function(tt,nt,rt){if(this.pools.has(tt)){var ot=this.pools.get(tt);this.pools.set(tt,ot.addHandlers(nt,rt))}else this.pools.set(tt,EventPool.createByType(tt,nt,rt));this.handlers.has(nt)||this.addTargetHandler(nt)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(tt,nt,rt){if(this.pools.has(tt)){var ot=this.pools.get(tt).removeHandlers(nt,rt);ot.hasHandlers()?this.pools.set(tt,ot):this.pools.delete(tt);var st=!1;this.pools.forEach(function(ut){return st=st||ut.hasHandlers(nt)}),st||this.removeTargetHandler(nt)}}},{key:"addTargetHandler",value:function(tt){var nt=this.createEmitter(tt);this.handlers.set(tt,nt),this.target.addEventListener(tt,nt,!0)}},{key:"removeTargetHandler",value:function(tt){this.handlers.has(tt)&&(this.target.removeEventListener(tt,this.handlers.get(tt),!0),this.handlers.delete(tt))}}]),et}(),EventStack=function(){function et(){var tt=this;_classCallCheck$1(this,et),_defineProperty$b(this,"targets",new Map),_defineProperty$b(this,"getTarget",function(nt){var rt=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],ot=normalizeTarget(nt);if(tt.targets.has(ot))return tt.targets.get(ot);if(!rt)return null;var st=new EventTarget(ot);return tt.targets.set(ot,st),st}),_defineProperty$b(this,"removeTarget",function(nt){tt.targets.delete(normalizeTarget(nt))})}return _createClass$1(et,[{key:"sub",value:function(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(env.canUseDOM){var ot=rt.target,st=ot===void 0?document:ot,ut=rt.pool,ct=ut===void 0?"default":ut;this.getTarget(st).addHandlers(ct,tt,normalizeHandlers(nt))}}},{key:"unsub",value:function(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(env.canUseDOM){var ot=rt.target,st=ot===void 0?document:ot,ut=rt.pool,ct=ut===void 0?"default":ut,ft=this.getTarget(st,!1);ft&&(ft.removeHandlers(ct,tt,normalizeHandlers(nt)),ft.hasHandlers()||this.removeTarget(st))}}}]),et}(),instance$1=new EventStack,EventStack$1=function(et){function tt(){return _classCallCheck$1(this,tt),_possibleConstructorReturn$1(this,_getPrototypeOf$1(tt).apply(this,arguments))}return _inherits$1(tt,React$3.PureComponent),_createClass$1(tt,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(nt){this.unsubscribe(nt),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(nt){var rt=nt.name,ot=nt.on,st=nt.pool,ut=nt.target;instance$1.sub(rt,ot,{pool:st,target:ut})}},{key:"unsubscribe",value:function(nt){var rt=nt.name,ot=nt.on,st=nt.pool,ut=nt.target;instance$1.unsub(rt,ot,{pool:st,target:ut})}},{key:"render",value:function(){return null}}]),tt}();_defineProperty$b(EventStack$1,"defaultProps",{pool:"default",target:"document"}),EventStack$1.propTypes={},eventStack_production.instance=instance$1,eventStack_production.default=EventStack$1;var stack$1;stack$1=eventStack_production;lib$4.exports=stack$1.default;var instance=lib$4.exports.instance=stack$1.instance,Set$1=_Set,noop$e=noop_1,setToArray$1=_setToArray,INFINITY=1/0,createSet$1=Set$1&&1/setToArray$1(new Set$1([,-0]))[1]==INFINITY?function(et){return new Set$1(et)}:noop$e,_createSet=createSet$1,SetCache=_SetCache,arrayIncludes=_arrayIncludes,arrayIncludesWith=_arrayIncludesWith,cacheHas=_cacheHas,createSet=_createSet,setToArray=_setToArray,LARGE_ARRAY_SIZE=200;function baseUniq$2(et,tt,nt){var rt=-1,ot=arrayIncludes,st=et.length,ut=!0,ct=[],ft=ct;if(nt)ut=!1,ot=arrayIncludesWith;else if(st>=LARGE_ARRAY_SIZE){var pt=tt?null:createSet(et);if(pt)return setToArray(pt);ut=!1,ot=cacheHas,ft=new SetCache}else ft=tt?[]:ct;e:for(;++rt<st;){var ht=et[rt],mt=tt?tt(ht):ht;if(ht=nt||ht!==0?ht:0,ut&&mt===mt){for(var yt=ft.length;yt--;)if(ft[yt]===mt)continue e;tt&&ft.push(mt),ct.push(ht)}else ot(ft,mt,nt)||(ft!==ct&&ft.push(mt),ct.push(ht))}return ct}var _baseUniq=baseUniq$2,baseUniq$1=_baseUniq;function uniq$1(et){return et&&et.length?baseUniq$1(et):[]}var uniq_1=uniq$1,baseGetTag$2=_baseGetTag,isObjectLike$2=isObjectLike_1,numberTag="[object Number]";function isNumber$2(et){return typeof et=="number"||isObjectLike$2(et)&&baseGetTag$2(et)==numberTag}var isNumber_1=isNumber$2,baseGetTag$1=_baseGetTag,isArray$5=isArray_1,isObjectLike$1=isObjectLike_1,stringTag="[object String]";function isString$3(et){return typeof et=="string"||!isArray$5(et)&&isObjectLike$1(et)&&baseGetTag$1(et)==stringTag}var isString_1=isString$3,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,boolTag="[object Boolean]";function isBoolean$3(et){return et===!0||et===!1||isObjectLike(et)&&baseGetTag(et)==boolTag}var isBoolean_1=isBoolean$3,classnames$1={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(et){(function(){var tt={}.hasOwnProperty;function nt(){for(var rt=[],ot=0;ot<arguments.length;ot++){var st=arguments[ot];if(!!st){var ut=typeof st;if(ut==="string"||ut==="number")rt.push(st);else if(Array.isArray(st)){if(st.length){var ct=nt.apply(null,st);ct&&rt.push(ct)}}else if(ut==="object"){if(st.toString!==Object.prototype.toString&&!st.toString.toString().includes("[native code]")){rt.push(st.toString());continue}for(var ft in st)tt.call(st,ft)&&st[ft]&&rt.push(ft)}}}return rt.join(" ")}et.exports?(nt.default=nt,et.exports=nt):window.classNames=nt})()})(classnames$1);const classnames=classnames$1.exports;function createShorthand(et,tt,nt){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(typeof et!="function"&&typeof et!="string")throw new Error("createShorthand() Component must be a string or function.");if(isNil_1(nt)||isBoolean_1(nt))return null;var ot=isString_1(nt),st=isNumber_1(nt),ut=isFunction_1(nt),ct=react.exports.isValidElement(nt),ft=isPlainObject_1(nt),pt=ot||st||isArray_1(nt);if(!ut&&!ct&&!ft&&!pt)return null;var ht=rt.defaultProps,mt=ht===void 0?{}:ht,yt=ct&&nt.props||ft&&nt||pt&&tt(nt),vt=rt.overrideProps,Tt=vt===void 0?{}:vt;Tt=isFunction_1(Tt)?Tt(_objectSpread$g({},mt,yt)):Tt;var Et=_objectSpread$g({},mt,yt,Tt);if(mt.className||Tt.className||yt.className){var xt=classnames(mt.className,Tt.className,yt.className);Et.className=uniq_1(xt.split(" ")).join(" ")}if((mt.style||Tt.style||yt.style)&&(Et.style=_objectSpread$g({},mt.style,yt.style,Tt.style)),isNil_1(Et.key)){var At=Et.childKey,Ct=rt.autoGenerateKey,$t=Ct===void 0?!0:Ct;isNil_1(At)?$t&&(ot||st)&&(Et.key=nt):(Et.key=typeof At=="function"?At(Et):At,delete Et.childKey)}if(ct)return react.exports.cloneElement(nt,Et);if(pt||ft)return Wt.createElement(et,Et);if(ut)return nt(et,Et,Et.children)}createShorthand.handledProps=[];function createShorthandFactory(et,tt){if(typeof et!="function"&&typeof et!="string")throw new Error("createShorthandFactory() Component must be a string or function.");return function(nt,rt){return createShorthand(et,tt,nt,rt)}}createShorthandFactory("div",function(et){return{children:et}});createShorthandFactory("iframe",function(et){return{src:et}});createShorthandFactory("img",function(et){return{src:et}});var createHTMLInput=createShorthandFactory("input",function(et){return{type:et}}),createHTMLLabel=createShorthandFactory("label",function(et){return{children:et}});createShorthandFactory("p",function(et){return{children:et}});var getUnhandledProps=function et(tt,nt){var rt=tt.handledProps,ot=rt===void 0?[]:rt;return Object.keys(nt).reduce(function(st,ut){return ut==="childKey"||ot.indexOf(ut)===-1&&(st[ut]=nt[ut]),st},{})};const getUnhandledProps$1=getUnhandledProps;function getElementType(et,tt,nt){var rt=et.defaultProps,ot=rt===void 0?{}:rt;if(tt.as&&tt.as!==ot.as)return tt.as;if(nt){var st=nt();if(st)return st}return tt.href?"a":ot.as||"div"}var arrayMap=_arrayMap;function baseValues$1(et,tt){return arrayMap(tt,function(nt){return et[nt]})}var _baseValues=baseValues$1,baseValues=_baseValues,keys$8=keys_1;function values$6(et){return et==null?[]:baseValues(et,keys$8(et))}var values_1=values$6,baseIndexOf=_baseIndexOf,isArrayLike$1=isArrayLike_1,isString$2=isString_1,toInteger$1=toInteger_1,values$5=values_1,nativeMax$2=Math.max;function includes(et,tt,nt,rt){et=isArrayLike$1(et)?et:values$5(et),nt=nt&&!rt?toInteger$1(nt):0;var ot=et.length;return nt<0&&(nt=nativeMax$2(ot+nt,0)),isString$2(et)?nt<=ot&&et.indexOf(tt,nt)>-1:!!ot&&baseIndexOf(et,tt,nt)>-1}var includes_1=includes,htmlInputAttrs=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","form","id","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],htmlInputEvents=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],htmlInputProps=[].concat(htmlInputAttrs,htmlInputEvents),htmlImageProps=["alt","height","src","srcSet","width"],partitionHTMLProps=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rt=nt.htmlProps,ot=rt===void 0?htmlInputProps:rt,st=nt.includeAria,ut=st===void 0?!0:st,ct={},ft={};return forEach_1(tt,function(pt,ht){var mt=ut&&(/^aria-.*$/.test(ht)||ht==="role"),yt=includes_1(ot,ht)||mt?ct:ft;yt[ht]=pt}),[ct,ft]},hasDocument=(typeof document>"u"?"undefined":_typeof$8(document))==="object"&&document!==null,hasWindow=(typeof window>"u"?"undefined":_typeof$8(window))==="object"&&window!==null&&window.self===window,isBrowser$4=function et(){return isNil_1(et.override)?hasDocument&&hasWindow:et.override};const isBrowser$5=isBrowser$4;var nativeMax$1=Math.max,nativeMin$1=Math.min;function baseInRange$1(et,tt,nt){return et>=nativeMin$1(tt,nt)&&et<nativeMax$1(tt,nt)}var _baseInRange=baseInRange$1,baseInRange=_baseInRange,toFinite=toFinite_1,toNumber$2=toNumber_1;function inRange(et,tt,nt){return tt=toFinite(tt),nt===void 0?(nt=tt,tt=0):nt=toFinite(nt),et=toNumber$2(et),baseInRange(et,tt,nt)}var inRange_1=inRange,first$1={exports:{}};function head$1(et){return et&&et.length?et[0]:void 0}var head_1=head$1;(function(et){et.exports=head_1})(first$1);const _first=getDefaultExportFromCjs$1(first$1.exports);var doesNodeContainClick=function et(tt,nt){if(some_1([nt,tt],isNil_1))return!1;if(nt.target&&(invoke_1(nt.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return invoke_1(nt.target,"removeAttribute","data-suir-click-target"),tt.contains(nt.target);var rt=nt.clientX,ot=nt.clientY;if(some_1([rt,ot],isNil_1))return!1;var st=tt.getClientRects();if(!tt.offsetWidth||!tt.offsetHeight||!st||!st.length)return!1;var ut=_first(st),ct=ut.top,ft=ut.bottom,pt=ut.left,ht=ut.right;return some_1([ct,ft,pt,ht],isNil_1)?!1:inRange_1(ot,ct,ft+.001)&&inRange_1(rt,pt,ht+.001)};const doesNodeContainClick$1=doesNodeContainClick;var baseIsEqual=_baseIsEqual;function isEqual$3(et,tt){return baseIsEqual(et,tt)}var isEqual_1=isEqual$3,baseDifference=_baseDifference,baseRest$2=_baseRest,isArrayLikeObject$2=isArrayLikeObject_1,without=baseRest$2(function(et,tt){return isArrayLikeObject$2(et)?baseDifference(et,tt):[]}),without_1=without;function IconGroup(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.size,st=classnames(ot,"icons",nt),ut=getUnhandledProps$1(IconGroup,et),ct=getElementType(IconGroup,et);return Wt.createElement(ct,_extends$a({},ut,{className:st}),isNil$1(tt)?rt:tt)}IconGroup.handledProps=["as","children","className","content","size"];IconGroup.propTypes={};IconGroup.defaultProps={as:"i"};var Icon$3=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props.disabled;if(ft){ct.preventDefault();return}invoke_1(rt.props,"onClick",ct,rt.props)}),rt}return _createClass$2(tt,[{key:"getIconAriaOptions",value:function(){var rt={},ot=this.props,st=ot["aria-label"],ut=ot["aria-hidden"];return isNil_1(st)?rt["aria-hidden"]="true":rt["aria-label"]=st,isNil_1(ut)||(rt["aria-hidden"]=ut),rt}},{key:"render",value:function(){var rt=this.props,ot=rt.bordered,st=rt.circular,ut=rt.className,ct=rt.color,ft=rt.corner,pt=rt.disabled,ht=rt.fitted,mt=rt.flipped,yt=rt.inverted,vt=rt.link,Tt=rt.loading,Et=rt.name,xt=rt.rotated,At=rt.size,Ct=classnames(ct,Et,At,useKeyOnly(ot,"bordered"),useKeyOnly(st,"circular"),useKeyOnly(pt,"disabled"),useKeyOnly(ht,"fitted"),useKeyOnly(yt,"inverted"),useKeyOnly(vt,"link"),useKeyOnly(Tt,"loading"),useKeyOrValueAndKey(ft,"corner"),useValueAndKey(mt,"flipped"),useValueAndKey(xt,"rotated"),"icon",ut),$t=getUnhandledProps$1(tt,this.props),Ot=getElementType(tt,this.props),Rt=this.getIconAriaOptions();return Wt.createElement(Ot,_extends$a({},$t,Rt,{className:Ct,onClick:this.handleClick}))}}]),tt}(react.exports.PureComponent);_defineProperty$d(Icon$3,"defaultProps",{as:"i"});_defineProperty$d(Icon$3,"Group",IconGroup);_defineProperty$d(Icon$3,"handledProps",["aria-hidden","aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"]);Icon$3.propTypes={};Icon$3.create=createShorthandFactory(Icon$3,function(et){return{name:et}});const Icon$4=Icon$3;var isObject$6=function et(tt){return tt!==null&&!Array.isArray(tt)&&typeof tt=="object"},codes={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};for(var i$2=0;i$2<24;i$2+=1)codes[112+i$2]="F"+(i$2+1);for(var j$2=0;j$2<26;j$2+=1){var n$4=j$2+65;codes[n$4]=[String.fromCharCode(n$4+32),String.fromCharCode(n$4)]}var keyboardKey={codes,getCode:function et(tt){return isObject$6(tt)?tt.keyCode||tt.which||this[tt.key]:this[tt]},getKey:function et(tt){var nt=isObject$6(tt);if(nt&&tt.key)return tt.key;var rt=codes[nt?tt.keyCode||tt.which:tt];return Array.isArray(rt)&&(nt?rt=rt[tt.shiftKey?1:0]:rt=rt[0]),rt},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};keyboardKey.Spacebar=keyboardKey[" "];keyboardKey.Digit0=keyboardKey[0];keyboardKey.Digit1=keyboardKey[1];keyboardKey.Digit2=keyboardKey[2];keyboardKey.Digit3=keyboardKey[3];keyboardKey.Digit4=keyboardKey[4];keyboardKey.Digit5=keyboardKey[5];keyboardKey.Digit6=keyboardKey[6];keyboardKey.Digit7=keyboardKey[7];keyboardKey.Digit8=keyboardKey[8];keyboardKey.Digit9=keyboardKey[9];keyboardKey.Tilde=keyboardKey["~"];keyboardKey.GraveAccent=keyboardKey["`"];keyboardKey.ExclamationPoint=keyboardKey["!"];keyboardKey.AtSign=keyboardKey["@"];keyboardKey.PoundSign=keyboardKey["#"];keyboardKey.PercentSign=keyboardKey["%"];keyboardKey.Caret=keyboardKey["^"];keyboardKey.Ampersand=keyboardKey["&"];keyboardKey.PlusSign=keyboardKey["+"];keyboardKey.MinusSign=keyboardKey["-"];keyboardKey.EqualsSign=keyboardKey["="];keyboardKey.DivisionSign=keyboardKey["/"];keyboardKey.MultiplicationSign=keyboardKey["*"];keyboardKey.Comma=keyboardKey[","];keyboardKey.Decimal=keyboardKey["."];keyboardKey.Colon=keyboardKey[":"];keyboardKey.Semicolon=keyboardKey[";"];keyboardKey.Pipe=keyboardKey["|"];keyboardKey.BackSlash=keyboardKey["\\"];keyboardKey.QuestionMark=keyboardKey["?"];keyboardKey.SingleQuote=keyboardKey["'"];keyboardKey.DoubleQuote=keyboardKey['"'];keyboardKey.LeftCurlyBrace=keyboardKey["{"];keyboardKey.RightCurlyBrace=keyboardKey["}"];keyboardKey.LeftParenthesis=keyboardKey["("];keyboardKey.RightParenthesis=keyboardKey[")"];keyboardKey.LeftAngleBracket=keyboardKey["<"];keyboardKey.RightAngleBracket=keyboardKey[">"];keyboardKey.LeftSquareBracket=keyboardKey["["];keyboardKey.RightSquareBracket=keyboardKey["]"];var keyboardKey_1=keyboardKey,PortalInner=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleRef",function(ct){handleRef$1(rt.props.innerRef,ct)}),rt}return _createClass$2(tt,[{key:"componentDidMount",value:function(){invoke_1(this.props,"onMount",null,this.props)}},{key:"componentWillUnmount",value:function(){invoke_1(this.props,"onUnmount",null,this.props)}},{key:"render",value:function(){if(!isBrowser$5())return null;var rt=this.props,ot=rt.children,st=rt.mountNode,ut=st===void 0?document.body:st;return reactDom.exports.createPortal(Wt.createElement(Ref$1,{innerRef:this.handleRef},ot),ut)}}]),tt}(react.exports.Component);_defineProperty$d(PortalInner,"handledProps",["children","innerRef","mountNode","onMount","onUnmount"]);PortalInner.propTypes={};const PortalInner$1=PortalInner;var Portal$3=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"contentRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"triggerRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"latestDocumentMouseDownEvent",null),_defineProperty$d(_assertThisInitialized$2(rt),"handleDocumentMouseDown",function(ct){rt.latestDocumentMouseDownEvent=ct}),_defineProperty$d(_assertThisInitialized$2(rt),"handleDocumentClick",function(ct){var ft=rt.props.closeOnDocumentClick,pt=rt.latestDocumentMouseDownEvent;rt.latestDocumentMouseDownEvent=null,!(!rt.contentRef.current||doesNodeContainClick$1(rt.triggerRef.current,ct)||pt&&doesNodeContainClick$1(rt.contentRef.current,pt)||doesNodeContainClick$1(rt.contentRef.current,ct))&&ft&&rt.close(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleEscape",function(ct){!rt.props.closeOnEscape||keyboardKey_1.getCode(ct)===keyboardKey_1.Escape&&rt.close(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalMouseLeave",function(ct){var ft=rt.props,pt=ft.closeOnPortalMouseLeave,ht=ft.mouseLeaveDelay;!pt||ct.target===rt.contentRef.current&&(rt.mouseLeaveTimer=rt.closeWithTimeout(ct,ht))}),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalMouseEnter",function(){var ct=rt.props.closeOnPortalMouseLeave;!ct||clearTimeout(rt.mouseLeaveTimer)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleTriggerBlur",function(ct){for(var ft=rt.props,pt=ft.trigger,ht=ft.closeOnTriggerBlur,mt=arguments.length,yt=new Array(mt>1?mt-1:0),vt=1;vt<mt;vt++)yt[vt-1]=arguments[vt];invoke_1.apply(void 0,[pt,"props.onBlur",ct].concat(yt));var Tt=ct.relatedTarget||document.activeElement,Et=invoke_1(rt.contentRef.current,"contains",Tt);!ht||Et||rt.close(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleTriggerClick",function(ct){for(var ft=rt.props,pt=ft.trigger,ht=ft.closeOnTriggerClick,mt=ft.openOnTriggerClick,yt=rt.state.open,vt=arguments.length,Tt=new Array(vt>1?vt-1:0),Et=1;Et<vt;Et++)Tt[Et-1]=arguments[Et];invoke_1.apply(void 0,[pt,"props.onClick",ct].concat(Tt)),yt&&ht?rt.close(ct):!yt&&mt&&rt.open(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleTriggerFocus",function(ct){for(var ft=rt.props,pt=ft.trigger,ht=ft.openOnTriggerFocus,mt=arguments.length,yt=new Array(mt>1?mt-1:0),vt=1;vt<mt;vt++)yt[vt-1]=arguments[vt];invoke_1.apply(void 0,[pt,"props.onFocus",ct].concat(yt)),ht&&rt.open(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleTriggerMouseLeave",function(ct){clearTimeout(rt.mouseEnterTimer);for(var ft=rt.props,pt=ft.trigger,ht=ft.closeOnTriggerMouseLeave,mt=ft.mouseLeaveDelay,yt=arguments.length,vt=new Array(yt>1?yt-1:0),Tt=1;Tt<yt;Tt++)vt[Tt-1]=arguments[Tt];invoke_1.apply(void 0,[pt,"props.onMouseLeave",ct].concat(vt)),ht&&(rt.mouseLeaveTimer=rt.closeWithTimeout(ct,mt))}),_defineProperty$d(_assertThisInitialized$2(rt),"handleTriggerMouseEnter",function(ct){clearTimeout(rt.mouseLeaveTimer);for(var ft=rt.props,pt=ft.trigger,ht=ft.mouseEnterDelay,mt=ft.openOnTriggerMouseEnter,yt=arguments.length,vt=new Array(yt>1?yt-1:0),Tt=1;Tt<yt;Tt++)vt[Tt-1]=arguments[Tt];invoke_1.apply(void 0,[pt,"props.onMouseEnter",ct].concat(vt)),mt&&(rt.mouseEnterTimer=rt.openWithTimeout(ct,ht))}),_defineProperty$d(_assertThisInitialized$2(rt),"open",function(ct){var ft=rt.props.onOpen;ft&&ft(ct,rt.props),rt.trySetState({open:!0})}),_defineProperty$d(_assertThisInitialized$2(rt),"openWithTimeout",function(ct,ft){var pt=_objectSpread$g({},ct);return setTimeout(function(){return rt.open(pt)},ft||0)}),_defineProperty$d(_assertThisInitialized$2(rt),"close",function(ct){var ft=rt.props.onClose;ft&&ft(ct,rt.props),rt.trySetState({open:!1})}),_defineProperty$d(_assertThisInitialized$2(rt),"closeWithTimeout",function(ct,ft){var pt=_objectSpread$g({},ct);return setTimeout(function(){return rt.close(pt)},ft||0)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleMount",function(){invoke_1(rt.props,"onMount",null,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleUnmount",function(){invoke_1(rt.props,"onUnmount",null,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleTriggerRef",function(ct){rt.triggerRef.current=ct,handleRef$1(rt.props.triggerRef,ct)}),rt}return _createClass$2(tt,[{key:"componentWillUnmount",value:function(){clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)}},{key:"render",value:function(){var rt=this.props,ot=rt.children,st=rt.eventPool,ut=rt.mountNode,ct=rt.trigger,ft=this.state.open;return Wt.createElement(react.exports.Fragment,null,ft&&Wt.createElement(react.exports.Fragment,null,Wt.createElement(PortalInner$1,{innerRef:this.contentRef,mountNode:ut,onMount:this.handleMount,onUnmount:this.handleUnmount},ot),Wt.createElement(lib$4.exports,{name:"mouseleave",on:this.handlePortalMouseLeave,pool:st,target:this.contentRef}),Wt.createElement(lib$4.exports,{name:"mouseenter",on:this.handlePortalMouseEnter,pool:st,target:this.contentRef}),Wt.createElement(lib$4.exports,{name:"mousedown",on:this.handleDocumentMouseDown,pool:st}),Wt.createElement(lib$4.exports,{name:"click",on:this.handleDocumentClick,pool:st}),Wt.createElement(lib$4.exports,{name:"keydown",on:this.handleEscape,pool:st})),ct&&Wt.createElement(Ref$1,{innerRef:this.handleTriggerRef},react.exports.cloneElement(ct,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})))}}]),tt}(AutoControlledComponent);_defineProperty$d(Portal$3,"defaultProps",{closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0});_defineProperty$d(Portal$3,"autoControlledProps",["open"]);_defineProperty$d(Portal$3,"Inner",PortalInner$1);_defineProperty$d(Portal$3,"handledProps",["children","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","trigger","triggerRef"]);Portal$3.propTypes={};const Portal$4=Portal$3;function DimmerDimmable(et){var tt=et.blurring,nt=et.className,rt=et.children,ot=et.content,st=et.dimmed,ut=classnames(useKeyOnly(tt,"blurring"),useKeyOnly(st,"dimmed"),"dimmable",nt),ct=getUnhandledProps$1(DimmerDimmable,et),ft=getElementType(DimmerDimmable,et);return Wt.createElement(ft,_extends$a({},ct,{className:ut}),isNil$1(rt)?ot:rt)}DimmerDimmable.handledProps=["as","blurring","children","className","content","dimmed"];DimmerDimmable.propTypes={};var DimmerInner=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"containerRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"contentRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.contentRef.current;invoke_1(rt.props,"onClick",ct,rt.props),!(ft&&ft!==ct.target&&doesNodeContainClick$1(ft,ct))&&invoke_1(rt.props,"onClickOutside",ct,rt.props)}),rt}return _createClass$2(tt,[{key:"componentDidMount",value:function(){var rt=this.props.active;this.toggleStyles(rt)}},{key:"componentDidUpdate",value:function(rt){var ot=this.props.active,st=rt.active;st!==ot&&this.toggleStyles(ot)}},{key:"toggleStyles",value:function(rt){var ot=this.containerRef.current;!ot||!ot.style||(rt?ot.style.setProperty("display","flex","important"):ot.style.removeProperty("display"))}},{key:"render",value:function(){var rt=this.props,ot=rt.active,st=rt.children,ut=rt.className,ct=rt.content,ft=rt.disabled,pt=rt.inverted,ht=rt.page,mt=rt.simple,yt=rt.verticalAlign,vt=classnames("ui",useKeyOnly(ot,"active transition visible"),useKeyOnly(ft,"disabled"),useKeyOnly(pt,"inverted"),useKeyOnly(ht,"page"),useKeyOnly(mt,"simple"),useVerticalAlignProp(yt),"dimmer",ut),Tt=getUnhandledProps$1(tt,this.props),Et=getElementType(tt,this.props),xt=isNil$1(st)?ct:st;return Wt.createElement(Ref$1,{innerRef:this.containerRef},Wt.createElement(Et,_extends$a({},Tt,{className:vt,onClick:this.handleClick}),xt&&Wt.createElement("div",{className:"content",ref:this.contentRef},xt)))}}]),tt}(react.exports.Component);_defineProperty$d(DimmerInner,"handledProps",["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"]);DimmerInner.propTypes={};var Dimmer=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalMount",function(){!isBrowser$5()||(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))}),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalUnmount",function(){!isBrowser$5()||(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.active,st=rt.page,ut=getUnhandledProps$1(tt,this.props);return st?Wt.createElement(Portal$4,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:ot,openOnTriggerClick:!1},Wt.createElement(DimmerInner,_extends$a({},ut,{active:ot,page:st}))):Wt.createElement(DimmerInner,_extends$a({},ut,{active:ot,page:st}))}}]),tt}(react.exports.Component);_defineProperty$d(Dimmer,"Dimmable",DimmerDimmable);_defineProperty$d(Dimmer,"Inner",DimmerInner);_defineProperty$d(Dimmer,"handledProps",["active","page"]);Dimmer.propTypes={};Dimmer.create=createShorthandFactory(Dimmer,function(et){return{content:et}});function ImageGroup(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.size,st=classnames("ui",ot,nt,"images"),ut=getUnhandledProps$1(ImageGroup,et),ct=getElementType(ImageGroup,et);return Wt.createElement(ct,_extends$a({},ut,{className:st}),isNil$1(tt)?rt:tt)}ImageGroup.handledProps=["as","children","className","content","size"];ImageGroup.propTypes={};function Image$1(et){var tt=et.avatar,nt=et.bordered,rt=et.centered,ot=et.children,st=et.circular,ut=et.className,ct=et.content,ft=et.dimmer,pt=et.disabled,ht=et.floated,mt=et.fluid,yt=et.hidden,vt=et.href,Tt=et.inline,Et=et.label,xt=et.rounded,At=et.size,Ct=et.spaced,$t=et.verticalAlign,Ot=et.wrapped,Rt=et.ui,It=classnames(useKeyOnly(Rt,"ui"),At,useKeyOnly(tt,"avatar"),useKeyOnly(nt,"bordered"),useKeyOnly(st,"circular"),useKeyOnly(rt,"centered"),useKeyOnly(pt,"disabled"),useKeyOnly(mt,"fluid"),useKeyOnly(yt,"hidden"),useKeyOnly(Tt,"inline"),useKeyOnly(xt,"rounded"),useKeyOrValueAndKey(Ct,"spaced"),useValueAndKey(ht,"floated"),useVerticalAlignProp($t),"image",ut),kt=getUnhandledProps$1(Image$1,et),Mt=partitionHTMLProps(kt,{htmlProps:htmlImageProps}),Ft=_slicedToArray$1(Mt,2),zt=Ft[0],Vt=Ft[1],Zt=getElementType(Image$1,et,function(){if(!isNil_1(ft)||!isNil_1(Et)||!isNil_1(Ot)||!isNil$1(ot))return"div"});return isNil$1(ot)?isNil$1(ct)?Zt==="img"?Wt.createElement(Zt,_extends$a({},Vt,zt,{className:It})):Wt.createElement(Zt,_extends$a({},Vt,{className:It,href:vt}),Dimmer.create(ft,{autoGenerateKey:!1}),Label$4.create(Et,{autoGenerateKey:!1}),Wt.createElement("img",zt)):Wt.createElement(Zt,_extends$a({},kt,{className:It}),ct):Wt.createElement(Zt,_extends$a({},kt,{className:It}),ot)}Image$1.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"];Image$1.Group=ImageGroup;Image$1.propTypes={};Image$1.defaultProps={as:"img",ui:!0};Image$1.create=createShorthandFactory(Image$1,function(et){return{src:et}});function LabelDetail(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("detail",nt),st=getUnhandledProps$1(LabelDetail,et),ut=getElementType(LabelDetail,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}LabelDetail.handledProps=["as","children","className","content"];LabelDetail.propTypes={};LabelDetail.create=createShorthandFactory(LabelDetail,function(et){return{content:et}});function LabelGroup(et){var tt=et.children,nt=et.circular,rt=et.className,ot=et.color,st=et.content,ut=et.size,ct=et.tag,ft=classnames("ui",ot,ut,useKeyOnly(nt,"circular"),useKeyOnly(ct,"tag"),"labels",rt),pt=getUnhandledProps$1(LabelGroup,et),ht=getElementType(LabelGroup,et);return Wt.createElement(ht,_extends$a({},pt,{className:ft}),isNil$1(tt)?st:tt)}LabelGroup.handledProps=["as","children","circular","className","color","content","size","tag"];LabelGroup.propTypes={};var Label$4=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props.onClick;ft&&ft(ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleIconOverrides",function(ct){return{onClick:function(pt){invoke_1(ct,"onClick",pt),invoke_1(rt.props,"onRemove",pt,rt.props)}}}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.active,st=rt.attached,ut=rt.basic,ct=rt.children,ft=rt.circular,pt=rt.className,ht=rt.color,mt=rt.content,yt=rt.corner,vt=rt.detail,Tt=rt.empty,Et=rt.floating,xt=rt.horizontal,At=rt.icon,Ct=rt.image,$t=rt.onRemove,Ot=rt.pointing,Rt=rt.prompt,It=rt.removeIcon,kt=rt.ribbon,Mt=rt.size,Ft=rt.tag,zt=Ot===!0&&"pointing"||(Ot==="left"||Ot==="right")&&"".concat(Ot," pointing")||(Ot==="above"||Ot==="below")&&"pointing ".concat(Ot),Vt=classnames("ui",ht,zt,Mt,useKeyOnly(ot,"active"),useKeyOnly(ut,"basic"),useKeyOnly(ft,"circular"),useKeyOnly(Tt,"empty"),useKeyOnly(Et,"floating"),useKeyOnly(xt,"horizontal"),useKeyOnly(Ct===!0,"image"),useKeyOnly(Rt,"prompt"),useKeyOnly(Ft,"tag"),useKeyOrValueAndKey(yt,"corner"),useKeyOrValueAndKey(kt,"ribbon"),useValueAndKey(st,"attached"),"label",pt),Zt=getUnhandledProps$1(tt,this.props),Ut=getElementType(tt,this.props);if(!isNil$1(ct))return Wt.createElement(Ut,_extends$a({},Zt,{className:Vt,onClick:this.handleClick}),ct);var Xt=isUndefined_1(It)?"delete":It;return Wt.createElement(Ut,_extends$a({className:Vt,onClick:this.handleClick},Zt),Icon$4.create(At,{autoGenerateKey:!1}),typeof Ct!="boolean"&&Image$1.create(Ct,{autoGenerateKey:!1}),mt,LabelDetail.create(vt,{autoGenerateKey:!1}),$t&&Icon$4.create(Xt,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))}}]),tt}(react.exports.Component);_defineProperty$d(Label$4,"Detail",LabelDetail);_defineProperty$d(Label$4,"Group",LabelGroup);_defineProperty$d(Label$4,"handledProps",["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","prompt","removeIcon","ribbon","size","tag"]);Label$4.propTypes={};Label$4.create=createShorthandFactory(Label$4,function(et){return{content:et}});function ButtonContent(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.hidden,st=et.visible,ut=classnames(useKeyOnly(st,"visible"),useKeyOnly(ot,"hidden"),"content",nt),ct=getUnhandledProps$1(ButtonContent,et),ft=getElementType(ButtonContent,et);return Wt.createElement(ft,_extends$a({},ct,{className:ut}),isNil$1(tt)?rt:tt)}ButtonContent.handledProps=["as","children","className","content","hidden","visible"];ButtonContent.propTypes={};function ButtonGroup(et){var tt=et.attached,nt=et.basic,rt=et.buttons,ot=et.children,st=et.className,ut=et.color,ct=et.compact,ft=et.content,pt=et.floated,ht=et.fluid,mt=et.icon,yt=et.inverted,vt=et.labeled,Tt=et.negative,Et=et.positive,xt=et.primary,At=et.secondary,Ct=et.size,$t=et.toggle,Ot=et.vertical,Rt=et.widths,It=classnames("ui",ut,Ct,useKeyOnly(nt,"basic"),useKeyOnly(ct,"compact"),useKeyOnly(ht,"fluid"),useKeyOnly(mt,"icon"),useKeyOnly(yt,"inverted"),useKeyOnly(vt,"labeled"),useKeyOnly(Tt,"negative"),useKeyOnly(Et,"positive"),useKeyOnly(xt,"primary"),useKeyOnly(At,"secondary"),useKeyOnly($t,"toggle"),useKeyOnly(Ot,"vertical"),useKeyOrValueAndKey(tt,"attached"),useValueAndKey(pt,"floated"),useWidthProp(Rt),"buttons",st),kt=getUnhandledProps$1(ButtonGroup,et),Mt=getElementType(ButtonGroup,et);return isNil_1(rt)?Wt.createElement(Mt,_extends$a({},kt,{className:It}),isNil$1(ot)?ft:ot):Wt.createElement(Mt,_extends$a({},kt,{className:It}),map_1(rt,function(Ft){return Button$3.create(Ft)}))}ButtonGroup.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"];ButtonGroup.propTypes={};function ButtonOr(et){var tt=et.className,nt=et.text,rt=classnames("or",tt),ot=getUnhandledProps$1(ButtonOr,et),st=getElementType(ButtonOr,et);return Wt.createElement(st,_extends$a({},ot,{className:rt,"data-text":nt}))}ButtonOr.handledProps=["as","className","text"];ButtonOr.propTypes={};var Button$2=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"ref",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"computeElementType",function(){var ct=rt.props,ft=ct.attached,pt=ct.label;if(!isNil_1(ft)||!isNil_1(pt))return"div"}),_defineProperty$d(_assertThisInitialized$2(rt),"computeTabIndex",function(ct){var ft=rt.props,pt=ft.disabled,ht=ft.tabIndex;if(!isNil_1(ht))return ht;if(pt)return-1;if(ct==="div")return 0}),_defineProperty$d(_assertThisInitialized$2(rt),"focus",function(){return invoke_1(rt.ref.current,"focus")}),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props.disabled;if(ft){ct.preventDefault();return}invoke_1(rt.props,"onClick",ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"hasIconClass",function(){var ct=rt.props,ft=ct.labelPosition,pt=ct.children,ht=ct.content,mt=ct.icon;return mt===!0?!0:mt&&(ft||isNil$1(pt)&&isNil_1(ht))}),rt}return _createClass$2(tt,[{key:"computeButtonAriaRole",value:function(rt){var ot=this.props.role;if(!isNil_1(ot))return ot;if(rt!=="button")return"button"}},{key:"render",value:function(){var rt=this.props,ot=rt.active,st=rt.animated,ut=rt.attached,ct=rt.basic,ft=rt.children,pt=rt.circular,ht=rt.className,mt=rt.color,yt=rt.compact,vt=rt.content,Tt=rt.disabled,Et=rt.floated,xt=rt.fluid,At=rt.icon,Ct=rt.inverted,$t=rt.label,Ot=rt.labelPosition,Rt=rt.loading,It=rt.negative,kt=rt.positive,Mt=rt.primary,Ft=rt.secondary,zt=rt.size,Vt=rt.toggle,Zt=classnames(mt,zt,useKeyOnly(ot,"active"),useKeyOnly(ct,"basic"),useKeyOnly(pt,"circular"),useKeyOnly(yt,"compact"),useKeyOnly(xt,"fluid"),useKeyOnly(this.hasIconClass(),"icon"),useKeyOnly(Ct,"inverted"),useKeyOnly(Rt,"loading"),useKeyOnly(It,"negative"),useKeyOnly(kt,"positive"),useKeyOnly(Mt,"primary"),useKeyOnly(Ft,"secondary"),useKeyOnly(Vt,"toggle"),useKeyOrValueAndKey(st,"animated"),useKeyOrValueAndKey(ut,"attached")),Ut=classnames(useKeyOrValueAndKey(Ot||!!$t,"labeled")),Xt=classnames(useKeyOnly(Tt,"disabled"),useValueAndKey(Et,"floated")),Jt=getUnhandledProps$1(tt,this.props),gn=getElementType(tt,this.props,this.computeElementType),An=this.computeTabIndex(gn);if(!isNil_1($t)){var sn=classnames("ui",Zt,"button",ht),Sn=classnames("ui",Ut,"button",ht,Xt),In=Label$4.create($t,{defaultProps:{basic:!0,pointing:Ot==="left"?"right":"left"},autoGenerateKey:!1});return Wt.createElement(gn,_extends$a({},Jt,{className:Sn,onClick:this.handleClick}),Ot==="left"&&In,Wt.createElement(Ref$1,{innerRef:this.ref},Wt.createElement("button",{className:sn,"aria-pressed":Vt?!!ot:void 0,disabled:Tt,tabIndex:An},Icon$4.create(At,{autoGenerateKey:!1})," ",vt)),(Ot==="right"||!Ot)&&In)}var _n=classnames("ui",Zt,Xt,Ut,"button",ht),En=!isNil$1(ft),Ln=this.computeButtonAriaRole(gn);return Wt.createElement(Ref$1,{innerRef:this.ref},Wt.createElement(gn,_extends$a({},Jt,{className:_n,"aria-pressed":Vt?!!ot:void 0,disabled:Tt&&gn==="button"||void 0,onClick:this.handleClick,role:Ln,tabIndex:An}),En&&ft,!En&&Icon$4.create(At,{autoGenerateKey:!1}),!En&&vt))}}]),tt}(react.exports.Component);_defineProperty$d(Button$2,"defaultProps",{as:"button"});_defineProperty$d(Button$2,"Content",ButtonContent);_defineProperty$d(Button$2,"Group",ButtonGroup);_defineProperty$d(Button$2,"Or",ButtonOr);_defineProperty$d(Button$2,"handledProps",["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle"]);Button$2.propTypes={};Button$2.create=createShorthandFactory(Button$2,function(et){return{content:et}});const Button$3=Button$2;function arrayReduce$2(et,tt,nt,rt){var ot=-1,st=et==null?0:et.length;for(rt&&st&&(nt=et[++ot]);++ot<st;)nt=tt(nt,et[ot],ot,et);return nt}var _arrayReduce=arrayReduce$2;function baseReduce$1(et,tt,nt,rt,ot){return ot(et,function(st,ut,ct){nt=rt?(rt=!1,st):tt(nt,st,ut,ct)}),nt}var _baseReduce=baseReduce$1,arrayReduce$1=_arrayReduce,baseEach$1=_baseEach,baseIteratee$1=_baseIteratee,baseReduce=_baseReduce,isArray$4=isArray_1;function reduce$1(et,tt,nt){var rt=isArray$4(et)?arrayReduce$1:baseReduce,ot=arguments.length<3;return rt(et,baseIteratee$1(tt),nt,ot,baseEach$1)}var reduce_1=reduce$1,shallowequal=function et(tt,nt,rt,ot){var st=rt?rt.call(ot,tt,nt):void 0;if(st!==void 0)return!!st;if(tt===nt)return!0;if(typeof tt!="object"||!tt||typeof nt!="object"||!nt)return!1;var ut=Object.keys(tt),ct=Object.keys(nt);if(ut.length!==ct.length)return!1;for(var ft=Object.prototype.hasOwnProperty.bind(nt),pt=0;pt<ut.length;pt++){var ht=ut[pt];if(!ft(ht))return!1;var mt=tt[ht],yt=nt[ht];if(st=rt?rt.call(ot,mt,yt,ht):void 0,st===!1||st===void 0&&mt!==yt)return!1}return!0},getNodeRefFromProps=function et(tt){var nt=tt.node;if(isBrowser$5())return isRefObject$2(nt)?nt:isNil_1(nt)?toRefObject$1(document.body):toRefObject$1(nt)};const getNodeRefFromProps$1=getNodeRefFromProps;var convert$h=convert_1$3,func$5=convert$h("uniq",uniq_1,require_falseOptions());func$5.placeholder=requirePlaceholder();var uniq=func$5,convert$g=convert_1$3,func$4=convert$g("identity",identity_1,require_falseOptions());func$4.placeholder=requirePlaceholder();var identity$9=func$4,convert$f=convert_1$3,func$3=convert$f("filter",filter_1);func$3.placeholder=requirePlaceholder();var filter$2=func$3,_baseIsRegExp,hasRequired_baseIsRegExp;function require_baseIsRegExp(){if(hasRequired_baseIsRegExp)return _baseIsRegExp;hasRequired_baseIsRegExp=1;var et=_baseGetTag,tt=isObjectLike_1,nt="[object RegExp]";function rt(ot){return tt(ot)&&et(ot)==nt}return _baseIsRegExp=rt,_baseIsRegExp}var isRegExp_1,hasRequiredIsRegExp;function requireIsRegExp(){if(hasRequiredIsRegExp)return isRegExp_1;hasRequiredIsRegExp=1;var et=require_baseIsRegExp(),tt=_baseUnary,nt=_nodeUtil.exports,rt=nt&&nt.isRegExp,ot=rt?tt(rt):et;return isRegExp_1=ot,isRegExp_1}var split_1,hasRequiredSplit;function requireSplit(){if(hasRequiredSplit)return split_1;hasRequiredSplit=1;var et=_baseToString,tt=_castSlice,nt=_hasUnicode,rt=_isIterateeCall,ot=requireIsRegExp(),st=_stringToArray,ut=toString_1,ct=4294967295;function ft(pt,ht,mt){return mt&&typeof mt!="number"&&rt(pt,ht,mt)&&(ht=mt=void 0),mt=mt===void 0?ct:mt>>>0,mt?(pt=ut(pt),pt&&(typeof ht=="string"||ht!=null&&!ot(ht))&&(ht=et(ht),!ht&&nt(pt))?tt(st(pt),0,mt):pt.split(ht,mt)):[]}return split_1=ft,split_1}var convert$e=convert_1$3,func$2=convert$e("split",requireSplit());func$2.placeholder=requirePlaceholder();var split=func$2,flatMap_1,hasRequiredFlatMap;function requireFlatMap(){if(hasRequiredFlatMap)return flatMap_1;hasRequiredFlatMap=1;var et=_baseFlatten,tt=map_1;function nt(rt,ot){return et(tt(rt,ot),1)}return flatMap_1=nt,flatMap_1}var convert$d=convert_1$3,func$1=convert$d("flatMap",requireFlatMap());func$1.placeholder=requirePlaceholder();var flatMap=func$1,_iteratorToArray,hasRequired_iteratorToArray;function require_iteratorToArray(){if(hasRequired_iteratorToArray)return _iteratorToArray;hasRequired_iteratorToArray=1;function et(tt){for(var nt,rt=[];!(nt=tt.next()).done;)rt.push(nt.value);return rt}return _iteratorToArray=et,_iteratorToArray}var toArray_1,hasRequiredToArray;function requireToArray(){if(hasRequiredToArray)return toArray_1;hasRequiredToArray=1;var et=_Symbol,tt=_copyArray,nt=_getTag,rt=isArrayLike_1,ot=isString_1,st=require_iteratorToArray(),ut=_mapToArray,ct=_setToArray,ft=_stringToArray,pt=values_1,ht="[object Map]",mt="[object Set]",yt=et?et.iterator:void 0;function vt(Tt){if(!Tt)return[];if(rt(Tt))return ot(Tt)?ft(Tt):tt(Tt);if(yt&&Tt[yt])return st(Tt[yt]());var Et=nt(Tt),xt=Et==ht?ut:Et==mt?ct:pt;return xt(Tt)}return toArray_1=vt,toArray_1}var convert$c=convert_1$3,func=convert$c("toArray",requireToArray(),require_falseOptions());func.placeholder=requirePlaceholder();var toArray$1=func,computeClassNames=flow(toArray$1,map$3("props.className"),flatMap(split(/\s+/)),filter$2(identity$9),uniq);const computeClassNames$1=computeClassNames;var computeClassNamesDifference=function et(tt,nt){return[difference_1(nt,tt),difference_1(tt,nt)]};const computeClassNamesDifference$1=computeClassNamesDifference;var prevClassNames=new Map,handleClassNamesChange=function et(tt,nt){var rt=computeClassNames$1(nt),ot=computeClassNamesDifference$1(prevClassNames.get(tt),rt),st=_slicedToArray$1(ot,2),ut=st[0],ct=st[1];tt.current&&(forEach_1(ut,function(ft){return tt.current.classList.add(ft)}),forEach_1(ct,function(ft){return tt.current.classList.remove(ft)})),prevClassNames.set(tt,rt)};const handleClassNamesChange$1=handleClassNamesChange;var NodeRegistry=function et(){var tt=this;_classCallCheck$2(this,et),_defineProperty$d(this,"add",function(nt,rt){if(tt.nodes.has(nt)){var ot=tt.nodes.get(nt);ot.add(rt);return}tt.nodes.set(nt,new Set([rt]))}),_defineProperty$d(this,"del",function(nt,rt){if(!!tt.nodes.has(nt)){var ot=tt.nodes.get(nt);if(ot.size===1){tt.nodes.delete(nt);return}ot.delete(rt)}}),_defineProperty$d(this,"emit",function(nt,rt){rt(nt,tt.nodes.get(nt))}),this.nodes=new Map},nodeRegistry=new NodeRegistry,MountNode=function(et){_inherits$2(tt,et);function tt(){return _classCallCheck$2(this,tt),_possibleConstructorReturn$2(this,_getPrototypeOf$2(tt).apply(this,arguments))}return _createClass$2(tt,[{key:"shouldComponentUpdate",value:function(rt){var ot=rt.className,st=this.props.className;return ot!==st}},{key:"componentDidMount",value:function(){var rt=getNodeRefFromProps$1(this.props);nodeRegistry.add(rt,this),nodeRegistry.emit(rt,handleClassNamesChange$1)}},{key:"componentDidUpdate",value:function(){nodeRegistry.emit(getNodeRefFromProps$1(this.props),handleClassNamesChange$1)}},{key:"componentWillUnmount",value:function(){var rt=getNodeRefFromProps$1(this.props);nodeRegistry.del(rt,this),nodeRegistry.emit(rt,handleClassNamesChange$1)}},{key:"render",value:function(){return null}}]),tt}(react.exports.Component);_defineProperty$d(MountNode,"handledProps",["className","node"]);MountNode.propTypes={};function ModalHeader(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames(nt,"header"),st=getUnhandledProps$1(ModalHeader,et),ut=getElementType(ModalHeader,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ModalHeader.handledProps=["as","children","className","content"];ModalHeader.propTypes={};ModalHeader.create=createShorthandFactory(ModalHeader,function(et){return{content:et}});function ModalContent(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.image,st=et.scrolling,ut=classnames(nt,useKeyOnly(ot,"image"),useKeyOnly(st,"scrolling"),"content"),ct=getUnhandledProps$1(ModalContent,et),ft=getElementType(ModalContent,et);return Wt.createElement(ft,_extends$a({},ct,{className:ut}),isNil$1(tt)?rt:tt)}ModalContent.handledProps=["as","children","className","content","image","scrolling"];ModalContent.propTypes={};ModalContent.create=createShorthandFactory(ModalContent,function(et){return{content:et}});var ModalActions=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleButtonOverrides",function(ct){return{onClick:function(pt,ht){invoke_1(ct,"onClick",pt,ht),invoke_1(rt.props,"onActionClick",pt,ht)}}}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this,ot=this.props,st=ot.actions,ut=ot.children,ct=ot.className,ft=ot.content,pt=classnames("actions",ct),ht=getUnhandledProps$1(tt,this.props),mt=getElementType(tt,this.props);return isNil$1(ut)?isNil$1(ft)?Wt.createElement(mt,_extends$a({},ht,{className:pt}),map_1(st,function(yt){return Button$3.create(yt,{overrideProps:rt.handleButtonOverrides})})):Wt.createElement(mt,_extends$a({},ht,{className:pt}),ft):Wt.createElement(mt,_extends$a({},ht,{className:pt}),ut)}}]),tt}(react.exports.Component);_defineProperty$d(ModalActions,"handledProps",["actions","as","children","className","content","onActionClick"]);ModalActions.propTypes={};ModalActions.create=createShorthandFactory(ModalActions,function(et){return{actions:et}});function ModalDescription(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("description",nt),st=getUnhandledProps$1(ModalDescription,et),ut=getElementType(ModalDescription,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ModalDescription.handledProps=["as","children","className","content"];ModalDescription.propTypes={};var OFFSET=0,PADDING=50,canFit=function et(tt){var nt=tt.height+OFFSET,rt=tt.height+OFFSET,ot=window.innerHeight,st=ot/2,ut=-(rt/2),ct=PADDING,ft=st+ut;return ft+nt+ct<ot},getLegacyStyles=function et(tt,nt,rt){var ot=nt&&tt?-(rt.height/2):0,st=-(rt.width/2);return{marginLeft:st,marginTop:ot}},isLegacy=function et(){return!window.ActiveXObject&&"ActiveXObject"in window},Modal$2=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"legacy",isBrowser$5()&&isLegacy()),_defineProperty$d(_assertThisInitialized$2(rt),"ref",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"dimmerRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"latestDocumentMouseDownEvent",null),_defineProperty$d(_assertThisInitialized$2(rt),"getMountNode",function(){return isBrowser$5()?rt.props.mountNode||document.body:null}),_defineProperty$d(_assertThisInitialized$2(rt),"handleActionsOverrides",function(ct){return{onActionClick:function(pt,ht){invoke_1(ct,"onActionClick",pt,ht),invoke_1(rt.props,"onActionClick",pt,rt.props),rt.handleClose(pt)}}}),_defineProperty$d(_assertThisInitialized$2(rt),"handleClose",function(ct){invoke_1(rt.props,"onClose",ct,rt.props),rt.trySetState({open:!1})}),_defineProperty$d(_assertThisInitialized$2(rt),"handleDocumentMouseDown",function(ct){rt.latestDocumentMouseDownEvent=ct}),_defineProperty$d(_assertThisInitialized$2(rt),"handleDocumentClick",function(ct){var ft=rt.props.closeOnDimmerClick,pt=rt.latestDocumentMouseDownEvent;rt.latestDocumentMouseDownEvent=null,!(!ft||doesNodeContainClick$1(rt.ref.current,pt)||doesNodeContainClick$1(rt.ref.current,ct))&&(invoke_1(rt.props,"onClose",ct,rt.props),rt.trySetState({open:!1}))}),_defineProperty$d(_assertThisInitialized$2(rt),"handleIconOverrides",function(ct){return{onClick:function(pt){invoke_1(ct,"onClick",pt),rt.handleClose(pt)}}}),_defineProperty$d(_assertThisInitialized$2(rt),"handleOpen",function(ct){invoke_1(rt.props,"onOpen",ct,rt.props),rt.trySetState({open:!0})}),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalMount",function(ct){var ft=rt.props.eventPool;rt.setState({scrolling:!1}),rt.setPositionAndClassNames(),instance.sub("mousedown",rt.handleDocumentMouseDown,{pool:ft,target:rt.dimmerRef.current}),instance.sub("click",rt.handleDocumentClick,{pool:ft,target:rt.dimmerRef.current}),invoke_1(rt.props,"onMount",ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalUnmount",function(ct){var ft=rt.props.eventPool;cancelAnimationFrame(rt.animationRequestId),instance.unsub("mousedown",rt.handleDocumentMouseDown,{pool:ft,target:rt.dimmerRef.current}),instance.unsub("click",rt.handleDocumentClick,{pool:ft,target:rt.dimmerRef.current}),invoke_1(rt.props,"onUnmount",ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"setDimmerNodeStyle",function(){var ct=rt.dimmerRef.current;ct&&ct.style&&ct.style.display!=="flex"&&ct.style.setProperty("display","flex","important")}),_defineProperty$d(_assertThisInitialized$2(rt),"setPositionAndClassNames",function(){var ct=rt.props,ft=ct.centered,pt=ct.dimmer,ht,mt={};if(rt.ref.current){var yt=rt.ref.current.getBoundingClientRect(),vt=canFit(yt);ht=!vt;var Tt=rt.legacy?getLegacyStyles(vt,ft,yt):{};shallowequal(rt.state.legacyStyles,Tt)||(mt.legacyStyles=Tt),rt.state.scrolling!==ht&&(mt.scrolling=ht)}var Et=classnames(useKeyOnly(pt,"dimmable dimmed"),useKeyOnly(pt==="blurring"," blurring"),useKeyOnly(ht," scrolling"));rt.state.mountClasses!==Et&&(mt.mountClasses=Et),isEmpty_1(mt)||rt.setState(mt),rt.animationRequestId=requestAnimationFrame(rt.setPositionAndClassNames),rt.setDimmerNodeStyle()}),_defineProperty$d(_assertThisInitialized$2(rt),"renderContent",function(ct){var ft=rt.props,pt=ft.actions,ht=ft.basic,mt=ft.children,yt=ft.className,vt=ft.closeIcon,Tt=ft.content,Et=ft.header,xt=ft.mountNode,At=ft.size,Ct=ft.style,$t=rt.state,Ot=$t.legacyStyles,Rt=$t.mountClasses,It=$t.scrolling,kt=classnames("ui",At,useKeyOnly(ht,"basic"),useKeyOnly(rt.legacy,"legacy"),useKeyOnly(It,"scrolling"),"modal transition visible active",yt),Mt=getElementType(tt,rt.props),Ft=vt===!0?"close":vt,zt=Icon$4.create(Ft,{overrideProps:rt.handleIconOverrides});return Wt.createElement(Ref$1,{innerRef:rt.ref},Wt.createElement(Mt,_extends$a({},ct,{className:kt,style:_objectSpread$g({},Ot,Ct)}),Wt.createElement(MountNode,{className:Rt,node:xt}),zt,isNil$1(mt)?Wt.createElement(react.exports.Fragment,null,ModalHeader.create(Et,{autoGenerateKey:!1}),ModalContent.create(Tt,{autoGenerateKey:!1}),ModalActions.create(pt,{overrideProps:rt.handleActionsOverrides})):mt))}),rt}return _createClass$2(tt,[{key:"componentWillUnmount",value:function(){this.handlePortalUnmount()}},{key:"render",value:function(){var rt=this.state.open,ot=this.props,st=ot.centered,ut=ot.closeOnDocumentClick,ct=ot.dimmer,ft=ot.eventPool,pt=ot.trigger,ht=this.getMountNode();if(!isBrowser$5())return react.exports.isValidElement(pt)?pt:null;var mt=getUnhandledProps$1(tt,this.props),yt=Portal$4.handledProps,vt=reduce_1(mt,function(xt,At,Ct){return includes_1(yt,Ct)||(xt[Ct]=At),xt},{}),Tt=pick_1(mt,yt),Et=classnames("ui",ct==="inverted"&&"inverted",!st&&"top aligned","page modals dimmer transition visible active");return Wt.createElement(Portal$4,_extends$a({closeOnDocumentClick:ut},Tt,{trigger:pt,eventPool:ft,mountNode:ht,open:rt,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),Wt.createElement("div",{className:Et,ref:this.dimmerRef},this.renderContent(vt)))}}]),tt}(AutoControlledComponent);_defineProperty$d(Modal$2,"defaultProps",{centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"});_defineProperty$d(Modal$2,"autoControlledProps",["open"]);_defineProperty$d(Modal$2,"Header",ModalHeader);_defineProperty$d(Modal$2,"Content",ModalContent);_defineProperty$d(Modal$2,"Description",ModalDescription);_defineProperty$d(Modal$2,"Actions",ModalActions);_defineProperty$d(Modal$2,"handledProps",["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"]);Modal$2.propTypes={};const Modal$3=Modal$2;function MenuHeader(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("header",nt),st=getUnhandledProps$1(MenuHeader,et),ut=getElementType(MenuHeader,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}MenuHeader.handledProps=["as","children","className","content"];MenuHeader.propTypes={};function basePropertyOf$1(et){return function(tt){return et?.[tt]}}var _basePropertyOf=basePropertyOf$1,basePropertyOf=_basePropertyOf,deburredLetters={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},deburrLetter$1=basePropertyOf(deburredLetters),_deburrLetter=deburrLetter$1,deburrLetter=_deburrLetter,toString$7=toString_1,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsCombo$2="["+rsComboRange$2+"]",reComboMark=RegExp(rsCombo$2,"g");function deburr$1(et){return et=toString$7(et),et&&et.replace(reLatin,deburrLetter).replace(reComboMark,"")}var deburr_1=deburr$1,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords$1(et){return et.match(reAsciiWord)||[]}var _asciiWords=asciiWords$1,reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord$1(et){return reHasUnicodeWord.test(et)}var _hasUnicodeWord=hasUnicodeWord$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\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",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange$1="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['\u2019]",rsBreak="["+rsBreakRange+"]",rsCombo$1="["+rsComboRange$1+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange$1+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$1+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ$1="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsEmoji="(?:"+[rsDingbat,rsRegional$1,rsSurrPair$1].join("|")+")"+rsSeq$1,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords$1(et){return et.match(reUnicodeWord)||[]}var _unicodeWords=unicodeWords$1,asciiWords=_asciiWords,hasUnicodeWord=_hasUnicodeWord,toString$6=toString_1,unicodeWords=_unicodeWords;function words$1(et,tt,nt){return et=toString$6(et),tt=nt?void 0:tt,tt===void 0?hasUnicodeWord(et)?unicodeWords(et):asciiWords(et):et.match(tt)||[]}var words_1=words$1,arrayReduce=_arrayReduce,deburr=deburr_1,words=words_1,rsApos="['\u2019]",reApos=RegExp(rsApos,"g");function createCompounder$1(et){return function(tt){return arrayReduce(words(deburr(tt).replace(reApos,"")),et,"")}}var _createCompounder=createCompounder$1,castSlice=_castSlice,hasUnicode$1=_hasUnicode,stringToArray=_stringToArray,toString$5=toString_1;function createCaseFirst$1(et){return function(tt){tt=toString$5(tt);var nt=hasUnicode$1(tt)?stringToArray(tt):void 0,rt=nt?nt[0]:tt.charAt(0),ot=nt?castSlice(nt,1).join(""):tt.slice(1);return rt[et]()+ot}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst$1=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst$1,createCompounder=_createCompounder,upperFirst=upperFirst_1,startCase=createCompounder(function(et,tt,nt){return et+(nt?" ":"")+upperFirst(tt)}),startCase_1=startCase,MenuItem$4=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props.disabled;ft||invoke_1(rt.props,"onClick",ct,rt.props)}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.active,st=rt.children,ut=rt.className,ct=rt.color,ft=rt.content,pt=rt.disabled,ht=rt.fitted,mt=rt.header,yt=rt.icon,vt=rt.link,Tt=rt.name,Et=rt.onClick,xt=rt.position,At=classnames(ct,xt,useKeyOnly(ot,"active"),useKeyOnly(pt,"disabled"),useKeyOnly(yt===!0||yt&&!(Tt||ft),"icon"),useKeyOnly(mt,"header"),useKeyOnly(vt,"link"),useKeyOrValueAndKey(ht,"fitted"),"item",ut),Ct=getElementType(tt,this.props,function(){if(Et)return"a"}),$t=getUnhandledProps$1(tt,this.props);return isNil$1(st)?Wt.createElement(Ct,_extends$a({},$t,{className:At,onClick:this.handleClick}),Icon$4.create(yt,{autoGenerateKey:!1}),isNil$1(ft)?startCase_1(Tt):ft):Wt.createElement(Ct,_extends$a({},$t,{className:At,onClick:this.handleClick}),st)}}]),tt}(react.exports.Component);_defineProperty$d(MenuItem$4,"handledProps",["active","as","children","className","color","content","disabled","fitted","header","icon","index","link","name","onClick","position"]);MenuItem$4.propTypes={};MenuItem$4.create=createShorthandFactory(MenuItem$4,function(et){return{content:et,name:et}});function MenuMenu(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.position,st=classnames(ot,"menu",nt),ut=getUnhandledProps$1(MenuMenu,et),ct=getElementType(MenuMenu,et);return Wt.createElement(ct,_extends$a({},ut,{className:st}),isNil$1(tt)?rt:tt)}MenuMenu.handledProps=["as","children","className","content","position"];MenuMenu.propTypes={};var Menu$3=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleItemOverrides",function(ct){return{onClick:function(pt,ht){var mt=ht.index;rt.trySetState({activeIndex:mt}),invoke_1(ct,"onClick",pt,ht),invoke_1(rt.props,"onItemClick",pt,ht)}}}),rt}return _createClass$2(tt,[{key:"renderItems",value:function(){var rt=this,ot=this.props.items,st=this.state.activeIndex;return map_1(ot,function(ut,ct){return MenuItem$4.create(ut,{defaultProps:{active:parseInt(st,10)===ct,index:ct},overrideProps:rt.handleItemOverrides})})}},{key:"render",value:function(){var rt=this.props,ot=rt.attached,st=rt.borderless,ut=rt.children,ct=rt.className,ft=rt.color,pt=rt.compact,ht=rt.fixed,mt=rt.floated,yt=rt.fluid,vt=rt.icon,Tt=rt.inverted,Et=rt.pagination,xt=rt.pointing,At=rt.secondary,Ct=rt.size,$t=rt.stackable,Ot=rt.tabular,Rt=rt.text,It=rt.vertical,kt=rt.widths,Mt=classnames("ui",ft,Ct,useKeyOnly(st,"borderless"),useKeyOnly(pt,"compact"),useKeyOnly(yt,"fluid"),useKeyOnly(Tt,"inverted"),useKeyOnly(Et,"pagination"),useKeyOnly(xt,"pointing"),useKeyOnly(At,"secondary"),useKeyOnly($t,"stackable"),useKeyOnly(Rt,"text"),useKeyOnly(It,"vertical"),useKeyOrValueAndKey(ot,"attached"),useKeyOrValueAndKey(mt,"floated"),useKeyOrValueAndKey(vt,"icon"),useKeyOrValueAndKey(Ot,"tabular"),useValueAndKey(ht,"fixed"),useWidthProp(kt,"item"),ct,"menu"),Ft=getUnhandledProps$1(tt,this.props),zt=getElementType(tt,this.props);return Wt.createElement(zt,_extends$a({},Ft,{className:Mt}),isNil$1(ut)?this.renderItems():ut)}}]),tt}(AutoControlledComponent);_defineProperty$d(Menu$3,"autoControlledProps",["activeIndex"]);_defineProperty$d(Menu$3,"Header",MenuHeader);_defineProperty$d(Menu$3,"Item",MenuItem$4);_defineProperty$d(Menu$3,"Menu",MenuMenu);_defineProperty$d(Menu$3,"handledProps",["activeIndex","as","attached","borderless","children","className","color","compact","defaultActiveIndex","fixed","floated","fluid","icon","inverted","items","onItemClick","pagination","pointing","secondary","size","stackable","tabular","text","vertical","widths"]);Menu$3.propTypes={};Menu$3.create=createShorthandFactory(Menu$3,function(et){return{items:et}});const Menu$4=Menu$3;var baseSet=_baseSet;function set$6(et,tt,nt){return et==null?et:baseSet(et,tt,nt)}var set_1=set$6,Checkbox$2=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"inputRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"labelRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"canToggle",function(){var ct=rt.props,ft=ct.disabled,pt=ct.radio,ht=ct.readOnly,mt=rt.state.checked;return!ft&&!ht&&!(pt&&mt)}),_defineProperty$d(_assertThisInitialized$2(rt),"computeTabIndex",function(){var ct=rt.props,ft=ct.disabled,pt=ct.tabIndex;return isNil_1(pt)?ft?-1:0:pt}),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props.id,pt=rt.state,ht=pt.checked,mt=pt.indeterminate,yt=invoke_1(rt.inputRef.current,"contains",ct.target),vt=invoke_1(rt.labelRef.current,"contains",ct.target),Tt=!vt&&!yt,Et=!isNil_1(ft),xt=vt&&Et;xt||invoke_1(rt.props,"onClick",ct,_objectSpread$g({},rt.props,{checked:!ht,indeterminate:!!mt})),rt.isClickFromMouse&&(rt.isClickFromMouse=!1,vt&&!Et&&rt.handleChange(ct),Tt&&rt.handleChange(ct),vt&&Et&&ct.stopPropagation())}),_defineProperty$d(_assertThisInitialized$2(rt),"handleChange",function(ct){var ft=rt.state.checked;!rt.canToggle()||(invoke_1(rt.props,"onChange",ct,_objectSpread$g({},rt.props,{checked:!ft,indeterminate:!1})),rt.trySetState({checked:!ft,indeterminate:!1}))}),_defineProperty$d(_assertThisInitialized$2(rt),"handleMouseDown",function(ct){var ft=rt.state,pt=ft.checked,ht=ft.indeterminate;invoke_1(rt.props,"onMouseDown",ct,_objectSpread$g({},rt.props,{checked:!!pt,indeterminate:!!ht})),ct.defaultPrevented||invoke_1(rt.inputRef.current,"focus"),ct.preventDefault()}),_defineProperty$d(_assertThisInitialized$2(rt),"handleMouseUp",function(ct){var ft=rt.state,pt=ft.checked,ht=ft.indeterminate;rt.isClickFromMouse=!0,invoke_1(rt.props,"onMouseUp",ct,_objectSpread$g({},rt.props,{checked:!!pt,indeterminate:!!ht}))}),_defineProperty$d(_assertThisInitialized$2(rt),"setIndeterminate",function(){var ct=rt.state.indeterminate;set_1(rt.inputRef,"current.indeterminate",!!ct)}),rt}return _createClass$2(tt,[{key:"componentDidMount",value:function(){this.setIndeterminate()}},{key:"componentDidUpdate",value:function(){this.setIndeterminate()}},{key:"render",value:function(){var rt=this.props,ot=rt.className,st=rt.disabled,ut=rt.label,ct=rt.id,ft=rt.name,pt=rt.radio,ht=rt.readOnly,mt=rt.slider,yt=rt.toggle,vt=rt.type,Tt=rt.value,Et=this.state,xt=Et.checked,At=Et.indeterminate,Ct=classnames("ui",useKeyOnly(xt,"checked"),useKeyOnly(st,"disabled"),useKeyOnly(At,"indeterminate"),useKeyOnly(isNil_1(ut),"fitted"),useKeyOnly(pt,"radio"),useKeyOnly(ht,"read-only"),useKeyOnly(mt,"slider"),useKeyOnly(yt,"toggle"),"checkbox",ot),$t=getUnhandledProps$1(tt,this.props),Ot=getElementType(tt,this.props),Rt=partitionHTMLProps($t,{htmlProps:htmlInputAttrs}),It=_slicedToArray$1(Rt,2),kt=It[0],Mt=It[1],Ft=createHTMLLabel(ut,{defaultProps:{htmlFor:ct},autoGenerateKey:!1})||Wt.createElement("label",{htmlFor:ct});return Wt.createElement(Ot,_extends$a({},Mt,{className:Ct,onClick:this.handleClick,onChange:this.handleChange,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp}),Wt.createElement(Ref$1,{innerRef:this.inputRef},Wt.createElement("input",_extends$a({},kt,{checked:xt,className:"hidden",disabled:st,id:ct,name:ft,readOnly:!0,tabIndex:this.computeTabIndex(),type:vt,value:Tt}))),Wt.createElement(Ref$1,{innerRef:this.labelRef},Ft))}}]),tt}(AutoControlledComponent);_defineProperty$d(Checkbox$2,"defaultProps",{type:"checkbox"});_defineProperty$d(Checkbox$2,"autoControlledProps",["checked","indeterminate"]);_defineProperty$d(Checkbox$2,"handledProps",["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","onMouseUp","radio","readOnly","slider","tabIndex","toggle","type","value"]);Checkbox$2.propTypes={};function Radio$2(et){var tt=et.slider,nt=et.toggle,rt=et.type,ot=getUnhandledProps$1(Radio$2,et),st=!(tt||nt)||void 0;return Wt.createElement(Checkbox$2,_extends$a({},ot,{type:rt,radio:st,slider:tt,toggle:nt}))}Radio$2.handledProps=["slider","toggle","type"];Radio$2.propTypes={};Radio$2.defaultProps={type:"radio"};function _superPropBase(et,tt){for(;!Object.prototype.hasOwnProperty.call(et,tt)&&(et=_getPrototypeOf$2(et),et!==null););return et}function _get(){return typeof Reflect<"u"&&Reflect.get?_get=Reflect.get.bind():_get=function(tt,nt,rt){var ot=_superPropBase(tt,nt);if(!!ot){var st=Object.getOwnPropertyDescriptor(ot,nt);return st.get?st.get.call(arguments.length<3?tt:rt):st.value}},_get.apply(this,arguments)}function arrayEvery$1(et,tt){for(var nt=-1,rt=et==null?0:et.length;++nt<rt;)if(!tt(et[nt],nt,et))return!1;return!0}var _arrayEvery=arrayEvery$1,baseEach=_baseEach;function baseEvery$1(et,tt){var nt=!0;return baseEach(et,function(rt,ot,st){return nt=!!tt(rt,ot,st),nt}),nt}var _baseEvery=baseEvery$1,arrayEvery=_arrayEvery,baseEvery=_baseEvery,baseIteratee=_baseIteratee,isArray$3=isArray_1,isIterateeCall$1=_isIterateeCall;function every$1(et,tt,nt){var rt=isArray$3(et)?arrayEvery:baseEvery;return nt&&isIterateeCall$1(et,tt,nt)&&(tt=void 0),rt(et,baseIteratee(tt))}var every_1=every$1,toString$4=toString_1,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);function escapeRegExp$1(et){return et=toString$4(et),et&&reHasRegExpChar.test(et)?et.replace(reRegExpChar,"\\$&"):et}var escapeRegExp_1=escapeRegExp$1,baseSlice=_baseSlice,toInteger=toInteger_1;function dropRight(et,tt,nt){var rt=et==null?0:et.length;return rt?(tt=nt||tt===void 0?1:toInteger(tt),tt=rt-tt,baseSlice(et,0,tt<0?0:tt)):[]}var dropRight_1=dropRight,baseProperty=_baseProperty,asciiSize$1=baseProperty("length"),_asciiSize=asciiSize$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeSize$1(et){for(var tt=reUnicode.lastIndex=0;reUnicode.test(et);)++tt;return tt}var _unicodeSize=unicodeSize$1,asciiSize=_asciiSize,hasUnicode=_hasUnicode,unicodeSize=_unicodeSize;function stringSize$1(et){return hasUnicode(et)?unicodeSize(et):asciiSize(et)}var _stringSize=stringSize$1,baseKeys=_baseKeys,getTag=_getTag,isArrayLike=isArrayLike_1,isString$1=isString_1,stringSize=_stringSize,mapTag="[object Map]",setTag="[object Set]";function size$3(et){if(et==null)return 0;if(isArrayLike(et))return isString$1(et)?stringSize(et):et.length;var tt=getTag(et);return tt==mapTag||tt==setTag?et.size:baseKeys(et).length}var size_1=size$3,baseFlatten=_baseFlatten,baseRest$1=_baseRest,baseUniq=_baseUniq,isArrayLikeObject$1=isArrayLikeObject_1,union$1=baseRest$1(function(et){return baseUniq(baseFlatten(et,1,isArrayLikeObject$1,!0))}),union_1=union$1;function DropdownDivider(et){var tt=et.className,nt=classnames("divider",tt),rt=getUnhandledProps$1(DropdownDivider,et),ot=getElementType(DropdownDivider,et);return Wt.createElement(ot,_extends$a({},rt,{className:nt}))}DropdownDivider.handledProps=["as","className"];DropdownDivider.propTypes={};var Flag=function(et){_inherits$2(tt,et);function tt(){return _classCallCheck$2(this,tt),_possibleConstructorReturn$2(this,_getPrototypeOf$2(tt).apply(this,arguments))}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.className,st=rt.name,ut=classnames(st,"flag",ot),ct=getUnhandledProps$1(tt,this.props),ft=getElementType(tt,this.props);return Wt.createElement(ft,_extends$a({},ct,{className:ut}))}}]),tt}(react.exports.PureComponent);_defineProperty$d(Flag,"defaultProps",{as:"i"});_defineProperty$d(Flag,"handledProps",["as","className","name"]);Flag.propTypes={};Flag.create=createShorthandFactory(Flag,function(et){return{name:et}});const Flag$1=Flag;var DropdownItem=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){invoke_1(rt.props,"onClick",ct,rt.props)}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.active,st=rt.children,ut=rt.className,ct=rt.content,ft=rt.disabled,pt=rt.description,ht=rt.flag,mt=rt.icon,yt=rt.image,vt=rt.label,Tt=rt.selected,Et=rt.text,xt=classnames(useKeyOnly(ot,"active"),useKeyOnly(ft,"disabled"),useKeyOnly(Tt,"selected"),"item",ut),At=isNil_1(mt)?someByType(st,"DropdownMenu")&&"dropdown":mt,Ct=getUnhandledProps$1(tt,this.props),$t=getElementType(tt,this.props),Ot={role:"option","aria-disabled":ft,"aria-checked":ot,"aria-selected":Tt};if(!isNil$1(st))return Wt.createElement($t,_extends$a({},Ct,Ot,{className:xt,onClick:this.handleClick}),st);var Rt=Flag$1.create(ht,{autoGenerateKey:!1}),It=Icon$4.create(At,{autoGenerateKey:!1}),kt=Image$1.create(yt,{autoGenerateKey:!1}),Mt=Label$4.create(vt,{autoGenerateKey:!1}),Ft=createShorthand("span",function(Vt){return{children:Vt}},pt,{defaultProps:{className:"description"},autoGenerateKey:!1}),zt=createShorthand("span",function(Vt){return{children:Vt}},isNil$1(ct)?Et:ct,{defaultProps:{className:"text"},autoGenerateKey:!1});return Wt.createElement($t,_extends$a({},Ct,Ot,{className:xt,onClick:this.handleClick}),kt,It,Rt,Mt,Ft,zt)}}]),tt}(react.exports.Component);_defineProperty$d(DropdownItem,"handledProps",["active","as","children","className","content","description","disabled","flag","icon","image","label","onClick","selected","text","value"]);DropdownItem.propTypes={};DropdownItem.create=createShorthandFactory(DropdownItem,function(et){return et});const DropdownItem$1=DropdownItem;function DropdownHeader(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.icon,st=classnames("header",nt),ut=getUnhandledProps$1(DropdownHeader,et),ct=getElementType(DropdownHeader,et);return isNil$1(tt)?Wt.createElement(ct,_extends$a({},ut,{className:st}),Icon$4.create(ot,{autoGenerateKey:!1}),rt):Wt.createElement(ct,_extends$a({},ut,{className:st}),tt)}DropdownHeader.handledProps=["as","children","className","content","icon"];DropdownHeader.propTypes={};DropdownHeader.create=createShorthandFactory(DropdownHeader,function(et){return{content:et}});function DropdownMenu(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.direction,st=et.open,ut=et.scrolling,ct=classnames(ot,useKeyOnly(st,"visible"),useKeyOnly(ut,"scrolling"),"menu transition",nt),ft=getUnhandledProps$1(DropdownMenu,et),pt=getElementType(DropdownMenu,et);return Wt.createElement(pt,_extends$a({},ft,{className:ct}),isNil$1(tt)?rt:tt)}DropdownMenu.handledProps=["as","children","className","content","direction","open","scrolling"];DropdownMenu.propTypes={};var DropdownSearchInput=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleChange",function(ct){var ft=get_1(ct,"target.value");invoke_1(rt.props,"onChange",ct,_objectSpread$g({},rt.props,{value:ft}))}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.autoComplete,st=rt.className,ut=rt.tabIndex,ct=rt.type,ft=rt.value,pt=classnames("search",st),ht=getUnhandledProps$1(tt,this.props);return Wt.createElement("input",_extends$a({},ht,{"aria-autocomplete":"list",autoComplete:ot,className:pt,onChange:this.handleChange,tabIndex:ut,type:ct,value:ft}))}}]),tt}(react.exports.Component);_defineProperty$d(DropdownSearchInput,"defaultProps",{autoComplete:"off",type:"text"});_defineProperty$d(DropdownSearchInput,"handledProps",["as","autoComplete","className","tabIndex","type","value"]);DropdownSearchInput.propTypes={};DropdownSearchInput.create=createShorthandFactory(DropdownSearchInput,function(et){return{type:et}});const DropdownSearchInput$1=DropdownSearchInput;var getKeyOrValue=function et(tt,nt){return isNil_1(tt)?nt:tt},Dropdown=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"searchRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"sizerRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"ref",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"handleChange",function(ct,ft){invoke_1(rt.props,"onChange",ct,_objectSpread$g({},rt.props,{value:ft}))}),_defineProperty$d(_assertThisInitialized$2(rt),"closeOnChange",function(ct){var ft=rt.props,pt=ft.closeOnChange,ht=ft.multiple,mt=isUndefined_1(pt)?!ht:pt;mt&&rt.close(ct,noop_1)}),_defineProperty$d(_assertThisInitialized$2(rt),"closeOnEscape",function(ct){!rt.props.closeOnEscape||keyboardKey_1.getCode(ct)===keyboardKey_1.Escape&&(ct.preventDefault(),rt.close(ct))}),_defineProperty$d(_assertThisInitialized$2(rt),"moveSelectionOnKeyDown",function(ct){var ft,pt=rt.props,ht=pt.multiple,mt=pt.selectOnNavigation,yt=(ft={},_defineProperty$d(ft,keyboardKey_1.ArrowDown,1),_defineProperty$d(ft,keyboardKey_1.ArrowUp,-1),ft),vt=yt[keyboardKey_1.getCode(ct)];vt!==void 0&&(ct.preventDefault(),rt.moveSelectionBy(vt),!ht&&mt&&rt.makeSelectedItemActive(ct))}),_defineProperty$d(_assertThisInitialized$2(rt),"openOnSpace",function(ct){keyboardKey_1.getCode(ct)===keyboardKey_1.Spacebar&&(ct.preventDefault(),rt.open(ct))}),_defineProperty$d(_assertThisInitialized$2(rt),"openOnArrow",function(ct){var ft=keyboardKey_1.getCode(ct);!includes_1([keyboardKey_1.ArrowDown,keyboardKey_1.ArrowUp],ft)||rt.state.open||(ct.preventDefault(),rt.open(ct))}),_defineProperty$d(_assertThisInitialized$2(rt),"makeSelectedItemActive",function(ct){var ft=rt.state,pt=ft.open,ht=ft.value,mt=rt.props.multiple,yt=rt.getSelectedItem(),vt=get_1(yt,"value");if(!(isNil_1(vt)||!pt)){var Tt=mt?union_1(rt.state.value,[vt]):vt,Et=mt?!!difference_1(Tt,ht).length:Tt!==ht;Et&&(rt.setValue(Tt),rt.setSelectedIndex(Tt),rt.handleChange(ct,Tt),yt["data-additional"]&&invoke_1(rt.props,"onAddItem",ct,_objectSpread$g({},rt.props,{value:vt})))}}),_defineProperty$d(_assertThisInitialized$2(rt),"selectItemOnEnter",function(ct){var ft=rt.props.search,pt=keyboardKey_1.getCode(ct)===keyboardKey_1.Enter||!ft&&keyboardKey_1.getCode(ct)===keyboardKey_1.Spacebar;if(!!pt){ct.preventDefault();var ht=size_1(rt.getMenuOptions());ft&&ht===0||(rt.makeSelectedItemActive(ct),rt.closeOnChange(ct),rt.clearSearchQuery(),ft&&invoke_1(rt.searchRef.current,"focus"))}}),_defineProperty$d(_assertThisInitialized$2(rt),"removeItemOnBackspace",function(ct){var ft=rt.props,pt=ft.multiple,ht=ft.search,mt=rt.state,yt=mt.searchQuery,vt=mt.value;if(keyboardKey_1.getCode(ct)===keyboardKey_1.Backspace&&!(yt||!ht||!pt||isEmpty_1(vt))){ct.preventDefault();var Tt=dropRight_1(vt);rt.setValue(Tt),rt.setSelectedIndex(Tt),rt.handleChange(ct,Tt)}}),_defineProperty$d(_assertThisInitialized$2(rt),"closeOnDocumentClick",function(ct){!rt.props.closeOnBlur||rt.ref.current&&doesNodeContainClick$1(rt.ref.current,ct)||rt.close()}),_defineProperty$d(_assertThisInitialized$2(rt),"handleMouseDown",function(ct){rt.isMouseDown=!0,invoke_1(rt.props,"onMouseDown",ct,rt.props),document.addEventListener("mouseup",rt.handleDocumentMouseUp)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleDocumentMouseUp",function(){rt.isMouseDown=!1,document.removeEventListener("mouseup",rt.handleDocumentMouseUp)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props,pt=ft.minCharacters,ht=ft.search,mt=rt.state,yt=mt.open,vt=mt.searchQuery;if(invoke_1(rt.props,"onClick",ct,rt.props),ct.stopPropagation(),!ht)return rt.toggle(ct);if(yt){invoke_1(rt.searchRef.current,"focus");return}if(vt.length>=pt||pt===1){rt.open(ct);return}invoke_1(rt.searchRef.current,"focus")}),_defineProperty$d(_assertThisInitialized$2(rt),"handleIconClick",function(ct){var ft=rt.props.clearable,pt=rt.hasValue();invoke_1(rt.props,"onClick",ct,rt.props),ct.stopPropagation(),ft&&pt?rt.clearValue(ct):rt.toggle(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleItemClick",function(ct,ft){var pt=rt.props,ht=pt.multiple,mt=pt.search,yt=rt.state.value,vt=ft.value;if(ct.stopPropagation(),(ht||ft.disabled)&&ct.nativeEvent.stopImmediatePropagation(),!ft.disabled){var Tt=ft["data-additional"],Et=ht?union_1(rt.state.value,[vt]):vt,xt=ht?!!difference_1(Et,yt).length:Et!==yt;xt&&(rt.setValue(Et),rt.setSelectedIndex(vt),rt.handleChange(ct,Et)),rt.clearSearchQuery(vt),invoke_1(mt?rt.searchRef.current:rt.ref.current,"focus"),rt.closeOnChange(ct),Tt&&invoke_1(rt.props,"onAddItem",ct,_objectSpread$g({},rt.props,{value:vt}))}}),_defineProperty$d(_assertThisInitialized$2(rt),"handleFocus",function(ct){var ft=rt.state.focus;ft||(invoke_1(rt.props,"onFocus",ct,rt.props),rt.setState({focus:!0}))}),_defineProperty$d(_assertThisInitialized$2(rt),"handleBlur",function(ct){var ft=get_1(ct,"currentTarget");if(!(ft&&ft.contains(document.activeElement))){var pt=rt.props,ht=pt.closeOnBlur,mt=pt.multiple,yt=pt.selectOnBlur;rt.isMouseDown||(invoke_1(rt.props,"onBlur",ct,rt.props),yt&&!mt&&(rt.makeSelectedItemActive(ct),ht&&rt.close()),rt.setState({focus:!1}),rt.clearSearchQuery())}}),_defineProperty$d(_assertThisInitialized$2(rt),"handleSearchChange",function(ct,ft){var pt=ft.value;ct.stopPropagation();var ht=rt.props.minCharacters,mt=rt.state.open,yt=pt;if(invoke_1(rt.props,"onSearchChange",ct,_objectSpread$g({},rt.props,{searchQuery:yt})),rt.trySetState({searchQuery:yt,selectedIndex:0}),!mt&&yt.length>=ht){rt.open();return}mt&&ht!==1&&yt.length<ht&&rt.close()}),_defineProperty$d(_assertThisInitialized$2(rt),"getKeyAndValues",function(ct){return ct&&ct.map(function(ft){return pick_1(ft,["key","value"])})}),_defineProperty$d(_assertThisInitialized$2(rt),"getMenuOptions",function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rt.state.value,ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rt.props.options,pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rt.state.searchQuery,ht=rt.props,mt=ht.additionLabel,yt=ht.additionPosition,vt=ht.allowAdditions,Tt=ht.deburr,Et=ht.multiple,xt=ht.search,At=ft;if(Et&&(At=filter_1(At,function(It){return!includes_1(ct,It.value)})),xt&&pt)if(isFunction_1(xt))At=xt(At,pt);else{var Ct=Tt?deburr_1(pt):pt,$t=new RegExp(escapeRegExp_1(Ct),"i");At=filter_1(At,function(It){return $t.test(Tt?deburr_1(It.text):It.text)})}if(vt&&xt&&pt&&!some_1(At,{text:pt})){var Ot=Wt.isValidElement(mt)?Wt.cloneElement(mt,{key:"addition-label"}):mt||"",Rt={key:"addition",text:[Ot,Wt.createElement("b",{key:"addition-query"},pt)],value:pt,className:"addition","data-additional":!0};yt==="top"?At.unshift(Rt):At.push(Rt)}return At}),_defineProperty$d(_assertThisInitialized$2(rt),"getSelectedItem",function(){var ct=rt.state.selectedIndex,ft=rt.getMenuOptions();return get_1(ft,"[".concat(ct,"]"))}),_defineProperty$d(_assertThisInitialized$2(rt),"getEnabledIndices",function(ct){var ft=ct||rt.getMenuOptions();return reduce_1(ft,function(pt,ht,mt){return ht.disabled||pt.push(mt),pt},[])}),_defineProperty$d(_assertThisInitialized$2(rt),"getItemByValue",function(ct){var ft=rt.props.options;return find_1$2(ft,{value:ct})}),_defineProperty$d(_assertThisInitialized$2(rt),"getMenuItemIndexByValue",function(ct,ft){var pt=ft||rt.getMenuOptions();return findIndex_1(pt,["value",ct])}),_defineProperty$d(_assertThisInitialized$2(rt),"getDropdownAriaOptions",function(){var ct=rt.props,ft=ct.loading,pt=ct.disabled,ht=ct.search,mt=ct.multiple,yt=rt.state.open,vt={role:ht?"combobox":"listbox","aria-busy":ft,"aria-disabled":pt,"aria-expanded":!!yt};return vt.role==="listbox"&&(vt["aria-multiselectable"]=mt),vt}),_defineProperty$d(_assertThisInitialized$2(rt),"clearSearchQuery",function(ct){var ft=rt.state.searchQuery;ft===void 0||ft===""||(rt.trySetState({searchQuery:""}),rt.setSelectedIndex(ct,void 0,""))}),_defineProperty$d(_assertThisInitialized$2(rt),"setValue",function(ct){rt.trySetState({value:ct})}),_defineProperty$d(_assertThisInitialized$2(rt),"setSelectedIndex",function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rt.state.value,ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rt.props.options,pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rt.state.searchQuery,ht=rt.props.multiple,mt=rt.state.selectedIndex,yt=rt.getMenuOptions(ct,ft,pt),vt=rt.getEnabledIndices(yt),Tt;if(!mt||mt<0){var Et=vt[0];Tt=ht?Et:rt.getMenuItemIndexByValue(ct,yt)||vt[0]}else if(ht)mt>=yt.length-1&&(Tt=vt[vt.length-1]);else{var xt=rt.getMenuItemIndexByValue(ct,yt);Tt=includes_1(vt,xt)?xt:void 0}(!Tt||Tt<0)&&(Tt=vt[0]),rt.setState({selectedIndex:Tt})}),_defineProperty$d(_assertThisInitialized$2(rt),"handleLabelClick",function(ct,ft){ct.stopPropagation(),rt.setState({selectedLabel:ft.value}),invoke_1(rt.props,"onLabelClick",ct,ft)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleLabelRemove",function(ct,ft){ct.stopPropagation();var pt=rt.state.value,ht=without_1(pt,ft.value);rt.setValue(ht),rt.setSelectedIndex(ht),rt.handleChange(ct,ht)}),_defineProperty$d(_assertThisInitialized$2(rt),"moveSelectionBy",function(ct){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rt.state.selectedIndex,pt=rt.getMenuOptions();if(!(pt===void 0||every_1(pt,"disabled"))){var ht=pt.length-1,mt=rt.props.wrapSelection,yt=ft+ct;if(!mt&&(yt>ht||yt<0)?yt=ft:yt>ht?yt=0:yt<0&&(yt=ht),pt[yt].disabled){rt.moveSelectionBy(ct,yt);return}rt.setState({selectedIndex:yt}),rt.scrollSelectedItemIntoView()}}),_defineProperty$d(_assertThisInitialized$2(rt),"handleIconOverrides",function(ct){var ft=rt.props.clearable,pt=classnames(ft&&rt.hasValue()&&"clear",ct.className);return{className:pt,onClick:function(mt){invoke_1(ct,"onClick",mt,ct),rt.handleIconClick(mt)}}}),_defineProperty$d(_assertThisInitialized$2(rt),"clearValue",function(ct){var ft=rt.props.multiple,pt=ft?[]:"";rt.setValue(pt),rt.setSelectedIndex(pt),rt.handleChange(ct,pt)}),_defineProperty$d(_assertThisInitialized$2(rt),"computeSearchInputTabIndex",function(){var ct=rt.props,ft=ct.disabled,pt=ct.tabIndex;return isNil_1(pt)?ft?-1:0:pt}),_defineProperty$d(_assertThisInitialized$2(rt),"computeSearchInputWidth",function(){var ct=rt.state.searchQuery;if(rt.sizerRef.current&&ct){rt.sizerRef.current.style.display="inline",rt.sizerRef.current.textContent=ct;var ft=Math.ceil(rt.sizerRef.current.getBoundingClientRect().width);return rt.sizerRef.current.style.removeProperty("display"),ft}}),_defineProperty$d(_assertThisInitialized$2(rt),"computeTabIndex",function(){var ct=rt.props,ft=ct.disabled,pt=ct.search,ht=ct.tabIndex;if(!pt)return ft?-1:isNil_1(ht)?0:ht}),_defineProperty$d(_assertThisInitialized$2(rt),"handleSearchInputOverrides",function(ct){return{onChange:function(pt,ht){invoke_1(ct,"onChange",pt,ht),rt.handleSearchChange(pt,ht)}}}),_defineProperty$d(_assertThisInitialized$2(rt),"hasValue",function(){var ct=rt.props.multiple,ft=rt.state.value;return ct?!isEmpty_1(ft):!isNil_1(ft)&&ft!==""}),_defineProperty$d(_assertThisInitialized$2(rt),"scrollSelectedItemIntoView",function(){if(!!rt.ref.current){var ct=rt.ref.current.querySelector(".menu.visible");if(!!ct){var ft=ct.querySelector(".item.selected");if(!!ft){var pt=ft.offsetTop<ct.scrollTop,ht=ft.offsetTop+ft.clientHeight>ct.scrollTop+ct.clientHeight;pt?ct.scrollTop=ft.offsetTop:ht&&(ct.scrollTop=ft.offsetTop+ft.clientHeight-ct.clientHeight)}}}}),_defineProperty$d(_assertThisInitialized$2(rt),"setOpenDirection",function(){if(!!rt.ref.current){var ct=rt.ref.current.querySelector(".menu.visible");if(!!ct){var ft=rt.ref.current.getBoundingClientRect(),pt=ct.clientHeight,ht=document.documentElement.clientHeight-ft.top-ft.height-pt,mt=ft.top-pt,yt=ht<0&&mt>ht;!yt!=!rt.state.upward&&rt.trySetState({upward:yt})}}}),_defineProperty$d(_assertThisInitialized$2(rt),"open",function(ct){var ft=rt.props,pt=ft.disabled;ft.open;var ht=ft.search;pt||(ht&&invoke_1(rt.searchRef.current,"focus"),invoke_1(rt.props,"onOpen",ct,rt.props),rt.trySetState({open:!0}),rt.scrollSelectedItemIntoView())}),_defineProperty$d(_assertThisInitialized$2(rt),"close",function(ct){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rt.handleClose,pt=rt.state.open;pt&&(invoke_1(rt.props,"onClose",ct,rt.props),rt.trySetState({open:!1},ft))}),_defineProperty$d(_assertThisInitialized$2(rt),"handleClose",function(){var ct=document.activeElement===rt.searchRef.current;!ct&&rt.ref.current&&rt.ref.current.blur();var ft=document.activeElement===rt.ref.current,pt=ct||ft;rt.setState({focus:pt})}),_defineProperty$d(_assertThisInitialized$2(rt),"toggle",function(ct){return rt.state.open?rt.close(ct):rt.open(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"renderText",function(){var ct=rt.props,ft=ct.multiple,pt=ct.placeholder,ht=ct.search,mt=ct.text,yt=rt.state,vt=yt.searchQuery,Tt=yt.value,Et=yt.open,xt=rt.hasValue(),At=classnames(pt&&!xt&&"default","text",ht&&vt&&"filtered"),Ct=pt;return mt?Ct=mt:Et&&!ft?Ct=get_1(rt.getSelectedItem(),"text"):xt&&(Ct=get_1(rt.getItemByValue(Tt),"text")),Wt.createElement("div",{className:At,role:"alert","aria-live":"polite","aria-atomic":!0},Ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"renderSearchInput",function(){var ct=rt.props,ft=ct.search,pt=ct.searchInput,ht=rt.state.searchQuery;return ft&&Wt.createElement(Ref$1,{innerRef:rt.searchRef},DropdownSearchInput$1.create(pt,{defaultProps:{style:{width:rt.computeSearchInputWidth()},tabIndex:rt.computeSearchInputTabIndex(),value:ht},overrideProps:rt.handleSearchInputOverrides}))}),_defineProperty$d(_assertThisInitialized$2(rt),"renderSearchSizer",function(){var ct=rt.props,ft=ct.search,pt=ct.multiple;return ft&&pt&&Wt.createElement("span",{className:"sizer",ref:rt.sizerRef})}),_defineProperty$d(_assertThisInitialized$2(rt),"renderLabels",function(){var ct=rt.props,ft=ct.multiple,pt=ct.renderLabel,ht=rt.state,mt=ht.selectedLabel,yt=ht.value;if(!(!ft||isEmpty_1(yt))){var vt=map_1(yt,rt.getItemByValue);return map_1(compact_1(vt),function(Tt,Et){var xt={active:Tt.value===mt,as:"a",key:getKeyOrValue(Tt.key,Tt.value),onClick:rt.handleLabelClick,onRemove:rt.handleLabelRemove,value:Tt.value};return Label$4.create(pt(Tt,Et,xt),{defaultProps:xt})})}}),_defineProperty$d(_assertThisInitialized$2(rt),"renderOptions",function(){var ct=rt.props,ft=ct.lazyLoad,pt=ct.multiple,ht=ct.search,mt=ct.noResultsMessage,yt=rt.state,vt=yt.open,Tt=yt.selectedIndex,Et=yt.value;if(ft&&!vt)return null;var xt=rt.getMenuOptions();if(mt!==null&&ht&&isEmpty_1(xt))return Wt.createElement("div",{className:"message"},mt);var At=pt?function(Ct){return includes_1(Et,Ct)}:function(Ct){return Ct===Et};return map_1(xt,function(Ct,$t){return DropdownItem$1.create(_objectSpread$g({active:At(Ct.value),onClick:rt.handleItemClick,selected:Tt===$t},Ct,{key:getKeyOrValue(Ct.key,Ct.value),style:_objectSpread$g({},Ct.style,{pointerEvents:"all"})}))})}),_defineProperty$d(_assertThisInitialized$2(rt),"renderMenu",function(){var ct=rt.props,ft=ct.children,pt=ct.direction,ht=ct.header,mt=rt.state.open,yt=rt.getDropdownMenuAriaOptions();if(!isNil$1(ft)){var vt=react.exports.Children.only(ft),Tt=classnames(pt,useKeyOnly(mt,"visible"),vt.props.className);return react.exports.cloneElement(vt,_objectSpread$g({className:Tt},yt))}return Wt.createElement(DropdownMenu,_extends$a({},yt,{direction:pt,open:mt}),DropdownHeader.create(ht,{autoGenerateKey:!1}),rt.renderOptions())}),rt}return _createClass$2(tt,[{key:"getInitialAutoControlledState",value:function(){return{focus:!1,searchQuery:""}}},{key:"UNSAFE_componentWillMount",value:function(){var rt=this.state,ot=rt.open,st=rt.value;this.setValue(st),this.setSelectedIndex(st),ot&&this.open()}},{key:"UNSAFE_componentWillReceiveProps",value:function(rt){_get(_getPrototypeOf$2(tt.prototype),"UNSAFE_componentWillReceiveProps",this).call(this,rt),shallowequal(rt.value,this.props.value)||(this.setValue(rt.value),this.setSelectedIndex(rt.value)),isEqual_1(this.getKeyAndValues(rt.options),this.getKeyAndValues(this.props.options))||this.setSelectedIndex(void 0,rt.options)}},{key:"shouldComponentUpdate",value:function(rt,ot){return!shallowequal(rt,this.props)||!shallowequal(ot,this.state)}},{key:"componentDidUpdate",value:function(rt,ot){var st=this.props,ut=st.closeOnBlur,ct=st.minCharacters,ft=st.openOnFocus,pt=st.search;if(!ot.focus&&this.state.focus){if(!this.isMouseDown){var ht=!pt||pt&&ct===1&&!this.state.open;ft&&ht&&this.open()}}else ot.focus&&!this.state.focus&&!this.isMouseDown&&ut&&this.close();!ot.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):ot.open&&this.state.open}},{key:"getDropdownMenuAriaOptions",value:function(){var rt=this.props,ot=rt.search,st=rt.multiple,ut={};return ot&&(ut["aria-multiselectable"]=st,ut.role="listbox"),ut}},{key:"render",value:function(){var rt=this.props,ot=rt.basic,st=rt.button,ut=rt.className,ct=rt.compact,ft=rt.disabled,pt=rt.error,ht=rt.fluid,mt=rt.floating,yt=rt.icon,vt=rt.inline,Tt=rt.item,Et=rt.labeled,xt=rt.loading,At=rt.multiple,Ct=rt.pointing,$t=rt.search,Ot=rt.selection,Rt=rt.scrolling,It=rt.simple,kt=rt.trigger,Mt=this.state,Ft=Mt.focus,zt=Mt.open,Vt=Mt.upward,Zt=classnames("ui",useKeyOnly(zt,"active visible"),useKeyOnly(ft,"disabled"),useKeyOnly(pt,"error"),useKeyOnly(xt,"loading"),useKeyOnly(ot,"basic"),useKeyOnly(st,"button"),useKeyOnly(ct,"compact"),useKeyOnly(ht,"fluid"),useKeyOnly(mt,"floating"),useKeyOnly(vt,"inline"),useKeyOnly(Et,"labeled"),useKeyOnly(Tt,"item"),useKeyOnly(At,"multiple"),useKeyOnly($t,"search"),useKeyOnly(Ot,"selection"),useKeyOnly(It,"simple"),useKeyOnly(Rt,"scrolling"),useKeyOnly(Vt,"upward"),useKeyOrValueAndKey(Ct,"pointing"),"dropdown",ut),Ut=getUnhandledProps$1(tt,this.props),Xt=getElementType(tt,this.props),Jt=this.getDropdownAriaOptions(Xt,this.props);return Wt.createElement(Ref$1,{innerRef:this.ref},Wt.createElement(Xt,_extends$a({},Ut,Jt,{className:Zt,onBlur:this.handleBlur,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex()}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),kt||this.renderText(),Icon$4.create(yt,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),zt&&Wt.createElement(lib$4.exports,{name:"keydown",on:this.closeOnEscape}),zt&&Wt.createElement(lib$4.exports,{name:"keydown",on:this.moveSelectionOnKeyDown}),zt&&Wt.createElement(lib$4.exports,{name:"click",on:this.closeOnDocumentClick}),zt&&Wt.createElement(lib$4.exports,{name:"keydown",on:this.selectItemOnEnter}),Ft&&Wt.createElement(lib$4.exports,{name:"keydown",on:this.removeItemOnBackspace}),Ft&&!zt&&Wt.createElement(lib$4.exports,{name:"keydown",on:this.openOnArrow}),Ft&&!zt&&Wt.createElement(lib$4.exports,{name:"keydown",on:this.openOnSpace})))}}]),tt}(AutoControlledComponent);_defineProperty$d(Dropdown,"defaultProps",{additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:function et(tt){var nt=tt.text;return nt},searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0});_defineProperty$d(Dropdown,"autoControlledProps",["open","searchQuery","selectedLabel","value","upward"]);_defineProperty$d(Dropdown,"Divider",DropdownDivider);_defineProperty$d(Dropdown,"Header",DropdownHeader);_defineProperty$d(Dropdown,"Item",DropdownItem$1);_defineProperty$d(Dropdown,"Menu",DropdownMenu);_defineProperty$d(Dropdown,"SearchInput",DropdownSearchInput$1);_defineProperty$d(Dropdown,"handledProps",["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"]);Dropdown.propTypes={};function Select$2(et){return Wt.createElement(Dropdown,_extends$a({},et,{selection:!0}))}Select$2.handledProps=["options"];Select$2.propTypes={};Select$2.Divider=Dropdown.Divider;Select$2.Header=Dropdown.Header;Select$2.Item=Dropdown.Item;Select$2.Menu=Dropdown.Menu;var TextArea=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"ref",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"focus",function(){return rt.ref.current.focus()}),_defineProperty$d(_assertThisInitialized$2(rt),"handleChange",function(ct){var ft=get_1(ct,"target.value");invoke_1(rt.props,"onChange",ct,_objectSpread$g({},rt.props,{value:ft}))}),_defineProperty$d(_assertThisInitialized$2(rt),"handleInput",function(ct){var ft=get_1(ct,"target.value");invoke_1(rt.props,"onInput",ct,_objectSpread$g({},rt.props,{value:ft}))}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.rows,st=rt.value,ut=getUnhandledProps$1(tt,this.props),ct=getElementType(tt,this.props);return Wt.createElement(Ref$1,{innerRef:this.ref},Wt.createElement(ct,_extends$a({},ut,{onChange:this.handleChange,onInput:this.handleInput,rows:ot,value:st})))}}]),tt}(react.exports.Component);_defineProperty$d(TextArea,"defaultProps",{as:"textarea",rows:3});_defineProperty$d(TextArea,"handledProps",["as","onChange","onInput","rows","value"]);TextArea.propTypes={};const TextArea$1=TextArea;function FormField(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.control,st=et.disabled,ut=et.error,ct=et.inline,ft=et.label,pt=et.required,ht=et.type,mt=et.width,yt=et.id,vt=classnames(useKeyOnly(st,"disabled"),useKeyOnly(ut,"error"),useKeyOnly(ct,"inline"),useKeyOnly(pt,"required"),useWidthProp(mt,"wide"),"field",nt),Tt=getUnhandledProps$1(FormField,et),Et=getElementType(FormField,et),xt=get_1(ut,"pointing","above"),At=Label$4.create(ut,{autoGenerateKey:!1,defaultProps:{prompt:!0,pointing:xt,id:yt?"".concat(yt,"-error-message"):void 0,role:"alert","aria-atomic":!0}}),Ct=(xt==="below"||xt==="right")&&At,$t=(xt==="above"||xt==="left")&&At;if(isNil_1(ot))return isNil_1(ft)?Wt.createElement(Et,_extends$a({},Tt,{className:vt}),isNil$1(tt)?rt:tt):Wt.createElement(Et,_extends$a({},Tt,{className:vt}),Ct,createHTMLLabel(ft,{autoGenerateKey:!1}),$t);var Ot=yt&&ut?"".concat(yt,"-error-message"):null,Rt={"aria-describedby":Ot,"aria-invalid":ut!==void 0?!0:void 0},It=_objectSpread$g({},Tt,{content:rt,children:tt,disabled:st,required:pt,type:ht,id:yt});return ot==="input"&&(ht==="checkbox"||ht==="radio")?Wt.createElement(Et,{className:vt},Wt.createElement("label",null,Ct,react.exports.createElement(ot,_objectSpread$g({},Rt,It))," ",ft,$t)):ot===Checkbox$2||ot===Radio$2?Wt.createElement(Et,{className:vt},Ct,react.exports.createElement(ot,_objectSpread$g({},Rt,It,{label:ft})),$t):Wt.createElement(Et,{className:vt},createHTMLLabel(ft,{defaultProps:{htmlFor:yt},autoGenerateKey:!1}),Ct,react.exports.createElement(ot,_objectSpread$g({},Rt,It)),$t)}FormField.handledProps=["as","children","className","content","control","disabled","error","id","inline","label","required","type","width"];FormField.propTypes={};function FormButton(et){var tt=et.control,nt=getUnhandledProps$1(FormButton,et),rt=getElementType(FormButton,et);return Wt.createElement(rt,_extends$a({},nt,{control:tt}))}FormButton.handledProps=["as","control"];FormButton.propTypes={};FormButton.defaultProps={as:FormField,control:Button$3};function FormCheckbox(et){var tt=et.control,nt=getUnhandledProps$1(FormCheckbox,et),rt=getElementType(FormCheckbox,et);return Wt.createElement(rt,_extends$a({},nt,{control:tt}))}FormCheckbox.handledProps=["as","control"];FormCheckbox.propTypes={};FormCheckbox.defaultProps={as:FormField,control:Checkbox$2};function FormDropdown(et){var tt=et.control,nt=getUnhandledProps$1(FormDropdown,et),rt=getElementType(FormDropdown,et);return Wt.createElement(rt,_extends$a({},nt,{control:tt}))}FormDropdown.handledProps=["as","control"];FormDropdown.propTypes={};FormDropdown.defaultProps={as:FormField,control:Dropdown};function FormGroup(et){var tt=et.children,nt=et.className,rt=et.grouped,ot=et.inline,st=et.unstackable,ut=et.widths,ct=classnames(useKeyOnly(rt,"grouped"),useKeyOnly(ot,"inline"),useKeyOnly(st,"unstackable"),useWidthProp(ut,null,!0),"fields",nt),ft=getUnhandledProps$1(FormGroup,et),pt=getElementType(FormGroup,et);return Wt.createElement(pt,_extends$a({},ft,{className:ct}),tt)}FormGroup.handledProps=["as","children","className","grouped","inline","unstackable","widths"];FormGroup.propTypes={};var Input$6=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"inputRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"computeIcon",function(){var ct=rt.props,ft=ct.loading,pt=ct.icon;if(!isNil_1(pt))return pt;if(ft)return"spinner"}),_defineProperty$d(_assertThisInitialized$2(rt),"computeTabIndex",function(){var ct=rt.props,ft=ct.disabled,pt=ct.tabIndex;if(!isNil_1(pt))return pt;if(ft)return-1}),_defineProperty$d(_assertThisInitialized$2(rt),"focus",function(){return rt.inputRef.current.focus()}),_defineProperty$d(_assertThisInitialized$2(rt),"select",function(){return rt.inputRef.current.select()}),_defineProperty$d(_assertThisInitialized$2(rt),"handleChange",function(ct){var ft=get_1(ct,"target.value");invoke_1(rt.props,"onChange",ct,_objectSpread$g({},rt.props,{value:ft}))}),_defineProperty$d(_assertThisInitialized$2(rt),"handleChildOverrides",function(ct,ft){return _objectSpread$g({},ft,ct.props,{ref:function(ht){handleRef$1(ct.ref,ht),rt.inputRef.current=ht}})}),_defineProperty$d(_assertThisInitialized$2(rt),"partitionProps",function(){var ct=rt.props,ft=ct.disabled,pt=ct.type,ht=rt.computeTabIndex(),mt=getUnhandledProps$1(tt,rt.props),yt=partitionHTMLProps(mt),vt=_slicedToArray$1(yt,2),Tt=vt[0],Et=vt[1];return[_objectSpread$g({},Tt,{disabled:ft,type:pt,tabIndex:ht,onChange:rt.handleChange,ref:rt.inputRef}),Et]}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this,ot=this.props,st=ot.action,ut=ot.actionPosition,ct=ot.children,ft=ot.className,pt=ot.disabled,ht=ot.error,mt=ot.fluid,yt=ot.focus,vt=ot.icon,Tt=ot.iconPosition,Et=ot.input,xt=ot.inverted,At=ot.label,Ct=ot.labelPosition,$t=ot.loading,Ot=ot.size,Rt=ot.transparent,It=ot.type,kt=classnames("ui",Ot,useKeyOnly(pt,"disabled"),useKeyOnly(ht,"error"),useKeyOnly(mt,"fluid"),useKeyOnly(yt,"focus"),useKeyOnly(xt,"inverted"),useKeyOnly($t,"loading"),useKeyOnly(Rt,"transparent"),useValueAndKey(ut,"action")||useKeyOnly(st,"action"),useValueAndKey(Tt,"icon")||useKeyOnly(vt||$t,"icon"),useValueAndKey(Ct,"labeled")||useKeyOnly(At,"labeled"),"input",ft),Mt=getElementType(tt,this.props),Ft=this.partitionProps(),zt=_slicedToArray$1(Ft,2),Vt=zt[0],Zt=zt[1];if(!isNil$1(ct)){var Ut=map_1(react.exports.Children.toArray(ct),function(gn){return gn.type!=="input"?gn:react.exports.cloneElement(gn,rt.handleChildOverrides(gn,Vt))});return Wt.createElement(Mt,_extends$a({},Zt,{className:kt}),Ut)}var Xt=Button$3.create(st,{autoGenerateKey:!1}),Jt=Label$4.create(At,{defaultProps:{className:classnames("label",includes_1(Ct,"corner")&&Ct)},autoGenerateKey:!1});return Wt.createElement(Mt,_extends$a({},Zt,{className:kt}),ut==="left"&&Xt,Ct!=="right"&&Jt,createHTMLInput(Et||It,{defaultProps:Vt,autoGenerateKey:!1}),Icon$4.create(this.computeIcon(),{autoGenerateKey:!1}),ut!=="left"&&Xt,Ct==="right"&&Jt)}}]),tt}(react.exports.Component);_defineProperty$d(Input$6,"defaultProps",{type:"text"});_defineProperty$d(Input$6,"handledProps",["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"]);Input$6.propTypes={};Input$6.create=createShorthandFactory(Input$6,function(et){return{type:et}});const Input$7=Input$6;function FormInput(et){var tt=et.control,nt=getUnhandledProps$1(FormInput,et),rt=getElementType(FormInput,et);return Wt.createElement(rt,_extends$a({},nt,{control:tt}))}FormInput.handledProps=["as","control"];FormInput.propTypes={};FormInput.defaultProps={as:FormField,control:Input$7};function FormRadio(et){var tt=et.control,nt=getUnhandledProps$1(FormRadio,et),rt=getElementType(FormRadio,et);return Wt.createElement(rt,_extends$a({},nt,{control:tt}))}FormRadio.handledProps=["as","control"];FormRadio.propTypes={};FormRadio.defaultProps={as:FormField,control:Radio$2};function FormSelect(et){var tt=et.control,nt=et.options,rt=getUnhandledProps$1(FormSelect,et),ot=getElementType(FormSelect,et);return Wt.createElement(ot,_extends$a({},rt,{control:tt,options:nt}))}FormSelect.handledProps=["as","control","options"];FormSelect.propTypes={};FormSelect.defaultProps={as:FormField,control:Select$2};function FormTextArea(et){var tt=et.control,nt=getUnhandledProps$1(FormTextArea,et),rt=getElementType(FormTextArea,et);return Wt.createElement(rt,_extends$a({},nt,{control:tt}))}FormTextArea.handledProps=["as","control"];FormTextArea.propTypes={};FormTextArea.defaultProps={as:FormField,control:TextArea$1};var Form=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleSubmit",function(ct){var ft=rt.props.action;typeof ft!="string"&&invoke_1(ct,"preventDefault");for(var pt=arguments.length,ht=new Array(pt>1?pt-1:0),mt=1;mt<pt;mt++)ht[mt-1]=arguments[mt];invoke_1.apply(void 0,[rt.props,"onSubmit",ct,rt.props].concat(ht))}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.action,st=rt.children,ut=rt.className,ct=rt.error,ft=rt.inverted,pt=rt.loading,ht=rt.reply,mt=rt.size,yt=rt.success,vt=rt.unstackable,Tt=rt.warning,Et=rt.widths,xt=classnames("ui",mt,useKeyOnly(ct,"error"),useKeyOnly(ft,"inverted"),useKeyOnly(pt,"loading"),useKeyOnly(ht,"reply"),useKeyOnly(yt,"success"),useKeyOnly(vt,"unstackable"),useKeyOnly(Tt,"warning"),useWidthProp(Et,null,!0),"form",ut),At=getUnhandledProps$1(tt,this.props),Ct=getElementType(tt,this.props);return Wt.createElement(Ct,_extends$a({},At,{action:ot,className:xt,onSubmit:this.handleSubmit}),st)}}]),tt}(react.exports.Component);_defineProperty$d(Form,"defaultProps",{as:"form"});_defineProperty$d(Form,"Field",FormField);_defineProperty$d(Form,"Button",FormButton);_defineProperty$d(Form,"Checkbox",FormCheckbox);_defineProperty$d(Form,"Dropdown",FormDropdown);_defineProperty$d(Form,"Group",FormGroup);_defineProperty$d(Form,"Input",FormInput);_defineProperty$d(Form,"Radio",FormRadio);_defineProperty$d(Form,"Select",FormSelect);_defineProperty$d(Form,"TextArea",FormTextArea);_defineProperty$d(Form,"handledProps",["action","as","children","className","error","inverted","loading","onSubmit","reply","size","success","unstackable","warning","widths"]);Form.propTypes={};const Form$1=Form;function GridColumn(et){var tt=et.children,nt=et.className,rt=et.computer,ot=et.color,st=et.floated,ut=et.largeScreen,ct=et.mobile,ft=et.only,pt=et.stretched,ht=et.tablet,mt=et.textAlign,yt=et.verticalAlign,vt=et.widescreen,Tt=et.width,Et=classnames(ot,useKeyOnly(pt,"stretched"),useMultipleProp(ft,"only"),useTextAlignProp(mt),useValueAndKey(st,"floated"),useVerticalAlignProp(yt),useWidthProp(rt,"wide computer"),useWidthProp(ut,"wide large screen"),useWidthProp(ct,"wide mobile"),useWidthProp(ht,"wide tablet"),useWidthProp(vt,"wide widescreen"),useWidthProp(Tt,"wide"),"column",nt),xt=getUnhandledProps$1(GridColumn,et),At=getElementType(GridColumn,et);return Wt.createElement(At,_extends$a({},xt,{className:Et}),tt)}GridColumn.handledProps=["as","children","className","color","computer","floated","largeScreen","mobile","only","stretched","tablet","textAlign","verticalAlign","widescreen","width"];GridColumn.propTypes={};GridColumn.create=createShorthandFactory(GridColumn,function(et){return{children:et}});function GridRow(et){var tt=et.centered,nt=et.children,rt=et.className,ot=et.color,st=et.columns,ut=et.divided,ct=et.only,ft=et.reversed,pt=et.stretched,ht=et.textAlign,mt=et.verticalAlign,yt=classnames(ot,useKeyOnly(tt,"centered"),useKeyOnly(ut,"divided"),useKeyOnly(pt,"stretched"),useMultipleProp(ct,"only"),useMultipleProp(ft,"reversed"),useTextAlignProp(ht),useVerticalAlignProp(mt),useWidthProp(st,"column",!0),"row",rt),vt=getUnhandledProps$1(GridRow,et),Tt=getElementType(GridRow,et);return Wt.createElement(Tt,_extends$a({},vt,{className:yt}),nt)}GridRow.handledProps=["as","centered","children","className","color","columns","divided","only","reversed","stretched","textAlign","verticalAlign"];GridRow.propTypes={};function Grid$2(et){var tt=et.celled,nt=et.centered,rt=et.children,ot=et.className,st=et.columns,ut=et.container,ct=et.divided,ft=et.doubling,pt=et.inverted,ht=et.padded,mt=et.relaxed,yt=et.reversed,vt=et.stackable,Tt=et.stretched,Et=et.textAlign,xt=et.verticalAlign,At=classnames("ui",useKeyOnly(nt,"centered"),useKeyOnly(ut,"container"),useKeyOnly(ft,"doubling"),useKeyOnly(pt,"inverted"),useKeyOnly(vt,"stackable"),useKeyOnly(Tt,"stretched"),useKeyOrValueAndKey(tt,"celled"),useKeyOrValueAndKey(ct,"divided"),useKeyOrValueAndKey(ht,"padded"),useKeyOrValueAndKey(mt,"relaxed"),useMultipleProp(yt,"reversed"),useTextAlignProp(Et),useVerticalAlignProp(xt),useWidthProp(st,"column",!0),"grid",ot),Ct=getUnhandledProps$1(Grid$2,et),$t=getElementType(Grid$2,et);return Wt.createElement($t,_extends$a({},Ct,{className:At}),rt)}Grid$2.handledProps=["as","celled","centered","children","className","columns","container","divided","doubling","inverted","padded","relaxed","reversed","stackable","stretched","textAlign","verticalAlign"];Grid$2.Column=GridColumn;Grid$2.Row=GridRow;Grid$2.propTypes={};function Divider$1(et){var tt=et.children,nt=et.className,rt=et.clearing,ot=et.content,st=et.fitted,ut=et.hidden,ct=et.horizontal,ft=et.inverted,pt=et.section,ht=et.vertical,mt=classnames("ui",useKeyOnly(rt,"clearing"),useKeyOnly(st,"fitted"),useKeyOnly(ut,"hidden"),useKeyOnly(ct,"horizontal"),useKeyOnly(ft,"inverted"),useKeyOnly(pt,"section"),useKeyOnly(ht,"vertical"),"divider",nt),yt=getUnhandledProps$1(Divider$1,et),vt=getElementType(Divider$1,et);return Wt.createElement(vt,_extends$a({},yt,{className:mt}),isNil$1(tt)?ot:tt)}Divider$1.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"];Divider$1.propTypes={};function HeaderSubheader(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("sub header",nt),st=getUnhandledProps$1(HeaderSubheader,et),ut=getElementType(HeaderSubheader,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}HeaderSubheader.handledProps=["as","children","className","content"];HeaderSubheader.propTypes={};HeaderSubheader.create=createShorthandFactory(HeaderSubheader,function(et){return{content:et}});function HeaderContent(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("content",nt),st=getUnhandledProps$1(HeaderContent,et),ut=getElementType(HeaderContent,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}HeaderContent.handledProps=["as","children","className","content"];HeaderContent.propTypes={};function Header$3(et){var tt=et.attached,nt=et.block,rt=et.children,ot=et.className,st=et.color,ut=et.content,ct=et.disabled,ft=et.dividing,pt=et.floated,ht=et.icon,mt=et.image,yt=et.inverted,vt=et.size,Tt=et.sub,Et=et.subheader,xt=et.textAlign,At=classnames("ui",st,vt,useKeyOnly(nt,"block"),useKeyOnly(ct,"disabled"),useKeyOnly(ft,"dividing"),useValueAndKey(pt,"floated"),useKeyOnly(ht===!0,"icon"),useKeyOnly(mt===!0,"image"),useKeyOnly(yt,"inverted"),useKeyOnly(Tt,"sub"),useKeyOrValueAndKey(tt,"attached"),useTextAlignProp(xt),"header",ot),Ct=getUnhandledProps$1(Header$3,et),$t=getElementType(Header$3,et);if(!isNil$1(rt))return Wt.createElement($t,_extends$a({},Ct,{className:At}),rt);var Ot=Icon$4.create(ht,{autoGenerateKey:!1}),Rt=Image$1.create(mt,{autoGenerateKey:!1}),It=HeaderSubheader.create(Et,{autoGenerateKey:!1});return Ot||Rt?Wt.createElement($t,_extends$a({},Ct,{className:At}),Ot||Rt,(ut||It)&&Wt.createElement(HeaderContent,null,ut,It)):Wt.createElement($t,_extends$a({},Ct,{className:At}),ut,It)}Header$3.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"];Header$3.propTypes={};Header$3.Content=HeaderContent;Header$3.Subheader=HeaderSubheader;function ListDescription(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames(nt,"description"),st=getUnhandledProps$1(ListDescription,et),ut=getElementType(ListDescription,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ListDescription.handledProps=["as","children","className","content"];ListDescription.propTypes={};ListDescription.create=createShorthandFactory(ListDescription,function(et){return{content:et}});function ListHeader(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("header",nt),st=getUnhandledProps$1(ListHeader,et),ut=getElementType(ListHeader,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ListHeader.handledProps=["as","children","className","content"];ListHeader.propTypes={};ListHeader.create=createShorthandFactory(ListHeader,function(et){return{content:et}});function ListContent(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.description,st=et.floated,ut=et.header,ct=et.verticalAlign,ft=classnames(useValueAndKey(st,"floated"),useVerticalAlignProp(ct),"content",nt),pt=getUnhandledProps$1(ListContent,et),ht=getElementType(ListContent,et);return isNil$1(tt)?Wt.createElement(ht,_extends$a({},pt,{className:ft}),ListHeader.create(ut),ListDescription.create(ot),rt):Wt.createElement(ht,_extends$a({},pt,{className:ft}),tt)}ListContent.handledProps=["as","children","className","content","description","floated","header","verticalAlign"];ListContent.propTypes={};ListContent.create=createShorthandFactory(ListContent,function(et){return{content:et}});function ListIcon(et){var tt=et.className,nt=et.verticalAlign,rt=classnames(useVerticalAlignProp(nt),tt),ot=getUnhandledProps$1(ListIcon,et);return Wt.createElement(Icon$4,_extends$a({},ot,{className:rt}))}ListIcon.handledProps=["className","verticalAlign"];ListIcon.propTypes={};ListIcon.create=createShorthandFactory(ListIcon,function(et){return{name:et}});var ListItem$2=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props.disabled;ft||invoke_1(rt.props,"onClick",ct,rt.props)}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.active,st=rt.children,ut=rt.className,ct=rt.content,ft=rt.description,pt=rt.disabled,ht=rt.header,mt=rt.icon,yt=rt.image,vt=rt.value,Tt=getElementType(tt,this.props),Et=classnames(useKeyOnly(ot,"active"),useKeyOnly(pt,"disabled"),useKeyOnly(Tt!=="li","item"),ut),xt=getUnhandledProps$1(tt,this.props),At=Tt==="li"?{value:vt}:{"data-value":vt};if(!isNil$1(st))return Wt.createElement(Tt,_extends$a({},At,{role:"listitem",className:Et,onClick:this.handleClick},xt),st);var Ct=ListIcon.create(mt,{autoGenerateKey:!1}),$t=Image$1.create(yt,{autoGenerateKey:!1});if(!react.exports.isValidElement(ct)&&isPlainObject_1(ct))return Wt.createElement(Tt,_extends$a({},At,{role:"listitem",className:Et,onClick:this.handleClick},xt),Ct||$t,ListContent.create(ct,{autoGenerateKey:!1,defaultProps:{header:ht,description:ft}}));var Ot=ListHeader.create(ht,{autoGenerateKey:!1}),Rt=ListDescription.create(ft,{autoGenerateKey:!1});return Ct||$t?Wt.createElement(Tt,_extends$a({},At,{role:"listitem",className:Et,onClick:this.handleClick},xt),Ct||$t,(ct||Ot||Rt)&&Wt.createElement(ListContent,null,Ot,Rt,ct)):Wt.createElement(Tt,_extends$a({},At,{role:"listitem",className:Et,onClick:this.handleClick},xt),Ot,Rt,ct)}}]),tt}(react.exports.Component);_defineProperty$d(ListItem$2,"handledProps",["active","as","children","className","content","description","disabled","header","icon","image","onClick","value"]);ListItem$2.propTypes={};ListItem$2.create=createShorthandFactory(ListItem$2,function(et){return{content:et}});const ListItem$3=ListItem$2;function ListList(et){var tt=et.children,nt=et.className,rt=et.content,ot=getUnhandledProps$1(ListList,et),st=getElementType(ListList,et),ut=classnames(useKeyOnly(st!=="ul"&&st!=="ol","list"),nt);return Wt.createElement(st,_extends$a({},ot,{className:ut}),isNil$1(tt)?rt:tt)}ListList.handledProps=["as","children","className","content"];ListList.propTypes={};var List$4=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleItemOverrides",function(ct){return{onClick:function(pt,ht){invoke_1(ct,"onClick",pt,ht),invoke_1(rt.props,"onItemClick",pt,ht)}}}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this,ot=this.props,st=ot.animated,ut=ot.bulleted,ct=ot.celled,ft=ot.children,pt=ot.className,ht=ot.content,mt=ot.divided,yt=ot.floated,vt=ot.horizontal,Tt=ot.inverted,Et=ot.items,xt=ot.link,At=ot.ordered,Ct=ot.relaxed,$t=ot.selection,Ot=ot.size,Rt=ot.verticalAlign,It=classnames("ui",Ot,useKeyOnly(st,"animated"),useKeyOnly(ut,"bulleted"),useKeyOnly(ct,"celled"),useKeyOnly(mt,"divided"),useKeyOnly(vt,"horizontal"),useKeyOnly(Tt,"inverted"),useKeyOnly(xt,"link"),useKeyOnly(At,"ordered"),useKeyOnly($t,"selection"),useKeyOrValueAndKey(Ct,"relaxed"),useValueAndKey(yt,"floated"),useVerticalAlignProp(Rt),"list",pt),kt=getUnhandledProps$1(tt,this.props),Mt=getElementType(tt,this.props);return isNil$1(ft)?isNil$1(ht)?Wt.createElement(Mt,_extends$a({role:"list",className:It},kt),map_1(Et,function(Ft){return ListItem$3.create(Ft,{overrideProps:rt.handleItemOverrides})})):Wt.createElement(Mt,_extends$a({role:"list",className:It},kt),ht):Wt.createElement(Mt,_extends$a({role:"list",className:It},kt),ft)}}]),tt}(react.exports.Component);_defineProperty$d(List$4,"Content",ListContent);_defineProperty$d(List$4,"Description",ListDescription);_defineProperty$d(List$4,"Header",ListHeader);_defineProperty$d(List$4,"Icon",ListIcon);_defineProperty$d(List$4,"Item",ListItem$3);_defineProperty$d(List$4,"List",ListList);_defineProperty$d(List$4,"handledProps",["animated","as","bulleted","celled","children","className","content","divided","floated","horizontal","inverted","items","link","onItemClick","ordered","relaxed","selection","size","verticalAlign"]);List$4.propTypes={};const List$5=List$4;function Loader(et){var tt=et.active,nt=et.children,rt=et.className,ot=et.content,st=et.disabled,ut=et.indeterminate,ct=et.inline,ft=et.inverted,pt=et.size,ht=classnames("ui",pt,useKeyOnly(tt,"active"),useKeyOnly(st,"disabled"),useKeyOnly(ut,"indeterminate"),useKeyOnly(ft,"inverted"),useKeyOnly(nt||ot,"text"),useKeyOrValueAndKey(ct,"inline"),"loader",rt),mt=getUnhandledProps$1(Loader,et),yt=getElementType(Loader,et);return Wt.createElement(yt,_extends$a({},mt,{className:ht}),isNil$1(nt)?ot:nt)}Loader.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"];Loader.propTypes={};function PlaceholderHeader(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.image,st=classnames(useKeyOnly(ot,"image"),"header",nt),ut=getUnhandledProps$1(PlaceholderHeader,et),ct=getElementType(PlaceholderHeader,et);return Wt.createElement(ct,_extends$a({},ut,{className:st}),isNil$1(tt)?rt:tt)}PlaceholderHeader.handledProps=["as","children","className","content","image"];PlaceholderHeader.propTypes={};function PlaceholderImage(et){var tt=et.className,nt=et.square,rt=et.rectangular,ot=classnames(useKeyOnly(nt,"square"),useKeyOnly(rt,"rectangular"),"image",tt),st=getUnhandledProps$1(PlaceholderImage,et),ut=getElementType(PlaceholderImage,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}))}PlaceholderImage.handledProps=["as","className","rectangular","square"];PlaceholderImage.propTypes={};function PlaceholderLine(et){var tt=et.className,nt=et.length,rt=classnames("line",nt,tt),ot=getUnhandledProps$1(PlaceholderLine,et),st=getElementType(PlaceholderLine,et);return Wt.createElement(st,_extends$a({},ot,{className:rt}))}PlaceholderLine.handledProps=["as","className","length"];PlaceholderLine.propTypes={};function PlaceholderParagraph(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("paragraph",nt),st=getUnhandledProps$1(PlaceholderParagraph,et),ut=getElementType(PlaceholderParagraph,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}PlaceholderParagraph.handledProps=["as","children","className","content"];PlaceholderParagraph.propTypes={};function Placeholder$1(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.fluid,st=et.inverted,ut=classnames("ui",useKeyOnly(ot,"fluid"),useKeyOnly(st,"inverted"),"placeholder",nt),ct=getUnhandledProps$1(Placeholder$1,et),ft=getElementType(Placeholder$1,et);return Wt.createElement(ft,_extends$a({},ct,{className:ut}),isNil$1(tt)?rt:tt)}Placeholder$1.handledProps=["as","children","className","content","fluid","inverted"];Placeholder$1.propTypes={};Placeholder$1.Header=PlaceholderHeader;Placeholder$1.Image=PlaceholderImage;Placeholder$1.Line=PlaceholderLine;Placeholder$1.Paragraph=PlaceholderParagraph;function SegmentGroup(et){var tt=et.children,nt=et.className,rt=et.compact,ot=et.content,st=et.horizontal,ut=et.piled,ct=et.raised,ft=et.size,pt=et.stacked,ht=classnames("ui",ft,useKeyOnly(rt,"compact"),useKeyOnly(st,"horizontal"),useKeyOnly(ut,"piled"),useKeyOnly(ct,"raised"),useKeyOnly(pt,"stacked"),"segments",nt),mt=getUnhandledProps$1(SegmentGroup,et),yt=getElementType(SegmentGroup,et);return Wt.createElement(yt,_extends$a({},mt,{className:ht}),isNil$1(tt)?ot:tt)}SegmentGroup.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"];SegmentGroup.propTypes={};function SegmentInline(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("inline",nt),st=getUnhandledProps$1(SegmentInline,et),ut=getElementType(SegmentInline,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}SegmentInline.handledProps=["as","children","className","content"];SegmentInline.propTypes={};function Segment(et){var tt=et.attached,nt=et.basic,rt=et.children,ot=et.circular,st=et.className,ut=et.clearing,ct=et.color,ft=et.compact,pt=et.content,ht=et.disabled,mt=et.floated,yt=et.inverted,vt=et.loading,Tt=et.placeholder,Et=et.padded,xt=et.piled,At=et.raised,Ct=et.secondary,$t=et.size,Ot=et.stacked,Rt=et.tertiary,It=et.textAlign,kt=et.vertical,Mt=classnames("ui",ct,$t,useKeyOnly(nt,"basic"),useKeyOnly(ot,"circular"),useKeyOnly(ut,"clearing"),useKeyOnly(ft,"compact"),useKeyOnly(ht,"disabled"),useKeyOnly(yt,"inverted"),useKeyOnly(vt,"loading"),useKeyOnly(Tt,"placeholder"),useKeyOnly(xt,"piled"),useKeyOnly(At,"raised"),useKeyOnly(Ct,"secondary"),useKeyOnly(Ot,"stacked"),useKeyOnly(Rt,"tertiary"),useKeyOnly(kt,"vertical"),useKeyOrValueAndKey(tt,"attached"),useKeyOrValueAndKey(Et,"padded"),useTextAlignProp(It),useValueAndKey(mt,"floated"),"segment",st),Ft=getUnhandledProps$1(Segment,et),zt=getElementType(Segment,et);return Wt.createElement(zt,_extends$a({},Ft,{className:Mt}),isNil$1(rt)?pt:rt)}Segment.handledProps=["as","attached","basic","children","circular","className","clearing","color","compact","content","disabled","floated","inverted","loading","padded","piled","placeholder","raised","secondary","size","stacked","tertiary","textAlign","vertical"];Segment.Group=SegmentGroup;Segment.Inline=SegmentInline;Segment.propTypes={};var baseAssignValue=_baseAssignValue,eq$2=eq_1$1;function assignMergeValue$2(et,tt,nt){(nt!==void 0&&!eq$2(et[tt],nt)||nt===void 0&&!(tt in et))&&baseAssignValue(et,tt,nt)}var _assignMergeValue=assignMergeValue$2;function safeGet$2(et,tt){if(!(tt==="constructor"&&typeof et[tt]=="function")&&tt!="__proto__")return et[tt]}var _safeGet=safeGet$2,copyObject=_copyObject,keysIn$2=keysIn_1;function toPlainObject$1(et){return copyObject(et,keysIn$2(et))}var toPlainObject_1=toPlainObject$1,assignMergeValue$1=_assignMergeValue,cloneBuffer=_cloneBuffer.exports,cloneTypedArray=_cloneTypedArray,copyArray=_copyArray,initCloneObject=_initCloneObject,isArguments$3=isArguments_1,isArray$2=isArray_1,isArrayLikeObject=isArrayLikeObject_1,isBuffer$3=isBuffer$8.exports,isFunction$6=isFunction_1,isObject$5=isObject_1,isPlainObject$5=isPlainObject_1,isTypedArray=isTypedArray_1,safeGet$1=_safeGet,toPlainObject=toPlainObject_1;function baseMergeDeep$1(et,tt,nt,rt,ot,st,ut){var ct=safeGet$1(et,nt),ft=safeGet$1(tt,nt),pt=ut.get(ft);if(pt){assignMergeValue$1(et,nt,pt);return}var ht=st?st(ct,ft,nt+"",et,tt,ut):void 0,mt=ht===void 0;if(mt){var yt=isArray$2(ft),vt=!yt&&isBuffer$3(ft),Tt=!yt&&!vt&&isTypedArray(ft);ht=ft,yt||vt||Tt?isArray$2(ct)?ht=ct:isArrayLikeObject(ct)?ht=copyArray(ct):vt?(mt=!1,ht=cloneBuffer(ft,!0)):Tt?(mt=!1,ht=cloneTypedArray(ft,!0)):ht=[]:isPlainObject$5(ft)||isArguments$3(ft)?(ht=ct,isArguments$3(ct)?ht=toPlainObject(ct):(!isObject$5(ct)||isFunction$6(ct))&&(ht=initCloneObject(ft))):mt=!1}mt&&(ut.set(ft,ht),ot(ht,ft,rt,st,ut),ut.delete(ft)),assignMergeValue$1(et,nt,ht)}var _baseMergeDeep=baseMergeDeep$1,Stack$1=_Stack,assignMergeValue=_assignMergeValue,baseFor=_baseFor,baseMergeDeep=_baseMergeDeep,isObject$4=isObject_1,keysIn$1=keysIn_1,safeGet=_safeGet;function baseMerge$1(et,tt,nt,rt,ot){et!==tt&&baseFor(tt,function(st,ut){if(ot||(ot=new Stack$1),isObject$4(st))baseMergeDeep(et,tt,ut,nt,baseMerge$1,rt,ot);else{var ct=rt?rt(safeGet(et,ut),st,ut+"",et,tt,ot):void 0;ct===void 0&&(ct=st),assignMergeValue(et,ut,ct)}},keysIn$1)}var _baseMerge=baseMerge$1,baseRest=_baseRest,isIterateeCall=_isIterateeCall;function createAssigner$1(et){return baseRest(function(tt,nt){var rt=-1,ot=nt.length,st=ot>1?nt[ot-1]:void 0,ut=ot>2?nt[2]:void 0;for(st=et.length>3&&typeof st=="function"?(ot--,st):void 0,ut&&isIterateeCall(nt[0],nt[1],ut)&&(st=ot<3?void 0:st,ot=1),tt=Object(tt);++rt<ot;){var ct=nt[rt];ct&&et(tt,ct,rt,st)}return tt})}var _createAssigner=createAssigner$1,baseMerge=_baseMerge,createAssigner=_createAssigner,merge$c=createAssigner(function(et,tt,nt){baseMerge(et,tt,nt)}),merge_1$2=merge$c;function _objectWithoutPropertiesLoose$7(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}function _inheritsLoose$5(et,tt){et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,_setPrototypeOf$4(et,tt)}var toStr$4=Object.prototype.toString,isArguments$2=function et(tt){var nt=toStr$4.call(tt),rt=nt==="[object Arguments]";return rt||(rt=nt!=="[object Array]"&&tt!==null&&typeof tt=="object"&&typeof tt.length=="number"&&tt.length>=0&&toStr$4.call(tt.callee)==="[object Function]"),rt},implementation$9,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation$9;hasRequiredImplementation=1;var et;if(!Object.keys){var tt=Object.prototype.hasOwnProperty,nt=Object.prototype.toString,rt=isArguments$2,ot=Object.prototype.propertyIsEnumerable,st=!ot.call({toString:null},"toString"),ut=ot.call(function(){},"prototype"),ct=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ft=function(yt){var vt=yt.constructor;return vt&&vt.prototype===yt},pt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},ht=function(){if(typeof window>"u")return!1;for(var yt in window)try{if(!pt["$"+yt]&&tt.call(window,yt)&&window[yt]!==null&&typeof window[yt]=="object")try{ft(window[yt])}catch{return!0}}catch{return!0}return!1}(),mt=function(yt){if(typeof window>"u"||!ht)return ft(yt);try{return ft(yt)}catch{return!1}};et=function(vt){var Tt=vt!==null&&typeof vt=="object",Et=nt.call(vt)==="[object Function]",xt=rt(vt),At=Tt&&nt.call(vt)==="[object String]",Ct=[];if(!Tt&&!Et&&!xt)throw new TypeError("Object.keys called on a non-object");var $t=ut&&Et;if(At&&vt.length>0&&!tt.call(vt,0))for(var Ot=0;Ot<vt.length;++Ot)Ct.push(String(Ot));if(xt&&vt.length>0)for(var Rt=0;Rt<vt.length;++Rt)Ct.push(String(Rt));else for(var It in vt)!($t&&It==="prototype")&&tt.call(vt,It)&&Ct.push(String(It));if(st)for(var kt=mt(vt),Mt=0;Mt<ct.length;++Mt)!(kt&&ct[Mt]==="constructor")&&tt.call(vt,ct[Mt])&&Ct.push(ct[Mt]);return Ct}}return implementation$9=et,implementation$9}var slice$8=Array.prototype.slice,isArgs=isArguments$2,origKeys=Object.keys,keysShim=origKeys?function et(tt){return origKeys(tt)}:requireImplementation(),originalKeys=Object.keys;keysShim.shim=function et(){if(Object.keys){var tt=function(){var nt=Object.keys(arguments);return nt&&nt.length===arguments.length}(1,2);tt||(Object.keys=function(rt){return isArgs(rt)?originalKeys(slice$8.call(rt)):originalKeys(rt)})}else Object.keys=keysShim;return Object.keys||keysShim};var objectKeys$1=keysShim,shams$1=function et(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var tt={},nt=Symbol("test"),rt=Object(nt);if(typeof nt=="string"||Object.prototype.toString.call(nt)!=="[object Symbol]"||Object.prototype.toString.call(rt)!=="[object Symbol]")return!1;var ot=42;tt[nt]=ot;for(nt in tt)return!1;if(typeof Object.keys=="function"&&Object.keys(tt).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(tt).length!==0)return!1;var st=Object.getOwnPropertySymbols(tt);if(st.length!==1||st[0]!==nt||!Object.prototype.propertyIsEnumerable.call(tt,nt))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ut=Object.getOwnPropertyDescriptor(tt,nt);if(ut.value!==ot||ut.enumerable!==!0)return!1}return!0},hasSymbols$3=shams$1,shams=function et(){return hasSymbols$3()&&!!Symbol.toStringTag},origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=shams$1,hasSymbols$2=function et(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()},test$1={foo:{}},$Object=Object,hasProto$1=function et(){return{__proto__:test$1}.foo===test$1.foo&&!({__proto__:null}instanceof $Object)},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice$7=Array.prototype.slice,toStr$3=Object.prototype.toString,funcType="[object Function]",implementation$8=function et(tt){var nt=this;if(typeof nt!="function"||toStr$3.call(nt)!==funcType)throw new TypeError(ERROR_MESSAGE+nt);for(var rt=slice$7.call(arguments,1),ot,st=function(){if(this instanceof ot){var ht=nt.apply(this,rt.concat(slice$7.call(arguments)));return Object(ht)===ht?ht:this}else return nt.apply(tt,rt.concat(slice$7.call(arguments)))},ut=Math.max(0,nt.length-rt.length),ct=[],ft=0;ft<ut;ft++)ct.push("$"+ft);if(ot=Function("binder","return function ("+ct.join(",")+"){ return binder.apply(this,arguments); }")(st),nt.prototype){var pt=function(){};pt.prototype=nt.prototype,ot.prototype=new pt,pt.prototype=null}return ot},implementation$7=implementation$8,functionBind=Function.prototype.bind||implementation$7,bind$3=functionBind,src=bind$3.call(Function.call,Object.prototype.hasOwnProperty),undefined$1,$SyntaxError=SyntaxError,$Function=Function,$TypeError=TypeError,getEvalledConstructor=function(et){try{return $Function('"use strict"; return ('+et+").constructor;")()}catch{}},$gOPD$1=Object.getOwnPropertyDescriptor;if($gOPD$1)try{$gOPD$1({},"")}catch{$gOPD$1=null}var throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD$1?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD$1(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols$1=hasSymbols$2(),hasProto=hasProto$1(),getProto$1=Object.getPrototypeOf||(hasProto?function(et){return et.__proto__}:null),needsEval={},TypedArray=typeof Uint8Array>"u"||!getProto$1?undefined$1:getProto$1(Uint8Array),INTRINSICS={"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1(getProto$1([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols$1||!getProto$1?undefined$1:getProto$1(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols$1||!getProto$1?undefined$1:getProto$1(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols$1?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet};if(getProto$1)try{null.error}catch(et){var errorProto=getProto$1(getProto$1(et));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function et(tt){var nt;if(tt==="%AsyncFunction%")nt=getEvalledConstructor("async function () {}");else if(tt==="%GeneratorFunction%")nt=getEvalledConstructor("function* () {}");else if(tt==="%AsyncGeneratorFunction%")nt=getEvalledConstructor("async function* () {}");else if(tt==="%AsyncGenerator%"){var rt=et("%AsyncGeneratorFunction%");rt&&(nt=rt.prototype)}else if(tt==="%AsyncIteratorPrototype%"){var ot=et("%AsyncGenerator%");ot&&getProto$1&&(nt=getProto$1(ot.prototype))}return INTRINSICS[tt]=nt,nt},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind$2=functionBind,hasOwn$1=src,$concat=bind$2.call(Function.call,Array.prototype.concat),$spliceApply=bind$2.call(Function.apply,Array.prototype.splice),$replace=bind$2.call(Function.call,String.prototype.replace),$strSlice=bind$2.call(Function.call,String.prototype.slice),$exec$1=bind$2.call(Function.call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function et(tt){var nt=$strSlice(tt,0,1),rt=$strSlice(tt,-1);if(nt==="%"&&rt!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(rt==="%"&&nt!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var ot=[];return $replace(tt,rePropName,function(st,ut,ct,ft){ot[ot.length]=ct?$replace(ft,reEscapeChar,"$1"):ut||st}),ot},getBaseIntrinsic=function et(tt,nt){var rt=tt,ot;if(hasOwn$1(LEGACY_ALIASES,rt)&&(ot=LEGACY_ALIASES[rt],rt="%"+ot[0]+"%"),hasOwn$1(INTRINSICS,rt)){var st=INTRINSICS[rt];if(st===needsEval&&(st=doEval(rt)),typeof st>"u"&&!nt)throw new $TypeError("intrinsic "+tt+" exists, but is not available. Please file an issue!");return{alias:ot,name:rt,value:st}}throw new $SyntaxError("intrinsic "+tt+" does not exist!")},getIntrinsic=function et(tt,nt){if(typeof tt!="string"||tt.length===0)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof nt!="boolean")throw new $TypeError('"allowMissing" argument must be a boolean');if($exec$1(/^%?[^%]*%?$/,tt)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var rt=stringToPath(tt),ot=rt.length>0?rt[0]:"",st=getBaseIntrinsic("%"+ot+"%",nt),ut=st.name,ct=st.value,ft=!1,pt=st.alias;pt&&(ot=pt[0],$spliceApply(rt,$concat([0,1],pt)));for(var ht=1,mt=!0;ht<rt.length;ht+=1){var yt=rt[ht],vt=$strSlice(yt,0,1),Tt=$strSlice(yt,-1);if((vt==='"'||vt==="'"||vt==="`"||Tt==='"'||Tt==="'"||Tt==="`")&&vt!==Tt)throw new $SyntaxError("property names with quotes must have matching quotes");if((yt==="constructor"||!mt)&&(ft=!0),ot+="."+yt,ut="%"+ot+"%",hasOwn$1(INTRINSICS,ut))ct=INTRINSICS[ut];else if(ct!=null){if(!(yt in ct)){if(!nt)throw new $TypeError("base intrinsic for "+tt+" exists, but the property is not available.");return}if($gOPD$1&&ht+1>=rt.length){var Et=$gOPD$1(ct,yt);mt=!!Et,mt&&"get"in Et&&!("originalValue"in Et.get)?ct=Et.get:ct=ct[yt]}else mt=hasOwn$1(ct,yt),ct=ct[yt];mt&&!ft&&(INTRINSICS[ut]=ct)}}return ct},callBind$3={exports:{}};(function(et){var tt=functionBind,nt=getIntrinsic,rt=nt("%Function.prototype.apply%"),ot=nt("%Function.prototype.call%"),st=nt("%Reflect.apply%",!0)||tt.call(ot,rt),ut=nt("%Object.getOwnPropertyDescriptor%",!0),ct=nt("%Object.defineProperty%",!0),ft=nt("%Math.max%");if(ct)try{ct({},"a",{value:1})}catch{ct=null}et.exports=function(mt){var yt=st(tt,ot,arguments);if(ut&&ct){var vt=ut(yt,"length");vt.configurable&&ct(yt,"length",{value:1+ft(0,mt.length-(arguments.length-1))})}return yt};var pt=function(){return st(tt,rt,arguments)};ct?ct(et.exports,"apply",{value:pt}):et.exports.apply=pt})(callBind$3);var GetIntrinsic$1=getIntrinsic,callBind$2=callBind$3.exports,$indexOf=callBind$2(GetIntrinsic$1("String.prototype.indexOf")),callBound$2=function et(tt,nt){var rt=GetIntrinsic$1(tt,!!nt);return typeof rt=="function"&&$indexOf(tt,".prototype.")>-1?callBind$2(rt):rt},hasToStringTag$2=shams(),callBound$1=callBound$2,$toString$1=callBound$1("Object.prototype.toString"),isStandardArguments=function et(tt){return hasToStringTag$2&&tt&&typeof tt=="object"&&Symbol.toStringTag in tt?!1:$toString$1(tt)==="[object Arguments]"},isLegacyArguments=function et(tt){return isStandardArguments(tt)?!0:tt!==null&&typeof tt=="object"&&typeof tt.length=="number"&&tt.length>=0&&$toString$1(tt)!=="[object Array]"&&$toString$1(tt.callee)==="[object Function]"},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments;var isArguments$1=supportsStandardArguments?isStandardArguments:isLegacyArguments,GetIntrinsic=getIntrinsic,$defineProperty=GetIntrinsic("%Object.defineProperty%",!0),hasPropertyDescriptors$1=function et(){if($defineProperty)try{return $defineProperty({},"a",{value:1}),!0}catch{return!1}return!1};hasPropertyDescriptors$1.hasArrayLengthDefineBug=function et(){if(!hasPropertyDescriptors$1())return null;try{return $defineProperty([],"length",{value:1}).length!==1}catch{return!0}};var hasPropertyDescriptors_1=hasPropertyDescriptors$1,keys$7=objectKeys$1,hasSymbols=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",toStr$2=Object.prototype.toString,concat$1=Array.prototype.concat,origDefineProperty=Object.defineProperty,isFunction$5=function(et){return typeof et=="function"&&toStr$2.call(et)==="[object Function]"},hasPropertyDescriptors=hasPropertyDescriptors_1(),supportsDescriptors$2=origDefineProperty&&hasPropertyDescriptors,defineProperty$5=function(et,tt,nt,rt){if(tt in et){if(rt===!0){if(et[tt]===nt)return}else if(!isFunction$5(rt)||!rt())return}supportsDescriptors$2?origDefineProperty(et,tt,{configurable:!0,enumerable:!1,value:nt,writable:!0}):et[tt]=nt},defineProperties=function(et,tt){var nt=arguments.length>2?arguments[2]:{},rt=keys$7(tt);hasSymbols&&(rt=concat$1.call(rt,Object.getOwnPropertySymbols(tt)));for(var ot=0;ot<rt.length;ot+=1)defineProperty$5(et,rt[ot],tt[rt[ot]],nt[rt[ot]])};defineProperties.supportsDescriptors=!!supportsDescriptors$2;var defineProperties_1=defineProperties,numberIsNaN=function(et){return et!==et},implementation$6=function et(tt,nt){return tt===0&&nt===0?1/tt===1/nt:!!(tt===nt||numberIsNaN(tt)&&numberIsNaN(nt))},implementation$5=implementation$6,polyfill$3=function et(){return typeof Object.is=="function"?Object.is:implementation$5},getPolyfill$3=polyfill$3,define$3=defineProperties_1,shim$3=function et(){var tt=getPolyfill$3();return define$3(Object,{is:tt},{is:function(){return Object.is!==tt}}),tt},define$2=defineProperties_1,callBind$1=callBind$3.exports,implementation$4=implementation$6,getPolyfill$2=polyfill$3,shim$2=shim$3,polyfill$2=callBind$1(getPolyfill$2(),Object);define$2(polyfill$2,{getPolyfill:getPolyfill$2,implementation:implementation$4,shim:shim$2});var objectIs$1=polyfill$2,callBound=callBound$2,hasToStringTag$1=shams(),has$2,$exec,isRegexMarker,badStringifier;if(hasToStringTag$1){has$2=callBound("Object.prototype.hasOwnProperty"),$exec=callBound("RegExp.prototype.exec"),isRegexMarker={};var throwRegexMarker=function(){throw isRegexMarker};badStringifier={toString:throwRegexMarker,valueOf:throwRegexMarker},typeof Symbol.toPrimitive=="symbol"&&(badStringifier[Symbol.toPrimitive]=throwRegexMarker)}var $toString=callBound("Object.prototype.toString"),gOPD$3=Object.getOwnPropertyDescriptor,regexClass="[object RegExp]",isRegex$1=hasToStringTag$1?function et(tt){if(!tt||typeof tt!="object")return!1;var nt=gOPD$3(tt,"lastIndex"),rt=nt&&has$2(nt,"value");if(!rt)return!1;try{$exec(tt,badStringifier)}catch(ot){return ot===isRegexMarker}}:function et(tt){return!tt||typeof tt!="object"&&typeof tt!="function"?!1:$toString(tt)===regexClass},implementation$3={exports:{}},functionsHaveNames=function et(){return typeof function(){}.name=="string"},gOPD$2=Object.getOwnPropertyDescriptor;if(gOPD$2)try{gOPD$2([],"length")}catch{gOPD$2=null}functionsHaveNames.functionsHaveConfigurableNames=function et(){if(!functionsHaveNames()||!gOPD$2)return!1;var tt=gOPD$2(function(){},"name");return!!tt&&!!tt.configurable};var $bind=Function.prototype.bind;functionsHaveNames.boundFunctionsHaveNames=function et(){return functionsHaveNames()&&typeof $bind=="function"&&function(){}.bind().name!==""};var functionsHaveNames_1=functionsHaveNames;(function(et){var tt=functionsHaveNames_1.functionsHaveConfigurableNames(),nt=Object,rt=TypeError;et.exports=function(){if(this!=null&&this!==nt(this))throw new rt("RegExp.prototype.flags getter called on non-object");var st="";return this.hasIndices&&(st+="d"),this.global&&(st+="g"),this.ignoreCase&&(st+="i"),this.multiline&&(st+="m"),this.dotAll&&(st+="s"),this.unicode&&(st+="u"),this.unicodeSets&&(st+="v"),this.sticky&&(st+="y"),st},tt&&Object.defineProperty&&Object.defineProperty(et.exports,"name",{value:"get flags"})})(implementation$3);var implementation$2=implementation$3.exports,supportsDescriptors$1=defineProperties_1.supportsDescriptors,$gOPD=Object.getOwnPropertyDescriptor,polyfill$1=function et(){if(supportsDescriptors$1&&/a/mig.flags==="gim"){var tt=$gOPD(RegExp.prototype,"flags");if(tt&&typeof tt.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var nt="",rt={};if(Object.defineProperty(rt,"hasIndices",{get:function(){nt+="d"}}),Object.defineProperty(rt,"sticky",{get:function(){nt+="y"}}),nt==="dy")return tt.get}}return implementation$2},supportsDescriptors=defineProperties_1.supportsDescriptors,getPolyfill$1=polyfill$1,gOPD$1=Object.getOwnPropertyDescriptor,defineProperty$4=Object.defineProperty,TypeErr=TypeError,getProto=Object.getPrototypeOf,regex=/a/,shim$1=function et(){if(!supportsDescriptors||!getProto)throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var tt=getPolyfill$1(),nt=getProto(regex),rt=gOPD$1(nt,"flags");return(!rt||rt.get!==tt)&&defineProperty$4(nt,"flags",{configurable:!0,enumerable:!1,get:tt}),tt},define$1=defineProperties_1,callBind=callBind$3.exports,implementation$1=implementation$3.exports,getPolyfill=polyfill$1,shim=shim$1,flagsBound=callBind(getPolyfill());define$1(flagsBound,{getPolyfill,implementation:implementation$1,shim});var regexp_prototype_flags=flagsBound,getDay=Date.prototype.getDay,tryDateObject=function et(tt){try{return getDay.call(tt),!0}catch{return!1}},toStr$1=Object.prototype.toString,dateClass="[object Date]",hasToStringTag=shams(),isDateObject=function et(tt){return typeof tt!="object"||tt===null?!1:hasToStringTag?tryDateObject(tt):toStr$1.call(tt)===dateClass},objectKeys=objectKeys$1,isArguments=isArguments$1,is$1=objectIs$1,isRegex=isRegex$1,flags$2=regexp_prototype_flags,isDate$2=isDateObject,getTime=Date.prototype.getTime;function deepEqual$1(et,tt,nt){var rt=nt||{};return(rt.strict?is$1(et,tt):et===tt)?!0:!et||!tt||typeof et!="object"&&typeof tt!="object"?rt.strict?is$1(et,tt):et==tt:objEquiv(et,tt,rt)}function isUndefinedOrNull(et){return et==null}function isBuffer$2(et){return!(!et||typeof et!="object"||typeof et.length!="number"||typeof et.copy!="function"||typeof et.slice!="function"||et.length>0&&typeof et[0]!="number")}function objEquiv(et,tt,nt){var rt,ot;if(typeof et!=typeof tt||isUndefinedOrNull(et)||isUndefinedOrNull(tt)||et.prototype!==tt.prototype||isArguments(et)!==isArguments(tt))return!1;var st=isRegex(et),ut=isRegex(tt);if(st!==ut)return!1;if(st||ut)return et.source===tt.source&&flags$2(et)===flags$2(tt);if(isDate$2(et)&&isDate$2(tt))return getTime.call(et)===getTime.call(tt);var ct=isBuffer$2(et),ft=isBuffer$2(tt);if(ct!==ft)return!1;if(ct||ft){if(et.length!==tt.length)return!1;for(rt=0;rt<et.length;rt++)if(et[rt]!==tt[rt])return!1;return!0}if(typeof et!=typeof tt)return!1;try{var pt=objectKeys(et),ht=objectKeys(tt)}catch{return!1}if(pt.length!==ht.length)return!1;for(pt.sort(),ht.sort(),rt=pt.length-1;rt>=0;rt--)if(pt[rt]!=ht[rt])return!1;for(rt=pt.length-1;rt>=0;rt--)if(ot=pt[rt],!deepEqual$1(et[ot],tt[ot],nt))return!1;return!0}var deepEqual_1=deepEqual$1;/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.16.1
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */var isBrowser$3=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration$1=function(){for(var et=["Edge","Trident","Firefox"],tt=0;tt<et.length;tt+=1)if(isBrowser$3&&navigator.userAgent.indexOf(et[tt])>=0)return 1;return 0}();function microtaskDebounce$1(et){var tt=!1;return function(){tt||(tt=!0,window.Promise.resolve().then(function(){tt=!1,et()}))}}function taskDebounce$1(et){var tt=!1;return function(){tt||(tt=!0,setTimeout(function(){tt=!1,et()},timeoutDuration$1))}}var supportsMicroTasks$1=isBrowser$3&&window.Promise,debounce$6=supportsMicroTasks$1?microtaskDebounce$1:taskDebounce$1;function isFunction$4(et){var tt={};return et&&tt.toString.call(et)==="[object Function]"}function getStyleComputedProperty$1(et,tt){if(et.nodeType!==1)return[];var nt=et.ownerDocument.defaultView,rt=nt.getComputedStyle(et,null);return tt?rt[tt]:rt}function getParentNode$2(et){return et.nodeName==="HTML"?et:et.parentNode||et.host}function getScrollParent$4(et){if(!et)return document.body;switch(et.nodeName){case"HTML":case"BODY":return et.ownerDocument.body;case"#document":return et.body}var tt=getStyleComputedProperty$1(et),nt=tt.overflow,rt=tt.overflowX,ot=tt.overflowY;return/(auto|scroll|overlay)/.test(nt+ot+rt)?et:getScrollParent$4(getParentNode$2(et))}function getReferenceNode$1(et){return et&&et.referenceNode?et.referenceNode:et}var isIE11$1=isBrowser$3&&!!(window.MSInputMethodContext&&document.documentMode),isIE10$1=isBrowser$3&&/MSIE 10/.test(navigator.userAgent);function isIE$2(et){return et===11?isIE11$1:et===10?isIE10$1:isIE11$1||isIE10$1}function getOffsetParent$2(et){if(!et)return document.documentElement;for(var tt=isIE$2(10)?document.body:null,nt=et.offsetParent||null;nt===tt&&et.nextElementSibling;)nt=(et=et.nextElementSibling).offsetParent;var rt=nt&&nt.nodeName;return!rt||rt==="BODY"||rt==="HTML"?et?et.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(nt.nodeName)!==-1&&getStyleComputedProperty$1(nt,"position")==="static"?getOffsetParent$2(nt):nt}function isOffsetContainer$1(et){var tt=et.nodeName;return tt==="BODY"?!1:tt==="HTML"||getOffsetParent$2(et.firstElementChild)===et}function getRoot$2(et){return et.parentNode!==null?getRoot$2(et.parentNode):et}function findCommonOffsetParent$1(et,tt){if(!et||!et.nodeType||!tt||!tt.nodeType)return document.documentElement;var nt=et.compareDocumentPosition(tt)&Node.DOCUMENT_POSITION_FOLLOWING,rt=nt?et:tt,ot=nt?tt:et,st=document.createRange();st.setStart(rt,0),st.setEnd(ot,0);var ut=st.commonAncestorContainer;if(et!==ut&&tt!==ut||rt.contains(ot))return isOffsetContainer$1(ut)?ut:getOffsetParent$2(ut);var ct=getRoot$2(et);return ct.host?findCommonOffsetParent$1(ct.host,tt):findCommonOffsetParent$1(et,getRoot$2(tt).host)}function getScroll$1(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",nt=tt==="top"?"scrollTop":"scrollLeft",rt=et.nodeName;if(rt==="BODY"||rt==="HTML"){var ot=et.ownerDocument.documentElement,st=et.ownerDocument.scrollingElement||ot;return st[nt]}return et[nt]}function includeScroll$1(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=getScroll$1(tt,"top"),ot=getScroll$1(tt,"left"),st=nt?-1:1;return et.top+=rt*st,et.bottom+=rt*st,et.left+=ot*st,et.right+=ot*st,et}function getBordersSize$2(et,tt){var nt=tt==="x"?"Left":"Top",rt=nt==="Left"?"Right":"Bottom";return parseFloat(et["border"+nt+"Width"])+parseFloat(et["border"+rt+"Width"])}function getSize$1(et,tt,nt,rt){return Math.max(tt["offset"+et],tt["scroll"+et],nt["client"+et],nt["offset"+et],nt["scroll"+et],isIE$2(10)?parseInt(nt["offset"+et])+parseInt(rt["margin"+(et==="Height"?"Top":"Left")])+parseInt(rt["margin"+(et==="Height"?"Bottom":"Right")]):0)}function getWindowSizes$1(et){var tt=et.body,nt=et.documentElement,rt=isIE$2(10)&&getComputedStyle(nt);return{height:getSize$1("Height",tt,nt,rt),width:getSize$1("Width",tt,nt,rt)}}var classCallCheck$1=function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")},createClass$1=function(){function et(tt,nt){for(var rt=0;rt<nt.length;rt++){var ot=nt[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,nt,rt){return nt&&et(tt.prototype,nt),rt&&et(tt,rt),tt}}(),defineProperty$3=function(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et},_extends$9=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et};function getClientRect$1(et){return _extends$9({},et,{right:et.left+et.width,bottom:et.top+et.height})}function getBoundingClientRect$2(et){var tt={};try{if(isIE$2(10)){tt=et.getBoundingClientRect();var nt=getScroll$1(et,"top"),rt=getScroll$1(et,"left");tt.top+=nt,tt.left+=rt,tt.bottom+=nt,tt.right+=rt}else tt=et.getBoundingClientRect()}catch{}var ot={left:tt.left,top:tt.top,width:tt.right-tt.left,height:tt.bottom-tt.top},st=et.nodeName==="HTML"?getWindowSizes$1(et.ownerDocument):{},ut=st.width||et.clientWidth||ot.width,ct=st.height||et.clientHeight||ot.height,ft=et.offsetWidth-ut,pt=et.offsetHeight-ct;if(ft||pt){var ht=getStyleComputedProperty$1(et);ft-=getBordersSize$2(ht,"x"),pt-=getBordersSize$2(ht,"y"),ot.width-=ft,ot.height-=pt}return getClientRect$1(ot)}function getOffsetRectRelativeToArbitraryNode$1(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=isIE$2(10),ot=tt.nodeName==="HTML",st=getBoundingClientRect$2(et),ut=getBoundingClientRect$2(tt),ct=getScrollParent$4(et),ft=getStyleComputedProperty$1(tt),pt=parseFloat(ft.borderTopWidth),ht=parseFloat(ft.borderLeftWidth);nt&&ot&&(ut.top=Math.max(ut.top,0),ut.left=Math.max(ut.left,0));var mt=getClientRect$1({top:st.top-ut.top-pt,left:st.left-ut.left-ht,width:st.width,height:st.height});if(mt.marginTop=0,mt.marginLeft=0,!rt&&ot){var yt=parseFloat(ft.marginTop),vt=parseFloat(ft.marginLeft);mt.top-=pt-yt,mt.bottom-=pt-yt,mt.left-=ht-vt,mt.right-=ht-vt,mt.marginTop=yt,mt.marginLeft=vt}return(rt&&!nt?tt.contains(ct):tt===ct&&ct.nodeName!=="BODY")&&(mt=includeScroll$1(mt,tt)),mt}function getViewportOffsetRectRelativeToArtbitraryNode$1(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=et.ownerDocument.documentElement,rt=getOffsetRectRelativeToArbitraryNode$1(et,nt),ot=Math.max(nt.clientWidth,window.innerWidth||0),st=Math.max(nt.clientHeight,window.innerHeight||0),ut=tt?0:getScroll$1(nt),ct=tt?0:getScroll$1(nt,"left"),ft={top:ut-rt.top+rt.marginTop,left:ct-rt.left+rt.marginLeft,width:ot,height:st};return getClientRect$1(ft)}function isFixed$1(et){var tt=et.nodeName;if(tt==="BODY"||tt==="HTML")return!1;if(getStyleComputedProperty$1(et,"position")==="fixed")return!0;var nt=getParentNode$2(et);return nt?isFixed$1(nt):!1}function getFixedPositionOffsetParent$1(et){if(!et||!et.parentElement||isIE$2())return document.documentElement;for(var tt=et.parentElement;tt&&getStyleComputedProperty$1(tt,"transform")==="none";)tt=tt.parentElement;return tt||document.documentElement}function getBoundaries$1(et,tt,nt,rt){var ot=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,st={top:0,left:0},ut=ot?getFixedPositionOffsetParent$1(et):findCommonOffsetParent$1(et,getReferenceNode$1(tt));if(rt==="viewport")st=getViewportOffsetRectRelativeToArtbitraryNode$1(ut,ot);else{var ct=void 0;rt==="scrollParent"?(ct=getScrollParent$4(getParentNode$2(tt)),ct.nodeName==="BODY"&&(ct=et.ownerDocument.documentElement)):rt==="window"?ct=et.ownerDocument.documentElement:ct=rt;var ft=getOffsetRectRelativeToArbitraryNode$1(ct,ut,ot);if(ct.nodeName==="HTML"&&!isFixed$1(ut)){var pt=getWindowSizes$1(et.ownerDocument),ht=pt.height,mt=pt.width;st.top+=ft.top-ft.marginTop,st.bottom=ht+ft.top,st.left+=ft.left-ft.marginLeft,st.right=mt+ft.left}else st=ft}nt=nt||0;var yt=typeof nt=="number";return st.left+=yt?nt:nt.left||0,st.top+=yt?nt:nt.top||0,st.right-=yt?nt:nt.right||0,st.bottom-=yt?nt:nt.bottom||0,st}function getArea$1(et){var tt=et.width,nt=et.height;return tt*nt}function computeAutoPlacement$1(et,tt,nt,rt,ot){var st=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(et.indexOf("auto")===-1)return et;var ut=getBoundaries$1(nt,rt,st,ot),ct={top:{width:ut.width,height:tt.top-ut.top},right:{width:ut.right-tt.right,height:ut.height},bottom:{width:ut.width,height:ut.bottom-tt.bottom},left:{width:tt.left-ut.left,height:ut.height}},ft=Object.keys(ct).map(function(yt){return _extends$9({key:yt},ct[yt],{area:getArea$1(ct[yt])})}).sort(function(yt,vt){return vt.area-yt.area}),pt=ft.filter(function(yt){var vt=yt.width,Tt=yt.height;return vt>=nt.clientWidth&&Tt>=nt.clientHeight}),ht=pt.length>0?pt[0].key:ft[0].key,mt=et.split("-")[1];return ht+(mt?"-"+mt:"")}function getReferenceOffsets$1(et,tt,nt){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,ot=rt?getFixedPositionOffsetParent$1(tt):findCommonOffsetParent$1(tt,getReferenceNode$1(nt));return getOffsetRectRelativeToArbitraryNode$1(nt,ot,rt)}function getOuterSizes$1(et){var tt=et.ownerDocument.defaultView,nt=tt.getComputedStyle(et),rt=parseFloat(nt.marginTop||0)+parseFloat(nt.marginBottom||0),ot=parseFloat(nt.marginLeft||0)+parseFloat(nt.marginRight||0),st={width:et.offsetWidth+ot,height:et.offsetHeight+rt};return st}function getOppositePlacement$2(et){var tt={left:"right",right:"left",bottom:"top",top:"bottom"};return et.replace(/left|right|bottom|top/g,function(nt){return tt[nt]})}function getPopperOffsets$1(et,tt,nt){nt=nt.split("-")[0];var rt=getOuterSizes$1(et),ot={width:rt.width,height:rt.height},st=["right","left"].indexOf(nt)!==-1,ut=st?"top":"left",ct=st?"left":"top",ft=st?"height":"width",pt=st?"width":"height";return ot[ut]=tt[ut]+tt[ft]/2-rt[ft]/2,nt===ct?ot[ct]=tt[ct]-rt[pt]:ot[ct]=tt[getOppositePlacement$2(ct)],ot}function find$9(et,tt){return Array.prototype.find?et.find(tt):et.filter(tt)[0]}function findIndex$2(et,tt,nt){if(Array.prototype.findIndex)return et.findIndex(function(ot){return ot[tt]===nt});var rt=find$9(et,function(ot){return ot[tt]===nt});return et.indexOf(rt)}function runModifiers$1(et,tt,nt){var rt=nt===void 0?et:et.slice(0,findIndex$2(et,"name",nt));return rt.forEach(function(ot){ot.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var st=ot.function||ot.fn;ot.enabled&&isFunction$4(st)&&(tt.offsets.popper=getClientRect$1(tt.offsets.popper),tt.offsets.reference=getClientRect$1(tt.offsets.reference),tt=st(tt,ot))}),tt}function update$8(){if(!this.state.isDestroyed){var et={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};et.offsets.reference=getReferenceOffsets$1(this.state,this.popper,this.reference,this.options.positionFixed),et.placement=computeAutoPlacement$1(this.options.placement,et.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),et.originalPlacement=et.placement,et.positionFixed=this.options.positionFixed,et.offsets.popper=getPopperOffsets$1(this.popper,et.offsets.reference,et.placement),et.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",et=runModifiers$1(this.modifiers,et),this.state.isCreated?this.options.onUpdate(et):(this.state.isCreated=!0,this.options.onCreate(et))}}function isModifierEnabled$1(et,tt){return et.some(function(nt){var rt=nt.name,ot=nt.enabled;return ot&&rt===tt})}function getSupportedPropertyName$1(et){for(var tt=[!1,"ms","Webkit","Moz","O"],nt=et.charAt(0).toUpperCase()+et.slice(1),rt=0;rt<tt.length;rt++){var ot=tt[rt],st=ot?""+ot+nt:et;if(typeof document.body.style[st]<"u")return st}return null}function destroy$1(){return this.state.isDestroyed=!0,isModifierEnabled$1(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName$1("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow$2(et){var tt=et.ownerDocument;return tt?tt.defaultView:window}function attachToScrollParents$1(et,tt,nt,rt){var ot=et.nodeName==="BODY",st=ot?et.ownerDocument.defaultView:et;st.addEventListener(tt,nt,{passive:!0}),ot||attachToScrollParents$1(getScrollParent$4(st.parentNode),tt,nt,rt),rt.push(st)}function setupEventListeners$1(et,tt,nt,rt){nt.updateBound=rt,getWindow$2(et).addEventListener("resize",nt.updateBound,{passive:!0});var ot=getScrollParent$4(et);return attachToScrollParents$1(ot,"scroll",nt.updateBound,nt.scrollParents),nt.scrollElement=ot,nt.eventsEnabled=!0,nt}function enableEventListeners$1(){this.state.eventsEnabled||(this.state=setupEventListeners$1(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners$1(et,tt){return getWindow$2(et).removeEventListener("resize",tt.updateBound),tt.scrollParents.forEach(function(nt){nt.removeEventListener("scroll",tt.updateBound)}),tt.updateBound=null,tt.scrollParents=[],tt.scrollElement=null,tt.eventsEnabled=!1,tt}function disableEventListeners$1(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners$1(this.reference,this.state))}function isNumeric$2(et){return et!==""&&!isNaN(parseFloat(et))&&isFinite(et)}function setStyles$1(et,tt){Object.keys(tt).forEach(function(nt){var rt="";["width","height","top","right","bottom","left"].indexOf(nt)!==-1&&isNumeric$2(tt[nt])&&(rt="px"),et.style[nt]=tt[nt]+rt})}function setAttributes$2(et,tt){Object.keys(tt).forEach(function(nt){var rt=tt[nt];rt!==!1?et.setAttribute(nt,tt[nt]):et.removeAttribute(nt)})}function applyStyle$1(et){return setStyles$1(et.instance.popper,et.styles),setAttributes$2(et.instance.popper,et.attributes),et.arrowElement&&Object.keys(et.arrowStyles).length&&setStyles$1(et.arrowElement,et.arrowStyles),et}function applyStyleOnLoad$1(et,tt,nt,rt,ot){var st=getReferenceOffsets$1(ot,tt,et,nt.positionFixed),ut=computeAutoPlacement$1(nt.placement,st,tt,et,nt.modifiers.flip.boundariesElement,nt.modifiers.flip.padding);return tt.setAttribute("x-placement",ut),setStyles$1(tt,{position:nt.positionFixed?"fixed":"absolute"}),nt}function getRoundedOffsets$1(et,tt){var nt=et.offsets,rt=nt.popper,ot=nt.reference,st=Math.round,ut=Math.floor,ct=function(At){return At},ft=st(ot.width),pt=st(rt.width),ht=["left","right"].indexOf(et.placement)!==-1,mt=et.placement.indexOf("-")!==-1,yt=ft%2===pt%2,vt=ft%2===1&&pt%2===1,Tt=tt?ht||mt||yt?st:ut:ct,Et=tt?st:ct;return{left:Tt(vt&&!mt&&tt?rt.left-1:rt.left),top:Et(rt.top),bottom:Et(rt.bottom),right:Tt(rt.right)}}var isFirefox$2=isBrowser$3&&/Firefox/i.test(navigator.userAgent);function computeStyle$1(et,tt){var nt=tt.x,rt=tt.y,ot=et.offsets.popper,st=find$9(et.instance.modifiers,function($t){return $t.name==="applyStyle"}).gpuAcceleration;st!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var ut=st!==void 0?st:tt.gpuAcceleration,ct=getOffsetParent$2(et.instance.popper),ft=getBoundingClientRect$2(ct),pt={position:ot.position},ht=getRoundedOffsets$1(et,window.devicePixelRatio<2||!isFirefox$2),mt=nt==="bottom"?"top":"bottom",yt=rt==="right"?"left":"right",vt=getSupportedPropertyName$1("transform"),Tt=void 0,Et=void 0;if(mt==="bottom"?ct.nodeName==="HTML"?Et=-ct.clientHeight+ht.bottom:Et=-ft.height+ht.bottom:Et=ht.top,yt==="right"?ct.nodeName==="HTML"?Tt=-ct.clientWidth+ht.right:Tt=-ft.width+ht.right:Tt=ht.left,ut&&vt)pt[vt]="translate3d("+Tt+"px, "+Et+"px, 0)",pt[mt]=0,pt[yt]=0,pt.willChange="transform";else{var xt=mt==="bottom"?-1:1,At=yt==="right"?-1:1;pt[mt]=Et*xt,pt[yt]=Tt*At,pt.willChange=mt+", "+yt}var Ct={"x-placement":et.placement};return et.attributes=_extends$9({},Ct,et.attributes),et.styles=_extends$9({},pt,et.styles),et.arrowStyles=_extends$9({},et.offsets.arrow,et.arrowStyles),et}function isModifierRequired$1(et,tt,nt){var rt=find$9(et,function(ct){var ft=ct.name;return ft===tt}),ot=!!rt&&et.some(function(ct){return ct.name===nt&&ct.enabled&&ct.order<rt.order});if(!ot){var st="`"+tt+"`",ut="`"+nt+"`";console.warn(ut+" modifier is required by "+st+" modifier in order to work, be sure to include it before "+st+"!")}return ot}function arrow$1(et,tt){var nt;if(!isModifierRequired$1(et.instance.modifiers,"arrow","keepTogether"))return et;var rt=tt.element;if(typeof rt=="string"){if(rt=et.instance.popper.querySelector(rt),!rt)return et}else if(!et.instance.popper.contains(rt))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),et;var ot=et.placement.split("-")[0],st=et.offsets,ut=st.popper,ct=st.reference,ft=["left","right"].indexOf(ot)!==-1,pt=ft?"height":"width",ht=ft?"Top":"Left",mt=ht.toLowerCase(),yt=ft?"left":"top",vt=ft?"bottom":"right",Tt=getOuterSizes$1(rt)[pt];ct[vt]-Tt<ut[mt]&&(et.offsets.popper[mt]-=ut[mt]-(ct[vt]-Tt)),ct[mt]+Tt>ut[vt]&&(et.offsets.popper[mt]+=ct[mt]+Tt-ut[vt]),et.offsets.popper=getClientRect$1(et.offsets.popper);var Et=ct[mt]+ct[pt]/2-Tt/2,xt=getStyleComputedProperty$1(et.instance.popper),At=parseFloat(xt["margin"+ht]),Ct=parseFloat(xt["border"+ht+"Width"]),$t=Et-et.offsets.popper[mt]-At-Ct;return $t=Math.max(Math.min(ut[pt]-Tt,$t),0),et.arrowElement=rt,et.offsets.arrow=(nt={},defineProperty$3(nt,mt,Math.round($t)),defineProperty$3(nt,yt,""),nt),et}function getOppositeVariation$1(et){return et==="end"?"start":et==="start"?"end":et}var placements$1=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements$1=placements$1.slice(3);function clockwise$1(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=validPlacements$1.indexOf(et),rt=validPlacements$1.slice(nt+1).concat(validPlacements$1.slice(0,nt));return tt?rt.reverse():rt}var BEHAVIORS$1={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip$3(et,tt){if(isModifierEnabled$1(et.instance.modifiers,"inner")||et.flipped&&et.placement===et.originalPlacement)return et;var nt=getBoundaries$1(et.instance.popper,et.instance.reference,tt.padding,tt.boundariesElement,et.positionFixed),rt=et.placement.split("-")[0],ot=getOppositePlacement$2(rt),st=et.placement.split("-")[1]||"",ut=[];switch(tt.behavior){case BEHAVIORS$1.FLIP:ut=[rt,ot];break;case BEHAVIORS$1.CLOCKWISE:ut=clockwise$1(rt);break;case BEHAVIORS$1.COUNTERCLOCKWISE:ut=clockwise$1(rt,!0);break;default:ut=tt.behavior}return ut.forEach(function(ct,ft){if(rt!==ct||ut.length===ft+1)return et;rt=et.placement.split("-")[0],ot=getOppositePlacement$2(rt);var pt=et.offsets.popper,ht=et.offsets.reference,mt=Math.floor,yt=rt==="left"&&mt(pt.right)>mt(ht.left)||rt==="right"&&mt(pt.left)<mt(ht.right)||rt==="top"&&mt(pt.bottom)>mt(ht.top)||rt==="bottom"&&mt(pt.top)<mt(ht.bottom),vt=mt(pt.left)<mt(nt.left),Tt=mt(pt.right)>mt(nt.right),Et=mt(pt.top)<mt(nt.top),xt=mt(pt.bottom)>mt(nt.bottom),At=rt==="left"&&vt||rt==="right"&&Tt||rt==="top"&&Et||rt==="bottom"&&xt,Ct=["top","bottom"].indexOf(rt)!==-1,$t=!!tt.flipVariations&&(Ct&&st==="start"&&vt||Ct&&st==="end"&&Tt||!Ct&&st==="start"&&Et||!Ct&&st==="end"&&xt),Ot=!!tt.flipVariationsByContent&&(Ct&&st==="start"&&Tt||Ct&&st==="end"&&vt||!Ct&&st==="start"&&xt||!Ct&&st==="end"&&Et),Rt=$t||Ot;(yt||At||Rt)&&(et.flipped=!0,(yt||At)&&(rt=ut[ft+1]),Rt&&(st=getOppositeVariation$1(st)),et.placement=rt+(st?"-"+st:""),et.offsets.popper=_extends$9({},et.offsets.popper,getPopperOffsets$1(et.instance.popper,et.offsets.reference,et.placement)),et=runModifiers$1(et.instance.modifiers,et,"flip"))}),et}function keepTogether$1(et){var tt=et.offsets,nt=tt.popper,rt=tt.reference,ot=et.placement.split("-")[0],st=Math.floor,ut=["top","bottom"].indexOf(ot)!==-1,ct=ut?"right":"bottom",ft=ut?"left":"top",pt=ut?"width":"height";return nt[ct]<st(rt[ft])&&(et.offsets.popper[ft]=st(rt[ft])-nt[pt]),nt[ft]>st(rt[ct])&&(et.offsets.popper[ft]=st(rt[ct])),et}function toValue$1(et,tt,nt,rt){var ot=et.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),st=+ot[1],ut=ot[2];if(!st)return et;if(ut.indexOf("%")===0){var ct=void 0;switch(ut){case"%p":ct=nt;break;case"%":case"%r":default:ct=rt}var ft=getClientRect$1(ct);return ft[tt]/100*st}else if(ut==="vh"||ut==="vw"){var pt=void 0;return ut==="vh"?pt=Math.max(document.documentElement.clientHeight,window.innerHeight||0):pt=Math.max(document.documentElement.clientWidth,window.innerWidth||0),pt/100*st}else return st}function parseOffset$1(et,tt,nt,rt){var ot=[0,0],st=["right","left"].indexOf(rt)!==-1,ut=et.split(/(\+|\-)/).map(function(ht){return ht.trim()}),ct=ut.indexOf(find$9(ut,function(ht){return ht.search(/,|\s/)!==-1}));ut[ct]&&ut[ct].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ft=/\s*,\s*|\s+/,pt=ct!==-1?[ut.slice(0,ct).concat([ut[ct].split(ft)[0]]),[ut[ct].split(ft)[1]].concat(ut.slice(ct+1))]:[ut];return pt=pt.map(function(ht,mt){var yt=(mt===1?!st:st)?"height":"width",vt=!1;return ht.reduce(function(Tt,Et){return Tt[Tt.length-1]===""&&["+","-"].indexOf(Et)!==-1?(Tt[Tt.length-1]=Et,vt=!0,Tt):vt?(Tt[Tt.length-1]+=Et,vt=!1,Tt):Tt.concat(Et)},[]).map(function(Tt){return toValue$1(Tt,yt,tt,nt)})}),pt.forEach(function(ht,mt){ht.forEach(function(yt,vt){isNumeric$2(yt)&&(ot[mt]+=yt*(ht[vt-1]==="-"?-1:1))})}),ot}function offset$5(et,tt){var nt=tt.offset,rt=et.placement,ot=et.offsets,st=ot.popper,ut=ot.reference,ct=rt.split("-")[0],ft=void 0;return isNumeric$2(+nt)?ft=[+nt,0]:ft=parseOffset$1(nt,st,ut,ct),ct==="left"?(st.top+=ft[0],st.left-=ft[1]):ct==="right"?(st.top+=ft[0],st.left+=ft[1]):ct==="top"?(st.left+=ft[0],st.top-=ft[1]):ct==="bottom"&&(st.left+=ft[0],st.top+=ft[1]),et.popper=st,et}function preventOverflow$1(et,tt){var nt=tt.boundariesElement||getOffsetParent$2(et.instance.popper);et.instance.reference===nt&&(nt=getOffsetParent$2(nt));var rt=getSupportedPropertyName$1("transform"),ot=et.instance.popper.style,st=ot.top,ut=ot.left,ct=ot[rt];ot.top="",ot.left="",ot[rt]="";var ft=getBoundaries$1(et.instance.popper,et.instance.reference,tt.padding,nt,et.positionFixed);ot.top=st,ot.left=ut,ot[rt]=ct,tt.boundaries=ft;var pt=tt.priority,ht=et.offsets.popper,mt={primary:function(vt){var Tt=ht[vt];return ht[vt]<ft[vt]&&!tt.escapeWithReference&&(Tt=Math.max(ht[vt],ft[vt])),defineProperty$3({},vt,Tt)},secondary:function(vt){var Tt=vt==="right"?"left":"top",Et=ht[Tt];return ht[vt]>ft[vt]&&!tt.escapeWithReference&&(Et=Math.min(ht[Tt],ft[vt]-(vt==="right"?ht.width:ht.height))),defineProperty$3({},Tt,Et)}};return pt.forEach(function(yt){var vt=["left","top"].indexOf(yt)!==-1?"primary":"secondary";ht=_extends$9({},ht,mt[vt](yt))}),et.offsets.popper=ht,et}function shift$2(et){var tt=et.placement,nt=tt.split("-")[0],rt=tt.split("-")[1];if(rt){var ot=et.offsets,st=ot.reference,ut=ot.popper,ct=["bottom","top"].indexOf(nt)!==-1,ft=ct?"left":"top",pt=ct?"width":"height",ht={start:defineProperty$3({},ft,st[ft]),end:defineProperty$3({},ft,st[ft]+st[pt]-ut[pt])};et.offsets.popper=_extends$9({},ut,ht[rt])}return et}function hide$1(et){if(!isModifierRequired$1(et.instance.modifiers,"hide","preventOverflow"))return et;var tt=et.offsets.reference,nt=find$9(et.instance.modifiers,function(rt){return rt.name==="preventOverflow"}).boundaries;if(tt.bottom<nt.top||tt.left>nt.right||tt.top>nt.bottom||tt.right<nt.left){if(et.hide===!0)return et;et.hide=!0,et.attributes["x-out-of-boundaries"]=""}else{if(et.hide===!1)return et;et.hide=!1,et.attributes["x-out-of-boundaries"]=!1}return et}function inner$1(et){var tt=et.placement,nt=tt.split("-")[0],rt=et.offsets,ot=rt.popper,st=rt.reference,ut=["left","right"].indexOf(nt)!==-1,ct=["top","left"].indexOf(nt)===-1;return ot[ut?"left":"top"]=st[nt]-(ct?ot[ut?"width":"height"]:0),et.placement=getOppositePlacement$2(tt),et.offsets.popper=getClientRect$1(ot),et}var modifiers$1={shift:{order:100,enabled:!0,fn:shift$2},offset:{order:200,enabled:!0,fn:offset$5,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow$1,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether$1},arrow:{order:500,enabled:!0,fn:arrow$1,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip$3,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner$1},hide:{order:800,enabled:!0,fn:hide$1},computeStyle:{order:850,enabled:!0,fn:computeStyle$1,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle$1,onLoad:applyStyleOnLoad$1,gpuAcceleration:void 0}},Defaults$1={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function et(){},onUpdate:function et(){},modifiers:modifiers$1},Popper$4=function(){function et(tt,nt){var rt=this,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck$1(this,et),this.scheduleUpdate=function(){return requestAnimationFrame(rt.update)},this.update=debounce$6(this.update.bind(this)),this.options=_extends$9({},et.Defaults,ot),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=tt&&tt.jquery?tt[0]:tt,this.popper=nt&&nt.jquery?nt[0]:nt,this.options.modifiers={},Object.keys(_extends$9({},et.Defaults.modifiers,ot.modifiers)).forEach(function(ut){rt.options.modifiers[ut]=_extends$9({},et.Defaults.modifiers[ut]||{},ot.modifiers?ot.modifiers[ut]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(ut){return _extends$9({name:ut},rt.options.modifiers[ut])}).sort(function(ut,ct){return ut.order-ct.order}),this.modifiers.forEach(function(ut){ut.enabled&&isFunction$4(ut.onLoad)&&ut.onLoad(rt.reference,rt.popper,rt.options,ut,rt.state)}),this.update();var st=this.options.eventsEnabled;st&&this.enableEventListeners(),this.state.eventsEnabled=st}return createClass$1(et,[{key:"update",value:function(){return update$8.call(this)}},{key:"destroy",value:function(){return destroy$1.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners$1.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners$1.call(this)}}]),et}();Popper$4.Utils=(typeof window<"u"?window:global).PopperUtils;Popper$4.placements=placements$1;Popper$4.Defaults=Defaults$1;const PopperJS=Popper$4;var lib$3={exports:{}},implementation={exports:{}},key$5="__global_unique_id__",gud=function(){return commonjsGlobal$1[key$5]=(commonjsGlobal$1[key$5]||0)+1},warning$1=function(){},warning_1=warning$1;(function(et,tt){tt.__esModule=!0;var nt=react.exports;ft(nt);var rt=propTypes$1.exports,ot=ft(rt),st=gud,ut=ft(st),ct=warning_1;ft(ct);function ft(At){return At&&At.__esModule?At:{default:At}}function pt(At,Ct){if(!(At instanceof Ct))throw new TypeError("Cannot call a class as a function")}function ht(At,Ct){if(!At)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ct&&(typeof Ct=="object"||typeof Ct=="function")?Ct:At}function mt(At,Ct){if(typeof Ct!="function"&&Ct!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ct);At.prototype=Object.create(Ct&&Ct.prototype,{constructor:{value:At,enumerable:!1,writable:!0,configurable:!0}}),Ct&&(Object.setPrototypeOf?Object.setPrototypeOf(At,Ct):At.__proto__=Ct)}var yt=1073741823;function vt(At,Ct){return At===Ct?At!==0||1/At===1/Ct:At!==At&&Ct!==Ct}function Tt(At){var Ct=[];return{on:function(Ot){Ct.push(Ot)},off:function(Ot){Ct=Ct.filter(function(Rt){return Rt!==Ot})},get:function(){return At},set:function(Ot,Rt){At=Ot,Ct.forEach(function(It){return It(At,Rt)})}}}function Et(At){return Array.isArray(At)?At[0]:At}function xt(At,Ct){var $t,Ot,Rt="__create-react-context-"+(0,ut.default)()+"__",It=function(Mt){mt(Ft,Mt);function Ft(){var zt,Vt,Zt;pt(this,Ft);for(var Ut=arguments.length,Xt=Array(Ut),Jt=0;Jt<Ut;Jt++)Xt[Jt]=arguments[Jt];return Zt=(zt=(Vt=ht(this,Mt.call.apply(Mt,[this].concat(Xt))),Vt),Vt.emitter=Tt(Vt.props.value),zt),ht(Vt,Zt)}return Ft.prototype.getChildContext=function(){var Vt;return Vt={},Vt[Rt]=this.emitter,Vt},Ft.prototype.componentWillReceiveProps=function(Vt){if(this.props.value!==Vt.value){var Zt=this.props.value,Ut=Vt.value,Xt=void 0;vt(Zt,Ut)?Xt=0:(Xt=typeof Ct=="function"?Ct(Zt,Ut):yt,Xt|=0,Xt!==0&&this.emitter.set(Vt.value,Xt))}},Ft.prototype.render=function(){return this.props.children},Ft}(nt.Component);It.childContextTypes=($t={},$t[Rt]=ot.default.object.isRequired,$t);var kt=function(Mt){mt(Ft,Mt);function Ft(){var zt,Vt,Zt;pt(this,Ft);for(var Ut=arguments.length,Xt=Array(Ut),Jt=0;Jt<Ut;Jt++)Xt[Jt]=arguments[Jt];return Zt=(zt=(Vt=ht(this,Mt.call.apply(Mt,[this].concat(Xt))),Vt),Vt.state={value:Vt.getValue()},Vt.onUpdate=function(gn,An){var sn=Vt.observedBits|0;(sn&An)!==0&&Vt.setState({value:Vt.getValue()})},zt),ht(Vt,Zt)}return Ft.prototype.componentWillReceiveProps=function(Vt){var Zt=Vt.observedBits;this.observedBits=Zt??yt},Ft.prototype.componentDidMount=function(){this.context[Rt]&&this.context[Rt].on(this.onUpdate);var Vt=this.props.observedBits;this.observedBits=Vt??yt},Ft.prototype.componentWillUnmount=function(){this.context[Rt]&&this.context[Rt].off(this.onUpdate)},Ft.prototype.getValue=function(){return this.context[Rt]?this.context[Rt].get():At},Ft.prototype.render=function(){return Et(this.props.children)(this.state.value)},Ft}(nt.Component);return kt.contextTypes=(Ot={},Ot[Rt]=ot.default.object,Ot),{Provider:It,Consumer:kt}}tt.default=xt,et.exports=tt.default})(implementation,implementation.exports);(function(et,tt){tt.__esModule=!0;var nt=react.exports,rt=ut(nt),ot=implementation.exports,st=ut(ot);function ut(ct){return ct&&ct.__esModule?ct:{default:ct}}tt.default=rt.default.createContext||st.default,et.exports=tt.default})(lib$3,lib$3.exports);const createContext$1=getDefaultExportFromCjs$1(lib$3.exports);var ManagerReferenceNodeContext=createContext$1();createContext$1();var unwrapArray=function et(tt){return Array.isArray(tt)?tt[0]:tt},safeInvoke=function et(tt){if(typeof tt=="function"){for(var nt=arguments.length,rt=new Array(nt>1?nt-1:0),ot=1;ot<nt;ot++)rt[ot-1]=arguments[ot];return tt.apply(void 0,rt)}},setRef$1=function et(tt,nt){if(typeof tt=="function")return safeInvoke(tt,nt);tt!=null&&(tt.current=nt)},initialStyle={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},initialArrowStyle={},InnerPopper=function(et){_inheritsLoose$5(tt,et);function tt(){for(var rt,ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=et.call.apply(et,[this].concat(st))||this,_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"state",{data:void 0,placement:void 0}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"popperInstance",void 0),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"popperNode",null),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"arrowNode",null),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"setPopperNode",function(ct){!ct||rt.popperNode===ct||(setRef$1(rt.props.innerRef,ct),rt.popperNode=ct,rt.updatePopperInstance())}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"setArrowNode",function(ct){rt.arrowNode=ct}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"updateStateModifier",{enabled:!0,order:900,fn:function(ft){var pt=ft.placement;return rt.setState({data:ft,placement:pt}),ft}}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"getOptions",function(){return{placement:rt.props.placement,eventsEnabled:rt.props.eventsEnabled,positionFixed:rt.props.positionFixed,modifiers:_extends$a({},rt.props.modifiers,{arrow:_extends$a({},rt.props.modifiers&&rt.props.modifiers.arrow,{enabled:!!rt.arrowNode,element:rt.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:rt.updateStateModifier})}}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"getPopperStyle",function(){return!rt.popperNode||!rt.state.data?initialStyle:_extends$a({position:rt.state.data.offsets.popper.position},rt.state.data.styles)}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"getPopperPlacement",function(){return rt.state.data?rt.state.placement:void 0}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"getArrowStyle",function(){return!rt.arrowNode||!rt.state.data?initialArrowStyle:rt.state.data.arrowStyles}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"getOutOfBoundariesState",function(){return rt.state.data?rt.state.data.hide:void 0}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"destroyPopperInstance",function(){!rt.popperInstance||(rt.popperInstance.destroy(),rt.popperInstance=null)}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"updatePopperInstance",function(){rt.destroyPopperInstance();var ct=_assertThisInitialized$2(_assertThisInitialized$2(rt)),ft=ct.popperNode,pt=rt.props.referenceElement;!pt||!ft||(rt.popperInstance=new PopperJS(pt,ft,rt.getOptions()))}),_defineProperty$d(_assertThisInitialized$2(_assertThisInitialized$2(rt)),"scheduleUpdate",function(){rt.popperInstance&&rt.popperInstance.scheduleUpdate()}),rt}var nt=tt.prototype;return nt.componentDidUpdate=function(ot,st){this.props.placement!==ot.placement||this.props.referenceElement!==ot.referenceElement||this.props.positionFixed!==ot.positionFixed||!deepEqual_1(this.props.modifiers,ot.modifiers,{strict:!0})?this.updatePopperInstance():this.props.eventsEnabled!==ot.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()),st.placement!==this.state.placement&&this.scheduleUpdate()},nt.componentWillUnmount=function(){setRef$1(this.props.innerRef,null),this.destroyPopperInstance()},nt.render=function(){return unwrapArray(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},tt}(react.exports.Component);_defineProperty$d(InnerPopper,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});PopperJS.placements;function Popper$3(et){var tt=et.referenceElement,nt=_objectWithoutPropertiesLoose$7(et,["referenceElement"]);return react.exports.createElement(ManagerReferenceNodeContext.Consumer,null,function(rt){return react.exports.createElement(InnerPopper,_extends$a({referenceElement:tt!==void 0?tt:rt},nt))})}var baseForOwn=_baseForOwn;function baseInverter$1(et,tt,nt,rt){return baseForOwn(et,function(ot,st,ut){tt(rt,nt(ot),st,ut)}),rt}var _baseInverter=baseInverter$1,baseInverter=_baseInverter;function createInverter$1(et,tt){return function(nt,rt){return baseInverter(nt,et,tt(rt),{})}}var _createInverter=createInverter$1,constant$7=constant_1,createInverter=_createInverter,identity$8=identity_1,objectProto=Object.prototype,nativeObjectToString=objectProto.toString,invert$1=createInverter(function(et,tt,nt){tt!=null&&typeof tt.toString!="function"&&(tt=nativeObjectToString.call(tt)),et[tt]=nt},constant$7(identity$8)),invert_1=invert$1;const _invert=invert_1;var positionsMapping={"top center":"top","top left":"top-start","top right":"top-end","bottom center":"bottom","bottom left":"bottom-start","bottom right":"bottom-end","right center":"right","left center":"left"};keys_1(positionsMapping);var placementMapping=_invert(positionsMapping),memoizeExports=requireMemoize(),ReferenceProxy=function(){function et(tt){_classCallCheck$2(this,et),this.ref=tt}return _createClass$2(et,[{key:"getBoundingClientRect",value:function(){return invoke_1(this.ref.current,"getBoundingClientRect",{})}},{key:"clientWidth",get:function(){return this.getBoundingClientRect().width}},{key:"clientHeight",get:function(){return this.getBoundingClientRect().height}},{key:"parentNode",get:function(){return this.ref.current?this.ref.current.parentNode:void 0}}]),et}(),createReferenceProxy=memoizeExports(function(et){return new ReferenceProxy(isRefObject$2(et)?et:toRefObject$1(et))});const createReferenceProxy$1=createReferenceProxy;function PopupContent(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("content",nt),st=getUnhandledProps$1(PopupContent,et),ut=getElementType(PopupContent,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}PopupContent.handledProps=["as","children","className","content"];PopupContent.propTypes={};PopupContent.create=createShorthandFactory(PopupContent,function(et){return{children:et}});function PopupHeader(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("header",nt),st=getUnhandledProps$1(PopupHeader,et),ut=getElementType(PopupHeader,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}PopupHeader.handledProps=["as","children","className","content"];PopupHeader.propTypes={};PopupHeader.create=createShorthandFactory(PopupHeader,function(et){return{children:et}});var Popup$1=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"state",{}),_defineProperty$d(_assertThisInitialized$2(rt),"open",!1),_defineProperty$d(_assertThisInitialized$2(rt),"triggerRef",react.exports.createRef()),_defineProperty$d(_assertThisInitialized$2(rt),"getPortalProps",function(){var ct={},ft=rt.props,pt=ft.on,ht=ft.hoverable,mt=isArray_1(pt)?pt:[pt];return ht&&(ct.closeOnPortalMouseLeave=!0,ct.mouseLeaveDelay=300),includes_1(mt,"hover")&&(ct.openOnTriggerClick=!1,ct.closeOnTriggerClick=!1,ct.openOnTriggerMouseEnter=!0,ct.closeOnTriggerMouseLeave=!0,ct.mouseLeaveDelay=70,ct.mouseEnterDelay=50),includes_1(mt,"click")&&(ct.openOnTriggerClick=!0,ct.closeOnTriggerClick=!0,ct.closeOnDocumentClick=!0),includes_1(mt,"focus")&&(ct.openOnTriggerFocus=!0,ct.closeOnTriggerBlur=!0),ct}),_defineProperty$d(_assertThisInitialized$2(rt),"hideOnScroll",function(ct){rt.setState({closed:!0}),instance.unsub("scroll",rt.hideOnScroll,{target:window}),rt.timeoutId=setTimeout(function(){rt.setState({closed:!1})},50),rt.handleClose(ct)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleClose",function(ct){invoke_1(rt.props,"onClose",ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"handleOpen",function(ct){invoke_1(rt.props,"onOpen",ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalMount",function(ct){invoke_1(rt.props,"onMount",ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"handlePortalUnmount",function(ct){rt.positionUpdate=null,invoke_1(rt.props,"onUnmount",ct,rt.props)}),_defineProperty$d(_assertThisInitialized$2(rt),"renderContent",function(ct){var ft=ct.placement,pt=ct.ref,ht=ct.scheduleUpdate,mt=ct.style,yt=rt.props,vt=yt.basic,Tt=yt.children,Et=yt.className,xt=yt.content,At=yt.hideOnScroll,Ct=yt.flowing,$t=yt.header,Ot=yt.inverted,Rt=yt.size,It=yt.style,kt=yt.wide,Mt=rt.state.contentRestProps;rt.positionUpdate=ht;var Ft=classnames("ui",placementMapping[ft],Rt,useKeyOrValueAndKey(kt,"wide"),useKeyOnly(vt,"basic"),useKeyOnly(Ct,"flowing"),useKeyOnly(Ot,"inverted"),"popup transition visible",Et),zt=getElementType(tt,rt.props),Vt=_objectSpread$g({left:"auto",right:"auto"},mt,It);return Wt.createElement(Ref$1,{innerRef:pt},Wt.createElement(zt,_extends$a({},Mt,{className:Ft,style:Vt}),isNil$1(Tt)?Wt.createElement(Wt.Fragment,null,PopupHeader.create($t,{autoGenerateKey:!1}),PopupContent.create(xt,{autoGenerateKey:!1})):Tt,At&&Wt.createElement(lib$4.exports,{on:rt.hideOnScroll,name:"scroll",target:"window"})))}),rt}return _createClass$2(tt,[{key:"componentDidUpdate",value:function(rt){var ot=shallowequal(this.props.popperDependencies,rt.popperDependencies);ot||this.handleUpdate()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"handleUpdate",value:function(){this.positionUpdate&&this.positionUpdate()}},{key:"render",value:function(){var rt=this.props,ot=rt.context,st=rt.disabled,ut=rt.eventsEnabled,ct=rt.offset,ft=rt.pinned,pt=rt.popperModifiers,ht=rt.position,mt=rt.positionFixed,yt=rt.trigger,vt=this.state,Tt=vt.closed,Et=vt.portalRestProps;if(Tt||st)return yt;var xt=merge_1$2({arrow:{enabled:!1},flip:{enabled:!ft},keepTogether:{enabled:!!ct},offset:{offset:ct}},pt),At=createReferenceProxy$1(isNil_1(ot)?this.triggerRef:ot),Ct=_objectSpread$g({},this.getPortalProps(),Et);return Wt.createElement(Portal$4,_extends$a({},Ct,{onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,trigger:yt,triggerRef:this.triggerRef}),Wt.createElement(Popper$3,{eventsEnabled:ut,modifiers:xt,placement:positionsMapping[ht],positionFixed:mt,referenceElement:At},this.renderContent))}}],[{key:"getDerivedStateFromProps",value:function(rt,ot){if(ot.closed||ot.disabled)return{};var st=getUnhandledProps$1(tt,rt),ut=reduce_1(st,function(ft,pt,ht){return includes_1(Portal$4.handledProps,ht)||(ft[ht]=pt),ft},{}),ct=pick_1(st,Portal$4.handledProps);return{contentRestProps:ut,portalRestProps:ct}}}]),tt}(react.exports.Component);_defineProperty$d(Popup$1,"defaultProps",{disabled:!1,eventsEnabled:!0,offset:0,on:["click","hover"],pinned:!1,position:"top left"});_defineProperty$d(Popup$1,"Content",PopupContent);_defineProperty$d(Popup$1,"Header",PopupHeader);_defineProperty$d(Popup$1,"handledProps",["as","basic","children","className","content","context","disabled","eventsEnabled","flowing","header","hideOnScroll","hoverable","inverted","offset","on","onClose","onMount","onOpen","onUnmount","pinned","popperDependencies","popperModifiers","position","positionFixed","size","style","trigger","wide"]);Popup$1.propTypes={};function _objectWithoutProperties$3(et,tt){if(et==null)return{};var nt=_objectWithoutPropertiesLoose$7(et,tt),rt,ot;if(Object.getOwnPropertySymbols){var st=Object.getOwnPropertySymbols(et);for(ot=0;ot<st.length;ot++)rt=st[ot],!(tt.indexOf(rt)>=0)&&(!Object.prototype.propertyIsEnumerable.call(et,rt)||(nt[rt]=et[rt]))}return nt}const objectWithoutProperties=Object.freeze(Object.defineProperty({__proto__:null,default:_objectWithoutProperties$3},Symbol.toStringTag,{value:"Module"}));function TabPane(et){var tt=et.active,nt=et.children,rt=et.className,ot=et.content,st=et.loading,ut=classnames(useKeyOnly(tt,"active"),useKeyOnly(st,"loading"),"tab",rt),ct=getUnhandledProps$1(TabPane,et),ft=getElementType(TabPane,et),pt={};return ft===Segment&&(pt.attached="bottom"),Wt.createElement(ft,_extends$a({},pt,ct,{className:ut}),isNil$1(nt)?ot:nt)}TabPane.handledProps=["active","as","children","className","content","loading"];TabPane.defaultProps={as:Segment,active:!0};TabPane.propTypes={};TabPane.create=createShorthandFactory(TabPane,function(et){return{content:et}});var Tab$1=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleItemClick",function(ct,ft){var pt=ft.index;invoke_1(rt.props,"onTabChange",ct,_objectSpread$g({},rt.props,{activeIndex:pt})),rt.trySetState({activeIndex:pt})}),rt}return _createClass$2(tt,[{key:"getInitialAutoControlledState",value:function(){return{activeIndex:0}}},{key:"renderItems",value:function(){var rt=this.props,ot=rt.panes,st=rt.renderActiveOnly,ut=this.state.activeIndex;return st?invoke_1(get_1(ot,"[".concat(ut,"]")),"render",this.props):map_1(ot,function(ct,ft){var pt=ct.pane;return TabPane.create(pt,{overrideProps:{active:ft===ut}})})}},{key:"renderMenu",value:function(){var rt=this.props,ot=rt.menu,st=rt.panes,ut=rt.menuPosition,ct=this.state.activeIndex;return ot.tabular===!0&&ut==="right"&&(ot.tabular="right"),Menu$4.create(ot,{autoGenerateKey:!1,overrideProps:{items:map_1(st,"menuItem"),onItemClick:this.handleItemClick,activeIndex:ct}})}},{key:"renderVertical",value:function(rt){var ot=this.props,st=ot.grid,ut=ot.menuPosition,ct=st.paneWidth,ft=st.tabWidth,pt=_objectWithoutProperties$3(st,["paneWidth","tabWidth"]),ht=ut||rt.props.tabular==="right"&&"right"||"left";return Wt.createElement(Grid$2,pt,ht==="left"&&GridColumn.create({width:ft,children:rt},{autoGenerateKey:!1}),GridColumn.create({width:ct,children:this.renderItems(),stretched:!0},{autoGenerateKey:!1}),ht==="right"&&GridColumn.create({width:ft,children:rt},{autoGenerateKey:!1}))}},{key:"render",value:function(){var rt=this.renderMenu(),ot=getUnhandledProps$1(tt,this.props),st=getElementType(tt,this.props);return rt.props.vertical?Wt.createElement(st,ot,this.renderVertical(rt)):Wt.createElement(st,ot,rt.props.attached!=="bottom"&&rt,this.renderItems(),rt.props.attached==="bottom"&&rt)}}]),tt}(AutoControlledComponent);_defineProperty$d(Tab$1,"autoControlledProps",["activeIndex"]);_defineProperty$d(Tab$1,"defaultProps",{grid:{paneWidth:12,tabWidth:4},menu:{attached:!0,tabular:!0},renderActiveOnly:!0});_defineProperty$d(Tab$1,"Pane",TabPane);_defineProperty$d(Tab$1,"handledProps",["activeIndex","as","defaultActiveIndex","grid","menu","menuPosition","onTabChange","panes","renderActiveOnly"]);Tab$1.propTypes={};const Tab$2=Tab$1;function CardDescription(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.textAlign,st=classnames(useTextAlignProp(ot),"description",nt),ut=getUnhandledProps$1(CardDescription,et),ct=getElementType(CardDescription,et);return Wt.createElement(ct,_extends$a({},ut,{className:st}),isNil$1(tt)?rt:tt)}CardDescription.handledProps=["as","children","className","content","textAlign"];CardDescription.propTypes={};function CardHeader$1(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.textAlign,st=classnames(useTextAlignProp(ot),"header",nt),ut=getUnhandledProps$1(CardHeader$1,et),ct=getElementType(CardHeader$1,et);return Wt.createElement(ct,_extends$a({},ut,{className:st}),isNil$1(tt)?rt:tt)}CardHeader$1.handledProps=["as","children","className","content","textAlign"];CardHeader$1.propTypes={};function CardMeta(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.textAlign,st=classnames(useTextAlignProp(ot),"meta",nt),ut=getUnhandledProps$1(CardMeta,et),ct=getElementType(CardMeta,et);return Wt.createElement(ct,_extends$a({},ut,{className:st}),isNil$1(tt)?rt:tt)}CardMeta.handledProps=["as","children","className","content","textAlign"];CardMeta.propTypes={};function CardContent$1(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.description,st=et.extra,ut=et.header,ct=et.meta,ft=et.textAlign,pt=classnames(useKeyOnly(st,"extra"),useTextAlignProp(ft),"content",nt),ht=getUnhandledProps$1(CardContent$1,et),mt=getElementType(CardContent$1,et);return isNil$1(tt)?isNil$1(rt)?Wt.createElement(mt,_extends$a({},ht,{className:pt}),createShorthand(CardHeader$1,function(yt){return{content:yt}},ut,{autoGenerateKey:!1}),createShorthand(CardMeta,function(yt){return{content:yt}},ct,{autoGenerateKey:!1}),createShorthand(CardDescription,function(yt){return{content:yt}},ot,{autoGenerateKey:!1})):Wt.createElement(mt,_extends$a({},ht,{className:pt}),rt):Wt.createElement(mt,_extends$a({},ht,{className:pt}),tt)}CardContent$1.handledProps=["as","children","className","content","description","extra","header","meta","textAlign"];CardContent$1.propTypes={};function CardGroup(et){var tt=et.centered,nt=et.children,rt=et.className,ot=et.content,st=et.doubling,ut=et.items,ct=et.itemsPerRow,ft=et.stackable,pt=et.textAlign,ht=classnames("ui",useKeyOnly(tt,"centered"),useKeyOnly(st,"doubling"),useKeyOnly(ft,"stackable"),useTextAlignProp(pt),useWidthProp(ct),"cards",rt),mt=getUnhandledProps$1(CardGroup,et),yt=getElementType(CardGroup,et);if(!isNil$1(nt))return Wt.createElement(yt,_extends$a({},mt,{className:ht}),nt);if(!isNil$1(ot))return Wt.createElement(yt,_extends$a({},mt,{className:ht}),ot);var vt=map_1(ut,function(Tt){var Et=Tt.key||[Tt.header,Tt.description].join("-");return Wt.createElement(Card$1,_extends$a({key:Et},Tt))});return Wt.createElement(yt,_extends$a({},mt,{className:ht}),vt)}CardGroup.handledProps=["as","centered","children","className","content","doubling","items","itemsPerRow","stackable","textAlign"];CardGroup.propTypes={};var Card$1=function(et){_inherits$2(tt,et);function tt(){var nt,rt;_classCallCheck$2(this,tt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=_possibleConstructorReturn$2(this,(nt=_getPrototypeOf$2(tt)).call.apply(nt,[this].concat(st))),_defineProperty$d(_assertThisInitialized$2(rt),"handleClick",function(ct){var ft=rt.props.onClick;ft&&ft(ct,rt.props)}),rt}return _createClass$2(tt,[{key:"render",value:function(){var rt=this.props,ot=rt.centered,st=rt.children,ut=rt.className,ct=rt.color,ft=rt.content,pt=rt.description,ht=rt.extra,mt=rt.fluid,yt=rt.header,vt=rt.href,Tt=rt.image,Et=rt.link,xt=rt.meta,At=rt.onClick,Ct=rt.raised,$t=classnames("ui",ct,useKeyOnly(ot,"centered"),useKeyOnly(mt,"fluid"),useKeyOnly(Et,"link"),useKeyOnly(Ct,"raised"),"card",ut),Ot=getUnhandledProps$1(tt,this.props),Rt=getElementType(tt,this.props,function(){if(At)return"a"});return isNil$1(st)?isNil$1(ft)?Wt.createElement(Rt,_extends$a({},Ot,{className:$t,href:vt,onClick:this.handleClick}),Image$1.create(Tt,{autoGenerateKey:!1,defaultProps:{ui:!1,wrapped:!0}}),(pt||yt||xt)&&Wt.createElement(CardContent$1,{description:pt,header:yt,meta:xt}),ht&&Wt.createElement(CardContent$1,{extra:!0},ht)):Wt.createElement(Rt,_extends$a({},Ot,{className:$t,href:vt,onClick:this.handleClick}),ft):Wt.createElement(Rt,_extends$a({},Ot,{className:$t,href:vt,onClick:this.handleClick}),st)}}]),tt}(react.exports.Component);_defineProperty$d(Card$1,"Content",CardContent$1);_defineProperty$d(Card$1,"Description",CardDescription);_defineProperty$d(Card$1,"Group",CardGroup);_defineProperty$d(Card$1,"Header",CardHeader$1);_defineProperty$d(Card$1,"Meta",CardMeta);_defineProperty$d(Card$1,"handledProps",["as","centered","children","className","color","content","description","extra","fluid","header","href","image","link","meta","onClick","raised"]);Card$1.propTypes={};function ItemHeader(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("header",nt),st=getUnhandledProps$1(ItemHeader,et),ut=getElementType(ItemHeader,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ItemHeader.handledProps=["as","children","className","content"];ItemHeader.propTypes={};ItemHeader.create=createShorthandFactory(ItemHeader,function(et){return{content:et}});function ItemDescription(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("description",nt),st=getUnhandledProps$1(ItemDescription,et),ut=getElementType(ItemDescription,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ItemDescription.handledProps=["as","children","className","content"];ItemDescription.propTypes={};ItemDescription.create=createShorthandFactory(ItemDescription,function(et){return{content:et}});function ItemExtra(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("extra",nt),st=getUnhandledProps$1(ItemExtra,et),ut=getElementType(ItemExtra,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ItemExtra.handledProps=["as","children","className","content"];ItemExtra.propTypes={};ItemExtra.create=createShorthandFactory(ItemExtra,function(et){return{content:et}});function ItemMeta(et){var tt=et.children,nt=et.className,rt=et.content,ot=classnames("meta",nt),st=getUnhandledProps$1(ItemMeta,et),ut=getElementType(ItemMeta,et);return Wt.createElement(ut,_extends$a({},st,{className:ot}),isNil$1(tt)?rt:tt)}ItemMeta.handledProps=["as","children","className","content"];ItemMeta.propTypes={};ItemMeta.create=createShorthandFactory(ItemMeta,function(et){return{content:et}});function ItemContent(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.description,st=et.extra,ut=et.header,ct=et.meta,ft=et.verticalAlign,pt=classnames(useVerticalAlignProp(ft),"content",nt),ht=getUnhandledProps$1(ItemContent,et),mt=getElementType(ItemContent,et);return isNil$1(tt)?Wt.createElement(mt,_extends$a({},ht,{className:pt}),ItemHeader.create(ut,{autoGenerateKey:!1}),ItemMeta.create(ct,{autoGenerateKey:!1}),ItemDescription.create(ot,{autoGenerateKey:!1}),ItemExtra.create(st,{autoGenerateKey:!1}),rt):Wt.createElement(mt,_extends$a({},ht,{className:pt}),tt)}ItemContent.handledProps=["as","children","className","content","description","extra","header","meta","verticalAlign"];ItemContent.propTypes={};function ItemGroup(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.divided,st=et.items,ut=et.link,ct=et.relaxed,ft=et.unstackable,pt=classnames("ui",useKeyOnly(ot,"divided"),useKeyOnly(ut,"link"),useKeyOnly(ft,"unstackable"),useKeyOrValueAndKey(ct,"relaxed"),"items",nt),ht=getUnhandledProps$1(ItemGroup,et),mt=getElementType(ItemGroup,et);if(!isNil$1(tt))return Wt.createElement(mt,_extends$a({},ht,{className:pt}),tt);if(!isNil$1(rt))return Wt.createElement(mt,_extends$a({},ht,{className:pt}),rt);var yt=map_1(st,function(vt){var Tt=vt.childKey,Et=_objectWithoutProperties$3(vt,["childKey"]),xt=Tt||[Et.content,Et.description,Et.header,Et.meta].join("-");return Wt.createElement(Item$4,_extends$a({},Et,{key:xt}))});return Wt.createElement(mt,_extends$a({},ht,{className:pt}),yt)}ItemGroup.handledProps=["as","children","className","content","divided","items","link","relaxed","unstackable"];ItemGroup.propTypes={};function ItemImage(et){var tt=et.size,nt=getUnhandledProps$1(ItemImage,et);return Wt.createElement(Image$1,_extends$a({},nt,{size:tt,ui:!!tt,wrapped:!0}))}ItemImage.handledProps=["size"];ItemImage.propTypes={};ItemImage.create=createShorthandFactory(ItemImage,function(et){return{src:et}});function Item$4(et){var tt=et.children,nt=et.className,rt=et.content,ot=et.description,st=et.extra,ut=et.header,ct=et.image,ft=et.meta,pt=classnames("item",nt),ht=getUnhandledProps$1(Item$4,et),mt=getElementType(Item$4,et);return isNil$1(tt)?Wt.createElement(mt,_extends$a({},ht,{className:pt}),ItemImage.create(ct,{autoGenerateKey:!1}),Wt.createElement(ItemContent,{content:rt,description:ot,extra:st,header:ut,meta:ft})):Wt.createElement(mt,_extends$a({},ht,{className:pt}),tt)}Item$4.handledProps=["as","children","className","content","description","extra","header","image","meta"];Item$4.Content=ItemContent;Item$4.Description=ItemDescription;Item$4.Extra=ItemExtra;Item$4.Group=ItemGroup;Item$4.Header=ItemHeader;Item$4.Image=ItemImage;Item$4.Meta=ItemMeta;Item$4.propTypes={};class WeaveApp extends Weave{constructor(tt){super(tt),this.client=tt,this.panelSpecs=[]}panel(tt){const nt=this.panelSpecs.find(rt=>rt.id===tt);if(nt==null)throw new Error(`Cannot find panel with id "${tt}"`);return nt}}const ClientContext=Wt.createContext({client:void 0});ClientContext.displayName="ClientContext";const WeaveContext=react.exports.createContext(null);WeaveContext.displayName="WeaveContext";const useWeaveContext=()=>{const et=react.exports.useContext(ClientContext),{client:tt}=et;if(tt==null)throw new Error("Component calling useWeaveContext must have cgreact.ClientContext ancestor");return react.exports.useMemo(()=>new WeaveApp(tt),[tt])},WeaveFeaturesContext=react.exports.createContext({betaFeatures:{}});WeaveFeaturesContext.displayName="WeaveFeaturesContext";Wt.memo(et=>{const tt={...useWeaveFeaturesContext()},nt=_$2.merge(tt,et.features);return Wt.createElement(WeaveFeaturesContext.Provider,{value:nt},et.children)});const useWeaveFeaturesContext=()=>react.exports.useContext(WeaveFeaturesContext),useWeaveDashUiEnable=()=>react.exports.useContext(WeaveFeaturesContext).dashUi,usePanelSettings=et=>useWeaveFeaturesContext().panelSettings?.[et]??{};function isWithChild(et){return et.child!=null}function isTransform(et){return et.equivalentTransform!=null}function getDisplayName(et){return et.displayName!=null?et.displayName:et.id.split("-").map(nt=>nt.charAt(0).toUpperCase()+nt.slice(1)).join("")}function shouldHidePanelInStack(et){return["Maybe"].includes(et)}function getStackIdAndName(et){const tt=getDisplayName(et);if(isWithChild(et)){const{id:nt,displayName:rt}=getStackIdAndName(et.child);let ot=tt+" \u25B8 "+rt;return shouldHidePanelInStack(tt)?ot=rt:tt==="2D Projection"&&rt==="Plot"?ot="2D Projection":tt==="Run Tables"&&rt==="Paginated Tables"?ot="Run Tables":tt==="Run Tables"&&rt==="Paginated Plots"?ot="Run Tables  \u25B8  Plots":tt==="Run Tables"&&rt==="Paginated 2D Projection"?ot="Run Tables  \u25B8  2D Projections":tt==="Run Tables"&&rt==="Combined Table"?ot="Run Tables  \u25B8  Combined":tt==="Combined Table"&&rt==="Table"?ot="Combined Table":tt==="Combined Table"&&rt==="Plot"?ot="Combined Plot":tt==="Combined Table"&&rt==="2D Projection"?ot="Combined 2D Projection":tt==="List"&&rt==="Table"?ot="Paginated Tables":tt==="List"&&rt==="Plot"?ot="Paginated Plots":tt==="List"&&rt==="2D Projection"&&(ot="Paginated 2D Projection"),{id:et.id+"."+nt,displayName:ot}}return{id:et.id,displayName:tt}}const GeneralTableType={type:"list",objectType:"any"},DataTableType={type:"list",objectType:{type:"typedDict",propertyTypes:{}}},ConvertibleToDataTableType={type:"union",members:[{type:"file",wbObjectType:{type:"table",columnTypes:{}}},{type:"file",wbObjectType:{type:"partitioned-table",columnTypes:{}}},{type:"file",wbObjectType:{type:"joined-table",columnTypes:{}}}]},GeneralTableLikeType={type:"union",members:[GeneralTableType,ConvertibleToDataTableType]},DataTableLikeType={type:"union",members:[DataTableType,ConvertibleToDataTableType]};function normalizeTableLike(et){let tt=nullableTaggableValue(et.type);return isListLike(tt)&&(tt=nullableTaggableValue(listObjectType(tt))),isFile$1(tt)&&tt.wbObjectType!=null&&isTable(tt.wbObjectType)?opTableRows({table:opFileTable({file:et})}):isTable(tt)?opTableRows({table:et}):isFile$1(tt)&&tt.wbObjectType!=null&&isPartitionedTable(tt.wbObjectType)?applyOpToOneOrMany(opPartitionedTableRows,"partitionedTable",opFilePartitionedTable({file:et}),{}):isPartitionedTable(tt)?applyOpToOneOrMany(opPartitionedTableRows,"partitionedTable",et,{}):isFile$1(tt)&&tt.wbObjectType!=null&&isJoinedTable(tt.wbObjectType)?applyOpToOneOrMany(opJoinedTableRows,"joinedTable",opFileJoinedTable({file:et}),{leftOuter:constBoolean(!0),rightOuter:constBoolean(!0)}):isJoinedTable(tt)?applyOpToOneOrMany(opJoinedTableRows,"joinedTable",et,{leftOuter:constBoolean(!0),rightOuter:constBoolean(!0)}):et}function isTableTypeLike(et){return et=nullableTaggableValue(et),!!(isFile$1(et)&&et.wbObjectType!=null&&isTable(et.wbObjectType)||isTable(et)||isFile$1(et)&&et.wbObjectType!=null&&isPartitionedTable(et.wbObjectType)||isPartitionedTable(et)||isFile$1(et)&&et.wbObjectType!=null&&isJoinedTable(et.wbObjectType)||isJoinedTable(et))}const WandbLoader=Wt.memo(({className:et,inline:tt,size:nt="huge"})=>Wt.createElement(Loader,{active:!0,inline:tt,size:nt,className:et})),WHITE="#FFFFFF",MOONBEAM="#EDE8FF",OBLIVION="#15181F",MOON_100="#F5F6F7",MOON_250="#DADEE3",MOON_450="#8E949E",MOON_500="#79808A",MOON_800="#2B3038",MOON_900="#1A1D24",TEAL_400="#58D3DB",TEAL_450="#10BFCC",TEAL_500="#13A9BA",TEAL_550="#0097AB",TEAL_600="#038194",hexToRGB=(et,tt)=>{if(!et.startsWith("#"))throw new Error(`Color hex code ${et} missing '#' prefix`);if(et.length===7){const nt=parseInt(et.substring(1,3),16),rt=parseInt(et.substring(3,5),16),ot=parseInt(et.substring(5,7),16);if(isNaN(nt)||isNaN(rt)||isNaN(ot))throw new Error(`Invalid hex code: ${et}`);return tt!==void 0?`rgba(${nt}, ${rt}, ${ot}, ${tt})`:`rgb(${nt}, ${rt}, ${ot})`}if(et.length===4){const nt=parseInt(et.charAt(1),16),rt=parseInt(et.charAt(2),16),ot=parseInt(et.charAt(3),16);if(isNaN(nt)||isNaN(rt)||isNaN(ot))throw new Error(`Invalid hex code: ${et}`);const st=nt*16+nt,ut=rt*16+rt,ct=ot*16+ot;return tt!==void 0?`rgba(${st}, ${ut}, ${ct}, ${tt})`:`rgb(${st}, ${ut}, ${ct})`}throw new Error(`Invalid hex code: ${et}`)};function stylis_min(et){function tt(En,Ln,wn,Dn,$n){for(var Gn=0,Jn=0,zn=0,Qn=0,Bn,jn,Ar=0,Er=0,Pr,Nr=Pr=Bn=0,Ir=0,no=0,ro=0,ao=0,Xr=wn.length,Jr=Xr-1,So,va="",$o="",Qr="",jo="",Bo;Ir<Xr;){if(jn=wn.charCodeAt(Ir),Ir===Jr&&Jn+Qn+zn+Gn!==0&&(Jn!==0&&(jn=Jn===47?10:47),Qn=zn=Gn=0,Xr++,Jr++),Jn+Qn+zn+Gn===0){if(Ir===Jr&&(0<no&&(va=va.replace(yt,"")),0<va.trim().length)){switch(jn){case 32:case 9:case 59:case 13:case 10:break;default:va+=wn.charAt(Ir)}jn=59}switch(jn){case 123:for(va=va.trim(),Bn=va.charCodeAt(0),Pr=1,ao=++Ir;Ir<Xr;){switch(jn=wn.charCodeAt(Ir)){case 123:Pr++;break;case 125:Pr--;break;case 47:switch(jn=wn.charCodeAt(Ir+1)){case 42:case 47:e:{for(Nr=Ir+1;Nr<Jr;++Nr)switch(wn.charCodeAt(Nr)){case 47:if(jn===42&&wn.charCodeAt(Nr-1)===42&&Ir+2!==Nr){Ir=Nr+1;break e}break;case 10:if(jn===47){Ir=Nr+1;break e}}Ir=Nr}}break;case 91:jn++;case 40:jn++;case 34:case 39:for(;Ir++<Jr&&wn.charCodeAt(Ir)!==jn;);}if(Pr===0)break;Ir++}switch(Pr=wn.substring(ao,Ir),Bn===0&&(Bn=(va=va.replace(mt,"").trim()).charCodeAt(0)),Bn){case 64:switch(0<no&&(va=va.replace(yt,"")),jn=va.charCodeAt(1),jn){case 100:case 109:case 115:case 45:no=Ln;break;default:no=gn}if(Pr=tt(Ln,no,Pr,jn,$n+1),ao=Pr.length,0<sn&&(no=nt(gn,va,ro),Bo=ct(3,Pr,no,Ln,Ut,Zt,ao,jn,$n,Dn),va=no.join(""),Bo!==void 0&&(ao=(Pr=Bo.trim()).length)===0&&(jn=0,Pr="")),0<ao)switch(jn){case 115:va=va.replace(It,ut);case 100:case 109:case 45:Pr=va+"{"+Pr+"}";break;case 107:va=va.replace(Ct,"$1 $2"),Pr=va+"{"+Pr+"}",Pr=Jt===1||Jt===2&&st("@"+Pr,3)?"@-webkit-"+Pr+"@"+Pr:"@"+Pr;break;default:Pr=va+Pr,Dn===112&&(Pr=($o+=Pr,""))}else Pr="";break;default:Pr=tt(Ln,nt(Ln,va,ro),Pr,Dn,$n+1)}Qr+=Pr,Pr=ro=no=Nr=Bn=0,va="",jn=wn.charCodeAt(++Ir);break;case 125:case 59:if(va=(0<no?va.replace(yt,""):va).trim(),1<(ao=va.length))switch(Nr===0&&(Bn=va.charCodeAt(0),Bn===45||96<Bn&&123>Bn)&&(ao=(va=va.replace(" ",":")).length),0<sn&&(Bo=ct(1,va,Ln,En,Ut,Zt,$o.length,Dn,$n,Dn))!==void 0&&(ao=(va=Bo.trim()).length)===0&&(va="\0\0"),Bn=va.charCodeAt(0),jn=va.charCodeAt(1),Bn){case 0:break;case 64:if(jn===105||jn===99){jo+=va+wn.charAt(Ir);break}default:va.charCodeAt(ao-1)!==58&&($o+=ot(va,Bn,jn,va.charCodeAt(2)))}ro=no=Nr=Bn=0,va="",jn=wn.charCodeAt(++Ir)}}switch(jn){case 13:case 10:Jn===47?Jn=0:1+Bn===0&&Dn!==107&&0<va.length&&(no=1,va+="\0"),0<sn*In&&ct(0,va,Ln,En,Ut,Zt,$o.length,Dn,$n,Dn),Zt=1,Ut++;break;case 59:case 125:if(Jn+Qn+zn+Gn===0){Zt++;break}default:switch(Zt++,So=wn.charAt(Ir),jn){case 9:case 32:if(Qn+Gn+Jn===0)switch(Ar){case 44:case 58:case 9:case 32:So="";break;default:jn!==32&&(So=" ")}break;case 0:So="\\0";break;case 12:So="\\f";break;case 11:So="\\v";break;case 38:Qn+Jn+Gn===0&&(no=ro=1,So="\f"+So);break;case 108:if(Qn+Jn+Gn+Xt===0&&0<Nr)switch(Ir-Nr){case 2:Ar===112&&wn.charCodeAt(Ir-3)===58&&(Xt=Ar);case 8:Er===111&&(Xt=Er)}break;case 58:Qn+Jn+Gn===0&&(Nr=Ir);break;case 44:Jn+zn+Qn+Gn===0&&(no=1,So+="\r");break;case 34:case 39:Jn===0&&(Qn=Qn===jn?0:Qn===0?jn:Qn);break;case 91:Qn+Jn+zn===0&&Gn++;break;case 93:Qn+Jn+zn===0&&Gn--;break;case 41:Qn+Jn+Gn===0&&zn--;break;case 40:if(Qn+Jn+Gn===0){if(Bn===0)switch(2*Ar+3*Er){case 533:break;default:Bn=1}zn++}break;case 64:Jn+zn+Qn+Gn+Nr+Pr===0&&(Pr=1);break;case 42:case 47:if(!(0<Qn+Gn+zn))switch(Jn){case 0:switch(2*jn+3*wn.charCodeAt(Ir+1)){case 235:Jn=47;break;case 220:ao=Ir,Jn=42}break;case 42:jn===47&&Ar===42&&ao+2!==Ir&&(wn.charCodeAt(ao+2)===33&&($o+=wn.substring(ao,Ir+1)),So="",Jn=0)}}Jn===0&&(va+=So)}Er=Ar,Ar=jn,Ir++}if(ao=$o.length,0<ao){if(no=Ln,0<sn&&(Bo=ct(2,$o,no,En,Ut,Zt,ao,Dn,$n,Dn),Bo!==void 0&&($o=Bo).length===0))return jo+$o+Qr;if($o=no.join(",")+"{"+$o+"}",Jt*Xt!==0){switch(Jt!==2||st($o,2)||(Xt=0),Xt){case 111:$o=$o.replace(Ot,":-moz-$1")+$o;break;case 112:$o=$o.replace($t,"::-webkit-input-$1")+$o.replace($t,"::-moz-$1")+$o.replace($t,":-ms-input-$1")+$o}Xt=0}}return jo+$o+Qr}function nt(En,Ln,wn){var Dn=Ln.trim().split(xt);Ln=Dn;var $n=Dn.length,Gn=En.length;switch(Gn){case 0:case 1:var Jn=0;for(En=Gn===0?"":En[0]+" ";Jn<$n;++Jn)Ln[Jn]=rt(En,Ln[Jn],wn).trim();break;default:var zn=Jn=0;for(Ln=[];Jn<$n;++Jn)for(var Qn=0;Qn<Gn;++Qn)Ln[zn++]=rt(En[Qn]+" ",Dn[Jn],wn).trim()}return Ln}function rt(En,Ln,wn){var Dn=Ln.charCodeAt(0);switch(33>Dn&&(Dn=(Ln=Ln.trim()).charCodeAt(0)),Dn){case 38:return Ln.replace(At,"$1"+En.trim());case 58:return En.trim()+Ln.replace(At,"$1"+En.trim());default:if(0<1*wn&&0<Ln.indexOf("\f"))return Ln.replace(At,(En.charCodeAt(0)===58?"":"$1")+En.trim())}return En+Ln}function ot(En,Ln,wn,Dn){var $n=En+";",Gn=2*Ln+3*wn+4*Dn;if(Gn===944){En=$n.indexOf(":",9)+1;var Jn=$n.substring(En,$n.length-1).trim();return Jn=$n.substring(0,En).trim()+Jn+";",Jt===1||Jt===2&&st(Jn,1)?"-webkit-"+Jn+Jn:Jn}if(Jt===0||Jt===2&&!st($n,1))return $n;switch(Gn){case 1015:return $n.charCodeAt(10)===97?"-webkit-"+$n+$n:$n;case 951:return $n.charCodeAt(3)===116?"-webkit-"+$n+$n:$n;case 963:return $n.charCodeAt(5)===110?"-webkit-"+$n+$n:$n;case 1009:if($n.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+$n+$n;case 978:return"-webkit-"+$n+"-moz-"+$n+$n;case 1019:case 983:return"-webkit-"+$n+"-moz-"+$n+"-ms-"+$n+$n;case 883:if($n.charCodeAt(8)===45)return"-webkit-"+$n+$n;if(0<$n.indexOf("image-set(",11))return $n.replace(Vt,"$1-webkit-$2")+$n;break;case 932:if($n.charCodeAt(4)===45)switch($n.charCodeAt(5)){case 103:return"-webkit-box-"+$n.replace("-grow","")+"-webkit-"+$n+"-ms-"+$n.replace("grow","positive")+$n;case 115:return"-webkit-"+$n+"-ms-"+$n.replace("shrink","negative")+$n;case 98:return"-webkit-"+$n+"-ms-"+$n.replace("basis","preferred-size")+$n}return"-webkit-"+$n+"-ms-"+$n+$n;case 964:return"-webkit-"+$n+"-ms-flex-"+$n+$n;case 1023:if($n.charCodeAt(8)!==99)break;return Jn=$n.substring($n.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+Jn+"-webkit-"+$n+"-ms-flex-pack"+Jn+$n;case 1005:return Tt.test($n)?$n.replace(vt,":-webkit-")+$n.replace(vt,":-moz-")+$n:$n;case 1e3:switch(Jn=$n.substring(13).trim(),Ln=Jn.indexOf("-")+1,Jn.charCodeAt(0)+Jn.charCodeAt(Ln)){case 226:Jn=$n.replace(Rt,"tb");break;case 232:Jn=$n.replace(Rt,"tb-rl");break;case 220:Jn=$n.replace(Rt,"lr");break;default:return $n}return"-webkit-"+$n+"-ms-"+Jn+$n;case 1017:if($n.indexOf("sticky",9)===-1)break;case 975:switch(Ln=($n=En).length-10,Jn=($n.charCodeAt(Ln)===33?$n.substring(0,Ln):$n).substring(En.indexOf(":",7)+1).trim(),Gn=Jn.charCodeAt(0)+(Jn.charCodeAt(7)|0)){case 203:if(111>Jn.charCodeAt(8))break;case 115:$n=$n.replace(Jn,"-webkit-"+Jn)+";"+$n;break;case 207:case 102:$n=$n.replace(Jn,"-webkit-"+(102<Gn?"inline-":"")+"box")+";"+$n.replace(Jn,"-webkit-"+Jn)+";"+$n.replace(Jn,"-ms-"+Jn+"box")+";"+$n}return $n+";";case 938:if($n.charCodeAt(5)===45)switch($n.charCodeAt(6)){case 105:return Jn=$n.replace("-items",""),"-webkit-"+$n+"-webkit-box-"+Jn+"-ms-flex-"+Jn+$n;case 115:return"-webkit-"+$n+"-ms-flex-item-"+$n.replace(Mt,"")+$n;default:return"-webkit-"+$n+"-ms-flex-line-pack"+$n.replace("align-content","").replace(Mt,"")+$n}break;case 973:case 989:if($n.charCodeAt(3)!==45||$n.charCodeAt(4)===122)break;case 931:case 953:if(zt.test(En)===!0)return(Jn=En.substring(En.indexOf(":")+1)).charCodeAt(0)===115?ot(En.replace("stretch","fill-available"),Ln,wn,Dn).replace(":fill-available",":stretch"):$n.replace(Jn,"-webkit-"+Jn)+$n.replace(Jn,"-moz-"+Jn.replace("fill-",""))+$n;break;case 962:if($n="-webkit-"+$n+($n.charCodeAt(5)===102?"-ms-"+$n:"")+$n,wn+Dn===211&&$n.charCodeAt(13)===105&&0<$n.indexOf("transform",10))return $n.substring(0,$n.indexOf(";",27)+1).replace(Et,"$1-webkit-$2")+$n}return $n}function st(En,Ln){var wn=En.indexOf(Ln===1?":":"{"),Dn=En.substring(0,Ln!==3?wn:10);return wn=En.substring(wn+1,En.length-1),Sn(Ln!==2?Dn:Dn.replace(Ft,"$1"),wn,Ln)}function ut(En,Ln){var wn=ot(Ln,Ln.charCodeAt(0),Ln.charCodeAt(1),Ln.charCodeAt(2));return wn!==Ln+";"?wn.replace(kt," or ($1)").substring(4):"("+Ln+")"}function ct(En,Ln,wn,Dn,$n,Gn,Jn,zn,Qn,Bn){for(var jn=0,Ar=Ln,Er;jn<sn;++jn)switch(Er=An[jn].call(ht,En,Ar,wn,Dn,$n,Gn,Jn,zn,Qn,Bn)){case void 0:case!1:case!0:case null:break;default:Ar=Er}if(Ar!==Ln)return Ar}function ft(En){switch(En){case void 0:case null:sn=An.length=0;break;default:if(typeof En=="function")An[sn++]=En;else if(typeof En=="object")for(var Ln=0,wn=En.length;Ln<wn;++Ln)ft(En[Ln]);else In=!!En|0}return ft}function pt(En){return En=En.prefix,En!==void 0&&(Sn=null,En?typeof En!="function"?Jt=1:(Jt=2,Sn=En):Jt=0),pt}function ht(En,Ln){var wn=En;if(33>wn.charCodeAt(0)&&(wn=wn.trim()),_n=wn,wn=[_n],0<sn){var Dn=ct(-1,Ln,wn,wn,Ut,Zt,0,0,0,0);Dn!==void 0&&typeof Dn=="string"&&(Ln=Dn)}var $n=tt(gn,wn,Ln,0,0);return 0<sn&&(Dn=ct(-2,$n,wn,wn,Ut,Zt,$n.length,0,0,0),Dn!==void 0&&($n=Dn)),_n="",Xt=0,Zt=Ut=1,$n}var mt=/^\0+/g,yt=/[\0\r\f]/g,vt=/: */g,Tt=/zoo|gra/,Et=/([,: ])(transform)/g,xt=/,\r+?/g,At=/([\t\r\n ])*\f?&/g,Ct=/@(k\w+)\s*(\S*)\s*/,$t=/::(place)/g,Ot=/:(read-only)/g,Rt=/[svh]\w+-[tblr]{2}/,It=/\(\s*(.*)\s*\)/g,kt=/([\s\S]*?);/g,Mt=/-self|flex-/g,Ft=/[^]*?(:[rp][el]a[\w-]+)[^]*/,zt=/stretch|:\s*\w+\-(?:conte|avail)/,Vt=/([^-])(image-set\()/,Zt=1,Ut=1,Xt=0,Jt=1,gn=[],An=[],sn=0,Sn=null,In=0,_n="";return ht.use=ft,ht.set=pt,et!==void 0&&pt(et),ht}var unitlessKeys={animationIterationCount: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};function memoize$3(et){var tt=Object.create(null);return function(nt){return tt[nt]===void 0&&(tt[nt]=et(nt)),tt[nt]}}var reactPropsRegex=/^((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|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|playsInline|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)-.*))$/,isPropValid=memoize$3(function(et){return reactPropsRegex.test(et)||et.charCodeAt(0)===111&&et.charCodeAt(1)===110&&et.charCodeAt(2)<91}),reactIs$1=reactIs$2.exports,REACT_STATICS={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},FORWARD_REF_STATICS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};TYPE_STATICS[reactIs$1.ForwardRef]=FORWARD_REF_STATICS;TYPE_STATICS[reactIs$1.Memo]=MEMO_STATICS;function getStatics(et){return reactIs$1.isMemo(et)?MEMO_STATICS:TYPE_STATICS[et.$$typeof]||REACT_STATICS}var defineProperty$2=Object.defineProperty,getOwnPropertyNames=Object.getOwnPropertyNames,getOwnPropertySymbols=Object.getOwnPropertySymbols,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,getPrototypeOf=Object.getPrototypeOf,objectPrototype=Object.prototype;function hoistNonReactStatics(et,tt,nt){if(typeof tt!="string"){if(objectPrototype){var rt=getPrototypeOf(tt);rt&&rt!==objectPrototype&&hoistNonReactStatics(et,rt,nt)}var ot=getOwnPropertyNames(tt);getOwnPropertySymbols&&(ot=ot.concat(getOwnPropertySymbols(tt)));for(var st=getStatics(et),ut=getStatics(tt),ct=0;ct<ot.length;++ct){var ft=ot[ct];if(!KNOWN_STATICS[ft]&&!(nt&&nt[ft])&&!(ut&&ut[ft])&&!(st&&st[ft])){var pt=getOwnPropertyDescriptor(tt,ft);try{defineProperty$2(et,ft,pt)}catch{}}}}return et}var hoistNonReactStatics_cjs=hoistNonReactStatics;function v$3(){return(v$3=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et}).apply(this,arguments)}var g$2=function(et,tt){for(var nt=[et[0]],rt=0,ot=tt.length;rt<ot;rt+=1)nt.push(tt[rt],et[rt+1]);return nt},S$1=function(et){return et!==null&&typeof et=="object"&&(et.toString?et.toString():Object.prototype.toString.call(et))==="[object Object]"&&!reactIs$2.exports.typeOf(et)},w$4=Object.freeze([]),E$3=Object.freeze({});function b$4(et){return typeof et=="function"}function _$1(et){return et.displayName||et.name||"Component"}function N$1(et){return et&&typeof et.styledComponentId=="string"}var A$3=typeof process<"u"&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",I$2=typeof window<"u"&&"HTMLElement"in window,P$1=Boolean(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:!1),O$1={};function j$1(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];throw new Error("An error occurred. See https://git.io/JUIaE#"+et+" for more information."+(nt.length>0?" Args: "+nt.join(", "):""))}var T=function(){function et(nt){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=nt}var tt=et.prototype;return tt.indexOfGroup=function(nt){for(var rt=0,ot=0;ot<nt;ot++)rt+=this.groupSizes[ot];return rt},tt.insertRules=function(nt,rt){if(nt>=this.groupSizes.length){for(var ot=this.groupSizes,st=ot.length,ut=st;nt>=ut;)(ut<<=1)<0&&j$1(16,""+nt);this.groupSizes=new Uint32Array(ut),this.groupSizes.set(ot),this.length=ut;for(var ct=st;ct<ut;ct++)this.groupSizes[ct]=0}for(var ft=this.indexOfGroup(nt+1),pt=0,ht=rt.length;pt<ht;pt++)this.tag.insertRule(ft,rt[pt])&&(this.groupSizes[nt]++,ft++)},tt.clearGroup=function(nt){if(nt<this.length){var rt=this.groupSizes[nt],ot=this.indexOfGroup(nt),st=ot+rt;this.groupSizes[nt]=0;for(var ut=ot;ut<st;ut++)this.tag.deleteRule(ot)}},tt.getGroup=function(nt){var rt="";if(nt>=this.length||this.groupSizes[nt]===0)return rt;for(var ot=this.groupSizes[nt],st=this.indexOfGroup(nt),ut=st+ot,ct=st;ct<ut;ct++)rt+=this.tag.getRule(ct)+`/*!sc*/
`;return rt},et}(),x$7=new Map,k$2=new Map,V=1,B$4=function(et){if(x$7.has(et))return x$7.get(et);for(;k$2.has(V);)V++;var tt=V++;return x$7.set(et,tt),k$2.set(tt,et),tt},z$2=function(et){return k$2.get(et)},M$2=function(et,tt){tt>=V&&(V=tt+1),x$7.set(et,tt),k$2.set(tt,et)},G$2="style["+A$3+'][data-styled-version="5.3.5"]',L$1=new RegExp("^"+A$3+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F$1=function(et,tt,nt){for(var rt,ot=nt.split(","),st=0,ut=ot.length;st<ut;st++)(rt=ot[st])&&et.registerName(tt,rt)},Y$2=function(et,tt){for(var nt=(tt.textContent||"").split(`/*!sc*/
`),rt=[],ot=0,st=nt.length;ot<st;ot++){var ut=nt[ot].trim();if(ut){var ct=ut.match(L$1);if(ct){var ft=0|parseInt(ct[1],10),pt=ct[2];ft!==0&&(M$2(pt,ft),F$1(et,pt,ct[3]),et.getTag().insertRules(ft,rt)),rt.length=0}else rt.push(ut)}}},q$2=function(){return typeof window<"u"&&window.__webpack_nonce__!==void 0?window.__webpack_nonce__:null},H$2=function(et){var tt=document.head,nt=et||tt,rt=document.createElement("style"),ot=function(ct){for(var ft=ct.childNodes,pt=ft.length;pt>=0;pt--){var ht=ft[pt];if(ht&&ht.nodeType===1&&ht.hasAttribute(A$3))return ht}}(nt),st=ot!==void 0?ot.nextSibling:null;rt.setAttribute(A$3,"active"),rt.setAttribute("data-styled-version","5.3.5");var ut=q$2();return ut&&rt.setAttribute("nonce",ut),nt.insertBefore(rt,st),rt},$$g=function(){function et(nt){var rt=this.element=H$2(nt);rt.appendChild(document.createTextNode("")),this.sheet=function(ot){if(ot.sheet)return ot.sheet;for(var st=document.styleSheets,ut=0,ct=st.length;ut<ct;ut++){var ft=st[ut];if(ft.ownerNode===ot)return ft}j$1(17)}(rt),this.length=0}var tt=et.prototype;return tt.insertRule=function(nt,rt){try{return this.sheet.insertRule(rt,nt),this.length++,!0}catch{return!1}},tt.deleteRule=function(nt){this.sheet.deleteRule(nt),this.length--},tt.getRule=function(nt){var rt=this.sheet.cssRules[nt];return rt!==void 0&&typeof rt.cssText=="string"?rt.cssText:""},et}(),W$1=function(){function et(nt){var rt=this.element=H$2(nt);this.nodes=rt.childNodes,this.length=0}var tt=et.prototype;return tt.insertRule=function(nt,rt){if(nt<=this.length&&nt>=0){var ot=document.createTextNode(rt),st=this.nodes[nt];return this.element.insertBefore(ot,st||null),this.length++,!0}return!1},tt.deleteRule=function(nt){this.element.removeChild(this.nodes[nt]),this.length--},tt.getRule=function(nt){return nt<this.length?this.nodes[nt].textContent:""},et}(),U$1=function(){function et(nt){this.rules=[],this.length=0}var tt=et.prototype;return tt.insertRule=function(nt,rt){return nt<=this.length&&(this.rules.splice(nt,0,rt),this.length++,!0)},tt.deleteRule=function(nt){this.rules.splice(nt,1),this.length--},tt.getRule=function(nt){return nt<this.length?this.rules[nt]:""},et}(),J=I$2,X$3={isServer:!I$2,useCSSOMInjection:!P$1},Z$1=function(){function et(nt,rt,ot){nt===void 0&&(nt=E$3),rt===void 0&&(rt={}),this.options=v$3({},X$3,{},nt),this.gs=rt,this.names=new Map(ot),this.server=!!nt.isServer,!this.server&&I$2&&J&&(J=!1,function(st){for(var ut=document.querySelectorAll(G$2),ct=0,ft=ut.length;ct<ft;ct++){var pt=ut[ct];pt&&pt.getAttribute(A$3)!=="active"&&(Y$2(st,pt),pt.parentNode&&pt.parentNode.removeChild(pt))}}(this))}et.registerId=function(nt){return B$4(nt)};var tt=et.prototype;return tt.reconstructWithOptions=function(nt,rt){return rt===void 0&&(rt=!0),new et(v$3({},this.options,{},nt),this.gs,rt&&this.names||void 0)},tt.allocateGSInstance=function(nt){return this.gs[nt]=(this.gs[nt]||0)+1},tt.getTag=function(){return this.tag||(this.tag=(ot=(rt=this.options).isServer,st=rt.useCSSOMInjection,ut=rt.target,nt=ot?new U$1(ut):st?new $$g(ut):new W$1(ut),new T(nt)));var nt,rt,ot,st,ut},tt.hasNameForId=function(nt,rt){return this.names.has(nt)&&this.names.get(nt).has(rt)},tt.registerName=function(nt,rt){if(B$4(nt),this.names.has(nt))this.names.get(nt).add(rt);else{var ot=new Set;ot.add(rt),this.names.set(nt,ot)}},tt.insertRules=function(nt,rt,ot){this.registerName(nt,rt),this.getTag().insertRules(B$4(nt),ot)},tt.clearNames=function(nt){this.names.has(nt)&&this.names.get(nt).clear()},tt.clearRules=function(nt){this.getTag().clearGroup(B$4(nt)),this.clearNames(nt)},tt.clearTag=function(){this.tag=void 0},tt.toString=function(){return function(nt){for(var rt=nt.getTag(),ot=rt.length,st="",ut=0;ut<ot;ut++){var ct=z$2(ut);if(ct!==void 0){var ft=nt.names.get(ct),pt=rt.getGroup(ut);if(ft&&pt&&ft.size){var ht=A$3+".g"+ut+'[id="'+ct+'"]',mt="";ft!==void 0&&ft.forEach(function(yt){yt.length>0&&(mt+=yt+",")}),st+=""+pt+ht+'{content:"'+mt+`"}/*!sc*/
`}}}return st}(this)},et}(),K$1=/(a)(d)/gi,Q$1=function(et){return String.fromCharCode(et+(et>25?39:97))};function ee(et){var tt,nt="";for(tt=Math.abs(et);tt>52;tt=tt/52|0)nt=Q$1(tt%52)+nt;return(Q$1(tt%52)+nt).replace(K$1,"$1-$2")}var te=function(et,tt){for(var nt=tt.length;nt;)et=33*et^tt.charCodeAt(--nt);return et},ne=function(et){return te(5381,et)};function re$3(et){for(var tt=0;tt<et.length;tt+=1){var nt=et[tt];if(b$4(nt)&&!N$1(nt))return!1}return!0}var oe=ne("5.3.5"),se=function(){function et(tt,nt,rt){this.rules=tt,this.staticRulesId="",this.isStatic=(rt===void 0||rt.isStatic)&&re$3(tt),this.componentId=nt,this.baseHash=te(oe,nt),this.baseStyle=rt,Z$1.registerId(nt)}return et.prototype.generateAndInjectStyles=function(tt,nt,rt){var ot=this.componentId,st=[];if(this.baseStyle&&st.push(this.baseStyle.generateAndInjectStyles(tt,nt,rt)),this.isStatic&&!rt.hash)if(this.staticRulesId&&nt.hasNameForId(ot,this.staticRulesId))st.push(this.staticRulesId);else{var ut=Ne(this.rules,tt,nt,rt).join(""),ct=ee(te(this.baseHash,ut)>>>0);if(!nt.hasNameForId(ot,ct)){var ft=rt(ut,"."+ct,void 0,ot);nt.insertRules(ot,ct,ft)}st.push(ct),this.staticRulesId=ct}else{for(var pt=this.rules.length,ht=te(this.baseHash,rt.hash),mt="",yt=0;yt<pt;yt++){var vt=this.rules[yt];if(typeof vt=="string")mt+=vt;else if(vt){var Tt=Ne(vt,tt,nt,rt),Et=Array.isArray(Tt)?Tt.join(""):Tt;ht=te(ht,Et+yt),mt+=Et}}if(mt){var xt=ee(ht>>>0);if(!nt.hasNameForId(ot,xt)){var At=rt(mt,"."+xt,void 0,ot);nt.insertRules(ot,xt,At)}st.push(xt)}}return st.join(" ")},et}(),ie=/^\s*\/\/.*$/gm,ae=[":","[",".","#"];function ce(et){var tt,nt,rt,ot,st=et===void 0?E$3:et,ut=st.options,ct=ut===void 0?E$3:ut,ft=st.plugins,pt=ft===void 0?w$4:ft,ht=new stylis_min(ct),mt=[],yt=function(Et){function xt(At){if(At)try{Et(At+"}")}catch{}}return function(At,Ct,$t,Ot,Rt,It,kt,Mt,Ft,zt){switch(At){case 1:if(Ft===0&&Ct.charCodeAt(0)===64)return Et(Ct+";"),"";break;case 2:if(Mt===0)return Ct+"/*|*/";break;case 3:switch(Mt){case 102:case 112:return Et($t[0]+Ct),"";default:return Ct+(zt===0?"/*|*/":"")}case-2:Ct.split("/*|*/}").forEach(xt)}}}(function(Et){mt.push(Et)}),vt=function(Et,xt,At){return xt===0&&ae.indexOf(At[nt.length])!==-1||At.match(ot)?Et:"."+tt};function Tt(Et,xt,At,Ct){Ct===void 0&&(Ct="&");var $t=Et.replace(ie,""),Ot=xt&&At?At+" "+xt+" { "+$t+" }":$t;return tt=Ct,nt=xt,rt=new RegExp("\\"+nt+"\\b","g"),ot=new RegExp("(\\"+nt+"\\b){2,}"),ht(At||!xt?"":xt,Ot)}return ht.use([].concat(pt,[function(Et,xt,At){Et===2&&At.length&&At[0].lastIndexOf(nt)>0&&(At[0]=At[0].replace(rt,vt))},yt,function(Et){if(Et===-2){var xt=mt;return mt=[],xt}}])),Tt.hash=pt.length?pt.reduce(function(Et,xt){return xt.name||j$1(15),te(Et,xt.name)},5381).toString():"",Tt}var ue=Wt.createContext();ue.Consumer;var de$1=Wt.createContext(),he=(de$1.Consumer,new Z$1),pe=ce();function fe(){return react.exports.useContext(ue)||he}function me(){return react.exports.useContext(de$1)||pe}var ve=function(){function et(tt,nt){var rt=this;this.inject=function(ot,st){st===void 0&&(st=pe);var ut=rt.name+st.hash;ot.hasNameForId(rt.id,ut)||ot.insertRules(rt.id,ut,st(rt.rules,ut,"@keyframes"))},this.toString=function(){return j$1(12,String(rt.name))},this.name=tt,this.id="sc-keyframes-"+tt,this.rules=nt}return et.prototype.getName=function(tt){return tt===void 0&&(tt=pe),this.name+tt.hash},et}(),ge=/([A-Z])/,Se=/([A-Z])/g,we=/^ms-/,Ee=function(et){return"-"+et.toLowerCase()};function be(et){return ge.test(et)?et.replace(Se,Ee).replace(we,"-ms-"):et}var _e=function(et){return et==null||et===!1||et===""};function Ne(et,tt,nt,rt){if(Array.isArray(et)){for(var ot,st=[],ut=0,ct=et.length;ut<ct;ut+=1)(ot=Ne(et[ut],tt,nt,rt))!==""&&(Array.isArray(ot)?st.push.apply(st,ot):st.push(ot));return st}if(_e(et))return"";if(N$1(et))return"."+et.styledComponentId;if(b$4(et)){if(typeof(pt=et)!="function"||pt.prototype&&pt.prototype.isReactComponent||!tt)return et;var ft=et(tt);return Ne(ft,tt,nt,rt)}var pt;return et instanceof ve?nt?(et.inject(nt,rt),et.getName(rt)):et:S$1(et)?function ht(mt,yt){var vt,Tt,Et=[];for(var xt in mt)mt.hasOwnProperty(xt)&&!_e(mt[xt])&&(Array.isArray(mt[xt])&&mt[xt].isCss||b$4(mt[xt])?Et.push(be(xt)+":",mt[xt],";"):S$1(mt[xt])?Et.push.apply(Et,ht(mt[xt],xt)):Et.push(be(xt)+": "+(vt=xt,(Tt=mt[xt])==null||typeof Tt=="boolean"||Tt===""?"":typeof Tt!="number"||Tt===0||vt in unitlessKeys?String(Tt).trim():Tt+"px")+";"));return yt?[yt+" {"].concat(Et,["}"]):Et}(et):et.toString()}var Ae=function(et){return Array.isArray(et)&&(et.isCss=!0),et};function Ce(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];return b$4(et)||S$1(et)?Ae(Ne(g$2(w$4,[et].concat(nt)))):nt.length===0&&et.length===1&&typeof et[0]=="string"?et:Ae(Ne(g$2(et,nt)))}var Re=function(et,tt,nt){return nt===void 0&&(nt=E$3),et.theme!==nt.theme&&et.theme||tt||nt.theme},De=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function Te(et){return et.replace(De,"-").replace(je,"")}var xe=function(et){return ee(ne(et)>>>0)};function ke(et){return typeof et=="string"&&!0}var Ve=function(et){return typeof et=="function"||typeof et=="object"&&et!==null&&!Array.isArray(et)},Be=function(et){return et!=="__proto__"&&et!=="constructor"&&et!=="prototype"};function ze(et,tt,nt){var rt=et[nt];Ve(tt)&&Ve(rt)?Me(rt,tt):et[nt]=tt}function Me(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];for(var ot=0,st=nt;ot<st.length;ot++){var ut=st[ot];if(Ve(ut))for(var ct in ut)Be(ct)&&ze(et,ut[ct],ct)}return et}var Ge=Wt.createContext();Ge.Consumer;function Fe(et){var tt=react.exports.useContext(Ge),nt=react.exports.useMemo(function(){return function(rt,ot){if(!rt)return j$1(14);if(b$4(rt)){var st=rt(ot);return st}return Array.isArray(rt)||typeof rt!="object"?j$1(8):ot?v$3({},ot,{},rt):rt}(et.theme,tt)},[et.theme,tt]);return et.children?Wt.createElement(Ge.Provider,{value:nt},et.children):null}var Ye={};function qe(et,tt,nt){var rt=N$1(et),ot=!ke(et),st=tt.attrs,ut=st===void 0?w$4:st,ct=tt.componentId,ft=ct===void 0?function(Ct,$t){var Ot=typeof Ct!="string"?"sc":Te(Ct);Ye[Ot]=(Ye[Ot]||0)+1;var Rt=Ot+"-"+xe("5.3.5"+Ot+Ye[Ot]);return $t?$t+"-"+Rt:Rt}(tt.displayName,tt.parentComponentId):ct,pt=tt.displayName,ht=pt===void 0?function(Ct){return ke(Ct)?"styled."+Ct:"Styled("+_$1(Ct)+")"}(et):pt,mt=tt.displayName&&tt.componentId?Te(tt.displayName)+"-"+tt.componentId:tt.componentId||ft,yt=rt&&et.attrs?Array.prototype.concat(et.attrs,ut).filter(Boolean):ut,vt=tt.shouldForwardProp;rt&&et.shouldForwardProp&&(vt=tt.shouldForwardProp?function(Ct,$t,Ot){return et.shouldForwardProp(Ct,$t,Ot)&&tt.shouldForwardProp(Ct,$t,Ot)}:et.shouldForwardProp);var Tt,Et=new se(nt,mt,rt?et.componentStyle:void 0),xt=Et.isStatic&&ut.length===0,At=function(Ct,$t){return function(Ot,Rt,It,kt){var Mt=Ot.attrs,Ft=Ot.componentStyle,zt=Ot.defaultProps,Vt=Ot.foldedComponentIds,Zt=Ot.shouldForwardProp,Ut=Ot.styledComponentId,Xt=Ot.target,Jt=function(Dn,$n,Gn){Dn===void 0&&(Dn=E$3);var Jn=v$3({},$n,{theme:Dn}),zn={};return Gn.forEach(function(Qn){var Bn,jn,Ar,Er=Qn;for(Bn in b$4(Er)&&(Er=Er(Jn)),Er)Jn[Bn]=zn[Bn]=Bn==="className"?(jn=zn[Bn],Ar=Er[Bn],jn&&Ar?jn+" "+Ar:jn||Ar):Er[Bn]}),[Jn,zn]}(Re(Rt,react.exports.useContext(Ge),zt)||E$3,Rt,Mt),gn=Jt[0],An=Jt[1],sn=function(Dn,$n,Gn,Jn){var zn=fe(),Qn=me(),Bn=$n?Dn.generateAndInjectStyles(E$3,zn,Qn):Dn.generateAndInjectStyles(Gn,zn,Qn);return Bn}(Ft,kt,gn),Sn=It,In=An.$as||Rt.$as||An.as||Rt.as||Xt,_n=ke(In),En=An!==Rt?v$3({},Rt,{},An):Rt,Ln={};for(var wn in En)wn[0]!=="$"&&wn!=="as"&&(wn==="forwardedAs"?Ln.as=En[wn]:(Zt?Zt(wn,isPropValid,In):!_n||isPropValid(wn))&&(Ln[wn]=En[wn]));return Rt.style&&An.style!==Rt.style&&(Ln.style=v$3({},Rt.style,{},An.style)),Ln.className=Array.prototype.concat(Vt,Ut,sn!==Ut?sn:null,Rt.className,An.className).filter(Boolean).join(" "),Ln.ref=Sn,react.exports.createElement(In,Ln)}(Tt,Ct,$t,xt)};return At.displayName=ht,(Tt=Wt.forwardRef(At)).attrs=yt,Tt.componentStyle=Et,Tt.displayName=ht,Tt.shouldForwardProp=vt,Tt.foldedComponentIds=rt?Array.prototype.concat(et.foldedComponentIds,et.styledComponentId):w$4,Tt.styledComponentId=mt,Tt.target=rt?et.target:et,Tt.withComponent=function(Ct){var $t=tt.componentId,Ot=function(It,kt){if(It==null)return{};var Mt,Ft,zt={},Vt=Object.keys(It);for(Ft=0;Ft<Vt.length;Ft++)Mt=Vt[Ft],kt.indexOf(Mt)>=0||(zt[Mt]=It[Mt]);return zt}(tt,["componentId"]),Rt=$t&&$t+"-"+(ke(Ct)?Ct:Te(_$1(Ct)));return qe(Ct,v$3({},Ot,{attrs:yt,componentId:Rt}),nt)},Object.defineProperty(Tt,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(Ct){this._foldedDefaultProps=rt?Me({},et.defaultProps,Ct):Ct}}),Tt.toString=function(){return"."+Tt.styledComponentId},ot&&hoistNonReactStatics_cjs(Tt,et,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),Tt}var He=function(et){return function tt(nt,rt,ot){if(ot===void 0&&(ot=E$3),!reactIs$2.exports.isValidElementType(rt))return j$1(1,String(rt));var st=function(){return nt(rt,ot,Ce.apply(void 0,arguments))};return st.withConfig=function(ut){return tt(nt,rt,v$3({},ot,{},ut))},st.attrs=function(ut){return tt(nt,rt,v$3({},ot,{attrs:Array.prototype.concat(ot.attrs,ut).filter(Boolean)}))},st}(qe,et)};["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","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(et){He[et]=He(et)});var $e=function(){function et(nt,rt){this.rules=nt,this.componentId=rt,this.isStatic=re$3(nt),Z$1.registerId(this.componentId+1)}var tt=et.prototype;return tt.createStyles=function(nt,rt,ot,st){var ut=st(Ne(this.rules,rt,ot,st).join(""),""),ct=this.componentId+nt;ot.insertRules(ct,ct,ut)},tt.removeStyles=function(nt,rt){rt.clearRules(this.componentId+nt)},tt.renderStyles=function(nt,rt,ot,st){nt>2&&Z$1.registerId(this.componentId+nt),this.removeStyles(nt,ot),this.createStyles(nt,rt,ot,st)},et}();function We(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];var ot=Ce.apply(void 0,[et].concat(nt)),st="sc-global-"+xe(JSON.stringify(ot)),ut=new $e(ot,st);function ct(pt){var ht=fe(),mt=me(),yt=react.exports.useContext(Ge),vt=react.exports.useRef(ht.allocateGSInstance(st)).current;return ht.server&&ft(vt,pt,ht,yt,mt),react.exports.useLayoutEffect(function(){if(!ht.server)return ft(vt,pt,ht,yt,mt),function(){return ut.removeStyles(vt,ht)}},[vt,pt,ht,yt,mt]),null}function ft(pt,ht,mt,yt,vt){if(ut.isStatic)ut.renderStyles(pt,O$1,mt,vt);else{var Tt=v$3({},ht,{theme:Re(ht,yt,ct.defaultProps)});ut.renderStyles(pt,Tt,mt,vt)}}return Wt.memo(ct)}function Ue(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];var ot=Ce.apply(void 0,[et].concat(nt)).join(""),st=xe(ot);return new ve(st,ot)}const styled$1=He,BLACK="#000000",TRANSPARENT$1="rgba(255, 255, 255, 0)",GRAY_25="#fafafa",GRAY_50="#f6f6f6",GRAY_100="#f4f4f4",GRAY_200="#eeeeee",GRAY_300="#e6e6e6",GRAY_350="#dddddd",GRAY_400="#cccdcf",GRAY_450="#c0c1c2",GRAY_500="#949699",GRAY_600="#76787a",GRAY_700="#4b4e52",GRAY_800="#33373d",GRAY_840="#24262b",GRAY_860="#222429",GRAY_880="#1d1f24",GRAY_900="#181b1f",GRAYS={GRAY_25,GRAY_50,GRAY_100,GRAY_200,GRAY_300,GRAY_350,GRAY_400,GRAY_450,GRAY_500,GRAY_600,GRAY_700,GRAY_800,GRAY_840,GRAY_860,GRAY_880,GRAY_900},TEAL_TRANSPARENT="rgba(0, 150, 173, 0.10)",TEAL_LIGHT2="#00becc",TEAL_LIGHT="#00afc2",TEAL="#0096ad",TEAL_DARK="#038899",TEALS={TEAL_TRANSPARENT,TEAL_LIGHT2,TEAL_LIGHT,TEAL,TEAL_DARK},GREEN_TRANSPARENT="rgba(0, 163, 104, 0.15)",GREEN_LIGHT2="#5ed686",GREEN_LIGHT="#0fb863",GREEN="#00a368",GREEN_DARK="#008f5d",GREENS={GREEN_TRANSPARENT,GREEN_LIGHT2,GREEN_LIGHT,GREEN,GREEN_DARK},GOLD_DARK_TRANSPARENT="rgba(245, 155, 20, 0.14)",GOLD_LIGHT2="#ffd95c",GOLD_LIGHT="#ffc933",GOLD="#fcb119",GOLD_DARK="#f59b14",GOLD_DARK2="#c77905",GOLD_DARK3="#c17401",GOLDS={GOLD_DARK_TRANSPARENT,GOLD_LIGHT2,GOLD_LIGHT,GOLD,GOLD_DARK,GOLD_DARK2,GOLD_DARK3},SIENNA_TRANSPARENT="rgba(229, 122, 83, 0.16)",SIENNA_LIGHT2="#ffc5a3",SIENNA_LIGHT="#faa77d",SIENNA="#e57a53",SIENNA_DARK="#bf6448",SIENNAS={SIENNA_TRANSPARENT,SIENNA_LIGHT2,SIENNA_LIGHT,SIENNA,SIENNA_DARK},RED_LIGHT_TRANSPARENT="rgba(252, 86, 97, 0.16)",RED_LIGHT2="#ff8585",RED_LIGHT="#ff6670",RED="#ff3859",RED_DARK="#eb1c45",REDS={RED_LIGHT_TRANSPARENT,RED_LIGHT2,RED_LIGHT,RED,RED_DARK},CACTUS_LIGHT2="#BFE573",CACTUS_LIGHT="#A3CC52",CACTUS="#84B043",CACTUS_DARK="#669432",CACTUSES={CACTUS_LIGHT2,CACTUS_LIGHT,CACTUS,CACTUS_DARK},MAGENTA_LIGHT2="#E07AFF",MAGENTA_LIGHT="#CD5BF0",MAGENTA="#B948E0",MAGENTA_DARK="#9E36C2",MAGENTAS={MAGENTA_LIGHT2,MAGENTA_LIGHT,MAGENTA,MAGENTA_DARK},PURPLE_LIGHT2="#BCA5FA",PURPLE_LIGHT="#A690F0",PURPLE="#9278EB",PURPLE_DARK="#775CD1",PURPLES={PURPLE_LIGHT2,PURPLE_LIGHT,PURPLE,PURPLE_DARK},BLUE_LIGHT2="#7CB1F7",BLUE_LIGHT="#559AFA",BLUE="#3E84ED",BLUE_DARK="#2D69E0",BLUES={BLUE_LIGHT2,BLUE_LIGHT,BLUE,BLUE_DARK},Colors={WHITE,BLACK,MOONBEAM,OBLIVION,TRANSPARENT:TRANSPARENT$1,...GRAYS,...TEALS,...GREENS,...GOLDS,...SIENNAS,...REDS,...CACTUSES,...MAGENTAS,...PURPLES,...BLUES},GRAY_TRANSPARENT="rgba(24, 27, 31, 5%)",BLACK_TRANSPARENT_2="rgba(0, 0, 0, 40%)",TEAL_TRANSPARENT_2="rgba(3, 149, 168, 10%)",TEAL_LIGHT_2=TEAL_LIGHT2,BORDER_COLOR_FOCUSED=hexToRGB(TEAL_LIGHT2,.6),TEXT_PRIMARY_COLOR=GRAY_800;`${hexToRGB(OBLIVION,.24)}`;`${hexToRGB(OBLIVION,.48)}`;const PANEL_HOVERED_SHADOW=`0px 4px 8px 0px ${hexToRGB(OBLIVION,.04)}`,SCROLLBAR_STYLES=Ce`
  // Firefox
  scrollbar-width: thin;
  scrollbar-color: ${et=>hexToRGB(OBLIVION,et.scrollbarVisible?.12:0)}
    transparent;

  // Webkit
  ::-webkit-scrollbar {
    width: 14px;
  }
  ::-webkit-scrollbar-thumb {
    border-radius: 9001px;
    border: 4px solid transparent;
    background-clip: padding-box;
    background-color: ${et=>hexToRGB(OBLIVION,et.scrollbarVisible?.12:0)};
    &:hover {
      background-color: ${et=>hexToRGB(OBLIVION,et.scrollbarVisible?.24:0)};
    }
  }
`,gray50="#f9f9f9",gray200="#eeeeee",gray400="#d2d2d2",gray500="#aaaaaa",gray600="#757575",gray800="#363a3d",gray900="#1a1c1f",textSecondary=gray600,border$1=gray400,white$1="#ffffff",error$1="#de6680",errorBackground="rgba(222, 102, 128, 0.08)",primary="#2e78c7",primaryText=primary,fontName="Source Sans Pro",darkBlue="#338dd8",linkHoverBlue="#006c95",fontSizeStandard="16px",lineHeightStandard="24px",fontWeightStandard="100",standardSpacingUnit="8px",spu=standardSpacingUnit,DragDropContext=react.exports.createContext({mouseDownEvent:null,dragData:null,dragRef:null,dropRef:null,dragStarted:!1,dragging:!1,clientXY:null,shiftKey:!1,dropRefOnShift:null,dropRefOnShiftRelease:null,mouseEventOnShift:null,mouseEventOnShiftRelease:null,elementOnShiftRelease:null,setMouseDownEvent:()=>{},setDragData:()=>{},setDropRef:()=>{},setDragRef:()=>{},setDragStarted:()=>{},setDragging:()=>{},setShiftKey:()=>{},setDropRefOnShift:()=>{},setDropRefOnShiftRelease:()=>{},setMouseEventOnShift:()=>{},setMouseEventOnShiftRelease:()=>{},setElementOnShiftRelease:()=>{}});DragDropContext.displayName="DragDropContext";const DragDropProviderComp=({onDocumentDragOver:et,children:tt})=>{const[nt,rt]=react.exports.useState(null),[ot,st]=react.exports.useState(null),[ut,ct]=react.exports.useState(null),[ft,pt]=react.exports.useState(null),[ht,mt]=react.exports.useState(!1),[yt,vt]=react.exports.useState(!1),[Tt,Et]=react.exports.useState(null),[xt,At]=react.exports.useState(!1),[Ct,$t]=react.exports.useState(null),[Ot,Rt]=react.exports.useState(null),[It,kt]=react.exports.useState(null),[Mt,Ft]=react.exports.useState(null),[zt,Vt]=react.exports.useState(null),Zt=react.exports.useMemo(()=>({mouseDownEvent:nt,setMouseDownEvent:rt,dragData:ot,setDragData:st,dropRef:ut,setDropRef:ct,dragRef:ft,setDragRef:pt,dragStarted:ht,setDragStarted:mt,dragging:yt,setDragging:vt,clientXY:Tt,shiftKey:xt,setShiftKey:At,dropRefOnShift:Ct,setDropRefOnShift:$t,dropRefOnShiftRelease:Ot,setDropRefOnShiftRelease:Rt,mouseEventOnShift:It,setMouseEventOnShift:kt,mouseEventOnShiftRelease:Mt,setMouseEventOnShiftRelease:Ft,elementOnShiftRelease:zt,setElementOnShiftRelease:Vt}),[nt,ot,ut,ft,ht,yt,Tt,xt,Ct,Ot,It,Mt,zt]),Ut=react.exports.useRef(Zt);Ut.current=Zt;const Xt=react.exports.useMemo(()=>_$2.throttle(gn=>{Et([gn.clientX,gn.clientY])},500),[]),Jt=react.exports.useCallback(gn=>{ft!=null&&(gn.preventDefault(),gn.stopPropagation(),pt(null))},[ft]);return react.exports.useEffect(()=>(window.addEventListener("mouseup",Jt),()=>{window.removeEventListener("mouseup",Jt)}),[Jt]),react.exports.useEffect(()=>{function gn(An){Xt(An),et?.(Ut.current,An)}return document.addEventListener("dragover",gn),()=>{document.removeEventListener("dragover",gn)}},[Xt,et]),Wt.createElement(DragDropContext.Provider,{value:Zt},tt)},DragDropProvider=react.exports.memo(DragDropProviderComp),DragHandleComp=({children:et,className:tt,style:nt,partRef:rt})=>{const ot=react.exports.useContext(DragDropContext),{setDragRef:st,setMouseDownEvent:ut}=ot;return Wt.createElement("div",{className:"drag-drop-handle "+(tt||""),style:nt,onMouseDown:ct=>{st(rt),ut(ct)}},et)},DragHandle=react.exports.memo(DragHandleComp);function useOnMouseDownOutside$1(et,tt){Wt.useEffect(()=>{function nt(rt){if(rt.target instanceof Element){for(const ot of et)if(ot&&ot.contains(rt.target))return;tt(rt)}}return document.addEventListener("mousedown",nt),()=>{document.removeEventListener("mousedown",nt)}},[et,tt])}const scrollBy=lodash$2.exports.throttle(et=>{window.scrollBy({top:et,behavior:"auto"})},30),autoScrollWhenDragging=et=>{et<100?scrollBy((et-100)/5):et>window.innerHeight-100&&scrollBy((et-(window.innerHeight-100))/5)},DragSourceComp=({children:et,className:tt,style:nt,draggingStyle:rt,partRef:ot,data:st,callbackRef:ut,onMouseUp:ct,onDragStart:ft,onDragEnd:pt})=>{const ht=react.exports.useContext(DragDropContext),{clientXY:mt,dropRef:yt,dragRef:vt,dragStarted:Tt,dragging:Et,shiftKey:xt,setDragData:At,setDropRef:Ct,setDragStarted:$t,setDragging:Ot,setShiftKey:Rt,setDropRefOnShift:It,setDropRefOnShiftRelease:kt,setMouseEventOnShift:Mt,setMouseEventOnShiftRelease:Ft,setElementOnShiftRelease:zt}=ht,Vt=lodash$2.exports.isEqual(ot,vt);return Wt.createElement("div",{className:classnames(tt,"drag-source",{"selected-for-drag":Vt,"drag-started":Vt&&Tt,dragging:Vt&&Et}),ref:ut,style:{...nt,...Vt?rt:{}},draggable:Vt,onMouseUp:ct,onDrag:Zt=>{Et||Ot(!0);const Ut=Zt.clientY??mt?.[1];if(Ut!=null&&autoScrollWhenDragging(Ut),Zt.shiftKey!==xt){if(Zt.shiftKey)It(yt),Mt(_$2.clone(Zt));else if(mt!=null){const[Xt,Jt]=mt;kt(yt),Ft(_$2.clone(Zt)),zt(document.elementFromPoint(Xt,Jt))}Rt(Zt.shiftKey)}},onDragStart:Zt=>{Vt&&($t(!0),Zt.dataTransfer.setData("text",""),st&&At(st),ft&&ft(ht,Zt))},onDragEnd:Zt=>{Zt.stopPropagation(),Ct(null),At(null),$t(!1),Ot(!1),Rt(!1),pt&&pt(ht,Zt)}},et)},DragSource=react.exports.memo(DragSourceComp),DropTargetComp=({children:et,className:tt,getClassName:nt,style:rt,partRef:ot,onDragOver:st,onDragStart:ut,onDragEnter:ct,onDragLeave:ft,onDrop:pt,isValidDropTarget:ht,onClick:mt,onMouseDown:yt,onMouseUp:vt})=>{const Tt=react.exports.useContext(DragDropContext),{clientXY:Et,dragRef:xt,dropRef:At,setDragRef:Ct,setDragData:$t,setDragStarted:Ot,setDragging:Rt,setDropRef:It,setShiftKey:kt}=Tt,Mt=Ft=>ht!=null?ht(Ft):!0;return Wt.createElement("div",{style:rt||void 0,className:nt?nt(Tt):tt||void 0,onClick:mt,onMouseDown:yt,onMouseUp:vt,onDragOver:Ft=>{Ft.preventDefault(),Ft.stopPropagation(),xt!=null&&Mt(Tt)&&((At==null||!lodash$2.exports.isEqual(ot,At))&&It(ot),st&&st(Tt,Ft))},onDragStart:Ft=>{ut?.(Ft)},onDragEnter:Ft=>{Ft.preventDefault(),Ft.stopPropagation(),ct&&xt&&Mt(Tt)&&ct(Tt,Ft)},onDragLeave:Ft=>{if(Ft.stopPropagation(),Ft.preventDefault(),ft&&xt&&Et!=null&&Mt(Tt)){const zt=Ft.currentTarget.getBoundingClientRect(),[Vt,Zt]=Et;(Zt<zt.top||Zt>zt.bottom||Vt<zt.left||Vt>zt.right)&&ft(Tt,Ft)}},onDrop:Ft=>{pt&&xt&&Mt(Tt)&&(Ft.stopPropagation(),Ft.preventDefault(),pt(Tt,Ft)),It(null),$t(null),Ot(!1),Rt(!1),Ct(null),kt(!1)}},et)},DropTarget=react.exports.memo(DropTargetComp);function usePrevious(et){const tt=react.exports.useRef();return react.exports.useEffect(()=>{tt.current=et}),tt.current}const useDeepMemo=(et,tt)=>{tt=tt??_$2.isEqual;const nt=react.exports.useRef(),rt=usePrevious(et);return tt(et,rt)||(nt.current=et),nt.current};function difference(et,tt){function nt(rt,ot){return lodash$2.exports.transform(rt,(st,ut,ct)=>{lodash$2.exports.isEqual(ut,ot[ct])||(st[ct]=lodash$2.exports.isObject(ut)&&lodash$2.exports.isObject(ot[ct])?nt(ut,ot[ct]):ut)})}return nt(et,tt)}function makeShouldUpdate(et){function tt(nt,rt,ot){const st={},ut=_$2.keys(rt);for(const ft of ut)et.ignoreFunctions&&_$2.isFunction(rt[ft])||et.ignoreJSX&&Wt.isValidElement(rt[ft])||et.ignore&&_$2.includes(et.ignore,ft)||(et.deep&&_$2.includes(et.deep,ft)?st[ft]=_$2.isEqualWith(nt[ft],rt[ft],(pt,ht)=>et.ignoreFunctions&&_$2.isFunction(ht)?!0:void 0):st[ft]=nt[ft]===rt[ft]);const ct=_$2.values(st).some(ft=>!ft);if(et.debug&&ct&&getConfig().ENABLE_DEBUG_FEATURES){const ft=_$2.map(st,(pt,ht)=>pt?null:ht).filter(pt=>pt).join(", ");et.verbose?(console.group(`${et.name}${ot?": "+ot:""} changed`),Object.keys(st).forEach(pt=>{if(!st[pt]){if(rt[pt]==null)console.log("null nextProps[key] ",rt[pt]);else if(nt[pt]==null)console.log("null props[key] ",nt[pt]);else{const ht=difference(nt[pt],rt[pt]);console.groupCollapsed(pt),console.log("Before: ",nt[pt]),console.log("After: ",rt[pt]),_$2.keys(ht).length===0?console.log("Diff: ",ht,`NOTE: An empty diff is most likely the result of shallow compare. Consider adding the key: ${pt} to the deep compares.`):console.log("Diff: ",ht)}console.groupEnd()}}),console.groupEnd()):console.log(`Component (${et.name}:${ot||""}) shouldUpdate, [${ft}] changed`)}return ct}return tt}function makePropsAreEqual(et){const tt=makeShouldUpdate(et);return(nt,rt)=>!tt(nt,rt,"Props")}const ITEM_LIMIT_VALUE="__item_limit",simpleSearch=(et,tt)=>_$2.chain(et).filter(nt=>_$2.includes(JSON.stringify(nt.text).toLowerCase(),tt.toLowerCase())).sortBy(nt=>{const rt=typeof nt.text=="string"?`"${tt}"`:tt;return JSON.stringify(nt.text).toLowerCase()===rt.toLowerCase()?0:1}).value(),ModifiedDropdown=Wt.memo(et=>{const{allowAdditions:tt,debounceTime:nt,enableReordering:rt,itemLimit:ot,multiple:st,onChange:ut,options:ct,optionTransform:ft,search:pt,value:ht}=et,mt=et.resultLimit??100,[yt,vt]=react.exports.useState(""),[Tt,Et]=react.exports.useState(ct),xt=react.exports.useMemo(()=>_$2.debounce(In=>{const _n=[];if(st&&Array.isArray(ht)){const En=ht;ct.forEach(Ln=>{En.find(wn=>wn===Ln.value)&&_n.push(Ln)})}pt instanceof Function?Et(_$2.concat(_n,pt(ct,In))):Et(_$2.concat(_n,simpleSearch(ct,In)))},nt||400),[st,ct,pt,ht,nt]),At=react.exports.useRef(!0),Ct=usePrevious(xt);react.exports.useEffect(()=>{At.current||(xt(yt),Ct!==xt&&(Ct?.cancel(),xt.flush()))},[yt,xt]),react.exports.useEffect(()=>{At.current=!1},[]);const $t=memoizeOne$2((In,_n,En,Ln)=>{const wn=In;In=In.slice(0,_n),ft&&(In=In.map(ft));let Dn=Ln;if(tt&&En!==""&&(Dn=En),Dn!=null&&(tt||En==="")){_$2.isArray(Dn)||(Dn=[Dn]);for(const $n of Dn)if(!_$2.find(In,Gn=>Gn.value===$n)){let Gn=wn.find(Jn=>Jn.value===$n)??{key:$n,text:$n,value:$n};ft&&(Gn=ft(Gn)),In.unshift(Gn)}}return Tt.length>mt&&In.push({key:ITEM_LIMIT_VALUE,text:Wt.createElement("span",{className:"hint-text"},"Limited to ",mt," items. Refine search to see other options."),value:ITEM_LIMIT_VALUE}),In}),Ot=react.exports.useCallback(()=>{let In=0;return ht!=null&&_$2.isArray(ht)&&(In=ht.length),In},[ht]),Rt=react.exports.useCallback(()=>ot==null?!1:Ot()>=ot,[ot,Ot]),It=$t(yt?Tt:ct,mt,yt,ht),kt=Boolean(st&&rt),[Mt,Ft]=react.exports.useState(null),[zt,Vt]=react.exports.useState(null),[Zt,Ut]=react.exports.useState(null),Xt=react.exports.useRef({}),Jt=react.exports.useCallback(kt?_$2.throttle((In,_n)=>{const[En,Ln]=[_n.clientX,_n.clientY],wn=Object.entries(Xt.current).map(([Jn,zn])=>{const{top:Qn,bottom:Bn,left:jn,right:Ar}=zn.getBoundingClientRect();return[Jn,{top:Qn+2,bottom:Bn+2,left:jn,right:Ar}]}),Dn=_$2.sortBy(wn,([Jn,{left:zn}])=>-zn),$n=_$2.groupBy(Dn,([Jn,{top:zn}])=>zn),Gn=_$2.sortBy(Object.entries($n),([Jn])=>Number(Jn));for(const[,Jn]of Gn){const{top:zn,bottom:Qn}=Jn[0][1];if(!(Ln<zn||Ln>Qn)){for(const[Bn,{left:jn,right:Ar}]of Jn){const Er=(jn+Ar)/2;if(En>Er){Vt(null),Ut(Bn);return}}Vt(_$2.last(Jn)[0]),Ut(null);return}}Vt(null),Ut(null)},50):()=>{},[kt]),gn=(In,_n)=>{if(!kt||("cancel"in Jt&&Jt.cancel(),Vt(null),Ut(null),ut==null||!Array.isArray(ht)||Mt==null||zt==null&&Zt==null||zt===Mt||Zt===Mt))return;const En=[];for(const Ln of ht)Ln!==Mt&&(Ln===zt&&En.push(Mt),En.push(Ln),Ln===Zt&&En.push(Mt));ut(_n,{value:En})},An=(In,_n,En)=>{const Ln=En.onRemove,wn=String(In.value),Dn={id:wn},$n={userSelect:"none",padding:".3125em .8125em",margin:0,boxShadow:"inset 0 0 0 1px rgb(34 36 38 / 15%)",fontSize:"1em",cursor:"move"},Gn=Wt.createElement(Label$4,{...En,style:{...kt?$n:{},position:"relative",paddingRight:32,maxWidth:"100%",verticalAlign:"top",wordWrap:"break-word"},className:"multi-group-label","data-test":"modified-dropdown-label"},In.text,Wt.createElement(Icon$4,{style:{position:"absolute",right:13,top:6},onClick:zn=>Ln(zn,En),name:"delete","data-test":"modified-dropdown-label-delete"}));return kt?(zn=>Wt.createElement(DragSource,{onDragStart:()=>Ft(wn),onDragEnd:gn,callbackRef:Qn=>Xt.current[wn]=Qn,partRef:Dn,style:{display:"inline-block",verticalAlign:"top",margin:".125rem .25rem .125rem 0",position:"relative",maxWidth:"100%"}},zt===wn&&Wt.createElement("div",{style:{position:"absolute",width:1,top:2,bottom:2,left:-2,backgroundColor:gray800}}),Zt===wn&&Wt.createElement("div",{style:{position:"absolute",width:1,top:2,bottom:2,right:-2,backgroundColor:gray800}}),Wt.createElement(DragHandle,{partRef:Dn,style:{maxWidth:"100%"}},zn)))(Gn):Gn},sn=In=>kt?Wt.createElement(DragDropProvider,{onDocumentDragOver:Jt},Wt.createElement(DropTarget,{partRef:{id:"modified-dropdown-drop-target"},style:{position:"relative"}},In)):Wt.createElement(Wt.Fragment,null,In),Sn={...et};return delete Sn.itemLimit,delete Sn.optionTransform,delete Sn.allowAdditions,sn(Wt.createElement(Dropdown,{...Sn,options:It,lazyLoad:!0,selectOnNavigation:!1,searchQuery:yt,search:In=>In,renderLabel:An,onSearchChange:(In,_n)=>{et.onSearchChange?.(In,_n),Rt()||vt(_n.searchQuery)},onChange:(In,{value:_n})=>{vt(""),((_$2.isArray(_n)?_n.length:0)<Ot()||!Rt())&&ut&&_n!==ITEM_LIMIT_VALUE&&ut(In,{value:_n})}}))},makePropsAreEqual({name:"ModifiedDropdown",deep:["options"]}));function clamp$5(et,{min:tt,max:nt}){let rt=et;return tt!=null&&(rt=Math.max(rt,tt)),nt!=null&&(rt=Math.min(rt,nt)),rt}const NumberInput=et=>{const[tt,nt]=Wt.useState(et.value==null?"":et.value.toString()),rt=Wt.useRef(!1),ot=()=>{nt(et.value==null?"":et.value.toString())};Wt.useEffect(()=>{rt.current||ot()});const{onChange:st,ticks:ut,strideLength:ct,min:ft,max:pt}=et,ht=Wt.useCallback((mt,yt)=>{if(yt==null)return;const vt=parseFloat(tt);let Tt;if(ut)if(ct){const xt=yt*ct;Tt=clamp$5(xt+vt,{min:ut[0],max:ut[ut.length-1]})}else{const xt=_$2.sortedIndex(ut,vt),At=clamp$5(xt+yt,{min:0,max:ut.length-1});Tt=ut[At]}else Tt=vt+yt*(ct??1),Tt=clamp$5(Tt,{min:ft,max:pt});const Et=mt.currentTarget;Et.value=Tt.toString(),nt(Tt.toString()),st(Tt)},[st,ut,tt,ct,ft,pt]);return Wt.createElement("div",{className:"number-input__container",style:et.containerStyle},Wt.createElement(Input$7,{style:et.inputStyle,className:`number-input__input ${et.className||""}`,type:"number",disabled:et.disabled,placeholder:et.placeholder,value:tt,onFocus:()=>{rt.current=!0},onBlur:()=>{rt.current=!1,ot()},onKeyDown:mt=>{const yt=mt.key==="ArrowUp"?1:mt.key==="ArrowDown"?-1:null;yt!=null&&(ht(mt,yt),mt.preventDefault())},onChange:mt=>{const yt=mt.target.value;if(nt(yt),yt==="")et.onChange(void 0);else{const vt=parseFloat(yt);if(!Number.isNaN(vt)&&vt!==et.value){const Tt=clamp$5(vt,{min:et.min,max:et.max});et.onChange(Tt)}}}}),et.stepper&&Wt.createElement("div",{className:"number-input__stepper"},Wt.createElement(Icon$4,{onClick:mt=>ht(mt,1),size:"mini",name:"chevron up"}),Wt.createElement(Icon$4,{onClick:mt=>ht(mt,-1),size:"mini",name:"chevron down"})))},TextInput$1=Wt.memo(({dataTest:et,onChange:tt,placeholder:nt,value:rt})=>Wt.createElement(Input$5,{"data-test":et,placeholder:nt,value:rt,onChange:tt})),Input$5=styled$1(Input$7)`
  &&& input {
    border: none;
    padding: 0;
    width: 100%;
    background-color: transparent;
  }
`,Input$4=styled$1(Input$7)`
  width: 100%;
`,Label$3=styled$1.label`
  display: block;
  font-weight: calc(${fontWeightStandard} * 6);
  font-size: calc(${fontSizeStandard} / 1.222);
  line-height: calc(${lineHeightStandard} / 1.5);
  margin-bottom: calc(${spu} / 2);
`,Sublabel=styled$1.span`
  color: ${gray500};
`,TextInput=Wt.memo(et=>{const{dataTest:tt,label:nt,onChange:rt,placeholder:ot,sublabel:st,value:ut}=et;return useWeaveDashUiEnable()?Wt.createElement(TextInput$1,{...et}):Wt.createElement(Wt.Fragment,null,Wt.createElement(Label$3,null,nt," ",Wt.createElement(Sublabel,null,st)),Wt.createElement(Input$4,{"data-test":tt,placeholder:ot,value:ut,onChange:rt}))});/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */function isObject$3(et){return Object.prototype.toString.call(et)==="[object Object]"}function isPlainObject$4(et){var tt,nt;return isObject$3(et)===!1?!1:(tt=et.constructor,tt===void 0?!0:(nt=tt.prototype,!(isObject$3(nt)===!1||nt.hasOwnProperty("isPrototypeOf")===!1)))}function n$3(et){for(var tt=arguments.length,nt=Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];throw Error("[Immer] minified error nr: "+et+(nt.length?" "+nt.map(function(ot){return"'"+ot+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r$3(et){return!!et&&!!et[Q]}function t$2(et){var tt;return!!et&&(function(nt){if(!nt||typeof nt!="object")return!1;var rt=Object.getPrototypeOf(nt);if(rt===null)return!0;var ot=Object.hasOwnProperty.call(rt,"constructor")&&rt.constructor;return ot===Object||typeof ot=="function"&&Function.toString.call(ot)===Z}(et)||Array.isArray(et)||!!et[L]||!!(!((tt=et.constructor)===null||tt===void 0)&&tt[L])||s$2(et)||v$2(et))}function i$1(et,tt,nt){nt===void 0&&(nt=!1),o$1(et)===0?(nt?Object.keys:nn)(et).forEach(function(rt){nt&&typeof rt=="symbol"||tt(rt,et[rt],et)}):et.forEach(function(rt,ot){return tt(ot,rt,et)})}function o$1(et){var tt=et[Q];return tt?tt.i>3?tt.i-4:tt.i:Array.isArray(et)?1:s$2(et)?2:v$2(et)?3:0}function u$2(et,tt){return o$1(et)===2?et.has(tt):Object.prototype.hasOwnProperty.call(et,tt)}function a$3(et,tt){return o$1(et)===2?et.get(tt):et[tt]}function f$2(et,tt,nt){var rt=o$1(et);rt===2?et.set(tt,nt):rt===3?et.add(nt):et[tt]=nt}function c$3(et,tt){return et===tt?et!==0||1/et==1/tt:et!=et&&tt!=tt}function s$2(et){return X$2&&et instanceof Map}function v$2(et){return q$1&&et instanceof Set}function p$3(et){return et.o||et.t}function l$1(et){if(Array.isArray(et))return Array.prototype.slice.call(et);var tt=rn(et);delete tt[Q];for(var nt=nn(tt),rt=0;rt<nt.length;rt++){var ot=nt[rt],st=tt[ot];st.writable===!1&&(st.writable=!0,st.configurable=!0),(st.get||st.set)&&(tt[ot]={configurable:!0,writable:!0,enumerable:st.enumerable,value:et[ot]})}return Object.create(Object.getPrototypeOf(et),tt)}function d$1(et,tt){return tt===void 0&&(tt=!1),y$5(et)||r$3(et)||!t$2(et)||(o$1(et)>1&&(et.set=et.add=et.clear=et.delete=h$4),Object.freeze(et),tt&&i$1(et,function(nt,rt){return d$1(rt,!0)},!0)),et}function h$4(){n$3(2)}function y$5(et){return et==null||typeof et!="object"||Object.isFrozen(et)}function b$3(et){var tt=tn[et];return tt||n$3(18,et),tt}function _(){return U}function j(et,tt){tt&&(b$3("Patches"),et.u=[],et.s=[],et.v=tt)}function g$1(et){O(et),et.p.forEach(S),et.p=null}function O(et){et===U&&(U=et.l)}function w$3(et){return U={p:[],l:U,h:et,m:!0,_:0}}function S(et){var tt=et[Q];tt.i===0||tt.i===1?tt.j():tt.g=!0}function P(et,tt){tt._=tt.p.length;var nt=tt.p[0],rt=et!==void 0&&et!==nt;return tt.h.O||b$3("ES5").S(tt,et,rt),rt?(nt[Q].P&&(g$1(tt),n$3(4)),t$2(et)&&(et=M$1(tt,et),tt.l||x$6(tt,et)),tt.u&&b$3("Patches").M(nt[Q].t,et,tt.u,tt.s)):et=M$1(tt,nt,[]),g$1(tt),tt.u&&tt.v(tt.u,tt.s),et!==H$1?et:void 0}function M$1(et,tt,nt){if(y$5(tt))return tt;var rt=tt[Q];if(!rt)return i$1(tt,function(ct,ft){return A$2(et,rt,tt,ct,ft,nt)},!0),tt;if(rt.A!==et)return tt;if(!rt.P)return x$6(et,rt.t,!0),rt.t;if(!rt.I){rt.I=!0,rt.A._--;var ot=rt.i===4||rt.i===5?rt.o=l$1(rt.k):rt.o,st=ot,ut=!1;rt.i===3&&(st=new Set(ot),ot.clear(),ut=!0),i$1(st,function(ct,ft){return A$2(et,rt,ot,ct,ft,nt,ut)}),x$6(et,ot,!1),nt&&et.u&&b$3("Patches").N(rt,nt,et.u,et.s)}return rt.o}function A$2(et,tt,nt,rt,ot,st,ut){if(r$3(ot)){var ct=M$1(et,ot,st&&tt&&tt.i!==3&&!u$2(tt.R,rt)?st.concat(rt):void 0);if(f$2(nt,rt,ct),!r$3(ct))return;et.m=!1}else ut&&nt.add(ot);if(t$2(ot)&&!y$5(ot)){if(!et.h.D&&et._<1)return;M$1(et,ot),tt&&tt.A.l||x$6(et,ot)}}function x$6(et,tt,nt){nt===void 0&&(nt=!1),!et.l&&et.h.D&&et.m&&d$1(tt,nt)}function z$1(et,tt){var nt=et[Q];return(nt?p$3(nt):et)[tt]}function I$1(et,tt){if(tt in et)for(var nt=Object.getPrototypeOf(et);nt;){var rt=Object.getOwnPropertyDescriptor(nt,tt);if(rt)return rt;nt=Object.getPrototypeOf(nt)}}function k$1(et){et.P||(et.P=!0,et.l&&k$1(et.l))}function E$2(et){et.o||(et.o=l$1(et.t))}function N(et,tt,nt){var rt=s$2(tt)?b$3("MapSet").F(tt,nt):v$2(tt)?b$3("MapSet").T(tt,nt):et.O?function(ot,st){var ut=Array.isArray(ot),ct={i:ut?1:0,A:st?st.A:_(),P:!1,I:!1,R:{},l:st,t:ot,k:null,o:null,j:null,C:!1},ft=ct,pt=en;ut&&(ft=[ct],pt=on$2);var ht=Proxy.revocable(ft,pt),mt=ht.revoke,yt=ht.proxy;return ct.k=yt,ct.j=mt,yt}(tt,nt):b$3("ES5").J(tt,nt);return(nt?nt.A:_()).p.push(rt),rt}function R(et){return r$3(et)||n$3(22,et),function tt(nt){if(!t$2(nt))return nt;var rt,ot=nt[Q],st=o$1(nt);if(ot){if(!ot.P&&(ot.i<4||!b$3("ES5").K(ot)))return ot.t;ot.I=!0,rt=D$3(nt,st),ot.I=!1}else rt=D$3(nt,st);return i$1(rt,function(ut,ct){ot&&a$3(ot.t,ut)===ct||f$2(rt,ut,tt(ct))}),st===3?new Set(rt):rt}(et)}function D$3(et,tt){switch(tt){case 2:return new Map(et);case 3:return Array.from(et)}return l$1(et)}var G$1,U,W=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",X$2=typeof Map<"u",q$1=typeof Set<"u",B$3=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",H$1=W?Symbol.for("immer-nothing"):((G$1={})["immer-nothing"]=!0,G$1),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",Z=""+Object.prototype.constructor,nn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(et){return Object.getOwnPropertyNames(et).concat(Object.getOwnPropertySymbols(et))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(et){var tt={};return nn(et).forEach(function(nt){tt[nt]=Object.getOwnPropertyDescriptor(et,nt)}),tt},tn={},en={get:function(et,tt){if(tt===Q)return et;var nt=p$3(et);if(!u$2(nt,tt))return function(ot,st,ut){var ct,ft=I$1(st,ut);return ft?"value"in ft?ft.value:(ct=ft.get)===null||ct===void 0?void 0:ct.call(ot.k):void 0}(et,nt,tt);var rt=nt[tt];return et.I||!t$2(rt)?rt:rt===z$1(et.t,tt)?(E$2(et),et.o[tt]=N(et.A.h,rt,et)):rt},has:function(et,tt){return tt in p$3(et)},ownKeys:function(et){return Reflect.ownKeys(p$3(et))},set:function(et,tt,nt){var rt=I$1(p$3(et),tt);if(rt?.set)return rt.set.call(et.k,nt),!0;if(!et.P){var ot=z$1(p$3(et),tt),st=ot?.[Q];if(st&&st.t===nt)return et.o[tt]=nt,et.R[tt]=!1,!0;if(c$3(nt,ot)&&(nt!==void 0||u$2(et.t,tt)))return!0;E$2(et),k$1(et)}return et.o[tt]===nt&&(nt!==void 0||tt in et.o)||Number.isNaN(nt)&&Number.isNaN(et.o[tt])||(et.o[tt]=nt,et.R[tt]=!0),!0},deleteProperty:function(et,tt){return z$1(et.t,tt)!==void 0||tt in et.t?(et.R[tt]=!1,E$2(et),k$1(et)):delete et.R[tt],et.o&&delete et.o[tt],!0},getOwnPropertyDescriptor:function(et,tt){var nt=p$3(et),rt=Reflect.getOwnPropertyDescriptor(nt,tt);return rt&&{writable:!0,configurable:et.i!==1||tt!=="length",enumerable:rt.enumerable,value:nt[tt]}},defineProperty:function(){n$3(11)},getPrototypeOf:function(et){return Object.getPrototypeOf(et.t)},setPrototypeOf:function(){n$3(12)}},on$2={};i$1(en,function(et,tt){on$2[et]=function(){return arguments[0]=arguments[0][0],tt.apply(this,arguments)}}),on$2.deleteProperty=function(et,tt){return on$2.set.call(this,et,tt,void 0)},on$2.set=function(et,tt,nt){return en.set.call(this,et[0],tt,nt,et[0])};var un=function(){function et(nt){var rt=this;this.O=B$3,this.D=!0,this.produce=function(ot,st,ut){if(typeof ot=="function"&&typeof st!="function"){var ct=st;st=ot;var ft=rt;return function(Et){var xt=this;Et===void 0&&(Et=ct);for(var At=arguments.length,Ct=Array(At>1?At-1:0),$t=1;$t<At;$t++)Ct[$t-1]=arguments[$t];return ft.produce(Et,function(Ot){var Rt;return(Rt=st).call.apply(Rt,[xt,Ot].concat(Ct))})}}var pt;if(typeof st!="function"&&n$3(6),ut!==void 0&&typeof ut!="function"&&n$3(7),t$2(ot)){var ht=w$3(rt),mt=N(rt,ot,void 0),yt=!0;try{pt=st(mt),yt=!1}finally{yt?g$1(ht):O(ht)}return typeof Promise<"u"&&pt instanceof Promise?pt.then(function(Et){return j(ht,ut),P(Et,ht)},function(Et){throw g$1(ht),Et}):(j(ht,ut),P(pt,ht))}if(!ot||typeof ot!="object"){if((pt=st(ot))===void 0&&(pt=ot),pt===H$1&&(pt=void 0),rt.D&&d$1(pt,!0),ut){var vt=[],Tt=[];b$3("Patches").M(ot,pt,vt,Tt),ut(vt,Tt)}return pt}n$3(21,ot)},this.produceWithPatches=function(ot,st){if(typeof ot=="function")return function(pt){for(var ht=arguments.length,mt=Array(ht>1?ht-1:0),yt=1;yt<ht;yt++)mt[yt-1]=arguments[yt];return rt.produceWithPatches(pt,function(vt){return ot.apply(void 0,[vt].concat(mt))})};var ut,ct,ft=rt.produce(ot,st,function(pt,ht){ut=pt,ct=ht});return typeof Promise<"u"&&ft instanceof Promise?ft.then(function(pt){return[pt,ut,ct]}):[ft,ut,ct]},typeof nt?.useProxies=="boolean"&&this.setUseProxies(nt.useProxies),typeof nt?.autoFreeze=="boolean"&&this.setAutoFreeze(nt.autoFreeze)}var tt=et.prototype;return tt.createDraft=function(nt){t$2(nt)||n$3(8),r$3(nt)&&(nt=R(nt));var rt=w$3(this),ot=N(this,nt,void 0);return ot[Q].C=!0,O(rt),ot},tt.finishDraft=function(nt,rt){var ot=nt&&nt[Q],st=ot.A;return j(st,rt),P(void 0,st)},tt.setAutoFreeze=function(nt){this.D=nt},tt.setUseProxies=function(nt){nt&&!B$3&&n$3(20),this.O=nt},tt.applyPatches=function(nt,rt){var ot;for(ot=rt.length-1;ot>=0;ot--){var st=rt[ot];if(st.path.length===0&&st.op==="replace"){nt=st.value;break}}ot>-1&&(rt=rt.slice(ot+1));var ut=b$3("Patches").$;return r$3(nt)?ut(nt,rt):this.produce(nt,function(ct){return ut(ct,rt)})},et}(),an=new un,fn=an.produce;an.produceWithPatches.bind(an);an.setAutoFreeze.bind(an);an.setUseProxies.bind(an);an.applyPatches.bind(an);var ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an),PathRef={transform(et,tt){var{current:nt,affinity:rt}=et;if(nt!=null){var ot=Path$2.transform(nt,tt,{affinity:rt});et.current=ot,ot==null&&et.unref()}}},PointRef={transform(et,tt){var{current:nt,affinity:rt}=et;if(nt!=null){var ot=Point$1.transform(nt,tt,{affinity:rt});et.current=ot,ot==null&&et.unref()}}},RangeRef={transform(et,tt){var{current:nt,affinity:rt}=et;if(nt!=null){var ot=Range$1.transform(nt,tt,{affinity:rt});et.current=ot,ot==null&&et.unref()}}},DIRTY_PATHS=new WeakMap,DIRTY_PATH_KEYS=new WeakMap,FLUSHING=new WeakMap,NORMALIZING=new WeakMap,PATH_REFS=new WeakMap,POINT_REFS=new WeakMap,RANGE_REFS=new WeakMap,Path$2={ancestors(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:nt=!1}=tt,rt=Path$2.levels(et,tt);return nt?rt=rt.slice(1):rt=rt.slice(0,-1),rt},common(et,tt){for(var nt=[],rt=0;rt<et.length&&rt<tt.length;rt++){var ot=et[rt],st=tt[rt];if(ot!==st)break;nt.push(ot)}return nt},compare(et,tt){for(var nt=Math.min(et.length,tt.length),rt=0;rt<nt;rt++){if(et[rt]<tt[rt])return-1;if(et[rt]>tt[rt])return 1}return 0},endsAfter(et,tt){var nt=et.length-1,rt=et.slice(0,nt),ot=tt.slice(0,nt),st=et[nt],ut=tt[nt];return Path$2.equals(rt,ot)&&st>ut},endsAt(et,tt){var nt=et.length,rt=et.slice(0,nt),ot=tt.slice(0,nt);return Path$2.equals(rt,ot)},endsBefore(et,tt){var nt=et.length-1,rt=et.slice(0,nt),ot=tt.slice(0,nt),st=et[nt],ut=tt[nt];return Path$2.equals(rt,ot)&&st<ut},equals(et,tt){return et.length===tt.length&&et.every((nt,rt)=>nt===tt[rt])},hasPrevious(et){return et[et.length-1]>0},isAfter(et,tt){return Path$2.compare(et,tt)===1},isAncestor(et,tt){return et.length<tt.length&&Path$2.compare(et,tt)===0},isBefore(et,tt){return Path$2.compare(et,tt)===-1},isChild(et,tt){return et.length===tt.length+1&&Path$2.compare(et,tt)===0},isCommon(et,tt){return et.length<=tt.length&&Path$2.compare(et,tt)===0},isDescendant(et,tt){return et.length>tt.length&&Path$2.compare(et,tt)===0},isParent(et,tt){return et.length+1===tt.length&&Path$2.compare(et,tt)===0},isPath(et){return Array.isArray(et)&&(et.length===0||typeof et[0]=="number")},isSibling(et,tt){if(et.length!==tt.length)return!1;var nt=et.slice(0,-1),rt=tt.slice(0,-1),ot=et[et.length-1],st=tt[tt.length-1];return ot!==st&&Path$2.equals(nt,rt)},levels(et){for(var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:nt=!1}=tt,rt=[],ot=0;ot<=et.length;ot++)rt.push(et.slice(0,ot));return nt&&rt.reverse(),rt},next(et){if(et.length===0)throw new Error("Cannot get the next path of a root path [".concat(et,"], because it has no next index."));var tt=et[et.length-1];return et.slice(0,-1).concat(tt+1)},operationCanTransformPath(et){switch(et.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(et){if(et.length===0)throw new Error("Cannot get the parent path of the root path [".concat(et,"]."));return et.slice(0,-1)},previous(et){if(et.length===0)throw new Error("Cannot get the previous path of a root path [".concat(et,"], because it has no previous index."));var tt=et[et.length-1];if(tt<=0)throw new Error("Cannot get the previous path of a first child path [".concat(et,"] because it would result in a negative index."));return et.slice(0,-1).concat(tt-1)},relative(et,tt){if(!Path$2.isAncestor(tt,et)&&!Path$2.equals(et,tt))throw new Error("Cannot get the relative path of [".concat(et,"] inside ancestor [").concat(tt,"], because it is not above or equal to the path."));return et.slice(tt.length)},transform(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!et)return null;var rt=[...et],{affinity:ot="forward"}=nt;if(et.length===0)return rt;switch(tt.type){case"insert_node":{var{path:st}=tt;(Path$2.equals(st,rt)||Path$2.endsBefore(st,rt)||Path$2.isAncestor(st,rt))&&(rt[st.length-1]+=1);break}case"remove_node":{var{path:ut}=tt;if(Path$2.equals(ut,rt)||Path$2.isAncestor(ut,rt))return null;Path$2.endsBefore(ut,rt)&&(rt[ut.length-1]-=1);break}case"merge_node":{var{path:ct,position:ft}=tt;Path$2.equals(ct,rt)||Path$2.endsBefore(ct,rt)?rt[ct.length-1]-=1:Path$2.isAncestor(ct,rt)&&(rt[ct.length-1]-=1,rt[ct.length]+=ft);break}case"split_node":{var{path:pt,position:ht}=tt;if(Path$2.equals(pt,rt)){if(ot==="forward")rt[rt.length-1]+=1;else if(ot!=="backward")return null}else Path$2.endsBefore(pt,rt)?rt[pt.length-1]+=1:Path$2.isAncestor(pt,rt)&&et[pt.length]>=ht&&(rt[pt.length-1]+=1,rt[pt.length]-=ht);break}case"move_node":{var{path:mt,newPath:yt}=tt;if(Path$2.equals(mt,yt))return rt;if(Path$2.isAncestor(mt,rt)||Path$2.equals(mt,rt)){var vt=yt.slice();return Path$2.endsBefore(mt,yt)&&mt.length<yt.length&&(vt[mt.length-1]-=1),vt.concat(rt.slice(mt.length))}else Path$2.isSibling(mt,yt)&&(Path$2.isAncestor(yt,rt)||Path$2.equals(yt,rt))?Path$2.endsBefore(mt,rt)?rt[mt.length-1]-=1:rt[mt.length-1]+=1:Path$2.endsBefore(yt,rt)||Path$2.equals(yt,rt)||Path$2.isAncestor(yt,rt)?(Path$2.endsBefore(mt,rt)&&(rt[mt.length-1]-=1),rt[yt.length-1]+=1):Path$2.endsBefore(mt,rt)&&(Path$2.equals(yt,rt)&&(rt[yt.length-1]+=1),rt[mt.length-1]-=1);break}}return rt}};function _defineProperty$a(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function ownKeys$e(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$e(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$e(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$e(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var applyToDraft=(et,tt,nt)=>{switch(nt.type){case"insert_node":{var{path:rt,node:ot}=nt,st=Node$4.parent(et,rt),ut=rt[rt.length-1];if(ut>st.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(rt,"] because the destination is past the end of the node."));if(st.children.splice(ut,0,ot),tt)for(var[ct,ft]of Range$1.points(tt))tt[ft]=Point$1.transform(ct,nt);break}case"insert_text":{var{path:pt,offset:ht,text:mt}=nt;if(mt.length===0)break;var yt=Node$4.leaf(et,pt),vt=yt.text.slice(0,ht),Tt=yt.text.slice(ht);if(yt.text=vt+mt+Tt,tt)for(var[Et,xt]of Range$1.points(tt))tt[xt]=Point$1.transform(Et,nt);break}case"merge_node":{var{path:At}=nt,Ct=Node$4.get(et,At),$t=Path$2.previous(At),Ot=Node$4.get(et,$t),Rt=Node$4.parent(et,At),It=At[At.length-1];if(Text$1.isText(Ct)&&Text$1.isText(Ot))Ot.text+=Ct.text;else if(!Text$1.isText(Ct)&&!Text$1.isText(Ot))Ot.children.push(...Ct.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(At,"] to nodes of different interfaces: ").concat(Scrubber.stringify(Ct)," ").concat(Scrubber.stringify(Ot)));if(Rt.children.splice(It,1),tt)for(var[kt,Mt]of Range$1.points(tt))tt[Mt]=Point$1.transform(kt,nt);break}case"move_node":{var{path:Ft,newPath:zt}=nt;if(Path$2.isAncestor(Ft,zt))throw new Error("Cannot move a path [".concat(Ft,"] to new path [").concat(zt,"] because the destination is inside itself."));var Vt=Node$4.get(et,Ft),Zt=Node$4.parent(et,Ft),Ut=Ft[Ft.length-1];Zt.children.splice(Ut,1);var Xt=Path$2.transform(Ft,nt),Jt=Node$4.get(et,Path$2.parent(Xt)),gn=Xt[Xt.length-1];if(Jt.children.splice(gn,0,Vt),tt)for(var[An,sn]of Range$1.points(tt))tt[sn]=Point$1.transform(An,nt);break}case"remove_node":{var{path:Sn}=nt,In=Sn[Sn.length-1],_n=Node$4.parent(et,Sn);if(_n.children.splice(In,1),tt)for(var[En,Ln]of Range$1.points(tt)){var wn=Point$1.transform(En,nt);if(tt!=null&&wn!=null)tt[Ln]=wn;else{var Dn=void 0,$n=void 0;for(var[Gn,Jn]of Node$4.texts(et))if(Path$2.compare(Jn,Sn)===-1)Dn=[Gn,Jn];else{$n=[Gn,Jn];break}var zn=!1;Dn&&$n&&(Path$2.equals($n[1],Sn)?zn=!Path$2.hasPrevious($n[1]):zn=Path$2.common(Dn[1],Sn).length<Path$2.common($n[1],Sn).length),Dn&&!zn?(En.path=Dn[1],En.offset=Dn[0].text.length):$n?(En.path=$n[1],En.offset=0):tt=null}}break}case"remove_text":{var{path:Qn,offset:Bn,text:jn}=nt;if(jn.length===0)break;var Ar=Node$4.leaf(et,Qn),Er=Ar.text.slice(0,Bn),Pr=Ar.text.slice(Bn+jn.length);if(Ar.text=Er+Pr,tt)for(var[Nr,Ir]of Range$1.points(tt))tt[Ir]=Point$1.transform(Nr,nt);break}case"set_node":{var{path:no,properties:ro,newProperties:ao}=nt;if(no.length===0)throw new Error("Cannot set properties on the root node!");var Xr=Node$4.get(et,no);for(var Jr in ao){if(Jr==="children"||Jr==="text")throw new Error('Cannot set the "'.concat(Jr,'" property of nodes!'));var So=ao[Jr];So==null?delete Xr[Jr]:Xr[Jr]=So}for(var va in ro)ao.hasOwnProperty(va)||delete Xr[va];break}case"set_selection":{var{newProperties:$o}=nt;if($o==null)tt=$o;else{if(tt==null){if(!Range$1.isRange($o))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Scrubber.stringify($o)," when there is no current selection."));tt=_objectSpread$e({},$o)}for(var Qr in $o){var jo=$o[Qr];if(jo==null){if(Qr==="anchor"||Qr==="focus")throw new Error('Cannot remove the "'.concat(Qr,'" selection property'));delete tt[Qr]}else tt[Qr]=jo}}break}case"split_node":{var{path:Bo,position:ss,properties:Us}=nt;if(Bo.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Bo,"] because the root node cannot be split."));var Eo=Node$4.get(et,Bo),Do=Node$4.parent(et,Bo),bo=Bo[Bo.length-1],Vo;if(Text$1.isText(Eo)){var Ts=Eo.text.slice(0,ss),xs=Eo.text.slice(ss);Eo.text=Ts,Vo=_objectSpread$e(_objectSpread$e({},Us),{},{text:xs})}else{var Qo=Eo.children.slice(0,ss),Gs=Eo.children.slice(ss);Eo.children=Qo,Vo=_objectSpread$e(_objectSpread$e({},Us),{},{children:Gs})}if(Do.children.splice(bo+1,0,Vo),tt)for(var[Es,Il]of Range$1.points(tt))tt[Il]=Point$1.transform(Es,nt);break}}return tt},GeneralTransforms={transform(et,tt){et.children=ln(et.children);var nt=et.selection&&ln(et.selection);try{nt=applyToDraft(et,nt,tt)}finally{et.children=dn(et.children),nt?et.selection=r$3(nt)?dn(nt):nt:et.selection=null}}},NodeTransforms={insertNodes(et,tt,nt){et.insertNodes(tt,nt)},liftNodes(et,tt){et.liftNodes(tt)},mergeNodes(et,tt){et.mergeNodes(tt)},moveNodes(et,tt){et.moveNodes(tt)},removeNodes(et,tt){et.removeNodes(tt)},setNodes(et,tt,nt){et.setNodes(tt,nt)},splitNodes(et,tt){et.splitNodes(tt)},unsetNodes(et,tt,nt){et.unsetNodes(tt,nt)},unwrapNodes(et,tt){et.unwrapNodes(tt)},wrapNodes(et,tt,nt){et.wrapNodes(tt,nt)}},SelectionTransforms={collapse(et,tt){et.collapse(tt)},deselect(et){et.deselect()},move(et,tt){et.move(tt)},select(et,tt){et.select(tt)},setPoint(et,tt,nt){et.setPoint(tt,nt)},setSelection(et,tt){et.setSelection(tt)}},isDeepEqual=(et,tt)=>{for(var nt in et){var rt=et[nt],ot=tt[nt];if(isPlainObject$4(rt)&&isPlainObject$4(ot)){if(!isDeepEqual(rt,ot))return!1}else if(Array.isArray(rt)&&Array.isArray(ot)){if(rt.length!==ot.length)return!1;for(var st=0;st<rt.length;st++)if(rt[st]!==ot[st])return!1}else if(rt!==ot)return!1}for(var ut in tt)if(et[ut]===void 0&&tt[ut]!==void 0)return!1;return!0};function _objectWithoutPropertiesLoose$6(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}function _objectWithoutProperties$2(et,tt){if(et==null)return{};var nt=_objectWithoutPropertiesLoose$6(et,tt),rt,ot;if(Object.getOwnPropertySymbols){var st=Object.getOwnPropertySymbols(et);for(ot=0;ot<st.length;ot++)rt=st[ot],!(tt.indexOf(rt)>=0)&&(!Object.prototype.propertyIsEnumerable.call(et,rt)||(nt[rt]=et[rt]))}return nt}var _excluded$4$1=["anchor","focus"];function ownKeys$d(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$d(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$d(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$d(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var Range$1={edges(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:nt=!1}=tt,{anchor:rt,focus:ot}=et;return Range$1.isBackward(et)===nt?[rt,ot]:[ot,rt]},end(et){var[,tt]=Range$1.edges(et);return tt},equals(et,tt){return Point$1.equals(et.anchor,tt.anchor)&&Point$1.equals(et.focus,tt.focus)},includes(et,tt){if(Range$1.isRange(tt)){if(Range$1.includes(et,tt.anchor)||Range$1.includes(et,tt.focus))return!0;var[nt,rt]=Range$1.edges(et),[ot,st]=Range$1.edges(tt);return Point$1.isBefore(nt,ot)&&Point$1.isAfter(rt,st)}var[ut,ct]=Range$1.edges(et),ft=!1,pt=!1;return Point$1.isPoint(tt)?(ft=Point$1.compare(tt,ut)>=0,pt=Point$1.compare(tt,ct)<=0):(ft=Path$2.compare(tt,ut.path)>=0,pt=Path$2.compare(tt,ct.path)<=0),ft&&pt},intersection(et,tt){var nt=_objectWithoutProperties$2(et,_excluded$4$1),[rt,ot]=Range$1.edges(et),[st,ut]=Range$1.edges(tt),ct=Point$1.isBefore(rt,st)?st:rt,ft=Point$1.isBefore(ot,ut)?ot:ut;return Point$1.isBefore(ft,ct)?null:_objectSpread$d({anchor:ct,focus:ft},nt)},isBackward(et){var{anchor:tt,focus:nt}=et;return Point$1.isAfter(tt,nt)},isCollapsed(et){var{anchor:tt,focus:nt}=et;return Point$1.equals(tt,nt)},isExpanded(et){return!Range$1.isCollapsed(et)},isForward(et){return!Range$1.isBackward(et)},isRange(et){return isPlainObject$4(et)&&Point$1.isPoint(et.anchor)&&Point$1.isPoint(et.focus)},*points(et){yield[et.anchor,"anchor"],yield[et.focus,"focus"]},start(et){var[tt]=Range$1.edges(et);return tt},transform(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fn(et,rt=>{if(rt===null)return null;var{affinity:ot="inward"}=nt,st,ut;if(ot==="inward"){var ct=Range$1.isCollapsed(rt);Range$1.isForward(rt)?(st="forward",ut=ct?st:"backward"):(st="backward",ut=ct?st:"forward")}else ot==="outward"?Range$1.isForward(rt)?(st="backward",ut="forward"):(st="forward",ut="backward"):(st=ot,ut=ot);var ft=Point$1.transform(rt.anchor,tt,{affinity:st}),pt=Point$1.transform(rt.focus,tt,{affinity:ut});if(!ft||!pt)return null;rt.anchor=ft,rt.focus=pt})}},isElement$3=et=>isPlainObject$4(et)&&Node$4.isNodeList(et.children)&&!Editor$1.isEditor(et),Element$2={isAncestor(et){return isPlainObject$4(et)&&Node$4.isNodeList(et.children)},isElement:isElement$3,isElementList(et){return Array.isArray(et)&&et.every(tt=>Element$2.isElement(tt))},isElementProps(et){return et.children!==void 0},isElementType:function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return isElement$3(tt)&&tt[rt]===nt},matches(et,tt){for(var nt in tt)if(nt!=="children"&&et[nt]!==tt[nt])return!1;return!0}},_excluded$3$1=["children"],_excluded2$3=["text"],IS_NODE_LIST_CACHE=new WeakMap,Node$4={ancestor(et,tt){var nt=Node$4.get(et,tt);if(Text$1.isText(nt))throw new Error("Cannot get the ancestor node at path [".concat(tt,"] because it refers to a text node instead: ").concat(Scrubber.stringify(nt)));return nt},*ancestors(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var rt of Path$2.ancestors(tt,nt)){var ot=Node$4.ancestor(et,rt),st=[ot,rt];yield st}},child(et,tt){if(Text$1.isText(et))throw new Error("Cannot get the child of a text node: ".concat(Scrubber.stringify(et)));var nt=et.children[tt];if(nt==null)throw new Error("Cannot get child at index `".concat(tt,"` in node: ").concat(Scrubber.stringify(et)));return nt},*children(et,tt){for(var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:rt=!1}=nt,ot=Node$4.ancestor(et,tt),{children:st}=ot,ut=rt?st.length-1:0;rt?ut>=0:ut<st.length;){var ct=Node$4.child(ot,ut),ft=tt.concat(ut);yield[ct,ft],ut=rt?ut-1:ut+1}},common(et,tt,nt){var rt=Path$2.common(tt,nt),ot=Node$4.get(et,rt);return[ot,rt]},descendant(et,tt){var nt=Node$4.get(et,tt);if(Editor$1.isEditor(nt))throw new Error("Cannot get the descendant node at path [".concat(tt,"] because it refers to the root editor node instead: ").concat(Scrubber.stringify(nt)));return nt},*descendants(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[nt,rt]of Node$4.nodes(et,tt))rt.length!==0&&(yield[nt,rt])},*elements(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[nt,rt]of Node$4.nodes(et,tt))Element$2.isElement(nt)&&(yield[nt,rt])},extractProps(et){if(Element$2.isAncestor(et)){var tt=_objectWithoutProperties$2(et,_excluded$3$1);return tt}else{var tt=_objectWithoutProperties$2(et,_excluded2$3);return tt}},first(et,tt){for(var nt=tt.slice(),rt=Node$4.get(et,nt);rt&&!(Text$1.isText(rt)||rt.children.length===0);)rt=rt.children[0],nt.push(0);return[rt,nt]},fragment(et,tt){if(Text$1.isText(et))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Scrubber.stringify(et)));var nt=fn({children:et.children},rt=>{var[ot,st]=Range$1.edges(tt),ut=Node$4.nodes(rt,{reverse:!0,pass:yt=>{var[,vt]=yt;return!Range$1.includes(tt,vt)}});for(var[,ct]of ut){if(!Range$1.includes(tt,ct)){var ft=Node$4.parent(rt,ct),pt=ct[ct.length-1];ft.children.splice(pt,1)}if(Path$2.equals(ct,st.path)){var ht=Node$4.leaf(rt,ct);ht.text=ht.text.slice(0,st.offset)}if(Path$2.equals(ct,ot.path)){var mt=Node$4.leaf(rt,ct);mt.text=mt.text.slice(ot.offset)}}Editor$1.isEditor(rt)&&(rt.selection=null)});return nt.children},get(et,tt){for(var nt=et,rt=0;rt<tt.length;rt++){var ot=tt[rt];if(Text$1.isText(nt)||!nt.children[ot])throw new Error("Cannot find a descendant at path [".concat(tt,"] in node: ").concat(Scrubber.stringify(et)));nt=nt.children[ot]}return nt},has(et,tt){for(var nt=et,rt=0;rt<tt.length;rt++){var ot=tt[rt];if(Text$1.isText(nt)||!nt.children[ot])return!1;nt=nt.children[ot]}return!0},isNode(et){return Text$1.isText(et)||Element$2.isElement(et)||Editor$1.isEditor(et)},isNodeList(et){if(!Array.isArray(et))return!1;var tt=IS_NODE_LIST_CACHE.get(et);if(tt!==void 0)return tt;var nt=et.every(rt=>Node$4.isNode(rt));return IS_NODE_LIST_CACHE.set(et,nt),nt},last(et,tt){for(var nt=tt.slice(),rt=Node$4.get(et,nt);rt&&!(Text$1.isText(rt)||rt.children.length===0);){var ot=rt.children.length-1;rt=rt.children[ot],nt.push(ot)}return[rt,nt]},leaf(et,tt){var nt=Node$4.get(et,tt);if(!Text$1.isText(nt))throw new Error("Cannot get the leaf node at path [".concat(tt,"] because it refers to a non-leaf node: ").concat(Scrubber.stringify(nt)));return nt},*levels(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var rt of Path$2.levels(tt,nt)){var ot=Node$4.get(et,rt);yield[ot,rt]}},matches(et,tt){return Element$2.isElement(et)&&Element$2.isElementProps(tt)&&Element$2.matches(et,tt)||Text$1.isText(et)&&Text$1.isTextProps(tt)&&Text$1.matches(et,tt)},*nodes(et){for(var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:nt,reverse:rt=!1}=tt,{from:ot=[],to:st}=tt,ut=new Set,ct=[],ft=et;!(st&&(rt?Path$2.isBefore(ct,st):Path$2.isAfter(ct,st)));){if(ut.has(ft)||(yield[ft,ct]),!ut.has(ft)&&!Text$1.isText(ft)&&ft.children.length!==0&&(nt==null||nt([ft,ct])===!1)){ut.add(ft);var pt=rt?ft.children.length-1:0;Path$2.isAncestor(ct,ot)&&(pt=ot[ct.length]),ct=ct.concat(pt),ft=Node$4.get(et,ct);continue}if(ct.length===0)break;if(!rt){var ht=Path$2.next(ct);if(Node$4.has(et,ht)){ct=ht,ft=Node$4.get(et,ct);continue}}if(rt&&ct[ct.length-1]!==0){var mt=Path$2.previous(ct);ct=mt,ft=Node$4.get(et,ct);continue}ct=Path$2.parent(ct),ft=Node$4.get(et,ct),ut.add(ft)}},parent(et,tt){var nt=Path$2.parent(tt),rt=Node$4.get(et,nt);if(Text$1.isText(rt))throw new Error("Cannot get the parent of path [".concat(tt,"] because it does not exist in the root."));return rt},string(et){return Text$1.isText(et)?et.text:et.children.map(Node$4.string).join("")},*texts(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[nt,rt]of Node$4.nodes(et,tt))Text$1.isText(nt)&&(yield[nt,rt])}};function ownKeys$c$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$c$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$c$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$c$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var Operation={isNodeOperation(et){return Operation.isOperation(et)&&et.type.endsWith("_node")},isOperation(et){if(!isPlainObject$4(et))return!1;switch(et.type){case"insert_node":return Path$2.isPath(et.path)&&Node$4.isNode(et.node);case"insert_text":return typeof et.offset=="number"&&typeof et.text=="string"&&Path$2.isPath(et.path);case"merge_node":return typeof et.position=="number"&&Path$2.isPath(et.path)&&isPlainObject$4(et.properties);case"move_node":return Path$2.isPath(et.path)&&Path$2.isPath(et.newPath);case"remove_node":return Path$2.isPath(et.path)&&Node$4.isNode(et.node);case"remove_text":return typeof et.offset=="number"&&typeof et.text=="string"&&Path$2.isPath(et.path);case"set_node":return Path$2.isPath(et.path)&&isPlainObject$4(et.properties)&&isPlainObject$4(et.newProperties);case"set_selection":return et.properties===null&&Range$1.isRange(et.newProperties)||et.newProperties===null&&Range$1.isRange(et.properties)||isPlainObject$4(et.properties)&&isPlainObject$4(et.newProperties);case"split_node":return Path$2.isPath(et.path)&&typeof et.position=="number"&&isPlainObject$4(et.properties);default:return!1}},isOperationList(et){return Array.isArray(et)&&et.every(tt=>Operation.isOperation(tt))},isSelectionOperation(et){return Operation.isOperation(et)&&et.type.endsWith("_selection")},isTextOperation(et){return Operation.isOperation(et)&&et.type.endsWith("_text")},inverse(et){switch(et.type){case"insert_node":return _objectSpread$c$1(_objectSpread$c$1({},et),{},{type:"remove_node"});case"insert_text":return _objectSpread$c$1(_objectSpread$c$1({},et),{},{type:"remove_text"});case"merge_node":return _objectSpread$c$1(_objectSpread$c$1({},et),{},{type:"split_node",path:Path$2.previous(et.path)});case"move_node":{var{newPath:tt,path:nt}=et;if(Path$2.equals(tt,nt))return et;if(Path$2.isSibling(nt,tt))return _objectSpread$c$1(_objectSpread$c$1({},et),{},{path:tt,newPath:nt});var rt=Path$2.transform(nt,et),ot=Path$2.transform(Path$2.next(nt),et);return _objectSpread$c$1(_objectSpread$c$1({},et),{},{path:rt,newPath:ot})}case"remove_node":return _objectSpread$c$1(_objectSpread$c$1({},et),{},{type:"insert_node"});case"remove_text":return _objectSpread$c$1(_objectSpread$c$1({},et),{},{type:"insert_text"});case"set_node":{var{properties:st,newProperties:ut}=et;return _objectSpread$c$1(_objectSpread$c$1({},et),{},{properties:ut,newProperties:st})}case"set_selection":{var{properties:ct,newProperties:ft}=et;return ct==null?_objectSpread$c$1(_objectSpread$c$1({},et),{},{properties:ft,newProperties:null}):ft==null?_objectSpread$c$1(_objectSpread$c$1({},et),{},{properties:null,newProperties:ct}):_objectSpread$c$1(_objectSpread$c$1({},et),{},{properties:ft,newProperties:ct})}case"split_node":return _objectSpread$c$1(_objectSpread$c$1({},et),{},{type:"merge_node",path:Path$2.next(et.path)})}}},IS_EDITOR_CACHE=new WeakMap,isEditor=et=>{var tt=IS_EDITOR_CACHE.get(et);if(tt!==void 0)return tt;if(!isPlainObject$4(et))return!1;var nt=typeof et.addMark=="function"&&typeof et.apply=="function"&&typeof et.deleteFragment=="function"&&typeof et.insertBreak=="function"&&typeof et.insertSoftBreak=="function"&&typeof et.insertFragment=="function"&&typeof et.insertNode=="function"&&typeof et.insertText=="function"&&typeof et.isElementReadOnly=="function"&&typeof et.isInline=="function"&&typeof et.isSelectable=="function"&&typeof et.isVoid=="function"&&typeof et.normalizeNode=="function"&&typeof et.onChange=="function"&&typeof et.removeMark=="function"&&typeof et.getDirtyPaths=="function"&&(et.marks===null||isPlainObject$4(et.marks))&&(et.selection===null||Range$1.isRange(et.selection))&&Node$4.isNodeList(et.children)&&Operation.isOperationList(et.operations);return IS_EDITOR_CACHE.set(et,nt),nt},Editor$1={above(et,tt){return et.above(tt)},addMark(et,tt,nt){et.addMark(tt,nt)},after(et,tt,nt){return et.after(tt,nt)},before(et,tt,nt){return et.before(tt,nt)},deleteBackward(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:nt="character"}=tt;et.deleteBackward(nt)},deleteForward(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:nt="character"}=tt;et.deleteForward(nt)},deleteFragment(et,tt){et.deleteFragment(tt)},edges(et,tt){return et.edges(tt)},elementReadOnly(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return et.elementReadOnly(tt)},end(et,tt){return et.end(tt)},first(et,tt){return et.first(tt)},fragment(et,tt){return et.fragment(tt)},hasBlocks(et,tt){return et.hasBlocks(tt)},hasInlines(et,tt){return et.hasInlines(tt)},hasPath(et,tt){return et.hasPath(tt)},hasTexts(et,tt){return et.hasTexts(tt)},insertBreak(et){et.insertBreak()},insertFragment(et,tt,nt){et.insertFragment(tt,nt)},insertNode(et,tt){et.insertNode(tt)},insertSoftBreak(et){et.insertSoftBreak()},insertText(et,tt){et.insertText(tt)},isBlock(et,tt){return et.isBlock(tt)},isEdge(et,tt,nt){return et.isEdge(tt,nt)},isEditor(et){return isEditor(et)},isElementReadOnly(et,tt){return et.isElementReadOnly(tt)},isEmpty(et,tt){return et.isEmpty(tt)},isEnd(et,tt,nt){return et.isEnd(tt,nt)},isInline(et,tt){return et.isInline(tt)},isNormalizing(et){return et.isNormalizing()},isSelectable(et,tt){return et.isSelectable(tt)},isStart(et,tt,nt){return et.isStart(tt,nt)},isVoid(et,tt){return et.isVoid(tt)},last(et,tt){return et.last(tt)},leaf(et,tt,nt){return et.leaf(tt,nt)},levels(et,tt){return et.levels(tt)},marks(et){return et.getMarks()},next(et,tt){return et.next(tt)},node(et,tt,nt){return et.node(tt,nt)},nodes(et,tt){return et.nodes(tt)},normalize(et,tt){et.normalize(tt)},parent(et,tt,nt){return et.parent(tt,nt)},path(et,tt,nt){return et.path(tt,nt)},pathRef(et,tt,nt){return et.pathRef(tt,nt)},pathRefs(et){return et.pathRefs()},point(et,tt,nt){return et.point(tt,nt)},pointRef(et,tt,nt){return et.pointRef(tt,nt)},pointRefs(et){return et.pointRefs()},positions(et,tt){return et.positions(tt)},previous(et,tt){return et.previous(tt)},range(et,tt,nt){return et.range(tt,nt)},rangeRef(et,tt,nt){return et.rangeRef(tt,nt)},rangeRefs(et){return et.rangeRefs()},removeMark(et,tt){et.removeMark(tt)},setNormalizing(et,tt){et.setNormalizing(tt)},start(et,tt){return et.start(tt)},string(et,tt,nt){return et.string(tt,nt)},unhangRange(et,tt,nt){return et.unhangRange(tt,nt)},void(et,tt){return et.void(tt)},withoutNormalizing(et,tt){et.withoutNormalizing(tt)}},Span={isSpan(et){return Array.isArray(et)&&et.length===2&&et.every(Path$2.isPath)}};function ownKeys$b$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$b$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$b$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$b$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var Point$1={compare(et,tt){var nt=Path$2.compare(et.path,tt.path);return nt===0?et.offset<tt.offset?-1:et.offset>tt.offset?1:0:nt},isAfter(et,tt){return Point$1.compare(et,tt)===1},isBefore(et,tt){return Point$1.compare(et,tt)===-1},equals(et,tt){return et.offset===tt.offset&&Path$2.equals(et.path,tt.path)},isPoint(et){return isPlainObject$4(et)&&typeof et.offset=="number"&&Path$2.isPath(et.path)},transform(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fn(et,rt=>{if(rt===null)return null;var{affinity:ot="forward"}=nt,{path:st,offset:ut}=rt;switch(tt.type){case"insert_node":case"move_node":{rt.path=Path$2.transform(st,tt,nt);break}case"insert_text":{Path$2.equals(tt.path,st)&&(tt.offset<ut||tt.offset===ut&&ot==="forward")&&(rt.offset+=tt.text.length);break}case"merge_node":{Path$2.equals(tt.path,st)&&(rt.offset+=tt.position),rt.path=Path$2.transform(st,tt,nt);break}case"remove_text":{Path$2.equals(tt.path,st)&&tt.offset<=ut&&(rt.offset-=Math.min(ut-tt.offset,tt.text.length));break}case"remove_node":{if(Path$2.equals(tt.path,st)||Path$2.isAncestor(tt.path,st))return null;rt.path=Path$2.transform(st,tt,nt);break}case"split_node":{if(Path$2.equals(tt.path,st)){if(tt.position===ut&&ot==null)return null;(tt.position<ut||tt.position===ut&&ot==="forward")&&(rt.offset-=tt.position,rt.path=Path$2.transform(st,tt,_objectSpread$b$1(_objectSpread$b$1({},nt),{},{affinity:"forward"})))}else rt.path=Path$2.transform(st,tt,nt);break}}})}},_scrubber=void 0,Scrubber={setScrubber(et){_scrubber=et},stringify(et){return JSON.stringify(et,_scrubber)}},_excluded$2$2=["text"],_excluded2$2=["anchor","focus"];function ownKeys$a$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$a$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$a$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$a$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var Text$1={equals(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:rt=!1}=nt;function ot(st){var ut=_objectWithoutProperties$2(st,_excluded$2$2);return ut}return isDeepEqual(rt?ot(et):et,rt?ot(tt):tt)},isText(et){return isPlainObject$4(et)&&typeof et.text=="string"},isTextList(et){return Array.isArray(et)&&et.every(tt=>Text$1.isText(tt))},isTextProps(et){return et.text!==void 0},matches(et,tt){for(var nt in tt)if(nt!=="text"&&(!et.hasOwnProperty(nt)||et[nt]!==tt[nt]))return!1;return!0},decorations(et,tt){var nt=[_objectSpread$a$1({},et)];for(var rt of tt){var ot=_objectWithoutProperties$2(rt,_excluded2$2),[st,ut]=Range$1.edges(rt),ct=[],ft=0,pt=st.offset,ht=ut.offset;for(var mt of nt){var{length:yt}=mt.text,vt=ft;if(ft+=yt,pt<=vt&&ft<=ht){Object.assign(mt,ot),ct.push(mt);continue}if(pt!==ht&&(pt===ft||ht===vt)||pt>ft||ht<vt||ht===vt&&vt!==0){ct.push(mt);continue}var Tt=mt,Et=void 0,xt=void 0;if(ht<ft){var At=ht-vt;xt=_objectSpread$a$1(_objectSpread$a$1({},Tt),{},{text:Tt.text.slice(At)}),Tt=_objectSpread$a$1(_objectSpread$a$1({},Tt),{},{text:Tt.text.slice(0,At)})}if(pt>vt){var Ct=pt-vt;Et=_objectSpread$a$1(_objectSpread$a$1({},Tt),{},{text:Tt.text.slice(0,Ct)}),Tt=_objectSpread$a$1(_objectSpread$a$1({},Tt),{},{text:Tt.text.slice(Ct)})}Object.assign(Tt,ot),Et&&ct.push(Et),ct.push(Tt),xt&&ct.push(xt)}nt=ct}return nt}},getDefaultInsertLocation=et=>et.selection?et.selection:et.children.length>0?Editor$1.end(et,[]):[0],matchPath$1=(et,tt)=>{var[nt]=Editor$1.node(et,tt);return rt=>rt===nt},getCharacterDistance=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rt=!nt,ot=nt?codepointsIteratorRTL(tt):tt,st=CodepointType.None,ut=CodepointType.None,ct=0,ft=null,pt=null;for(var ht of ot){var mt=ht.codePointAt(0);if(!mt)break;var yt=getCodepointType(ht,mt);if([st,ut]=rt?[ut,yt]:[yt,st],intersects$1(st,CodepointType.ZWJ)&&intersects$1(ut,CodepointType.ExtPict)&&(rt?ft=endsWithEmojiZWJ(tt.substring(0,ct)):ft=endsWithEmojiZWJ(tt.substring(0,tt.length-ct)),!ft)||intersects$1(st,CodepointType.RI)&&intersects$1(ut,CodepointType.RI)&&(pt!==null?pt=!pt:rt?pt=!0:pt=endsWithOddNumberOfRIs(tt.substring(0,tt.length-ct)),!pt)||st!==CodepointType.None&&ut!==CodepointType.None&&isBoundaryPair(st,ut))break;ct+=ht.length}return ct||1},SPACE=/\s/,PUNCTUATION=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,CHAMELEON=/['\u2018\u2019]/,getWordDistance=function et(tt){for(var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rt=0,ot=!1;tt.length>0;){var st=getCharacterDistance(tt,nt),[ut,ct]=splitByCharacterDistance(tt,st,nt);if(isWordCharacter$1(ut,ct,nt))ot=!0,rt+=st;else if(!ot)rt+=st;else break;tt=ct}return rt},splitByCharacterDistance=(et,tt,nt)=>{if(nt){var rt=et.length-tt;return[et.slice(rt,et.length),et.slice(0,rt)]}return[et.slice(0,tt),et.slice(tt)]},isWordCharacter$1=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(SPACE.test(tt))return!1;if(CHAMELEON.test(tt)){var ot=getCharacterDistance(nt,rt),[st,ut]=splitByCharacterDistance(nt,ot,rt);if(et(st,ut,rt))return!0}return!PUNCTUATION.test(tt)},codepointsIteratorRTL=function*et(tt){for(var nt=tt.length-1,rt=0;rt<tt.length;rt++){var ot=tt.charAt(nt-rt);if(isLowSurrogate(ot.charCodeAt(0))){var st=tt.charAt(nt-rt-1);if(isHighSurrogate(st.charCodeAt(0))){yield st+ot,rt++;continue}}yield ot}},isHighSurrogate=et=>et>=55296&&et<=56319,isLowSurrogate=et=>et>=56320&&et<=57343,CodepointType;(function(et){et[et.None=0]="None",et[et.Extend=1]="Extend",et[et.ZWJ=2]="ZWJ",et[et.RI=4]="RI",et[et.Prepend=8]="Prepend",et[et.SpacingMark=16]="SpacingMark",et[et.L=32]="L",et[et.V=64]="V",et[et.T=128]="T",et[et.LV=256]="LV",et[et.LVT=512]="LVT",et[et.ExtPict=1024]="ExtPict",et[et.Any=2048]="Any"})(CodepointType||(CodepointType={}));var reExtend=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,rePrepend=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,reSpacingMark=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,reL=/^[\u1100-\u115F\uA960-\uA97C]$/,reV=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,reT=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,reLV=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,reLVT=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,reExtPict=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,getCodepointType=(et,tt)=>{var nt=CodepointType.Any;return et.search(reExtend)!==-1&&(nt|=CodepointType.Extend),tt===8205&&(nt|=CodepointType.ZWJ),tt>=127462&&tt<=127487&&(nt|=CodepointType.RI),et.search(rePrepend)!==-1&&(nt|=CodepointType.Prepend),et.search(reSpacingMark)!==-1&&(nt|=CodepointType.SpacingMark),et.search(reL)!==-1&&(nt|=CodepointType.L),et.search(reV)!==-1&&(nt|=CodepointType.V),et.search(reT)!==-1&&(nt|=CodepointType.T),et.search(reLV)!==-1&&(nt|=CodepointType.LV),et.search(reLVT)!==-1&&(nt|=CodepointType.LVT),et.search(reExtPict)!==-1&&(nt|=CodepointType.ExtPict),nt};function intersects$1(et,tt){return(et&tt)!==0}var NonBoundaryPairs=[[CodepointType.L,CodepointType.L|CodepointType.V|CodepointType.LV|CodepointType.LVT],[CodepointType.LV|CodepointType.V,CodepointType.V|CodepointType.T],[CodepointType.LVT|CodepointType.T,CodepointType.T],[CodepointType.Any,CodepointType.Extend|CodepointType.ZWJ],[CodepointType.Any,CodepointType.SpacingMark],[CodepointType.Prepend,CodepointType.Any],[CodepointType.ZWJ,CodepointType.ExtPict],[CodepointType.RI,CodepointType.RI]];function isBoundaryPair(et,tt){return NonBoundaryPairs.findIndex(nt=>intersects$1(et,nt[0])&&intersects$1(tt,nt[1]))===-1}var endingEmojiZWJ=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,endsWithEmojiZWJ=et=>et.search(endingEmojiZWJ)!==-1,endingRIs=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,endsWithOddNumberOfRIs=et=>{var tt=et.match(endingRIs);if(tt===null)return!1;var nt=tt[0].length/2;return nt%2===1},TextTransforms={delete(et,tt){et.delete(tt)},insertFragment(et,tt,nt){et.insertFragment(tt,nt)},insertText(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Editor$1.withoutNormalizing(et,()=>{var{voids:rt=!1}=nt,{at:ot=getDefaultInsertLocation(et)}=nt;if(Path$2.isPath(ot)&&(ot=Editor$1.range(et,ot)),Range$1.isRange(ot))if(Range$1.isCollapsed(ot))ot=ot.anchor;else{var st=Range$1.end(ot);if(!rt&&Editor$1.void(et,{at:st}))return;var ut=Range$1.start(ot),ct=Editor$1.pointRef(et,ut),ft=Editor$1.pointRef(et,st);Transforms.delete(et,{at:ot,voids:rt});var pt=ct.unref(),ht=ft.unref();ot=pt||ht,Transforms.setSelection(et,{anchor:ot,focus:ot})}if(!(!rt&&Editor$1.void(et,{at:ot})||Editor$1.elementReadOnly(et,{at:ot}))){var{path:mt,offset:yt}=ot;tt.length>0&&et.apply({type:"insert_text",path:mt,offset:yt,text:tt})}})}};function ownKeys$9$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$9$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$9$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$9$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var Transforms=_objectSpread$9$1(_objectSpread$9$1(_objectSpread$9$1(_objectSpread$9$1({},GeneralTransforms),NodeTransforms),SelectionTransforms),TextTransforms),apply$2=(et,tt)=>{for(var nt of Editor$1.pathRefs(et))PathRef.transform(nt,tt);for(var rt of Editor$1.pointRefs(et))PointRef.transform(rt,tt);for(var ot of Editor$1.rangeRefs(et))RangeRef.transform(ot,tt);var st=DIRTY_PATHS.get(et)||[],ut=DIRTY_PATH_KEYS.get(et)||new Set,ct,ft,pt=Tt=>{if(Tt){var Et=Tt.join(",");ft.has(Et)||(ft.add(Et),ct.push(Tt))}};if(Path$2.operationCanTransformPath(tt)){ct=[],ft=new Set;for(var ht of st){var mt=Path$2.transform(ht,tt);pt(mt)}}else ct=st,ft=ut;var yt=et.getDirtyPaths(tt);for(var vt of yt)pt(vt);DIRTY_PATHS.set(et,ct),DIRTY_PATH_KEYS.set(et,ft),Transforms.transform(et,tt),et.operations.push(tt),Editor$1.normalize(et,{operation:tt}),tt.type==="set_selection"&&(et.marks=null),FLUSHING.get(et)||(FLUSHING.set(et,!0),Promise.resolve().then(()=>{FLUSHING.set(et,!1),et.onChange({operation:tt}),et.operations=[]}))},getDirtyPaths=(et,tt)=>{switch(tt.type){case"insert_text":case"remove_text":case"set_node":{var{path:nt}=tt;return Path$2.levels(nt)}case"insert_node":{var{node:rt,path:ot}=tt,st=Path$2.levels(ot),ut=Text$1.isText(rt)?[]:Array.from(Node$4.nodes(rt),zt=>{var[,Vt]=zt;return ot.concat(Vt)});return[...st,...ut]}case"merge_node":{var{path:ct}=tt,ft=Path$2.ancestors(ct),pt=Path$2.previous(ct);return[...ft,pt]}case"move_node":{var{path:ht,newPath:mt}=tt;if(Path$2.equals(ht,mt))return[];var yt=[],vt=[];for(var Tt of Path$2.ancestors(ht)){var Et=Path$2.transform(Tt,tt);yt.push(Et)}for(var xt of Path$2.ancestors(mt)){var At=Path$2.transform(xt,tt);vt.push(At)}var Ct=vt[vt.length-1],$t=mt[mt.length-1],Ot=Ct.concat($t);return[...yt,...vt,Ot]}case"remove_node":{var{path:Rt}=tt,It=Path$2.ancestors(Rt);return[...It]}case"split_node":{var{path:kt}=tt,Mt=Path$2.levels(kt),Ft=Path$2.next(kt);return[...Mt,Ft]}default:return[]}},getFragment=et=>{var{selection:tt}=et;return tt?Node$4.fragment(et,tt):[]},normalizeNode=(et,tt)=>{var[nt,rt]=tt;if(!Text$1.isText(nt)){if(Element$2.isElement(nt)&&nt.children.length===0){var ot={text:""};Transforms.insertNodes(et,ot,{at:rt.concat(0),voids:!0});return}for(var st=Editor$1.isEditor(nt)?!1:Element$2.isElement(nt)&&(et.isInline(nt)||nt.children.length===0||Text$1.isText(nt.children[0])||et.isInline(nt.children[0])),ut=0,ct=0;ct<nt.children.length;ct++,ut++){var ft=Node$4.get(et,rt);if(!Text$1.isText(ft)){var pt=ft.children[ut],ht=ft.children[ut-1],mt=ct===nt.children.length-1,yt=Text$1.isText(pt)||Element$2.isElement(pt)&&et.isInline(pt);if(yt!==st)Transforms.removeNodes(et,{at:rt.concat(ut),voids:!0}),ut--;else if(Element$2.isElement(pt)){if(et.isInline(pt)){if(ht==null||!Text$1.isText(ht)){var vt={text:""};Transforms.insertNodes(et,vt,{at:rt.concat(ut),voids:!0}),ut++}else if(mt){var Tt={text:""};Transforms.insertNodes(et,Tt,{at:rt.concat(ut+1),voids:!0}),ut++}}}else ht!=null&&Text$1.isText(ht)&&(Text$1.equals(pt,ht,{loose:!0})?(Transforms.mergeNodes(et,{at:rt.concat(ut),voids:!0}),ut--):ht.text===""?(Transforms.removeNodes(et,{at:rt.concat(ut-1),voids:!0}),ut--):pt.text===""&&(Transforms.removeNodes(et,{at:rt.concat(ut),voids:!0}),ut--))}}}},shouldNormalize=(et,tt)=>{var{iteration:nt,initialDirtyPathsLength:rt}=tt,ot=rt*42;if(nt>ot)throw new Error("Could not completely normalize the editor after ".concat(ot," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},above=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:rt=!1,mode:ot="lowest",at:st=tt.selection,match:ut}=nt;if(!!st){var ct=Editor$1.path(tt,st),ft=ot==="lowest";for(var[pt,ht]of Editor$1.levels(tt,{at:ct,voids:rt,match:ut,reverse:ft}))if(!Text$1.isText(pt)){if(Range$1.isRange(st)){if(Path$2.isAncestor(ht,st.anchor.path)&&Path$2.isAncestor(ht,st.focus.path))return[pt,ht]}else if(!Path$2.equals(ct,ht))return[pt,ht]}}};function ownKeys$8$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$8$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$8$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$8$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var addMark=(et,tt,nt)=>{var{selection:rt}=et;if(rt){var ot=(mt,yt)=>{if(!Text$1.isText(mt))return!1;var[vt,Tt]=Editor$1.parent(et,yt);return!et.isVoid(vt)||et.markableVoid(vt)},st=Range$1.isExpanded(rt),ut=!1;if(!st){var[ct,ft]=Editor$1.node(et,rt);if(ct&&ot(ct,ft)){var[pt]=Editor$1.parent(et,ft);ut=pt&&et.markableVoid(pt)}}if(st||ut)Transforms.setNodes(et,{[tt]:nt},{match:ot,split:!0,voids:!0});else{var ht=_objectSpread$8$1(_objectSpread$8$1({},Editor$1.marks(et)||{}),{},{[tt]:nt});et.marks=ht,FLUSHING.get(et)||et.onChange()}}};function ownKeys$7$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$7$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$7$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$7$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var after=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=Editor$1.point(tt,nt,{edge:"end"}),st=Editor$1.end(tt,[]),ut={anchor:ot,focus:st},{distance:ct=1}=rt,ft=0,pt;for(var ht of Editor$1.positions(tt,_objectSpread$7$1(_objectSpread$7$1({},rt),{},{at:ut}))){if(ft>ct)break;ft!==0&&(pt=ht),ft++}return pt};function ownKeys$6$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$6$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$6$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$6$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var before=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=Editor$1.start(tt,[]),st=Editor$1.point(tt,nt,{edge:"start"}),ut={anchor:ot,focus:st},{distance:ct=1}=rt,ft=0,pt;for(var ht of Editor$1.positions(tt,_objectSpread$6$1(_objectSpread$6$1({},rt),{},{at:ut,reverse:!0}))){if(ft>ct)break;ft!==0&&(pt=ht),ft++}return pt},deleteBackward=(et,tt)=>{var{selection:nt}=et;nt&&Range$1.isCollapsed(nt)&&Transforms.delete(et,{unit:tt,reverse:!0})},deleteForward=(et,tt)=>{var{selection:nt}=et;nt&&Range$1.isCollapsed(nt)&&Transforms.delete(et,{unit:tt})},deleteFragment=function et(tt){var{direction:nt="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:rt}=tt;rt&&Range$1.isExpanded(rt)&&Transforms.delete(tt,{reverse:nt==="backward"})},edges=(et,tt)=>[Editor$1.start(et,tt),Editor$1.end(et,tt)];function ownKeys$5$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$5$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$5$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$5$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var elementReadOnly=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Editor$1.above(tt,_objectSpread$5$1(_objectSpread$5$1({},nt),{},{match:rt=>Element$2.isElement(rt)&&Editor$1.isElementReadOnly(tt,rt)}))},end$1=(et,tt)=>Editor$1.point(et,tt,{edge:"end"}),first=(et,tt)=>{var nt=Editor$1.path(et,tt,{edge:"start"});return Editor$1.node(et,nt)},fragment$1=(et,tt)=>{var nt=Editor$1.range(et,tt);return Node$4.fragment(et,nt)};function ownKeys$4$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$4$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$4$1(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$4$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var getVoid=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Editor$1.above(tt,_objectSpread$4$1(_objectSpread$4$1({},nt),{},{match:rt=>Element$2.isElement(rt)&&Editor$1.isVoid(tt,rt)}))},hasBlocks=(et,tt)=>tt.children.some(nt=>Element$2.isElement(nt)&&Editor$1.isBlock(et,nt)),hasInlines=(et,tt)=>tt.children.some(nt=>Text$1.isText(nt)||Editor$1.isInline(et,nt)),hasPath=(et,tt)=>Node$4.has(et,tt),hasTexts=(et,tt)=>tt.children.every(nt=>Text$1.isText(nt)),insertBreak=et=>{Transforms.splitNodes(et,{always:!0})},insertNode=(et,tt,nt)=>{Transforms.insertNodes(et,tt,nt)},insertSoftBreak=et=>{Transforms.splitNodes(et,{always:!0})};function ownKeys$3$2(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$3$2(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$3$2(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$3$2(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var insertText=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:ot,marks:st}=tt;if(ot){if(st){var ut=_objectSpread$3$2({text:nt},st);Transforms.insertNodes(tt,ut,{at:rt.at,voids:rt.voids})}else Transforms.insertText(tt,nt,rt);tt.marks=null}},isBlock=(et,tt)=>!et.isInline(tt),isEdge=(et,tt,nt)=>Editor$1.isStart(et,tt,nt)||Editor$1.isEnd(et,tt,nt),isEmpty$2=(et,tt)=>{var{children:nt}=tt,[rt]=nt;return nt.length===0||nt.length===1&&Text$1.isText(rt)&&rt.text===""&&!et.isVoid(tt)},isEnd=(et,tt,nt)=>{var rt=Editor$1.end(et,nt);return Point$1.equals(tt,rt)},isNormalizing=et=>{var tt=NORMALIZING.get(et);return tt===void 0?!0:tt},isStart=(et,tt,nt)=>{if(tt.offset!==0)return!1;var rt=Editor$1.start(et,nt);return Point$1.equals(tt,rt)},last=(et,tt)=>{var nt=Editor$1.path(et,tt,{edge:"end"});return Editor$1.node(et,nt)},leaf=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=Editor$1.path(tt,nt,rt),st=Node$4.leaf(tt,ot);return[st,ot]};function*levels$1(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:nt=et.selection,reverse:rt=!1,voids:ot=!1}=tt,{match:st}=tt;if(st==null&&(st=()=>!0),!!nt){var ut=[],ct=Editor$1.path(et,nt);for(var[ft,pt]of Node$4.levels(et,ct))if(!!st(ft,pt)&&(ut.push([ft,pt]),!ot&&Element$2.isElement(ft)&&Editor$1.isVoid(et,ft)))break;rt&&ut.reverse(),yield*ut}}var _excluded$1$2=["text"],_excluded2$1$1=["text"],marks=function et(tt){var{marks:nt,selection:rt}=tt;if(!rt)return null;if(nt)return nt;if(Range$1.isExpanded(rt)){var[ot]=Editor$1.nodes(tt,{match:Text$1.isText});if(ot){var[st]=ot,ut=_objectWithoutProperties$2(st,_excluded$1$2);return ut}else return{}}var{anchor:ct}=rt,{path:ft}=ct,[pt]=Editor$1.leaf(tt,ft);if(ct.offset===0){var ht=Editor$1.previous(tt,{at:ft,match:Text$1.isText}),mt=Editor$1.above(tt,{match:At=>Element$2.isElement(At)&&Editor$1.isVoid(tt,At)&&tt.markableVoid(At)});if(!mt){var yt=Editor$1.above(tt,{match:At=>Element$2.isElement(At)&&Editor$1.isBlock(tt,At)});if(ht&&yt){var[vt,Tt]=ht,[,Et]=yt;Path$2.isAncestor(Et,Tt)&&(pt=vt)}}}var xt=_objectWithoutProperties$2(pt,_excluded2$1$1);return xt},next=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:rt="lowest",voids:ot=!1}=nt,{match:st,at:ut=tt.selection}=nt;if(!!ut){var ct=Editor$1.after(tt,ut,{voids:ot});if(!!ct){var[,ft]=Editor$1.last(tt,[]),pt=[ct.path,ft];if(Path$2.isPath(ut)&&ut.length===0)throw new Error("Cannot get the next node from the root node!");if(st==null)if(Path$2.isPath(ut)){var[ht]=Editor$1.parent(tt,ut);st=yt=>ht.children.includes(yt)}else st=()=>!0;var[mt]=Editor$1.nodes(tt,{at:pt,match:st,mode:rt,voids:ot});return mt}}},node=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=Editor$1.path(tt,nt,rt),st=Node$4.get(tt,ot);return[st,ot]};function*nodes$1(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:nt=et.selection,mode:rt="all",universal:ot=!1,reverse:st=!1,voids:ut=!1,ignoreNonSelectable:ct=!1}=tt,{match:ft}=tt;if(ft||(ft=()=>!0),!!nt){var pt,ht;if(Span.isSpan(nt))pt=nt[0],ht=nt[1];else{var mt=Editor$1.path(et,nt,{edge:"start"}),yt=Editor$1.path(et,nt,{edge:"end"});pt=st?yt:mt,ht=st?mt:yt}var vt=Node$4.nodes(et,{reverse:st,from:pt,to:ht,pass:Ot=>{var[Rt]=Ot;return Element$2.isElement(Rt)?!!(!ut&&(Editor$1.isVoid(et,Rt)||Editor$1.isElementReadOnly(et,Rt))||ct&&!Editor$1.isSelectable(et,Rt)):!1}}),Tt=[],Et;for(var[xt,At]of vt)if(!(ct&&Element$2.isElement(xt)&&!Editor$1.isSelectable(et,xt))){var Ct=Et&&Path$2.compare(At,Et[1])===0;if(!(rt==="highest"&&Ct)){if(!ft(xt,At)){if(ot&&!Ct&&Text$1.isText(xt))return;continue}if(rt==="lowest"&&Ct){Et=[xt,At];continue}var $t=rt==="lowest"?Et:[xt,At];$t&&(ot?Tt.push($t):yield $t),Et=[xt,At]}}rt==="lowest"&&Et&&(ot?Tt.push(Et):yield Et),ot&&(yield*Tt)}}var normalize$d=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:rt=!1,operation:ot}=nt,st=ht=>DIRTY_PATHS.get(ht)||[],ut=ht=>DIRTY_PATH_KEYS.get(ht)||new Set,ct=ht=>{var mt=st(ht).pop(),yt=mt.join(",");return ut(ht).delete(yt),mt};if(!!Editor$1.isNormalizing(tt)){if(rt){var ft=Array.from(Node$4.nodes(tt),ht=>{var[,mt]=ht;return mt}),pt=new Set(ft.map(ht=>ht.join(",")));DIRTY_PATHS.set(tt,ft),DIRTY_PATH_KEYS.set(tt,pt)}st(tt).length!==0&&Editor$1.withoutNormalizing(tt,()=>{for(var ht of st(tt))if(Node$4.has(tt,ht)){var mt=Editor$1.node(tt,ht),[yt,vt]=mt;Element$2.isElement(yt)&&yt.children.length===0&&tt.normalizeNode(mt,{operation:ot})}for(var Tt=st(tt),Et=Tt.length,xt=0;Tt.length!==0;){if(!tt.shouldNormalize({dirtyPaths:Tt,iteration:xt,initialDirtyPathsLength:Et,operation:ot}))return;var At=ct(tt);if(Node$4.has(tt,At)){var Ct=Editor$1.node(tt,At);tt.normalizeNode(Ct,{operation:ot})}xt++,Tt=st(tt)}})}},parent=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=Editor$1.path(tt,nt,rt),st=Path$2.parent(ot),ut=Editor$1.node(tt,st);return ut},pathRef=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:ot="forward"}=rt,st={current:nt,affinity:ot,unref(){var{current:ct}=st,ft=Editor$1.pathRefs(tt);return ft.delete(st),st.current=null,ct}},ut=Editor$1.pathRefs(tt);return ut.add(st),st},pathRefs=et=>{var tt=PATH_REFS.get(et);return tt||(tt=new Set,PATH_REFS.set(et,tt)),tt},path$5=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:ot,edge:st}=rt;if(Path$2.isPath(nt)){if(st==="start"){var[,ut]=Node$4.first(tt,nt);nt=ut}else if(st==="end"){var[,ct]=Node$4.last(tt,nt);nt=ct}}return Range$1.isRange(nt)&&(st==="start"?nt=Range$1.start(nt):st==="end"?nt=Range$1.end(nt):nt=Path$2.common(nt.anchor.path,nt.focus.path)),Point$1.isPoint(nt)&&(nt=nt.path),ot!=null&&(nt=nt.slice(0,ot)),nt},pointRef=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:ot="forward"}=rt,st={current:nt,affinity:ot,unref(){var{current:ct}=st,ft=Editor$1.pointRefs(tt);return ft.delete(st),st.current=null,ct}},ut=Editor$1.pointRefs(tt);return ut.add(st),st},pointRefs=et=>{var tt=POINT_REFS.get(et);return tt||(tt=new Set,POINT_REFS.set(et,tt)),tt},point$d=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:ot="start"}=rt;if(Path$2.isPath(nt)){var st;if(ot==="end"){var[,ut]=Node$4.last(tt,nt);st=ut}else{var[,ct]=Node$4.first(tt,nt);st=ct}var ft=Node$4.get(tt,st);if(!Text$1.isText(ft))throw new Error("Cannot get the ".concat(ot," point in the node at path [").concat(nt,"] because it has no ").concat(ot," text node."));return{path:st,offset:ot==="end"?ft.text.length:0}}if(Range$1.isRange(nt)){var[pt,ht]=Range$1.edges(nt);return ot==="start"?pt:ht}return nt};function*positions$1(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:nt=et.selection,unit:rt="offset",reverse:ot=!1,voids:st=!1,ignoreNonSelectable:ut=!1}=tt;if(!nt)return;var ct=Editor$1.range(et,nt),[ft,pt]=Range$1.edges(ct),ht=ot?pt:ft,mt=!1,yt="",vt=0,Tt=0,Et=0;for(var[xt,At]of Editor$1.nodes(et,{at:nt,reverse:ot,voids:st,ignoreNonSelectable:ut})){if(Element$2.isElement(xt)){if(!st&&(et.isVoid(xt)||et.isElementReadOnly(xt))){yield Editor$1.start(et,At);continue}if(et.isInline(xt))continue;if(Editor$1.hasInlines(et,xt)){var Ct=Path$2.isAncestor(At,pt.path)?pt:Editor$1.end(et,At),$t=Path$2.isAncestor(At,ft.path)?ft:Editor$1.start(et,At);yt=Editor$1.string(et,{anchor:$t,focus:Ct},{voids:st}),mt=!0}}if(Text$1.isText(xt)){var Ot=Path$2.equals(At,ht.path);for(Ot?(Tt=ot?ht.offset:xt.text.length-ht.offset,Et=ht.offset):(Tt=xt.text.length,Et=ot?Tt:0),(Ot||mt||rt==="offset")&&(yield{path:At,offset:Et},mt=!1);;){if(vt===0){if(yt==="")break;vt=Rt(yt,rt,ot),yt=splitByCharacterDistance(yt,vt,ot)[1]}if(Et=ot?Et-vt:Et+vt,Tt=Tt-vt,Tt<0){vt=-Tt;break}vt=0,yield{path:At,offset:Et}}}}function Rt(It,kt,Mt){return kt==="character"?getCharacterDistance(It,Mt):kt==="word"?getWordDistance(It,Mt):kt==="line"||kt==="block"?It.length:1}}var previous=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:rt="lowest",voids:ot=!1}=nt,{match:st,at:ut=tt.selection}=nt;if(!!ut){var ct=Editor$1.before(tt,ut,{voids:ot});if(!!ct){var[,ft]=Editor$1.first(tt,[]),pt=[ct.path,ft];if(Path$2.isPath(ut)&&ut.length===0)throw new Error("Cannot get the previous node from the root node!");if(st==null)if(Path$2.isPath(ut)){var[ht]=Editor$1.parent(tt,ut);st=yt=>ht.children.includes(yt)}else st=()=>!0;var[mt]=Editor$1.nodes(tt,{reverse:!0,at:pt,match:st,mode:rt,voids:ot});return mt}}},rangeRef=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:ot="forward"}=rt,st={current:nt,affinity:ot,unref(){var{current:ct}=st,ft=Editor$1.rangeRefs(tt);return ft.delete(st),st.current=null,ct}},ut=Editor$1.rangeRefs(tt);return ut.add(st),st},rangeRefs=et=>{var tt=RANGE_REFS.get(et);return tt||(tt=new Set,RANGE_REFS.set(et,tt)),tt},range$5=(et,tt,nt)=>{if(Range$1.isRange(tt)&&!nt)return tt;var rt=Editor$1.start(et,tt),ot=Editor$1.end(et,nt||tt);return{anchor:rt,focus:ot}};function ownKeys$2$2(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$2$2(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$2$2(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$2$2(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var removeMark=(et,tt)=>{var{selection:nt}=et;if(nt){var rt=(ht,mt)=>{if(!Text$1.isText(ht))return!1;var[yt,vt]=Editor$1.parent(et,mt);return!et.isVoid(yt)||et.markableVoid(yt)},ot=Range$1.isExpanded(nt),st=!1;if(!ot){var[ut,ct]=Editor$1.node(et,nt);if(ut&&rt(ut,ct)){var[ft]=Editor$1.parent(et,ct);st=ft&&et.markableVoid(ft)}}if(ot||st)Transforms.unsetNodes(et,tt,{match:rt,split:!0,voids:!0});else{var pt=_objectSpread$2$2({},Editor$1.marks(et)||{});delete pt[tt],et.marks=pt,FLUSHING.get(et)||et.onChange()}}},setNormalizing=(et,tt)=>{NORMALIZING.set(et,tt)},start=(et,tt)=>Editor$1.point(et,tt,{edge:"start"}),string$1=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:ot=!1}=rt,st=Editor$1.range(tt,nt),[ut,ct]=Range$1.edges(st),ft="";for(var[pt,ht]of Editor$1.nodes(tt,{at:st,match:Text$1.isText,voids:ot})){var mt=pt.text;Path$2.equals(ht,ct.path)&&(mt=mt.slice(0,ct.offset)),Path$2.equals(ht,ut.path)&&(mt=mt.slice(ut.offset)),ft+=mt}return ft},unhangRange=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:ot=!1}=rt,[st,ut]=Range$1.edges(nt);if(st.offset!==0||ut.offset!==0||Range$1.isCollapsed(nt)||Path$2.hasPrevious(ut.path))return nt;var ct=Editor$1.above(tt,{at:ut,match:Tt=>Element$2.isElement(Tt)&&Editor$1.isBlock(tt,Tt),voids:ot}),ft=ct?ct[1]:[],pt=Editor$1.start(tt,st),ht={anchor:pt,focus:ut},mt=!0;for(var[yt,vt]of Editor$1.nodes(tt,{at:ht,match:Text$1.isText,reverse:!0,voids:ot})){if(mt){mt=!1;continue}if(yt.text!==""||Path$2.isBefore(vt,ft)){ut={path:vt,offset:yt.text.length};break}}return{anchor:st,focus:ut}},withoutNormalizing=(et,tt)=>{var nt=Editor$1.isNormalizing(et);Editor$1.setNormalizing(et,!1);try{tt()}finally{Editor$1.setNormalizing(et,nt)}Editor$1.normalize(et)},deleteText=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Editor$1.withoutNormalizing(tt,()=>{var rt,ot,{reverse:st=!1,unit:ut="character",distance:ct=1,voids:ft=!1}=nt,{at:pt=tt.selection,hanging:ht=!1}=nt;if(!!pt){var mt=!1;if(Range$1.isRange(pt)&&Range$1.isCollapsed(pt)&&(mt=!0,pt=pt.anchor),Point$1.isPoint(pt)){var yt=Editor$1.void(tt,{at:pt,mode:"highest"});if(!ft&&yt){var[,vt]=yt;pt=vt}else{var Tt={unit:ut,distance:ct},Et=st?Editor$1.before(tt,pt,Tt)||Editor$1.start(tt,[]):Editor$1.after(tt,pt,Tt)||Editor$1.end(tt,[]);pt={anchor:pt,focus:Et},ht=!0}}if(Path$2.isPath(pt)){Transforms.removeNodes(tt,{at:pt,voids:ft});return}if(!Range$1.isCollapsed(pt)){if(!ht){var[,xt]=Range$1.edges(pt),At=Editor$1.end(tt,[]);Point$1.equals(xt,At)||(pt=Editor$1.unhangRange(tt,pt,{voids:ft}))}var[Ct,$t]=Range$1.edges(pt),Ot=Editor$1.above(tt,{match:Er=>Element$2.isElement(Er)&&Editor$1.isBlock(tt,Er),at:Ct,voids:ft}),Rt=Editor$1.above(tt,{match:Er=>Element$2.isElement(Er)&&Editor$1.isBlock(tt,Er),at:$t,voids:ft}),It=Ot&&Rt&&!Path$2.equals(Ot[1],Rt[1]),kt=Path$2.equals(Ct.path,$t.path),Mt=ft?null:(rt=Editor$1.void(tt,{at:Ct,mode:"highest"}))!==null&&rt!==void 0?rt:Editor$1.elementReadOnly(tt,{at:Ct,mode:"highest"}),Ft=ft?null:(ot=Editor$1.void(tt,{at:$t,mode:"highest"}))!==null&&ot!==void 0?ot:Editor$1.elementReadOnly(tt,{at:$t,mode:"highest"});if(Mt){var zt=Editor$1.before(tt,Ct);zt&&Ot&&Path$2.isAncestor(Ot[1],zt.path)&&(Ct=zt)}if(Ft){var Vt=Editor$1.after(tt,$t);Vt&&Rt&&Path$2.isAncestor(Rt[1],Vt.path)&&($t=Vt)}var Zt=[],Ut;for(var Xt of Editor$1.nodes(tt,{at:pt,voids:ft})){var[Jt,gn]=Xt;Ut&&Path$2.compare(gn,Ut)===0||(!ft&&Element$2.isElement(Jt)&&(Editor$1.isVoid(tt,Jt)||Editor$1.isElementReadOnly(tt,Jt))||!Path$2.isCommon(gn,Ct.path)&&!Path$2.isCommon(gn,$t.path))&&(Zt.push(Xt),Ut=gn)}var An=Array.from(Zt,Er=>{var[,Pr]=Er;return Editor$1.pathRef(tt,Pr)}),sn=Editor$1.pointRef(tt,Ct),Sn=Editor$1.pointRef(tt,$t),In="";if(!kt&&!Mt){var _n=sn.current,[En]=Editor$1.leaf(tt,_n),{path:Ln}=_n,{offset:wn}=Ct,Dn=En.text.slice(wn);Dn.length>0&&(tt.apply({type:"remove_text",path:Ln,offset:wn,text:Dn}),In=Dn)}if(An.reverse().map(Er=>Er.unref()).filter(Er=>Er!==null).forEach(Er=>Transforms.removeNodes(tt,{at:Er,voids:ft})),!Ft){var $n=Sn.current,[Gn]=Editor$1.leaf(tt,$n),{path:Jn}=$n,zn=kt?Ct.offset:0,Qn=Gn.text.slice(zn,$t.offset);Qn.length>0&&(tt.apply({type:"remove_text",path:Jn,offset:zn,text:Qn}),In=Qn)}!kt&&It&&Sn.current&&sn.current&&Transforms.mergeNodes(tt,{at:Sn.current,hanging:!0,voids:ft}),mt&&st&&ut==="character"&&In.length>1&&In.match(/[\u0E00-\u0E7F]+/)&&Transforms.insertText(tt,In.slice(0,In.length-ct));var Bn=sn.unref(),jn=Sn.unref(),Ar=st?Bn||jn:jn||Bn;nt.at==null&&Ar&&Transforms.select(tt,Ar)}}})},insertFragment=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Editor$1.withoutNormalizing(tt,()=>{var{hanging:ot=!1,voids:st=!1}=rt,{at:ut=getDefaultInsertLocation(tt)}=rt;if(!!nt.length){if(Range$1.isRange(ut))if(ot||(ut=Editor$1.unhangRange(tt,ut,{voids:st})),Range$1.isCollapsed(ut))ut=ut.anchor;else{var[,ct]=Range$1.edges(ut);if(!st&&Editor$1.void(tt,{at:ct}))return;var ft=Editor$1.pointRef(tt,ct);Transforms.delete(tt,{at:ut}),ut=ft.unref()}else Path$2.isPath(ut)&&(ut=Editor$1.start(tt,ut));if(!(!st&&Editor$1.void(tt,{at:ut}))){var pt=Editor$1.above(tt,{at:ut,match:wn=>Element$2.isElement(wn)&&Editor$1.isInline(tt,wn),mode:"highest",voids:st});if(pt){var[,ht]=pt;if(Editor$1.isEnd(tt,ut,ht)){var mt=Editor$1.after(tt,ht);ut=mt}else if(Editor$1.isStart(tt,ut,ht)){var yt=Editor$1.before(tt,ht);ut=yt}}var vt=Editor$1.above(tt,{match:wn=>Element$2.isElement(wn)&&Editor$1.isBlock(tt,wn),at:ut,voids:st}),[,Tt]=vt,Et=Editor$1.isStart(tt,ut,Tt),xt=Editor$1.isEnd(tt,ut,Tt),At=Et&&xt,Ct=!Et||Et&&xt,$t=!xt,[,Ot]=Node$4.first({children:nt},[]),[,Rt]=Node$4.last({children:nt},[]),It=[],kt=wn=>{var[Dn,$n]=wn,Gn=$n.length===0;return Gn?!1:At?!0:!(Ct&&Path$2.isAncestor($n,Ot)&&Element$2.isElement(Dn)&&!tt.isVoid(Dn)&&!tt.isInline(Dn)||$t&&Path$2.isAncestor($n,Rt)&&Element$2.isElement(Dn)&&!tt.isVoid(Dn)&&!tt.isInline(Dn))};for(var Mt of Node$4.nodes({children:nt},{pass:kt}))kt(Mt)&&It.push(Mt);var Ft=[],zt=[],Vt=[],Zt=!0,Ut=!1;for(var[Xt]of It)Element$2.isElement(Xt)&&!tt.isInline(Xt)?(Zt=!1,Ut=!0,zt.push(Xt)):Zt?Ft.push(Xt):Vt.push(Xt);var[Jt]=Editor$1.nodes(tt,{at:ut,match:wn=>Text$1.isText(wn)||Editor$1.isInline(tt,wn),mode:"highest",voids:st}),[,gn]=Jt,An=Editor$1.isStart(tt,ut,gn),sn=Editor$1.isEnd(tt,ut,gn),Sn=Editor$1.pathRef(tt,xt&&!Vt.length?Path$2.next(Tt):Tt),In=Editor$1.pathRef(tt,sn?Path$2.next(gn):gn);Transforms.splitNodes(tt,{at:ut,match:wn=>Ut?Element$2.isElement(wn)&&Editor$1.isBlock(tt,wn):Text$1.isText(wn)||Editor$1.isInline(tt,wn),mode:Ut?"lowest":"highest",always:Ut&&(!Et||Ft.length>0)&&(!xt||Vt.length>0),voids:st});var _n=Editor$1.pathRef(tt,!An||An&&sn?Path$2.next(gn):gn);if(Transforms.insertNodes(tt,Ft,{at:_n.current,match:wn=>Text$1.isText(wn)||Editor$1.isInline(tt,wn),mode:"highest",voids:st}),At&&!Ft.length&&zt.length&&!Vt.length&&Transforms.delete(tt,{at:Tt,voids:st}),Transforms.insertNodes(tt,zt,{at:Sn.current,match:wn=>Element$2.isElement(wn)&&Editor$1.isBlock(tt,wn),mode:"lowest",voids:st}),Transforms.insertNodes(tt,Vt,{at:In.current,match:wn=>Text$1.isText(wn)||Editor$1.isInline(tt,wn),mode:"highest",voids:st}),!rt.at){var En;if(Vt.length>0&&In.current?En=Path$2.previous(In.current):zt.length>0&&Sn.current?En=Path$2.previous(Sn.current):_n.current&&(En=Path$2.previous(_n.current)),En){var Ln=Editor$1.end(tt,En);Transforms.select(tt,Ln)}}_n.unref(),Sn.unref(),In.unref()}}})},collapse=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:rt="anchor"}=nt,{selection:ot}=tt;if(ot){if(rt==="anchor")Transforms.select(tt,ot.anchor);else if(rt==="focus")Transforms.select(tt,ot.focus);else if(rt==="start"){var[st]=Range$1.edges(ot);Transforms.select(tt,st)}else if(rt==="end"){var[,ut]=Range$1.edges(ot);Transforms.select(tt,ut)}}else return},deselect=et=>{var{selection:tt}=et;tt&&et.apply({type:"set_selection",properties:tt,newProperties:null})},move$1=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:rt}=tt,{distance:ot=1,unit:st="character",reverse:ut=!1}=nt,{edge:ct=null}=nt;if(!!rt){ct==="start"&&(ct=Range$1.isBackward(rt)?"focus":"anchor"),ct==="end"&&(ct=Range$1.isBackward(rt)?"anchor":"focus");var{anchor:ft,focus:pt}=rt,ht={distance:ot,unit:st,ignoreNonSelectable:!0},mt={};if(ct==null||ct==="anchor"){var yt=ut?Editor$1.before(tt,ft,ht):Editor$1.after(tt,ft,ht);yt&&(mt.anchor=yt)}if(ct==null||ct==="focus"){var vt=ut?Editor$1.before(tt,pt,ht):Editor$1.after(tt,pt,ht);vt&&(mt.focus=vt)}Transforms.setSelection(tt,mt)}},select$1=(et,tt)=>{var{selection:nt}=et;if(tt=Editor$1.range(et,tt),nt){Transforms.setSelection(et,tt);return}if(!Range$1.isRange(tt))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Scrubber.stringify(tt)));et.apply({type:"set_selection",properties:nt,newProperties:tt})};function ownKeys$1$2(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$1$2(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$1$2(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$1$2(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var setPoint=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:ot}=tt,{edge:st="both"}=rt;if(!!ot){st==="start"&&(st=Range$1.isBackward(ot)?"focus":"anchor"),st==="end"&&(st=Range$1.isBackward(ot)?"anchor":"focus");var{anchor:ut,focus:ct}=ot,ft=st==="anchor"?ut:ct;Transforms.setSelection(tt,{[st==="anchor"?"anchor":"focus"]:_objectSpread$1$2(_objectSpread$1$2({},ft),nt)})}},setSelection=(et,tt)=>{var{selection:nt}=et,rt={},ot={};if(!!nt){for(var st in tt)(st==="anchor"&&tt.anchor!=null&&!Point$1.equals(tt.anchor,nt.anchor)||st==="focus"&&tt.focus!=null&&!Point$1.equals(tt.focus,nt.focus)||st!=="anchor"&&st!=="focus"&&tt[st]!==nt[st])&&(rt[st]=nt[st],ot[st]=tt[st]);Object.keys(rt).length>0&&et.apply({type:"set_selection",properties:rt,newProperties:ot})}},insertNodes=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Editor$1.withoutNormalizing(tt,()=>{var{hanging:ot=!1,voids:st=!1,mode:ut="lowest"}=rt,{at:ct,match:ft,select:pt}=rt;if(Node$4.isNode(nt)&&(nt=[nt]),nt.length!==0){var[ht]=nt;if(ct||(ct=getDefaultInsertLocation(tt),pt=!0),pt==null&&(pt=!1),Range$1.isRange(ct))if(ot||(ct=Editor$1.unhangRange(tt,ct,{voids:st})),Range$1.isCollapsed(ct))ct=ct.anchor;else{var[,mt]=Range$1.edges(ct),yt=Editor$1.pointRef(tt,mt);Transforms.delete(tt,{at:ct}),ct=yt.unref()}if(Point$1.isPoint(ct)){ft==null&&(Text$1.isText(ht)?ft=kt=>Text$1.isText(kt):tt.isInline(ht)?ft=kt=>Text$1.isText(kt)||Editor$1.isInline(tt,kt):ft=kt=>Element$2.isElement(kt)&&Editor$1.isBlock(tt,kt));var[vt]=Editor$1.nodes(tt,{at:ct.path,match:ft,mode:ut,voids:st});if(vt){var[,Tt]=vt,Et=Editor$1.pathRef(tt,Tt),xt=Editor$1.isEnd(tt,ct,Tt);Transforms.splitNodes(tt,{at:ct,match:ft,mode:ut,voids:st});var At=Et.unref();ct=xt?Path$2.next(At):At}else return}var Ct=Path$2.parent(ct),$t=ct[ct.length-1];if(!(!st&&Editor$1.void(tt,{at:Ct}))){for(var Ot of nt){var Rt=Ct.concat($t);$t++,tt.apply({type:"insert_node",path:Rt,node:Ot}),ct=Path$2.next(ct)}if(ct=Path$2.previous(ct),pt){var It=Editor$1.end(tt,ct);It&&Transforms.select(tt,It)}}}})},liftNodes=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Editor$1.withoutNormalizing(tt,()=>{var{at:rt=tt.selection,mode:ot="lowest",voids:st=!1}=nt,{match:ut}=nt;if(ut==null&&(ut=Path$2.isPath(rt)?matchPath$1(tt,rt):Ot=>Element$2.isElement(Ot)&&Editor$1.isBlock(tt,Ot)),!!rt){var ct=Editor$1.nodes(tt,{at:rt,match:ut,mode:ot,voids:st}),ft=Array.from(ct,Ot=>{var[,Rt]=Ot;return Editor$1.pathRef(tt,Rt)});for(var pt of ft){var ht=pt.unref();if(ht.length<2)throw new Error("Cannot lift node at a path [".concat(ht,"] because it has a depth of less than `2`."));var mt=Editor$1.node(tt,Path$2.parent(ht)),[yt,vt]=mt,Tt=ht[ht.length-1],{length:Et}=yt.children;if(Et===1){var xt=Path$2.next(vt);Transforms.moveNodes(tt,{at:ht,to:xt,voids:st}),Transforms.removeNodes(tt,{at:vt,voids:st})}else if(Tt===0)Transforms.moveNodes(tt,{at:ht,to:vt,voids:st});else if(Tt===Et-1){var At=Path$2.next(vt);Transforms.moveNodes(tt,{at:ht,to:At,voids:st})}else{var Ct=Path$2.next(ht),$t=Path$2.next(vt);Transforms.splitNodes(tt,{at:Ct,voids:st}),Transforms.moveNodes(tt,{at:ht,to:$t,voids:st})}}}})},_excluded$5=["text"],_excluded2$4=["children"],hasSingleChildNest=(et,tt)=>{if(Element$2.isElement(tt)){var nt=tt;return Editor$1.isVoid(et,tt)?!0:nt.children.length===1?hasSingleChildNest(et,nt.children[0]):!1}else return!Editor$1.isEditor(tt)},mergeNodes=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Editor$1.withoutNormalizing(tt,()=>{var{match:rt,at:ot=tt.selection}=nt,{hanging:st=!1,voids:ut=!1,mode:ct="lowest"}=nt;if(!!ot){if(rt==null)if(Path$2.isPath(ot)){var[ft]=Editor$1.parent(tt,ot);rt=zt=>ft.children.includes(zt)}else rt=zt=>Element$2.isElement(zt)&&Editor$1.isBlock(tt,zt);if(!st&&Range$1.isRange(ot)&&(ot=Editor$1.unhangRange(tt,ot,{voids:ut})),Range$1.isRange(ot))if(Range$1.isCollapsed(ot))ot=ot.anchor;else{var[,pt]=Range$1.edges(ot),ht=Editor$1.pointRef(tt,pt);Transforms.delete(tt,{at:ot}),ot=ht.unref(),nt.at==null&&Transforms.select(tt,ot)}var[mt]=Editor$1.nodes(tt,{at:ot,match:rt,voids:ut,mode:ct}),yt=Editor$1.previous(tt,{at:ot,match:rt,voids:ut,mode:ct});if(!(!mt||!yt)){var[vt,Tt]=mt,[Et,xt]=yt;if(!(Tt.length===0||xt.length===0)){var At=Path$2.next(xt),Ct=Path$2.common(Tt,xt),$t=Path$2.isSibling(Tt,xt),Ot=Array.from(Editor$1.levels(tt,{at:Tt}),zt=>{var[Vt]=zt;return Vt}).slice(Ct.length).slice(0,-1),Rt=Editor$1.above(tt,{at:Tt,mode:"highest",match:zt=>Ot.includes(zt)&&hasSingleChildNest(tt,zt)}),It=Rt&&Editor$1.pathRef(tt,Rt[1]),kt,Mt;if(Text$1.isText(vt)&&Text$1.isText(Et)){var Ft=_objectWithoutProperties$2(vt,_excluded$5);Mt=Et.text.length,kt=Ft}else if(Element$2.isElement(vt)&&Element$2.isElement(Et)){var Ft=_objectWithoutProperties$2(vt,_excluded2$4);Mt=Et.children.length,kt=Ft}else throw new Error("Cannot merge the node at path [".concat(Tt,"] with the previous sibling because it is not the same kind: ").concat(Scrubber.stringify(vt)," ").concat(Scrubber.stringify(Et)));$t||Transforms.moveNodes(tt,{at:Tt,to:At,voids:ut}),It&&Transforms.removeNodes(tt,{at:It.current,voids:ut}),Element$2.isElement(Et)&&Editor$1.isEmpty(tt,Et)||Text$1.isText(Et)&&Et.text===""&&xt[xt.length-1]!==0?Transforms.removeNodes(tt,{at:xt,voids:ut}):tt.apply({type:"merge_node",path:At,position:Mt,properties:kt}),It&&It.unref()}}}})},moveNodes=(et,tt)=>{Editor$1.withoutNormalizing(et,()=>{var{to:nt,at:rt=et.selection,mode:ot="lowest",voids:st=!1}=tt,{match:ut}=tt;if(!!rt){ut==null&&(ut=Path$2.isPath(rt)?matchPath$1(et,rt):vt=>Element$2.isElement(vt)&&Editor$1.isBlock(et,vt));var ct=Editor$1.pathRef(et,nt),ft=Editor$1.nodes(et,{at:rt,match:ut,mode:ot,voids:st}),pt=Array.from(ft,vt=>{var[,Tt]=vt;return Editor$1.pathRef(et,Tt)});for(var ht of pt){var mt=ht.unref(),yt=ct.current;mt.length!==0&&et.apply({type:"move_node",path:mt,newPath:yt}),ct.current&&Path$2.isSibling(yt,mt)&&Path$2.isAfter(yt,mt)&&(ct.current=Path$2.next(ct.current))}ct.unref()}})},removeNodes=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Editor$1.withoutNormalizing(tt,()=>{var{hanging:rt=!1,voids:ot=!1,mode:st="lowest"}=nt,{at:ut=tt.selection,match:ct}=nt;if(!!ut){ct==null&&(ct=Path$2.isPath(ut)?matchPath$1(tt,ut):vt=>Element$2.isElement(vt)&&Editor$1.isBlock(tt,vt)),!rt&&Range$1.isRange(ut)&&(ut=Editor$1.unhangRange(tt,ut,{voids:ot}));var ft=Editor$1.nodes(tt,{at:ut,match:ct,mode:st,voids:ot}),pt=Array.from(ft,vt=>{var[,Tt]=vt;return Editor$1.pathRef(tt,Tt)});for(var ht of pt){var mt=ht.unref();if(mt){var[yt]=Editor$1.node(tt,mt);tt.apply({type:"remove_node",path:mt,node:yt})}}}})},setNodes=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Editor$1.withoutNormalizing(tt,()=>{var{match:ot,at:st=tt.selection,compare:ut,merge:ct}=rt,{hanging:ft=!1,mode:pt="lowest",split:ht=!1,voids:mt=!1}=rt;if(!!st){if(ot==null&&(ot=Path$2.isPath(st)?matchPath$1(tt,st):Mt=>Element$2.isElement(Mt)&&Editor$1.isBlock(tt,Mt)),!ft&&Range$1.isRange(st)&&(st=Editor$1.unhangRange(tt,st,{voids:mt})),ht&&Range$1.isRange(st)){if(Range$1.isCollapsed(st)&&Editor$1.leaf(tt,st.anchor)[0].text.length>0)return;var yt=Editor$1.rangeRef(tt,st,{affinity:"inward"}),[vt,Tt]=Range$1.edges(st),Et=pt==="lowest"?"lowest":"highest",xt=Editor$1.isEnd(tt,Tt,Tt.path);Transforms.splitNodes(tt,{at:Tt,match:ot,mode:Et,voids:mt,always:!xt});var At=Editor$1.isStart(tt,vt,vt.path);Transforms.splitNodes(tt,{at:vt,match:ot,mode:Et,voids:mt,always:!At}),st=yt.unref(),rt.at==null&&Transforms.select(tt,st)}ut||(ut=(Mt,Ft)=>Mt!==Ft);for(var[Ct,$t]of Editor$1.nodes(tt,{at:st,match:ot,mode:pt,voids:mt})){var Ot={},Rt={};if($t.length!==0){var It=!1;for(var kt in nt)kt==="children"||kt==="text"||ut(nt[kt],Ct[kt])&&(It=!0,Ct.hasOwnProperty(kt)&&(Ot[kt]=Ct[kt]),ct?nt[kt]!=null&&(Rt[kt]=ct(Ct[kt],nt[kt])):nt[kt]!=null&&(Rt[kt]=nt[kt]));It&&tt.apply({type:"set_node",path:$t,properties:Ot,newProperties:Rt})}}}})},deleteRange=(et,tt)=>{if(Range$1.isCollapsed(tt))return tt.anchor;var[,nt]=Range$1.edges(tt),rt=Editor$1.pointRef(et,nt);return Transforms.delete(et,{at:tt}),rt.unref()},splitNodes=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Editor$1.withoutNormalizing(tt,()=>{var{mode:rt="lowest",voids:ot=!1}=nt,{match:st,at:ut=tt.selection,height:ct=0,always:ft=!1}=nt;if(st==null&&(st=Sn=>Element$2.isElement(Sn)&&Editor$1.isBlock(tt,Sn)),Range$1.isRange(ut)&&(ut=deleteRange(tt,ut)),Path$2.isPath(ut)){var pt=ut,ht=Editor$1.point(tt,pt),[mt]=Editor$1.parent(tt,pt);st=Sn=>Sn===mt,ct=ht.path.length-pt.length+1,ut=ht,ft=!0}if(!!ut){var yt=Editor$1.pointRef(tt,ut,{affinity:"backward"}),vt;try{var[Tt]=Editor$1.nodes(tt,{at:ut,match:st,mode:rt,voids:ot});if(!Tt)return;var Et=Editor$1.void(tt,{at:ut,mode:"highest"}),xt=0;if(!ot&&Et){var[At,Ct]=Et;if(Element$2.isElement(At)&&tt.isInline(At)){var $t=Editor$1.after(tt,Ct);if(!$t){var Ot={text:""},Rt=Path$2.next(Ct);Transforms.insertNodes(tt,Ot,{at:Rt,voids:ot}),$t=Editor$1.point(tt,Rt)}ut=$t,ft=!0}var It=ut.path.length-Ct.length;ct=It+1,ft=!0}vt=Editor$1.pointRef(tt,ut);var kt=ut.path.length-ct,[,Mt]=Tt,Ft=ut.path.slice(0,kt),zt=ct===0?ut.offset:ut.path[kt]+xt;for(var[Vt,Zt]of Editor$1.levels(tt,{at:Ft,reverse:!0,voids:ot})){var Ut=!1;if(Zt.length<Mt.length||Zt.length===0||!ot&&Element$2.isElement(Vt)&&Editor$1.isVoid(tt,Vt))break;var Xt=yt.current,Jt=Editor$1.isEnd(tt,Xt,Zt);if(ft||!yt||!Editor$1.isEdge(tt,Xt,Zt)){Ut=!0;var gn=Node$4.extractProps(Vt);tt.apply({type:"split_node",path:Zt,position:zt,properties:gn})}zt=Zt[Zt.length-1]+(Ut||Jt?1:0)}if(nt.at==null){var An=vt.current||Editor$1.end(tt,[]);Transforms.select(tt,An)}}finally{var sn;yt.unref(),(sn=vt)===null||sn===void 0||sn.unref()}}})},unsetNodes=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(nt)||(nt=[nt]);var ot={};for(var st of nt)ot[st]=null;Transforms.setNodes(tt,ot,rt)},unwrapNodes=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Editor$1.withoutNormalizing(tt,()=>{var{mode:rt="lowest",split:ot=!1,voids:st=!1}=nt,{at:ut=tt.selection,match:ct}=nt;if(!!ut){ct==null&&(ct=Path$2.isPath(ut)?matchPath$1(tt,ut):vt=>Element$2.isElement(vt)&&Editor$1.isBlock(tt,vt)),Path$2.isPath(ut)&&(ut=Editor$1.range(tt,ut));var ft=Range$1.isRange(ut)?Editor$1.rangeRef(tt,ut):null,pt=Editor$1.nodes(tt,{at:ut,match:ct,mode:rt,voids:st}),ht=Array.from(pt,vt=>{var[,Tt]=vt;return Editor$1.pathRef(tt,Tt)}).reverse(),mt=function(Tt){var Et=Tt.unref(),[xt]=Editor$1.node(tt,Et),At=Editor$1.range(tt,Et);ot&&ft&&(At=Range$1.intersection(ft.current,At)),Transforms.liftNodes(tt,{at:At,match:Ct=>Element$2.isAncestor(xt)&&xt.children.includes(Ct),voids:st})};for(var yt of ht)mt(yt);ft&&ft.unref()}})};function ownKeys$f(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$f(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$f(Object(nt),!0).forEach(function(rt){_defineProperty$a(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$f(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var wrapNodes=function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Editor$1.withoutNormalizing(tt,()=>{var{mode:ot="lowest",split:st=!1,voids:ut=!1}=rt,{match:ct,at:ft=tt.selection}=rt;if(!!ft){if(ct==null&&(Path$2.isPath(ft)?ct=matchPath$1(tt,ft):tt.isInline(nt)?ct=At=>Element$2.isElement(At)&&Editor$1.isInline(tt,At)||Text$1.isText(At):ct=At=>Element$2.isElement(At)&&Editor$1.isBlock(tt,At)),st&&Range$1.isRange(ft)){var[pt,ht]=Range$1.edges(ft),mt=Editor$1.rangeRef(tt,ft,{affinity:"inward"});Transforms.splitNodes(tt,{at:ht,match:ct,voids:ut}),Transforms.splitNodes(tt,{at:pt,match:ct,voids:ut}),ft=mt.unref(),rt.at==null&&Transforms.select(tt,ft)}var yt=Array.from(Editor$1.nodes(tt,{at:ft,match:tt.isInline(nt)?At=>Element$2.isElement(At)&&Editor$1.isBlock(tt,At):At=>Editor$1.isEditor(At),mode:"lowest",voids:ut}));for(var[,vt]of yt){var Tt=Range$1.isRange(ft)?Range$1.intersection(ft,Editor$1.range(tt,vt)):ft;if(!!Tt){var Et=Array.from(Editor$1.nodes(tt,{at:Tt,match:ct,mode:ot,voids:ut}));if(Et.length>0){var xt=function(){var[At]=Et,Ct=Et[Et.length-1],[,$t]=At,[,Ot]=Ct;if($t.length===0&&Ot.length===0)return"continue";var Rt=Path$2.equals($t,Ot)?Path$2.parent($t):Path$2.common($t,Ot),It=Editor$1.range(tt,$t,Ot),kt=Editor$1.node(tt,Rt),[Mt]=kt,Ft=Rt.length+1,zt=Path$2.next(Ot.slice(0,Ft)),Vt=_objectSpread$f(_objectSpread$f({},nt),{},{children:[]});Transforms.insertNodes(tt,Vt,{at:zt,voids:ut}),Transforms.moveNodes(tt,{at:It,match:Zt=>Element$2.isAncestor(Mt)&&Mt.children.includes(Zt),to:zt.concat(0),voids:ut})}();if(xt==="continue")continue}}}}})},createEditor=()=>{var et={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return apply$2(et,...rt)},addMark:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return addMark(et,...rt)},deleteBackward:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return deleteBackward(et,...rt)},deleteForward:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return deleteForward(et,...rt)},deleteFragment:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return deleteFragment(et,...rt)},getFragment:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return getFragment(et,...rt)},insertBreak:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return insertBreak(et,...rt)},insertSoftBreak:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return insertSoftBreak(et,...rt)},insertFragment:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return insertFragment(et,...rt)},insertNode:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return insertNode(et,...rt)},insertText:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return insertText(et,...rt)},normalizeNode:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return normalizeNode(et,...rt)},removeMark:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return removeMark(et,...rt)},getDirtyPaths:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return getDirtyPaths(et,...rt)},shouldNormalize:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return shouldNormalize(et,...rt)},above:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return above(et,...rt)},after:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return after(et,...rt)},before:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return before(et,...rt)},collapse:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return collapse(et,...rt)},delete:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return deleteText(et,...rt)},deselect:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return deselect(et,...rt)},edges:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return edges(et,...rt)},elementReadOnly:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return elementReadOnly(et,...rt)},end:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return end$1(et,...rt)},first:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return first(et,...rt)},fragment:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return fragment$1(et,...rt)},getMarks:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return marks(et,...rt)},hasBlocks:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return hasBlocks(et,...rt)},hasInlines:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return hasInlines(et,...rt)},hasPath:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return hasPath(et,...rt)},hasTexts:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return hasTexts(et,...rt)},insertNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return insertNodes(et,...rt)},isBlock:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return isBlock(et,...rt)},isEdge:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return isEdge(et,...rt)},isEmpty:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return isEmpty$2(et,...rt)},isEnd:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return isEnd(et,...rt)},isNormalizing:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return isNormalizing(et,...rt)},isStart:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return isStart(et,...rt)},last:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return last(et,...rt)},leaf:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return leaf(et,...rt)},levels:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return levels$1(et,...rt)},liftNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return liftNodes(et,...rt)},mergeNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return mergeNodes(et,...rt)},move:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return move$1(et,...rt)},moveNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return moveNodes(et,...rt)},next:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return next(et,...rt)},node:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return node(et,...rt)},nodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return nodes$1(et,...rt)},normalize:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return normalize$d(et,...rt)},parent:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return parent(et,...rt)},path:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return path$5(et,...rt)},pathRef:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return pathRef(et,...rt)},pathRefs:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return pathRefs(et,...rt)},point:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return point$d(et,...rt)},pointRef:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return pointRef(et,...rt)},pointRefs:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return pointRefs(et,...rt)},positions:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return positions$1(et,...rt)},previous:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return previous(et,...rt)},range:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return range$5(et,...rt)},rangeRef:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return rangeRef(et,...rt)},rangeRefs:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return rangeRefs(et,...rt)},removeNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return removeNodes(et,...rt)},select:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return select$1(et,...rt)},setNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return setNodes(et,...rt)},setNormalizing:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return setNormalizing(et,...rt)},setPoint:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return setPoint(et,...rt)},setSelection:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return setSelection(et,...rt)},splitNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return splitNodes(et,...rt)},start:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return start(et,...rt)},string:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return string$1(et,...rt)},unhangRange:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return unhangRange(et,...rt)},unsetNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return unsetNodes(et,...rt)},unwrapNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return unwrapNodes(et,...rt)},void:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return getVoid(et,...rt)},withoutNormalizing:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return withoutNormalizing(et,...rt)},wrapNodes:function(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return wrapNodes(et,...rt)}};return et},History={isHistory(et){return isPlainObject$4(et)&&Array.isArray(et.redos)&&Array.isArray(et.undos)&&(et.redos.length===0||Operation.isOperationList(et.redos[0].operations))&&(et.undos.length===0||Operation.isOperationList(et.undos[0].operations))}},SAVING=new WeakMap,MERGING=new WeakMap,HistoryEditor={isHistoryEditor(et){return History.isHistory(et.history)&&Editor$1.isEditor(et)},isMerging(et){return MERGING.get(et)},isSaving(et){return SAVING.get(et)},redo(et){et.redo()},undo(et){et.undo()},withoutMerging(et,tt){var nt=HistoryEditor.isMerging(et);MERGING.set(et,!1),tt(),MERGING.set(et,nt)},withoutSaving(et,tt){var nt=HistoryEditor.isSaving(et);SAVING.set(et,!1),tt(),SAVING.set(et,nt)}},withHistory=et=>{var tt=et,{apply:nt}=tt;return tt.history={undos:[],redos:[]},tt.redo=()=>{var{history:rt}=tt,{redos:ot}=rt;if(ot.length>0){var st=ot[ot.length-1];st.selectionBefore&&Transforms.setSelection(tt,st.selectionBefore),HistoryEditor.withoutSaving(tt,()=>{Editor$1.withoutNormalizing(tt,()=>{for(var ut of st.operations)tt.apply(ut)})}),rt.redos.pop(),tt.writeHistory("undos",st)}},tt.undo=()=>{var{history:rt}=tt,{undos:ot}=rt;if(ot.length>0){var st=ot[ot.length-1];HistoryEditor.withoutSaving(tt,()=>{Editor$1.withoutNormalizing(tt,()=>{var ut=st.operations.map(Operation.inverse).reverse();for(var ct of ut)tt.apply(ct);st.selectionBefore&&Transforms.setSelection(tt,st.selectionBefore)})}),tt.writeHistory("redos",st),rt.undos.pop()}},tt.apply=rt=>{var{operations:ot,history:st}=tt,{undos:ut}=st,ct=ut[ut.length-1],ft=ct&&ct.operations[ct.operations.length-1],pt=HistoryEditor.isSaving(tt),ht=HistoryEditor.isMerging(tt);if(pt==null&&(pt=shouldSave(rt)),pt){if(ht==null&&(ct==null?ht=!1:ot.length!==0?ht=!0:ht=shouldMerge(rt,ft)),ct&&ht)ct.operations.push(rt);else{var mt={operations:[rt],selectionBefore:tt.selection};tt.writeHistory("undos",mt)}for(;ut.length>100;)ut.shift();st.redos=[]}nt(rt)},tt.writeHistory=(rt,ot)=>{tt.history[rt].push(ot)},tt},shouldMerge=(et,tt)=>!!(tt&&et.type==="insert_text"&&tt.type==="insert_text"&&et.offset===tt.offset+tt.text.length&&Path$2.equals(et.path,tt.path)||tt&&et.type==="remove_text"&&tt.type==="remove_text"&&et.offset+et.text.length===tt.offset&&Path$2.equals(et.path,tt.path)),shouldSave=(et,tt)=>et.type!=="set_selection",direction_1=direction,RTL="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",LTR="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",rtl$1=new RegExp("^[^"+LTR+"]*["+RTL+"]"),ltr$1=new RegExp("^[^"+RTL+"]*["+LTR+"]");function direction(et){return et=String(et||""),rtl$1.test(et)?"rtl":ltr$1.test(et)?"ltr":"neutral"}var root$4=_root,now$4=function(){return root$4.Date.now()},now_1=now$4,isObject$2=isObject_1,now$3=now_1,toNumber$1=toNumber_1,FUNC_ERROR_TEXT$1="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce$5(et,tt,nt){var rt,ot,st,ut,ct,ft,pt=0,ht=!1,mt=!1,yt=!0;if(typeof et!="function")throw new TypeError(FUNC_ERROR_TEXT$1);tt=toNumber$1(tt)||0,isObject$2(nt)&&(ht=!!nt.leading,mt="maxWait"in nt,st=mt?nativeMax(toNumber$1(nt.maxWait)||0,tt):st,yt="trailing"in nt?!!nt.trailing:yt);function vt(It){var kt=rt,Mt=ot;return rt=ot=void 0,pt=It,ut=et.apply(Mt,kt),ut}function Tt(It){return pt=It,ct=setTimeout(At,tt),ht?vt(It):ut}function Et(It){var kt=It-ft,Mt=It-pt,Ft=tt-kt;return mt?nativeMin(Ft,st-Mt):Ft}function xt(It){var kt=It-ft,Mt=It-pt;return ft===void 0||kt>=tt||kt<0||mt&&Mt>=st}function At(){var It=now$3();if(xt(It))return Ct(It);ct=setTimeout(At,Et(It))}function Ct(It){return ct=void 0,yt&&rt?vt(It):(rt=ot=void 0,ut)}function $t(){ct!==void 0&&clearTimeout(ct),pt=0,rt=ft=ot=ct=void 0}function Ot(){return ct===void 0?ut:Ct(now$3())}function Rt(){var It=now$3(),kt=xt(It);if(rt=arguments,ot=this,ft=It,kt){if(ct===void 0)return Tt(ft);if(mt)return clearTimeout(ct),ct=setTimeout(At,tt),vt(ft)}return ct===void 0&&(ct=setTimeout(At,tt)),ut}return Rt.cancel=$t,Rt.flush=Ot,Rt}var debounce_1=debounce$5,debounce$4=debounce_1,isObject$1=isObject_1,FUNC_ERROR_TEXT="Expected a function";function throttle$2(et,tt,nt){var rt=!0,ot=!0;if(typeof et!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject$1(nt)&&(rt="leading"in nt?!!nt.leading:rt,ot="trailing"in nt?!!nt.trailing:ot),debounce$4(et,tt,{leading:rt,maxWait:tt,trailing:ot})}var throttle_1=throttle$2;function t$1(et){return typeof et=="object"&&et!=null&&et.nodeType===1}function e$2(et,tt){return(!tt||et!=="hidden")&&et!=="visible"&&et!=="clip"}function n$2(et,tt){if(et.clientHeight<et.scrollHeight||et.clientWidth<et.scrollWidth){var nt=getComputedStyle(et,null);return e$2(nt.overflowY,tt)||e$2(nt.overflowX,tt)||function(rt){var ot=function(st){if(!st.ownerDocument||!st.ownerDocument.defaultView)return null;try{return st.ownerDocument.defaultView.frameElement}catch{return null}}(rt);return!!ot&&(ot.clientHeight<rt.scrollHeight||ot.clientWidth<rt.scrollWidth)}(et)}return!1}function r$2(et,tt,nt,rt,ot,st,ut,ct){return st<et&&ut>tt||st>et&&ut<tt?0:st<=et&&ct<=nt||ut>=tt&&ct>=nt?st-et-rt:ut>tt&&ct<nt||st<et&&ct>nt?ut-tt+ot:0}var i=function(et,tt){var nt=window,rt=tt.scrollMode,ot=tt.block,st=tt.inline,ut=tt.boundary,ct=tt.skipOverflowHiddenElements,ft=typeof ut=="function"?ut:function(Er){return Er!==ut};if(!t$1(et))throw new TypeError("Invalid target");for(var pt,ht,mt=document.scrollingElement||document.documentElement,yt=[],vt=et;t$1(vt)&&ft(vt);){if((vt=(ht=(pt=vt).parentElement)==null?pt.getRootNode().host||null:ht)===mt){yt.push(vt);break}vt!=null&&vt===document.body&&n$2(vt)&&!n$2(document.documentElement)||vt!=null&&n$2(vt,ct)&&yt.push(vt)}for(var Tt=nt.visualViewport?nt.visualViewport.width:innerWidth,Et=nt.visualViewport?nt.visualViewport.height:innerHeight,xt=window.scrollX||pageXOffset,At=window.scrollY||pageYOffset,Ct=et.getBoundingClientRect(),$t=Ct.height,Ot=Ct.width,Rt=Ct.top,It=Ct.right,kt=Ct.bottom,Mt=Ct.left,Ft=ot==="start"||ot==="nearest"?Rt:ot==="end"?kt:Rt+$t/2,zt=st==="center"?Mt+Ot/2:st==="end"?It:Mt,Vt=[],Zt=0;Zt<yt.length;Zt++){var Ut=yt[Zt],Xt=Ut.getBoundingClientRect(),Jt=Xt.height,gn=Xt.width,An=Xt.top,sn=Xt.right,Sn=Xt.bottom,In=Xt.left;if(rt==="if-needed"&&Rt>=0&&Mt>=0&&kt<=Et&&It<=Tt&&Rt>=An&&kt<=Sn&&Mt>=In&&It<=sn)return Vt;var _n=getComputedStyle(Ut),En=parseInt(_n.borderLeftWidth,10),Ln=parseInt(_n.borderTopWidth,10),wn=parseInt(_n.borderRightWidth,10),Dn=parseInt(_n.borderBottomWidth,10),$n=0,Gn=0,Jn="offsetWidth"in Ut?Ut.offsetWidth-Ut.clientWidth-En-wn:0,zn="offsetHeight"in Ut?Ut.offsetHeight-Ut.clientHeight-Ln-Dn:0,Qn="offsetWidth"in Ut?Ut.offsetWidth===0?0:gn/Ut.offsetWidth:0,Bn="offsetHeight"in Ut?Ut.offsetHeight===0?0:Jt/Ut.offsetHeight:0;if(mt===Ut)$n=ot==="start"?Ft:ot==="end"?Ft-Et:ot==="nearest"?r$2(At,At+Et,Et,Ln,Dn,At+Ft,At+Ft+$t,$t):Ft-Et/2,Gn=st==="start"?zt:st==="center"?zt-Tt/2:st==="end"?zt-Tt:r$2(xt,xt+Tt,Tt,En,wn,xt+zt,xt+zt+Ot,Ot),$n=Math.max(0,$n+At),Gn=Math.max(0,Gn+xt);else{$n=ot==="start"?Ft-An-Ln:ot==="end"?Ft-Sn+Dn+zn:ot==="nearest"?r$2(An,Sn,Jt,Ln,Dn+zn,Ft,Ft+$t,$t):Ft-(An+Jt/2)+zn/2,Gn=st==="start"?zt-In-En:st==="center"?zt-(In+gn/2)+Jn/2:st==="end"?zt-sn+wn+Jn:r$2(In,sn,gn,En,wn+Jn,zt,zt+Ot,Ot);var jn=Ut.scrollLeft,Ar=Ut.scrollTop;Ft+=Ar-($n=Math.max(0,Math.min(Ar+$n/Bn,Ut.scrollHeight-Jt/Bn+zn))),zt+=jn-(Gn=Math.max(0,Math.min(jn+Gn/Qn,Ut.scrollWidth-gn/Qn+Jn)))}Vt.push({el:Ut,top:$n,left:Gn})}return Vt};function isOptionsObject(et){return et===Object(et)&&Object.keys(et).length!==0}function defaultBehavior(et,tt){tt===void 0&&(tt="auto");var nt="scrollBehavior"in document.body.style;et.forEach(function(rt){var ot=rt.el,st=rt.top,ut=rt.left;ot.scroll&&nt?ot.scroll({top:st,left:ut,behavior:tt}):(ot.scrollTop=st,ot.scrollLeft=ut)})}function getOptions(et){return et===!1?{block:"end",inline:"nearest"}:isOptionsObject(et)?et:{block:"start",inline:"nearest"}}function scrollIntoView$2(et,tt){var nt=et.isConnected||et.ownerDocument.documentElement.contains(et);if(isOptionsObject(tt)&&typeof tt.behavior=="function")return tt.behavior(nt?i(et,tt):[]);if(!!nt){var rt=getOptions(tt);return defaultBehavior(i(et,rt),rt.behavior)}}var resizeObservers=[],hasActiveObservations=function(){return resizeObservers.some(function(et){return et.activeTargets.length>0})},hasSkippedObservations=function(){return resizeObservers.some(function(et){return et.skippedTargets.length>0})},msg="ResizeObserver loop completed with undelivered notifications.",deliverResizeLoopError=function(){var et;typeof ErrorEvent=="function"?et=new ErrorEvent("error",{message:msg}):(et=document.createEvent("Event"),et.initEvent("error",!1,!1),et.message=msg),window.dispatchEvent(et)},ResizeObserverBoxOptions;(function(et){et.BORDER_BOX="border-box",et.CONTENT_BOX="content-box",et.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ResizeObserverBoxOptions||(ResizeObserverBoxOptions={}));var freeze=function(et){return Object.freeze(et)},ResizeObserverSize=function(){function et(tt,nt){this.inlineSize=tt,this.blockSize=nt,freeze(this)}return et}(),DOMRectReadOnly$1=function(){function et(tt,nt,rt,ot){return this.x=tt,this.y=nt,this.width=rt,this.height=ot,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,freeze(this)}return et.prototype.toJSON=function(){var tt=this,nt=tt.x,rt=tt.y,ot=tt.top,st=tt.right,ut=tt.bottom,ct=tt.left,ft=tt.width,pt=tt.height;return{x:nt,y:rt,top:ot,right:st,bottom:ut,left:ct,width:ft,height:pt}},et.fromRect=function(tt){return new et(tt.x,tt.y,tt.width,tt.height)},et}(),isSVG=function(et){return et instanceof SVGElement&&"getBBox"in et},isHidden=function(et){if(isSVG(et)){var tt=et.getBBox(),nt=tt.width,rt=tt.height;return!nt&&!rt}var ot=et,st=ot.offsetWidth,ut=ot.offsetHeight;return!(st||ut||et.getClientRects().length)},isElement$2=function(et){var tt;if(et instanceof Element)return!0;var nt=(tt=et?.ownerDocument)===null||tt===void 0?void 0:tt.defaultView;return!!(nt&&et instanceof nt.Element)},isReplacedElement=function(et){switch(et.tagName){case"INPUT":if(et.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},global$3=typeof window<"u"?window:{},cache$5=new WeakMap,scrollRegexp=/auto|scroll/,verticalRegexp=/^tb|vertical/,IE=/msie|trident/i.test(global$3.navigator&&global$3.navigator.userAgent),parseDimension=function(et){return parseFloat(et||"0")},size$2=function(et,tt,nt){return et===void 0&&(et=0),tt===void 0&&(tt=0),nt===void 0&&(nt=!1),new ResizeObserverSize((nt?tt:et)||0,(nt?et:tt)||0)},zeroBoxes=freeze({devicePixelContentBoxSize:size$2(),borderBoxSize:size$2(),contentBoxSize:size$2(),contentRect:new DOMRectReadOnly$1(0,0,0,0)}),calculateBoxSizes=function(et,tt){if(tt===void 0&&(tt=!1),cache$5.has(et)&&!tt)return cache$5.get(et);if(isHidden(et))return cache$5.set(et,zeroBoxes),zeroBoxes;var nt=getComputedStyle(et),rt=isSVG(et)&&et.ownerSVGElement&&et.getBBox(),ot=!IE&&nt.boxSizing==="border-box",st=verticalRegexp.test(nt.writingMode||""),ut=!rt&&scrollRegexp.test(nt.overflowY||""),ct=!rt&&scrollRegexp.test(nt.overflowX||""),ft=rt?0:parseDimension(nt.paddingTop),pt=rt?0:parseDimension(nt.paddingRight),ht=rt?0:parseDimension(nt.paddingBottom),mt=rt?0:parseDimension(nt.paddingLeft),yt=rt?0:parseDimension(nt.borderTopWidth),vt=rt?0:parseDimension(nt.borderRightWidth),Tt=rt?0:parseDimension(nt.borderBottomWidth),Et=rt?0:parseDimension(nt.borderLeftWidth),xt=mt+pt,At=ft+ht,Ct=Et+vt,$t=yt+Tt,Ot=ct?et.offsetHeight-$t-et.clientHeight:0,Rt=ut?et.offsetWidth-Ct-et.clientWidth:0,It=ot?xt+Ct:0,kt=ot?At+$t:0,Mt=rt?rt.width:parseDimension(nt.width)-It-Rt,Ft=rt?rt.height:parseDimension(nt.height)-kt-Ot,zt=Mt+xt+Rt+Ct,Vt=Ft+At+Ot+$t,Zt=freeze({devicePixelContentBoxSize:size$2(Math.round(Mt*devicePixelRatio),Math.round(Ft*devicePixelRatio),st),borderBoxSize:size$2(zt,Vt,st),contentBoxSize:size$2(Mt,Ft,st),contentRect:new DOMRectReadOnly$1(mt,ft,Mt,Ft)});return cache$5.set(et,Zt),Zt},calculateBoxSize=function(et,tt,nt){var rt=calculateBoxSizes(et,nt),ot=rt.borderBoxSize,st=rt.contentBoxSize,ut=rt.devicePixelContentBoxSize;switch(tt){case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:return ut;case ResizeObserverBoxOptions.BORDER_BOX:return ot;default:return st}},ResizeObserverEntry$1=function(){function et(tt){var nt=calculateBoxSizes(tt);this.target=tt,this.contentRect=nt.contentRect,this.borderBoxSize=freeze([nt.borderBoxSize]),this.contentBoxSize=freeze([nt.contentBoxSize]),this.devicePixelContentBoxSize=freeze([nt.devicePixelContentBoxSize])}return et}(),calculateDepthForNode=function(et){if(isHidden(et))return 1/0;for(var tt=0,nt=et.parentNode;nt;)tt+=1,nt=nt.parentNode;return tt},broadcastActiveObservations=function(){var et=1/0,tt=[];resizeObservers.forEach(function(ut){if(ut.activeTargets.length!==0){var ct=[];ut.activeTargets.forEach(function(pt){var ht=new ResizeObserverEntry$1(pt.target),mt=calculateDepthForNode(pt.target);ct.push(ht),pt.lastReportedSize=calculateBoxSize(pt.target,pt.observedBox),mt<et&&(et=mt)}),tt.push(function(){ut.callback.call(ut.observer,ct,ut.observer)}),ut.activeTargets.splice(0,ut.activeTargets.length)}});for(var nt=0,rt=tt;nt<rt.length;nt++){var ot=rt[nt];ot()}return et},gatherActiveObservationsAtDepth=function(et){resizeObservers.forEach(function(nt){nt.activeTargets.splice(0,nt.activeTargets.length),nt.skippedTargets.splice(0,nt.skippedTargets.length),nt.observationTargets.forEach(function(ot){ot.isActive()&&(calculateDepthForNode(ot.target)>et?nt.activeTargets.push(ot):nt.skippedTargets.push(ot))})})},process$1=function(){var et=0;for(gatherActiveObservationsAtDepth(et);hasActiveObservations();)et=broadcastActiveObservations(),gatherActiveObservationsAtDepth(et);return hasSkippedObservations()&&deliverResizeLoopError(),et>0},trigger,callbacks=[],notify=function(){return callbacks.splice(0).forEach(function(et){return et()})},queueMicroTask=function(et){if(!trigger){var tt=0,nt=document.createTextNode(""),rt={characterData:!0};new MutationObserver(function(){return notify()}).observe(nt,rt),trigger=function(){nt.textContent="".concat(tt?tt--:tt++)}}callbacks.push(et),trigger()},queueResizeObserver=function(et){queueMicroTask(function(){requestAnimationFrame(et)})},watching=0,isWatching=function(){return!!watching},CATCH_PERIOD=250,observerConfig={attributes:!0,characterData:!0,childList:!0,subtree:!0},events$3=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],time$2=function(et){return et===void 0&&(et=0),Date.now()+et},scheduled=!1,Scheduler=function(){function et(){var tt=this;this.stopped=!0,this.listener=function(){return tt.schedule()}}return et.prototype.run=function(tt){var nt=this;if(tt===void 0&&(tt=CATCH_PERIOD),!scheduled){scheduled=!0;var rt=time$2(tt);queueResizeObserver(function(){var ot=!1;try{ot=process$1()}finally{if(scheduled=!1,tt=rt-time$2(),!isWatching())return;ot?nt.run(1e3):tt>0?nt.run(tt):nt.start()}})}},et.prototype.schedule=function(){this.stop(),this.run()},et.prototype.observe=function(){var tt=this,nt=function(){return tt.observer&&tt.observer.observe(document.body,observerConfig)};document.body?nt():global$3.addEventListener("DOMContentLoaded",nt)},et.prototype.start=function(){var tt=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),events$3.forEach(function(nt){return global$3.addEventListener(nt,tt.listener,!0)}))},et.prototype.stop=function(){var tt=this;this.stopped||(this.observer&&this.observer.disconnect(),events$3.forEach(function(nt){return global$3.removeEventListener(nt,tt.listener,!0)}),this.stopped=!0)},et}(),scheduler=new Scheduler,updateCount=function(et){!watching&&et>0&&scheduler.start(),watching+=et,!watching&&scheduler.stop()},skipNotifyOnElement=function(et){return!isSVG(et)&&!isReplacedElement(et)&&getComputedStyle(et).display==="inline"},ResizeObservation$1=function(){function et(tt,nt){this.target=tt,this.observedBox=nt||ResizeObserverBoxOptions.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return et.prototype.isActive=function(){var tt=calculateBoxSize(this.target,this.observedBox,!0);return skipNotifyOnElement(this.target)&&(this.lastReportedSize=tt),this.lastReportedSize.inlineSize!==tt.inlineSize||this.lastReportedSize.blockSize!==tt.blockSize},et}(),ResizeObserverDetail=function(){function et(tt,nt){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=tt,this.callback=nt}return et}(),observerMap=new WeakMap,getObservationIndex=function(et,tt){for(var nt=0;nt<et.length;nt+=1)if(et[nt].target===tt)return nt;return-1},ResizeObserverController$1=function(){function et(){}return et.connect=function(tt,nt){var rt=new ResizeObserverDetail(tt,nt);observerMap.set(tt,rt)},et.observe=function(tt,nt,rt){var ot=observerMap.get(tt),st=ot.observationTargets.length===0;getObservationIndex(ot.observationTargets,nt)<0&&(st&&resizeObservers.push(ot),ot.observationTargets.push(new ResizeObservation$1(nt,rt&&rt.box)),updateCount(1),scheduler.schedule())},et.unobserve=function(tt,nt){var rt=observerMap.get(tt),ot=getObservationIndex(rt.observationTargets,nt),st=rt.observationTargets.length===1;ot>=0&&(st&&resizeObservers.splice(resizeObservers.indexOf(rt),1),rt.observationTargets.splice(ot,1),updateCount(-1))},et.disconnect=function(tt){var nt=this,rt=observerMap.get(tt);rt.observationTargets.slice().forEach(function(ot){return nt.unobserve(tt,ot.target)}),rt.activeTargets.splice(0,rt.activeTargets.length)},et}(),ResizeObserver$2=function(){function et(tt){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof tt!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ResizeObserverController$1.connect(this,tt)}return et.prototype.observe=function(tt,nt){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$2(tt))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController$1.observe(this,tt,nt)},et.prototype.unobserve=function(tt){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$2(tt))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController$1.unobserve(this,tt)},et.prototype.disconnect=function(){ResizeObserverController$1.disconnect(this)},et.toString=function(){return"function ResizeObserver () { [polyfill code] }"},et}(),lib$2={};Object.defineProperty(lib$2,"__esModule",{value:!0});var IS_MAC=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),MODIFIERS={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},ALIASES={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:IS_MAC?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},CODES={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};for(var f$1=1;f$1<20;f$1++)CODES["f"+f$1]=111+f$1;function isHotkey(et,tt,nt){tt&&!("byKey"in tt)&&(nt=tt,tt=null),Array.isArray(et)||(et=[et]);var rt=et.map(function(ut){return parseHotkey(ut,tt)}),ot=function(ct){return rt.some(function(ft){return compareHotkey(ft,ct)})},st=nt==null?ot:ot(nt);return st}function isCodeHotkey(et,tt){return isHotkey(et,tt)}function isKeyHotkey(et,tt){return isHotkey(et,{byKey:!0},tt)}function parseHotkey(et,tt){var nt=tt&&tt.byKey,rt={};et=et.replace("++","+add");var ot=et.split("+"),st=ot.length;for(var ut in MODIFIERS)rt[MODIFIERS[ut]]=!1;var ct=!0,ft=!1,pt=void 0;try{for(var ht=ot[Symbol.iterator](),mt;!(ct=(mt=ht.next()).done);ct=!0){var yt=mt.value,vt=yt.endsWith("?")&&yt.length>1;vt&&(yt=yt.slice(0,-1));var Tt=toKeyName(yt),Et=MODIFIERS[Tt];(st===1||!Et)&&(nt?rt.key=Tt:rt.which=toKeyCode(yt)),Et&&(rt[Et]=vt?null:!0)}}catch(xt){ft=!0,pt=xt}finally{try{!ct&&ht.return&&ht.return()}finally{if(ft)throw pt}}return rt}function compareHotkey(et,tt){for(var nt in et){var rt=et[nt],ot=void 0;if(rt!=null&&(nt==="key"&&tt.key!=null?ot=tt.key.toLowerCase():nt==="which"?ot=rt===91&&tt.which===93?91:tt.which:ot=tt[nt],!(ot==null&&rt===!1)&&ot!==rt))return!1}return!0}function toKeyCode(et){et=toKeyName(et);var tt=CODES[et]||et.toUpperCase().charCodeAt(0);return tt}function toKeyName(et){return et=et.toLowerCase(),et=ALIASES[et]||et,et}lib$2.default=isHotkey;lib$2.isHotkey=isHotkey;lib$2.isCodeHotkey=isCodeHotkey;var isKeyHotkey_1=lib$2.isKeyHotkey=isKeyHotkey;lib$2.parseHotkey=parseHotkey;lib$2.compareHotkey=compareHotkey;lib$2.toKeyCode=toKeyCode;lib$2.toKeyName=toKeyName;function _defineProperty$9(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function _objectWithoutPropertiesLoose$5(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}function _objectWithoutProperties$1(et,tt){if(et==null)return{};var nt=_objectWithoutPropertiesLoose$5(et,tt),rt,ot;if(Object.getOwnPropertySymbols){var st=Object.getOwnPropertySymbols(et);for(ot=0;ot<st.length;ot++)rt=st[ot],!(tt.indexOf(rt)>=0)&&(!Object.prototype.propertyIsEnumerable.call(et,rt)||(nt[rt]=et[rt]))}return nt}var EditorContext=react.exports.createContext(null),useSlateStatic=()=>{var et=react.exports.useContext(EditorContext);if(!et)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return et},REACT_MAJOR_VERSION=parseInt(Wt.version.split(".")[0],10),IS_IOS=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,IS_APPLE=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),IS_ANDROID=typeof navigator<"u"&&/Android/.test(navigator.userAgent),IS_FIREFOX=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),IS_WEBKIT=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),IS_EDGE_LEGACY=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),IS_CHROME=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),IS_CHROME_LEGACY=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),IS_ANDROID_CHROME_LEGACY=IS_ANDROID&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),IS_FIREFOX_LEGACY=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),IS_UC_MOBILE=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),IS_WECHATBROWSER=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent),CAN_USE_DOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",HAS_BEFORE_INPUT_SUPPORT=(!IS_CHROME_LEGACY||!IS_ANDROID_CHROME_LEGACY)&&!IS_EDGE_LEGACY&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",NODE_TO_INDEX=new WeakMap,NODE_TO_PARENT=new WeakMap,EDITOR_TO_WINDOW=new WeakMap,EDITOR_TO_ELEMENT=new WeakMap,EDITOR_TO_PLACEHOLDER_ELEMENT=new WeakMap,ELEMENT_TO_NODE=new WeakMap,NODE_TO_ELEMENT=new WeakMap,NODE_TO_KEY=new WeakMap,EDITOR_TO_KEY_TO_ELEMENT=new WeakMap,IS_READ_ONLY=new WeakMap,IS_FOCUSED=new WeakMap,IS_COMPOSING=new WeakMap,EDITOR_TO_USER_SELECTION=new WeakMap,EDITOR_TO_ON_CHANGE=new WeakMap,EDITOR_TO_SCHEDULE_FLUSH=new WeakMap,EDITOR_TO_PENDING_INSERTION_MARKS=new WeakMap,EDITOR_TO_USER_MARKS=new WeakMap,EDITOR_TO_PENDING_DIFFS=new WeakMap,EDITOR_TO_PENDING_ACTION=new WeakMap,EDITOR_TO_PENDING_SELECTION=new WeakMap,EDITOR_TO_FORCE_RENDER=new WeakMap,PLACEHOLDER_SYMBOL=Symbol("placeholder"),MARK_PLACEHOLDER_SYMBOL=Symbol("mark-placeholder"),DOMText=globalThis.Text,getDefaultView=et=>et&&et.ownerDocument&&et.ownerDocument.defaultView||null,isDOMComment=et=>isDOMNode(et)&&et.nodeType===8,isDOMElement=et=>isDOMNode(et)&&et.nodeType===1,isDOMNode=et=>{var tt=getDefaultView(et);return!!tt&&et instanceof tt.Node},isDOMSelection=et=>{var tt=et&&et.anchorNode&&getDefaultView(et.anchorNode);return!!tt&&et instanceof tt.Selection},isDOMText=et=>isDOMNode(et)&&et.nodeType===3,isPlainTextOnlyPaste=et=>et.clipboardData&&et.clipboardData.getData("text/plain")!==""&&et.clipboardData.types.length===1,normalizeDOMPoint=et=>{var[tt,nt]=et;if(isDOMElement(tt)&&tt.childNodes.length){var rt=nt===tt.childNodes.length,ot=rt?nt-1:nt;for([tt,ot]=getEditableChildAndIndex(tt,ot,rt?"backward":"forward"),rt=ot<nt;isDOMElement(tt)&&tt.childNodes.length;){var st=rt?tt.childNodes.length-1:0;tt=getEditableChild(tt,st,rt?"backward":"forward")}nt=rt&&tt.textContent!=null?tt.textContent.length:0}return[tt,nt]},hasShadowRoot=et=>{for(var tt=et&&et.parentNode;tt;){if(tt.toString()==="[object ShadowRoot]")return!0;tt=tt.parentNode}return!1},getEditableChildAndIndex=(et,tt,nt)=>{for(var{childNodes:rt}=et,ot=rt[tt],st=tt,ut=!1,ct=!1;(isDOMComment(ot)||isDOMElement(ot)&&ot.childNodes.length===0||isDOMElement(ot)&&ot.getAttribute("contenteditable")==="false")&&!(ut&&ct);){if(st>=rt.length){ut=!0,st=tt-1,nt="backward";continue}if(st<0){ct=!0,st=tt+1,nt="forward";continue}ot=rt[st],tt=st,st+=nt==="forward"?1:-1}return[ot,tt]},getEditableChild=(et,tt,nt)=>{var[rt]=getEditableChildAndIndex(et,tt,nt);return rt},getPlainText=et=>{var tt="";if(isDOMText(et)&&et.nodeValue)return et.nodeValue;if(isDOMElement(et)){for(var nt of Array.from(et.childNodes))tt+=getPlainText(nt);var rt=getComputedStyle(et).getPropertyValue("display");(rt==="block"||rt==="list"||et.tagName==="BR")&&(tt+=`
`)}return tt},catchSlateFragment=/data-slate-fragment="(.+?)"/m,getSlateFragmentAttribute=et=>{var tt=et.getData("text/html"),[,nt]=tt.match(catchSlateFragment)||[];return nt},isTrackedMutation=(et,tt,nt)=>{var{target:rt}=tt;if(isDOMElement(rt)&&rt.matches('[contentEditable="false"]'))return!1;var{document:ot}=ReactEditor.getWindow(et);if(ot.contains(rt))return ReactEditor.hasDOMNode(et,rt,{editable:!0});var st=nt.find(ut=>{var{addedNodes:ct,removedNodes:ft}=ut;for(var pt of ct)if(pt===rt||pt.contains(rt))return!0;for(var ht of ft)if(ht===rt||ht.contains(rt))return!0});return!st||st===tt?!1:isTrackedMutation(et,st,nt)},n$1=0;class Key$4{constructor(){this.id="".concat(n$1++)}}var ReactEditor={androidPendingDiffs:et=>EDITOR_TO_PENDING_DIFFS.get(et),androidScheduleFlush:et=>{var tt;(tt=EDITOR_TO_SCHEDULE_FLUSH.get(et))===null||tt===void 0||tt()},blur:et=>{var tt=ReactEditor.toDOMNode(et,et),nt=ReactEditor.findDocumentOrShadowRoot(et);IS_FOCUSED.set(et,!1),nt.activeElement===tt&&tt.blur()},deselect:et=>{var{selection:tt}=et,nt=ReactEditor.findDocumentOrShadowRoot(et),rt=nt.getSelection();rt&&rt.rangeCount>0&&rt.removeAllRanges(),tt&&Transforms.deselect(et)},findDocumentOrShadowRoot:et=>{var tt=ReactEditor.toDOMNode(et,et),nt=tt.getRootNode();return(nt instanceof Document||nt instanceof ShadowRoot)&&nt.getSelection!=null?nt:tt.ownerDocument},findEventRange:(et,tt)=>{"nativeEvent"in tt&&(tt=tt.nativeEvent);var{clientX:nt,clientY:rt,target:ot}=tt;if(nt==null||rt==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(tt));var st=ReactEditor.toSlateNode(et,tt.target),ut=ReactEditor.findPath(et,st);if(Element$2.isElement(st)&&Editor$1.isVoid(et,st)){var ct=ot.getBoundingClientRect(),ft=et.isInline(st)?nt-ct.left<ct.left+ct.width-nt:rt-ct.top<ct.top+ct.height-rt,pt=Editor$1.point(et,ut,{edge:ft?"start":"end"}),ht=ft?Editor$1.before(et,pt):Editor$1.after(et,pt);if(ht){var mt=Editor$1.range(et,ht);return mt}}var yt,{document:vt}=ReactEditor.getWindow(et);if(vt.caretRangeFromPoint)yt=vt.caretRangeFromPoint(nt,rt);else{var Tt=vt.caretPositionFromPoint(nt,rt);Tt&&(yt=vt.createRange(),yt.setStart(Tt.offsetNode,Tt.offset),yt.setEnd(Tt.offsetNode,Tt.offset))}if(!yt)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(tt));var Et=ReactEditor.toSlateRange(et,yt,{exactMatch:!1,suppressThrow:!1});return Et},findKey:(et,tt)=>{var nt=NODE_TO_KEY.get(tt);return nt||(nt=new Key$4,NODE_TO_KEY.set(tt,nt)),nt},findPath:(et,tt)=>{for(var nt=[],rt=tt;;){var ot=NODE_TO_PARENT.get(rt);if(ot==null){if(Editor$1.isEditor(rt))return nt;break}var st=NODE_TO_INDEX.get(rt);if(st==null)break;nt.unshift(st),rt=ot}throw new Error("Unable to find the path for Slate node: ".concat(Scrubber.stringify(tt)))},focus:et=>{var tt=ReactEditor.toDOMNode(et,et),nt=ReactEditor.findDocumentOrShadowRoot(et);IS_FOCUSED.set(et,!0),nt.activeElement!==tt&&tt.focus({preventScroll:!0})},getWindow:et=>{var tt=EDITOR_TO_WINDOW.get(et);if(!tt)throw new Error("Unable to find a host window element for this editor");return tt},hasDOMNode:function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:ot=!1}=rt,st=ReactEditor.toDOMNode(tt,tt),ut;try{ut=isDOMElement(nt)?nt:nt.parentElement}catch(ct){if(!ct.message.includes('Permission denied to access property "nodeType"'))throw ct}return ut?ut.closest("[data-slate-editor]")===st&&(!ot||ut.isContentEditable?!0:typeof ut.isContentEditable=="boolean"&&ut.closest('[contenteditable="false"]')===st||!!ut.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(et,tt)=>isDOMNode(tt)&&ReactEditor.hasDOMNode(et,tt,{editable:!0}),hasRange:(et,tt)=>{var{anchor:nt,focus:rt}=tt;return Editor$1.hasPath(et,nt.path)&&Editor$1.hasPath(et,rt.path)},hasSelectableTarget:(et,tt)=>ReactEditor.hasEditableTarget(et,tt)||ReactEditor.isTargetInsideNonReadonlyVoid(et,tt),hasTarget:(et,tt)=>isDOMNode(tt)&&ReactEditor.hasDOMNode(et,tt),insertData:(et,tt)=>{et.insertData(tt)},insertFragmentData:(et,tt)=>et.insertFragmentData(tt),insertTextData:(et,tt)=>et.insertTextData(tt),isComposing:et=>!!IS_COMPOSING.get(et),isFocused:et=>!!IS_FOCUSED.get(et),isReadOnly:et=>!!IS_READ_ONLY.get(et),isTargetInsideNonReadonlyVoid:(et,tt)=>{if(IS_READ_ONLY.get(et))return!1;var nt=ReactEditor.hasTarget(et,tt)&&ReactEditor.toSlateNode(et,tt);return Element$2.isElement(nt)&&Editor$1.isVoid(et,nt)},setFragmentData:(et,tt,nt)=>et.setFragmentData(tt,nt),toDOMNode:(et,tt)=>{var nt=EDITOR_TO_KEY_TO_ELEMENT.get(et),rt=Editor$1.isEditor(tt)?EDITOR_TO_ELEMENT.get(et):nt?.get(ReactEditor.findKey(et,tt));if(!rt)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Scrubber.stringify(tt)));return rt},toDOMPoint:(et,tt)=>{var[nt]=Editor$1.node(et,tt.path),rt=ReactEditor.toDOMNode(et,nt),ot;Editor$1.void(et,{at:tt})&&(tt={path:tt.path,offset:0});for(var st="[data-slate-string], [data-slate-zero-width]",ut=Array.from(rt.querySelectorAll(st)),ct=0,ft=0;ft<ut.length;ft++){var pt=ut[ft],ht=pt.childNodes[0];if(!(ht==null||ht.textContent==null)){var{length:mt}=ht.textContent,yt=pt.getAttribute("data-slate-length"),vt=yt==null?mt:parseInt(yt,10),Tt=ct+vt,Et=ut[ft+1];if(tt.offset===Tt&&Et!==null&&Et!==void 0&&Et.hasAttribute("data-slate-mark-placeholder")){var xt,At=Et.childNodes[0];ot=[At instanceof DOMText?At:Et,(xt=Et.textContent)!==null&&xt!==void 0&&xt.startsWith("\uFEFF")?1:0];break}if(tt.offset<=Tt){var Ct=Math.min(mt,Math.max(0,tt.offset-ct));ot=[ht,Ct];break}ct=Tt}}if(!ot)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Scrubber.stringify(tt)));return ot},toDOMRange:(et,tt)=>{var{anchor:nt,focus:rt}=tt,ot=Range$1.isBackward(tt),st=ReactEditor.toDOMPoint(et,nt),ut=Range$1.isCollapsed(tt)?st:ReactEditor.toDOMPoint(et,rt),ct=ReactEditor.getWindow(et),ft=ct.document.createRange(),[pt,ht]=ot?ut:st,[mt,yt]=ot?st:ut,vt=isDOMElement(pt)?pt:pt.parentElement,Tt=!!vt.getAttribute("data-slate-zero-width"),Et=isDOMElement(mt)?mt:mt.parentElement,xt=!!Et.getAttribute("data-slate-zero-width");return ft.setStart(pt,Tt?1:ht),ft.setEnd(mt,xt?1:yt),ft},toSlateNode:(et,tt)=>{var nt=isDOMElement(tt)?tt:tt.parentElement;nt&&!nt.hasAttribute("data-slate-node")&&(nt=nt.closest("[data-slate-node]"));var rt=nt?ELEMENT_TO_NODE.get(nt):null;if(!rt)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(nt));return rt},toSlatePoint:(et,tt,nt)=>{var{exactMatch:rt,suppressThrow:ot}=nt,[st,ut]=rt?tt:normalizeDOMPoint(tt),ct=st.parentNode,ft=null,pt=0;if(ct){var ht,mt,yt=ReactEditor.toDOMNode(et,et),vt=ct.closest('[data-slate-void="true"]'),Tt=vt&&yt.contains(vt)?vt:null,Et=ct.closest("[data-slate-leaf]"),xt=null;if(Et){if(ft=Et.closest('[data-slate-node="text"]'),ft){var At=ReactEditor.getWindow(et),Ct=At.document.createRange();Ct.setStart(ft,0),Ct.setEnd(st,ut);var $t=Ct.cloneContents(),Ot=[...Array.prototype.slice.call($t.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call($t.querySelectorAll("[contenteditable=false]"))];Ot.forEach(Xt=>{if(IS_ANDROID&&!rt&&Xt.hasAttribute("data-slate-zero-width")&&Xt.textContent.length>0&&Xt.textContext!=="\uFEFF"){Xt.textContent.startsWith("\uFEFF")&&(Xt.textContent=Xt.textContent.slice(1));return}Xt.parentNode.removeChild(Xt)}),pt=$t.textContent.length,xt=ft}}else if(Tt){for(var Rt=Tt.querySelectorAll("[data-slate-leaf]"),It=0;It<Rt.length;It++){var kt=Rt[It];if(ReactEditor.hasDOMNode(et,kt)){Et=kt;break}}Et?(ft=Et.closest('[data-slate-node="text"]'),xt=Et,pt=xt.textContent.length,xt.querySelectorAll("[data-slate-zero-width]").forEach(Xt=>{pt-=Xt.textContent.length})):pt=1}xt&&pt===xt.textContent.length&&IS_ANDROID&&xt.getAttribute("data-slate-zero-width")==="z"&&(ht=xt.textContent)!==null&&ht!==void 0&&ht.startsWith("\uFEFF")&&(ct.hasAttribute("data-slate-zero-width")||IS_FIREFOX&&(mt=xt.textContent)!==null&&mt!==void 0&&mt.endsWith(`

`))&&pt--}if(IS_ANDROID&&!ft&&!rt){var Mt=ct.hasAttribute("data-slate-node")?ct:ct.closest("[data-slate-node]");if(Mt&&ReactEditor.hasDOMNode(et,Mt,{editable:!0})){var Ft=ReactEditor.toSlateNode(et,Mt),{path:zt,offset:Vt}=Editor$1.start(et,ReactEditor.findPath(et,Ft));return Mt.querySelector("[data-slate-leaf]")||(Vt=ut),{path:zt,offset:Vt}}}if(!ft){if(ot)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(tt))}var Zt=ReactEditor.toSlateNode(et,ft),Ut=ReactEditor.findPath(et,Zt);return{path:Ut,offset:pt}},toSlateRange:(et,tt,nt)=>{var{exactMatch:rt,suppressThrow:ot}=nt,st=isDOMSelection(tt)?tt.anchorNode:tt.startContainer,ut,ct,ft,pt,ht;if(st&&(isDOMSelection(tt)?(ut=tt.anchorNode,ct=tt.anchorOffset,ft=tt.focusNode,pt=tt.focusOffset,IS_CHROME&&hasShadowRoot(ut)?ht=tt.anchorNode===tt.focusNode&&tt.anchorOffset===tt.focusOffset:ht=tt.isCollapsed):(ut=tt.startContainer,ct=tt.startOffset,ft=tt.endContainer,pt=tt.endOffset,ht=tt.collapsed)),ut==null||ft==null||ct==null||pt==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(tt));if("getAttribute"in ft&&ft.getAttribute("contenteditable")==="false"&&ft.getAttribute("data-slate-void")!=="true"){var mt;ft=ut,pt=((mt=ut.textContent)===null||mt===void 0?void 0:mt.length)||0}var yt=ReactEditor.toSlatePoint(et,[ut,ct],{exactMatch:rt,suppressThrow:ot});if(!yt)return null;var vt=ht?yt:ReactEditor.toSlatePoint(et,[ft,pt],{exactMatch:rt,suppressThrow:ot});if(!vt)return null;if(IS_FIREFOX&&!ht&&ut!==ft){var Tt=Editor$1.isEnd(et,yt,yt.path),Et=Editor$1.isStart(et,vt,vt.path);if(Tt){var xt=Editor$1.after(et,yt);yt=xt||yt}if(Et){var At=Editor$1.before(et,vt);vt=At||vt}}var Ct={anchor:yt,focus:vt};return Range$1.isExpanded(Ct)&&Range$1.isForward(Ct)&&isDOMElement(ft)&&Editor$1.void(et,{at:Ct.focus,mode:"highest"})&&(Ct=Editor$1.unhangRange(et,Ct,{voids:!0})),Ct}};function verifyDiffState(et,tt){var{path:nt,diff:rt}=tt;if(!Editor$1.hasPath(et,nt))return!1;var ot=Node$4.get(et,nt);if(!Text$1.isText(ot))return!1;if(rt.start!==ot.text.length||rt.text.length===0)return ot.text.slice(rt.start,rt.start+rt.text.length)===rt.text;var st=Path$2.next(nt);if(!Editor$1.hasPath(et,st))return!1;var ut=Node$4.get(et,st);return Text$1.isText(ut)&&ut.text.startsWith(rt.text)}function applyStringDiff(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];return nt.reduce((ot,st)=>ot.slice(0,st.start)+st.text+ot.slice(st.end),et)}function longestCommonPrefixLength(et,tt){for(var nt=Math.min(et.length,tt.length),rt=0;rt<nt;rt++)if(et.charAt(rt)!==tt.charAt(rt))return rt;return nt}function longestCommonSuffixLength(et,tt,nt){for(var rt=Math.min(et.length,tt.length,nt),ot=0;ot<rt;ot++)if(et.charAt(et.length-ot-1)!==tt.charAt(tt.length-ot-1))return ot;return rt}function normalizeStringDiff(et,tt){var{start:nt,end:rt,text:ot}=tt,st=et.slice(nt,rt),ut=longestCommonPrefixLength(st,ot),ct=Math.min(st.length-ut,ot.length-ut),ft=longestCommonSuffixLength(st,ot,ct),pt={start:nt+ut,end:rt-ft,text:ot.slice(ut,ot.length-ft)};return pt.start===pt.end&&pt.text.length===0?null:pt}function mergeStringDiffs(et,tt,nt){var rt=Math.min(tt.start,nt.start),ot=Math.max(0,Math.min(tt.start+tt.text.length,nt.end)-nt.start),st=applyStringDiff(et,tt,nt),ut=Math.max(nt.start+nt.text.length,tt.start+tt.text.length+(tt.start+tt.text.length>nt.start?nt.text.length:0)-ot),ct=st.slice(rt,ut),ft=Math.max(tt.end,nt.end-tt.text.length+(tt.end-tt.start));return normalizeStringDiff(et,{start:rt,end:ft,text:ct})}function targetRange(et){var{path:tt,diff:nt}=et;return{anchor:{path:tt,offset:nt.start},focus:{path:tt,offset:nt.end}}}function normalizePoint(et,tt){var{path:nt,offset:rt}=tt;if(!Editor$1.hasPath(et,nt))return null;var ot=Node$4.get(et,nt);if(!Text$1.isText(ot))return null;var st=Editor$1.above(et,{match:ct=>Element$2.isElement(ct)&&Editor$1.isBlock(et,ct),at:nt});if(!st)return null;for(;rt>ot.text.length;){var ut=Editor$1.next(et,{at:nt,match:Text$1.isText});if(!ut||!Path$2.isDescendant(ut[1],st[1]))return null;rt-=ot.text.length,ot=ut[0],nt=ut[1]}return{path:nt,offset:rt}}function normalizeRange(et,tt){var nt=normalizePoint(et,tt.anchor);if(!nt)return null;if(Range$1.isCollapsed(tt))return{anchor:nt,focus:nt};var rt=normalizePoint(et,tt.focus);return rt?{anchor:nt,focus:rt}:null}function transformPendingPoint(et,tt,nt){var rt=EDITOR_TO_PENDING_DIFFS.get(et),ot=rt?.find(ht=>{var{path:mt}=ht;return Path$2.equals(mt,tt.path)});if(!ot||tt.offset<=ot.diff.start)return Point$1.transform(tt,nt,{affinity:"backward"});var{diff:st}=ot;if(tt.offset<=st.start+st.text.length){var ut={path:tt.path,offset:st.start},ct=Point$1.transform(ut,nt,{affinity:"backward"});return ct?{path:ct.path,offset:ct.offset+tt.offset-st.start}:null}var ft={path:tt.path,offset:tt.offset-st.text.length+st.end-st.start},pt=Point$1.transform(ft,nt,{affinity:"backward"});return pt?nt.type==="split_node"&&Path$2.equals(nt.path,tt.path)&&ft.offset<nt.position&&st.start<nt.position?pt:{path:pt.path,offset:pt.offset+st.text.length-st.end+st.start}:null}function transformPendingRange(et,tt,nt){var rt=transformPendingPoint(et,tt.anchor,nt);if(!rt)return null;if(Range$1.isCollapsed(tt))return{anchor:rt,focus:rt};var ot=transformPendingPoint(et,tt.focus,nt);return ot?{anchor:rt,focus:ot}:null}function transformTextDiff(et,tt){var{path:nt,diff:rt,id:ot}=et;switch(tt.type){case"insert_text":return!Path$2.equals(tt.path,nt)||tt.offset>=rt.end?et:tt.offset<=rt.start?{diff:{start:tt.text.length+rt.start,end:tt.text.length+rt.end,text:rt.text},id:ot,path:nt}:{diff:{start:rt.start,end:rt.end+tt.text.length,text:rt.text},id:ot,path:nt};case"remove_text":return!Path$2.equals(tt.path,nt)||tt.offset>=rt.end?et:tt.offset+tt.text.length<=rt.start?{diff:{start:rt.start-tt.text.length,end:rt.end-tt.text.length,text:rt.text},id:ot,path:nt}:{diff:{start:rt.start,end:rt.end-tt.text.length,text:rt.text},id:ot,path:nt};case"split_node":return!Path$2.equals(tt.path,nt)||tt.position>=rt.end?{diff:rt,id:ot,path:Path$2.transform(nt,tt,{affinity:"backward"})}:tt.position>rt.start?{diff:{start:rt.start,end:Math.min(tt.position,rt.end),text:rt.text},id:ot,path:nt}:{diff:{start:rt.start-tt.position,end:rt.end-tt.position,text:rt.text},id:ot,path:Path$2.transform(nt,tt,{affinity:"forward"})};case"merge_node":return Path$2.equals(tt.path,nt)?{diff:{start:rt.start+tt.position,end:rt.end+tt.position,text:rt.text},id:ot,path:Path$2.transform(nt,tt)}:{diff:rt,id:ot,path:Path$2.transform(nt,tt)}}var st=Path$2.transform(nt,tt);return st?{diff:rt,path:st,id:ot}:null}function ownKeys$3$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$3$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$3$1(Object(nt),!0).forEach(function(rt){_defineProperty$9(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$3$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var RESOLVE_DELAY=25,FLUSH_DELAY=200,debug$4=function et(){},isDataTransfer=et=>et?.constructor.name==="DataTransfer";function createAndroidInputManager(et){var{editor:tt,scheduleOnDOMSelectionChange:nt,onDOMSelectionChange:rt}=et,ot=!1,st=null,ut=null,ct=null,ft=0,pt=!1,ht=()=>{var Zt=EDITOR_TO_PENDING_SELECTION.get(tt);if(EDITOR_TO_PENDING_SELECTION.delete(tt),Zt){var{selection:Ut}=tt,Xt=normalizeRange(tt,Zt);Xt&&(!Ut||!Range$1.equals(Xt,Ut))&&Transforms.select(tt,Xt)}},mt=()=>{var Zt=EDITOR_TO_PENDING_ACTION.get(tt);if(EDITOR_TO_PENDING_ACTION.delete(tt),!!Zt){if(Zt.at){var Ut=Point$1.isPoint(Zt.at)?normalizePoint(tt,Zt.at):normalizeRange(tt,Zt.at);if(!Ut)return;var Xt=Editor$1.range(tt,Ut);(!tt.selection||!Range$1.equals(tt.selection,Xt))&&Transforms.select(tt,Ut)}Zt.run()}},yt=()=>{if(ut&&(clearTimeout(ut),ut=null),ct&&(clearTimeout(ct),ct=null),!Ot()&&!$t()){ht();return}ot||(ot=!0,setTimeout(()=>ot=!1)),$t()&&(ot="action");var Zt=tt.selection&&Editor$1.rangeRef(tt,tt.selection,{affinity:"forward"});EDITOR_TO_USER_MARKS.set(tt,tt.marks),debug$4("flush",EDITOR_TO_PENDING_ACTION.get(tt),EDITOR_TO_PENDING_DIFFS.get(tt));for(var Ut=Ot(),Xt;Xt=(Jt=EDITOR_TO_PENDING_DIFFS.get(tt))===null||Jt===void 0?void 0:Jt[0];){var Jt,gn,An=EDITOR_TO_PENDING_INSERTION_MARKS.get(tt);An!==void 0&&(EDITOR_TO_PENDING_INSERTION_MARKS.delete(tt),tt.marks=An),An&&pt===!1&&(pt=null);var sn=targetRange(Xt);(!tt.selection||!Range$1.equals(tt.selection,sn))&&Transforms.select(tt,sn),Xt.diff.text?Editor$1.insertText(tt,Xt.diff.text):Editor$1.deleteFragment(tt),EDITOR_TO_PENDING_DIFFS.set(tt,(gn=EDITOR_TO_PENDING_DIFFS.get(tt))===null||gn===void 0?void 0:gn.filter(_n=>{var{id:En}=_n;return En!==Xt.id})),verifyDiffState(tt,Xt)||(Ut=!1,EDITOR_TO_PENDING_ACTION.delete(tt),EDITOR_TO_USER_MARKS.delete(tt),ot="action",EDITOR_TO_PENDING_SELECTION.delete(tt),nt.cancel(),rt.cancel(),Zt?.unref())}var Sn=Zt?.unref();if(Sn&&!EDITOR_TO_PENDING_SELECTION.get(tt)&&(!tt.selection||!Range$1.equals(Sn,tt.selection))&&Transforms.select(tt,Sn),$t()){mt();return}Ut&&nt(),nt.flush(),rt.flush(),ht();var In=EDITOR_TO_USER_MARKS.get(tt);EDITOR_TO_USER_MARKS.delete(tt),In!==void 0&&(tt.marks=In,tt.onChange())},vt=Zt=>{st&&clearTimeout(st),st=setTimeout(()=>{IS_COMPOSING.set(tt,!1),yt()},RESOLVE_DELAY)},Tt=Zt=>{IS_COMPOSING.set(tt,!0),st&&(clearTimeout(st),st=null)},Et=function(){var Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Xt=EDITOR_TO_PLACEHOLDER_ELEMENT.get(tt);if(!!Xt){if(Ot()||Ut){Xt.style.display="none";return}Xt.style.removeProperty("display")}},xt=(Zt,Ut)=>{var Xt,Jt=(Xt=EDITOR_TO_PENDING_DIFFS.get(tt))!==null&&Xt!==void 0?Xt:[];EDITOR_TO_PENDING_DIFFS.set(tt,Jt);var gn=Node$4.leaf(tt,Zt),An=Jt.findIndex(In=>Path$2.equals(In.path,Zt));if(An<0){var sn=normalizeStringDiff(gn.text,Ut);sn&&Jt.push({path:Zt,diff:Ut,id:ft++}),Et();return}var Sn=mergeStringDiffs(gn.text,Jt[An].diff,Ut);if(!Sn){Jt.splice(An,1),Et();return}Jt[An]=_objectSpread$3$1(_objectSpread$3$1({},Jt[An]),{},{diff:Sn})},At=function(Ut){var{at:Xt}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pt=!1,EDITOR_TO_PENDING_SELECTION.delete(tt),nt.cancel(),rt.cancel(),$t()&&yt(),EDITOR_TO_PENDING_ACTION.set(tt,{at:Xt,run:Ut}),ct=setTimeout(yt)},Ct=Zt=>{var Ut;ut&&(clearTimeout(ut),ut=null);var{inputType:Xt}=Zt,Jt=null,gn=Zt.dataTransfer||Zt.data||void 0;pt!==!1&&Xt!=="insertText"&&Xt!=="insertCompositionText"&&(pt=!1);var[An]=Zt.getTargetRanges();An&&(Jt=ReactEditor.toSlateRange(tt,An,{exactMatch:!1,suppressThrow:!0}));var sn=ReactEditor.getWindow(tt),Sn=sn.getSelection();if(!Jt&&Sn&&(An=Sn,Jt=ReactEditor.toSlateRange(tt,Sn,{exactMatch:!1,suppressThrow:!0})),Jt=(Ut=Jt)!==null&&Ut!==void 0?Ut:tt.selection,!!Jt){var In=!0;if(Xt.startsWith("delete")){if(Range$1.isExpanded(Jt)){var[_n,En]=Range$1.edges(Jt),Ln=Node$4.leaf(tt,_n.path);if(Ln.text.length===_n.offset&&En.offset===0){var wn=Editor$1.next(tt,{at:_n.path,match:Text$1.isText});wn&&Path$2.equals(wn[1],En.path)&&(Jt={anchor:En,focus:En})}}var Dn=Xt.endsWith("Backward")?"backward":"forward",[$n,Gn]=Range$1.edges(Jt),[Jn,zn]=Editor$1.leaf(tt,$n.path),Qn={text:"",start:$n.offset,end:Gn.offset},Bn=EDITOR_TO_PENDING_DIFFS.get(tt),jn=Bn?.find(Bo=>Path$2.equals(Bo.path,zn)),Ar=jn?[jn.diff,Qn]:[Qn],Er=applyStringDiff(Jn.text,...Ar);if(Er.length===0&&(In=!1),Range$1.isExpanded(Jt)){if(In&&Path$2.equals(Jt.anchor.path,Jt.focus.path)){var Pr={path:Jt.anchor.path,offset:$n.offset},Nr=Editor$1.range(tt,Pr,Pr);return kt(Nr),xt(Jt.anchor.path,{text:"",end:Gn.offset,start:$n.offset})}return At(()=>Editor$1.deleteFragment(tt,{direction:Dn}),{at:Jt})}}switch(Xt){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return At(()=>Editor$1.deleteFragment(tt),{at:Jt});case"deleteContent":case"deleteContentForward":{var{anchor:Ir}=Jt;if(In&&Range$1.isCollapsed(Jt)){var no=Node$4.leaf(tt,Ir.path);if(Ir.offset<no.text.length)return xt(Ir.path,{text:"",start:Ir.offset,end:Ir.offset+1})}return At(()=>Editor$1.deleteForward(tt),{at:Jt})}case"deleteContentBackward":{var ro,{anchor:ao}=Jt,Xr=isDOMSelection(An)?An.isCollapsed:!!((ro=An)!==null&&ro!==void 0&&ro.collapsed);return In&&Xr&&Range$1.isCollapsed(Jt)&&ao.offset>0?xt(ao.path,{text:"",start:ao.offset-1,end:ao.offset}):At(()=>Editor$1.deleteBackward(tt),{at:Jt})}case"deleteEntireSoftLine":return At(()=>{Editor$1.deleteBackward(tt,{unit:"line"}),Editor$1.deleteForward(tt,{unit:"line"})},{at:Jt});case"deleteHardLineBackward":return At(()=>Editor$1.deleteBackward(tt,{unit:"block"}),{at:Jt});case"deleteSoftLineBackward":return At(()=>Editor$1.deleteBackward(tt,{unit:"line"}),{at:Jt});case"deleteHardLineForward":return At(()=>Editor$1.deleteForward(tt,{unit:"block"}),{at:Jt});case"deleteSoftLineForward":return At(()=>Editor$1.deleteForward(tt,{unit:"line"}),{at:Jt});case"deleteWordBackward":return At(()=>Editor$1.deleteBackward(tt,{unit:"word"}),{at:Jt});case"deleteWordForward":return At(()=>Editor$1.deleteForward(tt,{unit:"word"}),{at:Jt});case"insertLineBreak":return At(()=>Editor$1.insertSoftBreak(tt),{at:Jt});case"insertParagraph":return At(()=>Editor$1.insertBreak(tt),{at:Jt});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(isDataTransfer(gn))return At(()=>ReactEditor.insertData(tt,gn),{at:Jt});var Jr=gn??"";if(EDITOR_TO_PENDING_INSERTION_MARKS.get(tt)&&(Jr=Jr.replace("\uFEFF","")),Xt==="insertText"&&/.*\n.*\n$/.test(Jr)&&(Jr=Jr.slice(0,-1)),Jr.includes(`
`))return At(()=>{var Bo=Jr.split(`
`);Bo.forEach((ss,Us)=>{ss&&Editor$1.insertText(tt,ss),Us!==Bo.length-1&&Editor$1.insertSoftBreak(tt)})},{at:Jt});if(Path$2.equals(Jt.anchor.path,Jt.focus.path)){var[So,va]=Range$1.edges(Jt),$o={start:So.offset,end:va.offset,text:Jr};if(Jr&&pt&&Xt==="insertCompositionText"){var Qr=pt.start+pt.text.search(/\S|$/),jo=$o.start+$o.text.search(/\S|$/);jo===Qr+1&&$o.end===pt.start+pt.text.length?($o.start-=1,pt=null,zt()):pt=!1}else Xt==="insertText"?pt===null?pt=$o:pt&&Range$1.isCollapsed(Jt)&&pt.end+pt.text.length===So.offset?pt=_objectSpread$3$1(_objectSpread$3$1({},pt),{},{text:pt.text+Jr}):pt=!1:pt=!1;if(In){xt(So.path,$o);return}}return At(()=>Editor$1.insertText(tt,Jr),{at:Jt})}}}},$t=()=>!!EDITOR_TO_PENDING_ACTION.get(tt),Ot=()=>{var Zt;return!!((Zt=EDITOR_TO_PENDING_DIFFS.get(tt))!==null&&Zt!==void 0&&Zt.length)},Rt=()=>$t()||Ot(),It=()=>ot,kt=Zt=>{EDITOR_TO_PENDING_SELECTION.set(tt,Zt),ut&&(clearTimeout(ut),ut=null);var{selection:Ut}=tt;if(!!Zt){var Xt=!Ut||!Path$2.equals(Ut.anchor.path,Zt.anchor.path),Jt=!Ut||!Path$2.equals(Ut.anchor.path.slice(0,-1),Zt.anchor.path.slice(0,-1));(Xt&&pt||Jt)&&(pt=!1),(Xt||Ot())&&(ut=setTimeout(yt,FLUSH_DELAY))}},Mt=()=>{($t()||!Ot())&&yt()},Ft=Zt=>{Ot()||(Et(!0),setTimeout(Et))},zt=()=>{$t()||(ct=setTimeout(yt))},Vt=Zt=>{if(!(Ot()||$t())&&Zt.some(Xt=>isTrackedMutation(tt,Xt,Zt))){var Ut;(Ut=EDITOR_TO_FORCE_RENDER.get(tt))===null||Ut===void 0||Ut()}};return{flush:yt,scheduleFlush:zt,hasPendingDiffs:Ot,hasPendingAction:$t,hasPendingChanges:Rt,isFlushing:It,handleUserSelect:kt,handleCompositionEnd:vt,handleCompositionStart:Tt,handleDOMBeforeInput:Ct,handleKeyDown:Ft,handleDomMutations:Vt,handleInput:Mt}}function useIsMounted(){var et=react.exports.useRef(!1);return react.exports.useEffect(()=>(et.current=!0,()=>{et.current=!1}),[]),et.current}var useIsomorphicLayoutEffect=CAN_USE_DOM?react.exports.useLayoutEffect:react.exports.useEffect;function useMutationObserver(et,tt,nt){var[rt]=react.exports.useState(()=>new MutationObserver(tt));useIsomorphicLayoutEffect(()=>{rt.takeRecords()}),react.exports.useEffect(()=>{if(!et.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return rt.observe(et.current,nt),()=>rt.disconnect()},[rt,et,nt])}var _excluded$3=["node"];function ownKeys$2$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$2$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$2$1(Object(nt),!0).forEach(function(rt){_defineProperty$9(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$2$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var MUTATION_OBSERVER_CONFIG$1={subtree:!0,childList:!0,characterData:!0},useAndroidInputManager=IS_ANDROID?et=>{var{node:tt}=et,nt=_objectWithoutProperties$1(et,_excluded$3);if(!IS_ANDROID)return null;var rt=useSlateStatic(),ot=useIsMounted(),[st]=react.exports.useState(()=>createAndroidInputManager(_objectSpread$2$1({editor:rt},nt)));return useMutationObserver(tt,st.handleDomMutations,MUTATION_OBSERVER_CONFIG$1),EDITOR_TO_SCHEDULE_FLUSH.set(rt,st.scheduleFlush),ot&&st.flush(),st}:()=>null,_excluded$2$1=["anchor","focus"],_excluded2$1=["anchor","focus"],shallowCompare=(et,tt)=>Object.keys(et).length===Object.keys(tt).length&&Object.keys(et).every(nt=>tt.hasOwnProperty(nt)&&et[nt]===tt[nt]),isDecorationFlagsEqual=(et,tt)=>{var nt=_objectWithoutProperties$1(et,_excluded$2$1),rt=_objectWithoutProperties$1(tt,_excluded2$1);return et[PLACEHOLDER_SYMBOL]===tt[PLACEHOLDER_SYMBOL]&&shallowCompare(nt,rt)},isElementDecorationsEqual=(et,tt)=>{if(et.length!==tt.length)return!1;for(var nt=0;nt<et.length;nt++){var rt=et[nt],ot=tt[nt];if(!Range$1.equals(rt,ot)||!isDecorationFlagsEqual(rt,ot))return!1}return!0},isTextDecorationsEqual=(et,tt)=>{if(et.length!==tt.length)return!1;for(var nt=0;nt<et.length;nt++){var rt=et[nt],ot=tt[nt];if(rt.anchor.offset!==ot.anchor.offset||rt.focus.offset!==ot.focus.offset||!isDecorationFlagsEqual(rt,ot))return!1}return!0},String$1=et=>{var{isLast:tt,leaf:nt,parent:rt,text:ot}=et,st=useSlateStatic(),ut=ReactEditor.findPath(st,ot),ct=Path$2.parent(ut),ft=nt[MARK_PLACEHOLDER_SYMBOL]===!0;return st.isVoid(rt)?Wt.createElement(ZeroWidthString,{length:Node$4.string(rt).length}):nt.text===""&&rt.children[rt.children.length-1]===ot&&!st.isInline(rt)&&Editor$1.string(st,ct)===""?Wt.createElement(ZeroWidthString,{isLineBreak:!0,isMarkPlaceholder:ft}):nt.text===""?Wt.createElement(ZeroWidthString,{isMarkPlaceholder:ft}):tt&&nt.text.slice(-1)===`
`?Wt.createElement(TextString,{isTrailing:!0,text:nt.text}):Wt.createElement(TextString,{text:nt.text})},TextString=et=>{var{text:tt,isTrailing:nt=!1}=et,rt=react.exports.useRef(null),ot=()=>"".concat(tt??"").concat(nt?`
`:""),[st]=react.exports.useState(ot);return useIsomorphicLayoutEffect(()=>{var ut=ot();rt.current&&rt.current.textContent!==ut&&(rt.current.textContent=ut)}),Wt.createElement(MemoizedText$1,{ref:rt},st)},MemoizedText$1=react.exports.memo(react.exports.forwardRef((et,tt)=>Wt.createElement("span",{"data-slate-string":!0,ref:tt},et.children))),ZeroWidthString=et=>{var{length:tt=0,isLineBreak:nt=!1,isMarkPlaceholder:rt=!1}=et,ot={"data-slate-zero-width":nt?"n":"z","data-slate-length":tt};return rt&&(ot["data-slate-mark-placeholder"]=!0),Wt.createElement("span",Object.assign({},ot),!IS_ANDROID||!nt?"\uFEFF":null,nt?Wt.createElement("br",null):null)};function disconnectPlaceholderResizeObserver(et,tt){et.current&&(et.current.disconnect(),tt&&(et.current=null))}function clearTimeoutRef(et){et.current&&(clearTimeout(et.current),et.current=null)}var Leaf$1=et=>{var{leaf:tt,isLast:nt,text:rt,parent:ot,renderPlaceholder:st,renderLeaf:ut=Ct=>Wt.createElement(DefaultLeaf,Object.assign({},Ct))}=et,ct=useSlateStatic(),ft=react.exports.useRef(null),pt=react.exports.useRef(null),[ht,mt]=react.exports.useState(!1),yt=react.exports.useRef(null),vt=react.exports.useCallback(Ct=>{if(disconnectPlaceholderResizeObserver(ft,Ct==null),Ct==null){var $t;EDITOR_TO_PLACEHOLDER_ELEMENT.delete(ct),($t=tt.onPlaceholderResize)===null||$t===void 0||$t.call(tt,null)}else{if(EDITOR_TO_PLACEHOLDER_ELEMENT.set(ct,Ct),!ft.current){var Ot=window.ResizeObserver||ResizeObserver$2;ft.current=new Ot(()=>{var Rt;(Rt=tt.onPlaceholderResize)===null||Rt===void 0||Rt.call(tt,Ct)})}ft.current.observe(Ct),pt.current=Ct}},[pt,tt,ct]),Tt=Wt.createElement(String$1,{isLast:nt,leaf:tt,parent:ot,text:rt}),Et=tt[PLACEHOLDER_SYMBOL];if(react.exports.useEffect(()=>(Et?yt.current||(yt.current=setTimeout(()=>{mt(!0),yt.current=null},300)):(clearTimeoutRef(yt),mt(!1)),()=>clearTimeoutRef(yt)),[Et,mt]),Et&&ht){var xt={children:tt.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:IS_WEBKIT?"inherit":void 0},contentEditable:!1,ref:vt}};Tt=Wt.createElement(Wt.Fragment,null,st(xt),Tt)}var At={"data-slate-leaf":!0};return ut({attributes:At,children:Tt,leaf:tt,text:rt})},MemoizedLeaf=Wt.memo(Leaf$1,(et,tt)=>tt.parent===et.parent&&tt.isLast===et.isLast&&tt.renderLeaf===et.renderLeaf&&tt.renderPlaceholder===et.renderPlaceholder&&tt.text===et.text&&Text$1.equals(tt.leaf,et.leaf)&&tt.leaf[PLACEHOLDER_SYMBOL]===et.leaf[PLACEHOLDER_SYMBOL]),DefaultLeaf=et=>{var{attributes:tt,children:nt}=et;return Wt.createElement("span",Object.assign({},tt),nt)},Text=et=>{for(var{decorations:tt,isLast:nt,parent:rt,renderPlaceholder:ot,renderLeaf:st,text:ut}=et,ct=useSlateStatic(),ft=react.exports.useRef(null),pt=Text$1.decorations(ut,tt),ht=ReactEditor.findKey(ct,ut),mt=[],yt=0;yt<pt.length;yt++){var vt=pt[yt];mt.push(Wt.createElement(MemoizedLeaf,{isLast:nt&&yt===pt.length-1,key:"".concat(ht.id,"-").concat(yt),renderPlaceholder:ot,leaf:vt,text:ut,parent:rt,renderLeaf:st}))}var Tt=react.exports.useCallback(Et=>{var xt=EDITOR_TO_KEY_TO_ELEMENT.get(ct);Et?(xt?.set(ht,Et),NODE_TO_ELEMENT.set(ut,Et),ELEMENT_TO_NODE.set(Et,ut)):(xt?.delete(ht),NODE_TO_ELEMENT.delete(ut),ft.current&&ELEMENT_TO_NODE.delete(ft.current)),ft.current=Et},[ft,ct,ht,ut]);return Wt.createElement("span",{"data-slate-node":"text",ref:Tt},mt)},MemoizedText=Wt.memo(Text,(et,tt)=>tt.parent===et.parent&&tt.isLast===et.isLast&&tt.renderLeaf===et.renderLeaf&&tt.renderPlaceholder===et.renderPlaceholder&&tt.text===et.text&&isTextDecorationsEqual(tt.decorations,et.decorations)),Element$1=et=>{var{decorations:tt,element:nt,renderElement:rt=Ct=>Wt.createElement(DefaultElement,Object.assign({},Ct)),renderPlaceholder:ot,renderLeaf:st,selection:ut}=et,ct=useSlateStatic(),ft=useReadOnly(),pt=ct.isInline(nt),ht=ReactEditor.findKey(ct,nt),mt=react.exports.useCallback(Ct=>{var $t=EDITOR_TO_KEY_TO_ELEMENT.get(ct);Ct?($t?.set(ht,Ct),NODE_TO_ELEMENT.set(nt,Ct),ELEMENT_TO_NODE.set(Ct,nt)):($t?.delete(ht),NODE_TO_ELEMENT.delete(nt))},[ct,ht,nt]),yt=useChildren({decorations:tt,node:nt,renderElement:rt,renderPlaceholder:ot,renderLeaf:st,selection:ut}),vt={"data-slate-node":"element",ref:mt};if(pt&&(vt["data-slate-inline"]=!0),!pt&&Editor$1.hasInlines(ct,nt)){var Tt=Node$4.string(nt),Et=direction_1(Tt);Et==="rtl"&&(vt.dir=Et)}if(Editor$1.isVoid(ct,nt)){vt["data-slate-void"]=!0,!ft&&pt&&(vt.contentEditable=!1);var xt=pt?"span":"div",[[At]]=Node$4.texts(nt);yt=Wt.createElement(xt,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Wt.createElement(MemoizedText,{renderPlaceholder:ot,decorations:[],isLast:!1,parent:nt,text:At})),NODE_TO_INDEX.set(At,0),NODE_TO_PARENT.set(At,nt)}return rt({attributes:vt,children:yt,element:nt})},MemoizedElement=Wt.memo(Element$1,(et,tt)=>et.element===tt.element&&et.renderElement===tt.renderElement&&et.renderLeaf===tt.renderLeaf&&et.renderPlaceholder===tt.renderPlaceholder&&isElementDecorationsEqual(et.decorations,tt.decorations)&&(et.selection===tt.selection||!!et.selection&&!!tt.selection&&Range$1.equals(et.selection,tt.selection))),DefaultElement=et=>{var{attributes:tt,children:nt,element:rt}=et,ot=useSlateStatic(),st=ot.isInline(rt)?"span":"div";return Wt.createElement(st,Object.assign({},tt,{style:{position:"relative"}}),nt)},DecorateContext=react.exports.createContext(()=>[]),useDecorate=()=>react.exports.useContext(DecorateContext),SelectedContext=react.exports.createContext(!1),useChildren=et=>{for(var{decorations:tt,node:nt,renderElement:rt,renderPlaceholder:ot,renderLeaf:st,selection:ut}=et,ct=useDecorate(),ft=useSlateStatic(),pt=ReactEditor.findPath(ft,nt),ht=[],mt=Element$2.isElement(nt)&&!ft.isInline(nt)&&Editor$1.hasInlines(ft,nt),yt=0;yt<nt.children.length;yt++){var vt=pt.concat(yt),Tt=nt.children[yt],Et=ReactEditor.findKey(ft,Tt),xt=Editor$1.range(ft,vt),At=ut&&Range$1.intersection(xt,ut),Ct=ct([Tt,vt]);for(var $t of tt){var Ot=Range$1.intersection($t,xt);Ot&&Ct.push(Ot)}Element$2.isElement(Tt)?ht.push(Wt.createElement(SelectedContext.Provider,{key:"provider-".concat(Et.id),value:!!At},Wt.createElement(MemoizedElement,{decorations:Ct,element:Tt,key:Et.id,renderElement:rt,renderPlaceholder:ot,renderLeaf:st,selection:At}))):ht.push(Wt.createElement(MemoizedText,{decorations:Ct,key:Et.id,isLast:mt&&yt===nt.children.length-1,parent:nt,renderPlaceholder:ot,renderLeaf:st,text:Tt})),NODE_TO_INDEX.set(Tt,yt),NODE_TO_PARENT.set(Tt,nt)}return ht},ReadOnlyContext=react.exports.createContext(!1),useReadOnly=()=>react.exports.useContext(ReadOnlyContext),SlateContext=react.exports.createContext(null),useSlate=()=>{var et=react.exports.useContext(SlateContext);if(!et)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:tt}=et;return tt};function useTrackUserInput(){var et=useSlateStatic(),tt=react.exports.useRef(!1),nt=react.exports.useRef(0),rt=react.exports.useCallback(()=>{if(!tt.current){tt.current=!0;var ot=ReactEditor.getWindow(et);ot.cancelAnimationFrame(nt.current),nt.current=ot.requestAnimationFrame(()=>{tt.current=!1})}},[et]);return react.exports.useEffect(()=>()=>cancelAnimationFrame(nt.current),[]),{receivedUserInput:tt,onUserInput:rt}}var TRIPLE_CLICK=3,HOTKEYS={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},APPLE_HOTKEYS={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},WINDOWS_HOTKEYS={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},create$i=et=>{var tt=HOTKEYS[et],nt=APPLE_HOTKEYS[et],rt=WINDOWS_HOTKEYS[et],ot=tt&&isKeyHotkey_1(tt),st=nt&&isKeyHotkey_1(nt),ut=rt&&isKeyHotkey_1(rt);return ct=>!!(ot&&ot(ct)||IS_APPLE&&st&&st(ct)||!IS_APPLE&&ut&&ut(ct))},Hotkeys={isBold:create$i("bold"),isCompose:create$i("compose"),isMoveBackward:create$i("moveBackward"),isMoveForward:create$i("moveForward"),isDeleteBackward:create$i("deleteBackward"),isDeleteForward:create$i("deleteForward"),isDeleteLineBackward:create$i("deleteLineBackward"),isDeleteLineForward:create$i("deleteLineForward"),isDeleteWordBackward:create$i("deleteWordBackward"),isDeleteWordForward:create$i("deleteWordForward"),isExtendBackward:create$i("extendBackward"),isExtendForward:create$i("extendForward"),isExtendLineBackward:create$i("extendLineBackward"),isExtendLineForward:create$i("extendLineForward"),isItalic:create$i("italic"),isMoveLineBackward:create$i("moveLineBackward"),isMoveLineForward:create$i("moveLineForward"),isMoveWordBackward:create$i("moveWordBackward"),isMoveWordForward:create$i("moveWordForward"),isRedo:create$i("redo"),isSoftBreak:create$i("insertSoftBreak"),isSplitBlock:create$i("splitBlock"),isTransposeCharacter:create$i("transposeCharacter"),isUndo:create$i("undo")},createRestoreDomManager=(et,tt)=>{var nt=[],rt=()=>{nt=[]},ot=ut=>{if(!!tt.current){var ct=ut.filter(ft=>isTrackedMutation(et,ft,ut));nt.push(...ct)}};function st(){nt.length>0&&(nt.reverse().forEach(ut=>{ut.type!=="characterData"&&(ut.removedNodes.forEach(ct=>{ut.target.insertBefore(ct,ut.nextSibling)}),ut.addedNodes.forEach(ct=>{ut.target.removeChild(ct)}))}),rt())}return{registerMutations:ot,restoreDOM:st,clear:rt}},MUTATION_OBSERVER_CONFIG={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class RestoreDOMComponent extends react.exports.Component{constructor(){super(...arguments),this.context=null,this.manager=null,this.mutationObserver=null}observe(){var tt,{node:nt}=this.props;if(!nt.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(tt=this.mutationObserver)===null||tt===void 0||tt.observe(nt.current,MUTATION_OBSERVER_CONFIG)}componentDidMount(){var{receivedUserInput:tt}=this.props,nt=this.context;this.manager=createRestoreDomManager(nt,tt),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var tt,nt,rt,ot=(tt=this.mutationObserver)===null||tt===void 0?void 0:tt.takeRecords();if(ot!=null&&ot.length){var st;(st=this.manager)===null||st===void 0||st.registerMutations(ot)}return(nt=this.mutationObserver)===null||nt===void 0||nt.disconnect(),(rt=this.manager)===null||rt===void 0||rt.restoreDOM(),null}componentDidUpdate(){var tt;(tt=this.manager)===null||tt===void 0||tt.clear(),this.observe()}componentWillUnmount(){var tt;(tt=this.mutationObserver)===null||tt===void 0||tt.disconnect()}render(){return this.props.children}}RestoreDOMComponent.contextType=EditorContext;var RestoreDOM=IS_ANDROID?RestoreDOMComponent:et=>{var{children:tt}=et;return Wt.createElement(Wt.Fragment,null,tt)},_excluded$1$1=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],_excluded2=["text"];function ownKeys$1$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$1$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$1$1(Object(nt),!0).forEach(function(rt){_defineProperty$9(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$1$1(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var Children=et=>Wt.createElement(Wt.Fragment,null,useChildren(et)),Editable=et=>{var tt=react.exports.useCallback(wn=>Wt.createElement(DefaultPlaceholder,Object.assign({},wn)),[]),{autoFocus:nt,decorate:rt=defaultDecorate,onDOMBeforeInput:ot,placeholder:st,readOnly:ut=!1,renderElement:ct,renderLeaf:ft,renderPlaceholder:pt=tt,scrollSelectionIntoView:ht=defaultScrollSelectionIntoView,style:mt={},as:yt="div",disableDefaultStyles:vt=!1}=et,Tt=_objectWithoutProperties$1(et,_excluded$1$1),Et=useSlate(),[xt,At]=react.exports.useState(!1),Ct=react.exports.useRef(null),$t=react.exports.useRef([]),[Ot,Rt]=react.exports.useState(),{onUserInput:It,receivedUserInput:kt}=useTrackUserInput(),[,Mt]=react.exports.useReducer(wn=>wn+1,0);EDITOR_TO_FORCE_RENDER.set(Et,Mt),IS_READ_ONLY.set(Et,ut);var Ft=react.exports.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);react.exports.useEffect(()=>{Ct.current&&nt&&Ct.current.focus()},[nt]);var zt=react.exports.useRef(),Vt=react.exports.useMemo(()=>throttle_1(()=>{var wn=zt.current;if((IS_ANDROID||!ReactEditor.isComposing(Et))&&(!Ft.isUpdatingSelection||wn!=null&&wn.isFlushing())&&!Ft.isDraggingInternally){var Dn=ReactEditor.findDocumentOrShadowRoot(Et),{activeElement:$n}=Dn,Gn=ReactEditor.toDOMNode(Et,Et),Jn=Dn.getSelection();if($n===Gn?(Ft.latestElement=$n,IS_FOCUSED.set(Et,!0)):IS_FOCUSED.delete(Et),!Jn)return Transforms.deselect(Et);var{anchorNode:zn,focusNode:Qn}=Jn,Bn=ReactEditor.hasEditableTarget(Et,zn)||ReactEditor.isTargetInsideNonReadonlyVoid(Et,zn),jn=ReactEditor.hasEditableTarget(Et,Qn)||ReactEditor.isTargetInsideNonReadonlyVoid(Et,Qn);if(Bn&&jn){var Ar=ReactEditor.toSlateRange(Et,Jn,{exactMatch:!1,suppressThrow:!0});Ar&&(!ReactEditor.isComposing(Et)&&!(wn!=null&&wn.hasPendingChanges())&&!(wn!=null&&wn.isFlushing())?Transforms.select(Et,Ar):wn?.handleUserSelect(Ar))}ut&&(!Bn||!jn)&&Transforms.deselect(Et)}},100),[Et,ut,Ft]),Zt=react.exports.useMemo(()=>debounce_1(Vt,0),[Vt]);zt.current=useAndroidInputManager({node:Ct,onDOMSelectionChange:Vt,scheduleOnDOMSelectionChange:Zt}),useIsomorphicLayoutEffect(()=>{var wn,Dn,$n;Ct.current&&($n=getDefaultView(Ct.current))?(EDITOR_TO_WINDOW.set(Et,$n),EDITOR_TO_ELEMENT.set(Et,Ct.current),NODE_TO_ELEMENT.set(Et,Ct.current),ELEMENT_TO_NODE.set(Ct.current,Et)):NODE_TO_ELEMENT.delete(Et);var{selection:Gn}=Et,Jn=ReactEditor.findDocumentOrShadowRoot(Et),zn=Jn.getSelection();if(!(!zn||!ReactEditor.isFocused(Et)||(wn=zt.current)!==null&&wn!==void 0&&wn.hasPendingAction())){var Qn=Pr=>{var Nr=zn.type!=="None";if(!(!Gn&&!Nr)){var Ir=EDITOR_TO_ELEMENT.get(Et),no=!1;if(Ir.contains(zn.anchorNode)&&Ir.contains(zn.focusNode)&&(no=!0),Nr&&no&&Gn&&!Pr){var ro=ReactEditor.toSlateRange(Et,zn,{exactMatch:!0,suppressThrow:!0});if(ro&&Range$1.equals(ro,Gn)){var ao;if(!Ft.hasMarkPlaceholder)return;var{anchorNode:Xr}=zn;if(Xr!=null&&(ao=Xr.parentElement)!==null&&ao!==void 0&&ao.hasAttribute("data-slate-mark-placeholder"))return}}if(Gn&&!ReactEditor.hasRange(Et,Gn)){Et.selection=ReactEditor.toSlateRange(Et,zn,{exactMatch:!1,suppressThrow:!0});return}Ft.isUpdatingSelection=!0;var Jr=Gn&&ReactEditor.toDOMRange(Et,Gn);return Jr?(ReactEditor.isComposing(Et)?zn.collapseToEnd():Range$1.isBackward(Gn)?zn.setBaseAndExtent(Jr.endContainer,Jr.endOffset,Jr.startContainer,Jr.startOffset):zn.setBaseAndExtent(Jr.startContainer,Jr.startOffset,Jr.endContainer,Jr.endOffset),ht(Et,Jr)):zn.removeAllRanges(),Jr}},Bn=Qn(),jn=((Dn=zt.current)===null||Dn===void 0?void 0:Dn.isFlushing())==="action";if(!IS_ANDROID||!jn){setTimeout(()=>{if(Bn&&IS_FIREFOX){var Pr=ReactEditor.toDOMNode(Et,Et);Pr.focus()}Ft.isUpdatingSelection=!1});return}var Ar=null,Er=requestAnimationFrame(()=>{if(jn){var Pr=Nr=>{try{var Ir=ReactEditor.toDOMNode(Et,Et);Ir.focus(),Qn(Nr)}catch{}};Pr(),Ar=setTimeout(()=>{Pr(!0),Ft.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Er),Ar&&clearTimeout(Ar)}}});var Ut=react.exports.useCallback(wn=>{if(It(),!ut&&ReactEditor.hasEditableTarget(Et,wn.target)&&!isDOMEventHandled(wn,ot)){var Dn;if(zt.current)return zt.current.handleDOMBeforeInput(wn);Zt.flush(),Vt.flush();var{selection:$n}=Et,{inputType:Gn}=wn,Jn=wn.dataTransfer||wn.data||void 0,zn=Gn==="insertCompositionText"||Gn==="deleteCompositionText";if(zn&&ReactEditor.isComposing(Et))return;var Qn=!1;if(Gn==="insertText"&&$n&&Range$1.isCollapsed($n)&&wn.data&&wn.data.length===1&&/[a-z ]/i.test(wn.data)&&$n.anchor.offset!==0){var Bn,jn;Qn=!0,Et.marks&&(Qn=!1);var{anchor:Ar}=$n,[Er,Pr]=ReactEditor.toDOMPoint(Et,Ar),Nr=(Bn=Er.parentElement)===null||Bn===void 0?void 0:Bn.closest("a"),Ir=ReactEditor.getWindow(Et);if(Qn&&Nr&&ReactEditor.hasDOMNode(Et,Nr)){var no,ro=Ir?.document.createTreeWalker(Nr,NodeFilter.SHOW_TEXT).lastChild();ro===Er&&((no=ro.textContent)===null||no===void 0?void 0:no.length)===Pr&&(Qn=!1)}if(Qn&&Er.parentElement&&(Ir==null||(jn=Ir.getComputedStyle(Er.parentElement))===null||jn===void 0?void 0:jn.whiteSpace)==="pre"){var ao=Editor$1.above(Et,{at:Ar.path,match:Qr=>Element$2.isElement(Qr)&&Editor$1.isBlock(Et,Qr)});ao&&Node$4.string(ao[0]).includes("	")&&(Qn=!1)}}if(!Gn.startsWith("delete")||Gn.startsWith("deleteBy")){var[Xr]=wn.getTargetRanges();if(Xr){var Jr=ReactEditor.toSlateRange(Et,Xr,{exactMatch:!1,suppressThrow:!1});if(!$n||!Range$1.equals($n,Jr)){Qn=!1;var So=!zn&&Et.selection&&Editor$1.rangeRef(Et,Et.selection);Transforms.select(Et,Jr),So&&EDITOR_TO_USER_SELECTION.set(Et,So)}}}if(zn)return;if(Qn||wn.preventDefault(),$n&&Range$1.isExpanded($n)&&Gn.startsWith("delete")){var va=Gn.endsWith("Backward")?"backward":"forward";Editor$1.deleteFragment(Et,{direction:va});return}switch(Gn){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{Editor$1.deleteFragment(Et);break}case"deleteContent":case"deleteContentForward":{Editor$1.deleteForward(Et);break}case"deleteContentBackward":{Editor$1.deleteBackward(Et);break}case"deleteEntireSoftLine":{Editor$1.deleteBackward(Et,{unit:"line"}),Editor$1.deleteForward(Et,{unit:"line"});break}case"deleteHardLineBackward":{Editor$1.deleteBackward(Et,{unit:"block"});break}case"deleteSoftLineBackward":{Editor$1.deleteBackward(Et,{unit:"line"});break}case"deleteHardLineForward":{Editor$1.deleteForward(Et,{unit:"block"});break}case"deleteSoftLineForward":{Editor$1.deleteForward(Et,{unit:"line"});break}case"deleteWordBackward":{Editor$1.deleteBackward(Et,{unit:"word"});break}case"deleteWordForward":{Editor$1.deleteForward(Et,{unit:"word"});break}case"insertLineBreak":Editor$1.insertSoftBreak(Et);break;case"insertParagraph":{Editor$1.insertBreak(Et);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Gn==="insertFromComposition"&&ReactEditor.isComposing(Et)&&(At(!1),IS_COMPOSING.set(Et,!1)),Jn?.constructor.name==="DataTransfer"?ReactEditor.insertData(Et,Jn):typeof Jn=="string"&&(Qn?$t.current.push(()=>Editor$1.insertText(Et,Jn)):Editor$1.insertText(Et,Jn));break}}var $o=(Dn=EDITOR_TO_USER_SELECTION.get(Et))===null||Dn===void 0?void 0:Dn.unref();EDITOR_TO_USER_SELECTION.delete(Et),$o&&(!Et.selection||!Range$1.equals(Et.selection,$o))&&Transforms.select(Et,$o)}},[Et,Vt,It,ot,ut,Zt]),Xt=react.exports.useCallback(wn=>{wn==null?(Vt.cancel(),Zt.cancel(),EDITOR_TO_ELEMENT.delete(Et),NODE_TO_ELEMENT.delete(Et),Ct.current&&HAS_BEFORE_INPUT_SUPPORT&&Ct.current.removeEventListener("beforeinput",Ut)):HAS_BEFORE_INPUT_SUPPORT&&wn.addEventListener("beforeinput",Ut),Ct.current=wn},[Vt,Zt,Et,Ut]);useIsomorphicLayoutEffect(()=>{var wn=ReactEditor.getWindow(Et);return wn.document.addEventListener("selectionchange",Zt),()=>{wn.document.removeEventListener("selectionchange",Zt)}},[Zt]);var Jt=rt([Et,[]]),gn=st&&Et.children.length===1&&Array.from(Node$4.texts(Et)).length===1&&Node$4.string(Et)===""&&!xt,An=react.exports.useCallback(wn=>{if(wn&&gn){var Dn;Rt((Dn=wn.getBoundingClientRect())===null||Dn===void 0?void 0:Dn.height)}else Rt(void 0)},[gn]);if(gn){var sn=Editor$1.start(Et,[]);Jt.push({[PLACEHOLDER_SYMBOL]:!0,placeholder:st,onPlaceholderResize:An,anchor:sn,focus:sn})}var{marks:Sn}=Et;if(Ft.hasMarkPlaceholder=!1,Et.selection&&Range$1.isCollapsed(Et.selection)&&Sn){var{anchor:In}=Et.selection,_n=Node$4.leaf(Et,In.path),En=_objectWithoutProperties$1(_n,_excluded2);if(!Text$1.equals(_n,Sn,{loose:!0})){Ft.hasMarkPlaceholder=!0;var Ln=Object.fromEntries(Object.keys(En).map(wn=>[wn,null]));Jt.push(_objectSpread$1$1(_objectSpread$1$1(_objectSpread$1$1({[MARK_PLACEHOLDER_SYMBOL]:!0},Ln),Sn),{},{anchor:In,focus:In}))}}return react.exports.useEffect(()=>{setTimeout(()=>{var{selection:wn}=Et;if(wn){var{anchor:Dn}=wn,$n=Node$4.leaf(Et,Dn.path);if(Sn&&!Text$1.equals($n,Sn,{loose:!0})){EDITOR_TO_PENDING_INSERTION_MARKS.set(Et,Sn);return}}EDITOR_TO_PENDING_INSERTION_MARKS.delete(Et)})}),Wt.createElement(ReadOnlyContext.Provider,{value:ut},Wt.createElement(DecorateContext.Provider,{value:rt},Wt.createElement(RestoreDOM,{node:Ct,receivedUserInput:kt},Wt.createElement(yt,Object.assign({role:ut?void 0:"textbox","aria-multiline":ut?void 0:!0},Tt,{spellCheck:HAS_BEFORE_INPUT_SUPPORT||!CAN_USE_DOM?Tt.spellCheck:!1,autoCorrect:HAS_BEFORE_INPUT_SUPPORT||!CAN_USE_DOM?Tt.autoCorrect:"false",autoCapitalize:HAS_BEFORE_INPUT_SUPPORT||!CAN_USE_DOM?Tt.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!ut,zindex:-1,suppressContentEditableWarning:!0,ref:Xt,style:_objectSpread$1$1(_objectSpread$1$1({},vt?{}:_objectSpread$1$1({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},Ot?{minHeight:Ot}:{})),mt),onBeforeInput:react.exports.useCallback(wn=>{if(!HAS_BEFORE_INPUT_SUPPORT&&!ut&&!isEventHandled(wn,Tt.onBeforeInput)&&ReactEditor.hasSelectableTarget(Et,wn.target)&&(wn.preventDefault(),!ReactEditor.isComposing(Et))){var Dn=wn.data;Editor$1.insertText(Et,Dn)}},[Tt.onBeforeInput,Et,ut]),onInput:react.exports.useCallback(wn=>{if(!isEventHandled(wn,Tt.onInput)){if(zt.current){zt.current.handleInput();return}for(var Dn of $t.current)Dn();$t.current=[]}},[Tt.onInput]),onBlur:react.exports.useCallback(wn=>{if(!(ut||Ft.isUpdatingSelection||!ReactEditor.hasSelectableTarget(Et,wn.target)||isEventHandled(wn,Tt.onBlur))){var Dn=ReactEditor.findDocumentOrShadowRoot(Et);if(Ft.latestElement!==Dn.activeElement){var{relatedTarget:$n}=wn,Gn=ReactEditor.toDOMNode(Et,Et);if($n!==Gn&&!(isDOMElement($n)&&$n.hasAttribute("data-slate-spacer"))){if($n!=null&&isDOMNode($n)&&ReactEditor.hasDOMNode(Et,$n)){var Jn=ReactEditor.toSlateNode(Et,$n);if(Element$2.isElement(Jn)&&!Et.isVoid(Jn))return}if(IS_WEBKIT){var zn=Dn.getSelection();zn?.removeAllRanges()}IS_FOCUSED.delete(Et)}}}},[ut,Ft.isUpdatingSelection,Ft.latestElement,Et,Tt.onBlur]),onClick:react.exports.useCallback(wn=>{if(ReactEditor.hasTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onClick)&&isDOMNode(wn.target)){var Dn=ReactEditor.toSlateNode(Et,wn.target),$n=ReactEditor.findPath(Et,Dn);if(!Editor$1.hasPath(Et,$n)||Node$4.get(Et,$n)!==Dn)return;if(wn.detail===TRIPLE_CLICK&&$n.length>=1){var Gn=$n;if(!(Element$2.isElement(Dn)&&Editor$1.isBlock(Et,Dn))){var Jn,zn=Editor$1.above(Et,{match:Nr=>Element$2.isElement(Nr)&&Editor$1.isBlock(Et,Nr),at:$n});Gn=(Jn=zn?.[1])!==null&&Jn!==void 0?Jn:$n.slice(0,1)}var Qn=Editor$1.range(Et,Gn);Transforms.select(Et,Qn);return}if(ut)return;var Bn=Editor$1.start(Et,$n),jn=Editor$1.end(Et,$n),Ar=Editor$1.void(Et,{at:Bn}),Er=Editor$1.void(Et,{at:jn});if(Ar&&Er&&Path$2.equals(Ar[1],Er[1])){var Pr=Editor$1.range(Et,Bn);Transforms.select(Et,Pr)}}},[Et,Tt.onClick,ut]),onCompositionEnd:react.exports.useCallback(wn=>{if(ReactEditor.hasSelectableTarget(Et,wn.target)){var Dn;if(ReactEditor.isComposing(Et)&&(At(!1),IS_COMPOSING.set(Et,!1)),(Dn=zt.current)===null||Dn===void 0||Dn.handleCompositionEnd(wn),isEventHandled(wn,Tt.onCompositionEnd)||IS_ANDROID)return;if(!IS_WEBKIT&&!IS_FIREFOX_LEGACY&&!IS_IOS&&!IS_WECHATBROWSER&&!IS_UC_MOBILE&&wn.data){var $n=EDITOR_TO_PENDING_INSERTION_MARKS.get(Et);EDITOR_TO_PENDING_INSERTION_MARKS.delete(Et),$n!==void 0&&(EDITOR_TO_USER_MARKS.set(Et,Et.marks),Et.marks=$n),Editor$1.insertText(Et,wn.data);var Gn=EDITOR_TO_USER_MARKS.get(Et);EDITOR_TO_USER_MARKS.delete(Et),Gn!==void 0&&(Et.marks=Gn)}}},[Tt.onCompositionEnd,Et]),onCompositionUpdate:react.exports.useCallback(wn=>{ReactEditor.hasSelectableTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onCompositionUpdate)&&(ReactEditor.isComposing(Et)||(At(!0),IS_COMPOSING.set(Et,!0)))},[Tt.onCompositionUpdate,Et]),onCompositionStart:react.exports.useCallback(wn=>{if(ReactEditor.hasSelectableTarget(Et,wn.target)){var Dn;if((Dn=zt.current)===null||Dn===void 0||Dn.handleCompositionStart(wn),isEventHandled(wn,Tt.onCompositionStart)||IS_ANDROID)return;At(!0);var{selection:$n}=Et;if($n){if(Range$1.isExpanded($n)){Editor$1.deleteFragment(Et);return}var Gn=Editor$1.above(Et,{match:Qn=>Element$2.isElement(Qn)&&Editor$1.isInline(Et,Qn),mode:"highest"});if(Gn){var[,Jn]=Gn;if(Editor$1.isEnd(Et,$n.anchor,Jn)){var zn=Editor$1.after(Et,Jn);Transforms.setSelection(Et,{anchor:zn,focus:zn})}}}}},[Tt.onCompositionStart,Et]),onCopy:react.exports.useCallback(wn=>{ReactEditor.hasSelectableTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onCopy)&&!isDOMEventTargetInput(wn)&&(wn.preventDefault(),ReactEditor.setFragmentData(Et,wn.clipboardData,"copy"))},[Tt.onCopy,Et]),onCut:react.exports.useCallback(wn=>{if(!ut&&ReactEditor.hasSelectableTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onCut)&&!isDOMEventTargetInput(wn)){wn.preventDefault(),ReactEditor.setFragmentData(Et,wn.clipboardData,"cut");var{selection:Dn}=Et;if(Dn)if(Range$1.isExpanded(Dn))Editor$1.deleteFragment(Et);else{var $n=Node$4.parent(Et,Dn.anchor.path);Editor$1.isVoid(Et,$n)&&Transforms.delete(Et)}}},[ut,Et,Tt.onCut]),onDragOver:react.exports.useCallback(wn=>{if(ReactEditor.hasTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onDragOver)){var Dn=ReactEditor.toSlateNode(Et,wn.target);Element$2.isElement(Dn)&&Editor$1.isVoid(Et,Dn)&&wn.preventDefault()}},[Tt.onDragOver,Et]),onDragStart:react.exports.useCallback(wn=>{if(!ut&&ReactEditor.hasTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onDragStart)){var Dn=ReactEditor.toSlateNode(Et,wn.target),$n=ReactEditor.findPath(Et,Dn),Gn=Element$2.isElement(Dn)&&Editor$1.isVoid(Et,Dn)||Editor$1.void(Et,{at:$n,voids:!0});if(Gn){var Jn=Editor$1.range(Et,$n);Transforms.select(Et,Jn)}Ft.isDraggingInternally=!0,ReactEditor.setFragmentData(Et,wn.dataTransfer,"drag")}},[ut,Et,Tt.onDragStart,Ft]),onDrop:react.exports.useCallback(wn=>{if(!ut&&ReactEditor.hasTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onDrop)){wn.preventDefault();var Dn=Et.selection,$n=ReactEditor.findEventRange(Et,wn),Gn=wn.dataTransfer;Transforms.select(Et,$n),Ft.isDraggingInternally&&Dn&&!Range$1.equals(Dn,$n)&&!Editor$1.void(Et,{at:$n,voids:!0})&&Transforms.delete(Et,{at:Dn}),ReactEditor.insertData(Et,Gn),ReactEditor.isFocused(Et)||ReactEditor.focus(Et)}Ft.isDraggingInternally=!1},[ut,Et,Tt.onDrop,Ft]),onDragEnd:react.exports.useCallback(wn=>{!ut&&Ft.isDraggingInternally&&Tt.onDragEnd&&ReactEditor.hasTarget(Et,wn.target)&&Tt.onDragEnd(wn),Ft.isDraggingInternally=!1},[ut,Ft,Tt,Et]),onFocus:react.exports.useCallback(wn=>{if(!ut&&!Ft.isUpdatingSelection&&ReactEditor.hasEditableTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onFocus)){var Dn=ReactEditor.toDOMNode(Et,Et),$n=ReactEditor.findDocumentOrShadowRoot(Et);if(Ft.latestElement=$n.activeElement,IS_FIREFOX&&wn.target!==Dn){Dn.focus();return}IS_FOCUSED.set(Et,!0)}},[ut,Ft,Et,Tt.onFocus]),onKeyDown:react.exports.useCallback(wn=>{if(!ut&&ReactEditor.hasEditableTarget(Et,wn.target)){var Dn;(Dn=zt.current)===null||Dn===void 0||Dn.handleKeyDown(wn);var{nativeEvent:$n}=wn;if(ReactEditor.isComposing(Et)&&$n.isComposing===!1&&(IS_COMPOSING.set(Et,!1),At(!1)),isEventHandled(wn,Tt.onKeyDown)||ReactEditor.isComposing(Et))return;var{selection:Gn}=Et,Jn=Et.children[Gn!==null?Gn.focus.path[0]:0],zn=direction_1(Node$4.string(Jn))==="rtl";if(Hotkeys.isRedo($n)){wn.preventDefault();var Qn=Et;typeof Qn.redo=="function"&&Qn.redo();return}if(Hotkeys.isUndo($n)){wn.preventDefault();var Bn=Et;typeof Bn.undo=="function"&&Bn.undo();return}if(Hotkeys.isMoveLineBackward($n)){wn.preventDefault(),Transforms.move(Et,{unit:"line",reverse:!0});return}if(Hotkeys.isMoveLineForward($n)){wn.preventDefault(),Transforms.move(Et,{unit:"line"});return}if(Hotkeys.isExtendLineBackward($n)){wn.preventDefault(),Transforms.move(Et,{unit:"line",edge:"focus",reverse:!0});return}if(Hotkeys.isExtendLineForward($n)){wn.preventDefault(),Transforms.move(Et,{unit:"line",edge:"focus"});return}if(Hotkeys.isMoveBackward($n)){wn.preventDefault(),Gn&&Range$1.isCollapsed(Gn)?Transforms.move(Et,{reverse:!zn}):Transforms.collapse(Et,{edge:"start"});return}if(Hotkeys.isMoveForward($n)){wn.preventDefault(),Gn&&Range$1.isCollapsed(Gn)?Transforms.move(Et,{reverse:zn}):Transforms.collapse(Et,{edge:"end"});return}if(Hotkeys.isMoveWordBackward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)&&Transforms.collapse(Et,{edge:"focus"}),Transforms.move(Et,{unit:"word",reverse:!zn});return}if(Hotkeys.isMoveWordForward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)&&Transforms.collapse(Et,{edge:"focus"}),Transforms.move(Et,{unit:"word",reverse:zn});return}if(HAS_BEFORE_INPUT_SUPPORT){if((IS_CHROME||IS_WEBKIT)&&Gn&&(Hotkeys.isDeleteBackward($n)||Hotkeys.isDeleteForward($n))&&Range$1.isCollapsed(Gn)){var jn=Node$4.parent(Et,Gn.anchor.path);if(Element$2.isElement(jn)&&Editor$1.isVoid(Et,jn)&&(Editor$1.isInline(Et,jn)||Editor$1.isBlock(Et,jn))){wn.preventDefault(),Editor$1.deleteBackward(Et,{unit:"block"});return}}}else{if(Hotkeys.isBold($n)||Hotkeys.isItalic($n)||Hotkeys.isTransposeCharacter($n)){wn.preventDefault();return}if(Hotkeys.isSoftBreak($n)){wn.preventDefault(),Editor$1.insertSoftBreak(Et);return}if(Hotkeys.isSplitBlock($n)){wn.preventDefault(),Editor$1.insertBreak(Et);return}if(Hotkeys.isDeleteBackward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)?Editor$1.deleteFragment(Et,{direction:"backward"}):Editor$1.deleteBackward(Et);return}if(Hotkeys.isDeleteForward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)?Editor$1.deleteFragment(Et,{direction:"forward"}):Editor$1.deleteForward(Et);return}if(Hotkeys.isDeleteLineBackward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)?Editor$1.deleteFragment(Et,{direction:"backward"}):Editor$1.deleteBackward(Et,{unit:"line"});return}if(Hotkeys.isDeleteLineForward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)?Editor$1.deleteFragment(Et,{direction:"forward"}):Editor$1.deleteForward(Et,{unit:"line"});return}if(Hotkeys.isDeleteWordBackward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)?Editor$1.deleteFragment(Et,{direction:"backward"}):Editor$1.deleteBackward(Et,{unit:"word"});return}if(Hotkeys.isDeleteWordForward($n)){wn.preventDefault(),Gn&&Range$1.isExpanded(Gn)?Editor$1.deleteFragment(Et,{direction:"forward"}):Editor$1.deleteForward(Et,{unit:"word"});return}}}},[ut,Et,Tt.onKeyDown]),onPaste:react.exports.useCallback(wn=>{!ut&&ReactEditor.hasEditableTarget(Et,wn.target)&&!isEventHandled(wn,Tt.onPaste)&&(!HAS_BEFORE_INPUT_SUPPORT||isPlainTextOnlyPaste(wn.nativeEvent)||IS_WEBKIT)&&(wn.preventDefault(),ReactEditor.insertData(Et,wn.clipboardData))},[ut,Et,Tt.onPaste])}),Wt.createElement(Children,{decorations:Jt,node:Et,renderElement:ct,renderPlaceholder:pt,renderLeaf:ft,selection:Et.selection})))))},DefaultPlaceholder=et=>{var{attributes:tt,children:nt}=et;return Wt.createElement("span",Object.assign({},tt),nt,IS_ANDROID&&Wt.createElement("br",null))},defaultDecorate=()=>[],defaultScrollSelectionIntoView=(et,tt)=>{if(tt.getBoundingClientRect&&(!et.selection||et.selection&&Range$1.isCollapsed(et.selection))){var nt=tt.startContainer.parentElement;nt.getBoundingClientRect=tt.getBoundingClientRect.bind(tt),scrollIntoView$2(nt,{scrollMode:"if-needed"}),delete nt.getBoundingClientRect}},isEventHandled=(et,tt)=>{if(!tt)return!1;var nt=tt(et);return nt??(et.isDefaultPrevented()||et.isPropagationStopped())},isDOMEventTargetInput=et=>isDOMNode(et.target)&&(et.target instanceof HTMLInputElement||et.target instanceof HTMLTextAreaElement),isDOMEventHandled=(et,tt)=>{if(!tt)return!1;var nt=tt(et);return nt??et.defaultPrevented},FocusedContext=react.exports.createContext(!1),useFocused=()=>react.exports.useContext(FocusedContext),SlateSelectorContext=react.exports.createContext({});function useSelectorContext(et){var tt=react.exports.useRef([]).current,nt=react.exports.useRef({editor:et}).current,rt=react.exports.useCallback(st=>{nt.editor=st,tt.forEach(ut=>ut(st))},[tt,nt]),ot=react.exports.useMemo(()=>({getSlate:()=>nt.editor,addEventListener:st=>(tt.push(st),()=>{tt.splice(tt.indexOf(st),1)})}),[tt,nt]);return{selectorContext:ot,onChange:rt}}var _excluded$4=["editor","children","onChange","initialValue"],Slate=et=>{var{editor:tt,children:nt,onChange:rt,initialValue:ot}=et,st=_objectWithoutProperties$1(et,_excluded$4),ut=react.exports.useRef(!1),[ct,ft]=Wt.useState(()=>{if(!Node$4.isNodeList(ot))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Scrubber.stringify(ot)));if(!Editor$1.isEditor(tt))throw new Error("[Slate] editor is invalid! You passed: ".concat(Scrubber.stringify(tt)));return tt.children=ot,Object.assign(tt,st),{v:0,editor:tt}}),{selectorContext:pt,onChange:ht}=useSelectorContext(tt),mt=react.exports.useCallback(()=>{rt&&rt(tt.children),ft(Tt=>({v:Tt.v+1,editor:tt})),ht(tt)},[tt,ht,rt]);react.exports.useEffect(()=>(EDITOR_TO_ON_CHANGE.set(tt,mt),()=>{EDITOR_TO_ON_CHANGE.set(tt,()=>{}),ut.current=!0}),[tt,mt]);var[yt,vt]=react.exports.useState(ReactEditor.isFocused(tt));return react.exports.useEffect(()=>{vt(ReactEditor.isFocused(tt))},[tt]),useIsomorphicLayoutEffect(()=>{var Tt=()=>vt(ReactEditor.isFocused(tt));return REACT_MAJOR_VERSION>=17?(document.addEventListener("focusin",Tt),document.addEventListener("focusout",Tt),()=>{document.removeEventListener("focusin",Tt),document.removeEventListener("focusout",Tt)}):(document.addEventListener("focus",Tt,!0),document.addEventListener("blur",Tt,!0),()=>{document.removeEventListener("focus",Tt,!0),document.removeEventListener("blur",Tt,!0)})},[]),Wt.createElement(SlateSelectorContext.Provider,{value:pt},Wt.createElement(SlateContext.Provider,{value:ct},Wt.createElement(EditorContext.Provider,{value:ct.editor},Wt.createElement(FocusedContext.Provider,{value:yt},nt))))},doRectsIntersect=(et,tt)=>{var nt=(tt.top+tt.bottom)/2;return et.top<=nt&&et.bottom>=nt},areRangesSameLine=(et,tt,nt)=>{var rt=ReactEditor.toDOMRange(et,tt).getBoundingClientRect(),ot=ReactEditor.toDOMRange(et,nt).getBoundingClientRect();return doRectsIntersect(rt,ot)&&doRectsIntersect(ot,rt)},findCurrentLineRange=(et,tt)=>{var nt=Editor$1.range(et,Range$1.end(tt)),rt=Array.from(Editor$1.positions(et,{at:tt})),ot=0,st=rt.length,ut=Math.floor(st/2);if(areRangesSameLine(et,Editor$1.range(et,rt[ot]),nt))return Editor$1.range(et,rt[ot],nt);if(rt.length<2)return Editor$1.range(et,rt[rt.length-1],nt);for(;ut!==rt.length&&ut!==ot;)areRangesSameLine(et,Editor$1.range(et,rt[ut]),nt)?st=ut:ot=ut,ut=Math.floor((ot+st)/2);return Editor$1.range(et,rt[st],nt)};function ownKeys$c(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$c(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$c(Object(nt),!0).forEach(function(rt){_defineProperty$9(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$c(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var withReact=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",rt=tt,{apply:ot,onChange:st,deleteBackward:ut,addMark:ct,removeMark:ft}=rt;return EDITOR_TO_KEY_TO_ELEMENT.set(rt,new WeakMap),rt.addMark=(pt,ht)=>{var mt,yt;(mt=EDITOR_TO_SCHEDULE_FLUSH.get(rt))===null||mt===void 0||mt(),!EDITOR_TO_PENDING_INSERTION_MARKS.get(rt)&&(yt=EDITOR_TO_PENDING_DIFFS.get(rt))!==null&&yt!==void 0&&yt.length&&EDITOR_TO_PENDING_INSERTION_MARKS.set(rt,null),EDITOR_TO_USER_MARKS.delete(rt),ct(pt,ht)},rt.removeMark=pt=>{var ht;!EDITOR_TO_PENDING_INSERTION_MARKS.get(rt)&&(ht=EDITOR_TO_PENDING_DIFFS.get(rt))!==null&&ht!==void 0&&ht.length&&EDITOR_TO_PENDING_INSERTION_MARKS.set(rt,null),EDITOR_TO_USER_MARKS.delete(rt),ft(pt)},rt.deleteBackward=pt=>{if(pt!=="line")return ut(pt);if(rt.selection&&Range$1.isCollapsed(rt.selection)){var ht=Editor$1.above(rt,{match:Tt=>Element$2.isElement(Tt)&&Editor$1.isBlock(rt,Tt),at:rt.selection});if(ht){var[,mt]=ht,yt=Editor$1.range(rt,mt,rt.selection.anchor),vt=findCurrentLineRange(rt,yt);Range$1.isCollapsed(vt)||Transforms.delete(rt,{at:vt})}}},rt.apply=pt=>{var ht=[],mt=EDITOR_TO_PENDING_DIFFS.get(rt);if(mt!=null&&mt.length){var yt=mt.map(It=>transformTextDiff(It,pt)).filter(Boolean);EDITOR_TO_PENDING_DIFFS.set(rt,yt)}var vt=EDITOR_TO_PENDING_SELECTION.get(rt);vt&&EDITOR_TO_PENDING_SELECTION.set(rt,transformPendingRange(rt,vt,pt));var Tt=EDITOR_TO_PENDING_ACTION.get(rt);if(Tt!=null&&Tt.at){var Et=Point$1.isPoint(Tt?.at)?transformPendingPoint(rt,Tt.at,pt):transformPendingRange(rt,Tt.at,pt);EDITOR_TO_PENDING_ACTION.set(rt,Et?_objectSpread$c(_objectSpread$c({},Tt),{},{at:Et}):null)}switch(pt.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{ht.push(...getMatches(rt,pt.path));break}case"set_selection":{var xt;(xt=EDITOR_TO_USER_SELECTION.get(rt))===null||xt===void 0||xt.unref(),EDITOR_TO_USER_SELECTION.delete(rt);break}case"insert_node":case"remove_node":{ht.push(...getMatches(rt,Path$2.parent(pt.path)));break}case"merge_node":{var At=Path$2.previous(pt.path);ht.push(...getMatches(rt,At));break}case"move_node":{var Ct=Path$2.common(Path$2.parent(pt.path),Path$2.parent(pt.newPath));ht.push(...getMatches(rt,Ct));break}}ot(pt);for(var[$t,Ot]of ht){var[Rt]=Editor$1.node(rt,$t);NODE_TO_KEY.set(Rt,Ot)}},rt.setFragmentData=pt=>{var{selection:ht}=rt;if(!!ht){var[mt,yt]=Range$1.edges(ht),vt=Editor$1.void(rt,{at:mt.path}),Tt=Editor$1.void(rt,{at:yt.path});if(!(Range$1.isCollapsed(ht)&&!vt)){var Et=ReactEditor.toDOMRange(rt,ht),xt=Et.cloneContents(),At=xt.childNodes[0];if(xt.childNodes.forEach(zt=>{zt.textContent&&zt.textContent.trim()!==""&&(At=zt)}),Tt){var[Ct]=Tt,$t=Et.cloneRange(),Ot=ReactEditor.toDOMNode(rt,Ct);$t.setEndAfter(Ot),xt=$t.cloneContents()}if(vt&&(At=xt.querySelector("[data-slate-spacer]")),Array.from(xt.querySelectorAll("[data-slate-zero-width]")).forEach(zt=>{var Vt=zt.getAttribute("data-slate-zero-width")==="n";zt.textContent=Vt?`
`:""}),isDOMText(At)){var Rt=At.ownerDocument.createElement("span");Rt.style.whiteSpace="pre",Rt.appendChild(At),xt.appendChild(Rt),At=Rt}var It=rt.getFragment(),kt=JSON.stringify(It),Mt=window.btoa(encodeURIComponent(kt));At.setAttribute("data-slate-fragment",Mt),pt.setData("application/".concat(nt),Mt);var Ft=xt.ownerDocument.createElement("div");return Ft.appendChild(xt),Ft.setAttribute("hidden","true"),xt.ownerDocument.body.appendChild(Ft),pt.setData("text/html",Ft.innerHTML),pt.setData("text/plain",getPlainText(Ft)),xt.ownerDocument.body.removeChild(Ft),pt}}},rt.insertData=pt=>{rt.insertFragmentData(pt)||rt.insertTextData(pt)},rt.insertFragmentData=pt=>{var ht=pt.getData("application/".concat(nt))||getSlateFragmentAttribute(pt);if(ht){var mt=decodeURIComponent(window.atob(ht)),yt=JSON.parse(mt);return rt.insertFragment(yt),!0}return!1},rt.insertTextData=pt=>{var ht=pt.getData("text/plain");if(ht){var mt=ht.split(/\r\n|\r|\n/),yt=!1;for(var vt of mt)yt&&Transforms.splitNodes(rt,{always:!0}),rt.insertText(vt),yt=!0;return!0}return!1},rt.onChange=pt=>{var ht=REACT_MAJOR_VERSION<18?ReactDOM.unstable_batchedUpdates:mt=>mt();ht(()=>{var mt=EDITOR_TO_ON_CHANGE.get(rt);mt&&mt(),st(pt)})},rt},getMatches=(et,tt)=>{var nt=[];for(var[rt,ot]of Editor$1.levels(et,{at:tt})){var st=ReactEditor.findKey(et,rt);nt.push([ot,st])}return nt};const consoleLog=(...et)=>{},CONSTRUCTOR_OP_NAMES=["list","get","dict","timestamp"],CLIENT_MUTATE_OK_ACCESSOR_OP_NAMES=["pick","Object-__getattr__","index"],callResolverSimple=(et,tt,nt)=>{const ot=StaticOpStore.getInstance().getOpDef(et);if(!opDefIsLowLevel(ot))throw new Error("opDef is not low level "+ot.name);const st=ot.resolver(tt,null,{op:nt,outputNode:null},null,null);if(st&&typeof st.then=="function")throw new Error("resolver returned a promise for op "+et);return st},constructorSplit=et=>{et=et??[];const tt=[],nt=[];let rt=!0;for(const ot of et){const st=CLIENT_MUTATE_OK_ACCESSOR_OP_NAMES.includes(ot.fromOp.name);if(rt&&isConstructor(ot))tt.push(ot);else if(rt&&st)rt=!1,nt.push(ot);else if(!rt&&CLIENT_MUTATE_OK_ACCESSOR_OP_NAMES.includes(ot.fromOp.name))nt.push(ot);else return null}return{constructorNodes:tt,accessorNodes:nt}},clientSet=(et,tt)=>{const nt=linearize(et),rt=constructorSplit(nt);if(rt==null)return{ok:!1};const{accessorNodes:ot}=rt;if(ot.length===0)return{ok:!0,value:tt};let st=Object.values(ot[0].fromOp.inputs)[0];const ut=[];for(const ft of ot){const pt={...ft.fromOp.inputs};pt[Object.keys(pt)[0]]=st,st=callResolverSimple(ft.fromOp.name,pt,ft.fromOp),ut.push(pt)}let ct=tt;for(let ft=ot.length-1;ft>=0;ft--){const pt=ot[ft],ht=Object.values(ut[ft]);(pt.fromOp.name==="pick"||pt.fromOp.name==="Object-__getattr__"||pt.fromOp.name==="index")&&(ht[0][ht[1].val]=ct),ct=ht[0]}return ct};function getChainRootVar(et){if(et.nodeType!=="void")return findChainedAncestor(et,tt=>tt.nodeType==="var",tt=>!isConstructor(tt))}function isConstructor(et){return et.nodeType==="const"||et.nodeType==="output"&&CONSTRUCTOR_OP_NAMES.includes(et.fromOp.name)}function getChainRootConstructor(et){if(et.nodeType!=="void")return findChainedAncestor(et,tt=>isConstructor(tt),tt=>!isConstructor(tt))}function replaceChainRoot(et,tt){if(et.nodeType==="output"){const nt=getChainRootConstructor(et);if(nt==null)throw new Error("no chain root found");return replaceNode(et,nt,tt)}return tt}const propagateExpressionEvent=(et,tt,nt,rt,ot)=>{const st=ct=>{if(rt==="chain"){const ft=getChainRootVar(ct);return ft?[ft]:[]}return getFreeVars(ct)},ut=st(et);for(const ct of ut){const ft=resolveVar(nt,ct.varName);if(ft!=null){const{closure:pt,entry:ht}=ft,{stack:mt,value:yt}=pt,{handleVarEvent:vt}=ht;ot==="root"?st(yt).length===0?vt?.(ct.varName,yt,tt):propagateExpressionEvent(yt,tt,mt,rt,ot):(vt?.(ct.varName,yt,tt),propagateExpressionEvent(et,tt,nt,rt,ot))}}console.groupEnd()},PanelContext=Wt.createContext(null);PanelContext.displayName="PanelContext";const DEFAULT_CONTEXT={frame:{},lastFrame:{},stack:[],path:[],inPanelMaybe:!1,triggerExpressionEvent:()=>{}};function usePanelContext(){return react.exports.useContext(PanelContext)??DEFAULT_CONTEXT}const PanelContextProvider=Wt.memo(({newVars:et,newPath:tt,selectedPath:nt,children:rt,inPanelMaybe:ot,handleVarEvent:st,dashboardConfigOptions:ut})=>{et=et??{},et=useDeepMemo$1(et);const{frame:ct,stack:ft,path:pt,selectedPath:ht}=usePanelContext(),mt=react.exports.useMemo(()=>tt?pt.concat(tt):pt,[tt,pt]),yt=react.exports.useMemo(()=>({...ct,...et}),[ct,et]),vt=react.exports.useMemo(()=>pushFrame(ft,et??{},{handleVarEvent:st}),[st,et,ft]),Tt=react.exports.useCallback((xt,At,Ct,$t)=>propagateExpressionEvent(xt,At,vt,Ct,$t),[vt]),Et=react.exports.useMemo(()=>({frame:yt,lastFrame:et??{},stack:vt,path:mt,selectedPath:nt??ht,inPanelMaybe:ot??!1,triggerExpressionEvent:Tt,dashboardConfigOptions:ut}),[yt,et,vt,mt,nt,ht,ot,Tt,ut]);return Wt.createElement(PanelContext.Provider,{value:Et},rt)});PanelContextProvider.displayName="PanelContextProvider";function getAlignment(et){return et.split("-")[1]}function getLengthFromAxis(et){return et==="y"?"height":"width"}function getSide(et){return et.split("-")[0]}function getMainAxisFromPlacement(et){return["top","bottom"].includes(getSide(et))?"x":"y"}function computeCoordsFromPlacement(et,tt,nt){let{reference:rt,floating:ot}=et;const st=rt.x+rt.width/2-ot.width/2,ut=rt.y+rt.height/2-ot.height/2,ct=getMainAxisFromPlacement(tt),ft=getLengthFromAxis(ct),pt=rt[ft]/2-ot[ft]/2,ht=getSide(tt),mt=ct==="x";let yt;switch(ht){case"top":yt={x:st,y:rt.y-ot.height};break;case"bottom":yt={x:st,y:rt.y+rt.height};break;case"right":yt={x:rt.x+rt.width,y:ut};break;case"left":yt={x:rt.x-ot.width,y:ut};break;default:yt={x:rt.x,y:rt.y}}switch(getAlignment(tt)){case"start":yt[ct]-=pt*(nt&&mt?-1:1);break;case"end":yt[ct]+=pt*(nt&&mt?-1:1);break}return yt}const computePosition$1=async(et,tt,nt)=>{const{placement:rt="bottom",strategy:ot="absolute",middleware:st=[],platform:ut}=nt,ct=st.filter(Boolean),ft=await(ut.isRTL==null?void 0:ut.isRTL(tt));let pt=await ut.getElementRects({reference:et,floating:tt,strategy:ot}),{x:ht,y:mt}=computeCoordsFromPlacement(pt,rt,ft),yt=rt,vt={},Tt=0;for(let Et=0;Et<ct.length;Et++){const{name:xt,fn:At}=ct[Et],{x:Ct,y:$t,data:Ot,reset:Rt}=await At({x:ht,y:mt,initialPlacement:rt,placement:yt,strategy:ot,middlewareData:vt,rects:pt,platform:ut,elements:{reference:et,floating:tt}});if(ht=Ct??ht,mt=$t??mt,vt={...vt,[xt]:{...vt[xt],...Ot}},Rt&&Tt<=50){Tt++,typeof Rt=="object"&&(Rt.placement&&(yt=Rt.placement),Rt.rects&&(pt=Rt.rects===!0?await ut.getElementRects({reference:et,floating:tt,strategy:ot}):Rt.rects),{x:ht,y:mt}=computeCoordsFromPlacement(pt,yt,ft)),Et=-1;continue}}return{x:ht,y:mt,placement:yt,strategy:ot,middlewareData:vt}};function evaluate$1(et,tt){return typeof et=="function"?et(tt):et}function expandPaddingObject(et){return{top:0,right:0,bottom:0,left:0,...et}}function getSideObjectFromPadding(et){return typeof et!="number"?expandPaddingObject(et):{top:et,right:et,bottom:et,left:et}}function rectToClientRect(et){return{...et,top:et.y,left:et.x,right:et.x+et.width,bottom:et.y+et.height}}async function detectOverflow(et,tt){var nt;tt===void 0&&(tt={});const{x:rt,y:ot,platform:st,rects:ut,elements:ct,strategy:ft}=et,{boundary:pt="clippingAncestors",rootBoundary:ht="viewport",elementContext:mt="floating",altBoundary:yt=!1,padding:vt=0}=evaluate$1(tt,et),Tt=getSideObjectFromPadding(vt),xt=ct[yt?mt==="floating"?"reference":"floating":mt],At=rectToClientRect(await st.getClippingRect({element:(nt=await(st.isElement==null?void 0:st.isElement(xt)))==null||nt?xt:xt.contextElement||await(st.getDocumentElement==null?void 0:st.getDocumentElement(ct.floating)),boundary:pt,rootBoundary:ht,strategy:ft})),Ct=mt==="floating"?{...ut.floating,x:rt,y:ot}:ut.reference,$t=await(st.getOffsetParent==null?void 0:st.getOffsetParent(ct.floating)),Ot=await(st.isElement==null?void 0:st.isElement($t))?await(st.getScale==null?void 0:st.getScale($t))||{x:1,y:1}:{x:1,y:1},Rt=rectToClientRect(st.convertOffsetParentRelativeRectToViewportRelativeRect?await st.convertOffsetParentRelativeRectToViewportRelativeRect({rect:Ct,offsetParent:$t,strategy:ft}):Ct);return{top:(At.top-Rt.top+Tt.top)/Ot.y,bottom:(Rt.bottom-At.bottom+Tt.bottom)/Ot.y,left:(At.left-Rt.left+Tt.left)/Ot.x,right:(Rt.right-At.right+Tt.right)/Ot.x}}const min$5=Math.min,max$5=Math.max;function within$1(et,tt,nt){return max$5(et,min$5(tt,nt))}const oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement$1(et){return et.replace(/left|right|bottom|top/g,tt=>oppositeSideMap[tt])}function getAlignmentSides(et,tt,nt){nt===void 0&&(nt=!1);const rt=getAlignment(et),ot=getMainAxisFromPlacement(et),st=getLengthFromAxis(ot);let ut=ot==="x"?rt===(nt?"end":"start")?"right":"left":rt==="start"?"bottom":"top";return tt.reference[st]>tt.floating[st]&&(ut=getOppositePlacement$1(ut)),{main:ut,cross:getOppositePlacement$1(ut)}}const oppositeAlignmentMap={start:"end",end:"start"};function getOppositeAlignmentPlacement(et){return et.replace(/start|end/g,tt=>oppositeAlignmentMap[tt])}function getExpandedPlacements(et){const tt=getOppositePlacement$1(et);return[getOppositeAlignmentPlacement(et),tt,getOppositeAlignmentPlacement(tt)]}function getSideList(et,tt,nt){const rt=["left","right"],ot=["right","left"],st=["top","bottom"],ut=["bottom","top"];switch(et){case"top":case"bottom":return nt?tt?ot:rt:tt?rt:ot;case"left":case"right":return tt?st:ut;default:return[]}}function getOppositeAxisPlacements(et,tt,nt,rt){const ot=getAlignment(et);let st=getSideList(getSide(et),nt==="start",rt);return ot&&(st=st.map(ut=>ut+"-"+ot),tt&&(st=st.concat(st.map(getOppositeAlignmentPlacement)))),st}const flip$2=function(et){return et===void 0&&(et={}),{name:"flip",options:et,async fn(tt){var nt;const{placement:rt,middlewareData:ot,rects:st,initialPlacement:ut,platform:ct,elements:ft}=tt,{mainAxis:pt=!0,crossAxis:ht=!0,fallbackPlacements:mt,fallbackStrategy:yt="bestFit",fallbackAxisSideDirection:vt="none",flipAlignment:Tt=!0,...Et}=evaluate$1(et,tt),xt=getSide(rt),At=getSide(ut)===ut,Ct=await(ct.isRTL==null?void 0:ct.isRTL(ft.floating)),$t=mt||(At||!Tt?[getOppositePlacement$1(ut)]:getExpandedPlacements(ut));!mt&&vt!=="none"&&$t.push(...getOppositeAxisPlacements(ut,Tt,vt,Ct));const Ot=[ut,...$t],Rt=await detectOverflow(tt,Et),It=[];let kt=((nt=ot.flip)==null?void 0:nt.overflows)||[];if(pt&&It.push(Rt[xt]),ht){const{main:Vt,cross:Zt}=getAlignmentSides(rt,st,Ct);It.push(Rt[Vt],Rt[Zt])}if(kt=[...kt,{placement:rt,overflows:It}],!It.every(Vt=>Vt<=0)){var Mt,Ft;const Vt=(((Mt=ot.flip)==null?void 0:Mt.index)||0)+1,Zt=Ot[Vt];if(Zt)return{data:{index:Vt,overflows:kt},reset:{placement:Zt}};let Ut=(Ft=kt.filter(Xt=>Xt.overflows[0]<=0).sort((Xt,Jt)=>Xt.overflows[1]-Jt.overflows[1])[0])==null?void 0:Ft.placement;if(!Ut)switch(yt){case"bestFit":{var zt;const Xt=(zt=kt.map(Jt=>[Jt.placement,Jt.overflows.filter(gn=>gn>0).reduce((gn,An)=>gn+An,0)]).sort((Jt,gn)=>Jt[1]-gn[1])[0])==null?void 0:zt[0];Xt&&(Ut=Xt);break}case"initialPlacement":Ut=ut;break}if(rt!==Ut)return{reset:{placement:Ut}}}return{}}}};async function convertValueToCoords(et,tt){const{placement:nt,platform:rt,elements:ot}=et,st=await(rt.isRTL==null?void 0:rt.isRTL(ot.floating)),ut=getSide(nt),ct=getAlignment(nt),ft=getMainAxisFromPlacement(nt)==="x",pt=["left","top"].includes(ut)?-1:1,ht=st&&ft?-1:1,mt=evaluate$1(tt,et);let{mainAxis:yt,crossAxis:vt,alignmentAxis:Tt}=typeof mt=="number"?{mainAxis:mt,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...mt};return ct&&typeof Tt=="number"&&(vt=ct==="end"?Tt*-1:Tt),ft?{x:vt*ht,y:yt*pt}:{x:yt*pt,y:vt*ht}}const offset$4=function(et){return et===void 0&&(et=0),{name:"offset",options:et,async fn(tt){const{x:nt,y:rt}=tt,ot=await convertValueToCoords(tt,et);return{x:nt+ot.x,y:rt+ot.y,data:ot}}}};function getCrossAxis(et){return et==="x"?"y":"x"}const shift$1=function(et){return et===void 0&&(et={}),{name:"shift",options:et,async fn(tt){const{x:nt,y:rt,placement:ot}=tt,{mainAxis:st=!0,crossAxis:ut=!1,limiter:ct={fn:xt=>{let{x:At,y:Ct}=xt;return{x:At,y:Ct}}},...ft}=evaluate$1(et,tt),pt={x:nt,y:rt},ht=await detectOverflow(tt,ft),mt=getMainAxisFromPlacement(getSide(ot)),yt=getCrossAxis(mt);let vt=pt[mt],Tt=pt[yt];if(st){const xt=mt==="y"?"top":"left",At=mt==="y"?"bottom":"right",Ct=vt+ht[xt],$t=vt-ht[At];vt=within$1(Ct,vt,$t)}if(ut){const xt=yt==="y"?"top":"left",At=yt==="y"?"bottom":"right",Ct=Tt+ht[xt],$t=Tt-ht[At];Tt=within$1(Ct,Tt,$t)}const Et=ct.fn({...tt,[mt]:vt,[yt]:Tt});return{...Et,data:{x:Et.x-nt,y:Et.y-rt}}}}};function getWindow$1(et){var tt;return(et==null||(tt=et.ownerDocument)==null?void 0:tt.defaultView)||window}function getComputedStyle$1(et){return getWindow$1(et).getComputedStyle(et)}function isNode$1(et){return et instanceof getWindow$1(et).Node}function getNodeName(et){return isNode$1(et)?(et.nodeName||"").toLowerCase():"#document"}function isHTMLElement(et){return et instanceof getWindow$1(et).HTMLElement}function isShadowRoot(et){return typeof ShadowRoot>"u"?!1:et instanceof getWindow$1(et).ShadowRoot||et instanceof ShadowRoot}function isOverflowElement(et){const{overflow:tt,overflowX:nt,overflowY:rt,display:ot}=getComputedStyle$1(et);return/auto|scroll|overlay|hidden|clip/.test(tt+rt+nt)&&!["inline","contents"].includes(ot)}function isTableElement(et){return["table","td","th"].includes(getNodeName(et))}function isContainingBlock(et){const tt=isSafari(),nt=getComputedStyle$1(et);return nt.transform!=="none"||nt.perspective!=="none"||(nt.containerType?nt.containerType!=="normal":!1)||!tt&&(nt.backdropFilter?nt.backdropFilter!=="none":!1)||!tt&&(nt.filter?nt.filter!=="none":!1)||["transform","perspective","filter"].some(rt=>(nt.willChange||"").includes(rt))||["paint","layout","strict","content"].some(rt=>(nt.contain||"").includes(rt))}function isSafari(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(et){return["html","body","#document"].includes(getNodeName(et))}const min$4=Math.min,max$4=Math.max,round$2=Math.round,createCoords=et=>({x:et,y:et});function getCssDimensions(et){const tt=getComputedStyle$1(et);let nt=parseFloat(tt.width)||0,rt=parseFloat(tt.height)||0;const ot=isHTMLElement(et),st=ot?et.offsetWidth:nt,ut=ot?et.offsetHeight:rt,ct=round$2(nt)!==st||round$2(rt)!==ut;return ct&&(nt=st,rt=ut),{width:nt,height:rt,$:ct}}function isElement$1(et){return et instanceof getWindow$1(et).Element}function unwrapElement(et){return isElement$1(et)?et:et.contextElement}function getScale$2(et){const tt=unwrapElement(et);if(!isHTMLElement(tt))return createCoords(1);const nt=tt.getBoundingClientRect(),{width:rt,height:ot,$:st}=getCssDimensions(tt);let ut=(st?round$2(nt.width):nt.width)/rt,ct=(st?round$2(nt.height):nt.height)/ot;return(!ut||!Number.isFinite(ut))&&(ut=1),(!ct||!Number.isFinite(ct))&&(ct=1),{x:ut,y:ct}}const noOffsets=createCoords(0);function getVisualOffsets(et){const tt=getWindow$1(et);return!isSafari()||!tt.visualViewport?noOffsets:{x:tt.visualViewport.offsetLeft,y:tt.visualViewport.offsetTop}}function shouldAddVisualOffsets(et,tt,nt){return tt===void 0&&(tt=!1),!nt||tt&&nt!==getWindow$1(et)?!1:tt}function getBoundingClientRect$1(et,tt,nt,rt){tt===void 0&&(tt=!1),nt===void 0&&(nt=!1);const ot=et.getBoundingClientRect(),st=unwrapElement(et);let ut=createCoords(1);tt&&(rt?isElement$1(rt)&&(ut=getScale$2(rt)):ut=getScale$2(et));const ct=shouldAddVisualOffsets(st,nt,rt)?getVisualOffsets(st):createCoords(0);let ft=(ot.left+ct.x)/ut.x,pt=(ot.top+ct.y)/ut.y,ht=ot.width/ut.x,mt=ot.height/ut.y;if(st){const yt=getWindow$1(st),vt=rt&&isElement$1(rt)?getWindow$1(rt):rt;let Tt=yt.frameElement;for(;Tt&&rt&&vt!==yt;){const Et=getScale$2(Tt),xt=Tt.getBoundingClientRect(),At=getComputedStyle(Tt),Ct=xt.left+(Tt.clientLeft+parseFloat(At.paddingLeft))*Et.x,$t=xt.top+(Tt.clientTop+parseFloat(At.paddingTop))*Et.y;ft*=Et.x,pt*=Et.y,ht*=Et.x,mt*=Et.y,ft+=Ct,pt+=$t,Tt=getWindow$1(Tt).frameElement}}return rectToClientRect({width:ht,height:mt,x:ft,y:pt})}function getNodeScroll(et){return isElement$1(et)?{scrollLeft:et.scrollLeft,scrollTop:et.scrollTop}:{scrollLeft:et.pageXOffset,scrollTop:et.pageYOffset}}function getDocumentElement(et){return((isNode$1(et)?et.ownerDocument:et.document)||window.document).documentElement}function convertOffsetParentRelativeRectToViewportRelativeRect(et){let{rect:tt,offsetParent:nt,strategy:rt}=et;const ot=isHTMLElement(nt),st=getDocumentElement(nt);if(nt===st)return tt;let ut={scrollLeft:0,scrollTop:0},ct=createCoords(1);const ft=createCoords(0);if((ot||!ot&&rt!=="fixed")&&((getNodeName(nt)!=="body"||isOverflowElement(st))&&(ut=getNodeScroll(nt)),isHTMLElement(nt))){const pt=getBoundingClientRect$1(nt);ct=getScale$2(nt),ft.x=pt.x+nt.clientLeft,ft.y=pt.y+nt.clientTop}return{width:tt.width*ct.x,height:tt.height*ct.y,x:tt.x*ct.x-ut.scrollLeft*ct.x+ft.x,y:tt.y*ct.y-ut.scrollTop*ct.y+ft.y}}function getClientRects(et){return Array.from(et.getClientRects())}function getWindowScrollBarX(et){return getBoundingClientRect$1(getDocumentElement(et)).left+getNodeScroll(et).scrollLeft}function getDocumentRect(et){const tt=getDocumentElement(et),nt=getNodeScroll(et),rt=et.ownerDocument.body,ot=max$4(tt.scrollWidth,tt.clientWidth,rt.scrollWidth,rt.clientWidth),st=max$4(tt.scrollHeight,tt.clientHeight,rt.scrollHeight,rt.clientHeight);let ut=-nt.scrollLeft+getWindowScrollBarX(et);const ct=-nt.scrollTop;return getComputedStyle$1(rt).direction==="rtl"&&(ut+=max$4(tt.clientWidth,rt.clientWidth)-ot),{width:ot,height:st,x:ut,y:ct}}function getParentNode$1(et){if(getNodeName(et)==="html")return et;const tt=et.assignedSlot||et.parentNode||isShadowRoot(et)&&et.host||getDocumentElement(et);return isShadowRoot(tt)?tt.host:tt}function getNearestOverflowAncestor(et){const tt=getParentNode$1(et);return isLastTraversableNode(tt)?et.ownerDocument?et.ownerDocument.body:et.body:isHTMLElement(tt)&&isOverflowElement(tt)?tt:getNearestOverflowAncestor(tt)}function getOverflowAncestors(et,tt){var nt;tt===void 0&&(tt=[]);const rt=getNearestOverflowAncestor(et),ot=rt===((nt=et.ownerDocument)==null?void 0:nt.body),st=getWindow$1(rt);return ot?tt.concat(st,st.visualViewport||[],isOverflowElement(rt)?rt:[]):tt.concat(rt,getOverflowAncestors(rt))}function getViewportRect(et,tt){const nt=getWindow$1(et),rt=getDocumentElement(et),ot=nt.visualViewport;let st=rt.clientWidth,ut=rt.clientHeight,ct=0,ft=0;if(ot){st=ot.width,ut=ot.height;const pt=isSafari();(!pt||pt&&tt==="fixed")&&(ct=ot.offsetLeft,ft=ot.offsetTop)}return{width:st,height:ut,x:ct,y:ft}}function getInnerBoundingClientRect(et,tt){const nt=getBoundingClientRect$1(et,!0,tt==="fixed"),rt=nt.top+et.clientTop,ot=nt.left+et.clientLeft,st=isHTMLElement(et)?getScale$2(et):createCoords(1),ut=et.clientWidth*st.x,ct=et.clientHeight*st.y,ft=ot*st.x,pt=rt*st.y;return{width:ut,height:ct,x:ft,y:pt}}function getClientRectFromClippingAncestor(et,tt,nt){let rt;if(tt==="viewport")rt=getViewportRect(et,nt);else if(tt==="document")rt=getDocumentRect(getDocumentElement(et));else if(isElement$1(tt))rt=getInnerBoundingClientRect(tt,nt);else{const ot=getVisualOffsets(et);rt={...tt,x:tt.x-ot.x,y:tt.y-ot.y}}return rectToClientRect(rt)}function hasFixedPositionAncestor(et,tt){const nt=getParentNode$1(et);return nt===tt||!isElement$1(nt)||isLastTraversableNode(nt)?!1:getComputedStyle$1(nt).position==="fixed"||hasFixedPositionAncestor(nt,tt)}function getClippingElementAncestors(et,tt){const nt=tt.get(et);if(nt)return nt;let rt=getOverflowAncestors(et).filter(ct=>isElement$1(ct)&&getNodeName(ct)!=="body"),ot=null;const st=getComputedStyle$1(et).position==="fixed";let ut=st?getParentNode$1(et):et;for(;isElement$1(ut)&&!isLastTraversableNode(ut);){const ct=getComputedStyle$1(ut),ft=isContainingBlock(ut);!ft&&ct.position==="fixed"&&(ot=null),(st?!ft&&!ot:!ft&&ct.position==="static"&&!!ot&&["absolute","fixed"].includes(ot.position)||isOverflowElement(ut)&&!ft&&hasFixedPositionAncestor(et,ut))?rt=rt.filter(ht=>ht!==ut):ot=ct,ut=getParentNode$1(ut)}return tt.set(et,rt),rt}function getClippingRect(et){let{element:tt,boundary:nt,rootBoundary:rt,strategy:ot}=et;const ut=[...nt==="clippingAncestors"?getClippingElementAncestors(tt,this._c):[].concat(nt),rt],ct=ut[0],ft=ut.reduce((pt,ht)=>{const mt=getClientRectFromClippingAncestor(tt,ht,ot);return pt.top=max$4(mt.top,pt.top),pt.right=min$4(mt.right,pt.right),pt.bottom=min$4(mt.bottom,pt.bottom),pt.left=max$4(mt.left,pt.left),pt},getClientRectFromClippingAncestor(tt,ct,ot));return{width:ft.right-ft.left,height:ft.bottom-ft.top,x:ft.left,y:ft.top}}function getDimensions(et){return getCssDimensions(et)}function getRectRelativeToOffsetParent(et,tt,nt){const rt=isHTMLElement(tt),ot=getDocumentElement(tt),st=nt==="fixed",ut=getBoundingClientRect$1(et,!0,st,tt);let ct={scrollLeft:0,scrollTop:0};const ft=createCoords(0);if(rt||!rt&&!st)if((getNodeName(tt)!=="body"||isOverflowElement(ot))&&(ct=getNodeScroll(tt)),isHTMLElement(tt)){const pt=getBoundingClientRect$1(tt,!0,st,tt);ft.x=pt.x+tt.clientLeft,ft.y=pt.y+tt.clientTop}else ot&&(ft.x=getWindowScrollBarX(ot));return{x:ut.left+ct.scrollLeft-ft.x,y:ut.top+ct.scrollTop-ft.y,width:ut.width,height:ut.height}}function getTrueOffsetParent(et,tt){return!isHTMLElement(et)||getComputedStyle$1(et).position==="fixed"?null:tt?tt(et):et.offsetParent}function getContainingBlock(et){let tt=getParentNode$1(et);for(;isHTMLElement(tt)&&!isLastTraversableNode(tt);){if(isContainingBlock(tt))return tt;tt=getParentNode$1(tt)}return null}function getOffsetParent$1(et,tt){const nt=getWindow$1(et);if(!isHTMLElement(et))return nt;let rt=getTrueOffsetParent(et,tt);for(;rt&&isTableElement(rt)&&getComputedStyle$1(rt).position==="static";)rt=getTrueOffsetParent(rt,tt);return rt&&(getNodeName(rt)==="html"||getNodeName(rt)==="body"&&getComputedStyle$1(rt).position==="static"&&!isContainingBlock(rt))?nt:rt||getContainingBlock(et)||nt}const getElementRects=async function(et){let{reference:tt,floating:nt,strategy:rt}=et;const ot=this.getOffsetParent||getOffsetParent$1,st=this.getDimensions;return{reference:getRectRelativeToOffsetParent(tt,await ot(nt),rt),floating:{x:0,y:0,...await st(nt)}}};function isRTL(et){return getComputedStyle(et).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale:getScale$2,isElement:isElement$1,isRTL},computePosition=(et,tt,nt)=>{const rt=new Map,ot={platform,...nt},st={...ot.platform,_c:rt};return computePosition$1(et,tt,{...ot,platform:st})};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var __assign$1=function(){return __assign$1=Object.assign||function(tt){for(var nt,rt=1,ot=arguments.length;rt<ot;rt++){nt=arguments[rt];for(var st in nt)Object.prototype.hasOwnProperty.call(nt,st)&&(tt[st]=nt[st])}return tt},__assign$1.apply(this,arguments)};function __values(et){var tt=typeof Symbol=="function"&&Symbol.iterator,nt=tt&&et[tt],rt=0;if(nt)return nt.call(et);if(et&&typeof et.length=="number")return{next:function(){return et&&rt>=et.length&&(et=void 0),{value:et&&et[rt++],done:!et}}};throw new TypeError(tt?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(et,tt){var nt=typeof Symbol=="function"&&et[Symbol.iterator];if(!nt)return et;var rt=nt.call(et),ot,st=[],ut;try{for(;(tt===void 0||tt-- >0)&&!(ot=rt.next()).done;)st.push(ot.value)}catch(ct){ut={error:ct}}finally{try{ot&&!ot.done&&(nt=rt.return)&&nt.call(rt)}finally{if(ut)throw ut.error}}return st}function __spread(){for(var et=[],tt=0;tt<arguments.length;tt++)et=et.concat(__read(arguments[tt]));return et}function isBrowserBundle(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function isNodeEnv(){return!isBrowserBundle()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function dynamicRequire(et,tt){return et.require(tt)}var fallbackGlobalObject={};function getGlobalObject(){return isNodeEnv()?global:typeof window<"u"?window:typeof self<"u"?self:fallbackGlobalObject}function getGlobalSingleton(et,tt,nt){var rt=nt||getGlobalObject(),ot=rt.__SENTRY__=rt.__SENTRY__||{},st=ot[et]||(ot[et]=tt());return st}var objectToString=Object.prototype.toString;function isBuiltin(et,tt){return objectToString.call(et)==="[object "+tt+"]"}function isPlainObject$3(et){return isBuiltin(et,"Object")}function isThenable(et){return Boolean(et&&et.then&&typeof et.then=="function")}var IS_DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__,global$2=getGlobalObject(),PREFIX="Sentry Logger ",CONSOLE_LEVELS=["debug","info","warn","error","log","assert"];function consoleSandbox(et){var tt=getGlobalObject();if(!("console"in tt))return et();var nt=tt.console,rt={};CONSOLE_LEVELS.forEach(function(ot){var st=nt[ot]&&nt[ot].__sentry_original__;ot in tt.console&&st&&(rt[ot]=nt[ot],nt[ot]=st)});try{return et()}finally{Object.keys(rt).forEach(function(ot){nt[ot]=rt[ot]})}}function makeLogger(){var et=!1,tt={enable:function(){et=!0},disable:function(){et=!1}};return IS_DEBUG_BUILD$1?CONSOLE_LEVELS.forEach(function(nt){tt[nt]=function(){for(var rt=[],ot=0;ot<arguments.length;ot++)rt[ot]=arguments[ot];et&&consoleSandbox(function(){var st;(st=global$2.console)[nt].apply(st,__spread([PREFIX+"["+nt+"]:"],rt))})}}):CONSOLE_LEVELS.forEach(function(nt){tt[nt]=function(){}}),tt}var logger$1;IS_DEBUG_BUILD$1?logger$1=getGlobalSingleton("logger",makeLogger):logger$1=makeLogger();function dropUndefinedKeys(et){var tt,nt;if(isPlainObject$3(et)){var rt={};try{for(var ot=__values(Object.keys(et)),st=ot.next();!st.done;st=ot.next()){var ut=st.value;typeof et[ut]<"u"&&(rt[ut]=dropUndefinedKeys(et[ut]))}}catch(ct){tt={error:ct}}finally{try{st&&!st.done&&(nt=ot.return)&&nt.call(ot)}finally{if(tt)throw tt.error}}return rt}return Array.isArray(et)?et.map(dropUndefinedKeys):et}function uuid4(){var et=getGlobalObject(),tt=et.crypto||et.msCrypto;if(tt!==void 0&&tt.getRandomValues){var nt=new Uint16Array(8);tt.getRandomValues(nt),nt[3]=nt[3]&4095|16384,nt[4]=nt[4]&16383|32768;var rt=function(ot){for(var st=ot.toString(16);st.length<4;)st="0"+st;return st};return rt(nt[0])+rt(nt[1])+rt(nt[2])+rt(nt[3])+rt(nt[4])+rt(nt[5])+rt(nt[6])+rt(nt[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(ot){var st=Math.random()*16|0,ut=ot==="x"?st:st&3|8;return ut.toString(16)})}var SyncPromise=function(){function et(tt){var nt=this;this._state=0,this._handlers=[],this._resolve=function(rt){nt._setResult(1,rt)},this._reject=function(rt){nt._setResult(2,rt)},this._setResult=function(rt,ot){if(nt._state===0){if(isThenable(ot)){ot.then(nt._resolve,nt._reject);return}nt._state=rt,nt._value=ot,nt._executeHandlers()}},this._executeHandlers=function(){if(nt._state!==0){var rt=nt._handlers.slice();nt._handlers=[],rt.forEach(function(ot){ot[0]||(nt._state===1&&ot[1](nt._value),nt._state===2&&ot[2](nt._value),ot[0]=!0)})}};try{tt(this._resolve,this._reject)}catch(rt){this._reject(rt)}}return et.prototype.then=function(tt,nt){var rt=this;return new et(function(ot,st){rt._handlers.push([!1,function(ut){if(!tt)ot(ut);else try{ot(tt(ut))}catch(ct){st(ct)}},function(ut){if(!nt)st(ut);else try{ot(nt(ut))}catch(ct){st(ct)}}]),rt._executeHandlers()})},et.prototype.catch=function(tt){return this.then(function(nt){return nt},tt)},et.prototype.finally=function(tt){var nt=this;return new et(function(rt,ot){var st,ut;return nt.then(function(ct){ut=!1,st=ct,tt&&tt()},function(ct){ut=!0,st=ct,tt&&tt()}).then(function(){if(ut){ot(st);return}rt(st)})})},et}(),dateTimestampSource={nowSeconds:function(){return Date.now()/1e3}};function getBrowserPerformance(){var et=getGlobalObject().performance;if(!(!et||!et.now)){var tt=Date.now()-et.now();return{now:function(){return et.now()},timeOrigin:tt}}}function getNodePerformance(){try{var et=dynamicRequire(module,"perf_hooks");return et.performance}catch{return}}var platformPerformance=isNodeEnv()?getNodePerformance():getBrowserPerformance(),timestampSource=platformPerformance===void 0?dateTimestampSource:{nowSeconds:function(){return(platformPerformance.timeOrigin+platformPerformance.now())/1e3}},dateTimestampInSeconds=dateTimestampSource.nowSeconds.bind(dateTimestampSource),timestampInSeconds=timestampSource.nowSeconds.bind(timestampSource);(function(){var et=getGlobalObject().performance;if(!(!et||!et.now)){var tt=3600*1e3,nt=et.now(),rt=Date.now(),ot=et.timeOrigin?Math.abs(et.timeOrigin+nt-rt):tt,st=ot<tt,ut=et.timing&&et.timing.navigationStart,ct=typeof ut=="number",ft=ct?Math.abs(ut+nt-rt):tt,pt=ft<tt;return st||pt?ot<=ft?et.timeOrigin:ut:rt}})();var MAX_BREADCRUMBS=100,Scope$2=function(){function et(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return et.clone=function(tt){var nt=new et;return tt&&(nt._breadcrumbs=__spread(tt._breadcrumbs),nt._tags=__assign$1({},tt._tags),nt._extra=__assign$1({},tt._extra),nt._contexts=__assign$1({},tt._contexts),nt._user=tt._user,nt._level=tt._level,nt._span=tt._span,nt._session=tt._session,nt._transactionName=tt._transactionName,nt._fingerprint=tt._fingerprint,nt._eventProcessors=__spread(tt._eventProcessors),nt._requestSession=tt._requestSession),nt},et.prototype.addScopeListener=function(tt){this._scopeListeners.push(tt)},et.prototype.addEventProcessor=function(tt){return this._eventProcessors.push(tt),this},et.prototype.setUser=function(tt){return this._user=tt||{},this._session&&this._session.update({user:tt}),this._notifyScopeListeners(),this},et.prototype.getUser=function(){return this._user},et.prototype.getRequestSession=function(){return this._requestSession},et.prototype.setRequestSession=function(tt){return this._requestSession=tt,this},et.prototype.setTags=function(tt){return this._tags=__assign$1(__assign$1({},this._tags),tt),this._notifyScopeListeners(),this},et.prototype.setTag=function(tt,nt){var rt;return this._tags=__assign$1(__assign$1({},this._tags),(rt={},rt[tt]=nt,rt)),this._notifyScopeListeners(),this},et.prototype.setExtras=function(tt){return this._extra=__assign$1(__assign$1({},this._extra),tt),this._notifyScopeListeners(),this},et.prototype.setExtra=function(tt,nt){var rt;return this._extra=__assign$1(__assign$1({},this._extra),(rt={},rt[tt]=nt,rt)),this._notifyScopeListeners(),this},et.prototype.setFingerprint=function(tt){return this._fingerprint=tt,this._notifyScopeListeners(),this},et.prototype.setLevel=function(tt){return this._level=tt,this._notifyScopeListeners(),this},et.prototype.setTransactionName=function(tt){return this._transactionName=tt,this._notifyScopeListeners(),this},et.prototype.setTransaction=function(tt){return this.setTransactionName(tt)},et.prototype.setContext=function(tt,nt){var rt;return nt===null?delete this._contexts[tt]:this._contexts=__assign$1(__assign$1({},this._contexts),(rt={},rt[tt]=nt,rt)),this._notifyScopeListeners(),this},et.prototype.setSpan=function(tt){return this._span=tt,this._notifyScopeListeners(),this},et.prototype.getSpan=function(){return this._span},et.prototype.getTransaction=function(){var tt=this.getSpan();return tt&&tt.transaction},et.prototype.setSession=function(tt){return tt?this._session=tt:delete this._session,this._notifyScopeListeners(),this},et.prototype.getSession=function(){return this._session},et.prototype.update=function(tt){if(!tt)return this;if(typeof tt=="function"){var nt=tt(this);return nt instanceof et?nt:this}return tt instanceof et?(this._tags=__assign$1(__assign$1({},this._tags),tt._tags),this._extra=__assign$1(__assign$1({},this._extra),tt._extra),this._contexts=__assign$1(__assign$1({},this._contexts),tt._contexts),tt._user&&Object.keys(tt._user).length&&(this._user=tt._user),tt._level&&(this._level=tt._level),tt._fingerprint&&(this._fingerprint=tt._fingerprint),tt._requestSession&&(this._requestSession=tt._requestSession)):isPlainObject$3(tt)&&(tt=tt,this._tags=__assign$1(__assign$1({},this._tags),tt.tags),this._extra=__assign$1(__assign$1({},this._extra),tt.extra),this._contexts=__assign$1(__assign$1({},this._contexts),tt.contexts),tt.user&&(this._user=tt.user),tt.level&&(this._level=tt.level),tt.fingerprint&&(this._fingerprint=tt.fingerprint),tt.requestSession&&(this._requestSession=tt.requestSession)),this},et.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},et.prototype.addBreadcrumb=function(tt,nt){var rt=typeof nt=="number"?Math.min(nt,MAX_BREADCRUMBS):MAX_BREADCRUMBS;if(rt<=0)return this;var ot=__assign$1({timestamp:dateTimestampInSeconds()},tt);return this._breadcrumbs=__spread(this._breadcrumbs,[ot]).slice(-rt),this._notifyScopeListeners(),this},et.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},et.prototype.applyToEvent=function(tt,nt){if(this._extra&&Object.keys(this._extra).length&&(tt.extra=__assign$1(__assign$1({},this._extra),tt.extra)),this._tags&&Object.keys(this._tags).length&&(tt.tags=__assign$1(__assign$1({},this._tags),tt.tags)),this._user&&Object.keys(this._user).length&&(tt.user=__assign$1(__assign$1({},this._user),tt.user)),this._contexts&&Object.keys(this._contexts).length&&(tt.contexts=__assign$1(__assign$1({},this._contexts),tt.contexts)),this._level&&(tt.level=this._level),this._transactionName&&(tt.transaction=this._transactionName),this._span){tt.contexts=__assign$1({trace:this._span.getTraceContext()},tt.contexts);var rt=this._span.transaction&&this._span.transaction.name;rt&&(tt.tags=__assign$1({transaction:rt},tt.tags))}return this._applyFingerprint(tt),tt.breadcrumbs=__spread(tt.breadcrumbs||[],this._breadcrumbs),tt.breadcrumbs=tt.breadcrumbs.length>0?tt.breadcrumbs:void 0,tt.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors(__spread(getGlobalEventProcessors(),this._eventProcessors),tt,nt)},et.prototype.setSDKProcessingMetadata=function(tt){return this._sdkProcessingMetadata=__assign$1(__assign$1({},this._sdkProcessingMetadata),tt),this},et.prototype._notifyEventProcessors=function(tt,nt,rt,ot){var st=this;return ot===void 0&&(ot=0),new SyncPromise(function(ut,ct){var ft=tt[ot];if(nt===null||typeof ft!="function")ut(nt);else{var pt=ft(__assign$1({},nt),rt);isThenable(pt)?pt.then(function(ht){return st._notifyEventProcessors(tt,ht,rt,ot+1).then(ut)}).then(null,ct):st._notifyEventProcessors(tt,pt,rt,ot+1).then(ut).then(null,ct)}})},et.prototype._notifyScopeListeners=function(){var tt=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(nt){nt(tt)}),this._notifyingListeners=!1)},et.prototype._applyFingerprint=function(tt){tt.fingerprint=tt.fingerprint?Array.isArray(tt.fingerprint)?tt.fingerprint:[tt.fingerprint]:[],this._fingerprint&&(tt.fingerprint=tt.fingerprint.concat(this._fingerprint)),tt.fingerprint&&!tt.fingerprint.length&&delete tt.fingerprint},et}();function getGlobalEventProcessors(){return getGlobalSingleton("globalEventProcessors",function(){return[]})}var Session=function(){function et(tt){this.errors=0,this.sid=uuid4(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var nt=timestampInSeconds();this.timestamp=nt,this.started=nt,tt&&this.update(tt)}return et.prototype.update=function(tt){if(tt===void 0&&(tt={}),tt.user&&(!this.ipAddress&&tt.user.ip_address&&(this.ipAddress=tt.user.ip_address),!this.did&&!tt.did&&(this.did=tt.user.id||tt.user.email||tt.user.username)),this.timestamp=tt.timestamp||timestampInSeconds(),tt.ignoreDuration&&(this.ignoreDuration=tt.ignoreDuration),tt.sid&&(this.sid=tt.sid.length===32?tt.sid:uuid4()),tt.init!==void 0&&(this.init=tt.init),!this.did&&tt.did&&(this.did=""+tt.did),typeof tt.started=="number"&&(this.started=tt.started),this.ignoreDuration)this.duration=void 0;else if(typeof tt.duration=="number")this.duration=tt.duration;else{var nt=this.timestamp-this.started;this.duration=nt>=0?nt:0}tt.release&&(this.release=tt.release),tt.environment&&(this.environment=tt.environment),!this.ipAddress&&tt.ipAddress&&(this.ipAddress=tt.ipAddress),!this.userAgent&&tt.userAgent&&(this.userAgent=tt.userAgent),typeof tt.errors=="number"&&(this.errors=tt.errors),tt.status&&(this.status=tt.status)},et.prototype.close=function(tt){tt?this.update({status:tt}):this.status==="ok"?this.update({status:"exited"}):this.update()},et.prototype.toJSON=function(){return dropUndefinedKeys({sid:""+this.sid,init:this.init,started:new Date(this.started*1e3).toISOString(),timestamp:new Date(this.timestamp*1e3).toISOString(),status:this.status,errors:this.errors,did:typeof this.did=="number"||typeof this.did=="string"?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},et}(),IS_DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__,API_VERSION=4,DEFAULT_BREADCRUMBS=100,Hub=function(){function et(tt,nt,rt){nt===void 0&&(nt=new Scope$2),rt===void 0&&(rt=API_VERSION),this._version=rt,this._stack=[{}],this.getStackTop().scope=nt,tt&&this.bindClient(tt)}return et.prototype.isOlderThan=function(tt){return this._version<tt},et.prototype.bindClient=function(tt){var nt=this.getStackTop();nt.client=tt,tt&&tt.setupIntegrations&&tt.setupIntegrations()},et.prototype.pushScope=function(){var tt=Scope$2.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:tt}),tt},et.prototype.popScope=function(){return this.getStack().length<=1?!1:!!this.getStack().pop()},et.prototype.withScope=function(tt){var nt=this.pushScope();try{tt(nt)}finally{this.popScope()}},et.prototype.getClient=function(){return this.getStackTop().client},et.prototype.getScope=function(){return this.getStackTop().scope},et.prototype.getStack=function(){return this._stack},et.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},et.prototype.captureException=function(tt,nt){var rt=this._lastEventId=nt&&nt.event_id?nt.event_id:uuid4(),ot=nt;if(!nt){var st=void 0;try{throw new Error("Sentry syntheticException")}catch(ut){st=ut}ot={originalException:tt,syntheticException:st}}return this._invokeClient("captureException",tt,__assign$1(__assign$1({},ot),{event_id:rt})),rt},et.prototype.captureMessage=function(tt,nt,rt){var ot=this._lastEventId=rt&&rt.event_id?rt.event_id:uuid4(),st=rt;if(!rt){var ut=void 0;try{throw new Error(tt)}catch(ct){ut=ct}st={originalException:tt,syntheticException:ut}}return this._invokeClient("captureMessage",tt,nt,__assign$1(__assign$1({},st),{event_id:ot})),ot},et.prototype.captureEvent=function(tt,nt){var rt=nt&&nt.event_id?nt.event_id:uuid4();return tt.type!=="transaction"&&(this._lastEventId=rt),this._invokeClient("captureEvent",tt,__assign$1(__assign$1({},nt),{event_id:rt})),rt},et.prototype.lastEventId=function(){return this._lastEventId},et.prototype.addBreadcrumb=function(tt,nt){var rt=this.getStackTop(),ot=rt.scope,st=rt.client;if(!(!ot||!st)){var ut=st.getOptions&&st.getOptions()||{},ct=ut.beforeBreadcrumb,ft=ct===void 0?null:ct,pt=ut.maxBreadcrumbs,ht=pt===void 0?DEFAULT_BREADCRUMBS:pt;if(!(ht<=0)){var mt=dateTimestampInSeconds(),yt=__assign$1({timestamp:mt},tt),vt=ft?consoleSandbox(function(){return ft(yt,nt)}):yt;vt!==null&&ot.addBreadcrumb(vt,ht)}}},et.prototype.setUser=function(tt){var nt=this.getScope();nt&&nt.setUser(tt)},et.prototype.setTags=function(tt){var nt=this.getScope();nt&&nt.setTags(tt)},et.prototype.setExtras=function(tt){var nt=this.getScope();nt&&nt.setExtras(tt)},et.prototype.setTag=function(tt,nt){var rt=this.getScope();rt&&rt.setTag(tt,nt)},et.prototype.setExtra=function(tt,nt){var rt=this.getScope();rt&&rt.setExtra(tt,nt)},et.prototype.setContext=function(tt,nt){var rt=this.getScope();rt&&rt.setContext(tt,nt)},et.prototype.configureScope=function(tt){var nt=this.getStackTop(),rt=nt.scope,ot=nt.client;rt&&ot&&tt(rt)},et.prototype.run=function(tt){var nt=makeMain(this);try{tt(this)}finally{makeMain(nt)}},et.prototype.getIntegration=function(tt){var nt=this.getClient();if(!nt)return null;try{return nt.getIntegration(tt)}catch{return IS_DEBUG_BUILD&&logger$1.warn("Cannot retrieve integration "+tt.id+" from the current Hub"),null}},et.prototype.startSpan=function(tt){return this._callExtensionMethod("startSpan",tt)},et.prototype.startTransaction=function(tt,nt){return this._callExtensionMethod("startTransaction",tt,nt)},et.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},et.prototype.captureSession=function(tt){if(tt===void 0&&(tt=!1),tt)return this.endSession();this._sendSessionUpdate()},et.prototype.endSession=function(){var tt=this.getStackTop(),nt=tt&&tt.scope,rt=nt&&nt.getSession();rt&&rt.close(),this._sendSessionUpdate(),nt&&nt.setSession()},et.prototype.startSession=function(tt){var nt=this.getStackTop(),rt=nt.scope,ot=nt.client,st=ot&&ot.getOptions()||{},ut=st.release,ct=st.environment,ft=getGlobalObject(),pt=(ft.navigator||{}).userAgent,ht=new Session(__assign$1(__assign$1(__assign$1({release:ut,environment:ct},rt&&{user:rt.getUser()}),pt&&{userAgent:pt}),tt));if(rt){var mt=rt.getSession&&rt.getSession();mt&&mt.status==="ok"&&mt.update({status:"exited"}),this.endSession(),rt.setSession(ht)}return ht},et.prototype._sendSessionUpdate=function(){var tt=this.getStackTop(),nt=tt.scope,rt=tt.client;if(!!nt){var ot=nt.getSession&&nt.getSession();ot&&rt&&rt.captureSession&&rt.captureSession(ot)}},et.prototype._invokeClient=function(tt){for(var nt,rt=[],ot=1;ot<arguments.length;ot++)rt[ot-1]=arguments[ot];var st=this.getStackTop(),ut=st.scope,ct=st.client;ct&&ct[tt]&&(nt=ct)[tt].apply(nt,__spread(rt,[ut]))},et.prototype._callExtensionMethod=function(tt){for(var nt=[],rt=1;rt<arguments.length;rt++)nt[rt-1]=arguments[rt];var ot=getMainCarrier(),st=ot.__SENTRY__;if(st&&st.extensions&&typeof st.extensions[tt]=="function")return st.extensions[tt].apply(this,nt);IS_DEBUG_BUILD&&logger$1.warn("Extension method "+tt+" couldn't be found, doing nothing.")},et}();function getMainCarrier(){var et=getGlobalObject();return et.__SENTRY__=et.__SENTRY__||{extensions:{},hub:void 0},et}function makeMain(et){var tt=getMainCarrier(),nt=getHubFromCarrier(tt);return setHubOnCarrier(tt,et),nt}function getCurrentHub(){var et=getMainCarrier();return(!hasHubOnCarrier(et)||getHubFromCarrier(et).isOlderThan(API_VERSION))&&setHubOnCarrier(et,new Hub),isNodeEnv()?getHubFromActiveDomain(et):getHubFromCarrier(et)}function getHubFromActiveDomain(et){try{var tt=getMainCarrier().__SENTRY__,nt=tt&&tt.extensions&&tt.extensions.domain&&tt.extensions.domain.active;if(!nt)return getHubFromCarrier(et);if(!hasHubOnCarrier(nt)||getHubFromCarrier(nt).isOlderThan(API_VERSION)){var rt=getHubFromCarrier(et).getStackTop();setHubOnCarrier(nt,new Hub(rt.client,Scope$2.clone(rt.scope)))}return getHubFromCarrier(nt)}catch{return getHubFromCarrier(et)}}function hasHubOnCarrier(et){return!!(et&&et.__SENTRY__&&et.__SENTRY__.hub)}function getHubFromCarrier(et){return getGlobalSingleton("hub",function(){return new Hub},et)}function setHubOnCarrier(et,tt){if(!et)return!1;var nt=et.__SENTRY__=et.__SENTRY__||{};return nt.hub=tt,!0}function callOnHub(et){for(var tt=[],nt=1;nt<arguments.length;nt++)tt[nt-1]=arguments[nt];var rt=getCurrentHub();if(rt&&rt[et])return rt[et].apply(rt,__spread(tt));throw new Error("No hub defined or "+et+" was not found on the hub, please open a bug report.")}function captureException(et,tt){var nt=new Error("Sentry syntheticException");return callOnHub("captureException",et,{captureContext:tt,originalException:et,syntheticException:nt})}const trace=(...et)=>{isWeaveDebugEnabled()&&console.log(...et.map(tt=>lodash$2.exports.isFunction(tt)?tt():tt))};function nodesAtOffset(et,tt,nt){if(et<0)throw new Error("nothing found");let rt=tt;const ot=[];for(;rt!=null;){ot.push(rt);let st=!1;for(const ut of rt.namedChildren)if(et>=ut.startIndex&&et<=ut.endIndex){st=!0,rt=ut;break}st||(rt=null)}for(let st=ot.pop();st!=null&&st.type!=="ERROR";st=ot.pop()){const ut=nt.get(st.id);if(ut)return[st,ut]}return nodesAtOffset(et-1,tt,nt)}function rangeForSyntaxNode(et,tt){return{anchor:getPointForIndex(tt,et.startIndex),focus:getPointForIndex(tt,et.endIndex)}}function getSelectionIndex(et){let tt=0;const nt=et.selection??Editor$1.range(et,[]);if(nt!=null){Point$1.equals(nt.anchor,nt.focus);const rt=Range$1.end(nt);for(const ot of Node$4.nodes(et,{to:rt.path})){const[st,ut]=ot;if(Path$2.equals(ut,rt.path??[]))break;Text$1.isText(st)&&(tt+=st.text.length)}tt+=rt.offset}return tt}function getIndexForPoint(et,tt){let nt=0;for(const rt of Node$4.nodes(et,{to:tt.path})){const[ot,st]=rt;if(Path$2.equals(st,tt.path))break;Text$1.isText(ot)&&(nt+=ot.text.length)}return nt+=tt.offset,nt}function getPointForIndex(et,tt){let nt=tt;for(const rt of Node$4.nodes(et)){const[ot,st]=rt;if(!Text$1.isText(ot))continue;const ut=ot.text.length;if(ut>=nt)return{path:st,offset:nt};nt-=ut}return Editor$1.point(et,[],{edge:"start"})}function moveToNextMissingArg(et){const tt=getSelectionIndex(et),nt=Editor$1.string(et,[]).slice(tt);let rt=1/0;for(const ot of[["()",1],["[]",1],['""',1],["(,",1],["( ,",1],[",,",1],[", ,",2],[",)",1],[", )",2],["=> )",3],["=> row)",6],[/[%*+-/<>=]\s*\)$/,1]]){const[st,ut]=ot,ct=typeof st=="string"?nt.indexOf(st):nt.match(st)?.index??-1;if(ct!==-1){const ft=ct+ut;ft<rt&&(rt=ft)}}rt===1/0?Transforms.select(et,Editor$1.end(et,[])):Transforms.move(et,{distance:rt,unit:"offset"})}async function adaptSuggestions(et,tt,nt,rt,ot){const st=voidNode();if(ot){const ct=getOpDefsByDisplayName(ot.trim(),et.client.opStore).filter(ft=>ft.inputTypes.lhs!=null&&et.typeIsAssignableTo(tt.type,ft.inputTypes.lhs));if(ct.length===1){const ft={fromOp:{name:ct[0].name,inputs:{lhs:tt,rhs:st}},nodeType:"output",type:"any"};return et.suggestions(st,ft,rt)}}const ut=getStackAtNodeOrOp(nt,tt,rt,et.client.opStore)??rt;return isVarNode(tt)&&resolveVar(ut,tt.varName)==null?et.suggestions(st,maybeReplaceNode(nt,tt,st),rt,tt.varName):et.suggestions(tt,nt,rt,ot)}let instanceCounter$1=0;class WeaveExpressionState{constructor(tt,nt,rt,ot,st,ut){this.props=tt,this.weave=nt,this.stack=rt,this.editor=ot,this.stateUpdated=st,this.replaceEditorText=ut,this.id=`weave-expression-state-${instanceCounter$1++}`,this.trace=(...ft)=>trace(`${this.id}:`,...ft),this.trace("\u{1F916} constructor",tt);const ct=nt.expToString(tt.expr??voidNode(),null);this.setExpression=tt.setExpression,this.hasPendingChanges=!1,this.parseState={expr:voidNode()},this.editorText=ct,this.parsePromise=null,this.suggestionsPromise=null,this.suggestionTarget=null,this.pendingExpr=tt.expr??voidNode(),this.isBusy=!1,this.isValid=!0,this.exprIsModified=!1,this.editorValue=[{type:"paragraph",children:[{text:this.editorText}]}],this.suggestions={node:voidNode(),typeStr:null,items:[],isBusy:!1},tt.expr!=null?(this.initializing=!0,setTimeout(()=>this.initialize(),0)):this.initializing=!1}dispatch(tt){switch(tt.type){case"stackChanged":this.handleStackChanged(tt.stack);return;case"editorChanged":this.handleEditorChanged(tt.newValue,tt.stack);return;case"exprChanged":this.handleExprChanged(tt.expr);return;case"setExprChanged":this.handleSetExprChanged(tt.setExpr);return;case"flushPendingExpr":this.handleFlushPendingExpr();return;default:this.trace(`dispatch(${tt.type}): Unknown action type`)}}initialize(){this.replaceEditorText(this.editorText)}clearSuggestions(){this.suggestionTarget=null,this.set("suggestions",{node:voidNode(),typeStr:null,items:[],isBusy:!1})}handleStackChanged(tt){this.trace("\u26F1\uFE0F handleStackChanged()",tt),this.processText(this.editorText,tt)}handleEditorChanged(tt,nt){this.trace("\u{1F308} handleEditorChanged()",tt,this.parseState,this.editorText),this.set("editorValue",tt);const rt=tt.reduce((ot,st)=>ot+Node$4.string(st),"");rt!==this.editorText?(this.trace(`...text changed: "${this.editorText}" --> "${rt}"`),this.editorText=rt,this.processText(rt,nt)):this.initializing?(this.trace("...got expected editorChanged event during initialization"),this.processText(rt,nt)):(this.trace("...text unchanged, triggering suggestion update only"),this.updateSuggestions())}handleExprChanged(tt){if(this.trace("\u{1F980} handleExprChanged()",tt,this.parseState,this.editorText),tt==null){this.trace("...newExpr is null, ignoring");return}const nt=this.weave.expToString(tt,null);if(nt===this.editorText){this.trace("...exprText is unchanged, ignoring");return}this.replaceEditorText(nt)}handleSetExprChanged(tt){this.trace("handleSetExprChanged"),this.setExpression=tt}handleFlushPendingExpr(){this.setExpression!=null&&(this.trace("\u{1F438} applyPendingExpr",this.pendingExpr),this.setExpression(this.pendingExpr)),this.set("exprIsModified",!1),this.postUpdate("flushed changes")}processText(tt,nt){this.trace("\u{1F48E} processText()",tt,nt),this.stack=nt;const rt=tt.length>0?this.weave.expression(tt,nt).then(ot=>{if(this.parsePromise!==rt){this.trace("parse result is stale, ignoring");return}else this.parsePromise=null;this.trace("got parse result",ot),this.parseState=ot,this.set("tsRoot",ot.parseTree),this.clearSuggestions(),this.postUpdate("parse complete"),this.processParseState()}).catch(ot=>{captureException(ot),this.trace("parse error",ot),this.parsePromise=null,this.postUpdate("parse failed")}):new Promise(ot=>{this.trace("text is empty"),this.parseState={expr:voidNode()},this.clearSuggestions(),this.postUpdate("clear expression complete"),this.processParseState(),ot()});this.parsePromise=rt}processParseState(){this.trace("\u{1F42C} processParseState()",this.parseState,this.editor),this.initializing?(this.trace("...initializing, skip to update suggestions"),this.updateSuggestions()):(this.trace("...update expression then suggestions"),this.updateExpr(),this.updateSuggestions())}processSuggestionTarget(){const{expr:tt,extraText:nt}=this.parseState,rt=this.suggestionTarget??tt;this.trace("\u{1F96E} processNewSuggestionTarget",rt,nt);const ot=adaptSuggestions(this.weave,rt,tt,this.stack,nt).then(st=>{if(this.suggestionsPromise!==ot){trace("suggestions are stale, ignoring");return}else this.suggestionsPromise=null;this.trace("got new suggestions",rt,st),this.set("suggestions",{node:rt,typeStr:isVoidNode(rt)?null:defaultLanguageBinding.printType(rt?.type??tt.type),items:st,extraText:nt,isBusy:!1}),this.postUpdate("suggestions updated and no longer busy")}).catch(st=>{captureException(st),this.trace("suggestions error",st),this.suggestionsPromise=null,this.postUpdate("suggestions failed")});this.suggestionsPromise=ot}updateExpr(){if(this.trace("\u{1F433} updateExpr()",this.parseState.expr,this.parseState.extraText,`"${this.editorText}"`),this.parseState.extraText!=null){this.trace("...have extra text, ignoring");return}const tt=this.weave.expToString(this.pendingExpr??voidNode(),null),nt=this.parseState.expr,rt=this.weave.expToString(nt,null);if(rt===tt){this.trace(`...no change, ignoring "${this.editorText}" -> "${rt}"`);return}else this.trace(`...text changed: "${tt}" -> "${rt}"`);if(this.props.liveUpdate){this.setExpression!=null&&(this.editorText.length!==0&&nt.type!=="invalid"||this.editorText.length===0)&&(this.trace("...live updating expression"),this.setExpression(nt));return}ReactEditor.isFocused(this.editor)?(this.trace("...update pending expression",rt),this.pendingExpr=nt,this.set("exprIsModified",!0),this.postUpdate("expr is modified")):this.trace("...not focused, done updating")}updateSuggestions(){const{parseTree:tt,nodeMap:nt}=this.parseState,rt=getSelectionIndex(this.editor);if(tt&&nt&&nt.size>0)try{const[ot,st]=nodesAtOffset(rt,tt,nt);this.editor.activeNodeRange=rangeForSyntaxNode(ot,this.editor),this.suggestionTarget!==st?(this.trace("setting suggestion target",st),this.suggestionTarget=st??null,this.processSuggestionTarget()):(this.trace("suggestion target didn't change, nothing else to do."),this.postUpdate("done recalculating suggestions"))}catch(ot){captureException(ot),ot instanceof Error?(this.trace("Error getting suggestionTarget:",ot.message),this.editor.activeNodeRange=null):this.trace("Caught unknown value getting suggestionTarget:",ot),this.postUpdate("failed to get suggestion target")}else this.trace("...no parse tree, nothing to update")}set(tt,nt){this.trace(`set public attr ${tt} => ${nt}`),this[tt]=nt,this.hasPendingChanges=!0,setTimeout(()=>{this.hasPendingChanges&&this.trace("\u{1F92F} have changes that were never flushed!!!")},1e3)}postUpdate(tt){this.set("isValid",this.parseState.extraText==null&&(this.editor.children.length===0||Node$4.string(this.editor).trim().length===0||!isVoidNode(this.parseState.expr))),this.set("isBusy",this.parsePromise!=null||this.suggestionsPromise!=null),this.isBusy&&this.trace("busy because:",this.parsePromise,this.suggestionsPromise),this.hasPendingChanges=!1,this.trace("posting update:",tt),this.initializing&&(this.trace("clear initializing flag on first update"),this.set("initializing",!1)),this.stateUpdated(this)}}const useWeaveDecorate=(et,tt)=>Wt.useCallback(([nt,rt])=>{const ot=[],st=ReactEditor.isFocused(et);function ut(pt){st&&et.activeNodeRange!=null&&Range$1.intersection(et.activeNodeRange,pt)!=null&&(pt.ACTIVE_NODE=!0),ot.push(pt)}function ct(pt,ht){if(!['"',"'","(",")","[","]","."].includes(pt.type))if(pt.namedChildCount>0)for(const mt of pt.namedChildren)ct(mt,[...ht,pt.type]);else{const mt=Object.fromEntries(ht.concat(pt.type).map(yt=>[yt,!0]));ut({...mt,anchor:{path:rt,offset:pt.startIndex-ft},focus:{path:rt,offset:pt.endIndex-ft}})}}if(tt==null||!Text$1.isText(nt))return ot;const ft=getIndexForPoint(et,{path:rt,offset:0});for(let pt=ft,ht=tt.namedDescendantForIndex(pt);pt<ft+nt.text.length&&ht.parent!==null;pt=ht.endIndex+1,ht=tt.namedDescendantForIndex(pt))ct(ht,[]);return ot},[et,tt]);function serializeStack(et,tt){return _$2.map(et,tt.expToString.bind(tt))}const useWeaveExpressionState=(et,tt,nt)=>{const rt=Wt.useRef(et),{stack:ot}=usePanelContext(),st=Wt.useRef(ot),ut=Wt.useMemo(()=>new WeaveExpressionState(rt.current,nt,ot,tt,Rt=>Et({...Rt}),Rt=>Transforms.insertText(tt,Rt,{at:[]})),[nt,tt]),{onBlur:ct,onFocus:ft}=et,[pt,ht]=Wt.useState(!1),mt=Wt.useCallback(()=>{ht(!1),ct?.()},[ht,ct]),yt=Wt.useCallback(()=>{ht(!0),ft?.()},[ht,ft]);Wt.useEffect(()=>{!pt&&rt.current.expr!==et.expr&&ut.dispatch({type:"exprChanged",expr:et.expr??voidNode()}),rt.current.setExpression!==et.setExpression&&ut.dispatch({type:"setExprChanged",setExpr:et.setExpression}),_$2.isEqual(serializeStack(st.current,nt),serializeStack(ot,nt))||ut.dispatch({type:"stackChanged",stack:ot??[]}),rt.current=et,st.current=ot},[pt,ut,et,nt,ot]);const{onMount:vt}=et;Wt.useEffect(()=>{vt?.(tt)},[]);const[Tt,Et]=Wt.useState(ut),xt=Wt.useCallback((Rt,It)=>{ut.dispatch({type:"editorChanged",newValue:Rt,stack:It})},[ut]),At=Wt.useCallback(()=>{ut.dispatch({type:"flushPendingExpr"})},[ut]),[Ct,$t]=Wt.useState(!1),Ot=Wt.useCallback(Rt=>{$t(!0),setTimeout(()=>$t(!1),Rt)},[$t]);return trace(`${ut.id}: useWeaveExpressionState render`,Tt),{onChange:xt,slateValue:Tt?.editorValue,suggestions:Tt?.suggestions,tsRoot:Tt?.tsRoot,exprIsModified:Tt?.exprIsModified,isValid:Tt?.isValid,isBusy:Tt?.isBusy,applyPendingExpr:At,suppressSuggestions:Ct,hideSuggestions:Ot,isFocused:pt,onFocus:yt,onBlur:mt}},useRunButtonVisualState=(et,tt,nt,rt,ot=!1)=>{const st=Wt.useRef(null),ut=Wt.useRef(null);return Wt.useEffect(()=>{const ct=st.current,ft=ut.current;if(ct==null||ft==null)return;!nt||ot&&!rt||!tt&&(!rt||Editor$1.string(et,[]).trim()==="")?ft.style.display="none":ft.style.display="inline-block";const pt=ReactEditor.toDOMNode(et,Editor$1.last(et,[])[0]);let ht=0;for(let vt=pt;!vt?.dataset.slateEditor;vt=vt?.parentNode)vt?.dataset.slateNode==="element"&&(ht+=vt.offsetHeight),ht+=vt.offsetTop;const mt=ct.offsetWidth-ft.offsetWidth-5,yt=pt.offsetLeft+pt.offsetWidth+10;yt>mt?ft.style.setProperty("opacity","0.3","important"):ft.style.setProperty("opacity","1.0","important"),ft.style.left=`${Math.min(mt,yt)}px`,ft.style.top=`${ht-20}px`}),{containerRef:st,applyButtonRef:ut}};function useSuggestionTakerWithSlateStaticEditor(et,tt){const nt=useSlateStatic();return useSuggestionTaker(et,tt,nt)}const useSuggestionTaker=({node:et,extraText:tt,isBusy:nt},rt,ot)=>{const[st,ut]=Wt.useState(0),ct=Wt.useCallback(pt=>{const ht=rt.expToString(pt.newNodeOrOp,null);let mt=ot.activeNodeRange??Editor$1.end(ot,[]);if((et.nodeType==="var"||et.nodeType==="const")&&(mt=ot.activeNodeRange),tt)if(Range$1.isRange(mt)){const yt=Range$1.end(mt);mt={anchor:Range$1.start(mt),focus:{...yt,offset:yt.offset+tt.length}}}else mt={anchor:mt,focus:{...mt,offset:mt.offset+tt.length+1}};return[ht,mt]},[ot,tt,et.nodeType,rt]),ft=Wt.useCallback(pt=>{if(trace("takeSuggestion",pt),nt)return;ReactEditor.focus(ot);const[ht,mt]=ct(pt),yt={...ot.selection};Transforms.insertText(ot,ht,{at:mt}),Transforms.select(ot,yt),moveToNextMissingArg(ot)},[ot,ct,nt]);return{suggestionIndex:st,setSuggestionIndex:ut,takeSuggestion:ft}},useSuggestionVisualState=({node:et,typeStr:tt,items:nt,forceHidden:rt})=>{const ot=Wt.useRef(null),st=useSlateStatic(),ut=useFocused();Wt.useEffect(()=>{const ft=ot.current;if(!ft){trace("SuggestionVisualState: no element");return}if(nt.length===0||!ut||rt||st.selection!=null&&Range$1.isExpanded(st.selection)){trace("SuggestionVisualState: hiding",nt.length,ut,rt,st.selection!=null&&Range$1.isExpanded(st.selection)),ft.removeAttribute("style");return}trace("SuggestionVisualState: showing"),ft.style.opacity="1";const pt=ReactEditor.toDOMNode(st,st.children[0]);computePosition(pt,ft,{placement:"bottom-start",middleware:[offset$4(4),flip$2({fallbackPlacements:["right","left","top"]}),shift$1()]}).then(({x:ht,y:mt})=>{Object.assign(ft.style,{left:`${ht}px`,top:`${mt}px`});const yt=ft.getBoundingClientRect();if(yt.top>=0&&yt.left>=0&&yt.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&yt.right<=(window.innerWidth||document.documentElement.clientWidth)){const vt=ft.querySelector("ul.items-list li.default-suggestion");vt&&vt.scrollIntoView({block:"nearest",inline:"nearest"})}})});const ct=Wt.useMemo(()=>!(et.nodeType==="void"||tt==null||["any","unknown","invalid"].includes(tt)),[et,tt]);return{paneRef:ot,showType:ct}},Leaf=({leaf:et,attributes:tt,children:nt})=>{const rt=Object.keys(et).reduce((st,ut)=>ut==="text"?st:["+","-","/","*","!","%"].includes(ut)?st.concat("operator"):["true","false"].includes(ut)?st.concat("boolean"):st.concat(ut),[]),ot=Array.from(new Set(rt));return react.exports.createElement("span",{...tt,className:rt!=null?ot.join(" "):void 0},nt)},defaultSchema={strip:["script"],clobberPrefix:"user-content-",clobber:["name","id"],ancestors:{tbody:["table"],tfoot:["table"],thead:["table"],td:["table"],th:["table"],tr:["table"]},protocols:{href:["http","https","mailto","xmpp","irc","ircs"],cite:["http","https"],src:["http","https"],longDesc:["http","https"]},tagNames:["h1","h2","h3","h4","h5","h6","br","b","i","strong","em","a","pre","code","img","tt","div","ins","del","sup","sub","p","ol","ul","table","thead","tbody","tfoot","blockquote","dl","dt","dd","kbd","q","samp","var","hr","ruby","rt","rp","li","tr","td","th","s","strike","summary","details","caption","figure","figcaption","abbr","bdo","cite","dfn","mark","small","span","time","wbr","input"],attributes:{a:["href"],img:["src","longDesc"],input:[["type","checkbox"],["disabled",!0]],li:[["className","task-list-item"]],div:["itemScope","itemType"],blockquote:["cite"],del:["cite"],ins:["cite"],q:["cite"],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","ariaDescribedBy","ariaHidden","ariaLabel","ariaLabelledBy","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","cols","colSpan","color","compact","coords","dateTime","dir","disabled","encType","htmlFor","frame","headers","height","hrefLang","hSpace","isMap","id","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rows","rowSpan","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","type","useMap","vAlign","value","vSpace","width","itemProp"]},required:{input:{type:"checkbox",disabled:!0}}};var mdastUtilToString=toString$3;function toString$3(et){return et&&(et.value||et.alt||et.title||"children"in et&&all$5(et.children)||"length"in et&&all$5(et))||""}function all$5(et){for(var tt=[],nt=et.length,rt=-1;++rt<nt;)tt[rt]=toString$3(et[rt]);return tt.join("")}var convert_1$2=convert$b;function convert$b(et){if(et==null)return ok$5;if(typeof et=="string")return typeFactory$4(et);if(typeof et=="object")return"length"in et?anyFactory$4(et):allFactory(et);if(typeof et=="function")return et;throw new Error("Expected function, string, or object as test")}function allFactory(et){return tt;function tt(nt){var rt;for(rt in et)if(nt[rt]!==et[rt])return!1;return!0}}function anyFactory$4(et){for(var tt=[],nt=-1;++nt<et.length;)tt[nt]=convert$b(et[nt]);return rt;function rt(){for(var ot=-1;++ot<tt.length;)if(tt[ot].apply(this,arguments))return!0;return!1}}function typeFactory$4(et){return tt;function tt(nt){return Boolean(nt&&nt.type===et)}}function ok$5(){return!0}var color_browser=identity$7;function identity$7(et){return et}var unistUtilVisitParents$1=visitParents$4,convert$a=convert_1$2,color$9=color_browser,CONTINUE$4=!0,SKIP$7="skip",EXIT$4=!1;visitParents$4.CONTINUE=CONTINUE$4;visitParents$4.SKIP=SKIP$7;visitParents$4.EXIT=EXIT$4;function visitParents$4(et,tt,nt,rt){var ot,st;typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null),st=convert$a(tt),ot=rt?-1:1,ut(et,null,[])();function ut(ct,ft,pt){var ht=typeof ct=="object"&&ct!==null?ct:{},mt;return typeof ht.type=="string"&&(mt=typeof ht.tagName=="string"?ht.tagName:typeof ht.name=="string"?ht.name:void 0,yt.displayName="node ("+color$9(ht.type+(mt?"<"+mt+">":""))+")"),yt;function yt(){var vt=pt.concat(ct),Tt=[],Et,xt;if((!tt||st(ct,ft,pt[pt.length-1]||null))&&(Tt=toResult$3(nt(ct,pt)),Tt[0]===EXIT$4))return Tt;if(ct.children&&Tt[0]!==SKIP$7)for(xt=(rt?ct.children.length:-1)+ot;xt>-1&&xt<ct.children.length;){if(Et=ut(ct.children[xt],xt,vt)(),Et[0]===EXIT$4)return Et;xt=typeof Et[1]=="number"?Et[1]:xt+ot}return Tt}}}function toResult$3(et){return et!==null&&typeof et=="object"&&"length"in et?et:typeof et=="number"?[CONTINUE$4,et]:[et]}var unistUtilVisit$1=visit$6,visitParents$3=unistUtilVisitParents$1,CONTINUE$3=visitParents$3.CONTINUE,SKIP$6=visitParents$3.SKIP,EXIT$3=visitParents$3.EXIT;visit$6.CONTINUE=CONTINUE$3;visit$6.SKIP=SKIP$6;visit$6.EXIT=EXIT$3;function visit$6(et,tt,nt,rt){typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null),visitParents$3(et,tt,ot,rt);function ot(st,ut){var ct=ut[ut.length-1],ft=ct?ct.children.indexOf(st):null;return nt(st,ft,ct)}}var katex$1={exports:{}};(function(et,tt){(function(rt,ot){et.exports=ot()})(typeof self<"u"?self:commonjsGlobal$1,function(){return function(nt){var rt={};function ot(st){if(rt[st])return rt[st].exports;var ut=rt[st]={i:st,l:!1,exports:{}};return nt[st].call(ut.exports,ut,ut.exports,ot),ut.l=!0,ut.exports}return ot.m=nt,ot.c=rt,ot.d=function(st,ut,ct){ot.o(st,ut)||Object.defineProperty(st,ut,{enumerable:!0,get:ct})},ot.r=function(st){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(st,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(st,"__esModule",{value:!0})},ot.t=function(st,ut){if(ut&1&&(st=ot(st)),ut&8||ut&4&&typeof st=="object"&&st&&st.__esModule)return st;var ct=Object.create(null);if(ot.r(ct),Object.defineProperty(ct,"default",{enumerable:!0,value:st}),ut&2&&typeof st!="string")for(var ft in st)ot.d(ct,ft,function(pt){return st[pt]}.bind(null,ft));return ct},ot.n=function(st){var ut=st&&st.__esModule?function(){return st.default}:function(){return st};return ot.d(ut,"a",ut),ut},ot.o=function(st,ut){return Object.prototype.hasOwnProperty.call(st,ut)},ot.p="",ot(ot.s=1)}([function(nt,rt,ot){},function(nt,rt,ot){ot.r(rt),ot(0);var st=function(){function Mn(jt,Kt,Yt){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=jt,this.start=Kt,this.end=Yt}return Mn.range=function(Kt,Yt){return Yt?!Kt||!Kt.loc||!Yt.loc||Kt.loc.lexer!==Yt.loc.lexer?null:new Mn(Kt.loc.lexer,Kt.loc.start,Yt.loc.end):Kt&&Kt.loc},Mn}(),ut=function(){function Mn(Kt,Yt){this.text=void 0,this.loc=void 0,this.text=Kt,this.loc=Yt}var jt=Mn.prototype;return jt.range=function(Yt,mn){return new Mn(mn,st.range(this,Yt))},Mn}(),ct=function Mn(jt,Kt){this.position=void 0;var Yt="KaTeX parse error: "+jt,mn,Cn=Kt&&Kt.loc;if(Cn&&Cn.start<=Cn.end){var kn=Cn.lexer.input;mn=Cn.start;var qn=Cn.end;mn===kn.length?Yt+=" at end of input: ":Yt+=" at position "+(mn+1)+": ";var er=kn.slice(mn,qn).replace(/[^]/g,"$&\u0332"),pr;mn>15?pr="\u2026"+kn.slice(mn-15,mn):pr=kn.slice(0,mn);var $r;qn+15<kn.length?$r=kn.slice(qn,qn+15)+"\u2026":$r=kn.slice(qn),Yt+=pr+er+$r}var Mr=new Error(Yt);return Mr.name="ParseError",Mr.__proto__=Mn.prototype,Mr.position=mn,Mr};ct.prototype.__proto__=Error.prototype;var ft=ct,pt=function(jt,Kt){return jt.indexOf(Kt)!==-1},ht=function(jt,Kt){return jt===void 0?Kt:jt},mt=/([A-Z])/g,yt=function(jt){return jt.replace(mt,"-$1").toLowerCase()},vt={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Tt=/[&><"']/g;function Et(Mn){return String(Mn).replace(Tt,function(jt){return vt[jt]})}var xt=function Mn(jt){return jt.type==="ordgroup"||jt.type==="color"?jt.body.length===1?Mn(jt.body[0]):jt:jt.type==="font"?Mn(jt.body):jt},At=function(jt){var Kt=xt(jt);return Kt.type==="mathord"||Kt.type==="textord"||Kt.type==="atom"},Ct=function(jt){if(!jt)throw new Error("Expected non-null, but got "+String(jt));return jt},$t=function(jt){var Kt=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(jt);return Kt!=null?Kt[1]:"_relative"},Ot={contains:pt,deflt:ht,escape:Et,hyphenate:yt,getBaseElem:xt,isCharacterBox:At,protocolFromUrl:$t},Rt=function(){function Mn(Kt){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,Kt=Kt||{},this.displayMode=Ot.deflt(Kt.displayMode,!1),this.output=Ot.deflt(Kt.output,"htmlAndMathml"),this.leqno=Ot.deflt(Kt.leqno,!1),this.fleqn=Ot.deflt(Kt.fleqn,!1),this.throwOnError=Ot.deflt(Kt.throwOnError,!0),this.errorColor=Ot.deflt(Kt.errorColor,"#cc0000"),this.macros=Kt.macros||{},this.minRuleThickness=Math.max(0,Ot.deflt(Kt.minRuleThickness,0)),this.colorIsTextColor=Ot.deflt(Kt.colorIsTextColor,!1),this.strict=Ot.deflt(Kt.strict,"warn"),this.trust=Ot.deflt(Kt.trust,!1),this.maxSize=Math.max(0,Ot.deflt(Kt.maxSize,1/0)),this.maxExpand=Math.max(0,Ot.deflt(Kt.maxExpand,1e3))}var jt=Mn.prototype;return jt.reportNonstrict=function(Yt,mn,Cn){var kn=this.strict;if(typeof kn=="function"&&(kn=kn(Yt,mn,Cn)),!(!kn||kn==="ignore")){if(kn===!0||kn==="error")throw new ft("LaTeX-incompatible input and strict mode is set to 'error': "+(mn+" ["+Yt+"]"),Cn);kn==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(mn+" ["+Yt+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+kn+"': "+mn+" ["+Yt+"]"))}},jt.useStrictBehavior=function(Yt,mn,Cn){var kn=this.strict;if(typeof kn=="function")try{kn=kn(Yt,mn,Cn)}catch{kn="error"}return!kn||kn==="ignore"?!1:kn===!0||kn==="error"?!0:kn==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(mn+" ["+Yt+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+kn+"': "+mn+" ["+Yt+"]")),!1)},jt.isTrusted=function(Yt){Yt.url&&!Yt.protocol&&(Yt.protocol=Ot.protocolFromUrl(Yt.url));var mn=typeof this.trust=="function"?this.trust(Yt):this.trust;return Boolean(mn)},Mn}(),It=function(){function Mn(Kt,Yt,mn){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=Kt,this.size=Yt,this.cramped=mn}var jt=Mn.prototype;return jt.sup=function(){return Jt[gn[this.id]]},jt.sub=function(){return Jt[An[this.id]]},jt.fracNum=function(){return Jt[sn[this.id]]},jt.fracDen=function(){return Jt[Sn[this.id]]},jt.cramp=function(){return Jt[In[this.id]]},jt.text=function(){return Jt[_n[this.id]]},jt.isTight=function(){return this.size>=2},Mn}(),kt=0,Mt=1,Ft=2,zt=3,Vt=4,Zt=5,Ut=6,Xt=7,Jt=[new It(kt,0,!1),new It(Mt,0,!0),new It(Ft,1,!1),new It(zt,1,!0),new It(Vt,2,!1),new It(Zt,2,!0),new It(Ut,3,!1),new It(Xt,3,!0)],gn=[Vt,Zt,Vt,Zt,Ut,Xt,Ut,Xt],An=[Zt,Zt,Zt,Zt,Xt,Xt,Xt,Xt],sn=[Ft,zt,Vt,Zt,Ut,Xt,Ut,Xt],Sn=[zt,zt,Zt,Zt,Xt,Xt,Xt,Xt],In=[Mt,Mt,zt,zt,Zt,Zt,Xt,Xt],_n=[kt,Mt,Ft,zt,Ft,zt,Ft,zt],En={DISPLAY:Jt[kt],TEXT:Jt[Ft],SCRIPT:Jt[Vt],SCRIPTSCRIPT:Jt[Ut]},Ln=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function wn(Mn){for(var jt=0;jt<Ln.length;jt++)for(var Kt=Ln[jt],Yt=0;Yt<Kt.blocks.length;Yt++){var mn=Kt.blocks[Yt];if(Mn>=mn[0]&&Mn<=mn[1])return Kt.name}return null}var Dn=[];Ln.forEach(function(Mn){return Mn.blocks.forEach(function(jt){return Dn.push.apply(Dn,jt)})});function $n(Mn){for(var jt=0;jt<Dn.length;jt+=2)if(Mn>=Dn[jt]&&Mn<=Dn[jt+1])return!0;return!1}var Gn=80,Jn=function(jt,Kt){return"M95,"+(622+jt+Kt)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+jt/2.075+" -"+jt+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+jt)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+jt)+" "+Kt+"h400000v"+(40+jt)+"h-400000z"},zn=function(jt,Kt){return"M263,"+(601+jt+Kt)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+jt/2.084+" -"+jt+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+jt)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+jt)+" "+Kt+"h400000v"+(40+jt)+"h-400000z"},Qn=function(jt,Kt){return"M983 "+(10+jt+Kt)+`
l`+jt/3.13+" -"+jt+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+jt)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+jt)+" "+Kt+"h400000v"+(40+jt)+"h-400000z"},Bn=function(jt,Kt){return"M424,"+(2398+jt+Kt)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+jt/4.223+" -"+jt+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+jt)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+jt)+" "+Kt+`
h400000v`+(40+jt)+"h-400000z"},jn=function(jt,Kt){return"M473,"+(2713+jt+Kt)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+jt/5.298+" -"+jt+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+jt)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+jt)+" "+Kt+"h400000v"+(40+jt)+"H1017.7z"},Ar=function(jt,Kt,Yt){var mn=Yt-54-Kt-jt;return"M702 "+(jt+Kt)+"H400000"+(40+jt)+`
H742v`+mn+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+Kt+"H400000v"+(40+jt)+"H742z"},Er=function(jt,Kt,Yt){Kt=1e3*Kt;var mn="";switch(jt){case"sqrtMain":mn=Jn(Kt,Gn);break;case"sqrtSize1":mn=zn(Kt,Gn);break;case"sqrtSize2":mn=Qn(Kt,Gn);break;case"sqrtSize3":mn=Bn(Kt,Gn);break;case"sqrtSize4":mn=jn(Kt,Gn);break;case"sqrtTall":mn=Ar(Kt,Gn,Yt)}return mn},Pr={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Nr=function(){function Mn(Kt){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=Kt,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var jt=Mn.prototype;return jt.hasClass=function(Yt){return Ot.contains(this.classes,Yt)},jt.toNode=function(){for(var Yt=document.createDocumentFragment(),mn=0;mn<this.children.length;mn++)Yt.appendChild(this.children[mn].toNode());return Yt},jt.toMarkup=function(){for(var Yt="",mn=0;mn<this.children.length;mn++)Yt+=this.children[mn].toMarkup();return Yt},jt.toText=function(){var Yt=function(Cn){return Cn.toText()};return this.children.map(Yt).join("")},Mn}(),Ir=function(jt){return jt.filter(function(Kt){return Kt}).join(" ")},no=function(jt,Kt,Yt){if(this.classes=jt||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=Yt||{},Kt){Kt.style.isTight()&&this.classes.push("mtight");var mn=Kt.getColor();mn&&(this.style.color=mn)}},ro=function(jt){var Kt=document.createElement(jt);Kt.className=Ir(this.classes);for(var Yt in this.style)this.style.hasOwnProperty(Yt)&&(Kt.style[Yt]=this.style[Yt]);for(var mn in this.attributes)this.attributes.hasOwnProperty(mn)&&Kt.setAttribute(mn,this.attributes[mn]);for(var Cn=0;Cn<this.children.length;Cn++)Kt.appendChild(this.children[Cn].toNode());return Kt},ao=function(jt){var Kt="<"+jt;this.classes.length&&(Kt+=' class="'+Ot.escape(Ir(this.classes))+'"');var Yt="";for(var mn in this.style)this.style.hasOwnProperty(mn)&&(Yt+=Ot.hyphenate(mn)+":"+this.style[mn]+";");Yt&&(Kt+=' style="'+Ot.escape(Yt)+'"');for(var Cn in this.attributes)this.attributes.hasOwnProperty(Cn)&&(Kt+=" "+Cn+'="'+Ot.escape(this.attributes[Cn])+'"');Kt+=">";for(var kn=0;kn<this.children.length;kn++)Kt+=this.children[kn].toMarkup();return Kt+="</"+jt+">",Kt},Xr=function(){function Mn(Kt,Yt,mn,Cn){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,no.call(this,Kt,mn,Cn),this.children=Yt||[]}var jt=Mn.prototype;return jt.setAttribute=function(Yt,mn){this.attributes[Yt]=mn},jt.hasClass=function(Yt){return Ot.contains(this.classes,Yt)},jt.toNode=function(){return ro.call(this,"span")},jt.toMarkup=function(){return ao.call(this,"span")},Mn}(),Jr=function(){function Mn(Kt,Yt,mn,Cn){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,no.call(this,Yt,Cn),this.children=mn||[],this.setAttribute("href",Kt)}var jt=Mn.prototype;return jt.setAttribute=function(Yt,mn){this.attributes[Yt]=mn},jt.hasClass=function(Yt){return Ot.contains(this.classes,Yt)},jt.toNode=function(){return ro.call(this,"a")},jt.toMarkup=function(){return ao.call(this,"a")},Mn}(),So=function(){function Mn(Kt,Yt,mn){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=Yt,this.src=Kt,this.classes=["mord"],this.style=mn}var jt=Mn.prototype;return jt.hasClass=function(Yt){return Ot.contains(this.classes,Yt)},jt.toNode=function(){var Yt=document.createElement("img");Yt.src=this.src,Yt.alt=this.alt,Yt.className="mord";for(var mn in this.style)this.style.hasOwnProperty(mn)&&(Yt.style[mn]=this.style[mn]);return Yt},jt.toMarkup=function(){var Yt="<img  src='"+this.src+" 'alt='"+this.alt+"' ",mn="";for(var Cn in this.style)this.style.hasOwnProperty(Cn)&&(mn+=Ot.hyphenate(Cn)+":"+this.style[Cn]+";");return mn&&(Yt+=' style="'+Ot.escape(mn)+'"'),Yt+="'/>",Yt},Mn}(),va={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},$o=function(){function Mn(Kt,Yt,mn,Cn,kn,qn,er,pr){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=Kt,this.height=Yt||0,this.depth=mn||0,this.italic=Cn||0,this.skew=kn||0,this.width=qn||0,this.classes=er||[],this.style=pr||{},this.maxFontSize=0;var $r=wn(this.text.charCodeAt(0));$r&&this.classes.push($r+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=va[this.text])}var jt=Mn.prototype;return jt.hasClass=function(Yt){return Ot.contains(this.classes,Yt)},jt.toNode=function(){var Yt=document.createTextNode(this.text),mn=null;this.italic>0&&(mn=document.createElement("span"),mn.style.marginRight=this.italic+"em"),this.classes.length>0&&(mn=mn||document.createElement("span"),mn.className=Ir(this.classes));for(var Cn in this.style)this.style.hasOwnProperty(Cn)&&(mn=mn||document.createElement("span"),mn.style[Cn]=this.style[Cn]);return mn?(mn.appendChild(Yt),mn):Yt},jt.toMarkup=function(){var Yt=!1,mn="<span";this.classes.length&&(Yt=!0,mn+=' class="',mn+=Ot.escape(Ir(this.classes)),mn+='"');var Cn="";this.italic>0&&(Cn+="margin-right:"+this.italic+"em;");for(var kn in this.style)this.style.hasOwnProperty(kn)&&(Cn+=Ot.hyphenate(kn)+":"+this.style[kn]+";");Cn&&(Yt=!0,mn+=' style="'+Ot.escape(Cn)+'"');var qn=Ot.escape(this.text);return Yt?(mn+=">",mn+=qn,mn+="</span>",mn):qn},Mn}(),Qr=function(){function Mn(Kt,Yt){this.children=void 0,this.attributes=void 0,this.children=Kt||[],this.attributes=Yt||{}}var jt=Mn.prototype;return jt.toNode=function(){var Yt="http://www.w3.org/2000/svg",mn=document.createElementNS(Yt,"svg");for(var Cn in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,Cn)&&mn.setAttribute(Cn,this.attributes[Cn]);for(var kn=0;kn<this.children.length;kn++)mn.appendChild(this.children[kn].toNode());return mn},jt.toMarkup=function(){var Yt="<svg";for(var mn in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,mn)&&(Yt+=" "+mn+"='"+this.attributes[mn]+"'");Yt+=">";for(var Cn=0;Cn<this.children.length;Cn++)Yt+=this.children[Cn].toMarkup();return Yt+="</svg>",Yt},Mn}(),jo=function(){function Mn(Kt,Yt){this.pathName=void 0,this.alternate=void 0,this.pathName=Kt,this.alternate=Yt}var jt=Mn.prototype;return jt.toNode=function(){var Yt="http://www.w3.org/2000/svg",mn=document.createElementNS(Yt,"path");return this.alternate?mn.setAttribute("d",this.alternate):mn.setAttribute("d",Pr[this.pathName]),mn},jt.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Pr[this.pathName]+"'/>"},Mn}(),Bo=function(){function Mn(Kt){this.attributes=void 0,this.attributes=Kt||{}}var jt=Mn.prototype;return jt.toNode=function(){var Yt="http://www.w3.org/2000/svg",mn=document.createElementNS(Yt,"line");for(var Cn in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,Cn)&&mn.setAttribute(Cn,this.attributes[Cn]);return mn},jt.toMarkup=function(){var Yt="<line";for(var mn in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,mn)&&(Yt+=" "+mn+"='"+this.attributes[mn]+"'");return Yt+="/>",Yt},Mn}();function ss(Mn){if(Mn instanceof $o)return Mn;throw new Error("Expected symbolNode but got "+String(Mn)+".")}function Us(Mn){if(Mn instanceof Xr)return Mn;throw new Error("Expected span<HtmlDomNode> but got "+String(Mn)+".")}var Eo={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Do={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},bo={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Vo(Mn,jt){Eo[Mn]=jt}function Ts(Mn,jt,Kt){if(!Eo[jt])throw new Error("Font metrics not found for font: "+jt+".");var Yt=Mn.charCodeAt(0),mn=Eo[jt][Yt];if(!mn&&Mn[0]in bo&&(Yt=bo[Mn[0]].charCodeAt(0),mn=Eo[jt][Yt]),!mn&&Kt==="text"&&$n(Yt)&&(mn=Eo[jt][77]),mn)return{depth:mn[0],height:mn[1],italic:mn[2],skew:mn[3],width:mn[4]}}var xs={};function Qo(Mn){var jt;if(Mn>=5?jt=0:Mn>=3?jt=1:jt=2,!xs[jt]){var Kt=xs[jt]={cssEmPerMu:Do.quad[jt]/18};for(var Yt in Do)Do.hasOwnProperty(Yt)&&(Kt[Yt]=Do[Yt][jt])}return xs[jt]}var Gs={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Es={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Il={math:{},text:{}},ws=Il;function vn(Mn,jt,Kt,Yt,mn,Cn){Il[Mn][mn]={font:jt,group:Kt,replace:Yt},Cn&&Yt&&(Il[Mn][Yt]=Il[Mn][mn])}var Rn="math",Zr="text",Wn="main",Kn="ams",Ur="accent-token",Kr="bin",Go="close",io="inner",Hr="mathord",Lo="op-token",Ro="open",No="punct",lr="rel",Ho="spacing",Cr="textord";vn(Rn,Wn,lr,"\u2261","\\equiv",!0),vn(Rn,Wn,lr,"\u227A","\\prec",!0),vn(Rn,Wn,lr,"\u227B","\\succ",!0),vn(Rn,Wn,lr,"\u223C","\\sim",!0),vn(Rn,Wn,lr,"\u22A5","\\perp"),vn(Rn,Wn,lr,"\u2AAF","\\preceq",!0),vn(Rn,Wn,lr,"\u2AB0","\\succeq",!0),vn(Rn,Wn,lr,"\u2243","\\simeq",!0),vn(Rn,Wn,lr,"\u2223","\\mid",!0),vn(Rn,Wn,lr,"\u226A","\\ll",!0),vn(Rn,Wn,lr,"\u226B","\\gg",!0),vn(Rn,Wn,lr,"\u224D","\\asymp",!0),vn(Rn,Wn,lr,"\u2225","\\parallel"),vn(Rn,Wn,lr,"\u22C8","\\bowtie",!0),vn(Rn,Wn,lr,"\u2323","\\smile",!0),vn(Rn,Wn,lr,"\u2291","\\sqsubseteq",!0),vn(Rn,Wn,lr,"\u2292","\\sqsupseteq",!0),vn(Rn,Wn,lr,"\u2250","\\doteq",!0),vn(Rn,Wn,lr,"\u2322","\\frown",!0),vn(Rn,Wn,lr,"\u220B","\\ni",!0),vn(Rn,Wn,lr,"\u221D","\\propto",!0),vn(Rn,Wn,lr,"\u22A2","\\vdash",!0),vn(Rn,Wn,lr,"\u22A3","\\dashv",!0),vn(Rn,Wn,lr,"\u220B","\\owns"),vn(Rn,Wn,No,".","\\ldotp"),vn(Rn,Wn,No,"\u22C5","\\cdotp"),vn(Rn,Wn,Cr,"#","\\#"),vn(Zr,Wn,Cr,"#","\\#"),vn(Rn,Wn,Cr,"&","\\&"),vn(Zr,Wn,Cr,"&","\\&"),vn(Rn,Wn,Cr,"\u2135","\\aleph",!0),vn(Rn,Wn,Cr,"\u2200","\\forall",!0),vn(Rn,Wn,Cr,"\u210F","\\hbar",!0),vn(Rn,Wn,Cr,"\u2203","\\exists",!0),vn(Rn,Wn,Cr,"\u2207","\\nabla",!0),vn(Rn,Wn,Cr,"\u266D","\\flat",!0),vn(Rn,Wn,Cr,"\u2113","\\ell",!0),vn(Rn,Wn,Cr,"\u266E","\\natural",!0),vn(Rn,Wn,Cr,"\u2663","\\clubsuit",!0),vn(Rn,Wn,Cr,"\u2118","\\wp",!0),vn(Rn,Wn,Cr,"\u266F","\\sharp",!0),vn(Rn,Wn,Cr,"\u2662","\\diamondsuit",!0),vn(Rn,Wn,Cr,"\u211C","\\Re",!0),vn(Rn,Wn,Cr,"\u2661","\\heartsuit",!0),vn(Rn,Wn,Cr,"\u2111","\\Im",!0),vn(Rn,Wn,Cr,"\u2660","\\spadesuit",!0),vn(Zr,Wn,Cr,"\xA7","\\S",!0),vn(Zr,Wn,Cr,"\xB6","\\P",!0),vn(Rn,Wn,Cr,"\u2020","\\dag"),vn(Zr,Wn,Cr,"\u2020","\\dag"),vn(Zr,Wn,Cr,"\u2020","\\textdagger"),vn(Rn,Wn,Cr,"\u2021","\\ddag"),vn(Zr,Wn,Cr,"\u2021","\\ddag"),vn(Zr,Wn,Cr,"\u2021","\\textdaggerdbl"),vn(Rn,Wn,Go,"\u23B1","\\rmoustache",!0),vn(Rn,Wn,Ro,"\u23B0","\\lmoustache",!0),vn(Rn,Wn,Go,"\u27EF","\\rgroup",!0),vn(Rn,Wn,Ro,"\u27EE","\\lgroup",!0),vn(Rn,Wn,Kr,"\u2213","\\mp",!0),vn(Rn,Wn,Kr,"\u2296","\\ominus",!0),vn(Rn,Wn,Kr,"\u228E","\\uplus",!0),vn(Rn,Wn,Kr,"\u2293","\\sqcap",!0),vn(Rn,Wn,Kr,"\u2217","\\ast"),vn(Rn,Wn,Kr,"\u2294","\\sqcup",!0),vn(Rn,Wn,Kr,"\u25EF","\\bigcirc"),vn(Rn,Wn,Kr,"\u2219","\\bullet"),vn(Rn,Wn,Kr,"\u2021","\\ddagger"),vn(Rn,Wn,Kr,"\u2240","\\wr",!0),vn(Rn,Wn,Kr,"\u2A3F","\\amalg"),vn(Rn,Wn,Kr,"&","\\And"),vn(Rn,Wn,lr,"\u27F5","\\longleftarrow",!0),vn(Rn,Wn,lr,"\u21D0","\\Leftarrow",!0),vn(Rn,Wn,lr,"\u27F8","\\Longleftarrow",!0),vn(Rn,Wn,lr,"\u27F6","\\longrightarrow",!0),vn(Rn,Wn,lr,"\u21D2","\\Rightarrow",!0),vn(Rn,Wn,lr,"\u27F9","\\Longrightarrow",!0),vn(Rn,Wn,lr,"\u2194","\\leftrightarrow",!0),vn(Rn,Wn,lr,"\u27F7","\\longleftrightarrow",!0),vn(Rn,Wn,lr,"\u21D4","\\Leftrightarrow",!0),vn(Rn,Wn,lr,"\u27FA","\\Longleftrightarrow",!0),vn(Rn,Wn,lr,"\u21A6","\\mapsto",!0),vn(Rn,Wn,lr,"\u27FC","\\longmapsto",!0),vn(Rn,Wn,lr,"\u2197","\\nearrow",!0),vn(Rn,Wn,lr,"\u21A9","\\hookleftarrow",!0),vn(Rn,Wn,lr,"\u21AA","\\hookrightarrow",!0),vn(Rn,Wn,lr,"\u2198","\\searrow",!0),vn(Rn,Wn,lr,"\u21BC","\\leftharpoonup",!0),vn(Rn,Wn,lr,"\u21C0","\\rightharpoonup",!0),vn(Rn,Wn,lr,"\u2199","\\swarrow",!0),vn(Rn,Wn,lr,"\u21BD","\\leftharpoondown",!0),vn(Rn,Wn,lr,"\u21C1","\\rightharpoondown",!0),vn(Rn,Wn,lr,"\u2196","\\nwarrow",!0),vn(Rn,Wn,lr,"\u21CC","\\rightleftharpoons",!0),vn(Rn,Kn,lr,"\u226E","\\nless",!0),vn(Rn,Kn,lr,"\uE010","\\@nleqslant"),vn(Rn,Kn,lr,"\uE011","\\@nleqq"),vn(Rn,Kn,lr,"\u2A87","\\lneq",!0),vn(Rn,Kn,lr,"\u2268","\\lneqq",!0),vn(Rn,Kn,lr,"\uE00C","\\@lvertneqq"),vn(Rn,Kn,lr,"\u22E6","\\lnsim",!0),vn(Rn,Kn,lr,"\u2A89","\\lnapprox",!0),vn(Rn,Kn,lr,"\u2280","\\nprec",!0),vn(Rn,Kn,lr,"\u22E0","\\npreceq",!0),vn(Rn,Kn,lr,"\u22E8","\\precnsim",!0),vn(Rn,Kn,lr,"\u2AB9","\\precnapprox",!0),vn(Rn,Kn,lr,"\u2241","\\nsim",!0),vn(Rn,Kn,lr,"\uE006","\\@nshortmid"),vn(Rn,Kn,lr,"\u2224","\\nmid",!0),vn(Rn,Kn,lr,"\u22AC","\\nvdash",!0),vn(Rn,Kn,lr,"\u22AD","\\nvDash",!0),vn(Rn,Kn,lr,"\u22EA","\\ntriangleleft"),vn(Rn,Kn,lr,"\u22EC","\\ntrianglelefteq",!0),vn(Rn,Kn,lr,"\u228A","\\subsetneq",!0),vn(Rn,Kn,lr,"\uE01A","\\@varsubsetneq"),vn(Rn,Kn,lr,"\u2ACB","\\subsetneqq",!0),vn(Rn,Kn,lr,"\uE017","\\@varsubsetneqq"),vn(Rn,Kn,lr,"\u226F","\\ngtr",!0),vn(Rn,Kn,lr,"\uE00F","\\@ngeqslant"),vn(Rn,Kn,lr,"\uE00E","\\@ngeqq"),vn(Rn,Kn,lr,"\u2A88","\\gneq",!0),vn(Rn,Kn,lr,"\u2269","\\gneqq",!0),vn(Rn,Kn,lr,"\uE00D","\\@gvertneqq"),vn(Rn,Kn,lr,"\u22E7","\\gnsim",!0),vn(Rn,Kn,lr,"\u2A8A","\\gnapprox",!0),vn(Rn,Kn,lr,"\u2281","\\nsucc",!0),vn(Rn,Kn,lr,"\u22E1","\\nsucceq",!0),vn(Rn,Kn,lr,"\u22E9","\\succnsim",!0),vn(Rn,Kn,lr,"\u2ABA","\\succnapprox",!0),vn(Rn,Kn,lr,"\u2246","\\ncong",!0),vn(Rn,Kn,lr,"\uE007","\\@nshortparallel"),vn(Rn,Kn,lr,"\u2226","\\nparallel",!0),vn(Rn,Kn,lr,"\u22AF","\\nVDash",!0),vn(Rn,Kn,lr,"\u22EB","\\ntriangleright"),vn(Rn,Kn,lr,"\u22ED","\\ntrianglerighteq",!0),vn(Rn,Kn,lr,"\uE018","\\@nsupseteqq"),vn(Rn,Kn,lr,"\u228B","\\supsetneq",!0),vn(Rn,Kn,lr,"\uE01B","\\@varsupsetneq"),vn(Rn,Kn,lr,"\u2ACC","\\supsetneqq",!0),vn(Rn,Kn,lr,"\uE019","\\@varsupsetneqq"),vn(Rn,Kn,lr,"\u22AE","\\nVdash",!0),vn(Rn,Kn,lr,"\u2AB5","\\precneqq",!0),vn(Rn,Kn,lr,"\u2AB6","\\succneqq",!0),vn(Rn,Kn,lr,"\uE016","\\@nsubseteqq"),vn(Rn,Kn,Kr,"\u22B4","\\unlhd"),vn(Rn,Kn,Kr,"\u22B5","\\unrhd"),vn(Rn,Kn,lr,"\u219A","\\nleftarrow",!0),vn(Rn,Kn,lr,"\u219B","\\nrightarrow",!0),vn(Rn,Kn,lr,"\u21CD","\\nLeftarrow",!0),vn(Rn,Kn,lr,"\u21CF","\\nRightarrow",!0),vn(Rn,Kn,lr,"\u21AE","\\nleftrightarrow",!0),vn(Rn,Kn,lr,"\u21CE","\\nLeftrightarrow",!0),vn(Rn,Kn,lr,"\u25B3","\\vartriangle"),vn(Rn,Kn,Cr,"\u210F","\\hslash"),vn(Rn,Kn,Cr,"\u25BD","\\triangledown"),vn(Rn,Kn,Cr,"\u25CA","\\lozenge"),vn(Rn,Kn,Cr,"\u24C8","\\circledS"),vn(Rn,Kn,Cr,"\xAE","\\circledR"),vn(Zr,Kn,Cr,"\xAE","\\circledR"),vn(Rn,Kn,Cr,"\u2221","\\measuredangle",!0),vn(Rn,Kn,Cr,"\u2204","\\nexists"),vn(Rn,Kn,Cr,"\u2127","\\mho"),vn(Rn,Kn,Cr,"\u2132","\\Finv",!0),vn(Rn,Kn,Cr,"\u2141","\\Game",!0),vn(Rn,Kn,Cr,"\u2035","\\backprime"),vn(Rn,Kn,Cr,"\u25B2","\\blacktriangle"),vn(Rn,Kn,Cr,"\u25BC","\\blacktriangledown"),vn(Rn,Kn,Cr,"\u25A0","\\blacksquare"),vn(Rn,Kn,Cr,"\u29EB","\\blacklozenge"),vn(Rn,Kn,Cr,"\u2605","\\bigstar"),vn(Rn,Kn,Cr,"\u2222","\\sphericalangle",!0),vn(Rn,Kn,Cr,"\u2201","\\complement",!0),vn(Rn,Kn,Cr,"\xF0","\\eth",!0),vn(Rn,Kn,Cr,"\u2571","\\diagup"),vn(Rn,Kn,Cr,"\u2572","\\diagdown"),vn(Rn,Kn,Cr,"\u25A1","\\square"),vn(Rn,Kn,Cr,"\u25A1","\\Box"),vn(Rn,Kn,Cr,"\u25CA","\\Diamond"),vn(Rn,Kn,Cr,"\xA5","\\yen",!0),vn(Zr,Kn,Cr,"\xA5","\\yen",!0),vn(Rn,Kn,Cr,"\u2713","\\checkmark",!0),vn(Zr,Kn,Cr,"\u2713","\\checkmark"),vn(Rn,Kn,Cr,"\u2136","\\beth",!0),vn(Rn,Kn,Cr,"\u2138","\\daleth",!0),vn(Rn,Kn,Cr,"\u2137","\\gimel",!0),vn(Rn,Kn,Cr,"\u03DD","\\digamma",!0),vn(Rn,Kn,Cr,"\u03F0","\\varkappa"),vn(Rn,Kn,Ro,"\u250C","\\ulcorner",!0),vn(Rn,Kn,Go,"\u2510","\\urcorner",!0),vn(Rn,Kn,Ro,"\u2514","\\llcorner",!0),vn(Rn,Kn,Go,"\u2518","\\lrcorner",!0),vn(Rn,Kn,lr,"\u2266","\\leqq",!0),vn(Rn,Kn,lr,"\u2A7D","\\leqslant",!0),vn(Rn,Kn,lr,"\u2A95","\\eqslantless",!0),vn(Rn,Kn,lr,"\u2272","\\lesssim",!0),vn(Rn,Kn,lr,"\u2A85","\\lessapprox",!0),vn(Rn,Kn,lr,"\u224A","\\approxeq",!0),vn(Rn,Kn,Kr,"\u22D6","\\lessdot"),vn(Rn,Kn,lr,"\u22D8","\\lll",!0),vn(Rn,Kn,lr,"\u2276","\\lessgtr",!0),vn(Rn,Kn,lr,"\u22DA","\\lesseqgtr",!0),vn(Rn,Kn,lr,"\u2A8B","\\lesseqqgtr",!0),vn(Rn,Kn,lr,"\u2251","\\doteqdot"),vn(Rn,Kn,lr,"\u2253","\\risingdotseq",!0),vn(Rn,Kn,lr,"\u2252","\\fallingdotseq",!0),vn(Rn,Kn,lr,"\u223D","\\backsim",!0),vn(Rn,Kn,lr,"\u22CD","\\backsimeq",!0),vn(Rn,Kn,lr,"\u2AC5","\\subseteqq",!0),vn(Rn,Kn,lr,"\u22D0","\\Subset",!0),vn(Rn,Kn,lr,"\u228F","\\sqsubset",!0),vn(Rn,Kn,lr,"\u227C","\\preccurlyeq",!0),vn(Rn,Kn,lr,"\u22DE","\\curlyeqprec",!0),vn(Rn,Kn,lr,"\u227E","\\precsim",!0),vn(Rn,Kn,lr,"\u2AB7","\\precapprox",!0),vn(Rn,Kn,lr,"\u22B2","\\vartriangleleft"),vn(Rn,Kn,lr,"\u22B4","\\trianglelefteq"),vn(Rn,Kn,lr,"\u22A8","\\vDash",!0),vn(Rn,Kn,lr,"\u22AA","\\Vvdash",!0),vn(Rn,Kn,lr,"\u2323","\\smallsmile"),vn(Rn,Kn,lr,"\u2322","\\smallfrown"),vn(Rn,Kn,lr,"\u224F","\\bumpeq",!0),vn(Rn,Kn,lr,"\u224E","\\Bumpeq",!0),vn(Rn,Kn,lr,"\u2267","\\geqq",!0),vn(Rn,Kn,lr,"\u2A7E","\\geqslant",!0),vn(Rn,Kn,lr,"\u2A96","\\eqslantgtr",!0),vn(Rn,Kn,lr,"\u2273","\\gtrsim",!0),vn(Rn,Kn,lr,"\u2A86","\\gtrapprox",!0),vn(Rn,Kn,Kr,"\u22D7","\\gtrdot"),vn(Rn,Kn,lr,"\u22D9","\\ggg",!0),vn(Rn,Kn,lr,"\u2277","\\gtrless",!0),vn(Rn,Kn,lr,"\u22DB","\\gtreqless",!0),vn(Rn,Kn,lr,"\u2A8C","\\gtreqqless",!0),vn(Rn,Kn,lr,"\u2256","\\eqcirc",!0),vn(Rn,Kn,lr,"\u2257","\\circeq",!0),vn(Rn,Kn,lr,"\u225C","\\triangleq",!0),vn(Rn,Kn,lr,"\u223C","\\thicksim"),vn(Rn,Kn,lr,"\u2248","\\thickapprox"),vn(Rn,Kn,lr,"\u2AC6","\\supseteqq",!0),vn(Rn,Kn,lr,"\u22D1","\\Supset",!0),vn(Rn,Kn,lr,"\u2290","\\sqsupset",!0),vn(Rn,Kn,lr,"\u227D","\\succcurlyeq",!0),vn(Rn,Kn,lr,"\u22DF","\\curlyeqsucc",!0),vn(Rn,Kn,lr,"\u227F","\\succsim",!0),vn(Rn,Kn,lr,"\u2AB8","\\succapprox",!0),vn(Rn,Kn,lr,"\u22B3","\\vartriangleright"),vn(Rn,Kn,lr,"\u22B5","\\trianglerighteq"),vn(Rn,Kn,lr,"\u22A9","\\Vdash",!0),vn(Rn,Kn,lr,"\u2223","\\shortmid"),vn(Rn,Kn,lr,"\u2225","\\shortparallel"),vn(Rn,Kn,lr,"\u226C","\\between",!0),vn(Rn,Kn,lr,"\u22D4","\\pitchfork",!0),vn(Rn,Kn,lr,"\u221D","\\varpropto"),vn(Rn,Kn,lr,"\u25C0","\\blacktriangleleft"),vn(Rn,Kn,lr,"\u2234","\\therefore",!0),vn(Rn,Kn,lr,"\u220D","\\backepsilon"),vn(Rn,Kn,lr,"\u25B6","\\blacktriangleright"),vn(Rn,Kn,lr,"\u2235","\\because",!0),vn(Rn,Kn,lr,"\u22D8","\\llless"),vn(Rn,Kn,lr,"\u22D9","\\gggtr"),vn(Rn,Kn,Kr,"\u22B2","\\lhd"),vn(Rn,Kn,Kr,"\u22B3","\\rhd"),vn(Rn,Kn,lr,"\u2242","\\eqsim",!0),vn(Rn,Wn,lr,"\u22C8","\\Join"),vn(Rn,Kn,lr,"\u2251","\\Doteq",!0),vn(Rn,Kn,Kr,"\u2214","\\dotplus",!0),vn(Rn,Kn,Kr,"\u2216","\\smallsetminus"),vn(Rn,Kn,Kr,"\u22D2","\\Cap",!0),vn(Rn,Kn,Kr,"\u22D3","\\Cup",!0),vn(Rn,Kn,Kr,"\u2A5E","\\doublebarwedge",!0),vn(Rn,Kn,Kr,"\u229F","\\boxminus",!0),vn(Rn,Kn,Kr,"\u229E","\\boxplus",!0),vn(Rn,Kn,Kr,"\u22C7","\\divideontimes",!0),vn(Rn,Kn,Kr,"\u22C9","\\ltimes",!0),vn(Rn,Kn,Kr,"\u22CA","\\rtimes",!0),vn(Rn,Kn,Kr,"\u22CB","\\leftthreetimes",!0),vn(Rn,Kn,Kr,"\u22CC","\\rightthreetimes",!0),vn(Rn,Kn,Kr,"\u22CF","\\curlywedge",!0),vn(Rn,Kn,Kr,"\u22CE","\\curlyvee",!0),vn(Rn,Kn,Kr,"\u229D","\\circleddash",!0),vn(Rn,Kn,Kr,"\u229B","\\circledast",!0),vn(Rn,Kn,Kr,"\u22C5","\\centerdot"),vn(Rn,Kn,Kr,"\u22BA","\\intercal",!0),vn(Rn,Kn,Kr,"\u22D2","\\doublecap"),vn(Rn,Kn,Kr,"\u22D3","\\doublecup"),vn(Rn,Kn,Kr,"\u22A0","\\boxtimes",!0),vn(Rn,Kn,lr,"\u21E2","\\dashrightarrow",!0),vn(Rn,Kn,lr,"\u21E0","\\dashleftarrow",!0),vn(Rn,Kn,lr,"\u21C7","\\leftleftarrows",!0),vn(Rn,Kn,lr,"\u21C6","\\leftrightarrows",!0),vn(Rn,Kn,lr,"\u21DA","\\Lleftarrow",!0),vn(Rn,Kn,lr,"\u219E","\\twoheadleftarrow",!0),vn(Rn,Kn,lr,"\u21A2","\\leftarrowtail",!0),vn(Rn,Kn,lr,"\u21AB","\\looparrowleft",!0),vn(Rn,Kn,lr,"\u21CB","\\leftrightharpoons",!0),vn(Rn,Kn,lr,"\u21B6","\\curvearrowleft",!0),vn(Rn,Kn,lr,"\u21BA","\\circlearrowleft",!0),vn(Rn,Kn,lr,"\u21B0","\\Lsh",!0),vn(Rn,Kn,lr,"\u21C8","\\upuparrows",!0),vn(Rn,Kn,lr,"\u21BF","\\upharpoonleft",!0),vn(Rn,Kn,lr,"\u21C3","\\downharpoonleft",!0),vn(Rn,Kn,lr,"\u22B8","\\multimap",!0),vn(Rn,Kn,lr,"\u21AD","\\leftrightsquigarrow",!0),vn(Rn,Kn,lr,"\u21C9","\\rightrightarrows",!0),vn(Rn,Kn,lr,"\u21C4","\\rightleftarrows",!0),vn(Rn,Kn,lr,"\u21A0","\\twoheadrightarrow",!0),vn(Rn,Kn,lr,"\u21A3","\\rightarrowtail",!0),vn(Rn,Kn,lr,"\u21AC","\\looparrowright",!0),vn(Rn,Kn,lr,"\u21B7","\\curvearrowright",!0),vn(Rn,Kn,lr,"\u21BB","\\circlearrowright",!0),vn(Rn,Kn,lr,"\u21B1","\\Rsh",!0),vn(Rn,Kn,lr,"\u21CA","\\downdownarrows",!0),vn(Rn,Kn,lr,"\u21BE","\\upharpoonright",!0),vn(Rn,Kn,lr,"\u21C2","\\downharpoonright",!0),vn(Rn,Kn,lr,"\u21DD","\\rightsquigarrow",!0),vn(Rn,Kn,lr,"\u21DD","\\leadsto"),vn(Rn,Kn,lr,"\u21DB","\\Rrightarrow",!0),vn(Rn,Kn,lr,"\u21BE","\\restriction"),vn(Rn,Wn,Cr,"\u2018","`"),vn(Rn,Wn,Cr,"$","\\$"),vn(Zr,Wn,Cr,"$","\\$"),vn(Zr,Wn,Cr,"$","\\textdollar"),vn(Rn,Wn,Cr,"%","\\%"),vn(Zr,Wn,Cr,"%","\\%"),vn(Rn,Wn,Cr,"_","\\_"),vn(Zr,Wn,Cr,"_","\\_"),vn(Zr,Wn,Cr,"_","\\textunderscore"),vn(Rn,Wn,Cr,"\u2220","\\angle",!0),vn(Rn,Wn,Cr,"\u221E","\\infty",!0),vn(Rn,Wn,Cr,"\u2032","\\prime"),vn(Rn,Wn,Cr,"\u25B3","\\triangle"),vn(Rn,Wn,Cr,"\u0393","\\Gamma",!0),vn(Rn,Wn,Cr,"\u0394","\\Delta",!0),vn(Rn,Wn,Cr,"\u0398","\\Theta",!0),vn(Rn,Wn,Cr,"\u039B","\\Lambda",!0),vn(Rn,Wn,Cr,"\u039E","\\Xi",!0),vn(Rn,Wn,Cr,"\u03A0","\\Pi",!0),vn(Rn,Wn,Cr,"\u03A3","\\Sigma",!0),vn(Rn,Wn,Cr,"\u03A5","\\Upsilon",!0),vn(Rn,Wn,Cr,"\u03A6","\\Phi",!0),vn(Rn,Wn,Cr,"\u03A8","\\Psi",!0),vn(Rn,Wn,Cr,"\u03A9","\\Omega",!0),vn(Rn,Wn,Cr,"A","\u0391"),vn(Rn,Wn,Cr,"B","\u0392"),vn(Rn,Wn,Cr,"E","\u0395"),vn(Rn,Wn,Cr,"Z","\u0396"),vn(Rn,Wn,Cr,"H","\u0397"),vn(Rn,Wn,Cr,"I","\u0399"),vn(Rn,Wn,Cr,"K","\u039A"),vn(Rn,Wn,Cr,"M","\u039C"),vn(Rn,Wn,Cr,"N","\u039D"),vn(Rn,Wn,Cr,"O","\u039F"),vn(Rn,Wn,Cr,"P","\u03A1"),vn(Rn,Wn,Cr,"T","\u03A4"),vn(Rn,Wn,Cr,"X","\u03A7"),vn(Rn,Wn,Cr,"\xAC","\\neg",!0),vn(Rn,Wn,Cr,"\xAC","\\lnot"),vn(Rn,Wn,Cr,"\u22A4","\\top"),vn(Rn,Wn,Cr,"\u22A5","\\bot"),vn(Rn,Wn,Cr,"\u2205","\\emptyset"),vn(Rn,Kn,Cr,"\u2205","\\varnothing"),vn(Rn,Wn,Hr,"\u03B1","\\alpha",!0),vn(Rn,Wn,Hr,"\u03B2","\\beta",!0),vn(Rn,Wn,Hr,"\u03B3","\\gamma",!0),vn(Rn,Wn,Hr,"\u03B4","\\delta",!0),vn(Rn,Wn,Hr,"\u03F5","\\epsilon",!0),vn(Rn,Wn,Hr,"\u03B6","\\zeta",!0),vn(Rn,Wn,Hr,"\u03B7","\\eta",!0),vn(Rn,Wn,Hr,"\u03B8","\\theta",!0),vn(Rn,Wn,Hr,"\u03B9","\\iota",!0),vn(Rn,Wn,Hr,"\u03BA","\\kappa",!0),vn(Rn,Wn,Hr,"\u03BB","\\lambda",!0),vn(Rn,Wn,Hr,"\u03BC","\\mu",!0),vn(Rn,Wn,Hr,"\u03BD","\\nu",!0),vn(Rn,Wn,Hr,"\u03BE","\\xi",!0),vn(Rn,Wn,Hr,"\u03BF","\\omicron",!0),vn(Rn,Wn,Hr,"\u03C0","\\pi",!0),vn(Rn,Wn,Hr,"\u03C1","\\rho",!0),vn(Rn,Wn,Hr,"\u03C3","\\sigma",!0),vn(Rn,Wn,Hr,"\u03C4","\\tau",!0),vn(Rn,Wn,Hr,"\u03C5","\\upsilon",!0),vn(Rn,Wn,Hr,"\u03D5","\\phi",!0),vn(Rn,Wn,Hr,"\u03C7","\\chi",!0),vn(Rn,Wn,Hr,"\u03C8","\\psi",!0),vn(Rn,Wn,Hr,"\u03C9","\\omega",!0),vn(Rn,Wn,Hr,"\u03B5","\\varepsilon",!0),vn(Rn,Wn,Hr,"\u03D1","\\vartheta",!0),vn(Rn,Wn,Hr,"\u03D6","\\varpi",!0),vn(Rn,Wn,Hr,"\u03F1","\\varrho",!0),vn(Rn,Wn,Hr,"\u03C2","\\varsigma",!0),vn(Rn,Wn,Hr,"\u03C6","\\varphi",!0),vn(Rn,Wn,Kr,"\u2217","*"),vn(Rn,Wn,Kr,"+","+"),vn(Rn,Wn,Kr,"\u2212","-"),vn(Rn,Wn,Kr,"\u22C5","\\cdot",!0),vn(Rn,Wn,Kr,"\u2218","\\circ"),vn(Rn,Wn,Kr,"\xF7","\\div",!0),vn(Rn,Wn,Kr,"\xB1","\\pm",!0),vn(Rn,Wn,Kr,"\xD7","\\times",!0),vn(Rn,Wn,Kr,"\u2229","\\cap",!0),vn(Rn,Wn,Kr,"\u222A","\\cup",!0),vn(Rn,Wn,Kr,"\u2216","\\setminus"),vn(Rn,Wn,Kr,"\u2227","\\land"),vn(Rn,Wn,Kr,"\u2228","\\lor"),vn(Rn,Wn,Kr,"\u2227","\\wedge",!0),vn(Rn,Wn,Kr,"\u2228","\\vee",!0),vn(Rn,Wn,Cr,"\u221A","\\surd"),vn(Rn,Wn,Ro,"(","("),vn(Rn,Wn,Ro,"[","["),vn(Rn,Wn,Ro,"\u27E8","\\langle",!0),vn(Rn,Wn,Ro,"\u2223","\\lvert"),vn(Rn,Wn,Ro,"\u2225","\\lVert"),vn(Rn,Wn,Go,")",")"),vn(Rn,Wn,Go,"]","]"),vn(Rn,Wn,Go,"?","?"),vn(Rn,Wn,Go,"!","!"),vn(Rn,Wn,Go,"\u27E9","\\rangle",!0),vn(Rn,Wn,Go,"\u2223","\\rvert"),vn(Rn,Wn,Go,"\u2225","\\rVert"),vn(Rn,Wn,lr,"=","="),vn(Rn,Wn,lr,"<","<"),vn(Rn,Wn,lr,">",">"),vn(Rn,Wn,lr,":",":"),vn(Rn,Wn,lr,"\u2248","\\approx",!0),vn(Rn,Wn,lr,"\u2245","\\cong",!0),vn(Rn,Wn,lr,"\u2265","\\ge"),vn(Rn,Wn,lr,"\u2265","\\geq",!0),vn(Rn,Wn,lr,"\u2190","\\gets"),vn(Rn,Wn,lr,">","\\gt"),vn(Rn,Wn,lr,"\u2208","\\in",!0),vn(Rn,Wn,lr,"\uE020","\\@not"),vn(Rn,Wn,lr,"\u2282","\\subset",!0),vn(Rn,Wn,lr,"\u2283","\\supset",!0),vn(Rn,Wn,lr,"\u2286","\\subseteq",!0),vn(Rn,Wn,lr,"\u2287","\\supseteq",!0),vn(Rn,Kn,lr,"\u2288","\\nsubseteq",!0),vn(Rn,Kn,lr,"\u2289","\\nsupseteq",!0),vn(Rn,Wn,lr,"\u22A8","\\models"),vn(Rn,Wn,lr,"\u2190","\\leftarrow",!0),vn(Rn,Wn,lr,"\u2264","\\le"),vn(Rn,Wn,lr,"\u2264","\\leq",!0),vn(Rn,Wn,lr,"<","\\lt"),vn(Rn,Wn,lr,"\u2192","\\rightarrow",!0),vn(Rn,Wn,lr,"\u2192","\\to"),vn(Rn,Kn,lr,"\u2271","\\ngeq",!0),vn(Rn,Kn,lr,"\u2270","\\nleq",!0),vn(Rn,Wn,Ho,"\xA0","\\ "),vn(Rn,Wn,Ho,"\xA0","~"),vn(Rn,Wn,Ho,"\xA0","\\space"),vn(Rn,Wn,Ho,"\xA0","\\nobreakspace"),vn(Zr,Wn,Ho,"\xA0","\\ "),vn(Zr,Wn,Ho,"\xA0","~"),vn(Zr,Wn,Ho,"\xA0","\\space"),vn(Zr,Wn,Ho,"\xA0","\\nobreakspace"),vn(Rn,Wn,Ho,null,"\\nobreak"),vn(Rn,Wn,Ho,null,"\\allowbreak"),vn(Rn,Wn,No,",",","),vn(Rn,Wn,No,";",";"),vn(Rn,Kn,Kr,"\u22BC","\\barwedge",!0),vn(Rn,Kn,Kr,"\u22BB","\\veebar",!0),vn(Rn,Wn,Kr,"\u2299","\\odot",!0),vn(Rn,Wn,Kr,"\u2295","\\oplus",!0),vn(Rn,Wn,Kr,"\u2297","\\otimes",!0),vn(Rn,Wn,Cr,"\u2202","\\partial",!0),vn(Rn,Wn,Kr,"\u2298","\\oslash",!0),vn(Rn,Kn,Kr,"\u229A","\\circledcirc",!0),vn(Rn,Kn,Kr,"\u22A1","\\boxdot",!0),vn(Rn,Wn,Kr,"\u25B3","\\bigtriangleup"),vn(Rn,Wn,Kr,"\u25BD","\\bigtriangledown"),vn(Rn,Wn,Kr,"\u2020","\\dagger"),vn(Rn,Wn,Kr,"\u22C4","\\diamond"),vn(Rn,Wn,Kr,"\u22C6","\\star"),vn(Rn,Wn,Kr,"\u25C3","\\triangleleft"),vn(Rn,Wn,Kr,"\u25B9","\\triangleright"),vn(Rn,Wn,Ro,"{","\\{"),vn(Zr,Wn,Cr,"{","\\{"),vn(Zr,Wn,Cr,"{","\\textbraceleft"),vn(Rn,Wn,Go,"}","\\}"),vn(Zr,Wn,Cr,"}","\\}"),vn(Zr,Wn,Cr,"}","\\textbraceright"),vn(Rn,Wn,Ro,"{","\\lbrace"),vn(Rn,Wn,Go,"}","\\rbrace"),vn(Rn,Wn,Ro,"[","\\lbrack"),vn(Zr,Wn,Cr,"[","\\lbrack"),vn(Rn,Wn,Go,"]","\\rbrack"),vn(Zr,Wn,Cr,"]","\\rbrack"),vn(Rn,Wn,Ro,"(","\\lparen"),vn(Rn,Wn,Go,")","\\rparen"),vn(Zr,Wn,Cr,"<","\\textless"),vn(Zr,Wn,Cr,">","\\textgreater"),vn(Rn,Wn,Ro,"\u230A","\\lfloor",!0),vn(Rn,Wn,Go,"\u230B","\\rfloor",!0),vn(Rn,Wn,Ro,"\u2308","\\lceil",!0),vn(Rn,Wn,Go,"\u2309","\\rceil",!0),vn(Rn,Wn,Cr,"\\","\\backslash"),vn(Rn,Wn,Cr,"\u2223","|"),vn(Rn,Wn,Cr,"\u2223","\\vert"),vn(Zr,Wn,Cr,"|","\\textbar"),vn(Rn,Wn,Cr,"\u2225","\\|"),vn(Rn,Wn,Cr,"\u2225","\\Vert"),vn(Zr,Wn,Cr,"\u2225","\\textbardbl"),vn(Zr,Wn,Cr,"~","\\textasciitilde"),vn(Zr,Wn,Cr,"\\","\\textbackslash"),vn(Zr,Wn,Cr,"^","\\textasciicircum"),vn(Rn,Wn,lr,"\u2191","\\uparrow",!0),vn(Rn,Wn,lr,"\u21D1","\\Uparrow",!0),vn(Rn,Wn,lr,"\u2193","\\downarrow",!0),vn(Rn,Wn,lr,"\u21D3","\\Downarrow",!0),vn(Rn,Wn,lr,"\u2195","\\updownarrow",!0),vn(Rn,Wn,lr,"\u21D5","\\Updownarrow",!0),vn(Rn,Wn,Lo,"\u2210","\\coprod"),vn(Rn,Wn,Lo,"\u22C1","\\bigvee"),vn(Rn,Wn,Lo,"\u22C0","\\bigwedge"),vn(Rn,Wn,Lo,"\u2A04","\\biguplus"),vn(Rn,Wn,Lo,"\u22C2","\\bigcap"),vn(Rn,Wn,Lo,"\u22C3","\\bigcup"),vn(Rn,Wn,Lo,"\u222B","\\int"),vn(Rn,Wn,Lo,"\u222B","\\intop"),vn(Rn,Wn,Lo,"\u222C","\\iint"),vn(Rn,Wn,Lo,"\u222D","\\iiint"),vn(Rn,Wn,Lo,"\u220F","\\prod"),vn(Rn,Wn,Lo,"\u2211","\\sum"),vn(Rn,Wn,Lo,"\u2A02","\\bigotimes"),vn(Rn,Wn,Lo,"\u2A01","\\bigoplus"),vn(Rn,Wn,Lo,"\u2A00","\\bigodot"),vn(Rn,Wn,Lo,"\u222E","\\oint"),vn(Rn,Wn,Lo,"\u222F","\\oiint"),vn(Rn,Wn,Lo,"\u2230","\\oiiint"),vn(Rn,Wn,Lo,"\u2A06","\\bigsqcup"),vn(Rn,Wn,Lo,"\u222B","\\smallint"),vn(Zr,Wn,io,"\u2026","\\textellipsis"),vn(Rn,Wn,io,"\u2026","\\mathellipsis"),vn(Zr,Wn,io,"\u2026","\\ldots",!0),vn(Rn,Wn,io,"\u2026","\\ldots",!0),vn(Rn,Wn,io,"\u22EF","\\@cdots",!0),vn(Rn,Wn,io,"\u22F1","\\ddots",!0),vn(Rn,Wn,Cr,"\u22EE","\\varvdots"),vn(Rn,Wn,Ur,"\u02CA","\\acute"),vn(Rn,Wn,Ur,"\u02CB","\\grave"),vn(Rn,Wn,Ur,"\xA8","\\ddot"),vn(Rn,Wn,Ur,"~","\\tilde"),vn(Rn,Wn,Ur,"\u02C9","\\bar"),vn(Rn,Wn,Ur,"\u02D8","\\breve"),vn(Rn,Wn,Ur,"\u02C7","\\check"),vn(Rn,Wn,Ur,"^","\\hat"),vn(Rn,Wn,Ur,"\u20D7","\\vec"),vn(Rn,Wn,Ur,"\u02D9","\\dot"),vn(Rn,Wn,Ur,"\u02DA","\\mathring"),vn(Rn,Wn,Hr,"\u0131","\\imath",!0),vn(Rn,Wn,Hr,"\u0237","\\jmath",!0),vn(Zr,Wn,Cr,"\u0131","\\i",!0),vn(Zr,Wn,Cr,"\u0237","\\j",!0),vn(Zr,Wn,Cr,"\xDF","\\ss",!0),vn(Zr,Wn,Cr,"\xE6","\\ae",!0),vn(Zr,Wn,Cr,"\xE6","\\ae",!0),vn(Zr,Wn,Cr,"\u0153","\\oe",!0),vn(Zr,Wn,Cr,"\xF8","\\o",!0),vn(Zr,Wn,Cr,"\xC6","\\AE",!0),vn(Zr,Wn,Cr,"\u0152","\\OE",!0),vn(Zr,Wn,Cr,"\xD8","\\O",!0),vn(Zr,Wn,Ur,"\u02CA","\\'"),vn(Zr,Wn,Ur,"\u02CB","\\`"),vn(Zr,Wn,Ur,"\u02C6","\\^"),vn(Zr,Wn,Ur,"\u02DC","\\~"),vn(Zr,Wn,Ur,"\u02C9","\\="),vn(Zr,Wn,Ur,"\u02D8","\\u"),vn(Zr,Wn,Ur,"\u02D9","\\."),vn(Zr,Wn,Ur,"\u02DA","\\r"),vn(Zr,Wn,Ur,"\u02C7","\\v"),vn(Zr,Wn,Ur,"\xA8",'\\"'),vn(Zr,Wn,Ur,"\u02DD","\\H"),vn(Zr,Wn,Ur,"\u25EF","\\textcircled");var Bs={"--":!0,"---":!0,"``":!0,"''":!0};vn(Zr,Wn,Cr,"\u2013","--"),vn(Zr,Wn,Cr,"\u2013","\\textendash"),vn(Zr,Wn,Cr,"\u2014","---"),vn(Zr,Wn,Cr,"\u2014","\\textemdash"),vn(Zr,Wn,Cr,"\u2018","`"),vn(Zr,Wn,Cr,"\u2018","\\textquoteleft"),vn(Zr,Wn,Cr,"\u2019","'"),vn(Zr,Wn,Cr,"\u2019","\\textquoteright"),vn(Zr,Wn,Cr,"\u201C","``"),vn(Zr,Wn,Cr,"\u201C","\\textquotedblleft"),vn(Zr,Wn,Cr,"\u201D","''"),vn(Zr,Wn,Cr,"\u201D","\\textquotedblright"),vn(Rn,Wn,Cr,"\xB0","\\degree",!0),vn(Zr,Wn,Cr,"\xB0","\\degree"),vn(Zr,Wn,Cr,"\xB0","\\textdegree",!0),vn(Rn,Wn,Hr,"\xA3","\\pounds"),vn(Rn,Wn,Hr,"\xA3","\\mathsterling",!0),vn(Zr,Wn,Hr,"\xA3","\\pounds"),vn(Zr,Wn,Hr,"\xA3","\\textsterling",!0),vn(Rn,Kn,Cr,"\u2720","\\maltese"),vn(Zr,Kn,Cr,"\u2720","\\maltese"),vn(Zr,Wn,Ho,"\xA0","\\ "),vn(Zr,Wn,Ho,"\xA0"," "),vn(Zr,Wn,Ho,"\xA0","~");for(var Dl='0123456789/@."',Sl=0;Sl<Dl.length;Sl++){var Os=Dl.charAt(Sl);vn(Rn,Wn,Cr,Os,Os)}for(var dl='0123456789!@*()-=+[]<>|";:?/.,',As=0;As<dl.length;As++){var ol=dl.charAt(As);vn(Zr,Wn,Cr,ol,ol)}for(var _l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ul=0;Ul<_l.length;Ul++){var zo=_l.charAt(Ul);vn(Rn,Wn,Hr,zo,zo),vn(Zr,Wn,Cr,zo,zo)}vn(Rn,Kn,Cr,"C","\u2102"),vn(Zr,Kn,Cr,"C","\u2102"),vn(Rn,Kn,Cr,"H","\u210D"),vn(Zr,Kn,Cr,"H","\u210D"),vn(Rn,Kn,Cr,"N","\u2115"),vn(Zr,Kn,Cr,"N","\u2115"),vn(Rn,Kn,Cr,"P","\u2119"),vn(Zr,Kn,Cr,"P","\u2119"),vn(Rn,Kn,Cr,"Q","\u211A"),vn(Zr,Kn,Cr,"Q","\u211A"),vn(Rn,Kn,Cr,"R","\u211D"),vn(Zr,Kn,Cr,"R","\u211D"),vn(Rn,Kn,Cr,"Z","\u2124"),vn(Zr,Kn,Cr,"Z","\u2124"),vn(Rn,Wn,Hr,"h","\u210E"),vn(Zr,Wn,Hr,"h","\u210E");for(var Zo="",Cs=0;Cs<_l.length;Cs++){var Rs=_l.charAt(Cs);Zo=String.fromCharCode(55349,56320+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56372+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56424+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56580+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56736+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56788+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56840+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56944+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Cs<26&&(Zo=String.fromCharCode(55349,56632+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo),Zo=String.fromCharCode(55349,56476+Cs),vn(Rn,Wn,Hr,Rs,Zo),vn(Zr,Wn,Cr,Rs,Zo))}Zo=String.fromCharCode(55349,56668),vn(Rn,Wn,Hr,"k",Zo),vn(Zr,Wn,Cr,"k",Zo);for(var Nl=0;Nl<10;Nl++){var wu=Nl.toString();Zo=String.fromCharCode(55349,57294+Nl),vn(Rn,Wn,Hr,wu,Zo),vn(Zr,Wn,Cr,wu,Zo),Zo=String.fromCharCode(55349,57314+Nl),vn(Rn,Wn,Hr,wu,Zo),vn(Zr,Wn,Cr,wu,Zo),Zo=String.fromCharCode(55349,57324+Nl),vn(Rn,Wn,Hr,wu,Zo),vn(Zr,Wn,Cr,wu,Zo),Zo=String.fromCharCode(55349,57334+Nl),vn(Rn,Wn,Hr,wu,Zo),vn(Zr,Wn,Cr,wu,Zo)}for(var um="\xC7\xD0\xDE\xE7\xFE",yu=0;yu<um.length;yu++){var Ou=um.charAt(yu);vn(Rn,Wn,Hr,Ou,Ou),vn(Zr,Wn,Cr,Ou,Ou)}vn(Zr,Wn,Cr,"\xF0","\xF0"),vn(Zr,Wn,Cr,"\u2013","\u2013"),vn(Zr,Wn,Cr,"\u2014","\u2014"),vn(Zr,Wn,Cr,"\u2018","\u2018"),vn(Zr,Wn,Cr,"\u2019","\u2019"),vn(Zr,Wn,Cr,"\u201C","\u201C"),vn(Zr,Wn,Cr,"\u201D","\u201D");var o1=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Ru=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Bm=function(jt,Kt){var Yt=jt.charCodeAt(0),mn=jt.charCodeAt(1),Cn=(Yt-55296)*1024+(mn-56320)+65536,kn=Kt==="math"?0:1;if(119808<=Cn&&Cn<120484){var qn=Math.floor((Cn-119808)/26);return[o1[qn][2],o1[qn][kn]]}else if(120782<=Cn&&Cn<=120831){var er=Math.floor((Cn-120782)/10);return[Ru[er][2],Ru[er][kn]]}else{if(Cn===120485||Cn===120486)return[o1[0][2],o1[0][kn]];if(120486<Cn&&Cn<120782)return["",""];throw new ft("Unsupported character: "+jt)}},m0=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],vp=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],s1=function(jt,Kt){return Kt.size<2?jt:m0[jt-1][Kt.size-1]},Wp=function(){function Mn(Kt){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=Kt.style,this.color=Kt.color,this.size=Kt.size||Mn.BASESIZE,this.textSize=Kt.textSize||this.size,this.phantom=!!Kt.phantom,this.font=Kt.font||"",this.fontFamily=Kt.fontFamily||"",this.fontWeight=Kt.fontWeight||"",this.fontShape=Kt.fontShape||"",this.sizeMultiplier=vp[this.size-1],this.maxSize=Kt.maxSize,this.minRuleThickness=Kt.minRuleThickness,this._fontMetrics=void 0}var jt=Mn.prototype;return jt.extend=function(Yt){var mn={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var Cn in Yt)Yt.hasOwnProperty(Cn)&&(mn[Cn]=Yt[Cn]);return new Mn(mn)},jt.havingStyle=function(Yt){return this.style===Yt?this:this.extend({style:Yt,size:s1(this.textSize,Yt)})},jt.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},jt.havingSize=function(Yt){return this.size===Yt&&this.textSize===Yt?this:this.extend({style:this.style.text(),size:Yt,textSize:Yt,sizeMultiplier:vp[Yt-1]})},jt.havingBaseStyle=function(Yt){Yt=Yt||this.style.text();var mn=s1(Mn.BASESIZE,Yt);return this.size===mn&&this.textSize===Mn.BASESIZE&&this.style===Yt?this:this.extend({style:Yt,size:mn})},jt.havingBaseSizing=function(){var Yt;switch(this.style.id){case 4:case 5:Yt=3;break;case 6:case 7:Yt=1;break;default:Yt=6}return this.extend({style:this.style.text(),size:Yt})},jt.withColor=function(Yt){return this.extend({color:Yt})},jt.withPhantom=function(){return this.extend({phantom:!0})},jt.withFont=function(Yt){return this.extend({font:Yt})},jt.withTextFontFamily=function(Yt){return this.extend({fontFamily:Yt,font:""})},jt.withTextFontWeight=function(Yt){return this.extend({fontWeight:Yt,font:""})},jt.withTextFontShape=function(Yt){return this.extend({fontShape:Yt,font:""})},jt.sizingClasses=function(Yt){return Yt.size!==this.size?["sizing","reset-size"+Yt.size,"size"+this.size]:[]},jt.baseSizingClasses=function(){return this.size!==Mn.BASESIZE?["sizing","reset-size"+this.size,"size"+Mn.BASESIZE]:[]},jt.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Qo(this.size)),this._fontMetrics},jt.getColor=function(){return this.phantom?"transparent":this.color},Mn}();Wp.BASESIZE=6;var bp=Wp,Yo={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ko={ex:!0,em:!0,mu:!0},po=function(jt){return typeof jt!="string"&&(jt=jt.unit),jt in Yo||jt in ko||jt==="ex"},qo=function(jt,Kt){var Yt;if(jt.unit in Yo)Yt=Yo[jt.unit]/Kt.fontMetrics().ptPerEm/Kt.sizeMultiplier;else if(jt.unit==="mu")Yt=Kt.fontMetrics().cssEmPerMu;else{var mn;if(Kt.style.isTight()?mn=Kt.havingStyle(Kt.style.text()):mn=Kt,jt.unit==="ex")Yt=mn.fontMetrics().xHeight;else if(jt.unit==="em")Yt=mn.fontMetrics().quad;else throw new ft("Invalid unit: '"+jt.unit+"'");mn!==Kt&&(Yt*=mn.sizeMultiplier/Kt.sizeMultiplier)}return Math.min(jt.number*Yt,Kt.maxSize)},Wl=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Vl=function(jt,Kt,Yt){return ws[Yt][jt]&&ws[Yt][jt].replace&&(jt=ws[Yt][jt].replace),{value:jt,metrics:Ts(jt,Kt,Yt)}},Zs=function(jt,Kt,Yt,mn,Cn){var kn=Vl(jt,Kt,Yt),qn=kn.metrics;jt=kn.value;var er;if(qn){var pr=qn.italic;(Yt==="text"||mn&&mn.font==="mathit")&&(pr=0),er=new $o(jt,qn.height,qn.depth,pr,qn.skew,qn.width,Cn)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+jt+"' in style '"+Kt+"' and mode '"+Yt+"'")),er=new $o(jt,0,0,0,0,0,Cn);if(mn){er.maxFontSize=mn.sizeMultiplier,mn.style.isTight()&&er.classes.push("mtight");var $r=mn.getColor();$r&&(er.style.color=$r)}return er},_d=function(jt,Kt,Yt,mn){return mn===void 0&&(mn=[]),Yt.font==="boldsymbol"&&Vl(jt,"Main-Bold",Kt).metrics?Zs(jt,"Main-Bold",Kt,Yt,mn.concat(["mathbf"])):jt==="\\"||ws[Kt][jt].font==="main"?Zs(jt,"Main-Regular",Kt,Yt,mn):Zs(jt,"AMS-Regular",Kt,Yt,mn.concat(["amsrm"]))},vu=function(jt,Kt,Yt,mn){return/[0-9]/.test(jt.charAt(0))||Ot.contains(Wl,jt)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Tp=function(jt,Kt,Yt,mn){return Ot.contains(Wl,jt)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(jt.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},P1=function(jt,Kt,Yt,mn){return Vl(jt,"Math-BoldItalic",Kt).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},cm=function(jt,Kt,Yt){var mn=jt.mode,Cn=jt.text,kn=["mord"],qn=mn==="math"||mn==="text"&&Kt.font,er=qn?Kt.font:Kt.fontFamily;if(Cn.charCodeAt(0)===55349){var pr=Bm(Cn,mn),$r=pr[0],Mr=pr[1];return Zs(Cn,$r,mn,Kt,kn.concat(Mr))}else if(er){var Yr,ho;if(er==="boldsymbol"||er==="mathnormal"){var wo=er==="boldsymbol"?P1(Cn,mn):Tp(Cn);Yr=wo.fontName,ho=[wo.fontClass]}else Ot.contains(Wl,Cn)?(Yr="Main-Italic",ho=["mathit"]):qn?(Yr=xp[er].fontName,ho=[er]):(Yr=dm(er,Kt.fontWeight,Kt.fontShape),ho=[er,Kt.fontWeight,Kt.fontShape]);if(Vl(Cn,Yr,mn).metrics)return Zs(Cn,Yr,mn,Kt,kn.concat(ho));if(Bs.hasOwnProperty(Cn)&&Yr.substr(0,10)==="Typewriter"){for(var Mo=[],os=0;os<Cn.length;os++)Mo.push(Zs(Cn[os],Yr,mn,Kt,kn.concat(ho)));return g0(Mo)}}if(Yt==="mathord"){var Ms=vu(Cn);return Zs(Cn,Ms.fontName,mn,Kt,kn.concat([Ms.fontClass]))}else if(Yt==="textord"){var Fs=ws[mn][Cn]&&ws[mn][Cn].font;if(Fs==="ams"){var Ls=dm("amsrm",Kt.fontWeight,Kt.fontShape);return Zs(Cn,Ls,mn,Kt,kn.concat("amsrm",Kt.fontWeight,Kt.fontShape))}else if(Fs==="main"||!Fs){var fl=dm("textrm",Kt.fontWeight,Kt.fontShape);return Zs(Cn,fl,mn,Kt,kn.concat(Kt.fontWeight,Kt.fontShape))}else{var ml=dm(Fs,Kt.fontWeight,Kt.fontShape);return Zs(Cn,ml,mn,Kt,kn.concat(ml,Kt.fontWeight,Kt.fontShape))}}else throw new Error("unexpected type: "+Yt+" in makeOrd")},Ep=function(jt,Kt){if(Ir(jt.classes)!==Ir(Kt.classes)||jt.skew!==Kt.skew||jt.maxFontSize!==Kt.maxFontSize)return!1;for(var Yt in jt.style)if(jt.style.hasOwnProperty(Yt)&&jt.style[Yt]!==Kt.style[Yt])return!1;for(var mn in Kt.style)if(Kt.style.hasOwnProperty(mn)&&jt.style[mn]!==Kt.style[mn])return!1;return!0},Ap=function(jt){for(var Kt=0;Kt<jt.length-1;Kt++){var Yt=jt[Kt],mn=jt[Kt+1];Yt instanceof $o&&mn instanceof $o&&Ep(Yt,mn)&&(Yt.text+=mn.text,Yt.height=Math.max(Yt.height,mn.height),Yt.depth=Math.max(Yt.depth,mn.depth),Yt.italic=mn.italic,jt.splice(Kt+1,1),Kt--)}return jt},_f=function(jt){for(var Kt=0,Yt=0,mn=0,Cn=0;Cn<jt.children.length;Cn++){var kn=jt.children[Cn];kn.height>Kt&&(Kt=kn.height),kn.depth>Yt&&(Yt=kn.depth),kn.maxFontSize>mn&&(mn=kn.maxFontSize)}jt.height=Kt,jt.depth=Yt,jt.maxFontSize=mn},uu=function(jt,Kt,Yt,mn){var Cn=new Xr(jt,Kt,Yt,mn);return _f(Cn),Cn},Hp=function(jt,Kt,Yt,mn){return new Xr(jt,Kt,Yt,mn)},$v=function(jt,Kt,Yt){var mn=uu([jt],[],Kt);return mn.height=Math.max(Yt||Kt.fontMetrics().defaultRuleThickness,Kt.minRuleThickness),mn.style.borderBottomWidth=mn.height+"em",mn.maxFontSize=1,mn},by=function(jt,Kt,Yt,mn){var Cn=new Jr(jt,Kt,Yt,mn);return _f(Cn),Cn},g0=function(jt){var Kt=new Nr(jt);return _f(Kt),Kt},Ty=function(jt,Kt){return jt instanceof Nr?uu([],[jt],Kt):jt},Ey=function(jt){if(jt.positionType==="individualShift"){for(var Kt=jt.children,Yt=[Kt[0]],mn=-Kt[0].shift-Kt[0].elem.depth,Cn=mn,kn=1;kn<Kt.length;kn++){var qn=-Kt[kn].shift-Cn-Kt[kn].elem.depth,er=qn-(Kt[kn-1].elem.height+Kt[kn-1].elem.depth);Cn=Cn+qn,Yt.push({type:"kern",size:er}),Yt.push(Kt[kn])}return{children:Yt,depth:mn}}var pr;if(jt.positionType==="top"){for(var $r=jt.positionData,Mr=0;Mr<jt.children.length;Mr++){var Yr=jt.children[Mr];$r-=Yr.type==="kern"?Yr.size:Yr.elem.height+Yr.elem.depth}pr=$r}else if(jt.positionType==="bottom")pr=-jt.positionData;else{var ho=jt.children[0];if(ho.type!=="elem")throw new Error('First child must have type "elem".');if(jt.positionType==="shift")pr=-ho.elem.depth-jt.positionData;else if(jt.positionType==="firstBaseline")pr=-ho.elem.depth;else throw new Error("Invalid positionType "+jt.positionType+".")}return{children:jt.children,depth:pr}},zm=function(jt,Kt){for(var Yt=Ey(jt),mn=Yt.children,Cn=Yt.depth,kn=0,qn=0;qn<mn.length;qn++){var er=mn[qn];if(er.type==="elem"){var pr=er.elem;kn=Math.max(kn,pr.maxFontSize,pr.height)}}kn+=2;var $r=uu(["pstrut"],[]);$r.style.height=kn+"em";for(var Mr=[],Yr=Cn,ho=Cn,wo=Cn,Mo=0;Mo<mn.length;Mo++){var os=mn[Mo];if(os.type==="kern")wo+=os.size;else{var Ms=os.elem,Fs=os.wrapperClasses||[],Ls=os.wrapperStyle||{},fl=uu(Fs,[$r,Ms],void 0,Ls);fl.style.top=-kn-wo-Ms.depth+"em",os.marginLeft&&(fl.style.marginLeft=os.marginLeft),os.marginRight&&(fl.style.marginRight=os.marginRight),Mr.push(fl),wo+=Ms.height+Ms.depth}Yr=Math.min(Yr,wo),ho=Math.max(ho,wo)}var ml=uu(["vlist"],Mr);ml.style.height=ho+"em";var Rl;if(Yr<0){var Ml=uu([],[]),Al=uu(["vlist"],[Ml]);Al.style.height=-Yr+"em";var tu=uu(["vlist-s"],[new $o("\u200B")]);Rl=[uu(["vlist-r"],[ml,tu]),uu(["vlist-r"],[Al])]}else Rl=[uu(["vlist-r"],[ml])];var zl=uu(["vlist-t"],Rl);return Rl.length===2&&zl.classes.push("vlist-t2"),zl.height=ho,zl.depth=-Yr,zl},v0=function(jt,Kt){var Yt=uu(["mspace"],[],Kt),mn=qo(jt,Kt);return Yt.style.marginRight=mn+"em",Yt},dm=function(jt,Kt,Yt){var mn="";switch(jt){case"amsrm":mn="AMS";break;case"textrm":mn="Main";break;case"textsf":mn="SansSerif";break;case"texttt":mn="Typewriter";break;default:mn=jt}var Cn;return Kt==="textbf"&&Yt==="textit"?Cn="BoldItalic":Kt==="textbf"?Cn="Bold":Kt==="textit"?Cn="Italic":Cn="Regular",mn+"-"+Cn},xp={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Up={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},wv=function(jt,Kt){var Yt=Up[jt],mn=Yt[0],Cn=Yt[1],kn=Yt[2],qn=new jo(mn),er=new Qr([qn],{width:Cn+"em",height:kn+"em",style:"width:"+Cn+"em",viewBox:"0 0 "+1e3*Cn+" "+1e3*kn,preserveAspectRatio:"xMinYMin"}),pr=Hp(["overlay"],[er],Kt);return pr.height=kn,pr.style.height=kn+"em",pr.style.width=Cn+"em",pr},Wr={fontMap:xp,makeSymbol:Zs,mathsym:_d,makeSpan:uu,makeSvgSpan:Hp,makeLineSpan:$v,makeAnchor:by,makeFragment:g0,wrapFragment:Ty,makeVList:zm,makeOrd:cm,makeGlue:v0,staticSvg:wv,svgData:Up,tryCombineChars:Ap};function ks(Mn,jt){var Kt=Jl(Mn,jt);if(!Kt)throw new Error("Expected node of type "+jt+", but got "+(Mn?"node of type "+Mn.type:String(Mn)));return Kt}function Jl(Mn,jt){return Mn&&Mn.type===jt?Mn:null}function M1(Mn,jt){var Kt=Iu(Mn,jt);if(!Kt)throw new Error('Expected node of type "atom" and family "'+jt+'", but got '+(Mn?Mn.type==="atom"?"atom of family "+Mn.family:"node of type "+Mn.type:String(Mn)));return Kt}function Iu(Mn,jt){return Mn&&Mn.type==="atom"&&Mn.family===jt?Mn:null}function Ay(Mn){var jt=Wm(Mn);if(!jt)throw new Error("Expected node of symbol group type, but got "+(Mn?"node of type "+Mn.type:String(Mn)));return jt}function Wm(Mn){return Mn&&(Mn.type==="atom"||Es.hasOwnProperty(Mn.type))?Mn:null}var Bl={number:3,unit:"mu"},gl={number:4,unit:"mu"},Qs={number:5,unit:"mu"},b0={mord:{mop:Bl,mbin:gl,mrel:Qs,minner:Bl},mop:{mord:Bl,mop:Bl,mrel:Qs,minner:Bl},mbin:{mord:gl,mop:gl,mopen:gl,minner:gl},mrel:{mord:Qs,mop:Qs,mopen:Qs,minner:Qs},mopen:{},mclose:{mop:Bl,mbin:gl,mrel:Qs,minner:Bl},mpunct:{mord:Bl,mop:Bl,mrel:Qs,mopen:Bl,mclose:Bl,mpunct:Bl,minner:Bl},minner:{mord:Bl,mop:Bl,mbin:gl,mrel:Qs,mopen:Bl,mpunct:Bl,minner:Bl}},xy={mord:{mop:Bl},mop:{mord:Bl,mop:Bl},mbin:{},mrel:{},mopen:{},mclose:{mop:Bl},mpunct:{},minner:{mop:Bl}},jm={},Cp={},Hm={};function ds(Mn){for(var jt=Mn.type,Kt=Mn.names,Yt=Mn.props,mn=Mn.handler,Cn=Mn.htmlBuilder,kn=Mn.mathmlBuilder,qn={type:jt,numArgs:Yt.numArgs,argTypes:Yt.argTypes,greediness:Yt.greediness===void 0?1:Yt.greediness,allowedInText:!!Yt.allowedInText,allowedInMath:Yt.allowedInMath===void 0?!0:Yt.allowedInMath,numOptionalArgs:Yt.numOptionalArgs||0,infix:!!Yt.infix,handler:mn},er=0;er<Kt.length;++er)jm[Kt[er]]=qn;jt&&(Cn&&(Cp[jt]=Cn),kn&&(Hm[jt]=kn))}function Sp(Mn){var jt=Mn.type,Kt=Mn.htmlBuilder,Yt=Mn.mathmlBuilder;ds({type:jt,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:Kt,mathmlBuilder:Yt})}var iu=function(jt){var Kt=Jl(jt,"ordgroup");return Kt?Kt.body:[jt]},Pl=Wr.makeSpan,T0=["leftmost","mbin","mopen","mrel","mop","mpunct"],l1=["rightmost","mrel","mclose","mpunct"],Cy={display:En.DISPLAY,text:En.TEXT,script:En.SCRIPT,scriptscript:En.SCRIPTSCRIPT},E0={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},qs=function(jt,Kt,Yt,mn){mn===void 0&&(mn=[null,null]);for(var Cn=[],kn=0;kn<jt.length;kn++){var qn=Js(jt[kn],Kt);if(qn instanceof Nr){var er=qn.children;Cn.push.apply(Cn,er)}else Cn.push(qn)}if(!Yt)return Cn;var pr=Kt;if(jt.length===1){var $r=Jl(jt[0],"sizing")||Jl(jt[0],"styling");$r&&($r.type==="sizing"?pr=Kt.havingSize($r.size):$r.type==="styling"&&(pr=Kt.havingStyle(Cy[$r.style])))}var Mr=Pl([mn[0]||"leftmost"],[],Kt),Yr=Pl([mn[1]||"rightmost"],[],Kt);return ep(Cn,function(ho,wo){var Mo=wo.classes[0],os=ho.classes[0];Mo==="mbin"&&Ot.contains(l1,os)?wo.classes[0]="mord":os==="mbin"&&Ot.contains(T0,Mo)&&(ho.classes[0]="mord")},{node:Mr},Yr),ep(Cn,function(ho,wo){var Mo=fm(wo),os=fm(ho),Ms=Mo&&os?ho.hasClass("mtight")?xy[Mo][os]:b0[Mo][os]:null;if(Ms)return Wr.makeGlue(Ms,pr)},{node:Mr},Yr),Cn},ep=function Mn(jt,Kt,Yt,mn){mn&&jt.push(mn);for(var Cn=0;Cn<jt.length;Cn++){var kn=jt[Cn],qn=A0(kn);if(qn){Mn(qn.children,Kt,Yt);continue}if(kn.classes[0]!=="mspace"){var er=Kt(kn,Yt.node);er&&(Yt.insertAfter?Yt.insertAfter(er):(jt.unshift(er),Cn++)),Yt.node=kn,Yt.insertAfter=function(pr){return function($r){jt.splice(pr+1,0,$r),Cn++}}(Cn)}}mn&&jt.pop()},A0=function(jt){return jt instanceof Nr||jt instanceof Jr?jt:null},C0=function Mn(jt,Kt){var Yt=A0(jt);if(Yt){var mn=Yt.children;if(mn.length){if(Kt==="right")return Mn(mn[mn.length-1],"right");if(Kt==="left")return Mn(mn[0],"left")}}return jt},fm=function(jt,Kt){return jt?(Kt&&(jt=C0(jt,Kt)),E0[jt.classes[0]]||null):null},F1=function(jt,Kt){var Yt=["nulldelimiter"].concat(jt.baseSizingClasses());return Pl(Kt.concat(Yt))},Js=function(jt,Kt,Yt){if(!jt)return Pl();if(Cp[jt.type]){var mn=Cp[jt.type](jt,Kt);if(Yt&&Kt.size!==Yt.size){mn=Pl(Kt.sizingClasses(Yt),[mn],Kt);var Cn=Kt.sizeMultiplier/Yt.sizeMultiplier;mn.height*=Cn,mn.depth*=Cn}return mn}else throw new ft("Got group of unknown type: '"+jt.type+"'")};function Gl(Mn,jt){var Kt=Pl(["base"],Mn,jt),Yt=Pl(["strut"]);return Yt.style.height=Kt.height+Kt.depth+"em",Yt.style.verticalAlign=-Kt.depth+"em",Kt.children.unshift(Yt),Kt}function pm(Mn,jt){var Kt=null;Mn.length===1&&Mn[0].type==="tag"&&(Kt=Mn[0].tag,Mn=Mn[0].body);for(var Yt=qs(Mn,jt,!0),mn=[],Cn=[],kn=0;kn<Yt.length;kn++)if(Cn.push(Yt[kn]),Yt[kn].hasClass("mbin")||Yt[kn].hasClass("mrel")||Yt[kn].hasClass("allowbreak")){for(var qn=!1;kn<Yt.length-1&&Yt[kn+1].hasClass("mspace")&&!Yt[kn+1].hasClass("newline");)kn++,Cn.push(Yt[kn]),Yt[kn].hasClass("nobreak")&&(qn=!0);qn||(mn.push(Gl(Cn,jt)),Cn=[])}else Yt[kn].hasClass("newline")&&(Cn.pop(),Cn.length>0&&(mn.push(Gl(Cn,jt)),Cn=[]),mn.push(Yt[kn]));Cn.length>0&&mn.push(Gl(Cn,jt));var er;Kt&&(er=Gl(qs(Kt,jt,!0)),er.classes=["tag"],mn.push(er));var pr=Pl(["katex-html"],mn);if(pr.setAttribute("aria-hidden","true"),er){var $r=er.children[0];$r.style.height=pr.height+pr.depth+"em",$r.style.verticalAlign=-pr.depth+"em"}return pr}function ql(Mn){return new Nr(Mn)}var cu=function(){function Mn(Kt,Yt){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=Kt,this.attributes={},this.children=Yt||[]}var jt=Mn.prototype;return jt.setAttribute=function(Yt,mn){this.attributes[Yt]=mn},jt.getAttribute=function(Yt){return this.attributes[Yt]},jt.toNode=function(){var Yt=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var mn in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,mn)&&Yt.setAttribute(mn,this.attributes[mn]);for(var Cn=0;Cn<this.children.length;Cn++)Yt.appendChild(this.children[Cn].toNode());return Yt},jt.toMarkup=function(){var Yt="<"+this.type;for(var mn in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,mn)&&(Yt+=" "+mn+'="',Yt+=Ot.escape(this.attributes[mn]),Yt+='"');Yt+=">";for(var Cn=0;Cn<this.children.length;Cn++)Yt+=this.children[Cn].toMarkup();return Yt+="</"+this.type+">",Yt},jt.toText=function(){return this.children.map(function(Yt){return Yt.toText()}).join("")},Mn}(),L1=function(){function Mn(Kt){this.text=void 0,this.text=Kt}var jt=Mn.prototype;return jt.toNode=function(){return document.createTextNode(this.text)},jt.toMarkup=function(){return Ot.escape(this.toText())},jt.toText=function(){return this.text},Mn}(),tp=function(){function Mn(Kt){this.width=void 0,this.character=void 0,this.width=Kt,Kt>=.05555&&Kt<=.05556?this.character="\u200A":Kt>=.1666&&Kt<=.1667?this.character="\u2009":Kt>=.2222&&Kt<=.2223?this.character="\u2005":Kt>=.2777&&Kt<=.2778?this.character="\u2005\u200A":Kt>=-.05556&&Kt<=-.05555?this.character="\u200A\u2063":Kt>=-.1667&&Kt<=-.1666?this.character="\u2009\u2063":Kt>=-.2223&&Kt<=-.2222?this.character="\u205F\u2063":Kt>=-.2778&&Kt<=-.2777?this.character="\u2005\u2063":this.character=null}var jt=Mn.prototype;return jt.toNode=function(){if(this.character)return document.createTextNode(this.character);var Yt=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return Yt.setAttribute("width",this.width+"em"),Yt},jt.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},jt.toText=function(){return this.character?this.character:" "},Mn}(),xo={MathNode:cu,TextNode:L1,SpaceNode:tp,newDocumentFragment:ql},bu=function(jt,Kt,Yt){return ws[Kt][jt]&&ws[Kt][jt].replace&&jt.charCodeAt(0)!==55349&&!(Bs.hasOwnProperty(jt)&&Yt&&(Yt.fontFamily&&Yt.fontFamily.substr(4,2)==="tt"||Yt.font&&Yt.font.substr(4,2)==="tt"))&&(jt=ws[Kt][jt].replace),new xo.TextNode(jt)},$l=function(jt){return jt.length===1?jt[0]:new xo.MathNode("mrow",jt)},Du=function(jt,Kt){if(Kt.fontFamily==="texttt")return"monospace";if(Kt.fontFamily==="textsf")return Kt.fontShape==="textit"&&Kt.fontWeight==="textbf"?"sans-serif-bold-italic":Kt.fontShape==="textit"?"sans-serif-italic":Kt.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(Kt.fontShape==="textit"&&Kt.fontWeight==="textbf")return"bold-italic";if(Kt.fontShape==="textit")return"italic";if(Kt.fontWeight==="textbf")return"bold";var Yt=Kt.font;if(!Yt||Yt==="mathnormal")return null;var mn=jt.mode;if(Yt==="mathit")return"italic";if(Yt==="boldsymbol")return"bold-italic";if(Yt==="mathbf")return"bold";if(Yt==="mathbb")return"double-struck";if(Yt==="mathfrak")return"fraktur";if(Yt==="mathscr"||Yt==="mathcal")return"script";if(Yt==="mathsf")return"sans-serif";if(Yt==="mathtt")return"monospace";var Cn=jt.text;if(Ot.contains(["\\imath","\\jmath"],Cn))return null;ws[mn][Cn]&&ws[mn][Cn].replace&&(Cn=ws[mn][Cn].replace);var kn=Wr.fontMap[Yt].fontName;return Ts(Cn,kn,mn)?Wr.fontMap[Yt].variant:null},du=function(jt,Kt,Yt){if(jt.length===1){var mn=Ol(jt[0],Kt);return Yt&&mn instanceof cu&&mn.type==="mo"&&(mn.setAttribute("lspace","0em"),mn.setAttribute("rspace","0em")),[mn]}for(var Cn=[],kn,qn=0;qn<jt.length;qn++){var er=Ol(jt[qn],Kt);if(er instanceof cu&&kn instanceof cu){if(er.type==="mtext"&&kn.type==="mtext"&&er.getAttribute("mathvariant")===kn.getAttribute("mathvariant")){var pr;(pr=kn.children).push.apply(pr,er.children);continue}else if(er.type==="mn"&&kn.type==="mn"){var $r;($r=kn.children).push.apply($r,er.children);continue}else if(er.type==="mi"&&er.children.length===1&&kn.type==="mn"){var Mr=er.children[0];if(Mr instanceof L1&&Mr.text==="."){var Yr;(Yr=kn.children).push.apply(Yr,er.children);continue}}else if(kn.type==="mi"&&kn.children.length===1){var ho=kn.children[0];if(ho instanceof L1&&ho.text==="\u0338"&&(er.type==="mo"||er.type==="mi"||er.type==="mn")){var wo=er.children[0];wo instanceof L1&&wo.text.length>0&&(wo.text=wo.text.slice(0,1)+"\u0338"+wo.text.slice(1),Cn.pop())}}}Cn.push(er),kn=er}return Cn},Vp=function(jt,Kt,Yt){return $l(du(jt,Kt,Yt))},Ol=function(jt,Kt){if(!jt)return new xo.MathNode("mrow");if(Hm[jt.type]){var Yt=Hm[jt.type](jt,Kt);return Yt}else throw new ft("Got group of unknown type: '"+jt.type+"'")};function Um(Mn,jt,Kt,Yt){var mn=du(Mn,Kt),Cn;mn.length===1&&mn[0]instanceof cu&&Ot.contains(["mrow","mtable"],mn[0].type)?Cn=mn[0]:Cn=new xo.MathNode("mrow",mn);var kn=new xo.MathNode("annotation",[new xo.TextNode(jt)]);kn.setAttribute("encoding","application/x-tex");var qn=new xo.MathNode("semantics",[Cn,kn]),er=new xo.MathNode("math",[qn]);er.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var pr=Yt?"katex":"katex-mathml";return Wr.makeSpan([pr],[er])}var Sy=function(jt){return new bp({style:jt.displayMode?En.DISPLAY:En.TEXT,maxSize:jt.maxSize,minRuleThickness:jt.minRuleThickness})},_y=function(jt,Kt){if(Kt.displayMode){var Yt=["katex-display"];Kt.leqno&&Yt.push("leqno"),Kt.fleqn&&Yt.push("fleqn"),jt=Wr.makeSpan(Yt,[jt])}return jt},S0=function(jt,Kt,Yt){var mn=Sy(Yt),Cn;if(Yt.output==="mathml")return Um(jt,Kt,mn,!0);if(Yt.output==="html"){var kn=pm(jt,mn);Cn=Wr.makeSpan(["katex"],[kn])}else{var qn=Um(jt,Kt,mn,!1),er=pm(jt,mn);Cn=Wr.makeSpan(["katex"],[qn,er])}return _y(Cn,Yt)},_p=function(jt,Kt,Yt){var mn=Sy(Yt),Cn=pm(jt,mn),kn=Wr.makeSpan(["katex"],[Cn]);return _y(kn,Yt)},u1={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},B1=function(jt){var Kt=new xo.MathNode("mo",[new xo.TextNode(u1[jt.substr(1)])]);return Kt.setAttribute("stretchy","true"),Kt},$y={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Vm=function(jt){return jt.type==="ordgroup"?jt.body.length:1},_0=function(jt,Kt){function Yt(){var er=4e5,pr=jt.label.substr(1);if(Ot.contains(["widehat","widecheck","widetilde","utilde"],pr)){var $r=jt,Mr=Vm($r.base),Yr,ho,wo;if(Mr>5)pr==="widehat"||pr==="widecheck"?(Yr=420,er=2364,wo=.42,ho=pr+"4"):(Yr=312,er=2340,wo=.34,ho="tilde4");else{var Mo=[1,1,2,2,3,3][Mr];pr==="widehat"||pr==="widecheck"?(er=[0,1062,2364,2364,2364][Mo],Yr=[0,239,300,360,420][Mo],wo=[0,.24,.3,.3,.36,.42][Mo],ho=pr+Mo):(er=[0,600,1033,2339,2340][Mo],Yr=[0,260,286,306,312][Mo],wo=[0,.26,.286,.3,.306,.34][Mo],ho="tilde"+Mo)}var os=new jo(ho),Ms=new Qr([os],{width:"100%",height:wo+"em",viewBox:"0 0 "+er+" "+Yr,preserveAspectRatio:"none"});return{span:Wr.makeSvgSpan([],[Ms],Kt),minWidth:0,height:wo}}else{var Fs=[],Ls=$y[pr],fl=Ls[0],ml=Ls[1],Rl=Ls[2],Ml=Rl/1e3,Al=fl.length,tu,zl;if(Al===1){var Ks=Ls[3];tu=["hide-tail"],zl=[Ks]}else if(Al===2)tu=["halfarrow-left","halfarrow-right"],zl=["xMinYMin","xMaxYMin"];else if(Al===3)tu=["brace-left","brace-center","brace-right"],zl=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
                    `+Al+" children.");for(var Xu=0;Xu<Al;Xu++){var Dp=new jo(fl[Xu]),Zu=new Qr([Dp],{width:"400em",height:Ml+"em",viewBox:"0 0 "+er+" "+Rl,preserveAspectRatio:zl[Xu]+" slice"}),Yl=Wr.makeSvgSpan([tu[Xu]],[Zu],Kt);if(Al===1)return{span:Yl,minWidth:ml,height:Ml};Yl.style.height=Ml+"em",Fs.push(Yl)}return{span:Wr.makeSpan(["stretchy"],Fs,Kt),minWidth:ml,height:Ml}}}var mn=Yt(),Cn=mn.span,kn=mn.minWidth,qn=mn.height;return Cn.height=qn,Cn.style.height=qn+"em",kn>0&&(Cn.style.minWidth=kn+"em"),Cn},$0=function(jt,Kt,Yt,mn){var Cn,kn=jt.height+jt.depth+2*Yt;if(/fbox|color/.test(Kt)){if(Cn=Wr.makeSpan(["stretchy",Kt],[],mn),Kt==="fbox"){var qn=mn.color&&mn.getColor();qn&&(Cn.style.borderColor=qn)}}else{var er=[];/^[bx]cancel$/.test(Kt)&&er.push(new Bo({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(Kt)&&er.push(new Bo({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var pr=new Qr(er,{width:"100%",height:kn+"em"});Cn=Wr.makeSvgSpan([],[pr],mn)}return Cn.height=kn,Cn.style.height=kn+"em",Cn},sp={encloseSpan:$0,mathMLnode:B1,svgSpan:_0},w0=function(jt,Kt){var Yt,mn,Cn=Jl(jt,"supsub"),kn;Cn?(mn=ks(Cn.base,"accent"),Yt=mn.base,Cn.base=Yt,kn=Us(Js(Cn,Kt)),Cn.base=mn):(mn=ks(jt,"accent"),Yt=mn.base);var qn=Js(Yt,Kt.havingCrampedStyle()),er=mn.isShifty&&Ot.isCharacterBox(Yt),pr=0;if(er){var $r=Ot.getBaseElem(Yt),Mr=Js($r,Kt.havingCrampedStyle());pr=ss(Mr).skew}var Yr=Math.min(qn.height,Kt.fontMetrics().xHeight),ho;if(mn.isStretchy)ho=sp.svgSpan(mn,Kt),ho=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:qn},{type:"elem",elem:ho,wrapperClasses:["svg-align"],wrapperStyle:pr>0?{width:"calc(100% - "+2*pr+"em)",marginLeft:2*pr+"em"}:void 0}]},Kt);else{var wo,Mo;mn.label==="\\vec"?(wo=Wr.staticSvg("vec",Kt),Mo=Wr.svgData.vec[1]):(wo=Wr.makeOrd({mode:mn.mode,text:mn.label},Kt,"textord"),wo=ss(wo),wo.italic=0,Mo=wo.width),ho=Wr.makeSpan(["accent-body"],[wo]);var os=mn.label==="\\textcircled";os&&(ho.classes.push("accent-full"),Yr=qn.height);var Ms=pr;os||(Ms-=Mo/2),ho.style.left=Ms+"em",mn.label==="\\textcircled"&&(ho.style.top=".2em"),ho=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:qn},{type:"kern",size:-Yr},{type:"elem",elem:ho}]},Kt)}var Fs=Wr.makeSpan(["mord","accent"],[ho],Kt);return kn?(kn.children[0]=Fs,kn.height=Math.max(Fs.height,kn.height),kn.classes[0]="mord",kn):Fs},hm=function(jt,Kt){var Yt=jt.isStretchy?sp.mathMLnode(jt.label):new xo.MathNode("mo",[bu(jt.label,jt.mode)]),mn=new xo.MathNode("mover",[Ol(jt.base,Kt),Yt]);return mn.setAttribute("accent","true"),mn},O0=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(Mn){return"\\"+Mn}).join("|"));ds({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(jt,Kt){var Yt=Kt[0],mn=!O0.test(jt.funcName),Cn=!mn||jt.funcName==="\\widehat"||jt.funcName==="\\widetilde"||jt.funcName==="\\widecheck";return{type:"accent",mode:jt.parser.mode,label:jt.funcName,isStretchy:mn,isShifty:Cn,base:Yt}},htmlBuilder:w0,mathmlBuilder:hm}),ds({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(jt,Kt){var Yt=Kt[0];return{type:"accent",mode:jt.parser.mode,label:jt.funcName,isStretchy:!1,isShifty:!0,base:Yt}},htmlBuilder:w0,mathmlBuilder:hm}),ds({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0];return{type:"accentUnder",mode:Yt.mode,label:mn,base:Cn}},htmlBuilder:function(jt,Kt){var Yt=Js(jt.base,Kt),mn=sp.svgSpan(jt,Kt),Cn=jt.label==="\\utilde"?.12:0,kn=Wr.makeVList({positionType:"bottom",positionData:mn.height+Cn,children:[{type:"elem",elem:mn,wrapperClasses:["svg-align"]},{type:"kern",size:Cn},{type:"elem",elem:Yt}]},Kt);return Wr.makeSpan(["mord","accentunder"],[kn],Kt)},mathmlBuilder:function(jt,Kt){var Yt=sp.mathMLnode(jt.label),mn=new xo.MathNode("munder",[Ol(jt.base,Kt),Yt]);return mn.setAttribute("accentunder","true"),mn}});var Gm=function(jt){var Kt=new xo.MathNode("mpadded",jt?[jt]:[]);return Kt.setAttribute("width","+0.6em"),Kt.setAttribute("lspace","0.3em"),Kt};ds({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=jt.funcName;return{type:"xArrow",mode:mn.mode,label:Cn,body:Kt[0],below:Yt[0]}},htmlBuilder:function(jt,Kt){var Yt=Kt.style,mn=Kt.havingStyle(Yt.sup()),Cn=Wr.wrapFragment(Js(jt.body,mn,Kt),Kt);Cn.classes.push("x-arrow-pad");var kn;jt.below&&(mn=Kt.havingStyle(Yt.sub()),kn=Wr.wrapFragment(Js(jt.below,mn,Kt),Kt),kn.classes.push("x-arrow-pad"));var qn=sp.svgSpan(jt,Kt),er=-Kt.fontMetrics().axisHeight+.5*qn.height,pr=-Kt.fontMetrics().axisHeight-.5*qn.height-.111;(Cn.depth>.25||jt.label==="\\xleftequilibrium")&&(pr-=Cn.depth);var $r;if(kn){var Mr=-Kt.fontMetrics().axisHeight+kn.height+.5*qn.height+.111;$r=Wr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Cn,shift:pr},{type:"elem",elem:qn,shift:er},{type:"elem",elem:kn,shift:Mr}]},Kt)}else $r=Wr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Cn,shift:pr},{type:"elem",elem:qn,shift:er}]},Kt);return $r.children[0].children[0].children[1].classes.push("svg-align"),Wr.makeSpan(["mrel","x-arrow"],[$r],Kt)},mathmlBuilder:function(jt,Kt){var Yt=sp.mathMLnode(jt.label),mn;if(jt.body){var Cn=Gm(Ol(jt.body,Kt));if(jt.below){var kn=Gm(Ol(jt.below,Kt));mn=new xo.MathNode("munderover",[Yt,kn,Cn])}else mn=new xo.MathNode("mover",[Yt,Cn])}else if(jt.below){var qn=Gm(Ol(jt.below,Kt));mn=new xo.MathNode("munder",[Yt,qn])}else mn=Gm(),mn=new xo.MathNode("mover",[Yt,mn]);return mn}}),ds({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(jt,Kt){for(var Yt=jt.parser,mn=ks(Kt[0],"ordgroup"),Cn=mn.body,kn="",qn=0;qn<Cn.length;qn++){var er=ks(Cn[qn],"textord");kn+=er.text}var pr=parseInt(kn);if(isNaN(pr))throw new ft("\\@char has non-numeric argument "+kn);return{type:"textord",mode:Yt.mode,text:String.fromCharCode(pr)}}});var R0=function(jt,Kt){var Yt=qs(jt.body,Kt.withColor(jt.color),!1);return Wr.makeFragment(Yt)},Nu=function(jt,Kt){var Yt=du(jt.body,Kt.withColor(jt.color)),mn=new xo.MathNode("mstyle",Yt);return mn.setAttribute("mathcolor",jt.color),mn};ds({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(jt,Kt){var Yt=jt.parser,mn=ks(Kt[0],"color-token").color,Cn=Kt[1];return{type:"color",mode:Yt.mode,color:mn,body:iu(Cn)}},htmlBuilder:R0,mathmlBuilder:Nu}),ds({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.breakOnTokenText,Cn=ks(Kt[0],"color-token").color;Yt.gullet.macros.set("\\current@color",Cn);var kn=Yt.parseExpression(!0,mn);return{type:"color",mode:Yt.mode,color:Cn,body:kn}},htmlBuilder:R0,mathmlBuilder:Nu}),ds({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=jt.funcName,kn=Yt[0],qn=Cn==="\\cr",er=!1;return qn||(mn.settings.displayMode&&mn.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?er=!1:er=!0),{type:"cr",mode:mn.mode,newLine:er,newRow:qn,size:kn&&ks(kn,"size").value}},htmlBuilder:function(jt,Kt){if(jt.newRow)throw new ft("\\cr valid only within a tabular/array environment");var Yt=Wr.makeSpan(["mspace"],[],Kt);return jt.newLine&&(Yt.classes.push("newline"),jt.size&&(Yt.style.marginTop=qo(jt.size,Kt)+"em")),Yt},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mspace");return jt.newLine&&(Yt.setAttribute("linebreak","newline"),jt.size&&Yt.setAttribute("height",qo(jt.size,Kt)+"em")),Yt}});var c1=function(jt,Kt,Yt){var mn=ws.math[jt]&&ws.math[jt].replace,Cn=Ts(mn||jt,Kt,Yt);if(!Cn)throw new Error("Unsupported symbol "+jt+" and font size "+Kt+".");return Cn},d1=function(jt,Kt,Yt,mn){var Cn=Yt.havingBaseStyle(Kt),kn=Wr.makeSpan(mn.concat(Cn.sizingClasses(Yt)),[jt],Yt),qn=Cn.sizeMultiplier/Yt.sizeMultiplier;return kn.height*=qn,kn.depth*=qn,kn.maxFontSize=Cn.sizeMultiplier,kn},I0=function(jt,Kt,Yt){var mn=Kt.havingBaseStyle(Yt),Cn=(1-Kt.sizeMultiplier/mn.sizeMultiplier)*Kt.fontMetrics().axisHeight;jt.classes.push("delimcenter"),jt.style.top=Cn+"em",jt.height-=Cn,jt.depth+=Cn},D0=function(jt,Kt,Yt,mn,Cn,kn){var qn=Wr.makeSymbol(jt,"Main-Regular",Cn,mn),er=d1(qn,Kt,mn,kn);return Yt&&I0(er,mn,Kt),er},Ov=function(jt,Kt,Yt,mn){return Wr.makeSymbol(jt,"Size"+Kt+"-Regular",Yt,mn)},wy=function(jt,Kt,Yt,mn,Cn,kn){var qn=Ov(jt,Kt,Cn,mn),er=d1(Wr.makeSpan(["delimsizing","size"+Kt],[qn],mn),En.TEXT,mn,kn);return Yt&&I0(er,mn,En.TEXT),er},$p=function(jt,Kt,Yt){var mn;Kt==="Size1-Regular"?mn="delim-size1":mn="delim-size4";var Cn=Wr.makeSpan(["delimsizinginner",mn],[Wr.makeSpan([],[Wr.makeSymbol(jt,Kt,Yt)])]);return{type:"elem",elem:Cn}},z1={type:"kern",size:-.005},N0=function(jt,Kt,Yt,mn,Cn,kn){var qn,er,pr,$r;qn=pr=$r=jt,er=null;var Mr="Size1-Regular";jt==="\\uparrow"?pr=$r="\u23D0":jt==="\\Uparrow"?pr=$r="\u2016":jt==="\\downarrow"?qn=pr="\u23D0":jt==="\\Downarrow"?qn=pr="\u2016":jt==="\\updownarrow"?(qn="\\uparrow",pr="\u23D0",$r="\\downarrow"):jt==="\\Updownarrow"?(qn="\\Uparrow",pr="\u2016",$r="\\Downarrow"):jt==="["||jt==="\\lbrack"?(qn="\u23A1",pr="\u23A2",$r="\u23A3",Mr="Size4-Regular"):jt==="]"||jt==="\\rbrack"?(qn="\u23A4",pr="\u23A5",$r="\u23A6",Mr="Size4-Regular"):jt==="\\lfloor"||jt==="\u230A"?(pr=qn="\u23A2",$r="\u23A3",Mr="Size4-Regular"):jt==="\\lceil"||jt==="\u2308"?(qn="\u23A1",pr=$r="\u23A2",Mr="Size4-Regular"):jt==="\\rfloor"||jt==="\u230B"?(pr=qn="\u23A5",$r="\u23A6",Mr="Size4-Regular"):jt==="\\rceil"||jt==="\u2309"?(qn="\u23A4",pr=$r="\u23A5",Mr="Size4-Regular"):jt==="("||jt==="\\lparen"?(qn="\u239B",pr="\u239C",$r="\u239D",Mr="Size4-Regular"):jt===")"||jt==="\\rparen"?(qn="\u239E",pr="\u239F",$r="\u23A0",Mr="Size4-Regular"):jt==="\\{"||jt==="\\lbrace"?(qn="\u23A7",er="\u23A8",$r="\u23A9",pr="\u23AA",Mr="Size4-Regular"):jt==="\\}"||jt==="\\rbrace"?(qn="\u23AB",er="\u23AC",$r="\u23AD",pr="\u23AA",Mr="Size4-Regular"):jt==="\\lgroup"||jt==="\u27EE"?(qn="\u23A7",$r="\u23A9",pr="\u23AA",Mr="Size4-Regular"):jt==="\\rgroup"||jt==="\u27EF"?(qn="\u23AB",$r="\u23AD",pr="\u23AA",Mr="Size4-Regular"):jt==="\\lmoustache"||jt==="\u23B0"?(qn="\u23A7",$r="\u23AD",pr="\u23AA",Mr="Size4-Regular"):(jt==="\\rmoustache"||jt==="\u23B1")&&(qn="\u23AB",$r="\u23A9",pr="\u23AA",Mr="Size4-Regular");var Yr=c1(qn,Mr,Cn),ho=Yr.height+Yr.depth,wo=c1(pr,Mr,Cn),Mo=wo.height+wo.depth,os=c1($r,Mr,Cn),Ms=os.height+os.depth,Fs=0,Ls=1;if(er!==null){var fl=c1(er,Mr,Cn);Fs=fl.height+fl.depth,Ls=2}var ml=ho+Ms+Fs,Rl=Math.max(0,Math.ceil((Kt-ml)/(Ls*Mo))),Ml=ml+Rl*Ls*Mo,Al=mn.fontMetrics().axisHeight;Yt&&(Al*=mn.sizeMultiplier);var tu=Ml/2-Al,zl=(Rl+1)*.005-Mo,Ks=[];if(Ks.push($p($r,Mr,Cn)),er===null)for(var Xu=0;Xu<Rl;Xu++)Ks.push(z1),Ks.push($p(pr,Mr,Cn));else{for(var Dp=0;Dp<Rl;Dp++)Ks.push(z1),Ks.push($p(pr,Mr,Cn));Ks.push({type:"kern",size:zl}),Ks.push($p(pr,Mr,Cn)),Ks.push(z1),Ks.push($p(er,Mr,Cn));for(var Zu=0;Zu<Rl;Zu++)Ks.push(z1),Ks.push($p(pr,Mr,Cn))}Ks.push({type:"kern",size:zl}),Ks.push($p(pr,Mr,Cn)),Ks.push(z1),Ks.push($p(qn,Mr,Cn));var Yl=mn.havingBaseStyle(En.TEXT),fu=Wr.makeVList({positionType:"bottom",positionData:tu,children:Ks},Yl);return d1(Wr.makeSpan(["delimsizing","mult"],[fu],Yl),En.TEXT,mn,kn)},Gp=80,k0=.08,f1=function(jt,Kt,Yt,mn,Cn){var kn=Er(jt,mn,Yt),qn=new jo(jt,kn),er=new Qr([qn],{width:"400em",height:Kt+"em",viewBox:"0 0 400000 "+Yt,preserveAspectRatio:"xMinYMin slice"});return Wr.makeSvgSpan(["hide-tail"],[er],Cn)},qp=function(jt,Kt){var Yt=Kt.havingBaseSizing(),mn=Iy("\\surd",jt*Yt.sizeMultiplier,qu,Yt),Cn=Yt.sizeMultiplier,kn=Math.max(0,Kt.minRuleThickness-Kt.fontMetrics().sqrtRuleThickness),qn,er=0,pr=0,$r=0,Mr;return mn.type==="small"?($r=1e3+1e3*kn+Gp,jt<1?Cn=1:jt<1.4&&(Cn=.7),er=(1+kn+k0)/Cn,pr=(1+kn)/Cn,qn=f1("sqrtMain",er,$r,kn,Kt),qn.style.minWidth="0.853em",Mr=.833/Cn):mn.type==="large"?($r=(1e3+Gp)*h1[mn.size],pr=(h1[mn.size]+kn)/Cn,er=(h1[mn.size]+kn+k0)/Cn,qn=f1("sqrtSize"+mn.size,er,$r,kn,Kt),qn.style.minWidth="1.02em",Mr=1/Cn):(er=jt+kn+k0,pr=jt+kn,$r=Math.floor(1e3*jt+kn)+Gp,qn=f1("sqrtTall",er,$r,kn,Kt),qn.style.minWidth="0.742em",Mr=1.056),qn.height=pr,qn.style.height=er+"em",{span:qn,advanceWidth:Mr,ruleWidth:(Kt.fontMetrics().sqrtRuleThickness+kn)*Cn}},j1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Kp=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],p1=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],h1=[0,1.2,1.8,2.4,3],P0=function(jt,Kt,Yt,mn,Cn){if(jt==="<"||jt==="\\lt"||jt==="\u27E8"?jt="\\langle":(jt===">"||jt==="\\gt"||jt==="\u27E9")&&(jt="\\rangle"),Ot.contains(j1,jt)||Ot.contains(p1,jt))return wy(jt,Kt,!1,Yt,mn,Cn);if(Ot.contains(Kp,jt))return N0(jt,h1[Kt],!1,Yt,mn,Cn);throw new ft("Illegal delimiter: '"+jt+"'")},Oy=[{type:"small",style:En.SCRIPTSCRIPT},{type:"small",style:En.SCRIPT},{type:"small",style:En.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],m1=[{type:"small",style:En.SCRIPTSCRIPT},{type:"small",style:En.SCRIPT},{type:"small",style:En.TEXT},{type:"stack"}],qu=[{type:"small",style:En.SCRIPTSCRIPT},{type:"small",style:En.SCRIPT},{type:"small",style:En.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ry=function(jt){if(jt.type==="small")return"Main-Regular";if(jt.type==="large")return"Size"+jt.size+"-Regular";if(jt.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+jt.type+"' here.")},Iy=function(jt,Kt,Yt,mn){for(var Cn=Math.min(2,3-mn.style.size),kn=Cn;kn<Yt.length&&Yt[kn].type!=="stack";kn++){var qn=c1(jt,Ry(Yt[kn]),"math"),er=qn.height+qn.depth;if(Yt[kn].type==="small"){var pr=mn.havingBaseStyle(Yt[kn].style);er*=pr.sizeMultiplier}if(er>Kt)return Yt[kn]}return Yt[Yt.length-1]},M0=function(jt,Kt,Yt,mn,Cn,kn){jt==="<"||jt==="\\lt"||jt==="\u27E8"?jt="\\langle":(jt===">"||jt==="\\gt"||jt==="\u27E9")&&(jt="\\rangle");var qn;Ot.contains(p1,jt)?qn=Oy:Ot.contains(j1,jt)?qn=qu:qn=m1;var er=Iy(jt,Kt,qn,mn);return er.type==="small"?D0(jt,er.style,Yt,mn,Cn,kn):er.type==="large"?wy(jt,er.size,Yt,mn,Cn,kn):N0(jt,Kt,Yt,mn,Cn,kn)},Dy=function(jt,Kt,Yt,mn,Cn,kn){var qn=mn.fontMetrics().axisHeight*mn.sizeMultiplier,er=901,pr=5/mn.fontMetrics().ptPerEm,$r=Math.max(Kt-qn,Yt+qn),Mr=Math.max($r/500*er,2*$r-pr);return M0(jt,Mr,!0,mn,Cn,kn)},Yp={sqrtImage:qp,sizedDelim:P0,customSizedDelim:M0,leftRightDelim:Dy},Ny={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},H1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Dr(Mn,jt){var Kt=Wm(Mn);if(Kt&&Ot.contains(H1,Kt.text))return Kt;throw new ft("Invalid delimiter: '"+(Kt?Kt.text:JSON.stringify(Mn))+"' after '"+jt.funcName+"'",Mn)}ds({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(jt,Kt){var Yt=Dr(Kt[0],jt);return{type:"delimsizing",mode:jt.parser.mode,size:Ny[jt.funcName].size,mclass:Ny[jt.funcName].mclass,delim:Yt.text}},htmlBuilder:function(jt,Kt){return jt.delim==="."?Wr.makeSpan([jt.mclass]):Yp.sizedDelim(jt.delim,jt.size,Kt,jt.mode,[jt.mclass])},mathmlBuilder:function(jt){var Kt=[];jt.delim!=="."&&Kt.push(bu(jt.delim,jt.mode));var Yt=new xo.MathNode("mo",Kt);return jt.mclass==="mopen"||jt.mclass==="mclose"?Yt.setAttribute("fence","true"):Yt.setAttribute("fence","false"),Yt}});function eo(Mn){if(!Mn.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ds({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(jt,Kt){var Yt=jt.parser.gullet.macros.get("\\current@color");if(Yt&&typeof Yt!="string")throw new ft("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:jt.parser.mode,delim:Dr(Kt[0],jt).text,color:Yt}}}),ds({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(jt,Kt){var Yt=Dr(Kt[0],jt),mn=jt.parser;++mn.leftrightDepth;var Cn=mn.parseExpression(!1);--mn.leftrightDepth,mn.expect("\\right",!1);var kn=ks(mn.parseFunction(),"leftright-right");return{type:"leftright",mode:mn.mode,body:Cn,left:Yt.text,right:kn.delim,rightColor:kn.color}},htmlBuilder:function(jt,Kt){eo(jt);for(var Yt=qs(jt.body,Kt,!0,["mopen","mclose"]),mn=0,Cn=0,kn=!1,qn=0;qn<Yt.length;qn++)Yt[qn].isMiddle?kn=!0:(mn=Math.max(Yt[qn].height,mn),Cn=Math.max(Yt[qn].depth,Cn));mn*=Kt.sizeMultiplier,Cn*=Kt.sizeMultiplier;var er;if(jt.left==="."?er=F1(Kt,["mopen"]):er=Yp.leftRightDelim(jt.left,mn,Cn,Kt,jt.mode,["mopen"]),Yt.unshift(er),kn)for(var pr=1;pr<Yt.length;pr++){var $r=Yt[pr],Mr=$r.isMiddle;Mr&&(Yt[pr]=Yp.leftRightDelim(Mr.delim,mn,Cn,Mr.options,jt.mode,[]))}var Yr;if(jt.right===".")Yr=F1(Kt,["mclose"]);else{var ho=jt.rightColor?Kt.withColor(jt.rightColor):Kt;Yr=Yp.leftRightDelim(jt.right,mn,Cn,ho,jt.mode,["mclose"])}return Yt.push(Yr),Wr.makeSpan(["minner"],Yt,Kt)},mathmlBuilder:function(jt,Kt){eo(jt);var Yt=du(jt.body,Kt);if(jt.left!=="."){var mn=new xo.MathNode("mo",[bu(jt.left,jt.mode)]);mn.setAttribute("fence","true"),Yt.unshift(mn)}if(jt.right!=="."){var Cn=new xo.MathNode("mo",[bu(jt.right,jt.mode)]);Cn.setAttribute("fence","true"),jt.rightColor&&Cn.setAttribute("mathcolor",jt.rightColor),Yt.push(Cn)}return $l(Yt)}}),ds({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(jt,Kt){var Yt=Dr(Kt[0],jt);if(!jt.parser.leftrightDepth)throw new ft("\\middle without preceding \\left",Yt);return{type:"middle",mode:jt.parser.mode,delim:Yt.text}},htmlBuilder:function(jt,Kt){var Yt;if(jt.delim===".")Yt=F1(Kt,[]);else{Yt=Yp.sizedDelim(jt.delim,1,Kt,jt.mode,[]);var mn={delim:jt.delim,options:Kt};Yt.isMiddle=mn}return Yt},mathmlBuilder:function(jt,Kt){var Yt=jt.delim==="\\vert"||jt.delim==="|"?bu("|","text"):bu(jt.delim,jt.mode),mn=new xo.MathNode("mo",[Yt]);return mn.setAttribute("fence","true"),mn.setAttribute("lspace","0.05em"),mn.setAttribute("rspace","0.05em"),mn}});var qr=function(jt,Kt){var Yt=Wr.wrapFragment(Js(jt.body,Kt),Kt),mn=jt.label.substr(1),Cn=Kt.sizeMultiplier,kn,qn=0,er=Ot.isCharacterBox(jt.body);if(mn==="sout")kn=Wr.makeSpan(["stretchy","sout"]),kn.height=Kt.fontMetrics().defaultRuleThickness/Cn,qn=-.5*Kt.fontMetrics().xHeight;else{/cancel/.test(mn)?er||Yt.classes.push("cancel-pad"):Yt.classes.push("boxpad");var pr=0,$r=0;/box/.test(mn)?($r=Math.max(Kt.fontMetrics().fboxrule,Kt.minRuleThickness),pr=Kt.fontMetrics().fboxsep+(mn==="colorbox"?0:$r)):pr=er?.2:0,kn=sp.encloseSpan(Yt,mn,pr,Kt),/fbox|boxed|fcolorbox/.test(mn)&&(kn.style.borderStyle="solid",kn.style.borderWidth=$r+"em"),qn=Yt.depth+pr,jt.backgroundColor&&(kn.style.backgroundColor=jt.backgroundColor,jt.borderColor&&(kn.style.borderColor=jt.borderColor))}var Mr;return jt.backgroundColor?Mr=Wr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:kn,shift:qn},{type:"elem",elem:Yt,shift:0}]},Kt):Mr=Wr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Yt,shift:0},{type:"elem",elem:kn,shift:qn,wrapperClasses:/cancel/.test(mn)?["svg-align"]:[]}]},Kt),/cancel/.test(mn)&&(Mr.height=Yt.height,Mr.depth=Yt.depth),/cancel/.test(mn)&&!er?Wr.makeSpan(["mord","cancel-lap"],[Mr],Kt):Wr.makeSpan(["mord"],[Mr],Kt)},Jo=function(jt,Kt){var Yt=0,mn=new xo.MathNode(jt.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Ol(jt.body,Kt)]);switch(jt.label){case"\\cancel":mn.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":mn.setAttribute("notation","downdiagonalstrike");break;case"\\sout":mn.setAttribute("notation","horizontalstrike");break;case"\\fbox":mn.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(Yt=Kt.fontMetrics().fboxsep*Kt.fontMetrics().ptPerEm,mn.setAttribute("width","+"+2*Yt+"pt"),mn.setAttribute("height","+"+2*Yt+"pt"),mn.setAttribute("lspace",Yt+"pt"),mn.setAttribute("voffset",Yt+"pt"),jt.label==="\\fcolorbox"){var Cn=Math.max(Kt.fontMetrics().fboxrule,Kt.minRuleThickness);mn.setAttribute("style","border: "+Cn+"em solid "+String(jt.borderColor))}break;case"\\xcancel":mn.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return jt.backgroundColor&&mn.setAttribute("mathbackground",jt.backgroundColor),mn};ds({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=jt.funcName,kn=ks(Kt[0],"color-token").color,qn=Kt[1];return{type:"enclose",mode:mn.mode,label:Cn,backgroundColor:kn,body:qn}},htmlBuilder:qr,mathmlBuilder:Jo}),ds({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=jt.funcName,kn=ks(Kt[0],"color-token").color,qn=ks(Kt[1],"color-token").color,er=Kt[2];return{type:"enclose",mode:mn.mode,label:Cn,backgroundColor:qn,borderColor:kn,body:er}},htmlBuilder:qr,mathmlBuilder:Jo}),ds({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser;return{type:"enclose",mode:Yt.mode,label:"\\fbox",body:Kt[0]}}}),ds({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=jt.funcName,kn=Kt[0];return{type:"enclose",mode:mn.mode,label:Cn,body:kn}},htmlBuilder:qr,mathmlBuilder:Jo});var Ps={};function Ys(Mn){for(var jt=Mn.type,Kt=Mn.names,Yt=Mn.props,mn=Mn.handler,Cn=Mn.htmlBuilder,kn=Mn.mathmlBuilder,qn={type:jt,numArgs:Yt.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:mn},er=0;er<Kt.length;++er)Ps[Kt[er]]=qn;Cn&&(Cp[jt]=Cn),kn&&(Hm[jt]=kn)}function Kl(Mn){var jt=[];Mn.consumeSpaces();for(var Kt=Mn.fetch().text;Kt==="\\hline"||Kt==="\\hdashline";)Mn.consume(),jt.push(Kt==="\\hdashline"),Mn.consumeSpaces(),Kt=Mn.fetch().text;return jt}function sl(Mn,jt,Kt){var Yt=jt.hskipBeforeAndAfter,mn=jt.addJot,Cn=jt.cols,kn=jt.arraystretch,qn=jt.colSeparationType;if(Mn.gullet.beginGroup(),Mn.gullet.macros.set("\\\\","\\cr"),!kn){var er=Mn.gullet.expandMacroAsText("\\arraystretch");if(er==null)kn=1;else if(kn=parseFloat(er),!kn||kn<0)throw new ft("Invalid \\arraystretch: "+er)}Mn.gullet.beginGroup();var pr=[],$r=[pr],Mr=[],Yr=[];for(Yr.push(Kl(Mn));;){var ho=Mn.parseExpression(!1,"\\cr");Mn.gullet.endGroup(),Mn.gullet.beginGroup(),ho={type:"ordgroup",mode:Mn.mode,body:ho},Kt&&(ho={type:"styling",mode:Mn.mode,style:Kt,body:[ho]}),pr.push(ho);var wo=Mn.fetch().text;if(wo==="&")Mn.consume();else if(wo==="\\end"){pr.length===1&&ho.type==="styling"&&ho.body[0].body.length===0&&$r.pop(),Yr.length<$r.length+1&&Yr.push([]);break}else if(wo==="\\cr"){var Mo=ks(Mn.parseFunction(),"cr");Mr.push(Mo.size),Yr.push(Kl(Mn)),pr=[],$r.push(pr)}else throw new ft("Expected & or \\\\ or \\cr or \\end",Mn.nextToken)}return Mn.gullet.endGroup(),Mn.gullet.endGroup(),{type:"array",mode:Mn.mode,addJot:mn,arraystretch:kn,body:$r,cols:Cn,rowGaps:Mr,hskipBeforeAndAfter:Yt,hLinesBeforeRow:Yr,colSeparationType:qn}}function Xp(Mn){return Mn.substr(0,1)==="d"?"display":"text"}var Zp=function(jt,Kt){var Yt,mn,Cn=jt.body.length,kn=jt.hLinesBeforeRow,qn=0,er=new Array(Cn),pr=[],$r=Math.max(Kt.fontMetrics().arrayRuleWidth,Kt.minRuleThickness),Mr=1/Kt.fontMetrics().ptPerEm,Yr=5*Mr;if(jt.colSeparationType&&jt.colSeparationType==="small"){var ho=Kt.havingStyle(En.SCRIPT).sizeMultiplier;Yr=.2778*(ho/Kt.sizeMultiplier)}var wo=12*Mr,Mo=3*Mr,os=jt.arraystretch*wo,Ms=.7*os,Fs=.3*os,Ls=0;function fl(Sm){for(var r0=0;r0<Sm.length;++r0)r0>0&&(Ls+=.25),pr.push({pos:Ls,isDashed:Sm[r0]})}for(fl(kn[0]),Yt=0;Yt<jt.body.length;++Yt){var ml=jt.body[Yt],Rl=Ms,Ml=Fs;qn<ml.length&&(qn=ml.length);var Al=new Array(ml.length);for(mn=0;mn<ml.length;++mn){var tu=Js(ml[mn],Kt);Ml<tu.depth&&(Ml=tu.depth),Rl<tu.height&&(Rl=tu.height),Al[mn]=tu}var zl=jt.rowGaps[Yt],Ks=0;zl&&(Ks=qo(zl,Kt),Ks>0&&(Ks+=Fs,Ml<Ks&&(Ml=Ks),Ks=0)),jt.addJot&&(Ml+=Mo),Al.height=Rl,Al.depth=Ml,Ls+=Rl,Al.pos=Ls,Ls+=Ml+Ks,er[Yt]=Al,fl(kn[Yt+1])}var Xu=Ls/2+Kt.fontMetrics().axisHeight,Dp=jt.cols||[],Zu=[],Yl,fu;for(mn=0,fu=0;mn<qn||fu<Dp.length;++mn,++fu){for(var dp=Dp[fu]||{},Gy=!0;dp.type==="separator";){if(Gy||(Yl=Wr.makeSpan(["arraycolsep"],[]),Yl.style.width=Kt.fontMetrics().doubleRuleSep+"em",Zu.push(Yl)),dp.separator==="|"||dp.separator===":"){var Jm=dp.separator==="|"?"solid":"dashed",b1=Wr.makeSpan(["vertical-separator"],[],Kt);b1.style.height=Ls+"em",b1.style.borderRightWidth=$r+"em",b1.style.borderRightStyle=Jm,b1.style.margin="0 -"+$r/2+"em",b1.style.verticalAlign=-(Ls-Xu)+"em",Zu.push(b1)}else throw new ft("Invalid separator type: "+dp.separator);fu++,dp=Dp[fu]||{},Gy=!1}if(!(mn>=qn)){var np=void 0;(mn>0||jt.hskipBeforeAndAfter)&&(np=Ot.deflt(dp.pregap,Yr),np!==0&&(Yl=Wr.makeSpan(["arraycolsep"],[]),Yl.style.width=np+"em",Zu.push(Yl)));var kl=[];for(Yt=0;Yt<Cn;++Yt){var T1=er[Yt],Cm=T1[mn];if(!!Cm){var rp=T1.pos-Xu;Cm.depth=T1.depth,Cm.height=T1.height,kl.push({type:"elem",elem:Cm,shift:rp})}}kl=Wr.makeVList({positionType:"individualShift",children:kl},Kt),kl=Wr.makeSpan(["col-align-"+(dp.align||"c")],[kl]),Zu.push(kl),(mn<qn-1||jt.hskipBeforeAndAfter)&&(np=Ot.deflt(dp.postgap,Yr),np!==0&&(Yl=Wr.makeSpan(["arraycolsep"],[]),Yl.style.width=np+"em",Zu.push(Yl)))}}if(er=Wr.makeSpan(["mtable"],Zu),pr.length>0){for(var e0=Wr.makeLineSpan("hline",Kt,$r),n0=Wr.makeLineSpan("hdashline",Kt,$r),Qu=[{type:"elem",elem:er,shift:0}];pr.length>0;){var fp=pr.pop(),au=fp.pos-Xu;fp.isDashed?Qu.push({type:"elem",elem:n0,shift:au}):Qu.push({type:"elem",elem:e0,shift:au})}er=Wr.makeVList({positionType:"individualShift",children:Qu},Kt)}return Wr.makeSpan(["mord"],[er],Kt)},Ku={c:"center ",l:"left ",r:"right "},Yu=function(jt,Kt){var Yt=new xo.MathNode("mtable",jt.body.map(function(Ls){return new xo.MathNode("mtr",Ls.map(function(fl){return new xo.MathNode("mtd",[Ol(fl,Kt)])}))})),mn=jt.arraystretch===.5?.1:.16+jt.arraystretch-1+(jt.addJot?.09:0);Yt.setAttribute("rowspacing",mn+"em");var Cn="",kn="";if(jt.cols){var qn=jt.cols,er="",pr=!1,$r=0,Mr=qn.length;qn[0].type==="separator"&&(Cn+="top ",$r=1),qn[qn.length-1].type==="separator"&&(Cn+="bottom ",Mr-=1);for(var Yr=$r;Yr<Mr;Yr++)qn[Yr].type==="align"?(kn+=Ku[qn[Yr].align],pr&&(er+="none "),pr=!0):qn[Yr].type==="separator"&&pr&&(er+=qn[Yr].separator==="|"?"solid ":"dashed ",pr=!1);Yt.setAttribute("columnalign",kn.trim()),/[sd]/.test(er)&&Yt.setAttribute("columnlines",er.trim())}if(jt.colSeparationType==="align"){for(var ho=jt.cols||[],wo="",Mo=1;Mo<ho.length;Mo++)wo+=Mo%2?"0em ":"1em ";Yt.setAttribute("columnspacing",wo.trim())}else jt.colSeparationType==="alignat"?Yt.setAttribute("columnspacing","0em"):jt.colSeparationType==="small"?Yt.setAttribute("columnspacing","0.2778em"):Yt.setAttribute("columnspacing","1em");var os="",Ms=jt.hLinesBeforeRow;Cn+=Ms[0].length>0?"left ":"",Cn+=Ms[Ms.length-1].length>0?"right ":"";for(var Fs=1;Fs<Ms.length-1;Fs++)os+=Ms[Fs].length===0?"none ":Ms[Fs][0]?"dashed ":"solid ";return/[sd]/.test(os)&&Yt.setAttribute("rowlines",os.trim()),Cn!==""&&(Yt=new xo.MathNode("menclose",[Yt]),Yt.setAttribute("notation",Cn.trim())),jt.arraystretch&&jt.arraystretch<1&&(Yt=new xo.MathNode("mstyle",[Yt]),Yt.setAttribute("scriptlevel","1")),Yt},ky=function(jt,Kt){var Yt=[],mn=sl(jt.parser,{cols:Yt,addJot:!0},"display"),Cn,kn=0,qn={type:"ordgroup",mode:jt.mode,body:[]},er=Jl(Kt[0],"ordgroup");if(er){for(var pr="",$r=0;$r<er.body.length;$r++){var Mr=ks(er.body[$r],"textord");pr+=Mr.text}Cn=Number(pr),kn=Cn*2}var Yr=!kn;mn.body.forEach(function(os){for(var Ms=1;Ms<os.length;Ms+=2){var Fs=ks(os[Ms],"styling"),Ls=ks(Fs.body[0],"ordgroup");Ls.body.unshift(qn)}if(Yr)kn<os.length&&(kn=os.length);else{var fl=os.length/2;if(Cn<fl)throw new ft("Too many math in a row: "+("expected "+Cn+", but got "+fl),os[0])}});for(var ho=0;ho<kn;++ho){var wo="r",Mo=0;ho%2===1?wo="l":ho>0&&Yr&&(Mo=1),Yt[ho]={type:"align",align:wo,pregap:Mo,postgap:0}}return mn.colSeparationType=Yr?"align":"alignat",mn};Ys({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(jt,Kt){var Yt=Wm(Kt[0]),mn=Yt?[Kt[0]]:ks(Kt[0],"ordgroup").body,Cn=mn.map(function(qn){var er=Ay(qn),pr=er.text;if("lcr".indexOf(pr)!==-1)return{type:"align",align:pr};if(pr==="|")return{type:"separator",separator:"|"};if(pr===":")return{type:"separator",separator:":"};throw new ft("Unknown column alignment: "+pr,qn)}),kn={cols:Cn,hskipBeforeAndAfter:!0};return sl(jt.parser,kn,Xp(jt.envName))},htmlBuilder:Zp,mathmlBuilder:Yu}),Ys({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(jt){var Kt={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[jt.envName],Yt={hskipBeforeAndAfter:!1},mn=sl(jt.parser,Yt,Xp(jt.envName));return Kt?{type:"leftright",mode:jt.mode,body:[mn],left:Kt[0],right:Kt[1],rightColor:void 0}:mn},htmlBuilder:Zp,mathmlBuilder:Yu}),Ys({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(jt){var Kt={arraystretch:.5},Yt=sl(jt.parser,Kt,"script");return Yt.colSeparationType="small",Yt},htmlBuilder:Zp,mathmlBuilder:Yu}),Ys({type:"array",names:["subarray"],props:{numArgs:1},handler:function(jt,Kt){var Yt=Wm(Kt[0]),mn=Yt?[Kt[0]]:ks(Kt[0],"ordgroup").body,Cn=mn.map(function(qn){var er=Ay(qn),pr=er.text;if("lc".indexOf(pr)!==-1)return{type:"align",align:pr};throw new ft("Unknown column alignment: "+pr,qn)});if(Cn.length>1)throw new ft("{subarray} can contain only one column");var kn={cols:Cn,hskipBeforeAndAfter:!1,arraystretch:.5};if(kn=sl(jt.parser,kn,"script"),kn.body[0].length>1)throw new ft("{subarray} can contain only one column");return kn},htmlBuilder:Zp,mathmlBuilder:Yu}),Ys({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(jt){var Kt={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Yt=sl(jt.parser,Kt,Xp(jt.envName));return{type:"leftright",mode:jt.mode,body:[Yt],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:Zp,mathmlBuilder:Yu}),Ys({type:"array",names:["aligned"],props:{numArgs:0},handler:ky,htmlBuilder:Zp,mathmlBuilder:Yu}),Ys({type:"array",names:["gathered"],props:{numArgs:0},handler:function(jt){var Kt={cols:[{type:"align",align:"c"}],addJot:!0};return sl(jt.parser,Kt,"display")},htmlBuilder:Zp,mathmlBuilder:Yu}),Ys({type:"array",names:["alignedat"],props:{numArgs:1},handler:ky,htmlBuilder:Zp,mathmlBuilder:Yu}),ds({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(jt,Kt){throw new ft(jt.funcName+" valid only within array environment")}});var U1=Ps,mm=U1;ds({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0];if(Cn.type!=="ordgroup")throw new ft("Invalid environment name",Cn);for(var kn="",qn=0;qn<Cn.body.length;++qn)kn+=ks(Cn.body[qn],"textord").text;if(mn==="\\begin"){if(!mm.hasOwnProperty(kn))throw new ft("No such environment: "+kn,Cn);var er=mm[kn],pr=Yt.parseArguments("\\begin{"+kn+"}",er),$r=pr.args,Mr=pr.optArgs,Yr={mode:Yt.mode,envName:kn,parser:Yt},ho=er.handler(Yr,$r,Mr);Yt.expect("\\end",!1);var wo=Yt.nextToken,Mo=ks(Yt.parseFunction(),"environment");if(Mo.name!==kn)throw new ft("Mismatch: \\begin{"+kn+"} matched by \\end{"+Mo.name+"}",wo);return ho}return{type:"environment",mode:Yt.mode,name:kn,nameGroup:Cn}}});var qm=Wr.makeSpan;function El(Mn,jt){var Kt=qs(Mn.body,jt,!0);return qm([Mn.mclass],Kt,jt)}function Py(Mn,jt){var Kt,Yt=du(Mn.body,jt);return Mn.mclass==="minner"?xo.newDocumentFragment(Yt):(Mn.mclass==="mord"?Mn.isCharacterBox?(Kt=Yt[0],Kt.type="mi"):Kt=new xo.MathNode("mi",Yt):(Mn.isCharacterBox?(Kt=Yt[0],Kt.type="mo"):Kt=new xo.MathNode("mo",Yt),Mn.mclass==="mbin"?(Kt.attributes.lspace="0.22em",Kt.attributes.rspace="0.22em"):Mn.mclass==="mpunct"?(Kt.attributes.lspace="0em",Kt.attributes.rspace="0.17em"):(Mn.mclass==="mopen"||Mn.mclass==="mclose")&&(Kt.attributes.lspace="0em",Kt.attributes.rspace="0em")),Kt)}ds({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0];return{type:"mclass",mode:Yt.mode,mclass:"m"+mn.substr(5),body:iu(Cn),isCharacterBox:Ot.isCharacterBox(Cn)}},htmlBuilder:El,mathmlBuilder:Py});var gm=function(jt){var Kt=jt.type==="ordgroup"&&jt.body.length?jt.body[0]:jt;return Kt.type==="atom"&&(Kt.family==="bin"||Kt.family==="rel")?"m"+Kt.family:"mord"};ds({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(jt,Kt){var Yt=jt.parser;return{type:"mclass",mode:Yt.mode,mclass:gm(Kt[0]),body:[Kt[1]],isCharacterBox:Ot.isCharacterBox(Kt[1])}}}),ds({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[1],kn=Kt[0],qn;mn!=="\\stackrel"?qn=gm(Cn):qn="mrel";var er={type:"op",mode:Cn.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:mn!=="\\stackrel",body:iu(Cn)},pr={type:"supsub",mode:kn.mode,base:er,sup:mn==="\\underset"?null:kn,sub:mn==="\\underset"?kn:null};return{type:"mclass",mode:Yt.mode,mclass:qn,body:[pr],isCharacterBox:Ot.isCharacterBox(pr)}},htmlBuilder:El,mathmlBuilder:Py});var ym=function(jt,Kt){var Yt=jt.font,mn=Kt.withFont(Yt);return Js(jt.body,mn)},F0=function(jt,Kt){var Yt=jt.font,mn=Kt.withFont(Yt);return Ol(jt.body,mn)},My={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ds({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0],kn=mn;return kn in My&&(kn=My[kn]),{type:"font",mode:Yt.mode,font:kn.slice(1),body:Cn}},htmlBuilder:ym,mathmlBuilder:F0}),ds({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[0],Cn=Ot.isCharacterBox(mn);return{type:"mclass",mode:Yt.mode,mclass:gm(mn),body:[{type:"font",mode:Yt.mode,font:"boldsymbol",body:mn}],isCharacterBox:Cn}}}),ds({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=jt.breakOnTokenText,kn=Yt.mode,qn=Yt.parseExpression(!0,Cn),er="math"+mn.slice(1);return{type:"font",mode:kn,font:er,body:{type:"ordgroup",mode:Yt.mode,body:qn}}},htmlBuilder:ym,mathmlBuilder:F0});var Fy=function(jt,Kt){var Yt=Kt;return jt==="display"?Yt=Yt.id>=En.SCRIPT.id?Yt.text():En.DISPLAY:jt==="text"&&Yt.size===En.DISPLAY.size?Yt=En.TEXT:jt==="script"?Yt=En.SCRIPT:jt==="scriptscript"&&(Yt=En.SCRIPTSCRIPT),Yt},V1=function(jt,Kt){var Yt=Fy(jt.size,Kt.style),mn=Yt.fracNum(),Cn=Yt.fracDen(),kn;kn=Kt.havingStyle(mn);var qn=Js(jt.numer,kn,Kt);if(jt.continued){var er=8.5/Kt.fontMetrics().ptPerEm,pr=3.5/Kt.fontMetrics().ptPerEm;qn.height=qn.height<er?er:qn.height,qn.depth=qn.depth<pr?pr:qn.depth}kn=Kt.havingStyle(Cn);var $r=Js(jt.denom,kn,Kt),Mr,Yr,ho;jt.hasBarLine?(jt.barSize?(Yr=qo(jt.barSize,Kt),Mr=Wr.makeLineSpan("frac-line",Kt,Yr)):Mr=Wr.makeLineSpan("frac-line",Kt),Yr=Mr.height,ho=Mr.height):(Mr=null,Yr=0,ho=Kt.fontMetrics().defaultRuleThickness);var wo,Mo,os;Yt.size===En.DISPLAY.size||jt.size==="display"?(wo=Kt.fontMetrics().num1,Yr>0?Mo=3*ho:Mo=7*ho,os=Kt.fontMetrics().denom1):(Yr>0?(wo=Kt.fontMetrics().num2,Mo=ho):(wo=Kt.fontMetrics().num3,Mo=3*ho),os=Kt.fontMetrics().denom2);var Ms;if(Mr){var Ls=Kt.fontMetrics().axisHeight;wo-qn.depth-(Ls+.5*Yr)<Mo&&(wo+=Mo-(wo-qn.depth-(Ls+.5*Yr))),Ls-.5*Yr-($r.height-os)<Mo&&(os+=Mo-(Ls-.5*Yr-($r.height-os)));var fl=-(Ls-.5*Yr);Ms=Wr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:$r,shift:os},{type:"elem",elem:Mr,shift:fl},{type:"elem",elem:qn,shift:-wo}]},Kt)}else{var Fs=wo-qn.depth-($r.height-os);Fs<Mo&&(wo+=.5*(Mo-Fs),os+=.5*(Mo-Fs)),Ms=Wr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:$r,shift:os},{type:"elem",elem:qn,shift:-wo}]},Kt)}kn=Kt.havingStyle(Yt),Ms.height*=kn.sizeMultiplier/Kt.sizeMultiplier,Ms.depth*=kn.sizeMultiplier/Kt.sizeMultiplier;var ml;Yt.size===En.DISPLAY.size?ml=Kt.fontMetrics().delim1:ml=Kt.fontMetrics().delim2;var Rl,Ml;return jt.leftDelim==null?Rl=F1(Kt,["mopen"]):Rl=Yp.customSizedDelim(jt.leftDelim,ml,!0,Kt.havingStyle(Yt),jt.mode,["mopen"]),jt.continued?Ml=Wr.makeSpan([]):jt.rightDelim==null?Ml=F1(Kt,["mclose"]):Ml=Yp.customSizedDelim(jt.rightDelim,ml,!0,Kt.havingStyle(Yt),jt.mode,["mclose"]),Wr.makeSpan(["mord"].concat(kn.sizingClasses(Kt)),[Rl,Wr.makeSpan(["mfrac"],[Ms]),Ml],Kt)},Hu=function(jt,Kt){var Yt=new xo.MathNode("mfrac",[Ol(jt.numer,Kt),Ol(jt.denom,Kt)]);if(!jt.hasBarLine)Yt.setAttribute("linethickness","0px");else if(jt.barSize){var mn=qo(jt.barSize,Kt);Yt.setAttribute("linethickness",mn+"em")}var Cn=Fy(jt.size,Kt.style);if(Cn.size!==Kt.style.size){Yt=new xo.MathNode("mstyle",[Yt]);var kn=Cn.size===En.DISPLAY.size?"true":"false";Yt.setAttribute("displaystyle",kn),Yt.setAttribute("scriptlevel","0")}if(jt.leftDelim!=null||jt.rightDelim!=null){var qn=[];if(jt.leftDelim!=null){var er=new xo.MathNode("mo",[new xo.TextNode(jt.leftDelim.replace("\\",""))]);er.setAttribute("fence","true"),qn.push(er)}if(qn.push(Yt),jt.rightDelim!=null){var pr=new xo.MathNode("mo",[new xo.TextNode(jt.rightDelim.replace("\\",""))]);pr.setAttribute("fence","true"),qn.push(pr)}return $l(qn)}return Yt};ds({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0],kn=Kt[1],qn,er=null,pr=null,$r="auto";switch(mn){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":qn=!0;break;case"\\\\atopfrac":qn=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":qn=!1,er="(",pr=")";break;case"\\\\bracefrac":qn=!1,er="\\{",pr="\\}";break;case"\\\\brackfrac":qn=!1,er="[",pr="]";break;default:throw new Error("Unrecognized genfrac command")}switch(mn){case"\\cfrac":case"\\dfrac":case"\\dbinom":$r="display";break;case"\\tfrac":case"\\tbinom":$r="text";break}return{type:"genfrac",mode:Yt.mode,continued:mn==="\\cfrac",numer:Cn,denom:kn,hasBarLine:qn,leftDelim:er,rightDelim:pr,size:$r,barSize:null}},htmlBuilder:V1,mathmlBuilder:Hu}),ds({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(jt){var Kt=jt.parser,Yt=jt.funcName,mn=jt.token,Cn;switch(Yt){case"\\over":Cn="\\frac";break;case"\\choose":Cn="\\binom";break;case"\\atop":Cn="\\\\atopfrac";break;case"\\brace":Cn="\\\\bracefrac";break;case"\\brack":Cn="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:Kt.mode,replaceWith:Cn,token:mn}}});var vm=["display","text","script","scriptscript"],G1=function(jt){var Kt=null;return jt.length>0&&(Kt=jt,Kt=Kt==="."?null:Kt),Kt};ds({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[4],Cn=Kt[5],kn=Jl(Kt[0],"atom");kn&&(kn=M1(Kt[0],"open"));var qn=kn?G1(kn.text):null,er=Jl(Kt[1],"atom");er&&(er=M1(Kt[1],"close"));var pr=er?G1(er.text):null,$r=ks(Kt[2],"size"),Mr,Yr=null;$r.isBlank?Mr=!0:(Yr=$r.value,Mr=Yr.number>0);var ho="auto",wo=Jl(Kt[3],"ordgroup");if(wo){if(wo.body.length>0){var Mo=ks(wo.body[0],"textord");ho=vm[Number(Mo.text)]}}else wo=ks(Kt[3],"textord"),ho=vm[Number(wo.text)];return{type:"genfrac",mode:Yt.mode,numer:mn,denom:Cn,continued:!1,hasBarLine:Mr,barSize:Yr,leftDelim:qn,rightDelim:pr,size:ho}},htmlBuilder:V1,mathmlBuilder:Hu}),ds({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(jt,Kt){var Yt=jt.parser;jt.funcName;var mn=jt.token;return{type:"infix",mode:Yt.mode,replaceWith:"\\\\abovefrac",size:ks(Kt[0],"size").value,token:mn}}}),ds({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(jt,Kt){var Yt=jt.parser;jt.funcName;var mn=Kt[0],Cn=Ct(ks(Kt[1],"infix").size),kn=Kt[2],qn=Cn.number>0;return{type:"genfrac",mode:Yt.mode,numer:mn,denom:kn,continued:!1,hasBarLine:qn,barSize:Cn,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:V1,mathmlBuilder:Hu});var bm=function(jt,Kt){var Yt=Kt.style,mn,Cn,kn=Jl(jt,"supsub");kn?(mn=kn.sup?Js(kn.sup,Kt.havingStyle(Yt.sup()),Kt):Js(kn.sub,Kt.havingStyle(Yt.sub()),Kt),Cn=ks(kn.base,"horizBrace")):Cn=ks(jt,"horizBrace");var qn=Js(Cn.base,Kt.havingBaseStyle(En.DISPLAY)),er=sp.svgSpan(Cn,Kt),pr;if(Cn.isOver?(pr=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:qn},{type:"kern",size:.1},{type:"elem",elem:er}]},Kt),pr.children[0].children[0].children[1].classes.push("svg-align")):(pr=Wr.makeVList({positionType:"bottom",positionData:qn.depth+.1+er.height,children:[{type:"elem",elem:er},{type:"kern",size:.1},{type:"elem",elem:qn}]},Kt),pr.children[0].children[0].children[0].classes.push("svg-align")),mn){var $r=Wr.makeSpan(["mord",Cn.isOver?"mover":"munder"],[pr],Kt);Cn.isOver?pr=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:$r},{type:"kern",size:.2},{type:"elem",elem:mn}]},Kt):pr=Wr.makeVList({positionType:"bottom",positionData:$r.depth+.2+mn.height+mn.depth,children:[{type:"elem",elem:mn},{type:"kern",size:.2},{type:"elem",elem:$r}]},Kt)}return Wr.makeSpan(["mord",Cn.isOver?"mover":"munder"],[pr],Kt)},L0=function(jt,Kt){var Yt=sp.mathMLnode(jt.label);return new xo.MathNode(jt.isOver?"mover":"munder",[Ol(jt.base,Kt),Yt])};ds({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName;return{type:"horizBrace",mode:Yt.mode,label:mn,isOver:/^\\over/.test(mn),base:Kt[0]}},htmlBuilder:bm,mathmlBuilder:L0}),ds({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[1],Cn=ks(Kt[0],"url").url;return Yt.settings.isTrusted({command:"\\href",url:Cn})?{type:"href",mode:Yt.mode,href:Cn,body:iu(mn)}:Yt.formatUnsupportedCmd("\\href")},htmlBuilder:function(jt,Kt){var Yt=qs(jt.body,Kt,!1);return Wr.makeAnchor(jt.href,[],Yt,Kt)},mathmlBuilder:function(jt,Kt){var Yt=Vp(jt.body,Kt);return Yt instanceof cu||(Yt=new cu("mrow",[Yt])),Yt.setAttribute("href",jt.href),Yt}}),ds({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=ks(Kt[0],"url").url;if(!Yt.settings.isTrusted({command:"\\url",url:mn}))return Yt.formatUnsupportedCmd("\\url");for(var Cn=[],kn=0;kn<mn.length;kn++){var qn=mn[kn];qn==="~"&&(qn="\\textasciitilde"),Cn.push({type:"textord",mode:"text",text:qn})}var er={type:"text",mode:Yt.mode,font:"\\texttt",body:Cn};return{type:"href",mode:Yt.mode,href:mn,body:iu(er)}}}),ds({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser;return{type:"htmlmathml",mode:Yt.mode,html:iu(Kt[0]),mathml:iu(Kt[1])}},htmlBuilder:function(jt,Kt){var Yt=qs(jt.html,Kt,!1);return Wr.makeFragment(Yt)},mathmlBuilder:function(jt,Kt){return Vp(jt.mathml,Kt)}});var Tm=function(jt){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(jt))return{number:+jt,unit:"bp"};var Kt=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(jt);if(!Kt)throw new ft("Invalid size: '"+jt+"' in \\includegraphics");var Yt={number:+(Kt[1]+Kt[2]),unit:Kt[3]};if(!po(Yt))throw new ft("Invalid unit: '"+Yt.unit+"' in \\includegraphics.");return Yt};ds({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn={number:0,unit:"em"},kn={number:.9,unit:"em"},qn={number:0,unit:"em"},er="";if(Yt[0])for(var pr=ks(Yt[0],"raw").string,$r=pr.split(","),Mr=0;Mr<$r.length;Mr++){var Yr=$r[Mr].split("=");if(Yr.length===2){var ho=Yr[1].trim();switch(Yr[0].trim()){case"alt":er=ho;break;case"width":Cn=Tm(ho);break;case"height":kn=Tm(ho);break;case"totalheight":qn=Tm(ho);break;default:throw new ft("Invalid key: '"+Yr[0]+"' in \\includegraphics.")}}}var wo=ks(Kt[0],"url").url;return er===""&&(er=wo,er=er.replace(/^.*[\\/]/,""),er=er.substring(0,er.lastIndexOf("."))),mn.settings.isTrusted({command:"\\includegraphics",url:wo})?{type:"includegraphics",mode:mn.mode,alt:er,width:Cn,height:kn,totalheight:qn,src:wo}:mn.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(jt,Kt){var Yt=qo(jt.height,Kt),mn=0;jt.totalheight.number>0&&(mn=qo(jt.totalheight,Kt)-Yt,mn=Number(mn.toFixed(2)));var Cn=0;jt.width.number>0&&(Cn=qo(jt.width,Kt));var kn={height:Yt+mn+"em"};Cn>0&&(kn.width=Cn+"em"),mn>0&&(kn.verticalAlign=-mn+"em");var qn=new So(jt.src,jt.alt,kn);return qn.height=Yt,qn.depth=mn,qn},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mglyph",[]);Yt.setAttribute("alt",jt.alt);var mn=qo(jt.height,Kt),Cn=0;if(jt.totalheight.number>0&&(Cn=qo(jt.totalheight,Kt)-mn,Cn=Cn.toFixed(2),Yt.setAttribute("valign","-"+Cn+"em")),Yt.setAttribute("height",mn+Cn+"em"),jt.width.number>0){var kn=qo(jt.width,Kt);Yt.setAttribute("width",kn+"em")}return Yt.setAttribute("src",jt.src),Yt}}),ds({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=ks(Kt[0],"size");if(Yt.settings.strict){var kn=mn[1]==="m",qn=Cn.value.unit==="mu";kn?(qn||Yt.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+mn+" supports only mu units, "+("not "+Cn.value.unit+" units")),Yt.mode!=="math"&&Yt.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+mn+" works only in math mode")):qn&&Yt.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+mn+" doesn't support mu units")}return{type:"kern",mode:Yt.mode,dimension:Cn.value}},htmlBuilder:function(jt,Kt){return Wr.makeGlue(jt.dimension,Kt)},mathmlBuilder:function(jt,Kt){var Yt=qo(jt.dimension,Kt);return new xo.SpaceNode(Yt)}}),ds({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0];return{type:"lap",mode:Yt.mode,alignment:mn.slice(5),body:Cn}},htmlBuilder:function(jt,Kt){var Yt;jt.alignment==="clap"?(Yt=Wr.makeSpan([],[Js(jt.body,Kt)]),Yt=Wr.makeSpan(["inner"],[Yt],Kt)):Yt=Wr.makeSpan(["inner"],[Js(jt.body,Kt)]);var mn=Wr.makeSpan(["fix"],[]),Cn=Wr.makeSpan([jt.alignment],[Yt,mn],Kt),kn=Wr.makeSpan(["strut"]);return kn.style.height=Cn.height+Cn.depth+"em",kn.style.verticalAlign=-Cn.depth+"em",Cn.children.unshift(kn),Cn=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Cn}]},Kt),Wr.makeSpan(["mord"],[Cn],Kt)},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mpadded",[Ol(jt.body,Kt)]);if(jt.alignment!=="rlap"){var mn=jt.alignment==="llap"?"-1":"-0.5";Yt.setAttribute("lspace",mn+"width")}return Yt.setAttribute("width","0px"),Yt}}),ds({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(jt,Kt){var Yt=jt.funcName,mn=jt.parser,Cn=mn.mode;mn.switchMode("math");var kn=Yt==="\\("?"\\)":"$",qn=mn.parseExpression(!1,kn);return mn.expect(kn),mn.switchMode(Cn),{type:"styling",mode:mn.mode,style:"text",body:qn}}}),ds({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(jt,Kt){throw new ft("Mismatched "+jt.funcName)}});var q1=function(jt,Kt){switch(Kt.style.size){case En.DISPLAY.size:return jt.display;case En.TEXT.size:return jt.text;case En.SCRIPT.size:return jt.script;case En.SCRIPTSCRIPT.size:return jt.scriptscript;default:return jt.text}};ds({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(jt,Kt){var Yt=jt.parser;return{type:"mathchoice",mode:Yt.mode,display:iu(Kt[0]),text:iu(Kt[1]),script:iu(Kt[2]),scriptscript:iu(Kt[3])}},htmlBuilder:function(jt,Kt){var Yt=q1(jt,Kt),mn=qs(Yt,Kt,!1);return Wr.makeFragment(mn)},mathmlBuilder:function(jt,Kt){var Yt=q1(jt,Kt);return Vp(Yt,Kt)}});var Km=function(jt,Kt,Yt,mn,Cn,kn,qn){jt=Wr.makeSpan([],[jt]);var er,pr;if(Kt){var $r=Js(Kt,mn.havingStyle(Cn.sup()),mn);pr={elem:$r,kern:Math.max(mn.fontMetrics().bigOpSpacing1,mn.fontMetrics().bigOpSpacing3-$r.depth)}}if(Yt){var Mr=Js(Yt,mn.havingStyle(Cn.sub()),mn);er={elem:Mr,kern:Math.max(mn.fontMetrics().bigOpSpacing2,mn.fontMetrics().bigOpSpacing4-Mr.height)}}var Yr;if(pr&&er){var ho=mn.fontMetrics().bigOpSpacing5+er.elem.height+er.elem.depth+er.kern+jt.depth+qn;Yr=Wr.makeVList({positionType:"bottom",positionData:ho,children:[{type:"kern",size:mn.fontMetrics().bigOpSpacing5},{type:"elem",elem:er.elem,marginLeft:-kn+"em"},{type:"kern",size:er.kern},{type:"elem",elem:jt},{type:"kern",size:pr.kern},{type:"elem",elem:pr.elem,marginLeft:kn+"em"},{type:"kern",size:mn.fontMetrics().bigOpSpacing5}]},mn)}else if(er){var wo=jt.height-qn;Yr=Wr.makeVList({positionType:"top",positionData:wo,children:[{type:"kern",size:mn.fontMetrics().bigOpSpacing5},{type:"elem",elem:er.elem,marginLeft:-kn+"em"},{type:"kern",size:er.kern},{type:"elem",elem:jt}]},mn)}else if(pr){var Mo=jt.depth+qn;Yr=Wr.makeVList({positionType:"bottom",positionData:Mo,children:[{type:"elem",elem:jt},{type:"kern",size:pr.kern},{type:"elem",elem:pr.elem,marginLeft:kn+"em"},{type:"kern",size:mn.fontMetrics().bigOpSpacing5}]},mn)}else return jt;return Wr.makeSpan(["mop","op-limits"],[Yr],mn)},ku=["\\smallint"],Uu=function(jt,Kt){var Yt,mn,Cn=!1,kn,qn=Jl(jt,"supsub");qn?(Yt=qn.sup,mn=qn.sub,kn=ks(qn.base,"op"),Cn=!0):kn=ks(jt,"op");var er=Kt.style,pr=!1;er.size===En.DISPLAY.size&&kn.symbol&&!Ot.contains(ku,kn.name)&&(pr=!0);var $r;if(kn.symbol){var Mr=pr?"Size2-Regular":"Size1-Regular",Yr="";if((kn.name==="\\oiint"||kn.name==="\\oiiint")&&(Yr=kn.name.substr(1),kn.name=Yr==="oiint"?"\\iint":"\\iiint"),$r=Wr.makeSymbol(kn.name,Mr,"math",Kt,["mop","op-symbol",pr?"large-op":"small-op"]),Yr.length>0){var ho=$r.italic,wo=Wr.staticSvg(Yr+"Size"+(pr?"2":"1"),Kt);$r=Wr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:$r,shift:0},{type:"elem",elem:wo,shift:pr?.08:0}]},Kt),kn.name="\\"+Yr,$r.classes.unshift("mop"),$r.italic=ho}}else if(kn.body){var Mo=qs(kn.body,Kt,!0);Mo.length===1&&Mo[0]instanceof $o?($r=Mo[0],$r.classes[0]="mop"):$r=Wr.makeSpan(["mop"],Wr.tryCombineChars(Mo),Kt)}else{for(var os=[],Ms=1;Ms<kn.name.length;Ms++)os.push(Wr.mathsym(kn.name[Ms],kn.mode,Kt));$r=Wr.makeSpan(["mop"],os,Kt)}var Fs=0,Ls=0;return($r instanceof $o||kn.name==="\\oiint"||kn.name==="\\oiiint")&&!kn.suppressBaseShift&&(Fs=($r.height-$r.depth)/2-Kt.fontMetrics().axisHeight,Ls=$r.italic),Cn?Km($r,Yt,mn,Kt,er,Ls,Fs):(Fs&&($r.style.position="relative",$r.style.top=Fs+"em"),$r)},wp=function(jt,Kt){var Yt;if(jt.symbol)Yt=new cu("mo",[bu(jt.name,jt.mode)]),Ot.contains(ku,jt.name)&&Yt.setAttribute("largeop","false");else if(jt.body)Yt=new cu("mo",du(jt.body,Kt));else{Yt=new cu("mi",[new L1(jt.name.slice(1))]);var mn=new cu("mo",[bu("\u2061","text")]);jt.parentIsSupSub?Yt=new cu("mo",[Yt,mn]):Yt=ql([Yt,mn])}return Yt},Ly={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};ds({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=mn;return Cn.length===1&&(Cn=Ly[Cn]),{type:"op",mode:Yt.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:Cn}},htmlBuilder:Uu,mathmlBuilder:wp}),ds({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[0];return{type:"op",mode:Yt.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:iu(mn)}},htmlBuilder:Uu,mathmlBuilder:wp});var By={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};ds({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(jt){var Kt=jt.parser,Yt=jt.funcName;return{type:"op",mode:Kt.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:Yt}},htmlBuilder:Uu,mathmlBuilder:wp}),ds({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(jt){var Kt=jt.parser,Yt=jt.funcName;return{type:"op",mode:Kt.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:Yt}},htmlBuilder:Uu,mathmlBuilder:wp}),ds({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(jt){var Kt=jt.parser,Yt=jt.funcName,mn=Yt;return mn.length===1&&(mn=By[mn]),{type:"op",mode:Kt.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:mn}},htmlBuilder:Uu,mathmlBuilder:wp});var zy=function(jt,Kt){var Yt,mn,Cn=!1,kn,qn=Jl(jt,"supsub");qn?(Yt=qn.sup,mn=qn.sub,kn=ks(qn.base,"operatorname"),Cn=!0):kn=ks(jt,"operatorname");var er;if(kn.body.length>0){for(var pr=kn.body.map(function(ho){var wo=ho.text;return typeof wo=="string"?{type:"textord",mode:ho.mode,text:wo}:ho}),$r=qs(pr,Kt.withFont("mathrm"),!0),Mr=0;Mr<$r.length;Mr++){var Yr=$r[Mr];Yr instanceof $o&&(Yr.text=Yr.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}er=Wr.makeSpan(["mop"],$r,Kt)}else er=Wr.makeSpan(["mop"],[],Kt);return Cn?Km(er,Yt,mn,Kt,Kt.style,0,0):er},Op=function(jt,Kt){for(var Yt=du(jt.body,Kt.withFont("mathrm")),mn=!0,Cn=0;Cn<Yt.length;Cn++){var kn=Yt[Cn];if(!(kn instanceof xo.SpaceNode))if(kn instanceof xo.MathNode)switch(kn.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var qn=kn.children[0];kn.children.length===1&&qn instanceof xo.TextNode?qn.text=qn.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):mn=!1;break}default:mn=!1}else mn=!1}if(mn){var er=Yt.map(function(Mr){return Mr.toText()}).join("");Yt=[new xo.TextNode(er)]}var pr=new xo.MathNode("mi",Yt);pr.setAttribute("mathvariant","normal");var $r=new xo.MathNode("mo",[bu("\u2061","text")]);return jt.parentIsSupSub?new xo.MathNode("mo",[pr,$r]):xo.newDocumentFragment([pr,$r])};ds({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0];return{type:"operatorname",mode:Yt.mode,body:iu(Cn),alwaysHandleSupSub:mn==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:zy,mathmlBuilder:Op}),Sp({type:"ordgroup",htmlBuilder:function(jt,Kt){return jt.semisimple?Wr.makeFragment(qs(jt.body,Kt,!1)):Wr.makeSpan(["mord"],qs(jt.body,Kt,!0),Kt)},mathmlBuilder:function(jt,Kt){return Vp(jt.body,Kt,!0)}}),ds({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[0];return{type:"overline",mode:Yt.mode,body:mn}},htmlBuilder:function(jt,Kt){var Yt=Js(jt.body,Kt.havingCrampedStyle()),mn=Wr.makeLineSpan("overline-line",Kt),Cn=Kt.fontMetrics().defaultRuleThickness,kn=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Yt},{type:"kern",size:3*Cn},{type:"elem",elem:mn},{type:"kern",size:Cn}]},Kt);return Wr.makeSpan(["mord","overline"],[kn],Kt)},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mo",[new xo.TextNode("\u203E")]);Yt.setAttribute("stretchy","true");var mn=new xo.MathNode("mover",[Ol(jt.body,Kt),Yt]);return mn.setAttribute("accent","true"),mn}}),ds({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[0];return{type:"phantom",mode:Yt.mode,body:iu(mn)}},htmlBuilder:function(jt,Kt){var Yt=qs(jt.body,Kt.withPhantom(),!1);return Wr.makeFragment(Yt)},mathmlBuilder:function(jt,Kt){var Yt=du(jt.body,Kt);return new xo.MathNode("mphantom",Yt)}}),ds({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[0];return{type:"hphantom",mode:Yt.mode,body:mn}},htmlBuilder:function(jt,Kt){var Yt=Wr.makeSpan([],[Js(jt.body,Kt.withPhantom())]);if(Yt.height=0,Yt.depth=0,Yt.children)for(var mn=0;mn<Yt.children.length;mn++)Yt.children[mn].height=0,Yt.children[mn].depth=0;return Yt=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Yt}]},Kt),Wr.makeSpan(["mord"],[Yt],Kt)},mathmlBuilder:function(jt,Kt){var Yt=du(iu(jt.body),Kt),mn=new xo.MathNode("mphantom",Yt),Cn=new xo.MathNode("mpadded",[mn]);return Cn.setAttribute("height","0px"),Cn.setAttribute("depth","0px"),Cn}}),ds({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=Kt[0];return{type:"vphantom",mode:Yt.mode,body:mn}},htmlBuilder:function(jt,Kt){var Yt=Wr.makeSpan(["inner"],[Js(jt.body,Kt.withPhantom())]),mn=Wr.makeSpan(["fix"],[]);return Wr.makeSpan(["mord","rlap"],[Yt,mn],Kt)},mathmlBuilder:function(jt,Kt){var Yt=du(iu(jt.body),Kt),mn=new xo.MathNode("mphantom",Yt),Cn=new xo.MathNode("mpadded",[mn]);return Cn.setAttribute("width","0px"),Cn}}),ds({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=ks(Kt[0],"size").value,Cn=Kt[1];return{type:"raisebox",mode:Yt.mode,dy:mn,body:Cn}},htmlBuilder:function(jt,Kt){var Yt=Js(jt.body,Kt),mn=qo(jt.dy,Kt);return Wr.makeVList({positionType:"shift",positionData:-mn,children:[{type:"elem",elem:Yt}]},Kt)},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mpadded",[Ol(jt.body,Kt)]),mn=jt.dy.number+jt.dy.unit;return Yt.setAttribute("voffset",mn),Yt}}),ds({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=Yt[0],kn=ks(Kt[0],"size"),qn=ks(Kt[1],"size");return{type:"rule",mode:mn.mode,shift:Cn&&ks(Cn,"size").value,width:kn.value,height:qn.value}},htmlBuilder:function(jt,Kt){var Yt=Wr.makeSpan(["mord","rule"],[],Kt),mn=qo(jt.width,Kt),Cn=qo(jt.height,Kt),kn=jt.shift?qo(jt.shift,Kt):0;return Yt.style.borderRightWidth=mn+"em",Yt.style.borderTopWidth=Cn+"em",Yt.style.bottom=kn+"em",Yt.width=mn,Yt.height=Cn+kn,Yt.depth=-kn,Yt.maxFontSize=Cn*1.125*Kt.sizeMultiplier,Yt},mathmlBuilder:function(jt,Kt){var Yt=qo(jt.width,Kt),mn=qo(jt.height,Kt),Cn=jt.shift?qo(jt.shift,Kt):0,kn=Kt.color&&Kt.getColor()||"black",qn=new xo.MathNode("mspace");qn.setAttribute("mathbackground",kn),qn.setAttribute("width",Yt+"em"),qn.setAttribute("height",mn+"em");var er=new xo.MathNode("mpadded",[qn]);return Cn>=0?er.setAttribute("height","+"+Cn+"em"):(er.setAttribute("height",Cn+"em"),er.setAttribute("depth","+"+-Cn+"em")),er.setAttribute("voffset",Cn+"em"),er}});function g1(Mn,jt,Kt){for(var Yt=qs(Mn,jt,!1),mn=jt.sizeMultiplier/Kt.sizeMultiplier,Cn=0;Cn<Yt.length;Cn++){var kn=Yt[Cn].classes.indexOf("sizing");kn<0?Array.prototype.push.apply(Yt[Cn].classes,jt.sizingClasses(Kt)):Yt[Cn].classes[kn+1]==="reset-size"+jt.size&&(Yt[Cn].classes[kn+1]="reset-size"+Kt.size),Yt[Cn].height*=mn,Yt[Cn].depth*=mn}return Wr.makeFragment(Yt)}var lp=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Rv=function(jt,Kt){var Yt=Kt.havingSize(jt.size);return g1(jt.body,Yt,Kt)};ds({type:"sizing",names:lp,props:{numArgs:0,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.breakOnTokenText,mn=jt.funcName,Cn=jt.parser,kn=Cn.parseExpression(!1,Yt);return{type:"sizing",mode:Cn.mode,size:lp.indexOf(mn)+1,body:kn}},htmlBuilder:Rv,mathmlBuilder:function(jt,Kt){var Yt=Kt.havingSize(jt.size),mn=du(jt.body,Yt),Cn=new xo.MathNode("mstyle",mn);return Cn.setAttribute("mathsize",Yt.sizeMultiplier+"em"),Cn}}),ds({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=!1,kn=!1,qn=Yt[0]&&ks(Yt[0],"ordgroup");if(qn)for(var er="",pr=0;pr<qn.body.length;++pr){var $r=qn.body[pr];if(er=$r.text,er==="t")Cn=!0;else if(er==="b")kn=!0;else{Cn=!1,kn=!1;break}}else Cn=!0,kn=!0;var Mr=Kt[0];return{type:"smash",mode:mn.mode,body:Mr,smashHeight:Cn,smashDepth:kn}},htmlBuilder:function(jt,Kt){var Yt=Wr.makeSpan([],[Js(jt.body,Kt)]);if(!jt.smashHeight&&!jt.smashDepth)return Yt;if(jt.smashHeight&&(Yt.height=0,Yt.children))for(var mn=0;mn<Yt.children.length;mn++)Yt.children[mn].height=0;if(jt.smashDepth&&(Yt.depth=0,Yt.children))for(var Cn=0;Cn<Yt.children.length;Cn++)Yt.children[Cn].depth=0;var kn=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Yt}]},Kt);return Wr.makeSpan(["mord"],[kn],Kt)},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mpadded",[Ol(jt.body,Kt)]);return jt.smashHeight&&Yt.setAttribute("height","0px"),jt.smashDepth&&Yt.setAttribute("depth","0px"),Yt}}),ds({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(jt,Kt,Yt){var mn=jt.parser,Cn=Yt[0],kn=Kt[0];return{type:"sqrt",mode:mn.mode,body:kn,index:Cn}},htmlBuilder:function(jt,Kt){var Yt=Js(jt.body,Kt.havingCrampedStyle());Yt.height===0&&(Yt.height=Kt.fontMetrics().xHeight),Yt=Wr.wrapFragment(Yt,Kt);var mn=Kt.fontMetrics(),Cn=mn.defaultRuleThickness,kn=Cn;Kt.style.id<En.TEXT.id&&(kn=Kt.fontMetrics().xHeight);var qn=Cn+kn/4,er=Yt.height+Yt.depth+qn+Cn,pr=Yp.sqrtImage(er,Kt),$r=pr.span,Mr=pr.ruleWidth,Yr=pr.advanceWidth,ho=$r.height-Mr;ho>Yt.height+Yt.depth+qn&&(qn=(qn+ho-Yt.height-Yt.depth)/2);var wo=$r.height-Yt.height-qn-Mr;Yt.style.paddingLeft=Yr+"em";var Mo=Wr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Yt,wrapperClasses:["svg-align"]},{type:"kern",size:-(Yt.height+wo)},{type:"elem",elem:$r},{type:"kern",size:Mr}]},Kt);if(jt.index){var os=Kt.havingStyle(En.SCRIPTSCRIPT),Ms=Js(jt.index,os,Kt),Fs=.6*(Mo.height-Mo.depth),Ls=Wr.makeVList({positionType:"shift",positionData:-Fs,children:[{type:"elem",elem:Ms}]},Kt),fl=Wr.makeSpan(["root"],[Ls]);return Wr.makeSpan(["mord","sqrt"],[fl,Mo],Kt)}else return Wr.makeSpan(["mord","sqrt"],[Mo],Kt)},mathmlBuilder:function(jt,Kt){var Yt=jt.body,mn=jt.index;return mn?new xo.MathNode("mroot",[Ol(Yt,Kt),Ol(mn,Kt)]):new xo.MathNode("msqrt",[Ol(Yt,Kt)])}});var B0={display:En.DISPLAY,text:En.TEXT,script:En.SCRIPT,scriptscript:En.SCRIPTSCRIPT};ds({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.breakOnTokenText,mn=jt.funcName,Cn=jt.parser,kn=Cn.parseExpression(!0,Yt),qn=mn.slice(1,mn.length-5);return{type:"styling",mode:Cn.mode,style:qn,body:kn}},htmlBuilder:function(jt,Kt){var Yt=B0[jt.style],mn=Kt.havingStyle(Yt).withFont("");return g1(jt.body,mn,Kt)},mathmlBuilder:function(jt,Kt){var Yt=B0[jt.style],mn=Kt.havingStyle(Yt),Cn=du(jt.body,mn),kn=new xo.MathNode("mstyle",Cn),qn={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},er=qn[jt.style];return kn.setAttribute("scriptlevel",er[0]),kn.setAttribute("displaystyle",er[1]),kn}});var Iv=function(jt,Kt){var Yt=jt.base;if(Yt)if(Yt.type==="op"){var mn=Yt.limits&&(Kt.style.size===En.DISPLAY.size||Yt.alwaysHandleSupSub);return mn?Uu:null}else if(Yt.type==="operatorname"){var Cn=Yt.alwaysHandleSupSub&&(Kt.style.size===En.DISPLAY.size||Yt.limits);return Cn?zy:null}else{if(Yt.type==="accent")return Ot.isCharacterBox(Yt.base)?w0:null;if(Yt.type==="horizBrace"){var kn=!jt.sub;return kn===Yt.isOver?bm:null}else return null}else return null};Sp({type:"supsub",htmlBuilder:function(jt,Kt){var Yt=Iv(jt,Kt);if(Yt)return Yt(jt,Kt);var mn=jt.base,Cn=jt.sup,kn=jt.sub,qn=Js(mn,Kt),er,pr,$r=Kt.fontMetrics(),Mr=0,Yr=0,ho=mn&&Ot.isCharacterBox(mn);if(Cn){var wo=Kt.havingStyle(Kt.style.sup());er=Js(Cn,wo,Kt),ho||(Mr=qn.height-wo.fontMetrics().supDrop*wo.sizeMultiplier/Kt.sizeMultiplier)}if(kn){var Mo=Kt.havingStyle(Kt.style.sub());pr=Js(kn,Mo,Kt),ho||(Yr=qn.depth+Mo.fontMetrics().subDrop*Mo.sizeMultiplier/Kt.sizeMultiplier)}var os;Kt.style===En.DISPLAY?os=$r.sup1:Kt.style.cramped?os=$r.sup3:os=$r.sup2;var Ms=Kt.sizeMultiplier,Fs=.5/$r.ptPerEm/Ms+"em",Ls=null;if(pr){var fl=jt.base&&jt.base.type==="op"&&jt.base.name&&(jt.base.name==="\\oiint"||jt.base.name==="\\oiiint");(qn instanceof $o||fl)&&(Ls=-qn.italic+"em")}var ml;if(er&&pr){Mr=Math.max(Mr,os,er.depth+.25*$r.xHeight),Yr=Math.max(Yr,$r.sub2);var Rl=$r.defaultRuleThickness,Ml=4*Rl;if(Mr-er.depth-(pr.height-Yr)<Ml){Yr=Ml-(Mr-er.depth)+pr.height;var Al=.8*$r.xHeight-(Mr-er.depth);Al>0&&(Mr+=Al,Yr-=Al)}var tu=[{type:"elem",elem:pr,shift:Yr,marginRight:Fs,marginLeft:Ls},{type:"elem",elem:er,shift:-Mr,marginRight:Fs}];ml=Wr.makeVList({positionType:"individualShift",children:tu},Kt)}else if(pr){Yr=Math.max(Yr,$r.sub1,pr.height-.8*$r.xHeight);var zl=[{type:"elem",elem:pr,marginLeft:Ls,marginRight:Fs}];ml=Wr.makeVList({positionType:"shift",positionData:Yr,children:zl},Kt)}else if(er)Mr=Math.max(Mr,os,er.depth+.25*$r.xHeight),ml=Wr.makeVList({positionType:"shift",positionData:-Mr,children:[{type:"elem",elem:er,marginRight:Fs}]},Kt);else throw new Error("supsub must have either sup or sub.");var Ks=fm(qn,"right")||"mord";return Wr.makeSpan([Ks],[qn,Wr.makeSpan(["msupsub"],[ml])],Kt)},mathmlBuilder:function(jt,Kt){var Yt=!1,mn,Cn,kn=Jl(jt.base,"horizBrace");kn&&(Cn=!!jt.sup,Cn===kn.isOver&&(Yt=!0,mn=kn.isOver)),jt.base&&(jt.base.type==="op"||jt.base.type==="operatorname")&&(jt.base.parentIsSupSub=!0);var qn=[Ol(jt.base,Kt)];jt.sub&&qn.push(Ol(jt.sub,Kt)),jt.sup&&qn.push(Ol(jt.sup,Kt));var er;if(Yt)er=mn?"mover":"munder";else if(jt.sub)if(jt.sup){var Mr=jt.base;Mr&&Mr.type==="op"&&Mr.limits&&Kt.style===En.DISPLAY||Mr&&Mr.type==="operatorname"&&Mr.alwaysHandleSupSub&&(Kt.style===En.DISPLAY||Mr.limits)?er="munderover":er="msubsup"}else{var $r=jt.base;$r&&$r.type==="op"&&$r.limits&&(Kt.style===En.DISPLAY||$r.alwaysHandleSupSub)||$r&&$r.type==="operatorname"&&$r.alwaysHandleSupSub&&($r.limits||Kt.style===En.DISPLAY)?er="munder":er="msub"}else{var pr=jt.base;pr&&pr.type==="op"&&pr.limits&&(Kt.style===En.DISPLAY||pr.alwaysHandleSupSub)||pr&&pr.type==="operatorname"&&pr.alwaysHandleSupSub&&(pr.limits||Kt.style===En.DISPLAY)?er="mover":er="msup"}var Yr=new xo.MathNode(er,qn);return Yr}}),Sp({type:"atom",htmlBuilder:function(jt,Kt){return Wr.mathsym(jt.text,jt.mode,Kt,["m"+jt.family])},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mo",[bu(jt.text,jt.mode)]);if(jt.family==="bin"){var mn=Du(jt,Kt);mn==="bold-italic"&&Yt.setAttribute("mathvariant",mn)}else jt.family==="punct"?Yt.setAttribute("separator","true"):(jt.family==="open"||jt.family==="close")&&Yt.setAttribute("stretchy","false");return Yt}});var yl={mi:"italic",mn:"normal",mtext:"normal"};Sp({type:"mathord",htmlBuilder:function(jt,Kt){return Wr.makeOrd(jt,Kt,"mathord")},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mi",[bu(jt.text,jt.mode,Kt)]),mn=Du(jt,Kt)||"italic";return mn!==yl[Yt.type]&&Yt.setAttribute("mathvariant",mn),Yt}}),Sp({type:"textord",htmlBuilder:function(jt,Kt){return Wr.makeOrd(jt,Kt,"textord")},mathmlBuilder:function(jt,Kt){var Yt=bu(jt.text,jt.mode,Kt),mn=Du(jt,Kt)||"normal",Cn;return jt.mode==="text"?Cn=new xo.MathNode("mtext",[Yt]):/[0-9]/.test(jt.text)?Cn=new xo.MathNode("mn",[Yt]):jt.text==="\\prime"?Cn=new xo.MathNode("mo",[Yt]):Cn=new xo.MathNode("mi",[Yt]),mn!==yl[Cn.type]&&Cn.setAttribute("mathvariant",mn),Cn}});var jl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Sp({type:"spacing",htmlBuilder:function(jt,Kt){if(Hl.hasOwnProperty(jt.text)){var Yt=Hl[jt.text].className||"";if(jt.mode==="text"){var mn=Wr.makeOrd(jt,Kt,"textord");return mn.classes.push(Yt),mn}else return Wr.makeSpan(["mspace",Yt],[Wr.mathsym(jt.text,jt.mode,Kt)],Kt)}else{if(jl.hasOwnProperty(jt.text))return Wr.makeSpan(["mspace",jl[jt.text]],[],Kt);throw new ft('Unknown type of space "'+jt.text+'"')}},mathmlBuilder:function(jt,Kt){var Yt;if(Hl.hasOwnProperty(jt.text))Yt=new xo.MathNode("mtext",[new xo.TextNode("\xA0")]);else{if(jl.hasOwnProperty(jt.text))return new xo.MathNode("mspace");throw new ft('Unknown type of space "'+jt.text+'"')}return Yt}});var ll=function(){var jt=new xo.MathNode("mtd",[]);return jt.setAttribute("width","50%"),jt};Sp({type:"tag",mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mtable",[new xo.MathNode("mtr",[ll(),new xo.MathNode("mtd",[Vp(jt.body,Kt)]),ll(),new xo.MathNode("mtd",[Vp(jt.tag,Kt)])])]);return Yt.setAttribute("width","100%"),Yt}});var Cl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},rs={"\\textbf":"textbf","\\textmd":"textmd"},j0={"\\textit":"textit","\\textup":"textup"},Ym=function(jt,Kt){var Yt=jt.font;return Yt?Cl[Yt]?Kt.withTextFontFamily(Cl[Yt]):rs[Yt]?Kt.withTextFontWeight(rs[Yt]):Kt.withTextFontShape(j0[Yt]):Kt};ds({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser,mn=jt.funcName,Cn=Kt[0];return{type:"text",mode:Yt.mode,body:iu(Cn),font:mn}},htmlBuilder:function(jt,Kt){var Yt=Ym(jt,Kt),mn=qs(jt.body,Yt,!0);return Wr.makeSpan(["mord","text"],Wr.tryCombineChars(mn),Yt)},mathmlBuilder:function(jt,Kt){var Yt=Ym(jt,Kt);return Vp(jt.body,Yt)}}),ds({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(jt,Kt){var Yt=jt.parser;return{type:"underline",mode:Yt.mode,body:Kt[0]}},htmlBuilder:function(jt,Kt){var Yt=Js(jt.body,Kt),mn=Wr.makeLineSpan("underline-line",Kt),Cn=Kt.fontMetrics().defaultRuleThickness,kn=Wr.makeVList({positionType:"top",positionData:Yt.height,children:[{type:"kern",size:Cn},{type:"elem",elem:mn},{type:"kern",size:3*Cn},{type:"elem",elem:Yt}]},Kt);return Wr.makeSpan(["mord","underline"],[kn],Kt)},mathmlBuilder:function(jt,Kt){var Yt=new xo.MathNode("mo",[new xo.TextNode("\u203E")]);Yt.setAttribute("stretchy","true");var mn=new xo.MathNode("munder",[Ol(jt.body,Kt),Yt]);return mn.setAttribute("accentunder","true"),mn}}),ds({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(jt,Kt,Yt){throw new ft("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(jt,Kt){for(var Yt=K1(jt),mn=[],Cn=Kt.havingStyle(Kt.style.text()),kn=0;kn<Yt.length;kn++){var qn=Yt[kn];qn==="~"&&(qn="\\textasciitilde"),mn.push(Wr.makeSymbol(qn,"Typewriter-Regular",jt.mode,Cn,["mord","texttt"]))}return Wr.makeSpan(["mord","text"].concat(Cn.sizingClasses(Kt)),Wr.tryCombineChars(mn),Cn)},mathmlBuilder:function(jt,Kt){var Yt=new xo.TextNode(K1(jt)),mn=new xo.MathNode("mtext",[Yt]);return mn.setAttribute("mathvariant","monospace"),mn}});var K1=function(jt){return jt.body.replace(/ /g,jt.star?"\u2423":"\xA0")},H0=jm,Tu=H0,Pu=`[ \r
	]`,Qp="\\\\[a-zA-Z@]+",Xm="\\\\[^\uD800-\uDFFF]",Q1=""+Qp+Pu+"*",Dv=new RegExp("^("+Qp+")"+Pu+"*$"),U0="[\u0300-\u036F]",Nv=new RegExp(U0+"+$"),Wy="("+Pu+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(U0+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(U0+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Q1)+("|"+Xm+")"),jy=function(){function Mn(Kt,Yt){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=Kt,this.settings=Yt,this.tokenRegex=new RegExp(Wy,"g"),this.catcodes={"%":14}}var jt=Mn.prototype;return jt.setCatcode=function(Yt,mn){this.catcodes[Yt]=mn},jt.lex=function(){var Yt=this.input,mn=this.tokenRegex.lastIndex;if(mn===Yt.length)return new ut("EOF",new st(this,mn,mn));var Cn=this.tokenRegex.exec(Yt);if(Cn===null||Cn.index!==mn)throw new ft("Unexpected character: '"+Yt[mn]+"'",new ut(Yt[mn],new st(this,mn,mn+1)));var kn=Cn[2]||" ";if(this.catcodes[kn]===14){var qn=Yt.indexOf(`
`,this.tokenRegex.lastIndex);return qn===-1?(this.tokenRegex.lastIndex=Yt.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=qn+1,this.lex()}var er=kn.match(Dv);return er&&(kn=er[1]),new ut(kn,new st(this,mn,this.tokenRegex.lastIndex))},Mn}(),Zm=function(){function Mn(Kt,Yt){Kt===void 0&&(Kt={}),Yt===void 0&&(Yt={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=Yt,this.builtins=Kt,this.undefStack=[]}var jt=Mn.prototype;return jt.beginGroup=function(){this.undefStack.push({})},jt.endGroup=function(){if(this.undefStack.length===0)throw new ft("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var Yt=this.undefStack.pop();for(var mn in Yt)Yt.hasOwnProperty(mn)&&(Yt[mn]===void 0?delete this.current[mn]:this.current[mn]=Yt[mn])},jt.has=function(Yt){return this.current.hasOwnProperty(Yt)||this.builtins.hasOwnProperty(Yt)},jt.get=function(Yt){return this.current.hasOwnProperty(Yt)?this.current[Yt]:this.builtins[Yt]},jt.set=function(Yt,mn,Cn){if(Cn===void 0&&(Cn=!1),Cn){for(var kn=0;kn<this.undefStack.length;kn++)delete this.undefStack[kn][Yt];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][Yt]=mn)}else{var qn=this.undefStack[this.undefStack.length-1];qn&&!qn.hasOwnProperty(Yt)&&(qn[Yt]=this.current[Yt])}this.current[Yt]=mn},Mn}(),Jp={},Hy=Jp;function Tn(Mn,jt){Jp[Mn]=jt}Tn("\\@firstoftwo",function(Mn){var jt=Mn.consumeArgs(2);return{tokens:jt[0],numArgs:0}}),Tn("\\@secondoftwo",function(Mn){var jt=Mn.consumeArgs(2);return{tokens:jt[1],numArgs:0}}),Tn("\\@ifnextchar",function(Mn){var jt=Mn.consumeArgs(3),Kt=Mn.future();return jt[0].length===1&&jt[0][0].text===Kt.text?{tokens:jt[1],numArgs:0}:{tokens:jt[2],numArgs:0}}),Tn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Tn("\\TextOrMath",function(Mn){var jt=Mn.consumeArgs(2);return Mn.mode==="text"?{tokens:jt[0],numArgs:0}:{tokens:jt[1],numArgs:0}});var vl={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Tn("\\char",function(Mn){var jt=Mn.popToken(),Kt,Yt="";if(jt.text==="'")Kt=8,jt=Mn.popToken();else if(jt.text==='"')Kt=16,jt=Mn.popToken();else if(jt.text==="`")if(jt=Mn.popToken(),jt.text[0]==="\\")Yt=jt.text.charCodeAt(1);else{if(jt.text==="EOF")throw new ft("\\char` missing argument");Yt=jt.text.charCodeAt(0)}else Kt=10;if(Kt){if(Yt=vl[jt.text],Yt==null||Yt>=Kt)throw new ft("Invalid base-"+Kt+" digit "+jt.text);for(var mn;(mn=vl[Mn.future().text])!=null&&mn<Kt;)Yt*=Kt,Yt+=mn,Mn.popToken()}return"\\@char{"+Yt+"}"});var J1=function(jt,Kt){var Yt=jt.consumeArgs(1)[0];if(Yt.length!==1)throw new ft("\\gdef's first argument must be a macro name");var mn=Yt[0].text,Cn=0;for(Yt=jt.consumeArgs(1)[0];Yt.length===1&&Yt[0].text==="#";){if(Yt=jt.consumeArgs(1)[0],Yt.length!==1)throw new ft('Invalid argument number length "'+Yt.length+'"');if(!/^[1-9]$/.test(Yt[0].text))throw new ft('Invalid argument number "'+Yt[0].text+'"');if(Cn++,parseInt(Yt[0].text)!==Cn)throw new ft('Argument number "'+Yt[0].text+'" out of order');Yt=jt.consumeArgs(1)[0]}return jt.macros.set(mn,{tokens:Yt,numArgs:Cn},Kt),""};Tn("\\gdef",function(Mn){return J1(Mn,!0)}),Tn("\\def",function(Mn){return J1(Mn,!1)}),Tn("\\global",function(Mn){var jt=Mn.consumeArgs(1)[0];if(jt.length!==1)throw new ft("Invalid command after \\global");var Kt=jt[0].text;if(Kt==="\\def")return J1(Mn,!0);throw new ft("Invalid command '"+Kt+"' after \\global")});var Mu=function(jt,Kt,Yt){var mn=jt.consumeArgs(1)[0];if(mn.length!==1)throw new ft("\\newcommand's first argument must be a macro name");var Cn=mn[0].text,kn=jt.isDefined(Cn);if(kn&&!Kt)throw new ft("\\newcommand{"+Cn+"} attempting to redefine "+(Cn+"; use \\renewcommand"));if(!kn&&!Yt)throw new ft("\\renewcommand{"+Cn+"} when command "+Cn+" does not yet exist; use \\newcommand");var qn=0;if(mn=jt.consumeArgs(1)[0],mn.length===1&&mn[0].text==="["){for(var er="",pr=jt.expandNextToken();pr.text!=="]"&&pr.text!=="EOF";)er+=pr.text,pr=jt.expandNextToken();if(!er.match(/^\s*[0-9]+\s*$/))throw new ft("Invalid number of arguments: "+er);qn=parseInt(er),mn=jt.consumeArgs(1)[0]}return jt.macros.set(Cn,{tokens:mn,numArgs:qn}),""};Tn("\\newcommand",function(Mn){return Mu(Mn,!1,!0)}),Tn("\\renewcommand",function(Mn){return Mu(Mn,!0,!1)}),Tn("\\providecommand",function(Mn){return Mu(Mn,!0,!0)}),Tn("\\bgroup","{"),Tn("\\egroup","}"),Tn("\\lq","`"),Tn("\\rq","'"),Tn("\\aa","\\r a"),Tn("\\AA","\\r A"),Tn("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Tn("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Tn("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Tn("\u212C","\\mathscr{B}"),Tn("\u2130","\\mathscr{E}"),Tn("\u2131","\\mathscr{F}"),Tn("\u210B","\\mathscr{H}"),Tn("\u2110","\\mathscr{I}"),Tn("\u2112","\\mathscr{L}"),Tn("\u2133","\\mathscr{M}"),Tn("\u211B","\\mathscr{R}"),Tn("\u212D","\\mathfrak{C}"),Tn("\u210C","\\mathfrak{H}"),Tn("\u2128","\\mathfrak{Z}"),Tn("\\Bbbk","\\Bbb{k}"),Tn("\xB7","\\cdotp"),Tn("\\llap","\\mathllap{\\textrm{#1}}"),Tn("\\rlap","\\mathrlap{\\textrm{#1}}"),Tn("\\clap","\\mathclap{\\textrm{#1}}"),Tn("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Tn("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Tn("\\ne","\\neq"),Tn("\u2260","\\neq"),Tn("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Tn("\u2209","\\notin"),Tn("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Tn("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Tn("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Tn("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Tn("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Tn("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Tn("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Tn("\u27C2","\\perp"),Tn("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Tn("\u220C","\\notni"),Tn("\u231C","\\ulcorner"),Tn("\u231D","\\urcorner"),Tn("\u231E","\\llcorner"),Tn("\u231F","\\lrcorner"),Tn("\xA9","\\copyright"),Tn("\xAE","\\textregistered"),Tn("\uFE0F","\\textregistered"),Tn("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Tn("\u22EE","\\vdots"),Tn("\\varGamma","\\mathit{\\Gamma}"),Tn("\\varDelta","\\mathit{\\Delta}"),Tn("\\varTheta","\\mathit{\\Theta}"),Tn("\\varLambda","\\mathit{\\Lambda}"),Tn("\\varXi","\\mathit{\\Xi}"),Tn("\\varPi","\\mathit{\\Pi}"),Tn("\\varSigma","\\mathit{\\Sigma}"),Tn("\\varUpsilon","\\mathit{\\Upsilon}"),Tn("\\varPhi","\\mathit{\\Phi}"),Tn("\\varPsi","\\mathit{\\Psi}"),Tn("\\varOmega","\\mathit{\\Omega}"),Tn("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Tn("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),Tn("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Tn("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Tn("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Tn("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var nl={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Tn("\\dots",function(Mn){var jt="\\dotso",Kt=Mn.expandAfterFuture().text;return Kt in nl?jt=nl[Kt]:(Kt.substr(0,4)==="\\not"||Kt in ws.math&&Ot.contains(["bin","rel"],ws.math[Kt].group))&&(jt="\\dotsb"),jt});var cp={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Tn("\\dotso",function(Mn){var jt=Mn.future().text;return jt in cp?"\\ldots\\,":"\\ldots"}),Tn("\\dotsc",function(Mn){var jt=Mn.future().text;return jt in cp&&jt!==","?"\\ldots\\,":"\\ldots"}),Tn("\\cdots",function(Mn){var jt=Mn.future().text;return jt in cp?"\\@cdots\\,":"\\@cdots"}),Tn("\\dotsb","\\cdots"),Tn("\\dotsm","\\cdots"),Tn("\\dotsi","\\!\\cdots"),Tn("\\dotsx","\\ldots\\,"),Tn("\\DOTSI","\\relax"),Tn("\\DOTSB","\\relax"),Tn("\\DOTSX","\\relax"),Tn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Tn("\\,","\\tmspace+{3mu}{.1667em}"),Tn("\\thinspace","\\,"),Tn("\\>","\\mskip{4mu}"),Tn("\\:","\\tmspace+{4mu}{.2222em}"),Tn("\\medspace","\\:"),Tn("\\;","\\tmspace+{5mu}{.2777em}"),Tn("\\thickspace","\\;"),Tn("\\!","\\tmspace-{3mu}{.1667em}"),Tn("\\negthinspace","\\!"),Tn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Tn("\\negthickspace","\\tmspace-{5mu}{.277em}"),Tn("\\enspace","\\kern.5em "),Tn("\\enskip","\\hskip.5em\\relax"),Tn("\\quad","\\hskip1em\\relax"),Tn("\\qquad","\\hskip2em\\relax"),Tn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Tn("\\tag@paren","\\tag@literal{({#1})}"),Tn("\\tag@literal",function(Mn){if(Mn.macros.get("\\df@tag"))throw new ft("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Tn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Tn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Tn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Tn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Tn("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Tn("\\\\","\\newline"),Tn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Rp=Eo["Main-Regular"]["T".charCodeAt(0)][1]-.7*Eo["Main-Regular"]["A".charCodeAt(0)][1]+"em";Tn("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Rp+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Tn("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Rp+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Tn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Tn("\\@hspace","\\hskip #1\\relax"),Tn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Tn("\\ordinarycolon",":"),Tn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Tn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Tn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Tn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Tn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Tn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Tn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Tn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Tn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Tn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Tn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Tn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Tn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Tn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Tn("\u2237","\\dblcolon"),Tn("\u2239","\\eqcolon"),Tn("\u2254","\\coloneqq"),Tn("\u2255","\\eqqcolon"),Tn("\u2A74","\\Coloneqq"),Tn("\\ratio","\\vcentcolon"),Tn("\\coloncolon","\\dblcolon"),Tn("\\colonequals","\\coloneqq"),Tn("\\coloncolonequals","\\Coloneqq"),Tn("\\equalscolon","\\eqqcolon"),Tn("\\equalscoloncolon","\\Eqqcolon"),Tn("\\colonminus","\\coloneq"),Tn("\\coloncolonminus","\\Coloneq"),Tn("\\minuscolon","\\eqcolon"),Tn("\\minuscoloncolon","\\Eqcolon"),Tn("\\coloncolonapprox","\\Colonapprox"),Tn("\\coloncolonsim","\\Colonsim"),Tn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Tn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Tn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Tn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Tn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Tn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Tn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Tn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Tn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Tn("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Tn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Tn("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Tn("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Tn("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Tn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Tn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Tn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Tn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Tn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Tn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Tn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Tn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Tn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Tn("\u27E6","\\llbracket"),Tn("\u27E7","\\rrbracket"),Tn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Tn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Tn("\u2983","\\lBrace"),Tn("\u2984","\\rBrace"),Tn("\\darr","\\downarrow"),Tn("\\dArr","\\Downarrow"),Tn("\\Darr","\\Downarrow"),Tn("\\lang","\\langle"),Tn("\\rang","\\rangle"),Tn("\\uarr","\\uparrow"),Tn("\\uArr","\\Uparrow"),Tn("\\Uarr","\\Uparrow"),Tn("\\N","\\mathbb{N}"),Tn("\\R","\\mathbb{R}"),Tn("\\Z","\\mathbb{Z}"),Tn("\\alef","\\aleph"),Tn("\\alefsym","\\aleph"),Tn("\\Alpha","\\mathrm{A}"),Tn("\\Beta","\\mathrm{B}"),Tn("\\bull","\\bullet"),Tn("\\Chi","\\mathrm{X}"),Tn("\\clubs","\\clubsuit"),Tn("\\cnums","\\mathbb{C}"),Tn("\\Complex","\\mathbb{C}"),Tn("\\Dagger","\\ddagger"),Tn("\\diamonds","\\diamondsuit"),Tn("\\empty","\\emptyset"),Tn("\\Epsilon","\\mathrm{E}"),Tn("\\Eta","\\mathrm{H}"),Tn("\\exist","\\exists"),Tn("\\harr","\\leftrightarrow"),Tn("\\hArr","\\Leftrightarrow"),Tn("\\Harr","\\Leftrightarrow"),Tn("\\hearts","\\heartsuit"),Tn("\\image","\\Im"),Tn("\\infin","\\infty"),Tn("\\Iota","\\mathrm{I}"),Tn("\\isin","\\in"),Tn("\\Kappa","\\mathrm{K}"),Tn("\\larr","\\leftarrow"),Tn("\\lArr","\\Leftarrow"),Tn("\\Larr","\\Leftarrow"),Tn("\\lrarr","\\leftrightarrow"),Tn("\\lrArr","\\Leftrightarrow"),Tn("\\Lrarr","\\Leftrightarrow"),Tn("\\Mu","\\mathrm{M}"),Tn("\\natnums","\\mathbb{N}"),Tn("\\Nu","\\mathrm{N}"),Tn("\\Omicron","\\mathrm{O}"),Tn("\\plusmn","\\pm"),Tn("\\rarr","\\rightarrow"),Tn("\\rArr","\\Rightarrow"),Tn("\\Rarr","\\Rightarrow"),Tn("\\real","\\Re"),Tn("\\reals","\\mathbb{R}"),Tn("\\Reals","\\mathbb{R}"),Tn("\\Rho","\\mathrm{P}"),Tn("\\sdot","\\cdot"),Tn("\\sect","\\S"),Tn("\\spades","\\spadesuit"),Tn("\\sub","\\subset"),Tn("\\sube","\\subseteq"),Tn("\\supe","\\supseteq"),Tn("\\Tau","\\mathrm{T}"),Tn("\\thetasym","\\vartheta"),Tn("\\weierp","\\wp"),Tn("\\Zeta","\\mathrm{Z}"),Tn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Tn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Tn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Tn("\\blue","\\textcolor{##6495ed}{#1}"),Tn("\\orange","\\textcolor{##ffa500}{#1}"),Tn("\\pink","\\textcolor{##ff00af}{#1}"),Tn("\\red","\\textcolor{##df0030}{#1}"),Tn("\\green","\\textcolor{##28ae7b}{#1}"),Tn("\\gray","\\textcolor{gray}{#1}"),Tn("\\purple","\\textcolor{##9d38bd}{#1}"),Tn("\\blueA","\\textcolor{##ccfaff}{#1}"),Tn("\\blueB","\\textcolor{##80f6ff}{#1}"),Tn("\\blueC","\\textcolor{##63d9ea}{#1}"),Tn("\\blueD","\\textcolor{##11accd}{#1}"),Tn("\\blueE","\\textcolor{##0c7f99}{#1}"),Tn("\\tealA","\\textcolor{##94fff5}{#1}"),Tn("\\tealB","\\textcolor{##26edd5}{#1}"),Tn("\\tealC","\\textcolor{##01d1c1}{#1}"),Tn("\\tealD","\\textcolor{##01a995}{#1}"),Tn("\\tealE","\\textcolor{##208170}{#1}"),Tn("\\greenA","\\textcolor{##b6ffb0}{#1}"),Tn("\\greenB","\\textcolor{##8af281}{#1}"),Tn("\\greenC","\\textcolor{##74cf70}{#1}"),Tn("\\greenD","\\textcolor{##1fab54}{#1}"),Tn("\\greenE","\\textcolor{##0d923f}{#1}"),Tn("\\goldA","\\textcolor{##ffd0a9}{#1}"),Tn("\\goldB","\\textcolor{##ffbb71}{#1}"),Tn("\\goldC","\\textcolor{##ff9c39}{#1}"),Tn("\\goldD","\\textcolor{##e07d10}{#1}"),Tn("\\goldE","\\textcolor{##a75a05}{#1}"),Tn("\\redA","\\textcolor{##fca9a9}{#1}"),Tn("\\redB","\\textcolor{##ff8482}{#1}"),Tn("\\redC","\\textcolor{##f9685d}{#1}"),Tn("\\redD","\\textcolor{##e84d39}{#1}"),Tn("\\redE","\\textcolor{##bc2612}{#1}"),Tn("\\maroonA","\\textcolor{##ffbde0}{#1}"),Tn("\\maroonB","\\textcolor{##ff92c6}{#1}"),Tn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Tn("\\maroonD","\\textcolor{##ca337c}{#1}"),Tn("\\maroonE","\\textcolor{##9e034e}{#1}"),Tn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Tn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Tn("\\purpleC","\\textcolor{##aa87ff}{#1}"),Tn("\\purpleD","\\textcolor{##7854ab}{#1}"),Tn("\\purpleE","\\textcolor{##543b78}{#1}"),Tn("\\mintA","\\textcolor{##f5f9e8}{#1}"),Tn("\\mintB","\\textcolor{##edf2df}{#1}"),Tn("\\mintC","\\textcolor{##e0e5cc}{#1}"),Tn("\\grayA","\\textcolor{##f6f7f7}{#1}"),Tn("\\grayB","\\textcolor{##f0f1f2}{#1}"),Tn("\\grayC","\\textcolor{##e3e5e6}{#1}"),Tn("\\grayD","\\textcolor{##d6d8da}{#1}"),Tn("\\grayE","\\textcolor{##babec2}{#1}"),Tn("\\grayF","\\textcolor{##888d93}{#1}"),Tn("\\grayG","\\textcolor{##626569}{#1}"),Tn("\\grayH","\\textcolor{##3b3e40}{#1}"),Tn("\\grayI","\\textcolor{##21242c}{#1}"),Tn("\\kaBlue","\\textcolor{##314453}{#1}"),Tn("\\kaGreen","\\textcolor{##71B307}{#1}");var Ip={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},eu=function(){function Mn(Kt,Yt,mn){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=Yt,this.expansionCount=0,this.feed(Kt),this.macros=new Zm(Hy,Yt.macros),this.mode=mn,this.stack=[]}var jt=Mn.prototype;return jt.feed=function(Yt){this.lexer=new jy(Yt,this.settings)},jt.switchMode=function(Yt){this.mode=Yt},jt.beginGroup=function(){this.macros.beginGroup()},jt.endGroup=function(){this.macros.endGroup()},jt.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},jt.popToken=function(){return this.future(),this.stack.pop()},jt.pushToken=function(Yt){this.stack.push(Yt)},jt.pushTokens=function(Yt){var mn;(mn=this.stack).push.apply(mn,Yt)},jt.consumeSpaces=function(){for(;;){var Yt=this.future();if(Yt.text===" ")this.stack.pop();else break}},jt.consumeArgs=function(Yt){for(var mn=[],Cn=0;Cn<Yt;++Cn){this.consumeSpaces();var kn=this.popToken();if(kn.text==="{"){for(var qn=[],er=1;er!==0;){var pr=this.popToken();if(qn.push(pr),pr.text==="{")++er;else if(pr.text==="}")--er;else if(pr.text==="EOF")throw new ft("End of input in macro argument",kn)}qn.pop(),qn.reverse(),mn[Cn]=qn}else{if(kn.text==="EOF")throw new ft("End of input expecting macro argument");mn[Cn]=[kn]}}return mn},jt.expandOnce=function(){var Yt=this.popToken(),mn=Yt.text,Cn=this._getExpansion(mn);if(Cn==null)return this.pushToken(Yt),Yt;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new ft("Too many expansions: infinite loop or need to increase maxExpand setting");var kn=Cn.tokens;if(Cn.numArgs){var qn=this.consumeArgs(Cn.numArgs);kn=kn.slice();for(var er=kn.length-1;er>=0;--er){var pr=kn[er];if(pr.text==="#"){if(er===0)throw new ft("Incomplete placeholder at end of macro body",pr);if(pr=kn[--er],pr.text==="#")kn.splice(er+1,1);else if(/^[1-9]$/.test(pr.text)){var $r;($r=kn).splice.apply($r,[er,2].concat(qn[+pr.text-1]))}else throw new ft("Not a valid argument number",pr)}}}return this.pushTokens(kn),kn},jt.expandAfterFuture=function(){return this.expandOnce(),this.future()},jt.expandNextToken=function(){for(;;){var Yt=this.expandOnce();if(Yt instanceof ut)if(Yt.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},jt.expandMacro=function(Yt){if(!!this.macros.get(Yt)){var mn=[],Cn=this.stack.length;for(this.pushToken(new ut(Yt));this.stack.length>Cn;){var kn=this.expandOnce();kn instanceof ut&&mn.push(this.stack.pop())}return mn}},jt.expandMacroAsText=function(Yt){var mn=this.expandMacro(Yt);return mn&&mn.map(function(Cn){return Cn.text}).join("")},jt._getExpansion=function(Yt){var mn=this.macros.get(Yt);if(mn==null)return mn;var Cn=typeof mn=="function"?mn(this):mn;if(typeof Cn=="string"){var kn=0;if(Cn.indexOf("#")!==-1)for(var qn=Cn.replace(/##/g,"");qn.indexOf("#"+(kn+1))!==-1;)++kn;for(var er=new jy(Cn,this.settings),pr=[],$r=er.lex();$r.text!=="EOF";)pr.push($r),$r=er.lex();pr.reverse();var Mr={tokens:pr,numArgs:kn};return Mr}return Cn},jt.isDefined=function(Yt){return this.macros.has(Yt)||Tu.hasOwnProperty(Yt)||ws.math.hasOwnProperty(Yt)||ws.text.hasOwnProperty(Yt)||Ip.hasOwnProperty(Yt)},Mn}(),v1={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"}},Qm={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u010F:"d\u030C",\u1E0B:"d\u0307",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u013A:"l\u0301",\u013E:"l\u030C",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u010E:"D\u030C",\u1E0A:"D\u0307",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0139:"L\u0301",\u013D:"L\u030C",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u0164:"T\u030C",\u1E6A:"T\u0307",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Em=function(){function Mn(Kt,Yt){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new eu(Kt,Yt,this.mode),this.settings=Yt,this.leftrightDepth=0}var jt=Mn.prototype;return jt.expect=function(Yt,mn){if(mn===void 0&&(mn=!0),this.fetch().text!==Yt)throw new ft("Expected '"+Yt+"', got '"+this.fetch().text+"'",this.fetch());mn&&this.consume()},jt.consume=function(){this.nextToken=null},jt.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},jt.switchMode=function(Yt){this.mode=Yt,this.gullet.switchMode(Yt)},jt.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var Yt=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),Yt},jt.parseExpression=function(Yt,mn){for(var Cn=[];;){this.mode==="math"&&this.consumeSpaces();var kn=this.fetch();if(Mn.endOfExpression.indexOf(kn.text)!==-1||mn&&kn.text===mn||Yt&&Tu[kn.text]&&Tu[kn.text].infix)break;var qn=this.parseAtom(mn);if(!qn)break;Cn.push(qn)}return this.mode==="text"&&this.formLigatures(Cn),this.handleInfixNodes(Cn)},jt.handleInfixNodes=function(Yt){for(var mn=-1,Cn,kn=0;kn<Yt.length;kn++){var qn=Jl(Yt[kn],"infix");if(qn){if(mn!==-1)throw new ft("only one infix operator per group",qn.token);mn=kn,Cn=qn.replaceWith}}if(mn!==-1&&Cn){var er,pr,$r=Yt.slice(0,mn),Mr=Yt.slice(mn+1);$r.length===1&&$r[0].type==="ordgroup"?er=$r[0]:er={type:"ordgroup",mode:this.mode,body:$r},Mr.length===1&&Mr[0].type==="ordgroup"?pr=Mr[0]:pr={type:"ordgroup",mode:this.mode,body:Mr};var Yr;return Cn==="\\\\abovefrac"?Yr=this.callFunction(Cn,[er,Yt[mn],pr],[]):Yr=this.callFunction(Cn,[er,pr],[]),[Yr]}else return Yt},jt.handleSupSubscript=function(Yt){var mn=this.fetch(),Cn=mn.text;this.consume();var kn=this.parseGroup(Yt,!1,Mn.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!kn)throw new ft("Expected group after '"+Cn+"'",mn);return kn},jt.formatUnsupportedCmd=function(Yt){for(var mn=[],Cn=0;Cn<Yt.length;Cn++)mn.push({type:"textord",mode:"text",text:Yt[Cn]});var kn={type:"text",mode:this.mode,body:mn},qn={type:"color",mode:this.mode,color:this.settings.errorColor,body:[kn]};return qn},jt.parseAtom=function(Yt){var mn=this.parseGroup("atom",!1,null,Yt);if(this.mode==="text")return mn;for(var Cn,kn;;){this.consumeSpaces();var qn=this.fetch();if(qn.text==="\\limits"||qn.text==="\\nolimits"){var er=Jl(mn,"op");if(er){var pr=qn.text==="\\limits";er.limits=pr,er.alwaysHandleSupSub=!0}else if(er=Jl(mn,"operatorname"),er&&er.alwaysHandleSupSub){var $r=qn.text==="\\limits";er.limits=$r}else throw new ft("Limit controls must follow a math operator",qn);this.consume()}else if(qn.text==="^"){if(Cn)throw new ft("Double superscript",qn);Cn=this.handleSupSubscript("superscript")}else if(qn.text==="_"){if(kn)throw new ft("Double subscript",qn);kn=this.handleSupSubscript("subscript")}else if(qn.text==="'"){if(Cn)throw new ft("Double superscript",qn);var Mr={type:"textord",mode:this.mode,text:"\\prime"},Yr=[Mr];for(this.consume();this.fetch().text==="'";)Yr.push(Mr),this.consume();this.fetch().text==="^"&&Yr.push(this.handleSupSubscript("superscript")),Cn={type:"ordgroup",mode:this.mode,body:Yr}}else break}return Cn||kn?{type:"supsub",mode:this.mode,base:mn,sup:Cn,sub:kn}:mn},jt.parseFunction=function(Yt,mn,Cn){var kn=this.fetch(),qn=kn.text,er=Tu[qn];if(!er)return null;if(this.consume(),Cn!=null&&er.greediness<=Cn)throw new ft("Got function '"+qn+"' with no arguments"+(mn?" as "+mn:""),kn);if(this.mode==="text"&&!er.allowedInText)throw new ft("Can't use function '"+qn+"' in text mode",kn);if(this.mode==="math"&&er.allowedInMath===!1)throw new ft("Can't use function '"+qn+"' in math mode",kn);var pr=this.parseArguments(qn,er),$r=pr.args,Mr=pr.optArgs;return this.callFunction(qn,$r,Mr,kn,Yt)},jt.callFunction=function(Yt,mn,Cn,kn,qn){var er={funcName:Yt,parser:this,token:kn,breakOnTokenText:qn},pr=Tu[Yt];if(pr&&pr.handler)return pr.handler(er,mn,Cn);throw new ft("No function handler for "+Yt)},jt.parseArguments=function(Yt,mn){var Cn=mn.numArgs+mn.numOptionalArgs;if(Cn===0)return{args:[],optArgs:[]};for(var kn=mn.greediness,qn=[],er=[],pr=0;pr<Cn;pr++){var $r=mn.argTypes&&mn.argTypes[pr],Mr=pr<mn.numOptionalArgs,Yr=pr>0&&!Mr||pr===0&&!Mr&&this.mode==="math",ho=this.parseGroupOfType("argument to '"+Yt+"'",$r,Mr,kn,Yr);if(!ho){if(Mr){er.push(null);continue}throw new ft("Expected group after '"+Yt+"'",this.fetch())}(Mr?er:qn).push(ho)}return{args:qn,optArgs:er}},jt.parseGroupOfType=function(Yt,mn,Cn,kn,qn){switch(mn){case"color":return qn&&this.consumeSpaces(),this.parseColorGroup(Cn);case"size":return qn&&this.consumeSpaces(),this.parseSizeGroup(Cn);case"url":return this.parseUrlGroup(Cn,qn);case"math":case"text":return this.parseGroup(Yt,Cn,kn,void 0,mn,qn);case"hbox":{var er=this.parseGroup(Yt,Cn,kn,void 0,"text",qn);if(!er)return er;var pr={type:"styling",mode:er.mode,body:[er],style:"text"};return pr}case"raw":{if(qn&&this.consumeSpaces(),Cn&&this.fetch().text==="{")return null;var $r=this.parseStringGroup("raw",Cn,!0);if($r)return{type:"raw",mode:"text",string:$r.text};throw new ft("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(Yt,Cn,kn,void 0,void 0,qn);default:throw new ft("Unknown group type as "+Yt,this.fetch())}},jt.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},jt.parseStringGroup=function(Yt,mn,Cn){var kn=mn?"[":"{",qn=mn?"]":"}",er=this.fetch();if(er.text!==kn){if(mn)return null;if(Cn&&er.text!=="EOF"&&/[^{}[\]]/.test(er.text))return this.consume(),er}var pr=this.mode;this.mode="text",this.expect(kn);for(var $r="",Mr=this.fetch(),Yr=0,ho=Mr,wo;(wo=this.fetch()).text!==qn||Cn&&Yr>0;){switch(wo.text){case"EOF":throw new ft("Unexpected end of input in "+Yt,Mr.range(ho,$r));case kn:Yr++;break;case qn:Yr--;break}ho=wo,$r+=ho.text,this.consume()}return this.expect(qn),this.mode=pr,Mr.range(ho,$r)},jt.parseRegexGroup=function(Yt,mn){var Cn=this.mode;this.mode="text";for(var kn=this.fetch(),qn=kn,er="",pr;(pr=this.fetch()).text!=="EOF"&&Yt.test(er+pr.text);)qn=pr,er+=qn.text,this.consume();if(er==="")throw new ft("Invalid "+mn+": '"+kn.text+"'",kn);return this.mode=Cn,kn.range(qn,er)},jt.parseColorGroup=function(Yt){var mn=this.parseStringGroup("color",Yt);if(!mn)return null;var Cn=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(mn.text);if(!Cn)throw new ft("Invalid color: '"+mn.text+"'",mn);var kn=Cn[0];return/^[0-9a-f]{6}$/i.test(kn)&&(kn="#"+kn),{type:"color-token",mode:this.mode,color:kn}},jt.parseSizeGroup=function(Yt){var mn,Cn=!1;if(!Yt&&this.fetch().text!=="{"?mn=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):mn=this.parseStringGroup("size",Yt),!mn)return null;!Yt&&mn.text.length===0&&(mn.text="0pt",Cn=!0);var kn=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(mn.text);if(!kn)throw new ft("Invalid size: '"+mn.text+"'",mn);var qn={number:+(kn[1]+kn[2]),unit:kn[3]};if(!po(qn))throw new ft("Invalid unit: '"+qn.unit+"'",mn);return{type:"size",mode:this.mode,value:qn,isBlank:Cn}},jt.parseUrlGroup=function(Yt,mn){this.gullet.lexer.setCatcode("%",13);var Cn=this.parseStringGroup("url",Yt,!0);if(this.gullet.lexer.setCatcode("%",14),!Cn)return null;var kn=Cn.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:kn}},jt.parseGroup=function(Yt,mn,Cn,kn,qn,er){var pr=this.mode;qn&&this.switchMode(qn),er&&this.consumeSpaces();var $r=this.fetch(),Mr=$r.text,Yr;if(mn?Mr==="[":Mr==="{"||Mr==="\\begingroup"){this.consume();var ho=Mn.endOfGroup[Mr];this.gullet.beginGroup();var wo=this.parseExpression(!1,ho),Mo=this.fetch();this.expect(ho),this.gullet.endGroup(),Yr={type:"ordgroup",mode:this.mode,loc:st.range($r,Mo),body:wo,semisimple:Mr==="\\begingroup"||void 0}}else if(mn)Yr=null;else if(Yr=this.parseFunction(kn,Yt,Cn)||this.parseSymbol(),Yr==null&&Mr[0]==="\\"&&!Ip.hasOwnProperty(Mr)){if(this.settings.throwOnError)throw new ft("Undefined control sequence: "+Mr,$r);Yr=this.formatUnsupportedCmd(Mr),this.consume()}return qn&&this.switchMode(pr),Yr},jt.formLigatures=function(Yt){for(var mn=Yt.length-1,Cn=0;Cn<mn;++Cn){var kn=Yt[Cn],qn=kn.text;qn==="-"&&Yt[Cn+1].text==="-"&&(Cn+1<mn&&Yt[Cn+2].text==="-"?(Yt.splice(Cn,3,{type:"textord",mode:"text",loc:st.range(kn,Yt[Cn+2]),text:"---"}),mn-=2):(Yt.splice(Cn,2,{type:"textord",mode:"text",loc:st.range(kn,Yt[Cn+1]),text:"--"}),mn-=1)),(qn==="'"||qn==="`")&&Yt[Cn+1].text===qn&&(Yt.splice(Cn,2,{type:"textord",mode:"text",loc:st.range(kn,Yt[Cn+1]),text:qn+qn}),mn-=1)}},jt.parseSymbol=function(){var Yt=this.fetch(),mn=Yt.text;if(/^\\verb[^a-zA-Z]/.test(mn)){this.consume();var Cn=mn.slice(5),kn=Cn.charAt(0)==="*";if(kn&&(Cn=Cn.slice(1)),Cn.length<2||Cn.charAt(0)!==Cn.slice(-1))throw new ft(`\\verb assertion failed --
                    please report what input caused this bug`);return Cn=Cn.slice(1,-1),{type:"verb",mode:"text",body:Cn,star:kn}}Qm.hasOwnProperty(mn[0])&&!ws[this.mode][mn[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+mn[0]+'" used in math mode',Yt),mn=Qm[mn[0]]+mn.substr(1));var qn=Nv.exec(mn);qn&&(mn=mn.substring(0,qn.index),mn==="i"?mn="\u0131":mn==="j"&&(mn="\u0237"));var er;if(ws[this.mode][mn]){this.settings.strict&&this.mode==="math"&&um.indexOf(mn)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+mn[0]+'" used in math mode',Yt);var pr=ws[this.mode][mn].group,$r=st.range(Yt),Mr;if(Gs.hasOwnProperty(pr)){var Yr=pr;Mr={type:"atom",mode:this.mode,family:Yr,loc:$r,text:mn}}else Mr={type:pr,mode:this.mode,loc:$r,text:mn};er=Mr}else if(mn.charCodeAt(0)>=128)this.settings.strict&&($n(mn.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+mn[0]+'" used in math mode',Yt):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+mn[0]+'"'+(" ("+mn.charCodeAt(0)+")"),Yt)),er={type:"textord",mode:"text",loc:st.range(Yt),text:mn};else return null;if(this.consume(),qn)for(var ho=0;ho<qn[0].length;ho++){var wo=qn[0][ho];if(!v1[wo])throw new ft("Unknown accent ' "+wo+"'",Yt);var Mo=v1[wo][this.mode];if(!Mo)throw new ft("Accent "+wo+" unsupported in "+this.mode+" mode",Yt);er={type:"accent",mode:this.mode,loc:st.range(Yt),label:Mo,isStretchy:!1,isShifty:!0,base:er}}return er},Mn}();Em.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Em.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Em.SUPSUB_GREEDINESS=1;var Uy=function(jt,Kt){if(!(typeof jt=="string"||jt instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var Yt=new Em(jt,Kt);delete Yt.gullet.macros.current["\\df@tag"];var mn=Yt.parse();if(Yt.gullet.macros.get("\\df@tag")){if(!Kt.displayMode)throw new ft("\\tag works only in display equations");Yt.gullet.feed("\\df@tag"),mn=[{type:"tag",mode:"text",body:mn,tag:Yt.parse()}]}return mn},V0=Uy,Fu=function(jt,Kt,Yt){Kt.textContent="";var mn=xm(jt,Yt).toNode();Kt.appendChild(mn)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Fu=function(){throw new ft("KaTeX doesn't work in quirks mode.")});var Vy=function(jt,Kt){var Yt=xm(jt,Kt).toMarkup();return Yt},kv=function(jt,Kt){var Yt=new Rt(Kt);return V0(jt,Yt)},Am=function(jt,Kt,Yt){if(Yt.throwOnError||!(jt instanceof ft))throw jt;var mn=Wr.makeSpan(["katex-error"],[new $o(Kt)]);return mn.setAttribute("title",jt.toString()),mn.setAttribute("style","color:"+Yt.errorColor),mn},xm=function(jt,Kt){var Yt=new Rt(Kt);try{var mn=V0(jt,Yt);return S0(mn,jt,Yt)}catch(Cn){return Am(Cn,jt,Yt)}},_h=function(jt,Kt){var Yt=new Rt(Kt);try{var mn=V0(jt,Yt);return _p(mn,jt,Yt)}catch(Cn){return Am(Cn,jt,Yt)}},Ql={version:"0.11.1",render:Fu,renderToString:Vy,ParseError:ft,__parse:kv,__renderToDomTree:xm,__renderToHTMLTree:_h,__setFontMetrics:Vo,__defineSymbol:vn,__defineMacro:Tn,__domTree:{Span:Xr,Anchor:Jr,SymbolNode:$o,SvgNode:Qr,PathNode:jo,LineNode:Bo}};rt.default=Ql}]).default})})(katex$1);var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty$1=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray$1=function et(tt){return typeof Array.isArray=="function"?Array.isArray(tt):toStr.call(tt)==="[object Array]"},isPlainObject$2=function et(tt){if(!tt||toStr.call(tt)!=="[object Object]")return!1;var nt=hasOwn.call(tt,"constructor"),rt=tt.constructor&&tt.constructor.prototype&&hasOwn.call(tt.constructor.prototype,"isPrototypeOf");if(tt.constructor&&!nt&&!rt)return!1;var ot;for(ot in tt);return typeof ot>"u"||hasOwn.call(tt,ot)},setProperty$1=function et(tt,nt){defineProperty$1&&nt.name==="__proto__"?defineProperty$1(tt,nt.name,{enumerable:!0,configurable:!0,value:nt.newValue,writable:!0}):tt[nt.name]=nt.newValue},getProperty=function et(tt,nt){if(nt==="__proto__")if(hasOwn.call(tt,nt)){if(gOPD)return gOPD(tt,nt).value}else return;return tt[nt]},extend$4=function et(){var tt,nt,rt,ot,st,ut,ct=arguments[0],ft=1,pt=arguments.length,ht=!1;for(typeof ct=="boolean"&&(ht=ct,ct=arguments[1]||{},ft=2),(ct==null||typeof ct!="object"&&typeof ct!="function")&&(ct={});ft<pt;++ft)if(tt=arguments[ft],tt!=null)for(nt in tt)rt=getProperty(ct,nt),ot=getProperty(tt,nt),ct!==ot&&(ht&&ot&&(isPlainObject$2(ot)||(st=isArray$1(ot)))?(st?(st=!1,ut=rt&&isArray$1(rt)?rt:[]):ut=rt&&isPlainObject$2(rt)?rt:{},setProperty$1(ct,{name:nt,newValue:et(ht,ut,ot)})):typeof ot<"u"&&setProperty$1(ct,{name:nt,newValue:ot}));return ct},bail_1=bail$2;function bail$2(et){if(et)throw et}var vfile$2={exports:{}},own$g={}.hasOwnProperty,unistUtilStringifyPosition=stringify$7;function stringify$7(et){return!et||typeof et!="object"?"":own$g.call(et,"position")||own$g.call(et,"type")?position$6(et.position):own$g.call(et,"start")||own$g.call(et,"end")?position$6(et):own$g.call(et,"line")||own$g.call(et,"column")?point$c(et):""}function point$c(et){return(!et||typeof et!="object")&&(et={}),index$7(et.line)+":"+index$7(et.column)}function position$6(et){return(!et||typeof et!="object")&&(et={}),point$c(et.start)+"-"+point$c(et.end)}function index$7(et){return et&&typeof et=="number"?et:1}var stringify$6=unistUtilStringifyPosition,vfileMessage=VMessage$1;function VMessagePrototype(){}VMessagePrototype.prototype=Error.prototype;VMessage$1.prototype=new VMessagePrototype;var proto$6=VMessage$1.prototype;proto$6.file="";proto$6.name="";proto$6.reason="";proto$6.message="";proto$6.stack="";proto$6.fatal=null;proto$6.column=null;proto$6.line=null;function VMessage$1(et,tt,nt){var rt,ot,st;typeof tt=="string"&&(nt=tt,tt=null),rt=parseOrigin(nt),ot=stringify$6(tt)||"1:1",st={start:{line:null,column:null},end:{line:null,column:null}},tt&&tt.position&&(tt=tt.position),tt&&(tt.start?(st=tt,tt=tt.start):st.start=tt),et.stack&&(this.stack=et.stack,et=et.message),this.message=et,this.name=ot,this.reason=et,this.line=tt?tt.line:null,this.column=tt?tt.column:null,this.location=st,this.source=rt[0],this.ruleId=rt[1]}function parseOrigin(et){var tt=[null,null],nt;return typeof et=="string"&&(nt=et.indexOf(":"),nt===-1?tt[1]=et:(tt[0]=et.slice(0,nt),tt[1]=et.slice(nt+1))),tt}var minpath_browser={};minpath_browser.basename=basename$1;minpath_browser.dirname=dirname$1;minpath_browser.extname=extname$1;minpath_browser.join=join$4;minpath_browser.sep="/";function basename$1(et,tt){var nt=0,rt=-1,ot,st,ut,ct;if(tt!==void 0&&typeof tt!="string")throw new TypeError('"ext" argument must be a string');if(assertPath$3(et),ot=et.length,tt===void 0||!tt.length||tt.length>et.length){for(;ot--;)if(et.charCodeAt(ot)===47){if(ut){nt=ot+1;break}}else rt<0&&(ut=!0,rt=ot+1);return rt<0?"":et.slice(nt,rt)}if(tt===et)return"";for(st=-1,ct=tt.length-1;ot--;)if(et.charCodeAt(ot)===47){if(ut){nt=ot+1;break}}else st<0&&(ut=!0,st=ot+1),ct>-1&&(et.charCodeAt(ot)===tt.charCodeAt(ct--)?ct<0&&(rt=ot):(ct=-1,rt=st));return nt===rt?rt=st:rt<0&&(rt=et.length),et.slice(nt,rt)}function dirname$1(et){var tt,nt,rt;if(assertPath$3(et),!et.length)return".";for(tt=-1,rt=et.length;--rt;)if(et.charCodeAt(rt)===47){if(nt){tt=rt;break}}else nt||(nt=!0);return tt<0?et.charCodeAt(0)===47?"/":".":tt===1&&et.charCodeAt(0)===47?"//":et.slice(0,tt)}function extname$1(et){var tt=-1,nt=0,rt=-1,ot=0,st,ut,ct;for(assertPath$3(et),ct=et.length;ct--;){if(ut=et.charCodeAt(ct),ut===47){if(st){nt=ct+1;break}continue}rt<0&&(st=!0,rt=ct+1),ut===46?tt<0?tt=ct:ot!==1&&(ot=1):tt>-1&&(ot=-1)}return tt<0||rt<0||ot===0||ot===1&&tt===rt-1&&tt===nt+1?"":et.slice(tt,rt)}function join$4(){for(var et=-1,tt;++et<arguments.length;)assertPath$3(arguments[et]),arguments[et]&&(tt=tt===void 0?arguments[et]:tt+"/"+arguments[et]);return tt===void 0?".":normalize$c(tt)}function normalize$c(et){var tt,nt;return assertPath$3(et),tt=et.charCodeAt(0)===47,nt=normalizeString$1(et,!tt),!nt.length&&!tt&&(nt="."),nt.length&&et.charCodeAt(et.length-1)===47&&(nt+="/"),tt?"/"+nt:nt}function normalizeString$1(et,tt){for(var nt="",rt=0,ot=-1,st=0,ut=-1,ct,ft;++ut<=et.length;){if(ut<et.length)ct=et.charCodeAt(ut);else{if(ct===47)break;ct=47}if(ct===47){if(!(ot===ut-1||st===1))if(ot!==ut-1&&st===2){if(nt.length<2||rt!==2||nt.charCodeAt(nt.length-1)!==46||nt.charCodeAt(nt.length-2)!==46){if(nt.length>2){if(ft=nt.lastIndexOf("/"),ft!==nt.length-1){ft<0?(nt="",rt=0):(nt=nt.slice(0,ft),rt=nt.length-1-nt.lastIndexOf("/")),ot=ut,st=0;continue}}else if(nt.length){nt="",rt=0,ot=ut,st=0;continue}}tt&&(nt=nt.length?nt+"/..":"..",rt=2)}else nt.length?nt+="/"+et.slice(ot+1,ut):nt=et.slice(ot+1,ut),rt=ut-ot-1;ot=ut,st=0}else ct===46&&st>-1?st++:st=-1}return nt}function assertPath$3(et){if(typeof et!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(et))}var minproc_browser={};minproc_browser.cwd=cwd$1;function cwd$1(){return"/"}/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var isBuffer$1=function et(tt){return tt!=null&&tt.constructor!=null&&typeof tt.constructor.isBuffer=="function"&&tt.constructor.isBuffer(tt)},p$2=minpath_browser,proc$1=minproc_browser,buffer$1=isBuffer$1,core$3=VFile$2,own$f={}.hasOwnProperty,order$2=["history","path","basename","stem","extname","dirname"];VFile$2.prototype.toString=toString$2;Object.defineProperty(VFile$2.prototype,"path",{get:getPath$2,set:setPath$1});Object.defineProperty(VFile$2.prototype,"dirname",{get:getDirname,set:setDirname});Object.defineProperty(VFile$2.prototype,"basename",{get:getBasename,set:setBasename});Object.defineProperty(VFile$2.prototype,"extname",{get:getExtname,set:setExtname});Object.defineProperty(VFile$2.prototype,"stem",{get:getStem,set:setStem});function VFile$2(et){var tt,nt;if(!et)et={};else if(typeof et=="string"||buffer$1(et))et={contents:et};else if("message"in et&&"messages"in et)return et;if(!(this instanceof VFile$2))return new VFile$2(et);for(this.data={},this.messages=[],this.history=[],this.cwd=proc$1.cwd(),nt=-1;++nt<order$2.length;)tt=order$2[nt],own$f.call(et,tt)&&(this[tt]=et[tt]);for(tt in et)order$2.indexOf(tt)<0&&(this[tt]=et[tt])}function getPath$2(){return this.history[this.history.length-1]}function setPath$1(et){assertNonEmpty$1(et,"path"),this.path!==et&&this.history.push(et)}function getDirname(){return typeof this.path=="string"?p$2.dirname(this.path):void 0}function setDirname(et){assertPath$2(this.path,"dirname"),this.path=p$2.join(et||"",this.basename)}function getBasename(){return typeof this.path=="string"?p$2.basename(this.path):void 0}function setBasename(et){assertNonEmpty$1(et,"basename"),assertPart$1(et,"basename"),this.path=p$2.join(this.dirname||"",et)}function getExtname(){return typeof this.path=="string"?p$2.extname(this.path):void 0}function setExtname(et){if(assertPart$1(et,"extname"),assertPath$2(this.path,"extname"),et){if(et.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(et.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=p$2.join(this.dirname,this.stem+(et||""))}function getStem(){return typeof this.path=="string"?p$2.basename(this.path,this.extname):void 0}function setStem(et){assertNonEmpty$1(et,"stem"),assertPart$1(et,"stem"),this.path=p$2.join(this.dirname||"",et+(this.extname||""))}function toString$2(et){return(this.contents||"").toString(et)}function assertPart$1(et,tt){if(et&&et.indexOf(p$2.sep)>-1)throw new Error("`"+tt+"` cannot be a path: did not expect `"+p$2.sep+"`")}function assertNonEmpty$1(et,tt){if(!et)throw new Error("`"+tt+"` cannot be empty")}function assertPath$2(et,tt){if(!et)throw new Error("Setting `"+tt+"` requires `path` to be set too")}var VMessage=vfileMessage,VFile$1=core$3,lib$1=VFile$1;VFile$1.prototype.message=message;VFile$1.prototype.info=info$4;VFile$1.prototype.fail=fail;function message(et,tt,nt){var rt=new VMessage(et,tt,nt);return this.path&&(rt.name=this.path+":"+rt.name,rt.file=this.path),rt.fatal=!1,this.messages.push(rt),rt}function fail(){var et=this.message.apply(this,arguments);throw et.fatal=!0,et}function info$4(){var et=this.message.apply(this,arguments);return et.fatal=null,et}(function(et){et.exports=lib$1})(vfile$2);var slice$6=[].slice,wrap_1=wrap$4;function wrap$4(et,tt){var nt;return rt;function rt(){var ut=slice$6.call(arguments,0),ct=et.length>ut.length,ft;ct&&ut.push(ot);try{ft=et.apply(null,ut)}catch(pt){if(ct&&nt)throw pt;return ot(pt)}ct||(ft&&typeof ft.then=="function"?ft.then(st,ot):ft instanceof Error?ot(ft):st(ft))}function ot(){nt||(nt=!0,tt.apply(null,arguments))}function st(ut){ot(null,ut)}}var wrap$3=wrap_1,trough_1=trough$2;trough$2.wrap=wrap$3;var slice$5=[].slice;function trough$2(){var et=[],tt={};return tt.run=nt,tt.use=rt,tt;function nt(){var ot=-1,st=slice$5.call(arguments,0,-1),ut=arguments[arguments.length-1];if(typeof ut!="function")throw new Error("Expected function as last argument, not "+ut);ct.apply(null,[null].concat(st));function ct(ft){var pt=et[++ot],ht=slice$5.call(arguments,0),mt=ht.slice(1),yt=st.length,vt=-1;if(ft){ut(ft);return}for(;++vt<yt;)(mt[vt]===null||mt[vt]===void 0)&&(mt[vt]=st[vt]);st=mt,pt?wrap$3(pt,ct).apply(null,st):ut.apply(null,[null].concat(st))}}function rt(ot){if(typeof ot!="function")throw new Error("Expected `fn` to be a function, not "+ot);return et.push(ot),tt}}var isPlainObj=et=>{if(Object.prototype.toString.call(et)!=="[object Object]")return!1;const tt=Object.getPrototypeOf(et);return tt===null||tt===Object.prototype},extend$3=extend$4,bail$1=bail_1,vfile$1=vfile$2.exports,trough$1=trough_1,plain=isPlainObj,unified_1=unified$2().freeze(),slice$4=[].slice,own$e={}.hasOwnProperty,pipeline=trough$1().use(pipelineParse).use(pipelineRun).use(pipelineStringify);function pipelineParse(et,tt){tt.tree=et.parse(tt.file)}function pipelineRun(et,tt,nt){et.run(tt.tree,tt.file,rt);function rt(ot,st,ut){ot?nt(ot):(tt.tree=st,tt.file=ut,nt())}}function pipelineStringify(et,tt){tt.file.contents=et.stringify(tt.tree,tt.file)}function unified$2(){var et=[],tt=trough$1(),nt={},rt=!1,ot=-1;return st.data=ct,st.freeze=ut,st.attachers=et,st.use=ft,st.parse=ht,st.stringify=vt,st.run=mt,st.runSync=yt,st.process=Tt,st.processSync=Et,st;function st(){for(var xt=unified$2(),At=et.length,Ct=-1;++Ct<At;)xt.use.apply(null,et[Ct]);return xt.data(extend$3(!0,{},nt)),xt}function ut(){var xt,At,Ct,$t;if(rt)return st;for(;++ot<et.length;)xt=et[ot],At=xt[0],Ct=xt[1],$t=null,Ct!==!1&&(Ct===!0&&(xt[1]=void 0),$t=At.apply(st,xt.slice(1)),typeof $t=="function"&&tt.use($t));return rt=!0,ot=1/0,st}function ct(xt,At){return typeof xt=="string"?arguments.length===2?(assertUnfrozen$1("data",rt),nt[xt]=At,st):own$e.call(nt,xt)&&nt[xt]||null:xt?(assertUnfrozen$1("data",rt),nt=xt,st):nt}function ft(xt){var At;if(assertUnfrozen$1("use",rt),xt!=null)if(typeof xt=="function")Rt.apply(null,arguments);else if(typeof xt=="object")"length"in xt?Ot(xt):Ct(xt);else throw new Error("Expected usable value, not `"+xt+"`");return At&&(nt.settings=extend$3(nt.settings||{},At)),st;function Ct(It){Ot(It.plugins),It.settings&&(At=extend$3(At||{},It.settings))}function $t(It){if(typeof It=="function")Rt(It);else if(typeof It=="object")"length"in It?Rt.apply(null,It):Ct(It);else throw new Error("Expected usable value, not `"+It+"`")}function Ot(It){var kt,Mt;if(It!=null)if(typeof It=="object"&&"length"in It)for(kt=It.length,Mt=-1;++Mt<kt;)$t(It[Mt]);else throw new Error("Expected a list of plugins, not `"+It+"`")}function Rt(It,kt){var Mt=pt(It);Mt?(plain(Mt[1])&&plain(kt)&&(kt=extend$3(Mt[1],kt)),Mt[1]=kt):et.push(slice$4.call(arguments))}}function pt(xt){for(var At=et.length,Ct=-1,$t;++Ct<At;)if($t=et[Ct],$t[0]===xt)return $t}function ht(xt){var At=vfile$1(xt),Ct;return ut(),Ct=st.Parser,assertParser$1("parse",Ct),newable$1(Ct,"parse")?new Ct(String(At),At).parse():Ct(String(At),At)}function mt(xt,At,Ct){if(assertNode$1(xt),ut(),!Ct&&typeof At=="function"&&(Ct=At,At=null),!Ct)return new Promise($t);$t(null,Ct);function $t(Ot,Rt){tt.run(xt,vfile$1(At),It);function It(kt,Mt,Ft){Mt=Mt||xt,kt?Rt(kt):Ot?Ot(Mt):Ct(null,Mt,Ft)}}}function yt(xt,At){var Ct=!1,$t;return mt(xt,At,Ot),assertDone$1("runSync","run",Ct),$t;function Ot(Rt,It){Ct=!0,bail$1(Rt),$t=It}}function vt(xt,At){var Ct=vfile$1(At),$t;return ut(),$t=st.Compiler,assertCompiler$1("stringify",$t),assertNode$1(xt),newable$1($t,"compile")?new $t(xt,Ct).compile():$t(xt,Ct)}function Tt(xt,At){if(ut(),assertParser$1("process",st.Parser),assertCompiler$1("process",st.Compiler),!At)return new Promise(Ct);Ct(null,At);function Ct($t,Ot){var Rt=vfile$1(xt);pipeline.run(st,{file:Rt},It);function It(kt){kt?Ot(kt):$t?$t(Rt):At(null,Rt)}}}function Et(xt){var At=!1,Ct;return ut(),assertParser$1("processSync",st.Parser),assertCompiler$1("processSync",st.Compiler),Ct=vfile$1(xt),Tt(Ct,$t),assertDone$1("processSync","process",At),Ct;function $t(Ot){At=!0,bail$1(Ot)}}}function newable$1(et,tt){return typeof et=="function"&&et.prototype&&(keys$6(et.prototype)||tt in et.prototype)}function keys$6(et){var tt;for(tt in et)return!0;return!1}function assertParser$1(et,tt){if(typeof tt!="function")throw new Error("Cannot `"+et+"` without `Parser`")}function assertCompiler$1(et,tt){if(typeof tt!="function")throw new Error("Cannot `"+et+"` without `Compiler`")}function assertUnfrozen$1(et,tt){if(tt)throw new Error("Cannot invoke `"+et+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function assertNode$1(et){if(!et||typeof et.type!="string")throw new Error("Expected node, got `"+et+"`")}function assertDone$1(et,tt,nt){if(!nt)throw new Error("`"+et+"` finished async. Use `"+tt+"` instead")}var immutable=extend$2,hasOwnProperty$2=Object.prototype.hasOwnProperty;function extend$2(){for(var et={},tt=0;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)hasOwnProperty$2.call(nt,rt)&&(et[rt]=nt[rt])}return et}var schema$3=Schema$6,proto$5=Schema$6.prototype;proto$5.space=null;proto$5.normal={};proto$5.property={};function Schema$6(et,tt,nt){this.property=et,this.normal=tt,nt&&(this.space=nt)}var xtend$8=immutable,Schema$5=schema$3,merge_1$1=merge$b;function merge$b(et){for(var tt=et.length,nt=[],rt=[],ot=-1,st,ut;++ot<tt;)st=et[ot],nt.push(st.property),rt.push(st.normal),ut=st.space;return new Schema$5(xtend$8.apply(null,nt),xtend$8.apply(null,rt),ut)}var normalize_1$2=normalize$b;function normalize$b(et){return et.toLowerCase()}var info$3=Info$8,proto$4=Info$8.prototype;proto$4.space=null;proto$4.attribute=null;proto$4.property=null;proto$4.boolean=!1;proto$4.booleanish=!1;proto$4.overloadedBoolean=!1;proto$4.number=!1;proto$4.commaSeparated=!1;proto$4.spaceSeparated=!1;proto$4.commaOrSpaceSeparated=!1;proto$4.mustUseProperty=!1;proto$4.defined=!1;function Info$8(et,tt){this.property=et,this.attribute=tt}var types$j={},powers$2=0;types$j.boolean=increment$4();types$j.booleanish=increment$4();types$j.overloadedBoolean=increment$4();types$j.number=increment$4();types$j.spaceSeparated=increment$4();types$j.commaSeparated=increment$4();types$j.commaOrSpaceSeparated=increment$4();function increment$4(){return Math.pow(2,++powers$2)}var Info$7=info$3,types$i=types$j,definedInfo$1=DefinedInfo$6;DefinedInfo$6.prototype=new Info$7;DefinedInfo$6.prototype.defined=!0;var checks$2=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],checksLength$1=checks$2.length;function DefinedInfo$6(et,tt,nt,rt){var ot=-1,st;for(mark$2(this,"space",rt),Info$7.call(this,et,tt);++ot<checksLength$1;)st=checks$2[ot],mark$2(this,st,(nt&types$i[st])===types$i[st])}function mark$2(et,tt,nt){nt&&(et[tt]=nt)}var normalize$a=normalize_1$2,Schema$4=schema$3,DefinedInfo$5=definedInfo$1,create_1$1=create$h;function create$h(et){var tt=et.space,nt=et.mustUseProperty||[],rt=et.attributes||{},ot=et.properties,st=et.transform,ut={},ct={},ft,pt;for(ft in ot)pt=new DefinedInfo$5(ft,st(rt,ft),ot[ft],tt),nt.indexOf(ft)!==-1&&(pt.mustUseProperty=!0),ut[ft]=pt,ct[normalize$a(ft)]=ft,ct[normalize$a(pt.attribute)]=ft;return new Schema$4(ut,ct,tt)}var create$g=create_1$1,xlink$7=create$g({space:"xlink",transform:xlinkTransform$1,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function xlinkTransform$1(et,tt){return"xlink:"+tt.slice(5).toLowerCase()}var create$f=create_1$1,xml$7=create$f({space:"xml",transform:xmlTransform$1,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xmlTransform$1(et,tt){return"xml:"+tt.slice(3).toLowerCase()}var caseSensitiveTransform_1$1=caseSensitiveTransform$6;function caseSensitiveTransform$6(et,tt){return tt in et?et[tt]:tt}var caseSensitiveTransform$5=caseSensitiveTransform_1$1,caseInsensitiveTransform_1$1=caseInsensitiveTransform$6;function caseInsensitiveTransform$6(et,tt){return caseSensitiveTransform$5(et,tt.toLowerCase())}var create$e=create_1$1,caseInsensitiveTransform$5=caseInsensitiveTransform_1$1,xmlns$8=create$e({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform$5,properties:{xmlns:null,xmlnsXLink:null}}),types$h=types$j,create$d=create_1$1,booleanish$4=types$h.booleanish,number$d=types$h.number,spaceSeparated$6=types$h.spaceSeparated,aria$7=create$d({transform:ariaTransform$1,properties:{ariaActiveDescendant:null,ariaAtomic:booleanish$4,ariaAutoComplete:null,ariaBusy:booleanish$4,ariaChecked:booleanish$4,ariaColCount:number$d,ariaColIndex:number$d,ariaColSpan:number$d,ariaControls:spaceSeparated$6,ariaCurrent:null,ariaDescribedBy:spaceSeparated$6,ariaDetails:null,ariaDisabled:booleanish$4,ariaDropEffect:spaceSeparated$6,ariaErrorMessage:null,ariaExpanded:booleanish$4,ariaFlowTo:spaceSeparated$6,ariaGrabbed:booleanish$4,ariaHasPopup:null,ariaHidden:booleanish$4,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated$6,ariaLevel:number$d,ariaLive:null,ariaModal:booleanish$4,ariaMultiLine:booleanish$4,ariaMultiSelectable:booleanish$4,ariaOrientation:null,ariaOwns:spaceSeparated$6,ariaPlaceholder:null,ariaPosInSet:number$d,ariaPressed:booleanish$4,ariaReadOnly:booleanish$4,ariaRelevant:null,ariaRequired:booleanish$4,ariaRoleDescription:spaceSeparated$6,ariaRowCount:number$d,ariaRowIndex:number$d,ariaRowSpan:number$d,ariaSelected:booleanish$4,ariaSetSize:number$d,ariaSort:null,ariaValueMax:number$d,ariaValueMin:number$d,ariaValueNow:number$d,ariaValueText:null,role:null}});function ariaTransform$1(et,tt){return tt==="role"?tt:"aria-"+tt.slice(4).toLowerCase()}var types$g=types$j,create$c=create_1$1,caseInsensitiveTransform$4=caseInsensitiveTransform_1$1,boolean$4=types$g.boolean,overloadedBoolean$2=types$g.overloadedBoolean,booleanish$3=types$g.booleanish,number$c=types$g.number,spaceSeparated$5=types$g.spaceSeparated,commaSeparated$4=types$g.commaSeparated,html$e=create$c({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform$4,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated$4,acceptCharset:spaceSeparated$5,accessKey:spaceSeparated$5,action:null,allow:null,allowFullScreen:boolean$4,allowPaymentRequest:boolean$4,allowUserMedia:boolean$4,alt:null,as:null,async:boolean$4,autoCapitalize:null,autoComplete:spaceSeparated$5,autoFocus:boolean$4,autoPlay:boolean$4,capture:boolean$4,charSet:null,checked:boolean$4,cite:null,className:spaceSeparated$5,cols:number$c,colSpan:null,content:null,contentEditable:booleanish$3,controls:boolean$4,controlsList:spaceSeparated$5,coords:number$c|commaSeparated$4,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean$4,defer:boolean$4,dir:null,dirName:null,disabled:boolean$4,download:overloadedBoolean$2,draggable:booleanish$3,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean$4,formTarget:null,headers:spaceSeparated$5,height:number$c,hidden:boolean$4,high:number$c,href:null,hrefLang:null,htmlFor:spaceSeparated$5,httpEquiv:spaceSeparated$5,id:null,imageSizes:null,imageSrcSet:commaSeparated$4,inputMode:null,integrity:null,is:null,isMap:boolean$4,itemId:null,itemProp:spaceSeparated$5,itemRef:spaceSeparated$5,itemScope:boolean$4,itemType:spaceSeparated$5,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean$4,low:number$c,manifest:null,max:null,maxLength:number$c,media:null,method:null,min:null,minLength:number$c,multiple:boolean$4,muted:boolean$4,name:null,nonce:null,noModule:boolean$4,noValidate:boolean$4,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean$4,optimum:number$c,pattern:null,ping:spaceSeparated$5,placeholder:null,playsInline:boolean$4,poster:null,preload:null,readOnly:boolean$4,referrerPolicy:null,rel:spaceSeparated$5,required:boolean$4,reversed:boolean$4,rows:number$c,rowSpan:number$c,sandbox:spaceSeparated$5,scope:null,scoped:boolean$4,seamless:boolean$4,selected:boolean$4,shape:null,size:number$c,sizes:null,slot:null,span:number$c,spellCheck:booleanish$3,src:null,srcDoc:null,srcLang:null,srcSet:commaSeparated$4,start:number$c,step:null,style:null,tabIndex:number$c,target:null,title:null,translate:null,type:null,typeMustMatch:boolean$4,useMap:null,value:booleanish$3,width:number$c,wrap:null,align:null,aLink:null,archive:spaceSeparated$5,axis:null,background:null,bgColor:null,border:number$c,borderColor:null,bottomMargin:number$c,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean$4,declare:boolean$4,event:null,face:null,frame:null,frameBorder:null,hSpace:number$c,leftMargin:number$c,link:null,longDesc:null,lowSrc:null,marginHeight:number$c,marginWidth:number$c,noResize:boolean$4,noHref:boolean$4,noShade:boolean$4,noWrap:boolean$4,object:null,profile:null,prompt:null,rev:null,rightMargin:number$c,rules:null,scheme:null,scrolling:booleanish$3,standby:null,summary:null,text:null,topMargin:number$c,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number$c,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean$4,disableRemotePlayback:boolean$4,prefix:null,property:null,results:number$c,security:null,unselectable:null}}),merge$a=merge_1$1,xlink$6=xlink$7,xml$6=xml$7,xmlns$7=xmlns$8,aria$6=aria$7,html$d=html$e,html_1$2=merge$a([xml$6,xlink$6,xmlns$7,aria$6,html$d]),types$f=types$j,create$b=create_1$1,caseSensitiveTransform$4=caseSensitiveTransform_1$1,boolean$3=types$f.boolean,number$b=types$f.number,spaceSeparated$4=types$f.spaceSeparated,commaSeparated$3=types$f.commaSeparated,commaOrSpaceSeparated$2=types$f.commaOrSpaceSeparated,svg$8=create$b({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform$4,properties:{about:commaOrSpaceSeparated$2,accentHeight:number$b,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number$b,amplitude:number$b,arabicForm:null,ascent:number$b,attributeName:null,attributeType:null,azimuth:number$b,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number$b,by:null,calcMode:null,capHeight:number$b,className:spaceSeparated$4,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number$b,diffuseConstant:number$b,direction:null,display:null,dur:null,divisor:number$b,dominantBaseline:null,download:boolean$3,dx:null,dy:null,edgeMode:null,editable:null,elevation:number$b,enableBackground:null,end:null,event:null,exponent:number$b,externalResourcesRequired:null,fill:null,fillOpacity:number$b,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated$3,g2:commaSeparated$3,glyphName:commaSeparated$3,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number$b,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number$b,horizOriginX:number$b,horizOriginY:number$b,id:null,ideographic:number$b,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number$b,k:number$b,k1:number$b,k2:number$b,k3:number$b,k4:number$b,kernelMatrix:commaOrSpaceSeparated$2,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number$b,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number$b,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number$b,overlineThickness:number$b,paintOrder:null,panose1:null,path:null,pathLength:number$b,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated$4,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number$b,pointsAtY:number$b,pointsAtZ:number$b,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated$2,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated$2,rev:commaOrSpaceSeparated$2,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated$2,requiredFeatures:commaOrSpaceSeparated$2,requiredFonts:commaOrSpaceSeparated$2,requiredFormats:commaOrSpaceSeparated$2,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number$b,specularExponent:number$b,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number$b,strikethroughThickness:number$b,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated$2,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number$b,strokeOpacity:number$b,strokeWidth:null,style:null,surfaceScale:number$b,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated$2,tabIndex:number$b,tableValues:null,target:null,targetX:number$b,targetY:number$b,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated$2,to:null,transform:null,u1:null,u2:null,underlinePosition:number$b,underlineThickness:number$b,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number$b,values:null,vAlphabetic:number$b,vMathematical:number$b,vectorEffect:null,vHanging:number$b,vIdeographic:number$b,version:null,vertAdvY:number$b,vertOriginX:number$b,vertOriginY:number$b,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number$b,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),merge$9=merge_1$1,xlink$5=xlink$7,xml$5=xml$7,xmlns$6=xmlns$8,aria$5=aria$7,svg$7=svg$8,svg_1$2=merge$9([xml$5,xlink$5,xmlns$6,aria$5,svg$7]),normalize$9=normalize_1$2,DefinedInfo$4=definedInfo$1,Info$6=info$3,data$4="data",find_1$1=find$8,valid$2=/^data[-\w.:]+$/i,dash$3=/-[a-z]/g,cap$2=/[A-Z]/g;function find$8(et,tt){var nt=normalize$9(tt),rt=tt,ot=Info$6;return nt in et.normal?et.property[et.normal[nt]]:(nt.length>4&&nt.slice(0,4)===data$4&&valid$2.test(tt)&&(tt.charAt(4)==="-"?rt=datasetToProperty$1(tt):tt=datasetToAttribute$1(tt),ot=DefinedInfo$4),new ot(rt,tt))}function datasetToProperty$1(et){var tt=et.slice(5).replace(dash$3,camelcase$3);return data$4+tt.charAt(0).toUpperCase()+tt.slice(1)}function datasetToAttribute$1(et){var tt=et.slice(4);return dash$3.test(tt)?et:(tt=tt.replace(cap$2,kebab$2),tt.charAt(0)!=="-"&&(tt="-"+tt),data$4+tt)}function kebab$2(et){return"-"+et.toLowerCase()}function camelcase$3(et){return et.charAt(1).toUpperCase()}const html$c="http://www.w3.org/1999/xhtml",mathml="http://www.w3.org/1998/Math/MathML",svg$6="http://www.w3.org/2000/svg",xlink$4="http://www.w3.org/1999/xlink",xml$4="http://www.w3.org/XML/1998/namespace",xmlns$5="http://www.w3.org/2000/xmlns/",require$$3$3={html:html$c,mathml,svg:svg$6,xlink:xlink$4,xml:xml$4,xmlns:xmlns$5};var schema$2=Schema$3,proto$3=Schema$3.prototype;proto$3.space=null;proto$3.normal={};proto$3.property={};function Schema$3(et,tt,nt){this.property=et,this.normal=tt,nt&&(this.space=nt)}var xtend$7=immutable,Schema$2=schema$2,merge_1=merge$8;function merge$8(et){for(var tt=et.length,nt=[],rt=[],ot=-1,st,ut;++ot<tt;)st=et[ot],nt.push(st.property),rt.push(st.normal),ut=st.space;return new Schema$2(xtend$7.apply(null,nt),xtend$7.apply(null,rt),ut)}var normalize_1$1=normalize$8;function normalize$8(et){return et.toLowerCase()}var info$2=Info$5,proto$2=Info$5.prototype;proto$2.space=null;proto$2.attribute=null;proto$2.property=null;proto$2.boolean=!1;proto$2.booleanish=!1;proto$2.overloadedBoolean=!1;proto$2.number=!1;proto$2.commaSeparated=!1;proto$2.spaceSeparated=!1;proto$2.commaOrSpaceSeparated=!1;proto$2.mustUseProperty=!1;proto$2.defined=!1;function Info$5(et,tt){this.property=et,this.attribute=tt}var types$e={},powers$1=0;types$e.boolean=increment$3();types$e.booleanish=increment$3();types$e.overloadedBoolean=increment$3();types$e.number=increment$3();types$e.spaceSeparated=increment$3();types$e.commaSeparated=increment$3();types$e.commaOrSpaceSeparated=increment$3();function increment$3(){return Math.pow(2,++powers$1)}var Info$4=info$2,types$d=types$e,definedInfo=DefinedInfo$3;DefinedInfo$3.prototype=new Info$4;DefinedInfo$3.prototype.defined=!0;var checks$1=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],checksLength=checks$1.length;function DefinedInfo$3(et,tt,nt,rt){var ot=-1,st;for(mark$1(this,"space",rt),Info$4.call(this,et,tt);++ot<checksLength;)st=checks$1[ot],mark$1(this,st,(nt&types$d[st])===types$d[st])}function mark$1(et,tt,nt){nt&&(et[tt]=nt)}var normalize$7=normalize_1$1,Schema$1=schema$2,DefinedInfo$2=definedInfo,create_1=create$a;function create$a(et){var tt=et.space,nt=et.mustUseProperty||[],rt=et.attributes||{},ot=et.properties,st=et.transform,ut={},ct={},ft,pt;for(ft in ot)pt=new DefinedInfo$2(ft,st(rt,ft),ot[ft],tt),nt.indexOf(ft)!==-1&&(pt.mustUseProperty=!0),ut[ft]=pt,ct[normalize$7(ft)]=ft,ct[normalize$7(pt.attribute)]=ft;return new Schema$1(ut,ct,tt)}var create$9=create_1,xlink$3=create$9({space:"xlink",transform:xlinkTransform,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function xlinkTransform(et,tt){return"xlink:"+tt.slice(5).toLowerCase()}var create$8=create_1,xml$3=create$8({space:"xml",transform:xmlTransform,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xmlTransform(et,tt){return"xml:"+tt.slice(3).toLowerCase()}var caseSensitiveTransform_1=caseSensitiveTransform$3;function caseSensitiveTransform$3(et,tt){return tt in et?et[tt]:tt}var caseSensitiveTransform$2=caseSensitiveTransform_1,caseInsensitiveTransform_1=caseInsensitiveTransform$3;function caseInsensitiveTransform$3(et,tt){return caseSensitiveTransform$2(et,tt.toLowerCase())}var create$7=create_1,caseInsensitiveTransform$2=caseInsensitiveTransform_1,xmlns$4=create$7({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform$2,properties:{xmlns:null,xmlnsXLink:null}}),types$c=types$e,create$6=create_1,booleanish$2=types$c.booleanish,number$a=types$c.number,spaceSeparated$3=types$c.spaceSeparated,aria$4=create$6({transform:ariaTransform,properties:{ariaActiveDescendant:null,ariaAtomic:booleanish$2,ariaAutoComplete:null,ariaBusy:booleanish$2,ariaChecked:booleanish$2,ariaColCount:number$a,ariaColIndex:number$a,ariaColSpan:number$a,ariaControls:spaceSeparated$3,ariaCurrent:null,ariaDescribedBy:spaceSeparated$3,ariaDetails:null,ariaDisabled:booleanish$2,ariaDropEffect:spaceSeparated$3,ariaErrorMessage:null,ariaExpanded:booleanish$2,ariaFlowTo:spaceSeparated$3,ariaGrabbed:booleanish$2,ariaHasPopup:null,ariaHidden:booleanish$2,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated$3,ariaLevel:number$a,ariaLive:null,ariaModal:booleanish$2,ariaMultiLine:booleanish$2,ariaMultiSelectable:booleanish$2,ariaOrientation:null,ariaOwns:spaceSeparated$3,ariaPlaceholder:null,ariaPosInSet:number$a,ariaPressed:booleanish$2,ariaReadOnly:booleanish$2,ariaRelevant:null,ariaRequired:booleanish$2,ariaRoleDescription:spaceSeparated$3,ariaRowCount:number$a,ariaRowIndex:number$a,ariaRowSpan:number$a,ariaSelected:booleanish$2,ariaSetSize:number$a,ariaSort:null,ariaValueMax:number$a,ariaValueMin:number$a,ariaValueNow:number$a,ariaValueText:null,role:null}});function ariaTransform(et,tt){return tt==="role"?tt:"aria-"+tt.slice(4).toLowerCase()}var types$b=types$e,create$5=create_1,caseSensitiveTransform$1=caseSensitiveTransform_1,boolean$2=types$b.boolean,number$9=types$b.number,spaceSeparated$2=types$b.spaceSeparated,commaSeparated$2=types$b.commaSeparated,commaOrSpaceSeparated$1=types$b.commaOrSpaceSeparated,svg$5=create$5({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform$1,properties:{about:commaOrSpaceSeparated$1,accentHeight:number$9,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number$9,amplitude:number$9,arabicForm:null,ascent:number$9,attributeName:null,attributeType:null,azimuth:number$9,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number$9,by:null,calcMode:null,capHeight:number$9,className:spaceSeparated$2,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number$9,diffuseConstant:number$9,direction:null,display:null,dur:null,divisor:number$9,dominantBaseline:null,download:boolean$2,dx:null,dy:null,edgeMode:null,editable:null,elevation:number$9,enableBackground:null,end:null,event:null,exponent:number$9,externalResourcesRequired:null,fill:null,fillOpacity:number$9,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated$2,g2:commaSeparated$2,glyphName:commaSeparated$2,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number$9,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number$9,horizOriginX:number$9,horizOriginY:number$9,id:null,ideographic:number$9,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number$9,k:number$9,k1:number$9,k2:number$9,k3:number$9,k4:number$9,kernelMatrix:commaOrSpaceSeparated$1,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number$9,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number$9,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number$9,overlineThickness:number$9,paintOrder:null,panose1:null,path:null,pathLength:number$9,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated$2,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number$9,pointsAtY:number$9,pointsAtZ:number$9,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated$1,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated$1,rev:commaOrSpaceSeparated$1,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated$1,requiredFeatures:commaOrSpaceSeparated$1,requiredFonts:commaOrSpaceSeparated$1,requiredFormats:commaOrSpaceSeparated$1,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number$9,specularExponent:number$9,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number$9,strikethroughThickness:number$9,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated$1,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number$9,strokeOpacity:number$9,strokeWidth:null,style:null,surfaceScale:number$9,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated$1,tabIndex:number$9,tableValues:null,target:null,targetX:number$9,targetY:number$9,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated$1,to:null,transform:null,u1:null,u2:null,underlinePosition:number$9,underlineThickness:number$9,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number$9,values:null,vAlphabetic:number$9,vMathematical:number$9,vectorEffect:null,vHanging:number$9,vIdeographic:number$9,version:null,vertAdvY:number$9,vertOriginX:number$9,vertOriginY:number$9,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number$9,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),merge$7=merge_1,xlink$2=xlink$3,xml$2=xml$3,xmlns$3=xmlns$4,aria$3=aria$4,svg$4=svg$5,svg_1$1=merge$7([xml$2,xlink$2,xmlns$3,aria$3,svg$4]);const require$$1$6=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var normalize$6=normalize_1$1,DefinedInfo$1=definedInfo,Info$3=info$2,data$3="data",find_1=find$7,valid$1=/^data[-\w.:]+$/i,dash$2=/-[a-z]/g,cap$1=/[A-Z]/g;function find$7(et,tt){var nt=normalize$6(tt),rt=tt,ot=Info$3;return nt in et.normal?et.property[et.normal[nt]]:(nt.length>4&&nt.slice(0,4)===data$3&&valid$1.test(tt)&&(tt.charAt(4)==="-"?rt=datasetToProperty(tt):tt=datasetToAttribute(tt),ot=DefinedInfo$1),new ot(rt,tt))}function datasetToProperty(et){var tt=et.slice(5).replace(dash$2,camelcase$2);return data$3+tt.charAt(0).toUpperCase()+tt.slice(1)}function datasetToAttribute(et){var tt=et.slice(4);return dash$2.test(tt)?et:(tt=tt.replace(cap$1,kebab$1),tt.charAt(0)!=="-"&&(tt="-"+tt),data$3+tt)}function kebab$1(et){return"-"+et.toLowerCase()}function camelcase$2(et){return et.charAt(1).toUpperCase()}var hastUtilParseSelector=parse$h,search$1=/[#.]/g;function parse$h(et,tt){for(var nt=et||"",rt=tt||"div",ot={},st=0,ut,ct,ft;st<nt.length;)search$1.lastIndex=st,ft=search$1.exec(nt),ut=nt.slice(st,ft?ft.index:nt.length),ut&&(ct?ct==="#"?ot.id=ut:ot.className?ot.className.push(ut):ot.className=[ut]:rt=ut,st+=ut.length),ft&&(ct=ft[0],st++);return{type:"element",tagName:rt,properties:ot,children:[]}}var spaceSeparatedTokens={};spaceSeparatedTokens.parse=parse$g;spaceSeparatedTokens.stringify=stringify$5;var empty$1="",space$6=" ",whiteSpace$1=/[ \t\n\r\f]+/g;function parse$g(et){var tt=String(et||empty$1).trim();return tt===empty$1?[]:tt.split(whiteSpace$1)}function stringify$5(et){return et.join(space$6).trim()}var commaSeparatedTokens={};commaSeparatedTokens.parse=parse$f;commaSeparatedTokens.stringify=stringify$4;var comma=",",space$5=" ",empty="";function parse$f(et){for(var tt=[],nt=String(et||empty),rt=nt.indexOf(comma),ot=0,st=!1,ut;!st;)rt===-1&&(rt=nt.length,st=!0),ut=nt.slice(ot,rt).trim(),(ut||!st)&&tt.push(ut),ot=rt+1,rt=nt.indexOf(comma,ot);return tt}function stringify$4(et,tt){var nt=tt||{},rt=nt.padLeft===!1?empty:space$5,ot=nt.padRight?space$5:empty;return et[et.length-1]===empty&&(et=et.concat(empty)),et.join(ot+comma+rt).trim()}var find$6=find_1,normalize$5=normalize_1$1,parseSelector$2=hastUtilParseSelector,spaces=spaceSeparatedTokens.parse,commas=commaSeparatedTokens.parse,factory_1=factory$8,own$d={}.hasOwnProperty;function factory$8(et,tt,nt){var rt=nt?createAdjustMap$1(nt):null;return ot;function ot(ut,ct){var ft=parseSelector$2(ut,tt),pt=Array.prototype.slice.call(arguments,2),ht=ft.tagName.toLowerCase(),mt;if(ft.tagName=rt&&own$d.call(rt,ht)?rt[ht]:ht,ct&&isChildren(ct,ft)&&(pt.unshift(ct),ct=null),ct)for(mt in ct)st(ft.properties,mt,ct[mt]);return addChild$2(ft.children,pt),ft.tagName==="template"&&(ft.content={type:"root",children:ft.children},ft.children=[]),ft}function st(ut,ct,ft){var pt,ht,mt;ft==null||ft!==ft||(pt=find$6(et,ct),ht=pt.property,mt=ft,typeof mt=="string"&&(pt.spaceSeparated?mt=spaces(mt):pt.commaSeparated?mt=commas(mt):pt.commaOrSpaceSeparated&&(mt=spaces(commas(mt).join(" ")))),ht==="style"&&typeof ft!="string"&&(mt=style$5(mt)),ht==="className"&&ut.className&&(mt=ut.className.concat(mt)),ut[ht]=parsePrimitives(pt,ht,mt))}}function isChildren(et,tt){return typeof et=="string"||"length"in et||isNode(tt.tagName,et)}function isNode(et,tt){var nt=tt.type;return et==="input"||!nt||typeof nt!="string"?!1:typeof tt.children=="object"&&"length"in tt.children?!0:(nt=nt.toLowerCase(),et==="button"?nt!=="menu"&&nt!=="submit"&&nt!=="reset"&&nt!=="button":"value"in tt)}function addChild$2(et,tt){var nt,rt;if(typeof tt=="string"||typeof tt=="number"){et.push({type:"text",value:String(tt)});return}if(typeof tt=="object"&&"length"in tt){for(nt=-1,rt=tt.length;++nt<rt;)addChild$2(et,tt[nt]);return}if(typeof tt!="object"||!("type"in tt))throw new Error("Expected node, nodes, or string, got `"+tt+"`");et.push(tt)}function parsePrimitives(et,tt,nt){var rt,ot,st;if(typeof nt!="object"||!("length"in nt))return parsePrimitive$1(et,tt,nt);for(ot=nt.length,rt=-1,st=[];++rt<ot;)st[rt]=parsePrimitive$1(et,tt,nt[rt]);return st}function parsePrimitive$1(et,tt,nt){var rt=nt;return et.number||et.positiveNumber?!isNaN(rt)&&rt!==""&&(rt=Number(rt)):(et.boolean||et.overloadedBoolean)&&typeof rt=="string"&&(rt===""||normalize$5(nt)===normalize$5(tt))&&(rt=!0),rt}function style$5(et){var tt=[],nt;for(nt in et)tt.push([nt,et[nt]].join(": "));return tt.join("; ")}function createAdjustMap$1(et){for(var tt=et.length,nt=-1,rt={},ot;++nt<tt;)ot=et[nt],rt[ot.toLowerCase()]=ot;return rt}var schema$1=svg_1$1,caseSensitive=require$$1$6,factory$7=factory_1,svg$3=factory$7(schema$1,"g",caseSensitive);svg$3.displayName="svg";var svg_1=svg$3,hastscript={exports:{}},types$a=types$e,create$4=create_1,caseInsensitiveTransform$1=caseInsensitiveTransform_1,boolean$1=types$a.boolean,overloadedBoolean$1=types$a.overloadedBoolean,booleanish$1=types$a.booleanish,number$8=types$a.number,spaceSeparated$1=types$a.spaceSeparated,commaSeparated$1=types$a.commaSeparated,html$b=create$4({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform$1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated$1,acceptCharset:spaceSeparated$1,accessKey:spaceSeparated$1,action:null,allow:null,allowFullScreen:boolean$1,allowPaymentRequest:boolean$1,allowUserMedia:boolean$1,alt:null,as:null,async:boolean$1,autoCapitalize:null,autoComplete:spaceSeparated$1,autoFocus:boolean$1,autoPlay:boolean$1,capture:boolean$1,charSet:null,checked:boolean$1,cite:null,className:spaceSeparated$1,cols:number$8,colSpan:null,content:null,contentEditable:booleanish$1,controls:boolean$1,controlsList:spaceSeparated$1,coords:number$8|commaSeparated$1,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean$1,defer:boolean$1,dir:null,dirName:null,disabled:boolean$1,download:overloadedBoolean$1,draggable:booleanish$1,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean$1,formTarget:null,headers:spaceSeparated$1,height:number$8,hidden:boolean$1,high:number$8,href:null,hrefLang:null,htmlFor:spaceSeparated$1,httpEquiv:spaceSeparated$1,id:null,imageSizes:null,imageSrcSet:commaSeparated$1,inputMode:null,integrity:null,is:null,isMap:boolean$1,itemId:null,itemProp:spaceSeparated$1,itemRef:spaceSeparated$1,itemScope:boolean$1,itemType:spaceSeparated$1,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean$1,low:number$8,manifest:null,max:null,maxLength:number$8,media:null,method:null,min:null,minLength:number$8,multiple:boolean$1,muted:boolean$1,name:null,nonce:null,noModule:boolean$1,noValidate:boolean$1,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean$1,optimum:number$8,pattern:null,ping:spaceSeparated$1,placeholder:null,playsInline:boolean$1,poster:null,preload:null,readOnly:boolean$1,referrerPolicy:null,rel:spaceSeparated$1,required:boolean$1,reversed:boolean$1,rows:number$8,rowSpan:number$8,sandbox:spaceSeparated$1,scope:null,scoped:boolean$1,seamless:boolean$1,selected:boolean$1,shape:null,size:number$8,sizes:null,slot:null,span:number$8,spellCheck:booleanish$1,src:null,srcDoc:null,srcLang:null,srcSet:commaSeparated$1,start:number$8,step:null,style:null,tabIndex:number$8,target:null,title:null,translate:null,type:null,typeMustMatch:boolean$1,useMap:null,value:booleanish$1,width:number$8,wrap:null,align:null,aLink:null,archive:spaceSeparated$1,axis:null,background:null,bgColor:null,border:number$8,borderColor:null,bottomMargin:number$8,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean$1,declare:boolean$1,event:null,face:null,frame:null,frameBorder:null,hSpace:number$8,leftMargin:number$8,link:null,longDesc:null,lowSrc:null,marginHeight:number$8,marginWidth:number$8,noResize:boolean$1,noHref:boolean$1,noShade:boolean$1,noWrap:boolean$1,object:null,profile:null,prompt:null,rev:null,rightMargin:number$8,rules:null,scheme:null,scrolling:booleanish$1,standby:null,summary:null,text:null,topMargin:number$8,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number$8,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean$1,disableRemotePlayback:boolean$1,prefix:null,property:null,results:number$8,security:null,unselectable:null}}),merge$6=merge_1,xlink$1=xlink$3,xml$1=xml$3,xmlns$2=xmlns$4,aria$2=aria$4,html$a=html$b,html_1$1=merge$6([xml$1,xlink$1,xmlns$2,aria$2,html$a]),schema=html_1$1,factory$6=factory_1,html$9=factory$6(schema,"div");html$9.displayName="html";var html_1=html$9;(function(et){et.exports=html_1})(hastscript);var ccount_1=ccount$1;function ccount$1(et,tt){var nt=String(et),rt=0,ot;if(typeof tt!="string")throw new Error("Expected character");for(ot=nt.indexOf(tt);ot!==-1;)rt++,ot=nt.indexOf(tt,ot+tt.length);return rt}var html$8=html_1$2,svg$2=svg_1$2,find$5=find_1$1,ns$1=require$$3$3,s$1=svg_1,h$3=hastscript.exports,xtend$6=immutable,count$1=ccount_1,hastUtilFromParse5=wrapper$1,own$c={}.hasOwnProperty,map$2={"#document":root$3,"#document-fragment":root$3,"#text":text$6,"#comment":comment$2,"#documentType":doctype$6};function wrapper$1(et,tt){var nt=tt||{},rt;return nt.messages?(rt=nt,nt={}):rt=nt.file,transform$6(et,{schema:nt.space==="svg"?svg$2:html$8,file:rt,verbose:nt.verbose,location:!1})}function transform$6(et,tt){var nt=tt.schema,rt=own$c.call(map$2,et.nodeName)?map$2[et.nodeName]:element$6,ot,st,ut;return rt===element$6&&(tt.schema=et.namespaceURI===ns$1.svg?svg$2:html$8),et.childNodes&&(ot=nodes(et.childNodes,tt)),st=rt(et,ot,tt),et.sourceCodeLocation&&tt.file&&(ut=location$1(st,et.sourceCodeLocation,tt),ut&&(tt.location=!0,st.position=ut)),tt.schema=nt,st}function nodes(et,tt){for(var nt=et.length,rt=-1,ot=[];++rt<nt;)ot[rt]=transform$6(et[rt],tt);return ot}function root$3(et,tt,nt){var rt={type:"root",children:tt,data:{}},ot;return rt.data.quirksMode=et.mode==="quirks"||et.mode==="limited-quirks",nt.file&&nt.location&&(ot=String(nt.file),rt.position={start:{line:1,column:1,offset:0},end:{line:count$1(ot,`
`)+1,column:ot.length-ot.lastIndexOf(`
`),offset:ot.length}}),rt}function doctype$6(et){return{type:"doctype",name:et.name||"",public:et.publicId||null,system:et.systemId||null}}function text$6(et){return{type:"text",value:et.value}}function comment$2(et){return{type:"comment",value:et.data}}function element$6(et,tt,nt){for(var rt=nt.schema.space==="svg"?s$1:h$3,ot=et.tagName,st=et.attrs,ut=st.length,ct={},ft=-1,pt,ht,mt,yt,vt,Tt;++ft<ut;)pt=st[ft],ht=(pt.prefix?pt.prefix+":":"")+pt.name,ct[ht]=pt.value;return mt=rt(ot,ct,tt),ot==="template"&&"content"in et&&(yt=et.sourceCodeLocation,vt=yt&&yt.startTag&&position$5(yt.startTag).end,Tt=yt&&yt.endTag&&position$5(yt.endTag).start,mt.content=transform$6(et.content,nt),(vt||Tt)&&nt.file&&(mt.content.position={start:vt,end:Tt})),mt}function location$1(et,tt,nt){var rt=nt.schema,ot=nt.verbose,st=position$5(tt),ut,ct,ft,pt,ht;if(et.type==="element"&&(ut=et.children[et.children.length-1],!tt.endTag&&ut&&ut.position&&ut.position.end&&(st.end=xtend$6(ut.position.end)),ot)){ct=tt.attrs,pt={};for(ft in ct)ht=find$5(rt,ft).property,pt[ht]=position$5(ct[ft]);et.data={position:{opening:position$5(tt.startTag),closing:tt.endTag?position$5(tt.endTag):null,properties:pt}}}return st}function position$5(et){var tt=point$b({line:et.startLine,column:et.startCol,offset:et.startOffset}),nt=point$b({line:et.endLine,column:et.endCol,offset:et.endOffset});return tt||nt?{start:tt,end:nt}:null}function point$b(et){return et.line&&et.column?et:null}var unicode$7={};const UNDEFINED_CODE_POINTS$1=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];unicode$7.REPLACEMENT_CHARACTER="\uFFFD";unicode$7.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};unicode$7.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};unicode$7.isSurrogate=function(et){return et>=55296&&et<=57343};unicode$7.isSurrogatePair=function(et){return et>=56320&&et<=57343};unicode$7.getSurrogatePairCodePoint=function(et,tt){return(et-55296)*1024+9216+tt};unicode$7.isControlCodePoint=function(et){return et!==32&&et!==10&&et!==13&&et!==9&&et!==12&&et>=1&&et<=31||et>=127&&et<=159};unicode$7.isUndefinedCodePoint=function(et){return et>=64976&&et<=65007||UNDEFINED_CODE_POINTS$1.indexOf(et)>-1};var errorCodes$1={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"};const unicode$6=unicode$7,ERR$5=errorCodes$1,$$f=unicode$6.CODE_POINTS,DEFAULT_BUFFER_WATERLINE$1=1<<16;class Preprocessor$3{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=DEFAULT_BUFFER_WATERLINE$1}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(tt){if(this.pos!==this.lastCharPos){const nt=this.html.charCodeAt(this.pos+1);if(unicode$6.isSurrogatePair(nt))return this.pos++,this._addGap(),unicode$6.getSurrogatePairCodePoint(tt,nt)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,$$f.EOF;return this._err(ERR$5.surrogateInInputStream),tt}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(tt,nt){this.html?this.html+=tt:this.html=tt,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=nt}insertHtmlAtCurrentPos(tt){this.html=this.html.substring(0,this.pos+1)+tt+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,$$f.EOF;let tt=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&tt===$$f.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):tt===$$f.CARRIAGE_RETURN?(this.skipNextNewLine=!0,$$f.LINE_FEED):(this.skipNextNewLine=!1,unicode$6.isSurrogate(tt)&&(tt=this._processSurrogate(tt)),tt>31&&tt<127||tt===$$f.LINE_FEED||tt===$$f.CARRIAGE_RETURN||tt>159&&tt<64976||this._checkForProblematicCharacters(tt),tt)}_checkForProblematicCharacters(tt){unicode$6.isControlCodePoint(tt)?this._err(ERR$5.controlCharacterInInputStream):unicode$6.isUndefinedCodePoint(tt)&&this._err(ERR$5.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}var preprocessor$1=Preprocessor$3,namedEntityData$1=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]);const Preprocessor$2=preprocessor$1,unicode$5=unicode$7,neTree$1=namedEntityData$1,ERR$4=errorCodes$1,$$e=unicode$5.CODE_POINTS,$$$1=unicode$5.CODE_POINT_SEQUENCES,C1_CONTROLS_REFERENCE_REPLACEMENTS$1={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},HAS_DATA_FLAG$1=1<<0,DATA_DUPLET_FLAG$1=1<<1,HAS_BRANCHES_FLAG$1=1<<2,MAX_BRANCH_MARKER_VALUE$1=HAS_DATA_FLAG$1|DATA_DUPLET_FLAG$1|HAS_BRANCHES_FLAG$1,DATA_STATE$1="DATA_STATE",RCDATA_STATE$1="RCDATA_STATE",RAWTEXT_STATE$1="RAWTEXT_STATE",SCRIPT_DATA_STATE$1="SCRIPT_DATA_STATE",PLAINTEXT_STATE$1="PLAINTEXT_STATE",TAG_OPEN_STATE$1="TAG_OPEN_STATE",END_TAG_OPEN_STATE$1="END_TAG_OPEN_STATE",TAG_NAME_STATE$1="TAG_NAME_STATE",RCDATA_LESS_THAN_SIGN_STATE$1="RCDATA_LESS_THAN_SIGN_STATE",RCDATA_END_TAG_OPEN_STATE$1="RCDATA_END_TAG_OPEN_STATE",RCDATA_END_TAG_NAME_STATE$1="RCDATA_END_TAG_NAME_STATE",RAWTEXT_LESS_THAN_SIGN_STATE$1="RAWTEXT_LESS_THAN_SIGN_STATE",RAWTEXT_END_TAG_OPEN_STATE$1="RAWTEXT_END_TAG_OPEN_STATE",RAWTEXT_END_TAG_NAME_STATE$1="RAWTEXT_END_TAG_NAME_STATE",SCRIPT_DATA_LESS_THAN_SIGN_STATE$1="SCRIPT_DATA_LESS_THAN_SIGN_STATE",SCRIPT_DATA_END_TAG_OPEN_STATE$1="SCRIPT_DATA_END_TAG_OPEN_STATE",SCRIPT_DATA_END_TAG_NAME_STATE$1="SCRIPT_DATA_END_TAG_NAME_STATE",SCRIPT_DATA_ESCAPE_START_STATE$1="SCRIPT_DATA_ESCAPE_START_STATE",SCRIPT_DATA_ESCAPE_START_DASH_STATE$1="SCRIPT_DATA_ESCAPE_START_DASH_STATE",SCRIPT_DATA_ESCAPED_STATE$1="SCRIPT_DATA_ESCAPED_STATE",SCRIPT_DATA_ESCAPED_DASH_STATE$1="SCRIPT_DATA_ESCAPED_DASH_STATE",SCRIPT_DATA_ESCAPED_DASH_DASH_STATE$1="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE$1="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE$1="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE$1="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE$1="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE$1="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE$1="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE$1="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE$1="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",BEFORE_ATTRIBUTE_NAME_STATE$1="BEFORE_ATTRIBUTE_NAME_STATE",ATTRIBUTE_NAME_STATE$1="ATTRIBUTE_NAME_STATE",AFTER_ATTRIBUTE_NAME_STATE$1="AFTER_ATTRIBUTE_NAME_STATE",BEFORE_ATTRIBUTE_VALUE_STATE$1="BEFORE_ATTRIBUTE_VALUE_STATE",ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE$1="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE$1="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",ATTRIBUTE_VALUE_UNQUOTED_STATE$1="ATTRIBUTE_VALUE_UNQUOTED_STATE",AFTER_ATTRIBUTE_VALUE_QUOTED_STATE$1="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",SELF_CLOSING_START_TAG_STATE$1="SELF_CLOSING_START_TAG_STATE",BOGUS_COMMENT_STATE$1="BOGUS_COMMENT_STATE",MARKUP_DECLARATION_OPEN_STATE$1="MARKUP_DECLARATION_OPEN_STATE",COMMENT_START_STATE$1="COMMENT_START_STATE",COMMENT_START_DASH_STATE$1="COMMENT_START_DASH_STATE",COMMENT_STATE$1="COMMENT_STATE",COMMENT_LESS_THAN_SIGN_STATE$1="COMMENT_LESS_THAN_SIGN_STATE",COMMENT_LESS_THAN_SIGN_BANG_STATE$1="COMMENT_LESS_THAN_SIGN_BANG_STATE",COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE$1="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE$1="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",COMMENT_END_DASH_STATE$1="COMMENT_END_DASH_STATE",COMMENT_END_STATE$1="COMMENT_END_STATE",COMMENT_END_BANG_STATE$1="COMMENT_END_BANG_STATE",DOCTYPE_STATE$1="DOCTYPE_STATE",BEFORE_DOCTYPE_NAME_STATE$1="BEFORE_DOCTYPE_NAME_STATE",DOCTYPE_NAME_STATE$1="DOCTYPE_NAME_STATE",AFTER_DOCTYPE_NAME_STATE$1="AFTER_DOCTYPE_NAME_STATE",AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE$1="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE$1="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE$1="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE$1="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE$1="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE$1="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE$1="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE$1="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE$1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE$1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE$1="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",BOGUS_DOCTYPE_STATE$1="BOGUS_DOCTYPE_STATE",CDATA_SECTION_STATE$1="CDATA_SECTION_STATE",CDATA_SECTION_BRACKET_STATE$1="CDATA_SECTION_BRACKET_STATE",CDATA_SECTION_END_STATE$1="CDATA_SECTION_END_STATE",CHARACTER_REFERENCE_STATE$1="CHARACTER_REFERENCE_STATE",NAMED_CHARACTER_REFERENCE_STATE$1="NAMED_CHARACTER_REFERENCE_STATE",AMBIGUOUS_AMPERSAND_STATE$1="AMBIGUOS_AMPERSAND_STATE",NUMERIC_CHARACTER_REFERENCE_STATE$1="NUMERIC_CHARACTER_REFERENCE_STATE",HEXADEMICAL_CHARACTER_REFERENCE_START_STATE$1="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",DECIMAL_CHARACTER_REFERENCE_START_STATE$1="DECIMAL_CHARACTER_REFERENCE_START_STATE",HEXADEMICAL_CHARACTER_REFERENCE_STATE$1="HEXADEMICAL_CHARACTER_REFERENCE_STATE",DECIMAL_CHARACTER_REFERENCE_STATE$1="DECIMAL_CHARACTER_REFERENCE_STATE",NUMERIC_CHARACTER_REFERENCE_END_STATE$1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function isWhitespace$1(et){return et===$$e.SPACE||et===$$e.LINE_FEED||et===$$e.TABULATION||et===$$e.FORM_FEED}function isAsciiDigit$1(et){return et>=$$e.DIGIT_0&&et<=$$e.DIGIT_9}function isAsciiUpper$1(et){return et>=$$e.LATIN_CAPITAL_A&&et<=$$e.LATIN_CAPITAL_Z}function isAsciiLower$1(et){return et>=$$e.LATIN_SMALL_A&&et<=$$e.LATIN_SMALL_Z}function isAsciiLetter$1(et){return isAsciiLower$1(et)||isAsciiUpper$1(et)}function isAsciiAlphaNumeric$1(et){return isAsciiLetter$1(et)||isAsciiDigit$1(et)}function isAsciiUpperHexDigit$1(et){return et>=$$e.LATIN_CAPITAL_A&&et<=$$e.LATIN_CAPITAL_F}function isAsciiLowerHexDigit$1(et){return et>=$$e.LATIN_SMALL_A&&et<=$$e.LATIN_SMALL_F}function isAsciiHexDigit$1(et){return isAsciiDigit$1(et)||isAsciiUpperHexDigit$1(et)||isAsciiLowerHexDigit$1(et)}function toAsciiLowerCodePoint$1(et){return et+32}function toChar$1(et){return et<=65535?String.fromCharCode(et):(et-=65536,String.fromCharCode(et>>>10&1023|55296)+String.fromCharCode(56320|et&1023))}function toAsciiLowerChar$1(et){return String.fromCharCode(toAsciiLowerCodePoint$1(et))}function findNamedEntityTreeBranch$1(et,tt){const nt=neTree$1[++et];let rt=++et,ot=rt+nt-1;for(;rt<=ot;){const st=rt+ot>>>1,ut=neTree$1[st];if(ut<tt)rt=st+1;else if(ut>tt)ot=st-1;else return neTree$1[st+nt]}return-1}class Tokenizer$9{constructor(){this.preprocessor=new Preprocessor$2,this.tokenQueue=[],this.allowCDATA=!1,this.state=DATA_STATE$1,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(tt){this._consume(),this._err(tt),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const tt=this._consume();this._ensureHibernation()||this[this.state](tt)}return this.tokenQueue.shift()}write(tt,nt){this.active=!0,this.preprocessor.write(tt,nt)}insertHtmlAtCurrentPos(tt){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(tt)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Tokenizer$9.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(tt){this.state=tt,this._unconsume()}_consumeSequenceIfMatch(tt,nt,rt){let ot=0,st=!0;const ut=tt.length;let ct=0,ft=nt,pt;for(;ct<ut;ct++){if(ct>0&&(ft=this._consume(),ot++),ft===$$e.EOF){st=!1;break}if(pt=tt[ct],ft!==pt&&(rt||ft!==toAsciiLowerCodePoint$1(pt))){st=!1;break}}if(!st)for(;ot--;)this._unconsume();return st}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==$$$1.SCRIPT_STRING.length)return!1;for(let tt=0;tt<this.tempBuff.length;tt++)if(this.tempBuff[tt]!==$$$1.SCRIPT_STRING[tt])return!1;return!0}_createStartTagToken(){this.currentToken={type:Tokenizer$9.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:Tokenizer$9.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:Tokenizer$9.COMMENT_TOKEN,data:""}}_createDoctypeToken(tt){this.currentToken={type:Tokenizer$9.DOCTYPE_TOKEN,name:tt,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(tt,nt){this.currentCharacterToken={type:tt,chars:nt}}_createEOFToken(){this.currentToken={type:Tokenizer$9.EOF_TOKEN}}_createAttr(tt){this.currentAttr={name:tt,value:""}}_leaveAttrName(tt){Tokenizer$9.getTokenAttr(this.currentToken,this.currentAttr.name)===null?this.currentToken.attrs.push(this.currentAttr):this._err(ERR$4.duplicateAttribute),this.state=tt}_leaveAttrValue(tt){this.state=tt}_emitCurrentToken(){this._emitCurrentCharacterToken();const tt=this.currentToken;this.currentToken=null,tt.type===Tokenizer$9.START_TAG_TOKEN?this.lastStartTagName=tt.tagName:tt.type===Tokenizer$9.END_TAG_TOKEN&&(tt.attrs.length>0&&this._err(ERR$4.endTagWithAttributes),tt.selfClosing&&this._err(ERR$4.endTagWithTrailingSolidus)),this.tokenQueue.push(tt)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(tt,nt){this.currentCharacterToken&&this.currentCharacterToken.type!==tt&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=nt:this._createCharacterToken(tt,nt)}_emitCodePoint(tt){let nt=Tokenizer$9.CHARACTER_TOKEN;isWhitespace$1(tt)?nt=Tokenizer$9.WHITESPACE_CHARACTER_TOKEN:tt===$$e.NULL&&(nt=Tokenizer$9.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(nt,toChar$1(tt))}_emitSeveralCodePoints(tt){for(let nt=0;nt<tt.length;nt++)this._emitCodePoint(tt[nt])}_emitChars(tt){this._appendCharToCurrentCharacterToken(Tokenizer$9.CHARACTER_TOKEN,tt)}_matchNamedCharacterReference(tt){let nt=null,rt=1,ot=findNamedEntityTreeBranch$1(0,tt);for(this.tempBuff.push(tt);ot>-1;){const st=neTree$1[ot],ut=st<MAX_BRANCH_MARKER_VALUE$1;ut&&st&HAS_DATA_FLAG$1&&(nt=st&DATA_DUPLET_FLAG$1?[neTree$1[++ot],neTree$1[++ot]]:[neTree$1[++ot]],rt=0);const ft=this._consume();if(this.tempBuff.push(ft),rt++,ft===$$e.EOF)break;ut?ot=st&HAS_BRANCHES_FLAG$1?findNamedEntityTreeBranch$1(ot,ft):-1:ot=ft===st?++ot:-1}for(;rt--;)this.tempBuff.pop(),this._unconsume();return nt}_isCharacterReferenceInAttribute(){return this.returnState===ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE$1||this.returnState===ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE$1||this.returnState===ATTRIBUTE_VALUE_UNQUOTED_STATE$1}_isCharacterReferenceAttributeQuirk(tt){if(!tt&&this._isCharacterReferenceInAttribute()){const nt=this._consume();return this._unconsume(),nt===$$e.EQUALS_SIGN||isAsciiAlphaNumeric$1(nt)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let tt=0;tt<this.tempBuff.length;tt++)this.currentAttr.value+=toChar$1(this.tempBuff[tt]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[DATA_STATE$1](tt){this.preprocessor.dropParsedChunk(),tt===$$e.LESS_THAN_SIGN?this.state=TAG_OPEN_STATE$1:tt===$$e.AMPERSAND?(this.returnState=DATA_STATE$1,this.state=CHARACTER_REFERENCE_STATE$1):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._emitCodePoint(tt)):tt===$$e.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[RCDATA_STATE$1](tt){this.preprocessor.dropParsedChunk(),tt===$$e.AMPERSAND?(this.returnState=RCDATA_STATE$1,this.state=CHARACTER_REFERENCE_STATE$1):tt===$$e.LESS_THAN_SIGN?this.state=RCDATA_LESS_THAN_SIGN_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[RAWTEXT_STATE$1](tt){this.preprocessor.dropParsedChunk(),tt===$$e.LESS_THAN_SIGN?this.state=RAWTEXT_LESS_THAN_SIGN_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[SCRIPT_DATA_STATE$1](tt){this.preprocessor.dropParsedChunk(),tt===$$e.LESS_THAN_SIGN?this.state=SCRIPT_DATA_LESS_THAN_SIGN_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[PLAINTEXT_STATE$1](tt){this.preprocessor.dropParsedChunk(),tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[TAG_OPEN_STATE$1](tt){tt===$$e.EXCLAMATION_MARK?this.state=MARKUP_DECLARATION_OPEN_STATE$1:tt===$$e.SOLIDUS?this.state=END_TAG_OPEN_STATE$1:isAsciiLetter$1(tt)?(this._createStartTagToken(),this._reconsumeInState(TAG_NAME_STATE$1)):tt===$$e.QUESTION_MARK?(this._err(ERR$4.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(BOGUS_COMMENT_STATE$1)):tt===$$e.EOF?(this._err(ERR$4.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(ERR$4.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(DATA_STATE$1))}[END_TAG_OPEN_STATE$1](tt){isAsciiLetter$1(tt)?(this._createEndTagToken(),this._reconsumeInState(TAG_NAME_STATE$1)):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.missingEndTagName),this.state=DATA_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(ERR$4.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(BOGUS_COMMENT_STATE$1))}[TAG_NAME_STATE$1](tt){isWhitespace$1(tt)?this.state=BEFORE_ATTRIBUTE_NAME_STATE$1:tt===$$e.SOLIDUS?this.state=SELF_CLOSING_START_TAG_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this.state=DATA_STATE$1,this._emitCurrentToken()):isAsciiUpper$1(tt)?this.currentToken.tagName+=toAsciiLowerChar$1(tt):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.tagName+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.EOF?(this._err(ERR$4.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=toChar$1(tt)}[RCDATA_LESS_THAN_SIGN_STATE$1](tt){tt===$$e.SOLIDUS?(this.tempBuff=[],this.state=RCDATA_END_TAG_OPEN_STATE$1):(this._emitChars("<"),this._reconsumeInState(RCDATA_STATE$1))}[RCDATA_END_TAG_OPEN_STATE$1](tt){isAsciiLetter$1(tt)?(this._createEndTagToken(),this._reconsumeInState(RCDATA_END_TAG_NAME_STATE$1)):(this._emitChars("</"),this._reconsumeInState(RCDATA_STATE$1))}[RCDATA_END_TAG_NAME_STATE$1](tt){if(isAsciiUpper$1(tt))this.currentToken.tagName+=toAsciiLowerChar$1(tt),this.tempBuff.push(tt);else if(isAsciiLower$1(tt))this.currentToken.tagName+=toChar$1(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace$1(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE$1;return}if(tt===$$e.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE$1;return}if(tt===$$e.GREATER_THAN_SIGN){this.state=DATA_STATE$1,this._emitCurrentToken();return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(RCDATA_STATE$1)}}[RAWTEXT_LESS_THAN_SIGN_STATE$1](tt){tt===$$e.SOLIDUS?(this.tempBuff=[],this.state=RAWTEXT_END_TAG_OPEN_STATE$1):(this._emitChars("<"),this._reconsumeInState(RAWTEXT_STATE$1))}[RAWTEXT_END_TAG_OPEN_STATE$1](tt){isAsciiLetter$1(tt)?(this._createEndTagToken(),this._reconsumeInState(RAWTEXT_END_TAG_NAME_STATE$1)):(this._emitChars("</"),this._reconsumeInState(RAWTEXT_STATE$1))}[RAWTEXT_END_TAG_NAME_STATE$1](tt){if(isAsciiUpper$1(tt))this.currentToken.tagName+=toAsciiLowerChar$1(tt),this.tempBuff.push(tt);else if(isAsciiLower$1(tt))this.currentToken.tagName+=toChar$1(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace$1(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE$1;return}if(tt===$$e.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE$1;return}if(tt===$$e.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=DATA_STATE$1;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(RAWTEXT_STATE$1)}}[SCRIPT_DATA_LESS_THAN_SIGN_STATE$1](tt){tt===$$e.SOLIDUS?(this.tempBuff=[],this.state=SCRIPT_DATA_END_TAG_OPEN_STATE$1):tt===$$e.EXCLAMATION_MARK?(this.state=SCRIPT_DATA_ESCAPE_START_STATE$1,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(SCRIPT_DATA_STATE$1))}[SCRIPT_DATA_END_TAG_OPEN_STATE$1](tt){isAsciiLetter$1(tt)?(this._createEndTagToken(),this._reconsumeInState(SCRIPT_DATA_END_TAG_NAME_STATE$1)):(this._emitChars("</"),this._reconsumeInState(SCRIPT_DATA_STATE$1))}[SCRIPT_DATA_END_TAG_NAME_STATE$1](tt){if(isAsciiUpper$1(tt))this.currentToken.tagName+=toAsciiLowerChar$1(tt),this.tempBuff.push(tt);else if(isAsciiLower$1(tt))this.currentToken.tagName+=toChar$1(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace$1(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE$1;return}else if(tt===$$e.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE$1;return}else if(tt===$$e.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=DATA_STATE$1;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(SCRIPT_DATA_STATE$1)}}[SCRIPT_DATA_ESCAPE_START_STATE$1](tt){tt===$$e.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPE_START_DASH_STATE$1,this._emitChars("-")):this._reconsumeInState(SCRIPT_DATA_STATE$1)}[SCRIPT_DATA_ESCAPE_START_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPED_DASH_DASH_STATE$1,this._emitChars("-")):this._reconsumeInState(SCRIPT_DATA_STATE$1)}[SCRIPT_DATA_ESCAPED_STATE$1](tt){tt===$$e.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPED_DASH_STATE$1,this._emitChars("-")):tt===$$e.LESS_THAN_SIGN?this.state=SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?(this._err(ERR$4.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(tt)}[SCRIPT_DATA_ESCAPED_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPED_DASH_DASH_STATE$1,this._emitChars("-")):tt===$$e.LESS_THAN_SIGN?this.state=SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.state=SCRIPT_DATA_ESCAPED_STATE$1,this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?(this._err(ERR$4.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_ESCAPED_STATE$1,this._emitCodePoint(tt))}[SCRIPT_DATA_ESCAPED_DASH_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this._emitChars("-"):tt===$$e.LESS_THAN_SIGN?this.state=SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this.state=SCRIPT_DATA_STATE$1,this._emitChars(">")):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.state=SCRIPT_DATA_ESCAPED_STATE$1,this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?(this._err(ERR$4.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_ESCAPED_STATE$1,this._emitCodePoint(tt))}[SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE$1](tt){tt===$$e.SOLIDUS?(this.tempBuff=[],this.state=SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE$1):isAsciiLetter$1(tt)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE$1)):(this._emitChars("<"),this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE$1))}[SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE$1](tt){isAsciiLetter$1(tt)?(this._createEndTagToken(),this._reconsumeInState(SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE$1)):(this._emitChars("</"),this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE$1))}[SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE$1](tt){if(isAsciiUpper$1(tt))this.currentToken.tagName+=toAsciiLowerChar$1(tt),this.tempBuff.push(tt);else if(isAsciiLower$1(tt))this.currentToken.tagName+=toChar$1(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace$1(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE$1;return}if(tt===$$e.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE$1;return}if(tt===$$e.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=DATA_STATE$1;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE$1)}}[SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE$1](tt){isWhitespace$1(tt)||tt===$$e.SOLIDUS||tt===$$e.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1:SCRIPT_DATA_ESCAPED_STATE$1,this._emitCodePoint(tt)):isAsciiUpper$1(tt)?(this.tempBuff.push(toAsciiLowerCodePoint$1(tt)),this._emitCodePoint(tt)):isAsciiLower$1(tt)?(this.tempBuff.push(tt),this._emitCodePoint(tt)):this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE$1)}[SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1](tt){tt===$$e.HYPHEN_MINUS?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE$1,this._emitChars("-")):tt===$$e.LESS_THAN_SIGN?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE$1,this._emitChars("<")):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?(this._err(ERR$4.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(tt)}[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE$1,this._emitChars("-")):tt===$$e.LESS_THAN_SIGN?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE$1,this._emitChars("<")):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1,this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?(this._err(ERR$4.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1,this._emitCodePoint(tt))}[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this._emitChars("-"):tt===$$e.LESS_THAN_SIGN?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE$1,this._emitChars("<")):tt===$$e.GREATER_THAN_SIGN?(this.state=SCRIPT_DATA_STATE$1,this._emitChars(">")):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1,this._emitChars(unicode$5.REPLACEMENT_CHARACTER)):tt===$$e.EOF?(this._err(ERR$4.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1,this._emitCodePoint(tt))}[SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE$1](tt){tt===$$e.SOLIDUS?(this.tempBuff=[],this.state=SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE$1,this._emitChars("/")):this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1)}[SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE$1](tt){isWhitespace$1(tt)||tt===$$e.SOLIDUS||tt===$$e.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?SCRIPT_DATA_ESCAPED_STATE$1:SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1,this._emitCodePoint(tt)):isAsciiUpper$1(tt)?(this.tempBuff.push(toAsciiLowerCodePoint$1(tt)),this._emitCodePoint(tt)):isAsciiLower$1(tt)?(this.tempBuff.push(tt),this._emitCodePoint(tt)):this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE$1)}[BEFORE_ATTRIBUTE_NAME_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.SOLIDUS||tt===$$e.GREATER_THAN_SIGN||tt===$$e.EOF?this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE$1):tt===$$e.EQUALS_SIGN?(this._err(ERR$4.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=ATTRIBUTE_NAME_STATE$1):(this._createAttr(""),this._reconsumeInState(ATTRIBUTE_NAME_STATE$1)))}[ATTRIBUTE_NAME_STATE$1](tt){isWhitespace$1(tt)||tt===$$e.SOLIDUS||tt===$$e.GREATER_THAN_SIGN||tt===$$e.EOF?(this._leaveAttrName(AFTER_ATTRIBUTE_NAME_STATE$1),this._unconsume()):tt===$$e.EQUALS_SIGN?this._leaveAttrName(BEFORE_ATTRIBUTE_VALUE_STATE$1):isAsciiUpper$1(tt)?this.currentAttr.name+=toAsciiLowerChar$1(tt):tt===$$e.QUOTATION_MARK||tt===$$e.APOSTROPHE||tt===$$e.LESS_THAN_SIGN?(this._err(ERR$4.unexpectedCharacterInAttributeName),this.currentAttr.name+=toChar$1(tt)):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentAttr.name+=unicode$5.REPLACEMENT_CHARACTER):this.currentAttr.name+=toChar$1(tt)}[AFTER_ATTRIBUTE_NAME_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.SOLIDUS?this.state=SELF_CLOSING_START_TAG_STATE$1:tt===$$e.EQUALS_SIGN?this.state=BEFORE_ATTRIBUTE_VALUE_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(ATTRIBUTE_NAME_STATE$1)))}[BEFORE_ATTRIBUTE_VALUE_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.QUOTATION_MARK?this.state=ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE$1:tt===$$e.APOSTROPHE?this.state=ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.missingAttributeValue),this.state=DATA_STATE$1,this._emitCurrentToken()):this._reconsumeInState(ATTRIBUTE_VALUE_UNQUOTED_STATE$1))}[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE$1](tt){tt===$$e.QUOTATION_MARK?this.state=AFTER_ATTRIBUTE_VALUE_QUOTED_STATE$1:tt===$$e.AMPERSAND?(this.returnState=ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE$1,this.state=CHARACTER_REFERENCE_STATE$1):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentAttr.value+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.EOF?(this._err(ERR$4.eofInTag),this._emitEOFToken()):this.currentAttr.value+=toChar$1(tt)}[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE$1](tt){tt===$$e.APOSTROPHE?this.state=AFTER_ATTRIBUTE_VALUE_QUOTED_STATE$1:tt===$$e.AMPERSAND?(this.returnState=ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE$1,this.state=CHARACTER_REFERENCE_STATE$1):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentAttr.value+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.EOF?(this._err(ERR$4.eofInTag),this._emitEOFToken()):this.currentAttr.value+=toChar$1(tt)}[ATTRIBUTE_VALUE_UNQUOTED_STATE$1](tt){isWhitespace$1(tt)?this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE$1):tt===$$e.AMPERSAND?(this.returnState=ATTRIBUTE_VALUE_UNQUOTED_STATE$1,this.state=CHARACTER_REFERENCE_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._leaveAttrValue(DATA_STATE$1),this._emitCurrentToken()):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentAttr.value+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.QUOTATION_MARK||tt===$$e.APOSTROPHE||tt===$$e.LESS_THAN_SIGN||tt===$$e.EQUALS_SIGN||tt===$$e.GRAVE_ACCENT?(this._err(ERR$4.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=toChar$1(tt)):tt===$$e.EOF?(this._err(ERR$4.eofInTag),this._emitEOFToken()):this.currentAttr.value+=toChar$1(tt)}[AFTER_ATTRIBUTE_VALUE_QUOTED_STATE$1](tt){isWhitespace$1(tt)?this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE$1):tt===$$e.SOLIDUS?this._leaveAttrValue(SELF_CLOSING_START_TAG_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._leaveAttrValue(DATA_STATE$1),this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInTag),this._emitEOFToken()):(this._err(ERR$4.missingWhitespaceBetweenAttributes),this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE$1))}[SELF_CLOSING_START_TAG_STATE$1](tt){tt===$$e.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInTag),this._emitEOFToken()):(this._err(ERR$4.unexpectedSolidusInTag),this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE$1))}[BOGUS_COMMENT_STATE$1](tt){tt===$$e.GREATER_THAN_SIGN?(this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._emitCurrentToken(),this._emitEOFToken()):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.data+=unicode$5.REPLACEMENT_CHARACTER):this.currentToken.data+=toChar$1(tt)}[MARKUP_DECLARATION_OPEN_STATE$1](tt){this._consumeSequenceIfMatch($$$1.DASH_DASH_STRING,tt,!0)?(this._createCommentToken(),this.state=COMMENT_START_STATE$1):this._consumeSequenceIfMatch($$$1.DOCTYPE_STRING,tt,!1)?this.state=DOCTYPE_STATE$1:this._consumeSequenceIfMatch($$$1.CDATA_START_STRING,tt,!0)?this.allowCDATA?this.state=CDATA_SECTION_STATE$1:(this._err(ERR$4.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=BOGUS_COMMENT_STATE$1):this._ensureHibernation()||(this._err(ERR$4.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(BOGUS_COMMENT_STATE$1))}[COMMENT_START_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this.state=COMMENT_START_DASH_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.abruptClosingOfEmptyComment),this.state=DATA_STATE$1,this._emitCurrentToken()):this._reconsumeInState(COMMENT_STATE$1)}[COMMENT_START_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this.state=COMMENT_END_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.abruptClosingOfEmptyComment),this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(COMMENT_STATE$1))}[COMMENT_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this.state=COMMENT_END_DASH_STATE$1:tt===$$e.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=COMMENT_LESS_THAN_SIGN_STATE$1):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.data+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.EOF?(this._err(ERR$4.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=toChar$1(tt)}[COMMENT_LESS_THAN_SIGN_STATE$1](tt){tt===$$e.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=COMMENT_LESS_THAN_SIGN_BANG_STATE$1):tt===$$e.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(COMMENT_STATE$1)}[COMMENT_LESS_THAN_SIGN_BANG_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this.state=COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE$1:this._reconsumeInState(COMMENT_STATE$1)}[COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this.state=COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE$1:this._reconsumeInState(COMMENT_END_DASH_STATE$1)}[COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE$1](tt){tt!==$$e.GREATER_THAN_SIGN&&tt!==$$e.EOF&&this._err(ERR$4.nestedComment),this._reconsumeInState(COMMENT_END_STATE$1)}[COMMENT_END_DASH_STATE$1](tt){tt===$$e.HYPHEN_MINUS?this.state=COMMENT_END_STATE$1:tt===$$e.EOF?(this._err(ERR$4.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(COMMENT_STATE$1))}[COMMENT_END_STATE$1](tt){tt===$$e.GREATER_THAN_SIGN?(this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EXCLAMATION_MARK?this.state=COMMENT_END_BANG_STATE$1:tt===$$e.HYPHEN_MINUS?this.currentToken.data+="-":tt===$$e.EOF?(this._err(ERR$4.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(COMMENT_STATE$1))}[COMMENT_END_BANG_STATE$1](tt){tt===$$e.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=COMMENT_END_DASH_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.incorrectlyClosedComment),this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(COMMENT_STATE$1))}[DOCTYPE_STATE$1](tt){isWhitespace$1(tt)?this.state=BEFORE_DOCTYPE_NAME_STATE$1:tt===$$e.GREATER_THAN_SIGN?this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE$1))}[BEFORE_DOCTYPE_NAME_STATE$1](tt){isWhitespace$1(tt)||(isAsciiUpper$1(tt)?(this._createDoctypeToken(toAsciiLowerChar$1(tt)),this.state=DOCTYPE_NAME_STATE$1):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this._createDoctypeToken(unicode$5.REPLACEMENT_CHARACTER),this.state=DOCTYPE_NAME_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(toChar$1(tt)),this.state=DOCTYPE_NAME_STATE$1))}[DOCTYPE_NAME_STATE$1](tt){isWhitespace$1(tt)?this.state=AFTER_DOCTYPE_NAME_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this.state=DATA_STATE$1,this._emitCurrentToken()):isAsciiUpper$1(tt)?this.currentToken.name+=toAsciiLowerChar$1(tt):tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.name+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=toChar$1(tt)}[AFTER_DOCTYPE_NAME_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.GREATER_THAN_SIGN?(this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch($$$1.PUBLIC_STRING,tt,!1)?this.state=AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE$1:this._consumeSequenceIfMatch($$$1.SYSTEM_STRING,tt,!1)?this.state=AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE$1:this._ensureHibernation()||(this._err(ERR$4.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE$1)))}[AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE$1](tt){isWhitespace$1(tt)?this.state=BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE$1:tt===$$e.QUOTATION_MARK?(this._err(ERR$4.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE$1):tt===$$e.APOSTROPHE?(this._err(ERR$4.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE$1))}[BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.QUOTATION_MARK?(this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE$1):tt===$$e.APOSTROPHE?(this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE$1)))}[DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE$1](tt){tt===$$e.QUOTATION_MARK?this.state=AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.publicId+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=toChar$1(tt)}[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE$1](tt){tt===$$e.APOSTROPHE?this.state=AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.publicId+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=toChar$1(tt)}[AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE$1](tt){isWhitespace$1(tt)?this.state=BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE$1:tt===$$e.GREATER_THAN_SIGN?(this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.QUOTATION_MARK?(this._err(ERR$4.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE$1):tt===$$e.APOSTROPHE?(this._err(ERR$4.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE$1))}[BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.QUOTATION_MARK?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE$1):tt===$$e.APOSTROPHE?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE$1)))}[AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE$1](tt){isWhitespace$1(tt)?this.state=BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE$1:tt===$$e.QUOTATION_MARK?(this._err(ERR$4.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE$1):tt===$$e.APOSTROPHE?(this._err(ERR$4.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE$1))}[BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.QUOTATION_MARK?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE$1):tt===$$e.APOSTROPHE?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE$1):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE$1,this._emitCurrentToken()):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE$1)))}[DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE$1](tt){tt===$$e.QUOTATION_MARK?this.state=AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.systemId+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=toChar$1(tt)}[DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE$1](tt){tt===$$e.APOSTROPHE?this.state=AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE$1:tt===$$e.NULL?(this._err(ERR$4.unexpectedNullCharacter),this.currentToken.systemId+=unicode$5.REPLACEMENT_CHARACTER):tt===$$e.GREATER_THAN_SIGN?(this._err(ERR$4.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=toChar$1(tt)}[AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE$1](tt){isWhitespace$1(tt)||(tt===$$e.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.EOF?(this._err(ERR$4.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$4.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(BOGUS_DOCTYPE_STATE$1)))}[BOGUS_DOCTYPE_STATE$1](tt){tt===$$e.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=DATA_STATE$1):tt===$$e.NULL?this._err(ERR$4.unexpectedNullCharacter):tt===$$e.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[CDATA_SECTION_STATE$1](tt){tt===$$e.RIGHT_SQUARE_BRACKET?this.state=CDATA_SECTION_BRACKET_STATE$1:tt===$$e.EOF?(this._err(ERR$4.eofInCdata),this._emitEOFToken()):this._emitCodePoint(tt)}[CDATA_SECTION_BRACKET_STATE$1](tt){tt===$$e.RIGHT_SQUARE_BRACKET?this.state=CDATA_SECTION_END_STATE$1:(this._emitChars("]"),this._reconsumeInState(CDATA_SECTION_STATE$1))}[CDATA_SECTION_END_STATE$1](tt){tt===$$e.GREATER_THAN_SIGN?this.state=DATA_STATE$1:tt===$$e.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(CDATA_SECTION_STATE$1))}[CHARACTER_REFERENCE_STATE$1](tt){this.tempBuff=[$$e.AMPERSAND],tt===$$e.NUMBER_SIGN?(this.tempBuff.push(tt),this.state=NUMERIC_CHARACTER_REFERENCE_STATE$1):isAsciiAlphaNumeric$1(tt)?this._reconsumeInState(NAMED_CHARACTER_REFERENCE_STATE$1):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[NAMED_CHARACTER_REFERENCE_STATE$1](tt){const nt=this._matchNamedCharacterReference(tt);if(this._ensureHibernation())this.tempBuff=[$$e.AMPERSAND];else if(nt){const rt=this.tempBuff[this.tempBuff.length-1]===$$e.SEMICOLON;this._isCharacterReferenceAttributeQuirk(rt)||(rt||this._errOnNextCodePoint(ERR$4.missingSemicolonAfterCharacterReference),this.tempBuff=nt),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=AMBIGUOUS_AMPERSAND_STATE$1}[AMBIGUOUS_AMPERSAND_STATE$1](tt){isAsciiAlphaNumeric$1(tt)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=toChar$1(tt):this._emitCodePoint(tt):(tt===$$e.SEMICOLON&&this._err(ERR$4.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[NUMERIC_CHARACTER_REFERENCE_STATE$1](tt){this.charRefCode=0,tt===$$e.LATIN_SMALL_X||tt===$$e.LATIN_CAPITAL_X?(this.tempBuff.push(tt),this.state=HEXADEMICAL_CHARACTER_REFERENCE_START_STATE$1):this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_START_STATE$1)}[HEXADEMICAL_CHARACTER_REFERENCE_START_STATE$1](tt){isAsciiHexDigit$1(tt)?this._reconsumeInState(HEXADEMICAL_CHARACTER_REFERENCE_STATE$1):(this._err(ERR$4.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[DECIMAL_CHARACTER_REFERENCE_START_STATE$1](tt){isAsciiDigit$1(tt)?this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_STATE$1):(this._err(ERR$4.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[HEXADEMICAL_CHARACTER_REFERENCE_STATE$1](tt){isAsciiUpperHexDigit$1(tt)?this.charRefCode=this.charRefCode*16+tt-55:isAsciiLowerHexDigit$1(tt)?this.charRefCode=this.charRefCode*16+tt-87:isAsciiDigit$1(tt)?this.charRefCode=this.charRefCode*16+tt-48:tt===$$e.SEMICOLON?this.state=NUMERIC_CHARACTER_REFERENCE_END_STATE$1:(this._err(ERR$4.missingSemicolonAfterCharacterReference),this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE$1))}[DECIMAL_CHARACTER_REFERENCE_STATE$1](tt){isAsciiDigit$1(tt)?this.charRefCode=this.charRefCode*10+tt-48:tt===$$e.SEMICOLON?this.state=NUMERIC_CHARACTER_REFERENCE_END_STATE$1:(this._err(ERR$4.missingSemicolonAfterCharacterReference),this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE$1))}[NUMERIC_CHARACTER_REFERENCE_END_STATE$1](){if(this.charRefCode===$$e.NULL)this._err(ERR$4.nullCharacterReference),this.charRefCode=$$e.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(ERR$4.characterReferenceOutsideUnicodeRange),this.charRefCode=$$e.REPLACEMENT_CHARACTER;else if(unicode$5.isSurrogate(this.charRefCode))this._err(ERR$4.surrogateCharacterReference),this.charRefCode=$$e.REPLACEMENT_CHARACTER;else if(unicode$5.isUndefinedCodePoint(this.charRefCode))this._err(ERR$4.noncharacterCharacterReference);else if(unicode$5.isControlCodePoint(this.charRefCode)||this.charRefCode===$$e.CARRIAGE_RETURN){this._err(ERR$4.controlCharacterReference);const tt=C1_CONTROLS_REFERENCE_REPLACEMENTS$1[this.charRefCode];tt&&(this.charRefCode=tt)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}Tokenizer$9.CHARACTER_TOKEN="CHARACTER_TOKEN";Tokenizer$9.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";Tokenizer$9.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";Tokenizer$9.START_TAG_TOKEN="START_TAG_TOKEN";Tokenizer$9.END_TAG_TOKEN="END_TAG_TOKEN";Tokenizer$9.COMMENT_TOKEN="COMMENT_TOKEN";Tokenizer$9.DOCTYPE_TOKEN="DOCTYPE_TOKEN";Tokenizer$9.EOF_TOKEN="EOF_TOKEN";Tokenizer$9.HIBERNATION_TOKEN="HIBERNATION_TOKEN";Tokenizer$9.MODE={DATA:DATA_STATE$1,RCDATA:RCDATA_STATE$1,RAWTEXT:RAWTEXT_STATE$1,SCRIPT_DATA:SCRIPT_DATA_STATE$1,PLAINTEXT:PLAINTEXT_STATE$1};Tokenizer$9.getTokenAttr=function(et,tt){for(let nt=et.attrs.length-1;nt>=0;nt--)if(et.attrs[nt].name===tt)return et.attrs[nt].value;return null};var tokenizer$3=Tokenizer$9,html$7={};const NS$7=html$7.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};html$7.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};html$7.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const $$d=html$7.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};html$7.SPECIAL_ELEMENTS={[NS$7.HTML]:{[$$d.ADDRESS]:!0,[$$d.APPLET]:!0,[$$d.AREA]:!0,[$$d.ARTICLE]:!0,[$$d.ASIDE]:!0,[$$d.BASE]:!0,[$$d.BASEFONT]:!0,[$$d.BGSOUND]:!0,[$$d.BLOCKQUOTE]:!0,[$$d.BODY]:!0,[$$d.BR]:!0,[$$d.BUTTON]:!0,[$$d.CAPTION]:!0,[$$d.CENTER]:!0,[$$d.COL]:!0,[$$d.COLGROUP]:!0,[$$d.DD]:!0,[$$d.DETAILS]:!0,[$$d.DIR]:!0,[$$d.DIV]:!0,[$$d.DL]:!0,[$$d.DT]:!0,[$$d.EMBED]:!0,[$$d.FIELDSET]:!0,[$$d.FIGCAPTION]:!0,[$$d.FIGURE]:!0,[$$d.FOOTER]:!0,[$$d.FORM]:!0,[$$d.FRAME]:!0,[$$d.FRAMESET]:!0,[$$d.H1]:!0,[$$d.H2]:!0,[$$d.H3]:!0,[$$d.H4]:!0,[$$d.H5]:!0,[$$d.H6]:!0,[$$d.HEAD]:!0,[$$d.HEADER]:!0,[$$d.HGROUP]:!0,[$$d.HR]:!0,[$$d.HTML]:!0,[$$d.IFRAME]:!0,[$$d.IMG]:!0,[$$d.INPUT]:!0,[$$d.LI]:!0,[$$d.LINK]:!0,[$$d.LISTING]:!0,[$$d.MAIN]:!0,[$$d.MARQUEE]:!0,[$$d.MENU]:!0,[$$d.META]:!0,[$$d.NAV]:!0,[$$d.NOEMBED]:!0,[$$d.NOFRAMES]:!0,[$$d.NOSCRIPT]:!0,[$$d.OBJECT]:!0,[$$d.OL]:!0,[$$d.P]:!0,[$$d.PARAM]:!0,[$$d.PLAINTEXT]:!0,[$$d.PRE]:!0,[$$d.SCRIPT]:!0,[$$d.SECTION]:!0,[$$d.SELECT]:!0,[$$d.SOURCE]:!0,[$$d.STYLE]:!0,[$$d.SUMMARY]:!0,[$$d.TABLE]:!0,[$$d.TBODY]:!0,[$$d.TD]:!0,[$$d.TEMPLATE]:!0,[$$d.TEXTAREA]:!0,[$$d.TFOOT]:!0,[$$d.TH]:!0,[$$d.THEAD]:!0,[$$d.TITLE]:!0,[$$d.TR]:!0,[$$d.TRACK]:!0,[$$d.UL]:!0,[$$d.WBR]:!0,[$$d.XMP]:!0},[NS$7.MATHML]:{[$$d.MI]:!0,[$$d.MO]:!0,[$$d.MN]:!0,[$$d.MS]:!0,[$$d.MTEXT]:!0,[$$d.ANNOTATION_XML]:!0},[NS$7.SVG]:{[$$d.TITLE]:!0,[$$d.FOREIGN_OBJECT]:!0,[$$d.DESC]:!0}};const HTML$7=html$7,$$c=HTML$7.TAG_NAMES,NS$6=HTML$7.NAMESPACES;function isImpliedEndTagRequired$1(et){switch(et.length){case 1:return et===$$c.P;case 2:return et===$$c.RB||et===$$c.RP||et===$$c.RT||et===$$c.DD||et===$$c.DT||et===$$c.LI;case 3:return et===$$c.RTC;case 6:return et===$$c.OPTION;case 8:return et===$$c.OPTGROUP}return!1}function isImpliedEndTagRequiredThoroughly$1(et){switch(et.length){case 1:return et===$$c.P;case 2:return et===$$c.RB||et===$$c.RP||et===$$c.RT||et===$$c.DD||et===$$c.DT||et===$$c.LI||et===$$c.TD||et===$$c.TH||et===$$c.TR;case 3:return et===$$c.RTC;case 5:return et===$$c.TBODY||et===$$c.TFOOT||et===$$c.THEAD;case 6:return et===$$c.OPTION;case 7:return et===$$c.CAPTION;case 8:return et===$$c.OPTGROUP||et===$$c.COLGROUP}return!1}function isScopingElement$1(et,tt){switch(et.length){case 2:if(et===$$c.TD||et===$$c.TH)return tt===NS$6.HTML;if(et===$$c.MI||et===$$c.MO||et===$$c.MN||et===$$c.MS)return tt===NS$6.MATHML;break;case 4:if(et===$$c.HTML)return tt===NS$6.HTML;if(et===$$c.DESC)return tt===NS$6.SVG;break;case 5:if(et===$$c.TABLE)return tt===NS$6.HTML;if(et===$$c.MTEXT)return tt===NS$6.MATHML;if(et===$$c.TITLE)return tt===NS$6.SVG;break;case 6:return(et===$$c.APPLET||et===$$c.OBJECT)&&tt===NS$6.HTML;case 7:return(et===$$c.CAPTION||et===$$c.MARQUEE)&&tt===NS$6.HTML;case 8:return et===$$c.TEMPLATE&&tt===NS$6.HTML;case 13:return et===$$c.FOREIGN_OBJECT&&tt===NS$6.SVG;case 14:return et===$$c.ANNOTATION_XML&&tt===NS$6.MATHML}return!1}class OpenElementStack$3{constructor(tt,nt){this.stackTop=-1,this.items=[],this.current=tt,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=nt}_indexOf(tt){let nt=-1;for(let rt=this.stackTop;rt>=0;rt--)if(this.items[rt]===tt){nt=rt;break}return nt}_isInTemplate(){return this.currentTagName===$$c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===NS$6.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(tt){this.items[++this.stackTop]=tt,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(tt,nt){const rt=this._indexOf(tt);this.items[rt]=nt,rt===this.stackTop&&this._updateCurrentElement()}insertAfter(tt,nt){const rt=this._indexOf(tt)+1;this.items.splice(rt,0,nt),rt===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(tt){for(;this.stackTop>-1;){const nt=this.currentTagName,rt=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),nt===tt&&rt===NS$6.HTML)break}}popUntilElementPopped(tt){for(;this.stackTop>-1;){const nt=this.current;if(this.pop(),nt===tt)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const tt=this.currentTagName,nt=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),tt===$$c.H1||tt===$$c.H2||tt===$$c.H3||tt===$$c.H4||tt===$$c.H5||tt===$$c.H6&&nt===NS$6.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const tt=this.currentTagName,nt=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),tt===$$c.TD||tt===$$c.TH&&nt===NS$6.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==$$c.TABLE&&this.currentTagName!==$$c.TEMPLATE&&this.currentTagName!==$$c.HTML||this.treeAdapter.getNamespaceURI(this.current)!==NS$6.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==$$c.TBODY&&this.currentTagName!==$$c.TFOOT&&this.currentTagName!==$$c.THEAD&&this.currentTagName!==$$c.TEMPLATE&&this.currentTagName!==$$c.HTML||this.treeAdapter.getNamespaceURI(this.current)!==NS$6.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==$$c.TR&&this.currentTagName!==$$c.TEMPLATE&&this.currentTagName!==$$c.HTML||this.treeAdapter.getNamespaceURI(this.current)!==NS$6.HTML;)this.pop()}remove(tt){for(let nt=this.stackTop;nt>=0;nt--)if(this.items[nt]===tt){this.items.splice(nt,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const tt=this.items[1];return tt&&this.treeAdapter.getTagName(tt)===$$c.BODY?tt:null}contains(tt){return this._indexOf(tt)>-1}getCommonAncestor(tt){let nt=this._indexOf(tt);return--nt>=0?this.items[nt]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===$$c.HTML}hasInScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]),ot=this.treeAdapter.getNamespaceURI(this.items[nt]);if(rt===tt&&ot===NS$6.HTML)return!0;if(isScopingElement$1(rt,ot))return!1}return!0}hasNumberedHeaderInScope(){for(let tt=this.stackTop;tt>=0;tt--){const nt=this.treeAdapter.getTagName(this.items[tt]),rt=this.treeAdapter.getNamespaceURI(this.items[tt]);if((nt===$$c.H1||nt===$$c.H2||nt===$$c.H3||nt===$$c.H4||nt===$$c.H5||nt===$$c.H6)&&rt===NS$6.HTML)return!0;if(isScopingElement$1(nt,rt))return!1}return!0}hasInListItemScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]),ot=this.treeAdapter.getNamespaceURI(this.items[nt]);if(rt===tt&&ot===NS$6.HTML)return!0;if((rt===$$c.UL||rt===$$c.OL)&&ot===NS$6.HTML||isScopingElement$1(rt,ot))return!1}return!0}hasInButtonScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]),ot=this.treeAdapter.getNamespaceURI(this.items[nt]);if(rt===tt&&ot===NS$6.HTML)return!0;if(rt===$$c.BUTTON&&ot===NS$6.HTML||isScopingElement$1(rt,ot))return!1}return!0}hasInTableScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]);if(this.treeAdapter.getNamespaceURI(this.items[nt])===NS$6.HTML){if(rt===tt)return!0;if(rt===$$c.TABLE||rt===$$c.TEMPLATE||rt===$$c.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let tt=this.stackTop;tt>=0;tt--){const nt=this.treeAdapter.getTagName(this.items[tt]);if(this.treeAdapter.getNamespaceURI(this.items[tt])===NS$6.HTML){if(nt===$$c.TBODY||nt===$$c.THEAD||nt===$$c.TFOOT)return!0;if(nt===$$c.TABLE||nt===$$c.HTML)return!1}}return!0}hasInSelectScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]);if(this.treeAdapter.getNamespaceURI(this.items[nt])===NS$6.HTML){if(rt===tt)return!0;if(rt!==$$c.OPTION&&rt!==$$c.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;isImpliedEndTagRequired$1(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;isImpliedEndTagRequiredThoroughly$1(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(tt){for(;isImpliedEndTagRequired$1(this.currentTagName)&&this.currentTagName!==tt;)this.pop()}}var openElementStack$1=OpenElementStack$3;const NOAH_ARK_CAPACITY$1=3;class FormattingElementList$3{constructor(tt){this.length=0,this.entries=[],this.treeAdapter=tt,this.bookmark=null}_getNoahArkConditionCandidates(tt){const nt=[];if(this.length>=NOAH_ARK_CAPACITY$1){const rt=this.treeAdapter.getAttrList(tt).length,ot=this.treeAdapter.getTagName(tt),st=this.treeAdapter.getNamespaceURI(tt);for(let ut=this.length-1;ut>=0;ut--){const ct=this.entries[ut];if(ct.type===FormattingElementList$3.MARKER_ENTRY)break;const ft=ct.element,pt=this.treeAdapter.getAttrList(ft);this.treeAdapter.getTagName(ft)===ot&&this.treeAdapter.getNamespaceURI(ft)===st&&pt.length===rt&&nt.push({idx:ut,attrs:pt})}}return nt.length<NOAH_ARK_CAPACITY$1?[]:nt}_ensureNoahArkCondition(tt){const nt=this._getNoahArkConditionCandidates(tt);let rt=nt.length;if(rt){const ot=this.treeAdapter.getAttrList(tt),st=ot.length,ut=Object.create(null);for(let ct=0;ct<st;ct++){const ft=ot[ct];ut[ft.name]=ft.value}for(let ct=0;ct<st;ct++)for(let ft=0;ft<rt;ft++){const pt=nt[ft].attrs[ct];if(ut[pt.name]!==pt.value&&(nt.splice(ft,1),rt--),nt.length<NOAH_ARK_CAPACITY$1)return}for(let ct=rt-1;ct>=NOAH_ARK_CAPACITY$1-1;ct--)this.entries.splice(nt[ct].idx,1),this.length--}}insertMarker(){this.entries.push({type:FormattingElementList$3.MARKER_ENTRY}),this.length++}pushElement(tt,nt){this._ensureNoahArkCondition(tt),this.entries.push({type:FormattingElementList$3.ELEMENT_ENTRY,element:tt,token:nt}),this.length++}insertElementAfterBookmark(tt,nt){let rt=this.length-1;for(;rt>=0&&this.entries[rt]!==this.bookmark;rt--);this.entries.splice(rt+1,0,{type:FormattingElementList$3.ELEMENT_ENTRY,element:tt,token:nt}),this.length++}removeEntry(tt){for(let nt=this.length-1;nt>=0;nt--)if(this.entries[nt]===tt){this.entries.splice(nt,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const tt=this.entries.pop();if(this.length--,tt.type===FormattingElementList$3.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(tt){for(let nt=this.length-1;nt>=0;nt--){const rt=this.entries[nt];if(rt.type===FormattingElementList$3.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(rt.element)===tt)return rt}return null}getElementEntry(tt){for(let nt=this.length-1;nt>=0;nt--){const rt=this.entries[nt];if(rt.type===FormattingElementList$3.ELEMENT_ENTRY&&rt.element===tt)return rt}return null}}FormattingElementList$3.MARKER_ENTRY="MARKER_ENTRY";FormattingElementList$3.ELEMENT_ENTRY="ELEMENT_ENTRY";var formattingElementList$1=FormattingElementList$3;class Mixin$j{constructor(tt){const nt={},rt=this._getOverriddenMethods(this,nt);for(const ot of Object.keys(rt))typeof rt[ot]=="function"&&(nt[ot]=tt[ot],tt[ot]=rt[ot])}_getOverriddenMethods(){throw new Error("Not implemented")}}Mixin$j.install=function(et,tt,nt){et.__mixins||(et.__mixins=[]);for(let ot=0;ot<et.__mixins.length;ot++)if(et.__mixins[ot].constructor===tt)return et.__mixins[ot];const rt=new tt(et,nt);return et.__mixins.push(rt),rt};var mixin$1=Mixin$j;const Mixin$i=mixin$1;class PositionTrackingPreprocessorMixin$5 extends Mixin$i{constructor(tt){super(tt),this.preprocessor=tt,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(tt,nt){return{advance(){const rt=this.pos+1,ot=this.html[rt];return tt.isEol&&(tt.isEol=!1,tt.line++,tt.lineStartPos=rt),(ot===`
`||ot==="\r"&&this.html[rt+1]!==`
`)&&(tt.isEol=!0),tt.col=rt-tt.lineStartPos+1,tt.offset=tt.droppedBufferSize+rt,nt.advance.call(this)},retreat(){nt.retreat.call(this),tt.isEol=!1,tt.col=this.pos-tt.lineStartPos+1},dropParsedChunk(){const rt=this.pos;nt.dropParsedChunk.call(this);const ot=rt-this.pos;tt.lineStartPos-=ot,tt.droppedBufferSize+=ot,tt.offset=tt.droppedBufferSize+this.pos}}}}var preprocessorMixin$3=PositionTrackingPreprocessorMixin$5;const Mixin$h=mixin$1,Tokenizer$8=tokenizer$3,PositionTrackingPreprocessorMixin$4=preprocessorMixin$3;class LocationInfoTokenizerMixin$5 extends Mixin$h{constructor(tt){super(tt),this.tokenizer=tt,this.posTracker=Mixin$h.install(tt.preprocessor,PositionTrackingPreprocessorMixin$4),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const tt=this.tokenizer.currentToken,nt=this.tokenizer.currentAttr;tt.location.attrs||(tt.location.attrs=Object.create(null)),tt.location.attrs[nt.name]=this.currentAttrLocation}_getOverriddenMethods(tt,nt){const rt={_createStartTagToken(){nt._createStartTagToken.call(this),this.currentToken.location=tt.ctLoc},_createEndTagToken(){nt._createEndTagToken.call(this),this.currentToken.location=tt.ctLoc},_createCommentToken(){nt._createCommentToken.call(this),this.currentToken.location=tt.ctLoc},_createDoctypeToken(ot){nt._createDoctypeToken.call(this,ot),this.currentToken.location=tt.ctLoc},_createCharacterToken(ot,st){nt._createCharacterToken.call(this,ot,st),this.currentCharacterToken.location=tt.ctLoc},_createEOFToken(){nt._createEOFToken.call(this),this.currentToken.location=tt._getCurrentLocation()},_createAttr(ot){nt._createAttr.call(this,ot),tt.currentAttrLocation=tt._getCurrentLocation()},_leaveAttrName(ot){nt._leaveAttrName.call(this,ot),tt._attachCurrentAttrLocationInfo()},_leaveAttrValue(ot){nt._leaveAttrValue.call(this,ot),tt._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const ot=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=ot.startLine,this.currentCharacterToken.location.endCol=ot.startCol,this.currentCharacterToken.location.endOffset=ot.startOffset),this.currentToken.type===Tokenizer$8.EOF_TOKEN?(ot.endLine=ot.startLine,ot.endCol=ot.startCol,ot.endOffset=ot.startOffset):(ot.endLine=tt.posTracker.line,ot.endCol=tt.posTracker.col+1,ot.endOffset=tt.posTracker.offset+1),nt._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const ot=this.currentCharacterToken&&this.currentCharacterToken.location;ot&&ot.endOffset===-1&&(ot.endLine=tt.posTracker.line,ot.endCol=tt.posTracker.col,ot.endOffset=tt.posTracker.offset),nt._emitCurrentCharacterToken.call(this)}};return Object.keys(Tokenizer$8.MODE).forEach(ot=>{const st=Tokenizer$8.MODE[ot];rt[st]=function(ut){tt.ctLoc=tt._getCurrentLocation(),nt[st].call(this,ut)}}),rt}}var tokenizerMixin$3=LocationInfoTokenizerMixin$5;const Mixin$g=mixin$1;class LocationInfoOpenElementStackMixin$3 extends Mixin$g{constructor(tt,nt){super(tt),this.onItemPop=nt.onItemPop}_getOverriddenMethods(tt,nt){return{pop(){tt.onItemPop(this.current),nt.pop.call(this)},popAllUpToHtmlElement(){for(let rt=this.stackTop;rt>0;rt--)tt.onItemPop(this.items[rt]);nt.popAllUpToHtmlElement.call(this)},remove(rt){tt.onItemPop(this.current),nt.remove.call(this,rt)}}}}var openElementStackMixin$1=LocationInfoOpenElementStackMixin$3;const Mixin$f=mixin$1,Tokenizer$7=tokenizer$3,LocationInfoTokenizerMixin$4=tokenizerMixin$3,LocationInfoOpenElementStackMixin$2=openElementStackMixin$1,HTML$6=html$7,$$b=HTML$6.TAG_NAMES;class LocationInfoParserMixin$3 extends Mixin$f{constructor(tt){super(tt),this.parser=tt,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(tt){let nt=null;this.lastStartTagToken&&(nt=Object.assign({},this.lastStartTagToken.location),nt.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(tt,nt)}_setEndLocation(tt,nt){const rt=this.treeAdapter.getNodeSourceCodeLocation(tt);if(rt&&nt.location){const ot=nt.location,st=this.treeAdapter.getTagName(tt);nt.type===Tokenizer$7.END_TAG_TOKEN&&st===nt.tagName?(rt.endTag=Object.assign({},ot),rt.endLine=ot.endLine,rt.endCol=ot.endCol,rt.endOffset=ot.endOffset):(rt.endLine=ot.startLine,rt.endCol=ot.startCol,rt.endOffset=ot.startOffset)}}_getOverriddenMethods(tt,nt){return{_bootstrap(rt,ot){nt._bootstrap.call(this,rt,ot),tt.lastStartTagToken=null,tt.lastFosterParentingLocation=null,tt.currentToken=null;const st=Mixin$f.install(this.tokenizer,LocationInfoTokenizerMixin$4);tt.posTracker=st.posTracker,Mixin$f.install(this.openElements,LocationInfoOpenElementStackMixin$2,{onItemPop:function(ut){tt._setEndLocation(ut,tt.currentToken)}})},_runParsingLoop(rt){nt._runParsingLoop.call(this,rt);for(let ot=this.openElements.stackTop;ot>=0;ot--)tt._setEndLocation(this.openElements.items[ot],tt.currentToken)},_processTokenInForeignContent(rt){tt.currentToken=rt,nt._processTokenInForeignContent.call(this,rt)},_processToken(rt){if(tt.currentToken=rt,nt._processToken.call(this,rt),rt.type===Tokenizer$7.END_TAG_TOKEN&&(rt.tagName===$$b.HTML||rt.tagName===$$b.BODY&&this.openElements.hasInScope($$b.BODY)))for(let st=this.openElements.stackTop;st>=0;st--){const ut=this.openElements.items[st];if(this.treeAdapter.getTagName(ut)===rt.tagName){tt._setEndLocation(ut,rt);break}}},_setDocumentType(rt){nt._setDocumentType.call(this,rt);const ot=this.treeAdapter.getChildNodes(this.document),st=ot.length;for(let ut=0;ut<st;ut++){const ct=ot[ut];if(this.treeAdapter.isDocumentTypeNode(ct)){this.treeAdapter.setNodeSourceCodeLocation(ct,rt.location);break}}},_attachElementToTree(rt){tt._setStartLocation(rt),tt.lastStartTagToken=null,nt._attachElementToTree.call(this,rt)},_appendElement(rt,ot){tt.lastStartTagToken=rt,nt._appendElement.call(this,rt,ot)},_insertElement(rt,ot){tt.lastStartTagToken=rt,nt._insertElement.call(this,rt,ot)},_insertTemplate(rt){tt.lastStartTagToken=rt,nt._insertTemplate.call(this,rt);const ot=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(ot,null)},_insertFakeRootElement(){nt._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(rt,ot){nt._appendCommentNode.call(this,rt,ot);const st=this.treeAdapter.getChildNodes(ot),ut=st[st.length-1];this.treeAdapter.setNodeSourceCodeLocation(ut,rt.location)},_findFosterParentingLocation(){return tt.lastFosterParentingLocation=nt._findFosterParentingLocation.call(this),tt.lastFosterParentingLocation},_insertCharacters(rt){nt._insertCharacters.call(this,rt);const ot=this._shouldFosterParentOnInsertion(),st=ot&&tt.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,ut=this.treeAdapter.getChildNodes(st),ct=ot&&tt.lastFosterParentingLocation.beforeElement?ut.indexOf(tt.lastFosterParentingLocation.beforeElement)-1:ut.length-1,ft=ut[ct],pt=this.treeAdapter.getNodeSourceCodeLocation(ft);pt?(pt.endLine=rt.location.endLine,pt.endCol=rt.location.endCol,pt.endOffset=rt.location.endOffset):this.treeAdapter.setNodeSourceCodeLocation(ft,rt.location)}}}}var parserMixin$3=LocationInfoParserMixin$3;const Mixin$e=mixin$1;class ErrorReportingMixinBase$7 extends Mixin$e{constructor(tt,nt){super(tt),this.posTracker=null,this.onParseError=nt.onParseError}_setErrorLocation(tt){tt.startLine=tt.endLine=this.posTracker.line,tt.startCol=tt.endCol=this.posTracker.col,tt.startOffset=tt.endOffset=this.posTracker.offset}_reportError(tt){const nt={code:tt,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(nt),this.onParseError(nt)}_getOverriddenMethods(tt){return{_err(nt){tt._reportError(nt)}}}}var mixinBase$1=ErrorReportingMixinBase$7;const ErrorReportingMixinBase$6=mixinBase$1,PositionTrackingPreprocessorMixin$3=preprocessorMixin$3,Mixin$d=mixin$1;class ErrorReportingPreprocessorMixin$3 extends ErrorReportingMixinBase$6{constructor(tt,nt){super(tt,nt),this.posTracker=Mixin$d.install(tt,PositionTrackingPreprocessorMixin$3),this.lastErrOffset=-1}_reportError(tt){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(tt))}}var preprocessorMixin$2=ErrorReportingPreprocessorMixin$3;const ErrorReportingMixinBase$5=mixinBase$1,ErrorReportingPreprocessorMixin$2=preprocessorMixin$2,Mixin$c=mixin$1;class ErrorReportingTokenizerMixin$3 extends ErrorReportingMixinBase$5{constructor(tt,nt){super(tt,nt);const rt=Mixin$c.install(tt.preprocessor,ErrorReportingPreprocessorMixin$2,nt);this.posTracker=rt.posTracker}}var tokenizerMixin$2=ErrorReportingTokenizerMixin$3;const ErrorReportingMixinBase$4=mixinBase$1,ErrorReportingTokenizerMixin$2=tokenizerMixin$2,LocationInfoTokenizerMixin$3=tokenizerMixin$3,Mixin$b=mixin$1;class ErrorReportingParserMixin$3 extends ErrorReportingMixinBase$4{constructor(tt,nt){super(tt,nt),this.opts=nt,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(tt){this.ctLoc&&(tt.startLine=this.ctLoc.startLine,tt.startCol=this.ctLoc.startCol,tt.startOffset=this.ctLoc.startOffset,tt.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,tt.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,tt.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(tt,nt){return{_bootstrap(rt,ot){nt._bootstrap.call(this,rt,ot),Mixin$b.install(this.tokenizer,ErrorReportingTokenizerMixin$2,tt.opts),Mixin$b.install(this.tokenizer,LocationInfoTokenizerMixin$3)},_processInputToken(rt){tt.ctLoc=rt.location,nt._processInputToken.call(this,rt)},_err(rt,ot){tt.locBeforeToken=ot&&ot.beforeToken,tt._reportError(rt)}}}}var parserMixin$2=ErrorReportingParserMixin$3,_default$b={};const{DOCUMENT_MODE:DOCUMENT_MODE$3}=html$7;_default$b.createDocument=function(){return{nodeName:"#document",mode:DOCUMENT_MODE$3.NO_QUIRKS,childNodes:[]}};_default$b.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};_default$b.createElement=function(et,tt,nt){return{nodeName:et,tagName:et,attrs:nt,namespaceURI:tt,childNodes:[],parentNode:null}};_default$b.createCommentNode=function(et){return{nodeName:"#comment",data:et,parentNode:null}};const createTextNode$1=function(et){return{nodeName:"#text",value:et,parentNode:null}},appendChild$1=_default$b.appendChild=function(et,tt){et.childNodes.push(tt),tt.parentNode=et},insertBefore$1=_default$b.insertBefore=function(et,tt,nt){const rt=et.childNodes.indexOf(nt);et.childNodes.splice(rt,0,tt),tt.parentNode=et};_default$b.setTemplateContent=function(et,tt){et.content=tt};_default$b.getTemplateContent=function(et){return et.content};_default$b.setDocumentType=function(et,tt,nt,rt){let ot=null;for(let st=0;st<et.childNodes.length;st++)if(et.childNodes[st].nodeName==="#documentType"){ot=et.childNodes[st];break}ot?(ot.name=tt,ot.publicId=nt,ot.systemId=rt):appendChild$1(et,{nodeName:"#documentType",name:tt,publicId:nt,systemId:rt})};_default$b.setDocumentMode=function(et,tt){et.mode=tt};_default$b.getDocumentMode=function(et){return et.mode};_default$b.detachNode=function(et){if(et.parentNode){const tt=et.parentNode.childNodes.indexOf(et);et.parentNode.childNodes.splice(tt,1),et.parentNode=null}};_default$b.insertText=function(et,tt){if(et.childNodes.length){const nt=et.childNodes[et.childNodes.length-1];if(nt.nodeName==="#text"){nt.value+=tt;return}}appendChild$1(et,createTextNode$1(tt))};_default$b.insertTextBefore=function(et,tt,nt){const rt=et.childNodes[et.childNodes.indexOf(nt)-1];rt&&rt.nodeName==="#text"?rt.value+=tt:insertBefore$1(et,createTextNode$1(tt),nt)};_default$b.adoptAttributes=function(et,tt){const nt=[];for(let rt=0;rt<et.attrs.length;rt++)nt.push(et.attrs[rt].name);for(let rt=0;rt<tt.length;rt++)nt.indexOf(tt[rt].name)===-1&&et.attrs.push(tt[rt])};_default$b.getFirstChild=function(et){return et.childNodes[0]};_default$b.getChildNodes=function(et){return et.childNodes};_default$b.getParentNode=function(et){return et.parentNode};_default$b.getAttrList=function(et){return et.attrs};_default$b.getTagName=function(et){return et.tagName};_default$b.getNamespaceURI=function(et){return et.namespaceURI};_default$b.getTextNodeContent=function(et){return et.value};_default$b.getCommentNodeContent=function(et){return et.data};_default$b.getDocumentTypeNodeName=function(et){return et.name};_default$b.getDocumentTypeNodePublicId=function(et){return et.publicId};_default$b.getDocumentTypeNodeSystemId=function(et){return et.systemId};_default$b.isTextNode=function(et){return et.nodeName==="#text"};_default$b.isCommentNode=function(et){return et.nodeName==="#comment"};_default$b.isDocumentTypeNode=function(et){return et.nodeName==="#documentType"};_default$b.isElementNode=function(et){return!!et.tagName};_default$b.setNodeSourceCodeLocation=function(et,tt){et.sourceCodeLocation=tt};_default$b.getNodeSourceCodeLocation=function(et){return et.sourceCodeLocation};var mergeOptions$4=function et(tt,nt){return nt=nt||Object.create(null),[tt,nt].reduce((rt,ot)=>(Object.keys(ot).forEach(st=>{rt[st]=ot[st]}),rt),Object.create(null))},doctype$5={};const{DOCUMENT_MODE:DOCUMENT_MODE$2}=html$7,VALID_DOCTYPE_NAME$1="html",VALID_SYSTEM_ID$1="about:legacy-compat",QUIRKS_MODE_SYSTEM_ID$1="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",QUIRKS_MODE_PUBLIC_ID_PREFIXES$1=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES$1=QUIRKS_MODE_PUBLIC_ID_PREFIXES$1.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),QUIRKS_MODE_PUBLIC_IDS$1=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],LIMITED_QUIRKS_PUBLIC_ID_PREFIXES$1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES$1=LIMITED_QUIRKS_PUBLIC_ID_PREFIXES$1.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function enquoteDoctypeId$1(et){const tt=et.indexOf('"')!==-1?"'":'"';return tt+et+tt}function hasPrefix$1(et,tt){for(let nt=0;nt<tt.length;nt++)if(et.indexOf(tt[nt])===0)return!0;return!1}doctype$5.isConforming=function(et){return et.name===VALID_DOCTYPE_NAME$1&&et.publicId===null&&(et.systemId===null||et.systemId===VALID_SYSTEM_ID$1)};doctype$5.getDocumentMode=function(et){if(et.name!==VALID_DOCTYPE_NAME$1)return DOCUMENT_MODE$2.QUIRKS;const tt=et.systemId;if(tt&&tt.toLowerCase()===QUIRKS_MODE_SYSTEM_ID$1)return DOCUMENT_MODE$2.QUIRKS;let nt=et.publicId;if(nt!==null){if(nt=nt.toLowerCase(),QUIRKS_MODE_PUBLIC_IDS$1.indexOf(nt)>-1)return DOCUMENT_MODE$2.QUIRKS;let rt=tt===null?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES$1:QUIRKS_MODE_PUBLIC_ID_PREFIXES$1;if(hasPrefix$1(nt,rt))return DOCUMENT_MODE$2.QUIRKS;if(rt=tt===null?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES$1:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES$1,hasPrefix$1(nt,rt))return DOCUMENT_MODE$2.LIMITED_QUIRKS}return DOCUMENT_MODE$2.NO_QUIRKS};doctype$5.serializeContent=function(et,tt,nt){let rt="!DOCTYPE ";return et&&(rt+=et),tt?rt+=" PUBLIC "+enquoteDoctypeId$1(tt):nt&&(rt+=" SYSTEM"),nt!==null&&(rt+=" "+enquoteDoctypeId$1(nt)),rt};var foreignContent$3={};const Tokenizer$6=tokenizer$3,HTML$5=html$7,$$a=HTML$5.TAG_NAMES,NS$5=HTML$5.NAMESPACES,ATTRS$3=HTML$5.ATTRS,MIME_TYPES$1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},DEFINITION_URL_ATTR$1="definitionurl",ADJUSTED_DEFINITION_URL_ATTR$1="definitionURL",SVG_ATTRS_ADJUSTMENT_MAP$1={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},XML_ATTRS_ADJUSTMENT_MAP$1={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:NS$5.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:NS$5.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:NS$5.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:NS$5.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:NS$5.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:NS$5.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:NS$5.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:NS$5.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:NS$5.XML},"xml:space":{prefix:"xml",name:"space",namespace:NS$5.XML},xmlns:{prefix:"",name:"xmlns",namespace:NS$5.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:NS$5.XMLNS}},SVG_TAG_NAMES_ADJUSTMENT_MAP$1=foreignContent$3.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},EXITS_FOREIGN_CONTENT$1={[$$a.B]:!0,[$$a.BIG]:!0,[$$a.BLOCKQUOTE]:!0,[$$a.BODY]:!0,[$$a.BR]:!0,[$$a.CENTER]:!0,[$$a.CODE]:!0,[$$a.DD]:!0,[$$a.DIV]:!0,[$$a.DL]:!0,[$$a.DT]:!0,[$$a.EM]:!0,[$$a.EMBED]:!0,[$$a.H1]:!0,[$$a.H2]:!0,[$$a.H3]:!0,[$$a.H4]:!0,[$$a.H5]:!0,[$$a.H6]:!0,[$$a.HEAD]:!0,[$$a.HR]:!0,[$$a.I]:!0,[$$a.IMG]:!0,[$$a.LI]:!0,[$$a.LISTING]:!0,[$$a.MENU]:!0,[$$a.META]:!0,[$$a.NOBR]:!0,[$$a.OL]:!0,[$$a.P]:!0,[$$a.PRE]:!0,[$$a.RUBY]:!0,[$$a.S]:!0,[$$a.SMALL]:!0,[$$a.SPAN]:!0,[$$a.STRONG]:!0,[$$a.STRIKE]:!0,[$$a.SUB]:!0,[$$a.SUP]:!0,[$$a.TABLE]:!0,[$$a.TT]:!0,[$$a.U]:!0,[$$a.UL]:!0,[$$a.VAR]:!0};foreignContent$3.causesExit=function(et){const tt=et.tagName;return tt===$$a.FONT&&(Tokenizer$6.getTokenAttr(et,ATTRS$3.COLOR)!==null||Tokenizer$6.getTokenAttr(et,ATTRS$3.SIZE)!==null||Tokenizer$6.getTokenAttr(et,ATTRS$3.FACE)!==null)?!0:EXITS_FOREIGN_CONTENT$1[tt]};foreignContent$3.adjustTokenMathMLAttrs=function(et){for(let tt=0;tt<et.attrs.length;tt++)if(et.attrs[tt].name===DEFINITION_URL_ATTR$1){et.attrs[tt].name=ADJUSTED_DEFINITION_URL_ATTR$1;break}};foreignContent$3.adjustTokenSVGAttrs=function(et){for(let tt=0;tt<et.attrs.length;tt++){const nt=SVG_ATTRS_ADJUSTMENT_MAP$1[et.attrs[tt].name];nt&&(et.attrs[tt].name=nt)}};foreignContent$3.adjustTokenXMLAttrs=function(et){for(let tt=0;tt<et.attrs.length;tt++){const nt=XML_ATTRS_ADJUSTMENT_MAP$1[et.attrs[tt].name];nt&&(et.attrs[tt].prefix=nt.prefix,et.attrs[tt].name=nt.name,et.attrs[tt].namespace=nt.namespace)}};foreignContent$3.adjustTokenSVGTagName=function(et){const tt=SVG_TAG_NAMES_ADJUSTMENT_MAP$1[et.tagName];tt&&(et.tagName=tt)};function isMathMLTextIntegrationPoint$1(et,tt){return tt===NS$5.MATHML&&(et===$$a.MI||et===$$a.MO||et===$$a.MN||et===$$a.MS||et===$$a.MTEXT)}function isHtmlIntegrationPoint$1(et,tt,nt){if(tt===NS$5.MATHML&&et===$$a.ANNOTATION_XML){for(let rt=0;rt<nt.length;rt++)if(nt[rt].name===ATTRS$3.ENCODING){const ot=nt[rt].value.toLowerCase();return ot===MIME_TYPES$1.TEXT_HTML||ot===MIME_TYPES$1.APPLICATION_XML}}return tt===NS$5.SVG&&(et===$$a.FOREIGN_OBJECT||et===$$a.DESC||et===$$a.TITLE)}foreignContent$3.isIntegrationPoint=function(et,tt,nt,rt){return!!((!rt||rt===NS$5.HTML)&&isHtmlIntegrationPoint$1(et,tt,nt)||(!rt||rt===NS$5.MATHML)&&isMathMLTextIntegrationPoint$1(et,tt))};const Tokenizer$5=tokenizer$3,OpenElementStack$2=openElementStack$1,FormattingElementList$2=formattingElementList$1,LocationInfoParserMixin$2=parserMixin$3,ErrorReportingParserMixin$2=parserMixin$2,Mixin$a=mixin$1,defaultTreeAdapter$1=_default$b,mergeOptions$3=mergeOptions$4,doctype$4=doctype$5,foreignContent$2=foreignContent$3,ERR$3=errorCodes$1,unicode$4=unicode$7,HTML$4=html$7,$$9=HTML$4.TAG_NAMES,NS$4=HTML$4.NAMESPACES,ATTRS$2=HTML$4.ATTRS,DEFAULT_OPTIONS$2={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:defaultTreeAdapter$1},HIDDEN_INPUT_TYPE$1="hidden",AA_OUTER_LOOP_ITER$1=8,AA_INNER_LOOP_ITER$1=3,INITIAL_MODE$1="INITIAL_MODE",BEFORE_HTML_MODE$1="BEFORE_HTML_MODE",BEFORE_HEAD_MODE$1="BEFORE_HEAD_MODE",IN_HEAD_MODE$1="IN_HEAD_MODE",IN_HEAD_NO_SCRIPT_MODE$1="IN_HEAD_NO_SCRIPT_MODE",AFTER_HEAD_MODE$1="AFTER_HEAD_MODE",IN_BODY_MODE$1="IN_BODY_MODE",TEXT_MODE$1="TEXT_MODE",IN_TABLE_MODE$1="IN_TABLE_MODE",IN_TABLE_TEXT_MODE$1="IN_TABLE_TEXT_MODE",IN_CAPTION_MODE$1="IN_CAPTION_MODE",IN_COLUMN_GROUP_MODE$1="IN_COLUMN_GROUP_MODE",IN_TABLE_BODY_MODE$1="IN_TABLE_BODY_MODE",IN_ROW_MODE$1="IN_ROW_MODE",IN_CELL_MODE$1="IN_CELL_MODE",IN_SELECT_MODE$1="IN_SELECT_MODE",IN_SELECT_IN_TABLE_MODE$1="IN_SELECT_IN_TABLE_MODE",IN_TEMPLATE_MODE$1="IN_TEMPLATE_MODE",AFTER_BODY_MODE$1="AFTER_BODY_MODE",IN_FRAMESET_MODE$1="IN_FRAMESET_MODE",AFTER_FRAMESET_MODE$1="AFTER_FRAMESET_MODE",AFTER_AFTER_BODY_MODE$1="AFTER_AFTER_BODY_MODE",AFTER_AFTER_FRAMESET_MODE$1="AFTER_AFTER_FRAMESET_MODE",INSERTION_MODE_RESET_MAP$1={[$$9.TR]:IN_ROW_MODE$1,[$$9.TBODY]:IN_TABLE_BODY_MODE$1,[$$9.THEAD]:IN_TABLE_BODY_MODE$1,[$$9.TFOOT]:IN_TABLE_BODY_MODE$1,[$$9.CAPTION]:IN_CAPTION_MODE$1,[$$9.COLGROUP]:IN_COLUMN_GROUP_MODE$1,[$$9.TABLE]:IN_TABLE_MODE$1,[$$9.BODY]:IN_BODY_MODE$1,[$$9.FRAMESET]:IN_FRAMESET_MODE$1},TEMPLATE_INSERTION_MODE_SWITCH_MAP$1={[$$9.CAPTION]:IN_TABLE_MODE$1,[$$9.COLGROUP]:IN_TABLE_MODE$1,[$$9.TBODY]:IN_TABLE_MODE$1,[$$9.TFOOT]:IN_TABLE_MODE$1,[$$9.THEAD]:IN_TABLE_MODE$1,[$$9.COL]:IN_COLUMN_GROUP_MODE$1,[$$9.TR]:IN_TABLE_BODY_MODE$1,[$$9.TD]:IN_ROW_MODE$1,[$$9.TH]:IN_ROW_MODE$1},TOKEN_HANDLERS$1={[INITIAL_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenInInitialMode$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenInInitialMode$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:doctypeInInitialMode$1,[Tokenizer$5.START_TAG_TOKEN]:tokenInInitialMode$1,[Tokenizer$5.END_TAG_TOKEN]:tokenInInitialMode$1,[Tokenizer$5.EOF_TOKEN]:tokenInInitialMode$1},[BEFORE_HTML_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenBeforeHtml$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenBeforeHtml$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagBeforeHtml$1,[Tokenizer$5.END_TAG_TOKEN]:endTagBeforeHtml$1,[Tokenizer$5.EOF_TOKEN]:tokenBeforeHtml$1},[BEFORE_HEAD_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenBeforeHead$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenBeforeHead$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:misplacedDoctype$2,[Tokenizer$5.START_TAG_TOKEN]:startTagBeforeHead$1,[Tokenizer$5.END_TAG_TOKEN]:endTagBeforeHead$1,[Tokenizer$5.EOF_TOKEN]:tokenBeforeHead$1},[IN_HEAD_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenInHead$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenInHead$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:misplacedDoctype$2,[Tokenizer$5.START_TAG_TOKEN]:startTagInHead$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInHead$1,[Tokenizer$5.EOF_TOKEN]:tokenInHead$1},[IN_HEAD_NO_SCRIPT_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenInHeadNoScript$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenInHeadNoScript$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:misplacedDoctype$2,[Tokenizer$5.START_TAG_TOKEN]:startTagInHeadNoScript$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInHeadNoScript$1,[Tokenizer$5.EOF_TOKEN]:tokenInHeadNoScript$1},[AFTER_HEAD_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenAfterHead$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenAfterHead$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:misplacedDoctype$2,[Tokenizer$5.START_TAG_TOKEN]:startTagAfterHead$1,[Tokenizer$5.END_TAG_TOKEN]:endTagAfterHead$1,[Tokenizer$5.EOF_TOKEN]:tokenAfterHead$1},[IN_BODY_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInBody$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInBody$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInBody$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[TEXT_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:ignoreToken$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:ignoreToken$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInText$1,[Tokenizer$5.EOF_TOKEN]:eofInText$1},[IN_TABLE_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInTable$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInTable$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_TABLE_TEXT_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInTableText$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInTableText$1,[Tokenizer$5.COMMENT_TOKEN]:tokenInTableText$1,[Tokenizer$5.DOCTYPE_TOKEN]:tokenInTableText$1,[Tokenizer$5.START_TAG_TOKEN]:tokenInTableText$1,[Tokenizer$5.END_TAG_TOKEN]:tokenInTableText$1,[Tokenizer$5.EOF_TOKEN]:tokenInTableText$1},[IN_CAPTION_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInBody$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInCaption$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInCaption$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_COLUMN_GROUP_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenInColumnGroup$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenInColumnGroup$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInColumnGroup$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInColumnGroup$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_TABLE_BODY_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInTableBody$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInTableBody$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_ROW_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:characterInTable$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInRow$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInRow$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_CELL_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInBody$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInCell$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInCell$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_SELECT_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInSelect$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInSelect$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_SELECT_IN_TABLE_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInSelectInTable$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInSelectInTable$1,[Tokenizer$5.EOF_TOKEN]:eofInBody$1},[IN_TEMPLATE_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:characterInBody$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInTemplate$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInTemplate$1,[Tokenizer$5.EOF_TOKEN]:eofInTemplate$1},[AFTER_BODY_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenAfterBody$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenAfterBody$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody$1,[Tokenizer$5.COMMENT_TOKEN]:appendCommentToRootHtmlElement$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagAfterBody$1,[Tokenizer$5.END_TAG_TOKEN]:endTagAfterBody$1,[Tokenizer$5.EOF_TOKEN]:stopParsing$1},[IN_FRAMESET_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagInFrameset$1,[Tokenizer$5.END_TAG_TOKEN]:endTagInFrameset$1,[Tokenizer$5.EOF_TOKEN]:stopParsing$1},[AFTER_FRAMESET_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:insertCharacters$1,[Tokenizer$5.COMMENT_TOKEN]:appendComment$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagAfterFrameset$1,[Tokenizer$5.END_TAG_TOKEN]:endTagAfterFrameset$1,[Tokenizer$5.EOF_TOKEN]:stopParsing$1},[AFTER_AFTER_BODY_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:tokenAfterAfterBody$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:tokenAfterAfterBody$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody$1,[Tokenizer$5.COMMENT_TOKEN]:appendCommentToDocument$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagAfterAfterBody$1,[Tokenizer$5.END_TAG_TOKEN]:tokenAfterAfterBody$1,[Tokenizer$5.EOF_TOKEN]:stopParsing$1},[AFTER_AFTER_FRAMESET_MODE$1]:{[Tokenizer$5.CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.NULL_CHARACTER_TOKEN]:ignoreToken$1,[Tokenizer$5.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody$1,[Tokenizer$5.COMMENT_TOKEN]:appendCommentToDocument$1,[Tokenizer$5.DOCTYPE_TOKEN]:ignoreToken$1,[Tokenizer$5.START_TAG_TOKEN]:startTagAfterAfterFrameset$1,[Tokenizer$5.END_TAG_TOKEN]:ignoreToken$1,[Tokenizer$5.EOF_TOKEN]:stopParsing$1}};class Parser$3{constructor(tt){this.options=mergeOptions$3(DEFAULT_OPTIONS$2,tt),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&Mixin$a.install(this,LocationInfoParserMixin$2),this.options.onParseError&&Mixin$a.install(this,ErrorReportingParserMixin$2,{onParseError:this.options.onParseError})}parse(tt){const nt=this.treeAdapter.createDocument();return this._bootstrap(nt,null),this.tokenizer.write(tt,!0),this._runParsingLoop(null),nt}parseFragment(tt,nt){nt||(nt=this.treeAdapter.createElement($$9.TEMPLATE,NS$4.HTML,[]));const rt=this.treeAdapter.createElement("documentmock",NS$4.HTML,[]);this._bootstrap(rt,nt),this.treeAdapter.getTagName(nt)===$$9.TEMPLATE&&this._pushTmplInsertionMode(IN_TEMPLATE_MODE$1),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(tt,!0),this._runParsingLoop(null);const ot=this.treeAdapter.getFirstChild(rt),st=this.treeAdapter.createDocumentFragment();return this._adoptNodes(ot,st),st}_bootstrap(tt,nt){this.tokenizer=new Tokenizer$5(this.options),this.stopped=!1,this.insertionMode=INITIAL_MODE$1,this.originalInsertionMode="",this.document=tt,this.fragmentContext=nt,this.headElement=null,this.formElement=null,this.openElements=new OpenElementStack$2(this.document,this.treeAdapter),this.activeFormattingElements=new FormattingElementList$2(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(tt){for(;!this.stopped;){this._setupTokenizerCDATAMode();const nt=this.tokenizer.getNextToken();if(nt.type===Tokenizer$5.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,nt.type===Tokenizer$5.WHITESPACE_CHARACTER_TOKEN&&nt.chars[0]===`
`)){if(nt.chars.length===1)continue;nt.chars=nt.chars.substr(1)}if(this._processInputToken(nt),tt&&this.pendingScript)break}}runParsingLoopForCurrentChunk(tt,nt){if(this._runParsingLoop(nt),nt&&this.pendingScript){const rt=this.pendingScript;this.pendingScript=null,nt(rt);return}tt&&tt()}_setupTokenizerCDATAMode(){const tt=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=tt&&tt!==this.document&&this.treeAdapter.getNamespaceURI(tt)!==NS$4.HTML&&!this._isIntegrationPoint(tt)}_switchToTextParsing(tt,nt){this._insertElement(tt,NS$4.HTML),this.tokenizer.state=nt,this.originalInsertionMode=this.insertionMode,this.insertionMode=TEXT_MODE$1}switchToPlaintextParsing(){this.insertionMode=TEXT_MODE$1,this.originalInsertionMode=IN_BODY_MODE$1,this.tokenizer.state=Tokenizer$5.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let tt=this.fragmentContext;do{if(this.treeAdapter.getTagName(tt)===$$9.FORM){this.formElement=tt;break}tt=this.treeAdapter.getParentNode(tt)}while(tt)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===NS$4.HTML){const tt=this.treeAdapter.getTagName(this.fragmentContext);tt===$$9.TITLE||tt===$$9.TEXTAREA?this.tokenizer.state=Tokenizer$5.MODE.RCDATA:tt===$$9.STYLE||tt===$$9.XMP||tt===$$9.IFRAME||tt===$$9.NOEMBED||tt===$$9.NOFRAMES||tt===$$9.NOSCRIPT?this.tokenizer.state=Tokenizer$5.MODE.RAWTEXT:tt===$$9.SCRIPT?this.tokenizer.state=Tokenizer$5.MODE.SCRIPT_DATA:tt===$$9.PLAINTEXT&&(this.tokenizer.state=Tokenizer$5.MODE.PLAINTEXT)}}_setDocumentType(tt){const nt=tt.name||"",rt=tt.publicId||"",ot=tt.systemId||"";this.treeAdapter.setDocumentType(this.document,nt,rt,ot)}_attachElementToTree(tt){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(tt);else{const nt=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(nt,tt)}}_appendElement(tt,nt){const rt=this.treeAdapter.createElement(tt.tagName,nt,tt.attrs);this._attachElementToTree(rt)}_insertElement(tt,nt){const rt=this.treeAdapter.createElement(tt.tagName,nt,tt.attrs);this._attachElementToTree(rt),this.openElements.push(rt)}_insertFakeElement(tt){const nt=this.treeAdapter.createElement(tt,NS$4.HTML,[]);this._attachElementToTree(nt),this.openElements.push(nt)}_insertTemplate(tt){const nt=this.treeAdapter.createElement(tt.tagName,NS$4.HTML,tt.attrs),rt=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(nt,rt),this._attachElementToTree(nt),this.openElements.push(nt)}_insertFakeRootElement(){const tt=this.treeAdapter.createElement($$9.HTML,NS$4.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,tt),this.openElements.push(tt)}_appendCommentNode(tt,nt){const rt=this.treeAdapter.createCommentNode(tt.data);this.treeAdapter.appendChild(nt,rt)}_insertCharacters(tt){if(this._shouldFosterParentOnInsertion())this._fosterParentText(tt.chars);else{const nt=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(nt,tt.chars)}}_adoptNodes(tt,nt){for(let rt=this.treeAdapter.getFirstChild(tt);rt;rt=this.treeAdapter.getFirstChild(tt))this.treeAdapter.detachNode(rt),this.treeAdapter.appendChild(nt,rt)}_shouldProcessTokenInForeignContent(tt){const nt=this._getAdjustedCurrentElement();if(!nt||nt===this.document)return!1;const rt=this.treeAdapter.getNamespaceURI(nt);if(rt===NS$4.HTML||this.treeAdapter.getTagName(nt)===$$9.ANNOTATION_XML&&rt===NS$4.MATHML&&tt.type===Tokenizer$5.START_TAG_TOKEN&&tt.tagName===$$9.SVG)return!1;const ot=tt.type===Tokenizer$5.CHARACTER_TOKEN||tt.type===Tokenizer$5.NULL_CHARACTER_TOKEN||tt.type===Tokenizer$5.WHITESPACE_CHARACTER_TOKEN;return(tt.type===Tokenizer$5.START_TAG_TOKEN&&tt.tagName!==$$9.MGLYPH&&tt.tagName!==$$9.MALIGNMARK||ot)&&this._isIntegrationPoint(nt,NS$4.MATHML)||(tt.type===Tokenizer$5.START_TAG_TOKEN||ot)&&this._isIntegrationPoint(nt,NS$4.HTML)?!1:tt.type!==Tokenizer$5.EOF_TOKEN}_processToken(tt){TOKEN_HANDLERS$1[this.insertionMode][tt.type](this,tt)}_processTokenInBodyMode(tt){TOKEN_HANDLERS$1[IN_BODY_MODE$1][tt.type](this,tt)}_processTokenInForeignContent(tt){tt.type===Tokenizer$5.CHARACTER_TOKEN?characterInForeignContent$1(this,tt):tt.type===Tokenizer$5.NULL_CHARACTER_TOKEN?nullCharacterInForeignContent$1(this,tt):tt.type===Tokenizer$5.WHITESPACE_CHARACTER_TOKEN?insertCharacters$1(this,tt):tt.type===Tokenizer$5.COMMENT_TOKEN?appendComment$1(this,tt):tt.type===Tokenizer$5.START_TAG_TOKEN?startTagInForeignContent$1(this,tt):tt.type===Tokenizer$5.END_TAG_TOKEN&&endTagInForeignContent$1(this,tt)}_processInputToken(tt){this._shouldProcessTokenInForeignContent(tt)?this._processTokenInForeignContent(tt):this._processToken(tt),tt.type===Tokenizer$5.START_TAG_TOKEN&&tt.selfClosing&&!tt.ackSelfClosing&&this._err(ERR$3.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(tt,nt){const rt=this.treeAdapter.getTagName(tt),ot=this.treeAdapter.getNamespaceURI(tt),st=this.treeAdapter.getAttrList(tt);return foreignContent$2.isIntegrationPoint(rt,ot,st,nt)}_reconstructActiveFormattingElements(){const tt=this.activeFormattingElements.length;if(tt){let nt=tt,rt=null;do if(nt--,rt=this.activeFormattingElements.entries[nt],rt.type===FormattingElementList$2.MARKER_ENTRY||this.openElements.contains(rt.element)){nt++;break}while(nt>0);for(let ot=nt;ot<tt;ot++)rt=this.activeFormattingElements.entries[ot],this._insertElement(rt.token,this.treeAdapter.getNamespaceURI(rt.element)),rt.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=IN_ROW_MODE$1}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion($$9.P),this.openElements.popUntilTagNamePopped($$9.P)}_resetInsertionMode(){for(let tt=this.openElements.stackTop,nt=!1;tt>=0;tt--){let rt=this.openElements.items[tt];tt===0&&(nt=!0,this.fragmentContext&&(rt=this.fragmentContext));const ot=this.treeAdapter.getTagName(rt),st=INSERTION_MODE_RESET_MAP$1[ot];if(st){this.insertionMode=st;break}else if(!nt&&(ot===$$9.TD||ot===$$9.TH)){this.insertionMode=IN_CELL_MODE$1;break}else if(!nt&&ot===$$9.HEAD){this.insertionMode=IN_HEAD_MODE$1;break}else if(ot===$$9.SELECT){this._resetInsertionModeForSelect(tt);break}else if(ot===$$9.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(ot===$$9.HTML){this.insertionMode=this.headElement?AFTER_HEAD_MODE$1:BEFORE_HEAD_MODE$1;break}else if(nt){this.insertionMode=IN_BODY_MODE$1;break}}}_resetInsertionModeForSelect(tt){if(tt>0)for(let nt=tt-1;nt>0;nt--){const rt=this.openElements.items[nt],ot=this.treeAdapter.getTagName(rt);if(ot===$$9.TEMPLATE)break;if(ot===$$9.TABLE){this.insertionMode=IN_SELECT_IN_TABLE_MODE$1;return}}this.insertionMode=IN_SELECT_MODE$1}_pushTmplInsertionMode(tt){this.tmplInsertionModeStack.push(tt),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=tt}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(tt){const nt=this.treeAdapter.getTagName(tt);return nt===$$9.TABLE||nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD||nt===$$9.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const tt={parent:null,beforeElement:null};for(let nt=this.openElements.stackTop;nt>=0;nt--){const rt=this.openElements.items[nt],ot=this.treeAdapter.getTagName(rt),st=this.treeAdapter.getNamespaceURI(rt);if(ot===$$9.TEMPLATE&&st===NS$4.HTML){tt.parent=this.treeAdapter.getTemplateContent(rt);break}else if(ot===$$9.TABLE){tt.parent=this.treeAdapter.getParentNode(rt),tt.parent?tt.beforeElement=rt:tt.parent=this.openElements.items[nt-1];break}}return tt.parent||(tt.parent=this.openElements.items[0]),tt}_fosterParentElement(tt){const nt=this._findFosterParentingLocation();nt.beforeElement?this.treeAdapter.insertBefore(nt.parent,tt,nt.beforeElement):this.treeAdapter.appendChild(nt.parent,tt)}_fosterParentText(tt){const nt=this._findFosterParentingLocation();nt.beforeElement?this.treeAdapter.insertTextBefore(nt.parent,tt,nt.beforeElement):this.treeAdapter.insertText(nt.parent,tt)}_isSpecialElement(tt){const nt=this.treeAdapter.getTagName(tt),rt=this.treeAdapter.getNamespaceURI(tt);return HTML$4.SPECIAL_ELEMENTS[rt][nt]}}var parser$5=Parser$3;function aaObtainFormattingElementEntry$1(et,tt){let nt=et.activeFormattingElements.getElementEntryInScopeWithTagName(tt.tagName);return nt?et.openElements.contains(nt.element)?et.openElements.hasInScope(tt.tagName)||(nt=null):(et.activeFormattingElements.removeEntry(nt),nt=null):genericEndTagInBody$1(et,tt),nt}function aaObtainFurthestBlock$1(et,tt){let nt=null;for(let rt=et.openElements.stackTop;rt>=0;rt--){const ot=et.openElements.items[rt];if(ot===tt.element)break;et._isSpecialElement(ot)&&(nt=ot)}return nt||(et.openElements.popUntilElementPopped(tt.element),et.activeFormattingElements.removeEntry(tt)),nt}function aaInnerLoop$1(et,tt,nt){let rt=tt,ot=et.openElements.getCommonAncestor(tt);for(let st=0,ut=ot;ut!==nt;st++,ut=ot){ot=et.openElements.getCommonAncestor(ut);const ct=et.activeFormattingElements.getElementEntry(ut),ft=ct&&st>=AA_INNER_LOOP_ITER$1;!ct||ft?(ft&&et.activeFormattingElements.removeEntry(ct),et.openElements.remove(ut)):(ut=aaRecreateElementFromEntry$1(et,ct),rt===tt&&(et.activeFormattingElements.bookmark=ct),et.treeAdapter.detachNode(rt),et.treeAdapter.appendChild(ut,rt),rt=ut)}return rt}function aaRecreateElementFromEntry$1(et,tt){const nt=et.treeAdapter.getNamespaceURI(tt.element),rt=et.treeAdapter.createElement(tt.token.tagName,nt,tt.token.attrs);return et.openElements.replace(tt.element,rt),tt.element=rt,rt}function aaInsertLastNodeInCommonAncestor$1(et,tt,nt){if(et._isElementCausesFosterParenting(tt))et._fosterParentElement(nt);else{const rt=et.treeAdapter.getTagName(tt),ot=et.treeAdapter.getNamespaceURI(tt);rt===$$9.TEMPLATE&&ot===NS$4.HTML&&(tt=et.treeAdapter.getTemplateContent(tt)),et.treeAdapter.appendChild(tt,nt)}}function aaReplaceFormattingElement$1(et,tt,nt){const rt=et.treeAdapter.getNamespaceURI(nt.element),ot=nt.token,st=et.treeAdapter.createElement(ot.tagName,rt,ot.attrs);et._adoptNodes(tt,st),et.treeAdapter.appendChild(tt,st),et.activeFormattingElements.insertElementAfterBookmark(st,nt.token),et.activeFormattingElements.removeEntry(nt),et.openElements.remove(nt.element),et.openElements.insertAfter(tt,st)}function callAdoptionAgency$1(et,tt){let nt;for(let rt=0;rt<AA_OUTER_LOOP_ITER$1&&(nt=aaObtainFormattingElementEntry$1(et,tt),!!nt);rt++){const ot=aaObtainFurthestBlock$1(et,nt);if(!ot)break;et.activeFormattingElements.bookmark=nt;const st=aaInnerLoop$1(et,ot,nt.element),ut=et.openElements.getCommonAncestor(nt.element);et.treeAdapter.detachNode(st),aaInsertLastNodeInCommonAncestor$1(et,ut,st),aaReplaceFormattingElement$1(et,ot,nt)}}function ignoreToken$1(){}function misplacedDoctype$2(et){et._err(ERR$3.misplacedDoctype)}function appendComment$1(et,tt){et._appendCommentNode(tt,et.openElements.currentTmplContent||et.openElements.current)}function appendCommentToRootHtmlElement$1(et,tt){et._appendCommentNode(tt,et.openElements.items[0])}function appendCommentToDocument$1(et,tt){et._appendCommentNode(tt,et.document)}function insertCharacters$1(et,tt){et._insertCharacters(tt)}function stopParsing$1(et){et.stopped=!0}function doctypeInInitialMode$1(et,tt){et._setDocumentType(tt);const nt=tt.forceQuirks?HTML$4.DOCUMENT_MODE.QUIRKS:doctype$4.getDocumentMode(tt);doctype$4.isConforming(tt)||et._err(ERR$3.nonConformingDoctype),et.treeAdapter.setDocumentMode(et.document,nt),et.insertionMode=BEFORE_HTML_MODE$1}function tokenInInitialMode$1(et,tt){et._err(ERR$3.missingDoctype,{beforeToken:!0}),et.treeAdapter.setDocumentMode(et.document,HTML$4.DOCUMENT_MODE.QUIRKS),et.insertionMode=BEFORE_HTML_MODE$1,et._processToken(tt)}function startTagBeforeHtml$1(et,tt){tt.tagName===$$9.HTML?(et._insertElement(tt,NS$4.HTML),et.insertionMode=BEFORE_HEAD_MODE$1):tokenBeforeHtml$1(et,tt)}function endTagBeforeHtml$1(et,tt){const nt=tt.tagName;(nt===$$9.HTML||nt===$$9.HEAD||nt===$$9.BODY||nt===$$9.BR)&&tokenBeforeHtml$1(et,tt)}function tokenBeforeHtml$1(et,tt){et._insertFakeRootElement(),et.insertionMode=BEFORE_HEAD_MODE$1,et._processToken(tt)}function startTagBeforeHead$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.HEAD?(et._insertElement(tt,NS$4.HTML),et.headElement=et.openElements.current,et.insertionMode=IN_HEAD_MODE$1):tokenBeforeHead$1(et,tt)}function endTagBeforeHead$1(et,tt){const nt=tt.tagName;nt===$$9.HEAD||nt===$$9.BODY||nt===$$9.HTML||nt===$$9.BR?tokenBeforeHead$1(et,tt):et._err(ERR$3.endTagWithoutMatchingOpenElement)}function tokenBeforeHead$1(et,tt){et._insertFakeElement($$9.HEAD),et.headElement=et.openElements.current,et.insertionMode=IN_HEAD_MODE$1,et._processToken(tt)}function startTagInHead$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.BASE||nt===$$9.BASEFONT||nt===$$9.BGSOUND||nt===$$9.LINK||nt===$$9.META?(et._appendElement(tt,NS$4.HTML),tt.ackSelfClosing=!0):nt===$$9.TITLE?et._switchToTextParsing(tt,Tokenizer$5.MODE.RCDATA):nt===$$9.NOSCRIPT?et.options.scriptingEnabled?et._switchToTextParsing(tt,Tokenizer$5.MODE.RAWTEXT):(et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_HEAD_NO_SCRIPT_MODE$1):nt===$$9.NOFRAMES||nt===$$9.STYLE?et._switchToTextParsing(tt,Tokenizer$5.MODE.RAWTEXT):nt===$$9.SCRIPT?et._switchToTextParsing(tt,Tokenizer$5.MODE.SCRIPT_DATA):nt===$$9.TEMPLATE?(et._insertTemplate(tt,NS$4.HTML),et.activeFormattingElements.insertMarker(),et.framesetOk=!1,et.insertionMode=IN_TEMPLATE_MODE$1,et._pushTmplInsertionMode(IN_TEMPLATE_MODE$1)):nt===$$9.HEAD?et._err(ERR$3.misplacedStartTagForHeadElement):tokenInHead$1(et,tt)}function endTagInHead$1(et,tt){const nt=tt.tagName;nt===$$9.HEAD?(et.openElements.pop(),et.insertionMode=AFTER_HEAD_MODE$1):nt===$$9.BODY||nt===$$9.BR||nt===$$9.HTML?tokenInHead$1(et,tt):nt===$$9.TEMPLATE&&et.openElements.tmplCount>0?(et.openElements.generateImpliedEndTagsThoroughly(),et.openElements.currentTagName!==$$9.TEMPLATE&&et._err(ERR$3.closingOfElementWithOpenChildElements),et.openElements.popUntilTagNamePopped($$9.TEMPLATE),et.activeFormattingElements.clearToLastMarker(),et._popTmplInsertionMode(),et._resetInsertionMode()):et._err(ERR$3.endTagWithoutMatchingOpenElement)}function tokenInHead$1(et,tt){et.openElements.pop(),et.insertionMode=AFTER_HEAD_MODE$1,et._processToken(tt)}function startTagInHeadNoScript$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.BASEFONT||nt===$$9.BGSOUND||nt===$$9.HEAD||nt===$$9.LINK||nt===$$9.META||nt===$$9.NOFRAMES||nt===$$9.STYLE?startTagInHead$1(et,tt):nt===$$9.NOSCRIPT?et._err(ERR$3.nestedNoscriptInHead):tokenInHeadNoScript$1(et,tt)}function endTagInHeadNoScript$1(et,tt){const nt=tt.tagName;nt===$$9.NOSCRIPT?(et.openElements.pop(),et.insertionMode=IN_HEAD_MODE$1):nt===$$9.BR?tokenInHeadNoScript$1(et,tt):et._err(ERR$3.endTagWithoutMatchingOpenElement)}function tokenInHeadNoScript$1(et,tt){const nt=tt.type===Tokenizer$5.EOF_TOKEN?ERR$3.openElementsLeftAfterEof:ERR$3.disallowedContentInNoscriptInHead;et._err(nt),et.openElements.pop(),et.insertionMode=IN_HEAD_MODE$1,et._processToken(tt)}function startTagAfterHead$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.BODY?(et._insertElement(tt,NS$4.HTML),et.framesetOk=!1,et.insertionMode=IN_BODY_MODE$1):nt===$$9.FRAMESET?(et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_FRAMESET_MODE$1):nt===$$9.BASE||nt===$$9.BASEFONT||nt===$$9.BGSOUND||nt===$$9.LINK||nt===$$9.META||nt===$$9.NOFRAMES||nt===$$9.SCRIPT||nt===$$9.STYLE||nt===$$9.TEMPLATE||nt===$$9.TITLE?(et._err(ERR$3.abandonedHeadElementChild),et.openElements.push(et.headElement),startTagInHead$1(et,tt),et.openElements.remove(et.headElement)):nt===$$9.HEAD?et._err(ERR$3.misplacedStartTagForHeadElement):tokenAfterHead$1(et,tt)}function endTagAfterHead$1(et,tt){const nt=tt.tagName;nt===$$9.BODY||nt===$$9.HTML||nt===$$9.BR?tokenAfterHead$1(et,tt):nt===$$9.TEMPLATE?endTagInHead$1(et,tt):et._err(ERR$3.endTagWithoutMatchingOpenElement)}function tokenAfterHead$1(et,tt){et._insertFakeElement($$9.BODY),et.insertionMode=IN_BODY_MODE$1,et._processToken(tt)}function whitespaceCharacterInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._insertCharacters(tt)}function characterInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._insertCharacters(tt),et.framesetOk=!1}function htmlStartTagInBody$1(et,tt){et.openElements.tmplCount===0&&et.treeAdapter.adoptAttributes(et.openElements.items[0],tt.attrs)}function bodyStartTagInBody$1(et,tt){const nt=et.openElements.tryPeekProperlyNestedBodyElement();nt&&et.openElements.tmplCount===0&&(et.framesetOk=!1,et.treeAdapter.adoptAttributes(nt,tt.attrs))}function framesetStartTagInBody$1(et,tt){const nt=et.openElements.tryPeekProperlyNestedBodyElement();et.framesetOk&&nt&&(et.treeAdapter.detachNode(nt),et.openElements.popAllUpToHtmlElement(),et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_FRAMESET_MODE$1)}function addressStartTagInBody$1(et,tt){et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._insertElement(tt,NS$4.HTML)}function numberedHeaderStartTagInBody$1(et,tt){et.openElements.hasInButtonScope($$9.P)&&et._closePElement();const nt=et.openElements.currentTagName;(nt===$$9.H1||nt===$$9.H2||nt===$$9.H3||nt===$$9.H4||nt===$$9.H5||nt===$$9.H6)&&et.openElements.pop(),et._insertElement(tt,NS$4.HTML)}function preStartTagInBody$1(et,tt){et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._insertElement(tt,NS$4.HTML),et.skipNextNewLine=!0,et.framesetOk=!1}function formStartTagInBody$1(et,tt){const nt=et.openElements.tmplCount>0;(!et.formElement||nt)&&(et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._insertElement(tt,NS$4.HTML),nt||(et.formElement=et.openElements.current))}function listItemStartTagInBody$1(et,tt){et.framesetOk=!1;const nt=tt.tagName;for(let rt=et.openElements.stackTop;rt>=0;rt--){const ot=et.openElements.items[rt],st=et.treeAdapter.getTagName(ot);let ut=null;if(nt===$$9.LI&&st===$$9.LI?ut=$$9.LI:(nt===$$9.DD||nt===$$9.DT)&&(st===$$9.DD||st===$$9.DT)&&(ut=st),ut){et.openElements.generateImpliedEndTagsWithExclusion(ut),et.openElements.popUntilTagNamePopped(ut);break}if(st!==$$9.ADDRESS&&st!==$$9.DIV&&st!==$$9.P&&et._isSpecialElement(ot))break}et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._insertElement(tt,NS$4.HTML)}function plaintextStartTagInBody$1(et,tt){et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._insertElement(tt,NS$4.HTML),et.tokenizer.state=Tokenizer$5.MODE.PLAINTEXT}function buttonStartTagInBody$1(et,tt){et.openElements.hasInScope($$9.BUTTON)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped($$9.BUTTON)),et._reconstructActiveFormattingElements(),et._insertElement(tt,NS$4.HTML),et.framesetOk=!1}function aStartTagInBody$1(et,tt){const nt=et.activeFormattingElements.getElementEntryInScopeWithTagName($$9.A);nt&&(callAdoptionAgency$1(et,tt),et.openElements.remove(nt.element),et.activeFormattingElements.removeEntry(nt)),et._reconstructActiveFormattingElements(),et._insertElement(tt,NS$4.HTML),et.activeFormattingElements.pushElement(et.openElements.current,tt)}function bStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS$4.HTML),et.activeFormattingElements.pushElement(et.openElements.current,tt)}function nobrStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),et.openElements.hasInScope($$9.NOBR)&&(callAdoptionAgency$1(et,tt),et._reconstructActiveFormattingElements()),et._insertElement(tt,NS$4.HTML),et.activeFormattingElements.pushElement(et.openElements.current,tt)}function appletStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS$4.HTML),et.activeFormattingElements.insertMarker(),et.framesetOk=!1}function tableStartTagInBody$1(et,tt){et.treeAdapter.getDocumentMode(et.document)!==HTML$4.DOCUMENT_MODE.QUIRKS&&et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._insertElement(tt,NS$4.HTML),et.framesetOk=!1,et.insertionMode=IN_TABLE_MODE$1}function areaStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._appendElement(tt,NS$4.HTML),et.framesetOk=!1,tt.ackSelfClosing=!0}function inputStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._appendElement(tt,NS$4.HTML);const nt=Tokenizer$5.getTokenAttr(tt,ATTRS$2.TYPE);(!nt||nt.toLowerCase()!==HIDDEN_INPUT_TYPE$1)&&(et.framesetOk=!1),tt.ackSelfClosing=!0}function paramStartTagInBody$1(et,tt){et._appendElement(tt,NS$4.HTML),tt.ackSelfClosing=!0}function hrStartTagInBody$1(et,tt){et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._appendElement(tt,NS$4.HTML),et.framesetOk=!1,et.ackSelfClosing=!0}function imageStartTagInBody$1(et,tt){tt.tagName=$$9.IMG,areaStartTagInBody$1(et,tt)}function textareaStartTagInBody$1(et,tt){et._insertElement(tt,NS$4.HTML),et.skipNextNewLine=!0,et.tokenizer.state=Tokenizer$5.MODE.RCDATA,et.originalInsertionMode=et.insertionMode,et.framesetOk=!1,et.insertionMode=TEXT_MODE$1}function xmpStartTagInBody$1(et,tt){et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._reconstructActiveFormattingElements(),et.framesetOk=!1,et._switchToTextParsing(tt,Tokenizer$5.MODE.RAWTEXT)}function iframeStartTagInBody$1(et,tt){et.framesetOk=!1,et._switchToTextParsing(tt,Tokenizer$5.MODE.RAWTEXT)}function noembedStartTagInBody$1(et,tt){et._switchToTextParsing(tt,Tokenizer$5.MODE.RAWTEXT)}function selectStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS$4.HTML),et.framesetOk=!1,et.insertionMode===IN_TABLE_MODE$1||et.insertionMode===IN_CAPTION_MODE$1||et.insertionMode===IN_TABLE_BODY_MODE$1||et.insertionMode===IN_ROW_MODE$1||et.insertionMode===IN_CELL_MODE$1?et.insertionMode=IN_SELECT_IN_TABLE_MODE$1:et.insertionMode=IN_SELECT_MODE$1}function optgroupStartTagInBody$1(et,tt){et.openElements.currentTagName===$$9.OPTION&&et.openElements.pop(),et._reconstructActiveFormattingElements(),et._insertElement(tt,NS$4.HTML)}function rbStartTagInBody$1(et,tt){et.openElements.hasInScope($$9.RUBY)&&et.openElements.generateImpliedEndTags(),et._insertElement(tt,NS$4.HTML)}function rtStartTagInBody$1(et,tt){et.openElements.hasInScope($$9.RUBY)&&et.openElements.generateImpliedEndTagsWithExclusion($$9.RTC),et._insertElement(tt,NS$4.HTML)}function menuStartTagInBody$1(et,tt){et.openElements.hasInButtonScope($$9.P)&&et._closePElement(),et._insertElement(tt,NS$4.HTML)}function mathStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),foreignContent$2.adjustTokenMathMLAttrs(tt),foreignContent$2.adjustTokenXMLAttrs(tt),tt.selfClosing?et._appendElement(tt,NS$4.MATHML):et._insertElement(tt,NS$4.MATHML),tt.ackSelfClosing=!0}function svgStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),foreignContent$2.adjustTokenSVGAttrs(tt),foreignContent$2.adjustTokenXMLAttrs(tt),tt.selfClosing?et._appendElement(tt,NS$4.SVG):et._insertElement(tt,NS$4.SVG),tt.ackSelfClosing=!0}function genericStartTagInBody$1(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS$4.HTML)}function startTagInBody$1(et,tt){const nt=tt.tagName;switch(nt.length){case 1:nt===$$9.I||nt===$$9.S||nt===$$9.B||nt===$$9.U?bStartTagInBody$1(et,tt):nt===$$9.P?addressStartTagInBody$1(et,tt):nt===$$9.A?aStartTagInBody$1(et,tt):genericStartTagInBody$1(et,tt);break;case 2:nt===$$9.DL||nt===$$9.OL||nt===$$9.UL?addressStartTagInBody$1(et,tt):nt===$$9.H1||nt===$$9.H2||nt===$$9.H3||nt===$$9.H4||nt===$$9.H5||nt===$$9.H6?numberedHeaderStartTagInBody$1(et,tt):nt===$$9.LI||nt===$$9.DD||nt===$$9.DT?listItemStartTagInBody$1(et,tt):nt===$$9.EM||nt===$$9.TT?bStartTagInBody$1(et,tt):nt===$$9.BR?areaStartTagInBody$1(et,tt):nt===$$9.HR?hrStartTagInBody$1(et,tt):nt===$$9.RB?rbStartTagInBody$1(et,tt):nt===$$9.RT||nt===$$9.RP?rtStartTagInBody$1(et,tt):nt!==$$9.TH&&nt!==$$9.TD&&nt!==$$9.TR&&genericStartTagInBody$1(et,tt);break;case 3:nt===$$9.DIV||nt===$$9.DIR||nt===$$9.NAV?addressStartTagInBody$1(et,tt):nt===$$9.PRE?preStartTagInBody$1(et,tt):nt===$$9.BIG?bStartTagInBody$1(et,tt):nt===$$9.IMG||nt===$$9.WBR?areaStartTagInBody$1(et,tt):nt===$$9.XMP?xmpStartTagInBody$1(et,tt):nt===$$9.SVG?svgStartTagInBody$1(et,tt):nt===$$9.RTC?rbStartTagInBody$1(et,tt):nt!==$$9.COL&&genericStartTagInBody$1(et,tt);break;case 4:nt===$$9.HTML?htmlStartTagInBody$1(et,tt):nt===$$9.BASE||nt===$$9.LINK||nt===$$9.META?startTagInHead$1(et,tt):nt===$$9.BODY?bodyStartTagInBody$1(et,tt):nt===$$9.MAIN||nt===$$9.MENU?addressStartTagInBody$1(et,tt):nt===$$9.FORM?formStartTagInBody$1(et,tt):nt===$$9.CODE||nt===$$9.FONT?bStartTagInBody$1(et,tt):nt===$$9.NOBR?nobrStartTagInBody$1(et,tt):nt===$$9.AREA?areaStartTagInBody$1(et,tt):nt===$$9.MATH?mathStartTagInBody$1(et,tt):nt===$$9.MENU?menuStartTagInBody$1(et,tt):nt!==$$9.HEAD&&genericStartTagInBody$1(et,tt);break;case 5:nt===$$9.STYLE||nt===$$9.TITLE?startTagInHead$1(et,tt):nt===$$9.ASIDE?addressStartTagInBody$1(et,tt):nt===$$9.SMALL?bStartTagInBody$1(et,tt):nt===$$9.TABLE?tableStartTagInBody$1(et,tt):nt===$$9.EMBED?areaStartTagInBody$1(et,tt):nt===$$9.INPUT?inputStartTagInBody$1(et,tt):nt===$$9.PARAM||nt===$$9.TRACK?paramStartTagInBody$1(et,tt):nt===$$9.IMAGE?imageStartTagInBody$1(et,tt):nt!==$$9.FRAME&&nt!==$$9.TBODY&&nt!==$$9.TFOOT&&nt!==$$9.THEAD&&genericStartTagInBody$1(et,tt);break;case 6:nt===$$9.SCRIPT?startTagInHead$1(et,tt):nt===$$9.CENTER||nt===$$9.FIGURE||nt===$$9.FOOTER||nt===$$9.HEADER||nt===$$9.HGROUP||nt===$$9.DIALOG?addressStartTagInBody$1(et,tt):nt===$$9.BUTTON?buttonStartTagInBody$1(et,tt):nt===$$9.STRIKE||nt===$$9.STRONG?bStartTagInBody$1(et,tt):nt===$$9.APPLET||nt===$$9.OBJECT?appletStartTagInBody$1(et,tt):nt===$$9.KEYGEN?areaStartTagInBody$1(et,tt):nt===$$9.SOURCE?paramStartTagInBody$1(et,tt):nt===$$9.IFRAME?iframeStartTagInBody$1(et,tt):nt===$$9.SELECT?selectStartTagInBody$1(et,tt):nt===$$9.OPTION?optgroupStartTagInBody$1(et,tt):genericStartTagInBody$1(et,tt);break;case 7:nt===$$9.BGSOUND?startTagInHead$1(et,tt):nt===$$9.DETAILS||nt===$$9.ADDRESS||nt===$$9.ARTICLE||nt===$$9.SECTION||nt===$$9.SUMMARY?addressStartTagInBody$1(et,tt):nt===$$9.LISTING?preStartTagInBody$1(et,tt):nt===$$9.MARQUEE?appletStartTagInBody$1(et,tt):nt===$$9.NOEMBED?noembedStartTagInBody$1(et,tt):nt!==$$9.CAPTION&&genericStartTagInBody$1(et,tt);break;case 8:nt===$$9.BASEFONT?startTagInHead$1(et,tt):nt===$$9.FRAMESET?framesetStartTagInBody$1(et,tt):nt===$$9.FIELDSET?addressStartTagInBody$1(et,tt):nt===$$9.TEXTAREA?textareaStartTagInBody$1(et,tt):nt===$$9.TEMPLATE?startTagInHead$1(et,tt):nt===$$9.NOSCRIPT?et.options.scriptingEnabled?noembedStartTagInBody$1(et,tt):genericStartTagInBody$1(et,tt):nt===$$9.OPTGROUP?optgroupStartTagInBody$1(et,tt):nt!==$$9.COLGROUP&&genericStartTagInBody$1(et,tt);break;case 9:nt===$$9.PLAINTEXT?plaintextStartTagInBody$1(et,tt):genericStartTagInBody$1(et,tt);break;case 10:nt===$$9.BLOCKQUOTE||nt===$$9.FIGCAPTION?addressStartTagInBody$1(et,tt):genericStartTagInBody$1(et,tt);break;default:genericStartTagInBody$1(et,tt)}}function bodyEndTagInBody$1(et){et.openElements.hasInScope($$9.BODY)&&(et.insertionMode=AFTER_BODY_MODE$1)}function htmlEndTagInBody$1(et,tt){et.openElements.hasInScope($$9.BODY)&&(et.insertionMode=AFTER_BODY_MODE$1,et._processToken(tt))}function addressEndTagInBody$1(et,tt){const nt=tt.tagName;et.openElements.hasInScope(nt)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped(nt))}function formEndTagInBody$1(et){const tt=et.openElements.tmplCount>0,nt=et.formElement;tt||(et.formElement=null),(nt||tt)&&et.openElements.hasInScope($$9.FORM)&&(et.openElements.generateImpliedEndTags(),tt?et.openElements.popUntilTagNamePopped($$9.FORM):et.openElements.remove(nt))}function pEndTagInBody$1(et){et.openElements.hasInButtonScope($$9.P)||et._insertFakeElement($$9.P),et._closePElement()}function liEndTagInBody$1(et){et.openElements.hasInListItemScope($$9.LI)&&(et.openElements.generateImpliedEndTagsWithExclusion($$9.LI),et.openElements.popUntilTagNamePopped($$9.LI))}function ddEndTagInBody$1(et,tt){const nt=tt.tagName;et.openElements.hasInScope(nt)&&(et.openElements.generateImpliedEndTagsWithExclusion(nt),et.openElements.popUntilTagNamePopped(nt))}function numberedHeaderEndTagInBody$1(et){et.openElements.hasNumberedHeaderInScope()&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilNumberedHeaderPopped())}function appletEndTagInBody$1(et,tt){const nt=tt.tagName;et.openElements.hasInScope(nt)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped(nt),et.activeFormattingElements.clearToLastMarker())}function brEndTagInBody$1(et){et._reconstructActiveFormattingElements(),et._insertFakeElement($$9.BR),et.openElements.pop(),et.framesetOk=!1}function genericEndTagInBody$1(et,tt){const nt=tt.tagName;for(let rt=et.openElements.stackTop;rt>0;rt--){const ot=et.openElements.items[rt];if(et.treeAdapter.getTagName(ot)===nt){et.openElements.generateImpliedEndTagsWithExclusion(nt),et.openElements.popUntilElementPopped(ot);break}if(et._isSpecialElement(ot))break}}function endTagInBody$1(et,tt){const nt=tt.tagName;switch(nt.length){case 1:nt===$$9.A||nt===$$9.B||nt===$$9.I||nt===$$9.S||nt===$$9.U?callAdoptionAgency$1(et,tt):nt===$$9.P?pEndTagInBody$1(et):genericEndTagInBody$1(et,tt);break;case 2:nt===$$9.DL||nt===$$9.UL||nt===$$9.OL?addressEndTagInBody$1(et,tt):nt===$$9.LI?liEndTagInBody$1(et):nt===$$9.DD||nt===$$9.DT?ddEndTagInBody$1(et,tt):nt===$$9.H1||nt===$$9.H2||nt===$$9.H3||nt===$$9.H4||nt===$$9.H5||nt===$$9.H6?numberedHeaderEndTagInBody$1(et):nt===$$9.BR?brEndTagInBody$1(et):nt===$$9.EM||nt===$$9.TT?callAdoptionAgency$1(et,tt):genericEndTagInBody$1(et,tt);break;case 3:nt===$$9.BIG?callAdoptionAgency$1(et,tt):nt===$$9.DIR||nt===$$9.DIV||nt===$$9.NAV||nt===$$9.PRE?addressEndTagInBody$1(et,tt):genericEndTagInBody$1(et,tt);break;case 4:nt===$$9.BODY?bodyEndTagInBody$1(et):nt===$$9.HTML?htmlEndTagInBody$1(et,tt):nt===$$9.FORM?formEndTagInBody$1(et):nt===$$9.CODE||nt===$$9.FONT||nt===$$9.NOBR?callAdoptionAgency$1(et,tt):nt===$$9.MAIN||nt===$$9.MENU?addressEndTagInBody$1(et,tt):genericEndTagInBody$1(et,tt);break;case 5:nt===$$9.ASIDE?addressEndTagInBody$1(et,tt):nt===$$9.SMALL?callAdoptionAgency$1(et,tt):genericEndTagInBody$1(et,tt);break;case 6:nt===$$9.CENTER||nt===$$9.FIGURE||nt===$$9.FOOTER||nt===$$9.HEADER||nt===$$9.HGROUP||nt===$$9.DIALOG?addressEndTagInBody$1(et,tt):nt===$$9.APPLET||nt===$$9.OBJECT?appletEndTagInBody$1(et,tt):nt===$$9.STRIKE||nt===$$9.STRONG?callAdoptionAgency$1(et,tt):genericEndTagInBody$1(et,tt);break;case 7:nt===$$9.ADDRESS||nt===$$9.ARTICLE||nt===$$9.DETAILS||nt===$$9.SECTION||nt===$$9.SUMMARY||nt===$$9.LISTING?addressEndTagInBody$1(et,tt):nt===$$9.MARQUEE?appletEndTagInBody$1(et,tt):genericEndTagInBody$1(et,tt);break;case 8:nt===$$9.FIELDSET?addressEndTagInBody$1(et,tt):nt===$$9.TEMPLATE?endTagInHead$1(et,tt):genericEndTagInBody$1(et,tt);break;case 10:nt===$$9.BLOCKQUOTE||nt===$$9.FIGCAPTION?addressEndTagInBody$1(et,tt):genericEndTagInBody$1(et,tt);break;default:genericEndTagInBody$1(et,tt)}}function eofInBody$1(et,tt){et.tmplInsertionModeStackTop>-1?eofInTemplate$1(et,tt):et.stopped=!0}function endTagInText$1(et,tt){tt.tagName===$$9.SCRIPT&&(et.pendingScript=et.openElements.current),et.openElements.pop(),et.insertionMode=et.originalInsertionMode}function eofInText$1(et,tt){et._err(ERR$3.eofInElementThatCanContainOnlyText),et.openElements.pop(),et.insertionMode=et.originalInsertionMode,et._processToken(tt)}function characterInTable$1(et,tt){const nt=et.openElements.currentTagName;nt===$$9.TABLE||nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD||nt===$$9.TR?(et.pendingCharacterTokens=[],et.hasNonWhitespacePendingCharacterToken=!1,et.originalInsertionMode=et.insertionMode,et.insertionMode=IN_TABLE_TEXT_MODE$1,et._processToken(tt)):tokenInTable$1(et,tt)}function captionStartTagInTable$1(et,tt){et.openElements.clearBackToTableContext(),et.activeFormattingElements.insertMarker(),et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_CAPTION_MODE$1}function colgroupStartTagInTable$1(et,tt){et.openElements.clearBackToTableContext(),et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_COLUMN_GROUP_MODE$1}function colStartTagInTable$1(et,tt){et.openElements.clearBackToTableContext(),et._insertFakeElement($$9.COLGROUP),et.insertionMode=IN_COLUMN_GROUP_MODE$1,et._processToken(tt)}function tbodyStartTagInTable$1(et,tt){et.openElements.clearBackToTableContext(),et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_TABLE_BODY_MODE$1}function tdStartTagInTable$1(et,tt){et.openElements.clearBackToTableContext(),et._insertFakeElement($$9.TBODY),et.insertionMode=IN_TABLE_BODY_MODE$1,et._processToken(tt)}function tableStartTagInTable$1(et,tt){et.openElements.hasInTableScope($$9.TABLE)&&(et.openElements.popUntilTagNamePopped($$9.TABLE),et._resetInsertionMode(),et._processToken(tt))}function inputStartTagInTable$1(et,tt){const nt=Tokenizer$5.getTokenAttr(tt,ATTRS$2.TYPE);nt&&nt.toLowerCase()===HIDDEN_INPUT_TYPE$1?et._appendElement(tt,NS$4.HTML):tokenInTable$1(et,tt),tt.ackSelfClosing=!0}function formStartTagInTable$1(et,tt){!et.formElement&&et.openElements.tmplCount===0&&(et._insertElement(tt,NS$4.HTML),et.formElement=et.openElements.current,et.openElements.pop())}function startTagInTable$1(et,tt){const nt=tt.tagName;switch(nt.length){case 2:nt===$$9.TD||nt===$$9.TH||nt===$$9.TR?tdStartTagInTable$1(et,tt):tokenInTable$1(et,tt);break;case 3:nt===$$9.COL?colStartTagInTable$1(et,tt):tokenInTable$1(et,tt);break;case 4:nt===$$9.FORM?formStartTagInTable$1(et,tt):tokenInTable$1(et,tt);break;case 5:nt===$$9.TABLE?tableStartTagInTable$1(et,tt):nt===$$9.STYLE?startTagInHead$1(et,tt):nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD?tbodyStartTagInTable$1(et,tt):nt===$$9.INPUT?inputStartTagInTable$1(et,tt):tokenInTable$1(et,tt);break;case 6:nt===$$9.SCRIPT?startTagInHead$1(et,tt):tokenInTable$1(et,tt);break;case 7:nt===$$9.CAPTION?captionStartTagInTable$1(et,tt):tokenInTable$1(et,tt);break;case 8:nt===$$9.COLGROUP?colgroupStartTagInTable$1(et,tt):nt===$$9.TEMPLATE?startTagInHead$1(et,tt):tokenInTable$1(et,tt);break;default:tokenInTable$1(et,tt)}}function endTagInTable$1(et,tt){const nt=tt.tagName;nt===$$9.TABLE?et.openElements.hasInTableScope($$9.TABLE)&&(et.openElements.popUntilTagNamePopped($$9.TABLE),et._resetInsertionMode()):nt===$$9.TEMPLATE?endTagInHead$1(et,tt):nt!==$$9.BODY&&nt!==$$9.CAPTION&&nt!==$$9.COL&&nt!==$$9.COLGROUP&&nt!==$$9.HTML&&nt!==$$9.TBODY&&nt!==$$9.TD&&nt!==$$9.TFOOT&&nt!==$$9.TH&&nt!==$$9.THEAD&&nt!==$$9.TR&&tokenInTable$1(et,tt)}function tokenInTable$1(et,tt){const nt=et.fosterParentingEnabled;et.fosterParentingEnabled=!0,et._processTokenInBodyMode(tt),et.fosterParentingEnabled=nt}function whitespaceCharacterInTableText$1(et,tt){et.pendingCharacterTokens.push(tt)}function characterInTableText$1(et,tt){et.pendingCharacterTokens.push(tt),et.hasNonWhitespacePendingCharacterToken=!0}function tokenInTableText$1(et,tt){let nt=0;if(et.hasNonWhitespacePendingCharacterToken)for(;nt<et.pendingCharacterTokens.length;nt++)tokenInTable$1(et,et.pendingCharacterTokens[nt]);else for(;nt<et.pendingCharacterTokens.length;nt++)et._insertCharacters(et.pendingCharacterTokens[nt]);et.insertionMode=et.originalInsertionMode,et._processToken(tt)}function startTagInCaption$1(et,tt){const nt=tt.tagName;nt===$$9.CAPTION||nt===$$9.COL||nt===$$9.COLGROUP||nt===$$9.TBODY||nt===$$9.TD||nt===$$9.TFOOT||nt===$$9.TH||nt===$$9.THEAD||nt===$$9.TR?et.openElements.hasInTableScope($$9.CAPTION)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped($$9.CAPTION),et.activeFormattingElements.clearToLastMarker(),et.insertionMode=IN_TABLE_MODE$1,et._processToken(tt)):startTagInBody$1(et,tt)}function endTagInCaption$1(et,tt){const nt=tt.tagName;nt===$$9.CAPTION||nt===$$9.TABLE?et.openElements.hasInTableScope($$9.CAPTION)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped($$9.CAPTION),et.activeFormattingElements.clearToLastMarker(),et.insertionMode=IN_TABLE_MODE$1,nt===$$9.TABLE&&et._processToken(tt)):nt!==$$9.BODY&&nt!==$$9.COL&&nt!==$$9.COLGROUP&&nt!==$$9.HTML&&nt!==$$9.TBODY&&nt!==$$9.TD&&nt!==$$9.TFOOT&&nt!==$$9.TH&&nt!==$$9.THEAD&&nt!==$$9.TR&&endTagInBody$1(et,tt)}function startTagInColumnGroup$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.COL?(et._appendElement(tt,NS$4.HTML),tt.ackSelfClosing=!0):nt===$$9.TEMPLATE?startTagInHead$1(et,tt):tokenInColumnGroup$1(et,tt)}function endTagInColumnGroup$1(et,tt){const nt=tt.tagName;nt===$$9.COLGROUP?et.openElements.currentTagName===$$9.COLGROUP&&(et.openElements.pop(),et.insertionMode=IN_TABLE_MODE$1):nt===$$9.TEMPLATE?endTagInHead$1(et,tt):nt!==$$9.COL&&tokenInColumnGroup$1(et,tt)}function tokenInColumnGroup$1(et,tt){et.openElements.currentTagName===$$9.COLGROUP&&(et.openElements.pop(),et.insertionMode=IN_TABLE_MODE$1,et._processToken(tt))}function startTagInTableBody$1(et,tt){const nt=tt.tagName;nt===$$9.TR?(et.openElements.clearBackToTableBodyContext(),et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_ROW_MODE$1):nt===$$9.TH||nt===$$9.TD?(et.openElements.clearBackToTableBodyContext(),et._insertFakeElement($$9.TR),et.insertionMode=IN_ROW_MODE$1,et._processToken(tt)):nt===$$9.CAPTION||nt===$$9.COL||nt===$$9.COLGROUP||nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD?et.openElements.hasTableBodyContextInTableScope()&&(et.openElements.clearBackToTableBodyContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_MODE$1,et._processToken(tt)):startTagInTable$1(et,tt)}function endTagInTableBody$1(et,tt){const nt=tt.tagName;nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD?et.openElements.hasInTableScope(nt)&&(et.openElements.clearBackToTableBodyContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_MODE$1):nt===$$9.TABLE?et.openElements.hasTableBodyContextInTableScope()&&(et.openElements.clearBackToTableBodyContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_MODE$1,et._processToken(tt)):(nt!==$$9.BODY&&nt!==$$9.CAPTION&&nt!==$$9.COL&&nt!==$$9.COLGROUP||nt!==$$9.HTML&&nt!==$$9.TD&&nt!==$$9.TH&&nt!==$$9.TR)&&endTagInTable$1(et,tt)}function startTagInRow$1(et,tt){const nt=tt.tagName;nt===$$9.TH||nt===$$9.TD?(et.openElements.clearBackToTableRowContext(),et._insertElement(tt,NS$4.HTML),et.insertionMode=IN_CELL_MODE$1,et.activeFormattingElements.insertMarker()):nt===$$9.CAPTION||nt===$$9.COL||nt===$$9.COLGROUP||nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD||nt===$$9.TR?et.openElements.hasInTableScope($$9.TR)&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE$1,et._processToken(tt)):startTagInTable$1(et,tt)}function endTagInRow$1(et,tt){const nt=tt.tagName;nt===$$9.TR?et.openElements.hasInTableScope($$9.TR)&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE$1):nt===$$9.TABLE?et.openElements.hasInTableScope($$9.TR)&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE$1,et._processToken(tt)):nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD?(et.openElements.hasInTableScope(nt)||et.openElements.hasInTableScope($$9.TR))&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE$1,et._processToken(tt)):(nt!==$$9.BODY&&nt!==$$9.CAPTION&&nt!==$$9.COL&&nt!==$$9.COLGROUP||nt!==$$9.HTML&&nt!==$$9.TD&&nt!==$$9.TH)&&endTagInTable$1(et,tt)}function startTagInCell$1(et,tt){const nt=tt.tagName;nt===$$9.CAPTION||nt===$$9.COL||nt===$$9.COLGROUP||nt===$$9.TBODY||nt===$$9.TD||nt===$$9.TFOOT||nt===$$9.TH||nt===$$9.THEAD||nt===$$9.TR?(et.openElements.hasInTableScope($$9.TD)||et.openElements.hasInTableScope($$9.TH))&&(et._closeTableCell(),et._processToken(tt)):startTagInBody$1(et,tt)}function endTagInCell$1(et,tt){const nt=tt.tagName;nt===$$9.TD||nt===$$9.TH?et.openElements.hasInTableScope(nt)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped(nt),et.activeFormattingElements.clearToLastMarker(),et.insertionMode=IN_ROW_MODE$1):nt===$$9.TABLE||nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD||nt===$$9.TR?et.openElements.hasInTableScope(nt)&&(et._closeTableCell(),et._processToken(tt)):nt!==$$9.BODY&&nt!==$$9.CAPTION&&nt!==$$9.COL&&nt!==$$9.COLGROUP&&nt!==$$9.HTML&&endTagInBody$1(et,tt)}function startTagInSelect$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.OPTION?(et.openElements.currentTagName===$$9.OPTION&&et.openElements.pop(),et._insertElement(tt,NS$4.HTML)):nt===$$9.OPTGROUP?(et.openElements.currentTagName===$$9.OPTION&&et.openElements.pop(),et.openElements.currentTagName===$$9.OPTGROUP&&et.openElements.pop(),et._insertElement(tt,NS$4.HTML)):nt===$$9.INPUT||nt===$$9.KEYGEN||nt===$$9.TEXTAREA||nt===$$9.SELECT?et.openElements.hasInSelectScope($$9.SELECT)&&(et.openElements.popUntilTagNamePopped($$9.SELECT),et._resetInsertionMode(),nt!==$$9.SELECT&&et._processToken(tt)):(nt===$$9.SCRIPT||nt===$$9.TEMPLATE)&&startTagInHead$1(et,tt)}function endTagInSelect$1(et,tt){const nt=tt.tagName;if(nt===$$9.OPTGROUP){const rt=et.openElements.items[et.openElements.stackTop-1],ot=rt&&et.treeAdapter.getTagName(rt);et.openElements.currentTagName===$$9.OPTION&&ot===$$9.OPTGROUP&&et.openElements.pop(),et.openElements.currentTagName===$$9.OPTGROUP&&et.openElements.pop()}else nt===$$9.OPTION?et.openElements.currentTagName===$$9.OPTION&&et.openElements.pop():nt===$$9.SELECT&&et.openElements.hasInSelectScope($$9.SELECT)?(et.openElements.popUntilTagNamePopped($$9.SELECT),et._resetInsertionMode()):nt===$$9.TEMPLATE&&endTagInHead$1(et,tt)}function startTagInSelectInTable$1(et,tt){const nt=tt.tagName;nt===$$9.CAPTION||nt===$$9.TABLE||nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD||nt===$$9.TR||nt===$$9.TD||nt===$$9.TH?(et.openElements.popUntilTagNamePopped($$9.SELECT),et._resetInsertionMode(),et._processToken(tt)):startTagInSelect$1(et,tt)}function endTagInSelectInTable$1(et,tt){const nt=tt.tagName;nt===$$9.CAPTION||nt===$$9.TABLE||nt===$$9.TBODY||nt===$$9.TFOOT||nt===$$9.THEAD||nt===$$9.TR||nt===$$9.TD||nt===$$9.TH?et.openElements.hasInTableScope(nt)&&(et.openElements.popUntilTagNamePopped($$9.SELECT),et._resetInsertionMode(),et._processToken(tt)):endTagInSelect$1(et,tt)}function startTagInTemplate$1(et,tt){const nt=tt.tagName;if(nt===$$9.BASE||nt===$$9.BASEFONT||nt===$$9.BGSOUND||nt===$$9.LINK||nt===$$9.META||nt===$$9.NOFRAMES||nt===$$9.SCRIPT||nt===$$9.STYLE||nt===$$9.TEMPLATE||nt===$$9.TITLE)startTagInHead$1(et,tt);else{const rt=TEMPLATE_INSERTION_MODE_SWITCH_MAP$1[nt]||IN_BODY_MODE$1;et._popTmplInsertionMode(),et._pushTmplInsertionMode(rt),et.insertionMode=rt,et._processToken(tt)}}function endTagInTemplate$1(et,tt){tt.tagName===$$9.TEMPLATE&&endTagInHead$1(et,tt)}function eofInTemplate$1(et,tt){et.openElements.tmplCount>0?(et.openElements.popUntilTagNamePopped($$9.TEMPLATE),et.activeFormattingElements.clearToLastMarker(),et._popTmplInsertionMode(),et._resetInsertionMode(),et._processToken(tt)):et.stopped=!0}function startTagAfterBody$1(et,tt){tt.tagName===$$9.HTML?startTagInBody$1(et,tt):tokenAfterBody$1(et,tt)}function endTagAfterBody$1(et,tt){tt.tagName===$$9.HTML?et.fragmentContext||(et.insertionMode=AFTER_AFTER_BODY_MODE$1):tokenAfterBody$1(et,tt)}function tokenAfterBody$1(et,tt){et.insertionMode=IN_BODY_MODE$1,et._processToken(tt)}function startTagInFrameset$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.FRAMESET?et._insertElement(tt,NS$4.HTML):nt===$$9.FRAME?(et._appendElement(tt,NS$4.HTML),tt.ackSelfClosing=!0):nt===$$9.NOFRAMES&&startTagInHead$1(et,tt)}function endTagInFrameset$1(et,tt){tt.tagName===$$9.FRAMESET&&!et.openElements.isRootHtmlElementCurrent()&&(et.openElements.pop(),!et.fragmentContext&&et.openElements.currentTagName!==$$9.FRAMESET&&(et.insertionMode=AFTER_FRAMESET_MODE$1))}function startTagAfterFrameset$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.NOFRAMES&&startTagInHead$1(et,tt)}function endTagAfterFrameset$1(et,tt){tt.tagName===$$9.HTML&&(et.insertionMode=AFTER_AFTER_FRAMESET_MODE$1)}function startTagAfterAfterBody$1(et,tt){tt.tagName===$$9.HTML?startTagInBody$1(et,tt):tokenAfterAfterBody$1(et,tt)}function tokenAfterAfterBody$1(et,tt){et.insertionMode=IN_BODY_MODE$1,et._processToken(tt)}function startTagAfterAfterFrameset$1(et,tt){const nt=tt.tagName;nt===$$9.HTML?startTagInBody$1(et,tt):nt===$$9.NOFRAMES&&startTagInHead$1(et,tt)}function nullCharacterInForeignContent$1(et,tt){tt.chars=unicode$4.REPLACEMENT_CHARACTER,et._insertCharacters(tt)}function characterInForeignContent$1(et,tt){et._insertCharacters(tt),et.framesetOk=!1}function startTagInForeignContent$1(et,tt){if(foreignContent$2.causesExit(tt)&&!et.fragmentContext){for(;et.treeAdapter.getNamespaceURI(et.openElements.current)!==NS$4.HTML&&!et._isIntegrationPoint(et.openElements.current);)et.openElements.pop();et._processToken(tt)}else{const nt=et._getAdjustedCurrentElement(),rt=et.treeAdapter.getNamespaceURI(nt);rt===NS$4.MATHML?foreignContent$2.adjustTokenMathMLAttrs(tt):rt===NS$4.SVG&&(foreignContent$2.adjustTokenSVGTagName(tt),foreignContent$2.adjustTokenSVGAttrs(tt)),foreignContent$2.adjustTokenXMLAttrs(tt),tt.selfClosing?et._appendElement(tt,rt):et._insertElement(tt,rt),tt.ackSelfClosing=!0}}function endTagInForeignContent$1(et,tt){for(let nt=et.openElements.stackTop;nt>0;nt--){const rt=et.openElements.items[nt];if(et.treeAdapter.getNamespaceURI(rt)===NS$4.HTML){et._processToken(tt);break}if(et.treeAdapter.getTagName(rt).toLowerCase()===tt.tagName){et.openElements.popUntilElementPopped(rt);break}}}const abandonedHeadElementChild={reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment={reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier={reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier={reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference={reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent={reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange={reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements={reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream={reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference={reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead={reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute={reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes={reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus={reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement={reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName={reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata={reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment={reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype={reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText={reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText={reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag={reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment={reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment={reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName={reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName={reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype$1={reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement={reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue={reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype={reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName={reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier={reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier={reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName={reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier={reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier={reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference={reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword={reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword={reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName={reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes={reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers={reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment={reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead={reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype={reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus={reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference={reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream={reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference={reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof={reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference={reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream={reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier={reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName={reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue={reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName={reason:"Unexpected equals sign before attribute name ",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter={reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName={reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag={reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference={reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"},require$$3$2={abandonedHeadElementChild,abruptClosingOfEmptyComment,abruptDoctypePublicIdentifier,abruptDoctypeSystemIdentifier,absenceOfDigitsInNumericCharacterReference,cdataInHtmlContent,characterReferenceOutsideUnicodeRange,closingOfElementWithOpenChildElements,controlCharacterInInputStream,controlCharacterReference,disallowedContentInNoscriptInHead,duplicateAttribute,endTagWithAttributes,endTagWithTrailingSolidus,endTagWithoutMatchingOpenElement,eofBeforeTagName,eofInCdata,eofInComment,eofInDoctype,eofInElementThatCanContainOnlyText,eofInScriptHtmlCommentLikeText,eofInTag,incorrectlyClosedComment,incorrectlyOpenedComment,invalidCharacterSequenceAfterDoctypeName,invalidFirstCharacterOfTagName,misplacedDoctype:misplacedDoctype$1,misplacedStartTagForHeadElement,missingAttributeValue,missingDoctype,missingDoctypeName,missingDoctypePublicIdentifier,missingDoctypeSystemIdentifier,missingEndTagName,missingQuoteBeforeDoctypePublicIdentifier,missingQuoteBeforeDoctypeSystemIdentifier,missingSemicolonAfterCharacterReference,missingWhitespaceAfterDoctypePublicKeyword,missingWhitespaceAfterDoctypeSystemKeyword,missingWhitespaceBeforeDoctypeName,missingWhitespaceBetweenAttributes,missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers,nestedComment,nestedNoscriptInHead,nonConformingDoctype,nonVoidHtmlElementStartTagWithTrailingSolidus,noncharacterCharacterReference,noncharacterInInputStream,nullCharacterReference,openElementsLeftAfterEof,surrogateCharacterReference,surrogateInInputStream,unexpectedCharacterAfterDoctypeSystemIdentifier,unexpectedCharacterInAttributeName,unexpectedCharacterInUnquotedAttributeValue,unexpectedEqualsSignBeforeAttributeName,unexpectedNullCharacter,unexpectedQuestionMarkInsteadOfTagName,unexpectedSolidusInTag,unknownNamedCharacterReference};var fromParse5$1=hastUtilFromParse5,Parser5=parser$5,xtend$5=immutable,errors=require$$3$2,base$3="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",fatalities={2:!0,1:!1,0:null},rehypeParse=parse$e;function parse$e(et){var tt=xtend$5(et,this.data("settings")),nt=tt.position;nt=typeof nt=="boolean"?nt:!0,this.Parser=rt;function rt(ot,st){var ut=tt.fragment?"parseFragment":"parse",ct=tt.emitParseErrors?pt:null,ft=new Parser5({sourceCodeLocationInfo:nt,onParseError:ct,scriptingEnabled:!1});return fromParse5$1(ft[ut](ot),{space:tt.space,file:st,verbose:tt.verbose});function pt(ht){var mt=ht.code,yt=camelcase$1(mt),vt=tt[yt],Tt=vt??!0,Et=typeof Tt=="number"?Tt:Tt?1:0,xt={line:ht.startLine,column:ht.startCol,offset:ht.startOffset},At={line:ht.endLine,column:ht.endCol,offset:ht.endOffset},Ct,$t;Et&&(Ct=errors[yt]||{reason:"",description:""},$t=st.message(Ot(Ct.reason),{start:xt,end:At}),$t.source="parse-error",$t.ruleId=mt,$t.fatal=fatalities[Et],$t.note=Ot(Ct.description),$t.url=Ct.url===!1?null:base$3+mt);function Ot(kt){return kt.replace(/%c(?:-(\d+))?/g,Rt).replace(/%x/g,It)}function Rt(kt,Mt){var Ft=Mt?-parseInt(Mt,10):0,zt=ot.charAt(ht.startOffset+Ft);return zt==="`"?"` ` `":zt}function It(){var kt=ot.charCodeAt(ht.startOffset).toString(16).toUpperCase();return"0x"+kt}}}}function camelcase$1(et){return et.replace(/-[a-z]/g,replacer$1)}function replacer$1(et){return et.charAt(1).toUpperCase()}/*!
 * repeat-string <https://github.com/jonschlinkert/repeat-string>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */var res="",cache$4,repeatString=repeat$3;function repeat$3(et,tt){if(typeof et!="string")throw new TypeError("expected a string");if(tt===1)return et;if(tt===2)return et+et;var nt=et.length*tt;if(cache$4!==et||typeof cache$4>"u")cache$4=et,res="";else if(res.length>=nt)return res.substr(0,nt);for(;nt>res.length&&tt>1;)tt&1&&(res+=et),tt>>=1,et+=et;return res+=et,res=res.substr(0,nt),res}var convert_1$1=convert$9;function convert$9(et){if(typeof et=="string")return tagNameFactory(et);if(et==null)return element$5;if(typeof et=="object")return any(et);if(typeof et=="function")return callFactory(et);throw new Error("Expected function, string, or array as test")}function convertAll$1(et){for(var tt=et.length,nt=-1,rt=[];++nt<tt;)rt[nt]=convert$9(et[nt]);return rt}function any(et){var tt=convertAll$1(et),nt=tt.length;return rt;function rt(){for(var ot=-1;++ot<nt;)if(tt[ot].apply(this,arguments))return!0;return!1}}function tagNameFactory(et){return tt;function tt(nt){return element$5(nt)&&nt.tagName===et}}function callFactory(et){return tt;function tt(nt){return element$5(nt)&&Boolean(et.apply(this,arguments))}}function element$5(et){return et&&typeof et=="object"&&et.type==="element"&&typeof et.tagName=="string"}var convert$8=convert_1$1,hastUtilIsElement=isElement;isElement.convert=convert$8;function isElement(et,tt,nt,rt,ot){var st=rt!=null,ut=nt!=null,ct=convert$8(tt);if(ut&&(typeof nt!="number"||nt<0||nt===1/0))throw new Error("Expected positive finite index for child node");if(st&&(!rt.type||!rt.children))throw new Error("Expected parent node");if(!et||!et.type||typeof et.type!="string")return!1;if(st!==ut)throw new Error("Expected both parent and index");return ct.call(ot,et,nt,rt)}var convert_1=convert$7;function convert$7(et){if(typeof et=="string")return typeFactory$3(et);if(et==null)return ok$4;if(typeof et=="object")return("length"in et?anyFactory$3:matchesFactory)(et);if(typeof et=="function")return et;throw new Error("Expected function, string, or object as test")}function convertAll(et){for(var tt=[],nt=et.length,rt=-1;++rt<nt;)tt[rt]=convert$7(et[rt]);return tt}function matchesFactory(et){return tt;function tt(nt){var rt;for(rt in et)if(nt[rt]!==et[rt])return!1;return!0}}function anyFactory$3(et){var tt=convertAll(et),nt=tt.length;return rt;function rt(){for(var ot=-1;++ot<nt;)if(tt[ot].apply(this,arguments))return!0;return!1}}function typeFactory$3(et){return tt;function tt(nt){return Boolean(nt&&nt.type===et)}}function ok$4(){return!0}var convert$6=convert_1,unistUtilFindAfter=findAfter$1;function findAfter$1(et,tt,nt){var rt=convert$6(nt),ot,st,ut;if(!et||!et.type||!et.children)throw new Error("Expected parent node");if(ot=et.children,ut=ot.length,tt&&tt.type&&(tt=ot.indexOf(tt)),isNaN(tt)||tt<0||tt===1/0)throw new Error("Expected positive finite index or child node");for(;++tt<ut;)if(st=ot[tt],rt(st,tt,et))return st;return null}var repeat$2=repeatString,is=hastUtilIsElement,findAfter=unistUtilFindAfter,hastUtilToText=toText$1,min$3=Math.min,max$3=Math.max,tab$3=9,space$4=32,zeroWidthSpace=8203,alm=1564,ltr=8206,rtl=8207,lre=8234,rle=8235,pdf=8236,lro=8237,rlo=8238,lri=8294,rli=8295,fsi=8296,pdi=8297,tabChar="	",lineFeedChar$1=`
`,spaceChar=" ";function toText$1(et){var tt=et.children||[],nt=tt.length,rt=blockOrCaption(et),ot=inferWhiteSpace(et,{}),st=-1,ut,ct,ft,pt,ht;if(et.type==="text"||et.type==="comment")return collectText(et,{whiteSpace:ot,breakBefore:!0,breakAfter:!0});for(ut=[];++st<nt;)ct=innerTextCollection(tt[st],st,et,{whiteSpace:ot,breakBefore:st===0?rt:!1,breakAfter:st===nt-1?rt:is(tt[st+1],"br")}),ut=ut.concat(ct);for(st=-1,nt=ut.length,ft=[];++st<nt;)pt=ut[st],typeof pt=="number"?ht!==void 0&&pt>ht&&(ht=pt):pt!==""&&(ht&&ft.push(repeat$2(lineFeedChar$1,ht)),ht=0,ft.push(pt));return ft.join("")}function innerTextCollection(et,tt,nt,rt){return et.type==="element"?collectElement(et,tt,nt,rt):et.type==="text"?[rt.whiteSpace==="normal"?collectText(et,rt):collectPreText(et)]:[]}function collectElement(et,tt,nt,rt){var ot=inferWhiteSpace(et,rt),st=et.children||[],ut=st.length,ct=-1,ft=[],pt,ht,mt;if(notRendered(et))return ft;for(is(et,"br")||row(et)&&findAfter(nt,et,row)?mt=lineFeedChar$1:is(et,"p")?(ht=2,mt=2):blockOrCaption(et)&&(ht=1,mt=1);++ct<ut;)pt=innerTextCollection(st[ct],ct,et,{whiteSpace:ot,breakBefore:ct===0?ht:!1,breakAfter:ct===ut-1?mt:is(st[ct+1],"br")}),ft=ft.concat(pt);return cell$1(et)&&findAfter(nt,et,cell$1)&&ft.push(tabChar),ht&&ft.unshift(ht),mt&&ft.push(mt),ft}function collectText(et,tt){var nt=tt.breakBefore,rt=tt.breakAfter,ot=String(et.value),st=-1,ut=ot.length,ct=[],ft=[],pt,ht,mt,yt,vt;for(pt=0,ht=ot.indexOf(lineFeedChar$1),ht=ht===-1?ot.length:ht;ht!==-1&&(mt=ot.slice(pt,ht),mt=removeBidiControlCharacters(mt),mt=trimAndcollapseSpacesAndTabs(mt,nt,rt),ct.push(mt),ht!==ot.length);)pt=ht+1,ht=ot.indexOf(lineFeedChar$1,pt),ht=ht===-1?ot.length:ht;for(st=-1,ut=ct.length,vt="";++st<ut;){if(mt=ct[st],yt=ct[st+1]||"",mt.charCodeAt(mt.length-1)===zeroWidthSpace||yt.charCodeAt(0)===zeroWidthSpace){ft.push(mt),vt="";continue}mt&&(vt&&ft.push(vt),ft.push(mt),vt=spaceChar)}return ft.join("")}function collectPreText(et){return String(et.value)}function removeBidiControlCharacters(et){for(var tt=-1,nt=et.length,rt="";++tt<nt;)isBidiControlCharacter(et.charCodeAt(tt))||(rt+=et.charAt(tt));return rt}function trimAndcollapseSpacesAndTabs(et,tt,nt){for(var rt=0,ot,st=et.length,ut=[],ct;rt<=st&&(ct=et.charCodeAt(rt),!(ct!==space$4&&ct!==tab$3));)rt++;for(rt!==0&&!tt&&ut.push(""),ot=ft(rt-1);rt<st;){for(ot=ot===-1?st:ot,ut.push(et.slice(rt,ot)),rt=ot;rt<=st&&(ct=et.charCodeAt(rt),!(ct!==space$4&&ct!==tab$3));)rt++;rt===st&&rt!==ot&&!nt&&ut.push(""),ot=ft(rt)}return ut.join(" ");function ft(pt){var ht=et.indexOf(spaceChar,pt+1),mt=et.indexOf(tabChar,pt+1),yt=ht===-1||mt===-1?max$3:min$3;return yt(ht,mt)}}function inferWhiteSpace(et,tt){var nt=et.properties||{},rt=tt.whiteSpace||"normal";switch(et.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return nt.wrap?"pre-wrap":"pre";case"td":case"th":return nt.noWrap?"nowrap":rt;case"textarea":return"pre-wrap";default:return rt}}function isBidiControlCharacter(et){switch(et){case alm:case ltr:case rtl:case lre:case rle:case pdf:case lro:case rlo:case lri:case rli:case fsi:case pdi:return!0;default:return!1}}function cell$1(et){return is(et,["th","td"])}function row(et){return is(et,["tr"])}function blockOrCaption(et){return is(et,["caption","html","body","address","blockquote","center","dialog","div","figure","figcaption","footer","form,","header","hr","legend","listing","main","p","plaintext","pre","xmp","article","aside","h1","h2","h3","h4","h5","h6","hgroup","nav","section","dir","dd","dl","dt","menu","ol","ul"])}function notRendered(et){var tt=et.properties||{};return is(et,["datalist","head","noembed","noframes","rp","script","style","template","title","noscript"])||tt.hidden||is(et,"dialog")&&!tt.open}const visit$5=unistUtilVisit$1,katex=katex$1.exports.renderToString,unified$1=unified_1,parse$d=rehypeParse,toText=hastUtilToText;var rehypeKatex_1=rehypeKatex;const assign=Object.assign,parseHtml=unified$1().use(parse$d,{fragment:!0,position:!1}),source$3="rehype-katex";function rehypeKatex(et){const nt=(et||{}).throwOnError||!1;return rt;function rt(ot,st){visit$5(ot,"element",ut);function ut(ct){const ft=ct.properties.className||[],pt=ft.includes("math-inline"),ht=ft.includes("math-display");if(!pt&&!ht)return;const mt=toText(ct);let yt;try{yt=katex(mt,assign({},et,{displayMode:ht,throwOnError:!0}))}catch(vt){const Tt=nt?"fail":"message",Et=[source$3,vt.name.toLowerCase()].join(":");st[Tt](vt.message,ct.position,Et),yt=katex(mt,assign({},et,{displayMode:ht,throwOnError:!1,strict:"ignore"}))}ct.children=parseHtml.parse(yt).children}}}var unicode$3={};const UNDEFINED_CODE_POINTS=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];unicode$3.REPLACEMENT_CHARACTER="\uFFFD";unicode$3.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};unicode$3.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};unicode$3.isSurrogate=function(et){return et>=55296&&et<=57343};unicode$3.isSurrogatePair=function(et){return et>=56320&&et<=57343};unicode$3.getSurrogatePairCodePoint=function(et,tt){return(et-55296)*1024+9216+tt};unicode$3.isControlCodePoint=function(et){return et!==32&&et!==10&&et!==13&&et!==9&&et!==12&&et>=1&&et<=31||et>=127&&et<=159};unicode$3.isUndefinedCodePoint=function(et){return et>=64976&&et<=65007||UNDEFINED_CODE_POINTS.indexOf(et)>-1};var errorCodes={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"};const unicode$2=unicode$3,ERR$2=errorCodes,$$8=unicode$2.CODE_POINTS,DEFAULT_BUFFER_WATERLINE=1<<16;class Preprocessor$1{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=DEFAULT_BUFFER_WATERLINE}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(tt){if(this.pos!==this.lastCharPos){const nt=this.html.charCodeAt(this.pos+1);if(unicode$2.isSurrogatePair(nt))return this.pos++,this._addGap(),unicode$2.getSurrogatePairCodePoint(tt,nt)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,$$8.EOF;return this._err(ERR$2.surrogateInInputStream),tt}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(tt,nt){this.html?this.html+=tt:this.html=tt,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=nt}insertHtmlAtCurrentPos(tt){this.html=this.html.substring(0,this.pos+1)+tt+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,$$8.EOF;let tt=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&tt===$$8.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):tt===$$8.CARRIAGE_RETURN?(this.skipNextNewLine=!0,$$8.LINE_FEED):(this.skipNextNewLine=!1,unicode$2.isSurrogate(tt)&&(tt=this._processSurrogate(tt)),tt>31&&tt<127||tt===$$8.LINE_FEED||tt===$$8.CARRIAGE_RETURN||tt>159&&tt<64976||this._checkForProblematicCharacters(tt),tt)}_checkForProblematicCharacters(tt){unicode$2.isControlCodePoint(tt)?this._err(ERR$2.controlCharacterInInputStream):unicode$2.isUndefinedCodePoint(tt)&&this._err(ERR$2.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}var preprocessor=Preprocessor$1,namedEntityData=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]);const Preprocessor=preprocessor,unicode$1=unicode$3,neTree=namedEntityData,ERR$1=errorCodes,$$7=unicode$1.CODE_POINTS,$$=unicode$1.CODE_POINT_SEQUENCES,C1_CONTROLS_REFERENCE_REPLACEMENTS={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},HAS_DATA_FLAG=1<<0,DATA_DUPLET_FLAG=1<<1,HAS_BRANCHES_FLAG=1<<2,MAX_BRANCH_MARKER_VALUE=HAS_DATA_FLAG|DATA_DUPLET_FLAG|HAS_BRANCHES_FLAG,DATA_STATE="DATA_STATE",RCDATA_STATE="RCDATA_STATE",RAWTEXT_STATE="RAWTEXT_STATE",SCRIPT_DATA_STATE="SCRIPT_DATA_STATE",PLAINTEXT_STATE="PLAINTEXT_STATE",TAG_OPEN_STATE="TAG_OPEN_STATE",END_TAG_OPEN_STATE="END_TAG_OPEN_STATE",TAG_NAME_STATE="TAG_NAME_STATE",RCDATA_LESS_THAN_SIGN_STATE="RCDATA_LESS_THAN_SIGN_STATE",RCDATA_END_TAG_OPEN_STATE="RCDATA_END_TAG_OPEN_STATE",RCDATA_END_TAG_NAME_STATE="RCDATA_END_TAG_NAME_STATE",RAWTEXT_LESS_THAN_SIGN_STATE="RAWTEXT_LESS_THAN_SIGN_STATE",RAWTEXT_END_TAG_OPEN_STATE="RAWTEXT_END_TAG_OPEN_STATE",RAWTEXT_END_TAG_NAME_STATE="RAWTEXT_END_TAG_NAME_STATE",SCRIPT_DATA_LESS_THAN_SIGN_STATE="SCRIPT_DATA_LESS_THAN_SIGN_STATE",SCRIPT_DATA_END_TAG_OPEN_STATE="SCRIPT_DATA_END_TAG_OPEN_STATE",SCRIPT_DATA_END_TAG_NAME_STATE="SCRIPT_DATA_END_TAG_NAME_STATE",SCRIPT_DATA_ESCAPE_START_STATE="SCRIPT_DATA_ESCAPE_START_STATE",SCRIPT_DATA_ESCAPE_START_DASH_STATE="SCRIPT_DATA_ESCAPE_START_DASH_STATE",SCRIPT_DATA_ESCAPED_STATE="SCRIPT_DATA_ESCAPED_STATE",SCRIPT_DATA_ESCAPED_DASH_STATE="SCRIPT_DATA_ESCAPED_DASH_STATE",SCRIPT_DATA_ESCAPED_DASH_DASH_STATE="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_STATE="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",BEFORE_ATTRIBUTE_NAME_STATE="BEFORE_ATTRIBUTE_NAME_STATE",ATTRIBUTE_NAME_STATE="ATTRIBUTE_NAME_STATE",AFTER_ATTRIBUTE_NAME_STATE="AFTER_ATTRIBUTE_NAME_STATE",BEFORE_ATTRIBUTE_VALUE_STATE="BEFORE_ATTRIBUTE_VALUE_STATE",ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",ATTRIBUTE_VALUE_UNQUOTED_STATE="ATTRIBUTE_VALUE_UNQUOTED_STATE",AFTER_ATTRIBUTE_VALUE_QUOTED_STATE="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",SELF_CLOSING_START_TAG_STATE="SELF_CLOSING_START_TAG_STATE",BOGUS_COMMENT_STATE="BOGUS_COMMENT_STATE",MARKUP_DECLARATION_OPEN_STATE="MARKUP_DECLARATION_OPEN_STATE",COMMENT_START_STATE="COMMENT_START_STATE",COMMENT_START_DASH_STATE="COMMENT_START_DASH_STATE",COMMENT_STATE="COMMENT_STATE",COMMENT_LESS_THAN_SIGN_STATE="COMMENT_LESS_THAN_SIGN_STATE",COMMENT_LESS_THAN_SIGN_BANG_STATE="COMMENT_LESS_THAN_SIGN_BANG_STATE",COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",COMMENT_END_DASH_STATE="COMMENT_END_DASH_STATE",COMMENT_END_STATE="COMMENT_END_STATE",COMMENT_END_BANG_STATE="COMMENT_END_BANG_STATE",DOCTYPE_STATE="DOCTYPE_STATE",BEFORE_DOCTYPE_NAME_STATE="BEFORE_DOCTYPE_NAME_STATE",DOCTYPE_NAME_STATE="DOCTYPE_NAME_STATE",AFTER_DOCTYPE_NAME_STATE="AFTER_DOCTYPE_NAME_STATE",AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",BOGUS_DOCTYPE_STATE="BOGUS_DOCTYPE_STATE",CDATA_SECTION_STATE="CDATA_SECTION_STATE",CDATA_SECTION_BRACKET_STATE="CDATA_SECTION_BRACKET_STATE",CDATA_SECTION_END_STATE="CDATA_SECTION_END_STATE",CHARACTER_REFERENCE_STATE="CHARACTER_REFERENCE_STATE",NAMED_CHARACTER_REFERENCE_STATE="NAMED_CHARACTER_REFERENCE_STATE",AMBIGUOUS_AMPERSAND_STATE="AMBIGUOS_AMPERSAND_STATE",NUMERIC_CHARACTER_REFERENCE_STATE="NUMERIC_CHARACTER_REFERENCE_STATE",HEXADEMICAL_CHARACTER_REFERENCE_START_STATE="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",DECIMAL_CHARACTER_REFERENCE_START_STATE="DECIMAL_CHARACTER_REFERENCE_START_STATE",HEXADEMICAL_CHARACTER_REFERENCE_STATE="HEXADEMICAL_CHARACTER_REFERENCE_STATE",DECIMAL_CHARACTER_REFERENCE_STATE="DECIMAL_CHARACTER_REFERENCE_STATE",NUMERIC_CHARACTER_REFERENCE_END_STATE="NUMERIC_CHARACTER_REFERENCE_END_STATE";function isWhitespace(et){return et===$$7.SPACE||et===$$7.LINE_FEED||et===$$7.TABULATION||et===$$7.FORM_FEED}function isAsciiDigit(et){return et>=$$7.DIGIT_0&&et<=$$7.DIGIT_9}function isAsciiUpper(et){return et>=$$7.LATIN_CAPITAL_A&&et<=$$7.LATIN_CAPITAL_Z}function isAsciiLower(et){return et>=$$7.LATIN_SMALL_A&&et<=$$7.LATIN_SMALL_Z}function isAsciiLetter(et){return isAsciiLower(et)||isAsciiUpper(et)}function isAsciiAlphaNumeric(et){return isAsciiLetter(et)||isAsciiDigit(et)}function isAsciiUpperHexDigit(et){return et>=$$7.LATIN_CAPITAL_A&&et<=$$7.LATIN_CAPITAL_F}function isAsciiLowerHexDigit(et){return et>=$$7.LATIN_SMALL_A&&et<=$$7.LATIN_SMALL_F}function isAsciiHexDigit(et){return isAsciiDigit(et)||isAsciiUpperHexDigit(et)||isAsciiLowerHexDigit(et)}function toAsciiLowerCodePoint(et){return et+32}function toChar(et){return et<=65535?String.fromCharCode(et):(et-=65536,String.fromCharCode(et>>>10&1023|55296)+String.fromCharCode(56320|et&1023))}function toAsciiLowerChar(et){return String.fromCharCode(toAsciiLowerCodePoint(et))}function findNamedEntityTreeBranch(et,tt){const nt=neTree[++et];let rt=++et,ot=rt+nt-1;for(;rt<=ot;){const st=rt+ot>>>1,ut=neTree[st];if(ut<tt)rt=st+1;else if(ut>tt)ot=st-1;else return neTree[st+nt]}return-1}class Tokenizer$4{constructor(){this.preprocessor=new Preprocessor,this.tokenQueue=[],this.allowCDATA=!1,this.state=DATA_STATE,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(tt){this._consume(),this._err(tt),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const tt=this._consume();this._ensureHibernation()||this[this.state](tt)}return this.tokenQueue.shift()}write(tt,nt){this.active=!0,this.preprocessor.write(tt,nt)}insertHtmlAtCurrentPos(tt){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(tt)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Tokenizer$4.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(tt){this.state=tt,this._unconsume()}_consumeSequenceIfMatch(tt,nt,rt){let ot=0,st=!0;const ut=tt.length;let ct=0,ft=nt,pt;for(;ct<ut;ct++){if(ct>0&&(ft=this._consume(),ot++),ft===$$7.EOF){st=!1;break}if(pt=tt[ct],ft!==pt&&(rt||ft!==toAsciiLowerCodePoint(pt))){st=!1;break}}if(!st)for(;ot--;)this._unconsume();return st}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==$$.SCRIPT_STRING.length)return!1;for(let tt=0;tt<this.tempBuff.length;tt++)if(this.tempBuff[tt]!==$$.SCRIPT_STRING[tt])return!1;return!0}_createStartTagToken(){this.currentToken={type:Tokenizer$4.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:Tokenizer$4.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:Tokenizer$4.COMMENT_TOKEN,data:""}}_createDoctypeToken(tt){this.currentToken={type:Tokenizer$4.DOCTYPE_TOKEN,name:tt,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(tt,nt){this.currentCharacterToken={type:tt,chars:nt}}_createEOFToken(){this.currentToken={type:Tokenizer$4.EOF_TOKEN}}_createAttr(tt){this.currentAttr={name:tt,value:""}}_leaveAttrName(tt){Tokenizer$4.getTokenAttr(this.currentToken,this.currentAttr.name)===null?this.currentToken.attrs.push(this.currentAttr):this._err(ERR$1.duplicateAttribute),this.state=tt}_leaveAttrValue(tt){this.state=tt}_emitCurrentToken(){this._emitCurrentCharacterToken();const tt=this.currentToken;this.currentToken=null,tt.type===Tokenizer$4.START_TAG_TOKEN?this.lastStartTagName=tt.tagName:tt.type===Tokenizer$4.END_TAG_TOKEN&&(tt.attrs.length>0&&this._err(ERR$1.endTagWithAttributes),tt.selfClosing&&this._err(ERR$1.endTagWithTrailingSolidus)),this.tokenQueue.push(tt)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(tt,nt){this.currentCharacterToken&&this.currentCharacterToken.type!==tt&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=nt:this._createCharacterToken(tt,nt)}_emitCodePoint(tt){let nt=Tokenizer$4.CHARACTER_TOKEN;isWhitespace(tt)?nt=Tokenizer$4.WHITESPACE_CHARACTER_TOKEN:tt===$$7.NULL&&(nt=Tokenizer$4.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(nt,toChar(tt))}_emitSeveralCodePoints(tt){for(let nt=0;nt<tt.length;nt++)this._emitCodePoint(tt[nt])}_emitChars(tt){this._appendCharToCurrentCharacterToken(Tokenizer$4.CHARACTER_TOKEN,tt)}_matchNamedCharacterReference(tt){let nt=null,rt=1,ot=findNamedEntityTreeBranch(0,tt);for(this.tempBuff.push(tt);ot>-1;){const st=neTree[ot],ut=st<MAX_BRANCH_MARKER_VALUE;ut&&st&HAS_DATA_FLAG&&(nt=st&DATA_DUPLET_FLAG?[neTree[++ot],neTree[++ot]]:[neTree[++ot]],rt=0);const ft=this._consume();if(this.tempBuff.push(ft),rt++,ft===$$7.EOF)break;ut?ot=st&HAS_BRANCHES_FLAG?findNamedEntityTreeBranch(ot,ft):-1:ot=ft===st?++ot:-1}for(;rt--;)this.tempBuff.pop(),this._unconsume();return nt}_isCharacterReferenceInAttribute(){return this.returnState===ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE||this.returnState===ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE||this.returnState===ATTRIBUTE_VALUE_UNQUOTED_STATE}_isCharacterReferenceAttributeQuirk(tt){if(!tt&&this._isCharacterReferenceInAttribute()){const nt=this._consume();return this._unconsume(),nt===$$7.EQUALS_SIGN||isAsciiAlphaNumeric(nt)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let tt=0;tt<this.tempBuff.length;tt++)this.currentAttr.value+=toChar(this.tempBuff[tt]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[DATA_STATE](tt){this.preprocessor.dropParsedChunk(),tt===$$7.LESS_THAN_SIGN?this.state=TAG_OPEN_STATE:tt===$$7.AMPERSAND?(this.returnState=DATA_STATE,this.state=CHARACTER_REFERENCE_STATE):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._emitCodePoint(tt)):tt===$$7.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[RCDATA_STATE](tt){this.preprocessor.dropParsedChunk(),tt===$$7.AMPERSAND?(this.returnState=RCDATA_STATE,this.state=CHARACTER_REFERENCE_STATE):tt===$$7.LESS_THAN_SIGN?this.state=RCDATA_LESS_THAN_SIGN_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[RAWTEXT_STATE](tt){this.preprocessor.dropParsedChunk(),tt===$$7.LESS_THAN_SIGN?this.state=RAWTEXT_LESS_THAN_SIGN_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[SCRIPT_DATA_STATE](tt){this.preprocessor.dropParsedChunk(),tt===$$7.LESS_THAN_SIGN?this.state=SCRIPT_DATA_LESS_THAN_SIGN_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[PLAINTEXT_STATE](tt){this.preprocessor.dropParsedChunk(),tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?this._emitEOFToken():this._emitCodePoint(tt)}[TAG_OPEN_STATE](tt){tt===$$7.EXCLAMATION_MARK?this.state=MARKUP_DECLARATION_OPEN_STATE:tt===$$7.SOLIDUS?this.state=END_TAG_OPEN_STATE:isAsciiLetter(tt)?(this._createStartTagToken(),this._reconsumeInState(TAG_NAME_STATE)):tt===$$7.QUESTION_MARK?(this._err(ERR$1.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(BOGUS_COMMENT_STATE)):tt===$$7.EOF?(this._err(ERR$1.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(ERR$1.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(DATA_STATE))}[END_TAG_OPEN_STATE](tt){isAsciiLetter(tt)?(this._createEndTagToken(),this._reconsumeInState(TAG_NAME_STATE)):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.missingEndTagName),this.state=DATA_STATE):tt===$$7.EOF?(this._err(ERR$1.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(ERR$1.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(BOGUS_COMMENT_STATE))}[TAG_NAME_STATE](tt){isWhitespace(tt)?this.state=BEFORE_ATTRIBUTE_NAME_STATE:tt===$$7.SOLIDUS?this.state=SELF_CLOSING_START_TAG_STATE:tt===$$7.GREATER_THAN_SIGN?(this.state=DATA_STATE,this._emitCurrentToken()):isAsciiUpper(tt)?this.currentToken.tagName+=toAsciiLowerChar(tt):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.tagName+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.EOF?(this._err(ERR$1.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=toChar(tt)}[RCDATA_LESS_THAN_SIGN_STATE](tt){tt===$$7.SOLIDUS?(this.tempBuff=[],this.state=RCDATA_END_TAG_OPEN_STATE):(this._emitChars("<"),this._reconsumeInState(RCDATA_STATE))}[RCDATA_END_TAG_OPEN_STATE](tt){isAsciiLetter(tt)?(this._createEndTagToken(),this._reconsumeInState(RCDATA_END_TAG_NAME_STATE)):(this._emitChars("</"),this._reconsumeInState(RCDATA_STATE))}[RCDATA_END_TAG_NAME_STATE](tt){if(isAsciiUpper(tt))this.currentToken.tagName+=toAsciiLowerChar(tt),this.tempBuff.push(tt);else if(isAsciiLower(tt))this.currentToken.tagName+=toChar(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE;return}if(tt===$$7.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE;return}if(tt===$$7.GREATER_THAN_SIGN){this.state=DATA_STATE,this._emitCurrentToken();return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(RCDATA_STATE)}}[RAWTEXT_LESS_THAN_SIGN_STATE](tt){tt===$$7.SOLIDUS?(this.tempBuff=[],this.state=RAWTEXT_END_TAG_OPEN_STATE):(this._emitChars("<"),this._reconsumeInState(RAWTEXT_STATE))}[RAWTEXT_END_TAG_OPEN_STATE](tt){isAsciiLetter(tt)?(this._createEndTagToken(),this._reconsumeInState(RAWTEXT_END_TAG_NAME_STATE)):(this._emitChars("</"),this._reconsumeInState(RAWTEXT_STATE))}[RAWTEXT_END_TAG_NAME_STATE](tt){if(isAsciiUpper(tt))this.currentToken.tagName+=toAsciiLowerChar(tt),this.tempBuff.push(tt);else if(isAsciiLower(tt))this.currentToken.tagName+=toChar(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE;return}if(tt===$$7.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE;return}if(tt===$$7.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=DATA_STATE;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(RAWTEXT_STATE)}}[SCRIPT_DATA_LESS_THAN_SIGN_STATE](tt){tt===$$7.SOLIDUS?(this.tempBuff=[],this.state=SCRIPT_DATA_END_TAG_OPEN_STATE):tt===$$7.EXCLAMATION_MARK?(this.state=SCRIPT_DATA_ESCAPE_START_STATE,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(SCRIPT_DATA_STATE))}[SCRIPT_DATA_END_TAG_OPEN_STATE](tt){isAsciiLetter(tt)?(this._createEndTagToken(),this._reconsumeInState(SCRIPT_DATA_END_TAG_NAME_STATE)):(this._emitChars("</"),this._reconsumeInState(SCRIPT_DATA_STATE))}[SCRIPT_DATA_END_TAG_NAME_STATE](tt){if(isAsciiUpper(tt))this.currentToken.tagName+=toAsciiLowerChar(tt),this.tempBuff.push(tt);else if(isAsciiLower(tt))this.currentToken.tagName+=toChar(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE;return}else if(tt===$$7.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE;return}else if(tt===$$7.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=DATA_STATE;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(SCRIPT_DATA_STATE)}}[SCRIPT_DATA_ESCAPE_START_STATE](tt){tt===$$7.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPE_START_DASH_STATE,this._emitChars("-")):this._reconsumeInState(SCRIPT_DATA_STATE)}[SCRIPT_DATA_ESCAPE_START_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPED_DASH_DASH_STATE,this._emitChars("-")):this._reconsumeInState(SCRIPT_DATA_STATE)}[SCRIPT_DATA_ESCAPED_STATE](tt){tt===$$7.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPED_DASH_STATE,this._emitChars("-")):tt===$$7.LESS_THAN_SIGN?this.state=SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?(this._err(ERR$1.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(tt)}[SCRIPT_DATA_ESCAPED_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?(this.state=SCRIPT_DATA_ESCAPED_DASH_DASH_STATE,this._emitChars("-")):tt===$$7.LESS_THAN_SIGN?this.state=SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.state=SCRIPT_DATA_ESCAPED_STATE,this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?(this._err(ERR$1.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_ESCAPED_STATE,this._emitCodePoint(tt))}[SCRIPT_DATA_ESCAPED_DASH_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?this._emitChars("-"):tt===$$7.LESS_THAN_SIGN?this.state=SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE:tt===$$7.GREATER_THAN_SIGN?(this.state=SCRIPT_DATA_STATE,this._emitChars(">")):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.state=SCRIPT_DATA_ESCAPED_STATE,this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?(this._err(ERR$1.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_ESCAPED_STATE,this._emitCodePoint(tt))}[SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE](tt){tt===$$7.SOLIDUS?(this.tempBuff=[],this.state=SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE):isAsciiLetter(tt)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE)):(this._emitChars("<"),this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE))}[SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE](tt){isAsciiLetter(tt)?(this._createEndTagToken(),this._reconsumeInState(SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE)):(this._emitChars("</"),this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE))}[SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE](tt){if(isAsciiUpper(tt))this.currentToken.tagName+=toAsciiLowerChar(tt),this.tempBuff.push(tt);else if(isAsciiLower(tt))this.currentToken.tagName+=toChar(tt),this.tempBuff.push(tt);else{if(this.lastStartTagName===this.currentToken.tagName){if(isWhitespace(tt)){this.state=BEFORE_ATTRIBUTE_NAME_STATE;return}if(tt===$$7.SOLIDUS){this.state=SELF_CLOSING_START_TAG_STATE;return}if(tt===$$7.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=DATA_STATE;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE)}}[SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE](tt){isWhitespace(tt)||tt===$$7.SOLIDUS||tt===$$7.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?SCRIPT_DATA_DOUBLE_ESCAPED_STATE:SCRIPT_DATA_ESCAPED_STATE,this._emitCodePoint(tt)):isAsciiUpper(tt)?(this.tempBuff.push(toAsciiLowerCodePoint(tt)),this._emitCodePoint(tt)):isAsciiLower(tt)?(this.tempBuff.push(tt),this._emitCodePoint(tt)):this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE)}[SCRIPT_DATA_DOUBLE_ESCAPED_STATE](tt){tt===$$7.HYPHEN_MINUS?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE,this._emitChars("-")):tt===$$7.LESS_THAN_SIGN?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE,this._emitChars("<")):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?(this._err(ERR$1.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(tt)}[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE,this._emitChars("-")):tt===$$7.LESS_THAN_SIGN?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE,this._emitChars("<")):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE,this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?(this._err(ERR$1.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE,this._emitCodePoint(tt))}[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?this._emitChars("-"):tt===$$7.LESS_THAN_SIGN?(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE,this._emitChars("<")):tt===$$7.GREATER_THAN_SIGN?(this.state=SCRIPT_DATA_STATE,this._emitChars(">")):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE,this._emitChars(unicode$1.REPLACEMENT_CHARACTER)):tt===$$7.EOF?(this._err(ERR$1.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=SCRIPT_DATA_DOUBLE_ESCAPED_STATE,this._emitCodePoint(tt))}[SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE](tt){tt===$$7.SOLIDUS?(this.tempBuff=[],this.state=SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE,this._emitChars("/")):this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE)}[SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE](tt){isWhitespace(tt)||tt===$$7.SOLIDUS||tt===$$7.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?SCRIPT_DATA_ESCAPED_STATE:SCRIPT_DATA_DOUBLE_ESCAPED_STATE,this._emitCodePoint(tt)):isAsciiUpper(tt)?(this.tempBuff.push(toAsciiLowerCodePoint(tt)),this._emitCodePoint(tt)):isAsciiLower(tt)?(this.tempBuff.push(tt),this._emitCodePoint(tt)):this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE)}[BEFORE_ATTRIBUTE_NAME_STATE](tt){isWhitespace(tt)||(tt===$$7.SOLIDUS||tt===$$7.GREATER_THAN_SIGN||tt===$$7.EOF?this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE):tt===$$7.EQUALS_SIGN?(this._err(ERR$1.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=ATTRIBUTE_NAME_STATE):(this._createAttr(""),this._reconsumeInState(ATTRIBUTE_NAME_STATE)))}[ATTRIBUTE_NAME_STATE](tt){isWhitespace(tt)||tt===$$7.SOLIDUS||tt===$$7.GREATER_THAN_SIGN||tt===$$7.EOF?(this._leaveAttrName(AFTER_ATTRIBUTE_NAME_STATE),this._unconsume()):tt===$$7.EQUALS_SIGN?this._leaveAttrName(BEFORE_ATTRIBUTE_VALUE_STATE):isAsciiUpper(tt)?this.currentAttr.name+=toAsciiLowerChar(tt):tt===$$7.QUOTATION_MARK||tt===$$7.APOSTROPHE||tt===$$7.LESS_THAN_SIGN?(this._err(ERR$1.unexpectedCharacterInAttributeName),this.currentAttr.name+=toChar(tt)):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentAttr.name+=unicode$1.REPLACEMENT_CHARACTER):this.currentAttr.name+=toChar(tt)}[AFTER_ATTRIBUTE_NAME_STATE](tt){isWhitespace(tt)||(tt===$$7.SOLIDUS?this.state=SELF_CLOSING_START_TAG_STATE:tt===$$7.EQUALS_SIGN?this.state=BEFORE_ATTRIBUTE_VALUE_STATE:tt===$$7.GREATER_THAN_SIGN?(this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(ATTRIBUTE_NAME_STATE)))}[BEFORE_ATTRIBUTE_VALUE_STATE](tt){isWhitespace(tt)||(tt===$$7.QUOTATION_MARK?this.state=ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE:tt===$$7.APOSTROPHE?this.state=ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE:tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.missingAttributeValue),this.state=DATA_STATE,this._emitCurrentToken()):this._reconsumeInState(ATTRIBUTE_VALUE_UNQUOTED_STATE))}[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](tt){tt===$$7.QUOTATION_MARK?this.state=AFTER_ATTRIBUTE_VALUE_QUOTED_STATE:tt===$$7.AMPERSAND?(this.returnState=ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE,this.state=CHARACTER_REFERENCE_STATE):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentAttr.value+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.EOF?(this._err(ERR$1.eofInTag),this._emitEOFToken()):this.currentAttr.value+=toChar(tt)}[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](tt){tt===$$7.APOSTROPHE?this.state=AFTER_ATTRIBUTE_VALUE_QUOTED_STATE:tt===$$7.AMPERSAND?(this.returnState=ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE,this.state=CHARACTER_REFERENCE_STATE):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentAttr.value+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.EOF?(this._err(ERR$1.eofInTag),this._emitEOFToken()):this.currentAttr.value+=toChar(tt)}[ATTRIBUTE_VALUE_UNQUOTED_STATE](tt){isWhitespace(tt)?this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE):tt===$$7.AMPERSAND?(this.returnState=ATTRIBUTE_VALUE_UNQUOTED_STATE,this.state=CHARACTER_REFERENCE_STATE):tt===$$7.GREATER_THAN_SIGN?(this._leaveAttrValue(DATA_STATE),this._emitCurrentToken()):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentAttr.value+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.QUOTATION_MARK||tt===$$7.APOSTROPHE||tt===$$7.LESS_THAN_SIGN||tt===$$7.EQUALS_SIGN||tt===$$7.GRAVE_ACCENT?(this._err(ERR$1.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=toChar(tt)):tt===$$7.EOF?(this._err(ERR$1.eofInTag),this._emitEOFToken()):this.currentAttr.value+=toChar(tt)}[AFTER_ATTRIBUTE_VALUE_QUOTED_STATE](tt){isWhitespace(tt)?this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE):tt===$$7.SOLIDUS?this._leaveAttrValue(SELF_CLOSING_START_TAG_STATE):tt===$$7.GREATER_THAN_SIGN?(this._leaveAttrValue(DATA_STATE),this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInTag),this._emitEOFToken()):(this._err(ERR$1.missingWhitespaceBetweenAttributes),this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE))}[SELF_CLOSING_START_TAG_STATE](tt){tt===$$7.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInTag),this._emitEOFToken()):(this._err(ERR$1.unexpectedSolidusInTag),this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE))}[BOGUS_COMMENT_STATE](tt){tt===$$7.GREATER_THAN_SIGN?(this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._emitCurrentToken(),this._emitEOFToken()):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.data+=unicode$1.REPLACEMENT_CHARACTER):this.currentToken.data+=toChar(tt)}[MARKUP_DECLARATION_OPEN_STATE](tt){this._consumeSequenceIfMatch($$.DASH_DASH_STRING,tt,!0)?(this._createCommentToken(),this.state=COMMENT_START_STATE):this._consumeSequenceIfMatch($$.DOCTYPE_STRING,tt,!1)?this.state=DOCTYPE_STATE:this._consumeSequenceIfMatch($$.CDATA_START_STRING,tt,!0)?this.allowCDATA?this.state=CDATA_SECTION_STATE:(this._err(ERR$1.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=BOGUS_COMMENT_STATE):this._ensureHibernation()||(this._err(ERR$1.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(BOGUS_COMMENT_STATE))}[COMMENT_START_STATE](tt){tt===$$7.HYPHEN_MINUS?this.state=COMMENT_START_DASH_STATE:tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.abruptClosingOfEmptyComment),this.state=DATA_STATE,this._emitCurrentToken()):this._reconsumeInState(COMMENT_STATE)}[COMMENT_START_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?this.state=COMMENT_END_STATE:tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.abruptClosingOfEmptyComment),this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(COMMENT_STATE))}[COMMENT_STATE](tt){tt===$$7.HYPHEN_MINUS?this.state=COMMENT_END_DASH_STATE:tt===$$7.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=COMMENT_LESS_THAN_SIGN_STATE):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.data+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.EOF?(this._err(ERR$1.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=toChar(tt)}[COMMENT_LESS_THAN_SIGN_STATE](tt){tt===$$7.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=COMMENT_LESS_THAN_SIGN_BANG_STATE):tt===$$7.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(COMMENT_STATE)}[COMMENT_LESS_THAN_SIGN_BANG_STATE](tt){tt===$$7.HYPHEN_MINUS?this.state=COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE:this._reconsumeInState(COMMENT_STATE)}[COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?this.state=COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE:this._reconsumeInState(COMMENT_END_DASH_STATE)}[COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE](tt){tt!==$$7.GREATER_THAN_SIGN&&tt!==$$7.EOF&&this._err(ERR$1.nestedComment),this._reconsumeInState(COMMENT_END_STATE)}[COMMENT_END_DASH_STATE](tt){tt===$$7.HYPHEN_MINUS?this.state=COMMENT_END_STATE:tt===$$7.EOF?(this._err(ERR$1.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(COMMENT_STATE))}[COMMENT_END_STATE](tt){tt===$$7.GREATER_THAN_SIGN?(this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EXCLAMATION_MARK?this.state=COMMENT_END_BANG_STATE:tt===$$7.HYPHEN_MINUS?this.currentToken.data+="-":tt===$$7.EOF?(this._err(ERR$1.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(COMMENT_STATE))}[COMMENT_END_BANG_STATE](tt){tt===$$7.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=COMMENT_END_DASH_STATE):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.incorrectlyClosedComment),this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(COMMENT_STATE))}[DOCTYPE_STATE](tt){isWhitespace(tt)?this.state=BEFORE_DOCTYPE_NAME_STATE:tt===$$7.GREATER_THAN_SIGN?this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE))}[BEFORE_DOCTYPE_NAME_STATE](tt){isWhitespace(tt)||(isAsciiUpper(tt)?(this._createDoctypeToken(toAsciiLowerChar(tt)),this.state=DOCTYPE_NAME_STATE):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this._createDoctypeToken(unicode$1.REPLACEMENT_CHARACTER),this.state=DOCTYPE_NAME_STATE):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(toChar(tt)),this.state=DOCTYPE_NAME_STATE))}[DOCTYPE_NAME_STATE](tt){isWhitespace(tt)?this.state=AFTER_DOCTYPE_NAME_STATE:tt===$$7.GREATER_THAN_SIGN?(this.state=DATA_STATE,this._emitCurrentToken()):isAsciiUpper(tt)?this.currentToken.name+=toAsciiLowerChar(tt):tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.name+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=toChar(tt)}[AFTER_DOCTYPE_NAME_STATE](tt){isWhitespace(tt)||(tt===$$7.GREATER_THAN_SIGN?(this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch($$.PUBLIC_STRING,tt,!1)?this.state=AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE:this._consumeSequenceIfMatch($$.SYSTEM_STRING,tt,!1)?this.state=AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE:this._ensureHibernation()||(this._err(ERR$1.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE)))}[AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE](tt){isWhitespace(tt)?this.state=BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE:tt===$$7.QUOTATION_MARK?(this._err(ERR$1.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE):tt===$$7.APOSTROPHE?(this._err(ERR$1.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE))}[BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE](tt){isWhitespace(tt)||(tt===$$7.QUOTATION_MARK?(this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE):tt===$$7.APOSTROPHE?(this.currentToken.publicId="",this.state=DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE)))}[DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE](tt){tt===$$7.QUOTATION_MARK?this.state=AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.publicId+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=toChar(tt)}[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](tt){tt===$$7.APOSTROPHE?this.state=AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.publicId+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=toChar(tt)}[AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE](tt){isWhitespace(tt)?this.state=BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE:tt===$$7.GREATER_THAN_SIGN?(this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.QUOTATION_MARK?(this._err(ERR$1.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE):tt===$$7.APOSTROPHE?(this._err(ERR$1.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE))}[BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE](tt){isWhitespace(tt)||(tt===$$7.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.QUOTATION_MARK?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE):tt===$$7.APOSTROPHE?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE)))}[AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE](tt){isWhitespace(tt)?this.state=BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE:tt===$$7.QUOTATION_MARK?(this._err(ERR$1.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE):tt===$$7.APOSTROPHE?(this._err(ERR$1.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE))}[BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE](tt){isWhitespace(tt)||(tt===$$7.QUOTATION_MARK?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE):tt===$$7.APOSTROPHE?(this.currentToken.systemId="",this.state=DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=DATA_STATE,this._emitCurrentToken()):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(BOGUS_DOCTYPE_STATE)))}[DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE](tt){tt===$$7.QUOTATION_MARK?this.state=AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.systemId+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=toChar(tt)}[DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE](tt){tt===$$7.APOSTROPHE?this.state=AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE:tt===$$7.NULL?(this._err(ERR$1.unexpectedNullCharacter),this.currentToken.systemId+=unicode$1.REPLACEMENT_CHARACTER):tt===$$7.GREATER_THAN_SIGN?(this._err(ERR$1.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=toChar(tt)}[AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE](tt){isWhitespace(tt)||(tt===$$7.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.EOF?(this._err(ERR$1.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ERR$1.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(BOGUS_DOCTYPE_STATE)))}[BOGUS_DOCTYPE_STATE](tt){tt===$$7.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=DATA_STATE):tt===$$7.NULL?this._err(ERR$1.unexpectedNullCharacter):tt===$$7.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[CDATA_SECTION_STATE](tt){tt===$$7.RIGHT_SQUARE_BRACKET?this.state=CDATA_SECTION_BRACKET_STATE:tt===$$7.EOF?(this._err(ERR$1.eofInCdata),this._emitEOFToken()):this._emitCodePoint(tt)}[CDATA_SECTION_BRACKET_STATE](tt){tt===$$7.RIGHT_SQUARE_BRACKET?this.state=CDATA_SECTION_END_STATE:(this._emitChars("]"),this._reconsumeInState(CDATA_SECTION_STATE))}[CDATA_SECTION_END_STATE](tt){tt===$$7.GREATER_THAN_SIGN?this.state=DATA_STATE:tt===$$7.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(CDATA_SECTION_STATE))}[CHARACTER_REFERENCE_STATE](tt){this.tempBuff=[$$7.AMPERSAND],tt===$$7.NUMBER_SIGN?(this.tempBuff.push(tt),this.state=NUMERIC_CHARACTER_REFERENCE_STATE):isAsciiAlphaNumeric(tt)?this._reconsumeInState(NAMED_CHARACTER_REFERENCE_STATE):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[NAMED_CHARACTER_REFERENCE_STATE](tt){const nt=this._matchNamedCharacterReference(tt);if(this._ensureHibernation())this.tempBuff=[$$7.AMPERSAND];else if(nt){const rt=this.tempBuff[this.tempBuff.length-1]===$$7.SEMICOLON;this._isCharacterReferenceAttributeQuirk(rt)||(rt||this._errOnNextCodePoint(ERR$1.missingSemicolonAfterCharacterReference),this.tempBuff=nt),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=AMBIGUOUS_AMPERSAND_STATE}[AMBIGUOUS_AMPERSAND_STATE](tt){isAsciiAlphaNumeric(tt)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=toChar(tt):this._emitCodePoint(tt):(tt===$$7.SEMICOLON&&this._err(ERR$1.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[NUMERIC_CHARACTER_REFERENCE_STATE](tt){this.charRefCode=0,tt===$$7.LATIN_SMALL_X||tt===$$7.LATIN_CAPITAL_X?(this.tempBuff.push(tt),this.state=HEXADEMICAL_CHARACTER_REFERENCE_START_STATE):this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_START_STATE)}[HEXADEMICAL_CHARACTER_REFERENCE_START_STATE](tt){isAsciiHexDigit(tt)?this._reconsumeInState(HEXADEMICAL_CHARACTER_REFERENCE_STATE):(this._err(ERR$1.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[DECIMAL_CHARACTER_REFERENCE_START_STATE](tt){isAsciiDigit(tt)?this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_STATE):(this._err(ERR$1.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[HEXADEMICAL_CHARACTER_REFERENCE_STATE](tt){isAsciiUpperHexDigit(tt)?this.charRefCode=this.charRefCode*16+tt-55:isAsciiLowerHexDigit(tt)?this.charRefCode=this.charRefCode*16+tt-87:isAsciiDigit(tt)?this.charRefCode=this.charRefCode*16+tt-48:tt===$$7.SEMICOLON?this.state=NUMERIC_CHARACTER_REFERENCE_END_STATE:(this._err(ERR$1.missingSemicolonAfterCharacterReference),this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE))}[DECIMAL_CHARACTER_REFERENCE_STATE](tt){isAsciiDigit(tt)?this.charRefCode=this.charRefCode*10+tt-48:tt===$$7.SEMICOLON?this.state=NUMERIC_CHARACTER_REFERENCE_END_STATE:(this._err(ERR$1.missingSemicolonAfterCharacterReference),this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE))}[NUMERIC_CHARACTER_REFERENCE_END_STATE](){if(this.charRefCode===$$7.NULL)this._err(ERR$1.nullCharacterReference),this.charRefCode=$$7.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(ERR$1.characterReferenceOutsideUnicodeRange),this.charRefCode=$$7.REPLACEMENT_CHARACTER;else if(unicode$1.isSurrogate(this.charRefCode))this._err(ERR$1.surrogateCharacterReference),this.charRefCode=$$7.REPLACEMENT_CHARACTER;else if(unicode$1.isUndefinedCodePoint(this.charRefCode))this._err(ERR$1.noncharacterCharacterReference);else if(unicode$1.isControlCodePoint(this.charRefCode)||this.charRefCode===$$7.CARRIAGE_RETURN){this._err(ERR$1.controlCharacterReference);const tt=C1_CONTROLS_REFERENCE_REPLACEMENTS[this.charRefCode];tt&&(this.charRefCode=tt)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}Tokenizer$4.CHARACTER_TOKEN="CHARACTER_TOKEN";Tokenizer$4.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";Tokenizer$4.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";Tokenizer$4.START_TAG_TOKEN="START_TAG_TOKEN";Tokenizer$4.END_TAG_TOKEN="END_TAG_TOKEN";Tokenizer$4.COMMENT_TOKEN="COMMENT_TOKEN";Tokenizer$4.DOCTYPE_TOKEN="DOCTYPE_TOKEN";Tokenizer$4.EOF_TOKEN="EOF_TOKEN";Tokenizer$4.HIBERNATION_TOKEN="HIBERNATION_TOKEN";Tokenizer$4.MODE={DATA:DATA_STATE,RCDATA:RCDATA_STATE,RAWTEXT:RAWTEXT_STATE,SCRIPT_DATA:SCRIPT_DATA_STATE,PLAINTEXT:PLAINTEXT_STATE};Tokenizer$4.getTokenAttr=function(et,tt){for(let nt=et.attrs.length-1;nt>=0;nt--)if(et.attrs[nt].name===tt)return et.attrs[nt].value;return null};var tokenizer$2=Tokenizer$4,html$6={};const NS$3=html$6.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};html$6.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};html$6.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const $$6=html$6.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};html$6.SPECIAL_ELEMENTS={[NS$3.HTML]:{[$$6.ADDRESS]:!0,[$$6.APPLET]:!0,[$$6.AREA]:!0,[$$6.ARTICLE]:!0,[$$6.ASIDE]:!0,[$$6.BASE]:!0,[$$6.BASEFONT]:!0,[$$6.BGSOUND]:!0,[$$6.BLOCKQUOTE]:!0,[$$6.BODY]:!0,[$$6.BR]:!0,[$$6.BUTTON]:!0,[$$6.CAPTION]:!0,[$$6.CENTER]:!0,[$$6.COL]:!0,[$$6.COLGROUP]:!0,[$$6.DD]:!0,[$$6.DETAILS]:!0,[$$6.DIR]:!0,[$$6.DIV]:!0,[$$6.DL]:!0,[$$6.DT]:!0,[$$6.EMBED]:!0,[$$6.FIELDSET]:!0,[$$6.FIGCAPTION]:!0,[$$6.FIGURE]:!0,[$$6.FOOTER]:!0,[$$6.FORM]:!0,[$$6.FRAME]:!0,[$$6.FRAMESET]:!0,[$$6.H1]:!0,[$$6.H2]:!0,[$$6.H3]:!0,[$$6.H4]:!0,[$$6.H5]:!0,[$$6.H6]:!0,[$$6.HEAD]:!0,[$$6.HEADER]:!0,[$$6.HGROUP]:!0,[$$6.HR]:!0,[$$6.HTML]:!0,[$$6.IFRAME]:!0,[$$6.IMG]:!0,[$$6.INPUT]:!0,[$$6.LI]:!0,[$$6.LINK]:!0,[$$6.LISTING]:!0,[$$6.MAIN]:!0,[$$6.MARQUEE]:!0,[$$6.MENU]:!0,[$$6.META]:!0,[$$6.NAV]:!0,[$$6.NOEMBED]:!0,[$$6.NOFRAMES]:!0,[$$6.NOSCRIPT]:!0,[$$6.OBJECT]:!0,[$$6.OL]:!0,[$$6.P]:!0,[$$6.PARAM]:!0,[$$6.PLAINTEXT]:!0,[$$6.PRE]:!0,[$$6.SCRIPT]:!0,[$$6.SECTION]:!0,[$$6.SELECT]:!0,[$$6.SOURCE]:!0,[$$6.STYLE]:!0,[$$6.SUMMARY]:!0,[$$6.TABLE]:!0,[$$6.TBODY]:!0,[$$6.TD]:!0,[$$6.TEMPLATE]:!0,[$$6.TEXTAREA]:!0,[$$6.TFOOT]:!0,[$$6.TH]:!0,[$$6.THEAD]:!0,[$$6.TITLE]:!0,[$$6.TR]:!0,[$$6.TRACK]:!0,[$$6.UL]:!0,[$$6.WBR]:!0,[$$6.XMP]:!0},[NS$3.MATHML]:{[$$6.MI]:!0,[$$6.MO]:!0,[$$6.MN]:!0,[$$6.MS]:!0,[$$6.MTEXT]:!0,[$$6.ANNOTATION_XML]:!0},[NS$3.SVG]:{[$$6.TITLE]:!0,[$$6.FOREIGN_OBJECT]:!0,[$$6.DESC]:!0}};const HTML$3=html$6,$$5=HTML$3.TAG_NAMES,NS$2=HTML$3.NAMESPACES;function isImpliedEndTagRequired(et){switch(et.length){case 1:return et===$$5.P;case 2:return et===$$5.RB||et===$$5.RP||et===$$5.RT||et===$$5.DD||et===$$5.DT||et===$$5.LI;case 3:return et===$$5.RTC;case 6:return et===$$5.OPTION;case 8:return et===$$5.OPTGROUP}return!1}function isImpliedEndTagRequiredThoroughly(et){switch(et.length){case 1:return et===$$5.P;case 2:return et===$$5.RB||et===$$5.RP||et===$$5.RT||et===$$5.DD||et===$$5.DT||et===$$5.LI||et===$$5.TD||et===$$5.TH||et===$$5.TR;case 3:return et===$$5.RTC;case 5:return et===$$5.TBODY||et===$$5.TFOOT||et===$$5.THEAD;case 6:return et===$$5.OPTION;case 7:return et===$$5.CAPTION;case 8:return et===$$5.OPTGROUP||et===$$5.COLGROUP}return!1}function isScopingElement(et,tt){switch(et.length){case 2:if(et===$$5.TD||et===$$5.TH)return tt===NS$2.HTML;if(et===$$5.MI||et===$$5.MO||et===$$5.MN||et===$$5.MS)return tt===NS$2.MATHML;break;case 4:if(et===$$5.HTML)return tt===NS$2.HTML;if(et===$$5.DESC)return tt===NS$2.SVG;break;case 5:if(et===$$5.TABLE)return tt===NS$2.HTML;if(et===$$5.MTEXT)return tt===NS$2.MATHML;if(et===$$5.TITLE)return tt===NS$2.SVG;break;case 6:return(et===$$5.APPLET||et===$$5.OBJECT)&&tt===NS$2.HTML;case 7:return(et===$$5.CAPTION||et===$$5.MARQUEE)&&tt===NS$2.HTML;case 8:return et===$$5.TEMPLATE&&tt===NS$2.HTML;case 13:return et===$$5.FOREIGN_OBJECT&&tt===NS$2.SVG;case 14:return et===$$5.ANNOTATION_XML&&tt===NS$2.MATHML}return!1}class OpenElementStack$1{constructor(tt,nt){this.stackTop=-1,this.items=[],this.current=tt,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=nt}_indexOf(tt){let nt=-1;for(let rt=this.stackTop;rt>=0;rt--)if(this.items[rt]===tt){nt=rt;break}return nt}_isInTemplate(){return this.currentTagName===$$5.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===NS$2.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(tt){this.items[++this.stackTop]=tt,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(tt,nt){const rt=this._indexOf(tt);this.items[rt]=nt,rt===this.stackTop&&this._updateCurrentElement()}insertAfter(tt,nt){const rt=this._indexOf(tt)+1;this.items.splice(rt,0,nt),rt===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(tt){for(;this.stackTop>-1;){const nt=this.currentTagName,rt=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),nt===tt&&rt===NS$2.HTML)break}}popUntilElementPopped(tt){for(;this.stackTop>-1;){const nt=this.current;if(this.pop(),nt===tt)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const tt=this.currentTagName,nt=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),tt===$$5.H1||tt===$$5.H2||tt===$$5.H3||tt===$$5.H4||tt===$$5.H5||tt===$$5.H6&&nt===NS$2.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const tt=this.currentTagName,nt=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),tt===$$5.TD||tt===$$5.TH&&nt===NS$2.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==$$5.TABLE&&this.currentTagName!==$$5.TEMPLATE&&this.currentTagName!==$$5.HTML||this.treeAdapter.getNamespaceURI(this.current)!==NS$2.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==$$5.TBODY&&this.currentTagName!==$$5.TFOOT&&this.currentTagName!==$$5.THEAD&&this.currentTagName!==$$5.TEMPLATE&&this.currentTagName!==$$5.HTML||this.treeAdapter.getNamespaceURI(this.current)!==NS$2.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==$$5.TR&&this.currentTagName!==$$5.TEMPLATE&&this.currentTagName!==$$5.HTML||this.treeAdapter.getNamespaceURI(this.current)!==NS$2.HTML;)this.pop()}remove(tt){for(let nt=this.stackTop;nt>=0;nt--)if(this.items[nt]===tt){this.items.splice(nt,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const tt=this.items[1];return tt&&this.treeAdapter.getTagName(tt)===$$5.BODY?tt:null}contains(tt){return this._indexOf(tt)>-1}getCommonAncestor(tt){let nt=this._indexOf(tt);return--nt>=0?this.items[nt]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===$$5.HTML}hasInScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]),ot=this.treeAdapter.getNamespaceURI(this.items[nt]);if(rt===tt&&ot===NS$2.HTML)return!0;if(isScopingElement(rt,ot))return!1}return!0}hasNumberedHeaderInScope(){for(let tt=this.stackTop;tt>=0;tt--){const nt=this.treeAdapter.getTagName(this.items[tt]),rt=this.treeAdapter.getNamespaceURI(this.items[tt]);if((nt===$$5.H1||nt===$$5.H2||nt===$$5.H3||nt===$$5.H4||nt===$$5.H5||nt===$$5.H6)&&rt===NS$2.HTML)return!0;if(isScopingElement(nt,rt))return!1}return!0}hasInListItemScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]),ot=this.treeAdapter.getNamespaceURI(this.items[nt]);if(rt===tt&&ot===NS$2.HTML)return!0;if((rt===$$5.UL||rt===$$5.OL)&&ot===NS$2.HTML||isScopingElement(rt,ot))return!1}return!0}hasInButtonScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]),ot=this.treeAdapter.getNamespaceURI(this.items[nt]);if(rt===tt&&ot===NS$2.HTML)return!0;if(rt===$$5.BUTTON&&ot===NS$2.HTML||isScopingElement(rt,ot))return!1}return!0}hasInTableScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]);if(this.treeAdapter.getNamespaceURI(this.items[nt])===NS$2.HTML){if(rt===tt)return!0;if(rt===$$5.TABLE||rt===$$5.TEMPLATE||rt===$$5.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let tt=this.stackTop;tt>=0;tt--){const nt=this.treeAdapter.getTagName(this.items[tt]);if(this.treeAdapter.getNamespaceURI(this.items[tt])===NS$2.HTML){if(nt===$$5.TBODY||nt===$$5.THEAD||nt===$$5.TFOOT)return!0;if(nt===$$5.TABLE||nt===$$5.HTML)return!1}}return!0}hasInSelectScope(tt){for(let nt=this.stackTop;nt>=0;nt--){const rt=this.treeAdapter.getTagName(this.items[nt]);if(this.treeAdapter.getNamespaceURI(this.items[nt])===NS$2.HTML){if(rt===tt)return!0;if(rt!==$$5.OPTION&&rt!==$$5.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;isImpliedEndTagRequired(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;isImpliedEndTagRequiredThoroughly(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(tt){for(;isImpliedEndTagRequired(this.currentTagName)&&this.currentTagName!==tt;)this.pop()}}var openElementStack=OpenElementStack$1;const NOAH_ARK_CAPACITY=3;class FormattingElementList$1{constructor(tt){this.length=0,this.entries=[],this.treeAdapter=tt,this.bookmark=null}_getNoahArkConditionCandidates(tt){const nt=[];if(this.length>=NOAH_ARK_CAPACITY){const rt=this.treeAdapter.getAttrList(tt).length,ot=this.treeAdapter.getTagName(tt),st=this.treeAdapter.getNamespaceURI(tt);for(let ut=this.length-1;ut>=0;ut--){const ct=this.entries[ut];if(ct.type===FormattingElementList$1.MARKER_ENTRY)break;const ft=ct.element,pt=this.treeAdapter.getAttrList(ft);this.treeAdapter.getTagName(ft)===ot&&this.treeAdapter.getNamespaceURI(ft)===st&&pt.length===rt&&nt.push({idx:ut,attrs:pt})}}return nt.length<NOAH_ARK_CAPACITY?[]:nt}_ensureNoahArkCondition(tt){const nt=this._getNoahArkConditionCandidates(tt);let rt=nt.length;if(rt){const ot=this.treeAdapter.getAttrList(tt),st=ot.length,ut=Object.create(null);for(let ct=0;ct<st;ct++){const ft=ot[ct];ut[ft.name]=ft.value}for(let ct=0;ct<st;ct++)for(let ft=0;ft<rt;ft++){const pt=nt[ft].attrs[ct];if(ut[pt.name]!==pt.value&&(nt.splice(ft,1),rt--),nt.length<NOAH_ARK_CAPACITY)return}for(let ct=rt-1;ct>=NOAH_ARK_CAPACITY-1;ct--)this.entries.splice(nt[ct].idx,1),this.length--}}insertMarker(){this.entries.push({type:FormattingElementList$1.MARKER_ENTRY}),this.length++}pushElement(tt,nt){this._ensureNoahArkCondition(tt),this.entries.push({type:FormattingElementList$1.ELEMENT_ENTRY,element:tt,token:nt}),this.length++}insertElementAfterBookmark(tt,nt){let rt=this.length-1;for(;rt>=0&&this.entries[rt]!==this.bookmark;rt--);this.entries.splice(rt+1,0,{type:FormattingElementList$1.ELEMENT_ENTRY,element:tt,token:nt}),this.length++}removeEntry(tt){for(let nt=this.length-1;nt>=0;nt--)if(this.entries[nt]===tt){this.entries.splice(nt,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const tt=this.entries.pop();if(this.length--,tt.type===FormattingElementList$1.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(tt){for(let nt=this.length-1;nt>=0;nt--){const rt=this.entries[nt];if(rt.type===FormattingElementList$1.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(rt.element)===tt)return rt}return null}getElementEntry(tt){for(let nt=this.length-1;nt>=0;nt--){const rt=this.entries[nt];if(rt.type===FormattingElementList$1.ELEMENT_ENTRY&&rt.element===tt)return rt}return null}}FormattingElementList$1.MARKER_ENTRY="MARKER_ENTRY";FormattingElementList$1.ELEMENT_ENTRY="ELEMENT_ENTRY";var formattingElementList=FormattingElementList$1;class Mixin$9{constructor(tt){const nt={},rt=this._getOverriddenMethods(this,nt);for(const ot of Object.keys(rt))typeof rt[ot]=="function"&&(nt[ot]=tt[ot],tt[ot]=rt[ot])}_getOverriddenMethods(){throw new Error("Not implemented")}}Mixin$9.install=function(et,tt,nt){et.__mixins||(et.__mixins=[]);for(let ot=0;ot<et.__mixins.length;ot++)if(et.__mixins[ot].constructor===tt)return et.__mixins[ot];const rt=new tt(et,nt);return et.__mixins.push(rt),rt};var mixin=Mixin$9;const Mixin$8=mixin;class PositionTrackingPreprocessorMixin$2 extends Mixin$8{constructor(tt){super(tt),this.preprocessor=tt,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(tt,nt){return{advance(){const rt=this.pos+1,ot=this.html[rt];return tt.isEol&&(tt.isEol=!1,tt.line++,tt.lineStartPos=rt),(ot===`
`||ot==="\r"&&this.html[rt+1]!==`
`)&&(tt.isEol=!0),tt.col=rt-tt.lineStartPos+1,tt.offset=tt.droppedBufferSize+rt,nt.advance.call(this)},retreat(){nt.retreat.call(this),tt.isEol=!1,tt.col=this.pos-tt.lineStartPos+1},dropParsedChunk(){const rt=this.pos;nt.dropParsedChunk.call(this);const ot=rt-this.pos;tt.lineStartPos-=ot,tt.droppedBufferSize+=ot,tt.offset=tt.droppedBufferSize+this.pos}}}}var preprocessorMixin$1=PositionTrackingPreprocessorMixin$2;const Mixin$7=mixin,Tokenizer$3=tokenizer$2,PositionTrackingPreprocessorMixin$1=preprocessorMixin$1;class LocationInfoTokenizerMixin$2 extends Mixin$7{constructor(tt){super(tt),this.tokenizer=tt,this.posTracker=Mixin$7.install(tt.preprocessor,PositionTrackingPreprocessorMixin$1),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const tt=this.tokenizer.currentToken,nt=this.tokenizer.currentAttr;tt.location.attrs||(tt.location.attrs=Object.create(null)),tt.location.attrs[nt.name]=this.currentAttrLocation}_getOverriddenMethods(tt,nt){const rt={_createStartTagToken(){nt._createStartTagToken.call(this),this.currentToken.location=tt.ctLoc},_createEndTagToken(){nt._createEndTagToken.call(this),this.currentToken.location=tt.ctLoc},_createCommentToken(){nt._createCommentToken.call(this),this.currentToken.location=tt.ctLoc},_createDoctypeToken(ot){nt._createDoctypeToken.call(this,ot),this.currentToken.location=tt.ctLoc},_createCharacterToken(ot,st){nt._createCharacterToken.call(this,ot,st),this.currentCharacterToken.location=tt.ctLoc},_createEOFToken(){nt._createEOFToken.call(this),this.currentToken.location=tt._getCurrentLocation()},_createAttr(ot){nt._createAttr.call(this,ot),tt.currentAttrLocation=tt._getCurrentLocation()},_leaveAttrName(ot){nt._leaveAttrName.call(this,ot),tt._attachCurrentAttrLocationInfo()},_leaveAttrValue(ot){nt._leaveAttrValue.call(this,ot),tt._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const ot=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=ot.startLine,this.currentCharacterToken.location.endCol=ot.startCol,this.currentCharacterToken.location.endOffset=ot.startOffset),this.currentToken.type===Tokenizer$3.EOF_TOKEN?(ot.endLine=ot.startLine,ot.endCol=ot.startCol,ot.endOffset=ot.startOffset):(ot.endLine=tt.posTracker.line,ot.endCol=tt.posTracker.col+1,ot.endOffset=tt.posTracker.offset+1),nt._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const ot=this.currentCharacterToken&&this.currentCharacterToken.location;ot&&ot.endOffset===-1&&(ot.endLine=tt.posTracker.line,ot.endCol=tt.posTracker.col,ot.endOffset=tt.posTracker.offset),nt._emitCurrentCharacterToken.call(this)}};return Object.keys(Tokenizer$3.MODE).forEach(ot=>{const st=Tokenizer$3.MODE[ot];rt[st]=function(ut){tt.ctLoc=tt._getCurrentLocation(),nt[st].call(this,ut)}}),rt}}var tokenizerMixin$1=LocationInfoTokenizerMixin$2;const Mixin$6=mixin;class LocationInfoOpenElementStackMixin$1 extends Mixin$6{constructor(tt,nt){super(tt),this.onItemPop=nt.onItemPop}_getOverriddenMethods(tt,nt){return{pop(){tt.onItemPop(this.current),nt.pop.call(this)},popAllUpToHtmlElement(){for(let rt=this.stackTop;rt>0;rt--)tt.onItemPop(this.items[rt]);nt.popAllUpToHtmlElement.call(this)},remove(rt){tt.onItemPop(this.current),nt.remove.call(this,rt)}}}}var openElementStackMixin=LocationInfoOpenElementStackMixin$1;const Mixin$5=mixin,Tokenizer$2=tokenizer$2,LocationInfoTokenizerMixin$1=tokenizerMixin$1,LocationInfoOpenElementStackMixin=openElementStackMixin,HTML$2=html$6,$$4=HTML$2.TAG_NAMES;class LocationInfoParserMixin$1 extends Mixin$5{constructor(tt){super(tt),this.parser=tt,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(tt){let nt=null;this.lastStartTagToken&&(nt=Object.assign({},this.lastStartTagToken.location),nt.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(tt,nt)}_setEndLocation(tt,nt){if(this.treeAdapter.getNodeSourceCodeLocation(tt)&&nt.location){const ot=nt.location,st=this.treeAdapter.getTagName(tt),ut=nt.type===Tokenizer$2.END_TAG_TOKEN&&st===nt.tagName,ct={};ut?(ct.endTag=Object.assign({},ot),ct.endLine=ot.endLine,ct.endCol=ot.endCol,ct.endOffset=ot.endOffset):(ct.endLine=ot.startLine,ct.endCol=ot.startCol,ct.endOffset=ot.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(tt,ct)}}_getOverriddenMethods(tt,nt){return{_bootstrap(rt,ot){nt._bootstrap.call(this,rt,ot),tt.lastStartTagToken=null,tt.lastFosterParentingLocation=null,tt.currentToken=null;const st=Mixin$5.install(this.tokenizer,LocationInfoTokenizerMixin$1);tt.posTracker=st.posTracker,Mixin$5.install(this.openElements,LocationInfoOpenElementStackMixin,{onItemPop:function(ut){tt._setEndLocation(ut,tt.currentToken)}})},_runParsingLoop(rt){nt._runParsingLoop.call(this,rt);for(let ot=this.openElements.stackTop;ot>=0;ot--)tt._setEndLocation(this.openElements.items[ot],tt.currentToken)},_processTokenInForeignContent(rt){tt.currentToken=rt,nt._processTokenInForeignContent.call(this,rt)},_processToken(rt){if(tt.currentToken=rt,nt._processToken.call(this,rt),rt.type===Tokenizer$2.END_TAG_TOKEN&&(rt.tagName===$$4.HTML||rt.tagName===$$4.BODY&&this.openElements.hasInScope($$4.BODY)))for(let st=this.openElements.stackTop;st>=0;st--){const ut=this.openElements.items[st];if(this.treeAdapter.getTagName(ut)===rt.tagName){tt._setEndLocation(ut,rt);break}}},_setDocumentType(rt){nt._setDocumentType.call(this,rt);const ot=this.treeAdapter.getChildNodes(this.document),st=ot.length;for(let ut=0;ut<st;ut++){const ct=ot[ut];if(this.treeAdapter.isDocumentTypeNode(ct)){this.treeAdapter.setNodeSourceCodeLocation(ct,rt.location);break}}},_attachElementToTree(rt){tt._setStartLocation(rt),tt.lastStartTagToken=null,nt._attachElementToTree.call(this,rt)},_appendElement(rt,ot){tt.lastStartTagToken=rt,nt._appendElement.call(this,rt,ot)},_insertElement(rt,ot){tt.lastStartTagToken=rt,nt._insertElement.call(this,rt,ot)},_insertTemplate(rt){tt.lastStartTagToken=rt,nt._insertTemplate.call(this,rt);const ot=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(ot,null)},_insertFakeRootElement(){nt._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(rt,ot){nt._appendCommentNode.call(this,rt,ot);const st=this.treeAdapter.getChildNodes(ot),ut=st[st.length-1];this.treeAdapter.setNodeSourceCodeLocation(ut,rt.location)},_findFosterParentingLocation(){return tt.lastFosterParentingLocation=nt._findFosterParentingLocation.call(this),tt.lastFosterParentingLocation},_insertCharacters(rt){nt._insertCharacters.call(this,rt);const ot=this._shouldFosterParentOnInsertion(),st=ot&&tt.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,ut=this.treeAdapter.getChildNodes(st),ct=ot&&tt.lastFosterParentingLocation.beforeElement?ut.indexOf(tt.lastFosterParentingLocation.beforeElement)-1:ut.length-1,ft=ut[ct];if(this.treeAdapter.getNodeSourceCodeLocation(ft)){const{endLine:ht,endCol:mt,endOffset:yt}=rt.location;this.treeAdapter.updateNodeSourceCodeLocation(ft,{endLine:ht,endCol:mt,endOffset:yt})}else this.treeAdapter.setNodeSourceCodeLocation(ft,rt.location)}}}}var parserMixin$1=LocationInfoParserMixin$1;const Mixin$4=mixin;class ErrorReportingMixinBase$3 extends Mixin$4{constructor(tt,nt){super(tt),this.posTracker=null,this.onParseError=nt.onParseError}_setErrorLocation(tt){tt.startLine=tt.endLine=this.posTracker.line,tt.startCol=tt.endCol=this.posTracker.col,tt.startOffset=tt.endOffset=this.posTracker.offset}_reportError(tt){const nt={code:tt,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(nt),this.onParseError(nt)}_getOverriddenMethods(tt){return{_err(nt){tt._reportError(nt)}}}}var mixinBase=ErrorReportingMixinBase$3;const ErrorReportingMixinBase$2=mixinBase,PositionTrackingPreprocessorMixin=preprocessorMixin$1,Mixin$3=mixin;class ErrorReportingPreprocessorMixin$1 extends ErrorReportingMixinBase$2{constructor(tt,nt){super(tt,nt),this.posTracker=Mixin$3.install(tt,PositionTrackingPreprocessorMixin),this.lastErrOffset=-1}_reportError(tt){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(tt))}}var preprocessorMixin=ErrorReportingPreprocessorMixin$1;const ErrorReportingMixinBase$1=mixinBase,ErrorReportingPreprocessorMixin=preprocessorMixin,Mixin$2=mixin;class ErrorReportingTokenizerMixin$1 extends ErrorReportingMixinBase$1{constructor(tt,nt){super(tt,nt);const rt=Mixin$2.install(tt.preprocessor,ErrorReportingPreprocessorMixin,nt);this.posTracker=rt.posTracker}}var tokenizerMixin=ErrorReportingTokenizerMixin$1;const ErrorReportingMixinBase=mixinBase,ErrorReportingTokenizerMixin=tokenizerMixin,LocationInfoTokenizerMixin=tokenizerMixin$1,Mixin$1=mixin;class ErrorReportingParserMixin$1 extends ErrorReportingMixinBase{constructor(tt,nt){super(tt,nt),this.opts=nt,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(tt){this.ctLoc&&(tt.startLine=this.ctLoc.startLine,tt.startCol=this.ctLoc.startCol,tt.startOffset=this.ctLoc.startOffset,tt.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,tt.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,tt.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(tt,nt){return{_bootstrap(rt,ot){nt._bootstrap.call(this,rt,ot),Mixin$1.install(this.tokenizer,ErrorReportingTokenizerMixin,tt.opts),Mixin$1.install(this.tokenizer,LocationInfoTokenizerMixin)},_processInputToken(rt){tt.ctLoc=rt.location,nt._processInputToken.call(this,rt)},_err(rt,ot){tt.locBeforeToken=ot&&ot.beforeToken,tt._reportError(rt)}}}}var parserMixin=ErrorReportingParserMixin$1,_default$a={};const{DOCUMENT_MODE:DOCUMENT_MODE$1}=html$6;_default$a.createDocument=function(){return{nodeName:"#document",mode:DOCUMENT_MODE$1.NO_QUIRKS,childNodes:[]}};_default$a.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};_default$a.createElement=function(et,tt,nt){return{nodeName:et,tagName:et,attrs:nt,namespaceURI:tt,childNodes:[],parentNode:null}};_default$a.createCommentNode=function(et){return{nodeName:"#comment",data:et,parentNode:null}};const createTextNode=function(et){return{nodeName:"#text",value:et,parentNode:null}},appendChild=_default$a.appendChild=function(et,tt){et.childNodes.push(tt),tt.parentNode=et},insertBefore=_default$a.insertBefore=function(et,tt,nt){const rt=et.childNodes.indexOf(nt);et.childNodes.splice(rt,0,tt),tt.parentNode=et};_default$a.setTemplateContent=function(et,tt){et.content=tt};_default$a.getTemplateContent=function(et){return et.content};_default$a.setDocumentType=function(et,tt,nt,rt){let ot=null;for(let st=0;st<et.childNodes.length;st++)if(et.childNodes[st].nodeName==="#documentType"){ot=et.childNodes[st];break}ot?(ot.name=tt,ot.publicId=nt,ot.systemId=rt):appendChild(et,{nodeName:"#documentType",name:tt,publicId:nt,systemId:rt})};_default$a.setDocumentMode=function(et,tt){et.mode=tt};_default$a.getDocumentMode=function(et){return et.mode};_default$a.detachNode=function(et){if(et.parentNode){const tt=et.parentNode.childNodes.indexOf(et);et.parentNode.childNodes.splice(tt,1),et.parentNode=null}};_default$a.insertText=function(et,tt){if(et.childNodes.length){const nt=et.childNodes[et.childNodes.length-1];if(nt.nodeName==="#text"){nt.value+=tt;return}}appendChild(et,createTextNode(tt))};_default$a.insertTextBefore=function(et,tt,nt){const rt=et.childNodes[et.childNodes.indexOf(nt)-1];rt&&rt.nodeName==="#text"?rt.value+=tt:insertBefore(et,createTextNode(tt),nt)};_default$a.adoptAttributes=function(et,tt){const nt=[];for(let rt=0;rt<et.attrs.length;rt++)nt.push(et.attrs[rt].name);for(let rt=0;rt<tt.length;rt++)nt.indexOf(tt[rt].name)===-1&&et.attrs.push(tt[rt])};_default$a.getFirstChild=function(et){return et.childNodes[0]};_default$a.getChildNodes=function(et){return et.childNodes};_default$a.getParentNode=function(et){return et.parentNode};_default$a.getAttrList=function(et){return et.attrs};_default$a.getTagName=function(et){return et.tagName};_default$a.getNamespaceURI=function(et){return et.namespaceURI};_default$a.getTextNodeContent=function(et){return et.value};_default$a.getCommentNodeContent=function(et){return et.data};_default$a.getDocumentTypeNodeName=function(et){return et.name};_default$a.getDocumentTypeNodePublicId=function(et){return et.publicId};_default$a.getDocumentTypeNodeSystemId=function(et){return et.systemId};_default$a.isTextNode=function(et){return et.nodeName==="#text"};_default$a.isCommentNode=function(et){return et.nodeName==="#comment"};_default$a.isDocumentTypeNode=function(et){return et.nodeName==="#documentType"};_default$a.isElementNode=function(et){return!!et.tagName};_default$a.setNodeSourceCodeLocation=function(et,tt){et.sourceCodeLocation=tt};_default$a.getNodeSourceCodeLocation=function(et){return et.sourceCodeLocation};_default$a.updateNodeSourceCodeLocation=function(et,tt){et.sourceCodeLocation=Object.assign(et.sourceCodeLocation,tt)};var mergeOptions$2=function et(tt,nt){return nt=nt||Object.create(null),[tt,nt].reduce((rt,ot)=>(Object.keys(ot).forEach(st=>{rt[st]=ot[st]}),rt),Object.create(null))},doctype$3={};const{DOCUMENT_MODE}=html$6,VALID_DOCTYPE_NAME="html",VALID_SYSTEM_ID="about:legacy-compat",QUIRKS_MODE_SYSTEM_ID="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",QUIRKS_MODE_PUBLIC_ID_PREFIXES=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES=QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),QUIRKS_MODE_PUBLIC_IDS=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],LIMITED_QUIRKS_PUBLIC_ID_PREFIXES=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES=LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function enquoteDoctypeId(et){const tt=et.indexOf('"')!==-1?"'":'"';return tt+et+tt}function hasPrefix(et,tt){for(let nt=0;nt<tt.length;nt++)if(et.indexOf(tt[nt])===0)return!0;return!1}doctype$3.isConforming=function(et){return et.name===VALID_DOCTYPE_NAME&&et.publicId===null&&(et.systemId===null||et.systemId===VALID_SYSTEM_ID)};doctype$3.getDocumentMode=function(et){if(et.name!==VALID_DOCTYPE_NAME)return DOCUMENT_MODE.QUIRKS;const tt=et.systemId;if(tt&&tt.toLowerCase()===QUIRKS_MODE_SYSTEM_ID)return DOCUMENT_MODE.QUIRKS;let nt=et.publicId;if(nt!==null){if(nt=nt.toLowerCase(),QUIRKS_MODE_PUBLIC_IDS.indexOf(nt)>-1)return DOCUMENT_MODE.QUIRKS;let rt=tt===null?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(nt,rt))return DOCUMENT_MODE.QUIRKS;if(rt=tt===null?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES,hasPrefix(nt,rt))return DOCUMENT_MODE.LIMITED_QUIRKS}return DOCUMENT_MODE.NO_QUIRKS};doctype$3.serializeContent=function(et,tt,nt){let rt="!DOCTYPE ";return et&&(rt+=et),tt?rt+=" PUBLIC "+enquoteDoctypeId(tt):nt&&(rt+=" SYSTEM"),nt!==null&&(rt+=" "+enquoteDoctypeId(nt)),rt};var foreignContent$1={};const Tokenizer$1=tokenizer$2,HTML$1=html$6,$$3=HTML$1.TAG_NAMES,NS$1=HTML$1.NAMESPACES,ATTRS$1=HTML$1.ATTRS,MIME_TYPES={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},DEFINITION_URL_ATTR="definitionurl",ADJUSTED_DEFINITION_URL_ATTR="definitionURL",SVG_ATTRS_ADJUSTMENT_MAP={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},XML_ATTRS_ADJUSTMENT_MAP={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:NS$1.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:NS$1.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:NS$1.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:NS$1.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:NS$1.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:NS$1.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:NS$1.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:NS$1.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:NS$1.XML},"xml:space":{prefix:"xml",name:"space",namespace:NS$1.XML},xmlns:{prefix:"",name:"xmlns",namespace:NS$1.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:NS$1.XMLNS}},SVG_TAG_NAMES_ADJUSTMENT_MAP=foreignContent$1.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},EXITS_FOREIGN_CONTENT={[$$3.B]:!0,[$$3.BIG]:!0,[$$3.BLOCKQUOTE]:!0,[$$3.BODY]:!0,[$$3.BR]:!0,[$$3.CENTER]:!0,[$$3.CODE]:!0,[$$3.DD]:!0,[$$3.DIV]:!0,[$$3.DL]:!0,[$$3.DT]:!0,[$$3.EM]:!0,[$$3.EMBED]:!0,[$$3.H1]:!0,[$$3.H2]:!0,[$$3.H3]:!0,[$$3.H4]:!0,[$$3.H5]:!0,[$$3.H6]:!0,[$$3.HEAD]:!0,[$$3.HR]:!0,[$$3.I]:!0,[$$3.IMG]:!0,[$$3.LI]:!0,[$$3.LISTING]:!0,[$$3.MENU]:!0,[$$3.META]:!0,[$$3.NOBR]:!0,[$$3.OL]:!0,[$$3.P]:!0,[$$3.PRE]:!0,[$$3.RUBY]:!0,[$$3.S]:!0,[$$3.SMALL]:!0,[$$3.SPAN]:!0,[$$3.STRONG]:!0,[$$3.STRIKE]:!0,[$$3.SUB]:!0,[$$3.SUP]:!0,[$$3.TABLE]:!0,[$$3.TT]:!0,[$$3.U]:!0,[$$3.UL]:!0,[$$3.VAR]:!0};foreignContent$1.causesExit=function(et){const tt=et.tagName;return tt===$$3.FONT&&(Tokenizer$1.getTokenAttr(et,ATTRS$1.COLOR)!==null||Tokenizer$1.getTokenAttr(et,ATTRS$1.SIZE)!==null||Tokenizer$1.getTokenAttr(et,ATTRS$1.FACE)!==null)?!0:EXITS_FOREIGN_CONTENT[tt]};foreignContent$1.adjustTokenMathMLAttrs=function(et){for(let tt=0;tt<et.attrs.length;tt++)if(et.attrs[tt].name===DEFINITION_URL_ATTR){et.attrs[tt].name=ADJUSTED_DEFINITION_URL_ATTR;break}};foreignContent$1.adjustTokenSVGAttrs=function(et){for(let tt=0;tt<et.attrs.length;tt++){const nt=SVG_ATTRS_ADJUSTMENT_MAP[et.attrs[tt].name];nt&&(et.attrs[tt].name=nt)}};foreignContent$1.adjustTokenXMLAttrs=function(et){for(let tt=0;tt<et.attrs.length;tt++){const nt=XML_ATTRS_ADJUSTMENT_MAP[et.attrs[tt].name];nt&&(et.attrs[tt].prefix=nt.prefix,et.attrs[tt].name=nt.name,et.attrs[tt].namespace=nt.namespace)}};foreignContent$1.adjustTokenSVGTagName=function(et){const tt=SVG_TAG_NAMES_ADJUSTMENT_MAP[et.tagName];tt&&(et.tagName=tt)};function isMathMLTextIntegrationPoint(et,tt){return tt===NS$1.MATHML&&(et===$$3.MI||et===$$3.MO||et===$$3.MN||et===$$3.MS||et===$$3.MTEXT)}function isHtmlIntegrationPoint(et,tt,nt){if(tt===NS$1.MATHML&&et===$$3.ANNOTATION_XML){for(let rt=0;rt<nt.length;rt++)if(nt[rt].name===ATTRS$1.ENCODING){const ot=nt[rt].value.toLowerCase();return ot===MIME_TYPES.TEXT_HTML||ot===MIME_TYPES.APPLICATION_XML}}return tt===NS$1.SVG&&(et===$$3.FOREIGN_OBJECT||et===$$3.DESC||et===$$3.TITLE)}foreignContent$1.isIntegrationPoint=function(et,tt,nt,rt){return!!((!rt||rt===NS$1.HTML)&&isHtmlIntegrationPoint(et,tt,nt)||(!rt||rt===NS$1.MATHML)&&isMathMLTextIntegrationPoint(et,tt))};const Tokenizer=tokenizer$2,OpenElementStack=openElementStack,FormattingElementList=formattingElementList,LocationInfoParserMixin=parserMixin$1,ErrorReportingParserMixin=parserMixin,Mixin=mixin,defaultTreeAdapter=_default$a,mergeOptions$1=mergeOptions$2,doctype$2=doctype$3,foreignContent=foreignContent$1,ERR=errorCodes,unicode=unicode$3,HTML=html$6,$$2=HTML.TAG_NAMES,NS=HTML.NAMESPACES,ATTRS=HTML.ATTRS,DEFAULT_OPTIONS$1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:defaultTreeAdapter},HIDDEN_INPUT_TYPE="hidden",AA_OUTER_LOOP_ITER=8,AA_INNER_LOOP_ITER=3,INITIAL_MODE="INITIAL_MODE",BEFORE_HTML_MODE="BEFORE_HTML_MODE",BEFORE_HEAD_MODE="BEFORE_HEAD_MODE",IN_HEAD_MODE="IN_HEAD_MODE",IN_HEAD_NO_SCRIPT_MODE="IN_HEAD_NO_SCRIPT_MODE",AFTER_HEAD_MODE="AFTER_HEAD_MODE",IN_BODY_MODE="IN_BODY_MODE",TEXT_MODE="TEXT_MODE",IN_TABLE_MODE="IN_TABLE_MODE",IN_TABLE_TEXT_MODE="IN_TABLE_TEXT_MODE",IN_CAPTION_MODE="IN_CAPTION_MODE",IN_COLUMN_GROUP_MODE="IN_COLUMN_GROUP_MODE",IN_TABLE_BODY_MODE="IN_TABLE_BODY_MODE",IN_ROW_MODE="IN_ROW_MODE",IN_CELL_MODE="IN_CELL_MODE",IN_SELECT_MODE="IN_SELECT_MODE",IN_SELECT_IN_TABLE_MODE="IN_SELECT_IN_TABLE_MODE",IN_TEMPLATE_MODE="IN_TEMPLATE_MODE",AFTER_BODY_MODE="AFTER_BODY_MODE",IN_FRAMESET_MODE="IN_FRAMESET_MODE",AFTER_FRAMESET_MODE="AFTER_FRAMESET_MODE",AFTER_AFTER_BODY_MODE="AFTER_AFTER_BODY_MODE",AFTER_AFTER_FRAMESET_MODE="AFTER_AFTER_FRAMESET_MODE",INSERTION_MODE_RESET_MAP={[$$2.TR]:IN_ROW_MODE,[$$2.TBODY]:IN_TABLE_BODY_MODE,[$$2.THEAD]:IN_TABLE_BODY_MODE,[$$2.TFOOT]:IN_TABLE_BODY_MODE,[$$2.CAPTION]:IN_CAPTION_MODE,[$$2.COLGROUP]:IN_COLUMN_GROUP_MODE,[$$2.TABLE]:IN_TABLE_MODE,[$$2.BODY]:IN_BODY_MODE,[$$2.FRAMESET]:IN_FRAMESET_MODE},TEMPLATE_INSERTION_MODE_SWITCH_MAP={[$$2.CAPTION]:IN_TABLE_MODE,[$$2.COLGROUP]:IN_TABLE_MODE,[$$2.TBODY]:IN_TABLE_MODE,[$$2.TFOOT]:IN_TABLE_MODE,[$$2.THEAD]:IN_TABLE_MODE,[$$2.COL]:IN_COLUMN_GROUP_MODE,[$$2.TR]:IN_TABLE_BODY_MODE,[$$2.TD]:IN_ROW_MODE,[$$2.TH]:IN_ROW_MODE},TOKEN_HANDLERS={[INITIAL_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenInInitialMode,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenInInitialMode,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:doctypeInInitialMode,[Tokenizer.START_TAG_TOKEN]:tokenInInitialMode,[Tokenizer.END_TAG_TOKEN]:tokenInInitialMode,[Tokenizer.EOF_TOKEN]:tokenInInitialMode},[BEFORE_HTML_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenBeforeHtml,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenBeforeHtml,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagBeforeHtml,[Tokenizer.END_TAG_TOKEN]:endTagBeforeHtml,[Tokenizer.EOF_TOKEN]:tokenBeforeHtml},[BEFORE_HEAD_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenBeforeHead,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenBeforeHead,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:misplacedDoctype,[Tokenizer.START_TAG_TOKEN]:startTagBeforeHead,[Tokenizer.END_TAG_TOKEN]:endTagBeforeHead,[Tokenizer.EOF_TOKEN]:tokenBeforeHead},[IN_HEAD_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenInHead,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenInHead,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:misplacedDoctype,[Tokenizer.START_TAG_TOKEN]:startTagInHead,[Tokenizer.END_TAG_TOKEN]:endTagInHead,[Tokenizer.EOF_TOKEN]:tokenInHead},[IN_HEAD_NO_SCRIPT_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenInHeadNoScript,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenInHeadNoScript,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:misplacedDoctype,[Tokenizer.START_TAG_TOKEN]:startTagInHeadNoScript,[Tokenizer.END_TAG_TOKEN]:endTagInHeadNoScript,[Tokenizer.EOF_TOKEN]:tokenInHeadNoScript},[AFTER_HEAD_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenAfterHead,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenAfterHead,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:misplacedDoctype,[Tokenizer.START_TAG_TOKEN]:startTagAfterHead,[Tokenizer.END_TAG_TOKEN]:endTagAfterHead,[Tokenizer.EOF_TOKEN]:tokenAfterHead},[IN_BODY_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInBody,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInBody,[Tokenizer.END_TAG_TOKEN]:endTagInBody,[Tokenizer.EOF_TOKEN]:eofInBody},[TEXT_MODE]:{[Tokenizer.CHARACTER_TOKEN]:insertCharacters,[Tokenizer.NULL_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:ignoreToken,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:ignoreToken,[Tokenizer.END_TAG_TOKEN]:endTagInText,[Tokenizer.EOF_TOKEN]:eofInText},[IN_TABLE_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInTable,[Tokenizer.NULL_CHARACTER_TOKEN]:characterInTable,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:characterInTable,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInTable,[Tokenizer.END_TAG_TOKEN]:endTagInTable,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_TABLE_TEXT_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInTableText,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInTableText,[Tokenizer.COMMENT_TOKEN]:tokenInTableText,[Tokenizer.DOCTYPE_TOKEN]:tokenInTableText,[Tokenizer.START_TAG_TOKEN]:tokenInTableText,[Tokenizer.END_TAG_TOKEN]:tokenInTableText,[Tokenizer.EOF_TOKEN]:tokenInTableText},[IN_CAPTION_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInBody,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInCaption,[Tokenizer.END_TAG_TOKEN]:endTagInCaption,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_COLUMN_GROUP_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenInColumnGroup,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenInColumnGroup,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInColumnGroup,[Tokenizer.END_TAG_TOKEN]:endTagInColumnGroup,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_TABLE_BODY_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInTable,[Tokenizer.NULL_CHARACTER_TOKEN]:characterInTable,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:characterInTable,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInTableBody,[Tokenizer.END_TAG_TOKEN]:endTagInTableBody,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_ROW_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInTable,[Tokenizer.NULL_CHARACTER_TOKEN]:characterInTable,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:characterInTable,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInRow,[Tokenizer.END_TAG_TOKEN]:endTagInRow,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_CELL_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInBody,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInCell,[Tokenizer.END_TAG_TOKEN]:endTagInCell,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_SELECT_MODE]:{[Tokenizer.CHARACTER_TOKEN]:insertCharacters,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInSelect,[Tokenizer.END_TAG_TOKEN]:endTagInSelect,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_SELECT_IN_TABLE_MODE]:{[Tokenizer.CHARACTER_TOKEN]:insertCharacters,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInSelectInTable,[Tokenizer.END_TAG_TOKEN]:endTagInSelectInTable,[Tokenizer.EOF_TOKEN]:eofInBody},[IN_TEMPLATE_MODE]:{[Tokenizer.CHARACTER_TOKEN]:characterInBody,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInTemplate,[Tokenizer.END_TAG_TOKEN]:endTagInTemplate,[Tokenizer.EOF_TOKEN]:eofInTemplate},[AFTER_BODY_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenAfterBody,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenAfterBody,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody,[Tokenizer.COMMENT_TOKEN]:appendCommentToRootHtmlElement,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagAfterBody,[Tokenizer.END_TAG_TOKEN]:endTagAfterBody,[Tokenizer.EOF_TOKEN]:stopParsing},[IN_FRAMESET_MODE]:{[Tokenizer.CHARACTER_TOKEN]:ignoreToken,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagInFrameset,[Tokenizer.END_TAG_TOKEN]:endTagInFrameset,[Tokenizer.EOF_TOKEN]:stopParsing},[AFTER_FRAMESET_MODE]:{[Tokenizer.CHARACTER_TOKEN]:ignoreToken,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:insertCharacters,[Tokenizer.COMMENT_TOKEN]:appendComment,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagAfterFrameset,[Tokenizer.END_TAG_TOKEN]:endTagAfterFrameset,[Tokenizer.EOF_TOKEN]:stopParsing},[AFTER_AFTER_BODY_MODE]:{[Tokenizer.CHARACTER_TOKEN]:tokenAfterAfterBody,[Tokenizer.NULL_CHARACTER_TOKEN]:tokenAfterAfterBody,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody,[Tokenizer.COMMENT_TOKEN]:appendCommentToDocument,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagAfterAfterBody,[Tokenizer.END_TAG_TOKEN]:tokenAfterAfterBody,[Tokenizer.EOF_TOKEN]:stopParsing},[AFTER_AFTER_FRAMESET_MODE]:{[Tokenizer.CHARACTER_TOKEN]:ignoreToken,[Tokenizer.NULL_CHARACTER_TOKEN]:ignoreToken,[Tokenizer.WHITESPACE_CHARACTER_TOKEN]:whitespaceCharacterInBody,[Tokenizer.COMMENT_TOKEN]:appendCommentToDocument,[Tokenizer.DOCTYPE_TOKEN]:ignoreToken,[Tokenizer.START_TAG_TOKEN]:startTagAfterAfterFrameset,[Tokenizer.END_TAG_TOKEN]:ignoreToken,[Tokenizer.EOF_TOKEN]:stopParsing}};class Parser$2{constructor(tt){this.options=mergeOptions$1(DEFAULT_OPTIONS$1,tt),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&Mixin.install(this,LocationInfoParserMixin),this.options.onParseError&&Mixin.install(this,ErrorReportingParserMixin,{onParseError:this.options.onParseError})}parse(tt){const nt=this.treeAdapter.createDocument();return this._bootstrap(nt,null),this.tokenizer.write(tt,!0),this._runParsingLoop(null),nt}parseFragment(tt,nt){nt||(nt=this.treeAdapter.createElement($$2.TEMPLATE,NS.HTML,[]));const rt=this.treeAdapter.createElement("documentmock",NS.HTML,[]);this._bootstrap(rt,nt),this.treeAdapter.getTagName(nt)===$$2.TEMPLATE&&this._pushTmplInsertionMode(IN_TEMPLATE_MODE),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(tt,!0),this._runParsingLoop(null);const ot=this.treeAdapter.getFirstChild(rt),st=this.treeAdapter.createDocumentFragment();return this._adoptNodes(ot,st),st}_bootstrap(tt,nt){this.tokenizer=new Tokenizer(this.options),this.stopped=!1,this.insertionMode=INITIAL_MODE,this.originalInsertionMode="",this.document=tt,this.fragmentContext=nt,this.headElement=null,this.formElement=null,this.openElements=new OpenElementStack(this.document,this.treeAdapter),this.activeFormattingElements=new FormattingElementList(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(tt){for(;!this.stopped;){this._setupTokenizerCDATAMode();const nt=this.tokenizer.getNextToken();if(nt.type===Tokenizer.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,nt.type===Tokenizer.WHITESPACE_CHARACTER_TOKEN&&nt.chars[0]===`
`)){if(nt.chars.length===1)continue;nt.chars=nt.chars.substr(1)}if(this._processInputToken(nt),tt&&this.pendingScript)break}}runParsingLoopForCurrentChunk(tt,nt){if(this._runParsingLoop(nt),nt&&this.pendingScript){const rt=this.pendingScript;this.pendingScript=null,nt(rt);return}tt&&tt()}_setupTokenizerCDATAMode(){const tt=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=tt&&tt!==this.document&&this.treeAdapter.getNamespaceURI(tt)!==NS.HTML&&!this._isIntegrationPoint(tt)}_switchToTextParsing(tt,nt){this._insertElement(tt,NS.HTML),this.tokenizer.state=nt,this.originalInsertionMode=this.insertionMode,this.insertionMode=TEXT_MODE}switchToPlaintextParsing(){this.insertionMode=TEXT_MODE,this.originalInsertionMode=IN_BODY_MODE,this.tokenizer.state=Tokenizer.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let tt=this.fragmentContext;do{if(this.treeAdapter.getTagName(tt)===$$2.FORM){this.formElement=tt;break}tt=this.treeAdapter.getParentNode(tt)}while(tt)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===NS.HTML){const tt=this.treeAdapter.getTagName(this.fragmentContext);tt===$$2.TITLE||tt===$$2.TEXTAREA?this.tokenizer.state=Tokenizer.MODE.RCDATA:tt===$$2.STYLE||tt===$$2.XMP||tt===$$2.IFRAME||tt===$$2.NOEMBED||tt===$$2.NOFRAMES||tt===$$2.NOSCRIPT?this.tokenizer.state=Tokenizer.MODE.RAWTEXT:tt===$$2.SCRIPT?this.tokenizer.state=Tokenizer.MODE.SCRIPT_DATA:tt===$$2.PLAINTEXT&&(this.tokenizer.state=Tokenizer.MODE.PLAINTEXT)}}_setDocumentType(tt){const nt=tt.name||"",rt=tt.publicId||"",ot=tt.systemId||"";this.treeAdapter.setDocumentType(this.document,nt,rt,ot)}_attachElementToTree(tt){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(tt);else{const nt=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(nt,tt)}}_appendElement(tt,nt){const rt=this.treeAdapter.createElement(tt.tagName,nt,tt.attrs);this._attachElementToTree(rt)}_insertElement(tt,nt){const rt=this.treeAdapter.createElement(tt.tagName,nt,tt.attrs);this._attachElementToTree(rt),this.openElements.push(rt)}_insertFakeElement(tt){const nt=this.treeAdapter.createElement(tt,NS.HTML,[]);this._attachElementToTree(nt),this.openElements.push(nt)}_insertTemplate(tt){const nt=this.treeAdapter.createElement(tt.tagName,NS.HTML,tt.attrs),rt=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(nt,rt),this._attachElementToTree(nt),this.openElements.push(nt)}_insertFakeRootElement(){const tt=this.treeAdapter.createElement($$2.HTML,NS.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,tt),this.openElements.push(tt)}_appendCommentNode(tt,nt){const rt=this.treeAdapter.createCommentNode(tt.data);this.treeAdapter.appendChild(nt,rt)}_insertCharacters(tt){if(this._shouldFosterParentOnInsertion())this._fosterParentText(tt.chars);else{const nt=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(nt,tt.chars)}}_adoptNodes(tt,nt){for(let rt=this.treeAdapter.getFirstChild(tt);rt;rt=this.treeAdapter.getFirstChild(tt))this.treeAdapter.detachNode(rt),this.treeAdapter.appendChild(nt,rt)}_shouldProcessTokenInForeignContent(tt){const nt=this._getAdjustedCurrentElement();if(!nt||nt===this.document)return!1;const rt=this.treeAdapter.getNamespaceURI(nt);if(rt===NS.HTML||this.treeAdapter.getTagName(nt)===$$2.ANNOTATION_XML&&rt===NS.MATHML&&tt.type===Tokenizer.START_TAG_TOKEN&&tt.tagName===$$2.SVG)return!1;const ot=tt.type===Tokenizer.CHARACTER_TOKEN||tt.type===Tokenizer.NULL_CHARACTER_TOKEN||tt.type===Tokenizer.WHITESPACE_CHARACTER_TOKEN;return(tt.type===Tokenizer.START_TAG_TOKEN&&tt.tagName!==$$2.MGLYPH&&tt.tagName!==$$2.MALIGNMARK||ot)&&this._isIntegrationPoint(nt,NS.MATHML)||(tt.type===Tokenizer.START_TAG_TOKEN||ot)&&this._isIntegrationPoint(nt,NS.HTML)?!1:tt.type!==Tokenizer.EOF_TOKEN}_processToken(tt){TOKEN_HANDLERS[this.insertionMode][tt.type](this,tt)}_processTokenInBodyMode(tt){TOKEN_HANDLERS[IN_BODY_MODE][tt.type](this,tt)}_processTokenInForeignContent(tt){tt.type===Tokenizer.CHARACTER_TOKEN?characterInForeignContent(this,tt):tt.type===Tokenizer.NULL_CHARACTER_TOKEN?nullCharacterInForeignContent(this,tt):tt.type===Tokenizer.WHITESPACE_CHARACTER_TOKEN?insertCharacters(this,tt):tt.type===Tokenizer.COMMENT_TOKEN?appendComment(this,tt):tt.type===Tokenizer.START_TAG_TOKEN?startTagInForeignContent(this,tt):tt.type===Tokenizer.END_TAG_TOKEN&&endTagInForeignContent(this,tt)}_processInputToken(tt){this._shouldProcessTokenInForeignContent(tt)?this._processTokenInForeignContent(tt):this._processToken(tt),tt.type===Tokenizer.START_TAG_TOKEN&&tt.selfClosing&&!tt.ackSelfClosing&&this._err(ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(tt,nt){const rt=this.treeAdapter.getTagName(tt),ot=this.treeAdapter.getNamespaceURI(tt),st=this.treeAdapter.getAttrList(tt);return foreignContent.isIntegrationPoint(rt,ot,st,nt)}_reconstructActiveFormattingElements(){const tt=this.activeFormattingElements.length;if(tt){let nt=tt,rt=null;do if(nt--,rt=this.activeFormattingElements.entries[nt],rt.type===FormattingElementList.MARKER_ENTRY||this.openElements.contains(rt.element)){nt++;break}while(nt>0);for(let ot=nt;ot<tt;ot++)rt=this.activeFormattingElements.entries[ot],this._insertElement(rt.token,this.treeAdapter.getNamespaceURI(rt.element)),rt.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=IN_ROW_MODE}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion($$2.P),this.openElements.popUntilTagNamePopped($$2.P)}_resetInsertionMode(){for(let tt=this.openElements.stackTop,nt=!1;tt>=0;tt--){let rt=this.openElements.items[tt];tt===0&&(nt=!0,this.fragmentContext&&(rt=this.fragmentContext));const ot=this.treeAdapter.getTagName(rt),st=INSERTION_MODE_RESET_MAP[ot];if(st){this.insertionMode=st;break}else if(!nt&&(ot===$$2.TD||ot===$$2.TH)){this.insertionMode=IN_CELL_MODE;break}else if(!nt&&ot===$$2.HEAD){this.insertionMode=IN_HEAD_MODE;break}else if(ot===$$2.SELECT){this._resetInsertionModeForSelect(tt);break}else if(ot===$$2.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(ot===$$2.HTML){this.insertionMode=this.headElement?AFTER_HEAD_MODE:BEFORE_HEAD_MODE;break}else if(nt){this.insertionMode=IN_BODY_MODE;break}}}_resetInsertionModeForSelect(tt){if(tt>0)for(let nt=tt-1;nt>0;nt--){const rt=this.openElements.items[nt],ot=this.treeAdapter.getTagName(rt);if(ot===$$2.TEMPLATE)break;if(ot===$$2.TABLE){this.insertionMode=IN_SELECT_IN_TABLE_MODE;return}}this.insertionMode=IN_SELECT_MODE}_pushTmplInsertionMode(tt){this.tmplInsertionModeStack.push(tt),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=tt}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(tt){const nt=this.treeAdapter.getTagName(tt);return nt===$$2.TABLE||nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD||nt===$$2.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const tt={parent:null,beforeElement:null};for(let nt=this.openElements.stackTop;nt>=0;nt--){const rt=this.openElements.items[nt],ot=this.treeAdapter.getTagName(rt),st=this.treeAdapter.getNamespaceURI(rt);if(ot===$$2.TEMPLATE&&st===NS.HTML){tt.parent=this.treeAdapter.getTemplateContent(rt);break}else if(ot===$$2.TABLE){tt.parent=this.treeAdapter.getParentNode(rt),tt.parent?tt.beforeElement=rt:tt.parent=this.openElements.items[nt-1];break}}return tt.parent||(tt.parent=this.openElements.items[0]),tt}_fosterParentElement(tt){const nt=this._findFosterParentingLocation();nt.beforeElement?this.treeAdapter.insertBefore(nt.parent,tt,nt.beforeElement):this.treeAdapter.appendChild(nt.parent,tt)}_fosterParentText(tt){const nt=this._findFosterParentingLocation();nt.beforeElement?this.treeAdapter.insertTextBefore(nt.parent,tt,nt.beforeElement):this.treeAdapter.insertText(nt.parent,tt)}_isSpecialElement(tt){const nt=this.treeAdapter.getTagName(tt),rt=this.treeAdapter.getNamespaceURI(tt);return HTML.SPECIAL_ELEMENTS[rt][nt]}}var parser$4=Parser$2;function aaObtainFormattingElementEntry(et,tt){let nt=et.activeFormattingElements.getElementEntryInScopeWithTagName(tt.tagName);return nt?et.openElements.contains(nt.element)?et.openElements.hasInScope(tt.tagName)||(nt=null):(et.activeFormattingElements.removeEntry(nt),nt=null):genericEndTagInBody(et,tt),nt}function aaObtainFurthestBlock(et,tt){let nt=null;for(let rt=et.openElements.stackTop;rt>=0;rt--){const ot=et.openElements.items[rt];if(ot===tt.element)break;et._isSpecialElement(ot)&&(nt=ot)}return nt||(et.openElements.popUntilElementPopped(tt.element),et.activeFormattingElements.removeEntry(tt)),nt}function aaInnerLoop(et,tt,nt){let rt=tt,ot=et.openElements.getCommonAncestor(tt);for(let st=0,ut=ot;ut!==nt;st++,ut=ot){ot=et.openElements.getCommonAncestor(ut);const ct=et.activeFormattingElements.getElementEntry(ut),ft=ct&&st>=AA_INNER_LOOP_ITER;!ct||ft?(ft&&et.activeFormattingElements.removeEntry(ct),et.openElements.remove(ut)):(ut=aaRecreateElementFromEntry(et,ct),rt===tt&&(et.activeFormattingElements.bookmark=ct),et.treeAdapter.detachNode(rt),et.treeAdapter.appendChild(ut,rt),rt=ut)}return rt}function aaRecreateElementFromEntry(et,tt){const nt=et.treeAdapter.getNamespaceURI(tt.element),rt=et.treeAdapter.createElement(tt.token.tagName,nt,tt.token.attrs);return et.openElements.replace(tt.element,rt),tt.element=rt,rt}function aaInsertLastNodeInCommonAncestor(et,tt,nt){if(et._isElementCausesFosterParenting(tt))et._fosterParentElement(nt);else{const rt=et.treeAdapter.getTagName(tt),ot=et.treeAdapter.getNamespaceURI(tt);rt===$$2.TEMPLATE&&ot===NS.HTML&&(tt=et.treeAdapter.getTemplateContent(tt)),et.treeAdapter.appendChild(tt,nt)}}function aaReplaceFormattingElement(et,tt,nt){const rt=et.treeAdapter.getNamespaceURI(nt.element),ot=nt.token,st=et.treeAdapter.createElement(ot.tagName,rt,ot.attrs);et._adoptNodes(tt,st),et.treeAdapter.appendChild(tt,st),et.activeFormattingElements.insertElementAfterBookmark(st,nt.token),et.activeFormattingElements.removeEntry(nt),et.openElements.remove(nt.element),et.openElements.insertAfter(tt,st)}function callAdoptionAgency(et,tt){let nt;for(let rt=0;rt<AA_OUTER_LOOP_ITER&&(nt=aaObtainFormattingElementEntry(et,tt),!!nt);rt++){const ot=aaObtainFurthestBlock(et,nt);if(!ot)break;et.activeFormattingElements.bookmark=nt;const st=aaInnerLoop(et,ot,nt.element),ut=et.openElements.getCommonAncestor(nt.element);et.treeAdapter.detachNode(st),aaInsertLastNodeInCommonAncestor(et,ut,st),aaReplaceFormattingElement(et,ot,nt)}}function ignoreToken(){}function misplacedDoctype(et){et._err(ERR.misplacedDoctype)}function appendComment(et,tt){et._appendCommentNode(tt,et.openElements.currentTmplContent||et.openElements.current)}function appendCommentToRootHtmlElement(et,tt){et._appendCommentNode(tt,et.openElements.items[0])}function appendCommentToDocument(et,tt){et._appendCommentNode(tt,et.document)}function insertCharacters(et,tt){et._insertCharacters(tt)}function stopParsing(et){et.stopped=!0}function doctypeInInitialMode(et,tt){et._setDocumentType(tt);const nt=tt.forceQuirks?HTML.DOCUMENT_MODE.QUIRKS:doctype$2.getDocumentMode(tt);doctype$2.isConforming(tt)||et._err(ERR.nonConformingDoctype),et.treeAdapter.setDocumentMode(et.document,nt),et.insertionMode=BEFORE_HTML_MODE}function tokenInInitialMode(et,tt){et._err(ERR.missingDoctype,{beforeToken:!0}),et.treeAdapter.setDocumentMode(et.document,HTML.DOCUMENT_MODE.QUIRKS),et.insertionMode=BEFORE_HTML_MODE,et._processToken(tt)}function startTagBeforeHtml(et,tt){tt.tagName===$$2.HTML?(et._insertElement(tt,NS.HTML),et.insertionMode=BEFORE_HEAD_MODE):tokenBeforeHtml(et,tt)}function endTagBeforeHtml(et,tt){const nt=tt.tagName;(nt===$$2.HTML||nt===$$2.HEAD||nt===$$2.BODY||nt===$$2.BR)&&tokenBeforeHtml(et,tt)}function tokenBeforeHtml(et,tt){et._insertFakeRootElement(),et.insertionMode=BEFORE_HEAD_MODE,et._processToken(tt)}function startTagBeforeHead(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.HEAD?(et._insertElement(tt,NS.HTML),et.headElement=et.openElements.current,et.insertionMode=IN_HEAD_MODE):tokenBeforeHead(et,tt)}function endTagBeforeHead(et,tt){const nt=tt.tagName;nt===$$2.HEAD||nt===$$2.BODY||nt===$$2.HTML||nt===$$2.BR?tokenBeforeHead(et,tt):et._err(ERR.endTagWithoutMatchingOpenElement)}function tokenBeforeHead(et,tt){et._insertFakeElement($$2.HEAD),et.headElement=et.openElements.current,et.insertionMode=IN_HEAD_MODE,et._processToken(tt)}function startTagInHead(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.BASE||nt===$$2.BASEFONT||nt===$$2.BGSOUND||nt===$$2.LINK||nt===$$2.META?(et._appendElement(tt,NS.HTML),tt.ackSelfClosing=!0):nt===$$2.TITLE?et._switchToTextParsing(tt,Tokenizer.MODE.RCDATA):nt===$$2.NOSCRIPT?et.options.scriptingEnabled?et._switchToTextParsing(tt,Tokenizer.MODE.RAWTEXT):(et._insertElement(tt,NS.HTML),et.insertionMode=IN_HEAD_NO_SCRIPT_MODE):nt===$$2.NOFRAMES||nt===$$2.STYLE?et._switchToTextParsing(tt,Tokenizer.MODE.RAWTEXT):nt===$$2.SCRIPT?et._switchToTextParsing(tt,Tokenizer.MODE.SCRIPT_DATA):nt===$$2.TEMPLATE?(et._insertTemplate(tt,NS.HTML),et.activeFormattingElements.insertMarker(),et.framesetOk=!1,et.insertionMode=IN_TEMPLATE_MODE,et._pushTmplInsertionMode(IN_TEMPLATE_MODE)):nt===$$2.HEAD?et._err(ERR.misplacedStartTagForHeadElement):tokenInHead(et,tt)}function endTagInHead(et,tt){const nt=tt.tagName;nt===$$2.HEAD?(et.openElements.pop(),et.insertionMode=AFTER_HEAD_MODE):nt===$$2.BODY||nt===$$2.BR||nt===$$2.HTML?tokenInHead(et,tt):nt===$$2.TEMPLATE&&et.openElements.tmplCount>0?(et.openElements.generateImpliedEndTagsThoroughly(),et.openElements.currentTagName!==$$2.TEMPLATE&&et._err(ERR.closingOfElementWithOpenChildElements),et.openElements.popUntilTagNamePopped($$2.TEMPLATE),et.activeFormattingElements.clearToLastMarker(),et._popTmplInsertionMode(),et._resetInsertionMode()):et._err(ERR.endTagWithoutMatchingOpenElement)}function tokenInHead(et,tt){et.openElements.pop(),et.insertionMode=AFTER_HEAD_MODE,et._processToken(tt)}function startTagInHeadNoScript(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.BASEFONT||nt===$$2.BGSOUND||nt===$$2.HEAD||nt===$$2.LINK||nt===$$2.META||nt===$$2.NOFRAMES||nt===$$2.STYLE?startTagInHead(et,tt):nt===$$2.NOSCRIPT?et._err(ERR.nestedNoscriptInHead):tokenInHeadNoScript(et,tt)}function endTagInHeadNoScript(et,tt){const nt=tt.tagName;nt===$$2.NOSCRIPT?(et.openElements.pop(),et.insertionMode=IN_HEAD_MODE):nt===$$2.BR?tokenInHeadNoScript(et,tt):et._err(ERR.endTagWithoutMatchingOpenElement)}function tokenInHeadNoScript(et,tt){const nt=tt.type===Tokenizer.EOF_TOKEN?ERR.openElementsLeftAfterEof:ERR.disallowedContentInNoscriptInHead;et._err(nt),et.openElements.pop(),et.insertionMode=IN_HEAD_MODE,et._processToken(tt)}function startTagAfterHead(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.BODY?(et._insertElement(tt,NS.HTML),et.framesetOk=!1,et.insertionMode=IN_BODY_MODE):nt===$$2.FRAMESET?(et._insertElement(tt,NS.HTML),et.insertionMode=IN_FRAMESET_MODE):nt===$$2.BASE||nt===$$2.BASEFONT||nt===$$2.BGSOUND||nt===$$2.LINK||nt===$$2.META||nt===$$2.NOFRAMES||nt===$$2.SCRIPT||nt===$$2.STYLE||nt===$$2.TEMPLATE||nt===$$2.TITLE?(et._err(ERR.abandonedHeadElementChild),et.openElements.push(et.headElement),startTagInHead(et,tt),et.openElements.remove(et.headElement)):nt===$$2.HEAD?et._err(ERR.misplacedStartTagForHeadElement):tokenAfterHead(et,tt)}function endTagAfterHead(et,tt){const nt=tt.tagName;nt===$$2.BODY||nt===$$2.HTML||nt===$$2.BR?tokenAfterHead(et,tt):nt===$$2.TEMPLATE?endTagInHead(et,tt):et._err(ERR.endTagWithoutMatchingOpenElement)}function tokenAfterHead(et,tt){et._insertFakeElement($$2.BODY),et.insertionMode=IN_BODY_MODE,et._processToken(tt)}function whitespaceCharacterInBody(et,tt){et._reconstructActiveFormattingElements(),et._insertCharacters(tt)}function characterInBody(et,tt){et._reconstructActiveFormattingElements(),et._insertCharacters(tt),et.framesetOk=!1}function htmlStartTagInBody(et,tt){et.openElements.tmplCount===0&&et.treeAdapter.adoptAttributes(et.openElements.items[0],tt.attrs)}function bodyStartTagInBody(et,tt){const nt=et.openElements.tryPeekProperlyNestedBodyElement();nt&&et.openElements.tmplCount===0&&(et.framesetOk=!1,et.treeAdapter.adoptAttributes(nt,tt.attrs))}function framesetStartTagInBody(et,tt){const nt=et.openElements.tryPeekProperlyNestedBodyElement();et.framesetOk&&nt&&(et.treeAdapter.detachNode(nt),et.openElements.popAllUpToHtmlElement(),et._insertElement(tt,NS.HTML),et.insertionMode=IN_FRAMESET_MODE)}function addressStartTagInBody(et,tt){et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._insertElement(tt,NS.HTML)}function numberedHeaderStartTagInBody(et,tt){et.openElements.hasInButtonScope($$2.P)&&et._closePElement();const nt=et.openElements.currentTagName;(nt===$$2.H1||nt===$$2.H2||nt===$$2.H3||nt===$$2.H4||nt===$$2.H5||nt===$$2.H6)&&et.openElements.pop(),et._insertElement(tt,NS.HTML)}function preStartTagInBody(et,tt){et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._insertElement(tt,NS.HTML),et.skipNextNewLine=!0,et.framesetOk=!1}function formStartTagInBody(et,tt){const nt=et.openElements.tmplCount>0;(!et.formElement||nt)&&(et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._insertElement(tt,NS.HTML),nt||(et.formElement=et.openElements.current))}function listItemStartTagInBody(et,tt){et.framesetOk=!1;const nt=tt.tagName;for(let rt=et.openElements.stackTop;rt>=0;rt--){const ot=et.openElements.items[rt],st=et.treeAdapter.getTagName(ot);let ut=null;if(nt===$$2.LI&&st===$$2.LI?ut=$$2.LI:(nt===$$2.DD||nt===$$2.DT)&&(st===$$2.DD||st===$$2.DT)&&(ut=st),ut){et.openElements.generateImpliedEndTagsWithExclusion(ut),et.openElements.popUntilTagNamePopped(ut);break}if(st!==$$2.ADDRESS&&st!==$$2.DIV&&st!==$$2.P&&et._isSpecialElement(ot))break}et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._insertElement(tt,NS.HTML)}function plaintextStartTagInBody(et,tt){et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._insertElement(tt,NS.HTML),et.tokenizer.state=Tokenizer.MODE.PLAINTEXT}function buttonStartTagInBody(et,tt){et.openElements.hasInScope($$2.BUTTON)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped($$2.BUTTON)),et._reconstructActiveFormattingElements(),et._insertElement(tt,NS.HTML),et.framesetOk=!1}function aStartTagInBody(et,tt){const nt=et.activeFormattingElements.getElementEntryInScopeWithTagName($$2.A);nt&&(callAdoptionAgency(et,tt),et.openElements.remove(nt.element),et.activeFormattingElements.removeEntry(nt)),et._reconstructActiveFormattingElements(),et._insertElement(tt,NS.HTML),et.activeFormattingElements.pushElement(et.openElements.current,tt)}function bStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS.HTML),et.activeFormattingElements.pushElement(et.openElements.current,tt)}function nobrStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),et.openElements.hasInScope($$2.NOBR)&&(callAdoptionAgency(et,tt),et._reconstructActiveFormattingElements()),et._insertElement(tt,NS.HTML),et.activeFormattingElements.pushElement(et.openElements.current,tt)}function appletStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS.HTML),et.activeFormattingElements.insertMarker(),et.framesetOk=!1}function tableStartTagInBody(et,tt){et.treeAdapter.getDocumentMode(et.document)!==HTML.DOCUMENT_MODE.QUIRKS&&et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._insertElement(tt,NS.HTML),et.framesetOk=!1,et.insertionMode=IN_TABLE_MODE}function areaStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),et._appendElement(tt,NS.HTML),et.framesetOk=!1,tt.ackSelfClosing=!0}function inputStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),et._appendElement(tt,NS.HTML);const nt=Tokenizer.getTokenAttr(tt,ATTRS.TYPE);(!nt||nt.toLowerCase()!==HIDDEN_INPUT_TYPE)&&(et.framesetOk=!1),tt.ackSelfClosing=!0}function paramStartTagInBody(et,tt){et._appendElement(tt,NS.HTML),tt.ackSelfClosing=!0}function hrStartTagInBody(et,tt){et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._appendElement(tt,NS.HTML),et.framesetOk=!1,tt.ackSelfClosing=!0}function imageStartTagInBody(et,tt){tt.tagName=$$2.IMG,areaStartTagInBody(et,tt)}function textareaStartTagInBody(et,tt){et._insertElement(tt,NS.HTML),et.skipNextNewLine=!0,et.tokenizer.state=Tokenizer.MODE.RCDATA,et.originalInsertionMode=et.insertionMode,et.framesetOk=!1,et.insertionMode=TEXT_MODE}function xmpStartTagInBody(et,tt){et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._reconstructActiveFormattingElements(),et.framesetOk=!1,et._switchToTextParsing(tt,Tokenizer.MODE.RAWTEXT)}function iframeStartTagInBody(et,tt){et.framesetOk=!1,et._switchToTextParsing(tt,Tokenizer.MODE.RAWTEXT)}function noembedStartTagInBody(et,tt){et._switchToTextParsing(tt,Tokenizer.MODE.RAWTEXT)}function selectStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS.HTML),et.framesetOk=!1,et.insertionMode===IN_TABLE_MODE||et.insertionMode===IN_CAPTION_MODE||et.insertionMode===IN_TABLE_BODY_MODE||et.insertionMode===IN_ROW_MODE||et.insertionMode===IN_CELL_MODE?et.insertionMode=IN_SELECT_IN_TABLE_MODE:et.insertionMode=IN_SELECT_MODE}function optgroupStartTagInBody(et,tt){et.openElements.currentTagName===$$2.OPTION&&et.openElements.pop(),et._reconstructActiveFormattingElements(),et._insertElement(tt,NS.HTML)}function rbStartTagInBody(et,tt){et.openElements.hasInScope($$2.RUBY)&&et.openElements.generateImpliedEndTags(),et._insertElement(tt,NS.HTML)}function rtStartTagInBody(et,tt){et.openElements.hasInScope($$2.RUBY)&&et.openElements.generateImpliedEndTagsWithExclusion($$2.RTC),et._insertElement(tt,NS.HTML)}function menuStartTagInBody(et,tt){et.openElements.hasInButtonScope($$2.P)&&et._closePElement(),et._insertElement(tt,NS.HTML)}function mathStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),foreignContent.adjustTokenMathMLAttrs(tt),foreignContent.adjustTokenXMLAttrs(tt),tt.selfClosing?et._appendElement(tt,NS.MATHML):et._insertElement(tt,NS.MATHML),tt.ackSelfClosing=!0}function svgStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),foreignContent.adjustTokenSVGAttrs(tt),foreignContent.adjustTokenXMLAttrs(tt),tt.selfClosing?et._appendElement(tt,NS.SVG):et._insertElement(tt,NS.SVG),tt.ackSelfClosing=!0}function genericStartTagInBody(et,tt){et._reconstructActiveFormattingElements(),et._insertElement(tt,NS.HTML)}function startTagInBody(et,tt){const nt=tt.tagName;switch(nt.length){case 1:nt===$$2.I||nt===$$2.S||nt===$$2.B||nt===$$2.U?bStartTagInBody(et,tt):nt===$$2.P?addressStartTagInBody(et,tt):nt===$$2.A?aStartTagInBody(et,tt):genericStartTagInBody(et,tt);break;case 2:nt===$$2.DL||nt===$$2.OL||nt===$$2.UL?addressStartTagInBody(et,tt):nt===$$2.H1||nt===$$2.H2||nt===$$2.H3||nt===$$2.H4||nt===$$2.H5||nt===$$2.H6?numberedHeaderStartTagInBody(et,tt):nt===$$2.LI||nt===$$2.DD||nt===$$2.DT?listItemStartTagInBody(et,tt):nt===$$2.EM||nt===$$2.TT?bStartTagInBody(et,tt):nt===$$2.BR?areaStartTagInBody(et,tt):nt===$$2.HR?hrStartTagInBody(et,tt):nt===$$2.RB?rbStartTagInBody(et,tt):nt===$$2.RT||nt===$$2.RP?rtStartTagInBody(et,tt):nt!==$$2.TH&&nt!==$$2.TD&&nt!==$$2.TR&&genericStartTagInBody(et,tt);break;case 3:nt===$$2.DIV||nt===$$2.DIR||nt===$$2.NAV?addressStartTagInBody(et,tt):nt===$$2.PRE?preStartTagInBody(et,tt):nt===$$2.BIG?bStartTagInBody(et,tt):nt===$$2.IMG||nt===$$2.WBR?areaStartTagInBody(et,tt):nt===$$2.XMP?xmpStartTagInBody(et,tt):nt===$$2.SVG?svgStartTagInBody(et,tt):nt===$$2.RTC?rbStartTagInBody(et,tt):nt!==$$2.COL&&genericStartTagInBody(et,tt);break;case 4:nt===$$2.HTML?htmlStartTagInBody(et,tt):nt===$$2.BASE||nt===$$2.LINK||nt===$$2.META?startTagInHead(et,tt):nt===$$2.BODY?bodyStartTagInBody(et,tt):nt===$$2.MAIN||nt===$$2.MENU?addressStartTagInBody(et,tt):nt===$$2.FORM?formStartTagInBody(et,tt):nt===$$2.CODE||nt===$$2.FONT?bStartTagInBody(et,tt):nt===$$2.NOBR?nobrStartTagInBody(et,tt):nt===$$2.AREA?areaStartTagInBody(et,tt):nt===$$2.MATH?mathStartTagInBody(et,tt):nt===$$2.MENU?menuStartTagInBody(et,tt):nt!==$$2.HEAD&&genericStartTagInBody(et,tt);break;case 5:nt===$$2.STYLE||nt===$$2.TITLE?startTagInHead(et,tt):nt===$$2.ASIDE?addressStartTagInBody(et,tt):nt===$$2.SMALL?bStartTagInBody(et,tt):nt===$$2.TABLE?tableStartTagInBody(et,tt):nt===$$2.EMBED?areaStartTagInBody(et,tt):nt===$$2.INPUT?inputStartTagInBody(et,tt):nt===$$2.PARAM||nt===$$2.TRACK?paramStartTagInBody(et,tt):nt===$$2.IMAGE?imageStartTagInBody(et,tt):nt!==$$2.FRAME&&nt!==$$2.TBODY&&nt!==$$2.TFOOT&&nt!==$$2.THEAD&&genericStartTagInBody(et,tt);break;case 6:nt===$$2.SCRIPT?startTagInHead(et,tt):nt===$$2.CENTER||nt===$$2.FIGURE||nt===$$2.FOOTER||nt===$$2.HEADER||nt===$$2.HGROUP||nt===$$2.DIALOG?addressStartTagInBody(et,tt):nt===$$2.BUTTON?buttonStartTagInBody(et,tt):nt===$$2.STRIKE||nt===$$2.STRONG?bStartTagInBody(et,tt):nt===$$2.APPLET||nt===$$2.OBJECT?appletStartTagInBody(et,tt):nt===$$2.KEYGEN?areaStartTagInBody(et,tt):nt===$$2.SOURCE?paramStartTagInBody(et,tt):nt===$$2.IFRAME?iframeStartTagInBody(et,tt):nt===$$2.SELECT?selectStartTagInBody(et,tt):nt===$$2.OPTION?optgroupStartTagInBody(et,tt):genericStartTagInBody(et,tt);break;case 7:nt===$$2.BGSOUND?startTagInHead(et,tt):nt===$$2.DETAILS||nt===$$2.ADDRESS||nt===$$2.ARTICLE||nt===$$2.SECTION||nt===$$2.SUMMARY?addressStartTagInBody(et,tt):nt===$$2.LISTING?preStartTagInBody(et,tt):nt===$$2.MARQUEE?appletStartTagInBody(et,tt):nt===$$2.NOEMBED?noembedStartTagInBody(et,tt):nt!==$$2.CAPTION&&genericStartTagInBody(et,tt);break;case 8:nt===$$2.BASEFONT?startTagInHead(et,tt):nt===$$2.FRAMESET?framesetStartTagInBody(et,tt):nt===$$2.FIELDSET?addressStartTagInBody(et,tt):nt===$$2.TEXTAREA?textareaStartTagInBody(et,tt):nt===$$2.TEMPLATE?startTagInHead(et,tt):nt===$$2.NOSCRIPT?et.options.scriptingEnabled?noembedStartTagInBody(et,tt):genericStartTagInBody(et,tt):nt===$$2.OPTGROUP?optgroupStartTagInBody(et,tt):nt!==$$2.COLGROUP&&genericStartTagInBody(et,tt);break;case 9:nt===$$2.PLAINTEXT?plaintextStartTagInBody(et,tt):genericStartTagInBody(et,tt);break;case 10:nt===$$2.BLOCKQUOTE||nt===$$2.FIGCAPTION?addressStartTagInBody(et,tt):genericStartTagInBody(et,tt);break;default:genericStartTagInBody(et,tt)}}function bodyEndTagInBody(et){et.openElements.hasInScope($$2.BODY)&&(et.insertionMode=AFTER_BODY_MODE)}function htmlEndTagInBody(et,tt){et.openElements.hasInScope($$2.BODY)&&(et.insertionMode=AFTER_BODY_MODE,et._processToken(tt))}function addressEndTagInBody(et,tt){const nt=tt.tagName;et.openElements.hasInScope(nt)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped(nt))}function formEndTagInBody(et){const tt=et.openElements.tmplCount>0,nt=et.formElement;tt||(et.formElement=null),(nt||tt)&&et.openElements.hasInScope($$2.FORM)&&(et.openElements.generateImpliedEndTags(),tt?et.openElements.popUntilTagNamePopped($$2.FORM):et.openElements.remove(nt))}function pEndTagInBody(et){et.openElements.hasInButtonScope($$2.P)||et._insertFakeElement($$2.P),et._closePElement()}function liEndTagInBody(et){et.openElements.hasInListItemScope($$2.LI)&&(et.openElements.generateImpliedEndTagsWithExclusion($$2.LI),et.openElements.popUntilTagNamePopped($$2.LI))}function ddEndTagInBody(et,tt){const nt=tt.tagName;et.openElements.hasInScope(nt)&&(et.openElements.generateImpliedEndTagsWithExclusion(nt),et.openElements.popUntilTagNamePopped(nt))}function numberedHeaderEndTagInBody(et){et.openElements.hasNumberedHeaderInScope()&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilNumberedHeaderPopped())}function appletEndTagInBody(et,tt){const nt=tt.tagName;et.openElements.hasInScope(nt)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped(nt),et.activeFormattingElements.clearToLastMarker())}function brEndTagInBody(et){et._reconstructActiveFormattingElements(),et._insertFakeElement($$2.BR),et.openElements.pop(),et.framesetOk=!1}function genericEndTagInBody(et,tt){const nt=tt.tagName;for(let rt=et.openElements.stackTop;rt>0;rt--){const ot=et.openElements.items[rt];if(et.treeAdapter.getTagName(ot)===nt){et.openElements.generateImpliedEndTagsWithExclusion(nt),et.openElements.popUntilElementPopped(ot);break}if(et._isSpecialElement(ot))break}}function endTagInBody(et,tt){const nt=tt.tagName;switch(nt.length){case 1:nt===$$2.A||nt===$$2.B||nt===$$2.I||nt===$$2.S||nt===$$2.U?callAdoptionAgency(et,tt):nt===$$2.P?pEndTagInBody(et):genericEndTagInBody(et,tt);break;case 2:nt===$$2.DL||nt===$$2.UL||nt===$$2.OL?addressEndTagInBody(et,tt):nt===$$2.LI?liEndTagInBody(et):nt===$$2.DD||nt===$$2.DT?ddEndTagInBody(et,tt):nt===$$2.H1||nt===$$2.H2||nt===$$2.H3||nt===$$2.H4||nt===$$2.H5||nt===$$2.H6?numberedHeaderEndTagInBody(et):nt===$$2.BR?brEndTagInBody(et):nt===$$2.EM||nt===$$2.TT?callAdoptionAgency(et,tt):genericEndTagInBody(et,tt);break;case 3:nt===$$2.BIG?callAdoptionAgency(et,tt):nt===$$2.DIR||nt===$$2.DIV||nt===$$2.NAV||nt===$$2.PRE?addressEndTagInBody(et,tt):genericEndTagInBody(et,tt);break;case 4:nt===$$2.BODY?bodyEndTagInBody(et):nt===$$2.HTML?htmlEndTagInBody(et,tt):nt===$$2.FORM?formEndTagInBody(et):nt===$$2.CODE||nt===$$2.FONT||nt===$$2.NOBR?callAdoptionAgency(et,tt):nt===$$2.MAIN||nt===$$2.MENU?addressEndTagInBody(et,tt):genericEndTagInBody(et,tt);break;case 5:nt===$$2.ASIDE?addressEndTagInBody(et,tt):nt===$$2.SMALL?callAdoptionAgency(et,tt):genericEndTagInBody(et,tt);break;case 6:nt===$$2.CENTER||nt===$$2.FIGURE||nt===$$2.FOOTER||nt===$$2.HEADER||nt===$$2.HGROUP||nt===$$2.DIALOG?addressEndTagInBody(et,tt):nt===$$2.APPLET||nt===$$2.OBJECT?appletEndTagInBody(et,tt):nt===$$2.STRIKE||nt===$$2.STRONG?callAdoptionAgency(et,tt):genericEndTagInBody(et,tt);break;case 7:nt===$$2.ADDRESS||nt===$$2.ARTICLE||nt===$$2.DETAILS||nt===$$2.SECTION||nt===$$2.SUMMARY||nt===$$2.LISTING?addressEndTagInBody(et,tt):nt===$$2.MARQUEE?appletEndTagInBody(et,tt):genericEndTagInBody(et,tt);break;case 8:nt===$$2.FIELDSET?addressEndTagInBody(et,tt):nt===$$2.TEMPLATE?endTagInHead(et,tt):genericEndTagInBody(et,tt);break;case 10:nt===$$2.BLOCKQUOTE||nt===$$2.FIGCAPTION?addressEndTagInBody(et,tt):genericEndTagInBody(et,tt);break;default:genericEndTagInBody(et,tt)}}function eofInBody(et,tt){et.tmplInsertionModeStackTop>-1?eofInTemplate(et,tt):et.stopped=!0}function endTagInText(et,tt){tt.tagName===$$2.SCRIPT&&(et.pendingScript=et.openElements.current),et.openElements.pop(),et.insertionMode=et.originalInsertionMode}function eofInText(et,tt){et._err(ERR.eofInElementThatCanContainOnlyText),et.openElements.pop(),et.insertionMode=et.originalInsertionMode,et._processToken(tt)}function characterInTable(et,tt){const nt=et.openElements.currentTagName;nt===$$2.TABLE||nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD||nt===$$2.TR?(et.pendingCharacterTokens=[],et.hasNonWhitespacePendingCharacterToken=!1,et.originalInsertionMode=et.insertionMode,et.insertionMode=IN_TABLE_TEXT_MODE,et._processToken(tt)):tokenInTable(et,tt)}function captionStartTagInTable(et,tt){et.openElements.clearBackToTableContext(),et.activeFormattingElements.insertMarker(),et._insertElement(tt,NS.HTML),et.insertionMode=IN_CAPTION_MODE}function colgroupStartTagInTable(et,tt){et.openElements.clearBackToTableContext(),et._insertElement(tt,NS.HTML),et.insertionMode=IN_COLUMN_GROUP_MODE}function colStartTagInTable(et,tt){et.openElements.clearBackToTableContext(),et._insertFakeElement($$2.COLGROUP),et.insertionMode=IN_COLUMN_GROUP_MODE,et._processToken(tt)}function tbodyStartTagInTable(et,tt){et.openElements.clearBackToTableContext(),et._insertElement(tt,NS.HTML),et.insertionMode=IN_TABLE_BODY_MODE}function tdStartTagInTable(et,tt){et.openElements.clearBackToTableContext(),et._insertFakeElement($$2.TBODY),et.insertionMode=IN_TABLE_BODY_MODE,et._processToken(tt)}function tableStartTagInTable(et,tt){et.openElements.hasInTableScope($$2.TABLE)&&(et.openElements.popUntilTagNamePopped($$2.TABLE),et._resetInsertionMode(),et._processToken(tt))}function inputStartTagInTable(et,tt){const nt=Tokenizer.getTokenAttr(tt,ATTRS.TYPE);nt&&nt.toLowerCase()===HIDDEN_INPUT_TYPE?et._appendElement(tt,NS.HTML):tokenInTable(et,tt),tt.ackSelfClosing=!0}function formStartTagInTable(et,tt){!et.formElement&&et.openElements.tmplCount===0&&(et._insertElement(tt,NS.HTML),et.formElement=et.openElements.current,et.openElements.pop())}function startTagInTable(et,tt){const nt=tt.tagName;switch(nt.length){case 2:nt===$$2.TD||nt===$$2.TH||nt===$$2.TR?tdStartTagInTable(et,tt):tokenInTable(et,tt);break;case 3:nt===$$2.COL?colStartTagInTable(et,tt):tokenInTable(et,tt);break;case 4:nt===$$2.FORM?formStartTagInTable(et,tt):tokenInTable(et,tt);break;case 5:nt===$$2.TABLE?tableStartTagInTable(et,tt):nt===$$2.STYLE?startTagInHead(et,tt):nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD?tbodyStartTagInTable(et,tt):nt===$$2.INPUT?inputStartTagInTable(et,tt):tokenInTable(et,tt);break;case 6:nt===$$2.SCRIPT?startTagInHead(et,tt):tokenInTable(et,tt);break;case 7:nt===$$2.CAPTION?captionStartTagInTable(et,tt):tokenInTable(et,tt);break;case 8:nt===$$2.COLGROUP?colgroupStartTagInTable(et,tt):nt===$$2.TEMPLATE?startTagInHead(et,tt):tokenInTable(et,tt);break;default:tokenInTable(et,tt)}}function endTagInTable(et,tt){const nt=tt.tagName;nt===$$2.TABLE?et.openElements.hasInTableScope($$2.TABLE)&&(et.openElements.popUntilTagNamePopped($$2.TABLE),et._resetInsertionMode()):nt===$$2.TEMPLATE?endTagInHead(et,tt):nt!==$$2.BODY&&nt!==$$2.CAPTION&&nt!==$$2.COL&&nt!==$$2.COLGROUP&&nt!==$$2.HTML&&nt!==$$2.TBODY&&nt!==$$2.TD&&nt!==$$2.TFOOT&&nt!==$$2.TH&&nt!==$$2.THEAD&&nt!==$$2.TR&&tokenInTable(et,tt)}function tokenInTable(et,tt){const nt=et.fosterParentingEnabled;et.fosterParentingEnabled=!0,et._processTokenInBodyMode(tt),et.fosterParentingEnabled=nt}function whitespaceCharacterInTableText(et,tt){et.pendingCharacterTokens.push(tt)}function characterInTableText(et,tt){et.pendingCharacterTokens.push(tt),et.hasNonWhitespacePendingCharacterToken=!0}function tokenInTableText(et,tt){let nt=0;if(et.hasNonWhitespacePendingCharacterToken)for(;nt<et.pendingCharacterTokens.length;nt++)tokenInTable(et,et.pendingCharacterTokens[nt]);else for(;nt<et.pendingCharacterTokens.length;nt++)et._insertCharacters(et.pendingCharacterTokens[nt]);et.insertionMode=et.originalInsertionMode,et._processToken(tt)}function startTagInCaption(et,tt){const nt=tt.tagName;nt===$$2.CAPTION||nt===$$2.COL||nt===$$2.COLGROUP||nt===$$2.TBODY||nt===$$2.TD||nt===$$2.TFOOT||nt===$$2.TH||nt===$$2.THEAD||nt===$$2.TR?et.openElements.hasInTableScope($$2.CAPTION)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped($$2.CAPTION),et.activeFormattingElements.clearToLastMarker(),et.insertionMode=IN_TABLE_MODE,et._processToken(tt)):startTagInBody(et,tt)}function endTagInCaption(et,tt){const nt=tt.tagName;nt===$$2.CAPTION||nt===$$2.TABLE?et.openElements.hasInTableScope($$2.CAPTION)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped($$2.CAPTION),et.activeFormattingElements.clearToLastMarker(),et.insertionMode=IN_TABLE_MODE,nt===$$2.TABLE&&et._processToken(tt)):nt!==$$2.BODY&&nt!==$$2.COL&&nt!==$$2.COLGROUP&&nt!==$$2.HTML&&nt!==$$2.TBODY&&nt!==$$2.TD&&nt!==$$2.TFOOT&&nt!==$$2.TH&&nt!==$$2.THEAD&&nt!==$$2.TR&&endTagInBody(et,tt)}function startTagInColumnGroup(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.COL?(et._appendElement(tt,NS.HTML),tt.ackSelfClosing=!0):nt===$$2.TEMPLATE?startTagInHead(et,tt):tokenInColumnGroup(et,tt)}function endTagInColumnGroup(et,tt){const nt=tt.tagName;nt===$$2.COLGROUP?et.openElements.currentTagName===$$2.COLGROUP&&(et.openElements.pop(),et.insertionMode=IN_TABLE_MODE):nt===$$2.TEMPLATE?endTagInHead(et,tt):nt!==$$2.COL&&tokenInColumnGroup(et,tt)}function tokenInColumnGroup(et,tt){et.openElements.currentTagName===$$2.COLGROUP&&(et.openElements.pop(),et.insertionMode=IN_TABLE_MODE,et._processToken(tt))}function startTagInTableBody(et,tt){const nt=tt.tagName;nt===$$2.TR?(et.openElements.clearBackToTableBodyContext(),et._insertElement(tt,NS.HTML),et.insertionMode=IN_ROW_MODE):nt===$$2.TH||nt===$$2.TD?(et.openElements.clearBackToTableBodyContext(),et._insertFakeElement($$2.TR),et.insertionMode=IN_ROW_MODE,et._processToken(tt)):nt===$$2.CAPTION||nt===$$2.COL||nt===$$2.COLGROUP||nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD?et.openElements.hasTableBodyContextInTableScope()&&(et.openElements.clearBackToTableBodyContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_MODE,et._processToken(tt)):startTagInTable(et,tt)}function endTagInTableBody(et,tt){const nt=tt.tagName;nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD?et.openElements.hasInTableScope(nt)&&(et.openElements.clearBackToTableBodyContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_MODE):nt===$$2.TABLE?et.openElements.hasTableBodyContextInTableScope()&&(et.openElements.clearBackToTableBodyContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_MODE,et._processToken(tt)):(nt!==$$2.BODY&&nt!==$$2.CAPTION&&nt!==$$2.COL&&nt!==$$2.COLGROUP||nt!==$$2.HTML&&nt!==$$2.TD&&nt!==$$2.TH&&nt!==$$2.TR)&&endTagInTable(et,tt)}function startTagInRow(et,tt){const nt=tt.tagName;nt===$$2.TH||nt===$$2.TD?(et.openElements.clearBackToTableRowContext(),et._insertElement(tt,NS.HTML),et.insertionMode=IN_CELL_MODE,et.activeFormattingElements.insertMarker()):nt===$$2.CAPTION||nt===$$2.COL||nt===$$2.COLGROUP||nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD||nt===$$2.TR?et.openElements.hasInTableScope($$2.TR)&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE,et._processToken(tt)):startTagInTable(et,tt)}function endTagInRow(et,tt){const nt=tt.tagName;nt===$$2.TR?et.openElements.hasInTableScope($$2.TR)&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE):nt===$$2.TABLE?et.openElements.hasInTableScope($$2.TR)&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE,et._processToken(tt)):nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD?(et.openElements.hasInTableScope(nt)||et.openElements.hasInTableScope($$2.TR))&&(et.openElements.clearBackToTableRowContext(),et.openElements.pop(),et.insertionMode=IN_TABLE_BODY_MODE,et._processToken(tt)):(nt!==$$2.BODY&&nt!==$$2.CAPTION&&nt!==$$2.COL&&nt!==$$2.COLGROUP||nt!==$$2.HTML&&nt!==$$2.TD&&nt!==$$2.TH)&&endTagInTable(et,tt)}function startTagInCell(et,tt){const nt=tt.tagName;nt===$$2.CAPTION||nt===$$2.COL||nt===$$2.COLGROUP||nt===$$2.TBODY||nt===$$2.TD||nt===$$2.TFOOT||nt===$$2.TH||nt===$$2.THEAD||nt===$$2.TR?(et.openElements.hasInTableScope($$2.TD)||et.openElements.hasInTableScope($$2.TH))&&(et._closeTableCell(),et._processToken(tt)):startTagInBody(et,tt)}function endTagInCell(et,tt){const nt=tt.tagName;nt===$$2.TD||nt===$$2.TH?et.openElements.hasInTableScope(nt)&&(et.openElements.generateImpliedEndTags(),et.openElements.popUntilTagNamePopped(nt),et.activeFormattingElements.clearToLastMarker(),et.insertionMode=IN_ROW_MODE):nt===$$2.TABLE||nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD||nt===$$2.TR?et.openElements.hasInTableScope(nt)&&(et._closeTableCell(),et._processToken(tt)):nt!==$$2.BODY&&nt!==$$2.CAPTION&&nt!==$$2.COL&&nt!==$$2.COLGROUP&&nt!==$$2.HTML&&endTagInBody(et,tt)}function startTagInSelect(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.OPTION?(et.openElements.currentTagName===$$2.OPTION&&et.openElements.pop(),et._insertElement(tt,NS.HTML)):nt===$$2.OPTGROUP?(et.openElements.currentTagName===$$2.OPTION&&et.openElements.pop(),et.openElements.currentTagName===$$2.OPTGROUP&&et.openElements.pop(),et._insertElement(tt,NS.HTML)):nt===$$2.INPUT||nt===$$2.KEYGEN||nt===$$2.TEXTAREA||nt===$$2.SELECT?et.openElements.hasInSelectScope($$2.SELECT)&&(et.openElements.popUntilTagNamePopped($$2.SELECT),et._resetInsertionMode(),nt!==$$2.SELECT&&et._processToken(tt)):(nt===$$2.SCRIPT||nt===$$2.TEMPLATE)&&startTagInHead(et,tt)}function endTagInSelect(et,tt){const nt=tt.tagName;if(nt===$$2.OPTGROUP){const rt=et.openElements.items[et.openElements.stackTop-1],ot=rt&&et.treeAdapter.getTagName(rt);et.openElements.currentTagName===$$2.OPTION&&ot===$$2.OPTGROUP&&et.openElements.pop(),et.openElements.currentTagName===$$2.OPTGROUP&&et.openElements.pop()}else nt===$$2.OPTION?et.openElements.currentTagName===$$2.OPTION&&et.openElements.pop():nt===$$2.SELECT&&et.openElements.hasInSelectScope($$2.SELECT)?(et.openElements.popUntilTagNamePopped($$2.SELECT),et._resetInsertionMode()):nt===$$2.TEMPLATE&&endTagInHead(et,tt)}function startTagInSelectInTable(et,tt){const nt=tt.tagName;nt===$$2.CAPTION||nt===$$2.TABLE||nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD||nt===$$2.TR||nt===$$2.TD||nt===$$2.TH?(et.openElements.popUntilTagNamePopped($$2.SELECT),et._resetInsertionMode(),et._processToken(tt)):startTagInSelect(et,tt)}function endTagInSelectInTable(et,tt){const nt=tt.tagName;nt===$$2.CAPTION||nt===$$2.TABLE||nt===$$2.TBODY||nt===$$2.TFOOT||nt===$$2.THEAD||nt===$$2.TR||nt===$$2.TD||nt===$$2.TH?et.openElements.hasInTableScope(nt)&&(et.openElements.popUntilTagNamePopped($$2.SELECT),et._resetInsertionMode(),et._processToken(tt)):endTagInSelect(et,tt)}function startTagInTemplate(et,tt){const nt=tt.tagName;if(nt===$$2.BASE||nt===$$2.BASEFONT||nt===$$2.BGSOUND||nt===$$2.LINK||nt===$$2.META||nt===$$2.NOFRAMES||nt===$$2.SCRIPT||nt===$$2.STYLE||nt===$$2.TEMPLATE||nt===$$2.TITLE)startTagInHead(et,tt);else{const rt=TEMPLATE_INSERTION_MODE_SWITCH_MAP[nt]||IN_BODY_MODE;et._popTmplInsertionMode(),et._pushTmplInsertionMode(rt),et.insertionMode=rt,et._processToken(tt)}}function endTagInTemplate(et,tt){tt.tagName===$$2.TEMPLATE&&endTagInHead(et,tt)}function eofInTemplate(et,tt){et.openElements.tmplCount>0?(et.openElements.popUntilTagNamePopped($$2.TEMPLATE),et.activeFormattingElements.clearToLastMarker(),et._popTmplInsertionMode(),et._resetInsertionMode(),et._processToken(tt)):et.stopped=!0}function startTagAfterBody(et,tt){tt.tagName===$$2.HTML?startTagInBody(et,tt):tokenAfterBody(et,tt)}function endTagAfterBody(et,tt){tt.tagName===$$2.HTML?et.fragmentContext||(et.insertionMode=AFTER_AFTER_BODY_MODE):tokenAfterBody(et,tt)}function tokenAfterBody(et,tt){et.insertionMode=IN_BODY_MODE,et._processToken(tt)}function startTagInFrameset(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.FRAMESET?et._insertElement(tt,NS.HTML):nt===$$2.FRAME?(et._appendElement(tt,NS.HTML),tt.ackSelfClosing=!0):nt===$$2.NOFRAMES&&startTagInHead(et,tt)}function endTagInFrameset(et,tt){tt.tagName===$$2.FRAMESET&&!et.openElements.isRootHtmlElementCurrent()&&(et.openElements.pop(),!et.fragmentContext&&et.openElements.currentTagName!==$$2.FRAMESET&&(et.insertionMode=AFTER_FRAMESET_MODE))}function startTagAfterFrameset(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.NOFRAMES&&startTagInHead(et,tt)}function endTagAfterFrameset(et,tt){tt.tagName===$$2.HTML&&(et.insertionMode=AFTER_AFTER_FRAMESET_MODE)}function startTagAfterAfterBody(et,tt){tt.tagName===$$2.HTML?startTagInBody(et,tt):tokenAfterAfterBody(et,tt)}function tokenAfterAfterBody(et,tt){et.insertionMode=IN_BODY_MODE,et._processToken(tt)}function startTagAfterAfterFrameset(et,tt){const nt=tt.tagName;nt===$$2.HTML?startTagInBody(et,tt):nt===$$2.NOFRAMES&&startTagInHead(et,tt)}function nullCharacterInForeignContent(et,tt){tt.chars=unicode.REPLACEMENT_CHARACTER,et._insertCharacters(tt)}function characterInForeignContent(et,tt){et._insertCharacters(tt),et.framesetOk=!1}function startTagInForeignContent(et,tt){if(foreignContent.causesExit(tt)&&!et.fragmentContext){for(;et.treeAdapter.getNamespaceURI(et.openElements.current)!==NS.HTML&&!et._isIntegrationPoint(et.openElements.current);)et.openElements.pop();et._processToken(tt)}else{const nt=et._getAdjustedCurrentElement(),rt=et.treeAdapter.getNamespaceURI(nt);rt===NS.MATHML?foreignContent.adjustTokenMathMLAttrs(tt):rt===NS.SVG&&(foreignContent.adjustTokenSVGTagName(tt),foreignContent.adjustTokenSVGAttrs(tt)),foreignContent.adjustTokenXMLAttrs(tt),tt.selfClosing?et._appendElement(tt,rt):et._insertElement(tt,rt),tt.ackSelfClosing=!0}}function endTagInForeignContent(et,tt){for(let nt=et.openElements.stackTop;nt>0;nt--){const rt=et.openElements.items[nt];if(et.treeAdapter.getNamespaceURI(rt)===NS.HTML){et._processToken(tt);break}if(et.treeAdapter.getTagName(rt).toLowerCase()===tt.tagName){et.openElements.popUntilElementPopped(rt);break}}}const pointStart=point$a("start"),pointEnd=point$a("end");function position$4(et){return{start:pointStart(et),end:pointEnd(et)}}function point$a(et){return tt;function tt(nt){const rt=nt&&nt.position&&nt.position[et]||{};return{line:rt.line||null,column:rt.column||null,offset:rt.offset>-1?rt.offset:null}}}const convert$5=function(et){if(et==null)return ok$3;if(typeof et=="string")return typeFactory$2(et);if(typeof et=="object")return Array.isArray(et)?anyFactory$2(et):propsFactory$2(et);if(typeof et=="function")return castFactory$2(et);throw new Error("Expected function, string, or object as test")};function anyFactory$2(et){const tt=[];let nt=-1;for(;++nt<et.length;)tt[nt]=convert$5(et[nt]);return castFactory$2(rt);function rt(...ot){let st=-1;for(;++st<tt.length;)if(tt[st].call(this,...ot))return!0;return!1}}function propsFactory$2(et){return castFactory$2(tt);function tt(nt){let rt;for(rt in et)if(nt[rt]!==et[rt])return!1;return!0}}function typeFactory$2(et){return castFactory$2(tt);function tt(nt){return nt&&nt.type===et}}function castFactory$2(et){return tt;function tt(nt,...rt){return Boolean(nt&&typeof nt=="object"&&"type"in nt&&Boolean(et.call(this,nt,...rt)))}}function ok$3(){return!0}function color$8(et){return et}const CONTINUE$2=!0,EXIT$2=!1,SKIP$5="skip",visitParents$2=function(et,tt,nt,rt){typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null);const ot=convert$5(tt),st=rt?-1:1;ut(et,void 0,[])();function ut(ct,ft,pt){const ht=ct&&typeof ct=="object"?ct:{};if(typeof ht.type=="string"){const yt=typeof ht.tagName=="string"?ht.tagName:typeof ht.name=="string"?ht.name:void 0;Object.defineProperty(mt,"name",{value:"node ("+(ct.type+(yt?"<"+yt+">":""))+")"})}return mt;function mt(){let yt=[],vt,Tt,Et;if((!tt||ot(ct,ft,pt[pt.length-1]||null))&&(yt=toResult$2(nt(ct,pt)),yt[0]===EXIT$2))return yt;if(ct.children&&yt[0]!==SKIP$5)for(Tt=(rt?ct.children.length:-1)+st,Et=pt.concat(ct);Tt>-1&&Tt<ct.children.length;){if(vt=ut(ct.children[Tt],Tt,Et)(),vt[0]===EXIT$2)return vt;Tt=typeof vt[1]=="number"?vt[1]:Tt+st}return yt}}};function toResult$2(et){return Array.isArray(et)?et:typeof et=="number"?[CONTINUE$2,et]:[et]}const visit$4=function(et,tt,nt,rt){typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null),visitParents$2(et,tt,ot,rt);function ot(st,ut){const ct=ut[ut.length-1];return nt(st,ct?ct.children.indexOf(st):null,ct)}};class Schema{constructor(tt,nt,rt){this.property=tt,this.normal=nt,rt&&(this.space=rt)}}Schema.prototype.property={};Schema.prototype.normal={};Schema.prototype.space=null;function merge$5(et,tt){const nt={},rt={};let ot=-1;for(;++ot<et.length;)Object.assign(nt,et[ot].property),Object.assign(rt,et[ot].normal);return new Schema(nt,rt,tt)}function normalize$4(et){return et.toLowerCase()}class Info$2{constructor(tt,nt){this.property=tt,this.attribute=nt}}Info$2.prototype.space=null;Info$2.prototype.boolean=!1;Info$2.prototype.booleanish=!1;Info$2.prototype.overloadedBoolean=!1;Info$2.prototype.number=!1;Info$2.prototype.commaSeparated=!1;Info$2.prototype.spaceSeparated=!1;Info$2.prototype.commaOrSpaceSeparated=!1;Info$2.prototype.mustUseProperty=!1;Info$2.prototype.defined=!1;let powers=0;const boolean=increment$2(),booleanish=increment$2(),overloadedBoolean=increment$2(),number$7=increment$2(),spaceSeparated=increment$2(),commaSeparated=increment$2(),commaOrSpaceSeparated=increment$2();function increment$2(){return 2**++powers}const types$9=Object.freeze(Object.defineProperty({__proto__:null,boolean,booleanish,overloadedBoolean,number:number$7,spaceSeparated,commaSeparated,commaOrSpaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types$9);class DefinedInfo extends Info$2{constructor(tt,nt,rt,ot){let st=-1;if(super(tt,nt),mark(this,"space",ot),typeof rt=="number")for(;++st<checks.length;){const ut=checks[st];mark(this,checks[st],(rt&types$9[ut])===types$9[ut])}}}DefinedInfo.prototype.defined=!0;function mark(et,tt,nt){nt&&(et[tt]=nt)}const own$b={}.hasOwnProperty;function create$3(et){const tt={},nt={};let rt;for(rt in et.properties)if(own$b.call(et.properties,rt)){const ot=et.properties[rt],st=new DefinedInfo(rt,et.transform(et.attributes||{},rt),ot,et.space);et.mustUseProperty&&et.mustUseProperty.includes(rt)&&(st.mustUseProperty=!0),tt[rt]=st,nt[normalize$4(rt)]=rt,nt[normalize$4(st.attribute)]=rt}return new Schema(tt,nt,et.space)}const xlink=create$3({space:"xlink",transform(et,tt){return"xlink:"+tt.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xml=create$3({space:"xml",transform(et,tt){return"xml:"+tt.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(et,tt){return tt in et?et[tt]:tt}function caseInsensitiveTransform(et,tt){return caseSensitiveTransform(et,tt.toLowerCase())}const xmlns$1=create$3({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),aria$1=create$3({transform(et,tt){return tt==="role"?tt:"aria-"+tt.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number$7,ariaColIndex:number$7,ariaColSpan:number$7,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number$7,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number$7,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number$7,ariaRowIndex:number$7,ariaRowSpan:number$7,ariaSelected:booleanish,ariaSetSize:number$7,ariaSort:null,ariaValueMax:number$7,ariaValueMin:number$7,ariaValueNow:number$7,ariaValueText:null,role:null}}),html$5=create$3({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,capture:boolean,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number$7,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number$7|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number$7,hidden:boolean,high:number$7,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number$7,manifest:null,max:null,maxLength:number$7,media:null,method:null,min:null,minLength:number$7,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number$7,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number$7,rowSpan:number$7,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shape:null,size:number$7,sizes:null,slot:null,span:number$7,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number$7,step:null,style:null,tabIndex:number$7,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number$7,wrap:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number$7,borderColor:null,bottomMargin:number$7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number$7,leftMargin:number$7,link:null,longDesc:null,lowSrc:null,marginHeight:number$7,marginWidth:number$7,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number$7,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number$7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number$7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number$7,security:null,unselectable:null}}),svg$1=create$3({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform,properties:{about:commaOrSpaceSeparated,accentHeight:number$7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number$7,amplitude:number$7,arabicForm:null,ascent:number$7,attributeName:null,attributeType:null,azimuth:number$7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number$7,by:null,calcMode:null,capHeight:number$7,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number$7,diffuseConstant:number$7,direction:null,display:null,dur:null,divisor:number$7,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number$7,enableBackground:null,end:null,event:null,exponent:number$7,externalResourcesRequired:null,fill:null,fillOpacity:number$7,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number$7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number$7,horizOriginX:number$7,horizOriginY:number$7,id:null,ideographic:number$7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number$7,k:number$7,k1:number$7,k2:number$7,k3:number$7,k4:number$7,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number$7,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number$7,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number$7,overlineThickness:number$7,paintOrder:null,panose1:null,path:null,pathLength:number$7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number$7,pointsAtY:number$7,pointsAtZ:number$7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number$7,specularExponent:number$7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number$7,strikethroughThickness:number$7,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number$7,strokeOpacity:number$7,strokeWidth:null,style:null,surfaceScale:number$7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number$7,tableValues:null,target:null,targetX:number$7,targetY:number$7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,u1:null,u2:null,underlinePosition:number$7,underlineThickness:number$7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number$7,values:null,vAlphabetic:number$7,vMathematical:number$7,vectorEffect:null,vHanging:number$7,vIdeographic:number$7,version:null,vertAdvY:number$7,vertOriginX:number$7,vertOriginY:number$7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number$7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),valid=/^data[-\w.:]+$/i,dash$1=/-[a-z]/g,cap=/[A-Z]/g;function find$4(et,tt){const nt=normalize$4(tt);let rt=tt,ot=Info$2;if(nt in et.normal)return et.property[et.normal[nt]];if(nt.length>4&&nt.slice(0,4)==="data"&&valid.test(tt)){if(tt.charAt(4)==="-"){const st=tt.slice(5).replace(dash$1,camelcase);rt="data"+st.charAt(0).toUpperCase()+st.slice(1)}else{const st=tt.slice(4);if(!dash$1.test(st)){let ut=st.replace(cap,kebab);ut.charAt(0)!=="-"&&(ut="-"+ut),tt="data"+ut}}ot=DefinedInfo}return new ot(rt,tt)}function kebab(et){return"-"+et.toLowerCase()}function camelcase(et){return et.charAt(1).toUpperCase()}const html$4=merge$5([xml,xlink,xmlns$1,aria$1,html$5],"html"),svg=merge$5([xml,xlink,xmlns$1,aria$1,svg$1],"svg"),search=/[#.]/g;function parseSelector$1(et,tt){const nt=et||"",rt={};let ot=0,st,ut;for(;ot<nt.length;){search.lastIndex=ot;const ct=search.exec(nt),ft=nt.slice(ot,ct?ct.index:nt.length);ft&&(st?st==="#"?rt.id=ft:Array.isArray(rt.className)?rt.className.push(ft):rt.className=[ft]:ut=ft,ot+=ft.length),ct&&(st=ct[0],ot++)}return{type:"element",tagName:ut||tt||"div",properties:rt,children:[]}}function parse$c(et){const tt=String(et||"").trim();return tt?tt.split(/[ \t\n\r\f]+/g):[]}function stringify$3(et){return et.join(" ").trim()}function parse$b(et){const tt=[],nt=String(et||"");let rt=nt.indexOf(","),ot=0,st=!1;for(;!st;){rt===-1&&(rt=nt.length,st=!0);const ut=nt.slice(ot,rt).trim();(ut||!st)&&tt.push(ut),ot=rt+1,rt=nt.indexOf(",",ot)}return tt}function stringify$2(et,tt){const nt=tt||{};return(et[et.length-1]===""?[...et,""]:et).join((nt.padRight?" ":"")+","+(nt.padLeft===!1?"":" ")).trim()}const buttonTypes=new Set(["menu","submit","reset","button"]),own$a={}.hasOwnProperty;function core$2(et,tt,nt){const rt=nt&&createAdjustMap(nt);return function(st,ut,...ct){let ft=-1,pt;if(st==null)pt={type:"root",children:[]},ct.unshift(ut);else if(pt=parseSelector$1(st,tt),pt.tagName=pt.tagName.toLowerCase(),rt&&own$a.call(rt,pt.tagName)&&(pt.tagName=rt[pt.tagName]),isProperties(ut,pt.tagName)){let ht;for(ht in ut)own$a.call(ut,ht)&&addProperty(et,pt.properties,ht,ut[ht])}else ct.unshift(ut);for(;++ft<ct.length;)addChild$1(pt.children,ct[ft]);return pt.type==="element"&&pt.tagName==="template"&&(pt.content={type:"root",children:pt.children},pt.children=[]),pt}}function isProperties(et,tt){return et==null||typeof et!="object"||Array.isArray(et)?!1:tt==="input"||!et.type||typeof et.type!="string"?!0:"children"in et&&Array.isArray(et.children)?!1:tt==="button"?buttonTypes.has(et.type.toLowerCase()):!("value"in et)}function addProperty(et,tt,nt,rt){const ot=find$4(et,nt);let st=-1,ut;if(rt!=null){if(typeof rt=="number"){if(Number.isNaN(rt))return;ut=rt}else typeof rt=="boolean"?ut=rt:typeof rt=="string"?ot.spaceSeparated?ut=parse$c(rt):ot.commaSeparated?ut=parse$b(rt):ot.commaOrSpaceSeparated?ut=parse$c(parse$b(rt).join(" ")):ut=parsePrimitive(ot,ot.property,rt):Array.isArray(rt)?ut=rt.concat():ut=ot.property==="style"?style$4(rt):String(rt);if(Array.isArray(ut)){const ct=[];for(;++st<ut.length;)ct[st]=parsePrimitive(ot,ot.property,ut[st]);ut=ct}ot.property==="className"&&Array.isArray(tt.className)&&(ut=tt.className.concat(ut)),tt[ot.property]=ut}}function addChild$1(et,tt){let nt=-1;if(tt!=null)if(typeof tt=="string"||typeof tt=="number")et.push({type:"text",value:String(tt)});else if(Array.isArray(tt))for(;++nt<tt.length;)addChild$1(et,tt[nt]);else if(typeof tt=="object"&&"type"in tt)tt.type==="root"?addChild$1(et,tt.children):et.push(tt);else throw new Error("Expected node, nodes, or string, got `"+tt+"`")}function parsePrimitive(et,tt,nt){if(typeof nt=="string"){if(et.number&&nt&&!Number.isNaN(Number(nt)))return Number(nt);if((et.boolean||et.overloadedBoolean)&&(nt===""||normalize$4(nt)===normalize$4(tt)))return!0}return nt}function style$4(et){const tt=[];let nt;for(nt in et)own$a.call(et,nt)&&tt.push([nt,et[nt]].join(": "));return tt.join("; ")}function createAdjustMap(et){const tt={};let nt=-1;for(;++nt<et.length;)tt[et[nt].toLowerCase()]=et[nt];return tt}const h$2=core$2(html$4,"div"),svgCaseSensitiveTagNames=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],s=core$2(svg,"g",svgCaseSensitiveTagNames);function location(et){const tt=String(et),nt=[],rt=/\r?\n|\r/g;for(;rt.test(tt);)nt.push(rt.lastIndex);return nt.push(tt.length+1),{toPoint:ot,toOffset:st};function ot(ut){let ct=-1;if(typeof ut=="number"&&ut>-1&&ut<nt[nt.length-1]){for(;++ct<nt.length;)if(nt[ct]>ut)return{line:ct+1,column:ut-(ct>0?nt[ct-1]:0)+1,offset:ut}}return{line:void 0,column:void 0,offset:void 0}}function st(ut){const ct=ut&&ut.line,ft=ut&&ut.column;if(typeof ct=="number"&&typeof ft=="number"&&!Number.isNaN(ct)&&!Number.isNaN(ft)&&ct-1 in nt){const pt=(nt[ct-2]||0)+ft-1||0;if(pt>-1&&pt<nt[nt.length-1])return pt}return-1}}const webNamespaces={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},own$9={}.hasOwnProperty,proto$1=Object.prototype;function fromParse5(et,tt){const nt=tt||{};let rt,ot;return isFile(nt)?(ot=nt,rt={}):(ot=nt.file||void 0,rt=nt),one$8({schema:rt.space==="svg"?svg:html$4,file:ot,verbose:rt.verbose,location:!1},et)}function one$8(et,tt){let nt;switch(tt.nodeName){case"#comment":{const rt=tt;return nt={type:"comment",value:rt.data},patch$3(et,rt,nt),nt}case"#document":case"#document-fragment":{const rt=tt,ot="mode"in rt?rt.mode==="quirks"||rt.mode==="limited-quirks":!1;if(nt={type:"root",children:all$4(et,tt.childNodes),data:{quirksMode:ot}},et.file&&et.location){const st=String(et.file),ut=location(st),ct=ut.toPoint(0),ft=ut.toPoint(st.length);nt.position={start:ct,end:ft}}return nt}case"#documentType":{const rt=tt;return nt={type:"doctype"},patch$3(et,rt,nt),nt}case"#text":{const rt=tt;return nt={type:"text",value:rt.value},patch$3(et,rt,nt),nt}default:return nt=element$4(et,tt),nt}}function all$4(et,tt){let nt=-1;const rt=[];for(;++nt<tt.length;)rt[nt]=one$8(et,tt[nt]);return rt}function element$4(et,tt){const nt=et.schema;et.schema=tt.namespaceURI===webNamespaces.svg?svg:html$4;let rt=-1;const ot={};for(;++rt<tt.attrs.length;){const ct=tt.attrs[rt],ft=(ct.prefix?ct.prefix+":":"")+ct.name;own$9.call(proto$1,ft)||(ot[ft]=ct.value)}const ut=(et.schema.space==="svg"?s:h$2)(tt.tagName,ot,all$4(et,tt.childNodes));if(patch$3(et,tt,ut),ut.tagName==="template"){const ct=tt,ft=ct.sourceCodeLocation,pt=ft&&ft.startTag&&position$3(ft.startTag),ht=ft&&ft.endTag&&position$3(ft.endTag),mt=one$8(et,ct.content);pt&&ht&&et.file&&(mt.position={start:pt.end,end:ht.start}),ut.content=mt}return et.schema=nt,ut}function patch$3(et,tt,nt){if("sourceCodeLocation"in tt&&tt.sourceCodeLocation&&et.file){const rt=createLocation$1(et,nt,tt.sourceCodeLocation);rt&&(et.location=!0,nt.position=rt)}}function createLocation$1(et,tt,nt){const rt=position$3(nt);if(tt.type==="element"){const ot=tt.children[tt.children.length-1];if(rt&&!nt.endTag&&ot&&ot.position&&ot.position.end&&(rt.end=Object.assign({},ot.position.end)),et.verbose){const st={};let ut;if(nt.attrs)for(ut in nt.attrs)own$9.call(nt.attrs,ut)&&(st[find$4(et.schema,ut).property]=position$3(nt.attrs[ut]));tt.data={position:{opening:position$3(nt.startTag),closing:nt.endTag?position$3(nt.endTag):null,properties:st}}}}return rt}function position$3(et){const tt=point$9({line:et.startLine,column:et.startCol,offset:et.startOffset}),nt=point$9({line:et.endLine,column:et.endCol,offset:et.endOffset});return tt||nt?{start:tt,end:nt}:void 0}function point$9(et){return et.line&&et.column?et:void 0}function isFile(et){return"messages"in et}const own$8={}.hasOwnProperty;function zwitch(et,tt){const nt=tt||{};function rt(ot,...st){let ut=rt.invalid;const ct=rt.handlers;if(ot&&own$8.call(ot,et)){const ft=String(ot[et]);ut=own$8.call(ct,ft)?ct[ft]:rt.unknown}if(ut)return ut.call(this,ot,...st)}return rt.handlers=nt.handlers||{},rt.invalid=nt.invalid,rt.unknown=nt.unknown,rt}const own$7={}.hasOwnProperty,one$7=zwitch("type",{handlers:{root:root$2,element:element$3,text:text$5,comment:comment$1,doctype:doctype$1}});function toParse5(et,tt){const nt=tt&&typeof tt=="object"?tt.space:tt;return one$7(et,nt==="svg"?svg:html$4)}function root$2(et,tt){const nt={nodeName:"#document",mode:(et.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return nt.childNodes=all$3(et.children,nt,tt),patch$2(et,nt),nt}function fragment(et,tt){const nt={nodeName:"#document-fragment",childNodes:[]};return nt.childNodes=all$3(et.children,nt,tt),patch$2(et,nt),nt}function doctype$1(et){const tt={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0};return patch$2(et,tt),tt}function text$5(et){const tt={nodeName:"#text",value:et.value,parentNode:void 0};return patch$2(et,tt),tt}function comment$1(et){const tt={nodeName:"#comment",data:et.value,parentNode:void 0};return patch$2(et,tt),tt}function element$3(et,tt){const nt=tt;let rt=nt;et.type==="element"&&et.tagName.toLowerCase()==="svg"&&nt.space==="html"&&(rt=svg);const ot=[];let st;if(et.properties){for(st in et.properties)if(st!=="children"&&own$7.call(et.properties,st)){const ct=createProperty(rt,st,et.properties[st]);ct&&ot.push(ct)}}const ut={nodeName:et.tagName,tagName:et.tagName,attrs:ot,namespaceURI:webNamespaces[rt.space],childNodes:[],parentNode:void 0};return ut.childNodes=all$3(et.children,ut,rt),patch$2(et,ut),et.tagName==="template"&&et.content&&(ut.content=fragment(et.content,rt)),ut}function createProperty(et,tt,nt){const rt=find$4(et,tt);if(nt==null||nt===!1||typeof nt=="number"&&Number.isNaN(nt)||!nt&&rt.boolean)return;Array.isArray(nt)&&(nt=rt.commaSeparated?stringify$2(nt):stringify$3(nt));const ot={name:rt.attribute,value:nt===!0?"":String(nt)};if(rt.space&&rt.space!=="html"&&rt.space!=="svg"){const st=ot.name.indexOf(":");st<0?ot.prefix="":(ot.name=ot.name.slice(st+1),ot.prefix=rt.attribute.slice(0,st)),ot.namespace=webNamespaces[rt.space]}return ot}function all$3(et,tt,nt){let rt=-1;const ot=[];if(et)for(;++rt<et.length;){const st=one$7(et[rt],nt);st.parentNode=tt,ot.push(st)}return ot}function patch$2(et,tt){const nt=et.position;nt&&nt.start&&nt.end&&(tt.sourceCodeLocation={startLine:nt.start.line,startCol:nt.start.column,startOffset:nt.start.offset,endLine:nt.end.line,endCol:nt.end.column,endOffset:nt.end.offset})}const htmlVoidElements=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"],inTemplateMode="IN_TEMPLATE_MODE",dataState="DATA_STATE",characterToken="CHARACTER_TOKEN",startTagToken="START_TAG_TOKEN",endTagToken="END_TAG_TOKEN",commentToken="COMMENT_TOKEN",doctypeToken="DOCTYPE_TOKEN",parseOptions$2={sourceCodeLocationInfo:!0,scriptingEnabled:!1},raw$1=function(et,tt,nt){let rt=-1;const ot=new parser$4(parseOptions$2),st=zwitch("type",{handlers:{root:Et,element:xt,text:At,comment:$t,doctype:Ct,raw:Ot},unknown:unknown$1});let ut,ct,ft,pt,ht;if(isOptions(tt)&&(nt=tt,tt=void 0),nt&&nt.passThrough)for(;++rt<nt.passThrough.length;)st.handlers[nt.passThrough[rt]]=Rt;const mt=fromParse5(documentMode(et)?vt():yt(),tt);if(ut&&visit$4(mt,"comment",(kt,Mt,Ft)=>{const zt=kt;if(zt.value.stitch&&Ft!==null&&Mt!==null)return Ft.children[Mt]=zt.value.stitch,Mt}),et.type!=="root"&&mt.type==="root"&&mt.children.length===1)return mt.children[0];return mt;function yt(){const kt={nodeName:"template",tagName:"template",attrs:[],namespaceURI:webNamespaces.html,childNodes:[]},Mt={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:webNamespaces.html,childNodes:[]},Ft={nodeName:"#document-fragment",childNodes:[]};if(ot._bootstrap(Mt,kt),ot._pushTmplInsertionMode(inTemplateMode),ot._initTokenizerForFragmentParsing(),ot._insertFakeRootElement(),ot._resetInsertionMode(),ot._findFormInFragmentContext(),ct=ot.tokenizer,!ct)throw new Error("Expected `tokenizer`");return ft=ct.preprocessor,ht=ct.__mixins[0],pt=ht.posTracker,st(et),It(),ot._adoptNodes(Mt.childNodes[0],Ft),Ft}function vt(){const kt=ot.treeAdapter.createDocument();if(ot._bootstrap(kt,void 0),ct=ot.tokenizer,!ct)throw new Error("Expected `tokenizer`");return ft=ct.preprocessor,ht=ct.__mixins[0],pt=ht.posTracker,st(et),It(),kt}function Tt(kt){let Mt=-1;if(kt)for(;++Mt<kt.length;)st(kt[Mt])}function Et(kt){Tt(kt.children)}function xt(kt){It(),ot._processInputToken(startTag(kt)),Tt(kt.children),htmlVoidElements.includes(kt.tagName)||(It(),ot._processInputToken(endTag(kt)))}function At(kt){It(),ot._processInputToken({type:characterToken,chars:kt.value,location:createParse5Location(kt)})}function Ct(kt){It(),ot._processInputToken({type:doctypeToken,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:createParse5Location(kt)})}function $t(kt){It(),ot._processInputToken({type:commentToken,data:kt.value,location:createParse5Location(kt)})}function Ot(kt){const Mt=pointStart(kt),Ft=Mt.line||1,zt=Mt.column||1,Vt=Mt.offset||0;if(!ft)throw new Error("Expected `preprocessor`");if(!ct)throw new Error("Expected `tokenizer`");if(!pt)throw new Error("Expected `posTracker`");if(!ht)throw new Error("Expected `locationTracker`");ft.html=void 0,ft.pos=-1,ft.lastGapPos=-1,ft.lastCharPos=-1,ft.gapStack=[],ft.skipNextNewLine=!1,ft.lastChunkWritten=!1,ft.endOfChunkHit=!1,pt.isEol=!1,pt.lineStartPos=-zt+1,pt.droppedBufferSize=Vt,pt.offset=0,pt.col=1,pt.line=Ft,ht.currentAttrLocation=void 0,ht.ctLoc=createParse5Location(kt),ct.write(kt.value),ot._runParsingLoop(null),(ct.state==="NAMED_CHARACTER_REFERENCE_STATE"||ct.state==="NUMERIC_CHARACTER_REFERENCE_END_STATE")&&(ft.lastChunkWritten=!0,ct[ct.state](ct._consume()))}function Rt(kt){ut=!0;let Mt;"children"in kt?Mt={...kt,children:raw$1({type:"root",children:kt.children},tt,nt).children}:Mt={...kt},$t({type:"comment",value:{stitch:Mt}})}function It(){if(!ct)throw new Error("Expected `tokenizer`");if(!pt)throw new Error("Expected `posTracker`");const kt=ct.currentCharacterToken;kt&&(kt.location.endLine=pt.line,kt.location.endCol=pt.col+1,kt.location.endOffset=pt.offset+1,ot._processInputToken(kt)),ct.tokenQueue=[],ct.state=dataState,ct.returnState="",ct.charRefCode=-1,ct.tempBuff=[],ct.lastStartTagName="",ct.consumedAfterSnapshot=-1,ct.active=!1,ct.currentCharacterToken=void 0,ct.currentToken=void 0,ct.currentAttr=void 0}};function startTag(et){const tt=Object.assign(createParse5Location(et));return tt.startTag=Object.assign({},tt),{type:startTagToken,tagName:et.tagName,selfClosing:!1,attrs:attributes$1(et),location:tt}}function attributes$1(et){return toParse5({tagName:et.tagName,type:"element",properties:et.properties,children:[]}).attrs}function endTag(et){const tt=Object.assign(createParse5Location(et));return tt.startTag=Object.assign({},tt),{type:endTagToken,tagName:et.tagName,attrs:[],location:tt}}function unknown$1(et){throw new Error("Cannot compile `"+et.type+"` node")}function documentMode(et){const tt=et.type==="root"?et.children[0]:et;return Boolean(tt&&(tt.type==="doctype"||tt.type==="element"&&tt.tagName==="html"))}function createParse5Location(et){const tt=pointStart(et),nt=pointEnd(et);return{startLine:tt.line,startCol:tt.column,startOffset:tt.offset,endLine:nt.line,endCol:nt.column,endOffset:nt.offset}}function isOptions(et){return Boolean(et&&!("message"in et&&"messages"in et))}function rehypeRaw(et={}){return(tt,nt)=>raw$1(tt,nt,et)}var hastUtilSanitize={exports:{}};const strip=["script"],clobberPrefix="user-content-",clobber=["name","id"],ancestors={tbody:["table"],tfoot:["table"],thead:["table"],td:["table"],th:["table"],tr:["table"]},protocols={href:["http","https","mailto","xmpp","irc","ircs"],cite:["http","https"],src:["http","https"],longDesc:["http","https"]},tagNames=["h1","h2","h3","h4","h5","h6","br","b","i","strong","em","a","pre","code","img","tt","div","ins","del","sup","sub","p","ol","ul","table","thead","tbody","tfoot","blockquote","dl","dt","dd","kbd","q","samp","var","hr","ruby","rt","rp","li","tr","td","th","s","strike","summary","details","caption","figure","figcaption","abbr","bdo","cite","dfn","mark","small","span","time","wbr","input"],attributes={a:["href"],img:["src","longDesc"],input:[["type","checkbox"],["disabled",!0]],li:[["className","task-list-item"]],div:["itemScope","itemType"],blockquote:["cite"],del:["cite"],ins:["cite"],q:["cite"],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","ariaDescribedBy","ariaHidden","ariaLabel","ariaLabelledBy","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","cols","colSpan","color","compact","coords","dateTime","dir","disabled","encType","htmlFor","frame","headers","height","hrefLang","hSpace","isMap","id","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rows","rowSpan","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","type","useMap","vAlign","value","vSpace","width","itemProp"]},required$1={input:{type:"checkbox",disabled:!0}},require$$1$5={strip,clobberPrefix,clobber,ancestors,protocols,tagNames,attributes,required:required$1};var xtend$4=immutable,defaults$3=require$$1$5,lib=wrapper,own$6={}.hasOwnProperty,allData="data*",commentEnd="-->",nodeSchema={root:{children:all$2},doctype:handleDoctype,comment:handleComment,element:{tagName:handleTagName,properties:handleProperties,children:all$2},text:{value:handleValue},"*":{data:allow,position:allow}};function wrapper(et,tt){var nt={type:"root",children:[]},rt;return!et||typeof et!="object"||!et.type||(rt=one$6(xtend$4(defaults$3,tt||{}),et,[]),!rt)?nt:"length"in rt?rt.length===1?rt[0]:(nt.children=rt,nt):rt}function one$6(et,tt,nt){var rt=tt&&tt.type,ot={type:tt.type},st=!0,ut,ct,ft,pt;if(!own$6.call(nodeSchema,rt))st=!1;else if(ut=nodeSchema[rt],typeof ut=="function"&&(ut=ut(et,tt)),!ut)st=!1;else{ct=xtend$4(ut,nodeSchema["*"]);for(pt in ct)ft=ct[pt](et,tt[pt],tt,nt),ft===!1?(st=!1,ot[pt]=tt[pt]):ft!=null&&(ot[pt]=ft)}return st?ot:!ot.children||ot.children.length===0||et.strip.indexOf(ot.tagName)!==-1?null:ot.children}function all$2(et,tt,nt,rt){var ot=tt||[],st=ot.length||0,ut=[],ct=-1,ft;for(rt=rt.concat(nt.tagName);++ct<st;)ft=one$6(et,ot[ct],rt),ft&&("length"in ft?ut=ut.concat(ft):ut.push(ft));return ut}function handleProperties(et,tt,nt,rt){var ot=handleTagName(et,nt.tagName,nt,rt),st=et.attributes,ut=et.required||{},ct=tt||{},ft={},pt,ht,mt,yt,vt;pt=xtend$4(toPropertyValueMap(st["*"]),toPropertyValueMap(own$6.call(st,ot)?st[ot]:[]));for(yt in ct){if(vt=ct[yt],own$6.call(pt,yt))mt=pt[yt];else if(data$2(yt)&&own$6.call(pt,allData))mt=pt[allData];else continue;vt&&typeof vt=="object"&&"length"in vt?vt=handlePropertyValues(et,vt,yt,mt):vt=handlePropertyValue(et,vt,yt,mt),vt!=null&&(ft[yt]=vt)}ht=own$6.call(ut,ot)?ut[ot]:{};for(yt in ht)own$6.call(ft,yt)||(ft[yt]=ht[yt]);return ft}function handlePropertyValues(et,tt,nt,rt){for(var ot=tt.length,st=[],ut=-1,ct;++ut<ot;)ct=handlePropertyValue(et,tt[ut],nt,rt),ct!=null&&st.push(ct);return st}function handlePropertyValue(et,tt,nt,rt){return typeof tt!="boolean"&&typeof tt!="number"&&typeof tt!="string"||!handleProtocol(et,tt,nt)||rt.length!==0&&rt.indexOf(tt)===-1?null:(et.clobber.indexOf(nt)!==-1&&(tt=et.clobberPrefix+tt),tt)}function handleProtocol(et,tt,nt){var rt=et.protocols,ot,st,ut,ct,ft;if(rt=own$6.call(rt,nt)?rt[nt].concat():[],rt.length===0||(tt=String(tt),st=tt.charAt(0),st==="#"||st==="/")||(ut=tt.indexOf(":"),ut===-1))return!0;for(ct=rt.length,ft=-1;++ft<ct;)if(ot=rt[ft],ut===ot.length&&tt.slice(0,ot.length)===ot)return!0;return ft=tt.indexOf("?"),ft!==-1&&ut>ft||(ft=tt.indexOf("#"),ft!==-1&&ut>ft)}function handleDoctypeName(){return"html"}function handleTagName(et,tt,nt,rt){var ot=typeof tt=="string"?tt:null,st=et.ancestors,ut,ct;if(!ot||ot==="*"||et.tagNames.indexOf(ot)===-1)return!1;if(st=own$6.call(st,ot)?st[ot]:[],st.length!==0)for(ut=st.length+1,ct=-1;++ct<ut;){if(!st[ct])return!1;if(rt.indexOf(st[ct])!==-1)break}return ot}function handleDoctype(et){return et.allowDoctypes?{name:handleDoctypeName}:null}function handleComment(et){return et.allowComments?{value:handleCommentValue}:null}function handleCommentValue(et,tt){var nt=typeof tt=="string"?tt:"",rt=nt.indexOf(commentEnd);return rt===-1?nt:nt.slice(0,rt)}function handleValue(et,tt){return typeof tt=="string"?tt:""}function toPropertyValueMap(et){for(var tt={},nt=et.length,rt=-1,ot;++rt<nt;)ot=et[rt],ot&&typeof ot=="object"&&"length"in ot?tt[ot[0]]=ot.slice(1):tt[ot]=[];return tt}function allow(et,tt){return tt}function data$2(et){return et.length>4&&et.slice(0,4).toLowerCase()==="data"}(function(et){et.exports=lib})(hastUtilSanitize);var clean$1=hastUtilSanitize.exports,rehypeSanitize=sanitize$1;function sanitize$1(et){return tt;function tt(nt){return clean$1(nt,et)}}function core$1(et,tt){if(et=et.replace(tt.subset?charactersToExpression(tt.subset):/["&'<>`]/g,rt),tt.subset||tt.escapeOnly)return et;return et.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,nt).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,rt);function nt(ot,st,ut){return tt.format((ot.charCodeAt(0)-55296)*1024+ot.charCodeAt(1)-56320+65536,ut.charCodeAt(st+2),tt)}function rt(ot,st,ut){return tt.format(ot.charCodeAt(0),ut.charCodeAt(st+1),tt)}}function charactersToExpression(et){const tt=[];let nt=-1;for(;++nt<et.length;)tt.push(et[nt].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+tt.join("|")+")","g")}function toHexadecimal(et,tt,nt){const rt="&#x"+et.toString(16).toUpperCase();return nt&&tt&&!/[\dA-Fa-f]/.test(String.fromCharCode(tt))?rt:rt+";"}function toDecimal(et,tt,nt){const rt="&#"+String(et);return nt&&tt&&!/\d/.test(String.fromCharCode(tt))?rt:rt+";"}const characterEntitiesLegacy=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],characterEntitiesHtml4={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"},dangerous=["cent","copy","divide","gt","lt","not","para","times"],own$5={}.hasOwnProperty,characters={};let key$4;for(key$4 in characterEntitiesHtml4)own$5.call(characterEntitiesHtml4,key$4)&&(characters[characterEntitiesHtml4[key$4]]=key$4);function toNamed(et,tt,nt,rt){const ot=String.fromCharCode(et);if(own$5.call(characters,ot)){const st=characters[ot],ut="&"+st;return nt&&characterEntitiesLegacy.includes(st)&&!dangerous.includes(st)&&(!rt||tt&&tt!==61&&/[^\da-z]/i.test(String.fromCharCode(tt)))?ut:ut+";"}return""}function formatSmart(et,tt,nt){let rt=toHexadecimal(et,tt,nt.omitOptionalSemicolons),ot;if((nt.useNamedReferences||nt.useShortestReferences)&&(ot=toNamed(et,tt,nt.omitOptionalSemicolons,nt.attribute)),(nt.useShortestReferences||!ot)&&nt.useShortestReferences){const st=toDecimal(et,tt,nt.omitOptionalSemicolons);st.length<rt.length&&(rt=st)}return ot&&(!nt.useShortestReferences||ot.length<rt.length)?ot:rt}function stringifyEntities(et,tt){return core$1(et,Object.assign({format:formatSmart},tt))}function comment(et,tt,nt,rt){return rt.settings.bogusComments?"<?"+stringifyEntities(et.value,Object.assign({},rt.settings.characterReferences,{subset:[">"]}))+">":"<!--"+et.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,ot)+"-->";function ot(st){return stringifyEntities(st,Object.assign({},rt.settings.characterReferences,{subset:["<",">"]}))}}function doctype(et,tt,nt,rt){return"<!"+(rt.settings.upperDoctype?"DOCTYPE":"doctype")+(rt.settings.tightDoctype?"":" ")+"html>"}function ccount(et,tt){const nt=String(et);if(typeof tt!="string")throw new TypeError("Expected character");let rt=0,ot=nt.indexOf(tt);for(;ot!==-1;)rt++,ot=nt.indexOf(tt,ot+tt.length);return rt}function whitespace(et){const tt=et&&typeof et=="object"&&et.type==="text"?et.value||"":et;return typeof tt=="string"&&tt.replace(/[ \t\n\f\r]/g,"")===""}const siblingAfter=siblings(1),siblingBefore=siblings(-1);function siblings(et){return tt;function tt(nt,rt,ot){const st=nt?nt.children:[];let ut=(rt||0)+et,ct=st&&st[ut];if(!ot)for(;ct&&whitespace(ct);)ut+=et,ct=st[ut];return ct}}const own$4={}.hasOwnProperty;function omission(et){return tt;function tt(nt,rt,ot){return own$4.call(et,nt.tagName)&&et[nt.tagName](nt,rt,ot)}}const closing=omission({html:html$3,head:headOrColgroupOrCaption,body:body$1,p:p$1,li,dt,dd,rt:rubyElement,rp:rubyElement,optgroup,option,menuitem,colgroup:headOrColgroupOrCaption,caption:headOrColgroupOrCaption,thead,tbody:tbody$1,tfoot,tr:tr$1,td:cells,th:cells});function headOrColgroupOrCaption(et,tt,nt){const rt=siblingAfter(nt,tt,!0);return!rt||rt.type!=="comment"&&!(rt.type==="text"&&whitespace(rt.value.charAt(0)))}function html$3(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type!=="comment"}function body$1(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type!=="comment"}function p$1(et,tt,nt){const rt=siblingAfter(nt,tt);return rt?rt.type==="element"&&(rt.tagName==="address"||rt.tagName==="article"||rt.tagName==="aside"||rt.tagName==="blockquote"||rt.tagName==="details"||rt.tagName==="div"||rt.tagName==="dl"||rt.tagName==="fieldset"||rt.tagName==="figcaption"||rt.tagName==="figure"||rt.tagName==="footer"||rt.tagName==="form"||rt.tagName==="h1"||rt.tagName==="h2"||rt.tagName==="h3"||rt.tagName==="h4"||rt.tagName==="h5"||rt.tagName==="h6"||rt.tagName==="header"||rt.tagName==="hgroup"||rt.tagName==="hr"||rt.tagName==="main"||rt.tagName==="menu"||rt.tagName==="nav"||rt.tagName==="ol"||rt.tagName==="p"||rt.tagName==="pre"||rt.tagName==="section"||rt.tagName==="table"||rt.tagName==="ul"):!nt||!(nt.type==="element"&&(nt.tagName==="a"||nt.tagName==="audio"||nt.tagName==="del"||nt.tagName==="ins"||nt.tagName==="map"||nt.tagName==="noscript"||nt.tagName==="video"))}function li(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&rt.tagName==="li"}function dt(et,tt,nt){const rt=siblingAfter(nt,tt);return rt&&rt.type==="element"&&(rt.tagName==="dt"||rt.tagName==="dd")}function dd(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&(rt.tagName==="dt"||rt.tagName==="dd")}function rubyElement(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&(rt.tagName==="rp"||rt.tagName==="rt")}function optgroup(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&rt.tagName==="optgroup"}function option(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&(rt.tagName==="option"||rt.tagName==="optgroup")}function menuitem(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&(rt.tagName==="menuitem"||rt.tagName==="hr"||rt.tagName==="menu")}function thead(et,tt,nt){const rt=siblingAfter(nt,tt);return rt&&rt.type==="element"&&(rt.tagName==="tbody"||rt.tagName==="tfoot")}function tbody$1(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&(rt.tagName==="tbody"||rt.tagName==="tfoot")}function tfoot(et,tt,nt){return!siblingAfter(nt,tt)}function tr$1(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&rt.tagName==="tr"}function cells(et,tt,nt){const rt=siblingAfter(nt,tt);return!rt||rt.type==="element"&&(rt.tagName==="td"||rt.tagName==="th")}const opening=omission({html:html$2,head,body,colgroup,tbody});function html$2(et){const tt=siblingAfter(et,-1);return!tt||tt.type!=="comment"}function head(et){const tt=et.children,nt=[];let rt=-1;for(;++rt<tt.length;){const ot=tt[rt];if(ot.type==="element"&&(ot.tagName==="title"||ot.tagName==="base")){if(nt.includes(ot.tagName))return!1;nt.push(ot.tagName)}}return tt.length>0}function body(et){const tt=siblingAfter(et,-1,!0);return!tt||tt.type!=="comment"&&!(tt.type==="text"&&whitespace(tt.value.charAt(0)))&&!(tt.type==="element"&&(tt.tagName==="meta"||tt.tagName==="link"||tt.tagName==="script"||tt.tagName==="style"||tt.tagName==="template"))}function colgroup(et,tt,nt){const rt=siblingBefore(nt,tt),ot=siblingAfter(et,-1,!0);return nt&&rt&&rt.type==="element"&&rt.tagName==="colgroup"&&closing(rt,nt.children.indexOf(rt),nt)?!1:ot&&ot.type==="element"&&ot.tagName==="col"}function tbody(et,tt,nt){const rt=siblingBefore(nt,tt),ot=siblingAfter(et,-1);return nt&&rt&&rt.type==="element"&&(rt.tagName==="thead"||rt.tagName==="tbody")&&closing(rt,nt.children.indexOf(rt),nt)?!1:ot&&ot.type==="element"&&ot.tagName==="tr"}const constants$2={name:[[`	
\f\r &/=>`.split(""),`	
\f\r "&'/=>\``.split("")],[`\0	
\f\r "&'/<=>`.split(""),`\0	
\f\r "&'/<=>\``.split("")]],unquoted:[[`	
\f\r &>`.split(""),`\0	
\f\r "&'<=>\``.split("")],[`\0	
\f\r "&'<=>\``.split(""),`\0	
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function element$2(et,tt,nt,rt){const ot=rt.schema,st=ot.space==="svg"?!1:rt.settings.omitOptionalTags;let ut=ot.space==="svg"?rt.settings.closeEmptyElements:rt.settings.voids.includes(et.tagName.toLowerCase());const ct=[];let ft;ot.space==="html"&&et.tagName==="svg"&&(rt.schema=svg);const pt=serializeAttributes(rt,et.properties),ht=rt.all(ot.space==="html"&&et.tagName==="template"?et.content:et);return rt.schema=ot,ht&&(ut=!1),(pt||!st||!opening(et,tt,nt))&&(ct.push("<",et.tagName,pt?" "+pt:""),ut&&(ot.space==="svg"||rt.settings.closeSelfClosing)&&(ft=pt.charAt(pt.length-1),(!rt.settings.tightSelfClosing||ft==="/"||ft&&ft!=='"'&&ft!=="'")&&ct.push(" "),ct.push("/")),ct.push(">")),ct.push(ht),!ut&&(!st||!closing(et,tt,nt))&&ct.push("</"+et.tagName+">"),ct.join("")}function serializeAttributes(et,tt){const nt=[];let rt=-1,ot;if(tt){for(ot in tt)if(tt[ot]!==void 0&&tt[ot]!==null){const st=serializeAttribute(et,ot,tt[ot]);st&&nt.push(st)}}for(;++rt<nt.length;){const st=et.settings.tightAttributes?nt[rt].charAt(nt[rt].length-1):null;rt!==nt.length-1&&st!=='"'&&st!=="'"&&(nt[rt]+=" ")}return nt.join("")}function serializeAttribute(et,tt,nt){const rt=find$4(et.schema,tt),ot=et.settings.allowParseErrors&&et.schema.space==="html"?0:1,st=et.settings.allowDangerousCharacters?0:1;let ut=et.quote,ct;if(rt.overloadedBoolean&&(nt===rt.attribute||nt==="")?nt=!0:(rt.boolean||rt.overloadedBoolean&&typeof nt!="string")&&(nt=Boolean(nt)),nt==null||nt===!1||typeof nt=="number"&&Number.isNaN(nt))return"";const ft=stringifyEntities(rt.attribute,Object.assign({},et.settings.characterReferences,{subset:constants$2.name[ot][st]}));return nt===!0||(nt=Array.isArray(nt)?(rt.commaSeparated?stringify$2:stringify$3)(nt,{padLeft:!et.settings.tightCommaSeparatedLists}):String(nt),et.settings.collapseEmptyAttributes&&!nt)?ft:(et.settings.preferUnquoted&&(ct=stringifyEntities(nt,Object.assign({},et.settings.characterReferences,{subset:constants$2.unquoted[ot][st],attribute:!0}))),ct!==nt&&(et.settings.quoteSmart&&ccount(nt,ut)>ccount(nt,et.alternative)&&(ut=et.alternative),ct=ut+stringifyEntities(nt,Object.assign({},et.settings.characterReferences,{subset:(ut==="'"?constants$2.single:constants$2.double)[ot][st],attribute:!0}))+ut),ft+(ct&&"="+ct))}function text$4(et,tt,nt,rt){return nt&&nt.type==="element"&&(nt.tagName==="script"||nt.tagName==="style")?et.value:stringifyEntities(et.value,Object.assign({},rt.settings.characterReferences,{subset:["<","&"]}))}function raw(et,tt,nt,rt){return rt.settings.allowDangerousHtml?et.value:text$4(et,tt,nt,rt)}function root$1(et,tt,nt,rt){return rt.all(et)}const handle=zwitch("type",{invalid:invalid$1,unknown,handlers:{comment,doctype,element:element$2,raw,root:root$1,text:text$4}});function invalid$1(et){throw new Error("Expected node, not `"+et+"`")}function unknown(et){throw new Error("Cannot compile unknown node `"+et.type+"`")}function toHtml(et,tt){const nt=tt||{},rt=nt.quote||'"',ot=rt==='"'?"'":'"';if(rt!=='"'&&rt!=="'")throw new Error("Invalid quote `"+rt+"`, expected `'` or `\"`");return{one:one$5,all:all$1,settings:{omitOptionalTags:nt.omitOptionalTags||!1,allowParseErrors:nt.allowParseErrors||!1,allowDangerousCharacters:nt.allowDangerousCharacters||!1,quoteSmart:nt.quoteSmart||!1,preferUnquoted:nt.preferUnquoted||!1,tightAttributes:nt.tightAttributes||!1,upperDoctype:nt.upperDoctype||!1,tightDoctype:nt.tightDoctype||!1,bogusComments:nt.bogusComments||!1,tightCommaSeparatedLists:nt.tightCommaSeparatedLists||!1,tightSelfClosing:nt.tightSelfClosing||!1,collapseEmptyAttributes:nt.collapseEmptyAttributes||!1,allowDangerousHtml:nt.allowDangerousHtml||!1,voids:nt.voids||htmlVoidElements,characterReferences:nt.characterReferences||nt.entities||{},closeSelfClosing:nt.closeSelfClosing||!1,closeEmptyElements:nt.closeEmptyElements||!1},schema:nt.space==="svg"?svg:html$4,quote:rt,alternative:ot}.one(Array.isArray(et)?{type:"root",children:et}:et,void 0,void 0)}function one$5(et,tt,nt){return handle(et,tt,nt,this)}function all$1(et){const tt=[],nt=et&&et.children||[];let rt=-1;for(;++rt<nt.length;)tt[rt]=this.one(nt[rt],rt,et);return tt.join("")}function rehypeStringify(et){const tt=this.data("settings"),nt=Object.assign({},tt,et);Object.assign(this,{Compiler:rt});function rt(ot){return toHtml(ot,nt)}}var nodeEmoji={exports:{}};const umbrella_with_rain_drops="\u2614",coffee="\u2615",aries="\u2648",taurus="\u2649",sagittarius="\u2650",capricorn="\u2651",aquarius="\u2652",pisces="\u2653",anchor="\u2693",white_check_mark="\u2705",sparkles="\u2728",question="\u2753",grey_question="\u2754",grey_exclamation="\u2755",exclamation="\u2757",heavy_exclamation_mark="\u2757",heavy_plus_sign="\u2795",heavy_minus_sign="\u2796",heavy_division_sign="\u2797",hash$1="#\uFE0F\u20E3",keycap_star="*\uFE0F\u20E3",zero$6="0\uFE0F\u20E3",one$4="1\uFE0F\u20E3",two="2\uFE0F\u20E3",three="3\uFE0F\u20E3",four="4\uFE0F\u20E3",five="5\uFE0F\u20E3",six="6\uFE0F\u20E3",seven="7\uFE0F\u20E3",eight="8\uFE0F\u20E3",nine="9\uFE0F\u20E3",copyright="\xA9\uFE0F",registered="\xAE\uFE0F",mahjong="\u{1F004}",black_joker="\u{1F0CF}",a$2="\u{1F170}\uFE0F",b$2="\u{1F171}\uFE0F",o2="\u{1F17E}\uFE0F",parking="\u{1F17F}\uFE0F",ab="\u{1F18E}",cl="\u{1F191}",cool="\u{1F192}",free="\u{1F193}",id$1="\u{1F194}",ng="\u{1F196}",ok$2="\u{1F197}",sos="\u{1F198}",up="\u{1F199}",vs="\u{1F19A}",cn="\u{1F1E8}\u{1F1F3}",de="\u{1F1E9}\u{1F1EA}",es="\u{1F1EA}\u{1F1F8}",fr="\u{1F1EB}\u{1F1F7}",gb="\u{1F1EC}\u{1F1E7}",uk="\u{1F1EC}\u{1F1E7}",it="\u{1F1EE}\u{1F1F9}",jp="\u{1F1EF}\u{1F1F5}",kr="\u{1F1F0}\u{1F1F7}",ru="\u{1F1F7}\u{1F1FA}",us="\u{1F1FA}\u{1F1F8}",koko="\u{1F201}",sa$1="\u{1F202}\uFE0F",u7121="\u{1F21A}",u6307="\u{1F22F}",u7981="\u{1F232}",u7a7a="\u{1F233}",u5408="\u{1F234}",u6e80="\u{1F235}",u6709="\u{1F236}",u6708="\u{1F237}\uFE0F",u7533="\u{1F238}",u5272="\u{1F239}",u55b6="\u{1F23A}",ideograph_advantage="\u{1F250}",accept="\u{1F251}",cyclone="\u{1F300}",foggy="\u{1F301}",closed_umbrella="\u{1F302}",night_with_stars="\u{1F303}",sunrise_over_mountains="\u{1F304}",sunrise="\u{1F305}",city_sunset="\u{1F306}",city_sunrise="\u{1F307}",rainbow="\u{1F308}",bridge_at_night="\u{1F309}",ocean="\u{1F30A}",volcano="\u{1F30B}",milky_way="\u{1F30C}",earth_africa="\u{1F30D}",earth_americas="\u{1F30E}",earth_asia="\u{1F30F}",globe_with_meridians="\u{1F310}",new_moon="\u{1F311}",waxing_crescent_moon="\u{1F312}",first_quarter_moon="\u{1F313}",moon="\u{1F314}",waxing_gibbous_moon="\u{1F314}",full_moon="\u{1F315}",waning_gibbous_moon="\u{1F316}",last_quarter_moon="\u{1F317}",waning_crescent_moon="\u{1F318}",crescent_moon="\u{1F319}",new_moon_with_face="\u{1F31A}",first_quarter_moon_with_face="\u{1F31B}",last_quarter_moon_with_face="\u{1F31C}",full_moon_with_face="\u{1F31D}",sun_with_face="\u{1F31E}",star2="\u{1F31F}",stars="\u{1F320}",thermometer="\u{1F321}\uFE0F",mostly_sunny="\u{1F324}\uFE0F",sun_small_cloud="\u{1F324}\uFE0F",barely_sunny="\u{1F325}\uFE0F",sun_behind_cloud="\u{1F325}\uFE0F",partly_sunny_rain="\u{1F326}\uFE0F",sun_behind_rain_cloud="\u{1F326}\uFE0F",rain_cloud="\u{1F327}\uFE0F",snow_cloud="\u{1F328}\uFE0F",lightning="\u{1F329}\uFE0F",lightning_cloud="\u{1F329}\uFE0F",tornado="\u{1F32A}\uFE0F",tornado_cloud="\u{1F32A}\uFE0F",fog="\u{1F32B}\uFE0F",wind_blowing_face="\u{1F32C}\uFE0F",hotdog="\u{1F32D}",taco="\u{1F32E}",burrito="\u{1F32F}",chestnut="\u{1F330}",seedling="\u{1F331}",evergreen_tree="\u{1F332}",deciduous_tree="\u{1F333}",palm_tree="\u{1F334}",cactus="\u{1F335}",hot_pepper="\u{1F336}\uFE0F",tulip="\u{1F337}",cherry_blossom="\u{1F338}",rose="\u{1F339}",hibiscus="\u{1F33A}",sunflower="\u{1F33B}",blossom="\u{1F33C}",corn="\u{1F33D}",ear_of_rice="\u{1F33E}",herb="\u{1F33F}",four_leaf_clover="\u{1F340}",maple_leaf="\u{1F341}",fallen_leaf="\u{1F342}",leaves="\u{1F343}",mushroom="\u{1F344}",tomato="\u{1F345}",eggplant="\u{1F346}",grapes="\u{1F347}",melon="\u{1F348}",watermelon="\u{1F349}",tangerine="\u{1F34A}",lemon="\u{1F34B}",banana="\u{1F34C}",pineapple="\u{1F34D}",apple="\u{1F34E}",green_apple="\u{1F34F}",pear="\u{1F350}",peach="\u{1F351}",cherries="\u{1F352}",strawberry="\u{1F353}",hamburger="\u{1F354}",pizza="\u{1F355}",meat_on_bone="\u{1F356}",poultry_leg="\u{1F357}",rice_cracker="\u{1F358}",rice_ball="\u{1F359}",rice="\u{1F35A}",curry="\u{1F35B}",ramen="\u{1F35C}",spaghetti="\u{1F35D}",bread="\u{1F35E}",fries="\u{1F35F}",sweet_potato="\u{1F360}",dango="\u{1F361}",oden="\u{1F362}",sushi="\u{1F363}",fried_shrimp="\u{1F364}",fish_cake="\u{1F365}",icecream="\u{1F366}",shaved_ice="\u{1F367}",ice_cream="\u{1F368}",doughnut="\u{1F369}",cookie="\u{1F36A}",chocolate_bar="\u{1F36B}",candy="\u{1F36C}",lollipop="\u{1F36D}",custard="\u{1F36E}",honey_pot="\u{1F36F}",cake="\u{1F370}",bento="\u{1F371}",stew="\u{1F372}",fried_egg="\u{1F373}",cooking="\u{1F373}",fork_and_knife="\u{1F374}",tea="\u{1F375}",sake="\u{1F376}",wine_glass="\u{1F377}",cocktail="\u{1F378}",tropical_drink="\u{1F379}",beer="\u{1F37A}",beers="\u{1F37B}",baby_bottle="\u{1F37C}",knife_fork_plate="\u{1F37D}\uFE0F",champagne="\u{1F37E}",popcorn="\u{1F37F}",ribbon="\u{1F380}",gift="\u{1F381}",birthday="\u{1F382}",jack_o_lantern="\u{1F383}",christmas_tree="\u{1F384}",santa="\u{1F385}",fireworks="\u{1F386}",sparkler="\u{1F387}",balloon="\u{1F388}",tada="\u{1F389}",confetti_ball="\u{1F38A}",tanabata_tree="\u{1F38B}",crossed_flags="\u{1F38C}",bamboo="\u{1F38D}",dolls="\u{1F38E}",flags$1="\u{1F38F}",wind_chime="\u{1F390}",rice_scene="\u{1F391}",school_satchel="\u{1F392}",mortar_board="\u{1F393}",medal="\u{1F396}\uFE0F",reminder_ribbon="\u{1F397}\uFE0F",studio_microphone="\u{1F399}\uFE0F",level_slider="\u{1F39A}\uFE0F",control_knobs="\u{1F39B}\uFE0F",film_frames="\u{1F39E}\uFE0F",admission_tickets="\u{1F39F}\uFE0F",carousel_horse="\u{1F3A0}",ferris_wheel="\u{1F3A1}",roller_coaster="\u{1F3A2}",fishing_pole_and_fish="\u{1F3A3}",microphone="\u{1F3A4}",movie_camera="\u{1F3A5}",cinema="\u{1F3A6}",headphones="\u{1F3A7}",art="\u{1F3A8}",tophat="\u{1F3A9}",circus_tent="\u{1F3AA}",ticket="\u{1F3AB}",clapper="\u{1F3AC}",performing_arts="\u{1F3AD}",video_game="\u{1F3AE}",dart="\u{1F3AF}",slot_machine="\u{1F3B0}",game_die="\u{1F3B2}",bowling="\u{1F3B3}",flower_playing_cards="\u{1F3B4}",musical_note="\u{1F3B5}",notes="\u{1F3B6}",saxophone="\u{1F3B7}",guitar="\u{1F3B8}",musical_keyboard="\u{1F3B9}",trumpet="\u{1F3BA}",violin="\u{1F3BB}",musical_score="\u{1F3BC}",running_shirt_with_sash="\u{1F3BD}",tennis="\u{1F3BE}",ski="\u{1F3BF}",basketball="\u{1F3C0}",checkered_flag="\u{1F3C1}",snowboarder="\u{1F3C2}",runner="\u{1F3C3}\u200D\u2642\uFE0F",running="\u{1F3C3}\u200D\u2642\uFE0F",surfer="\u{1F3C4}\u200D\u2642\uFE0F",sports_medal="\u{1F3C5}",trophy="\u{1F3C6}",horse_racing="\u{1F3C7}",football="\u{1F3C8}",rugby_football="\u{1F3C9}",swimmer="\u{1F3CA}\u200D\u2642\uFE0F",weight_lifter="\u{1F3CB}\uFE0F\u200D\u2642\uFE0F",golfer="\u{1F3CC}\uFE0F\u200D\u2642\uFE0F",racing_motorcycle="\u{1F3CD}\uFE0F",racing_car="\u{1F3CE}\uFE0F",cricket_bat_and_ball="\u{1F3CF}",volleyball="\u{1F3D0}",field_hockey_stick_and_ball="\u{1F3D1}",ice_hockey_stick_and_puck="\u{1F3D2}",table_tennis_paddle_and_ball="\u{1F3D3}",snow_capped_mountain="\u{1F3D4}\uFE0F",camping="\u{1F3D5}\uFE0F",beach_with_umbrella="\u{1F3D6}\uFE0F",building_construction="\u{1F3D7}\uFE0F",house_buildings="\u{1F3D8}\uFE0F",cityscape="\u{1F3D9}\uFE0F",derelict_house_building="\u{1F3DA}\uFE0F",classical_building="\u{1F3DB}\uFE0F",desert="\u{1F3DC}\uFE0F",desert_island="\u{1F3DD}\uFE0F",national_park="\u{1F3DE}\uFE0F",stadium="\u{1F3DF}\uFE0F",house="\u{1F3E0}",house_with_garden="\u{1F3E1}",office="\u{1F3E2}",post_office="\u{1F3E3}",european_post_office="\u{1F3E4}",hospital="\u{1F3E5}",bank="\u{1F3E6}",atm="\u{1F3E7}",hotel="\u{1F3E8}",love_hotel="\u{1F3E9}",convenience_store="\u{1F3EA}",school="\u{1F3EB}",department_store="\u{1F3EC}",factory$5="\u{1F3ED}",izakaya_lantern="\u{1F3EE}",lantern="\u{1F3EE}",japanese_castle="\u{1F3EF}",european_castle="\u{1F3F0}",transgender_flag="\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F",waving_white_flag="\u{1F3F3}\uFE0F",pirate_flag="\u{1F3F4}\u200D\u2620\uFE0F",waving_black_flag="\u{1F3F4}",rosette="\u{1F3F5}\uFE0F",label$1="\u{1F3F7}\uFE0F",badminton_racquet_and_shuttlecock="\u{1F3F8}",bow_and_arrow="\u{1F3F9}",amphora="\u{1F3FA}",rat="\u{1F400}",mouse2="\u{1F401}",ox="\u{1F402}",water_buffalo="\u{1F403}",cow2="\u{1F404}",tiger2="\u{1F405}",leopard="\u{1F406}",rabbit2="\u{1F407}",black_cat="\u{1F408}\u200D\u2B1B",cat2="\u{1F408}",dragon="\u{1F409}",crocodile="\u{1F40A}",whale2="\u{1F40B}",snail="\u{1F40C}",snake="\u{1F40D}",racehorse="\u{1F40E}",ram="\u{1F40F}",goat="\u{1F410}",sheep="\u{1F411}",monkey="\u{1F412}",rooster="\u{1F413}",chicken="\u{1F414}",service_dog="\u{1F415}\u200D\u{1F9BA}",dog2="\u{1F415}",pig2="\u{1F416}",boar="\u{1F417}",elephant="\u{1F418}",octopus="\u{1F419}",shell="\u{1F41A}",bug="\u{1F41B}",ant="\u{1F41C}",bee="\u{1F41D}",honeybee="\u{1F41D}",ladybug="\u{1F41E}",lady_beetle="\u{1F41E}",fish="\u{1F41F}",tropical_fish="\u{1F420}",blowfish="\u{1F421}",turtle="\u{1F422}",hatching_chick="\u{1F423}",baby_chick="\u{1F424}",hatched_chick="\u{1F425}",bird="\u{1F426}",penguin="\u{1F427}",koala="\u{1F428}",poodle="\u{1F429}",dromedary_camel="\u{1F42A}",camel="\u{1F42B}",dolphin="\u{1F42C}",flipper="\u{1F42C}",mouse="\u{1F42D}",cow="\u{1F42E}",tiger="\u{1F42F}",rabbit="\u{1F430}",cat="\u{1F431}",dragon_face="\u{1F432}",whale="\u{1F433}",horse="\u{1F434}",monkey_face="\u{1F435}",dog="\u{1F436}",pig="\u{1F437}",frog="\u{1F438}",hamster="\u{1F439}",wolf="\u{1F43A}",polar_bear="\u{1F43B}\u200D\u2744\uFE0F",bear="\u{1F43B}",panda_face="\u{1F43C}",pig_nose="\u{1F43D}",feet="\u{1F43E}",paw_prints="\u{1F43E}",chipmunk="\u{1F43F}\uFE0F",eyes="\u{1F440}",eye="\u{1F441}\uFE0F",ear="\u{1F442}",nose="\u{1F443}",lips="\u{1F444}",tongue="\u{1F445}",point_up_2="\u{1F446}",point_down="\u{1F447}",point_left="\u{1F448}",point_right="\u{1F449}",facepunch="\u{1F44A}",punch="\u{1F44A}",wave="\u{1F44B}",ok_hand="\u{1F44C}",thumbsup="\u{1F44D}",thumbsdown="\u{1F44E}",clap="\u{1F44F}",open_hands="\u{1F450}",crown="\u{1F451}",womans_hat="\u{1F452}",eyeglasses="\u{1F453}",necktie="\u{1F454}",shirt="\u{1F455}",tshirt="\u{1F455}",jeans="\u{1F456}",dress="\u{1F457}",kimono="\u{1F458}",bikini="\u{1F459}",womans_clothes="\u{1F45A}",purse="\u{1F45B}",handbag="\u{1F45C}",pouch="\u{1F45D}",mans_shoe="\u{1F45E}",shoe="\u{1F45E}",athletic_shoe="\u{1F45F}",high_heel="\u{1F460}",sandal="\u{1F461}",boot="\u{1F462}",footprints="\u{1F463}",bust_in_silhouette="\u{1F464}",busts_in_silhouette="\u{1F465}",boy="\u{1F466}",girl="\u{1F467}",man_feeding_baby="\u{1F468}\u200D\u{1F37C}",family="\u{1F468}\u200D\u{1F469}\u200D\u{1F466}",man_with_probing_cane="\u{1F468}\u200D\u{1F9AF}",red_haired_man="\u{1F468}\u200D\u{1F9B0}",curly_haired_man="\u{1F468}\u200D\u{1F9B1}",bald_man="\u{1F468}\u200D\u{1F9B2}",white_haired_man="\u{1F468}\u200D\u{1F9B3}",man_in_motorized_wheelchair="\u{1F468}\u200D\u{1F9BC}",man_in_manual_wheelchair="\u{1F468}\u200D\u{1F9BD}",man="\u{1F468}",woman_feeding_baby="\u{1F469}\u200D\u{1F37C}",woman_with_probing_cane="\u{1F469}\u200D\u{1F9AF}",red_haired_woman="\u{1F469}\u200D\u{1F9B0}",curly_haired_woman="\u{1F469}\u200D\u{1F9B1}",bald_woman="\u{1F469}\u200D\u{1F9B2}",white_haired_woman="\u{1F469}\u200D\u{1F9B3}",woman_in_motorized_wheelchair="\u{1F469}\u200D\u{1F9BC}",woman_in_manual_wheelchair="\u{1F469}\u200D\u{1F9BD}",woman="\u{1F469}",man_and_woman_holding_hands="\u{1F46B}",woman_and_man_holding_hands="\u{1F46B}",couple="\u{1F46B}",two_men_holding_hands="\u{1F46C}",men_holding_hands="\u{1F46C}",two_women_holding_hands="\u{1F46D}",women_holding_hands="\u{1F46D}",cop="\u{1F46E}\u200D\u2642\uFE0F",dancers="\u{1F46F}\u200D\u2640\uFE0F",woman_with_veil="\u{1F470}\u200D\u2640\uFE0F",man_with_veil="\u{1F470}\u200D\u2642\uFE0F",bride_with_veil="\u{1F470}",person_with_blond_hair="\u{1F471}\u200D\u2642\uFE0F",man_with_gua_pi_mao="\u{1F472}",man_with_turban="\u{1F473}\u200D\u2642\uFE0F",older_man="\u{1F474}",older_woman="\u{1F475}",baby="\u{1F476}",construction_worker="\u{1F477}\u200D\u2642\uFE0F",princess="\u{1F478}",japanese_ogre="\u{1F479}",japanese_goblin="\u{1F47A}",ghost="\u{1F47B}",angel="\u{1F47C}",alien="\u{1F47D}",space_invader="\u{1F47E}",imp="\u{1F47F}",skull="\u{1F480}",information_desk_person="\u{1F481}\u200D\u2640\uFE0F",guardsman="\u{1F482}\u200D\u2642\uFE0F",dancer="\u{1F483}",lipstick="\u{1F484}",nail_care="\u{1F485}",massage="\u{1F486}\u200D\u2640\uFE0F",haircut="\u{1F487}\u200D\u2640\uFE0F",barber="\u{1F488}",syringe="\u{1F489}",pill="\u{1F48A}",kiss="\u{1F48B}",love_letter="\u{1F48C}",ring="\u{1F48D}",gem="\u{1F48E}",couplekiss="\u{1F48F}",bouquet="\u{1F490}",couple_with_heart="\u{1F491}",wedding="\u{1F492}",heartbeat="\u{1F493}",broken_heart="\u{1F494}",two_hearts="\u{1F495}",sparkling_heart="\u{1F496}",heartpulse="\u{1F497}",cupid="\u{1F498}",blue_heart="\u{1F499}",green_heart="\u{1F49A}",yellow_heart="\u{1F49B}",purple_heart="\u{1F49C}",gift_heart="\u{1F49D}",revolving_hearts="\u{1F49E}",heart_decoration="\u{1F49F}",diamond_shape_with_a_dot_inside="\u{1F4A0}",bulb="\u{1F4A1}",anger="\u{1F4A2}",bomb="\u{1F4A3}",zzz="\u{1F4A4}",boom="\u{1F4A5}",collision$1="\u{1F4A5}",sweat_drops="\u{1F4A6}",droplet="\u{1F4A7}",dash="\u{1F4A8}",hankey="\u{1F4A9}",poop="\u{1F4A9}",shit="\u{1F4A9}",muscle="\u{1F4AA}",dizzy="\u{1F4AB}",speech_balloon="\u{1F4AC}",thought_balloon="\u{1F4AD}",white_flower="\u{1F4AE}",moneybag="\u{1F4B0}",currency_exchange="\u{1F4B1}",heavy_dollar_sign="\u{1F4B2}",credit_card="\u{1F4B3}",yen$1="\u{1F4B4}",dollar="\u{1F4B5}",euro="\u{1F4B6}",pound$1="\u{1F4B7}",money_with_wings="\u{1F4B8}",chart="\u{1F4B9}",seat="\u{1F4BA}",computer="\u{1F4BB}",briefcase="\u{1F4BC}",minidisc="\u{1F4BD}",floppy_disk="\u{1F4BE}",cd="\u{1F4BF}",dvd="\u{1F4C0}",file_folder="\u{1F4C1}",open_file_folder="\u{1F4C2}",page_with_curl="\u{1F4C3}",page_facing_up="\u{1F4C4}",date$2="\u{1F4C5}",calendar$1="\u{1F4C6}",card_index="\u{1F4C7}",chart_with_upwards_trend="\u{1F4C8}",chart_with_downwards_trend="\u{1F4C9}",bar_chart="\u{1F4CA}",clipboard="\u{1F4CB}",pushpin="\u{1F4CC}",round_pushpin="\u{1F4CD}",paperclip="\u{1F4CE}",straight_ruler="\u{1F4CF}",triangular_ruler="\u{1F4D0}",bookmark_tabs="\u{1F4D1}",ledger="\u{1F4D2}",notebook="\u{1F4D3}",notebook_with_decorative_cover="\u{1F4D4}",closed_book="\u{1F4D5}",book="\u{1F4D6}",open_book="\u{1F4D6}",green_book="\u{1F4D7}",blue_book="\u{1F4D8}",orange_book="\u{1F4D9}",books="\u{1F4DA}",name_badge="\u{1F4DB}",scroll="\u{1F4DC}",memo="\u{1F4DD}",pencil="\u{1F4DD}",telephone_receiver="\u{1F4DE}",pager="\u{1F4DF}",fax="\u{1F4E0}",satellite_antenna="\u{1F4E1}",loudspeaker="\u{1F4E2}",mega="\u{1F4E3}",outbox_tray="\u{1F4E4}",inbox_tray="\u{1F4E5}",incoming_envelope="\u{1F4E8}",envelope_with_arrow="\u{1F4E9}",mailbox_closed="\u{1F4EA}",mailbox="\u{1F4EB}",mailbox_with_mail="\u{1F4EC}",mailbox_with_no_mail="\u{1F4ED}",postbox="\u{1F4EE}",postal_horn="\u{1F4EF}",newspaper="\u{1F4F0}",iphone="\u{1F4F1}",calling="\u{1F4F2}",vibration_mode="\u{1F4F3}",mobile_phone_off="\u{1F4F4}",no_mobile_phones="\u{1F4F5}",signal_strength="\u{1F4F6}",camera="\u{1F4F7}",camera_with_flash="\u{1F4F8}",video_camera="\u{1F4F9}",tv="\u{1F4FA}",radio$1="\u{1F4FB}",vhs="\u{1F4FC}",film_projector="\u{1F4FD}\uFE0F",prayer_beads="\u{1F4FF}",twisted_rightwards_arrows="\u{1F500}",repeat$1="\u{1F501}",repeat_one="\u{1F502}",arrows_clockwise="\u{1F503}",arrows_counterclockwise="\u{1F504}",low_brightness="\u{1F505}",high_brightness="\u{1F506}",mute="\u{1F507}",speaker="\u{1F508}",sound="\u{1F509}",loud_sound="\u{1F50A}",battery="\u{1F50B}",electric_plug="\u{1F50C}",mag="\u{1F50D}",mag_right="\u{1F50E}",lock_with_ink_pen="\u{1F50F}",closed_lock_with_key="\u{1F510}",key$3="\u{1F511}",lock="\u{1F512}",unlock="\u{1F513}",bell="\u{1F514}",no_bell="\u{1F515}",bookmark="\u{1F516}",link$4="\u{1F517}",radio_button="\u{1F518}",back="\u{1F519}",end="\u{1F51A}",on$1="\u{1F51B}",soon="\u{1F51C}",top$1="\u{1F51D}",underage="\u{1F51E}",keycap_ten="\u{1F51F}",capital_abcd="\u{1F520}",abcd="\u{1F521}",symbols$3="\u{1F523}",abc="\u{1F524}",fire="\u{1F525}",flashlight="\u{1F526}",wrench="\u{1F527}",hammer="\u{1F528}",nut_and_bolt="\u{1F529}",hocho="\u{1F52A}",knife="\u{1F52A}",gun="\u{1F52B}",microscope="\u{1F52C}",telescope="\u{1F52D}",crystal_ball="\u{1F52E}",six_pointed_star="\u{1F52F}",beginner="\u{1F530}",trident="\u{1F531}",black_square_button="\u{1F532}",white_square_button="\u{1F533}",red_circle="\u{1F534}",large_blue_circle="\u{1F535}",large_orange_diamond="\u{1F536}",large_blue_diamond="\u{1F537}",small_orange_diamond="\u{1F538}",small_blue_diamond="\u{1F539}",small_red_triangle="\u{1F53A}",small_red_triangle_down="\u{1F53B}",arrow_up_small="\u{1F53C}",arrow_down_small="\u{1F53D}",om_symbol="\u{1F549}\uFE0F",dove_of_peace="\u{1F54A}\uFE0F",kaaba="\u{1F54B}",mosque="\u{1F54C}",synagogue="\u{1F54D}",menorah_with_nine_branches="\u{1F54E}",clock1="\u{1F550}",clock2="\u{1F551}",clock3="\u{1F552}",clock4="\u{1F553}",clock5="\u{1F554}",clock6="\u{1F555}",clock7="\u{1F556}",clock8="\u{1F557}",clock9="\u{1F558}",clock10="\u{1F559}",clock11="\u{1F55A}",clock12="\u{1F55B}",clock130="\u{1F55C}",clock230="\u{1F55D}",clock330="\u{1F55E}",clock430="\u{1F55F}",clock530="\u{1F560}",clock630="\u{1F561}",clock730="\u{1F562}",clock830="\u{1F563}",clock930="\u{1F564}",clock1030="\u{1F565}",clock1130="\u{1F566}",clock1230="\u{1F567}",candle="\u{1F56F}\uFE0F",mantelpiece_clock="\u{1F570}\uFE0F",hole="\u{1F573}\uFE0F",man_in_business_suit_levitating="\u{1F574}\uFE0F",sleuth_or_spy="\u{1F575}\uFE0F\u200D\u2642\uFE0F",dark_sunglasses="\u{1F576}\uFE0F",spider="\u{1F577}\uFE0F",spider_web="\u{1F578}\uFE0F",joystick="\u{1F579}\uFE0F",man_dancing="\u{1F57A}",linked_paperclips="\u{1F587}\uFE0F",lower_left_ballpoint_pen="\u{1F58A}\uFE0F",lower_left_fountain_pen="\u{1F58B}\uFE0F",lower_left_paintbrush="\u{1F58C}\uFE0F",lower_left_crayon="\u{1F58D}\uFE0F",raised_hand_with_fingers_splayed="\u{1F590}\uFE0F",middle_finger="\u{1F595}",reversed_hand_with_middle_finger_extended="\u{1F595}",black_heart="\u{1F5A4}",desktop_computer="\u{1F5A5}\uFE0F",printer="\u{1F5A8}\uFE0F",three_button_mouse="\u{1F5B1}\uFE0F",trackball="\u{1F5B2}\uFE0F",frame_with_picture="\u{1F5BC}\uFE0F",card_index_dividers="\u{1F5C2}\uFE0F",card_file_box="\u{1F5C3}\uFE0F",file_cabinet="\u{1F5C4}\uFE0F",wastebasket="\u{1F5D1}\uFE0F",spiral_note_pad="\u{1F5D2}\uFE0F",spiral_calendar_pad="\u{1F5D3}\uFE0F",compression="\u{1F5DC}\uFE0F",old_key="\u{1F5DD}\uFE0F",rolled_up_newspaper="\u{1F5DE}\uFE0F",dagger_knife="\u{1F5E1}\uFE0F",speaking_head_in_silhouette="\u{1F5E3}\uFE0F",left_speech_bubble="\u{1F5E8}\uFE0F",right_anger_bubble="\u{1F5EF}\uFE0F",ballot_box_with_ballot="\u{1F5F3}\uFE0F",world_map="\u{1F5FA}\uFE0F",mount_fuji="\u{1F5FB}",tokyo_tower="\u{1F5FC}",statue_of_liberty="\u{1F5FD}",japan="\u{1F5FE}",moyai="\u{1F5FF}",grinning="\u{1F600}",grin="\u{1F601}",joy="\u{1F602}",smiley="\u{1F603}",smile="\u{1F604}",sweat_smile="\u{1F605}",laughing="\u{1F606}",satisfied="\u{1F606}",innocent="\u{1F607}",smiling_imp="\u{1F608}",wink="\u{1F609}",blush="\u{1F60A}",yum="\u{1F60B}",relieved="\u{1F60C}",heart_eyes="\u{1F60D}",sunglasses="\u{1F60E}",smirk="\u{1F60F}",neutral_face="\u{1F610}",expressionless="\u{1F611}",unamused="\u{1F612}",sweat="\u{1F613}",pensive="\u{1F614}",confused="\u{1F615}",confounded="\u{1F616}",kissing="\u{1F617}",kissing_heart="\u{1F618}",kissing_smiling_eyes="\u{1F619}",kissing_closed_eyes="\u{1F61A}",stuck_out_tongue="\u{1F61B}",stuck_out_tongue_winking_eye="\u{1F61C}",stuck_out_tongue_closed_eyes="\u{1F61D}",disappointed="\u{1F61E}",worried="\u{1F61F}",angry="\u{1F620}",rage="\u{1F621}",cry="\u{1F622}",persevere="\u{1F623}",triumph="\u{1F624}",disappointed_relieved="\u{1F625}",frowning="\u{1F626}",anguished="\u{1F627}",fearful="\u{1F628}",weary="\u{1F629}",sleepy="\u{1F62A}",tired_face="\u{1F62B}",grimacing="\u{1F62C}",sob="\u{1F62D}",face_exhaling="\u{1F62E}\u200D\u{1F4A8}",open_mouth="\u{1F62E}",hushed="\u{1F62F}",cold_sweat="\u{1F630}",scream="\u{1F631}",astonished="\u{1F632}",flushed="\u{1F633}",sleeping="\u{1F634}",face_with_spiral_eyes="\u{1F635}\u200D\u{1F4AB}",dizzy_face="\u{1F635}",face_in_clouds="\u{1F636}\u200D\u{1F32B}\uFE0F",no_mouth="\u{1F636}",mask$1="\u{1F637}",smile_cat="\u{1F638}",joy_cat="\u{1F639}",smiley_cat="\u{1F63A}",heart_eyes_cat="\u{1F63B}",smirk_cat="\u{1F63C}",kissing_cat="\u{1F63D}",pouting_cat="\u{1F63E}",crying_cat_face="\u{1F63F}",scream_cat="\u{1F640}",slightly_frowning_face="\u{1F641}",slightly_smiling_face="\u{1F642}",upside_down_face="\u{1F643}",face_with_rolling_eyes="\u{1F644}",no_good="\u{1F645}\u200D\u2640\uFE0F",ok_woman="\u{1F646}\u200D\u2640\uFE0F",bow="\u{1F647}\u200D\u2642\uFE0F",see_no_evil="\u{1F648}",hear_no_evil="\u{1F649}",speak_no_evil="\u{1F64A}",raising_hand="\u{1F64B}\u200D\u2640\uFE0F",raised_hands="\u{1F64C}",person_frowning="\u{1F64D}\u200D\u2640\uFE0F",person_with_pouting_face="\u{1F64E}\u200D\u2640\uFE0F",pray="\u{1F64F}",rocket="\u{1F680}",helicopter="\u{1F681}",steam_locomotive="\u{1F682}",railway_car="\u{1F683}",bullettrain_side="\u{1F684}",bullettrain_front="\u{1F685}",train2="\u{1F686}",metro="\u{1F687}",light_rail="\u{1F688}",station="\u{1F689}",tram="\u{1F68A}",train="\u{1F68B}",bus="\u{1F68C}",oncoming_bus="\u{1F68D}",trolleybus="\u{1F68E}",busstop="\u{1F68F}",minibus="\u{1F690}",ambulance="\u{1F691}",fire_engine="\u{1F692}",police_car="\u{1F693}",oncoming_police_car="\u{1F694}",taxi="\u{1F695}",oncoming_taxi="\u{1F696}",car="\u{1F697}",red_car="\u{1F697}",oncoming_automobile="\u{1F698}",blue_car="\u{1F699}",truck="\u{1F69A}",articulated_lorry="\u{1F69B}",tractor="\u{1F69C}",monorail="\u{1F69D}",mountain_railway="\u{1F69E}",suspension_railway="\u{1F69F}",mountain_cableway="\u{1F6A0}",aerial_tramway="\u{1F6A1}",ship="\u{1F6A2}",rowboat="\u{1F6A3}\u200D\u2642\uFE0F",speedboat="\u{1F6A4}",traffic_light="\u{1F6A5}",vertical_traffic_light="\u{1F6A6}",construction="\u{1F6A7}",rotating_light="\u{1F6A8}",triangular_flag_on_post="\u{1F6A9}",door="\u{1F6AA}",no_entry_sign="\u{1F6AB}",smoking="\u{1F6AC}",no_smoking="\u{1F6AD}",put_litter_in_its_place="\u{1F6AE}",do_not_litter="\u{1F6AF}",potable_water="\u{1F6B0}",bike="\u{1F6B2}",no_bicycles="\u{1F6B3}",bicyclist="\u{1F6B4}\u200D\u2642\uFE0F",mountain_bicyclist="\u{1F6B5}\u200D\u2642\uFE0F",walking="\u{1F6B6}\u200D\u2642\uFE0F",no_pedestrians="\u{1F6B7}",children_crossing="\u{1F6B8}",mens="\u{1F6B9}",womens="\u{1F6BA}",restroom="\u{1F6BB}",baby_symbol="\u{1F6BC}",toilet="\u{1F6BD}",wc="\u{1F6BE}",shower="\u{1F6BF}",bath="\u{1F6C0}",bathtub="\u{1F6C1}",passport_control="\u{1F6C2}",customs="\u{1F6C3}",baggage_claim="\u{1F6C4}",left_luggage="\u{1F6C5}",couch_and_lamp="\u{1F6CB}\uFE0F",sleeping_accommodation="\u{1F6CC}",shopping_bags="\u{1F6CD}\uFE0F",bellhop_bell="\u{1F6CE}\uFE0F",bed="\u{1F6CF}\uFE0F",place_of_worship="\u{1F6D0}",octagonal_sign="\u{1F6D1}",shopping_trolley="\u{1F6D2}",hindu_temple="\u{1F6D5}",hut="\u{1F6D6}",elevator="\u{1F6D7}",hammer_and_wrench="\u{1F6E0}\uFE0F",shield="\u{1F6E1}\uFE0F",oil_drum="\u{1F6E2}\uFE0F",motorway="\u{1F6E3}\uFE0F",railway_track="\u{1F6E4}\uFE0F",motor_boat="\u{1F6E5}\uFE0F",small_airplane="\u{1F6E9}\uFE0F",airplane_departure="\u{1F6EB}",airplane_arriving="\u{1F6EC}",satellite="\u{1F6F0}\uFE0F",passenger_ship="\u{1F6F3}\uFE0F",scooter="\u{1F6F4}",motor_scooter="\u{1F6F5}",canoe="\u{1F6F6}",sled="\u{1F6F7}",flying_saucer="\u{1F6F8}",skateboard="\u{1F6F9}",auto_rickshaw="\u{1F6FA}",pickup_truck="\u{1F6FB}",roller_skate="\u{1F6FC}",large_orange_circle="\u{1F7E0}",large_yellow_circle="\u{1F7E1}",large_green_circle="\u{1F7E2}",large_purple_circle="\u{1F7E3}",large_brown_circle="\u{1F7E4}",large_red_square="\u{1F7E5}",large_blue_square="\u{1F7E6}",large_orange_square="\u{1F7E7}",large_yellow_square="\u{1F7E8}",large_green_square="\u{1F7E9}",large_purple_square="\u{1F7EA}",large_brown_square="\u{1F7EB}",pinched_fingers="\u{1F90C}",white_heart="\u{1F90D}",brown_heart="\u{1F90E}",pinching_hand="\u{1F90F}",zipper_mouth_face="\u{1F910}",money_mouth_face="\u{1F911}",face_with_thermometer="\u{1F912}",nerd_face="\u{1F913}",thinking_face="\u{1F914}",face_with_head_bandage="\u{1F915}",robot_face="\u{1F916}",hugging_face="\u{1F917}",the_horns="\u{1F918}",sign_of_the_horns="\u{1F918}",call_me_hand="\u{1F919}",raised_back_of_hand="\u{1F91A}",handshake="\u{1F91D}",crossed_fingers="\u{1F91E}",hand_with_index_and_middle_fingers_crossed="\u{1F91E}",i_love_you_hand_sign="\u{1F91F}",face_with_cowboy_hat="\u{1F920}",clown_face="\u{1F921}",nauseated_face="\u{1F922}",rolling_on_the_floor_laughing="\u{1F923}",drooling_face="\u{1F924}",lying_face="\u{1F925}",face_palm="\u{1F926}",sneezing_face="\u{1F927}",face_with_raised_eyebrow="\u{1F928}",face_with_one_eyebrow_raised="\u{1F928}",grinning_face_with_star_eyes="\u{1F929}",zany_face="\u{1F92A}",grinning_face_with_one_large_and_one_small_eye="\u{1F92A}",shushing_face="\u{1F92B}",face_with_finger_covering_closed_lips="\u{1F92B}",face_with_symbols_on_mouth="\u{1F92C}",serious_face_with_symbols_covering_mouth="\u{1F92C}",face_with_hand_over_mouth="\u{1F92D}",smiling_face_with_smiling_eyes_and_hand_covering_mouth="\u{1F92D}",face_vomiting="\u{1F92E}",face_with_open_mouth_vomiting="\u{1F92E}",exploding_head="\u{1F92F}",shocked_face_with_exploding_head="\u{1F92F}",pregnant_woman="\u{1F930}",palms_up_together="\u{1F932}",selfie="\u{1F933}",prince="\u{1F934}",woman_in_tuxedo="\u{1F935}\u200D\u2640\uFE0F",man_in_tuxedo="\u{1F935}\u200D\u2642\uFE0F",person_in_tuxedo="\u{1F935}",mrs_claus="\u{1F936}",mother_christmas="\u{1F936}",shrug="\u{1F937}",person_doing_cartwheel="\u{1F938}",juggling="\u{1F939}",fencer="\u{1F93A}",wrestlers="\u{1F93C}",water_polo="\u{1F93D}",handball="\u{1F93E}",diving_mask="\u{1F93F}",wilted_flower="\u{1F940}",drum_with_drumsticks="\u{1F941}",clinking_glasses="\u{1F942}",tumbler_glass="\u{1F943}",spoon="\u{1F944}",goal_net="\u{1F945}",first_place_medal="\u{1F947}",second_place_medal="\u{1F948}",third_place_medal="\u{1F949}",boxing_glove="\u{1F94A}",martial_arts_uniform="\u{1F94B}",curling_stone="\u{1F94C}",lacrosse="\u{1F94D}",softball="\u{1F94E}",flying_disc="\u{1F94F}",croissant="\u{1F950}",avocado="\u{1F951}",cucumber="\u{1F952}",bacon="\u{1F953}",potato="\u{1F954}",carrot="\u{1F955}",baguette_bread="\u{1F956}",green_salad="\u{1F957}",shallow_pan_of_food="\u{1F958}",stuffed_flatbread="\u{1F959}",egg="\u{1F95A}",glass_of_milk="\u{1F95B}",peanuts="\u{1F95C}",kiwifruit="\u{1F95D}",pancakes="\u{1F95E}",dumpling="\u{1F95F}",fortune_cookie="\u{1F960}",takeout_box="\u{1F961}",chopsticks="\u{1F962}",bowl_with_spoon="\u{1F963}",cup_with_straw="\u{1F964}",coconut="\u{1F965}",broccoli="\u{1F966}",pie="\u{1F967}",pretzel="\u{1F968}",cut_of_meat="\u{1F969}",sandwich="\u{1F96A}",canned_food="\u{1F96B}",leafy_green="\u{1F96C}",mango="\u{1F96D}",moon_cake="\u{1F96E}",bagel="\u{1F96F}",smiling_face_with_3_hearts="\u{1F970}",yawning_face="\u{1F971}",smiling_face_with_tear="\u{1F972}",partying_face="\u{1F973}",woozy_face="\u{1F974}",hot_face="\u{1F975}",cold_face="\u{1F976}",ninja="\u{1F977}",disguised_face="\u{1F978}",pleading_face="\u{1F97A}",sari="\u{1F97B}",lab_coat="\u{1F97C}",goggles="\u{1F97D}",hiking_boot="\u{1F97E}",womans_flat_shoe="\u{1F97F}",crab="\u{1F980}",lion_face="\u{1F981}",scorpion="\u{1F982}",turkey="\u{1F983}",unicorn_face="\u{1F984}",eagle="\u{1F985}",duck="\u{1F986}",bat="\u{1F987}",shark="\u{1F988}",owl="\u{1F989}",fox_face="\u{1F98A}",butterfly="\u{1F98B}",deer="\u{1F98C}",gorilla="\u{1F98D}",lizard="\u{1F98E}",rhinoceros="\u{1F98F}",shrimp="\u{1F990}",squid="\u{1F991}",giraffe_face="\u{1F992}",zebra_face="\u{1F993}",hedgehog="\u{1F994}",sauropod="\u{1F995}",cricket="\u{1F997}",kangaroo="\u{1F998}",llama="\u{1F999}",peacock="\u{1F99A}",hippopotamus="\u{1F99B}",parrot="\u{1F99C}",raccoon="\u{1F99D}",lobster="\u{1F99E}",mosquito="\u{1F99F}",microbe="\u{1F9A0}",badger="\u{1F9A1}",swan="\u{1F9A2}",mammoth="\u{1F9A3}",dodo="\u{1F9A4}",sloth="\u{1F9A5}",otter="\u{1F9A6}",orangutan="\u{1F9A7}",skunk="\u{1F9A8}",flamingo="\u{1F9A9}",oyster="\u{1F9AA}",beaver="\u{1F9AB}",bison="\u{1F9AC}",seal="\u{1F9AD}",guide_dog="\u{1F9AE}",probing_cane="\u{1F9AF}",bone="\u{1F9B4}",leg="\u{1F9B5}",foot="\u{1F9B6}",tooth="\u{1F9B7}",female_superhero="\u{1F9B8}\u200D\u2640\uFE0F",male_superhero="\u{1F9B8}\u200D\u2642\uFE0F",superhero="\u{1F9B8}",female_supervillain="\u{1F9B9}\u200D\u2640\uFE0F",male_supervillain="\u{1F9B9}\u200D\u2642\uFE0F",supervillain="\u{1F9B9}",safety_vest="\u{1F9BA}",ear_with_hearing_aid="\u{1F9BB}",motorized_wheelchair="\u{1F9BC}",manual_wheelchair="\u{1F9BD}",mechanical_arm="\u{1F9BE}",mechanical_leg="\u{1F9BF}",cheese_wedge="\u{1F9C0}",cupcake="\u{1F9C1}",salt="\u{1F9C2}",beverage_box="\u{1F9C3}",garlic="\u{1F9C4}",onion="\u{1F9C5}",falafel="\u{1F9C6}",waffle="\u{1F9C7}",butter="\u{1F9C8}",mate_drink="\u{1F9C9}",ice_cube="\u{1F9CA}",bubble_tea="\u{1F9CB}",woman_standing="\u{1F9CD}\u200D\u2640\uFE0F",man_standing="\u{1F9CD}\u200D\u2642\uFE0F",standing_person="\u{1F9CD}",woman_kneeling="\u{1F9CE}\u200D\u2640\uFE0F",man_kneeling="\u{1F9CE}\u200D\u2642\uFE0F",kneeling_person="\u{1F9CE}",deaf_woman="\u{1F9CF}\u200D\u2640\uFE0F",deaf_man="\u{1F9CF}\u200D\u2642\uFE0F",deaf_person="\u{1F9CF}",face_with_monocle="\u{1F9D0}",farmer="\u{1F9D1}\u200D\u{1F33E}",cook="\u{1F9D1}\u200D\u{1F373}",person_feeding_baby="\u{1F9D1}\u200D\u{1F37C}",mx_claus="\u{1F9D1}\u200D\u{1F384}",student="\u{1F9D1}\u200D\u{1F393}",singer="\u{1F9D1}\u200D\u{1F3A4}",artist="\u{1F9D1}\u200D\u{1F3A8}",teacher="\u{1F9D1}\u200D\u{1F3EB}",factory_worker="\u{1F9D1}\u200D\u{1F3ED}",technologist="\u{1F9D1}\u200D\u{1F4BB}",office_worker="\u{1F9D1}\u200D\u{1F4BC}",mechanic="\u{1F9D1}\u200D\u{1F527}",scientist="\u{1F9D1}\u200D\u{1F52C}",astronaut="\u{1F9D1}\u200D\u{1F680}",firefighter="\u{1F9D1}\u200D\u{1F692}",people_holding_hands="\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}",person_with_probing_cane="\u{1F9D1}\u200D\u{1F9AF}",red_haired_person="\u{1F9D1}\u200D\u{1F9B0}",curly_haired_person="\u{1F9D1}\u200D\u{1F9B1}",bald_person="\u{1F9D1}\u200D\u{1F9B2}",white_haired_person="\u{1F9D1}\u200D\u{1F9B3}",person_in_motorized_wheelchair="\u{1F9D1}\u200D\u{1F9BC}",person_in_manual_wheelchair="\u{1F9D1}\u200D\u{1F9BD}",health_worker="\u{1F9D1}\u200D\u2695\uFE0F",judge="\u{1F9D1}\u200D\u2696\uFE0F",pilot="\u{1F9D1}\u200D\u2708\uFE0F",adult="\u{1F9D1}",child="\u{1F9D2}",older_adult="\u{1F9D3}",woman_with_beard="\u{1F9D4}\u200D\u2640\uFE0F",man_with_beard="\u{1F9D4}\u200D\u2642\uFE0F",bearded_person="\u{1F9D4}",person_with_headscarf="\u{1F9D5}",woman_in_steamy_room="\u{1F9D6}\u200D\u2640\uFE0F",man_in_steamy_room="\u{1F9D6}\u200D\u2642\uFE0F",person_in_steamy_room="\u{1F9D6}\u200D\u2642\uFE0F",woman_climbing="\u{1F9D7}\u200D\u2640\uFE0F",person_climbing="\u{1F9D7}\u200D\u2640\uFE0F",man_climbing="\u{1F9D7}\u200D\u2642\uFE0F",woman_in_lotus_position="\u{1F9D8}\u200D\u2640\uFE0F",person_in_lotus_position="\u{1F9D8}\u200D\u2640\uFE0F",man_in_lotus_position="\u{1F9D8}\u200D\u2642\uFE0F",female_mage="\u{1F9D9}\u200D\u2640\uFE0F",mage="\u{1F9D9}\u200D\u2640\uFE0F",male_mage="\u{1F9D9}\u200D\u2642\uFE0F",female_fairy="\u{1F9DA}\u200D\u2640\uFE0F",fairy="\u{1F9DA}\u200D\u2640\uFE0F",male_fairy="\u{1F9DA}\u200D\u2642\uFE0F",female_vampire="\u{1F9DB}\u200D\u2640\uFE0F",vampire="\u{1F9DB}\u200D\u2640\uFE0F",male_vampire="\u{1F9DB}\u200D\u2642\uFE0F",mermaid="\u{1F9DC}\u200D\u2640\uFE0F",merman="\u{1F9DC}\u200D\u2642\uFE0F",merperson="\u{1F9DC}\u200D\u2642\uFE0F",female_elf="\u{1F9DD}\u200D\u2640\uFE0F",male_elf="\u{1F9DD}\u200D\u2642\uFE0F",elf="\u{1F9DD}\u200D\u2642\uFE0F",female_genie="\u{1F9DE}\u200D\u2640\uFE0F",male_genie="\u{1F9DE}\u200D\u2642\uFE0F",genie="\u{1F9DE}\u200D\u2642\uFE0F",female_zombie="\u{1F9DF}\u200D\u2640\uFE0F",male_zombie="\u{1F9DF}\u200D\u2642\uFE0F",zombie="\u{1F9DF}\u200D\u2642\uFE0F",brain="\u{1F9E0}",orange_heart="\u{1F9E1}",billed_cap="\u{1F9E2}",scarf="\u{1F9E3}",gloves="\u{1F9E4}",coat="\u{1F9E5}",socks="\u{1F9E6}",red_envelope="\u{1F9E7}",firecracker="\u{1F9E8}",jigsaw="\u{1F9E9}",test_tube="\u{1F9EA}",petri_dish="\u{1F9EB}",dna="\u{1F9EC}",compass="\u{1F9ED}",abacus="\u{1F9EE}",fire_extinguisher="\u{1F9EF}",toolbox="\u{1F9F0}",bricks="\u{1F9F1}",magnet="\u{1F9F2}",luggage="\u{1F9F3}",lotion_bottle="\u{1F9F4}",thread="\u{1F9F5}",yarn="\u{1F9F6}",safety_pin="\u{1F9F7}",teddy_bear="\u{1F9F8}",broom="\u{1F9F9}",basket="\u{1F9FA}",roll_of_paper="\u{1F9FB}",soap="\u{1F9FC}",sponge="\u{1F9FD}",receipt="\u{1F9FE}",nazar_amulet="\u{1F9FF}",ballet_shoes="\u{1FA70}",briefs="\u{1FA72}",shorts="\u{1FA73}",thong_sandal="\u{1FA74}",drop_of_blood="\u{1FA78}",adhesive_bandage="\u{1FA79}",stethoscope="\u{1FA7A}",kite="\u{1FA81}",parachute="\u{1FA82}",boomerang="\u{1FA83}",magic_wand="\u{1FA84}",pinata="\u{1FA85}",nesting_dolls="\u{1FA86}",ringed_planet="\u{1FA90}",chair="\u{1FA91}",razor="\u{1FA92}",axe="\u{1FA93}",diya_lamp="\u{1FA94}",banjo="\u{1FA95}",military_helmet="\u{1FA96}",accordion="\u{1FA97}",long_drum="\u{1FA98}",coin="\u{1FA99}",carpentry_saw="\u{1FA9A}",screwdriver="\u{1FA9B}",ladder="\u{1FA9C}",hook="\u{1FA9D}",mirror="\u{1FA9E}",window$1="\u{1FA9F}",plunger="\u{1FAA0}",sewing_needle="\u{1FAA1}",knot="\u{1FAA2}",bucket="\u{1FAA3}",mouse_trap="\u{1FAA4}",toothbrush="\u{1FAA5}",headstone="\u{1FAA6}",placard="\u{1FAA7}",rock="\u{1FAA8}",fly="\u{1FAB0}",worm="\u{1FAB1}",beetle="\u{1FAB2}",cockroach="\u{1FAB3}",potted_plant="\u{1FAB4}",wood="\u{1FAB5}",feather="\u{1FAB6}",anatomical_heart="\u{1FAC0}",lungs="\u{1FAC1}",people_hugging="\u{1FAC2}",blueberries="\u{1FAD0}",bell_pepper="\u{1FAD1}",olive="\u{1FAD2}",flatbread="\u{1FAD3}",tamale="\u{1FAD4}",fondue="\u{1FAD5}",teapot="\u{1FAD6}",bangbang="\u203C\uFE0F",interrobang="\u2049\uFE0F",tm="\u2122\uFE0F",information_source="\u2139\uFE0F",left_right_arrow="\u2194\uFE0F",arrow_up_down="\u2195\uFE0F",arrow_upper_left="\u2196\uFE0F",arrow_upper_right="\u2197\uFE0F",arrow_lower_right="\u2198\uFE0F",arrow_lower_left="\u2199\uFE0F",leftwards_arrow_with_hook="\u21A9\uFE0F",arrow_right_hook="\u21AA\uFE0F",watch="\u231A",hourglass="\u231B",keyboard="\u2328\uFE0F",eject="\u23CF\uFE0F",fast_forward="\u23E9",rewind="\u23EA",arrow_double_up="\u23EB",arrow_double_down="\u23EC",black_right_pointing_double_triangle_with_vertical_bar="\u23ED\uFE0F",black_left_pointing_double_triangle_with_vertical_bar="\u23EE\uFE0F",black_right_pointing_triangle_with_double_vertical_bar="\u23EF\uFE0F",alarm_clock="\u23F0",stopwatch="\u23F1\uFE0F",timer_clock="\u23F2\uFE0F",hourglass_flowing_sand="\u23F3",double_vertical_bar="\u23F8\uFE0F",black_square_for_stop="\u23F9\uFE0F",black_circle_for_record="\u23FA\uFE0F",m$3="\u24C2\uFE0F",black_small_square="\u25AA\uFE0F",white_small_square="\u25AB\uFE0F",arrow_forward="\u25B6\uFE0F",arrow_backward="\u25C0\uFE0F",white_medium_square="\u25FB\uFE0F",black_medium_square="\u25FC\uFE0F",white_medium_small_square="\u25FD",black_medium_small_square="\u25FE",sunny="\u2600\uFE0F",cloud$1="\u2601\uFE0F",umbrella="\u2602\uFE0F",snowman="\u2603\uFE0F",comet="\u2604\uFE0F",phone="\u260E\uFE0F",telephone="\u260E\uFE0F",ballot_box_with_check="\u2611\uFE0F",shamrock="\u2618\uFE0F",point_up="\u261D\uFE0F",skull_and_crossbones="\u2620\uFE0F",radioactive_sign="\u2622\uFE0F",biohazard_sign="\u2623\uFE0F",orthodox_cross="\u2626\uFE0F",star_and_crescent="\u262A\uFE0F",peace_symbol="\u262E\uFE0F",yin_yang="\u262F\uFE0F",wheel_of_dharma="\u2638\uFE0F",white_frowning_face="\u2639\uFE0F",relaxed="\u263A\uFE0F",female_sign="\u2640\uFE0F",male_sign="\u2642\uFE0F",gemini="\u264A",cancer="\u264B",leo="\u264C",virgo="\u264D",libra="\u264E",scorpius="\u264F",chess_pawn="\u265F\uFE0F",spades="\u2660\uFE0F",clubs="\u2663\uFE0F",hearts="\u2665\uFE0F",diamonds="\u2666\uFE0F",hotsprings="\u2668\uFE0F",recycle="\u267B\uFE0F",infinity="\u267E\uFE0F",wheelchair="\u267F",hammer_and_pick="\u2692\uFE0F",crossed_swords="\u2694\uFE0F",medical_symbol="\u2695\uFE0F",staff_of_aesculapius="\u2695\uFE0F",scales$1="\u2696\uFE0F",alembic="\u2697\uFE0F",gear="\u2699\uFE0F",atom_symbol="\u269B\uFE0F",fleur_de_lis="\u269C\uFE0F",warning="\u26A0\uFE0F",zap="\u26A1",transgender_symbol="\u26A7\uFE0F",white_circle="\u26AA",black_circle="\u26AB",coffin="\u26B0\uFE0F",funeral_urn="\u26B1\uFE0F",soccer="\u26BD",baseball="\u26BE",snowman_without_snow="\u26C4",partly_sunny="\u26C5",thunder_cloud_and_rain="\u26C8\uFE0F",ophiuchus="\u26CE",pick$3="\u26CF\uFE0F",helmet_with_white_cross="\u26D1\uFE0F",chains="\u26D3\uFE0F",no_entry="\u26D4",shinto_shrine="\u26E9\uFE0F",church="\u26EA",mountain="\u26F0\uFE0F",umbrella_on_ground="\u26F1\uFE0F",fountain="\u26F2",golf="\u26F3",ferry="\u26F4\uFE0F",boat="\u26F5",sailboat="\u26F5",skier="\u26F7\uFE0F",ice_skate="\u26F8\uFE0F",person_with_ball="\u26F9\uFE0F\u200D\u2642\uFE0F",tent="\u26FA",fuelpump="\u26FD",scissors="\u2702\uFE0F",airplane="\u2708\uFE0F",email="\u2709\uFE0F",envelope="\u2709\uFE0F",fist="\u270A",hand="\u270B",raised_hand="\u270B",v$1="\u270C\uFE0F",writing_hand="\u270D\uFE0F",pencil2="\u270F\uFE0F",black_nib="\u2712\uFE0F",heavy_check_mark="\u2714\uFE0F",heavy_multiplication_x="\u2716\uFE0F",latin_cross="\u271D\uFE0F",star_of_david="\u2721\uFE0F",eight_spoked_asterisk="\u2733\uFE0F",eight_pointed_black_star="\u2734\uFE0F",snowflake="\u2744\uFE0F",sparkle="\u2747\uFE0F",x$5="\u274C",negative_squared_cross_mark="\u274E",heavy_heart_exclamation_mark_ornament="\u2763\uFE0F",heart_on_fire="\u2764\uFE0F\u200D\u{1F525}",mending_heart="\u2764\uFE0F\u200D\u{1FA79}",heart="\u2764\uFE0F",arrow_right="\u27A1\uFE0F",curly_loop="\u27B0",loop="\u27BF",arrow_heading_up="\u2934\uFE0F",arrow_heading_down="\u2935\uFE0F",arrow_left="\u2B05\uFE0F",arrow_up="\u2B06\uFE0F",arrow_down="\u2B07\uFE0F",black_large_square="\u2B1B",white_large_square="\u2B1C",star="\u2B50",o="\u2B55",wavy_dash="\u3030\uFE0F",part_alternation_mark="\u303D\uFE0F",congratulations="\u3297\uFE0F",secret="\u3299\uFE0F",require$$1$4={100:"\u{1F4AF}",1234:"\u{1F522}",umbrella_with_rain_drops,coffee,aries,taurus,sagittarius,capricorn,aquarius,pisces,anchor,white_check_mark,sparkles,question,grey_question,grey_exclamation,exclamation,heavy_exclamation_mark,heavy_plus_sign,heavy_minus_sign,heavy_division_sign,hash:hash$1,keycap_star,zero:zero$6,one:one$4,two,three,four,five,six,seven,eight,nine,copyright,registered,mahjong,black_joker,a:a$2,b:b$2,o2,parking,ab,cl,cool,free,id:id$1,new:"\u{1F195}",ng,ok:ok$2,sos,up,vs,"flag-ac":"\u{1F1E6}\u{1F1E8}","flag-ad":"\u{1F1E6}\u{1F1E9}","flag-ae":"\u{1F1E6}\u{1F1EA}","flag-af":"\u{1F1E6}\u{1F1EB}","flag-ag":"\u{1F1E6}\u{1F1EC}","flag-ai":"\u{1F1E6}\u{1F1EE}","flag-al":"\u{1F1E6}\u{1F1F1}","flag-am":"\u{1F1E6}\u{1F1F2}","flag-ao":"\u{1F1E6}\u{1F1F4}","flag-aq":"\u{1F1E6}\u{1F1F6}","flag-ar":"\u{1F1E6}\u{1F1F7}","flag-as":"\u{1F1E6}\u{1F1F8}","flag-at":"\u{1F1E6}\u{1F1F9}","flag-au":"\u{1F1E6}\u{1F1FA}","flag-aw":"\u{1F1E6}\u{1F1FC}","flag-ax":"\u{1F1E6}\u{1F1FD}","flag-az":"\u{1F1E6}\u{1F1FF}","flag-ba":"\u{1F1E7}\u{1F1E6}","flag-bb":"\u{1F1E7}\u{1F1E7}","flag-bd":"\u{1F1E7}\u{1F1E9}","flag-be":"\u{1F1E7}\u{1F1EA}","flag-bf":"\u{1F1E7}\u{1F1EB}","flag-bg":"\u{1F1E7}\u{1F1EC}","flag-bh":"\u{1F1E7}\u{1F1ED}","flag-bi":"\u{1F1E7}\u{1F1EE}","flag-bj":"\u{1F1E7}\u{1F1EF}","flag-bl":"\u{1F1E7}\u{1F1F1}","flag-bm":"\u{1F1E7}\u{1F1F2}","flag-bn":"\u{1F1E7}\u{1F1F3}","flag-bo":"\u{1F1E7}\u{1F1F4}","flag-bq":"\u{1F1E7}\u{1F1F6}","flag-br":"\u{1F1E7}\u{1F1F7}","flag-bs":"\u{1F1E7}\u{1F1F8}","flag-bt":"\u{1F1E7}\u{1F1F9}","flag-bv":"\u{1F1E7}\u{1F1FB}","flag-bw":"\u{1F1E7}\u{1F1FC}","flag-by":"\u{1F1E7}\u{1F1FE}","flag-bz":"\u{1F1E7}\u{1F1FF}","flag-ca":"\u{1F1E8}\u{1F1E6}","flag-cc":"\u{1F1E8}\u{1F1E8}","flag-cd":"\u{1F1E8}\u{1F1E9}","flag-cf":"\u{1F1E8}\u{1F1EB}","flag-cg":"\u{1F1E8}\u{1F1EC}","flag-ch":"\u{1F1E8}\u{1F1ED}","flag-ci":"\u{1F1E8}\u{1F1EE}","flag-ck":"\u{1F1E8}\u{1F1F0}","flag-cl":"\u{1F1E8}\u{1F1F1}","flag-cm":"\u{1F1E8}\u{1F1F2}",cn,"flag-cn":"\u{1F1E8}\u{1F1F3}","flag-co":"\u{1F1E8}\u{1F1F4}","flag-cp":"\u{1F1E8}\u{1F1F5}","flag-cr":"\u{1F1E8}\u{1F1F7}","flag-cu":"\u{1F1E8}\u{1F1FA}","flag-cv":"\u{1F1E8}\u{1F1FB}","flag-cw":"\u{1F1E8}\u{1F1FC}","flag-cx":"\u{1F1E8}\u{1F1FD}","flag-cy":"\u{1F1E8}\u{1F1FE}","flag-cz":"\u{1F1E8}\u{1F1FF}",de,"flag-de":"\u{1F1E9}\u{1F1EA}","flag-dg":"\u{1F1E9}\u{1F1EC}","flag-dj":"\u{1F1E9}\u{1F1EF}","flag-dk":"\u{1F1E9}\u{1F1F0}","flag-dm":"\u{1F1E9}\u{1F1F2}","flag-do":"\u{1F1E9}\u{1F1F4}","flag-dz":"\u{1F1E9}\u{1F1FF}","flag-ea":"\u{1F1EA}\u{1F1E6}","flag-ec":"\u{1F1EA}\u{1F1E8}","flag-ee":"\u{1F1EA}\u{1F1EA}","flag-eg":"\u{1F1EA}\u{1F1EC}","flag-eh":"\u{1F1EA}\u{1F1ED}","flag-er":"\u{1F1EA}\u{1F1F7}",es,"flag-es":"\u{1F1EA}\u{1F1F8}","flag-et":"\u{1F1EA}\u{1F1F9}","flag-eu":"\u{1F1EA}\u{1F1FA}","flag-fi":"\u{1F1EB}\u{1F1EE}","flag-fj":"\u{1F1EB}\u{1F1EF}","flag-fk":"\u{1F1EB}\u{1F1F0}","flag-fm":"\u{1F1EB}\u{1F1F2}","flag-fo":"\u{1F1EB}\u{1F1F4}",fr,"flag-fr":"\u{1F1EB}\u{1F1F7}","flag-ga":"\u{1F1EC}\u{1F1E6}",gb,uk,"flag-gb":"\u{1F1EC}\u{1F1E7}","flag-gd":"\u{1F1EC}\u{1F1E9}","flag-ge":"\u{1F1EC}\u{1F1EA}","flag-gf":"\u{1F1EC}\u{1F1EB}","flag-gg":"\u{1F1EC}\u{1F1EC}","flag-gh":"\u{1F1EC}\u{1F1ED}","flag-gi":"\u{1F1EC}\u{1F1EE}","flag-gl":"\u{1F1EC}\u{1F1F1}","flag-gm":"\u{1F1EC}\u{1F1F2}","flag-gn":"\u{1F1EC}\u{1F1F3}","flag-gp":"\u{1F1EC}\u{1F1F5}","flag-gq":"\u{1F1EC}\u{1F1F6}","flag-gr":"\u{1F1EC}\u{1F1F7}","flag-gs":"\u{1F1EC}\u{1F1F8}","flag-gt":"\u{1F1EC}\u{1F1F9}","flag-gu":"\u{1F1EC}\u{1F1FA}","flag-gw":"\u{1F1EC}\u{1F1FC}","flag-gy":"\u{1F1EC}\u{1F1FE}","flag-hk":"\u{1F1ED}\u{1F1F0}","flag-hm":"\u{1F1ED}\u{1F1F2}","flag-hn":"\u{1F1ED}\u{1F1F3}","flag-hr":"\u{1F1ED}\u{1F1F7}","flag-ht":"\u{1F1ED}\u{1F1F9}","flag-hu":"\u{1F1ED}\u{1F1FA}","flag-ic":"\u{1F1EE}\u{1F1E8}","flag-id":"\u{1F1EE}\u{1F1E9}","flag-ie":"\u{1F1EE}\u{1F1EA}","flag-il":"\u{1F1EE}\u{1F1F1}","flag-im":"\u{1F1EE}\u{1F1F2}","flag-in":"\u{1F1EE}\u{1F1F3}","flag-io":"\u{1F1EE}\u{1F1F4}","flag-iq":"\u{1F1EE}\u{1F1F6}","flag-ir":"\u{1F1EE}\u{1F1F7}","flag-is":"\u{1F1EE}\u{1F1F8}",it,"flag-it":"\u{1F1EE}\u{1F1F9}","flag-je":"\u{1F1EF}\u{1F1EA}","flag-jm":"\u{1F1EF}\u{1F1F2}","flag-jo":"\u{1F1EF}\u{1F1F4}",jp,"flag-jp":"\u{1F1EF}\u{1F1F5}","flag-ke":"\u{1F1F0}\u{1F1EA}","flag-kg":"\u{1F1F0}\u{1F1EC}","flag-kh":"\u{1F1F0}\u{1F1ED}","flag-ki":"\u{1F1F0}\u{1F1EE}","flag-km":"\u{1F1F0}\u{1F1F2}","flag-kn":"\u{1F1F0}\u{1F1F3}","flag-kp":"\u{1F1F0}\u{1F1F5}",kr,"flag-kr":"\u{1F1F0}\u{1F1F7}","flag-kw":"\u{1F1F0}\u{1F1FC}","flag-ky":"\u{1F1F0}\u{1F1FE}","flag-kz":"\u{1F1F0}\u{1F1FF}","flag-la":"\u{1F1F1}\u{1F1E6}","flag-lb":"\u{1F1F1}\u{1F1E7}","flag-lc":"\u{1F1F1}\u{1F1E8}","flag-li":"\u{1F1F1}\u{1F1EE}","flag-lk":"\u{1F1F1}\u{1F1F0}","flag-lr":"\u{1F1F1}\u{1F1F7}","flag-ls":"\u{1F1F1}\u{1F1F8}","flag-lt":"\u{1F1F1}\u{1F1F9}","flag-lu":"\u{1F1F1}\u{1F1FA}","flag-lv":"\u{1F1F1}\u{1F1FB}","flag-ly":"\u{1F1F1}\u{1F1FE}","flag-ma":"\u{1F1F2}\u{1F1E6}","flag-mc":"\u{1F1F2}\u{1F1E8}","flag-md":"\u{1F1F2}\u{1F1E9}","flag-me":"\u{1F1F2}\u{1F1EA}","flag-mf":"\u{1F1F2}\u{1F1EB}","flag-mg":"\u{1F1F2}\u{1F1EC}","flag-mh":"\u{1F1F2}\u{1F1ED}","flag-mk":"\u{1F1F2}\u{1F1F0}","flag-ml":"\u{1F1F2}\u{1F1F1}","flag-mm":"\u{1F1F2}\u{1F1F2}","flag-mn":"\u{1F1F2}\u{1F1F3}","flag-mo":"\u{1F1F2}\u{1F1F4}","flag-mp":"\u{1F1F2}\u{1F1F5}","flag-mq":"\u{1F1F2}\u{1F1F6}","flag-mr":"\u{1F1F2}\u{1F1F7}","flag-ms":"\u{1F1F2}\u{1F1F8}","flag-mt":"\u{1F1F2}\u{1F1F9}","flag-mu":"\u{1F1F2}\u{1F1FA}","flag-mv":"\u{1F1F2}\u{1F1FB}","flag-mw":"\u{1F1F2}\u{1F1FC}","flag-mx":"\u{1F1F2}\u{1F1FD}","flag-my":"\u{1F1F2}\u{1F1FE}","flag-mz":"\u{1F1F2}\u{1F1FF}","flag-na":"\u{1F1F3}\u{1F1E6}","flag-nc":"\u{1F1F3}\u{1F1E8}","flag-ne":"\u{1F1F3}\u{1F1EA}","flag-nf":"\u{1F1F3}\u{1F1EB}","flag-ng":"\u{1F1F3}\u{1F1EC}","flag-ni":"\u{1F1F3}\u{1F1EE}","flag-nl":"\u{1F1F3}\u{1F1F1}","flag-no":"\u{1F1F3}\u{1F1F4}","flag-np":"\u{1F1F3}\u{1F1F5}","flag-nr":"\u{1F1F3}\u{1F1F7}","flag-nu":"\u{1F1F3}\u{1F1FA}","flag-nz":"\u{1F1F3}\u{1F1FF}","flag-om":"\u{1F1F4}\u{1F1F2}","flag-pa":"\u{1F1F5}\u{1F1E6}","flag-pe":"\u{1F1F5}\u{1F1EA}","flag-pf":"\u{1F1F5}\u{1F1EB}","flag-pg":"\u{1F1F5}\u{1F1EC}","flag-ph":"\u{1F1F5}\u{1F1ED}","flag-pk":"\u{1F1F5}\u{1F1F0}","flag-pl":"\u{1F1F5}\u{1F1F1}","flag-pm":"\u{1F1F5}\u{1F1F2}","flag-pn":"\u{1F1F5}\u{1F1F3}","flag-pr":"\u{1F1F5}\u{1F1F7}","flag-ps":"\u{1F1F5}\u{1F1F8}","flag-pt":"\u{1F1F5}\u{1F1F9}","flag-pw":"\u{1F1F5}\u{1F1FC}","flag-py":"\u{1F1F5}\u{1F1FE}","flag-qa":"\u{1F1F6}\u{1F1E6}","flag-re":"\u{1F1F7}\u{1F1EA}","flag-ro":"\u{1F1F7}\u{1F1F4}","flag-rs":"\u{1F1F7}\u{1F1F8}",ru,"flag-ru":"\u{1F1F7}\u{1F1FA}","flag-rw":"\u{1F1F7}\u{1F1FC}","flag-sa":"\u{1F1F8}\u{1F1E6}","flag-sb":"\u{1F1F8}\u{1F1E7}","flag-sc":"\u{1F1F8}\u{1F1E8}","flag-sd":"\u{1F1F8}\u{1F1E9}","flag-se":"\u{1F1F8}\u{1F1EA}","flag-sg":"\u{1F1F8}\u{1F1EC}","flag-sh":"\u{1F1F8}\u{1F1ED}","flag-si":"\u{1F1F8}\u{1F1EE}","flag-sj":"\u{1F1F8}\u{1F1EF}","flag-sk":"\u{1F1F8}\u{1F1F0}","flag-sl":"\u{1F1F8}\u{1F1F1}","flag-sm":"\u{1F1F8}\u{1F1F2}","flag-sn":"\u{1F1F8}\u{1F1F3}","flag-so":"\u{1F1F8}\u{1F1F4}","flag-sr":"\u{1F1F8}\u{1F1F7}","flag-ss":"\u{1F1F8}\u{1F1F8}","flag-st":"\u{1F1F8}\u{1F1F9}","flag-sv":"\u{1F1F8}\u{1F1FB}","flag-sx":"\u{1F1F8}\u{1F1FD}","flag-sy":"\u{1F1F8}\u{1F1FE}","flag-sz":"\u{1F1F8}\u{1F1FF}","flag-ta":"\u{1F1F9}\u{1F1E6}","flag-tc":"\u{1F1F9}\u{1F1E8}","flag-td":"\u{1F1F9}\u{1F1E9}","flag-tf":"\u{1F1F9}\u{1F1EB}","flag-tg":"\u{1F1F9}\u{1F1EC}","flag-th":"\u{1F1F9}\u{1F1ED}","flag-tj":"\u{1F1F9}\u{1F1EF}","flag-tk":"\u{1F1F9}\u{1F1F0}","flag-tl":"\u{1F1F9}\u{1F1F1}","flag-tm":"\u{1F1F9}\u{1F1F2}","flag-tn":"\u{1F1F9}\u{1F1F3}","flag-to":"\u{1F1F9}\u{1F1F4}","flag-tr":"\u{1F1F9}\u{1F1F7}","flag-tt":"\u{1F1F9}\u{1F1F9}","flag-tv":"\u{1F1F9}\u{1F1FB}","flag-tw":"\u{1F1F9}\u{1F1FC}","flag-tz":"\u{1F1F9}\u{1F1FF}","flag-ua":"\u{1F1FA}\u{1F1E6}","flag-ug":"\u{1F1FA}\u{1F1EC}","flag-um":"\u{1F1FA}\u{1F1F2}","flag-un":"\u{1F1FA}\u{1F1F3}",us,"flag-us":"\u{1F1FA}\u{1F1F8}","flag-uy":"\u{1F1FA}\u{1F1FE}","flag-uz":"\u{1F1FA}\u{1F1FF}","flag-va":"\u{1F1FB}\u{1F1E6}","flag-vc":"\u{1F1FB}\u{1F1E8}","flag-ve":"\u{1F1FB}\u{1F1EA}","flag-vg":"\u{1F1FB}\u{1F1EC}","flag-vi":"\u{1F1FB}\u{1F1EE}","flag-vn":"\u{1F1FB}\u{1F1F3}","flag-vu":"\u{1F1FB}\u{1F1FA}","flag-wf":"\u{1F1FC}\u{1F1EB}","flag-ws":"\u{1F1FC}\u{1F1F8}","flag-xk":"\u{1F1FD}\u{1F1F0}","flag-ye":"\u{1F1FE}\u{1F1EA}","flag-yt":"\u{1F1FE}\u{1F1F9}","flag-za":"\u{1F1FF}\u{1F1E6}","flag-zm":"\u{1F1FF}\u{1F1F2}","flag-zw":"\u{1F1FF}\u{1F1FC}",koko,sa:sa$1,u7121,u6307,u7981,u7a7a,u5408,u6e80,u6709,u6708,u7533,u5272,u55b6,ideograph_advantage,accept,cyclone,foggy,closed_umbrella,night_with_stars,sunrise_over_mountains,sunrise,city_sunset,city_sunrise,rainbow,bridge_at_night,ocean,volcano,milky_way,earth_africa,earth_americas,earth_asia,globe_with_meridians,new_moon,waxing_crescent_moon,first_quarter_moon,moon,waxing_gibbous_moon,full_moon,waning_gibbous_moon,last_quarter_moon,waning_crescent_moon,crescent_moon,new_moon_with_face,first_quarter_moon_with_face,last_quarter_moon_with_face,full_moon_with_face,sun_with_face,star2,stars,thermometer,mostly_sunny,sun_small_cloud,barely_sunny,sun_behind_cloud,partly_sunny_rain,sun_behind_rain_cloud,rain_cloud,snow_cloud,lightning,lightning_cloud,tornado,tornado_cloud,fog,wind_blowing_face,hotdog,taco,burrito,chestnut,seedling,evergreen_tree,deciduous_tree,palm_tree,cactus,hot_pepper,tulip,cherry_blossom,rose,hibiscus,sunflower,blossom,corn,ear_of_rice,herb,four_leaf_clover,maple_leaf,fallen_leaf,leaves,mushroom,tomato,eggplant,grapes,melon,watermelon,tangerine,lemon,banana,pineapple,apple,green_apple,pear,peach,cherries,strawberry,hamburger,pizza,meat_on_bone,poultry_leg,rice_cracker,rice_ball,rice,curry,ramen,spaghetti,bread,fries,sweet_potato,dango,oden,sushi,fried_shrimp,fish_cake,icecream,shaved_ice,ice_cream,doughnut,cookie,chocolate_bar,candy,lollipop,custard,honey_pot,cake,bento,stew,fried_egg,cooking,fork_and_knife,tea,sake,wine_glass,cocktail,tropical_drink,beer,beers,baby_bottle,knife_fork_plate,champagne,popcorn,ribbon,gift,birthday,jack_o_lantern,christmas_tree,santa,fireworks,sparkler,balloon,tada,confetti_ball,tanabata_tree,crossed_flags,bamboo,dolls,flags:flags$1,wind_chime,rice_scene,school_satchel,mortar_board,medal,reminder_ribbon,studio_microphone,level_slider,control_knobs,film_frames,admission_tickets,carousel_horse,ferris_wheel,roller_coaster,fishing_pole_and_fish,microphone,movie_camera,cinema,headphones,art,tophat,circus_tent,ticket,clapper,performing_arts,video_game,dart,slot_machine,"8ball":"\u{1F3B1}",game_die,bowling,flower_playing_cards,musical_note,notes,saxophone,guitar,musical_keyboard,trumpet,violin,musical_score,running_shirt_with_sash,tennis,ski,basketball,checkered_flag,snowboarder,"woman-running":"\u{1F3C3}\u200D\u2640\uFE0F","man-running":"\u{1F3C3}\u200D\u2642\uFE0F",runner,running,"woman-surfing":"\u{1F3C4}\u200D\u2640\uFE0F","man-surfing":"\u{1F3C4}\u200D\u2642\uFE0F",surfer,sports_medal,trophy,horse_racing,football,rugby_football,"woman-swimming":"\u{1F3CA}\u200D\u2640\uFE0F","man-swimming":"\u{1F3CA}\u200D\u2642\uFE0F",swimmer,"woman-lifting-weights":"\u{1F3CB}\uFE0F\u200D\u2640\uFE0F","man-lifting-weights":"\u{1F3CB}\uFE0F\u200D\u2642\uFE0F",weight_lifter,"woman-golfing":"\u{1F3CC}\uFE0F\u200D\u2640\uFE0F","man-golfing":"\u{1F3CC}\uFE0F\u200D\u2642\uFE0F",golfer,racing_motorcycle,racing_car,cricket_bat_and_ball,volleyball,field_hockey_stick_and_ball,ice_hockey_stick_and_puck,table_tennis_paddle_and_ball,snow_capped_mountain,camping,beach_with_umbrella,building_construction,house_buildings,cityscape,derelict_house_building,classical_building,desert,desert_island,national_park,stadium,house,house_with_garden,office,post_office,european_post_office,hospital,bank,atm,hotel,love_hotel,convenience_store,school,department_store,factory:factory$5,izakaya_lantern,lantern,japanese_castle,european_castle,"rainbow-flag":"\u{1F3F3}\uFE0F\u200D\u{1F308}",transgender_flag,waving_white_flag,pirate_flag,"flag-england":"\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}","flag-scotland":"\u{1F3F4}\u{E0067}\u{E0062}\u{E0073}\u{E0063}\u{E0074}\u{E007F}","flag-wales":"\u{1F3F4}\u{E0067}\u{E0062}\u{E0077}\u{E006C}\u{E0073}\u{E007F}",waving_black_flag,rosette,label:label$1,badminton_racquet_and_shuttlecock,bow_and_arrow,amphora,"skin-tone-2":"\u{1F3FB}","skin-tone-3":"\u{1F3FC}","skin-tone-4":"\u{1F3FD}","skin-tone-5":"\u{1F3FE}","skin-tone-6":"\u{1F3FF}",rat,mouse2,ox,water_buffalo,cow2,tiger2,leopard,rabbit2,black_cat,cat2,dragon,crocodile,whale2,snail,snake,racehorse,ram,goat,sheep,monkey,rooster,chicken,service_dog,dog2,pig2,boar,elephant,octopus,shell,bug,ant,bee,honeybee,ladybug,lady_beetle,fish,tropical_fish,blowfish,turtle,hatching_chick,baby_chick,hatched_chick,bird,penguin,koala,poodle,dromedary_camel,camel,dolphin,flipper,mouse,cow,tiger,rabbit,cat,dragon_face,whale,horse,monkey_face,dog,pig,frog,hamster,wolf,polar_bear,bear,panda_face,pig_nose,feet,paw_prints,chipmunk,eyes,"eye-in-speech-bubble":"\u{1F441}\uFE0F\u200D\u{1F5E8}\uFE0F",eye,ear,nose,lips,tongue,point_up_2,point_down,point_left,point_right,facepunch,punch,wave,ok_hand,"+1":"\u{1F44D}",thumbsup,"-1":"\u{1F44E}",thumbsdown,clap,open_hands,crown,womans_hat,eyeglasses,necktie,shirt,tshirt,jeans,dress,kimono,bikini,womans_clothes,purse,handbag,pouch,mans_shoe,shoe,athletic_shoe,high_heel,sandal,boot,footprints,bust_in_silhouette,busts_in_silhouette,boy,girl,"male-farmer":"\u{1F468}\u200D\u{1F33E}","male-cook":"\u{1F468}\u200D\u{1F373}",man_feeding_baby,"male-student":"\u{1F468}\u200D\u{1F393}","male-singer":"\u{1F468}\u200D\u{1F3A4}","male-artist":"\u{1F468}\u200D\u{1F3A8}","male-teacher":"\u{1F468}\u200D\u{1F3EB}","male-factory-worker":"\u{1F468}\u200D\u{1F3ED}","man-boy-boy":"\u{1F468}\u200D\u{1F466}\u200D\u{1F466}","man-boy":"\u{1F468}\u200D\u{1F466}","man-girl-boy":"\u{1F468}\u200D\u{1F467}\u200D\u{1F466}","man-girl-girl":"\u{1F468}\u200D\u{1F467}\u200D\u{1F467}","man-girl":"\u{1F468}\u200D\u{1F467}","man-man-boy":"\u{1F468}\u200D\u{1F468}\u200D\u{1F466}","man-man-boy-boy":"\u{1F468}\u200D\u{1F468}\u200D\u{1F466}\u200D\u{1F466}","man-man-girl":"\u{1F468}\u200D\u{1F468}\u200D\u{1F467}","man-man-girl-boy":"\u{1F468}\u200D\u{1F468}\u200D\u{1F467}\u200D\u{1F466}","man-man-girl-girl":"\u{1F468}\u200D\u{1F468}\u200D\u{1F467}\u200D\u{1F467}","man-woman-boy":"\u{1F468}\u200D\u{1F469}\u200D\u{1F466}",family,"man-woman-boy-boy":"\u{1F468}\u200D\u{1F469}\u200D\u{1F466}\u200D\u{1F466}","man-woman-girl":"\u{1F468}\u200D\u{1F469}\u200D\u{1F467}","man-woman-girl-boy":"\u{1F468}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F466}","man-woman-girl-girl":"\u{1F468}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F467}","male-technologist":"\u{1F468}\u200D\u{1F4BB}","male-office-worker":"\u{1F468}\u200D\u{1F4BC}","male-mechanic":"\u{1F468}\u200D\u{1F527}","male-scientist":"\u{1F468}\u200D\u{1F52C}","male-astronaut":"\u{1F468}\u200D\u{1F680}","male-firefighter":"\u{1F468}\u200D\u{1F692}",man_with_probing_cane,red_haired_man,curly_haired_man,bald_man,white_haired_man,man_in_motorized_wheelchair,man_in_manual_wheelchair,"male-doctor":"\u{1F468}\u200D\u2695\uFE0F","male-judge":"\u{1F468}\u200D\u2696\uFE0F","male-pilot":"\u{1F468}\u200D\u2708\uFE0F","man-heart-man":"\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F468}","man-kiss-man":"\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}",man,"female-farmer":"\u{1F469}\u200D\u{1F33E}","female-cook":"\u{1F469}\u200D\u{1F373}",woman_feeding_baby,"female-student":"\u{1F469}\u200D\u{1F393}","female-singer":"\u{1F469}\u200D\u{1F3A4}","female-artist":"\u{1F469}\u200D\u{1F3A8}","female-teacher":"\u{1F469}\u200D\u{1F3EB}","female-factory-worker":"\u{1F469}\u200D\u{1F3ED}","woman-boy-boy":"\u{1F469}\u200D\u{1F466}\u200D\u{1F466}","woman-boy":"\u{1F469}\u200D\u{1F466}","woman-girl-boy":"\u{1F469}\u200D\u{1F467}\u200D\u{1F466}","woman-girl-girl":"\u{1F469}\u200D\u{1F467}\u200D\u{1F467}","woman-girl":"\u{1F469}\u200D\u{1F467}","woman-woman-boy":"\u{1F469}\u200D\u{1F469}\u200D\u{1F466}","woman-woman-boy-boy":"\u{1F469}\u200D\u{1F469}\u200D\u{1F466}\u200D\u{1F466}","woman-woman-girl":"\u{1F469}\u200D\u{1F469}\u200D\u{1F467}","woman-woman-girl-boy":"\u{1F469}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F466}","woman-woman-girl-girl":"\u{1F469}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F467}","female-technologist":"\u{1F469}\u200D\u{1F4BB}","female-office-worker":"\u{1F469}\u200D\u{1F4BC}","female-mechanic":"\u{1F469}\u200D\u{1F527}","female-scientist":"\u{1F469}\u200D\u{1F52C}","female-astronaut":"\u{1F469}\u200D\u{1F680}","female-firefighter":"\u{1F469}\u200D\u{1F692}",woman_with_probing_cane,red_haired_woman,curly_haired_woman,bald_woman,white_haired_woman,woman_in_motorized_wheelchair,woman_in_manual_wheelchair,"female-doctor":"\u{1F469}\u200D\u2695\uFE0F","female-judge":"\u{1F469}\u200D\u2696\uFE0F","female-pilot":"\u{1F469}\u200D\u2708\uFE0F","woman-heart-man":"\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F468}","woman-heart-woman":"\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F469}","woman-kiss-man":"\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","woman-kiss-woman":"\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F469}",woman,man_and_woman_holding_hands,woman_and_man_holding_hands,couple,two_men_holding_hands,men_holding_hands,two_women_holding_hands,women_holding_hands,"female-police-officer":"\u{1F46E}\u200D\u2640\uFE0F","male-police-officer":"\u{1F46E}\u200D\u2642\uFE0F",cop,"women-with-bunny-ears-partying":"\u{1F46F}\u200D\u2640\uFE0F","woman-with-bunny-ears-partying":"\u{1F46F}\u200D\u2640\uFE0F",dancers,"men-with-bunny-ears-partying":"\u{1F46F}\u200D\u2642\uFE0F","man-with-bunny-ears-partying":"\u{1F46F}\u200D\u2642\uFE0F",woman_with_veil,man_with_veil,bride_with_veil,"blond-haired-woman":"\u{1F471}\u200D\u2640\uFE0F","blond-haired-man":"\u{1F471}\u200D\u2642\uFE0F",person_with_blond_hair,man_with_gua_pi_mao,"woman-wearing-turban":"\u{1F473}\u200D\u2640\uFE0F","man-wearing-turban":"\u{1F473}\u200D\u2642\uFE0F",man_with_turban,older_man,older_woman,baby,"female-construction-worker":"\u{1F477}\u200D\u2640\uFE0F","male-construction-worker":"\u{1F477}\u200D\u2642\uFE0F",construction_worker,princess,japanese_ogre,japanese_goblin,ghost,angel,alien,space_invader,imp,skull,"woman-tipping-hand":"\u{1F481}\u200D\u2640\uFE0F",information_desk_person,"man-tipping-hand":"\u{1F481}\u200D\u2642\uFE0F","female-guard":"\u{1F482}\u200D\u2640\uFE0F","male-guard":"\u{1F482}\u200D\u2642\uFE0F",guardsman,dancer,lipstick,nail_care,"woman-getting-massage":"\u{1F486}\u200D\u2640\uFE0F",massage,"man-getting-massage":"\u{1F486}\u200D\u2642\uFE0F","woman-getting-haircut":"\u{1F487}\u200D\u2640\uFE0F",haircut,"man-getting-haircut":"\u{1F487}\u200D\u2642\uFE0F",barber,syringe,pill,kiss,love_letter,ring,gem,couplekiss,bouquet,couple_with_heart,wedding,heartbeat,broken_heart,two_hearts,sparkling_heart,heartpulse,cupid,blue_heart,green_heart,yellow_heart,purple_heart,gift_heart,revolving_hearts,heart_decoration,diamond_shape_with_a_dot_inside,bulb,anger,bomb,zzz,boom,collision:collision$1,sweat_drops,droplet,dash,hankey,poop,shit,muscle,dizzy,speech_balloon,thought_balloon,white_flower,moneybag,currency_exchange,heavy_dollar_sign,credit_card,yen:yen$1,dollar,euro,pound:pound$1,money_with_wings,chart,seat,computer,briefcase,minidisc,floppy_disk,cd,dvd,file_folder,open_file_folder,page_with_curl,page_facing_up,date:date$2,calendar:calendar$1,card_index,chart_with_upwards_trend,chart_with_downwards_trend,bar_chart,clipboard,pushpin,round_pushpin,paperclip,straight_ruler,triangular_ruler,bookmark_tabs,ledger,notebook,notebook_with_decorative_cover,closed_book,book,open_book,green_book,blue_book,orange_book,books,name_badge,scroll,memo,pencil,telephone_receiver,pager,fax,satellite_antenna,loudspeaker,mega,outbox_tray,inbox_tray,package:"\u{1F4E6}","e-mail":"\u{1F4E7}",incoming_envelope,envelope_with_arrow,mailbox_closed,mailbox,mailbox_with_mail,mailbox_with_no_mail,postbox,postal_horn,newspaper,iphone,calling,vibration_mode,mobile_phone_off,no_mobile_phones,signal_strength,camera,camera_with_flash,video_camera,tv,radio:radio$1,vhs,film_projector,prayer_beads,twisted_rightwards_arrows,repeat:repeat$1,repeat_one,arrows_clockwise,arrows_counterclockwise,low_brightness,high_brightness,mute,speaker,sound,loud_sound,battery,electric_plug,mag,mag_right,lock_with_ink_pen,closed_lock_with_key,key:key$3,lock,unlock,bell,no_bell,bookmark,link:link$4,radio_button,back,end,on:on$1,soon,top:top$1,underage,keycap_ten,capital_abcd,abcd,symbols:symbols$3,abc,fire,flashlight,wrench,hammer,nut_and_bolt,hocho,knife,gun,microscope,telescope,crystal_ball,six_pointed_star,beginner,trident,black_square_button,white_square_button,red_circle,large_blue_circle,large_orange_diamond,large_blue_diamond,small_orange_diamond,small_blue_diamond,small_red_triangle,small_red_triangle_down,arrow_up_small,arrow_down_small,om_symbol,dove_of_peace,kaaba,mosque,synagogue,menorah_with_nine_branches,clock1,clock2,clock3,clock4,clock5,clock6,clock7,clock8,clock9,clock10,clock11,clock12,clock130,clock230,clock330,clock430,clock530,clock630,clock730,clock830,clock930,clock1030,clock1130,clock1230,candle,mantelpiece_clock,hole,man_in_business_suit_levitating,"female-detective":"\u{1F575}\uFE0F\u200D\u2640\uFE0F","male-detective":"\u{1F575}\uFE0F\u200D\u2642\uFE0F",sleuth_or_spy,dark_sunglasses,spider,spider_web,joystick,man_dancing,linked_paperclips,lower_left_ballpoint_pen,lower_left_fountain_pen,lower_left_paintbrush,lower_left_crayon,raised_hand_with_fingers_splayed,middle_finger,reversed_hand_with_middle_finger_extended,"spock-hand":"\u{1F596}",black_heart,desktop_computer,printer,three_button_mouse,trackball,frame_with_picture,card_index_dividers,card_file_box,file_cabinet,wastebasket,spiral_note_pad,spiral_calendar_pad,compression,old_key,rolled_up_newspaper,dagger_knife,speaking_head_in_silhouette,left_speech_bubble,right_anger_bubble,ballot_box_with_ballot,world_map,mount_fuji,tokyo_tower,statue_of_liberty,japan,moyai,grinning,grin,joy,smiley,smile,sweat_smile,laughing,satisfied,innocent,smiling_imp,wink,blush,yum,relieved,heart_eyes,sunglasses,smirk,neutral_face,expressionless,unamused,sweat,pensive,confused,confounded,kissing,kissing_heart,kissing_smiling_eyes,kissing_closed_eyes,stuck_out_tongue,stuck_out_tongue_winking_eye,stuck_out_tongue_closed_eyes,disappointed,worried,angry,rage,cry,persevere,triumph,disappointed_relieved,frowning,anguished,fearful,weary,sleepy,tired_face,grimacing,sob,face_exhaling,open_mouth,hushed,cold_sweat,scream,astonished,flushed,sleeping,face_with_spiral_eyes,dizzy_face,face_in_clouds,no_mouth,mask:mask$1,smile_cat,joy_cat,smiley_cat,heart_eyes_cat,smirk_cat,kissing_cat,pouting_cat,crying_cat_face,scream_cat,slightly_frowning_face,slightly_smiling_face,upside_down_face,face_with_rolling_eyes,"woman-gesturing-no":"\u{1F645}\u200D\u2640\uFE0F",no_good,"man-gesturing-no":"\u{1F645}\u200D\u2642\uFE0F","woman-gesturing-ok":"\u{1F646}\u200D\u2640\uFE0F",ok_woman,"man-gesturing-ok":"\u{1F646}\u200D\u2642\uFE0F","woman-bowing":"\u{1F647}\u200D\u2640\uFE0F","man-bowing":"\u{1F647}\u200D\u2642\uFE0F",bow,see_no_evil,hear_no_evil,speak_no_evil,"woman-raising-hand":"\u{1F64B}\u200D\u2640\uFE0F",raising_hand,"man-raising-hand":"\u{1F64B}\u200D\u2642\uFE0F",raised_hands,"woman-frowning":"\u{1F64D}\u200D\u2640\uFE0F",person_frowning,"man-frowning":"\u{1F64D}\u200D\u2642\uFE0F","woman-pouting":"\u{1F64E}\u200D\u2640\uFE0F",person_with_pouting_face,"man-pouting":"\u{1F64E}\u200D\u2642\uFE0F",pray,rocket,helicopter,steam_locomotive,railway_car,bullettrain_side,bullettrain_front,train2,metro,light_rail,station,tram,train,bus,oncoming_bus,trolleybus,busstop,minibus,ambulance,fire_engine,police_car,oncoming_police_car,taxi,oncoming_taxi,car,red_car,oncoming_automobile,blue_car,truck,articulated_lorry,tractor,monorail,mountain_railway,suspension_railway,mountain_cableway,aerial_tramway,ship,"woman-rowing-boat":"\u{1F6A3}\u200D\u2640\uFE0F","man-rowing-boat":"\u{1F6A3}\u200D\u2642\uFE0F",rowboat,speedboat,traffic_light,vertical_traffic_light,construction,rotating_light,triangular_flag_on_post,door,no_entry_sign,smoking,no_smoking,put_litter_in_its_place,do_not_litter,potable_water,"non-potable_water":"\u{1F6B1}",bike,no_bicycles,"woman-biking":"\u{1F6B4}\u200D\u2640\uFE0F","man-biking":"\u{1F6B4}\u200D\u2642\uFE0F",bicyclist,"woman-mountain-biking":"\u{1F6B5}\u200D\u2640\uFE0F","man-mountain-biking":"\u{1F6B5}\u200D\u2642\uFE0F",mountain_bicyclist,"woman-walking":"\u{1F6B6}\u200D\u2640\uFE0F","man-walking":"\u{1F6B6}\u200D\u2642\uFE0F",walking,no_pedestrians,children_crossing,mens,womens,restroom,baby_symbol,toilet,wc,shower,bath,bathtub,passport_control,customs,baggage_claim,left_luggage,couch_and_lamp,sleeping_accommodation,shopping_bags,bellhop_bell,bed,place_of_worship,octagonal_sign,shopping_trolley,hindu_temple,hut,elevator,hammer_and_wrench,shield,oil_drum,motorway,railway_track,motor_boat,small_airplane,airplane_departure,airplane_arriving,satellite,passenger_ship,scooter,motor_scooter,canoe,sled,flying_saucer,skateboard,auto_rickshaw,pickup_truck,roller_skate,large_orange_circle,large_yellow_circle,large_green_circle,large_purple_circle,large_brown_circle,large_red_square,large_blue_square,large_orange_square,large_yellow_square,large_green_square,large_purple_square,large_brown_square,pinched_fingers,white_heart,brown_heart,pinching_hand,zipper_mouth_face,money_mouth_face,face_with_thermometer,nerd_face,thinking_face,face_with_head_bandage,robot_face,hugging_face,the_horns,sign_of_the_horns,call_me_hand,raised_back_of_hand,"left-facing_fist":"\u{1F91B}","right-facing_fist":"\u{1F91C}",handshake,crossed_fingers,hand_with_index_and_middle_fingers_crossed,i_love_you_hand_sign,face_with_cowboy_hat,clown_face,nauseated_face,rolling_on_the_floor_laughing,drooling_face,lying_face,"woman-facepalming":"\u{1F926}\u200D\u2640\uFE0F","man-facepalming":"\u{1F926}\u200D\u2642\uFE0F",face_palm,sneezing_face,face_with_raised_eyebrow,face_with_one_eyebrow_raised,"star-struck":"\u{1F929}",grinning_face_with_star_eyes,zany_face,grinning_face_with_one_large_and_one_small_eye,shushing_face,face_with_finger_covering_closed_lips,face_with_symbols_on_mouth,serious_face_with_symbols_covering_mouth,face_with_hand_over_mouth,smiling_face_with_smiling_eyes_and_hand_covering_mouth,face_vomiting,face_with_open_mouth_vomiting,exploding_head,shocked_face_with_exploding_head,pregnant_woman,"breast-feeding":"\u{1F931}",palms_up_together,selfie,prince,woman_in_tuxedo,man_in_tuxedo,person_in_tuxedo,mrs_claus,mother_christmas,"woman-shrugging":"\u{1F937}\u200D\u2640\uFE0F","man-shrugging":"\u{1F937}\u200D\u2642\uFE0F",shrug,"woman-cartwheeling":"\u{1F938}\u200D\u2640\uFE0F","man-cartwheeling":"\u{1F938}\u200D\u2642\uFE0F",person_doing_cartwheel,"woman-juggling":"\u{1F939}\u200D\u2640\uFE0F","man-juggling":"\u{1F939}\u200D\u2642\uFE0F",juggling,fencer,"woman-wrestling":"\u{1F93C}\u200D\u2640\uFE0F","man-wrestling":"\u{1F93C}\u200D\u2642\uFE0F",wrestlers,"woman-playing-water-polo":"\u{1F93D}\u200D\u2640\uFE0F","man-playing-water-polo":"\u{1F93D}\u200D\u2642\uFE0F",water_polo,"woman-playing-handball":"\u{1F93E}\u200D\u2640\uFE0F","man-playing-handball":"\u{1F93E}\u200D\u2642\uFE0F",handball,diving_mask,wilted_flower,drum_with_drumsticks,clinking_glasses,tumbler_glass,spoon,goal_net,first_place_medal,second_place_medal,third_place_medal,boxing_glove,martial_arts_uniform,curling_stone,lacrosse,softball,flying_disc,croissant,avocado,cucumber,bacon,potato,carrot,baguette_bread,green_salad,shallow_pan_of_food,stuffed_flatbread,egg,glass_of_milk,peanuts,kiwifruit,pancakes,dumpling,fortune_cookie,takeout_box,chopsticks,bowl_with_spoon,cup_with_straw,coconut,broccoli,pie,pretzel,cut_of_meat,sandwich,canned_food,leafy_green,mango,moon_cake,bagel,smiling_face_with_3_hearts,yawning_face,smiling_face_with_tear,partying_face,woozy_face,hot_face,cold_face,ninja,disguised_face,pleading_face,sari,lab_coat,goggles,hiking_boot,womans_flat_shoe,crab,lion_face,scorpion,turkey,unicorn_face,eagle,duck,bat,shark,owl,fox_face,butterfly,deer,gorilla,lizard,rhinoceros,shrimp,squid,giraffe_face,zebra_face,hedgehog,sauropod,"t-rex":"\u{1F996}",cricket,kangaroo,llama,peacock,hippopotamus,parrot,raccoon,lobster,mosquito,microbe,badger,swan,mammoth,dodo,sloth,otter,orangutan,skunk,flamingo,oyster,beaver,bison,seal,guide_dog,probing_cane,bone,leg,foot,tooth,female_superhero,male_superhero,superhero,female_supervillain,male_supervillain,supervillain,safety_vest,ear_with_hearing_aid,motorized_wheelchair,manual_wheelchair,mechanical_arm,mechanical_leg,cheese_wedge,cupcake,salt,beverage_box,garlic,onion,falafel,waffle,butter,mate_drink,ice_cube,bubble_tea,woman_standing,man_standing,standing_person,woman_kneeling,man_kneeling,kneeling_person,deaf_woman,deaf_man,deaf_person,face_with_monocle,farmer,cook,person_feeding_baby,mx_claus,student,singer,artist,teacher,factory_worker,technologist,office_worker,mechanic,scientist,astronaut,firefighter,people_holding_hands,person_with_probing_cane,red_haired_person,curly_haired_person,bald_person,white_haired_person,person_in_motorized_wheelchair,person_in_manual_wheelchair,health_worker,judge,pilot,adult,child,older_adult,woman_with_beard,man_with_beard,bearded_person,person_with_headscarf,woman_in_steamy_room,man_in_steamy_room,person_in_steamy_room,woman_climbing,person_climbing,man_climbing,woman_in_lotus_position,person_in_lotus_position,man_in_lotus_position,female_mage,mage,male_mage,female_fairy,fairy,male_fairy,female_vampire,vampire,male_vampire,mermaid,merman,merperson,female_elf,male_elf,elf,female_genie,male_genie,genie,female_zombie,male_zombie,zombie,brain,orange_heart,billed_cap,scarf,gloves,coat,socks,red_envelope,firecracker,jigsaw,test_tube,petri_dish,dna,compass,abacus,fire_extinguisher,toolbox,bricks,magnet,luggage,lotion_bottle,thread,yarn,safety_pin,teddy_bear,broom,basket,roll_of_paper,soap,sponge,receipt,nazar_amulet,ballet_shoes,"one-piece_swimsuit":"\u{1FA71}",briefs,shorts,thong_sandal,drop_of_blood,adhesive_bandage,stethoscope,"yo-yo":"\u{1FA80}",kite,parachute,boomerang,magic_wand,pinata,nesting_dolls,ringed_planet,chair,razor,axe,diya_lamp,banjo,military_helmet,accordion,long_drum,coin,carpentry_saw,screwdriver,ladder,hook,mirror,window:window$1,plunger,sewing_needle,knot,bucket,mouse_trap,toothbrush,headstone,placard,rock,fly,worm,beetle,cockroach,potted_plant,wood,feather,anatomical_heart,lungs,people_hugging,blueberries,bell_pepper,olive,flatbread,tamale,fondue,teapot,bangbang,interrobang,tm,information_source,left_right_arrow,arrow_up_down,arrow_upper_left,arrow_upper_right,arrow_lower_right,arrow_lower_left,leftwards_arrow_with_hook,arrow_right_hook,watch,hourglass,keyboard,eject,fast_forward,rewind,arrow_double_up,arrow_double_down,black_right_pointing_double_triangle_with_vertical_bar,black_left_pointing_double_triangle_with_vertical_bar,black_right_pointing_triangle_with_double_vertical_bar,alarm_clock,stopwatch,timer_clock,hourglass_flowing_sand,double_vertical_bar,black_square_for_stop,black_circle_for_record,m:m$3,black_small_square,white_small_square,arrow_forward,arrow_backward,white_medium_square,black_medium_square,white_medium_small_square,black_medium_small_square,sunny,cloud:cloud$1,umbrella,snowman,comet,phone,telephone,ballot_box_with_check,shamrock,point_up,skull_and_crossbones,radioactive_sign,biohazard_sign,orthodox_cross,star_and_crescent,peace_symbol,yin_yang,wheel_of_dharma,white_frowning_face,relaxed,female_sign,male_sign,gemini,cancer,leo,virgo,libra,scorpius,chess_pawn,spades,clubs,hearts,diamonds,hotsprings,recycle,infinity,wheelchair,hammer_and_pick,crossed_swords,medical_symbol,staff_of_aesculapius,scales:scales$1,alembic,gear,atom_symbol,fleur_de_lis,warning,zap,transgender_symbol,white_circle,black_circle,coffin,funeral_urn,soccer,baseball,snowman_without_snow,partly_sunny,thunder_cloud_and_rain,ophiuchus,pick:pick$3,helmet_with_white_cross,chains,no_entry,shinto_shrine,church,mountain,umbrella_on_ground,fountain,golf,ferry,boat,sailboat,skier,ice_skate,"woman-bouncing-ball":"\u26F9\uFE0F\u200D\u2640\uFE0F","man-bouncing-ball":"\u26F9\uFE0F\u200D\u2642\uFE0F",person_with_ball,tent,fuelpump,scissors,airplane,email,envelope,fist,hand,raised_hand,v:v$1,writing_hand,pencil2,black_nib,heavy_check_mark,heavy_multiplication_x,latin_cross,star_of_david,eight_spoked_asterisk,eight_pointed_black_star,snowflake,sparkle,x:x$5,negative_squared_cross_mark,heavy_heart_exclamation_mark_ornament,heart_on_fire,mending_heart,heart,arrow_right,curly_loop,loop,arrow_heading_up,arrow_heading_down,arrow_left,arrow_up,arrow_down,black_large_square,white_large_square,star,o,wavy_dash,part_alternation_mark,congratulations,secret};var toArray=requireToArray(),emojiByName=require$$1$4,emojiNameRegex=/:([a-zA-Z0-9_\-\+]+):/g,trimSpaceRegex=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function stripColons(et){var tt=et.indexOf(":");return tt>-1?tt===et.length-1?(et=et.substring(0,tt),stripColons(et)):(et=et.substr(tt+1),stripColons(et)):et}function wrapColons(et){return typeof et=="string"&&et.length>0?":"+et+":":et}function ensureColons(et){return typeof et=="string"&&et[0]!==":"?wrapColons(et):et}var NON_SPACING_MARK=String.fromCharCode(65039),nonSpacingRegex=new RegExp(NON_SPACING_MARK,"g");function stripNSB(et){return et.replace(nonSpacingRegex,"")}var emojiByCode=Object.keys(emojiByName).reduce(function(et,tt){return et[stripNSB(emojiByName[tt])]=tt,et},{}),Emoji={emoji:emojiByName};Emoji._get=function et(tt){return emojiByCode[stripNSB(tt)]?tt:emojiByName.hasOwnProperty(tt)?emojiByName[tt]:ensureColons(tt)};Emoji.get=function et(tt){return tt=stripColons(tt),Emoji._get(tt)};Emoji.find=function et(tt){return Emoji.findByName(tt)||Emoji.findByCode(tt)};Emoji.findByName=function et(tt){var nt=stripColons(tt),rt=emojiByName[nt];return rt?{emoji:rt,key:nt}:void 0};Emoji.findByCode=function et(tt){var nt=stripNSB(tt),rt=emojiByCode[nt];return rt?{emoji:emojiByName[rt],key:rt}:void 0};Emoji.hasEmoji=function et(tt){return Emoji.hasEmojiByName(tt)||Emoji.hasEmojiByCode(tt)};Emoji.hasEmojiByName=function et(tt){var nt=Emoji.findByName(tt);return!!nt&&nt.key===stripColons(tt)};Emoji.hasEmojiByCode=function et(tt){var nt=Emoji.findByCode(tt);return!!nt&&stripNSB(nt.emoji)===stripNSB(tt)};Emoji.which=function et(tt,nt){var rt=stripNSB(tt),ot=emojiByCode[rt];return nt?wrapColons(ot):ot};Emoji.emojify=function et(tt,nt,rt){return tt?tt.split(emojiNameRegex).map(function(st,ut){if(ut%2===0)return st;var ct=Emoji._get(st),ft=ct.indexOf(":")>-1;return ft&&typeof nt=="function"?nt(st):!ft&&typeof rt=="function"?rt(ct,st):ct}).join(""):""};Emoji.random=function et(){var tt=Object.keys(emojiByName),nt=Math.floor(Math.random()*tt.length),rt=tt[nt],ot=Emoji._get(rt);return{key:rt,emoji:ot}};Emoji.search=function et(tt){var nt=Object.keys(emojiByName),rt=stripColons(tt),ot=nt.filter(function(st){return st.toString().indexOf(rt)===0});return ot.map(function(st){return{key:st,emoji:Emoji._get(st)}})};Emoji.unemojify=function et(tt){if(!tt)return"";var nt=toArray(tt);return nt.map(function(rt){return Emoji.which(rt,!0)||rt}).join("")};Emoji.replace=function et(tt,nt,rt){if(!tt)return"";var ot=typeof nt=="function"?nt:function(){return nt},st=toArray(tt),ut=st.map(function(ct,ft){var pt=Emoji.findByCode(ct);return pt&&rt&&st[ft+1]===" "&&(st[ft+1]=""),pt?ot(pt):ct}).join("");return rt?ut.replace(trimSpaceRegex,""):ut};Emoji.strip=function et(tt){return Emoji.replace(tt,"",!0)};var emoji$1=Emoji;(function(et){et.exports=emoji$1})(nodeEmoji);const require$$2$3=[{name:"angry",emoji:"\u{1F620}",tags:["mad","annoyed"],description:"angry face",emoticons:[">:(",">:[",">:-(",">:-[",">=(",">=[",">=-(",">=-["]},{name:"blush",emoji:"\u{1F60A}",tags:["proud"],description:"smiling face with smiling eyes",emoticons:[':")',':"]',':"D',':-")',':-"]',':-"D','=")','="]','="D','=-")','=-"]','=-"D']},{name:"broken_heart",emoji:"\u{1F494}",tags:[],description:"broken heart",emoticons:["<\\3","</3"]},{name:"confused",emoji:"\u{1F615}",tags:[],description:"confused face",emoticons:[":/",":\\",":-/",":-\\","=/","=\\","=-/","=-\\"]},{name:"cry",emoji:"\u{1F622}",tags:["sad","tear"],description:"crying face",emoticons:[":,(",":,[",":,|",":,-(",":,-[",":,-|",":'(",":'[",":'|",":'-(",":'-[",":'-|","=,(","=,[","=,|","=,-(","=,-[","=,-|","='(","='[","='|","='-(","='-[","='-|"]},{name:"frowning",emoji:"\u{1F626}",tags:[],description:"frowning face with open mouth",emoticons:[":(",":[",":-(",":-[","=(","=[","=-(","=-["]},{name:"heart",emoji:"\u2764\uFE0F",tags:["love"],description:"red heart",emoticons:["<3"]},{name:"imp",emoji:"\u{1F47F}",tags:["angry","devil","evil","horns"],description:"angry face with horns",emoticons:["]:(","]:[","]:-(","]:-[","]=(","]=[","]=-(","]=-["]},{name:"innocent",emoji:"\u{1F607}",tags:["angel"],description:"smiling face with halo",emoticons:["o:)","o:]","o:D","o:-)","o:-]","o:-D","o=)","o=]","o=D","o=-)","o=-]","o=-D","O:)","O:]","O:D","O:-)","O:-]","O:-D","O=)","O=]","O=D","O=-)","O=-]","O=-D","0:)","0:]","0:D","0:-)","0:-]","0:-D","0=)","0=]","0=D","0=-)","0=-]","0=-D"]},{name:"joy",emoji:"\u{1F602}",tags:["tears"],description:"face with tears of joy",emoticons:[":,)",":,]",":,D",":,-)",":,-]",":,-D",":')",":']",":'D",":'-)",":'-]",":'-D","=,)","=,]","=,D","=,-)","=,-]","=,-D","=')","=']","='D","='-)","='-]","='-D"]},{name:"kissing",emoji:"\u{1F617}",tags:[],description:"kissing face",emoticons:[":*",":-*","=*","=-*"]},{name:"laughing",emoji:"\u{1F606}",tags:["happy","haha"],description:"grinning squinting face",emoticons:["x)","x]","xD","x-)","x-]","x-D","X)","X]","X-)","X-]","X-D"]},{name:"man",emoji:"\u{1F468}",tags:["mustache","father","dad"],description:"man",emoticons:[":3",":-3","=3","=-3",";3",";-3","x3","x-3","X3","X-3"]},{name:"neutral_face",emoji:"\u{1F610}",tags:["meh"],description:"neutral face",emoticons:[":|",":-|","=|","=-|"]},{name:"no_mouth",emoji:"\u{1F636}",tags:["mute","silence"],description:"face without mouth",emoticons:[":-"]},{name:"open_mouth",emoji:"\u{1F62E}",tags:["surprise","impressed","wow"],description:"face with open mouth",emoticons:[":o",":O",":0",":-o",":-O",":-0","=o","=O","=0","=-o","=-O","=-0"]},{name:"rage",emoji:"\u{1F621}",tags:["angry"],description:"pouting face",emoticons:[":@",":-@","=@","=-@"]},{name:"smile",emoji:"\u{1F604}",tags:["happy","joy","laugh","pleased"],description:"grinning face with smiling eyes",emoticons:[":D",":-D","=D","=-D"]},{name:"smiley",emoji:"\u{1F603}",tags:["happy","joy","haha"],description:"grinning face with big eyes",emoticons:[":)",":]",":-)",":-]","=)","=]","=-)","=-]"]},{name:"smiling_imp",emoji:"\u{1F608}",tags:["devil","evil","horns"],description:"smiling face with horns",emoticons:["]:)","]:]","]:D","]:-)","]:-]","]:-D","]=)","]=]","]=D","]=-)","]=-]","]=-D"]},{name:"sob",emoji:"\u{1F62D}",tags:["sad","cry","bawling"],description:"loudly crying face",emoticons:[":,'(",":,'[",":,'-(",":,'-[",":',(",":',[",":',-(",":',-[","=,'(","=,'[","=,'-(","=,'-[","=',(","=',[","=',-(","=',-["]},{name:"stuck_out_tongue",emoji:"\u{1F61B}",tags:[],description:"face with tongue",emoticons:[":p",":P",":d",":-p",":-P",":-d","=p","=P","=d","=-p","=-P","=-d"]},{name:"stuck_out_tongue_closed_eyes",emoji:"\u{1F61D}",tags:["prank"],description:"squinting face with tongue",emoticons:["xP","x-p","x-P","x-d","Xp","Xd","X-p","X-P","X-d"]},{name:"stuck_out_tongue_winking_eye",emoji:"\u{1F61C}",tags:["prank","silly"],description:"winking face with tongue",emoticons:[";p",";P",";d",";-p",";-P",";-d"]},{name:"sunglasses",emoji:"\u{1F60E}",tags:["cool"],description:"smiling face with sunglasses",emoticons:["8)","8]","8D","8-)","8-]","8-D","B)","B]","B-)","B-]","B-D"]},{name:"sweat",emoji:"\u{1F613}",tags:[],description:"downcast face with sweat",emoticons:[",:(",",:[",",:-(",",:-[",",=(",",=[",",=-(",",=-[","':(","':[","':-(","':-[","'=(","'=[","'=-(","'=-["]},{name:"sweat_smile",emoji:"\u{1F605}",tags:["hot"],description:"grinning face with sweat",emoticons:[",:)",",:]",",:D",",:-)",",:-]",",:-D",",=)",",=]",",=D",",=-)",",=-]",",=-D","':)","':]","':D","':-)","':-]","':-D","'=)","'=]","'=D","'=-)","'=-]","'=-D"]},{name:"unamused",emoji:"\u{1F612}",tags:["meh"],description:"unamused face",emoticons:[":$",":s",":z",":S",":Z",":-$",":-s",":-z",":-S",":-Z","=$","=s","=z","=S","=Z","=-$","=-s","=-z","=-S","=-Z"]},{name:"wink",emoji:"\u{1F609}",tags:["flirt"],description:"winking face",emoticons:[";)",";]",";D",";-)",";-]",";-D"]}],visit$3=unistUtilVisit$1,emoji=nodeEmoji.exports,emoticon=require$$2$3,RE_EMOJI=/:\+1:|:-1:|:[\w-]+:/g,RE_SHORT=/[$@|*'",;.=:\-)([\]\\/<>038BOopPsSdDxXzZ]{2,5}/g,DEFAULT_SETTINGS={padSpaceAfter:!1,emoticon:!1};function plugin(et){const tt=Object.assign({},DEFAULT_SETTINGS,et),nt=!!tt.padSpaceAfter,rt=!!tt.emoticon;function ot(ct){const ft=emoticon.find(vt=>vt.emoticons.includes(ct)),pt=emoticon.find(vt=>vt.emoticons.includes(ct.slice(0,-1))),ht=pt?ct.slice(-1):"",mt=nt?" ":"";return(ft?ft.emoji+mt:pt&&pt.emoji+mt+ht)||ct}function st(ct){const ft=emoji.get(ct);return nt&&ft!==ct?ft+" ":ft}function ut(ct){visit$3(ct,"text",function(ft){ft.value=ft.value.replace(RE_EMOJI,st),rt&&(ft.value=ft.value.replace(RE_SHORT,ot))})}return ut}var remarkEmoji=plugin,util$2={};util$2.isRemarkParser=isRemarkParser;util$2.isRemarkCompiler=isRemarkCompiler;function isRemarkParser(et){return Boolean(et&&et.prototype&&et.prototype.blockTokenizers)}function isRemarkCompiler(et){return Boolean(et&&et.prototype&&et.prototype.visitors)}var util$1=util$2,inline=mathInline;const tab$2=9,space$3=32,dollarSign$1=36,digit0=48,digit9=57,backslash$1=92,classList$1=["math","math-inline"],mathDisplay="math-display";function mathInline(et){const tt=this.Parser,nt=this.Compiler;util$1.isRemarkParser(tt)&&attachParser$1(tt,et),util$1.isRemarkCompiler(nt)&&attachCompiler$1(nt)}function attachParser$1(et,tt){const nt=et.prototype,rt=nt.inlineMethods;st.locator=ot,nt.inlineTokenizers.math=st,rt.splice(rt.indexOf("text"),0,"math");function ot(ut,ct){return ut.indexOf("$",ct)}function st(ut,ct,ft){const pt=ct.length;let ht=!1,mt=!1,yt=0,vt,Tt,Et,xt,At,Ct,$t;if(ct.charCodeAt(yt)===backslash$1&&(mt=!0,yt++),ct.charCodeAt(yt)===dollarSign$1){if(yt++,mt)return ft?!0:ut(ct.slice(0,yt))({type:"text",value:"$"});if(ct.charCodeAt(yt)===dollarSign$1&&(ht=!0,yt++),Et=ct.charCodeAt(yt),!(Et===space$3||Et===tab$2)){for(xt=yt;yt<pt;){if(Tt=Et,Et=ct.charCodeAt(yt+1),Tt===dollarSign$1){if(vt=ct.charCodeAt(yt-1),vt!==space$3&&vt!==tab$2&&(Et!==Et||Et<digit0||Et>digit9)&&(!ht||Et===dollarSign$1)){At=yt-1,yt++,ht&&yt++,Ct=yt;break}}else Tt===backslash$1&&(yt++,Et=ct.charCodeAt(yt+1));yt++}if(Ct!==void 0)return ft?!0:($t=ct.slice(xt,At+1),ut(ct.slice(0,Ct))({type:"inlineMath",value:$t,data:{hName:"span",hProperties:{className:classList$1.concat(ht&&tt.inlineMathDouble?[mathDisplay]:[])},hChildren:[{type:"text",value:$t}]}}))}}}}function attachCompiler$1(et){const tt=et.prototype;tt.visitors.inlineMath=nt;function nt(rt){let ot="$";return(rt.data&&rt.data.hProperties&&rt.data.hProperties.className||[]).includes(mathDisplay)&&(ot="$$"),ot+rt.value+ot}}const util=util$2;var block=mathBlock;const lineFeed$1=10,space$2=32,dollarSign=36,lineFeedChar=`
`,dollarSignChar="$",minFenceCount=2,classList=["math","math-display"];function mathBlock(){const et=this.Parser,tt=this.Compiler;util.isRemarkParser(et)&&attachParser(et),util.isRemarkCompiler(tt)&&attachCompiler(tt)}function attachParser(et){const tt=et.prototype,nt=tt.blockMethods,rt=tt.interruptParagraph,ot=tt.interruptList,st=tt.interruptBlockquote;tt.blockTokenizers.math=ut,nt.splice(nt.indexOf("fencedCode")+1,0,"math"),rt.splice(rt.indexOf("fencedCode")+1,0,["math"]),ot.splice(ot.indexOf("fencedCode")+1,0,["math"]),st.splice(st.indexOf("fencedCode")+1,0,["math"]);function ut(ct,ft,pt){var ht=ft.length,mt=0;let yt,vt,Tt,Et,xt,At,Ct,$t,Ot,Rt,It;for(;mt<ht&&ft.charCodeAt(mt)===space$2;)mt++;for(xt=mt;mt<ht&&ft.charCodeAt(mt)===dollarSign;)mt++;if(At=mt-xt,!(At<minFenceCount)){for(;mt<ht&&ft.charCodeAt(mt)===space$2;)mt++;for(Ct=mt;mt<ht;){if(yt=ft.charCodeAt(mt),yt===dollarSign)return;if(yt===lineFeed$1)break;mt++}if(ft.charCodeAt(mt)===lineFeed$1){if(pt)return!0;for(vt=[],Ct!==mt&&vt.push(ft.slice(Ct,mt)),mt++,Tt=ft.indexOf(lineFeedChar,mt+1),Tt=Tt===-1?ht:Tt;mt<ht;){for($t=!1,Rt=mt,It=Tt,Et=Tt,Ot=0;Et>Rt&&ft.charCodeAt(Et-1)===space$2;)Et--;for(;Et>Rt&&ft.charCodeAt(Et-1)===dollarSign;)Ot++,Et--;for(At<=Ot&&ft.indexOf(dollarSignChar,Rt)===Et&&($t=!0,It=Et);Rt<=It&&Rt-mt<xt&&ft.charCodeAt(Rt)===space$2;)Rt++;if($t)for(;It>Rt&&ft.charCodeAt(It-1)===space$2;)It--;if((!$t||Rt!==It)&&vt.push(ft.slice(Rt,It)),$t)break;mt=Tt+1,Tt=ft.indexOf(lineFeedChar,mt+1),Tt=Tt===-1?ht:Tt}return vt=vt.join(`
`),ct(ft.slice(0,Tt))({type:"math",value:vt,data:{hName:"div",hProperties:{className:classList.concat()},hChildren:[{type:"text",value:vt}]}})}}}}function attachCompiler(et){const tt=et.prototype;tt.visitors.math=nt;function nt(rt){return`$$
`+rt.value+`
$$`}}const inlinePlugin=inline,blockPlugin=block;var remarkMath=math;function math(et){var tt=et||{};blockPlugin.call(this,tt),inlinePlugin.call(this,tt)}var inherits_browser={exports:{}};typeof Object.create=="function"?inherits_browser.exports=function(tt,nt){nt&&(tt.super_=nt,tt.prototype=Object.create(nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(tt,nt){if(nt){tt.super_=nt;var rt=function(){};rt.prototype=nt.prototype,tt.prototype=new rt,tt.prototype.constructor=tt}};var xtend$3=immutable,inherits$1=inherits_browser.exports,unherit_1=unherit$1;function unherit$1(et){var tt,nt,rt;inherits$1(st,et),inherits$1(ot,st),tt=st.prototype;for(nt in tt)rt=tt[nt],rt&&typeof rt=="object"&&(tt[nt]="concat"in rt?rt.concat():xtend$3(rt));return st;function ot(ut){return et.apply(this,ut)}function st(){return this instanceof st?et.apply(this,arguments):new ot(arguments)}}var stateToggle=factory$4;function factory$4(et,tt,nt){return rt;function rt(){var ot=nt||this,st=ot[et];return ot[et]=!tt,ut;function ut(){ot[et]=st}}}var vfileLocation$1=factory$3;function factory$3(et){var tt=indices(String(et));return{toPosition:offsetToPositionFactory(tt),toOffset:positionToOffsetFactory(tt)}}function offsetToPositionFactory(et){return tt;function tt(nt){var rt=-1,ot=et.length;if(nt<0)return{};for(;++rt<ot;)if(et[rt]>nt)return{line:rt+1,column:nt-(et[rt-1]||0)+1,offset:nt};return{}}}function positionToOffsetFactory(et){return tt;function tt(nt){var rt=nt&&nt.line,ot=nt&&nt.column;return!isNaN(rt)&&!isNaN(ot)&&rt-1 in et?(et[rt-2]||0)+ot-1||0:-1}}function indices(et){for(var tt=[],nt=et.indexOf(`
`);nt!==-1;)tt.push(nt+1),nt=et.indexOf(`
`,nt+1);return tt.push(et.length+1),tt}var _unescape=factory$2,backslash="\\";function factory$2(et,tt){return nt;function nt(rt){for(var ot=0,st=rt.indexOf(backslash),ut=et[tt],ct=[],ft;st!==-1;)ct.push(rt.slice(ot,st)),ot=st+1,ft=rt.charAt(ot),(!ft||ut.indexOf(ft)===-1)&&ct.push(backslash),st=rt.indexOf(backslash,ot+1);return ct.push(rt.slice(ot)),ct.join("")}}const AElig="\xC6",AMP="&",Aacute="\xC1",Acirc="\xC2",Agrave="\xC0",Aring="\xC5",Atilde="\xC3",Auml="\xC4",COPY="\xA9",Ccedil="\xC7",ETH="\xD0",Eacute="\xC9",Ecirc="\xCA",Egrave="\xC8",Euml="\xCB",GT$1=">",Iacute="\xCD",Icirc="\xCE",Igrave="\xCC",Iuml="\xCF",LT="<",Ntilde="\xD1",Oacute="\xD3",Ocirc="\xD4",Ograve="\xD2",Oslash="\xD8",Otilde="\xD5",Ouml="\xD6",QUOT='"',REG="\xAE",THORN="\xDE",Uacute="\xDA",Ucirc="\xDB",Ugrave="\xD9",Uuml="\xDC",Yacute="\xDD",aacute="\xE1",acirc="\xE2",acute="\xB4",aelig="\xE6",agrave="\xE0",amp="&",aring="\xE5",atilde="\xE3",auml="\xE4",brvbar="\xA6",ccedil="\xE7",cedil="\xB8",cent="\xA2",copy$3="\xA9",curren="\xA4",deg="\xB0",divide="\xF7",eacute="\xE9",ecirc="\xEA",egrave="\xE8",eth="\xF0",euml="\xEB",frac12="\xBD",frac14="\xBC",frac34="\xBE",gt$2=">",iacute="\xED",icirc="\xEE",iexcl="\xA1",igrave="\xEC",iquest="\xBF",iuml="\xEF",laquo="\xAB",lt$2="<",macr="\xAF",micro="\xB5",middot="\xB7",nbsp="\xA0",not="\xAC",ntilde="\xF1",oacute="\xF3",ocirc="\xF4",ograve="\xF2",ordf="\xAA",ordm="\xBA",oslash="\xF8",otilde="\xF5",ouml="\xF6",para="\xB6",plusmn="\xB1",pound="\xA3",quot='"',raquo="\xBB",reg$1="\xAE",sect="\xA7",shy="\xAD",sup1="\xB9",sup2="\xB2",sup3="\xB3",szlig="\xDF",thorn="\xFE",times="\xD7",uacute="\xFA",ucirc="\xFB",ugrave="\xF9",uml="\xA8",uuml="\xFC",yacute="\xFD",yen="\xA5",yuml="\xFF",require$$0$1={AElig,AMP,Aacute,Acirc,Agrave,Aring,Atilde,Auml,COPY,Ccedil,ETH,Eacute,Ecirc,Egrave,Euml,GT:GT$1,Iacute,Icirc,Igrave,Iuml,LT,Ntilde,Oacute,Ocirc,Ograve,Oslash,Otilde,Ouml,QUOT,REG,THORN,Uacute,Ucirc,Ugrave,Uuml,Yacute,aacute,acirc,acute,aelig,agrave,amp,aring,atilde,auml,brvbar,ccedil,cedil,cent,copy:copy$3,curren,deg,divide,eacute,ecirc,egrave,eth,euml,frac12,frac14,frac34,gt:gt$2,iacute,icirc,iexcl,igrave,iquest,iuml,laquo,lt:lt$2,macr,micro,middot,nbsp,not,ntilde,oacute,ocirc,ograve,ordf,ordm,oslash,otilde,ouml,para,plusmn,pound,quot,raquo,reg:reg$1,sect,shy,sup1,sup2,sup3,szlig,thorn,times,uacute,ucirc,ugrave,uml,uuml,yacute,yen,yuml},require$$1$3={0:"\uFFFD",128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};var isDecimal=decimal$2;function decimal$2(et){var tt=typeof et=="string"?et.charCodeAt(0):et;return tt>=48&&tt<=57}var isHexadecimal=hexadecimal$1;function hexadecimal$1(et){var tt=typeof et=="string"?et.charCodeAt(0):et;return tt>=97&&tt<=102||tt>=65&&tt<=70||tt>=48&&tt<=57}var isAlphabetical,hasRequiredIsAlphabetical;function requireIsAlphabetical(){if(hasRequiredIsAlphabetical)return isAlphabetical;hasRequiredIsAlphabetical=1,isAlphabetical=et;function et(tt){var nt=typeof tt=="string"?tt.charCodeAt(0):tt;return nt>=97&&nt<=122||nt>=65&&nt<=90}return isAlphabetical}var alphabetical=requireIsAlphabetical(),decimal$1=isDecimal,isAlphanumerical=alphanumerical$1;function alphanumerical$1(et){return alphabetical(et)||decimal$1(et)}var el$2,semicolon$1=59,decodeEntity_browser=decodeEntity$1;function decodeEntity$1(et){var tt="&"+et+";",nt;return el$2=el$2||document.createElement("i"),el$2.innerHTML=tt,nt=el$2.textContent,nt.charCodeAt(nt.length-1)===semicolon$1&&et!=="semi"||nt===tt?!1:nt}var legacy$3=require$$0$1,invalid=require$$1$3,decimal=isDecimal,hexadecimal=isHexadecimal,alphanumerical=isAlphanumerical,decodeEntity=decodeEntity_browser,parseEntities_1=parseEntities,own$3={}.hasOwnProperty,fromCharCode=String.fromCharCode,noop$d=Function.prototype,defaults$2={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},tab$1=9,lineFeed=10,formFeed=12,space$1=32,ampersand=38,semicolon=59,lessThan=60,equalsTo=61,numberSign=35,uppercaseX=88,lowercaseX=120,replacementCharacter=65533,name$3="named",hexa="hexadecimal",deci="decimal",bases={};bases[hexa]=16;bases[deci]=10;var tests={};tests[name$3]=alphanumerical;tests[deci]=decimal;tests[hexa]=hexadecimal;var namedNotTerminated=1,numericNotTerminated=2,namedEmpty=3,numericEmpty=4,namedUnknown=5,numericDisallowed=6,numericProhibited=7,messages={};messages[namedNotTerminated]="Named character references must be terminated by a semicolon";messages[numericNotTerminated]="Numeric character references must be terminated by a semicolon";messages[namedEmpty]="Named character references cannot be empty";messages[numericEmpty]="Numeric character references cannot be empty";messages[namedUnknown]="Named character references must be known";messages[numericDisallowed]="Numeric character references cannot be disallowed";messages[numericProhibited]="Numeric character references cannot be outside the permissible Unicode range";function parseEntities(et,tt){var nt={},rt,ot;tt||(tt={});for(ot in defaults$2)rt=tt[ot],nt[ot]=rt??defaults$2[ot];return(nt.position.indent||nt.position.start)&&(nt.indent=nt.position.indent||[],nt.position=nt.position.start),parse$a(et,nt)}function parse$a(et,tt){var nt=tt.additional,rt=tt.nonTerminated,ot=tt.text,st=tt.reference,ut=tt.warning,ct=tt.textContext,ft=tt.referenceContext,pt=tt.warningContext,ht=tt.position,mt=tt.indent||[],yt=et.length,vt=0,Tt=-1,Et=ht.column||1,xt=ht.line||1,At="",Ct=[],$t,Ot,Rt,It,kt,Mt,Ft,zt,Vt,Zt,Ut,Xt,Jt,gn,An,sn,Sn,In,_n;for(typeof nt=="string"&&(nt=nt.charCodeAt(0)),sn=En(),zt=ut?Ln:noop$d,vt--,yt++;++vt<yt;)if(kt===lineFeed&&(Et=mt[Tt]||1),kt=et.charCodeAt(vt),kt===ampersand){if(Ft=et.charCodeAt(vt+1),Ft===tab$1||Ft===lineFeed||Ft===formFeed||Ft===space$1||Ft===ampersand||Ft===lessThan||Ft!==Ft||nt&&Ft===nt){At+=fromCharCode(kt),Et++;continue}for(Jt=vt+1,Xt=Jt,_n=Jt,Ft===numberSign?(_n=++Xt,Ft=et.charCodeAt(_n),Ft===uppercaseX||Ft===lowercaseX?(gn=hexa,_n=++Xt):gn=deci):gn=name$3,$t="",Ut="",It="",An=tests[gn],_n--;++_n<yt&&(Ft=et.charCodeAt(_n),!!An(Ft));)It+=fromCharCode(Ft),gn===name$3&&own$3.call(legacy$3,It)&&($t=It,Ut=legacy$3[It]);Rt=et.charCodeAt(_n)===semicolon,Rt&&(_n++,Ot=gn===name$3?decodeEntity(It):!1,Ot&&($t=It,Ut=Ot)),In=1+_n-Jt,!Rt&&!rt||(It?gn===name$3?(Rt&&!Ut?zt(namedUnknown,1):($t!==It&&(_n=Xt+$t.length,In=1+_n-Xt,Rt=!1),Rt||(Vt=$t?namedNotTerminated:namedEmpty,tt.attribute?(Ft=et.charCodeAt(_n),Ft===equalsTo?(zt(Vt,In),Ut=null):alphanumerical(Ft)?Ut=null:zt(Vt,In)):zt(Vt,In))),Mt=Ut):(Rt||zt(numericNotTerminated,In),Mt=parseInt(It,bases[gn]),prohibited(Mt)?(zt(numericProhibited,In),Mt=fromCharCode(replacementCharacter)):Mt in invalid?(zt(numericDisallowed,In),Mt=invalid[Mt]):(Zt="",disallowed(Mt)&&zt(numericDisallowed,In),Mt>65535&&(Mt-=65536,Zt+=fromCharCode(Mt>>>10|55296),Mt=56320|Mt&1023),Mt=Zt+fromCharCode(Mt))):gn!==name$3&&zt(numericEmpty,In)),Mt?(wn(),sn=En(),vt=_n-1,Et+=_n-Jt+1,Ct.push(Mt),Sn=En(),Sn.offset++,st&&st.call(ft,Mt,{start:sn,end:Sn},et.slice(Jt-1,_n)),sn=Sn):(It=et.slice(Jt-1,_n),At+=It,Et+=It.length,vt=_n-1)}else kt===10&&(xt++,Tt++,Et=0),kt===kt?(At+=fromCharCode(kt),Et++):wn();return Ct.join("");function En(){return{line:xt,column:Et,offset:vt+(ht.offset||0)}}function Ln(Dn,$n){var Gn=En();Gn.column+=$n,Gn.offset+=$n,ut.call(pt,messages[Dn],Gn,Dn)}function wn(){At&&(Ct.push(At),ot&&ot.call(ct,At,{start:sn,end:En()}),At="")}}function prohibited(et){return et>=55296&&et<=57343||et>1114111}function disallowed(et){return et>=1&&et<=8||et===11||et>=13&&et<=31||et>=127&&et<=159||et>=64976&&et<=65007||(et&65535)===65535||(et&65535)===65534}var xtend$2=immutable,entities=parseEntities_1,decode$1=factory$1;function factory$1(et){return nt.raw=rt,nt;function tt(st){for(var ut=et.offset,ct=st.line,ft=[];++ct&&ct in ut;)ft.push((ut[ct]||0)+1);return{start:st,indent:ft}}function nt(st,ut,ct){entities(st,{position:tt(ut),warning:ot,text:ct,reference:ct,textContext:et,referenceContext:et})}function rt(st,ut,ct){return entities(st,xtend$2(ct,{position:tt(ut),warning:ot}))}function ot(st,ut,ct){ct!==3&&et.file.message(st,ut)}}var tokenizer$1=factory;function factory(et){return tt;function tt(nt,rt){var ot=this,st=ot.offset,ut=[],ct=ot[et+"Methods"],ft=ot[et+"Tokenizers"],pt=rt.line,ht=rt.column,mt,yt,vt,Tt,Et,xt;if(!nt)return ut;for(Mt.now=$t,Mt.file=ot.file,At("");nt;){for(mt=-1,yt=ct.length,Et=!1;++mt<yt&&(Tt=ct[mt],vt=ft[Tt],!(vt&&(!vt.onlyAtStart||ot.atStart)&&(!vt.notInList||!ot.inList)&&(!vt.notInBlock||!ot.inBlock)&&(!vt.notInLink||!ot.inLink)&&(xt=nt.length,vt.apply(ot,[Mt,nt]),Et=xt!==nt.length,Et))););Et||ot.file.fail(new Error("Infinite loop"),Mt.now())}return ot.eof=$t(),ut;function At(Ft){for(var zt=-1,Vt=Ft.indexOf(`
`);Vt!==-1;)pt++,zt=Vt,Vt=Ft.indexOf(`
`,Vt+1);zt===-1?ht+=Ft.length:ht=Ft.length-zt,pt in st&&(zt!==-1?ht+=st[pt]:ht<=st[pt]&&(ht=st[pt]+1))}function Ct(){var Ft=[],zt=pt+1;return function(){for(var Vt=pt+1;zt<Vt;)Ft.push((st[zt]||0)+1),zt++;return Ft}}function $t(){var Ft={line:pt,column:ht};return Ft.offset=ot.toOffset(Ft),Ft}function Ot(Ft){this.start=Ft,this.end=$t()}function Rt(Ft){nt.slice(0,Ft.length)!==Ft&&ot.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),$t())}function It(){var Ft=$t();return zt;function zt(Vt,Zt){var Ut=Vt.position,Xt=Ut?Ut.start:Ft,Jt=[],gn=Ut&&Ut.end.line,An=Ft.line;if(Vt.position=new Ot(Xt),Ut&&Zt&&Ut.indent){if(Jt=Ut.indent,gn<An){for(;++gn<An;)Jt.push((st[gn]||0)+1);Jt.push(Ft.column)}Zt=Jt.concat(Zt)}return Vt.position.indent=Zt||[],Vt}}function kt(Ft,zt){var Vt=zt?zt.children:ut,Zt=Vt[Vt.length-1],Ut;return Zt&&Ft.type===Zt.type&&(Ft.type==="text"||Ft.type==="blockquote")&&mergeable(Zt)&&mergeable(Ft)&&(Ut=Ft.type==="text"?mergeText:mergeBlockquote,Ft=Ut.call(ot,Zt,Ft)),Ft!==Zt&&Vt.push(Ft),ot.atStart&&ut.length!==0&&ot.exitStart(),Ft}function Mt(Ft){var zt=Ct(),Vt=It(),Zt=$t();return Rt(Ft),Ut.reset=Xt,Xt.test=Jt,Ut.test=Jt,nt=nt.slice(Ft.length),At(Ft),zt=zt(),Ut;function Ut(gn,An){return Vt(kt(Vt(gn),An),zt)}function Xt(){var gn=Ut.apply(null,arguments);return pt=Zt.line,ht=Zt.column,nt=Ft+nt,gn}function Jt(){var gn=Vt({});return pt=Zt.line,ht=Zt.column,nt=Ft+nt,gn.position}}}}function mergeable(et){var tt,nt;return et.type!=="text"||!et.position?!0:(tt=et.position.start,nt=et.position.end,tt.line!==nt.line||nt.column-tt.column===et.value.length)}function mergeText(et,tt){return et.value+=tt.value,et}function mergeBlockquote(et,tt){return this.options.commonmark||this.options.gfm?tt:(et.children=et.children.concat(tt.children),et)}var markdownEscapes,hasRequiredMarkdownEscapes;function requireMarkdownEscapes(){if(hasRequiredMarkdownEscapes)return markdownEscapes;hasRequiredMarkdownEscapes=1,markdownEscapes=rt;var et=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],tt=et.concat(["~","|"]),nt=tt.concat([`
`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);rt.default=et,rt.gfm=tt,rt.commonmark=nt;function rt(ot){var st=ot||{};return st.commonmark?nt:st.gfm?tt:et}return markdownEscapes}var blockElements,hasRequiredBlockElements;function requireBlockElements(){return hasRequiredBlockElements||(hasRequiredBlockElements=1,blockElements=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]),blockElements}var defaults$1,hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,defaults$1={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:requireBlockElements()}),defaults$1}var setOptions_1,hasRequiredSetOptions;function requireSetOptions(){if(hasRequiredSetOptions)return setOptions_1;hasRequiredSetOptions=1;var et=immutable,tt=requireMarkdownEscapes(),nt=requireDefaults();setOptions_1=rt;function rt(ot){var st=this,ut=st.options,ct,ft;if(ot==null)ot={};else if(typeof ot=="object")ot=et(ot);else throw new Error("Invalid value `"+ot+"` for setting `options`");for(ct in nt){if(ft=ot[ct],ft==null&&(ft=ut[ct]),ct!=="blocks"&&typeof ft!="boolean"||ct==="blocks"&&typeof ft!="object")throw new Error("Invalid value `"+ft+"` for setting `options."+ct+"`");ot[ct]=ft}return st.options=ot,st.escape=tt(ot),st}return setOptions_1}var unistUtilVisitParents,hasRequiredUnistUtilVisitParents;function requireUnistUtilVisitParents(){if(hasRequiredUnistUtilVisitParents)return unistUtilVisitParents;hasRequiredUnistUtilVisitParents=1,unistUtilVisitParents=ot;var et=convert_1,tt=!0,nt="skip",rt=!1;ot.CONTINUE=tt,ot.SKIP=nt,ot.EXIT=rt;function ot(ut,ct,ft,pt){var ht;typeof ct=="function"&&typeof ft!="function"&&(pt=ft,ft=ct,ct=null),ht=et(ct),mt(ut,null,[]);function mt(vt,Tt,Et){var xt=[],At;return(!ct||ht(vt,Tt,Et[Et.length-1]||null))&&(xt=st(ft(vt,Et)),xt[0]===rt)?xt:vt.children&&xt[0]!==nt?(At=st(yt(vt.children,Et.concat(vt))),At[0]===rt?At:xt):xt}function yt(vt,Tt){for(var Et=-1,xt=pt?-1:1,At=(pt?vt.length:Et)+xt,Ct;At>Et&&At<vt.length;){if(Ct=mt(vt[At],At,Tt),Ct[0]===rt)return Ct;At=typeof Ct[1]=="number"?Ct[1]:At+xt}}}function st(ut){return ut!==null&&typeof ut=="object"&&"length"in ut?ut:typeof ut=="number"?[tt,ut]:[ut]}return unistUtilVisitParents}var unistUtilVisit,hasRequiredUnistUtilVisit;function requireUnistUtilVisit(){if(hasRequiredUnistUtilVisit)return unistUtilVisit;hasRequiredUnistUtilVisit=1,unistUtilVisit=ot;var et=requireUnistUtilVisitParents(),tt=et.CONTINUE,nt=et.SKIP,rt=et.EXIT;ot.CONTINUE=tt,ot.SKIP=nt,ot.EXIT=rt;function ot(st,ut,ct,ft){typeof ut=="function"&&typeof ct!="function"&&(ft=ct,ct=ut,ut=null),et(st,ut,pt,ft);function pt(ht,mt){var yt=mt[mt.length-1],vt=yt?yt.children.indexOf(ht):null;return ct(ht,vt,yt)}}return unistUtilVisit}var unistUtilRemovePosition,hasRequiredUnistUtilRemovePosition;function requireUnistUtilRemovePosition(){if(hasRequiredUnistUtilRemovePosition)return unistUtilRemovePosition;hasRequiredUnistUtilRemovePosition=1;var et=requireUnistUtilVisit();unistUtilRemovePosition=tt;function tt(ot,st){return et(ot,st?nt:rt),ot}function nt(ot){delete ot.position}function rt(ot){ot.position=void 0}return unistUtilRemovePosition}var parse_1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse_1;hasRequiredParse=1;var et=immutable,tt=requireUnistUtilRemovePosition();parse_1=ot;var nt=`
`,rt=/\r\n|\r/g;function ot(){var st=this,ut=String(st.file),ct={line:1,column:1,offset:0},ft=et(ct),pt;return ut=ut.replace(rt,nt),ut.charCodeAt(0)===65279&&(ut=ut.slice(1),ft.column++,ft.offset++),pt={type:"root",children:st.tokenizeBlock(ut,ft),position:{start:ct,end:st.eof||et(ct)}},st.options.position||tt(pt,!0),pt}return parse_1}var isWhitespaceCharacter,hasRequiredIsWhitespaceCharacter;function requireIsWhitespaceCharacter(){if(hasRequiredIsWhitespaceCharacter)return isWhitespaceCharacter;hasRequiredIsWhitespaceCharacter=1,isWhitespaceCharacter=nt;var et=String.fromCharCode,tt=/\s/;function nt(rt){return tt.test(typeof rt=="number"?et(rt):rt.charAt(0))}return isWhitespaceCharacter}var newline_1,hasRequiredNewline;function requireNewline(){if(hasRequiredNewline)return newline_1;hasRequiredNewline=1;var et=requireIsWhitespaceCharacter();newline_1=nt;var tt=`
`;function nt(rt,ot,st){var ut=ot.charAt(0),ct,ft,pt,ht;if(ut===tt){if(st)return!0;for(ht=1,ct=ot.length,ft=ut,pt="";ht<ct&&(ut=ot.charAt(ht),!!et(ut));)pt+=ut,ut===tt&&(ft+=pt,pt=""),ht++;rt(ft)}}return newline_1}var trimTrailingLines_1,hasRequiredTrimTrailingLines;function requireTrimTrailingLines(){if(hasRequiredTrimTrailingLines)return trimTrailingLines_1;hasRequiredTrimTrailingLines=1,trimTrailingLines_1=et;function et(tt){return String(tt).replace(/\n+$/,"")}return trimTrailingLines_1}var codeIndented,hasRequiredCodeIndented;function requireCodeIndented(){if(hasRequiredCodeIndented)return codeIndented;hasRequiredCodeIndented=1;var et=repeatString,tt=requireTrimTrailingLines();codeIndented=ct;var nt=`
`,rt="	",ot=" ",st=4,ut=et(ot,st);function ct(ft,pt,ht){for(var mt=-1,yt=pt.length,vt="",Tt="",Et="",xt="",At,Ct,$t;++mt<yt;)if(At=pt.charAt(mt),$t)if($t=!1,vt+=Et,Tt+=xt,Et="",xt="",At===nt)Et=At,xt=At;else for(vt+=At,Tt+=At;++mt<yt;){if(At=pt.charAt(mt),!At||At===nt){xt=At,Et=At;break}vt+=At,Tt+=At}else if(At===ot&&pt.charAt(mt+1)===At&&pt.charAt(mt+2)===At&&pt.charAt(mt+3)===At)Et+=ut,mt+=3,$t=!0;else if(At===rt)Et+=At,$t=!0;else{for(Ct="";At===rt||At===ot;)Ct+=At,At=pt.charAt(++mt);if(At!==nt)break;Et+=Ct+At,xt+=At}if(Tt)return ht?!0:ft(vt)({type:"code",lang:null,meta:null,value:tt(Tt)})}return codeIndented}var codeFenced,hasRequiredCodeFenced;function requireCodeFenced(){if(hasRequiredCodeFenced)return codeFenced;hasRequiredCodeFenced=1,codeFenced=ct;var et=`
`,tt="	",nt=" ",rt="~",ot="`",st=3,ut=4;function ct(ft,pt,ht){var mt=this,yt=mt.options.gfm,vt=pt.length+1,Tt=0,Et="",xt,At,Ct,$t,Ot,Rt,It,kt,Mt,Ft,zt,Vt,Zt;if(!!yt){for(;Tt<vt&&(Ct=pt.charAt(Tt),!(Ct!==nt&&Ct!==tt));)Et+=Ct,Tt++;if(Vt=Tt,Ct=pt.charAt(Tt),!(Ct!==rt&&Ct!==ot)){for(Tt++,At=Ct,xt=1,Et+=Ct;Tt<vt&&(Ct=pt.charAt(Tt),Ct===At);)Et+=Ct,xt++,Tt++;if(!(xt<st)){for(;Tt<vt&&(Ct=pt.charAt(Tt),!(Ct!==nt&&Ct!==tt));)Et+=Ct,Tt++;for($t="",It="";Tt<vt&&(Ct=pt.charAt(Tt),!(Ct===et||At===ot&&Ct===At));)Ct===nt||Ct===tt?It+=Ct:($t+=It+Ct,It=""),Tt++;if(Ct=pt.charAt(Tt),!(Ct&&Ct!==et)){if(ht)return!0;Zt=ft.now(),Zt.column+=Et.length,Zt.offset+=Et.length,Et+=$t,$t=mt.decode.raw(mt.unescape($t),Zt),It&&(Et+=It),It="",Ft="",zt="",kt="",Mt="";for(var Ut=!0;Tt<vt;){if(Ct=pt.charAt(Tt),kt+=Ft,Mt+=zt,Ft="",zt="",Ct!==et){kt+=Ct,zt+=Ct,Tt++;continue}for(Ut?(Et+=Ct,Ut=!1):(Ft+=Ct,zt+=Ct),It="",Tt++;Tt<vt&&(Ct=pt.charAt(Tt),Ct===nt);)It+=Ct,Tt++;if(Ft+=It,zt+=It.slice(Vt),!(It.length>=ut)){for(It="";Tt<vt&&(Ct=pt.charAt(Tt),Ct===At);)It+=Ct,Tt++;if(Ft+=It,zt+=It,!(It.length<xt)){for(It="";Tt<vt&&(Ct=pt.charAt(Tt),!(Ct!==nt&&Ct!==tt));)Ft+=Ct,zt+=Ct,Tt++;if(!Ct||Ct===et)break}}}for(Et+=kt+Ft,Tt=-1,vt=$t.length;++Tt<vt;)if(Ct=$t.charAt(Tt),Ct===nt||Ct===tt)Ot||(Ot=$t.slice(0,Tt));else if(Ot){Rt=$t.slice(Tt);break}return ft(Et)({type:"code",lang:Ot||$t||null,meta:Rt||null,value:Mt})}}}}}return codeFenced}var trim$1={exports:{}},hasRequiredTrim;function requireTrim(){return hasRequiredTrim||(hasRequiredTrim=1,function(et,tt){tt=et.exports=nt;function nt(rt){return rt.replace(/^\s*|\s*$/g,"")}tt.left=function(rt){return rt.replace(/^\s*/,"")},tt.right=function(rt){return rt.replace(/\s*$/,"")}}(trim$1,trim$1.exports)),trim$1.exports}var interrupt_1,hasRequiredInterrupt;function requireInterrupt(){if(hasRequiredInterrupt)return interrupt_1;hasRequiredInterrupt=1,interrupt_1=et;function et(tt,nt,rt,ot){for(var st=tt.length,ut=-1,ct,ft;++ut<st;)if(ct=tt[ut],ft=ct[1]||{},!(ft.pedantic!==void 0&&ft.pedantic!==rt.options.pedantic)&&!(ft.commonmark!==void 0&&ft.commonmark!==rt.options.commonmark)&&nt[ct[0]].apply(rt,ot))return!0;return!1}return interrupt_1}var blockquote_1,hasRequiredBlockquote;function requireBlockquote(){if(hasRequiredBlockquote)return blockquote_1;hasRequiredBlockquote=1;var et=requireTrim(),tt=requireInterrupt();blockquote_1=ut;var nt=`
`,rt="	",ot=" ",st=">";function ut(ct,ft,pt){for(var ht=this,mt=ht.offset,yt=ht.blockTokenizers,vt=ht.interruptBlockquote,Tt=ct.now(),Et=Tt.line,xt=ft.length,At=[],Ct=[],$t=[],Ot,Rt=0,It,kt,Mt,Ft,zt,Vt,Zt,Ut;Rt<xt&&(It=ft.charAt(Rt),!(It!==ot&&It!==rt));)Rt++;if(ft.charAt(Rt)===st){if(pt)return!0;for(Rt=0;Rt<xt;){for(Mt=ft.indexOf(nt,Rt),Vt=Rt,Zt=!1,Mt===-1&&(Mt=xt);Rt<xt&&(It=ft.charAt(Rt),!(It!==ot&&It!==rt));)Rt++;if(ft.charAt(Rt)===st?(Rt++,Zt=!0,ft.charAt(Rt)===ot&&Rt++):Rt=Vt,Ft=ft.slice(Rt,Mt),!Zt&&!et(Ft)){Rt=Vt;break}if(!Zt&&(kt=ft.slice(Rt),tt(vt,yt,ht,[ct,kt,!0])))break;zt=Vt===Rt?Ft:ft.slice(Vt,Mt),$t.push(Rt-Vt),At.push(zt),Ct.push(Ft),Rt=Mt+1}for(Rt=-1,xt=$t.length,Ot=ct(At.join(nt));++Rt<xt;)mt[Et]=(mt[Et]||0)+$t[Rt],Et++;return Ut=ht.enterBlock(),Ct=ht.tokenizeBlock(Ct.join(nt),Tt),Ut(),Ot({type:"blockquote",children:Ct})}}return blockquote_1}var headingAtx,hasRequiredHeadingAtx;function requireHeadingAtx(){if(hasRequiredHeadingAtx)return headingAtx;hasRequiredHeadingAtx=1,headingAtx=st;var et=`
`,tt="	",nt=" ",rt="#",ot=6;function st(ut,ct,ft){for(var pt=this,ht=pt.options.pedantic,mt=ct.length+1,yt=-1,vt=ut.now(),Tt="",Et="",xt,At,Ct;++yt<mt;){if(xt=ct.charAt(yt),xt!==nt&&xt!==tt){yt--;break}Tt+=xt}for(Ct=0;++yt<=mt;){if(xt=ct.charAt(yt),xt!==rt){yt--;break}Tt+=xt,Ct++}if(!(Ct>ot)&&!(!Ct||!ht&&ct.charAt(yt+1)===rt)){for(mt=ct.length+1,At="";++yt<mt;){if(xt=ct.charAt(yt),xt!==nt&&xt!==tt){yt--;break}At+=xt}if(!(!ht&&At.length===0&&xt&&xt!==et)){if(ft)return!0;for(Tt+=At,At="",Et="";++yt<mt&&(xt=ct.charAt(yt),!(!xt||xt===et));){if(xt!==nt&&xt!==tt&&xt!==rt){Et+=At+xt,At="";continue}for(;xt===nt||xt===tt;)At+=xt,xt=ct.charAt(++yt);if(!ht&&Et&&!At&&xt===rt){Et+=xt;continue}for(;xt===rt;)At+=xt,xt=ct.charAt(++yt);for(;xt===nt||xt===tt;)At+=xt,xt=ct.charAt(++yt);yt--}return vt.column+=Tt.length,vt.offset+=Tt.length,Tt+=Et+At,ut(Tt)({type:"heading",depth:Ct,children:pt.tokenizeInline(Et,vt)})}}}return headingAtx}var thematicBreak_1,hasRequiredThematicBreak;function requireThematicBreak(){if(hasRequiredThematicBreak)return thematicBreak_1;hasRequiredThematicBreak=1,thematicBreak_1=ct;var et="	",tt=`
`,nt=" ",rt="*",ot="-",st="_",ut=3;function ct(ft,pt,ht){for(var mt=-1,yt=pt.length+1,vt="",Tt,Et,xt,At;++mt<yt&&(Tt=pt.charAt(mt),!(Tt!==et&&Tt!==nt));)vt+=Tt;if(!(Tt!==rt&&Tt!==ot&&Tt!==st))for(Et=Tt,vt+=Tt,xt=1,At="";++mt<yt;)if(Tt=pt.charAt(mt),Tt===Et)xt++,vt+=At+Et,At="";else if(Tt===nt)At+=Tt;else return xt>=ut&&(!Tt||Tt===tt)?(vt+=At,ht?!0:ft(vt)({type:"thematicBreak"})):void 0}return thematicBreak_1}var getIndentation,hasRequiredGetIndentation;function requireGetIndentation(){if(hasRequiredGetIndentation)return getIndentation;hasRequiredGetIndentation=1,getIndentation=ot;var et="	",tt=" ",nt=1,rt=4;function ot(st){for(var ut=0,ct=0,ft=st.charAt(ut),pt={},ht;ft===et||ft===tt;)ht=ft===et?rt:nt,ct+=ht,ht>1&&(ct=Math.floor(ct/ht)*ht),pt[ct]=ut,ft=st.charAt(++ut);return{indent:ct,stops:pt}}return getIndentation}var removeIndentation,hasRequiredRemoveIndentation;function requireRemoveIndentation(){if(hasRequiredRemoveIndentation)return removeIndentation;hasRequiredRemoveIndentation=1;var et=requireTrim(),tt=repeatString,nt=requireGetIndentation();removeIndentation=ct;var rt="	",ot=`
`,st=" ",ut="!";function ct(ft,pt){var ht=ft.split(ot),mt=ht.length+1,yt=1/0,vt=[],Tt,Et,xt,At;for(ht.unshift(tt(st,pt)+ut);mt--;)if(Et=nt(ht[mt]),vt[mt]=Et.stops,et(ht[mt]).length!==0)if(Et.indent)Et.indent>0&&Et.indent<yt&&(yt=Et.indent);else{yt=1/0;break}if(yt!==1/0)for(mt=ht.length;mt--;){for(xt=vt[mt],Tt=yt;Tt&&!(Tt in xt);)Tt--;et(ht[mt]).length!==0&&yt&&Tt!==yt?At=rt:At="",ht[mt]=At+ht[mt].slice(Tt in xt?xt[Tt]+1:0)}return ht.shift(),ht.join(ot)}return removeIndentation}var list_1,hasRequiredList$1;function requireList$1(){if(hasRequiredList$1)return list_1;hasRequiredList$1=1;var et=requireTrim(),tt=repeatString,nt=isDecimal,rt=requireGetIndentation(),ot=requireRemoveIndentation(),st=requireInterrupt();list_1=It;var ut="*",ct="_",ft="+",pt="-",ht=".",mt=" ",yt=`
`,vt="	",Tt=")",Et="x",xt=4,At=/\n\n(?!\s*$)/,Ct=/^\[([ \t]|x|X)][ \t]/,$t=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Ot=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,Rt=/^( {1,4}|\t)?/gm;function It(zt,Vt,Zt){for(var Ut=this,Xt=Ut.options.commonmark,Jt=Ut.options.pedantic,gn=Ut.blockTokenizers,An=Ut.interruptList,sn=0,Sn=Vt.length,In=null,_n=0,En,Ln,wn,Dn,$n,Gn,Jn,zn,Qn,Bn,jn,Ar,Er,Pr,Nr,Ir,no,ro,ao=!1,Xr,Jr,So,va;sn<Sn;){if(wn=Vt.charAt(sn),wn===vt)_n+=xt-_n%xt;else if(wn===mt)_n++;else break;sn++}if(!(_n>=xt)){if(wn=Vt.charAt(sn),wn===ut||wn===ft||wn===pt)Dn=wn,Ln=!1;else{for(Ln=!0,En="";sn<Sn&&(wn=Vt.charAt(sn),!!nt(wn));)En+=wn,sn++;if(wn=Vt.charAt(sn),!En||!(wn===ht||Xt&&wn===Tt))return;In=parseInt(En,10),Dn=wn}if(wn=Vt.charAt(++sn),!(wn!==mt&&wn!==vt&&(Jt||wn!==yt&&wn!==""))){if(Zt)return!0;for(sn=0,Er=[],Pr=[],Nr=[];sn<Sn;){for($n=Vt.indexOf(yt,sn),Gn=sn,Jn=!1,va=!1,$n===-1&&($n=Sn),So=sn+xt,_n=0;sn<Sn;){if(wn=Vt.charAt(sn),wn===vt)_n+=xt-_n%xt;else if(wn===mt)_n++;else break;sn++}if(_n>=xt&&(va=!0),Ir&&_n>=Ir.indent&&(va=!0),wn=Vt.charAt(sn),zn=null,!va){if(wn===ut||wn===ft||wn===pt)zn=wn,sn++,_n++;else{for(En="";sn<Sn&&(wn=Vt.charAt(sn),!!nt(wn));)En+=wn,sn++;wn=Vt.charAt(sn),sn++,En&&(wn===ht||Xt&&wn===Tt)&&(zn=wn,_n+=En.length+1)}if(zn)if(wn=Vt.charAt(sn),wn===vt)_n+=xt-_n%xt,sn++;else if(wn===mt){for(So=sn+xt;sn<So&&Vt.charAt(sn)===mt;)sn++,_n++;sn===So&&Vt.charAt(sn)===mt&&(sn-=xt-1,_n-=xt-1)}else wn!==yt&&wn!==""&&(zn=null)}if(zn){if(!Jt&&Dn!==zn)break;Jn=!0}else!Xt&&!va&&Vt.charAt(Gn)===mt?va=!0:Xt&&Ir&&(va=_n>=Ir.indent||_n>xt),Jn=!1,sn=Gn;if(Bn=Vt.slice(Gn,$n),Qn=Gn===sn?Bn:Vt.slice(sn,$n),(zn===ut||zn===ct||zn===pt)&&gn.thematicBreak.call(Ut,zt,Bn,!0))break;if(jn=Ar,Ar=!Jn&&!et(Qn).length,va&&Ir)Ir.value=Ir.value.concat(Nr,Bn),Pr=Pr.concat(Nr,Bn),Nr=[];else if(Jn)Nr.length!==0&&(ao=!0,Ir.value.push(""),Ir.trail=Nr.concat()),Ir={value:[Bn],indent:_n,trail:[]},Er.push(Ir),Pr=Pr.concat(Nr,Bn),Nr=[];else if(Ar){if(jn&&!Xt)break;Nr.push(Bn)}else{if(jn||st(An,gn,Ut,[zt,Bn,!0]))break;Ir.value=Ir.value.concat(Nr,Bn),Pr=Pr.concat(Nr,Bn),Nr=[]}sn=$n+1}for(Xr=zt(Pr.join(yt)).reset({type:"list",ordered:Ln,start:In,spread:ao,children:[]}),no=Ut.enterList(),ro=Ut.enterBlock(),sn=-1,Sn=Er.length;++sn<Sn;)Ir=Er[sn].value.join(yt),Jr=zt.now(),zt(Ir)(kt(Ut,Ir,Jr),Xr),Ir=Er[sn].trail.join(yt),sn!==Sn-1&&(Ir+=yt),zt(Ir);return no(),ro(),Xr}}}function kt(zt,Vt,Zt){var Ut=zt.offset,Xt=zt.options.pedantic?Mt:Ft,Jt=null,gn,An;return Vt=Xt.apply(null,arguments),zt.options.gfm&&(gn=Vt.match(Ct),gn&&(An=gn[0].length,Jt=gn[1].toLowerCase()===Et,Ut[Zt.line]+=An,Vt=Vt.slice(An))),{type:"listItem",spread:At.test(Vt),checked:Jt,children:zt.tokenizeBlock(Vt,Zt)}}function Mt(zt,Vt,Zt){var Ut=zt.offset,Xt=Zt.line;return Vt=Vt.replace(Ot,Jt),Xt=Zt.line,Vt.replace(Rt,Jt);function Jt(gn){return Ut[Xt]=(Ut[Xt]||0)+gn.length,Xt++,""}}function Ft(zt,Vt,Zt){var Ut=zt.offset,Xt=Zt.line,Jt,gn,An,sn,Sn,In,_n;for(Vt=Vt.replace($t,En),sn=Vt.split(yt),Sn=ot(Vt,rt(Jt).indent).split(yt),Sn[0]=An,Ut[Xt]=(Ut[Xt]||0)+gn.length,Xt++,In=0,_n=sn.length;++In<_n;)Ut[Xt]=(Ut[Xt]||0)+sn[In].length-Sn[In].length,Xt++;return Sn.join(yt);function En(Ln,wn,Dn,$n,Gn){return gn=wn+Dn+$n,An=Gn,Number(Dn)<10&&gn.length%2===1&&(Dn=mt+Dn),Jt=wn+tt(mt,Dn.length)+$n,Jt+An}}return list_1}var headingSetext,hasRequiredHeadingSetext;function requireHeadingSetext(){if(hasRequiredHeadingSetext)return headingSetext;hasRequiredHeadingSetext=1,headingSetext=ft;var et=`
`,tt="	",nt=" ",rt="=",ot="-",st=3,ut=1,ct=2;function ft(pt,ht,mt){for(var yt=this,vt=pt.now(),Tt=ht.length,Et=-1,xt="",At,Ct,$t,Ot,Rt;++Et<Tt;){if($t=ht.charAt(Et),$t!==nt||Et>=st){Et--;break}xt+=$t}for(At="",Ct="";++Et<Tt;){if($t=ht.charAt(Et),$t===et){Et--;break}$t===nt||$t===tt?Ct+=$t:(At+=Ct+$t,Ct="")}if(vt.column+=xt.length,vt.offset+=xt.length,xt+=At+Ct,$t=ht.charAt(++Et),Ot=ht.charAt(++Et),!($t!==et||Ot!==rt&&Ot!==ot)){for(xt+=$t,Ct=Ot,Rt=Ot===rt?ut:ct;++Et<Tt;){if($t=ht.charAt(Et),$t!==Ot){if($t!==et)return;Et--;break}Ct+=$t}return mt?!0:pt(xt+Ct)({type:"heading",depth:Rt,children:yt.tokenizeInline(At,vt)})}}return headingSetext}var html$1={},hasRequiredHtml;function requireHtml(){if(hasRequiredHtml)return html$1;hasRequiredHtml=1;var et="[a-zA-Z_:][a-zA-Z0-9:._-]*",tt="[^\"'=<>`\\u0000-\\u0020]+",nt="'[^']*'",rt='"[^"]*"',ot="(?:"+tt+"|"+nt+"|"+rt+")",st="(?:\\s+"+et+"(?:\\s*=\\s*"+ot+")?)",ut="<[A-Za-z][A-Za-z0-9\\-]*"+st+"*\\s*\\/?>",ct="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ft="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",pt="<[?].*?[?]>",ht="<![A-Za-z]+\\s+[^>]*>",mt="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";return html$1.openCloseTag=new RegExp("^(?:"+ut+"|"+ct+")"),html$1.tag=new RegExp("^(?:"+ut+"|"+ct+"|"+ft+"|"+pt+"|"+ht+"|"+mt+")"),html$1}var htmlBlock,hasRequiredHtmlBlock;function requireHtmlBlock(){if(hasRequiredHtmlBlock)return htmlBlock;hasRequiredHtmlBlock=1;var et=requireHtml().openCloseTag;htmlBlock=At;var tt="	",nt=" ",rt=`
`,ot="<",st=/^<(script|pre|style)(?=(\s|>|$))/i,ut=/<\/(script|pre|style)>/i,ct=/^<!--/,ft=/-->/,pt=/^<\?/,ht=/\?>/,mt=/^<![A-Za-z]/,yt=/>/,vt=/^<!\[CDATA\[/,Tt=/\]\]>/,Et=/^$/,xt=new RegExp(et.source+"\\s*$");function At(Ct,$t,Ot){for(var Rt=this,It=Rt.options.blocks.join("|"),kt=new RegExp("^</?("+It+")(?=(\\s|/?>|$))","i"),Mt=$t.length,Ft=0,zt,Vt,Zt,Ut,Xt,Jt,gn,An=[[st,ut,!0],[ct,ft,!0],[pt,ht,!0],[mt,yt,!0],[vt,Tt,!0],[kt,Et,!0],[xt,Et,!1]];Ft<Mt&&(Ut=$t.charAt(Ft),!(Ut!==tt&&Ut!==nt));)Ft++;if($t.charAt(Ft)===ot){for(zt=$t.indexOf(rt,Ft+1),zt=zt===-1?Mt:zt,Vt=$t.slice(Ft,zt),Zt=-1,Xt=An.length;++Zt<Xt;)if(An[Zt][0].test(Vt)){Jt=An[Zt];break}if(!!Jt){if(Ot)return Jt[2];if(Ft=zt,!Jt[1].test(Vt))for(;Ft<Mt;){if(zt=$t.indexOf(rt,Ft+1),zt=zt===-1?Mt:zt,Vt=$t.slice(Ft+1,zt),Jt[1].test(Vt)){Vt&&(Ft=zt);break}Ft=zt}return gn=$t.slice(0,Ft),Ct(gn)({type:"html",value:gn})}}}return htmlBlock}var collapseWhiteSpace,hasRequiredCollapseWhiteSpace;function requireCollapseWhiteSpace(){if(hasRequiredCollapseWhiteSpace)return collapseWhiteSpace;hasRequiredCollapseWhiteSpace=1,collapseWhiteSpace=et;function et(tt){return String(tt).replace(/\s+/g," ")}return collapseWhiteSpace}var normalize_1,hasRequiredNormalize;function requireNormalize(){if(hasRequiredNormalize)return normalize_1;hasRequiredNormalize=1;var et=requireCollapseWhiteSpace();normalize_1=tt;function tt(nt){return et(nt).toLowerCase()}return normalize_1}var footnoteDefinition_1,hasRequiredFootnoteDefinition;function requireFootnoteDefinition(){if(hasRequiredFootnoteDefinition)return footnoteDefinition_1;hasRequiredFootnoteDefinition=1;var et=requireIsWhitespaceCharacter(),tt=requireNormalize();footnoteDefinition_1=mt,mt.notInList=!0,mt.notInBlock=!0;var nt="\\",rt=`
`,ot="	",st=" ",ut="[",ct="]",ft="^",pt=":",ht=/^( {4}|\t)?/gm;function mt(yt,vt,Tt){var Et=this,xt=Et.offset,At,Ct,$t,Ot,Rt,It,kt,Mt,Ft,zt,Vt,Zt;if(!!Et.options.footnotes){for(At=0,Ct=vt.length,$t="",Ot=yt.now(),Rt=Ot.line;At<Ct&&(Ft=vt.charAt(At),!!et(Ft));)$t+=Ft,At++;if(!(vt.charAt(At)!==ut||vt.charAt(At+1)!==ft)){for($t+=ut+ft,At=$t.length,kt="";At<Ct&&(Ft=vt.charAt(At),Ft!==ct);)Ft===nt&&(kt+=Ft,At++,Ft=vt.charAt(At)),kt+=Ft,At++;if(!(!kt||vt.charAt(At)!==ct||vt.charAt(At+1)!==pt)){if(Tt)return!0;for(zt=kt,$t+=kt+ct+pt,At=$t.length;At<Ct&&(Ft=vt.charAt(At),!(Ft!==ot&&Ft!==st));)$t+=Ft,At++;for(Ot.column+=$t.length,Ot.offset+=$t.length,kt="",It="",Mt="";At<Ct;){if(Ft=vt.charAt(At),Ft===rt){for(Mt=Ft,At++;At<Ct&&(Ft=vt.charAt(At),Ft===rt);)Mt+=Ft,At++;for(kt+=Mt,Mt="";At<Ct&&(Ft=vt.charAt(At),Ft===st);)Mt+=Ft,At++;if(Mt.length===0)break;kt+=Mt}kt&&(It+=kt,kt=""),It+=Ft,At++}return $t+=It,It=It.replace(ht,function(Ut){return xt[Rt]=(xt[Rt]||0)+Ut.length,Rt++,""}),Vt=yt($t),Zt=Et.enterBlock(),It=Et.tokenizeBlock(It,Ot),Zt(),Vt({type:"footnoteDefinition",identifier:tt(zt),label:zt,children:It})}}}}return footnoteDefinition_1}var definition_1,hasRequiredDefinition;function requireDefinition(){if(hasRequiredDefinition)return definition_1;hasRequiredDefinition=1;var et=requireIsWhitespaceCharacter(),tt=requireNormalize();definition_1=Et;var nt='"',rt="'",ot="\\",st=`
`,ut="	",ct=" ",ft="[",pt="]",ht="(",mt=")",yt=":",vt="<",Tt=">";function Et(Ct,$t,Ot){for(var Rt=this,It=Rt.options.commonmark,kt=0,Mt=$t.length,Ft="",zt,Vt,Zt,Ut,Xt,Jt,gn,An;kt<Mt&&(Ut=$t.charAt(kt),!(Ut!==ct&&Ut!==ut));)Ft+=Ut,kt++;if(Ut=$t.charAt(kt),Ut===ft){for(kt++,Ft+=Ut,Zt="";kt<Mt&&(Ut=$t.charAt(kt),Ut!==pt);)Ut===ot&&(Zt+=Ut,kt++,Ut=$t.charAt(kt)),Zt+=Ut,kt++;if(!(!Zt||$t.charAt(kt)!==pt||$t.charAt(kt+1)!==yt)){for(Jt=Zt,Ft+=Zt+pt+yt,kt=Ft.length,Zt="";kt<Mt&&(Ut=$t.charAt(kt),!(Ut!==ut&&Ut!==ct&&Ut!==st));)Ft+=Ut,kt++;if(Ut=$t.charAt(kt),Zt="",zt=Ft,Ut===vt){for(kt++;kt<Mt&&(Ut=$t.charAt(kt),!!xt(Ut));)Zt+=Ut,kt++;if(Ut=$t.charAt(kt),Ut===xt.delimiter)Ft+=vt+Zt+Ut,kt++;else{if(It)return;kt-=Zt.length+1,Zt=""}}if(!Zt){for(;kt<Mt&&(Ut=$t.charAt(kt),!!At(Ut));)Zt+=Ut,kt++;Ft+=Zt}if(!!Zt){for(gn=Zt,Zt="";kt<Mt&&(Ut=$t.charAt(kt),!(Ut!==ut&&Ut!==ct&&Ut!==st));)Zt+=Ut,kt++;if(Ut=$t.charAt(kt),Xt=null,Ut===nt?Xt=nt:Ut===rt?Xt=rt:Ut===ht&&(Xt=mt),!Xt)Zt="",kt=Ft.length;else if(Zt){for(Ft+=Zt+Ut,kt=Ft.length,Zt="";kt<Mt&&(Ut=$t.charAt(kt),Ut!==Xt);){if(Ut===st){if(kt++,Ut=$t.charAt(kt),Ut===st||Ut===Xt)return;Zt+=st}Zt+=Ut,kt++}if(Ut=$t.charAt(kt),Ut!==Xt)return;Vt=Ft,Ft+=Zt+Ut,kt++,An=Zt,Zt=""}else return;for(;kt<Mt&&(Ut=$t.charAt(kt),!(Ut!==ut&&Ut!==ct));)Ft+=Ut,kt++;if(Ut=$t.charAt(kt),!Ut||Ut===st)return Ot?!0:(zt=Ct(zt).test().end,gn=Rt.decode.raw(Rt.unescape(gn),zt,{nonTerminated:!1}),An&&(Vt=Ct(Vt).test().end,An=Rt.decode.raw(Rt.unescape(An),Vt)),Ct(Ft)({type:"definition",identifier:tt(Jt),label:Jt,title:An||null,url:gn}))}}}}function xt(Ct){return Ct!==Tt&&Ct!==ft&&Ct!==pt}xt.delimiter=Tt;function At(Ct){return Ct!==ft&&Ct!==pt&&!et(Ct)}return definition_1}var table_1,hasRequiredTable$1;function requireTable$1(){if(hasRequiredTable$1)return table_1;hasRequiredTable$1=1;var et=requireIsWhitespaceCharacter();table_1=vt;var tt="	",nt=`
`,rt=" ",ot="-",st=":",ut="\\",ct="|",ft=1,pt=2,ht="left",mt="center",yt="right";function vt(Tt,Et,xt){var At=this,Ct,$t,Ot,Rt,It,kt,Mt,Ft,zt,Vt,Zt,Ut,Xt,Jt,gn,An,sn,Sn,In,_n,En,Ln;if(!!At.options.gfm){for(Ct=0,An=0,kt=Et.length+1,Mt=[];Ct<kt;){if(_n=Et.indexOf(nt,Ct),En=Et.indexOf(ct,Ct+1),_n===-1&&(_n=Et.length),En===-1||En>_n){if(An<pt)return;break}Mt.push(Et.slice(Ct,_n)),An++,Ct=_n+1}for(Rt=Mt.join(nt),$t=Mt.splice(1,1)[0]||[],Ct=0,kt=$t.length,An--,Ot=!1,Zt=[];Ct<kt;){if(zt=$t.charAt(Ct),zt===ct){if(Vt=null,Ot===!1){if(Ln===!1)return}else Zt.push(Ot),Ot=!1;Ln=!1}else if(zt===ot)Vt=!0,Ot=Ot||null;else if(zt===st)Ot===ht?Ot=mt:Vt&&Ot===null?Ot=yt:Ot=ht;else if(!et(zt))return;Ct++}if(Ot!==!1&&Zt.push(Ot),!(Zt.length<ft)){if(xt)return!0;for(gn=-1,Sn=[],In=Tt(Rt).reset({type:"table",align:Zt,children:Sn});++gn<An;){for(sn=Mt[gn],It={type:"tableRow",children:[]},gn&&Tt(nt),Tt(sn).reset(It,In),kt=sn.length+1,Ct=0,Ft="",Ut="",Xt=!0;Ct<kt;){if(zt=sn.charAt(Ct),zt===tt||zt===rt){Ut?Ft+=zt:Tt(zt),Ct++;continue}zt===""||zt===ct?Xt?Tt(zt):((Ut||zt)&&!Xt&&(Rt=Ut,Ft.length>1&&(zt?(Rt+=Ft.slice(0,Ft.length-1),Ft=Ft.charAt(Ft.length-1)):(Rt+=Ft,Ft="")),Jt=Tt.now(),Tt(Rt)({type:"tableCell",children:At.tokenizeInline(Ut,Jt)},It)),Tt(Ft+zt),Ft="",Ut=""):(Ft&&(Ut+=Ft,Ft=""),Ut+=zt,zt===ut&&Ct!==kt-2&&(Ut+=sn.charAt(Ct+1),Ct++)),Xt=!1,Ct++}gn||Tt(nt+$t)}return In}}}return table_1}var paragraph_1,hasRequiredParagraph;function requireParagraph(){if(hasRequiredParagraph)return paragraph_1;hasRequiredParagraph=1;var et=requireTrim(),tt=isDecimal,nt=requireTrimTrailingLines(),rt=requireInterrupt();paragraph_1=ft;var ot="	",st=`
`,ut=" ",ct=4;function ft(pt,ht,mt){for(var yt=this,vt=yt.options,Tt=vt.commonmark,Et=vt.gfm,xt=yt.blockTokenizers,At=yt.interruptParagraph,Ct=ht.indexOf(st),$t=ht.length,Ot,Rt,It,kt,Mt;Ct<$t;){if(Ct===-1){Ct=$t;break}if(ht.charAt(Ct+1)===st)break;if(Tt){for(kt=0,Ot=Ct+1;Ot<$t;){if(It=ht.charAt(Ot),It===ot){kt=ct;break}else if(It===ut)kt++;else break;Ot++}if(kt>=ct&&It!==st){Ct=ht.indexOf(st,Ct+1);continue}}if(Rt=ht.slice(Ct+1),rt(At,xt,yt,[pt,Rt,!0])||xt.list.call(yt,pt,Rt,!0)&&(yt.inList||Tt||Et&&!tt(et.left(Rt).charAt(0))))break;if(Ot=Ct,Ct=ht.indexOf(st,Ct+1),Ct!==-1&&et(ht.slice(Ot,Ct))===""){Ct=Ot;break}}return Rt=ht.slice(0,Ct),et(Rt)===""?(pt(Rt),null):mt?!0:(Mt=pt.now(),Rt=nt(Rt),pt(Rt)({type:"paragraph",children:yt.tokenizeInline(Rt,Mt)}))}return paragraph_1}var _escape$1,hasRequired_escape$1;function require_escape$1(){if(hasRequired_escape$1)return _escape$1;hasRequired_escape$1=1,_escape$1=et;function et(tt,nt){return tt.indexOf("\\",nt)}return _escape$1}var _escape,hasRequired_escape;function require_escape(){if(hasRequired_escape)return _escape;hasRequired_escape=1;var et=require_escape$1();_escape=rt,rt.locator=et;var tt=`
`,nt="\\";function rt(ot,st,ut){var ct=this,ft,pt;if(st.charAt(0)===nt&&(ft=st.charAt(1),ct.escape.indexOf(ft)!==-1))return ut?!0:(ft===tt?pt={type:"break"}:pt={type:"text",value:ft},ot(nt+ft)(pt))}return _escape}var tag,hasRequiredTag;function requireTag(){if(hasRequiredTag)return tag;hasRequiredTag=1,tag=et;function et(tt,nt){return tt.indexOf("<",nt)}return tag}var autoLink_1,hasRequiredAutoLink;function requireAutoLink(){if(hasRequiredAutoLink)return autoLink_1;hasRequiredAutoLink=1;var et=requireIsWhitespaceCharacter(),tt=parseEntities_1,nt=requireTag();autoLink_1=pt,pt.locator=nt,pt.notInLink=!0;var rt="<",ot=">",st="@",ut="/",ct="mailto:",ft=ct.length;function pt(ht,mt,yt){var vt=this,Tt="",Et=mt.length,xt=0,At="",Ct=!1,$t="",Ot,Rt,It,kt,Mt;if(mt.charAt(0)===rt){for(xt++,Tt=rt;xt<Et&&(Ot=mt.charAt(xt),!(et(Ot)||Ot===ot||Ot===st||Ot===":"&&mt.charAt(xt+1)===ut));)At+=Ot,xt++;if(!!At){if($t+=At,At="",Ot=mt.charAt(xt),$t+=Ot,xt++,Ot===st)Ct=!0;else{if(Ot!==":"||mt.charAt(xt+1)!==ut)return;$t+=ut,xt++}for(;xt<Et&&(Ot=mt.charAt(xt),!(et(Ot)||Ot===ot));)At+=Ot,xt++;if(Ot=mt.charAt(xt),!(!At||Ot!==ot))return yt?!0:($t+=At,It=$t,Tt+=$t+Ot,Rt=ht.now(),Rt.column++,Rt.offset++,Ct&&($t.slice(0,ft).toLowerCase()===ct?(It=It.slice(ft),Rt.column+=ft,Rt.offset+=ft):$t=ct+$t),kt=vt.inlineTokenizers,vt.inlineTokenizers={text:kt.text},Mt=vt.enterLink(),It=vt.tokenizeInline(It,Rt),vt.inlineTokenizers=kt,Mt(),ht(Tt)({type:"link",title:null,url:tt($t,{nonTerminated:!1}),children:It}))}}}return autoLink_1}var url,hasRequiredUrl$1;function requireUrl$1(){if(hasRequiredUrl$1)return url;hasRequiredUrl$1=1,url=tt;var et=["https://","http://","mailto:"];function tt(nt,rt){var ot=et.length,st=-1,ut=-1,ct;if(!this.options.gfm)return-1;for(;++st<ot;)ct=nt.indexOf(et[st],rt),ct!==-1&&(ct<ut||ut===-1)&&(ut=ct);return ut}return url}var url_1,hasRequiredUrl;function requireUrl(){if(hasRequiredUrl)return url_1;hasRequiredUrl=1;var et=parseEntities_1,tt=requireIsWhitespaceCharacter(),nt=requireUrl$1();url_1=Ot,Ot.locator=nt,Ot.notInLink=!0;var rt='"',ot="'",st="(",ut=")",ct=",",ft=".",pt=":",ht=";",mt="<",yt="@",vt="[",Tt="]",Et="http://",xt="https://",At="mailto:",Ct=[Et,xt,At],$t=Ct.length;function Ot(Rt,It,kt){var Mt=this,Ft,zt,Vt,Zt,Ut,Xt,Jt,gn,An,sn,Sn,In,_n;if(!!Mt.options.gfm){for(Ft="",Zt=-1;++Zt<$t;)if(Xt=Ct[Zt],Jt=It.slice(0,Xt.length),Jt.toLowerCase()===Xt){Ft=Jt;break}if(!!Ft){for(Zt=Ft.length,gn=It.length,An="",sn=0;Zt<gn&&(Vt=It.charAt(Zt),!(tt(Vt)||Vt===mt||(Vt===ft||Vt===ct||Vt===pt||Vt===ht||Vt===rt||Vt===ot||Vt===ut||Vt===Tt)&&(Sn=It.charAt(Zt+1),!Sn||tt(Sn))||((Vt===st||Vt===vt)&&sn++,(Vt===ut||Vt===Tt)&&(sn--,sn<0))));)An+=Vt,Zt++;if(!!An){if(Ft+=An,zt=Ft,Xt===At){if(Ut=An.indexOf(yt),Ut===-1||Ut===gn-1)return;zt=zt.slice(At.length)}return kt?!0:(_n=Mt.enterLink(),In=Mt.inlineTokenizers,Mt.inlineTokenizers={text:In.text},zt=Mt.tokenizeInline(zt,Rt.now()),Mt.inlineTokenizers=In,_n(),Rt(Ft)({type:"link",title:null,url:et(Ft,{nonTerminated:!1}),children:zt}))}}}}return url_1}var htmlInline,hasRequiredHtmlInline;function requireHtmlInline(){if(hasRequiredHtmlInline)return htmlInline;hasRequiredHtmlInline=1;var et=requireIsAlphabetical(),tt=requireTag(),nt=requireHtml().tag;htmlInline=pt,pt.locator=tt;var rt="<",ot="?",st="!",ut="/",ct=/^<a /i,ft=/^<\/a>/i;function pt(ht,mt,yt){var vt=this,Tt=mt.length,Et,xt;if(!(mt.charAt(0)!==rt||Tt<3)&&(Et=mt.charAt(1),!(!et(Et)&&Et!==ot&&Et!==st&&Et!==ut)&&(xt=mt.match(nt),!!xt)))return yt?!0:(xt=xt[0],!vt.inLink&&ct.test(xt)?vt.inLink=!0:vt.inLink&&ft.test(xt)&&(vt.inLink=!1),ht(xt)({type:"html",value:xt}))}return htmlInline}var link$3,hasRequiredLink$1;function requireLink$1(){if(hasRequiredLink$1)return link$3;hasRequiredLink$1=1,link$3=et;function et(tt,nt){var rt=tt.indexOf("[",nt),ot=tt.indexOf("![",nt);return ot===-1||rt<ot?rt:ot}return link$3}var link_1,hasRequiredLink;function requireLink(){if(hasRequiredLink)return link_1;hasRequiredLink=1;var et=requireIsWhitespaceCharacter(),tt=requireLink$1();link_1=Tt,Tt.locator=tt;var nt=`
`,rt="!",ot='"',st="'",ut="(",ct=")",ft="<",pt=">",ht="[",mt="\\",yt="]",vt="`";function Tt(Et,xt,At){var Ct=this,$t="",Ot=0,Rt=xt.charAt(0),It=Ct.options.pedantic,kt=Ct.options.commonmark,Mt=Ct.options.gfm,Ft,zt,Vt,Zt,Ut,Xt,Jt,gn,An,sn,Sn,In,_n,En,Ln,wn,Dn,$n;if(Rt===rt&&(gn=!0,$t=Rt,Rt=xt.charAt(++Ot)),Rt===ht&&!(!gn&&Ct.inLink)){for($t+=Rt,En="",Ot++,Sn=xt.length,wn=Et.now(),_n=0,wn.column+=Ot,wn.offset+=Ot;Ot<Sn;){if(Rt=xt.charAt(Ot),Xt=Rt,Rt===vt){for(zt=1;xt.charAt(Ot+1)===vt;)Xt+=Rt,Ot++,zt++;Vt?zt>=Vt&&(Vt=0):Vt=zt}else if(Rt===mt)Ot++,Xt+=xt.charAt(Ot);else if((!Vt||Mt)&&Rt===ht)_n++;else if((!Vt||Mt)&&Rt===yt)if(_n)_n--;else{if(!It)for(;Ot<Sn&&(Rt=xt.charAt(Ot+1),!!et(Rt));)Xt+=Rt,Ot++;if(xt.charAt(Ot+1)!==ut)return;Xt+=ut,Ft=!0,Ot++;break}En+=Xt,Xt="",Ot++}if(!!Ft){for(An=En,$t+=En+Xt,Ot++;Ot<Sn&&(Rt=xt.charAt(Ot),!!et(Rt));)$t+=Rt,Ot++;if(Rt=xt.charAt(Ot),En="",Zt=$t,Rt===ft){for(Ot++,Zt+=ft;Ot<Sn&&(Rt=xt.charAt(Ot),Rt!==pt);){if(kt&&Rt===nt)return;En+=Rt,Ot++}if(xt.charAt(Ot)!==pt)return;$t+=ft+En+pt,Ln=En,Ot++}else{for(Rt=null,Xt="";Ot<Sn&&(Rt=xt.charAt(Ot),!(Xt&&(Rt===ot||Rt===st||kt&&Rt===ut)));){if(et(Rt)){if(!It)break;Xt+=Rt}else{if(Rt===ut)_n++;else if(Rt===ct){if(_n===0)break;_n--}En+=Xt,Xt="",Rt===mt&&(En+=mt,Rt=xt.charAt(++Ot)),En+=Rt}Ot++}$t+=En,Ln=En,Ot=$t.length}for(En="";Ot<Sn&&(Rt=xt.charAt(Ot),!!et(Rt));)En+=Rt,Ot++;if(Rt=xt.charAt(Ot),$t+=En,En&&(Rt===ot||Rt===st||kt&&Rt===ut))if(Ot++,$t+=Rt,En="",sn=Rt===ut?ct:Rt,Ut=$t,kt){for(;Ot<Sn&&(Rt=xt.charAt(Ot),Rt!==sn);)Rt===mt&&(En+=mt,Rt=xt.charAt(++Ot)),Ot++,En+=Rt;if(Rt=xt.charAt(Ot),Rt!==sn)return;for(In=En,$t+=En+Rt,Ot++;Ot<Sn&&(Rt=xt.charAt(Ot),!!et(Rt));)$t+=Rt,Ot++}else for(Xt="";Ot<Sn;){if(Rt=xt.charAt(Ot),Rt===sn)Jt&&(En+=sn+Xt,Xt=""),Jt=!0;else if(!Jt)En+=Rt;else if(Rt===ct){$t+=En+sn+Xt,In=En;break}else et(Rt)?Xt+=Rt:(En+=sn+Xt+Rt,Xt="",Jt=!1);Ot++}if(xt.charAt(Ot)===ct)return At?!0:($t+=ct,Ln=Ct.decode.raw(Ct.unescape(Ln),Et(Zt).test().end,{nonTerminated:!1}),In&&(Ut=Et(Ut).test().end,In=Ct.decode.raw(Ct.unescape(In),Ut)),$n={type:gn?"image":"link",title:In||null,url:Ln},gn?$n.alt=Ct.decode.raw(Ct.unescape(An),wn)||null:(Dn=Ct.enterLink(),$n.children=Ct.tokenizeInline(An,wn),Dn()),Et($t)($n))}}}return link_1}var reference_1,hasRequiredReference;function requireReference(){if(hasRequiredReference)return reference_1;hasRequiredReference=1;var et=requireIsWhitespaceCharacter(),tt=requireLink$1(),nt=requireNormalize();reference_1=Et,Et.locator=tt;var rt="link",ot="image",st="footnote",ut="shortcut",ct="collapsed",ft="full",pt=" ",ht="!",mt="[",yt="\\",vt="]",Tt="^";function Et(xt,At,Ct){var $t=this,Ot=$t.options.commonmark,Rt=$t.options.footnotes,It=At.charAt(0),kt=0,Mt=At.length,Ft="",zt="",Vt=rt,Zt=ut,Ut,Xt,Jt,gn,An,sn,Sn,In;if(It===ht&&(Vt=ot,zt=It,It=At.charAt(++kt)),It===mt){if(kt++,zt+=It,sn="",Rt&&At.charAt(kt)===Tt){if(Vt===ot)return;zt+=Tt,kt++,Vt=st}for(In=0;kt<Mt;){if(It=At.charAt(kt),It===mt)Sn=!0,In++;else if(It===vt){if(!In)break;In--}It===yt&&(sn+=yt,It=At.charAt(++kt)),sn+=It,kt++}if(Ft=sn,Ut=sn,It=At.charAt(kt),It===vt){if(kt++,Ft+=It,sn="",!Ot)for(;kt<Mt&&(It=At.charAt(kt),!!et(It));)sn+=It,kt++;if(It=At.charAt(kt),Vt!==st&&It===mt&&(!Rt||At.charAt(kt+1)!==Tt)){for(Xt="",sn+=It,kt++;kt<Mt&&(It=At.charAt(kt),!(It===mt||It===vt));)It===yt&&(Xt+=yt,It=At.charAt(++kt)),Xt+=It,kt++;It=At.charAt(kt),It===vt?(Zt=Xt?ft:ct,sn+=Xt+It,kt++):Xt="",Ft+=sn,sn=""}else{if(!Ut)return;Xt=Ut}if(!(Zt!==ft&&Sn))return Ft=zt+Ft,Vt===rt&&$t.inLink?null:Ct?!0:Vt===st&&Ut.indexOf(pt)!==-1?xt(Ft)({type:st,children:this.tokenizeInline(Ut,xt.now())}):(Jt=xt.now(),Jt.column+=zt.length,Jt.offset+=zt.length,Xt=Zt===ft?Xt:Ut,gn={type:Vt+"Reference",identifier:nt(Xt),label:Xt},(Vt===rt||Vt===ot)&&(gn.referenceType=Zt),Vt===rt?(An=$t.enterLink(),gn.children=$t.tokenizeInline(Ut,Jt),An()):Vt===ot&&(gn.alt=$t.decode.raw($t.unescape(Ut),Jt)||null),xt(Ft)(gn))}}}return reference_1}var strong$1,hasRequiredStrong$1;function requireStrong$1(){if(hasRequiredStrong$1)return strong$1;hasRequiredStrong$1=1,strong$1=et;function et(tt,nt){var rt=tt.indexOf("**",nt),ot=tt.indexOf("__",nt);return ot===-1?rt:rt===-1||ot<rt?ot:rt}return strong$1}var strong_1,hasRequiredStrong;function requireStrong(){if(hasRequiredStrong)return strong_1;hasRequiredStrong=1;var et=requireTrim(),tt=requireIsWhitespaceCharacter(),nt=requireStrong$1();strong_1=ut,ut.locator=nt;var rt="\\",ot="*",st="_";function ut(ct,ft,pt){var ht=this,mt=0,yt=ft.charAt(mt),vt,Tt,Et,xt,At,Ct,$t;if(!(yt!==ot&&yt!==st||ft.charAt(++mt)!==yt)&&(Tt=ht.options.pedantic,Et=yt,At=Et+Et,Ct=ft.length,mt++,xt="",yt="",!(Tt&&tt(ft.charAt(mt)))))for(;mt<Ct;){if($t=yt,yt=ft.charAt(mt),yt===Et&&ft.charAt(mt+1)===Et&&(!Tt||!tt($t))&&(yt=ft.charAt(mt+2),yt!==Et))return et(xt)?pt?!0:(vt=ct.now(),vt.column+=2,vt.offset+=2,ct(At+xt+At)({type:"strong",children:ht.tokenizeInline(xt,vt)})):void 0;!Tt&&yt===rt&&(xt+=yt,yt=ft.charAt(++mt)),xt+=yt,mt++}}return strong_1}var isWordCharacter,hasRequiredIsWordCharacter;function requireIsWordCharacter(){if(hasRequiredIsWordCharacter)return isWordCharacter;hasRequiredIsWordCharacter=1,isWordCharacter=nt;var et=String.fromCharCode,tt=/\w/;function nt(rt){return tt.test(typeof rt=="number"?et(rt):rt.charAt(0))}return isWordCharacter}var emphasis$1,hasRequiredEmphasis$1;function requireEmphasis$1(){if(hasRequiredEmphasis$1)return emphasis$1;hasRequiredEmphasis$1=1,emphasis$1=et;function et(tt,nt){var rt=tt.indexOf("*",nt),ot=tt.indexOf("_",nt);return ot===-1?rt:rt===-1||ot<rt?ot:rt}return emphasis$1}var emphasis_1,hasRequiredEmphasis;function requireEmphasis(){if(hasRequiredEmphasis)return emphasis_1;hasRequiredEmphasis=1;var et=requireTrim(),tt=requireIsWordCharacter(),nt=requireIsWhitespaceCharacter(),rt=requireEmphasis$1();emphasis_1=ct,ct.locator=rt;var ot="*",st="_",ut="\\";function ct(ft,pt,ht){var mt=this,yt=0,vt=pt.charAt(yt),Tt,Et,xt,At,Ct,$t,Ot;if(!(vt!==ot&&vt!==st)&&(Et=mt.options.pedantic,Ct=vt,xt=vt,$t=pt.length,yt++,At="",vt="",!(Et&&nt(pt.charAt(yt)))))for(;yt<$t;){if(Ot=vt,vt=pt.charAt(yt),vt===xt&&(!Et||!nt(Ot))){if(vt=pt.charAt(++yt),vt!==xt){if(!et(At)||Ot===xt)return;if(!Et&&xt===st&&tt(vt)){At+=xt;continue}return ht?!0:(Tt=ft.now(),Tt.column++,Tt.offset++,ft(Ct+At+xt)({type:"emphasis",children:mt.tokenizeInline(At,Tt)}))}At+=xt}!Et&&vt===ut&&(At+=vt,vt=pt.charAt(++yt)),At+=vt,yt++}}return emphasis_1}var _delete$1,hasRequired_delete$1;function require_delete$1(){if(hasRequired_delete$1)return _delete$1;hasRequired_delete$1=1,_delete$1=et;function et(tt,nt){return tt.indexOf("~~",nt)}return _delete$1}var _delete,hasRequired_delete;function require_delete(){if(hasRequired_delete)return _delete;hasRequired_delete=1;var et=requireIsWhitespaceCharacter(),tt=require_delete$1();_delete=ot,ot.locator=tt;var nt="~",rt="~~";function ot(st,ut,ct){var ft=this,pt="",ht="",mt="",yt="",vt,Tt,Et;if(!(!ft.options.gfm||ut.charAt(0)!==nt||ut.charAt(1)!==nt||et(ut.charAt(2))))for(vt=1,Tt=ut.length,Et=st.now(),Et.column+=2,Et.offset+=2;++vt<Tt;){if(pt=ut.charAt(vt),pt===nt&&ht===nt&&(!mt||!et(mt)))return ct?!0:st(rt+yt+rt)({type:"delete",children:ft.tokenizeInline(yt,Et)});yt+=ht,mt=ht,ht=pt}}return _delete}var codeInline$1,hasRequiredCodeInline$1;function requireCodeInline$1(){if(hasRequiredCodeInline$1)return codeInline$1;hasRequiredCodeInline$1=1,codeInline$1=et;function et(tt,nt){return tt.indexOf("`",nt)}return codeInline$1}var codeInline,hasRequiredCodeInline;function requireCodeInline(){if(hasRequiredCodeInline)return codeInline;hasRequiredCodeInline=1;var et=requireCodeInline$1();codeInline=ot,ot.locator=et;var tt=10,nt=32,rt=96;function ot(st,ut,ct){for(var ft=ut.length,pt=0,ht,mt,yt,vt,Tt,Et;pt<ft&&ut.charCodeAt(pt)===rt;)pt++;if(!(pt===0||pt===ft)){for(ht=pt,Tt=ut.charCodeAt(pt);pt<ft;){if(vt=Tt,Tt=ut.charCodeAt(pt+1),vt===rt){if(mt===void 0&&(mt=pt),yt=pt+1,Tt!==rt&&yt-mt===ht){Et=!0;break}}else mt!==void 0&&(mt=void 0,yt=void 0);pt++}if(!!Et){if(ct)return!0;if(pt=ht,ft=mt,vt=ut.charCodeAt(pt),Tt=ut.charCodeAt(ft-1),Et=!1,ft-pt>2&&(vt===nt||vt===tt)&&(Tt===nt||Tt===tt)){for(pt++,ft--;pt<ft;){if(vt=ut.charCodeAt(pt),vt!==nt&&vt!==tt){Et=!0;break}pt++}Et===!0&&(ht++,mt--)}return st(ut.slice(0,yt))({type:"inlineCode",value:ut.slice(ht,mt)})}}}return codeInline}var _break$1,hasRequired_break$1;function require_break$1(){if(hasRequired_break$1)return _break$1;hasRequired_break$1=1,_break$1=et;function et(tt,nt){for(var rt=tt.indexOf(`
`,nt);rt>nt&&tt.charAt(rt-1)===" ";)rt--;return rt}return _break$1}var _break,hasRequired_break;function require_break(){if(hasRequired_break)return _break;hasRequired_break=1;var et=require_break$1();_break=ot,ot.locator=et;var tt=" ",nt=`
`,rt=2;function ot(st,ut,ct){for(var ft=ut.length,pt=-1,ht="",mt;++pt<ft;){if(mt=ut.charAt(pt),mt===nt)return pt<rt?void 0:ct?!0:(ht+=mt,st(ht)({type:"break"}));if(mt!==tt)return;ht+=mt}}return _break}var text_1,hasRequiredText;function requireText(){if(hasRequiredText)return text_1;hasRequiredText=1,text_1=et;function et(tt,nt,rt){var ot=this,st,ut,ct,ft,pt,ht,mt,yt,vt,Tt;if(rt)return!0;for(st=ot.inlineMethods,ft=st.length,ut=ot.inlineTokenizers,ct=-1,vt=nt.length;++ct<ft;)yt=st[ct],!(yt==="text"||!ut[yt])&&(mt=ut[yt].locator,mt||tt.file.fail("Missing locator: `"+yt+"`"),ht=mt.call(ot,nt,1),ht!==-1&&ht<vt&&(vt=ht));pt=nt.slice(0,vt),Tt=tt.now(),ot.decode(pt,Tt,Et);function Et(xt,At,Ct){tt(Ct||xt)({type:"text",value:xt})}}return text_1}var xtend$1=immutable,toggle$1=stateToggle,vfileLocation=vfileLocation$1,unescape=_unescape,decode=decode$1,tokenizer=tokenizer$1,parser$3=Parser$1;function Parser$1(et,tt){this.file=tt,this.offset={},this.options=xtend$1(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=vfileLocation(tt).toOffset,this.unescape=unescape(this,"escape"),this.decode=decode(this)}var proto=Parser$1.prototype;proto.setOptions=requireSetOptions();proto.parse=requireParse();proto.options=requireDefaults();proto.exitStart=toggle$1("atStart",!0);proto.enterList=toggle$1("inList",!1);proto.enterLink=toggle$1("inLink",!1);proto.enterBlock=toggle$1("inBlock",!1);proto.interruptParagraph=[["thematicBreak"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]];proto.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]];proto.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]];proto.blockTokenizers={newline:requireNewline(),indentedCode:requireCodeIndented(),fencedCode:requireCodeFenced(),blockquote:requireBlockquote(),atxHeading:requireHeadingAtx(),thematicBreak:requireThematicBreak(),list:requireList$1(),setextHeading:requireHeadingSetext(),html:requireHtmlBlock(),footnote:requireFootnoteDefinition(),definition:requireDefinition(),table:requireTable$1(),paragraph:requireParagraph()};proto.inlineTokenizers={escape:require_escape(),autoLink:requireAutoLink(),url:requireUrl(),html:requireHtmlInline(),link:requireLink(),reference:requireReference(),strong:requireStrong(),emphasis:requireEmphasis(),deletion:require_delete(),code:requireCodeInline(),break:require_break(),text:requireText()};proto.blockMethods=keys$5(proto.blockTokenizers);proto.inlineMethods=keys$5(proto.inlineTokenizers);proto.tokenizeBlock=tokenizer("block");proto.tokenizeInline=tokenizer("inline");proto.tokenizeFactory=tokenizer;function keys$5(et){var tt=[],nt;for(nt in et)tt.push(nt);return tt}var unherit=unherit_1,xtend=immutable,Parser=parser$3,remarkParse=parse$9;parse$9.Parser=Parser;function parse$9(et){var tt=this.data("settings"),nt=unherit(Parser);nt.prototype.options=xtend(nt.prototype.options,tt,et),this.Parser=nt}function blockquote(et,tt){const nt={type:"element",tagName:"blockquote",properties:{},children:et.wrap(et.all(tt),!0)};return et.patch(tt,nt),et.applyData(tt,nt)}function hardBreak(et,tt){const nt={type:"element",tagName:"br",properties:{},children:[]};return et.patch(tt,nt),[et.applyData(tt,nt),{type:"text",value:`
`}]}function code(et,tt){const nt=tt.value?tt.value+`
`:"",rt=tt.lang?tt.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,ot={};rt&&(ot.className=["language-"+rt]);let st={type:"element",tagName:"code",properties:ot,children:[{type:"text",value:nt}]};return tt.meta&&(st.data={meta:tt.meta}),et.patch(tt,st),st=et.applyData(tt,st),st={type:"element",tagName:"pre",properties:{},children:[st]},et.patch(tt,st),st}function strikethrough(et,tt){const nt={type:"element",tagName:"del",properties:{},children:et.all(tt)};return et.patch(tt,nt),et.applyData(tt,nt)}function emphasis(et,tt){const nt={type:"element",tagName:"em",properties:{},children:et.all(tt)};return et.patch(tt,nt),et.applyData(tt,nt)}const unicodePunctuationRegex=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,asciiAlphanumeric=regexCheck(/[\dA-Za-z]/);regexCheck(unicodePunctuationRegex);function regexCheck(et){return tt;function tt(nt){return nt!==null&&et.test(String.fromCharCode(nt))}}function normalizeUri(et){const tt=[];let nt=-1,rt=0,ot=0;for(;++nt<et.length;){const st=et.charCodeAt(nt);let ut="";if(st===37&&asciiAlphanumeric(et.charCodeAt(nt+1))&&asciiAlphanumeric(et.charCodeAt(nt+2)))ot=2;else if(st<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(st))||(ut=String.fromCharCode(st));else if(st>55295&&st<57344){const ct=et.charCodeAt(nt+1);st<56320&&ct>56319&&ct<57344?(ut=String.fromCharCode(st,ct),ot=1):ut="\uFFFD"}else ut=String.fromCharCode(st);ut&&(tt.push(et.slice(rt,nt),encodeURIComponent(ut)),rt=nt+ot+1,ut=""),ot&&(nt+=ot,ot=0)}return tt.join("")+et.slice(rt)}function footnoteReference(et,tt){const nt=String(tt.identifier).toUpperCase(),rt=normalizeUri(nt.toLowerCase()),ot=et.footnoteOrder.indexOf(nt);let st;ot===-1?(et.footnoteOrder.push(nt),et.footnoteCounts[nt]=1,st=et.footnoteOrder.length):(et.footnoteCounts[nt]++,st=ot+1);const ut=et.footnoteCounts[nt],ct={type:"element",tagName:"a",properties:{href:"#"+et.clobberPrefix+"fn-"+rt,id:et.clobberPrefix+"fnref-"+rt+(ut>1?"-"+ut:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(st)}]};et.patch(tt,ct);const ft={type:"element",tagName:"sup",properties:{},children:[ct]};return et.patch(tt,ft),et.applyData(tt,ft)}function footnote(et,tt){const nt=et.footnoteById;let rt=1;for(;rt in nt;)rt++;const ot=String(rt);return nt[ot]={type:"footnoteDefinition",identifier:ot,children:[{type:"paragraph",children:tt.children}],position:tt.position},footnoteReference(et,{type:"footnoteReference",identifier:ot,position:tt.position})}function heading(et,tt){const nt={type:"element",tagName:"h"+tt.depth,properties:{},children:et.all(tt)};return et.patch(tt,nt),et.applyData(tt,nt)}function html(et,tt){if(et.dangerous){const nt={type:"raw",value:tt.value};return et.patch(tt,nt),et.applyData(tt,nt)}return null}function revert(et,tt){const nt=tt.referenceType;let rt="]";if(nt==="collapsed"?rt+="[]":nt==="full"&&(rt+="["+(tt.label||tt.identifier)+"]"),tt.type==="imageReference")return{type:"text",value:"!["+tt.alt+rt};const ot=et.all(tt),st=ot[0];st&&st.type==="text"?st.value="["+st.value:ot.unshift({type:"text",value:"["});const ut=ot[ot.length-1];return ut&&ut.type==="text"?ut.value+=rt:ot.push({type:"text",value:rt}),ot}function imageReference(et,tt){const nt=et.definition(tt.identifier);if(!nt)return revert(et,tt);const rt={src:normalizeUri(nt.url||""),alt:tt.alt};nt.title!==null&&nt.title!==void 0&&(rt.title=nt.title);const ot={type:"element",tagName:"img",properties:rt,children:[]};return et.patch(tt,ot),et.applyData(tt,ot)}function image$2(et,tt){const nt={src:normalizeUri(tt.url)};tt.alt!==null&&tt.alt!==void 0&&(nt.alt=tt.alt),tt.title!==null&&tt.title!==void 0&&(nt.title=tt.title);const rt={type:"element",tagName:"img",properties:nt,children:[]};return et.patch(tt,rt),et.applyData(tt,rt)}function inlineCode(et,tt){const nt={type:"text",value:tt.value.replace(/\r?\n|\r/g," ")};et.patch(tt,nt);const rt={type:"element",tagName:"code",properties:{},children:[nt]};return et.patch(tt,rt),et.applyData(tt,rt)}function linkReference(et,tt){const nt=et.definition(tt.identifier);if(!nt)return revert(et,tt);const rt={href:normalizeUri(nt.url||"")};nt.title!==null&&nt.title!==void 0&&(rt.title=nt.title);const ot={type:"element",tagName:"a",properties:rt,children:et.all(tt)};return et.patch(tt,ot),et.applyData(tt,ot)}function link$2(et,tt){const nt={href:normalizeUri(tt.url)};tt.title!==null&&tt.title!==void 0&&(nt.title=tt.title);const rt={type:"element",tagName:"a",properties:nt,children:et.all(tt)};return et.patch(tt,rt),et.applyData(tt,rt)}function listItem(et,tt,nt){const rt=et.all(tt),ot=nt?listLoose(nt):listItemLoose(tt),st={},ut=[];if(typeof tt.checked=="boolean"){const ht=rt[0];let mt;ht&&ht.type==="element"&&ht.tagName==="p"?mt=ht:(mt={type:"element",tagName:"p",properties:{},children:[]},rt.unshift(mt)),mt.children.length>0&&mt.children.unshift({type:"text",value:" "}),mt.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:tt.checked,disabled:!0},children:[]}),st.className=["task-list-item"]}let ct=-1;for(;++ct<rt.length;){const ht=rt[ct];(ot||ct!==0||ht.type!=="element"||ht.tagName!=="p")&&ut.push({type:"text",value:`
`}),ht.type==="element"&&ht.tagName==="p"&&!ot?ut.push(...ht.children):ut.push(ht)}const ft=rt[rt.length-1];ft&&(ot||ft.type!=="element"||ft.tagName!=="p")&&ut.push({type:"text",value:`
`});const pt={type:"element",tagName:"li",properties:st,children:ut};return et.patch(tt,pt),et.applyData(tt,pt)}function listLoose(et){let tt=!1;if(et.type==="list"){tt=et.spread||!1;const nt=et.children;let rt=-1;for(;!tt&&++rt<nt.length;)tt=listItemLoose(nt[rt])}return tt}function listItemLoose(et){const tt=et.spread;return tt??et.children.length>1}function list(et,tt){const nt={},rt=et.all(tt);let ot=-1;for(typeof tt.start=="number"&&tt.start!==1&&(nt.start=tt.start);++ot<rt.length;){const ut=rt[ot];if(ut.type==="element"&&ut.tagName==="li"&&ut.properties&&Array.isArray(ut.properties.className)&&ut.properties.className.includes("task-list-item")){nt.className=["contains-task-list"];break}}const st={type:"element",tagName:tt.ordered?"ol":"ul",properties:nt,children:et.wrap(rt,!0)};return et.patch(tt,st),et.applyData(tt,st)}function paragraph(et,tt){const nt={type:"element",tagName:"p",properties:{},children:et.all(tt)};return et.patch(tt,nt),et.applyData(tt,nt)}function root(et,tt){const nt={type:"root",children:et.wrap(et.all(tt))};return et.patch(tt,nt),et.applyData(tt,nt)}function strong(et,tt){const nt={type:"element",tagName:"strong",properties:{},children:et.all(tt)};return et.patch(tt,nt),et.applyData(tt,nt)}function table(et,tt){const nt=et.all(tt),rt=nt.shift(),ot=[];if(rt){const ut={type:"element",tagName:"thead",properties:{},children:et.wrap([rt],!0)};et.patch(tt.children[0],ut),ot.push(ut)}if(nt.length>0){const ut={type:"element",tagName:"tbody",properties:{},children:et.wrap(nt,!0)},ct=pointStart(tt.children[1]),ft=pointEnd(tt.children[tt.children.length-1]);ct.line&&ft.line&&(ut.position={start:ct,end:ft}),ot.push(ut)}const st={type:"element",tagName:"table",properties:{},children:et.wrap(ot,!0)};return et.patch(tt,st),et.applyData(tt,st)}function tableRow(et,tt,nt){const rt=nt?nt.children:void 0,st=(rt?rt.indexOf(tt):1)===0?"th":"td",ut=nt&&nt.type==="table"?nt.align:void 0,ct=ut?ut.length:tt.children.length;let ft=-1;const pt=[];for(;++ft<ct;){const mt=tt.children[ft],yt={},vt=ut?ut[ft]:void 0;vt&&(yt.align=vt);let Tt={type:"element",tagName:st,properties:yt,children:[]};mt&&(Tt.children=et.all(mt),et.patch(mt,Tt),Tt=et.applyData(tt,Tt)),pt.push(Tt)}const ht={type:"element",tagName:"tr",properties:{},children:et.wrap(pt,!0)};return et.patch(tt,ht),et.applyData(tt,ht)}function tableCell(et,tt){const nt={type:"element",tagName:"td",properties:{},children:et.all(tt)};return et.patch(tt,nt),et.applyData(tt,nt)}const tab=9,space=32;function trimLines(et){const tt=String(et),nt=/\r?\n|\r/g;let rt=nt.exec(tt),ot=0;const st=[];for(;rt;)st.push(trimLine(tt.slice(ot,rt.index),ot>0,!0),rt[0]),ot=rt.index+rt[0].length,rt=nt.exec(tt);return st.push(trimLine(tt.slice(ot),ot>0,!1)),st.join("")}function trimLine(et,tt,nt){let rt=0,ot=et.length;if(tt){let st=et.codePointAt(rt);for(;st===tab||st===space;)rt++,st=et.codePointAt(rt)}if(nt){let st=et.codePointAt(ot-1);for(;st===tab||st===space;)ot--,st=et.codePointAt(ot-1)}return ot>rt?et.slice(rt,ot):""}function text$3(et,tt){const nt={type:"text",value:trimLines(String(tt.value))};return et.patch(tt,nt),et.applyData(tt,nt)}function thematicBreak(et,tt){const nt={type:"element",tagName:"hr",properties:{},children:[]};return et.patch(tt,nt),et.applyData(tt,nt)}const handlers={blockquote,break:hardBreak,code,delete:strikethrough,emphasis,footnoteReference,footnote,heading,html,imageReference,image:image$2,inlineCode,linkReference,link:link$2,listItem,list,paragraph,root,strong,table,tableCell,tableRow,text:text$3,thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){return null}const convert$4=function(et){if(et==null)return ok$1;if(typeof et=="string")return typeFactory$1(et);if(typeof et=="object")return Array.isArray(et)?anyFactory$1(et):propsFactory$1(et);if(typeof et=="function")return castFactory$1(et);throw new Error("Expected function, string, or object as test")};function anyFactory$1(et){const tt=[];let nt=-1;for(;++nt<et.length;)tt[nt]=convert$4(et[nt]);return castFactory$1(rt);function rt(...ot){let st=-1;for(;++st<tt.length;)if(tt[st].call(this,...ot))return!0;return!1}}function propsFactory$1(et){return castFactory$1(tt);function tt(nt){let rt;for(rt in et)if(nt[rt]!==et[rt])return!1;return!0}}function typeFactory$1(et){return castFactory$1(tt);function tt(nt){return nt&&nt.type===et}}function castFactory$1(et){return tt;function tt(nt,...rt){return Boolean(nt&&typeof nt=="object"&&"type"in nt&&Boolean(et.call(this,nt,...rt)))}}function ok$1(){return!0}function color$7(et){return et}const CONTINUE$1=!0,EXIT$1=!1,SKIP$4="skip",visitParents$1=function(et,tt,nt,rt){typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null);const ot=convert$4(tt),st=rt?-1:1;ut(et,void 0,[])();function ut(ct,ft,pt){const ht=ct&&typeof ct=="object"?ct:{};if(typeof ht.type=="string"){const yt=typeof ht.tagName=="string"?ht.tagName:typeof ht.name=="string"?ht.name:void 0;Object.defineProperty(mt,"name",{value:"node ("+(ct.type+(yt?"<"+yt+">":""))+")"})}return mt;function mt(){let yt=[],vt,Tt,Et;if((!tt||ot(ct,ft,pt[pt.length-1]||null))&&(yt=toResult$1(nt(ct,pt)),yt[0]===EXIT$1))return yt;if(ct.children&&yt[0]!==SKIP$4)for(Tt=(rt?ct.children.length:-1)+st,Et=pt.concat(ct);Tt>-1&&Tt<ct.children.length;){if(vt=ut(ct.children[Tt],Tt,Et)(),vt[0]===EXIT$1)return vt;Tt=typeof vt[1]=="number"?vt[1]:Tt+st}return yt}}};function toResult$1(et){return Array.isArray(et)?et:typeof et=="number"?[CONTINUE$1,et]:[et]}const visit$2=function(et,tt,nt,rt){typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null),visitParents$1(et,tt,ot,rt);function ot(st,ut){const ct=ut[ut.length-1];return nt(st,ct?ct.children.indexOf(st):null,ct)}};function generated(et){return!et||!et.position||!et.position.start||!et.position.start.line||!et.position.start.column||!et.position.end||!et.position.end.line||!et.position.end.column}const convert$3=function(et){if(et==null)return ok;if(typeof et=="string")return typeFactory(et);if(typeof et=="object")return Array.isArray(et)?anyFactory(et):propsFactory(et);if(typeof et=="function")return castFactory(et);throw new Error("Expected function, string, or object as test")};function anyFactory(et){const tt=[];let nt=-1;for(;++nt<et.length;)tt[nt]=convert$3(et[nt]);return castFactory(rt);function rt(...ot){let st=-1;for(;++st<tt.length;)if(tt[st].call(this,...ot))return!0;return!1}}function propsFactory(et){return castFactory(tt);function tt(nt){let rt;for(rt in et)if(nt[rt]!==et[rt])return!1;return!0}}function typeFactory(et){return castFactory(tt);function tt(nt){return nt&&nt.type===et}}function castFactory(et){return tt;function tt(nt,...rt){return Boolean(nt&&typeof nt=="object"&&"type"in nt&&Boolean(et.call(this,nt,...rt)))}}function ok(){return!0}function color$6(et){return et}const CONTINUE=!0,EXIT=!1,SKIP$3="skip",visitParents=function(et,tt,nt,rt){typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null);const ot=convert$3(tt),st=rt?-1:1;ut(et,void 0,[])();function ut(ct,ft,pt){const ht=ct&&typeof ct=="object"?ct:{};if(typeof ht.type=="string"){const yt=typeof ht.tagName=="string"?ht.tagName:typeof ht.name=="string"?ht.name:void 0;Object.defineProperty(mt,"name",{value:"node ("+(ct.type+(yt?"<"+yt+">":""))+")"})}return mt;function mt(){let yt=[],vt,Tt,Et;if((!tt||ot(ct,ft,pt[pt.length-1]||null))&&(yt=toResult(nt(ct,pt)),yt[0]===EXIT))return yt;if(ct.children&&yt[0]!==SKIP$3)for(Tt=(rt?ct.children.length:-1)+st,Et=pt.concat(ct);Tt>-1&&Tt<ct.children.length;){if(vt=ut(ct.children[Tt],Tt,Et)(),vt[0]===EXIT)return vt;Tt=typeof vt[1]=="number"?vt[1]:Tt+st}return yt}}};function toResult(et){return Array.isArray(et)?et:typeof et=="number"?[CONTINUE,et]:[et]}const visit$1=function(et,tt,nt,rt){typeof tt=="function"&&typeof nt!="function"&&(rt=nt,nt=tt,tt=null),visitParents(et,tt,ot,rt);function ot(st,ut){const ct=ut[ut.length-1];return nt(st,ct?ct.children.indexOf(st):null,ct)}},own$2={}.hasOwnProperty;function definitions(et){const tt=Object.create(null);if(!et||!et.type)throw new Error("mdast-util-definitions expected node");return visit$1(et,"definition",rt=>{const ot=clean(rt.identifier);ot&&!own$2.call(tt,ot)&&(tt[ot]=rt)}),nt;function nt(rt){const ot=clean(rt);return ot&&own$2.call(tt,ot)?tt[ot]:null}}function clean(et){return String(et||"").toUpperCase()}const own$1={}.hasOwnProperty;function createState(et,tt){const nt=tt||{},rt=nt.allowDangerousHtml||!1,ot={};return ut.dangerous=rt,ut.clobberPrefix=nt.clobberPrefix===void 0||nt.clobberPrefix===null?"user-content-":nt.clobberPrefix,ut.footnoteLabel=nt.footnoteLabel||"Footnotes",ut.footnoteLabelTagName=nt.footnoteLabelTagName||"h2",ut.footnoteLabelProperties=nt.footnoteLabelProperties||{className:["sr-only"]},ut.footnoteBackLabel=nt.footnoteBackLabel||"Back to content",ut.unknownHandler=nt.unknownHandler,ut.passThrough=nt.passThrough,ut.handlers={...handlers,...nt.handlers},ut.definition=definitions(et),ut.footnoteById=ot,ut.footnoteOrder=[],ut.footnoteCounts={},ut.patch=patch$1,ut.applyData=applyData,ut.one=ct,ut.all=ft,ut.wrap=wrap$2,ut.augment=st,visit$2(et,"footnoteDefinition",pt=>{const ht=String(pt.identifier).toUpperCase();own$1.call(ot,ht)||(ot[ht]=pt)}),ut;function st(pt,ht){if(pt&&"data"in pt&&pt.data){const mt=pt.data;mt.hName&&(ht.type!=="element"&&(ht={type:"element",tagName:"",properties:{},children:[]}),ht.tagName=mt.hName),ht.type==="element"&&mt.hProperties&&(ht.properties={...ht.properties,...mt.hProperties}),"children"in ht&&ht.children&&mt.hChildren&&(ht.children=mt.hChildren)}if(pt){const mt="type"in pt?pt:{position:pt};generated(mt)||(ht.position={start:pointStart(mt),end:pointEnd(mt)})}return ht}function ut(pt,ht,mt,yt){return Array.isArray(mt)&&(yt=mt,mt={}),st(pt,{type:"element",tagName:ht,properties:mt||{},children:yt||[]})}function ct(pt,ht){return one$3(ut,pt,ht)}function ft(pt){return all(ut,pt)}}function patch$1(et,tt){et.position&&(tt.position=position$4(et))}function applyData(et,tt){let nt=tt;if(et&&et.data){const rt=et.data.hName,ot=et.data.hChildren,st=et.data.hProperties;typeof rt=="string"&&(nt.type==="element"?nt.tagName=rt:nt={type:"element",tagName:rt,properties:{},children:[]}),nt.type==="element"&&st&&(nt.properties={...nt.properties,...st}),"children"in nt&&nt.children&&ot!==null&&ot!==void 0&&(nt.children=ot)}return nt}function one$3(et,tt,nt){const rt=tt&&tt.type;if(!rt)throw new Error("Expected node, got `"+tt+"`");return own$1.call(et.handlers,rt)?et.handlers[rt](et,tt,nt):et.passThrough&&et.passThrough.includes(rt)?"children"in tt?{...tt,children:all(et,tt)}:tt:et.unknownHandler?et.unknownHandler(et,tt,nt):defaultUnknownHandler(et,tt)}function all(et,tt){const nt=[];if("children"in tt){const rt=tt.children;let ot=-1;for(;++ot<rt.length;){const st=one$3(et,rt[ot],tt);if(st){if(ot&&rt[ot-1].type==="break"&&(!Array.isArray(st)&&st.type==="text"&&(st.value=st.value.replace(/^\s+/,"")),!Array.isArray(st)&&st.type==="element")){const ut=st.children[0];ut&&ut.type==="text"&&(ut.value=ut.value.replace(/^\s+/,""))}Array.isArray(st)?nt.push(...st):nt.push(st)}}}return nt}function defaultUnknownHandler(et,tt){const nt=tt.data||{},rt="value"in tt&&!(own$1.call(nt,"hProperties")||own$1.call(nt,"hChildren"))?{type:"text",value:tt.value}:{type:"element",tagName:"div",properties:{},children:all(et,tt)};return et.patch(tt,rt),et.applyData(tt,rt)}function wrap$2(et,tt){const nt=[];let rt=-1;for(tt&&nt.push({type:"text",value:`
`});++rt<et.length;)rt&&nt.push({type:"text",value:`
`}),nt.push(et[rt]);return tt&&et.length>0&&nt.push({type:"text",value:`
`}),nt}function footer(et){const tt=[];let nt=-1;for(;++nt<et.footnoteOrder.length;){const rt=et.footnoteById[et.footnoteOrder[nt]];if(!rt)continue;const ot=et.all(rt),st=String(rt.identifier).toUpperCase(),ut=normalizeUri(st.toLowerCase());let ct=0;const ft=[];for(;++ct<=et.footnoteCounts[st];){const mt={type:"element",tagName:"a",properties:{href:"#"+et.clobberPrefix+"fnref-"+ut+(ct>1?"-"+ct:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:et.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};ct>1&&mt.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(ct)}]}),ft.length>0&&ft.push({type:"text",value:" "}),ft.push(mt)}const pt=ot[ot.length-1];if(pt&&pt.type==="element"&&pt.tagName==="p"){const mt=pt.children[pt.children.length-1];mt&&mt.type==="text"?mt.value+=" ":pt.children.push({type:"text",value:" "}),pt.children.push(...ft)}else ot.push(...ft);const ht={type:"element",tagName:"li",properties:{id:et.clobberPrefix+"fn-"+ut},children:et.wrap(ot,!0)};et.patch(rt,ht),tt.push(ht)}if(tt.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:et.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(et.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:et.footnoteLabel}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:et.wrap(tt,!0)},{type:"text",value:`
`}]}}function toHast(et,tt){const nt=createState(et,tt),rt=nt.one(et,null),ot=footer(nt);return ot&&rt.children.push({type:"text",value:`
`},ot),Array.isArray(rt)?{type:"root",children:rt}:rt}const remarkRehype=function(et,tt){return et&&"run"in et?bridge(et,tt):mutate(et||tt)},remark2rehype=remarkRehype;function bridge(et,tt){return(nt,rt,ot)=>{et.run(toHast(nt,tt),rt,st=>{ot(st)})}}function mutate(et){return tt=>toHast(tt,et)}function bail(et){if(et)throw et}function isPlainObject$1(et){if(typeof et!="object"||et===null)return!1;const tt=Object.getPrototypeOf(et);return(tt===null||tt===Object.prototype||Object.getPrototypeOf(tt)===null)&&!(Symbol.toStringTag in et)&&!(Symbol.iterator in et)}function trough(){const et=[],tt={run:nt,use:rt};return tt;function nt(...ot){let st=-1;const ut=ot.pop();if(typeof ut!="function")throw new TypeError("Expected function as last argument, not "+ut);ct(null,...ot);function ct(ft,...pt){const ht=et[++st];let mt=-1;if(ft){ut(ft);return}for(;++mt<ot.length;)(pt[mt]===null||pt[mt]===void 0)&&(pt[mt]=ot[mt]);ot=pt,ht?wrap$1(ht,ct)(...pt):ut(null,...pt)}}function rt(ot){if(typeof ot!="function")throw new TypeError("Expected `middelware` to be a function, not "+ot);return et.push(ot),tt}}function wrap$1(et,tt){let nt;return rt;function rt(...ut){const ct=et.length>ut.length;let ft;ct&&ut.push(ot);try{ft=et.apply(this,ut)}catch(pt){const ht=pt;if(ct&&nt)throw ht;return ot(ht)}ct||(ft instanceof Promise?ft.then(st,ot):ft instanceof Error?ot(ft):st(ft))}function ot(ut,...ct){nt||(nt=!0,tt(ut,...ct))}function st(ut){ot(null,ut)}}function stringifyPosition(et){return!et||typeof et!="object"?"":"position"in et||"type"in et?position$2(et.position):"start"in et||"end"in et?position$2(et):"line"in et||"column"in et?point$8(et):""}function point$8(et){return index$6(et&&et.line)+":"+index$6(et&&et.column)}function position$2(et){return point$8(et&&et.start)+"-"+point$8(et&&et.end)}function index$6(et){return et&&typeof et=="number"?et:1}class VFileMessage extends Error{constructor(tt,nt,rt){const ot=[null,null];let st={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof nt=="string"&&(rt=nt,nt=void 0),typeof rt=="string"){const ut=rt.indexOf(":");ut===-1?ot[1]=rt:(ot[0]=rt.slice(0,ut),ot[1]=rt.slice(ut+1))}nt&&("type"in nt||"position"in nt?nt.position&&(st=nt.position):"start"in nt||"end"in nt?st=nt:("line"in nt||"column"in nt)&&(st.start=nt)),this.name=stringifyPosition(nt)||"1:1",this.message=typeof tt=="object"?tt.message:tt,this.stack="",typeof tt=="object"&&tt.stack&&(this.stack=tt.stack),this.reason=this.message,this.fatal,this.line=st.start.line,this.column=st.start.column,this.position=st,this.source=ot[0],this.ruleId=ot[1],this.file,this.actual,this.expected,this.url,this.note}}VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.stack="";VFileMessage.prototype.fatal=null;VFileMessage.prototype.column=null;VFileMessage.prototype.line=null;VFileMessage.prototype.source=null;VFileMessage.prototype.ruleId=null;VFileMessage.prototype.position=null;const path$4={basename,dirname,extname,join:join$3,sep:"/"};function basename(et,tt){if(tt!==void 0&&typeof tt!="string")throw new TypeError('"ext" argument must be a string');assertPath$1(et);let nt=0,rt=-1,ot=et.length,st;if(tt===void 0||tt.length===0||tt.length>et.length){for(;ot--;)if(et.charCodeAt(ot)===47){if(st){nt=ot+1;break}}else rt<0&&(st=!0,rt=ot+1);return rt<0?"":et.slice(nt,rt)}if(tt===et)return"";let ut=-1,ct=tt.length-1;for(;ot--;)if(et.charCodeAt(ot)===47){if(st){nt=ot+1;break}}else ut<0&&(st=!0,ut=ot+1),ct>-1&&(et.charCodeAt(ot)===tt.charCodeAt(ct--)?ct<0&&(rt=ot):(ct=-1,rt=ut));return nt===rt?rt=ut:rt<0&&(rt=et.length),et.slice(nt,rt)}function dirname(et){if(assertPath$1(et),et.length===0)return".";let tt=-1,nt=et.length,rt;for(;--nt;)if(et.charCodeAt(nt)===47){if(rt){tt=nt;break}}else rt||(rt=!0);return tt<0?et.charCodeAt(0)===47?"/":".":tt===1&&et.charCodeAt(0)===47?"//":et.slice(0,tt)}function extname(et){assertPath$1(et);let tt=et.length,nt=-1,rt=0,ot=-1,st=0,ut;for(;tt--;){const ct=et.charCodeAt(tt);if(ct===47){if(ut){rt=tt+1;break}continue}nt<0&&(ut=!0,nt=tt+1),ct===46?ot<0?ot=tt:st!==1&&(st=1):ot>-1&&(st=-1)}return ot<0||nt<0||st===0||st===1&&ot===nt-1&&ot===rt+1?"":et.slice(ot,nt)}function join$3(...et){let tt=-1,nt;for(;++tt<et.length;)assertPath$1(et[tt]),et[tt]&&(nt=nt===void 0?et[tt]:nt+"/"+et[tt]);return nt===void 0?".":normalize$3(nt)}function normalize$3(et){assertPath$1(et);const tt=et.charCodeAt(0)===47;let nt=normalizeString(et,!tt);return nt.length===0&&!tt&&(nt="."),nt.length>0&&et.charCodeAt(et.length-1)===47&&(nt+="/"),tt?"/"+nt:nt}function normalizeString(et,tt){let nt="",rt=0,ot=-1,st=0,ut=-1,ct,ft;for(;++ut<=et.length;){if(ut<et.length)ct=et.charCodeAt(ut);else{if(ct===47)break;ct=47}if(ct===47){if(!(ot===ut-1||st===1))if(ot!==ut-1&&st===2){if(nt.length<2||rt!==2||nt.charCodeAt(nt.length-1)!==46||nt.charCodeAt(nt.length-2)!==46){if(nt.length>2){if(ft=nt.lastIndexOf("/"),ft!==nt.length-1){ft<0?(nt="",rt=0):(nt=nt.slice(0,ft),rt=nt.length-1-nt.lastIndexOf("/")),ot=ut,st=0;continue}}else if(nt.length>0){nt="",rt=0,ot=ut,st=0;continue}}tt&&(nt=nt.length>0?nt+"/..":"..",rt=2)}else nt.length>0?nt+="/"+et.slice(ot+1,ut):nt=et.slice(ot+1,ut),rt=ut-ot-1;ot=ut,st=0}else ct===46&&st>-1?st++:st=-1}return nt}function assertPath$1(et){if(typeof et!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(et))}const proc={cwd};function cwd(){return"/"}function isUrl(et){return et!==null&&typeof et=="object"&&et.href&&et.origin}function urlToPath(et){if(typeof et=="string")et=new URL(et);else if(!isUrl(et)){const tt=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+et+"`");throw tt.code="ERR_INVALID_ARG_TYPE",tt}if(et.protocol!=="file:"){const tt=new TypeError("The URL must be of scheme file");throw tt.code="ERR_INVALID_URL_SCHEME",tt}return getPathFromURLPosix(et)}function getPathFromURLPosix(et){if(et.hostname!==""){const rt=new TypeError('File URL host must be "localhost" or empty on darwin');throw rt.code="ERR_INVALID_FILE_URL_HOST",rt}const tt=et.pathname;let nt=-1;for(;++nt<tt.length;)if(tt.charCodeAt(nt)===37&&tt.charCodeAt(nt+1)===50){const rt=tt.charCodeAt(nt+2);if(rt===70||rt===102){const ot=new TypeError("File URL path must not include encoded / characters");throw ot.code="ERR_INVALID_FILE_URL_PATH",ot}}return decodeURIComponent(tt)}const order$1=["history","path","basename","stem","extname","dirname"];class VFile{constructor(tt){let nt;tt?typeof tt=="string"||buffer(tt)?nt={value:tt}:isUrl(tt)?nt={path:tt}:nt=tt:nt={},this.data={},this.messages=[],this.history=[],this.cwd=proc.cwd(),this.value,this.stored,this.result,this.map;let rt=-1;for(;++rt<order$1.length;){const st=order$1[rt];st in nt&&nt[st]!==void 0&&nt[st]!==null&&(this[st]=st==="history"?[...nt[st]]:nt[st])}let ot;for(ot in nt)order$1.includes(ot)||(this[ot]=nt[ot])}get path(){return this.history[this.history.length-1]}set path(tt){isUrl(tt)&&(tt=urlToPath(tt)),assertNonEmpty(tt,"path"),this.path!==tt&&this.history.push(tt)}get dirname(){return typeof this.path=="string"?path$4.dirname(this.path):void 0}set dirname(tt){assertPath(this.basename,"dirname"),this.path=path$4.join(tt||"",this.basename)}get basename(){return typeof this.path=="string"?path$4.basename(this.path):void 0}set basename(tt){assertNonEmpty(tt,"basename"),assertPart(tt,"basename"),this.path=path$4.join(this.dirname||"",tt)}get extname(){return typeof this.path=="string"?path$4.extname(this.path):void 0}set extname(tt){if(assertPart(tt,"extname"),assertPath(this.dirname,"extname"),tt){if(tt.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(tt.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=path$4.join(this.dirname,this.stem+(tt||""))}get stem(){return typeof this.path=="string"?path$4.basename(this.path,this.extname):void 0}set stem(tt){assertNonEmpty(tt,"stem"),assertPart(tt,"stem"),this.path=path$4.join(this.dirname||"",tt+(this.extname||""))}toString(tt){return(this.value||"").toString(tt||void 0)}message(tt,nt,rt){const ot=new VFileMessage(tt,nt,rt);return this.path&&(ot.name=this.path+":"+ot.name,ot.file=this.path),ot.fatal=!1,this.messages.push(ot),ot}info(tt,nt,rt){const ot=this.message(tt,nt,rt);return ot.fatal=null,ot}fail(tt,nt,rt){const ot=this.message(tt,nt,rt);throw ot.fatal=!0,ot}}function assertPart(et,tt){if(et&&et.includes(path$4.sep))throw new Error("`"+tt+"` cannot be a path: did not expect `"+path$4.sep+"`")}function assertNonEmpty(et,tt){if(!et)throw new Error("`"+tt+"` cannot be empty")}function assertPath(et,tt){if(!et)throw new Error("Setting `"+tt+"` requires `path` to be set too")}function buffer(et){return isBuffer$1(et)}const unified=base$2().freeze(),own={}.hasOwnProperty;function base$2(){const et=trough(),tt=[];let nt={},rt,ot=-1;return st.data=ut,st.Parser=void 0,st.Compiler=void 0,st.freeze=ct,st.attachers=tt,st.use=ft,st.parse=pt,st.stringify=ht,st.run=mt,st.runSync=yt,st.process=vt,st.processSync=Tt,st;function st(){const Et=base$2();let xt=-1;for(;++xt<tt.length;)Et.use(...tt[xt]);return Et.data(extend$4(!0,{},nt)),Et}function ut(Et,xt){return typeof Et=="string"?arguments.length===2?(assertUnfrozen("data",rt),nt[Et]=xt,st):own.call(nt,Et)&&nt[Et]||null:Et?(assertUnfrozen("data",rt),nt=Et,st):nt}function ct(){if(rt)return st;for(;++ot<tt.length;){const[Et,...xt]=tt[ot];if(xt[0]===!1)continue;xt[0]===!0&&(xt[0]=void 0);const At=Et.call(st,...xt);typeof At=="function"&&et.use(At)}return rt=!0,ot=Number.POSITIVE_INFINITY,st}function ft(Et,...xt){let At;if(assertUnfrozen("use",rt),Et!=null)if(typeof Et=="function")Rt(Et,...xt);else if(typeof Et=="object")Array.isArray(Et)?Ot(Et):$t(Et);else throw new TypeError("Expected usable value, not `"+Et+"`");return At&&(nt.settings=Object.assign(nt.settings||{},At)),st;function Ct(It){if(typeof It=="function")Rt(It);else if(typeof It=="object")if(Array.isArray(It)){const[kt,...Mt]=It;Rt(kt,...Mt)}else $t(It);else throw new TypeError("Expected usable value, not `"+It+"`")}function $t(It){Ot(It.plugins),It.settings&&(At=Object.assign(At||{},It.settings))}function Ot(It){let kt=-1;if(It!=null)if(Array.isArray(It))for(;++kt<It.length;){const Mt=It[kt];Ct(Mt)}else throw new TypeError("Expected a list of plugins, not `"+It+"`")}function Rt(It,kt){let Mt=-1,Ft;for(;++Mt<tt.length;)if(tt[Mt][0]===It){Ft=tt[Mt];break}Ft?(isPlainObject$1(Ft[1])&&isPlainObject$1(kt)&&(kt=extend$4(!0,Ft[1],kt)),Ft[1]=kt):tt.push([...arguments])}}function pt(Et){st.freeze();const xt=vfile(Et),At=st.Parser;return assertParser("parse",At),newable(At,"parse")?new At(String(xt),xt).parse():At(String(xt),xt)}function ht(Et,xt){st.freeze();const At=vfile(xt),Ct=st.Compiler;return assertCompiler("stringify",Ct),assertNode(Et),newable(Ct,"compile")?new Ct(Et,At).compile():Ct(Et,At)}function mt(Et,xt,At){if(assertNode(Et),st.freeze(),!At&&typeof xt=="function"&&(At=xt,xt=void 0),!At)return new Promise(Ct);Ct(null,At);function Ct($t,Ot){et.run(Et,vfile(xt),Rt);function Rt(It,kt,Mt){kt=kt||Et,It?Ot(It):$t?$t(kt):At(null,kt,Mt)}}}function yt(Et,xt){let At,Ct;return st.run(Et,xt,$t),assertDone("runSync","run",Ct),At;function $t(Ot,Rt){bail(Ot),At=Rt,Ct=!0}}function vt(Et,xt){if(st.freeze(),assertParser("process",st.Parser),assertCompiler("process",st.Compiler),!xt)return new Promise(At);At(null,xt);function At(Ct,$t){const Ot=vfile(Et);st.run(st.parse(Ot),Ot,(It,kt,Mt)=>{if(It||!kt||!Mt)Rt(It);else{const Ft=st.stringify(kt,Mt);Ft==null||(looksLikeAVFileValue(Ft)?Mt.value=Ft:Mt.result=Ft),Rt(It,Mt)}});function Rt(It,kt){It||!kt?$t(It):Ct?Ct(kt):xt(null,kt)}}}function Tt(Et){let xt;st.freeze(),assertParser("processSync",st.Parser),assertCompiler("processSync",st.Compiler);const At=vfile(Et);return st.process(At,Ct),assertDone("processSync","process",xt),At;function Ct($t){xt=!0,bail($t)}}}function newable(et,tt){return typeof et=="function"&&et.prototype&&(keys$4(et.prototype)||tt in et.prototype)}function keys$4(et){let tt;for(tt in et)if(own.call(et,tt))return!0;return!1}function assertParser(et,tt){if(typeof tt!="function")throw new TypeError("Cannot `"+et+"` without `Parser`")}function assertCompiler(et,tt){if(typeof tt!="function")throw new TypeError("Cannot `"+et+"` without `Compiler`")}function assertUnfrozen(et,tt){if(tt)throw new Error("Cannot call `"+et+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(et){if(!isPlainObject$1(et)||typeof et.type!="string")throw new TypeError("Expected node, got `"+et+"`")}function assertDone(et,tt,nt){if(!nt)throw new Error("`"+et+"` finished async. Use `"+tt+"` instead")}function vfile(et){return looksLikeAVFile(et)?et:new VFile(et)}function looksLikeAVFile(et){return Boolean(et&&typeof et=="object"&&"message"in et&&"messages"in et)}function looksLikeAVFileValue(et){return typeof et=="string"||isBuffer$1(et)}function blankifyLinks(et){return et.replace(/<a href="[^"]+"/g,tt=>`${tt} target="_blank"`)}function shiftHeadings(et){return et.replace(/<h5>/g,"<h6>").replace(/<\/h5>/g,"</h6>").replace(/<h4>/g,"<h5>").replace(/<\/h4>/g,"</h5>").replace(/<h3>/g,"<h4>").replace(/<\/h3>/g,"</h4>").replace(/<h2>/g,"<h3>").replace(/<\/h2>/g,"</h3>").replace(/<h1>/g,"<h2>").replace(/<\/h1>/g,"</h2>")}const DEFAULT_SANITIZATION_SCHEMA=lodash$2.exports.merge(defaultSchema,{attributes:{"*":["className","style"]}}),SANITIZATION_SCHEMAS_FOR_RULES={allowScopedStyles:{attributes:{style:["scoped"]},tagNames:["style"]}};function buildSanitizationSchema(et){const tt=lodash$2.exports.cloneDeep(DEFAULT_SANITIZATION_SCHEMA);return et?.allowScopedStyles&&lodash$2.exports.merge(tt,SANITIZATION_SCHEMAS_FOR_RULES.allowScopedStyles),tt}function generateHTML(et,tt){const nt=buildSanitizationSchema(tt),rt=unified().use(remarkParse).use(remarkMath).use(remarkEmoji).use(centerText).use(remark2rehype,{allowDangerousHtml:!0}).use(rehypeKatex_1).use(rehypeRaw).use(rehypeSanitize,nt).use(rehypeStringify).use(rehypeSanitize,nt).processSync(et);return typeof rt.value=="string"&&(rt.value=blankifyLinks(rt.value),rt.value=shiftHeadings(rt.value)),rt}function sanitizeHTML(et,tt){return unified().use(rehypeParse).use(rehypeStringify).use(rehypeSanitize,tt).processSync(et).toString()}const centerText=et=>tt=>(unistUtilVisit$1(tt,"paragraph",nt=>{const rt=mdastUtilToString(nt).trim();if(!(rt.slice(0,3)==="-> "&&rt.slice(rt.length-3,rt.length)===" <-"))return;const st=lodash$2.exports.clone(nt),ut=nt.children.length-1,ct=fn(nt.children,ft=>{ft[0].value=ft[0]?.value?.trim().replace(/->\s*/,""),ft[ut].value=ft[ut]?.value?.trim().replace(/\s*<-$/,"")});st.children=ct,nt.type="center",nt.data={hName:"div",hProperties:{className:"center"}},nt.children=[st]}),tt),OpNameRow=styled$1.div`
  display: flex;
  height: 24px;
`;OpNameRow.displayName="S.OpNameRow";const OpName=styled$1.h2`
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
`;OpName.displayName="S.OpName";const OpClose=styled$1.div`
  margin-left: 10px;
`;OpClose.displayName="S.OpClose";const Section$2=styled$1.div`
  margin-bottom: 8px;
`,Subheader=styled$1.h3`
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
`,Markdown$1=styled$1.div`
  font-size: 14px;
  color: ${MOON_250};
`,ArgList=styled$1.ul`
  margin: 0;
  list-style-type: none;
  padding-left: 16px;

  li {
    margin-bottom: 4px;
    line-height: 1em;
  }
`,ArgName=styled$1.span`
  font-size: 14px;
  font-weight: 600;
`,Code=styled$1.code`
  font-family: Inconsolata;
`,SvgIconChevronDown=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.21967 8.96967C4.92678 9.26256 4.92678 9.73744 5.21967 10.0303L11.2197 16.0303C11.5126 16.3232 11.9874 16.3232 12.2803 16.0303L18.2803 10.0303C18.5732 9.73744 18.5732 9.26256 18.2803 8.96967C17.9874 8.67678 17.5126 8.67678 17.2197 8.96967L11.75 14.4393L6.28033 8.96967C5.98744 8.67678 5.51256 8.67678 5.21967 8.96967Z",fill:"currentColor"})),SvgIconChevronUp=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.96967 15.5303C4.67678 15.2374 4.67678 14.7626 4.96967 14.4697L10.9697 8.46967C11.2626 8.17678 11.7374 8.17678 12.0303 8.46967L18.0303 14.4697C18.3232 14.7626 18.3232 15.2374 18.0303 15.5303C17.7374 15.8232 17.2626 15.8232 16.9697 15.5303L11.5 10.0607L6.03033 15.5303C5.73744 15.8232 5.26256 15.8232 4.96967 15.5303Z",fill:"currentColor"})),SvgIconChevronNext=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.96967 18.7803C9.26256 19.0732 9.73744 19.0732 10.0303 18.7803L16.0303 12.7803C16.3232 12.4874 16.3232 12.0126 16.0303 11.7197L10.0303 5.71967C9.73744 5.42678 9.26256 5.42678 8.96967 5.71967C8.67678 6.01256 8.67678 6.48744 8.96967 6.78033L14.4393 12.25L8.96967 17.7197C8.67678 18.0126 8.67678 18.4874 8.96967 18.7803Z",fill:"currentColor"})),SvgIconFlashBolt=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4388 20.7948C12.4622 22.2054 10.25 21.5144 10.25 19.7987V15C10.25 14.8619 10.138 14.75 9.99997 14.75H5.90854C4.49688 14.75 3.66617 13.1645 4.4697 12.0039L10.5611 3.20513C11.5377 1.79453 13.75 2.4856 13.75 4.20124V8.99998C13.75 9.13805 13.8619 9.24998 14 9.24998H18.0914C19.5031 9.24998 20.3338 10.8354 19.5302 11.9961L13.4388 20.7948ZM11.75 19.7987C11.75 20.0438 12.066 20.1425 12.2055 19.941L18.2969 11.1423C18.4117 10.9765 18.2931 10.75 18.0914 10.75H14C13.0335 10.75 12.25 9.96648 12.25 8.99998V4.20124C12.25 3.95615 11.9339 3.85743 11.7944 4.05894L5.70299 12.8577C5.5882 13.0235 5.70687 13.25 5.90854 13.25H9.99997C10.9665 13.25 11.75 14.0335 11.75 15V19.7987Z",fill:"currentColor"})),SvgIconForumChatBubble=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M7.88998 13.03C8.45884 13.03 8.91998 12.5689 8.91998 12C8.91998 11.4311 8.45884 10.97 7.88998 10.97C7.32113 10.97 6.85999 11.4311 6.85999 12C6.85999 12.5689 7.32113 13.03 7.88998 13.03Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M13.03 12C13.03 12.5689 12.5688 13.03 12 13.03C11.4311 13.03 10.97 12.5689 10.97 12C10.97 11.4311 11.4311 10.97 12 10.97C12.5688 10.97 13.03 11.4311 13.03 12Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M17.14 12C17.14 12.5689 16.6789 13.03 16.11 13.03C15.5412 13.03 15.08 12.5689 15.08 12C15.08 11.4311 15.5412 10.97 16.11 10.97C16.6789 10.97 17.14 11.4311 17.14 12Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47579 2 2 6.47579 2 12C2 17.5242 6.47579 22 12 22C13.5469 22 15.0151 21.641 16.3216 21.0162L21.0902 21.7219C21.3249 21.7567 21.5621 21.6783 21.73 21.5107C21.8978 21.343 21.9765 21.1058 21.9421 20.8711L21.2106 15.8853C21.7121 14.6922 22 13.376 22 12C22 6.47579 17.5242 2 12 2ZM19.7456 15.4932C19.6692 15.6637 19.6601 15.854 19.7154 16.0277L20.3114 20.0903L16.3098 19.4981C16.156 19.4753 15.999 19.5009 15.8603 19.5713C14.7006 20.1604 13.3865 20.5 12 20.5C7.30421 20.5 3.5 16.6958 3.5 12C3.5 7.30421 7.30421 3.5 12 3.5C16.6958 3.5 20.5 7.30421 20.5 12C20.5 13.2383 20.2248 14.4241 19.7456 15.4932Z",fill:"currentColor"})),SvgIconLinkAlt=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M19.1872 4.81284C17.1369 2.76258 13.8128 2.76258 11.7626 4.81284L9.34834 7.22705C9.05545 7.51994 9.05545 7.99482 9.34834 8.28771C9.64124 8.5806 10.1161 8.5806 10.409 8.28771L12.8232 5.8735C14.2877 4.40903 16.6621 4.40903 18.1265 5.8735C19.591 7.33796 19.591 9.71233 18.1265 11.1768L15.7123 13.591C15.4194 13.8839 15.4194 14.3588 15.7123 14.6517C16.0052 14.9446 16.4801 14.9446 16.773 14.6517L19.1872 12.2375C21.2374 10.1872 21.2374 6.86309 19.1872 4.81284Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M8.28768 10.409C8.58058 10.1161 8.58058 9.64126 8.28768 9.34837C7.99479 9.05548 7.51992 9.05548 7.22703 9.34837L4.81281 11.7626C2.76256 13.8128 2.76256 17.137 4.81281 19.1872C6.86306 21.2375 10.1872 21.2375 12.2374 19.1872L14.6516 16.773C14.9445 16.4801 14.9445 16.0052 14.6516 15.7123C14.3588 15.4194 13.8839 15.4194 13.591 15.7123L11.1768 18.1265C9.7123 19.591 7.33793 19.591 5.87347 18.1265C4.409 16.6621 4.409 14.2877 5.87347 12.8232L8.28768 10.409Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M14.6517 10.409C14.9445 10.1161 14.9445 9.64126 14.6517 9.34837C14.3588 9.05548 13.8839 9.05548 13.591 9.34837L9.34835 13.591C9.05546 13.8839 9.05546 14.3588 9.34835 14.6517C9.64125 14.9446 10.1161 14.9446 10.409 14.6517L14.6517 10.409Z",fill:"currentColor"})),SvgIconModel=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 8.75C18.0059 8.75 17.5375 8.86027 17.1182 9.05753L14.9425 6.88181C15.1397 6.46247 15.25 5.99411 15.25 5.5C15.25 3.70507 13.7949 2.25 12 2.25C10.2051 2.25 8.75 3.70507 8.75 5.5C8.75 5.99411 8.86027 6.46247 9.05753 6.88181L6.88181 9.05753C6.46247 8.86027 5.99411 8.75 5.5 8.75C3.70507 8.75 2.25 10.2051 2.25 12C2.25 13.7949 3.70507 15.25 5.5 15.25C5.99411 15.25 6.46247 15.1397 6.88181 14.9425L9.05753 17.1182C8.86027 17.5375 8.75 18.0059 8.75 18.5C8.75 20.2949 10.2051 21.75 12 21.75C13.7949 21.75 15.25 20.2949 15.25 18.5C15.25 18.0059 15.1397 17.5375 14.9425 17.1182L17.1182 14.9425C17.5375 15.1397 18.0059 15.25 18.5 15.25C20.2949 15.25 21.75 13.7949 21.75 12C21.75 10.2051 20.2949 8.75 18.5 8.75ZM10.5915 17.4613C10.5974 17.4537 10.6032 17.446 10.6088 17.4382C10.9286 17.0199 11.4328 16.75 12 16.75C12.5673 16.75 13.0715 17.0199 13.3912 17.4383L13.3992 17.4492L13.4085 17.4613C13.6231 17.7518 13.75 18.1111 13.75 18.5C13.75 19.4665 12.9665 20.25 12 20.25C11.0335 20.25 10.25 19.4665 10.25 18.5C10.25 18.1111 10.3769 17.7518 10.5915 17.4613ZM9.99929 15.9386L8.06137 14.0007C8.34524 13.6378 8.55366 13.213 8.66303 12.75H15.337C15.4463 13.213 15.6548 13.6378 15.9386 14.0007L14.0007 15.9386C13.4491 15.5072 12.7546 15.25 12 15.25C11.2454 15.25 10.5509 15.5072 9.99929 15.9386ZM6.56174 13.3912C6.98011 13.0715 7.25 12.5672 7.25 12C7.25 11.4328 6.98011 10.9285 6.56174 10.6088C6.55398 10.6032 6.54631 10.5974 6.53872 10.5915C6.2482 10.3769 5.88891 10.25 5.5 10.25C4.5335 10.25 3.75 11.0335 3.75 12C3.75 12.9665 4.5335 13.75 5.5 13.75C5.88891 13.75 6.2482 13.6231 6.53872 13.4085C6.54631 13.4026 6.55398 13.3968 6.56174 13.3912ZM12 3.75C11.0335 3.75 10.25 4.5335 10.25 5.5C10.25 5.88891 10.3769 6.24818 10.5915 6.5387C10.5974 6.5463 10.6032 6.55399 10.6088 6.56175C10.9286 6.98012 11.4328 7.25 12 7.25C12.5672 7.25 13.0715 6.98011 13.3912 6.56174C13.3968 6.55398 13.4026 6.54631 13.4085 6.53872C13.6231 6.2482 13.75 5.88891 13.75 5.5C13.75 4.5335 12.9665 3.75 12 3.75ZM12 8.75C12.7546 8.75 13.4491 8.49284 14.0007 8.06137L15.9386 9.99929C15.6548 10.3622 15.4463 10.787 15.337 11.25H8.66303C8.55366 10.787 8.34524 10.3622 8.06137 9.99929L9.99929 8.06137C10.5509 8.49284 11.2454 8.75 12 8.75ZM17.4613 10.5915C17.4537 10.5974 17.446 10.6032 17.4382 10.6088C17.0199 10.9286 16.75 11.4328 16.75 12C16.75 12.5672 17.0199 13.0714 17.4382 13.3912C17.446 13.3968 17.4537 13.4026 17.4613 13.4085C17.7518 13.6231 18.1111 13.75 18.5 13.75C19.4665 13.75 20.25 12.9665 20.25 12C20.25 11.0335 19.4665 10.25 18.5 10.25C18.1111 10.25 17.7518 10.3769 17.4613 10.5915Z",fill:"currentColor"})),SvgIconRobotServiceMember=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M7.75 10.5C8.16421 10.5 8.5 10.8358 8.5 11.25V14.25C8.5 14.6642 8.16421 15 7.75 15C7.33579 15 7 14.6642 7 14.25V11.25C7 10.8358 7.33579 10.5 7.75 10.5Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M16.5 11.25C16.5 10.8358 16.1642 10.5 15.75 10.5C15.3358 10.5 15 10.8358 15 11.25V14.25C15 14.6642 15.3358 15 15.75 15C16.1642 15 16.5 14.6642 16.5 14.25V11.25Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M10.25 15.75C10.25 15.3358 10.5858 15 11 15H12.5C12.9142 15 13.25 15.3358 13.25 15.75C13.25 16.1642 12.9142 16.5 12.5 16.5H11C10.5858 16.5 10.25 16.1642 10.25 15.75Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 3C9.48122 3 8.25 4.23122 8.25 5.75V6H7.25C5.17893 6 3.5 7.67893 3.5 9.75V10.5415C2.08114 10.7795 1 12.0135 1 13.5C1 14.9865 2.08114 16.2205 3.5 16.4585V16.75C3.5 18.8211 5.17893 20.5 7.25 20.5H16.25C18.3211 20.5 20 18.8211 20 16.75V16.4585C21.4189 16.2205 22.5 14.9865 22.5 13.5C22.5 12.0135 21.4189 10.7795 20 10.5415V9.75C20 7.67893 18.3211 6 16.25 6H15.75V5.75C15.75 4.23122 14.5188 3 13 3H11ZM14.25 6V5.75C14.25 5.05964 13.6904 4.5 13 4.5H11C10.3096 4.5 9.75 5.05964 9.75 5.75V6H14.25ZM7.25 7.5C6.00736 7.5 5 8.50736 5 9.75V16.75C5 17.9926 6.00736 19 7.25 19H16.25C17.4926 19 18.5 17.9926 18.5 16.75V9.75C18.5 8.50736 17.4926 7.5 16.25 7.5H7.25ZM20 14.9146C20.5826 14.7087 21 14.1531 21 13.5C21 12.8469 20.5826 12.2913 20 12.0854V14.9146ZM2.5 13.5C2.5 12.8469 2.9174 12.2913 3.5 12.0854V14.9146C2.9174 14.7087 2.5 14.1531 2.5 13.5Z",fill:"currentColor"})),SvgIconBack=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M3.75109 12C3.75109 11.8909 3.77437 11.7871 3.81623 11.6936L3.93878 11.5033C3.94912 11.4916 3.95989 11.4801 3.97109 11.4689L11.22 4.22C11.5133 3.92667 11.9889 3.92667 12.2822 4.21999C12.5755 4.51332 12.5755 4.98889 12.2822 5.28222L6.31555 11.2489H19.2489C19.6637 11.2489 20 11.5852 20 12C20 12.4148 19.6637 12.7511 19.2489 12.7511H6.31553L12.2822 18.7178C12.5755 19.0111 12.5755 19.4867 12.2822 19.78C11.9889 20.0733 11.5133 20.0733 11.22 19.78L3.9711 12.5311L3.96949 12.5295C3.90034 12.4599 3.8476 12.3802 3.81129 12.2951C3.77254 12.2045 3.75109 12.1048 3.75109 12Z",fill:"currentColor"})),SvgIconCaret=et=>react.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.48112 7.5C6.30318 7.5 6.21344 7.71531 6.33806 7.84232C7.12968 8.64906 7.90963 9.47448 8.73109 10.2496C8.88222 10.3922 9.11776 10.3922 9.26888 10.2495C10.0903 9.47436 10.8703 8.64904 11.6619 7.84231C11.7866 7.71531 11.6968 7.5 11.5189 7.5H6.48112Z",fill:"#949699"})),SvgIconClose=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M5.53033 4.46967C5.23744 4.17678 4.76256 4.17678 4.46967 4.46967C4.17678 4.76256 4.17678 5.23744 4.46967 5.53033L10.9393 12L4.46967 18.4697C4.17678 18.7626 4.17678 19.2374 4.46967 19.5303C4.76256 19.8232 5.23744 19.8232 5.53033 19.5303L12 13.0607L18.4697 19.5303C18.7626 19.8232 19.2374 19.8232 19.5303 19.5303C19.8232 19.2374 19.8232 18.7626 19.5303 18.4697L13.0607 12L19.5303 5.53033C19.8232 5.23744 19.8232 4.76256 19.5303 4.46967C19.2374 4.17678 18.7626 4.17678 18.4697 4.46967L12 10.9393L5.53033 4.46967Z",fill:"currentColor"})),SvgIconCopy=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M6.00001 2.25C3.92948 2.25 2.25002 3.92675 2.25001 5.99835L2.25 15C2.25 15.96 2.61169 16.8372 3.20504 17.5002C3.48129 17.8088 3.95543 17.8351 4.26408 17.5589C4.57272 17.2826 4.59899 16.8085 4.32274 16.4998C3.96602 16.1012 3.75 15.5767 3.75 15L3.75001 5.99836C3.75001 4.75625 4.75684 3.75 6.00001 3.75H15C15.5767 3.75 16.1012 3.96602 16.4998 4.32274C16.8085 4.59899 17.2826 4.57272 17.5589 4.26408C17.8351 3.95543 17.8088 3.48129 17.5002 3.20504C16.8372 2.61169 15.96 2.25 15 2.25H6.00001Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 5.25C6.92893 5.25 5.25 6.92893 5.25 9V18C5.25 20.0711 6.92893 21.75 9 21.75H18C20.0711 21.75 21.75 20.0711 21.75 18V9C21.75 6.92893 20.0711 5.25 18 5.25H9ZM6.75 9C6.75 7.75736 7.75736 6.75 9 6.75H18C19.2426 6.75 20.25 7.75736 20.25 9V18C20.25 19.2426 19.2426 20.25 18 20.25H9C7.75736 20.25 6.75 19.2426 6.75 18V9Z",fill:"currentColor"})),SvgIconFullScreenModeExpand=et=>react.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 3.5625C3.98223 3.5625 3.5625 3.98223 3.5625 4.5V6C3.5625 6.31066 3.31066 6.5625 3 6.5625C2.68934 6.5625 2.4375 6.31066 2.4375 6V4.5C2.4375 3.36091 3.36091 2.4375 4.5 2.4375H6C6.31066 2.4375 6.5625 2.68934 6.5625 3C6.5625 3.31066 6.31066 3.5625 6 3.5625H4.5Z",fill:"#33373D"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5 3.5625C14.0178 3.5625 14.4375 3.98223 14.4375 4.5V6C14.4375 6.31066 14.6893 6.5625 15 6.5625C15.3107 6.5625 15.5625 6.31066 15.5625 6V4.5C15.5625 3.36091 14.6391 2.4375 13.5 2.4375H12C11.6893 2.4375 11.4375 2.68934 11.4375 3C11.4375 3.31066 11.6893 3.5625 12 3.5625H13.5Z",fill:"#33373D"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 14.4375C3.98223 14.4375 3.5625 14.0178 3.5625 13.5V12C3.5625 11.6893 3.31066 11.4375 3 11.4375C2.68934 11.4375 2.4375 11.6893 2.4375 12V13.5C2.4375 14.6391 3.36091 15.5625 4.5 15.5625H6C6.31066 15.5625 6.5625 15.3107 6.5625 15C6.5625 14.6893 6.31066 14.4375 6 14.4375H4.5Z",fill:"#33373D"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5 14.4375C14.0178 14.4375 14.4375 14.0178 14.4375 13.5V12C14.4375 11.6893 14.6893 11.4375 15 11.4375C15.3107 11.4375 15.5625 11.6893 15.5625 12V13.5C15.5625 14.6391 14.6391 15.5625 13.5 15.5625H12C11.6893 15.5625 11.4375 15.3107 11.4375 15C11.4375 14.6893 11.6893 14.4375 12 14.4375H13.5Z",fill:"#33373D"})),SvgIconMinimizeMode=et=>react.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M13.5 5.4375C12.9822 5.4375 12.5625 5.01777 12.5625 4.5V2.25C12.5625 1.93934 12.3107 1.6875 12 1.6875C11.6893 1.6875 11.4375 1.93934 11.4375 2.25V4.5C11.4375 5.63909 12.3609 6.5625 13.5 6.5625H15.75C16.0607 6.5625 16.3125 6.31066 16.3125 6C16.3125 5.68934 16.0607 5.4375 15.75 5.4375H13.5Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M5.4375 13.5C5.4375 12.9822 5.01777 12.5625 4.5 12.5625H2.25C1.93934 12.5625 1.6875 12.3107 1.6875 12C1.6875 11.6893 1.93934 11.4375 2.25 11.4375H4.5C5.63909 11.4375 6.5625 12.3609 6.5625 13.5V15.75C6.5625 16.0607 6.31066 16.3125 6 16.3125C5.68934 16.3125 5.4375 16.0607 5.4375 15.75V13.5Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M12.5625 13.5C12.5625 12.9822 12.9822 12.5625 13.5 12.5625H15.75C16.0607 12.5625 16.3125 12.3107 16.3125 12C16.3125 11.6893 16.0607 11.4375 15.75 11.4375H13.5C12.3609 11.4375 11.4375 12.3609 11.4375 13.5V15.75C11.4375 16.0607 11.6893 16.3125 12 16.3125C12.3107 16.3125 12.5625 16.0607 12.5625 15.75V13.5Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M5.4375 4.5C5.4375 5.01777 5.01777 5.4375 4.5 5.4375H2.25C1.93934 5.4375 1.6875 5.68934 1.6875 6C1.6875 6.31066 1.93934 6.5625 2.25 6.5625H4.5C5.63909 6.5625 6.5625 5.63909 6.5625 4.5V2.25C6.5625 1.93934 6.31066 1.6875 6 1.6875C5.68934 1.6875 5.4375 1.93934 5.4375 2.25V4.5Z",fill:"#33373D"})),SvgIconOverflowHorizontal=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 14.75C3.48122 14.75 2.25 13.5188 2.25 12C2.25 10.4812 3.48122 9.25 5 9.25C6.51878 9.25 7.75 10.4812 7.75 12C7.75 13.5188 6.51878 14.75 5 14.75ZM3.75 12C3.75 12.6904 4.30964 13.25 5 13.25C5.69036 13.25 6.25 12.6904 6.25 12C6.25 11.3096 5.69036 10.75 5 10.75C4.30964 10.75 3.75 11.3096 3.75 12Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 14.75C10.4812 14.75 9.25 13.5188 9.25 12C9.25 10.4812 10.4812 9.25 12 9.25C13.5188 9.25 14.75 10.4812 14.75 12C14.75 13.5188 13.5188 14.75 12 14.75ZM10.75 12C10.75 12.6904 11.3096 13.25 12 13.25C12.6904 13.25 13.25 12.6904 13.25 12C13.25 11.3096 12.6904 10.75 12 10.75C11.3096 10.75 10.75 11.3096 10.75 12Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.25 12C16.25 13.5188 17.4812 14.75 19 14.75C20.5188 14.75 21.75 13.5188 21.75 12C21.75 10.4812 20.5188 9.25 19 9.25C17.4812 9.25 16.25 10.4812 16.25 12ZM19 13.25C18.3096 13.25 17.75 12.6904 17.75 12C17.75 11.3096 18.3096 10.75 19 10.75C19.6904 10.75 20.25 11.3096 20.25 12C20.25 12.6904 19.6904 13.25 19 13.25Z",fill:"currentColor"})),SvgIconRetry=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M5.25 14.5C5.35915 14.5 5.46285 14.4767 5.55643 14.4349L5.74673 14.3123C5.75844 14.302 5.7699 14.2912 5.7811 14.28L9.03 11.0311C9.32333 10.7378 9.32333 10.2622 9.03001 9.96887C8.73668 9.67555 8.26111 9.67555 7.96778 9.96887L6.00111 11.9355C6.00111 10.6546 6.00083 10.2487 6.00055 9.84277C6.00028 9.43685 6 9.03093 6 7.75C6 6.50736 7.00736 5.5 8.25 5.5H15.75C16.1642 5.5 16.5 5.16421 16.5 4.75C16.5 4.33579 16.1642 4 15.75 4H8.25C6.17893 4 4.5 5.67893 4.5 7.75C4.5 9.03093 4.49972 9.43685 4.49945 9.84277C4.49917 10.2487 4.4989 10.6546 4.4989 11.9356L2.53222 9.96888C2.23889 9.67555 1.76332 9.67555 1.46999 9.96888C1.17667 10.2622 1.17667 10.7378 1.46999 11.0311L4.71888 14.28L4.72049 14.2816C4.79005 14.3508 4.86979 14.4035 4.95486 14.4398C5.04546 14.4785 5.14523 14.5 5.25 14.5Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M18.5 9.5C18.3909 9.5 18.2871 9.52328 18.1936 9.56514L18.0033 9.68769C17.9916 9.69803 17.9801 9.70881 17.9689 9.72001L14.72 12.9689C14.4267 13.2622 14.4267 13.7378 14.72 14.0311C15.0133 14.3245 15.4889 14.3245 15.7822 14.0311L17.7489 12.0645C17.7489 13.3454 17.7492 13.7513 17.7494 14.1572C17.7497 14.5632 17.75 14.9691 17.75 16.25C17.75 17.4926 16.7426 18.5 15.5 18.5H8C7.58579 18.5 7.25 18.8358 7.25 19.25C7.25 19.6642 7.58579 20 8 20H15.5C17.5711 20 19.25 18.3211 19.25 16.25C19.25 14.9691 19.2503 14.5631 19.2506 14.1572C19.2508 13.7513 19.2511 13.3454 19.2511 12.0644L21.2178 14.0311C21.5111 14.3244 21.9867 14.3244 22.28 14.0311C22.5733 13.7378 22.5733 13.2622 22.28 12.9689L19.0311 9.72001L19.0295 9.7184C18.9599 9.64925 18.8802 9.59651 18.7951 9.56021C18.7045 9.52145 18.6048 9.5 18.5 9.5Z",fill:"currentColor"})),SvgIconSplit=et=>react.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.4375 16.1C8.4375 16.3209 8.61659 16.5 8.8375 16.5H9.1625C9.38341 16.5 9.5625 16.3209 9.5625 16.1V14.8125H13.5C14.6391 14.8125 15.5625 13.8891 15.5625 12.75V5.25C15.5625 4.11091 14.6391 3.1875 13.5 3.1875H9.5625V1.9C9.5625 1.67909 9.38341 1.5 9.1625 1.5H8.8375C8.61659 1.5 8.4375 1.67909 8.4375 1.9V16.1ZM9.5625 4.3125V13.6875H13.5C14.0178 13.6875 14.4375 13.2678 14.4375 12.75V5.25C14.4375 4.73223 14.0178 4.3125 13.5 4.3125H9.5625Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M2.4375 5.25C2.4375 4.11091 3.36091 3.1875 4.5 3.1875H7.1C7.32091 3.1875 7.5 3.36659 7.5 3.5875V3.9125C7.5 4.13341 7.32091 4.3125 7.1 4.3125H4.5C3.98223 4.3125 3.5625 4.73223 3.5625 5.25V12.75C3.5625 13.2678 3.98223 13.6875 4.5 13.6875H7.1C7.32091 13.6875 7.5 13.8666 7.5 14.0875V14.4125C7.5 14.6334 7.32091 14.8125 7.1 14.8125H4.5C3.36091 14.8125 2.4375 13.8891 2.4375 12.75V5.25Z",fill:"#33373D"})),SvgIconUndo=et=>react.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M6.39775 4.33525C6.61742 4.11558 6.61742 3.75942 6.39775 3.53975C6.17808 3.32008 5.82192 3.32008 5.60225 3.53975L2.97725 6.16475C2.86742 6.27459 2.8125 6.41854 2.8125 6.5625C2.8125 6.63877 2.82768 6.71149 2.85518 6.77782C2.88263 6.84416 2.92332 6.90632 2.97725 6.96025L5.60225 9.58525C5.82192 9.80492 6.17808 9.80492 6.39775 9.58525C6.61742 9.36558 6.61742 9.00942 6.39775 8.78975L4.733 7.125H11.25C12.8033 7.125 14.0625 8.3842 14.0625 9.9375C14.0625 11.4908 12.8034 12.75 11.2502 12.75H7.125C6.81434 12.75 6.5625 13.0018 6.5625 13.3125C6.5625 13.6232 6.81434 13.875 7.125 13.875H11.2502C13.4248 13.875 15.1875 12.1121 15.1875 9.9375C15.1875 7.76288 13.4246 6 11.25 6H4.733L6.39775 4.33525Z",fill:"#33373D"})),SvgIconWeave=et=>react.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M6.81978 2.4419C7.12804 2.48044 7.3467 2.76157 7.30817 3.06983L7.01221 5.43755H11.5041L11.3634 6.56255H3C2.68934 6.56255 2.4375 6.31071 2.4375 6.00005C2.4375 5.68939 2.68934 5.43755 3 5.43755H5.87845L6.19186 2.93029C6.23039 2.62203 6.51152 2.40337 6.81978 2.4419Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M5.69095 6.93755H6.82471L6.47314 9.75005H6.465L5.9025 14.25H5.91064L5.80817 15.0698C5.76964 15.3781 5.48851 15.5967 5.18024 15.5582C4.87198 15.5197 4.65332 15.2386 4.69186 14.9303L4.98783 12.5625H3C2.68934 12.5625 2.4375 12.3107 2.4375 12C2.4375 11.6894 2.68934 11.4375 3 11.4375H5.12845L5.69095 6.93755Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M10.9878 12.5625H6.48844L6.62906 11.4375H15C15.3107 11.4375 15.5625 11.6894 15.5625 12C15.5625 12.3107 15.3107 12.5625 15 12.5625H12.1216L11.8082 15.0698C11.7696 15.3781 11.4885 15.5967 11.1802 15.5582C10.872 15.5197 10.6533 15.2386 10.6919 14.9303L10.9878 12.5625Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M12.8716 6.56255L12.3091 11.0625H11.1753L12.1919 2.93029C12.2304 2.62203 12.5115 2.40337 12.8198 2.4419C13.128 2.48044 13.3467 2.76157 13.3082 3.06983L13.0122 5.43755H15C15.3107 5.43755 15.5625 5.68939 15.5625 6.00005C15.5625 6.31071 15.3107 6.56255 15 6.56255H12.8716Z",fill:"#33373D"})),SvgIconWeaveLogo=et=>react.exports.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M20.3906 5.34777C20.1746 4.12318 21.1167 3.00049 22.3602 3.00049H27C28.1046 3.00049 29 3.89592 29 5.00049V5.56202C29 6.53261 28.3031 7.36309 27.3473 7.53164L22.9434 8.30818C21.8556 8.49999 20.8183 7.77365 20.6265 6.68585L20.3906 5.34777Z",fill:"white"}),react.exports.createElement("path",{d:"M9.83007 5.34776C9.61416 4.12317 10.5562 3.00049 11.7997 3.00049L16.1862 3.00049C17.1568 3.00049 17.9873 3.69735 18.1558 4.6532L18.578 7.04718C18.7698 8.13497 18.0434 9.17229 16.9556 9.36409L12.7013 10.1142C11.6135 10.306 10.5762 9.57969 10.3844 8.49189L9.83007 5.34776Z",fill:"white"}),react.exports.createElement("path",{d:"M5.34732 11.4111C4.12272 11.627 3 10.685 3 9.44146V5.00049C3 3.89592 3.89543 3.00049 5 3.00049H5.62575C6.59635 3.00049 7.42684 3.69736 7.59537 4.65321L8.33591 8.85325C8.52771 9.94103 7.80139 10.9783 6.71362 11.1701L5.34732 11.4111Z",fill:"white"}),react.exports.createElement("path",{d:"M5.3473 21.9716C4.1227 22.1875 3 21.2454 3 20.002V15.6154C3 14.6448 3.69685 13.8144 4.65267 13.6458L7.07485 13.2187C8.16265 13.0269 9.19998 13.7532 9.39179 14.841L10.1419 19.0953C10.3337 20.1831 9.6074 21.2204 8.51961 21.4122L5.3473 21.9716Z",fill:"white"}),react.exports.createElement("path",{d:"M11.4747 26.6532C11.6906 27.8778 10.7485 29.0005 9.50504 29.0005H5C3.89543 29.0005 3 28.1051 3 27.0005V26.1757C3 25.2051 3.69686 24.3746 4.65269 24.206L8.88087 23.4605C9.96867 23.2687 11.006 23.995 11.1978 25.0828L11.4747 26.6532Z",fill:"white"}),react.exports.createElement("path",{d:"M26.2392 29.0005C25.2686 29.0005 24.4381 28.3036 24.2696 27.3478L23.4881 22.9157C23.2963 21.8279 24.0227 20.7906 25.1104 20.5988L26.6527 20.3268C27.8773 20.1109 29 21.053 29 22.2964V27.0005C29 28.1051 28.1046 29.0005 27 29.0005H26.2392Z",fill:"white"}),react.exports.createElement("path",{d:"M29 16.1228C29 17.0933 28.3032 17.9238 27.3473 18.0924L24.7494 18.5505C23.6616 18.7423 22.6243 18.016 22.4325 16.9282L21.6824 12.6739C21.4906 11.5861 22.2169 10.5488 23.3047 10.357L26.6527 9.76661C27.8773 9.55068 29 10.4927 29 11.7362L29 16.1228Z",fill:"white"}),react.exports.createElement("path",{d:"M22.0351 26.6532C22.251 27.8778 21.309 29.0005 20.0655 29.0005H15.6789C14.7083 29.0005 13.8779 28.3037 13.7093 27.3478L13.2461 24.7215C13.0543 23.6337 13.7807 22.5964 14.8685 22.4046L19.123 21.6544C20.2108 21.4626 21.2481 22.189 21.4399 23.2768L22.0351 26.6532Z",fill:"white"}),react.exports.createElement("path",{d:"M20.384 17.2893C20.5758 18.377 19.8495 19.4144 18.7617 19.6062L14.5074 20.3563C13.4196 20.5481 12.3822 19.8218 12.1904 18.734L11.4403 14.4797C11.2485 13.3919 11.9748 12.3546 13.0626 12.1627L17.3169 11.4126C18.4047 11.2208 19.4421 11.9471 19.6339 13.0349L20.384 17.2893Z",fill:"white"}),react.exports.createElement("path",{d:"M9.82979 5.34783C9.61387 4.12324 10.5559 3.00056 11.7994 3.00056L16.1859 3.00056C17.1565 3.00056 17.987 3.69743 18.1556 4.65327L18.5777 7.04726C18.7695 8.13504 18.0431 9.17236 16.9554 9.36416L12.7011 10.1143C11.6133 10.3061 10.5759 9.57976 10.3841 8.49196L9.82979 5.34783Z",fill:"#FFD95C"}),react.exports.createElement("path",{d:"M20.3906 5.34774C20.1746 4.12314 21.1167 3.00045 22.3602 3.00045L27 3.00045C28.1046 3.00045 29 3.89588 29 5.00045V5.56199C29 6.53257 28.3031 7.36306 27.3473 7.5316L22.9434 8.30815C21.8556 8.49996 20.8183 7.77361 20.6265 6.68582L20.3906 5.34774Z",fill:"#00CDDB"}),react.exports.createElement("path",{d:"M29 16.1226C29 17.0932 28.3032 17.9237 27.3473 18.0922L24.7494 18.5503C23.6616 18.7422 22.6243 18.0158 22.4325 16.928L21.6824 12.6737C21.4906 11.5859 22.2169 10.5486 23.3047 10.3568L26.6527 9.76646C27.8773 9.55053 29 10.4926 29 11.7361V16.1226Z",fill:"#DE72FF"}),react.exports.createElement("path",{d:"M20.3843 17.2894C20.5761 18.3772 19.8498 19.4145 18.762 19.6063L14.5077 20.3565C13.4199 20.5483 12.3826 19.822 12.1908 18.7342L11.4406 14.4798C11.2488 13.3921 11.9752 12.3547 13.0629 12.1629L17.3173 11.4128C18.4051 11.221 19.4424 11.9473 19.6342 13.0351L20.3843 17.2894Z",fill:"#454B52"}),react.exports.createElement("path",{d:"M26.2392 29.0005C25.2686 29.0005 24.4381 28.3036 24.2696 27.3478L23.4881 22.9157C23.2963 21.8279 24.0227 20.7906 25.1104 20.5988L26.6527 20.3268C27.8773 20.1109 29 21.053 29 22.2964V27.0005C29 28.1051 28.1046 29.0005 27 29.0005H26.2392Z",fill:"#FFCBAD"}),react.exports.createElement("path",{d:"M22.0355 26.6532C22.2514 27.8778 21.3093 29.0005 20.0659 29.0005H15.6792C14.7087 29.0005 13.8782 28.3037 13.7096 27.3478L13.2465 24.7215C13.0547 23.6337 13.781 22.5964 14.8688 22.4046L19.1233 21.6544C20.2111 21.4626 21.2484 22.189 21.4402 23.2768L22.0355 26.6532Z",fill:"#FFD95C"}),react.exports.createElement("path",{d:"M5.3469 11.4114C4.1223 11.6274 2.99958 10.6853 2.99958 9.44184L2.99958 5.00086C2.99958 3.89629 3.89501 3.00086 4.99958 3.00086H5.62533C6.59593 3.00086 7.42642 3.69773 7.59495 4.65358L8.3355 8.85363C8.52729 9.9414 7.80097 10.9787 6.7132 11.1705L5.3469 11.4114Z",fill:"#FFCBAD"}),react.exports.createElement("path",{d:"M5.3475 21.9715C4.12291 22.1874 3.0002 21.2454 3.0002 20.0019L3.0002 15.6154C3.0002 14.6448 3.69705 13.8143 4.65288 13.6457L7.07505 13.2186C8.16285 13.0268 9.20019 13.7531 9.392 14.8409L10.1421 19.0952C10.3339 20.183 9.6076 21.2203 8.51982 21.4121L5.3475 21.9715Z",fill:"#DE72FF"}),react.exports.createElement("path",{d:"M11.4749 26.6532C11.6908 27.8778 10.7488 29.0005 9.50531 29.0005H5.00027C3.8957 29.0005 3.00027 28.1051 3.00027 27.0005V26.1757C3.00027 25.2051 3.69713 24.3746 4.65297 24.206L8.88114 23.4605C9.96895 23.2687 11.0063 23.995 11.1981 25.0828L11.4749 26.6532Z",fill:"#00CDDB"})),SvgIconWeaveLogoGray=et=>react.exports.createElement("svg",{width:64,height:64,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M11.5627 4.06824C11.1508 1.71538 9.12077 0 6.74832 0H4.88863C2.18872 0 0 2.20413 0 4.92306V16.5022C0 19.5631 2.74425 21.882 5.73755 21.3505L9.50731 20.6811C12.1662 20.2089 13.9416 17.6556 13.4728 14.978L11.5627 4.06824Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M21.0603 28.8275C20.5914 26.1499 22.3668 23.5965 25.0257 23.1244L35.4246 21.2779C38.0835 20.8057 40.6191 22.5936 41.0879 25.2713L42.9215 35.7434C43.3903 38.421 41.6149 40.9744 38.956 41.4465L28.5571 43.293C25.8982 43.7652 23.3627 41.9773 22.8938 39.2996L21.0603 28.8275Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M4.03967 26.8503C1.70332 27.2652 0 29.3095 0 31.6986V42.4961C0 45.557 2.74424 47.8759 5.73754 47.3444L13.9212 45.8912C16.58 45.4191 18.3554 42.8657 17.8866 40.1881L16.053 29.716C15.5842 27.0384 13.0486 25.2505 10.3897 25.7227L4.03967 26.8503Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M46.8574 58.2219C47.3851 61.2362 45.0824 63.9998 42.043 63.9998H31.3209C28.9485 63.9998 26.9185 62.2844 26.5065 59.9316L25.4747 54.0387C25.0059 51.3611 26.7813 48.8077 29.4402 48.3356L39.8391 46.4891C42.498 46.0169 45.0335 47.8049 45.5023 50.4825L46.8574 58.2219Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M21.0442 58.2221C21.572 61.2365 19.2693 64 16.2298 64H4.88863C2.18872 64 0 61.7959 0 59.0769V57.6947C0 55.3056 1.70334 53.2613 4.03971 52.8464L14.8042 50.935C17.4632 50.4628 19.9987 52.2507 20.4675 54.9284L21.0442 58.2221Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M16.8996 5.77903C16.3719 2.76468 18.6745 0.00120192 21.714 0.00120192H32.4362C34.8086 0.00120192 36.8385 1.71649 37.2506 4.06927L38.3827 10.534C38.8516 13.2117 37.0761 15.7651 34.4172 16.2373L24.0179 18.0838C21.3589 18.5559 18.8234 16.7679 18.3546 14.0903L16.8996 5.77903Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M64 47.7143C64 44.6534 61.2557 42.3345 58.2624 42.8661L54.9227 43.4591C52.2639 43.9313 50.4885 46.4846 50.9573 49.1622L52.7675 59.5008C53.1794 61.8536 55.2094 63.569 57.5818 63.569H59.1114C61.8113 63.569 64 61.3649 64 58.6459V47.7143Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M57.7883 17.02C60.7816 16.4884 63.5259 18.8073 63.5259 21.8682V32.6658C63.5259 35.0549 61.8226 37.0992 59.4862 37.5141L53.5657 38.5655C50.9067 39.0376 48.3712 37.2497 47.9023 34.5721L46.0687 24.1C45.5999 21.4224 47.3753 18.869 50.0342 18.3969L57.7883 17.02Z",fill:"#EDEFF2"}),react.exports.createElement("path",{d:"M47.652 0C44.6126 0 42.3099 2.76349 42.8376 5.77784L43.5144 9.64341C43.9832 12.3211 46.5188 14.1091 49.1777 13.6369L59.5127 11.8017C61.8491 11.3868 63.5524 9.34253 63.5524 6.95341V4.92306C63.5524 2.20413 61.3637 0 58.6638 0H47.652Z",fill:"#EDEFF2"})),SvgIconDocs=et=>react.exports.createElement("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M10.25 5.18734C9.93934 5.18734 9.6875 5.43918 9.6875 5.74984C9.6875 6.0605 9.93934 6.31234 10.25 6.31234H12.5C12.8107 6.31234 13.0625 6.0605 13.0625 5.74984C13.0625 5.43918 12.8107 5.18734 12.5 5.18734H10.25Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M9.6875 8.37484C9.6875 8.06418 9.93934 7.81234 10.25 7.81234H12.5C12.8107 7.81234 13.0625 8.06418 13.0625 8.37484C13.0625 8.6855 12.8107 8.93734 12.5 8.93734H10.25C9.93934 8.93734 9.6875 8.6855 9.6875 8.37484Z",fill:"#33373D"}),react.exports.createElement("path",{d:"M10.25 10.4373C9.93934 10.4373 9.6875 10.6892 9.6875 10.9998C9.6875 11.3105 9.93934 11.5623 10.25 11.5623H12.5C12.8107 11.5623 13.0625 11.3105 13.0625 10.9998C13.0625 10.6892 12.8107 10.4373 12.5 10.4373H10.25Z",fill:"#33373D"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.81302 0.838227C6.9847 1.18321 7.81114 1.78453 8.2799 2.18734H13.3925C14.569 2.18734 15.5 3.17703 15.5 4.35251V12.3894C15.5 13.5612 14.5724 14.5623 13.3925 14.5623H2.6075C1.44934 14.5623 0.5 13.613 0.5 12.4548V4.22732C0.5 3.06916 1.44934 2.11982 2.6075 2.11982H2.8175V1.90235C2.8175 1.16057 3.42247 0.541347 4.1869 0.567706C4.65658 0.584187 5.21473 0.658107 5.81302 0.838227ZM3.9425 1.90235C3.9425 1.77413 4.04255 1.6884 4.14813 1.69204C4.5329 1.70557 4.9943 1.76647 5.49019 1.91591L5.49378 1.91698C6.38022 2.1777 7.03117 2.617 7.4375 2.94909V12.4785C7.05468 12.1429 6.5657 11.8095 5.95593 11.5594L5.95472 11.5589C5.27268 11.2811 4.62905 11.1902 4.13559 11.1656L4.12794 11.1652C4.03158 11.1617 3.9425 11.0785 3.9425 10.9624V1.90235ZM8.5625 13.4373V3.31234H13.3925C13.9111 3.31234 14.375 3.76113 14.375 4.35251V12.3894C14.375 12.9844 13.9076 13.4373 13.3925 13.4373H8.5625ZM6.8198 13.4373C6.50125 13.1357 6.07658 12.8249 5.52973 12.6006C4.99838 12.3842 4.48852 12.3099 4.08264 12.2893C3.35623 12.2605 2.8175 11.6548 2.8175 10.9624V3.24482H2.6075C2.07066 3.24482 1.625 3.69048 1.625 4.22732V12.4548C1.625 12.9917 2.07066 13.4373 2.6075 13.4373H6.8198Z",fill:"#33373D"})),SvgIconDelete=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M9.75 9C10.1642 9 10.5 9.33579 10.5 9.75V17.14C10.5 17.5542 10.1642 17.89 9.75 17.89C9.33579 17.89 9 17.5542 9 17.14V9.75C9 9.33579 9.33579 9 9.75 9Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M15 9.75C15 9.33579 14.6642 9 14.25 9C13.8358 9 13.5 9.33579 13.5 9.75V16.75C13.5 17.1642 13.8358 17.5 14.25 17.5C14.6642 17.5 15 17.1642 15 16.75V9.75Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0002 1.98999C9.4815 1.98999 8.25 3.22111 8.25 4.73999V5.08002H3.78998C3.37576 5.08002 3.03998 5.4158 3.03998 5.83002C3.03998 6.24423 3.37576 6.58002 3.78998 6.58002H4.75V18.24C4.75 20.3111 6.42893 21.99 8.5 21.99H15.4894C17.5605 21.99 19.2394 20.3111 19.2394 18.24V6.58002H20.21C20.6242 6.58002 20.96 6.24423 20.96 5.83002C20.96 5.4158 20.6242 5.08002 20.21 5.08002H15.75V4.73999C15.75 3.22111 14.5185 1.98999 12.9998 1.98999H11.0002ZM9.75 4.73999C9.75 4.04973 10.3097 3.48999 11.0002 3.48999H12.9998C13.6903 3.48999 14.25 4.04973 14.25 4.73999V5.06999H9.75V4.73999ZM6.25 6.58002H17.7394V18.24C17.7394 19.4827 16.7321 20.49 15.4894 20.49H8.5C7.25736 20.49 6.25 19.4827 6.25 18.24V6.58002Z",fill:"currentColor"})),SvgIconPencilEdit=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2478 4.04505C17.1739 2.97111 15.4327 2.97111 14.3587 4.04505L13.3004 5.1034L13.2981 5.10571L13.2958 5.10803L5.2981 13.1057L5.16635 13.2374C5.09252 13.3113 5.03492 13.3997 4.99724 13.4971L3.58169 17.1546C3.03313 18.572 4.42796 19.9668 5.84536 19.4183L9.50291 18.0027C9.60028 17.9651 9.68871 17.9075 9.76254 17.8336L9.89101 17.7052L9.89429 17.7019L9.89755 17.6986L17.8943 9.7019L18.9549 8.64124C20.0289 7.5673 20.0289 5.8261 18.9549 4.75216L18.2478 4.04505ZM4.98058 17.696L6.05405 14.9223L8.07766 16.9459L5.30396 18.0194C5.10148 18.0978 4.90222 17.8985 4.98058 17.696ZM6.88908 13.636L9.36395 16.1109L16.3033 9.17158L13.8284 6.6967L6.88908 13.636ZM17.3639 8.11092L17.8943 7.58058C18.3824 7.09243 18.3824 6.30097 17.8943 5.81282L17.1872 5.10571C16.699 4.61755 15.9076 4.61755 15.4194 5.10571L14.8891 5.63605L17.3639 8.11092ZM6 20.25C5.58578 20.25 5.25 20.5858 5.25 21C5.25 21.4142 5.58578 21.75 6 21.75H18C18.4142 21.75 18.75 21.4142 18.75 21C18.75 20.5858 18.4142 20.25 18 20.25H6Z",fill:"currentColor"})),SvgIconAddNew=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M4 11.25C3.58579 11.25 3.25 11.5858 3.25 12C3.25 12.4142 3.58579 12.75 4 12.75H11.25V20C11.25 20.4142 11.5858 20.75 12 20.75C12.4142 20.75 12.75 20.4142 12.75 20V12.75H20C20.4142 12.75 20.75 12.4142 20.75 12C20.75 11.5858 20.4142 11.25 20 11.25H12.75V4C12.75 3.58579 12.4142 3.25 12 3.25C11.5858 3.25 11.25 3.58579 11.25 4V11.25H4Z",fill:"currentColor"})),SvgIconOpenNewTab=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M17.7797 6.21999C17.8569 6.29717 17.9138 6.38696 17.9503 6.48273L17.9982 6.70395C17.9992 6.71954 17.9997 6.73527 17.9997 6.7511L17.9997 17.0026C17.9997 17.4174 17.6634 17.7537 17.2486 17.7537C16.8338 17.7537 16.4975 17.4174 16.4975 17.0026L16.4975 8.56445L7.35223 17.7097C7.0589 18.003 6.58333 18.003 6.29 17.7097C5.99668 17.4164 5.99668 16.9408 6.29 16.6475L15.4353 7.50221L6.99711 7.50222C6.58229 7.50222 6.24601 7.16594 6.24601 6.75111C6.246 6.33629 6.58229 6.00001 6.99711 6.00001L17.2486 6L17.2509 6C17.3489 6.00029 17.4426 6.01939 17.5284 6.05387C17.6199 6.09053 17.7056 6.1459 17.7797 6.21999Z",fill:"currentColor"})),SvgIconHome=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.62868 3.67887C10.9944 2.44034 13.0058 2.44038 14.3714 3.67897L20.449 9.16579L20.4506 9.16729C21.2896 9.91799 21.75 11.0053 21.75 12.145V19.005C21.75 21.0761 20.0711 22.755 18 22.755H6C3.92893 22.755 2.25 21.0761 2.25 19.005V12.145C2.25 11.0052 2.71045 9.91782 3.54955 9.16711L9.6279 3.67958L9.62868 3.67887ZM10.6359 4.79042C11.43 4.06986 12.57 4.06986 13.3641 4.79042L13.3655 4.79169L19.4466 10.2817L19.4494 10.2842C19.9521 10.7335 20.25 11.4055 20.25 12.145V19.005C20.25 20.2476 19.2426 21.255 18 21.255H15.75V16.5C15.75 14.9812 14.5188 13.75 13 13.75H11C9.48122 13.75 8.25 14.9812 8.25 16.5V21.255H6C4.75736 21.255 3.75 20.2476 3.75 19.005V12.145C3.75 11.4055 4.04793 10.7335 4.5506 10.2842L10.6345 4.79169L10.6359 4.79042ZM9.75 16.5C9.75 15.8096 10.3096 15.25 11 15.25H13C13.6904 15.25 14.25 15.8096 14.25 16.5V21.25H9.75V16.5Z",fill:"currentColor"})),SvgIconCheckmark=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M19.7803 7.28033C20.0732 6.98744 20.0732 6.51256 19.7803 6.21967C19.4874 5.92678 19.0126 5.92678 18.7197 6.21967L9.25 15.6893L4.78033 11.2197C4.48744 10.9268 4.01256 10.9268 3.71967 11.2197C3.42678 11.5126 3.42678 11.9874 3.71967 12.2803L8.71967 17.2803C8.75628 17.3169 8.79574 17.349 8.83732 17.3764C9.12844 17.5686 9.52405 17.5366 9.78033 17.2803L19.7803 7.28033Z",fill:"currentColor"})),SvgIconLoading=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M12.75 5C12.75 4.58579 12.4142 4.25 12 4.25C11.5858 4.25 11.25 4.58579 11.25 5V6.75C11.25 7.16421 11.5858 7.5 12 7.5C12.4142 7.5 12.75 7.16421 12.75 6.75V5Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M7.58034 6.51966C7.28745 6.22677 6.81257 6.22676 6.51968 6.51965C6.22678 6.81254 6.22678 7.28742 6.51967 7.58031L7.75967 8.82033C8.05256 9.11323 8.52743 9.11323 8.82033 8.82034C9.11322 8.52745 9.11323 8.05258 8.82034 7.75968L7.58034 6.51966Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M4.25 12C4.25 11.5858 4.58579 11.25 5 11.25H6.75C7.16421 11.25 7.5 11.5858 7.5 12C7.5 12.4142 7.16421 12.75 6.75 12.75H5C4.58579 12.75 4.25 12.4142 4.25 12Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M8.82034 16.2403C9.11323 15.9474 9.11322 15.4725 8.82033 15.1796C8.52743 14.8867 8.05256 14.8867 7.75967 15.1796L6.51967 16.4197C6.22678 16.7126 6.22678 17.1874 6.51968 17.4803C6.81257 17.7732 7.28745 17.7732 7.58034 17.4803L8.82034 16.2403Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M12 16.5C12.4142 16.5 12.75 16.8358 12.75 17.25V19C12.75 19.4142 12.4142 19.75 12 19.75C11.5858 19.75 11.25 19.4142 11.25 19V17.25C11.25 16.8358 11.5858 16.5 12 16.5Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M16.2403 15.1796C15.9474 14.8867 15.4726 14.8867 15.1797 15.1796C14.8868 15.4725 14.8868 15.9474 15.1797 16.2403L16.4197 17.4803C16.7125 17.7732 17.1874 17.7732 17.4803 17.4803C17.7732 17.1874 17.7732 16.7126 17.4803 16.4197L16.2403 15.1796Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M16.5 12C16.5 11.5858 16.8358 11.25 17.25 11.25H19C19.4142 11.25 19.75 11.5858 19.75 12C19.75 12.4142 19.4142 12.75 19 12.75H17.25C16.8358 12.75 16.5 12.4142 16.5 12Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M17.4803 7.58031C17.7732 7.28742 17.7732 6.81254 17.4803 6.51965C17.1874 6.22676 16.7125 6.22677 16.4197 6.51966L15.1797 7.75968C14.8868 8.05258 14.8868 8.52745 15.1797 8.82034C15.4726 9.11323 15.9474 9.11323 16.2403 8.82033L17.4803 7.58031Z",fill:"currentColor"})),SvgIconInfo=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M12 9.08002C12.4142 9.08002 12.75 8.74423 12.75 8.33002C12.75 7.9158 12.4142 7.58002 12 7.58002C11.5858 7.58002 11.25 7.9158 11.25 8.33002C11.25 8.74423 11.5858 9.08002 12 9.08002Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M12 10.25C12.4142 10.25 12.75 10.5858 12.75 11V15.66C12.75 16.0742 12.4142 16.41 12 16.41C11.5858 16.41 11.25 16.0742 11.25 15.66V11C11.25 10.5858 11.5858 10.25 12 10.25Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.25 12C2.25 6.61522 6.61522 2.25 12 2.25C17.3848 2.25 21.75 6.61522 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C6.61522 21.75 2.25 17.3848 2.25 12ZM12 3.75C7.44365 3.75 3.75 7.44365 3.75 12C3.75 16.5563 7.44365 20.25 12 20.25C16.5563 20.25 20.25 16.5563 20.25 12C20.25 7.44365 16.5563 3.75 12 3.75Z",fill:"currentColor"})),SvgIconLaptopLocalComputer=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{d:"M10 17.5C9.58579 17.5 9.25 17.8358 9.25 18.25C9.25 18.6642 9.58579 19 10 19H14C14.4142 19 14.75 18.6642 14.75 18.25C14.75 17.8358 14.4142 17.5 14 17.5H10Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 4.75V14.5729L1.54033 17.9923C1.3494 18.3742 1.25 18.7952 1.25 19.2221V19.75C1.25 20.7165 2.0335 21.5 3 21.5H21C21.9665 21.5 22.75 20.7165 22.75 19.75V19.2221C22.75 18.7952 22.6506 18.3742 22.4597 17.9923L20.75 14.5729V4.75C20.75 3.7835 19.9665 3 19 3H5C4.0335 3 3.25 3.7835 3.25 4.75ZM5 4.5C4.86193 4.5 4.75 4.61193 4.75 4.75V14H19.25V4.75C19.25 4.61193 19.1381 4.5 19 4.5H5ZM2.88197 18.6631L4.46353 15.5H19.5365L21.118 18.6631C21.2048 18.8367 21.25 19.0281 21.25 19.2221V19.75C21.25 19.8881 21.1381 20 21 20H3C2.86193 20 2.75 19.8881 2.75 19.75V19.2221C2.75 19.0281 2.79518 18.8367 2.88197 18.6631Z",fill:"currentColor"})),SvgIconUsersTeam=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.25 7.75C5.25 5.67893 6.92892 4 8.99999 4C11.0711 4 12.75 5.67893 12.75 7.75C12.75 9.82107 11.0711 11.5 8.99999 11.5C6.92892 11.5 5.25 9.82107 5.25 7.75ZM8.99999 5.5C7.75735 5.5 6.75 6.50735 6.75 7.75C6.75 8.99264 7.75735 10 8.99999 10C10.2426 10 11.25 8.99264 11.25 7.75C11.25 6.50736 10.2426 5.5 8.99999 5.5Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M6.43127 14.5C4.98709 14.5 3.75 15.7459 3.75 17.37V18.75C3.75 19.1642 3.41421 19.5 3 19.5C2.58579 19.5 2.25 19.1642 2.25 18.75V17.37C2.25 14.9941 4.08399 13 6.43127 13H11.5687C13.916 13 15.75 14.9941 15.75 17.37V18.75C15.75 19.1642 15.4142 19.5 15 19.5C14.5858 19.5 14.25 19.1642 14.25 18.75V17.37C14.25 15.7459 13.0129 14.5 11.5687 14.5H6.43127Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 9.75C14 8.09314 15.3432 6.75 17 6.75C18.6569 6.75 20 8.09315 20 9.75C20 11.4069 18.6569 12.75 17 12.75C15.3432 12.75 14 11.4069 14 9.75ZM17 8.25C16.1716 8.25 15.5 8.92158 15.5 9.75C15.5 10.5784 16.1716 11.25 17 11.25C17.8284 11.25 18.5 10.5784 18.5 9.75C18.5 8.92157 17.8284 8.25 17 8.25Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M16.5 13.75C16.0858 13.75 15.74 14.0858 15.74 14.5C15.74 14.9142 16.0858 15.25 16.5 15.25H18.32C19.3858 15.25 20.25 16.1142 20.25 17.18V18.46C20.25 18.8742 20.5858 19.21 21 19.21C21.4142 19.21 21.75 18.8742 21.75 18.46V17.18C21.75 15.2858 20.2142 13.75 18.32 13.75H16.5Z",fill:"currentColor"})),SvgIconUserProfilePersonal=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.46429 9.53571C8.46429 7.58299 10.0473 6 12 6C13.9527 6 15.5357 7.58299 15.5357 9.53571C15.5357 11.4884 13.9527 13.0714 12 13.0714C10.0473 13.0714 8.46429 11.4884 8.46429 9.53571ZM12 7.5C10.8757 7.5 9.96429 8.41142 9.96429 9.53571C9.96429 10.66 10.8757 11.5714 12 11.5714C13.1243 11.5714 14.0357 10.66 14.0357 9.53571C14.0357 8.41142 13.1243 7.5 12 7.5Z",fill:"currentColor"}),react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2.25C6.61522 2.25 2.25 6.61522 2.25 12C2.25 17.3848 6.61522 21.75 12 21.75C17.3848 21.75 21.75 17.3848 21.75 12C21.75 6.61522 17.3848 2.25 12 2.25ZM3.75 12C3.75 7.44365 7.44365 3.75 12 3.75C16.5563 3.75 20.25 7.44365 20.25 12C20.25 14.1388 19.4361 16.0874 18.1012 17.5532C16.9239 15.3945 14.6339 13.9286 12 13.9286C9.36612 13.9286 7.07608 15.3945 5.89876 17.5532C4.56385 16.0874 3.75 14.1388 3.75 12ZM7.05025 18.6008C8.42904 19.6364 10.1429 20.25 12 20.25C13.8571 20.25 15.571 19.6364 16.9498 18.6008C16.0881 16.7276 14.1949 15.4286 12 15.4286C9.80507 15.4286 7.91188 16.7276 7.05025 18.6008Z",fill:"currentColor"})),updateIconProps$1=et=>({width:20,height:20,...et}),IconBack=et=>Wt.createElement(SvgIconBack,{...updateIconProps$1(et)}),IconCaret$1=et=>Wt.createElement(SvgIconCaret,{...updateIconProps$1(et)}),IconClose=et=>Wt.createElement(SvgIconClose,{...updateIconProps$1(et)}),IconCopy=et=>Wt.createElement(SvgIconCopy,{...updateIconProps$1(et)}),IconFullScreenModeExpand=et=>Wt.createElement(SvgIconFullScreenModeExpand,{...updateIconProps$1(et)}),IconMinimizeMode=et=>Wt.createElement(SvgIconMinimizeMode,{...updateIconProps$1(et)}),IconOverflowHorizontal$1=et=>Wt.createElement(SvgIconOverflowHorizontal,{...updateIconProps$1(et)}),IconRetry=et=>Wt.createElement(SvgIconRetry,{...updateIconProps$1(et)}),IconSplit=et=>Wt.createElement(SvgIconSplit,{...updateIconProps$1(et)}),IconUndo=et=>Wt.createElement(SvgIconUndo,{...updateIconProps$1(et)}),IconWeave$1=et=>Wt.createElement(SvgIconWeave,{...updateIconProps$1(et)}),IconWeaveLogo=et=>Wt.createElement(SvgIconWeaveLogo,{...updateIconProps$1(et)}),IconWeaveLogoGray=et=>Wt.createElement(SvgIconWeaveLogoGray,{...updateIconProps$1(et)}),IconUp$1=et=>Wt.createElement(SvgIconChevronUp,{...updateIconProps$1(et)}),IconDown$2=et=>Wt.createElement(SvgIconChevronDown,{...updateIconProps$1(et)}),IconDocs=et=>Wt.createElement(SvgIconDocs,{...updateIconProps$1(et)}),IconDelete=et=>Wt.createElement(SvgIconDelete,{...updateIconProps$1(et)}),IconPencilEdit=et=>Wt.createElement(SvgIconPencilEdit,{...updateIconProps$1(et)}),IconAddNew$3=et=>Wt.createElement(SvgIconAddNew,{...updateIconProps$1(et)}),IconOpenNewTab=et=>Wt.createElement(SvgIconOpenNewTab,{...updateIconProps$1(et)}),IconHome=et=>Wt.createElement(SvgIconHome,{...updateIconProps$1(et)}),IconCheckmark=et=>Wt.createElement(SvgIconCheckmark,{...updateIconProps$1(et)}),IconLoading=et=>Wt.createElement(SvgIconLoading,{...updateIconProps$1(et)}),IconInfo=et=>Wt.createElement(SvgIconInfo,{...updateIconProps$1(et)}),IconLaptopLocalComputer=et=>Wt.createElement(SvgIconLaptopLocalComputer,{...updateIconProps$1(et)}),IconUsersTeam=et=>Wt.createElement(SvgIconUsersTeam,{...updateIconProps$1(et)}),IconUserProfilePersonal=et=>Wt.createElement(SvgIconUserProfilePersonal,{...updateIconProps$1(et)}),style$3={verticalAlign:"top",display:"inline-block",margin:"1px 5px 0px 0px"},AgentSVG=()=>Wt.createElement(SvgIconRobotServiceMember,{style:style$3}),ToolSVG=()=>Wt.createElement(SvgIconFlashBolt,{style:style$3}),ChainSVG=()=>Wt.createElement(SvgIconLinkAlt,{style:style$3}),LLMSVG=()=>Wt.createElement(SvgIconModel,{style:style$3}),PromptSVG=()=>Wt.createElement(SvgIconForumChatBubble,{style:style$3}),DownSVG=()=>Wt.createElement(SvgIconChevronDown,{style:style$3}),NextSVG=()=>Wt.createElement(SvgIconChevronNext,{style:style$3}),IconButton$3=styled$1.div`
  ${et=>!et.small&&Ce`
      width: 24px;
      height: 24px;
    `}
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    width: 18px;
    height: 18px;
  }

  color: ${GRAY_500};
  &:hover {
    color: ${GRAY_600};
    background-color: ${GRAY_50};
  }

  &:not(:last-child) {
    margin-right: 4px;
  }
`,OpDoc=({opName:et,className:tt,attributeName:nt,onClose:rt})=>{const{client:ot}=useWeaveContext(),st=ot.opStore.getOpDef(et),ut=et.endsWith("__getattr__"),ct=ut?nt:opDisplayName({name:et},ot.opStore),ft=sanitizeHTML(generateHTML(ut?`Retrieve this object's **${nt}** attribute.`:st.description)),pt=ut?[]:Object.entries(st.argDescriptions).map(([mt,yt])=>[mt,sanitizeHTML(generateHTML(yt))]);st.renderInfo.type==="chain"&&pt.shift();const ht=sanitizeHTML(generateHTML(ut?`This object's **${nt}** attribute`:st.returnValueDescription));return Wt.createElement("div",{"data-test":`op-doc-${st.name}`,className:tt,onMouseDown:mt=>{mt.preventDefault()}},Wt.createElement(OpNameRow,null,Wt.createElement(OpName,null,Wt.createElement(Code,null,ct)),rt&&Wt.createElement(OpClose,null,Wt.createElement(IconButton$3,{onClick:rt},Wt.createElement(IconClose,null)))),Wt.createElement(Section$2,null,Wt.createElement(Markdown$1,{dangerouslySetInnerHTML:{__html:ft}})),pt.length>0&&Wt.createElement(Section$2,null,Wt.createElement(Subheader,null,"Arguments:"),Wt.createElement(ArgList,null,pt.map(([mt,yt],vt)=>Wt.createElement("li",{key:mt},Wt.createElement(ArgName,null,mt),Wt.createElement(Markdown$1,{dangerouslySetInnerHTML:{__html:yt}}))))),Wt.createElement(Section$2,null,Wt.createElement(Subheader,null,"Returns:"),Wt.createElement(Markdown$1,{dangerouslySetInnerHTML:{__html:ht}})))},EditableContainer=styled$1.div`
  position: relative;
  display: flex;
  flex: 1 1 auto;

  ${et=>!et.noBox&&Ce`
      border: 1px solid;
      flex-grow: 1;
      border-color: ${tt=>tt.isInvalid?error$1:"#bbb"};
      border-radius: 4px;
      padding: 6px 8px;
      min-width: 200px;
    `}
`,WeaveEditable=styled$1(Editable)`
  width: 100%;
  min-height: 20px;
  line-height: 20px;

  font-family: Inconsolata;
  cursor: text;

  &:focus {
    outline: 0;
  }

  // Req'd to make editor selectable in Safari
  user-select: text;

  &.invalid {
    border-bottom: 1px dotted ${RED};
  }

  & span.identifier {
    color: ${MAGENTA};
  }

  span.property_identifier {
    color: ${SIENNA_DARK};
  }

  & span.operator {
    color: ${SIENNA_DARK};
  }

  & span.string {
    color: ${TEAL};
  }

  & span.number,
  & span.null {
    color: ${TEAL};
  }

  & span.boolean {
    color: ${TEAL};
  }

  & span.ACTIVE_NODE {
    text-decoration: underline dotted rgba(0, 0, 0, 0.2);
  }

  /* HACK: attempt to hide large object literals
  & span.large_object {
    display: none;
  }
  */

  ${et=>et.$truncate&&Ce`
      & > div {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    `}
`,ApplyButton=styled$1(Button$3)`
  display: none;
  position: absolute;
  font-size: 13px !important;
  line-height: 20px !important;
  padding: 0px 4px !important;
  height: 20px;
`,SuggestionContainer=styled$1.div`
  position: absolute;
  top: -10000px;
  left: -10000px;
  z-index: 2147483647;

  transition: opacity 0.3s;
  opacity: 0;
`;SuggestionContainer.displayName="S.SuggestionContainer";const SUGGESTION_OPTION_CLASS="suggestion-option",SuggestionPane=styled$1.div`
  display: inline-block;

  background-color: ${WHITE};
  border: 1px solid ${MOON_250};
  border-radius: 4px;
  box-shadow: 0px 12px 24px 0px rgba(14, 16, 20, 0.16);

  width: 250px;

  & div.type-display {
    font-weight: 600;

    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid ${MOON_250};
  }

  & ul.items-list {
    margin: 0px;
    list-style: none;
    padding: 0 6px 6px 6px;
    max-height: 250px;
    overflow-y: scroll;
    overflow-x: hidden;

    &::-webkit-scrollbar {
      width: 6px;
    }
    &::-webkit-scrollbar-track,
    &::-webkit-scrollbar-track:hover {
      background-color: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background-color: #666;
      border-radius: 3px;
    }
  }

  & ul.items-list li.${SUGGESTION_OPTION_CLASS} {
    white-space: nowrap;
    cursor: pointer;
    text-overflow: ellipsis;
    overflow: hidden;
    padding-left: 5px;

    &.default-suggestion {
      background-color: ${MOON_100};
    }
  }
`,StyledOpDoc=styled$1(OpDoc)`
  display: inline-block;
  max-width: 400px;
  vertical-align: top;
  margin-left: 5px;

  color: ${WHITE};
  background-color: ${MOON_900};
  padding: 12px;
  border-radius: 4px;
  box-shadow: 0px 12px 24px 0px rgba(14, 16, 20, 0.16);

  & a {
    color: ${TEAL_500};

    &:hover {
      color: ${TEAL_450};
    }
  }
`;StyledOpDoc.displayName="S.StyledOpDoc";const Row$2=styled$1.div`
  position: relative;
  height: 24px;
`;Row$2.displayName="S.Row";const Suggestion=styled$1.div`
  position: absolute;
  left: 0;
`;Suggestion.displayName="S.Suggestion";const Info$1=styled$1.div`
  background-color: ${MOON_100};
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 10px;

  color: ${et=>et.isOpenInfo?MOON_800:MOON_450};
  &:hover {
    color: ${MOON_800};
  }
`;Info$1.displayName="S.Info";const SuggestionRow=({suggestion:et,idx:tt,suggestionIndex:nt,setSuggestionIndex:rt,takeSuggestion:ot,hasInfo:st,setIsOverInfo:ut,isOpenInfo:ct,setIsOpenInfo:ft})=>{const pt=tt===nt,ht=()=>ut(!0),mt=_$2.debounce(()=>{setTimeout(ht,400)},400),yt=()=>{mt.cancel(),ut(!1)},vt=Tt=>{Tt.stopPropagation(),ct&&ut(!1),ft(!ct)};return Wt.createElement("li",{className:(pt?"default-suggestion ":"")+SUGGESTION_OPTION_CLASS,onMouseEnter:rt?()=>rt(tt):void 0,onMouseDown:Tt=>{Tt.preventDefault()},onClick:()=>ot(et)},Wt.createElement(Row$2,null,Wt.createElement(Suggestion,null,et.suggestionString.trim()),pt&&st&&Wt.createElement(Info$1,{isOpenInfo:ct,onMouseEnter:mt,onMouseLeave:yt,onClick:vt},Wt.createElement(IconInfo,{width:18,height:18}))))},Suggestions=et=>{const tt=useWeaveContext(),{paneRef:nt,showType:rt}=useSuggestionVisualState(et),{takeSuggestion:ot}=useSuggestionTakerWithSlateStaticEditor(et,tt),[st,ut]=react.exports.useState(!1),[ct,ft]=react.exports.useState(!1),pt=react.exports.useMemo(()=>{if(et.items==null||et.suggestionIndex==null||et.items[et.suggestionIndex]==null)return null;const yt=et.items[et.suggestionIndex].newNodeOrOp;return isOutputNode(yt)?yt.fromOp.name:null},[et.items,et.suggestionIndex]),ht=react.exports.useMemo(()=>{if(et.items==null||et.suggestionIndex==null||et.items[et.suggestionIndex]==null)return;const yt=et.items[et.suggestionIndex].newNodeOrOp;if(isOutputNode(yt)&&yt.fromOp.name.endsWith("__getattr__"))return yt.fromOp.inputs.name.val},[et.items,et.suggestionIndex]);trace("Render Suggestions",et,pt,nt.current,rt);const mt=ct?()=>{ut(!1),ft(!1)}:void 0;return reactDom.exports.createPortal(react.exports.createElement(SuggestionContainer,{ref:nt},react.exports.createElement(SuggestionPane,{"data-test":"suggestion-pane",isBusy:et.isBusy},rt?react.exports.createElement("div",{className:"type-display"},et.typeStr):null,react.exports.createElement("ul",{className:"items-list"},et.items.map((yt,vt)=>react.exports.createElement(SuggestionRow,{key:vt,idx:vt,suggestion:yt,takeSuggestion:ot,suggestionIndex:et.suggestionIndex,setSuggestionIndex:et.setSuggestionIndex,hasInfo:pt!=null,setIsOverInfo:ut,isOpenInfo:ct,setIsOpenInfo:ft})))),(ct||st)&&pt&&react.exports.createElement(StyledOpDoc,{opName:pt,attributeName:ht,onClose:mt})),document.body)};window.SlateLibs={Transforms,Editor:Editor$1,ReactEditor};window.weaveExpressionEditors={};const WeaveExpression=et=>{const tt=useWeaveContext(),{stack:nt}=usePanelContext(),[rt]=react.exports.useState(()=>withReact(withHistory(createEditor()))),{onChange:ot,slateValue:st,suggestions:ut,tsRoot:ct,isValid:ft,isBusy:pt,applyPendingExpr:ht,exprIsModified:mt,suppressSuggestions:yt,hideSuggestions:vt,isFocused:Tt,onFocus:Et,onBlur:xt}=useWeaveExpressionState(et,rt,tt),At=useWeaveDecorate(rt,ct),{takeSuggestion:Ct,suggestionIndex:$t,setSuggestionIndex:Ot}=useSuggestionTaker(ut,tt,rt),[,Rt]=react.exports.useState({}),{containerRef:It,applyButtonRef:kt}=useRunButtonVisualState(rt,mt,ft,Tt,et.truncate),[Mt]=react.exports.useState(ID$1());react.exports.useEffect(()=>(window.weaveExpressionEditors[Mt]={applyPendingExpr:ht,editor:rt,onChange:gn=>ot(gn,nt)},()=>{delete window.weaveExpressionEditors[Mt]}),[ht,rt,Mt,ot,nt]);const Ft=Wt.useCallback(gn=>{Ot(0),ot(gn,nt)},[Ot,ot,nt]),zt=Wt.useCallback(gn=>{const An=Editor$1.string(rt,rt.selection);gn.clipboardData.setData("text/plain",An),gn.preventDefault()},[rt]),[Vt,Zt]=react.exports.useState(!1),Ut=()=>{Zt(!0),Et()},Xt=()=>{Zt(!1)},Jt=Wt.useCallback(gn=>{gn.key.length===1&&Zt(!1),gn.key==="Enter"&&!gn.shiftKey&&!et.liveUpdate?(gn.preventDefault(),gn.stopPropagation(),mt&&ft&&!pt&&(ht(),Rt({})),vt(500)):gn.key==="Tab"&&!gn.shiftKey&&ut.items.length>0?(gn.preventDefault(),gn.stopPropagation(),Ct(ut.items[$t])):gn.key==="Escape"?(gn.preventDefault(),gn.stopPropagation(),ReactEditor.blur(rt),Rt({})):gn.key==="ArrowDown"&&!gn.shiftKey&&ut.items.length>0?(gn.preventDefault(),gn.stopPropagation(),Ot(($t+1)%ut.items.length)):gn.key==="ArrowUp"&&!gn.shiftKey&&ut.items.length>0&&(gn.preventDefault(),gn.stopPropagation(),Ot((ut.items.length+$t-1)%ut.items.length))},[et.liveUpdate,ht,rt,mt,vt,pt,ft,Ot,$t,ut,Ct]);return trace(`Render WeaveExpression ${Mt}`,et.expr,"editor",rt,"slateValue",st,"exprIsModified",mt,"suggestions",ut,"isBusy",pt,"suppressSuggestions",yt),Wt.createElement(Container$4,{spellCheck:"false"},Wt.createElement(Slate,{editor:rt,initialValue:st,onChange:Ft},Wt.createElement(EditableContainer,{ref:It,"data-test":"expression-editor-container","data-test-ee-id":Mt,noBox:et.noBox},Wt.createElement(WeaveEditable,{"data-lpignore":!0,className:ft?"valid":"invalid",onCopy:zt,onMouseDown:Xt,onKeyDown:Jt,onBlur:xt,onFocus:Ut,decorate:At,renderLeaf:gn=>Wt.createElement(Leaf,{...gn}),style:{overflowWrap:"anywhere"},scrollSelectionIntoView:()=>{},$truncate:et.truncate}),!et.liveUpdate&&!et.frozen&&Wt.createElement(Ref$1,{innerRef:gn=>kt.current=gn?.ref?.current},Wt.createElement(ApplyButton,{primary:!0,size:"tiny",disabled:!mt||!ft||pt,onMouseDown:gn=>{gn.preventDefault()},onClick:ht},"Run ",pt?"\u29D7":"\u23CE"))),!et.frozen&&Wt.createElement(Suggestions,{forceHidden:yt||pt||Vt,...ut,suggestionIndex:$t,setSuggestionIndex:Ot})))},focusEditor=et=>{ReactEditor.focus(et),Transforms.select(et,Editor$1.end(et,[]))},Container$4=styled$1.div`
  width: 100%;
`;function unescapeString(et){return new DOMParser().parseFromString(et,"text/html").documentElement.textContent??""}const StrippedContentEditable=et=>{const tt=Wt.useRef(null);return Wt.useEffect(()=>{tt.current&&et.value!=null&&tt.current.textContent!==et.value&&(tt.current.textContent=et.value)},[et.value,tt]),Wt.createElement(Wt.Fragment,null,Wt.createElement("span",{contentEditable:!et.disabled,className:et.className,ref:nt=>{typeof et.innerRef=="function"?et.innerRef(nt):et.innerRef.current=nt,tt.current=nt},onFocus:et.onFocus,onPaste:et.onPaste,onKeyDown:nt=>{if(nt.keyCode===13&&nt.shiftKey)nt.preventDefault();else if(nt.keyCode===13){nt.preventDefault(),window.setTimeout(()=>{tt.current?.blur()});return}et.onKeyDown?.(nt);const rt=nt.currentTarget,ot=rt.textContent;window.setTimeout(()=>{rt.textContent!==ot&&et.onTempChange?.(unescapeString(rt.textContent||""))})},onBlur:nt=>{et.onChange(unescapeString(nt.currentTarget.textContent||"")),et.onBlur?.(nt)}}))},themes$1={light:{popupBackground:white$1,popupHover:"#f6f8f8",popupBorder:"#ccc",indenter:"#dadada",background:"#fafafa",text:"#1a1a1a",delete:"#777",clickable:"#f6f6f6",focused:"#eaeaea",panelName:"#56acfc",node:"#008a4b",op:"#9D624C",panelOp:"#56acfc"}},PanelNameSpan=styled$1.span`
  text-transform: capitalize;
  display: flex;
  align-items: center;
`,InlineContentEditable=styled$1(StrippedContentEditable)`
  margin: 0;
  padding: 0 2px;
  line-height: 20px;
  border-radius: 2px;
  min-width: 2px;
  outline: none;
  display: inline-block;
  position: relative;
  &:hover {
    background: ${et=>et.disabled?"none":et.theme.focused};
  }
  &:focus {
    background: ${et=>et.theme.clickable};
    box-shadow: 0 0 0 1px ${et=>et.theme.focused} !important;
  }
`,ConfigOption$2=styled$1.div`
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: top;
`,ConfigOptionLabel$1=styled$1.div`
  width: 70px;
  padding-top: 0px;
  flex-shrink: 0;
  color: #aaa;
`,ConfigOptionField$1=styled$1.div`
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
`,ConfigOptionLabel=styled$1.div`
  width: 92px;
  margin-right: 8px;
  flex-shrink: 0;
  color: ${GRAY_500};
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,ConfigOptionActions=styled$1.div`
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
`,ConfigOptionField=styled$1.div`
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
`,ConfigOption$1=styled$1.div`
  position: relative;
  margin: ${et=>et.multiline?6:2}px 0;
  min-height: 28px;
  display: flex;
  ${et=>et.multiline?Ce`
          flex-direction: column;
        `:Ce`
          align-items: center;
        `}

  &:not(:hover) ${ConfigOptionActions} {
    display: none;
  }
`,ChildConfigContainer=styled$1.div`
  position: relative;
  padding-left: 2px;

  &:before {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 2px;
    background-color: ${GRAY_350};
  }
`,ConfigSectionContainer=styled$1.div`
  padding: 12px;
  &:not(:first-child) {
    border-top: 1px solid ${GRAY_350};
  }
`,ConfigSectionHeader=styled$1.div`
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
`,ConfigSectionHeaderButton=styled$1.div`
  display: flex;
  transform: rotate(${et=>et.expanded?0:180}deg);
`,ConfigSectionOptions=styled$1.div`
  display: flex;
  flex-direction: column;
`,ConfigSection=({label:et,children:tt})=>{const[nt,rt]=react.exports.useState(!0),ot=react.exports.useCallback(()=>{rt(st=>!st)},[]);return Wt.createElement(ConfigSectionContainer,null,et&&Wt.createElement(ConfigSectionHeader,{onClick:ot},et,Wt.createElement(ConfigSectionHeaderButton,{expanded:nt},Wt.createElement(IconCaret$1,null))),nt&&Wt.createElement(ConfigSectionOptions,null,tt))},ConfigOption=et=>useWeaveDashUiEnable()?Wt.createElement(ConfigOptionNew,{...et}):Wt.createElement(ConfigOption$2,{...lodash$2.exports.omit(et,["label","children","postfixComponent"])},et.label!==""?Wt.createElement(ConfigOptionLabel$1,null,et.label):Wt.createElement(Wt.Fragment,null),Wt.createElement(ConfigOptionField$1,null,et.children),et.postfixComponent),ConfigOptionNew=et=>{const{label:tt,actions:nt,multiline:rt=!1,postfixComponent:ot,children:st,...ut}=et;return Wt.createElement(ConfigOption$1,{multiline:rt,...ut},tt&&Wt.createElement(ConfigOptionLabel,null,tt),nt!=null&&Wt.createElement(ConfigOptionActions,null,nt),Wt.createElement(ConfigOptionField,null,st),ot)},ModifiedDropdownConfigField=et=>useWeaveDashUiEnable()?Wt.createElement(ConfigFieldWrapper,{withIcon:!0},Wt.createElement(ConfigFieldModifiedDropdown,{...et,selection:void 0,compact:!0,icon:Wt.createElement(IconDown$1,null)})):Wt.createElement(ModifiedDropdown,{style:{flex:"1 1 auto",width:"100%"},...et}),NumberInputConfigField=et=>Wt.createElement(NumberInput,{containerStyle:{flex:"1 1 auto",width:"100%"},inputStyle:{width:"100%"},...et}),ExpressionConfigField=et=>{const tt=useWeaveDashUiEnable();return(rt=>tt?Wt.createElement(ConfigFieldWrapper,null,rt):Wt.createElement("div",{style:{flex:"1 1 auto",width:"100%"}},rt))(Wt.createElement(Fe,{theme:themes$1.light},Wt.createElement(WeaveExpression,{noBox:!0,setExpression:et.setExpression,expr:et.expr,liveUpdate:!tt})))},TextInputConfigField=et=>{const tt=useWeaveDashUiEnable();return(rt=>tt?Wt.createElement(ConfigFieldWrapper,null,rt):Wt.createElement("div",{style:{flex:"1 1 auto",width:"100%"}},rt))(Wt.createElement(TextInput,{...et}))},ConfigFieldWrapper=styled$1.div`
  flex: 1 1 auto;
  display: flex;
  width: 100%;
  padding: 4px 12px;
  ${et=>et.withIcon&&Ce`
      padding-right: 5px;
    `}

  background-color: ${GRAY_25};
  svg {
    color: ${GRAY_500};
  }
  &:hover {
    background-color: ${GRAY_50};
    svg {
      color: ${GRAY_800};
    }
  }
`,ConfigFieldModifiedDropdown=styled$1(ModifiedDropdown)`
  &&& {
    width: 100%;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    line-height: 20px;

    input {
      height: 100%;
    }

    &.active svg {
      transform: rotate(180deg);
    }
  }
`,IconDown$1=styled$1(IconDown$2)`
  width: 18px;
  height: 18px;
`;function toConvertSpec(et){const tt=et.outputType;if(tt==null)throw new Error("Invalid panel spec: missing outputType");return{id:et.id,displayName:et.displayName,ConfigComponent:et.ConfigComponent,Component:et.Component,defaultFixedSize:et.defaultFixedSize,canFullscreen:et.canFullscreen,equivalentTransform:et.equivalentTransform,isValid:et.isValid,convert:nt=>isAssignableTo(nt,et.inputType)?tt(nt):null}}function registerPanelFunction(et,tt,nt){registerGeneratedWeaveOp({name:panelIdToPanelOpName(et),inputTypes:{input:tt,config:"any"},outputType:"any",expansionFn:(rt,ot,st)=>{const{input:ut,config:ct}=rt;if(ct.nodeType!=="const")throw new Error("panel config must be const node");return nt(ut,ct.val,ot,st)}})}const PANEL_OPNAME_PREFIX="panel-";function panelIdToPanelOpName(et){return PANEL_OPNAME_PREFIX+et}function useConfig$4(et={}){const[tt,nt]=react.exports.useState(et),rt=react.exports.useCallback(ot=>{nt(st=>({...st,...ot}))},[nt]);return[tt,rt]}function useConfigChild(et,tt,nt,rt){const ot=react.exports.useMemo(()=>tt!=null?tt[et]??rt:rt,[et,rt,tt]),st=react.exports.useCallback(ut=>{const ct={...ot,...ut};nt({[et]:ct})},[ot,et,nt]);return react.exports.useMemo(()=>({config:ot,updateConfig:st}),[ot,st])}const dummyProps={config:void 0,updateConfig:(...et)=>{},context:{},updateContext:(...et)=>{}},inputType$1f={type:"list",objectType:{type:"union",members:["none",DataTableLikeType]}},preferredJoinTypes=TYPES_WITH_DIGEST.concat(["id"]);function pathAsKey(et){return et.path.join(".")}function tablesRowsIsCompare(et){const tt=nDims(et);if(tt>2)throw new Error("Invalid input: dimensionality > 2");return tt===2}function rowsOrListOfRowsObjType(et){let tt=listObjectType(et);return isTaggedValue(tt)&&(tt=tt.value),isListLike(tt)&&(tt=listObjectType(tt)),isTaggedValue(tt)&&(tt=tt.value),tt}function useRowsOrListOfRowsObjType(et){return react.exports.useMemo(()=>rowsOrListOfRowsObjType(et),[et])}function getJoinKeys(et,tt){let nt;if(isTypedDict(et))nt=[et];else if(isUnion(et))nt=et.members.map(ft=>isListLike(ft)?listObjectType(ft):ft);else return{allJoinKeys:[],preferredJoinKeys:[],joinableObjPathsMap:{}};const rt=nt.filter(ft=>ft!=="none").map(ft=>isTypedDictLike(ft)?allObjPaths(ft).filter(pt=>canGroupType(pt.type)):[]),ot=rt.filter(ft=>ft.every(pt=>!tt?.includes(pathAsKey(pt)))),st=tt==null||tt.length===0?_$2.intersection(...ot.map(ft=>ft.filter(pt=>_$2.some(preferredJoinTypes.map(ht=>isAssignableTo(ht,pt.type)||pt.path.join("")==="id"&&isAssignableTo(pt.type,maybe(union$2(["string","number"])))))).map(pt=>pathAsKey(pt)))):[],ut=_$2.union(...ot.map(ft=>ft.map(pt=>pathAsKey(pt)))),ct=_$2.fromPairs(_$2.flatten(rt).map(ft=>[pathAsKey(ft),ft.type]));return{allJoinKeys:ut,preferredJoinKeys:st,joinableObjPathsMap:ct}}function useJoinKeys(et,tt){return react.exports.useMemo(()=>getJoinKeys(et,tt),[et,tt])}const useFilteredJoinKeys=(et,tt,nt)=>react.exports.useMemo(()=>tt.length>0?et.filter(rt=>isAssignableTo(nt[rt],nt[tt[0]])):et,[et,tt,nt]),getProcessedConfig=(et,tt)=>{const nt=tablesRowsIsCompare(tt.type),rt=rowsOrListOfRowsObjType(tt.type),{allJoinKeys:ot,preferredJoinKeys:st,joinableObjPathsMap:ut}=getJoinKeys(rt),ct=st.length>0,ft=et?.compareMethod,pt=et?.joinKeys,ht=et?.joinKey,mt=et?.outer,yt=et?.compareMethod==null;let vt;try{vt=listMaxLength(tt.type)}catch{}const Tt={compareMethod:ft??"concatenating",joinKeys:pt??(ht!=null?[ht]:[]),outer:mt??!0};if(yt||nt&&ft==="none"&&(vt==null||vt>1)||!nt&&ft!=="none")nt?Tt.compareMethod="concatenating":Tt.compareMethod="none";else if(ft==="joining"&&nt){for(let Et=0;Et<Tt.joinKeys.length;Et++){const xt=Tt.joinKeys[Et];if(xt!=null&&!ot.includes(xt)){Tt.joinKeys=Tt.joinKeys.slice(0,Et);break}else if(Et>0){const At=Tt.joinKeys[Et],Ct=Tt.joinKeys[Et-1];if(Ct==null){Tt.joinKeys=Tt.joinKeys.slice(0,Et);break}else if(At!=null){const $t=ut[Ct],Ot=ut[At];if(!isAssignableTo(Ot,$t)){Tt.joinKeys=Tt.joinKeys.slice(0,Et);break}}}}Tt.joinKeys.length===0&&ct&&(Tt.joinKeys=[st[0]])}else ft==="concatenating"||nt?Tt.compareMethod="concatenating":Tt.compareMethod="none";return Tt},useProcessedConfig=(et,tt)=>react.exports.useMemo(()=>getProcessedConfig(et,tt),[et,tt]),getAggregatedRowsNode=(et,tt,nt,rt)=>{if(et==="none")return rt;if(et==="concatenating")return opConcat({arr:rt});if(tt.length===0)return voidNode();const ot=listObjectType(listObjectType(rt.type)),st=constFunction({row:ot},({row:ut})=>{let ct=opPick({obj:ut,key:constString(tt[0])});for(let ft=1;ft<tt.length;ft++)ct=opNoneCoalesce({lhs:ct,rhs:opPick({obj:ut,key:constString(tt[ft])})});return ct});return opJoinAll({arrs:rt,joinFn:st,outer:constBoolean(nt)})},PanelTableMerge=et=>{throw new Error("PanelTableMerge: Cannot be rendered directly")},PanelTableMergeConfig=et=>{const{input:tt}=et,nt=useNodeWithServerType(tt),rt=react.exports.useMemo(()=>!nt.loading&&nt.result.nodeType!=="void"?normalizeTableLike(nt.result):voidNode(),[nt]),ot=useNodeWithServerType(rt),st=react.exports.useMemo(()=>({...et,input:ot.result}),[et,ot]);return nt.loading||ot.loading?Wt.createElement("div",{style:{width:"100%",height:"100px",position:"relative"}},Wt.createElement(WandbLoader,{name:"panel-table-merge-loader"})):Wt.createElement(PanelTableMergeConfigInner,{...st})},PanelTableMergeConfigInner=et=>{const{input:tt,config:nt,updateConfig:rt}=et,ot=useProcessedConfig(nt,tt),st=useRowsOrListOfRowsObjType(tt.type),{allJoinKeys:ut,joinableObjPathsMap:ct}=useJoinKeys(st,ot.joinKeys),ft=useFilteredJoinKeys(ut,ot.joinKeys,ct),pt=react.exports.useMemo(()=>ot.joinKeys.length>1?ot.joinKeys.slice(1):[],[ot.joinKeys]),ht=react.exports.useMemo(()=>pt.concat(ft),[pt,ft]),mt=react.exports.useCallback(Tt=>{rt({...ot,compareMethod:Tt})},[rt,ot]),yt=react.exports.useCallback(Tt=>{rt({...ot,outer:Tt})},[rt,ot]),vt=react.exports.useCallback(Tt=>{rt({...ot,joinKeys:Tt})},[rt,ot]);return Wt.createElement("div",{"data-test":ot.compareMethod!=="none"?"panel-wb-table-compare-header":""},ot.compareMethod!=="none"&&Wt.createElement(ConfigOption,{label:"Combine By"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,"data-test":"compare_method",scrolling:!0,disabled:Object.keys(ct).length===0&&ot.compareMethod==="concatenating",multiple:!1,options:[{text:"Joining Rows...",value:"joining"},{text:"Concatenating Rows",value:"concatenating"}],value:ot.compareMethod,onChange:(Tt,Et)=>{mt(Et.value)}})),ot.compareMethod==="joining"&&Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Style"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,"data-test":"join_method",scrolling:!0,multiple:!1,options:[{text:"Outer Join (Union)",value:!0},{text:"Inner Join (Intersection)",value:!1}],value:ot.outer,onChange:(Tt,Et)=>{yt(Et.value)}})),Wt.createElement(ConfigOption,{label:"Key"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,"data-test":"join_key",scrolling:!0,multiple:!1,placeholder:"Select a key",options:_$2.keys(ct).map(Tt=>({text:Tt,value:Tt})),value:ot.joinKeys[0],onChange:(Tt,Et)=>{vt([Et.value])}})),ot.joinKeys.length>0&&ht.length>0&&Wt.createElement(ConfigOption,{label:"Alt Keys"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,"data-test":"altjoin_key",multiple:!0,value:pt,options:ht.map(Tt=>({text:Tt,value:Tt})),onChange:(Tt,Et)=>{vt([ot.joinKeys[0]].concat(Et.value))}}))))},Spec$1h={id:"merge",displayName:"Combined Table",Component:PanelTableMerge,ConfigComponent:PanelTableMergeConfig,inputType:inputType$1f,outputType:()=>({type:"list",objectType:{type:"typedDict",propertyTypes:{}}}),equivalentTransform:async(et,tt,nt)=>{const rt=list$1(typedDict({})),ot=constNodeUnsafe(rt,[]),ut=await nt(et),ct=normalizeTableLike(ut),ft=opDropNa({arr:ct}),pt=await nt(ft),ht=getProcessedConfig(tt,pt),mt=getAggregatedRowsNode(ht.compareMethod,ht.joinKeys,ht.outer,pt);return isAssignableTo(mt.type,rt)?mt:ot}};registerPanelFunction(Spec$1h.id,Spec$1h.inputType,Spec$1h.equivalentTransform);function _getTypeHandlerStacks(et,tt,nt,rt,ot,st){const ut=nDims(et),ct=ut===1?nullableTaggableValue(listObjectType(nullableTaggableValue(et))):null;let ft=tt.filter(pt=>{if(pt.id==="table"||pt.id==="plot"){if(ut>1)return!1;if(ct!=null&&isAssignableTo(ct,ConvertibleToDataTableType))return!1}return rt(et,pt.inputType)});for(const pt of nt){if(pt.id!=="row"&&pt.id===ot||st&&pt.id===Spec$1h.id||ot==="row"&&pt.id===Spec$1h.id)continue;const ht=pt.convert(et);if(ht!=null){let mt=_getTypeHandlerStacks(ht,tt,nt,rt,pt.id,st||pt.id===Spec$1h.id);pt.id==="maybe"&&(mt=mt.filter(yt=>!isAssignableTo("none",yt.inputType))),ft=ft.concat(mt.map(yt=>({...pt,inputType:et,child:{...yt,inputType:ht},isValid(vt){return pt.isValid&&!pt.isValid(vt)?!1:!(this.child?.isValid&&vt.childConfig&&!this.child.isValid(vt.childConfig))}})))}}return ft}const inputType$1e={type:"list",objectType:"artifactAlias"},Spec$1g={id:"artifactVersionAliases",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.76b1116b.js"),[])),inputType:inputType$1e},inputType$1d={type:"audio-file"},Spec$1f={id:"audio-file",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.4ff0abf9.js"),[])),inputType:inputType$1d,displayName:"Audio"},inputType$1c={type:"union",members:[{type:"dict",objectType:{type:"union",members:["none","number"]}},{type:"list",maxLength:25,objectType:{type:"union",members:["none","number"]}}]};var MapShim=function(){if(typeof Map<"u")return Map;function et(tt,nt){var rt=-1;return tt.some(function(ot,st){return ot[0]===nt?(rt=st,!0):!1}),rt}return function(){function tt(){this.__entries__=[]}return Object.defineProperty(tt.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),tt.prototype.get=function(nt){var rt=et(this.__entries__,nt),ot=this.__entries__[rt];return ot&&ot[1]},tt.prototype.set=function(nt,rt){var ot=et(this.__entries__,nt);~ot?this.__entries__[ot][1]=rt:this.__entries__.push([nt,rt])},tt.prototype.delete=function(nt){var rt=this.__entries__,ot=et(rt,nt);~ot&&rt.splice(ot,1)},tt.prototype.has=function(nt){return!!~et(this.__entries__,nt)},tt.prototype.clear=function(){this.__entries__.splice(0)},tt.prototype.forEach=function(nt,rt){rt===void 0&&(rt=null);for(var ot=0,st=this.__entries__;ot<st.length;ot++){var ut=st[ot];nt.call(rt,ut[1],ut[0])}},tt}()}(),isBrowser$2=typeof window<"u"&&typeof document<"u"&&window.document===document,global$1=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),requestAnimationFrame$1=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(global$1):function(et){return setTimeout(function(){return et(Date.now())},1e3/60)}}(),trailingTimeout=2;function throttle$1(et,tt){var nt=!1,rt=!1,ot=0;function st(){nt&&(nt=!1,et()),rt&&ct()}function ut(){requestAnimationFrame$1(st)}function ct(){var ft=Date.now();if(nt){if(ft-ot<trailingTimeout)return;rt=!0}else nt=!0,rt=!1,setTimeout(ut,tt);ot=ft}return ct}var REFRESH_DELAY=20,transitionKeys=["top","right","bottom","left","width","height","size","weight"],mutationObserverSupported=typeof MutationObserver<"u",ResizeObserverController=function(){function et(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle$1(this.refresh.bind(this),REFRESH_DELAY)}return et.prototype.addObserver=function(tt){~this.observers_.indexOf(tt)||this.observers_.push(tt),this.connected_||this.connect_()},et.prototype.removeObserver=function(tt){var nt=this.observers_,rt=nt.indexOf(tt);~rt&&nt.splice(rt,1),!nt.length&&this.connected_&&this.disconnect_()},et.prototype.refresh=function(){var tt=this.updateObservers_();tt&&this.refresh()},et.prototype.updateObservers_=function(){var tt=this.observers_.filter(function(nt){return nt.gatherActive(),nt.hasActive()});return tt.forEach(function(nt){return nt.broadcastActive()}),tt.length>0},et.prototype.connect_=function(){!isBrowser$2||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},et.prototype.disconnect_=function(){!isBrowser$2||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},et.prototype.onTransitionEnd_=function(tt){var nt=tt.propertyName,rt=nt===void 0?"":nt,ot=transitionKeys.some(function(st){return!!~rt.indexOf(st)});ot&&this.refresh()},et.getInstance=function(){return this.instance_||(this.instance_=new et),this.instance_},et.instance_=null,et}(),defineConfigurable=function(et,tt){for(var nt=0,rt=Object.keys(tt);nt<rt.length;nt++){var ot=rt[nt];Object.defineProperty(et,ot,{value:tt[ot],enumerable:!1,writable:!1,configurable:!0})}return et},getWindowOf$1=function(et){var tt=et&&et.ownerDocument&&et.ownerDocument.defaultView;return tt||global$1},emptyRect=createRectInit(0,0,0,0);function toFloat(et){return parseFloat(et)||0}function getBordersSize$1(et){for(var tt=[],nt=1;nt<arguments.length;nt++)tt[nt-1]=arguments[nt];return tt.reduce(function(rt,ot){var st=et["border-"+ot+"-width"];return rt+toFloat(st)},0)}function getPaddings(et){for(var tt=["top","right","bottom","left"],nt={},rt=0,ot=tt;rt<ot.length;rt++){var st=ot[rt],ut=et["padding-"+st];nt[st]=toFloat(ut)}return nt}function getSVGContentRect(et){var tt=et.getBBox();return createRectInit(0,0,tt.width,tt.height)}function getHTMLElementContentRect(et){var tt=et.clientWidth,nt=et.clientHeight;if(!tt&&!nt)return emptyRect;var rt=getWindowOf$1(et).getComputedStyle(et),ot=getPaddings(rt),st=ot.left+ot.right,ut=ot.top+ot.bottom,ct=toFloat(rt.width),ft=toFloat(rt.height);if(rt.boxSizing==="border-box"&&(Math.round(ct+st)!==tt&&(ct-=getBordersSize$1(rt,"left","right")+st),Math.round(ft+ut)!==nt&&(ft-=getBordersSize$1(rt,"top","bottom")+ut)),!isDocumentElement(et)){var pt=Math.round(ct+st)-tt,ht=Math.round(ft+ut)-nt;Math.abs(pt)!==1&&(ct-=pt),Math.abs(ht)!==1&&(ft-=ht)}return createRectInit(ot.left,ot.top,ct,ft)}var isSVGGraphicsElement=function(){return typeof SVGGraphicsElement<"u"?function(et){return et instanceof getWindowOf$1(et).SVGGraphicsElement}:function(et){return et instanceof getWindowOf$1(et).SVGElement&&typeof et.getBBox=="function"}}();function isDocumentElement(et){return et===getWindowOf$1(et).document.documentElement}function getContentRect$1(et){return isBrowser$2?isSVGGraphicsElement(et)?getSVGContentRect(et):getHTMLElementContentRect(et):emptyRect}function createReadOnlyRect(et){var tt=et.x,nt=et.y,rt=et.width,ot=et.height,st=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,ut=Object.create(st.prototype);return defineConfigurable(ut,{x:tt,y:nt,width:rt,height:ot,top:nt,right:tt+rt,bottom:ot+nt,left:tt}),ut}function createRectInit(et,tt,nt,rt){return{x:et,y:tt,width:nt,height:rt}}var ResizeObservation=function(){function et(tt){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=createRectInit(0,0,0,0),this.target=tt}return et.prototype.isActive=function(){var tt=getContentRect$1(this.target);return this.contentRect_=tt,tt.width!==this.broadcastWidth||tt.height!==this.broadcastHeight},et.prototype.broadcastRect=function(){var tt=this.contentRect_;return this.broadcastWidth=tt.width,this.broadcastHeight=tt.height,tt},et}(),ResizeObserverEntry=function(){function et(tt,nt){var rt=createReadOnlyRect(nt);defineConfigurable(this,{target:tt,contentRect:rt})}return et}(),ResizeObserverSPI=function(){function et(tt,nt,rt){if(this.activeObservations_=[],this.observations_=new MapShim,typeof tt!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=tt,this.controller_=nt,this.callbackCtx_=rt}return et.prototype.observe=function(tt){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(tt instanceof getWindowOf$1(tt).Element))throw new TypeError('parameter 1 is not of type "Element".');var nt=this.observations_;nt.has(tt)||(nt.set(tt,new ResizeObservation(tt)),this.controller_.addObserver(this),this.controller_.refresh())}},et.prototype.unobserve=function(tt){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(tt instanceof getWindowOf$1(tt).Element))throw new TypeError('parameter 1 is not of type "Element".');var nt=this.observations_;!nt.has(tt)||(nt.delete(tt),nt.size||this.controller_.removeObserver(this))}},et.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},et.prototype.gatherActive=function(){var tt=this;this.clearActive(),this.observations_.forEach(function(nt){nt.isActive()&&tt.activeObservations_.push(nt)})},et.prototype.broadcastActive=function(){if(!!this.hasActive()){var tt=this.callbackCtx_,nt=this.activeObservations_.map(function(rt){return new ResizeObserverEntry(rt.target,rt.broadcastRect())});this.callback_.call(tt,nt,tt),this.clearActive()}},et.prototype.clearActive=function(){this.activeObservations_.splice(0)},et.prototype.hasActive=function(){return this.activeObservations_.length>0},et}(),observers=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver$1=function(){function et(tt){if(!(this instanceof et))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var nt=ResizeObserverController.getInstance(),rt=new ResizeObserverSPI(tt,nt,this);observers.set(this,rt)}return et}();["observe","unobserve","disconnect"].forEach(function(et){ResizeObserver$1.prototype[et]=function(){var tt;return(tt=observers.get(this))[et].apply(tt,arguments)}});var index$5=function(){return typeof global$1.ResizeObserver<"u"?global$1.ResizeObserver:ResizeObserver$1}(),types$8=["client","offset","scroll","bounds","margin"];function getTypes(et){var tt=[];return types$8.forEach(function(nt){et[nt]&&tt.push(nt)}),tt}function getContentRect(et,tt){var nt={};if(tt.indexOf("client")>-1&&(nt.client={top:et.clientTop,left:et.clientLeft,width:et.clientWidth,height:et.clientHeight}),tt.indexOf("offset")>-1&&(nt.offset={top:et.offsetTop,left:et.offsetLeft,width:et.offsetWidth,height:et.offsetHeight}),tt.indexOf("scroll")>-1&&(nt.scroll={top:et.scrollTop,left:et.scrollLeft,width:et.scrollWidth,height:et.scrollHeight}),tt.indexOf("bounds")>-1){var rt=et.getBoundingClientRect();nt.bounds={top:rt.top,right:rt.right,bottom:rt.bottom,left:rt.left,width:rt.width,height:rt.height}}if(tt.indexOf("margin")>-1){var ot=getComputedStyle(et);nt.margin={top:ot?parseInt(ot.marginTop):0,right:ot?parseInt(ot.marginRight):0,bottom:ot?parseInt(ot.marginBottom):0,left:ot?parseInt(ot.marginLeft):0}}return nt}function getWindowOf(et){var tt=et&&et.ownerDocument&&et.ownerDocument.defaultView;return tt||window}function withContentRect(et){return function(tt){var nt,rt;return rt=nt=function(ot){_inheritsLoose$5(st,ot);function st(){for(var ct,ft=arguments.length,pt=new Array(ft),ht=0;ht<ft;ht++)pt[ht]=arguments[ht];return ct=ot.call.apply(ot,[this].concat(pt))||this,ct.state={contentRect:{entry:{},client:{},offset:{},scroll:{},bounds:{},margin:{}}},ct._animationFrameID=null,ct._resizeObserver=null,ct._node=null,ct._window=null,ct.measure=function(mt){var yt=getContentRect(ct._node,et||getTypes(ct.props));mt&&(yt.entry=mt[0].contentRect),ct._animationFrameID=ct._window.requestAnimationFrame(function(){ct._resizeObserver!==null&&(ct.setState({contentRect:yt}),typeof ct.props.onResize=="function"&&ct.props.onResize(yt))})},ct._handleRef=function(mt){ct._resizeObserver!==null&&ct._node!==null&&ct._resizeObserver.unobserve(ct._node),ct._node=mt,ct._window=getWindowOf(ct._node);var yt=ct.props.innerRef;yt&&(typeof yt=="function"?yt(ct._node):yt.current=ct._node),ct._resizeObserver!==null&&ct._node!==null&&ct._resizeObserver.observe(ct._node)},ct}var ut=st.prototype;return ut.componentDidMount=function(){this._resizeObserver=this._window!==null&&this._window.ResizeObserver?new this._window.ResizeObserver(this.measure):new index$5(this.measure),this._node!==null&&(this._resizeObserver.observe(this._node),typeof this.props.onResize=="function"&&this.props.onResize(getContentRect(this._node,et||getTypes(this.props))))},ut.componentWillUnmount=function(){this._window!==null&&this._window.cancelAnimationFrame(this._animationFrameID),this._resizeObserver!==null&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},ut.render=function(){var ft=this.props;ft.innerRef,ft.onResize;var pt=_objectWithoutPropertiesLoose$7(ft,["innerRef","onResize"]);return react.exports.createElement(tt,_extends$a({},pt,{measureRef:this._handleRef,measure:this.measure,contentRect:this.state.contentRect}))},st}(react.exports.Component),nt.propTypes={client:propTypes$1.exports.bool,offset:propTypes$1.exports.bool,scroll:propTypes$1.exports.bool,bounds:propTypes$1.exports.bool,margin:propTypes$1.exports.bool,innerRef:propTypes$1.exports.oneOfType([propTypes$1.exports.object,propTypes$1.exports.func]),onResize:propTypes$1.exports.func},rt}}var Measure=withContentRect()(function(et){var tt=et.measure,nt=et.measureRef,rt=et.contentRect,ot=et.children;return ot({measure:tt,measureRef:nt,contentRect:rt})});Measure.displayName="Measure";Measure.propTypes.children=propTypes$1.exports.func;const EMPTY$1={};function shallowEqual(et,tt){et===void 0&&(et=EMPTY$1),tt===void 0&&(tt=EMPTY$1);const nt=Object.keys(et),rt=Object.keys(tt);return et===tt||nt.length===rt.length&&nt.every(ot=>et[ot]===tt[ot])}/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */var __extends=globalThis&&globalThis.__extends||function(){var et=function(tt,nt){return et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,ot){rt.__proto__=ot}||function(rt,ot){for(var st in ot)ot.hasOwnProperty(st)&&(rt[st]=ot[st])},et(tt,nt)};return function(tt,nt){et(tt,nt);function rt(){this.constructor=tt}tt.prototype=nt===null?Object.create(nt):(rt.prototype=nt.prototype,new rt)}}(),_hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwnProperty$1(et,tt){return _hasOwnProperty.call(et,tt)}function _objectKeys(et){if(Array.isArray(et)){for(var tt=new Array(et.length),nt=0;nt<tt.length;nt++)tt[nt]=""+nt;return tt}if(Object.keys)return Object.keys(et);var rt=[];for(var ot in et)hasOwnProperty$1(et,ot)&&rt.push(ot);return rt}function _deepClone(et){switch(typeof et){case"object":return JSON.parse(JSON.stringify(et));case"undefined":return null;default:return et}}function isInteger$1(et){for(var tt=0,nt=et.length,rt;tt<nt;){if(rt=et.charCodeAt(tt),rt>=48&&rt<=57){tt++;continue}return!1}return!0}function escapePathComponent(et){return et.indexOf("/")===-1&&et.indexOf("~")===-1?et:et.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapePathComponent(et){return et.replace(/~1/g,"/").replace(/~0/g,"~")}function hasUndefined(et){if(et===void 0)return!0;if(et){if(Array.isArray(et)){for(var tt=0,nt=et.length;tt<nt;tt++)if(hasUndefined(et[tt]))return!0}else if(typeof et=="object"){for(var rt=_objectKeys(et),ot=rt.length,st=0;st<ot;st++)if(hasUndefined(et[rt[st]]))return!0}}return!1}function patchErrorMessageFormatter(et,tt){var nt=[et];for(var rt in tt){var ot=typeof tt[rt]=="object"?JSON.stringify(tt[rt],null,2):tt[rt];typeof ot<"u"&&nt.push(rt+": "+ot)}return nt.join(`
`)}var PatchError=function(et){__extends(tt,et);function tt(nt,rt,ot,st,ut){var ct=this.constructor,ft=et.call(this,patchErrorMessageFormatter(nt,{name:rt,index:ot,operation:st,tree:ut}))||this;return ft.name=rt,ft.index=ot,ft.operation=st,ft.tree=ut,Object.setPrototypeOf(ft,ct.prototype),ft.message=patchErrorMessageFormatter(nt,{name:rt,index:ot,operation:st,tree:ut}),ft}return tt}(Error),JsonPatchError=PatchError,deepClone=_deepClone,objOps={add:function(et,tt,nt){return et[tt]=this.value,{newDocument:nt}},remove:function(et,tt,nt){var rt=et[tt];return delete et[tt],{newDocument:nt,removed:rt}},replace:function(et,tt,nt){var rt=et[tt];return et[tt]=this.value,{newDocument:nt,removed:rt}},move:function(et,tt,nt){var rt=getValueByPointer(nt,this.path);rt&&(rt=_deepClone(rt));var ot=applyOperation(nt,{op:"remove",path:this.from}).removed;return applyOperation(nt,{op:"add",path:this.path,value:ot}),{newDocument:nt,removed:rt}},copy:function(et,tt,nt){var rt=getValueByPointer(nt,this.from);return applyOperation(nt,{op:"add",path:this.path,value:_deepClone(rt)}),{newDocument:nt}},test:function(et,tt,nt){return{newDocument:nt,test:_areEquals(et[tt],this.value)}},_get:function(et,tt,nt){return this.value=et[tt],{newDocument:nt}}},arrOps={add:function(et,tt,nt){return isInteger$1(tt)?et.splice(tt,0,this.value):et[tt]=this.value,{newDocument:nt,index:tt}},remove:function(et,tt,nt){var rt=et.splice(tt,1);return{newDocument:nt,removed:rt[0]}},replace:function(et,tt,nt){var rt=et[tt];return et[tt]=this.value,{newDocument:nt,removed:rt}},move:objOps.move,copy:objOps.copy,test:objOps.test,_get:objOps._get};function getValueByPointer(et,tt){if(tt=="")return et;var nt={op:"_get",path:tt};return applyOperation(et,nt),nt.value}function applyOperation(et,tt,nt,rt,ot,st){if(nt===void 0&&(nt=!1),rt===void 0&&(rt=!0),ot===void 0&&(ot=!0),st===void 0&&(st=0),nt&&(typeof nt=="function"?nt(tt,0,et,tt.path):validator(tt,0)),tt.path===""){var ut={newDocument:et};if(tt.op==="add")return ut.newDocument=tt.value,ut;if(tt.op==="replace")return ut.newDocument=tt.value,ut.removed=et,ut;if(tt.op==="move"||tt.op==="copy")return ut.newDocument=getValueByPointer(et,tt.from),tt.op==="move"&&(ut.removed=et),ut;if(tt.op==="test"){if(ut.test=_areEquals(et,tt.value),ut.test===!1)throw new JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",st,tt,et);return ut.newDocument=et,ut}else{if(tt.op==="remove")return ut.removed=et,ut.newDocument=null,ut;if(tt.op==="_get")return tt.value=et,ut;if(nt)throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",st,tt,et);return ut}}else{rt||(et=_deepClone(et));var ct=tt.path||"",ft=ct.split("/"),pt=et,ht=1,mt=ft.length,yt=void 0,vt=void 0,Tt=void 0;for(typeof nt=="function"?Tt=nt:Tt=validator;;){if(vt=ft[ht],vt&&vt.indexOf("~")!=-1&&(vt=unescapePathComponent(vt)),ot&&(vt=="__proto__"||vt=="prototype"&&ht>0&&ft[ht-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(nt&&yt===void 0&&(pt[vt]===void 0?yt=ft.slice(0,ht).join("/"):ht==mt-1&&(yt=tt.path),yt!==void 0&&Tt(tt,0,et,yt)),ht++,Array.isArray(pt)){if(vt==="-")vt=pt.length;else{if(nt&&!isInteger$1(vt))throw new JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",st,tt,et);isInteger$1(vt)&&(vt=~~vt)}if(ht>=mt){if(nt&&tt.op==="add"&&vt>pt.length)throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",st,tt,et);var ut=arrOps[tt.op].call(tt,pt,vt,et);if(ut.test===!1)throw new JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",st,tt,et);return ut}}else if(ht>=mt){var ut=objOps[tt.op].call(tt,pt,vt,et);if(ut.test===!1)throw new JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",st,tt,et);return ut}if(pt=pt[vt],nt&&ht<mt&&(!pt||typeof pt!="object"))throw new JsonPatchError("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",st,tt,et)}}}function applyPatch(et,tt,nt,rt,ot){if(rt===void 0&&(rt=!0),ot===void 0&&(ot=!0),nt&&!Array.isArray(tt))throw new JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");rt||(et=_deepClone(et));for(var st=new Array(tt.length),ut=0,ct=tt.length;ut<ct;ut++)st[ut]=applyOperation(et,tt[ut],nt,!0,ot,ut),et=st[ut].newDocument;return st.newDocument=et,st}function applyReducer(et,tt,nt){var rt=applyOperation(et,tt);if(rt.test===!1)throw new JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",nt,tt,et);return rt.newDocument}function validator(et,tt,nt,rt){if(typeof et!="object"||et===null||Array.isArray(et))throw new JsonPatchError("Operation is not an object","OPERATION_NOT_AN_OBJECT",tt,et,nt);if(objOps[et.op]){if(typeof et.path!="string")throw new JsonPatchError("Operation `path` property is not a string","OPERATION_PATH_INVALID",tt,et,nt);if(et.path.indexOf("/")!==0&&et.path.length>0)throw new JsonPatchError('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",tt,et,nt);if((et.op==="move"||et.op==="copy")&&typeof et.from!="string")throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",tt,et,nt);if((et.op==="add"||et.op==="replace"||et.op==="test")&&et.value===void 0)throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",tt,et,nt);if((et.op==="add"||et.op==="replace"||et.op==="test")&&hasUndefined(et.value))throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",tt,et,nt);if(nt){if(et.op=="add"){var ot=et.path.split("/").length,st=rt.split("/").length;if(ot!==st+1&&ot!==st)throw new JsonPatchError("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",tt,et,nt)}else if(et.op==="replace"||et.op==="remove"||et.op==="_get"){if(et.path!==rt)throw new JsonPatchError("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",tt,et,nt)}else if(et.op==="move"||et.op==="copy"){var ut={op:"_get",path:et.from,value:void 0},ct=validate([ut],nt);if(ct&&ct.name==="OPERATION_PATH_UNRESOLVABLE")throw new JsonPatchError("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",tt,et,nt)}}}else throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",tt,et,nt)}function validate(et,tt,nt){try{if(!Array.isArray(et))throw new JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(tt)applyPatch(_deepClone(tt),_deepClone(et),nt||!0);else{nt=nt||validator;for(var rt=0;rt<et.length;rt++)nt(et[rt],rt,tt,void 0)}}catch(ot){if(ot instanceof JsonPatchError)return ot;throw ot}}function _areEquals(et,tt){if(et===tt)return!0;if(et&&tt&&typeof et=="object"&&typeof tt=="object"){var nt=Array.isArray(et),rt=Array.isArray(tt),ot,st,ut;if(nt&&rt){if(st=et.length,st!=tt.length)return!1;for(ot=st;ot--!==0;)if(!_areEquals(et[ot],tt[ot]))return!1;return!0}if(nt!=rt)return!1;var ct=Object.keys(et);if(st=ct.length,st!==Object.keys(tt).length)return!1;for(ot=st;ot--!==0;)if(!tt.hasOwnProperty(ct[ot]))return!1;for(ot=st;ot--!==0;)if(ut=ct[ot],!_areEquals(et[ut],tt[ut]))return!1;return!0}return et!==et&&tt!==tt}const core=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError,deepClone,getValueByPointer,applyOperation,applyPatch,applyReducer,validator,validate,_areEquals},Symbol.toStringTag,{value:"Module"}));/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */var beforeDict=new WeakMap,Mirror=function(){function et(tt){this.observers=new Map,this.obj=tt}return et}(),ObserverInfo=function(){function et(tt,nt){this.callback=tt,this.observer=nt}return et}();function getMirror(et){return beforeDict.get(et)}function getObserverFromMirror(et,tt){return et.observers.get(tt)}function removeObserverFromMirror(et,tt){et.observers.delete(tt.callback)}function unobserve(et,tt){tt.unobserve()}function observe(et,tt){var nt=[],rt,ot=getMirror(et);if(!ot)ot=new Mirror(et),beforeDict.set(et,ot);else{var st=getObserverFromMirror(ot,tt);rt=st&&st.observer}if(rt)return rt;if(rt={},ot.value=_deepClone(et),tt){rt.callback=tt,rt.next=null;var ut=function(){generate$1(rt)},ct=function(){clearTimeout(rt.next),rt.next=setTimeout(ut)};typeof window<"u"&&(window.addEventListener("mouseup",ct),window.addEventListener("keyup",ct),window.addEventListener("mousedown",ct),window.addEventListener("keydown",ct),window.addEventListener("change",ct))}return rt.patches=nt,rt.object=et,rt.unobserve=function(){generate$1(rt),clearTimeout(rt.next),removeObserverFromMirror(ot,rt),typeof window<"u"&&(window.removeEventListener("mouseup",ct),window.removeEventListener("keyup",ct),window.removeEventListener("mousedown",ct),window.removeEventListener("keydown",ct),window.removeEventListener("change",ct))},ot.observers.set(tt,new ObserverInfo(tt,rt)),rt}function generate$1(et,tt){tt===void 0&&(tt=!1);var nt=beforeDict.get(et.object);_generate(nt.value,et.object,et.patches,"",tt),et.patches.length&&applyPatch(nt.value,et.patches);var rt=et.patches;return rt.length>0&&(et.patches=[],et.callback&&et.callback(rt)),rt}function _generate(et,tt,nt,rt,ot){if(tt!==et){typeof tt.toJSON=="function"&&(tt=tt.toJSON());for(var st=_objectKeys(tt),ut=_objectKeys(et),ct=!1,ft=ut.length-1;ft>=0;ft--){var pt=ut[ft],ht=et[pt];if(hasOwnProperty$1(tt,pt)&&!(tt[pt]===void 0&&ht!==void 0&&Array.isArray(tt)===!1)){var mt=tt[pt];typeof ht=="object"&&ht!=null&&typeof mt=="object"&&mt!=null&&Array.isArray(ht)===Array.isArray(mt)?_generate(ht,mt,nt,rt+"/"+escapePathComponent(pt),ot):ht!==mt&&(ot&&nt.push({op:"test",path:rt+"/"+escapePathComponent(pt),value:_deepClone(ht)}),nt.push({op:"replace",path:rt+"/"+escapePathComponent(pt),value:_deepClone(mt)}))}else Array.isArray(et)===Array.isArray(tt)?(ot&&nt.push({op:"test",path:rt+"/"+escapePathComponent(pt),value:_deepClone(ht)}),nt.push({op:"remove",path:rt+"/"+escapePathComponent(pt)}),ct=!0):(ot&&nt.push({op:"test",path:rt,value:et}),nt.push({op:"replace",path:rt,value:tt}))}if(!(!ct&&st.length==ut.length))for(var ft=0;ft<st.length;ft++){var pt=st[ft];!hasOwnProperty$1(et,pt)&&tt[pt]!==void 0&&nt.push({op:"add",path:rt+"/"+escapePathComponent(pt),value:_deepClone(tt[pt])})}}}function compare$a(et,tt,nt){nt===void 0&&(nt=!1);var rt=[];return _generate(et,tt,rt,"",nt),rt}const duplex=Object.freeze(Object.defineProperty({__proto__:null,unobserve,observe,generate:generate$1,compare:compare$a},Symbol.toStringTag,{value:"Module"}));Object.assign({},core,duplex,{JsonPatchError:PatchError,deepClone:_deepClone,escapePathComponent,unescapePathComponent});var stringOrChar=/("(?:[^\\"]|\\.)*")|[:,]/g,jsonStringifyPrettyCompact=function et(tt,nt){var rt,ot,st;return nt=nt||{},rt=JSON.stringify([1],void 0,nt.indent===void 0?2:nt.indent).slice(2,-3),ot=rt===""?1/0:nt.maxLength===void 0?80:nt.maxLength,st=nt.replacer,function ut(ct,ft,pt){var ht,mt,yt,vt,Tt,Et,xt,At,Ct,$t,Ot,Rt;if(ct&&typeof ct.toJSON=="function"&&(ct=ct.toJSON()),Ot=JSON.stringify(ct,st),Ot===void 0)return Ot;if(xt=ot-ft.length-pt,Ot.length<=xt&&(Ct=Ot.replace(stringOrChar,function(It,kt){return kt||It+" "}),Ct.length<=xt))return Ct;if(st!=null&&(ct=JSON.parse(Ot),st=void 0),typeof ct=="object"&&ct!==null){if(At=ft+rt,yt=[],mt=0,Array.isArray(ct))for($t="[",ht="]",xt=ct.length;mt<xt;mt++)yt.push(ut(ct[mt],At,mt===xt-1?0:1)||"null");else for($t="{",ht="}",Et=Object.keys(ct),xt=Et.length;mt<xt;mt++)vt=Et[mt],Tt=JSON.stringify(vt)+": ",Rt=ut(ct[vt],At,Tt.length+(mt===xt-1?0:1)),Rt!==void 0&&yt.push(Tt+Rt);if(yt.length>0)return[$t,rt+yt.join(`,
`+At),ht].join(`
`+ft)}return Ot}(tt,"",0)};function accessor(et,tt,nt){return et.fields=tt||[],et.fname=nt,et}function accessorName(et){return et==null?null:et.fname}function accessorFields(et){return et==null?null:et.fields}function getter(et){return et.length===1?get1(et[0]):getN(et)}const get1=et=>function(tt){return tt[et]},getN=et=>{const tt=et.length;return function(nt){for(let rt=0;rt<tt;++rt)nt=nt[et[rt]];return nt}};function error(et){throw Error(et)}function splitAccessPath(et){const tt=[],nt=et.length;let rt=null,ot=0,st="",ut,ct,ft;et=et+"";function pt(){tt.push(st+et.substring(ut,ct)),st="",ut=ct+1}for(ut=ct=0;ct<nt;++ct)if(ft=et[ct],ft==="\\")st+=et.substring(ut,ct++),ut=ct;else if(ft===rt)pt(),rt=null,ot=-1;else{if(rt)continue;ut===ot&&ft==='"'||ut===ot&&ft==="'"?(ut=ct+1,rt=ft):ft==="."&&!ot?ct>ut?pt():ut=ct+1:ft==="["?(ct>ut&&pt(),ot=ut=ct+1):ft==="]"&&(ot||error("Access path missing open bracket: "+et),ot>0&&pt(),ot=0,ut=ct+1)}return ot&&error("Access path missing closing bracket: "+et),rt&&error("Access path missing closing quote: "+et),ct>ut&&(ct++,pt()),tt}function field$1(et,tt,nt){const rt=splitAccessPath(et);return et=rt.length===1?rt[0]:et,accessor((nt&&nt.get||getter)(rt),[et],tt||et)}const id=field$1("id"),identity$6=accessor(et=>et,[],"identity"),zero$5=accessor(()=>0,[],"zero"),one$2=accessor(()=>1,[],"one"),truthy=accessor(()=>!0,[],"true"),falsy=accessor(()=>!1,[],"false");function log$1$1(et,tt,nt){const rt=[tt].concat([].slice.call(nt));console[et].apply(console,rt)}const None$2=0,Error$1=1,Warn=2,Info=3,Debug=4;function logger(et,tt){let nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:log$1$1,rt=et||None$2;return{level(ot){return arguments.length?(rt=+ot,this):rt},error(){return rt>=Error$1&&nt(tt||"error","ERROR",arguments),this},warn(){return rt>=Warn&&nt(tt||"warn","WARN",arguments),this},info(){return rt>=Info&&nt(tt||"log","INFO",arguments),this},debug(){return rt>=Debug&&nt(tt||"log","DEBUG",arguments),this}}}var isArray=Array.isArray;function isObject(et){return et===Object(et)}const isLegalKey=et=>et!=="__proto__";function mergeConfig(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];return tt.reduce((rt,ot)=>{for(const st in ot)if(st==="signals")rt.signals=mergeNamed(rt.signals,ot.signals);else{const ut=st==="legend"?{layout:1}:st==="style"?!0:null;writeConfig(rt,st,ot[st],ut)}return rt},{})}function writeConfig(et,tt,nt,rt){if(!isLegalKey(tt))return;let ot,st;if(isObject(nt)&&!isArray(nt)){st=isObject(et[tt])?et[tt]:et[tt]={};for(ot in nt)rt&&(rt===!0||rt[ot])?writeConfig(st,ot,nt[ot]):isLegalKey(ot)&&(st[ot]=nt[ot])}else et[tt]=nt}function mergeNamed(et,tt){if(et==null)return tt;const nt={},rt=[];function ot(st){nt[st.name]||(nt[st.name]=1,rt.push(st))}return tt.forEach(ot),et.forEach(ot),rt}function peek$2(et){return et[et.length-1]}function toNumber(et){return et==null||et===""?null:+et}const exp$2=et=>tt=>et*Math.exp(tt),log$6=et=>tt=>Math.log(et*tt),symlog$1=et=>tt=>Math.sign(tt)*Math.log1p(Math.abs(tt/et)),symexp=et=>tt=>Math.sign(tt)*Math.expm1(Math.abs(tt))*et,pow$4=et=>tt=>tt<0?-Math.pow(-tt,et):Math.pow(tt,et);function pan(et,tt,nt,rt){const ot=nt(et[0]),st=nt(peek$2(et)),ut=(st-ot)*tt;return[rt(ot-ut),rt(st-ut)]}function panLinear(et,tt){return pan(et,tt,toNumber,identity$6)}function panLog(et,tt){var nt=Math.sign(et[0]);return pan(et,tt,log$6(nt),exp$2(nt))}function panPow(et,tt,nt){return pan(et,tt,pow$4(nt),pow$4(1/nt))}function panSymlog(et,tt,nt){return pan(et,tt,symlog$1(nt),symexp(nt))}function zoom$2(et,tt,nt,rt,ot){const st=rt(et[0]),ut=rt(peek$2(et)),ct=tt!=null?rt(tt):(st+ut)/2;return[ot(ct+(st-ct)*nt),ot(ct+(ut-ct)*nt)]}function zoomLinear(et,tt,nt){return zoom$2(et,tt,nt,toNumber,identity$6)}function zoomLog(et,tt,nt){const rt=Math.sign(et[0]);return zoom$2(et,tt,nt,log$6(rt),exp$2(rt))}function zoomPow(et,tt,nt,rt){return zoom$2(et,tt,nt,pow$4(rt),pow$4(1/rt))}function zoomSymlog(et,tt,nt,rt){return zoom$2(et,tt,nt,symlog$1(rt),symexp(rt))}function quarter(et){return 1+~~(new Date(et).getMonth()/3)}function utcquarter(et){return 1+~~(new Date(et).getUTCMonth()/3)}function array$5(et){return et!=null?isArray(et)?et:[et]:[]}function clampRange(et,tt,nt){let rt=et[0],ot=et[1],st;return ot<rt&&(st=ot,ot=rt,rt=st),st=ot-rt,st>=nt-tt?[tt,nt]:[rt=Math.min(Math.max(rt,tt),nt-st),rt+st]}function isFunction$3(et){return typeof et=="function"}const DESCENDING="descending";function compare$9(et,tt,nt){nt=nt||{},tt=array$5(tt)||[];const rt=[],ot=[],st={},ut=nt.comparator||comparator$1;return array$5(et).forEach((ct,ft)=>{ct!=null&&(rt.push(tt[ft]===DESCENDING?-1:1),ot.push(ct=isFunction$3(ct)?ct:field$1(ct,null,nt)),(accessorFields(ct)||[]).forEach(pt=>st[pt]=1))}),ot.length===0?null:accessor(ut(ot,rt),Object.keys(st))}const ascending$3=(et,tt)=>(et<tt||et==null)&&tt!=null?-1:(et>tt||tt==null)&&et!=null?1:(tt=tt instanceof Date?+tt:tt,(et=et instanceof Date?+et:et)!==et&&tt===tt?-1:tt!==tt&&et===et?1:0),comparator$1=(et,tt)=>et.length===1?compare1(et[0],tt[0]):compareN(et,tt,et.length),compare1=(et,tt)=>function(nt,rt){return ascending$3(et(nt),et(rt))*tt},compareN=(et,tt,nt)=>(tt.push(0),function(rt,ot){let st,ut=0,ct=-1;for(;ut===0&&++ct<nt;)st=et[ct],ut=ascending$3(st(rt),st(ot));return ut*tt[ct]});function constant$6(et){return isFunction$3(et)?et:()=>et}function debounce$3(et,tt){let nt;return rt=>{nt&&clearTimeout(nt),nt=setTimeout(()=>(tt(rt),nt=null),et)}}function extend$1(et){for(let tt,nt,rt=1,ot=arguments.length;rt<ot;++rt){tt=arguments[rt];for(nt in tt)et[nt]=tt[nt]}return et}function extent(et,tt){let nt=0,rt,ot,st,ut;if(et&&(rt=et.length))if(tt==null){for(ot=et[nt];nt<rt&&(ot==null||ot!==ot);ot=et[++nt]);for(st=ut=ot;nt<rt;++nt)ot=et[nt],ot!=null&&(ot<st&&(st=ot),ot>ut&&(ut=ot))}else{for(ot=tt(et[nt]);nt<rt&&(ot==null||ot!==ot);ot=tt(et[++nt]));for(st=ut=ot;nt<rt;++nt)ot=tt(et[nt]),ot!=null&&(ot<st&&(st=ot),ot>ut&&(ut=ot))}return[st,ut]}function extentIndex(et,tt){const nt=et.length;let rt=-1,ot,st,ut,ct,ft;if(tt==null){for(;++rt<nt;)if(st=et[rt],st!=null&&st>=st){ot=ut=st;break}if(rt===nt)return[-1,-1];for(ct=ft=rt;++rt<nt;)st=et[rt],st!=null&&(ot>st&&(ot=st,ct=rt),ut<st&&(ut=st,ft=rt))}else{for(;++rt<nt;)if(st=tt(et[rt],rt,et),st!=null&&st>=st){ot=ut=st;break}if(rt===nt)return[-1,-1];for(ct=ft=rt;++rt<nt;)st=tt(et[rt],rt,et),st!=null&&(ot>st&&(ot=st,ct=rt),ut<st&&(ut=st,ft=rt))}return[ct,ft]}const hop=Object.prototype.hasOwnProperty;function has$1(et,tt){return hop.call(et,tt)}const NULL={};function fastmap(et){let tt={},nt;function rt(st){return has$1(tt,st)&&tt[st]!==NULL}const ot={size:0,empty:0,object:tt,has:rt,get(st){return rt(st)?tt[st]:void 0},set(st,ut){return rt(st)||(++ot.size,tt[st]===NULL&&--ot.empty),tt[st]=ut,this},delete(st){return rt(st)&&(--ot.size,++ot.empty,tt[st]=NULL),this},clear(){ot.size=ot.empty=0,ot.object=tt={}},test(st){return arguments.length?(nt=st,ot):nt},clean(){const st={};let ut=0;for(const ct in tt){const ft=tt[ct];ft!==NULL&&(!nt||!nt(ft))&&(st[ct]=ft,++ut)}ot.size=ut,ot.empty=0,ot.object=tt=st}};return et&&Object.keys(et).forEach(st=>{ot.set(st,et[st])}),ot}function flush(et,tt,nt,rt,ot,st){if(!nt&&nt!==0)return st;const ut=+nt;let ct=et[0],ft=peek$2(et),pt;ft<ct&&(pt=ct,ct=ft,ft=pt),pt=Math.abs(tt-ct);const ht=Math.abs(ft-tt);return pt<ht&&pt<=ut?rt:ht<=ut?ot:st}function inherits(et,tt,nt){const rt=et.prototype=Object.create(tt.prototype);return Object.defineProperty(rt,"constructor",{value:et,writable:!0,enumerable:!0,configurable:!0}),extend$1(rt,nt)}function inrange(et,tt,nt,rt){let ot=tt[0],st=tt[tt.length-1],ut;return ot>st&&(ut=ot,ot=st,st=ut),nt=nt===void 0||nt,rt=rt===void 0||rt,(nt?ot<=et:ot<et)&&(rt?et<=st:et<st)}function isBoolean$2(et){return typeof et=="boolean"}function isDate$1(et){return Object.prototype.toString.call(et)==="[object Date]"}function isIterable(et){return et&&isFunction$3(et[Symbol.iterator])}function isNumber$1(et){return typeof et=="number"}function isRegExp(et){return Object.prototype.toString.call(et)==="[object RegExp]"}function isString(et){return typeof et=="string"}function key$2(et,tt,nt){et&&(et=tt?array$5(et).map(ct=>ct.replace(/\\(.)/g,"$1")):array$5(et));const rt=et&&et.length,ot=nt&&nt.get||getter,st=ct=>ot(tt?[ct]:splitAccessPath(ct));let ut;if(!rt)ut=function(){return""};else if(rt===1){const ct=st(et[0]);ut=function(ft){return""+ct(ft)}}else{const ct=et.map(st);ut=function(ft){let pt=""+ct[0](ft),ht=0;for(;++ht<rt;)pt+="|"+ct[ht](ft);return pt}}return accessor(ut,et,"key")}function lerp(et,tt){const nt=et[0],rt=peek$2(et),ot=+tt;return ot?ot===1?rt:nt+ot*(rt-nt):nt}const DEFAULT_MAX_SIZE=1e4;function lruCache$1(et){et=+et||DEFAULT_MAX_SIZE;let tt,nt,rt;const ot=()=>{tt={},nt={},rt=0},st=(ut,ct)=>(++rt>et&&(nt=tt,tt={},rt=1),tt[ut]=ct);return ot(),{clear:ot,has:ut=>has$1(tt,ut)||has$1(nt,ut),get:ut=>has$1(tt,ut)?tt[ut]:has$1(nt,ut)?st(ut,nt[ut]):void 0,set:(ut,ct)=>has$1(tt,ut)?tt[ut]=ct:st(ut,ct)}}function merge$4(et,tt,nt,rt){const ot=tt.length,st=nt.length;if(!st)return tt;if(!ot)return nt;const ut=rt||new tt.constructor(ot+st);let ct=0,ft=0,pt=0;for(;ct<ot&&ft<st;++pt)ut[pt]=et(tt[ct],nt[ft])>0?nt[ft++]:tt[ct++];for(;ct<ot;++ct,++pt)ut[pt]=tt[ct];for(;ft<st;++ft,++pt)ut[pt]=nt[ft];return ut}function repeat(et,tt){let nt="";for(;--tt>=0;)nt+=et;return nt}function pad$2(et,tt,nt,rt){const ot=nt||" ",st=et+"",ut=tt-st.length;return ut<=0?st:rt==="left"?repeat(ot,ut)+st:rt==="center"?repeat(ot,~~(ut/2))+st+repeat(ot,Math.ceil(ut/2)):st+repeat(ot,ut)}function span(et){return et&&peek$2(et)-et[0]||0}function $(et){return isArray(et)?"["+et.map($)+"]":isObject(et)||isString(et)?JSON.stringify(et).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):et}function toBoolean(et){return et==null||et===""?null:!et||et==="false"||et==="0"?!1:!!et}const defaultParser=et=>isNumber$1(et)||isDate$1(et)?et:Date.parse(et);function toDate(et,tt){return tt=tt||defaultParser,et==null||et===""?null:tt(et)}function toString$1(et){return et==null||et===""?null:et+""}function toSet(et){const tt={},nt=et.length;for(let rt=0;rt<nt;++rt)tt[et[rt]]=!0;return tt}function truncate$1(et,tt,nt,rt){const ot=rt??"\u2026",st=et+"",ut=st.length,ct=Math.max(0,tt-ot.length);return ut<=tt?st:nt==="left"?ot+st.slice(ut-ct):nt==="center"?st.slice(0,Math.ceil(ct/2))+ot+st.slice(ut-~~(ct/2)):st.slice(0,ct)+ot}function visitArray(et,tt,nt){if(et)if(tt){const rt=et.length;for(let ot=0;ot<rt;++ot){const st=tt(et[ot]);st&&nt(st,ot,et)}}else et.forEach(nt)}var EOL={},EOF={},QUOTE=34,NEWLINE=10,RETURN=13;function objectConverter(et){return new Function("d","return {"+et.map(function(tt,nt){return JSON.stringify(tt)+": d["+nt+'] || ""'}).join(",")+"}")}function customConverter(et,tt){var nt=objectConverter(et);return function(rt,ot){return tt(nt(rt),ot,et)}}function inferColumns(et){var tt=Object.create(null),nt=[];return et.forEach(function(rt){for(var ot in rt)ot in tt||nt.push(tt[ot]=ot)}),nt}function pad$1(et,tt){var nt=et+"",rt=nt.length;return rt<tt?new Array(tt-rt+1).join(0)+nt:nt}function formatYear$1(et){return et<0?"-"+pad$1(-et,6):et>9999?"+"+pad$1(et,6):pad$1(et,4)}function formatDate(et){var tt=et.getUTCHours(),nt=et.getUTCMinutes(),rt=et.getUTCSeconds(),ot=et.getUTCMilliseconds();return isNaN(et)?"Invalid Date":formatYear$1(et.getUTCFullYear())+"-"+pad$1(et.getUTCMonth()+1,2)+"-"+pad$1(et.getUTCDate(),2)+(ot?"T"+pad$1(tt,2)+":"+pad$1(nt,2)+":"+pad$1(rt,2)+"."+pad$1(ot,3)+"Z":rt?"T"+pad$1(tt,2)+":"+pad$1(nt,2)+":"+pad$1(rt,2)+"Z":nt||tt?"T"+pad$1(tt,2)+":"+pad$1(nt,2)+"Z":"")}function dsvFormat(et){var tt=new RegExp('["'+et+`
\r]`),nt=et.charCodeAt(0);function rt(mt,yt){var vt,Tt,Et=ot(mt,function(xt,At){if(vt)return vt(xt,At-1);Tt=xt,vt=yt?customConverter(xt,yt):objectConverter(xt)});return Et.columns=Tt||[],Et}function ot(mt,yt){var vt=[],Tt=mt.length,Et=0,xt=0,At,Ct=Tt<=0,$t=!1;mt.charCodeAt(Tt-1)===NEWLINE&&--Tt,mt.charCodeAt(Tt-1)===RETURN&&--Tt;function Ot(){if(Ct)return EOF;if($t)return $t=!1,EOL;var It,kt=Et,Mt;if(mt.charCodeAt(kt)===QUOTE){for(;Et++<Tt&&mt.charCodeAt(Et)!==QUOTE||mt.charCodeAt(++Et)===QUOTE;);return(It=Et)>=Tt?Ct=!0:(Mt=mt.charCodeAt(Et++))===NEWLINE?$t=!0:Mt===RETURN&&($t=!0,mt.charCodeAt(Et)===NEWLINE&&++Et),mt.slice(kt+1,It-1).replace(/""/g,'"')}for(;Et<Tt;){if((Mt=mt.charCodeAt(It=Et++))===NEWLINE)$t=!0;else if(Mt===RETURN)$t=!0,mt.charCodeAt(Et)===NEWLINE&&++Et;else if(Mt!==nt)continue;return mt.slice(kt,It)}return Ct=!0,mt.slice(kt,Tt)}for(;(At=Ot())!==EOF;){for(var Rt=[];At!==EOL&&At!==EOF;)Rt.push(At),At=Ot();yt&&(Rt=yt(Rt,xt++))==null||vt.push(Rt)}return vt}function st(mt,yt){return mt.map(function(vt){return yt.map(function(Tt){return ht(vt[Tt])}).join(et)})}function ut(mt,yt){return yt==null&&(yt=inferColumns(mt)),[yt.map(ht).join(et)].concat(st(mt,yt)).join(`
`)}function ct(mt,yt){return yt==null&&(yt=inferColumns(mt)),st(mt,yt).join(`
`)}function ft(mt){return mt.map(pt).join(`
`)}function pt(mt){return mt.map(ht).join(et)}function ht(mt){return mt==null?"":mt instanceof Date?formatDate(mt):tt.test(mt+="")?'"'+mt.replace(/"/g,'""')+'"':mt}return{parse:rt,parseRows:ot,format:ut,formatBody:ct,formatRows:ft,formatRow:pt,formatValue:ht}}function identity$5(et){return et}function transform$5(et){if(et==null)return identity$5;var tt,nt,rt=et.scale[0],ot=et.scale[1],st=et.translate[0],ut=et.translate[1];return function(ct,ft){ft||(tt=nt=0);var pt=2,ht=ct.length,mt=new Array(ht);for(mt[0]=(tt+=ct[0])*rt+st,mt[1]=(nt+=ct[1])*ot+ut;pt<ht;)mt[pt]=ct[pt],++pt;return mt}}function reverse$2(et,tt){for(var nt,rt=et.length,ot=rt-tt;ot<--rt;)nt=et[ot],et[ot++]=et[rt],et[rt]=nt}function feature(et,tt){return typeof tt=="string"&&(tt=et.objects[tt]),tt.type==="GeometryCollection"?{type:"FeatureCollection",features:tt.geometries.map(function(nt){return feature$1(et,nt)})}:feature$1(et,tt)}function feature$1(et,tt){var nt=tt.id,rt=tt.bbox,ot=tt.properties==null?{}:tt.properties,st=object$1(et,tt);return nt==null&&rt==null?{type:"Feature",properties:ot,geometry:st}:rt==null?{type:"Feature",id:nt,properties:ot,geometry:st}:{type:"Feature",id:nt,bbox:rt,properties:ot,geometry:st}}function object$1(et,tt){var nt=transform$5(et.transform),rt=et.arcs;function ot(ht,mt){mt.length&&mt.pop();for(var yt=rt[ht<0?~ht:ht],vt=0,Tt=yt.length;vt<Tt;++vt)mt.push(nt(yt[vt],vt));ht<0&&reverse$2(mt,Tt)}function st(ht){return nt(ht)}function ut(ht){for(var mt=[],yt=0,vt=ht.length;yt<vt;++yt)ot(ht[yt],mt);return mt.length<2&&mt.push(mt[0]),mt}function ct(ht){for(var mt=ut(ht);mt.length<4;)mt.push(mt[0]);return mt}function ft(ht){return ht.map(ct)}function pt(ht){var mt=ht.type,yt;switch(mt){case"GeometryCollection":return{type:mt,geometries:ht.geometries.map(pt)};case"Point":yt=st(ht.coordinates);break;case"MultiPoint":yt=ht.coordinates.map(st);break;case"LineString":yt=ut(ht.arcs);break;case"MultiLineString":yt=ht.arcs.map(ut);break;case"Polygon":yt=ft(ht.arcs);break;case"MultiPolygon":yt=ht.arcs.map(ft);break;default:return null}return{type:mt,coordinates:yt}}return pt(tt)}function stitch(et,tt){var nt={},rt={},ot={},st=[],ut=-1;tt.forEach(function(pt,ht){var mt=et.arcs[pt<0?~pt:pt],yt;mt.length<3&&!mt[1][0]&&!mt[1][1]&&(yt=tt[++ut],tt[ut]=pt,tt[ht]=yt)}),tt.forEach(function(pt){var ht=ct(pt),mt=ht[0],yt=ht[1],vt,Tt;if(vt=ot[mt])if(delete ot[vt.end],vt.push(pt),vt.end=yt,Tt=rt[yt]){delete rt[Tt.start];var Et=Tt===vt?vt:vt.concat(Tt);rt[Et.start=vt.start]=ot[Et.end=Tt.end]=Et}else rt[vt.start]=ot[vt.end]=vt;else if(vt=rt[yt])if(delete rt[vt.start],vt.unshift(pt),vt.start=mt,Tt=ot[mt]){delete ot[Tt.end];var xt=Tt===vt?vt:Tt.concat(vt);rt[xt.start=Tt.start]=ot[xt.end=vt.end]=xt}else rt[vt.start]=ot[vt.end]=vt;else vt=[pt],rt[vt.start=mt]=ot[vt.end=yt]=vt});function ct(pt){var ht=et.arcs[pt<0?~pt:pt],mt=ht[0],yt;return et.transform?(yt=[0,0],ht.forEach(function(vt){yt[0]+=vt[0],yt[1]+=vt[1]})):yt=ht[ht.length-1],pt<0?[yt,mt]:[mt,yt]}function ft(pt,ht){for(var mt in pt){var yt=pt[mt];delete ht[yt.start],delete yt.start,delete yt.end,yt.forEach(function(vt){nt[vt<0?~vt:vt]=1}),st.push(yt)}}return ft(ot,rt),ft(rt,ot),tt.forEach(function(pt){nt[pt<0?~pt:pt]||st.push([pt])}),st}function mesh(et){return object$1(et,meshArcs.apply(this,arguments))}function meshArcs(et,tt,nt){var rt,ot,st;if(arguments.length>1)rt=extractArcs(et,tt,nt);else for(ot=0,rt=new Array(st=et.arcs.length);ot<st;++ot)rt[ot]=ot;return{type:"MultiLineString",arcs:stitch(et,rt)}}function extractArcs(et,tt,nt){var rt=[],ot=[],st;function ut(mt){var yt=mt<0?~mt:mt;(ot[yt]||(ot[yt]=[])).push({i:mt,g:st})}function ct(mt){mt.forEach(ut)}function ft(mt){mt.forEach(ct)}function pt(mt){mt.forEach(ft)}function ht(mt){switch(st=mt,mt.type){case"GeometryCollection":mt.geometries.forEach(ht);break;case"LineString":ct(mt.arcs);break;case"MultiLineString":case"Polygon":ft(mt.arcs);break;case"MultiPolygon":pt(mt.arcs);break}}return ht(tt),ot.forEach(nt==null?function(mt){rt.push(mt[0].i)}:function(mt){nt(mt[0].g,mt[mt.length-1].g)&&rt.push(mt[0].i)}),rt}function ascending$2(et,tt){return et==null||tt==null?NaN:et<tt?-1:et>tt?1:et>=tt?0:NaN}function descending$2(et,tt){return et==null||tt==null?NaN:tt<et?-1:tt>et?1:tt>=et?0:NaN}function bisector$1(et){let tt,nt,rt;et.length!==2?(tt=ascending$2,nt=(ct,ft)=>ascending$2(et(ct),ft),rt=(ct,ft)=>et(ct)-ft):(tt=et===ascending$2||et===descending$2?et:zero$4,nt=et,rt=et);function ot(ct,ft,pt=0,ht=ct.length){if(pt<ht){if(tt(ft,ft)!==0)return ht;do{const mt=pt+ht>>>1;nt(ct[mt],ft)<0?pt=mt+1:ht=mt}while(pt<ht)}return pt}function st(ct,ft,pt=0,ht=ct.length){if(pt<ht){if(tt(ft,ft)!==0)return ht;do{const mt=pt+ht>>>1;nt(ct[mt],ft)<=0?pt=mt+1:ht=mt}while(pt<ht)}return pt}function ut(ct,ft,pt=0,ht=ct.length){const mt=ot(ct,ft,pt,ht-1);return mt>pt&&rt(ct[mt-1],ft)>-rt(ct[mt],ft)?mt-1:mt}return{left:ot,center:ut,right:st}}function zero$4(){return 0}function number$6(et){return et===null?NaN:+et}function*numbers$2(et,tt){if(tt===void 0)for(let nt of et)nt!=null&&(nt=+nt)>=nt&&(yield nt);else{let nt=-1;for(let rt of et)(rt=tt(rt,++nt,et))!=null&&(rt=+rt)>=rt&&(yield rt)}}const ascendingBisect=bisector$1(ascending$2),bisectRight$1=ascendingBisect.right,bisectLeft$1=ascendingBisect.left;bisector$1(number$6).center;const bisect$1=bisectRight$1;function variance(et,tt){let nt=0,rt,ot=0,st=0;if(tt===void 0)for(let ut of et)ut!=null&&(ut=+ut)>=ut&&(rt=ut-ot,ot+=rt/++nt,st+=rt*(ut-ot));else{let ut=-1;for(let ct of et)(ct=tt(ct,++ut,et))!=null&&(ct=+ct)>=ct&&(rt=ct-ot,ot+=rt/++nt,st+=rt*(ct-ot))}if(nt>1)return st/(nt-1)}function deviation(et,tt){const nt=variance(et,tt);return nt&&Math.sqrt(nt)}class Adder{constructor(){this._partials=new Float64Array(32),this._n=0}add(tt){const nt=this._partials;let rt=0;for(let ot=0;ot<this._n&&ot<32;ot++){const st=nt[ot],ut=tt+st,ct=Math.abs(tt)<Math.abs(st)?tt-(ut-st):st-(ut-tt);ct&&(nt[rt++]=ct),tt=ut}return nt[rt]=tt,this._n=rt+1,this}valueOf(){const tt=this._partials;let nt=this._n,rt,ot,st,ut=0;if(nt>0){for(ut=tt[--nt];nt>0&&(rt=ut,ot=tt[--nt],ut=rt+ot,st=ot-(ut-rt),!st););nt>0&&(st<0&&tt[nt-1]<0||st>0&&tt[nt-1]>0)&&(ot=st*2,rt=ut+ot,ot==rt-ut&&(ut=rt))}return ut}}class InternMap extends Map{constructor(tt,nt=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nt}}),tt!=null)for(const[rt,ot]of tt)this.set(rt,ot)}get(tt){return super.get(intern_get(this,tt))}has(tt){return super.has(intern_get(this,tt))}set(tt,nt){return super.set(intern_set(this,tt),nt)}delete(tt){return super.delete(intern_delete(this,tt))}}class InternSet extends Set{constructor(tt,nt=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nt}}),tt!=null)for(const rt of tt)this.add(rt)}has(tt){return super.has(intern_get(this,tt))}add(tt){return super.add(intern_set(this,tt))}delete(tt){return super.delete(intern_delete(this,tt))}}function intern_get({_intern:et,_key:tt},nt){const rt=tt(nt);return et.has(rt)?et.get(rt):nt}function intern_set({_intern:et,_key:tt},nt){const rt=tt(nt);return et.has(rt)?et.get(rt):(et.set(rt,nt),nt)}function intern_delete({_intern:et,_key:tt},nt){const rt=tt(nt);return et.has(rt)&&(nt=et.get(rt),et.delete(rt)),nt}function keyof(et){return et!==null&&typeof et=="object"?et.valueOf():et}function permute(et,tt){return Array.from(tt,nt=>et[nt])}function compareDefined(et=ascending$2){if(et===ascending$2)return ascendingDefined;if(typeof et!="function")throw new TypeError("compare is not a function");return(tt,nt)=>{const rt=et(tt,nt);return rt||rt===0?rt:(et(nt,nt)===0)-(et(tt,tt)===0)}}function ascendingDefined(et,tt){return(et==null||!(et>=et))-(tt==null||!(tt>=tt))||(et<tt?-1:et>tt?1:0)}const e10=Math.sqrt(50),e5=Math.sqrt(10),e2=Math.sqrt(2);function tickSpec(et,tt,nt){const rt=(tt-et)/Math.max(0,nt),ot=Math.floor(Math.log10(rt)),st=rt/Math.pow(10,ot),ut=st>=e10?10:st>=e5?5:st>=e2?2:1;let ct,ft,pt;return ot<0?(pt=Math.pow(10,-ot)/ut,ct=Math.round(et*pt),ft=Math.round(tt*pt),ct/pt<et&&++ct,ft/pt>tt&&--ft,pt=-pt):(pt=Math.pow(10,ot)*ut,ct=Math.round(et/pt),ft=Math.round(tt/pt),ct*pt<et&&++ct,ft*pt>tt&&--ft),ft<ct&&.5<=nt&&nt<2?tickSpec(et,tt,nt*2):[ct,ft,pt]}function ticks(et,tt,nt){if(tt=+tt,et=+et,nt=+nt,!(nt>0))return[];if(et===tt)return[et];const rt=tt<et,[ot,st,ut]=rt?tickSpec(tt,et,nt):tickSpec(et,tt,nt);if(!(st>=ot))return[];const ct=st-ot+1,ft=new Array(ct);if(rt)if(ut<0)for(let pt=0;pt<ct;++pt)ft[pt]=(st-pt)/-ut;else for(let pt=0;pt<ct;++pt)ft[pt]=(st-pt)*ut;else if(ut<0)for(let pt=0;pt<ct;++pt)ft[pt]=(ot+pt)/-ut;else for(let pt=0;pt<ct;++pt)ft[pt]=(ot+pt)*ut;return ft}function tickIncrement(et,tt,nt){return tt=+tt,et=+et,nt=+nt,tickSpec(et,tt,nt)[2]}function tickStep(et,tt,nt){tt=+tt,et=+et,nt=+nt;const rt=tt<et,ot=rt?tickIncrement(tt,et,nt):tickIncrement(et,tt,nt);return(rt?-1:1)*(ot<0?1/-ot:ot)}function max$2(et,tt){let nt;if(tt===void 0)for(const rt of et)rt!=null&&(nt<rt||nt===void 0&&rt>=rt)&&(nt=rt);else{let rt=-1;for(let ot of et)(ot=tt(ot,++rt,et))!=null&&(nt<ot||nt===void 0&&ot>=ot)&&(nt=ot)}return nt}function min$2(et,tt){let nt;if(tt===void 0)for(const rt of et)rt!=null&&(nt>rt||nt===void 0&&rt>=rt)&&(nt=rt);else{let rt=-1;for(let ot of et)(ot=tt(ot,++rt,et))!=null&&(nt>ot||nt===void 0&&ot>=ot)&&(nt=ot)}return nt}function quickselect(et,tt,nt=0,rt=1/0,ot){if(tt=Math.floor(tt),nt=Math.floor(Math.max(0,nt)),rt=Math.floor(Math.min(et.length-1,rt)),!(nt<=tt&&tt<=rt))return et;for(ot=ot===void 0?ascendingDefined:compareDefined(ot);rt>nt;){if(rt-nt>600){const ft=rt-nt+1,pt=tt-nt+1,ht=Math.log(ft),mt=.5*Math.exp(2*ht/3),yt=.5*Math.sqrt(ht*mt*(ft-mt)/ft)*(pt-ft/2<0?-1:1),vt=Math.max(nt,Math.floor(tt-pt*mt/ft+yt)),Tt=Math.min(rt,Math.floor(tt+(ft-pt)*mt/ft+yt));quickselect(et,tt,vt,Tt,ot)}const st=et[tt];let ut=nt,ct=rt;for(swap$1(et,nt,tt),ot(et[rt],st)>0&&swap$1(et,nt,rt);ut<ct;){for(swap$1(et,ut,ct),++ut,--ct;ot(et[ut],st)<0;)++ut;for(;ot(et[ct],st)>0;)--ct}ot(et[nt],st)===0?swap$1(et,nt,ct):(++ct,swap$1(et,ct,rt)),ct<=tt&&(nt=ct+1),tt<=ct&&(rt=ct-1)}return et}function swap$1(et,tt,nt){const rt=et[tt];et[tt]=et[nt],et[nt]=rt}function quantile$1(et,tt,nt){if(et=Float64Array.from(numbers$2(et,nt)),!(!(rt=et.length)||isNaN(tt=+tt))){if(tt<=0||rt<2)return min$2(et);if(tt>=1)return max$2(et);var rt,ot=(rt-1)*tt,st=Math.floor(ot),ut=max$2(quickselect(et,st).subarray(0,st+1)),ct=min$2(et.subarray(st+1));return ut+(ct-ut)*(ot-st)}}function quantileSorted(et,tt,nt=number$6){if(!(!(rt=et.length)||isNaN(tt=+tt))){if(tt<=0||rt<2)return+nt(et[0],0,et);if(tt>=1)return+nt(et[rt-1],rt-1,et);var rt,ot=(rt-1)*tt,st=Math.floor(ot),ut=+nt(et[st],st,et),ct=+nt(et[st+1],st+1,et);return ut+(ct-ut)*(ot-st)}}function mean(et,tt){let nt=0,rt=0;if(tt===void 0)for(let ot of et)ot!=null&&(ot=+ot)>=ot&&(++nt,rt+=ot);else{let ot=-1;for(let st of et)(st=tt(st,++ot,et))!=null&&(st=+st)>=st&&(++nt,rt+=st)}if(nt)return rt/nt}function median(et,tt){return quantile$1(et,.5,tt)}function*flatten$1(et){for(const tt of et)yield*tt}function merge$3(et){return Array.from(flatten$1(et))}function range$4(et,tt,nt){et=+et,tt=+tt,nt=(ot=arguments.length)<2?(tt=et,et=0,1):ot<3?1:+nt;for(var rt=-1,ot=Math.max(0,Math.ceil((tt-et)/nt))|0,st=new Array(ot);++rt<ot;)st[rt]=et+rt*nt;return st}function sum$1(et,tt){let nt=0;if(tt===void 0)for(let rt of et)(rt=+rt)&&(nt+=rt);else{let rt=-1;for(let ot of et)(ot=+tt(ot,++rt,et))&&(nt+=ot)}return nt}function formatDecimal(et){return Math.abs(et=Math.round(et))>=1e21?et.toLocaleString("en").replace(/,/g,""):et.toString(10)}function formatDecimalParts(et,tt){if((nt=(et=tt?et.toExponential(tt-1):et.toExponential()).indexOf("e"))<0)return null;var nt,rt=et.slice(0,nt);return[rt.length>1?rt[0]+rt.slice(2):rt,+et.slice(nt+1)]}function exponent(et){return et=formatDecimalParts(Math.abs(et)),et?et[1]:NaN}function formatGroup(et,tt){return function(nt,rt){for(var ot=nt.length,st=[],ut=0,ct=et[0],ft=0;ot>0&&ct>0&&(ft+ct+1>rt&&(ct=Math.max(1,rt-ft)),st.push(nt.substring(ot-=ct,ot+ct)),!((ft+=ct+1)>rt));)ct=et[ut=(ut+1)%et.length];return st.reverse().join(tt)}}function formatNumerals(et){return function(tt){return tt.replace(/[0-9]/g,function(nt){return et[+nt]})}}var re$2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(et){if(!(tt=re$2.exec(et)))throw new Error("invalid format: "+et);var tt;return new FormatSpecifier({fill:tt[1],align:tt[2],sign:tt[3],symbol:tt[4],zero:tt[5],width:tt[6],comma:tt[7],precision:tt[8]&&tt[8].slice(1),trim:tt[9],type:tt[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(et){this.fill=et.fill===void 0?" ":et.fill+"",this.align=et.align===void 0?">":et.align+"",this.sign=et.sign===void 0?"-":et.sign+"",this.symbol=et.symbol===void 0?"":et.symbol+"",this.zero=!!et.zero,this.width=et.width===void 0?void 0:+et.width,this.comma=!!et.comma,this.precision=et.precision===void 0?void 0:+et.precision,this.trim=!!et.trim,this.type=et.type===void 0?"":et.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(et){e:for(var tt=et.length,nt=1,rt=-1,ot;nt<tt;++nt)switch(et[nt]){case".":rt=ot=nt;break;case"0":rt===0&&(rt=nt),ot=nt;break;default:if(!+et[nt])break e;rt>0&&(rt=0);break}return rt>0?et.slice(0,rt)+et.slice(ot+1):et}var prefixExponent;function formatPrefixAuto(et,tt){var nt=formatDecimalParts(et,tt);if(!nt)return et+"";var rt=nt[0],ot=nt[1],st=ot-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(ot/3)))*3)+1,ut=rt.length;return st===ut?rt:st>ut?rt+new Array(st-ut+1).join("0"):st>0?rt.slice(0,st)+"."+rt.slice(st):"0."+new Array(1-st).join("0")+formatDecimalParts(et,Math.max(0,tt+st-1))[0]}function formatRounded(et,tt){var nt=formatDecimalParts(et,tt);if(!nt)return et+"";var rt=nt[0],ot=nt[1];return ot<0?"0."+new Array(-ot).join("0")+rt:rt.length>ot+1?rt.slice(0,ot+1)+"."+rt.slice(ot+1):rt+new Array(ot-rt.length+2).join("0")}const formatTypes={"%":(et,tt)=>(et*100).toFixed(tt),b:et=>Math.round(et).toString(2),c:et=>et+"",d:formatDecimal,e:(et,tt)=>et.toExponential(tt),f:(et,tt)=>et.toFixed(tt),g:(et,tt)=>et.toPrecision(tt),o:et=>Math.round(et).toString(8),p:(et,tt)=>formatRounded(et*100,tt),r:formatRounded,s:formatPrefixAuto,X:et=>Math.round(et).toString(16).toUpperCase(),x:et=>Math.round(et).toString(16)};function identity$4(et){return et}var map$1=Array.prototype.map,prefixes$1=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function formatLocale$1(et){var tt=et.grouping===void 0||et.thousands===void 0?identity$4:formatGroup(map$1.call(et.grouping,Number),et.thousands+""),nt=et.currency===void 0?"":et.currency[0]+"",rt=et.currency===void 0?"":et.currency[1]+"",ot=et.decimal===void 0?".":et.decimal+"",st=et.numerals===void 0?identity$4:formatNumerals(map$1.call(et.numerals,String)),ut=et.percent===void 0?"%":et.percent+"",ct=et.minus===void 0?"\u2212":et.minus+"",ft=et.nan===void 0?"NaN":et.nan+"";function pt(mt){mt=formatSpecifier(mt);var yt=mt.fill,vt=mt.align,Tt=mt.sign,Et=mt.symbol,xt=mt.zero,At=mt.width,Ct=mt.comma,$t=mt.precision,Ot=mt.trim,Rt=mt.type;Rt==="n"?(Ct=!0,Rt="g"):formatTypes[Rt]||($t===void 0&&($t=12),Ot=!0,Rt="g"),(xt||yt==="0"&&vt==="=")&&(xt=!0,yt="0",vt="=");var It=Et==="$"?nt:Et==="#"&&/[boxX]/.test(Rt)?"0"+Rt.toLowerCase():"",kt=Et==="$"?rt:/[%p]/.test(Rt)?ut:"",Mt=formatTypes[Rt],Ft=/[defgprs%]/.test(Rt);$t=$t===void 0?6:/[gprs]/.test(Rt)?Math.max(1,Math.min(21,$t)):Math.max(0,Math.min(20,$t));function zt(Vt){var Zt=It,Ut=kt,Xt,Jt,gn;if(Rt==="c")Ut=Mt(Vt)+Ut,Vt="";else{Vt=+Vt;var An=Vt<0||1/Vt<0;if(Vt=isNaN(Vt)?ft:Mt(Math.abs(Vt),$t),Ot&&(Vt=formatTrim(Vt)),An&&+Vt==0&&Tt!=="+"&&(An=!1),Zt=(An?Tt==="("?Tt:ct:Tt==="-"||Tt==="("?"":Tt)+Zt,Ut=(Rt==="s"?prefixes$1[8+prefixExponent/3]:"")+Ut+(An&&Tt==="("?")":""),Ft){for(Xt=-1,Jt=Vt.length;++Xt<Jt;)if(gn=Vt.charCodeAt(Xt),48>gn||gn>57){Ut=(gn===46?ot+Vt.slice(Xt+1):Vt.slice(Xt))+Ut,Vt=Vt.slice(0,Xt);break}}}Ct&&!xt&&(Vt=tt(Vt,1/0));var sn=Zt.length+Vt.length+Ut.length,Sn=sn<At?new Array(At-sn+1).join(yt):"";switch(Ct&&xt&&(Vt=tt(Sn+Vt,Sn.length?At-Ut.length:1/0),Sn=""),vt){case"<":Vt=Zt+Vt+Ut+Sn;break;case"=":Vt=Zt+Sn+Vt+Ut;break;case"^":Vt=Sn.slice(0,sn=Sn.length>>1)+Zt+Vt+Ut+Sn.slice(sn);break;default:Vt=Sn+Zt+Vt+Ut;break}return st(Vt)}return zt.toString=function(){return mt+""},zt}function ht(mt,yt){var vt=pt((mt=formatSpecifier(mt),mt.type="f",mt)),Tt=Math.max(-8,Math.min(8,Math.floor(exponent(yt)/3)))*3,Et=Math.pow(10,-Tt),xt=prefixes$1[8+Tt/3];return function(At){return vt(Et*At)+xt}}return{format:pt,formatPrefix:ht}}var locale$2,format$3,formatPrefix;defaultLocale$2({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale$2(et){return locale$2=formatLocale$1(et),format$3=locale$2.format,formatPrefix=locale$2.formatPrefix,locale$2}function precisionFixed(et){return Math.max(0,-exponent(Math.abs(et)))}function precisionPrefix(et,tt){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent(tt)/3)))*3-exponent(Math.abs(et)))}function precisionRound(et,tt){return et=Math.abs(et),tt=Math.abs(tt)-et,Math.max(0,exponent(tt)-exponent(et))+1}const t0$2=new Date,t1$1=new Date;function timeInterval$1(et,tt,nt,rt){function ot(st){return et(st=arguments.length===0?new Date:new Date(+st)),st}return ot.floor=st=>(et(st=new Date(+st)),st),ot.ceil=st=>(et(st=new Date(st-1)),tt(st,1),et(st),st),ot.round=st=>{const ut=ot(st),ct=ot.ceil(st);return st-ut<ct-st?ut:ct},ot.offset=(st,ut)=>(tt(st=new Date(+st),ut==null?1:Math.floor(ut)),st),ot.range=(st,ut,ct)=>{const ft=[];if(st=ot.ceil(st),ct=ct==null?1:Math.floor(ct),!(st<ut)||!(ct>0))return ft;let pt;do ft.push(pt=new Date(+st)),tt(st,ct),et(st);while(pt<st&&st<ut);return ft},ot.filter=st=>timeInterval$1(ut=>{if(ut>=ut)for(;et(ut),!st(ut);)ut.setTime(ut-1)},(ut,ct)=>{if(ut>=ut)if(ct<0)for(;++ct<=0;)for(;tt(ut,-1),!st(ut););else for(;--ct>=0;)for(;tt(ut,1),!st(ut););}),nt&&(ot.count=(st,ut)=>(t0$2.setTime(+st),t1$1.setTime(+ut),et(t0$2),et(t1$1),Math.floor(nt(t0$2,t1$1))),ot.every=st=>(st=Math.floor(st),!isFinite(st)||!(st>0)?null:st>1?ot.filter(rt?ut=>rt(ut)%st===0:ut=>ot.count(0,ut)%st===0):ot)),ot}const millisecond=timeInterval$1(()=>{},(et,tt)=>{et.setTime(+et+tt)},(et,tt)=>tt-et);millisecond.every=et=>(et=Math.floor(et),!isFinite(et)||!(et>0)?null:et>1?timeInterval$1(tt=>{tt.setTime(Math.floor(tt/et)*et)},(tt,nt)=>{tt.setTime(+tt+nt*et)},(tt,nt)=>(nt-tt)/et):millisecond);millisecond.range;const durationSecond$1=1e3,durationMinute$1=durationSecond$1*60,durationHour$1=durationMinute$1*60,durationDay$1=durationHour$1*24,durationWeek$1=durationDay$1*7,durationMonth$1=durationDay$1*30,durationYear$1=durationDay$1*365,second=timeInterval$1(et=>{et.setTime(et-et.getMilliseconds())},(et,tt)=>{et.setTime(+et+tt*durationSecond$1)},(et,tt)=>(tt-et)/durationSecond$1,et=>et.getUTCSeconds());second.range;const timeMinute=timeInterval$1(et=>{et.setTime(et-et.getMilliseconds()-et.getSeconds()*durationSecond$1)},(et,tt)=>{et.setTime(+et+tt*durationMinute$1)},(et,tt)=>(tt-et)/durationMinute$1,et=>et.getMinutes());timeMinute.range;const utcMinute=timeInterval$1(et=>{et.setUTCSeconds(0,0)},(et,tt)=>{et.setTime(+et+tt*durationMinute$1)},(et,tt)=>(tt-et)/durationMinute$1,et=>et.getUTCMinutes());utcMinute.range;const timeHour=timeInterval$1(et=>{et.setTime(et-et.getMilliseconds()-et.getSeconds()*durationSecond$1-et.getMinutes()*durationMinute$1)},(et,tt)=>{et.setTime(+et+tt*durationHour$1)},(et,tt)=>(tt-et)/durationHour$1,et=>et.getHours());timeHour.range;const utcHour=timeInterval$1(et=>{et.setUTCMinutes(0,0,0)},(et,tt)=>{et.setTime(+et+tt*durationHour$1)},(et,tt)=>(tt-et)/durationHour$1,et=>et.getUTCHours());utcHour.range;const timeDay=timeInterval$1(et=>et.setHours(0,0,0,0),(et,tt)=>et.setDate(et.getDate()+tt),(et,tt)=>(tt-et-(tt.getTimezoneOffset()-et.getTimezoneOffset())*durationMinute$1)/durationDay$1,et=>et.getDate()-1);timeDay.range;const utcDay=timeInterval$1(et=>{et.setUTCHours(0,0,0,0)},(et,tt)=>{et.setUTCDate(et.getUTCDate()+tt)},(et,tt)=>(tt-et)/durationDay$1,et=>et.getUTCDate()-1);utcDay.range;const unixDay=timeInterval$1(et=>{et.setUTCHours(0,0,0,0)},(et,tt)=>{et.setUTCDate(et.getUTCDate()+tt)},(et,tt)=>(tt-et)/durationDay$1,et=>Math.floor(et/durationDay$1));unixDay.range;function timeWeekday(et){return timeInterval$1(tt=>{tt.setDate(tt.getDate()-(tt.getDay()+7-et)%7),tt.setHours(0,0,0,0)},(tt,nt)=>{tt.setDate(tt.getDate()+nt*7)},(tt,nt)=>(nt-tt-(nt.getTimezoneOffset()-tt.getTimezoneOffset())*durationMinute$1)/durationWeek$1)}const timeSunday=timeWeekday(0),timeMonday=timeWeekday(1),timeTuesday=timeWeekday(2),timeWednesday=timeWeekday(3),timeThursday=timeWeekday(4),timeFriday=timeWeekday(5),timeSaturday=timeWeekday(6);timeSunday.range;timeMonday.range;timeTuesday.range;timeWednesday.range;timeThursday.range;timeFriday.range;timeSaturday.range;function utcWeekday(et){return timeInterval$1(tt=>{tt.setUTCDate(tt.getUTCDate()-(tt.getUTCDay()+7-et)%7),tt.setUTCHours(0,0,0,0)},(tt,nt)=>{tt.setUTCDate(tt.getUTCDate()+nt*7)},(tt,nt)=>(nt-tt)/durationWeek$1)}const utcSunday=utcWeekday(0),utcMonday=utcWeekday(1),utcTuesday=utcWeekday(2),utcWednesday=utcWeekday(3),utcThursday=utcWeekday(4),utcFriday=utcWeekday(5),utcSaturday=utcWeekday(6);utcSunday.range;utcMonday.range;utcTuesday.range;utcWednesday.range;utcThursday.range;utcFriday.range;utcSaturday.range;const timeMonth=timeInterval$1(et=>{et.setDate(1),et.setHours(0,0,0,0)},(et,tt)=>{et.setMonth(et.getMonth()+tt)},(et,tt)=>tt.getMonth()-et.getMonth()+(tt.getFullYear()-et.getFullYear())*12,et=>et.getMonth());timeMonth.range;const utcMonth=timeInterval$1(et=>{et.setUTCDate(1),et.setUTCHours(0,0,0,0)},(et,tt)=>{et.setUTCMonth(et.getUTCMonth()+tt)},(et,tt)=>tt.getUTCMonth()-et.getUTCMonth()+(tt.getUTCFullYear()-et.getUTCFullYear())*12,et=>et.getUTCMonth());utcMonth.range;const timeYear=timeInterval$1(et=>{et.setMonth(0,1),et.setHours(0,0,0,0)},(et,tt)=>{et.setFullYear(et.getFullYear()+tt)},(et,tt)=>tt.getFullYear()-et.getFullYear(),et=>et.getFullYear());timeYear.every=et=>!isFinite(et=Math.floor(et))||!(et>0)?null:timeInterval$1(tt=>{tt.setFullYear(Math.floor(tt.getFullYear()/et)*et),tt.setMonth(0,1),tt.setHours(0,0,0,0)},(tt,nt)=>{tt.setFullYear(tt.getFullYear()+nt*et)});timeYear.range;const utcYear=timeInterval$1(et=>{et.setUTCMonth(0,1),et.setUTCHours(0,0,0,0)},(et,tt)=>{et.setUTCFullYear(et.getUTCFullYear()+tt)},(et,tt)=>tt.getUTCFullYear()-et.getUTCFullYear(),et=>et.getUTCFullYear());utcYear.every=et=>!isFinite(et=Math.floor(et))||!(et>0)?null:timeInterval$1(tt=>{tt.setUTCFullYear(Math.floor(tt.getUTCFullYear()/et)*et),tt.setUTCMonth(0,1),tt.setUTCHours(0,0,0,0)},(tt,nt)=>{tt.setUTCFullYear(tt.getUTCFullYear()+nt*et)});utcYear.range;function ticker(et,tt,nt,rt,ot,st){const ut=[[second,1,durationSecond$1],[second,5,5*durationSecond$1],[second,15,15*durationSecond$1],[second,30,30*durationSecond$1],[st,1,durationMinute$1],[st,5,5*durationMinute$1],[st,15,15*durationMinute$1],[st,30,30*durationMinute$1],[ot,1,durationHour$1],[ot,3,3*durationHour$1],[ot,6,6*durationHour$1],[ot,12,12*durationHour$1],[rt,1,durationDay$1],[rt,2,2*durationDay$1],[nt,1,durationWeek$1],[tt,1,durationMonth$1],[tt,3,3*durationMonth$1],[et,1,durationYear$1]];function ct(pt,ht,mt){const yt=ht<pt;yt&&([pt,ht]=[ht,pt]);const vt=mt&&typeof mt.range=="function"?mt:ft(pt,ht,mt),Tt=vt?vt.range(pt,+ht+1):[];return yt?Tt.reverse():Tt}function ft(pt,ht,mt){const yt=Math.abs(ht-pt)/mt,vt=bisector$1(([,,xt])=>xt).right(ut,yt);if(vt===ut.length)return et.every(tickStep(pt/durationYear$1,ht/durationYear$1,mt));if(vt===0)return millisecond.every(Math.max(tickStep(pt,ht,mt),1));const[Tt,Et]=ut[yt/ut[vt-1][2]<ut[vt][2]/yt?vt-1:vt];return Tt.every(Et)}return[ct,ft]}const[utcTicks,utcTickInterval]=ticker(utcYear,utcMonth,utcSunday,unixDay,utcHour,utcMinute),[timeTicks,timeTickInterval]=ticker(timeYear,timeMonth,timeSunday,timeDay,timeHour,timeMinute),YEAR="year",QUARTER="quarter",MONTH="month",WEEK="week",DATE="date",DAY="day",DAYOFYEAR="dayofyear",HOURS="hours",MINUTES="minutes",SECONDS="seconds",MILLISECONDS="milliseconds",TIME_UNITS=[YEAR,QUARTER,MONTH,WEEK,DATE,DAY,DAYOFYEAR,HOURS,MINUTES,SECONDS,MILLISECONDS],UNITS=TIME_UNITS.reduce((et,tt,nt)=>(et[tt]=1+nt,et),{});function timeUnits(et){const tt=array$5(et).slice(),nt={};return tt.length||error("Missing time unit."),tt.forEach(ot=>{has$1(UNITS,ot)?nt[ot]=1:error(`Invalid time unit: ${ot}.`)}),(nt[WEEK]||nt[DAY]?1:0)+(nt[QUARTER]||nt[MONTH]||nt[DATE]?1:0)+(nt[DAYOFYEAR]?1:0)>1&&error(`Incompatible time units: ${et}`),tt.sort((ot,st)=>UNITS[ot]-UNITS[st]),tt}const defaultSpecifiers={[YEAR]:"%Y ",[QUARTER]:"Q%q ",[MONTH]:"%b ",[DATE]:"%d ",[WEEK]:"W%U ",[DAY]:"%a ",[DAYOFYEAR]:"%j ",[HOURS]:"%H:00",[MINUTES]:"00:%M",[SECONDS]:":%S",[MILLISECONDS]:".%L",[`${YEAR}-${MONTH}`]:"%Y-%m ",[`${YEAR}-${MONTH}-${DATE}`]:"%Y-%m-%d ",[`${HOURS}-${MINUTES}`]:"%H:%M"};function timeUnitSpecifier(et,tt){const nt=extend$1({},defaultSpecifiers,tt),rt=timeUnits(et),ot=rt.length;let st="",ut=0,ct,ft;for(ut=0;ut<ot;)for(ct=rt.length;ct>ut;--ct)if(ft=rt.slice(ut,ct).join("-"),nt[ft]!=null){st+=nt[ft],ut=ct;break}return st.trim()}const t0$1=new Date;function localYear(et){return t0$1.setFullYear(et),t0$1.setMonth(0),t0$1.setDate(1),t0$1.setHours(0,0,0,0),t0$1}function dayofyear(et){return localDayOfYear(new Date(et))}function week(et){return localWeekNum(new Date(et))}function localDayOfYear(et){return timeDay.count(localYear(et.getFullYear())-1,et)}function localWeekNum(et){return timeSunday.count(localYear(et.getFullYear())-1,et)}function localFirst(et){return localYear(et).getDay()}function localDate$1(et,tt,nt,rt,ot,st,ut){if(0<=et&&et<100){const ct=new Date(-1,tt,nt,rt,ot,st,ut);return ct.setFullYear(et),ct}return new Date(et,tt,nt,rt,ot,st,ut)}function utcdayofyear(et){return utcDayOfYear(new Date(et))}function utcweek(et){return utcWeekNum(new Date(et))}function utcDayOfYear(et){const tt=Date.UTC(et.getUTCFullYear(),0,1);return utcDay.count(tt-1,et)}function utcWeekNum(et){const tt=Date.UTC(et.getUTCFullYear(),0,1);return utcSunday.count(tt-1,et)}function utcFirst(et){return t0$1.setTime(Date.UTC(et,0,1)),t0$1.getUTCDay()}function utcDate$1(et,tt,nt,rt,ot,st,ut){if(0<=et&&et<100){const ct=new Date(Date.UTC(-1,tt,nt,rt,ot,st,ut));return ct.setUTCFullYear(nt.y),ct}return new Date(Date.UTC(et,tt,nt,rt,ot,st,ut))}function floor(et,tt,nt,rt,ot){const st=tt||1,ut=peek$2(et),ct=(At,Ct,$t)=>($t=$t||At,getUnit(nt[$t],rt[$t],At===ut&&st,Ct)),ft=new Date,pt=toSet(et),ht=pt[YEAR]?ct(YEAR):constant$6(2012),mt=pt[MONTH]?ct(MONTH):pt[QUARTER]?ct(QUARTER):zero$5,yt=pt[WEEK]&&pt[DAY]?ct(DAY,1,WEEK+DAY):pt[WEEK]?ct(WEEK,1):pt[DAY]?ct(DAY,1):pt[DATE]?ct(DATE,1):pt[DAYOFYEAR]?ct(DAYOFYEAR,1):one$2,vt=pt[HOURS]?ct(HOURS):zero$5,Tt=pt[MINUTES]?ct(MINUTES):zero$5,Et=pt[SECONDS]?ct(SECONDS):zero$5,xt=pt[MILLISECONDS]?ct(MILLISECONDS):zero$5;return function(At){ft.setTime(+At);const Ct=ht(ft);return ot(Ct,mt(ft),yt(ft,Ct),vt(ft),Tt(ft),Et(ft),xt(ft))}}function getUnit(et,tt,nt,rt){const ot=nt<=1?et:rt?(st,ut)=>rt+nt*Math.floor((et(st,ut)-rt)/nt):(st,ut)=>nt*Math.floor(et(st,ut)/nt);return tt?(st,ut)=>tt(ot(st,ut),ut):ot}function weekday(et,tt,nt){return tt+et*7-(nt+6)%7}const localGet={[YEAR]:et=>et.getFullYear(),[QUARTER]:et=>Math.floor(et.getMonth()/3),[MONTH]:et=>et.getMonth(),[DATE]:et=>et.getDate(),[HOURS]:et=>et.getHours(),[MINUTES]:et=>et.getMinutes(),[SECONDS]:et=>et.getSeconds(),[MILLISECONDS]:et=>et.getMilliseconds(),[DAYOFYEAR]:et=>localDayOfYear(et),[WEEK]:et=>localWeekNum(et),[WEEK+DAY]:(et,tt)=>weekday(localWeekNum(et),et.getDay(),localFirst(tt)),[DAY]:(et,tt)=>weekday(1,et.getDay(),localFirst(tt))},localInv={[QUARTER]:et=>3*et,[WEEK]:(et,tt)=>weekday(et,0,localFirst(tt))};function timeFloor(et,tt){return floor(et,tt||1,localGet,localInv,localDate$1)}const utcGet={[YEAR]:et=>et.getUTCFullYear(),[QUARTER]:et=>Math.floor(et.getUTCMonth()/3),[MONTH]:et=>et.getUTCMonth(),[DATE]:et=>et.getUTCDate(),[HOURS]:et=>et.getUTCHours(),[MINUTES]:et=>et.getUTCMinutes(),[SECONDS]:et=>et.getUTCSeconds(),[MILLISECONDS]:et=>et.getUTCMilliseconds(),[DAYOFYEAR]:et=>utcDayOfYear(et),[WEEK]:et=>utcWeekNum(et),[DAY]:(et,tt)=>weekday(1,et.getUTCDay(),utcFirst(tt)),[WEEK+DAY]:(et,tt)=>weekday(utcWeekNum(et),et.getUTCDay(),utcFirst(tt))},utcInv={[QUARTER]:et=>3*et,[WEEK]:(et,tt)=>weekday(et,0,utcFirst(tt))};function utcFloor(et,tt){return floor(et,tt||1,utcGet,utcInv,utcDate$1)}const timeIntervals={[YEAR]:timeYear,[QUARTER]:timeMonth.every(3),[MONTH]:timeMonth,[WEEK]:timeSunday,[DATE]:timeDay,[DAY]:timeDay,[DAYOFYEAR]:timeDay,[HOURS]:timeHour,[MINUTES]:timeMinute,[SECONDS]:second,[MILLISECONDS]:millisecond},utcIntervals={[YEAR]:utcYear,[QUARTER]:utcMonth.every(3),[MONTH]:utcMonth,[WEEK]:utcSunday,[DATE]:utcDay,[DAY]:utcDay,[DAYOFYEAR]:utcDay,[HOURS]:utcHour,[MINUTES]:utcMinute,[SECONDS]:second,[MILLISECONDS]:millisecond};function timeInterval(et){return timeIntervals[et]}function utcInterval(et){return utcIntervals[et]}function offset$3(et,tt,nt){return et?et.offset(tt,nt):void 0}function timeOffset(et,tt,nt){return offset$3(timeInterval(et),tt,nt)}function utcOffset(et,tt,nt){return offset$3(utcInterval(et),tt,nt)}function sequence$1(et,tt,nt,rt){return et?et.range(tt,nt,rt):void 0}function timeSequence(et,tt,nt,rt){return sequence$1(timeInterval(et),tt,nt,rt)}function utcSequence(et,tt,nt,rt){return sequence$1(utcInterval(et),tt,nt,rt)}const durationSecond=1e3,durationMinute=durationSecond*60,durationHour=durationMinute*60,durationDay=durationHour*24,durationWeek=durationDay*7,durationMonth=durationDay*30,durationYear=durationDay*365,Milli=[YEAR,MONTH,DATE,HOURS,MINUTES,SECONDS,MILLISECONDS],Seconds=Milli.slice(0,-1),Minutes=Seconds.slice(0,-1),Hours=Minutes.slice(0,-1),Day=Hours.slice(0,-1),Week=[YEAR,WEEK],Month=[YEAR,MONTH],Year=[YEAR],intervals=[[Seconds,1,durationSecond],[Seconds,5,5*durationSecond],[Seconds,15,15*durationSecond],[Seconds,30,30*durationSecond],[Minutes,1,durationMinute],[Minutes,5,5*durationMinute],[Minutes,15,15*durationMinute],[Minutes,30,30*durationMinute],[Hours,1,durationHour],[Hours,3,3*durationHour],[Hours,6,6*durationHour],[Hours,12,12*durationHour],[Day,1,durationDay],[Week,1,durationWeek],[Month,1,durationMonth],[Month,3,3*durationMonth],[Year,1,durationYear]];function bin$2(et){const tt=et.extent,nt=et.maxbins||40,rt=Math.abs(span(tt))/nt;let ot=bisector$1(ct=>ct[2]).right(intervals,rt),st,ut;return ot===intervals.length?(st=Year,ut=tickStep(tt[0]/durationYear,tt[1]/durationYear,nt)):ot?(ot=intervals[rt/intervals[ot-1][2]<intervals[ot][2]/rt?ot-1:ot],st=ot[0],ut=ot[1]):(st=Milli,ut=Math.max(tickStep(tt[0],tt[1],nt),1)),{units:st,step:ut}}function localDate(et){if(0<=et.y&&et.y<100){var tt=new Date(-1,et.m,et.d,et.H,et.M,et.S,et.L);return tt.setFullYear(et.y),tt}return new Date(et.y,et.m,et.d,et.H,et.M,et.S,et.L)}function utcDate(et){if(0<=et.y&&et.y<100){var tt=new Date(Date.UTC(-1,et.m,et.d,et.H,et.M,et.S,et.L));return tt.setUTCFullYear(et.y),tt}return new Date(Date.UTC(et.y,et.m,et.d,et.H,et.M,et.S,et.L))}function newDate(et,tt,nt){return{y:et,m:tt,d:nt,H:0,M:0,S:0,L:0}}function formatLocale(et){var tt=et.dateTime,nt=et.date,rt=et.time,ot=et.periods,st=et.days,ut=et.shortDays,ct=et.months,ft=et.shortMonths,pt=formatRe(ot),ht=formatLookup(ot),mt=formatRe(st),yt=formatLookup(st),vt=formatRe(ut),Tt=formatLookup(ut),Et=formatRe(ct),xt=formatLookup(ct),At=formatRe(ft),Ct=formatLookup(ft),$t={a:An,A:sn,b:Sn,B:In,c:null,d:formatDayOfMonth,e:formatDayOfMonth,f:formatMicroseconds,g:formatYearISO,G:formatFullYearISO,H:formatHour24,I:formatHour12,j:formatDayOfYear,L:formatMilliseconds,m:formatMonthNumber,M:formatMinutes,p:_n,q:En,Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatSeconds,u:formatWeekdayNumberMonday,U:formatWeekNumberSunday,V:formatWeekNumberISO,w:formatWeekdayNumberSunday,W:formatWeekNumberMonday,x:null,X:null,y:formatYear,Y:formatFullYear,Z:formatZone,"%":formatLiteralPercent},Ot={a:Ln,A:wn,b:Dn,B:$n,c:null,d:formatUTCDayOfMonth,e:formatUTCDayOfMonth,f:formatUTCMicroseconds,g:formatUTCYearISO,G:formatUTCFullYearISO,H:formatUTCHour24,I:formatUTCHour12,j:formatUTCDayOfYear,L:formatUTCMilliseconds,m:formatUTCMonthNumber,M:formatUTCMinutes,p:Gn,q:Jn,Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatUTCSeconds,u:formatUTCWeekdayNumberMonday,U:formatUTCWeekNumberSunday,V:formatUTCWeekNumberISO,w:formatUTCWeekdayNumberSunday,W:formatUTCWeekNumberMonday,x:null,X:null,y:formatUTCYear,Y:formatUTCFullYear,Z:formatUTCZone,"%":formatLiteralPercent},Rt={a:zt,A:Vt,b:Zt,B:Ut,c:Xt,d:parseDayOfMonth,e:parseDayOfMonth,f:parseMicroseconds,g:parseYear,G:parseFullYear,H:parseHour24,I:parseHour24,j:parseDayOfYear,L:parseMilliseconds,m:parseMonthNumber,M:parseMinutes,p:Ft,q:parseQuarter,Q:parseUnixTimestamp,s:parseUnixTimestampSeconds,S:parseSeconds,u:parseWeekdayNumberMonday,U:parseWeekNumberSunday,V:parseWeekNumberISO,w:parseWeekdayNumberSunday,W:parseWeekNumberMonday,x:Jt,X:gn,y:parseYear,Y:parseFullYear,Z:parseZone,"%":parseLiteralPercent};$t.x=It(nt,$t),$t.X=It(rt,$t),$t.c=It(tt,$t),Ot.x=It(nt,Ot),Ot.X=It(rt,Ot),Ot.c=It(tt,Ot);function It(zn,Qn){return function(Bn){var jn=[],Ar=-1,Er=0,Pr=zn.length,Nr,Ir,no;for(Bn instanceof Date||(Bn=new Date(+Bn));++Ar<Pr;)zn.charCodeAt(Ar)===37&&(jn.push(zn.slice(Er,Ar)),(Ir=pads[Nr=zn.charAt(++Ar)])!=null?Nr=zn.charAt(++Ar):Ir=Nr==="e"?" ":"0",(no=Qn[Nr])&&(Nr=no(Bn,Ir)),jn.push(Nr),Er=Ar+1);return jn.push(zn.slice(Er,Ar)),jn.join("")}}function kt(zn,Qn){return function(Bn){var jn=newDate(1900,void 0,1),Ar=Mt(jn,zn,Bn+="",0),Er,Pr;if(Ar!=Bn.length)return null;if("Q"in jn)return new Date(jn.Q);if("s"in jn)return new Date(jn.s*1e3+("L"in jn?jn.L:0));if(Qn&&!("Z"in jn)&&(jn.Z=0),"p"in jn&&(jn.H=jn.H%12+jn.p*12),jn.m===void 0&&(jn.m="q"in jn?jn.q:0),"V"in jn){if(jn.V<1||jn.V>53)return null;"w"in jn||(jn.w=1),"Z"in jn?(Er=utcDate(newDate(jn.y,0,1)),Pr=Er.getUTCDay(),Er=Pr>4||Pr===0?utcMonday.ceil(Er):utcMonday(Er),Er=utcDay.offset(Er,(jn.V-1)*7),jn.y=Er.getUTCFullYear(),jn.m=Er.getUTCMonth(),jn.d=Er.getUTCDate()+(jn.w+6)%7):(Er=localDate(newDate(jn.y,0,1)),Pr=Er.getDay(),Er=Pr>4||Pr===0?timeMonday.ceil(Er):timeMonday(Er),Er=timeDay.offset(Er,(jn.V-1)*7),jn.y=Er.getFullYear(),jn.m=Er.getMonth(),jn.d=Er.getDate()+(jn.w+6)%7)}else("W"in jn||"U"in jn)&&("w"in jn||(jn.w="u"in jn?jn.u%7:"W"in jn?1:0),Pr="Z"in jn?utcDate(newDate(jn.y,0,1)).getUTCDay():localDate(newDate(jn.y,0,1)).getDay(),jn.m=0,jn.d="W"in jn?(jn.w+6)%7+jn.W*7-(Pr+5)%7:jn.w+jn.U*7-(Pr+6)%7);return"Z"in jn?(jn.H+=jn.Z/100|0,jn.M+=jn.Z%100,utcDate(jn)):localDate(jn)}}function Mt(zn,Qn,Bn,jn){for(var Ar=0,Er=Qn.length,Pr=Bn.length,Nr,Ir;Ar<Er;){if(jn>=Pr)return-1;if(Nr=Qn.charCodeAt(Ar++),Nr===37){if(Nr=Qn.charAt(Ar++),Ir=Rt[Nr in pads?Qn.charAt(Ar++):Nr],!Ir||(jn=Ir(zn,Bn,jn))<0)return-1}else if(Nr!=Bn.charCodeAt(jn++))return-1}return jn}function Ft(zn,Qn,Bn){var jn=pt.exec(Qn.slice(Bn));return jn?(zn.p=ht.get(jn[0].toLowerCase()),Bn+jn[0].length):-1}function zt(zn,Qn,Bn){var jn=vt.exec(Qn.slice(Bn));return jn?(zn.w=Tt.get(jn[0].toLowerCase()),Bn+jn[0].length):-1}function Vt(zn,Qn,Bn){var jn=mt.exec(Qn.slice(Bn));return jn?(zn.w=yt.get(jn[0].toLowerCase()),Bn+jn[0].length):-1}function Zt(zn,Qn,Bn){var jn=At.exec(Qn.slice(Bn));return jn?(zn.m=Ct.get(jn[0].toLowerCase()),Bn+jn[0].length):-1}function Ut(zn,Qn,Bn){var jn=Et.exec(Qn.slice(Bn));return jn?(zn.m=xt.get(jn[0].toLowerCase()),Bn+jn[0].length):-1}function Xt(zn,Qn,Bn){return Mt(zn,tt,Qn,Bn)}function Jt(zn,Qn,Bn){return Mt(zn,nt,Qn,Bn)}function gn(zn,Qn,Bn){return Mt(zn,rt,Qn,Bn)}function An(zn){return ut[zn.getDay()]}function sn(zn){return st[zn.getDay()]}function Sn(zn){return ft[zn.getMonth()]}function In(zn){return ct[zn.getMonth()]}function _n(zn){return ot[+(zn.getHours()>=12)]}function En(zn){return 1+~~(zn.getMonth()/3)}function Ln(zn){return ut[zn.getUTCDay()]}function wn(zn){return st[zn.getUTCDay()]}function Dn(zn){return ft[zn.getUTCMonth()]}function $n(zn){return ct[zn.getUTCMonth()]}function Gn(zn){return ot[+(zn.getUTCHours()>=12)]}function Jn(zn){return 1+~~(zn.getUTCMonth()/3)}return{format:function(zn){var Qn=It(zn+="",$t);return Qn.toString=function(){return zn},Qn},parse:function(zn){var Qn=kt(zn+="",!1);return Qn.toString=function(){return zn},Qn},utcFormat:function(zn){var Qn=It(zn+="",Ot);return Qn.toString=function(){return zn},Qn},utcParse:function(zn){var Qn=kt(zn+="",!0);return Qn.toString=function(){return zn},Qn}}}var pads={"-":"",_:" ",0:"0"},numberRe=/^\s*\d+/,percentRe=/^%/,requoteRe=/[\\^$*+?|[\]().{}]/g;function pad(et,tt,nt){var rt=et<0?"-":"",ot=(rt?-et:et)+"",st=ot.length;return rt+(st<nt?new Array(nt-st+1).join(tt)+ot:ot)}function requote(et){return et.replace(requoteRe,"\\$&")}function formatRe(et){return new RegExp("^(?:"+et.map(requote).join("|")+")","i")}function formatLookup(et){return new Map(et.map((tt,nt)=>[tt.toLowerCase(),nt]))}function parseWeekdayNumberSunday(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+1));return rt?(et.w=+rt[0],nt+rt[0].length):-1}function parseWeekdayNumberMonday(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+1));return rt?(et.u=+rt[0],nt+rt[0].length):-1}function parseWeekNumberSunday(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.U=+rt[0],nt+rt[0].length):-1}function parseWeekNumberISO(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.V=+rt[0],nt+rt[0].length):-1}function parseWeekNumberMonday(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.W=+rt[0],nt+rt[0].length):-1}function parseFullYear(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+4));return rt?(et.y=+rt[0],nt+rt[0].length):-1}function parseYear(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.y=+rt[0]+(+rt[0]>68?1900:2e3),nt+rt[0].length):-1}function parseZone(et,tt,nt){var rt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(tt.slice(nt,nt+6));return rt?(et.Z=rt[1]?0:-(rt[2]+(rt[3]||"00")),nt+rt[0].length):-1}function parseQuarter(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+1));return rt?(et.q=rt[0]*3-3,nt+rt[0].length):-1}function parseMonthNumber(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.m=rt[0]-1,nt+rt[0].length):-1}function parseDayOfMonth(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.d=+rt[0],nt+rt[0].length):-1}function parseDayOfYear(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+3));return rt?(et.m=0,et.d=+rt[0],nt+rt[0].length):-1}function parseHour24(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.H=+rt[0],nt+rt[0].length):-1}function parseMinutes(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.M=+rt[0],nt+rt[0].length):-1}function parseSeconds(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+2));return rt?(et.S=+rt[0],nt+rt[0].length):-1}function parseMilliseconds(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+3));return rt?(et.L=+rt[0],nt+rt[0].length):-1}function parseMicroseconds(et,tt,nt){var rt=numberRe.exec(tt.slice(nt,nt+6));return rt?(et.L=Math.floor(rt[0]/1e3),nt+rt[0].length):-1}function parseLiteralPercent(et,tt,nt){var rt=percentRe.exec(tt.slice(nt,nt+1));return rt?nt+rt[0].length:-1}function parseUnixTimestamp(et,tt,nt){var rt=numberRe.exec(tt.slice(nt));return rt?(et.Q=+rt[0],nt+rt[0].length):-1}function parseUnixTimestampSeconds(et,tt,nt){var rt=numberRe.exec(tt.slice(nt));return rt?(et.s=+rt[0],nt+rt[0].length):-1}function formatDayOfMonth(et,tt){return pad(et.getDate(),tt,2)}function formatHour24(et,tt){return pad(et.getHours(),tt,2)}function formatHour12(et,tt){return pad(et.getHours()%12||12,tt,2)}function formatDayOfYear(et,tt){return pad(1+timeDay.count(timeYear(et),et),tt,3)}function formatMilliseconds(et,tt){return pad(et.getMilliseconds(),tt,3)}function formatMicroseconds(et,tt){return formatMilliseconds(et,tt)+"000"}function formatMonthNumber(et,tt){return pad(et.getMonth()+1,tt,2)}function formatMinutes(et,tt){return pad(et.getMinutes(),tt,2)}function formatSeconds(et,tt){return pad(et.getSeconds(),tt,2)}function formatWeekdayNumberMonday(et){var tt=et.getDay();return tt===0?7:tt}function formatWeekNumberSunday(et,tt){return pad(timeSunday.count(timeYear(et)-1,et),tt,2)}function dISO(et){var tt=et.getDay();return tt>=4||tt===0?timeThursday(et):timeThursday.ceil(et)}function formatWeekNumberISO(et,tt){return et=dISO(et),pad(timeThursday.count(timeYear(et),et)+(timeYear(et).getDay()===4),tt,2)}function formatWeekdayNumberSunday(et){return et.getDay()}function formatWeekNumberMonday(et,tt){return pad(timeMonday.count(timeYear(et)-1,et),tt,2)}function formatYear(et,tt){return pad(et.getFullYear()%100,tt,2)}function formatYearISO(et,tt){return et=dISO(et),pad(et.getFullYear()%100,tt,2)}function formatFullYear(et,tt){return pad(et.getFullYear()%1e4,tt,4)}function formatFullYearISO(et,tt){var nt=et.getDay();return et=nt>=4||nt===0?timeThursday(et):timeThursday.ceil(et),pad(et.getFullYear()%1e4,tt,4)}function formatZone(et){var tt=et.getTimezoneOffset();return(tt>0?"-":(tt*=-1,"+"))+pad(tt/60|0,"0",2)+pad(tt%60,"0",2)}function formatUTCDayOfMonth(et,tt){return pad(et.getUTCDate(),tt,2)}function formatUTCHour24(et,tt){return pad(et.getUTCHours(),tt,2)}function formatUTCHour12(et,tt){return pad(et.getUTCHours()%12||12,tt,2)}function formatUTCDayOfYear(et,tt){return pad(1+utcDay.count(utcYear(et),et),tt,3)}function formatUTCMilliseconds(et,tt){return pad(et.getUTCMilliseconds(),tt,3)}function formatUTCMicroseconds(et,tt){return formatUTCMilliseconds(et,tt)+"000"}function formatUTCMonthNumber(et,tt){return pad(et.getUTCMonth()+1,tt,2)}function formatUTCMinutes(et,tt){return pad(et.getUTCMinutes(),tt,2)}function formatUTCSeconds(et,tt){return pad(et.getUTCSeconds(),tt,2)}function formatUTCWeekdayNumberMonday(et){var tt=et.getUTCDay();return tt===0?7:tt}function formatUTCWeekNumberSunday(et,tt){return pad(utcSunday.count(utcYear(et)-1,et),tt,2)}function UTCdISO(et){var tt=et.getUTCDay();return tt>=4||tt===0?utcThursday(et):utcThursday.ceil(et)}function formatUTCWeekNumberISO(et,tt){return et=UTCdISO(et),pad(utcThursday.count(utcYear(et),et)+(utcYear(et).getUTCDay()===4),tt,2)}function formatUTCWeekdayNumberSunday(et){return et.getUTCDay()}function formatUTCWeekNumberMonday(et,tt){return pad(utcMonday.count(utcYear(et)-1,et),tt,2)}function formatUTCYear(et,tt){return pad(et.getUTCFullYear()%100,tt,2)}function formatUTCYearISO(et,tt){return et=UTCdISO(et),pad(et.getUTCFullYear()%100,tt,2)}function formatUTCFullYear(et,tt){return pad(et.getUTCFullYear()%1e4,tt,4)}function formatUTCFullYearISO(et,tt){var nt=et.getUTCDay();return et=nt>=4||nt===0?utcThursday(et):utcThursday.ceil(et),pad(et.getUTCFullYear()%1e4,tt,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(et){return+et}function formatUnixTimestampSeconds(et){return Math.floor(+et/1e3)}var locale$1,timeFormat$2,timeParse$1,utcFormat$1,utcParse$1;defaultLocale$1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale$1(et){return locale$1=formatLocale(et),timeFormat$2=locale$1.format,timeParse$1=locale$1.parse,utcFormat$1=locale$1.utcFormat,utcParse$1=locale$1.utcParse,locale$1}function memoize$2(et){const tt={};return nt=>tt[nt]||(tt[nt]=et(nt))}function trimZeroes(et,tt){return nt=>{const rt=et(nt),ot=rt.indexOf(tt);if(ot<0)return rt;let st=rightmostDigit(rt,ot);const ut=st<rt.length?rt.slice(st):"";for(;--st>ot;)if(rt[st]!=="0"){++st;break}return rt.slice(0,st)+ut}}function rightmostDigit(et,tt){let nt=et.lastIndexOf("e"),rt;if(nt>0)return nt;for(nt=et.length;--nt>tt;)if(rt=et.charCodeAt(nt),rt>=48&&rt<=57)return nt+1}function numberLocale(et){const tt=memoize$2(et.format),nt=et.formatPrefix;return{format:tt,formatPrefix:nt,formatFloat(rt){const ot=formatSpecifier(rt||",");if(ot.precision==null){switch(ot.precision=12,ot.type){case"%":ot.precision-=2;break;case"e":ot.precision-=1;break}return trimZeroes(tt(ot),tt(".1f")(1)[1])}else return tt(ot)},formatSpan(rt,ot,st,ut){ut=formatSpecifier(ut??",f");const ct=tickStep(rt,ot,st),ft=Math.max(Math.abs(rt),Math.abs(ot));let pt;if(ut.precision==null)switch(ut.type){case"s":return isNaN(pt=precisionPrefix(ct,ft))||(ut.precision=pt),nt(ut,ft);case"":case"e":case"g":case"p":case"r":{isNaN(pt=precisionRound(ct,ft))||(ut.precision=pt-(ut.type==="e"));break}case"f":case"%":{isNaN(pt=precisionFixed(ct))||(ut.precision=pt-(ut.type==="%")*2);break}}return tt(ut)}}}let defaultNumberLocale;resetNumberFormatDefaultLocale();function resetNumberFormatDefaultLocale(){return defaultNumberLocale=numberLocale({format:format$3,formatPrefix})}function numberFormatLocale(et){return numberLocale(formatLocale$1(et))}function numberFormatDefaultLocale(et){return arguments.length?defaultNumberLocale=numberFormatLocale(et):defaultNumberLocale}function timeMultiFormat(et,tt,nt){nt=nt||{},isObject(nt)||error(`Invalid time multi-format specifier: ${nt}`);const rt=tt(SECONDS),ot=tt(MINUTES),st=tt(HOURS),ut=tt(DATE),ct=tt(WEEK),ft=tt(MONTH),pt=tt(QUARTER),ht=tt(YEAR),mt=et(nt[MILLISECONDS]||".%L"),yt=et(nt[SECONDS]||":%S"),vt=et(nt[MINUTES]||"%I:%M"),Tt=et(nt[HOURS]||"%I %p"),Et=et(nt[DATE]||nt[DAY]||"%a %d"),xt=et(nt[WEEK]||"%b %d"),At=et(nt[MONTH]||"%B"),Ct=et(nt[QUARTER]||"%B"),$t=et(nt[YEAR]||"%Y");return Ot=>(rt(Ot)<Ot?mt:ot(Ot)<Ot?yt:st(Ot)<Ot?vt:ut(Ot)<Ot?Tt:ft(Ot)<Ot?ct(Ot)<Ot?Et:xt:ht(Ot)<Ot?pt(Ot)<Ot?At:Ct:$t)(Ot)}function timeLocale(et){const tt=memoize$2(et.format),nt=memoize$2(et.utcFormat);return{timeFormat:rt=>isString(rt)?tt(rt):timeMultiFormat(tt,timeInterval,rt),utcFormat:rt=>isString(rt)?nt(rt):timeMultiFormat(nt,utcInterval,rt),timeParse:memoize$2(et.parse),utcParse:memoize$2(et.utcParse)}}let defaultTimeLocale;resetTimeFormatDefaultLocale();function resetTimeFormatDefaultLocale(){return defaultTimeLocale=timeLocale({format:timeFormat$2,parse:timeParse$1,utcFormat:utcFormat$1,utcParse:utcParse$1})}function timeFormatLocale(et){return timeLocale(formatLocale(et))}function timeFormatDefaultLocale(et){return arguments.length?defaultTimeLocale=timeFormatLocale(et):defaultTimeLocale}const createLocale=(et,tt)=>extend$1({},et,tt);function locale(et,tt){const nt=et?numberFormatLocale(et):numberFormatDefaultLocale(),rt=tt?timeFormatLocale(tt):timeFormatDefaultLocale();return createLocale(nt,rt)}function defaultLocale(et,tt){const nt=arguments.length;return nt&&nt!==2&&error("defaultLocale expects either zero or two arguments."),nt?createLocale(numberFormatDefaultLocale(et),timeFormatDefaultLocale(tt)):createLocale(numberFormatDefaultLocale(),timeFormatDefaultLocale())}function resetDefaultLocale(){return resetNumberFormatDefaultLocale(),resetTimeFormatDefaultLocale(),defaultLocale()}const protocol_re=/^(data:|([A-Za-z]+:)?\/\/)/,allowed_re=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whitespace_re=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,fileProtocol="file://";function loaderFactory(et,tt){return nt=>({options:nt||{},sanitize,load:load$1,fileAccess:!!tt,file:fileLoader(tt),http:httpLoader(et)})}async function load$1(et,tt){const nt=await this.sanitize(et,tt),rt=nt.href;return nt.localFile?this.file(rt):this.http(rt,tt)}async function sanitize(et,tt){tt=extend$1({},this.options,tt);const nt=this.fileAccess,rt={href:null};let ot,st,ut;const ct=allowed_re.test(et.replace(whitespace_re,""));(et==null||typeof et!="string"||!ct)&&error("Sanitize failure, invalid URI: "+$(et));const ft=protocol_re.test(et);return(ut=tt.baseURL)&&!ft&&(!et.startsWith("/")&&!ut.endsWith("/")&&(et="/"+et),et=ut+et),st=(ot=et.startsWith(fileProtocol))||tt.mode==="file"||tt.mode!=="http"&&!ft&&nt,ot?et=et.slice(fileProtocol.length):et.startsWith("//")&&(tt.defaultProtocol==="file"?(et=et.slice(2),st=!0):et=(tt.defaultProtocol||"http")+":"+et),Object.defineProperty(rt,"localFile",{value:!!st}),rt.href=et,tt.target&&(rt.target=tt.target+""),tt.rel&&(rt.rel=tt.rel+""),tt.context==="image"&&tt.crossOrigin&&(rt.crossOrigin=tt.crossOrigin+""),rt}function fileLoader(et){return et?tt=>new Promise((nt,rt)=>{et.readFile(tt,(ot,st)=>{ot?rt(ot):nt(st)})}):fileReject}async function fileReject(){error("No file system access.")}function httpLoader(et){return et?async function(tt,nt){const rt=extend$1({},this.options.http,nt),ot=nt&&nt.response,st=await et(tt,rt);return st.ok?isFunction$3(st[ot])?st[ot]():st.text():error(st.status+""+st.statusText)}:httpReject}async function httpReject(){error("No HTTP fetch method available.")}const isValid=et=>et!=null&&et===et,isBoolean$1=et=>et==="true"||et==="false"||et===!0||et===!1,isDate=et=>!Number.isNaN(Date.parse(et)),isNumber=et=>!Number.isNaN(+et)&&!(et instanceof Date),isInteger=et=>isNumber(et)&&Number.isInteger(+et),typeParsers={boolean:toBoolean,integer:toNumber,number:toNumber,date:toDate,string:toString$1,unknown:identity$6},typeTests=[isBoolean$1,isInteger,isNumber,isDate],typeList=["boolean","integer","number","date"];function inferType(et,tt){if(!et||!et.length)return"unknown";const nt=et.length,rt=typeTests.length,ot=typeTests.map((st,ut)=>ut+1);for(let st=0,ut=0,ct,ft;st<nt;++st)for(ft=tt?et[st][tt]:et[st],ct=0;ct<rt;++ct)if(ot[ct]&&isValid(ft)&&!typeTests[ct](ft)&&(ot[ct]=0,++ut,ut===typeTests.length))return"string";return typeList[ot.reduce((st,ut)=>st===0?ut:st,0)-1]}function inferTypes(et,tt){return tt.reduce((nt,rt)=>(nt[rt]=inferType(et,rt),nt),{})}function delimitedFormat(et){const tt=function(nt,rt){const ot={delimiter:et};return dsv(nt,rt?extend$1(rt,ot):ot)};return tt.responseType="text",tt}function dsv(et,tt){return tt.header&&(et=tt.header.map($).join(tt.delimiter)+`
`+et),dsvFormat(tt.delimiter).parse(et+"")}dsv.responseType="text";function isBuffer(et){return typeof Buffer=="function"&&isFunction$3(Buffer.isBuffer)?Buffer.isBuffer(et):!1}function json(et,tt){const nt=tt&&tt.property?field$1(tt.property):identity$6;return isObject(et)&&!isBuffer(et)?parseJSON(nt(et),tt):nt(JSON.parse(et))}json.responseType="json";function parseJSON(et,tt){return!isArray(et)&&isIterable(et)&&(et=[...et]),tt&&tt.copy?JSON.parse(JSON.stringify(et)):et}const filters={interior:(et,tt)=>et!==tt,exterior:(et,tt)=>et===tt};function topojson(et,tt){let nt,rt,ot,st;return et=json(et,tt),tt&&tt.feature?(nt=feature,ot=tt.feature):tt&&tt.mesh?(nt=mesh,ot=tt.mesh,st=filters[tt.filter]):error("Missing TopoJSON feature or mesh parameter."),rt=(rt=et.objects[ot])?nt(et,rt,st):error("Invalid TopoJSON object: "+ot),rt&&rt.features||[rt]}topojson.responseType="json";const format$2={dsv,csv:delimitedFormat(","),tsv:delimitedFormat("	"),json,topojson};function formats$1(et,tt){return arguments.length>1?(format$2[et]=tt,this):has$1(format$2,et)?format$2[et]:null}function responseType(et){const tt=formats$1(et);return tt&&tt.responseType||"text"}function read(et,tt,nt,rt){tt=tt||{};const ot=formats$1(tt.type||"json");return ot||error("Unknown data format type: "+tt.type),et=ot(et,tt),tt.parse&&parse$8(et,tt.parse,nt,rt),has$1(et,"columns")&&delete et.columns,et}function parse$8(et,tt,nt,rt){if(!et.length)return;const ot=timeFormatDefaultLocale();nt=nt||ot.timeParse,rt=rt||ot.utcParse;let st=et.columns||Object.keys(et[0]),ut,ct,ft,pt,ht,mt;tt==="auto"&&(tt=inferTypes(et,st)),st=Object.keys(tt);const yt=st.map(vt=>{const Tt=tt[vt];let Et,xt;if(Tt&&(Tt.startsWith("date:")||Tt.startsWith("utc:")))return Et=Tt.split(/:(.+)?/,2),xt=Et[1],(xt[0]==="'"&&xt[xt.length-1]==="'"||xt[0]==='"'&&xt[xt.length-1]==='"')&&(xt=xt.slice(1,-1)),(Et[0]==="utc"?rt:nt)(xt);if(!typeParsers[Tt])throw Error("Illegal format pattern: "+vt+":"+Tt);return typeParsers[Tt]});for(ft=0,ht=et.length,mt=st.length;ft<ht;++ft)for(ut=et[ft],pt=0;pt<mt;++pt)ct=st[pt],ut[ct]=yt[pt](ut[ct])}const loader=loaderFactory(typeof fetch<"u"&&fetch,null);function UniqueList(et){const tt=et||identity$6,nt=[],rt={};return nt.add=ot=>{const st=tt(ot);return rt[st]||(rt[st]=1,nt.push(ot)),nt},nt.remove=ot=>{const st=tt(ot);if(rt[st]){rt[st]=0;const ut=nt.indexOf(ot);ut>=0&&nt.splice(ut,1)}return nt},nt}async function asyncCallback(et,tt){try{await tt(et)}catch(nt){et.error(nt)}}const TUPLE_ID_KEY=Symbol("vega_id");let TUPLE_ID=1;function isTuple(et){return!!(et&&tupleid(et))}function tupleid(et){return et[TUPLE_ID_KEY]}function setid(et,tt){return et[TUPLE_ID_KEY]=tt,et}function ingest$1(et){const tt=et===Object(et)?et:{data:et};return tupleid(tt)?tt:setid(tt,TUPLE_ID++)}function derive(et){return rederive(et,ingest$1({}))}function rederive(et,tt){for(const nt in et)tt[nt]=et[nt];return tt}function replace$1(et,tt){return setid(tt,tupleid(et))}function stableCompare(et,tt){return et?tt?(nt,rt)=>et(nt,rt)||tupleid(tt(nt))-tupleid(tt(rt)):(nt,rt)=>et(nt,rt)||tupleid(nt)-tupleid(rt):null}function isChangeSet(et){return et&&et.constructor===changeset}function changeset(){const et=[],tt=[],nt=[],rt=[],ot=[];let st=null,ut=!1;return{constructor:changeset,insert(ct){const ft=array$5(ct),pt=ft.length;for(let ht=0;ht<pt;++ht)et.push(ft[ht]);return this},remove(ct){const ft=isFunction$3(ct)?rt:tt,pt=array$5(ct),ht=pt.length;for(let mt=0;mt<ht;++mt)ft.push(pt[mt]);return this},modify(ct,ft,pt){const ht={field:ft,value:constant$6(pt)};return isFunction$3(ct)?(ht.filter=ct,ot.push(ht)):(ht.tuple=ct,nt.push(ht)),this},encode(ct,ft){return isFunction$3(ct)?ot.push({filter:ct,field:ft}):nt.push({tuple:ct,field:ft}),this},clean(ct){return st=ct,this},reflow(){return ut=!0,this},pulse(ct,ft){const pt={},ht={};let mt,yt,vt,Tt,Et,xt;for(mt=0,yt=ft.length;mt<yt;++mt)pt[tupleid(ft[mt])]=1;for(mt=0,yt=tt.length;mt<yt;++mt)Et=tt[mt],pt[tupleid(Et)]=-1;for(mt=0,yt=rt.length;mt<yt;++mt)Tt=rt[mt],ft.forEach(Ct=>{Tt(Ct)&&(pt[tupleid(Ct)]=-1)});for(mt=0,yt=et.length;mt<yt;++mt)Et=et[mt],xt=tupleid(Et),pt[xt]?pt[xt]=1:ct.add.push(ingest$1(et[mt]));for(mt=0,yt=ft.length;mt<yt;++mt)Et=ft[mt],pt[tupleid(Et)]<0&&ct.rem.push(Et);function At(Ct,$t,Ot){Ot?Ct[$t]=Ot(Ct):ct.encode=$t,ut||(ht[tupleid(Ct)]=Ct)}for(mt=0,yt=nt.length;mt<yt;++mt)vt=nt[mt],Et=vt.tuple,Tt=vt.field,xt=pt[tupleid(Et)],xt>0&&(At(Et,Tt,vt.value),ct.modifies(Tt));for(mt=0,yt=ot.length;mt<yt;++mt)vt=ot[mt],Tt=vt.filter,ft.forEach(Ct=>{Tt(Ct)&&pt[tupleid(Ct)]>0&&At(Ct,vt.field,vt.value)}),ct.modifies(vt.field);if(ut)ct.mod=tt.length||rt.length?ft.filter(Ct=>pt[tupleid(Ct)]>0):ft.slice();else for(xt in ht)ct.mod.push(ht[xt]);return(st||st==null&&(tt.length||rt.length))&&ct.clean(!0),ct}}}const CACHE$1="_:mod:_";function Parameters(){Object.defineProperty(this,CACHE$1,{writable:!0,value:{}})}Parameters.prototype={set(et,tt,nt,rt){const ot=this,st=ot[et],ut=ot[CACHE$1];return tt!=null&&tt>=0?(st[tt]!==nt||rt)&&(st[tt]=nt,ut[tt+":"+et]=-1,ut[et]=-1):(st!==nt||rt)&&(ot[et]=nt,ut[et]=isArray(nt)?1+nt.length:-1),ot},modified(et,tt){const nt=this[CACHE$1];if(arguments.length){if(isArray(et)){for(let rt=0;rt<et.length;++rt)if(nt[et[rt]])return!0;return!1}}else{for(const rt in nt)if(nt[rt])return!0;return!1}return tt!=null&&tt>=0?tt+1<nt[et]||!!nt[tt+":"+et]:!!nt[et]},clear(){return this[CACHE$1]={},this}};let OP_ID=0;const PULSE="pulse",NO_PARAMS=new Parameters,SKIP$1$1=1,MODIFIED=2;function Operator(et,tt,nt,rt){this.id=++OP_ID,this.value=et,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,tt&&(this._update=tt),nt&&this.parameters(nt,rt)}function flag(et){return function(tt){const nt=this.flags;return arguments.length===0?!!(nt&et):(this.flags=tt?nt|et:nt&~et,this)}}Operator.prototype={targets(){return this._targets||(this._targets=UniqueList(id))},set(et){return this.value!==et?(this.value=et,1):0},skip:flag(SKIP$1$1),modified:flag(MODIFIED),parameters(et,tt,nt){tt=tt!==!1;const rt=this._argval=this._argval||new Parameters,ot=this._argops=this._argops||[],st=[];let ut,ct,ft,pt;const ht=(mt,yt,vt)=>{vt instanceof Operator?(vt!==this&&(tt&&vt.targets().add(this),st.push(vt)),ot.push({op:vt,name:mt,index:yt})):rt.set(mt,yt,vt)};for(ut in et)if(ct=et[ut],ut===PULSE)array$5(ct).forEach(mt=>{mt instanceof Operator?mt!==this&&(mt.targets().add(this),st.push(mt)):error("Pulse parameters must be operator instances.")}),this.source=ct;else if(isArray(ct))for(rt.set(ut,-1,Array(ft=ct.length)),pt=0;pt<ft;++pt)ht(ut,pt,ct[pt]);else ht(ut,-1,ct);return this.marshall().clear(),nt&&(ot.initonly=!0),st},marshall(et){const tt=this._argval||NO_PARAMS,nt=this._argops;let rt,ot,st,ut;if(nt){const ct=nt.length;for(ot=0;ot<ct;++ot)rt=nt[ot],st=rt.op,ut=st.modified()&&st.stamp===et,tt.set(rt.name,rt.index,st.value,ut);if(nt.initonly){for(ot=0;ot<ct;++ot)rt=nt[ot],rt.op.targets().remove(this);this._argops=null,this._update=null}}return tt},detach(){const et=this._argops;let tt,nt,rt,ot;if(et)for(tt=0,nt=et.length;tt<nt;++tt)rt=et[tt],ot=rt.op,ot._targets&&ot._targets.remove(this);this.pulse=null,this.source=null},evaluate(et){const tt=this._update;if(tt){const nt=this.marshall(et.stamp),rt=tt.call(this,nt,et);if(nt.clear(),rt!==this.value)this.value=rt;else if(!this.modified())return et.StopPropagation}},run(et){if(et.stamp<this.stamp)return et.StopPropagation;let tt;return this.skip()?(this.skip(!1),tt=0):tt=this.evaluate(et),this.pulse=tt||et}};function add$4(et,tt,nt,rt){let ot=1,st;return et instanceof Operator?st=et:et&&et.prototype instanceof Operator?st=new et:isFunction$3(et)?st=new Operator(null,et):(ot=0,st=new Operator(et,tt)),this.rank(st),ot&&(rt=nt,nt=tt),nt&&this.connect(st,st.parameters(nt,rt)),this.touch(st),st}function connect(et,tt){const nt=et.rank,rt=tt.length;for(let ot=0;ot<rt;++ot)if(nt<tt[ot].rank){this.rerank(et);return}}let STREAM_ID=0;function EventStream(et,tt,nt){this.id=++STREAM_ID,this.value=null,nt&&(this.receive=nt),et&&(this._filter=et),tt&&(this._apply=tt)}function stream(et,tt,nt){return new EventStream(et,tt,nt)}EventStream.prototype={_filter:truthy,_apply:identity$6,targets(){return this._targets||(this._targets=UniqueList(id))},consume(et){return arguments.length?(this._consume=!!et,this):!!this._consume},receive(et){if(this._filter(et)){const tt=this.value=this._apply(et),nt=this._targets,rt=nt?nt.length:0;for(let ot=0;ot<rt;++ot)nt[ot].receive(tt);this._consume&&(et.preventDefault(),et.stopPropagation())}},filter(et){const tt=stream(et);return this.targets().add(tt),tt},apply(et){const tt=stream(null,et);return this.targets().add(tt),tt},merge(){const et=stream();this.targets().add(et);for(let tt=0,nt=arguments.length;tt<nt;++tt)arguments[tt].targets().add(et);return et},throttle(et){let tt=-1;return this.filter(()=>{const nt=Date.now();return nt-tt>et?(tt=nt,1):0})},debounce(et){const tt=stream();return this.targets().add(stream(null,null,debounce$3(et,nt=>{const rt=nt.dataflow;tt.receive(nt),rt&&rt.run&&rt.run()}))),tt},between(et,tt){let nt=!1;return et.targets().add(stream(null,null,()=>nt=!0)),tt.targets().add(stream(null,null,()=>nt=!1)),this.filter(()=>nt)},detach(){this._filter=truthy,this._targets=null}};function events$2(et,tt,nt,rt){const ot=this,st=stream(nt,rt),ut=function(pt){pt.dataflow=ot;try{st.receive(pt)}catch(ht){ot.error(ht)}finally{ot.run()}};let ct;typeof et=="string"&&typeof document<"u"?ct=document.querySelectorAll(et):ct=array$5(et);const ft=ct.length;for(let pt=0;pt<ft;++pt)ct[pt].addEventListener(tt,ut);return st}function parse$7(et,tt){const nt=this.locale();return read(et,tt,nt.timeParse,nt.utcParse)}function ingest(et,tt,nt){return tt=this.parse(tt,nt),this.pulse(et,this.changeset().insert(tt))}async function request(et,tt){const nt=this;let rt=0,ot;try{ot=await nt.loader().load(et,{context:"dataflow",response:responseType(tt&&tt.type)});try{ot=nt.parse(ot,tt)}catch(st){rt=-2,nt.warn("Data ingestion failed",et,st)}}catch(st){rt=-1,nt.warn("Loading failed",et,st)}return{data:ot,status:rt}}async function preload(et,tt,nt){const rt=this,ot=rt._pending||loadPending(rt);ot.requests+=1;const st=await rt.request(tt,nt);return rt.pulse(et,rt.changeset().remove(truthy).insert(st.data||[])),ot.done(),st}function loadPending(et){let tt;const nt=new Promise(rt=>tt=rt);return nt.requests=0,nt.done=()=>{--nt.requests===0&&(et._pending=null,tt(et))},et._pending=nt}const SKIP$2={skip:!0};function on(et,tt,nt,rt,ot){return(et instanceof Operator?onOperator:onStream)(this,et,tt,nt,rt,ot),this}function onStream(et,tt,nt,rt,ot,st){const ut=extend$1({},st,SKIP$2);let ct,ft;isFunction$3(nt)||(nt=constant$6(nt)),rt===void 0?ct=pt=>et.touch(nt(pt)):isFunction$3(rt)?(ft=new Operator(null,rt,ot,!1),ct=pt=>{ft.evaluate(pt);const ht=nt(pt),mt=ft.value;isChangeSet(mt)?et.pulse(ht,mt,st):et.update(ht,mt,ut)}):ct=pt=>et.update(nt(pt),rt,ut),tt.apply(ct)}function onOperator(et,tt,nt,rt,ot,st){if(rt===void 0)tt.targets().add(nt);else{const ut=st||{},ct=new Operator(null,updater(nt,rt),ot,!1);ct.modified(ut.force),ct.rank=tt.rank,tt.targets().add(ct),nt&&(ct.skip(!0),ct.value=nt.value,ct.targets().add(nt),et.connect(nt,[ct]))}}function updater(et,tt){return tt=isFunction$3(tt)?tt:constant$6(tt),et?function(nt,rt){const ot=tt(nt,rt);return et.skip()||(et.skip(ot!==this.value).value=ot),ot}:tt}function rank(et){et.rank=++this._rank}function rerank(et){const tt=[et];let nt,rt,ot;for(;tt.length;)if(this.rank(nt=tt.pop()),rt=nt._targets)for(ot=rt.length;--ot>=0;)tt.push(nt=rt[ot]),nt===et&&error("Cycle detected in dataflow graph.")}const StopPropagation={},ADD=1<<0,REM=1<<1,MOD$1=1<<2,ADD_REM=ADD|REM,ADD_MOD=ADD|MOD$1,ALL=ADD|REM|MOD$1,REFLOW=1<<3,SOURCE=1<<4,NO_SOURCE=1<<5,NO_FIELDS=1<<6;function Pulse(et,tt,nt){this.dataflow=et,this.stamp=tt??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=nt||null}function materialize(et,tt){const nt=[];return visitArray(et,tt,rt=>nt.push(rt)),nt}function filter$1(et,tt){const nt={};return et.visit(tt,rt=>{nt[tupleid(rt)]=1}),rt=>nt[tupleid(rt)]?null:rt}function addFilter(et,tt){return et?(nt,rt)=>et(nt,rt)&&tt(nt,rt):tt}Pulse.prototype={StopPropagation,ADD,REM,MOD:MOD$1,ADD_REM,ADD_MOD,ALL,REFLOW,SOURCE,NO_SOURCE,NO_FIELDS,fork(et){return new Pulse(this.dataflow).init(this,et)},clone(){const et=this.fork(ALL);return et.add=et.add.slice(),et.rem=et.rem.slice(),et.mod=et.mod.slice(),et.source&&(et.source=et.source.slice()),et.materialize(ALL|SOURCE)},addAll(){let et=this;return!et.source||et.add===et.rem||!et.rem.length&&et.source.length===et.add.length||(et=new Pulse(this.dataflow).init(this),et.add=et.source,et.rem=[]),et},init(et,tt){const nt=this;return nt.stamp=et.stamp,nt.encode=et.encode,et.fields&&!(tt&NO_FIELDS)&&(nt.fields=et.fields),tt&ADD?(nt.addF=et.addF,nt.add=et.add):(nt.addF=null,nt.add=[]),tt&REM?(nt.remF=et.remF,nt.rem=et.rem):(nt.remF=null,nt.rem=[]),tt&MOD$1?(nt.modF=et.modF,nt.mod=et.mod):(nt.modF=null,nt.mod=[]),tt&NO_SOURCE?(nt.srcF=null,nt.source=null):(nt.srcF=et.srcF,nt.source=et.source,et.cleans&&(nt.cleans=et.cleans)),nt},runAfter(et){this.dataflow.runAfter(et)},changed(et){const tt=et||ALL;return tt&ADD&&this.add.length||tt&REM&&this.rem.length||tt&MOD$1&&this.mod.length},reflow(et){if(et)return this.fork(ALL).reflow();const tt=this.add.length,nt=this.source&&this.source.length;return nt&&nt!==tt&&(this.mod=this.source,tt&&this.filter(MOD$1,filter$1(this,ADD))),this},clean(et){return arguments.length?(this.cleans=!!et,this):this.cleans},modifies(et){const tt=this.fields||(this.fields={});return isArray(et)?et.forEach(nt=>tt[nt]=!0):tt[et]=!0,this},modified(et,tt){const nt=this.fields;return(tt||this.mod.length)&&nt?arguments.length?isArray(et)?et.some(rt=>nt[rt]):nt[et]:!!nt:!1},filter(et,tt){const nt=this;return et&ADD&&(nt.addF=addFilter(nt.addF,tt)),et&REM&&(nt.remF=addFilter(nt.remF,tt)),et&MOD$1&&(nt.modF=addFilter(nt.modF,tt)),et&SOURCE&&(nt.srcF=addFilter(nt.srcF,tt)),nt},materialize(et){et=et||ALL;const tt=this;return et&ADD&&tt.addF&&(tt.add=materialize(tt.add,tt.addF),tt.addF=null),et&REM&&tt.remF&&(tt.rem=materialize(tt.rem,tt.remF),tt.remF=null),et&MOD$1&&tt.modF&&(tt.mod=materialize(tt.mod,tt.modF),tt.modF=null),et&SOURCE&&tt.srcF&&(tt.source=tt.source.filter(tt.srcF),tt.srcF=null),tt},visit(et,tt){const nt=this,rt=tt;if(et&SOURCE)return visitArray(nt.source,nt.srcF,rt),nt;et&ADD&&visitArray(nt.add,nt.addF,rt),et&REM&&visitArray(nt.rem,nt.remF,rt),et&MOD$1&&visitArray(nt.mod,nt.modF,rt);const ot=nt.source;if(et&REFLOW&&ot){const st=nt.add.length+nt.mod.length;st===ot.length||(st?visitArray(ot,filter$1(nt,ADD_MOD),rt):visitArray(ot,nt.srcF,rt))}return nt}};function MultiPulse(et,tt,nt,rt){const ot=this;let st=0;this.dataflow=et,this.stamp=tt,this.fields=null,this.encode=rt||null,this.pulses=nt;for(const ut of nt)if(ut.stamp===tt){if(ut.fields){const ct=ot.fields||(ot.fields={});for(const ft in ut.fields)ct[ft]=1}ut.changed(ot.ADD)&&(st|=ot.ADD),ut.changed(ot.REM)&&(st|=ot.REM),ut.changed(ot.MOD)&&(st|=ot.MOD)}this.changes=st}inherits(MultiPulse,Pulse,{fork(et){const tt=new Pulse(this.dataflow).init(this,et&this.NO_FIELDS);return et!==void 0&&(et&tt.ADD&&this.visit(tt.ADD,nt=>tt.add.push(nt)),et&tt.REM&&this.visit(tt.REM,nt=>tt.rem.push(nt)),et&tt.MOD&&this.visit(tt.MOD,nt=>tt.mod.push(nt))),tt},changed(et){return this.changes&et},modified(et){const tt=this,nt=tt.fields;return nt&&tt.changes&tt.MOD?isArray(et)?et.some(rt=>nt[rt]):nt[et]:0},filter(){error("MultiPulse does not support filtering.")},materialize(){error("MultiPulse does not support materialization.")},visit(et,tt){const nt=this,rt=nt.pulses,ot=rt.length;let st=0;if(et&nt.SOURCE)for(;st<ot;++st)rt[st].visit(et,tt);else for(;st<ot;++st)rt[st].stamp===nt.stamp&&rt[st].visit(et,tt);return nt}});async function evaluate(et,tt,nt){const rt=this,ot=[];if(rt._pulse)return reentrant(rt);if(rt._pending&&await rt._pending,tt&&await asyncCallback(rt,tt),!rt._touched.length)return rt.debug("Dataflow invoked, but nothing to do."),rt;const st=++rt._clock;rt._pulse=new Pulse(rt,st,et),rt._touched.forEach(ht=>rt._enqueue(ht,!0)),rt._touched=UniqueList(id);let ut=0,ct,ft,pt;try{for(;rt._heap.size()>0;){if(ct=rt._heap.pop(),ct.rank!==ct.qrank){rt._enqueue(ct,!0);continue}ft=ct.run(rt._getPulse(ct,et)),ft.then?ft=await ft:ft.async&&(ot.push(ft.async),ft=StopPropagation),ft!==StopPropagation&&ct._targets&&ct._targets.forEach(ht=>rt._enqueue(ht)),++ut}}catch(ht){rt._heap.clear(),pt=ht}if(rt._input={},rt._pulse=null,rt.debug(`Pulse ${st}: ${ut} operators`),pt&&(rt._postrun=[],rt.error(pt)),rt._postrun.length){const ht=rt._postrun.sort((mt,yt)=>yt.priority-mt.priority);rt._postrun=[];for(let mt=0;mt<ht.length;++mt)await asyncCallback(rt,ht[mt].callback)}return nt&&await asyncCallback(rt,nt),ot.length&&Promise.all(ot).then(ht=>rt.runAsync(null,()=>{ht.forEach(mt=>{try{mt(rt)}catch(yt){rt.error(yt)}})})),rt}async function runAsync(et,tt,nt){for(;this._running;)await this._running;const rt=()=>this._running=null;return(this._running=this.evaluate(et,tt,nt)).then(rt,rt),this._running}function run(et,tt,nt){return this._pulse?reentrant(this):(this.evaluate(et,tt,nt),this)}function runAfter(et,tt,nt){if(this._pulse||tt)this._postrun.push({priority:nt||0,callback:et});else try{et(this)}catch(rt){this.error(rt)}}function reentrant(et){return et.error("Dataflow already running. Use runAsync() to chain invocations."),et}function enqueue(et,tt){const nt=et.stamp<this._clock;nt&&(et.stamp=this._clock),(nt||tt)&&(et.qrank=et.rank,this._heap.push(et))}function getPulse(et,tt){const nt=et.source,rt=this._clock;return nt&&isArray(nt)?new MultiPulse(this,rt,nt.map(ot=>ot.pulse),tt):this._input[et.id]||singlePulse(this._pulse,nt&&nt.pulse)}function singlePulse(et,tt){return tt&&tt.stamp===et.stamp?tt:(et=et.fork(),tt&&tt!==StopPropagation&&(et.source=tt.source),et)}const NO_OPT={skip:!1,force:!1};function touch(et,tt){const nt=tt||NO_OPT;return this._pulse?this._enqueue(et):this._touched.add(et),nt.skip&&et.skip(!0),this}function update$7(et,tt,nt){const rt=nt||NO_OPT;return(et.set(tt)||rt.force)&&this.touch(et,rt),this}function pulse(et,tt,nt){this.touch(et,nt||NO_OPT);const rt=new Pulse(this,this._clock+(this._pulse?0:1)),ot=et.pulse&&et.pulse.source||[];return rt.target=et,this._input[et.id]=tt.pulse(rt,ot),this}function Heap(et){let tt=[];return{clear:()=>tt=[],size:()=>tt.length,peek:()=>tt[0],push:nt=>(tt.push(nt),siftdown(tt,0,tt.length-1,et)),pop:()=>{const nt=tt.pop();let rt;return tt.length?(rt=tt[0],tt[0]=nt,siftup(tt,0,et)):rt=nt,rt}}}function siftdown(et,tt,nt,rt){let ot,st;const ut=et[nt];for(;nt>tt;){if(st=nt-1>>1,ot=et[st],rt(ut,ot)<0){et[nt]=ot,nt=st;continue}break}return et[nt]=ut}function siftup(et,tt,nt){const rt=tt,ot=et.length,st=et[tt];let ut=(tt<<1)+1,ct;for(;ut<ot;)ct=ut+1,ct<ot&&nt(et[ut],et[ct])>=0&&(ut=ct),et[tt]=et[ut],tt=ut,ut=(tt<<1)+1;return et[tt]=st,siftdown(et,rt,tt,nt)}function Dataflow(){this.logger(logger()),this.logLevel(Error$1),this._clock=0,this._rank=0,this._locale=defaultLocale();try{this._loader=loader()}catch{}this._touched=UniqueList(id),this._input={},this._pulse=null,this._heap=Heap((et,tt)=>et.qrank-tt.qrank),this._postrun=[]}function logMethod(et){return function(){return this._log[et].apply(this,arguments)}}Dataflow.prototype={stamp(){return this._clock},loader(et){return arguments.length?(this._loader=et,this):this._loader},locale(et){return arguments.length?(this._locale=et,this):this._locale},logger(et){return arguments.length?(this._log=et,this):this._log},error:logMethod("error"),warn:logMethod("warn"),info:logMethod("info"),debug:logMethod("debug"),logLevel:logMethod("level"),cleanThreshold:1e4,add:add$4,connect,rank,rerank,pulse,touch,update:update$7,changeset,ingest,parse:parse$7,preload,request,events:events$2,on,evaluate,run,runAsync,runAfter,_enqueue:enqueue,_getPulse:getPulse};function Transform(et,tt){Operator.call(this,et,null,tt)}inherits(Transform,Operator,{run(et){if(et.stamp<this.stamp)return et.StopPropagation;let tt;return this.skip()?this.skip(!1):tt=this.evaluate(et),tt=tt||et,tt.then?tt=tt.then(nt=>this.pulse=nt):tt!==et.StopPropagation&&(this.pulse=tt),tt},evaluate(et){const tt=this.marshall(et.stamp),nt=this.transform(tt,et);return tt.clear(),nt},transform(){}});const transforms={};function definition$1(et){const tt=transform$4(et);return tt&&tt.Definition||null}function transform$4(et){return et=et&&et.toLowerCase(),has$1(transforms,et)?transforms[et]:null}function*numbers$1(et,tt){if(tt==null)for(let nt of et)nt!=null&&nt!==""&&(nt=+nt)>=nt&&(yield nt);else{let nt=-1;for(let rt of et)rt=tt(rt,++nt,et),rt!=null&&rt!==""&&(rt=+rt)>=rt&&(yield rt)}}function quantiles(et,tt,nt){const rt=Float64Array.from(numbers$1(et,nt));return rt.sort(ascending$2),tt.map(ot=>quantileSorted(rt,ot))}function quartiles(et,tt){return quantiles(et,[.25,.5,.75],tt)}function estimateBandwidth(et,tt){const nt=et.length,rt=deviation(et,tt),ot=quartiles(et,tt),st=(ot[2]-ot[0])/1.34;return 1.06*(Math.min(rt,st)||rt||Math.abs(ot[0])||1)*Math.pow(nt,-.2)}function bin$1(et){const tt=et.maxbins||20,nt=et.base||10,rt=Math.log(nt),ot=et.divide||[5,2];let st=et.extent[0],ut=et.extent[1],ct,ft,pt,ht,mt,yt;const vt=et.span||ut-st||Math.abs(st)||1;if(et.step)ct=et.step;else if(et.steps){for(ht=vt/tt,mt=0,yt=et.steps.length;mt<yt&&et.steps[mt]<ht;++mt);ct=et.steps[Math.max(0,mt-1)]}else{for(ft=Math.ceil(Math.log(tt)/rt),pt=et.minstep||0,ct=Math.max(pt,Math.pow(nt,Math.round(Math.log(vt)/rt)-ft));Math.ceil(vt/ct)>tt;)ct*=nt;for(mt=0,yt=ot.length;mt<yt;++mt)ht=ct/ot[mt],ht>=pt&&vt/ht<=tt&&(ct=ht)}ht=Math.log(ct);const Tt=ht>=0?0:~~(-ht/rt)+1,Et=Math.pow(nt,-Tt-1);return(et.nice||et.nice===void 0)&&(ht=Math.floor(st/ct+Et)*ct,st=st<ht?ht-ct:ht,ut=Math.ceil(ut/ct)*ct),{start:st,stop:ut===st?st+ct:ut,step:ct}}var random=Math.random;function setRandom(et){random=et}function bootstrapCI(et,tt,nt,rt){if(!et.length)return[void 0,void 0];const ot=Float64Array.from(numbers$1(et,rt)),st=ot.length,ut=tt;let ct,ft,pt,ht;for(pt=0,ht=Array(ut);pt<ut;++pt){for(ct=0,ft=0;ft<st;++ft)ct+=ot[~~(random()*st)];ht[pt]=ct/st}return ht.sort(ascending$2),[quantile$1(ht,nt/2),quantile$1(ht,1-nt/2)]}function dotbin(et,tt,nt,rt){rt=rt||(yt=>yt);const ot=et.length,st=new Float64Array(ot);let ut=0,ct=1,ft=rt(et[0]),pt=ft,ht=ft+tt,mt;for(;ct<ot;++ct){if(mt=rt(et[ct]),mt>=ht){for(pt=(ft+pt)/2;ut<ct;++ut)st[ut]=pt;ht=mt+tt,ft=mt}pt=mt}for(pt=(ft+pt)/2;ut<ct;++ut)st[ut]=pt;return nt?smoothing(st,tt+tt/4):st}function smoothing(et,tt){const nt=et.length;let rt=0,ot=1,st,ut;for(;et[rt]===et[ot];)++ot;for(;ot<nt;){for(st=ot+1;et[ot]===et[st];)++st;if(et[ot]-et[ot-1]<tt){for(ut=ot+(rt+st-ot-ot>>1);ut<ot;)et[ut++]=et[ot];for(;ut>ot;)et[ut--]=et[rt]}rt=ot,ot=st}return et}function lcg$2(et){return function(){return et=(1103515245*et+12345)%2147483647,et/2147483647}}function integer(et,tt){tt==null&&(tt=et,et=0);let nt,rt,ot;const st={min(ut){return arguments.length?(nt=ut||0,ot=rt-nt,st):nt},max(ut){return arguments.length?(rt=ut||0,ot=rt-nt,st):rt},sample(){return nt+Math.floor(ot*random())},pdf(ut){return ut===Math.floor(ut)&&ut>=nt&&ut<rt?1/ot:0},cdf(ut){const ct=Math.floor(ut);return ct<nt?0:ct>=rt?1:(ct-nt+1)/ot},icdf(ut){return ut>=0&&ut<=1?nt-1+Math.floor(ut*ot):NaN}};return st.min(et).max(tt)}const SQRT2PI=Math.sqrt(2*Math.PI),SQRT2=Math.SQRT2;let nextSample=NaN;function sampleNormal(et,tt){et=et||0,tt=tt??1;let nt=0,rt=0,ot,st;if(nextSample===nextSample)nt=nextSample,nextSample=NaN;else{do nt=random()*2-1,rt=random()*2-1,ot=nt*nt+rt*rt;while(ot===0||ot>1);st=Math.sqrt(-2*Math.log(ot)/ot),nt*=st,nextSample=rt*st}return et+nt*tt}function densityNormal(et,tt,nt){nt=nt??1;const rt=(et-(tt||0))/nt;return Math.exp(-.5*rt*rt)/(nt*SQRT2PI)}function cumulativeNormal(et,tt,nt){tt=tt||0,nt=nt??1;const rt=(et-tt)/nt,ot=Math.abs(rt);let st;if(ot>37)st=0;else{const ut=Math.exp(-ot*ot/2);let ct;ot<7.07106781186547?(ct=.0352624965998911*ot+.700383064443688,ct=ct*ot+6.37396220353165,ct=ct*ot+33.912866078383,ct=ct*ot+112.079291497871,ct=ct*ot+221.213596169931,ct=ct*ot+220.206867912376,st=ut*ct,ct=.0883883476483184*ot+1.75566716318264,ct=ct*ot+16.064177579207,ct=ct*ot+86.7807322029461,ct=ct*ot+296.564248779674,ct=ct*ot+637.333633378831,ct=ct*ot+793.826512519948,ct=ct*ot+440.413735824752,st=st/ct):(ct=ot+.65,ct=ot+4/ct,ct=ot+3/ct,ct=ot+2/ct,ct=ot+1/ct,st=ut/ct/2.506628274631)}return rt>0?1-st:st}function quantileNormal(et,tt,nt){return et<0||et>1?NaN:(tt||0)+(nt??1)*SQRT2*erfinv(2*et-1)}function erfinv(et){let tt=-Math.log((1-et)*(1+et)),nt;return tt<6.25?(tt-=3.125,nt=-364441206401782e-35,nt=-16850591381820166e-35+nt*tt,nt=128584807152564e-32+nt*tt,nt=11157877678025181e-33+nt*tt,nt=-1333171662854621e-31+nt*tt,nt=20972767875968562e-33+nt*tt,nt=6637638134358324e-30+nt*tt,nt=-4054566272975207e-29+nt*tt,nt=-8151934197605472e-29+nt*tt,nt=26335093153082323e-28+nt*tt,nt=-12975133253453532e-27+nt*tt,nt=-5415412054294628e-26+nt*tt,nt=10512122733215323e-25+nt*tt,nt=-4112633980346984e-24+nt*tt,nt=-29070369957882005e-24+nt*tt,nt=42347877827932404e-23+nt*tt,nt=-13654692000834679e-22+nt*tt,nt=-13882523362786469e-21+nt*tt,nt=.00018673420803405714+nt*tt,nt=-.000740702534166267+nt*tt,nt=-.006033670871430149+nt*tt,nt=.24015818242558962+nt*tt,nt=1.6536545626831027+nt*tt):tt<16?(tt=Math.sqrt(tt)-3.25,nt=22137376921775787e-25,nt=9075656193888539e-23+nt*tt,nt=-27517406297064545e-23+nt*tt,nt=18239629214389228e-24+nt*tt,nt=15027403968909828e-22+nt*tt,nt=-4013867526981546e-21+nt*tt,nt=29234449089955446e-22+nt*tt,nt=12475304481671779e-21+nt*tt,nt=-47318229009055734e-21+nt*tt,nt=6828485145957318e-20+nt*tt,nt=24031110387097894e-21+nt*tt,nt=-.0003550375203628475+nt*tt,nt=.0009532893797373805+nt*tt,nt=-.0016882755560235047+nt*tt,nt=.002491442096107851+nt*tt,nt=-.003751208507569241+nt*tt,nt=.005370914553590064+nt*tt,nt=1.0052589676941592+nt*tt,nt=3.0838856104922208+nt*tt):Number.isFinite(tt)?(tt=Math.sqrt(tt)-5,nt=-27109920616438573e-27,nt=-2555641816996525e-25+nt*tt,nt=15076572693500548e-25+nt*tt,nt=-3789465440126737e-24+nt*tt,nt=761570120807834e-23+nt*tt,nt=-1496002662714924e-23+nt*tt,nt=2914795345090108e-23+nt*tt,nt=-6771199775845234e-23+nt*tt,nt=22900482228026655e-23+nt*tt,nt=-99298272942317e-20+nt*tt,nt=4526062597223154e-21+nt*tt,nt=-1968177810553167e-20+nt*tt,nt=7599527703001776e-20+nt*tt,nt=-.00021503011930044477+nt*tt,nt=-.00013871931833623122+nt*tt,nt=1.0103004648645344+nt*tt,nt=4.849906401408584+nt*tt):nt=1/0,nt*et}function gaussian(et,tt){let nt,rt;const ot={mean(st){return arguments.length?(nt=st||0,ot):nt},stdev(st){return arguments.length?(rt=st??1,ot):rt},sample:()=>sampleNormal(nt,rt),pdf:st=>densityNormal(st,nt,rt),cdf:st=>cumulativeNormal(st,nt,rt),icdf:st=>quantileNormal(st,nt,rt)};return ot.mean(et).stdev(tt)}function kde(et,tt){const nt=gaussian();let rt=0;const ot={data(st){return arguments.length?(et=st,rt=st?st.length:0,ot.bandwidth(tt)):et},bandwidth(st){return arguments.length?(tt=st,!tt&&et&&(tt=estimateBandwidth(et)),ot):tt},sample(){return et[~~(random()*rt)]+tt*nt.sample()},pdf(st){let ut=0,ct=0;for(;ct<rt;++ct)ut+=nt.pdf((st-et[ct])/tt);return ut/tt/rt},cdf(st){let ut=0,ct=0;for(;ct<rt;++ct)ut+=nt.cdf((st-et[ct])/tt);return ut/rt},icdf(){throw Error("KDE icdf not supported.")}};return ot.data(et)}function sampleLogNormal(et,tt){return et=et||0,tt=tt??1,Math.exp(et+sampleNormal()*tt)}function densityLogNormal(et,tt,nt){if(et<=0)return 0;tt=tt||0,nt=nt??1;const rt=(Math.log(et)-tt)/nt;return Math.exp(-.5*rt*rt)/(nt*SQRT2PI*et)}function cumulativeLogNormal(et,tt,nt){return cumulativeNormal(Math.log(et),tt,nt)}function quantileLogNormal(et,tt,nt){return Math.exp(quantileNormal(et,tt,nt))}function lognormal(et,tt){let nt,rt;const ot={mean(st){return arguments.length?(nt=st||0,ot):nt},stdev(st){return arguments.length?(rt=st??1,ot):rt},sample:()=>sampleLogNormal(nt,rt),pdf:st=>densityLogNormal(st,nt,rt),cdf:st=>cumulativeLogNormal(st,nt,rt),icdf:st=>quantileLogNormal(st,nt,rt)};return ot.mean(et).stdev(tt)}function mixture$1(et,tt){let nt=0,rt;function ot(ut){const ct=[];let ft=0,pt;for(pt=0;pt<nt;++pt)ft+=ct[pt]=ut[pt]==null?1:+ut[pt];for(pt=0;pt<nt;++pt)ct[pt]/=ft;return ct}const st={weights(ut){return arguments.length?(rt=ot(tt=ut||[]),st):tt},distributions(ut){return arguments.length?(ut?(nt=ut.length,et=ut):(nt=0,et=[]),st.weights(tt)):et},sample(){const ut=random();let ct=et[nt-1],ft=rt[0],pt=0;for(;pt<nt-1;ft+=rt[++pt])if(ut<ft){ct=et[pt];break}return ct.sample()},pdf(ut){let ct=0,ft=0;for(;ft<nt;++ft)ct+=rt[ft]*et[ft].pdf(ut);return ct},cdf(ut){let ct=0,ft=0;for(;ft<nt;++ft)ct+=rt[ft]*et[ft].cdf(ut);return ct},icdf(){throw Error("Mixture icdf not supported.")}};return st.distributions(et).weights(tt)}function sampleUniform(et,tt){return tt==null&&(tt=et??1,et=0),et+(tt-et)*random()}function densityUniform(et,tt,nt){return nt==null&&(nt=tt??1,tt=0),et>=tt&&et<=nt?1/(nt-tt):0}function cumulativeUniform(et,tt,nt){return nt==null&&(nt=tt??1,tt=0),et<tt?0:et>nt?1:(et-tt)/(nt-tt)}function quantileUniform(et,tt,nt){return nt==null&&(nt=tt??1,tt=0),et>=0&&et<=1?tt+et*(nt-tt):NaN}function uniform(et,tt){let nt,rt;const ot={min(st){return arguments.length?(nt=st||0,ot):nt},max(st){return arguments.length?(rt=st??1,ot):rt},sample:()=>sampleUniform(nt,rt),pdf:st=>densityUniform(st,nt,rt),cdf:st=>cumulativeUniform(st,nt,rt),icdf:st=>quantileUniform(st,nt,rt)};return tt==null&&(tt=et??1,et=0),ot.min(et).max(tt)}function constant$5(et,tt,nt){let rt=0,ot=0;for(const st of et){const ut=nt(st);tt(st)==null||ut==null||isNaN(ut)||(rt+=(ut-rt)/++ot)}return{coef:[rt],predict:()=>rt,rSquared:0}}function ols(et,tt,nt,rt){const ot=rt-et*et,st=Math.abs(ot)<1e-24?0:(nt-et*tt)/ot;return[tt-st*et,st]}function points(et,tt,nt,rt){et=et.filter(vt=>{let Tt=tt(vt),Et=nt(vt);return Tt!=null&&(Tt=+Tt)>=Tt&&Et!=null&&(Et=+Et)>=Et}),rt&&et.sort((vt,Tt)=>tt(vt)-tt(Tt));const ot=et.length,st=new Float64Array(ot),ut=new Float64Array(ot);let ct=0,ft=0,pt=0,ht,mt,yt;for(yt of et)st[ct]=ht=+tt(yt),ut[ct]=mt=+nt(yt),++ct,ft+=(ht-ft)/ct,pt+=(mt-pt)/ct;for(ct=0;ct<ot;++ct)st[ct]-=ft,ut[ct]-=pt;return[st,ut,ft,pt]}function visitPoints(et,tt,nt,rt){let ot=-1,st,ut;for(const ct of et)st=tt(ct),ut=nt(ct),st!=null&&(st=+st)>=st&&ut!=null&&(ut=+ut)>=ut&&rt(st,ut,++ot)}function rSquared(et,tt,nt,rt,ot){let st=0,ut=0;return visitPoints(et,tt,nt,(ct,ft)=>{const pt=ft-ot(ct),ht=ft-rt;st+=pt*pt,ut+=ht*ht}),1-st/ut}function linear$2(et,tt,nt){let rt=0,ot=0,st=0,ut=0,ct=0;visitPoints(et,tt,nt,(ht,mt)=>{++ct,rt+=(ht-rt)/ct,ot+=(mt-ot)/ct,st+=(ht*mt-st)/ct,ut+=(ht*ht-ut)/ct});const ft=ols(rt,ot,st,ut),pt=ht=>ft[0]+ft[1]*ht;return{coef:ft,predict:pt,rSquared:rSquared(et,tt,nt,ot,pt)}}function log$5(et,tt,nt){let rt=0,ot=0,st=0,ut=0,ct=0;visitPoints(et,tt,nt,(ht,mt)=>{++ct,ht=Math.log(ht),rt+=(ht-rt)/ct,ot+=(mt-ot)/ct,st+=(ht*mt-st)/ct,ut+=(ht*ht-ut)/ct});const ft=ols(rt,ot,st,ut),pt=ht=>ft[0]+ft[1]*Math.log(ht);return{coef:ft,predict:pt,rSquared:rSquared(et,tt,nt,ot,pt)}}function exp$1(et,tt,nt){const[rt,ot,st,ut]=points(et,tt,nt);let ct=0,ft=0,pt=0,ht=0,mt=0,yt,vt,Tt;visitPoints(et,tt,nt,(Ct,$t)=>{yt=rt[mt++],vt=Math.log($t),Tt=yt*$t,ct+=($t*vt-ct)/mt,ft+=(Tt-ft)/mt,pt+=(Tt*vt-pt)/mt,ht+=(yt*Tt-ht)/mt});const[Et,xt]=ols(ft/ut,ct/ut,pt/ut,ht/ut),At=Ct=>Math.exp(Et+xt*(Ct-st));return{coef:[Math.exp(Et-xt*st),xt],predict:At,rSquared:rSquared(et,tt,nt,ut,At)}}function pow$3(et,tt,nt){let rt=0,ot=0,st=0,ut=0,ct=0,ft=0;visitPoints(et,tt,nt,(mt,yt)=>{const vt=Math.log(mt),Tt=Math.log(yt);++ft,rt+=(vt-rt)/ft,ot+=(Tt-ot)/ft,st+=(vt*Tt-st)/ft,ut+=(vt*vt-ut)/ft,ct+=(yt-ct)/ft});const pt=ols(rt,ot,st,ut),ht=mt=>pt[0]*Math.pow(mt,pt[1]);return pt[0]=Math.exp(pt[0]),{coef:pt,predict:ht,rSquared:rSquared(et,tt,nt,ct,ht)}}function quad(et,tt,nt){const[rt,ot,st,ut]=points(et,tt,nt),ct=rt.length;let ft=0,pt=0,ht=0,mt=0,yt=0,vt,Tt,Et,xt;for(vt=0;vt<ct;)Tt=rt[vt],Et=ot[vt++],xt=Tt*Tt,ft+=(xt-ft)/vt,pt+=(xt*Tt-pt)/vt,ht+=(xt*xt-ht)/vt,mt+=(Tt*Et-mt)/vt,yt+=(xt*Et-yt)/vt;const At=ht-ft*ft,Ct=ft*At-pt*pt,$t=(yt*ft-mt*pt)/Ct,Ot=(mt*At-yt*pt)/Ct,Rt=-$t*ft,It=kt=>(kt=kt-st,$t*kt*kt+Ot*kt+Rt+ut);return{coef:[Rt-Ot*st+$t*st*st+ut,Ot-2*$t*st,$t],predict:It,rSquared:rSquared(et,tt,nt,ut,It)}}function poly(et,tt,nt,rt){if(rt===0)return constant$5(et,tt,nt);if(rt===1)return linear$2(et,tt,nt);if(rt===2)return quad(et,tt,nt);const[ot,st,ut,ct]=points(et,tt,nt),ft=ot.length,pt=[],ht=[],mt=rt+1;let yt,vt,Tt,Et,xt;for(yt=0;yt<mt;++yt){for(Tt=0,Et=0;Tt<ft;++Tt)Et+=Math.pow(ot[Tt],yt)*st[Tt];for(pt.push(Et),xt=new Float64Array(mt),vt=0;vt<mt;++vt){for(Tt=0,Et=0;Tt<ft;++Tt)Et+=Math.pow(ot[Tt],yt+vt);xt[vt]=Et}ht.push(xt)}ht.push(pt);const At=gaussianElimination(ht),Ct=$t=>{$t-=ut;let Ot=ct+At[0]+At[1]*$t+At[2]*$t*$t;for(yt=3;yt<mt;++yt)Ot+=At[yt]*Math.pow($t,yt);return Ot};return{coef:uncenter(mt,At,-ut,ct),predict:Ct,rSquared:rSquared(et,tt,nt,ct,Ct)}}function uncenter(et,tt,nt,rt){const ot=Array(et);let st,ut,ct,ft;for(st=0;st<et;++st)ot[st]=0;for(st=et-1;st>=0;--st)for(ct=tt[st],ft=1,ot[st]+=ct,ut=1;ut<=st;++ut)ft*=(st+1-ut)/ut,ot[st-ut]+=ct*Math.pow(nt,ut)*ft;return ot[0]+=rt,ot}function gaussianElimination(et){const tt=et.length-1,nt=[];let rt,ot,st,ut,ct;for(rt=0;rt<tt;++rt){for(ut=rt,ot=rt+1;ot<tt;++ot)Math.abs(et[rt][ot])>Math.abs(et[rt][ut])&&(ut=ot);for(st=rt;st<tt+1;++st)ct=et[st][rt],et[st][rt]=et[st][ut],et[st][ut]=ct;for(ot=rt+1;ot<tt;++ot)for(st=tt;st>=rt;st--)et[st][ot]-=et[st][rt]*et[rt][ot]/et[rt][rt]}for(ot=tt-1;ot>=0;--ot){for(ct=0,st=ot+1;st<tt;++st)ct+=et[st][ot]*nt[st];nt[ot]=(et[tt][ot]-ct)/et[ot][ot]}return nt}const maxiters=2,epsilon$7=1e-12;function loess(et,tt,nt,rt){const[ot,st,ut,ct]=points(et,tt,nt,!0),ft=ot.length,pt=Math.max(2,~~(rt*ft)),ht=new Float64Array(ft),mt=new Float64Array(ft),yt=new Float64Array(ft).fill(1);for(let vt=-1;++vt<=maxiters;){const Tt=[0,pt-1];for(let xt=0;xt<ft;++xt){const At=ot[xt],Ct=Tt[0],$t=Tt[1],Ot=At-ot[Ct]>ot[$t]-At?Ct:$t;let Rt=0,It=0,kt=0,Mt=0,Ft=0;const zt=1/Math.abs(ot[Ot]-At||1);for(let Ut=Ct;Ut<=$t;++Ut){const Xt=ot[Ut],Jt=st[Ut],gn=tricube(Math.abs(At-Xt)*zt)*yt[Ut],An=Xt*gn;Rt+=gn,It+=An,kt+=Jt*gn,Mt+=Jt*An,Ft+=Xt*An}const[Vt,Zt]=ols(It/Rt,kt/Rt,Mt/Rt,Ft/Rt);ht[xt]=Vt+Zt*At,mt[xt]=Math.abs(st[xt]-ht[xt]),updateInterval(ot,xt+1,Tt)}if(vt===maxiters)break;const Et=median(mt);if(Math.abs(Et)<epsilon$7)break;for(let xt=0,At,Ct;xt<ft;++xt)At=mt[xt]/(6*Et),yt[xt]=At>=1?epsilon$7:(Ct=1-At*At)*Ct}return output$1(ot,ht,ut,ct)}function tricube(et){return(et=1-et*et*et)*et*et}function updateInterval(et,tt,nt){const rt=et[tt];let ot=nt[0],st=nt[1]+1;if(!(st>=et.length))for(;tt>ot&&et[st]-rt<=rt-et[ot];)nt[0]=++ot,nt[1]=st,++st}function output$1(et,tt,nt,rt){const ot=et.length,st=[];let ut=0,ct=0,ft=[],pt;for(;ut<ot;++ut)pt=et[ut]+nt,ft[0]===pt?ft[1]+=(tt[ut]-ft[1])/++ct:(ct=0,ft[1]+=rt,ft=[pt,tt[ut]],st.push(ft));return ft[1]+=rt,st}const MIN_RADIANS=.5*Math.PI/180;function sampleCurve(et,tt,nt,rt){nt=nt||25,rt=Math.max(nt,rt||200);const ot=Et=>[Et,et(Et)],st=tt[0],ut=tt[1],ct=ut-st,ft=ct/rt,pt=[ot(st)],ht=[];if(nt===rt){for(let Et=1;Et<rt;++Et)pt.push(ot(st+Et/nt*ct));return pt.push(ot(ut)),pt}else{ht.push(ot(ut));for(let Et=nt;--Et>0;)ht.push(ot(st+Et/nt*ct))}let mt=pt[0],yt=ht[ht.length-1];const vt=1/ct,Tt=scaleY(mt[1],ht);for(;yt;){const Et=ot((mt[0]+yt[0])/2);Et[0]-mt[0]>=ft&&angleDelta(mt,Et,yt,vt,Tt)>MIN_RADIANS?ht.push(Et):(mt=yt,pt.push(yt),ht.pop()),yt=ht[ht.length-1]}return pt}function scaleY(et,tt){let nt=et,rt=et;const ot=tt.length;for(let st=0;st<ot;++st){const ut=tt[st][1];ut<nt&&(nt=ut),ut>rt&&(rt=ut)}return 1/(rt-nt)}function angleDelta(et,tt,nt,rt,ot){const st=Math.atan2(ot*(nt[1]-et[1]),rt*(nt[0]-et[0])),ut=Math.atan2(ot*(tt[1]-et[1]),rt*(tt[0]-et[0]));return Math.abs(st-ut)}function multikey(et){return tt=>{const nt=et.length;let rt=1,ot=String(et[0](tt));for(;rt<nt;++rt)ot+="|"+et[rt](tt);return ot}}function groupkey(et){return!et||!et.length?function(){return""}:et.length===1?et[0]:multikey(et)}function measureName(et,tt,nt){return nt||et+(tt?"_"+tt:"")}const noop$c=()=>{},base_op={init:noop$c,add:noop$c,rem:noop$c,idx:0},AggregateOps={values:{init:et=>et.cell.store=!0,value:et=>et.cell.data.values(),idx:-1},count:{value:et=>et.cell.num},__count__:{value:et=>et.missing+et.valid},missing:{value:et=>et.missing},valid:{value:et=>et.valid},sum:{init:et=>et.sum=0,value:et=>et.sum,add:(et,tt)=>et.sum+=+tt,rem:(et,tt)=>et.sum-=tt},product:{init:et=>et.product=1,value:et=>et.valid?et.product:void 0,add:(et,tt)=>et.product*=tt,rem:(et,tt)=>et.product/=tt},mean:{init:et=>et.mean=0,value:et=>et.valid?et.mean:void 0,add:(et,tt)=>(et.mean_d=tt-et.mean,et.mean+=et.mean_d/et.valid),rem:(et,tt)=>(et.mean_d=tt-et.mean,et.mean-=et.valid?et.mean_d/et.valid:et.mean)},average:{value:et=>et.valid?et.mean:void 0,req:["mean"],idx:1},variance:{init:et=>et.dev=0,value:et=>et.valid>1?et.dev/(et.valid-1):void 0,add:(et,tt)=>et.dev+=et.mean_d*(tt-et.mean),rem:(et,tt)=>et.dev-=et.mean_d*(tt-et.mean),req:["mean"],idx:1},variancep:{value:et=>et.valid>1?et.dev/et.valid:void 0,req:["variance"],idx:2},stdev:{value:et=>et.valid>1?Math.sqrt(et.dev/(et.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:et=>et.valid>1?Math.sqrt(et.dev/et.valid):void 0,req:["variance"],idx:2},stderr:{value:et=>et.valid>1?Math.sqrt(et.dev/(et.valid*(et.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:et=>et.cell.data.distinct(et.get),req:["values"],idx:3},ci0:{value:et=>et.cell.data.ci0(et.get),req:["values"],idx:3},ci1:{value:et=>et.cell.data.ci1(et.get),req:["values"],idx:3},median:{value:et=>et.cell.data.q2(et.get),req:["values"],idx:3},q1:{value:et=>et.cell.data.q1(et.get),req:["values"],idx:3},q3:{value:et=>et.cell.data.q3(et.get),req:["values"],idx:3},min:{init:et=>et.min=void 0,value:et=>et.min=Number.isNaN(et.min)?et.cell.data.min(et.get):et.min,add:(et,tt)=>{(tt<et.min||et.min===void 0)&&(et.min=tt)},rem:(et,tt)=>{tt<=et.min&&(et.min=NaN)},req:["values"],idx:4},max:{init:et=>et.max=void 0,value:et=>et.max=Number.isNaN(et.max)?et.cell.data.max(et.get):et.max,add:(et,tt)=>{(tt>et.max||et.max===void 0)&&(et.max=tt)},rem:(et,tt)=>{tt>=et.max&&(et.max=NaN)},req:["values"],idx:4},argmin:{init:et=>et.argmin=void 0,value:et=>et.argmin||et.cell.data.argmin(et.get),add:(et,tt,nt)=>{tt<et.min&&(et.argmin=nt)},rem:(et,tt)=>{tt<=et.min&&(et.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:et=>et.argmax=void 0,value:et=>et.argmax||et.cell.data.argmax(et.get),add:(et,tt,nt)=>{tt>et.max&&(et.argmax=nt)},rem:(et,tt)=>{tt>=et.max&&(et.argmax=void 0)},req:["max","values"],idx:3}},ValidAggregateOps=Object.keys(AggregateOps).filter(et=>et!=="__count__");function measure(et,tt){return nt=>extend$1({name:et,out:nt||et},base_op,tt)}[...ValidAggregateOps,"__count__"].forEach(et=>{AggregateOps[et]=measure(et,AggregateOps[et])});function createMeasure(et,tt){return AggregateOps[et](tt)}function compareIndex(et,tt){return et.idx-tt.idx}function resolve(et){const tt={};et.forEach(rt=>tt[rt.name]=rt);const nt=rt=>{!rt.req||rt.req.forEach(ot=>{tt[ot]||nt(tt[ot]=AggregateOps[ot]())})};return et.forEach(nt),Object.values(tt).sort(compareIndex)}function init(){this.valid=0,this.missing=0,this._ops.forEach(et=>et.init(this))}function add$3(et,tt){if(et==null||et===""){++this.missing;return}et===et&&(++this.valid,this._ops.forEach(nt=>nt.add(this,et,tt)))}function rem(et,tt){if(et==null||et===""){--this.missing;return}et===et&&(--this.valid,this._ops.forEach(nt=>nt.rem(this,et,tt)))}function set$5(et){return this._out.forEach(tt=>et[tt.out]=tt.value(this)),et}function compileMeasures(et,tt){const nt=tt||identity$6,rt=resolve(et),ot=et.slice().sort(compareIndex);function st(ut){this._ops=rt,this._out=ot,this.cell=ut,this.init()}return st.prototype.init=init,st.prototype.add=add$3,st.prototype.rem=rem,st.prototype.set=set$5,st.prototype.get=nt,st.fields=et.map(ut=>ut.out),st}function TupleStore(et){this._key=et?field$1(et):tupleid,this.reset()}const prototype$1=TupleStore.prototype;prototype$1.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null};prototype$1.add=function(et){this._add.push(et)};prototype$1.rem=function(et){this._rem.push(et)};prototype$1.values=function(){if(this._get=null,this._rem.length===0)return this._add;const et=this._add,tt=this._rem,nt=this._key,rt=et.length,ot=tt.length,st=Array(rt-ot),ut={};let ct,ft,pt;for(ct=0;ct<ot;++ct)ut[nt(tt[ct])]=1;for(ct=0,ft=0;ct<rt;++ct)ut[nt(pt=et[ct])]?ut[nt(pt)]=0:st[ft++]=pt;return this._rem=[],this._add=st};prototype$1.distinct=function(et){const tt=this.values(),nt={};let rt=tt.length,ot=0,st;for(;--rt>=0;)st=et(tt[rt])+"",has$1(nt,st)||(nt[st]=1,++ot);return ot};prototype$1.extent=function(et){if(this._get!==et||!this._ext){const tt=this.values(),nt=extentIndex(tt,et);this._ext=[tt[nt[0]],tt[nt[1]]],this._get=et}return this._ext};prototype$1.argmin=function(et){return this.extent(et)[0]||{}};prototype$1.argmax=function(et){return this.extent(et)[1]||{}};prototype$1.min=function(et){const tt=this.extent(et)[0];return tt!=null?et(tt):void 0};prototype$1.max=function(et){const tt=this.extent(et)[1];return tt!=null?et(tt):void 0};prototype$1.quartile=function(et){return(this._get!==et||!this._q)&&(this._q=quartiles(this.values(),et),this._get=et),this._q};prototype$1.q1=function(et){return this.quartile(et)[0]};prototype$1.q2=function(et){return this.quartile(et)[1]};prototype$1.q3=function(et){return this.quartile(et)[2]};prototype$1.ci=function(et){return(this._get!==et||!this._ci)&&(this._ci=bootstrapCI(this.values(),1e3,.05,et),this._get=et),this._ci};prototype$1.ci0=function(et){return this.ci(et)[0]};prototype$1.ci1=function(et){return this.ci(et)[1]};function Aggregate$1(et){Transform.call(this,null,et),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}Aggregate$1.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:ValidAggregateOps},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};inherits(Aggregate$1,Transform,{transform(et,tt){const nt=this,rt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),ot=et.modified();return nt.stamp=rt.stamp,nt.value&&(ot||tt.modified(nt._inputs,!0))?(nt._prev=nt.value,nt.value=ot?nt.init(et):Object.create(null),tt.visit(tt.SOURCE,st=>nt.add(st))):(nt.value=nt.value||nt.init(et),tt.visit(tt.REM,st=>nt.rem(st)),tt.visit(tt.ADD,st=>nt.add(st))),rt.modifies(nt._outputs),nt._drop=et.drop!==!1,et.cross&&nt._dims.length>1&&(nt._drop=!1,nt.cross()),tt.clean()&&nt._drop&&rt.clean(!0).runAfter(()=>this.clean()),nt.changes(rt)},cross(){const et=this,tt=et.value,nt=et._dnames,rt=nt.map(()=>({})),ot=nt.length;function st(ct){let ft,pt,ht,mt;for(ft in ct)for(ht=ct[ft].tuple,pt=0;pt<ot;++pt)rt[pt][mt=ht[nt[pt]]]=mt}st(et._prev),st(tt);function ut(ct,ft,pt){const ht=nt[pt],mt=rt[pt++];for(const yt in mt){const vt=ct?ct+"|"+yt:yt;ft[ht]=mt[yt],pt<ot?ut(vt,ft,pt):tt[vt]||et.cell(vt,ft)}}ut("",{},0)},init(et){const tt=this._inputs=[],nt=this._outputs=[],rt={};function ot(xt){const At=array$5(accessorFields(xt)),Ct=At.length;let $t=0,Ot;for(;$t<Ct;++$t)rt[Ot=At[$t]]||(rt[Ot]=1,tt.push(Ot))}this._dims=array$5(et.groupby),this._dnames=this._dims.map(xt=>{const At=accessorName(xt);return ot(xt),nt.push(At),At}),this.cellkey=et.key?et.key:groupkey(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const st=et.fields||[null],ut=et.ops||["count"],ct=et.as||[],ft=st.length,pt={};let ht,mt,yt,vt,Tt,Et;for(ft!==ut.length&&error("Unmatched number of fields and aggregate ops."),Et=0;Et<ft;++Et){if(ht=st[Et],mt=ut[Et],ht==null&&mt!=="count"&&error("Null aggregate field specified."),vt=accessorName(ht),Tt=measureName(mt,vt,ct[Et]),nt.push(Tt),mt==="count"){this._counts.push(Tt);continue}yt=pt[vt],yt||(ot(ht),yt=pt[vt]=[],yt.field=ht,this._measures.push(yt)),mt!=="count"&&(this._countOnly=!1),yt.push(createMeasure(mt,Tt))}return this._measures=this._measures.map(xt=>compileMeasures(xt,xt.field)),Object.create(null)},cellkey:groupkey(),cell(et,tt){let nt=this.value[et];return nt?nt.num===0&&this._drop&&nt.stamp<this.stamp?(nt.stamp=this.stamp,this._adds[this._alen++]=nt):nt.stamp<this.stamp&&(nt.stamp=this.stamp,this._mods[this._mlen++]=nt):(nt=this.value[et]=this.newcell(et,tt),this._adds[this._alen++]=nt),nt},newcell(et,tt){const nt={key:et,num:0,agg:null,tuple:this.newtuple(tt,this._prev&&this._prev[et]),stamp:this.stamp,store:!1};if(!this._countOnly){const rt=this._measures,ot=rt.length;nt.agg=Array(ot);for(let st=0;st<ot;++st)nt.agg[st]=new rt[st](nt)}return nt.store&&(nt.data=new TupleStore),nt},newtuple(et,tt){const nt=this._dnames,rt=this._dims,ot=rt.length,st={};for(let ut=0;ut<ot;++ut)st[nt[ut]]=rt[ut](et);return tt?replace$1(tt.tuple,st):ingest$1(st)},clean(){const et=this.value;for(const tt in et)et[tt].num===0&&delete et[tt]},add(et){const tt=this.cellkey(et),nt=this.cell(tt,et);if(nt.num+=1,this._countOnly)return;nt.store&&nt.data.add(et);const rt=nt.agg;for(let ot=0,st=rt.length;ot<st;++ot)rt[ot].add(rt[ot].get(et),et)},rem(et){const tt=this.cellkey(et),nt=this.cell(tt,et);if(nt.num-=1,this._countOnly)return;nt.store&&nt.data.rem(et);const rt=nt.agg;for(let ot=0,st=rt.length;ot<st;++ot)rt[ot].rem(rt[ot].get(et),et)},celltuple(et){const tt=et.tuple,nt=this._counts;et.store&&et.data.values();for(let rt=0,ot=nt.length;rt<ot;++rt)tt[nt[rt]]=et.num;if(!this._countOnly){const rt=et.agg;for(let ot=0,st=rt.length;ot<st;++ot)rt[ot].set(tt)}return tt},changes(et){const tt=this._adds,nt=this._mods,rt=this._prev,ot=this._drop,st=et.add,ut=et.rem,ct=et.mod;let ft,pt,ht,mt;if(rt)for(pt in rt)ft=rt[pt],(!ot||ft.num)&&ut.push(ft.tuple);for(ht=0,mt=this._alen;ht<mt;++ht)st.push(this.celltuple(tt[ht])),tt[ht]=null;for(ht=0,mt=this._mlen;ht<mt;++ht)ft=nt[ht],(ft.num===0&&ot?ut:ct).push(this.celltuple(ft)),nt[ht]=null;return this._alen=this._mlen=0,this._prev=null,et}});const EPSILON$1=1e-14;function Bin(et){Transform.call(this,null,et)}Bin.Definition={type:"Bin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:!0,default:[5,2]},{name:"extent",type:"number",array:!0,length:2,required:!0},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:!0},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:!0},{name:"name",type:"string"},{name:"as",type:"string",array:!0,length:2,default:["bin0","bin1"]}]};inherits(Bin,Transform,{transform(et,tt){const nt=et.interval!==!1,rt=this._bins(et),ot=rt.start,st=rt.step,ut=et.as||["bin0","bin1"],ct=ut[0],ft=ut[1];let pt;return et.modified()?(tt=tt.reflow(!0),pt=tt.SOURCE):pt=tt.modified(accessorFields(et.field))?tt.ADD_MOD:tt.ADD,tt.visit(pt,nt?ht=>{const mt=rt(ht);ht[ct]=mt,ht[ft]=mt==null?null:ot+st*(1+(mt-ot)/st)}:ht=>ht[ct]=rt(ht)),tt.modifies(nt?ut:ct)},_bins(et){if(this.value&&!et.modified())return this.value;const tt=et.field,nt=bin$1(et),rt=nt.step;let ot=nt.start,st=ot+Math.ceil((nt.stop-ot)/rt)*rt,ut,ct;(ut=et.anchor)!=null&&(ct=ut-(ot+rt*Math.floor((ut-ot)/rt)),ot+=ct,st+=ct);const ft=function(pt){let ht=toNumber(tt(pt));return ht==null?null:ht<ot?-1/0:ht>st?1/0:(ht=Math.max(ot,Math.min(ht,st-rt)),ot+rt*Math.floor(EPSILON$1+(ht-ot)/rt))};return ft.start=ot,ft.stop=nt.stop,ft.step=rt,this.value=accessor(ft,accessorFields(tt),et.name||"bin_"+accessorName(tt))}});function SortedList(et,tt,nt){const rt=et;let ot=tt||[],st=nt||[],ut={},ct=0;return{add:ft=>st.push(ft),remove:ft=>ut[rt(ft)]=++ct,size:()=>ot.length,data:(ft,pt)=>(ct&&(ot=ot.filter(ht=>!ut[rt(ht)]),ut={},ct=0),pt&&ft&&ot.sort(ft),st.length&&(ot=ft?merge$4(ft,ot,st.sort(ft)):ot.concat(st),st=[]),ot)}}function Collect$1(et){Transform.call(this,[],et)}Collect$1.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]};inherits(Collect$1,Transform,{transform(et,tt){const nt=tt.fork(tt.ALL),rt=SortedList(tupleid,this.value,nt.materialize(nt.ADD).add),ot=et.sort,st=tt.changed()||ot&&(et.modified("sort")||tt.modified(ot.fields));return nt.visit(nt.REM,rt.remove),this.modified(st),this.value=nt.source=rt.data(stableCompare(ot),st),tt.source&&tt.source.root&&(this.value.root=tt.source.root),nt}});function Compare$1(et){Operator.call(this,null,update$5,et)}inherits(Compare$1,Operator);function update$5(et){return this.value&&!et.modified()?this.value:compare$9(et.fields,et.orders)}function CountPattern(et){Transform.call(this,null,et)}CountPattern.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};function tokenize(et,tt,nt){switch(tt){case"upper":et=et.toUpperCase();break;case"lower":et=et.toLowerCase();break}return et.match(nt)}inherits(CountPattern,Transform,{transform(et,tt){const nt=mt=>yt=>{for(var vt=tokenize(ct(yt),et.case,st)||[],Tt,Et=0,xt=vt.length;Et<xt;++Et)ut.test(Tt=vt[Et])||mt(Tt)},rt=this._parameterCheck(et,tt),ot=this._counts,st=this._match,ut=this._stop,ct=et.field,ft=et.as||["text","count"],pt=nt(mt=>ot[mt]=1+(ot[mt]||0)),ht=nt(mt=>ot[mt]-=1);return rt?tt.visit(tt.SOURCE,pt):(tt.visit(tt.ADD,pt),tt.visit(tt.REM,ht)),this._finish(tt,ft)},_parameterCheck(et,tt){let nt=!1;return(et.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(et.stopwords||"")+"$","i"),nt=!0),(et.modified("pattern")||!this._match)&&(this._match=new RegExp(et.pattern||"[\\w']+","g"),nt=!0),(et.modified("field")||tt.modified(et.field.fields))&&(nt=!0),nt&&(this._counts={}),nt},_finish(et,tt){const nt=this._counts,rt=this._tuples||(this._tuples={}),ot=tt[0],st=tt[1],ut=et.fork(et.NO_SOURCE|et.NO_FIELDS);let ct,ft,pt;for(ct in nt)ft=rt[ct],pt=nt[ct]||0,!ft&&pt?(rt[ct]=ft=ingest$1({}),ft[ot]=ct,ft[st]=pt,ut.add.push(ft)):pt===0?(ft&&ut.rem.push(ft),nt[ct]=null,rt[ct]=null):ft[st]!==pt&&(ft[st]=pt,ut.mod.push(ft));return ut.modifies(tt)}});function Cross(et){Transform.call(this,null,et)}Cross.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]};inherits(Cross,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE),rt=et.as||["a","b"],ot=rt[0],st=rt[1],ut=!this.value||tt.changed(tt.ADD_REM)||et.modified("as")||et.modified("filter");let ct=this.value;return ut?(ct&&(nt.rem=ct),ct=tt.materialize(tt.SOURCE).source,nt.add=this.value=cross(ct,ot,st,et.filter||truthy)):nt.mod=ct,nt.source=this.value,nt.modifies(rt)}});function cross(et,tt,nt,rt){for(var ot=[],st={},ut=et.length,ct=0,ft,pt;ct<ut;++ct)for(st[tt]=pt=et[ct],ft=0;ft<ut;++ft)st[nt]=et[ft],rt(st)&&(ot.push(ingest$1(st)),st={},st[tt]=pt);return ot}const Distributions={kde,mixture:mixture$1,normal:gaussian,lognormal,uniform},DISTRIBUTIONS="distributions",FUNCTION="function",FIELD="field";function parse$6(et,tt){const nt=et[FUNCTION];has$1(Distributions,nt)||error("Unknown distribution function: "+nt);const rt=Distributions[nt]();for(const ot in et)ot===FIELD?rt.data((et.from||tt()).map(et[ot])):ot===DISTRIBUTIONS?rt[ot](et[ot].map(st=>parse$6(st,tt))):typeof rt[ot]===FUNCTION&&rt[ot](et[ot]);return rt}function Density(et){Transform.call(this,null,et)}const distributions=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],mixture={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:distributions},{name:"weights",type:"number",array:!0}]};Density.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:distributions.concat(mixture)},{name:"as",type:"string",array:!0,default:["value","density"]}]};inherits(Density,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS);if(!this.value||tt.changed()||et.modified()){const rt=parse$6(et.distribution,source$2(tt)),ot=et.steps||et.minsteps||25,st=et.steps||et.maxsteps||200;let ut=et.method||"pdf";ut!=="pdf"&&ut!=="cdf"&&error("Invalid density method: "+ut),!et.extent&&!rt.data&&error("Missing density extent parameter."),ut=rt[ut];const ct=et.as||["value","density"],ft=et.extent||extent(rt.data()),pt=sampleCurve(ut,ft,ot,st).map(ht=>{const mt={};return mt[ct[0]]=ht[0],mt[ct[1]]=ht[1],ingest$1(mt)});this.value&&(nt.rem=this.value),this.value=nt.add=nt.source=pt}return nt}});function source$2(et){return()=>et.materialize(et.SOURCE).source}function fieldNames(et,tt){return et?et.map((nt,rt)=>tt[rt]||accessorName(nt)):null}function partition$1$1(et,tt,nt){const rt=[],ot=mt=>mt(ft);let st,ut,ct,ft,pt,ht;if(tt==null)rt.push(et.map(nt));else for(st={},ut=0,ct=et.length;ut<ct;++ut)ft=et[ut],pt=tt.map(ot),ht=st[pt],ht||(st[pt]=ht=[],ht.dims=pt,rt.push(ht)),ht.push(nt(ft));return rt}const Output$5="bin";function DotBin(et){Transform.call(this,null,et)}DotBin.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:Output$5}]};const autostep=(et,tt)=>span(extent(et,tt))/30;inherits(DotBin,Transform,{transform(et,tt){if(this.value&&!(et.modified()||tt.changed()))return tt;const nt=tt.materialize(tt.SOURCE).source,rt=partition$1$1(tt.source,et.groupby,identity$6),ot=et.smooth||!1,st=et.field,ut=et.step||autostep(nt,st),ct=stableCompare((Tt,Et)=>st(Tt)-st(Et)),ft=et.as||Output$5,pt=rt.length;let ht=1/0,mt=-1/0,yt=0,vt;for(;yt<pt;++yt){const Tt=rt[yt].sort(ct);vt=-1;for(const Et of dotbin(Tt,ut,ot,st))Et<ht&&(ht=Et),Et>mt&&(mt=Et),Tt[++vt][ft]=Et}return this.value={start:ht,stop:mt,step:ut},tt.reflow(!0).modifies(ft)}});function Expression$1(et){Operator.call(this,null,update$4,et),this.modified(!0)}inherits(Expression$1,Operator);function update$4(et){const tt=et.expr;return this.value&&!et.modified("expr")?this.value:accessor(nt=>tt(nt,et),accessorFields(tt),accessorName(tt))}function Extent(et){Transform.call(this,[void 0,void 0],et)}Extent.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]};inherits(Extent,Transform,{transform(et,tt){const nt=this.value,rt=et.field,ot=tt.changed()||tt.modified(rt.fields)||et.modified("field");let st=nt[0],ut=nt[1];if((ot||st==null)&&(st=1/0,ut=-1/0),tt.visit(ot?tt.SOURCE:tt.ADD,ct=>{const ft=toNumber(rt(ct));ft!=null&&(ft<st&&(st=ft),ft>ut&&(ut=ft))}),!Number.isFinite(st)||!Number.isFinite(ut)){let ct=accessorName(rt);ct&&(ct=` for field "${ct}"`),tt.dataflow.warn(`Infinite extent${ct}: [${st}, ${ut}]`),st=ut=void 0}this.value=[st,ut]}});function Subflow(et,tt){Operator.call(this,et),this.parent=tt,this.count=0}inherits(Subflow,Operator,{connect(et){return this.detachSubflow=et.detachSubflow,this.targets().add(et),et.source=this},add(et){this.count+=1,this.value.add.push(et)},rem(et){this.count-=1,this.value.rem.push(et)},mod(et){this.value.mod.push(et)},init(et){this.value.init(et,et.NO_SOURCE)},evaluate(){return this.value}});function Facet$1(et){Transform.call(this,{},et),this._keys=fastmap();const tt=this._targets=[];tt.active=0,tt.forEach=nt=>{for(let rt=0,ot=tt.active;rt<ot;++rt)nt(tt[rt],rt,tt)}}inherits(Facet$1,Transform,{activate(et){this._targets[this._targets.active++]=et},subflow(et,tt,nt,rt){const ot=this.value;let st=has$1(ot,et)&&ot[et],ut,ct;return st?st.value.stamp<nt.stamp&&(st.init(nt),this.activate(st)):(ct=rt||(ct=this._group[et])&&ct.tuple,ut=nt.dataflow,st=new Subflow(nt.fork(nt.NO_SOURCE),this),ut.add(st).connect(tt(ut,et,ct)),ot[et]=st,this.activate(st)),st},clean(){const et=this.value;let tt=0;for(const nt in et)if(et[nt].count===0){const rt=et[nt].detachSubflow;rt&&rt(),delete et[nt],++tt}if(tt){const nt=this._targets.filter(rt=>rt&&rt.count>0);this.initTargets(nt)}},initTargets(et){const tt=this._targets,nt=tt.length,rt=et?et.length:0;let ot=0;for(;ot<rt;++ot)tt[ot]=et[ot];for(;ot<nt&&tt[ot]!=null;++ot)tt[ot]=null;tt.active=rt},transform(et,tt){const nt=tt.dataflow,rt=et.key,ot=et.subflow,st=this._keys,ut=et.modified("key"),ct=ft=>this.subflow(ft,ot,tt);return this._group=et.group||{},this.initTargets(),tt.visit(tt.REM,ft=>{const pt=tupleid(ft),ht=st.get(pt);ht!==void 0&&(st.delete(pt),ct(ht).rem(ft))}),tt.visit(tt.ADD,ft=>{const pt=rt(ft);st.set(tupleid(ft),pt),ct(pt).add(ft)}),ut||tt.modified(rt.fields)?tt.visit(tt.MOD,ft=>{const pt=tupleid(ft),ht=st.get(pt),mt=rt(ft);ht===mt?ct(mt).mod(ft):(st.set(pt,mt),ct(ht).rem(ft),ct(mt).add(ft))}):tt.changed(tt.MOD)&&tt.visit(tt.MOD,ft=>{ct(st.get(tupleid(ft))).mod(ft)}),ut&&tt.visit(tt.REFLOW,ft=>{const pt=tupleid(ft),ht=st.get(pt),mt=rt(ft);ht!==mt&&(st.set(pt,mt),ct(ht).rem(ft),ct(mt).add(ft))}),tt.clean()?nt.runAfter(()=>{this.clean(),st.clean()}):st.empty>nt.cleanThreshold&&nt.runAfter(st.clean),tt}});function Field$1(et){Operator.call(this,null,update$3,et)}inherits(Field$1,Operator);function update$3(et){return this.value&&!et.modified()?this.value:isArray(et.name)?array$5(et.name).map(tt=>field$1(tt)):field$1(et.name,et.as)}function Filter(et){Transform.call(this,fastmap(),et)}Filter.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]};inherits(Filter,Transform,{transform(et,tt){const nt=tt.dataflow,rt=this.value,ot=tt.fork(),st=ot.add,ut=ot.rem,ct=ot.mod,ft=et.expr;let pt=!0;tt.visit(tt.REM,mt=>{const yt=tupleid(mt);rt.has(yt)?rt.delete(yt):ut.push(mt)}),tt.visit(tt.ADD,mt=>{ft(mt,et)?st.push(mt):rt.set(tupleid(mt),1)});function ht(mt){const yt=tupleid(mt),vt=ft(mt,et),Tt=rt.get(yt);vt&&Tt?(rt.delete(yt),st.push(mt)):!vt&&!Tt?(rt.set(yt,1),ut.push(mt)):pt&&vt&&!Tt&&ct.push(mt)}return tt.visit(tt.MOD,ht),et.modified()&&(pt=!1,tt.visit(tt.REFLOW,ht)),rt.empty>nt.cleanThreshold&&nt.runAfter(rt.clean),ot}});function Flatten(et){Transform.call(this,[],et)}Flatten.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]};inherits(Flatten,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE),rt=et.fields,ot=fieldNames(rt,et.as||[]),st=et.index||null,ut=ot.length;return nt.rem=this.value,tt.visit(tt.SOURCE,ct=>{const ft=rt.map(Tt=>Tt(ct)),pt=ft.reduce((Tt,Et)=>Math.max(Tt,Et.length),0);let ht=0,mt,yt,vt;for(;ht<pt;++ht){for(yt=derive(ct),mt=0;mt<ut;++mt)yt[ot[mt]]=(vt=ft[mt][ht])==null?null:vt;st&&(yt[st]=ht),nt.add.push(yt)}}),this.value=nt.source=nt.add,st&&nt.modifies(st),nt.modifies(ot)}});function Fold(et){Transform.call(this,[],et)}Fold.Definition={type:"Fold",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0,length:2,default:["key","value"]}]};inherits(Fold,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE),rt=et.fields,ot=rt.map(accessorName),st=et.as||["key","value"],ut=st[0],ct=st[1],ft=rt.length;return nt.rem=this.value,tt.visit(tt.SOURCE,pt=>{for(let ht=0,mt;ht<ft;++ht)mt=derive(pt),mt[ut]=ot[ht],mt[ct]=rt[ht](pt),nt.add.push(mt)}),this.value=nt.source=nt.add,nt.modifies(st)}});function Formula(et){Transform.call(this,null,et)}Formula.Definition={type:"Formula",metadata:{modifies:!0},params:[{name:"expr",type:"expr",required:!0},{name:"as",type:"string",required:!0},{name:"initonly",type:"boolean"}]};inherits(Formula,Transform,{transform(et,tt){const nt=et.expr,rt=et.as,ot=et.modified(),st=et.initonly?tt.ADD:ot?tt.SOURCE:tt.modified(nt.fields)||tt.modified(rt)?tt.ADD_MOD:tt.ADD;return ot&&(tt=tt.materialize().reflow(!0)),et.initonly||tt.modifies(rt),tt.visit(st,ut=>ut[rt]=nt(ut,et))}});function Generate(et){Transform.call(this,[],et)}inherits(Generate,Transform,{transform(et,tt){const nt=tt.fork(tt.ALL),rt=et.generator;let ot=this.value,st=et.size-ot.length,ut,ct,ft;if(st>0){for(ut=[];--st>=0;)ut.push(ft=ingest$1(rt(et))),ot.push(ft);nt.add=nt.add.length?nt.materialize(nt.ADD).add.concat(ut):ut}else ct=ot.slice(0,-st),nt.rem=nt.rem.length?nt.materialize(nt.REM).rem.concat(ct):ct,ot=ot.slice(-st);return nt.source=this.value=ot,nt}});const Methods$1={value:"value",median,mean,min:min$2,max:max$2},Empty$1=[];function Impute(et){Transform.call(this,[],et)}Impute.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function getValue$2(et){var tt=et.method||Methods$1.value,nt;if(Methods$1[tt]==null)error("Unrecognized imputation method: "+tt);else return tt===Methods$1.value?(nt=et.value!==void 0?et.value:0,()=>nt):Methods$1[tt]}function getField$1(et){const tt=et.field;return nt=>nt?tt(nt):NaN}inherits(Impute,Transform,{transform(et,tt){var nt=tt.fork(tt.ALL),rt=getValue$2(et),ot=getField$1(et),st=accessorName(et.field),ut=accessorName(et.key),ct=(et.groupby||[]).map(accessorName),ft=partition$4(tt.source,et.groupby,et.key,et.keyvals),pt=[],ht=this.value,mt=ft.domain.length,yt,vt,Tt,Et,xt,At,Ct,$t,Ot,Rt;for(xt=0,$t=ft.length;xt<$t;++xt)for(yt=ft[xt],Tt=yt.values,vt=NaN,Ct=0;Ct<mt;++Ct)if(yt[Ct]==null){for(Et=ft.domain[Ct],Rt={_impute:!0},At=0,Ot=Tt.length;At<Ot;++At)Rt[ct[At]]=Tt[At];Rt[ut]=Et,Rt[st]=Number.isNaN(vt)?vt=rt(yt,ot):vt,pt.push(ingest$1(Rt))}return pt.length&&(nt.add=nt.materialize(nt.ADD).add.concat(pt)),ht.length&&(nt.rem=nt.materialize(nt.REM).rem.concat(ht)),this.value=pt,nt}});function partition$4(et,tt,nt,rt){var ot=At=>At(xt),st=[],ut=rt?rt.slice():[],ct={},ft={},pt,ht,mt,yt,vt,Tt,Et,xt;for(ut.forEach((At,Ct)=>ct[At]=Ct+1),yt=0,Et=et.length;yt<Et;++yt)xt=et[yt],Tt=nt(xt),vt=ct[Tt]||(ct[Tt]=ut.push(Tt)),ht=(pt=tt?tt.map(ot):Empty$1)+"",(mt=ft[ht])||(mt=ft[ht]=[],st.push(mt),mt.values=pt),mt[vt-1]=xt;return st.domain=ut,st}function JoinAggregate(et){Aggregate$1.call(this,et)}JoinAggregate.Definition={type:"JoinAggregate",metadata:{modifies:!0},params:[{name:"groupby",type:"field",array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"ops",type:"enum",array:!0,values:ValidAggregateOps},{name:"as",type:"string",null:!0,array:!0},{name:"key",type:"field"}]};inherits(JoinAggregate,Aggregate$1,{transform(et,tt){const nt=this,rt=et.modified();let ot;return nt.value&&(rt||tt.modified(nt._inputs,!0))?(ot=nt.value=rt?nt.init(et):{},tt.visit(tt.SOURCE,st=>nt.add(st))):(ot=nt.value=nt.value||this.init(et),tt.visit(tt.REM,st=>nt.rem(st)),tt.visit(tt.ADD,st=>nt.add(st))),nt.changes(),tt.visit(tt.SOURCE,st=>{extend$1(st,ot[nt.cellkey(st)].tuple)}),tt.reflow(rt).modifies(this._outputs)},changes(){const et=this._adds,tt=this._mods;let nt,rt;for(nt=0,rt=this._alen;nt<rt;++nt)this.celltuple(et[nt]),et[nt]=null;for(nt=0,rt=this._mlen;nt<rt;++nt)this.celltuple(tt[nt]),tt[nt]=null;this._alen=this._mlen=0}});function KDE(et){Transform.call(this,null,et)}KDE.Definition={type:"KDE",metadata:{generates:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"cumulative",type:"boolean",default:!1},{name:"counts",type:"boolean",default:!1},{name:"bandwidth",type:"number",default:0},{name:"extent",type:"number",array:!0,length:2},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"as",type:"string",array:!0,default:["value","density"]}]};inherits(KDE,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS);if(!this.value||tt.changed()||et.modified()){const rt=tt.materialize(tt.SOURCE).source,ot=partition$1$1(rt,et.groupby,et.field),st=(et.groupby||[]).map(accessorName),ut=et.bandwidth,ct=et.cumulative?"cdf":"pdf",ft=et.as||["value","density"],pt=[];let ht=et.extent,mt=et.steps||et.minsteps||25,yt=et.steps||et.maxsteps||200;ct!=="pdf"&&ct!=="cdf"&&error("Invalid density method: "+ct),et.resolve==="shared"&&(ht||(ht=extent(rt,et.field)),mt=yt=et.steps||yt),ot.forEach(vt=>{const Tt=kde(vt,ut)[ct],Et=et.counts?vt.length:1,xt=ht||extent(vt);sampleCurve(Tt,xt,mt,yt).forEach(At=>{const Ct={};for(let $t=0;$t<st.length;++$t)Ct[st[$t]]=vt.dims[$t];Ct[ft[0]]=At[0],Ct[ft[1]]=At[1]*Et,pt.push(ingest$1(Ct))})}),this.value&&(nt.rem=this.value),this.value=nt.add=nt.source=pt}return nt}});function Key$3(et){Operator.call(this,null,update$2,et)}inherits(Key$3,Operator);function update$2(et){return this.value&&!et.modified()?this.value:key$2(et.fields,et.flat)}function Load$1(et){Transform.call(this,[],et),this._pending=null}inherits(Load$1,Transform,{transform(et,tt){const nt=tt.dataflow;return this._pending?output(this,tt,this._pending):stop(et)?tt.StopPropagation:et.values?output(this,tt,nt.parse(et.values,et.format)):et.async?{async:nt.request(et.url,et.format).then(ot=>(this._pending=array$5(ot.data),st=>st.touch(this)))}:nt.request(et.url,et.format).then(rt=>output(this,tt,array$5(rt.data)))}});function stop(et){return et.modified("async")&&!(et.modified("values")||et.modified("url")||et.modified("format"))}function output(et,tt,nt){nt.forEach(ingest$1);const rt=tt.fork(tt.NO_FIELDS&tt.NO_SOURCE);return rt.rem=et.value,et.value=rt.source=rt.add=nt,et._pending=null,rt.rem.length&&rt.clean(!0),rt}function Lookup(et){Transform.call(this,{},et)}Lookup.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]};inherits(Lookup,Transform,{transform(et,tt){const nt=et.fields,rt=et.index,ot=et.values,st=et.default==null?null:et.default,ut=et.modified(),ct=nt.length;let ft=ut?tt.SOURCE:tt.ADD,pt=tt,ht=et.as,mt,yt,vt;return ot?(yt=ot.length,ct>1&&!ht&&error('Multi-field lookup requires explicit "as" parameter.'),ht&&ht.length!==ct*yt&&error('The "as" parameter has too few output field names.'),ht=ht||ot.map(accessorName),mt=function(Tt){for(var Et=0,xt=0,At,Ct;Et<ct;++Et)if(Ct=rt.get(nt[Et](Tt)),Ct==null)for(At=0;At<yt;++At,++xt)Tt[ht[xt]]=st;else for(At=0;At<yt;++At,++xt)Tt[ht[xt]]=ot[At](Ct)}):(ht||error("Missing output field names."),mt=function(Tt){for(var Et=0,xt;Et<ct;++Et)xt=rt.get(nt[Et](Tt)),Tt[ht[Et]]=xt??st}),ut?pt=tt.reflow(!0):(vt=nt.some(Tt=>tt.modified(Tt.fields)),ft|=vt?tt.MOD:0),tt.visit(ft,mt),pt.modifies(ht)}});function MultiExtent$1(et){Operator.call(this,null,update$1$1,et)}inherits(MultiExtent$1,Operator);function update$1$1(et){if(this.value&&!et.modified())return this.value;const tt=et.extents,nt=tt.length;let rt=1/0,ot=-1/0,st,ut;for(st=0;st<nt;++st)ut=tt[st],ut[0]<rt&&(rt=ut[0]),ut[1]>ot&&(ot=ut[1]);return[rt,ot]}function MultiValues$1(et){Operator.call(this,null,update$6,et)}inherits(MultiValues$1,Operator);function update$6(et){return this.value&&!et.modified()?this.value:et.values.reduce((tt,nt)=>tt.concat(nt),[])}function Params$2(et){Transform.call(this,null,et)}inherits(Params$2,Transform,{transform(et,tt){return this.modified(et.modified()),this.value=et,tt.fork(tt.NO_SOURCE|tt.NO_FIELDS)}});function Pivot(et){Aggregate$1.call(this,et)}Pivot.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:ValidAggregateOps,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};inherits(Pivot,Aggregate$1,{_transform:Aggregate$1.prototype.transform,transform(et,tt){return this._transform(aggregateParams(et,tt),tt)}});function aggregateParams(et,tt){const nt=et.field,rt=et.value,ot=(et.op==="count"?"__count__":et.op)||"sum",st=accessorFields(nt).concat(accessorFields(rt)),ut=pivotKeys(nt,et.limit||0,tt);return tt.changed()&&et.set("__pivot__",null,null,!0),{key:et.key,groupby:et.groupby,ops:ut.map(()=>ot),fields:ut.map(ct=>get$5(ct,nt,rt,st)),as:ut.map(ct=>ct+""),modified:et.modified.bind(et)}}function get$5(et,tt,nt,rt){return accessor(ot=>tt(ot)===et?nt(ot):NaN,rt,et+"")}function pivotKeys(et,tt,nt){const rt={},ot=[];return nt.visit(nt.SOURCE,st=>{const ut=et(st);rt[ut]||(rt[ut]=1,ot.push(ut))}),ot.sort(ascending$3),tt?ot.slice(0,tt):ot}function PreFacet$1(et){Facet$1.call(this,et)}inherits(PreFacet$1,Facet$1,{transform(et,tt){const nt=et.subflow,rt=et.field,ot=st=>this.subflow(tupleid(st),nt,tt,st);return(et.modified("field")||rt&&tt.modified(accessorFields(rt)))&&error("PreFacet does not support field modification."),this.initTargets(),rt?(tt.visit(tt.MOD,st=>{const ut=ot(st);rt(st).forEach(ct=>ut.mod(ct))}),tt.visit(tt.ADD,st=>{const ut=ot(st);rt(st).forEach(ct=>ut.add(ingest$1(ct)))}),tt.visit(tt.REM,st=>{const ut=ot(st);rt(st).forEach(ct=>ut.rem(ct))})):(tt.visit(tt.MOD,st=>ot(st).mod(st)),tt.visit(tt.ADD,st=>ot(st).add(st)),tt.visit(tt.REM,st=>ot(st).rem(st))),tt.clean()&&tt.runAfter(()=>this.clean()),tt}});function Project(et){Transform.call(this,null,et)}Project.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]};inherits(Project,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE),rt=et.fields,ot=fieldNames(et.fields,et.as||[]),st=rt?(ct,ft)=>project$1(ct,ft,rt,ot):rederive;let ut;return this.value?ut=this.value:(tt=tt.addAll(),ut=this.value={}),tt.visit(tt.REM,ct=>{const ft=tupleid(ct);nt.rem.push(ut[ft]),ut[ft]=null}),tt.visit(tt.ADD,ct=>{const ft=st(ct,ingest$1({}));ut[tupleid(ct)]=ft,nt.add.push(ft)}),tt.visit(tt.MOD,ct=>{nt.mod.push(st(ct,ut[tupleid(ct)]))}),nt}});function project$1(et,tt,nt,rt){for(let ot=0,st=nt.length;ot<st;++ot)tt[rt[ot]]=nt[ot](et);return tt}function Proxy$2(et){Transform.call(this,null,et)}inherits(Proxy$2,Transform,{transform(et,tt){return this.value=et.value,et.modified("value")?tt.fork(tt.NO_SOURCE|tt.NO_FIELDS):tt.StopPropagation}});function Quantile$1(et){Transform.call(this,null,et)}Quantile$1.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]};const EPSILON$2=1e-14;inherits(Quantile$1,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),rt=et.as||["prob","value"];if(this.value&&!et.modified()&&!tt.changed())return nt.source=this.value,nt;const ot=tt.materialize(tt.SOURCE).source,st=partition$1$1(ot,et.groupby,et.field),ut=(et.groupby||[]).map(accessorName),ct=[],ft=et.step||.01,pt=et.probs||range$4(ft/2,1-EPSILON$2,ft),ht=pt.length;return st.forEach(mt=>{const yt=quantiles(mt,pt);for(let vt=0;vt<ht;++vt){const Tt={};for(let Et=0;Et<ut.length;++Et)Tt[ut[Et]]=mt.dims[Et];Tt[rt[0]]=pt[vt],Tt[rt[1]]=yt[vt],ct.push(ingest$1(Tt))}}),this.value&&(nt.rem=this.value),this.value=nt.add=nt.source=ct,nt}});function Relay$1(et){Transform.call(this,null,et)}inherits(Relay$1,Transform,{transform(et,tt){let nt,rt;return this.value?rt=this.value:(nt=tt=tt.addAll(),rt=this.value={}),et.derive&&(nt=tt.fork(tt.NO_SOURCE),tt.visit(tt.REM,ot=>{const st=tupleid(ot);nt.rem.push(rt[st]),rt[st]=null}),tt.visit(tt.ADD,ot=>{const st=derive(ot);rt[tupleid(ot)]=st,nt.add.push(st)}),tt.visit(tt.MOD,ot=>{const st=rt[tupleid(ot)];for(const ut in ot)st[ut]=ot[ut],nt.modifies(ut);nt.mod.push(st)})),nt}});function Sample(et){Transform.call(this,[],et),this.count=0}Sample.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]};inherits(Sample,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE),rt=et.modified("size"),ot=et.size,st=this.value.reduce((ht,mt)=>(ht[tupleid(mt)]=1,ht),{});let ut=this.value,ct=this.count,ft=0;function pt(ht){let mt,yt;ut.length<ot?ut.push(ht):(yt=~~((ct+1)*random()),yt<ut.length&&yt>=ft&&(mt=ut[yt],st[tupleid(mt)]&&nt.rem.push(mt),ut[yt]=ht)),++ct}if(tt.rem.length&&(tt.visit(tt.REM,ht=>{const mt=tupleid(ht);st[mt]&&(st[mt]=-1,nt.rem.push(ht)),--ct}),ut=ut.filter(ht=>st[tupleid(ht)]!==-1)),(tt.rem.length||rt)&&ut.length<ot&&tt.source&&(ft=ct=ut.length,tt.visit(tt.SOURCE,ht=>{st[tupleid(ht)]||pt(ht)}),ft=-1),rt&&ut.length>ot){const ht=ut.length-ot;for(let mt=0;mt<ht;++mt)st[tupleid(ut[mt])]=-1,nt.rem.push(ut[mt]);ut=ut.slice(ht)}return tt.mod.length&&tt.visit(tt.MOD,ht=>{st[tupleid(ht)]&&nt.mod.push(ht)}),tt.add.length&&tt.visit(tt.ADD,pt),(tt.add.length||ft<0)&&(nt.add=ut.filter(ht=>!st[tupleid(ht)])),this.count=ct,this.value=nt.source=ut,nt}});function Sequence(et){Transform.call(this,null,et)}Sequence.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]};inherits(Sequence,Transform,{transform(et,tt){if(this.value&&!et.modified())return;const nt=tt.materialize().fork(tt.MOD),rt=et.as||"data";return nt.rem=this.value?tt.rem.concat(this.value):tt.rem,this.value=range$4(et.start,et.stop,et.step||1).map(ot=>{const st={};return st[rt]=ot,ingest$1(st)}),nt.add=tt.add.concat(this.value),nt}});function Sieve$1(et){Transform.call(this,null,et),this.modified(!0)}inherits(Sieve$1,Transform,{transform(et,tt){return this.value=tt.source,tt.changed()?tt.fork(tt.NO_SOURCE|tt.NO_FIELDS):tt.StopPropagation}});function TimeUnit(et){Transform.call(this,null,et)}const OUTPUT=["unit0","unit1"];TimeUnit.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:TIME_UNITS,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:OUTPUT}]};inherits(TimeUnit,Transform,{transform(et,tt){const nt=et.field,rt=et.interval!==!1,ot=et.timezone==="utc",st=this._floor(et,tt),ut=(ot?utcInterval:timeInterval)(st.unit).offset,ct=et.as||OUTPUT,ft=ct[0],pt=ct[1],ht=st.step;let mt=st.start||1/0,yt=st.stop||-1/0,vt=tt.ADD;return(et.modified()||tt.changed(tt.REM)||tt.modified(accessorFields(nt)))&&(tt=tt.reflow(!0),vt=tt.SOURCE,mt=1/0,yt=-1/0),tt.visit(vt,Tt=>{const Et=nt(Tt);let xt,At;Et==null?(Tt[ft]=null,rt&&(Tt[pt]=null)):(Tt[ft]=xt=At=st(Et),rt&&(Tt[pt]=At=ut(xt,ht)),xt<mt&&(mt=xt),At>yt&&(yt=At))}),st.start=mt,st.stop=yt,tt.modifies(rt?ct:ft)},_floor(et,tt){const nt=et.timezone==="utc",{units:rt,step:ot}=et.units?{units:et.units,step:et.step||1}:bin$2({extent:et.extent||extent(tt.materialize(tt.SOURCE).source,et.field),maxbins:et.maxbins}),st=timeUnits(rt),ut=this.value||{},ct=(nt?utcFloor:timeFloor)(st,ot);return ct.unit=peek$2(st),ct.units=st,ct.step=ot,ct.start=ut.start,ct.stop=ut.stop,this.value=ct}});function TupleIndex(et){Transform.call(this,fastmap(),et)}inherits(TupleIndex,Transform,{transform(et,tt){const nt=tt.dataflow,rt=et.field,ot=this.value,st=ct=>ot.set(rt(ct),ct);let ut=!0;return et.modified("field")||tt.modified(rt.fields)?(ot.clear(),tt.visit(tt.SOURCE,st)):tt.changed()?(tt.visit(tt.REM,ct=>ot.delete(rt(ct))),tt.visit(tt.ADD,st)):ut=!1,this.modified(ut),ot.empty>nt.cleanThreshold&&nt.runAfter(ot.clean),tt.fork()}});function Values$1(et){Transform.call(this,null,et)}inherits(Values$1,Transform,{transform(et,tt){(!this.value||et.modified("field")||et.modified("sort")||tt.changed()||et.sort&&tt.modified(et.sort.fields))&&(this.value=(et.sort?tt.source.slice().sort(stableCompare(et.sort)):tt.source).map(et.field))}});function WindowOp(et,tt,nt,rt){const ot=WindowOps[et](tt,nt);return{init:ot.init||zero$5,update:function(st,ut){ut[rt]=ot.next(st)}}}const WindowOps={row_number:function(){return{next:et=>et.index+1}},rank:function(){let et;return{init:()=>et=1,next:tt=>{const nt=tt.index,rt=tt.data;return nt&&tt.compare(rt[nt-1],rt[nt])?et=nt+1:et}}},dense_rank:function(){let et;return{init:()=>et=1,next:tt=>{const nt=tt.index,rt=tt.data;return nt&&tt.compare(rt[nt-1],rt[nt])?++et:et}}},percent_rank:function(){const et=WindowOps.rank(),tt=et.next;return{init:et.init,next:nt=>(tt(nt)-1)/(nt.data.length-1)}},cume_dist:function(){let et;return{init:()=>et=0,next:tt=>{const nt=tt.data,rt=tt.compare;let ot=tt.index;if(et<ot){for(;ot+1<nt.length&&!rt(nt[ot],nt[ot+1]);)++ot;et=ot}return(1+et)/nt.length}}},ntile:function(et,tt){tt=+tt,tt>0||error("ntile num must be greater than zero.");const nt=WindowOps.cume_dist(),rt=nt.next;return{init:nt.init,next:ot=>Math.ceil(tt*rt(ot))}},lag:function(et,tt){return tt=+tt||1,{next:nt=>{const rt=nt.index-tt;return rt>=0?et(nt.data[rt]):null}}},lead:function(et,tt){return tt=+tt||1,{next:nt=>{const rt=nt.index+tt,ot=nt.data;return rt<ot.length?et(ot[rt]):null}}},first_value:function(et){return{next:tt=>et(tt.data[tt.i0])}},last_value:function(et){return{next:tt=>et(tt.data[tt.i1-1])}},nth_value:function(et,tt){return tt=+tt,tt>0||error("nth_value nth must be greater than zero."),{next:nt=>{const rt=nt.i0+(tt-1);return rt<nt.i1?et(nt.data[rt]):null}}},prev_value:function(et){let tt;return{init:()=>tt=null,next:nt=>{const rt=et(nt.data[nt.index]);return rt!=null?tt=rt:tt}}},next_value:function(et){let tt,nt;return{init:()=>(tt=null,nt=-1),next:rt=>{const ot=rt.data;return rt.index<=nt?tt:(nt=find$3(et,ot,rt.index))<0?(nt=ot.length,tt=null):tt=et(ot[nt])}}}};function find$3(et,tt,nt){for(let rt=tt.length;nt<rt;++nt)if(et(tt[nt])!=null)return nt;return-1}const ValidWindowOps=Object.keys(WindowOps);function WindowState(et){const tt=array$5(et.ops),nt=array$5(et.fields),rt=array$5(et.params),ot=array$5(et.as),st=this.outputs=[],ut=this.windows=[],ct={},ft={},pt=[],ht=[];let mt=!0;function yt(vt){array$5(accessorFields(vt)).forEach(Tt=>ct[Tt]=1)}yt(et.sort),tt.forEach((vt,Tt)=>{const Et=nt[Tt],xt=accessorName(Et),At=measureName(vt,xt,ot[Tt]);if(yt(Et),st.push(At),has$1(WindowOps,vt))ut.push(WindowOp(vt,nt[Tt],rt[Tt],At));else{if(Et==null&&vt!=="count"&&error("Null aggregate field specified."),vt==="count"){pt.push(At);return}mt=!1;let Ct=ft[xt];Ct||(Ct=ft[xt]=[],Ct.field=Et,ht.push(Ct)),Ct.push(createMeasure(vt,At))}}),(pt.length||ht.length)&&(this.cell=cell(ht,pt,mt)),this.inputs=Object.keys(ct)}const prototype$2=WindowState.prototype;prototype$2.init=function(){this.windows.forEach(et=>et.init()),this.cell&&this.cell.init()};prototype$2.update=function(et,tt){const nt=this.cell,rt=this.windows,ot=et.data,st=rt&&rt.length;let ut;if(nt){for(ut=et.p0;ut<et.i0;++ut)nt.rem(ot[ut]);for(ut=et.p1;ut<et.i1;++ut)nt.add(ot[ut]);nt.set(tt)}for(ut=0;ut<st;++ut)rt[ut].update(et,tt)};function cell(et,tt,nt){et=et.map(ft=>compileMeasures(ft,ft.field));const rt={num:0,agg:null,store:!1,count:tt};if(!nt)for(var ot=et.length,st=rt.agg=Array(ot),ut=0;ut<ot;++ut)st[ut]=new et[ut](rt);if(rt.store)var ct=rt.data=new TupleStore;return rt.add=function(ft){if(rt.num+=1,!nt){ct&&ct.add(ft);for(let pt=0;pt<ot;++pt)st[pt].add(st[pt].get(ft),ft)}},rt.rem=function(ft){if(rt.num-=1,!nt){ct&&ct.rem(ft);for(let pt=0;pt<ot;++pt)st[pt].rem(st[pt].get(ft),ft)}},rt.set=function(ft){let pt,ht;for(ct&&ct.values(),pt=0,ht=tt.length;pt<ht;++pt)ft[tt[pt]]=rt.num;if(!nt)for(pt=0,ht=st.length;pt<ht;++pt)st[pt].set(ft)},rt.init=function(){rt.num=0,ct&&ct.reset();for(let ft=0;ft<ot;++ft)st[ft].init()},rt}function Window(et){Transform.call(this,{},et),this._mlen=0,this._mods=[]}Window.Definition={type:"Window",metadata:{modifies:!0},params:[{name:"sort",type:"compare"},{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:ValidWindowOps.concat(ValidAggregateOps)},{name:"params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"frame",type:"number",null:!0,array:!0,length:2,default:[null,0]},{name:"ignorePeers",type:"boolean",default:!1}]};inherits(Window,Transform,{transform(et,tt){this.stamp=tt.stamp;const nt=et.modified(),rt=stableCompare(et.sort),ot=groupkey(et.groupby),st=ct=>this.group(ot(ct));let ut=this.state;(!ut||nt)&&(ut=this.state=new WindowState(et)),nt||tt.modified(ut.inputs)?(this.value={},tt.visit(tt.SOURCE,ct=>st(ct).add(ct))):(tt.visit(tt.REM,ct=>st(ct).remove(ct)),tt.visit(tt.ADD,ct=>st(ct).add(ct)));for(let ct=0,ft=this._mlen;ct<ft;++ct)processPartition(this._mods[ct],ut,rt,et);return this._mlen=0,this._mods=[],tt.reflow(nt).modifies(ut.outputs)},group(et){let tt=this.value[et];return tt||(tt=this.value[et]=SortedList(tupleid),tt.stamp=-1),tt.stamp<this.stamp&&(tt.stamp=this.stamp,this._mods[this._mlen++]=tt),tt}});function processPartition(et,tt,nt,rt){const ot=rt.sort,st=ot&&!rt.ignorePeers,ut=rt.frame||[null,0],ct=et.data(nt),ft=ct.length,pt=st?bisector$1(ot):null,ht={i0:0,i1:0,p0:0,p1:0,index:0,data:ct,compare:ot||constant$6(-1)};tt.init();for(let mt=0;mt<ft;++mt)setWindow(ht,ut,mt,ft),st&&adjustRange(ht,pt),tt.update(ht,ct[mt])}function setWindow(et,tt,nt,rt){et.p0=et.i0,et.p1=et.i1,et.i0=tt[0]==null?0:Math.max(0,nt-Math.abs(tt[0])),et.i1=tt[1]==null?rt:Math.min(rt,nt+Math.abs(tt[1])+1),et.index=nt}function adjustRange(et,tt){const nt=et.i0,rt=et.i1-1,ot=et.compare,st=et.data,ut=st.length-1;nt>0&&!ot(st[nt],st[nt-1])&&(et.i0=tt.left(st,st[nt])),rt<ut&&!ot(st[rt],st[rt+1])&&(et.i1=tt.right(st,st[rt]))}const tx=Object.freeze(Object.defineProperty({__proto__:null,aggregate:Aggregate$1,bin:Bin,collect:Collect$1,compare:Compare$1,countpattern:CountPattern,cross:Cross,density:Density,dotbin:DotBin,expression:Expression$1,extent:Extent,facet:Facet$1,field:Field$1,filter:Filter,flatten:Flatten,fold:Fold,formula:Formula,generate:Generate,impute:Impute,joinaggregate:JoinAggregate,kde:KDE,key:Key$3,load:Load$1,lookup:Lookup,multiextent:MultiExtent$1,multivalues:MultiValues$1,params:Params$2,pivot:Pivot,prefacet:PreFacet$1,project:Project,proxy:Proxy$2,quantile:Quantile$1,relay:Relay$1,sample:Sample,sequence:Sequence,sieve:Sieve$1,subflow:Subflow,timeunit:TimeUnit,tupleindex:TupleIndex,values:Values$1,window:Window},Symbol.toStringTag,{value:"Module"}));function constant$4(et){return function(){return et}}const abs$2=Math.abs,atan2$1=Math.atan2,cos$2=Math.cos,max$1=Math.max,min$1=Math.min,sin$2=Math.sin,sqrt$3=Math.sqrt,epsilon$6=1e-12,pi$3=Math.PI,halfPi$2=pi$3/2,tau$3=2*pi$3;function acos$1(et){return et>1?0:et<-1?pi$3:Math.acos(et)}function asin$2(et){return et>=1?halfPi$2:et<=-1?-halfPi$2:Math.asin(et)}const pi$2=Math.PI,tau$2=2*pi$2,epsilon$5=1e-6,tauEpsilon=tau$2-epsilon$5;function append$1(et){this._+=et[0];for(let tt=1,nt=et.length;tt<nt;++tt)this._+=arguments[tt]+et[tt]}function appendRound$1(et){let tt=Math.floor(et);if(!(tt>=0))throw new Error(`invalid digits: ${et}`);if(tt>15)return append$1;const nt=10**tt;return function(rt){this._+=rt[0];for(let ot=1,st=rt.length;ot<st;++ot)this._+=Math.round(arguments[ot]*nt)/nt+rt[ot]}}class Path$1{constructor(tt){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=tt==null?append$1:appendRound$1(tt)}moveTo(tt,nt){this._append`M${this._x0=this._x1=+tt},${this._y0=this._y1=+nt}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(tt,nt){this._append`L${this._x1=+tt},${this._y1=+nt}`}quadraticCurveTo(tt,nt,rt,ot){this._append`Q${+tt},${+nt},${this._x1=+rt},${this._y1=+ot}`}bezierCurveTo(tt,nt,rt,ot,st,ut){this._append`C${+tt},${+nt},${+rt},${+ot},${this._x1=+st},${this._y1=+ut}`}arcTo(tt,nt,rt,ot,st){if(tt=+tt,nt=+nt,rt=+rt,ot=+ot,st=+st,st<0)throw new Error(`negative radius: ${st}`);let ut=this._x1,ct=this._y1,ft=rt-tt,pt=ot-nt,ht=ut-tt,mt=ct-nt,yt=ht*ht+mt*mt;if(this._x1===null)this._append`M${this._x1=tt},${this._y1=nt}`;else if(yt>epsilon$5)if(!(Math.abs(mt*ft-pt*ht)>epsilon$5)||!st)this._append`L${this._x1=tt},${this._y1=nt}`;else{let vt=rt-ut,Tt=ot-ct,Et=ft*ft+pt*pt,xt=vt*vt+Tt*Tt,At=Math.sqrt(Et),Ct=Math.sqrt(yt),$t=st*Math.tan((pi$2-Math.acos((Et+yt-xt)/(2*At*Ct)))/2),Ot=$t/Ct,Rt=$t/At;Math.abs(Ot-1)>epsilon$5&&this._append`L${tt+Ot*ht},${nt+Ot*mt}`,this._append`A${st},${st},0,0,${+(mt*vt>ht*Tt)},${this._x1=tt+Rt*ft},${this._y1=nt+Rt*pt}`}}arc(tt,nt,rt,ot,st,ut){if(tt=+tt,nt=+nt,rt=+rt,ut=!!ut,rt<0)throw new Error(`negative radius: ${rt}`);let ct=rt*Math.cos(ot),ft=rt*Math.sin(ot),pt=tt+ct,ht=nt+ft,mt=1^ut,yt=ut?ot-st:st-ot;this._x1===null?this._append`M${pt},${ht}`:(Math.abs(this._x1-pt)>epsilon$5||Math.abs(this._y1-ht)>epsilon$5)&&this._append`L${pt},${ht}`,rt&&(yt<0&&(yt=yt%tau$2+tau$2),yt>tauEpsilon?this._append`A${rt},${rt},0,1,${mt},${tt-ct},${nt-ft}A${rt},${rt},0,1,${mt},${this._x1=pt},${this._y1=ht}`:yt>epsilon$5&&this._append`A${rt},${rt},0,${+(yt>=pi$2)},${mt},${this._x1=tt+rt*Math.cos(st)},${this._y1=nt+rt*Math.sin(st)}`)}rect(tt,nt,rt,ot){this._append`M${this._x0=this._x1=+tt},${this._y0=this._y1=+nt}h${rt=+rt}v${+ot}h${-rt}Z`}toString(){return this._}}function path$3(){return new Path$1}path$3.prototype=Path$1.prototype;function withPath(et){let tt=3;return et.digits=function(nt){if(!arguments.length)return tt;if(nt==null)tt=null;else{const rt=Math.floor(nt);if(!(rt>=0))throw new RangeError(`invalid digits: ${nt}`);tt=rt}return et},()=>new Path$1(tt)}function arcInnerRadius(et){return et.innerRadius}function arcOuterRadius(et){return et.outerRadius}function arcStartAngle(et){return et.startAngle}function arcEndAngle(et){return et.endAngle}function arcPadAngle(et){return et&&et.padAngle}function intersect$3(et,tt,nt,rt,ot,st,ut,ct){var ft=nt-et,pt=rt-tt,ht=ut-ot,mt=ct-st,yt=mt*ft-ht*pt;if(!(yt*yt<epsilon$6))return yt=(ht*(tt-st)-mt*(et-ot))/yt,[et+yt*ft,tt+yt*pt]}function cornerTangents(et,tt,nt,rt,ot,st,ut){var ct=et-nt,ft=tt-rt,pt=(ut?st:-st)/sqrt$3(ct*ct+ft*ft),ht=pt*ft,mt=-pt*ct,yt=et+ht,vt=tt+mt,Tt=nt+ht,Et=rt+mt,xt=(yt+Tt)/2,At=(vt+Et)/2,Ct=Tt-yt,$t=Et-vt,Ot=Ct*Ct+$t*$t,Rt=ot-st,It=yt*Et-Tt*vt,kt=($t<0?-1:1)*sqrt$3(max$1(0,Rt*Rt*Ot-It*It)),Mt=(It*$t-Ct*kt)/Ot,Ft=(-It*Ct-$t*kt)/Ot,zt=(It*$t+Ct*kt)/Ot,Vt=(-It*Ct+$t*kt)/Ot,Zt=Mt-xt,Ut=Ft-At,Xt=zt-xt,Jt=Vt-At;return Zt*Zt+Ut*Ut>Xt*Xt+Jt*Jt&&(Mt=zt,Ft=Vt),{cx:Mt,cy:Ft,x01:-ht,y01:-mt,x11:Mt*(ot/Rt-1),y11:Ft*(ot/Rt-1)}}function arc$2$1(){var et=arcInnerRadius,tt=arcOuterRadius,nt=constant$4(0),rt=null,ot=arcStartAngle,st=arcEndAngle,ut=arcPadAngle,ct=null,ft=withPath(pt);function pt(){var ht,mt,yt=+et.apply(this,arguments),vt=+tt.apply(this,arguments),Tt=ot.apply(this,arguments)-halfPi$2,Et=st.apply(this,arguments)-halfPi$2,xt=abs$2(Et-Tt),At=Et>Tt;if(ct||(ct=ht=ft()),vt<yt&&(mt=vt,vt=yt,yt=mt),!(vt>epsilon$6))ct.moveTo(0,0);else if(xt>tau$3-epsilon$6)ct.moveTo(vt*cos$2(Tt),vt*sin$2(Tt)),ct.arc(0,0,vt,Tt,Et,!At),yt>epsilon$6&&(ct.moveTo(yt*cos$2(Et),yt*sin$2(Et)),ct.arc(0,0,yt,Et,Tt,At));else{var Ct=Tt,$t=Et,Ot=Tt,Rt=Et,It=xt,kt=xt,Mt=ut.apply(this,arguments)/2,Ft=Mt>epsilon$6&&(rt?+rt.apply(this,arguments):sqrt$3(yt*yt+vt*vt)),zt=min$1(abs$2(vt-yt)/2,+nt.apply(this,arguments)),Vt=zt,Zt=zt,Ut,Xt;if(Ft>epsilon$6){var Jt=asin$2(Ft/yt*sin$2(Mt)),gn=asin$2(Ft/vt*sin$2(Mt));(It-=Jt*2)>epsilon$6?(Jt*=At?1:-1,Ot+=Jt,Rt-=Jt):(It=0,Ot=Rt=(Tt+Et)/2),(kt-=gn*2)>epsilon$6?(gn*=At?1:-1,Ct+=gn,$t-=gn):(kt=0,Ct=$t=(Tt+Et)/2)}var An=vt*cos$2(Ct),sn=vt*sin$2(Ct),Sn=yt*cos$2(Rt),In=yt*sin$2(Rt);if(zt>epsilon$6){var _n=vt*cos$2($t),En=vt*sin$2($t),Ln=yt*cos$2(Ot),wn=yt*sin$2(Ot),Dn;if(xt<pi$3)if(Dn=intersect$3(An,sn,Ln,wn,_n,En,Sn,In)){var $n=An-Dn[0],Gn=sn-Dn[1],Jn=_n-Dn[0],zn=En-Dn[1],Qn=1/sin$2(acos$1(($n*Jn+Gn*zn)/(sqrt$3($n*$n+Gn*Gn)*sqrt$3(Jn*Jn+zn*zn)))/2),Bn=sqrt$3(Dn[0]*Dn[0]+Dn[1]*Dn[1]);Vt=min$1(zt,(yt-Bn)/(Qn-1)),Zt=min$1(zt,(vt-Bn)/(Qn+1))}else Vt=Zt=0}kt>epsilon$6?Zt>epsilon$6?(Ut=cornerTangents(Ln,wn,An,sn,vt,Zt,At),Xt=cornerTangents(_n,En,Sn,In,vt,Zt,At),ct.moveTo(Ut.cx+Ut.x01,Ut.cy+Ut.y01),Zt<zt?ct.arc(Ut.cx,Ut.cy,Zt,atan2$1(Ut.y01,Ut.x01),atan2$1(Xt.y01,Xt.x01),!At):(ct.arc(Ut.cx,Ut.cy,Zt,atan2$1(Ut.y01,Ut.x01),atan2$1(Ut.y11,Ut.x11),!At),ct.arc(0,0,vt,atan2$1(Ut.cy+Ut.y11,Ut.cx+Ut.x11),atan2$1(Xt.cy+Xt.y11,Xt.cx+Xt.x11),!At),ct.arc(Xt.cx,Xt.cy,Zt,atan2$1(Xt.y11,Xt.x11),atan2$1(Xt.y01,Xt.x01),!At))):(ct.moveTo(An,sn),ct.arc(0,0,vt,Ct,$t,!At)):ct.moveTo(An,sn),!(yt>epsilon$6)||!(It>epsilon$6)?ct.lineTo(Sn,In):Vt>epsilon$6?(Ut=cornerTangents(Sn,In,_n,En,yt,-Vt,At),Xt=cornerTangents(An,sn,Ln,wn,yt,-Vt,At),ct.lineTo(Ut.cx+Ut.x01,Ut.cy+Ut.y01),Vt<zt?ct.arc(Ut.cx,Ut.cy,Vt,atan2$1(Ut.y01,Ut.x01),atan2$1(Xt.y01,Xt.x01),!At):(ct.arc(Ut.cx,Ut.cy,Vt,atan2$1(Ut.y01,Ut.x01),atan2$1(Ut.y11,Ut.x11),!At),ct.arc(0,0,yt,atan2$1(Ut.cy+Ut.y11,Ut.cx+Ut.x11),atan2$1(Xt.cy+Xt.y11,Xt.cx+Xt.x11),At),ct.arc(Xt.cx,Xt.cy,Vt,atan2$1(Xt.y11,Xt.x11),atan2$1(Xt.y01,Xt.x01),!At))):ct.arc(0,0,yt,Rt,Ot,At)}if(ct.closePath(),ht)return ct=null,ht+""||null}return pt.centroid=function(){var ht=(+et.apply(this,arguments)+ +tt.apply(this,arguments))/2,mt=(+ot.apply(this,arguments)+ +st.apply(this,arguments))/2-pi$3/2;return[cos$2(mt)*ht,sin$2(mt)*ht]},pt.innerRadius=function(ht){return arguments.length?(et=typeof ht=="function"?ht:constant$4(+ht),pt):et},pt.outerRadius=function(ht){return arguments.length?(tt=typeof ht=="function"?ht:constant$4(+ht),pt):tt},pt.cornerRadius=function(ht){return arguments.length?(nt=typeof ht=="function"?ht:constant$4(+ht),pt):nt},pt.padRadius=function(ht){return arguments.length?(rt=ht==null?null:typeof ht=="function"?ht:constant$4(+ht),pt):rt},pt.startAngle=function(ht){return arguments.length?(ot=typeof ht=="function"?ht:constant$4(+ht),pt):ot},pt.endAngle=function(ht){return arguments.length?(st=typeof ht=="function"?ht:constant$4(+ht),pt):st},pt.padAngle=function(ht){return arguments.length?(ut=typeof ht=="function"?ht:constant$4(+ht),pt):ut},pt.context=function(ht){return arguments.length?(ct=ht??null,pt):ct},pt}function array$4(et){return typeof et=="object"&&"length"in et?et:Array.from(et)}function Linear$1(et){this._context=et}Linear$1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1,this._line?this._context.lineTo(et,tt):this._context.moveTo(et,tt);break;case 1:this._point=2;default:this._context.lineTo(et,tt);break}}};function curveLinear(et){return new Linear$1(et)}function x$4(et){return et[0]}function y$4(et){return et[1]}function line$2$1(et,tt){var nt=constant$4(!0),rt=null,ot=curveLinear,st=null,ut=withPath(ct);et=typeof et=="function"?et:et===void 0?x$4:constant$4(et),tt=typeof tt=="function"?tt:tt===void 0?y$4:constant$4(tt);function ct(ft){var pt,ht=(ft=array$4(ft)).length,mt,yt=!1,vt;for(rt==null&&(st=ot(vt=ut())),pt=0;pt<=ht;++pt)!(pt<ht&&nt(mt=ft[pt],pt,ft))===yt&&((yt=!yt)?st.lineStart():st.lineEnd()),yt&&st.point(+et(mt,pt,ft),+tt(mt,pt,ft));if(vt)return st=null,vt+""||null}return ct.x=function(ft){return arguments.length?(et=typeof ft=="function"?ft:constant$4(+ft),ct):et},ct.y=function(ft){return arguments.length?(tt=typeof ft=="function"?ft:constant$4(+ft),ct):tt},ct.defined=function(ft){return arguments.length?(nt=typeof ft=="function"?ft:constant$4(!!ft),ct):nt},ct.curve=function(ft){return arguments.length?(ot=ft,rt!=null&&(st=ot(rt)),ct):ot},ct.context=function(ft){return arguments.length?(ft==null?rt=st=null:st=ot(rt=ft),ct):rt},ct}function area$2$1(et,tt,nt){var rt=null,ot=constant$4(!0),st=null,ut=curveLinear,ct=null,ft=withPath(pt);et=typeof et=="function"?et:et===void 0?x$4:constant$4(+et),tt=typeof tt=="function"?tt:constant$4(tt===void 0?0:+tt),nt=typeof nt=="function"?nt:nt===void 0?y$4:constant$4(+nt);function pt(mt){var yt,vt,Tt,Et=(mt=array$4(mt)).length,xt,At=!1,Ct,$t=new Array(Et),Ot=new Array(Et);for(st==null&&(ct=ut(Ct=ft())),yt=0;yt<=Et;++yt){if(!(yt<Et&&ot(xt=mt[yt],yt,mt))===At)if(At=!At)vt=yt,ct.areaStart(),ct.lineStart();else{for(ct.lineEnd(),ct.lineStart(),Tt=yt-1;Tt>=vt;--Tt)ct.point($t[Tt],Ot[Tt]);ct.lineEnd(),ct.areaEnd()}At&&($t[yt]=+et(xt,yt,mt),Ot[yt]=+tt(xt,yt,mt),ct.point(rt?+rt(xt,yt,mt):$t[yt],nt?+nt(xt,yt,mt):Ot[yt]))}if(Ct)return ct=null,Ct+""||null}function ht(){return line$2$1().defined(ot).curve(ut).context(st)}return pt.x=function(mt){return arguments.length?(et=typeof mt=="function"?mt:constant$4(+mt),rt=null,pt):et},pt.x0=function(mt){return arguments.length?(et=typeof mt=="function"?mt:constant$4(+mt),pt):et},pt.x1=function(mt){return arguments.length?(rt=mt==null?null:typeof mt=="function"?mt:constant$4(+mt),pt):rt},pt.y=function(mt){return arguments.length?(tt=typeof mt=="function"?mt:constant$4(+mt),nt=null,pt):tt},pt.y0=function(mt){return arguments.length?(tt=typeof mt=="function"?mt:constant$4(+mt),pt):tt},pt.y1=function(mt){return arguments.length?(nt=mt==null?null:typeof mt=="function"?mt:constant$4(+mt),pt):nt},pt.lineX0=pt.lineY0=function(){return ht().x(et).y(tt)},pt.lineY1=function(){return ht().x(et).y(nt)},pt.lineX1=function(){return ht().x(rt).y(tt)},pt.defined=function(mt){return arguments.length?(ot=typeof mt=="function"?mt:constant$4(!!mt),pt):ot},pt.curve=function(mt){return arguments.length?(ut=mt,st!=null&&(ct=ut(st)),pt):ut},pt.context=function(mt){return arguments.length?(mt==null?st=ct=null:ct=ut(st=mt),pt):st},pt}const circle$1={draw(et,tt){const nt=sqrt$3(tt/pi$3);et.moveTo(nt,0),et.arc(0,0,nt,0,tau$3)}};function Symbol$1(et,tt){let nt=null,rt=withPath(ot);et=typeof et=="function"?et:constant$4(et||circle$1),tt=typeof tt=="function"?tt:constant$4(tt===void 0?64:+tt);function ot(){let st;if(nt||(nt=st=rt()),et.apply(this,arguments).draw(nt,+tt.apply(this,arguments)),st)return nt=null,st+""||null}return ot.type=function(st){return arguments.length?(et=typeof st=="function"?st:constant$4(st),ot):et},ot.size=function(st){return arguments.length?(tt=typeof st=="function"?st:constant$4(+st),ot):tt},ot.context=function(st){return arguments.length?(nt=st??null,ot):nt},ot}function noop$b(){}function point$7(et,tt,nt){et._context.bezierCurveTo((2*et._x0+et._x1)/3,(2*et._y0+et._y1)/3,(et._x0+2*et._x1)/3,(et._y0+2*et._y1)/3,(et._x0+4*et._x1+tt)/6,(et._y0+4*et._y1+nt)/6)}function Basis(et){this._context=et}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$7(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1,this._line?this._context.lineTo(et,tt):this._context.moveTo(et,tt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$7(this,et,tt);break}this._x0=this._x1,this._x1=et,this._y0=this._y1,this._y1=tt}};function curveBasis(et){return new Basis(et)}function BasisClosed(et){this._context=et}BasisClosed.prototype={areaStart:noop$b,areaEnd:noop$b,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1,this._x2=et,this._y2=tt;break;case 1:this._point=2,this._x3=et,this._y3=tt;break;case 2:this._point=3,this._x4=et,this._y4=tt,this._context.moveTo((this._x0+4*this._x1+et)/6,(this._y0+4*this._y1+tt)/6);break;default:point$7(this,et,tt);break}this._x0=this._x1,this._x1=et,this._y0=this._y1,this._y1=tt}};function curveBasisClosed(et){return new BasisClosed(et)}function BasisOpen(et){this._context=et}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var nt=(this._x0+4*this._x1+et)/6,rt=(this._y0+4*this._y1+tt)/6;this._line?this._context.lineTo(nt,rt):this._context.moveTo(nt,rt);break;case 3:this._point=4;default:point$7(this,et,tt);break}this._x0=this._x1,this._x1=et,this._y0=this._y1,this._y1=tt}};function curveBasisOpen(et){return new BasisOpen(et)}function Bundle(et,tt){this._basis=new Basis(et),this._beta=tt}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var et=this._x,tt=this._y,nt=et.length-1;if(nt>0)for(var rt=et[0],ot=tt[0],st=et[nt]-rt,ut=tt[nt]-ot,ct=-1,ft;++ct<=nt;)ft=ct/nt,this._basis.point(this._beta*et[ct]+(1-this._beta)*(rt+ft*st),this._beta*tt[ct]+(1-this._beta)*(ot+ft*ut));this._x=this._y=null,this._basis.lineEnd()},point:function(et,tt){this._x.push(+et),this._y.push(+tt)}};const curveBundle=function et(tt){function nt(rt){return tt===1?new Basis(rt):new Bundle(rt,tt)}return nt.beta=function(rt){return et(+rt)},nt}(.85);function point$6(et,tt,nt){et._context.bezierCurveTo(et._x1+et._k*(et._x2-et._x0),et._y1+et._k*(et._y2-et._y0),et._x2+et._k*(et._x1-tt),et._y2+et._k*(et._y1-nt),et._x2,et._y2)}function Cardinal(et,tt){this._context=et,this._k=(1-tt)/6}Cardinal.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:point$6(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1,this._line?this._context.lineTo(et,tt):this._context.moveTo(et,tt);break;case 1:this._point=2,this._x1=et,this._y1=tt;break;case 2:this._point=3;default:point$6(this,et,tt);break}this._x0=this._x1,this._x1=this._x2,this._x2=et,this._y0=this._y1,this._y1=this._y2,this._y2=tt}};const curveCardinal=function et(tt){function nt(rt){return new Cardinal(rt,tt)}return nt.tension=function(rt){return et(+rt)},nt}(0);function CardinalClosed(et,tt){this._context=et,this._k=(1-tt)/6}CardinalClosed.prototype={areaStart:noop$b,areaEnd:noop$b,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1,this._x3=et,this._y3=tt;break;case 1:this._point=2,this._context.moveTo(this._x4=et,this._y4=tt);break;case 2:this._point=3,this._x5=et,this._y5=tt;break;default:point$6(this,et,tt);break}this._x0=this._x1,this._x1=this._x2,this._x2=et,this._y0=this._y1,this._y1=this._y2,this._y2=tt}};const curveCardinalClosed=function et(tt){function nt(rt){return new CardinalClosed(rt,tt)}return nt.tension=function(rt){return et(+rt)},nt}(0);function CardinalOpen(et,tt){this._context=et,this._k=(1-tt)/6}CardinalOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$6(this,et,tt);break}this._x0=this._x1,this._x1=this._x2,this._x2=et,this._y0=this._y1,this._y1=this._y2,this._y2=tt}};const curveCardinalOpen=function et(tt){function nt(rt){return new CardinalOpen(rt,tt)}return nt.tension=function(rt){return et(+rt)},nt}(0);function point$5(et,tt,nt){var rt=et._x1,ot=et._y1,st=et._x2,ut=et._y2;if(et._l01_a>epsilon$6){var ct=2*et._l01_2a+3*et._l01_a*et._l12_a+et._l12_2a,ft=3*et._l01_a*(et._l01_a+et._l12_a);rt=(rt*ct-et._x0*et._l12_2a+et._x2*et._l01_2a)/ft,ot=(ot*ct-et._y0*et._l12_2a+et._y2*et._l01_2a)/ft}if(et._l23_a>epsilon$6){var pt=2*et._l23_2a+3*et._l23_a*et._l12_a+et._l12_2a,ht=3*et._l23_a*(et._l23_a+et._l12_a);st=(st*pt+et._x1*et._l23_2a-tt*et._l12_2a)/ht,ut=(ut*pt+et._y1*et._l23_2a-nt*et._l12_2a)/ht}et._context.bezierCurveTo(rt,ot,st,ut,et._x2,et._y2)}function CatmullRom(et,tt){this._context=et,this._alpha=tt}CatmullRom.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){if(et=+et,tt=+tt,this._point){var nt=this._x2-et,rt=this._y2-tt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(nt*nt+rt*rt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(et,tt):this._context.moveTo(et,tt);break;case 1:this._point=2;break;case 2:this._point=3;default:point$5(this,et,tt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=et,this._y0=this._y1,this._y1=this._y2,this._y2=tt}};const curveCatmullRom=function et(tt){function nt(rt){return tt?new CatmullRom(rt,tt):new Cardinal(rt,0)}return nt.alpha=function(rt){return et(+rt)},nt}(.5);function CatmullRomClosed(et,tt){this._context=et,this._alpha=tt}CatmullRomClosed.prototype={areaStart:noop$b,areaEnd:noop$b,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(et,tt){if(et=+et,tt=+tt,this._point){var nt=this._x2-et,rt=this._y2-tt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(nt*nt+rt*rt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=et,this._y3=tt;break;case 1:this._point=2,this._context.moveTo(this._x4=et,this._y4=tt);break;case 2:this._point=3,this._x5=et,this._y5=tt;break;default:point$5(this,et,tt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=et,this._y0=this._y1,this._y1=this._y2,this._y2=tt}};const curveCatmullRomClosed=function et(tt){function nt(rt){return tt?new CatmullRomClosed(rt,tt):new CardinalClosed(rt,0)}return nt.alpha=function(rt){return et(+rt)},nt}(.5);function CatmullRomOpen(et,tt){this._context=et,this._alpha=tt}CatmullRomOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){if(et=+et,tt=+tt,this._point){var nt=this._x2-et,rt=this._y2-tt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(nt*nt+rt*rt,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$5(this,et,tt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=et,this._y0=this._y1,this._y1=this._y2,this._y2=tt}};const curveCatmullRomOpen=function et(tt){function nt(rt){return tt?new CatmullRomOpen(rt,tt):new CardinalOpen(rt,0)}return nt.alpha=function(rt){return et(+rt)},nt}(.5);function LinearClosed(et){this._context=et}LinearClosed.prototype={areaStart:noop$b,areaEnd:noop$b,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(et,tt){et=+et,tt=+tt,this._point?this._context.lineTo(et,tt):(this._point=1,this._context.moveTo(et,tt))}};function curveLinearClosed(et){return new LinearClosed(et)}function sign$1(et){return et<0?-1:1}function slope3(et,tt,nt){var rt=et._x1-et._x0,ot=tt-et._x1,st=(et._y1-et._y0)/(rt||ot<0&&-0),ut=(nt-et._y1)/(ot||rt<0&&-0),ct=(st*ot+ut*rt)/(rt+ot);return(sign$1(st)+sign$1(ut))*Math.min(Math.abs(st),Math.abs(ut),.5*Math.abs(ct))||0}function slope2(et,tt){var nt=et._x1-et._x0;return nt?(3*(et._y1-et._y0)/nt-tt)/2:tt}function point$4(et,tt,nt){var rt=et._x0,ot=et._y0,st=et._x1,ut=et._y1,ct=(st-rt)/3;et._context.bezierCurveTo(rt+ct,ot+ct*tt,st-ct,ut-ct*nt,st,ut)}function MonotoneX(et){this._context=et}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$4(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(et,tt){var nt=NaN;if(et=+et,tt=+tt,!(et===this._x1&&tt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(et,tt):this._context.moveTo(et,tt);break;case 1:this._point=2;break;case 2:this._point=3,point$4(this,slope2(this,nt=slope3(this,et,tt)),nt);break;default:point$4(this,this._t0,nt=slope3(this,et,tt));break}this._x0=this._x1,this._x1=et,this._y0=this._y1,this._y1=tt,this._t0=nt}}};function MonotoneY(et){this._context=new ReflectContext(et)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(et,tt){MonotoneX.prototype.point.call(this,tt,et)};function ReflectContext(et){this._context=et}ReflectContext.prototype={moveTo:function(et,tt){this._context.moveTo(tt,et)},closePath:function(){this._context.closePath()},lineTo:function(et,tt){this._context.lineTo(tt,et)},bezierCurveTo:function(et,tt,nt,rt,ot,st){this._context.bezierCurveTo(tt,et,rt,nt,st,ot)}};function monotoneX(et){return new MonotoneX(et)}function monotoneY(et){return new MonotoneY(et)}function Natural(et){this._context=et}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var et=this._x,tt=this._y,nt=et.length;if(nt)if(this._line?this._context.lineTo(et[0],tt[0]):this._context.moveTo(et[0],tt[0]),nt===2)this._context.lineTo(et[1],tt[1]);else for(var rt=controlPoints(et),ot=controlPoints(tt),st=0,ut=1;ut<nt;++st,++ut)this._context.bezierCurveTo(rt[0][st],ot[0][st],rt[1][st],ot[1][st],et[ut],tt[ut]);(this._line||this._line!==0&&nt===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(et,tt){this._x.push(+et),this._y.push(+tt)}};function controlPoints(et){var tt,nt=et.length-1,rt,ot=new Array(nt),st=new Array(nt),ut=new Array(nt);for(ot[0]=0,st[0]=2,ut[0]=et[0]+2*et[1],tt=1;tt<nt-1;++tt)ot[tt]=1,st[tt]=4,ut[tt]=4*et[tt]+2*et[tt+1];for(ot[nt-1]=2,st[nt-1]=7,ut[nt-1]=8*et[nt-1]+et[nt],tt=1;tt<nt;++tt)rt=ot[tt]/st[tt-1],st[tt]-=rt,ut[tt]-=rt*ut[tt-1];for(ot[nt-1]=ut[nt-1]/st[nt-1],tt=nt-2;tt>=0;--tt)ot[tt]=(ut[tt]-ot[tt+1])/st[tt];for(st[nt-1]=(et[nt]+ot[nt-1])/2,tt=0;tt<nt-1;++tt)st[tt]=2*et[tt+1]-ot[tt+1];return[ot,st]}function curveNatural(et){return new Natural(et)}function Step(et,tt){this._context=et,this._t=tt}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(et,tt){switch(et=+et,tt=+tt,this._point){case 0:this._point=1,this._line?this._context.lineTo(et,tt):this._context.moveTo(et,tt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,tt),this._context.lineTo(et,tt);else{var nt=this._x*(1-this._t)+et*this._t;this._context.lineTo(nt,this._y),this._context.lineTo(nt,tt)}break}}this._x=et,this._y=tt}};function curveStep(et){return new Step(et,.5)}function stepBefore(et){return new Step(et,0)}function stepAfter(et){return new Step(et,1)}function domCanvas(et,tt){if(typeof document<"u"&&document.createElement){const nt=document.createElement("canvas");if(nt&&nt.getContext)return nt.width=et,nt.height=tt,nt}return null}const domImage=()=>typeof Image<"u"?Image:null;function initRange(et,tt){switch(arguments.length){case 0:break;case 1:this.range(et);break;default:this.range(tt).domain(et);break}return this}function initInterpolator(et,tt){switch(arguments.length){case 0:break;case 1:{typeof et=="function"?this.interpolator(et):this.range(et);break}default:{this.domain(et),typeof tt=="function"?this.interpolator(tt):this.range(tt);break}}return this}const implicit=Symbol("implicit");function ordinal(){var et=new InternMap,tt=[],nt=[],rt=implicit;function ot(st){let ut=et.get(st);if(ut===void 0){if(rt!==implicit)return rt;et.set(st,ut=tt.push(st)-1)}return nt[ut%nt.length]}return ot.domain=function(st){if(!arguments.length)return tt.slice();tt=[],et=new InternMap;for(const ut of st)et.has(ut)||et.set(ut,tt.push(ut)-1);return ot},ot.range=function(st){return arguments.length?(nt=Array.from(st),ot):nt.slice()},ot.unknown=function(st){return arguments.length?(rt=st,ot):rt},ot.copy=function(){return ordinal(tt,nt).unknown(rt)},initRange.apply(ot,arguments),ot}function define(et,tt,nt){et.prototype=tt.prototype=nt,nt.constructor=et}function extend(et,tt){var nt=Object.create(et.prototype);for(var rt in tt)nt[rt]=tt[rt];return nt}function Color$1(){}var darker=.7,brighter=1/darker,reI="\\s*([+-]?\\d+)\\s*",reN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex=/^#([0-9a-f]{3,8})$/,reRgbInteger=new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),reRgbPercent=new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),reRgbaInteger=new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),reRgbaPercent=new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),reHslPercent=new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),reHslaPercent=new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`),named={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};define(Color$1,color$5,{copy(et){return Object.assign(new this.constructor,this,et)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:color_formatHex8,formatHsl:color_formatHsl,formatRgb:color_formatRgb,toString:color_formatRgb});function color_formatHex(){return this.rgb().formatHex()}function color_formatHex8(){return this.rgb().formatHex8()}function color_formatHsl(){return hslConvert(this).formatHsl()}function color_formatRgb(){return this.rgb().formatRgb()}function color$5(et){var tt,nt;return et=(et+"").trim().toLowerCase(),(tt=reHex.exec(et))?(nt=tt[1].length,tt=parseInt(tt[1],16),nt===6?rgbn(tt):nt===3?new Rgb(tt>>8&15|tt>>4&240,tt>>4&15|tt&240,(tt&15)<<4|tt&15,1):nt===8?rgba(tt>>24&255,tt>>16&255,tt>>8&255,(tt&255)/255):nt===4?rgba(tt>>12&15|tt>>8&240,tt>>8&15|tt>>4&240,tt>>4&15|tt&240,((tt&15)<<4|tt&15)/255):null):(tt=reRgbInteger.exec(et))?new Rgb(tt[1],tt[2],tt[3],1):(tt=reRgbPercent.exec(et))?new Rgb(tt[1]*255/100,tt[2]*255/100,tt[3]*255/100,1):(tt=reRgbaInteger.exec(et))?rgba(tt[1],tt[2],tt[3],tt[4]):(tt=reRgbaPercent.exec(et))?rgba(tt[1]*255/100,tt[2]*255/100,tt[3]*255/100,tt[4]):(tt=reHslPercent.exec(et))?hsla(tt[1],tt[2]/100,tt[3]/100,1):(tt=reHslaPercent.exec(et))?hsla(tt[1],tt[2]/100,tt[3]/100,tt[4]):named.hasOwnProperty(et)?rgbn(named[et]):et==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(et){return new Rgb(et>>16&255,et>>8&255,et&255,1)}function rgba(et,tt,nt,rt){return rt<=0&&(et=tt=nt=NaN),new Rgb(et,tt,nt,rt)}function rgbConvert(et){return et instanceof Color$1||(et=color$5(et)),et?(et=et.rgb(),new Rgb(et.r,et.g,et.b,et.opacity)):new Rgb}function rgb$1(et,tt,nt,rt){return arguments.length===1?rgbConvert(et):new Rgb(et,tt,nt,rt??1)}function Rgb(et,tt,nt,rt){this.r=+et,this.g=+tt,this.b=+nt,this.opacity=+rt}define(Rgb,rgb$1,extend(Color$1,{brighter(et){return et=et==null?brighter:Math.pow(brighter,et),new Rgb(this.r*et,this.g*et,this.b*et,this.opacity)},darker(et){return et=et==null?darker:Math.pow(darker,et),new Rgb(this.r*et,this.g*et,this.b*et,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const et=clampa(this.opacity);return`${et===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${et===1?")":`, ${et})`}`}function clampa(et){return isNaN(et)?1:Math.max(0,Math.min(1,et))}function clampi(et){return Math.max(0,Math.min(255,Math.round(et)||0))}function hex(et){return et=clampi(et),(et<16?"0":"")+et.toString(16)}function hsla(et,tt,nt,rt){return rt<=0?et=tt=nt=NaN:nt<=0||nt>=1?et=tt=NaN:tt<=0&&(et=NaN),new Hsl(et,tt,nt,rt)}function hslConvert(et){if(et instanceof Hsl)return new Hsl(et.h,et.s,et.l,et.opacity);if(et instanceof Color$1||(et=color$5(et)),!et)return new Hsl;if(et instanceof Hsl)return et;et=et.rgb();var tt=et.r/255,nt=et.g/255,rt=et.b/255,ot=Math.min(tt,nt,rt),st=Math.max(tt,nt,rt),ut=NaN,ct=st-ot,ft=(st+ot)/2;return ct?(tt===st?ut=(nt-rt)/ct+(nt<rt)*6:nt===st?ut=(rt-tt)/ct+2:ut=(tt-nt)/ct+4,ct/=ft<.5?st+ot:2-st-ot,ut*=60):ct=ft>0&&ft<1?0:ut,new Hsl(ut,ct,ft,et.opacity)}function hsl$2(et,tt,nt,rt){return arguments.length===1?hslConvert(et):new Hsl(et,tt,nt,rt??1)}function Hsl(et,tt,nt,rt){this.h=+et,this.s=+tt,this.l=+nt,this.opacity=+rt}define(Hsl,hsl$2,extend(Color$1,{brighter(et){return et=et==null?brighter:Math.pow(brighter,et),new Hsl(this.h,this.s,this.l*et,this.opacity)},darker(et){return et=et==null?darker:Math.pow(darker,et),new Hsl(this.h,this.s,this.l*et,this.opacity)},rgb(){var et=this.h%360+(this.h<0)*360,tt=isNaN(et)||isNaN(this.s)?0:this.s,nt=this.l,rt=nt+(nt<.5?nt:1-nt)*tt,ot=2*nt-rt;return new Rgb(hsl2rgb(et>=240?et-240:et+120,ot,rt),hsl2rgb(et,ot,rt),hsl2rgb(et<120?et+240:et-120,ot,rt),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const et=clampa(this.opacity);return`${et===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${et===1?")":`, ${et})`}`}}));function clamph(et){return et=(et||0)%360,et<0?et+360:et}function clampt(et){return Math.max(0,Math.min(1,et||0))}function hsl2rgb(et,tt,nt){return(et<60?tt+(nt-tt)*et/60:et<180?nt:et<240?tt+(nt-tt)*(240-et)/60:tt)*255}const radians$1=Math.PI/180,degrees$2=180/Math.PI,K=18,Xn=.96422,Yn=1,Zn=.82521,t0=4/29,t1=6/29,t2=3*t1*t1,t3=t1*t1*t1;function labConvert(et){if(et instanceof Lab)return new Lab(et.l,et.a,et.b,et.opacity);if(et instanceof Hcl)return hcl2lab(et);et instanceof Rgb||(et=rgbConvert(et));var tt=rgb2lrgb(et.r),nt=rgb2lrgb(et.g),rt=rgb2lrgb(et.b),ot=xyz2lab((.2225045*tt+.7168786*nt+.0606169*rt)/Yn),st,ut;return tt===nt&&nt===rt?st=ut=ot:(st=xyz2lab((.4360747*tt+.3850649*nt+.1430804*rt)/Xn),ut=xyz2lab((.0139322*tt+.0971045*nt+.7141733*rt)/Zn)),new Lab(116*ot-16,500*(st-ot),200*(ot-ut),et.opacity)}function lab$1(et,tt,nt,rt){return arguments.length===1?labConvert(et):new Lab(et,tt,nt,rt??1)}function Lab(et,tt,nt,rt){this.l=+et,this.a=+tt,this.b=+nt,this.opacity=+rt}define(Lab,lab$1,extend(Color$1,{brighter(et){return new Lab(this.l+K*(et??1),this.a,this.b,this.opacity)},darker(et){return new Lab(this.l-K*(et??1),this.a,this.b,this.opacity)},rgb(){var et=(this.l+16)/116,tt=isNaN(this.a)?et:et+this.a/500,nt=isNaN(this.b)?et:et-this.b/200;return tt=Xn*lab2xyz(tt),et=Yn*lab2xyz(et),nt=Zn*lab2xyz(nt),new Rgb(lrgb2rgb(3.1338561*tt-1.6168667*et-.4906146*nt),lrgb2rgb(-.9787684*tt+1.9161415*et+.033454*nt),lrgb2rgb(.0719453*tt-.2289914*et+1.4052427*nt),this.opacity)}}));function xyz2lab(et){return et>t3?Math.pow(et,1/3):et/t2+t0}function lab2xyz(et){return et>t1?et*et*et:t2*(et-t0)}function lrgb2rgb(et){return 255*(et<=.0031308?12.92*et:1.055*Math.pow(et,1/2.4)-.055)}function rgb2lrgb(et){return(et/=255)<=.04045?et/12.92:Math.pow((et+.055)/1.055,2.4)}function hclConvert(et){if(et instanceof Hcl)return new Hcl(et.h,et.c,et.l,et.opacity);if(et instanceof Lab||(et=labConvert(et)),et.a===0&&et.b===0)return new Hcl(NaN,0<et.l&&et.l<100?0:NaN,et.l,et.opacity);var tt=Math.atan2(et.b,et.a)*degrees$2;return new Hcl(tt<0?tt+360:tt,Math.sqrt(et.a*et.a+et.b*et.b),et.l,et.opacity)}function hcl$2(et,tt,nt,rt){return arguments.length===1?hclConvert(et):new Hcl(et,tt,nt,rt??1)}function Hcl(et,tt,nt,rt){this.h=+et,this.c=+tt,this.l=+nt,this.opacity=+rt}function hcl2lab(et){if(isNaN(et.h))return new Lab(et.l,0,0,et.opacity);var tt=et.h*radians$1;return new Lab(et.l,Math.cos(tt)*et.c,Math.sin(tt)*et.c,et.opacity)}define(Hcl,hcl$2,extend(Color$1,{brighter(et){return new Hcl(this.h,this.c,this.l+K*(et??1),this.opacity)},darker(et){return new Hcl(this.h,this.c,this.l-K*(et??1),this.opacity)},rgb(){return hcl2lab(this).rgb()}}));var A$1=-.14861,B$2=1.78277,C$2=-.29227,D$2=-.90649,E$1=1.97294,ED=E$1*D$2,EB=E$1*B$2,BC_DA=B$2*C$2-D$2*A$1;function cubehelixConvert(et){if(et instanceof Cubehelix)return new Cubehelix(et.h,et.s,et.l,et.opacity);et instanceof Rgb||(et=rgbConvert(et));var tt=et.r/255,nt=et.g/255,rt=et.b/255,ot=(BC_DA*rt+ED*tt-EB*nt)/(BC_DA+ED-EB),st=rt-ot,ut=(E$1*(nt-ot)-C$2*st)/D$2,ct=Math.sqrt(ut*ut+st*st)/(E$1*ot*(1-ot)),ft=ct?Math.atan2(ut,st)*degrees$2-120:NaN;return new Cubehelix(ft<0?ft+360:ft,ct,ot,et.opacity)}function cubehelix$2(et,tt,nt,rt){return arguments.length===1?cubehelixConvert(et):new Cubehelix(et,tt,nt,rt??1)}function Cubehelix(et,tt,nt,rt){this.h=+et,this.s=+tt,this.l=+nt,this.opacity=+rt}define(Cubehelix,cubehelix$2,extend(Color$1,{brighter(et){return et=et==null?brighter:Math.pow(brighter,et),new Cubehelix(this.h,this.s,this.l*et,this.opacity)},darker(et){return et=et==null?darker:Math.pow(darker,et),new Cubehelix(this.h,this.s,this.l*et,this.opacity)},rgb(){var et=isNaN(this.h)?0:(this.h+120)*radians$1,tt=+this.l,nt=isNaN(this.s)?0:this.s*tt*(1-tt),rt=Math.cos(et),ot=Math.sin(et);return new Rgb(255*(tt+nt*(A$1*rt+B$2*ot)),255*(tt+nt*(C$2*rt+D$2*ot)),255*(tt+nt*(E$1*rt)),this.opacity)}}));function basis(et,tt,nt,rt,ot){var st=et*et,ut=st*et;return((1-3*et+3*st-ut)*tt+(4-6*st+3*ut)*nt+(1+3*et+3*st-3*ut)*rt+ut*ot)/6}function basis$1(et){var tt=et.length-1;return function(nt){var rt=nt<=0?nt=0:nt>=1?(nt=1,tt-1):Math.floor(nt*tt),ot=et[rt],st=et[rt+1],ut=rt>0?et[rt-1]:2*ot-st,ct=rt<tt-1?et[rt+2]:2*st-ot;return basis((nt-rt/tt)*tt,ut,ot,st,ct)}}function basisClosed(et){var tt=et.length;return function(nt){var rt=Math.floor(((nt%=1)<0?++nt:nt)*tt),ot=et[(rt+tt-1)%tt],st=et[rt%tt],ut=et[(rt+1)%tt],ct=et[(rt+2)%tt];return basis((nt-rt/tt)*tt,ot,st,ut,ct)}}const constant$3=et=>()=>et;function linear$1(et,tt){return function(nt){return et+nt*tt}}function exponential(et,tt,nt){return et=Math.pow(et,nt),tt=Math.pow(tt,nt)-et,nt=1/nt,function(rt){return Math.pow(et+rt*tt,nt)}}function hue$1(et,tt){var nt=tt-et;return nt?linear$1(et,nt>180||nt<-180?nt-360*Math.round(nt/360):nt):constant$3(isNaN(et)?tt:et)}function gamma(et){return(et=+et)==1?nogamma:function(tt,nt){return nt-tt?exponential(tt,nt,et):constant$3(isNaN(tt)?nt:tt)}}function nogamma(et,tt){var nt=tt-et;return nt?linear$1(et,nt):constant$3(isNaN(et)?tt:et)}const rgb=function et(tt){var nt=gamma(tt);function rt(ot,st){var ut=nt((ot=rgb$1(ot)).r,(st=rgb$1(st)).r),ct=nt(ot.g,st.g),ft=nt(ot.b,st.b),pt=nogamma(ot.opacity,st.opacity);return function(ht){return ot.r=ut(ht),ot.g=ct(ht),ot.b=ft(ht),ot.opacity=pt(ht),ot+""}}return rt.gamma=et,rt}(1);function rgbSpline(et){return function(tt){var nt=tt.length,rt=new Array(nt),ot=new Array(nt),st=new Array(nt),ut,ct;for(ut=0;ut<nt;++ut)ct=rgb$1(tt[ut]),rt[ut]=ct.r||0,ot[ut]=ct.g||0,st[ut]=ct.b||0;return rt=et(rt),ot=et(ot),st=et(st),ct.opacity=1,function(ft){return ct.r=rt(ft),ct.g=ot(ft),ct.b=st(ft),ct+""}}}var rgbBasis=rgbSpline(basis$1),rgbBasisClosed=rgbSpline(basisClosed);function numberArray(et,tt){tt||(tt=[]);var nt=et?Math.min(tt.length,et.length):0,rt=tt.slice(),ot;return function(st){for(ot=0;ot<nt;++ot)rt[ot]=et[ot]*(1-st)+tt[ot]*st;return rt}}function isNumberArray(et){return ArrayBuffer.isView(et)&&!(et instanceof DataView)}function array$3(et,tt){return(isNumberArray(tt)?numberArray:genericArray)(et,tt)}function genericArray(et,tt){var nt=tt?tt.length:0,rt=et?Math.min(nt,et.length):0,ot=new Array(rt),st=new Array(nt),ut;for(ut=0;ut<rt;++ut)ot[ut]=interpolate$1$1(et[ut],tt[ut]);for(;ut<nt;++ut)st[ut]=tt[ut];return function(ct){for(ut=0;ut<rt;++ut)st[ut]=ot[ut](ct);return st}}function date$1(et,tt){var nt=new Date;return et=+et,tt=+tt,function(rt){return nt.setTime(et*(1-rt)+tt*rt),nt}}function interpolateNumber(et,tt){return et=+et,tt=+tt,function(nt){return et*(1-nt)+tt*nt}}function object(et,tt){var nt={},rt={},ot;(et===null||typeof et!="object")&&(et={}),(tt===null||typeof tt!="object")&&(tt={});for(ot in tt)ot in et?nt[ot]=interpolate$1$1(et[ot],tt[ot]):rt[ot]=tt[ot];return function(st){for(ot in nt)rt[ot]=nt[ot](st);return rt}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero$3(et){return function(){return et}}function one$1(et){return function(tt){return et(tt)+""}}function string(et,tt){var nt=reA.lastIndex=reB.lastIndex=0,rt,ot,st,ut=-1,ct=[],ft=[];for(et=et+"",tt=tt+"";(rt=reA.exec(et))&&(ot=reB.exec(tt));)(st=ot.index)>nt&&(st=tt.slice(nt,st),ct[ut]?ct[ut]+=st:ct[++ut]=st),(rt=rt[0])===(ot=ot[0])?ct[ut]?ct[ut]+=ot:ct[++ut]=ot:(ct[++ut]=null,ft.push({i:ut,x:interpolateNumber(rt,ot)})),nt=reB.lastIndex;return nt<tt.length&&(st=tt.slice(nt),ct[ut]?ct[ut]+=st:ct[++ut]=st),ct.length<2?ft[0]?one$1(ft[0].x):zero$3(tt):(tt=ft.length,function(pt){for(var ht=0,mt;ht<tt;++ht)ct[(mt=ft[ht]).i]=mt.x(pt);return ct.join("")})}function interpolate$1$1(et,tt){var nt=typeof tt,rt;return tt==null||nt==="boolean"?constant$3(tt):(nt==="number"?interpolateNumber:nt==="string"?(rt=color$5(tt))?(tt=rt,rgb):string:tt instanceof color$5?rgb:tt instanceof Date?date$1:isNumberArray(tt)?numberArray:Array.isArray(tt)?genericArray:typeof tt.valueOf!="function"&&typeof tt.toString!="function"||isNaN(tt)?object:interpolateNumber)(et,tt)}function discrete$1(et){var tt=et.length;return function(nt){return et[Math.max(0,Math.min(tt-1,Math.floor(nt*tt)))]}}function hue(et,tt){var nt=hue$1(+et,+tt);return function(rt){var ot=nt(rt);return ot-360*Math.floor(ot/360)}}function interpolateRound(et,tt){return et=+et,tt=+tt,function(nt){return Math.round(et*(1-nt)+tt*nt)}}var degrees$1=180/Math.PI,identity$3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose(et,tt,nt,rt,ot,st){var ut,ct,ft;return(ut=Math.sqrt(et*et+tt*tt))&&(et/=ut,tt/=ut),(ft=et*nt+tt*rt)&&(nt-=et*ft,rt-=tt*ft),(ct=Math.sqrt(nt*nt+rt*rt))&&(nt/=ct,rt/=ct,ft/=ct),et*rt<tt*nt&&(et=-et,tt=-tt,ft=-ft,ut=-ut),{translateX:ot,translateY:st,rotate:Math.atan2(tt,et)*degrees$1,skewX:Math.atan(ft)*degrees$1,scaleX:ut,scaleY:ct}}var svgNode;function parseCss(et){const tt=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(et+"");return tt.isIdentity?identity$3:decompose(tt.a,tt.b,tt.c,tt.d,tt.e,tt.f)}function parseSvg(et){return et==null||(svgNode||(svgNode=document.createElementNS("http://www.w3.org/2000/svg","g")),svgNode.setAttribute("transform",et),!(et=svgNode.transform.baseVal.consolidate()))?identity$3:(et=et.matrix,decompose(et.a,et.b,et.c,et.d,et.e,et.f))}function interpolateTransform(et,tt,nt,rt){function ot(pt){return pt.length?pt.pop()+" ":""}function st(pt,ht,mt,yt,vt,Tt){if(pt!==mt||ht!==yt){var Et=vt.push("translate(",null,tt,null,nt);Tt.push({i:Et-4,x:interpolateNumber(pt,mt)},{i:Et-2,x:interpolateNumber(ht,yt)})}else(mt||yt)&&vt.push("translate("+mt+tt+yt+nt)}function ut(pt,ht,mt,yt){pt!==ht?(pt-ht>180?ht+=360:ht-pt>180&&(pt+=360),yt.push({i:mt.push(ot(mt)+"rotate(",null,rt)-2,x:interpolateNumber(pt,ht)})):ht&&mt.push(ot(mt)+"rotate("+ht+rt)}function ct(pt,ht,mt,yt){pt!==ht?yt.push({i:mt.push(ot(mt)+"skewX(",null,rt)-2,x:interpolateNumber(pt,ht)}):ht&&mt.push(ot(mt)+"skewX("+ht+rt)}function ft(pt,ht,mt,yt,vt,Tt){if(pt!==mt||ht!==yt){var Et=vt.push(ot(vt)+"scale(",null,",",null,")");Tt.push({i:Et-4,x:interpolateNumber(pt,mt)},{i:Et-2,x:interpolateNumber(ht,yt)})}else(mt!==1||yt!==1)&&vt.push(ot(vt)+"scale("+mt+","+yt+")")}return function(pt,ht){var mt=[],yt=[];return pt=et(pt),ht=et(ht),st(pt.translateX,pt.translateY,ht.translateX,ht.translateY,mt,yt),ut(pt.rotate,ht.rotate,mt,yt),ct(pt.skewX,ht.skewX,mt,yt),ft(pt.scaleX,pt.scaleY,ht.scaleX,ht.scaleY,mt,yt),pt=ht=null,function(vt){for(var Tt=-1,Et=yt.length,xt;++Tt<Et;)mt[(xt=yt[Tt]).i]=xt.x(vt);return mt.join("")}}}var interpolateTransformCss=interpolateTransform(parseCss,"px, ","px)","deg)"),interpolateTransformSvg=interpolateTransform(parseSvg,", ",")",")"),epsilon2$1=1e-12;function cosh(et){return((et=Math.exp(et))+1/et)/2}function sinh(et){return((et=Math.exp(et))-1/et)/2}function tanh(et){return((et=Math.exp(2*et))-1)/(et+1)}const zoom$1=function et(tt,nt,rt){function ot(st,ut){var ct=st[0],ft=st[1],pt=st[2],ht=ut[0],mt=ut[1],yt=ut[2],vt=ht-ct,Tt=mt-ft,Et=vt*vt+Tt*Tt,xt,At;if(Et<epsilon2$1)At=Math.log(yt/pt)/tt,xt=function(kt){return[ct+kt*vt,ft+kt*Tt,pt*Math.exp(tt*kt*At)]};else{var Ct=Math.sqrt(Et),$t=(yt*yt-pt*pt+rt*Et)/(2*pt*nt*Ct),Ot=(yt*yt-pt*pt-rt*Et)/(2*yt*nt*Ct),Rt=Math.log(Math.sqrt($t*$t+1)-$t),It=Math.log(Math.sqrt(Ot*Ot+1)-Ot);At=(It-Rt)/tt,xt=function(kt){var Mt=kt*At,Ft=cosh(Rt),zt=pt/(nt*Ct)*(Ft*tanh(tt*Mt+Rt)-sinh(Rt));return[ct+zt*vt,ft+zt*Tt,pt*Ft/cosh(tt*Mt+Rt)]}}return xt.duration=At*1e3*tt/Math.SQRT2,xt}return ot.rho=function(st){var ut=Math.max(.001,+st),ct=ut*ut,ft=ct*ct;return et(ut,ct,ft)},ot}(Math.SQRT2,2,4);function hsl(et){return function(tt,nt){var rt=et((tt=hsl$2(tt)).h,(nt=hsl$2(nt)).h),ot=nogamma(tt.s,nt.s),st=nogamma(tt.l,nt.l),ut=nogamma(tt.opacity,nt.opacity);return function(ct){return tt.h=rt(ct),tt.s=ot(ct),tt.l=st(ct),tt.opacity=ut(ct),tt+""}}}const hsl$1=hsl(hue$1);var hslLong=hsl(nogamma);function lab(et,tt){var nt=nogamma((et=lab$1(et)).l,(tt=lab$1(tt)).l),rt=nogamma(et.a,tt.a),ot=nogamma(et.b,tt.b),st=nogamma(et.opacity,tt.opacity);return function(ut){return et.l=nt(ut),et.a=rt(ut),et.b=ot(ut),et.opacity=st(ut),et+""}}function hcl(et){return function(tt,nt){var rt=et((tt=hcl$2(tt)).h,(nt=hcl$2(nt)).h),ot=nogamma(tt.c,nt.c),st=nogamma(tt.l,nt.l),ut=nogamma(tt.opacity,nt.opacity);return function(ct){return tt.h=rt(ct),tt.c=ot(ct),tt.l=st(ct),tt.opacity=ut(ct),tt+""}}}const hcl$1=hcl(hue$1);var hclLong=hcl(nogamma);function cubehelix(et){return function tt(nt){nt=+nt;function rt(ot,st){var ut=et((ot=cubehelix$2(ot)).h,(st=cubehelix$2(st)).h),ct=nogamma(ot.s,st.s),ft=nogamma(ot.l,st.l),pt=nogamma(ot.opacity,st.opacity);return function(ht){return ot.h=ut(ht),ot.s=ct(ht),ot.l=ft(Math.pow(ht,nt)),ot.opacity=pt(ht),ot+""}}return rt.gamma=tt,rt}(1)}const cubehelix$1=cubehelix(hue$1);var cubehelixLong=cubehelix(nogamma);function piecewise(et,tt){tt===void 0&&(tt=et,et=interpolate$1$1);for(var nt=0,rt=tt.length-1,ot=tt[0],st=new Array(rt<0?0:rt);nt<rt;)st[nt]=et(ot,ot=tt[++nt]);return function(ut){var ct=Math.max(0,Math.min(rt-1,Math.floor(ut*=rt)));return st[ct](ut-ct)}}function quantize$2(et,tt){for(var nt=new Array(tt),rt=0;rt<tt;++rt)nt[rt]=et(rt/(tt-1));return nt}const $$1=Object.freeze(Object.defineProperty({__proto__:null,interpolate:interpolate$1$1,interpolateArray:array$3,interpolateBasis:basis$1,interpolateBasisClosed:basisClosed,interpolateDate:date$1,interpolateDiscrete:discrete$1,interpolateHue:hue,interpolateNumber,interpolateNumberArray:numberArray,interpolateObject:object,interpolateRound,interpolateString:string,interpolateTransformCss,interpolateTransformSvg,interpolateZoom:zoom$1,interpolateRgb:rgb,interpolateRgbBasis:rgbBasis,interpolateRgbBasisClosed:rgbBasisClosed,interpolateHsl:hsl$1,interpolateHslLong:hslLong,interpolateLab:lab,interpolateHcl:hcl$1,interpolateHclLong:hclLong,interpolateCubehelix:cubehelix$1,interpolateCubehelixLong:cubehelixLong,piecewise,quantize:quantize$2},Symbol.toStringTag,{value:"Module"}));function constants$1(et){return function(){return et}}function number$5(et){return+et}var unit=[0,1];function identity$2(et){return et}function normalize$2(et,tt){return(tt-=et=+et)?function(nt){return(nt-et)/tt}:constants$1(isNaN(tt)?NaN:.5)}function clamper(et,tt){var nt;return et>tt&&(nt=et,et=tt,tt=nt),function(rt){return Math.max(et,Math.min(tt,rt))}}function bimap(et,tt,nt){var rt=et[0],ot=et[1],st=tt[0],ut=tt[1];return ot<rt?(rt=normalize$2(ot,rt),st=nt(ut,st)):(rt=normalize$2(rt,ot),st=nt(st,ut)),function(ct){return st(rt(ct))}}function polymap(et,tt,nt){var rt=Math.min(et.length,tt.length)-1,ot=new Array(rt),st=new Array(rt),ut=-1;for(et[rt]<et[0]&&(et=et.slice().reverse(),tt=tt.slice().reverse());++ut<rt;)ot[ut]=normalize$2(et[ut],et[ut+1]),st[ut]=nt(tt[ut],tt[ut+1]);return function(ct){var ft=bisect$1(et,ct,1,rt)-1;return st[ft](ot[ft](ct))}}function copy$2(et,tt){return tt.domain(et.domain()).range(et.range()).interpolate(et.interpolate()).clamp(et.clamp()).unknown(et.unknown())}function transformer$3(){var et=unit,tt=unit,nt=interpolate$1$1,rt,ot,st,ut=identity$2,ct,ft,pt;function ht(){var yt=Math.min(et.length,tt.length);return ut!==identity$2&&(ut=clamper(et[0],et[yt-1])),ct=yt>2?polymap:bimap,ft=pt=null,mt}function mt(yt){return yt==null||isNaN(yt=+yt)?st:(ft||(ft=ct(et.map(rt),tt,nt)))(rt(ut(yt)))}return mt.invert=function(yt){return ut(ot((pt||(pt=ct(tt,et.map(rt),interpolateNumber)))(yt)))},mt.domain=function(yt){return arguments.length?(et=Array.from(yt,number$5),ht()):et.slice()},mt.range=function(yt){return arguments.length?(tt=Array.from(yt),ht()):tt.slice()},mt.rangeRound=function(yt){return tt=Array.from(yt),nt=interpolateRound,ht()},mt.clamp=function(yt){return arguments.length?(ut=yt?!0:identity$2,ht()):ut!==identity$2},mt.interpolate=function(yt){return arguments.length?(nt=yt,ht()):nt},mt.unknown=function(yt){return arguments.length?(st=yt,mt):st},function(yt,vt){return rt=yt,ot=vt,ht()}}function continuous$1(){return transformer$3()(identity$2,identity$2)}function tickFormat$1(et,tt,nt,rt){var ot=tickStep(et,tt,nt),st;switch(rt=formatSpecifier(rt??",f"),rt.type){case"s":{var ut=Math.max(Math.abs(et),Math.abs(tt));return rt.precision==null&&!isNaN(st=precisionPrefix(ot,ut))&&(rt.precision=st),formatPrefix(rt,ut)}case"":case"e":case"g":case"p":case"r":{rt.precision==null&&!isNaN(st=precisionRound(ot,Math.max(Math.abs(et),Math.abs(tt))))&&(rt.precision=st-(rt.type==="e"));break}case"f":case"%":{rt.precision==null&&!isNaN(st=precisionFixed(ot))&&(rt.precision=st-(rt.type==="%")*2);break}}return format$3(rt)}function linearish(et){var tt=et.domain;return et.ticks=function(nt){var rt=tt();return ticks(rt[0],rt[rt.length-1],nt??10)},et.tickFormat=function(nt,rt){var ot=tt();return tickFormat$1(ot[0],ot[ot.length-1],nt??10,rt)},et.nice=function(nt){nt==null&&(nt=10);var rt=tt(),ot=0,st=rt.length-1,ut=rt[ot],ct=rt[st],ft,pt,ht=10;for(ct<ut&&(pt=ut,ut=ct,ct=pt,pt=ot,ot=st,st=pt);ht-- >0;){if(pt=tickIncrement(ut,ct,nt),pt===ft)return rt[ot]=ut,rt[st]=ct,tt(rt);if(pt>0)ut=Math.floor(ut/pt)*pt,ct=Math.ceil(ct/pt)*pt;else if(pt<0)ut=Math.ceil(ut*pt)/pt,ct=Math.floor(ct*pt)/pt;else break;ft=pt}return et},et}function linear(){var et=continuous$1();return et.copy=function(){return copy$2(et,linear())},initRange.apply(et,arguments),linearish(et)}function identity$1(et){var tt;function nt(rt){return rt==null||isNaN(rt=+rt)?tt:rt}return nt.invert=nt,nt.domain=nt.range=function(rt){return arguments.length?(et=Array.from(rt,number$5),nt):et.slice()},nt.unknown=function(rt){return arguments.length?(tt=rt,nt):tt},nt.copy=function(){return identity$1(et).unknown(tt)},et=arguments.length?Array.from(et,number$5):[0,1],linearish(nt)}function nice$1(et,tt){et=et.slice();var nt=0,rt=et.length-1,ot=et[nt],st=et[rt],ut;return st<ot&&(ut=nt,nt=rt,rt=ut,ut=ot,ot=st,st=ut),et[nt]=tt.floor(ot),et[rt]=tt.ceil(st),et}function transformLog(et){return Math.log(et)}function transformExp(et){return Math.exp(et)}function transformLogn(et){return-Math.log(-et)}function transformExpn(et){return-Math.exp(-et)}function pow10(et){return isFinite(et)?+("1e"+et):et<0?0:et}function powp(et){return et===10?pow10:et===Math.E?Math.exp:tt=>Math.pow(et,tt)}function logp(et){return et===Math.E?Math.log:et===10&&Math.log10||et===2&&Math.log2||(et=Math.log(et),tt=>Math.log(tt)/et)}function reflect(et){return(tt,nt)=>-et(-tt,nt)}function loggish(et){const tt=et(transformLog,transformExp),nt=tt.domain;let rt=10,ot,st;function ut(){return ot=logp(rt),st=powp(rt),nt()[0]<0?(ot=reflect(ot),st=reflect(st),et(transformLogn,transformExpn)):et(transformLog,transformExp),tt}return tt.base=function(ct){return arguments.length?(rt=+ct,ut()):rt},tt.domain=function(ct){return arguments.length?(nt(ct),ut()):nt()},tt.ticks=ct=>{const ft=nt();let pt=ft[0],ht=ft[ft.length-1];const mt=ht<pt;mt&&([pt,ht]=[ht,pt]);let yt=ot(pt),vt=ot(ht),Tt,Et;const xt=ct==null?10:+ct;let At=[];if(!(rt%1)&&vt-yt<xt){if(yt=Math.floor(yt),vt=Math.ceil(vt),pt>0){for(;yt<=vt;++yt)for(Tt=1;Tt<rt;++Tt)if(Et=yt<0?Tt/st(-yt):Tt*st(yt),!(Et<pt)){if(Et>ht)break;At.push(Et)}}else for(;yt<=vt;++yt)for(Tt=rt-1;Tt>=1;--Tt)if(Et=yt>0?Tt/st(-yt):Tt*st(yt),!(Et<pt)){if(Et>ht)break;At.push(Et)}At.length*2<xt&&(At=ticks(pt,ht,xt))}else At=ticks(yt,vt,Math.min(vt-yt,xt)).map(st);return mt?At.reverse():At},tt.tickFormat=(ct,ft)=>{if(ct==null&&(ct=10),ft==null&&(ft=rt===10?"s":","),typeof ft!="function"&&(!(rt%1)&&(ft=formatSpecifier(ft)).precision==null&&(ft.trim=!0),ft=format$3(ft)),ct===1/0)return ft;const pt=Math.max(1,rt*ct/tt.ticks().length);return ht=>{let mt=ht/st(Math.round(ot(ht)));return mt*rt<rt-.5&&(mt*=rt),mt<=pt?ft(ht):""}},tt.nice=()=>nt(nice$1(nt(),{floor:ct=>st(Math.floor(ot(ct))),ceil:ct=>st(Math.ceil(ot(ct)))})),tt}function log$4(){const et=loggish(transformer$3()).domain([1,10]);return et.copy=()=>copy$2(et,log$4()).base(et.base()),initRange.apply(et,arguments),et}function transformSymlog(et){return function(tt){return Math.sign(tt)*Math.log1p(Math.abs(tt/et))}}function transformSymexp(et){return function(tt){return Math.sign(tt)*Math.expm1(Math.abs(tt))*et}}function symlogish(et){var tt=1,nt=et(transformSymlog(tt),transformSymexp(tt));return nt.constant=function(rt){return arguments.length?et(transformSymlog(tt=+rt),transformSymexp(tt)):tt},linearish(nt)}function symlog(){var et=symlogish(transformer$3());return et.copy=function(){return copy$2(et,symlog()).constant(et.constant())},initRange.apply(et,arguments)}function transformPow(et){return function(tt){return tt<0?-Math.pow(-tt,et):Math.pow(tt,et)}}function transformSqrt(et){return et<0?-Math.sqrt(-et):Math.sqrt(et)}function transformSquare(et){return et<0?-et*et:et*et}function powish(et){var tt=et(identity$2,identity$2),nt=1;function rt(){return nt===1?et(identity$2,identity$2):nt===.5?et(transformSqrt,transformSquare):et(transformPow(nt),transformPow(1/nt))}return tt.exponent=function(ot){return arguments.length?(nt=+ot,rt()):nt},linearish(tt)}function pow$2(){var et=powish(transformer$3());return et.copy=function(){return copy$2(et,pow$2()).exponent(et.exponent())},initRange.apply(et,arguments),et}function sqrt$2(){return pow$2.apply(null,arguments).exponent(.5)}function quantile(){var et=[],tt=[],nt=[],rt;function ot(){var ut=0,ct=Math.max(1,tt.length);for(nt=new Array(ct-1);++ut<ct;)nt[ut-1]=quantileSorted(et,ut/ct);return st}function st(ut){return ut==null||isNaN(ut=+ut)?rt:tt[bisect$1(nt,ut)]}return st.invertExtent=function(ut){var ct=tt.indexOf(ut);return ct<0?[NaN,NaN]:[ct>0?nt[ct-1]:et[0],ct<nt.length?nt[ct]:et[et.length-1]]},st.domain=function(ut){if(!arguments.length)return et.slice();et=[];for(let ct of ut)ct!=null&&!isNaN(ct=+ct)&&et.push(ct);return et.sort(ascending$2),ot()},st.range=function(ut){return arguments.length?(tt=Array.from(ut),ot()):tt.slice()},st.unknown=function(ut){return arguments.length?(rt=ut,st):rt},st.quantiles=function(){return nt.slice()},st.copy=function(){return quantile().domain(et).range(tt).unknown(rt)},initRange.apply(st,arguments)}function quantize$1(){var et=0,tt=1,nt=1,rt=[.5],ot=[0,1],st;function ut(ft){return ft!=null&&ft<=ft?ot[bisect$1(rt,ft,0,nt)]:st}function ct(){var ft=-1;for(rt=new Array(nt);++ft<nt;)rt[ft]=((ft+1)*tt-(ft-nt)*et)/(nt+1);return ut}return ut.domain=function(ft){return arguments.length?([et,tt]=ft,et=+et,tt=+tt,ct()):[et,tt]},ut.range=function(ft){return arguments.length?(nt=(ot=Array.from(ft)).length-1,ct()):ot.slice()},ut.invertExtent=function(ft){var pt=ot.indexOf(ft);return pt<0?[NaN,NaN]:pt<1?[et,rt[0]]:pt>=nt?[rt[nt-1],tt]:[rt[pt-1],rt[pt]]},ut.unknown=function(ft){return arguments.length&&(st=ft),ut},ut.thresholds=function(){return rt.slice()},ut.copy=function(){return quantize$1().domain([et,tt]).range(ot).unknown(st)},initRange.apply(linearish(ut),arguments)}function threshold(){var et=[.5],tt=[0,1],nt,rt=1;function ot(st){return st!=null&&st<=st?tt[bisect$1(et,st,0,rt)]:nt}return ot.domain=function(st){return arguments.length?(et=Array.from(st),rt=Math.min(et.length,tt.length-1),ot):et.slice()},ot.range=function(st){return arguments.length?(tt=Array.from(st),rt=Math.min(et.length,tt.length-1),ot):tt.slice()},ot.invertExtent=function(st){var ut=tt.indexOf(st);return[et[ut-1],et[ut]]},ot.unknown=function(st){return arguments.length?(nt=st,ot):nt},ot.copy=function(){return threshold().domain(et).range(tt).unknown(nt)},initRange.apply(ot,arguments)}function date(et){return new Date(et)}function number$4(et){return et instanceof Date?+et:+new Date(+et)}function calendar(et,tt,nt,rt,ot,st,ut,ct,ft,pt){var ht=continuous$1(),mt=ht.invert,yt=ht.domain,vt=pt(".%L"),Tt=pt(":%S"),Et=pt("%I:%M"),xt=pt("%I %p"),At=pt("%a %d"),Ct=pt("%b %d"),$t=pt("%B"),Ot=pt("%Y");function Rt(It){return(ft(It)<It?vt:ct(It)<It?Tt:ut(It)<It?Et:st(It)<It?xt:rt(It)<It?ot(It)<It?At:Ct:nt(It)<It?$t:Ot)(It)}return ht.invert=function(It){return new Date(mt(It))},ht.domain=function(It){return arguments.length?yt(Array.from(It,number$4)):yt().map(date)},ht.ticks=function(It){var kt=yt();return et(kt[0],kt[kt.length-1],It??10)},ht.tickFormat=function(It,kt){return kt==null?Rt:pt(kt)},ht.nice=function(It){var kt=yt();return(!It||typeof It.range!="function")&&(It=tt(kt[0],kt[kt.length-1],It??10)),It?yt(nice$1(kt,It)):ht},ht.copy=function(){return copy$2(ht,calendar(et,tt,nt,rt,ot,st,ut,ct,ft,pt))},ht}function time$1(){return initRange.apply(calendar(timeTicks,timeTickInterval,timeYear,timeMonth,timeSunday,timeDay,timeHour,timeMinute,second,timeFormat$2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function utcTime(){return initRange.apply(calendar(utcTicks,utcTickInterval,utcYear,utcMonth,utcSunday,utcDay,utcHour,utcMinute,second,utcFormat$1).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function transformer$2(){var et=0,tt=1,nt,rt,ot,st,ut=identity$2,ct=!1,ft;function pt(mt){return mt==null||isNaN(mt=+mt)?ft:ut(ot===0?.5:(mt=(st(mt)-nt)*ot,ct?Math.max(0,Math.min(1,mt)):mt))}pt.domain=function(mt){return arguments.length?([et,tt]=mt,nt=st(et=+et),rt=st(tt=+tt),ot=nt===rt?0:1/(rt-nt),pt):[et,tt]},pt.clamp=function(mt){return arguments.length?(ct=!!mt,pt):ct},pt.interpolator=function(mt){return arguments.length?(ut=mt,pt):ut};function ht(mt){return function(yt){var vt,Tt;return arguments.length?([vt,Tt]=yt,ut=mt(vt,Tt),pt):[ut(0),ut(1)]}}return pt.range=ht(interpolate$1$1),pt.rangeRound=ht(interpolateRound),pt.unknown=function(mt){return arguments.length?(ft=mt,pt):ft},function(mt){return st=mt,nt=mt(et),rt=mt(tt),ot=nt===rt?0:1/(rt-nt),pt}}function copy$1(et,tt){return tt.domain(et.domain()).interpolator(et.interpolator()).clamp(et.clamp()).unknown(et.unknown())}function sequential(){var et=linearish(transformer$2()(identity$2));return et.copy=function(){return copy$1(et,sequential())},initInterpolator.apply(et,arguments)}function sequentialLog(){var et=loggish(transformer$2()).domain([1,10]);return et.copy=function(){return copy$1(et,sequentialLog()).base(et.base())},initInterpolator.apply(et,arguments)}function sequentialSymlog(){var et=symlogish(transformer$2());return et.copy=function(){return copy$1(et,sequentialSymlog()).constant(et.constant())},initInterpolator.apply(et,arguments)}function sequentialPow(){var et=powish(transformer$2());return et.copy=function(){return copy$1(et,sequentialPow()).exponent(et.exponent())},initInterpolator.apply(et,arguments)}function sequentialSqrt(){return sequentialPow.apply(null,arguments).exponent(.5)}function transformer$1(){var et=0,tt=.5,nt=1,rt=1,ot,st,ut,ct,ft,pt=identity$2,ht,mt=!1,yt;function vt(Et){return isNaN(Et=+Et)?yt:(Et=.5+((Et=+ht(Et))-st)*(rt*Et<rt*st?ct:ft),pt(mt?Math.max(0,Math.min(1,Et)):Et))}vt.domain=function(Et){return arguments.length?([et,tt,nt]=Et,ot=ht(et=+et),st=ht(tt=+tt),ut=ht(nt=+nt),ct=ot===st?0:.5/(st-ot),ft=st===ut?0:.5/(ut-st),rt=st<ot?-1:1,vt):[et,tt,nt]},vt.clamp=function(Et){return arguments.length?(mt=!!Et,vt):mt},vt.interpolator=function(Et){return arguments.length?(pt=Et,vt):pt};function Tt(Et){return function(xt){var At,Ct,$t;return arguments.length?([At,Ct,$t]=xt,pt=piecewise(Et,[At,Ct,$t]),vt):[pt(0),pt(.5),pt(1)]}}return vt.range=Tt(interpolate$1$1),vt.rangeRound=Tt(interpolateRound),vt.unknown=function(Et){return arguments.length?(yt=Et,vt):yt},function(Et){return ht=Et,ot=Et(et),st=Et(tt),ut=Et(nt),ct=ot===st?0:.5/(st-ot),ft=st===ut?0:.5/(ut-st),rt=st<ot?-1:1,vt}}function diverging(){var et=linearish(transformer$1()(identity$2));return et.copy=function(){return copy$1(et,diverging())},initInterpolator.apply(et,arguments)}function divergingLog(){var et=loggish(transformer$1()).domain([.1,1,10]);return et.copy=function(){return copy$1(et,divergingLog()).base(et.base())},initInterpolator.apply(et,arguments)}function divergingSymlog(){var et=symlogish(transformer$1());return et.copy=function(){return copy$1(et,divergingSymlog()).constant(et.constant())},initInterpolator.apply(et,arguments)}function divergingPow(){var et=powish(transformer$1());return et.copy=function(){return copy$1(et,divergingPow()).exponent(et.exponent())},initInterpolator.apply(et,arguments)}function divergingSqrt(){return divergingPow.apply(null,arguments).exponent(.5)}function bandSpace(et,tt,nt){const rt=et-tt+nt*2;return et?rt>0?rt:1:0}const Identity$1="identity",Linear="linear",Log="log",Pow="pow",Sqrt="sqrt",Symlog="symlog",Time="time",UTC="utc",Sequential="sequential",Diverging="diverging",Quantile="quantile",Quantize="quantize",Threshold="threshold",Ordinal="ordinal",Point="point",Band="band",BinOrdinal="bin-ordinal",Continuous="continuous",Discrete$1="discrete",Discretizing="discretizing",Interpolating="interpolating",Temporal="temporal";function invertRange(et){return function(tt){let nt=tt[0],rt=tt[1],ot;return rt<nt&&(ot=nt,nt=rt,rt=ot),[et.invert(nt),et.invert(rt)]}}function invertRangeExtent(et){return function(tt){const nt=et.range();let rt=tt[0],ot=tt[1],st=-1,ut,ct,ft,pt;for(ot<rt&&(ct=rt,rt=ot,ot=ct),ft=0,pt=nt.length;ft<pt;++ft)nt[ft]>=rt&&nt[ft]<=ot&&(st<0&&(st=ft),ut=ft);if(!(st<0))return rt=et.invertExtent(nt[st]),ot=et.invertExtent(nt[ut]),[rt[0]===void 0?rt[1]:rt[0],ot[1]===void 0?ot[0]:ot[1]]}}function band(){const et=ordinal().unknown(void 0),tt=et.domain,nt=et.range;let rt=[0,1],ot,st,ut=!1,ct=0,ft=0,pt=.5;delete et.unknown;function ht(){const mt=tt().length,yt=rt[1]<rt[0],vt=rt[1-yt],Tt=bandSpace(mt,ct,ft);let Et=rt[yt-0];ot=(vt-Et)/(Tt||1),ut&&(ot=Math.floor(ot)),Et+=(vt-Et-ot*(mt-ct))*pt,st=ot*(1-ct),ut&&(Et=Math.round(Et),st=Math.round(st));const xt=range$4(mt).map(At=>Et+ot*At);return nt(yt?xt.reverse():xt)}return et.domain=function(mt){return arguments.length?(tt(mt),ht()):tt()},et.range=function(mt){return arguments.length?(rt=[+mt[0],+mt[1]],ht()):rt.slice()},et.rangeRound=function(mt){return rt=[+mt[0],+mt[1]],ut=!0,ht()},et.bandwidth=function(){return st},et.step=function(){return ot},et.round=function(mt){return arguments.length?(ut=!!mt,ht()):ut},et.padding=function(mt){return arguments.length?(ft=Math.max(0,Math.min(1,mt)),ct=ft,ht()):ct},et.paddingInner=function(mt){return arguments.length?(ct=Math.max(0,Math.min(1,mt)),ht()):ct},et.paddingOuter=function(mt){return arguments.length?(ft=Math.max(0,Math.min(1,mt)),ht()):ft},et.align=function(mt){return arguments.length?(pt=Math.max(0,Math.min(1,mt)),ht()):pt},et.invertRange=function(mt){if(mt[0]==null||mt[1]==null)return;const yt=rt[1]<rt[0],vt=yt?nt().reverse():nt(),Tt=vt.length-1;let Et=+mt[0],xt=+mt[1],At,Ct,$t;if(!(Et!==Et||xt!==xt)&&(xt<Et&&($t=Et,Et=xt,xt=$t),!(xt<vt[0]||Et>rt[1-yt])))return At=Math.max(0,bisectRight$1(vt,Et)-1),Ct=Et===xt?At:bisectRight$1(vt,xt)-1,Et-vt[At]>st+1e-10&&++At,yt&&($t=At,At=Tt-Ct,Ct=Tt-$t),At>Ct?void 0:tt().slice(At,Ct+1)},et.invert=function(mt){const yt=et.invertRange([mt,mt]);return yt&&yt[0]},et.copy=function(){return band().domain(tt()).range(rt).round(ut).paddingInner(ct).paddingOuter(ft).align(pt)},ht()}function pointish(et){const tt=et.copy;return et.padding=et.paddingOuter,delete et.paddingInner,et.copy=function(){return pointish(tt())},et}function point$3(){return pointish(band().paddingInner(1))}var map=Array.prototype.map;function numbers(et){return map.call(et,toNumber)}const slice$3=Array.prototype.slice;function scaleBinOrdinal(){let et=[],tt=[];function nt(rt){return rt==null||rt!==rt?void 0:tt[(bisect$1(et,rt)-1)%tt.length]}return nt.domain=function(rt){return arguments.length?(et=numbers(rt),nt):et.slice()},nt.range=function(rt){return arguments.length?(tt=slice$3.call(rt),nt):tt.slice()},nt.tickFormat=function(rt,ot){return tickFormat$1(et[0],peek$2(et),rt??10,ot)},nt.copy=function(){return scaleBinOrdinal().domain(nt.domain()).range(nt.range())},nt}const scales=new Map,VEGA_SCALE=Symbol("vega_scale");function registerScale(et){return et[VEGA_SCALE]=!0,et}function isRegisteredScale(et){return et&&et[VEGA_SCALE]===!0}function create$2(et,tt,nt){const rt=function(){const st=tt();return st.invertRange||(st.invertRange=st.invert?invertRange(st):st.invertExtent?invertRangeExtent(st):void 0),st.type=et,registerScale(st)};return rt.metadata=toSet(array$5(nt)),rt}function scale$4(et,tt,nt){return arguments.length>1?(scales.set(et,create$2(et,tt,nt)),this):isValidScaleType(et)?scales.get(et):void 0}scale$4(Identity$1,identity$1);scale$4(Linear,linear,Continuous);scale$4(Log,log$4,[Continuous,Log]);scale$4(Pow,pow$2,Continuous);scale$4(Sqrt,sqrt$2,Continuous);scale$4(Symlog,symlog,Continuous);scale$4(Time,time$1,[Continuous,Temporal]);scale$4(UTC,utcTime,[Continuous,Temporal]);scale$4(Sequential,sequential,[Continuous,Interpolating]);scale$4(`${Sequential}-${Linear}`,sequential,[Continuous,Interpolating]);scale$4(`${Sequential}-${Log}`,sequentialLog,[Continuous,Interpolating,Log]);scale$4(`${Sequential}-${Pow}`,sequentialPow,[Continuous,Interpolating]);scale$4(`${Sequential}-${Sqrt}`,sequentialSqrt,[Continuous,Interpolating]);scale$4(`${Sequential}-${Symlog}`,sequentialSymlog,[Continuous,Interpolating]);scale$4(`${Diverging}-${Linear}`,diverging,[Continuous,Interpolating]);scale$4(`${Diverging}-${Log}`,divergingLog,[Continuous,Interpolating,Log]);scale$4(`${Diverging}-${Pow}`,divergingPow,[Continuous,Interpolating]);scale$4(`${Diverging}-${Sqrt}`,divergingSqrt,[Continuous,Interpolating]);scale$4(`${Diverging}-${Symlog}`,divergingSymlog,[Continuous,Interpolating]);scale$4(Quantile,quantile,[Discretizing,Quantile]);scale$4(Quantize,quantize$1,Discretizing);scale$4(Threshold,threshold,Discretizing);scale$4(BinOrdinal,scaleBinOrdinal,[Discrete$1,Discretizing]);scale$4(Ordinal,ordinal,Discrete$1);scale$4(Band,band,Discrete$1);scale$4(Point,point$3,Discrete$1);function isValidScaleType(et){return scales.has(et)}function hasType(et,tt){const nt=scales.get(et);return nt&&nt.metadata[tt]}function isContinuous$1(et){return hasType(et,Continuous)}function isDiscrete$2(et){return hasType(et,Discrete$1)}function isDiscretizing$1(et){return hasType(et,Discretizing)}function isLogarithmic(et){return hasType(et,Log)}function isTemporal(et){return hasType(et,Temporal)}function isInterpolating(et){return hasType(et,Interpolating)}function isQuantile$1(et){return hasType(et,Quantile)}const scaleProps=["clamp","base","constant","exponent"];function interpolateRange$1(et,tt){const nt=tt[0],rt=peek$2(tt)-nt;return function(ot){return et(nt+ot*rt)}}function interpolateColors(et,tt,nt){return piecewise(interpolate$1(tt||"rgb",nt),et)}function quantizeInterpolator(et,tt){const nt=new Array(tt),rt=tt+1;for(let ot=0;ot<tt;)nt[ot]=et(++ot/rt);return nt}function scaleFraction(et,tt,nt){const rt=nt-tt;let ot,st,ut;return!rt||!Number.isFinite(rt)?constant$6(.5):(ot=(st=et.type).indexOf("-"),st=ot<0?st:st.slice(ot+1),ut=scale$4(st)().domain([tt,nt]).range([0,1]),scaleProps.forEach(ct=>et[ct]?ut[ct](et[ct]()):0),ut)}function interpolate$1(et,tt){const nt=$$1[method(et)];return tt!=null&&nt&&nt.gamma?nt.gamma(tt):nt}function method(et){return"interpolate"+et.toLowerCase().split("-").map(tt=>tt[0].toUpperCase()+tt.slice(1)).join("")}const continuous={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},discrete={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function colors$2(et){const tt=et.length/6|0,nt=new Array(tt);for(let rt=0;rt<tt;)nt[rt]="#"+et.slice(rt*6,++rt*6);return nt}function apply$1(et,tt){for(const nt in et)scheme(nt,tt(et[nt]))}const schemes={};apply$1(discrete,colors$2);apply$1(continuous,et=>interpolateColors(colors$2(et)));function scheme(et,tt){return et=et&&et.toLowerCase(),arguments.length>1?(schemes[et]=tt,this):schemes[et]}const SymbolLegend="symbol",DiscreteLegend="discrete",GradientLegend="gradient",defaultFormatter=et=>isArray(et)?et.map(tt=>String(tt)):String(et),ascending$1=(et,tt)=>et[1]-tt[1],descending$1=(et,tt)=>tt[1]-et[1];function tickCount(et,tt,nt){let rt;return isNumber$1(tt)&&(et.bins&&(tt=Math.max(tt,et.bins.length)),nt!=null&&(tt=Math.min(tt,Math.floor(span(et.domain())/nt||1)))),isObject(tt)&&(rt=tt.step,tt=tt.interval),isString(tt)&&(tt=et.type===Time?timeInterval(tt):et.type==UTC?utcInterval(tt):error("Only time and utc scales accept interval strings."),rt&&(tt=tt.every(rt))),tt}function validTicks(et,tt,nt){let rt=et.range(),ot=rt[0],st=peek$2(rt),ut=ascending$1;if(ot>st&&(rt=st,st=ot,ot=rt,ut=descending$1),ot=Math.floor(ot),st=Math.ceil(st),tt=tt.map(ct=>[ct,et(ct)]).filter(ct=>ot<=ct[1]&&ct[1]<=st).sort(ut).map(ct=>ct[0]),nt>0&&tt.length>1){const ct=[tt[0],peek$2(tt)];for(;tt.length>nt&&tt.length>=3;)tt=tt.filter((ft,pt)=>!(pt%2));tt.length<3&&(tt=ct)}return tt}function tickValues(et,tt){return et.bins?validTicks(et,et.bins):et.ticks?et.ticks(tt):et.domain()}function tickFormat(et,tt,nt,rt,ot,st){const ut=tt.type;let ct=defaultFormatter;if(ut===Time||ot===Time)ct=et.timeFormat(rt);else if(ut===UTC||ot===UTC)ct=et.utcFormat(rt);else if(isLogarithmic(ut)){const ft=et.formatFloat(rt);if(st||tt.bins)ct=ft;else{const pt=tickLog(tt,nt,!1);ct=ht=>pt(ht)?ft(ht):""}}else if(tt.tickFormat){const ft=tt.domain();ct=et.formatSpan(ft[0],ft[ft.length-1],nt,rt)}else rt&&(ct=et.format(rt));return ct}function tickLog(et,tt,nt){const rt=tickValues(et,tt),ot=et.base(),st=Math.log(ot),ut=Math.max(1,ot*tt/rt.length),ct=ft=>{let pt=ft/Math.pow(ot,Math.round(Math.log(ft)/st));return pt*ot<ot-.5&&(pt*=ot),pt<=ut};return nt?rt.filter(ct):ct}const symbols$2={[Quantile]:"quantiles",[Quantize]:"thresholds",[Threshold]:"domain"},formats={[Quantile]:"quantiles",[Quantize]:"domain"};function labelValues(et,tt){return et.bins?binValues(et.bins):et.type===Log?tickLog(et,tt,!0):symbols$2[et.type]?thresholdValues(et[symbols$2[et.type]]()):tickValues(et,tt)}function thresholdFormat(et,tt,nt){const rt=tt[formats[tt.type]](),ot=rt.length;let st=ot>1?rt[1]-rt[0]:rt[0],ut;for(ut=1;ut<ot;++ut)st=Math.min(st,rt[ut]-rt[ut-1]);return et.formatSpan(0,st,3*10,nt)}function thresholdValues(et){const tt=[-1/0].concat(et);return tt.max=1/0,tt}function binValues(et){const tt=et.slice(0,-1);return tt.max=peek$2(et),tt}const isDiscreteRange=et=>symbols$2[et.type]||et.bins;function labelFormat(et,tt,nt,rt,ot,st,ut){const ct=formats[tt.type]&&st!==Time&&st!==UTC?thresholdFormat(et,tt,ot):tickFormat(et,tt,nt,ot,st,ut);return rt===SymbolLegend&&isDiscreteRange(tt)?formatRange(ct):rt===DiscreteLegend?formatDiscrete(ct):formatPoint(ct)}const formatRange=et=>(tt,nt,rt)=>{const ot=get$4(rt[nt+1],get$4(rt.max,1/0)),st=formatValue$2(tt,et),ut=formatValue$2(ot,et);return st&&ut?st+" \u2013 "+ut:ut?"< "+ut:"\u2265 "+st},get$4=(et,tt)=>et??tt,formatDiscrete=et=>(tt,nt)=>nt?et(tt):null,formatPoint=et=>tt=>et(tt),formatValue$2=(et,tt)=>Number.isFinite(et)?tt(et):null;function labelFraction(et){const tt=et.domain(),nt=tt.length-1;let rt=+tt[0],ot=+peek$2(tt),st=ot-rt;if(et.type===Threshold){const ut=nt?st/nt:.1;rt-=ut,ot+=ut,st=ot-rt}return ut=>(ut-rt)/st}function format$1(et,tt,nt,rt){const ot=rt||tt.type;return isString(nt)&&isTemporal(ot)&&(nt=nt.replace(/%a/g,"%A").replace(/%b/g,"%B")),!nt&&ot===Time?et.timeFormat("%A, %d %B %Y, %X"):!nt&&ot===UTC?et.utcFormat("%A, %d %B %Y, %X UTC"):labelFormat(et,tt,5,null,nt,rt,!0)}function domainCaption(et,tt,nt){nt=nt||{};const rt=Math.max(3,nt.maxlen||7),ot=format$1(et,tt,nt.format,nt.formatType);if(isDiscretizing$1(tt.type)){const st=labelValues(tt).slice(1).map(ot),ut=st.length;return`${ut} boundar${ut===1?"y":"ies"}: ${st.join(", ")}`}else if(isDiscrete$2(tt.type)){const st=tt.domain(),ut=st.length,ct=ut>rt?st.slice(0,rt-2).map(ot).join(", ")+", ending with "+st.slice(-1).map(ot):st.map(ot).join(", ");return`${ut} value${ut===1?"":"s"}: ${ct}`}else{const st=tt.domain();return`values from ${ot(st[0])} to ${ot(peek$2(st))}`}}let gradient_id=0;function resetSVGGradientId(){gradient_id=0}const patternPrefix="p_";function isGradient(et){return et&&et.gradient}function gradientRef(et,tt,nt){const rt=et.gradient;let ot=et.id,st=rt==="radial"?patternPrefix:"";return ot||(ot=et.id="gradient_"+gradient_id++,rt==="radial"?(et.x1=get$3(et.x1,.5),et.y1=get$3(et.y1,.5),et.r1=get$3(et.r1,0),et.x2=get$3(et.x2,.5),et.y2=get$3(et.y2,.5),et.r2=get$3(et.r2,.5),st=patternPrefix):(et.x1=get$3(et.x1,0),et.y1=get$3(et.y1,0),et.x2=get$3(et.x2,1),et.y2=get$3(et.y2,0))),tt[ot]=et,"url("+(nt||"")+"#"+st+ot+")"}function get$3(et,tt){return et??tt}function Gradient$1(et,tt){var nt=[],rt;return rt={gradient:"linear",x1:et?et[0]:0,y1:et?et[1]:0,x2:tt?tt[0]:1,y2:tt?tt[1]:0,stops:nt,stop:function(ot,st){return nt.push({offset:ot,color:st}),rt}}}const lookup$4={basis:{curve:curveBasis},"basis-closed":{curve:curveBasisClosed},"basis-open":{curve:curveBasisOpen},bundle:{curve:curveBundle,tension:"beta",value:.85},cardinal:{curve:curveCardinal,tension:"tension",value:0},"cardinal-open":{curve:curveCardinalOpen,tension:"tension",value:0},"cardinal-closed":{curve:curveCardinalClosed,tension:"tension",value:0},"catmull-rom":{curve:curveCatmullRom,tension:"alpha",value:.5},"catmull-rom-closed":{curve:curveCatmullRomClosed,tension:"alpha",value:.5},"catmull-rom-open":{curve:curveCatmullRomOpen,tension:"alpha",value:.5},linear:{curve:curveLinear},"linear-closed":{curve:curveLinearClosed},monotone:{horizontal:monotoneY,vertical:monotoneX},natural:{curve:curveNatural},step:{curve:curveStep},"step-after":{curve:stepAfter},"step-before":{curve:stepBefore}};function curves(et,tt,nt){var rt=has$1(lookup$4,et)&&lookup$4[et],ot=null;return rt&&(ot=rt.curve||rt[tt||"vertical"],rt.tension&&nt!=null&&(ot=ot[rt.tension](nt))),ot}const paramCounts={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},commandPattern=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,numberPattern=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,spacePattern=/^((\s+,?\s*)|(,\s*))/,flagPattern=/^[01]/;function parse$5(et){const tt=[];return(et.match(commandPattern)||[]).forEach(rt=>{let ot=rt[0];const st=ot.toLowerCase(),ut=paramCounts[st],ct=parseParams(st,ut,rt.slice(1).trim()),ft=ct.length;if(ft<ut||ft&&ft%ut!==0)throw Error("Invalid SVG path, incorrect parameter count");if(tt.push([ot,...ct.slice(0,ut)]),ft!==ut){st==="m"&&(ot=ot==="M"?"L":"l");for(let pt=ut;pt<ft;pt+=ut)tt.push([ot,...ct.slice(pt,pt+ut)])}}),tt}function parseParams(et,tt,nt){const rt=[];for(let ot=0;tt&&ot<nt.length;)for(let st=0;st<tt;++st){const ut=et==="a"&&(st===3||st===4)?flagPattern:numberPattern,ct=nt.slice(ot).match(ut);if(ct===null)throw Error("Invalid SVG path, incorrect parameter type");ot+=ct[0].length,rt.push(+ct[0]);const ft=nt.slice(ot).match(spacePattern);ft!==null&&(ot+=ft[0].length)}return rt}const DegToRad=Math.PI/180,Epsilon$1=1e-14,HalfPi=Math.PI/2,Tau=Math.PI*2,HalfSqrt3=Math.sqrt(3)/2;var segmentCache={},bezierCache={},join$2=[].join;function segments(et,tt,nt,rt,ot,st,ut,ct,ft){const pt=join$2.call(arguments);if(segmentCache[pt])return segmentCache[pt];const ht=ut*DegToRad,mt=Math.sin(ht),yt=Math.cos(ht);nt=Math.abs(nt),rt=Math.abs(rt);const vt=yt*(ct-et)*.5+mt*(ft-tt)*.5,Tt=yt*(ft-tt)*.5-mt*(ct-et)*.5;let Et=vt*vt/(nt*nt)+Tt*Tt/(rt*rt);Et>1&&(Et=Math.sqrt(Et),nt*=Et,rt*=Et);const xt=yt/nt,At=mt/nt,Ct=-mt/rt,$t=yt/rt,Ot=xt*ct+At*ft,Rt=Ct*ct+$t*ft,It=xt*et+At*tt,kt=Ct*et+$t*tt;let Ft=1/((It-Ot)*(It-Ot)+(kt-Rt)*(kt-Rt))-.25;Ft<0&&(Ft=0);let zt=Math.sqrt(Ft);st==ot&&(zt=-zt);const Vt=.5*(Ot+It)-zt*(kt-Rt),Zt=.5*(Rt+kt)+zt*(It-Ot),Ut=Math.atan2(Rt-Zt,Ot-Vt);let Jt=Math.atan2(kt-Zt,It-Vt)-Ut;Jt<0&&st===1?Jt+=Tau:Jt>0&&st===0&&(Jt-=Tau);const gn=Math.ceil(Math.abs(Jt/(HalfPi+.001))),An=[];for(let sn=0;sn<gn;++sn){const Sn=Ut+sn*Jt/gn,In=Ut+(sn+1)*Jt/gn;An[sn]=[Vt,Zt,Sn,In,nt,rt,mt,yt]}return segmentCache[pt]=An}function bezier(et){const tt=join$2.call(et);if(bezierCache[tt])return bezierCache[tt];var nt=et[0],rt=et[1],ot=et[2],st=et[3],ut=et[4],ct=et[5],ft=et[6],pt=et[7];const ht=pt*ut,mt=-ft*ct,yt=ft*ut,vt=pt*ct,Tt=Math.cos(ot),Et=Math.sin(ot),xt=Math.cos(st),At=Math.sin(st),Ct=.5*(st-ot),$t=Math.sin(Ct*.5),Ot=8/3*$t*$t/Math.sin(Ct),Rt=nt+Tt-Ot*Et,It=rt+Et+Ot*Tt,kt=nt+xt,Mt=rt+At,Ft=kt+Ot*At,zt=Mt-Ot*xt;return bezierCache[tt]=[ht*Rt+mt*It,yt*Rt+vt*It,ht*Ft+mt*zt,yt*Ft+vt*zt,ht*kt+mt*Mt,yt*kt+vt*Mt]}const temp=["l",0,0,0,0,0,0,0];function scale$1$1(et,tt,nt){const rt=temp[0]=et[0];if(rt==="a"||rt==="A")temp[1]=tt*et[1],temp[2]=nt*et[2],temp[3]=et[3],temp[4]=et[4],temp[5]=et[5],temp[6]=tt*et[6],temp[7]=nt*et[7];else if(rt==="h"||rt==="H")temp[1]=tt*et[1];else if(rt==="v"||rt==="V")temp[1]=nt*et[1];else for(var ot=1,st=et.length;ot<st;++ot)temp[ot]=(ot%2==1?tt:nt)*et[ot];return temp}function pathRender(et,tt,nt,rt,ot,st){var ut,ct=null,ft=0,pt=0,ht=0,mt=0,yt,vt,Tt,Et,xt=0,At=0;nt==null&&(nt=0),rt==null&&(rt=0),ot==null&&(ot=1),st==null&&(st=ot),et.beginPath&&et.beginPath();for(var Ct=0,$t=tt.length;Ct<$t;++Ct){switch(ut=tt[Ct],(ot!==1||st!==1)&&(ut=scale$1$1(ut,ot,st)),ut[0]){case"l":ft+=ut[1],pt+=ut[2],et.lineTo(ft+nt,pt+rt);break;case"L":ft=ut[1],pt=ut[2],et.lineTo(ft+nt,pt+rt);break;case"h":ft+=ut[1],et.lineTo(ft+nt,pt+rt);break;case"H":ft=ut[1],et.lineTo(ft+nt,pt+rt);break;case"v":pt+=ut[1],et.lineTo(ft+nt,pt+rt);break;case"V":pt=ut[1],et.lineTo(ft+nt,pt+rt);break;case"m":ft+=ut[1],pt+=ut[2],xt=ft,At=pt,et.moveTo(ft+nt,pt+rt);break;case"M":ft=ut[1],pt=ut[2],xt=ft,At=pt,et.moveTo(ft+nt,pt+rt);break;case"c":yt=ft+ut[5],vt=pt+ut[6],ht=ft+ut[3],mt=pt+ut[4],et.bezierCurveTo(ft+ut[1]+nt,pt+ut[2]+rt,ht+nt,mt+rt,yt+nt,vt+rt),ft=yt,pt=vt;break;case"C":ft=ut[5],pt=ut[6],ht=ut[3],mt=ut[4],et.bezierCurveTo(ut[1]+nt,ut[2]+rt,ht+nt,mt+rt,ft+nt,pt+rt);break;case"s":yt=ft+ut[3],vt=pt+ut[4],ht=2*ft-ht,mt=2*pt-mt,et.bezierCurveTo(ht+nt,mt+rt,ft+ut[1]+nt,pt+ut[2]+rt,yt+nt,vt+rt),ht=ft+ut[1],mt=pt+ut[2],ft=yt,pt=vt;break;case"S":yt=ut[3],vt=ut[4],ht=2*ft-ht,mt=2*pt-mt,et.bezierCurveTo(ht+nt,mt+rt,ut[1]+nt,ut[2]+rt,yt+nt,vt+rt),ft=yt,pt=vt,ht=ut[1],mt=ut[2];break;case"q":yt=ft+ut[3],vt=pt+ut[4],ht=ft+ut[1],mt=pt+ut[2],et.quadraticCurveTo(ht+nt,mt+rt,yt+nt,vt+rt),ft=yt,pt=vt;break;case"Q":yt=ut[3],vt=ut[4],et.quadraticCurveTo(ut[1]+nt,ut[2]+rt,yt+nt,vt+rt),ft=yt,pt=vt,ht=ut[1],mt=ut[2];break;case"t":yt=ft+ut[1],vt=pt+ut[2],ct[0].match(/[QqTt]/)===null?(ht=ft,mt=pt):ct[0]==="t"?(ht=2*ft-Tt,mt=2*pt-Et):ct[0]==="q"&&(ht=2*ft-ht,mt=2*pt-mt),Tt=ht,Et=mt,et.quadraticCurveTo(ht+nt,mt+rt,yt+nt,vt+rt),ft=yt,pt=vt,ht=ft+ut[1],mt=pt+ut[2];break;case"T":yt=ut[1],vt=ut[2],ht=2*ft-ht,mt=2*pt-mt,et.quadraticCurveTo(ht+nt,mt+rt,yt+nt,vt+rt),ft=yt,pt=vt;break;case"a":drawArc(et,ft+nt,pt+rt,[ut[1],ut[2],ut[3],ut[4],ut[5],ut[6]+ft+nt,ut[7]+pt+rt]),ft+=ut[6],pt+=ut[7];break;case"A":drawArc(et,ft+nt,pt+rt,[ut[1],ut[2],ut[3],ut[4],ut[5],ut[6]+nt,ut[7]+rt]),ft=ut[6],pt=ut[7];break;case"z":case"Z":ft=xt,pt=At,et.closePath();break}ct=ut}}function drawArc(et,tt,nt,rt){const ot=segments(rt[5],rt[6],rt[0],rt[1],rt[3],rt[4],rt[2],tt,nt);for(let st=0;st<ot.length;++st){const ut=bezier(ot[st]);et.bezierCurveTo(ut[0],ut[1],ut[2],ut[3],ut[4],ut[5])}}const Tan30=.5773502691896257,builtins={circle:{draw:function(et,tt){const nt=Math.sqrt(tt)/2;et.moveTo(nt,0),et.arc(0,0,nt,0,Tau)}},cross:{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=nt/2.5;et.moveTo(-nt,-rt),et.lineTo(-nt,rt),et.lineTo(-rt,rt),et.lineTo(-rt,nt),et.lineTo(rt,nt),et.lineTo(rt,rt),et.lineTo(nt,rt),et.lineTo(nt,-rt),et.lineTo(rt,-rt),et.lineTo(rt,-nt),et.lineTo(-rt,-nt),et.lineTo(-rt,-rt),et.closePath()}},diamond:{draw:function(et,tt){const nt=Math.sqrt(tt)/2;et.moveTo(-nt,0),et.lineTo(0,-nt),et.lineTo(nt,0),et.lineTo(0,nt),et.closePath()}},square:{draw:function(et,tt){var nt=Math.sqrt(tt),rt=-nt/2;et.rect(rt,rt,nt,nt)}},arrow:{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=nt/7,ot=nt/2.5,st=nt/8;et.moveTo(-rt,nt),et.lineTo(rt,nt),et.lineTo(rt,-st),et.lineTo(ot,-st),et.lineTo(0,-nt),et.lineTo(-ot,-st),et.lineTo(-rt,-st),et.closePath()}},wedge:{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=HalfSqrt3*nt,ot=rt-nt*Tan30,st=nt/4;et.moveTo(0,-rt-ot),et.lineTo(-st,rt-ot),et.lineTo(st,rt-ot),et.closePath()}},triangle:{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=HalfSqrt3*nt,ot=rt-nt*Tan30;et.moveTo(0,-rt-ot),et.lineTo(-nt,rt-ot),et.lineTo(nt,rt-ot),et.closePath()}},"triangle-up":{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=HalfSqrt3*nt;et.moveTo(0,-rt),et.lineTo(-nt,rt),et.lineTo(nt,rt),et.closePath()}},"triangle-down":{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=HalfSqrt3*nt;et.moveTo(0,rt),et.lineTo(-nt,-rt),et.lineTo(nt,-rt),et.closePath()}},"triangle-right":{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=HalfSqrt3*nt;et.moveTo(rt,0),et.lineTo(-rt,-nt),et.lineTo(-rt,nt),et.closePath()}},"triangle-left":{draw:function(et,tt){var nt=Math.sqrt(tt)/2,rt=HalfSqrt3*nt;et.moveTo(-rt,0),et.lineTo(rt,-nt),et.lineTo(rt,nt),et.closePath()}},stroke:{draw:function(et,tt){const nt=Math.sqrt(tt)/2;et.moveTo(-nt,0),et.lineTo(nt,0)}}};function symbols$1(et){return has$1(builtins,et)?builtins[et]:customSymbol(et)}var custom={};function customSymbol(et){if(!has$1(custom,et)){const tt=parse$5(et);custom[et]={draw:function(nt,rt){pathRender(nt,tt,0,0,Math.sqrt(rt)/2)}}}return custom[et]}const C$1=.448084975506;function rectangleX(et){return et.x}function rectangleY(et){return et.y}function rectangleWidth(et){return et.width}function rectangleHeight(et){return et.height}function number$3(et){return typeof et=="function"?et:()=>+et}function clamp$4(et,tt,nt){return Math.max(tt,Math.min(et,nt))}function vg_rect(){var et=rectangleX,tt=rectangleY,nt=rectangleWidth,rt=rectangleHeight,ot=number$3(0),st=ot,ut=ot,ct=ot,ft=null;function pt(ht,mt,yt){var vt,Tt=mt??+et.call(this,ht),Et=yt??+tt.call(this,ht),xt=+nt.call(this,ht),At=+rt.call(this,ht),Ct=Math.min(xt,At)/2,$t=clamp$4(+ot.call(this,ht),0,Ct),Ot=clamp$4(+st.call(this,ht),0,Ct),Rt=clamp$4(+ut.call(this,ht),0,Ct),It=clamp$4(+ct.call(this,ht),0,Ct);if(ft||(ft=vt=path$3()),$t<=0&&Ot<=0&&Rt<=0&&It<=0)ft.rect(Tt,Et,xt,At);else{var kt=Tt+xt,Mt=Et+At;ft.moveTo(Tt+$t,Et),ft.lineTo(kt-Ot,Et),ft.bezierCurveTo(kt-C$1*Ot,Et,kt,Et+C$1*Ot,kt,Et+Ot),ft.lineTo(kt,Mt-It),ft.bezierCurveTo(kt,Mt-C$1*It,kt-C$1*It,Mt,kt-It,Mt),ft.lineTo(Tt+Rt,Mt),ft.bezierCurveTo(Tt+C$1*Rt,Mt,Tt,Mt-C$1*Rt,Tt,Mt-Rt),ft.lineTo(Tt,Et+$t),ft.bezierCurveTo(Tt,Et+C$1*$t,Tt+C$1*$t,Et,Tt+$t,Et),ft.closePath()}if(vt)return ft=null,vt+""||null}return pt.x=function(ht){return arguments.length?(et=number$3(ht),pt):et},pt.y=function(ht){return arguments.length?(tt=number$3(ht),pt):tt},pt.width=function(ht){return arguments.length?(nt=number$3(ht),pt):nt},pt.height=function(ht){return arguments.length?(rt=number$3(ht),pt):rt},pt.cornerRadius=function(ht,mt,yt,vt){return arguments.length?(ot=number$3(ht),st=mt!=null?number$3(mt):ot,ct=yt!=null?number$3(yt):ot,ut=vt!=null?number$3(vt):st,pt):ot},pt.context=function(ht){return arguments.length?(ft=ht??null,pt):ft},pt}function vg_trail(){var et,tt,nt,rt,ot=null,st,ut,ct,ft;function pt(mt,yt,vt){const Tt=vt/2;if(st){var Et=ct-yt,xt=mt-ut;if(Et||xt){var At=Math.sqrt(Et*Et+xt*xt),Ct=(Et/=At)*ft,$t=(xt/=At)*ft,Ot=Math.atan2(xt,Et);ot.moveTo(ut-Ct,ct-$t),ot.lineTo(mt-Et*Tt,yt-xt*Tt),ot.arc(mt,yt,Tt,Ot-Math.PI,Ot),ot.lineTo(ut+Ct,ct+$t),ot.arc(ut,ct,ft,Ot,Ot+Math.PI)}else ot.arc(mt,yt,Tt,0,Tau);ot.closePath()}else st=1;ut=mt,ct=yt,ft=Tt}function ht(mt){var yt,vt=mt.length,Tt,Et=!1,xt;for(ot==null&&(ot=xt=path$3()),yt=0;yt<=vt;++yt)!(yt<vt&&rt(Tt=mt[yt],yt,mt))===Et&&(Et=!Et)&&(st=0),Et&&pt(+et(Tt,yt,mt),+tt(Tt,yt,mt),+nt(Tt,yt,mt));if(xt)return ot=null,xt+""||null}return ht.x=function(mt){return arguments.length?(et=mt,ht):et},ht.y=function(mt){return arguments.length?(tt=mt,ht):tt},ht.size=function(mt){return arguments.length?(nt=mt,ht):nt},ht.defined=function(mt){return arguments.length?(rt=mt,ht):rt},ht.context=function(mt){return arguments.length?(mt==null?ot=null:ot=mt,ht):ot},ht}function value$1(et,tt){return et??tt}const x$3=et=>et.x||0,y$3=et=>et.y||0,w$2=et=>et.width||0,h$1=et=>et.height||0,xw=et=>(et.x||0)+(et.width||0),yh=et=>(et.y||0)+(et.height||0),sa=et=>et.startAngle||0,ea=et=>et.endAngle||0,pa=et=>et.padAngle||0,ir=et=>et.innerRadius||0,or=et=>et.outerRadius||0,cr=et=>et.cornerRadius||0,tl=et=>value$1(et.cornerRadiusTopLeft,et.cornerRadius)||0,tr=et=>value$1(et.cornerRadiusTopRight,et.cornerRadius)||0,br=et=>value$1(et.cornerRadiusBottomRight,et.cornerRadius)||0,bl=et=>value$1(et.cornerRadiusBottomLeft,et.cornerRadius)||0,sz=et=>value$1(et.size,64),ts=et=>et.size||1,def=et=>et.defined!==!1,type=et=>symbols$1(et.shape||"circle"),arcShape=arc$2$1().startAngle(sa).endAngle(ea).padAngle(pa).innerRadius(ir).outerRadius(or).cornerRadius(cr),areavShape=area$2$1().x(x$3).y1(y$3).y0(yh).defined(def),areahShape=area$2$1().y(y$3).x1(x$3).x0(xw).defined(def),lineShape=line$2$1().x(x$3).y(y$3).defined(def),rectShape=vg_rect().x(x$3).y(y$3).width(w$2).height(h$1).cornerRadius(tl,tr,br,bl),symbolShape=Symbol$1().type(type).size(sz),trailShape=vg_trail().x(x$3).y(y$3).defined(def).size(ts);function hasCornerRadius(et){return et.cornerRadius||et.cornerRadiusTopLeft||et.cornerRadiusTopRight||et.cornerRadiusBottomRight||et.cornerRadiusBottomLeft}function arc$1$1(et,tt){return arcShape.context(et)(tt)}function area$1$1(et,tt){const nt=tt[0],rt=nt.interpolate||"linear";return(nt.orient==="horizontal"?areahShape:areavShape).curve(curves(rt,nt.orient,nt.tension)).context(et)(tt)}function line$1$1(et,tt){const nt=tt[0],rt=nt.interpolate||"linear";return lineShape.curve(curves(rt,nt.orient,nt.tension)).context(et)(tt)}function rectangle(et,tt,nt,rt){return rectShape.context(et)(tt,nt,rt)}function shape$1$1(et,tt){return(tt.mark.shape||tt.shape).context(et)(tt)}function symbol$1(et,tt){return symbolShape.context(et)(tt)}function trail$1(et,tt){return trailShape.context(et)(tt)}var clip_id=1;function resetSVGClipId(){clip_id=1}function clip$1$1(et,tt,nt){var rt=tt.clip,ot=et._defs,st=tt.clip_id||(tt.clip_id="clip"+clip_id++),ut=ot.clipping[st]||(ot.clipping[st]={id:st});return isFunction$3(rt)?ut.path=rt(null):hasCornerRadius(nt)?ut.path=rectangle(null,nt,0,0):(ut.width=nt.width||0,ut.height=nt.height||0),"url(#"+st+")"}function Bounds(et){this.clear(),et&&this.union(et)}Bounds.prototype={clone(){return new Bounds(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(et){return this.x1===et.x1&&this.y1===et.y1&&this.x2===et.x2&&this.y2===et.y2},set(et,tt,nt,rt){return nt<et?(this.x2=et,this.x1=nt):(this.x1=et,this.x2=nt),rt<tt?(this.y2=tt,this.y1=rt):(this.y1=tt,this.y2=rt),this},add(et,tt){return et<this.x1&&(this.x1=et),tt<this.y1&&(this.y1=tt),et>this.x2&&(this.x2=et),tt>this.y2&&(this.y2=tt),this},expand(et){return this.x1-=et,this.y1-=et,this.x2+=et,this.y2+=et,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(et){return this.x1*=et,this.y1*=et,this.x2*=et,this.y2*=et,this},translate(et,tt){return this.x1+=et,this.x2+=et,this.y1+=tt,this.y2+=tt,this},rotate(et,tt,nt){const rt=this.rotatedPoints(et,tt,nt);return this.clear().add(rt[0],rt[1]).add(rt[2],rt[3]).add(rt[4],rt[5]).add(rt[6],rt[7])},rotatedPoints(et,tt,nt){var{x1:rt,y1:ot,x2:st,y2:ut}=this,ct=Math.cos(et),ft=Math.sin(et),pt=tt-tt*ct+nt*ft,ht=nt-tt*ft-nt*ct;return[ct*rt-ft*ot+pt,ft*rt+ct*ot+ht,ct*rt-ft*ut+pt,ft*rt+ct*ut+ht,ct*st-ft*ot+pt,ft*st+ct*ot+ht,ct*st-ft*ut+pt,ft*st+ct*ut+ht]},union(et){return et.x1<this.x1&&(this.x1=et.x1),et.y1<this.y1&&(this.y1=et.y1),et.x2>this.x2&&(this.x2=et.x2),et.y2>this.y2&&(this.y2=et.y2),this},intersect(et){return et.x1>this.x1&&(this.x1=et.x1),et.y1>this.y1&&(this.y1=et.y1),et.x2<this.x2&&(this.x2=et.x2),et.y2<this.y2&&(this.y2=et.y2),this},encloses(et){return et&&this.x1<=et.x1&&this.x2>=et.x2&&this.y1<=et.y1&&this.y2>=et.y2},alignsWith(et){return et&&(this.x1==et.x1||this.x2==et.x2||this.y1==et.y1||this.y2==et.y2)},intersects(et){return et&&!(this.x2<et.x1||this.x1>et.x2||this.y2<et.y1||this.y1>et.y2)},contains(et,tt){return!(et<this.x1||et>this.x2||tt<this.y1||tt>this.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function Item$3(et){this.mark=et,this.bounds=this.bounds||new Bounds}function GroupItem$1(et){Item$3.call(this,et),this.items=this.items||[]}inherits(GroupItem$1,Item$3);function ResourceLoader(et){this._pending=0,this._loader=et||loader()}function increment$1(et){et._pending+=1}function decrement(et){et._pending-=1}ResourceLoader.prototype={pending(){return this._pending},sanitizeURL(et){const tt=this;return increment$1(tt),tt._loader.sanitize(et,{context:"href"}).then(nt=>(decrement(tt),nt)).catch(()=>(decrement(tt),null))},loadImage(et){const tt=this,nt=domImage();return increment$1(tt),tt._loader.sanitize(et,{context:"image"}).then(rt=>{const ot=rt.href;if(!ot||!nt)throw{url:ot};const st=new nt,ut=has$1(rt,"crossOrigin")?rt.crossOrigin:"anonymous";return ut!=null&&(st.crossOrigin=ut),st.onload=()=>decrement(tt),st.onerror=()=>decrement(tt),st.src=ot,st}).catch(rt=>(decrement(tt),{complete:!1,width:0,height:0,src:rt&&rt.url||""}))},ready(){const et=this;return new Promise(tt=>{function nt(rt){et.pending()?setTimeout(()=>{nt(!0)},10):tt(rt)}nt(!1)})}};function boundStroke(et,tt,nt){if(tt.stroke&&tt.opacity!==0&&tt.strokeOpacity!==0){const rt=tt.strokeWidth!=null?+tt.strokeWidth:1;et.expand(rt+(nt?miterAdjustment(tt,rt):0))}return et}function miterAdjustment(et,tt){return et.strokeJoin&&et.strokeJoin!=="miter"?0:tt}const circleThreshold=Tau-1e-8;let bounds,lx,ly,rot,ma,mb,mc,md;const add$2=(et,tt)=>bounds.add(et,tt),addL=(et,tt)=>add$2(lx=et,ly=tt),addX=et=>add$2(et,bounds.y1),addY=et=>add$2(bounds.x1,et),px$1=(et,tt)=>ma*et+mc*tt,py=(et,tt)=>mb*et+md*tt,addp=(et,tt)=>add$2(px$1(et,tt),py(et,tt)),addpL=(et,tt)=>addL(px$1(et,tt),py(et,tt));function boundContext(et,tt){return bounds=et,tt?(rot=tt*DegToRad,ma=md=Math.cos(rot),mb=Math.sin(rot),mc=-mb):(ma=md=1,rot=mb=mc=0),context$1$1}const context$1$1={beginPath(){},closePath(){},moveTo:addpL,lineTo:addpL,rect(et,tt,nt,rt){rot?(addp(et+nt,tt),addp(et+nt,tt+rt),addp(et,tt+rt),addpL(et,tt)):(add$2(et+nt,tt+rt),addL(et,tt))},quadraticCurveTo(et,tt,nt,rt){const ot=px$1(et,tt),st=py(et,tt),ut=px$1(nt,rt),ct=py(nt,rt);quadExtrema(lx,ot,ut,addX),quadExtrema(ly,st,ct,addY),addL(ut,ct)},bezierCurveTo(et,tt,nt,rt,ot,st){const ut=px$1(et,tt),ct=py(et,tt),ft=px$1(nt,rt),pt=py(nt,rt),ht=px$1(ot,st),mt=py(ot,st);cubicExtrema(lx,ut,ft,ht,addX),cubicExtrema(ly,ct,pt,mt,addY),addL(ht,mt)},arc(et,tt,nt,rt,ot,st){if(rt+=rot,ot+=rot,lx=nt*Math.cos(ot)+et,ly=nt*Math.sin(ot)+tt,Math.abs(ot-rt)>circleThreshold)add$2(et-nt,tt-nt),add$2(et+nt,tt+nt);else{const ut=pt=>add$2(nt*Math.cos(pt)+et,nt*Math.sin(pt)+tt);let ct,ft;if(ut(rt),ut(ot),ot!==rt)if(rt=rt%Tau,rt<0&&(rt+=Tau),ot=ot%Tau,ot<0&&(ot+=Tau),ot<rt&&(st=!st,ct=rt,rt=ot,ot=ct),st)for(ot-=Tau,ct=rt-rt%HalfPi,ft=0;ft<4&&ct>ot;++ft,ct-=HalfPi)ut(ct);else for(ct=rt-rt%HalfPi+HalfPi,ft=0;ft<4&&ct<ot;++ft,ct=ct+HalfPi)ut(ct)}}};function quadExtrema(et,tt,nt,rt){const ot=(et-tt)/(et+nt-2*tt);0<ot&&ot<1&&rt(et+(tt-et)*ot)}function cubicExtrema(et,tt,nt,rt,ot){const st=rt-et+3*tt-3*nt,ut=et+nt-2*tt,ct=et-tt;let ft=0,pt=0,ht;Math.abs(st)>Epsilon$1?(ht=ut*ut+ct*st,ht>=0&&(ht=Math.sqrt(ht),ft=(-ut+ht)/st,pt=(-ut-ht)/st)):ft=.5*ct/ut,0<ft&&ft<1&&ot(cubic(ft,et,tt,nt,rt)),0<pt&&pt<1&&ot(cubic(pt,et,tt,nt,rt))}function cubic(et,tt,nt,rt,ot){const st=1-et,ut=st*st,ct=et*et;return ut*st*tt+3*ut*et*nt+3*st*ct*rt+ct*et*ot}var context$2=(context$2=domCanvas(1,1))?context$2.getContext("2d"):null;const b$1=new Bounds;function intersectPath(et){return function(tt,nt){if(!context$2)return!0;et(context$2,tt),b$1.clear().union(tt.bounds).intersect(nt).round();const{x1:rt,y1:ot,x2:st,y2:ut}=b$1;for(let ct=ot;ct<=ut;++ct)for(let ft=rt;ft<=st;++ft)if(context$2.isPointInPath(ft,ct))return!0;return!1}}function intersectPoint(et,tt){return tt.contains(et.x||0,et.y||0)}function intersectRect(et,tt){const nt=et.x||0,rt=et.y||0,ot=et.width||0,st=et.height||0;return tt.intersects(b$1.set(nt,rt,nt+ot,rt+st))}function intersectRule(et,tt){const nt=et.x||0,rt=et.y||0,ot=et.x2!=null?et.x2:nt,st=et.y2!=null?et.y2:rt;return intersectBoxLine(tt,nt,rt,ot,st)}function intersectBoxLine(et,tt,nt,rt,ot){const{x1:st,y1:ut,x2:ct,y2:ft}=et,pt=rt-tt,ht=ot-nt;let mt=0,yt=1,vt,Tt,Et,xt;for(xt=0;xt<4;++xt){if(xt===0&&(vt=-pt,Tt=-(st-tt)),xt===1&&(vt=pt,Tt=ct-tt),xt===2&&(vt=-ht,Tt=-(ut-nt)),xt===3&&(vt=ht,Tt=ft-nt),Math.abs(vt)<1e-10&&Tt<0)return!1;if(Et=Tt/vt,vt<0){if(Et>yt)return!1;Et>mt&&(mt=Et)}else if(vt>0){if(Et<mt)return!1;Et<yt&&(yt=Et)}}return!0}function blend(et,tt){et.globalCompositeOperation=tt.blend||"source-over"}function value$2(et,tt){return et??tt}function addStops(et,tt){const nt=tt.length;for(let rt=0;rt<nt;++rt)et.addColorStop(tt[rt].offset,tt[rt].color);return et}function gradient$3(et,tt,nt){const rt=nt.width(),ot=nt.height();let st;if(tt.gradient==="radial")st=et.createRadialGradient(nt.x1+value$2(tt.x1,.5)*rt,nt.y1+value$2(tt.y1,.5)*ot,Math.max(rt,ot)*value$2(tt.r1,0),nt.x1+value$2(tt.x2,.5)*rt,nt.y1+value$2(tt.y2,.5)*ot,Math.max(rt,ot)*value$2(tt.r2,.5));else{const ut=value$2(tt.x1,0),ct=value$2(tt.y1,0),ft=value$2(tt.x2,1),pt=value$2(tt.y2,0);if(ut===ft||ct===pt||rt===ot)st=et.createLinearGradient(nt.x1+ut*rt,nt.y1+ct*ot,nt.x1+ft*rt,nt.y1+pt*ot);else{const ht=domCanvas(Math.ceil(rt),Math.ceil(ot)),mt=ht.getContext("2d");return mt.scale(rt,ot),mt.fillStyle=addStops(mt.createLinearGradient(ut,ct,ft,pt),tt.stops),mt.fillRect(0,0,rt,ot),et.createPattern(ht,"no-repeat")}}return addStops(st,tt.stops)}function color$4(et,tt,nt){return isGradient(nt)?gradient$3(et,nt,tt.bounds):nt}function fill(et,tt,nt){return nt*=tt.fillOpacity==null?1:tt.fillOpacity,nt>0?(et.globalAlpha=nt,et.fillStyle=color$4(et,tt,tt.fill),!0):!1}var Empty=[];function stroke(et,tt,nt){var rt=(rt=tt.strokeWidth)!=null?rt:1;return rt<=0?!1:(nt*=tt.strokeOpacity==null?1:tt.strokeOpacity,nt>0?(et.globalAlpha=nt,et.strokeStyle=color$4(et,tt,tt.stroke),et.lineWidth=rt,et.lineCap=tt.strokeCap||"butt",et.lineJoin=tt.strokeJoin||"miter",et.miterLimit=tt.strokeMiterLimit||10,et.setLineDash&&(et.setLineDash(tt.strokeDash||Empty),et.lineDashOffset=tt.strokeDashOffset||0),!0):!1)}function compare$8(et,tt){return et.zindex-tt.zindex||et.index-tt.index}function zorder(et){if(!et.zdirty)return et.zitems;var tt=et.items,nt=[],rt,ot,st;for(ot=0,st=tt.length;ot<st;++ot)rt=tt[ot],rt.index=ot,rt.zindex&&nt.push(rt);return et.zdirty=!1,et.zitems=nt.sort(compare$8)}function visit(et,tt){var nt=et.items,rt,ot;if(!nt||!nt.length)return;const st=zorder(et);if(st&&st.length){for(rt=0,ot=nt.length;rt<ot;++rt)nt[rt].zindex||tt(nt[rt]);nt=st}for(rt=0,ot=nt.length;rt<ot;++rt)tt(nt[rt])}function pickVisit(et,tt){var nt=et.items,rt,ot;if(!nt||!nt.length)return null;const st=zorder(et);for(st&&st.length&&(nt=st),ot=nt.length;--ot>=0;)if(rt=tt(nt[ot]))return rt;if(nt===st){for(nt=et.items,ot=nt.length;--ot>=0;)if(!nt[ot].zindex&&(rt=tt(nt[ot])))return rt}return null}function drawAll(et){return function(tt,nt,rt){visit(nt,ot=>{(!rt||rt.intersects(ot.bounds))&&drawPath(et,tt,ot,ot)})}}function drawOne(et){return function(tt,nt,rt){nt.items.length&&(!rt||rt.intersects(nt.bounds))&&drawPath(et,tt,nt.items[0],nt.items)}}function drawPath(et,tt,nt,rt){var ot=nt.opacity==null?1:nt.opacity;ot!==0&&(et(tt,rt)||(blend(tt,nt),nt.fill&&fill(tt,nt,ot)&&tt.fill(),nt.stroke&&stroke(tt,nt,ot)&&tt.stroke()))}function pick$1$1(et){return et=et||truthy,function(tt,nt,rt,ot,st,ut){return rt*=tt.pixelRatio,ot*=tt.pixelRatio,pickVisit(nt,ct=>{const ft=ct.bounds;if(!(ft&&!ft.contains(st,ut)||!ft)&&et(tt,ct,rt,ot,st,ut))return ct})}}function hitPath(et,tt){return function(nt,rt,ot,st){var ut=Array.isArray(rt)?rt[0]:rt,ct=tt??ut.fill,ft=ut.stroke&&nt.isPointInStroke,pt,ht;return ft&&(pt=ut.strokeWidth,ht=ut.strokeCap,nt.lineWidth=pt??1,nt.lineCap=ht??"butt"),et(nt,rt)?!1:ct&&nt.isPointInPath(ot,st)||ft&&nt.isPointInStroke(ot,st)}}function pickPath(et){return pick$1$1(hitPath(et))}function translate$2(et,tt){return"translate("+et+","+tt+")"}function rotate$1(et){return"rotate("+et+")"}function scale$3(et,tt){return"scale("+et+","+tt+")"}function translateItem(et){return translate$2(et.x||0,et.y||0)}function rotateItem(et){return translate$2(et.x||0,et.y||0)+(et.angle?" "+rotate$1(et.angle):"")}function transformItem(et){return translate$2(et.x||0,et.y||0)+(et.angle?" "+rotate$1(et.angle):"")+(et.scaleX||et.scaleY?" "+scale$3(et.scaleX||1,et.scaleY||1):"")}function markItemPath(et,tt,nt){function rt(ut,ct){ut("transform",rotateItem(ct)),ut("d",tt(null,ct))}function ot(ut,ct){return tt(boundContext(ut,ct.angle),ct),boundStroke(ut,ct).translate(ct.x||0,ct.y||0)}function st(ut,ct){var ft=ct.x||0,pt=ct.y||0,ht=ct.angle||0;ut.translate(ft,pt),ht&&ut.rotate(ht*=DegToRad),ut.beginPath(),tt(ut,ct),ht&&ut.rotate(-ht),ut.translate(-ft,-pt)}return{type:et,tag:"path",nested:!1,attr:rt,bound:ot,draw:drawAll(st),pick:pickPath(st),isect:nt||intersectPath(st)}}var arc$2=markItemPath("arc",arc$1$1);function pickArea(et,tt){for(var nt=et[0].orient==="horizontal"?tt[1]:tt[0],rt=et[0].orient==="horizontal"?"y":"x",ot=et.length,st=1/0,ut,ct;--ot>=0;)et[ot].defined!==!1&&(ct=Math.abs(et[ot][rt]-nt),ct<st&&(st=ct,ut=et[ot]));return ut}function pickLine(et,tt){for(var nt=Math.pow(et[0].strokeWidth||1,2),rt=et.length,ot,st,ut;--rt>=0;)if(et[rt].defined!==!1&&(ot=et[rt].x-tt[0],st=et[rt].y-tt[1],ut=ot*ot+st*st,ut<nt))return et[rt];return null}function pickTrail(et,tt){for(var nt=et.length,rt,ot,st;--nt>=0;)if(et[nt].defined!==!1&&(rt=et[nt].x-tt[0],ot=et[nt].y-tt[1],st=rt*rt+ot*ot,rt=et[nt].size||1,st<rt*rt))return et[nt];return null}function markMultiItemPath(et,tt,nt){function rt(ft,pt){var ht=pt.mark.items;ht.length&&ft("d",tt(null,ht))}function ot(ft,pt){var ht=pt.items;return ht.length===0?ft:(tt(boundContext(ft),ht),boundStroke(ft,ht[0]))}function st(ft,pt){ft.beginPath(),tt(ft,pt)}const ut=hitPath(st);function ct(ft,pt,ht,mt,yt,vt){var Tt=pt.items,Et=pt.bounds;return!Tt||!Tt.length||Et&&!Et.contains(yt,vt)?null:(ht*=ft.pixelRatio,mt*=ft.pixelRatio,ut(ft,Tt,ht,mt)?Tt[0]:null)}return{type:et,tag:"path",nested:!0,attr:rt,bound:ot,draw:drawOne(st),pick:ct,isect:intersectPoint,tip:nt}}var area$2=markMultiItemPath("area",area$1$1,pickArea);function clip$2(et,tt){var nt=tt.clip;et.save(),isFunction$3(nt)?(et.beginPath(),nt(et),et.clip()):clipGroup(et,tt.group)}function clipGroup(et,tt){et.beginPath(),hasCornerRadius(tt)?rectangle(et,tt,0,0):et.rect(0,0,tt.width||0,tt.height||0),et.clip()}function offset$1$1(et){const tt=value$2(et.strokeWidth,1);return et.strokeOffset!=null?et.strokeOffset:et.stroke&&tt>.5&&tt<1.5?.5-Math.abs(tt-1):0}function attr$5(et,tt){et("transform",translateItem(tt))}function emitRectangle(et,tt){const nt=offset$1$1(tt);et("d",rectangle(null,tt,nt,nt))}function background$1(et,tt){et("class","background"),et("aria-hidden",!0),emitRectangle(et,tt)}function foreground(et,tt){et("class","foreground"),et("aria-hidden",!0),tt.strokeForeground?emitRectangle(et,tt):et("d","")}function content(et,tt,nt){const rt=tt.clip?clip$1$1(nt,tt,tt):null;et("clip-path",rt)}function bound$5(et,tt){if(!tt.clip&&tt.items){const nt=tt.items,rt=nt.length;for(let ot=0;ot<rt;++ot)et.union(nt[ot].bounds)}return(tt.clip||tt.width||tt.height)&&!tt.noBound&&et.add(0,0).add(tt.width||0,tt.height||0),boundStroke(et,tt),et.translate(tt.x||0,tt.y||0)}function rectanglePath(et,tt,nt,rt){const ot=offset$1$1(tt);et.beginPath(),rectangle(et,tt,(nt||0)+ot,(rt||0)+ot)}const hitBackground=hitPath(rectanglePath),hitForeground=hitPath(rectanglePath,!1),hitCorner=hitPath(rectanglePath,!0);function draw$4(et,tt,nt){visit(tt,rt=>{const ot=rt.x||0,st=rt.y||0,ut=rt.strokeForeground,ct=rt.opacity==null?1:rt.opacity;(rt.stroke||rt.fill)&&ct&&(rectanglePath(et,rt,ot,st),blend(et,rt),rt.fill&&fill(et,rt,ct)&&et.fill(),rt.stroke&&!ut&&stroke(et,rt,ct)&&et.stroke()),et.save(),et.translate(ot,st),rt.clip&&clipGroup(et,rt),nt&&nt.translate(-ot,-st),visit(rt,ft=>{this.draw(et,ft,nt)}),nt&&nt.translate(ot,st),et.restore(),ut&&rt.stroke&&ct&&(rectanglePath(et,rt,ot,st),blend(et,rt),stroke(et,rt,ct)&&et.stroke())})}function pick$2(et,tt,nt,rt,ot,st){if(tt.bounds&&!tt.bounds.contains(ot,st)||!tt.items)return null;const ut=nt*et.pixelRatio,ct=rt*et.pixelRatio;return pickVisit(tt,ft=>{let pt,ht,mt;const yt=ft.bounds;if(yt&&!yt.contains(ot,st))return;ht=ft.x||0,mt=ft.y||0;const vt=ht+(ft.width||0),Tt=mt+(ft.height||0),Et=ft.clip;if(Et&&(ot<ht||ot>vt||st<mt||st>Tt))return;if(et.save(),et.translate(ht,mt),ht=ot-ht,mt=st-mt,Et&&hasCornerRadius(ft)&&!hitCorner(et,ft,ut,ct))return et.restore(),null;const xt=ft.strokeForeground,At=tt.interactive!==!1;return At&&xt&&ft.stroke&&hitForeground(et,ft,ut,ct)?(et.restore(),ft):(pt=pickVisit(ft,Ct=>pickMark(Ct,ht,mt)?this.pick(Ct,nt,rt,ht,mt):null),!pt&&At&&(ft.fill||!xt&&ft.stroke)&&hitBackground(et,ft,ut,ct)&&(pt=ft),et.restore(),pt||null)})}function pickMark(et,tt,nt){return(et.interactive!==!1||et.marktype==="group")&&et.bounds&&et.bounds.contains(tt,nt)}var group={type:"group",tag:"g",nested:!1,attr:attr$5,bound:bound$5,draw:draw$4,pick:pick$2,isect:intersectRect,content,background:background$1,foreground},metadata={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function getImage(et,tt){var nt=et.image;return(!nt||et.url&&et.url!==nt.url)&&(nt={complete:!1,width:0,height:0},tt.loadImage(et.url).then(rt=>{et.image=rt,et.image.url=et.url})),nt}function imageWidth(et,tt){return et.width!=null?et.width:!tt||!tt.width?0:et.aspect!==!1&&et.height?et.height*tt.width/tt.height:tt.width}function imageHeight(et,tt){return et.height!=null?et.height:!tt||!tt.height?0:et.aspect!==!1&&et.width?et.width*tt.height/tt.width:tt.height}function imageXOffset(et,tt){return et==="center"?tt/2:et==="right"?tt:0}function imageYOffset(et,tt){return et==="middle"?tt/2:et==="bottom"?tt:0}function attr$4(et,tt,nt){const rt=getImage(tt,nt),ot=imageWidth(tt,rt),st=imageHeight(tt,rt),ut=(tt.x||0)-imageXOffset(tt.align,ot),ct=(tt.y||0)-imageYOffset(tt.baseline,st),ft=!rt.src&&rt.toDataURL?rt.toDataURL():rt.src||"";et("href",ft,metadata["xmlns:xlink"],"xlink:href"),et("transform",translate$2(ut,ct)),et("width",ot),et("height",st),et("preserveAspectRatio",tt.aspect===!1?"none":"xMidYMid")}function bound$4(et,tt){const nt=tt.image,rt=imageWidth(tt,nt),ot=imageHeight(tt,nt),st=(tt.x||0)-imageXOffset(tt.align,rt),ut=(tt.y||0)-imageYOffset(tt.baseline,ot);return et.set(st,ut,st+rt,ut+ot)}function draw$3(et,tt,nt){visit(tt,rt=>{if(nt&&!nt.intersects(rt.bounds))return;const ot=getImage(rt,this);let st=imageWidth(rt,ot),ut=imageHeight(rt,ot);if(st===0||ut===0)return;let ct=(rt.x||0)-imageXOffset(rt.align,st),ft=(rt.y||0)-imageYOffset(rt.baseline,ut),pt,ht,mt,yt;rt.aspect!==!1&&(ht=ot.width/ot.height,mt=rt.width/rt.height,ht===ht&&mt===mt&&ht!==mt&&(mt<ht?(yt=st/ht,ft+=(ut-yt)/2,ut=yt):(yt=ut*ht,ct+=(st-yt)/2,st=yt))),(ot.complete||ot.toDataURL)&&(blend(et,rt),et.globalAlpha=(pt=rt.opacity)!=null?pt:1,et.imageSmoothingEnabled=rt.smooth!==!1,et.drawImage(ot,ct,ft,st,ut))})}var image$1={type:"image",tag:"image",nested:!1,attr:attr$4,bound:bound$4,draw:draw$3,pick:pick$1$1(),isect:truthy,get:getImage,xOffset:imageXOffset,yOffset:imageYOffset},line$2=markMultiItemPath("line",line$1$1,pickLine);function attr$3(et,tt){var nt=tt.scaleX||1,rt=tt.scaleY||1;(nt!==1||rt!==1)&&et("vector-effect","non-scaling-stroke"),et("transform",transformItem(tt)),et("d",tt.path)}function path$1(et,tt){var nt=tt.path;if(nt==null)return!0;var rt=tt.x||0,ot=tt.y||0,st=tt.scaleX||1,ut=tt.scaleY||1,ct=(tt.angle||0)*DegToRad,ft=tt.pathCache;(!ft||ft.path!==nt)&&((tt.pathCache=ft=parse$5(nt)).path=nt),ct&&et.rotate&&et.translate?(et.translate(rt,ot),et.rotate(ct),pathRender(et,ft,0,0,st,ut),et.rotate(-ct),et.translate(-rt,-ot)):pathRender(et,ft,rt,ot,st,ut)}function bound$3(et,tt){return path$1(boundContext(et,tt.angle),tt)?et.set(0,0,0,0):boundStroke(et,tt,!0)}var path$2={type:"path",tag:"path",nested:!1,attr:attr$3,bound:bound$3,draw:drawAll(path$1),pick:pickPath(path$1),isect:intersectPath(path$1)};function attr$2(et,tt){et("d",rectangle(null,tt))}function bound$2(et,tt){var nt,rt;return boundStroke(et.set(nt=tt.x||0,rt=tt.y||0,nt+tt.width||0,rt+tt.height||0),tt)}function draw$2(et,tt){et.beginPath(),rectangle(et,tt)}var rect$1={type:"rect",tag:"path",nested:!1,attr:attr$2,bound:bound$2,draw:drawAll(draw$2),pick:pickPath(draw$2),isect:intersectRect};function attr$1(et,tt){et("transform",translateItem(tt)),et("x2",tt.x2!=null?tt.x2-(tt.x||0):0),et("y2",tt.y2!=null?tt.y2-(tt.y||0):0)}function bound$1(et,tt){var nt,rt;return boundStroke(et.set(nt=tt.x||0,rt=tt.y||0,tt.x2!=null?tt.x2:nt,tt.y2!=null?tt.y2:rt),tt)}function path(et,tt,nt){var rt,ot,st,ut;return tt.stroke&&stroke(et,tt,nt)?(rt=tt.x||0,ot=tt.y||0,st=tt.x2!=null?tt.x2:rt,ut=tt.y2!=null?tt.y2:ot,et.beginPath(),et.moveTo(rt,ot),et.lineTo(st,ut),!0):!1}function draw$1(et,tt,nt){visit(tt,rt=>{if(!(nt&&!nt.intersects(rt.bounds))){var ot=rt.opacity==null?1:rt.opacity;ot&&path(et,rt,ot)&&(blend(et,rt),et.stroke())}})}function hit$1(et,tt,nt,rt){return et.isPointInStroke?path(et,tt,1)&&et.isPointInStroke(nt,rt):!1}var rule$2={type:"rule",tag:"line",nested:!1,attr:attr$1,bound:bound$1,draw:draw$1,pick:pick$1$1(hit$1),isect:intersectRule},shape$2=markItemPath("shape",shape$1$1),symbol=markItemPath("symbol",symbol$1,intersectPoint);const widthCache=lruCache$1();var textMetrics={height:fontSize$1,measureWidth,estimateWidth,width:estimateWidth,canvas:useCanvas};useCanvas(!0);function useCanvas(et){textMetrics.width=et&&context$2?measureWidth:estimateWidth}function estimateWidth(et,tt){return _estimateWidth(textValue(et,tt),fontSize$1(et))}function _estimateWidth(et,tt){return~~(.8*et.length*tt)}function measureWidth(et,tt){return fontSize$1(et)<=0||!(tt=textValue(et,tt))?0:_measureWidth(tt,font$1(et))}function _measureWidth(et,tt){const nt=`(${tt}) ${et}`;let rt=widthCache.get(nt);return rt===void 0&&(context$2.font=tt,rt=context$2.measureText(et).width,widthCache.set(nt,rt)),rt}function fontSize$1(et){return et.fontSize!=null?+et.fontSize||0:11}function lineHeight$1(et){return et.lineHeight!=null?et.lineHeight:fontSize$1(et)+2}function lineArray(et){return isArray(et)?et.length>1?et:et[0]:et}function textLines(et){return lineArray(et.lineBreak&&et.text&&!isArray(et.text)?et.text.split(et.lineBreak):et.text)}function multiLineOffset(et){const tt=textLines(et);return(isArray(tt)?tt.length-1:0)*lineHeight$1(et)}function textValue(et,tt){const nt=tt==null?"":(tt+"").trim();return et.limit>0&&nt.length?truncate(et,nt):nt}function widthGetter(et){if(textMetrics.width===measureWidth){const tt=font$1(et);return nt=>_measureWidth(nt,tt)}else{const tt=fontSize$1(et);return nt=>_estimateWidth(nt,tt)}}function truncate(et,tt){var nt=+et.limit,rt=widthGetter(et);if(rt(tt)<nt)return tt;var ot=et.ellipsis||"\u2026",st=et.dir==="rtl",ut=0,ct=tt.length,ft;if(nt-=rt(ot),st){for(;ut<ct;)ft=ut+ct>>>1,rt(tt.slice(ft))>nt?ut=ft+1:ct=ft;return ot+tt.slice(ut)}else{for(;ut<ct;)ft=1+(ut+ct>>>1),rt(tt.slice(0,ft))<nt?ut=ft:ct=ft-1;return tt.slice(0,ut)+ot}}function fontFamily$1(et,tt){var nt=et.font;return(tt&&nt?String(nt).replace(/"/g,"'"):nt)||"sans-serif"}function font$1(et,tt){return(et.fontStyle?et.fontStyle+" ":"")+(et.fontVariant?et.fontVariant+" ":"")+(et.fontWeight?et.fontWeight+" ":"")+fontSize$1(et)+"px "+fontFamily$1(et,tt)}function offset$2(et){var tt=et.baseline,nt=fontSize$1(et);return Math.round(tt==="top"?.79*nt:tt==="middle"?.3*nt:tt==="bottom"?-.21*nt:tt==="line-top"?.29*nt+.5*lineHeight$1(et):tt==="line-bottom"?.29*nt-.5*lineHeight$1(et):0)}const textAlign$1={left:"start",center:"middle",right:"end"},tempBounds$1=new Bounds;function anchorPoint(et){var tt=et.x||0,nt=et.y||0,rt=et.radius||0,ot;return rt&&(ot=(et.theta||0)-HalfPi,tt+=rt*Math.cos(ot),nt+=rt*Math.sin(ot)),tempBounds$1.x1=tt,tempBounds$1.y1=nt,tempBounds$1}function attr(et,tt){var nt=tt.dx||0,rt=(tt.dy||0)+offset$2(tt),ot=anchorPoint(tt),st=ot.x1,ut=ot.y1,ct=tt.angle||0,ft;et("text-anchor",textAlign$1[tt.align]||"start"),ct?(ft=translate$2(st,ut)+" "+rotate$1(ct),(nt||rt)&&(ft+=" "+translate$2(nt,rt))):ft=translate$2(st+nt,ut+rt),et("transform",ft)}function bound(et,tt,nt){var rt=textMetrics.height(tt),ot=tt.align,st=anchorPoint(tt),ut=st.x1,ct=st.y1,ft=tt.dx||0,pt=(tt.dy||0)+offset$2(tt)-Math.round(.8*rt),ht=textLines(tt),mt;if(isArray(ht)?(rt+=lineHeight$1(tt)*(ht.length-1),mt=ht.reduce((yt,vt)=>Math.max(yt,textMetrics.width(tt,vt)),0)):mt=textMetrics.width(tt,ht),ot==="center"?ft-=mt/2:ot==="right"&&(ft-=mt),et.set(ft+=ut,pt+=ct,ft+mt,pt+rt),tt.angle&&!nt)et.rotate(tt.angle*DegToRad,ut,ct);else if(nt===2)return et.rotatedPoints(tt.angle*DegToRad,ut,ct);return et}function draw$5(et,tt,nt){visit(tt,rt=>{var ot=rt.opacity==null?1:rt.opacity,st,ut,ct,ft,pt,ht,mt;if(!(nt&&!nt.intersects(rt.bounds)||ot===0||rt.fontSize<=0||rt.text==null||rt.text.length===0)){if(et.font=font$1(rt),et.textAlign=rt.align||"left",st=anchorPoint(rt),ut=st.x1,ct=st.y1,rt.angle&&(et.save(),et.translate(ut,ct),et.rotate(rt.angle*DegToRad),ut=ct=0),ut+=rt.dx||0,ct+=(rt.dy||0)+offset$2(rt),ht=textLines(rt),blend(et,rt),isArray(ht))for(pt=lineHeight$1(rt),ft=0;ft<ht.length;++ft)mt=textValue(rt,ht[ft]),rt.fill&&fill(et,rt,ot)&&et.fillText(mt,ut,ct),rt.stroke&&stroke(et,rt,ot)&&et.strokeText(mt,ut,ct),ct+=pt;else mt=textValue(rt,ht),rt.fill&&fill(et,rt,ot)&&et.fillText(mt,ut,ct),rt.stroke&&stroke(et,rt,ot)&&et.strokeText(mt,ut,ct);rt.angle&&et.restore()}})}function hit(et,tt,nt,rt,ot,st){if(tt.fontSize<=0)return!1;if(!tt.angle)return!0;var ut=anchorPoint(tt),ct=ut.x1,ft=ut.y1,pt=bound(tempBounds$1,tt,1),ht=-tt.angle*DegToRad,mt=Math.cos(ht),yt=Math.sin(ht),vt=mt*ot-yt*st+(ct-mt*ct+yt*ft),Tt=yt*ot+mt*st+(ft-yt*ct-mt*ft);return pt.contains(vt,Tt)}function intersectText(et,tt){const nt=bound(tempBounds$1,et,2);return intersectBoxLine(tt,nt[0],nt[1],nt[2],nt[3])||intersectBoxLine(tt,nt[0],nt[1],nt[4],nt[5])||intersectBoxLine(tt,nt[4],nt[5],nt[6],nt[7])||intersectBoxLine(tt,nt[2],nt[3],nt[6],nt[7])}var text$2={type:"text",tag:"text",nested:!1,attr,bound,draw:draw$5,pick:pick$1$1(hit),isect:intersectText},trail$2=markMultiItemPath("trail",trail$1,pickTrail),Marks={arc:arc$2,area:area$2,group,image:image$1,line:line$2,path:path$2,rect:rect$1,rule:rule$2,shape:shape$2,symbol,text:text$2,trail:trail$2};function boundItem$1(et,tt,nt){var rt=Marks[et.mark.marktype],ot=tt||rt.bound;return rt.nested&&(et=et.mark),ot(et.bounds||(et.bounds=new Bounds),et,nt)}var DUMMY={mark:null};function boundMark(et,tt,nt){var rt=Marks[et.marktype],ot=rt.bound,st=et.items,ut=st&&st.length,ct,ft,pt,ht;if(rt.nested)return ut?pt=st[0]:(DUMMY.mark=et,pt=DUMMY),ht=boundItem$1(pt,ot,nt),tt=tt&&tt.union(ht)||ht,tt;if(tt=tt||et.bounds&&et.bounds.clear()||new Bounds,ut)for(ct=0,ft=st.length;ct<ft;++ct)tt.union(boundItem$1(st[ct],ot,nt));return et.bounds=tt}const keys$3=["marktype","name","role","interactive","clip","items","zindex","x","y","width","height","align","baseline","fill","fillOpacity","opacity","blend","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","strokeForeground","strokeOffset","startAngle","endAngle","innerRadius","outerRadius","cornerRadius","padAngle","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight","interpolate","tension","orient","defined","url","aspect","smooth","path","scaleX","scaleY","x2","y2","size","shape","text","angle","theta","radius","dir","dx","dy","ellipsis","limit","lineBreak","lineHeight","font","fontSize","fontWeight","fontStyle","fontVariant","description","aria","ariaRole","ariaRoleDescription"];function sceneToJSON(et,tt){return JSON.stringify(et,keys$3,tt)}function sceneFromJSON(et){const tt=typeof et=="string"?JSON.parse(et):et;return initialize$1(tt)}function initialize$1(et){var tt=et.marktype,nt=et.items,rt,ot,st;if(nt)for(ot=0,st=nt.length;ot<st;++ot)rt=tt?"mark":"group",nt[ot][rt]=et,nt[ot].zindex&&(nt[ot][rt].zdirty=!0),(tt||rt)==="group"&&initialize$1(nt[ot]);return tt&&boundMark(et),et}function Scenegraph(et){arguments.length?this.root=sceneFromJSON(et):(this.root=createMark({marktype:"group",name:"root",role:"frame"}),this.root.items=[new GroupItem$1(this.root)])}Scenegraph.prototype={toJSON(et){return sceneToJSON(this.root,et||0)},mark(et,tt,nt){tt=tt||this.root.items[0];const rt=createMark(et,tt);return tt.items[nt]=rt,rt.zindex&&(rt.group.zdirty=!0),rt}};function createMark(et,tt){const nt={bounds:new Bounds,clip:!!et.clip,group:tt,interactive:et.interactive!==!1,items:[],marktype:et.marktype,name:et.name||void 0,role:et.role||void 0,zindex:et.zindex||0};return et.aria!=null&&(nt.aria=et.aria),et.description&&(nt.description=et.description),nt}function domCreate(et,tt,nt){return!et&&typeof document<"u"&&document.createElement&&(et=document),et?nt?et.createElementNS(nt,tt):et.createElement(tt):null}function domFind(et,tt){tt=tt.toLowerCase();for(var nt=et.childNodes,rt=0,ot=nt.length;rt<ot;++rt)if(nt[rt].tagName.toLowerCase()===tt)return nt[rt]}function domChild(et,tt,nt,rt){var ot=et.childNodes[tt],st;return(!ot||ot.tagName.toLowerCase()!==nt.toLowerCase())&&(st=ot||null,ot=domCreate(et.ownerDocument,nt,rt),et.insertBefore(ot,st)),ot}function domClear(et,tt){for(var nt=et.childNodes,rt=nt.length;rt>tt;)et.removeChild(nt[--rt]);return et}function cssClass(et){return"mark-"+et.marktype+(et.role?" role-"+et.role:"")+(et.name?" "+et.name:"")}function point$2(et,tt){const nt=tt.getBoundingClientRect();return[et.clientX-nt.left-(tt.clientLeft||0),et.clientY-nt.top-(tt.clientTop||0)]}function resolveItem(et,tt,nt,rt){var ot=et&&et.mark,st,ut;if(ot&&(st=Marks[ot.marktype]).tip){for(ut=point$2(tt,nt),ut[0]-=rt[0],ut[1]-=rt[1];et=et.mark.group;)ut[0]-=et.x||0,ut[1]-=et.y||0;et=st.tip(ot.items,ut)}return et}function Handler$1(et,tt){this._active=null,this._handlers={},this._loader=et||loader(),this._tooltip=tt||defaultTooltip$1}function defaultTooltip$1(et,tt,nt,rt){et.element().setAttribute("title",rt||"")}Handler$1.prototype={initialize(et,tt,nt){return this._el=et,this._obj=nt||null,this.origin(tt)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(et){return arguments.length?(this._origin=et||[0,0],this):this._origin.slice()},scene(et){return arguments.length?(this._scene=et,this):this._scene},on(){},off(){},_handlerIndex(et,tt,nt){for(let rt=et?et.length:0;--rt>=0;)if(et[rt].type===tt&&(!nt||et[rt].handler===nt))return rt;return-1},handlers(et){const tt=this._handlers,nt=[];if(et)nt.push(...tt[this.eventName(et)]);else for(const rt in tt)nt.push(...tt[rt]);return nt},eventName(et){const tt=et.indexOf(".");return tt<0?et:et.slice(0,tt)},handleHref(et,tt,nt){this._loader.sanitize(nt,{context:"href"}).then(rt=>{const ot=new MouseEvent(et.type,et),st=domCreate(null,"a");for(const ut in rt)st.setAttribute(ut,rt[ut]);st.dispatchEvent(ot)}).catch(()=>{})},handleTooltip(et,tt,nt){if(tt&&tt.tooltip!=null){tt=resolveItem(tt,et,this.canvas(),this._origin);const rt=nt&&tt&&tt.tooltip||null;this._tooltip.call(this._obj,this,et,tt,rt)}},getItemBoundingClientRect(et){const tt=this.canvas();if(!tt)return;const nt=tt.getBoundingClientRect(),rt=this._origin,ot=et.bounds,st=ot.width(),ut=ot.height();let ct=ot.x1+rt[0]+nt.left,ft=ot.y1+rt[1]+nt.top;for(;et.mark&&(et=et.mark.group);)ct+=et.x||0,ft+=et.y||0;return{x:ct,y:ft,width:st,height:ut,left:ct,top:ft,right:ct+st,bottom:ft+ut}}};function Renderer(et){this._el=null,this._bgcolor=null,this._loader=new ResourceLoader(et)}Renderer.prototype={initialize(et,tt,nt,rt,ot){return this._el=et,this.resize(tt,nt,rt,ot)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(et){return arguments.length===0?this._bgcolor:(this._bgcolor=et,this)},resize(et,tt,nt,rt){return this._width=et,this._height=tt,this._origin=nt||[0,0],this._scale=rt||1,this},dirty(){},render(et){const tt=this;return tt._call=function(){tt._render(et)},tt._call(),tt._call=null,tt},_render(){},renderAsync(et){const tt=this.render(et);return this._ready?this._ready.then(()=>tt):Promise.resolve(tt)},_load(et,tt){var nt=this,rt=nt._loader[et](tt);if(!nt._ready){const ot=nt._call;nt._ready=nt._loader.ready().then(st=>{st&&ot(),nt._ready=null})}return rt},sanitizeURL(et){return this._load("sanitizeURL",et)},loadImage(et){return this._load("loadImage",et)}};const KeyDownEvent="keydown",KeyPressEvent="keypress",KeyUpEvent="keyup",DragEnterEvent="dragenter",DragLeaveEvent="dragleave",DragOverEvent="dragover",MouseDownEvent="mousedown",MouseUpEvent="mouseup",MouseMoveEvent="mousemove",MouseOutEvent="mouseout",MouseOverEvent="mouseover",ClickEvent="click",DoubleClickEvent="dblclick",WheelEvent="wheel",MouseWheelEvent="mousewheel",TouchStartEvent="touchstart",TouchMoveEvent="touchmove",TouchEndEvent="touchend",Events=[KeyDownEvent,KeyPressEvent,KeyUpEvent,DragEnterEvent,DragLeaveEvent,DragOverEvent,MouseDownEvent,MouseUpEvent,MouseMoveEvent,MouseOutEvent,MouseOverEvent,ClickEvent,DoubleClickEvent,WheelEvent,MouseWheelEvent,TouchStartEvent,TouchMoveEvent,TouchEndEvent],TooltipShowEvent=MouseMoveEvent,TooltipHideEvent=MouseOutEvent,HrefEvent=ClickEvent;function CanvasHandler(et,tt){Handler$1.call(this,et,tt),this._down=null,this._touch=null,this._first=!0,this._events={}}const eventBundle=et=>et===TouchStartEvent||et===TouchMoveEvent||et===TouchEndEvent?[TouchStartEvent,TouchMoveEvent,TouchEndEvent]:[et];function eventListenerCheck(et,tt){eventBundle(tt).forEach(nt=>addEventListener(et,nt))}function addEventListener(et,tt){const nt=et.canvas();nt&&!et._events[tt]&&(et._events[tt]=1,nt.addEventListener(tt,et[tt]?rt=>et[tt](rt):rt=>et.fire(tt,rt)))}function move(et,tt,nt){return function(rt){const ot=this._active,st=this.pickEvent(rt);st===ot?this.fire(et,rt):((!ot||!ot.exit)&&this.fire(nt,rt),this._active=st,this.fire(tt,rt),this.fire(et,rt))}}function inactive(et){return function(tt){this.fire(et,tt),this._active=null}}inherits(CanvasHandler,Handler$1,{initialize(et,tt,nt){return this._canvas=et&&domFind(et,"canvas"),[ClickEvent,MouseDownEvent,MouseMoveEvent,MouseOutEvent,DragLeaveEvent].forEach(rt=>eventListenerCheck(this,rt)),Handler$1.prototype.initialize.call(this,et,tt,nt)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:Events,DOMMouseScroll(et){this.fire(MouseWheelEvent,et)},mousemove:move(MouseMoveEvent,MouseOverEvent,MouseOutEvent),dragover:move(DragOverEvent,DragEnterEvent,DragLeaveEvent),mouseout:inactive(MouseOutEvent),dragleave:inactive(DragLeaveEvent),mousedown(et){this._down=this._active,this.fire(MouseDownEvent,et)},click(et){this._down===this._active&&(this.fire(ClickEvent,et),this._down=null)},touchstart(et){this._touch=this.pickEvent(et.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(TouchStartEvent,et,!0)},touchmove(et){this.fire(TouchMoveEvent,et,!0)},touchend(et){this.fire(TouchEndEvent,et,!0),this._touch=null},fire(et,tt,nt){const rt=nt?this._touch:this._active,ot=this._handlers[et];if(tt.vegaType=et,et===HrefEvent&&rt&&rt.href?this.handleHref(tt,rt,rt.href):(et===TooltipShowEvent||et===TooltipHideEvent)&&this.handleTooltip(tt,rt,et!==TooltipHideEvent),ot)for(let st=0,ut=ot.length;st<ut;++st)ot[st].handler.call(this._obj,tt,rt)},on(et,tt){const nt=this.eventName(et),rt=this._handlers;return this._handlerIndex(rt[nt],et,tt)<0&&(eventListenerCheck(this,et),(rt[nt]||(rt[nt]=[])).push({type:et,handler:tt})),this},off(et,tt){const nt=this.eventName(et),rt=this._handlers[nt],ot=this._handlerIndex(rt,et,tt);return ot>=0&&rt.splice(ot,1),this},pickEvent(et){const tt=point$2(et,this._canvas),nt=this._origin;return this.pick(this._scene,tt[0],tt[1],tt[0]-nt[0],tt[1]-nt[1])},pick(et,tt,nt,rt,ot){const st=this.context();return Marks[et.marktype].pick.call(this,st,et,tt,nt,rt,ot)}});function devicePixelRatio$1(){return typeof window<"u"&&window.devicePixelRatio||1}var pixelRatio=devicePixelRatio$1();function resize(et,tt,nt,rt,ot,st){const ut=typeof HTMLElement<"u"&&et instanceof HTMLElement&&et.parentNode!=null,ct=et.getContext("2d"),ft=ut?pixelRatio:ot;et.width=tt*ft,et.height=nt*ft;for(const pt in st)ct[pt]=st[pt];return ut&&ft!==1&&(et.style.width=tt+"px",et.style.height=nt+"px"),ct.pixelRatio=ft,ct.setTransform(ft,0,0,ft,ft*rt[0],ft*rt[1]),et}function CanvasRenderer(et){Renderer.call(this,et),this._options={},this._redraw=!1,this._dirty=new Bounds,this._tempb=new Bounds}const base$1=Renderer.prototype,viewBounds=(et,tt,nt)=>new Bounds().set(0,0,tt,nt).translate(-et[0],-et[1]);function clipToBounds(et,tt,nt){return tt.expand(1).round(),et.pixelRatio%1&&tt.scale(et.pixelRatio).round().scale(1/et.pixelRatio),tt.translate(-(nt[0]%1),-(nt[1]%1)),et.beginPath(),et.rect(tt.x1,tt.y1,tt.width(),tt.height()),et.clip(),tt}inherits(CanvasRenderer,Renderer,{initialize(et,tt,nt,rt,ot,st){return this._options=st||{},this._canvas=this._options.externalContext?null:domCanvas(1,1,this._options.type),et&&this._canvas&&(domClear(et,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),base$1.initialize.call(this,et,tt,nt,rt,ot)},resize(et,tt,nt,rt){if(base$1.resize.call(this,et,tt,nt,rt),this._canvas)resize(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const ot=this._options.externalContext;ot||error("CanvasRenderer is missing a valid canvas or context"),ot.scale(this._scale,this._scale),ot.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(et){const tt=this._tempb.clear().union(et.bounds);let nt=et.mark.group;for(;nt;)tt.translate(nt.x||0,nt.y||0),nt=nt.mark.group;this._dirty.union(tt)},_render(et){const tt=this.context(),nt=this._origin,rt=this._width,ot=this._height,st=this._dirty,ut=viewBounds(nt,rt,ot);tt.save();const ct=this._redraw||st.empty()?(this._redraw=!1,ut.expand(1)):clipToBounds(tt,ut.intersect(st),nt);return this.clear(-nt[0],-nt[1],rt,ot),this.draw(tt,et,ct),tt.restore(),st.clear(),this},draw(et,tt,nt){const rt=Marks[tt.marktype];tt.clip&&clip$2(et,tt),rt.draw.call(this,et,tt,nt),tt.clip&&et.restore()},clear(et,tt,nt,rt){const ot=this._options,st=this.context();ot.type!=="pdf"&&!ot.externalContext&&st.clearRect(et,tt,nt,rt),this._bgcolor!=null&&(st.fillStyle=this._bgcolor,st.fillRect(et,tt,nt,rt))}});function SVGHandler(et,tt){Handler$1.call(this,et,tt);const nt=this;nt._hrefHandler=listener(nt,(rt,ot)=>{ot&&ot.href&&nt.handleHref(rt,ot,ot.href)}),nt._tooltipHandler=listener(nt,(rt,ot)=>{nt.handleTooltip(rt,ot,rt.type!==TooltipHideEvent)})}const listener=(et,tt)=>nt=>{let rt=nt.target.__data__;rt=Array.isArray(rt)?rt[0]:rt,nt.vegaType=nt.type,tt.call(et._obj,nt,rt)};inherits(SVGHandler,Handler$1,{initialize(et,tt,nt){let rt=this._svg;return rt&&(rt.removeEventListener(HrefEvent,this._hrefHandler),rt.removeEventListener(TooltipShowEvent,this._tooltipHandler),rt.removeEventListener(TooltipHideEvent,this._tooltipHandler)),this._svg=rt=et&&domFind(et,"svg"),rt&&(rt.addEventListener(HrefEvent,this._hrefHandler),rt.addEventListener(TooltipShowEvent,this._tooltipHandler),rt.addEventListener(TooltipHideEvent,this._tooltipHandler)),Handler$1.prototype.initialize.call(this,et,tt,nt)},canvas(){return this._svg},on(et,tt){const nt=this.eventName(et),rt=this._handlers;if(this._handlerIndex(rt[nt],et,tt)<0){const st={type:et,handler:tt,listener:listener(this,tt)};(rt[nt]||(rt[nt]=[])).push(st),this._svg&&this._svg.addEventListener(nt,st.listener)}return this},off(et,tt){const nt=this.eventName(et),rt=this._handlers[nt],ot=this._handlerIndex(rt,et,tt);return ot>=0&&(this._svg&&this._svg.removeEventListener(nt,rt[ot].listener),rt.splice(ot,1)),this}});const ARIA_HIDDEN="aria-hidden",ARIA_LABEL="aria-label",ARIA_ROLE="role",ARIA_ROLEDESCRIPTION="aria-roledescription",GRAPHICS_OBJECT="graphics-object",GRAPHICS_SYMBOL="graphics-symbol",bundle=(et,tt,nt)=>({[ARIA_ROLE]:et,[ARIA_ROLEDESCRIPTION]:tt,[ARIA_LABEL]:nt||void 0}),AriaIgnore=toSet(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),AriaGuides={axis:{desc:"axis",caption:axisCaption},legend:{desc:"legend",caption:legendCaption},"title-text":{desc:"title",caption:et=>`Title text '${titleCaption(et)}'`},"title-subtitle":{desc:"subtitle",caption:et=>`Subtitle text '${titleCaption(et)}'`}},AriaEncode={ariaRole:ARIA_ROLE,ariaRoleDescription:ARIA_ROLEDESCRIPTION,description:ARIA_LABEL};function ariaItemAttributes(et,tt){const nt=tt.aria===!1;if(et(ARIA_HIDDEN,nt||void 0),nt||tt.description==null)for(const rt in AriaEncode)et(AriaEncode[rt],void 0);else{const rt=tt.mark.marktype;et(ARIA_LABEL,tt.description),et(ARIA_ROLE,tt.ariaRole||(rt==="group"?GRAPHICS_OBJECT:GRAPHICS_SYMBOL)),et(ARIA_ROLEDESCRIPTION,tt.ariaRoleDescription||`${rt} mark`)}}function ariaMarkAttributes(et){return et.aria===!1?{[ARIA_HIDDEN]:!0}:AriaIgnore[et.role]?null:AriaGuides[et.role]?ariaGuide(et,AriaGuides[et.role]):ariaMark(et)}function ariaMark(et){const tt=et.marktype,nt=tt==="group"||tt==="text"||et.items.some(rt=>rt.description!=null&&rt.aria!==!1);return bundle(nt?GRAPHICS_OBJECT:GRAPHICS_SYMBOL,`${tt} mark container`,et.description)}function ariaGuide(et,tt){try{const nt=et.items[0],rt=tt.caption||(()=>"");return bundle(tt.role||GRAPHICS_SYMBOL,tt.desc,nt.description||rt(nt))}catch{return null}}function titleCaption(et){return array$5(et.text).join(" ")}function axisCaption(et){const tt=et.datum,nt=et.orient,rt=tt.title?extractTitle(et):null,ot=et.context,st=ot.scales[tt.scale].value,ut=ot.dataflow.locale(),ct=st.type;return`${nt==="left"||nt==="right"?"Y":"X"}-axis`+(rt?` titled '${rt}'`:"")+` for a ${isDiscrete$2(ct)?"discrete":ct} scale with ${domainCaption(ut,st,et)}`}function legendCaption(et){const tt=et.datum,nt=tt.title?extractTitle(et):null,rt=`${tt.type||""} legend`.trim(),ot=tt.scales,st=Object.keys(ot),ut=et.context,ct=ut.scales[ot[st[0]]].value,ft=ut.dataflow.locale();return capitalize$1(rt)+(nt?` titled '${nt}'`:"")+` for ${channelCaption(st)} with ${domainCaption(ft,ct,et)}`}function extractTitle(et){try{return array$5(peek$2(et.items).items[0].text).join(" ")}catch{return null}}function channelCaption(et){return et=et.map(tt=>tt+(tt==="fill"||tt==="stroke"?" color":"")),et.length<2?et[0]:et.slice(0,-1).join(", ")+" and "+peek$2(et)}function capitalize$1(et){return et.length?et[0].toUpperCase()+et.slice(1):et}const innerText=et=>(et+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),attrText=et=>innerText(et).replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;");function markup(){let et="",tt="",nt="";const rt=[],ot=()=>tt=nt="",st=ft=>{tt&&(et+=`${tt}>${nt}`,ot()),rt.push(ft)},ut=(ft,pt)=>(pt!=null&&(tt+=` ${ft}="${attrText(pt)}"`),ct),ct={open(ft){st(ft),tt="<"+ft;for(var pt=arguments.length,ht=new Array(pt>1?pt-1:0),mt=1;mt<pt;mt++)ht[mt-1]=arguments[mt];for(const yt of ht)for(const vt in yt)ut(vt,yt[vt]);return ct},close(){const ft=rt.pop();return tt?et+=tt+(nt?`>${nt}</${ft}>`:"/>"):et+=`</${ft}>`,ot(),ct},attr:ut,text:ft=>(nt+=innerText(ft),ct),toString:()=>et};return ct}const serializeXML=et=>_serialize(markup(),et)+"";function _serialize(et,tt){if(et.open(tt.tagName),tt.hasAttributes()){const nt=tt.attributes,rt=nt.length;for(let ot=0;ot<rt;++ot)et.attr(nt[ot].name,nt[ot].value)}if(tt.hasChildNodes()){const nt=tt.childNodes;for(const rt of nt)rt.nodeType===3?et.text(rt.nodeValue):_serialize(et,rt)}return et.close()}const stylesAttr={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity"},stylesCss={blend:"mix-blend-mode"},rootAttributes={fill:"none","stroke-miterlimit":10},RootIndex=0,xmlns="http://www.w3.org/2000/xmlns/",svgns=metadata.xmlns;function SVGRenderer(et){Renderer.call(this,et),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}const base=Renderer.prototype;inherits(SVGRenderer,Renderer,{initialize(et,tt,nt,rt,ot){return this._defs={},this._clearDefs(),et&&(this._svg=domChild(et,0,"svg",svgns),this._svg.setAttributeNS(xmlns,"xmlns",svgns),this._svg.setAttributeNS(xmlns,"xmlns:xlink",metadata["xmlns:xlink"]),this._svg.setAttribute("version",metadata.version),this._svg.setAttribute("class","marks"),domClear(et,1),this._root=domChild(this._svg,RootIndex,"g",svgns),setAttributes$1(this._root,rootAttributes),domClear(this._svg,RootIndex+1)),this.background(this._bgcolor),base.initialize.call(this,et,tt,nt,rt,ot)},background(et){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",et),base.background.apply(this,arguments)},resize(et,tt,nt,rt){return base.resize.call(this,et,tt,nt,rt),this._svg&&(setAttributes$1(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const et=this._svg,tt=this._bgcolor;if(!et)return null;let nt;tt&&(et.removeAttribute("style"),nt=domChild(et,RootIndex,"rect",svgns),setAttributes$1(nt,{width:this._width,height:this._height,fill:tt}));const rt=serializeXML(et);return tt&&(et.removeChild(nt),this._svg.style.setProperty("background-color",tt)),rt},_render(et){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,et),domClear(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(et){et.dirty!==this._dirtyID&&(et.dirty=this._dirtyID,this._dirty.push(et))},isDirty(et){return this._dirtyAll||!et._svg||!et._svg.ownerSVGElement||et.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const et=this._dirty;if(!et.length||!this._dirtyID)return!0;const tt=++this._dirtyID;let nt,rt,ot,st,ut,ct,ft;for(ut=0,ct=et.length;ut<ct;++ut)if(nt=et[ut],rt=nt.mark,rt.marktype!==ot&&(ot=rt.marktype,st=Marks[ot]),rt.zdirty&&rt.dirty!==tt&&(this._dirtyAll=!1,dirtyParents(nt,tt),rt.items.forEach(pt=>{pt.dirty=tt})),!rt.zdirty){if(nt.exit){st.nested&&rt.items.length?(ft=rt.items[0],ft._svg&&this._update(st,ft._svg,ft)):nt._svg&&(ft=nt._svg.parentNode,ft&&ft.removeChild(nt._svg)),nt._svg=null;continue}nt=st.nested?rt.items[0]:nt,nt._update!==tt&&(!nt._svg||!nt._svg.ownerSVGElement?(this._dirtyAll=!1,dirtyParents(nt,tt)):this._update(st,nt._svg,nt),nt._update=tt)}return!this._dirtyAll},mark(et,tt,nt){if(!this.isDirty(tt))return tt._svg;const rt=this._svg,ot=Marks[tt.marktype],st=tt.interactive===!1?"none":null,ut=ot.tag==="g",ct=bind$1(tt,et,nt,"g",rt);ct.setAttribute("class",cssClass(tt));const ft=ariaMarkAttributes(tt);for(const yt in ft)setAttribute(ct,yt,ft[yt]);ut||setAttribute(ct,"pointer-events",st),setAttribute(ct,"clip-path",tt.clip?clip$1$1(this,tt,tt.group):null);let pt=null,ht=0;const mt=yt=>{const vt=this.isDirty(yt),Tt=bind$1(yt,ct,pt,ot.tag,rt);vt&&(this._update(ot,Tt,yt),ut&&recurse(this,Tt,yt)),pt=Tt,++ht};return ot.nested?tt.items.length&&mt(tt.items[0]):visit(tt,mt),domClear(ct,ht),ct},_update(et,tt,nt){element$1=tt,values$4=tt.__values__,ariaItemAttributes(emit,nt),et.attr(emit,nt,this);const rt=mark_extras[et.type];rt&&rt.call(this,et,tt,nt),element$1&&this.style(element$1,nt)},style(et,tt){if(tt!=null){for(const nt in stylesAttr){let rt=nt==="font"?fontFamily$1(tt):tt[nt];if(rt===values$4[nt])continue;const ot=stylesAttr[nt];rt==null?et.removeAttribute(ot):(isGradient(rt)&&(rt=gradientRef(rt,this._defs.gradient,href())),et.setAttribute(ot,rt+"")),values$4[nt]=rt}for(const nt in stylesCss)setStyle(et,stylesCss[nt],tt[nt])}},defs(){const et=this._svg,tt=this._defs;let nt=tt.el,rt=0;for(const ot in tt.gradient)nt||(tt.el=nt=domChild(et,RootIndex+1,"defs",svgns)),rt=updateGradient(nt,tt.gradient[ot],rt);for(const ot in tt.clipping)nt||(tt.el=nt=domChild(et,RootIndex+1,"defs",svgns)),rt=updateClipping(nt,tt.clipping[ot],rt);nt&&(rt===0?(et.removeChild(nt),tt.el=null):domClear(nt,rt))},_clearDefs(){const et=this._defs;et.gradient={},et.clipping={}}});function dirtyParents(et,tt){for(;et&&et.dirty!==tt;et=et.mark.group)if(et.dirty=tt,et.mark&&et.mark.dirty!==tt)et.mark.dirty=tt;else return}function updateGradient(et,tt,nt){let rt,ot,st;if(tt.gradient==="radial"){let ut=domChild(et,nt++,"pattern",svgns);setAttributes$1(ut,{id:patternPrefix+tt.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),ut=domChild(ut,0,"rect",svgns),setAttributes$1(ut,{width:1,height:1,fill:`url(${href()}#${tt.id})`}),et=domChild(et,nt++,"radialGradient",svgns),setAttributes$1(et,{id:tt.id,fx:tt.x1,fy:tt.y1,fr:tt.r1,cx:tt.x2,cy:tt.y2,r:tt.r2})}else et=domChild(et,nt++,"linearGradient",svgns),setAttributes$1(et,{id:tt.id,x1:tt.x1,x2:tt.x2,y1:tt.y1,y2:tt.y2});for(rt=0,ot=tt.stops.length;rt<ot;++rt)st=domChild(et,rt,"stop",svgns),st.setAttribute("offset",tt.stops[rt].offset),st.setAttribute("stop-color",tt.stops[rt].color);return domClear(et,rt),nt}function updateClipping(et,tt,nt){let rt;return et=domChild(et,nt,"clipPath",svgns),et.setAttribute("id",tt.id),tt.path?(rt=domChild(et,0,"path",svgns),rt.setAttribute("d",tt.path)):(rt=domChild(et,0,"rect",svgns),setAttributes$1(rt,{x:0,y:0,width:tt.width,height:tt.height})),domClear(et,1),nt+1}function recurse(et,tt,nt){tt=tt.lastChild.previousSibling;let rt,ot=0;visit(nt,st=>{rt=et.mark(tt,st,rt),++ot}),domClear(tt,1+ot)}function bind$1(et,tt,nt,rt,ot){let st=et._svg,ut;if(!st&&(ut=tt.ownerDocument,st=domCreate(ut,rt,svgns),et._svg=st,et.mark&&(st.__data__=et,st.__values__={fill:"default"},rt==="g"))){const ct=domCreate(ut,"path",svgns);st.appendChild(ct),ct.__data__=et;const ft=domCreate(ut,"g",svgns);st.appendChild(ft),ft.__data__=et;const pt=domCreate(ut,"path",svgns);st.appendChild(pt),pt.__data__=et,pt.__values__={fill:"default"}}return(st.ownerSVGElement!==ot||siblingCheck(st,nt))&&tt.insertBefore(st,nt?nt.nextSibling:tt.firstChild),st}function siblingCheck(et,tt){return et.parentNode&&et.parentNode.childNodes.length>1&&et.previousSibling!=tt}let element$1=null,values$4=null;const mark_extras={group(et,tt,nt){const rt=element$1=tt.childNodes[2];values$4=rt.__values__,et.foreground(emit,nt,this),values$4=tt.__values__,element$1=tt.childNodes[1],et.content(emit,nt,this);const ot=element$1=tt.childNodes[0];et.background(emit,nt,this);const st=nt.mark.interactive===!1?"none":null;if(st!==values$4.events&&(setAttribute(rt,"pointer-events",st),setAttribute(ot,"pointer-events",st),values$4.events=st),nt.strokeForeground&&nt.stroke){const ut=nt.fill;setAttribute(rt,"display",null),this.style(ot,nt),setAttribute(ot,"stroke",null),ut&&(nt.fill=null),values$4=rt.__values__,this.style(rt,nt),ut&&(nt.fill=ut),element$1=null}else setAttribute(rt,"display","none")},image(et,tt,nt){nt.smooth===!1?(setStyle(tt,"image-rendering","optimizeSpeed"),setStyle(tt,"image-rendering","pixelated")):setStyle(tt,"image-rendering",null)},text(et,tt,nt){const rt=textLines(nt);let ot,st,ut,ct;isArray(rt)?(st=rt.map(ft=>textValue(nt,ft)),ot=st.join(`
`),ot!==values$4.text&&(domClear(tt,0),ut=tt.ownerDocument,ct=lineHeight$1(nt),st.forEach((ft,pt)=>{const ht=domCreate(ut,"tspan",svgns);ht.__data__=nt,ht.textContent=ft,pt&&(ht.setAttribute("x",0),ht.setAttribute("dy",ct)),tt.appendChild(ht)}),values$4.text=ot)):(st=textValue(nt,rt),st!==values$4.text&&(tt.textContent=st,values$4.text=st)),setAttribute(tt,"font-family",fontFamily$1(nt)),setAttribute(tt,"font-size",fontSize$1(nt)+"px"),setAttribute(tt,"font-style",nt.fontStyle),setAttribute(tt,"font-variant",nt.fontVariant),setAttribute(tt,"font-weight",nt.fontWeight)}};function emit(et,tt,nt){tt!==values$4[et]&&(nt?setAttributeNS(element$1,et,tt,nt):setAttribute(element$1,et,tt),values$4[et]=tt)}function setStyle(et,tt,nt){nt!==values$4[tt]&&(nt==null?et.style.removeProperty(tt):et.style.setProperty(tt,nt+""),values$4[tt]=nt)}function setAttributes$1(et,tt){for(const nt in tt)setAttribute(et,nt,tt[nt])}function setAttribute(et,tt,nt){nt!=null?et.setAttribute(tt,nt):et.removeAttribute(tt)}function setAttributeNS(et,tt,nt,rt){nt!=null?et.setAttributeNS(rt,tt,nt):et.removeAttributeNS(rt,tt)}function href(){let et;return typeof window>"u"?"":(et=window.location).hash?et.href.slice(0,-et.hash.length):et.href}function SVGStringRenderer(et){Renderer.call(this,et),this._text=null,this._defs={gradient:{},clipping:{}}}inherits(SVGStringRenderer,Renderer,{svg(){return this._text},_render(et){const tt=markup();tt.open("svg",extend$1({},metadata,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const nt=this._bgcolor;return nt&&nt!=="transparent"&&nt!=="none"&&tt.open("rect",{width:this._width,height:this._height,fill:nt}).close(),tt.open("g",rootAttributes,{transform:"translate("+this._origin+")"}),this.mark(tt,et),tt.close(),this.defs(tt),this._text=tt.close()+"",this},mark(et,tt){const nt=Marks[tt.marktype],rt=nt.tag,ot=[ariaItemAttributes,nt.attr];et.open("g",{class:cssClass(tt),"clip-path":tt.clip?clip$1$1(this,tt,tt.group):null},ariaMarkAttributes(tt),{"pointer-events":rt!=="g"&&tt.interactive===!1?"none":null});const st=ut=>{const ct=this.href(ut);if(ct&&et.open("a",ct),et.open(rt,this.attr(tt,ut,ot,rt!=="g"?rt:null)),rt==="text"){const ft=textLines(ut);if(isArray(ft)){const pt={x:0,dy:lineHeight$1(ut)};for(let ht=0;ht<ft.length;++ht)et.open("tspan",ht?pt:null).text(textValue(ut,ft[ht])).close()}else et.text(textValue(ut,ft))}else if(rt==="g"){const ft=ut.strokeForeground,pt=ut.fill,ht=ut.stroke;ft&&ht&&(ut.stroke=null),et.open("path",this.attr(tt,ut,nt.background,"bgrect")).close(),et.open("g",this.attr(tt,ut,nt.content)),visit(ut,mt=>this.mark(et,mt)),et.close(),ft&&ht?(pt&&(ut.fill=null),ut.stroke=ht,et.open("path",this.attr(tt,ut,nt.foreground,"bgrect")).close(),pt&&(ut.fill=pt)):et.open("path",this.attr(tt,ut,nt.foreground,"bgfore")).close()}et.close(),ct&&et.close()};return nt.nested?tt.items&&tt.items.length&&st(tt.items[0]):visit(tt,st),et.close()},href(et){const tt=et.href;let nt;if(tt){if(nt=this._hrefs&&this._hrefs[tt])return nt;this.sanitizeURL(tt).then(rt=>{rt["xlink:href"]=rt.href,rt.href=null,(this._hrefs||(this._hrefs={}))[tt]=rt})}return null},attr(et,tt,nt,rt){const ot={},st=(ut,ct,ft,pt)=>{ot[pt||ut]=ct};return Array.isArray(nt)?nt.forEach(ut=>ut(st,tt,this)):nt(st,tt,this),rt&&style$2(ot,tt,et,rt,this._defs),ot},defs(et){const tt=this._defs.gradient,nt=this._defs.clipping;if(Object.keys(tt).length+Object.keys(nt).length!==0){et.open("defs");for(const ot in tt){const st=tt[ot],ut=st.stops;st.gradient==="radial"?(et.open("pattern",{id:patternPrefix+ot,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),et.open("rect",{width:"1",height:"1",fill:"url(#"+ot+")"}).close(),et.close(),et.open("radialGradient",{id:ot,fx:st.x1,fy:st.y1,fr:st.r1,cx:st.x2,cy:st.y2,r:st.r2})):et.open("linearGradient",{id:ot,x1:st.x1,x2:st.x2,y1:st.y1,y2:st.y2});for(let ct=0;ct<ut.length;++ct)et.open("stop",{offset:ut[ct].offset,"stop-color":ut[ct].color}).close();et.close()}for(const ot in nt){const st=nt[ot];et.open("clipPath",{id:ot}),st.path?et.open("path",{d:st.path}).close():et.open("rect",{x:0,y:0,width:st.width,height:st.height}).close(),et.close()}et.close()}}});function style$2(et,tt,nt,rt,ot){let st;if(tt==null||(rt==="bgrect"&&nt.interactive===!1&&(et["pointer-events"]="none"),rt==="bgfore"&&(nt.interactive===!1&&(et["pointer-events"]="none"),et.display="none",tt.fill!==null)))return et;rt==="image"&&tt.smooth===!1&&(st=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),rt==="text"&&(et["font-family"]=fontFamily$1(tt),et["font-size"]=fontSize$1(tt)+"px",et["font-style"]=tt.fontStyle,et["font-variant"]=tt.fontVariant,et["font-weight"]=tt.fontWeight);for(const ut in stylesAttr){let ct=tt[ut];const ft=stylesAttr[ut];ct==="transparent"&&(ft==="fill"||ft==="stroke")||ct!=null&&(isGradient(ct)&&(ct=gradientRef(ct,ot.gradient,"")),et[ft]=ct)}for(const ut in stylesCss){const ct=tt[ut];ct!=null&&(st=st||[],st.push(`${stylesCss[ut]}: ${ct};`))}return st&&(et.style=st.join(" ")),et}const Canvas="canvas",PNG="png",SVG="svg",None$1="none",RenderType={Canvas,PNG,SVG,None:None$1},modules={};modules[Canvas]=modules[PNG]={renderer:CanvasRenderer,headless:CanvasRenderer,handler:CanvasHandler};modules[SVG]={renderer:SVGRenderer,headless:SVGStringRenderer,handler:SVGHandler};modules[None$1]={};function renderModule(et,tt){return et=String(et||"").toLowerCase(),arguments.length>1?(modules[et]=tt,this):modules[et]}function intersect$2(et,tt,nt){const rt=[],ot=new Bounds().union(tt),st=et.marktype;return st?intersectMark(et,ot,nt,rt):st==="group"?intersectGroup(et,ot,nt,rt):error("Intersect scene must be mark node or group item.")}function intersectMark(et,tt,nt,rt){if(visitMark(et,tt,nt)){const ot=et.items,st=et.marktype,ut=ot.length;let ct=0;if(st==="group")for(;ct<ut;++ct)intersectGroup(ot[ct],tt,nt,rt);else for(const ft=Marks[st].isect;ct<ut;++ct){const pt=ot[ct];intersectItem(pt,tt,ft)&&rt.push(pt)}}return rt}function visitMark(et,tt,nt){return et.bounds&&tt.intersects(et.bounds)&&(et.marktype==="group"||et.interactive!==!1&&(!nt||nt(et)))}function intersectGroup(et,tt,nt,rt){nt&&nt(et.mark)&&intersectItem(et,tt,Marks.group.isect)&&rt.push(et);const ot=et.items,st=ot&&ot.length;if(st){const ut=et.x||0,ct=et.y||0;tt.translate(-ut,-ct);for(let ft=0;ft<st;++ft)intersectMark(ot[ft],tt,nt,rt);tt.translate(ut,ct)}return rt}function intersectItem(et,tt,nt){const rt=et.bounds;return tt.encloses(rt)||tt.intersects(rt)&&nt(et,tt)}const clipBounds=new Bounds;function boundClip(et){const tt=et.clip;if(isFunction$3(tt))tt(boundContext(clipBounds.clear()));else if(tt)clipBounds.set(0,0,et.group.width,et.group.height);else return;et.bounds.intersect(clipBounds)}const TOLERANCE=1e-9;function sceneEqual(et,tt,nt){return et===tt?!0:nt==="path"?pathEqual(et,tt):et instanceof Date&&tt instanceof Date?+et==+tt:isNumber$1(et)&&isNumber$1(tt)?Math.abs(et-tt)<=TOLERANCE:!et||!tt||!isObject(et)&&!isObject(tt)?et==tt:objectEqual(et,tt)}function pathEqual(et,tt){return sceneEqual(parse$5(et),parse$5(tt))}function objectEqual(et,tt){var nt=Object.keys(et),rt=Object.keys(tt),ot,st;if(nt.length!==rt.length)return!1;for(nt.sort(),rt.sort(),st=nt.length-1;st>=0;st--)if(nt[st]!=rt[st])return!1;for(st=nt.length-1;st>=0;st--)if(ot=nt[st],!sceneEqual(et[ot],tt[ot],ot))return!1;return typeof et==typeof tt}function resetSVGDefIds(){resetSVGClipId(),resetSVGGradientId()}const Top$1="top",Left$1="left",Right$1="right",Bottom$1="bottom",TopLeft="top-left",TopRight="top-right",BottomLeft="bottom-left",BottomRight="bottom-right",Start$1="start",Middle$1="middle",End$1="end",X$1="x",Y$1="y",Group$2="group",AxisRole$1="axis",TitleRole$1="title",FrameRole$1="frame",ScopeRole$1="scope",LegendRole$1="legend",RowHeader="row-header",RowFooter="row-footer",RowTitle="row-title",ColHeader="column-header",ColFooter="column-footer",ColTitle="column-title",Padding$1="padding",Symbols$1="symbol",Fit="fit",FitX="fit-x",FitY="fit-y",Pad="pad",None="none",All="all",Each="each",Flush="flush",Column$2="column",Row$1="row";function Bound$1(et){Transform.call(this,null,et)}inherits(Bound$1,Transform,{transform(et,tt){const nt=tt.dataflow,rt=et.mark,ot=rt.marktype,st=Marks[ot],ut=st.bound;let ct=rt.bounds,ft;if(st.nested)rt.items.length&&nt.dirty(rt.items[0]),ct=boundItem(rt,ut),rt.items.forEach(pt=>{pt.bounds.clear().union(ct)});else if(ot===Group$2||et.modified())switch(tt.visit(tt.MOD,pt=>nt.dirty(pt)),ct.clear(),rt.items.forEach(pt=>ct.union(boundItem(pt,ut))),rt.role){case AxisRole$1:case LegendRole$1:case TitleRole$1:tt.reflow()}else ft=tt.changed(tt.REM),tt.visit(tt.ADD,pt=>{ct.union(boundItem(pt,ut))}),tt.visit(tt.MOD,pt=>{ft=ft||ct.alignsWith(pt.bounds),nt.dirty(pt),ct.union(boundItem(pt,ut))}),ft&&(ct.clear(),rt.items.forEach(pt=>ct.union(pt.bounds)));return boundClip(rt),tt.modifies("bounds")}});function boundItem(et,tt,nt){return tt(et.bounds.clear(),et,nt)}const COUNTER_NAME=":vega_identifier:";function Identifier$2(et){Transform.call(this,0,et)}Identifier$2.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]};inherits(Identifier$2,Transform,{transform(et,tt){const nt=getCounter(tt.dataflow),rt=et.as;let ot=nt.value;return tt.visit(tt.ADD,st=>st[rt]=st[rt]||++ot),nt.set(this.value=ot),tt}});function getCounter(et){return et._signals[COUNTER_NAME]||(et._signals[COUNTER_NAME]=et.add(0))}function Mark$2(et){Transform.call(this,null,et)}inherits(Mark$2,Transform,{transform(et,tt){let nt=this.value;nt||(nt=tt.dataflow.scenegraph().mark(et.markdef,lookup$1$1(et),et.index),nt.group.context=et.context,et.context.group||(et.context.group=nt.group),nt.source=this.source,nt.clip=et.clip,nt.interactive=et.interactive,this.value=nt);const rt=nt.marktype===Group$2?GroupItem$1:Item$3;return tt.visit(tt.ADD,ot=>rt.call(ot,nt)),(et.modified("clip")||et.modified("interactive"))&&(nt.clip=et.clip,nt.interactive=!!et.interactive,nt.zdirty=!0,tt.reflow()),nt.items=tt.source,tt}});function lookup$1$1(et){const tt=et.groups,nt=et.parent;return tt&&tt.size===1?tt.get(Object.keys(tt.object)[0]):tt&&nt?tt.lookup(nt):null}function Overlap$1(et){Transform.call(this,null,et)}const methods={parity:et=>et.filter((tt,nt)=>nt%2?tt.opacity=0:1),greedy:(et,tt)=>{let nt;return et.filter((rt,ot)=>!ot||!intersect$1(nt.bounds,rt.bounds,tt)?(nt=rt,1):rt.opacity=0)}},intersect$1=(et,tt,nt)=>nt>Math.max(tt.x1-et.x2,et.x1-tt.x2,tt.y1-et.y2,et.y1-tt.y2),hasOverlap=(et,tt)=>{for(var nt=1,rt=et.length,ot=et[0].bounds,st;nt<rt;ot=st,++nt)if(intersect$1(ot,st=et[nt].bounds,tt))return!0},hasBounds=et=>{const tt=et.bounds;return tt.width()>1&&tt.height()>1},boundTest=(et,tt,nt)=>{var rt=et.range(),ot=new Bounds;return tt===Top$1||tt===Bottom$1?ot.set(rt[0],-1/0,rt[1],1/0):ot.set(-1/0,rt[0],1/0,rt[1]),ot.expand(nt||1),st=>ot.encloses(st.bounds)},reset$1=et=>(et.forEach(tt=>tt.opacity=1),et),reflow$1=(et,tt)=>et.reflow(tt.modified()).modifies("opacity");inherits(Overlap$1,Transform,{transform(et,tt){const nt=methods[et.method]||methods.parity,rt=et.separation||0;let ot=tt.materialize(tt.SOURCE).source,st,ut;if(!ot||!ot.length)return;if(!et.method)return et.modified("method")&&(reset$1(ot),tt=reflow$1(tt,et)),tt;if(ot=ot.filter(hasBounds),!ot.length)return;if(et.sort&&(ot=ot.slice().sort(et.sort)),st=reset$1(ot),tt=reflow$1(tt,et),st.length>=3&&hasOverlap(st,rt)){do st=nt(st,rt);while(st.length>=3&&hasOverlap(st,rt));st.length<3&&!peek$2(ot).opacity&&(st.length>1&&(peek$2(st).opacity=0),peek$2(ot).opacity=1)}et.boundScale&&et.boundTolerance>=0&&(ut=boundTest(et.boundScale,et.boundOrient,+et.boundTolerance),ot.forEach(ft=>{ut(ft)||(ft.opacity=0)}));const ct=st[0].mark.bounds.clear();return ot.forEach(ft=>{ft.opacity&&ct.union(ft.bounds)}),tt}});function Render$1(et){Transform.call(this,null,et)}inherits(Render$1,Transform,{transform(et,tt){const nt=tt.dataflow;if(tt.visit(tt.ALL,rt=>nt.dirty(rt)),tt.fields&&tt.fields.zindex){const rt=tt.source&&tt.source[0];rt&&(rt.mark.zdirty=!0)}}});const tempBounds=new Bounds;function set$4(et,tt,nt){return et[tt]===nt?0:(et[tt]=nt,1)}function isYAxis(et){var tt=et.items[0].orient;return tt===Left$1||tt===Right$1}function axisIndices(et){let tt=+et.grid;return[et.ticks?tt++:-1,et.labels?tt++:-1,tt+ +et.domain]}function axisLayout(et,tt,nt,rt){var ot=tt.items[0],st=ot.datum,ut=ot.translate!=null?ot.translate:.5,ct=ot.orient,ft=axisIndices(st),pt=ot.range,ht=ot.offset,mt=ot.position,yt=ot.minExtent,vt=ot.maxExtent,Tt=st.title&&ot.items[ft[2]].items[0],Et=ot.titlePadding,xt=ot.bounds,At=Tt&&multiLineOffset(Tt),Ct=0,$t=0,Ot,Rt;switch(tempBounds.clear().union(xt),xt.clear(),(Ot=ft[0])>-1&&xt.union(ot.items[Ot].bounds),(Ot=ft[1])>-1&&xt.union(ot.items[Ot].bounds),ct){case Top$1:Ct=mt||0,$t=-ht,Rt=Math.max(yt,Math.min(vt,-xt.y1)),xt.add(0,-Rt).add(pt,0),Tt&&axisTitleLayout(et,Tt,Rt,Et,At,0,-1,xt);break;case Left$1:Ct=-ht,$t=mt||0,Rt=Math.max(yt,Math.min(vt,-xt.x1)),xt.add(-Rt,0).add(0,pt),Tt&&axisTitleLayout(et,Tt,Rt,Et,At,1,-1,xt);break;case Right$1:Ct=nt+ht,$t=mt||0,Rt=Math.max(yt,Math.min(vt,xt.x2)),xt.add(0,0).add(Rt,pt),Tt&&axisTitleLayout(et,Tt,Rt,Et,At,1,1,xt);break;case Bottom$1:Ct=mt||0,$t=rt+ht,Rt=Math.max(yt,Math.min(vt,xt.y2)),xt.add(0,0).add(pt,Rt),Tt&&axisTitleLayout(et,Tt,Rt,Et,0,0,1,xt);break;default:Ct=ot.x,$t=ot.y}return boundStroke(xt.translate(Ct,$t),ot),set$4(ot,"x",Ct+ut)|set$4(ot,"y",$t+ut)&&(ot.bounds=tempBounds,et.dirty(ot),ot.bounds=xt,et.dirty(ot)),ot.mark.bounds.clear().union(xt)}function axisTitleLayout(et,tt,nt,rt,ot,st,ut,ct){const ft=tt.bounds;if(tt.auto){const pt=ut*(nt+ot+rt);let ht=0,mt=0;et.dirty(tt),st?ht=(tt.x||0)-(tt.x=pt):mt=(tt.y||0)-(tt.y=pt),tt.mark.bounds.clear().union(ft.translate(-ht,-mt)),et.dirty(tt)}ct.union(ft)}const min=(et,tt)=>Math.floor(Math.min(et,tt)),max=(et,tt)=>Math.ceil(Math.max(et,tt));function gridLayoutGroups(et){var tt=et.items,nt=tt.length,rt=0,ot,st;const ut={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;rt<nt;++rt)if(ot=tt[rt],st=ot.items,ot.marktype===Group$2)switch(ot.role){case AxisRole$1:case LegendRole$1:case TitleRole$1:break;case RowHeader:ut.rowheaders.push(...st);break;case RowFooter:ut.rowfooters.push(...st);break;case ColHeader:ut.colheaders.push(...st);break;case ColFooter:ut.colfooters.push(...st);break;case RowTitle:ut.rowtitle=st[0];break;case ColTitle:ut.coltitle=st[0];break;default:ut.marks.push(...st)}return ut}function bboxFlush(et){return new Bounds().set(0,0,et.width||0,et.height||0)}function bboxFull(et){const tt=et.bounds.clone();return tt.empty()?tt.set(0,0,0,0):tt.translate(-(et.x||0),-(et.y||0))}function get$2(et,tt,nt){const rt=isObject(et)?et[tt]:et;return rt??(nt!==void 0?nt:0)}function offsetValue$1(et){return et<0?Math.ceil(-et):0}function gridLayout(et,tt,nt){var rt=!nt.nodirty,ot=nt.bounds===Flush?bboxFlush:bboxFull,st=tempBounds.set(0,0,0,0),ut=get$2(nt.align,Column$2),ct=get$2(nt.align,Row$1),ft=get$2(nt.padding,Column$2),pt=get$2(nt.padding,Row$1),ht=nt.columns||tt.length,mt=ht<=0?1:Math.ceil(tt.length/ht),yt=tt.length,vt=Array(yt),Tt=Array(ht),Et=0,xt=Array(yt),At=Array(mt),Ct=0,$t=Array(yt),Ot=Array(yt),Rt=Array(yt),It,kt,Mt,Ft,zt,Vt,Zt,Ut,Xt,Jt,gn;for(kt=0;kt<ht;++kt)Tt[kt]=0;for(kt=0;kt<mt;++kt)At[kt]=0;for(kt=0;kt<yt;++kt)Vt=tt[kt],zt=Rt[kt]=ot(Vt),Vt.x=Vt.x||0,$t[kt]=0,Vt.y=Vt.y||0,Ot[kt]=0,Mt=kt%ht,Ft=~~(kt/ht),Et=Math.max(Et,Zt=Math.ceil(zt.x2)),Ct=Math.max(Ct,Ut=Math.ceil(zt.y2)),Tt[Mt]=Math.max(Tt[Mt],Zt),At[Ft]=Math.max(At[Ft],Ut),vt[kt]=ft+offsetValue$1(zt.x1),xt[kt]=pt+offsetValue$1(zt.y1),rt&&et.dirty(tt[kt]);for(kt=0;kt<yt;++kt)kt%ht===0&&(vt[kt]=0),kt<ht&&(xt[kt]=0);if(ut===Each)for(Mt=1;Mt<ht;++Mt){for(gn=0,kt=Mt;kt<yt;kt+=ht)gn<vt[kt]&&(gn=vt[kt]);for(kt=Mt;kt<yt;kt+=ht)vt[kt]=gn+Tt[Mt-1]}else if(ut===All){for(gn=0,kt=0;kt<yt;++kt)kt%ht&&gn<vt[kt]&&(gn=vt[kt]);for(kt=0;kt<yt;++kt)kt%ht&&(vt[kt]=gn+Et)}else for(ut=!1,Mt=1;Mt<ht;++Mt)for(kt=Mt;kt<yt;kt+=ht)vt[kt]+=Tt[Mt-1];if(ct===Each)for(Ft=1;Ft<mt;++Ft){for(gn=0,kt=Ft*ht,It=kt+ht;kt<It;++kt)gn<xt[kt]&&(gn=xt[kt]);for(kt=Ft*ht;kt<It;++kt)xt[kt]=gn+At[Ft-1]}else if(ct===All){for(gn=0,kt=ht;kt<yt;++kt)gn<xt[kt]&&(gn=xt[kt]);for(kt=ht;kt<yt;++kt)xt[kt]=gn+Ct}else for(ct=!1,Ft=1;Ft<mt;++Ft)for(kt=Ft*ht,It=kt+ht;kt<It;++kt)xt[kt]+=At[Ft-1];for(Xt=0,kt=0;kt<yt;++kt)Xt=vt[kt]+(kt%ht?Xt:0),$t[kt]+=Xt-tt[kt].x;for(Mt=0;Mt<ht;++Mt)for(Jt=0,kt=Mt;kt<yt;kt+=ht)Jt+=xt[kt],Ot[kt]+=Jt-tt[kt].y;if(ut&&get$2(nt.center,Column$2)&&mt>1)for(kt=0;kt<yt;++kt)zt=ut===All?Et:Tt[kt%ht],Xt=zt-Rt[kt].x2-tt[kt].x-$t[kt],Xt>0&&($t[kt]+=Xt/2);if(ct&&get$2(nt.center,Row$1)&&ht!==1)for(kt=0;kt<yt;++kt)zt=ct===All?Ct:At[~~(kt/ht)],Jt=zt-Rt[kt].y2-tt[kt].y-Ot[kt],Jt>0&&(Ot[kt]+=Jt/2);for(kt=0;kt<yt;++kt)st.union(Rt[kt].translate($t[kt],Ot[kt]));switch(Xt=get$2(nt.anchor,X$1),Jt=get$2(nt.anchor,Y$1),get$2(nt.anchor,Column$2)){case End$1:Xt-=st.width();break;case Middle$1:Xt-=st.width()/2}switch(get$2(nt.anchor,Row$1)){case End$1:Jt-=st.height();break;case Middle$1:Jt-=st.height()/2}for(Xt=Math.round(Xt),Jt=Math.round(Jt),st.clear(),kt=0;kt<yt;++kt)tt[kt].mark.bounds.clear();for(kt=0;kt<yt;++kt)Vt=tt[kt],Vt.x+=$t[kt]+=Xt,Vt.y+=Ot[kt]+=Jt,st.union(Vt.mark.bounds.union(Vt.bounds.translate($t[kt],Ot[kt]))),rt&&et.dirty(Vt);return st}function trellisLayout(et,tt,nt){var rt=gridLayoutGroups(tt),ot=rt.marks,st=nt.bounds===Flush?boundFlush:boundFull,ut=nt.offset,ct=nt.columns||ot.length,ft=ct<=0?1:Math.ceil(ot.length/ct),pt=ft*ct,ht,mt,yt,vt,Tt,Et,xt;const At=gridLayout(et,ot,nt);At.empty()&&At.set(0,0,0,0),rt.rowheaders&&(Et=get$2(nt.headerBand,Row$1,null),ht=layoutHeaders(et,rt.rowheaders,ot,ct,ft,-get$2(ut,"rowHeader"),min,0,st,"x1",0,ct,1,Et)),rt.colheaders&&(Et=get$2(nt.headerBand,Column$2,null),mt=layoutHeaders(et,rt.colheaders,ot,ct,ct,-get$2(ut,"columnHeader"),min,1,st,"y1",0,1,ct,Et)),rt.rowfooters&&(Et=get$2(nt.footerBand,Row$1,null),yt=layoutHeaders(et,rt.rowfooters,ot,ct,ft,get$2(ut,"rowFooter"),max,0,st,"x2",ct-1,ct,1,Et)),rt.colfooters&&(Et=get$2(nt.footerBand,Column$2,null),vt=layoutHeaders(et,rt.colfooters,ot,ct,ct,get$2(ut,"columnFooter"),max,1,st,"y2",pt-ct,1,ct,Et)),rt.rowtitle&&(Tt=get$2(nt.titleAnchor,Row$1),xt=get$2(ut,"rowTitle"),xt=Tt===End$1?yt+xt:ht-xt,Et=get$2(nt.titleBand,Row$1,.5),layoutTitle(et,rt.rowtitle,xt,0,At,Et)),rt.coltitle&&(Tt=get$2(nt.titleAnchor,Column$2),xt=get$2(ut,"columnTitle"),xt=Tt===End$1?vt+xt:mt-xt,Et=get$2(nt.titleBand,Column$2,.5),layoutTitle(et,rt.coltitle,xt,1,At,Et))}function boundFlush(et,tt){return tt==="x1"?et.x||0:tt==="y1"?et.y||0:tt==="x2"?(et.x||0)+(et.width||0):tt==="y2"?(et.y||0)+(et.height||0):void 0}function boundFull(et,tt){return et.bounds[tt]}function layoutHeaders(et,tt,nt,rt,ot,st,ut,ct,ft,pt,ht,mt,yt,vt){var Tt=nt.length,Et=0,xt=0,At,Ct,$t,Ot,Rt,It,kt,Mt,Ft;if(!Tt)return Et;for(At=ht;At<Tt;At+=mt)nt[At]&&(Et=ut(Et,ft(nt[At],pt)));if(!tt.length)return Et;for(tt.length>ot&&(et.warn("Grid headers exceed limit: "+ot),tt=tt.slice(0,ot)),Et+=st,Ct=0,Ot=tt.length;Ct<Ot;++Ct)et.dirty(tt[Ct]),tt[Ct].mark.bounds.clear();for(At=ht,Ct=0,Ot=tt.length;Ct<Ot;++Ct,At+=mt){for(It=tt[Ct],Rt=It.mark.bounds,$t=At;$t>=0&&(kt=nt[$t])==null;$t-=yt);ct?(Mt=vt==null?kt.x:Math.round(kt.bounds.x1+vt*kt.bounds.width()),Ft=Et):(Mt=Et,Ft=vt==null?kt.y:Math.round(kt.bounds.y1+vt*kt.bounds.height())),Rt.union(It.bounds.translate(Mt-(It.x||0),Ft-(It.y||0))),It.x=Mt,It.y=Ft,et.dirty(It),xt=ut(xt,Rt[pt])}return xt}function layoutTitle(et,tt,nt,rt,ot,st){if(!!tt){et.dirty(tt);var ut=nt,ct=nt;rt?ut=Math.round(ot.x1+st*ot.width()):ct=Math.round(ot.y1+st*ot.height()),tt.bounds.translate(ut-(tt.x||0),ct-(tt.y||0)),tt.mark.bounds.clear().union(tt.bounds),tt.x=ut,tt.y=ct,et.dirty(tt)}}function lookup$3(et,tt){const nt=et[tt]||{};return(rt,ot)=>nt[rt]!=null?nt[rt]:et[rt]!=null?et[rt]:ot}function offsets(et,tt){let nt=-1/0;return et.forEach(rt=>{rt.offset!=null&&(nt=Math.max(nt,rt.offset))}),nt>-1/0?nt:tt}function legendParams(et,tt,nt,rt,ot,st,ut){const ct=lookup$3(nt,tt),ft=offsets(et,ct("offset",0)),pt=ct("anchor",Start$1),ht=pt===End$1?1:pt===Middle$1?.5:0,mt={align:Each,bounds:ct("bounds",Flush),columns:ct("direction")==="vertical"?1:et.length,padding:ct("margin",8),center:ct("center"),nodirty:!0};switch(tt){case Left$1:mt.anchor={x:Math.floor(rt.x1)-ft,column:End$1,y:ht*(ut||rt.height()+2*rt.y1),row:pt};break;case Right$1:mt.anchor={x:Math.ceil(rt.x2)+ft,y:ht*(ut||rt.height()+2*rt.y1),row:pt};break;case Top$1:mt.anchor={y:Math.floor(ot.y1)-ft,row:End$1,x:ht*(st||ot.width()+2*ot.x1),column:pt};break;case Bottom$1:mt.anchor={y:Math.ceil(ot.y2)+ft,x:ht*(st||ot.width()+2*ot.x1),column:pt};break;case TopLeft:mt.anchor={x:ft,y:ft};break;case TopRight:mt.anchor={x:st-ft,y:ft,column:End$1};break;case BottomLeft:mt.anchor={x:ft,y:ut-ft,row:End$1};break;case BottomRight:mt.anchor={x:st-ft,y:ut-ft,column:End$1,row:End$1};break}return mt}function legendLayout(et,tt){var nt=tt.items[0],rt=nt.datum,ot=nt.orient,st=nt.bounds,ut=nt.x,ct=nt.y,ft,pt;return nt._bounds?nt._bounds.clear().union(st):nt._bounds=st.clone(),st.clear(),legendGroupLayout(et,nt,nt.items[0].items[0]),st=legendBounds(nt,st),ft=2*nt.padding,pt=2*nt.padding,st.empty()||(ft=Math.ceil(st.width()+ft),pt=Math.ceil(st.height()+pt)),rt.type===Symbols$1&&legendEntryLayout(nt.items[0].items[0].items[0].items),ot!==None&&(nt.x=ut=0,nt.y=ct=0),nt.width=ft,nt.height=pt,boundStroke(st.set(ut,ct,ut+ft,ct+pt),nt),nt.mark.bounds.clear().union(st),nt}function legendBounds(et,tt){return et.items.forEach(nt=>tt.union(nt.bounds)),tt.x1=et.padding,tt.y1=et.padding,tt}function legendGroupLayout(et,tt,nt){var rt=tt.padding,ot=rt-nt.x,st=rt-nt.y;if(!tt.datum.title)(ot||st)&&translate$1(et,nt,ot,st);else{var ut=tt.items[1].items[0],ct=ut.anchor,ft=tt.titlePadding||0,pt=rt-ut.x,ht=rt-ut.y;switch(ut.orient){case Left$1:ot+=Math.ceil(ut.bounds.width())+ft;break;case Right$1:case Bottom$1:break;default:st+=ut.bounds.height()+ft}switch((ot||st)&&translate$1(et,nt,ot,st),ut.orient){case Left$1:ht+=legendTitleOffset(tt,nt,ut,ct,1,1);break;case Right$1:pt+=legendTitleOffset(tt,nt,ut,End$1,0,0)+ft,ht+=legendTitleOffset(tt,nt,ut,ct,1,1);break;case Bottom$1:pt+=legendTitleOffset(tt,nt,ut,ct,0,0),ht+=legendTitleOffset(tt,nt,ut,End$1,-1,0,1)+ft;break;default:pt+=legendTitleOffset(tt,nt,ut,ct,0,0)}(pt||ht)&&translate$1(et,ut,pt,ht),(pt=Math.round(ut.bounds.x1-rt))<0&&(translate$1(et,nt,-pt,0),translate$1(et,ut,-pt,0))}}function legendTitleOffset(et,tt,nt,rt,ot,st,ut){const ct=et.datum.type!=="symbol",ft=nt.datum.vgrad,pt=ct&&(st||!ft)&&!ut?tt.items[0]:tt,ht=pt.bounds[ot?"y2":"x2"]-et.padding,mt=ft&&st?ht:0,yt=ft&&st?0:ht,vt=ot<=0?0:multiLineOffset(nt);return Math.round(rt===Start$1?mt:rt===End$1?yt-vt:.5*(ht-vt))}function translate$1(et,tt,nt,rt){tt.x+=nt,tt.y+=rt,tt.bounds.translate(nt,rt),tt.mark.bounds.translate(nt,rt),et.dirty(tt)}function legendEntryLayout(et){const tt=et.reduce((nt,rt)=>(nt[rt.column]=Math.max(rt.bounds.x2-rt.x,nt[rt.column]||0),nt),{});et.forEach(nt=>{nt.width=tt[nt.column],nt.height=nt.bounds.y2-nt.y})}function titleLayout(et,tt,nt,rt,ot){var st=tt.items[0],ut=st.frame,ct=st.orient,ft=st.anchor,pt=st.offset,ht=st.padding,mt=st.items[0].items[0],yt=st.items[1]&&st.items[1].items[0],vt=ct===Left$1||ct===Right$1?rt:nt,Tt=0,Et=0,xt=0,At=0,Ct=0,$t;if(ut!==Group$2?ct===Left$1?(Tt=ot.y2,vt=ot.y1):ct===Right$1?(Tt=ot.y1,vt=ot.y2):(Tt=ot.x1,vt=ot.x2):ct===Left$1&&(Tt=rt,vt=0),$t=ft===Start$1?Tt:ft===End$1?vt:(Tt+vt)/2,yt&&yt.text){switch(ct){case Top$1:case Bottom$1:Ct=mt.bounds.height()+ht;break;case Left$1:At=mt.bounds.width()+ht;break;case Right$1:At=-mt.bounds.width()-ht;break}tempBounds.clear().union(yt.bounds),tempBounds.translate(At-(yt.x||0),Ct-(yt.y||0)),set$4(yt,"x",At)|set$4(yt,"y",Ct)&&(et.dirty(yt),yt.bounds.clear().union(tempBounds),yt.mark.bounds.clear().union(tempBounds),et.dirty(yt)),tempBounds.clear().union(yt.bounds)}else tempBounds.clear();switch(tempBounds.union(mt.bounds),ct){case Top$1:Et=$t,xt=ot.y1-tempBounds.height()-pt;break;case Left$1:Et=ot.x1-tempBounds.width()-pt,xt=$t;break;case Right$1:Et=ot.x2+tempBounds.width()+pt,xt=$t;break;case Bottom$1:Et=$t,xt=ot.y2+pt;break;default:Et=st.x,xt=st.y}return set$4(st,"x",Et)|set$4(st,"y",xt)&&(tempBounds.translate(Et,xt),et.dirty(st),st.bounds.clear().union(tempBounds),tt.bounds.clear().union(tempBounds),et.dirty(st)),st.bounds}function ViewLayout$1(et){Transform.call(this,null,et)}inherits(ViewLayout$1,Transform,{transform(et,tt){const nt=tt.dataflow;return et.mark.items.forEach(rt=>{et.layout&&trellisLayout(nt,rt,et.layout),layoutGroup(nt,rt,et)}),shouldReflow(et.mark.group)?tt.reflow():tt}});function shouldReflow(et){return et&&et.mark.role!=="legend-entry"}function layoutGroup(et,tt,nt){var rt=tt.items,ot=Math.max(0,tt.width||0),st=Math.max(0,tt.height||0),ut=new Bounds().set(0,0,ot,st),ct=ut.clone(),ft=ut.clone(),pt=[],ht,mt,yt,vt,Tt,Et;for(Tt=0,Et=rt.length;Tt<Et;++Tt)switch(mt=rt[Tt],mt.role){case AxisRole$1:vt=isYAxis(mt)?ct:ft,vt.union(axisLayout(et,mt,ot,st));break;case TitleRole$1:ht=mt;break;case LegendRole$1:pt.push(legendLayout(et,mt));break;case FrameRole$1:case ScopeRole$1:case RowHeader:case RowFooter:case RowTitle:case ColHeader:case ColFooter:case ColTitle:ct.union(mt.bounds),ft.union(mt.bounds);break;default:ut.union(mt.bounds)}if(pt.length){const xt={};pt.forEach(At=>{yt=At.orient||Right$1,yt!==None&&(xt[yt]||(xt[yt]=[])).push(At)});for(const At in xt){const Ct=xt[At];gridLayout(et,Ct,legendParams(Ct,At,nt.legends,ct,ft,ot,st))}pt.forEach(At=>{const Ct=At.bounds;if(Ct.equals(At._bounds)||(At.bounds=At._bounds,et.dirty(At),At.bounds=Ct,et.dirty(At)),nt.autosize&&(nt.autosize.type===Fit||nt.autosize.type===FitX||nt.autosize.type===FitY))switch(At.orient){case Left$1:case Right$1:ut.add(Ct.x1,0).add(Ct.x2,0);break;case Top$1:case Bottom$1:ut.add(0,Ct.y1).add(0,Ct.y2)}else ut.union(Ct)})}ut.union(ct).union(ft),ht&&ut.union(titleLayout(et,ht,ot,st,ut)),tt.clip&&ut.set(0,0,tt.width||0,tt.height||0),viewSizeLayout(et,tt,ut,nt)}function viewSizeLayout(et,tt,nt,rt){const ot=rt.autosize||{},st=ot.type;if(et._autosize<1||!st)return;let ut=et._width,ct=et._height,ft=Math.max(0,tt.width||0),pt=Math.max(0,Math.ceil(-nt.x1)),ht=Math.max(0,tt.height||0),mt=Math.max(0,Math.ceil(-nt.y1));const yt=Math.max(0,Math.ceil(nt.x2-ft)),vt=Math.max(0,Math.ceil(nt.y2-ht));if(ot.contains===Padding$1){const Tt=et.padding();ut-=Tt.left+Tt.right,ct-=Tt.top+Tt.bottom}st===None?(pt=0,mt=0,ft=ut,ht=ct):st===Fit?(ft=Math.max(0,ut-pt-yt),ht=Math.max(0,ct-mt-vt)):st===FitX?(ft=Math.max(0,ut-pt-yt),ct=ht+mt+vt):st===FitY?(ut=ft+pt+yt,ht=Math.max(0,ct-mt-vt)):st===Pad&&(ut=ft+pt+yt,ct=ht+mt+vt),et._resizeView(ut,ct,ft,ht,[pt,mt],ot.resize)}const vtx=Object.freeze(Object.defineProperty({__proto__:null,bound:Bound$1,identifier:Identifier$2,mark:Mark$2,overlap:Overlap$1,render:Render$1,viewlayout:ViewLayout$1},Symbol.toStringTag,{value:"Module"}));function AxisTicks$1(et){Transform.call(this,null,et)}inherits(AxisTicks$1,Transform,{transform(et,tt){if(this.value&&!et.modified())return tt.StopPropagation;var nt=tt.dataflow.locale(),rt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),ot=this.value,st=et.scale,ut=et.count==null?et.values?et.values.length:10:et.count,ct=tickCount(st,ut,et.minstep),ft=et.format||tickFormat(nt,st,ct,et.formatSpecifier,et.formatType,!!et.values),pt=et.values?validTicks(st,et.values,ct):tickValues(st,ct);return ot&&(rt.rem=ot),ot=pt.map((ht,mt)=>ingest$1({index:mt/(pt.length-1||1),value:ht,label:ft(ht)})),et.extra&&ot.length&&ot.push(ingest$1({index:-1,extra:{value:ot[0].value},label:""})),rt.source=ot,rt.add=ot,this.value=ot,rt}});function DataJoin$1(et){Transform.call(this,null,et)}function defaultItemCreate(){return ingest$1({})}function newMap(et){const tt=fastmap().test(nt=>nt.exit);return tt.lookup=nt=>tt.get(et(nt)),tt}inherits(DataJoin$1,Transform,{transform(et,tt){var nt=tt.dataflow,rt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),ot=et.item||defaultItemCreate,st=et.key||tupleid,ut=this.value;return isArray(rt.encode)&&(rt.encode=null),ut&&(et.modified("key")||tt.modified(st))&&error("DataJoin does not support modified key function or fields."),ut||(tt=tt.addAll(),this.value=ut=newMap(st)),tt.visit(tt.ADD,ct=>{const ft=st(ct);let pt=ut.get(ft);pt?pt.exit?(ut.empty--,rt.add.push(pt)):rt.mod.push(pt):(pt=ot(ct),ut.set(ft,pt),rt.add.push(pt)),pt.datum=ct,pt.exit=!1}),tt.visit(tt.MOD,ct=>{const ft=st(ct),pt=ut.get(ft);pt&&(pt.datum=ct,rt.mod.push(pt))}),tt.visit(tt.REM,ct=>{const ft=st(ct),pt=ut.get(ft);ct===pt.datum&&!pt.exit&&(rt.rem.push(pt),pt.exit=!0,++ut.empty)}),tt.changed(tt.ADD_MOD)&&rt.modifies("datum"),(tt.clean()||et.clean&&ut.empty>nt.cleanThreshold)&&nt.runAfter(ut.clean),rt}});function Encode$1(et){Transform.call(this,null,et)}inherits(Encode$1,Transform,{transform(et,tt){var nt=tt.fork(tt.ADD_REM),rt=et.mod||!1,ot=et.encoders,st=tt.encode;if(isArray(st))if(nt.changed()||st.every(mt=>ot[mt]))st=st[0],nt.encode=null;else return tt.StopPropagation;var ut=st==="enter",ct=ot.update||falsy,ft=ot.enter||falsy,pt=ot.exit||falsy,ht=(st&&!ut?ot[st]:ct)||falsy;if(tt.changed(tt.ADD)&&(tt.visit(tt.ADD,mt=>{ft(mt,et),ct(mt,et)}),nt.modifies(ft.output),nt.modifies(ct.output),ht!==falsy&&ht!==ct&&(tt.visit(tt.ADD,mt=>{ht(mt,et)}),nt.modifies(ht.output))),tt.changed(tt.REM)&&pt!==falsy&&(tt.visit(tt.REM,mt=>{pt(mt,et)}),nt.modifies(pt.output)),ut||ht!==falsy){const mt=tt.MOD|(et.modified()?tt.REFLOW:0);ut?(tt.visit(mt,yt=>{const vt=ft(yt,et)||rt;(ht(yt,et)||vt)&&nt.mod.push(yt)}),nt.mod.length&&nt.modifies(ft.output)):tt.visit(mt,yt=>{(ht(yt,et)||rt)&&nt.mod.push(yt)}),nt.mod.length&&nt.modifies(ht.output)}return nt.changed()?nt:tt.StopPropagation}});function LegendEntries$1(et){Transform.call(this,[],et)}inherits(LegendEntries$1,Transform,{transform(et,tt){if(this.value!=null&&!et.modified())return tt.StopPropagation;var nt=tt.dataflow.locale(),rt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),ot=this.value,st=et.type||SymbolLegend,ut=et.scale,ct=+et.limit,ft=tickCount(ut,et.count==null?5:et.count,et.minstep),pt=!!et.values||st===SymbolLegend,ht=et.format||labelFormat(nt,ut,ft,st,et.formatSpecifier,et.formatType,pt),mt=et.values||labelValues(ut,ft),yt,vt,Tt,Et,xt;return ot&&(rt.rem=ot),st===SymbolLegend?(ct&&mt.length>ct?(tt.dataflow.warn("Symbol legend count exceeds limit, filtering items."),ot=mt.slice(0,ct-1),xt=!0):ot=mt,isFunction$3(Tt=et.size)?(!et.values&&ut(ot[0])===0&&(ot=ot.slice(1)),Et=ot.reduce((At,Ct)=>Math.max(At,Tt(Ct,et)),0)):Tt=constant$6(Et=Tt||8),ot=ot.map((At,Ct)=>ingest$1({index:Ct,label:ht(At,Ct,ot),value:At,offset:Et,size:Tt(At,et)})),xt&&(xt=mt[ot.length],ot.push(ingest$1({index:ot.length,label:`\u2026${mt.length-ot.length} entries`,value:xt,offset:Et,size:Tt(xt,et)})))):st===GradientLegend?(yt=ut.domain(),vt=scaleFraction(ut,yt[0],peek$2(yt)),mt.length<3&&!et.values&&yt[0]!==peek$2(yt)&&(mt=[yt[0],peek$2(yt)]),ot=mt.map((At,Ct)=>ingest$1({index:Ct,label:ht(At,Ct,mt),value:At,perc:vt(At)}))):(Tt=mt.length-1,vt=labelFraction(ut),ot=mt.map((At,Ct)=>ingest$1({index:Ct,label:ht(At,Ct,mt),value:At,perc:Ct?vt(At):0,perc2:Ct===Tt?1:vt(mt[Ct+1])}))),rt.source=ot,rt.add=ot,this.value=ot,rt}});const sourceX=et=>et.source.x,sourceY=et=>et.source.y,targetX=et=>et.target.x,targetY=et=>et.target.y;function LinkPath(et){Transform.call(this,{},et)}LinkPath.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]};inherits(LinkPath,Transform,{transform(et,tt){var nt=et.sourceX||sourceX,rt=et.sourceY||sourceY,ot=et.targetX||targetX,st=et.targetY||targetY,ut=et.as||"path",ct=et.orient||"vertical",ft=et.shape||"line",pt=Paths.get(ft+"-"+ct)||Paths.get(ft);return pt||error("LinkPath unsupported type: "+et.shape+(et.orient?"-"+et.orient:"")),tt.visit(tt.SOURCE,ht=>{ht[ut]=pt(nt(ht),rt(ht),ot(ht),st(ht))}),tt.reflow(et.modified()).modifies(ut)}});const line$1=(et,tt,nt,rt)=>"M"+et+","+tt+"L"+nt+","+rt,lineR=(et,tt,nt,rt)=>line$1(tt*Math.cos(et),tt*Math.sin(et),rt*Math.cos(nt),rt*Math.sin(nt)),arc$1=(et,tt,nt,rt)=>{var ot=nt-et,st=rt-tt,ut=Math.hypot(ot,st)/2,ct=180*Math.atan2(st,ot)/Math.PI;return"M"+et+","+tt+"A"+ut+","+ut+" "+ct+" 0 1 "+nt+","+rt},arcR=(et,tt,nt,rt)=>arc$1(tt*Math.cos(et),tt*Math.sin(et),rt*Math.cos(nt),rt*Math.sin(nt)),curve=(et,tt,nt,rt)=>{const ot=nt-et,st=rt-tt,ut=.2*(ot+st),ct=.2*(st-ot);return"M"+et+","+tt+"C"+(et+ut)+","+(tt+ct)+" "+(nt+ct)+","+(rt-ut)+" "+nt+","+rt},curveR=(et,tt,nt,rt)=>curve(tt*Math.cos(et),tt*Math.sin(et),rt*Math.cos(nt),rt*Math.sin(nt)),orthoX=(et,tt,nt,rt)=>"M"+et+","+tt+"V"+rt+"H"+nt,orthoY=(et,tt,nt,rt)=>"M"+et+","+tt+"H"+nt+"V"+rt,orthoR=(et,tt,nt,rt)=>{const ot=Math.cos(et),st=Math.sin(et),ut=Math.cos(nt),ct=Math.sin(nt),ft=Math.abs(nt-et)>Math.PI?nt<=et:nt>et;return"M"+tt*ot+","+tt*st+"A"+tt+","+tt+" 0 0,"+(ft?1:0)+" "+tt*ut+","+tt*ct+"L"+rt*ut+","+rt*ct},diagonalX=(et,tt,nt,rt)=>{const ot=(et+nt)/2;return"M"+et+","+tt+"C"+ot+","+tt+" "+ot+","+rt+" "+nt+","+rt},diagonalY=(et,tt,nt,rt)=>{const ot=(tt+rt)/2;return"M"+et+","+tt+"C"+et+","+ot+" "+nt+","+ot+" "+nt+","+rt},diagonalR=(et,tt,nt,rt)=>{const ot=Math.cos(et),st=Math.sin(et),ut=Math.cos(nt),ct=Math.sin(nt),ft=(tt+rt)/2;return"M"+tt*ot+","+tt*st+"C"+ft*ot+","+ft*st+" "+ft*ut+","+ft*ct+" "+rt*ut+","+rt*ct},Paths=fastmap({line:line$1,"line-radial":lineR,arc:arc$1,"arc-radial":arcR,curve,"curve-radial":curveR,"orthogonal-horizontal":orthoX,"orthogonal-vertical":orthoY,"orthogonal-radial":orthoR,"diagonal-horizontal":diagonalX,"diagonal-vertical":diagonalY,"diagonal-radial":diagonalR});function Pie(et){Transform.call(this,null,et)}Pie.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]};inherits(Pie,Transform,{transform(et,tt){var nt=et.as||["startAngle","endAngle"],rt=nt[0],ot=nt[1],st=et.field||one$2,ut=et.startAngle||0,ct=et.endAngle!=null?et.endAngle:2*Math.PI,ft=tt.source,pt=ft.map(st),ht=pt.length,mt=ut,yt=(ct-ut)/sum$1(pt),vt=range$4(ht),Tt,Et,xt;for(et.sort&&vt.sort((At,Ct)=>pt[At]-pt[Ct]),Tt=0;Tt<ht;++Tt)xt=pt[vt[Tt]],Et=ft[vt[Tt]],Et[rt]=mt,Et[ot]=mt+=xt*yt;return this.value=pt,tt.reflow(et.modified()).modifies(nt)}});const DEFAULT_COUNT=5;function includeZero(et){const tt=et.type;return!et.bins&&(tt===Linear||tt===Pow||tt===Sqrt)}function includePad(et){return isContinuous$1(et)&&et!==Sequential}const SKIP$1=toSet(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma"]);function Scale$1(et){Transform.call(this,null,et),this.modified(!0)}inherits(Scale$1,Transform,{transform(et,tt){var nt=tt.dataflow,rt=this.value,ot=scaleKey(et);(!rt||ot!==rt.type)&&(this.value=rt=scale$4(ot)());for(ot in et)if(!SKIP$1[ot]){if(ot==="padding"&&includePad(rt.type))continue;isFunction$3(rt[ot])?rt[ot](et[ot]):nt.warn("Unsupported scale property: "+ot)}return configureRange(rt,et,configureBins(rt,et,configureDomain(rt,et,nt))),tt.fork(tt.NO_SOURCE|tt.NO_FIELDS)}});function scaleKey(et){var tt=et.type,nt="",rt;return tt===Sequential?Sequential+"-"+Linear:(isContinuousColor(et)&&(rt=et.rawDomain?et.rawDomain.length:et.domain?et.domain.length+ +(et.domainMid!=null):0,nt=rt===2?Sequential+"-":rt===3?Diverging+"-":""),(nt+tt||Linear).toLowerCase())}function isContinuousColor(et){const tt=et.type;return isContinuous$1(tt)&&tt!==Time&&tt!==UTC&&(et.scheme||et.range&&et.range.length&&et.range.every(isString))}function configureDomain(et,tt,nt){const rt=rawDomain(et,tt.domainRaw,nt);if(rt>-1)return rt;var ot=tt.domain,st=et.type,ut=tt.zero||tt.zero===void 0&&includeZero(et),ct,ft;if(!ot)return 0;if(includePad(st)&&tt.padding&&ot[0]!==peek$2(ot)&&(ot=padDomain(st,ot,tt.range,tt.padding,tt.exponent,tt.constant)),(ut||tt.domainMin!=null||tt.domainMax!=null||tt.domainMid!=null)&&(ct=(ot=ot.slice()).length-1||1,ut&&(ot[0]>0&&(ot[0]=0),ot[ct]<0&&(ot[ct]=0)),tt.domainMin!=null&&(ot[0]=tt.domainMin),tt.domainMax!=null&&(ot[ct]=tt.domainMax),tt.domainMid!=null)){ft=tt.domainMid;const pt=ft>ot[ct]?ct+1:ft<ot[0]?0:ct;pt!==ct&&nt.warn("Scale domainMid exceeds domain min or max.",ft),ot.splice(pt,0,ft)}return et.domain(domainCheck(st,ot,nt)),st===Ordinal&&et.unknown(tt.domainImplicit?implicit:void 0),tt.nice&&et.nice&&et.nice(tt.nice!==!0&&tickCount(et,tt.nice)||null),ot.length}function rawDomain(et,tt,nt){return tt?(et.domain(domainCheck(et.type,tt,nt)),tt.length):-1}function padDomain(et,tt,nt,rt,ot,st){var ut=Math.abs(peek$2(nt)-nt[0]),ct=ut/(ut-2*rt),ft=et===Log?zoomLog(tt,null,ct):et===Sqrt?zoomPow(tt,null,ct,.5):et===Pow?zoomPow(tt,null,ct,ot||1):et===Symlog?zoomSymlog(tt,null,ct,st||1):zoomLinear(tt,null,ct);return tt=tt.slice(),tt[0]=ft[0],tt[tt.length-1]=ft[1],tt}function domainCheck(et,tt,nt){if(isLogarithmic(et)){var rt=Math.abs(tt.reduce((ot,st)=>ot+(st<0?-1:st>0?1:0),0));rt!==tt.length&&nt.warn("Log scale domain includes zero: "+$(tt))}return tt}function configureBins(et,tt,nt){let rt=tt.bins;if(rt&&!isArray(rt)){const ot=et.domain(),st=ot[0],ut=peek$2(ot),ct=rt.step;let ft=rt.start==null?st:rt.start,pt=rt.stop==null?ut:rt.stop;ct||error("Scale bins parameter missing step property."),ft<st&&(ft=ct*Math.ceil(st/ct)),pt>ut&&(pt=ct*Math.floor(ut/ct)),rt=range$4(ft,pt+ct/2,ct)}return rt?et.bins=rt:et.bins&&delete et.bins,et.type===BinOrdinal&&(rt?!tt.domain&&!tt.domainRaw&&(et.domain(rt),nt=rt.length):et.bins=et.domain()),nt}function configureRange(et,tt,nt){var rt=et.type,ot=tt.round||!1,st=tt.range;if(tt.rangeStep!=null)st=configureRangeStep(rt,tt,nt);else if(tt.scheme&&(st=configureScheme(rt,tt,nt),isFunction$3(st))){if(et.interpolator)return et.interpolator(st);error(`Scale type ${rt} does not support interpolating color schemes.`)}if(st&&isInterpolating(rt))return et.interpolator(interpolateColors(flip$1(st,tt.reverse),tt.interpolate,tt.interpolateGamma));st&&tt.interpolate&&et.interpolate?et.interpolate(interpolate$1(tt.interpolate,tt.interpolateGamma)):isFunction$3(et.round)?et.round(ot):isFunction$3(et.rangeRound)&&et.interpolate(ot?interpolateRound:interpolate$1$1),st&&et.range(flip$1(st,tt.reverse))}function configureRangeStep(et,tt,nt){et!==Band&&et!==Point&&error("Only band and point scales support rangeStep.");var rt=(tt.paddingOuter!=null?tt.paddingOuter:tt.padding)||0,ot=et===Point?1:(tt.paddingInner!=null?tt.paddingInner:tt.padding)||0;return[0,tt.rangeStep*bandSpace(nt,ot,rt)]}function configureScheme(et,tt,nt){var rt=tt.schemeExtent,ot,st;return isArray(tt.scheme)?st=interpolateColors(tt.scheme,tt.interpolate,tt.interpolateGamma):(ot=tt.scheme.toLowerCase(),st=scheme(ot),st||error(`Unrecognized scheme name: ${tt.scheme}`)),nt=et===Threshold?nt+1:et===BinOrdinal?nt-1:et===Quantile||et===Quantize?+tt.schemeCount||DEFAULT_COUNT:nt,isInterpolating(et)?adjustScheme(st,rt,tt.reverse):isFunction$3(st)?quantizeInterpolator(adjustScheme(st,rt),nt):et===Ordinal?st:st.slice(0,nt)}function adjustScheme(et,tt,nt){return isFunction$3(et)&&(tt||nt)?interpolateRange$1(et,flip$1(tt||[0,1],nt)):et}function flip$1(et,tt){return tt?et.slice().reverse():et}function SortItems$1(et){Transform.call(this,null,et)}inherits(SortItems$1,Transform,{transform(et,tt){const nt=et.modified("sort")||tt.changed(tt.ADD)||tt.modified(et.sort.fields)||tt.modified("datum");return nt&&tt.source.sort(stableCompare(et.sort)),this.modified(nt),tt}});const Zero="zero",Center$1="center",Normalize="normalize",DefOutput=["y0","y1"];function Stack(et){Transform.call(this,null,et)}Stack.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:Zero,values:[Zero,Center$1,Normalize]},{name:"as",type:"string",array:!0,length:2,default:DefOutput}]};inherits(Stack,Transform,{transform(et,tt){var nt=et.as||DefOutput,rt=nt[0],ot=nt[1],st=stableCompare(et.sort),ut=et.field||one$2,ct=et.offset===Center$1?stackCenter:et.offset===Normalize?stackNormalize:stackZero,ft,pt,ht,mt;for(ft=partition$3(tt.source,et.groupby,st,ut),pt=0,ht=ft.length,mt=ft.max;pt<ht;++pt)ct(ft[pt],mt,ut,rt,ot);return tt.reflow(et.modified()).modifies(nt)}});function stackCenter(et,tt,nt,rt,ot){for(var st=(tt-et.sum)/2,ut=et.length,ct=0,ft;ct<ut;++ct)ft=et[ct],ft[rt]=st,ft[ot]=st+=Math.abs(nt(ft))}function stackNormalize(et,tt,nt,rt,ot){for(var st=1/et.sum,ut=0,ct=et.length,ft=0,pt=0,ht;ft<ct;++ft)ht=et[ft],ht[rt]=ut,ht[ot]=ut=st*(pt+=Math.abs(nt(ht)))}function stackZero(et,tt,nt,rt,ot){for(var st=0,ut=0,ct=et.length,ft=0,pt,ht;ft<ct;++ft)ht=et[ft],pt=+nt(ht),pt<0?(ht[rt]=ut,ht[ot]=ut+=pt):(ht[rt]=st,ht[ot]=st+=pt)}function partition$3(et,tt,nt,rt){var ot=[],st=Et=>Et(ht),ut,ct,ft,pt,ht,mt,yt,vt,Tt;if(tt==null)ot.push(et.slice());else for(ut={},ct=0,ft=et.length;ct<ft;++ct)ht=et[ct],mt=tt.map(st),yt=ut[mt],yt||(ut[mt]=yt=[],ot.push(yt)),yt.push(ht);for(mt=0,Tt=0,pt=ot.length;mt<pt;++mt){for(yt=ot[mt],ct=0,vt=0,ft=yt.length;ct<ft;++ct)vt+=Math.abs(rt(yt[ct]));yt.sum=vt,vt>Tt&&(Tt=vt),nt&&yt.sort(nt)}return ot.max=Tt,ot}const encode$1=Object.freeze(Object.defineProperty({__proto__:null,axisticks:AxisTicks$1,datajoin:DataJoin$1,encode:Encode$1,legendentries:LegendEntries$1,linkpath:LinkPath,pie:Pie,scale:Scale$1,sortitems:SortItems$1,stack:Stack},Symbol.toStringTag,{value:"Module"}));var epsilon$4=1e-6,epsilon2=1e-12,pi$1=Math.PI,halfPi$1=pi$1/2,quarterPi=pi$1/4,tau$1=pi$1*2,degrees=180/pi$1,radians=pi$1/180,abs$1=Math.abs,atan=Math.atan,atan2=Math.atan2,cos$1=Math.cos,ceil=Math.ceil,exp=Math.exp,hypot=Math.hypot,log$3=Math.log,pow$1=Math.pow,sin$1=Math.sin,sign=Math.sign||function(et){return et>0?1:et<0?-1:0},sqrt$1=Math.sqrt,tan=Math.tan;function acos(et){return et>1?0:et<-1?pi$1:Math.acos(et)}function asin$1(et){return et>1?halfPi$1:et<-1?-halfPi$1:Math.asin(et)}function noop$a(){}function streamGeometry(et,tt){et&&streamGeometryType.hasOwnProperty(et.type)&&streamGeometryType[et.type](et,tt)}var streamObjectType={Feature:function(et,tt){streamGeometry(et.geometry,tt)},FeatureCollection:function(et,tt){for(var nt=et.features,rt=-1,ot=nt.length;++rt<ot;)streamGeometry(nt[rt].geometry,tt)}},streamGeometryType={Sphere:function(et,tt){tt.sphere()},Point:function(et,tt){et=et.coordinates,tt.point(et[0],et[1],et[2])},MultiPoint:function(et,tt){for(var nt=et.coordinates,rt=-1,ot=nt.length;++rt<ot;)et=nt[rt],tt.point(et[0],et[1],et[2])},LineString:function(et,tt){streamLine(et.coordinates,tt,0)},MultiLineString:function(et,tt){for(var nt=et.coordinates,rt=-1,ot=nt.length;++rt<ot;)streamLine(nt[rt],tt,0)},Polygon:function(et,tt){streamPolygon(et.coordinates,tt)},MultiPolygon:function(et,tt){for(var nt=et.coordinates,rt=-1,ot=nt.length;++rt<ot;)streamPolygon(nt[rt],tt)},GeometryCollection:function(et,tt){for(var nt=et.geometries,rt=-1,ot=nt.length;++rt<ot;)streamGeometry(nt[rt],tt)}};function streamLine(et,tt,nt){var rt=-1,ot=et.length-nt,st;for(tt.lineStart();++rt<ot;)st=et[rt],tt.point(st[0],st[1],st[2]);tt.lineEnd()}function streamPolygon(et,tt){var nt=-1,rt=et.length;for(tt.polygonStart();++nt<rt;)streamLine(et[nt],tt,1);tt.polygonEnd()}function geoStream(et,tt){et&&streamObjectType.hasOwnProperty(et.type)?streamObjectType[et.type](et,tt):streamGeometry(et,tt)}var areaRingSum$1=new Adder,areaSum$1=new Adder,lambda00$2,phi00$2,lambda0$1,cosPhi0,sinPhi0,areaStream$1={point:noop$a,lineStart:noop$a,lineEnd:noop$a,polygonStart:function(){areaRingSum$1=new Adder,areaStream$1.lineStart=areaRingStart$1,areaStream$1.lineEnd=areaRingEnd$1},polygonEnd:function(){var et=+areaRingSum$1;areaSum$1.add(et<0?tau$1+et:et),this.lineStart=this.lineEnd=this.point=noop$a},sphere:function(){areaSum$1.add(tau$1)}};function areaRingStart$1(){areaStream$1.point=areaPointFirst$1}function areaRingEnd$1(){areaPoint$1(lambda00$2,phi00$2)}function areaPointFirst$1(et,tt){areaStream$1.point=areaPoint$1,lambda00$2=et,phi00$2=tt,et*=radians,tt*=radians,lambda0$1=et,cosPhi0=cos$1(tt=tt/2+quarterPi),sinPhi0=sin$1(tt)}function areaPoint$1(et,tt){et*=radians,tt*=radians,tt=tt/2+quarterPi;var nt=et-lambda0$1,rt=nt>=0?1:-1,ot=rt*nt,st=cos$1(tt),ut=sin$1(tt),ct=sinPhi0*ut,ft=cosPhi0*st+ct*cos$1(ot),pt=ct*rt*sin$1(ot);areaRingSum$1.add(atan2(pt,ft)),lambda0$1=et,cosPhi0=st,sinPhi0=ut}function geoArea$1(et){return areaSum$1=new Adder,geoStream(et,areaStream$1),areaSum$1*2}function spherical(et){return[atan2(et[1],et[0]),asin$1(et[2])]}function cartesian(et){var tt=et[0],nt=et[1],rt=cos$1(nt);return[rt*cos$1(tt),rt*sin$1(tt),sin$1(nt)]}function cartesianDot(et,tt){return et[0]*tt[0]+et[1]*tt[1]+et[2]*tt[2]}function cartesianCross(et,tt){return[et[1]*tt[2]-et[2]*tt[1],et[2]*tt[0]-et[0]*tt[2],et[0]*tt[1]-et[1]*tt[0]]}function cartesianAddInPlace(et,tt){et[0]+=tt[0],et[1]+=tt[1],et[2]+=tt[2]}function cartesianScale(et,tt){return[et[0]*tt,et[1]*tt,et[2]*tt]}function cartesianNormalizeInPlace(et){var tt=sqrt$1(et[0]*et[0]+et[1]*et[1]+et[2]*et[2]);et[0]/=tt,et[1]/=tt,et[2]/=tt}var lambda0,phi0,lambda1,phi1,lambda2,lambda00$1,phi00$1,p0,deltaSum,ranges,range$3,boundsStream$2={point:boundsPoint$1,lineStart:boundsLineStart,lineEnd:boundsLineEnd,polygonStart:function(){boundsStream$2.point=boundsRingPoint,boundsStream$2.lineStart=boundsRingStart,boundsStream$2.lineEnd=boundsRingEnd,deltaSum=new Adder,areaStream$1.polygonStart()},polygonEnd:function(){areaStream$1.polygonEnd(),boundsStream$2.point=boundsPoint$1,boundsStream$2.lineStart=boundsLineStart,boundsStream$2.lineEnd=boundsLineEnd,areaRingSum$1<0?(lambda0=-(lambda1=180),phi0=-(phi1=90)):deltaSum>epsilon$4?phi1=90:deltaSum<-epsilon$4&&(phi0=-90),range$3[0]=lambda0,range$3[1]=lambda1},sphere:function(){lambda0=-(lambda1=180),phi0=-(phi1=90)}};function boundsPoint$1(et,tt){ranges.push(range$3=[lambda0=et,lambda1=et]),tt<phi0&&(phi0=tt),tt>phi1&&(phi1=tt)}function linePoint(et,tt){var nt=cartesian([et*radians,tt*radians]);if(p0){var rt=cartesianCross(p0,nt),ot=[rt[1],-rt[0],0],st=cartesianCross(ot,rt);cartesianNormalizeInPlace(st),st=spherical(st);var ut=et-lambda2,ct=ut>0?1:-1,ft=st[0]*degrees*ct,pt,ht=abs$1(ut)>180;ht^(ct*lambda2<ft&&ft<ct*et)?(pt=st[1]*degrees,pt>phi1&&(phi1=pt)):(ft=(ft+360)%360-180,ht^(ct*lambda2<ft&&ft<ct*et)?(pt=-st[1]*degrees,pt<phi0&&(phi0=pt)):(tt<phi0&&(phi0=tt),tt>phi1&&(phi1=tt))),ht?et<lambda2?angle(lambda0,et)>angle(lambda0,lambda1)&&(lambda1=et):angle(et,lambda1)>angle(lambda0,lambda1)&&(lambda0=et):lambda1>=lambda0?(et<lambda0&&(lambda0=et),et>lambda1&&(lambda1=et)):et>lambda2?angle(lambda0,et)>angle(lambda0,lambda1)&&(lambda1=et):angle(et,lambda1)>angle(lambda0,lambda1)&&(lambda0=et)}else ranges.push(range$3=[lambda0=et,lambda1=et]);tt<phi0&&(phi0=tt),tt>phi1&&(phi1=tt),p0=nt,lambda2=et}function boundsLineStart(){boundsStream$2.point=linePoint}function boundsLineEnd(){range$3[0]=lambda0,range$3[1]=lambda1,boundsStream$2.point=boundsPoint$1,p0=null}function boundsRingPoint(et,tt){if(p0){var nt=et-lambda2;deltaSum.add(abs$1(nt)>180?nt+(nt>0?360:-360):nt)}else lambda00$1=et,phi00$1=tt;areaStream$1.point(et,tt),linePoint(et,tt)}function boundsRingStart(){areaStream$1.lineStart()}function boundsRingEnd(){boundsRingPoint(lambda00$1,phi00$1),areaStream$1.lineEnd(),abs$1(deltaSum)>epsilon$4&&(lambda0=-(lambda1=180)),range$3[0]=lambda0,range$3[1]=lambda1,p0=null}function angle(et,tt){return(tt-=et)<0?tt+360:tt}function rangeCompare(et,tt){return et[0]-tt[0]}function rangeContains(et,tt){return et[0]<=et[1]?et[0]<=tt&&tt<=et[1]:tt<et[0]||et[1]<tt}function geoBounds$1(et){var tt,nt,rt,ot,st,ut,ct;if(phi1=lambda1=-(lambda0=phi0=1/0),ranges=[],geoStream(et,boundsStream$2),nt=ranges.length){for(ranges.sort(rangeCompare),tt=1,rt=ranges[0],st=[rt];tt<nt;++tt)ot=ranges[tt],rangeContains(rt,ot[0])||rangeContains(rt,ot[1])?(angle(rt[0],ot[1])>angle(rt[0],rt[1])&&(rt[1]=ot[1]),angle(ot[0],rt[1])>angle(rt[0],rt[1])&&(rt[0]=ot[0])):st.push(rt=ot);for(ut=-1/0,nt=st.length-1,tt=0,rt=st[nt];tt<=nt;rt=ot,++tt)ot=st[tt],(ct=angle(rt[1],ot[0]))>ut&&(ut=ct,lambda0=ot[0],lambda1=rt[1])}return ranges=range$3=null,lambda0===1/0||phi0===1/0?[[NaN,NaN],[NaN,NaN]]:[[lambda0,phi0],[lambda1,phi1]]}var W0,W1,X0$1,Y0$1,Z0$1,X1$1,Y1$1,Z1$1,X2$2,Y2$2,Z2$1,lambda00,phi00,x0$4,y0$4,z0,centroidStream$1={sphere:noop$a,point:centroidPoint$1,lineStart:centroidLineStart$1,lineEnd:centroidLineEnd$1,polygonStart:function(){centroidStream$1.lineStart=centroidRingStart$1,centroidStream$1.lineEnd=centroidRingEnd$1},polygonEnd:function(){centroidStream$1.lineStart=centroidLineStart$1,centroidStream$1.lineEnd=centroidLineEnd$1}};function centroidPoint$1(et,tt){et*=radians,tt*=radians;var nt=cos$1(tt);centroidPointCartesian(nt*cos$1(et),nt*sin$1(et),sin$1(tt))}function centroidPointCartesian(et,tt,nt){++W0,X0$1+=(et-X0$1)/W0,Y0$1+=(tt-Y0$1)/W0,Z0$1+=(nt-Z0$1)/W0}function centroidLineStart$1(){centroidStream$1.point=centroidLinePointFirst}function centroidLinePointFirst(et,tt){et*=radians,tt*=radians;var nt=cos$1(tt);x0$4=nt*cos$1(et),y0$4=nt*sin$1(et),z0=sin$1(tt),centroidStream$1.point=centroidLinePoint,centroidPointCartesian(x0$4,y0$4,z0)}function centroidLinePoint(et,tt){et*=radians,tt*=radians;var nt=cos$1(tt),rt=nt*cos$1(et),ot=nt*sin$1(et),st=sin$1(tt),ut=atan2(sqrt$1((ut=y0$4*st-z0*ot)*ut+(ut=z0*rt-x0$4*st)*ut+(ut=x0$4*ot-y0$4*rt)*ut),x0$4*rt+y0$4*ot+z0*st);W1+=ut,X1$1+=ut*(x0$4+(x0$4=rt)),Y1$1+=ut*(y0$4+(y0$4=ot)),Z1$1+=ut*(z0+(z0=st)),centroidPointCartesian(x0$4,y0$4,z0)}function centroidLineEnd$1(){centroidStream$1.point=centroidPoint$1}function centroidRingStart$1(){centroidStream$1.point=centroidRingPointFirst}function centroidRingEnd$1(){centroidRingPoint(lambda00,phi00),centroidStream$1.point=centroidPoint$1}function centroidRingPointFirst(et,tt){lambda00=et,phi00=tt,et*=radians,tt*=radians,centroidStream$1.point=centroidRingPoint;var nt=cos$1(tt);x0$4=nt*cos$1(et),y0$4=nt*sin$1(et),z0=sin$1(tt),centroidPointCartesian(x0$4,y0$4,z0)}function centroidRingPoint(et,tt){et*=radians,tt*=radians;var nt=cos$1(tt),rt=nt*cos$1(et),ot=nt*sin$1(et),st=sin$1(tt),ut=y0$4*st-z0*ot,ct=z0*rt-x0$4*st,ft=x0$4*ot-y0$4*rt,pt=hypot(ut,ct,ft),ht=asin$1(pt),mt=pt&&-ht/pt;X2$2.add(mt*ut),Y2$2.add(mt*ct),Z2$1.add(mt*ft),W1+=ht,X1$1+=ht*(x0$4+(x0$4=rt)),Y1$1+=ht*(y0$4+(y0$4=ot)),Z1$1+=ht*(z0+(z0=st)),centroidPointCartesian(x0$4,y0$4,z0)}function geoCentroid$1(et){W0=W1=X0$1=Y0$1=Z0$1=X1$1=Y1$1=Z1$1=0,X2$2=new Adder,Y2$2=new Adder,Z2$1=new Adder,geoStream(et,centroidStream$1);var tt=+X2$2,nt=+Y2$2,rt=+Z2$1,ot=hypot(tt,nt,rt);return ot<epsilon2&&(tt=X1$1,nt=Y1$1,rt=Z1$1,W1<epsilon$4&&(tt=X0$1,nt=Y0$1,rt=Z0$1),ot=hypot(tt,nt,rt),ot<epsilon2)?[NaN,NaN]:[atan2(nt,tt)*degrees,asin$1(rt/ot)*degrees]}function compose$1(et,tt){function nt(rt,ot){return rt=et(rt,ot),tt(rt[0],rt[1])}return et.invert&&tt.invert&&(nt.invert=function(rt,ot){return rt=tt.invert(rt,ot),rt&&et.invert(rt[0],rt[1])}),nt}function rotationIdentity(et,tt){return abs$1(et)>pi$1&&(et-=Math.round(et/tau$1)*tau$1),[et,tt]}rotationIdentity.invert=rotationIdentity;function rotateRadians(et,tt,nt){return(et%=tau$1)?tt||nt?compose$1(rotationLambda(et),rotationPhiGamma(tt,nt)):rotationLambda(et):tt||nt?rotationPhiGamma(tt,nt):rotationIdentity}function forwardRotationLambda(et){return function(tt,nt){return tt+=et,abs$1(tt)>pi$1&&(tt-=Math.round(tt/tau$1)*tau$1),[tt,nt]}}function rotationLambda(et){var tt=forwardRotationLambda(et);return tt.invert=forwardRotationLambda(-et),tt}function rotationPhiGamma(et,tt){var nt=cos$1(et),rt=sin$1(et),ot=cos$1(tt),st=sin$1(tt);function ut(ct,ft){var pt=cos$1(ft),ht=cos$1(ct)*pt,mt=sin$1(ct)*pt,yt=sin$1(ft),vt=yt*nt+ht*rt;return[atan2(mt*ot-vt*st,ht*nt-yt*rt),asin$1(vt*ot+mt*st)]}return ut.invert=function(ct,ft){var pt=cos$1(ft),ht=cos$1(ct)*pt,mt=sin$1(ct)*pt,yt=sin$1(ft),vt=yt*ot-mt*st;return[atan2(mt*ot+yt*st,ht*nt+vt*rt),asin$1(vt*nt-ht*rt)]},ut}function rotation(et){et=rotateRadians(et[0]*radians,et[1]*radians,et.length>2?et[2]*radians:0);function tt(nt){return nt=et(nt[0]*radians,nt[1]*radians),nt[0]*=degrees,nt[1]*=degrees,nt}return tt.invert=function(nt){return nt=et.invert(nt[0]*radians,nt[1]*radians),nt[0]*=degrees,nt[1]*=degrees,nt},tt}function circleStream(et,tt,nt,rt,ot,st){if(!!nt){var ut=cos$1(tt),ct=sin$1(tt),ft=rt*nt;ot==null?(ot=tt+rt*tau$1,st=tt-ft/2):(ot=circleRadius(ut,ot),st=circleRadius(ut,st),(rt>0?ot<st:ot>st)&&(ot+=rt*tau$1));for(var pt,ht=ot;rt>0?ht>st:ht<st;ht-=ft)pt=spherical([ut,-ct*cos$1(ht),-ct*sin$1(ht)]),et.point(pt[0],pt[1])}}function circleRadius(et,tt){tt=cartesian(tt),tt[0]-=et,cartesianNormalizeInPlace(tt);var nt=acos(-tt[1]);return((-tt[2]<0?-nt:nt)+tau$1-epsilon$4)%tau$1}function clipBuffer(){var et=[],tt;return{point:function(nt,rt,ot){tt.push([nt,rt,ot])},lineStart:function(){et.push(tt=[])},lineEnd:noop$a,rejoin:function(){et.length>1&&et.push(et.pop().concat(et.shift()))},result:function(){var nt=et;return et=[],tt=null,nt}}}function pointEqual(et,tt){return abs$1(et[0]-tt[0])<epsilon$4&&abs$1(et[1]-tt[1])<epsilon$4}function Intersection(et,tt,nt,rt){this.x=et,this.z=tt,this.o=nt,this.e=rt,this.v=!1,this.n=this.p=null}function clipRejoin(et,tt,nt,rt,ot){var st=[],ut=[],ct,ft;if(et.forEach(function(Tt){if(!((Et=Tt.length-1)<=0)){var Et,xt=Tt[0],At=Tt[Et],Ct;if(pointEqual(xt,At)){if(!xt[2]&&!At[2]){for(ot.lineStart(),ct=0;ct<Et;++ct)ot.point((xt=Tt[ct])[0],xt[1]);ot.lineEnd();return}At[0]+=2*epsilon$4}st.push(Ct=new Intersection(xt,Tt,null,!0)),ut.push(Ct.o=new Intersection(xt,null,Ct,!1)),st.push(Ct=new Intersection(At,Tt,null,!1)),ut.push(Ct.o=new Intersection(At,null,Ct,!0))}}),!!st.length){for(ut.sort(tt),link$1(st),link$1(ut),ct=0,ft=ut.length;ct<ft;++ct)ut[ct].e=nt=!nt;for(var pt=st[0],ht,mt;;){for(var yt=pt,vt=!0;yt.v;)if((yt=yt.n)===pt)return;ht=yt.z,ot.lineStart();do{if(yt.v=yt.o.v=!0,yt.e){if(vt)for(ct=0,ft=ht.length;ct<ft;++ct)ot.point((mt=ht[ct])[0],mt[1]);else rt(yt.x,yt.n.x,1,ot);yt=yt.n}else{if(vt)for(ht=yt.p.z,ct=ht.length-1;ct>=0;--ct)ot.point((mt=ht[ct])[0],mt[1]);else rt(yt.x,yt.p.x,-1,ot);yt=yt.p}yt=yt.o,ht=yt.z,vt=!vt}while(!yt.v);ot.lineEnd()}}}function link$1(et){if(!!(tt=et.length)){for(var tt,nt=0,rt=et[0],ot;++nt<tt;)rt.n=ot=et[nt],ot.p=rt,rt=ot;rt.n=ot=et[0],ot.p=rt}}function longitude(et){return abs$1(et[0])<=pi$1?et[0]:sign(et[0])*((abs$1(et[0])+pi$1)%tau$1-pi$1)}function polygonContains(et,tt){var nt=longitude(tt),rt=tt[1],ot=sin$1(rt),st=[sin$1(nt),-cos$1(nt),0],ut=0,ct=0,ft=new Adder;ot===1?rt=halfPi$1+epsilon$4:ot===-1&&(rt=-halfPi$1-epsilon$4);for(var pt=0,ht=et.length;pt<ht;++pt)if(!!(yt=(mt=et[pt]).length))for(var mt,yt,vt=mt[yt-1],Tt=longitude(vt),Et=vt[1]/2+quarterPi,xt=sin$1(Et),At=cos$1(Et),Ct=0;Ct<yt;++Ct,Tt=Ot,xt=It,At=kt,vt=$t){var $t=mt[Ct],Ot=longitude($t),Rt=$t[1]/2+quarterPi,It=sin$1(Rt),kt=cos$1(Rt),Mt=Ot-Tt,Ft=Mt>=0?1:-1,zt=Ft*Mt,Vt=zt>pi$1,Zt=xt*It;if(ft.add(atan2(Zt*Ft*sin$1(zt),At*kt+Zt*cos$1(zt))),ut+=Vt?Mt+Ft*tau$1:Mt,Vt^Tt>=nt^Ot>=nt){var Ut=cartesianCross(cartesian(vt),cartesian($t));cartesianNormalizeInPlace(Ut);var Xt=cartesianCross(st,Ut);cartesianNormalizeInPlace(Xt);var Jt=(Vt^Mt>=0?-1:1)*asin$1(Xt[2]);(rt>Jt||rt===Jt&&(Ut[0]||Ut[1]))&&(ct+=Vt^Mt>=0?1:-1)}}return(ut<-epsilon$4||ut<epsilon$4&&ft<-epsilon2)^ct&1}function clip$1(et,tt,nt,rt){return function(ot){var st=tt(ot),ut=clipBuffer(),ct=tt(ut),ft=!1,pt,ht,mt,yt={point:vt,lineStart:Et,lineEnd:xt,polygonStart:function(){yt.point=At,yt.lineStart=Ct,yt.lineEnd=$t,ht=[],pt=[]},polygonEnd:function(){yt.point=vt,yt.lineStart=Et,yt.lineEnd=xt,ht=merge$3(ht);var Ot=polygonContains(pt,rt);ht.length?(ft||(ot.polygonStart(),ft=!0),clipRejoin(ht,compareIntersection,Ot,nt,ot)):Ot&&(ft||(ot.polygonStart(),ft=!0),ot.lineStart(),nt(null,null,1,ot),ot.lineEnd()),ft&&(ot.polygonEnd(),ft=!1),ht=pt=null},sphere:function(){ot.polygonStart(),ot.lineStart(),nt(null,null,1,ot),ot.lineEnd(),ot.polygonEnd()}};function vt(Ot,Rt){et(Ot,Rt)&&ot.point(Ot,Rt)}function Tt(Ot,Rt){st.point(Ot,Rt)}function Et(){yt.point=Tt,st.lineStart()}function xt(){yt.point=vt,st.lineEnd()}function At(Ot,Rt){mt.push([Ot,Rt]),ct.point(Ot,Rt)}function Ct(){ct.lineStart(),mt=[]}function $t(){At(mt[0][0],mt[0][1]),ct.lineEnd();var Ot=ct.clean(),Rt=ut.result(),It,kt=Rt.length,Mt,Ft,zt;if(mt.pop(),pt.push(mt),mt=null,!!kt){if(Ot&1){if(Ft=Rt[0],(Mt=Ft.length-1)>0){for(ft||(ot.polygonStart(),ft=!0),ot.lineStart(),It=0;It<Mt;++It)ot.point((zt=Ft[It])[0],zt[1]);ot.lineEnd()}return}kt>1&&Ot&2&&Rt.push(Rt.pop().concat(Rt.shift())),ht.push(Rt.filter(validSegment))}}return yt}}function validSegment(et){return et.length>1}function compareIntersection(et,tt){return((et=et.x)[0]<0?et[1]-halfPi$1-epsilon$4:halfPi$1-et[1])-((tt=tt.x)[0]<0?tt[1]-halfPi$1-epsilon$4:halfPi$1-tt[1])}const clipAntimeridian=clip$1(function(){return!0},clipAntimeridianLine,clipAntimeridianInterpolate,[-pi$1,-halfPi$1]);function clipAntimeridianLine(et){var tt=NaN,nt=NaN,rt=NaN,ot;return{lineStart:function(){et.lineStart(),ot=1},point:function(st,ut){var ct=st>0?pi$1:-pi$1,ft=abs$1(st-tt);abs$1(ft-pi$1)<epsilon$4?(et.point(tt,nt=(nt+ut)/2>0?halfPi$1:-halfPi$1),et.point(rt,nt),et.lineEnd(),et.lineStart(),et.point(ct,nt),et.point(st,nt),ot=0):rt!==ct&&ft>=pi$1&&(abs$1(tt-rt)<epsilon$4&&(tt-=rt*epsilon$4),abs$1(st-ct)<epsilon$4&&(st-=ct*epsilon$4),nt=clipAntimeridianIntersect(tt,nt,st,ut),et.point(rt,nt),et.lineEnd(),et.lineStart(),et.point(ct,nt),ot=0),et.point(tt=st,nt=ut),rt=ct},lineEnd:function(){et.lineEnd(),tt=nt=NaN},clean:function(){return 2-ot}}}function clipAntimeridianIntersect(et,tt,nt,rt){var ot,st,ut=sin$1(et-nt);return abs$1(ut)>epsilon$4?atan((sin$1(tt)*(st=cos$1(rt))*sin$1(nt)-sin$1(rt)*(ot=cos$1(tt))*sin$1(et))/(ot*st*ut)):(tt+rt)/2}function clipAntimeridianInterpolate(et,tt,nt,rt){var ot;if(et==null)ot=nt*halfPi$1,rt.point(-pi$1,ot),rt.point(0,ot),rt.point(pi$1,ot),rt.point(pi$1,0),rt.point(pi$1,-ot),rt.point(0,-ot),rt.point(-pi$1,-ot),rt.point(-pi$1,0),rt.point(-pi$1,ot);else if(abs$1(et[0]-tt[0])>epsilon$4){var st=et[0]<tt[0]?pi$1:-pi$1;ot=nt*st/2,rt.point(-st,ot),rt.point(0,ot),rt.point(st,ot)}else rt.point(tt[0],tt[1])}function clipCircle(et){var tt=cos$1(et),nt=6*radians,rt=tt>0,ot=abs$1(tt)>epsilon$4;function st(ht,mt,yt,vt){circleStream(vt,et,nt,yt,ht,mt)}function ut(ht,mt){return cos$1(ht)*cos$1(mt)>tt}function ct(ht){var mt,yt,vt,Tt,Et;return{lineStart:function(){Tt=vt=!1,Et=1},point:function(xt,At){var Ct=[xt,At],$t,Ot=ut(xt,At),Rt=rt?Ot?0:pt(xt,At):Ot?pt(xt+(xt<0?pi$1:-pi$1),At):0;if(!mt&&(Tt=vt=Ot)&&ht.lineStart(),Ot!==vt&&($t=ft(mt,Ct),(!$t||pointEqual(mt,$t)||pointEqual(Ct,$t))&&(Ct[2]=1)),Ot!==vt)Et=0,Ot?(ht.lineStart(),$t=ft(Ct,mt),ht.point($t[0],$t[1])):($t=ft(mt,Ct),ht.point($t[0],$t[1],2),ht.lineEnd()),mt=$t;else if(ot&&mt&&rt^Ot){var It;!(Rt&yt)&&(It=ft(Ct,mt,!0))&&(Et=0,rt?(ht.lineStart(),ht.point(It[0][0],It[0][1]),ht.point(It[1][0],It[1][1]),ht.lineEnd()):(ht.point(It[1][0],It[1][1]),ht.lineEnd(),ht.lineStart(),ht.point(It[0][0],It[0][1],3)))}Ot&&(!mt||!pointEqual(mt,Ct))&&ht.point(Ct[0],Ct[1]),mt=Ct,vt=Ot,yt=Rt},lineEnd:function(){vt&&ht.lineEnd(),mt=null},clean:function(){return Et|(Tt&&vt)<<1}}}function ft(ht,mt,yt){var vt=cartesian(ht),Tt=cartesian(mt),Et=[1,0,0],xt=cartesianCross(vt,Tt),At=cartesianDot(xt,xt),Ct=xt[0],$t=At-Ct*Ct;if(!$t)return!yt&&ht;var Ot=tt*At/$t,Rt=-tt*Ct/$t,It=cartesianCross(Et,xt),kt=cartesianScale(Et,Ot),Mt=cartesianScale(xt,Rt);cartesianAddInPlace(kt,Mt);var Ft=It,zt=cartesianDot(kt,Ft),Vt=cartesianDot(Ft,Ft),Zt=zt*zt-Vt*(cartesianDot(kt,kt)-1);if(!(Zt<0)){var Ut=sqrt$1(Zt),Xt=cartesianScale(Ft,(-zt-Ut)/Vt);if(cartesianAddInPlace(Xt,kt),Xt=spherical(Xt),!yt)return Xt;var Jt=ht[0],gn=mt[0],An=ht[1],sn=mt[1],Sn;gn<Jt&&(Sn=Jt,Jt=gn,gn=Sn);var In=gn-Jt,_n=abs$1(In-pi$1)<epsilon$4,En=_n||In<epsilon$4;if(!_n&&sn<An&&(Sn=An,An=sn,sn=Sn),En?_n?An+sn>0^Xt[1]<(abs$1(Xt[0]-Jt)<epsilon$4?An:sn):An<=Xt[1]&&Xt[1]<=sn:In>pi$1^(Jt<=Xt[0]&&Xt[0]<=gn)){var Ln=cartesianScale(Ft,(-zt+Ut)/Vt);return cartesianAddInPlace(Ln,kt),[Xt,spherical(Ln)]}}}function pt(ht,mt){var yt=rt?et:pi$1-et,vt=0;return ht<-yt?vt|=1:ht>yt&&(vt|=2),mt<-yt?vt|=4:mt>yt&&(vt|=8),vt}return clip$1(ut,ct,st,rt?[0,-et]:[-pi$1,et-pi$1])}function clipLine(et,tt,nt,rt,ot,st){var ut=et[0],ct=et[1],ft=tt[0],pt=tt[1],ht=0,mt=1,yt=ft-ut,vt=pt-ct,Tt;if(Tt=nt-ut,!(!yt&&Tt>0)){if(Tt/=yt,yt<0){if(Tt<ht)return;Tt<mt&&(mt=Tt)}else if(yt>0){if(Tt>mt)return;Tt>ht&&(ht=Tt)}if(Tt=ot-ut,!(!yt&&Tt<0)){if(Tt/=yt,yt<0){if(Tt>mt)return;Tt>ht&&(ht=Tt)}else if(yt>0){if(Tt<ht)return;Tt<mt&&(mt=Tt)}if(Tt=rt-ct,!(!vt&&Tt>0)){if(Tt/=vt,vt<0){if(Tt<ht)return;Tt<mt&&(mt=Tt)}else if(vt>0){if(Tt>mt)return;Tt>ht&&(ht=Tt)}if(Tt=st-ct,!(!vt&&Tt<0)){if(Tt/=vt,vt<0){if(Tt>mt)return;Tt>ht&&(ht=Tt)}else if(vt>0){if(Tt<ht)return;Tt<mt&&(mt=Tt)}return ht>0&&(et[0]=ut+ht*yt,et[1]=ct+ht*vt),mt<1&&(tt[0]=ut+mt*yt,tt[1]=ct+mt*vt),!0}}}}}var clipMax=1e9,clipMin=-clipMax;function clipRectangle(et,tt,nt,rt){function ot(pt,ht){return et<=pt&&pt<=nt&&tt<=ht&&ht<=rt}function st(pt,ht,mt,yt){var vt=0,Tt=0;if(pt==null||(vt=ut(pt,mt))!==(Tt=ut(ht,mt))||ft(pt,ht)<0^mt>0)do yt.point(vt===0||vt===3?et:nt,vt>1?rt:tt);while((vt=(vt+mt+4)%4)!==Tt);else yt.point(ht[0],ht[1])}function ut(pt,ht){return abs$1(pt[0]-et)<epsilon$4?ht>0?0:3:abs$1(pt[0]-nt)<epsilon$4?ht>0?2:1:abs$1(pt[1]-tt)<epsilon$4?ht>0?1:0:ht>0?3:2}function ct(pt,ht){return ft(pt.x,ht.x)}function ft(pt,ht){var mt=ut(pt,1),yt=ut(ht,1);return mt!==yt?mt-yt:mt===0?ht[1]-pt[1]:mt===1?pt[0]-ht[0]:mt===2?pt[1]-ht[1]:ht[0]-pt[0]}return function(pt){var ht=pt,mt=clipBuffer(),yt,vt,Tt,Et,xt,At,Ct,$t,Ot,Rt,It,kt={point:Mt,lineStart:Zt,lineEnd:Ut,polygonStart:zt,polygonEnd:Vt};function Mt(Jt,gn){ot(Jt,gn)&&ht.point(Jt,gn)}function Ft(){for(var Jt=0,gn=0,An=vt.length;gn<An;++gn)for(var sn=vt[gn],Sn=1,In=sn.length,_n=sn[0],En,Ln,wn=_n[0],Dn=_n[1];Sn<In;++Sn)En=wn,Ln=Dn,_n=sn[Sn],wn=_n[0],Dn=_n[1],Ln<=rt?Dn>rt&&(wn-En)*(rt-Ln)>(Dn-Ln)*(et-En)&&++Jt:Dn<=rt&&(wn-En)*(rt-Ln)<(Dn-Ln)*(et-En)&&--Jt;return Jt}function zt(){ht=mt,yt=[],vt=[],It=!0}function Vt(){var Jt=Ft(),gn=It&&Jt,An=(yt=merge$3(yt)).length;(gn||An)&&(pt.polygonStart(),gn&&(pt.lineStart(),st(null,null,1,pt),pt.lineEnd()),An&&clipRejoin(yt,ct,Jt,st,pt),pt.polygonEnd()),ht=pt,yt=vt=Tt=null}function Zt(){kt.point=Xt,vt&&vt.push(Tt=[]),Rt=!0,Ot=!1,Ct=$t=NaN}function Ut(){yt&&(Xt(Et,xt),At&&Ot&&mt.rejoin(),yt.push(mt.result())),kt.point=Mt,Ot&&ht.lineEnd()}function Xt(Jt,gn){var An=ot(Jt,gn);if(vt&&Tt.push([Jt,gn]),Rt)Et=Jt,xt=gn,At=An,Rt=!1,An&&(ht.lineStart(),ht.point(Jt,gn));else if(An&&Ot)ht.point(Jt,gn);else{var sn=[Ct=Math.max(clipMin,Math.min(clipMax,Ct)),$t=Math.max(clipMin,Math.min(clipMax,$t))],Sn=[Jt=Math.max(clipMin,Math.min(clipMax,Jt)),gn=Math.max(clipMin,Math.min(clipMax,gn))];clipLine(sn,Sn,et,tt,nt,rt)?(Ot||(ht.lineStart(),ht.point(sn[0],sn[1])),ht.point(Sn[0],Sn[1]),An||ht.lineEnd(),It=!1):An&&(ht.lineStart(),ht.point(Jt,gn),It=!1)}Ct=Jt,$t=gn,Ot=An}return kt}}function graticuleX(et,tt,nt){var rt=range$4(et,tt-epsilon$4,nt).concat(tt);return function(ot){return rt.map(function(st){return[ot,st]})}}function graticuleY(et,tt,nt){var rt=range$4(et,tt-epsilon$4,nt).concat(tt);return function(ot){return rt.map(function(st){return[st,ot]})}}function graticule(){var et,tt,nt,rt,ot,st,ut,ct,ft=10,pt=ft,ht=90,mt=360,yt,vt,Tt,Et,xt=2.5;function At(){return{type:"MultiLineString",coordinates:Ct()}}function Ct(){return range$4(ceil(rt/ht)*ht,nt,ht).map(Tt).concat(range$4(ceil(ct/mt)*mt,ut,mt).map(Et)).concat(range$4(ceil(tt/ft)*ft,et,ft).filter(function($t){return abs$1($t%ht)>epsilon$4}).map(yt)).concat(range$4(ceil(st/pt)*pt,ot,pt).filter(function($t){return abs$1($t%mt)>epsilon$4}).map(vt))}return At.lines=function(){return Ct().map(function($t){return{type:"LineString",coordinates:$t}})},At.outline=function(){return{type:"Polygon",coordinates:[Tt(rt).concat(Et(ut).slice(1),Tt(nt).reverse().slice(1),Et(ct).reverse().slice(1))]}},At.extent=function($t){return arguments.length?At.extentMajor($t).extentMinor($t):At.extentMinor()},At.extentMajor=function($t){return arguments.length?(rt=+$t[0][0],nt=+$t[1][0],ct=+$t[0][1],ut=+$t[1][1],rt>nt&&($t=rt,rt=nt,nt=$t),ct>ut&&($t=ct,ct=ut,ut=$t),At.precision(xt)):[[rt,ct],[nt,ut]]},At.extentMinor=function($t){return arguments.length?(tt=+$t[0][0],et=+$t[1][0],st=+$t[0][1],ot=+$t[1][1],tt>et&&($t=tt,tt=et,et=$t),st>ot&&($t=st,st=ot,ot=$t),At.precision(xt)):[[tt,st],[et,ot]]},At.step=function($t){return arguments.length?At.stepMajor($t).stepMinor($t):At.stepMinor()},At.stepMajor=function($t){return arguments.length?(ht=+$t[0],mt=+$t[1],At):[ht,mt]},At.stepMinor=function($t){return arguments.length?(ft=+$t[0],pt=+$t[1],At):[ft,pt]},At.precision=function($t){return arguments.length?(xt=+$t,yt=graticuleX(st,ot,90),vt=graticuleY(tt,et,xt),Tt=graticuleX(ct,ut,90),Et=graticuleY(rt,nt,xt),At):xt},At.extentMajor([[-180,-90+epsilon$4],[180,90-epsilon$4]]).extentMinor([[-180,-80-epsilon$4],[180,80+epsilon$4]])}const identity=et=>et;var areaSum=new Adder,areaRingSum=new Adder,x00$2,y00$2,x0$3,y0$3,areaStream={point:noop$a,lineStart:noop$a,lineEnd:noop$a,polygonStart:function(){areaStream.lineStart=areaRingStart,areaStream.lineEnd=areaRingEnd},polygonEnd:function(){areaStream.lineStart=areaStream.lineEnd=areaStream.point=noop$a,areaSum.add(abs$1(areaRingSum)),areaRingSum=new Adder},result:function(){var et=areaSum/2;return areaSum=new Adder,et}};function areaRingStart(){areaStream.point=areaPointFirst}function areaPointFirst(et,tt){areaStream.point=areaPoint,x00$2=x0$3=et,y00$2=y0$3=tt}function areaPoint(et,tt){areaRingSum.add(y0$3*et-x0$3*tt),x0$3=et,y0$3=tt}function areaRingEnd(){areaPoint(x00$2,y00$2)}const pathArea=areaStream;var x0$2=1/0,y0$2=x0$2,x1=-x0$2,y1=x1,boundsStream={point:boundsPoint,lineStart:noop$a,lineEnd:noop$a,polygonStart:noop$a,polygonEnd:noop$a,result:function(){var et=[[x0$2,y0$2],[x1,y1]];return x1=y1=-(y0$2=x0$2=1/0),et}};function boundsPoint(et,tt){et<x0$2&&(x0$2=et),et>x1&&(x1=et),tt<y0$2&&(y0$2=tt),tt>y1&&(y1=tt)}const boundsStream$1=boundsStream;var X0=0,Y0=0,Z0=0,X1=0,Y1=0,Z1=0,X2$1=0,Y2$1=0,Z2=0,x00$1,y00$1,x0$1,y0$1,centroidStream={point:centroidPoint,lineStart:centroidLineStart,lineEnd:centroidLineEnd,polygonStart:function(){centroidStream.lineStart=centroidRingStart,centroidStream.lineEnd=centroidRingEnd},polygonEnd:function(){centroidStream.point=centroidPoint,centroidStream.lineStart=centroidLineStart,centroidStream.lineEnd=centroidLineEnd},result:function(){var et=Z2?[X2$1/Z2,Y2$1/Z2]:Z1?[X1/Z1,Y1/Z1]:Z0?[X0/Z0,Y0/Z0]:[NaN,NaN];return X0=Y0=Z0=X1=Y1=Z1=X2$1=Y2$1=Z2=0,et}};function centroidPoint(et,tt){X0+=et,Y0+=tt,++Z0}function centroidLineStart(){centroidStream.point=centroidPointFirstLine}function centroidPointFirstLine(et,tt){centroidStream.point=centroidPointLine,centroidPoint(x0$1=et,y0$1=tt)}function centroidPointLine(et,tt){var nt=et-x0$1,rt=tt-y0$1,ot=sqrt$1(nt*nt+rt*rt);X1+=ot*(x0$1+et)/2,Y1+=ot*(y0$1+tt)/2,Z1+=ot,centroidPoint(x0$1=et,y0$1=tt)}function centroidLineEnd(){centroidStream.point=centroidPoint}function centroidRingStart(){centroidStream.point=centroidPointFirstRing}function centroidRingEnd(){centroidPointRing(x00$1,y00$1)}function centroidPointFirstRing(et,tt){centroidStream.point=centroidPointRing,centroidPoint(x00$1=x0$1=et,y00$1=y0$1=tt)}function centroidPointRing(et,tt){var nt=et-x0$1,rt=tt-y0$1,ot=sqrt$1(nt*nt+rt*rt);X1+=ot*(x0$1+et)/2,Y1+=ot*(y0$1+tt)/2,Z1+=ot,ot=y0$1*et-x0$1*tt,X2$1+=ot*(x0$1+et),Y2$1+=ot*(y0$1+tt),Z2+=ot*3,centroidPoint(x0$1=et,y0$1=tt)}const pathCentroid=centroidStream;function PathContext(et){this._context=et}PathContext.prototype={_radius:4.5,pointRadius:function(et){return this._radius=et,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(et,tt){switch(this._point){case 0:{this._context.moveTo(et,tt),this._point=1;break}case 1:{this._context.lineTo(et,tt);break}default:{this._context.moveTo(et+this._radius,tt),this._context.arc(et,tt,this._radius,0,tau$1);break}}},result:noop$a};var lengthSum=new Adder,lengthRing,x00,y00,x0,y0,lengthStream={point:noop$a,lineStart:function(){lengthStream.point=lengthPointFirst},lineEnd:function(){lengthRing&&lengthPoint(x00,y00),lengthStream.point=noop$a},polygonStart:function(){lengthRing=!0},polygonEnd:function(){lengthRing=null},result:function(){var et=+lengthSum;return lengthSum=new Adder,et}};function lengthPointFirst(et,tt){lengthStream.point=lengthPoint,x00=x0=et,y00=y0=tt}function lengthPoint(et,tt){x0-=et,y0-=tt,lengthSum.add(sqrt$1(x0*x0+y0*y0)),x0=et,y0=tt}const pathMeasure=lengthStream;let cacheDigits,cacheAppend,cacheRadius,cacheCircle;class PathString{constructor(tt){this._append=tt==null?append:appendRound(tt),this._radius=4.5,this._=""}pointRadius(tt){return this._radius=+tt,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(tt,nt){switch(this._point){case 0:{this._append`M${tt},${nt}`,this._point=1;break}case 1:{this._append`L${tt},${nt}`;break}default:{if(this._append`M${tt},${nt}`,this._radius!==cacheRadius||this._append!==cacheAppend){const rt=this._radius,ot=this._;this._="",this._append`m0,${rt}a${rt},${rt} 0 1,1 0,${-2*rt}a${rt},${rt} 0 1,1 0,${2*rt}z`,cacheRadius=rt,cacheAppend=this._append,cacheCircle=this._,this._=ot}this._+=cacheCircle;break}}}result(){const tt=this._;return this._="",tt.length?tt:null}}function append(et){let tt=1;this._+=et[0];for(const nt=et.length;tt<nt;++tt)this._+=arguments[tt]+et[tt]}function appendRound(et){const tt=Math.floor(et);if(!(tt>=0))throw new RangeError(`invalid digits: ${et}`);if(tt>15)return append;if(tt!==cacheDigits){const nt=10**tt;cacheDigits=tt,cacheAppend=function(ot){let st=1;this._+=ot[0];for(const ut=ot.length;st<ut;++st)this._+=Math.round(arguments[st]*nt)/nt+ot[st]}}return cacheAppend}function geoPath(et,tt){let nt=3,rt=4.5,ot,st;function ut(ct){return ct&&(typeof rt=="function"&&st.pointRadius(+rt.apply(this,arguments)),geoStream(ct,ot(st))),st.result()}return ut.area=function(ct){return geoStream(ct,ot(pathArea)),pathArea.result()},ut.measure=function(ct){return geoStream(ct,ot(pathMeasure)),pathMeasure.result()},ut.bounds=function(ct){return geoStream(ct,ot(boundsStream$1)),boundsStream$1.result()},ut.centroid=function(ct){return geoStream(ct,ot(pathCentroid)),pathCentroid.result()},ut.projection=function(ct){return arguments.length?(ot=ct==null?(et=null,identity):(et=ct).stream,ut):et},ut.context=function(ct){return arguments.length?(st=ct==null?(tt=null,new PathString(nt)):new PathContext(tt=ct),typeof rt!="function"&&st.pointRadius(rt),ut):tt},ut.pointRadius=function(ct){return arguments.length?(rt=typeof ct=="function"?ct:(st.pointRadius(+ct),+ct),ut):rt},ut.digits=function(ct){if(!arguments.length)return nt;if(ct==null)nt=null;else{const ft=Math.floor(ct);if(!(ft>=0))throw new RangeError(`invalid digits: ${ct}`);nt=ft}return tt===null&&(st=new PathString(nt)),ut},ut.projection(et).digits(nt).context(tt)}function transformer(et){return function(tt){var nt=new TransformStream;for(var rt in et)nt[rt]=et[rt];return nt.stream=tt,nt}}function TransformStream(){}TransformStream.prototype={constructor:TransformStream,point:function(et,tt){this.stream.point(et,tt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function fit$1(et,tt,nt){var rt=et.clipExtent&&et.clipExtent();return et.scale(150).translate([0,0]),rt!=null&&et.clipExtent(null),geoStream(nt,et.stream(boundsStream$1)),tt(boundsStream$1.result()),rt!=null&&et.clipExtent(rt),et}function fitExtent(et,tt,nt){return fit$1(et,function(rt){var ot=tt[1][0]-tt[0][0],st=tt[1][1]-tt[0][1],ut=Math.min(ot/(rt[1][0]-rt[0][0]),st/(rt[1][1]-rt[0][1])),ct=+tt[0][0]+(ot-ut*(rt[1][0]+rt[0][0]))/2,ft=+tt[0][1]+(st-ut*(rt[1][1]+rt[0][1]))/2;et.scale(150*ut).translate([ct,ft])},nt)}function fitSize(et,tt,nt){return fitExtent(et,[[0,0],tt],nt)}function fitWidth(et,tt,nt){return fit$1(et,function(rt){var ot=+tt,st=ot/(rt[1][0]-rt[0][0]),ut=(ot-st*(rt[1][0]+rt[0][0]))/2,ct=-st*rt[0][1];et.scale(150*st).translate([ut,ct])},nt)}function fitHeight(et,tt,nt){return fit$1(et,function(rt){var ot=+tt,st=ot/(rt[1][1]-rt[0][1]),ut=-st*rt[0][0],ct=(ot-st*(rt[1][1]+rt[0][1]))/2;et.scale(150*st).translate([ut,ct])},nt)}var maxDepth=16,cosMinDistance=cos$1(30*radians);function resample(et,tt){return+tt?resample$1(et,tt):resampleNone(et)}function resampleNone(et){return transformer({point:function(tt,nt){tt=et(tt,nt),this.stream.point(tt[0],tt[1])}})}function resample$1(et,tt){function nt(rt,ot,st,ut,ct,ft,pt,ht,mt,yt,vt,Tt,Et,xt){var At=pt-rt,Ct=ht-ot,$t=At*At+Ct*Ct;if($t>4*tt&&Et--){var Ot=ut+yt,Rt=ct+vt,It=ft+Tt,kt=sqrt$1(Ot*Ot+Rt*Rt+It*It),Mt=asin$1(It/=kt),Ft=abs$1(abs$1(It)-1)<epsilon$4||abs$1(st-mt)<epsilon$4?(st+mt)/2:atan2(Rt,Ot),zt=et(Ft,Mt),Vt=zt[0],Zt=zt[1],Ut=Vt-rt,Xt=Zt-ot,Jt=Ct*Ut-At*Xt;(Jt*Jt/$t>tt||abs$1((At*Ut+Ct*Xt)/$t-.5)>.3||ut*yt+ct*vt+ft*Tt<cosMinDistance)&&(nt(rt,ot,st,ut,ct,ft,Vt,Zt,Ft,Ot/=kt,Rt/=kt,It,Et,xt),xt.point(Vt,Zt),nt(Vt,Zt,Ft,Ot,Rt,It,pt,ht,mt,yt,vt,Tt,Et,xt))}}return function(rt){var ot,st,ut,ct,ft,pt,ht,mt,yt,vt,Tt,Et,xt={point:At,lineStart:Ct,lineEnd:Ot,polygonStart:function(){rt.polygonStart(),xt.lineStart=Rt},polygonEnd:function(){rt.polygonEnd(),xt.lineStart=Ct}};function At(Mt,Ft){Mt=et(Mt,Ft),rt.point(Mt[0],Mt[1])}function Ct(){mt=NaN,xt.point=$t,rt.lineStart()}function $t(Mt,Ft){var zt=cartesian([Mt,Ft]),Vt=et(Mt,Ft);nt(mt,yt,ht,vt,Tt,Et,mt=Vt[0],yt=Vt[1],ht=Mt,vt=zt[0],Tt=zt[1],Et=zt[2],maxDepth,rt),rt.point(mt,yt)}function Ot(){xt.point=At,rt.lineEnd()}function Rt(){Ct(),xt.point=It,xt.lineEnd=kt}function It(Mt,Ft){$t(ot=Mt,Ft),st=mt,ut=yt,ct=vt,ft=Tt,pt=Et,xt.point=$t}function kt(){nt(mt,yt,ht,vt,Tt,Et,st,ut,ot,ct,ft,pt,maxDepth,rt),xt.lineEnd=Ot,Ot()}return xt}}var transformRadians=transformer({point:function(et,tt){this.stream.point(et*radians,tt*radians)}});function transformRotate(et){return transformer({point:function(tt,nt){var rt=et(tt,nt);return this.stream.point(rt[0],rt[1])}})}function scaleTranslate(et,tt,nt,rt,ot){function st(ut,ct){return ut*=rt,ct*=ot,[tt+et*ut,nt-et*ct]}return st.invert=function(ut,ct){return[(ut-tt)/et*rt,(nt-ct)/et*ot]},st}function scaleTranslateRotate(et,tt,nt,rt,ot,st){if(!st)return scaleTranslate(et,tt,nt,rt,ot);var ut=cos$1(st),ct=sin$1(st),ft=ut*et,pt=ct*et,ht=ut/et,mt=ct/et,yt=(ct*nt-ut*tt)/et,vt=(ct*tt+ut*nt)/et;function Tt(Et,xt){return Et*=rt,xt*=ot,[ft*Et-pt*xt+tt,nt-pt*Et-ft*xt]}return Tt.invert=function(Et,xt){return[rt*(ht*Et-mt*xt+yt),ot*(vt-mt*Et-ht*xt)]},Tt}function projection$1(et){return projectionMutator(function(){return et})()}function projectionMutator(et){var tt,nt=150,rt=480,ot=250,st=0,ut=0,ct=0,ft=0,pt=0,ht,mt=0,yt=1,vt=1,Tt=null,Et=clipAntimeridian,xt=null,At,Ct,$t,Ot=identity,Rt=.5,It,kt,Mt,Ft,zt;function Vt(Jt){return Mt(Jt[0]*radians,Jt[1]*radians)}function Zt(Jt){return Jt=Mt.invert(Jt[0],Jt[1]),Jt&&[Jt[0]*degrees,Jt[1]*degrees]}Vt.stream=function(Jt){return Ft&&zt===Jt?Ft:Ft=transformRadians(transformRotate(ht)(Et(It(Ot(zt=Jt)))))},Vt.preclip=function(Jt){return arguments.length?(Et=Jt,Tt=void 0,Xt()):Et},Vt.postclip=function(Jt){return arguments.length?(Ot=Jt,xt=At=Ct=$t=null,Xt()):Ot},Vt.clipAngle=function(Jt){return arguments.length?(Et=+Jt?clipCircle(Tt=Jt*radians):(Tt=null,clipAntimeridian),Xt()):Tt*degrees},Vt.clipExtent=function(Jt){return arguments.length?(Ot=Jt==null?(xt=At=Ct=$t=null,identity):clipRectangle(xt=+Jt[0][0],At=+Jt[0][1],Ct=+Jt[1][0],$t=+Jt[1][1]),Xt()):xt==null?null:[[xt,At],[Ct,$t]]},Vt.scale=function(Jt){return arguments.length?(nt=+Jt,Ut()):nt},Vt.translate=function(Jt){return arguments.length?(rt=+Jt[0],ot=+Jt[1],Ut()):[rt,ot]},Vt.center=function(Jt){return arguments.length?(st=Jt[0]%360*radians,ut=Jt[1]%360*radians,Ut()):[st*degrees,ut*degrees]},Vt.rotate=function(Jt){return arguments.length?(ct=Jt[0]%360*radians,ft=Jt[1]%360*radians,pt=Jt.length>2?Jt[2]%360*radians:0,Ut()):[ct*degrees,ft*degrees,pt*degrees]},Vt.angle=function(Jt){return arguments.length?(mt=Jt%360*radians,Ut()):mt*degrees},Vt.reflectX=function(Jt){return arguments.length?(yt=Jt?-1:1,Ut()):yt<0},Vt.reflectY=function(Jt){return arguments.length?(vt=Jt?-1:1,Ut()):vt<0},Vt.precision=function(Jt){return arguments.length?(It=resample(kt,Rt=Jt*Jt),Xt()):sqrt$1(Rt)},Vt.fitExtent=function(Jt,gn){return fitExtent(Vt,Jt,gn)},Vt.fitSize=function(Jt,gn){return fitSize(Vt,Jt,gn)},Vt.fitWidth=function(Jt,gn){return fitWidth(Vt,Jt,gn)},Vt.fitHeight=function(Jt,gn){return fitHeight(Vt,Jt,gn)};function Ut(){var Jt=scaleTranslateRotate(nt,0,0,yt,vt,mt).apply(null,tt(st,ut)),gn=scaleTranslateRotate(nt,rt-Jt[0],ot-Jt[1],yt,vt,mt);return ht=rotateRadians(ct,ft,pt),kt=compose$1(tt,gn),Mt=compose$1(ht,kt),It=resample(kt,Rt),Xt()}function Xt(){return Ft=zt=null,Vt}return function(){return tt=et.apply(this,arguments),Vt.invert=tt.invert&&Zt,Ut()}}function conicProjection(et){var tt=0,nt=pi$1/3,rt=projectionMutator(et),ot=rt(tt,nt);return ot.parallels=function(st){return arguments.length?rt(tt=st[0]*radians,nt=st[1]*radians):[tt*degrees,nt*degrees]},ot}function cylindricalEqualAreaRaw(et){var tt=cos$1(et);function nt(rt,ot){return[rt*tt,sin$1(ot)/tt]}return nt.invert=function(rt,ot){return[rt/tt,asin$1(ot*tt)]},nt}function conicEqualAreaRaw(et,tt){var nt=sin$1(et),rt=(nt+sin$1(tt))/2;if(abs$1(rt)<epsilon$4)return cylindricalEqualAreaRaw(et);var ot=1+nt*(2*rt-nt),st=sqrt$1(ot)/rt;function ut(ct,ft){var pt=sqrt$1(ot-2*rt*sin$1(ft))/rt;return[pt*sin$1(ct*=rt),st-pt*cos$1(ct)]}return ut.invert=function(ct,ft){var pt=st-ft,ht=atan2(ct,abs$1(pt))*sign(pt);return pt*rt<0&&(ht-=pi$1*sign(ct)*sign(pt)),[ht/rt,asin$1((ot-(ct*ct+pt*pt)*rt*rt)/(2*rt))]},ut}function geoConicEqualArea(){return conicProjection(conicEqualAreaRaw).scale(155.424).center([0,33.6442])}function geoAlbers(){return geoConicEqualArea().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function multiplex(et){var tt=et.length;return{point:function(nt,rt){for(var ot=-1;++ot<tt;)et[ot].point(nt,rt)},sphere:function(){for(var nt=-1;++nt<tt;)et[nt].sphere()},lineStart:function(){for(var nt=-1;++nt<tt;)et[nt].lineStart()},lineEnd:function(){for(var nt=-1;++nt<tt;)et[nt].lineEnd()},polygonStart:function(){for(var nt=-1;++nt<tt;)et[nt].polygonStart()},polygonEnd:function(){for(var nt=-1;++nt<tt;)et[nt].polygonEnd()}}}function geoAlbersUsa(){var et,tt,nt=geoAlbers(),rt,ot=geoConicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),st,ut=geoConicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),ct,ft,pt={point:function(yt,vt){ft=[yt,vt]}};function ht(yt){var vt=yt[0],Tt=yt[1];return ft=null,rt.point(vt,Tt),ft||(st.point(vt,Tt),ft)||(ct.point(vt,Tt),ft)}ht.invert=function(yt){var vt=nt.scale(),Tt=nt.translate(),Et=(yt[0]-Tt[0])/vt,xt=(yt[1]-Tt[1])/vt;return(xt>=.12&&xt<.234&&Et>=-.425&&Et<-.214?ot:xt>=.166&&xt<.234&&Et>=-.214&&Et<-.115?ut:nt).invert(yt)},ht.stream=function(yt){return et&&tt===yt?et:et=multiplex([nt.stream(tt=yt),ot.stream(yt),ut.stream(yt)])},ht.precision=function(yt){return arguments.length?(nt.precision(yt),ot.precision(yt),ut.precision(yt),mt()):nt.precision()},ht.scale=function(yt){return arguments.length?(nt.scale(yt),ot.scale(yt*.35),ut.scale(yt),ht.translate(nt.translate())):nt.scale()},ht.translate=function(yt){if(!arguments.length)return nt.translate();var vt=nt.scale(),Tt=+yt[0],Et=+yt[1];return rt=nt.translate(yt).clipExtent([[Tt-.455*vt,Et-.238*vt],[Tt+.455*vt,Et+.238*vt]]).stream(pt),st=ot.translate([Tt-.307*vt,Et+.201*vt]).clipExtent([[Tt-.425*vt+epsilon$4,Et+.12*vt+epsilon$4],[Tt-.214*vt-epsilon$4,Et+.234*vt-epsilon$4]]).stream(pt),ct=ut.translate([Tt-.205*vt,Et+.212*vt]).clipExtent([[Tt-.214*vt+epsilon$4,Et+.166*vt+epsilon$4],[Tt-.115*vt-epsilon$4,Et+.234*vt-epsilon$4]]).stream(pt),mt()},ht.fitExtent=function(yt,vt){return fitExtent(ht,yt,vt)},ht.fitSize=function(yt,vt){return fitSize(ht,yt,vt)},ht.fitWidth=function(yt,vt){return fitWidth(ht,yt,vt)},ht.fitHeight=function(yt,vt){return fitHeight(ht,yt,vt)};function mt(){return et=tt=null,ht}return ht.scale(1070)}function azimuthalRaw(et){return function(tt,nt){var rt=cos$1(tt),ot=cos$1(nt),st=et(rt*ot);return st===1/0?[2,0]:[st*ot*sin$1(tt),st*sin$1(nt)]}}function azimuthalInvert(et){return function(tt,nt){var rt=sqrt$1(tt*tt+nt*nt),ot=et(rt),st=sin$1(ot),ut=cos$1(ot);return[atan2(tt*st,rt*ut),asin$1(rt&&nt*st/rt)]}}var azimuthalEqualAreaRaw=azimuthalRaw(function(et){return sqrt$1(2/(1+et))});azimuthalEqualAreaRaw.invert=azimuthalInvert(function(et){return 2*asin$1(et/2)});function geoAzimuthalEqualArea(){return projection$1(azimuthalEqualAreaRaw).scale(124.75).clipAngle(180-.001)}var azimuthalEquidistantRaw=azimuthalRaw(function(et){return(et=acos(et))&&et/sin$1(et)});azimuthalEquidistantRaw.invert=azimuthalInvert(function(et){return et});function geoAzimuthalEquidistant(){return projection$1(azimuthalEquidistantRaw).scale(79.4188).clipAngle(180-.001)}function mercatorRaw(et,tt){return[et,log$3(tan((halfPi$1+tt)/2))]}mercatorRaw.invert=function(et,tt){return[et,2*atan(exp(tt))-halfPi$1]};function geoMercator(){return mercatorProjection(mercatorRaw).scale(961/tau$1)}function mercatorProjection(et){var tt=projection$1(et),nt=tt.center,rt=tt.scale,ot=tt.translate,st=tt.clipExtent,ut=null,ct,ft,pt;tt.scale=function(mt){return arguments.length?(rt(mt),ht()):rt()},tt.translate=function(mt){return arguments.length?(ot(mt),ht()):ot()},tt.center=function(mt){return arguments.length?(nt(mt),ht()):nt()},tt.clipExtent=function(mt){return arguments.length?(mt==null?ut=ct=ft=pt=null:(ut=+mt[0][0],ct=+mt[0][1],ft=+mt[1][0],pt=+mt[1][1]),ht()):ut==null?null:[[ut,ct],[ft,pt]]};function ht(){var mt=pi$1*rt(),yt=tt(rotation(tt.rotate()).invert([0,0]));return st(ut==null?[[yt[0]-mt,yt[1]-mt],[yt[0]+mt,yt[1]+mt]]:et===mercatorRaw?[[Math.max(yt[0]-mt,ut),ct],[Math.min(yt[0]+mt,ft),pt]]:[[ut,Math.max(yt[1]-mt,ct)],[ft,Math.min(yt[1]+mt,pt)]])}return ht()}function tany(et){return tan((halfPi$1+et)/2)}function conicConformalRaw(et,tt){var nt=cos$1(et),rt=et===tt?sin$1(et):log$3(nt/cos$1(tt))/log$3(tany(tt)/tany(et)),ot=nt*pow$1(tany(et),rt)/rt;if(!rt)return mercatorRaw;function st(ut,ct){ot>0?ct<-halfPi$1+epsilon$4&&(ct=-halfPi$1+epsilon$4):ct>halfPi$1-epsilon$4&&(ct=halfPi$1-epsilon$4);var ft=ot/pow$1(tany(ct),rt);return[ft*sin$1(rt*ut),ot-ft*cos$1(rt*ut)]}return st.invert=function(ut,ct){var ft=ot-ct,pt=sign(rt)*sqrt$1(ut*ut+ft*ft),ht=atan2(ut,abs$1(ft))*sign(ft);return ft*rt<0&&(ht-=pi$1*sign(ut)*sign(ft)),[ht/rt,2*atan(pow$1(ot/pt,1/rt))-halfPi$1]},st}function geoConicConformal(){return conicProjection(conicConformalRaw).scale(109.5).parallels([30,30])}function equirectangularRaw(et,tt){return[et,tt]}equirectangularRaw.invert=equirectangularRaw;function geoEquirectangular(){return projection$1(equirectangularRaw).scale(152.63)}function conicEquidistantRaw(et,tt){var nt=cos$1(et),rt=et===tt?sin$1(et):(nt-cos$1(tt))/(tt-et),ot=nt/rt+et;if(abs$1(rt)<epsilon$4)return equirectangularRaw;function st(ut,ct){var ft=ot-ct,pt=rt*ut;return[ft*sin$1(pt),ot-ft*cos$1(pt)]}return st.invert=function(ut,ct){var ft=ot-ct,pt=atan2(ut,abs$1(ft))*sign(ft);return ft*rt<0&&(pt-=pi$1*sign(ut)*sign(ft)),[pt/rt,ot-sign(rt)*sqrt$1(ut*ut+ft*ft)]},st}function geoConicEquidistant(){return conicProjection(conicEquidistantRaw).scale(131.154).center([0,13.9389])}var A1=1.340264,A2=-.081106,A3=893e-6,A4=.003796,M=sqrt$1(3)/2,iterations=12;function equalEarthRaw(et,tt){var nt=asin$1(M*sin$1(tt)),rt=nt*nt,ot=rt*rt*rt;return[et*cos$1(nt)/(M*(A1+3*A2*rt+ot*(7*A3+9*A4*rt))),nt*(A1+A2*rt+ot*(A3+A4*rt))]}equalEarthRaw.invert=function(et,tt){for(var nt=tt,rt=nt*nt,ot=rt*rt*rt,st=0,ut,ct,ft;st<iterations&&(ct=nt*(A1+A2*rt+ot*(A3+A4*rt))-tt,ft=A1+3*A2*rt+ot*(7*A3+9*A4*rt),nt-=ut=ct/ft,rt=nt*nt,ot=rt*rt*rt,!(abs$1(ut)<epsilon2));++st);return[M*et*(A1+3*A2*rt+ot*(7*A3+9*A4*rt))/cos$1(nt),asin$1(sin$1(nt)/M)]};function geoEqualEarth(){return projection$1(equalEarthRaw).scale(177.158)}function gnomonicRaw(et,tt){var nt=cos$1(tt),rt=cos$1(et)*nt;return[nt*sin$1(et)/rt,sin$1(tt)/rt]}gnomonicRaw.invert=azimuthalInvert(atan);function geoGnomonic(){return projection$1(gnomonicRaw).scale(144.049).clipAngle(60)}function geoIdentity(){var et=1,tt=0,nt=0,rt=1,ot=1,st=0,ut,ct,ft=null,pt,ht,mt,yt=1,vt=1,Tt=transformer({point:function(Ot,Rt){var It=$t([Ot,Rt]);this.stream.point(It[0],It[1])}}),Et=identity,xt,At;function Ct(){return yt=et*rt,vt=et*ot,xt=At=null,$t}function $t(Ot){var Rt=Ot[0]*yt,It=Ot[1]*vt;if(st){var kt=It*ut-Rt*ct;Rt=Rt*ut+It*ct,It=kt}return[Rt+tt,It+nt]}return $t.invert=function(Ot){var Rt=Ot[0]-tt,It=Ot[1]-nt;if(st){var kt=It*ut+Rt*ct;Rt=Rt*ut-It*ct,It=kt}return[Rt/yt,It/vt]},$t.stream=function(Ot){return xt&&At===Ot?xt:xt=Tt(Et(At=Ot))},$t.postclip=function(Ot){return arguments.length?(Et=Ot,ft=pt=ht=mt=null,Ct()):Et},$t.clipExtent=function(Ot){return arguments.length?(Et=Ot==null?(ft=pt=ht=mt=null,identity):clipRectangle(ft=+Ot[0][0],pt=+Ot[0][1],ht=+Ot[1][0],mt=+Ot[1][1]),Ct()):ft==null?null:[[ft,pt],[ht,mt]]},$t.scale=function(Ot){return arguments.length?(et=+Ot,Ct()):et},$t.translate=function(Ot){return arguments.length?(tt=+Ot[0],nt=+Ot[1],Ct()):[tt,nt]},$t.angle=function(Ot){return arguments.length?(st=Ot%360*radians,ct=sin$1(st),ut=cos$1(st),Ct()):st*degrees},$t.reflectX=function(Ot){return arguments.length?(rt=Ot?-1:1,Ct()):rt<0},$t.reflectY=function(Ot){return arguments.length?(ot=Ot?-1:1,Ct()):ot<0},$t.fitExtent=function(Ot,Rt){return fitExtent($t,Ot,Rt)},$t.fitSize=function(Ot,Rt){return fitSize($t,Ot,Rt)},$t.fitWidth=function(Ot,Rt){return fitWidth($t,Ot,Rt)},$t.fitHeight=function(Ot,Rt){return fitHeight($t,Ot,Rt)},$t}function naturalEarth1Raw(et,tt){var nt=tt*tt,rt=nt*nt;return[et*(.8707-.131979*nt+rt*(-.013791+rt*(.003971*nt-.001529*rt))),tt*(1.007226+nt*(.015085+rt*(-.044475+.028874*nt-.005916*rt)))]}naturalEarth1Raw.invert=function(et,tt){var nt=tt,rt=25,ot;do{var st=nt*nt,ut=st*st;nt-=ot=(nt*(1.007226+st*(.015085+ut*(-.044475+.028874*st-.005916*ut)))-tt)/(1.007226+st*(.015085*3+ut*(-.044475*7+.028874*9*st-.005916*11*ut)))}while(abs$1(ot)>epsilon$4&&--rt>0);return[et/(.8707+(st=nt*nt)*(-.131979+st*(-.013791+st*st*st*(.003971-.001529*st)))),nt]};function geoNaturalEarth1(){return projection$1(naturalEarth1Raw).scale(175.295)}function orthographicRaw(et,tt){return[cos$1(tt)*sin$1(et),sin$1(tt)]}orthographicRaw.invert=azimuthalInvert(asin$1);function geoOrthographic(){return projection$1(orthographicRaw).scale(249.5).clipAngle(90+epsilon$4)}function stereographicRaw(et,tt){var nt=cos$1(tt),rt=1+cos$1(et)*nt;return[nt*sin$1(et)/rt,sin$1(tt)/rt]}stereographicRaw.invert=azimuthalInvert(function(et){return 2*atan(et)});function geoStereographic(){return projection$1(stereographicRaw).scale(250).clipAngle(142)}function transverseMercatorRaw(et,tt){return[log$3(tan((halfPi$1+tt)/2)),-et]}transverseMercatorRaw.invert=function(et,tt){return[-tt,2*atan(exp(et))-halfPi$1]};function geoTransverseMercator(){var et=mercatorProjection(transverseMercatorRaw),tt=et.center,nt=et.rotate;return et.center=function(rt){return arguments.length?tt([-rt[1],rt[0]]):(rt=tt(),[rt[1],-rt[0]])},et.rotate=function(rt){return arguments.length?nt([rt[0],rt[1],rt.length>2?rt[2]+90:90]):(rt=nt(),[rt[0],rt[1],rt[2]-90])},nt([0,0,90]).scale(159.155)}var abs=Math.abs,cos=Math.cos,sin=Math.sin,epsilon$3=1e-6,pi=Math.PI,halfPi=pi/2,sqrt2=sqrt(2);function asin(et){return et>1?halfPi:et<-1?-halfPi:Math.asin(et)}function sqrt(et){return et>0?Math.sqrt(et):0}function mollweideBromleyTheta(et,tt){var nt=et*sin(tt),rt=30,ot;do tt-=ot=(tt+sin(tt)-nt)/(1+cos(tt));while(abs(ot)>epsilon$3&&--rt>0);return tt/2}function mollweideBromleyRaw(et,tt,nt){function rt(ot,st){return[et*ot*cos(st=mollweideBromleyTheta(nt,st)),tt*sin(st)]}return rt.invert=function(ot,st){return st=asin(st/tt),[ot/(et*cos(st)),asin((2*st+sin(2*st))/nt)]},rt}var mollweideRaw=mollweideBromleyRaw(sqrt2/halfPi,sqrt2,pi);function geoMollweide(){return projection$1(mollweideRaw).scale(169.529)}const defaultPath=geoPath(),projectionProperties=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function create$1(et,tt){return function nt(){const rt=tt();return rt.type=et,rt.path=geoPath().projection(rt),rt.copy=rt.copy||function(){const ot=nt();return projectionProperties.forEach(st=>{rt[st]&&ot[st](rt[st]())}),ot.path.pointRadius(rt.path.pointRadius()),ot},registerScale(rt)}}function projection(et,tt){if(!et||typeof et!="string")throw new Error("Projection type must be a name string.");return et=et.toLowerCase(),arguments.length>1?(projections[et]=create$1(et,tt),this):projections[et]||null}function getProjectionPath(et){return et&&et.path||defaultPath}const projections={albers:geoAlbers,albersusa:geoAlbersUsa,azimuthalequalarea:geoAzimuthalEqualArea,azimuthalequidistant:geoAzimuthalEquidistant,conicconformal:geoConicConformal,conicequalarea:geoConicEqualArea,conicequidistant:geoConicEquidistant,equalEarth:geoEqualEarth,equirectangular:geoEquirectangular,gnomonic:geoGnomonic,identity:geoIdentity,mercator:geoMercator,mollweide:geoMollweide,naturalEarth1:geoNaturalEarth1,orthographic:geoOrthographic,stereographic:geoStereographic,transversemercator:geoTransverseMercator};for(const et in projections)projection(et,projections[et]);function noop$9(){}const cases=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function contours(){var et=1,tt=1,nt=ct;function rt(ft,pt){return pt.map(ht=>ot(ft,ht))}function ot(ft,pt){var ht=[],mt=[];return st(ft,pt,yt=>{nt(yt,ft,pt),area$1(yt)>0?ht.push([yt]):mt.push(yt)}),mt.forEach(yt=>{for(var vt=0,Tt=ht.length,Et;vt<Tt;++vt)if(contains$1((Et=ht[vt])[0],yt)!==-1){Et.push(yt);return}}),{type:"MultiPolygon",value:pt,coordinates:ht}}function st(ft,pt,ht){var mt=new Array,yt=new Array,vt,Tt,Et,xt,At,Ct;for(vt=Tt=-1,xt=ft[0]>=pt,cases[xt<<1].forEach($t);++vt<et-1;)Et=xt,xt=ft[vt+1]>=pt,cases[Et|xt<<1].forEach($t);for(cases[xt<<0].forEach($t);++Tt<tt-1;){for(vt=-1,xt=ft[Tt*et+et]>=pt,At=ft[Tt*et]>=pt,cases[xt<<1|At<<2].forEach($t);++vt<et-1;)Et=xt,xt=ft[Tt*et+et+vt+1]>=pt,Ct=At,At=ft[Tt*et+vt+1]>=pt,cases[Et|xt<<1|At<<2|Ct<<3].forEach($t);cases[xt|At<<3].forEach($t)}for(vt=-1,At=ft[Tt*et]>=pt,cases[At<<2].forEach($t);++vt<et-1;)Ct=At,At=ft[Tt*et+vt+1]>=pt,cases[At<<2|Ct<<3].forEach($t);cases[At<<3].forEach($t);function $t(Ot){var Rt=[Ot[0][0]+vt,Ot[0][1]+Tt],It=[Ot[1][0]+vt,Ot[1][1]+Tt],kt=ut(Rt),Mt=ut(It),Ft,zt;(Ft=yt[kt])?(zt=mt[Mt])?(delete yt[Ft.end],delete mt[zt.start],Ft===zt?(Ft.ring.push(It),ht(Ft.ring)):mt[Ft.start]=yt[zt.end]={start:Ft.start,end:zt.end,ring:Ft.ring.concat(zt.ring)}):(delete yt[Ft.end],Ft.ring.push(It),yt[Ft.end=Mt]=Ft):(Ft=mt[Mt])?(zt=yt[kt])?(delete mt[Ft.start],delete yt[zt.end],Ft===zt?(Ft.ring.push(It),ht(Ft.ring)):mt[zt.start]=yt[Ft.end]={start:zt.start,end:Ft.end,ring:zt.ring.concat(Ft.ring)}):(delete mt[Ft.start],Ft.ring.unshift(Rt),mt[Ft.start=kt]=Ft):mt[kt]=yt[Mt]={start:kt,end:Mt,ring:[Rt,It]}}}function ut(ft){return ft[0]*2+ft[1]*(et+1)*4}function ct(ft,pt,ht){ft.forEach(mt=>{var yt=mt[0],vt=mt[1],Tt=yt|0,Et=vt|0,xt,At=pt[Et*et+Tt];yt>0&&yt<et&&Tt===yt&&(xt=pt[Et*et+Tt-1],mt[0]=yt+(ht-xt)/(At-xt)-.5),vt>0&&vt<tt&&Et===vt&&(xt=pt[(Et-1)*et+Tt],mt[1]=vt+(ht-xt)/(At-xt)-.5)})}return rt.contour=ot,rt.size=function(ft){if(!arguments.length)return[et,tt];var pt=Math.floor(ft[0]),ht=Math.floor(ft[1]);return pt>=0&&ht>=0||error("invalid size"),et=pt,tt=ht,rt},rt.smooth=function(ft){return arguments.length?(nt=ft?ct:noop$9,rt):nt===ct},rt}function area$1(et){for(var tt=0,nt=et.length,rt=et[nt-1][1]*et[0][0]-et[nt-1][0]*et[0][1];++tt<nt;)rt+=et[tt-1][1]*et[tt][0]-et[tt-1][0]*et[tt][1];return rt}function contains$1(et,tt){for(var nt=-1,rt=tt.length,ot;++nt<rt;)if(ot=ringContains(et,tt[nt]))return ot;return 0}function ringContains(et,tt){for(var nt=tt[0],rt=tt[1],ot=-1,st=0,ut=et.length,ct=ut-1;st<ut;ct=st++){var ft=et[st],pt=ft[0],ht=ft[1],mt=et[ct],yt=mt[0],vt=mt[1];if(segmentContains(ft,mt,tt))return 0;ht>rt!=vt>rt&&nt<(yt-pt)*(rt-ht)/(vt-ht)+pt&&(ot=-ot)}return ot}function segmentContains(et,tt,nt){var rt;return collinear$1(et,tt,nt)&&within(et[rt=+(et[0]===tt[0])],nt[rt],tt[rt])}function collinear$1(et,tt,nt){return(tt[0]-et[0])*(nt[1]-et[1])===(nt[0]-et[0])*(tt[1]-et[1])}function within(et,tt,nt){return et<=tt&&tt<=nt||nt<=tt&&tt<=et}function quantize(et,tt,nt){return function(rt){var ot=extent(rt),st=nt?Math.min(ot[0],0):ot[0],ut=ot[1],ct=ut-st,ft=tt?tickStep(st,ut,et):ct/(et+1);return range$4(st+ft,ut,ft)}}function Isocontour(et){Transform.call(this,null,et)}Isocontour.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]};inherits(Isocontour,Transform,{transform(et,tt){if(this.value&&!tt.changed()&&!et.modified())return tt.StopPropagation;var nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),rt=tt.materialize(tt.SOURCE).source,ot=et.field||identity$6,st=contours().smooth(et.smooth!==!1),ut=et.thresholds||levels(rt,ot,et),ct=et.as===null?null:et.as||"contour",ft=[];return rt.forEach(pt=>{const ht=ot(pt),mt=st.size([ht.width,ht.height])(ht.values,isArray(ut)?ut:ut(ht.values));transformPaths(mt,ht,pt,et),mt.forEach(yt=>{ft.push(rederive(pt,ingest$1(ct!=null?{[ct]:yt}:yt)))})}),this.value&&(nt.rem=this.value),this.value=nt.source=nt.add=ft,nt}});function levels(et,tt,nt){const rt=quantize(nt.levels||10,nt.nice,nt.zero!==!1);return nt.resolve!=="shared"?rt:rt(et.map(ot=>max$2(tt(ot).values)))}function transformPaths(et,tt,nt,rt){let ot=rt.scale||tt.scale,st=rt.translate||tt.translate;if(isFunction$3(ot)&&(ot=ot(nt,rt)),isFunction$3(st)&&(st=st(nt,rt)),(ot===1||ot==null)&&!st)return;const ut=(isNumber$1(ot)?ot:ot[0])||1,ct=(isNumber$1(ot)?ot:ot[1])||1,ft=st&&st[0]||0,pt=st&&st[1]||0;et.forEach(transform$3(tt,ut,ct,ft,pt))}function transform$3(et,tt,nt,rt,ot){const st=et.x1||0,ut=et.y1||0,ct=tt*nt<0;function ft(mt){mt.forEach(pt)}function pt(mt){ct&&mt.reverse(),mt.forEach(ht)}function ht(mt){mt[0]=(mt[0]-st)*tt+rt,mt[1]=(mt[1]-ut)*nt+ot}return function(mt){return mt.coordinates.forEach(ft),mt}}function radius(et,tt,nt){const rt=et>=0?et:estimateBandwidth(tt,nt);return Math.round((Math.sqrt(4*rt*rt+1)-1)/2)}function number$2(et){return isFunction$3(et)?et:constant$6(+et)}function density2D(){var et=ft=>ft[0],tt=ft=>ft[1],nt=one$2,rt=[-1,-1],ot=960,st=500,ut=2;function ct(ft,pt){const ht=radius(rt[0],ft,et)>>ut,mt=radius(rt[1],ft,tt)>>ut,yt=ht?ht+2:0,vt=mt?mt+2:0,Tt=2*yt+(ot>>ut),Et=2*vt+(st>>ut),xt=new Float32Array(Tt*Et),At=new Float32Array(Tt*Et);let Ct=xt;ft.forEach(Ot=>{const Rt=yt+(+et(Ot)>>ut),It=vt+(+tt(Ot)>>ut);Rt>=0&&Rt<Tt&&It>=0&&It<Et&&(xt[Rt+It*Tt]+=+nt(Ot))}),ht>0&&mt>0?(blurX(Tt,Et,xt,At,ht),blurY(Tt,Et,At,xt,mt),blurX(Tt,Et,xt,At,ht),blurY(Tt,Et,At,xt,mt),blurX(Tt,Et,xt,At,ht),blurY(Tt,Et,At,xt,mt)):ht>0?(blurX(Tt,Et,xt,At,ht),blurX(Tt,Et,At,xt,ht),blurX(Tt,Et,xt,At,ht),Ct=At):mt>0&&(blurY(Tt,Et,xt,At,mt),blurY(Tt,Et,At,xt,mt),blurY(Tt,Et,xt,At,mt),Ct=At);const $t=pt?Math.pow(2,-2*ut):1/sum$1(Ct);for(let Ot=0,Rt=Tt*Et;Ot<Rt;++Ot)Ct[Ot]*=$t;return{values:Ct,scale:1<<ut,width:Tt,height:Et,x1:yt,y1:vt,x2:yt+(ot>>ut),y2:vt+(st>>ut)}}return ct.x=function(ft){return arguments.length?(et=number$2(ft),ct):et},ct.y=function(ft){return arguments.length?(tt=number$2(ft),ct):tt},ct.weight=function(ft){return arguments.length?(nt=number$2(ft),ct):nt},ct.size=function(ft){if(!arguments.length)return[ot,st];var pt=+ft[0],ht=+ft[1];return pt>=0&&ht>=0||error("invalid size"),ot=pt,st=ht,ct},ct.cellSize=function(ft){return arguments.length?((ft=+ft)>=1||error("invalid cell size"),ut=Math.floor(Math.log(ft)/Math.LN2),ct):1<<ut},ct.bandwidth=function(ft){return arguments.length?(ft=array$5(ft),ft.length===1&&(ft=[+ft[0],+ft[0]]),ft.length!==2&&error("invalid bandwidth"),rt=ft,ct):rt},ct}function blurX(et,tt,nt,rt,ot){const st=(ot<<1)+1;for(let ut=0;ut<tt;++ut)for(let ct=0,ft=0;ct<et+ot;++ct)ct<et&&(ft+=nt[ct+ut*et]),ct>=ot&&(ct>=st&&(ft-=nt[ct-st+ut*et]),rt[ct-ot+ut*et]=ft/Math.min(ct+1,et-1+st-ct,st))}function blurY(et,tt,nt,rt,ot){const st=(ot<<1)+1;for(let ut=0;ut<et;++ut)for(let ct=0,ft=0;ct<tt+ot;++ct)ct<tt&&(ft+=nt[ut+ct*et]),ct>=ot&&(ct>=st&&(ft-=nt[ut+(ct-st)*et]),rt[ut+(ct-ot)*et]=ft/Math.min(ct+1,tt-1+st-ct,st))}function KDE2D(et){Transform.call(this,null,et)}KDE2D.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const PARAMS=["x","y","weight","size","cellSize","bandwidth"];function params(et,tt){return PARAMS.forEach(nt=>tt[nt]!=null?et[nt](tt[nt]):0),et}inherits(KDE2D,Transform,{transform(et,tt){if(this.value&&!tt.changed()&&!et.modified())return tt.StopPropagation;var nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),rt=tt.materialize(tt.SOURCE).source,ot=partition$2(rt,et.groupby),st=(et.groupby||[]).map(accessorName),ut=params(density2D(),et),ct=et.as||"grid",ft=[];function pt(ht,mt){for(let yt=0;yt<st.length;++yt)ht[st[yt]]=mt[yt];return ht}return ft=ot.map(ht=>ingest$1(pt({[ct]:ut(ht,et.counts)},ht.dims))),this.value&&(nt.rem=this.value),this.value=nt.source=nt.add=ft,nt}});function partition$2(et,tt){var nt=[],rt=ht=>ht(ct),ot,st,ut,ct,ft,pt;if(tt==null)nt.push(et);else for(ot={},st=0,ut=et.length;st<ut;++st)ct=et[st],ft=tt.map(rt),pt=ot[ft],pt||(ot[ft]=pt=[],pt.dims=ft,nt.push(pt)),pt.push(ct);return nt}function Contour(et){Transform.call(this,null,et)}Contour.Definition={type:"Contour",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"weight",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"count",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"thresholds",type:"number",array:!0},{name:"smooth",type:"boolean",default:!0}]};inherits(Contour,Transform,{transform(et,tt){if(this.value&&!tt.changed()&&!et.modified())return tt.StopPropagation;var nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS),rt=contours().smooth(et.smooth!==!1),ot=et.values,st=et.thresholds||quantize(et.count||10,et.nice,!!ot),ut=et.size,ct,ft;return ot||(ot=tt.materialize(tt.SOURCE).source,ct=params(density2D(),et)(ot,!0),ft=transform$3(ct,ct.scale||1,ct.scale||1,0,0),ut=[ct.width,ct.height],ot=ct.values),st=isArray(st)?st:st(ot),ot=rt.size(ut)(ot,st),ft&&ot.forEach(ft),this.value&&(nt.rem=this.value),this.value=nt.source=nt.add=(ot||[]).map(ingest$1),nt}});const Feature="Feature",FeatureCollection="FeatureCollection",MultiPoint="MultiPoint";function GeoJSON(et){Transform.call(this,null,et)}GeoJSON.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]};inherits(GeoJSON,Transform,{transform(et,tt){var nt=this._features,rt=this._points,ot=et.fields,st=ot&&ot[0],ut=ot&&ot[1],ct=et.geojson||!ot&&identity$6,ft=tt.ADD,pt;pt=et.modified()||tt.changed(tt.REM)||tt.modified(accessorFields(ct))||st&&tt.modified(accessorFields(st))||ut&&tt.modified(accessorFields(ut)),(!this.value||pt)&&(ft=tt.SOURCE,this._features=nt=[],this._points=rt=[]),ct&&tt.visit(ft,ht=>nt.push(ct(ht))),st&&ut&&(tt.visit(ft,ht=>{var mt=st(ht),yt=ut(ht);mt!=null&&yt!=null&&(mt=+mt)===mt&&(yt=+yt)===yt&&rt.push([mt,yt])}),nt=nt.concat({type:Feature,geometry:{type:MultiPoint,coordinates:rt}})),this.value={type:FeatureCollection,features:nt}}});function GeoPath(et){Transform.call(this,null,et)}GeoPath.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]};inherits(GeoPath,Transform,{transform(et,tt){var nt=tt.fork(tt.ALL),rt=this.value,ot=et.field||identity$6,st=et.as||"path",ut=nt.SOURCE;!rt||et.modified()?(this.value=rt=getProjectionPath(et.projection),nt.materialize().reflow()):ut=ot===identity$6||tt.modified(ot.fields)?nt.ADD_MOD:nt.ADD;const ct=initPath(rt,et.pointRadius);return nt.visit(ut,ft=>ft[st]=rt(ot(ft))),rt.pointRadius(ct),nt.modifies(st)}});function initPath(et,tt){const nt=et.pointRadius();return et.context(null),tt!=null&&et.pointRadius(tt),nt}function GeoPoint(et){Transform.call(this,null,et)}GeoPoint.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]};inherits(GeoPoint,Transform,{transform(et,tt){var nt=et.projection,rt=et.fields[0],ot=et.fields[1],st=et.as||["x","y"],ut=st[0],ct=st[1],ft;function pt(ht){const mt=nt([rt(ht),ot(ht)]);mt?(ht[ut]=mt[0],ht[ct]=mt[1]):(ht[ut]=void 0,ht[ct]=void 0)}return et.modified()?tt=tt.materialize().reflow(!0).visit(tt.SOURCE,pt):(ft=tt.modified(rt.fields)||tt.modified(ot.fields),tt.visit(ft?tt.ADD_MOD:tt.ADD,pt)),tt.modifies(st)}});function GeoShape(et){Transform.call(this,null,et)}GeoShape.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]};inherits(GeoShape,Transform,{transform(et,tt){var nt=tt.fork(tt.ALL),rt=this.value,ot=et.as||"shape",st=nt.ADD;return(!rt||et.modified())&&(this.value=rt=shapeGenerator(getProjectionPath(et.projection),et.field||field$1("datum"),et.pointRadius),nt.materialize().reflow(),st=nt.SOURCE),nt.visit(st,ut=>ut[ot]=rt),nt.modifies(ot)}});function shapeGenerator(et,tt,nt){const rt=nt==null?ot=>et(tt(ot)):ot=>{var st=et.pointRadius(),ut=et.pointRadius(nt)(tt(ot));return et.pointRadius(st),ut};return rt.context=ot=>(et.context(ot),rt),rt}function Graticule(et){Transform.call(this,[],et),this.generator=graticule()}Graticule.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};inherits(Graticule,Transform,{transform(et,tt){var nt=this.value,rt=this.generator,ot;if(!nt.length||et.modified())for(const st in et)isFunction$3(rt[st])&&rt[st](et[st]);return ot=rt(),nt.length?tt.mod.push(replace$1(nt[0],ot)):tt.add.push(ingest$1(ot)),nt[0]=ot,tt}});function Heatmap(et){Transform.call(this,null,et)}Heatmap.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]};inherits(Heatmap,Transform,{transform(et,tt){if(!tt.changed()&&!et.modified())return tt.StopPropagation;var nt=tt.materialize(tt.SOURCE).source,rt=et.resolve==="shared",ot=et.field||identity$6,st=opacity_(et.opacity,et),ut=color_(et.color,et),ct=et.as||"image",ft={$x:0,$y:0,$value:0,$max:rt?max$2(nt.map(pt=>max$2(ot(pt).values))):0};return nt.forEach(pt=>{const ht=ot(pt),mt=extend$1({},pt,ft);rt||(mt.$max=max$2(ht.values||[])),pt[ct]=toCanvas(ht,mt,ut.dep?ut:constant$6(ut(mt)),st.dep?st:constant$6(st(mt)))}),tt.reflow(!0).modifies(ct)}});function color_(et,tt){let nt;return isFunction$3(et)?(nt=rt=>rgb$1(et(rt,tt)),nt.dep=dependency(et)):nt=constant$6(rgb$1(et||"#888")),nt}function opacity_(et,tt){let nt;return isFunction$3(et)?(nt=rt=>et(rt,tt),nt.dep=dependency(et)):et?nt=constant$6(et):(nt=rt=>rt.$value/rt.$max||0,nt.dep=!0),nt}function dependency(et){if(!isFunction$3(et))return!1;const tt=toSet(accessorFields(et));return tt.$x||tt.$y||tt.$value||tt.$max}function toCanvas(et,tt,nt,rt){const ot=et.width,st=et.height,ut=et.x1||0,ct=et.y1||0,ft=et.x2||ot,pt=et.y2||st,ht=et.values,mt=ht?xt=>ht[xt]:zero$5,yt=domCanvas(ft-ut,pt-ct),vt=yt.getContext("2d"),Tt=vt.getImageData(0,0,ft-ut,pt-ct),Et=Tt.data;for(let xt=ct,At=0;xt<pt;++xt){tt.$y=xt-ct;for(let Ct=ut,$t=xt*ot;Ct<ft;++Ct,At+=4){tt.$x=Ct-ut,tt.$value=mt(Ct+$t);const Ot=nt(tt);Et[At+0]=Ot.r,Et[At+1]=Ot.g,Et[At+2]=Ot.b,Et[At+3]=~~(255*rt(tt))}}return vt.putImageData(Tt,0,0),yt}function Projection$1(et){Transform.call(this,null,et),this.modified(!0)}inherits(Projection$1,Transform,{transform(et,tt){let nt=this.value;return!nt||et.modified("type")?(this.value=nt=create(et.type),projectionProperties.forEach(rt=>{et[rt]!=null&&set$3(nt,rt,et[rt])})):projectionProperties.forEach(rt=>{et.modified(rt)&&set$3(nt,rt,et[rt])}),et.pointRadius!=null&&nt.path.pointRadius(et.pointRadius),et.fit&&fit(nt,et),tt.fork(tt.NO_SOURCE|tt.NO_FIELDS)}});function fit(et,tt){const nt=collectGeoJSON(tt.fit);tt.extent?et.fitExtent(tt.extent,nt):tt.size&&et.fitSize(tt.size,nt)}function create(et){const tt=projection((et||"mercator").toLowerCase());return tt||error("Unrecognized projection type: "+et),tt()}function set$3(et,tt,nt){isFunction$3(et[tt])&&et[tt](nt)}function collectGeoJSON(et){return et=array$5(et),et.length===1?et[0]:{type:FeatureCollection,features:et.reduce((tt,nt)=>tt.concat(featurize(nt)),[])}}function featurize(et){return et.type===FeatureCollection?et.features:array$5(et).filter(tt=>tt!=null).map(tt=>tt.type===Feature?tt:{type:Feature,geometry:tt})}const geo=Object.freeze(Object.defineProperty({__proto__:null,contour:Contour,geojson:GeoJSON,geopath:GeoPath,geopoint:GeoPoint,geoshape:GeoShape,graticule:Graticule,heatmap:Heatmap,isocontour:Isocontour,kde2d:KDE2D,projection:Projection$1},Symbol.toStringTag,{value:"Module"}));function forceCenter(et,tt){var nt,rt=1;et==null&&(et=0),tt==null&&(tt=0);function ot(){var st,ut=nt.length,ct,ft=0,pt=0;for(st=0;st<ut;++st)ct=nt[st],ft+=ct.x,pt+=ct.y;for(ft=(ft/ut-et)*rt,pt=(pt/ut-tt)*rt,st=0;st<ut;++st)ct=nt[st],ct.x-=ft,ct.y-=pt}return ot.initialize=function(st){nt=st},ot.x=function(st){return arguments.length?(et=+st,ot):et},ot.y=function(st){return arguments.length?(tt=+st,ot):tt},ot.strength=function(st){return arguments.length?(rt=+st,ot):rt},ot}function tree_add(et){const tt=+this._x.call(null,et),nt=+this._y.call(null,et);return add$1(this.cover(tt,nt),tt,nt,et)}function add$1(et,tt,nt,rt){if(isNaN(tt)||isNaN(nt))return et;var ot,st=et._root,ut={data:rt},ct=et._x0,ft=et._y0,pt=et._x1,ht=et._y1,mt,yt,vt,Tt,Et,xt,At,Ct;if(!st)return et._root=ut,et;for(;st.length;)if((Et=tt>=(mt=(ct+pt)/2))?ct=mt:pt=mt,(xt=nt>=(yt=(ft+ht)/2))?ft=yt:ht=yt,ot=st,!(st=st[At=xt<<1|Et]))return ot[At]=ut,et;if(vt=+et._x.call(null,st.data),Tt=+et._y.call(null,st.data),tt===vt&&nt===Tt)return ut.next=st,ot?ot[At]=ut:et._root=ut,et;do ot=ot?ot[At]=new Array(4):et._root=new Array(4),(Et=tt>=(mt=(ct+pt)/2))?ct=mt:pt=mt,(xt=nt>=(yt=(ft+ht)/2))?ft=yt:ht=yt;while((At=xt<<1|Et)===(Ct=(Tt>=yt)<<1|vt>=mt));return ot[Ct]=st,ot[At]=ut,et}function addAll(et){var tt,nt,rt=et.length,ot,st,ut=new Array(rt),ct=new Array(rt),ft=1/0,pt=1/0,ht=-1/0,mt=-1/0;for(nt=0;nt<rt;++nt)isNaN(ot=+this._x.call(null,tt=et[nt]))||isNaN(st=+this._y.call(null,tt))||(ut[nt]=ot,ct[nt]=st,ot<ft&&(ft=ot),ot>ht&&(ht=ot),st<pt&&(pt=st),st>mt&&(mt=st));if(ft>ht||pt>mt)return this;for(this.cover(ft,pt).cover(ht,mt),nt=0;nt<rt;++nt)add$1(this,ut[nt],ct[nt],et[nt]);return this}function tree_cover(et,tt){if(isNaN(et=+et)||isNaN(tt=+tt))return this;var nt=this._x0,rt=this._y0,ot=this._x1,st=this._y1;if(isNaN(nt))ot=(nt=Math.floor(et))+1,st=(rt=Math.floor(tt))+1;else{for(var ut=ot-nt||1,ct=this._root,ft,pt;nt>et||et>=ot||rt>tt||tt>=st;)switch(pt=(tt<rt)<<1|et<nt,ft=new Array(4),ft[pt]=ct,ct=ft,ut*=2,pt){case 0:ot=nt+ut,st=rt+ut;break;case 1:nt=ot-ut,st=rt+ut;break;case 2:ot=nt+ut,rt=st-ut;break;case 3:nt=ot-ut,rt=st-ut;break}this._root&&this._root.length&&(this._root=ct)}return this._x0=nt,this._y0=rt,this._x1=ot,this._y1=st,this}function tree_data(){var et=[];return this.visit(function(tt){if(!tt.length)do et.push(tt.data);while(tt=tt.next)}),et}function tree_extent(et){return arguments.length?this.cover(+et[0][0],+et[0][1]).cover(+et[1][0],+et[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Quad(et,tt,nt,rt,ot){this.node=et,this.x0=tt,this.y0=nt,this.x1=rt,this.y1=ot}function tree_find(et,tt,nt){var rt,ot=this._x0,st=this._y0,ut,ct,ft,pt,ht=this._x1,mt=this._y1,yt=[],vt=this._root,Tt,Et;for(vt&&yt.push(new Quad(vt,ot,st,ht,mt)),nt==null?nt=1/0:(ot=et-nt,st=tt-nt,ht=et+nt,mt=tt+nt,nt*=nt);Tt=yt.pop();)if(!(!(vt=Tt.node)||(ut=Tt.x0)>ht||(ct=Tt.y0)>mt||(ft=Tt.x1)<ot||(pt=Tt.y1)<st))if(vt.length){var xt=(ut+ft)/2,At=(ct+pt)/2;yt.push(new Quad(vt[3],xt,At,ft,pt),new Quad(vt[2],ut,At,xt,pt),new Quad(vt[1],xt,ct,ft,At),new Quad(vt[0],ut,ct,xt,At)),(Et=(tt>=At)<<1|et>=xt)&&(Tt=yt[yt.length-1],yt[yt.length-1]=yt[yt.length-1-Et],yt[yt.length-1-Et]=Tt)}else{var Ct=et-+this._x.call(null,vt.data),$t=tt-+this._y.call(null,vt.data),Ot=Ct*Ct+$t*$t;if(Ot<nt){var Rt=Math.sqrt(nt=Ot);ot=et-Rt,st=tt-Rt,ht=et+Rt,mt=tt+Rt,rt=vt.data}}return rt}function tree_remove(et){if(isNaN(ht=+this._x.call(null,et))||isNaN(mt=+this._y.call(null,et)))return this;var tt,nt=this._root,rt,ot,st,ut=this._x0,ct=this._y0,ft=this._x1,pt=this._y1,ht,mt,yt,vt,Tt,Et,xt,At;if(!nt)return this;if(nt.length)for(;;){if((Tt=ht>=(yt=(ut+ft)/2))?ut=yt:ft=yt,(Et=mt>=(vt=(ct+pt)/2))?ct=vt:pt=vt,tt=nt,!(nt=nt[xt=Et<<1|Tt]))return this;if(!nt.length)break;(tt[xt+1&3]||tt[xt+2&3]||tt[xt+3&3])&&(rt=tt,At=xt)}for(;nt.data!==et;)if(ot=nt,!(nt=nt.next))return this;return(st=nt.next)&&delete nt.next,ot?(st?ot.next=st:delete ot.next,this):tt?(st?tt[xt]=st:delete tt[xt],(nt=tt[0]||tt[1]||tt[2]||tt[3])&&nt===(tt[3]||tt[2]||tt[1]||tt[0])&&!nt.length&&(rt?rt[At]=nt:this._root=nt),this):(this._root=st,this)}function removeAll(et){for(var tt=0,nt=et.length;tt<nt;++tt)this.remove(et[tt]);return this}function tree_root(){return this._root}function tree_size(){var et=0;return this.visit(function(tt){if(!tt.length)do++et;while(tt=tt.next)}),et}function tree_visit(et){var tt=[],nt,rt=this._root,ot,st,ut,ct,ft;for(rt&&tt.push(new Quad(rt,this._x0,this._y0,this._x1,this._y1));nt=tt.pop();)if(!et(rt=nt.node,st=nt.x0,ut=nt.y0,ct=nt.x1,ft=nt.y1)&&rt.length){var pt=(st+ct)/2,ht=(ut+ft)/2;(ot=rt[3])&&tt.push(new Quad(ot,pt,ht,ct,ft)),(ot=rt[2])&&tt.push(new Quad(ot,st,ht,pt,ft)),(ot=rt[1])&&tt.push(new Quad(ot,pt,ut,ct,ht)),(ot=rt[0])&&tt.push(new Quad(ot,st,ut,pt,ht))}return this}function tree_visitAfter(et){var tt=[],nt=[],rt;for(this._root&&tt.push(new Quad(this._root,this._x0,this._y0,this._x1,this._y1));rt=tt.pop();){var ot=rt.node;if(ot.length){var st,ut=rt.x0,ct=rt.y0,ft=rt.x1,pt=rt.y1,ht=(ut+ft)/2,mt=(ct+pt)/2;(st=ot[0])&&tt.push(new Quad(st,ut,ct,ht,mt)),(st=ot[1])&&tt.push(new Quad(st,ht,ct,ft,mt)),(st=ot[2])&&tt.push(new Quad(st,ut,mt,ht,pt)),(st=ot[3])&&tt.push(new Quad(st,ht,mt,ft,pt))}nt.push(rt)}for(;rt=nt.pop();)et(rt.node,rt.x0,rt.y0,rt.x1,rt.y1);return this}function defaultX(et){return et[0]}function tree_x(et){return arguments.length?(this._x=et,this):this._x}function defaultY(et){return et[1]}function tree_y(et){return arguments.length?(this._y=et,this):this._y}function quadtree(et,tt,nt){var rt=new Quadtree(tt??defaultX,nt??defaultY,NaN,NaN,NaN,NaN);return et==null?rt:rt.addAll(et)}function Quadtree(et,tt,nt,rt,ot,st){this._x=et,this._y=tt,this._x0=nt,this._y0=rt,this._x1=ot,this._y1=st,this._root=void 0}function leaf_copy(et){for(var tt={data:et.data},nt=tt;et=et.next;)nt=nt.next={data:et.data};return tt}var treeProto=quadtree.prototype=Quadtree.prototype;treeProto.copy=function(){var et=new Quadtree(this._x,this._y,this._x0,this._y0,this._x1,this._y1),tt=this._root,nt,rt;if(!tt)return et;if(!tt.length)return et._root=leaf_copy(tt),et;for(nt=[{source:tt,target:et._root=new Array(4)}];tt=nt.pop();)for(var ot=0;ot<4;++ot)(rt=tt.source[ot])&&(rt.length?nt.push({source:rt,target:tt.target[ot]=new Array(4)}):tt.target[ot]=leaf_copy(rt));return et};treeProto.add=tree_add;treeProto.addAll=addAll;treeProto.cover=tree_cover;treeProto.data=tree_data;treeProto.extent=tree_extent;treeProto.find=tree_find;treeProto.remove=tree_remove;treeProto.removeAll=removeAll;treeProto.root=tree_root;treeProto.size=tree_size;treeProto.visit=tree_visit;treeProto.visitAfter=tree_visitAfter;treeProto.x=tree_x;treeProto.y=tree_y;function constant$2(et){return function(){return et}}function jiggle(et){return(et()-.5)*1e-6}function x$2(et){return et.x+et.vx}function y$2(et){return et.y+et.vy}function forceCollide(et){var tt,nt,rt,ot=1,st=1;typeof et!="function"&&(et=constant$2(et==null?1:+et));function ut(){for(var pt,ht=tt.length,mt,yt,vt,Tt,Et,xt,At=0;At<st;++At)for(mt=quadtree(tt,x$2,y$2).visitAfter(ct),pt=0;pt<ht;++pt)yt=tt[pt],Et=nt[yt.index],xt=Et*Et,vt=yt.x+yt.vx,Tt=yt.y+yt.vy,mt.visit(Ct);function Ct($t,Ot,Rt,It,kt){var Mt=$t.data,Ft=$t.r,zt=Et+Ft;if(Mt){if(Mt.index>yt.index){var Vt=vt-Mt.x-Mt.vx,Zt=Tt-Mt.y-Mt.vy,Ut=Vt*Vt+Zt*Zt;Ut<zt*zt&&(Vt===0&&(Vt=jiggle(rt),Ut+=Vt*Vt),Zt===0&&(Zt=jiggle(rt),Ut+=Zt*Zt),Ut=(zt-(Ut=Math.sqrt(Ut)))/Ut*ot,yt.vx+=(Vt*=Ut)*(zt=(Ft*=Ft)/(xt+Ft)),yt.vy+=(Zt*=Ut)*zt,Mt.vx-=Vt*(zt=1-zt),Mt.vy-=Zt*zt)}return}return Ot>vt+zt||It<vt-zt||Rt>Tt+zt||kt<Tt-zt}}function ct(pt){if(pt.data)return pt.r=nt[pt.data.index];for(var ht=pt.r=0;ht<4;++ht)pt[ht]&&pt[ht].r>pt.r&&(pt.r=pt[ht].r)}function ft(){if(!!tt){var pt,ht=tt.length,mt;for(nt=new Array(ht),pt=0;pt<ht;++pt)mt=tt[pt],nt[mt.index]=+et(mt,pt,tt)}}return ut.initialize=function(pt,ht){tt=pt,rt=ht,ft()},ut.iterations=function(pt){return arguments.length?(st=+pt,ut):st},ut.strength=function(pt){return arguments.length?(ot=+pt,ut):ot},ut.radius=function(pt){return arguments.length?(et=typeof pt=="function"?pt:constant$2(+pt),ft(),ut):et},ut}function index$4(et){return et.index}function find$2(et,tt){var nt=et.get(tt);if(!nt)throw new Error("node not found: "+tt);return nt}function forceLink(et){var tt=index$4,nt=mt,rt,ot=constant$2(30),st,ut,ct,ft,pt,ht=1;et==null&&(et=[]);function mt(xt){return 1/Math.min(ct[xt.source.index],ct[xt.target.index])}function yt(xt){for(var At=0,Ct=et.length;At<ht;++At)for(var $t=0,Ot,Rt,It,kt,Mt,Ft,zt;$t<Ct;++$t)Ot=et[$t],Rt=Ot.source,It=Ot.target,kt=It.x+It.vx-Rt.x-Rt.vx||jiggle(pt),Mt=It.y+It.vy-Rt.y-Rt.vy||jiggle(pt),Ft=Math.sqrt(kt*kt+Mt*Mt),Ft=(Ft-st[$t])/Ft*xt*rt[$t],kt*=Ft,Mt*=Ft,It.vx-=kt*(zt=ft[$t]),It.vy-=Mt*zt,Rt.vx+=kt*(zt=1-zt),Rt.vy+=Mt*zt}function vt(){if(!!ut){var xt,At=ut.length,Ct=et.length,$t=new Map(ut.map((Rt,It)=>[tt(Rt,It,ut),Rt])),Ot;for(xt=0,ct=new Array(At);xt<Ct;++xt)Ot=et[xt],Ot.index=xt,typeof Ot.source!="object"&&(Ot.source=find$2($t,Ot.source)),typeof Ot.target!="object"&&(Ot.target=find$2($t,Ot.target)),ct[Ot.source.index]=(ct[Ot.source.index]||0)+1,ct[Ot.target.index]=(ct[Ot.target.index]||0)+1;for(xt=0,ft=new Array(Ct);xt<Ct;++xt)Ot=et[xt],ft[xt]=ct[Ot.source.index]/(ct[Ot.source.index]+ct[Ot.target.index]);rt=new Array(Ct),Tt(),st=new Array(Ct),Et()}}function Tt(){if(!!ut)for(var xt=0,At=et.length;xt<At;++xt)rt[xt]=+nt(et[xt],xt,et)}function Et(){if(!!ut)for(var xt=0,At=et.length;xt<At;++xt)st[xt]=+ot(et[xt],xt,et)}return yt.initialize=function(xt,At){ut=xt,pt=At,vt()},yt.links=function(xt){return arguments.length?(et=xt,vt(),yt):et},yt.id=function(xt){return arguments.length?(tt=xt,yt):tt},yt.iterations=function(xt){return arguments.length?(ht=+xt,yt):ht},yt.strength=function(xt){return arguments.length?(nt=typeof xt=="function"?xt:constant$2(+xt),Tt(),yt):nt},yt.distance=function(xt){return arguments.length?(ot=typeof xt=="function"?xt:constant$2(+xt),Et(),yt):ot},yt}var noop$8={value:()=>{}};function dispatch(){for(var et=0,tt=arguments.length,nt={},rt;et<tt;++et){if(!(rt=arguments[et]+"")||rt in nt||/[\s.]/.test(rt))throw new Error("illegal type: "+rt);nt[rt]=[]}return new Dispatch(nt)}function Dispatch(et){this._=et}function parseTypenames(et,tt){return et.trim().split(/^|\s+/).map(function(nt){var rt="",ot=nt.indexOf(".");if(ot>=0&&(rt=nt.slice(ot+1),nt=nt.slice(0,ot)),nt&&!tt.hasOwnProperty(nt))throw new Error("unknown type: "+nt);return{type:nt,name:rt}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(et,tt){var nt=this._,rt=parseTypenames(et+"",nt),ot,st=-1,ut=rt.length;if(arguments.length<2){for(;++st<ut;)if((ot=(et=rt[st]).type)&&(ot=get$1(nt[ot],et.name)))return ot;return}if(tt!=null&&typeof tt!="function")throw new Error("invalid callback: "+tt);for(;++st<ut;)if(ot=(et=rt[st]).type)nt[ot]=set$2(nt[ot],et.name,tt);else if(tt==null)for(ot in nt)nt[ot]=set$2(nt[ot],et.name,null);return this},copy:function(){var et={},tt=this._;for(var nt in tt)et[nt]=tt[nt].slice();return new Dispatch(et)},call:function(et,tt){if((ot=arguments.length-2)>0)for(var nt=new Array(ot),rt=0,ot,st;rt<ot;++rt)nt[rt]=arguments[rt+2];if(!this._.hasOwnProperty(et))throw new Error("unknown type: "+et);for(st=this._[et],rt=0,ot=st.length;rt<ot;++rt)st[rt].value.apply(tt,nt)},apply:function(et,tt,nt){if(!this._.hasOwnProperty(et))throw new Error("unknown type: "+et);for(var rt=this._[et],ot=0,st=rt.length;ot<st;++ot)rt[ot].value.apply(tt,nt)}};function get$1(et,tt){for(var nt=0,rt=et.length,ot;nt<rt;++nt)if((ot=et[nt]).name===tt)return ot.value}function set$2(et,tt,nt){for(var rt=0,ot=et.length;rt<ot;++rt)if(et[rt].name===tt){et[rt]=noop$8,et=et.slice(0,rt).concat(et.slice(rt+1));break}return nt!=null&&et.push({name:tt,value:nt}),et}var frame=0,timeout$1=0,interval$2=0,pokeDelay=1e3,taskHead,taskTail,clockLast=0,clockNow=0,clockSkew=0,clock=typeof performance=="object"&&performance.now?performance:Date,setFrame=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(et){setTimeout(et,17)};function now$2(){return clockNow||(setFrame(clearNow),clockNow=clock.now()+clockSkew)}function clearNow(){clockNow=0}function Timer$1(){this._call=this._time=this._next=null}Timer$1.prototype=timer$1.prototype={constructor:Timer$1,restart:function(et,tt,nt){if(typeof et!="function")throw new TypeError("callback is not a function");nt=(nt==null?now$2():+nt)+(tt==null?0:+tt),!this._next&&taskTail!==this&&(taskTail?taskTail._next=this:taskHead=this,taskTail=this),this._call=et,this._time=nt,sleep()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep())}};function timer$1(et,tt,nt){var rt=new Timer$1;return rt.restart(et,tt,nt),rt}function timerFlush(){now$2(),++frame;for(var et=taskHead,tt;et;)(tt=clockNow-et._time)>=0&&et._call.call(void 0,tt),et=et._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var et=clock.now(),tt=et-clockLast;tt>pokeDelay&&(clockSkew-=tt,clockLast=et)}function nap(){for(var et,tt=taskHead,nt,rt=1/0;tt;)tt._call?(rt>tt._time&&(rt=tt._time),et=tt,tt=tt._next):(nt=tt._next,tt._next=null,tt=et?et._next=nt:taskHead=nt);taskTail=et,sleep(rt)}function sleep(et){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var tt=et-clockNow;tt>24?(et<1/0&&(timeout$1=setTimeout(wake,et-clock.now()-clockSkew)),interval$2&&(interval$2=clearInterval(interval$2))):(interval$2||(clockLast=clock.now(),interval$2=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function interval$1(et,tt,nt){var rt=new Timer$1,ot=tt;return tt==null?(rt.restart(et,tt,nt),rt):(rt._restart=rt.restart,rt.restart=function(st,ut,ct){ut=+ut,ct=ct==null?now$2():+ct,rt._restart(function ft(pt){pt+=ot,rt._restart(ft,ot+=ut,ct),st(pt)},ut,ct)},rt.restart(et,tt,nt),rt)}const a$1=1664525,c$2=1013904223,m$2=4294967296;function lcg$1(){let et=1;return()=>(et=(a$1*et+c$2)%m$2)/m$2}function x$1(et){return et.x}function y$1(et){return et.y}var initialRadius=10,initialAngle=Math.PI*(3-Math.sqrt(5));function forceSimulation(et){var tt,nt=1,rt=.001,ot=1-Math.pow(rt,1/300),st=0,ut=.6,ct=new Map,ft=timer$1(mt),pt=dispatch("tick","end"),ht=lcg$1();et==null&&(et=[]);function mt(){yt(),pt.call("tick",tt),nt<rt&&(ft.stop(),pt.call("end",tt))}function yt(Et){var xt,At=et.length,Ct;Et===void 0&&(Et=1);for(var $t=0;$t<Et;++$t)for(nt+=(st-nt)*ot,ct.forEach(function(Ot){Ot(nt)}),xt=0;xt<At;++xt)Ct=et[xt],Ct.fx==null?Ct.x+=Ct.vx*=ut:(Ct.x=Ct.fx,Ct.vx=0),Ct.fy==null?Ct.y+=Ct.vy*=ut:(Ct.y=Ct.fy,Ct.vy=0);return tt}function vt(){for(var Et=0,xt=et.length,At;Et<xt;++Et){if(At=et[Et],At.index=Et,At.fx!=null&&(At.x=At.fx),At.fy!=null&&(At.y=At.fy),isNaN(At.x)||isNaN(At.y)){var Ct=initialRadius*Math.sqrt(.5+Et),$t=Et*initialAngle;At.x=Ct*Math.cos($t),At.y=Ct*Math.sin($t)}(isNaN(At.vx)||isNaN(At.vy))&&(At.vx=At.vy=0)}}function Tt(Et){return Et.initialize&&Et.initialize(et,ht),Et}return vt(),tt={tick:yt,restart:function(){return ft.restart(mt),tt},stop:function(){return ft.stop(),tt},nodes:function(Et){return arguments.length?(et=Et,vt(),ct.forEach(Tt),tt):et},alpha:function(Et){return arguments.length?(nt=+Et,tt):nt},alphaMin:function(Et){return arguments.length?(rt=+Et,tt):rt},alphaDecay:function(Et){return arguments.length?(ot=+Et,tt):+ot},alphaTarget:function(Et){return arguments.length?(st=+Et,tt):st},velocityDecay:function(Et){return arguments.length?(ut=1-Et,tt):1-ut},randomSource:function(Et){return arguments.length?(ht=Et,ct.forEach(Tt),tt):ht},force:function(Et,xt){return arguments.length>1?(xt==null?ct.delete(Et):ct.set(Et,Tt(xt)),tt):ct.get(Et)},find:function(Et,xt,At){var Ct=0,$t=et.length,Ot,Rt,It,kt,Mt;for(At==null?At=1/0:At*=At,Ct=0;Ct<$t;++Ct)kt=et[Ct],Ot=Et-kt.x,Rt=xt-kt.y,It=Ot*Ot+Rt*Rt,It<At&&(Mt=kt,At=It);return Mt},on:function(Et,xt){return arguments.length>1?(pt.on(Et,xt),tt):pt.on(Et)}}}function forceManyBody(){var et,tt,nt,rt,ot=constant$2(-30),st,ut=1,ct=1/0,ft=.81;function pt(vt){var Tt,Et=et.length,xt=quadtree(et,x$1,y$1).visitAfter(mt);for(rt=vt,Tt=0;Tt<Et;++Tt)tt=et[Tt],xt.visit(yt)}function ht(){if(!!et){var vt,Tt=et.length,Et;for(st=new Array(Tt),vt=0;vt<Tt;++vt)Et=et[vt],st[Et.index]=+ot(Et,vt,et)}}function mt(vt){var Tt=0,Et,xt,At=0,Ct,$t,Ot;if(vt.length){for(Ct=$t=Ot=0;Ot<4;++Ot)(Et=vt[Ot])&&(xt=Math.abs(Et.value))&&(Tt+=Et.value,At+=xt,Ct+=xt*Et.x,$t+=xt*Et.y);vt.x=Ct/At,vt.y=$t/At}else{Et=vt,Et.x=Et.data.x,Et.y=Et.data.y;do Tt+=st[Et.data.index];while(Et=Et.next)}vt.value=Tt}function yt(vt,Tt,Et,xt){if(!vt.value)return!0;var At=vt.x-tt.x,Ct=vt.y-tt.y,$t=xt-Tt,Ot=At*At+Ct*Ct;if($t*$t/ft<Ot)return Ot<ct&&(At===0&&(At=jiggle(nt),Ot+=At*At),Ct===0&&(Ct=jiggle(nt),Ot+=Ct*Ct),Ot<ut&&(Ot=Math.sqrt(ut*Ot)),tt.vx+=At*vt.value*rt/Ot,tt.vy+=Ct*vt.value*rt/Ot),!0;if(vt.length||Ot>=ct)return;(vt.data!==tt||vt.next)&&(At===0&&(At=jiggle(nt),Ot+=At*At),Ct===0&&(Ct=jiggle(nt),Ot+=Ct*Ct),Ot<ut&&(Ot=Math.sqrt(ut*Ot)));do vt.data!==tt&&($t=st[vt.data.index]*rt/Ot,tt.vx+=At*$t,tt.vy+=Ct*$t);while(vt=vt.next)}return pt.initialize=function(vt,Tt){et=vt,nt=Tt,ht()},pt.strength=function(vt){return arguments.length?(ot=typeof vt=="function"?vt:constant$2(+vt),ht(),pt):ot},pt.distanceMin=function(vt){return arguments.length?(ut=vt*vt,pt):Math.sqrt(ut)},pt.distanceMax=function(vt){return arguments.length?(ct=vt*vt,pt):Math.sqrt(ct)},pt.theta=function(vt){return arguments.length?(ft=vt*vt,pt):Math.sqrt(ft)},pt}function forceX(et){var tt=constant$2(.1),nt,rt,ot;typeof et!="function"&&(et=constant$2(et==null?0:+et));function st(ct){for(var ft=0,pt=nt.length,ht;ft<pt;++ft)ht=nt[ft],ht.vx+=(ot[ft]-ht.x)*rt[ft]*ct}function ut(){if(!!nt){var ct,ft=nt.length;for(rt=new Array(ft),ot=new Array(ft),ct=0;ct<ft;++ct)rt[ct]=isNaN(ot[ct]=+et(nt[ct],ct,nt))?0:+tt(nt[ct],ct,nt)}}return st.initialize=function(ct){nt=ct,ut()},st.strength=function(ct){return arguments.length?(tt=typeof ct=="function"?ct:constant$2(+ct),ut(),st):tt},st.x=function(ct){return arguments.length?(et=typeof ct=="function"?ct:constant$2(+ct),ut(),st):et},st}function forceY(et){var tt=constant$2(.1),nt,rt,ot;typeof et!="function"&&(et=constant$2(et==null?0:+et));function st(ct){for(var ft=0,pt=nt.length,ht;ft<pt;++ft)ht=nt[ft],ht.vy+=(ot[ft]-ht.y)*rt[ft]*ct}function ut(){if(!!nt){var ct,ft=nt.length;for(rt=new Array(ft),ot=new Array(ft),ct=0;ct<ft;++ct)rt[ct]=isNaN(ot[ct]=+et(nt[ct],ct,nt))?0:+tt(nt[ct],ct,nt)}}return st.initialize=function(ct){nt=ct,ut()},st.strength=function(ct){return arguments.length?(tt=typeof ct=="function"?ct:constant$2(+ct),ut(),st):tt},st.y=function(ct){return arguments.length?(et=typeof ct=="function"?ct:constant$2(+ct),ut(),st):et},st}const ForceMap={center:forceCenter,collide:forceCollide,nbody:forceManyBody,link:forceLink,x:forceX,y:forceY},Forces="forces",ForceParams=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],ForceConfig=["static","iterations"],ForceOutput=["x","y","vx","vy"];function Force(et){Transform.call(this,null,et)}Force.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:ForceOutput}]};inherits(Force,Transform,{transform(et,tt){var nt=this.value,rt=tt.changed(tt.ADD_REM),ot=et.modified(ForceParams),st=et.iterations||300;if(nt?(rt&&(tt.modifies("index"),nt.nodes(tt.source)),(ot||tt.changed(tt.MOD))&&setup(nt,et,0,tt)):(this.value=nt=simulation(tt.source,et),nt.on("tick",rerun(tt.dataflow,this)),et.static||(rt=!0,nt.tick()),tt.modifies("index")),ot||rt||et.modified(ForceConfig)||tt.changed()&&et.restart){if(nt.alpha(Math.max(nt.alpha(),et.alpha||1)).alphaDecay(1-Math.pow(nt.alphaMin(),1/st)),et.static)for(nt.stop();--st>=0;)nt.tick();else if(nt.stopped()&&nt.restart(),!rt)return tt.StopPropagation}return this.finish(et,tt)},finish(et,tt){const nt=tt.dataflow;for(let ct=this._argops,ft=0,pt=ct.length,ht;ft<pt;++ft)if(ht=ct[ft],!(ht.name!==Forces||ht.op._argval.force!=="link")){for(var rt=ht.op._argops,ot=0,st=rt.length,ut;ot<st;++ot)if(rt[ot].name==="links"&&(ut=rt[ot].op.source)){nt.pulse(ut,nt.changeset().reflow());break}}return tt.reflow(et.modified()).modifies(ForceOutput)}});function rerun(et,tt){return()=>et.touch(tt).run()}function simulation(et,tt){const nt=forceSimulation(et),rt=nt.stop,ot=nt.restart;let st=!1;return nt.stopped=()=>st,nt.restart=()=>(st=!1,ot()),nt.stop=()=>(st=!0,rt()),setup(nt,tt,!0).on("end",()=>st=!0)}function setup(et,tt,nt,rt){var ot=array$5(tt.forces),st,ut,ct,ft;for(st=0,ut=ForceParams.length;st<ut;++st)ct=ForceParams[st],ct!==Forces&&tt.modified(ct)&&et[ct](tt[ct]);for(st=0,ut=ot.length;st<ut;++st)ft=Forces+st,ct=nt||tt.modified(Forces,st)?getForce(ot[st]):rt&&modified(ot[st],rt)?et.force(ft):null,ct&&et.force(ft,ct);for(ut=et.numForces||0;st<ut;++st)et.force(Forces+st,null);return et.numForces=ot.length,et}function modified(et,tt){var nt,rt;for(nt in et)if(isFunction$3(rt=et[nt])&&tt.modified(accessorFields(rt)))return 1;return 0}function getForce(et){var tt,nt;has$1(ForceMap,et.force)||error("Unrecognized force: "+et.force),tt=ForceMap[et.force]();for(nt in et)isFunction$3(tt[nt])&&setForceParam(tt[nt],et[nt],et);return tt}function setForceParam(et,tt,nt){et(isFunction$3(tt)?rt=>tt(rt,nt):tt)}const force=Object.freeze(Object.defineProperty({__proto__:null,force:Force},Symbol.toStringTag,{value:"Module"}));function defaultSeparation$2(et,tt){return et.parent===tt.parent?1:2}function meanX(et){return et.reduce(meanXReduce,0)/et.length}function meanXReduce(et,tt){return et+tt.x}function maxY(et){return 1+et.reduce(maxYReduce,0)}function maxYReduce(et,tt){return Math.max(et,tt.y)}function leafLeft(et){for(var tt;tt=et.children;)et=tt[0];return et}function leafRight(et){for(var tt;tt=et.children;)et=tt[tt.length-1];return et}function cluster(){var et=defaultSeparation$2,tt=1,nt=1,rt=!1;function ot(st){var ut,ct=0;st.eachAfter(function(yt){var vt=yt.children;vt?(yt.x=meanX(vt),yt.y=maxY(vt)):(yt.x=ut?ct+=et(yt,ut):0,yt.y=0,ut=yt)});var ft=leafLeft(st),pt=leafRight(st),ht=ft.x-et(ft,pt)/2,mt=pt.x+et(pt,ft)/2;return st.eachAfter(rt?function(yt){yt.x=(yt.x-st.x)*tt,yt.y=(st.y-yt.y)*nt}:function(yt){yt.x=(yt.x-ht)/(mt-ht)*tt,yt.y=(1-(st.y?yt.y/st.y:1))*nt})}return ot.separation=function(st){return arguments.length?(et=st,ot):et},ot.size=function(st){return arguments.length?(rt=!1,tt=+st[0],nt=+st[1],ot):rt?null:[tt,nt]},ot.nodeSize=function(st){return arguments.length?(rt=!0,tt=+st[0],nt=+st[1],ot):rt?[tt,nt]:null},ot}function count(et){var tt=0,nt=et.children,rt=nt&&nt.length;if(!rt)tt=1;else for(;--rt>=0;)tt+=nt[rt].value;et.value=tt}function node_count(){return this.eachAfter(count)}function node_each(et,tt){let nt=-1;for(const rt of this)et.call(tt,rt,++nt,this);return this}function node_eachBefore(et,tt){for(var nt=this,rt=[nt],ot,st,ut=-1;nt=rt.pop();)if(et.call(tt,nt,++ut,this),ot=nt.children)for(st=ot.length-1;st>=0;--st)rt.push(ot[st]);return this}function node_eachAfter(et,tt){for(var nt=this,rt=[nt],ot=[],st,ut,ct,ft=-1;nt=rt.pop();)if(ot.push(nt),st=nt.children)for(ut=0,ct=st.length;ut<ct;++ut)rt.push(st[ut]);for(;nt=ot.pop();)et.call(tt,nt,++ft,this);return this}function node_find(et,tt){let nt=-1;for(const rt of this)if(et.call(tt,rt,++nt,this))return rt}function node_sum(et){return this.eachAfter(function(tt){for(var nt=+et(tt.data)||0,rt=tt.children,ot=rt&&rt.length;--ot>=0;)nt+=rt[ot].value;tt.value=nt})}function node_sort(et){return this.eachBefore(function(tt){tt.children&&tt.children.sort(et)})}function node_path(et){for(var tt=this,nt=leastCommonAncestor(tt,et),rt=[tt];tt!==nt;)tt=tt.parent,rt.push(tt);for(var ot=rt.length;et!==nt;)rt.splice(ot,0,et),et=et.parent;return rt}function leastCommonAncestor(et,tt){if(et===tt)return et;var nt=et.ancestors(),rt=tt.ancestors(),ot=null;for(et=nt.pop(),tt=rt.pop();et===tt;)ot=et,et=nt.pop(),tt=rt.pop();return ot}function node_ancestors(){for(var et=this,tt=[et];et=et.parent;)tt.push(et);return tt}function node_descendants(){return Array.from(this)}function node_leaves(){var et=[];return this.eachBefore(function(tt){tt.children||et.push(tt)}),et}function node_links(){var et=this,tt=[];return et.each(function(nt){nt!==et&&tt.push({source:nt.parent,target:nt})}),tt}function*node_iterator(){var et=this,tt,nt=[et],rt,ot,st;do for(tt=nt.reverse(),nt=[];et=tt.pop();)if(yield et,rt=et.children)for(ot=0,st=rt.length;ot<st;++ot)nt.push(rt[ot]);while(nt.length)}function hierarchy(et,tt){et instanceof Map?(et=[void 0,et],tt===void 0&&(tt=mapChildren)):tt===void 0&&(tt=objectChildren);for(var nt=new Node$3(et),rt,ot=[nt],st,ut,ct,ft;rt=ot.pop();)if((ut=tt(rt.data))&&(ft=(ut=Array.from(ut)).length))for(rt.children=ut,ct=ft-1;ct>=0;--ct)ot.push(st=ut[ct]=new Node$3(ut[ct])),st.parent=rt,st.depth=rt.depth+1;return nt.eachBefore(computeHeight)}function node_copy(){return hierarchy(this).eachBefore(copyData)}function objectChildren(et){return et.children}function mapChildren(et){return Array.isArray(et)?et[1]:null}function copyData(et){et.data.value!==void 0&&(et.value=et.data.value),et.data=et.data.data}function computeHeight(et){var tt=0;do et.height=tt;while((et=et.parent)&&et.height<++tt)}function Node$3(et){this.data=et,this.depth=this.height=0,this.parent=null}Node$3.prototype=hierarchy.prototype={constructor:Node$3,count:node_count,each:node_each,eachAfter:node_eachAfter,eachBefore:node_eachBefore,find:node_find,sum:node_sum,sort:node_sort,path:node_path,ancestors:node_ancestors,descendants:node_descendants,leaves:node_leaves,links:node_links,copy:node_copy,[Symbol.iterator]:node_iterator};function optional(et){return et==null?null:required(et)}function required(et){if(typeof et!="function")throw new Error;return et}function constantZero(){return 0}function constant$1(et){return function(){return et}}const a=1664525,c$1=1013904223,m$1=4294967296;function lcg(){let et=1;return()=>(et=(a*et+c$1)%m$1)/m$1}function array$2(et){return typeof et=="object"&&"length"in et?et:Array.from(et)}function shuffle(et,tt){let nt=et.length,rt,ot;for(;nt;)ot=tt()*nt--|0,rt=et[nt],et[nt]=et[ot],et[ot]=rt;return et}function packEncloseRandom(et,tt){for(var nt=0,rt=(et=shuffle(Array.from(et),tt)).length,ot=[],st,ut;nt<rt;)st=et[nt],ut&&enclosesWeak(ut,st)?++nt:(ut=encloseBasis(ot=extendBasis(ot,st)),nt=0);return ut}function extendBasis(et,tt){var nt,rt;if(enclosesWeakAll(tt,et))return[tt];for(nt=0;nt<et.length;++nt)if(enclosesNot(tt,et[nt])&&enclosesWeakAll(encloseBasis2(et[nt],tt),et))return[et[nt],tt];for(nt=0;nt<et.length-1;++nt)for(rt=nt+1;rt<et.length;++rt)if(enclosesNot(encloseBasis2(et[nt],et[rt]),tt)&&enclosesNot(encloseBasis2(et[nt],tt),et[rt])&&enclosesNot(encloseBasis2(et[rt],tt),et[nt])&&enclosesWeakAll(encloseBasis3(et[nt],et[rt],tt),et))return[et[nt],et[rt],tt];throw new Error}function enclosesNot(et,tt){var nt=et.r-tt.r,rt=tt.x-et.x,ot=tt.y-et.y;return nt<0||nt*nt<rt*rt+ot*ot}function enclosesWeak(et,tt){var nt=et.r-tt.r+Math.max(et.r,tt.r,1)*1e-9,rt=tt.x-et.x,ot=tt.y-et.y;return nt>0&&nt*nt>rt*rt+ot*ot}function enclosesWeakAll(et,tt){for(var nt=0;nt<tt.length;++nt)if(!enclosesWeak(et,tt[nt]))return!1;return!0}function encloseBasis(et){switch(et.length){case 1:return encloseBasis1(et[0]);case 2:return encloseBasis2(et[0],et[1]);case 3:return encloseBasis3(et[0],et[1],et[2])}}function encloseBasis1(et){return{x:et.x,y:et.y,r:et.r}}function encloseBasis2(et,tt){var nt=et.x,rt=et.y,ot=et.r,st=tt.x,ut=tt.y,ct=tt.r,ft=st-nt,pt=ut-rt,ht=ct-ot,mt=Math.sqrt(ft*ft+pt*pt);return{x:(nt+st+ft/mt*ht)/2,y:(rt+ut+pt/mt*ht)/2,r:(mt+ot+ct)/2}}function encloseBasis3(et,tt,nt){var rt=et.x,ot=et.y,st=et.r,ut=tt.x,ct=tt.y,ft=tt.r,pt=nt.x,ht=nt.y,mt=nt.r,yt=rt-ut,vt=rt-pt,Tt=ot-ct,Et=ot-ht,xt=ft-st,At=mt-st,Ct=rt*rt+ot*ot-st*st,$t=Ct-ut*ut-ct*ct+ft*ft,Ot=Ct-pt*pt-ht*ht+mt*mt,Rt=vt*Tt-yt*Et,It=(Tt*Ot-Et*$t)/(Rt*2)-rt,kt=(Et*xt-Tt*At)/Rt,Mt=(vt*$t-yt*Ot)/(Rt*2)-ot,Ft=(yt*At-vt*xt)/Rt,zt=kt*kt+Ft*Ft-1,Vt=2*(st+It*kt+Mt*Ft),Zt=It*It+Mt*Mt-st*st,Ut=-(Math.abs(zt)>1e-6?(Vt+Math.sqrt(Vt*Vt-4*zt*Zt))/(2*zt):Zt/Vt);return{x:rt+It+kt*Ut,y:ot+Mt+Ft*Ut,r:Ut}}function place(et,tt,nt){var rt=et.x-tt.x,ot,st,ut=et.y-tt.y,ct,ft,pt=rt*rt+ut*ut;pt?(st=tt.r+nt.r,st*=st,ft=et.r+nt.r,ft*=ft,st>ft?(ot=(pt+ft-st)/(2*pt),ct=Math.sqrt(Math.max(0,ft/pt-ot*ot)),nt.x=et.x-ot*rt-ct*ut,nt.y=et.y-ot*ut+ct*rt):(ot=(pt+st-ft)/(2*pt),ct=Math.sqrt(Math.max(0,st/pt-ot*ot)),nt.x=tt.x+ot*rt-ct*ut,nt.y=tt.y+ot*ut+ct*rt)):(nt.x=tt.x+nt.r,nt.y=tt.y)}function intersects(et,tt){var nt=et.r+tt.r-1e-6,rt=tt.x-et.x,ot=tt.y-et.y;return nt>0&&nt*nt>rt*rt+ot*ot}function score(et){var tt=et._,nt=et.next._,rt=tt.r+nt.r,ot=(tt.x*nt.r+nt.x*tt.r)/rt,st=(tt.y*nt.r+nt.y*tt.r)/rt;return ot*ot+st*st}function Node$2(et){this._=et,this.next=null,this.previous=null}function packSiblingsRandom(et,tt){if(!(st=(et=array$2(et)).length))return 0;var nt,rt,ot,st,ut,ct,ft,pt,ht,mt,yt;if(nt=et[0],nt.x=0,nt.y=0,!(st>1))return nt.r;if(rt=et[1],nt.x=-rt.r,rt.x=nt.r,rt.y=0,!(st>2))return nt.r+rt.r;place(rt,nt,ot=et[2]),nt=new Node$2(nt),rt=new Node$2(rt),ot=new Node$2(ot),nt.next=ot.previous=rt,rt.next=nt.previous=ot,ot.next=rt.previous=nt;e:for(ft=3;ft<st;++ft){place(nt._,rt._,ot=et[ft]),ot=new Node$2(ot),pt=rt.next,ht=nt.previous,mt=rt._.r,yt=nt._.r;do if(mt<=yt){if(intersects(pt._,ot._)){rt=pt,nt.next=rt,rt.previous=nt,--ft;continue e}mt+=pt._.r,pt=pt.next}else{if(intersects(ht._,ot._)){nt=ht,nt.next=rt,rt.previous=nt,--ft;continue e}yt+=ht._.r,ht=ht.previous}while(pt!==ht.next);for(ot.previous=nt,ot.next=rt,nt.next=rt.previous=rt=ot,ut=score(nt);(ot=ot.next)!==rt;)(ct=score(ot))<ut&&(nt=ot,ut=ct);rt=nt.next}for(nt=[rt._],ot=rt;(ot=ot.next)!==rt;)nt.push(ot._);for(ot=packEncloseRandom(nt,tt),ft=0;ft<st;++ft)nt=et[ft],nt.x-=ot.x,nt.y-=ot.y;return ot.r}function defaultRadius(et){return Math.sqrt(et.value)}function pack(){var et=null,tt=1,nt=1,rt=constantZero;function ot(st){const ut=lcg();return st.x=tt/2,st.y=nt/2,et?st.eachBefore(radiusLeaf(et)).eachAfter(packChildrenRandom(rt,.5,ut)).eachBefore(translateChild(1)):st.eachBefore(radiusLeaf(defaultRadius)).eachAfter(packChildrenRandom(constantZero,1,ut)).eachAfter(packChildrenRandom(rt,st.r/Math.min(tt,nt),ut)).eachBefore(translateChild(Math.min(tt,nt)/(2*st.r))),st}return ot.radius=function(st){return arguments.length?(et=optional(st),ot):et},ot.size=function(st){return arguments.length?(tt=+st[0],nt=+st[1],ot):[tt,nt]},ot.padding=function(st){return arguments.length?(rt=typeof st=="function"?st:constant$1(+st),ot):rt},ot}function radiusLeaf(et){return function(tt){tt.children||(tt.r=Math.max(0,+et(tt)||0))}}function packChildrenRandom(et,tt,nt){return function(rt){if(ot=rt.children){var ot,st,ut=ot.length,ct=et(rt)*tt||0,ft;if(ct)for(st=0;st<ut;++st)ot[st].r+=ct;if(ft=packSiblingsRandom(ot,nt),ct)for(st=0;st<ut;++st)ot[st].r-=ct;rt.r=ft+ct}}}function translateChild(et){return function(tt){var nt=tt.parent;tt.r*=et,nt&&(tt.x=nt.x+et*tt.x,tt.y=nt.y+et*tt.y)}}function roundNode(et){et.x0=Math.round(et.x0),et.y0=Math.round(et.y0),et.x1=Math.round(et.x1),et.y1=Math.round(et.y1)}function treemapDice(et,tt,nt,rt,ot){for(var st=et.children,ut,ct=-1,ft=st.length,pt=et.value&&(rt-tt)/et.value;++ct<ft;)ut=st[ct],ut.y0=nt,ut.y1=ot,ut.x0=tt,ut.x1=tt+=ut.value*pt}function partition$1(){var et=1,tt=1,nt=0,rt=!1;function ot(ut){var ct=ut.height+1;return ut.x0=ut.y0=nt,ut.x1=et,ut.y1=tt/ct,ut.eachBefore(st(tt,ct)),rt&&ut.eachBefore(roundNode),ut}function st(ut,ct){return function(ft){ft.children&&treemapDice(ft,ft.x0,ut*(ft.depth+1)/ct,ft.x1,ut*(ft.depth+2)/ct);var pt=ft.x0,ht=ft.y0,mt=ft.x1-nt,yt=ft.y1-nt;mt<pt&&(pt=mt=(pt+mt)/2),yt<ht&&(ht=yt=(ht+yt)/2),ft.x0=pt,ft.y0=ht,ft.x1=mt,ft.y1=yt}}return ot.round=function(ut){return arguments.length?(rt=!!ut,ot):rt},ot.size=function(ut){return arguments.length?(et=+ut[0],tt=+ut[1],ot):[et,tt]},ot.padding=function(ut){return arguments.length?(nt=+ut,ot):nt},ot}var preroot={depth:-1},ambiguous={},imputed={};function defaultId(et){return et.id}function defaultParentId(et){return et.parentId}function stratify(){var et=defaultId,tt=defaultParentId,nt;function rt(ot){var st=Array.from(ot),ut=et,ct=tt,ft,pt,ht,mt,yt,vt,Tt,Et,xt=new Map;if(nt!=null){const At=st.map((Ot,Rt)=>normalize$1(nt(Ot,Rt,ot))),Ct=At.map(parentof),$t=new Set(At).add("");for(const Ot of Ct)$t.has(Ot)||($t.add(Ot),At.push(Ot),Ct.push(parentof(Ot)),st.push(imputed));ut=(Ot,Rt)=>At[Rt],ct=(Ot,Rt)=>Ct[Rt]}for(ht=0,ft=st.length;ht<ft;++ht)pt=st[ht],vt=st[ht]=new Node$3(pt),(Tt=ut(pt,ht,ot))!=null&&(Tt+="")&&(Et=vt.id=Tt,xt.set(Et,xt.has(Et)?ambiguous:vt)),(Tt=ct(pt,ht,ot))!=null&&(Tt+="")&&(vt.parent=Tt);for(ht=0;ht<ft;++ht)if(vt=st[ht],Tt=vt.parent){if(yt=xt.get(Tt),!yt)throw new Error("missing: "+Tt);if(yt===ambiguous)throw new Error("ambiguous: "+Tt);yt.children?yt.children.push(vt):yt.children=[vt],vt.parent=yt}else{if(mt)throw new Error("multiple roots");mt=vt}if(!mt)throw new Error("no root");if(nt!=null){for(;mt.data===imputed&&mt.children.length===1;)mt=mt.children[0],--ft;for(let At=st.length-1;At>=0&&(vt=st[At],vt.data===imputed);--At)vt.data=null}if(mt.parent=preroot,mt.eachBefore(function(At){At.depth=At.parent.depth+1,--ft}).eachBefore(computeHeight),mt.parent=null,ft>0)throw new Error("cycle");return mt}return rt.id=function(ot){return arguments.length?(et=optional(ot),rt):et},rt.parentId=function(ot){return arguments.length?(tt=optional(ot),rt):tt},rt.path=function(ot){return arguments.length?(nt=optional(ot),rt):nt},rt}function normalize$1(et){et=`${et}`;let tt=et.length;return slash(et,tt-1)&&!slash(et,tt-2)&&(et=et.slice(0,-1)),et[0]==="/"?et:`/${et}`}function parentof(et){let tt=et.length;if(tt<2)return"";for(;--tt>1&&!slash(et,tt););return et.slice(0,tt)}function slash(et,tt){if(et[tt]==="/"){let nt=0;for(;tt>0&&et[--tt]==="\\";)++nt;if((nt&1)===0)return!0}return!1}function defaultSeparation$1(et,tt){return et.parent===tt.parent?1:2}function nextLeft(et){var tt=et.children;return tt?tt[0]:et.t}function nextRight(et){var tt=et.children;return tt?tt[tt.length-1]:et.t}function moveSubtree(et,tt,nt){var rt=nt/(tt.i-et.i);tt.c-=rt,tt.s+=nt,et.c+=rt,tt.z+=nt,tt.m+=nt}function executeShifts(et){for(var tt=0,nt=0,rt=et.children,ot=rt.length,st;--ot>=0;)st=rt[ot],st.z+=tt,st.m+=tt,tt+=st.s+(nt+=st.c)}function nextAncestor(et,tt,nt){return et.a.parent===tt.parent?et.a:nt}function TreeNode(et,tt){this._=et,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=tt}TreeNode.prototype=Object.create(Node$3.prototype);function treeRoot(et){for(var tt=new TreeNode(et,0),nt,rt=[tt],ot,st,ut,ct;nt=rt.pop();)if(st=nt._.children)for(nt.children=new Array(ct=st.length),ut=ct-1;ut>=0;--ut)rt.push(ot=nt.children[ut]=new TreeNode(st[ut],ut)),ot.parent=nt;return(tt.parent=new TreeNode(null,0)).children=[tt],tt}function tree$1(){var et=defaultSeparation$1,tt=1,nt=1,rt=null;function ot(pt){var ht=treeRoot(pt);if(ht.eachAfter(st),ht.parent.m=-ht.z,ht.eachBefore(ut),rt)pt.eachBefore(ft);else{var mt=pt,yt=pt,vt=pt;pt.eachBefore(function(Ct){Ct.x<mt.x&&(mt=Ct),Ct.x>yt.x&&(yt=Ct),Ct.depth>vt.depth&&(vt=Ct)});var Tt=mt===yt?1:et(mt,yt)/2,Et=Tt-mt.x,xt=tt/(yt.x+Tt+Et),At=nt/(vt.depth||1);pt.eachBefore(function(Ct){Ct.x=(Ct.x+Et)*xt,Ct.y=Ct.depth*At})}return pt}function st(pt){var ht=pt.children,mt=pt.parent.children,yt=pt.i?mt[pt.i-1]:null;if(ht){executeShifts(pt);var vt=(ht[0].z+ht[ht.length-1].z)/2;yt?(pt.z=yt.z+et(pt._,yt._),pt.m=pt.z-vt):pt.z=vt}else yt&&(pt.z=yt.z+et(pt._,yt._));pt.parent.A=ct(pt,yt,pt.parent.A||mt[0])}function ut(pt){pt._.x=pt.z+pt.parent.m,pt.m+=pt.parent.m}function ct(pt,ht,mt){if(ht){for(var yt=pt,vt=pt,Tt=ht,Et=yt.parent.children[0],xt=yt.m,At=vt.m,Ct=Tt.m,$t=Et.m,Ot;Tt=nextRight(Tt),yt=nextLeft(yt),Tt&&yt;)Et=nextLeft(Et),vt=nextRight(vt),vt.a=pt,Ot=Tt.z+Ct-yt.z-xt+et(Tt._,yt._),Ot>0&&(moveSubtree(nextAncestor(Tt,pt,mt),pt,Ot),xt+=Ot,At+=Ot),Ct+=Tt.m,xt+=yt.m,$t+=Et.m,At+=vt.m;Tt&&!nextRight(vt)&&(vt.t=Tt,vt.m+=Ct-At),yt&&!nextLeft(Et)&&(Et.t=yt,Et.m+=xt-$t,mt=pt)}return mt}function ft(pt){pt.x*=tt,pt.y=pt.depth*nt}return ot.separation=function(pt){return arguments.length?(et=pt,ot):et},ot.size=function(pt){return arguments.length?(rt=!1,tt=+pt[0],nt=+pt[1],ot):rt?null:[tt,nt]},ot.nodeSize=function(pt){return arguments.length?(rt=!0,tt=+pt[0],nt=+pt[1],ot):rt?[tt,nt]:null},ot}function treemapSlice(et,tt,nt,rt,ot){for(var st=et.children,ut,ct=-1,ft=st.length,pt=et.value&&(ot-nt)/et.value;++ct<ft;)ut=st[ct],ut.x0=tt,ut.x1=rt,ut.y0=nt,ut.y1=nt+=ut.value*pt}var phi=(1+Math.sqrt(5))/2;function squarifyRatio(et,tt,nt,rt,ot,st){for(var ut=[],ct=tt.children,ft,pt,ht=0,mt=0,yt=ct.length,vt,Tt,Et=tt.value,xt,At,Ct,$t,Ot,Rt,It;ht<yt;){vt=ot-nt,Tt=st-rt;do xt=ct[mt++].value;while(!xt&&mt<yt);for(At=Ct=xt,Rt=Math.max(Tt/vt,vt/Tt)/(Et*et),It=xt*xt*Rt,Ot=Math.max(Ct/It,It/At);mt<yt;++mt){if(xt+=pt=ct[mt].value,pt<At&&(At=pt),pt>Ct&&(Ct=pt),It=xt*xt*Rt,$t=Math.max(Ct/It,It/At),$t>Ot){xt-=pt;break}Ot=$t}ut.push(ft={value:xt,dice:vt<Tt,children:ct.slice(ht,mt)}),ft.dice?treemapDice(ft,nt,rt,ot,Et?rt+=Tt*xt/Et:st):treemapSlice(ft,nt,rt,Et?nt+=vt*xt/Et:ot,st),Et-=xt,ht=mt}return ut}const treemapSquarify=function et(tt){function nt(rt,ot,st,ut,ct){squarifyRatio(tt,rt,ot,st,ut,ct)}return nt.ratio=function(rt){return et((rt=+rt)>1?rt:1)},nt}(phi);function treemap(){var et=treemapSquarify,tt=!1,nt=1,rt=1,ot=[0],st=constantZero,ut=constantZero,ct=constantZero,ft=constantZero,pt=constantZero;function ht(yt){return yt.x0=yt.y0=0,yt.x1=nt,yt.y1=rt,yt.eachBefore(mt),ot=[0],tt&&yt.eachBefore(roundNode),yt}function mt(yt){var vt=ot[yt.depth],Tt=yt.x0+vt,Et=yt.y0+vt,xt=yt.x1-vt,At=yt.y1-vt;xt<Tt&&(Tt=xt=(Tt+xt)/2),At<Et&&(Et=At=(Et+At)/2),yt.x0=Tt,yt.y0=Et,yt.x1=xt,yt.y1=At,yt.children&&(vt=ot[yt.depth+1]=st(yt)/2,Tt+=pt(yt)-vt,Et+=ut(yt)-vt,xt-=ct(yt)-vt,At-=ft(yt)-vt,xt<Tt&&(Tt=xt=(Tt+xt)/2),At<Et&&(Et=At=(Et+At)/2),et(yt,Tt,Et,xt,At))}return ht.round=function(yt){return arguments.length?(tt=!!yt,ht):tt},ht.size=function(yt){return arguments.length?(nt=+yt[0],rt=+yt[1],ht):[nt,rt]},ht.tile=function(yt){return arguments.length?(et=required(yt),ht):et},ht.padding=function(yt){return arguments.length?ht.paddingInner(yt).paddingOuter(yt):ht.paddingInner()},ht.paddingInner=function(yt){return arguments.length?(st=typeof yt=="function"?yt:constant$1(+yt),ht):st},ht.paddingOuter=function(yt){return arguments.length?ht.paddingTop(yt).paddingRight(yt).paddingBottom(yt).paddingLeft(yt):ht.paddingTop()},ht.paddingTop=function(yt){return arguments.length?(ut=typeof yt=="function"?yt:constant$1(+yt),ht):ut},ht.paddingRight=function(yt){return arguments.length?(ct=typeof yt=="function"?yt:constant$1(+yt),ht):ct},ht.paddingBottom=function(yt){return arguments.length?(ft=typeof yt=="function"?yt:constant$1(+yt),ht):ft},ht.paddingLeft=function(yt){return arguments.length?(pt=typeof yt=="function"?yt:constant$1(+yt),ht):pt},ht}function treemapBinary(et,tt,nt,rt,ot){var st=et.children,ut,ct=st.length,ft,pt=new Array(ct+1);for(pt[0]=ft=ut=0;ut<ct;++ut)pt[ut+1]=ft+=st[ut].value;ht(0,ct,et.value,tt,nt,rt,ot);function ht(mt,yt,vt,Tt,Et,xt,At){if(mt>=yt-1){var Ct=st[mt];Ct.x0=Tt,Ct.y0=Et,Ct.x1=xt,Ct.y1=At;return}for(var $t=pt[mt],Ot=vt/2+$t,Rt=mt+1,It=yt-1;Rt<It;){var kt=Rt+It>>>1;pt[kt]<Ot?Rt=kt+1:It=kt}Ot-pt[Rt-1]<pt[Rt]-Ot&&mt+1<Rt&&--Rt;var Mt=pt[Rt]-$t,Ft=vt-Mt;if(xt-Tt>At-Et){var zt=vt?(Tt*Ft+xt*Mt)/vt:xt;ht(mt,Rt,Mt,Tt,Et,zt,At),ht(Rt,yt,Ft,zt,Et,xt,At)}else{var Vt=vt?(Et*Ft+At*Mt)/vt:At;ht(mt,Rt,Mt,Tt,Et,xt,Vt),ht(Rt,yt,Ft,Tt,Vt,xt,At)}}}function treemapSliceDice(et,tt,nt,rt,ot){(et.depth&1?treemapSlice:treemapDice)(et,tt,nt,rt,ot)}const treemapResquarify=function et(tt){function nt(rt,ot,st,ut,ct){if((ft=rt._squarify)&&ft.ratio===tt)for(var ft,pt,ht,mt,yt=-1,vt,Tt=ft.length,Et=rt.value;++yt<Tt;){for(pt=ft[yt],ht=pt.children,mt=pt.value=0,vt=ht.length;mt<vt;++mt)pt.value+=ht[mt].value;pt.dice?treemapDice(pt,ot,st,ut,Et?st+=(ct-st)*pt.value/Et:ct):treemapSlice(pt,ot,st,Et?ot+=(ut-ot)*pt.value/Et:ut,ct),Et-=pt.value}else rt._squarify=ft=squarifyRatio(tt,rt,ot,st,ut,ct),ft.ratio=tt}return nt.ratio=function(rt){return et((rt=+rt)>1?rt:1)},nt}(phi);function lookup$2(et,tt,nt){const rt={};return et.each(ot=>{const st=ot.data;nt(st)&&(rt[tt(st)]=ot)}),et.lookup=rt,et}function Nest(et){Transform.call(this,null,et)}Nest.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const children$2=et=>et.values;inherits(Nest,Transform,{transform(et,tt){tt.source||error("Nest transform requires an upstream data source.");var nt=et.generate,rt=et.modified(),ot=tt.clone(),st=this.value;return(!st||rt||tt.changed())&&(st&&st.each(ut=>{ut.children&&isTuple(ut.data)&&ot.rem.push(ut.data)}),this.value=st=hierarchy({values:array$5(et.keys).reduce((ut,ct)=>(ut.key(ct),ut),nest()).entries(ot.source)},children$2),nt&&st.each(ut=>{ut.children&&(ut=ingest$1(ut.data),ot.add.push(ut),ot.source.push(ut))}),lookup$2(st,tupleid,tupleid)),ot.source.root=st,ot}});function nest(){const et=[],tt={entries:ot=>rt(nt(ot,0),0),key:ot=>(et.push(ot),tt)};function nt(ot,st){if(st>=et.length)return ot;const ut=ot.length,ct=et[st++],ft={},pt={};let ht=-1,mt,yt,vt;for(;++ht<ut;)mt=ct(yt=ot[ht])+"",(vt=ft[mt])?vt.push(yt):ft[mt]=[yt];for(mt in ft)pt[mt]=nt(ft[mt],st);return pt}function rt(ot,st){if(++st>et.length)return ot;const ut=[];for(const ct in ot)ut.push({key:ct,values:rt(ot[ct],st)});return ut}return tt}function HierarchyLayout(et){Transform.call(this,null,et)}const defaultSeparation=(et,tt)=>et.parent===tt.parent?1:2;inherits(HierarchyLayout,Transform,{transform(et,tt){(!tt.source||!tt.source.root)&&error(this.constructor.name+" transform requires a backing tree data source.");const nt=this.layout(et.method),rt=this.fields,ot=tt.source.root,st=et.as||rt;et.field?ot.sum(et.field):ot.count(),et.sort&&ot.sort(stableCompare(et.sort,ut=>ut.data)),setParams(nt,this.params,et),nt.separation&&nt.separation(et.separation!==!1?defaultSeparation:one$2);try{this.value=nt(ot)}catch(ut){error(ut)}return ot.each(ut=>setFields(ut,rt,st)),tt.reflow(et.modified()).modifies(st).modifies("leaf")}});function setParams(et,tt,nt){for(let rt,ot=0,st=tt.length;ot<st;++ot)rt=tt[ot],rt in nt&&et[rt](nt[rt])}function setFields(et,tt,nt){const rt=et.data,ot=tt.length-1;for(let st=0;st<ot;++st)rt[nt[st]]=et[tt[st]];rt[nt[ot]]=et.children?et.children.length:0}const Output$3=["x","y","r","depth","children"];function Pack(et){HierarchyLayout.call(this,et)}Pack.Definition={type:"Pack",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"radius",type:"field",default:null},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:Output$3.length,default:Output$3}]};inherits(Pack,HierarchyLayout,{layout:pack,params:["radius","size","padding"],fields:Output$3});const Output$2=["x0","y0","x1","y1","depth","children"];function Partition(et){HierarchyLayout.call(this,et)}Partition.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:Output$2.length,default:Output$2}]};inherits(Partition,HierarchyLayout,{layout:partition$1,params:["size","round","padding"],fields:Output$2});function Stratify(et){Transform.call(this,null,et)}Stratify.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]};inherits(Stratify,Transform,{transform(et,tt){tt.source||error("Stratify transform requires an upstream data source.");let nt=this.value;const rt=et.modified(),ot=tt.fork(tt.ALL).materialize(tt.SOURCE),st=!nt||rt||tt.changed(tt.ADD_REM)||tt.modified(et.key.fields)||tt.modified(et.parentKey.fields);return ot.source=ot.source.slice(),st&&(nt=ot.source.length?lookup$2(stratify().id(et.key).parentId(et.parentKey)(ot.source),et.key,truthy):lookup$2(stratify()([{}]),et.key,et.key)),ot.source.root=this.value=nt,ot}});const Layouts={tidy:tree$1,cluster},Output$1$1=["x","y","depth","children"];function Tree(et){HierarchyLayout.call(this,et)}Tree.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:Output$1$1.length,default:Output$1$1}]};inherits(Tree,HierarchyLayout,{layout(et){const tt=et||"tidy";if(has$1(Layouts,tt))return Layouts[tt]();error("Unrecognized Tree layout method: "+tt)},params:["size","nodeSize"],fields:Output$1$1});function TreeLinks(et){Transform.call(this,[],et)}TreeLinks.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]};inherits(TreeLinks,Transform,{transform(et,tt){const nt=this.value,rt=tt.source&&tt.source.root,ot=tt.fork(tt.NO_SOURCE),st={};return rt||error("TreeLinks transform requires a tree data source."),tt.changed(tt.ADD_REM)?(ot.rem=nt,tt.visit(tt.SOURCE,ut=>st[tupleid(ut)]=1),rt.each(ut=>{const ct=ut.data,ft=ut.parent&&ut.parent.data;ft&&st[tupleid(ct)]&&st[tupleid(ft)]&&ot.add.push(ingest$1({source:ft,target:ct}))}),this.value=ot.add):tt.changed(tt.MOD)&&(tt.visit(tt.MOD,ut=>st[tupleid(ut)]=1),nt.forEach(ut=>{(st[tupleid(ut.source)]||st[tupleid(ut.target)])&&ot.mod.push(ut)})),ot}});const Tiles={binary:treemapBinary,dice:treemapDice,slice:treemapSlice,slicedice:treemapSliceDice,squarify:treemapSquarify,resquarify:treemapResquarify},Output$4=["x0","y0","x1","y1","depth","children"];function Treemap(et){HierarchyLayout.call(this,et)}Treemap.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:Output$4.length,default:Output$4}]};inherits(Treemap,HierarchyLayout,{layout(){const et=treemap();return et.ratio=tt=>{const nt=et.tile();nt.ratio&&et.tile(nt.ratio(tt))},et.method=tt=>{has$1(Tiles,tt)?et.tile(Tiles[tt]):error("Unrecognized Treemap layout method: "+tt)},et},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:Output$4});const tree=Object.freeze(Object.defineProperty({__proto__:null,nest:Nest,pack:Pack,partition:Partition,stratify:Stratify,tree:Tree,treelinks:TreeLinks,treemap:Treemap},Symbol.toStringTag,{value:"Module"})),ALPHA_MASK=4278190080;function baseBitmaps(et,tt){const nt=et.bitmap();return(tt||[]).forEach(rt=>nt.set(et(rt.boundary[0]),et(rt.boundary[3]))),[nt,void 0]}function markBitmaps(et,tt,nt,rt,ot){const st=et.width,ut=et.height,ct=rt||ot,ft=domCanvas(st,ut).getContext("2d"),pt=domCanvas(st,ut).getContext("2d"),ht=ct&&domCanvas(st,ut).getContext("2d");nt.forEach(Mt=>draw(ft,Mt,!1)),draw(pt,tt,!1),ct&&draw(ht,tt,!0);const mt=getBuffer(ft,st,ut),yt=getBuffer(pt,st,ut),vt=ct&&getBuffer(ht,st,ut),Tt=et.bitmap(),Et=ct&&et.bitmap();let xt,At,Ct,$t,Ot,Rt,It,kt;for(At=0;At<ut;++At)for(xt=0;xt<st;++xt)Ot=At*st+xt,Rt=mt[Ot]&ALPHA_MASK,kt=yt[Ot]&ALPHA_MASK,It=ct&&vt[Ot]&ALPHA_MASK,(Rt||It||kt)&&(Ct=et(xt),$t=et(At),!ot&&(Rt||kt)&&Tt.set(Ct,$t),ct&&(Rt||It)&&Et.set(Ct,$t));return[Tt,Et]}function getBuffer(et,tt,nt){return new Uint32Array(et.getImageData(0,0,tt,nt).data.buffer)}function draw(et,tt,nt){if(!tt.length)return;const rt=tt[0].mark.marktype;rt==="group"?tt.forEach(ot=>{ot.items.forEach(st=>draw(et,st.items,nt))}):Marks[rt].draw(et,{items:nt?tt.map(prepare$1):tt})}function prepare$1(et){const tt=rederive(et,{});return tt.stroke&&tt.strokeOpacity!==0||tt.fill&&tt.fillOpacity!==0?{...tt,strokeOpacity:1,stroke:"#000",fillOpacity:0}:tt}const DIV=5,MOD=31,SIZE$2=32,RIGHT0=new Uint32Array(SIZE$2+1),RIGHT1=new Uint32Array(SIZE$2+1);RIGHT1[0]=0;RIGHT0[0]=~RIGHT1[0];for(let et=1;et<=SIZE$2;++et)RIGHT1[et]=RIGHT1[et-1]<<1|1,RIGHT0[et]=~RIGHT1[et];function Bitmap(et,tt){const nt=new Uint32Array(~~((et*tt+SIZE$2)/SIZE$2));function rt(st,ut){nt[st]|=ut}function ot(st,ut){nt[st]&=ut}return{array:nt,get:(st,ut)=>{const ct=ut*et+st;return nt[ct>>>DIV]&1<<(ct&MOD)},set:(st,ut)=>{const ct=ut*et+st;rt(ct>>>DIV,1<<(ct&MOD))},clear:(st,ut)=>{const ct=ut*et+st;ot(ct>>>DIV,~(1<<(ct&MOD)))},getRange:(st,ut,ct,ft)=>{let pt=ft,ht,mt,yt,vt;for(;pt>=ut;--pt)if(ht=pt*et+st,mt=pt*et+ct,yt=ht>>>DIV,vt=mt>>>DIV,yt===vt){if(nt[yt]&RIGHT0[ht&MOD]&RIGHT1[(mt&MOD)+1])return!0}else{if(nt[yt]&RIGHT0[ht&MOD]||nt[vt]&RIGHT1[(mt&MOD)+1])return!0;for(let Tt=yt+1;Tt<vt;++Tt)if(nt[Tt])return!0}return!1},setRange:(st,ut,ct,ft)=>{let pt,ht,mt,yt,vt;for(;ut<=ft;++ut)if(pt=ut*et+st,ht=ut*et+ct,mt=pt>>>DIV,yt=ht>>>DIV,mt===yt)rt(mt,RIGHT0[pt&MOD]&RIGHT1[(ht&MOD)+1]);else for(rt(mt,RIGHT0[pt&MOD]),rt(yt,RIGHT1[(ht&MOD)+1]),vt=mt+1;vt<yt;++vt)rt(vt,4294967295)},clearRange:(st,ut,ct,ft)=>{let pt,ht,mt,yt,vt;for(;ut<=ft;++ut)if(pt=ut*et+st,ht=ut*et+ct,mt=pt>>>DIV,yt=ht>>>DIV,mt===yt)ot(mt,RIGHT1[pt&MOD]|RIGHT0[(ht&MOD)+1]);else for(ot(mt,RIGHT1[pt&MOD]),ot(yt,RIGHT0[(ht&MOD)+1]),vt=mt+1;vt<yt;++vt)ot(vt,0)},outOfBounds:(st,ut,ct,ft)=>st<0||ut<0||ft>=tt||ct>=et}}function scaler(et,tt,nt){const rt=Math.max(1,Math.sqrt(et*tt/1e6)),ot=~~((et+2*nt+rt)/rt),st=~~((tt+2*nt+rt)/rt),ut=ct=>~~((ct+nt)/rt);return ut.invert=ct=>ct*rt-nt,ut.bitmap=()=>Bitmap(ot,st),ut.ratio=rt,ut.padding=nt,ut.width=et,ut.height=tt,ut}function placeAreaLabelNaive(et,tt,nt,rt){const ot=et.width,st=et.height;return function(ut){const ct=ut.datum.datum.items[rt].items,ft=ct.length,pt=ut.datum.fontSize,ht=textMetrics.width(ut.datum,ut.datum.text);let mt=0,yt,vt,Tt,Et,xt,At,Ct;for(let $t=0;$t<ft;++$t)yt=ct[$t].x,Tt=ct[$t].y,vt=ct[$t].x2===void 0?yt:ct[$t].x2,Et=ct[$t].y2===void 0?Tt:ct[$t].y2,xt=(yt+vt)/2,At=(Tt+Et)/2,Ct=Math.abs(vt-yt+Et-Tt),Ct>=mt&&(mt=Ct,ut.x=xt,ut.y=At);return xt=ht/2,At=pt/2,yt=ut.x-xt,vt=ut.x+xt,Tt=ut.y-At,Et=ut.y+At,ut.align="center",yt<0&&vt<=ot?ut.align="left":0<=yt&&ot<vt&&(ut.align="right"),ut.baseline="middle",Tt<0&&Et<=st?ut.baseline="top":0<=Tt&&st<Et&&(ut.baseline="bottom"),!0}}function outOfBounds(et,tt,nt,rt,ot,st){let ut=nt/2;return et-ut<0||et+ut>ot||tt-(ut=rt/2)<0||tt+ut>st}function collision(et,tt,nt,rt,ot,st,ut,ct){const ft=ot*st/(rt*2),pt=et(tt-ft),ht=et(tt+ft),mt=et(nt-(st=st/2)),yt=et(nt+st);return ut.outOfBounds(pt,mt,ht,yt)||ut.getRange(pt,mt,ht,yt)||ct&&ct.getRange(pt,mt,ht,yt)}function placeAreaLabelReducedSearch(et,tt,nt,rt){const ot=et.width,st=et.height,ut=tt[0],ct=tt[1];function ft(pt,ht,mt,yt,vt){const Tt=et.invert(pt),Et=et.invert(ht);let xt=mt,At=st,Ct;if(!outOfBounds(Tt,Et,yt,vt,ot,st)&&!collision(et,Tt,Et,vt,yt,xt,ut,ct)&&!collision(et,Tt,Et,vt,yt,vt,ut,null)){for(;At-xt>=1;)Ct=(xt+At)/2,collision(et,Tt,Et,vt,yt,Ct,ut,ct)?At=Ct:xt=Ct;if(xt>mt)return[Tt,Et,xt,!0]}}return function(pt){const ht=pt.datum.datum.items[rt].items,mt=ht.length,yt=pt.datum.fontSize,vt=textMetrics.width(pt.datum,pt.datum.text);let Tt=nt?yt:0,Et=!1,xt=!1,At=0,Ct,$t,Ot,Rt,It,kt,Mt,Ft,zt,Vt,Zt,Ut,Xt,Jt,gn,An,sn;for(let Sn=0;Sn<mt;++Sn){for(Ct=ht[Sn].x,Ot=ht[Sn].y,$t=ht[Sn].x2===void 0?Ct:ht[Sn].x2,Rt=ht[Sn].y2===void 0?Ot:ht[Sn].y2,Ct>$t&&(sn=Ct,Ct=$t,$t=sn),Ot>Rt&&(sn=Ot,Ot=Rt,Rt=sn),zt=et(Ct),Zt=et($t),Vt=~~((zt+Zt)/2),Ut=et(Ot),Jt=et(Rt),Xt=~~((Ut+Jt)/2),Mt=Vt;Mt>=zt;--Mt)for(Ft=Xt;Ft>=Ut;--Ft)An=ft(Mt,Ft,Tt,vt,yt),An&&([pt.x,pt.y,Tt,Et]=An);for(Mt=Vt;Mt<=Zt;++Mt)for(Ft=Xt;Ft<=Jt;++Ft)An=ft(Mt,Ft,Tt,vt,yt),An&&([pt.x,pt.y,Tt,Et]=An);!Et&&!nt&&(gn=Math.abs($t-Ct+Rt-Ot),It=(Ct+$t)/2,kt=(Ot+Rt)/2,gn>=At&&!outOfBounds(It,kt,vt,yt,ot,st)&&!collision(et,It,kt,yt,vt,yt,ut,null)&&(At=gn,pt.x=It,pt.y=kt,xt=!0))}return Et||xt?(It=vt/2,kt=yt/2,ut.setRange(et(pt.x-It),et(pt.y-kt),et(pt.x+It),et(pt.y+kt)),pt.align="center",pt.baseline="middle",!0):!1}}const X_DIR=[-1,-1,1,1],Y_DIR=[-1,1,-1,1];function placeAreaLabelFloodFill(et,tt,nt,rt){const ot=et.width,st=et.height,ut=tt[0],ct=tt[1],ft=et.bitmap();return function(pt){const ht=pt.datum.datum.items[rt].items,mt=ht.length,yt=pt.datum.fontSize,vt=textMetrics.width(pt.datum,pt.datum.text),Tt=[];let Et=nt?yt:0,xt=!1,At=!1,Ct=0,$t,Ot,Rt,It,kt,Mt,Ft,zt,Vt,Zt,Ut,Xt;for(let Jt=0;Jt<mt;++Jt){for($t=ht[Jt].x,Rt=ht[Jt].y,Ot=ht[Jt].x2===void 0?$t:ht[Jt].x2,It=ht[Jt].y2===void 0?Rt:ht[Jt].y2,Tt.push([et(($t+Ot)/2),et((Rt+It)/2)]);Tt.length;)if([Ft,zt]=Tt.pop(),!(ut.get(Ft,zt)||ct.get(Ft,zt)||ft.get(Ft,zt))){ft.set(Ft,zt);for(let gn=0;gn<4;++gn)kt=Ft+X_DIR[gn],Mt=zt+Y_DIR[gn],ft.outOfBounds(kt,Mt,kt,Mt)||Tt.push([kt,Mt]);if(kt=et.invert(Ft),Mt=et.invert(zt),Vt=Et,Zt=st,!outOfBounds(kt,Mt,vt,yt,ot,st)&&!collision(et,kt,Mt,yt,vt,Vt,ut,ct)&&!collision(et,kt,Mt,yt,vt,yt,ut,null)){for(;Zt-Vt>=1;)Ut=(Vt+Zt)/2,collision(et,kt,Mt,yt,vt,Ut,ut,ct)?Zt=Ut:Vt=Ut;Vt>Et&&(pt.x=kt,pt.y=Mt,Et=Vt,xt=!0)}}!xt&&!nt&&(Xt=Math.abs(Ot-$t+It-Rt),kt=($t+Ot)/2,Mt=(Rt+It)/2,Xt>=Ct&&!outOfBounds(kt,Mt,vt,yt,ot,st)&&!collision(et,kt,Mt,yt,vt,yt,ut,null)&&(Ct=Xt,pt.x=kt,pt.y=Mt,At=!0))}return xt||At?(kt=vt/2,Mt=yt/2,ut.setRange(et(pt.x-kt),et(pt.y-Mt),et(pt.x+kt),et(pt.y+Mt)),pt.align="center",pt.baseline="middle",!0):!1}}const Aligns=["right","center","left"],Baselines=["bottom","middle","top"];function placeMarkLabel(et,tt,nt,rt){const ot=et.width,st=et.height,ut=tt[0],ct=tt[1],ft=rt.length;return function(pt){const ht=pt.boundary,mt=pt.datum.fontSize;if(ht[2]<0||ht[5]<0||ht[0]>ot||ht[3]>st)return!1;let yt=pt.textWidth??0,vt,Tt,Et,xt,At,Ct,$t,Ot,Rt,It,kt,Mt,Ft,zt,Vt;for(let Zt=0;Zt<ft;++Zt){if(vt=(nt[Zt]&3)-1,Tt=(nt[Zt]>>>2&3)-1,Et=vt===0&&Tt===0||rt[Zt]<0,xt=vt&&Tt?Math.SQRT1_2:1,At=rt[Zt]<0?-1:1,Ct=ht[1+vt]+rt[Zt]*vt*xt,kt=ht[4+Tt]+At*mt*Tt/2+rt[Zt]*Tt*xt,Ot=kt-mt/2,Rt=kt+mt/2,Mt=et(Ct),zt=et(Ot),Vt=et(Rt),!yt)if(test(Mt,Mt,zt,Vt,ut,ct,Ct,Ct,Ot,Rt,ht,Et))yt=textMetrics.width(pt.datum,pt.datum.text);else continue;if(It=Ct+At*yt*vt/2,Ct=It-yt/2,$t=It+yt/2,Mt=et(Ct),Ft=et($t),test(Mt,Ft,zt,Vt,ut,ct,Ct,$t,Ot,Rt,ht,Et))return pt.x=vt?vt*At<0?$t:Ct:It,pt.y=Tt?Tt*At<0?Rt:Ot:kt,pt.align=Aligns[vt*At+1],pt.baseline=Baselines[Tt*At+1],ut.setRange(Mt,zt,Ft,Vt),!0}return!1}}function test(et,tt,nt,rt,ot,st,ut,ct,ft,pt,ht,mt){return!(ot.outOfBounds(et,nt,tt,rt)||(mt&&st||ot).getRange(et,nt,tt,rt))}const TOP=0,MIDDLE=4,BOTTOM=8,LEFT=0,CENTER=1,RIGHT=2,anchorCode={"top-left":TOP+LEFT,top:TOP+CENTER,"top-right":TOP+RIGHT,left:MIDDLE+LEFT,middle:MIDDLE+CENTER,right:MIDDLE+RIGHT,"bottom-left":BOTTOM+LEFT,bottom:BOTTOM+CENTER,"bottom-right":BOTTOM+RIGHT},placeAreaLabel={naive:placeAreaLabelNaive,"reduced-search":placeAreaLabelReducedSearch,floodfill:placeAreaLabelFloodFill};function labelLayout(et,tt,nt,rt,ot,st,ut,ct,ft,pt,ht){if(!et.length)return et;const mt=Math.max(rt.length,ot.length),yt=getOffsets(rt,mt),vt=getAnchors(ot,mt),Tt=markType(et[0].datum),Et=Tt==="group"&&et[0].datum.items[ft].marktype,xt=Et==="area",At=markBoundary(Tt,Et,ct,ft),Ct=pt===null||pt===1/0,$t=xt&&ht==="naive";let Ot=-1,Rt=-1;const It=et.map(zt=>{const Vt=Ct?textMetrics.width(zt,zt.text):void 0;return Ot=Math.max(Ot,Vt),Rt=Math.max(Rt,zt.fontSize),{datum:zt,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:At(zt),textWidth:Vt}});pt=pt===null||pt===1/0?Math.max(Ot,Rt)+Math.max(...rt):pt;const kt=scaler(tt[0],tt[1],pt);let Mt;if(!$t){nt&&It.sort((Zt,Ut)=>nt(Zt.datum,Ut.datum));let zt=!1;for(let Zt=0;Zt<vt.length&&!zt;++Zt)zt=vt[Zt]===5||yt[Zt]<0;const Vt=(Tt&&ut||xt)&&et.map(Zt=>Zt.datum);Mt=st.length||Vt?markBitmaps(kt,Vt||[],st,zt,xt):baseBitmaps(kt,ut&&It)}const Ft=xt?placeAreaLabel[ht](kt,Mt,ut,ft):placeMarkLabel(kt,Mt,vt,yt);return It.forEach(zt=>zt.opacity=+Ft(zt)),It}function getOffsets(et,tt){const nt=new Float64Array(tt),rt=et.length;for(let ot=0;ot<rt;++ot)nt[ot]=et[ot]||0;for(let ot=rt;ot<tt;++ot)nt[ot]=nt[rt-1];return nt}function getAnchors(et,tt){const nt=new Int8Array(tt),rt=et.length;for(let ot=0;ot<rt;++ot)nt[ot]|=anchorCode[et[ot]];for(let ot=rt;ot<tt;++ot)nt[ot]=nt[rt-1];return nt}function markType(et){return et&&et.mark&&et.mark.marktype}function markBoundary(et,tt,nt,rt){const ot=st=>[st.x,st.x,st.x,st.y,st.y,st.y];return et?et==="line"||et==="area"?st=>ot(st.datum):tt==="line"?st=>{const ut=st.datum.items[rt].items;return ot(ut.length?ut[nt==="start"?0:ut.length-1]:{x:NaN,y:NaN})}:st=>{const ut=st.datum.bounds;return[ut.x1,(ut.x1+ut.x2)/2,ut.x2,ut.y1,(ut.y1+ut.y2)/2,ut.y2]}:ot}const Output$1=["x","y","opacity","align","baseline"],Anchors=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function Label$2(et){Transform.call(this,null,et)}Label$2.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:Anchors},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:Output$1.length,default:Output$1}]};inherits(Label$2,Transform,{transform(et,tt){function nt(st){const ut=et[st];return isFunction$3(ut)&&tt.modified(ut.fields)}const rt=et.modified();if(!(rt||tt.changed(tt.ADD_REM)||nt("sort")))return;(!et.size||et.size.length!==2)&&error("Size parameter should be specified as a [width, height] array.");const ot=et.as||Output$1;return labelLayout(tt.materialize(tt.SOURCE).source||[],et.size,et.sort,array$5(et.offset==null?1:et.offset),array$5(et.anchor||Anchors),et.avoidMarks||[],et.avoidBaseMark!==!1,et.lineAnchor||"end",et.markIndex||0,et.padding===void 0?0:et.padding,et.method||"naive").forEach(st=>{const ut=st.datum;ut[ot[0]]=st.x,ut[ot[1]]=st.y,ut[ot[2]]=st.opacity,ut[ot[3]]=st.align,ut[ot[4]]=st.baseline}),tt.reflow(rt).modifies(ot)}});const label=Object.freeze(Object.defineProperty({__proto__:null,label:Label$2},Symbol.toStringTag,{value:"Module"}));function partition(et,tt){var nt=[],rt=function(ht){return ht(ct)},ot,st,ut,ct,ft,pt;if(tt==null)nt.push(et);else for(ot={},st=0,ut=et.length;st<ut;++st)ct=et[st],ft=tt.map(rt),pt=ot[ft],pt||(ot[ft]=pt=[],pt.dims=ft,nt.push(pt)),pt.push(ct);return nt}function Loess(et){Transform.call(this,null,et)}Loess.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]};inherits(Loess,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS);if(!this.value||tt.changed()||et.modified()){const rt=tt.materialize(tt.SOURCE).source,ot=partition(rt,et.groupby),st=(et.groupby||[]).map(accessorName),ut=st.length,ct=et.as||[accessorName(et.x),accessorName(et.y)],ft=[];ot.forEach(pt=>{loess(pt,et.x,et.y,et.bandwidth||.3).forEach(ht=>{const mt={};for(let yt=0;yt<ut;++yt)mt[st[yt]]=pt.dims[yt];mt[ct[0]]=ht[0],mt[ct[1]]=ht[1],ft.push(ingest$1(mt))})}),this.value&&(nt.rem=this.value),this.value=nt.add=nt.source=ft}return nt}});const Methods={constant:constant$5,linear:linear$2,log:log$5,exp:exp$1,pow:pow$3,quad,poly},degreesOfFreedom=(et,tt)=>et==="poly"?tt:et==="quad"?2:1;function Regression(et){Transform.call(this,null,et)}Regression.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(Methods)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]};inherits(Regression,Transform,{transform(et,tt){const nt=tt.fork(tt.NO_SOURCE|tt.NO_FIELDS);if(!this.value||tt.changed()||et.modified()){const rt=tt.materialize(tt.SOURCE).source,ot=partition(rt,et.groupby),st=(et.groupby||[]).map(accessorName),ut=et.method||"linear",ct=et.order==null?3:et.order,ft=degreesOfFreedom(ut,ct),pt=et.as||[accessorName(et.x),accessorName(et.y)],ht=Methods[ut],mt=[];let yt=et.extent;has$1(Methods,ut)||error("Invalid regression method: "+ut),yt!=null&&ut==="log"&&yt[0]<=0&&(tt.dataflow.warn("Ignoring extent with values <= 0 for log regression."),yt=null),ot.forEach(vt=>{if(vt.length<=ft){tt.dataflow.warn("Skipping regression with more parameters than data points.");return}const Et=ht(vt,et.x,et.y,ct);if(et.params){mt.push(ingest$1({keys:vt.dims,coef:Et.coef,rSquared:Et.rSquared}));return}const xt=yt||extent(vt,et.x),At=Ct=>{const $t={};for(let Ot=0;Ot<st.length;++Ot)$t[st[Ot]]=vt.dims[Ot];$t[pt[0]]=Ct[0],$t[pt[1]]=Ct[1],mt.push(ingest$1($t))};ut==="linear"||ut==="constant"?xt.forEach(Ct=>At([Ct,Et.predict(Ct)])):sampleCurve(Et.predict,xt,25,200).forEach(At)}),this.value&&(nt.rem=this.value),this.value=nt.add=nt.source=mt}return nt}});const reg=Object.freeze(Object.defineProperty({__proto__:null,loess:Loess,regression:Regression},Symbol.toStringTag,{value:"Module"})),epsilon$2=11102230246251565e-32,splitter=134217729,resulterrbound=(3+8*epsilon$2)*epsilon$2;function sum(et,tt,nt,rt,ot){let st,ut,ct,ft,pt=tt[0],ht=rt[0],mt=0,yt=0;ht>pt==ht>-pt?(st=pt,pt=tt[++mt]):(st=ht,ht=rt[++yt]);let vt=0;if(mt<et&&yt<nt)for(ht>pt==ht>-pt?(ut=pt+st,ct=st-(ut-pt),pt=tt[++mt]):(ut=ht+st,ct=st-(ut-ht),ht=rt[++yt]),st=ut,ct!==0&&(ot[vt++]=ct);mt<et&&yt<nt;)ht>pt==ht>-pt?(ut=st+pt,ft=ut-st,ct=st-(ut-ft)+(pt-ft),pt=tt[++mt]):(ut=st+ht,ft=ut-st,ct=st-(ut-ft)+(ht-ft),ht=rt[++yt]),st=ut,ct!==0&&(ot[vt++]=ct);for(;mt<et;)ut=st+pt,ft=ut-st,ct=st-(ut-ft)+(pt-ft),pt=tt[++mt],st=ut,ct!==0&&(ot[vt++]=ct);for(;yt<nt;)ut=st+ht,ft=ut-st,ct=st-(ut-ft)+(ht-ft),ht=rt[++yt],st=ut,ct!==0&&(ot[vt++]=ct);return(st!==0||vt===0)&&(ot[vt++]=st),vt}function estimate(et,tt){let nt=tt[0];for(let rt=1;rt<et;rt++)nt+=tt[rt];return nt}function vec(et){return new Float64Array(et)}const ccwerrboundA=(3+16*epsilon$2)*epsilon$2,ccwerrboundB=(2+12*epsilon$2)*epsilon$2,ccwerrboundC=(9+64*epsilon$2)*epsilon$2*epsilon$2,B$1=vec(4),C1=vec(8),C2=vec(12),D$1=vec(16),u$1=vec(4);function orient2dadapt(et,tt,nt,rt,ot,st,ut){let ct,ft,pt,ht,mt,yt,vt,Tt,Et,xt,At,Ct,$t,Ot,Rt,It,kt,Mt;const Ft=et-ot,zt=nt-ot,Vt=tt-st,Zt=rt-st;Ot=Ft*Zt,yt=splitter*Ft,vt=yt-(yt-Ft),Tt=Ft-vt,yt=splitter*Zt,Et=yt-(yt-Zt),xt=Zt-Et,Rt=Tt*xt-(Ot-vt*Et-Tt*Et-vt*xt),It=Vt*zt,yt=splitter*Vt,vt=yt-(yt-Vt),Tt=Vt-vt,yt=splitter*zt,Et=yt-(yt-zt),xt=zt-Et,kt=Tt*xt-(It-vt*Et-Tt*Et-vt*xt),At=Rt-kt,mt=Rt-At,B$1[0]=Rt-(At+mt)+(mt-kt),Ct=Ot+At,mt=Ct-Ot,$t=Ot-(Ct-mt)+(At-mt),At=$t-It,mt=$t-At,B$1[1]=$t-(At+mt)+(mt-It),Mt=Ct+At,mt=Mt-Ct,B$1[2]=Ct-(Mt-mt)+(At-mt),B$1[3]=Mt;let Ut=estimate(4,B$1),Xt=ccwerrboundB*ut;if(Ut>=Xt||-Ut>=Xt||(mt=et-Ft,ct=et-(Ft+mt)+(mt-ot),mt=nt-zt,pt=nt-(zt+mt)+(mt-ot),mt=tt-Vt,ft=tt-(Vt+mt)+(mt-st),mt=rt-Zt,ht=rt-(Zt+mt)+(mt-st),ct===0&&ft===0&&pt===0&&ht===0)||(Xt=ccwerrboundC*ut+resulterrbound*Math.abs(Ut),Ut+=Ft*ht+Zt*ct-(Vt*pt+zt*ft),Ut>=Xt||-Ut>=Xt))return Ut;Ot=ct*Zt,yt=splitter*ct,vt=yt-(yt-ct),Tt=ct-vt,yt=splitter*Zt,Et=yt-(yt-Zt),xt=Zt-Et,Rt=Tt*xt-(Ot-vt*Et-Tt*Et-vt*xt),It=ft*zt,yt=splitter*ft,vt=yt-(yt-ft),Tt=ft-vt,yt=splitter*zt,Et=yt-(yt-zt),xt=zt-Et,kt=Tt*xt-(It-vt*Et-Tt*Et-vt*xt),At=Rt-kt,mt=Rt-At,u$1[0]=Rt-(At+mt)+(mt-kt),Ct=Ot+At,mt=Ct-Ot,$t=Ot-(Ct-mt)+(At-mt),At=$t-It,mt=$t-At,u$1[1]=$t-(At+mt)+(mt-It),Mt=Ct+At,mt=Mt-Ct,u$1[2]=Ct-(Mt-mt)+(At-mt),u$1[3]=Mt;const Jt=sum(4,B$1,4,u$1,C1);Ot=Ft*ht,yt=splitter*Ft,vt=yt-(yt-Ft),Tt=Ft-vt,yt=splitter*ht,Et=yt-(yt-ht),xt=ht-Et,Rt=Tt*xt-(Ot-vt*Et-Tt*Et-vt*xt),It=Vt*pt,yt=splitter*Vt,vt=yt-(yt-Vt),Tt=Vt-vt,yt=splitter*pt,Et=yt-(yt-pt),xt=pt-Et,kt=Tt*xt-(It-vt*Et-Tt*Et-vt*xt),At=Rt-kt,mt=Rt-At,u$1[0]=Rt-(At+mt)+(mt-kt),Ct=Ot+At,mt=Ct-Ot,$t=Ot-(Ct-mt)+(At-mt),At=$t-It,mt=$t-At,u$1[1]=$t-(At+mt)+(mt-It),Mt=Ct+At,mt=Mt-Ct,u$1[2]=Ct-(Mt-mt)+(At-mt),u$1[3]=Mt;const gn=sum(Jt,C1,4,u$1,C2);Ot=ct*ht,yt=splitter*ct,vt=yt-(yt-ct),Tt=ct-vt,yt=splitter*ht,Et=yt-(yt-ht),xt=ht-Et,Rt=Tt*xt-(Ot-vt*Et-Tt*Et-vt*xt),It=ft*pt,yt=splitter*ft,vt=yt-(yt-ft),Tt=ft-vt,yt=splitter*pt,Et=yt-(yt-pt),xt=pt-Et,kt=Tt*xt-(It-vt*Et-Tt*Et-vt*xt),At=Rt-kt,mt=Rt-At,u$1[0]=Rt-(At+mt)+(mt-kt),Ct=Ot+At,mt=Ct-Ot,$t=Ot-(Ct-mt)+(At-mt),At=$t-It,mt=$t-At,u$1[1]=$t-(At+mt)+(mt-It),Mt=Ct+At,mt=Mt-Ct,u$1[2]=Ct-(Mt-mt)+(At-mt),u$1[3]=Mt;const An=sum(gn,C2,4,u$1,D$1);return D$1[An-1]}function orient2d(et,tt,nt,rt,ot,st){const ut=(tt-st)*(nt-ot),ct=(et-ot)*(rt-st),ft=ut-ct,pt=Math.abs(ut+ct);return Math.abs(ft)>=ccwerrboundA*pt?ft:-orient2dadapt(et,tt,nt,rt,ot,st,pt)}const EPSILON=Math.pow(2,-52),EDGE_STACK=new Uint32Array(512);class Delaunator{static from(tt,nt=defaultGetX,rt=defaultGetY){const ot=tt.length,st=new Float64Array(ot*2);for(let ut=0;ut<ot;ut++){const ct=tt[ut];st[2*ut]=nt(ct),st[2*ut+1]=rt(ct)}return new Delaunator(st)}constructor(tt){const nt=tt.length>>1;if(nt>0&&typeof tt[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=tt;const rt=Math.max(2*nt-5,0);this._triangles=new Uint32Array(rt*3),this._halfedges=new Int32Array(rt*3),this._hashSize=Math.ceil(Math.sqrt(nt)),this._hullPrev=new Uint32Array(nt),this._hullNext=new Uint32Array(nt),this._hullTri=new Uint32Array(nt),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(nt),this._dists=new Float64Array(nt),this.update()}update(){const{coords:tt,_hullPrev:nt,_hullNext:rt,_hullTri:ot,_hullHash:st}=this,ut=tt.length>>1;let ct=1/0,ft=1/0,pt=-1/0,ht=-1/0;for(let zt=0;zt<ut;zt++){const Vt=tt[2*zt],Zt=tt[2*zt+1];Vt<ct&&(ct=Vt),Zt<ft&&(ft=Zt),Vt>pt&&(pt=Vt),Zt>ht&&(ht=Zt),this._ids[zt]=zt}const mt=(ct+pt)/2,yt=(ft+ht)/2;let vt=1/0,Tt,Et,xt;for(let zt=0;zt<ut;zt++){const Vt=dist(mt,yt,tt[2*zt],tt[2*zt+1]);Vt<vt&&(Tt=zt,vt=Vt)}const At=tt[2*Tt],Ct=tt[2*Tt+1];vt=1/0;for(let zt=0;zt<ut;zt++){if(zt===Tt)continue;const Vt=dist(At,Ct,tt[2*zt],tt[2*zt+1]);Vt<vt&&Vt>0&&(Et=zt,vt=Vt)}let $t=tt[2*Et],Ot=tt[2*Et+1],Rt=1/0;for(let zt=0;zt<ut;zt++){if(zt===Tt||zt===Et)continue;const Vt=circumradius(At,Ct,$t,Ot,tt[2*zt],tt[2*zt+1]);Vt<Rt&&(xt=zt,Rt=Vt)}let It=tt[2*xt],kt=tt[2*xt+1];if(Rt===1/0){for(let Zt=0;Zt<ut;Zt++)this._dists[Zt]=tt[2*Zt]-tt[0]||tt[2*Zt+1]-tt[1];quicksort(this._ids,this._dists,0,ut-1);const zt=new Uint32Array(ut);let Vt=0;for(let Zt=0,Ut=-1/0;Zt<ut;Zt++){const Xt=this._ids[Zt];this._dists[Xt]>Ut&&(zt[Vt++]=Xt,Ut=this._dists[Xt])}this.hull=zt.subarray(0,Vt),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(orient2d(At,Ct,$t,Ot,It,kt)<0){const zt=Et,Vt=$t,Zt=Ot;Et=xt,$t=It,Ot=kt,xt=zt,It=Vt,kt=Zt}const Mt=circumcenter(At,Ct,$t,Ot,It,kt);this._cx=Mt.x,this._cy=Mt.y;for(let zt=0;zt<ut;zt++)this._dists[zt]=dist(tt[2*zt],tt[2*zt+1],Mt.x,Mt.y);quicksort(this._ids,this._dists,0,ut-1),this._hullStart=Tt;let Ft=3;rt[Tt]=nt[xt]=Et,rt[Et]=nt[Tt]=xt,rt[xt]=nt[Et]=Tt,ot[Tt]=0,ot[Et]=1,ot[xt]=2,st.fill(-1),st[this._hashKey(At,Ct)]=Tt,st[this._hashKey($t,Ot)]=Et,st[this._hashKey(It,kt)]=xt,this.trianglesLen=0,this._addTriangle(Tt,Et,xt,-1,-1,-1);for(let zt=0,Vt,Zt;zt<this._ids.length;zt++){const Ut=this._ids[zt],Xt=tt[2*Ut],Jt=tt[2*Ut+1];if(zt>0&&Math.abs(Xt-Vt)<=EPSILON&&Math.abs(Jt-Zt)<=EPSILON||(Vt=Xt,Zt=Jt,Ut===Tt||Ut===Et||Ut===xt))continue;let gn=0;for(let _n=0,En=this._hashKey(Xt,Jt);_n<this._hashSize&&(gn=st[(En+_n)%this._hashSize],!(gn!==-1&&gn!==rt[gn]));_n++);gn=nt[gn];let An=gn,sn;for(;sn=rt[An],orient2d(Xt,Jt,tt[2*An],tt[2*An+1],tt[2*sn],tt[2*sn+1])>=0;)if(An=sn,An===gn){An=-1;break}if(An===-1)continue;let Sn=this._addTriangle(An,Ut,rt[An],-1,-1,ot[An]);ot[Ut]=this._legalize(Sn+2),ot[An]=Sn,Ft++;let In=rt[An];for(;sn=rt[In],orient2d(Xt,Jt,tt[2*In],tt[2*In+1],tt[2*sn],tt[2*sn+1])<0;)Sn=this._addTriangle(In,Ut,sn,ot[Ut],-1,ot[In]),ot[Ut]=this._legalize(Sn+2),rt[In]=In,Ft--,In=sn;if(An===gn)for(;sn=nt[An],orient2d(Xt,Jt,tt[2*sn],tt[2*sn+1],tt[2*An],tt[2*An+1])<0;)Sn=this._addTriangle(sn,Ut,An,-1,ot[An],ot[sn]),this._legalize(Sn+2),ot[sn]=Sn,rt[An]=An,Ft--,An=sn;this._hullStart=nt[Ut]=An,rt[An]=nt[In]=Ut,rt[Ut]=In,st[this._hashKey(Xt,Jt)]=Ut,st[this._hashKey(tt[2*An],tt[2*An+1])]=An}this.hull=new Uint32Array(Ft);for(let zt=0,Vt=this._hullStart;zt<Ft;zt++)this.hull[zt]=Vt,Vt=rt[Vt];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(tt,nt){return Math.floor(pseudoAngle(tt-this._cx,nt-this._cy)*this._hashSize)%this._hashSize}_legalize(tt){const{_triangles:nt,_halfedges:rt,coords:ot}=this;let st=0,ut=0;for(;;){const ct=rt[tt],ft=tt-tt%3;if(ut=ft+(tt+2)%3,ct===-1){if(st===0)break;tt=EDGE_STACK[--st];continue}const pt=ct-ct%3,ht=ft+(tt+1)%3,mt=pt+(ct+2)%3,yt=nt[ut],vt=nt[tt],Tt=nt[ht],Et=nt[mt];if(inCircle(ot[2*yt],ot[2*yt+1],ot[2*vt],ot[2*vt+1],ot[2*Tt],ot[2*Tt+1],ot[2*Et],ot[2*Et+1])){nt[tt]=Et,nt[ct]=yt;const At=rt[mt];if(At===-1){let $t=this._hullStart;do{if(this._hullTri[$t]===mt){this._hullTri[$t]=tt;break}$t=this._hullPrev[$t]}while($t!==this._hullStart)}this._link(tt,At),this._link(ct,rt[ut]),this._link(ut,mt);const Ct=pt+(ct+1)%3;st<EDGE_STACK.length&&(EDGE_STACK[st++]=Ct)}else{if(st===0)break;tt=EDGE_STACK[--st]}}return ut}_link(tt,nt){this._halfedges[tt]=nt,nt!==-1&&(this._halfedges[nt]=tt)}_addTriangle(tt,nt,rt,ot,st,ut){const ct=this.trianglesLen;return this._triangles[ct]=tt,this._triangles[ct+1]=nt,this._triangles[ct+2]=rt,this._link(ct,ot),this._link(ct+1,st),this._link(ct+2,ut),this.trianglesLen+=3,ct}}function pseudoAngle(et,tt){const nt=et/(Math.abs(et)+Math.abs(tt));return(tt>0?3-nt:1+nt)/4}function dist(et,tt,nt,rt){const ot=et-nt,st=tt-rt;return ot*ot+st*st}function inCircle(et,tt,nt,rt,ot,st,ut,ct){const ft=et-ut,pt=tt-ct,ht=nt-ut,mt=rt-ct,yt=ot-ut,vt=st-ct,Tt=ft*ft+pt*pt,Et=ht*ht+mt*mt,xt=yt*yt+vt*vt;return ft*(mt*xt-Et*vt)-pt*(ht*xt-Et*yt)+Tt*(ht*vt-mt*yt)<0}function circumradius(et,tt,nt,rt,ot,st){const ut=nt-et,ct=rt-tt,ft=ot-et,pt=st-tt,ht=ut*ut+ct*ct,mt=ft*ft+pt*pt,yt=.5/(ut*pt-ct*ft),vt=(pt*ht-ct*mt)*yt,Tt=(ut*mt-ft*ht)*yt;return vt*vt+Tt*Tt}function circumcenter(et,tt,nt,rt,ot,st){const ut=nt-et,ct=rt-tt,ft=ot-et,pt=st-tt,ht=ut*ut+ct*ct,mt=ft*ft+pt*pt,yt=.5/(ut*pt-ct*ft),vt=et+(pt*ht-ct*mt)*yt,Tt=tt+(ut*mt-ft*ht)*yt;return{x:vt,y:Tt}}function quicksort(et,tt,nt,rt){if(rt-nt<=20)for(let ot=nt+1;ot<=rt;ot++){const st=et[ot],ut=tt[st];let ct=ot-1;for(;ct>=nt&&tt[et[ct]]>ut;)et[ct+1]=et[ct--];et[ct+1]=st}else{const ot=nt+rt>>1;let st=nt+1,ut=rt;swap(et,ot,st),tt[et[nt]]>tt[et[rt]]&&swap(et,nt,rt),tt[et[st]]>tt[et[rt]]&&swap(et,st,rt),tt[et[nt]]>tt[et[st]]&&swap(et,nt,st);const ct=et[st],ft=tt[ct];for(;;){do st++;while(tt[et[st]]<ft);do ut--;while(tt[et[ut]]>ft);if(ut<st)break;swap(et,st,ut)}et[nt+1]=et[ut],et[ut]=ct,rt-st+1>=ut-nt?(quicksort(et,tt,st,rt),quicksort(et,tt,nt,ut-1)):(quicksort(et,tt,nt,ut-1),quicksort(et,tt,st,rt))}}function swap(et,tt,nt){const rt=et[tt];et[tt]=et[nt],et[nt]=rt}function defaultGetX(et){return et[0]}function defaultGetY(et){return et[1]}const epsilon$1=1e-6;class Path{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(tt,nt){this._+=`M${this._x0=this._x1=+tt},${this._y0=this._y1=+nt}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(tt,nt){this._+=`L${this._x1=+tt},${this._y1=+nt}`}arc(tt,nt,rt){tt=+tt,nt=+nt,rt=+rt;const ot=tt+rt,st=nt;if(rt<0)throw new Error("negative radius");this._x1===null?this._+=`M${ot},${st}`:(Math.abs(this._x1-ot)>epsilon$1||Math.abs(this._y1-st)>epsilon$1)&&(this._+="L"+ot+","+st),rt&&(this._+=`A${rt},${rt},0,1,1,${tt-rt},${nt}A${rt},${rt},0,1,1,${this._x1=ot},${this._y1=st}`)}rect(tt,nt,rt,ot){this._+=`M${this._x0=this._x1=+tt},${this._y0=this._y1=+nt}h${+rt}v${+ot}h${-rt}Z`}value(){return this._||null}}class Polygon{constructor(){this._=[]}moveTo(tt,nt){this._.push([tt,nt])}closePath(){this._.push(this._[0].slice())}lineTo(tt,nt){this._.push([tt,nt])}value(){return this._.length?this._:null}}class Voronoi$1{constructor(tt,[nt,rt,ot,st]=[0,0,960,500]){if(!((ot=+ot)>=(nt=+nt))||!((st=+st)>=(rt=+rt)))throw new Error("invalid bounds");this.delaunay=tt,this._circumcenters=new Float64Array(tt.points.length*2),this.vectors=new Float64Array(tt.points.length*2),this.xmax=ot,this.xmin=nt,this.ymax=st,this.ymin=rt,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:tt,hull:nt,triangles:rt},vectors:ot}=this;let st,ut;const ct=this.circumcenters=this._circumcenters.subarray(0,rt.length/3*2);for(let Et=0,xt=0,At=rt.length,Ct,$t;Et<At;Et+=3,xt+=2){const Ot=rt[Et]*2,Rt=rt[Et+1]*2,It=rt[Et+2]*2,kt=tt[Ot],Mt=tt[Ot+1],Ft=tt[Rt],zt=tt[Rt+1],Vt=tt[It],Zt=tt[It+1],Ut=Ft-kt,Xt=zt-Mt,Jt=Vt-kt,gn=Zt-Mt,An=(Ut*gn-Xt*Jt)*2;if(Math.abs(An)<1e-9){if(st===void 0){st=ut=0;for(const Sn of nt)st+=tt[Sn*2],ut+=tt[Sn*2+1];st/=nt.length,ut/=nt.length}const sn=1e9*Math.sign((st-kt)*gn-(ut-Mt)*Jt);Ct=(kt+Vt)/2-sn*gn,$t=(Mt+Zt)/2+sn*Jt}else{const sn=1/An,Sn=Ut*Ut+Xt*Xt,In=Jt*Jt+gn*gn;Ct=kt+(gn*Sn-Xt*In)*sn,$t=Mt+(Ut*In-Jt*Sn)*sn}ct[xt]=Ct,ct[xt+1]=$t}let ft=nt[nt.length-1],pt,ht=ft*4,mt,yt=tt[2*ft],vt,Tt=tt[2*ft+1];ot.fill(0);for(let Et=0;Et<nt.length;++Et)ft=nt[Et],pt=ht,mt=yt,vt=Tt,ht=ft*4,yt=tt[2*ft],Tt=tt[2*ft+1],ot[pt+2]=ot[ht]=vt-Tt,ot[pt+3]=ot[ht+1]=yt-mt}render(tt){const nt=tt==null?tt=new Path:void 0,{delaunay:{halfedges:rt,inedges:ot,hull:st},circumcenters:ut,vectors:ct}=this;if(st.length<=1)return null;for(let ht=0,mt=rt.length;ht<mt;++ht){const yt=rt[ht];if(yt<ht)continue;const vt=Math.floor(ht/3)*2,Tt=Math.floor(yt/3)*2,Et=ut[vt],xt=ut[vt+1],At=ut[Tt],Ct=ut[Tt+1];this._renderSegment(Et,xt,At,Ct,tt)}let ft,pt=st[st.length-1];for(let ht=0;ht<st.length;++ht){ft=pt,pt=st[ht];const mt=Math.floor(ot[pt]/3)*2,yt=ut[mt],vt=ut[mt+1],Tt=ft*4,Et=this._project(yt,vt,ct[Tt+2],ct[Tt+3]);Et&&this._renderSegment(yt,vt,Et[0],Et[1],tt)}return nt&&nt.value()}renderBounds(tt){const nt=tt==null?tt=new Path:void 0;return tt.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),nt&&nt.value()}renderCell(tt,nt){const rt=nt==null?nt=new Path:void 0,ot=this._clip(tt);if(ot===null||!ot.length)return;nt.moveTo(ot[0],ot[1]);let st=ot.length;for(;ot[0]===ot[st-2]&&ot[1]===ot[st-1]&&st>1;)st-=2;for(let ut=2;ut<st;ut+=2)(ot[ut]!==ot[ut-2]||ot[ut+1]!==ot[ut-1])&&nt.lineTo(ot[ut],ot[ut+1]);return nt.closePath(),rt&&rt.value()}*cellPolygons(){const{delaunay:{points:tt}}=this;for(let nt=0,rt=tt.length/2;nt<rt;++nt){const ot=this.cellPolygon(nt);ot&&(ot.index=nt,yield ot)}}cellPolygon(tt){const nt=new Polygon;return this.renderCell(tt,nt),nt.value()}_renderSegment(tt,nt,rt,ot,st){let ut;const ct=this._regioncode(tt,nt),ft=this._regioncode(rt,ot);ct===0&&ft===0?(st.moveTo(tt,nt),st.lineTo(rt,ot)):(ut=this._clipSegment(tt,nt,rt,ot,ct,ft))&&(st.moveTo(ut[0],ut[1]),st.lineTo(ut[2],ut[3]))}contains(tt,nt,rt){return nt=+nt,nt!==nt||(rt=+rt,rt!==rt)?!1:this.delaunay._step(tt,nt,rt)===tt}*neighbors(tt){const nt=this._clip(tt);if(nt)for(const rt of this.delaunay.neighbors(tt)){const ot=this._clip(rt);if(ot){e:for(let st=0,ut=nt.length;st<ut;st+=2)for(let ct=0,ft=ot.length;ct<ft;ct+=2)if(nt[st]===ot[ct]&&nt[st+1]===ot[ct+1]&&nt[(st+2)%ut]===ot[(ct+ft-2)%ft]&&nt[(st+3)%ut]===ot[(ct+ft-1)%ft]){yield rt;break e}}}}_cell(tt){const{circumcenters:nt,delaunay:{inedges:rt,halfedges:ot,triangles:st}}=this,ut=rt[tt];if(ut===-1)return null;const ct=[];let ft=ut;do{const pt=Math.floor(ft/3);if(ct.push(nt[pt*2],nt[pt*2+1]),ft=ft%3===2?ft-2:ft+1,st[ft]!==tt)break;ft=ot[ft]}while(ft!==ut&&ft!==-1);return ct}_clip(tt){if(tt===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const nt=this._cell(tt);if(nt===null)return null;const{vectors:rt}=this,ot=tt*4;return this._simplify(rt[ot]||rt[ot+1]?this._clipInfinite(tt,nt,rt[ot],rt[ot+1],rt[ot+2],rt[ot+3]):this._clipFinite(tt,nt))}_clipFinite(tt,nt){const rt=nt.length;let ot=null,st,ut,ct=nt[rt-2],ft=nt[rt-1],pt,ht=this._regioncode(ct,ft),mt,yt=0;for(let vt=0;vt<rt;vt+=2)if(st=ct,ut=ft,ct=nt[vt],ft=nt[vt+1],pt=ht,ht=this._regioncode(ct,ft),pt===0&&ht===0)mt=yt,yt=0,ot?ot.push(ct,ft):ot=[ct,ft];else{let Tt,Et,xt,At,Ct;if(pt===0){if((Tt=this._clipSegment(st,ut,ct,ft,pt,ht))===null)continue;[Et,xt,At,Ct]=Tt}else{if((Tt=this._clipSegment(ct,ft,st,ut,ht,pt))===null)continue;[At,Ct,Et,xt]=Tt,mt=yt,yt=this._edgecode(Et,xt),mt&&yt&&this._edge(tt,mt,yt,ot,ot.length),ot?ot.push(Et,xt):ot=[Et,xt]}mt=yt,yt=this._edgecode(At,Ct),mt&&yt&&this._edge(tt,mt,yt,ot,ot.length),ot?ot.push(At,Ct):ot=[At,Ct]}if(ot)mt=yt,yt=this._edgecode(ot[0],ot[1]),mt&&yt&&this._edge(tt,mt,yt,ot,ot.length);else if(this.contains(tt,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return ot}_clipSegment(tt,nt,rt,ot,st,ut){const ct=st<ut;for(ct&&([tt,nt,rt,ot,st,ut]=[rt,ot,tt,nt,ut,st]);;){if(st===0&&ut===0)return ct?[rt,ot,tt,nt]:[tt,nt,rt,ot];if(st&ut)return null;let ft,pt,ht=st||ut;ht&8?(ft=tt+(rt-tt)*(this.ymax-nt)/(ot-nt),pt=this.ymax):ht&4?(ft=tt+(rt-tt)*(this.ymin-nt)/(ot-nt),pt=this.ymin):ht&2?(pt=nt+(ot-nt)*(this.xmax-tt)/(rt-tt),ft=this.xmax):(pt=nt+(ot-nt)*(this.xmin-tt)/(rt-tt),ft=this.xmin),st?(tt=ft,nt=pt,st=this._regioncode(tt,nt)):(rt=ft,ot=pt,ut=this._regioncode(rt,ot))}}_clipInfinite(tt,nt,rt,ot,st,ut){let ct=Array.from(nt),ft;if((ft=this._project(ct[0],ct[1],rt,ot))&&ct.unshift(ft[0],ft[1]),(ft=this._project(ct[ct.length-2],ct[ct.length-1],st,ut))&&ct.push(ft[0],ft[1]),ct=this._clipFinite(tt,ct))for(let pt=0,ht=ct.length,mt,yt=this._edgecode(ct[ht-2],ct[ht-1]);pt<ht;pt+=2)mt=yt,yt=this._edgecode(ct[pt],ct[pt+1]),mt&&yt&&(pt=this._edge(tt,mt,yt,ct,pt),ht=ct.length);else this.contains(tt,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(ct=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return ct}_edge(tt,nt,rt,ot,st){for(;nt!==rt;){let ut,ct;switch(nt){case 5:nt=4;continue;case 4:nt=6,ut=this.xmax,ct=this.ymin;break;case 6:nt=2;continue;case 2:nt=10,ut=this.xmax,ct=this.ymax;break;case 10:nt=8;continue;case 8:nt=9,ut=this.xmin,ct=this.ymax;break;case 9:nt=1;continue;case 1:nt=5,ut=this.xmin,ct=this.ymin;break}(ot[st]!==ut||ot[st+1]!==ct)&&this.contains(tt,ut,ct)&&(ot.splice(st,0,ut,ct),st+=2)}return st}_project(tt,nt,rt,ot){let st=1/0,ut,ct,ft;if(ot<0){if(nt<=this.ymin)return null;(ut=(this.ymin-nt)/ot)<st&&(ft=this.ymin,ct=tt+(st=ut)*rt)}else if(ot>0){if(nt>=this.ymax)return null;(ut=(this.ymax-nt)/ot)<st&&(ft=this.ymax,ct=tt+(st=ut)*rt)}if(rt>0){if(tt>=this.xmax)return null;(ut=(this.xmax-tt)/rt)<st&&(ct=this.xmax,ft=nt+(st=ut)*ot)}else if(rt<0){if(tt<=this.xmin)return null;(ut=(this.xmin-tt)/rt)<st&&(ct=this.xmin,ft=nt+(st=ut)*ot)}return[ct,ft]}_edgecode(tt,nt){return(tt===this.xmin?1:tt===this.xmax?2:0)|(nt===this.ymin?4:nt===this.ymax?8:0)}_regioncode(tt,nt){return(tt<this.xmin?1:tt>this.xmax?2:0)|(nt<this.ymin?4:nt>this.ymax?8:0)}_simplify(tt){if(tt&&tt.length>4){for(let nt=0;nt<tt.length;nt+=2){const rt=(nt+2)%tt.length,ot=(nt+4)%tt.length;(tt[nt]===tt[rt]&&tt[rt]===tt[ot]||tt[nt+1]===tt[rt+1]&&tt[rt+1]===tt[ot+1])&&(tt.splice(rt,2),nt-=2)}tt.length||(tt=null)}return tt}}const tau=2*Math.PI,pow=Math.pow;function pointX(et){return et[0]}function pointY(et){return et[1]}function collinear(et){const{triangles:tt,coords:nt}=et;for(let rt=0;rt<tt.length;rt+=3){const ot=2*tt[rt],st=2*tt[rt+1],ut=2*tt[rt+2];if((nt[ut]-nt[ot])*(nt[st+1]-nt[ot+1])-(nt[st]-nt[ot])*(nt[ut+1]-nt[ot+1])>1e-10)return!1}return!0}function jitter(et,tt,nt){return[et+Math.sin(et+tt)*nt,tt+Math.cos(et-tt)*nt]}class Delaunay{static from(tt,nt=pointX,rt=pointY,ot){return new Delaunay("length"in tt?flatArray(tt,nt,rt,ot):Float64Array.from(flatIterable(tt,nt,rt,ot)))}constructor(tt){this._delaunator=new Delaunator(tt),this.inedges=new Int32Array(tt.length/2),this._hullIndex=new Int32Array(tt.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const tt=this._delaunator,nt=this.points;if(tt.hull&&tt.hull.length>2&&collinear(tt)){this.collinear=Int32Array.from({length:nt.length/2},(yt,vt)=>vt).sort((yt,vt)=>nt[2*yt]-nt[2*vt]||nt[2*yt+1]-nt[2*vt+1]);const ft=this.collinear[0],pt=this.collinear[this.collinear.length-1],ht=[nt[2*ft],nt[2*ft+1],nt[2*pt],nt[2*pt+1]],mt=1e-8*Math.hypot(ht[3]-ht[1],ht[2]-ht[0]);for(let yt=0,vt=nt.length/2;yt<vt;++yt){const Tt=jitter(nt[2*yt],nt[2*yt+1],mt);nt[2*yt]=Tt[0],nt[2*yt+1]=Tt[1]}this._delaunator=new Delaunator(nt)}else delete this.collinear;const rt=this.halfedges=this._delaunator.halfedges,ot=this.hull=this._delaunator.hull,st=this.triangles=this._delaunator.triangles,ut=this.inedges.fill(-1),ct=this._hullIndex.fill(-1);for(let ft=0,pt=rt.length;ft<pt;++ft){const ht=st[ft%3===2?ft-2:ft+1];(rt[ft]===-1||ut[ht]===-1)&&(ut[ht]=ft)}for(let ft=0,pt=ot.length;ft<pt;++ft)ct[ot[ft]]=ft;ot.length<=2&&ot.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=ot[0],ut[ot[0]]=1,ot.length===2&&(ut[ot[1]]=0,this.triangles[1]=ot[1],this.triangles[2]=ot[1]))}voronoi(tt){return new Voronoi$1(this,tt)}*neighbors(tt){const{inedges:nt,hull:rt,_hullIndex:ot,halfedges:st,triangles:ut,collinear:ct}=this;if(ct){const mt=ct.indexOf(tt);mt>0&&(yield ct[mt-1]),mt<ct.length-1&&(yield ct[mt+1]);return}const ft=nt[tt];if(ft===-1)return;let pt=ft,ht=-1;do{if(yield ht=ut[pt],pt=pt%3===2?pt-2:pt+1,ut[pt]!==tt)return;if(pt=st[pt],pt===-1){const mt=rt[(ot[tt]+1)%rt.length];mt!==ht&&(yield mt);return}}while(pt!==ft)}find(tt,nt,rt=0){if(tt=+tt,tt!==tt||(nt=+nt,nt!==nt))return-1;const ot=rt;let st;for(;(st=this._step(rt,tt,nt))>=0&&st!==rt&&st!==ot;)rt=st;return st}_step(tt,nt,rt){const{inedges:ot,hull:st,_hullIndex:ut,halfedges:ct,triangles:ft,points:pt}=this;if(ot[tt]===-1||!pt.length)return(tt+1)%(pt.length>>1);let ht=tt,mt=pow(nt-pt[tt*2],2)+pow(rt-pt[tt*2+1],2);const yt=ot[tt];let vt=yt;do{let Tt=ft[vt];const Et=pow(nt-pt[Tt*2],2)+pow(rt-pt[Tt*2+1],2);if(Et<mt&&(mt=Et,ht=Tt),vt=vt%3===2?vt-2:vt+1,ft[vt]!==tt)break;if(vt=ct[vt],vt===-1){if(vt=st[(ut[tt]+1)%st.length],vt!==Tt&&pow(nt-pt[vt*2],2)+pow(rt-pt[vt*2+1],2)<mt)return vt;break}}while(vt!==yt);return ht}render(tt){const nt=tt==null?tt=new Path:void 0,{points:rt,halfedges:ot,triangles:st}=this;for(let ut=0,ct=ot.length;ut<ct;++ut){const ft=ot[ut];if(ft<ut)continue;const pt=st[ut]*2,ht=st[ft]*2;tt.moveTo(rt[pt],rt[pt+1]),tt.lineTo(rt[ht],rt[ht+1])}return this.renderHull(tt),nt&&nt.value()}renderPoints(tt,nt){nt===void 0&&(!tt||typeof tt.moveTo!="function")&&(nt=tt,tt=null),nt=nt==null?2:+nt;const rt=tt==null?tt=new Path:void 0,{points:ot}=this;for(let st=0,ut=ot.length;st<ut;st+=2){const ct=ot[st],ft=ot[st+1];tt.moveTo(ct+nt,ft),tt.arc(ct,ft,nt,0,tau)}return rt&&rt.value()}renderHull(tt){const nt=tt==null?tt=new Path:void 0,{hull:rt,points:ot}=this,st=rt[0]*2,ut=rt.length;tt.moveTo(ot[st],ot[st+1]);for(let ct=1;ct<ut;++ct){const ft=2*rt[ct];tt.lineTo(ot[ft],ot[ft+1])}return tt.closePath(),nt&&nt.value()}hullPolygon(){const tt=new Polygon;return this.renderHull(tt),tt.value()}renderTriangle(tt,nt){const rt=nt==null?nt=new Path:void 0,{points:ot,triangles:st}=this,ut=st[tt*=3]*2,ct=st[tt+1]*2,ft=st[tt+2]*2;return nt.moveTo(ot[ut],ot[ut+1]),nt.lineTo(ot[ct],ot[ct+1]),nt.lineTo(ot[ft],ot[ft+1]),nt.closePath(),rt&&rt.value()}*trianglePolygons(){const{triangles:tt}=this;for(let nt=0,rt=tt.length/3;nt<rt;++nt)yield this.trianglePolygon(nt)}trianglePolygon(tt){const nt=new Polygon;return this.renderTriangle(tt,nt),nt.value()}}function flatArray(et,tt,nt,rt){const ot=et.length,st=new Float64Array(ot*2);for(let ut=0;ut<ot;++ut){const ct=et[ut];st[ut*2]=tt.call(rt,ct,ut,et),st[ut*2+1]=nt.call(rt,ct,ut,et)}return st}function*flatIterable(et,tt,nt,rt){let ot=0;for(const st of et)yield tt.call(rt,st,ot,et),yield nt.call(rt,st,ot,et),++ot}function Voronoi(et){Transform.call(this,null,et)}Voronoi.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const defaultExtent=[-1e5,-1e5,1e5,1e5];inherits(Voronoi,Transform,{transform(et,tt){const nt=et.as||"path",rt=tt.source;if(!rt||!rt.length)return tt;let ot=et.size;ot=ot?[0,0,ot[0],ot[1]]:(ot=et.extent)?[ot[0][0],ot[0][1],ot[1][0],ot[1][1]]:defaultExtent;const st=this.value=Delaunay.from(rt,et.x,et.y).voronoi(ot);for(let ut=0,ct=rt.length;ut<ct;++ut){const ft=st.cellPolygon(ut);rt[ut][nt]=ft?toPathString(ft):null}return tt.reflow(et.modified()).modifies(nt)}});function toPathString(et){const tt=et[0][0],nt=et[0][1];let rt=et.length-1;for(;et[rt][0]===tt&&et[rt][1]===nt;--rt);return"M"+et.slice(0,rt+1).join("L")+"Z"}const voronoi=Object.freeze(Object.defineProperty({__proto__:null,voronoi:Voronoi},Symbol.toStringTag,{value:"Module"}));var cloudRadians=Math.PI/180,cw=1<<11>>5,ch=1<<11;function cloud(){var et=[256,256],tt,nt,rt,ot,st,ut,ct,ft=archimedeanSpiral,pt=[],ht=Math.random,mt={};mt.layout=function(){for(var Tt=yt(domCanvas()),Et=zeroArray$1((et[0]>>5)*et[1]),xt=null,At=pt.length,Ct=-1,$t=[],Ot=pt.map(It=>({text:tt(It),font:nt(It),style:ot(It),weight:st(It),rotate:ut(It),size:~~(rt(It)+1e-14),padding:ct(It),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:It})).sort((It,kt)=>kt.size-It.size);++Ct<At;){var Rt=Ot[Ct];Rt.x=et[0]*(ht()+.5)>>1,Rt.y=et[1]*(ht()+.5)>>1,cloudSprite(Tt,Rt,Ot,Ct),Rt.hasText&&vt(Et,Rt,xt)&&($t.push(Rt),xt?cloudBounds(xt,Rt):xt=[{x:Rt.x+Rt.x0,y:Rt.y+Rt.y0},{x:Rt.x+Rt.x1,y:Rt.y+Rt.y1}],Rt.x-=et[0]>>1,Rt.y-=et[1]>>1)}return $t};function yt(Tt){Tt.width=Tt.height=1;var Et=Math.sqrt(Tt.getContext("2d").getImageData(0,0,1,1).data.length>>2);Tt.width=(cw<<5)/Et,Tt.height=ch/Et;var xt=Tt.getContext("2d");return xt.fillStyle=xt.strokeStyle="red",xt.textAlign="center",{context:xt,ratio:Et}}function vt(Tt,Et,xt){for(var At=Et.x,Ct=Et.y,$t=Math.sqrt(et[0]*et[0]+et[1]*et[1]),Ot=ft(et),Rt=ht()<.5?1:-1,It=-Rt,kt,Mt,Ft;(kt=Ot(It+=Rt))&&(Mt=~~kt[0],Ft=~~kt[1],!(Math.min(Math.abs(Mt),Math.abs(Ft))>=$t));)if(Et.x=At+Mt,Et.y=Ct+Ft,!(Et.x+Et.x0<0||Et.y+Et.y0<0||Et.x+Et.x1>et[0]||Et.y+Et.y1>et[1])&&(!xt||!cloudCollide(Et,Tt,et[0]))&&(!xt||collideRects(Et,xt))){for(var zt=Et.sprite,Vt=Et.width>>5,Zt=et[0]>>5,Ut=Et.x-(Vt<<4),Xt=Ut&127,Jt=32-Xt,gn=Et.y1-Et.y0,An=(Et.y+Et.y0)*Zt+(Ut>>5),sn,Sn=0;Sn<gn;Sn++){sn=0;for(var In=0;In<=Vt;In++)Tt[An+In]|=sn<<Jt|(In<Vt?(sn=zt[Sn*Vt+In])>>>Xt:0);An+=Zt}return Et.sprite=null,!0}return!1}return mt.words=function(Tt){return arguments.length?(pt=Tt,mt):pt},mt.size=function(Tt){return arguments.length?(et=[+Tt[0],+Tt[1]],mt):et},mt.font=function(Tt){return arguments.length?(nt=functor(Tt),mt):nt},mt.fontStyle=function(Tt){return arguments.length?(ot=functor(Tt),mt):ot},mt.fontWeight=function(Tt){return arguments.length?(st=functor(Tt),mt):st},mt.rotate=function(Tt){return arguments.length?(ut=functor(Tt),mt):ut},mt.text=function(Tt){return arguments.length?(tt=functor(Tt),mt):tt},mt.spiral=function(Tt){return arguments.length?(ft=spirals[Tt]||Tt,mt):ft},mt.fontSize=function(Tt){return arguments.length?(rt=functor(Tt),mt):rt},mt.padding=function(Tt){return arguments.length?(ct=functor(Tt),mt):ct},mt.random=function(Tt){return arguments.length?(ht=Tt,mt):ht},mt}function cloudSprite(et,tt,nt,rt){if(!tt.sprite){var ot=et.context,st=et.ratio;ot.clearRect(0,0,(cw<<5)/st,ch/st);var ut=0,ct=0,ft=0,pt=nt.length,ht,mt,yt,vt,Tt;for(--rt;++rt<pt;){if(tt=nt[rt],ot.save(),ot.font=tt.style+" "+tt.weight+" "+~~((tt.size+1)/st)+"px "+tt.font,ht=ot.measureText(tt.text+"m").width*st,yt=tt.size<<1,tt.rotate){var Et=Math.sin(tt.rotate*cloudRadians),xt=Math.cos(tt.rotate*cloudRadians),At=ht*xt,Ct=ht*Et,$t=yt*xt,Ot=yt*Et;ht=Math.max(Math.abs(At+Ot),Math.abs(At-Ot))+31>>5<<5,yt=~~Math.max(Math.abs(Ct+$t),Math.abs(Ct-$t))}else ht=ht+31>>5<<5;if(yt>ft&&(ft=yt),ut+ht>=cw<<5&&(ut=0,ct+=ft,ft=0),ct+yt>=ch)break;ot.translate((ut+(ht>>1))/st,(ct+(yt>>1))/st),tt.rotate&&ot.rotate(tt.rotate*cloudRadians),ot.fillText(tt.text,0,0),tt.padding&&(ot.lineWidth=2*tt.padding,ot.strokeText(tt.text,0,0)),ot.restore(),tt.width=ht,tt.height=yt,tt.xoff=ut,tt.yoff=ct,tt.x1=ht>>1,tt.y1=yt>>1,tt.x0=-tt.x1,tt.y0=-tt.y1,tt.hasText=!0,ut+=ht}for(var Rt=ot.getImageData(0,0,(cw<<5)/st,ch/st).data,It=[];--rt>=0;)if(tt=nt[rt],!!tt.hasText){for(ht=tt.width,mt=ht>>5,yt=tt.y1-tt.y0,vt=0;vt<yt*mt;vt++)It[vt]=0;if(ut=tt.xoff,ut==null)return;ct=tt.yoff;var kt=0,Mt=-1;for(Tt=0;Tt<yt;Tt++){for(vt=0;vt<ht;vt++){var Ft=mt*Tt+(vt>>5),zt=Rt[(ct+Tt)*(cw<<5)+(ut+vt)<<2]?1<<31-vt%32:0;It[Ft]|=zt,kt|=zt}kt?Mt=Tt:(tt.y0++,yt--,Tt--,ct++)}tt.y1=tt.y0+Mt,tt.sprite=It.slice(0,(tt.y1-tt.y0)*mt)}}}function cloudCollide(et,tt,nt){nt>>=5;for(var rt=et.sprite,ot=et.width>>5,st=et.x-(ot<<4),ut=st&127,ct=32-ut,ft=et.y1-et.y0,pt=(et.y+et.y0)*nt+(st>>5),ht,mt=0;mt<ft;mt++){ht=0;for(var yt=0;yt<=ot;yt++)if((ht<<ct|(yt<ot?(ht=rt[mt*ot+yt])>>>ut:0))&tt[pt+yt])return!0;pt+=nt}return!1}function cloudBounds(et,tt){var nt=et[0],rt=et[1];tt.x+tt.x0<nt.x&&(nt.x=tt.x+tt.x0),tt.y+tt.y0<nt.y&&(nt.y=tt.y+tt.y0),tt.x+tt.x1>rt.x&&(rt.x=tt.x+tt.x1),tt.y+tt.y1>rt.y&&(rt.y=tt.y+tt.y1)}function collideRects(et,tt){return et.x+et.x1>tt[0].x&&et.x+et.x0<tt[1].x&&et.y+et.y1>tt[0].y&&et.y+et.y0<tt[1].y}function archimedeanSpiral(et){var tt=et[0]/et[1];return function(nt){return[tt*(nt*=.1)*Math.cos(nt),nt*Math.sin(nt)]}}function rectangularSpiral(et){var tt=4,nt=tt*et[0]/et[1],rt=0,ot=0;return function(st){var ut=st<0?-1:1;switch(Math.sqrt(1+4*ut*st)-ut&3){case 0:rt+=nt;break;case 1:ot+=tt;break;case 2:rt-=nt;break;default:ot-=tt;break}return[rt,ot]}}function zeroArray$1(et){for(var tt=[],nt=-1;++nt<et;)tt[nt]=0;return tt}function functor(et){return typeof et=="function"?et:function(){return et}}var spirals={archimedean:archimedeanSpiral,rectangular:rectangularSpiral};const Output=["x","y","font","fontSize","fontStyle","fontWeight","angle"],Params$1=["text","font","rotate","fontSize","fontStyle","fontWeight"];function Wordcloud(et){Transform.call(this,cloud(),et)}Wordcloud.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:Output}]};inherits(Wordcloud,Transform,{transform(et,tt){et.size&&!(et.size[0]&&et.size[1])&&error("Wordcloud size dimensions must be non-zero.");function nt(Tt){const Et=et[Tt];return isFunction$3(Et)&&tt.modified(Et.fields)}const rt=et.modified();if(!(rt||tt.changed(tt.ADD_REM)||Params$1.some(nt)))return;const ot=tt.materialize(tt.SOURCE).source,st=this.value,ut=et.as||Output;let ct=et.fontSize||14,ft;if(isFunction$3(ct)?ft=et.fontSizeRange:ct=constant$6(ct),ft){const Tt=ct,Et=scale$4("sqrt")().domain(extent(ot,Tt)).range(ft);ct=xt=>Et(Tt(xt))}ot.forEach(Tt=>{Tt[ut[0]]=NaN,Tt[ut[1]]=NaN,Tt[ut[3]]=0});const pt=st.words(ot).text(et.text).size(et.size||[500,500]).padding(et.padding||1).spiral(et.spiral||"archimedean").rotate(et.rotate||0).font(et.font||"sans-serif").fontStyle(et.fontStyle||"normal").fontWeight(et.fontWeight||"normal").fontSize(ct).random(random).layout(),ht=st.size(),mt=ht[0]>>1,yt=ht[1]>>1,vt=pt.length;for(let Tt=0,Et,xt;Tt<vt;++Tt)Et=pt[Tt],xt=Et.datum,xt[ut[0]]=Et.x+mt,xt[ut[1]]=Et.y+yt,xt[ut[2]]=Et.font,xt[ut[3]]=Et.size,xt[ut[4]]=Et.style,xt[ut[5]]=Et.weight,xt[ut[6]]=Et.rotate;return tt.reflow(rt).modifies(ut)}});const wordcloud=Object.freeze(Object.defineProperty({__proto__:null,wordcloud:Wordcloud},Symbol.toStringTag,{value:"Module"})),array8=et=>new Uint8Array(et),array16=et=>new Uint16Array(et),array32=et=>new Uint32Array(et);function Bitmaps(){let et=8,tt=[],nt=array32(0),rt=array$1(0,et),ot=array$1(0,et);return{data:()=>tt,seen:()=>nt=lengthen(nt,tt.length),add(st){for(let ut=0,ct=tt.length,ft=st.length,pt;ut<ft;++ut)pt=st[ut],pt._index=ct++,tt.push(pt)},remove(st,ut){const ct=tt.length,ft=Array(ct-st),pt=tt;let ht,mt,yt;for(mt=0;!ut[mt]&&mt<ct;++mt)ft[mt]=tt[mt],pt[mt]=mt;for(yt=mt;mt<ct;++mt)ht=tt[mt],ut[mt]?pt[mt]=-1:(pt[mt]=yt,rt[yt]=rt[mt],ot[yt]=ot[mt],ft[yt]=ht,ht._index=yt++),rt[mt]=0;return tt=ft,pt},size:()=>tt.length,curr:()=>rt,prev:()=>ot,reset:st=>ot[st]=rt[st],all:()=>et<257?255:et<65537?65535:4294967295,set(st,ut){rt[st]|=ut},clear(st,ut){rt[st]&=~ut},resize(st,ut){const ct=rt.length;(st>ct||ut>et)&&(et=Math.max(ut,et),rt=array$1(st,et,rt),ot=array$1(st,et))}}}function lengthen(et,tt,nt){return et.length>=tt?et:(nt=nt||new et.constructor(tt),nt.set(et),nt)}function array$1(et,tt,nt){const rt=(tt<257?array8:tt<65537?array16:array32)(et);return nt&&rt.set(nt),rt}function Dimension(et,tt,nt){const rt=1<<tt;return{one:rt,zero:~rt,range:nt.slice(),bisect:et.bisect,index:et.index,size:et.size,onAdd(ot,st){const ut=this,ct=ut.bisect(ut.range,ot.value),ft=ot.index,pt=ct[0],ht=ct[1],mt=ft.length;let yt;for(yt=0;yt<pt;++yt)st[ft[yt]]|=rt;for(yt=ht;yt<mt;++yt)st[ft[yt]]|=rt;return ut}}}function SortedIndex(){let et=array32(0),tt=[],nt=0;function rt(ct,ft,pt){if(!ft.length)return[];const ht=nt,mt=ft.length,yt=array32(mt);let vt=Array(mt),Tt,Et,xt;for(xt=0;xt<mt;++xt)vt[xt]=ct(ft[xt]),yt[xt]=xt;if(vt=sort(vt,yt),ht)Tt=tt,Et=et,tt=Array(ht+mt),et=array32(ht+mt),merge$2(pt,Tt,Et,ht,vt,yt,mt,tt,et);else{if(pt>0)for(xt=0;xt<mt;++xt)yt[xt]+=pt;tt=vt,et=yt}return nt=ht+mt,{index:yt,value:vt}}function ot(ct,ft){const pt=nt;let ht,mt,yt;for(mt=0;!ft[et[mt]]&&mt<pt;++mt);for(yt=mt;mt<pt;++mt)ft[ht=et[mt]]||(et[yt]=ht,tt[yt]=tt[mt],++yt);nt=pt-ct}function st(ct){for(let ft=0,pt=nt;ft<pt;++ft)et[ft]=ct[et[ft]]}function ut(ct,ft){let pt;return ft?pt=ft.length:(ft=tt,pt=nt),[bisectLeft$1(ft,ct[0],0,pt),bisectRight$1(ft,ct[1],0,pt)]}return{insert:rt,remove:ot,bisect:ut,reindex:st,index:()=>et,size:()=>nt}}function sort(et,tt){return et.sort.call(tt,(nt,rt)=>{const ot=et[nt],st=et[rt];return ot<st?-1:ot>st?1:0}),permute(et,tt)}function merge$2(et,tt,nt,rt,ot,st,ut,ct,ft){let pt=0,ht=0,mt;for(mt=0;pt<rt&&ht<ut;++mt)tt[pt]<ot[ht]?(ct[mt]=tt[pt],ft[mt]=nt[pt++]):(ct[mt]=ot[ht],ft[mt]=st[ht++]+et);for(;pt<rt;++pt,++mt)ct[mt]=tt[pt],ft[mt]=nt[pt];for(;ht<ut;++ht,++mt)ct[mt]=ot[ht],ft[mt]=st[ht]+et}function CrossFilter(et){Transform.call(this,Bitmaps(),et),this._indices=null,this._dims=null}CrossFilter.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]};inherits(CrossFilter,Transform,{transform(et,tt){if(this._dims){var nt=et.modified("fields")||et.fields.some(rt=>tt.modified(rt.fields));return nt?this.reinit(et,tt):this.eval(et,tt)}else return this.init(et,tt)},init(et,tt){const nt=et.fields,rt=et.query,ot=this._indices={},st=this._dims=[],ut=rt.length;let ct=0,ft,pt;for(;ct<ut;++ct)ft=nt[ct].fname,pt=ot[ft]||(ot[ft]=SortedIndex()),st.push(Dimension(pt,ct,rt[ct]));return this.eval(et,tt)},reinit(et,tt){const nt=tt.materialize().fork(),rt=et.fields,ot=et.query,st=this._indices,ut=this._dims,ct=this.value,ft=ct.curr(),pt=ct.prev(),ht=ct.all(),mt=nt.rem=nt.add,yt=nt.mod,vt=ot.length,Tt={};let Et,xt,At,Ct,$t,Ot,Rt,It,kt;if(pt.set(ft),tt.rem.length&&($t=this.remove(et,tt,nt)),tt.add.length&&ct.add(tt.add),tt.mod.length)for(Ot={},Ct=tt.mod,Rt=0,It=Ct.length;Rt<It;++Rt)Ot[Ct[Rt]._index]=1;for(Rt=0;Rt<vt;++Rt)kt=rt[Rt],(!ut[Rt]||et.modified("fields",Rt)||tt.modified(kt.fields))&&(At=kt.fname,(Et=Tt[At])||(st[At]=xt=SortedIndex(),Tt[At]=Et=xt.insert(kt,tt.source,0)),ut[Rt]=Dimension(xt,Rt,ot[Rt]).onAdd(Et,ft));for(Rt=0,It=ct.data().length;Rt<It;++Rt)$t[Rt]||(pt[Rt]!==ft[Rt]?mt.push(Rt):Ot[Rt]&&ft[Rt]!==ht&&yt.push(Rt));return ct.mask=(1<<vt)-1,nt},eval(et,tt){const nt=tt.materialize().fork(),rt=this._dims.length;let ot=0;return tt.rem.length&&(this.remove(et,tt,nt),ot|=(1<<rt)-1),et.modified("query")&&!et.modified("fields")&&(ot|=this.update(et,tt,nt)),tt.add.length&&(this.insert(et,tt,nt),ot|=(1<<rt)-1),tt.mod.length&&(this.modify(tt,nt),ot|=(1<<rt)-1),this.value.mask=ot,nt},insert(et,tt,nt){const rt=tt.add,ot=this.value,st=this._dims,ut=this._indices,ct=et.fields,ft={},pt=nt.add,ht=ot.size()+rt.length,mt=st.length;let yt=ot.size(),vt,Tt,Et;ot.resize(ht,mt),ot.add(rt);const xt=ot.curr(),At=ot.prev(),Ct=ot.all();for(vt=0;vt<mt;++vt)Tt=ct[vt].fname,Et=ft[Tt]||(ft[Tt]=ut[Tt].insert(ct[vt],rt,yt)),st[vt].onAdd(Et,xt);for(;yt<ht;++yt)At[yt]=Ct,xt[yt]!==Ct&&pt.push(yt)},modify(et,tt){const nt=tt.mod,rt=this.value,ot=rt.curr(),st=rt.all(),ut=et.mod;let ct,ft,pt;for(ct=0,ft=ut.length;ct<ft;++ct)pt=ut[ct]._index,ot[pt]!==st&&nt.push(pt)},remove(et,tt,nt){const rt=this._indices,ot=this.value,st=ot.curr(),ut=ot.prev(),ct=ot.all(),ft={},pt=nt.rem,ht=tt.rem;let mt,yt,vt,Tt;for(mt=0,yt=ht.length;mt<yt;++mt)vt=ht[mt]._index,ft[vt]=1,ut[vt]=Tt=st[vt],st[vt]=ct,Tt!==ct&&pt.push(vt);for(vt in rt)rt[vt].remove(yt,ft);return this.reindex(tt,yt,ft),ft},reindex(et,tt,nt){const rt=this._indices,ot=this.value;et.runAfter(()=>{const st=ot.remove(tt,nt);for(const ut in rt)rt[ut].reindex(st)})},update(et,tt,nt){const rt=this._dims,ot=et.query,st=tt.stamp,ut=rt.length;let ct=0,ft,pt;for(nt.filters=0,pt=0;pt<ut;++pt)et.modified("query",pt)&&(ft=pt,++ct);if(ct===1)ct=rt[ft].one,this.incrementOne(rt[ft],ot[ft],nt.add,nt.rem);else for(pt=0,ct=0;pt<ut;++pt)!et.modified("query",pt)||(ct|=rt[pt].one,this.incrementAll(rt[pt],ot[pt],st,nt.add),nt.rem=nt.add);return ct},incrementAll(et,tt,nt,rt){const ot=this.value,st=ot.seen(),ut=ot.curr(),ct=ot.prev(),ft=et.index(),pt=et.bisect(et.range),ht=et.bisect(tt),mt=ht[0],yt=ht[1],vt=pt[0],Tt=pt[1],Et=et.one;let xt,At,Ct;if(mt<vt)for(xt=mt,At=Math.min(vt,yt);xt<At;++xt)Ct=ft[xt],st[Ct]!==nt&&(ct[Ct]=ut[Ct],st[Ct]=nt,rt.push(Ct)),ut[Ct]^=Et;else if(mt>vt)for(xt=vt,At=Math.min(mt,Tt);xt<At;++xt)Ct=ft[xt],st[Ct]!==nt&&(ct[Ct]=ut[Ct],st[Ct]=nt,rt.push(Ct)),ut[Ct]^=Et;if(yt>Tt)for(xt=Math.max(mt,Tt),At=yt;xt<At;++xt)Ct=ft[xt],st[Ct]!==nt&&(ct[Ct]=ut[Ct],st[Ct]=nt,rt.push(Ct)),ut[Ct]^=Et;else if(yt<Tt)for(xt=Math.max(vt,yt),At=Tt;xt<At;++xt)Ct=ft[xt],st[Ct]!==nt&&(ct[Ct]=ut[Ct],st[Ct]=nt,rt.push(Ct)),ut[Ct]^=Et;et.range=tt.slice()},incrementOne(et,tt,nt,rt){const ot=this.value,st=ot.curr(),ut=et.index(),ct=et.bisect(et.range),ft=et.bisect(tt),pt=ft[0],ht=ft[1],mt=ct[0],yt=ct[1],vt=et.one;let Tt,Et,xt;if(pt<mt)for(Tt=pt,Et=Math.min(mt,ht);Tt<Et;++Tt)xt=ut[Tt],st[xt]^=vt,nt.push(xt);else if(pt>mt)for(Tt=mt,Et=Math.min(pt,yt);Tt<Et;++Tt)xt=ut[Tt],st[xt]^=vt,rt.push(xt);if(ht>yt)for(Tt=Math.max(pt,yt),Et=ht;Tt<Et;++Tt)xt=ut[Tt],st[xt]^=vt,nt.push(xt);else if(ht<yt)for(Tt=Math.max(mt,ht),Et=yt;Tt<Et;++Tt)xt=ut[Tt],st[xt]^=vt,rt.push(xt);et.range=tt.slice()}});function ResolveFilter(et){Transform.call(this,null,et)}ResolveFilter.Definition={type:"ResolveFilter",metadata:{},params:[{name:"ignore",type:"number",required:!0,description:"A bit mask indicating which filters to ignore."},{name:"filter",type:"object",required:!0,description:"Per-tuple filter bitmaps from a CrossFilter transform."}]};inherits(ResolveFilter,Transform,{transform(et,tt){const nt=~(et.ignore||0),rt=et.filter,ot=rt.mask;if((ot&nt)===0)return tt.StopPropagation;const st=tt.fork(tt.ALL),ut=rt.data(),ct=rt.curr(),ft=rt.prev(),pt=ht=>ct[ht]&nt?null:ut[ht];return st.filter(st.MOD,pt),ot&ot-1?(st.filter(st.ADD,ht=>{const mt=ct[ht]&nt;return!mt&&mt^ft[ht]&nt?ut[ht]:null}),st.filter(st.REM,ht=>{const mt=ct[ht]&nt;return mt&&!(mt^(mt^ft[ht]&nt))?ut[ht]:null})):(st.filter(st.ADD,pt),st.filter(st.REM,ht=>(ct[ht]&nt)===ot?ut[ht]:null)),st.filter(st.SOURCE,ht=>pt(ht._index))}});const xf=Object.freeze(Object.defineProperty({__proto__:null,crossfilter:CrossFilter,resolvefilter:ResolveFilter},Symbol.toStringTag,{value:"Module"})),RawCode$1="RawCode",Literal$1="Literal",Property$1="Property",Identifier$1="Identifier",ArrayExpression$1="ArrayExpression",BinaryExpression$1="BinaryExpression",CallExpression$1="CallExpression",ConditionalExpression$1="ConditionalExpression",LogicalExpression$1="LogicalExpression",MemberExpression$1="MemberExpression",ObjectExpression$1="ObjectExpression",UnaryExpression$1="UnaryExpression";function ASTNode$1(et){this.type=et}ASTNode$1.prototype.visit=function(et){let tt,nt,rt;if(et(this))return 1;for(tt=children$1(this),nt=0,rt=tt.length;nt<rt;++nt)if(tt[nt].visit(et))return 1};function children$1(et){switch(et.type){case ArrayExpression$1:return et.elements;case BinaryExpression$1:case LogicalExpression$1:return[et.left,et.right];case CallExpression$1:return[et.callee].concat(et.arguments);case ConditionalExpression$1:return[et.test,et.consequent,et.alternate];case MemberExpression$1:return[et.object,et.property];case ObjectExpression$1:return et.properties;case Property$1:return[et.key,et.value];case UnaryExpression$1:return[et.argument];case Identifier$1:case Literal$1:case RawCode$1:default:return[]}}var TokenName$1,source$1,index$3,length$1,lookahead$1,TokenBooleanLiteral$1=1,TokenEOF$1=2,TokenIdentifier$1=3,TokenKeyword$1=4,TokenNullLiteral$1=5,TokenNumericLiteral$1=6,TokenPunctuator$1=7,TokenStringLiteral$1=8,TokenRegularExpression$1=9;TokenName$1={};TokenName$1[TokenBooleanLiteral$1]="Boolean";TokenName$1[TokenEOF$1]="<end>";TokenName$1[TokenIdentifier$1]="Identifier";TokenName$1[TokenKeyword$1]="Keyword";TokenName$1[TokenNullLiteral$1]="Null";TokenName$1[TokenNumericLiteral$1]="Numeric";TokenName$1[TokenPunctuator$1]="Punctuator";TokenName$1[TokenStringLiteral$1]="String";TokenName$1[TokenRegularExpression$1]="RegularExpression";var SyntaxArrayExpression$1="ArrayExpression",SyntaxBinaryExpression$1="BinaryExpression",SyntaxCallExpression$1="CallExpression",SyntaxConditionalExpression$1="ConditionalExpression",SyntaxIdentifier$1="Identifier",SyntaxLiteral$1="Literal",SyntaxLogicalExpression$1="LogicalExpression",SyntaxMemberExpression$1="MemberExpression",SyntaxObjectExpression$1="ObjectExpression",SyntaxProperty$1="Property",SyntaxUnaryExpression$1="UnaryExpression",MessageUnexpectedToken$1="Unexpected token %0",MessageUnexpectedNumber$1="Unexpected number",MessageUnexpectedString$1="Unexpected string",MessageUnexpectedIdentifier$1="Unexpected identifier",MessageUnexpectedReserved$1="Unexpected reserved word",MessageUnexpectedEOS$1="Unexpected end of input",MessageInvalidRegExp$1="Invalid regular expression",MessageUnterminatedRegExp$1="Invalid regular expression: missing /",MessageStrictOctalLiteral$1="Octal literals are not allowed in strict mode.",MessageStrictDuplicateProperty$1="Duplicate data property in object literal not allowed in strict mode",ILLEGAL$2="ILLEGAL",DISABLED$1="Disabled.",RegexNonAsciiIdentifierStart$1=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),RegexNonAsciiIdentifierPart$1=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function assert$1(et,tt){if(!et)throw new Error("ASSERT: "+tt)}function isDecimalDigit$1(et){return et>=48&&et<=57}function isHexDigit$1(et){return"0123456789abcdefABCDEF".indexOf(et)>=0}function isOctalDigit$1(et){return"01234567".indexOf(et)>=0}function isWhiteSpace$1(et){return et===32||et===9||et===11||et===12||et===160||et>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(et)>=0}function isLineTerminator$1(et){return et===10||et===13||et===8232||et===8233}function isIdentifierStart$1(et){return et===36||et===95||et>=65&&et<=90||et>=97&&et<=122||et===92||et>=128&&RegexNonAsciiIdentifierStart$1.test(String.fromCharCode(et))}function isIdentifierPart$1(et){return et===36||et===95||et>=65&&et<=90||et>=97&&et<=122||et>=48&&et<=57||et===92||et>=128&&RegexNonAsciiIdentifierPart$1.test(String.fromCharCode(et))}const keywords$3={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function skipComment$1(){for(;index$3<length$1;){const et=source$1.charCodeAt(index$3);if(isWhiteSpace$1(et)||isLineTerminator$1(et))++index$3;else break}}function scanHexEscape$1(et){var tt,nt,rt,ot=0;for(nt=et==="u"?4:2,tt=0;tt<nt;++tt)index$3<length$1&&isHexDigit$1(source$1[index$3])?(rt=source$1[index$3++],ot=ot*16+"0123456789abcdef".indexOf(rt.toLowerCase())):throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2);return String.fromCharCode(ot)}function scanUnicodeCodePointEscape$1(){var et,tt,nt,rt;for(et=source$1[index$3],tt=0,et==="}"&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2);index$3<length$1&&(et=source$1[index$3++],!!isHexDigit$1(et));)tt=tt*16+"0123456789abcdef".indexOf(et.toLowerCase());return(tt>1114111||et!=="}")&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),tt<=65535?String.fromCharCode(tt):(nt=(tt-65536>>10)+55296,rt=(tt-65536&1023)+56320,String.fromCharCode(nt,rt))}function getEscapedIdentifier$1(){var et,tt;for(et=source$1.charCodeAt(index$3++),tt=String.fromCharCode(et),et===92&&(source$1.charCodeAt(index$3)!==117&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),++index$3,et=scanHexEscape$1("u"),(!et||et==="\\"||!isIdentifierStart$1(et.charCodeAt(0)))&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),tt=et);index$3<length$1&&(et=source$1.charCodeAt(index$3),!!isIdentifierPart$1(et));)++index$3,tt+=String.fromCharCode(et),et===92&&(tt=tt.substr(0,tt.length-1),source$1.charCodeAt(index$3)!==117&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),++index$3,et=scanHexEscape$1("u"),(!et||et==="\\"||!isIdentifierPart$1(et.charCodeAt(0)))&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),tt+=et);return tt}function getIdentifier$1(){var et,tt;for(et=index$3++;index$3<length$1;){if(tt=source$1.charCodeAt(index$3),tt===92)return index$3=et,getEscapedIdentifier$1();if(isIdentifierPart$1(tt))++index$3;else break}return source$1.slice(et,index$3)}function scanIdentifier$1(){var et,tt,nt;return et=index$3,tt=source$1.charCodeAt(index$3)===92?getEscapedIdentifier$1():getIdentifier$1(),tt.length===1?nt=TokenIdentifier$1:keywords$3.hasOwnProperty(tt)?nt=TokenKeyword$1:tt==="null"?nt=TokenNullLiteral$1:tt==="true"||tt==="false"?nt=TokenBooleanLiteral$1:nt=TokenIdentifier$1,{type:nt,value:tt,start:et,end:index$3}}function scanPunctuator$1(){var et=index$3,tt=source$1.charCodeAt(index$3),nt,rt=source$1[index$3],ot,st,ut;switch(tt){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++index$3,{type:TokenPunctuator$1,value:String.fromCharCode(tt),start:et,end:index$3};default:if(nt=source$1.charCodeAt(index$3+1),nt===61)switch(tt){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return index$3+=2,{type:TokenPunctuator$1,value:String.fromCharCode(tt)+String.fromCharCode(nt),start:et,end:index$3};case 33:case 61:return index$3+=2,source$1.charCodeAt(index$3)===61&&++index$3,{type:TokenPunctuator$1,value:source$1.slice(et,index$3),start:et,end:index$3}}}if(ut=source$1.substr(index$3,4),ut===">>>=")return index$3+=4,{type:TokenPunctuator$1,value:ut,start:et,end:index$3};if(st=ut.substr(0,3),st===">>>"||st==="<<="||st===">>=")return index$3+=3,{type:TokenPunctuator$1,value:st,start:et,end:index$3};if(ot=st.substr(0,2),rt===ot[1]&&"+-<>&|".indexOf(rt)>=0||ot==="=>")return index$3+=2,{type:TokenPunctuator$1,value:ot,start:et,end:index$3};if(ot==="//"&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),"<>=!+-*%&|^/".indexOf(rt)>=0)return++index$3,{type:TokenPunctuator$1,value:rt,start:et,end:index$3};throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2)}function scanHexLiteral$1(et){let tt="";for(;index$3<length$1&&isHexDigit$1(source$1[index$3]);)tt+=source$1[index$3++];return tt.length===0&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),isIdentifierStart$1(source$1.charCodeAt(index$3))&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),{type:TokenNumericLiteral$1,value:parseInt("0x"+tt,16),start:et,end:index$3}}function scanOctalLiteral$1(et){let tt="0"+source$1[index$3++];for(;index$3<length$1&&isOctalDigit$1(source$1[index$3]);)tt+=source$1[index$3++];return(isIdentifierStart$1(source$1.charCodeAt(index$3))||isDecimalDigit$1(source$1.charCodeAt(index$3)))&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),{type:TokenNumericLiteral$1,value:parseInt(tt,8),octal:!0,start:et,end:index$3}}function scanNumericLiteral$1(){var et,tt,nt;if(nt=source$1[index$3],assert$1(isDecimalDigit$1(nt.charCodeAt(0))||nt===".","Numeric literal must start with a decimal digit or a decimal point"),tt=index$3,et="",nt!=="."){if(et=source$1[index$3++],nt=source$1[index$3],et==="0"){if(nt==="x"||nt==="X")return++index$3,scanHexLiteral$1(tt);if(isOctalDigit$1(nt))return scanOctalLiteral$1(tt);nt&&isDecimalDigit$1(nt.charCodeAt(0))&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2)}for(;isDecimalDigit$1(source$1.charCodeAt(index$3));)et+=source$1[index$3++];nt=source$1[index$3]}if(nt==="."){for(et+=source$1[index$3++];isDecimalDigit$1(source$1.charCodeAt(index$3));)et+=source$1[index$3++];nt=source$1[index$3]}if(nt==="e"||nt==="E")if(et+=source$1[index$3++],nt=source$1[index$3],(nt==="+"||nt==="-")&&(et+=source$1[index$3++]),isDecimalDigit$1(source$1.charCodeAt(index$3)))for(;isDecimalDigit$1(source$1.charCodeAt(index$3));)et+=source$1[index$3++];else throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2);return isIdentifierStart$1(source$1.charCodeAt(index$3))&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),{type:TokenNumericLiteral$1,value:parseFloat(et),start:tt,end:index$3}}function scanStringLiteral$1(){var et="",tt,nt,rt,ot,st=!1;for(tt=source$1[index$3],assert$1(tt==="'"||tt==='"',"String literal must starts with a quote"),nt=index$3,++index$3;index$3<length$1;)if(rt=source$1[index$3++],rt===tt){tt="";break}else if(rt==="\\")if(rt=source$1[index$3++],!rt||!isLineTerminator$1(rt.charCodeAt(0)))switch(rt){case"u":case"x":source$1[index$3]==="{"?(++index$3,et+=scanUnicodeCodePointEscape$1()):et+=scanHexEscape$1(rt);break;case"n":et+=`
`;break;case"r":et+="\r";break;case"t":et+="	";break;case"b":et+="\b";break;case"f":et+="\f";break;case"v":et+="\v";break;default:isOctalDigit$1(rt)?(ot="01234567".indexOf(rt),ot!==0&&(st=!0),index$3<length$1&&isOctalDigit$1(source$1[index$3])&&(st=!0,ot=ot*8+"01234567".indexOf(source$1[index$3++]),"0123".indexOf(rt)>=0&&index$3<length$1&&isOctalDigit$1(source$1[index$3])&&(ot=ot*8+"01234567".indexOf(source$1[index$3++]))),et+=String.fromCharCode(ot)):et+=rt;break}else rt==="\r"&&source$1[index$3]===`
`&&++index$3;else{if(isLineTerminator$1(rt.charCodeAt(0)))break;et+=rt}return tt!==""&&throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2),{type:TokenStringLiteral$1,value:et,octal:st,start:nt,end:index$3}}function testRegExp$1(et,tt){let nt=et;tt.indexOf("u")>=0&&(nt=nt.replace(/\\u\{([0-9a-fA-F]+)\}/g,(rt,ot)=>{if(parseInt(ot,16)<=1114111)return"x";throwError$1({},MessageInvalidRegExp$1)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(nt)}catch{throwError$1({},MessageInvalidRegExp$1)}try{return new RegExp(et,tt)}catch{return null}}function scanRegExpBody$1(){var et,tt,nt,rt,ot;for(et=source$1[index$3],assert$1(et==="/","Regular expression literal must start with a slash"),tt=source$1[index$3++],nt=!1,rt=!1;index$3<length$1;)if(et=source$1[index$3++],tt+=et,et==="\\")et=source$1[index$3++],isLineTerminator$1(et.charCodeAt(0))&&throwError$1({},MessageUnterminatedRegExp$1),tt+=et;else if(isLineTerminator$1(et.charCodeAt(0)))throwError$1({},MessageUnterminatedRegExp$1);else if(nt)et==="]"&&(nt=!1);else if(et==="/"){rt=!0;break}else et==="["&&(nt=!0);return rt||throwError$1({},MessageUnterminatedRegExp$1),ot=tt.substr(1,tt.length-2),{value:ot,literal:tt}}function scanRegExpFlags$1(){var et,tt,nt;for(tt="",nt="";index$3<length$1&&(et=source$1[index$3],!!isIdentifierPart$1(et.charCodeAt(0)));)++index$3,et==="\\"&&index$3<length$1?throwError$1({},MessageUnexpectedToken$1,ILLEGAL$2):(nt+=et,tt+=et);return nt.search(/[^gimuy]/g)>=0&&throwError$1({},MessageInvalidRegExp$1,nt),{value:nt,literal:tt}}function scanRegExp$1(){var et,tt,nt,rt;return lookahead$1=null,skipComment$1(),et=index$3,tt=scanRegExpBody$1(),nt=scanRegExpFlags$1(),rt=testRegExp$1(tt.value,nt.value),{literal:tt.literal+nt.literal,value:rt,regex:{pattern:tt.value,flags:nt.value},start:et,end:index$3}}function isIdentifierName$1(et){return et.type===TokenIdentifier$1||et.type===TokenKeyword$1||et.type===TokenBooleanLiteral$1||et.type===TokenNullLiteral$1}function advance$1(){if(skipComment$1(),index$3>=length$1)return{type:TokenEOF$1,start:index$3,end:index$3};const et=source$1.charCodeAt(index$3);return isIdentifierStart$1(et)?scanIdentifier$1():et===40||et===41||et===59?scanPunctuator$1():et===39||et===34?scanStringLiteral$1():et===46?isDecimalDigit$1(source$1.charCodeAt(index$3+1))?scanNumericLiteral$1():scanPunctuator$1():isDecimalDigit$1(et)?scanNumericLiteral$1():scanPunctuator$1()}function lex$1(){const et=lookahead$1;return index$3=et.end,lookahead$1=advance$1(),index$3=et.end,et}function peek$1(){const et=index$3;lookahead$1=advance$1(),index$3=et}function finishArrayExpression$1(et){const tt=new ASTNode$1(SyntaxArrayExpression$1);return tt.elements=et,tt}function finishBinaryExpression$1(et,tt,nt){const rt=new ASTNode$1(et==="||"||et==="&&"?SyntaxLogicalExpression$1:SyntaxBinaryExpression$1);return rt.operator=et,rt.left=tt,rt.right=nt,rt}function finishCallExpression$1(et,tt){const nt=new ASTNode$1(SyntaxCallExpression$1);return nt.callee=et,nt.arguments=tt,nt}function finishConditionalExpression$1(et,tt,nt){const rt=new ASTNode$1(SyntaxConditionalExpression$1);return rt.test=et,rt.consequent=tt,rt.alternate=nt,rt}function finishIdentifier$1(et){const tt=new ASTNode$1(SyntaxIdentifier$1);return tt.name=et,tt}function finishLiteral$1(et){const tt=new ASTNode$1(SyntaxLiteral$1);return tt.value=et.value,tt.raw=source$1.slice(et.start,et.end),et.regex&&(tt.raw==="//"&&(tt.raw="/(?:)/"),tt.regex=et.regex),tt}function finishMemberExpression$1(et,tt,nt){const rt=new ASTNode$1(SyntaxMemberExpression$1);return rt.computed=et==="[",rt.object=tt,rt.property=nt,rt.computed||(nt.member=!0),rt}function finishObjectExpression$1(et){const tt=new ASTNode$1(SyntaxObjectExpression$1);return tt.properties=et,tt}function finishProperty$1(et,tt,nt){const rt=new ASTNode$1(SyntaxProperty$1);return rt.key=tt,rt.value=nt,rt.kind=et,rt}function finishUnaryExpression$1(et,tt){const nt=new ASTNode$1(SyntaxUnaryExpression$1);return nt.operator=et,nt.argument=tt,nt.prefix=!0,nt}function throwError$1(et,tt){var nt,rt=Array.prototype.slice.call(arguments,2),ot=tt.replace(/%(\d)/g,(st,ut)=>(assert$1(ut<rt.length,"Message reference must be in range"),rt[ut]));throw nt=new Error(ot),nt.index=index$3,nt.description=ot,nt}function throwUnexpected$1(et){et.type===TokenEOF$1&&throwError$1(et,MessageUnexpectedEOS$1),et.type===TokenNumericLiteral$1&&throwError$1(et,MessageUnexpectedNumber$1),et.type===TokenStringLiteral$1&&throwError$1(et,MessageUnexpectedString$1),et.type===TokenIdentifier$1&&throwError$1(et,MessageUnexpectedIdentifier$1),et.type===TokenKeyword$1&&throwError$1(et,MessageUnexpectedReserved$1),throwError$1(et,MessageUnexpectedToken$1,et.value)}function expect$1(et){const tt=lex$1();(tt.type!==TokenPunctuator$1||tt.value!==et)&&throwUnexpected$1(tt)}function match$3(et){return lookahead$1.type===TokenPunctuator$1&&lookahead$1.value===et}function matchKeyword$1(et){return lookahead$1.type===TokenKeyword$1&&lookahead$1.value===et}function parseArrayInitialiser$1(){const et=[];for(index$3=lookahead$1.start,expect$1("[");!match$3("]");)match$3(",")?(lex$1(),et.push(null)):(et.push(parseConditionalExpression$1()),match$3("]")||expect$1(","));return lex$1(),finishArrayExpression$1(et)}function parseObjectPropertyKey$1(){index$3=lookahead$1.start;const et=lex$1();return et.type===TokenStringLiteral$1||et.type===TokenNumericLiteral$1?(et.octal&&throwError$1(et,MessageStrictOctalLiteral$1),finishLiteral$1(et)):finishIdentifier$1(et.value)}function parseObjectProperty$1(){var et,tt,nt,rt;if(index$3=lookahead$1.start,et=lookahead$1,et.type===TokenIdentifier$1)return nt=parseObjectPropertyKey$1(),expect$1(":"),rt=parseConditionalExpression$1(),finishProperty$1("init",nt,rt);if(et.type===TokenEOF$1||et.type===TokenPunctuator$1)throwUnexpected$1(et);else return tt=parseObjectPropertyKey$1(),expect$1(":"),rt=parseConditionalExpression$1(),finishProperty$1("init",tt,rt)}function parseObjectInitialiser$1(){var et=[],tt,nt,rt,ot={},st=String;for(index$3=lookahead$1.start,expect$1("{");!match$3("}");)tt=parseObjectProperty$1(),tt.key.type===SyntaxIdentifier$1?nt=tt.key.name:nt=st(tt.key.value),rt="$"+nt,Object.prototype.hasOwnProperty.call(ot,rt)?throwError$1({},MessageStrictDuplicateProperty$1):ot[rt]=!0,et.push(tt),match$3("}")||expect$1(",");return expect$1("}"),finishObjectExpression$1(et)}function parseGroupExpression$1(){expect$1("(");const et=parseExpression$2();return expect$1(")"),et}const legalKeywords$1={if:1};function parsePrimaryExpression$1(){var et,tt,nt;if(match$3("("))return parseGroupExpression$1();if(match$3("["))return parseArrayInitialiser$1();if(match$3("{"))return parseObjectInitialiser$1();if(et=lookahead$1.type,index$3=lookahead$1.start,et===TokenIdentifier$1||legalKeywords$1[lookahead$1.value])nt=finishIdentifier$1(lex$1().value);else if(et===TokenStringLiteral$1||et===TokenNumericLiteral$1)lookahead$1.octal&&throwError$1(lookahead$1,MessageStrictOctalLiteral$1),nt=finishLiteral$1(lex$1());else{if(et===TokenKeyword$1)throw new Error(DISABLED$1);et===TokenBooleanLiteral$1?(tt=lex$1(),tt.value=tt.value==="true",nt=finishLiteral$1(tt)):et===TokenNullLiteral$1?(tt=lex$1(),tt.value=null,nt=finishLiteral$1(tt)):match$3("/")||match$3("/=")?(nt=finishLiteral$1(scanRegExp$1()),peek$1()):throwUnexpected$1(lex$1())}return nt}function parseArguments$1(){const et=[];if(expect$1("("),!match$3(")"))for(;index$3<length$1&&(et.push(parseConditionalExpression$1()),!match$3(")"));)expect$1(",");return expect$1(")"),et}function parseNonComputedProperty$1(){index$3=lookahead$1.start;const et=lex$1();return isIdentifierName$1(et)||throwUnexpected$1(et),finishIdentifier$1(et.value)}function parseNonComputedMember$1(){return expect$1("."),parseNonComputedProperty$1()}function parseComputedMember$1(){expect$1("[");const et=parseExpression$2();return expect$1("]"),et}function parseLeftHandSideExpressionAllowCall$1(){var et,tt,nt;for(et=parsePrimaryExpression$1();;)if(match$3("."))nt=parseNonComputedMember$1(),et=finishMemberExpression$1(".",et,nt);else if(match$3("("))tt=parseArguments$1(),et=finishCallExpression$1(et,tt);else if(match$3("["))nt=parseComputedMember$1(),et=finishMemberExpression$1("[",et,nt);else break;return et}function parsePostfixExpression$1(){const et=parseLeftHandSideExpressionAllowCall$1();if(lookahead$1.type===TokenPunctuator$1&&(match$3("++")||match$3("--")))throw new Error(DISABLED$1);return et}function parseUnaryExpression$1(){var et,tt;if(lookahead$1.type!==TokenPunctuator$1&&lookahead$1.type!==TokenKeyword$1)tt=parsePostfixExpression$1();else{if(match$3("++")||match$3("--"))throw new Error(DISABLED$1);if(match$3("+")||match$3("-")||match$3("~")||match$3("!"))et=lex$1(),tt=parseUnaryExpression$1(),tt=finishUnaryExpression$1(et.value,tt);else{if(matchKeyword$1("delete")||matchKeyword$1("void")||matchKeyword$1("typeof"))throw new Error(DISABLED$1);tt=parsePostfixExpression$1()}}return tt}function binaryPrecedence$1(et){let tt=0;if(et.type!==TokenPunctuator$1&&et.type!==TokenKeyword$1)return 0;switch(et.value){case"||":tt=1;break;case"&&":tt=2;break;case"|":tt=3;break;case"^":tt=4;break;case"&":tt=5;break;case"==":case"!=":case"===":case"!==":tt=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":tt=7;break;case"<<":case">>":case">>>":tt=8;break;case"+":case"-":tt=9;break;case"*":case"/":case"%":tt=11;break}return tt}function parseBinaryExpression$1(){var et,tt,nt,rt,ot,st,ut,ct,ft,pt;if(et=lookahead$1,ft=parseUnaryExpression$1(),rt=lookahead$1,ot=binaryPrecedence$1(rt),ot===0)return ft;for(rt.prec=ot,lex$1(),tt=[et,lookahead$1],ut=parseUnaryExpression$1(),st=[ft,rt,ut];(ot=binaryPrecedence$1(lookahead$1))>0;){for(;st.length>2&&ot<=st[st.length-2].prec;)ut=st.pop(),ct=st.pop().value,ft=st.pop(),tt.pop(),nt=finishBinaryExpression$1(ct,ft,ut),st.push(nt);rt=lex$1(),rt.prec=ot,st.push(rt),tt.push(lookahead$1),nt=parseUnaryExpression$1(),st.push(nt)}for(pt=st.length-1,nt=st[pt],tt.pop();pt>1;)tt.pop(),nt=finishBinaryExpression$1(st[pt-1].value,st[pt-2],nt),pt-=2;return nt}function parseConditionalExpression$1(){var et,tt,nt;return et=parseBinaryExpression$1(),match$3("?")&&(lex$1(),tt=parseConditionalExpression$1(),expect$1(":"),nt=parseConditionalExpression$1(),et=finishConditionalExpression$1(et,tt,nt)),et}function parseExpression$2(){const et=parseConditionalExpression$1();if(match$3(","))throw new Error(DISABLED$1);return et}function parser$2(et){source$1=et,index$3=0,length$1=source$1.length,lookahead$1=null,peek$1();const tt=parseExpression$2();if(lookahead$1.type!==TokenEOF$1)throw new Error("Unexpect token after expression.");return tt}var Constants$1={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function Functions$1(et){function tt(ut,ct,ft,pt){let ht=et(ct[0]);return ft&&(ht=ft+"("+ht+")",ft.lastIndexOf("new ",0)===0&&(ht="("+ht+")")),ht+"."+ut+(pt<0?"":pt===0?"()":"("+ct.slice(1).map(et).join(",")+")")}function nt(ut,ct,ft){return pt=>tt(ut,pt,ct,ft)}const rt="new Date",ot="String",st="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(ut){ut.length<3&&error("Missing arguments to clamp function."),ut.length>3&&error("Too many arguments to clamp function.");const ct=ut.map(et);return"Math.max("+ct[1]+", Math.min("+ct[2]+","+ct[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:rt,date:nt("getDate",rt,0),day:nt("getDay",rt,0),year:nt("getFullYear",rt,0),month:nt("getMonth",rt,0),hours:nt("getHours",rt,0),minutes:nt("getMinutes",rt,0),seconds:nt("getSeconds",rt,0),milliseconds:nt("getMilliseconds",rt,0),time:nt("getTime",rt,0),timezoneoffset:nt("getTimezoneOffset",rt,0),utcdate:nt("getUTCDate",rt,0),utcday:nt("getUTCDay",rt,0),utcyear:nt("getUTCFullYear",rt,0),utcmonth:nt("getUTCMonth",rt,0),utchours:nt("getUTCHours",rt,0),utcminutes:nt("getUTCMinutes",rt,0),utcseconds:nt("getUTCSeconds",rt,0),utcmilliseconds:nt("getUTCMilliseconds",rt,0),length:nt("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:nt("toUpperCase",ot,0),lower:nt("toLowerCase",ot,0),substring:nt("substring",ot),split:nt("split",ot),trim:nt("trim",ot,0),regexp:st,test:nt("test",st),if:function(ut){ut.length<3&&error("Missing arguments to if function."),ut.length>3&&error("Too many arguments to if function.");const ct=ut.map(et);return"("+ct[0]+"?"+ct[1]+":"+ct[2]+")"}}}function stripQuotes(et){const tt=et&&et.length-1;return tt&&(et[0]==='"'&&et[tt]==='"'||et[0]==="'"&&et[tt]==="'")?et.slice(1,-1):et}function codegen(et){et=et||{};const tt=et.allowed?toSet(et.allowed):{},nt=et.forbidden?toSet(et.forbidden):{},rt=et.constants||Constants$1,ot=(et.functions||Functions$1)(mt),st=et.globalvar,ut=et.fieldvar,ct=isFunction$3(st)?st:Tt=>`${st}["${Tt}"]`;let ft={},pt={},ht=0;function mt(Tt){if(isString(Tt))return Tt;const Et=yt[Tt.type];return Et==null&&error("Unsupported type: "+Tt.type),Et(Tt)}const yt={Literal:Tt=>Tt.raw,Identifier:Tt=>{const Et=Tt.name;return ht>0?Et:has$1(nt,Et)?error("Illegal identifier: "+Et):has$1(rt,Et)?rt[Et]:has$1(tt,Et)?Et:(ft[Et]=1,ct(Et))},MemberExpression:Tt=>{const Et=!Tt.computed,xt=mt(Tt.object);Et&&(ht+=1);const At=mt(Tt.property);return xt===ut&&(pt[stripQuotes(At)]=1),Et&&(ht-=1),xt+(Et?"."+At:"["+At+"]")},CallExpression:Tt=>{Tt.callee.type!=="Identifier"&&error("Illegal callee type: "+Tt.callee.type);const Et=Tt.callee.name,xt=Tt.arguments,At=has$1(ot,Et)&&ot[Et];return At||error("Unrecognized function: "+Et),isFunction$3(At)?At(xt):At+"("+xt.map(mt).join(",")+")"},ArrayExpression:Tt=>"["+Tt.elements.map(mt).join(",")+"]",BinaryExpression:Tt=>"("+mt(Tt.left)+" "+Tt.operator+" "+mt(Tt.right)+")",UnaryExpression:Tt=>"("+Tt.operator+mt(Tt.argument)+")",ConditionalExpression:Tt=>"("+mt(Tt.test)+"?"+mt(Tt.consequent)+":"+mt(Tt.alternate)+")",LogicalExpression:Tt=>"("+mt(Tt.left)+Tt.operator+mt(Tt.right)+")",ObjectExpression:Tt=>"{"+Tt.properties.map(mt).join(",")+"}",Property:Tt=>{ht+=1;const Et=mt(Tt.key);return ht-=1,Et+":"+mt(Tt.value)}};function vt(Tt){const Et={code:mt(Tt),globals:Object.keys(ft),fields:Object.keys(pt)};return ft={},pt={},Et}return vt.functions=ot,vt.constants=rt,vt}function ascending(et,tt){return et==null||tt==null?NaN:et<tt?-1:et>tt?1:et>=tt?0:NaN}function descending(et,tt){return et==null||tt==null?NaN:tt<et?-1:tt>et?1:tt>=et?0:NaN}function bisector(et){let tt,nt,rt;et.length!==2?(tt=ascending,nt=(ct,ft)=>ascending(et(ct),ft),rt=(ct,ft)=>et(ct)-ft):(tt=et===ascending||et===descending?et:zero$2,nt=et,rt=et);function ot(ct,ft,pt=0,ht=ct.length){if(pt<ht){if(tt(ft,ft)!==0)return ht;do{const mt=pt+ht>>>1;nt(ct[mt],ft)<0?pt=mt+1:ht=mt}while(pt<ht)}return pt}function st(ct,ft,pt=0,ht=ct.length){if(pt<ht){if(tt(ft,ft)!==0)return ht;do{const mt=pt+ht>>>1;nt(ct[mt],ft)<=0?pt=mt+1:ht=mt}while(pt<ht)}return pt}function ut(ct,ft,pt=0,ht=ct.length){const mt=ot(ct,ft,pt,ht-1);return mt>pt&&rt(ct[mt-1],ft)>-rt(ct[mt],ft)?mt-1:mt}return{left:ot,center:ut,right:st}}function zero$2(){return 0}function intersection(et,...tt){et=new InternSet(et),tt=tt.map(set$1);e:for(const nt of et)for(const rt of tt)if(!rt.has(nt)){et.delete(nt);continue e}return et}function set$1(et){return et instanceof InternSet?et:new InternSet(et)}function union(...et){const tt=new InternSet;for(const nt of et)for(const rt of nt)tt.add(rt);return tt}const Intersect="intersect",Union="union",VlMulti="vlMulti",VlPoint="vlPoint",Or="or",And="and",SelectionId="_vgsid_",$selectionId=field$1(SelectionId),TYPE_ENUM="E",TYPE_RANGE_INC="R",TYPE_RANGE_EXC="R-E",TYPE_RANGE_LE="R-LE",TYPE_RANGE_RE="R-RE",UNIT_INDEX="index:unit";function testPoint(et,tt){for(var nt=tt.fields,rt=tt.values,ot=nt.length,st=0,ut,ct;st<ot;++st)if(ct=nt[st],ct.getter=field$1.getter||field$1(ct.field),ut=ct.getter(et),isDate$1(ut)&&(ut=toNumber(ut)),isDate$1(rt[st])&&(rt[st]=toNumber(rt[st])),isDate$1(rt[st][0])&&(rt[st]=rt[st].map(toNumber)),ct.type===TYPE_ENUM){if(isArray(rt[st])?rt[st].indexOf(ut)<0:ut!==rt[st])return!1}else if(ct.type===TYPE_RANGE_INC){if(!inrange(ut,rt[st]))return!1}else if(ct.type===TYPE_RANGE_RE){if(!inrange(ut,rt[st],!0,!1))return!1}else if(ct.type===TYPE_RANGE_EXC){if(!inrange(ut,rt[st],!1,!1))return!1}else if(ct.type===TYPE_RANGE_LE&&!inrange(ut,rt[st],!1,!0))return!1;return!0}function selectionTest(et,tt,nt){for(var rt=this.context.data[et],ot=rt?rt.values.value:[],st=rt?rt[UNIT_INDEX]&&rt[UNIT_INDEX].value:void 0,ut=nt===Intersect,ct=ot.length,ft=0,pt,ht,mt,yt,vt;ft<ct;++ft)if(pt=ot[ft],st&&ut){if(ht=ht||{},mt=ht[yt=pt.unit]||0,mt===-1)continue;if(vt=testPoint(tt,pt),ht[yt]=vt?-1:++mt,vt&&st.size===1)return!0;if(!vt&&mt===st.get(yt).count)return!1}else if(vt=testPoint(tt,pt),ut^vt)return vt;return ct&&ut}const bisect=bisector($selectionId),bisectLeft=bisect.left,bisectRight=bisect.right;function selectionIdTest(et,tt,nt){const rt=this.context.data[et],ot=rt?rt.values.value:[],st=rt?rt[UNIT_INDEX]&&rt[UNIT_INDEX].value:void 0,ut=nt===Intersect,ct=$selectionId(tt),ft=bisectLeft(ot,ct);if(ft===ot.length||$selectionId(ot[ft])!==ct)return!1;if(st&&ut){if(st.size===1)return!0;if(bisectRight(ot,ct)-ft<st.size)return!1}return!0}function selectionTuples(et,tt){return et.map(nt=>extend$1(tt.fields?{values:tt.fields.map(rt=>(rt.getter||(rt.getter=field$1(rt.field)))(nt.datum))}:{[SelectionId]:$selectionId(nt.datum)},tt))}function selectionResolve(et,tt,nt,rt){for(var ot=this.context.data[et],st=ot?ot.values.value:[],ut={},ct={},ft={},pt,ht,mt,yt,vt,Tt,Et,xt,At,Ct,$t=st.length,Ot=0,Rt,It;Ot<$t;++Ot)if(pt=st[Ot],yt=pt.unit,ht=pt.fields,mt=pt.values,ht&&mt){for(Rt=0,It=ht.length;Rt<It;++Rt)vt=ht[Rt],Et=ut[vt.field]||(ut[vt.field]={}),xt=Et[yt]||(Et[yt]=[]),ft[vt.field]=At=vt.type.charAt(0),Ct=ops[`${At}_union`],Et[yt]=Ct(xt,array$5(mt[Rt]));nt&&(xt=ct[yt]||(ct[yt]=[]),xt.push(array$5(mt).reduce((kt,Mt,Ft)=>(kt[ht[Ft].field]=Mt,kt),{})))}else vt=SelectionId,Tt=$selectionId(pt),Et=ut[vt]||(ut[vt]={}),xt=Et[yt]||(Et[yt]=[]),xt.push(Tt),nt&&(xt=ct[yt]||(ct[yt]=[]),xt.push({[SelectionId]:Tt}));if(tt=tt||Union,ut[SelectionId]?ut[SelectionId]=ops[`${SelectionId}_${tt}`](...Object.values(ut[SelectionId])):Object.keys(ut).forEach(kt=>{ut[kt]=Object.keys(ut[kt]).map(Mt=>ut[kt][Mt]).reduce((Mt,Ft)=>Mt===void 0?Ft:ops[`${ft[kt]}_${tt}`](Mt,Ft))}),st=Object.keys(ct),nt&&st.length){const kt=rt?VlPoint:VlMulti;ut[kt]=tt===Union?{[Or]:st.reduce((Mt,Ft)=>(Mt.push(...ct[Ft]),Mt),[])}:{[And]:st.map(Mt=>({[Or]:ct[Mt]}))}}return ut}var ops={[`${SelectionId}_union`]:union,[`${SelectionId}_intersect`]:intersection,E_union:function(et,tt){if(!et.length)return tt;for(var nt=0,rt=tt.length;nt<rt;++nt)et.indexOf(tt[nt])<0&&et.push(tt[nt]);return et},E_intersect:function(et,tt){return et.length?et.filter(nt=>tt.indexOf(nt)>=0):tt},R_union:function(et,tt){var nt=toNumber(tt[0]),rt=toNumber(tt[1]);return nt>rt&&(nt=tt[1],rt=tt[0]),et.length?(et[0]>nt&&(et[0]=nt),et[1]<rt&&(et[1]=rt),et):[nt,rt]},R_intersect:function(et,tt){var nt=toNumber(tt[0]),rt=toNumber(tt[1]);return nt>rt&&(nt=tt[1],rt=tt[0]),et.length?rt<et[0]||et[1]<nt?[]:(et[0]<nt&&(et[0]=nt),et[1]>rt&&(et[1]=rt),et):[nt,rt]}};const DataPrefix$1=":",IndexPrefix$1="@";function selectionVisitor(et,tt,nt,rt){tt[0].type!==Literal$1&&error("First argument to selection functions must be a string literal.");const ot=tt[0].value,st=tt.length>=2&&peek$2(tt).value,ut="unit",ct=IndexPrefix$1+ut,ft=DataPrefix$1+ot;st===Intersect&&!has$1(rt,ct)&&(rt[ct]=nt.getData(ot).indataRef(nt,ut)),has$1(rt,ft)||(rt[ft]=nt.getData(ot).tuplesRef())}function data$1(et){const tt=this.context.data[et];return tt?tt.values.value:[]}function indata(et,tt,nt){const rt=this.context.data[et]["index:"+tt],ot=rt?rt.value.get(nt):void 0;return ot&&ot.count}function setdata(et,tt){const nt=this.context.dataflow,rt=this.context.data[et],ot=rt.input;return nt.pulse(ot,nt.changeset().remove(truthy).insert(tt)),1}function encode(et,tt,nt){if(et){const rt=this.context.dataflow,ot=et.mark.source;rt.pulse(ot,rt.changeset().encode(et,tt))}return nt!==void 0?nt:et}const wrap=et=>function(tt,nt){return this.context.dataflow.locale()[et](nt)(tt)},format=wrap("format"),timeFormat$1=wrap("timeFormat"),utcFormat=wrap("utcFormat"),timeParse=wrap("timeParse"),utcParse=wrap("utcParse"),dateObj=new Date(2e3,0,1);function time(et,tt,nt){return!Number.isInteger(et)||!Number.isInteger(tt)?"":(dateObj.setYear(2e3),dateObj.setMonth(et),dateObj.setDate(tt),timeFormat$1.call(this,dateObj,nt))}function monthFormat(et){return time.call(this,et,1,"%B")}function monthAbbrevFormat(et){return time.call(this,et,1,"%b")}function dayFormat(et){return time.call(this,0,2+et,"%A")}function dayAbbrevFormat(et){return time.call(this,0,2+et,"%a")}const DataPrefix=":",IndexPrefix="@",ScalePrefix="%",SignalPrefix="$";function dataVisitor(et,tt,nt,rt){tt[0].type!==Literal$1&&error("First argument to data functions must be a string literal.");const ot=tt[0].value,st=DataPrefix+ot;if(!has$1(st,rt))try{rt[st]=nt.getData(ot).tuplesRef()}catch{}}function indataVisitor(et,tt,nt,rt){tt[0].type!==Literal$1&&error("First argument to indata must be a string literal."),tt[1].type!==Literal$1&&error("Second argument to indata must be a string literal.");const ot=tt[0].value,st=tt[1].value,ut=IndexPrefix+st;has$1(ut,rt)||(rt[ut]=nt.getData(ot).indataRef(nt,st))}function scaleVisitor(et,tt,nt,rt){if(tt[0].type===Literal$1)addScaleDependency(nt,rt,tt[0].value);else for(et in nt.scales)addScaleDependency(nt,rt,et)}function addScaleDependency(et,tt,nt){const rt=ScalePrefix+nt;if(!has$1(tt,rt))try{tt[rt]=et.scaleRef(nt)}catch{}}function getScale$1(et,tt){if(isFunction$3(et))return et;if(isString(et)){const nt=tt.scales[et];return nt&&isRegisteredScale(nt.value)?nt.value:void 0}}function internalScaleFunctions(et,tt,nt){tt.__bandwidth=ot=>ot&&ot.bandwidth?ot.bandwidth():0,nt._bandwidth=scaleVisitor,nt._range=scaleVisitor,nt._scale=scaleVisitor;const rt=ot=>"_["+(ot.type===Literal$1?$(ScalePrefix+ot.value):$(ScalePrefix)+"+"+et(ot))+"]";return{_bandwidth:ot=>`this.__bandwidth(${rt(ot[0])})`,_range:ot=>`${rt(ot[0])}.range()`,_scale:ot=>`${rt(ot[0])}(${et(ot[1])})`}}function geoMethod(et,tt){return function(nt,rt,ot){if(nt){const st=getScale$1(nt,(ot||this).context);return st&&st.path[et](rt)}else return tt(rt)}}const geoArea=geoMethod("area",geoArea$1),geoBounds=geoMethod("bounds",geoBounds$1),geoCentroid=geoMethod("centroid",geoCentroid$1);function inScope(et){const tt=this.context.group;let nt=!1;if(tt)for(;et;){if(et===tt){nt=!0;break}et=et.mark.group}return nt}function log$2(et,tt,nt){try{et[tt].apply(et,["EXPRESSION"].concat([].slice.call(nt)))}catch(rt){et.warn(rt)}return nt[nt.length-1]}function warn$1(){return log$2(this.context.dataflow,"warn",arguments)}function info$1(){return log$2(this.context.dataflow,"info",arguments)}function debug$3(){return log$2(this.context.dataflow,"debug",arguments)}function channel_luminance_value(et){const tt=et/255;return tt<=.03928?tt/12.92:Math.pow((tt+.055)/1.055,2.4)}function luminance(et){const tt=rgb$1(et),nt=channel_luminance_value(tt.r),rt=channel_luminance_value(tt.g),ot=channel_luminance_value(tt.b);return .2126*nt+.7152*rt+.0722*ot}function contrast(et,tt){const nt=luminance(et),rt=luminance(tt),ot=Math.max(nt,rt),st=Math.min(nt,rt);return(ot+.05)/(st+.05)}function merge$1(){const et=[].slice.call(arguments);return et.unshift({}),extend$1(...et)}function equal$1(et,tt){return et===tt||et!==et&&tt!==tt?!0:isArray(et)?isArray(tt)&&et.length===tt.length?equalArray(et,tt):!1:isObject(et)&&isObject(tt)?equalObject(et,tt):!1}function equalArray(et,tt){for(let nt=0,rt=et.length;nt<rt;++nt)if(!equal$1(et[nt],tt[nt]))return!1;return!0}function equalObject(et,tt){for(const nt in et)if(!equal$1(et[nt],tt[nt]))return!1;return!0}function removePredicate(et){return tt=>equalObject(et,tt)}function modify(et,tt,nt,rt,ot,st){const ut=this.context.dataflow,ct=this.context.data[et],ft=ct.input,pt=ut.stamp();let ht=ct.changes,mt,yt;if(ut._trigger===!1||!(ft.value.length||tt||rt))return 0;if((!ht||ht.stamp<pt)&&(ct.changes=ht=ut.changeset(),ht.stamp=pt,ut.runAfter(()=>{ct.modified=!0,ut.pulse(ft,ht).run()},!0,1)),nt&&(mt=nt===!0?truthy:isArray(nt)||isTuple(nt)?nt:removePredicate(nt),ht.remove(mt)),tt&&ht.insert(tt),rt&&(mt=removePredicate(rt),ft.value.some(mt)?ht.remove(mt):ht.insert(rt)),ot)for(yt in st)ht.modify(ot,yt,st[yt]);return 1}function pinchDistance(et){const tt=et.touches,nt=tt[0].clientX-tt[1].clientX,rt=tt[0].clientY-tt[1].clientY;return Math.hypot(nt,rt)}function pinchAngle(et){const tt=et.touches;return Math.atan2(tt[0].clientY-tt[1].clientY,tt[0].clientX-tt[1].clientX)}const accessors={};function pluck(et,tt){const nt=accessors[tt]||(accessors[tt]=field$1(tt));return isArray(et)?et.map(nt):nt(et)}function array(et){return isArray(et)||ArrayBuffer.isView(et)?et:null}function sequence(et){return array(et)||(isString(et)?et:null)}function join$1(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];return array(et).join(...nt)}function indexof(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];return sequence(et).indexOf(...nt)}function lastindexof(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];return sequence(et).lastIndexOf(...nt)}function slice$2(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];return sequence(et).slice(...nt)}function replace(et,tt,nt){return isFunction$3(nt)&&error("Function argument passed to replace."),String(et).replace(tt,nt)}function reverse$1(et){return array(et).slice().reverse()}function bandspace(et,tt,nt){return bandSpace(et||0,tt||0,nt||0)}function bandwidth(et,tt){const nt=getScale$1(et,(tt||this).context);return nt&&nt.bandwidth?nt.bandwidth():0}function copy(et,tt){const nt=getScale$1(et,(tt||this).context);return nt?nt.copy():void 0}function domain$1(et,tt){const nt=getScale$1(et,(tt||this).context);return nt?nt.domain():[]}function invert(et,tt,nt){const rt=getScale$1(et,(nt||this).context);return rt?isArray(tt)?(rt.invertRange||rt.invert)(tt):(rt.invert||rt.invertExtent)(tt):void 0}function range$2(et,tt){const nt=getScale$1(et,(tt||this).context);return nt&&nt.range?nt.range():[]}function scale$2(et,tt,nt){const rt=getScale$1(et,(nt||this).context);return rt?rt(tt):void 0}function scaleGradient(et,tt,nt,rt,ot){et=getScale$1(et,(ot||this).context);const st=Gradient$1(tt,nt);let ut=et.domain(),ct=ut[0],ft=peek$2(ut),pt=identity$6;return ft-ct?pt=scaleFraction(et,ct,ft):et=(et.interpolator?scale$4("sequential")().interpolator(et.interpolator()):scale$4("linear")().interpolate(et.interpolate()).range(et.range())).domain([ct=0,ft=1]),et.ticks&&(ut=et.ticks(+rt||15),ct!==ut[0]&&ut.unshift(ct),ft!==peek$2(ut)&&ut.push(ft)),ut.forEach(ht=>st.stop(pt(ht),et(ht))),st}function geoShape(et,tt,nt){const rt=getScale$1(et,(nt||this).context);return function(ot){return rt?rt.path.context(ot)(tt):""}}function pathShape(et){let tt=null;return function(nt){return nt?pathRender(nt,tt=tt||parse$5(et)):et}}const datum=et=>et.data;function treeNodes(et,tt){const nt=data$1.call(tt,et);return nt.root&&nt.root.lookup||{}}function treePath(et,tt,nt){const rt=treeNodes(et,this),ot=rt[tt],st=rt[nt];return ot&&st?ot.path(st).map(datum):void 0}function treeAncestors(et,tt){const nt=treeNodes(et,this)[tt];return nt?nt.ancestors().map(datum):void 0}const _window=()=>typeof window<"u"&&window||null;function screen(){const et=_window();return et?et.screen:{}}function windowSize(){const et=_window();return et?[et.innerWidth,et.innerHeight]:[void 0,void 0]}function containerSize(){const et=this.context.dataflow,tt=et.container&&et.container();return tt?[tt.clientWidth,tt.clientHeight]:[void 0,void 0]}function intersect(et,tt,nt){if(!et)return[];const[rt,ot]=et,st=new Bounds().set(rt[0],rt[1],ot[0],ot[1]),ut=nt||this.context.dataflow.scenegraph().root;return intersect$2(ut,st,filter(tt))}function filter(et){let tt=null;if(et){const nt=array$5(et.marktype),rt=array$5(et.markname);tt=ot=>(!nt.length||nt.some(st=>ot.marktype===st))&&(!rt.length||rt.some(st=>ot.name===st))}return tt}function lassoAppend(et,tt,nt){let rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5;et=array$5(et);const ot=et[et.length-1];return ot===void 0||Math.hypot(ot[0]-tt,ot[1]-nt)>rt?[...et,[tt,nt]]:et}function lassoPath(et){return array$5(et).reduce((tt,nt,rt)=>{let[ot,st]=nt;return tt+=rt==0?`M ${ot},${st} `:rt===et.length-1?" Z":`L ${ot},${st} `},"")}function intersectLasso(et,tt,nt){const{x:rt,y:ot,mark:st}=nt,ut=new Bounds().set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[ft,pt]of tt)ft<ut.x1&&(ut.x1=ft),ft>ut.x2&&(ut.x2=ft),pt<ut.y1&&(ut.y1=pt),pt>ut.y2&&(ut.y2=pt);return ut.translate(rt,ot),intersect([[ut.x1,ut.y1],[ut.x2,ut.y2]],et,st).filter(ft=>pointInPolygon(ft.x,ft.y,tt))}function pointInPolygon(et,tt,nt){let rt=0;for(let ot=0,st=nt.length-1;ot<nt.length;st=ot++){const[ut,ct]=nt[st],[ft,pt]=nt[ot];pt>tt!=ct>tt&&et<(ut-ft)*(tt-pt)/(ct-pt)+ft&&rt++}return rt&1}const functionContext={random(){return random()},cumulativeNormal,cumulativeLogNormal,cumulativeUniform,densityNormal,densityLogNormal,densityUniform,quantileNormal,quantileLogNormal,quantileUniform,sampleNormal,sampleLogNormal,sampleUniform,isArray,isBoolean:isBoolean$2,isDate:isDate$1,isDefined(et){return et!==void 0},isNumber:isNumber$1,isObject,isRegExp,isString,isTuple,isValid(et){return et!=null&&et===et},toBoolean,toDate(et){return toDate(et)},toNumber,toString:toString$1,indexof,join:join$1,lastindexof,replace,reverse:reverse$1,slice:slice$2,flush,lerp,merge:merge$1,pad:pad$2,peek:peek$2,pluck,span,inrange,truncate:truncate$1,rgb:rgb$1,lab:lab$1,hcl:hcl$2,hsl:hsl$2,luminance,contrast,sequence:range$4,format,utcFormat,utcParse,utcOffset,utcSequence,timeFormat:timeFormat$1,timeParse,timeOffset,timeSequence,timeUnitSpecifier,monthFormat,monthAbbrevFormat,dayFormat,dayAbbrevFormat,quarter,utcquarter,week,utcweek,dayofyear,utcdayofyear,warn:warn$1,info:info$1,debug:debug$3,extent(et){return extent(et)},inScope,intersect,clampRange,pinchDistance,pinchAngle,screen,containerSize,windowSize,bandspace,setdata,pathShape,panLinear,panLog,panPow,panSymlog,zoomLinear,zoomLog,zoomPow,zoomSymlog,encode,modify,lassoAppend,lassoPath,intersectLasso},eventFunctions=["view","item","group","xy","x","y"],eventPrefix="event.vega.",thisPrefix="this.",astVisitors={},codegenParams={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:et=>`_[${$(SignalPrefix+et)}]`,functions:buildFunctions,constants:Constants$1,visitors:astVisitors},codeGenerator=codegen(codegenParams);function buildFunctions(et){const tt=Functions$1(et);eventFunctions.forEach(nt=>tt[nt]=eventPrefix+nt);for(const nt in functionContext)tt[nt]=thisPrefix+nt;return extend$1(tt,internalScaleFunctions(et,functionContext,astVisitors)),tt}function expressionFunction(et,tt,nt){return arguments.length===1?functionContext[et]:(functionContext[et]=tt,nt&&(astVisitors[et]=nt),codeGenerator&&(codeGenerator.functions[et]=thisPrefix+et),this)}expressionFunction("bandwidth",bandwidth,scaleVisitor);expressionFunction("copy",copy,scaleVisitor);expressionFunction("domain",domain$1,scaleVisitor);expressionFunction("range",range$2,scaleVisitor);expressionFunction("invert",invert,scaleVisitor);expressionFunction("scale",scale$2,scaleVisitor);expressionFunction("gradient",scaleGradient,scaleVisitor);expressionFunction("geoArea",geoArea,scaleVisitor);expressionFunction("geoBounds",geoBounds,scaleVisitor);expressionFunction("geoCentroid",geoCentroid,scaleVisitor);expressionFunction("geoShape",geoShape,scaleVisitor);expressionFunction("indata",indata,indataVisitor);expressionFunction("data",data$1,dataVisitor);expressionFunction("treePath",treePath,dataVisitor);expressionFunction("treeAncestors",treeAncestors,dataVisitor);expressionFunction("vlSelectionTest",selectionTest,selectionVisitor);expressionFunction("vlSelectionIdTest",selectionIdTest,selectionVisitor);expressionFunction("vlSelectionResolve",selectionResolve,selectionVisitor);expressionFunction("vlSelectionTuples",selectionTuples);function parser$1(et,tt){const nt={};let rt;try{et=isString(et)?et:$(et)+"",rt=parser$2(et)}catch{error("Expression parse error: "+et)}rt.visit(st=>{if(st.type!==CallExpression$1)return;const ut=st.callee.name,ct=codegenParams.visitors[ut];ct&&ct(ut,st.arguments,tt,nt)});const ot=codeGenerator(rt);return ot.globals.forEach(st=>{const ut=SignalPrefix+st;!has$1(nt,ut)&&tt.getSignal(st)&&(nt[ut]=tt.signalRef(st))}),{$expr:extend$1({code:ot.code},tt.options.ast?{ast:rt}:null),$fields:ot.fields,$params:nt}}function parse$4(et){const tt=this,nt=et.operators||[];return et.background&&(tt.background=et.background),et.eventConfig&&(tt.eventConfig=et.eventConfig),et.locale&&(tt.locale=et.locale),nt.forEach(rt=>tt.parseOperator(rt)),nt.forEach(rt=>tt.parseOperatorParameters(rt)),(et.streams||[]).forEach(rt=>tt.parseStream(rt)),(et.updates||[]).forEach(rt=>tt.parseUpdate(rt)),tt.resolve()}const Skip$2=toSet(["rule"]),Swap=toSet(["group","image","rect"]);function adjustSpatial$1(et,tt){let nt="";return Skip$2[tt]||(et.x2&&(et.x?(Swap[tt]&&(nt+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),nt+="o.width=o.x2-o.x;"):nt+="o.x=o.x2-(o.width||0);"),et.xc&&(nt+="o.x=o.xc-(o.width||0)/2;"),et.y2&&(et.y?(Swap[tt]&&(nt+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),nt+="o.height=o.y2-o.y;"):nt+="o.y=o.y2-(o.height||0);"),et.yc&&(nt+="o.y=o.yc-(o.height||0)/2;")),nt}function canonicalType(et){return(et+"").toLowerCase()}function isOperator(et){return canonicalType(et)==="operator"}function isCollect(et){return canonicalType(et)==="collect"}function expression$2(et,tt,nt){nt.endsWith(";")||(nt="return("+nt+");");const rt=Function(...tt.concat(nt));return et&&et.functions?rt.bind(et.functions):rt}function _compare(et,tt,nt,rt){return`((u = ${et}) < (v = ${tt}) || u == null) && v != null ? ${nt}
  : (u > v || v == null) && u != null ? ${rt}
  : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${nt}
  : v !== v && u === u ? ${rt} : `}var expressionCodegen={operator:(et,tt)=>expression$2(et,["_"],tt.code),parameter:(et,tt)=>expression$2(et,["datum","_"],tt.code),event:(et,tt)=>expression$2(et,["event"],tt.code),handler:(et,tt)=>{const nt=`var datum=event.item&&event.item.datum;return ${tt.code};`;return expression$2(et,["_","event"],nt)},encode:(et,tt)=>{const{marktype:nt,channels:rt}=tt;let ot="var o=item,datum=o.datum,m=0,$;";for(const st in rt){const ut="o["+$(st)+"]";ot+=`$=${rt[st].code};if(${ut}!==$)${ut}=$,m=1;`}return ot+=adjustSpatial$1(rt,nt),ot+="return m;",expression$2(et,["item","_"],ot)},codegen:{get(et){const tt=`[${et.map($).join("][")}]`,nt=Function("_",`return _${tt};`);return nt.path=tt,nt},comparator(et,tt){let nt;const rt=(st,ut)=>{const ct=tt[ut];let ft,pt;return st.path?(ft=`a${st.path}`,pt=`b${st.path}`):((nt=nt||{})["f"+ut]=st,ft=`this.f${ut}(a)`,pt=`this.f${ut}(b)`),_compare(ft,pt,-ct,ct)},ot=Function("a","b","var u, v; return "+et.map(rt).join("")+"0;");return nt?ot.bind(nt):ot}}};function parseOperator(et){const tt=this;isOperator(et.type)||!et.type?tt.operator(et,et.update?tt.operatorExpression(et.update):null):tt.transform(et,et.type)}function parseOperatorParameters(et){const tt=this;if(et.params){const nt=tt.get(et.id);nt||error("Invalid operator id: "+et.id),tt.dataflow.connect(nt,nt.parameters(tt.parseParameters(et.params),et.react,et.initonly))}}function parseParameters$1(et,tt){tt=tt||{};const nt=this;for(const rt in et){const ot=et[rt];tt[rt]=isArray(ot)?ot.map(st=>parseParameter$2(st,nt,tt)):parseParameter$2(ot,nt,tt)}return tt}function parseParameter$2(et,tt,nt){if(!et||!isObject(et))return et;for(let rt=0,ot=PARSERS.length,st;rt<ot;++rt)if(st=PARSERS[rt],has$1(et,st.key))return st.parse(et,tt,nt);return et}var PARSERS=[{key:"$ref",parse:getOperator},{key:"$key",parse:getKey},{key:"$expr",parse:getExpression},{key:"$field",parse:getField},{key:"$encode",parse:getEncode},{key:"$compare",parse:getCompare},{key:"$context",parse:getContext},{key:"$subflow",parse:getSubflow},{key:"$tupleid",parse:getTupleId}];function getOperator(et,tt){return tt.get(et.$ref)||error("Operator not defined: "+et.$ref)}function getExpression(et,tt,nt){et.$params&&tt.parseParameters(et.$params,nt);const rt="e:"+et.$expr.code;return tt.fn[rt]||(tt.fn[rt]=accessor(tt.parameterExpression(et.$expr),et.$fields))}function getKey(et,tt){const nt="k:"+et.$key+"_"+!!et.$flat;return tt.fn[nt]||(tt.fn[nt]=key$2(et.$key,et.$flat,tt.expr.codegen))}function getField(et,tt){if(!et.$field)return null;const nt="f:"+et.$field+"_"+et.$name;return tt.fn[nt]||(tt.fn[nt]=field$1(et.$field,et.$name,tt.expr.codegen))}function getCompare(et,tt){const nt="c:"+et.$compare+"_"+et.$order,rt=array$5(et.$compare).map(ot=>ot&&ot.$tupleid?tupleid:ot);return tt.fn[nt]||(tt.fn[nt]=compare$9(rt,et.$order,tt.expr.codegen))}function getEncode(et,tt){const nt=et.$encode,rt={};for(const ot in nt){const st=nt[ot];rt[ot]=accessor(tt.encodeExpression(st.$expr),st.$fields),rt[ot].output=st.$output}return rt}function getContext(et,tt){return tt}function getSubflow(et,tt){const nt=et.$subflow;return function(rt,ot,st){const ut=tt.fork().parse(nt),ct=ut.get(nt.operators[0].id),ft=ut.signals.parent;return ft&&ft.set(st),ct.detachSubflow=()=>tt.detach(ut),ct}}function getTupleId(){return tupleid}function parseStream$2(et){var tt=this,nt=et.filter!=null?tt.eventExpression(et.filter):void 0,rt=et.stream!=null?tt.get(et.stream):void 0,ot;et.source?rt=tt.events(et.source,et.type,nt):et.merge&&(ot=et.merge.map(st=>tt.get(st)),rt=ot[0].merge.apply(ot[0],ot.slice(1))),et.between&&(ot=et.between.map(st=>tt.get(st)),rt=rt.between(ot[0],ot[1])),et.filter&&(rt=rt.filter(nt)),et.throttle!=null&&(rt=rt.throttle(+et.throttle)),et.debounce!=null&&(rt=rt.debounce(+et.debounce)),rt==null&&error("Invalid stream definition: "+JSON.stringify(et)),et.consume&&rt.consume(!0),tt.stream(et,rt)}function parseUpdate$1(et){var tt=this,nt=isObject(nt=et.source)?nt.$ref:nt,rt=tt.get(nt),ot=null,st=et.update,ut=void 0;rt||error("Source not defined: "+et.source),ot=et.target&&et.target.$expr?tt.eventExpression(et.target.$expr):tt.get(et.target),st&&st.$expr&&(st.$params&&(ut=tt.parseParameters(st.$params)),st=tt.handlerExpression(st.$expr)),tt.update(et,rt,ot,st,ut)}const SKIP={skip:!0};function getState$1(et){var tt=this,nt={};if(et.signals){var rt=nt.signals={};Object.keys(tt.signals).forEach(st=>{const ut=tt.signals[st];et.signals(st,ut)&&(rt[st]=ut.value)})}if(et.data){var ot=nt.data={};Object.keys(tt.data).forEach(st=>{const ut=tt.data[st];et.data(st,ut)&&(ot[st]=ut.input.value)})}return tt.subcontext&&et.recurse!==!1&&(nt.subcontext=tt.subcontext.map(st=>st.getState(et))),nt}function setState$1(et){var tt=this,nt=tt.dataflow,rt=et.data,ot=et.signals;Object.keys(ot||{}).forEach(st=>{nt.update(tt.signals[st],ot[st],SKIP)}),Object.keys(rt||{}).forEach(st=>{nt.pulse(tt.data[st].input,nt.changeset().remove(truthy).insert(rt[st]))}),(et.subcontext||[]).forEach((st,ut)=>{const ct=tt.subcontext[ut];ct&&ct.setState(st)})}function context$1(et,tt,nt,rt){return new Context(et,tt,nt,rt)}function Context(et,tt,nt,rt){this.dataflow=et,this.transforms=tt,this.events=et.events.bind(et),this.expr=rt||expressionCodegen,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},nt&&(this.functions=Object.create(nt),this.functions.context=this)}function Subcontext(et){this.dataflow=et.dataflow,this.transforms=et.transforms,this.events=et.events,this.expr=et.expr,this.signals=Object.create(et.signals),this.scales=Object.create(et.scales),this.nodes=Object.create(et.nodes),this.data=Object.create(et.data),this.fn=Object.create(et.fn),et.functions&&(this.functions=Object.create(et.functions),this.functions.context=this)}Context.prototype=Subcontext.prototype={fork(){const et=new Subcontext(this);return(this.subcontext||(this.subcontext=[])).push(et),et},detach(et){this.subcontext=this.subcontext.filter(nt=>nt!==et);const tt=Object.keys(et.nodes);for(const nt of tt)et.nodes[nt]._targets=null;for(const nt of tt)et.nodes[nt].detach();et.nodes=null},get(et){return this.nodes[et]},set(et,tt){return this.nodes[et]=tt},add(et,tt){const nt=this,rt=nt.dataflow,ot=et.value;if(nt.set(et.id,tt),isCollect(et.type)&&ot&&(ot.$ingest?rt.ingest(tt,ot.$ingest,ot.$format):ot.$request?rt.preload(tt,ot.$request,ot.$format):rt.pulse(tt,rt.changeset().insert(ot))),et.root&&(nt.root=tt),et.parent){let st=nt.get(et.parent.$ref);st?(rt.connect(st,[tt]),tt.targets().add(st)):(nt.unresolved=nt.unresolved||[]).push(()=>{st=nt.get(et.parent.$ref),rt.connect(st,[tt]),tt.targets().add(st)})}if(et.signal&&(nt.signals[et.signal]=tt),et.scale&&(nt.scales[et.scale]=tt),et.data)for(const st in et.data){const ut=nt.data[st]||(nt.data[st]={});et.data[st].forEach(ct=>ut[ct]=tt)}},resolve(){return(this.unresolved||[]).forEach(et=>et()),delete this.unresolved,this},operator(et,tt){this.add(et,this.dataflow.add(et.value,tt))},transform(et,tt){this.add(et,this.dataflow.add(this.transforms[canonicalType(tt)]))},stream(et,tt){this.set(et.id,tt)},update(et,tt,nt,rt,ot){this.dataflow.on(tt,nt,rt,ot,et.options)},operatorExpression(et){return this.expr.operator(this,et)},parameterExpression(et){return this.expr.parameter(this,et)},eventExpression(et){return this.expr.event(this,et)},handlerExpression(et){return this.expr.handler(this,et)},encodeExpression(et){return this.expr.encode(this,et)},parse:parse$4,parseOperator,parseOperatorParameters,parseParameters:parseParameters$1,parseStream:parseStream$2,parseUpdate:parseUpdate$1,getState:getState$1,setState:setState$1};function initializeAria(et){const tt=et.container();tt&&(tt.setAttribute("role","graphics-document"),tt.setAttribute("aria-roleDescription","visualization"),ariaLabel(tt,et.description()))}function ariaLabel(et,tt){et&&(tt==null?et.removeAttribute("aria-label"):et.setAttribute("aria-label",tt))}function background(et){et.add(null,tt=>(et._background=tt.bg,et._resize=1,tt.bg),{bg:et._signals.background})}const Default="default";function cursor$1(et){const tt=et._signals.cursor||(et._signals.cursor=et.add({user:Default,item:null}));et.on(et.events("view","mousemove"),tt,(nt,rt)=>{const ot=tt.value,st=ot?isString(ot)?ot:ot.user:Default,ut=rt.item&&rt.item.cursor||null;return ot&&st===ot.user&&ut==ot.item?ot:{user:st,item:ut}}),et.add(null,function(nt){let rt=nt.cursor,ot=this.value;return isString(rt)||(ot=rt.item,rt=rt.user),setCursor(et,rt&&rt!==Default?rt:ot||rt),ot},{cursor:tt})}function setCursor(et,tt){const nt=et.globalCursor()?typeof document<"u"&&document.body:et.container();if(nt)return tt==null?nt.style.removeProperty("cursor"):nt.style.cursor=tt}function dataref(et,tt){var nt=et._runtime.data;return has$1(nt,tt)||error("Unrecognized data set: "+tt),nt[tt]}function data(et,tt){return arguments.length<2?dataref(this,et).values.value:change.call(this,et,changeset().remove(truthy).insert(tt))}function change(et,tt){isChangeSet(tt)||error("Second argument to changes must be a changeset.");const nt=dataref(this,et);return nt.modified=!0,this.pulse(nt.input,tt)}function insert$1(et,tt){return change.call(this,et,changeset().insert(tt))}function remove(et,tt){return change.call(this,et,changeset().remove(tt))}function width$1(et){var tt=et.padding();return Math.max(0,et._viewWidth+tt.left+tt.right)}function height$1(et){var tt=et.padding();return Math.max(0,et._viewHeight+tt.top+tt.bottom)}function offset$1(et){var tt=et.padding(),nt=et._origin;return[tt.left+nt[0],tt.top+nt[1]]}function resizeRenderer(et){var tt=offset$1(et),nt=width$1(et),rt=height$1(et);et._renderer.background(et.background()),et._renderer.resize(nt,rt,tt),et._handler.origin(tt),et._resizeListeners.forEach(ot=>{try{ot(nt,rt)}catch(st){et.error(st)}})}function eventExtend(et,tt,nt){var rt=et._renderer,ot=rt&&rt.canvas(),st,ut,ct;return ot&&(ct=offset$1(et),ut=tt.changedTouches?tt.changedTouches[0]:tt,st=point$2(ut,ot),st[0]-=ct[0],st[1]-=ct[1]),tt.dataflow=et,tt.item=nt,tt.vega=extension(et,nt,st),tt}function extension(et,tt,nt){const rt=tt?tt.mark.marktype==="group"?tt:tt.mark.group:null;function ot(ut){var ct=rt,ft;if(ut){for(ft=tt;ft;ft=ft.mark.group)if(ft.mark.name===ut){ct=ft;break}}return ct&&ct.mark&&ct.mark.interactive?ct:{}}function st(ut){if(!ut)return nt;isString(ut)&&(ut=ot(ut));const ct=nt.slice();for(;ut;)ct[0]-=ut.x||0,ct[1]-=ut.y||0,ut=ut.mark&&ut.mark.group;return ct}return{view:constant$6(et),item:constant$6(tt||{}),group:ot,xy:st,x:ut=>st(ut)[0],y:ut=>st(ut)[1]}}const VIEW$1="view",TIMER="timer",WINDOW="window",NO_TRAP={trap:!1};function initializeEventConfig(et){const tt=extend$1({defaults:{}},et),nt=(rt,ot)=>{ot.forEach(st=>{isArray(rt[st])&&(rt[st]=toSet(rt[st]))})};return nt(tt.defaults,["prevent","allow"]),nt(tt,["view","window","selector"]),tt}function trackEventListener(et,tt,nt,rt){et._eventListeners.push({type:nt,sources:array$5(tt),handler:rt})}function prevent(et,tt){var nt=et._eventConfig.defaults,rt=nt.prevent,ot=nt.allow;return rt===!1||ot===!0?!1:rt===!0||ot===!1?!0:rt?rt[tt]:ot?!ot[tt]:et.preventDefault()}function permit(et,tt,nt){const rt=et._eventConfig&&et._eventConfig[tt];return rt===!1||isObject(rt)&&!rt[nt]?(et.warn(`Blocked ${tt} ${nt} event listener.`),!1):!0}function events$1(et,tt,nt){var rt=this,ot=new EventStream(nt),st=function(pt,ht){rt.runAsync(null,()=>{et===VIEW$1&&prevent(rt,tt)&&pt.preventDefault(),ot.receive(eventExtend(rt,pt,ht))})},ut;if(et===TIMER)permit(rt,"timer",tt)&&rt.timer(st,tt);else if(et===VIEW$1)permit(rt,"view",tt)&&rt.addEventListener(tt,st,NO_TRAP);else if(et===WINDOW?permit(rt,"window",tt)&&typeof window<"u"&&(ut=[window]):typeof document<"u"&&permit(rt,"selector",tt)&&(ut=Array.from(document.querySelectorAll(et))),!ut)rt.warn("Can not resolve event source: "+et);else{for(var ct=0,ft=ut.length;ct<ft;++ct)ut[ct].addEventListener(tt,st);trackEventListener(rt,ut,tt,st)}return ot}function itemFilter(et){return et.item}function markTarget(et){return et.item.mark.source}function invoke(et){return function(tt,nt){return nt.vega.view().changeset().encode(nt.item,et)}}function hover(et,tt){return et=[et||"hover"],tt=[tt||"update",et[0]],this.on(this.events("view","mouseover",itemFilter),markTarget,invoke(et)),this.on(this.events("view","mouseout",itemFilter),markTarget,invoke(tt)),this}function finalize(){var et=this._tooltip,tt=this._timers,nt=this._eventListeners,rt,ot,st;for(rt=tt.length;--rt>=0;)tt[rt].stop();for(rt=nt.length;--rt>=0;)for(st=nt[rt],ot=st.sources.length;--ot>=0;)st.sources[ot].removeEventListener(st.type,st.handler);return et&&et.call(this,this._handler,null,null,null),this}function element(et,tt,nt){const rt=document.createElement(et);for(const ot in tt)rt.setAttribute(ot,tt[ot]);return nt!=null&&(rt.textContent=nt),rt}const BindClass="vega-bind",NameClass="vega-bind-name",RadioClass="vega-bind-radio";function bind(et,tt,nt){if(!tt)return;const rt=nt.param;let ot=nt.state;return ot||(ot=nt.state={elements:null,active:!1,set:null,update:ut=>{ut!=et.signal(rt.signal)&&et.runAsync(null,()=>{ot.source=!0,et.signal(rt.signal,ut)})}},rt.debounce&&(ot.update=debounce$3(rt.debounce,ot.update))),(rt.input==null&&rt.element?target:generate)(ot,tt,rt,et),ot.active||(et.on(et._signals[rt.signal],null,()=>{ot.source?ot.source=!1:ot.set(et.signal(rt.signal))}),ot.active=!0),ot}function target(et,tt,nt,rt){const ot=nt.event||"input",st=()=>et.update(tt.value);rt.signal(nt.signal,tt.value),tt.addEventListener(ot,st),trackEventListener(rt,tt,ot,st),et.set=ut=>{tt.value=ut,tt.dispatchEvent(event(ot))}}function event(et){return typeof Event<"u"?new Event(et):{type:et}}function generate(et,tt,nt,rt){const ot=rt.signal(nt.signal),st=element("div",{class:BindClass}),ut=nt.input==="radio"?st:st.appendChild(element("label"));ut.appendChild(element("span",{class:NameClass},nt.name||nt.signal)),tt.appendChild(st);let ct=form;switch(nt.input){case"checkbox":ct=checkbox;break;case"select":ct=select;break;case"radio":ct=radio;break;case"range":ct=range$1;break}ct(et,ut,nt,ot)}function form(et,tt,nt,rt){const ot=element("input");for(const st in nt)st!=="signal"&&st!=="element"&&ot.setAttribute(st==="input"?"type":st,nt[st]);ot.setAttribute("name",nt.signal),ot.value=rt,tt.appendChild(ot),ot.addEventListener("input",()=>et.update(ot.value)),et.elements=[ot],et.set=st=>ot.value=st}function checkbox(et,tt,nt,rt){const ot={type:"checkbox",name:nt.signal};rt&&(ot.checked=!0);const st=element("input",ot);tt.appendChild(st),st.addEventListener("change",()=>et.update(st.checked)),et.elements=[st],et.set=ut=>st.checked=!!ut||null}function select(et,tt,nt,rt){const ot=element("select",{name:nt.signal}),st=nt.labels||[];nt.options.forEach((ut,ct)=>{const ft={value:ut};valuesEqual(ut,rt)&&(ft.selected=!0),ot.appendChild(element("option",ft,(st[ct]||ut)+""))}),tt.appendChild(ot),ot.addEventListener("change",()=>{et.update(nt.options[ot.selectedIndex])}),et.elements=[ot],et.set=ut=>{for(let ct=0,ft=nt.options.length;ct<ft;++ct)if(valuesEqual(nt.options[ct],ut)){ot.selectedIndex=ct;return}}}function radio(et,tt,nt,rt){const ot=element("span",{class:RadioClass}),st=nt.labels||[];tt.appendChild(ot),et.elements=nt.options.map((ut,ct)=>{const ft={type:"radio",name:nt.signal,value:ut};valuesEqual(ut,rt)&&(ft.checked=!0);const pt=element("input",ft);pt.addEventListener("change",()=>et.update(ut));const ht=element("label",{},(st[ct]||ut)+"");return ht.prepend(pt),ot.appendChild(ht),pt}),et.set=ut=>{const ct=et.elements,ft=ct.length;for(let pt=0;pt<ft;++pt)valuesEqual(ct[pt].value,ut)&&(ct[pt].checked=!0)}}function range$1(et,tt,nt,rt){rt=rt!==void 0?rt:(+nt.max+ +nt.min)/2;const ot=nt.max!=null?nt.max:Math.max(100,+rt)||100,st=nt.min||Math.min(0,ot,+rt)||0,ut=nt.step||tickStep(st,ot,100),ct=element("input",{type:"range",name:nt.signal,min:st,max:ot,step:ut});ct.value=rt;const ft=element("span",{},+rt);tt.appendChild(ct),tt.appendChild(ft);const pt=()=>{ft.textContent=ct.value,et.update(+ct.value)};ct.addEventListener("input",pt),ct.addEventListener("change",pt),et.elements=[ct],et.set=ht=>{ct.value=ht,ft.textContent=ht}}function valuesEqual(et,tt){return et===tt||et+""==tt+""}function initializeRenderer(et,tt,nt,rt,ot,st){return tt=tt||new rt(et.loader()),tt.initialize(nt,width$1(et),height$1(et),offset$1(et),ot,st).background(et.background())}function trap(et,tt){return tt?function(){try{tt.apply(this,arguments)}catch(nt){et.error(nt)}}:null}function initializeHandler(et,tt,nt,rt){const ot=new rt(et.loader(),trap(et,et.tooltip())).scene(et.scenegraph().root).initialize(nt,offset$1(et),et);return tt&&tt.handlers().forEach(st=>{ot.on(st.type,st.handler)}),ot}function initialize(et,tt){const nt=this,rt=nt._renderType,ot=nt._eventConfig.bind,st=renderModule(rt);et=nt._el=et?lookup$1(nt,et,!0):null,initializeAria(nt),st||nt.error("Unrecognized renderer type: "+rt);const ut=st.handler||CanvasHandler,ct=et?st.renderer:st.headless;return nt._renderer=ct?initializeRenderer(nt,nt._renderer,et,ct):null,nt._handler=initializeHandler(nt,nt._handler,et,ut),nt._redraw=!0,et&&ot!=="none"&&(tt=tt?nt._elBind=lookup$1(nt,tt,!0):et.appendChild(element("form",{class:"vega-bindings"})),nt._bind.forEach(ft=>{ft.param.element&&ot!=="container"&&(ft.element=lookup$1(nt,ft.param.element,!!ft.param.input))}),nt._bind.forEach(ft=>{bind(nt,ft.element||tt,ft)})),nt}function lookup$1(et,tt,nt){if(typeof tt=="string")if(typeof document<"u"){if(tt=document.querySelector(tt),!tt)return et.error("Signal bind element not found: "+tt),null}else return et.error("DOM document instance not found."),null;if(tt&&nt)try{tt.textContent=""}catch(rt){tt=null,et.error(rt)}return tt}const number$1=et=>+et||0,paddingObject$1=et=>({top:et,bottom:et,left:et,right:et});function padding$1(et){return isObject(et)?{top:number$1(et.top),bottom:number$1(et.bottom),left:number$1(et.left),right:number$1(et.right)}:paddingObject$1(number$1(et))}async function renderHeadless(et,tt,nt,rt){const ot=renderModule(tt),st=ot&&ot.headless;return st||error("Unrecognized renderer type: "+tt),await et.runAsync(),initializeRenderer(et,null,null,st,nt,rt).renderAsync(et._scenegraph.root)}async function renderToImageURL(et,tt){et!==RenderType.Canvas&&et!==RenderType.SVG&&et!==RenderType.PNG&&error("Unrecognized image type: "+et);const nt=await renderHeadless(this,et,tt);return et===RenderType.SVG?toBlobURL(nt.svg(),"image/svg+xml"):nt.canvas().toDataURL("image/png")}function toBlobURL(et,tt){const nt=new Blob([et],{type:tt});return window.URL.createObjectURL(nt)}async function renderToCanvas(et,tt){return(await renderHeadless(this,RenderType.Canvas,et,tt)).canvas()}async function renderToSVG(et){return(await renderHeadless(this,RenderType.SVG,et)).svg()}function runtime(et,tt,nt){return context$1(et,transforms,functionContext,nt).parse(tt)}function scale$1(et){var tt=this._runtime.scales;return has$1(tt,et)||error("Unrecognized scale or projection: "+et),tt[et].value}var Width="width",Height="height",Padding="padding",Skip$1={skip:!0};function viewWidth(et,tt){var nt=et.autosize(),rt=et.padding();return tt-(nt&&nt.contains===Padding?rt.left+rt.right:0)}function viewHeight(et,tt){var nt=et.autosize(),rt=et.padding();return tt-(nt&&nt.contains===Padding?rt.top+rt.bottom:0)}function initializeResize(et){var tt=et._signals,nt=tt[Width],rt=tt[Height],ot=tt[Padding];function st(){et._autosize=et._resize=1}et._resizeWidth=et.add(null,ct=>{et._width=ct.size,et._viewWidth=viewWidth(et,ct.size),st()},{size:nt}),et._resizeHeight=et.add(null,ct=>{et._height=ct.size,et._viewHeight=viewHeight(et,ct.size),st()},{size:rt});const ut=et.add(null,st,{pad:ot});et._resizeWidth.rank=nt.rank+1,et._resizeHeight.rank=rt.rank+1,ut.rank=ot.rank+1}function resizeView(et,tt,nt,rt,ot,st){this.runAfter(ut=>{let ct=0;ut._autosize=0,ut.width()!==nt&&(ct=1,ut.signal(Width,nt,Skip$1),ut._resizeWidth.skip(!0)),ut.height()!==rt&&(ct=1,ut.signal(Height,rt,Skip$1),ut._resizeHeight.skip(!0)),ut._viewWidth!==et&&(ut._resize=1,ut._viewWidth=et),ut._viewHeight!==tt&&(ut._resize=1,ut._viewHeight=tt),(ut._origin[0]!==ot[0]||ut._origin[1]!==ot[1])&&(ut._resize=1,ut._origin=ot),ct&&ut.run("enter"),st&&ut.runAfter(ft=>ft.resize())},!1,1)}function getState(et){return this._runtime.getState(et||{data:dataTest,signals:signalTest,recurse:!0})}function dataTest(et,tt){return tt.modified&&isArray(tt.input.value)&&et.indexOf("_:vega:_")}function signalTest(et,tt){return!(et==="parent"||tt instanceof transforms.proxy)}function setState(et){return this.runAsync(null,tt=>{tt._trigger=!1,tt._runtime.setState(et)},tt=>{tt._trigger=!0}),this}function timer(et,tt){function nt(rt){et({timestamp:Date.now(),elapsed:rt})}this._timers.push(interval$1(nt,tt))}function defaultTooltip(et,tt,nt,rt){const ot=et.element();ot&&ot.setAttribute("title",formatTooltip(rt))}function formatTooltip(et){return et==null?"":isArray(et)?formatArray(et):isObject(et)&&!isDate$1(et)?formatObject(et):et+""}function formatObject(et){return Object.keys(et).map(tt=>{const nt=et[tt];return tt+": "+(isArray(nt)?formatArray(nt):formatValue$1(nt))}).join(`
`)}function formatArray(et){return"["+et.map(formatValue$1).join(", ")+"]"}function formatValue$1(et){return isArray(et)?"[\u2026]":isObject(et)&&!isDate$1(et)?"{\u2026}":et}function View$1(et,tt){const nt=this;if(tt=tt||{},Dataflow.call(nt),tt.loader&&nt.loader(tt.loader),tt.logger&&nt.logger(tt.logger),tt.logLevel!=null&&nt.logLevel(tt.logLevel),tt.locale||et.locale){const st=extend$1({},et.locale,tt.locale);nt.locale(locale(st.number,st.time))}nt._el=null,nt._elBind=null,nt._renderType=tt.renderer||RenderType.Canvas,nt._scenegraph=new Scenegraph;const rt=nt._scenegraph.root;nt._renderer=null,nt._tooltip=tt.tooltip||defaultTooltip,nt._redraw=!0,nt._handler=new CanvasHandler().scene(rt),nt._globalCursor=!1,nt._preventDefault=!1,nt._timers=[],nt._eventListeners=[],nt._resizeListeners=[],nt._eventConfig=initializeEventConfig(et.eventConfig),nt.globalCursor(nt._eventConfig.globalCursor);const ot=runtime(nt,et,tt.expr);nt._runtime=ot,nt._signals=ot.signals,nt._bind=(et.bindings||[]).map(st=>({state:null,param:extend$1({},st)})),ot.root&&ot.root.set(rt),rt.source=ot.data.root.input,nt.pulse(ot.data.root.input,nt.changeset().insert(rt.items)),nt._width=nt.width(),nt._height=nt.height(),nt._viewWidth=viewWidth(nt,nt._width),nt._viewHeight=viewHeight(nt,nt._height),nt._origin=[0,0],nt._resize=0,nt._autosize=1,initializeResize(nt),background(nt),cursor$1(nt),nt.description(et.description),tt.hover&&nt.hover(),tt.container&&nt.initialize(tt.container,tt.bind)}function lookupSignal(et,tt){return has$1(et._signals,tt)?et._signals[tt]:error("Unrecognized signal name: "+$(tt))}function findOperatorHandler(et,tt){const nt=(et._targets||[]).filter(rt=>rt._update&&rt._update.handler===tt);return nt.length?nt[0]:null}function addOperatorListener(et,tt,nt,rt){let ot=findOperatorHandler(nt,rt);return ot||(ot=trap(et,()=>rt(tt,nt.value)),ot.handler=rt,et.on(nt,null,ot)),et}function removeOperatorListener(et,tt,nt){const rt=findOperatorHandler(tt,nt);return rt&&tt._targets.remove(rt),et}inherits(View$1,Dataflow,{async evaluate(et,tt,nt){if(await Dataflow.prototype.evaluate.call(this,et,tt),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,resizeRenderer(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(rt){this.error(rt)}return nt&&asyncCallback(this,nt),this},dirty(et){this._redraw=!0,this._renderer&&this._renderer.dirty(et)},description(et){if(arguments.length){const tt=et!=null?et+"":null;return tt!==this._desc&&ariaLabel(this._el,this._desc=tt),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(et,tt,nt){const rt=lookupSignal(this,et);return arguments.length===1?rt.value:this.update(rt,tt,nt)},width(et){return arguments.length?this.signal("width",et):this.signal("width")},height(et){return arguments.length?this.signal("height",et):this.signal("height")},padding(et){return arguments.length?this.signal("padding",padding$1(et)):padding$1(this.signal("padding"))},autosize(et){return arguments.length?this.signal("autosize",et):this.signal("autosize")},background(et){return arguments.length?this.signal("background",et):this.signal("background")},renderer(et){return arguments.length?(renderModule(et)||error("Unrecognized renderer type: "+et),et!==this._renderType&&(this._renderType=et,this._resetRenderer()),this):this._renderType},tooltip(et){return arguments.length?(et!==this._tooltip&&(this._tooltip=et,this._resetRenderer()),this):this._tooltip},loader(et){return arguments.length?(et!==this._loader&&(Dataflow.prototype.loader.call(this,et),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(lookupSignal(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:resizeView,addEventListener(et,tt,nt){let rt=tt;return nt&&nt.trap===!1||(rt=trap(this,tt),rt.raw=tt),this._handler.on(et,rt),this},removeEventListener(et,tt){for(var nt=this._handler.handlers(et),rt=nt.length,ot,st;--rt>=0;)if(st=nt[rt].type,ot=nt[rt].handler,et===st&&(tt===ot||tt===ot.raw)){this._handler.off(st,ot);break}return this},addResizeListener(et){const tt=this._resizeListeners;return tt.indexOf(et)<0&&tt.push(et),this},removeResizeListener(et){var tt=this._resizeListeners,nt=tt.indexOf(et);return nt>=0&&tt.splice(nt,1),this},addSignalListener(et,tt){return addOperatorListener(this,et,lookupSignal(this,et),tt)},removeSignalListener(et,tt){return removeOperatorListener(this,lookupSignal(this,et),tt)},addDataListener(et,tt){return addOperatorListener(this,et,dataref(this,et).values,tt)},removeDataListener(et,tt){return removeOperatorListener(this,dataref(this,et).values,tt)},globalCursor(et){if(arguments.length){if(this._globalCursor!==!!et){const tt=setCursor(this,null);this._globalCursor=!!et,tt&&setCursor(this,tt)}return this}else return this._globalCursor},preventDefault(et){return arguments.length?(this._preventDefault=et,this):this._preventDefault},timer,events:events$1,finalize,hover,data,change,insert:insert$1,remove,scale:scale$1,initialize,toImageURL:renderToImageURL,toCanvas:renderToCanvas,toSVG:renderToSVG,getState,setState});const VIEW="view",LBRACK="[",RBRACK="]",LBRACE="{",RBRACE="}",COLON=":",COMMA=",",NAME="@",GT=">",ILLEGAL$1=/[[\]{}]/,DEFAULT_MARKS={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let DEFAULT_SOURCE,MARKS;function eventSelector(et,tt,nt){return DEFAULT_SOURCE=tt||VIEW,MARKS=nt||DEFAULT_MARKS,parseMerge(et.trim()).map(parseSelector)}function isMarkType(et){return MARKS[et]}function find$1(et,tt,nt,rt,ot){const st=et.length;let ut=0,ct;for(;tt<st;++tt){if(ct=et[tt],!ut&&ct===nt)return tt;ot&&ot.indexOf(ct)>=0?--ut:rt&&rt.indexOf(ct)>=0&&++ut}return tt}function parseMerge(et){const tt=[],nt=et.length;let rt=0,ot=0;for(;ot<nt;)ot=find$1(et,ot,COMMA,LBRACK+LBRACE,RBRACK+RBRACE),tt.push(et.substring(rt,ot).trim()),rt=++ot;if(tt.length===0)throw"Empty event selector: "+et;return tt}function parseSelector(et){return et[0]==="["?parseBetween(et):parseStream$1(et)}function parseBetween(et){const tt=et.length;let nt=1,rt;if(nt=find$1(et,nt,RBRACK,LBRACK,RBRACK),nt===tt)throw"Empty between selector: "+et;if(rt=parseMerge(et.substring(1,nt)),rt.length!==2)throw"Between selector must have two elements: "+et;if(et=et.slice(nt+1).trim(),et[0]!==GT)throw"Expected '>' after between selector: "+et;rt=rt.map(parseSelector);const ot=parseSelector(et.slice(1).trim());return ot.between?{between:rt,stream:ot}:(ot.between=rt,ot)}function parseStream$1(et){const tt={source:DEFAULT_SOURCE},nt=[];let rt=[0,0],ot=0,st=0,ut=et.length,ct=0,ft,pt;if(et[ut-1]===RBRACE){if(ct=et.lastIndexOf(LBRACE),ct>=0){try{rt=parseThrottle(et.substring(ct+1,ut-1))}catch{throw"Invalid throttle specification: "+et}et=et.slice(0,ct).trim(),ut=et.length}else throw"Unmatched right brace: "+et;ct=0}if(!ut)throw et;if(et[0]===NAME&&(ot=++ct),ft=find$1(et,ct,COLON),ft<ut&&(nt.push(et.substring(st,ft).trim()),st=ct=++ft),ct=find$1(et,ct,LBRACK),ct===ut)nt.push(et.substring(st,ut).trim());else if(nt.push(et.substring(st,ct).trim()),pt=[],st=++ct,st===ut)throw"Unmatched left bracket: "+et;for(;ct<ut;){if(ct=find$1(et,ct,RBRACK),ct===ut)throw"Unmatched left bracket: "+et;if(pt.push(et.substring(st,ct).trim()),ct<ut-1&&et[++ct]!==LBRACK)throw"Expected left bracket: "+et;st=++ct}if(!(ut=nt.length)||ILLEGAL$1.test(nt[ut-1]))throw"Invalid event selector: "+et;return ut>1?(tt.type=nt[1],ot?tt.markname=nt[0].slice(1):isMarkType(nt[0])?tt.marktype=nt[0]:tt.source=nt[0]):tt.type=nt[0],tt.type.slice(-1)==="!"&&(tt.consume=!0,tt.type=tt.type.slice(0,-1)),pt!=null&&(tt.filter=pt),rt[0]&&(tt.throttle=rt[0]),rt[1]&&(tt.debounce=rt[1]),tt}function parseThrottle(et){const tt=et.split(COMMA);if(!et.length||tt.length>2)throw et;return tt.map(nt=>{const rt=+nt;if(rt!==rt)throw et;return rt})}function parseAutosize(et){return isObject(et)?et:{type:et||"pad"}}const number=et=>+et||0,paddingObject=et=>({top:et,bottom:et,left:et,right:et});function parsePadding(et){return isObject(et)?et.signal?et:{top:number(et.top),bottom:number(et.bottom),left:number(et.left),right:number(et.right)}:paddingObject(number(et))}const encoder=et=>isObject(et)&&!isArray(et)?extend$1({},et):{value:et};function addEncode(et,tt,nt,rt){return nt!=null?(isObject(nt)&&!isArray(nt)||isArray(nt)&&nt.length&&isObject(nt[0])?et.update[tt]=nt:et[rt||"enter"][tt]={value:nt},1):0}function addEncoders(et,tt,nt){for(const rt in tt)addEncode(et,rt,tt[rt]);for(const rt in nt)addEncode(et,rt,nt[rt],"update")}function extendEncode(et,tt,nt){for(const rt in tt)nt&&has$1(nt,rt)||(et[rt]=extend$1(et[rt]||{},tt[rt]));return et}function has(et,tt){return tt&&(tt.enter&&tt.enter[et]||tt.update&&tt.update[et])}const MarkRole="mark",FrameRole="frame",ScopeRole="scope",AxisRole="axis",AxisDomainRole="axis-domain",AxisGridRole="axis-grid",AxisLabelRole="axis-label",AxisTickRole="axis-tick",AxisTitleRole="axis-title",LegendRole="legend",LegendBandRole="legend-band",LegendEntryRole="legend-entry",LegendGradientRole="legend-gradient",LegendLabelRole="legend-label",LegendSymbolRole="legend-symbol",LegendTitleRole="legend-title",TitleRole="title",TitleTextRole="title-text",TitleSubtitleRole="title-subtitle";function applyDefaults(et,tt,nt,rt,ot){const st={},ut={};let ct,ft,pt,ht;ft="lineBreak",tt==="text"&&ot[ft]!=null&&!has(ft,et)&&applyDefault(st,ft,ot[ft]),(nt=="legend"||String(nt).startsWith("axis"))&&(nt=null),ht=nt===FrameRole?ot.group:nt===MarkRole?extend$1({},ot.mark,ot[tt]):null;for(ft in ht)pt=has(ft,et)||(ft==="fill"||ft==="stroke")&&(has("fill",et)||has("stroke",et)),pt||applyDefault(st,ft,ht[ft]);array$5(rt).forEach(mt=>{const yt=ot.style&&ot.style[mt];for(const vt in yt)has(vt,et)||applyDefault(st,vt,yt[vt])}),et=extend$1({},et);for(ft in st)ht=st[ft],ht.signal?(ct=ct||{})[ft]=ht:ut[ft]=ht;return et.enter=extend$1(ut,et.enter),ct&&(et.update=extend$1(ct,et.update)),et}function applyDefault(et,tt,nt){et[tt]=nt&&nt.signal?{signal:nt.signal}:{value:nt}}const scaleRef=et=>isString(et)?$(et):et.signal?`(${et.signal})`:field(et);function entry$1(et){if(et.gradient!=null)return gradient$2(et);let tt=et.signal?`(${et.signal})`:et.color?color$3(et.color):et.field!=null?field(et.field):et.value!==void 0?$(et.value):void 0;return et.scale!=null&&(tt=scale(et,tt)),tt===void 0&&(tt=null),et.exponent!=null&&(tt=`pow(${tt},${property(et.exponent)})`),et.mult!=null&&(tt+=`*${property(et.mult)}`),et.offset!=null&&(tt+=`+${property(et.offset)}`),et.round&&(tt=`round(${tt})`),tt}const _color=(et,tt,nt,rt)=>`(${et}(${[tt,nt,rt].map(entry$1).join(",")})+'')`;function color$3(et){return et.c?_color("hcl",et.h,et.c,et.l):et.h||et.s?_color("hsl",et.h,et.s,et.l):et.l||et.a?_color("lab",et.l,et.a,et.b):et.r||et.g||et.b?_color("rgb",et.r,et.g,et.b):null}function gradient$2(et){const tt=[et.start,et.stop,et.count].map(nt=>nt==null?null:$(nt));for(;tt.length&&peek$2(tt)==null;)tt.pop();return tt.unshift(scaleRef(et.gradient)),`gradient(${tt.join(",")})`}function property(et){return isObject(et)?"("+entry$1(et)+")":et}function field(et){return resolveField(isObject(et)?et:{datum:et})}function resolveField(et){let tt,nt,rt;if(et.signal)tt="datum",rt=et.signal;else if(et.group||et.parent){for(nt=Math.max(1,et.level||1),tt="item";nt-- >0;)tt+=".mark.group";et.parent?(rt=et.parent,tt+=".datum"):rt=et.group}else et.datum?(tt="datum",rt=et.datum):error("Invalid field reference: "+$(et));return et.signal||(rt=isString(rt)?splitAccessPath(rt).map($).join("]["):resolveField(rt)),tt+"["+rt+"]"}function scale(et,tt){const nt=scaleRef(et.scale);return et.range!=null?tt=`lerp(_range(${nt}), ${+et.range})`:(tt!==void 0&&(tt=`_scale(${nt}, ${tt})`),et.band&&(tt=(tt?tt+"+":"")+`_bandwidth(${nt})`+(+et.band==1?"":"*"+property(et.band)),et.extra&&(tt=`(datum.extra ? _scale(${nt}, datum.extra.value) : ${tt})`)),tt==null&&(tt="0")),tt}function rule$1(et){let tt="";return et.forEach(nt=>{const rt=entry$1(nt);tt+=nt.test?`(${nt.test})?${rt}:`:rt}),peek$2(tt)===":"&&(tt+="null"),tt}function parseEncode(et,tt,nt,rt,ot,st){const ut={};st=st||{},st.encoders={$encode:ut},et=applyDefaults(et,tt,nt,rt,ot.config);for(const ct in et)ut[ct]=parseBlock(et[ct],tt,st,ot);return st}function parseBlock(et,tt,nt,rt){const ot={},st={};for(const ut in et)et[ut]!=null&&(ot[ut]=parse$1$1(expr(et[ut]),rt,nt,st));return{$expr:{marktype:tt,channels:ot},$fields:Object.keys(st),$output:Object.keys(et)}}function expr(et){return isArray(et)?rule$1(et):entry$1(et)}function parse$1$1(et,tt,nt,rt){const ot=parser$1(et,tt);return ot.$fields.forEach(st=>rt[st]=1),extend$1(nt,ot.$params),ot.$expr}const OUTER="outer",OUTER_INVALID=["value","update","init","react","bind"];function outerError(et,tt){error(et+' for "outer" push: '+$(tt))}function parseSignal(et,tt){const nt=et.name;if(et.push===OUTER)tt.signals[nt]||outerError("No prior signal definition",nt),OUTER_INVALID.forEach(rt=>{et[rt]!==void 0&&outerError("Invalid property ",rt)});else{const rt=tt.addSignal(nt,et.value);et.react===!1&&(rt.react=!1),et.bind&&tt.addBinding(nt,et.bind)}}function Entry$1(et,tt,nt,rt){this.id=-1,this.type=et,this.value=tt,this.params=nt,rt&&(this.parent=rt)}function entry(et,tt,nt,rt){return new Entry$1(et,tt,nt,rt)}function operator(et,tt){return entry("operator",et,tt)}function ref(et){const tt={$ref:et.id};return et.id<0&&(et.refs=et.refs||[]).push(tt),tt}function fieldRef$1(et,tt){return tt?{$field:et,$name:tt}:{$field:et}}const keyFieldRef=fieldRef$1("key");function compareRef(et,tt){return{$compare:et,$order:tt}}function keyRef(et,tt){const nt={$key:et};return tt&&(nt.$flat=!0),nt}const Ascending="ascending",Descending="descending";function sortKey(et){return isObject(et)?(et.order===Descending?"-":"+")+aggrField(et.op,et.field):""}function aggrField(et,tt){return(et&&et.signal?"$"+et.signal:et||"")+(et&&tt?"_":"")+(tt&&tt.signal?"$"+tt.signal:tt||"")}const Scope$1="scope",View="view";function isSignal(et){return et&&et.signal}function isExpr$1(et){return et&&et.expr}function hasSignal(et){if(isSignal(et))return!0;if(isObject(et)){for(const tt in et)if(hasSignal(et[tt]))return!0}return!1}function value(et,tt){return et??tt}function deref(et){return et&&et.signal||et}const Timer="timer";function parseStream(et,tt){return(et.merge?mergeStream:et.stream?nestedStream:et.type?eventStream:error("Invalid stream specification: "+$(et)))(et,tt)}function eventSource(et){return et===Scope$1?View:et||View}function mergeStream(et,tt){const nt=et.merge.map(ot=>parseStream(ot,tt)),rt=streamParameters({merge:nt},et,tt);return tt.addStream(rt).id}function nestedStream(et,tt){const nt=parseStream(et.stream,tt),rt=streamParameters({stream:nt},et,tt);return tt.addStream(rt).id}function eventStream(et,tt){let nt;et.type===Timer?(nt=tt.event(Timer,et.throttle),et={between:et.between,filter:et.filter}):nt=tt.event(eventSource(et.source),et.type);const rt=streamParameters({stream:nt},et,tt);return Object.keys(rt).length===1?nt:tt.addStream(rt).id}function streamParameters(et,tt,nt){let rt=tt.between;return rt&&(rt.length!==2&&error('Stream "between" parameter must have 2 entries: '+$(tt)),et.between=[parseStream(rt[0],nt),parseStream(rt[1],nt)]),rt=tt.filter?[].concat(tt.filter):[],(tt.marktype||tt.markname||tt.markrole)&&rt.push(filterMark(tt.marktype,tt.markname,tt.markrole)),tt.source===Scope$1&&rt.push("inScope(event.item)"),rt.length&&(et.filter=parser$1("("+rt.join(")&&(")+")",nt).$expr),(rt=tt.throttle)!=null&&(et.throttle=+rt),(rt=tt.debounce)!=null&&(et.debounce=+rt),tt.consume&&(et.consume=!0),et}function filterMark(et,tt,nt){const rt="event.item";return rt+(et&&et!=="*"?"&&"+rt+".mark.marktype==='"+et+"'":"")+(nt?"&&"+rt+".mark.role==='"+nt+"'":"")+(tt?"&&"+rt+".mark.name==='"+tt+"'":"")}const OP_VALUE_EXPR={code:"_.$value",ast:{type:"Identifier",value:"value"}};function parseUpdate(et,tt,nt){const rt=et.encode,ot={target:nt};let st=et.events,ut=et.update,ct=[];st||error("Signal update missing events specification."),isString(st)&&(st=eventSelector(st,tt.isSubscope()?Scope$1:View)),st=array$5(st).filter(ft=>ft.signal||ft.scale?(ct.push(ft),0):1),ct.length>1&&(ct=[mergeSources(ct)]),st.length&&ct.push(st.length>1?{merge:st}:st[0]),rt!=null&&(ut&&error("Signal encode and update are mutually exclusive."),ut="encode(item(),"+$(rt)+")"),ot.update=isString(ut)?parser$1(ut,tt):ut.expr!=null?parser$1(ut.expr,tt):ut.value!=null?ut.value:ut.signal!=null?{$expr:OP_VALUE_EXPR,$params:{$value:tt.signalRef(ut.signal)}}:error("Invalid signal update specification."),et.force&&(ot.options={force:!0}),ct.forEach(ft=>tt.addUpdate(extend$1(streamSource(ft,tt),ot)))}function streamSource(et,tt){return{source:et.signal?tt.signalRef(et.signal):et.scale?tt.scaleRef(et.scale):parseStream(et,tt)}}function mergeSources(et){return{signal:"["+et.map(tt=>tt.scale?'scale("'+tt.scale+'")':tt.signal)+"]"}}function parseSignalUpdates(et,tt){const nt=tt.getSignal(et.name);let rt=et.update;et.init&&(rt?error("Signals can not include both init and update expressions."):(rt=et.init,nt.initonly=!0)),rt&&(rt=parser$1(rt,tt),nt.update=rt.$expr,nt.params=rt.$params),et.on&&et.on.forEach(ot=>parseUpdate(ot,tt,nt.id))}const transform$2=et=>(tt,nt,rt)=>entry(et,nt,tt||void 0,rt),Aggregate=transform$2("aggregate"),AxisTicks=transform$2("axisticks"),Bound=transform$2("bound"),Collect=transform$2("collect"),Compare=transform$2("compare"),DataJoin=transform$2("datajoin"),Encode=transform$2("encode"),Expression=transform$2("expression"),Facet=transform$2("facet"),Field=transform$2("field"),Key$2=transform$2("key"),LegendEntries=transform$2("legendentries"),Load=transform$2("load"),Mark$1=transform$2("mark"),MultiExtent=transform$2("multiextent"),MultiValues=transform$2("multivalues"),Overlap=transform$2("overlap"),Params=transform$2("params"),PreFacet=transform$2("prefacet"),Projection=transform$2("projection"),Proxy$1=transform$2("proxy"),Relay=transform$2("relay"),Render=transform$2("render"),Scale=transform$2("scale"),Sieve=transform$2("sieve"),SortItems=transform$2("sortitems"),ViewLayout=transform$2("viewlayout"),Values=transform$2("values");let FIELD_REF_ID=0;const MULTIDOMAIN_SORT_OPS={min:"min",max:"max",count:"sum"};function initScale(et,tt){const nt=et.type||"linear";isValidScaleType(nt)||error("Unrecognized scale type: "+$(nt)),tt.addScale(et.name,{type:nt,domain:void 0})}function parseScale(et,tt){const nt=tt.getScale(et.name).params;let rt;nt.domain=parseScaleDomain$1(et.domain,et,tt),et.range!=null&&(nt.range=parseScaleRange$1(et,tt,nt)),et.interpolate!=null&&parseScaleInterpolate(et.interpolate,nt),et.nice!=null&&(nt.nice=parseScaleNice(et.nice)),et.bins!=null&&(nt.bins=parseScaleBins(et.bins,tt));for(rt in et)has$1(nt,rt)||rt==="name"||(nt[rt]=parseLiteral(et[rt],tt))}function parseLiteral(et,tt){return isObject(et)?et.signal?tt.signalRef(et.signal):error("Unsupported object: "+$(et)):et}function parseArray(et,tt){return et.signal?tt.signalRef(et.signal):et.map(nt=>parseLiteral(nt,tt))}function dataLookupError(et){error("Can not find data set: "+$(et))}function parseScaleDomain$1(et,tt,nt){if(!et){(tt.domainMin!=null||tt.domainMax!=null)&&error("No scale domain defined for domainMin/domainMax to override.");return}return et.signal?nt.signalRef(et.signal):(isArray(et)?explicitDomain:et.fields?multipleDomain:singularDomain)(et,tt,nt)}function explicitDomain(et,tt,nt){return et.map(rt=>parseLiteral(rt,nt))}function singularDomain(et,tt,nt){const rt=nt.getData(et.data);return rt||dataLookupError(et.data),isDiscrete$2(tt.type)?rt.valuesRef(nt,et.field,parseSort(et.sort,!1)):isQuantile$1(tt.type)?rt.domainRef(nt,et.field):rt.extentRef(nt,et.field)}function multipleDomain(et,tt,nt){const rt=et.data,ot=et.fields.reduce((st,ut)=>(ut=isString(ut)?{data:rt,field:ut}:isArray(ut)||ut.signal?fieldRef(ut,nt):ut,st.push(ut),st),[]);return(isDiscrete$2(tt.type)?ordinalMultipleDomain:isQuantile$1(tt.type)?quantileMultipleDomain:numericMultipleDomain)(et,nt,ot)}function fieldRef(et,tt){const nt="_:vega:_"+FIELD_REF_ID++,rt=Collect({});if(isArray(et))rt.value={$ingest:et};else if(et.signal){const ot="setdata("+$(nt)+","+et.signal+")";rt.params.input=tt.signalRef(ot)}return tt.addDataPipeline(nt,[rt,Sieve({})]),{data:nt,field:"data"}}function ordinalMultipleDomain(et,tt,nt){const rt=parseSort(et.sort,!0);let ot,st;const ut=nt.map(pt=>{const ht=tt.getData(pt.data);return ht||dataLookupError(pt.data),ht.countsRef(tt,pt.field,rt)}),ct={groupby:keyFieldRef,pulse:ut};rt&&(ot=rt.op||"count",st=rt.field?aggrField(ot,rt.field):"count",ct.ops=[MULTIDOMAIN_SORT_OPS[ot]],ct.fields=[tt.fieldRef(st)],ct.as=[st]),ot=tt.add(Aggregate(ct));const ft=tt.add(Collect({pulse:ref(ot)}));return st=tt.add(Values({field:keyFieldRef,sort:tt.sortRef(rt),pulse:ref(ft)})),ref(st)}function parseSort(et,tt){return et&&(!et.field&&!et.op?isObject(et)?et.field="key":et={field:"key"}:!et.field&&et.op!=="count"?error("No field provided for sort aggregate op: "+et.op):tt&&et.field&&et.op&&!MULTIDOMAIN_SORT_OPS[et.op]&&error("Multiple domain scales can not be sorted using "+et.op)),et}function quantileMultipleDomain(et,tt,nt){const rt=nt.map(ot=>{const st=tt.getData(ot.data);return st||dataLookupError(ot.data),st.domainRef(tt,ot.field)});return ref(tt.add(MultiValues({values:rt})))}function numericMultipleDomain(et,tt,nt){const rt=nt.map(ot=>{const st=tt.getData(ot.data);return st||dataLookupError(ot.data),st.extentRef(tt,ot.field)});return ref(tt.add(MultiExtent({extents:rt})))}function parseScaleBins(et,tt){return et.signal||isArray(et)?parseArray(et,tt):tt.objectProperty(et)}function parseScaleNice(et){return isObject(et)?{interval:parseLiteral(et.interval),step:parseLiteral(et.step)}:parseLiteral(et)}function parseScaleInterpolate(et,tt){tt.interpolate=parseLiteral(et.type||et),et.gamma!=null&&(tt.interpolateGamma=parseLiteral(et.gamma))}function parseScaleRange$1(et,tt,nt){const rt=tt.config.range;let ot=et.range;if(ot.signal)return tt.signalRef(ot.signal);if(isString(ot)){if(rt&&has$1(rt,ot))return et=extend$1({},et,{range:rt[ot]}),parseScaleRange$1(et,tt,nt);ot==="width"?ot=[0,{signal:"width"}]:ot==="height"?ot=isDiscrete$2(et.type)?[0,{signal:"height"}]:[{signal:"height"},0]:error("Unrecognized scale range value: "+$(ot))}else if(ot.scheme){nt.scheme=isArray(ot.scheme)?parseArray(ot.scheme,tt):parseLiteral(ot.scheme,tt),ot.extent&&(nt.schemeExtent=parseArray(ot.extent,tt)),ot.count&&(nt.schemeCount=parseLiteral(ot.count,tt));return}else if(ot.step){nt.rangeStep=parseLiteral(ot.step,tt);return}else{if(isDiscrete$2(et.type)&&!isArray(ot))return parseScaleDomain$1(ot,et,tt);isArray(ot)||error("Unsupported range type: "+$(ot))}return ot.map(st=>(isArray(st)?parseArray:parseLiteral)(st,tt))}function parseProjection$1(et,tt){const nt=tt.config.projection||{},rt={};for(const ot in et)ot!=="name"&&(rt[ot]=parseParameter$1(et[ot],ot,tt));for(const ot in nt)rt[ot]==null&&(rt[ot]=parseParameter$1(nt[ot],ot,tt));tt.addProjection(et.name,rt)}function parseParameter$1(et,tt,nt){return isArray(et)?et.map(rt=>parseParameter$1(rt,tt,nt)):isObject(et)?et.signal?nt.signalRef(et.signal):tt==="fit"?et:error("Unsupported parameter object: "+$(et)):et}const Top="top",Left="left",Right="right",Bottom="bottom",Center="center",Vertical="vertical",Start="start",Middle="middle",End="end",Index="index",Label$1="label",Offset="offset",Perc="perc",Perc2="perc2",Value$2="value",GuideLabelStyle="guide-label",GuideTitleStyle="guide-title",GroupTitleStyle="group-title",GroupSubtitleStyle="group-subtitle",Symbols="symbol",Gradient="gradient",Discrete="discrete",Size="size",Shape="shape",Fill="fill",Stroke="stroke",StrokeWidth="strokeWidth",StrokeDash="strokeDash",Opacity="opacity",LegendScales=[Size,Shape,Fill,Stroke,StrokeWidth,StrokeDash,Opacity],Skip={name:1,style:1,interactive:1},zero$1={value:0},one={value:1},GroupMark="group",RectMark="rect",RuleMark="rule",SymbolMark="symbol",TextMark="text";function guideGroup(et){return et.type=GroupMark,et.interactive=et.interactive||!1,et}function lookup(et,tt){const nt=(rt,ot)=>value(et[rt],value(tt[rt],ot));return nt.isVertical=rt=>Vertical===value(et.direction,tt.direction||(rt?tt.symbolDirection:tt.gradientDirection)),nt.gradientLength=()=>value(et.gradientLength,tt.gradientLength||tt.gradientWidth),nt.gradientThickness=()=>value(et.gradientThickness,tt.gradientThickness||tt.gradientHeight),nt.entryColumns=()=>value(et.columns,value(tt.columns,+nt.isVertical(!0))),nt}function getEncoding(et,tt){const nt=tt&&(tt.update&&tt.update[et]||tt.enter&&tt.enter[et]);return nt&&nt.signal?nt:nt?nt.value:null}function getStyle(et,tt,nt){const rt=tt.config.style[nt];return rt&&rt[et]}function anchorExpr(et,tt,nt){return`item.anchor === '${Start}' ? ${et} : item.anchor === '${End}' ? ${tt} : ${nt}`}const alignExpr$1=anchorExpr($(Left),$(Right),$(Center));function tickBand(et){const tt=et("tickBand");let nt=et("tickOffset"),rt,ot;return tt?tt.signal?(rt={signal:`(${tt.signal}) === 'extent' ? 1 : 0.5`},ot={signal:`(${tt.signal}) === 'extent'`},isObject(nt)||(nt={signal:`(${tt.signal}) === 'extent' ? 0 : ${nt}`})):tt==="extent"?(rt=1,ot=!0,nt=0):(rt=.5,ot=!1):(rt=et("bandPosition"),ot=et("tickExtra")),{extra:ot,band:rt,offset:nt}}function extendOffset(et,tt){return tt?et?isObject(et)?Object.assign({},et,{offset:extendOffset(et.offset,tt)}):{value:et,offset:tt}:tt:et}function guideMark(et,tt){return tt?(et.name=tt.name,et.style=tt.style||et.style,et.interactive=!!tt.interactive,et.encode=extendEncode(et.encode,tt,Skip)):et.interactive=!1,et}function legendGradient(et,tt,nt,rt){const ot=lookup(et,nt),st=ot.isVertical(),ut=ot.gradientThickness(),ct=ot.gradientLength();let ft,pt,ht,mt,yt;st?(pt=[0,1],ht=[0,0],mt=ut,yt=ct):(pt=[0,0],ht=[1,0],mt=ct,yt=ut);const vt={enter:ft={opacity:zero$1,x:zero$1,y:zero$1,width:encoder(mt),height:encoder(yt)},update:extend$1({},ft,{opacity:one,fill:{gradient:tt,start:pt,stop:ht}}),exit:{opacity:zero$1}};return addEncoders(vt,{stroke:ot("gradientStrokeColor"),strokeWidth:ot("gradientStrokeWidth")},{opacity:ot("gradientOpacity")}),guideMark({type:RectMark,role:LegendGradientRole,encode:vt},rt)}function legendGradientDiscrete(et,tt,nt,rt,ot){const st=lookup(et,nt),ut=st.isVertical(),ct=st.gradientThickness(),ft=st.gradientLength();let pt,ht,mt,yt,vt="";ut?(pt="y",mt="y2",ht="x",yt="width",vt="1-"):(pt="x",mt="x2",ht="y",yt="height");const Tt={opacity:zero$1,fill:{scale:tt,field:Value$2}};Tt[pt]={signal:vt+"datum."+Perc,mult:ft},Tt[ht]=zero$1,Tt[mt]={signal:vt+"datum."+Perc2,mult:ft},Tt[yt]=encoder(ct);const Et={enter:Tt,update:extend$1({},Tt,{opacity:one}),exit:{opacity:zero$1}};return addEncoders(Et,{stroke:st("gradientStrokeColor"),strokeWidth:st("gradientStrokeWidth")},{opacity:st("gradientOpacity")}),guideMark({type:RectMark,role:LegendBandRole,key:Value$2,from:ot,encode:Et},rt)}const alignExpr=`datum.${Perc}<=0?"${Left}":datum.${Perc}>=1?"${Right}":"${Center}"`,baselineExpr=`datum.${Perc}<=0?"${Bottom}":datum.${Perc}>=1?"${Top}":"${Middle}"`;function legendGradientLabels(et,tt,nt,rt){const ot=lookup(et,tt),st=ot.isVertical(),ut=encoder(ot.gradientThickness()),ct=ot.gradientLength();let ft=ot("labelOverlap"),pt,ht,mt,yt,vt="";const Tt={enter:pt={opacity:zero$1},update:ht={opacity:one,text:{field:Label$1}},exit:{opacity:zero$1}};return addEncoders(Tt,{fill:ot("labelColor"),fillOpacity:ot("labelOpacity"),font:ot("labelFont"),fontSize:ot("labelFontSize"),fontStyle:ot("labelFontStyle"),fontWeight:ot("labelFontWeight"),limit:value(et.labelLimit,tt.gradientLabelLimit)}),st?(pt.align={value:"left"},pt.baseline=ht.baseline={signal:baselineExpr},mt="y",yt="x",vt="1-"):(pt.align=ht.align={signal:alignExpr},pt.baseline={value:"top"},mt="x",yt="y"),pt[mt]=ht[mt]={signal:vt+"datum."+Perc,mult:ct},pt[yt]=ht[yt]=ut,ut.offset=value(et.labelOffset,tt.gradientLabelOffset)||0,ft=ft?{separation:ot("labelSeparation"),method:ft,order:"datum."+Index}:void 0,guideMark({type:TextMark,role:LegendLabelRole,style:GuideLabelStyle,key:Value$2,from:rt,encode:Tt,overlap:ft},nt)}function legendSymbolGroups(et,tt,nt,rt,ot){const st=lookup(et,tt),ut=nt.entries,ct=!!(ut&&ut.interactive),ft=ut?ut.name:void 0,pt=st("clipHeight"),ht=st("symbolOffset"),mt={data:"value"},yt=`(${ot}) ? datum.${Offset} : datum.${Size}`,vt=pt?encoder(pt):{field:Size},Tt=`datum.${Index}`,Et=`max(1, ${ot})`;let xt,At,Ct,$t,Ot;vt.mult=.5,xt={enter:At={opacity:zero$1,x:{signal:yt,mult:.5,offset:ht},y:vt},update:Ct={opacity:one,x:At.x,y:At.y},exit:{opacity:zero$1}};let Rt=null,It=null;et.fill||(Rt=tt.symbolBaseFillColor,It=tt.symbolBaseStrokeColor),addEncoders(xt,{fill:st("symbolFillColor",Rt),shape:st("symbolType"),size:st("symbolSize"),stroke:st("symbolStrokeColor",It),strokeDash:st("symbolDash"),strokeDashOffset:st("symbolDashOffset"),strokeWidth:st("symbolStrokeWidth")},{opacity:st("symbolOpacity")}),LegendScales.forEach(zt=>{et[zt]&&(Ct[zt]=At[zt]={scale:et[zt],field:Value$2})});const kt=guideMark({type:SymbolMark,role:LegendSymbolRole,key:Value$2,from:mt,clip:pt?!0:void 0,encode:xt},nt.symbols),Mt=encoder(ht);Mt.offset=st("labelOffset"),xt={enter:At={opacity:zero$1,x:{signal:yt,offset:Mt},y:vt},update:Ct={opacity:one,text:{field:Label$1},x:At.x,y:At.y},exit:{opacity:zero$1}},addEncoders(xt,{align:st("labelAlign"),baseline:st("labelBaseline"),fill:st("labelColor"),fillOpacity:st("labelOpacity"),font:st("labelFont"),fontSize:st("labelFontSize"),fontStyle:st("labelFontStyle"),fontWeight:st("labelFontWeight"),limit:st("labelLimit")});const Ft=guideMark({type:TextMark,role:LegendLabelRole,style:GuideLabelStyle,key:Value$2,from:mt,encode:xt},nt.labels);return xt={enter:{noBound:{value:!pt},width:zero$1,height:pt?encoder(pt):zero$1,opacity:zero$1},exit:{opacity:zero$1},update:Ct={opacity:one,row:{signal:null},column:{signal:null}}},st.isVertical(!0)?($t=`ceil(item.mark.items.length / ${Et})`,Ct.row.signal=`${Tt}%${$t}`,Ct.column.signal=`floor(${Tt} / ${$t})`,Ot={field:["row",Tt]}):(Ct.row.signal=`floor(${Tt} / ${Et})`,Ct.column.signal=`${Tt} % ${Et}`,Ot={field:Tt}),Ct.column.signal=`(${ot})?${Ct.column.signal}:${Tt}`,rt={facet:{data:rt,name:"value",groupby:Index}},guideGroup({role:ScopeRole,from:rt,encode:extendEncode(xt,ut,Skip),marks:[kt,Ft],name:ft,interactive:ct,sort:Ot})}function legendSymbolLayout(et,tt){const nt=lookup(et,tt);return{align:nt("gridAlign"),columns:nt.entryColumns(),center:{row:!0,column:!1},padding:{row:nt("rowPadding"),column:nt("columnPadding")}}}const isL='item.orient === "left"',isR='item.orient === "right"',isLR=`(${isL} || ${isR})`,isVG=`datum.vgrad && ${isLR}`,baseline$1=anchorExpr('"top"','"bottom"','"middle"'),alignFlip=anchorExpr('"right"','"left"','"center"'),exprAlign=`datum.vgrad && ${isR} ? (${alignFlip}) : (${isLR} && !(datum.vgrad && ${isL})) ? "left" : ${alignExpr$1}`,exprAnchor=`item._anchor || (${isLR} ? "middle" : "start")`,exprAngle=`${isVG} ? (${isL} ? -90 : 90) : 0`,exprBaseline=`${isLR} ? (datum.vgrad ? (${isR} ? "bottom" : "top") : ${baseline$1}) : "top"`;function legendTitle(et,tt,nt,rt){const ot=lookup(et,tt),st={enter:{opacity:zero$1},update:{opacity:one,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:zero$1}};return addEncoders(st,{orient:ot("titleOrient"),_anchor:ot("titleAnchor"),anchor:{signal:exprAnchor},angle:{signal:exprAngle},align:{signal:exprAlign},baseline:{signal:exprBaseline},text:et.title,fill:ot("titleColor"),fillOpacity:ot("titleOpacity"),font:ot("titleFont"),fontSize:ot("titleFontSize"),fontStyle:ot("titleFontStyle"),fontWeight:ot("titleFontWeight"),limit:ot("titleLimit"),lineHeight:ot("titleLineHeight")},{align:ot("titleAlign"),baseline:ot("titleBaseline")}),guideMark({type:TextMark,role:LegendTitleRole,style:GuideTitleStyle,from:rt,encode:st},nt)}function clip(et,tt){let nt;return isObject(et)&&(et.signal?nt=et.signal:et.path?nt="pathShape("+param(et.path)+")":et.sphere&&(nt="geoShape("+param(et.sphere)+', {type: "Sphere"})')),nt?tt.signalRef(nt):!!et}function param(et){return isObject(et)&&et.signal?et.signal:$(et)}function getRole(et){const tt=et.role||"";return!tt.indexOf("axis")||!tt.indexOf("legend")||!tt.indexOf("title")?tt:et.type===GroupMark?ScopeRole:tt||MarkRole}function definition(et){return{marktype:et.type,name:et.name||void 0,role:et.role||getRole(et),zindex:+et.zindex||void 0,aria:et.aria,description:et.description}}function interactive(et,tt){return et&&et.signal?tt.signalRef(et.signal):et!==!1}function parseTransform(et,tt){const nt=definition$1(et.type);nt||error("Unrecognized transform type: "+$(et.type));const rt=entry(nt.type.toLowerCase(),null,parseParameters(nt,et,tt));return et.signal&&tt.addSignal(et.signal,tt.proxy(rt)),rt.metadata=nt.metadata||{},rt}function parseParameters(et,tt,nt){const rt={},ot=et.params.length;for(let st=0;st<ot;++st){const ut=et.params[st];rt[ut.name]=parseParameter(ut,tt,nt)}return rt}function parseParameter(et,tt,nt){const rt=et.type,ot=tt[et.name];if(rt==="index")return parseIndexParameter(et,tt,nt);if(ot===void 0){et.required&&error("Missing required "+$(tt.type)+" parameter: "+$(et.name));return}else{if(rt==="param")return parseSubParameters(et,tt,nt);if(rt==="projection")return nt.projectionRef(tt[et.name])}return et.array&&!isSignal(ot)?ot.map(st=>parameterValue(et,st,nt)):parameterValue(et,ot,nt)}function parameterValue(et,tt,nt){const rt=et.type;if(isSignal(tt))return isExpr(rt)?error("Expression references can not be signals."):isField(rt)?nt.fieldRef(tt):isCompare(rt)?nt.compareRef(tt):nt.signalRef(tt.signal);{const ot=et.expr||isField(rt);return ot&&outerExpr(tt)?nt.exprRef(tt.expr,tt.as):ot&&outerField(tt)?fieldRef$1(tt.field,tt.as):isExpr(rt)?parser$1(tt,nt):isData(rt)?ref(nt.getData(tt).values):isField(rt)?fieldRef$1(tt):isCompare(rt)?nt.compareRef(tt):tt}}function parseIndexParameter(et,tt,nt){return isString(tt.from)||error('Lookup "from" parameter must be a string literal.'),nt.getData(tt.from).lookupRef(nt,tt.key)}function parseSubParameters(et,tt,nt){const rt=tt[et.name];return et.array?(isArray(rt)||error("Expected an array of sub-parameters. Instead: "+$(rt)),rt.map(ot=>parseSubParameter(et,ot,nt))):parseSubParameter(et,rt,nt)}function parseSubParameter(et,tt,nt){const rt=et.params.length;let ot;for(let ut=0;ut<rt;++ut){ot=et.params[ut];for(const ct in ot.key)if(ot.key[ct]!==tt[ct]){ot=null;break}if(ot)break}ot||error("Unsupported parameter: "+$(tt));const st=extend$1(parseParameters(ot,tt,nt),ot.key);return ref(nt.add(Params(st)))}const outerExpr=et=>et&&et.expr,outerField=et=>et&&et.field,isData=et=>et==="data",isExpr=et=>et==="expr",isField=et=>et==="field",isCompare=et=>et==="compare";function parseData$1(et,tt,nt){let rt,ot,st,ut,ct;return et?(rt=et.facet)&&(tt||error("Only group marks can be faceted."),rt.field!=null?ut=ct=getDataRef(rt,nt):(et.data?ct=ref(nt.getData(et.data).aggregate):(st=parseTransform(extend$1({type:"aggregate",groupby:array$5(rt.groupby)},rt.aggregate),nt),st.params.key=nt.keyRef(rt.groupby),st.params.pulse=getDataRef(rt,nt),ut=ct=ref(nt.add(st))),ot=nt.keyRef(rt.groupby,!0))):ut=ref(nt.add(Collect(null,[{}]))),ut||(ut=getDataRef(et,nt)),{key:ot,pulse:ut,parent:ct}}function getDataRef(et,tt){return et.$ref?et:et.data&&et.data.$ref?et.data:ref(tt.getData(et.data).output)}function DataScope(et,tt,nt,rt,ot){this.scope=et,this.input=tt,this.output=nt,this.values=rt,this.aggregate=ot,this.index={}}DataScope.fromEntries=function(et,tt){const nt=tt.length,rt=tt[nt-1],ot=tt[nt-2];let st=tt[0],ut=null,ct=1;for(st&&st.type==="load"&&(st=tt[1]),et.add(tt[0]);ct<nt;++ct)tt[ct].params.pulse=ref(tt[ct-1]),et.add(tt[ct]),tt[ct].type==="aggregate"&&(ut=tt[ct]);return new DataScope(et,st,ot,rt,ut)};function fieldKey(et){return isString(et)?et:null}function addSortField(et,tt,nt){const rt=aggrField(nt.op,nt.field);let ot;if(tt.ops){for(let st=0,ut=tt.as.length;st<ut;++st)if(tt.as[st]===rt)return}else tt.ops=["count"],tt.fields=[null],tt.as=["count"];nt.op&&(tt.ops.push((ot=nt.op.signal)?et.signalRef(ot):nt.op),tt.fields.push(et.fieldRef(nt.field)),tt.as.push(rt))}function cache$3(et,tt,nt,rt,ot,st,ut){const ct=tt[nt]||(tt[nt]={}),ft=sortKey(st);let pt=fieldKey(ot),ht,mt;if(pt!=null&&(et=tt.scope,pt=pt+(ft?"|"+ft:""),ht=ct[pt]),!ht){const yt=st?{field:keyFieldRef,pulse:tt.countsRef(et,ot,st)}:{field:et.fieldRef(ot),pulse:ref(tt.output)};ft&&(yt.sort=et.sortRef(st)),mt=et.add(entry(rt,void 0,yt)),ut&&(tt.index[ot]=mt),ht=ref(mt),pt!=null&&(ct[pt]=ht)}return ht}DataScope.prototype={countsRef(et,tt,nt){const rt=this,ot=rt.counts||(rt.counts={}),st=fieldKey(tt);let ut,ct,ft;return st!=null&&(et=rt.scope,ut=ot[st]),ut?nt&&nt.field&&addSortField(et,ut.agg.params,nt):(ft={groupby:et.fieldRef(tt,"key"),pulse:ref(rt.output)},nt&&nt.field&&addSortField(et,ft,nt),ct=et.add(Aggregate(ft)),ut=et.add(Collect({pulse:ref(ct)})),ut={agg:ct,ref:ref(ut)},st!=null&&(ot[st]=ut)),ut.ref},tuplesRef(){return ref(this.values)},extentRef(et,tt){return cache$3(et,this,"extent","extent",tt,!1)},domainRef(et,tt){return cache$3(et,this,"domain","values",tt,!1)},valuesRef(et,tt,nt){return cache$3(et,this,"vals","values",tt,nt||!0)},lookupRef(et,tt){return cache$3(et,this,"lookup","tupleindex",tt,!1)},indataRef(et,tt){return cache$3(et,this,"indata","tupleindex",tt,!0,!0)}};function parseFacet(et,tt,nt){const rt=et.from.facet,ot=rt.name,st=getDataRef(rt,tt);let ut;rt.name||error("Facet must have a name: "+$(rt)),rt.data||error("Facet must reference a data set: "+$(rt)),rt.field?ut=tt.add(PreFacet({field:tt.fieldRef(rt.field),pulse:st})):rt.groupby?ut=tt.add(Facet({key:tt.keyRef(rt.groupby),group:ref(tt.proxy(nt.parent)),pulse:st})):error("Facet must specify groupby or field: "+$(rt));const ct=tt.fork(),ft=ct.add(Collect()),pt=ct.add(Sieve({pulse:ref(ft)}));ct.addData(ot,new DataScope(ct,ft,ft,pt)),ct.addSignal("parent",null),ut.params.subflow={$subflow:ct.parse(et).toRuntime()}}function parseSubflow(et,tt,nt){const rt=tt.add(PreFacet({pulse:nt.pulse})),ot=tt.fork();ot.add(Sieve()),ot.addSignal("parent",null),rt.params.subflow={$subflow:ot.parse(et).toRuntime()}}function parseTrigger(et,tt,nt){const rt=et.remove,ot=et.insert,st=et.toggle,ut=et.modify,ct=et.values,ft=tt.add(operator()),pt="if("+et.trigger+',modify("'+nt+'",'+[ot,rt,st,ut,ct].map(mt=>mt??"null").join(",")+"),0)",ht=parser$1(pt,tt);ft.update=ht.$expr,ft.params=ht.$params}function parseMark(et,tt){const nt=getRole(et),rt=et.type===GroupMark,ot=et.from&&et.from.facet,st=et.overlap;let ut=et.layout||nt===ScopeRole||nt===FrameRole,ct,ft,pt,ht,mt,yt,vt;const Tt=nt===MarkRole||ut||ot,Et=parseData$1(et.from,rt,tt);ft=tt.add(DataJoin({key:Et.key||(et.key?fieldRef$1(et.key):void 0),pulse:Et.pulse,clean:!rt}));const xt=ref(ft);ft=pt=tt.add(Collect({pulse:xt})),ft=tt.add(Mark$1({markdef:definition(et),interactive:interactive(et.interactive,tt),clip:clip(et.clip,tt),context:{$context:!0},groups:tt.lookup(),parent:tt.signals.parent?tt.signalRef("parent"):null,index:tt.markpath(),pulse:ref(ft)}));const At=ref(ft);ft=ht=tt.add(Encode(parseEncode(et.encode,et.type,nt,et.style,tt,{mod:!1,pulse:At}))),ft.params.parent=tt.encode(),et.transform&&et.transform.forEach(It=>{const kt=parseTransform(It,tt),Mt=kt.metadata;(Mt.generates||Mt.changes)&&error("Mark transforms should not generate new data."),Mt.nomod||(ht.params.mod=!0),kt.params.pulse=ref(ft),tt.add(ft=kt)}),et.sort&&(ft=tt.add(SortItems({sort:tt.compareRef(et.sort),pulse:ref(ft)})));const Ct=ref(ft);(ot||ut)&&(ut=tt.add(ViewLayout({layout:tt.objectProperty(et.layout),legends:tt.legends,mark:At,pulse:Ct})),yt=ref(ut));const $t=tt.add(Bound({mark:At,pulse:yt||Ct}));vt=ref($t),rt&&(Tt&&(ct=tt.operators,ct.pop(),ut&&ct.pop()),tt.pushState(Ct,yt||vt,xt),ot?parseFacet(et,tt,Et):Tt?parseSubflow(et,tt,Et):tt.parse(et),tt.popState(),Tt&&(ut&&ct.push(ut),ct.push($t))),st&&(vt=parseOverlap(st,vt,tt));const Ot=tt.add(Render({pulse:vt})),Rt=tt.add(Sieve({pulse:ref(Ot)},void 0,tt.parent()));et.name!=null&&(mt=et.name,tt.addData(mt,new DataScope(tt,pt,Ot,Rt)),et.on&&et.on.forEach(It=>{(It.insert||It.remove||It.toggle)&&error("Marks only support modify triggers."),parseTrigger(It,tt,mt)}))}function parseOverlap(et,tt,nt){const rt=et.method,ot=et.bound,st=et.separation,ut={separation:isSignal(st)?nt.signalRef(st.signal):st,method:isSignal(rt)?nt.signalRef(rt.signal):rt,pulse:tt};if(et.order&&(ut.sort=nt.compareRef({field:et.order})),ot){const ct=ot.tolerance;ut.boundTolerance=isSignal(ct)?nt.signalRef(ct.signal):+ct,ut.boundScale=nt.scaleRef(ot.scale),ut.boundOrient=ot.orient}return ref(nt.add(Overlap(ut)))}function parseLegend$1(et,tt){const nt=tt.config.legend,rt=et.encode||{},ot=lookup(et,nt),st=rt.legend||{},ut=st.name||void 0,ct=st.interactive,ft=st.style,pt={};let ht=0,mt,yt,vt;LegendScales.forEach($t=>et[$t]?(pt[$t]=et[$t],ht=ht||et[$t]):0),ht||error("Missing valid scale for legend.");const Tt=legendType(et,tt.scaleType(ht)),Et={title:et.title!=null,scales:pt,type:Tt,vgrad:Tt!=="symbol"&&ot.isVertical()},xt=ref(tt.add(Collect(null,[Et]))),At={enter:{x:{value:0},y:{value:0}}},Ct=ref(tt.add(LegendEntries(yt={type:Tt,scale:tt.scaleRef(ht),count:tt.objectProperty(ot("tickCount")),limit:tt.property(ot("symbolLimit")),values:tt.objectProperty(et.values),minstep:tt.property(et.tickMinStep),formatType:tt.property(et.formatType),formatSpecifier:tt.property(et.format)})));return Tt===Gradient?(vt=[legendGradient(et,ht,nt,rt.gradient),legendGradientLabels(et,nt,rt.labels,Ct)],yt.count=yt.count||tt.signalRef(`max(2,2*floor((${deref(ot.gradientLength())})/100))`)):Tt===Discrete?vt=[legendGradientDiscrete(et,ht,nt,rt.gradient,Ct),legendGradientLabels(et,nt,rt.labels,Ct)]:(mt=legendSymbolLayout(et,nt),vt=[legendSymbolGroups(et,nt,rt,Ct,deref(mt.columns))],yt.size=sizeExpression(et,tt,vt[0].marks)),vt=[guideGroup({role:LegendEntryRole,from:xt,encode:At,marks:vt,layout:mt,interactive:ct})],Et.title&&vt.push(legendTitle(et,nt,rt.title,xt)),parseMark(guideGroup({role:LegendRole,from:xt,encode:extendEncode(buildLegendEncode(ot,et,nt),st,Skip),marks:vt,aria:ot("aria"),description:ot("description"),zindex:ot("zindex"),name:ut,interactive:ct,style:ft}),tt)}function legendType(et,tt){let nt=et.type||Symbols;return!et.type&&scaleCount(et)===1&&(et.fill||et.stroke)&&(nt=isContinuous$1(tt)?Gradient:isDiscretizing$1(tt)?Discrete:Symbols),nt!==Gradient?nt:isDiscretizing$1(tt)?Discrete:Gradient}function scaleCount(et){return LegendScales.reduce((tt,nt)=>tt+(et[nt]?1:0),0)}function buildLegendEncode(et,tt,nt){const rt={enter:{},update:{}};return addEncoders(rt,{orient:et("orient"),offset:et("offset"),padding:et("padding"),titlePadding:et("titlePadding"),cornerRadius:et("cornerRadius"),fill:et("fillColor"),stroke:et("strokeColor"),strokeWidth:nt.strokeWidth,strokeDash:nt.strokeDash,x:et("legendX"),y:et("legendY"),format:tt.format,formatType:tt.formatType}),rt}function sizeExpression(et,tt,nt){const rt=deref(getChannel("size",et,nt)),ot=deref(getChannel("strokeWidth",et,nt)),st=deref(getFontSize(nt[1].encode,tt,GuideLabelStyle));return parser$1(`max(ceil(sqrt(${rt})+${ot}),${st})`,tt)}function getChannel(et,tt,nt){return tt[et]?`scale("${tt[et]}",datum)`:getEncoding(et,nt[0].encode)}function getFontSize(et,tt,nt){return getEncoding("fontSize",et)||getStyle("fontSize",tt,nt)}const angleExpr=`item.orient==="${Left}"?-90:item.orient==="${Right}"?90:0`;function parseTitle(et,tt){et=isString(et)?{text:et}:et;const nt=lookup(et,tt.config.title),rt=et.encode||{},ot=rt.group||{},st=ot.name||void 0,ut=ot.interactive,ct=ot.style,ft=[],pt={},ht=ref(tt.add(Collect(null,[pt])));return ft.push(buildTitle(et,nt,titleEncode(et),ht)),et.subtitle&&ft.push(buildSubTitle(et,nt,rt.subtitle,ht)),parseMark(guideGroup({role:TitleRole,from:ht,encode:groupEncode(nt,ot),marks:ft,aria:nt("aria"),description:nt("description"),zindex:nt("zindex"),name:st,interactive:ut,style:ct}),tt)}function titleEncode(et){const tt=et.encode;return tt&&tt.title||extend$1({name:et.name,interactive:et.interactive,style:et.style},tt)}function groupEncode(et,tt){const nt={enter:{},update:{}};return addEncoders(nt,{orient:et("orient"),anchor:et("anchor"),align:{signal:alignExpr$1},angle:{signal:angleExpr},limit:et("limit"),frame:et("frame"),offset:et("offset")||0,padding:et("subtitlePadding")}),extendEncode(nt,tt,Skip)}function buildTitle(et,tt,nt,rt){const ot={value:0},st=et.text,ut={enter:{opacity:ot},update:{opacity:{value:1}},exit:{opacity:ot}};return addEncoders(ut,{text:st,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:tt("dx"),dy:tt("dy"),fill:tt("color"),font:tt("font"),fontSize:tt("fontSize"),fontStyle:tt("fontStyle"),fontWeight:tt("fontWeight"),lineHeight:tt("lineHeight")},{align:tt("align"),angle:tt("angle"),baseline:tt("baseline")}),guideMark({type:TextMark,role:TitleTextRole,style:GroupTitleStyle,from:rt,encode:ut},nt)}function buildSubTitle(et,tt,nt,rt){const ot={value:0},st=et.subtitle,ut={enter:{opacity:ot},update:{opacity:{value:1}},exit:{opacity:ot}};return addEncoders(ut,{text:st,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:tt("dx"),dy:tt("dy"),fill:tt("subtitleColor"),font:tt("subtitleFont"),fontSize:tt("subtitleFontSize"),fontStyle:tt("subtitleFontStyle"),fontWeight:tt("subtitleFontWeight"),lineHeight:tt("subtitleLineHeight")},{align:tt("align"),angle:tt("angle"),baseline:tt("baseline")}),guideMark({type:TextMark,role:TitleSubtitleRole,style:GroupSubtitleStyle,from:rt,encode:ut},nt)}function parseData$2(et,tt){const nt=[];et.transform&&et.transform.forEach(rt=>{nt.push(parseTransform(rt,tt))}),et.on&&et.on.forEach(rt=>{parseTrigger(rt,tt,et.name)}),tt.addDataPipeline(et.name,analyze(et,tt,nt))}function analyze(et,tt,nt){const rt=[];let ot=null,st=!1,ut=!1,ct,ft,pt,ht,mt;for(et.values?isSignal(et.values)||hasSignal(et.format)?(rt.push(load(tt,et)),rt.push(ot=collect())):rt.push(ot=collect({$ingest:et.values,$format:et.format})):et.url?hasSignal(et.url)||hasSignal(et.format)?(rt.push(load(tt,et)),rt.push(ot=collect())):rt.push(ot=collect({$request:et.url,$format:et.format})):et.source&&(ot=ct=array$5(et.source).map(yt=>ref(tt.getData(yt).output)),rt.push(null)),ft=0,pt=nt.length;ft<pt;++ft)ht=nt[ft],mt=ht.metadata,!ot&&!mt.source&&rt.push(ot=collect()),rt.push(ht),mt.generates&&(ut=!0),mt.modifies&&!ut&&(st=!0),mt.source?ot=ht:mt.changes&&(ot=null);return ct&&(pt=ct.length-1,rt[0]=Relay({derive:st,pulse:pt?ct:ct[0]}),(st||pt)&&rt.splice(1,0,collect())),ot||rt.push(collect()),rt.push(Sieve({})),rt}function collect(et){const tt=Collect({},et);return tt.metadata={source:!0},tt}function load(et,tt){return Load({url:tt.url?et.property(tt.url):void 0,async:tt.async?et.property(tt.async):void 0,values:tt.values?et.property(tt.values):void 0,format:et.objectProperty(tt.format)})}const isX=et=>et===Bottom||et===Top,getSign=(et,tt,nt)=>isSignal(et)?ifLeftTopExpr(et.signal,tt,nt):et===Left||et===Top?tt:nt,ifX=(et,tt,nt)=>isSignal(et)?ifXEnc(et.signal,tt,nt):isX(et)?tt:nt,ifY=(et,tt,nt)=>isSignal(et)?ifYEnc(et.signal,tt,nt):isX(et)?nt:tt,ifTop=(et,tt,nt)=>isSignal(et)?ifTopExpr(et.signal,tt,nt):et===Top?{value:tt}:{value:nt},ifRight=(et,tt,nt)=>isSignal(et)?ifRightExpr(et.signal,tt,nt):et===Right?{value:tt}:{value:nt},ifXEnc=(et,tt,nt)=>ifEnc(`${et} === '${Top}' || ${et} === '${Bottom}'`,tt,nt),ifYEnc=(et,tt,nt)=>ifEnc(`${et} !== '${Top}' && ${et} !== '${Bottom}'`,tt,nt),ifLeftTopExpr=(et,tt,nt)=>ifExpr(`${et} === '${Left}' || ${et} === '${Top}'`,tt,nt),ifTopExpr=(et,tt,nt)=>ifExpr(`${et} === '${Top}'`,tt,nt),ifRightExpr=(et,tt,nt)=>ifExpr(`${et} === '${Right}'`,tt,nt),ifEnc=(et,tt,nt)=>(tt=tt!=null?encoder(tt):tt,nt=nt!=null?encoder(nt):nt,isSimple(tt)&&isSimple(nt)?(tt=tt?tt.signal||$(tt.value):null,nt=nt?nt.signal||$(nt.value):null,{signal:`${et} ? (${tt}) : (${nt})`}):[extend$1({test:et},tt)].concat(nt||[])),isSimple=et=>et==null||Object.keys(et).length===1,ifExpr=(et,tt,nt)=>({signal:`${et} ? (${toExpr(tt)}) : (${toExpr(nt)})`}),ifOrient=(et,tt,nt,rt,ot)=>({signal:(rt!=null?`${et} === '${Left}' ? (${toExpr(rt)}) : `:"")+(nt!=null?`${et} === '${Bottom}' ? (${toExpr(nt)}) : `:"")+(ot!=null?`${et} === '${Right}' ? (${toExpr(ot)}) : `:"")+(tt!=null?`${et} === '${Top}' ? (${toExpr(tt)}) : `:"")+"(null)"}),toExpr=et=>isSignal(et)?et.signal:et==null?null:$(et),mult=(et,tt)=>tt===0?0:isSignal(et)?{signal:`(${et.signal}) * ${tt}`}:{value:et*tt},patch=(et,tt)=>{const nt=et.signal;return nt&&nt.endsWith("(null)")?{signal:nt.slice(0,-6)+tt.signal}:et};function fallback(et,tt,nt,rt){let ot;if(tt&&has$1(tt,et))return tt[et];if(has$1(nt,et))return nt[et];if(et.startsWith("title")){switch(et){case"titleColor":ot="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":ot=et[5].toLowerCase()+et.slice(6)}return rt[GuideTitleStyle][ot]}else if(et.startsWith("label")){switch(et){case"labelColor":ot="fill";break;case"labelFont":case"labelFontSize":ot=et[5].toLowerCase()+et.slice(6)}return rt[GuideLabelStyle][ot]}return null}function keys$2(et){const tt={};for(const nt of et)if(!!nt)for(const rt in nt)tt[rt]=1;return Object.keys(tt)}function axisConfig(et,tt){var nt=tt.config,rt=nt.style,ot=nt.axis,st=tt.scaleType(et.scale)==="band"&&nt.axisBand,ut=et.orient,ct,ft,pt;if(isSignal(ut)){const mt=keys$2([nt.axisX,nt.axisY]),yt=keys$2([nt.axisTop,nt.axisBottom,nt.axisLeft,nt.axisRight]);ct={};for(pt of mt)ct[pt]=ifX(ut,fallback(pt,nt.axisX,ot,rt),fallback(pt,nt.axisY,ot,rt));ft={};for(pt of yt)ft[pt]=ifOrient(ut.signal,fallback(pt,nt.axisTop,ot,rt),fallback(pt,nt.axisBottom,ot,rt),fallback(pt,nt.axisLeft,ot,rt),fallback(pt,nt.axisRight,ot,rt))}else ct=ut===Top||ut===Bottom?nt.axisX:nt.axisY,ft=nt["axis"+ut[0].toUpperCase()+ut.slice(1)];return ct||ft||st?extend$1({},ot,ct,ft,st):ot}function axisDomain(et,tt,nt,rt){const ot=lookup(et,tt),st=et.orient;let ut,ct;const ft={enter:ut={opacity:zero$1},update:ct={opacity:one},exit:{opacity:zero$1}};addEncoders(ft,{stroke:ot("domainColor"),strokeCap:ot("domainCap"),strokeDash:ot("domainDash"),strokeDashOffset:ot("domainDashOffset"),strokeWidth:ot("domainWidth"),strokeOpacity:ot("domainOpacity")});const pt=position$1(et,0),ht=position$1(et,1);return ut.x=ct.x=ifX(st,pt,zero$1),ut.x2=ct.x2=ifX(st,ht),ut.y=ct.y=ifY(st,pt,zero$1),ut.y2=ct.y2=ifY(st,ht),guideMark({type:RuleMark,role:AxisDomainRole,from:rt,encode:ft},nt)}function position$1(et,tt){return{scale:et.scale,range:tt}}function axisGrid(et,tt,nt,rt,ot){const st=lookup(et,tt),ut=et.orient,ct=et.gridScale,ft=getSign(ut,1,-1),pt=offsetValue(et.offset,ft);let ht,mt,yt;const vt={enter:ht={opacity:zero$1},update:yt={opacity:one},exit:mt={opacity:zero$1}};addEncoders(vt,{stroke:st("gridColor"),strokeCap:st("gridCap"),strokeDash:st("gridDash"),strokeDashOffset:st("gridDashOffset"),strokeOpacity:st("gridOpacity"),strokeWidth:st("gridWidth")});const Tt={scale:et.scale,field:Value$2,band:ot.band,extra:ot.extra,offset:ot.offset,round:st("tickRound")},Et=ifX(ut,{signal:"height"},{signal:"width"}),xt=ct?{scale:ct,range:0,mult:ft,offset:pt}:{value:0,offset:pt},At=ct?{scale:ct,range:1,mult:ft,offset:pt}:extend$1(Et,{mult:ft,offset:pt});return ht.x=yt.x=ifX(ut,Tt,xt),ht.y=yt.y=ifY(ut,Tt,xt),ht.x2=yt.x2=ifY(ut,At),ht.y2=yt.y2=ifX(ut,At),mt.x=ifX(ut,Tt),mt.y=ifY(ut,Tt),guideMark({type:RuleMark,role:AxisGridRole,key:Value$2,from:rt,encode:vt},nt)}function offsetValue(et,tt){if(tt!==1)if(!isObject(et))et=isSignal(tt)?{signal:`(${tt.signal}) * (${et||0})`}:tt*(et||0);else{let nt=et=extend$1({},et);for(;nt.mult!=null;)if(isObject(nt.mult))nt=nt.mult=extend$1({},nt.mult);else return nt.mult=isSignal(tt)?{signal:`(${nt.mult}) * (${tt.signal})`}:nt.mult*tt,et;nt.mult=tt}return et}function axisTicks(et,tt,nt,rt,ot,st){const ut=lookup(et,tt),ct=et.orient,ft=getSign(ct,-1,1);let pt,ht,mt;const yt={enter:pt={opacity:zero$1},update:mt={opacity:one},exit:ht={opacity:zero$1}};addEncoders(yt,{stroke:ut("tickColor"),strokeCap:ut("tickCap"),strokeDash:ut("tickDash"),strokeDashOffset:ut("tickDashOffset"),strokeOpacity:ut("tickOpacity"),strokeWidth:ut("tickWidth")});const vt=encoder(ot);vt.mult=ft;const Tt={scale:et.scale,field:Value$2,band:st.band,extra:st.extra,offset:st.offset,round:ut("tickRound")};return mt.y=pt.y=ifX(ct,zero$1,Tt),mt.y2=pt.y2=ifX(ct,vt),ht.x=ifX(ct,Tt),mt.x=pt.x=ifY(ct,zero$1,Tt),mt.x2=pt.x2=ifY(ct,vt),ht.y=ifY(ct,Tt),guideMark({type:RuleMark,role:AxisTickRole,key:Value$2,from:rt,encode:yt},nt)}function flushExpr(et,tt,nt,rt,ot){return{signal:'flush(range("'+et+'"), scale("'+et+'", datum.value), '+tt+","+nt+","+rt+","+ot+")"}}function axisLabels(et,tt,nt,rt,ot,st){const ut=lookup(et,tt),ct=et.orient,ft=et.scale,pt=getSign(ct,-1,1),ht=deref(ut("labelFlush")),mt=deref(ut("labelFlushOffset")),yt=ut("labelAlign"),vt=ut("labelBaseline");let Tt=ht===0||!!ht,Et;const xt=encoder(ot);xt.mult=pt,xt.offset=encoder(ut("labelPadding")||0),xt.offset.mult=pt;const At={scale:ft,field:Value$2,band:.5,offset:extendOffset(st.offset,ut("labelOffset"))},Ct=ifX(ct,Tt?flushExpr(ft,ht,'"left"','"right"','"center"'):{value:"center"},ifRight(ct,"left","right")),$t=ifX(ct,ifTop(ct,"bottom","top"),Tt?flushExpr(ft,ht,'"top"','"bottom"','"middle"'):{value:"middle"}),Ot=flushExpr(ft,ht,`-(${mt})`,mt,0);Tt=Tt&&mt;const Rt={opacity:zero$1,x:ifX(ct,At,xt),y:ifY(ct,At,xt)},It={enter:Rt,update:Et={opacity:one,text:{field:Label$1},x:Rt.x,y:Rt.y,align:Ct,baseline:$t},exit:{opacity:zero$1,x:Rt.x,y:Rt.y}};addEncoders(It,{dx:!yt&&Tt?ifX(ct,Ot):null,dy:!vt&&Tt?ifY(ct,Ot):null}),addEncoders(It,{angle:ut("labelAngle"),fill:ut("labelColor"),fillOpacity:ut("labelOpacity"),font:ut("labelFont"),fontSize:ut("labelFontSize"),fontWeight:ut("labelFontWeight"),fontStyle:ut("labelFontStyle"),limit:ut("labelLimit"),lineHeight:ut("labelLineHeight")},{align:yt,baseline:vt});const kt=ut("labelBound");let Mt=ut("labelOverlap");return Mt=Mt||kt?{separation:ut("labelSeparation"),method:Mt,order:"datum.index",bound:kt?{scale:ft,orient:ct,tolerance:kt}:null}:void 0,Et.align!==Ct&&(Et.align=patch(Et.align,Ct)),Et.baseline!==$t&&(Et.baseline=patch(Et.baseline,$t)),guideMark({type:TextMark,role:AxisLabelRole,style:GuideLabelStyle,key:Value$2,from:rt,encode:It,overlap:Mt},nt)}function axisTitle(et,tt,nt,rt){const ot=lookup(et,tt),st=et.orient,ut=getSign(st,-1,1);let ct,ft;const pt={enter:ct={opacity:zero$1,anchor:encoder(ot("titleAnchor",null)),align:{signal:alignExpr$1}},update:ft=extend$1({},ct,{opacity:one,text:encoder(et.title)}),exit:{opacity:zero$1}},ht={signal:`lerp(range("${et.scale}"), ${anchorExpr(0,1,.5)})`};return ft.x=ifX(st,ht),ft.y=ifY(st,ht),ct.angle=ifX(st,zero$1,mult(ut,90)),ct.baseline=ifX(st,ifTop(st,Bottom,Top),{value:Bottom}),ft.angle=ct.angle,ft.baseline=ct.baseline,addEncoders(pt,{fill:ot("titleColor"),fillOpacity:ot("titleOpacity"),font:ot("titleFont"),fontSize:ot("titleFontSize"),fontStyle:ot("titleFontStyle"),fontWeight:ot("titleFontWeight"),limit:ot("titleLimit"),lineHeight:ot("titleLineHeight")},{align:ot("titleAlign"),angle:ot("titleAngle"),baseline:ot("titleBaseline")}),autoLayout(ot,st,pt,nt),pt.update.align=patch(pt.update.align,ct.align),pt.update.angle=patch(pt.update.angle,ct.angle),pt.update.baseline=patch(pt.update.baseline,ct.baseline),guideMark({type:TextMark,role:AxisTitleRole,style:GuideTitleStyle,from:rt,encode:pt},nt)}function autoLayout(et,tt,nt,rt){const ot=(ct,ft)=>ct!=null?(nt.update[ft]=patch(encoder(ct),nt.update[ft]),!1):!has(ft,rt),st=ot(et("titleX"),"x"),ut=ot(et("titleY"),"y");nt.enter.auto=ut===st?encoder(ut):ifX(tt,encoder(ut),encoder(st))}function parseAxis$1(et,tt){const nt=axisConfig(et,tt),rt=et.encode||{},ot=rt.axis||{},st=ot.name||void 0,ut=ot.interactive,ct=ot.style,ft=lookup(et,nt),pt=tickBand(ft),ht={scale:et.scale,ticks:!!ft("ticks"),labels:!!ft("labels"),grid:!!ft("grid"),domain:!!ft("domain"),title:et.title!=null},mt=ref(tt.add(Collect({},[ht]))),yt=ref(tt.add(AxisTicks({scale:tt.scaleRef(et.scale),extra:tt.property(pt.extra),count:tt.objectProperty(et.tickCount),values:tt.objectProperty(et.values),minstep:tt.property(et.tickMinStep),formatType:tt.property(et.formatType),formatSpecifier:tt.property(et.format)}))),vt=[];let Tt;return ht.grid&&vt.push(axisGrid(et,nt,rt.grid,yt,pt)),ht.ticks&&(Tt=ft("tickSize"),vt.push(axisTicks(et,nt,rt.ticks,yt,Tt,pt))),ht.labels&&(Tt=ht.ticks?Tt:0,vt.push(axisLabels(et,nt,rt.labels,yt,Tt,pt))),ht.domain&&vt.push(axisDomain(et,nt,rt.domain,mt)),ht.title&&vt.push(axisTitle(et,nt,rt.title,mt)),parseMark(guideGroup({role:AxisRole,from:mt,encode:extendEncode(buildAxisEncode(ft,et),ot,Skip),marks:vt,aria:ft("aria"),description:ft("description"),zindex:ft("zindex"),name:st,interactive:ut,style:ct}),tt)}function buildAxisEncode(et,tt){const nt={enter:{},update:{}};return addEncoders(nt,{orient:et("orient"),offset:et("offset")||0,position:value(tt.position,0),titlePadding:et("titlePadding"),minExtent:et("minExtent"),maxExtent:et("maxExtent"),range:{signal:`abs(span(range("${tt.scale}")))`},translate:et("translate"),format:tt.format,formatType:tt.formatType}),nt}function parseScope(et,tt,nt){const rt=array$5(et.signals),ot=array$5(et.scales);return nt||rt.forEach(st=>parseSignal(st,tt)),array$5(et.projections).forEach(st=>parseProjection$1(st,tt)),ot.forEach(st=>initScale(st,tt)),array$5(et.data).forEach(st=>parseData$2(st,tt)),ot.forEach(st=>parseScale(st,tt)),(nt||rt).forEach(st=>parseSignalUpdates(st,tt)),array$5(et.axes).forEach(st=>parseAxis$1(st,tt)),array$5(et.marks).forEach(st=>parseMark(st,tt)),array$5(et.legends).forEach(st=>parseLegend$1(st,tt)),et.title&&parseTitle(et.title,tt),tt.parseLambdas(),tt}const rootEncode=et=>extendEncode({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},et);function parseView(et,tt){const nt=tt.config,rt=ref(tt.root=tt.add(operator())),ot=collectSignals(et,nt);ot.forEach(pt=>parseSignal(pt,tt)),tt.description=et.description||nt.description,tt.eventConfig=nt.events,tt.legends=tt.objectProperty(nt.legend&&nt.legend.layout),tt.locale=nt.locale;const st=tt.add(Collect()),ut=tt.add(Encode(parseEncode(rootEncode(et.encode),GroupMark,FrameRole,et.style,tt,{pulse:ref(st)}))),ct=tt.add(ViewLayout({layout:tt.objectProperty(et.layout),legends:tt.legends,autosize:tt.signalRef("autosize"),mark:rt,pulse:ref(ut)}));tt.operators.pop(),tt.pushState(ref(ut),ref(ct),null),parseScope(et,tt,ot),tt.operators.push(ct);let ft=tt.add(Bound({mark:rt,pulse:ref(ct)}));return ft=tt.add(Render({pulse:ref(ft)})),ft=tt.add(Sieve({pulse:ref(ft)})),tt.addData("root",new DataScope(tt,st,st,ft)),tt}function signalObject(et,tt){return tt&&tt.signal?{name:et,update:tt.signal}:{name:et,value:tt}}function collectSignals(et,tt){const nt=ut=>value(et[ut],tt[ut]),rt=[signalObject("background",nt("background")),signalObject("autosize",parseAutosize(nt("autosize"))),signalObject("padding",parsePadding(nt("padding"))),signalObject("width",nt("width")||0),signalObject("height",nt("height")||0)],ot=rt.reduce((ut,ct)=>(ut[ct.name]=ct,ut),{}),st={};return array$5(et.signals).forEach(ut=>{has$1(ot,ut.name)?ut=extend$1(ot[ut.name],ut):rt.push(ut),st[ut.name]=ut}),array$5(tt.signals).forEach(ut=>{!has$1(st,ut.name)&&!has$1(ot,ut.name)&&rt.push(ut)}),rt}function Scope(et,tt){this.config=et||{},this.options=tt||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function Subscope(et){this.config=et.config,this.options=et.options,this.legends=et.legends,this.field=Object.create(et.field),this.signals=Object.create(et.signals),this.lambdas=Object.create(et.lambdas),this.scales=Object.create(et.scales),this.events=Object.create(et.events),this.data=Object.create(et.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++et._nextsub[0],this._nextsub=et._nextsub,this._parent=et._parent.slice(),this._encode=et._encode.slice(),this._lookup=et._lookup.slice(),this._markpath=et._markpath}Scope.prototype=Subscope.prototype={parse(et){return parseScope(et,this)},fork(){return new Subscope(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(et){return this.operators.push(et),et.id=this.id(),et.refs&&(et.refs.forEach(tt=>{tt.$ref=et.id}),et.refs=null),et},proxy(et){const tt=et instanceof Entry$1?ref(et):et;return this.add(Proxy$1({value:tt}))},addStream(et){return this.streams.push(et),et.id=this.id(),et},addUpdate(et){return this.updates.push(et),et},finish(){let et,tt;this.root&&(this.root.root=!0);for(et in this.signals)this.signals[et].signal=et;for(et in this.scales)this.scales[et].scale=et;function nt(rt,ot,st){let ut,ct;rt&&(ut=rt.data||(rt.data={}),ct=ut[ot]||(ut[ot]=[]),ct.push(st))}for(et in this.data){tt=this.data[et],nt(tt.input,et,"input"),nt(tt.output,et,"output"),nt(tt.values,et,"values");for(const rt in tt.index)nt(tt.index[rt],et,"index:"+rt)}return this},pushState(et,tt,nt){this._encode.push(ref(this.add(Sieve({pulse:et})))),this._parent.push(tt),this._lookup.push(nt?ref(this.proxy(nt)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return peek$2(this._parent)},encode(){return peek$2(this._encode)},lookup(){return peek$2(this._lookup)},markpath(){const et=this._markpath;return++et[et.length-1]},fieldRef(et,tt){if(isString(et))return fieldRef$1(et,tt);et.signal||error("Unsupported field reference: "+$(et));const nt=et.signal;let rt=this.field[nt];if(!rt){const ot={name:this.signalRef(nt)};tt&&(ot.as=tt),this.field[nt]=rt=ref(this.add(Field(ot)))}return rt},compareRef(et){let tt=!1;const nt=st=>isSignal(st)?(tt=!0,this.signalRef(st.signal)):isExpr$1(st)?(tt=!0,this.exprRef(st.expr)):st,rt=array$5(et.field).map(nt),ot=array$5(et.order).map(nt);return tt?ref(this.add(Compare({fields:rt,orders:ot}))):compareRef(rt,ot)},keyRef(et,tt){let nt=!1;const rt=st=>isSignal(st)?(nt=!0,ref(ot[st.signal])):st,ot=this.signals;return et=array$5(et).map(rt),nt?ref(this.add(Key$2({fields:et,flat:tt}))):keyRef(et,tt)},sortRef(et){if(!et)return et;const tt=aggrField(et.op,et.field),nt=et.order||Ascending;return nt.signal?ref(this.add(Compare({fields:tt,orders:this.signalRef(nt.signal)}))):compareRef(tt,nt)},event(et,tt){const nt=et+":"+tt;if(!this.events[nt]){const rt=this.id();this.streams.push({id:rt,source:et,type:tt}),this.events[nt]=rt}return this.events[nt]},hasOwnSignal(et){return has$1(this.signals,et)},addSignal(et,tt){this.hasOwnSignal(et)&&error("Duplicate signal name: "+$(et));const nt=tt instanceof Entry$1?tt:this.add(operator(tt));return this.signals[et]=nt},getSignal(et){return this.signals[et]||error("Unrecognized signal name: "+$(et)),this.signals[et]},signalRef(et){return this.signals[et]?ref(this.signals[et]):(has$1(this.lambdas,et)||(this.lambdas[et]=this.add(operator(null))),ref(this.lambdas[et]))},parseLambdas(){const et=Object.keys(this.lambdas);for(let tt=0,nt=et.length;tt<nt;++tt){const rt=et[tt],ot=parser$1(rt,this),st=this.lambdas[rt];st.params=ot.$params,st.update=ot.$expr}},property(et){return et&&et.signal?this.signalRef(et.signal):et},objectProperty(et){return!et||!isObject(et)?et:this.signalRef(et.signal||propertyLambda(et))},exprRef(et,tt){const nt={expr:parser$1(et,this)};return tt&&(nt.expr.$name=tt),ref(this.add(Expression(nt)))},addBinding(et,tt){this.bindings||error("Nested signals do not support binding: "+$(et)),this.bindings.push(extend$1({signal:et},tt))},addScaleProj(et,tt){has$1(this.scales,et)&&error("Duplicate scale or projection name: "+$(et)),this.scales[et]=this.add(tt)},addScale(et,tt){this.addScaleProj(et,Scale(tt))},addProjection(et,tt){this.addScaleProj(et,Projection(tt))},getScale(et){return this.scales[et]||error("Unrecognized scale name: "+$(et)),this.scales[et]},scaleRef(et){return ref(this.getScale(et))},scaleType(et){return this.getScale(et).params.type},projectionRef(et){return this.scaleRef(et)},projectionType(et){return this.scaleType(et)},addData(et,tt){return has$1(this.data,et)&&error("Duplicate data set name: "+$(et)),this.data[et]=tt},getData(et){return this.data[et]||error("Undefined data set name: "+$(et)),this.data[et]},addDataPipeline(et,tt){return has$1(this.data,et)&&error("Duplicate data set name: "+$(et)),this.addData(et,DataScope.fromEntries(this,tt))}};function propertyLambda(et){return(isArray(et)?arrayLambda:objectLambda)(et)}function arrayLambda(et){const tt=et.length;let nt="[";for(let rt=0;rt<tt;++rt){const ot=et[rt];nt+=(rt>0?",":"")+(isObject(ot)?ot.signal||propertyLambda(ot):$(ot))}return nt+"]"}function objectLambda(et){let tt="{",nt=0,rt,ot;for(rt in et)ot=et[rt],tt+=(++nt>1?",":"")+$(rt)+":"+(isObject(ot)?ot.signal||propertyLambda(ot):$(ot));return tt+"}"}function defaults(){const et="sans-serif",rt="#4c78a8",ot="#000",st="#888",ut="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:rt},area:{fill:rt},image:null,line:{stroke:rt,strokeWidth:2},path:{stroke:rt},rect:{fill:rt},rule:{stroke:ot},shape:{stroke:rt},symbol:{fill:rt,size:64},text:{fill:ot,font:et,fontSize:11},trail:{fill:rt,size:2},style:{"guide-label":{fill:ot,font:et,fontSize:10},"guide-title":{fill:ot,font:et,fontSize:11,fontWeight:"bold"},"group-title":{fill:ot,font:et,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:ot,font:et,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:ut},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:st,grid:!1,gridWidth:1,gridColor:ut,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:st,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:ut,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:st,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function parse$3(et,tt,nt){return isObject(et)||error("Input Vega specification must be an object."),tt=mergeConfig(defaults(),tt,et.config),parseView(et,new Scope(tt,nt)).toRuntime()}var version$4="5.25.0";extend$1(transforms,tx,vtx,encode$1,geo,force,label,tree,reg,voronoi,wordcloud,xf);const vegaImport=Object.freeze(Object.defineProperty({__proto__:null,version:version$4,Dataflow,EventStream,MultiPulse,Operator,Parameters,Pulse,Transform,changeset,definition:definition$1,ingest:ingest$1,isTuple,transform:transform$4,transforms,tupleid,interpolate:interpolate$1,interpolateColors,interpolateRange:interpolateRange$1,quantizeInterpolator,scale:scale$4,scheme,projection,View:View$1,defaultLocale,formatLocale:numberFormatDefaultLocale,locale,resetDefaultLocale,timeFormatLocale:timeFormatDefaultLocale,expressionFunction,parse:parse$3,runtimeContext:context$1,codegenExpression:codegen,parseExpression:parser$2,parseSelector:eventSelector,Debug,Error:Error$1,Info,None:None$2,Warn,accessor,accessorFields,accessorName,array:array$5,ascending:ascending$3,clampRange,compare:compare$9,constant:constant$6,debounce:debounce$3,error,extend:extend$1,extent,extentIndex,falsy,fastmap,field:field$1,flush,hasOwnProperty:has$1,id,identity:identity$6,inherits,inrange,isArray,isBoolean:isBoolean$2,isDate:isDate$1,isFunction:isFunction$3,isIterable,isNumber:isNumber$1,isObject,isRegExp,isString,key:key$2,lerp,logger,lruCache:lruCache$1,merge:merge$4,mergeConfig,one:one$2,pad:pad$2,panLinear,panLog,panPow,panSymlog,peek:peek$2,quarter,repeat,span,splitAccessPath,stringValue:$,toBoolean,toDate,toNumber,toSet,toString:toString$1,truncate:truncate$1,truthy,utcquarter,visitArray,writeConfig,zero:zero$5,zoomLinear,zoomLog,zoomPow,zoomSymlog,bandwidthNRD:estimateBandwidth,bin:bin$1,bootstrapCI,cumulativeLogNormal,cumulativeNormal,cumulativeUniform,densityLogNormal,densityNormal,densityUniform,dotbin,quantileLogNormal,quantileNormal,quantileUniform,quantiles,quartiles,get random(){return random},randomInteger:integer,randomKDE:kde,randomLCG:lcg$2,randomLogNormal:lognormal,randomMixture:mixture$1,randomNormal:gaussian,randomUniform:uniform,regressionConstant:constant$5,regressionExp:exp$1,regressionLinear:linear$2,regressionLoess:loess,regressionLog:log$5,regressionPoly:poly,regressionPow:pow$3,regressionQuad:quad,sampleCurve,sampleLogNormal,sampleNormal,sampleUniform,setRandom,DATE,DAY,DAYOFYEAR,HOURS,MILLISECONDS,MINUTES,MONTH,QUARTER,SECONDS,TIME_UNITS,WEEK,YEAR,dayofyear,timeBin:bin$2,timeFloor,timeInterval,timeOffset,timeSequence,timeUnitSpecifier,timeUnits,utcFloor,utcInterval,utcOffset,utcSequence,utcdayofyear,utcweek,week,format:format$2,formats:formats$1,inferType,inferTypes,loader,read,responseType,typeParsers,path:path$3,Bounds,CanvasHandler,CanvasRenderer,Gradient:Gradient$1,GroupItem:GroupItem$1,Handler:Handler$1,Item:Item$3,Marks,RenderType,Renderer,ResourceLoader,SVGHandler,SVGRenderer,SVGStringRenderer,Scenegraph,boundClip,boundContext,boundItem:boundItem$1,boundMark,boundStroke,domChild,domClear,domCreate,domFind,font:font$1,fontFamily:fontFamily$1,fontSize:fontSize$1,intersect:intersect$2,intersectBoxLine,intersectPath,intersectPoint,intersectRule,lineHeight:lineHeight$1,markup,multiLineOffset,pathCurves:curves,pathEqual,pathParse:parse$5,pathRectangle:vg_rect,pathRender,pathSymbols:symbols$1,pathTrail:vg_trail,point:point$2,renderModule,resetSVGClipId,resetSVGDefIds,sceneEqual,sceneFromJSON,scenePickVisit:pickVisit,sceneToJSON,sceneVisit:visit,sceneZOrder:zorder,serializeXML,textMetrics},Symbol.toStringTag,{value:"Module"}));function adjustSpatial(et,tt,nt){let rt;tt.x2&&(tt.x?(nt&&et.x>et.x2&&(rt=et.x,et.x=et.x2,et.x2=rt),et.width=et.x2-et.x):et.x=et.x2-(et.width||0)),tt.xc&&(et.x=et.xc-(et.width||0)/2),tt.y2&&(tt.y?(nt&&et.y>et.y2&&(rt=et.y,et.y=et.y2,et.y2=rt),et.height=et.y2-et.y):et.y=et.y2-(et.height||0)),tt.yc&&(et.y=et.yc-(et.height||0)/2)}var Constants={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},Ops={"*":(et,tt)=>et*tt,"+":(et,tt)=>et+tt,"-":(et,tt)=>et-tt,"/":(et,tt)=>et/tt,"%":(et,tt)=>et%tt,">":(et,tt)=>et>tt,"<":(et,tt)=>et<tt,"<=":(et,tt)=>et<=tt,">=":(et,tt)=>et>=tt,"==":(et,tt)=>et==tt,"!=":(et,tt)=>et!=tt,"===":(et,tt)=>et===tt,"!==":(et,tt)=>et!==tt,"&":(et,tt)=>et&tt,"|":(et,tt)=>et|tt,"^":(et,tt)=>et^tt,"<<":(et,tt)=>et<<tt,">>":(et,tt)=>et>>tt,">>>":(et,tt)=>et>>>tt},Unary={"+":et=>+et,"-":et=>-et,"~":et=>~et,"!":et=>!et};const slice$1=Array.prototype.slice,apply=(et,tt,nt)=>{const rt=nt?nt(tt[0]):tt[0];return rt[et].apply(rt,slice$1.call(tt,1))},datetime=(et,tt,nt,rt,ot,st,ut)=>new Date(et,tt||0,nt??1,rt||0,ot||0,st||0,ut||0);var Functions={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(et,tt,nt)=>Math.max(tt,Math.min(nt,et)),now:Date.now,utc:Date.UTC,datetime,date:et=>new Date(et).getDate(),day:et=>new Date(et).getDay(),year:et=>new Date(et).getFullYear(),month:et=>new Date(et).getMonth(),hours:et=>new Date(et).getHours(),minutes:et=>new Date(et).getMinutes(),seconds:et=>new Date(et).getSeconds(),milliseconds:et=>new Date(et).getMilliseconds(),time:et=>new Date(et).getTime(),timezoneoffset:et=>new Date(et).getTimezoneOffset(),utcdate:et=>new Date(et).getUTCDate(),utcday:et=>new Date(et).getUTCDay(),utcyear:et=>new Date(et).getUTCFullYear(),utcmonth:et=>new Date(et).getUTCMonth(),utchours:et=>new Date(et).getUTCHours(),utcminutes:et=>new Date(et).getUTCMinutes(),utcseconds:et=>new Date(et).getUTCSeconds(),utcmilliseconds:et=>new Date(et).getUTCMilliseconds(),length:et=>et.length,join:function(){return apply("join",arguments)},indexof:function(){return apply("indexOf",arguments)},lastindexof:function(){return apply("lastIndexOf",arguments)},slice:function(){return apply("slice",arguments)},reverse:et=>et.slice().reverse(),parseFloat,parseInt,upper:et=>String(et).toUpperCase(),lower:et=>String(et).toLowerCase(),substring:function(){return apply("substring",arguments,String)},split:function(){return apply("split",arguments,String)},replace:function(){return apply("replace",arguments,String)},trim:et=>String(et).trim(),regexp:RegExp,test:(et,tt)=>RegExp(et).test(tt)};const EventFunctions=["view","item","group","xy","x","y"],DisallowedMethods=new Set([Function,eval,setTimeout,setInterval]);typeof setImmediate=="function"&&DisallowedMethods.add(setImmediate);const Visitors={Literal:(et,tt)=>tt.value,Identifier:(et,tt)=>{const nt=tt.name;return et.memberDepth>0?nt:nt==="datum"?et.datum:nt==="event"?et.event:nt==="item"?et.item:Constants[nt]||et.params["$"+nt]},MemberExpression:(et,tt)=>{const nt=!tt.computed,rt=et(tt.object);nt&&(et.memberDepth+=1);const ot=et(tt.property);if(nt&&(et.memberDepth-=1),DisallowedMethods.has(rt[ot])){console.error(`Prevented interpretation of member "${ot}" which could lead to insecure code execution`);return}return rt[ot]},CallExpression:(et,tt)=>{const nt=tt.arguments;let rt=tt.callee.name;return rt.startsWith("_")&&(rt=rt.slice(1)),rt==="if"?et(nt[0])?et(nt[1]):et(nt[2]):(et.fn[rt]||Functions[rt]).apply(et.fn,nt.map(et))},ArrayExpression:(et,tt)=>tt.elements.map(et),BinaryExpression:(et,tt)=>Ops[tt.operator](et(tt.left),et(tt.right)),UnaryExpression:(et,tt)=>Unary[tt.operator](et(tt.argument)),ConditionalExpression:(et,tt)=>et(tt.test)?et(tt.consequent):et(tt.alternate),LogicalExpression:(et,tt)=>tt.operator==="&&"?et(tt.left)&&et(tt.right):et(tt.left)||et(tt.right),ObjectExpression:(et,tt)=>tt.properties.reduce((nt,rt)=>{et.memberDepth+=1;const ot=et(rt.key);return et.memberDepth-=1,DisallowedMethods.has(et(rt.value))?console.error(`Prevented interpretation of property "${ot}" which could lead to insecure code execution`):nt[ot]=et(rt.value),nt},{})};function interpret(et,tt,nt,rt,ot,st){const ut=ct=>Visitors[ct.type](ut,ct);return ut.memberDepth=0,ut.fn=Object.create(tt),ut.params=nt,ut.datum=rt,ut.event=ot,ut.item=st,EventFunctions.forEach(ct=>ut.fn[ct]=function(){return ot.vega[ct](...arguments)}),ut(et)}var expression$1={operator(et,tt){const nt=tt.ast,rt=et.functions;return ot=>interpret(nt,rt,ot)},parameter(et,tt){const nt=tt.ast,rt=et.functions;return(ot,st)=>interpret(nt,rt,st,ot)},event(et,tt){const nt=tt.ast,rt=et.functions;return ot=>interpret(nt,rt,void 0,void 0,ot)},handler(et,tt){const nt=tt.ast,rt=et.functions;return(ot,st)=>{const ut=st.item&&st.item.datum;return interpret(nt,rt,ot,ut,st)}},encode(et,tt){const{marktype:nt,channels:rt}=tt,ot=et.functions,st=nt==="group"||nt==="image"||nt==="rect";return(ut,ct)=>{const ft=ut.datum;let pt=0,ht;for(const mt in rt)ht=interpret(rt[mt].ast,ot,ct,ft,void 0,ut),ut[mt]!==ht&&(ut[mt]=ht,pt=1);return nt!=="rule"&&adjustSpatial(ut,rt,st),pt}}};const name$2="vega-lite",author$1='Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer',version$3="5.5.0",collaborators=["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],homepage="https://vega.github.io/vega-lite/",description$2="Vega-Lite is a concise high-level language for interactive visualization.",keywords$2=["vega","chart","visualization"],main$2="build/vega-lite.js",unpkg$1="build/vega-lite.min.js",jsdelivr$1="build/vega-lite.min.js",module$2="build/src/index",types$7="build/src/index.d.ts",bin={vl2png:"./bin/vl2png",vl2svg:"./bin/vl2svg",vl2pdf:"./bin/vl2pdf",vl2vg:"./bin/vl2vg"},files$1=["bin","build","src","vega-lite*","tsconfig.json"],scripts$1={changelog:"conventional-changelog -p angular -r 2",prebuild:"yarn clean:build",build:"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.js","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh",clean:"yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete","clean:build":"del-cli 'build/*' !build/vega-lite-schema.json","predeploy:site":"yarn presite","deploy:site":"gh-pages -d site",data:"rsync -r node_modules/vega-datasets/data/* site/data",schema:"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",renameschema:"scripts/rename-schema.sh",presite:"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",site:"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd",prettierbase:"prettier '**/*.{md,css,yml}'",eslintbase:"eslint .",format:"yarn eslintbase --fix && yarn prettierbase --write",lint:"yarn eslintbase && yarn prettierbase --check",jest:"NODE_OPTIONS=--experimental-vm-modules npx jest",test:"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk --experimental-vm-modules ./node_modules/.bin/jest --runInBand test","test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",watch:"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",release:"yarn run prebuild && yarn build && yarn shipit",shipit:"auto shipit"},repository$1={type:"git",url:"https://github.com/vega/vega-lite.git"},license$1="BSD-3-Clause",bugs={url:"https://github.com/vega/vega-lite/issues"},devDependencies$1={"@auto-it/conventional-commits":"^10.37.6","@auto-it/first-time-contributor":"^10.37.6","@babel/core":"^7.19.1","@babel/preset-env":"^7.19.1","@babel/preset-typescript":"^7.18.6","@rollup/plugin-alias":"^4.0.0","@rollup/plugin-babel":"^6.0.0","@rollup/plugin-commonjs":"^23.0.0","@rollup/plugin-json":"^4.1.0","@types/jest":"^27.4.1","@rollup/plugin-node-resolve":"^14.1.0","@types/chai":"^4.3.3","@types/d3":"^7.4.0","@types/mkdirp":"^1.0.2","@types/pako":"^2.0.0","@typescript-eslint/eslint-plugin":"^5.38.0","@typescript-eslint/parser":"^5.38.0",ajv:"^8.11.0","ajv-formats":"^2.1.1",auto:"^10.37.6",chai:"^4.3.6",cheerio:"^1.0.0-rc.12","conventional-changelog-cli":"^2.2.2",d3:"^7.6.1","del-cli":"^5.0.0",eslint:"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-plugin-jest":"^27.0.4","eslint-plugin-prettier":"^4.2.1","gh-pages":"^4.0.0",jest:"^27.5.1","highlight.js":"^11.6.0","jest-dev-server":"^6.1.1",mkdirp:"^1.0.4",pako:"^2.0.4",prettier:"^2.7.1",puppeteer:"^15.0.0",rollup:"^2.79.1","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-sourcemaps":"^0.6.3","rollup-plugin-terser":"^7.0.2",serve:"^14.0.1",terser:"^5.15.0","ts-jest":"^29.0.1","ts-json-schema-generator":"^1.1.1","vega-cli":"^5.22.1",typescript:"~4.8.3","vega-datasets":"~2.5.1","vega-embed":"^6.21.0","vega-tooltip":"^0.28.0","yaml-front-matter":"^4.1.1"},dependencies$1={"@types/clone":"~2.1.1",clone:"~2.1.2","fast-deep-equal":"~3.1.3","fast-json-stable-stringify":"~2.1.0","json-stringify-pretty-compact":"~3.0.0",tslib:"~2.4.0","vega-event-selector":"~3.0.0","vega-expression":"~5.0.0","vega-util":"~1.17.0",yargs:"~17.6.0"},peerDependencies$1={vega:"^5.22.0"},engines={node:">=12"},pkg$1={name:name$2,author:author$1,version:version$3,collaborators,homepage,description:description$2,keywords:keywords$2,main:main$2,unpkg:unpkg$1,jsdelivr:jsdelivr$1,module:module$2,types:types$7,bin,files:files$1,scripts:scripts$1,repository:repository$1,license:license$1,bugs,devDependencies:devDependencies$1,dependencies:dependencies$1,peerDependencies:peerDependencies$1,engines};var clone={exports:{}};(function(et){var tt=function(){function nt(yt,vt){return vt!=null&&yt instanceof vt}var rt;try{rt=Map}catch{rt=function(){}}var ot;try{ot=Set}catch{ot=function(){}}var st;try{st=Promise}catch{st=function(){}}function ut(yt,vt,Tt,Et,xt){typeof vt=="object"&&(Tt=vt.depth,Et=vt.prototype,xt=vt.includeNonEnumerable,vt=vt.circular);var At=[],Ct=[],$t=typeof Buffer<"u";typeof vt>"u"&&(vt=!0),typeof Tt>"u"&&(Tt=1/0);function Ot(Rt,It){if(Rt===null)return null;if(It===0)return Rt;var kt,Mt;if(typeof Rt!="object")return Rt;if(nt(Rt,rt))kt=new rt;else if(nt(Rt,ot))kt=new ot;else if(nt(Rt,st))kt=new st(function(An,sn){Rt.then(function(Sn){An(Ot(Sn,It-1))},function(Sn){sn(Ot(Sn,It-1))})});else if(ut.__isArray(Rt))kt=[];else if(ut.__isRegExp(Rt))kt=new RegExp(Rt.source,mt(Rt)),Rt.lastIndex&&(kt.lastIndex=Rt.lastIndex);else if(ut.__isDate(Rt))kt=new Date(Rt.getTime());else{if($t&&Buffer.isBuffer(Rt))return Buffer.allocUnsafe?kt=Buffer.allocUnsafe(Rt.length):kt=new Buffer(Rt.length),Rt.copy(kt),kt;nt(Rt,Error)?kt=Object.create(Rt):typeof Et>"u"?(Mt=Object.getPrototypeOf(Rt),kt=Object.create(Mt)):(kt=Object.create(Et),Mt=Et)}if(vt){var Ft=At.indexOf(Rt);if(Ft!=-1)return Ct[Ft];At.push(Rt),Ct.push(kt)}nt(Rt,rt)&&Rt.forEach(function(An,sn){var Sn=Ot(sn,It-1),In=Ot(An,It-1);kt.set(Sn,In)}),nt(Rt,ot)&&Rt.forEach(function(An){var sn=Ot(An,It-1);kt.add(sn)});for(var zt in Rt){var Vt;Mt&&(Vt=Object.getOwnPropertyDescriptor(Mt,zt)),!(Vt&&Vt.set==null)&&(kt[zt]=Ot(Rt[zt],It-1))}if(Object.getOwnPropertySymbols)for(var Zt=Object.getOwnPropertySymbols(Rt),zt=0;zt<Zt.length;zt++){var Ut=Zt[zt],Xt=Object.getOwnPropertyDescriptor(Rt,Ut);Xt&&!Xt.enumerable&&!xt||(kt[Ut]=Ot(Rt[Ut],It-1),Xt.enumerable||Object.defineProperty(kt,Ut,{enumerable:!1}))}if(xt)for(var Jt=Object.getOwnPropertyNames(Rt),zt=0;zt<Jt.length;zt++){var gn=Jt[zt],Xt=Object.getOwnPropertyDescriptor(Rt,gn);Xt&&Xt.enumerable||(kt[gn]=Ot(Rt[gn],It-1),Object.defineProperty(kt,gn,{enumerable:!1}))}return kt}return Ot(yt,Tt)}ut.clonePrototype=function(vt){if(vt===null)return null;var Tt=function(){};return Tt.prototype=vt,new Tt};function ct(yt){return Object.prototype.toString.call(yt)}ut.__objToStr=ct;function ft(yt){return typeof yt=="object"&&ct(yt)==="[object Date]"}ut.__isDate=ft;function pt(yt){return typeof yt=="object"&&ct(yt)==="[object Array]"}ut.__isArray=pt;function ht(yt){return typeof yt=="object"&&ct(yt)==="[object RegExp]"}ut.__isRegExp=ht;function mt(yt){var vt="";return yt.global&&(vt+="g"),yt.ignoreCase&&(vt+="i"),yt.multiline&&(vt+="m"),vt}return ut.__getRegExpFlags=mt,ut}();et.exports&&(et.exports=tt)})(clone);const clone_=clone.exports;var fastDeepEqual=function et(tt,nt){if(tt===nt)return!0;if(tt&&nt&&typeof tt=="object"&&typeof nt=="object"){if(tt.constructor!==nt.constructor)return!1;var rt,ot,st;if(Array.isArray(tt)){if(rt=tt.length,rt!=nt.length)return!1;for(ot=rt;ot--!==0;)if(!et(tt[ot],nt[ot]))return!1;return!0}if(tt.constructor===RegExp)return tt.source===nt.source&&tt.flags===nt.flags;if(tt.valueOf!==Object.prototype.valueOf)return tt.valueOf()===nt.valueOf();if(tt.toString!==Object.prototype.toString)return tt.toString()===nt.toString();if(st=Object.keys(tt),rt=st.length,rt!==Object.keys(nt).length)return!1;for(ot=rt;ot--!==0;)if(!Object.prototype.hasOwnProperty.call(nt,st[ot]))return!1;for(ot=rt;ot--!==0;){var ut=st[ot];if(!et(tt[ut],nt[ut]))return!1}return!0}return tt!==tt&&nt!==nt};const equal=fastDeepEqual;var fastJsonStableStringify=function(et,tt){tt||(tt={}),typeof tt=="function"&&(tt={cmp:tt});var nt=typeof tt.cycles=="boolean"?tt.cycles:!1,rt=tt.cmp&&function(st){return function(ut){return function(ct,ft){var pt={key:ct,value:ut[ct]},ht={key:ft,value:ut[ft]};return st(pt,ht)}}}(tt.cmp),ot=[];return function st(ut){if(ut&&ut.toJSON&&typeof ut.toJSON=="function"&&(ut=ut.toJSON()),ut!==void 0){if(typeof ut=="number")return isFinite(ut)?""+ut:"null";if(typeof ut!="object")return JSON.stringify(ut);var ct,ft;if(Array.isArray(ut)){for(ft="[",ct=0;ct<ut.length;ct++)ct&&(ft+=","),ft+=st(ut[ct])||"null";return ft+"]"}if(ut===null)return"null";if(ot.indexOf(ut)!==-1){if(nt)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var pt=ot.push(ut)-1,ht=Object.keys(ut).sort(rt&&rt(ut));for(ft="",ct=0;ct<ht.length;ct++){var mt=ht[ct],yt=st(ut[mt]);!yt||(ft&&(ft+=","),ft+=JSON.stringify(mt)+":"+yt)}return ot.splice(pt,1),"{"+ft+"}"}}(et)};function isLogicalOr(et){return!!et.or}function isLogicalAnd(et){return!!et.and}function isLogicalNot(et){return!!et.not}function forEachLeaf(et,tt){if(isLogicalNot(et))forEachLeaf(et.not,tt);else if(isLogicalAnd(et))for(const nt of et.and)forEachLeaf(nt,tt);else if(isLogicalOr(et))for(const nt of et.or)forEachLeaf(nt,tt);else tt(et)}function normalizeLogicalComposition(et,tt){return isLogicalNot(et)?{not:normalizeLogicalComposition(et.not,tt)}:isLogicalAnd(et)?{and:et.and.map(nt=>normalizeLogicalComposition(nt,tt))}:isLogicalOr(et)?{or:et.or.map(nt=>normalizeLogicalComposition(nt,tt))}:tt(et)}const deepEqual=equal,duplicate=clone_;function never(et){throw new Error(et)}function pick$1(et,tt){const nt={};for(const rt of tt)has$1(et,rt)&&(nt[rt]=et[rt]);return nt}function omit$1(et,tt){const nt=Object.assign({},et);for(const rt of tt)delete nt[rt];return nt}Set.prototype.toJSON=function(){return`Set(${[...this].map(et=>fastJsonStableStringify(et)).join(",")})`};const stringify$1=fastJsonStableStringify;function hash(et){if(isNumber$1(et))return et;const tt=isString(et)?et:fastJsonStableStringify(et);if(tt.length<250)return tt;let nt=0;for(let rt=0;rt<tt.length;rt++){const ot=tt.charCodeAt(rt);nt=(nt<<5)-nt+ot,nt=nt&nt}return nt}function isNullOrFalse(et){return et===!1||et===null}function contains(et,tt){return et.includes(tt)}function some(et,tt){let nt=0;for(const[rt,ot]of et.entries())if(tt(ot,rt,nt++))return!0;return!1}function every(et,tt){let nt=0;for(const[rt,ot]of et.entries())if(!tt(ot,rt,nt++))return!1;return!0}function mergeDeep$1(et,...tt){for(const nt of tt)deepMerge_$1(et,nt??{});return et}function deepMerge_$1(et,tt){for(const nt of keys$1(tt))writeConfig(et,nt,tt[nt],!0)}function unique(et,tt){const nt=[],rt={};let ot;for(const st of et)ot=tt(st),!(ot in rt)&&(rt[ot]=1,nt.push(st));return nt}function isEqual$2(et,tt){const nt=keys$1(et),rt=keys$1(tt);if(nt.length!==rt.length)return!1;for(const ot of nt)if(et[ot]!==tt[ot])return!1;return!0}function setEqual(et,tt){if(et.size!==tt.size)return!1;for(const nt of et)if(!tt.has(nt))return!1;return!0}function hasIntersection(et,tt){for(const nt of et)if(tt.has(nt))return!0;return!1}function prefixGenerator(et){const tt=new Set;for(const nt of et){const ot=splitAccessPath(nt).map((ut,ct)=>ct===0?ut:`[${ut}]`),st=ot.map((ut,ct)=>ot.slice(0,ct+1).join(""));for(const ut of st)tt.add(ut)}return tt}function fieldIntersection(et,tt){return et===void 0||tt===void 0?!0:hasIntersection(prefixGenerator(et),prefixGenerator(tt))}function isEmpty$1(et){return keys$1(et).length===0}const keys$1=Object.keys,vals=Object.values,entries$1=Object.entries;function isBoolean(et){return et===!0||et===!1}function varName(et){const tt=et.replace(/\W/g,"_");return(et.match(/^\d+/)?"_":"")+tt}function logicalExpr(et,tt){return isLogicalNot(et)?`!(${logicalExpr(et.not,tt)})`:isLogicalAnd(et)?`(${et.and.map(nt=>logicalExpr(nt,tt)).join(") && (")})`:isLogicalOr(et)?`(${et.or.map(nt=>logicalExpr(nt,tt)).join(") || (")})`:tt(et)}function deleteNestedProperty(et,tt){if(tt.length===0)return!0;const nt=tt.shift();return nt in et&&deleteNestedProperty(et[nt],tt)&&delete et[nt],isEmpty$1(et)}function titleCase(et){return et.charAt(0).toUpperCase()+et.substr(1)}function accessPathWithDatum(et,tt="datum"){const nt=splitAccessPath(et),rt=[];for(let ot=1;ot<=nt.length;ot++){const st=`[${nt.slice(0,ot).map($).join("][")}]`;rt.push(`${tt}${st}`)}return rt.join(" && ")}function flatAccessWithDatum(et,tt="datum"){return`${tt}[${$(splitAccessPath(et).join("."))}]`}function escapePathAccess(et){return et.replace(/(\[|\]|\.|'|")/g,"\\$1")}function replacePathInField(et){return`${splitAccessPath(et).map(escapePathAccess).join("\\.")}`}function replaceAll(et,tt,nt){return et.replace(new RegExp(tt.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),nt)}function removePathFromField(et){return`${splitAccessPath(et).join(".")}`}function accessPathDepth(et){return et?splitAccessPath(et).length:0}function getFirstDefined(...et){for(const tt of et)if(tt!==void 0)return tt}let idCounter=42;function uniqueId(et){const tt=++idCounter;return et?String(et)+tt:tt}function resetIdCounter(){idCounter=42}function internalField(et){return isInternalField(et)?et:`__${et}`}function isInternalField(et){return et.startsWith("__")}function normalizeAngle(et){if(et!==void 0)return(et%360+360)%360}function isNumeric$1(et){return isNumber$1(et)?!0:!isNaN(et)&&!isNaN(parseFloat(et))}var __rest$w=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};const ROW="row",COLUMN="column",FACET="facet",X="x",Y="y",X2="x2",Y2="y2",XOFFSET="xOffset",YOFFSET="yOffset",RADIUS="radius",RADIUS2="radius2",THETA="theta",THETA2="theta2",LATITUDE="latitude",LONGITUDE="longitude",LATITUDE2="latitude2",LONGITUDE2="longitude2",COLOR="color",FILL="fill",STROKE="stroke",SHAPE="shape",SIZE$1="size",ANGLE="angle",OPACITY="opacity",FILLOPACITY="fillOpacity",STROKEOPACITY="strokeOpacity",STROKEWIDTH="strokeWidth",STROKEDASH="strokeDash",TEXT$1="text",ORDER="order",DETAIL="detail",KEY="key",TOOLTIP="tooltip",HREF="href",URL$1="url",DESCRIPTION="description",POSITION_CHANNEL_INDEX={x:1,y:1,x2:1,y2:1},POLAR_POSITION_CHANNEL_INDEX={theta:1,theta2:1,radius:1,radius2:1};function isPolarPositionChannel(et){return et in POLAR_POSITION_CHANNEL_INDEX}const GEO_POSIITON_CHANNEL_INDEX={longitude:1,longitude2:1,latitude:1,latitude2:1};function getPositionChannelFromLatLong(et){switch(et){case LATITUDE:return"y";case LATITUDE2:return"y2";case LONGITUDE:return"x";case LONGITUDE2:return"x2"}}function isGeoPositionChannel(et){return et in GEO_POSIITON_CHANNEL_INDEX}const GEOPOSITION_CHANNELS=keys$1(GEO_POSIITON_CHANNEL_INDEX),UNIT_CHANNEL_INDEX=Object.assign(Object.assign(Object.assign(Object.assign({},POSITION_CHANNEL_INDEX),POLAR_POSITION_CHANNEL_INDEX),GEO_POSIITON_CHANNEL_INDEX),{xOffset:1,yOffset:1,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1});function isColorChannel(et){return et===COLOR||et===FILL||et===STROKE}const FACET_CHANNEL_INDEX={row:1,column:1,facet:1},FACET_CHANNELS=keys$1(FACET_CHANNEL_INDEX),CHANNEL_INDEX=Object.assign(Object.assign({},UNIT_CHANNEL_INDEX),FACET_CHANNEL_INDEX),CHANNELS=keys$1(CHANNEL_INDEX),SINGLE_DEF_CHANNEL_INDEX=__rest$w(CHANNEL_INDEX,["order","detail","tooltip"]),SINGLE_DEF_UNIT_CHANNEL_INDEX=__rest$w(SINGLE_DEF_CHANNEL_INDEX,["row","column","facet"]);function isSingleDefUnitChannel(et){return!!SINGLE_DEF_UNIT_CHANNEL_INDEX[et]}function isChannel(et){return!!CHANNEL_INDEX[et]}const SECONDARY_RANGE_CHANNEL=[X2,Y2,LATITUDE2,LONGITUDE2,THETA2,RADIUS2];function isSecondaryRangeChannel(et){return getMainRangeChannel(et)!==et}function getMainRangeChannel(et){switch(et){case X2:return X;case Y2:return Y;case LATITUDE2:return LATITUDE;case LONGITUDE2:return LONGITUDE;case THETA2:return THETA;case RADIUS2:return RADIUS}return et}function getVgPositionChannel(et){if(isPolarPositionChannel(et))switch(et){case THETA:return"startAngle";case THETA2:return"endAngle";case RADIUS:return"outerRadius";case RADIUS2:return"innerRadius"}return et}function getSecondaryRangeChannel(et){switch(et){case X:return X2;case Y:return Y2;case LATITUDE:return LATITUDE2;case LONGITUDE:return LONGITUDE2;case THETA:return THETA2;case RADIUS:return RADIUS2}}function getSizeChannel(et){switch(et){case X:case X2:return"width";case Y:case Y2:return"height"}}function getOffsetChannel(et){switch(et){case X:return"xOffset";case Y:return"yOffset";case X2:return"x2Offset";case Y2:return"y2Offset";case THETA:return"thetaOffset";case RADIUS:return"radiusOffset";case THETA2:return"theta2Offset";case RADIUS2:return"radius2Offset"}}function getOffsetScaleChannel(et){switch(et){case X:return"xOffset";case Y:return"yOffset"}}function getMainChannelFromOffsetChannel(et){switch(et){case"xOffset":return"x";case"yOffset":return"y"}}const UNIT_CHANNELS=keys$1(UNIT_CHANNEL_INDEX),NONPOSITION_CHANNEL_INDEX=__rest$w(UNIT_CHANNEL_INDEX,["x","y","x2","y2","xOffset","yOffset","latitude","longitude","latitude2","longitude2","theta","theta2","radius","radius2"]),NONPOSITION_CHANNELS=keys$1(NONPOSITION_CHANNEL_INDEX),POSITION_SCALE_CHANNEL_INDEX={x:1,y:1},POSITION_SCALE_CHANNELS=keys$1(POSITION_SCALE_CHANNEL_INDEX);function isXorY(et){return et in POSITION_SCALE_CHANNEL_INDEX}const POLAR_POSITION_SCALE_CHANNEL_INDEX={theta:1,radius:1},POLAR_POSITION_SCALE_CHANNELS=keys$1(POLAR_POSITION_SCALE_CHANNEL_INDEX);function getPositionScaleChannel(et){return et==="width"?X:Y}const OFFSET_SCALE_CHANNEL_INDEX={xOffset:1,yOffset:1};function isXorYOffset(et){return et in OFFSET_SCALE_CHANNEL_INDEX}const NONPOSITION_SCALE_CHANNEL_INDEX=__rest$w(NONPOSITION_CHANNEL_INDEX,["text","tooltip","href","url","description","detail","key","order"]),NONPOSITION_SCALE_CHANNELS=keys$1(NONPOSITION_SCALE_CHANNEL_INDEX);function isNonPositionScaleChannel(et){return!!NONPOSITION_CHANNEL_INDEX[et]}function supportLegend(et){switch(et){case COLOR:case FILL:case STROKE:case SIZE$1:case SHAPE:case OPACITY:case STROKEWIDTH:case STROKEDASH:return!0;case FILLOPACITY:case STROKEOPACITY:case ANGLE:return!1}}const SCALE_CHANNEL_INDEX=Object.assign(Object.assign(Object.assign(Object.assign({},POSITION_SCALE_CHANNEL_INDEX),POLAR_POSITION_SCALE_CHANNEL_INDEX),OFFSET_SCALE_CHANNEL_INDEX),NONPOSITION_SCALE_CHANNEL_INDEX),SCALE_CHANNELS=keys$1(SCALE_CHANNEL_INDEX);function isScaleChannel(et){return!!SCALE_CHANNEL_INDEX[et]}function supportMark(et,tt){return getSupportedMark(et)[tt]}const ALL_MARKS={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},ALL_MARKS_EXCEPT_GEOSHAPE=__rest$w(ALL_MARKS,["geoshape"]);function getSupportedMark(et){switch(et){case COLOR:case FILL:case STROKE:case DESCRIPTION:case DETAIL:case KEY:case TOOLTIP:case HREF:case ORDER:case OPACITY:case FILLOPACITY:case STROKEOPACITY:case STROKEWIDTH:case FACET:case ROW:case COLUMN:return ALL_MARKS;case X:case Y:case XOFFSET:case YOFFSET:case LATITUDE:case LONGITUDE:return ALL_MARKS_EXCEPT_GEOSHAPE;case X2:case Y2:case LATITUDE2:case LONGITUDE2:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case SIZE$1:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case STROKEDASH:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case SHAPE:return{point:"always",geoshape:"always"};case TEXT$1:return{text:"always"};case ANGLE:return{point:"always",square:"always",text:"always"};case URL$1:return{image:"always"};case THETA:return{text:"always",arc:"always"};case RADIUS:return{text:"always",arc:"always"};case THETA2:case RADIUS2:return{arc:"always"}}}function rangeType(et){switch(et){case X:case Y:case THETA:case RADIUS:case XOFFSET:case YOFFSET:case SIZE$1:case ANGLE:case STROKEWIDTH:case OPACITY:case FILLOPACITY:case STROKEOPACITY:case X2:case Y2:case THETA2:case RADIUS2:return;case FACET:case ROW:case COLUMN:case SHAPE:case STROKEDASH:case TEXT$1:case TOOLTIP:case HREF:case URL$1:case DESCRIPTION:return"discrete";case COLOR:case FILL:case STROKE:return"flexible";case LATITUDE:case LONGITUDE:case LATITUDE2:case LONGITUDE2:case DETAIL:case KEY:case ORDER:return}}const AGGREGATE_OP_INDEX={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},MULTIDOMAIN_SORT_OP_INDEX={count:1,min:1,max:1};function isArgminDef(et){return!!et&&!!et.argmin}function isArgmaxDef(et){return!!et&&!!et.argmax}function isAggregateOp(et){return isString(et)&&!!AGGREGATE_OP_INDEX[et]}const COUNTING_OPS=new Set(["count","valid","missing","distinct"]);function isCountingAggregateOp(et){return isString(et)&&COUNTING_OPS.has(et)}function isMinMaxOp(et){return isString(et)&&contains(["min","max"],et)}const SUM_OPS=new Set(["count","sum","distinct","valid","missing"]),SHARED_DOMAIN_OPS=new Set(["mean","average","median","q1","q3","min","max"]);function binToString(et){return isBoolean$2(et)&&(et=normalizeBin(et,void 0)),"bin"+keys$1(et).map(tt=>isParameterExtent(et[tt])?varName(`_${tt}_${entries$1(et[tt])}`):varName(`_${tt}_${et[tt]}`)).join("")}function isBinning(et){return et===!0||isBinParams(et)&&!et.binned}function isBinned(et){return et==="binned"||isBinParams(et)&&et.binned===!0}function isBinParams(et){return isObject(et)}function isParameterExtent(et){return et?.param}function autoMaxBins(et){switch(et){case ROW:case COLUMN:case SIZE$1:case COLOR:case FILL:case STROKE:case STROKEWIDTH:case OPACITY:case FILLOPACITY:case STROKEOPACITY:case SHAPE:return 6;case STROKEDASH:return 4;default:return 10}}function isExprRef(et){return!!et?.expr}function replaceExprRef(et){const tt=keys$1(et||{}),nt={};for(const rt of tt)nt[rt]=signalRefOrValue(et[rt]);return nt}var __rest$v=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function extractTitleConfig(et){const{anchor:tt,frame:nt,offset:rt,orient:ot,angle:st,limit:ut,color:ct,subtitleColor:ft,subtitleFont:pt,subtitleFontSize:ht,subtitleFontStyle:mt,subtitleFontWeight:yt,subtitleLineHeight:vt,subtitlePadding:Tt}=et,Et=__rest$v(et,["anchor","frame","offset","orient","angle","limit","color","subtitleColor","subtitleFont","subtitleFontSize","subtitleFontStyle","subtitleFontWeight","subtitleLineHeight","subtitlePadding"]),xt=Object.assign(Object.assign({},Et),ct?{fill:ct}:{}),At=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},tt?{anchor:tt}:{}),nt?{frame:nt}:{}),rt?{offset:rt}:{}),ot?{orient:ot}:{}),st!==void 0?{angle:st}:{}),ut!==void 0?{limit:ut}:{}),Ct=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ft?{subtitleColor:ft}:{}),pt?{subtitleFont:pt}:{}),ht?{subtitleFontSize:ht}:{}),mt?{subtitleFontStyle:mt}:{}),yt?{subtitleFontWeight:yt}:{}),vt?{subtitleLineHeight:vt}:{}),Tt?{subtitlePadding:Tt}:{}),$t=pick$1(et,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:xt,subtitleMarkConfig:$t,nonMarkTitleProperties:At,subtitle:Ct}}function isText(et){return isString(et)||isArray(et)&&isString(et[0])}function isSignalRef(et){return!!et?.signal}function isVgRangeStep(et){return!!et.step}function isDataRefUnionedDomain(et){return isArray(et)?!1:"fields"in et&&!("data"in et)}function isFieldRefUnionDomain(et){return isArray(et)?!1:"fields"in et&&"data"in et}function isDataRefDomain(et){return isArray(et)?!1:"field"in et&&"data"in et}const VG_MARK_CONFIG_INDEX={aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1},VG_MARK_CONFIGS=keys$1(VG_MARK_CONFIG_INDEX),VG_MARK_INDEX={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},VG_CORNERRADIUS_CHANNELS=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];var __rest$u=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function signalOrValueRefWithCondition(et){const tt=isArray(et.condition)?et.condition.map(conditionalSignalRefOrValue):conditionalSignalRefOrValue(et.condition);return Object.assign(Object.assign({},signalRefOrValue(et)),{condition:tt})}function signalRefOrValue(et){if(isExprRef(et)){const{expr:tt}=et,nt=__rest$u(et,["expr"]);return Object.assign({signal:tt},nt)}return et}function conditionalSignalRefOrValue(et){if(isExprRef(et)){const{expr:tt}=et,nt=__rest$u(et,["expr"]);return Object.assign({signal:tt},nt)}return et}function signalOrValueRef(et){if(isExprRef(et)){const{expr:tt}=et,nt=__rest$u(et,["expr"]);return Object.assign({signal:tt},nt)}return isSignalRef(et)?et:et!==void 0?{value:et}:void 0}function exprFromSignalRefOrValue(et){return isSignalRef(et)?et.signal:$(et)}function exprFromValueRefOrSignalRef(et){return isSignalRef(et)?et.signal:$(et.value)}function signalOrStringValue(et){return isSignalRef(et)?et.signal:et==null?null:$(et)}function applyMarkConfig(et,tt,nt){for(const rt of nt){const ot=getMarkConfig(rt,tt.markDef,tt.config);ot!==void 0&&(et[rt]=signalOrValueRef(ot))}return et}function getStyles(et){var tt;return[].concat(et.type,(tt=et.style)!==null&&tt!==void 0?tt:[])}function getMarkPropOrConfig(et,tt,nt,rt={}){const{vgChannel:ot,ignoreVgConfig:st}=rt;return ot&&tt[ot]!==void 0?tt[ot]:tt[et]!==void 0?tt[et]:st&&(!ot||ot===et)?void 0:getMarkConfig(et,tt,nt,rt)}function getMarkConfig(et,tt,nt,{vgChannel:rt}={}){return getFirstDefined(rt?getMarkStyleConfig(et,tt,nt.style):void 0,getMarkStyleConfig(et,tt,nt.style),rt?nt[tt.type][rt]:void 0,nt[tt.type][et],rt?nt.mark[rt]:nt.mark[et])}function getMarkStyleConfig(et,tt,nt){return getStyleConfig(et,getStyles(tt),nt)}function getStyleConfig(et,tt,nt){tt=array$5(tt);let rt;for(const ot of tt){const st=nt[ot];st&&st[et]!==void 0&&(rt=st[et])}return rt}function sortParams(et,tt){return array$5(et).reduce((nt,rt)=>{var ot;return nt.field.push(vgField(rt,tt)),nt.order.push((ot=rt.sort)!==null&&ot!==void 0?ot:"ascending"),nt},{field:[],order:[]})}function mergeTitleFieldDefs(et,tt){const nt=[...et];return tt.forEach(rt=>{for(const ot of nt)if(deepEqual(ot,rt))return;nt.push(rt)}),nt}function mergeTitle(et,tt){return deepEqual(et,tt)||!tt?et:et?[...array$5(et),...array$5(tt)].join(", "):tt}function mergeTitleComponent(et,tt){const nt=et.value,rt=tt.value;if(nt==null||rt===null)return{explicit:et.explicit,value:null};if((isText(nt)||isSignalRef(nt))&&(isText(rt)||isSignalRef(rt)))return{explicit:et.explicit,value:mergeTitle(nt,rt)};if(isText(nt)||isSignalRef(nt))return{explicit:et.explicit,value:nt};if(isText(rt)||isSignalRef(rt))return{explicit:et.explicit,value:rt};if(!isText(nt)&&!isSignalRef(nt)&&!isText(rt)&&!isSignalRef(rt))return{explicit:et.explicit,value:mergeTitleFieldDefs(nt,rt)};throw new Error("It should never reach here")}function invalidSpec(et){return`Invalid specification ${stringify$1(et)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const FIT_NON_SINGLE='Autosize "fit" only works for single views and layered views.';function containerSizeNonSingle(et){return`${et=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function containerSizeNotCompatibleWithAutosize(et){const tt=et=="width"?"Width":"Height",nt=et=="width"?"x":"y";return`${tt} "container" only works well with autosize "fit" or "fit-${nt}".`}function droppingFit(et){return et?`Dropping "fit-${et}" because spec has discrete ${getSizeChannel(et)}.`:'Dropping "fit" because spec has discrete size.'}function unknownField(et){return`Unknown field for ${et}. Cannot calculate view size.`}function cannotProjectOnChannelWithoutField(et){return`Cannot project a selection on encoding channel "${et}", which has no field.`}function cannotProjectAggregate(et,tt){return`Cannot project a selection on encoding channel "${et}" as it uses an aggregate function ("${tt}").`}function nearestNotSupportForContinuous(et){return`The "nearest" transform is not supported for ${et} marks.`}function selectionNotSupported(et){return`Selection not supported for ${et} yet.`}function selectionNotFound(et){return`Cannot find a selection named "${et}".`}const SCALE_BINDINGS_CONTINUOUS="Scale bindings are currently only supported for scales with unbinned, continuous domains.",LEGEND_BINDINGS_MUST_HAVE_PROJECTION="Legend bindings are only supported for selections over an individual field or encoding channel.";function cannotLookupVariableParameter(et){return`Lookups can only be performed on selection parameters. "${et}" is a variable parameter.`}function noSameUnitLookup(et){return`Cannot define and lookup the "${et}" selection in the same view. Try moving the lookup into a second, layered view?`}const NEEDS_SAME_SELECTION="The same selection must be used to override scale domains in a layered view.",INTERVAL_INITIALIZED_WITH_X_Y='Interval selections should be initialized using "x" and/or "y" keys.';function noSuchRepeatedValue(et){return`Unknown repeated value "${et}".`}function columnsNotSupportByRowCol(et){return`The "columns" property cannot be used when "${et}" has nested row/column.`}const CONCAT_CANNOT_SHARE_AXIS="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function unrecognizedParse(et){return`Unrecognized parse "${et}".`}function differentParse(et,tt,nt){return`An ancestor parsed field "${et}" as ${nt} but a child wants to parse the field as ${tt}.`}const ADD_SAME_CHILD_TWICE="Attempt to add the same child twice.";function invalidTransformIgnored(et){return`Ignoring an invalid transform: ${stringify$1(et)}.`}const NO_FIELDS_NEEDS_AS='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function customFormatTypeNotAllowed(et){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${et} are dropped.`}function projectionOverridden(et){const{parentProjection:tt,projection:nt}=et;return`Layer's shared projection ${stringify$1(tt)} is overridden by a child projection ${stringify$1(nt)}.`}const REPLACE_ANGLE_WITH_THETA="Arc marks uses theta channel rather than angle, replacing angle with theta.";function offsetNestedInsideContinuousPositionScaleDropped(et){return`${et}Offset dropped because ${et} is continuous`}function replaceOffsetWithMainChannel(et){return`There is no ${et} encoding. Replacing ${et}Offset encoding as ${et}.`}function primitiveChannelDef(et,tt,nt){return`Channel ${et} is a ${tt}. Converted to {value: ${stringify$1(nt)}}.`}function invalidFieldType(et){return`Invalid field type "${et}".`}function invalidFieldTypeForCountAggregate(et,tt){return`Invalid field type "${et}" for aggregate: "${tt}", using "quantitative" instead.`}function invalidAggregate(et){return`Invalid aggregation operator "${et}".`}function droppingColor(et,tt){const{fill:nt,stroke:rt}=tt;return`Dropping color ${et} as the plot also has ${nt&&rt?"fill and stroke":nt?"fill":"stroke"}.`}function relativeBandSizeNotSupported(et){return`Position range does not support relative band size for ${et}.`}function emptyFieldDef(et,tt){return`Dropping ${stringify$1(et)} from channel "${tt}" since it does not contain any data field, datum, value, or signal.`}const LINE_WITH_VARYING_SIZE="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function incompatibleChannel(et,tt,nt){return`${et} dropped as it is incompatible with "${tt}"${nt?` when ${nt}`:""}.`}function offsetEncodingScaleIgnored(et){return`${et} encoding has no scale, so specified scale is ignored.`}function invalidEncodingChannel(et){return`${et}-encoding is dropped as ${et} is not a valid encoding channel.`}function channelShouldBeDiscrete(et){return`${et} encoding should be discrete (ordinal / nominal / binned).`}function channelShouldBeDiscreteOrDiscretizing(et){return`${et} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function facetChannelDropped(et){return`Facet encoding dropped as ${et.join(" and ")} ${et.length>1?"are":"is"} also specified.`}function discreteChannelCannotEncode(et,tt){return`Using discrete channel "${et}" to encode "${tt}" field can be misleading as it does not encode ${tt==="ordinal"?"order":"magnitude"}.`}function rangeMarkAlignmentCannotBeExpression(et){return`The ${et} for range marks cannot be an expression`}function lineWithRange(et,tt){return`Line mark is for continuous lines and thus cannot be used with ${et&&tt?"x2 and y2":et?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function orientOverridden(et,tt){return`Specified orient "${et}" overridden with "${tt}".`}function cannotUseScalePropertyWithNonColor(et){return`Cannot use the scale property "${et}" with non-color channel.`}function cannotUseRelativeBandSizeWithNonBandScale(et){return`Cannot use the relative band size with ${et} scale.`}function unaggregateDomainHasNoEffectForRawField(et){return`Using unaggregated domain with raw field has no effect (${stringify$1(et)}).`}function unaggregateDomainWithNonSharedDomainOp(et){return`Unaggregated domain not applicable for "${et}" since it produces values outside the origin domain of the source data.`}function unaggregatedDomainWithLogScale(et){return`Unaggregated domain is currently unsupported for log scale (${stringify$1(et)}).`}function cannotApplySizeToNonOrientedMark(et){return`Cannot apply size to non-oriented mark "${et}".`}function scaleTypeNotWorkWithChannel(et,tt,nt){return`Channel "${et}" does not work with "${tt}" scale. We are using "${nt}" scale instead.`}function scaleTypeNotWorkWithFieldDef(et,tt){return`FieldDef does not work with "${et}" scale. We are using "${tt}" scale instead.`}function scalePropertyNotWorkWithScaleType(et,tt,nt){return`${nt}-scale's "${tt}" is dropped as it does not work with ${et} scale.`}function stepDropped(et){return`The step for "${et}" is dropped because the ${et==="width"?"x":"y"} is continuous.`}function mergeConflictingProperty(et,tt,nt,rt){return`Conflicting ${tt.toString()} property "${et.toString()}" (${stringify$1(nt)} and ${stringify$1(rt)}). Using ${stringify$1(nt)}.`}function mergeConflictingDomainProperty(et,tt,nt,rt){return`Conflicting ${tt.toString()} property "${et.toString()}" (${stringify$1(nt)} and ${stringify$1(rt)}). Using the union of the two domains.`}function independentScaleMeansIndependentGuide(et){return`Setting the scale to be independent for "${et}" means we also have to set the guide (axis or legend) to be independent.`}function domainSortDropped(et){return`Dropping sort property ${stringify$1(et)} as unioned domains only support boolean or op "count", "min", and "max".`}const MORE_THAN_ONE_SORT="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",FACETED_INDEPENDENT_DIFFERENT_SOURCES="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",FACETED_INDEPENDENT_SAME_SOURCE="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function cannotStackRangedMark(et){return`Cannot stack "${et}" if there is already "${et}2".`}function cannotStackNonLinearScale(et){return`Cannot stack non-linear scale (${et}).`}function stackNonSummativeAggregate(et){return`Stacking is applied even though the aggregate function is non-summative ("${et}").`}function invalidTimeUnit(et,tt){return`Invalid ${et}: ${stringify$1(tt)}.`}function droppedDay(et){return`Dropping day from datetime ${stringify$1(et)} as day cannot be combined with other units.`}function errorBarCenterAndExtentAreNotNeeded(et,tt){return`${tt?"extent ":""}${tt&&et?"and ":""}${et?"center ":""}${tt&&et?"are ":"is "}not needed when data are aggregated.`}function errorBarCenterIsUsedWithWrongExtent(et,tt,nt){return`${et} is not usually used with ${tt} for ${nt}.`}function errorBarContinuousAxisHasCustomizedAggregate(et,tt){return`Continuous axis should not have customized aggregation function ${et}; ${tt} already agregates the axis.`}function errorBand1DNotSupport(et){return`1D error band does not support ${et}.`}function channelRequiredForBinned(et){return`Channel ${et} is required for "binned" bin.`}function channelShouldNotBeUsedForBinned(et){return`Channel ${et} should not be used with "binned" bin.`}function domainRequiredForThresholdScale(et){return`Domain for ${et} is required for threshold scale.`}globalThis&&globalThis.__classPrivateFieldSet;globalThis&&globalThis.__classPrivateFieldGet;const main$1=logger(Warn);let current=main$1;function set(et){return current=et,current}function reset(){return current=main$1,current}function warn(...et){current.warn(...et)}function debug$2(...et){current.debug(...et)}function isDateTime(et){if(et&&isObject(et)){for(const tt of TIMEUNIT_PARTS)if(tt in et)return!0}return!1}const MONTHS=["january","february","march","april","may","june","july","august","september","october","november","december"],SHORT_MONTHS=MONTHS.map(et=>et.substr(0,3)),DAYS=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],SHORT_DAYS=DAYS.map(et=>et.substr(0,3));function normalizeQuarter(et){if(isNumeric$1(et)&&(et=+et),isNumber$1(et))return et>4&&warn(invalidTimeUnit("quarter",et)),et-1;throw new Error(invalidTimeUnit("quarter",et))}function normalizeMonth(et){if(isNumeric$1(et)&&(et=+et),isNumber$1(et))return et-1;{const tt=et.toLowerCase(),nt=MONTHS.indexOf(tt);if(nt!==-1)return nt;const rt=tt.substr(0,3),ot=SHORT_MONTHS.indexOf(rt);if(ot!==-1)return ot;throw new Error(invalidTimeUnit("month",et))}}function normalizeDay(et){if(isNumeric$1(et)&&(et=+et),isNumber$1(et))return et%7;{const tt=et.toLowerCase(),nt=DAYS.indexOf(tt);if(nt!==-1)return nt;const rt=tt.substr(0,3),ot=SHORT_DAYS.indexOf(rt);if(ot!==-1)return ot;throw new Error(invalidTimeUnit("day",et))}}function dateTimeParts(et,tt){const nt=[];if(tt&&et.day!==void 0&&keys$1(et).length>1&&(warn(droppedDay(et)),et=duplicate(et),delete et.day),et.year!==void 0?nt.push(et.year):nt.push(2012),et.month!==void 0){const rt=tt?normalizeMonth(et.month):et.month;nt.push(rt)}else if(et.quarter!==void 0){const rt=tt?normalizeQuarter(et.quarter):et.quarter;nt.push(isNumber$1(rt)?rt*3:`${rt}*3`)}else nt.push(0);if(et.date!==void 0)nt.push(et.date);else if(et.day!==void 0){const rt=tt?normalizeDay(et.day):et.day;nt.push(isNumber$1(rt)?rt+1:`${rt}+1`)}else nt.push(1);for(const rt of["hours","minutes","seconds","milliseconds"]){const ot=et[rt];nt.push(typeof ot>"u"?0:ot)}return nt}function dateTimeToExpr(et){const nt=dateTimeParts(et,!0).join(", ");return et.utc?`utc(${nt})`:`datetime(${nt})`}function dateTimeExprToExpr(et){const nt=dateTimeParts(et,!1).join(", ");return et.utc?`utc(${nt})`:`datetime(${nt})`}function dateTimeToTimestamp(et){const tt=dateTimeParts(et,!0);return et.utc?+new Date(Date.UTC(...tt)):+new Date(...tt)}var __rest$t=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};const LOCAL_SINGLE_TIMEUNIT_INDEX={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},TIMEUNIT_PARTS=keys$1(LOCAL_SINGLE_TIMEUNIT_INDEX);function isLocalSingleTimeUnit(et){return!!LOCAL_SINGLE_TIMEUNIT_INDEX[et]}function isUTCTimeUnit(et){return et.startsWith("utc")}function getLocalTimeUnit(et){return et.substr(3)}const VEGALITE_TIMEFORMAT={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function getTimeUnitParts(et){return TIMEUNIT_PARTS.filter(tt=>containsTimeUnit(et,tt))}function containsTimeUnit(et,tt){const nt=et.indexOf(tt);return!(nt<0||nt>0&&tt==="seconds"&&et.charAt(nt-1)==="i"||et.length>nt+3&&tt==="day"&&et.charAt(nt+3)==="o"||nt>0&&tt==="year"&&et.charAt(nt-1)==="f")}function fieldExpr(et,tt,{end:nt}={end:!1}){const rt=accessPathWithDatum(tt),ot=isUTCTimeUnit(et)?"utc":"";function st(ft){return ft==="quarter"?`(${ot}quarter(${rt})-1)`:`${ot}${ft}(${rt})`}let ut;const ct={};for(const ft of TIMEUNIT_PARTS)containsTimeUnit(et,ft)&&(ct[ft]=st(ft),ut=ft);return nt&&(ct[ut]+="+1"),dateTimeExprToExpr(ct)}function timeUnitSpecifierExpression(et){if(!et)return;const tt=getTimeUnitParts(et);return`timeUnitSpecifier(${stringify$1(tt)}, ${stringify$1(VEGALITE_TIMEFORMAT)})`}function formatExpression(et,tt,nt){if(!et)return;const rt=timeUnitSpecifierExpression(et);return`${nt||isUTCTimeUnit(et)?"utc":"time"}Format(${tt}, ${rt})`}function normalizeTimeUnit(et){if(!et)return;let tt;return isString(et)?tt={unit:et}:isObject(et)&&(tt=Object.assign(Object.assign({},et),et.unit?{unit:et.unit}:{})),isUTCTimeUnit(tt.unit)&&(tt.utc=!0,tt.unit=getLocalTimeUnit(tt.unit)),tt}function timeUnitToString(et){const tt=normalizeTimeUnit(et),{utc:nt}=tt,rt=__rest$t(tt,["utc"]);return rt.unit?(nt?"utc":"")+keys$1(rt).map(ot=>varName(`${ot==="unit"?"":`_${ot}_`}${rt[ot]}`)).join(""):(nt?"utc":"")+"timeunit"+keys$1(rt).map(ot=>varName(`_${ot}_${rt[ot]}`)).join("")}function isSelectionPredicate(et){return et?.param}function isFieldEqualPredicate(et){return!!et?.field&&et.equal!==void 0}function isFieldLTPredicate(et){return!!et?.field&&et.lt!==void 0}function isFieldLTEPredicate(et){return!!et?.field&&et.lte!==void 0}function isFieldGTPredicate(et){return!!et?.field&&et.gt!==void 0}function isFieldGTEPredicate(et){return!!et?.field&&et.gte!==void 0}function isFieldRangePredicate(et){if(et?.field){if(isArray(et.range)&&et.range.length===2)return!0;if(isSignalRef(et.range))return!0}return!1}function isFieldOneOfPredicate(et){return!!et?.field&&(isArray(et.oneOf)||isArray(et.in))}function isFieldValidPredicate(et){return!!et?.field&&et.valid!==void 0}function isFieldPredicate(et){return isFieldOneOfPredicate(et)||isFieldEqualPredicate(et)||isFieldRangePredicate(et)||isFieldLTPredicate(et)||isFieldGTPredicate(et)||isFieldLTEPredicate(et)||isFieldGTEPredicate(et)}function predicateValueExpr(et,tt){return valueExpr(et,{timeUnit:tt,wrapTime:!0})}function predicateValuesExpr(et,tt){return et.map(nt=>predicateValueExpr(nt,tt))}function fieldFilterExpression(et,tt=!0){var nt;const{field:rt}=et,ot=(nt=normalizeTimeUnit(et.timeUnit))===null||nt===void 0?void 0:nt.unit,st=ot?`time(${fieldExpr(ot,rt)})`:vgField(et,{expr:"datum"});if(isFieldEqualPredicate(et))return`${st}===${predicateValueExpr(et.equal,ot)}`;if(isFieldLTPredicate(et)){const ut=et.lt;return`${st}<${predicateValueExpr(ut,ot)}`}else if(isFieldGTPredicate(et)){const ut=et.gt;return`${st}>${predicateValueExpr(ut,ot)}`}else if(isFieldLTEPredicate(et)){const ut=et.lte;return`${st}<=${predicateValueExpr(ut,ot)}`}else if(isFieldGTEPredicate(et)){const ut=et.gte;return`${st}>=${predicateValueExpr(ut,ot)}`}else{if(isFieldOneOfPredicate(et))return`indexof([${predicateValuesExpr(et.oneOf,ot).join(",")}], ${st}) !== -1`;if(isFieldValidPredicate(et))return fieldValidPredicate(st,et.valid);if(isFieldRangePredicate(et)){const{range:ut}=et,ct=isSignalRef(ut)?{signal:`${ut.signal}[0]`}:ut[0],ft=isSignalRef(ut)?{signal:`${ut.signal}[1]`}:ut[1];if(ct!==null&&ft!==null&&tt)return"inrange("+st+", ["+predicateValueExpr(ct,ot)+", "+predicateValueExpr(ft,ot)+"])";const pt=[];return ct!==null&&pt.push(`${st} >= ${predicateValueExpr(ct,ot)}`),ft!==null&&pt.push(`${st} <= ${predicateValueExpr(ft,ot)}`),pt.length>0?pt.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${stringify$1(et)}`)}function fieldValidPredicate(et,tt=!0){return tt?`isValid(${et}) && isFinite(+${et})`:`!isValid(${et}) || !isFinite(+${et})`}function normalizePredicate$1(et){var tt;return isFieldPredicate(et)&&et.timeUnit?Object.assign(Object.assign({},et),{timeUnit:(tt=normalizeTimeUnit(et.timeUnit))===null||tt===void 0?void 0:tt.unit}):et}const Type={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function isContinuous(et){return et==="quantitative"||et==="temporal"}function isDiscrete$1(et){return et==="ordinal"||et==="nominal"}const QUANTITATIVE=Type.quantitative,ORDINAL=Type.ordinal,TEMPORAL=Type.temporal,NOMINAL=Type.nominal,GEOJSON=Type.geojson;function getFullName(et){if(et)switch(et=et.toLowerCase(),et){case"q":case QUANTITATIVE:return"quantitative";case"t":case TEMPORAL:return"temporal";case"o":case ORDINAL:return"ordinal";case"n":case NOMINAL:return"nominal";case GEOJSON:return"geojson"}}var __rest$s=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};const ScaleType={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},SCALE_CATEGORY_INDEX={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function scaleCompatible(et,tt){const nt=SCALE_CATEGORY_INDEX[et],rt=SCALE_CATEGORY_INDEX[tt];return nt===rt||nt==="ordinal-position"&&rt==="time"||rt==="ordinal-position"&&nt==="time"}const SCALE_PRECEDENCE_INDEX={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function scaleTypePrecedence(et){return SCALE_PRECEDENCE_INDEX[et]}const QUANTITATIVE_SCALES=new Set(["linear","log","pow","sqrt","symlog"]),CONTINUOUS_TO_CONTINUOUS_SCALES=new Set([...QUANTITATIVE_SCALES,"time","utc"]);function isQuantitative(et){return QUANTITATIVE_SCALES.has(et)}const CONTINUOUS_TO_DISCRETE_SCALES=new Set(["quantile","quantize","threshold"]),CONTINUOUS_DOMAIN_SCALES=new Set([...CONTINUOUS_TO_CONTINUOUS_SCALES,...CONTINUOUS_TO_DISCRETE_SCALES,"sequential","identity"]),DISCRETE_DOMAIN_SCALES=new Set(["ordinal","bin-ordinal","point","band"]);function hasDiscreteDomain(et){return DISCRETE_DOMAIN_SCALES.has(et)}function hasContinuousDomain(et){return CONTINUOUS_DOMAIN_SCALES.has(et)}function isContinuousToContinuous(et){return CONTINUOUS_TO_CONTINUOUS_SCALES.has(et)}function isContinuousToDiscrete(et){return CONTINUOUS_TO_DISCRETE_SCALES.has(et)}const defaultScaleConfig={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0};function isExtendedScheme(et){return!isString(et)&&!!et.name}function isParameterDomain(et){return et?.param}function isDomainUnionWith(et){return et?.unionWith}function isFieldRange(et){return isObject(et)&&"field"in et}const SCALE_PROPERTY_INDEX={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTY_INDEX=__rest$s(SCALE_PROPERTY_INDEX,["type","domain","range","rangeMax","rangeMin","scheme"]),NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES=keys$1(NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTY_INDEX);function scaleTypeSupportProperty(et,tt){switch(tt){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(et);case"bins":return!["point","band","identity","ordinal"].includes(et);case"round":return isContinuousToContinuous(et)||et==="band"||et==="point";case"padding":case"rangeMin":case"rangeMax":return isContinuousToContinuous(et)||["point","band"].includes(et);case"paddingOuter":case"align":return["point","band"].includes(et);case"paddingInner":return et==="band";case"domainMax":case"domainMid":case"domainMin":case"clamp":return isContinuousToContinuous(et);case"nice":return isContinuousToContinuous(et)||et==="quantize"||et==="threshold";case"exponent":return et==="pow";case"base":return et==="log";case"constant":return et==="symlog";case"zero":return hasContinuousDomain(et)&&!contains(["log","time","utc","threshold","quantile"],et)}}function channelScalePropertyIncompatability(et,tt){switch(tt){case"interpolate":case"scheme":case"domainMid":return isColorChannel(et)?void 0:cannotUseScalePropertyWithNonColor(tt);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function scaleTypeSupportDataType(et,tt){return contains([ORDINAL,NOMINAL],tt)?et===void 0||hasDiscreteDomain(et):tt===TEMPORAL?contains([ScaleType.TIME,ScaleType.UTC,void 0],et):tt===QUANTITATIVE?isQuantitative(et)||isContinuousToDiscrete(et)||et===void 0:!0}function channelSupportScaleType(et,tt,nt=!1){if(!isScaleChannel(et))return!1;switch(et){case X:case Y:case XOFFSET:case YOFFSET:case THETA:case RADIUS:return isContinuousToContinuous(tt)||tt==="band"?!0:tt==="point"?!nt:!1;case SIZE$1:case STROKEWIDTH:case OPACITY:case FILLOPACITY:case STROKEOPACITY:case ANGLE:return isContinuousToContinuous(tt)||isContinuousToDiscrete(tt)||contains(["band","point","ordinal"],tt);case COLOR:case FILL:case STROKE:return tt!=="band";case STROKEDASH:case SHAPE:return tt==="ordinal"||isContinuousToDiscrete(tt)}}const Mark={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},ARC=Mark.arc,AREA=Mark.area,BAR=Mark.bar,IMAGE=Mark.image,LINE=Mark.line,POINT=Mark.point,RECT=Mark.rect,RULE=Mark.rule,TEXT=Mark.text,TICK=Mark.tick,TRAIL=Mark.trail,CIRCLE=Mark.circle,SQUARE=Mark.square,GEOSHAPE=Mark.geoshape;function isPathMark(et){return["line","area","trail"].includes(et)}function isRectBasedMark(et){return["rect","bar","image","arc"].includes(et)}const PRIMITIVE_MARKS=new Set(keys$1(Mark));function isMarkDef(et){return et.type}const STROKE_CONFIG=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],FILL_CONFIG=["fill","fillOpacity"],FILL_STROKE_CONFIG=[...STROKE_CONFIG,...FILL_CONFIG],VL_ONLY_MARK_CONFIG_INDEX={color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1},VL_ONLY_MARK_CONFIG_PROPERTIES=keys$1(VL_ONLY_MARK_CONFIG_INDEX),VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]},defaultMarkConfig={color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},MARK_CONFIG_INDEX={mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1},MARK_CONFIGS=keys$1(MARK_CONFIG_INDEX);function isRelativeBandSize(et){return et&&et.band!=null}const BAR_CORNER_RADIUS_INDEX={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},DEFAULT_RECT_BAND_SIZE=5,defaultBarConfig={binSpacing:1,continuousBandSize:DEFAULT_RECT_BAND_SIZE,timeUnitBandPosition:.5},defaultRectConfig={binSpacing:0,continuousBandSize:DEFAULT_RECT_BAND_SIZE,timeUnitBandPosition:.5},defaultTickConfig={thickness:1};function getMarkType(et){return isMarkDef(et)?et.type:et}function midPointRefWithPositionInvalidTest(et){const{channel:tt,channelDef:nt,markDef:rt,scale:ot,config:st}=et,ut=midPoint(et);return isFieldDef(nt)&&!isCountingAggregateOp(nt.aggregate)&&ot&&isContinuousToContinuous(ot.get("type"))?wrapPositionInvalidTest({fieldDef:nt,channel:tt,markDef:rt,ref:ut,config:st}):ut}function wrapPositionInvalidTest({fieldDef:et,channel:tt,markDef:nt,ref:rt,config:ot}){return isPathMark(nt.type)?rt:getMarkPropOrConfig("invalid",nt,ot)===null?[fieldInvalidTestValueRef(et,tt),rt]:rt}function fieldInvalidTestValueRef(et,tt){const nt=fieldInvalidPredicate(et,!0),ot=getMainRangeChannel(tt)==="y"?{field:{group:"height"}}:{value:0};return Object.assign({test:nt},ot)}function fieldInvalidPredicate(et,tt=!0){return fieldValidPredicate(isString(et)?et:vgField(et,{expr:"datum"}),!tt)}function datumDefToExpr(et){const{datum:tt}=et;return isDateTime(tt)?dateTimeToExpr(tt):`${stringify$1(tt)}`}function valueRefForFieldOrDatumDef(et,tt,nt,rt){const ot={};if(tt&&(ot.scale=tt),isDatumDef(et)){const{datum:st}=et;isDateTime(st)?ot.signal=dateTimeToExpr(st):isSignalRef(st)?ot.signal=st.signal:isExprRef(st)?ot.signal=st.expr:ot.value=st}else ot.field=vgField(et,nt);if(rt){const{offset:st,band:ut}=rt;st&&(ot.offset=st),ut&&(ot.band=ut)}return ot}function interpolatedSignalRef({scaleName:et,fieldOrDatumDef:tt,fieldOrDatumDef2:nt,offset:rt,startSuffix:ot,bandPosition:st=.5}){const ut=0<st&&st<1?"datum":void 0,ct=vgField(tt,{expr:ut,suffix:ot}),ft=nt!==void 0?vgField(nt,{expr:ut}):vgField(tt,{suffix:"end",expr:ut}),pt={};if(st===0||st===1){pt.scale=et;const ht=st===0?ct:ft;pt.field=ht}else{const ht=isSignalRef(st)?`${st.signal} * ${ct} + (1-${st.signal}) * ${ft}`:`${st} * ${ct} + ${1-st} * ${ft}`;pt.signal=`scale("${et}", ${ht})`}return rt&&(pt.offset=rt),pt}function midPoint({channel:et,channelDef:tt,channel2Def:nt,markDef:rt,config:ot,scaleName:st,scale:ut,stack:ct,offset:ft,defaultRef:pt,bandPosition:ht}){var mt;if(tt){if(isFieldOrDatumDef(tt)){const yt=ut?.get("type");if(isTypedFieldDef(tt)){ht??(ht=getBandPosition({fieldDef:tt,fieldDef2:nt,markDef:rt,config:ot}));const{bin:vt,timeUnit:Tt,type:Et}=tt;if(isBinning(vt)||ht&&Tt&&Et===TEMPORAL)return ct?.impute?valueRefForFieldOrDatumDef(tt,st,{binSuffix:"mid"},{offset:ft}):ht&&!hasDiscreteDomain(yt)?interpolatedSignalRef({scaleName:st,fieldOrDatumDef:tt,bandPosition:ht,offset:ft}):valueRefForFieldOrDatumDef(tt,st,binRequiresRange(tt,et)?{binSuffix:"range"}:{},{offset:ft});if(isBinned(vt)){if(isFieldDef(nt))return interpolatedSignalRef({scaleName:st,fieldOrDatumDef:tt,fieldOrDatumDef2:nt,bandPosition:ht,offset:ft});warn(channelRequiredForBinned(et===X?X2:Y2))}}return valueRefForFieldOrDatumDef(tt,st,hasDiscreteDomain(yt)?{binSuffix:"range"}:{},{offset:ft,band:yt==="band"?(mt=ht??tt.bandPosition)!==null&&mt!==void 0?mt:.5:void 0})}else if(isValueDef(tt)){const yt=tt.value,vt=ft?{offset:ft}:{};return Object.assign(Object.assign({},widthHeightValueOrSignalRef(et,yt)),vt)}}return isFunction$3(pt)&&(pt=pt()),pt&&Object.assign(Object.assign({},pt),ft?{offset:ft}:{})}function widthHeightValueOrSignalRef(et,tt){return contains(["x","x2"],et)&&tt==="width"?{field:{group:"width"}}:contains(["y","y2"],et)&&tt==="height"?{field:{group:"height"}}:signalOrValueRef(tt)}function isCustomFormatType(et){return et&&et!=="number"&&et!=="time"}function customFormatExpr(et,tt,nt){return`${et}(${tt}${nt?`, ${stringify$1(nt)}`:""})`}const BIN_RANGE_DELIMITER=" \u2013 ";function formatSignalRef({fieldOrDatumDef:et,format:tt,formatType:nt,expr:rt,normalizeStack:ot,config:st}){var ut,ct;if(isCustomFormatType(nt))return formatCustomType({fieldOrDatumDef:et,format:tt,formatType:nt,expr:rt,config:st});const ft=fieldToFormat(et,rt,ot),pt=channelDefType(et);if(tt===void 0&&nt===void 0&&st.customFormatTypes){if(pt==="quantitative"){if(ot&&st.normalizedNumberFormatType)return formatCustomType({fieldOrDatumDef:et,format:st.normalizedNumberFormat,formatType:st.normalizedNumberFormatType,expr:rt,config:st});if(st.numberFormatType)return formatCustomType({fieldOrDatumDef:et,format:st.numberFormat,formatType:st.numberFormatType,expr:rt,config:st})}if(pt==="temporal"&&st.timeFormatType&&isFieldDef(et)&&et.timeUnit===void 0)return formatCustomType({fieldOrDatumDef:et,format:st.timeFormat,formatType:st.timeFormatType,expr:rt,config:st})}if(isFieldOrDatumDefForTimeFormat(et)){const ht=timeFormatExpression({field:ft,timeUnit:isFieldDef(et)?(ut=normalizeTimeUnit(et.timeUnit))===null||ut===void 0?void 0:ut.unit:void 0,format:tt,formatType:st.timeFormatType,rawTimeFormat:st.timeFormat,isUTCScale:isScaleFieldDef(et)&&((ct=et.scale)===null||ct===void 0?void 0:ct.type)===ScaleType.UTC});return ht?{signal:ht}:void 0}if(tt=numberFormat({type:pt,specifiedFormat:tt,config:st,normalizeStack:ot}),isFieldDef(et)&&isBinning(et.bin)){const ht=vgField(et,{expr:rt,binSuffix:"end"});return{signal:binFormatExpression(ft,ht,tt,nt,st)}}else return tt||channelDefType(et)==="quantitative"?{signal:`${formatExpr(ft,tt)}`}:{signal:`isValid(${ft}) ? ${ft} : ""+${ft}`}}function fieldToFormat(et,tt,nt){return isFieldDef(et)?nt?`${vgField(et,{expr:tt,suffix:"end"})}-${vgField(et,{expr:tt,suffix:"start"})}`:vgField(et,{expr:tt}):datumDefToExpr(et)}function formatCustomType({fieldOrDatumDef:et,format:tt,formatType:nt,expr:rt,normalizeStack:ot,config:st,field:ut}){if(ut??(ut=fieldToFormat(et,rt,ot)),ut!=="datum.value"&&isFieldDef(et)&&isBinning(et.bin)){const ct=vgField(et,{expr:rt,binSuffix:"end"});return{signal:binFormatExpression(ut,ct,tt,nt,st)}}return{signal:customFormatExpr(nt,ut,tt)}}function guideFormat(et,tt,nt,rt,ot,st){var ut;if(!isCustomFormatType(rt)&&!(nt===void 0&&rt===void 0&&ot.customFormatTypes&&channelDefType(et)==="quantitative"&&(ot.normalizedNumberFormatType&&isPositionFieldOrDatumDef(et)&&et.stack==="normalize"||ot.numberFormatType))){if(isPositionFieldOrDatumDef(et)&&et.stack==="normalize"&&ot.normalizedNumberFormat)return numberFormat({type:"quantitative",config:ot,normalizeStack:!0});if(isFieldOrDatumDefForTimeFormat(et)){const ct=isFieldDef(et)?(ut=normalizeTimeUnit(et.timeUnit))===null||ut===void 0?void 0:ut.unit:void 0;return ct===void 0&&ot.customFormatTypes&&ot.timeFormatType?void 0:timeFormat({specifiedFormat:nt,timeUnit:ct,config:ot,omitTimeFormatConfig:st})}return numberFormat({type:tt,specifiedFormat:nt,config:ot})}}function guideFormatType(et,tt,nt){var rt;if(et&&(isSignalRef(et)||et==="number"||et==="time"))return et;if(isFieldOrDatumDefForTimeFormat(tt)&&nt!=="time"&&nt!=="utc")return isFieldDef(tt)&&((rt=normalizeTimeUnit(tt?.timeUnit))===null||rt===void 0?void 0:rt.utc)?"utc":"time"}function numberFormat({type:et,specifiedFormat:tt,config:nt,normalizeStack:rt}){if(isString(tt))return tt;if(et===QUANTITATIVE)return rt?nt.normalizedNumberFormat:nt.numberFormat}function timeFormat({specifiedFormat:et,timeUnit:tt,config:nt,omitTimeFormatConfig:rt}){return et||(tt?{signal:timeUnitSpecifierExpression(tt)}:rt?void 0:nt.timeFormat)}function formatExpr(et,tt){return`format(${et}, "${tt||""}")`}function binNumberFormatExpr(et,tt,nt,rt){var ot;return isCustomFormatType(nt)?customFormatExpr(nt,et,tt):formatExpr(et,(ot=isString(tt)?tt:void 0)!==null&&ot!==void 0?ot:rt.numberFormat)}function binFormatExpression(et,tt,nt,rt,ot){if(nt===void 0&&rt===void 0&&ot.customFormatTypes&&ot.numberFormatType)return binFormatExpression(et,tt,ot.numberFormat,ot.numberFormatType,ot);const st=binNumberFormatExpr(et,nt,rt,ot),ut=binNumberFormatExpr(tt,nt,rt,ot);return`${fieldValidPredicate(et,!1)} ? "null" : ${st} + "${BIN_RANGE_DELIMITER}" + ${ut}`}function timeFormatExpression({field:et,timeUnit:tt,format:nt,formatType:rt,rawTimeFormat:ot,isUTCScale:st}){return!tt||nt?!tt&&rt?`${rt}(${et}, '${nt}')`:(nt=isString(nt)?nt:ot,`${st?"utc":"time"}Format(${et}, '${nt}')`):formatExpression(tt,et,st)}const DEFAULT_SORT_OP="min",SORT_BY_CHANNEL_INDEX={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function isSortByChannel(et){return et in SORT_BY_CHANNEL_INDEX}function isSortByEncoding(et){return!!et?.encoding}function isSortField(et){return et&&(et.op==="count"||!!et.field)}function isSortArray(et){return et&&isArray(et)}function isFacetMapping(et){return"row"in et||"column"in et}function isFacetFieldDef(et){return!!et&&"header"in et}function isFacetSpec(et){return"facet"in et}var __rest$r=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function isConditionalParameter(et){return et.param}function isRepeatRef(et){return et&&!isString(et)&&"repeat"in et}function toFieldDefBase(et){const{field:tt,timeUnit:nt,bin:rt,aggregate:ot}=et;return Object.assign(Object.assign(Object.assign(Object.assign({},nt?{timeUnit:nt}:{}),rt?{bin:rt}:{}),ot?{aggregate:ot}:{}),{field:tt})}function isSortableFieldDef(et){return"sort"in et}function getBandPosition({fieldDef:et,fieldDef2:tt,markDef:nt,config:rt}){if(isFieldOrDatumDef(et)&&et.bandPosition!==void 0)return et.bandPosition;if(isFieldDef(et)){const{timeUnit:ot,bin:st}=et;if(ot&&!tt)return isRectBasedMark(nt.type)?0:getMarkConfig("timeUnitBandPosition",nt,rt);if(isBinning(st))return .5}}function getBandSize({channel:et,fieldDef:tt,fieldDef2:nt,markDef:rt,config:ot,scaleType:st,useVlSizeChannel:ut}){var ct,ft,pt;const ht=getSizeChannel(et),mt=getMarkPropOrConfig(ut?"size":ht,rt,ot,{vgChannel:ht});if(mt!==void 0)return mt;if(isFieldDef(tt)){const{timeUnit:yt,bin:vt}=tt;if(yt&&!nt)return{band:getMarkConfig("timeUnitBandSize",rt,ot)};if(isBinning(vt)&&!hasDiscreteDomain(st))return{band:1}}if(isRectBasedMark(rt.type))return st?hasDiscreteDomain(st)?((ct=ot[rt.type])===null||ct===void 0?void 0:ct.discreteBandSize)||{band:1}:(ft=ot[rt.type])===null||ft===void 0?void 0:ft.continuousBandSize:(pt=ot[rt.type])===null||pt===void 0?void 0:pt.discreteBandSize}function hasBandEnd(et,tt,nt,rt){return isBinning(et.bin)||et.timeUnit&&isTypedFieldDef(et)&&et.type==="temporal"?getBandPosition({fieldDef:et,fieldDef2:tt,markDef:nt,config:rt})!==void 0:!1}function isConditionalDef(et){return et&&"condition"in et}function hasConditionalFieldDef(et){const tt=et?.condition;return!!tt&&!isArray(tt)&&isFieldDef(tt)}function hasConditionalFieldOrDatumDef(et){const tt=et?.condition;return!!tt&&!isArray(tt)&&isFieldOrDatumDef(tt)}function hasConditionalValueDef(et){const tt=et?.condition;return!!tt&&(isArray(tt)||isValueDef(tt))}function isFieldDef(et){return et&&(!!et.field||et.aggregate==="count")}function channelDefType(et){return et?.type}function isDatumDef(et){return et&&"datum"in et}function isContinuousFieldOrDatumDef(et){return isTypedFieldDef(et)&&!isDiscrete(et)||isNumericDataDef(et)}function isNumericDataDef(et){return isDatumDef(et)&&isNumber$1(et.datum)}function isFieldOrDatumDef(et){return isFieldDef(et)||isDatumDef(et)}function isTypedFieldDef(et){return et&&("field"in et||et.aggregate==="count")&&"type"in et}function isValueDef(et){return et&&"value"in et&&"value"in et}function isScaleFieldDef(et){return et&&("scale"in et||"sort"in et)}function isPositionFieldOrDatumDef(et){return et&&("axis"in et||"stack"in et||"impute"in et)}function isMarkPropFieldOrDatumDef(et){return et&&"legend"in et}function isStringFieldOrDatumDef(et){return et&&("format"in et||"formatType"in et)}function toStringFieldDef(et){return omit$1(et,["legend","axis","header","scale"])}function isOpFieldDef(et){return"op"in et}function vgField(et,tt={}){var nt,rt,ot;let st=et.field;const ut=tt.prefix;let ct=tt.suffix,ft="";if(isCount(et))st=internalField("count");else{let pt;if(!tt.nofn)if(isOpFieldDef(et))pt=et.op;else{const{bin:ht,aggregate:mt,timeUnit:yt}=et;isBinning(ht)?(pt=binToString(ht),ct=((nt=tt.binSuffix)!==null&&nt!==void 0?nt:"")+((rt=tt.suffix)!==null&&rt!==void 0?rt:"")):mt?isArgmaxDef(mt)?(ft=`["${st}"]`,st=`argmax_${mt.argmax}`):isArgminDef(mt)?(ft=`["${st}"]`,st=`argmin_${mt.argmin}`):pt=String(mt):yt&&(pt=timeUnitToString(yt),ct=(!["range","mid"].includes(tt.binSuffix)&&tt.binSuffix||"")+((ot=tt.suffix)!==null&&ot!==void 0?ot:""))}pt&&(st=st?`${pt}_${st}`:pt)}return ct&&(st=`${st}_${ct}`),ut&&(st=`${ut}_${st}`),tt.forAs?removePathFromField(st):tt.expr?flatAccessWithDatum(st,tt.expr)+ft:replacePathInField(st)+ft}function isDiscrete(et){switch(et.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return isFieldDef(et)&&!!et.bin;case"temporal":return!1}throw new Error(invalidFieldType(et.type))}function isDiscretizing(et){var tt;return isScaleFieldDef(et)&&isContinuousToDiscrete((tt=et.scale)===null||tt===void 0?void 0:tt.type)}function isCount(et){return et.aggregate==="count"}function verbalTitleFormatter(et,tt){var nt;const{field:rt,bin:ot,timeUnit:st,aggregate:ut}=et;if(ut==="count")return tt.countTitle;if(isBinning(ot))return`${rt} (binned)`;if(st){const ct=(nt=normalizeTimeUnit(st))===null||nt===void 0?void 0:nt.unit;if(ct)return`${rt} (${getTimeUnitParts(ct).join("-")})`}else if(ut)return isArgmaxDef(ut)?`${rt} for max ${ut.argmax}`:isArgminDef(ut)?`${rt} for min ${ut.argmin}`:`${titleCase(ut)} of ${rt}`;return rt}function functionalTitleFormatter(et){const{aggregate:tt,bin:nt,timeUnit:rt,field:ot}=et;if(isArgmaxDef(tt))return`${ot} for argmax(${tt.argmax})`;if(isArgminDef(tt))return`${ot} for argmin(${tt.argmin})`;const st=normalizeTimeUnit(rt),ut=tt||st?.unit||st?.maxbins&&"timeunit"||isBinning(nt)&&"bin";return ut?`${ut.toUpperCase()}(${ot})`:ot}const defaultTitleFormatter=(et,tt)=>{switch(tt.fieldTitle){case"plain":return et.field;case"functional":return functionalTitleFormatter(et);default:return verbalTitleFormatter(et,tt)}};let titleFormatter=defaultTitleFormatter;function setTitleFormatter(et){titleFormatter=et}function resetTitleFormatter(){setTitleFormatter(defaultTitleFormatter)}function title(et,tt,{allowDisabling:nt,includeDefault:rt=!0}){var ot,st;const ut=(ot=getGuide(et))===null||ot===void 0?void 0:ot.title;if(!isFieldDef(et))return ut??et.title;const ct=et,ft=rt?defaultTitle(ct,tt):void 0;return nt?getFirstDefined(ut,ct.title,ft):(st=ut??ct.title)!==null&&st!==void 0?st:ft}function getGuide(et){if(isPositionFieldOrDatumDef(et)&&et.axis)return et.axis;if(isMarkPropFieldOrDatumDef(et)&&et.legend)return et.legend;if(isFacetFieldDef(et)&&et.header)return et.header}function defaultTitle(et,tt){return titleFormatter(et,tt)}function getFormatMixins(et){var tt;if(isStringFieldOrDatumDef(et)){const{format:nt,formatType:rt}=et;return{format:nt,formatType:rt}}else{const nt=(tt=getGuide(et))!==null&&tt!==void 0?tt:{},{format:rt,formatType:ot}=nt;return{format:rt,formatType:ot}}}function defaultType$2(et,tt){var nt;switch(tt){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(isSortableFieldDef(et)&&isArray(et.sort))return"ordinal";const{aggregate:rt,bin:ot,timeUnit:st}=et;if(st)return"temporal";if(ot||rt&&!isArgmaxDef(rt)&&!isArgminDef(rt))return"quantitative";if(isScaleFieldDef(et)&&((nt=et.scale)===null||nt===void 0?void 0:nt.type))switch(SCALE_CATEGORY_INDEX[et.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function getFieldDef(et){if(isFieldDef(et))return et;if(hasConditionalFieldDef(et))return et.condition}function getFieldOrDatumDef(et){if(isFieldOrDatumDef(et))return et;if(hasConditionalFieldOrDatumDef(et))return et.condition}function initChannelDef(et,tt,nt,rt={}){if(isString(et)||isNumber$1(et)||isBoolean$2(et)){const ot=isString(et)?"string":isNumber$1(et)?"number":"boolean";return warn(primitiveChannelDef(tt,ot,et)),{value:et}}return isFieldOrDatumDef(et)?initFieldOrDatumDef(et,tt,nt,rt):hasConditionalFieldOrDatumDef(et)?Object.assign(Object.assign({},et),{condition:initFieldOrDatumDef(et.condition,tt,nt,rt)}):et}function initFieldOrDatumDef(et,tt,nt,rt){if(isStringFieldOrDatumDef(et)){const{format:ot,formatType:st}=et,ut=__rest$r(et,["format","formatType"]);if(isCustomFormatType(st)&&!nt.customFormatTypes)return warn(customFormatTypeNotAllowed(tt)),initFieldOrDatumDef(ut,tt,nt,rt)}else{const ot=isPositionFieldOrDatumDef(et)?"axis":isMarkPropFieldOrDatumDef(et)?"legend":isFacetFieldDef(et)?"header":null;if(ot&&et[ot]){const st=et[ot],{format:ut,formatType:ct}=st,ft=__rest$r(st,["format","formatType"]);if(isCustomFormatType(ct)&&!nt.customFormatTypes)return warn(customFormatTypeNotAllowed(tt)),initFieldOrDatumDef(Object.assign(Object.assign({},et),{[ot]:ft}),tt,nt,rt)}}return isFieldDef(et)?initFieldDef(et,tt,rt):initDatumDef(et)}function initDatumDef(et){let tt=et.type;if(tt)return et;const{datum:nt}=et;return tt=isNumber$1(nt)?"quantitative":isString(nt)?"nominal":isDateTime(nt)?"temporal":void 0,Object.assign(Object.assign({},et),{type:tt})}function initFieldDef(et,tt,{compositeMark:nt=!1}={}){const{aggregate:rt,timeUnit:ot,bin:st,field:ut}=et,ct=Object.assign({},et);if(!nt&&rt&&!isAggregateOp(rt)&&!isArgmaxDef(rt)&&!isArgminDef(rt)&&(warn(invalidAggregate(rt)),delete ct.aggregate),ot&&(ct.timeUnit=normalizeTimeUnit(ot)),ut&&(ct.field=`${ut}`),isBinning(st)&&(ct.bin=normalizeBin(st,tt)),isBinned(st)&&!isXorY(tt)&&warn(channelShouldNotBeUsedForBinned(tt)),isTypedFieldDef(ct)){const{type:ft}=ct,pt=getFullName(ft);ft!==pt&&(ct.type=pt),ft!=="quantitative"&&isCountingAggregateOp(rt)&&(warn(invalidFieldTypeForCountAggregate(ft,rt)),ct.type="quantitative")}else if(!isSecondaryRangeChannel(tt)){const ft=defaultType$2(ct,tt);ct.type=ft}if(isTypedFieldDef(ct)){const{compatible:ft,warning:pt}=channelCompatibility(ct,tt)||{};ft===!1&&warn(pt)}if(isSortableFieldDef(ct)&&isString(ct.sort)){const{sort:ft}=ct;if(isSortByChannel(ft))return Object.assign(Object.assign({},ct),{sort:{encoding:ft}});const pt=ft.substr(1);if(ft.charAt(0)==="-"&&isSortByChannel(pt))return Object.assign(Object.assign({},ct),{sort:{encoding:pt,order:"descending"}})}if(isFacetFieldDef(ct)){const{header:ft}=ct;if(ft){const{orient:pt}=ft,ht=__rest$r(ft,["orient"]);if(pt)return Object.assign(Object.assign({},ct),{header:Object.assign(Object.assign({},ht),{labelOrient:ft.labelOrient||pt,titleOrient:ft.titleOrient||pt})})}}return ct}function normalizeBin(et,tt){return isBoolean$2(et)?{maxbins:autoMaxBins(tt)}:et==="binned"?{binned:!0}:!et.maxbins&&!et.step?Object.assign(Object.assign({},et),{maxbins:autoMaxBins(tt)}):et}const COMPATIBLE={compatible:!0};function channelCompatibility(et,tt){const nt=et.type;if(nt==="geojson"&&tt!=="shape")return{compatible:!1,warning:`Channel ${tt} should not be used with a geojson data.`};switch(tt){case ROW:case COLUMN:case FACET:return isDiscrete(et)?COMPATIBLE:{compatible:!1,warning:channelShouldBeDiscrete(tt)};case X:case Y:case XOFFSET:case YOFFSET:case COLOR:case FILL:case STROKE:case TEXT$1:case DETAIL:case KEY:case TOOLTIP:case HREF:case URL$1:case ANGLE:case THETA:case RADIUS:case DESCRIPTION:return COMPATIBLE;case LONGITUDE:case LONGITUDE2:case LATITUDE:case LATITUDE2:return nt!==QUANTITATIVE?{compatible:!1,warning:`Channel ${tt} should be used with a quantitative field only, not ${et.type} field.`}:COMPATIBLE;case OPACITY:case FILLOPACITY:case STROKEOPACITY:case STROKEWIDTH:case SIZE$1:case THETA2:case RADIUS2:case X2:case Y2:return nt==="nominal"&&!et.sort?{compatible:!1,warning:`Channel ${tt} should not be used with an unsorted discrete field.`}:COMPATIBLE;case SHAPE:case STROKEDASH:return!isDiscrete(et)&&!isDiscretizing(et)?{compatible:!1,warning:channelShouldBeDiscreteOrDiscretizing(tt)}:COMPATIBLE;case ORDER:return et.type==="nominal"&&!("sort"in et)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:COMPATIBLE}}function isFieldOrDatumDefForTimeFormat(et){const{formatType:tt}=getFormatMixins(et);return tt==="time"||!tt&&isTimeFieldDef(et)}function isTimeFieldDef(et){return et&&(et.type==="temporal"||isFieldDef(et)&&!!et.timeUnit)}function valueExpr(et,{timeUnit:tt,type:nt,wrapTime:rt,undefinedIfExprNotRequired:ot}){var st;const ut=tt&&((st=normalizeTimeUnit(tt))===null||st===void 0?void 0:st.unit);let ct=ut||nt==="temporal",ft;return isExprRef(et)?ft=et.expr:isSignalRef(et)?ft=et.signal:isDateTime(et)?(ct=!0,ft=dateTimeToExpr(et)):(isString(et)||isNumber$1(et))&&ct&&(ft=`datetime(${stringify$1(et)})`,isLocalSingleTimeUnit(ut)&&(isNumber$1(et)&&et<1e4||isString(et)&&isNaN(Date.parse(et)))&&(ft=dateTimeToExpr({[ut]:et}))),ft?rt&&ct?`time(${ft})`:ft:ot?void 0:stringify$1(et)}function valueArray(et,tt){const{type:nt}=et;return tt.map(rt=>{const ot=valueExpr(rt,{timeUnit:isFieldDef(et)?et.timeUnit:void 0,type:nt,undefinedIfExprNotRequired:!0});return ot!==void 0?{signal:ot}:rt})}function binRequiresRange(et,tt){return isBinning(et.bin)?isScaleChannel(tt)&&["ordinal","nominal"].includes(et.type):(console.warn("Only call this method for binned field defs."),!1)}const CONDITIONAL_AXIS_PROP_INDEX={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function isConditionalAxisValue(et){return et?.condition}const AXIS_PARTS=["domain","grid","labels","ticks","title"],AXIS_PROPERTY_TYPE={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},COMMON_AXIS_PROPERTIES_INDEX={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},AXIS_PROPERTIES_INDEX=Object.assign(Object.assign({},COMMON_AXIS_PROPERTIES_INDEX),{style:1,labelExpr:1,encoding:1});function isAxisProperty(et){return!!AXIS_PROPERTIES_INDEX[et]}const AXIS_CONFIGS_INDEX={axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1},AXIS_CONFIGS=keys$1(AXIS_CONFIGS_INDEX);function isUnitSpec(et){return"mark"in et}class CompositeMarkNormalizer{constructor(tt,nt){this.name=tt,this.run=nt}hasMatchingType(tt){return isUnitSpec(tt)?getMarkType(tt.mark)===this.name:!1}}var __rest$q=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function channelHasField(et,tt){const nt=et&&et[tt];return nt?isArray(nt)?some(nt,rt=>!!rt.field):isFieldDef(nt)||hasConditionalFieldDef(nt):!1}function channelHasFieldOrDatum(et,tt){const nt=et&&et[tt];return nt?isArray(nt)?some(nt,rt=>!!rt.field):isFieldDef(nt)||isDatumDef(nt)||hasConditionalFieldOrDatumDef(nt):!1}function channelHasNestedOffsetScale(et,tt){if(isXorY(tt)){const nt=et[tt];if((isFieldDef(nt)||isDatumDef(nt))&&isDiscrete$1(nt.type)){const rt=getOffsetScaleChannel(tt);return channelHasFieldOrDatum(et,rt)}}return!1}function isAggregate$1(et){return some(CHANNELS,tt=>{if(channelHasField(et,tt)){const nt=et[tt];if(isArray(nt))return some(nt,rt=>!!rt.aggregate);{const rt=getFieldDef(nt);return rt&&!!rt.aggregate}}return!1})}function extractTransformsFromEncoding(et,tt){const nt=[],rt=[],ot=[],st=[],ut={};return forEach(et,(ct,ft)=>{if(isFieldDef(ct)){const{field:pt,aggregate:ht,bin:mt,timeUnit:yt}=ct,vt=__rest$q(ct,["field","aggregate","bin","timeUnit"]);if(ht||yt||mt){const Tt=getGuide(ct),Et=Tt?.title;let xt=vgField(ct,{forAs:!0});const At=Object.assign(Object.assign(Object.assign({},Et?[]:{title:title(ct,tt,{allowDisabling:!0})}),vt),{field:xt});if(ht){let Ct;if(isArgmaxDef(ht)?(Ct="argmax",xt=vgField({op:"argmax",field:ht.argmax},{forAs:!0}),At.field=`${xt}.${pt}`):isArgminDef(ht)?(Ct="argmin",xt=vgField({op:"argmin",field:ht.argmin},{forAs:!0}),At.field=`${xt}.${pt}`):ht!=="boxplot"&&ht!=="errorbar"&&ht!=="errorband"&&(Ct=ht),Ct){const $t={op:Ct,as:xt};pt&&($t.field=pt),st.push($t)}}else if(nt.push(xt),isTypedFieldDef(ct)&&isBinning(mt)){if(rt.push({bin:mt,field:pt,as:xt}),nt.push(vgField(ct,{binSuffix:"end"})),binRequiresRange(ct,ft)&&nt.push(vgField(ct,{binSuffix:"range"})),isXorY(ft)){const Ct={field:`${xt}_end`};ut[`${ft}2`]=Ct}At.bin="binned",isSecondaryRangeChannel(ft)||(At.type=QUANTITATIVE)}else if(yt){ot.push({timeUnit:yt,field:pt,as:xt});const Ct=isTypedFieldDef(ct)&&ct.type!==TEMPORAL&&"time";Ct&&(ft===TEXT$1||ft===TOOLTIP?At.formatType=Ct:isNonPositionScaleChannel(ft)?At.legend=Object.assign({formatType:Ct},At.legend):isXorY(ft)&&(At.axis=Object.assign({formatType:Ct},At.axis)))}ut[ft]=At}else nt.push(pt),ut[ft]=et[ft]}else ut[ft]=et[ft]}),{bins:rt,timeUnits:ot,aggregate:st,groupby:nt,encoding:ut}}function markChannelCompatible(et,tt,nt){const rt=supportMark(tt,nt);if(rt){if(rt==="binned"){const ot=et[tt===X2?X:Y];return!!(isFieldDef(ot)&&isFieldDef(et[tt])&&isBinned(ot.bin))}}else return!1;return!0}function initEncoding(et,tt,nt,rt){const ot={};for(const st of keys$1(et))isChannel(st)||warn(invalidEncodingChannel(st));for(let st of UNIT_CHANNELS){if(!et[st])continue;const ut=et[st];if(isXorYOffset(st)){const ct=getMainChannelFromOffsetChannel(st),ft=ot[ct];if(isFieldDef(ft)){if(isContinuous(ft.type)&&isFieldDef(ut)){warn(offsetNestedInsideContinuousPositionScaleDropped(ct));continue}}else st=ct,warn(replaceOffsetWithMainChannel(ct))}if(st==="angle"&&tt==="arc"&&!et.theta&&(warn(REPLACE_ANGLE_WITH_THETA),st=THETA),!markChannelCompatible(et,st,tt)){warn(incompatibleChannel(st,tt));continue}if(st===SIZE$1&&tt==="line"){const ct=getFieldDef(et[st]);if(ct?.aggregate){warn(LINE_WITH_VARYING_SIZE);continue}}if(st===COLOR&&(nt?"fill"in et:"stroke"in et)){warn(droppingColor("encoding",{fill:"fill"in et,stroke:"stroke"in et}));continue}if(st===DETAIL||st===ORDER&&!isArray(ut)&&!isValueDef(ut)||st===TOOLTIP&&isArray(ut))ut&&(ot[st]=array$5(ut).reduce((ct,ft)=>(isFieldDef(ft)?ct.push(initFieldDef(ft,st)):warn(emptyFieldDef(ft,st)),ct),[]));else{if(st===TOOLTIP&&ut===null)ot[st]=null;else if(!isFieldDef(ut)&&!isDatumDef(ut)&&!isValueDef(ut)&&!isConditionalDef(ut)&&!isSignalRef(ut)){warn(emptyFieldDef(ut,st));continue}ot[st]=initChannelDef(ut,st,rt)}}return ot}function normalizeEncoding(et,tt){const nt={};for(const rt of keys$1(et)){const ot=initChannelDef(et[rt],rt,tt,{compositeMark:!0});nt[rt]=ot}return nt}function fieldDefs(et){const tt=[];for(const nt of keys$1(et))if(channelHasField(et,nt)){const rt=et[nt],ot=array$5(rt);for(const st of ot)isFieldDef(st)?tt.push(st):hasConditionalFieldDef(st)&&tt.push(st.condition)}return tt}function forEach(et,tt,nt){if(!!et)for(const rt of keys$1(et)){const ot=et[rt];if(isArray(ot))for(const st of ot)tt.call(nt,st,rt);else tt.call(nt,ot,rt)}}function reduce(et,tt,nt,rt){return et?keys$1(et).reduce((ot,st)=>{const ut=et[st];return isArray(ut)?ut.reduce((ct,ft)=>tt.call(rt,ct,ft,st),ot):tt.call(rt,ot,ut,st)},nt):nt}function pathGroupingFields(et,tt){return keys$1(tt).reduce((nt,rt)=>{switch(rt){case X:case Y:case HREF:case DESCRIPTION:case URL$1:case X2:case Y2:case XOFFSET:case YOFFSET:case THETA:case THETA2:case RADIUS:case RADIUS2:case LATITUDE:case LONGITUDE:case LATITUDE2:case LONGITUDE2:case TEXT$1:case SHAPE:case ANGLE:case TOOLTIP:return nt;case ORDER:if(et==="line"||et==="trail")return nt;case DETAIL:case KEY:{const ot=tt[rt];if(isArray(ot)||isFieldDef(ot))for(const st of array$5(ot))st.aggregate||nt.push(vgField(st,{}));return nt}case SIZE$1:if(et==="trail")return nt;case COLOR:case FILL:case STROKE:case OPACITY:case FILLOPACITY:case STROKEOPACITY:case STROKEDASH:case STROKEWIDTH:{const ot=getFieldDef(tt[rt]);return ot&&!ot.aggregate&&nt.push(vgField(ot,{})),nt}}},[])}var __rest$p=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function filterTooltipWithAggregatedField(et){const{tooltip:tt}=et,nt=__rest$p(et,["tooltip"]);if(!tt)return{filteredEncoding:nt};let rt,ot;if(isArray(tt)){for(const st of tt)st.aggregate?(rt||(rt=[]),rt.push(st)):(ot||(ot=[]),ot.push(st));rt&&(nt.tooltip=rt)}else tt.aggregate?nt.tooltip=tt:ot=tt;return isArray(ot)&&ot.length===1&&(ot=ot[0]),{customTooltipWithoutAggregatedField:ot,filteredEncoding:nt}}function getCompositeMarkTooltip(et,tt,nt,rt=!0){if("tooltip"in nt)return{tooltip:nt.tooltip};const ot=et.map(({fieldPrefix:ut,titlePrefix:ct})=>{const ft=rt?` of ${getTitle(tt)}`:"";return{field:ut+tt.field,type:tt.type,title:isSignalRef(ct)?{signal:`${ct}"${escape(ft)}"`}:ct+ft}}),st=fieldDefs(nt).map(toStringFieldDef);return{tooltip:[...ot,...unique(st,hash)]}}function getTitle(et){const{title:tt,field:nt}=et;return getFirstDefined(tt,nt)}function makeCompositeAggregatePartFactory(et,tt,nt,rt,ot){const{scale:st,axis:ut}=nt;return({partName:ct,mark:ft,positionPrefix:pt,endPositionPrefix:ht=void 0,extraEncoding:mt={}})=>{const yt=getTitle(nt);return partLayerMixins(et,ct,ot,{mark:ft,encoding:Object.assign(Object.assign(Object.assign({[tt]:Object.assign(Object.assign(Object.assign({field:`${pt}_${nt.field}`,type:nt.type},yt!==void 0?{title:yt}:{}),st!==void 0?{scale:st}:{}),ut!==void 0?{axis:ut}:{})},isString(ht)?{[`${tt}2`]:{field:`${ht}_${nt.field}`}}:{}),rt),mt)})}}function partLayerMixins(et,tt,nt,rt){const{clip:ot,color:st,opacity:ut}=et,ct=et.type;return et[tt]||et[tt]===void 0&&nt[tt]?[Object.assign(Object.assign({},rt),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},nt[tt]),ot?{clip:ot}:{}),st?{color:st}:{}),ut?{opacity:ut}:{}),isMarkDef(rt.mark)?rt.mark:{type:rt.mark}),{style:`${ct}-${String(tt)}`}),isBoolean$2(et[tt])?{}:et[tt])})]:[]}function compositeMarkContinuousAxis(et,tt,nt){const{encoding:rt}=et,ot=tt==="vertical"?"y":"x",st=rt[ot],ut=rt[`${ot}2`],ct=rt[`${ot}Error`],ft=rt[`${ot}Error2`];return{continuousAxisChannelDef:filterAggregateFromChannelDef(st,nt),continuousAxisChannelDef2:filterAggregateFromChannelDef(ut,nt),continuousAxisChannelDefError:filterAggregateFromChannelDef(ct,nt),continuousAxisChannelDefError2:filterAggregateFromChannelDef(ft,nt),continuousAxis:ot}}function filterAggregateFromChannelDef(et,tt){if(et?.aggregate){const{aggregate:nt}=et,rt=__rest$p(et,["aggregate"]);return nt!==tt&&warn(errorBarContinuousAxisHasCustomizedAggregate(nt,tt)),rt}else return et}function compositeMarkOrient(et,tt){const{mark:nt,encoding:rt}=et,{x:ot,y:st}=rt;if(isMarkDef(nt)&&nt.orient)return nt.orient;if(isContinuousFieldOrDatumDef(ot)){if(isContinuousFieldOrDatumDef(st)){const ut=isFieldDef(ot)&&ot.aggregate,ct=isFieldDef(st)&&st.aggregate;if(!ut&&ct===tt)return"vertical";if(!ct&&ut===tt)return"horizontal";if(ut===tt&&ct===tt)throw new Error("Both x and y cannot have aggregate");return isFieldOrDatumDefForTimeFormat(st)&&!isFieldOrDatumDefForTimeFormat(ot)?"horizontal":"vertical"}return"horizontal"}else{if(isContinuousFieldOrDatumDef(st))return"vertical";throw new Error(`Need a valid continuous axis for ${tt}s`)}}var __rest$o=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};const BOXPLOT="boxplot",BOXPLOT_PARTS=["box","median","outliers","rule","ticks"],boxPlotNormalizer=new CompositeMarkNormalizer(BOXPLOT,normalizeBoxPlot);function getBoxPlotType(et){return isNumber$1(et)?"tukey":et}function normalizeBoxPlot(et,{config:tt}){var nt,rt;et=Object.assign(Object.assign({},et),{encoding:normalizeEncoding(et.encoding,tt)});const{mark:ot,encoding:st,params:ut,projection:ct}=et,ft=__rest$o(et,["mark","encoding","params","projection"]),pt=isMarkDef(ot)?ot:{type:ot};ut&&warn(selectionNotSupported("boxplot"));const ht=(nt=pt.extent)!==null&&nt!==void 0?nt:tt.boxplot.extent,mt=getMarkPropOrConfig("size",pt,tt),yt=pt.invalid,vt=getBoxPlotType(ht),{bins:Tt,timeUnits:Et,transform:xt,continuousAxisChannelDef:At,continuousAxis:Ct,groupby:$t,aggregate:Ot,encodingWithoutContinuousAxis:Rt,ticksOrient:It,boxOrient:kt,customTooltipWithoutAggregatedField:Mt}=boxParams(et,ht,tt),{color:Ft,size:zt}=Rt,Vt=__rest$o(Rt,["color","size"]),Zt=Ir=>makeCompositeAggregatePartFactory(pt,Ct,At,Ir,tt.boxplot),Ut=Zt(Vt),Xt=Zt(Rt),Jt=Zt(Object.assign(Object.assign({},Vt),zt?{size:zt}:{})),gn=getCompositeMarkTooltip([{fieldPrefix:vt==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:vt==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],At,Rt),An={type:"tick",color:"black",opacity:1,orient:It,invalid:yt,aria:!1},sn=vt==="min-max"?gn:getCompositeMarkTooltip([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],At,Rt),Sn=[...Ut({partName:"rule",mark:{type:"rule",invalid:yt,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:sn}),...Ut({partName:"rule",mark:{type:"rule",invalid:yt,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:sn}),...Ut({partName:"ticks",mark:An,positionPrefix:"lower_whisker",extraEncoding:sn}),...Ut({partName:"ticks",mark:An,positionPrefix:"upper_whisker",extraEncoding:sn})],In=[...vt!=="tukey"?Sn:[],...Xt({partName:"box",mark:Object.assign(Object.assign({type:"bar"},mt?{size:mt}:{}),{orient:kt,invalid:yt,ariaRoleDescription:"box"}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:gn}),...Jt({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:yt},isObject(tt.boxplot.median)&&tt.boxplot.median.color?{color:tt.boxplot.median.color}:{}),mt?{size:mt}:{}),{orient:It,aria:!1}),positionPrefix:"mid_box",extraEncoding:gn})];if(vt==="min-max")return Object.assign(Object.assign({},ft),{transform:((rt=ft.transform)!==null&&rt!==void 0?rt:[]).concat(xt),layer:In});const _n=`datum["lower_box_${At.field}"]`,En=`datum["upper_box_${At.field}"]`,Ln=`(${En} - ${_n})`,wn=`${_n} - ${ht} * ${Ln}`,Dn=`${En} + ${ht} * ${Ln}`,$n=`datum["${At.field}"]`,Gn={joinaggregate:boxParamsQuartiles(At.field),groupby:$t},Jn={transform:[{filter:`(${wn} <= ${$n}) && (${$n} <= ${Dn})`},{aggregate:[{op:"min",field:At.field,as:`lower_whisker_${At.field}`},{op:"max",field:At.field,as:`upper_whisker_${At.field}`},{op:"min",field:`lower_box_${At.field}`,as:`lower_box_${At.field}`},{op:"max",field:`upper_box_${At.field}`,as:`upper_box_${At.field}`},...Ot],groupby:$t}],layer:Sn},zn=__rest$o(Vt,["tooltip"]),{scale:Qn,axis:Bn}=At,jn=getTitle(At),Ar=omit$1(Bn,["title"]),Er=partLayerMixins(pt,"outliers",tt.boxplot,{transform:[{filter:`(${$n} < ${wn}) || (${$n} > ${Dn})`}],mark:"point",encoding:Object.assign(Object.assign(Object.assign({[Ct]:Object.assign(Object.assign(Object.assign({field:At.field,type:At.type},jn!==void 0?{title:jn}:{}),Qn!==void 0?{scale:Qn}:{}),isEmpty$1(Ar)?{}:{axis:Ar})},zn),Ft?{color:Ft}:{}),Mt?{tooltip:Mt}:{})})[0];let Pr;const Nr=[...Tt,...Et,Gn];return Er?Pr={transform:Nr,layer:[Er,Jn]}:(Pr=Jn,Pr.transform.unshift(...Nr)),Object.assign(Object.assign({},ft),{layer:[Pr,{transform:xt,layer:In}]})}function boxParamsQuartiles(et){return[{op:"q1",field:et,as:`lower_box_${et}`},{op:"q3",field:et,as:`upper_box_${et}`}]}function boxParams(et,tt,nt){const rt=compositeMarkOrient(et,BOXPLOT),{continuousAxisChannelDef:ot,continuousAxis:st}=compositeMarkContinuousAxis(et,rt,BOXPLOT),ut=ot.field,ct=getBoxPlotType(tt),ft=[...boxParamsQuartiles(ut),{op:"median",field:ut,as:`mid_box_${ut}`},{op:"min",field:ut,as:(ct==="min-max"?"lower_whisker_":"min_")+ut},{op:"max",field:ut,as:(ct==="min-max"?"upper_whisker_":"max_")+ut}],pt=ct==="min-max"||ct==="tukey"?[]:[{calculate:`datum["upper_box_${ut}"] - datum["lower_box_${ut}"]`,as:`iqr_${ut}`},{calculate:`min(datum["upper_box_${ut}"] + datum["iqr_${ut}"] * ${tt}, datum["max_${ut}"])`,as:`upper_whisker_${ut}`},{calculate:`max(datum["lower_box_${ut}"] - datum["iqr_${ut}"] * ${tt}, datum["min_${ut}"])`,as:`lower_whisker_${ut}`}],ht=et.encoding,mt=st;ht[mt];const yt=__rest$o(ht,[typeof mt=="symbol"?mt:mt+""]),{customTooltipWithoutAggregatedField:vt,filteredEncoding:Tt}=filterTooltipWithAggregatedField(yt),{bins:Et,timeUnits:xt,aggregate:At,groupby:Ct,encoding:$t}=extractTransformsFromEncoding(Tt,nt),Ot=rt==="vertical"?"horizontal":"vertical",Rt=rt,It=[...Et,...xt,{aggregate:[...At,...ft],groupby:Ct},...pt];return{bins:Et,timeUnits:xt,transform:It,groupby:Ct,aggregate:At,continuousAxisChannelDef:ot,continuousAxis:st,encodingWithoutContinuousAxis:$t,ticksOrient:Ot,boxOrient:Rt,customTooltipWithoutAggregatedField:vt}}var __rest$n=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};const ERRORBAR="errorbar",ERRORBAR_PARTS=["ticks","rule"],errorBarNormalizer=new CompositeMarkNormalizer(ERRORBAR,normalizeErrorBar);function normalizeErrorBar(et,{config:tt}){et=Object.assign(Object.assign({},et),{encoding:normalizeEncoding(et.encoding,tt)});const{transform:nt,continuousAxisChannelDef:rt,continuousAxis:ot,encodingWithoutContinuousAxis:st,ticksOrient:ut,markDef:ct,outerSpec:ft,tooltipEncoding:pt}=errorBarParams(et,ERRORBAR,tt);delete st.size;const ht=makeCompositeAggregatePartFactory(ct,ot,rt,st,tt.errorbar),mt=ct.thickness,yt=ct.size,vt=Object.assign(Object.assign({type:"tick",orient:ut,aria:!1},mt!==void 0?{thickness:mt}:{}),yt!==void 0?{size:yt}:{}),Tt=[...ht({partName:"ticks",mark:vt,positionPrefix:"lower",extraEncoding:pt}),...ht({partName:"ticks",mark:vt,positionPrefix:"upper",extraEncoding:pt}),...ht({partName:"rule",mark:Object.assign({type:"rule",ariaRoleDescription:"errorbar"},mt!==void 0?{size:mt}:{}),positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:pt})];return Object.assign(Object.assign(Object.assign({},ft),{transform:nt}),Tt.length>1?{layer:Tt}:Object.assign({},Tt[0]))}function errorBarOrientAndInputType(et,tt){const{encoding:nt}=et;if(errorBarIsInputTypeRaw(nt))return{orient:compositeMarkOrient(et,tt),inputType:"raw"};const rt=errorBarIsInputTypeAggregatedUpperLower(nt),ot=errorBarIsInputTypeAggregatedError(nt),st=nt.x,ut=nt.y;if(rt){if(ot)throw new Error(`${tt} cannot be both type aggregated-upper-lower and aggregated-error`);const ct=nt.x2,ft=nt.y2;if(isFieldOrDatumDef(ct)&&isFieldOrDatumDef(ft))throw new Error(`${tt} cannot have both x2 and y2`);if(isFieldOrDatumDef(ct)){if(isContinuousFieldOrDatumDef(st))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${tt}`)}else if(isFieldOrDatumDef(ft)){if(isContinuousFieldOrDatumDef(ut))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${tt}`)}throw new Error("No ranged axis")}else{const ct=nt.xError,ft=nt.xError2,pt=nt.yError,ht=nt.yError2;if(isFieldOrDatumDef(ft)&&!isFieldOrDatumDef(ct))throw new Error(`${tt} cannot have xError2 without xError`);if(isFieldOrDatumDef(ht)&&!isFieldOrDatumDef(pt))throw new Error(`${tt} cannot have yError2 without yError`);if(isFieldOrDatumDef(ct)&&isFieldOrDatumDef(pt))throw new Error(`${tt} cannot have both xError and yError with both are quantiative`);if(isFieldOrDatumDef(ct)){if(isContinuousFieldOrDatumDef(st))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(isFieldOrDatumDef(pt)){if(isContinuousFieldOrDatumDef(ut))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function errorBarIsInputTypeRaw(et){return(isFieldOrDatumDef(et.x)||isFieldOrDatumDef(et.y))&&!isFieldOrDatumDef(et.x2)&&!isFieldOrDatumDef(et.y2)&&!isFieldOrDatumDef(et.xError)&&!isFieldOrDatumDef(et.xError2)&&!isFieldOrDatumDef(et.yError)&&!isFieldOrDatumDef(et.yError2)}function errorBarIsInputTypeAggregatedUpperLower(et){return isFieldOrDatumDef(et.x2)||isFieldOrDatumDef(et.y2)}function errorBarIsInputTypeAggregatedError(et){return isFieldOrDatumDef(et.xError)||isFieldOrDatumDef(et.xError2)||isFieldOrDatumDef(et.yError)||isFieldOrDatumDef(et.yError2)}function errorBarParams(et,tt,nt){var rt;const{mark:ot,encoding:st,params:ut,projection:ct}=et,ft=__rest$n(et,["mark","encoding","params","projection"]),pt=isMarkDef(ot)?ot:{type:ot};ut&&warn(selectionNotSupported(tt));const{orient:ht,inputType:mt}=errorBarOrientAndInputType(et,tt),{continuousAxisChannelDef:yt,continuousAxisChannelDef2:vt,continuousAxisChannelDefError:Tt,continuousAxisChannelDefError2:Et,continuousAxis:xt}=compositeMarkContinuousAxis(et,ht,tt),{errorBarSpecificAggregate:At,postAggregateCalculates:Ct,tooltipSummary:$t,tooltipTitleWithFieldName:Ot}=errorBarAggregationAndCalculation(pt,yt,vt,Tt,Et,mt,tt,nt),Rt=st,It=xt;Rt[It];const kt=xt==="x"?"x2":"y2";Rt[kt];const Mt=xt==="x"?"xError":"yError";Rt[Mt];const Ft=xt==="x"?"xError2":"yError2";Rt[Ft];const zt=__rest$n(Rt,[typeof It=="symbol"?It:It+"",typeof kt=="symbol"?kt:kt+"",typeof Mt=="symbol"?Mt:Mt+"",typeof Ft=="symbol"?Ft:Ft+""]),{bins:Vt,timeUnits:Zt,aggregate:Ut,groupby:Xt,encoding:Jt}=extractTransformsFromEncoding(zt,nt),gn=[...Ut,...At],An=mt!=="raw"?[]:Xt,sn=getCompositeMarkTooltip($t,yt,Jt,Ot);return{transform:[...(rt=ft.transform)!==null&&rt!==void 0?rt:[],...Vt,...Zt,...gn.length===0?[]:[{aggregate:gn,groupby:An}],...Ct],groupby:An,continuousAxisChannelDef:yt,continuousAxis:xt,encodingWithoutContinuousAxis:Jt,ticksOrient:ht==="vertical"?"horizontal":"vertical",markDef:pt,outerSpec:ft,tooltipEncoding:sn}}function errorBarAggregationAndCalculation(et,tt,nt,rt,ot,st,ut,ct){let ft=[],pt=[];const ht=tt.field;let mt,yt=!1;if(st==="raw"){const vt=et.center?et.center:et.extent?et.extent==="iqr"?"median":"mean":ct.errorbar.center,Tt=et.extent?et.extent:vt==="mean"?"stderr":"iqr";if(vt==="median"!=(Tt==="iqr")&&warn(errorBarCenterIsUsedWithWrongExtent(vt,Tt,ut)),Tt==="stderr"||Tt==="stdev")ft=[{op:Tt,field:ht,as:`extent_${ht}`},{op:vt,field:ht,as:`center_${ht}`}],pt=[{calculate:`datum["center_${ht}"] + datum["extent_${ht}"]`,as:`upper_${ht}`},{calculate:`datum["center_${ht}"] - datum["extent_${ht}"]`,as:`lower_${ht}`}],mt=[{fieldPrefix:"center_",titlePrefix:titleCase(vt)},{fieldPrefix:"upper_",titlePrefix:getTitlePrefix(vt,Tt,"+")},{fieldPrefix:"lower_",titlePrefix:getTitlePrefix(vt,Tt,"-")}],yt=!0;else{let Et,xt,At;Tt==="ci"?(Et="mean",xt="ci0",At="ci1"):(Et="median",xt="q1",At="q3"),ft=[{op:xt,field:ht,as:`lower_${ht}`},{op:At,field:ht,as:`upper_${ht}`},{op:Et,field:ht,as:`center_${ht}`}],mt=[{fieldPrefix:"upper_",titlePrefix:title({field:ht,aggregate:At,type:"quantitative"},ct,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:title({field:ht,aggregate:xt,type:"quantitative"},ct,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:title({field:ht,aggregate:Et,type:"quantitative"},ct,{allowDisabling:!1})}]}}else{(et.center||et.extent)&&warn(errorBarCenterAndExtentAreNotNeeded(et.center,et.extent)),st==="aggregated-upper-lower"?(mt=[],pt=[{calculate:`datum["${nt.field}"]`,as:`upper_${ht}`},{calculate:`datum["${ht}"]`,as:`lower_${ht}`}]):st==="aggregated-error"&&(mt=[{fieldPrefix:"",titlePrefix:ht}],pt=[{calculate:`datum["${ht}"] + datum["${rt.field}"]`,as:`upper_${ht}`}],ot?pt.push({calculate:`datum["${ht}"] + datum["${ot.field}"]`,as:`lower_${ht}`}):pt.push({calculate:`datum["${ht}"] - datum["${rt.field}"]`,as:`lower_${ht}`}));for(const vt of pt)mt.push({fieldPrefix:vt.as.substring(0,6),titlePrefix:replaceAll(replaceAll(vt.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:pt,errorBarSpecificAggregate:ft,tooltipSummary:mt,tooltipTitleWithFieldName:yt}}function getTitlePrefix(et,tt,nt){return`${titleCase(et)} ${nt} ${tt}`}const ERRORBAND="errorband",ERRORBAND_PARTS=["band","borders"],errorBandNormalizer=new CompositeMarkNormalizer(ERRORBAND,normalizeErrorBand);function normalizeErrorBand(et,{config:tt}){et=Object.assign(Object.assign({},et),{encoding:normalizeEncoding(et.encoding,tt)});const{transform:nt,continuousAxisChannelDef:rt,continuousAxis:ot,encodingWithoutContinuousAxis:st,markDef:ut,outerSpec:ct,tooltipEncoding:ft}=errorBarParams(et,ERRORBAND,tt),pt=ut,ht=makeCompositeAggregatePartFactory(pt,ot,rt,st,tt.errorband),mt=et.encoding.x!==void 0&&et.encoding.y!==void 0;let yt={type:mt?"area":"rect"},vt={type:mt?"line":"rule"};const Tt=Object.assign(Object.assign({},pt.interpolate?{interpolate:pt.interpolate}:{}),pt.tension&&pt.interpolate?{tension:pt.tension}:{});return mt?(yt=Object.assign(Object.assign(Object.assign({},yt),Tt),{ariaRoleDescription:"errorband"}),vt=Object.assign(Object.assign(Object.assign({},vt),Tt),{aria:!1})):pt.interpolate?warn(errorBand1DNotSupport("interpolate")):pt.tension&&warn(errorBand1DNotSupport("tension")),Object.assign(Object.assign({},ct),{transform:nt,layer:[...ht({partName:"band",mark:yt,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:ft}),...ht({partName:"borders",mark:vt,positionPrefix:"lower",extraEncoding:ft}),...ht({partName:"borders",mark:vt,positionPrefix:"upper",extraEncoding:ft})]})}const compositeMarkRegistry={};function add(et,tt,nt){const rt=new CompositeMarkNormalizer(et,tt);compositeMarkRegistry[et]={normalizer:rt,parts:nt}}function getAllCompositeMarks(){return keys$1(compositeMarkRegistry)}add(BOXPLOT,normalizeBoxPlot,BOXPLOT_PARTS);add(ERRORBAR,normalizeErrorBar,ERRORBAR_PARTS);add(ERRORBAND,normalizeErrorBand,ERRORBAND_PARTS);const VL_ONLY_LEGEND_CONFIG=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],HEADER_TITLE_PROPERTIES_MAP={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},HEADER_LABEL_PROPERTIES_MAP={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},HEADER_TITLE_PROPERTIES=keys$1(HEADER_TITLE_PROPERTIES_MAP),HEADER_LABEL_PROPERTIES=keys$1(HEADER_LABEL_PROPERTIES_MAP),HEADER_CONFIGS_INDEX={header:1,headerRow:1,headerColumn:1,headerFacet:1},HEADER_CONFIGS=keys$1(HEADER_CONFIGS_INDEX),LEGEND_SCALE_CHANNELS=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],defaultLegendConfig={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},COMMON_LEGEND_PROPERTY_INDEX={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},SELECTION_ID="_vgsid_",defaultConfig$4={point:{on:"click",fields:[SELECTION_ID],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function isLegendBinding(et){return et==="legend"||!!et?.legend}function isLegendStreamBinding(et){return isLegendBinding(et)&&isObject(et)}function isSelectionParameter(et){return!!et?.select}var __rest$m=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function assembleParameterSignals(et){const tt=[];for(const nt of et||[]){if(isSelectionParameter(nt))continue;const{expr:rt,bind:ot}=nt,st=__rest$m(nt,["expr","bind"]);if(ot&&rt){const ut=Object.assign(Object.assign({},st),{bind:ot,init:rt});tt.push(ut)}else{const ut=Object.assign(Object.assign(Object.assign({},st),rt?{update:rt}:{}),ot?{bind:ot}:{});tt.push(ut)}}return tt}function isAnyConcatSpec(et){return isVConcatSpec(et)||isHConcatSpec(et)||isConcatSpec(et)}function isConcatSpec(et){return"concat"in et}function isVConcatSpec(et){return"vconcat"in et}function isHConcatSpec(et){return"hconcat"in et}function getStepFor({step:et,offsetIsDiscrete:tt}){var nt;return tt?(nt=et.for)!==null&&nt!==void 0?nt:"offset":"position"}function isStep(et){return isObject(et)&&et.step!==void 0}function isFrameMixins(et){return et.view||et.width||et.height}const DEFAULT_SPACING=20,COMPOSITION_LAYOUT_INDEX={align:1,bounds:1,center:1,columns:1,spacing:1},COMPOSITION_LAYOUT_PROPERTIES=keys$1(COMPOSITION_LAYOUT_INDEX);function extractCompositionLayout(et,tt,nt){var rt,ot;const st=nt[tt],ut={},{spacing:ct,columns:ft}=st;ct!==void 0&&(ut.spacing=ct),ft!==void 0&&(isFacetSpec(et)&&!isFacetMapping(et.facet)||isConcatSpec(et))&&(ut.columns=ft),isVConcatSpec(et)&&(ut.columns=1);for(const pt of COMPOSITION_LAYOUT_PROPERTIES)if(et[pt]!==void 0)if(pt==="spacing"){const ht=et[pt];ut[pt]=isNumber$1(ht)?ht:{row:(rt=ht.row)!==null&&rt!==void 0?rt:ct,column:(ot=ht.column)!==null&&ot!==void 0?ot:ct}}else ut[pt]=et[pt];return ut}var __rest$l=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function getViewConfigContinuousSize(et,tt){var nt;return(nt=et[tt])!==null&&nt!==void 0?nt:et[tt==="width"?"continuousWidth":"continuousHeight"]}function getViewConfigDiscreteStep(et,tt){const nt=getViewConfigDiscreteSize(et,tt);return isStep(nt)?nt.step:DEFAULT_STEP}function getViewConfigDiscreteSize(et,tt){var nt;const rt=(nt=et[tt])!==null&&nt!==void 0?nt:et[tt==="width"?"discreteWidth":"discreteHeight"];return getFirstDefined(rt,{step:et.step})}const DEFAULT_STEP=20,defaultViewConfig={continuousWidth:200,continuousHeight:200,step:DEFAULT_STEP},defaultConfig$3={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:defaultViewConfig,mark:defaultMarkConfig,arc:{},area:{},bar:defaultBarConfig,circle:{},geoshape:{},image:{},line:{},point:{},rect:defaultRectConfig,rule:{color:"black"},square:{},text:{color:"black"},tick:defaultTickConfig,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:defaultScaleConfig,projection:{},legend:defaultLegendConfig,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:defaultConfig$4,style:{},title:{},facet:{spacing:DEFAULT_SPACING},concat:{spacing:DEFAULT_SPACING},normalizedNumberFormat:".0%"},tab10=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],DEFAULT_FONT_SIZE={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},DEFAULT_COLOR={blue:tab10[0],orange:tab10[1],red:tab10[2],teal:tab10[3],green:tab10[4],yellow:tab10[5],purple:tab10[6],pink:tab10[7],brown:tab10[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function colorSignalConfig(et={}){return{signals:[{name:"color",value:isObject(et)?Object.assign(Object.assign({},DEFAULT_COLOR),et):DEFAULT_COLOR}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function fontSizeSignalConfig(et){return{signals:[{name:"fontSize",value:isObject(et)?Object.assign(Object.assign({},DEFAULT_FONT_SIZE),et):DEFAULT_FONT_SIZE}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function fontConfig(et){return{text:{font:et},style:{"guide-label":{font:et},"guide-title":{font:et},"group-title":{font:et},"group-subtitle":{font:et}}}}function getAxisConfigInternal(et){const tt=keys$1(et||{}),nt={};for(const rt of tt){const ot=et[rt];nt[rt]=isConditionalAxisValue(ot)?signalOrValueRefWithCondition(ot):signalRefOrValue(ot)}return nt}function getStyleConfigInternal(et){const tt=keys$1(et),nt={};for(const rt of tt)nt[rt]=getAxisConfigInternal(et[rt]);return nt}const configPropsWithExpr=[...MARK_CONFIGS,...AXIS_CONFIGS,...HEADER_CONFIGS,"background","padding","legend","lineBreak","scale","style","title","view"];function initConfig(et={}){const{color:tt,font:nt,fontSize:rt,selection:ot}=et,st=__rest$l(et,["color","font","fontSize","selection"]),ut=mergeConfig({},duplicate(defaultConfig$3),nt?fontConfig(nt):{},tt?colorSignalConfig(tt):{},rt?fontSizeSignalConfig(rt):{},st||{});ot&&writeConfig(ut,"selection",ot,!0);const ct=omit$1(ut,configPropsWithExpr);for(const ft of["background","lineBreak","padding"])ut[ft]&&(ct[ft]=signalRefOrValue(ut[ft]));for(const ft of MARK_CONFIGS)ut[ft]&&(ct[ft]=replaceExprRef(ut[ft]));for(const ft of AXIS_CONFIGS)ut[ft]&&(ct[ft]=getAxisConfigInternal(ut[ft]));for(const ft of HEADER_CONFIGS)ut[ft]&&(ct[ft]=replaceExprRef(ut[ft]));return ut.legend&&(ct.legend=replaceExprRef(ut.legend)),ut.scale&&(ct.scale=replaceExprRef(ut.scale)),ut.style&&(ct.style=getStyleConfigInternal(ut.style)),ut.title&&(ct.title=replaceExprRef(ut.title)),ut.view&&(ct.view=replaceExprRef(ut.view)),ct}const MARK_STYLES=new Set(["view",...PRIMITIVE_MARKS]),VL_ONLY_CONFIG_PROPERTIES=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],VL_ONLY_ALL_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX=Object.assign({view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"]},VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX);function stripAndRedirectConfig(et){et=duplicate(et);for(const tt of VL_ONLY_CONFIG_PROPERTIES)delete et[tt];if(et.axis)for(const tt in et.axis)isConditionalAxisValue(et.axis[tt])&&delete et.axis[tt];if(et.legend)for(const tt of VL_ONLY_LEGEND_CONFIG)delete et.legend[tt];if(et.mark){for(const tt of VL_ONLY_MARK_CONFIG_PROPERTIES)delete et.mark[tt];et.mark.tooltip&&isObject(et.mark.tooltip)&&delete et.mark.tooltip}et.params&&(et.signals=(et.signals||[]).concat(assembleParameterSignals(et.params)),delete et.params);for(const tt of MARK_STYLES){for(const rt of VL_ONLY_MARK_CONFIG_PROPERTIES)delete et[tt][rt];const nt=VL_ONLY_ALL_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX[tt];if(nt)for(const rt of nt)delete et[tt][rt];redirectConfigToStyleConfig(et,tt)}for(const tt of getAllCompositeMarks())delete et[tt];redirectTitleConfig(et);for(const tt in et)isObject(et[tt])&&isEmpty$1(et[tt])&&delete et[tt];return isEmpty$1(et)?void 0:et}function redirectTitleConfig(et){const{titleMarkConfig:tt,subtitleMarkConfig:nt,subtitle:rt}=extractTitleConfig(et.title);isEmpty$1(tt)||(et.style["group-title"]=Object.assign(Object.assign({},et.style["group-title"]),tt)),isEmpty$1(nt)||(et.style["group-subtitle"]=Object.assign(Object.assign({},et.style["group-subtitle"]),nt)),isEmpty$1(rt)?delete et.title:et.title=rt}function redirectConfigToStyleConfig(et,tt,nt,rt){const ot=rt?et[tt][rt]:et[tt];tt==="view"&&(nt="cell");const st=Object.assign(Object.assign({},ot),et.style[nt??tt]);isEmpty$1(st)||(et.style[nt??tt]=st),rt||delete et[tt]}function isLayerSpec(et){return"layer"in et}function isRepeatSpec(et){return"repeat"in et}function isLayerRepeatSpec(et){return!isArray(et.repeat)&&et.repeat.layer}var __rest$k=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class SpecMapper{map(tt,nt){return isFacetSpec(tt)?this.mapFacet(tt,nt):isRepeatSpec(tt)?this.mapRepeat(tt,nt):isHConcatSpec(tt)?this.mapHConcat(tt,nt):isVConcatSpec(tt)?this.mapVConcat(tt,nt):isConcatSpec(tt)?this.mapConcat(tt,nt):this.mapLayerOrUnit(tt,nt)}mapLayerOrUnit(tt,nt){if(isLayerSpec(tt))return this.mapLayer(tt,nt);if(isUnitSpec(tt))return this.mapUnit(tt,nt);throw new Error(invalidSpec(tt))}mapLayer(tt,nt){return Object.assign(Object.assign({},tt),{layer:tt.layer.map(rt=>this.mapLayerOrUnit(rt,nt))})}mapHConcat(tt,nt){return Object.assign(Object.assign({},tt),{hconcat:tt.hconcat.map(rt=>this.map(rt,nt))})}mapVConcat(tt,nt){return Object.assign(Object.assign({},tt),{vconcat:tt.vconcat.map(rt=>this.map(rt,nt))})}mapConcat(tt,nt){const{concat:rt}=tt,ot=__rest$k(tt,["concat"]);return Object.assign(Object.assign({},ot),{concat:rt.map(st=>this.map(st,nt))})}mapFacet(tt,nt){return Object.assign(Object.assign({},tt),{spec:this.map(tt.spec,nt)})}mapRepeat(tt,nt){return Object.assign(Object.assign({},tt),{spec:this.map(tt.spec,nt)})}}const STACK_OFFSET_INDEX={zero:1,center:1,normalize:1};function isStackOffset(et){return et in STACK_OFFSET_INDEX}const STACKABLE_MARKS=new Set([ARC,BAR,AREA,RULE,POINT,CIRCLE,SQUARE,LINE,TEXT,TICK]),STACK_BY_DEFAULT_MARKS=new Set([BAR,AREA,ARC]);function isUnbinnedQuantitative(et){return isFieldDef(et)&&channelDefType(et)==="quantitative"&&!et.bin}function potentialStackedChannel(et,tt){var nt,rt;const ot=tt==="x"?"y":"radius",st=et[tt],ut=et[ot];if(isFieldDef(st)&&isFieldDef(ut))if(isUnbinnedQuantitative(st)&&isUnbinnedQuantitative(ut)){if(st.stack)return tt;if(ut.stack)return ot;const ct=isFieldDef(st)&&!!st.aggregate,ft=isFieldDef(ut)&&!!ut.aggregate;if(ct!==ft)return ct?tt:ot;{const pt=(nt=st.scale)===null||nt===void 0?void 0:nt.type,ht=(rt=ut.scale)===null||rt===void 0?void 0:rt.type;if(pt&&pt!=="linear")return ot;if(ht&&ht!=="linear")return tt}}else{if(isUnbinnedQuantitative(st))return tt;if(isUnbinnedQuantitative(ut))return ot}else{if(isUnbinnedQuantitative(st))return tt;if(isUnbinnedQuantitative(ut))return ot}}function getDimensionChannel(et){switch(et){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function stack(et,tt){var nt,rt;const ot=isMarkDef(et)?et.type:et;if(!STACKABLE_MARKS.has(ot))return null;const st=potentialStackedChannel(tt,"x")||potentialStackedChannel(tt,"theta");if(!st)return null;const ut=tt[st],ct=isFieldDef(ut)?vgField(ut,{}):void 0,ft=getDimensionChannel(st),pt=[],ht=new Set;if(tt[ft]){const vt=tt[ft],Tt=isFieldDef(vt)?vgField(vt,{}):void 0;Tt&&Tt!==ct&&(pt.push(ft),ht.add(Tt));const Et=ft==="x"?"xOffset":"yOffset",xt=tt[Et],At=isFieldDef(xt)?vgField(xt,{}):void 0;At&&At!==ct&&(pt.push(Et),ht.add(At))}const mt=NONPOSITION_CHANNELS.reduce((vt,Tt)=>{if(Tt!=="tooltip"&&channelHasField(tt,Tt)){const Et=tt[Tt];for(const xt of array$5(Et)){const At=getFieldDef(xt);if(At.aggregate)continue;const Ct=vgField(At,{});(!Ct||!ht.has(Ct))&&vt.push({channel:Tt,fieldDef:At})}}return vt},[]);let yt;return ut.stack!==void 0?isBoolean$2(ut.stack)?yt=ut.stack?"zero":null:yt=ut.stack:STACK_BY_DEFAULT_MARKS.has(ot)&&(yt="zero"),!yt||!isStackOffset(yt)||isAggregate$1(tt)&&mt.length===0?null:((nt=ut?.scale)===null||nt===void 0?void 0:nt.type)&&((rt=ut?.scale)===null||rt===void 0?void 0:rt.type)!==ScaleType.LINEAR?(warn(cannotStackNonLinearScale(ut.scale.type)),null):isFieldOrDatumDef(tt[getSecondaryRangeChannel(st)])?(ut.stack!==void 0&&warn(cannotStackRangedMark(st)),null):(isFieldDef(ut)&&ut.aggregate&&!SUM_OPS.has(ut.aggregate)&&warn(stackNonSummativeAggregate(ut.aggregate)),{groupbyChannels:pt,groupbyFields:ht,fieldChannel:st,impute:ut.impute===null?!1:isPathMark(ot),stackBy:mt,offset:yt})}var __rest$j=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function dropLineAndPoint(et){const tt=__rest$j(et,["point","line"]);return keys$1(tt).length>1?tt:tt.type}function dropLineAndPointFromConfig(et){for(const tt of["line","area","rule","trail"])et[tt]&&(et=Object.assign(Object.assign({},et),{[tt]:omit$1(et[tt],["point","line"])}));return et}function getPointOverlay(et,tt={},nt){return et.point==="transparent"?{opacity:0}:et.point?isObject(et.point)?et.point:{}:et.point!==void 0?null:tt.point||nt.shape?isObject(tt.point)?tt.point:{}:void 0}function getLineOverlay(et,tt={}){return et.line?et.line===!0?{}:et.line:et.line!==void 0?null:tt.line?tt.line===!0?{}:tt.line:void 0}class PathOverlayNormalizer{constructor(){this.name="path-overlay"}hasMatchingType(tt,nt){if(isUnitSpec(tt)){const{mark:rt,encoding:ot}=tt,st=isMarkDef(rt)?rt:{type:rt};switch(st.type){case"line":case"rule":case"trail":return!!getPointOverlay(st,nt[st.type],ot);case"area":return!!getPointOverlay(st,nt[st.type],ot)||!!getLineOverlay(st,nt[st.type])}}return!1}run(tt,nt,rt){const{config:ot}=nt,{params:st,projection:ut,mark:ct,encoding:ft}=tt,pt=__rest$j(tt,["params","projection","mark","encoding"]),ht=normalizeEncoding(ft,ot),mt=isMarkDef(ct)?ct:{type:ct},yt=getPointOverlay(mt,ot[mt.type],ht),vt=mt.type==="area"&&getLineOverlay(mt,ot[mt.type]),Tt=[Object.assign(Object.assign({},st?{params:st}:{}),{mark:dropLineAndPoint(Object.assign(Object.assign({},mt.type==="area"&&mt.opacity===void 0&&mt.fillOpacity===void 0?{opacity:.7}:{}),mt)),encoding:omit$1(ht,["shape"])})],Et=stack(mt,ht);let xt=ht;if(Et){const{fieldChannel:At,offset:Ct}=Et;xt=Object.assign(Object.assign({},ht),{[At]:Object.assign(Object.assign({},ht[At]),Ct?{stack:Ct}:{})})}return xt=omit$1(xt,["y2","x2"]),vt&&Tt.push(Object.assign(Object.assign({},ut?{projection:ut}:{}),{mark:Object.assign(Object.assign({type:"line"},pick$1(mt,["clip","interpolate","tension","tooltip"])),vt),encoding:xt})),yt&&Tt.push(Object.assign(Object.assign({},ut?{projection:ut}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},pick$1(mt,["clip","tooltip"])),yt),encoding:xt})),rt(Object.assign(Object.assign({},pt),{layer:Tt}),Object.assign(Object.assign({},nt),{config:dropLineAndPointFromConfig(ot)}))}}var __rest$i=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function replaceRepeaterInFacet(et,tt){return tt?isFacetMapping(et)?replaceRepeaterInMapping(et,tt):replaceRepeaterInFieldDef(et,tt):et}function replaceRepeaterInEncoding(et,tt){return tt?replaceRepeaterInMapping(et,tt):et}function replaceRepeatInProp(et,tt,nt){const rt=tt[et];if(isRepeatRef(rt)){if(rt.repeat in nt)return Object.assign(Object.assign({},tt),{[et]:nt[rt.repeat]});warn(noSuchRepeatedValue(rt.repeat));return}return tt}function replaceRepeaterInFieldDef(et,tt){if(et=replaceRepeatInProp("field",et,tt),et!==void 0){if(et===null)return null;if(isSortableFieldDef(et)&&isSortField(et.sort)){const nt=replaceRepeatInProp("field",et.sort,tt);et=Object.assign(Object.assign({},et),nt?{sort:nt}:{})}return et}}function replaceRepeaterInFieldOrDatumDef(et,tt){if(isFieldDef(et))return replaceRepeaterInFieldDef(et,tt);{const nt=replaceRepeatInProp("datum",et,tt);return nt!==et&&!nt.type&&(nt.type="nominal"),nt}}function replaceRepeaterInChannelDef(et,tt){if(isFieldOrDatumDef(et)){const nt=replaceRepeaterInFieldOrDatumDef(et,tt);if(nt)return nt;if(isConditionalDef(et))return{condition:et.condition}}else{if(hasConditionalFieldOrDatumDef(et)){const nt=replaceRepeaterInFieldOrDatumDef(et.condition,tt);return nt?Object.assign(Object.assign({},et),{condition:nt}):__rest$i(et,["condition"])}return et}}function replaceRepeaterInMapping(et,tt){const nt={};for(const rt in et)if(has$1(et,rt)){const ot=et[rt];if(isArray(ot))nt[rt]=ot.map(st=>replaceRepeaterInChannelDef(st,tt)).filter(st=>st);else{const st=replaceRepeaterInChannelDef(ot,tt);st!==void 0&&(nt[rt]=st)}}return nt}class RuleForRangedLineNormalizer{constructor(){this.name="RuleForRangedLine"}hasMatchingType(tt){if(isUnitSpec(tt)){const{encoding:nt,mark:rt}=tt;if(rt==="line"||isMarkDef(rt)&&rt.type==="line")for(const ot of SECONDARY_RANGE_CHANNEL){const st=getMainRangeChannel(ot),ut=nt[st];if(nt[ot]&&(isFieldDef(ut)&&!isBinned(ut.bin)||isDatumDef(ut)))return!0}}return!1}run(tt,nt,rt){const{encoding:ot,mark:st}=tt;return warn(lineWithRange(!!ot.x2,!!ot.y2)),rt(Object.assign(Object.assign({},tt),{mark:isObject(st)?Object.assign(Object.assign({},st),{type:"rule"}):"rule"}),nt)}}var __rest$h=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class CoreNormalizer extends SpecMapper{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[boxPlotNormalizer,errorBarNormalizer,errorBandNormalizer,new PathOverlayNormalizer,new RuleForRangedLineNormalizer]}map(tt,nt){if(isUnitSpec(tt)){const rt=channelHasField(tt.encoding,ROW),ot=channelHasField(tt.encoding,COLUMN),st=channelHasField(tt.encoding,FACET);if(rt||ot||st)return this.mapFacetedUnit(tt,nt)}return super.map(tt,nt)}mapUnit(tt,nt){const{parentEncoding:rt,parentProjection:ot}=nt,st=replaceRepeaterInEncoding(tt.encoding,nt.repeater),ut=Object.assign(Object.assign({},tt),st?{encoding:st}:{});if(rt||ot)return this.mapUnitWithParentEncodingOrProjection(ut,nt);const ct=this.mapLayerOrUnit.bind(this);for(const ft of this.nonFacetUnitNormalizers)if(ft.hasMatchingType(ut,nt.config))return ft.run(ut,nt,ct);return ut}mapRepeat(tt,nt){return isLayerRepeatSpec(tt)?this.mapLayerRepeat(tt,nt):this.mapNonLayerRepeat(tt,nt)}mapLayerRepeat(tt,nt){const{repeat:rt,spec:ot}=tt,st=__rest$h(tt,["repeat","spec"]),{row:ut,column:ct,layer:ft}=rt,{repeater:pt={},repeaterPrefix:ht=""}=nt;return ut||ct?this.mapRepeat(Object.assign(Object.assign({},tt),{repeat:Object.assign(Object.assign({},ut?{row:ut}:{}),ct?{column:ct}:{}),spec:{repeat:{layer:ft},spec:ot}}),nt):Object.assign(Object.assign({},st),{layer:ft.map(mt=>{const yt=Object.assign(Object.assign({},pt),{layer:mt}),vt=`${(ot.name||"")+ht}child__layer_${varName(mt)}`,Tt=this.mapLayerOrUnit(ot,Object.assign(Object.assign({},nt),{repeater:yt,repeaterPrefix:vt}));return Tt.name=vt,Tt})})}mapNonLayerRepeat(tt,nt){var rt;const{repeat:ot,spec:st,data:ut}=tt,ct=__rest$h(tt,["repeat","spec","data"]);!isArray(ot)&&tt.columns&&(tt=omit$1(tt,["columns"]),warn(columnsNotSupportByRowCol("repeat")));const ft=[],{repeater:pt={},repeaterPrefix:ht=""}=nt,mt=!isArray(ot)&&ot.row||[pt?pt.row:null],yt=!isArray(ot)&&ot.column||[pt?pt.column:null],vt=isArray(ot)&&ot||[pt?pt.repeat:null];for(const Et of vt)for(const xt of mt)for(const At of yt){const Ct={repeat:Et,row:xt,column:At,layer:pt.layer},$t=(st.name||"")+ht+"child__"+(isArray(ot)?`${varName(Et)}`:(ot.row?`row_${varName(xt)}`:"")+(ot.column?`column_${varName(At)}`:"")),Ot=this.map(st,Object.assign(Object.assign({},nt),{repeater:Ct,repeaterPrefix:$t}));Ot.name=$t,ft.push(omit$1(Ot,["data"]))}const Tt=isArray(ot)?tt.columns:ot.column?ot.column.length:1;return Object.assign(Object.assign({data:(rt=st.data)!==null&&rt!==void 0?rt:ut,align:"all"},ct),{columns:Tt,concat:ft})}mapFacet(tt,nt){const{facet:rt}=tt;return isFacetMapping(rt)&&tt.columns&&(tt=omit$1(tt,["columns"]),warn(columnsNotSupportByRowCol("facet"))),super.mapFacet(tt,nt)}mapUnitWithParentEncodingOrProjection(tt,nt){const{encoding:rt,projection:ot}=tt,{parentEncoding:st,parentProjection:ut,config:ct}=nt,ft=mergeProjection({parentProjection:ut,projection:ot}),pt=mergeEncoding({parentEncoding:st,encoding:replaceRepeaterInEncoding(rt,nt.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},tt),ft?{projection:ft}:{}),pt?{encoding:pt}:{}),{config:ct})}mapFacetedUnit(tt,nt){const rt=tt.encoding,{row:ot,column:st,facet:ut}=rt,ct=__rest$h(rt,["row","column","facet"]),{mark:ft,width:pt,projection:ht,height:mt,view:yt,params:vt,encoding:Tt}=tt,Et=__rest$h(tt,["mark","width","projection","height","view","params","encoding"]),{facetMapping:xt,layout:At}=this.getFacetMappingAndLayout({row:ot,column:st,facet:ut},nt),Ct=replaceRepeaterInEncoding(ct,nt.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},Et),At),{facet:xt,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pt?{width:pt}:{}),mt?{height:mt}:{}),yt?{view:yt}:{}),ht?{projection:ht}:{}),{mark:ft,encoding:Ct}),vt?{params:vt}:{})}),nt)}getFacetMappingAndLayout(tt,nt){var rt;const{row:ot,column:st,facet:ut}=tt;if(ot||st){ut&&warn(facetChannelDropped([...ot?[ROW]:[],...st?[COLUMN]:[]]));const ct={},ft={};for(const pt of[ROW,COLUMN]){const ht=tt[pt];if(ht){const mt=__rest$h(ht,["align","center","spacing","columns"]);ct[pt]=mt;for(const yt of["align","center","spacing"])ht[yt]!==void 0&&((rt=ft[yt])!==null&&rt!==void 0||(ft[yt]={}),ft[yt][pt]=ht[yt])}}return{facetMapping:ct,layout:ft}}else{const{align:ct,center:ft,spacing:pt,columns:ht}=ut,mt=__rest$h(ut,["align","center","spacing","columns"]);return{facetMapping:replaceRepeaterInFacet(mt,nt.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},ct?{align:ct}:{}),ft?{center:ft}:{}),pt?{spacing:pt}:{}),ht?{columns:ht}:{})}}}mapLayer(tt,nt){var{parentEncoding:rt,parentProjection:ot}=nt,st=__rest$h(nt,["parentEncoding","parentProjection"]);const{encoding:ut,projection:ct}=tt,ft=__rest$h(tt,["encoding","projection"]),pt=Object.assign(Object.assign({},st),{parentEncoding:mergeEncoding({parentEncoding:rt,encoding:ut,layer:!0}),parentProjection:mergeProjection({parentProjection:ot,projection:ct})});return super.mapLayer(ft,pt)}}function mergeEncoding({parentEncoding:et,encoding:tt={},layer:nt}){let rt={};if(et){const ot=new Set([...keys$1(et),...keys$1(tt)]);for(const st of ot){const ut=tt[st],ct=et[st];if(isFieldOrDatumDef(ut)){const ft=Object.assign(Object.assign({},ct),ut);rt[st]=ft}else hasConditionalFieldOrDatumDef(ut)?rt[st]=Object.assign(Object.assign({},ut),{condition:Object.assign(Object.assign({},ct),ut.condition)}):ut||ut===null?rt[st]=ut:(nt||isValueDef(ct)||isSignalRef(ct)||isFieldOrDatumDef(ct)||isArray(ct))&&(rt[st]=ct)}}else rt=tt;return!rt||isEmpty$1(rt)?void 0:rt}function mergeProjection(et){const{parentProjection:tt,projection:nt}=et;return tt&&nt&&warn(projectionOverridden({parentProjection:tt,projection:nt})),nt??tt}function isFilter(et){return"filter"in et}function isImputeSequence(et){return et?.stop!==void 0}function isLookup(et){return"lookup"in et}function isLookupData(et){return"data"in et}function isLookupSelection(et){return"param"in et}function isPivot(et){return"pivot"in et}function isDensity(et){return"density"in et}function isQuantile(et){return"quantile"in et}function isRegression(et){return"regression"in et}function isLoess(et){return"loess"in et}function isSample(et){return"sample"in et}function isWindow(et){return"window"in et}function isJoinAggregate(et){return"joinaggregate"in et}function isFlatten(et){return"flatten"in et}function isCalculate(et){return"calculate"in et}function isBin(et){return"bin"in et}function isImpute(et){return"impute"in et}function isTimeUnit(et){return"timeUnit"in et}function isAggregate(et){return"aggregate"in et}function isStack(et){return"stack"in et}function isFold(et){return"fold"in et}function normalizeTransform(et){return et.map(tt=>isFilter(tt)?{filter:normalizeLogicalComposition(tt.filter,normalizePredicate$1)}:tt)}var __rest$g=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class SelectionCompatibilityNormalizer extends SpecMapper{map(tt,nt){var rt,ot;return(rt=nt.emptySelections)!==null&&rt!==void 0||(nt.emptySelections={}),(ot=nt.selectionPredicates)!==null&&ot!==void 0||(nt.selectionPredicates={}),tt=normalizeTransforms(tt,nt),super.map(tt,nt)}mapLayerOrUnit(tt,nt){if(tt=normalizeTransforms(tt,nt),tt.encoding){const rt={};for(const[ot,st]of entries$1(tt.encoding))rt[ot]=normalizeChannelDef(st,nt);tt=Object.assign(Object.assign({},tt),{encoding:rt})}return super.mapLayerOrUnit(tt,nt)}mapUnit(tt,nt){const rt=tt,{selection:ot}=rt,st=__rest$g(rt,["selection"]);return ot?Object.assign(Object.assign({},st),{params:entries$1(ot).map(([ut,ct])=>{var ft;const pt=ct,{init:ht,bind:mt,empty:yt}=pt,vt=__rest$g(pt,["init","bind","empty"]);vt.type==="single"?(vt.type="point",vt.toggle=!1):vt.type==="multi"&&(vt.type="point"),nt.emptySelections[ut]=yt!=="none";for(const Tt of vals((ft=nt.selectionPredicates[ut])!==null&&ft!==void 0?ft:{}))Tt.empty=yt!=="none";return{name:ut,value:ht,select:vt,bind:mt}})}):tt}}function normalizeTransforms(et,tt){const{transform:nt}=et,rt=__rest$g(et,["transform"]);if(nt){const ot=nt.map(st=>{if(isFilter(st))return{filter:normalizePredicate(st,tt)};if(isBin(st)&&isBinParams(st.bin))return Object.assign(Object.assign({},st),{bin:normalizeBinExtent(st.bin)});if(isLookup(st)){const ut=st.from,{selection:ct}=ut,ft=__rest$g(ut,["selection"]);return ct?Object.assign(Object.assign({},st),{from:Object.assign({param:ct},ft)}):st}return st});return Object.assign(Object.assign({},rt),{transform:ot})}return et}function normalizeChannelDef(et,tt){var nt,rt;const ot=duplicate(et);if(isFieldDef(ot)&&isBinParams(ot.bin)&&(ot.bin=normalizeBinExtent(ot.bin)),isScaleFieldDef(ot)&&((rt=(nt=ot.scale)===null||nt===void 0?void 0:nt.domain)===null||rt===void 0?void 0:rt.selection)){const st=ot.scale.domain,{selection:ut}=st,ct=__rest$g(st,["selection"]);ot.scale.domain=Object.assign(Object.assign({},ct),ut?{param:ut}:{})}if(isConditionalDef(ot))if(isArray(ot.condition))ot.condition=ot.condition.map(st=>{const{selection:ut,param:ct,test:ft}=st,pt=__rest$g(st,["selection","param","test"]);return ct?st:Object.assign(Object.assign({},pt),{test:normalizePredicate(st,tt)})});else{const st=normalizeChannelDef(ot.condition,tt),{selection:ut,param:ct,test:ft}=st,pt=__rest$g(st,["selection","param","test"]);ot.condition=ct?ot.condition:Object.assign(Object.assign({},pt),{test:normalizePredicate(ot.condition,tt)})}return ot}function normalizeBinExtent(et){const tt=et.extent;if(tt?.selection){const{selection:nt}=tt,rt=__rest$g(tt,["selection"]);return Object.assign(Object.assign({},et),{extent:Object.assign(Object.assign({},rt),{param:nt})})}return et}function normalizePredicate(et,tt){const nt=rt=>normalizeLogicalComposition(rt,ot=>{var st,ut,ct;const ft=(st=tt.emptySelections[ot])!==null&&st!==void 0?st:!0,pt={param:ot,empty:ft};return(ut=(ct=tt.selectionPredicates)[ot])!==null&&ut!==void 0||(ct[ot]=[]),tt.selectionPredicates[ot].push(pt),pt});return et.selection?nt(et.selection):normalizeLogicalComposition(et.test||et.filter,rt=>rt.selection?nt(rt.selection):rt)}class TopLevelSelectionsNormalizer extends SpecMapper{map(tt,nt){var rt;const ot=(rt=nt.selections)!==null&&rt!==void 0?rt:[];if(tt.params&&!isUnitSpec(tt)){const st=[];for(const ut of tt.params)isSelectionParameter(ut)?ot.push(ut):st.push(ut);tt.params=st}return nt.selections=ot,super.map(tt,addSpecNameToParams(tt,nt))}mapUnit(tt,nt){var rt;const ot=nt.selections;if(!ot||!ot.length)return tt;const st=((rt=nt.path)!==null&&rt!==void 0?rt:[]).concat(tt.name),ut=[];for(const ct of ot)if(!ct.views||!ct.views.length)ut.push(ct);else for(const ft of ct.views)(isString(ft)&&(ft===tt.name||st.indexOf(ft)>=0)||isArray(ft)&&ft.map(pt=>st.indexOf(pt)).every((pt,ht,mt)=>pt!==-1&&(ht===0||pt>mt[ht-1])))&&ut.push(ct);return ut.length&&(tt.params=ut),tt}}for(const et of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const tt=TopLevelSelectionsNormalizer.prototype[et];TopLevelSelectionsNormalizer.prototype[et]=function(nt,rt){return tt.call(this,nt,addSpecNameToParams(nt,rt))}}function addSpecNameToParams(et,tt){var nt;return et.name?Object.assign(Object.assign({},tt),{path:((nt=tt.path)!==null&&nt!==void 0?nt:[]).concat(et.name)}):tt}function normalize(et,tt){tt===void 0&&(tt=initConfig(et.config));const nt=normalizeGenericSpec(et,tt),{width:rt,height:ot}=et,st=normalizeAutoSize(nt,{width:rt,height:ot,autosize:et.autosize},tt);return Object.assign(Object.assign({},nt),st?{autosize:st}:{})}const coreNormalizer=new CoreNormalizer,selectionCompatNormalizer=new SelectionCompatibilityNormalizer,topLevelSelectionNormalizer=new TopLevelSelectionsNormalizer;function normalizeGenericSpec(et,tt={}){const nt={config:tt};return topLevelSelectionNormalizer.map(coreNormalizer.map(selectionCompatNormalizer.map(et,nt),nt),nt)}function _normalizeAutoSize(et){return isString(et)?{type:et}:et??{}}function normalizeAutoSize(et,tt,nt){let{width:rt,height:ot}=tt;const st=isUnitSpec(et)||isLayerSpec(et),ut={};st?rt=="container"&&ot=="container"?(ut.type="fit",ut.contains="padding"):rt=="container"?(ut.type="fit-x",ut.contains="padding"):ot=="container"&&(ut.type="fit-y",ut.contains="padding"):(rt=="container"&&(warn(containerSizeNonSingle("width")),rt=void 0),ot=="container"&&(warn(containerSizeNonSingle("height")),ot=void 0));const ct=Object.assign(Object.assign(Object.assign({type:"pad"},ut),nt?_normalizeAutoSize(nt.autosize):{}),_normalizeAutoSize(et.autosize));if(ct.type==="fit"&&!st&&(warn(FIT_NON_SINGLE),ct.type="pad"),rt=="container"&&!(ct.type=="fit"||ct.type=="fit-x")&&warn(containerSizeNotCompatibleWithAutosize("width")),ot=="container"&&!(ct.type=="fit"||ct.type=="fit-y")&&warn(containerSizeNotCompatibleWithAutosize("height")),!deepEqual(ct,{type:"pad"}))return ct}function isFitType(et){return et==="fit"||et==="fit-x"||et==="fit-y"}function getFitType(et){return et?`fit-${getPositionScaleChannel(et)}`:"fit"}const TOP_LEVEL_PROPERTIES=["background","padding"];function extractTopLevelProperties(et,tt){const nt={};for(const rt of TOP_LEVEL_PROPERTIES)et&&et[rt]!==void 0&&(nt[rt]=signalRefOrValue(et[rt]));return tt&&(nt.params=et.params),nt}class Split{constructor(tt={},nt={}){this.explicit=tt,this.implicit=nt}clone(){return new Split(duplicate(this.explicit),duplicate(this.implicit))}combine(){return Object.assign(Object.assign({},this.explicit),this.implicit)}get(tt){return getFirstDefined(this.explicit[tt],this.implicit[tt])}getWithExplicit(tt){return this.explicit[tt]!==void 0?{explicit:!0,value:this.explicit[tt]}:this.implicit[tt]!==void 0?{explicit:!1,value:this.implicit[tt]}:{explicit:!1,value:void 0}}setWithExplicit(tt,{value:nt,explicit:rt}){nt!==void 0&&this.set(tt,nt,rt)}set(tt,nt,rt){return delete this[rt?"implicit":"explicit"][tt],this[rt?"explicit":"implicit"][tt]=nt,this}copyKeyFromSplit(tt,{explicit:nt,implicit:rt}){nt[tt]!==void 0?this.set(tt,nt[tt],!0):rt[tt]!==void 0&&this.set(tt,rt[tt],!1)}copyKeyFromObject(tt,nt){nt[tt]!==void 0&&this.set(tt,nt[tt],!0)}copyAll(tt){for(const nt of keys$1(tt.combine())){const rt=tt.getWithExplicit(nt);this.setWithExplicit(nt,rt)}}}function makeExplicit(et){return{explicit:!0,value:et}}function makeImplicit(et){return{explicit:!1,value:et}}function tieBreakByComparing(et){return(tt,nt,rt,ot)=>{const st=et(tt.value,nt.value);return st>0?tt:st<0?nt:defaultTieBreaker(tt,nt,rt,ot)}}function defaultTieBreaker(et,tt,nt,rt){return et.explicit&&tt.explicit&&warn(mergeConflictingProperty(nt,rt,et.value,tt.value)),et}function mergeValuesWithExplicit(et,tt,nt,rt,ot=defaultTieBreaker){return et===void 0||et.value===void 0?tt:et.explicit&&!tt.explicit?et:tt.explicit&&!et.explicit?tt:deepEqual(et.value,tt.value)?et:ot(et,tt,nt,rt)}class AncestorParse extends Split{constructor(tt={},nt={},rt=!1){super(tt,nt),this.explicit=tt,this.implicit=nt,this.parseNothing=rt}clone(){const tt=super.clone();return tt.parseNothing=this.parseNothing,tt}}function isUrlData(et){return"url"in et}function isInlineData(et){return"values"in et}function isNamedData(et){return"name"in et&&!isUrlData(et)&&!isInlineData(et)&&!isGenerator(et)}function isGenerator(et){return et&&(isSequenceGenerator(et)||isSphereGenerator(et)||isGraticuleGenerator(et))}function isSequenceGenerator(et){return"sequence"in et}function isSphereGenerator(et){return"sphere"in et}function isGraticuleGenerator(et){return"graticule"in et}var DataSourceType;(function(et){et[et.Raw=0]="Raw",et[et.Main=1]="Main",et[et.Row=2]="Row",et[et.Column=3]="Column",et[et.Lookup=4]="Lookup"})(DataSourceType||(DataSourceType={}));var __rest$f=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function assembleInit(et,tt=!0,nt=identity$6){if(isArray(et)){const rt=et.map(ot=>assembleInit(ot,tt,nt));return tt?`[${rt.join(", ")}]`:rt}else if(isDateTime(et))return nt(tt?dateTimeToExpr(et):dateTimeToTimestamp(et));return tt?nt(stringify$1(et)):et}function assembleUnitSelectionSignals(et,tt){var nt;for(const rt of vals((nt=et.component.selection)!==null&&nt!==void 0?nt:{})){const ot=rt.name;let st=`${ot}${TUPLE}, ${rt.resolve==="global"?"true":`{unit: ${unitName(et)}}`}`;for(const ut of selectionCompilers)!ut.defined(rt)||(ut.signals&&(tt=ut.signals(et,rt,tt)),ut.modifyExpr&&(st=ut.modifyExpr(et,rt,st)));tt.push({name:ot+MODIFY,on:[{events:{signal:rt.name+TUPLE},update:`modify(${$(rt.name+STORE)}, ${st})`}]})}return cleanupEmptyOnArray(tt)}function assembleFacetSignals(et,tt){if(et.component.selection&&keys$1(et.component.selection).length){const nt=$(et.getName("cell"));tt.unshift({name:"facet",value:{},on:[{events:eventSelector("mousemove","scope"),update:`isTuple(facet) ? facet : group(${nt}).datum`}]})}return cleanupEmptyOnArray(tt)}function assembleTopLevelSignals(et,tt){var nt;let rt=!1;for(const ot of vals((nt=et.component.selection)!==null&&nt!==void 0?nt:{})){const st=ot.name,ut=$(st+STORE);if(tt.filter(ft=>ft.name===st).length===0){const ft=ot.resolve==="global"?"union":ot.resolve,pt=ot.type==="point"?", true, true)":")";tt.push({name:ot.name,update:`${VL_SELECTION_RESOLVE}(${ut}, ${$(ft)}${pt}`})}rt=!0;for(const ft of selectionCompilers)ft.defined(ot)&&ft.topLevelSignals&&(tt=ft.topLevelSignals(et,ot,tt))}return rt&&tt.filter(st=>st.name==="unit").length===0&&tt.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),cleanupEmptyOnArray(tt)}function assembleUnitSelectionData(et,tt){var nt;const rt=[...tt],ot=unitName(et,{escape:!1});for(const st of vals((nt=et.component.selection)!==null&&nt!==void 0?nt:{})){const ut={name:st.name+STORE};if(st.project.hasSelectionId&&(ut.transform=[{type:"collect",sort:{field:SELECTION_ID}}]),st.init){const ft=st.project.items.map(pt=>__rest$f(pt,["signals"]));ut.values=st.project.hasSelectionId?st.init.map(pt=>({unit:ot,[SELECTION_ID]:assembleInit(pt,!1)[0]})):st.init.map(pt=>({unit:ot,fields:ft,values:assembleInit(pt,!1)}))}rt.filter(ft=>ft.name===st.name+STORE).length||rt.push(ut)}return rt}function assembleUnitSelectionMarks(et,tt){var nt;for(const rt of vals((nt=et.component.selection)!==null&&nt!==void 0?nt:{}))for(const ot of selectionCompilers)ot.defined(rt)&&ot.marks&&(tt=ot.marks(et,rt,tt));return tt}function assembleLayerSelectionMarks(et,tt){for(const nt of et.children)isUnitModel(nt)&&(tt=assembleUnitSelectionMarks(nt,tt));return tt}function assembleSelectionScaleDomain(et,tt,nt,rt){const ot=parseSelectionExtent(et,tt.param,tt);return{signal:hasContinuousDomain(nt.get("type"))&&isArray(rt)&&rt[0]>rt[1]?`isValid(${ot}) && reverse(${ot})`:ot}}function cleanupEmptyOnArray(et){return et.map(tt=>(tt.on&&!tt.on.length&&delete tt.on,tt))}class DataFlowNode{constructor(tt,nt){this.debugName=nt,this._children=[],this._parent=null,tt&&(this.parent=tt)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(tt){this._parent=tt,tt&&tt.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(tt,nt){if(this._children.includes(tt)){warn(ADD_SAME_CHILD_TWICE);return}nt!==void 0?this._children.splice(nt,0,tt):this._children.push(tt)}removeChild(tt){const nt=this._children.indexOf(tt);return this._children.splice(nt,1),nt}remove(){let tt=this._parent.removeChild(this);for(const nt of this._children)nt._parent=this._parent,this._parent.addChild(nt,tt++)}insertAsParentOf(tt){const nt=tt.parent;nt.removeChild(this),this.parent=nt,tt.parent=this}swapWithParent(){const tt=this._parent,nt=tt.parent;for(const ot of this._children)ot.parent=tt;this._children=[],tt.removeChild(this);const rt=tt.parent.removeChild(tt);this._parent=nt,nt.addChild(this,rt),tt.parent=this}}class OutputNode extends DataFlowNode{constructor(tt,nt,rt,ot){super(tt,nt),this.type=rt,this.refCounts=ot,this._source=this._name=nt,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const tt=new this.constructor;return tt.debugName=`clone_${this.debugName}`,tt._source=this._source,tt._name=`clone_${this._name}`,tt.type=this.type,tt.refCounts=this.refCounts,tt.refCounts[tt._name]=0,tt}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${uniqueId()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(tt){this._source=tt}}var __rest$e=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class TimeUnitNode extends DataFlowNode{constructor(tt,nt){super(tt),this.formula=nt}clone(){return new TimeUnitNode(null,duplicate(this.formula))}static makeFromEncoding(tt,nt){const rt=nt.reduceFieldDef((ot,st)=>{const{field:ut,timeUnit:ct}=st;if(ct){const ft=vgField(st,{forAs:!0});ot[hash({as:ft,field:ut,timeUnit:ct})]={as:ft,field:ut,timeUnit:ct}}return ot},{});return isEmpty$1(rt)?null:new TimeUnitNode(tt,rt)}static makeFromTransform(tt,nt){const rt=Object.assign({},nt),{timeUnit:ot}=rt,st=__rest$e(rt,["timeUnit"]),ut=normalizeTimeUnit(ot),ct=Object.assign(Object.assign({},st),{timeUnit:ut});return new TimeUnitNode(tt,{[hash(ct)]:ct})}merge(tt){this.formula=Object.assign({},this.formula);for(const nt in tt.formula)this.formula[nt]||(this.formula[nt]=tt.formula[nt]);for(const nt of tt.children)tt.removeChild(nt),nt.parent=this;tt.remove()}removeFormulas(tt){const nt={};for(const[rt,ot]of entries$1(this.formula))tt.has(ot.as)||(nt[rt]=ot);this.formula=nt}producedFields(){return new Set(vals(this.formula).map(tt=>tt.as))}dependentFields(){return new Set(vals(this.formula).map(tt=>tt.field))}hash(){return`TimeUnit ${hash(this.formula)}`}assemble(){const tt=[];for(const nt of vals(this.formula)){const{field:rt,as:ot,timeUnit:st}=nt,ut=normalizeTimeUnit(st),{unit:ct,utc:ft}=ut,pt=__rest$e(ut,["unit","utc"]);tt.push(Object.assign(Object.assign(Object.assign(Object.assign({field:replacePathInField(rt),type:"timeunit"},ct?{units:getTimeUnitParts(ct)}:{}),ft?{timezone:"utc"}:{}),pt),{as:[ot,`${ot}_end`]}))}return tt}}var __rest$d=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};const TUPLE_FIELDS="_tuple_fields";class SelectionProjectionComponent{constructor(...tt){this.items=tt,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const project={defined:()=>!0,parse:(et,tt,nt)=>{var rt;const ot=tt.name,st=(rt=tt.project)!==null&&rt!==void 0?rt:tt.project=new SelectionProjectionComponent,ut={},ct={},ft=new Set,pt=(Et,xt)=>{const At=xt==="visual"?Et.channel:Et.field;let Ct=varName(`${ot}_${At}`);for(let $t=1;ft.has(Ct);$t++)Ct=varName(`${ot}_${At}_${$t}`);return ft.add(Ct),{[xt]:Ct}},ht=tt.type,mt=et.config.selection[ht],yt=nt.value!==void 0?array$5(nt.value):null;let{fields:vt,encodings:Tt}=isObject(nt.select)?nt.select:{};if(!vt&&!Tt&&yt){for(const Et of yt)if(!!isObject(Et))for(const xt of keys$1(Et))isSingleDefUnitChannel(xt)?(Tt||(Tt=[])).push(xt):ht==="interval"?(warn(INTERVAL_INITIALIZED_WITH_X_Y),Tt=mt.encodings):(vt||(vt=[])).push(xt)}!vt&&!Tt&&(Tt=mt.encodings,"fields"in mt&&(vt=mt.fields));for(const Et of Tt??[]){const xt=et.fieldDef(Et);if(xt){let At=xt.field;if(xt.aggregate){warn(cannotProjectAggregate(Et,xt.aggregate));continue}else if(!At){warn(cannotProjectOnChannelWithoutField(Et));continue}if(xt.timeUnit){At=et.vgField(Et);const Ct={timeUnit:xt.timeUnit,as:At,field:xt.field};ct[hash(Ct)]=Ct}if(!ut[At]){let Ct="E";if(ht==="interval"){const Ot=et.getScaleComponent(Et).get("type");hasContinuousDomain(Ot)&&(Ct="R")}else xt.bin&&(Ct="R-RE");const $t={field:At,channel:Et,type:Ct};$t.signals=Object.assign(Object.assign({},pt($t,"data")),pt($t,"visual")),st.items.push(ut[At]=$t),st.hasField[At]=st.hasChannel[Et]=ut[At],st.hasSelectionId=st.hasSelectionId||At===SELECTION_ID}}else warn(cannotProjectOnChannelWithoutField(Et))}for(const Et of vt??[]){if(st.hasField[Et])continue;const xt={type:"E",field:Et};xt.signals=Object.assign({},pt(xt,"data")),st.items.push(xt),st.hasField[Et]=xt,st.hasSelectionId=st.hasSelectionId||Et===SELECTION_ID}yt&&(tt.init=yt.map(Et=>st.items.map(xt=>isObject(Et)?Et[xt.channel]!==void 0?Et[xt.channel]:Et[xt.field]:Et))),isEmpty$1(ct)||(st.timeUnit=new TimeUnitNode(null,ct))},signals:(et,tt,nt)=>{const rt=tt.name+TUPLE_FIELDS;return nt.filter(st=>st.name===rt).length>0||tt.project.hasSelectionId?nt:nt.concat({name:rt,value:tt.project.items.map(st=>{const ut=__rest$d(st,["signals","hasLegend"]);return ut.field=replacePathInField(ut.field),ut})})}},scaleBindings={defined:et=>et.type==="interval"&&et.resolve==="global"&&et.bind&&et.bind==="scales",parse:(et,tt)=>{const nt=tt.scales=[];for(const rt of tt.project.items){const ot=rt.channel;if(!isScaleChannel(ot))continue;const st=et.getScaleComponent(ot),ut=st?st.get("type"):void 0;if(!st||!hasContinuousDomain(ut)){warn(SCALE_BINDINGS_CONTINUOUS);continue}st.set("selectionExtent",{param:tt.name,field:rt.field},!0),nt.push(rt)}},topLevelSignals:(et,tt,nt)=>{const rt=tt.scales.filter(ut=>nt.filter(ct=>ct.name===ut.signals.data).length===0);if(!et.parent||isTopLevelLayer(et)||rt.length===0)return nt;const ot=nt.filter(ut=>ut.name===tt.name)[0];let st=ot.update;if(st.indexOf(VL_SELECTION_RESOLVE)>=0)ot.update=`{${rt.map(ut=>`${$(replacePathInField(ut.field))}: ${ut.signals.data}`).join(", ")}}`;else{for(const ut of rt){const ct=`${$(replacePathInField(ut.field))}: ${ut.signals.data}`;st.includes(ct)||(st=`${st.substring(0,st.length-1)}, ${ct}}`)}ot.update=st}return nt.concat(rt.map(ut=>({name:ut.signals.data})))},signals:(et,tt,nt)=>{if(et.parent&&!isTopLevelLayer(et))for(const rt of tt.scales){const ot=nt.filter(st=>st.name===rt.signals.data)[0];ot.push="outer",delete ot.value,delete ot.update}return nt}};function domain(et,tt){return`domain(${$(et.scaleName(tt))})`}function isTopLevelLayer(et){var tt;return et.parent&&isLayerModel(et.parent)&&((tt=!et.parent.parent)!==null&&tt!==void 0?tt:isTopLevelLayer(et.parent.parent))}var __rest$c=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};const BRUSH="_brush",SCALE_TRIGGER="_scale_trigger",interval={defined:et=>et.type==="interval",signals:(et,tt,nt)=>{const rt=tt.name,ot=rt+TUPLE_FIELDS,st=scaleBindings.defined(tt),ut=tt.init?tt.init[0]:null,ct=[],ft=[];if(tt.translate&&!st){const ht=`!event.item || event.item.mark.name !== ${$(rt+BRUSH)}`;events(tt,(mt,yt)=>{var vt,Tt;const Et=array$5((vt=(Tt=yt.between[0]).filter)!==null&&vt!==void 0?vt:Tt.filter=[]);return Et.includes(ht)||Et.push(ht),mt})}tt.project.items.forEach((ht,mt)=>{const yt=ht.channel;if(yt!==X&&yt!==Y){warn("Interval selections only support x and y encoding channels.");return}const vt=ut?ut[mt]:null,Tt=channelSignals(et,tt,ht,vt),Et=ht.signals.data,xt=ht.signals.visual,At=$(et.scaleName(yt)),Ct=et.getScaleComponent(yt).get("type"),$t=hasContinuousDomain(Ct)?"+":"";nt.push(...Tt),ct.push(Et),ft.push({scaleName:et.scaleName(yt),expr:`(!isArray(${Et}) || (${$t}invert(${At}, ${xt})[0] === ${$t}${Et}[0] && ${$t}invert(${At}, ${xt})[1] === ${$t}${Et}[1]))`})}),!st&&ft.length&&nt.push({name:rt+SCALE_TRIGGER,value:{},on:[{events:ft.map(ht=>({scale:ht.scaleName})),update:`${ft.map(ht=>ht.expr).join(" && ")} ? ${rt+SCALE_TRIGGER} : {}`}]});const pt=`unit: ${unitName(et)}, fields: ${ot}, values`;return nt.concat(Object.assign(Object.assign({name:rt+TUPLE},ut?{init:`{${pt}: ${assembleInit(ut)}}`}:{}),ct.length?{on:[{events:[{signal:ct.join(" || ")}],update:`${ct.join(" && ")} ? {${pt}: [${ct}]} : null`}]}:{}))},marks:(et,tt,nt)=>{const rt=tt.name,{x:ot,y:st}=tt.project.hasChannel,ut=ot?.signals.visual,ct=st?.signals.visual,ft=`data(${$(tt.name+STORE)})`;if(scaleBindings.defined(tt)||!ot&&!st)return nt;const pt={x:ot!==void 0?{signal:`${ut}[0]`}:{value:0},y:st!==void 0?{signal:`${ct}[0]`}:{value:0},x2:ot!==void 0?{signal:`${ut}[1]`}:{field:{group:"width"}},y2:st!==void 0?{signal:`${ct}[1]`}:{field:{group:"height"}}};if(tt.resolve==="global")for(const xt of keys$1(pt))pt[xt]=[Object.assign({test:`${ft}.length && ${ft}[0].unit === ${unitName(et)}`},pt[xt]),{value:0}];const ht=tt.mark,{fill:mt,fillOpacity:yt,cursor:vt}=ht,Tt=__rest$c(ht,["fill","fillOpacity","cursor"]),Et=keys$1(Tt).reduce((xt,At)=>(xt[At]=[{test:[ot!==void 0&&`${ut}[0] !== ${ut}[1]`,st!==void 0&&`${ct}[0] !== ${ct}[1]`].filter(Ct=>Ct).join(" && "),value:Tt[At]},{value:null}],xt),{});return[{name:`${rt+BRUSH}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:mt},fillOpacity:{value:yt}},update:pt}},...nt,{name:rt+BRUSH,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},vt?{cursor:{value:vt}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},pt),Et)}}]}};function channelSignals(et,tt,nt,rt){const ot=nt.channel,st=nt.signals.visual,ut=nt.signals.data,ct=scaleBindings.defined(tt),ft=$(et.scaleName(ot)),pt=et.getScaleComponent(ot),ht=pt?pt.get("type"):void 0,mt=Et=>`scale(${ft}, ${Et})`,yt=et.getSizeSignalRef(ot===X?"width":"height").signal,vt=`${ot}(unit)`,Tt=events(tt,(Et,xt)=>[...Et,{events:xt.between[0],update:`[${vt}, ${vt}]`},{events:xt,update:`[${st}[0], clamp(${vt}, 0, ${yt})]`}]);return Tt.push({events:{signal:tt.name+SCALE_TRIGGER},update:hasContinuousDomain(ht)?`[${mt(`${ut}[0]`)}, ${mt(`${ut}[1]`)}]`:"[0, 0]"}),ct?[{name:ut,on:[]}]:[Object.assign(Object.assign({name:st},rt?{init:assembleInit(rt,!0,mt)}:{value:[]}),{on:Tt}),Object.assign(Object.assign({name:ut},rt?{init:assembleInit(rt)}:{}),{on:[{events:{signal:st},update:`${st}[0] === ${st}[1] ? null : invert(${ft}, ${st})`}]})]}function events(et,tt){return et.events.reduce((nt,rt)=>rt.between?tt(nt,rt):(warn(`${rt} is not an ordered event stream for interval selections.`),nt),[])}const point$1={defined:et=>et.type==="point",signals:(et,tt,nt)=>{var rt;const ot=tt.name,st=ot+TUPLE_FIELDS,ut=tt.project,ct="(item().isVoronoi ? datum.datum : datum)",ft=vals((rt=et.component.selection)!==null&&rt!==void 0?rt:{}).reduce((yt,vt)=>vt.type==="interval"?yt.concat(vt.name+BRUSH):yt,[]).map(yt=>`indexof(item().mark.name, '${yt}') < 0`).join(" && "),pt=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${ft?` && ${ft}`:""}`;let ht=`unit: ${unitName(et)}, `;if(tt.project.hasSelectionId)ht+=`${SELECTION_ID}: ${ct}[${$(SELECTION_ID)}]`;else{const yt=ut.items.map(vt=>{const Tt=et.fieldDef(vt.channel);return Tt?.bin?`[${ct}[${$(et.vgField(vt.channel,{}))}], ${ct}[${$(et.vgField(vt.channel,{binSuffix:"end"}))}]]`:`${ct}[${$(vt.field)}]`}).join(", ");ht+=`fields: ${st}, values: [${yt}]`}const mt=tt.events;return nt.concat([{name:ot+TUPLE,on:mt?[{events:mt,update:`${pt} ? {${ht}} : null`,force:!0}]:[]}])}};function wrapCondition(et,tt,nt,rt){const ot=isConditionalDef(tt)&&tt.condition,st=rt(tt);if(ot){const ct=array$5(ot).map(ft=>{const pt=rt(ft);if(isConditionalParameter(ft)){const{param:ht,empty:mt}=ft,yt=parseSelectionPredicate(et,{param:ht,empty:mt});return Object.assign({test:yt},pt)}else{const ht=expression(et,ft.test);return Object.assign({test:ht},pt)}});return{[nt]:[...ct,...st!==void 0?[st]:[]]}}else return st!==void 0?{[nt]:st}:{}}function text$1(et,tt="text"){const nt=et.encoding[tt];return wrapCondition(et,nt,tt,rt=>textRef(rt,et.config))}function textRef(et,tt,nt="datum"){if(et){if(isValueDef(et))return signalOrValueRef(et.value);if(isFieldOrDatumDef(et)){const{format:rt,formatType:ot}=getFormatMixins(et);return formatSignalRef({fieldOrDatumDef:et,format:rt,formatType:ot,expr:nt,config:tt})}}}function tooltip(et,tt={}){const{encoding:nt,markDef:rt,config:ot,stack:st}=et,ut=nt.tooltip;if(isArray(ut))return{tooltip:tooltipRefForEncoding({tooltip:ut},st,ot,tt)};{const ct=tt.reactiveGeom?"datum.datum":"datum";return wrapCondition(et,ut,"tooltip",ft=>{const pt=textRef(ft,ot,ct);if(pt)return pt;if(ft===null)return;let ht=getMarkPropOrConfig("tooltip",rt,ot);if(ht===!0&&(ht={content:"encoding"}),isString(ht))return{value:ht};if(isObject(ht))return isSignalRef(ht)?ht:ht.content==="encoding"?tooltipRefForEncoding(nt,st,ot,tt):{signal:ct}})}}function tooltipData(et,tt,nt,{reactiveGeom:rt}={}){const ot={},st=rt?"datum.datum":"datum",ut=[];function ct(pt,ht){const mt=getMainRangeChannel(ht),yt=isTypedFieldDef(pt)?pt:Object.assign(Object.assign({},pt),{type:et[mt].type}),vt=yt.title||defaultTitle(yt,nt),Tt=array$5(vt).join(", ");let Et;if(isXorY(ht)){const xt=ht==="x"?"x2":"y2",At=getFieldDef(et[xt]);if(isBinned(yt.bin)&&At){const Ct=vgField(yt,{expr:st}),$t=vgField(At,{expr:st}),{format:Ot,formatType:Rt}=getFormatMixins(yt);Et=binFormatExpression(Ct,$t,Ot,Rt,nt),ot[xt]=!0}}if((isXorY(ht)||ht===THETA||ht===RADIUS)&&tt&&tt.fieldChannel===ht&&tt.offset==="normalize"){const{format:xt,formatType:At}=getFormatMixins(yt);Et=formatSignalRef({fieldOrDatumDef:yt,format:xt,formatType:At,expr:st,config:nt,normalizeStack:!0}).signal}Et??(Et=textRef(yt,nt,st).signal),ut.push({channel:ht,key:Tt,value:Et})}forEach(et,(pt,ht)=>{isFieldDef(pt)?ct(pt,ht):hasConditionalFieldDef(pt)&&ct(pt.condition,ht)});const ft={};for(const{channel:pt,key:ht,value:mt}of ut)!ot[pt]&&!ft[ht]&&(ft[ht]=mt);return ft}function tooltipRefForEncoding(et,tt,nt,{reactiveGeom:rt}={}){const ot=tooltipData(et,tt,nt,{reactiveGeom:rt}),st=entries$1(ot).map(([ut,ct])=>`"${ut}": ${ct}`);return st.length>0?{signal:`{${st.join(", ")}}`}:void 0}function aria(et){const{markDef:tt,config:nt}=et,rt=getMarkPropOrConfig("aria",tt,nt);return rt===!1?{}:Object.assign(Object.assign(Object.assign({},rt?{aria:rt}:{}),ariaRoleDescription(et)),description$1(et))}function ariaRoleDescription(et){const{mark:tt,markDef:nt,config:rt}=et;if(rt.aria===!1)return{};const ot=getMarkPropOrConfig("ariaRoleDescription",nt,rt);return ot!=null?{ariaRoleDescription:{value:ot}}:tt in VG_MARK_INDEX?{}:{ariaRoleDescription:{value:tt}}}function description$1(et){const{encoding:tt,markDef:nt,config:rt,stack:ot}=et,st=tt.description;if(st)return wrapCondition(et,st,"description",ft=>textRef(ft,et.config));const ut=getMarkPropOrConfig("description",nt,rt);if(ut!=null)return{description:signalOrValueRef(ut)};if(rt.aria===!1)return{};const ct=tooltipData(tt,ot,rt);if(!isEmpty$1(ct))return{description:{signal:entries$1(ct).map(([ft,pt],ht)=>`"${ht>0?"; ":""}${ft}: " + (${pt})`).join(" + ")}}}function nonPosition(et,tt,nt={}){const{markDef:rt,encoding:ot,config:st}=tt,{vgChannel:ut}=nt;let{defaultRef:ct,defaultValue:ft}=nt;ct===void 0&&(ft??(ft=getMarkPropOrConfig(et,rt,st,{vgChannel:ut,ignoreVgConfig:!0})),ft!==void 0&&(ct=signalOrValueRef(ft)));const pt=ot[et];return wrapCondition(tt,pt,ut??et,ht=>midPoint({channel:et,channelDef:ht,markDef:rt,config:st,scaleName:tt.scaleName(et),scale:tt.getScaleComponent(et),stack:null,defaultRef:ct}))}function color$2(et,tt={filled:void 0}){var nt,rt,ot,st;const{markDef:ut,encoding:ct,config:ft}=et,{type:pt}=ut,ht=(nt=tt.filled)!==null&&nt!==void 0?nt:getMarkPropOrConfig("filled",ut,ft),mt=contains(["bar","point","circle","square","geoshape"],pt)?"transparent":void 0,yt=(ot=(rt=getMarkPropOrConfig(ht===!0?"color":void 0,ut,ft,{vgChannel:"fill"}))!==null&&rt!==void 0?rt:ft.mark[ht===!0&&"color"])!==null&&ot!==void 0?ot:mt,vt=(st=getMarkPropOrConfig(ht===!1?"color":void 0,ut,ft,{vgChannel:"stroke"}))!==null&&st!==void 0?st:ft.mark[ht===!1&&"color"],Tt=ht?"fill":"stroke",Et=Object.assign(Object.assign({},yt?{fill:signalOrValueRef(yt)}:{}),vt?{stroke:signalOrValueRef(vt)}:{});return ut.color&&(ht?ut.fill:ut.stroke)&&warn(droppingColor("property",{fill:"fill"in ut,stroke:"stroke"in ut})),Object.assign(Object.assign(Object.assign(Object.assign({},Et),nonPosition("color",et,{vgChannel:Tt,defaultValue:ht?yt:vt})),nonPosition("fill",et,{defaultValue:ct.fill?yt:void 0})),nonPosition("stroke",et,{defaultValue:ct.stroke?vt:void 0}))}function zindex(et){const{encoding:tt,mark:nt}=et,rt=tt.order;return!isPathMark(nt)&&isValueDef(rt)?wrapCondition(et,rt,"zindex",ot=>signalOrValueRef(ot.value)):{}}function positionOffset({channel:et,markDef:tt,encoding:nt={},model:rt,bandPosition:ot}){const st=`${et}Offset`,ut=tt[st],ct=nt[st];if((st==="xOffset"||st==="yOffset")&&ct)return{offsetType:"encoding",offset:midPoint({channel:st,channelDef:ct,markDef:tt,config:rt?.config,scaleName:rt.scaleName(st),scale:rt.getScaleComponent(st),stack:null,defaultRef:signalOrValueRef(ut),bandPosition:ot})};const ft=tt[st];return ft?{offsetType:"visual",offset:ft}:{}}function pointPosition(et,tt,{defaultPos:nt,vgChannel:rt}){const{encoding:ot,markDef:st,config:ut,stack:ct}=tt,ft=ot[et],pt=ot[getSecondaryRangeChannel(et)],ht=tt.scaleName(et),mt=tt.getScaleComponent(et),{offset:yt,offsetType:vt}=positionOffset({channel:et,markDef:st,encoding:ot,model:tt,bandPosition:.5}),Tt=pointPositionDefaultRef({model:tt,defaultPos:nt,channel:et,scaleName:ht,scale:mt}),Et=!ft&&isXorY(et)&&(ot.latitude||ot.longitude)?{field:tt.getName(et)}:positionRef({channel:et,channelDef:ft,channel2Def:pt,markDef:st,config:ut,scaleName:ht,scale:mt,stack:ct,offset:yt,defaultRef:Tt,bandPosition:vt==="encoding"?0:void 0});return Et?{[rt||et]:Et}:void 0}function positionRef(et){const{channel:tt,channelDef:nt,scaleName:rt,stack:ot,offset:st,markDef:ut}=et;if(isFieldOrDatumDef(nt)&&ot&&tt===ot.fieldChannel){if(isFieldDef(nt)){let ct=nt.bandPosition;if(ct===void 0&&ut.type==="text"&&(tt==="radius"||tt==="theta")&&(ct=.5),ct!==void 0)return interpolatedSignalRef({scaleName:rt,fieldOrDatumDef:nt,startSuffix:"start",bandPosition:ct,offset:st})}return valueRefForFieldOrDatumDef(nt,rt,{suffix:"end"},{offset:st})}return midPointRefWithPositionInvalidTest(et)}function pointPositionDefaultRef({model:et,defaultPos:tt,channel:nt,scaleName:rt,scale:ot}){const{markDef:st,config:ut}=et;return()=>{const ct=getMainRangeChannel(nt),ft=getVgPositionChannel(nt),pt=getMarkPropOrConfig(nt,st,ut,{vgChannel:ft});if(pt!==void 0)return widthHeightValueOrSignalRef(nt,pt);switch(tt){case"zeroOrMin":case"zeroOrMax":if(rt){const ht=ot.get("type");if(!contains([ScaleType.LOG,ScaleType.TIME,ScaleType.UTC],ht)){if(ot.domainDefinitelyIncludesZero())return{scale:rt,value:0}}}if(tt==="zeroOrMin")return ct==="y"?{field:{group:"height"}}:{value:0};switch(ct){case"radius":return{signal:`min(${et.width.signal},${et.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":{const ht=et[getSizeChannel(nt)];return Object.assign(Object.assign({},ht),{mult:.5})}}}}const ALIGNED_X_CHANNEL={left:"x",center:"xc",right:"x2"},BASELINED_Y_CHANNEL={top:"y",middle:"yc",bottom:"y2"};function vgAlignedPositionChannel(et,tt,nt,rt="middle"){if(et==="radius"||et==="theta")return getVgPositionChannel(et);const ot=et==="x"?"align":"baseline",st=getMarkPropOrConfig(ot,tt,nt);let ut;return isSignalRef(st)?(warn(rangeMarkAlignmentCannotBeExpression(ot)),ut=void 0):ut=st,et==="x"?ALIGNED_X_CHANNEL[ut||(rt==="top"?"left":"center")]:BASELINED_Y_CHANNEL[ut||rt]}function pointOrRangePosition(et,tt,{defaultPos:nt,defaultPos2:rt,range:ot}){return ot?rangePosition(et,tt,{defaultPos:nt,defaultPos2:rt}):pointPosition(et,tt,{defaultPos:nt})}function rangePosition(et,tt,{defaultPos:nt,defaultPos2:rt}){const{markDef:ot,config:st}=tt,ut=getSecondaryRangeChannel(et),ct=getSizeChannel(et),ft=pointPosition2OrSize(tt,rt,ut),pt=ft[ct]?vgAlignedPositionChannel(et,ot,st):getVgPositionChannel(et);return Object.assign(Object.assign({},pointPosition(et,tt,{defaultPos:nt,vgChannel:pt})),ft)}function pointPosition2OrSize(et,tt,nt){const{encoding:rt,mark:ot,markDef:st,stack:ut,config:ct}=et,ft=getMainRangeChannel(nt),pt=getSizeChannel(nt),ht=getVgPositionChannel(nt),mt=rt[ft],yt=et.scaleName(ft),vt=et.getScaleComponent(ft),{offset:Tt}=nt in rt||nt in st?positionOffset({channel:nt,markDef:st,encoding:rt,model:et}):positionOffset({channel:ft,markDef:st,encoding:rt,model:et});if(!mt&&(nt==="x2"||nt==="y2")&&(rt.latitude||rt.longitude)){const xt=getSizeChannel(nt),At=et.markDef[xt];return At!=null?{[xt]:{value:At}}:{[ht]:{field:et.getName(nt)}}}const Et=position2Ref({channel:nt,channelDef:mt,channel2Def:rt[nt],markDef:st,config:ct,scaleName:yt,scale:vt,stack:ut,offset:Tt,defaultRef:void 0});return Et!==void 0?{[ht]:Et}:position2orSize(nt,st)||position2orSize(nt,{[nt]:getMarkStyleConfig(nt,st,ct.style),[pt]:getMarkStyleConfig(pt,st,ct.style)})||position2orSize(nt,ct[ot])||position2orSize(nt,ct.mark)||{[ht]:pointPositionDefaultRef({model:et,defaultPos:tt,channel:nt,scaleName:yt,scale:vt})()}}function position2Ref({channel:et,channelDef:tt,channel2Def:nt,markDef:rt,config:ot,scaleName:st,scale:ut,stack:ct,offset:ft,defaultRef:pt}){return isFieldOrDatumDef(tt)&&ct&&et.charAt(0)===ct.fieldChannel.charAt(0)?valueRefForFieldOrDatumDef(tt,st,{suffix:"start"},{offset:ft}):midPointRefWithPositionInvalidTest({channel:et,channelDef:nt,scaleName:st,scale:ut,stack:ct,markDef:rt,config:ot,offset:ft,defaultRef:pt})}function position2orSize(et,tt){const nt=getSizeChannel(et),rt=getVgPositionChannel(et);if(tt[rt]!==void 0)return{[rt]:widthHeightValueOrSignalRef(et,tt[rt])};if(tt[et]!==void 0)return{[rt]:widthHeightValueOrSignalRef(et,tt[et])};if(tt[nt]){const ot=tt[nt];if(isRelativeBandSize(ot))warn(relativeBandSizeNotSupported(nt));else return{[nt]:widthHeightValueOrSignalRef(et,ot)}}}function rectPosition(et,tt){var nt,rt;const{config:ot,encoding:st,markDef:ut}=et,ct=ut.type,ft=getSecondaryRangeChannel(tt),pt=getSizeChannel(tt),ht=st[tt],mt=st[ft],yt=et.getScaleComponent(tt),vt=yt?yt.get("type"):void 0,Tt=ut.orient,Et=(rt=(nt=st[pt])!==null&&nt!==void 0?nt:st.size)!==null&&rt!==void 0?rt:getMarkPropOrConfig("size",ut,ot,{vgChannel:pt}),xt=ct==="bar"&&(tt==="x"?Tt==="vertical":Tt==="horizontal");return isFieldDef(ht)&&(isBinning(ht.bin)||isBinned(ht.bin)||ht.timeUnit&&!mt)&&!(Et&&!isRelativeBandSize(Et))&&!hasDiscreteDomain(vt)?rectBinPosition({fieldDef:ht,fieldDef2:mt,channel:tt,model:et}):(isFieldOrDatumDef(ht)&&hasDiscreteDomain(vt)||xt)&&!mt?positionAndSize(ht,tt,et):rangePosition(tt,et,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function defaultSizeRef(et,tt,nt,rt,ot){if(isRelativeBandSize(ot))if(nt){const ut=nt.get("type");if(ut==="band"){let ct=`bandwidth('${tt}')`;return ot.band!==1&&(ct=`${ot.band} * ${ct}`),{signal:`max(0.25, ${ct})`}}else ot.band!==1&&(warn(cannotUseRelativeBandSizeWithNonBandScale(ut)),ot=void 0)}else return{mult:ot.band,field:{group:et}};else{if(isSignalRef(ot))return ot;if(ot)return{value:ot}}if(nt){const ut=nt.get("range");if(isVgRangeStep(ut)&&isNumber$1(ut.step))return{value:ut.step-2}}return{value:getViewConfigDiscreteStep(rt.view,et)-2}}function positionAndSize(et,tt,nt){const{markDef:rt,encoding:ot,config:st,stack:ut}=nt,ct=rt.orient,ft=nt.scaleName(tt),pt=nt.getScaleComponent(tt),ht=getSizeChannel(tt),mt=getSecondaryRangeChannel(tt),yt=getOffsetChannel(tt),vt=nt.scaleName(yt),Tt=ct==="horizontal"&&tt==="y"||ct==="vertical"&&tt==="x";let Et;(ot.size||rt.size)&&(Tt?Et=nonPosition("size",nt,{vgChannel:ht,defaultRef:signalOrValueRef(rt.size)}):warn(cannotApplySizeToNonOrientedMark(rt.type)));const xt=!!Et,At=getBandSize({channel:tt,fieldDef:et,markDef:rt,config:st,scaleType:pt?.get("type"),useVlSizeChannel:Tt});Et=Et||{[ht]:defaultSizeRef(ht,vt||ft,pt,st,At)};const Ct=pt?.get("type")==="band"&&isRelativeBandSize(At)&&!xt?"top":"middle",$t=vgAlignedPositionChannel(tt,rt,st,Ct),Ot=$t==="xc"||$t==="yc",{offset:Rt,offsetType:It}=positionOffset({channel:tt,markDef:rt,encoding:ot,model:nt,bandPosition:Ot?.5:0}),kt=midPointRefWithPositionInvalidTest({channel:tt,channelDef:et,markDef:rt,config:st,scaleName:ft,scale:pt,stack:ut,offset:Rt,defaultRef:pointPositionDefaultRef({model:nt,defaultPos:"mid",channel:tt,scaleName:ft,scale:pt}),bandPosition:Ot?It==="encoding"?0:.5:isSignalRef(At)?{signal:`(1-${At})/2`}:isRelativeBandSize(At)?(1-At.band)/2:0});if(ht)return Object.assign({[$t]:kt},Et);{const Mt=getVgPositionChannel(mt),Ft=Et[ht],zt=Rt?Object.assign(Object.assign({},Ft),{offset:Rt}):Ft;return{[$t]:kt,[Mt]:isArray(kt)?[kt[0],Object.assign(Object.assign({},kt[1]),{offset:zt})]:Object.assign(Object.assign({},kt),{offset:zt})}}}function getBinSpacing(et,tt,nt,rt,ot){if(isPolarPositionChannel(et))return 0;const st=et==="x"||et==="y2"?-tt/2:tt/2;if(isSignalRef(nt)||isSignalRef(ot)||isSignalRef(rt)){const ut=signalOrStringValue(nt),ct=signalOrStringValue(ot),ft=signalOrStringValue(rt),pt=ft?`${ft} + `:"",ht=ut?`(${ut} ? -1 : 1) * `:"",mt=ct?`(${ct} + ${st})`:st;return{signal:pt+ht+mt}}else return ot=ot||0,rt+(nt?-ot-st:+ot+st)}function rectBinPosition({fieldDef:et,fieldDef2:tt,channel:nt,model:rt}){var ot,st,ut;const{config:ct,markDef:ft,encoding:pt}=rt,ht=rt.getScaleComponent(nt),mt=rt.scaleName(nt),yt=ht?ht.get("type"):void 0,vt=ht.get("reverse"),Tt=getBandSize({channel:nt,fieldDef:et,markDef:ft,config:ct,scaleType:yt}),Et=(ot=rt.component.axes[nt])===null||ot===void 0?void 0:ot[0],xt=(st=Et?.get("translate"))!==null&&st!==void 0?st:.5,At=isXorY(nt)&&(ut=getMarkPropOrConfig("binSpacing",ft,ct))!==null&&ut!==void 0?ut:0,Ct=getSecondaryRangeChannel(nt),$t=getVgPositionChannel(nt),Ot=getVgPositionChannel(Ct),{offset:Rt}=positionOffset({channel:nt,markDef:ft,encoding:pt,model:rt,bandPosition:0}),It=isSignalRef(Tt)?{signal:`(1-${Tt.signal})/2`}:isRelativeBandSize(Tt)?(1-Tt.band)/2:.5;if(isBinning(et.bin)||et.timeUnit)return{[Ot]:rectBinRef({fieldDef:et,scaleName:mt,bandPosition:It,offset:getBinSpacing(Ct,At,vt,xt,Rt)}),[$t]:rectBinRef({fieldDef:et,scaleName:mt,bandPosition:isSignalRef(It)?{signal:`1-${It.signal}`}:1-It,offset:getBinSpacing(nt,At,vt,xt,Rt)})};if(isBinned(et.bin)){const kt=valueRefForFieldOrDatumDef(et,mt,{},{offset:getBinSpacing(Ct,At,vt,xt,Rt)});if(isFieldDef(tt))return{[Ot]:kt,[$t]:valueRefForFieldOrDatumDef(tt,mt,{},{offset:getBinSpacing(nt,At,vt,xt,Rt)})};if(isBinParams(et.bin)&&et.bin.step)return{[Ot]:kt,[$t]:{signal:`scale("${mt}", ${vgField(et,{expr:"datum"})} + ${et.bin.step})`,offset:getBinSpacing(nt,At,vt,xt,Rt)}}}warn(channelRequiredForBinned(Ct))}function rectBinRef({fieldDef:et,scaleName:tt,bandPosition:nt,offset:rt}){return interpolatedSignalRef({scaleName:tt,fieldOrDatumDef:et,bandPosition:nt,offset:rt})}const ALWAYS_IGNORE=new Set(["aria","width","height"]);function baseEncodeEntry(et,tt){const{fill:nt=void 0,stroke:rt=void 0}=tt.color==="include"?color$2(et):{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},markDefProperties(et.markDef,tt)),wrapAllFieldsInvalid(et,"fill",nt)),wrapAllFieldsInvalid(et,"stroke",rt)),nonPosition("opacity",et)),nonPosition("fillOpacity",et)),nonPosition("strokeOpacity",et)),nonPosition("strokeWidth",et)),nonPosition("strokeDash",et)),zindex(et)),tooltip(et)),text$1(et,"href")),aria(et))}function wrapAllFieldsInvalid(et,tt,nt){const{config:rt,mark:ot,markDef:st}=et;if(getMarkPropOrConfig("invalid",st,rt)==="hide"&&nt&&!isPathMark(ot)){const ct=allFieldsInvalidPredicate$1(et,{invalid:!0,channels:SCALE_CHANNELS});if(ct)return{[tt]:[{test:ct,value:null},...array$5(nt)]}}return nt?{[tt]:nt}:{}}function markDefProperties(et,tt){return VG_MARK_CONFIGS.reduce((nt,rt)=>(!ALWAYS_IGNORE.has(rt)&&et[rt]!==void 0&&tt[rt]!=="ignore"&&(nt[rt]=signalOrValueRef(et[rt])),nt),{})}function allFieldsInvalidPredicate$1(et,{invalid:tt=!1,channels:nt}){const rt=nt.reduce((st,ut)=>{const ct=et.getScaleComponent(ut);if(ct){const ft=ct.get("type"),pt=et.vgField(ut,{expr:"datum"});pt&&hasContinuousDomain(ft)&&(st[pt]=!0)}return st},{}),ot=keys$1(rt);if(ot.length>0){const st=tt?"||":"&&";return ot.map(ut=>fieldInvalidPredicate(ut,tt)).join(` ${st} `)}}function defined(et){const{config:tt,markDef:nt}=et;if(getMarkPropOrConfig("invalid",nt,tt)){const ot=allFieldsInvalidPredicate(et,{channels:POSITION_SCALE_CHANNELS});if(ot)return{defined:{signal:ot}}}return{}}function allFieldsInvalidPredicate(et,{invalid:tt=!1,channels:nt}){const rt=nt.reduce((st,ut)=>{var ct;const ft=et.getScaleComponent(ut);if(ft){const pt=ft.get("type"),ht=et.vgField(ut,{expr:"datum",binSuffix:!((ct=et.stack)===null||ct===void 0)&&ct.impute?"mid":void 0});ht&&hasContinuousDomain(pt)&&(st[ht]=!0)}return st},{}),ot=keys$1(rt);if(ot.length>0){const st=tt?"||":"&&";return ot.map(ut=>fieldInvalidPredicate(ut,tt)).join(` ${st} `)}}function valueIfDefined(et,tt){if(tt!==void 0)return{[et]:signalOrValueRef(tt)}}const VORONOI="voronoi",nearest={defined:et=>et.type==="point"&&et.nearest,parse:(et,tt)=>{if(tt.events)for(const nt of tt.events)nt.markname=et.getName(VORONOI)},marks:(et,tt,nt)=>{const{x:rt,y:ot}=tt.project.hasChannel,st=et.mark;if(isPathMark(st))return warn(nearestNotSupportForContinuous(st)),nt;const ut={name:et.getName(VORONOI),type:"path",interactive:!0,from:{data:et.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},tooltip(et,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:rt||!ot?"datum.datum.x || 0":"0"},y:{expr:ot||!rt?"datum.datum.y || 0":"0"},size:[et.getSizeSignalRef("width"),et.getSizeSignalRef("height")]}]};let ct=0,ft=!1;return nt.forEach((pt,ht)=>{var mt;const yt=(mt=pt.name)!==null&&mt!==void 0?mt:"";yt===et.component.mark[0].name?ct=ht:yt.indexOf(VORONOI)>=0&&(ft=!0)}),ft||nt.splice(ct+1,0,ut),nt}},inputBindings={defined:et=>et.type==="point"&&et.resolve==="global"&&et.bind&&et.bind!=="scales"&&!isLegendBinding(et.bind),parse:(et,tt,nt)=>disableDirectManipulation(tt,nt),topLevelSignals:(et,tt,nt)=>{const rt=tt.name,ot=tt.project,st=tt.bind,ut=tt.init&&tt.init[0],ct=nearest.defined(tt)?"(item().isVoronoi ? datum.datum : datum)":"datum";return ot.items.forEach((ft,pt)=>{var ht,mt;const yt=varName(`${rt}_${ft.field}`);nt.filter(Tt=>Tt.name===yt).length||nt.unshift(Object.assign(Object.assign({name:yt},ut?{init:assembleInit(ut[pt])}:{value:null}),{on:tt.events?[{events:tt.events,update:`datum && item().mark.marktype !== 'group' ? ${ct}[${$(ft.field)}] : null`}]:[],bind:(mt=(ht=st[ft.field])!==null&&ht!==void 0?ht:st[ft.channel])!==null&&mt!==void 0?mt:st}))}),nt},signals:(et,tt,nt)=>{const rt=tt.name,ot=tt.project,st=nt.filter(pt=>pt.name===rt+TUPLE)[0],ut=rt+TUPLE_FIELDS,ct=ot.items.map(pt=>varName(`${rt}_${pt.field}`)),ft=ct.map(pt=>`${pt} !== null`).join(" && ");return ct.length&&(st.update=`${ft} ? {fields: ${ut}, values: [${ct.join(", ")}]} : null`),delete st.value,delete st.on,nt}},TOGGLE="_toggle",toggle={defined:et=>et.type==="point"&&!!et.toggle,signals:(et,tt,nt)=>nt.concat({name:tt.name+TOGGLE,value:!1,on:[{events:tt.events,update:tt.toggle}]}),modifyExpr:(et,tt)=>{const nt=tt.name+TUPLE,rt=tt.name+TOGGLE;return`${rt} ? null : ${nt}, `+(tt.resolve==="global"?`${rt} ? null : true, `:`${rt} ? null : {unit: ${unitName(et)}}, `)+`${rt} ? ${nt} : null`}},clear={defined:et=>et.clear!==void 0&&et.clear!==!1,parse:(et,tt)=>{tt.clear&&(tt.clear=isString(tt.clear)?eventSelector(tt.clear,"view"):tt.clear)},topLevelSignals:(et,tt,nt)=>{if(inputBindings.defined(tt))for(const rt of tt.project.items){const ot=nt.findIndex(st=>st.name===varName(`${tt.name}_${rt.field}`));ot!==-1&&nt[ot].on.push({events:tt.clear,update:"null"})}return nt},signals:(et,tt,nt)=>{function rt(ot,st){ot!==-1&&nt[ot].on&&nt[ot].on.push({events:tt.clear,update:st})}if(tt.type==="interval")for(const ot of tt.project.items){const st=nt.findIndex(ut=>ut.name===ot.signals.visual);if(rt(st,"[0, 0]"),st===-1){const ut=nt.findIndex(ct=>ct.name===ot.signals.data);rt(ut,"null")}}else{let ot=nt.findIndex(st=>st.name===tt.name+TUPLE);rt(ot,"null"),toggle.defined(tt)&&(ot=nt.findIndex(st=>st.name===tt.name+TOGGLE),rt(ot,"false"))}return nt}},legendBindings={defined:et=>{const tt=et.resolve==="global"&&et.bind&&isLegendBinding(et.bind),nt=et.project.items.length===1&&et.project.items[0].field!==SELECTION_ID;return tt&&!nt&&warn(LEGEND_BINDINGS_MUST_HAVE_PROJECTION),tt&&nt},parse:(et,tt,nt)=>{var rt;const ot=duplicate(nt);if(ot.select=isString(ot.select)?{type:ot.select,toggle:tt.toggle}:Object.assign(Object.assign({},ot.select),{toggle:tt.toggle}),disableDirectManipulation(tt,ot),isObject(nt.select)&&(nt.select.on||nt.select.clear)){const ct='event.item && indexof(event.item.mark.role, "legend") < 0';for(const ft of tt.events)ft.filter=array$5((rt=ft.filter)!==null&&rt!==void 0?rt:[]),ft.filter.includes(ct)||ft.filter.push(ct)}const st=isLegendStreamBinding(tt.bind)?tt.bind.legend:"click",ut=isString(st)?eventSelector(st,"view"):array$5(st);tt.bind={legend:{merge:ut}}},topLevelSignals:(et,tt,nt)=>{const rt=tt.name,ot=isLegendStreamBinding(tt.bind)&&tt.bind.legend,st=ut=>ct=>{const ft=duplicate(ct);return ft.markname=ut,ft};for(const ut of tt.project.items){if(!ut.hasLegend)continue;const ct=`${varName(ut.field)}_legend`,ft=`${rt}_${ct}`;if(nt.filter(ht=>ht.name===ft).length===0){const ht=ot.merge.map(st(`${ct}_symbols`)).concat(ot.merge.map(st(`${ct}_labels`))).concat(ot.merge.map(st(`${ct}_entries`)));nt.unshift(Object.assign(Object.assign({name:ft},tt.init?{}:{value:null}),{on:[{events:ht,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:ot.merge,update:`!event.item || !datum ? null : ${ft}`,force:!0}]}))}}return nt},signals:(et,tt,nt)=>{const rt=tt.name,ot=tt.project,st=nt.find(yt=>yt.name===rt+TUPLE),ut=rt+TUPLE_FIELDS,ct=ot.items.filter(yt=>yt.hasLegend).map(yt=>varName(`${rt}_${varName(yt.field)}_legend`)),pt=`${ct.map(yt=>`${yt} !== null`).join(" && ")} ? {fields: ${ut}, values: [${ct.join(", ")}]} : null`;tt.events&&ct.length>0?st.on.push({events:ct.map(yt=>({signal:yt})),update:pt}):ct.length>0&&(st.update=pt,delete st.value,delete st.on);const ht=nt.find(yt=>yt.name===rt+TOGGLE),mt=isLegendStreamBinding(tt.bind)&&tt.bind.legend;return ht&&(tt.events?ht.on.push(Object.assign(Object.assign({},ht.on[0]),{events:mt})):ht.on[0].events=mt),nt}};function parseInteractiveLegend(et,tt,nt){var rt,ot,st,ut;const ct=(rt=et.fieldDef(tt))===null||rt===void 0?void 0:rt.field;for(const ft of vals((ot=et.component.selection)!==null&&ot!==void 0?ot:{})){const pt=(st=ft.project.hasField[ct])!==null&&st!==void 0?st:ft.project.hasChannel[tt];if(pt&&legendBindings.defined(ft)){const ht=(ut=nt.get("selections"))!==null&&ut!==void 0?ut:[];ht.push(ft.name),nt.set("selections",ht,!1),pt.hasLegend=!0}}}const ANCHOR$1="_translate_anchor",DELTA$1="_translate_delta",translate={defined:et=>et.type==="interval"&&et.translate,signals:(et,tt,nt)=>{const rt=tt.name,ot=scaleBindings.defined(tt),st=rt+ANCHOR$1,{x:ut,y:ct}=tt.project.hasChannel;let ft=eventSelector(tt.translate,"scope");return ot||(ft=ft.map(pt=>(pt.between[0].markname=rt+BRUSH,pt))),nt.push({name:st,value:{},on:[{events:ft.map(pt=>pt.between[0]),update:"{x: x(unit), y: y(unit)"+(ut!==void 0?`, extent_x: ${ot?domain(et,X):`slice(${ut.signals.visual})`}`:"")+(ct!==void 0?`, extent_y: ${ot?domain(et,Y):`slice(${ct.signals.visual})`}`:"")+"}"}]},{name:rt+DELTA$1,value:{},on:[{events:ft,update:`{x: ${st}.x - x(unit), y: ${st}.y - y(unit)}`}]}),ut!==void 0&&onDelta$1(et,tt,ut,"width",nt),ct!==void 0&&onDelta$1(et,tt,ct,"height",nt),nt}};function onDelta$1(et,tt,nt,rt,ot){var st,ut;const ct=tt.name,ft=ct+ANCHOR$1,pt=ct+DELTA$1,ht=nt.channel,mt=scaleBindings.defined(tt),yt=ot.filter(kt=>kt.name===nt.signals[mt?"data":"visual"])[0],vt=et.getSizeSignalRef(rt).signal,Tt=et.getScaleComponent(ht),Et=Tt.get("type"),xt=Tt.get("reverse"),At=mt?ht===X?xt?"":"-":xt?"-":"":"",Ct=`${ft}.extent_${ht}`,$t=`${At}${pt}.${ht} / ${mt?`${vt}`:`span(${Ct})`}`,Ot=mt?Et==="log"?"panLog":Et==="symlog"?"panSymlog":Et==="pow"?"panPow":"panLinear":"panLinear",Rt=mt?Et==="pow"?`, ${(st=Tt.get("exponent"))!==null&&st!==void 0?st:1}`:Et==="symlog"?`, ${(ut=Tt.get("constant"))!==null&&ut!==void 0?ut:1}`:"":"",It=`${Ot}(${Ct}, ${$t}${Rt})`;yt.on.push({events:{signal:pt},update:mt?It:`clampRange(${It}, 0, ${vt})`})}const ANCHOR="_zoom_anchor",DELTA="_zoom_delta",zoom={defined:et=>et.type==="interval"&&et.zoom,signals:(et,tt,nt)=>{const rt=tt.name,ot=scaleBindings.defined(tt),st=rt+DELTA,{x:ut,y:ct}=tt.project.hasChannel,ft=$(et.scaleName(X)),pt=$(et.scaleName(Y));let ht=eventSelector(tt.zoom,"scope");return ot||(ht=ht.map(mt=>(mt.markname=rt+BRUSH,mt))),nt.push({name:rt+ANCHOR,on:[{events:ht,update:ot?"{"+[ft?`x: invert(${ft}, x(unit))`:"",pt?`y: invert(${pt}, y(unit))`:""].filter(mt=>!!mt).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:st,on:[{events:ht,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),ut!==void 0&&onDelta(et,tt,ut,"width",nt),ct!==void 0&&onDelta(et,tt,ct,"height",nt),nt}};function onDelta(et,tt,nt,rt,ot){var st,ut;const ct=tt.name,ft=nt.channel,pt=scaleBindings.defined(tt),ht=ot.filter(Ot=>Ot.name===nt.signals[pt?"data":"visual"])[0],mt=et.getSizeSignalRef(rt).signal,yt=et.getScaleComponent(ft),vt=yt.get("type"),Tt=pt?domain(et,ft):ht.name,Et=ct+DELTA,xt=`${ct}${ANCHOR}.${ft}`,At=pt?vt==="log"?"zoomLog":vt==="symlog"?"zoomSymlog":vt==="pow"?"zoomPow":"zoomLinear":"zoomLinear",Ct=pt?vt==="pow"?`, ${(st=yt.get("exponent"))!==null&&st!==void 0?st:1}`:vt==="symlog"?`, ${(ut=yt.get("constant"))!==null&&ut!==void 0?ut:1}`:"":"",$t=`${At}(${Tt}, ${xt}, ${Et}${Ct})`;ht.on.push({events:{signal:Et},update:pt?$t:`clampRange(${$t}, 0, ${mt})`})}const STORE="_store",TUPLE="_tuple",MODIFY="_modify",VL_SELECTION_RESOLVE="vlSelectionResolve",selectionCompilers=[point$1,interval,project,toggle,inputBindings,scaleBindings,legendBindings,clear,translate,zoom,nearest];function getFacetModel(et){let tt=et.parent;for(;tt&&!isFacetModel(tt);)tt=tt.parent;return tt}function unitName(et,{escape:tt}={escape:!0}){let nt=tt?$(et.name):et.name;const rt=getFacetModel(et);if(rt){const{facet:ot}=rt;for(const st of FACET_CHANNELS)ot[st]&&(nt+=` + '__facet_${st}_' + (facet[${$(rt.vgField(st))}])`)}return nt}function requiresSelectionId(et){var tt;return vals((tt=et.component.selection)!==null&&tt!==void 0?tt:{}).reduce((nt,rt)=>nt||rt.project.hasSelectionId,!1)}function disableDirectManipulation(et,tt){(isString(tt.select)||!tt.select.on)&&delete et.events,(isString(tt.select)||!tt.select.clear)&&delete et.clear,(isString(tt.select)||!tt.select.toggle)&&delete et.toggle}const RawCode="RawCode",Literal="Literal",Property="Property",Identifier="Identifier",ArrayExpression="ArrayExpression",BinaryExpression="BinaryExpression",CallExpression="CallExpression",ConditionalExpression="ConditionalExpression",LogicalExpression="LogicalExpression",MemberExpression="MemberExpression",ObjectExpression="ObjectExpression",UnaryExpression="UnaryExpression";function ASTNode(et){this.type=et}ASTNode.prototype.visit=function(et){let tt,nt,rt;if(et(this))return 1;for(tt=children(this),nt=0,rt=tt.length;nt<rt;++nt)if(tt[nt].visit(et))return 1};function children(et){switch(et.type){case ArrayExpression:return et.elements;case BinaryExpression:case LogicalExpression:return[et.left,et.right];case CallExpression:return[et.callee].concat(et.arguments);case ConditionalExpression:return[et.test,et.consequent,et.alternate];case MemberExpression:return[et.object,et.property];case ObjectExpression:return et.properties;case Property:return[et.key,et.value];case UnaryExpression:return[et.argument];case Identifier:case Literal:case RawCode:default:return[]}}var TokenName,source,index$2,length,lookahead,TokenBooleanLiteral=1,TokenEOF=2,TokenIdentifier=3,TokenKeyword=4,TokenNullLiteral=5,TokenNumericLiteral=6,TokenPunctuator=7,TokenStringLiteral=8,TokenRegularExpression=9;TokenName={};TokenName[TokenBooleanLiteral]="Boolean";TokenName[TokenEOF]="<end>";TokenName[TokenIdentifier]="Identifier";TokenName[TokenKeyword]="Keyword";TokenName[TokenNullLiteral]="Null";TokenName[TokenNumericLiteral]="Numeric";TokenName[TokenPunctuator]="Punctuator";TokenName[TokenStringLiteral]="String";TokenName[TokenRegularExpression]="RegularExpression";var SyntaxArrayExpression="ArrayExpression",SyntaxBinaryExpression="BinaryExpression",SyntaxCallExpression="CallExpression",SyntaxConditionalExpression="ConditionalExpression",SyntaxIdentifier="Identifier",SyntaxLiteral="Literal",SyntaxLogicalExpression="LogicalExpression",SyntaxMemberExpression="MemberExpression",SyntaxObjectExpression="ObjectExpression",SyntaxProperty="Property",SyntaxUnaryExpression="UnaryExpression",MessageUnexpectedToken="Unexpected token %0",MessageUnexpectedNumber="Unexpected number",MessageUnexpectedString="Unexpected string",MessageUnexpectedIdentifier="Unexpected identifier",MessageUnexpectedReserved="Unexpected reserved word",MessageUnexpectedEOS="Unexpected end of input",MessageInvalidRegExp="Invalid regular expression",MessageUnterminatedRegExp="Invalid regular expression: missing /",MessageStrictOctalLiteral="Octal literals are not allowed in strict mode.",MessageStrictDuplicateProperty="Duplicate data property in object literal not allowed in strict mode",ILLEGAL="ILLEGAL",DISABLED="Disabled.",RegexNonAsciiIdentifierStart=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),RegexNonAsciiIdentifierPart=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function assert(et,tt){if(!et)throw new Error("ASSERT: "+tt)}function isDecimalDigit(et){return et>=48&&et<=57}function isHexDigit(et){return"0123456789abcdefABCDEF".indexOf(et)>=0}function isOctalDigit(et){return"01234567".indexOf(et)>=0}function isWhiteSpace(et){return et===32||et===9||et===11||et===12||et===160||et>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(et)>=0}function isLineTerminator(et){return et===10||et===13||et===8232||et===8233}function isIdentifierStart(et){return et===36||et===95||et>=65&&et<=90||et>=97&&et<=122||et===92||et>=128&&RegexNonAsciiIdentifierStart.test(String.fromCharCode(et))}function isIdentifierPart(et){return et===36||et===95||et>=65&&et<=90||et>=97&&et<=122||et>=48&&et<=57||et===92||et>=128&&RegexNonAsciiIdentifierPart.test(String.fromCharCode(et))}const keywords$1={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function skipComment(){for(;index$2<length;){const et=source.charCodeAt(index$2);if(isWhiteSpace(et)||isLineTerminator(et))++index$2;else break}}function scanHexEscape(et){var tt,nt,rt,ot=0;for(nt=et==="u"?4:2,tt=0;tt<nt;++tt)index$2<length&&isHexDigit(source[index$2])?(rt=source[index$2++],ot=ot*16+"0123456789abcdef".indexOf(rt.toLowerCase())):throwError({},MessageUnexpectedToken,ILLEGAL);return String.fromCharCode(ot)}function scanUnicodeCodePointEscape(){var et,tt,nt,rt;for(et=source[index$2],tt=0,et==="}"&&throwError({},MessageUnexpectedToken,ILLEGAL);index$2<length&&(et=source[index$2++],!!isHexDigit(et));)tt=tt*16+"0123456789abcdef".indexOf(et.toLowerCase());return(tt>1114111||et!=="}")&&throwError({},MessageUnexpectedToken,ILLEGAL),tt<=65535?String.fromCharCode(tt):(nt=(tt-65536>>10)+55296,rt=(tt-65536&1023)+56320,String.fromCharCode(nt,rt))}function getEscapedIdentifier(){var et,tt;for(et=source.charCodeAt(index$2++),tt=String.fromCharCode(et),et===92&&(source.charCodeAt(index$2)!==117&&throwError({},MessageUnexpectedToken,ILLEGAL),++index$2,et=scanHexEscape("u"),(!et||et==="\\"||!isIdentifierStart(et.charCodeAt(0)))&&throwError({},MessageUnexpectedToken,ILLEGAL),tt=et);index$2<length&&(et=source.charCodeAt(index$2),!!isIdentifierPart(et));)++index$2,tt+=String.fromCharCode(et),et===92&&(tt=tt.substr(0,tt.length-1),source.charCodeAt(index$2)!==117&&throwError({},MessageUnexpectedToken,ILLEGAL),++index$2,et=scanHexEscape("u"),(!et||et==="\\"||!isIdentifierPart(et.charCodeAt(0)))&&throwError({},MessageUnexpectedToken,ILLEGAL),tt+=et);return tt}function getIdentifier(){var et,tt;for(et=index$2++;index$2<length;){if(tt=source.charCodeAt(index$2),tt===92)return index$2=et,getEscapedIdentifier();if(isIdentifierPart(tt))++index$2;else break}return source.slice(et,index$2)}function scanIdentifier(){var et,tt,nt;return et=index$2,tt=source.charCodeAt(index$2)===92?getEscapedIdentifier():getIdentifier(),tt.length===1?nt=TokenIdentifier:keywords$1.hasOwnProperty(tt)?nt=TokenKeyword:tt==="null"?nt=TokenNullLiteral:tt==="true"||tt==="false"?nt=TokenBooleanLiteral:nt=TokenIdentifier,{type:nt,value:tt,start:et,end:index$2}}function scanPunctuator(){var et=index$2,tt=source.charCodeAt(index$2),nt,rt=source[index$2],ot,st,ut;switch(tt){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++index$2,{type:TokenPunctuator,value:String.fromCharCode(tt),start:et,end:index$2};default:if(nt=source.charCodeAt(index$2+1),nt===61)switch(tt){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return index$2+=2,{type:TokenPunctuator,value:String.fromCharCode(tt)+String.fromCharCode(nt),start:et,end:index$2};case 33:case 61:return index$2+=2,source.charCodeAt(index$2)===61&&++index$2,{type:TokenPunctuator,value:source.slice(et,index$2),start:et,end:index$2}}}if(ut=source.substr(index$2,4),ut===">>>=")return index$2+=4,{type:TokenPunctuator,value:ut,start:et,end:index$2};if(st=ut.substr(0,3),st===">>>"||st==="<<="||st===">>=")return index$2+=3,{type:TokenPunctuator,value:st,start:et,end:index$2};if(ot=st.substr(0,2),rt===ot[1]&&"+-<>&|".indexOf(rt)>=0||ot==="=>")return index$2+=2,{type:TokenPunctuator,value:ot,start:et,end:index$2};if(ot==="//"&&throwError({},MessageUnexpectedToken,ILLEGAL),"<>=!+-*%&|^/".indexOf(rt)>=0)return++index$2,{type:TokenPunctuator,value:rt,start:et,end:index$2};throwError({},MessageUnexpectedToken,ILLEGAL)}function scanHexLiteral(et){let tt="";for(;index$2<length&&isHexDigit(source[index$2]);)tt+=source[index$2++];return tt.length===0&&throwError({},MessageUnexpectedToken,ILLEGAL),isIdentifierStart(source.charCodeAt(index$2))&&throwError({},MessageUnexpectedToken,ILLEGAL),{type:TokenNumericLiteral,value:parseInt("0x"+tt,16),start:et,end:index$2}}function scanOctalLiteral(et){let tt="0"+source[index$2++];for(;index$2<length&&isOctalDigit(source[index$2]);)tt+=source[index$2++];return(isIdentifierStart(source.charCodeAt(index$2))||isDecimalDigit(source.charCodeAt(index$2)))&&throwError({},MessageUnexpectedToken,ILLEGAL),{type:TokenNumericLiteral,value:parseInt(tt,8),octal:!0,start:et,end:index$2}}function scanNumericLiteral(){var et,tt,nt;if(nt=source[index$2],assert(isDecimalDigit(nt.charCodeAt(0))||nt===".","Numeric literal must start with a decimal digit or a decimal point"),tt=index$2,et="",nt!=="."){if(et=source[index$2++],nt=source[index$2],et==="0"){if(nt==="x"||nt==="X")return++index$2,scanHexLiteral(tt);if(isOctalDigit(nt))return scanOctalLiteral(tt);nt&&isDecimalDigit(nt.charCodeAt(0))&&throwError({},MessageUnexpectedToken,ILLEGAL)}for(;isDecimalDigit(source.charCodeAt(index$2));)et+=source[index$2++];nt=source[index$2]}if(nt==="."){for(et+=source[index$2++];isDecimalDigit(source.charCodeAt(index$2));)et+=source[index$2++];nt=source[index$2]}if(nt==="e"||nt==="E")if(et+=source[index$2++],nt=source[index$2],(nt==="+"||nt==="-")&&(et+=source[index$2++]),isDecimalDigit(source.charCodeAt(index$2)))for(;isDecimalDigit(source.charCodeAt(index$2));)et+=source[index$2++];else throwError({},MessageUnexpectedToken,ILLEGAL);return isIdentifierStart(source.charCodeAt(index$2))&&throwError({},MessageUnexpectedToken,ILLEGAL),{type:TokenNumericLiteral,value:parseFloat(et),start:tt,end:index$2}}function scanStringLiteral(){var et="",tt,nt,rt,ot,st=!1;for(tt=source[index$2],assert(tt==="'"||tt==='"',"String literal must starts with a quote"),nt=index$2,++index$2;index$2<length;)if(rt=source[index$2++],rt===tt){tt="";break}else if(rt==="\\")if(rt=source[index$2++],!rt||!isLineTerminator(rt.charCodeAt(0)))switch(rt){case"u":case"x":source[index$2]==="{"?(++index$2,et+=scanUnicodeCodePointEscape()):et+=scanHexEscape(rt);break;case"n":et+=`
`;break;case"r":et+="\r";break;case"t":et+="	";break;case"b":et+="\b";break;case"f":et+="\f";break;case"v":et+="\v";break;default:isOctalDigit(rt)?(ot="01234567".indexOf(rt),ot!==0&&(st=!0),index$2<length&&isOctalDigit(source[index$2])&&(st=!0,ot=ot*8+"01234567".indexOf(source[index$2++]),"0123".indexOf(rt)>=0&&index$2<length&&isOctalDigit(source[index$2])&&(ot=ot*8+"01234567".indexOf(source[index$2++]))),et+=String.fromCharCode(ot)):et+=rt;break}else rt==="\r"&&source[index$2]===`
`&&++index$2;else{if(isLineTerminator(rt.charCodeAt(0)))break;et+=rt}return tt!==""&&throwError({},MessageUnexpectedToken,ILLEGAL),{type:TokenStringLiteral,value:et,octal:st,start:nt,end:index$2}}function testRegExp(et,tt){let nt=et;tt.indexOf("u")>=0&&(nt=nt.replace(/\\u\{([0-9a-fA-F]+)\}/g,(rt,ot)=>{if(parseInt(ot,16)<=1114111)return"x";throwError({},MessageInvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(nt)}catch{throwError({},MessageInvalidRegExp)}try{return new RegExp(et,tt)}catch{return null}}function scanRegExpBody(){var et,tt,nt,rt,ot;for(et=source[index$2],assert(et==="/","Regular expression literal must start with a slash"),tt=source[index$2++],nt=!1,rt=!1;index$2<length;)if(et=source[index$2++],tt+=et,et==="\\")et=source[index$2++],isLineTerminator(et.charCodeAt(0))&&throwError({},MessageUnterminatedRegExp),tt+=et;else if(isLineTerminator(et.charCodeAt(0)))throwError({},MessageUnterminatedRegExp);else if(nt)et==="]"&&(nt=!1);else if(et==="/"){rt=!0;break}else et==="["&&(nt=!0);return rt||throwError({},MessageUnterminatedRegExp),ot=tt.substr(1,tt.length-2),{value:ot,literal:tt}}function scanRegExpFlags(){var et,tt,nt;for(tt="",nt="";index$2<length&&(et=source[index$2],!!isIdentifierPart(et.charCodeAt(0)));)++index$2,et==="\\"&&index$2<length?throwError({},MessageUnexpectedToken,ILLEGAL):(nt+=et,tt+=et);return nt.search(/[^gimuy]/g)>=0&&throwError({},MessageInvalidRegExp,nt),{value:nt,literal:tt}}function scanRegExp(){var et,tt,nt,rt;return lookahead=null,skipComment(),et=index$2,tt=scanRegExpBody(),nt=scanRegExpFlags(),rt=testRegExp(tt.value,nt.value),{literal:tt.literal+nt.literal,value:rt,regex:{pattern:tt.value,flags:nt.value},start:et,end:index$2}}function isIdentifierName(et){return et.type===TokenIdentifier||et.type===TokenKeyword||et.type===TokenBooleanLiteral||et.type===TokenNullLiteral}function advance(){if(skipComment(),index$2>=length)return{type:TokenEOF,start:index$2,end:index$2};const et=source.charCodeAt(index$2);return isIdentifierStart(et)?scanIdentifier():et===40||et===41||et===59?scanPunctuator():et===39||et===34?scanStringLiteral():et===46?isDecimalDigit(source.charCodeAt(index$2+1))?scanNumericLiteral():scanPunctuator():isDecimalDigit(et)?scanNumericLiteral():scanPunctuator()}function lex(){const et=lookahead;return index$2=et.end,lookahead=advance(),index$2=et.end,et}function peek(){const et=index$2;lookahead=advance(),index$2=et}function finishArrayExpression(et){const tt=new ASTNode(SyntaxArrayExpression);return tt.elements=et,tt}function finishBinaryExpression(et,tt,nt){const rt=new ASTNode(et==="||"||et==="&&"?SyntaxLogicalExpression:SyntaxBinaryExpression);return rt.operator=et,rt.left=tt,rt.right=nt,rt}function finishCallExpression(et,tt){const nt=new ASTNode(SyntaxCallExpression);return nt.callee=et,nt.arguments=tt,nt}function finishConditionalExpression(et,tt,nt){const rt=new ASTNode(SyntaxConditionalExpression);return rt.test=et,rt.consequent=tt,rt.alternate=nt,rt}function finishIdentifier(et){const tt=new ASTNode(SyntaxIdentifier);return tt.name=et,tt}function finishLiteral(et){const tt=new ASTNode(SyntaxLiteral);return tt.value=et.value,tt.raw=source.slice(et.start,et.end),et.regex&&(tt.raw==="//"&&(tt.raw="/(?:)/"),tt.regex=et.regex),tt}function finishMemberExpression(et,tt,nt){const rt=new ASTNode(SyntaxMemberExpression);return rt.computed=et==="[",rt.object=tt,rt.property=nt,rt.computed||(nt.member=!0),rt}function finishObjectExpression(et){const tt=new ASTNode(SyntaxObjectExpression);return tt.properties=et,tt}function finishProperty(et,tt,nt){const rt=new ASTNode(SyntaxProperty);return rt.key=tt,rt.value=nt,rt.kind=et,rt}function finishUnaryExpression(et,tt){const nt=new ASTNode(SyntaxUnaryExpression);return nt.operator=et,nt.argument=tt,nt.prefix=!0,nt}function throwError(et,tt){var nt,rt=Array.prototype.slice.call(arguments,2),ot=tt.replace(/%(\d)/g,(st,ut)=>(assert(ut<rt.length,"Message reference must be in range"),rt[ut]));throw nt=new Error(ot),nt.index=index$2,nt.description=ot,nt}function throwUnexpected(et){et.type===TokenEOF&&throwError(et,MessageUnexpectedEOS),et.type===TokenNumericLiteral&&throwError(et,MessageUnexpectedNumber),et.type===TokenStringLiteral&&throwError(et,MessageUnexpectedString),et.type===TokenIdentifier&&throwError(et,MessageUnexpectedIdentifier),et.type===TokenKeyword&&throwError(et,MessageUnexpectedReserved),throwError(et,MessageUnexpectedToken,et.value)}function expect(et){const tt=lex();(tt.type!==TokenPunctuator||tt.value!==et)&&throwUnexpected(tt)}function match$2(et){return lookahead.type===TokenPunctuator&&lookahead.value===et}function matchKeyword(et){return lookahead.type===TokenKeyword&&lookahead.value===et}function parseArrayInitialiser(){const et=[];for(index$2=lookahead.start,expect("[");!match$2("]");)match$2(",")?(lex(),et.push(null)):(et.push(parseConditionalExpression()),match$2("]")||expect(","));return lex(),finishArrayExpression(et)}function parseObjectPropertyKey(){index$2=lookahead.start;const et=lex();return et.type===TokenStringLiteral||et.type===TokenNumericLiteral?(et.octal&&throwError(et,MessageStrictOctalLiteral),finishLiteral(et)):finishIdentifier(et.value)}function parseObjectProperty(){var et,tt,nt,rt;if(index$2=lookahead.start,et=lookahead,et.type===TokenIdentifier)return nt=parseObjectPropertyKey(),expect(":"),rt=parseConditionalExpression(),finishProperty("init",nt,rt);if(et.type===TokenEOF||et.type===TokenPunctuator)throwUnexpected(et);else return tt=parseObjectPropertyKey(),expect(":"),rt=parseConditionalExpression(),finishProperty("init",tt,rt)}function parseObjectInitialiser(){var et=[],tt,nt,rt,ot={},st=String;for(index$2=lookahead.start,expect("{");!match$2("}");)tt=parseObjectProperty(),tt.key.type===SyntaxIdentifier?nt=tt.key.name:nt=st(tt.key.value),rt="$"+nt,Object.prototype.hasOwnProperty.call(ot,rt)?throwError({},MessageStrictDuplicateProperty):ot[rt]=!0,et.push(tt),match$2("}")||expect(",");return expect("}"),finishObjectExpression(et)}function parseGroupExpression(){expect("(");const et=parseExpression$1();return expect(")"),et}const legalKeywords={if:1};function parsePrimaryExpression(){var et,tt,nt;if(match$2("("))return parseGroupExpression();if(match$2("["))return parseArrayInitialiser();if(match$2("{"))return parseObjectInitialiser();if(et=lookahead.type,index$2=lookahead.start,et===TokenIdentifier||legalKeywords[lookahead.value])nt=finishIdentifier(lex().value);else if(et===TokenStringLiteral||et===TokenNumericLiteral)lookahead.octal&&throwError(lookahead,MessageStrictOctalLiteral),nt=finishLiteral(lex());else{if(et===TokenKeyword)throw new Error(DISABLED);et===TokenBooleanLiteral?(tt=lex(),tt.value=tt.value==="true",nt=finishLiteral(tt)):et===TokenNullLiteral?(tt=lex(),tt.value=null,nt=finishLiteral(tt)):match$2("/")||match$2("/=")?(nt=finishLiteral(scanRegExp()),peek()):throwUnexpected(lex())}return nt}function parseArguments(){const et=[];if(expect("("),!match$2(")"))for(;index$2<length&&(et.push(parseConditionalExpression()),!match$2(")"));)expect(",");return expect(")"),et}function parseNonComputedProperty(){index$2=lookahead.start;const et=lex();return isIdentifierName(et)||throwUnexpected(et),finishIdentifier(et.value)}function parseNonComputedMember(){return expect("."),parseNonComputedProperty()}function parseComputedMember(){expect("[");const et=parseExpression$1();return expect("]"),et}function parseLeftHandSideExpressionAllowCall(){var et,tt,nt;for(et=parsePrimaryExpression();;)if(match$2("."))nt=parseNonComputedMember(),et=finishMemberExpression(".",et,nt);else if(match$2("("))tt=parseArguments(),et=finishCallExpression(et,tt);else if(match$2("["))nt=parseComputedMember(),et=finishMemberExpression("[",et,nt);else break;return et}function parsePostfixExpression(){const et=parseLeftHandSideExpressionAllowCall();if(lookahead.type===TokenPunctuator&&(match$2("++")||match$2("--")))throw new Error(DISABLED);return et}function parseUnaryExpression(){var et,tt;if(lookahead.type!==TokenPunctuator&&lookahead.type!==TokenKeyword)tt=parsePostfixExpression();else{if(match$2("++")||match$2("--"))throw new Error(DISABLED);if(match$2("+")||match$2("-")||match$2("~")||match$2("!"))et=lex(),tt=parseUnaryExpression(),tt=finishUnaryExpression(et.value,tt);else{if(matchKeyword("delete")||matchKeyword("void")||matchKeyword("typeof"))throw new Error(DISABLED);tt=parsePostfixExpression()}}return tt}function binaryPrecedence(et){let tt=0;if(et.type!==TokenPunctuator&&et.type!==TokenKeyword)return 0;switch(et.value){case"||":tt=1;break;case"&&":tt=2;break;case"|":tt=3;break;case"^":tt=4;break;case"&":tt=5;break;case"==":case"!=":case"===":case"!==":tt=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":tt=7;break;case"<<":case">>":case">>>":tt=8;break;case"+":case"-":tt=9;break;case"*":case"/":case"%":tt=11;break}return tt}function parseBinaryExpression(){var et,tt,nt,rt,ot,st,ut,ct,ft,pt;if(et=lookahead,ft=parseUnaryExpression(),rt=lookahead,ot=binaryPrecedence(rt),ot===0)return ft;for(rt.prec=ot,lex(),tt=[et,lookahead],ut=parseUnaryExpression(),st=[ft,rt,ut];(ot=binaryPrecedence(lookahead))>0;){for(;st.length>2&&ot<=st[st.length-2].prec;)ut=st.pop(),ct=st.pop().value,ft=st.pop(),tt.pop(),nt=finishBinaryExpression(ct,ft,ut),st.push(nt);rt=lex(),rt.prec=ot,st.push(rt),tt.push(lookahead),nt=parseUnaryExpression(),st.push(nt)}for(pt=st.length-1,nt=st[pt],tt.pop();pt>1;)tt.pop(),nt=finishBinaryExpression(st[pt-1].value,st[pt-2],nt),pt-=2;return nt}function parseConditionalExpression(){var et,tt,nt;return et=parseBinaryExpression(),match$2("?")&&(lex(),tt=parseConditionalExpression(),expect(":"),nt=parseConditionalExpression(),et=finishConditionalExpression(et,tt,nt)),et}function parseExpression$1(){const et=parseConditionalExpression();if(match$2(","))throw new Error(DISABLED);return et}function parser(et){source=et,index$2=0,length=source.length,lookahead=null,peek();const tt=parseExpression$1();if(lookahead.type!==TokenEOF)throw new Error("Unexpect token after expression.");return tt}function getName(et){const tt=[];return et.type==="Identifier"?[et.name]:et.type==="Literal"?[et.value]:(et.type==="MemberExpression"&&(tt.push(...getName(et.object)),tt.push(...getName(et.property))),tt)}function startsWithDatum(et){return et.object.type==="MemberExpression"?startsWithDatum(et.object):et.object.name==="datum"}function getDependentFields(et){const tt=parser(et),nt=new Set;return tt.visit(rt=>{rt.type==="MemberExpression"&&startsWithDatum(rt)&&nt.add(getName(rt).slice(1).join("."))}),nt}class FilterNode extends DataFlowNode{constructor(tt,nt,rt){super(tt),this.model=nt,this.filter=rt,this.expr=expression(this.model,this.filter,this),this._dependentFields=getDependentFields(this.expr)}clone(){return new FilterNode(null,this.model,duplicate(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function parseUnitSelection(et,tt){var nt;const rt={},ot=et.config.selection;if(!tt||!tt.length)return rt;for(const st of tt){const ut=varName(st.name),ct=st.select,ft=isString(ct)?ct:ct.type,pt=isObject(ct)?duplicate(ct):{type:ft},ht=ot[ft];for(const yt in ht)yt==="fields"||yt==="encodings"||(yt==="mark"&&(pt[yt]=Object.assign(Object.assign({},ht[yt]),pt[yt])),(pt[yt]===void 0||pt[yt]===!0)&&(pt[yt]=(nt=ht[yt])!==null&&nt!==void 0?nt:pt[yt]));const mt=rt[ut]=Object.assign(Object.assign({},pt),{name:ut,type:ft,init:st.value,bind:st.bind,events:isString(pt.on)?eventSelector(pt.on,"scope"):array$5(duplicate(pt.on))});for(const yt of selectionCompilers)yt.defined(mt)&&yt.parse&&yt.parse(et,mt,st)}return rt}function parseSelectionPredicate(et,tt,nt,rt="datum"){const ot=isString(tt)?tt:tt.param,st=varName(ot),ut=$(st+STORE);let ct;try{ct=et.getSelectionComponent(st,ot)}catch{return`!!${st}`}if(ct.project.timeUnit){const yt=nt??et.component.data.raw,vt=ct.project.timeUnit.clone();yt.parent?vt.insertAsParentOf(yt):yt.parent=vt}const ft=ct.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",pt=ct.resolve==="global"?")":`, ${$(ct.resolve)})`,ht=`${ft}${ut}, ${rt}${pt}`,mt=`length(data(${ut}))`;return tt.empty===!1?`${mt} && ${ht}`:`!${mt} || ${ht}`}function parseSelectionExtent(et,tt,nt){const rt=varName(tt),ot=nt.encoding;let st=nt.field,ut;try{ut=et.getSelectionComponent(rt,tt)}catch{return rt}if(!ot&&!st)st=ut.project.items[0].field,ut.project.items.length>1&&warn(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${$(st)}.`);else if(ot&&!st){const ct=ut.project.items.filter(ft=>ft.channel===ot);!ct.length||ct.length>1?(st=ut.project.items[0].field,warn((ct.length?"Multiple ":"No ")+`matching ${$(ot)} encoding found for selection ${$(nt.param)}. Using "field": ${$(st)}.`)):st=ct[0].field}return`${ut.name}[${$(replacePathInField(st))}]`}function materializeSelections(et,tt){var nt;for(const[rt,ot]of entries$1((nt=et.component.selection)!==null&&nt!==void 0?nt:{})){const st=et.getName(`lookup_${rt}`);et.component.data.outputNodes[st]=ot.materialized=new OutputNode(new FilterNode(tt,et,{param:rt}),st,DataSourceType.Lookup,et.component.data.outputNodeRefCounts)}}function expression(et,tt,nt){return logicalExpr(tt,rt=>isString(rt)?rt:isSelectionPredicate(rt)?parseSelectionPredicate(et,rt,nt):fieldFilterExpression(rt))}var __rest$b=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function assembleTitle(et,tt){if(!!et)return isArray(et)&&!isText(et)?et.map(nt=>defaultTitle(nt,tt)).join(", "):et}function setAxisEncode(et,tt,nt,rt){var ot,st,ut,ct,ft;(ot=et.encode)!==null&&ot!==void 0||(et.encode={}),(st=(ct=et.encode)[tt])!==null&&st!==void 0||(ct[tt]={}),(ut=(ft=et.encode[tt]).update)!==null&&ut!==void 0||(ft.update={}),et.encode[tt].update[nt]=rt}function assembleAxis(et,tt,nt,rt={header:!1}){var ot,st;const ut=et.combine(),{disable:ct,orient:ft,scale:pt,labelExpr:ht,title:mt,zindex:yt}=ut,vt=__rest$b(ut,["disable","orient","scale","labelExpr","title","zindex"]);if(!ct){for(const Tt in vt){const Et=AXIS_PROPERTY_TYPE[Tt],xt=vt[Tt];if(Et&&Et!==tt&&Et!=="both")delete vt[Tt];else if(isConditionalAxisValue(xt)){const{condition:At}=xt,Ct=__rest$b(xt,["condition"]),$t=array$5(At),Ot=CONDITIONAL_AXIS_PROP_INDEX[Tt];if(Ot){const{vgProp:Rt,part:It}=Ot,kt=[...$t.map(Mt=>{const{test:Ft}=Mt,zt=__rest$b(Mt,["test"]);return Object.assign({test:expression(null,Ft)},zt)}),Ct];setAxisEncode(vt,It,Rt,kt),delete vt[Tt]}else if(Ot===null){const Rt={signal:$t.map(It=>{const{test:kt}=It,Mt=__rest$b(It,["test"]);return`${expression(null,kt)} ? ${exprFromValueRefOrSignalRef(Mt)} : `}).join("")+exprFromValueRefOrSignalRef(Ct)};vt[Tt]=Rt}}else if(isSignalRef(xt)){const At=CONDITIONAL_AXIS_PROP_INDEX[Tt];if(At){const{vgProp:Ct,part:$t}=At;setAxisEncode(vt,$t,Ct,xt),delete vt[Tt]}}contains(["labelAlign","labelBaseline"],Tt)&&vt[Tt]===null&&delete vt[Tt]}if(tt==="grid"){if(!vt.grid)return;if(vt.encode){const{grid:Tt}=vt.encode;vt.encode=Object.assign({},Tt?{grid:Tt}:{}),isEmpty$1(vt.encode)&&delete vt.encode}return Object.assign(Object.assign({scale:pt,orient:ft},vt),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:getFirstDefined(yt,0)})}else{if(!rt.header&&et.mainExtracted)return;if(ht!==void 0){let Et=ht;((st=(ot=vt.encode)===null||ot===void 0?void 0:ot.labels)===null||st===void 0?void 0:st.update)&&isSignalRef(vt.encode.labels.update.text)&&(Et=replaceAll(ht,"datum.label",vt.encode.labels.update.text.signal)),setAxisEncode(vt,"labels","text",{signal:Et})}if(vt.labelAlign===null&&delete vt.labelAlign,vt.encode){for(const Et of AXIS_PARTS)et.hasAxisPart(Et)||delete vt.encode[Et];isEmpty$1(vt.encode)&&delete vt.encode}const Tt=assembleTitle(mt,nt);return Object.assign(Object.assign(Object.assign(Object.assign({scale:pt,orient:ft,grid:!1},Tt?{title:Tt}:{}),vt),nt.aria===!1?{aria:!1}:{}),{zindex:getFirstDefined(yt,0)})}}}function assembleAxisSignals(et){const{axes:tt}=et.component,nt=[];for(const rt of POSITION_SCALE_CHANNELS)if(tt[rt]){for(const ot of tt[rt])if(!ot.get("disable")&&!ot.get("gridScale")){const st=rt==="x"?"height":"width",ut=et.getSizeSignalRef(st).signal;st!==ut&&nt.push({name:st,update:ut})}}return nt}function assembleAxes(et,tt){const{x:nt=[],y:rt=[]}=et;return[...nt.map(ot=>assembleAxis(ot,"grid",tt)),...rt.map(ot=>assembleAxis(ot,"grid",tt)),...nt.map(ot=>assembleAxis(ot,"main",tt)),...rt.map(ot=>assembleAxis(ot,"main",tt))].filter(ot=>ot)}function getAxisConfigFromConfigTypes(et,tt,nt,rt){return Object.assign.apply(null,[{},...et.map(ot=>{if(ot==="axisOrient"){const st=nt==="x"?"bottom":"left",ut=tt[nt==="x"?"axisBottom":"axisLeft"]||{},ct=tt[nt==="x"?"axisTop":"axisRight"]||{},ft=new Set([...keys$1(ut),...keys$1(ct)]),pt={};for(const ht of ft.values())pt[ht]={signal:`${rt.signal} === "${st}" ? ${signalOrStringValue(ut[ht])} : ${signalOrStringValue(ct[ht])}`};return pt}return tt[ot]})])}function getAxisConfigs(et,tt,nt,rt){const ot=tt==="band"?["axisDiscrete","axisBand"]:tt==="point"?["axisDiscrete","axisPoint"]:isQuantitative(tt)?["axisQuantitative"]:tt==="time"||tt==="utc"?["axisTemporal"]:[],st=et==="x"?"axisX":"axisY",ut=isSignalRef(nt)?"axisOrient":`axis${titleCase(nt)}`,ct=[...ot,...ot.map(pt=>st+pt.substr(4))],ft=["axis",ut,st];return{vlOnlyAxisConfig:getAxisConfigFromConfigTypes(ct,rt,et,nt),vgAxisConfig:getAxisConfigFromConfigTypes(ft,rt,et,nt),axisConfigStyle:getAxisConfigStyle([...ft,...ct],rt)}}function getAxisConfigStyle(et,tt){var nt;const rt=[{}];for(const ot of et){let st=(nt=tt[ot])===null||nt===void 0?void 0:nt.style;if(st){st=array$5(st);for(const ut of st)rt.push(tt.style[ut])}}return Object.assign.apply(null,rt)}function getAxisConfig(et,tt,nt,rt={}){var ot;const st=getStyleConfig(et,nt,tt);if(st!==void 0)return{configFrom:"style",configValue:st};for(const ut of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((ot=rt[ut])===null||ot===void 0?void 0:ot[et])!==void 0)return{configFrom:ut,configValue:rt[ut][et]};return{}}const axisRules={scale:({model:et,channel:tt})=>et.scaleName(tt),format:({fieldOrDatumDef:et,config:tt,axis:nt})=>{const{format:rt,formatType:ot}=nt;return guideFormat(et,et.type,rt,ot,tt,!0)},formatType:({axis:et,fieldOrDatumDef:tt,scaleType:nt})=>{const{formatType:rt}=et;return guideFormatType(rt,tt,nt)},grid:({fieldOrDatumDef:et,axis:tt,scaleType:nt})=>{var rt;return(rt=tt.grid)!==null&&rt!==void 0?rt:defaultGrid(nt,et)},gridScale:({model:et,channel:tt})=>gridScale(et,tt),labelAlign:({axis:et,labelAngle:tt,orient:nt,channel:rt})=>et.labelAlign||defaultLabelAlign(tt,nt,rt),labelAngle:({labelAngle:et})=>et,labelBaseline:({axis:et,labelAngle:tt,orient:nt,channel:rt})=>et.labelBaseline||defaultLabelBaseline(tt,nt,rt),labelFlush:({axis:et,fieldOrDatumDef:tt,channel:nt})=>{var rt;return(rt=et.labelFlush)!==null&&rt!==void 0?rt:defaultLabelFlush(tt.type,nt)},labelOverlap:({axis:et,fieldOrDatumDef:tt,scaleType:nt})=>{var rt;return(rt=et.labelOverlap)!==null&&rt!==void 0?rt:defaultLabelOverlap$1(tt.type,nt,isFieldDef(tt)&&!!tt.timeUnit,isFieldDef(tt)?tt.sort:void 0)},orient:({orient:et})=>et,tickCount:({channel:et,model:tt,axis:nt,fieldOrDatumDef:rt,scaleType:ot})=>{var st;const ut=et==="x"?"width":et==="y"?"height":void 0,ct=ut?tt.getSizeSignalRef(ut):void 0;return(st=nt.tickCount)!==null&&st!==void 0?st:defaultTickCount({fieldOrDatumDef:rt,scaleType:ot,size:ct,values:nt.values})},title:({axis:et,model:tt,channel:nt})=>{if(et.title!==void 0)return et.title;const rt=getFieldDefTitle(tt,nt);if(rt!==void 0)return rt;const ot=tt.typedFieldDef(nt),st=nt==="x"?"x2":"y2",ut=tt.fieldDef(st);return mergeTitleFieldDefs(ot?[toFieldDefBase(ot)]:[],isFieldDef(ut)?[toFieldDefBase(ut)]:[])},values:({axis:et,fieldOrDatumDef:tt})=>values$3(et,tt),zindex:({axis:et,fieldOrDatumDef:tt,mark:nt})=>{var rt;return(rt=et.zindex)!==null&&rt!==void 0?rt:defaultZindex(nt,tt)}};function defaultGrid(et,tt){return!hasDiscreteDomain(et)&&isFieldDef(tt)&&!isBinning(tt?.bin)&&!isBinned(tt?.bin)}function gridScale(et,tt){const nt=tt==="x"?"y":"x";if(et.getScaleComponent(nt))return et.scaleName(nt)}function getLabelAngle(et,tt,nt,rt,ot){const st=tt?.labelAngle;if(st!==void 0)return isSignalRef(st)?st:normalizeAngle(st);{const{configValue:ut}=getAxisConfig("labelAngle",rt,tt?.style,ot);return ut!==void 0?normalizeAngle(ut):nt===X&&contains([NOMINAL,ORDINAL],et.type)&&!(isFieldDef(et)&&et.timeUnit)?270:void 0}}function normalizeAngleExpr(et){return`(((${et.signal} % 360) + 360) % 360)`}function defaultLabelBaseline(et,tt,nt,rt){if(et!==void 0)if(nt==="x"){if(isSignalRef(et)){const ot=normalizeAngleExpr(et),st=isSignalRef(tt)?`(${tt.signal} === "top")`:tt==="top";return{signal:`(45 < ${ot} && ${ot} < 135) || (225 < ${ot} && ${ot} < 315) ? "middle" :(${ot} <= 45 || 315 <= ${ot}) === ${st} ? "bottom" : "top"`}}if(45<et&&et<135||225<et&&et<315)return"middle";if(isSignalRef(tt)){const ot=et<=45||315<=et?"===":"!==";return{signal:`${tt.signal} ${ot} "top" ? "bottom" : "top"`}}return(et<=45||315<=et)==(tt==="top")?"bottom":"top"}else{if(isSignalRef(et)){const ot=normalizeAngleExpr(et),st=isSignalRef(tt)?`(${tt.signal} === "left")`:tt==="left";return{signal:`${ot} <= 45 || 315 <= ${ot} || (135 <= ${ot} && ${ot} <= 225) ? ${rt?'"middle"':"null"} : (45 <= ${ot} && ${ot} <= 135) === ${st} ? "top" : "bottom"`}}if(et<=45||315<=et||135<=et&&et<=225)return rt?"middle":null;if(isSignalRef(tt)){const ot=45<=et&&et<=135?"===":"!==";return{signal:`${tt.signal} ${ot} "left" ? "top" : "bottom"`}}return(45<=et&&et<=135)==(tt==="left")?"top":"bottom"}}function defaultLabelAlign(et,tt,nt){if(et===void 0)return;const rt=nt==="x",ot=rt?0:90,st=rt?"bottom":"left";if(isSignalRef(et)){const ut=normalizeAngleExpr(et),ct=isSignalRef(tt)?`(${tt.signal} === "${st}")`:tt===st;return{signal:`(${ot?`(${ut} + 90)`:ut} % 180 === 0) ? ${rt?null:'"center"'} :(${ot} < ${ut} && ${ut} < ${180+ot}) === ${ct} ? "left" : "right"`}}if((et+ot)%180===0)return rt?null:"center";if(isSignalRef(tt)){const ut=ot<et&&et<180+ot?"===":"!==";return{signal:`${`${tt.signal} ${ut} "${st}"`} ? "left" : "right"`}}return(ot<et&&et<180+ot)==(tt===st)?"left":"right"}function defaultLabelFlush(et,tt){if(tt==="x"&&contains(["quantitative","temporal"],et))return!0}function defaultLabelOverlap$1(et,tt,nt,rt){if(nt&&!isObject(rt)||et!=="nominal"&&et!=="ordinal")return tt==="log"||tt==="symlog"?"greedy":!0}function defaultOrient(et){return et==="x"?"bottom":"left"}function defaultTickCount({fieldOrDatumDef:et,scaleType:tt,size:nt,values:rt}){var ot;if(!rt&&!hasDiscreteDomain(tt)&&tt!=="log"){if(isFieldDef(et)){if(isBinning(et.bin))return{signal:`ceil(${nt.signal}/10)`};if(et.timeUnit&&contains(["month","hours","day","quarter"],(ot=normalizeTimeUnit(et.timeUnit))===null||ot===void 0?void 0:ot.unit))return}return{signal:`ceil(${nt.signal}/40)`}}}function getFieldDefTitle(et,tt){const nt=tt==="x"?"x2":"y2",rt=et.fieldDef(tt),ot=et.fieldDef(nt),st=rt?rt.title:void 0,ut=ot?ot.title:void 0;if(st&&ut)return mergeTitle(st,ut);if(st)return st;if(ut)return ut;if(st!==void 0)return st;if(ut!==void 0)return ut}function values$3(et,tt){const nt=et.values;if(isArray(nt))return valueArray(tt,nt);if(isSignalRef(nt))return nt}function defaultZindex(et,tt){return et==="rect"&&isDiscrete(tt)?1:0}class CalculateNode extends DataFlowNode{constructor(tt,nt){super(tt),this.transform=nt,this._dependentFields=getDependentFields(this.transform.calculate)}clone(){return new CalculateNode(null,duplicate(this.transform))}static parseAllForSortIndex(tt,nt){return nt.forEachFieldDef((rt,ot)=>{if(!!isScaleFieldDef(rt)&&isSortArray(rt.sort)){const{field:st,timeUnit:ut}=rt,ct=rt.sort,ft=ct.map((pt,ht)=>`${fieldFilterExpression({field:st,timeUnit:ut,equal:pt})} ? ${ht} : `).join("")+ct.length;tt=new CalculateNode(tt,{calculate:ft,as:sortArrayIndexField(rt,ot,{forAs:!0})})}}),tt}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${hash(this.transform)}`}}function sortArrayIndexField(et,tt,nt){return vgField(et,Object.assign({prefix:tt,suffix:"sort_index"},nt??{}))}function getHeaderChannel(et,tt){return contains(["top","bottom"],tt)?"column":contains(["left","right"],tt)||et==="row"?"row":"column"}function getHeaderProperty(et,tt,nt,rt){const ot=rt==="row"?nt.headerRow:rt==="column"?nt.headerColumn:nt.headerFacet;return getFirstDefined((tt||{})[et],ot[et],nt.header[et])}function getHeaderProperties(et,tt,nt,rt){const ot={};for(const st of et){const ut=getHeaderProperty(st,tt||{},nt,rt);ut!==void 0&&(ot[st]=ut)}return ot}const HEADER_CHANNELS=["row","column"],HEADER_TYPES=["header","footer"];function assembleTitleGroup(et,tt){const nt=et.component.layoutHeaders[tt].title,rt=et.config?et.config:void 0,ot=et.component.layoutHeaders[tt].facetFieldDef?et.component.layoutHeaders[tt].facetFieldDef:void 0,{titleAnchor:st,titleAngle:ut,titleOrient:ct}=getHeaderProperties(["titleAnchor","titleAngle","titleOrient"],ot.header,rt,tt),ft=getHeaderChannel(tt,ct),pt=normalizeAngle(ut);return{name:`${tt}-title`,type:"group",role:`${ft}-title`,title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:nt},tt==="row"?{orient:"left"}:{}),{style:"guide-title"}),defaultHeaderGuideBaseline(pt,ft)),defaultHeaderGuideAlign(ft,pt,st)),assembleHeaderProperties(rt,ot,tt,HEADER_TITLE_PROPERTIES,HEADER_TITLE_PROPERTIES_MAP))}}function defaultHeaderGuideAlign(et,tt,nt="middle"){switch(nt){case"start":return{align:"left"};case"end":return{align:"right"}}const rt=defaultLabelAlign(tt,et==="row"?"left":"top",et==="row"?"y":"x");return rt?{align:rt}:{}}function defaultHeaderGuideBaseline(et,tt){const nt=defaultLabelBaseline(et,tt==="row"?"left":"top",tt==="row"?"y":"x",!0);return nt?{baseline:nt}:{}}function assembleHeaderGroups(et,tt){const nt=et.component.layoutHeaders[tt],rt=[];for(const ot of HEADER_TYPES)if(nt[ot])for(const st of nt[ot]){const ut=assembleHeaderGroup(et,tt,ot,nt,st);ut!=null&&rt.push(ut)}return rt}function getSort$1(et,tt){var nt;const{sort:rt}=et;return isSortField(rt)?{field:vgField(rt,{expr:"datum"}),order:(nt=rt.order)!==null&&nt!==void 0?nt:"ascending"}:isArray(rt)?{field:sortArrayIndexField(et,tt,{expr:"datum"}),order:"ascending"}:{field:vgField(et,{expr:"datum"}),order:rt??"ascending"}}function assembleLabelTitle(et,tt,nt){const{format:rt,formatType:ot,labelAngle:st,labelAnchor:ut,labelOrient:ct,labelExpr:ft}=getHeaderProperties(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],et.header,nt,tt),pt=formatSignalRef({fieldOrDatumDef:et,format:rt,formatType:ot,expr:"parent",config:nt}).signal,ht=getHeaderChannel(tt,ct);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:ft?replaceAll(replaceAll(ft,"datum.label",pt),"datum.value",vgField(et,{expr:"parent"})):pt}},tt==="row"?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),defaultHeaderGuideBaseline(st,ht)),defaultHeaderGuideAlign(ht,st,ut)),assembleHeaderProperties(nt,et,tt,HEADER_LABEL_PROPERTIES,HEADER_LABEL_PROPERTIES_MAP))}function assembleHeaderGroup(et,tt,nt,rt,ot){if(ot){let st=null;const{facetFieldDef:ut}=rt,ct=et.config?et.config:void 0;if(ut&&ot.labels){const{labelOrient:mt}=getHeaderProperties(["labelOrient"],ut.header,ct,tt);(tt==="row"&&!contains(["top","bottom"],mt)||tt==="column"&&!contains(["left","right"],mt))&&(st=assembleLabelTitle(ut,tt,ct))}const ft=isFacetModel(et)&&!isFacetMapping(et.facet),pt=ot.axes,ht=pt?.length>0;if(st||ht){const mt=tt==="row"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:et.getName(`${tt}_${nt}`),type:"group",role:`${tt}-${nt}`},rt.facetFieldDef?{from:{data:et.getName(`${tt}_domain`)},sort:getSort$1(ut,tt)}:{}),ht&&ft?{from:{data:et.getName(`facet_domain_${tt}`)}}:{}),st?{title:st}:{}),ot.sizeSignal?{encode:{update:{[mt]:ot.sizeSignal}}}:{}),ht?{axes:pt}:{})}}return null}const LAYOUT_TITLE_BAND={column:{start:0,end:1},row:{start:1,end:0}};function getLayoutTitleBand(et,tt){return LAYOUT_TITLE_BAND[tt][et]}function assembleLayoutTitleBand(et,tt){const nt={};for(const rt of FACET_CHANNELS){const ot=et[rt];if(ot?.facetFieldDef){const{titleAnchor:st,titleOrient:ut}=getHeaderProperties(["titleAnchor","titleOrient"],ot.facetFieldDef.header,tt,rt),ct=getHeaderChannel(rt,ut),ft=getLayoutTitleBand(st,ct);ft!==void 0&&(nt[ct]=ft)}}return isEmpty$1(nt)?void 0:nt}function assembleHeaderProperties(et,tt,nt,rt,ot){const st={};for(const ut of rt){if(!ot[ut])continue;const ct=getHeaderProperty(ut,tt?.header,et,nt);ct!==void 0&&(st[ot[ut]]=ct)}return st}function assembleLayoutSignals(et){return[...sizeSignals(et,"width"),...sizeSignals(et,"height"),...sizeSignals(et,"childWidth"),...sizeSignals(et,"childHeight")]}function sizeSignals(et,tt){const nt=tt==="width"?"x":"y",rt=et.component.layoutSize.get(tt);if(!rt||rt==="merged")return[];const ot=et.getSizeSignalRef(tt).signal;if(rt==="step"){const st=et.getScaleComponent(nt);if(st){const ut=st.get("type"),ct=st.get("range");if(hasDiscreteDomain(ut)&&isVgRangeStep(ct)){const ft=et.scaleName(nt);return isFacetModel(et.parent)&&et.parent.component.resolve.scale[nt]==="independent"?[stepSignal(ft,ct)]:[stepSignal(ft,ct),{name:ot,update:sizeExpr(ft,st,`domain('${ft}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(rt=="container"){const st=ot.endsWith("width"),ut=st?"containerSize()[0]":"containerSize()[1]",ct=getViewConfigContinuousSize(et.config.view,st?"width":"height"),ft=`isFinite(${ut}) ? ${ut} : ${ct}`;return[{name:ot,init:ft,on:[{update:ft,events:"window:resize"}]}]}else return[{name:ot,value:rt}]}function stepSignal(et,tt){const nt=`${et}_step`;return isSignalRef(tt.step)?{name:nt,update:tt.step.signal}:{name:nt,value:tt.step}}function sizeExpr(et,tt,nt){const rt=tt.get("type"),ot=tt.get("padding"),st=getFirstDefined(tt.get("paddingOuter"),ot);let ut=tt.get("paddingInner");return ut=rt==="band"?ut!==void 0?ut:ot:1,`bandspace(${nt}, ${signalOrStringValue(ut)}, ${signalOrStringValue(st)}) * ${et}_step`}function getSizeTypeFromLayoutSizeType(et){return et==="childWidth"?"width":et==="childHeight"?"height":et}function guideEncodeEntry(et,tt){return keys$1(et).reduce((nt,rt)=>{const ot=et[rt];return Object.assign(Object.assign({},nt),wrapCondition(tt,ot,rt,st=>signalOrValueRef(st.value)))},{})}function defaultScaleResolve(et,tt){if(isFacetModel(tt))return et==="theta"?"independent":"shared";if(isLayerModel(tt))return"shared";if(isConcatModel(tt))return isXorY(et)||et==="theta"||et==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function parseGuideResolve(et,tt){const nt=et.scale[tt],rt=isXorY(tt)?"axis":"legend";return nt==="independent"?(et[rt][tt]==="shared"&&warn(independentScaleMeansIndependentGuide(tt)),"independent"):et[rt][tt]||"shared"}const LEGEND_COMPONENT_PROPERTY_INDEX=Object.assign(Object.assign({},COMMON_LEGEND_PROPERTY_INDEX),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),LEGEND_COMPONENT_PROPERTIES=keys$1(LEGEND_COMPONENT_PROPERTY_INDEX);class LegendComponent extends Split{}const legendEncodeRules={symbols,gradient:gradient$1,labels:labels$2,entries};function symbols(et,{fieldOrDatumDef:tt,model:nt,channel:rt,legendCmpt:ot,legendType:st}){var ut,ct,ft,pt,ht,mt,yt,vt;if(st!=="symbol")return;const{markDef:Tt,encoding:Et,config:xt,mark:At}=nt,Ct=Tt.filled&&At!=="trail";let $t=Object.assign(Object.assign({},applyMarkConfig({},nt,FILL_STROKE_CONFIG)),color$2(nt,{filled:Ct}));const Ot=(ut=ot.get("symbolOpacity"))!==null&&ut!==void 0?ut:xt.legend.symbolOpacity,Rt=(ct=ot.get("symbolFillColor"))!==null&&ct!==void 0?ct:xt.legend.symbolFillColor,It=(ft=ot.get("symbolStrokeColor"))!==null&&ft!==void 0?ft:xt.legend.symbolStrokeColor,kt=Ot===void 0?(pt=getMaxValue(Et.opacity))!==null&&pt!==void 0?pt:Tt.opacity:void 0;if($t.fill){if(rt==="fill"||Ct&&rt===COLOR)delete $t.fill;else if($t.fill.field)Rt?delete $t.fill:($t.fill=signalOrValueRef((ht=xt.legend.symbolBaseFillColor)!==null&&ht!==void 0?ht:"black"),$t.fillOpacity=signalOrValueRef(kt??1));else if(isArray($t.fill)){const Mt=(vt=(yt=getFirstConditionValue((mt=Et.fill)!==null&&mt!==void 0?mt:Et.color))!==null&&yt!==void 0?yt:Tt.fill)!==null&&vt!==void 0?vt:Ct&&Tt.color;Mt&&($t.fill=signalOrValueRef(Mt))}}if($t.stroke){if(rt==="stroke"||!Ct&&rt===COLOR)delete $t.stroke;else if($t.stroke.field||It)delete $t.stroke;else if(isArray($t.stroke)){const Mt=getFirstDefined(getFirstConditionValue(Et.stroke||Et.color),Tt.stroke,Ct?Tt.color:void 0);Mt&&($t.stroke={value:Mt})}}if(rt!==OPACITY){const Mt=isFieldDef(tt)&&selectedCondition(nt,ot,tt);Mt?$t.opacity=[Object.assign({test:Mt},signalOrValueRef(kt??1)),signalOrValueRef(xt.legend.unselectedOpacity)]:kt&&($t.opacity=signalOrValueRef(kt))}return $t=Object.assign(Object.assign({},$t),et),isEmpty$1($t)?void 0:$t}function gradient$1(et,{model:tt,legendType:nt,legendCmpt:rt}){var ot;if(nt!=="gradient")return;const{config:st,markDef:ut,encoding:ct}=tt;let ft={};const ht=((ot=rt.get("gradientOpacity"))!==null&&ot!==void 0?ot:st.legend.gradientOpacity)===void 0?getMaxValue(ct.opacity)||ut.opacity:void 0;return ht&&(ft.opacity=signalOrValueRef(ht)),ft=Object.assign(Object.assign({},ft),et),isEmpty$1(ft)?void 0:ft}function labels$2(et,{fieldOrDatumDef:tt,model:nt,channel:rt,legendCmpt:ot}){const st=nt.legend(rt)||{},ut=nt.config,ct=isFieldDef(tt)?selectedCondition(nt,ot,tt):void 0,ft=ct?[{test:ct,value:1},{value:ut.legend.unselectedOpacity}]:void 0,{format:pt,formatType:ht}=st;let mt;isCustomFormatType(ht)?mt=formatCustomType({fieldOrDatumDef:tt,field:"datum.value",format:pt,formatType:ht,config:ut}):pt===void 0&&ht===void 0&&ut.customFormatTypes&&(tt.type==="quantitative"&&ut.numberFormatType?mt=formatCustomType({fieldOrDatumDef:tt,field:"datum.value",format:ut.numberFormat,formatType:ut.numberFormatType,config:ut}):tt.type==="temporal"&&ut.timeFormatType&&isFieldDef(tt)&&tt.timeUnit===void 0&&(mt=formatCustomType({fieldOrDatumDef:tt,field:"datum.value",format:ut.timeFormat,formatType:ut.timeFormatType,config:ut})));const yt=Object.assign(Object.assign(Object.assign({},ft?{opacity:ft}:{}),mt?{text:mt}:{}),et);return isEmpty$1(yt)?void 0:yt}function entries(et,{legendCmpt:tt}){const nt=tt.get("selections");return nt?.length?Object.assign(Object.assign({},et),{fill:{value:"transparent"}}):et}function getMaxValue(et){return getConditionValue(et,(tt,nt)=>Math.max(tt,nt.value))}function getFirstConditionValue(et){return getConditionValue(et,(tt,nt)=>getFirstDefined(tt,nt.value))}function getConditionValue(et,tt){if(hasConditionalValueDef(et))return array$5(et.condition).reduce(tt,et.value);if(isValueDef(et))return et.value}function selectedCondition(et,tt,nt){const rt=tt.get("selections");if(!rt?.length)return;const ot=$(nt.field);return rt.map(st=>`(!length(data(${$(varName(st)+STORE)})) || (${st}[${ot}] && indexof(${st}[${ot}], datum.value) >= 0))`).join(" || ")}const legendRules={direction:({direction:et})=>et,format:({fieldOrDatumDef:et,legend:tt,config:nt})=>{const{format:rt,formatType:ot}=tt;return guideFormat(et,et.type,rt,ot,nt,!1)},formatType:({legend:et,fieldOrDatumDef:tt,scaleType:nt})=>{const{formatType:rt}=et;return guideFormatType(rt,tt,nt)},gradientLength:et=>{var tt,nt;const{legend:rt,legendConfig:ot}=et;return(nt=(tt=rt.gradientLength)!==null&&tt!==void 0?tt:ot.gradientLength)!==null&&nt!==void 0?nt:defaultGradientLength(et)},labelOverlap:({legend:et,legendConfig:tt,scaleType:nt})=>{var rt,ot;return(ot=(rt=et.labelOverlap)!==null&&rt!==void 0?rt:tt.labelOverlap)!==null&&ot!==void 0?ot:defaultLabelOverlap(nt)},symbolType:({legend:et,markDef:tt,channel:nt,encoding:rt})=>{var ot;return(ot=et.symbolType)!==null&&ot!==void 0?ot:defaultSymbolType(tt.type,nt,rt.shape,tt.shape)},title:({fieldOrDatumDef:et,config:tt})=>title(et,tt,{allowDisabling:!0}),type:({legendType:et,scaleType:tt,channel:nt})=>{if(isColorChannel(nt)&&isContinuousToContinuous(tt)){if(et==="gradient")return}else if(et==="symbol")return;return et},values:({fieldOrDatumDef:et,legend:tt})=>values$2(tt,et)};function values$2(et,tt){const nt=et.values;if(isArray(nt))return valueArray(tt,nt);if(isSignalRef(nt))return nt}function defaultSymbolType(et,tt,nt,rt){var ot;if(tt!=="shape"){const st=(ot=getFirstConditionValue(nt))!==null&&ot!==void 0?ot:rt;if(st)return st}switch(et){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function getLegendType(et){const{legend:tt}=et;return getFirstDefined(tt.type,defaultType$1(et))}function defaultType$1({channel:et,timeUnit:tt,scaleType:nt}){if(isColorChannel(et)){if(contains(["quarter","month","day"],tt))return"symbol";if(isContinuousToContinuous(nt))return"gradient"}return"symbol"}function getDirection({legendConfig:et,legendType:tt,orient:nt,legend:rt}){var ot,st;return(st=(ot=rt.direction)!==null&&ot!==void 0?ot:et[tt?"gradientDirection":"symbolDirection"])!==null&&st!==void 0?st:defaultDirection(nt,tt)}function defaultDirection(et,tt){switch(et){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return tt==="gradient"?"horizontal":void 0}}function defaultGradientLength({legendConfig:et,model:tt,direction:nt,orient:rt,scaleType:ot}){const{gradientHorizontalMaxLength:st,gradientHorizontalMinLength:ut,gradientVerticalMaxLength:ct,gradientVerticalMinLength:ft}=et;if(isContinuousToContinuous(ot))return nt==="horizontal"?rt==="top"||rt==="bottom"?gradientLengthSignal(tt,"width",ut,st):ut:gradientLengthSignal(tt,"height",ft,ct)}function gradientLengthSignal(et,tt,nt,rt){return{signal:`clamp(${et.getSizeSignalRef(tt).signal}, ${nt}, ${rt})`}}function defaultLabelOverlap(et){if(contains(["quantile","threshold","log","symlog"],et))return"greedy"}function parseLegend(et){const tt=isUnitModel(et)?parseUnitLegend(et):parseNonUnitLegend(et);return et.component.legends=tt,tt}function parseUnitLegend(et){const{encoding:tt}=et,nt={};for(const rt of[COLOR,...LEGEND_SCALE_CHANNELS]){const ot=getFieldOrDatumDef(tt[rt]);!ot||!et.getScaleComponent(rt)||rt===SHAPE&&isFieldDef(ot)&&ot.type===GEOJSON||(nt[rt]=parseLegendForChannel(et,rt))}return nt}function getLegendDefWithScale(et,tt){const nt=et.scaleName(tt);if(et.mark==="trail"){if(tt==="color")return{stroke:nt};if(tt==="size")return{strokeWidth:nt}}return tt==="color"?et.markDef.filled?{fill:nt}:{stroke:nt}:{[tt]:nt}}function isExplicit$1(et,tt,nt,rt){switch(tt){case"disable":return nt!==void 0;case"values":return!!nt?.values;case"title":if(tt==="title"&&et===rt?.title)return!0}return et===(nt||{})[tt]}function parseLegendForChannel(et,tt){var nt,rt,ot;let st=et.legend(tt);const{markDef:ut,encoding:ct,config:ft}=et,pt=ft.legend,ht=new LegendComponent({},getLegendDefWithScale(et,tt));parseInteractiveLegend(et,tt,ht);const mt=st!==void 0?!st:pt.disable;if(ht.set("disable",mt,st!==void 0),mt)return ht;st=st||{};const yt=et.getScaleComponent(tt).get("type"),vt=getFieldOrDatumDef(ct[tt]),Tt=isFieldDef(vt)?(nt=normalizeTimeUnit(vt.timeUnit))===null||nt===void 0?void 0:nt.unit:void 0,Et=st.orient||ft.legend.orient||"right",xt=getLegendType({legend:st,channel:tt,timeUnit:Tt,scaleType:yt}),At=getDirection({legend:st,legendType:xt,orient:Et,legendConfig:pt}),Ct={legend:st,channel:tt,model:et,markDef:ut,encoding:ct,fieldOrDatumDef:vt,legendConfig:pt,config:ft,scaleType:yt,orient:Et,legendType:xt,direction:At};for(const kt of LEGEND_COMPONENT_PROPERTIES){if(xt==="gradient"&&kt.startsWith("symbol")||xt==="symbol"&&kt.startsWith("gradient"))continue;const Mt=kt in legendRules?legendRules[kt](Ct):st[kt];if(Mt!==void 0){const Ft=isExplicit$1(Mt,kt,st,et.fieldDef(tt));(Ft||ft.legend[kt]===void 0)&&ht.set(kt,Mt,Ft)}}const $t=(rt=st?.encoding)!==null&&rt!==void 0?rt:{},Ot=ht.get("selections"),Rt={},It={fieldOrDatumDef:vt,model:et,channel:tt,legendCmpt:ht,legendType:xt};for(const kt of["labels","legend","title","symbols","gradient","entries"]){const Mt=guideEncodeEntry((ot=$t[kt])!==null&&ot!==void 0?ot:{},et),Ft=kt in legendEncodeRules?legendEncodeRules[kt](Mt,It):Mt;Ft!==void 0&&!isEmpty$1(Ft)&&(Rt[kt]=Object.assign(Object.assign(Object.assign({},Ot?.length&&isFieldDef(vt)?{name:`${varName(vt.field)}_legend_${kt}`}:{}),Ot?.length?{interactive:!!Ot}:{}),{update:Ft}))}return isEmpty$1(Rt)||ht.set("encode",Rt,!!st?.encoding),ht}function parseNonUnitLegend(et){const{legends:tt,resolve:nt}=et.component;for(const rt of et.children){parseLegend(rt);for(const ot of keys$1(rt.component.legends))nt.legend[ot]=parseGuideResolve(et.component.resolve,ot),nt.legend[ot]==="shared"&&(tt[ot]=mergeLegendComponent(tt[ot],rt.component.legends[ot]),tt[ot]||(nt.legend[ot]="independent",delete tt[ot]))}for(const rt of keys$1(tt))for(const ot of et.children)!ot.component.legends[rt]||nt.legend[rt]==="shared"&&delete ot.component.legends[rt];return tt}function mergeLegendComponent(et,tt){var nt,rt,ot,st;if(!et)return tt.clone();const ut=et.getWithExplicit("orient"),ct=tt.getWithExplicit("orient");if(ut.explicit&&ct.explicit&&ut.value!==ct.value)return;let ft=!1;for(const pt of LEGEND_COMPONENT_PROPERTIES){const ht=mergeValuesWithExplicit(et.getWithExplicit(pt),tt.getWithExplicit(pt),pt,"legend",(mt,yt)=>{switch(pt){case"symbolType":return mergeSymbolType(mt,yt);case"title":return mergeTitleComponent(mt,yt);case"type":return ft=!0,makeImplicit("symbol")}return defaultTieBreaker(mt,yt,pt,"legend")});et.setWithExplicit(pt,ht)}return ft&&(!((rt=(nt=et.implicit)===null||nt===void 0?void 0:nt.encode)===null||rt===void 0)&&rt.gradient&&deleteNestedProperty(et.implicit,["encode","gradient"]),!((st=(ot=et.explicit)===null||ot===void 0?void 0:ot.encode)===null||st===void 0)&&st.gradient&&deleteNestedProperty(et.explicit,["encode","gradient"])),et}function mergeSymbolType(et,tt){return tt.value==="circle"?tt:et}var __rest$a=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function setLegendEncode(et,tt,nt,rt){var ot,st,ut,ct,ft;(ot=et.encode)!==null&&ot!==void 0||(et.encode={}),(st=(ct=et.encode)[tt])!==null&&st!==void 0||(ct[tt]={}),(ut=(ft=et.encode[tt]).update)!==null&&ut!==void 0||(ft.update={}),et.encode[tt].update[nt]=rt}function assembleLegends(et){const tt=et.component.legends,nt={};for(const ot of keys$1(tt)){const st=et.getScaleComponent(ot),ut=stringify$1(st.get("domains"));if(nt[ut])for(const ct of nt[ut])mergeLegendComponent(ct,tt[ot])||nt[ut].push(tt[ot]);else nt[ut]=[tt[ot].clone()]}return vals(nt).flat().map(ot=>assembleLegend(ot,et.config)).filter(ot=>ot!==void 0)}function assembleLegend(et,tt){var nt,rt,ot;const st=et.combine(),{disable:ut,labelExpr:ct,selections:ft}=st,pt=__rest$a(st,["disable","labelExpr","selections"]);if(!ut){if(tt.aria===!1&&pt.aria==null&&(pt.aria=!1),!((nt=pt.encode)===null||nt===void 0)&&nt.symbols){const ht=pt.encode.symbols.update;ht.fill&&ht.fill.value!=="transparent"&&!ht.stroke&&!pt.stroke&&(ht.stroke={value:"transparent"});for(const mt of LEGEND_SCALE_CHANNELS)pt[mt]&&delete ht[mt]}if(pt.title||delete pt.title,ct!==void 0){let ht=ct;((ot=(rt=pt.encode)===null||rt===void 0?void 0:rt.labels)===null||ot===void 0?void 0:ot.update)&&isSignalRef(pt.encode.labels.update.text)&&(ht=replaceAll(ct,"datum.label",pt.encode.labels.update.text.signal)),setLegendEncode(pt,"labels","text",{signal:ht})}return pt}}function assembleProjections(et){return isLayerModel(et)||isConcatModel(et)?assembleProjectionsForModelAndChildren(et):assembleProjectionForModel(et)}function assembleProjectionsForModelAndChildren(et){return et.children.reduce((tt,nt)=>tt.concat(nt.assembleProjections()),assembleProjectionForModel(et))}function assembleProjectionForModel(et){const tt=et.component.projection;if(!tt||tt.merged)return[];const nt=tt.combine(),{name:rt}=nt;if(tt.data){const ot={signal:`[${tt.size.map(ut=>ut.signal).join(", ")}]`},st=tt.data.reduce((ut,ct)=>{const ft=isSignalRef(ct)?ct.signal:`data('${et.lookupDataSource(ct)}')`;return contains(ut,ft)||ut.push(ft),ut},[]);if(st.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:rt,size:ot,fit:{signal:st.length>1?`[${st.join(", ")}]`:st[0]}},nt)]}else return[Object.assign(Object.assign({name:rt},{translate:{signal:"[width / 2, height / 2]"}}),nt)]}const PROJECTION_PROPERTIES=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class ProjectionComponent extends Split{constructor(tt,nt,rt,ot){super(Object.assign({},nt),{name:tt}),this.specifiedProjection=nt,this.size=rt,this.data=ot,this.merged=!1}get isFit(){return!!this.data}}function parseProjection(et){et.component.projection=isUnitModel(et)?parseUnitProjection(et):parseNonUnitProjections(et)}function parseUnitProjection(et){var tt;if(et.hasProjection){const nt=replaceExprRef(et.specifiedProjection),rt=!(nt&&(nt.scale!=null||nt.translate!=null)),ot=rt?[et.getSizeSignalRef("width"),et.getSizeSignalRef("height")]:void 0,st=rt?gatherFitData(et):void 0,ut=new ProjectionComponent(et.projectionName(!0),Object.assign(Object.assign({},(tt=replaceExprRef(et.config.projection))!==null&&tt!==void 0?tt:{}),nt??{}),ot,st);return ut.get("type")||ut.set("type","equalEarth",!1),ut}}function gatherFitData(et){const tt=[],{encoding:nt}=et;for(const rt of[[LONGITUDE,LATITUDE],[LONGITUDE2,LATITUDE2]])(getFieldOrDatumDef(nt[rt[0]])||getFieldOrDatumDef(nt[rt[1]]))&&tt.push({signal:et.getName(`geojson_${tt.length}`)});return et.channelHasField(SHAPE)&&et.typedFieldDef(SHAPE).type===GEOJSON&&tt.push({signal:et.getName(`geojson_${tt.length}`)}),tt.length===0&&tt.push(et.requestDataName(DataSourceType.Main)),tt}function mergeIfNoConflict(et,tt){const nt=every(PROJECTION_PROPERTIES,ot=>!!(!has$1(et.explicit,ot)&&!has$1(tt.explicit,ot)||has$1(et.explicit,ot)&&has$1(tt.explicit,ot)&&deepEqual(et.get(ot),tt.get(ot))));if(deepEqual(et.size,tt.size)){if(nt)return et;if(deepEqual(et.explicit,{}))return tt;if(deepEqual(tt.explicit,{}))return et}return null}function parseNonUnitProjections(et){if(et.children.length===0)return;let tt;for(const rt of et.children)parseProjection(rt);const nt=every(et.children,rt=>{const ot=rt.component.projection;if(ot)if(tt){const st=mergeIfNoConflict(tt,ot);return st&&(tt=st),!!st}else return tt=ot,!0;else return!0});if(tt&&nt){const rt=et.projectionName(!0),ot=new ProjectionComponent(rt,tt.specifiedProjection,tt.size,duplicate(tt.data));for(const st of et.children){const ut=st.component.projection;ut&&(ut.isFit&&ot.data.push(...st.component.projection.data),st.renameProjection(ut.get("name"),rt),ut.merged=!0)}return ot}}var __rest$9=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function rangeFormula(et,tt,nt,rt){var ot,st;if(binRequiresRange(tt,nt)){const ut=isUnitModel(et)?(st=(ot=et.axis(nt))!==null&&ot!==void 0?ot:et.legend(nt))!==null&&st!==void 0?st:{}:{},ct=vgField(tt,{expr:"datum"}),ft=vgField(tt,{expr:"datum",binSuffix:"end"});return{formulaAs:vgField(tt,{binSuffix:"range",forAs:!0}),formula:binFormatExpression(ct,ft,ut.format,ut.formatType,rt)}}return{}}function binKey(et,tt){return`${binToString(et)}_${tt}`}function getSignalsFromModel(et,tt){return{signal:et.getName(`${tt}_bins`),extentSignal:et.getName(`${tt}_extent`)}}function getBinSignalName(et,tt,nt){var rt;const ot=(rt=normalizeBin(nt,void 0))!==null&&rt!==void 0?rt:{},st=binKey(ot,tt);return et.getName(`${st}_bins`)}function isBinTransform(et){return"as"in et}function createBinComponent(et,tt,nt){let rt,ot;isBinTransform(et)?rt=isString(et.as)?[et.as,`${et.as}_end`]:[et.as[0],et.as[1]]:rt=[vgField(et,{forAs:!0}),vgField(et,{binSuffix:"end",forAs:!0})];const st=Object.assign({},normalizeBin(tt,void 0)),ut=binKey(st,et.field),{signal:ct,extentSignal:ft}=getSignalsFromModel(nt,ut);if(isParameterExtent(st.extent)){const ht=st.extent;ot=parseSelectionExtent(nt,ht.param,ht),delete st.extent}const pt=Object.assign(Object.assign(Object.assign({bin:st,field:et.field,as:[rt]},ct?{signal:ct}:{}),ft?{extentSignal:ft}:{}),ot?{span:ot}:{});return{key:ut,binComponent:pt}}class BinNode extends DataFlowNode{constructor(tt,nt){super(tt),this.bins=nt}clone(){return new BinNode(null,duplicate(this.bins))}static makeFromEncoding(tt,nt){const rt=nt.reduceFieldDef((ot,st,ut)=>{if(isTypedFieldDef(st)&&isBinning(st.bin)){const{key:ct,binComponent:ft}=createBinComponent(st,st.bin,nt);ot[ct]=Object.assign(Object.assign(Object.assign({},ft),ot[ct]),rangeFormula(nt,st,ut,nt.config))}return ot},{});return isEmpty$1(rt)?null:new BinNode(tt,rt)}static makeFromTransform(tt,nt,rt){const{key:ot,binComponent:st}=createBinComponent(nt,nt.bin,rt);return new BinNode(tt,{[ot]:st})}merge(tt,nt){for(const rt of keys$1(tt.bins))rt in this.bins?(nt(tt.bins[rt].signal,this.bins[rt].signal),this.bins[rt].as=unique([...this.bins[rt].as,...tt.bins[rt].as],hash)):this.bins[rt]=tt.bins[rt];for(const rt of tt.children)tt.removeChild(rt),rt.parent=this;tt.remove()}producedFields(){return new Set(vals(this.bins).map(tt=>tt.as).flat(2))}dependentFields(){return new Set(vals(this.bins).map(tt=>tt.field))}hash(){return`Bin ${hash(this.bins)}`}assemble(){return vals(this.bins).flatMap(tt=>{const nt=[],[rt,...ot]=tt.as,st=tt.bin,{extent:ut}=st,ct=__rest$9(st,["extent"]),ft=Object.assign(Object.assign(Object.assign({type:"bin",field:replacePathInField(tt.field),as:rt,signal:tt.signal},isParameterExtent(ut)?{extent:null}:{extent:ut}),tt.span?{span:{signal:`span(${tt.span})`}}:{}),ct);!ut&&tt.extentSignal&&(nt.push({type:"extent",field:replacePathInField(tt.field),signal:tt.extentSignal}),ft.extent={signal:tt.extentSignal}),nt.push(ft);for(const pt of ot)for(let ht=0;ht<2;ht++)nt.push({type:"formula",expr:vgField({field:rt[ht]},{expr:"datum"}),as:pt[ht]});return tt.formula&&nt.push({type:"formula",expr:tt.formula,as:tt.formulaAs}),nt})}}function addDimension(et,tt,nt,rt){var ot;const st=isUnitModel(rt)?rt.encoding[getSecondaryRangeChannel(tt)]:void 0;if(isTypedFieldDef(nt)&&isUnitModel(rt)&&hasBandEnd(nt,st,rt.markDef,rt.config))et.add(vgField(nt,{})),et.add(vgField(nt,{suffix:"end"})),nt.bin&&binRequiresRange(nt,tt)&&et.add(vgField(nt,{binSuffix:"range"}));else if(isGeoPositionChannel(tt)){const ut=getPositionChannelFromLatLong(tt);et.add(rt.getName(ut))}else et.add(vgField(nt));return isScaleFieldDef(nt)&&isFieldRange((ot=nt.scale)===null||ot===void 0?void 0:ot.range)&&et.add(nt.scale.range.field),et}function mergeMeasures(et,tt){var nt;for(const rt of keys$1(tt)){const ot=tt[rt];for(const st of keys$1(ot))rt in et?et[rt][st]=new Set([...(nt=et[rt][st])!==null&&nt!==void 0?nt:[],...ot[st]]):et[rt]={[st]:ot[st]}}}class AggregateNode extends DataFlowNode{constructor(tt,nt,rt){super(tt),this.dimensions=nt,this.measures=rt}clone(){return new AggregateNode(null,new Set(this.dimensions),duplicate(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(tt,nt){let rt=!1;nt.forEachFieldDef(ut=>{ut.aggregate&&(rt=!0)});const ot={},st=new Set;return!rt||(nt.forEachFieldDef((ut,ct)=>{var ft,pt,ht,mt;const{aggregate:yt,field:vt}=ut;if(yt)if(yt==="count")(ft=ot["*"])!==null&&ft!==void 0||(ot["*"]={}),ot["*"].count=new Set([vgField(ut,{forAs:!0})]);else{if(isArgminDef(yt)||isArgmaxDef(yt)){const Tt=isArgminDef(yt)?"argmin":"argmax",Et=yt[Tt];(pt=ot[Et])!==null&&pt!==void 0||(ot[Et]={}),ot[Et][Tt]=new Set([vgField({op:Tt,field:Et},{forAs:!0})])}else(ht=ot[vt])!==null&&ht!==void 0||(ot[vt]={}),ot[vt][yt]=new Set([vgField(ut,{forAs:!0})]);isScaleChannel(ct)&&nt.scaleDomain(ct)==="unaggregated"&&((mt=ot[vt])!==null&&mt!==void 0||(ot[vt]={}),ot[vt].min=new Set([vgField({field:vt,aggregate:"min"},{forAs:!0})]),ot[vt].max=new Set([vgField({field:vt,aggregate:"max"},{forAs:!0})]))}else addDimension(st,ct,ut,nt)}),st.size+keys$1(ot).length===0)?null:new AggregateNode(tt,st,ot)}static makeFromTransform(tt,nt){var rt,ot,st;const ut=new Set,ct={};for(const ft of nt.aggregate){const{op:pt,field:ht,as:mt}=ft;pt&&(pt==="count"?((rt=ct["*"])!==null&&rt!==void 0||(ct["*"]={}),ct["*"].count=new Set([mt||vgField(ft,{forAs:!0})])):((ot=ct[ht])!==null&&ot!==void 0||(ct[ht]={}),ct[ht][pt]=new Set([mt||vgField(ft,{forAs:!0})])))}for(const ft of(st=nt.groupby)!==null&&st!==void 0?st:[])ut.add(ft);return ut.size+keys$1(ct).length===0?null:new AggregateNode(tt,ut,ct)}merge(tt){return setEqual(this.dimensions,tt.dimensions)?(mergeMeasures(this.measures,tt.measures),!0):(debug$2("different dimensions, cannot merge"),!1)}addDimensions(tt){tt.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...keys$1(this.measures)])}producedFields(){const tt=new Set;for(const nt of keys$1(this.measures))for(const rt of keys$1(this.measures[nt])){const ot=this.measures[nt][rt];ot.size===0?tt.add(`${rt}_${nt}`):ot.forEach(tt.add,tt)}return tt}hash(){return`Aggregate ${hash({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const tt=[],nt=[],rt=[];for(const st of keys$1(this.measures))for(const ut of keys$1(this.measures[st]))for(const ct of this.measures[st][ut])rt.push(ct),tt.push(ut),nt.push(st==="*"?null:replacePathInField(st));return{type:"aggregate",groupby:[...this.dimensions].map(replacePathInField),ops:tt,fields:nt,as:rt}}}class FacetNode extends DataFlowNode{constructor(tt,nt,rt,ot){super(tt),this.model=nt,this.name=rt,this.data=ot;for(const st of FACET_CHANNELS){const ut=nt.facet[st];if(ut){const{bin:ct,sort:ft}=ut;this[st]=Object.assign({name:nt.getName(`${st}_domain`),fields:[vgField(ut),...isBinning(ct)?[vgField(ut,{binSuffix:"end"})]:[]]},isSortField(ft)?{sortField:ft}:isArray(ft)?{sortIndexField:sortArrayIndexField(ut,st)}:{})}}this.childModel=nt.child}hash(){let tt="Facet";for(const nt of FACET_CHANNELS)this[nt]&&(tt+=` ${nt.charAt(0)}:${hash(this[nt])}`);return tt}get fields(){var tt;const nt=[];for(const rt of FACET_CHANNELS)!((tt=this[rt])===null||tt===void 0)&&tt.fields&&nt.push(...this[rt].fields);return nt}dependentFields(){const tt=new Set(this.fields);for(const nt of FACET_CHANNELS)this[nt]&&(this[nt].sortField&&tt.add(this[nt].sortField.field),this[nt].sortIndexField&&tt.add(this[nt].sortIndexField));return tt}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const tt={};for(const nt of POSITION_SCALE_CHANNELS){const rt=this.childModel.component.scales[nt];if(rt&&!rt.merged){const ot=rt.get("type"),st=rt.get("range");if(hasDiscreteDomain(ot)&&isVgRangeStep(st)){const ut=assembleDomain(this.childModel,nt),ct=getFieldFromDomain(ut);ct?tt[nt]=ct:warn(unknownField(nt))}}}return tt}assembleRowColumnHeaderData(tt,nt,rt){const ot={row:"y",column:"x",facet:void 0}[tt],st=[],ut=[],ct=[];ot&&rt&&rt[ot]&&(nt?(st.push(`distinct_${rt[ot]}`),ut.push("max")):(st.push(rt[ot]),ut.push("distinct")),ct.push(`distinct_${rt[ot]}`));const{sortField:ft,sortIndexField:pt}=this[tt];if(ft){const{op:ht=DEFAULT_SORT_OP,field:mt}=ft;st.push(mt),ut.push(ht),ct.push(vgField(ft,{forAs:!0}))}else pt&&(st.push(pt),ut.push("max"),ct.push(pt));return{name:this[tt].name,source:nt??this.data,transform:[Object.assign({type:"aggregate",groupby:this[tt].fields},st.length?{fields:st,ops:ut,as:ct}:{})]}}assembleFacetHeaderData(tt){var nt,rt;const{columns:ot}=this.model.layout,{layoutHeaders:st}=this.model.component,ut=[],ct={};for(const ht of HEADER_CHANNELS){for(const mt of HEADER_TYPES){const yt=(nt=st[ht]&&st[ht][mt])!==null&&nt!==void 0?nt:[];for(const vt of yt)if(((rt=vt.axes)===null||rt===void 0?void 0:rt.length)>0){ct[ht]=!0;break}}if(ct[ht]){const mt=`length(data("${this.facet.name}"))`,yt=ht==="row"?ot?{signal:`ceil(${mt} / ${ot})`}:1:ot?{signal:`min(${mt}, ${ot})`}:{signal:mt};ut.push({name:`${this.facet.name}_${ht}`,transform:[{type:"sequence",start:0,stop:yt}]})}}const{row:ft,column:pt}=ct;return(ft||pt)&&ut.unshift(this.assembleRowColumnHeaderData("facet",null,tt)),ut}assemble(){var tt,nt;const rt=[];let ot=null;const st=this.getChildIndependentFieldsWithStep(),{column:ut,row:ct,facet:ft}=this;if(ut&&ct&&(st.x||st.y)){ot=`cross_${this.column.name}_${this.row.name}`;const pt=[].concat((tt=st.x)!==null&&tt!==void 0?tt:[],(nt=st.y)!==null&&nt!==void 0?nt:[]),ht=pt.map(()=>"distinct");rt.push({name:ot,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:pt,ops:ht}]})}for(const pt of[COLUMN,ROW])this[pt]&&rt.push(this.assembleRowColumnHeaderData(pt,ot,st));if(ft){const pt=this.assembleFacetHeaderData(st);pt&&rt.push(...pt)}return rt}}function unquote(et){return et.startsWith("'")&&et.endsWith("'")||et.startsWith('"')&&et.endsWith('"')?et.slice(1,-1):et}function parseExpression(et,tt){const nt=accessPathWithDatum(et);if(tt==="number")return`toNumber(${nt})`;if(tt==="boolean")return`toBoolean(${nt})`;if(tt==="string")return`toString(${nt})`;if(tt==="date")return`toDate(${nt})`;if(tt==="flatten")return nt;if(tt.startsWith("date:")){const rt=unquote(tt.slice(5,tt.length));return`timeParse(${nt},'${rt}')`}else if(tt.startsWith("utc:")){const rt=unquote(tt.slice(4,tt.length));return`utcParse(${nt},'${rt}')`}else return warn(unrecognizedParse(tt)),null}function getImplicitFromFilterTransform(et){const tt={};return forEachLeaf(et.filter,nt=>{var rt;if(isFieldPredicate(nt)){let ot=null;isFieldEqualPredicate(nt)?ot=signalRefOrValue(nt.equal):isFieldLTEPredicate(nt)?ot=signalRefOrValue(nt.lte):isFieldLTPredicate(nt)?ot=signalRefOrValue(nt.lt):isFieldGTPredicate(nt)?ot=signalRefOrValue(nt.gt):isFieldGTEPredicate(nt)?ot=signalRefOrValue(nt.gte):isFieldRangePredicate(nt)?ot=nt.range[0]:isFieldOneOfPredicate(nt)&&(ot=((rt=nt.oneOf)!==null&&rt!==void 0?rt:nt.in)[0]),ot&&(isDateTime(ot)?tt[nt.field]="date":isNumber$1(ot)?tt[nt.field]="number":isString(ot)&&(tt[nt.field]="string")),nt.timeUnit&&(tt[nt.field]="date")}}),tt}function getImplicitFromEncoding(et){const tt={};function nt(rt){isFieldOrDatumDefForTimeFormat(rt)?tt[rt.field]="date":rt.type==="quantitative"&&isMinMaxOp(rt.aggregate)?tt[rt.field]="number":accessPathDepth(rt.field)>1?rt.field in tt||(tt[rt.field]="flatten"):isScaleFieldDef(rt)&&isSortField(rt.sort)&&accessPathDepth(rt.sort.field)>1&&(rt.sort.field in tt||(tt[rt.sort.field]="flatten"))}if((isUnitModel(et)||isFacetModel(et))&&et.forEachFieldDef((rt,ot)=>{if(isTypedFieldDef(rt))nt(rt);else{const st=getMainRangeChannel(ot),ut=et.fieldDef(st);nt(Object.assign(Object.assign({},rt),{type:ut.type}))}}),isUnitModel(et)){const{mark:rt,markDef:ot,encoding:st}=et;if(isPathMark(rt)&&!et.encoding.order){const ut=ot.orient==="horizontal"?"y":"x",ct=st[ut];isFieldDef(ct)&&ct.type==="quantitative"&&!(ct.field in tt)&&(tt[ct.field]="number")}}return tt}function getImplicitFromSelection(et){const tt={};if(isUnitModel(et)&&et.component.selection)for(const nt of keys$1(et.component.selection)){const rt=et.component.selection[nt];for(const ot of rt.project.items)!ot.channel&&accessPathDepth(ot.field)>1&&(tt[ot.field]="flatten")}return tt}class ParseNode extends DataFlowNode{constructor(tt,nt){super(tt),this._parse=nt}clone(){return new ParseNode(null,duplicate(this._parse))}hash(){return`Parse ${hash(this._parse)}`}static makeExplicit(tt,nt,rt){var ot;let st={};const ut=nt.data;return!isGenerator(ut)&&((ot=ut?.format)===null||ot===void 0?void 0:ot.parse)&&(st=ut.format.parse),this.makeWithAncestors(tt,st,{},rt)}static makeWithAncestors(tt,nt,rt,ot){for(const ct of keys$1(rt)){const ft=ot.getWithExplicit(ct);ft.value!==void 0&&(ft.explicit||ft.value===rt[ct]||ft.value==="derived"||rt[ct]==="flatten"?delete rt[ct]:warn(differentParse(ct,rt[ct],ft.value)))}for(const ct of keys$1(nt)){const ft=ot.get(ct);ft!==void 0&&(ft===nt[ct]?delete nt[ct]:warn(differentParse(ct,nt[ct],ft)))}const st=new Split(nt,rt);ot.copyAll(st);const ut={};for(const ct of keys$1(st.combine())){const ft=st.get(ct);ft!==null&&(ut[ct]=ft)}return keys$1(ut).length===0||ot.parseNothing?null:new ParseNode(tt,ut)}get parse(){return this._parse}merge(tt){this._parse=Object.assign(Object.assign({},this._parse),tt.parse),tt.remove()}assembleFormatParse(){const tt={};for(const nt of keys$1(this._parse)){const rt=this._parse[nt];accessPathDepth(nt)===1&&(tt[nt]=rt)}return tt}producedFields(){return new Set(keys$1(this._parse))}dependentFields(){return new Set(keys$1(this._parse))}assembleTransforms(tt=!1){return keys$1(this._parse).filter(nt=>tt?accessPathDepth(nt)>1:!0).map(nt=>{const rt=parseExpression(nt,this._parse[nt]);return rt?{type:"formula",expr:rt,as:removePathFromField(nt)}:null}).filter(nt=>nt!==null)}}class IdentifierNode extends DataFlowNode{clone(){return new IdentifierNode(null)}constructor(tt){super(tt)}dependentFields(){return new Set}producedFields(){return new Set([SELECTION_ID])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:SELECTION_ID}}}class GraticuleNode extends DataFlowNode{constructor(tt,nt){super(tt),this.params=nt}clone(){return new GraticuleNode(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${hash(this.params)}`}assemble(){return Object.assign({type:"graticule"},this.params===!0?{}:this.params)}}class SequenceNode extends DataFlowNode{constructor(tt,nt){super(tt),this.params=nt}clone(){return new SequenceNode(null,this.params)}dependentFields(){return new Set}producedFields(){var tt;return new Set([(tt=this.params.as)!==null&&tt!==void 0?tt:"data"])}hash(){return`Hash ${hash(this.params)}`}assemble(){return Object.assign({type:"sequence"},this.params)}}class SourceNode extends DataFlowNode{constructor(tt){super(null),tt??(tt={name:"source"});let nt;if(isGenerator(tt)||(nt=tt.format?Object.assign({},omit$1(tt.format,["parse"])):{}),isInlineData(tt))this._data={values:tt.values};else if(isUrlData(tt)){if(this._data={url:tt.url},!nt.type){let rt=/(?:\.([^.]+))?$/.exec(tt.url)[1];contains(["json","csv","tsv","dsv","topojson"],rt)||(rt="json"),nt.type=rt}}else isSphereGenerator(tt)?this._data={values:[{type:"Sphere"}]}:(isNamedData(tt)||isGenerator(tt))&&(this._data={});this._generator=isGenerator(tt),tt.name&&(this._name=tt.name),nt&&!isEmpty$1(nt)&&(this._data.format=nt)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(tt){this._name=tt}set parent(tt){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}}var __classPrivateFieldSet=globalThis&&globalThis.__classPrivateFieldSet||function(et,tt,nt,rt,ot){if(rt==="m")throw new TypeError("Private method is not writable");if(rt==="a"&&!ot)throw new TypeError("Private accessor was defined without a setter");if(typeof tt=="function"?et!==tt||!ot:!tt.has(et))throw new TypeError("Cannot write private member to an object whose class did not declare it");return rt==="a"?ot.call(et,nt):ot?ot.value=nt:tt.set(et,nt),nt},__classPrivateFieldGet=globalThis&&globalThis.__classPrivateFieldGet||function(et,tt,nt,rt){if(nt==="a"&&!rt)throw new TypeError("Private accessor was defined without a getter");if(typeof tt=="function"?et!==tt||!rt:!tt.has(et))throw new TypeError("Cannot read private member from an object whose class did not declare it");return nt==="m"?rt:nt==="a"?rt.call(et):rt?rt.value:tt.get(et)},_Optimizer_modified;function isDataSourceNode(et){return et instanceof SourceNode||et instanceof GraticuleNode||et instanceof SequenceNode}class Optimizer{constructor(){_Optimizer_modified.set(this,void 0),__classPrivateFieldSet(this,_Optimizer_modified,!1,"f")}setModified(){__classPrivateFieldSet(this,_Optimizer_modified,!0,"f")}get modifiedFlag(){return __classPrivateFieldGet(this,_Optimizer_modified,"f")}}_Optimizer_modified=new WeakMap;class BottomUpOptimizer extends Optimizer{getNodeDepths(tt,nt,rt){rt.set(tt,nt);for(const ot of tt.children)this.getNodeDepths(ot,nt+1,rt);return rt}optimize(tt){const rt=[...this.getNodeDepths(tt,0,new Map).entries()].sort((ot,st)=>st[1]-ot[1]);for(const ot of rt)this.run(ot[0]);return this.modifiedFlag}}class TopDownOptimizer extends Optimizer{optimize(tt){this.run(tt);for(const nt of tt.children)this.optimize(nt);return this.modifiedFlag}}class MergeIdenticalNodes extends TopDownOptimizer{mergeNodes(tt,nt){const rt=nt.shift();for(const ot of nt)tt.removeChild(ot),ot.parent=rt,ot.remove()}run(tt){const nt=tt.children.map(ot=>ot.hash()),rt={};for(let ot=0;ot<nt.length;ot++)rt[nt[ot]]===void 0?rt[nt[ot]]=[tt.children[ot]]:rt[nt[ot]].push(tt.children[ot]);for(const ot of keys$1(rt))rt[ot].length>1&&(this.setModified(),this.mergeNodes(tt,rt[ot]))}}class RemoveUnnecessaryIdentifierNodes extends TopDownOptimizer{constructor(tt){super(),this.requiresSelectionId=tt&&requiresSelectionId(tt)}run(tt){tt instanceof IdentifierNode&&(this.requiresSelectionId&&(isDataSourceNode(tt.parent)||tt.parent instanceof AggregateNode||tt.parent instanceof ParseNode)||(this.setModified(),tt.remove()))}}class RemoveDuplicateTimeUnits extends Optimizer{optimize(tt){return this.run(tt,new Set),this.modifiedFlag}run(tt,nt){let rt=new Set;tt instanceof TimeUnitNode&&(rt=tt.producedFields(),hasIntersection(rt,nt)&&(this.setModified(),tt.removeFormulas(nt),tt.producedFields.length===0&&tt.remove()));for(const ot of tt.children)this.run(ot,new Set([...nt,...rt]))}}class RemoveUnnecessaryOutputNodes extends TopDownOptimizer{constructor(){super()}run(tt){tt instanceof OutputNode&&!tt.isRequired()&&(this.setModified(),tt.remove())}}class MoveParseUp extends BottomUpOptimizer{run(tt){if(!isDataSourceNode(tt)&&!(tt.numChildren()>1)){for(const nt of tt.children)if(nt instanceof ParseNode)if(tt instanceof ParseNode)this.setModified(),tt.merge(nt);else{if(fieldIntersection(tt.producedFields(),nt.dependentFields()))continue;this.setModified(),nt.swapWithParent()}}}}class MergeParse extends BottomUpOptimizer{run(tt){const nt=[...tt.children],rt=tt.children.filter(ot=>ot instanceof ParseNode);if(tt.numChildren()>1&&rt.length>=1){const ot={},st=new Set;for(const ut of rt){const ct=ut.parse;for(const ft of keys$1(ct))ft in ot?ot[ft]!==ct[ft]&&st.add(ft):ot[ft]=ct[ft]}for(const ut of st)delete ot[ut];if(!isEmpty$1(ot)){this.setModified();const ut=new ParseNode(tt,ot);for(const ct of nt){if(ct instanceof ParseNode)for(const ft of keys$1(ot))delete ct.parse[ft];tt.removeChild(ct),ct.parent=ut,ct instanceof ParseNode&&keys$1(ct.parse).length===0&&ct.remove()}}}}}class RemoveUnusedSubtrees extends BottomUpOptimizer{run(tt){tt instanceof OutputNode||tt.numChildren()>0||tt instanceof FacetNode||tt instanceof SourceNode||(this.setModified(),tt.remove())}}class MergeTimeUnits extends BottomUpOptimizer{run(tt){const nt=tt.children.filter(ot=>ot instanceof TimeUnitNode),rt=nt.pop();for(const ot of nt)this.setModified(),rt.merge(ot)}}class MergeAggregates extends BottomUpOptimizer{run(tt){const nt=tt.children.filter(ot=>ot instanceof AggregateNode),rt={};for(const ot of nt){const st=hash(ot.groupBy);st in rt||(rt[st]=[]),rt[st].push(ot)}for(const ot of keys$1(rt)){const st=rt[ot];if(st.length>1){const ut=st.pop();for(const ct of st)ut.merge(ct)&&(tt.removeChild(ct),ct.parent=ut,ct.remove(),this.setModified())}}}}class MergeBins extends BottomUpOptimizer{constructor(tt){super(),this.model=tt}run(tt){const nt=!(isDataSourceNode(tt)||tt instanceof FilterNode||tt instanceof ParseNode||tt instanceof IdentifierNode),rt=[],ot=[];for(const st of tt.children)st instanceof BinNode&&(nt&&!fieldIntersection(tt.producedFields(),st.dependentFields())?rt.push(st):ot.push(st));if(rt.length>0){const st=rt.pop();for(const ut of rt)st.merge(ut,this.model.renameSignal.bind(this.model));this.setModified(),tt instanceof BinNode?tt.merge(st,this.model.renameSignal.bind(this.model)):st.swapWithParent()}if(ot.length>1){const st=ot.pop();for(const ut of ot)st.merge(ut,this.model.renameSignal.bind(this.model));this.setModified()}}}class MergeOutputs extends BottomUpOptimizer{run(tt){const nt=[...tt.children];if(!some(nt,ut=>ut instanceof OutputNode)||tt.numChildren()<=1)return;const ot=[];let st;for(const ut of nt)if(ut instanceof OutputNode){let ct=ut;for(;ct.numChildren()===1;){const[ft]=ct.children;if(ft instanceof OutputNode)ct=ft;else break}ot.push(...ct.children),st?(tt.removeChild(ut),ut.parent=st.parent,st.parent.removeChild(st),st.parent=ct,this.setModified()):st=ct}else ot.push(ut);if(ot.length){this.setModified();for(const ut of ot)ut.parent.removeChild(ut),ut.parent=st}}}class JoinAggregateTransformNode extends DataFlowNode{constructor(tt,nt){super(tt),this.transform=nt}clone(){return new JoinAggregateTransformNode(null,duplicate(this.transform))}addDimensions(tt){this.transform.groupby=unique(this.transform.groupby.concat(tt),nt=>nt)}dependentFields(){const tt=new Set;return this.transform.groupby&&this.transform.groupby.forEach(tt.add,tt),this.transform.joinaggregate.map(nt=>nt.field).filter(nt=>nt!==void 0).forEach(tt.add,tt),tt}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(tt){var nt;return(nt=tt.as)!==null&&nt!==void 0?nt:vgField(tt)}hash(){return`JoinAggregateTransform ${hash(this.transform)}`}assemble(){const tt=[],nt=[],rt=[];for(const st of this.transform.joinaggregate)nt.push(st.op),rt.push(this.getDefaultName(st)),tt.push(st.field===void 0?null:st.field);const ot=this.transform.groupby;return Object.assign({type:"joinaggregate",as:rt,ops:nt,fields:tt},ot!==void 0?{groupby:ot}:{})}}function getStackByFields(et){return et.stack.stackBy.reduce((tt,nt)=>{const rt=nt.fieldDef,ot=vgField(rt);return ot&&tt.push(ot),tt},[])}function isValidAsArray(et){return isArray(et)&&et.every(tt=>isString(tt))&&et.length>1}class StackNode extends DataFlowNode{constructor(tt,nt){super(tt),this._stack=nt}clone(){return new StackNode(null,duplicate(this._stack))}static makeFromTransform(tt,nt){const{stack:rt,groupby:ot,as:st,offset:ut="zero"}=nt,ct=[],ft=[];if(nt.sort!==void 0)for(const mt of nt.sort)ct.push(mt.field),ft.push(getFirstDefined(mt.order,"ascending"));const pt={field:ct,order:ft};let ht;return isValidAsArray(st)?ht=st:isString(st)?ht=[st,`${st}_end`]:ht=[`${nt.stack}_start`,`${nt.stack}_end`],new StackNode(tt,{dimensionFieldDefs:[],stackField:rt,groupby:ot,offset:ut,sort:pt,facetby:[],as:ht})}static makeFromEncoding(tt,nt){const rt=nt.stack,{encoding:ot}=nt;if(!rt)return null;const{groupbyChannels:st,fieldChannel:ut,offset:ct,impute:ft}=rt,pt=st.map(vt=>{const Tt=ot[vt];return getFieldDef(Tt)}).filter(vt=>!!vt),ht=getStackByFields(nt),mt=nt.encoding.order;let yt;return isArray(mt)||isFieldDef(mt)?yt=sortParams(mt):yt=ht.reduce((vt,Tt)=>(vt.field.push(Tt),vt.order.push(ut==="y"?"descending":"ascending"),vt),{field:[],order:[]}),new StackNode(tt,{dimensionFieldDefs:pt,stackField:nt.vgField(ut),facetby:[],stackby:ht,sort:yt,offset:ct,impute:ft,as:[nt.vgField(ut,{suffix:"start",forAs:!0}),nt.vgField(ut,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(tt){this._stack.facetby.push(...tt)}dependentFields(){const tt=new Set;return tt.add(this._stack.stackField),this.getGroupbyFields().forEach(tt.add,tt),this._stack.facetby.forEach(tt.add,tt),this._stack.sort.field.forEach(tt.add,tt),tt}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${hash(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:tt,impute:nt,groupby:rt}=this._stack;return tt.length>0?tt.map(ot=>ot.bin?nt?[vgField(ot,{binSuffix:"mid"})]:[vgField(ot,{}),vgField(ot,{binSuffix:"end"})]:[vgField(ot)]).flat():rt??[]}assemble(){const tt=[],{facetby:nt,dimensionFieldDefs:rt,stackField:ot,stackby:st,sort:ut,offset:ct,impute:ft,as:pt}=this._stack;if(ft)for(const ht of rt){const{bandPosition:mt=.5,bin:yt}=ht;if(yt){const vt=vgField(ht,{expr:"datum"}),Tt=vgField(ht,{expr:"datum",binSuffix:"end"});tt.push({type:"formula",expr:`${mt}*${vt}+${1-mt}*${Tt}`,as:vgField(ht,{binSuffix:"mid",forAs:!0})})}tt.push({type:"impute",field:ot,groupby:[...st,...nt],key:vgField(ht,{binSuffix:"mid"}),method:"value",value:0})}return tt.push({type:"stack",groupby:[...this.getGroupbyFields(),...nt],field:ot,sort:ut,as:pt,offset:ct}),tt}}class WindowTransformNode extends DataFlowNode{constructor(tt,nt){super(tt),this.transform=nt}clone(){return new WindowTransformNode(null,duplicate(this.transform))}addDimensions(tt){this.transform.groupby=unique(this.transform.groupby.concat(tt),nt=>nt)}dependentFields(){var tt,nt;const rt=new Set;return((tt=this.transform.groupby)!==null&&tt!==void 0?tt:[]).forEach(rt.add,rt),((nt=this.transform.sort)!==null&&nt!==void 0?nt:[]).forEach(ot=>rt.add(ot.field)),this.transform.window.map(ot=>ot.field).filter(ot=>ot!==void 0).forEach(rt.add,rt),rt}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(tt){var nt;return(nt=tt.as)!==null&&nt!==void 0?nt:vgField(tt)}hash(){return`WindowTransform ${hash(this.transform)}`}assemble(){var tt;const nt=[],rt=[],ot=[],st=[];for(const yt of this.transform.window)rt.push(yt.op),ot.push(this.getDefaultName(yt)),st.push(yt.param===void 0?null:yt.param),nt.push(yt.field===void 0?null:yt.field);const ut=this.transform.frame,ct=this.transform.groupby;if(ut&&ut[0]===null&&ut[1]===null&&rt.every(yt=>isAggregateOp(yt)))return Object.assign({type:"joinaggregate",as:ot,ops:rt,fields:nt},ct!==void 0?{groupby:ct}:{});const ft=[],pt=[];if(this.transform.sort!==void 0)for(const yt of this.transform.sort)ft.push(yt.field),pt.push((tt=yt.order)!==null&&tt!==void 0?tt:"ascending");const ht={field:ft,order:pt},mt=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:st,as:ot,ops:rt,fields:nt,sort:ht},mt!==void 0?{ignorePeers:mt}:{}),ct!==void 0?{groupby:ct}:{}),ut!==void 0?{frame:ut}:{})}}function cloneSubtree(et){function tt(nt){if(!(nt instanceof FacetNode)){const rt=nt.clone();if(rt instanceof OutputNode){const ot=FACET_SCALE_PREFIX+rt.getSource();rt.setSource(ot),et.model.component.data.outputNodes[ot]=rt}else(rt instanceof AggregateNode||rt instanceof StackNode||rt instanceof WindowTransformNode||rt instanceof JoinAggregateTransformNode)&&rt.addDimensions(et.fields);for(const ot of nt.children.flatMap(tt))ot.parent=rt;return[rt]}return nt.children.flatMap(tt)}return tt}function moveFacetDown(et){if(et instanceof FacetNode)if(et.numChildren()===1&&!(et.children[0]instanceof OutputNode)){const tt=et.children[0];(tt instanceof AggregateNode||tt instanceof StackNode||tt instanceof WindowTransformNode||tt instanceof JoinAggregateTransformNode)&&tt.addDimensions(et.fields),tt.swapWithParent(),moveFacetDown(et)}else{const tt=et.model.component.data.main;moveMainDownToFacet(tt);const nt=cloneSubtree(et),rt=et.children.map(nt).flat();for(const ot of rt)ot.parent=tt}else et.children.map(moveFacetDown)}function moveMainDownToFacet(et){if(et instanceof OutputNode&&et.type===DataSourceType.Main&&et.numChildren()===1){const tt=et.children[0];tt instanceof FacetNode||(tt.swapWithParent(),moveMainDownToFacet(et))}}const FACET_SCALE_PREFIX="scale_",MAX_OPTIMIZATION_RUNS=5;function checkLinks(et){for(const tt of et){for(const nt of tt.children)if(nt.parent!==tt)return!1;if(!checkLinks(tt.children))return!1}return!0}function runOptimizer(et,tt){let nt=!1;for(const rt of tt)nt=et.optimize(rt)||nt;return nt}function optimizationDataflowHelper(et,tt,nt){let rt=et.sources,ot=!1;return ot=runOptimizer(new RemoveUnnecessaryOutputNodes,rt)||ot,ot=runOptimizer(new RemoveUnnecessaryIdentifierNodes(tt),rt)||ot,rt=rt.filter(st=>st.numChildren()>0),ot=runOptimizer(new RemoveUnusedSubtrees,rt)||ot,rt=rt.filter(st=>st.numChildren()>0),nt||(ot=runOptimizer(new MoveParseUp,rt)||ot,ot=runOptimizer(new MergeBins(tt),rt)||ot,ot=runOptimizer(new RemoveDuplicateTimeUnits,rt)||ot,ot=runOptimizer(new MergeParse,rt)||ot,ot=runOptimizer(new MergeAggregates,rt)||ot,ot=runOptimizer(new MergeTimeUnits,rt)||ot,ot=runOptimizer(new MergeIdenticalNodes,rt)||ot,ot=runOptimizer(new MergeOutputs,rt)||ot),et.sources=rt,ot}function optimizeDataflow(et,tt){checkLinks(et.sources);let nt=0,rt=0;for(let ot=0;ot<MAX_OPTIMIZATION_RUNS&&optimizationDataflowHelper(et,tt,!0);ot++)nt++;et.sources.map(moveFacetDown);for(let ot=0;ot<MAX_OPTIMIZATION_RUNS&&optimizationDataflowHelper(et,tt,!1);ot++)rt++;checkLinks(et.sources),Math.max(nt,rt)===MAX_OPTIMIZATION_RUNS&&warn(`Maximum optimization runs(${MAX_OPTIMIZATION_RUNS}) reached.`)}class SignalRefWrapper{constructor(tt){Object.defineProperty(this,"signal",{enumerable:!0,get:tt})}static fromName(tt,nt){return new SignalRefWrapper(()=>tt(nt))}}var __rest$8=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function parseScaleDomain(et){isUnitModel(et)?parseUnitScaleDomain(et):parseNonUnitScaleDomain(et)}function parseUnitScaleDomain(et){const tt=et.component.scales;for(const nt of keys$1(tt)){const rt=parseDomainForChannel(et,nt);if(tt[nt].setWithExplicit("domains",rt),parseSelectionDomain(et,nt),et.component.data.isFaceted){let st=et;for(;!isFacetModel(st)&&st.parent;)st=st.parent;if(st.component.resolve.scale[nt]==="shared")for(const ct of rt.value)isDataRefDomain(ct)&&(ct.data=FACET_SCALE_PREFIX+ct.data.replace(FACET_SCALE_PREFIX,""))}}}function parseNonUnitScaleDomain(et){for(const nt of et.children)parseScaleDomain(nt);const tt=et.component.scales;for(const nt of keys$1(tt)){let rt,ot=null;for(const st of et.children){const ut=st.component.scales[nt];if(ut){rt===void 0?rt=ut.getWithExplicit("domains"):rt=mergeValuesWithExplicit(rt,ut.getWithExplicit("domains"),"domains","scale",domainsTieBreaker);const ct=ut.get("selectionExtent");ot&&ct&&ot.param!==ct.param&&warn(NEEDS_SAME_SELECTION),ot=ct}}tt[nt].setWithExplicit("domains",rt),ot&&tt[nt].set("selectionExtent",ot,!0)}}function normalizeUnaggregatedDomain(et,tt,nt,rt){if(et==="unaggregated"){const{valid:ot,reason:st}=canUseUnaggregatedDomain(tt,nt);if(!ot){warn(st);return}}else if(et===void 0&&rt.useUnaggregatedDomain){const{valid:ot}=canUseUnaggregatedDomain(tt,nt);if(ot)return"unaggregated"}return et}function parseDomainForChannel(et,tt){const nt=et.getScaleComponent(tt).get("type"),{encoding:rt}=et,ot=normalizeUnaggregatedDomain(et.scaleDomain(tt),et.typedFieldDef(tt),nt,et.config.scale);return ot!==et.scaleDomain(tt)&&(et.specifiedScales[tt]=Object.assign(Object.assign({},et.specifiedScales[tt]),{domain:ot})),tt==="x"&&getFieldOrDatumDef(rt.x2)?getFieldOrDatumDef(rt.x)?mergeValuesWithExplicit(parseSingleChannelDomain(nt,ot,et,"x"),parseSingleChannelDomain(nt,ot,et,"x2"),"domain","scale",domainsTieBreaker):parseSingleChannelDomain(nt,ot,et,"x2"):tt==="y"&&getFieldOrDatumDef(rt.y2)?getFieldOrDatumDef(rt.y)?mergeValuesWithExplicit(parseSingleChannelDomain(nt,ot,et,"y"),parseSingleChannelDomain(nt,ot,et,"y2"),"domain","scale",domainsTieBreaker):parseSingleChannelDomain(nt,ot,et,"y2"):parseSingleChannelDomain(nt,ot,et,tt)}function mapDomainToDataSignal(et,tt,nt){return et.map(rt=>({signal:`{data: ${valueExpr(rt,{timeUnit:nt,type:tt})}}`}))}function convertDomainIfItIsDateTime(et,tt,nt){var rt;const ot=(rt=normalizeTimeUnit(nt))===null||rt===void 0?void 0:rt.unit;return tt==="temporal"||ot?mapDomainToDataSignal(et,tt,ot):[et]}function parseSingleChannelDomain(et,tt,nt,rt){const{encoding:ot}=nt,st=getFieldOrDatumDef(ot[rt]),{type:ut}=st,ct=st.timeUnit;if(isDomainUnionWith(tt)){const mt=parseSingleChannelDomain(et,void 0,nt,rt),yt=convertDomainIfItIsDateTime(tt.unionWith,ut,ct);return makeExplicit([...yt,...mt.value])}else{if(isSignalRef(tt))return makeExplicit([tt]);if(tt&&tt!=="unaggregated"&&!isParameterDomain(tt))return makeExplicit(convertDomainIfItIsDateTime(tt,ut,ct))}const ft=nt.stack;if(ft&&rt===ft.fieldChannel){if(ft.offset==="normalize")return makeImplicit([[0,1]]);const mt=nt.requestDataName(DataSourceType.Main);return makeImplicit([{data:mt,field:nt.vgField(rt,{suffix:"start"})},{data:mt,field:nt.vgField(rt,{suffix:"end"})}])}const pt=isScaleChannel(rt)&&isFieldDef(st)?domainSort(nt,rt,et):void 0;if(isDatumDef(st)){const mt=convertDomainIfItIsDateTime([st.datum],ut,ct);return makeImplicit(mt)}const ht=st;if(tt==="unaggregated"){const mt=nt.requestDataName(DataSourceType.Main),{field:yt}=st;return makeImplicit([{data:mt,field:vgField({field:yt,aggregate:"min"})},{data:mt,field:vgField({field:yt,aggregate:"max"})}])}else if(isBinning(ht.bin)){if(hasDiscreteDomain(et))return makeImplicit(et==="bin-ordinal"?[]:[{data:isBoolean(pt)?nt.requestDataName(DataSourceType.Main):nt.requestDataName(DataSourceType.Raw),field:nt.vgField(rt,binRequiresRange(ht,rt)?{binSuffix:"range"}:{}),sort:pt===!0||!isObject(pt)?{field:nt.vgField(rt,{}),op:"min"}:pt}]);{const{bin:mt}=ht;if(isBinning(mt)){const yt=getBinSignalName(nt,ht.field,mt);return makeImplicit([new SignalRefWrapper(()=>{const vt=nt.getSignalName(yt);return`[${vt}.start, ${vt}.stop]`})])}else return makeImplicit([{data:nt.requestDataName(DataSourceType.Main),field:nt.vgField(rt,{})}])}}else if(ht.timeUnit&&contains(["time","utc"],et)&&hasBandEnd(ht,isUnitModel(nt)?nt.encoding[getSecondaryRangeChannel(rt)]:void 0,nt.markDef,nt.config)){const mt=nt.requestDataName(DataSourceType.Main);return makeImplicit([{data:mt,field:nt.vgField(rt)},{data:mt,field:nt.vgField(rt,{suffix:"end"})}])}else return makeImplicit(pt?[{data:isBoolean(pt)?nt.requestDataName(DataSourceType.Main):nt.requestDataName(DataSourceType.Raw),field:nt.vgField(rt),sort:pt}]:[{data:nt.requestDataName(DataSourceType.Main),field:nt.vgField(rt)}])}function normalizeSortField(et,tt){const{op:nt,field:rt,order:ot}=et;return Object.assign(Object.assign({op:nt??(tt?"sum":DEFAULT_SORT_OP)},rt?{field:replacePathInField(rt)}:{}),ot?{order:ot}:{})}function parseSelectionDomain(et,tt){var nt;const rt=et.component.scales[tt],ot=et.specifiedScales[tt].domain,st=(nt=et.fieldDef(tt))===null||nt===void 0?void 0:nt.bin,ut=isParameterDomain(ot)&&ot,ct=isBinParams(st)&&isParameterExtent(st.extent)&&st.extent;(ut||ct)&&rt.set("selectionExtent",ut??ct,!0)}function domainSort(et,tt,nt){if(!hasDiscreteDomain(nt))return;const rt=et.fieldDef(tt),ot=rt.sort;if(isSortArray(ot))return{op:"min",field:sortArrayIndexField(rt,tt),order:"ascending"};const{stack:st}=et,ut=st?new Set([...st.groupbyFields,...st.stackBy.map(ct=>ct.fieldDef.field)]):void 0;if(isSortField(ot)){const ct=st&&!ut.has(ot.field);return normalizeSortField(ot,ct)}else if(isSortByEncoding(ot)){const{encoding:ct,order:ft}=ot,pt=et.fieldDef(ct),{aggregate:ht,field:mt}=pt,yt=st&&!ut.has(mt);if(isArgminDef(ht)||isArgmaxDef(ht))return normalizeSortField({field:vgField(pt),order:ft},yt);if(isAggregateOp(ht)||!ht)return normalizeSortField({op:ht,field:mt,order:ft},yt)}else{if(ot==="descending")return{op:"min",field:et.vgField(tt),order:"descending"};if(contains(["ascending",void 0],ot))return!0}}function canUseUnaggregatedDomain(et,tt){const{aggregate:nt,type:rt}=et;return nt?isString(nt)&&!SHARED_DOMAIN_OPS.has(nt)?{valid:!1,reason:unaggregateDomainWithNonSharedDomainOp(nt)}:rt==="quantitative"&&tt==="log"?{valid:!1,reason:unaggregatedDomainWithLogScale(et)}:{valid:!0}:{valid:!1,reason:unaggregateDomainHasNoEffectForRawField(et)}}function domainsTieBreaker(et,tt,nt,rt){return et.explicit&&tt.explicit&&warn(mergeConflictingDomainProperty(nt,rt,et.value,tt.value)),{explicit:et.explicit,value:[...et.value,...tt.value]}}function mergeDomains(et){const tt=unique(et.map(ut=>isDataRefDomain(ut)?__rest$8(ut,["sort"]):ut),hash),nt=unique(et.map(ut=>{if(isDataRefDomain(ut)){const ct=ut.sort;return ct!==void 0&&!isBoolean(ct)&&("op"in ct&&ct.op==="count"&&delete ct.field,ct.order==="ascending"&&delete ct.order),ct}}).filter(ut=>ut!==void 0),hash);if(tt.length===0)return;if(tt.length===1){const ut=et[0];if(isDataRefDomain(ut)&&nt.length>0){let ct=nt[0];if(nt.length>1)warn(MORE_THAN_ONE_SORT),ct=!0;else if(isObject(ct)&&"field"in ct){const ft=ct.field;ut.field===ft&&(ct=ct.order?{order:ct.order}:!0)}return Object.assign(Object.assign({},ut),{sort:ct})}return ut}const rt=unique(nt.map(ut=>isBoolean(ut)||!("op"in ut)||isString(ut.op)&&ut.op in MULTIDOMAIN_SORT_OP_INDEX?ut:(warn(domainSortDropped(ut)),!0)),hash);let ot;rt.length===1?ot=rt[0]:rt.length>1&&(warn(MORE_THAN_ONE_SORT),ot=!0);const st=unique(et.map(ut=>isDataRefDomain(ut)?ut.data:null),ut=>ut);return st.length===1&&st[0]!==null?Object.assign({data:st[0],fields:tt.map(ct=>ct.field)},ot?{sort:ot}:{}):Object.assign({fields:tt},ot?{sort:ot}:{})}function getFieldFromDomain(et){if(isDataRefDomain(et)&&isString(et.field))return et.field;if(isDataRefUnionedDomain(et)){let tt;for(const nt of et.fields)if(isDataRefDomain(nt)&&isString(nt.field)){if(!tt)tt=nt.field;else if(tt!==nt.field)return warn(FACETED_INDEPENDENT_DIFFERENT_SOURCES),tt}return warn(FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES),tt}else if(isFieldRefUnionDomain(et)){warn(FACETED_INDEPENDENT_SAME_SOURCE);const tt=et.fields[0];return isString(tt)?tt:void 0}}function assembleDomain(et,tt){const rt=et.component.scales[tt].get("domains").map(ot=>(isDataRefDomain(ot)&&(ot.data=et.lookupDataSource(ot.data)),ot));return mergeDomains(rt)}var __rest$7=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function assembleScales(et){return isLayerModel(et)||isConcatModel(et)?et.children.reduce((tt,nt)=>tt.concat(assembleScales(nt)),assembleScalesForModel(et)):assembleScalesForModel(et)}function assembleScalesForModel(et){return keys$1(et.component.scales).reduce((tt,nt)=>{const rt=et.component.scales[nt];if(rt.merged)return tt;const ot=rt.combine(),{name:st,type:ut,selectionExtent:ct,domains:ft,range:pt,reverse:ht}=ot,mt=__rest$7(ot,["name","type","selectionExtent","domains","range","reverse"]),yt=assembleScaleRange(ot.range,st,nt,et),vt=assembleDomain(et,nt),Tt=ct?assembleSelectionScaleDomain(et,ct,rt,vt):null;return tt.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:st,type:ut},vt?{domain:vt}:{}),Tt?{domainRaw:Tt}:{}),{range:yt}),ht!==void 0?{reverse:ht}:{}),mt)),tt},[])}function assembleScaleRange(et,tt,nt,rt){if(isXorY(nt)){if(isVgRangeStep(et))return{step:{signal:`${tt}_step`}}}else if(isObject(et)&&isDataRefDomain(et))return Object.assign(Object.assign({},et),{data:rt.lookupDataSource(et.data)});return et}class ScaleComponent extends Split{constructor(tt,nt){super({},{name:tt}),this.merged=!1,this.setWithExplicit("type",nt)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:some(this.get("domains"),tt=>isArray(tt)&&tt.length===2&&tt[0]<=0&&tt[1]>=0)}}const RANGE_PROPERTIES=["range","scheme"];function parseUnitScaleRange(et){const tt=et.component.scales;for(const nt of SCALE_CHANNELS){const rt=tt[nt];if(!rt)continue;const ot=parseRangeForChannel(nt,et);rt.setWithExplicit("range",ot)}}function getBinStepSignal(et,tt){const nt=et.fieldDef(tt);if(nt?.bin){const{bin:rt,field:ot}=nt,st=getSizeChannel(tt),ut=et.getName(st);if(isObject(rt)&&rt.binned&&rt.step!==void 0)return new SignalRefWrapper(()=>{const ct=et.scaleName(tt),ft=`(domain("${ct}")[1] - domain("${ct}")[0]) / ${rt.step}`;return`${et.getSignalName(ut)} / (${ft})`});if(isBinning(rt)){const ct=getBinSignalName(et,ot,rt);return new SignalRefWrapper(()=>{const ft=et.getSignalName(ct),pt=`(${ft}.stop - ${ft}.start) / ${ft}.step`;return`${et.getSignalName(ut)} / (${pt})`})}}}function parseRangeForChannel(et,tt){const nt=tt.specifiedScales[et],{size:rt}=tt,st=tt.getScaleComponent(et).get("type");for(const mt of RANGE_PROPERTIES)if(nt[mt]!==void 0){const yt=scaleTypeSupportProperty(st,mt),vt=channelScalePropertyIncompatability(et,mt);if(!yt)warn(scalePropertyNotWorkWithScaleType(st,mt,et));else if(vt)warn(vt);else switch(mt){case"range":{const Tt=nt.range;if(isArray(Tt)){if(isXorY(et))return makeExplicit(Tt.map(Et=>{if(Et==="width"||Et==="height"){const xt=tt.getName(Et),At=tt.getSignalName.bind(tt);return SignalRefWrapper.fromName(At,xt)}return Et}))}else if(isObject(Tt))return makeExplicit({data:tt.requestDataName(DataSourceType.Main),field:Tt.field,sort:{op:"min",field:tt.vgField(et)}});return makeExplicit(Tt)}case"scheme":return makeExplicit(parseScheme(nt[mt]))}}const ut=et===X||et==="xOffset"?"width":"height",ct=rt[ut];if(isStep(ct)){if(isXorY(et))if(hasDiscreteDomain(st)){const mt=getPositionStep(ct,tt,et);if(mt)return makeExplicit({step:mt})}else warn(stepDropped(ut));else if(isXorYOffset(et)){const mt=et===XOFFSET?"x":"y";if(tt.getScaleComponent(mt).get("type")==="band"){const Tt=getOffsetStep(ct,st);if(Tt)return makeExplicit(Tt)}}}const{rangeMin:ft,rangeMax:pt}=nt,ht=defaultRange(et,tt);return(ft!==void 0||pt!==void 0)&&scaleTypeSupportProperty(st,"rangeMin")&&isArray(ht)&&ht.length===2?makeExplicit([ft??ht[0],pt??ht[1]]):makeImplicit(ht)}function parseScheme(et){return isExtendedScheme(et)?Object.assign({scheme:et.name},omit$1(et,["name"])):{scheme:et}}function defaultRange(et,tt){const{size:nt,config:rt,mark:ot,encoding:st}=tt,ut=tt.getSignalName.bind(tt),{type:ct}=getFieldOrDatumDef(st[et]),pt=tt.getScaleComponent(et).get("type"),{domain:ht,domainMid:mt}=tt.specifiedScales[et];switch(et){case X:case Y:{if(contains(["point","band"],pt)){const Tt=getDiscretePositionSize(et,nt,rt.view);if(isStep(Tt))return{step:getPositionStep(Tt,tt,et)}}const yt=getSizeChannel(et),vt=tt.getName(yt);return et===Y&&hasContinuousDomain(pt)?[SignalRefWrapper.fromName(ut,vt),0]:[0,SignalRefWrapper.fromName(ut,vt)]}case XOFFSET:case YOFFSET:return getOffsetRange(et,tt,pt);case SIZE$1:{const yt=tt.component.scales[et].get("zero"),vt=sizeRangeMin(ot,yt,rt),Tt=sizeRangeMax(ot,nt,tt,rt);return isContinuousToDiscrete(pt)?interpolateRange(vt,Tt,defaultContinuousToDiscreteCount(pt,rt,ht,et)):[vt,Tt]}case THETA:return[0,Math.PI*2];case ANGLE:return[0,360];case RADIUS:return[0,new SignalRefWrapper(()=>{const yt=tt.getSignalName("width"),vt=tt.getSignalName("height");return`min(${yt},${vt})/2`})];case STROKEWIDTH:return[rt.scale.minStrokeWidth,rt.scale.maxStrokeWidth];case STROKEDASH:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case SHAPE:return"symbol";case COLOR:case FILL:case STROKE:return pt==="ordinal"?ct==="nominal"?"category":"ordinal":mt!==void 0?"diverging":ot==="rect"||ot==="geoshape"?"heatmap":"ramp";case OPACITY:case FILLOPACITY:case STROKEOPACITY:return[rt.scale.minOpacity,rt.scale.maxOpacity]}}function getPositionStep(et,tt,nt){var rt,ot,st,ut,ct;const{encoding:ft}=tt,pt=tt.getScaleComponent(nt),ht=getOffsetScaleChannel(nt),mt=ft[ht];if(getStepFor({step:et,offsetIsDiscrete:isFieldOrDatumDef(mt)&&isDiscrete$1(mt.type)})==="offset"&&channelHasFieldOrDatum(ft,ht)){const vt=tt.getScaleComponent(ht);let Et=`domain('${tt.scaleName(ht)}').length`;if(vt.get("type")==="band"){const At=(ot=(rt=vt.get("paddingInner"))!==null&&rt!==void 0?rt:vt.get("padding"))!==null&&ot!==void 0?ot:0,Ct=(ut=(st=vt.get("paddingOuter"))!==null&&st!==void 0?st:vt.get("padding"))!==null&&ut!==void 0?ut:0;Et=`bandspace(${Et}, ${At}, ${Ct})`}const xt=(ct=pt.get("paddingInner"))!==null&&ct!==void 0?ct:pt.get("padding");return{signal:`${et.step} * ${Et} / (1-${exprFromSignalRefOrValue(xt)})`}}else return et.step}function getOffsetStep(et,tt){if(getStepFor({step:et,offsetIsDiscrete:hasDiscreteDomain(tt)})==="offset")return{step:et.step}}function getOffsetRange(et,tt,nt){const rt=et===XOFFSET?"x":"y",st=tt.getScaleComponent(rt).get("type"),ut=tt.scaleName(rt);if(st==="band"){const ct=getDiscretePositionSize(rt,tt.size,tt.config.view);if(isStep(ct)){const ft=getOffsetStep(ct,nt);if(ft)return ft}return[0,{signal:`bandwidth('${ut}')`}]}else return never(`Cannot use ${et} scale if ${rt} scale is not discrete.`)}function getDiscretePositionSize(et,tt,nt){const rt=et===X?"width":"height",ot=tt[rt];return ot||getViewConfigDiscreteSize(nt,rt)}function defaultContinuousToDiscreteCount(et,tt,nt,rt){switch(et){case"quantile":return tt.scale.quantileCount;case"quantize":return tt.scale.quantizeCount;case"threshold":return nt!==void 0&&isArray(nt)?nt.length+1:(warn(domainRequiredForThresholdScale(rt)),3)}}function interpolateRange(et,tt,nt){const rt=()=>{const ot=signalOrStringValue(tt),st=signalOrStringValue(et),ut=`(${ot} - ${st}) / (${nt} - 1)`;return`sequence(${st}, ${ot} + ${ut}, ${ut})`};return isSignalRef(tt)?new SignalRefWrapper(rt):{signal:rt()}}function sizeRangeMin(et,tt,nt){if(tt)return isSignalRef(tt)?{signal:`${tt.signal} ? 0 : ${sizeRangeMin(et,!1,nt)}`}:0;switch(et){case"bar":case"tick":return nt.scale.minBandSize;case"line":case"trail":case"rule":return nt.scale.minStrokeWidth;case"text":return nt.scale.minFontSize;case"point":case"square":case"circle":return nt.scale.minSize}throw new Error(incompatibleChannel("size",et))}const MAX_SIZE_RANGE_STEP_RATIO=.95;function sizeRangeMax(et,tt,nt,rt){const ot={x:getBinStepSignal(nt,"x"),y:getBinStepSignal(nt,"y")};switch(et){case"bar":case"tick":{if(rt.scale.maxBandSize!==void 0)return rt.scale.maxBandSize;const st=minXYStep(tt,ot,rt.view);return isNumber$1(st)?st-1:new SignalRefWrapper(()=>`${st.signal} - 1`)}case"line":case"trail":case"rule":return rt.scale.maxStrokeWidth;case"text":return rt.scale.maxFontSize;case"point":case"square":case"circle":{if(rt.scale.maxSize)return rt.scale.maxSize;const st=minXYStep(tt,ot,rt.view);return isNumber$1(st)?Math.pow(MAX_SIZE_RANGE_STEP_RATIO*st,2):new SignalRefWrapper(()=>`pow(${MAX_SIZE_RANGE_STEP_RATIO} * ${st.signal}, 2)`)}}throw new Error(incompatibleChannel("size",et))}function minXYStep(et,tt,nt){const rt=isStep(et.width)?et.width.step:getViewConfigDiscreteStep(nt,"width"),ot=isStep(et.height)?et.height.step:getViewConfigDiscreteStep(nt,"height");return tt.x||tt.y?new SignalRefWrapper(()=>`min(${[tt.x?tt.x.signal:rt,tt.y?tt.y.signal:ot].join(", ")})`):Math.min(rt,ot)}function parseScaleProperty(et,tt){isUnitModel(et)?parseUnitScaleProperty(et,tt):parseNonUnitScaleProperty(et,tt)}function parseUnitScaleProperty(et,tt){const nt=et.component.scales,{config:rt,encoding:ot,markDef:st,specifiedScales:ut}=et;for(const ct of keys$1(nt)){const ft=ut[ct],pt=nt[ct],ht=et.getScaleComponent(ct),mt=getFieldOrDatumDef(ot[ct]),yt=ft[tt],vt=ht.get("type"),Tt=ht.get("padding"),Et=ht.get("paddingInner"),xt=scaleTypeSupportProperty(vt,tt),At=channelScalePropertyIncompatability(ct,tt);if(yt!==void 0&&(xt?At&&warn(At):warn(scalePropertyNotWorkWithScaleType(vt,tt,ct))),xt&&At===void 0)if(yt!==void 0){const Ct=mt.timeUnit,$t=mt.type;switch(tt){case"domainMax":case"domainMin":isDateTime(ft[tt])||$t==="temporal"||Ct?pt.set(tt,{signal:valueExpr(ft[tt],{type:$t,timeUnit:Ct})},!0):pt.set(tt,ft[tt],!0);break;default:pt.copyKeyFromObject(tt,ft)}}else{const Ct=tt in scaleRules?scaleRules[tt]({model:et,channel:ct,fieldOrDatumDef:mt,scaleType:vt,scalePadding:Tt,scalePaddingInner:Et,domain:ft.domain,domainMin:ft.domainMin,domainMax:ft.domainMax,markDef:st,config:rt,hasNestedOffsetScale:channelHasNestedOffsetScale(ot,ct),hasSecondaryRangeChannel:!!ot[getSecondaryRangeChannel(ct)]}):rt.scale[tt];Ct!==void 0&&pt.set(tt,Ct,!1)}}}const scaleRules={bins:({model:et,fieldOrDatumDef:tt})=>isFieldDef(tt)?bins(et,tt):void 0,interpolate:({channel:et,fieldOrDatumDef:tt})=>interpolate(et,tt.type),nice:({scaleType:et,channel:tt,domain:nt,domainMin:rt,domainMax:ot,fieldOrDatumDef:st})=>nice(et,tt,nt,rt,ot,st),padding:({channel:et,scaleType:tt,fieldOrDatumDef:nt,markDef:rt,config:ot})=>padding(et,tt,ot.scale,nt,rt,ot.bar),paddingInner:({scalePadding:et,channel:tt,markDef:nt,scaleType:rt,config:ot,hasNestedOffsetScale:st})=>paddingInner(et,tt,nt.type,rt,ot.scale,st),paddingOuter:({scalePadding:et,channel:tt,scaleType:nt,scalePaddingInner:rt,config:ot,hasNestedOffsetScale:st})=>paddingOuter(et,tt,nt,rt,ot.scale,st),reverse:({fieldOrDatumDef:et,scaleType:tt,channel:nt,config:rt})=>{const ot=isFieldDef(et)?et.sort:void 0;return reverse(tt,ot,nt,rt.scale)},zero:({channel:et,fieldOrDatumDef:tt,domain:nt,markDef:rt,scaleType:ot,config:st,hasSecondaryRangeChannel:ut})=>zero(et,tt,nt,rt,ot,st.scale,ut)};function parseScaleRange(et){isUnitModel(et)?parseUnitScaleRange(et):parseNonUnitScaleProperty(et,"range")}function parseNonUnitScaleProperty(et,tt){const nt=et.component.scales;for(const rt of et.children)tt==="range"?parseScaleRange(rt):parseScaleProperty(rt,tt);for(const rt of keys$1(nt)){let ot;for(const st of et.children){const ut=st.component.scales[rt];if(ut){const ct=ut.getWithExplicit(tt);ot=mergeValuesWithExplicit(ot,ct,tt,"scale",tieBreakByComparing((ft,pt)=>{switch(tt){case"range":return ft.step&&pt.step?ft.step-pt.step:0}return 0}))}}nt[rt].setWithExplicit(tt,ot)}}function bins(et,tt){const nt=tt.bin;if(isBinning(nt)){const rt=getBinSignalName(et,tt.field,nt);return new SignalRefWrapper(()=>et.getSignalName(rt))}else if(isBinned(nt)&&isBinParams(nt)&&nt.step!==void 0)return{step:nt.step}}function interpolate(et,tt){if(contains([COLOR,FILL,STROKE],et)&&tt!=="nominal")return"hcl"}function nice(et,tt,nt,rt,ot,st){var ut;if(!(((ut=getFieldDef(st))===null||ut===void 0?void 0:ut.bin)||isArray(nt)||ot!=null||rt!=null||contains([ScaleType.TIME,ScaleType.UTC],et)))return isXorY(tt)?!0:void 0}function padding(et,tt,nt,rt,ot,st){if(isXorY(et)){if(isContinuousToContinuous(tt)){if(nt.continuousPadding!==void 0)return nt.continuousPadding;const{type:ut,orient:ct}=ot;if(ut==="bar"&&!(isFieldDef(rt)&&(rt.bin||rt.timeUnit))&&(ct==="vertical"&&et==="x"||ct==="horizontal"&&et==="y"))return st.continuousBandSize}if(tt===ScaleType.POINT)return nt.pointPadding}}function paddingInner(et,tt,nt,rt,ot,st=!1){if(et===void 0){if(isXorY(tt)){const{bandPaddingInner:ut,barBandPaddingInner:ct,rectBandPaddingInner:ft,bandWithNestedOffsetPaddingInner:pt}=ot;return st?pt:getFirstDefined(ut,nt==="bar"?ct:ft)}else if(isXorYOffset(tt)&&rt===ScaleType.BAND)return ot.offsetBandPaddingInner}}function paddingOuter(et,tt,nt,rt,ot,st=!1){if(et===void 0){if(isXorY(tt)){const{bandPaddingOuter:ut,bandWithNestedOffsetPaddingOuter:ct}=ot;if(st)return ct;if(nt===ScaleType.BAND)return getFirstDefined(ut,isSignalRef(rt)?{signal:`${rt.signal}/2`}:rt/2)}else if(isXorYOffset(tt)){if(nt===ScaleType.POINT)return .5;if(nt===ScaleType.BAND)return ot.offsetBandPaddingOuter}}}function reverse(et,tt,nt,rt){if(nt==="x"&&rt.xReverse!==void 0)return hasContinuousDomain(et)&&tt==="descending"?isSignalRef(rt.xReverse)?{signal:`!${rt.xReverse.signal}`}:!rt.xReverse:rt.xReverse;if(hasContinuousDomain(et)&&tt==="descending")return!0}function zero(et,tt,nt,rt,ot,st,ut){if(!!nt&&nt!=="unaggregated"&&hasContinuousDomain(ot)){if(isArray(nt)){const ft=nt[0],pt=nt[nt.length-1];if(ft<=0&&pt>=0)return!0}return!1}if(et==="size"&&tt.type==="quantitative"&&!isContinuousToDiscrete(ot))return!0;if(!(isFieldDef(tt)&&tt.bin)&&contains([...POSITION_SCALE_CHANNELS,...POLAR_POSITION_SCALE_CHANNELS],et)){const{orient:ft,type:pt}=rt;return contains(["bar","area","line","trail"],pt)&&(ft==="horizontal"&&et==="y"||ft==="vertical"&&et==="x")?!1:contains(["bar","area"],pt)&&!ut?!0:st?.zero}return!1}function scaleType(et,tt,nt,rt,ot=!1){const st=defaultType(tt,nt,rt,ot),{type:ut}=et;return isScaleChannel(tt)?ut!==void 0?channelSupportScaleType(tt,ut)?isFieldDef(nt)&&!scaleTypeSupportDataType(ut,nt.type)?(warn(scaleTypeNotWorkWithFieldDef(ut,st)),st):ut:(warn(scaleTypeNotWorkWithChannel(tt,ut,st)),st):st:null}function defaultType(et,tt,nt,rt){var ot;switch(tt.type){case"nominal":case"ordinal":{if(isColorChannel(et)||rangeType(et)==="discrete")return et==="shape"&&tt.type==="ordinal"&&warn(discreteChannelCannotEncode(et,"ordinal")),"ordinal";if(isXorY(et)||isXorYOffset(et)){if(contains(["rect","bar","image","rule"],nt.type)||rt)return"band"}else if(nt.type==="arc"&&et in POLAR_POSITION_SCALE_CHANNEL_INDEX)return"band";const st=nt[getSizeChannel(et)];return isRelativeBandSize(st)||isPositionFieldOrDatumDef(tt)&&((ot=tt.axis)===null||ot===void 0?void 0:ot.tickBand)?"band":"point"}case"temporal":return isColorChannel(et)?"time":rangeType(et)==="discrete"?(warn(discreteChannelCannotEncode(et,"temporal")),"ordinal"):isFieldDef(tt)&&tt.timeUnit&&normalizeTimeUnit(tt.timeUnit).utc?"utc":"time";case"quantitative":return isColorChannel(et)?isFieldDef(tt)&&isBinning(tt.bin)?"bin-ordinal":"linear":rangeType(et)==="discrete"?(warn(discreteChannelCannotEncode(et,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(invalidFieldType(tt.type))}function parseScales(et,{ignoreRange:tt}={}){parseScaleCore(et),parseScaleDomain(et);for(const nt of NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES)parseScaleProperty(et,nt);tt||parseScaleRange(et)}function parseScaleCore(et){isUnitModel(et)?et.component.scales=parseUnitScaleCore(et):et.component.scales=parseNonUnitScaleCore(et)}function parseUnitScaleCore(et){const{encoding:tt,mark:nt,markDef:rt}=et,ot={};for(const st of SCALE_CHANNELS){const ut=getFieldOrDatumDef(tt[st]);if(ut&&nt===GEOSHAPE&&st===SHAPE&&ut.type===GEOJSON)continue;let ct=ut&&ut.scale;if(isXorYOffset(st)){const ft=getMainChannelFromOffsetChannel(st);if(!channelHasNestedOffsetScale(tt,ft)){ct&&warn(offsetEncodingScaleIgnored(st));continue}}if(ut&&ct!==null&&ct!==!1){ct??(ct={});const ft=channelHasNestedOffsetScale(tt,st),pt=scaleType(ct,st,ut,rt,ft);ot[st]=new ScaleComponent(et.scaleName(`${st}`,!0),{value:pt,explicit:ct.type===pt})}}return ot}const scaleTypeTieBreaker=tieBreakByComparing((et,tt)=>scaleTypePrecedence(et)-scaleTypePrecedence(tt));function parseNonUnitScaleCore(et){var tt,nt;const rt=et.component.scales={},ot={},st=et.component.resolve;for(const ut of et.children){parseScaleCore(ut);for(const ct of keys$1(ut.component.scales))if((tt=(nt=st.scale)[ct])!==null&&tt!==void 0||(nt[ct]=defaultScaleResolve(ct,et)),st.scale[ct]==="shared"){const ft=ot[ct],pt=ut.component.scales[ct].getWithExplicit("type");ft?scaleCompatible(ft.value,pt.value)?ot[ct]=mergeValuesWithExplicit(ft,pt,"type","scale",scaleTypeTieBreaker):(st.scale[ct]="independent",delete ot[ct]):ot[ct]=pt}}for(const ut of keys$1(ot)){const ct=et.scaleName(ut,!0),ft=ot[ut];rt[ut]=new ScaleComponent(ct,ft);for(const pt of et.children){const ht=pt.component.scales[ut];ht&&(pt.renameScale(ht.get("name"),ct),ht.merged=!0)}}return rt}var __rest$6=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class NameMap{constructor(){this.nameMap={}}rename(tt,nt){this.nameMap[tt]=nt}has(tt){return this.nameMap[tt]!==void 0}get(tt){for(;this.nameMap[tt]&&tt!==this.nameMap[tt];)tt=this.nameMap[tt];return tt}}function isUnitModel(et){return et?.type==="unit"}function isFacetModel(et){return et?.type==="facet"}function isConcatModel(et){return et?.type==="concat"}function isLayerModel(et){return et?.type==="layer"}class Model{constructor(tt,nt,rt,ot,st,ut,ct){var ft,pt;this.type=nt,this.parent=rt,this.config=st,this.correctDataNames=ht=>{var mt,yt,vt;return!((mt=ht.from)===null||mt===void 0)&&mt.data&&(ht.from.data=this.lookupDataSource(ht.from.data)),!((vt=(yt=ht.from)===null||yt===void 0?void 0:yt.facet)===null||vt===void 0)&&vt.data&&(ht.from.facet.data=this.lookupDataSource(ht.from.facet.data)),ht},this.parent=rt,this.config=st,this.view=replaceExprRef(ct),this.name=(ft=tt.name)!==null&&ft!==void 0?ft:ot,this.title=isText(tt.title)?{text:tt.title}:tt.title?replaceExprRef(tt.title):void 0,this.scaleNameMap=rt?rt.scaleNameMap:new NameMap,this.projectionNameMap=rt?rt.projectionNameMap:new NameMap,this.signalNameMap=rt?rt.signalNameMap:new NameMap,this.data=tt.data,this.description=tt.description,this.transforms=normalizeTransform((pt=tt.transform)!==null&&pt!==void 0?pt:[]),this.layout=nt==="layer"||nt==="unit"?{}:extractCompositionLayout(tt,nt,st),this.component={data:{sources:rt?rt.component.data.sources:[],outputNodes:rt?rt.component.data.outputNodes:{},outputNodeRefCounts:rt?rt.component.data.outputNodeRefCounts:{},isFaceted:isFacetSpec(tt)||rt?.component.data.isFaceted&&tt.data===void 0},layoutSize:new Split,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},ut?duplicate(ut):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){parseScales(this)}parseProjection(){parseProjection(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){parseLegend(this)}assembleEncodeFromView(tt){const nt=__rest$6(tt,["style"]),rt={};for(const ot of keys$1(nt)){const st=nt[ot];st!==void 0&&(rt[ot]=signalOrValueRef(st))}return rt}assembleGroupEncodeEntry(tt){let nt={};return this.view&&(nt=this.assembleEncodeFromView(this.view)),!tt&&(this.description&&(nt.description=signalOrValueRef(this.description)),this.type==="unit"||this.type==="layer")?Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},nt??{}):isEmpty$1(nt)?void 0:nt}assembleLayout(){if(!this.layout)return;const tt=this.layout,{spacing:nt}=tt,rt=__rest$6(tt,["spacing"]),{component:ot,config:st}=this,ut=assembleLayoutTitleBand(ot.layoutHeaders,st);return Object.assign(Object.assign(Object.assign({padding:nt},this.assembleDefaultLayout()),rt),ut?{titleBand:ut}:{})}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:tt}=this.component;let nt=[];for(const rt of FACET_CHANNELS)tt[rt].title&&nt.push(assembleTitleGroup(this,rt));for(const rt of HEADER_CHANNELS)nt=nt.concat(assembleHeaderGroups(this,rt));return nt}assembleAxes(){return assembleAxes(this.component.axes,this.config)}assembleLegends(){return assembleLegends(this)}assembleProjections(){return assembleProjections(this)}assembleTitle(){var tt,nt,rt;const ot=(tt=this.title)!==null&&tt!==void 0?tt:{},{encoding:st}=ot,ut=__rest$6(ot,["encoding"]),ct=Object.assign(Object.assign(Object.assign({},extractTitleConfig(this.config.title).nonMarkTitleProperties),ut),st?{encode:{update:st}}:{});if(ct.text)return contains(["unit","layer"],this.type)?contains(["middle",void 0],ct.anchor)&&((nt=ct.frame)!==null&&nt!==void 0||(ct.frame="group")):(rt=ct.anchor)!==null&&rt!==void 0||(ct.anchor="start"),isEmpty$1(ct)?void 0:ct}assembleGroup(tt=[]){const nt={};tt=tt.concat(this.assembleSignals()),tt.length>0&&(nt.signals=tt);const rt=this.assembleLayout();rt&&(nt.layout=rt),nt.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const ot=!this.parent||isFacetModel(this.parent)?assembleScales(this):[];ot.length>0&&(nt.scales=ot);const st=this.assembleAxes();st.length>0&&(nt.axes=st);const ut=this.assembleLegends();return ut.length>0&&(nt.legends=ut),nt}getName(tt){return varName((this.name?`${this.name}_`:"")+tt)}getDataName(tt){return this.getName(DataSourceType[tt].toLowerCase())}requestDataName(tt){const nt=this.getDataName(tt),rt=this.component.data.outputNodeRefCounts;return rt[nt]=(rt[nt]||0)+1,nt}getSizeSignalRef(tt){if(isFacetModel(this.parent)){const nt=getSizeTypeFromLayoutSizeType(tt),rt=getPositionScaleChannel(nt),ot=this.component.scales[rt];if(ot&&!ot.merged){const st=ot.get("type"),ut=ot.get("range");if(hasDiscreteDomain(st)&&isVgRangeStep(ut)){const ct=ot.get("name"),ft=assembleDomain(this,rt),pt=getFieldFromDomain(ft);if(pt){const ht=vgField({aggregate:"distinct",field:pt},{expr:"datum"});return{signal:sizeExpr(ct,ot,ht)}}else return warn(unknownField(rt)),null}}}return{signal:this.signalNameMap.get(this.getName(tt))}}lookupDataSource(tt){const nt=this.component.data.outputNodes[tt];return nt?nt.getSource():tt}getSignalName(tt){return this.signalNameMap.get(tt)}renameSignal(tt,nt){this.signalNameMap.rename(tt,nt)}renameScale(tt,nt){this.scaleNameMap.rename(tt,nt)}renameProjection(tt,nt){this.projectionNameMap.rename(tt,nt)}scaleName(tt,nt){if(nt)return this.getName(tt);if(isChannel(tt)&&isScaleChannel(tt)&&this.component.scales[tt]||this.scaleNameMap.has(this.getName(tt)))return this.scaleNameMap.get(this.getName(tt))}projectionName(tt){if(tt)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(tt){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const nt=this.component.scales[tt];return nt&&!nt.merged?nt:this.parent?this.parent.getScaleComponent(tt):void 0}getSelectionComponent(tt,nt){let rt=this.component.selection[tt];if(!rt&&this.parent&&(rt=this.parent.getSelectionComponent(tt,nt)),!rt)throw new Error(selectionNotFound(nt));return rt}hasAxisOrientSignalRef(){var tt,nt;return((tt=this.component.axes.x)===null||tt===void 0?void 0:tt.some(rt=>rt.hasOrientSignalRef()))||((nt=this.component.axes.y)===null||nt===void 0?void 0:nt.some(rt=>rt.hasOrientSignalRef()))}}class ModelWithField extends Model{vgField(tt,nt={}){const rt=this.fieldDef(tt);if(!!rt)return vgField(rt,nt)}reduceFieldDef(tt,nt){return reduce(this.getMapping(),(rt,ot,st)=>{const ut=getFieldDef(ot);return ut?tt(rt,ut,st):rt},nt)}forEachFieldDef(tt,nt){forEach(this.getMapping(),(rt,ot)=>{const st=getFieldDef(rt);st&&tt(st,ot)},nt)}}var __rest$5=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class DensityTransformNode extends DataFlowNode{constructor(tt,nt){var rt,ot,st;super(tt),this.transform=nt,this.transform=duplicate(nt);const ut=(rt=this.transform.as)!==null&&rt!==void 0?rt:[void 0,void 0];this.transform.as=[(ot=ut[0])!==null&&ot!==void 0?ot:"value",(st=ut[1])!==null&&st!==void 0?st:"density"],nt.groupby&&nt.minsteps==null&&nt.maxsteps==null&&nt.steps==null&&(this.transform.steps=200)}clone(){return new DensityTransformNode(null,duplicate(this.transform))}dependentFields(){var tt;return new Set([this.transform.density,...(tt=this.transform.groupby)!==null&&tt!==void 0?tt:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${hash(this.transform)}`}assemble(){const tt=this.transform,{density:nt}=tt,rt=__rest$5(tt,["density"]);return Object.assign({type:"kde",field:nt},rt)}}class FilterInvalidNode extends DataFlowNode{constructor(tt,nt){super(tt),this.filter=nt}clone(){return new FilterInvalidNode(null,Object.assign({},this.filter))}static make(tt,nt){const{config:rt,mark:ot,markDef:st}=nt;if(getMarkPropOrConfig("invalid",st,rt)!=="filter")return null;const ct=nt.reduceFieldDef((ft,pt,ht)=>{const mt=isScaleChannel(ht)&&nt.getScaleComponent(ht);if(mt){const yt=mt.get("type");hasContinuousDomain(yt)&&pt.aggregate!=="count"&&!isPathMark(ot)&&(ft[pt.field]=pt)}return ft},{});return keys$1(ct).length?new FilterInvalidNode(tt,ct):null}dependentFields(){return new Set(keys$1(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${hash(this.filter)}`}assemble(){const tt=keys$1(this.filter).reduce((nt,rt)=>{const ot=this.filter[rt],st=vgField(ot,{expr:"datum"});return ot!==null&&(ot.type==="temporal"?nt.push(`(isDate(${st}) || (isValid(${st}) && isFinite(+${st})))`):ot.type==="quantitative"&&(nt.push(`isValid(${st})`),nt.push(`isFinite(+${st})`))),nt},[]);return tt.length>0?{type:"filter",expr:tt.join(" && ")}:null}}class FlattenTransformNode extends DataFlowNode{constructor(tt,nt){super(tt),this.transform=nt,this.transform=duplicate(nt);const{flatten:rt,as:ot=[]}=this.transform;this.transform.as=rt.map((st,ut)=>{var ct;return(ct=ot[ut])!==null&&ct!==void 0?ct:st})}clone(){return new FlattenTransformNode(this.parent,duplicate(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${hash(this.transform)}`}assemble(){const{flatten:tt,as:nt}=this.transform;return{type:"flatten",fields:tt,as:nt}}}class FoldTransformNode extends DataFlowNode{constructor(tt,nt){var rt,ot,st;super(tt),this.transform=nt,this.transform=duplicate(nt);const ut=(rt=this.transform.as)!==null&&rt!==void 0?rt:[void 0,void 0];this.transform.as=[(ot=ut[0])!==null&&ot!==void 0?ot:"key",(st=ut[1])!==null&&st!==void 0?st:"value"]}clone(){return new FoldTransformNode(null,duplicate(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${hash(this.transform)}`}assemble(){const{fold:tt,as:nt}=this.transform;return{type:"fold",fields:tt,as:nt}}}class GeoJSONNode extends DataFlowNode{constructor(tt,nt,rt,ot){super(tt),this.fields=nt,this.geojson=rt,this.signal=ot}clone(){return new GeoJSONNode(null,duplicate(this.fields),this.geojson,this.signal)}static parseAll(tt,nt){if(nt.component.projection&&!nt.component.projection.isFit)return tt;let rt=0;for(const ot of[[LONGITUDE,LATITUDE],[LONGITUDE2,LATITUDE2]]){const st=ot.map(ut=>{const ct=getFieldOrDatumDef(nt.encoding[ut]);return isFieldDef(ct)?ct.field:isDatumDef(ct)?{expr:`${ct.datum}`}:isValueDef(ct)?{expr:`${ct.value}`}:void 0});(st[0]||st[1])&&(tt=new GeoJSONNode(tt,st,null,nt.getName(`geojson_${rt++}`)))}if(nt.channelHasField(SHAPE)){const ot=nt.typedFieldDef(SHAPE);ot.type===GEOJSON&&(tt=new GeoJSONNode(tt,null,ot.field,nt.getName(`geojson_${rt++}`)))}return tt}dependentFields(){var tt;const nt=((tt=this.fields)!==null&&tt!==void 0?tt:[]).filter(isString);return new Set([...this.geojson?[this.geojson]:[],...nt])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${hash(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})]}}class GeoPointNode extends DataFlowNode{constructor(tt,nt,rt,ot){super(tt),this.projection=nt,this.fields=rt,this.as=ot}clone(){return new GeoPointNode(null,this.projection,duplicate(this.fields),duplicate(this.as))}static parseAll(tt,nt){if(!nt.projectionName())return tt;for(const rt of[[LONGITUDE,LATITUDE],[LONGITUDE2,LATITUDE2]]){const ot=rt.map(ut=>{const ct=getFieldOrDatumDef(nt.encoding[ut]);return isFieldDef(ct)?ct.field:isDatumDef(ct)?{expr:`${ct.datum}`}:isValueDef(ct)?{expr:`${ct.value}`}:void 0}),st=rt[0]===LONGITUDE2?"2":"";(ot[0]||ot[1])&&(tt=new GeoPointNode(tt,nt.projectionName(),ot,[nt.getName(`x${st}`),nt.getName(`y${st}`)]))}return tt}dependentFields(){return new Set(this.fields.filter(isString))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${hash(this.fields)} ${hash(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class ImputeNode extends DataFlowNode{constructor(tt,nt){super(tt),this.transform=nt}clone(){return new ImputeNode(null,duplicate(this.transform))}dependentFields(){var tt;return new Set([this.transform.impute,this.transform.key,...(tt=this.transform.groupby)!==null&&tt!==void 0?tt:[]])}producedFields(){return new Set([this.transform.impute])}processSequence(tt){const{start:nt=0,stop:rt,step:ot}=tt;return{signal:`sequence(${[nt,rt,...ot?[ot]:[]].join(",")})`}}static makeFromTransform(tt,nt){return new ImputeNode(tt,nt)}static makeFromEncoding(tt,nt){const rt=nt.encoding,ot=rt.x,st=rt.y;if(isFieldDef(ot)&&isFieldDef(st)){const ut=ot.impute?ot:st.impute?st:void 0;if(ut===void 0)return;const ct=ot.impute?st:st.impute?ot:void 0,{method:ft,value:pt,frame:ht,keyvals:mt}=ut.impute,yt=pathGroupingFields(nt.mark,rt);return new ImputeNode(tt,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:ut.field,key:ct.field},ft?{method:ft}:{}),pt!==void 0?{value:pt}:{}),ht?{frame:ht}:{}),mt!==void 0?{keyvals:mt}:{}),yt.length?{groupby:yt}:{}))}return null}hash(){return`Impute ${hash(this.transform)}`}assemble(){const{impute:tt,key:nt,keyvals:rt,method:ot,groupby:st,value:ut,frame:ct=[null,null]}=this.transform,ft=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:tt,key:nt},rt?{keyvals:isImputeSequence(rt)?this.processSequence(rt):rt}:{}),{method:"value"}),st?{groupby:st}:{}),{value:!ot||ot==="value"?ut:null});if(ot&&ot!=="value"){const pt=Object.assign({type:"window",as:[`imputed_${tt}_value`],ops:[ot],fields:[tt],frame:ct,ignorePeers:!1},st?{groupby:st}:{}),ht={type:"formula",expr:`datum.${tt} === null ? datum.imputed_${tt}_value : datum.${tt}`,as:tt};return[ft,pt,ht]}else return[ft]}}var __rest$4=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class LoessTransformNode extends DataFlowNode{constructor(tt,nt){var rt,ot,st;super(tt),this.transform=nt,this.transform=duplicate(nt);const ut=(rt=this.transform.as)!==null&&rt!==void 0?rt:[void 0,void 0];this.transform.as=[(ot=ut[0])!==null&&ot!==void 0?ot:nt.on,(st=ut[1])!==null&&st!==void 0?st:nt.loess]}clone(){return new LoessTransformNode(null,duplicate(this.transform))}dependentFields(){var tt;return new Set([this.transform.loess,this.transform.on,...(tt=this.transform.groupby)!==null&&tt!==void 0?tt:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${hash(this.transform)}`}assemble(){const tt=this.transform,{loess:nt,on:rt}=tt,ot=__rest$4(tt,["loess","on"]);return Object.assign({type:"loess",x:rt,y:nt},ot)}}class LookupNode extends DataFlowNode{constructor(tt,nt,rt){super(tt),this.transform=nt,this.secondary=rt}clone(){return new LookupNode(null,duplicate(this.transform),this.secondary)}static make(tt,nt,rt,ot){const st=nt.component.data.sources,{from:ut}=rt;let ct=null;if(isLookupData(ut)){let ft=findSource(ut.data,st);ft||(ft=new SourceNode(ut.data),st.push(ft));const pt=nt.getName(`lookup_${ot}`);ct=new OutputNode(ft,pt,DataSourceType.Lookup,nt.component.data.outputNodeRefCounts),nt.component.data.outputNodes[pt]=ct}else if(isLookupSelection(ut)){const ft=ut.param;rt=Object.assign({as:ft},rt);let pt;try{pt=nt.getSelectionComponent(varName(ft),ft)}catch{throw new Error(cannotLookupVariableParameter(ft))}if(ct=pt.materialized,!ct)throw new Error(noSameUnitLookup(ft))}return new LookupNode(tt,rt,ct.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?array$5(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${hash({transform:this.transform,secondary:this.secondary})}`}assemble(){let tt;if(this.transform.from.fields)tt=Object.assign({values:this.transform.from.fields},this.transform.as?{as:array$5(this.transform.as)}:{});else{let nt=this.transform.as;isString(nt)||(warn(NO_FIELDS_NEEDS_AS),nt="_lookup"),tt={as:[nt]}}return Object.assign(Object.assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},tt),this.transform.default?{default:this.transform.default}:{})}}var __rest$3=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class QuantileTransformNode extends DataFlowNode{constructor(tt,nt){var rt,ot,st;super(tt),this.transform=nt,this.transform=duplicate(nt);const ut=(rt=this.transform.as)!==null&&rt!==void 0?rt:[void 0,void 0];this.transform.as=[(ot=ut[0])!==null&&ot!==void 0?ot:"prob",(st=ut[1])!==null&&st!==void 0?st:"value"]}clone(){return new QuantileTransformNode(null,duplicate(this.transform))}dependentFields(){var tt;return new Set([this.transform.quantile,...(tt=this.transform.groupby)!==null&&tt!==void 0?tt:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${hash(this.transform)}`}assemble(){const tt=this.transform,{quantile:nt}=tt,rt=__rest$3(tt,["quantile"]);return Object.assign({type:"quantile",field:nt},rt)}}var __rest$2=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};class RegressionTransformNode extends DataFlowNode{constructor(tt,nt){var rt,ot,st;super(tt),this.transform=nt,this.transform=duplicate(nt);const ut=(rt=this.transform.as)!==null&&rt!==void 0?rt:[void 0,void 0];this.transform.as=[(ot=ut[0])!==null&&ot!==void 0?ot:nt.on,(st=ut[1])!==null&&st!==void 0?st:nt.regression]}clone(){return new RegressionTransformNode(null,duplicate(this.transform))}dependentFields(){var tt;return new Set([this.transform.regression,this.transform.on,...(tt=this.transform.groupby)!==null&&tt!==void 0?tt:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${hash(this.transform)}`}assemble(){const tt=this.transform,{regression:nt,on:rt}=tt,ot=__rest$2(tt,["regression","on"]);return Object.assign({type:"regression",x:rt,y:nt},ot)}}class PivotTransformNode extends DataFlowNode{constructor(tt,nt){super(tt),this.transform=nt}clone(){return new PivotTransformNode(null,duplicate(this.transform))}addDimensions(tt){var nt;this.transform.groupby=unique(((nt=this.transform.groupby)!==null&&nt!==void 0?nt:[]).concat(tt),rt=>rt)}producedFields(){}dependentFields(){var tt;return new Set([this.transform.pivot,this.transform.value,...(tt=this.transform.groupby)!==null&&tt!==void 0?tt:[]])}hash(){return`PivotTransform ${hash(this.transform)}`}assemble(){const{pivot:tt,value:nt,groupby:rt,limit:ot,op:st}=this.transform;return Object.assign(Object.assign(Object.assign({type:"pivot",field:tt,value:nt},ot!==void 0?{limit:ot}:{}),st!==void 0?{op:st}:{}),rt!==void 0?{groupby:rt}:{})}}class SampleTransformNode extends DataFlowNode{constructor(tt,nt){super(tt),this.transform=nt}clone(){return new SampleTransformNode(null,duplicate(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${hash(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function makeWalkTree(et){let tt=0;function nt(rt,ot){var st;if(rt instanceof SourceNode&&!rt.isGenerator&&!isUrlData(rt.data)&&(et.push(ot),ot={name:null,source:ot.name,transform:[]}),rt instanceof ParseNode&&(rt.parent instanceof SourceNode&&!ot.source?(ot.format=Object.assign(Object.assign({},(st=ot.format)!==null&&st!==void 0?st:{}),{parse:rt.assembleFormatParse()}),ot.transform.push(...rt.assembleTransforms(!0))):ot.transform.push(...rt.assembleTransforms())),rt instanceof FacetNode){ot.name||(ot.name=`data_${tt++}`),!ot.source||ot.transform.length>0?(et.push(ot),rt.data=ot.name):rt.data=ot.source,et.push(...rt.assemble());return}switch((rt instanceof GraticuleNode||rt instanceof SequenceNode||rt instanceof FilterInvalidNode||rt instanceof FilterNode||rt instanceof CalculateNode||rt instanceof GeoPointNode||rt instanceof AggregateNode||rt instanceof LookupNode||rt instanceof WindowTransformNode||rt instanceof JoinAggregateTransformNode||rt instanceof FoldTransformNode||rt instanceof FlattenTransformNode||rt instanceof DensityTransformNode||rt instanceof LoessTransformNode||rt instanceof QuantileTransformNode||rt instanceof RegressionTransformNode||rt instanceof IdentifierNode||rt instanceof SampleTransformNode||rt instanceof PivotTransformNode)&&ot.transform.push(rt.assemble()),(rt instanceof BinNode||rt instanceof TimeUnitNode||rt instanceof ImputeNode||rt instanceof StackNode||rt instanceof GeoJSONNode)&&ot.transform.push(...rt.assemble()),rt instanceof OutputNode&&(ot.source&&ot.transform.length===0?rt.setSource(ot.source):rt.parent instanceof OutputNode?rt.setSource(ot.name):(ot.name||(ot.name=`data_${tt++}`),rt.setSource(ot.name),rt.numChildren()===1&&(et.push(ot),ot={name:null,source:ot.name,transform:[]}))),rt.numChildren()){case 0:rt instanceof OutputNode&&(!ot.source||ot.transform.length>0)&&et.push(ot);break;case 1:nt(rt.children[0],ot);break;default:{ot.name||(ot.name=`data_${tt++}`);let ut=ot.name;!ot.source||ot.transform.length>0?et.push(ot):ut=ot.source;for(const ct of rt.children)nt(ct,{name:null,source:ut,transform:[]});break}}}return nt}function assembleFacetData(et){const tt=[],nt=makeWalkTree(tt);for(const rt of et.children)nt(rt,{source:et.name,name:null,transform:[]});return tt}function assembleRootData(et,tt){var nt,rt;const ot=[],st=makeWalkTree(ot);let ut=0;for(const ft of et.sources){ft.hasName()||(ft.dataName=`source_${ut++}`);const pt=ft.assemble();st(ft,pt)}for(const ft of ot)ft.transform.length===0&&delete ft.transform;let ct=0;for(const[ft,pt]of ot.entries())((nt=pt.transform)!==null&&nt!==void 0?nt:[]).length===0&&!pt.source&&ot.splice(ct++,0,ot.splice(ft,1)[0]);for(const ft of ot)for(const pt of(rt=ft.transform)!==null&&rt!==void 0?rt:[])pt.type==="lookup"&&(pt.from=et.outputNodes[pt.from].getSource());for(const ft of ot)ft.name in tt&&(ft.values=tt[ft.name]);return ot}function getHeaderType(et){return et==="top"||et==="left"||isSignalRef(et)?"header":"footer"}function parseFacetHeaders(et){for(const tt of FACET_CHANNELS)parseFacetHeader(et,tt);mergeChildAxis(et,"x"),mergeChildAxis(et,"y")}function parseFacetHeader(et,tt){var nt;const{facet:rt,config:ot,child:st,component:ut}=et;if(et.channelHasField(tt)){const ct=rt[tt],ft=getHeaderProperty("title",null,ot,tt);let pt=title(ct,ot,{allowDisabling:!0,includeDefault:ft===void 0||!!ft});st.component.layoutHeaders[tt].title&&(pt=isArray(pt)?pt.join(", "):pt,pt+=` / ${st.component.layoutHeaders[tt].title}`,st.component.layoutHeaders[tt].title=null);const ht=getHeaderProperty("labelOrient",ct.header,ot,tt),mt=ct.header!==null?getFirstDefined((nt=ct.header)===null||nt===void 0?void 0:nt.labels,ot.header.labels,!0):!1,yt=contains(["bottom","right"],ht)?"footer":"header";ut.layoutHeaders[tt]={title:ct.header!==null?pt:null,facetFieldDef:ct,[yt]:tt==="facet"?[]:[makeHeaderComponent(et,tt,mt)]}}}function makeHeaderComponent(et,tt,nt){const rt=tt==="row"?"height":"width";return{labels:nt,sizeSignal:et.child.component.layoutSize.get(rt)?et.child.getSizeSignalRef(rt):void 0,axes:[]}}function mergeChildAxis(et,tt){var nt;const{child:rt}=et;if(rt.component.axes[tt]){const{layoutHeaders:ot,resolve:st}=et.component;if(st.axis[tt]=parseGuideResolve(st,tt),st.axis[tt]==="shared"){const ut=tt==="x"?"column":"row",ct=ot[ut];for(const ft of rt.component.axes[tt]){const pt=getHeaderType(ft.get("orient"));(nt=ct[pt])!==null&&nt!==void 0||(ct[pt]=[makeHeaderComponent(et,ut,!1)]);const ht=assembleAxis(ft,"main",et.config,{header:!0});ht&&ct[pt][0].axes.push(ht),ft.mainExtracted=!0}}}}function parseLayerLayoutSize(et){parseChildrenLayoutSize(et),parseNonUnitLayoutSizeForChannel(et,"width"),parseNonUnitLayoutSizeForChannel(et,"height")}function parseConcatLayoutSize(et){parseChildrenLayoutSize(et);const tt=et.layout.columns===1?"width":"childWidth",nt=et.layout.columns===void 0?"height":"childHeight";parseNonUnitLayoutSizeForChannel(et,tt),parseNonUnitLayoutSizeForChannel(et,nt)}function parseChildrenLayoutSize(et){for(const tt of et.children)tt.parseLayoutSize()}function parseNonUnitLayoutSizeForChannel(et,tt){var nt;const rt=getSizeTypeFromLayoutSizeType(tt),ot=getPositionScaleChannel(rt),st=et.component.resolve,ut=et.component.layoutSize;let ct;for(const ft of et.children){const pt=ft.component.layoutSize.getWithExplicit(rt),ht=(nt=st.scale[ot])!==null&&nt!==void 0?nt:defaultScaleResolve(ot,et);if(ht==="independent"&&pt.value==="step"){ct=void 0;break}if(ct){if(ht==="independent"&&ct.value!==pt.value){ct=void 0;break}ct=mergeValuesWithExplicit(ct,pt,rt,"")}else ct=pt}if(ct){for(const ft of et.children)et.renameSignal(ft.getName(rt),et.getName(tt)),ft.component.layoutSize.set(rt,"merged",!1);ut.setWithExplicit(tt,ct)}else ut.setWithExplicit(tt,{explicit:!1,value:void 0})}function parseUnitLayoutSize(et){const{size:tt,component:nt}=et;for(const rt of POSITION_SCALE_CHANNELS){const ot=getSizeChannel(rt);if(tt[ot]){const st=tt[ot];nt.layoutSize.set(ot,isStep(st)?"step":st,!0)}else{const st=defaultUnitSize(et,ot);nt.layoutSize.set(ot,st,!1)}}}function defaultUnitSize(et,tt){const nt=tt==="width"?"x":"y",rt=et.config,ot=et.getScaleComponent(nt);if(ot){const st=ot.get("type"),ut=ot.get("range");if(hasDiscreteDomain(st)){const ct=getViewConfigDiscreteSize(rt.view,tt);return isVgRangeStep(ut)||isStep(ct)?"step":ct}else return getViewConfigContinuousSize(rt.view,tt)}else{if(et.hasProjection||et.mark==="arc")return getViewConfigContinuousSize(rt.view,tt);{const st=getViewConfigDiscreteSize(rt.view,tt);return isStep(st)?st.step:st}}}function facetSortFieldName(et,tt,nt){return vgField(tt,Object.assign({suffix:`by_${vgField(et)}`},nt??{}))}class FacetModel extends ModelWithField{constructor(tt,nt,rt,ot){super(tt,"facet",nt,rt,ot,tt.resolve),this.child=buildModel(tt.spec,this,this.getName("child"),void 0,ot),this.children=[this.child],this.facet=this.initFacet(tt.facet)}initFacet(tt){if(!isFacetMapping(tt))return{facet:this.initFacetFieldDef(tt,"facet")};const nt=keys$1(tt),rt={};for(const ot of nt){if(![ROW,COLUMN].includes(ot)){warn(incompatibleChannel(ot,"facet"));break}const st=tt[ot];if(st.field===void 0){warn(emptyFieldDef(st,ot));break}rt[ot]=this.initFacetFieldDef(st,ot)}return rt}initFacetFieldDef(tt,nt){const rt=initFieldDef(tt,nt);return rt.header?rt.header=replaceExprRef(rt.header):rt.header===null&&(rt.header=null),rt}channelHasField(tt){return!!this.facet[tt]}fieldDef(tt){return this.facet[tt]}parseData(){this.component.data=parseData(this),this.child.parseData()}parseLayoutSize(){parseChildrenLayoutSize(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),parseFacetHeaders(this)}assembleSelectionTopLevelSignals(tt){return this.child.assembleSelectionTopLevelSignals(tt)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(tt){return this.child.assembleSelectionData(tt)}getHeaderLayoutMixins(){var tt,nt,rt;const ot={};for(const st of FACET_CHANNELS)for(const ut of HEADER_TYPES){const ct=this.component.layoutHeaders[st],ft=ct[ut],{facetFieldDef:pt}=ct;if(pt){const ht=getHeaderProperty("titleOrient",pt.header,this.config,st);if(["right","bottom"].includes(ht)){const mt=getHeaderChannel(st,ht);(tt=ot.titleAnchor)!==null&&tt!==void 0||(ot.titleAnchor={}),ot.titleAnchor[mt]="end"}}if(ft?.[0]){const ht=st==="row"?"height":"width",mt=ut==="header"?"headerBand":"footerBand";st!=="facet"&&!this.child.component.layoutSize.get(ht)&&((nt=ot[mt])!==null&&nt!==void 0||(ot[mt]={}),ot[mt][st]=.5),ct.title&&((rt=ot.offset)!==null&&rt!==void 0||(ot.offset={}),ot.offset[st==="row"?"rowTitle":"columnTitle"]=10)}}return ot}assembleDefaultLayout(){const{column:tt,row:nt}=this.facet,rt=tt?this.columnDistinctSignal():nt?1:void 0;let ot="all";return(!nt&&this.component.resolve.scale.x==="independent"||!tt&&this.component.resolve.scale.y==="independent")&&(ot="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),rt?{columns:rt}:{}),{bounds:"full",align:ot})}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof FacetModel))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(tt){return this.parent&&this.parent instanceof FacetModel?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:vgField(this.facet.column,{prefix:"distinct"})}}}}:{}),super.assembleGroup(tt)):super.assembleGroup(tt)}getCardinalityAggregateForChild(){const tt=[],nt=[],rt=[];if(this.child instanceof FacetModel){if(this.child.channelHasField("column")){const ot=vgField(this.child.facet.column);tt.push(ot),nt.push("distinct"),rt.push(`distinct_${ot}`)}}else for(const ot of POSITION_SCALE_CHANNELS){const st=this.child.component.scales[ot];if(st&&!st.merged){const ut=st.get("type"),ct=st.get("range");if(hasDiscreteDomain(ut)&&isVgRangeStep(ct)){const ft=assembleDomain(this.child,ot),pt=getFieldFromDomain(ft);pt?(tt.push(pt),nt.push("distinct"),rt.push(`distinct_${pt}`)):warn(unknownField(ot))}}}return{fields:tt,ops:nt,as:rt}}assembleFacet(){const{name:tt,data:nt}=this.component.data.facetRoot,{row:rt,column:ot}=this.facet,{fields:st,ops:ut,as:ct}=this.getCardinalityAggregateForChild(),ft=[];for(const ht of FACET_CHANNELS){const mt=this.facet[ht];if(mt){ft.push(vgField(mt));const{bin:yt,sort:vt}=mt;if(isBinning(yt)&&ft.push(vgField(mt,{binSuffix:"end"})),isSortField(vt)){const{field:Tt,op:Et=DEFAULT_SORT_OP}=vt,xt=facetSortFieldName(mt,vt);rt&&ot?(st.push(xt),ut.push("max"),ct.push(xt)):(st.push(Tt),ut.push(Et),ct.push(xt))}else if(isArray(vt)){const Tt=sortArrayIndexField(mt,ht);st.push(Tt),ut.push("max"),ct.push(Tt)}}}const pt=!!rt&&!!ot;return Object.assign({name:tt,data:nt,groupby:ft},pt||st.length>0?{aggregate:Object.assign(Object.assign({},pt?{cross:pt}:{}),st.length?{fields:st,ops:ut,as:ct}:{})}:{})}facetSortFields(tt){const{facet:nt}=this,rt=nt[tt];return rt?isSortField(rt.sort)?[facetSortFieldName(rt,rt.sort,{expr:"datum"})]:isArray(rt.sort)?[sortArrayIndexField(rt,tt,{expr:"datum"})]:[vgField(rt,{expr:"datum"})]:[]}facetSortOrder(tt){const{facet:nt}=this,rt=nt[tt];if(rt){const{sort:ot}=rt;return[(isSortField(ot)?ot.order:!isArray(ot)&&ot)||"ascending"]}return[]}assembleLabelTitle(){var tt;const{facet:nt,config:rt}=this;if(nt.facet)return assembleLabelTitle(nt.facet,"facet",rt);const ot={row:["top","bottom"],column:["left","right"]};for(const st of HEADER_CHANNELS)if(nt[st]){const ut=getHeaderProperty("labelOrient",(tt=nt[st])===null||tt===void 0?void 0:tt.header,rt,st);if(ot[st].includes(ut))return assembleLabelTitle(nt[st],st,rt)}}assembleMarks(){const{child:tt}=this,nt=this.component.data.facetRoot,rt=assembleFacetData(nt),ot=tt.assembleGroupEncodeEntry(!1),st=this.assembleLabelTitle()||tt.assembleTitle(),ut=tt.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},st?{title:st}:{}),ut?{style:ut}:{}),{from:{facet:this.assembleFacet()},sort:{field:FACET_CHANNELS.map(ft=>this.facetSortFields(ft)).flat(),order:FACET_CHANNELS.map(ft=>this.facetSortOrder(ft)).flat()}}),rt.length>0?{data:rt}:{}),ot?{encode:{update:ot}}:{}),tt.assembleGroup(assembleFacetSignals(this,[])))]}getMapping(){return this.facet}}function makeJoinAggregateFromFacet(et,tt){const{row:nt,column:rt}=tt;if(nt&&rt){let ot=null;for(const st of[nt,rt])if(isSortField(st.sort)){const{field:ut,op:ct=DEFAULT_SORT_OP}=st.sort;et=ot=new JoinAggregateTransformNode(et,{joinaggregate:[{op:ct,field:ut,as:facetSortFieldName(st,st.sort,{forAs:!0})}],groupby:[vgField(st)]})}return ot}return null}function findSource(et,tt){var nt,rt,ot,st;for(const ut of tt){const ct=ut.data;if(et.name&&ut.hasName()&&et.name!==ut.dataName)continue;const ft=(nt=et.format)===null||nt===void 0?void 0:nt.mesh,pt=(rt=ct.format)===null||rt===void 0?void 0:rt.feature;if(ft&&pt)continue;const ht=(ot=et.format)===null||ot===void 0?void 0:ot.feature;if((ht||pt)&&ht!==pt)continue;const mt=(st=ct.format)===null||st===void 0?void 0:st.mesh;if(!((ft||mt)&&ft!==mt)){if(isInlineData(et)&&isInlineData(ct)){if(deepEqual(et.values,ct.values))return ut}else if(isUrlData(et)&&isUrlData(ct)){if(et.url===ct.url)return ut}else if(isNamedData(et)&&et.name===ut.dataName)return ut}}return null}function parseRoot(et,tt){if(et.data||!et.parent){if(et.data===null){const rt=new SourceNode({values:[]});return tt.push(rt),rt}const nt=findSource(et.data,tt);if(nt)return isGenerator(et.data)||(nt.data.format=mergeDeep$1({},et.data.format,nt.data.format)),!nt.hasName()&&et.data.name&&(nt.dataName=et.data.name),nt;{const rt=new SourceNode(et.data);return tt.push(rt),rt}}else return et.parent.component.data.facetRoot?et.parent.component.data.facetRoot:et.parent.component.data.main}function parseTransformArray(et,tt,nt){var rt,ot;let st=0;for(const ut of tt.transforms){let ct,ft;if(isCalculate(ut))ft=et=new CalculateNode(et,ut),ct="derived";else if(isFilter(ut)){const pt=getImplicitFromFilterTransform(ut);ft=et=(rt=ParseNode.makeWithAncestors(et,{},pt,nt))!==null&&rt!==void 0?rt:et,et=new FilterNode(et,tt,ut.filter)}else if(isBin(ut))ft=et=BinNode.makeFromTransform(et,ut,tt),ct="number";else if(isTimeUnit(ut))ct="date",nt.getWithExplicit(ut.field).value===void 0&&(et=new ParseNode(et,{[ut.field]:ct}),nt.set(ut.field,ct,!1)),ft=et=TimeUnitNode.makeFromTransform(et,ut);else if(isAggregate(ut))ft=et=AggregateNode.makeFromTransform(et,ut),ct="number",requiresSelectionId(tt)&&(et=new IdentifierNode(et));else if(isLookup(ut))ft=et=LookupNode.make(et,tt,ut,st++),ct="derived";else if(isWindow(ut))ft=et=new WindowTransformNode(et,ut),ct="number";else if(isJoinAggregate(ut))ft=et=new JoinAggregateTransformNode(et,ut),ct="number";else if(isStack(ut))ft=et=StackNode.makeFromTransform(et,ut),ct="derived";else if(isFold(ut))ft=et=new FoldTransformNode(et,ut),ct="derived";else if(isFlatten(ut))ft=et=new FlattenTransformNode(et,ut),ct="derived";else if(isPivot(ut))ft=et=new PivotTransformNode(et,ut),ct="derived";else if(isSample(ut))et=new SampleTransformNode(et,ut);else if(isImpute(ut))ft=et=ImputeNode.makeFromTransform(et,ut),ct="derived";else if(isDensity(ut))ft=et=new DensityTransformNode(et,ut),ct="derived";else if(isQuantile(ut))ft=et=new QuantileTransformNode(et,ut),ct="derived";else if(isRegression(ut))ft=et=new RegressionTransformNode(et,ut),ct="derived";else if(isLoess(ut))ft=et=new LoessTransformNode(et,ut),ct="derived";else{warn(invalidTransformIgnored(ut));continue}if(ft&&ct!==void 0)for(const pt of(ot=ft.producedFields())!==null&&ot!==void 0?ot:[])nt.set(pt,ct,!1)}return et}function parseData(et){var tt,nt,rt,ot,st,ut,ct,ft,pt,ht;let mt=parseRoot(et,et.component.data.sources);const{outputNodes:yt,outputNodeRefCounts:vt}=et.component.data,Tt=et.data,xt=!(Tt&&(isGenerator(Tt)||isUrlData(Tt)||isInlineData(Tt)))&&et.parent?et.parent.component.data.ancestorParse.clone():new AncestorParse;isGenerator(Tt)?(isSequenceGenerator(Tt)?mt=new SequenceNode(mt,Tt.sequence):isGraticuleGenerator(Tt)&&(mt=new GraticuleNode(mt,Tt.graticule)),xt.parseNothing=!0):((tt=Tt?.format)===null||tt===void 0?void 0:tt.parse)===null&&(xt.parseNothing=!0),mt=(nt=ParseNode.makeExplicit(mt,et,xt))!==null&&nt!==void 0?nt:mt,mt=new IdentifierNode(mt);const At=et.parent&&isLayerModel(et.parent);(isUnitModel(et)||isFacetModel(et))&&At&&(mt=(rt=BinNode.makeFromEncoding(mt,et))!==null&&rt!==void 0?rt:mt),et.transforms.length>0&&(mt=parseTransformArray(mt,et,xt));const Ct=getImplicitFromSelection(et),$t=getImplicitFromEncoding(et);mt=(ot=ParseNode.makeWithAncestors(mt,{},Object.assign(Object.assign({},Ct),$t),xt))!==null&&ot!==void 0?ot:mt,isUnitModel(et)&&(mt=GeoJSONNode.parseAll(mt,et),mt=GeoPointNode.parseAll(mt,et)),(isUnitModel(et)||isFacetModel(et))&&(At||(mt=(st=BinNode.makeFromEncoding(mt,et))!==null&&st!==void 0?st:mt),mt=(ut=TimeUnitNode.makeFromEncoding(mt,et))!==null&&ut!==void 0?ut:mt,mt=CalculateNode.parseAllForSortIndex(mt,et));const Ot=et.getDataName(DataSourceType.Raw),Rt=new OutputNode(mt,Ot,DataSourceType.Raw,vt);if(yt[Ot]=Rt,mt=Rt,isUnitModel(et)){const Ft=AggregateNode.makeFromEncoding(mt,et);Ft&&(mt=Ft,requiresSelectionId(et)&&(mt=new IdentifierNode(mt))),mt=(ct=ImputeNode.makeFromEncoding(mt,et))!==null&&ct!==void 0?ct:mt,mt=(ft=StackNode.makeFromEncoding(mt,et))!==null&&ft!==void 0?ft:mt}isUnitModel(et)&&(mt=(pt=FilterInvalidNode.make(mt,et))!==null&&pt!==void 0?pt:mt);const It=et.getDataName(DataSourceType.Main),kt=new OutputNode(mt,It,DataSourceType.Main,vt);yt[It]=kt,mt=kt,isUnitModel(et)&&materializeSelections(et,kt);let Mt=null;if(isFacetModel(et)){const Ft=et.getName("facet");mt=(ht=makeJoinAggregateFromFacet(mt,et.facet))!==null&&ht!==void 0?ht:mt,Mt=new FacetNode(mt,et,Ft,kt.getSource()),yt[Ft]=Mt}return Object.assign(Object.assign({},et.component.data),{outputNodes:yt,outputNodeRefCounts:vt,raw:Rt,main:kt,facetRoot:Mt,ancestorParse:xt})}class ConcatModel extends Model{constructor(tt,nt,rt,ot){var st,ut,ct,ft;super(tt,"concat",nt,rt,ot,tt.resolve),(((ut=(st=tt.resolve)===null||st===void 0?void 0:st.axis)===null||ut===void 0?void 0:ut.x)==="shared"||((ft=(ct=tt.resolve)===null||ct===void 0?void 0:ct.axis)===null||ft===void 0?void 0:ft.y)==="shared")&&warn(CONCAT_CANNOT_SHARE_AXIS),this.children=this.getChildren(tt).map((pt,ht)=>buildModel(pt,this,this.getName(`concat_${ht}`),void 0,ot))}parseData(){this.component.data=parseData(this);for(const tt of this.children)tt.parseData()}parseSelections(){this.component.selection={};for(const tt of this.children){tt.parseSelections();for(const nt of keys$1(tt.component.selection))this.component.selection[nt]=tt.component.selection[nt]}}parseMarkGroup(){for(const tt of this.children)tt.parseMarkGroup()}parseAxesAndHeaders(){for(const tt of this.children)tt.parseAxesAndHeaders()}getChildren(tt){return isVConcatSpec(tt)?tt.vconcat:isHConcatSpec(tt)?tt.hconcat:tt.concat}parseLayoutSize(){parseConcatLayoutSize(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(tt){return this.children.reduce((nt,rt)=>rt.assembleSelectionTopLevelSignals(nt),tt)}assembleSignals(){return this.children.forEach(tt=>tt.assembleSignals()),[]}assembleLayoutSignals(){const tt=assembleLayoutSignals(this);for(const nt of this.children)tt.push(...nt.assembleLayoutSignals());return tt}assembleSelectionData(tt){return this.children.reduce((nt,rt)=>rt.assembleSelectionData(nt),tt)}assembleMarks(){return this.children.map(tt=>{const nt=tt.assembleTitle(),rt=tt.assembleGroupStyle(),ot=tt.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:tt.getName("group")},nt?{title:nt}:{}),rt?{style:rt}:{}),ot?{encode:{update:ot}}:{}),tt.assembleGroup())})}assembleGroupStyle(){}assembleDefaultLayout(){const tt=this.layout.columns;return Object.assign(Object.assign({},tt!=null?{columns:tt}:{}),{bounds:"full",align:"each"})}}function isFalseOrNull(et){return et===!1||et===null}const AXIS_COMPONENT_PROPERTIES_INDEX=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},COMMON_AXIS_PROPERTIES_INDEX),{labelExpr:1,encode:1}),AXIS_COMPONENT_PROPERTIES=keys$1(AXIS_COMPONENT_PROPERTIES_INDEX);class AxisComponent extends Split{constructor(tt={},nt={},rt=!1){super(),this.explicit=tt,this.implicit=nt,this.mainExtracted=rt}clone(){return new AxisComponent(duplicate(this.explicit),duplicate(this.implicit),this.mainExtracted)}hasAxisPart(tt){return tt==="axis"?!0:tt==="grid"||tt==="title"?!!this.get(tt):!isFalseOrNull(this.get(tt))}hasOrientSignalRef(){return isSignalRef(this.explicit.orient)}}function labels$1(et,tt,nt){var rt;const{encoding:ot,config:st}=et,ut=(rt=getFieldOrDatumDef(ot[tt]))!==null&&rt!==void 0?rt:getFieldOrDatumDef(ot[getSecondaryRangeChannel(tt)]),ct=et.axis(tt)||{},{format:ft,formatType:pt}=ct;if(isCustomFormatType(pt))return Object.assign({text:formatCustomType({fieldOrDatumDef:ut,field:"datum.value",format:ft,formatType:pt,config:st})},nt);if(ft===void 0&&pt===void 0&&st.customFormatTypes){if(channelDefType(ut)==="quantitative"){if(isPositionFieldOrDatumDef(ut)&&ut.stack==="normalize"&&st.normalizedNumberFormatType)return Object.assign({text:formatCustomType({fieldOrDatumDef:ut,field:"datum.value",format:st.normalizedNumberFormat,formatType:st.normalizedNumberFormatType,config:st})},nt);if(st.numberFormatType)return Object.assign({text:formatCustomType({fieldOrDatumDef:ut,field:"datum.value",format:st.numberFormat,formatType:st.numberFormatType,config:st})},nt)}if(channelDefType(ut)==="temporal"&&st.timeFormatType&&isFieldDef(ut)&&!ut.timeUnit)return Object.assign({text:formatCustomType({fieldOrDatumDef:ut,field:"datum.value",format:st.timeFormat,formatType:st.timeFormatType,config:st})},nt)}return nt}function parseUnitAxes(et){return POSITION_SCALE_CHANNELS.reduce((tt,nt)=>(et.component.scales[nt]&&(tt[nt]=[parseAxis(nt,et)]),tt),{})}const OPPOSITE_ORIENT={bottom:"top",top:"bottom",left:"right",right:"left"};function parseLayerAxes(et){var tt;const{axes:nt,resolve:rt}=et.component,ot={top:0,bottom:0,right:0,left:0};for(const st of et.children){st.parseAxesAndHeaders();for(const ut of keys$1(st.component.axes))rt.axis[ut]=parseGuideResolve(et.component.resolve,ut),rt.axis[ut]==="shared"&&(nt[ut]=mergeAxisComponents(nt[ut],st.component.axes[ut]),nt[ut]||(rt.axis[ut]="independent",delete nt[ut]))}for(const st of POSITION_SCALE_CHANNELS){for(const ut of et.children)if(!!ut.component.axes[st]){if(rt.axis[st]==="independent"){nt[st]=((tt=nt[st])!==null&&tt!==void 0?tt:[]).concat(ut.component.axes[st]);for(const ct of ut.component.axes[st]){const{value:ft,explicit:pt}=ct.getWithExplicit("orient");if(!isSignalRef(ft)){if(ot[ft]>0&&!pt){const ht=OPPOSITE_ORIENT[ft];ot[ft]>ot[ht]&&ct.set("orient",ht,!1)}ot[ft]++}}}delete ut.component.axes[st]}if(rt.axis[st]==="independent"&&nt[st]&&nt[st].length>1)for(const ut of nt[st])!!ut.get("grid")&&!ut.explicit.grid&&(ut.implicit.grid=!1)}}function mergeAxisComponents(et,tt){if(et){if(et.length!==tt.length)return;const nt=et.length;for(let rt=0;rt<nt;rt++){const ot=et[rt],st=tt[rt];if(!!ot!=!!st)return;if(ot&&st){const ut=ot.getWithExplicit("orient"),ct=st.getWithExplicit("orient");if(ut.explicit&&ct.explicit&&ut.value!==ct.value)return;et[rt]=mergeAxisComponent(ot,st)}}}else return tt.map(nt=>nt.clone());return et}function mergeAxisComponent(et,tt){for(const nt of AXIS_COMPONENT_PROPERTIES){const rt=mergeValuesWithExplicit(et.getWithExplicit(nt),tt.getWithExplicit(nt),nt,"axis",(ot,st)=>{switch(nt){case"title":return mergeTitleComponent(ot,st);case"gridScale":return{explicit:ot.explicit,value:getFirstDefined(ot.value,st.value)}}return defaultTieBreaker(ot,st,nt,"axis")});et.setWithExplicit(nt,rt)}return et}function isExplicit(et,tt,nt,rt,ot){if(tt==="disable")return nt!==void 0;switch(nt=nt||{},tt){case"titleAngle":case"labelAngle":return et===(isSignalRef(nt.labelAngle)?nt.labelAngle:normalizeAngle(nt.labelAngle));case"values":return!!nt.values;case"encode":return!!nt.encoding||!!nt.labelAngle;case"title":if(et===getFieldDefTitle(rt,ot))return!0}return et===nt[tt]}const propsToAlwaysIncludeConfig=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function parseAxis(et,tt){var nt,rt,ot;let st=tt.axis(et);const ut=new AxisComponent,ct=getFieldOrDatumDef(tt.encoding[et]),{mark:ft,config:pt}=tt,ht=st?.orient||((nt=pt[et==="x"?"axisX":"axisY"])===null||nt===void 0?void 0:nt.orient)||((rt=pt.axis)===null||rt===void 0?void 0:rt.orient)||defaultOrient(et),mt=tt.getScaleComponent(et).get("type"),yt=getAxisConfigs(et,mt,ht,tt.config),vt=st!==void 0?!st:getAxisConfig("disable",pt.style,st?.style,yt).configValue;if(ut.set("disable",vt,st!==void 0),vt)return ut;st=st||{};const Tt=getLabelAngle(ct,st,et,pt.style,yt),Et={fieldOrDatumDef:ct,axis:st,channel:et,model:tt,scaleType:mt,orient:ht,labelAngle:Tt,mark:ft,config:pt};for(const Ct of AXIS_COMPONENT_PROPERTIES){const $t=Ct in axisRules?axisRules[Ct](Et):isAxisProperty(Ct)?st[Ct]:void 0,Ot=$t!==void 0,Rt=isExplicit($t,Ct,st,tt,et);if(Ot&&Rt)ut.set(Ct,$t,Rt);else{const{configValue:It=void 0,configFrom:kt=void 0}=isAxisProperty(Ct)&&Ct!=="values"?getAxisConfig(Ct,pt.style,st.style,yt):{},Mt=It!==void 0;Ot&&!Mt?ut.set(Ct,$t,Rt):(kt!=="vgAxisConfig"||propsToAlwaysIncludeConfig.has(Ct)&&Mt||isConditionalAxisValue(It)||isSignalRef(It))&&ut.set(Ct,It,!1)}}const xt=(ot=st.encoding)!==null&&ot!==void 0?ot:{},At=AXIS_PARTS.reduce((Ct,$t)=>{var Ot;if(!ut.hasAxisPart($t))return Ct;const Rt=guideEncodeEntry((Ot=xt[$t])!==null&&Ot!==void 0?Ot:{},tt),It=$t==="labels"?labels$1(tt,et,Rt):Rt;return It!==void 0&&!isEmpty$1(It)&&(Ct[$t]={update:It}),Ct},{});return isEmpty$1(At)||ut.set("encode",At,!!st.encoding||st.labelAngle!==void 0),ut}function initLayoutSize({encoding:et,size:tt}){for(const nt of POSITION_SCALE_CHANNELS){const rt=getSizeChannel(nt);isStep(tt[rt])&&isContinuousFieldOrDatumDef(et[nt])&&(delete tt[rt],warn(stepDropped(rt)))}return tt}function initMarkdef(et,tt,nt){const rt=replaceExprRef(et),ot=getMarkPropOrConfig("orient",rt,nt);if(rt.orient=orient(rt.type,tt,ot),ot!==void 0&&ot!==rt.orient&&warn(orientOverridden(rt.orient,ot)),rt.type==="bar"&&rt.orient){const ct=getMarkPropOrConfig("cornerRadiusEnd",rt,nt);if(ct!==void 0){const ft=rt.orient==="horizontal"&&tt.x2||rt.orient==="vertical"&&tt.y2?["cornerRadius"]:BAR_CORNER_RADIUS_INDEX[rt.orient];for(const pt of ft)rt[pt]=ct;rt.cornerRadiusEnd!==void 0&&delete rt.cornerRadiusEnd}}return getMarkPropOrConfig("opacity",rt,nt)===void 0&&(rt.opacity=opacity(rt.type,tt)),getMarkPropOrConfig("cursor",rt,nt)===void 0&&(rt.cursor=cursor(rt,tt,nt)),rt}function cursor(et,tt,nt){return tt.href||et.href||getMarkPropOrConfig("href",et,nt)?"pointer":et.cursor}function opacity(et,tt){if(contains([POINT,TICK,CIRCLE,SQUARE],et)&&!isAggregate$1(tt))return .7}function defaultFilled(et,tt,{graticule:nt}){if(nt)return!1;const rt=getMarkConfig("filled",et,tt),ot=et.type;return getFirstDefined(rt,ot!==POINT&&ot!==LINE&&ot!==RULE)}function orient(et,tt,nt){switch(et){case POINT:case CIRCLE:case SQUARE:case TEXT:case RECT:case IMAGE:return}const{x:rt,y:ot,x2:st,y2:ut}=tt;switch(et){case BAR:if(isFieldDef(rt)&&(isBinned(rt.bin)||isFieldDef(ot)&&ot.aggregate&&!rt.aggregate))return"vertical";if(isFieldDef(ot)&&(isBinned(ot.bin)||isFieldDef(rt)&&rt.aggregate&&!ot.aggregate))return"horizontal";if(ut||st){if(nt)return nt;if(!st)return(isFieldDef(rt)&&rt.type===QUANTITATIVE&&!isBinning(rt.bin)||isNumericDataDef(rt))&&isFieldDef(ot)&&isBinned(ot.bin)?"horizontal":"vertical";if(!ut)return(isFieldDef(ot)&&ot.type===QUANTITATIVE&&!isBinning(ot.bin)||isNumericDataDef(ot))&&isFieldDef(rt)&&isBinned(rt.bin)?"vertical":"horizontal"}case RULE:if(st&&!(isFieldDef(rt)&&isBinned(rt.bin))&&ut&&!(isFieldDef(ot)&&isBinned(ot.bin)))return;case AREA:if(ut)return isFieldDef(ot)&&isBinned(ot.bin)?"horizontal":"vertical";if(st)return isFieldDef(rt)&&isBinned(rt.bin)?"vertical":"horizontal";if(et===RULE){if(rt&&!ot)return"vertical";if(ot&&!rt)return"horizontal"}case LINE:case TICK:{const ct=isContinuousFieldOrDatumDef(rt),ft=isContinuousFieldOrDatumDef(ot);if(nt)return nt;if(ct&&!ft)return et!=="tick"?"horizontal":"vertical";if(!ct&&ft)return et!=="tick"?"vertical":"horizontal";if(ct&&ft){const pt=rt,ht=ot,mt=pt.type===TEMPORAL,yt=ht.type===TEMPORAL;return mt&&!yt?et!=="tick"?"vertical":"horizontal":!mt&&yt?et!=="tick"?"horizontal":"vertical":!pt.aggregate&&ht.aggregate?et!=="tick"?"vertical":"horizontal":pt.aggregate&&!ht.aggregate&&et!=="tick"?"horizontal":"vertical"}else return}}return"vertical"}const arc={vgMark:"arc",encodeEntry:et=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),pointPosition("x",et,{defaultPos:"mid"})),pointPosition("y",et,{defaultPos:"mid"})),rectPosition(et,"radius")),rectPosition(et,"theta"))},area={vgMark:"area",encodeEntry:et=>Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),pointOrRangePosition("x",et,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:et.markDef.orient==="horizontal"})),pointOrRangePosition("y",et,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:et.markDef.orient==="vertical"})),defined(et))},bar={vgMark:"rect",encodeEntry:et=>Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),rectPosition(et,"x")),rectPosition(et,"y"))},geoshape={vgMark:"shape",encodeEntry:et=>Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),postEncodingTransform:et=>{const{encoding:tt}=et,nt=tt.shape;return[Object.assign({type:"geoshape",projection:et.projectionName()},nt&&isFieldDef(nt)&&nt.type===GEOJSON?{field:vgField(nt,{expr:"datum"})}:{})]}},image={vgMark:"image",encodeEntry:et=>Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),rectPosition(et,"x")),rectPosition(et,"y")),text$1(et,"url"))},line={vgMark:"line",encodeEntry:et=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),pointPosition("x",et,{defaultPos:"mid"})),pointPosition("y",et,{defaultPos:"mid"})),nonPosition("size",et,{vgChannel:"strokeWidth"})),defined(et))},trail={vgMark:"trail",encodeEntry:et=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),pointPosition("x",et,{defaultPos:"mid"})),pointPosition("y",et,{defaultPos:"mid"})),nonPosition("size",et)),defined(et))};function encodeEntry(et,tt){const{config:nt}=et;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),pointPosition("x",et,{defaultPos:"mid"})),pointPosition("y",et,{defaultPos:"mid"})),nonPosition("size",et)),nonPosition("angle",et)),shapeMixins(et,nt,tt))}function shapeMixins(et,tt,nt){return nt?{shape:{value:nt}}:nonPosition("shape",et)}const point={vgMark:"symbol",encodeEntry:et=>encodeEntry(et)},circle={vgMark:"symbol",encodeEntry:et=>encodeEntry(et,"circle")},square={vgMark:"symbol",encodeEntry:et=>encodeEntry(et,"square")},rect={vgMark:"rect",encodeEntry:et=>Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),rectPosition(et,"x")),rectPosition(et,"y"))},rule={vgMark:"rule",encodeEntry:et=>{const{markDef:tt}=et,nt=tt.orient;return!et.encoding.x&&!et.encoding.y&&!et.encoding.latitude&&!et.encoding.longitude?{}:Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),pointOrRangePosition("x",et,{defaultPos:nt==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:nt!=="vertical"})),pointOrRangePosition("y",et,{defaultPos:nt==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:nt!=="horizontal"})),nonPosition("size",et,{vgChannel:"strokeWidth"}))}},text={vgMark:"text",encodeEntry:et=>{const{config:tt,encoding:nt}=et;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),pointPosition("x",et,{defaultPos:"mid"})),pointPosition("y",et,{defaultPos:"mid"})),text$1(et)),nonPosition("size",et,{vgChannel:"fontSize"})),nonPosition("angle",et)),valueIfDefined("align",align(et.markDef,nt,tt))),valueIfDefined("baseline",baseline(et.markDef,nt,tt))),pointPosition("radius",et,{defaultPos:null})),pointPosition("theta",et,{defaultPos:null}))}};function align(et,tt,nt){if(getMarkPropOrConfig("align",et,nt)===void 0)return"center"}function baseline(et,tt,nt){if(getMarkPropOrConfig("baseline",et,nt)===void 0)return"middle"}const tick={vgMark:"rect",encodeEntry:et=>{const{config:tt,markDef:nt}=et,rt=nt.orient,ot=rt==="horizontal"?"width":"height",st=rt==="horizontal"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},baseEncodeEntry(et,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),pointPosition("x",et,{defaultPos:"mid",vgChannel:"xc"})),pointPosition("y",et,{defaultPos:"mid",vgChannel:"yc"})),nonPosition("size",et,{defaultValue:defaultSize(et),vgChannel:ot})),{[st]:signalOrValueRef(getMarkPropOrConfig("thickness",nt,tt))})}};function defaultSize(et){var tt;const{config:nt,markDef:rt}=et,{orient:ot}=rt,st=ot==="horizontal"?"width":"height",ut=et.getScaleComponent(ot==="horizontal"?"x":"y"),ct=(tt=getMarkPropOrConfig("size",rt,nt,{vgChannel:st}))!==null&&tt!==void 0?tt:nt.tick.bandSize;if(ct!==void 0)return ct;{const ft=ut?ut.get("range"):void 0;return ft&&isVgRangeStep(ft)&&isNumber$1(ft.step)?ft.step*3/4:getViewConfigDiscreteStep(nt.view,st)*3/4}}const markCompiler={arc,area,bar,circle,geoshape,image,line,point,rect,rule,square,text,tick,trail};function parseMarkGroups(et){if(contains([LINE,AREA,TRAIL],et.mark)){const tt=pathGroupingFields(et.mark,et.encoding);if(tt.length>0)return getPathGroups(et,tt)}else if(et.mark===BAR){const tt=VG_CORNERRADIUS_CHANNELS.some(nt=>getMarkPropOrConfig(nt,et.markDef,et.config));if(et.stack&&!et.fieldDef("size")&&tt)return getGroupsForStackedBarWithCornerRadius(et)}return getMarkGroup(et)}const FACETED_PATH_PREFIX="faceted_path_";function getPathGroups(et,tt){return[{name:et.getName("pathgroup"),type:"group",from:{facet:{name:FACETED_PATH_PREFIX+et.requestDataName(DataSourceType.Main),data:et.requestDataName(DataSourceType.Main),groupby:tt}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:getMarkGroup(et,{fromPrefix:FACETED_PATH_PREFIX})}]}const STACK_GROUP_PREFIX="stack_group_";function getGroupsForStackedBarWithCornerRadius(et){var tt;const[nt]=getMarkGroup(et,{fromPrefix:STACK_GROUP_PREFIX}),rt=et.scaleName(et.stack.fieldChannel),ot=(ht={})=>et.vgField(et.stack.fieldChannel,ht),st=(ht,mt)=>{const yt=[ot({prefix:"min",suffix:"start",expr:mt}),ot({prefix:"max",suffix:"start",expr:mt}),ot({prefix:"min",suffix:"end",expr:mt}),ot({prefix:"max",suffix:"end",expr:mt})];return`${ht}(${yt.map(vt=>`scale('${rt}',${vt})`).join(",")})`};let ut,ct;et.stack.fieldChannel==="x"?(ut=Object.assign(Object.assign({},pick$1(nt.encode.update,["y","yc","y2","height",...VG_CORNERRADIUS_CHANNELS])),{x:{signal:st("min","datum")},x2:{signal:st("max","datum")},clip:{value:!0}}),ct={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},nt.encode.update=Object.assign(Object.assign({},omit$1(nt.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(ut=Object.assign(Object.assign({},pick$1(nt.encode.update,["x","xc","x2","width"])),{y:{signal:st("min","datum")},y2:{signal:st("max","datum")},clip:{value:!0}}),ct={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},nt.encode.update=Object.assign(Object.assign({},omit$1(nt.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));for(const ht of VG_CORNERRADIUS_CHANNELS){const mt=getMarkConfig(ht,et.markDef,et.config);nt.encode.update[ht]?(ut[ht]=nt.encode.update[ht],delete nt.encode.update[ht]):mt&&(ut[ht]=signalOrValueRef(mt)),mt&&(nt.encode.update[ht]={value:0})}const ft=[];if(((tt=et.stack.groupbyChannels)===null||tt===void 0?void 0:tt.length)>0)for(const ht of et.stack.groupbyChannels){const mt=et.fieldDef(ht),yt=vgField(mt);yt&&ft.push(yt),(mt?.bin||mt?.timeUnit)&&ft.push(vgField(mt,{binSuffix:"end"}))}return ut=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((ht,mt)=>{if(nt.encode.update[mt])return Object.assign(Object.assign({},ht),{[mt]:nt.encode.update[mt]});{const yt=getMarkConfig(mt,et.markDef,et.config);return yt!==void 0?Object.assign(Object.assign({},ht),{[mt]:signalOrValueRef(yt)}):ht}},ut),ut.stroke&&(ut.strokeForeground={value:!0},ut.strokeOffset={value:0}),[{type:"group",from:{facet:{data:et.requestDataName(DataSourceType.Main),name:STACK_GROUP_PREFIX+et.requestDataName(DataSourceType.Main),groupby:ft,aggregate:{fields:[ot({suffix:"start"}),ot({suffix:"start"}),ot({suffix:"end"}),ot({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:ut},marks:[{type:"group",encode:{update:ct},marks:[nt]}]}]}function getSort(et){var tt;const{encoding:nt,stack:rt,mark:ot,markDef:st,config:ut}=et,ct=nt.order;if(!(!isArray(ct)&&isValueDef(ct)&&isNullOrFalse(ct.value)||!ct&&isNullOrFalse(getMarkPropOrConfig("order",st,ut)))){if((isArray(ct)||isFieldDef(ct))&&!rt)return sortParams(ct,{expr:"datum"});if(isPathMark(ot)){const ft=st.orient==="horizontal"?"y":"x",pt=nt[ft];if(isFieldDef(pt)){const ht=pt.sort;if(isArray(ht))return{field:vgField(pt,{prefix:ft,suffix:"sort_index",expr:"datum"})};if(isSortField(ht))return{field:vgField({aggregate:isAggregate$1(et.encoding)?ht.op:void 0,field:ht.field},{expr:"datum"})};if(isSortByEncoding(ht)){const mt=et.fieldDef(ht.encoding);return{field:vgField(mt,{expr:"datum"}),order:ht.order}}else return ht===null?void 0:{field:vgField(pt,{binSuffix:!((tt=et.stack)===null||tt===void 0)&&tt.impute?"mid":void 0,expr:"datum"})}}return}}}function getMarkGroup(et,tt={fromPrefix:""}){const{mark:nt,markDef:rt,encoding:ot,config:st}=et,ut=getFirstDefined(rt.clip,scaleClip(et),projectionClip(et)),ct=getStyles(rt),ft=ot.key,pt=getSort(et),ht=interactiveFlag(et),mt=getMarkPropOrConfig("aria",rt,st),yt=markCompiler[nt].postEncodingTransform?markCompiler[nt].postEncodingTransform(et):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:et.getName("marks"),type:markCompiler[nt].vgMark},ut?{clip:!0}:{}),ct?{style:ct}:{}),ft?{key:ft.field}:{}),pt?{sort:pt}:{}),ht||{}),mt===!1?{aria:mt}:{}),{from:{data:tt.fromPrefix+et.requestDataName(DataSourceType.Main)},encode:{update:markCompiler[nt].encodeEntry(et)}}),yt?{transform:yt}:{})]}function scaleClip(et){const tt=et.getScaleComponent("x"),nt=et.getScaleComponent("y");return tt?.get("selectionExtent")||nt?.get("selectionExtent")?!0:void 0}function projectionClip(et){const tt=et.component.projection;return tt&&!tt.isFit?!0:void 0}function interactiveFlag(et){if(!et.component.selection)return null;const tt=keys$1(et.component.selection).length;let nt=tt,rt=et.parent;for(;rt&&nt===0;)nt=keys$1(rt.component.selection).length,rt=rt.parent;return nt?{interactive:tt>0||!!et.encoding.tooltip}:null}class UnitModel extends ModelWithField{constructor(tt,nt,rt,ot={},st){var ut;super(tt,"unit",nt,rt,st,void 0,isFrameMixins(tt)?tt.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const ct=isMarkDef(tt.mark)?Object.assign({},tt.mark):{type:tt.mark},ft=ct.type;ct.filled===void 0&&(ct.filled=defaultFilled(ct,st,{graticule:tt.data&&isGraticuleGenerator(tt.data)}));const pt=this.encoding=initEncoding(tt.encoding||{},ft,ct.filled,st);this.markDef=initMarkdef(ct,pt,st),this.size=initLayoutSize({encoding:pt,size:isFrameMixins(tt)?Object.assign(Object.assign(Object.assign({},ot),tt.width?{width:tt.width}:{}),tt.height?{height:tt.height}:{}):ot}),this.stack=stack(ft,pt),this.specifiedScales=this.initScales(ft,pt),this.specifiedAxes=this.initAxes(pt),this.specifiedLegends=this.initLegends(pt),this.specifiedProjection=tt.projection,this.selection=((ut=tt.params)!==null&&ut!==void 0?ut:[]).filter(ht=>isSelectionParameter(ht))}get hasProjection(){const{encoding:tt}=this,nt=this.mark===GEOSHAPE,rt=tt&&GEOPOSITION_CHANNELS.some(ot=>isFieldOrDatumDef(tt[ot]));return nt||rt}scaleDomain(tt){const nt=this.specifiedScales[tt];return nt?nt.domain:void 0}axis(tt){return this.specifiedAxes[tt]}legend(tt){return this.specifiedLegends[tt]}initScales(tt,nt){return SCALE_CHANNELS.reduce((rt,ot)=>{var st;const ut=getFieldOrDatumDef(nt[ot]);return ut&&(rt[ot]=this.initScale((st=ut.scale)!==null&&st!==void 0?st:{})),rt},{})}initScale(tt){const{domain:nt,range:rt}=tt,ot=replaceExprRef(tt);return isArray(nt)&&(ot.domain=nt.map(signalRefOrValue)),isArray(rt)&&(ot.range=rt.map(signalRefOrValue)),ot}initAxes(tt){return POSITION_SCALE_CHANNELS.reduce((nt,rt)=>{const ot=tt[rt];if(isFieldOrDatumDef(ot)||rt===X&&isFieldOrDatumDef(tt.x2)||rt===Y&&isFieldOrDatumDef(tt.y2)){const st=isFieldOrDatumDef(ot)?ot.axis:void 0;nt[rt]=st&&this.initAxis(Object.assign({},st))}return nt},{})}initAxis(tt){const nt=keys$1(tt),rt={};for(const ot of nt){const st=tt[ot];rt[ot]=isConditionalAxisValue(st)?signalOrValueRefWithCondition(st):signalRefOrValue(st)}return rt}initLegends(tt){return NONPOSITION_SCALE_CHANNELS.reduce((nt,rt)=>{const ot=getFieldOrDatumDef(tt[rt]);if(ot&&supportLegend(rt)){const st=ot.legend;nt[rt]=st&&replaceExprRef(st)}return nt},{})}parseData(){this.component.data=parseData(this)}parseLayoutSize(){parseUnitLayoutSize(this)}parseSelections(){this.component.selection=parseUnitSelection(this,this.selection)}parseMarkGroup(){this.component.mark=parseMarkGroups(this)}parseAxesAndHeaders(){this.component.axes=parseUnitAxes(this)}assembleSelectionTopLevelSignals(tt){return assembleTopLevelSignals(this,tt)}assembleSignals(){return[...assembleAxisSignals(this),...assembleUnitSelectionSignals(this,[])]}assembleSelectionData(tt){return assembleUnitSelectionData(this,tt)}assembleLayout(){return null}assembleLayoutSignals(){return assembleLayoutSignals(this)}assembleMarks(){var tt;let nt=(tt=this.component.mark)!==null&&tt!==void 0?tt:[];return(!this.parent||!isLayerModel(this.parent))&&(nt=assembleUnitSelectionMarks(this,nt)),nt.map(this.correctDataNames)}assembleGroupStyle(){const{style:tt}=this.view||{};if(tt!==void 0)return tt;if(this.encoding.x||this.encoding.y)return"cell"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(tt){return channelHasField(this.encoding,tt)}fieldDef(tt){const nt=this.encoding[tt];return getFieldDef(nt)}typedFieldDef(tt){const nt=this.fieldDef(tt);return isTypedFieldDef(nt)?nt:null}}class LayerModel extends Model{constructor(tt,nt,rt,ot,st){super(tt,"layer",nt,rt,st,tt.resolve,tt.view);const ut=Object.assign(Object.assign(Object.assign({},ot),tt.width?{width:tt.width}:{}),tt.height?{height:tt.height}:{});this.children=tt.layer.map((ct,ft)=>{if(isLayerSpec(ct))return new LayerModel(ct,this,this.getName(`layer_${ft}`),ut,st);if(isUnitSpec(ct))return new UnitModel(ct,this,this.getName(`layer_${ft}`),ut,st);throw new Error(invalidSpec(ct))})}parseData(){this.component.data=parseData(this);for(const tt of this.children)tt.parseData()}parseLayoutSize(){parseLayerLayoutSize(this)}parseSelections(){this.component.selection={};for(const tt of this.children){tt.parseSelections();for(const nt of keys$1(tt.component.selection))this.component.selection[nt]=tt.component.selection[nt]}}parseMarkGroup(){for(const tt of this.children)tt.parseMarkGroup()}parseAxesAndHeaders(){parseLayerAxes(this)}assembleSelectionTopLevelSignals(tt){return this.children.reduce((nt,rt)=>rt.assembleSelectionTopLevelSignals(nt),tt)}assembleSignals(){return this.children.reduce((tt,nt)=>tt.concat(nt.assembleSignals()),assembleAxisSignals(this))}assembleLayoutSignals(){return this.children.reduce((tt,nt)=>tt.concat(nt.assembleLayoutSignals()),assembleLayoutSignals(this))}assembleSelectionData(tt){return this.children.reduce((nt,rt)=>rt.assembleSelectionData(nt),tt)}assembleGroupStyle(){const tt=new Set;for(const rt of this.children)for(const ot of array$5(rt.assembleGroupStyle()))tt.add(ot);const nt=Array.from(tt);return nt.length>1?nt:nt.length===1?nt[0]:void 0}assembleTitle(){let tt=super.assembleTitle();if(tt)return tt;for(const nt of this.children)if(tt=nt.assembleTitle(),tt)return tt}assembleLayout(){return null}assembleMarks(){return assembleLayerSelectionMarks(this,this.children.flatMap(tt=>tt.assembleMarks()))}assembleLegends(){return this.children.reduce((tt,nt)=>tt.concat(nt.assembleLegends()),assembleLegends(this))}}function buildModel(et,tt,nt,rt,ot){if(isFacetSpec(et))return new FacetModel(et,tt,nt,ot);if(isLayerSpec(et))return new LayerModel(et,tt,nt,rt,ot);if(isUnitSpec(et))return new UnitModel(et,tt,nt,rt,ot);if(isAnyConcatSpec(et))return new ConcatModel(et,tt,nt,ot);throw new Error(invalidSpec(et))}var __rest$1=globalThis&&globalThis.__rest||function(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt};function compile$1(et,tt={}){tt.logger&&set(tt.logger),tt.fieldTitle&&setTitleFormatter(tt.fieldTitle);try{const nt=initConfig(mergeConfig(tt.config,et.config)),rt=normalize(et,nt),ot=buildModel(rt,null,"",void 0,nt);return ot.parse(),optimizeDataflow(ot.component.data,ot),{spec:assembleTopLevelModel(ot,getTopLevelProperties(et,rt.autosize,nt,ot),et.datasets,et.usermeta),normalized:rt}}finally{tt.logger&&reset(),tt.fieldTitle&&resetTitleFormatter()}}function getTopLevelProperties(et,tt,nt,rt){const ot=rt.component.layoutSize.get("width"),st=rt.component.layoutSize.get("height");if(tt===void 0?(tt={type:"pad"},rt.hasAxisOrientSignalRef()&&(tt.resize=!0)):isString(tt)&&(tt={type:tt}),ot&&st&&isFitType(tt.type)){if(ot==="step"&&st==="step")warn(droppingFit()),tt.type="pad";else if(ot==="step"||st==="step"){const ut=ot==="step"?"width":"height";warn(droppingFit(getPositionScaleChannel(ut)));const ct=ut==="width"?"height":"width";tt.type=getFitType(ct)}}return Object.assign(Object.assign(Object.assign({},keys$1(tt).length===1&&tt.type?tt.type==="pad"?{}:{autosize:tt.type}:{autosize:tt}),extractTopLevelProperties(nt,!1)),extractTopLevelProperties(et,!0))}function assembleTopLevelModel(et,tt,nt={},rt){const ot=et.config?stripAndRedirectConfig(et.config):void 0,st=[].concat(et.assembleSelectionData([]),assembleRootData(et.component.data,nt)),ut=et.assembleProjections(),ct=et.assembleTitle(),ft=et.assembleGroupStyle(),pt=et.assembleGroupEncodeEntry(!0);let ht=et.assembleLayoutSignals();ht=ht.filter(vt=>(vt.name==="width"||vt.name==="height")&&vt.value!==void 0?(tt[vt.name]=+vt.value,!1):!0);const{params:mt}=tt,yt=__rest$1(tt,["params"]);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"https://vega.github.io/schema/vega/v5.json"},et.description?{description:et.description}:{}),yt),ct?{title:ct}:{}),ft?{style:ft}:{}),pt?{encode:{update:pt}}:{}),{data:st}),ut.length>0?{projections:ut}:{}),et.assembleGroup([...ht,...et.assembleSelectionTopLevelSignals([]),...assembleParameterSignals(mt)])),ot?{config:ot}:{}),rt?{usermeta:rt}:{})}const version$2=pkg$1.version,vegaLiteImport=Object.freeze(Object.defineProperty({__proto__:null,version:version$2,compile:compile$1,normalize,deepEqual,duplicate,never,pick:pick$1,omit:omit$1,stringify:stringify$1,hash,isNullOrFalse,contains,some,every,mergeDeep:mergeDeep$1,unique,isEqual:isEqual$2,setEqual,hasIntersection,prefixGenerator,fieldIntersection,isEmpty:isEmpty$1,keys:keys$1,vals,entries:entries$1,isBoolean,varName,logicalExpr,deleteNestedProperty,titleCase,accessPathWithDatum,flatAccessWithDatum,replacePathInField,replaceAll,removePathFromField,accessPathDepth,getFirstDefined,uniqueId,resetIdCounter,internalField,isInternalField,normalizeAngle,isNumeric:isNumeric$1},Symbol.toStringTag,{value:"Module"}));function e$1(et){const[tt,nt]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(et).slice(1,3);return{library:tt,version:nt}}var name$1="vega-themes",version$1="2.13.0",description="Themes for stylized Vega and Vega-Lite visualizations.",keywords=["vega","vega-lite","themes","style"],license="BSD-3-Clause",author={name:"UW Interactive Data Lab",url:"https://idl.cs.washington.edu"},contributors=[{name:"Emily Gu",url:"https://github.com/emilygu"},{name:"Arvind Satyanarayan",url:"http://arvindsatya.com"},{name:"Jeffrey Heer",url:"https://idl.cs.washington.edu"},{name:"Dominik Moritz",url:"https://www.domoritz.de"}],main="build/vega-themes.js",module$1="build/vega-themes.module.js",unpkg="build/vega-themes.min.js",jsdelivr="build/vega-themes.min.js",types$6="build/vega-themes.module.d.ts",repository={type:"git",url:"https://github.com/vega/vega-themes.git"},files=["src","build"],scripts={prebuild:"yarn clean",build:"rollup -c",clean:"rimraf build && rimraf examples/build","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",preversion:"yarn lint",serve:"browser-sync start -s -f build examples --serveStatic examples",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",format:"eslint . --fix",lint:"eslint .",release:"release-it"},devDependencies={"@babel/core":"^7.21.4","@babel/plugin-transform-runtime":"^7.21.4","@babel/preset-env":"^7.21.4","@babel/preset-typescript":"^7.21.4","@release-it/conventional-changelog":"^5.1.1","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.2","@rollup/plugin-terser":"^0.4.1","@typescript-eslint/eslint-plugin":"^5.59.0","@typescript-eslint/parser":"^5.59.0","browser-sync":"^2.29.1",concurrently:"^8.0.1",eslint:"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","gh-pages":"^5.0.0",prettier:"^2.8.7","release-it":"^15.10.1",rollup:"^3.20.6","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-ts":"^3.2.0",typescript:"^5.0.4",vega:"^5.24.0","vega-lite":"^5.7.1"},peerDependencies={vega:"*","vega-lite":"*"},dependencies={},pkg={name:name$1,version:version$1,description,keywords,license,author,contributors,main,module:module$1,unpkg,jsdelivr,types:types$6,repository,files,scripts,devDependencies,peerDependencies,dependencies};const lightColor="#fff",medColor="#888",darkTheme={background:"#333",view:{stroke:medColor},title:{color:lightColor,subtitleColor:lightColor},style:{"guide-label":{fill:lightColor},"guide-title":{fill:lightColor}},axis:{domainColor:lightColor,gridColor:medColor,tickColor:lightColor}},markColor$7="#4572a7",excelTheme={background:"#fff",arc:{fill:markColor$7},area:{fill:markColor$7},line:{stroke:markColor$7,strokeWidth:2},path:{stroke:markColor$7},rect:{fill:markColor$7},shape:{stroke:markColor$7},symbol:{fill:markColor$7,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},markColor$6="#30a2da",axisColor$2="#cbcbcb",guideLabelColor="#999",guideTitleColor="#333",backgroundColor$2="#f0f0f0",blackTitle="#333",fiveThirtyEightTheme={arc:{fill:markColor$6},area:{fill:markColor$6},axis:{domainColor:axisColor$2,grid:!0,gridColor:axisColor$2,gridWidth:1,labelColor:guideLabelColor,labelFontSize:10,titleColor:guideTitleColor,tickColor:axisColor$2,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:backgroundColor$2,group:{fill:backgroundColor$2},legend:{labelColor:blackTitle,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:blackTitle,titleFontSize:14,titlePadding:10},line:{stroke:markColor$6,strokeWidth:2},path:{stroke:markColor$6,strokeWidth:.5},rect:{fill:markColor$6},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:markColor$6},bar:{binSpacing:2,fill:markColor$6,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},markColor$5="#000",ggplot2Theme={group:{fill:"#e5e5e5"},arc:{fill:markColor$5},area:{fill:markColor$5},line:{stroke:markColor$5},path:{stroke:markColor$5},rect:{fill:markColor$5},shape:{stroke:markColor$5},symbol:{fill:markColor$5,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},headlineFontSize=22,headlineFontWeight="normal",labelFont$1="Benton Gothic, sans-serif",labelFontSize=11.5,labelFontWeight="normal",markColor$4="#82c6df",titleFont="Benton Gothic Bold, sans-serif",titleFontWeight="normal",titleFontSize$1=13,colorSchemes$1={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},latimesTheme={background:"#ffffff",title:{anchor:"start",color:"#000000",font:titleFont,fontSize:headlineFontSize,fontWeight:headlineFontWeight},arc:{fill:markColor$4},area:{fill:markColor$4},line:{stroke:markColor$4,strokeWidth:2},path:{stroke:markColor$4},rect:{fill:markColor$4},shape:{stroke:markColor$4},symbol:{fill:markColor$4,size:30},axis:{labelFont:labelFont$1,labelFontSize,labelFontWeight,titleFont,titleFontSize:titleFontSize$1,titleFontWeight},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:labelFont$1,labelFontSize,symbolType:"square",titleFont,titleFontSize:titleFontSize$1,titleFontWeight},range:{category:colorSchemes$1["category-6"],diverging:colorSchemes$1["fireandice-6"],heatmap:colorSchemes$1["fire-7"],ordinal:colorSchemes$1["fire-7"],ramp:colorSchemes$1["fire-7"]}},markColor$3="#ab5787",axisColor$1="#979797",quartzTheme={background:"#f9f9f9",arc:{fill:markColor$3},area:{fill:markColor$3},line:{stroke:markColor$3},path:{stroke:markColor$3},rect:{fill:markColor$3},shape:{stroke:markColor$3},symbol:{fill:markColor$3,size:30},axis:{domainColor:axisColor$1,domainWidth:.5,gridWidth:.2,labelColor:axisColor$1,tickColor:axisColor$1,tickWidth:.2,titleColor:axisColor$1},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},markColor$2="#3e5c69",voxTheme={background:"#fff",arc:{fill:markColor$2},area:{fill:markColor$2},line:{stroke:markColor$2},path:{stroke:markColor$2},rect:{fill:markColor$2},shape:{stroke:markColor$2},symbol:{fill:markColor$2},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},markColor$1="#1696d2",axisColor="#000000",backgroundColor$1="#FFFFFF",font="Lato",labelFont="Lato",sourceFont="Lato",gridColor$1="#DEDDDD",titleFontSize=18,colorSchemes={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},urbanInstituteTheme={background:backgroundColor$1,title:{anchor:"start",fontSize:titleFontSize,font},axisX:{domain:!0,domainColor:axisColor,domainWidth:1,grid:!1,labelFontSize:12,labelFont,labelAngle:0,tickColor:axisColor,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:font},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:gridColor$1,gridWidth:1,labelFontSize:12,labelFont,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:font,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:font,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:colorSchemes["six-groups-cat-1"],diverging:colorSchemes["diverging-colors"],heatmap:colorSchemes["diverging-colors"],ordinal:colorSchemes["six-groups-seq"],ramp:colorSchemes["shades-blue"]},area:{fill:markColor$1},rect:{fill:markColor$1},line:{color:markColor$1,stroke:markColor$1,strokeWidth:5},trail:{color:markColor$1,stroke:markColor$1,strokeWidth:0,size:1},path:{stroke:markColor$1,strokeWidth:.5},point:{filled:!0},text:{font:sourceFont,color:markColor$1,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:markColor$1,stroke:null}},arc:{fill:markColor$1},shape:{stroke:markColor$1},symbol:{fill:markColor$1,size:30}},markColor="#3366CC",gridColor="#ccc",defaultFont="Arial, sans-serif",googlechartsTheme={arc:{fill:markColor},area:{fill:markColor},path:{stroke:markColor},rect:{fill:markColor},shape:{stroke:markColor},symbol:{stroke:markColor},circle:{fill:markColor},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:defaultFont,fontSize:12},"guide-title":{font:defaultFont,fontSize:12},"group-title":{font:defaultFont,fontSize:12}},title:{font:defaultFont,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor,tickColor:gridColor,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},ptToPx=et=>et*(1/3+1),fontSmallPx=ptToPx(9),legendFontPx=ptToPx(10),fontLargePx=ptToPx(12),fontStandard="Segoe UI",fontTitle="wf_standard-font, helvetica, arial, sans-serif",firstLevelElementColor="#252423",secondLevelElementColor="#605E5C",backgroundColor="transparent",backgroundSecondaryColor="#C8C6C4",paletteColor1="#118DFF",paletteColor2="#12239E",paletteColor3="#E66C37",paletteColor4="#6B007B",paletteColor5="#E044A7",paletteColor6="#744EC2",paletteColor7="#D9B300",paletteColor8="#D64550",divergentColorMax=paletteColor1,divergentColorMin="#DEEFFF",divergentPalette=[divergentColorMin,divergentColorMax],ordinalPalette=[divergentColorMin,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",divergentColorMax],powerbiTheme={view:{stroke:backgroundColor},background:backgroundColor,font:fontStandard,header:{titleFont:fontTitle,titleFontSize:fontLargePx,titleColor:firstLevelElementColor,labelFont:fontStandard,labelFontSize:legendFontPx,labelColor:secondLevelElementColor},axis:{ticks:!1,grid:!1,domain:!1,labelColor:secondLevelElementColor,labelFontSize:fontSmallPx,titleFont:fontTitle,titleColor:firstLevelElementColor,titleFontSize:fontLargePx,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:backgroundSecondaryColor,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:paletteColor1},line:{stroke:paletteColor1,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:fontStandard,fontSize:fontSmallPx,fill:secondLevelElementColor},arc:{fill:paletteColor1},area:{fill:paletteColor1,line:!0,opacity:.6},path:{stroke:paletteColor1},rect:{fill:paletteColor1},point:{fill:paletteColor1,filled:!0,size:75},shape:{stroke:paletteColor1},symbol:{fill:paletteColor1,strokeWidth:1.5,size:50},legend:{titleFont:fontStandard,titleFontWeight:"bold",titleColor:secondLevelElementColor,labelFont:fontStandard,labelFontSize:legendFontPx,labelColor:secondLevelElementColor,symbolType:"circle",symbolSize:75},range:{category:[paletteColor1,paletteColor2,paletteColor3,paletteColor4,paletteColor5,paletteColor6,paletteColor7,paletteColor8],diverging:divergentPalette,heatmap:divergentPalette,ordinal:ordinalPalette}},version=pkg.version,themes=Object.freeze(Object.defineProperty({__proto__:null,dark:darkTheme,excel:excelTheme,fivethirtyeight:fiveThirtyEightTheme,ggplot2:ggplot2Theme,googlecharts:googlechartsTheme,latimes:latimesTheme,powerbi:powerbiTheme,quartz:quartzTheme,urbaninstitute:urbanInstituteTheme,version,vox:voxTheme},Symbol.toStringTag,{value:"Module"}));function _typeof$6(et){return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof$6(et)}function _toPrimitive$4(et,tt){if(_typeof$6(et)!=="object"||et===null)return et;var nt=et[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(et,tt||"default");if(_typeof$6(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(tt==="string"?String:Number)(et)}function _toPropertyKey$4(et){var tt=_toPrimitive$4(et,"string");return _typeof$6(tt)==="symbol"?tt:String(tt)}function _defineProperty$8(et,tt,nt){return tt=_toPropertyKey$4(tt),tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function _objectWithoutPropertiesLoose$4(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}function _objectWithoutProperties(et,tt){if(et==null)return{};var nt=_objectWithoutPropertiesLoose$4(et,tt),rt,ot;if(Object.getOwnPropertySymbols){var st=Object.getOwnPropertySymbols(et);for(ot=0;ot<st.length;ot++)rt=st[ot],!(tt.indexOf(rt)>=0)&&(!Object.prototype.propertyIsEnumerable.call(et,rt)||(nt[rt]=et[rt]))}return nt}const _excluded$2=["title","image"];function formatValue(et,tt,nt){if(isArray(et))return`[${et.map(rt=>tt(isString(rt)?rt:stringify(rt,nt))).join(", ")}]`;if(isObject(et)){let rt="";const ot=et,{title:st,image:ut}=ot,ct=_objectWithoutProperties(ot,_excluded$2);st&&(rt+=`<h2>${tt(st)}</h2>`),ut&&(rt+=`<img src="${tt(ut)}">`);const ft=Object.keys(ct);if(ft.length>0){rt+="<table>";for(const pt of ft){let ht=ct[pt];ht!==void 0&&(isObject(ht)&&(ht=stringify(ht,nt)),rt+=`<tr><td class="key">${tt(pt)}:</td><td class="value">${tt(ht)}</td></tr>`)}rt+="</table>"}return rt||"{}"}return tt(et)}function replacer(et){const tt=[];return function(nt,rt){if(typeof rt!="object"||rt===null)return rt;const ot=tt.indexOf(this)+1;return tt.length=ot,tt.length>et?"[Object]":tt.indexOf(rt)>=0?"[Circular]":(tt.push(rt),rt)}}function stringify(et,tt){return JSON.stringify(et,replacer(tt))}var defaultStyle=`#vg-tooltip-element {
  visibility: hidden;
  padding: 8px;
  position: fixed;
  z-index: 1000;
  font-family: sans-serif;
  font-size: 11px;
  border-radius: 3px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  /* The default theme is the light theme. */
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #d9d9d9;
  color: black;
}
#vg-tooltip-element.visible {
  visibility: visible;
}
#vg-tooltip-element h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 13px;
}
#vg-tooltip-element table {
  border-spacing: 0;
}
#vg-tooltip-element table tr {
  border: none;
}
#vg-tooltip-element table tr td {
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 2px;
  padding-bottom: 2px;
}
#vg-tooltip-element table tr td.key {
  color: #808080;
  max-width: 150px;
  text-align: right;
  padding-right: 4px;
}
#vg-tooltip-element table tr td.value {
  display: block;
  max-width: 300px;
  max-height: 7em;
  text-align: left;
}
#vg-tooltip-element.dark-theme {
  background-color: rgba(32, 32, 32, 0.9);
  border: 1px solid #f5f5f5;
  color: white;
}
#vg-tooltip-element.dark-theme td.key {
  color: #bfbfbf;
}
`;const EL_ID="vg-tooltip-element",DEFAULT_OPTIONS={offsetX:10,offsetY:10,id:EL_ID,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:escapeHTML,maxDepth:2,formatTooltip:formatValue};function escapeHTML(et){return String(et).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function createDefaultStyle(et){if(!/^[A-Za-z]+[-:.\w]*$/.test(et))throw new Error("Invalid HTML ID");return defaultStyle.toString().replace(EL_ID,et)}function calculatePosition$1(et,tt,nt,rt){let ot=et.clientX+nt;ot+tt.width>window.innerWidth&&(ot=+et.clientX-nt-tt.width);let st=et.clientY+rt;return st+tt.height>window.innerHeight&&(st=+et.clientY-rt-tt.height),{x:ot,y:st}}function ownKeys$b(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$b(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$b(Object(nt),!0).forEach(function(rt){_defineProperty$8(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$b(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}class Handler{constructor(tt){this.options=_objectSpread$b(_objectSpread$b({},DEFAULT_OPTIONS),tt);const nt=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const rt=document.createElement("style");rt.setAttribute("id",this.options.styleId),rt.innerHTML=createDefaultStyle(nt);const ot=document.head;ot.childNodes.length>0?ot.insertBefore(rt,ot.childNodes[0]):ot.appendChild(rt)}}tooltipHandler(tt,nt,rt,ot){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),ot==null||ot===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(ot,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:st,y:ut}=calculatePosition$1(nt,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${ut}px`,this.el.style.left=`${st}px`}}function _typeof$5(et){return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof$5(et)}function _toPrimitive$3(et,tt){if(_typeof$5(et)!=="object"||et===null)return et;var nt=et[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(et,tt||"default");if(_typeof$5(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(tt==="string"?String:Number)(et)}function _toPropertyKey$3(et){var tt=_toPrimitive$3(et,"string");return _typeof$5(tt)==="symbol"?tt:String(tt)}function _defineProperty$7(et,tt,nt){return tt=_toPropertyKey$3(tt),tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function getDefaultExportFromCjs(et){return et&&et.__esModule&&Object.prototype.hasOwnProperty.call(et,"default")?et.default:et}var iterator,hasRequiredIterator;function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,iterator=function(et){et.prototype[Symbol.iterator]=function*(){for(let tt=this.head;tt;tt=tt.next)yield tt.value}}),iterator}var yallist=Yallist$1;Yallist$1.Node=Node$1;Yallist$1.create=Yallist$1;function Yallist$1(et){var tt=this;if(tt instanceof Yallist$1||(tt=new Yallist$1),tt.tail=null,tt.head=null,tt.length=0,et&&typeof et.forEach=="function")et.forEach(function(ot){tt.push(ot)});else if(arguments.length>0)for(var nt=0,rt=arguments.length;nt<rt;nt++)tt.push(arguments[nt]);return tt}Yallist$1.prototype.removeNode=function(et){if(et.list!==this)throw new Error("removing node which does not belong to this list");var tt=et.next,nt=et.prev;return tt&&(tt.prev=nt),nt&&(nt.next=tt),et===this.head&&(this.head=tt),et===this.tail&&(this.tail=nt),et.list.length--,et.next=null,et.prev=null,et.list=null,tt};Yallist$1.prototype.unshiftNode=function(et){if(et!==this.head){et.list&&et.list.removeNode(et);var tt=this.head;et.list=this,et.next=tt,tt&&(tt.prev=et),this.head=et,this.tail||(this.tail=et),this.length++}};Yallist$1.prototype.pushNode=function(et){if(et!==this.tail){et.list&&et.list.removeNode(et);var tt=this.tail;et.list=this,et.prev=tt,tt&&(tt.next=et),this.tail=et,this.head||(this.head=et),this.length++}};Yallist$1.prototype.push=function(){for(var et=0,tt=arguments.length;et<tt;et++)push(this,arguments[et]);return this.length};Yallist$1.prototype.unshift=function(){for(var et=0,tt=arguments.length;et<tt;et++)unshift(this,arguments[et]);return this.length};Yallist$1.prototype.pop=function(){if(!!this.tail){var et=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,et}};Yallist$1.prototype.shift=function(){if(!!this.head){var et=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,et}};Yallist$1.prototype.forEach=function(et,tt){tt=tt||this;for(var nt=this.head,rt=0;nt!==null;rt++)et.call(tt,nt.value,rt,this),nt=nt.next};Yallist$1.prototype.forEachReverse=function(et,tt){tt=tt||this;for(var nt=this.tail,rt=this.length-1;nt!==null;rt--)et.call(tt,nt.value,rt,this),nt=nt.prev};Yallist$1.prototype.get=function(et){for(var tt=0,nt=this.head;nt!==null&&tt<et;tt++)nt=nt.next;if(tt===et&&nt!==null)return nt.value};Yallist$1.prototype.getReverse=function(et){for(var tt=0,nt=this.tail;nt!==null&&tt<et;tt++)nt=nt.prev;if(tt===et&&nt!==null)return nt.value};Yallist$1.prototype.map=function(et,tt){tt=tt||this;for(var nt=new Yallist$1,rt=this.head;rt!==null;)nt.push(et.call(tt,rt.value,this)),rt=rt.next;return nt};Yallist$1.prototype.mapReverse=function(et,tt){tt=tt||this;for(var nt=new Yallist$1,rt=this.tail;rt!==null;)nt.push(et.call(tt,rt.value,this)),rt=rt.prev;return nt};Yallist$1.prototype.reduce=function(et,tt){var nt,rt=this.head;if(arguments.length>1)nt=tt;else if(this.head)rt=this.head.next,nt=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var ot=0;rt!==null;ot++)nt=et(nt,rt.value,ot),rt=rt.next;return nt};Yallist$1.prototype.reduceReverse=function(et,tt){var nt,rt=this.tail;if(arguments.length>1)nt=tt;else if(this.tail)rt=this.tail.prev,nt=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var ot=this.length-1;rt!==null;ot--)nt=et(nt,rt.value,ot),rt=rt.prev;return nt};Yallist$1.prototype.toArray=function(){for(var et=new Array(this.length),tt=0,nt=this.head;nt!==null;tt++)et[tt]=nt.value,nt=nt.next;return et};Yallist$1.prototype.toArrayReverse=function(){for(var et=new Array(this.length),tt=0,nt=this.tail;nt!==null;tt++)et[tt]=nt.value,nt=nt.prev;return et};Yallist$1.prototype.slice=function(et,tt){tt=tt||this.length,tt<0&&(tt+=this.length),et=et||0,et<0&&(et+=this.length);var nt=new Yallist$1;if(tt<et||tt<0)return nt;et<0&&(et=0),tt>this.length&&(tt=this.length);for(var rt=0,ot=this.head;ot!==null&&rt<et;rt++)ot=ot.next;for(;ot!==null&&rt<tt;rt++,ot=ot.next)nt.push(ot.value);return nt};Yallist$1.prototype.sliceReverse=function(et,tt){tt=tt||this.length,tt<0&&(tt+=this.length),et=et||0,et<0&&(et+=this.length);var nt=new Yallist$1;if(tt<et||tt<0)return nt;et<0&&(et=0),tt>this.length&&(tt=this.length);for(var rt=this.length,ot=this.tail;ot!==null&&rt>tt;rt--)ot=ot.prev;for(;ot!==null&&rt>et;rt--,ot=ot.prev)nt.push(ot.value);return nt};Yallist$1.prototype.splice=function(et,tt,...nt){et>this.length&&(et=this.length-1),et<0&&(et=this.length+et);for(var rt=0,ot=this.head;ot!==null&&rt<et;rt++)ot=ot.next;for(var st=[],rt=0;ot&&rt<tt;rt++)st.push(ot.value),ot=this.removeNode(ot);ot===null&&(ot=this.tail),ot!==this.head&&ot!==this.tail&&(ot=ot.prev);for(var rt=0;rt<nt.length;rt++)ot=insert(this,ot,nt[rt]);return st};Yallist$1.prototype.reverse=function(){for(var et=this.head,tt=this.tail,nt=et;nt!==null;nt=nt.prev){var rt=nt.prev;nt.prev=nt.next,nt.next=rt}return this.head=tt,this.tail=et,this};function insert(et,tt,nt){var rt=tt===et.head?new Node$1(nt,null,tt,et):new Node$1(nt,tt,tt.next,et);return rt.next===null&&(et.tail=rt),rt.prev===null&&(et.head=rt),et.length++,rt}function push(et,tt){et.tail=new Node$1(tt,et.tail,null,et),et.head||(et.head=et.tail),et.length++}function unshift(et,tt){et.head=new Node$1(tt,null,et.head,et),et.tail||(et.tail=et.head),et.length++}function Node$1(et,tt,nt,rt){if(!(this instanceof Node$1))return new Node$1(et,tt,nt,rt);this.list=rt,this.value=et,tt?(tt.next=this,this.prev=tt):this.prev=null,nt?(nt.prev=this,this.next=nt):this.next=null}try{requireIterator()(Yallist$1)}catch(et){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(tt){if(typeof tt=="number"&&(tt={max:tt}),tt||(tt={}),tt.max&&(typeof tt.max!="number"||tt.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=tt.max||1/0;const nt=tt.length||naiveLength;if(this[LENGTH_CALCULATOR]=typeof nt!="function"?naiveLength:nt,this[ALLOW_STALE]=tt.stale||!1,tt.maxAge&&typeof tt.maxAge!="number")throw new TypeError("maxAge must be a number");this[MAX_AGE]=tt.maxAge||0,this[DISPOSE]=tt.dispose,this[NO_DISPOSE_ON_SET]=tt.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=tt.updateAgeOnGet||!1,this.reset()}set max(tt){if(typeof tt!="number"||tt<0)throw new TypeError("max must be a non-negative number");this[MAX]=tt||1/0,trim(this)}get max(){return this[MAX]}set allowStale(tt){this[ALLOW_STALE]=!!tt}get allowStale(){return this[ALLOW_STALE]}set maxAge(tt){if(typeof tt!="number")throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=tt,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(tt){typeof tt!="function"&&(tt=naiveLength),tt!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=tt,this[LENGTH]=0,this[LRU_LIST].forEach(nt=>{nt.length=this[LENGTH_CALCULATOR](nt.value,nt.key),this[LENGTH]+=nt.length})),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(tt,nt){nt=nt||this;for(let rt=this[LRU_LIST].tail;rt!==null;){const ot=rt.prev;forEachStep(this,tt,rt,nt),rt=ot}}forEach(tt,nt){nt=nt||this;for(let rt=this[LRU_LIST].head;rt!==null;){const ot=rt.next;forEachStep(this,tt,rt,nt),rt=ot}}keys(){return this[LRU_LIST].toArray().map(tt=>tt.key)}values(){return this[LRU_LIST].toArray().map(tt=>tt.value)}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach(tt=>this[DISPOSE](tt.key,tt.value)),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map(tt=>isStale(this,tt)?!1:{k:tt.key,v:tt.value,e:tt.now+(tt.maxAge||0)}).toArray().filter(tt=>tt)}dumpLru(){return this[LRU_LIST]}set(tt,nt,rt){if(rt=rt||this[MAX_AGE],rt&&typeof rt!="number")throw new TypeError("maxAge must be a number");const ot=rt?Date.now():0,st=this[LENGTH_CALCULATOR](nt,tt);if(this[CACHE].has(tt)){if(st>this[MAX])return del(this,this[CACHE].get(tt)),!1;const ft=this[CACHE].get(tt).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](tt,ft.value)),ft.now=ot,ft.maxAge=rt,ft.value=nt,this[LENGTH]+=st-ft.length,ft.length=st,this.get(tt),trim(this),!0}const ut=new Entry(tt,nt,st,ot,rt);return ut.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](tt,nt),!1):(this[LENGTH]+=ut.length,this[LRU_LIST].unshift(ut),this[CACHE].set(tt,this[LRU_LIST].head),trim(this),!0)}has(tt){if(!this[CACHE].has(tt))return!1;const nt=this[CACHE].get(tt).value;return!isStale(this,nt)}get(tt){return get(this,tt,!0)}peek(tt){return get(this,tt,!1)}pop(){const tt=this[LRU_LIST].tail;return tt?(del(this,tt),tt.value):null}del(tt){del(this,this[CACHE].get(tt))}load(tt){this.reset();const nt=Date.now();for(let rt=tt.length-1;rt>=0;rt--){const ot=tt[rt],st=ot.e||0;if(st===0)this.set(ot.k,ot.v);else{const ut=st-nt;ut>0&&this.set(ot.k,ot.v,ut)}}}prune(){this[CACHE].forEach((tt,nt)=>get(this,nt,!1))}}const get=(et,tt,nt)=>{const rt=et[CACHE].get(tt);if(rt){const ot=rt.value;if(isStale(et,ot)){if(del(et,rt),!et[ALLOW_STALE])return}else nt&&(et[UPDATE_AGE_ON_GET]&&(rt.value.now=Date.now()),et[LRU_LIST].unshiftNode(rt));return ot.value}},isStale=(et,tt)=>{if(!tt||!tt.maxAge&&!et[MAX_AGE])return!1;const nt=Date.now()-tt.now;return tt.maxAge?nt>tt.maxAge:et[MAX_AGE]&&nt>et[MAX_AGE]},trim=et=>{if(et[LENGTH]>et[MAX])for(let tt=et[LRU_LIST].tail;et[LENGTH]>et[MAX]&&tt!==null;){const nt=tt.prev;del(et,tt),tt=nt}},del=(et,tt)=>{if(tt){const nt=tt.value;et[DISPOSE]&&et[DISPOSE](nt.key,nt.value),et[LENGTH]-=nt.length,et[CACHE].delete(nt.key),et[LRU_LIST].removeNode(tt)}};class Entry{constructor(tt,nt,rt,ot,st){this.key=tt,this.value=nt,this.length=rt,this.now=ot,this.maxAge=st||0}}const forEachStep=(et,tt,nt,rt)=>{let ot=nt.value;isStale(et,ot)&&(del(et,nt),et[ALLOW_STALE]||(ot=void 0)),ot&&tt.call(rt,ot.value,ot.key,et)};var lruCache=LRUCache;const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$1=et=>et?typeof et!="object"?looseOption:et:emptyOpts;var parseOptions_1=parseOptions$1,re$1={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants={MAX_LENGTH:MAX_LENGTH$1,MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES,SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$1=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...et)=>console.error("SEMVER",...et):()=>{};var debug_1=debug$1;(function(et,tt){const{MAX_SAFE_COMPONENT_LENGTH:nt}=constants,rt=debug_1;tt=et.exports={};const ot=tt.re=[],st=tt.src=[],ut=tt.t={};let ct=0;const ft=(pt,ht,mt)=>{const yt=ct++;rt(pt,yt,ht),ut[pt]=yt,st[yt]=ht,ot[yt]=new RegExp(ht,mt?"g":void 0)};ft("NUMERICIDENTIFIER","0|[1-9]\\d*"),ft("NUMERICIDENTIFIERLOOSE","[0-9]+"),ft("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),ft("MAINVERSION",`(${st[ut.NUMERICIDENTIFIER]})\\.(${st[ut.NUMERICIDENTIFIER]})\\.(${st[ut.NUMERICIDENTIFIER]})`),ft("MAINVERSIONLOOSE",`(${st[ut.NUMERICIDENTIFIERLOOSE]})\\.(${st[ut.NUMERICIDENTIFIERLOOSE]})\\.(${st[ut.NUMERICIDENTIFIERLOOSE]})`),ft("PRERELEASEIDENTIFIER",`(?:${st[ut.NUMERICIDENTIFIER]}|${st[ut.NONNUMERICIDENTIFIER]})`),ft("PRERELEASEIDENTIFIERLOOSE",`(?:${st[ut.NUMERICIDENTIFIERLOOSE]}|${st[ut.NONNUMERICIDENTIFIER]})`),ft("PRERELEASE",`(?:-(${st[ut.PRERELEASEIDENTIFIER]}(?:\\.${st[ut.PRERELEASEIDENTIFIER]})*))`),ft("PRERELEASELOOSE",`(?:-?(${st[ut.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${st[ut.PRERELEASEIDENTIFIERLOOSE]})*))`),ft("BUILDIDENTIFIER","[0-9A-Za-z-]+"),ft("BUILD",`(?:\\+(${st[ut.BUILDIDENTIFIER]}(?:\\.${st[ut.BUILDIDENTIFIER]})*))`),ft("FULLPLAIN",`v?${st[ut.MAINVERSION]}${st[ut.PRERELEASE]}?${st[ut.BUILD]}?`),ft("FULL",`^${st[ut.FULLPLAIN]}$`),ft("LOOSEPLAIN",`[v=\\s]*${st[ut.MAINVERSIONLOOSE]}${st[ut.PRERELEASELOOSE]}?${st[ut.BUILD]}?`),ft("LOOSE",`^${st[ut.LOOSEPLAIN]}$`),ft("GTLT","((?:<|>)?=?)"),ft("XRANGEIDENTIFIERLOOSE",`${st[ut.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),ft("XRANGEIDENTIFIER",`${st[ut.NUMERICIDENTIFIER]}|x|X|\\*`),ft("XRANGEPLAIN",`[v=\\s]*(${st[ut.XRANGEIDENTIFIER]})(?:\\.(${st[ut.XRANGEIDENTIFIER]})(?:\\.(${st[ut.XRANGEIDENTIFIER]})(?:${st[ut.PRERELEASE]})?${st[ut.BUILD]}?)?)?`),ft("XRANGEPLAINLOOSE",`[v=\\s]*(${st[ut.XRANGEIDENTIFIERLOOSE]})(?:\\.(${st[ut.XRANGEIDENTIFIERLOOSE]})(?:\\.(${st[ut.XRANGEIDENTIFIERLOOSE]})(?:${st[ut.PRERELEASELOOSE]})?${st[ut.BUILD]}?)?)?`),ft("XRANGE",`^${st[ut.GTLT]}\\s*${st[ut.XRANGEPLAIN]}$`),ft("XRANGELOOSE",`^${st[ut.GTLT]}\\s*${st[ut.XRANGEPLAINLOOSE]}$`),ft("COERCE",`(^|[^\\d])(\\d{1,${nt}})(?:\\.(\\d{1,${nt}}))?(?:\\.(\\d{1,${nt}}))?(?:$|[^\\d])`),ft("COERCERTL",st[ut.COERCE],!0),ft("LONETILDE","(?:~>?)"),ft("TILDETRIM",`(\\s*)${st[ut.LONETILDE]}\\s+`,!0),tt.tildeTrimReplace="$1~",ft("TILDE",`^${st[ut.LONETILDE]}${st[ut.XRANGEPLAIN]}$`),ft("TILDELOOSE",`^${st[ut.LONETILDE]}${st[ut.XRANGEPLAINLOOSE]}$`),ft("LONECARET","(?:\\^)"),ft("CARETTRIM",`(\\s*)${st[ut.LONECARET]}\\s+`,!0),tt.caretTrimReplace="$1^",ft("CARET",`^${st[ut.LONECARET]}${st[ut.XRANGEPLAIN]}$`),ft("CARETLOOSE",`^${st[ut.LONECARET]}${st[ut.XRANGEPLAINLOOSE]}$`),ft("COMPARATORLOOSE",`^${st[ut.GTLT]}\\s*(${st[ut.LOOSEPLAIN]})$|^$`),ft("COMPARATOR",`^${st[ut.GTLT]}\\s*(${st[ut.FULLPLAIN]})$|^$`),ft("COMPARATORTRIM",`(\\s*)${st[ut.GTLT]}\\s*(${st[ut.LOOSEPLAIN]}|${st[ut.XRANGEPLAIN]})`,!0),tt.comparatorTrimReplace="$1$2$3",ft("HYPHENRANGE",`^\\s*(${st[ut.XRANGEPLAIN]})\\s+-\\s+(${st[ut.XRANGEPLAIN]})\\s*$`),ft("HYPHENRANGELOOSE",`^\\s*(${st[ut.XRANGEPLAINLOOSE]})\\s+-\\s+(${st[ut.XRANGEPLAINLOOSE]})\\s*$`),ft("STAR","(<|>)?=?\\s*\\*"),ft("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),ft("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(re$1,re$1.exports);var reExports=re$1.exports;const numeric=/^[0-9]+$/,compareIdentifiers$1=(et,tt)=>{const nt=numeric.test(et),rt=numeric.test(tt);return nt&&rt&&(et=+et,tt=+tt),et===tt?0:nt&&!rt?-1:rt&&!nt?1:et<tt?-1:1},rcompareIdentifiers=(et,tt)=>compareIdentifiers$1(tt,et);var identifiers={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers};const debug=debug_1,{MAX_LENGTH,MAX_SAFE_INTEGER}=constants,{re,t}=reExports,parseOptions=parseOptions_1,{compareIdentifiers}=identifiers;let SemVer$1=class lm{constructor(tt,nt){if(nt=parseOptions(nt),tt instanceof lm){if(tt.loose===!!nt.loose&&tt.includePrerelease===!!nt.includePrerelease)return tt;tt=tt.version}else if(typeof tt!="string")throw new TypeError(`Invalid Version: ${tt}`);if(tt.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug("SemVer",tt,nt),this.options=nt,this.loose=!!nt.loose,this.includePrerelease=!!nt.includePrerelease;const rt=tt.trim().match(nt.loose?re[t.LOOSE]:re[t.FULL]);if(!rt)throw new TypeError(`Invalid Version: ${tt}`);if(this.raw=tt,this.major=+rt[1],this.minor=+rt[2],this.patch=+rt[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");rt[4]?this.prerelease=rt[4].split(".").map(ot=>{if(/^[0-9]+$/.test(ot)){const st=+ot;if(st>=0&&st<MAX_SAFE_INTEGER)return st}return ot}):this.prerelease=[],this.build=rt[5]?rt[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(tt){if(debug("SemVer.compare",this.version,this.options,tt),!(tt instanceof lm)){if(typeof tt=="string"&&tt===this.version)return 0;tt=new lm(tt,this.options)}return tt.version===this.version?0:this.compareMain(tt)||this.comparePre(tt)}compareMain(tt){return tt instanceof lm||(tt=new lm(tt,this.options)),compareIdentifiers(this.major,tt.major)||compareIdentifiers(this.minor,tt.minor)||compareIdentifiers(this.patch,tt.patch)}comparePre(tt){if(tt instanceof lm||(tt=new lm(tt,this.options)),this.prerelease.length&&!tt.prerelease.length)return-1;if(!this.prerelease.length&&tt.prerelease.length)return 1;if(!this.prerelease.length&&!tt.prerelease.length)return 0;let nt=0;do{const rt=this.prerelease[nt],ot=tt.prerelease[nt];if(debug("prerelease compare",nt,rt,ot),rt===void 0&&ot===void 0)return 0;if(ot===void 0)return 1;if(rt===void 0)return-1;if(rt===ot)continue;return compareIdentifiers(rt,ot)}while(++nt)}compareBuild(tt){tt instanceof lm||(tt=new lm(tt,this.options));let nt=0;do{const rt=this.build[nt],ot=tt.build[nt];if(debug("prerelease compare",nt,rt,ot),rt===void 0&&ot===void 0)return 0;if(ot===void 0)return 1;if(rt===void 0)return-1;if(rt===ot)continue;return compareIdentifiers(rt,ot)}while(++nt)}inc(tt,nt,rt){switch(tt){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",nt,rt);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",nt,rt);break;case"prepatch":this.prerelease.length=0,this.inc("patch",nt,rt),this.inc("pre",nt,rt);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",nt,rt),this.inc("pre",nt,rt);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let ot=this.prerelease.length;for(;--ot>=0;)typeof this.prerelease[ot]=="number"&&(this.prerelease[ot]++,ot=-2);ot===-1&&this.prerelease.push(0)}if(nt){const ot=Number(rt)?1:0;compareIdentifiers(this.prerelease[0],nt)===0?isNaN(this.prerelease[1])&&(this.prerelease=[nt,ot]):this.prerelease=[nt,ot]}break;default:throw new Error(`invalid increment argument: ${tt}`)}return this.format(),this.raw=this.version,this}};var semver=SemVer$1;const SemVer=semver,compare$6=(et,tt,nt)=>new SemVer(et,nt).compare(new SemVer(tt,nt));var compare_1=compare$6;const compare$5=compare_1,eq$1=(et,tt,nt)=>compare$5(et,tt,nt)===0;var eq_1=eq$1;const compare$4=compare_1,neq$1=(et,tt,nt)=>compare$4(et,tt,nt)!==0;var neq_1=neq$1;const compare$3=compare_1,gt$1=(et,tt,nt)=>compare$3(et,tt,nt)>0;var gt_1=gt$1;const compare$2=compare_1,gte$1=(et,tt,nt)=>compare$2(et,tt,nt)>=0;var gte_1=gte$1;const compare$1=compare_1,lt$1=(et,tt,nt)=>compare$1(et,tt,nt)<0;var lt_1=lt$1;const compare$7=compare_1,lte$1=(et,tt,nt)=>compare$7(et,tt,nt)<=0;var lte_1=lte$1;const eq=eq_1,neq=neq_1,gt=gt_1,gte=gte_1,lt=lt_1,lte=lte_1,cmp=(et,tt,nt,rt)=>{switch(tt){case"===":return typeof et=="object"&&(et=et.version),typeof nt=="object"&&(nt=nt.version),et===nt;case"!==":return typeof et=="object"&&(et=et.version),typeof nt=="object"&&(nt=nt.version),et!==nt;case"":case"=":case"==":return eq(et,nt,rt);case"!=":return neq(et,nt,rt);case">":return gt(et,nt,rt);case">=":return gte(et,nt,rt);case"<":return lt(et,nt,rt);case"<=":return lte(et,nt,rt);default:throw new TypeError(`Invalid operator: ${tt}`)}};var cmp_1=cmp,comparator,hasRequiredComparator;function requireComparator(){if(hasRequiredComparator)return comparator;hasRequiredComparator=1;const et=Symbol("SemVer ANY");class tt{static get ANY(){return et}constructor(ht,mt){if(mt=nt(mt),ht instanceof tt){if(ht.loose===!!mt.loose)return ht;ht=ht.value}ut("comparator",ht,mt),this.options=mt,this.loose=!!mt.loose,this.parse(ht),this.semver===et?this.value="":this.value=this.operator+this.semver.version,ut("comp",this)}parse(ht){const mt=this.options.loose?rt[ot.COMPARATORLOOSE]:rt[ot.COMPARATOR],yt=ht.match(mt);if(!yt)throw new TypeError(`Invalid comparator: ${ht}`);this.operator=yt[1]!==void 0?yt[1]:"",this.operator==="="&&(this.operator=""),yt[2]?this.semver=new ct(yt[2],this.options.loose):this.semver=et}toString(){return this.value}test(ht){if(ut("Comparator.test",ht,this.options.loose),this.semver===et||ht===et)return!0;if(typeof ht=="string")try{ht=new ct(ht,this.options)}catch{return!1}return st(ht,this.operator,this.semver,this.options)}intersects(ht,mt){if(!(ht instanceof tt))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ft(ht.value,mt).test(this.value):ht.operator===""?ht.value===""?!0:new ft(this.value,mt).test(ht.semver):(mt=nt(mt),mt.includePrerelease&&(this.value==="<0.0.0-0"||ht.value==="<0.0.0-0")||!mt.includePrerelease&&(this.value.startsWith("<0.0.0")||ht.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&ht.operator.startsWith(">")||this.operator.startsWith("<")&&ht.operator.startsWith("<")||this.semver.version===ht.semver.version&&this.operator.includes("=")&&ht.operator.includes("=")||st(this.semver,"<",ht.semver,mt)&&this.operator.startsWith(">")&&ht.operator.startsWith("<")||st(this.semver,">",ht.semver,mt)&&this.operator.startsWith("<")&&ht.operator.startsWith(">")))}}comparator=tt;const nt=parseOptions_1,{re:rt,t:ot}=reExports,st=cmp_1,ut=debug_1,ct=semver,ft=requireRange();return comparator}var range,hasRequiredRange;function requireRange(){if(hasRequiredRange)return range;hasRequiredRange=1;class et{constructor(Xt,Jt){if(Jt=rt(Jt),Xt instanceof et)return Xt.loose===!!Jt.loose&&Xt.includePrerelease===!!Jt.includePrerelease?Xt:new et(Xt.raw,Jt);if(Xt instanceof ot)return this.raw=Xt.value,this.set=[[Xt]],this.format(),this;if(this.options=Jt,this.loose=!!Jt.loose,this.includePrerelease=!!Jt.includePrerelease,this.raw=Xt,this.set=Xt.split("||").map(gn=>this.parseRange(gn.trim())).filter(gn=>gn.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${Xt}`);if(this.set.length>1){const gn=this.set[0];if(this.set=this.set.filter(An=>!Tt(An[0])),this.set.length===0)this.set=[gn];else if(this.set.length>1){for(const An of this.set)if(An.length===1&&Et(An[0])){this.set=[An];break}}}this.format()}format(){return this.range=this.set.map(Xt=>Xt.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(Xt){Xt=Xt.trim();const gn=((this.options.includePrerelease&&yt)|(this.options.loose&&vt))+":"+Xt,An=nt.get(gn);if(An)return An;const sn=this.options.loose,Sn=sn?ct[ft.HYPHENRANGELOOSE]:ct[ft.HYPHENRANGE];Xt=Xt.replace(Sn,Vt(this.options.includePrerelease)),st("hyphen replace",Xt),Xt=Xt.replace(ct[ft.COMPARATORTRIM],pt),st("comparator trim",Xt),Xt=Xt.replace(ct[ft.TILDETRIM],ht),Xt=Xt.replace(ct[ft.CARETTRIM],mt),Xt=Xt.split(/\s+/).join(" ");let In=Xt.split(" ").map(wn=>At(wn,this.options)).join(" ").split(/\s+/).map(wn=>zt(wn,this.options));sn&&(In=In.filter(wn=>(st("loose invalid filter",wn,this.options),!!wn.match(ct[ft.COMPARATORLOOSE])))),st("range list",In);const _n=new Map,En=In.map(wn=>new ot(wn,this.options));for(const wn of En){if(Tt(wn))return[wn];_n.set(wn.value,wn)}_n.size>1&&_n.has("")&&_n.delete("");const Ln=[..._n.values()];return nt.set(gn,Ln),Ln}intersects(Xt,Jt){if(!(Xt instanceof et))throw new TypeError("a Range is required");return this.set.some(gn=>xt(gn,Jt)&&Xt.set.some(An=>xt(An,Jt)&&gn.every(sn=>An.every(Sn=>sn.intersects(Sn,Jt)))))}test(Xt){if(!Xt)return!1;if(typeof Xt=="string")try{Xt=new ut(Xt,this.options)}catch{return!1}for(let Jt=0;Jt<this.set.length;Jt++)if(Zt(this.set[Jt],Xt,this.options))return!0;return!1}}range=et;const tt=lruCache,nt=new tt({max:1e3}),rt=parseOptions_1,ot=requireComparator(),st=debug_1,ut=semver,{re:ct,t:ft,comparatorTrimReplace:pt,tildeTrimReplace:ht,caretTrimReplace:mt}=reExports,{FLAG_INCLUDE_PRERELEASE:yt,FLAG_LOOSE:vt}=constants,Tt=Ut=>Ut.value==="<0.0.0-0",Et=Ut=>Ut.value==="",xt=(Ut,Xt)=>{let Jt=!0;const gn=Ut.slice();let An=gn.pop();for(;Jt&&gn.length;)Jt=gn.every(sn=>An.intersects(sn,Xt)),An=gn.pop();return Jt},At=(Ut,Xt)=>(st("comp",Ut,Xt),Ut=Rt(Ut,Xt),st("caret",Ut),Ut=$t(Ut,Xt),st("tildes",Ut),Ut=kt(Ut,Xt),st("xrange",Ut),Ut=Ft(Ut,Xt),st("stars",Ut),Ut),Ct=Ut=>!Ut||Ut.toLowerCase()==="x"||Ut==="*",$t=(Ut,Xt)=>Ut.trim().split(/\s+/).map(Jt=>Ot(Jt,Xt)).join(" "),Ot=(Ut,Xt)=>{const Jt=Xt.loose?ct[ft.TILDELOOSE]:ct[ft.TILDE];return Ut.replace(Jt,(gn,An,sn,Sn,In)=>{st("tilde",Ut,gn,An,sn,Sn,In);let _n;return Ct(An)?_n="":Ct(sn)?_n=`>=${An}.0.0 <${+An+1}.0.0-0`:Ct(Sn)?_n=`>=${An}.${sn}.0 <${An}.${+sn+1}.0-0`:In?(st("replaceTilde pr",In),_n=`>=${An}.${sn}.${Sn}-${In} <${An}.${+sn+1}.0-0`):_n=`>=${An}.${sn}.${Sn} <${An}.${+sn+1}.0-0`,st("tilde return",_n),_n})},Rt=(Ut,Xt)=>Ut.trim().split(/\s+/).map(Jt=>It(Jt,Xt)).join(" "),It=(Ut,Xt)=>{st("caret",Ut,Xt);const Jt=Xt.loose?ct[ft.CARETLOOSE]:ct[ft.CARET],gn=Xt.includePrerelease?"-0":"";return Ut.replace(Jt,(An,sn,Sn,In,_n)=>{st("caret",Ut,An,sn,Sn,In,_n);let En;return Ct(sn)?En="":Ct(Sn)?En=`>=${sn}.0.0${gn} <${+sn+1}.0.0-0`:Ct(In)?sn==="0"?En=`>=${sn}.${Sn}.0${gn} <${sn}.${+Sn+1}.0-0`:En=`>=${sn}.${Sn}.0${gn} <${+sn+1}.0.0-0`:_n?(st("replaceCaret pr",_n),sn==="0"?Sn==="0"?En=`>=${sn}.${Sn}.${In}-${_n} <${sn}.${Sn}.${+In+1}-0`:En=`>=${sn}.${Sn}.${In}-${_n} <${sn}.${+Sn+1}.0-0`:En=`>=${sn}.${Sn}.${In}-${_n} <${+sn+1}.0.0-0`):(st("no pr"),sn==="0"?Sn==="0"?En=`>=${sn}.${Sn}.${In}${gn} <${sn}.${Sn}.${+In+1}-0`:En=`>=${sn}.${Sn}.${In}${gn} <${sn}.${+Sn+1}.0-0`:En=`>=${sn}.${Sn}.${In} <${+sn+1}.0.0-0`),st("caret return",En),En})},kt=(Ut,Xt)=>(st("replaceXRanges",Ut,Xt),Ut.split(/\s+/).map(Jt=>Mt(Jt,Xt)).join(" ")),Mt=(Ut,Xt)=>{Ut=Ut.trim();const Jt=Xt.loose?ct[ft.XRANGELOOSE]:ct[ft.XRANGE];return Ut.replace(Jt,(gn,An,sn,Sn,In,_n)=>{st("xRange",Ut,gn,An,sn,Sn,In,_n);const En=Ct(sn),Ln=En||Ct(Sn),wn=Ln||Ct(In),Dn=wn;return An==="="&&Dn&&(An=""),_n=Xt.includePrerelease?"-0":"",En?An===">"||An==="<"?gn="<0.0.0-0":gn="*":An&&Dn?(Ln&&(Sn=0),In=0,An===">"?(An=">=",Ln?(sn=+sn+1,Sn=0,In=0):(Sn=+Sn+1,In=0)):An==="<="&&(An="<",Ln?sn=+sn+1:Sn=+Sn+1),An==="<"&&(_n="-0"),gn=`${An+sn}.${Sn}.${In}${_n}`):Ln?gn=`>=${sn}.0.0${_n} <${+sn+1}.0.0-0`:wn&&(gn=`>=${sn}.${Sn}.0${_n} <${sn}.${+Sn+1}.0-0`),st("xRange return",gn),gn})},Ft=(Ut,Xt)=>(st("replaceStars",Ut,Xt),Ut.trim().replace(ct[ft.STAR],"")),zt=(Ut,Xt)=>(st("replaceGTE0",Ut,Xt),Ut.trim().replace(ct[Xt.includePrerelease?ft.GTE0PRE:ft.GTE0],"")),Vt=Ut=>(Xt,Jt,gn,An,sn,Sn,In,_n,En,Ln,wn,Dn,$n)=>(Ct(gn)?Jt="":Ct(An)?Jt=`>=${gn}.0.0${Ut?"-0":""}`:Ct(sn)?Jt=`>=${gn}.${An}.0${Ut?"-0":""}`:Sn?Jt=`>=${Jt}`:Jt=`>=${Jt}${Ut?"-0":""}`,Ct(En)?_n="":Ct(Ln)?_n=`<${+En+1}.0.0-0`:Ct(wn)?_n=`<${En}.${+Ln+1}.0-0`:Dn?_n=`<=${En}.${Ln}.${wn}-${Dn}`:Ut?_n=`<${En}.${Ln}.${+wn+1}-0`:_n=`<=${_n}`,`${Jt} ${_n}`.trim()),Zt=(Ut,Xt,Jt)=>{for(let gn=0;gn<Ut.length;gn++)if(!Ut[gn].test(Xt))return!1;if(Xt.prerelease.length&&!Jt.includePrerelease){for(let gn=0;gn<Ut.length;gn++)if(st(Ut[gn].semver),Ut[gn].semver!==ot.ANY&&Ut[gn].semver.prerelease.length>0){const An=Ut[gn].semver;if(An.major===Xt.major&&An.minor===Xt.minor&&An.patch===Xt.patch)return!0}return!1}return!0};return range}const Range=requireRange(),satisfies=(et,tt,nt)=>{try{tt=new Range(tt,nt)}catch{return!1}return tt.test(et)};var satisfies_1=satisfies,satisfies$1=getDefaultExportFromCjs(satisfies_1);function post(et,tt,nt){const rt=et.open(tt),ot=1e4,st=250,{origin:ut}=new URL(tt);let ct=~~(ot/st);function ft(ht){ht.source===rt&&(ct=0,et.removeEventListener("message",ft,!1))}et.addEventListener("message",ft,!1);function pt(){ct<=0||(rt.postMessage(nt,ut),setTimeout(pt,st),ct-=1)}setTimeout(pt,st)}var embedStyle=`.vega-embed {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
}
.vega-embed.has-actions {
  padding-right: 38px;
}
.vega-embed details:not([open]) > :not(summary) {
  display: none !important;
}
.vega-embed summary {
  list-style: none;
  position: absolute;
  top: 0;
  right: 0;
  padding: 6px;
  z-index: 1000;
  background: white;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  color: #1b1e23;
  border: 1px solid #aaa;
  border-radius: 999px;
  opacity: 0.2;
  transition: opacity 0.4s ease-in;
  cursor: pointer;
  line-height: 0px;
}
.vega-embed summary::-webkit-details-marker {
  display: none;
}
.vega-embed summary:active {
  box-shadow: #aaa 0px 0px 0px 1px inset;
}
.vega-embed summary svg {
  width: 14px;
  height: 14px;
}
.vega-embed details[open] summary {
  opacity: 0.7;
}
.vega-embed:hover summary, .vega-embed:focus-within summary {
  opacity: 1 !important;
  transition: opacity 0.2s ease;
}
.vega-embed .vega-actions {
  position: absolute;
  z-index: 1001;
  top: 35px;
  right: -9px;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  padding-top: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid #d9d9d9;
  background: white;
  animation-duration: 0.15s;
  animation-name: scale-in;
  animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
  text-align: left;
}
.vega-embed .vega-actions a {
  padding: 8px 16px;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: #434a56;
  text-decoration: none;
}
.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {
  background-color: #f7f7f9;
  color: black;
}
.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {
  content: "";
  display: inline-block;
  position: absolute;
}
.vega-embed .vega-actions::before {
  left: auto;
  right: 14px;
  top: -16px;
  border: 8px solid rgba(0, 0, 0, 0);
  border-bottom-color: #d9d9d9;
}
.vega-embed .vega-actions::after {
  left: auto;
  right: 15px;
  top: -14px;
  border: 7px solid rgba(0, 0, 0, 0);
  border-bottom-color: #fff;
}
.vega-embed .chart-wrapper.fit-x {
  width: 100%;
}
.vega-embed .chart-wrapper.fit-y {
  height: 100%;
}

.vega-embed-wrapper {
  max-width: 100%;
  overflow: auto;
  padding-right: 14px;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
`;function mergeDeep(et,...tt){for(const nt of tt)deepMerge_(et,nt);return et}function deepMerge_(et,tt){for(const nt of Object.keys(tt))writeConfig(et,nt,tt[nt],!0)}function ownKeys$a(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$a(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$a(Object(nt),!0).forEach(function(rt){_defineProperty$7(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$a(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}const vega=vegaImport;let vegaLite=vegaLiteImport;const w$1=typeof window<"u"?window:void 0;vegaLite===void 0&&w$1?.vl?.compile&&(vegaLite=w$1.vl);const DEFAULT_ACTIONS={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},I18N={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},NAMES={vega:"Vega","vega-lite":"Vega-Lite"},VERSION$2={vega:vega.version,"vega-lite":vegaLite?vegaLite.version:"not available"},PREPROCESSOR={vega:et=>et,"vega-lite":(et,tt)=>vegaLite.compile(et,{config:tt}).spec},SVG_CIRCLES=`
<svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
  <circle r="2" cy="8" cx="2"></circle>
  <circle r="2" cy="8" cx="8"></circle>
  <circle r="2" cy="8" cx="14"></circle>
</svg>`,CHART_WRAPPER_CLASS="chart-wrapper";function isTooltipHandler(et){return typeof et=="function"}function viewSource(et,tt,nt,rt){const ot=`<html><head>${tt}</head><body><pre><code class="json">`,st=`</code></pre>${nt}</body></html>`,ut=window.open("");ut.document.write(ot+et+st),ut.document.title=`${NAMES[rt]} JSON Source`}function guessMode(et,tt){if(et.$schema){const nt=e$1(et.$schema);tt&&tt!==nt.library&&console.warn(`The given visualization spec is written in ${NAMES[nt.library]}, but mode argument sets ${NAMES[tt]??tt}.`);const rt=nt.library;return satisfies$1(VERSION$2[rt],`^${nt.version.slice(1)}`)||console.warn(`The input spec uses ${NAMES[rt]} ${nt.version}, but the current version of ${NAMES[rt]} is v${VERSION$2[rt]}.`),rt}return"mark"in et||"encoding"in et||"layer"in et||"hconcat"in et||"vconcat"in et||"facet"in et||"repeat"in et?"vega-lite":"marks"in et||"signals"in et||"scales"in et||"axes"in et?"vega":tt??"vega"}function isLoader(et){return!!(et&&"load"in et)}function createLoader(et){return isLoader(et)?et:vega.loader(et)}function embedOptionsFromUsermeta(et){const tt=et.usermeta?.embedOptions??{};return isString(tt.defaultStyle)&&(tt.defaultStyle=!1),tt}async function embed(et,tt,nt={}){let rt,ot;isString(tt)?(ot=createLoader(nt.loader),rt=JSON.parse(await ot.load(tt))):rt=tt;const st=embedOptionsFromUsermeta(rt),ut=st.loader;(!ot||ut)&&(ot=createLoader(nt.loader??ut));const ct=await loadOpts(st,ot),ft=await loadOpts(nt,ot),pt=_objectSpread$a(_objectSpread$a({},mergeDeep(ft,ct)),{},{config:mergeConfig(ft.config??{},ct.config??{})});return await _embed(et,rt,pt,ot)}async function loadOpts(et,tt){const nt=isString(et.config)?JSON.parse(await tt.load(et.config)):et.config??{},rt=isString(et.patch)?JSON.parse(await tt.load(et.patch)):et.patch;return _objectSpread$a(_objectSpread$a(_objectSpread$a({},et),rt?{patch:rt}:{}),nt?{config:nt}:{})}function getRoot$1(et){const tt=et.getRootNode?et.getRootNode():document;return tt instanceof ShadowRoot?{root:tt,rootContainer:tt}:{root:document,rootContainer:document.head??document.body}}async function _embed(et,tt,nt={},rt){const ot=nt.theme?mergeConfig(themes[nt.theme],nt.config??{}):nt.config,st=isBoolean$2(nt.actions)?nt.actions:mergeDeep({},DEFAULT_ACTIONS,nt.actions??{}),ut=_objectSpread$a(_objectSpread$a({},I18N),nt.i18n),ct=nt.renderer??"canvas",ft=nt.logLevel??vega.Warn,pt=nt.downloadFileName??"visualization",ht=typeof et=="string"?document.querySelector(et):et;if(!ht)throw new Error(`${et} does not exist`);if(nt.defaultStyle!==!1){const Rt="vega-embed-style",{root:It,rootContainer:kt}=getRoot$1(ht);if(!It.getElementById(Rt)){const Mt=document.createElement("style");Mt.id=Rt,Mt.innerHTML=nt.defaultStyle===void 0||nt.defaultStyle===!0?embedStyle.toString():nt.defaultStyle,kt.appendChild(Mt)}}const mt=guessMode(tt,nt.mode);let yt=PREPROCESSOR[mt](tt,ot);if(mt==="vega-lite"&&yt.$schema){const Rt=e$1(yt.$schema);satisfies$1(VERSION$2.vega,`^${Rt.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${Rt.version}, but current version is v${VERSION$2.vega}.`)}ht.classList.add("vega-embed"),st&&ht.classList.add("has-actions"),ht.innerHTML="";let vt=ht;if(st){const Rt=document.createElement("div");Rt.classList.add(CHART_WRAPPER_CLASS),ht.appendChild(Rt),vt=Rt}const Tt=nt.patch;if(Tt&&(yt=Tt instanceof Function?Tt(yt):applyPatch(yt,Tt,!0,!1).newDocument),nt.formatLocale&&vega.formatLocale(nt.formatLocale),nt.timeFormatLocale&&vega.timeFormatLocale(nt.timeFormatLocale),nt.expressionFunctions)for(const Rt in nt.expressionFunctions){const It=nt.expressionFunctions[Rt];"fn"in It?vega.expressionFunction(Rt,It.fn,It.visitor):It instanceof Function&&vega.expressionFunction(Rt,It)}const{ast:Et}=nt,xt=vega.parse(yt,mt==="vega-lite"?{}:ot,{ast:Et}),At=new(nt.viewClass||vega.View)(xt,_objectSpread$a({loader:rt,logLevel:ft,renderer:ct},Et?{expr:vega.expressionInterpreter??nt.expr??expression$1}:{}));if(At.addSignalListener("autosize",(Rt,It)=>{const{type:kt}=It;kt=="fit-x"?(vt.classList.add("fit-x"),vt.classList.remove("fit-y")):kt=="fit-y"?(vt.classList.remove("fit-x"),vt.classList.add("fit-y")):kt=="fit"?vt.classList.add("fit-x","fit-y"):vt.classList.remove("fit-x","fit-y")}),nt.tooltip!==!1){const Rt=isTooltipHandler(nt.tooltip)?nt.tooltip:new Handler(nt.tooltip===!0?{}:nt.tooltip).call;At.tooltip(Rt)}let{hover:Ct}=nt;if(Ct===void 0&&(Ct=mt==="vega"),Ct){const{hoverSet:Rt,updateSet:It}=typeof Ct=="boolean"?{}:Ct;At.hover(Rt,It)}nt&&(nt.width!=null&&At.width(nt.width),nt.height!=null&&At.height(nt.height),nt.padding!=null&&At.padding(nt.padding)),await At.initialize(vt,nt.bind).runAsync();let $t;if(st!==!1){let Rt=ht;if(nt.defaultStyle!==!1){const kt=document.createElement("details");kt.title=ut.CLICK_TO_VIEW_ACTIONS,ht.append(kt),Rt=kt;const Mt=document.createElement("summary");Mt.innerHTML=SVG_CIRCLES,kt.append(Mt),$t=Ft=>{kt.contains(Ft.target)||kt.removeAttribute("open")},document.addEventListener("click",$t)}const It=document.createElement("div");if(Rt.append(It),It.classList.add("vega-actions"),st===!0||st.export!==!1){for(const kt of["svg","png"])if(st===!0||st.export===!0||st.export[kt]){const Mt=ut[`${kt.toUpperCase()}_ACTION`],Ft=document.createElement("a"),zt=isObject(nt.scaleFactor)?nt.scaleFactor[kt]:nt.scaleFactor;Ft.text=Mt,Ft.href="#",Ft.target="_blank",Ft.download=`${pt}.${kt}`,Ft.addEventListener("mousedown",async function(Vt){Vt.preventDefault();const Zt=await At.toImageURL(kt,zt);this.href=Zt}),It.append(Ft)}}if(st===!0||st.source!==!1){const kt=document.createElement("a");kt.text=ut.SOURCE_ACTION,kt.href="#",kt.addEventListener("click",function(Mt){viewSource(jsonStringifyPrettyCompact(tt),nt.sourceHeader??"",nt.sourceFooter??"",mt),Mt.preventDefault()}),It.append(kt)}if(mt==="vega-lite"&&(st===!0||st.compiled!==!1)){const kt=document.createElement("a");kt.text=ut.COMPILED_ACTION,kt.href="#",kt.addEventListener("click",function(Mt){viewSource(jsonStringifyPrettyCompact(yt),nt.sourceHeader??"",nt.sourceFooter??"","vega"),Mt.preventDefault()}),It.append(kt)}if(st===!0||st.editor!==!1){const kt=nt.editorUrl??"https://vega.github.io/editor/",Mt=document.createElement("a");Mt.text=ut.EDITOR_ACTION,Mt.href="#",Mt.addEventListener("click",function(Ft){post(window,kt,{config:ot,mode:mt,renderer:ct,spec:jsonStringifyPrettyCompact(tt)}),Ft.preventDefault()}),It.append(Mt)}}function Ot(){$t&&document.removeEventListener("click",$t),At.finalize()}return{view:At,spec:tt,vgSpec:yt,finalize:Ot,embedOptions:nt}}function isFunction$2(et){return!!et&&{}.toString.call(et)==="[object Function]"}function updateSingleDatasetInView(et,tt,nt){nt&&(isFunction$2(nt)?nt(et.data(tt)):et.change(tt,vega.changeset().remove(()=>!0).insert(nt)))}function updateMultipleDatasetsInView(et,tt){Object.keys(tt).forEach(nt=>{updateSingleDatasetInView(et,nt,tt[nt])})}function getUniqueFieldNames(et){const tt=new Set;return et.forEach(nt=>{Object.keys(nt).forEach(rt=>{tt.add(rt)})}),tt}const NOOP=()=>{};function addSignalListenersToView(et,tt){const nt=Object.keys(tt);return nt.forEach(rt=>{try{et.addSignalListener(rt,tt[rt])}catch(ot){console.warn("Cannot add invalid signal listener.",ot)}}),nt.length>0}function computeSpecChanges(et,tt){if(et===tt)return!1;const nt={width:!1,height:!1,isExpensive:!1},rt=getUniqueFieldNames([et,tt]);return rt.has("width")&&(!("width"in et)||!("width"in tt)||et.width!==tt.width)&&("width"in et&&typeof et.width=="number"?nt.width=et.width:nt.isExpensive=!0),rt.has("height")&&(!("height"in et)||!("height"in tt)||et.height!==tt.height)&&("height"in et&&typeof et.height=="number"?nt.height=et.height:nt.isExpensive=!0),rt.delete("width"),rt.delete("height"),[...rt].some(ot=>!(ot in et)||!(ot in tt)||!equal(et[ot],tt[ot]))&&(nt.isExpensive=!0),nt.width!==!1||nt.height!==!1||nt.isExpensive?nt:!1}function removeSignalListenersFromView(et,tt){const nt=Object.keys(tt);return nt.forEach(rt=>{try{et.removeSignalListener(rt,tt[rt])}catch(ot){console.warn("Cannot remove invalid signal listener.",ot)}}),nt.length>0}function combineSpecWithDimension(et){const{spec:tt,width:nt,height:rt}=et;return typeof nt<"u"&&typeof rt<"u"?{...tt,width:nt,height:rt}:typeof nt<"u"?{...tt,width:nt}:typeof rt<"u"?{...tt,height:rt}:tt}function _defineProperty$6(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}class VegaEmbed extends Wt.PureComponent{constructor(){super(...arguments),_defineProperty$6(this,"containerRef",Wt.createRef()),_defineProperty$6(this,"resultPromise",void 0),_defineProperty$6(this,"handleError",tt=>{const{onError:nt=NOOP}=this.props;nt(tt,this.containerRef.current),console.warn(tt)}),_defineProperty$6(this,"modifyView",tt=>{this.resultPromise&&this.resultPromise.then(nt=>(nt&&tt(nt.view),!0)).catch(this.handleError)})}componentDidMount(){this.createView()}componentDidUpdate(tt){const nt=getUniqueFieldNames([this.props,tt]);if(nt.delete("className"),nt.delete("signalListeners"),nt.delete("spec"),nt.delete("style"),nt.delete("width"),nt.delete("height"),Array.from(nt).some(rt=>this.props[rt]!==tt[rt]))this.clearView(),this.createView();else{const rt=computeSpecChanges(combineSpecWithDimension(this.props),combineSpecWithDimension(tt)),{signalListeners:ot}=this.props,{signalListeners:st}=tt;if(rt)if(rt.isExpensive)this.clearView(),this.createView();else{const ut=!shallowEqual(ot,st);this.modifyView(ct=>{rt.width!==!1&&ct.width(rt.width),rt.height!==!1&&ct.height(rt.height),ut&&(st&&removeSignalListenersFromView(ct,st),ot&&addSignalListenersToView(ct,ot)),ct.run()})}else shallowEqual(ot,st)||this.modifyView(ut=>{st&&removeSignalListenersFromView(ut,st),ot&&addSignalListenersToView(ut,ot),ut.run()})}}componentWillUnmount(){this.clearView()}createView(){const{spec:tt,onNewView:nt,signalListeners:rt={},width:ot,height:st,...ut}=this.props;if(this.containerRef.current){const ct=combineSpecWithDimension(this.props);this.resultPromise=embed(this.containerRef.current,ct,ut).then(ft=>{if(ft){const{view:pt}=ft;addSignalListenersToView(pt,rt)&&pt.run()}return ft}).catch(this.handleError),nt&&this.modifyView(nt)}}clearView(){return this.resultPromise&&this.resultPromise.then(tt=>{tt&&tt.finalize()}).catch(this.handleError),this.resultPromise=void 0,this}render(){const{className:tt,style:nt}=this.props;return Wt.createElement("div",{ref:this.containerRef,className:tt,style:nt})}}_defineProperty$6(VegaEmbed,"propTypes",{className:propTypes$1.exports.string,onError:propTypes$1.exports.func});function _extends$8(){return _extends$8=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$8.apply(this,arguments)}function _defineProperty$5(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}const EMPTY={};class Vega extends Wt.PureComponent{constructor(){super(...arguments),_defineProperty$5(this,"vegaEmbed",Wt.createRef()),_defineProperty$5(this,"handleNewView",tt=>{this.update();const{onNewView:nt=NOOP}=this.props;nt(tt)})}componentDidMount(){this.update()}componentDidUpdate(tt){shallowEqual(this.props.data,tt.data)||this.update()}update(){const{data:tt}=this.props;this.vegaEmbed.current&&tt&&Object.keys(tt).length>0&&this.vegaEmbed.current.modifyView(nt=>{updateMultipleDatasetsInView(nt,tt),nt.resize().run()})}render(){const{data:tt,...nt}=this.props;return Wt.createElement(VegaEmbed,_extends$8({ref:this.vegaEmbed},nt,{onNewView:this.handleNewView}))}}_defineProperty$5(Vega,"defaultProps",{data:EMPTY});function flatten(et,tt={}){const nt=tt.delimiter||".",rt=tt.maxDepth,ot={};function st(ut,ct,ft=1){Object.keys(ut).forEach(pt=>{const ht=ut[pt],mt=tt.safe&&Array.isArray(ht),yt=ht&&ht._type,vt=Object.prototype.toString.call(ht),Tt=isBuffer$1(ht),Et=vt==="[object Object]"||vt==="[object Array]",xt=ct?ct+nt+pt:pt;if(!mt&&!Tt&&!yt&&Et&&Object.keys(ht).length&&(!tt.maxDepth||ft<rt))return st(ht,xt,ft+1);ot[xt]=ht})}return st(et),ot}function notEmpty(et){return et!=null}function deepMapValuesAndArrays(et,tt){return _$2.isArray(et)?tt(et).map(rt=>deepMapValuesAndArrays(rt,tt)):typeof et=="object"?_$2.mapValues(et,nt=>deepMapValuesAndArrays(nt,tt)):tt(et)}const VIEW_ALL_RUNS="All runs";function updateQueryIndex(et,tt){return fn(et,rt=>{rt.queryFields.find(ot=>ot.name==="runSets")?.fields.filter(ot=>ot.name==="historyTable")?.forEach(ot=>{const st=ot.args?.find(ut=>ut.name==="index");st==null?ot.args?.push({name:"index",value:tt}):st.value=tt})})}function getDefaultViewedRun(et,tt){if(et&&tt){if(tt.find(nt=>nt===et))return et;if(tt.length>1)return tt[1]}return VIEW_ALL_RUNS}const DEFAULT_LIMIT=500,defaultRunSetsQuery={queryFields:[{name:"runSets",args:[{name:"runSets",value:"${runSets}"},{name:"limit",value:DEFAULT_LIMIT}],fields:[{name:"id",fields:[]},{name:"name",fields:[]},{name:"summary",args:[{name:"keys",value:[""]}],fields:[]}]}]};function toRef(et){const[tt,nt,rt]=et.split(":",3);if(nt==null)return null;switch(tt){case"field":return{type:"field",name:nt,raw:et};case"string":return{type:"string",name:nt,default:rt,raw:et};default:return null}}function extractRefs(et){const tt=et.match(new RegExp("\\$\\{.*?\\}","g"));return tt==null?[]:tt.map(nt=>{const rt=toRef(nt.slice(2,nt.length-1));return rt==null?null:{...rt,raw:nt}}).filter(notEmpty)}function fieldInjectResult(et,tt){let nt="";switch(et.type){case"field":return nt=tt.fieldSettings?.[et.name]||"",typeof nt!="string"&&(nt=String(nt)),nt=nt.replace(/\./g,"\\."),nt;case"string":return tt.stringSettings?.[et.name]||et.default||"";default:return null}}function parseSpecFields(et){return lodash$2.exports.uniqWith(lodash$2.exports.flatMap(lodash$2.exports.filter(flatten(et),nt=>typeof nt=="string"),nt=>extractRefs(nt)),lodash$2.exports.isEqual)}function makeInjectMap(et,tt){const nt=[];for(const rt of et){const ot=fieldInjectResult(rt,tt);ot!=null&&nt.push({from:rt.raw,to:ot})}return nt}function injectFields(et,tt,nt){const rt=makeInjectMap(tt,nt);return deepMapValuesAndArrays(et,ot=>{if(typeof ot=="string")for(const st of rt)ot=ot.split(st.from).join(st.to);return ot})}function hasInput(et){if(typeof et=="object"){for(const[tt,nt]of Object.entries(et))if(tt==="input"||hasInput(nt))return!0}return!1}function specHasBindings(et){if(et.$schema?.includes("vega-lite/v5")){const tt=et.params;return hasInput(tt)}else if(et.$schema?.includes("vega-lite")){const tt=et.selection;return hasInput(tt)}else{const tt=et.signals;if(Array.isArray(tt)){for(const nt of tt)if(nt.bind!=null)return!0}}return!1}var common={black:"#000",white:"#fff"};const common$1=common;var red={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"};const red$1=red;var pink={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};const pink$1=pink;var purple={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"};const purple$1=purple;var deepPurple={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"};const deepPurple$1=deepPurple;var indigo={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};const indigo$1=indigo;var blue={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"};const blue$1=blue;var lightBlue={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"};const lightBlue$1=lightBlue;var cyan={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"};const cyan$1=cyan;var teal={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};const teal$1=teal;var green={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"};const green$1=green;var lightGreen={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"};const lightGreen$1=lightGreen;var lime={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"};const lime$1=lime;var yellow={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"};const yellow$1=yellow;var amber={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"};const amber$1=amber;var orange={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"};const orange$1=orange;var deepOrange={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"};const deepOrange$1=deepOrange;var brown={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"};const brown$1=brown;var grey={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};const grey$1=grey;var blueGrey={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"};const blueGrey$1=blueGrey,muColors=Object.freeze(Object.defineProperty({__proto__:null,common:common$1,red:red$1,pink:pink$1,purple:purple$1,deepPurple:deepPurple$1,indigo:indigo$1,blue:blue$1,lightBlue:lightBlue$1,cyan:cyan$1,teal:teal$1,green:green$1,lightGreen:lightGreen$1,lime:lime$1,yellow:yellow$1,amber:amber$1,orange:orange$1,deepOrange:deepOrange$1,brown:brown$1,grey:grey$1,blueGrey:blueGrey$1},Symbol.toStringTag,{value:"Module"}));var createSpacing$2={};function isPlainObject(et){return et&&_typeof$8(et)==="object"&&et.constructor===Object}function deepmerge(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},rt=nt.clone?_extends$a({},et):et;return isPlainObject(et)&&isPlainObject(tt)&&Object.keys(tt).forEach(function(ot){ot!=="__proto__"&&(isPlainObject(tt[ot])&&ot in et?rt[ot]=deepmerge(et[ot],tt[ot],nt):rt[ot]=tt[ot])}),rt}function formatMuiErrorMessage(et){for(var tt="https://mui.com/production-error/?code="+et,nt=1;nt<arguments.length;nt+=1)tt+="&args[]="+encodeURIComponent(arguments[nt]);return"Minified Material-UI error #"+et+"; visit "+tt+" for the full message."}function merge(et,tt){return tt?deepmerge(et,tt,{clone:!1}):et}var values$1={xs:0,sm:600,md:960,lg:1280,xl:1920},defaultBreakpoints={keys:["xs","sm","md","lg","xl"],up:function et(tt){return"@media (min-width:".concat(values$1[tt],"px)")}};function handleBreakpoints(et,tt,nt){if(Array.isArray(tt)){var rt=et.theme.breakpoints||defaultBreakpoints;return tt.reduce(function(ut,ct,ft){return ut[rt.up(rt.keys[ft])]=nt(tt[ft]),ut},{})}if(_typeof$8(tt)==="object"){var ot=et.theme.breakpoints||defaultBreakpoints;return Object.keys(tt).reduce(function(ut,ct){return ut[ot.up(ct)]=nt(tt[ct]),ut},{})}var st=nt(tt);return st}function breakpoints(et){var tt=function(rt){var ot=et(rt),st=rt.theme.breakpoints||defaultBreakpoints,ut=st.keys.reduce(function(ct,ft){return rt[ft]&&(ct=ct||{},ct[st.up(ft)]=et(_extends$a({theme:rt.theme},rt[ft]))),ct},null);return merge(ot,ut)};return tt.propTypes={},tt.filterProps=["xs","sm","md","lg","xl"].concat(_toConsumableArray$1(et.filterProps)),tt}function getPath$1(et,tt){return!tt||typeof tt!="string"?null:tt.split(".").reduce(function(nt,rt){return nt&&nt[rt]?nt[rt]:null},et)}function style$1(et){var tt=et.prop,nt=et.cssProperty,rt=nt===void 0?et.prop:nt,ot=et.themeKey,st=et.transform,ut=function(ft){if(ft[tt]==null)return null;var pt=ft[tt],ht=ft.theme,mt=getPath$1(ht,ot)||{},yt=function(Tt){var Et;return typeof mt=="function"?Et=mt(Tt):Array.isArray(mt)?Et=mt[Tt]||Tt:(Et=getPath$1(mt,Tt)||Tt,st&&(Et=st(Et))),rt===!1?Et:_defineProperty$d({},rt,Et)};return handleBreakpoints(ft,pt,yt)};return ut.propTypes={},ut.filterProps=[tt],ut}function compose(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];var rt=function(st){return tt.reduce(function(ut,ct){var ft=ct(st);return ft?merge(ut,ft):ut},{})};return rt.propTypes={},rt.filterProps=tt.reduce(function(ot,st){return ot.concat(st.filterProps)},[]),rt}function getBorder(et){return typeof et!="number"?et:"".concat(et,"px solid")}var border=style$1({prop:"border",themeKey:"borders",transform:getBorder}),borderTop=style$1({prop:"borderTop",themeKey:"borders",transform:getBorder}),borderRight=style$1({prop:"borderRight",themeKey:"borders",transform:getBorder}),borderBottom=style$1({prop:"borderBottom",themeKey:"borders",transform:getBorder}),borderLeft=style$1({prop:"borderLeft",themeKey:"borders",transform:getBorder}),borderColor=style$1({prop:"borderColor",themeKey:"palette"}),borderRadius=style$1({prop:"borderRadius",themeKey:"shape"}),borders=compose(border,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderRadius);const borders$1=borders;function omit(et,tt){var nt={};return Object.keys(et).forEach(function(rt){tt.indexOf(rt)===-1&&(nt[rt]=et[rt])}),nt}function styleFunctionSx(et){var tt=function(rt){var ot=et(rt);return rt.css?_extends$a({},merge(ot,et(_extends$a({theme:rt.theme},rt.css))),omit(rt.css,[et.filterProps])):rt.sx?_extends$a({},merge(ot,et(_extends$a({theme:rt.theme},rt.sx))),omit(rt.sx,[et.filterProps])):ot};return tt.propTypes={},tt.filterProps=["css","sx"].concat(_toConsumableArray$1(et.filterProps)),tt}function css$2(et){return styleFunctionSx(et)}var displayPrint=style$1({prop:"displayPrint",cssProperty:!1,transform:function et(tt){return{"@media print":{display:tt}}}}),displayRaw=style$1({prop:"display"}),overflow=style$1({prop:"overflow"}),textOverflow=style$1({prop:"textOverflow"}),visibility=style$1({prop:"visibility"}),whiteSpace=style$1({prop:"whiteSpace"});const display=compose(displayPrint,displayRaw,overflow,textOverflow,visibility,whiteSpace);var flexBasis=style$1({prop:"flexBasis"}),flexDirection=style$1({prop:"flexDirection"}),flexWrap=style$1({prop:"flexWrap"}),justifyContent=style$1({prop:"justifyContent"}),alignItems=style$1({prop:"alignItems"}),alignContent=style$1({prop:"alignContent"}),order=style$1({prop:"order"}),flex=style$1({prop:"flex"}),flexGrow=style$1({prop:"flexGrow"}),flexShrink=style$1({prop:"flexShrink"}),alignSelf=style$1({prop:"alignSelf"}),justifyItems=style$1({prop:"justifyItems"}),justifySelf=style$1({prop:"justifySelf"}),flexbox=compose(flexBasis,flexDirection,flexWrap,justifyContent,alignItems,alignContent,order,flex,flexGrow,flexShrink,alignSelf,justifyItems,justifySelf);const flexbox$1=flexbox;var gridGap=style$1({prop:"gridGap"}),gridColumnGap=style$1({prop:"gridColumnGap"}),gridRowGap=style$1({prop:"gridRowGap"}),gridColumn=style$1({prop:"gridColumn"}),gridRow=style$1({prop:"gridRow"}),gridAutoFlow=style$1({prop:"gridAutoFlow"}),gridAutoColumns=style$1({prop:"gridAutoColumns"}),gridAutoRows=style$1({prop:"gridAutoRows"}),gridTemplateColumns=style$1({prop:"gridTemplateColumns"}),gridTemplateRows=style$1({prop:"gridTemplateRows"}),gridTemplateAreas=style$1({prop:"gridTemplateAreas"}),gridArea=style$1({prop:"gridArea"}),grid=compose(gridGap,gridColumnGap,gridRowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);const grid$1=grid;var color$1=style$1({prop:"color",themeKey:"palette"}),bgcolor=style$1({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),palette$1=compose(color$1,bgcolor);const palette$2=palette$1;var position=style$1({prop:"position"}),zIndex$2=style$1({prop:"zIndex",themeKey:"zIndex"}),top=style$1({prop:"top"}),right=style$1({prop:"right"}),bottom$1=style$1({prop:"bottom"}),left=style$1({prop:"left"});const positions=compose(position,zIndex$2,top,right,bottom$1,left);var boxShadow=style$1({prop:"boxShadow",themeKey:"shadows"});const shadows$2=boxShadow;function transform$1(et){return et<=1?"".concat(et*100,"%"):et}var width=style$1({prop:"width",transform:transform$1}),maxWidth=style$1({prop:"maxWidth",transform:transform$1}),minWidth=style$1({prop:"minWidth",transform:transform$1}),height=style$1({prop:"height",transform:transform$1}),maxHeight=style$1({prop:"maxHeight",transform:transform$1}),minHeight=style$1({prop:"minHeight",transform:transform$1}),sizeWidth=style$1({prop:"size",cssProperty:"width",transform:transform$1}),sizeHeight=style$1({prop:"size",cssProperty:"height",transform:transform$1}),boxSizing=style$1({prop:"boxSizing"}),sizing=compose(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const sizing$1=sizing;function memoize$1(et){var tt={};return function(nt){return tt[nt]===void 0&&(tt[nt]=et(nt)),tt[nt]}}var properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize$1(function(et){if(et.length>2)if(aliases[et])et=aliases[et];else return[et];var tt=et.split(""),nt=_slicedToArray$1(tt,2),rt=nt[0],ot=nt[1],st=properties[rt],ut=directions[ot]||"";return Array.isArray(ut)?ut.map(function(ct){return st+ct}):[st+ut]}),spacingKeys=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function createUnarySpacing(et){var tt=et.spacing||8;return typeof tt=="number"?function(nt){return tt*nt}:Array.isArray(tt)?function(nt){return tt[nt]}:typeof tt=="function"?tt:function(){}}function getValue$1(et,tt){if(typeof tt=="string"||tt==null)return tt;var nt=Math.abs(tt),rt=et(nt);return tt>=0?rt:typeof rt=="number"?-rt:"-".concat(rt)}function getStyleFromPropValue(et,tt){return function(nt){return et.reduce(function(rt,ot){return rt[ot]=getValue$1(tt,nt),rt},{})}}function spacing$2(et){var tt=et.theme,nt=createUnarySpacing(tt);return Object.keys(et).map(function(rt){if(spacingKeys.indexOf(rt)===-1)return null;var ot=getCssProperties(rt),st=getStyleFromPropValue(ot,nt),ut=et[rt];return handleBreakpoints(et,ut,st)}).reduce(merge,{})}spacing$2.propTypes={};spacing$2.filterProps=spacingKeys;var fontFamily=style$1({prop:"fontFamily",themeKey:"typography"}),fontSize=style$1({prop:"fontSize",themeKey:"typography"}),fontStyle=style$1({prop:"fontStyle",themeKey:"typography"}),fontWeight=style$1({prop:"fontWeight",themeKey:"typography"}),letterSpacing=style$1({prop:"letterSpacing"}),lineHeight=style$1({prop:"lineHeight"}),textAlign=style$1({prop:"textAlign"}),typography$1=compose(fontFamily,fontSize,fontStyle,fontWeight,letterSpacing,lineHeight,textAlign);const typography$2=typography$1;/** @license Material-UI v4.12.2
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */const esm=Object.freeze(Object.defineProperty({__proto__:null,borders:borders$1,breakpoints,compose,styleFunctionSx,display,flexbox:flexbox$1,grid:grid$1,palette:palette$2,positions,shadows:shadows$2,sizing:sizing$1,spacing:spacing$2,style:style$1,typography:typography$2,border,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderRadius,css:css$2,flexBasis,flexDirection,flexWrap,justifyContent,alignItems,alignContent,order,flex,flexGrow,flexShrink,alignSelf,justifyItems,justifySelf,gridGap,gridColumnGap,gridRowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea,color:color$1,bgcolor,position,zIndex:zIndex$2,top,right,bottom:bottom$1,left,width,maxWidth,minWidth,height,maxHeight,minHeight,sizeWidth,sizeHeight,boxSizing,createUnarySpacing,fontFamily,fontSize,fontStyle,fontWeight,letterSpacing,lineHeight,textAlign},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(esm);Object.defineProperty(createSpacing$2,"__esModule",{value:!0});var _default$9=createSpacing$2.default=createSpacing$1,_system=require$$0;function createSpacing$1(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(et.mui)return et;var tt=(0,_system.createUnarySpacing)({spacing:et}),nt=function(){for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return st.length===0?tt(1):st.length===1?tt(st[0]):st.map(function(ct){if(typeof ct=="string")return ct;var ft=tt(ct);return typeof ft=="number"?"".concat(ft,"px"):ft}).join(" ")};return Object.defineProperty(nt,"unit",{get:function(){return et}}),nt.mui=!0,nt}var hasSymbol=typeof Symbol=="function"&&Symbol.for;const nested=hasSymbol?Symbol.for("mui.nested"):"__THEME_NESTED__";var pseudoClasses=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function createGenerateClassName(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},tt=et.disableGlobal,nt=tt===void 0?!1:tt,rt=et.productionPrefix,ot=rt===void 0?"jss":rt,st=et.seed,ut=st===void 0?"":st,ct=ut===""?"":"".concat(ut,"-"),ft=0,pt=function(){return ft+=1,ft};return function(ht,mt){var yt=mt.options.name;if(yt&&yt.indexOf("Mui")===0&&!mt.options.link&&!nt){if(pseudoClasses.indexOf(ht.key)!==-1)return"Mui-".concat(ht.key);var vt="".concat(ct).concat(yt,"-").concat(ht.key);return!mt.options.theme[nested]||ut!==""?vt:"".concat(vt,"-").concat(pt())}return"".concat(ct).concat(ot).concat(pt())}}function getThemeProps(et){var tt=et.theme,nt=et.name,rt=et.props;if(!tt||!tt.props||!tt.props[nt])return rt;var ot=tt.props[nt],st;for(st in ot)rt[st]===void 0&&(rt[st]=ot[st]);return rt}var _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},isBrowser$1=(typeof window>"u"?"undefined":_typeof$4(window))==="object"&&(typeof document>"u"?"undefined":_typeof$4(document))==="object"&&document.nodeType===9,plainObjectConstrurctor={}.constructor;function cloneStyle(et){if(et==null||typeof et!="object")return et;if(Array.isArray(et))return et.map(cloneStyle);if(et.constructor!==plainObjectConstrurctor)return et;var tt={};for(var nt in et)tt[nt]=cloneStyle(et[nt]);return tt}function createRule(et,tt,nt){et===void 0&&(et="unnamed");var rt=nt.jss,ot=cloneStyle(tt),st=rt.plugins.onCreateRule(et,ot,nt);return st||(et[0],null)}var join=function et(tt,nt){for(var rt="",ot=0;ot<tt.length&&tt[ot]!=="!important";ot++)rt&&(rt+=nt),rt+=tt[ot];return rt},toCssValue=function et(tt){if(!Array.isArray(tt))return tt;var nt="";if(Array.isArray(tt[0]))for(var rt=0;rt<tt.length&&tt[rt]!=="!important";rt++)nt&&(nt+=", "),nt+=join(tt[rt]," ");else nt=join(tt,", ");return tt[tt.length-1]==="!important"&&(nt+=" !important"),nt};function getWhitespaceSymbols(et){return et&&et.format===!1?{linebreak:"",space:""}:{linebreak:`
`,space:" "}}function indentStr(et,tt){for(var nt="",rt=0;rt<tt;rt++)nt+="  ";return nt+et}function toCss(et,tt,nt){nt===void 0&&(nt={});var rt="";if(!tt)return rt;var ot=nt,st=ot.indent,ut=st===void 0?0:st,ct=tt.fallbacks;nt.format===!1&&(ut=-1/0);var ft=getWhitespaceSymbols(nt),pt=ft.linebreak,ht=ft.space;if(et&&ut++,ct)if(Array.isArray(ct))for(var mt=0;mt<ct.length;mt++){var yt=ct[mt];for(var vt in yt){var Tt=yt[vt];Tt!=null&&(rt&&(rt+=pt),rt+=indentStr(vt+":"+ht+toCssValue(Tt)+";",ut))}}else for(var Et in ct){var xt=ct[Et];xt!=null&&(rt&&(rt+=pt),rt+=indentStr(Et+":"+ht+toCssValue(xt)+";",ut))}for(var At in tt){var Ct=tt[At];Ct!=null&&At!=="fallbacks"&&(rt&&(rt+=pt),rt+=indentStr(At+":"+ht+toCssValue(Ct)+";",ut))}return!rt&&!nt.allowEmpty||!et?rt:(ut--,rt&&(rt=""+pt+rt+pt),indentStr(""+et+ht+"{"+rt,ut)+indentStr("}",ut))}var escapeRegex=/([[\].#*$><+~=|^:(),"'`\s])/g,nativeEscape=typeof CSS<"u"&&CSS.escape,escape$2=function(et){return nativeEscape?nativeEscape(et):et.replace(escapeRegex,"\\$1")},BaseStyleRule=function(){function et(nt,rt,ot){this.type="style",this.isProcessed=!1;var st=ot.sheet,ut=ot.Renderer;this.key=nt,this.options=ot,this.style=rt,st?this.renderer=st.renderer:ut&&(this.renderer=new ut)}var tt=et.prototype;return tt.prop=function(rt,ot,st){if(ot===void 0)return this.style[rt];var ut=st?st.force:!1;if(!ut&&this.style[rt]===ot)return this;var ct=ot;(!st||st.process!==!1)&&(ct=this.options.jss.plugins.onChangeValue(ot,rt,this));var ft=ct==null||ct===!1,pt=rt in this.style;if(ft&&!pt&&!ut)return this;var ht=ft&&pt;if(ht?delete this.style[rt]:this.style[rt]=ct,this.renderable&&this.renderer)return ht?this.renderer.removeProperty(this.renderable,rt):this.renderer.setProperty(this.renderable,rt,ct),this;var mt=this.options.sheet;return mt&&mt.attached,this},et}(),StyleRule=function(et){_inheritsLoose$5(tt,et);function tt(rt,ot,st){var ut;ut=et.call(this,rt,ot,st)||this;var ct=st.selector,ft=st.scoped,pt=st.sheet,ht=st.generateId;return ct?ut.selectorText=ct:ft!==!1&&(ut.id=ht(_assertThisInitialized$2(_assertThisInitialized$2(ut)),pt),ut.selectorText="."+escape$2(ut.id)),ut}var nt=tt.prototype;return nt.applyTo=function(ot){var st=this.renderer;if(st){var ut=this.toJSON();for(var ct in ut)st.setProperty(ot,ct,ut[ct])}return this},nt.toJSON=function(){var ot={};for(var st in this.style){var ut=this.style[st];typeof ut!="object"?ot[st]=ut:Array.isArray(ut)&&(ot[st]=toCssValue(ut))}return ot},nt.toString=function(ot){var st=this.options.sheet,ut=st?st.options.link:!1,ct=ut?_extends$a({},ot,{allowEmpty:!0}):ot;return toCss(this.selectorText,this.style,ct)},_createClass$2(tt,[{key:"selector",set:function(ot){if(ot!==this.selectorText){this.selectorText=ot;var st=this.renderer,ut=this.renderable;if(!(!ut||!st)){var ct=st.setSelector(ut,ot);ct||st.replaceRule(ut,this)}}},get:function(){return this.selectorText}}]),tt}(BaseStyleRule),pluginStyleRule={onCreateRule:function et(tt,nt,rt){return tt[0]==="@"||rt.parent&&rt.parent.type==="keyframes"?null:new StyleRule(tt,nt,rt)}},defaultToStringOptions={indent:1,children:!0},atRegExp=/@([\w-]+)/,ConditionalRule=function(){function et(nt,rt,ot){this.type="conditional",this.isProcessed=!1,this.key=nt;var st=nt.match(atRegExp);this.at=st?st[1]:"unknown",this.query=ot.name||"@"+this.at,this.options=ot,this.rules=new RuleList(_extends$a({},ot,{parent:this}));for(var ut in rt)this.rules.add(ut,rt[ut]);this.rules.process()}var tt=et.prototype;return tt.getRule=function(rt){return this.rules.get(rt)},tt.indexOf=function(rt){return this.rules.indexOf(rt)},tt.addRule=function(rt,ot,st){var ut=this.rules.add(rt,ot,st);return ut?(this.options.jss.plugins.onProcessRule(ut),ut):null},tt.replaceRule=function(rt,ot,st){var ut=this.rules.replace(rt,ot,st);return ut&&this.options.jss.plugins.onProcessRule(ut),ut},tt.toString=function(rt){rt===void 0&&(rt=defaultToStringOptions);var ot=getWhitespaceSymbols(rt),st=ot.linebreak;if(rt.indent==null&&(rt.indent=defaultToStringOptions.indent),rt.children==null&&(rt.children=defaultToStringOptions.children),rt.children===!1)return this.query+" {}";var ut=this.rules.toString(rt);return ut?this.query+" {"+st+ut+st+"}":""},et}(),keyRegExp=/@container|@media|@supports\s+/,pluginConditionalRule={onCreateRule:function et(tt,nt,rt){return keyRegExp.test(tt)?new ConditionalRule(tt,nt,rt):null}},defaultToStringOptions$1={indent:1,children:!0},nameRegExp=/@keyframes\s+([\w-]+)/,KeyframesRule=function(){function et(nt,rt,ot){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var st=nt.match(nameRegExp);st&&st[1]?this.name=st[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=ot;var ut=ot.scoped,ct=ot.sheet,ft=ot.generateId;this.id=ut===!1?this.name:escape$2(ft(this,ct)),this.rules=new RuleList(_extends$a({},ot,{parent:this}));for(var pt in rt)this.rules.add(pt,rt[pt],_extends$a({},ot,{parent:this}));this.rules.process()}var tt=et.prototype;return tt.toString=function(rt){rt===void 0&&(rt=defaultToStringOptions$1);var ot=getWhitespaceSymbols(rt),st=ot.linebreak;if(rt.indent==null&&(rt.indent=defaultToStringOptions$1.indent),rt.children==null&&(rt.children=defaultToStringOptions$1.children),rt.children===!1)return this.at+" "+this.id+" {}";var ut=this.rules.toString(rt);return ut&&(ut=""+st+ut+st),this.at+" "+this.id+" {"+ut+"}"},et}(),keyRegExp$1=/@keyframes\s+/,refRegExp$1=/\$([\w-]+)/g,findReferencedKeyframe=function et(tt,nt){return typeof tt=="string"?tt.replace(refRegExp$1,function(rt,ot){return ot in nt?nt[ot]:rt}):tt},replaceRef=function et(tt,nt,rt){var ot=tt[nt],st=findReferencedKeyframe(ot,rt);st!==ot&&(tt[nt]=st)},pluginKeyframesRule={onCreateRule:function et(tt,nt,rt){return typeof tt=="string"&&keyRegExp$1.test(tt)?new KeyframesRule(tt,nt,rt):null},onProcessStyle:function et(tt,nt,rt){return nt.type!=="style"||!rt||("animation-name"in tt&&replaceRef(tt,"animation-name",rt.keyframes),"animation"in tt&&replaceRef(tt,"animation",rt.keyframes)),tt},onChangeValue:function et(tt,nt,rt){var ot=rt.options.sheet;if(!ot)return tt;switch(nt){case"animation":return findReferencedKeyframe(tt,ot.keyframes);case"animation-name":return findReferencedKeyframe(tt,ot.keyframes);default:return tt}}},KeyframeRule=function(et){_inheritsLoose$5(tt,et);function tt(){return et.apply(this,arguments)||this}var nt=tt.prototype;return nt.toString=function(ot){var st=this.options.sheet,ut=st?st.options.link:!1,ct=ut?_extends$a({},ot,{allowEmpty:!0}):ot;return toCss(this.key,this.style,ct)},tt}(BaseStyleRule),pluginKeyframeRule={onCreateRule:function et(tt,nt,rt){return rt.parent&&rt.parent.type==="keyframes"?new KeyframeRule(tt,nt,rt):null}},FontFaceRule=function(){function et(nt,rt,ot){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=nt,this.style=rt,this.options=ot}var tt=et.prototype;return tt.toString=function(rt){var ot=getWhitespaceSymbols(rt),st=ot.linebreak;if(Array.isArray(this.style)){for(var ut="",ct=0;ct<this.style.length;ct++)ut+=toCss(this.at,this.style[ct]),this.style[ct+1]&&(ut+=st);return ut}return toCss(this.at,this.style,rt)},et}(),keyRegExp$2=/@font-face/,pluginFontFaceRule={onCreateRule:function et(tt,nt,rt){return keyRegExp$2.test(tt)?new FontFaceRule(tt,nt,rt):null}},ViewportRule=function(){function et(nt,rt,ot){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=nt,this.style=rt,this.options=ot}var tt=et.prototype;return tt.toString=function(rt){return toCss(this.key,this.style,rt)},et}(),pluginViewportRule={onCreateRule:function et(tt,nt,rt){return tt==="@viewport"||tt==="@-ms-viewport"?new ViewportRule(tt,nt,rt):null}},SimpleRule=function(){function et(nt,rt,ot){this.type="simple",this.isProcessed=!1,this.key=nt,this.value=rt,this.options=ot}var tt=et.prototype;return tt.toString=function(rt){if(Array.isArray(this.value)){for(var ot="",st=0;st<this.value.length;st++)ot+=this.key+" "+this.value[st]+";",this.value[st+1]&&(ot+=`
`);return ot}return this.key+" "+this.value+";"},et}(),keysMap={"@charset":!0,"@import":!0,"@namespace":!0},pluginSimpleRule={onCreateRule:function et(tt,nt,rt){return tt in keysMap?new SimpleRule(tt,nt,rt):null}},plugins$1=[pluginStyleRule,pluginConditionalRule,pluginKeyframesRule,pluginKeyframeRule,pluginFontFaceRule,pluginViewportRule,pluginSimpleRule],defaultUpdateOptions={process:!0},forceUpdateOptions={force:!0,process:!0},RuleList=function(){function et(nt){this.map={},this.raw={},this.index=[],this.counter=0,this.options=nt,this.classes=nt.classes,this.keyframes=nt.keyframes}var tt=et.prototype;return tt.add=function(rt,ot,st){var ut=this.options,ct=ut.parent,ft=ut.sheet,pt=ut.jss,ht=ut.Renderer,mt=ut.generateId,yt=ut.scoped,vt=_extends$a({classes:this.classes,parent:ct,sheet:ft,jss:pt,Renderer:ht,generateId:mt,scoped:yt,name:rt,keyframes:this.keyframes,selector:void 0},st),Tt=rt;rt in this.raw&&(Tt=rt+"-d"+this.counter++),this.raw[Tt]=ot,Tt in this.classes&&(vt.selector="."+escape$2(this.classes[Tt]));var Et=createRule(Tt,ot,vt);if(!Et)return null;this.register(Et);var xt=vt.index===void 0?this.index.length:vt.index;return this.index.splice(xt,0,Et),Et},tt.replace=function(rt,ot,st){var ut=this.get(rt),ct=this.index.indexOf(ut);ut&&this.remove(ut);var ft=st;return ct!==-1&&(ft=_extends$a({},st,{index:ct})),this.add(rt,ot,ft)},tt.get=function(rt){return this.map[rt]},tt.remove=function(rt){this.unregister(rt),delete this.raw[rt.key],this.index.splice(this.index.indexOf(rt),1)},tt.indexOf=function(rt){return this.index.indexOf(rt)},tt.process=function(){var rt=this.options.jss.plugins;this.index.slice(0).forEach(rt.onProcessRule,rt)},tt.register=function(rt){this.map[rt.key]=rt,rt instanceof StyleRule?(this.map[rt.selector]=rt,rt.id&&(this.classes[rt.key]=rt.id)):rt instanceof KeyframesRule&&this.keyframes&&(this.keyframes[rt.name]=rt.id)},tt.unregister=function(rt){delete this.map[rt.key],rt instanceof StyleRule?(delete this.map[rt.selector],delete this.classes[rt.key]):rt instanceof KeyframesRule&&delete this.keyframes[rt.name]},tt.update=function(){var rt,ot,st;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(rt=arguments.length<=0?void 0:arguments[0],ot=arguments.length<=1?void 0:arguments[1],st=arguments.length<=2?void 0:arguments[2]):(ot=arguments.length<=0?void 0:arguments[0],st=arguments.length<=1?void 0:arguments[1],rt=null),rt)this.updateOne(this.get(rt),ot,st);else for(var ut=0;ut<this.index.length;ut++)this.updateOne(this.index[ut],ot,st)},tt.updateOne=function(rt,ot,st){st===void 0&&(st=defaultUpdateOptions);var ut=this.options,ct=ut.jss.plugins,ft=ut.sheet;if(rt.rules instanceof et){rt.rules.update(ot,st);return}var pt=rt.style;if(ct.onUpdate(ot,rt,ft,st),st.process&&pt&&pt!==rt.style){ct.onProcessStyle(rt.style,rt,ft);for(var ht in rt.style){var mt=rt.style[ht],yt=pt[ht];mt!==yt&&rt.prop(ht,mt,forceUpdateOptions)}for(var vt in pt){var Tt=rt.style[vt],Et=pt[vt];Tt==null&&Tt!==Et&&rt.prop(vt,null,forceUpdateOptions)}}},tt.toString=function(rt){for(var ot="",st=this.options.sheet,ut=st?st.options.link:!1,ct=getWhitespaceSymbols(rt),ft=ct.linebreak,pt=0;pt<this.index.length;pt++){var ht=this.index[pt],mt=ht.toString(rt);!mt&&!ut||(ot&&(ot+=ft),ot+=mt)}return ot},et}(),StyleSheet=function(){function et(nt,rt){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=_extends$a({},rt,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),rt.Renderer&&(this.renderer=new rt.Renderer(this)),this.rules=new RuleList(this.options);for(var ot in nt)this.rules.add(ot,nt[ot]);this.rules.process()}var tt=et.prototype;return tt.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},tt.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},tt.addRule=function(rt,ot,st){var ut=this.queue;this.attached&&!ut&&(this.queue=[]);var ct=this.rules.add(rt,ot,st);return ct?(this.options.jss.plugins.onProcessRule(ct),this.attached?(this.deployed&&(ut?ut.push(ct):(this.insertRule(ct),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),ct):(this.deployed=!1,ct)):null},tt.replaceRule=function(rt,ot,st){var ut=this.rules.get(rt);if(!ut)return this.addRule(rt,ot,st);var ct=this.rules.replace(rt,ot,st);return ct&&this.options.jss.plugins.onProcessRule(ct),this.attached?(this.deployed&&this.renderer&&(ct?ut.renderable&&this.renderer.replaceRule(ut.renderable,ct):this.renderer.deleteRule(ut)),ct):(this.deployed=!1,ct)},tt.insertRule=function(rt){this.renderer&&this.renderer.insertRule(rt)},tt.addRules=function(rt,ot){var st=[];for(var ut in rt){var ct=this.addRule(ut,rt[ut],ot);ct&&st.push(ct)}return st},tt.getRule=function(rt){return this.rules.get(rt)},tt.deleteRule=function(rt){var ot=typeof rt=="object"?rt:this.rules.get(rt);return!ot||this.attached&&!ot.renderable?!1:(this.rules.remove(ot),this.attached&&ot.renderable&&this.renderer?this.renderer.deleteRule(ot.renderable):!0)},tt.indexOf=function(rt){return this.rules.indexOf(rt)},tt.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},tt.update=function(){var rt;return(rt=this.rules).update.apply(rt,arguments),this},tt.updateOne=function(rt,ot,st){return this.rules.updateOne(rt,ot,st),this},tt.toString=function(rt){return this.rules.toString(rt)},et}(),PluginsRegistry=function(){function et(){this.plugins={internal:[],external:[]},this.registry={}}var tt=et.prototype;return tt.onCreateRule=function(rt,ot,st){for(var ut=0;ut<this.registry.onCreateRule.length;ut++){var ct=this.registry.onCreateRule[ut](rt,ot,st);if(ct)return ct}return null},tt.onProcessRule=function(rt){if(!rt.isProcessed){for(var ot=rt.options.sheet,st=0;st<this.registry.onProcessRule.length;st++)this.registry.onProcessRule[st](rt,ot);rt.style&&this.onProcessStyle(rt.style,rt,ot),rt.isProcessed=!0}},tt.onProcessStyle=function(rt,ot,st){for(var ut=0;ut<this.registry.onProcessStyle.length;ut++)ot.style=this.registry.onProcessStyle[ut](ot.style,ot,st)},tt.onProcessSheet=function(rt){for(var ot=0;ot<this.registry.onProcessSheet.length;ot++)this.registry.onProcessSheet[ot](rt)},tt.onUpdate=function(rt,ot,st,ut){for(var ct=0;ct<this.registry.onUpdate.length;ct++)this.registry.onUpdate[ct](rt,ot,st,ut)},tt.onChangeValue=function(rt,ot,st){for(var ut=rt,ct=0;ct<this.registry.onChangeValue.length;ct++)ut=this.registry.onChangeValue[ct](ut,ot,st);return ut},tt.use=function(rt,ot){ot===void 0&&(ot={queue:"external"});var st=this.plugins[ot.queue];st.indexOf(rt)===-1&&(st.push(rt),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(ut,ct){for(var ft in ct)ft in ut&&ut[ft].push(ct[ft]);return ut},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},et}(),SheetsRegistry=function(){function et(){this.registry=[]}var tt=et.prototype;return tt.add=function(rt){var ot=this.registry,st=rt.options.index;if(ot.indexOf(rt)===-1){if(ot.length===0||st>=this.index){ot.push(rt);return}for(var ut=0;ut<ot.length;ut++)if(ot[ut].options.index>st){ot.splice(ut,0,rt);return}}},tt.reset=function(){this.registry=[]},tt.remove=function(rt){var ot=this.registry.indexOf(rt);this.registry.splice(ot,1)},tt.toString=function(rt){for(var ot=rt===void 0?{}:rt,st=ot.attached,ut=_objectWithoutPropertiesLoose$7(ot,["attached"]),ct=getWhitespaceSymbols(ut),ft=ct.linebreak,pt="",ht=0;ht<this.registry.length;ht++){var mt=this.registry[ht];st!=null&&mt.attached!==st||(pt&&(pt+=ft),pt+=mt.toString(ut))}return pt},_createClass$2(et,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),et}(),sheets=new SheetsRegistry,globalThis$1=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),ns="2f1acc6c3a606b082e5eef5e54414ffb";globalThis$1[ns]==null&&(globalThis$1[ns]=0);var moduleId=globalThis$1[ns]++,createGenerateId=function et(tt){tt===void 0&&(tt={});var nt=0,rt=function(st,ut){nt+=1;var ct="",ft="";return ut&&(ut.options.classNamePrefix&&(ft=ut.options.classNamePrefix),ut.options.jss.id!=null&&(ct=String(ut.options.jss.id))),tt.minify?""+(ft||"c")+moduleId+ct+nt:ft+st.key+"-"+moduleId+(ct?"-"+ct:"")+"-"+nt};return rt},memoize=function et(tt){var nt;return function(){return nt||(nt=tt()),nt}},getPropertyValue=function et(tt,nt){try{return tt.attributeStyleMap?tt.attributeStyleMap.get(nt):tt.style.getPropertyValue(nt)}catch{return""}},setProperty=function et(tt,nt,rt){try{var ot=rt;if(Array.isArray(rt)&&(ot=toCssValue(rt)),tt.attributeStyleMap)tt.attributeStyleMap.set(nt,ot);else{var st=ot?ot.indexOf("!important"):-1,ut=st>-1?ot.substr(0,st-1):ot;tt.style.setProperty(nt,ut,st>-1?"important":"")}}catch{return!1}return!0},removeProperty=function et(tt,nt){try{tt.attributeStyleMap?tt.attributeStyleMap.delete(nt):tt.style.removeProperty(nt)}catch{}},setSelector=function et(tt,nt){return tt.selectorText=nt,tt.selectorText===nt},getHead=memoize(function(){return document.querySelector("head")});function findHigherSheet(et,tt){for(var nt=0;nt<et.length;nt++){var rt=et[nt];if(rt.attached&&rt.options.index>tt.index&&rt.options.insertionPoint===tt.insertionPoint)return rt}return null}function findHighestSheet(et,tt){for(var nt=et.length-1;nt>=0;nt--){var rt=et[nt];if(rt.attached&&rt.options.insertionPoint===tt.insertionPoint)return rt}return null}function findCommentNode(et){for(var tt=getHead(),nt=0;nt<tt.childNodes.length;nt++){var rt=tt.childNodes[nt];if(rt.nodeType===8&&rt.nodeValue.trim()===et)return rt}return null}function findPrevNode(et){var tt=sheets.registry;if(tt.length>0){var nt=findHigherSheet(tt,et);if(nt&&nt.renderer)return{parent:nt.renderer.element.parentNode,node:nt.renderer.element};if(nt=findHighestSheet(tt,et),nt&&nt.renderer)return{parent:nt.renderer.element.parentNode,node:nt.renderer.element.nextSibling}}var rt=et.insertionPoint;if(rt&&typeof rt=="string"){var ot=findCommentNode(rt);if(ot)return{parent:ot.parentNode,node:ot.nextSibling}}return!1}function insertStyle(et,tt){var nt=tt.insertionPoint,rt=findPrevNode(tt);if(rt!==!1&&rt.parent){rt.parent.insertBefore(et,rt.node);return}if(nt&&typeof nt.nodeType=="number"){var ot=nt,st=ot.parentNode;st&&st.insertBefore(et,ot.nextSibling);return}getHead().appendChild(et)}var getNonce=memoize(function(){var et=document.querySelector('meta[property="csp-nonce"]');return et?et.getAttribute("content"):null}),_insertRule=function et(tt,nt,rt){try{"insertRule"in tt?tt.insertRule(nt,rt):"appendRule"in tt&&tt.appendRule(nt)}catch{return!1}return tt.cssRules[rt]},getValidRuleInsertionIndex=function et(tt,nt){var rt=tt.cssRules.length;return nt===void 0||nt>rt?rt:nt},createStyle=function et(){var tt=document.createElement("style");return tt.textContent=`
`,tt},DomRenderer=function(){function et(nt){this.getPropertyValue=getPropertyValue,this.setProperty=setProperty,this.removeProperty=removeProperty,this.setSelector=setSelector,this.hasInsertedRules=!1,this.cssRules=[],nt&&sheets.add(nt),this.sheet=nt;var rt=this.sheet?this.sheet.options:{},ot=rt.media,st=rt.meta,ut=rt.element;this.element=ut||createStyle(),this.element.setAttribute("data-jss",""),ot&&this.element.setAttribute("media",ot),st&&this.element.setAttribute("data-meta",st);var ct=getNonce();ct&&this.element.setAttribute("nonce",ct)}var tt=et.prototype;return tt.attach=function(){if(!(this.element.parentNode||!this.sheet)){insertStyle(this.element,this.sheet.options);var rt=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&rt&&(this.hasInsertedRules=!1,this.deploy())}},tt.detach=function(){if(!!this.sheet){var rt=this.element.parentNode;rt&&rt.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
`)}},tt.deploy=function(){var rt=this.sheet;if(!!rt){if(rt.options.link){this.insertRules(rt.rules);return}this.element.textContent=`
`+rt.toString()+`
`}},tt.insertRules=function(rt,ot){for(var st=0;st<rt.index.length;st++)this.insertRule(rt.index[st],st,ot)},tt.insertRule=function(rt,ot,st){if(st===void 0&&(st=this.element.sheet),rt.rules){var ut=rt,ct=st;if(rt.type==="conditional"||rt.type==="keyframes"){var ft=getValidRuleInsertionIndex(st,ot);if(ct=_insertRule(st,ut.toString({children:!1}),ft),ct===!1)return!1;this.refCssRule(rt,ft,ct)}return this.insertRules(ut.rules,ct),ct}var pt=rt.toString();if(!pt)return!1;var ht=getValidRuleInsertionIndex(st,ot),mt=_insertRule(st,pt,ht);return mt===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(rt,ht,mt),mt)},tt.refCssRule=function(rt,ot,st){rt.renderable=st,rt.options.parent instanceof StyleSheet&&this.cssRules.splice(ot,0,st)},tt.deleteRule=function(rt){var ot=this.element.sheet,st=this.indexOf(rt);return st===-1?!1:(ot.deleteRule(st),this.cssRules.splice(st,1),!0)},tt.indexOf=function(rt){return this.cssRules.indexOf(rt)},tt.replaceRule=function(rt,ot){var st=this.indexOf(rt);return st===-1?!1:(this.element.sheet.deleteRule(st),this.cssRules.splice(st,1),this.insertRule(ot,st))},tt.getRules=function(){return this.element.sheet.cssRules},et}(),instanceCounter=0,Jss=function(){function et(nt){this.id=instanceCounter++,this.version="10.10.0",this.plugins=new PluginsRegistry,this.options={id:{minify:!1},createGenerateId,Renderer:isBrowser$1?DomRenderer:null,plugins:[]},this.generateId=createGenerateId({minify:!1});for(var rt=0;rt<plugins$1.length;rt++)this.plugins.use(plugins$1[rt],{queue:"internal"});this.setup(nt)}var tt=et.prototype;return tt.setup=function(rt){return rt===void 0&&(rt={}),rt.createGenerateId&&(this.options.createGenerateId=rt.createGenerateId),rt.id&&(this.options.id=_extends$a({},this.options.id,rt.id)),(rt.createGenerateId||rt.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),rt.insertionPoint!=null&&(this.options.insertionPoint=rt.insertionPoint),"Renderer"in rt&&(this.options.Renderer=rt.Renderer),rt.plugins&&this.use.apply(this,rt.plugins),this},tt.createStyleSheet=function(rt,ot){ot===void 0&&(ot={});var st=ot,ut=st.index;typeof ut!="number"&&(ut=sheets.index===0?0:sheets.index+1);var ct=new StyleSheet(rt,_extends$a({},ot,{jss:this,generateId:ot.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:ut}));return this.plugins.onProcessSheet(ct),ct},tt.removeStyleSheet=function(rt){return rt.detach(),sheets.remove(rt),this},tt.createRule=function(rt,ot,st){if(ot===void 0&&(ot={}),st===void 0&&(st={}),typeof rt=="object")return this.createRule(void 0,rt,ot);var ut=_extends$a({},st,{name:rt,jss:this,Renderer:this.options.Renderer});ut.generateId||(ut.generateId=this.generateId),ut.classes||(ut.classes={}),ut.keyframes||(ut.keyframes={});var ct=createRule(rt,ot,ut);return ct&&this.plugins.onProcessRule(ct),ct},tt.use=function(){for(var rt=this,ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return st.forEach(function(ct){rt.plugins.use(ct)}),this},et}(),createJss=function et(tt){return new Jss(tt)},hasCSSTOMSupport=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function getDynamicStyles(et){var tt=null;for(var nt in et){var rt=et[nt],ot=typeof rt;if(ot==="function")tt||(tt={}),tt[nt]=rt;else if(ot==="object"&&rt!==null&&!Array.isArray(rt)){var st=getDynamicStyles(rt);st&&(tt||(tt={}),tt[nt]=st)}}return tt}/**
 * A better abstraction over CSS.
 *
 * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
 * @website https://github.com/cssinjs/jss
 * @license MIT
 */createJss();var now$1=Date.now(),fnValuesNs="fnValues"+now$1,fnRuleNs="fnStyle"+ ++now$1,functionPlugin=function et(){return{onCreateRule:function(nt,rt,ot){if(typeof rt!="function")return null;var st=createRule(nt,{},ot);return st[fnRuleNs]=rt,st},onProcessStyle:function(nt,rt){if(fnValuesNs in rt||fnRuleNs in rt)return nt;var ot={};for(var st in nt){var ut=nt[st];typeof ut=="function"&&(delete nt[st],ot[st]=ut)}return rt[fnValuesNs]=ot,nt},onUpdate:function(nt,rt,ot,st){var ut=rt,ct=ut[fnRuleNs];ct&&(ut.style=ct(nt)||{});var ft=ut[fnValuesNs];if(ft)for(var pt in ft)ut.prop(pt,ft[pt](nt),st)}}};const functions=functionPlugin;var at="@global",atPrefix="@global ",GlobalContainerRule=function(){function et(nt,rt,ot){this.type="global",this.at=at,this.isProcessed=!1,this.key=nt,this.options=ot,this.rules=new RuleList(_extends$a({},ot,{parent:this}));for(var st in rt)this.rules.add(st,rt[st]);this.rules.process()}var tt=et.prototype;return tt.getRule=function(rt){return this.rules.get(rt)},tt.addRule=function(rt,ot,st){var ut=this.rules.add(rt,ot,st);return ut&&this.options.jss.plugins.onProcessRule(ut),ut},tt.replaceRule=function(rt,ot,st){var ut=this.rules.replace(rt,ot,st);return ut&&this.options.jss.plugins.onProcessRule(ut),ut},tt.indexOf=function(rt){return this.rules.indexOf(rt)},tt.toString=function(rt){return this.rules.toString(rt)},et}(),GlobalPrefixedRule=function(){function et(nt,rt,ot){this.type="global",this.at=at,this.isProcessed=!1,this.key=nt,this.options=ot;var st=nt.substr(atPrefix.length);this.rule=ot.jss.createRule(st,rt,_extends$a({},ot,{parent:this}))}var tt=et.prototype;return tt.toString=function(rt){return this.rule?this.rule.toString(rt):""},et}(),separatorRegExp$1=/\s*,\s*/g;function addScope(et,tt){for(var nt=et.split(separatorRegExp$1),rt="",ot=0;ot<nt.length;ot++)rt+=tt+" "+nt[ot].trim(),nt[ot+1]&&(rt+=", ");return rt}function handleNestedGlobalContainerRule(et,tt){var nt=et.options,rt=et.style,ot=rt?rt[at]:null;if(!!ot){for(var st in ot)tt.addRule(st,ot[st],_extends$a({},nt,{selector:addScope(st,et.selector)}));delete rt[at]}}function handlePrefixedGlobalRule(et,tt){var nt=et.options,rt=et.style;for(var ot in rt)if(!(ot[0]!=="@"||ot.substr(0,at.length)!==at)){var st=addScope(ot.substr(at.length),et.selector);tt.addRule(st,rt[ot],_extends$a({},nt,{selector:st})),delete rt[ot]}}function jssGlobal(){function et(nt,rt,ot){if(!nt)return null;if(nt===at)return new GlobalContainerRule(nt,rt,ot);if(nt[0]==="@"&&nt.substr(0,atPrefix.length)===atPrefix)return new GlobalPrefixedRule(nt,rt,ot);var st=ot.parent;return st&&(st.type==="global"||st.options.parent&&st.options.parent.type==="global")&&(ot.scoped=!1),!ot.selector&&ot.scoped===!1&&(ot.selector=nt),null}function tt(nt,rt){nt.type!=="style"||!rt||(handleNestedGlobalContainerRule(nt,rt),handlePrefixedGlobalRule(nt,rt))}return{onCreateRule:et,onProcessRule:tt}}var separatorRegExp=/\s*,\s*/g,parentRegExp=/&/g,refRegExp=/\$([\w-]+)/g;function jssNested(){function et(ot,st){return function(ut,ct){var ft=ot.getRule(ct)||st&&st.getRule(ct);return ft?ft.selector:ct}}function tt(ot,st){for(var ut=st.split(separatorRegExp),ct=ot.split(separatorRegExp),ft="",pt=0;pt<ut.length;pt++)for(var ht=ut[pt],mt=0;mt<ct.length;mt++){var yt=ct[mt];ft&&(ft+=", "),ft+=yt.indexOf("&")!==-1?yt.replace(parentRegExp,ht):ht+" "+yt}return ft}function nt(ot,st,ut){if(ut)return _extends$a({},ut,{index:ut.index+1});var ct=ot.options.nestingLevel;ct=ct===void 0?1:ct+1;var ft=_extends$a({},ot.options,{nestingLevel:ct,index:st.indexOf(ot)+1});return delete ft.name,ft}function rt(ot,st,ut){if(st.type!=="style")return ot;var ct=st,ft=ct.options.parent,pt,ht;for(var mt in ot){var yt=mt.indexOf("&")!==-1,vt=mt[0]==="@";if(!(!yt&&!vt)){if(pt=nt(ct,ft,pt),yt){var Tt=tt(mt,ct.selector);ht||(ht=et(ft,ut)),Tt=Tt.replace(refRegExp,ht);var Et=ct.key+"-"+mt;"replaceRule"in ft?ft.replaceRule(Et,ot[mt],_extends$a({},pt,{selector:Tt})):ft.addRule(Et,ot[mt],_extends$a({},pt,{selector:Tt}))}else vt&&ft.addRule(mt,{},pt).addRule(ct.key,ot[mt],{selector:ct.selector});delete ot[mt]}}return ot}return{onProcessStyle:rt}}var uppercasePattern=/[A-Z]/g,msPattern=/^ms-/,cache$2={};function toHyphenLower(et){return"-"+et.toLowerCase()}function hyphenateStyleName(et){if(cache$2.hasOwnProperty(et))return cache$2[et];var tt=et.replace(uppercasePattern,toHyphenLower);return cache$2[et]=msPattern.test(tt)?"-"+tt:tt}function convertCase(et){var tt={};for(var nt in et){var rt=nt.indexOf("--")===0?nt:hyphenateStyleName(nt);tt[rt]=et[nt]}return et.fallbacks&&(Array.isArray(et.fallbacks)?tt.fallbacks=et.fallbacks.map(convertCase):tt.fallbacks=convertCase(et.fallbacks)),tt}function camelCase(){function et(nt){if(Array.isArray(nt)){for(var rt=0;rt<nt.length;rt++)nt[rt]=convertCase(nt[rt]);return nt}return convertCase(nt)}function tt(nt,rt,ot){if(rt.indexOf("--")===0)return nt;var st=hyphenateStyleName(rt);return rt===st?nt:(ot.prop(st,nt),null)}return{onProcessStyle:et,onChangeValue:tt}}var px=hasCSSTOMSupport&&CSS?CSS.px:"px",ms=hasCSSTOMSupport&&CSS?CSS.ms:"ms",percent=hasCSSTOMSupport&&CSS?CSS.percent:"%",defaultUnits={"animation-delay":ms,"animation-duration":ms,"background-position":px,"background-position-x":px,"background-position-y":px,"background-size":px,border:px,"border-bottom":px,"border-bottom-left-radius":px,"border-bottom-right-radius":px,"border-bottom-width":px,"border-left":px,"border-left-width":px,"border-radius":px,"border-right":px,"border-right-width":px,"border-top":px,"border-top-left-radius":px,"border-top-right-radius":px,"border-top-width":px,"border-width":px,"border-block":px,"border-block-end":px,"border-block-end-width":px,"border-block-start":px,"border-block-start-width":px,"border-block-width":px,"border-inline":px,"border-inline-end":px,"border-inline-end-width":px,"border-inline-start":px,"border-inline-start-width":px,"border-inline-width":px,"border-start-start-radius":px,"border-start-end-radius":px,"border-end-start-radius":px,"border-end-end-radius":px,margin:px,"margin-bottom":px,"margin-left":px,"margin-right":px,"margin-top":px,"margin-block":px,"margin-block-end":px,"margin-block-start":px,"margin-inline":px,"margin-inline-end":px,"margin-inline-start":px,padding:px,"padding-bottom":px,"padding-left":px,"padding-right":px,"padding-top":px,"padding-block":px,"padding-block-end":px,"padding-block-start":px,"padding-inline":px,"padding-inline-end":px,"padding-inline-start":px,"mask-position-x":px,"mask-position-y":px,"mask-size":px,height:px,width:px,"min-height":px,"max-height":px,"min-width":px,"max-width":px,bottom:px,left:px,top:px,right:px,inset:px,"inset-block":px,"inset-block-end":px,"inset-block-start":px,"inset-inline":px,"inset-inline-end":px,"inset-inline-start":px,"box-shadow":px,"text-shadow":px,"column-gap":px,"column-rule":px,"column-rule-width":px,"column-width":px,"font-size":px,"font-size-delta":px,"letter-spacing":px,"text-decoration-thickness":px,"text-indent":px,"text-stroke":px,"text-stroke-width":px,"word-spacing":px,motion:px,"motion-offset":px,outline:px,"outline-offset":px,"outline-width":px,perspective:px,"perspective-origin-x":percent,"perspective-origin-y":percent,"transform-origin":percent,"transform-origin-x":percent,"transform-origin-y":percent,"transform-origin-z":percent,"transition-delay":ms,"transition-duration":ms,"vertical-align":px,"flex-basis":px,"shape-margin":px,size:px,gap:px,grid:px,"grid-gap":px,"row-gap":px,"grid-row-gap":px,"grid-column-gap":px,"grid-template-rows":px,"grid-template-columns":px,"grid-auto-rows":px,"grid-auto-columns":px,"box-shadow-x":px,"box-shadow-y":px,"box-shadow-blur":px,"box-shadow-spread":px,"font-line-height":px,"text-shadow-x":px,"text-shadow-y":px,"text-shadow-blur":px};function addCamelCasedVersion(et){var tt=/(-[a-z])/g,nt=function(ut){return ut[1].toUpperCase()},rt={};for(var ot in et)rt[ot]=et[ot],rt[ot.replace(tt,nt)]=et[ot];return rt}var units=addCamelCasedVersion(defaultUnits);function iterate(et,tt,nt){if(tt==null)return tt;if(Array.isArray(tt))for(var rt=0;rt<tt.length;rt++)tt[rt]=iterate(et,tt[rt],nt);else if(typeof tt=="object")if(et==="fallbacks")for(var ot in tt)tt[ot]=iterate(ot,tt[ot],nt);else for(var st in tt)tt[st]=iterate(et+"-"+st,tt[st],nt);else if(typeof tt=="number"&&isNaN(tt)===!1){var ut=nt[et]||units[et];return ut&&!(tt===0&&ut===px)?typeof ut=="function"?ut(tt).toString():""+tt+ut:tt.toString()}return tt}function defaultUnit(et){et===void 0&&(et={});var tt=addCamelCasedVersion(et);function nt(ot,st){if(st.type!=="style")return ot;for(var ut in ot)ot[ut]=iterate(ut,ot[ut],tt);return ot}function rt(ot,st){return iterate(st,ot,tt)}return{onProcessStyle:nt,onChangeValue:rt}}var js="",css$1="",vendor="",browser$2="",isTouch=isBrowser$1&&"ontouchstart"in document.documentElement;if(isBrowser$1){var jsCssMap={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},_document$createEleme=document.createElement("p"),style=_document$createEleme.style,testProp="Transform";for(var key$1 in jsCssMap)if(key$1+testProp in style){js=key$1,css$1=jsCssMap[key$1];break}js==="Webkit"&&"msHyphens"in style&&(js="ms",css$1=jsCssMap.ms,browser$2="edge"),js==="Webkit"&&"-apple-trailing-word"in style&&(vendor="apple")}var prefix$1={js,css:css$1,vendor,browser:browser$2,isTouch};function supportedKeyframes(et){return et[1]==="-"||prefix$1.js==="ms"?et:"@"+prefix$1.css+"keyframes"+et.substr(10)}var appearence={noPrefill:["appearance"],supportedProperty:function et(tt){return tt!=="appearance"?!1:prefix$1.js==="ms"?"-webkit-"+tt:prefix$1.css+tt}},colorAdjust={noPrefill:["color-adjust"],supportedProperty:function et(tt){return tt!=="color-adjust"?!1:prefix$1.js==="Webkit"?prefix$1.css+"print-"+tt:tt}},regExp=/[-\s]+(.)?/g;function toUpper(et,tt){return tt?tt.toUpperCase():""}function camelize(et){return et.replace(regExp,toUpper)}function pascalize(et){return camelize("-"+et)}var mask={noPrefill:["mask"],supportedProperty:function et(tt,nt){if(!/^mask/.test(tt))return!1;if(prefix$1.js==="Webkit"){var rt="mask-image";if(camelize(rt)in nt)return tt;if(prefix$1.js+pascalize(rt)in nt)return prefix$1.css+tt}return tt}},textOrientation={noPrefill:["text-orientation"],supportedProperty:function et(tt){return tt!=="text-orientation"?!1:prefix$1.vendor==="apple"&&!prefix$1.isTouch?prefix$1.css+tt:tt}},transform={noPrefill:["transform"],supportedProperty:function et(tt,nt,rt){return tt!=="transform"?!1:rt.transform?tt:prefix$1.css+tt}},transition$1={noPrefill:["transition"],supportedProperty:function et(tt,nt,rt){return tt!=="transition"?!1:rt.transition?tt:prefix$1.css+tt}},writingMode={noPrefill:["writing-mode"],supportedProperty:function et(tt){return tt!=="writing-mode"?!1:prefix$1.js==="Webkit"||prefix$1.js==="ms"&&prefix$1.browser!=="edge"?prefix$1.css+tt:tt}},userSelect={noPrefill:["user-select"],supportedProperty:function et(tt){return tt!=="user-select"?!1:prefix$1.js==="Moz"||prefix$1.js==="ms"||prefix$1.vendor==="apple"?prefix$1.css+tt:tt}},breakPropsOld={supportedProperty:function et(tt,nt){if(!/^break-/.test(tt))return!1;if(prefix$1.js==="Webkit"){var rt="WebkitColumn"+pascalize(tt);return rt in nt?prefix$1.css+"column-"+tt:!1}if(prefix$1.js==="Moz"){var ot="page"+pascalize(tt);return ot in nt?"page-"+tt:!1}return!1}},inlineLogicalOld={supportedProperty:function et(tt,nt){if(!/^(border|margin|padding)-inline/.test(tt))return!1;if(prefix$1.js==="Moz")return tt;var rt=tt.replace("-inline","");return prefix$1.js+pascalize(rt)in nt?prefix$1.css+rt:!1}},unprefixed={supportedProperty:function et(tt,nt){return camelize(tt)in nt?tt:!1}},prefixed={supportedProperty:function et(tt,nt){var rt=pascalize(tt);return tt[0]==="-"||tt[0]==="-"&&tt[1]==="-"?tt:prefix$1.js+rt in nt?prefix$1.css+tt:prefix$1.js!=="Webkit"&&"Webkit"+rt in nt?"-webkit-"+tt:!1}},scrollSnap={supportedProperty:function et(tt){return tt.substring(0,11)!=="scroll-snap"?!1:prefix$1.js==="ms"?""+prefix$1.css+tt:tt}},overscrollBehavior={supportedProperty:function et(tt){return tt!=="overscroll-behavior"?!1:prefix$1.js==="ms"?prefix$1.css+"scroll-chaining":tt}},propMap={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},flex2012={supportedProperty:function et(tt,nt){var rt=propMap[tt];return rt&&prefix$1.js+pascalize(rt)in nt?prefix$1.css+rt:!1}},propMap$1={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},propKeys=Object.keys(propMap$1),prefixCss=function et(tt){return prefix$1.css+tt},flex2009={supportedProperty:function et(tt,nt,rt){var ot=rt.multiple;if(propKeys.indexOf(tt)>-1){var st=propMap$1[tt];if(!Array.isArray(st))return prefix$1.js+pascalize(st)in nt?prefix$1.css+st:!1;if(!ot)return!1;for(var ut=0;ut<st.length;ut++)if(!(prefix$1.js+pascalize(st[0])in nt))return!1;return st.map(prefixCss)}return!1}},plugins=[appearence,colorAdjust,mask,textOrientation,transform,transition$1,writingMode,userSelect,breakPropsOld,inlineLogicalOld,unprefixed,prefixed,scrollSnap,overscrollBehavior,flex2012,flex2009],propertyDetectors=plugins.filter(function(et){return et.supportedProperty}).map(function(et){return et.supportedProperty}),noPrefill=plugins.filter(function(et){return et.noPrefill}).reduce(function(et,tt){return et.push.apply(et,_toConsumableArray$1(tt.noPrefill)),et},[]),el,cache={};if(isBrowser$1){el=document.createElement("p");var computed=window.getComputedStyle(document.documentElement,"");for(var key$1$1 in computed)isNaN(key$1$1)||(cache[computed[key$1$1]]=computed[key$1$1]);noPrefill.forEach(function(et){return delete cache[et]})}function supportedProperty(et,tt){if(tt===void 0&&(tt={}),!el)return et;if(cache[et]!=null)return cache[et];(et==="transition"||et==="transform")&&(tt[et]=et in el.style);for(var nt=0;nt<propertyDetectors.length&&(cache[et]=propertyDetectors[nt](et,el.style,tt),!cache[et]);nt++);try{el.style[et]=""}catch{return!1}return cache[et]}var cache$1$1={},transitionProperties={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},transPropsRegExp=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,el$1;function prefixTransitionCallback(et,tt,nt){if(tt==="var")return"var";if(tt==="all")return"all";if(nt==="all")return", all";var rt=tt?supportedProperty(tt):", "+supportedProperty(nt);return rt||tt||nt}isBrowser$1&&(el$1=document.createElement("p"));function supportedValue(et,tt){var nt=tt;if(!el$1||et==="content")return tt;if(typeof nt!="string"||!isNaN(parseInt(nt,10)))return nt;var rt=et+nt;if(cache$1$1[rt]!=null)return cache$1$1[rt];try{el$1.style[et]=nt}catch{return cache$1$1[rt]=!1,!1}if(transitionProperties[et])nt=nt.replace(transPropsRegExp,prefixTransitionCallback);else if(el$1.style[et]===""&&(nt=prefix$1.css+nt,nt==="-ms-flex"&&(el$1.style[et]="-ms-flexbox"),el$1.style[et]=nt,el$1.style[et]===""))return cache$1$1[rt]=!1,!1;return el$1.style[et]="",cache$1$1[rt]=nt,cache$1$1[rt]}function jssVendorPrefixer(){function et(ot){if(ot.type==="keyframes"){var st=ot;st.at=supportedKeyframes(st.at)}}function tt(ot){for(var st in ot){var ut=ot[st];if(st==="fallbacks"&&Array.isArray(ut)){ot[st]=ut.map(tt);continue}var ct=!1,ft=supportedProperty(st);ft&&ft!==st&&(ct=!0);var pt=!1,ht=supportedValue(ft,toCssValue(ut));ht&&ht!==ut&&(pt=!0),(ct||pt)&&(ct&&delete ot[st],ot[ft||st]=ht||ut)}return ot}function nt(ot,st){return st.type!=="style"?ot:tt(ot)}function rt(ot,st){return supportedValue(st,toCssValue(ot))||ot}return{onProcessRule:et,onProcessStyle:nt,onChangeValue:rt}}function jssPropsSort(){var et=function(nt,rt){return nt.length===rt.length?nt>rt?1:-1:nt.length-rt.length};return{onProcessStyle:function(nt,rt){if(rt.type!=="style")return nt;for(var ot={},st=Object.keys(nt).sort(et),ut=0;ut<st.length;ut++)ot[st[ut]]=nt[st[ut]];return ot}}}function jssPreset(){return{plugins:[functions(),jssGlobal(),jssNested(),camelCase(),defaultUnit(),typeof window>"u"?null:jssVendorPrefixer(),jssPropsSort()]}}function mergeClasses(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},tt=et.baseClasses,nt=et.newClasses;if(et.Component,!nt)return tt;var rt=_extends$a({},tt);return Object.keys(nt).forEach(function(ot){nt[ot]&&(rt[ot]="".concat(tt[ot]," ").concat(nt[ot]))}),rt}var multiKeyStore={set:function et(tt,nt,rt,ot){var st=tt.get(nt);st||(st=new Map,tt.set(nt,st)),st.set(rt,ot)},get:function et(tt,nt,rt){var ot=tt.get(nt);return ot?ot.get(rt):void 0},delete:function et(tt,nt,rt){var ot=tt.get(nt);ot.delete(rt)}};const multiKeyStore$1=multiKeyStore;var ThemeContext=Wt.createContext(null);const ThemeContext$1=ThemeContext;function useTheme$1(){var et=Wt.useContext(ThemeContext$1);return et}var jss=createJss(jssPreset()),generateClassName=createGenerateClassName(),sheetsManager=new Map,defaultOptions={disableGeneration:!1,generateClassName,jss,sheetsCache:null,sheetsManager,sheetsRegistry:null},StylesContext=Wt.createContext(defaultOptions),indexCounter=-1e9;function increment(){return indexCounter+=1,indexCounter}var noopTheme={};const noopTheme$1=noopTheme;function getStylesCreator(et){var tt=typeof et=="function";return{create:function(rt,ot){var st;try{st=tt?et(rt):et}catch(ft){throw ft}if(!ot||!rt.overrides||!rt.overrides[ot])return st;var ut=rt.overrides[ot],ct=_extends$a({},st);return Object.keys(ut).forEach(function(ft){ct[ft]=deepmerge(ct[ft],ut[ft])}),ct},options:{}}}function getClasses(et,tt,nt){var rt=et.state,ot=et.stylesOptions;if(ot.disableGeneration)return tt||{};rt.cacheClasses||(rt.cacheClasses={value:null,lastProp:null,lastJSS:{}});var st=!1;return rt.classes!==rt.cacheClasses.lastJSS&&(rt.cacheClasses.lastJSS=rt.classes,st=!0),tt!==rt.cacheClasses.lastProp&&(rt.cacheClasses.lastProp=tt,st=!0),st&&(rt.cacheClasses.value=mergeClasses({baseClasses:rt.cacheClasses.lastJSS,newClasses:tt,Component:nt})),rt.cacheClasses.value}function attach(et,tt){var nt=et.state,rt=et.theme,ot=et.stylesOptions,st=et.stylesCreator,ut=et.name;if(!ot.disableGeneration){var ct=multiKeyStore$1.get(ot.sheetsManager,st,rt);ct||(ct={refs:0,staticSheet:null,dynamicStyles:null},multiKeyStore$1.set(ot.sheetsManager,st,rt,ct));var ft=_extends$a({},st.options,ot,{theme:rt,flip:typeof ot.flip=="boolean"?ot.flip:rt.direction==="rtl"});ft.generateId=ft.serverGenerateClassName||ft.generateClassName;var pt=ot.sheetsRegistry;if(ct.refs===0){var ht;ot.sheetsCache&&(ht=multiKeyStore$1.get(ot.sheetsCache,st,rt));var mt=st.create(rt,ut);ht||(ht=ot.jss.createStyleSheet(mt,_extends$a({link:!1},ft)),ht.attach(),ot.sheetsCache&&multiKeyStore$1.set(ot.sheetsCache,st,rt,ht)),pt&&pt.add(ht),ct.staticSheet=ht,ct.dynamicStyles=getDynamicStyles(mt)}if(ct.dynamicStyles){var yt=ot.jss.createStyleSheet(ct.dynamicStyles,_extends$a({link:!0},ft));yt.update(tt),yt.attach(),nt.dynamicSheet=yt,nt.classes=mergeClasses({baseClasses:ct.staticSheet.classes,newClasses:yt.classes}),pt&&pt.add(yt)}else nt.classes=ct.staticSheet.classes;ct.refs+=1}}function update$1(et,tt){var nt=et.state;nt.dynamicSheet&&nt.dynamicSheet.update(tt)}function detach(et){var tt=et.state,nt=et.theme,rt=et.stylesOptions,ot=et.stylesCreator;if(!rt.disableGeneration){var st=multiKeyStore$1.get(rt.sheetsManager,ot,nt);st.refs-=1;var ut=rt.sheetsRegistry;st.refs===0&&(multiKeyStore$1.delete(rt.sheetsManager,ot,nt),rt.jss.removeStyleSheet(st.staticSheet),ut&&ut.remove(st.staticSheet)),tt.dynamicSheet&&(rt.jss.removeStyleSheet(tt.dynamicSheet),ut&&ut.remove(tt.dynamicSheet))}}function useSynchronousEffect(et,tt){var nt=Wt.useRef([]),rt,ot=Wt.useMemo(function(){return{}},tt);nt.current!==ot&&(nt.current=ot,rt=et()),Wt.useEffect(function(){return function(){rt&&rt()}},[ot])}function makeStyles$1(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nt=tt.name,rt=tt.classNamePrefix,ot=tt.Component,st=tt.defaultTheme,ut=st===void 0?noopTheme$1:st,ct=_objectWithoutProperties$3(tt,["name","classNamePrefix","Component","defaultTheme"]),ft=getStylesCreator(et),pt=nt||rt||"makeStyles";ft.options={index:increment(),name:nt,meta:pt,classNamePrefix:pt};var ht=function(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},vt=useTheme$1()||ut,Tt=_extends$a({},Wt.useContext(StylesContext),ct),Et=Wt.useRef(),xt=Wt.useRef();useSynchronousEffect(function(){var Ct={name:nt,state:{},stylesCreator:ft,stylesOptions:Tt,theme:vt};return attach(Ct,yt),xt.current=!1,Et.current=Ct,function(){detach(Ct)}},[vt,ft]),Wt.useEffect(function(){xt.current&&update$1(Et.current,yt),xt.current=!0});var At=getClasses(Et.current,yt.classes,ot);return At};return ht}function r$1(et){var tt,nt,rt="";if(typeof et=="string"||typeof et=="number")rt+=et;else if(typeof et=="object")if(Array.isArray(et))for(tt=0;tt<et.length;tt++)et[tt]&&(nt=r$1(et[tt]))&&(rt&&(rt+=" "),rt+=nt);else for(tt in et)et[tt]&&(rt&&(rt+=" "),rt+=tt);return rt}function clsx(){for(var et,tt,nt=0,rt="";nt<arguments.length;)(et=arguments[nt++])&&(tt=r$1(et))&&(rt&&(rt+=" "),rt+=tt);return rt}const clsx_m=Object.freeze(Object.defineProperty({__proto__:null,clsx,default:clsx},Symbol.toStringTag,{value:"Module"}));var withStyles$1=function et(tt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(rt){var ot=nt.defaultTheme,st=nt.withTheme,ut=st===void 0?!1:st,ct=nt.name,ft=_objectWithoutProperties$3(nt,["defaultTheme","withTheme","name"]),pt=ct,ht=makeStyles$1(tt,_extends$a({defaultTheme:ot,Component:rt,name:ct||rt.displayName,classNamePrefix:pt},ft)),mt=Wt.forwardRef(function(vt,Tt){vt.classes;var Et=vt.innerRef,xt=_objectWithoutProperties$3(vt,["classes","innerRef"]),At=ht(_extends$a({},rt.defaultProps,vt)),Ct,$t=xt;return(typeof ct=="string"||ut)&&(Ct=useTheme$1()||ot,ct&&($t=getThemeProps({theme:Ct,name:ct,props:xt})),ut&&!$t.theme&&($t.theme=Ct)),Wt.createElement(rt,_extends$a({ref:Et||Tt,classes:At},$t))});return hoistNonReactStatics_cjs(mt,rt),mt}};const withStylesWithoutDefault=withStyles$1;function clamp$3(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(tt,et),nt)}function hexToRgb(et){et=et.substr(1);var tt=new RegExp(".{1,".concat(et.length>=6?2:1,"}"),"g"),nt=et.match(tt);return nt&&nt[0].length===1&&(nt=nt.map(function(rt){return rt+rt})),nt?"rgb".concat(nt.length===4?"a":"","(").concat(nt.map(function(rt,ot){return ot<3?parseInt(rt,16):Math.round(parseInt(rt,16)/255*1e3)/1e3}).join(", "),")"):""}function hslToRgb(et){et=decomposeColor(et);var tt=et,nt=tt.values,rt=nt[0],ot=nt[1]/100,st=nt[2]/100,ut=ot*Math.min(st,1-st),ct=function(mt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(mt+rt/30)%12;return st-ut*Math.max(Math.min(yt-3,9-yt,1),-1)},ft="rgb",pt=[Math.round(ct(0)*255),Math.round(ct(8)*255),Math.round(ct(4)*255)];return et.type==="hsla"&&(ft+="a",pt.push(nt[3])),recomposeColor({type:ft,values:pt})}function decomposeColor(et){if(et.type)return et;if(et.charAt(0)==="#")return decomposeColor(hexToRgb(et));var tt=et.indexOf("("),nt=et.substring(0,tt);if(["rgb","rgba","hsl","hsla"].indexOf(nt)===-1)throw new Error(formatMuiErrorMessage(3,et));var rt=et.substring(tt+1,et.length-1).split(",");return rt=rt.map(function(ot){return parseFloat(ot)}),{type:nt,values:rt}}function recomposeColor(et){var tt=et.type,nt=et.values;return tt.indexOf("rgb")!==-1?nt=nt.map(function(rt,ot){return ot<3?parseInt(rt,10):rt}):tt.indexOf("hsl")!==-1&&(nt[1]="".concat(nt[1],"%"),nt[2]="".concat(nt[2],"%")),"".concat(tt,"(").concat(nt.join(", "),")")}function getContrastRatio(et,tt){var nt=getLuminance(et),rt=getLuminance(tt);return(Math.max(nt,rt)+.05)/(Math.min(nt,rt)+.05)}function getLuminance(et){et=decomposeColor(et);var tt=et.type==="hsl"?decomposeColor(hslToRgb(et)).values:et.values;return tt=tt.map(function(nt){return nt/=255,nt<=.03928?nt/12.92:Math.pow((nt+.055)/1.055,2.4)}),Number((.2126*tt[0]+.7152*tt[1]+.0722*tt[2]).toFixed(3))}function emphasize(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.15;return getLuminance(et)>.5?darken(et,tt):lighten(et,tt)}function alpha(et,tt){return et=decomposeColor(et),tt=clamp$3(tt),(et.type==="rgb"||et.type==="hsl")&&(et.type+="a"),et.values[3]=tt,recomposeColor(et)}function darken(et,tt){if(et=decomposeColor(et),tt=clamp$3(tt),et.type.indexOf("hsl")!==-1)et.values[2]*=1-tt;else if(et.type.indexOf("rgb")!==-1)for(var nt=0;nt<3;nt+=1)et.values[nt]*=1-tt;return recomposeColor(et)}function lighten(et,tt){if(et=decomposeColor(et),tt=clamp$3(tt),et.type.indexOf("hsl")!==-1)et.values[2]+=(100-et.values[2])*tt;else if(et.type.indexOf("rgb")!==-1)for(var nt=0;nt<3;nt+=1)et.values[nt]+=(255-et.values[nt])*tt;return recomposeColor(et)}var keys=["xs","sm","md","lg","xl"];function createBreakpoints(et){var tt=et.values,nt=tt===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:tt,rt=et.unit,ot=rt===void 0?"px":rt,st=et.step,ut=st===void 0?5:st,ct=_objectWithoutProperties$3(et,["values","unit","step"]);function ft(vt){var Tt=typeof nt[vt]=="number"?nt[vt]:vt;return"@media (min-width:".concat(Tt).concat(ot,")")}function pt(vt){var Tt=keys.indexOf(vt)+1,Et=nt[keys[Tt]];if(Tt===keys.length)return ft("xs");var xt=typeof Et=="number"&&Tt>0?Et:vt;return"@media (max-width:".concat(xt-ut/100).concat(ot,")")}function ht(vt,Tt){var Et=keys.indexOf(Tt);return Et===keys.length-1?ft(vt):"@media (min-width:".concat(typeof nt[vt]=="number"?nt[vt]:vt).concat(ot,") and ")+"(max-width:".concat((Et!==-1&&typeof nt[keys[Et+1]]=="number"?nt[keys[Et+1]]:Tt)-ut/100).concat(ot,")")}function mt(vt){return ht(vt,vt)}function yt(vt){return nt[vt]}return _extends$a({keys,values:nt,up:ft,down:pt,between:ht,only:mt,width:yt},ct)}function createMixins(et,tt,nt){var rt;return _extends$a({gutters:function(){var st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:",`
      paddingLeft: theme.spacing(2),
      paddingRight: theme.spacing(2),
      [theme.breakpoints.up('sm')]: {
        paddingLeft: theme.spacing(3),
        paddingRight: theme.spacing(3),
      },
      `].join(`
`)),_extends$a({paddingLeft:tt(2),paddingRight:tt(2)},st,_defineProperty$d({},et.up("sm"),_extends$a({paddingLeft:tt(3),paddingRight:tt(3)},st[et.up("sm")])))},toolbar:(rt={minHeight:56},_defineProperty$d(rt,"".concat(et.up("xs")," and (orientation: landscape)"),{minHeight:48}),_defineProperty$d(rt,et.up("sm"),{minHeight:64}),rt)},nt)}var light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$1.white,default:grey$1[50]},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}},dark={text:{primary:common$1.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:grey$1[800],default:"#303030"},action:{active:common$1.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 addLightOrDark(et,tt,nt,rt){var ot=rt.light||rt,st=rt.dark||rt*1.5;et[tt]||(et.hasOwnProperty(nt)?et[tt]=et[nt]:tt==="light"?et.light=lighten(et.main,ot):tt==="dark"&&(et.dark=darken(et.main,st)))}function createPalette(et){var tt=et.primary,nt=tt===void 0?{light:indigo$1[300],main:indigo$1[500],dark:indigo$1[700]}:tt,rt=et.secondary,ot=rt===void 0?{light:pink$1.A200,main:pink$1.A400,dark:pink$1.A700}:rt,st=et.error,ut=st===void 0?{light:red$1[300],main:red$1[500],dark:red$1[700]}:st,ct=et.warning,ft=ct===void 0?{light:orange$1[300],main:orange$1[500],dark:orange$1[700]}:ct,pt=et.info,ht=pt===void 0?{light:blue$1[300],main:blue$1[500],dark:blue$1[700]}:pt,mt=et.success,yt=mt===void 0?{light:green$1[300],main:green$1[500],dark:green$1[700]}:mt,vt=et.type,Tt=vt===void 0?"light":vt,Et=et.contrastThreshold,xt=Et===void 0?3:Et,At=et.tonalOffset,Ct=At===void 0?.2:At,$t=_objectWithoutProperties$3(et,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function Ot(Mt){var Ft=getContrastRatio(Mt,dark.text.primary)>=xt?dark.text.primary:light.text.primary;return Ft}var Rt=function(Ft){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,Vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,Zt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(Ft=_extends$a({},Ft),!Ft.main&&Ft[zt]&&(Ft.main=Ft[zt]),!Ft.main)throw new Error(formatMuiErrorMessage(4,zt));if(typeof Ft.main!="string")throw new Error(formatMuiErrorMessage(5,JSON.stringify(Ft.main)));return addLightOrDark(Ft,"light",Vt,Ct),addLightOrDark(Ft,"dark",Zt,Ct),Ft.contrastText||(Ft.contrastText=Ot(Ft.main)),Ft},It={dark,light},kt=deepmerge(_extends$a({common:common$1,type:Tt,primary:Rt(nt),secondary:Rt(ot,"A400","A200","A700"),error:Rt(ut),warning:Rt(ft),info:Rt(ht),success:Rt(yt),grey:grey$1,contrastThreshold:xt,getContrastText:Ot,augmentColor:Rt,tonalOffset:Ct},It[Tt]),$t);return kt}function round$1(et){return Math.round(et*1e5)/1e5}function roundWithDeprecationWarning(et){return round$1(et)}var caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(et,tt){var nt=typeof tt=="function"?tt(et):tt,rt=nt.fontFamily,ot=rt===void 0?defaultFontFamily:rt,st=nt.fontSize,ut=st===void 0?14:st,ct=nt.fontWeightLight,ft=ct===void 0?300:ct,pt=nt.fontWeightRegular,ht=pt===void 0?400:pt,mt=nt.fontWeightMedium,yt=mt===void 0?500:mt,vt=nt.fontWeightBold,Tt=vt===void 0?700:vt,Et=nt.htmlFontSize,xt=Et===void 0?16:Et,At=nt.allVariants,Ct=nt.pxToRem,$t=_objectWithoutProperties$3(nt,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),Ot=ut/14,Rt=Ct||function(Mt){return"".concat(Mt/xt*Ot,"rem")},It=function(Ft,zt,Vt,Zt,Ut){return _extends$a({fontFamily:ot,fontWeight:Ft,fontSize:Rt(zt),lineHeight:Vt},ot===defaultFontFamily?{letterSpacing:"".concat(round$1(Zt/zt),"em")}:{},Ut,At)},kt={h1:It(ft,96,1.167,-1.5),h2:It(ft,60,1.2,-.5),h3:It(ht,48,1.167,0),h4:It(ht,34,1.235,.25),h5:It(ht,24,1.334,0),h6:It(yt,20,1.6,.15),subtitle1:It(ht,16,1.75,.15),subtitle2:It(yt,14,1.57,.1),body1:It(ht,16,1.5,.15),body2:It(ht,14,1.43,.15),button:It(yt,14,1.75,.4,caseAllCaps),caption:It(ht,12,1.66,.4),overline:It(ht,12,2.66,1,caseAllCaps)};return deepmerge(_extends$a({htmlFontSize:xt,pxToRem:Rt,round:roundWithDeprecationWarning,fontFamily:ot,fontSize:ut,fontWeightLight:ft,fontWeightRegular:ht,fontWeightMedium:yt,fontWeightBold:Tt},kt),$t,{clone:!1})}var shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(shadowKeyUmbraOpacity,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(shadowKeyPenumbraOpacity,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(shadowAmbientShadowOpacity,")")].join(",")}var shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)];const shadows$1=shadows;var shape={borderRadius:4};const shape$1=shape;function createSpacing(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(et.mui)return et;var tt=createUnarySpacing({spacing:et}),nt=function(){for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return st.length===0?tt(1):st.length===1?tt(st[0]):st.map(function(ct){if(typeof ct=="string")return ct;var ft=tt(ct);return typeof ft=="number"?"".concat(ft,"px"):ft}).join(" ")};return Object.defineProperty(nt,"unit",{get:function(){return et}}),nt.mui=!0,nt}var easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(et){return"".concat(Math.round(et),"ms")}const transitions={easing,duration,create:function et(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["all"],nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rt=nt.duration,ot=rt===void 0?duration.standard:rt,st=nt.easing,ut=st===void 0?easing.easeInOut:st,ct=nt.delay,ft=ct===void 0?0:ct;return _objectWithoutProperties$3(nt,["duration","easing","delay"]),(Array.isArray(tt)?tt:[tt]).map(function(pt){return"".concat(pt," ").concat(typeof ot=="string"?ot:formatMs(ot)," ").concat(ut," ").concat(typeof ft=="string"?ft:formatMs(ft))}).join(",")},getAutoHeightDuration:function et(tt){if(!tt)return 0;var nt=tt/36;return Math.round((4+15*Math.pow(nt,.25)+nt/5)*10)}};var zIndex={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const zIndex$1=zIndex;function createTheme(){for(var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},tt=et.breakpoints,nt=tt===void 0?{}:tt,rt=et.mixins,ot=rt===void 0?{}:rt,st=et.palette,ut=st===void 0?{}:st,ct=et.spacing,ft=et.typography,pt=ft===void 0?{}:ft,ht=_objectWithoutProperties$3(et,["breakpoints","mixins","palette","spacing","typography"]),mt=createPalette(ut),yt=createBreakpoints(nt),vt=createSpacing(ct),Tt=deepmerge({breakpoints:yt,direction:"ltr",mixins:createMixins(yt,vt,ot),overrides:{},palette:mt,props:{},shadows:shadows$1,typography:createTypography(mt,pt),spacing:vt,shape:shape$1,transitions,zIndex:zIndex$1},ht),Et=arguments.length,xt=new Array(Et>1?Et-1:0),At=1;At<Et;At++)xt[At-1]=arguments[At];return Tt=xt.reduce(function(Ct,$t){return deepmerge(Ct,$t)},Tt),Tt}var defaultTheme=createTheme();const defaultTheme$1=defaultTheme;function makeStyles(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return makeStyles$1(et,_extends$a({defaultTheme:defaultTheme$1},tt))}function useTheme(){var et=useTheme$1()||defaultTheme$1;return et}function withStyles(et,tt){return withStylesWithoutDefault(et,_extends$a({defaultTheme:defaultTheme$1},tt))}var bodyScrollLock_min={};(function(et){(function(tt,nt){nt(et)})(commonjsGlobal$1,function(tt){function nt(Tt){if(Array.isArray(Tt)){for(var Et=0,xt=Array(Tt.length);Et<Tt.length;Et++)xt[Et]=Tt[Et];return xt}return Array.from(Tt)}Object.defineProperty(tt,"__esModule",{value:!0});var rt=!1;if(typeof window<"u"){var ot={get passive(){rt=!0}};window.addEventListener("testPassive",null,ot),window.removeEventListener("testPassive",null,ot)}function st(Tt){return pt.some(function(Et){return!(!Et.options.allowTouchMove||!Et.options.allowTouchMove(Tt))})}function ut(Tt){var Et=Tt||window.event;return!!st(Et.target)||1<Et.touches.length||(Et.preventDefault&&Et.preventDefault(),!1)}function ct(){setTimeout(function(){vt!==void 0&&(document.body.style.paddingRight=vt,vt=void 0),yt!==void 0&&(document.body.style.overflow=yt,yt=void 0)})}var ft=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&1<window.navigator.maxTouchPoints),pt=[],ht=!1,mt=-1,yt=void 0,vt=void 0;tt.disableBodyScroll=function(Tt,Et){if(ft){if(!Tt)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(Tt&&!pt.some(function($t){return $t.targetElement===Tt})){var xt={targetElement:Tt,options:Et||{}};pt=[].concat(nt(pt),[xt]),Tt.ontouchstart=function($t){$t.targetTouches.length===1&&(mt=$t.targetTouches[0].clientY)},Tt.ontouchmove=function($t){var Ot,Rt,It,kt;$t.targetTouches.length===1&&(Rt=Tt,kt=(Ot=$t).targetTouches[0].clientY-mt,st(Ot.target)||(Rt&&Rt.scrollTop===0&&0<kt||(It=Rt)&&It.scrollHeight-It.scrollTop<=It.clientHeight&&kt<0?ut(Ot):Ot.stopPropagation()))},ht||(document.addEventListener("touchmove",ut,rt?{passive:!1}:void 0),ht=!0)}}else{Ct=Et,setTimeout(function(){if(vt===void 0){var $t=!!Ct&&Ct.reserveScrollBarGap===!0,Ot=window.innerWidth-document.documentElement.clientWidth;$t&&0<Ot&&(vt=document.body.style.paddingRight,document.body.style.paddingRight=Ot+"px")}yt===void 0&&(yt=document.body.style.overflow,document.body.style.overflow="hidden")});var At={targetElement:Tt,options:Et||{}};pt=[].concat(nt(pt),[At])}var Ct},tt.clearAllBodyScrollLocks=function(){ft?(pt.forEach(function(Tt){Tt.targetElement.ontouchstart=null,Tt.targetElement.ontouchmove=null}),ht&&(document.removeEventListener("touchmove",ut,rt?{passive:!1}:void 0),ht=!1),pt=[],mt=-1):(ct(),pt=[])},tt.enableBodyScroll=function(Tt){if(ft){if(!Tt)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");Tt.ontouchstart=null,Tt.ontouchmove=null,pt=pt.filter(function(Et){return Et.targetElement!==Tt}),ht&&pt.length===0&&(document.removeEventListener("touchmove",ut,rt?{passive:!1}:void 0),ht=!1)}else(pt=pt.filter(function(Et){return Et.targetElement!==Tt})).length||ct()}})})(bodyScrollLock_min);var match$1={exports:{}};(function(et,tt){(function(nt,rt){et.exports=rt()})(commonjsGlobal$1,()=>{return nt={772:(ot,st,ut)=>{const ct=ut(826).remove,ft=/[.*+?^${}()|[\]\\]/g,pt=/[a-z0-9_]/i,ht=/\s+/;ot.exports=function(mt,yt,vt){var Tt,Et;Et={insideWords:!1,findAllOccurrences:!1,requireMatchAll:!1},Tt=(Tt=vt)||{},Object.keys(Tt).forEach(Ct=>{Et[Ct]=!!Tt[Ct]}),vt=Et;const xt=Array.from(mt).map(Ct=>ct(Ct));let At=xt.join("");return(yt=ct(yt)).trim().split(ht).filter(Ct=>Ct.length>0).reduce((Ct,$t)=>{const Ot=$t.length,Rt=!vt.insideWords&&pt.test($t[0])?"\\b":"",It=new RegExp(Rt+$t.replace(ft,"\\$&"),"i");let kt,Mt;if(kt=It.exec(At),vt.requireMatchAll&&kt===null)return At="",[];for(;kt;){Mt=kt.index;const Ft=Ot-xt.slice(Mt,Mt+Ot).join("").length,zt=Mt-xt.slice(0,Mt).join("").length,Vt=[Mt+zt,Mt+Ot+zt+Ft];if(Vt[0]!==Vt[1]&&Ct.push(Vt),At=At.slice(0,Mt)+new Array(Ot+1).join(" ")+At.slice(Mt+Ot),!vt.findAllOccurrences)break;kt=It.exec(At)}return Ct},[]).sort((Ct,$t)=>Ct[0]-$t[0])}},826:ot=>{var st={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z"},ut=Object.keys(st).join("|"),ct=new RegExp(ut,"g"),ft=new RegExp(ut,""),pt=function(ht){return ht.replace(ct,function(mt){return st[mt]})};ot.exports=pt,ot.exports.has=function(ht){return!!ht.match(ft)},ot.exports.remove=pt}},rt={},function ot(st){var ut=rt[st];if(ut!==void 0)return ut.exports;var ct=rt[st]={exports:{}};return nt[st](ct,ct.exports,ot),ct.exports}(772);var nt,rt})})(match$1);const match=match$1.exports;var parse$2={exports:{}};(function(et,tt){(function(nt,rt){et.exports=rt()})(commonjsGlobal$1,()=>{return nt={705:ot=>{ot.exports=function(st,ut){const ct=[];return ut.length===0?ct.push({text:st,highlight:!1}):ut[0][0]>0&&ct.push({text:st.slice(0,ut[0][0]),highlight:!1}),ut.forEach((ft,pt)=>{const ht=ft[0],mt=ft[1];ct.push({text:st.slice(ht,mt),highlight:!0}),pt===ut.length-1?mt<st.length&&ct.push({text:st.slice(mt,st.length),highlight:!1}):mt<ut[pt+1][0]&&ct.push({text:st.slice(mt,ut[pt+1][0]),highlight:!1})}),ct}}},rt={},function ot(st){var ut=rt[st];if(ut!==void 0)return ut.exports;var ct=rt[st]={exports:{}};return nt[st](ct,ct.exports,ot),ct.exports}(705);var nt,rt})})(parse$2);const parse$1=parse$2.exports;var styles$H=function et(tt){var nt={};return tt.shadows.forEach(function(rt,ot){nt["elevation".concat(ot)]={boxShadow:rt}}),_extends$a({root:{backgroundColor:tt.palette.background.paper,color:tt.palette.text.primary,transition:tt.transitions.create("box-shadow")},rounded:{borderRadius:tt.shape.borderRadius},outlined:{border:"1px solid ".concat(tt.palette.divider)}},nt)},Paper=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.component,ut=st===void 0?"div":st,ct=tt.square,ft=ct===void 0?!1:ct,pt=tt.elevation,ht=pt===void 0?1:pt,mt=tt.variant,yt=mt===void 0?"elevation":mt,vt=_objectWithoutProperties$3(tt,["classes","className","component","square","elevation","variant"]);return react.exports.createElement(ut,_extends$a({className:clsx(rt.root,ot,yt==="outlined"?rt.outlined:rt["elevation".concat(ht)],!ft&&rt.rounded),ref:nt},vt))});const Paper$1=withStyles(styles$H,{name:"MuiPaper"})(Paper);function capitalize(et){if(typeof et!="string")throw new Error(formatMuiErrorMessage(7));return et.charAt(0).toUpperCase()+et.slice(1)}function createChainedFunction(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];return tt.reduce(function(rt,ot){return ot==null?rt:function(){for(var ut=arguments.length,ct=new Array(ut),ft=0;ft<ut;ft++)ct[ft]=arguments[ft];rt.apply(this,ct),ot.apply(this,ct)}},function(){})}var styles$G=function et(tt){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:tt.typography.pxToRem(24),transition:tt.transitions.create("fill",{duration:tt.transitions.duration.shorter})},colorPrimary:{color:tt.palette.primary.main},colorSecondary:{color:tt.palette.secondary.main},colorAction:{color:tt.palette.action.active},colorError:{color:tt.palette.error.main},colorDisabled:{color:tt.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:tt.typography.pxToRem(20)},fontSizeLarge:{fontSize:tt.typography.pxToRem(35)}}},SvgIcon=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.className,ut=tt.color,ct=ut===void 0?"inherit":ut,ft=tt.component,pt=ft===void 0?"svg":ft,ht=tt.fontSize,mt=ht===void 0?"medium":ht,yt=tt.htmlColor,vt=tt.titleAccess,Tt=tt.viewBox,Et=Tt===void 0?"0 0 24 24":Tt,xt=_objectWithoutProperties$3(tt,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return react.exports.createElement(pt,_extends$a({className:clsx(ot.root,st,ct!=="inherit"&&ot["color".concat(capitalize(ct))],mt!=="default"&&mt!=="medium"&&ot["fontSize".concat(capitalize(mt))]),focusable:"false",viewBox:Et,color:yt,"aria-hidden":vt?void 0:!0,role:vt?"img":void 0,ref:nt},xt),rt,vt?react.exports.createElement("title",null,vt):null)});SvgIcon.muiName="SvgIcon";const SvgIcon$1=withStyles(styles$G,{name:"MuiSvgIcon"})(SvgIcon);function createSvgIcon(et,tt){var nt=function(ot,st){return Wt.createElement(SvgIcon$1,_extends$a({ref:st},ot),et)};return nt.muiName=SvgIcon$1.muiName,Wt.memo(Wt.forwardRef(nt))}function debounce$2(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:166,nt;function rt(){for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];var ct=this,ft=function(){et.apply(ct,st)};clearTimeout(nt),nt=setTimeout(ft,tt)}return rt.clear=function(){clearTimeout(nt)},rt}function isMuiElement(et,tt){return react.exports.isValidElement(et)&&tt.indexOf(et.type.muiName)!==-1}function ownerDocument(et){return et&&et.ownerDocument||document}function ownerWindow(et){var tt=ownerDocument(et);return tt.defaultView||window}function setRef(et,tt){typeof et=="function"?et(tt):et&&(et.current=tt)}function useControlled(et){var tt=et.controlled,nt=et.default;et.name,et.state;var rt=react.exports.useRef(tt!==void 0),ot=rt.current,st=react.exports.useState(nt),ut=st[0],ct=st[1],ft=ot?tt:ut,pt=react.exports.useCallback(function(ht){ot||ct(ht)},[]);return[ft,pt]}var useEnhancedEffect$7=typeof window<"u"?react.exports.useLayoutEffect:react.exports.useEffect;function useEventCallback(et){var tt=react.exports.useRef(et);return useEnhancedEffect$7(function(){tt.current=et}),react.exports.useCallback(function(){return tt.current.apply(void 0,arguments)},[])}function useForkRef(et,tt){return react.exports.useMemo(function(){return et==null&&tt==null?null:function(nt){setRef(et,nt),setRef(tt,nt)}},[et,tt])}function useId$1(et){var tt=react.exports.useState(et),nt=tt[0],rt=tt[1],ot=et||nt;return react.exports.useEffect(function(){nt==null&&rt("mui-".concat(Math.round(Math.random()*1e5)))},[nt]),ot}var hadKeyboardEvent=!0,hadFocusVisibleRecently=!1,hadFocusVisibleRecentlyTimeout=null,inputTypesWhitelist={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 focusTriggersKeyboardModality(et){var tt=et.type,nt=et.tagName;return!!(nt==="INPUT"&&inputTypesWhitelist[tt]&&!et.readOnly||nt==="TEXTAREA"&&!et.readOnly||et.isContentEditable)}function handleKeyDown(et){et.metaKey||et.altKey||et.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState==="hidden"&&hadFocusVisibleRecently&&(hadKeyboardEvent=!0)}function prepare(et){et.addEventListener("keydown",handleKeyDown,!0),et.addEventListener("mousedown",handlePointerDown,!0),et.addEventListener("pointerdown",handlePointerDown,!0),et.addEventListener("touchstart",handlePointerDown,!0),et.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(et){var tt=et.target;try{return tt.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(tt)}function handleBlurVisible(){hadFocusVisibleRecently=!0,window.clearTimeout(hadFocusVisibleRecentlyTimeout),hadFocusVisibleRecentlyTimeout=window.setTimeout(function(){hadFocusVisibleRecently=!1},100)}function useIsFocusVisible(){var et=react.exports.useCallback(function(tt){var nt=reactDom.exports.findDOMNode(tt);nt!=null&&prepare(nt.ownerDocument)},[]);return{isFocusVisible,onBlurVisible:handleBlurVisible,ref:et}}const CloseIcon=createSvgIcon(react.exports.createElement("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"})),config={disabled:!1},TransitionGroupContext=Wt.createContext(null);var forceReflow=function et(tt){return tt.scrollTop},UNMOUNTED$1="unmounted",EXITED$1="exited",ENTERING$1="entering",ENTERED$1="entered",EXITING$1="exiting",Transition$2=function(et){_inheritsLoose$5(tt,et);function tt(rt,ot){var st;st=et.call(this,rt,ot)||this;var ut=ot,ct=ut&&!ut.isMounting?rt.enter:rt.appear,ft;return st.appearStatus=null,rt.in?ct?(ft=EXITED$1,st.appearStatus=ENTERING$1):ft=ENTERED$1:rt.unmountOnExit||rt.mountOnEnter?ft=UNMOUNTED$1:ft=EXITED$1,st.state={status:ft},st.nextCallback=null,st}tt.getDerivedStateFromProps=function(ot,st){var ut=ot.in;return ut&&st.status===UNMOUNTED$1?{status:EXITED$1}:null};var nt=tt.prototype;return nt.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},nt.componentDidUpdate=function(ot){var st=null;if(ot!==this.props){var ut=this.state.status;this.props.in?ut!==ENTERING$1&&ut!==ENTERED$1&&(st=ENTERING$1):(ut===ENTERING$1||ut===ENTERED$1)&&(st=EXITING$1)}this.updateStatus(!1,st)},nt.componentWillUnmount=function(){this.cancelNextCallback()},nt.getTimeouts=function(){var ot=this.props.timeout,st,ut,ct;return st=ut=ct=ot,ot!=null&&typeof ot!="number"&&(st=ot.exit,ut=ot.enter,ct=ot.appear!==void 0?ot.appear:ut),{exit:st,enter:ut,appear:ct}},nt.updateStatus=function(ot,st){if(ot===void 0&&(ot=!1),st!==null)if(this.cancelNextCallback(),st===ENTERING$1){if(this.props.unmountOnExit||this.props.mountOnEnter){var ut=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);ut&&forceReflow(ut)}this.performEnter(ot)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED$1&&this.setState({status:UNMOUNTED$1})},nt.performEnter=function(ot){var st=this,ut=this.props.enter,ct=this.context?this.context.isMounting:ot,ft=this.props.nodeRef?[ct]:[ReactDOM.findDOMNode(this),ct],pt=ft[0],ht=ft[1],mt=this.getTimeouts(),yt=ct?mt.appear:mt.enter;if(!ot&&!ut||config.disabled){this.safeSetState({status:ENTERED$1},function(){st.props.onEntered(pt)});return}this.props.onEnter(pt,ht),this.safeSetState({status:ENTERING$1},function(){st.props.onEntering(pt,ht),st.onTransitionEnd(yt,function(){st.safeSetState({status:ENTERED$1},function(){st.props.onEntered(pt,ht)})})})},nt.performExit=function(){var ot=this,st=this.props.exit,ut=this.getTimeouts(),ct=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!st||config.disabled){this.safeSetState({status:EXITED$1},function(){ot.props.onExited(ct)});return}this.props.onExit(ct),this.safeSetState({status:EXITING$1},function(){ot.props.onExiting(ct),ot.onTransitionEnd(ut.exit,function(){ot.safeSetState({status:EXITED$1},function(){ot.props.onExited(ct)})})})},nt.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},nt.safeSetState=function(ot,st){st=this.setNextCallback(st),this.setState(ot,st)},nt.setNextCallback=function(ot){var st=this,ut=!0;return this.nextCallback=function(ct){ut&&(ut=!1,st.nextCallback=null,ot(ct))},this.nextCallback.cancel=function(){ut=!1},this.nextCallback},nt.onTransitionEnd=function(ot,st){this.setNextCallback(st);var ut=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),ct=ot==null&&!this.props.addEndListener;if(!ut||ct){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var ft=this.props.nodeRef?[this.nextCallback]:[ut,this.nextCallback],pt=ft[0],ht=ft[1];this.props.addEndListener(pt,ht)}ot!=null&&setTimeout(this.nextCallback,ot)},nt.render=function(){var ot=this.state.status;if(ot===UNMOUNTED$1)return null;var st=this.props,ut=st.children;st.in,st.mountOnEnter,st.unmountOnExit,st.appear,st.enter,st.exit,st.timeout,st.addEndListener,st.onEnter,st.onEntering,st.onEntered,st.onExit,st.onExiting,st.onExited,st.nodeRef;var ct=_objectWithoutPropertiesLoose$7(st,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Wt.createElement(TransitionGroupContext.Provider,{value:null},typeof ut=="function"?ut(ot,ct):Wt.cloneElement(Wt.Children.only(ut),ct))},tt}(Wt.Component);Transition$2.contextType=TransitionGroupContext;Transition$2.propTypes={};function noop$7(){}Transition$2.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$7,onEntering:noop$7,onEntered:noop$7,onExit:noop$7,onExiting:noop$7,onExited:noop$7};Transition$2.UNMOUNTED=UNMOUNTED$1;Transition$2.EXITED=EXITED$1;Transition$2.ENTERING=ENTERING$1;Transition$2.ENTERED=ENTERED$1;Transition$2.EXITING=EXITING$1;const Transition$3=Transition$2;function getChildMapping$1(et,tt){var nt=function(st){return tt&&react.exports.isValidElement(st)?tt(st):st},rt=Object.create(null);return et&&react.exports.Children.map(et,function(ot){return ot}).forEach(function(ot){rt[ot.key]=nt(ot)}),rt}function mergeChildMappings$1(et,tt){et=et||{},tt=tt||{};function nt(ht){return ht in tt?tt[ht]:et[ht]}var rt=Object.create(null),ot=[];for(var st in et)st in tt?ot.length&&(rt[st]=ot,ot=[]):ot.push(st);var ut,ct={};for(var ft in tt){if(rt[ft])for(ut=0;ut<rt[ft].length;ut++){var pt=rt[ft][ut];ct[rt[ft][ut]]=nt(pt)}ct[ft]=nt(ft)}for(ut=0;ut<ot.length;ut++)ct[ot[ut]]=nt(ot[ut]);return ct}function getProp$1(et,tt,nt){return nt[tt]!=null?nt[tt]:et.props[tt]}function getInitialChildMapping$1(et,tt){return getChildMapping$1(et.children,function(nt){return react.exports.cloneElement(nt,{onExited:tt.bind(null,nt),in:!0,appear:getProp$1(nt,"appear",et),enter:getProp$1(nt,"enter",et),exit:getProp$1(nt,"exit",et)})})}function getNextChildMapping$1(et,tt,nt){var rt=getChildMapping$1(et.children),ot=mergeChildMappings$1(tt,rt);return Object.keys(ot).forEach(function(st){var ut=ot[st];if(!!react.exports.isValidElement(ut)){var ct=st in tt,ft=st in rt,pt=tt[st],ht=react.exports.isValidElement(pt)&&!pt.props.in;ft&&(!ct||ht)?ot[st]=react.exports.cloneElement(ut,{onExited:nt.bind(null,ut),in:!0,exit:getProp$1(ut,"exit",et),enter:getProp$1(ut,"enter",et)}):!ft&&ct&&!ht?ot[st]=react.exports.cloneElement(ut,{in:!1}):ft&&ct&&react.exports.isValidElement(pt)&&(ot[st]=react.exports.cloneElement(ut,{onExited:nt.bind(null,ut),in:pt.props.in,exit:getProp$1(ut,"exit",et),enter:getProp$1(ut,"enter",et)}))}}),ot}var values=Object.values||function(et){return Object.keys(et).map(function(tt){return et[tt]})},defaultProps={component:"div",childFactory:function et(tt){return tt}},TransitionGroup$1=function(et){_inheritsLoose$5(tt,et);function tt(rt,ot){var st;st=et.call(this,rt,ot)||this;var ut=st.handleExited.bind(_assertThisInitialized$2(st));return st.state={contextValue:{isMounting:!0},handleExited:ut,firstRender:!0},st}var nt=tt.prototype;return nt.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},nt.componentWillUnmount=function(){this.mounted=!1},tt.getDerivedStateFromProps=function(ot,st){var ut=st.children,ct=st.handleExited,ft=st.firstRender;return{children:ft?getInitialChildMapping$1(ot,ct):getNextChildMapping$1(ot,ut,ct),firstRender:!1}},nt.handleExited=function(ot,st){var ut=getChildMapping$1(this.props.children);ot.key in ut||(ot.props.onExited&&ot.props.onExited(st),this.mounted&&this.setState(function(ct){var ft=_extends$a({},ct.children);return delete ft[ot.key],{children:ft}}))},nt.render=function(){var ot=this.props,st=ot.component,ut=ot.childFactory,ct=_objectWithoutPropertiesLoose$7(ot,["component","childFactory"]),ft=this.state.contextValue,pt=values(this.state.children).map(ut);return delete ct.appear,delete ct.enter,delete ct.exit,st===null?Wt.createElement(TransitionGroupContext.Provider,{value:ft},pt):Wt.createElement(TransitionGroupContext.Provider,{value:ft},Wt.createElement(st,ct,pt))},tt}(Wt.Component);TransitionGroup$1.propTypes={};TransitionGroup$1.defaultProps=defaultProps;const TransitionGroup$2=TransitionGroup$1;var useEnhancedEffect$6=typeof window>"u"?react.exports.useEffect:react.exports.useLayoutEffect;function Ripple(et){var tt=et.classes,nt=et.pulsate,rt=nt===void 0?!1:nt,ot=et.rippleX,st=et.rippleY,ut=et.rippleSize,ct=et.in,ft=et.onExited,pt=ft===void 0?function(){}:ft,ht=et.timeout,mt=react.exports.useState(!1),yt=mt[0],vt=mt[1],Tt=clsx(tt.ripple,tt.rippleVisible,rt&&tt.ripplePulsate),Et={width:ut,height:ut,top:-(ut/2)+st,left:-(ut/2)+ot},xt=clsx(tt.child,yt&&tt.childLeaving,rt&&tt.childPulsate),At=useEventCallback(pt);return useEnhancedEffect$6(function(){if(!ct){vt(!0);var Ct=setTimeout(At,ht);return function(){clearTimeout(Ct)}}},[At,ct,ht]),react.exports.createElement("span",{className:Tt,style:Et},react.exports.createElement("span",{className:xt}))}var DURATION=550,DELAY_RIPPLE=80,styles$F=function et(tt){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(DURATION,"ms ").concat(tt.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(tt.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(DURATION,"ms ").concat(tt.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(tt.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},TouchRipple=react.exports.forwardRef(function et(tt,nt){var rt=tt.center,ot=rt===void 0?!1:rt,st=tt.classes,ut=tt.className,ct=_objectWithoutProperties$3(tt,["center","classes","className"]),ft=react.exports.useState([]),pt=ft[0],ht=ft[1],mt=react.exports.useRef(0),yt=react.exports.useRef(null);react.exports.useEffect(function(){yt.current&&(yt.current(),yt.current=null)},[pt]);var vt=react.exports.useRef(!1),Tt=react.exports.useRef(null),Et=react.exports.useRef(null),xt=react.exports.useRef(null);react.exports.useEffect(function(){return function(){clearTimeout(Tt.current)}},[]);var At=react.exports.useCallback(function(Rt){var It=Rt.pulsate,kt=Rt.rippleX,Mt=Rt.rippleY,Ft=Rt.rippleSize,zt=Rt.cb;ht(function(Vt){return[].concat(_toConsumableArray$1(Vt),[react.exports.createElement(Ripple,{key:mt.current,classes:st,timeout:DURATION,pulsate:It,rippleX:kt,rippleY:Mt,rippleSize:Ft})])}),mt.current+=1,yt.current=zt},[st]),Ct=react.exports.useCallback(function(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=arguments.length>2?arguments[2]:void 0,Mt=It.pulsate,Ft=Mt===void 0?!1:Mt,zt=It.center,Vt=zt===void 0?ot||It.pulsate:zt,Zt=It.fakeElement,Ut=Zt===void 0?!1:Zt;if(Rt.type==="mousedown"&&vt.current){vt.current=!1;return}Rt.type==="touchstart"&&(vt.current=!0);var Xt=Ut?null:xt.current,Jt=Xt?Xt.getBoundingClientRect():{width:0,height:0,left:0,top:0},gn,An,sn;if(Vt||Rt.clientX===0&&Rt.clientY===0||!Rt.clientX&&!Rt.touches)gn=Math.round(Jt.width/2),An=Math.round(Jt.height/2);else{var Sn=Rt.touches?Rt.touches[0]:Rt,In=Sn.clientX,_n=Sn.clientY;gn=Math.round(In-Jt.left),An=Math.round(_n-Jt.top)}if(Vt)sn=Math.sqrt((2*Math.pow(Jt.width,2)+Math.pow(Jt.height,2))/3),sn%2===0&&(sn+=1);else{var En=Math.max(Math.abs((Xt?Xt.clientWidth:0)-gn),gn)*2+2,Ln=Math.max(Math.abs((Xt?Xt.clientHeight:0)-An),An)*2+2;sn=Math.sqrt(Math.pow(En,2)+Math.pow(Ln,2))}Rt.touches?Et.current===null&&(Et.current=function(){At({pulsate:Ft,rippleX:gn,rippleY:An,rippleSize:sn,cb:kt})},Tt.current=setTimeout(function(){Et.current&&(Et.current(),Et.current=null)},DELAY_RIPPLE)):At({pulsate:Ft,rippleX:gn,rippleY:An,rippleSize:sn,cb:kt})},[ot,At]),$t=react.exports.useCallback(function(){Ct({},{pulsate:!0})},[Ct]),Ot=react.exports.useCallback(function(Rt,It){if(clearTimeout(Tt.current),Rt.type==="touchend"&&Et.current){Rt.persist(),Et.current(),Et.current=null,Tt.current=setTimeout(function(){Ot(Rt,It)});return}Et.current=null,ht(function(kt){return kt.length>0?kt.slice(1):kt}),yt.current=It},[]);return react.exports.useImperativeHandle(nt,function(){return{pulsate:$t,start:Ct,stop:Ot}},[$t,Ct,Ot]),react.exports.createElement("span",_extends$a({className:clsx(st.root,ut),ref:xt},ct),react.exports.createElement(TransitionGroup$2,{component:null,exit:!0},pt))});const TouchRipple$1=withStyles(styles$F,{flip:!1,name:"MuiTouchRipple"})(react.exports.memo(TouchRipple));var styles$E={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},ButtonBase=react.exports.forwardRef(function et(tt,nt){var rt=tt.action,ot=tt.buttonRef,st=tt.centerRipple,ut=st===void 0?!1:st,ct=tt.children,ft=tt.classes,pt=tt.className,ht=tt.component,mt=ht===void 0?"button":ht,yt=tt.disabled,vt=yt===void 0?!1:yt,Tt=tt.disableRipple,Et=Tt===void 0?!1:Tt,xt=tt.disableTouchRipple,At=xt===void 0?!1:xt,Ct=tt.focusRipple,$t=Ct===void 0?!1:Ct,Ot=tt.focusVisibleClassName,Rt=tt.onBlur,It=tt.onClick,kt=tt.onFocus,Mt=tt.onFocusVisible,Ft=tt.onKeyDown,zt=tt.onKeyUp,Vt=tt.onMouseDown,Zt=tt.onMouseLeave,Ut=tt.onMouseUp,Xt=tt.onTouchEnd,Jt=tt.onTouchMove,gn=tt.onTouchStart,An=tt.onDragLeave,sn=tt.tabIndex,Sn=sn===void 0?0:sn,In=tt.TouchRippleProps,_n=tt.type,En=_n===void 0?"button":_n,Ln=_objectWithoutProperties$3(tt,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),wn=react.exports.useRef(null);function Dn(){return reactDom.exports.findDOMNode(wn.current)}var $n=react.exports.useRef(null),Gn=react.exports.useState(!1),Jn=Gn[0],zn=Gn[1];vt&&Jn&&zn(!1);var Qn=useIsFocusVisible(),Bn=Qn.isFocusVisible,jn=Qn.onBlurVisible,Ar=Qn.ref;react.exports.useImperativeHandle(rt,function(){return{focusVisible:function(){zn(!0),wn.current.focus()}}},[]),react.exports.useEffect(function(){Jn&&$t&&!Et&&$n.current.pulsate()},[Et,$t,Jn]);function Er(Qo,Gs){var Es=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At;return useEventCallback(function(Il){Gs&&Gs(Il);var ws=Es;return!ws&&$n.current&&$n.current[Qo](Il),!0})}var Pr=Er("start",Vt),Nr=Er("stop",An),Ir=Er("stop",Ut),no=Er("stop",function(Qo){Jn&&Qo.preventDefault(),Zt&&Zt(Qo)}),ro=Er("start",gn),ao=Er("stop",Xt),Xr=Er("stop",Jt),Jr=Er("stop",function(Qo){Jn&&(jn(Qo),zn(!1)),Rt&&Rt(Qo)},!1),So=useEventCallback(function(Qo){wn.current||(wn.current=Qo.currentTarget),Bn(Qo)&&(zn(!0),Mt&&Mt(Qo)),kt&&kt(Qo)}),va=function(){var Gs=Dn();return mt&&mt!=="button"&&!(Gs.tagName==="A"&&Gs.href)},$o=react.exports.useRef(!1),Qr=useEventCallback(function(Qo){$t&&!$o.current&&Jn&&$n.current&&Qo.key===" "&&($o.current=!0,Qo.persist(),$n.current.stop(Qo,function(){$n.current.start(Qo)})),Qo.target===Qo.currentTarget&&va()&&Qo.key===" "&&Qo.preventDefault(),Ft&&Ft(Qo),Qo.target===Qo.currentTarget&&va()&&Qo.key==="Enter"&&!vt&&(Qo.preventDefault(),It&&It(Qo))}),jo=useEventCallback(function(Qo){$t&&Qo.key===" "&&$n.current&&Jn&&!Qo.defaultPrevented&&($o.current=!1,Qo.persist(),$n.current.stop(Qo,function(){$n.current.pulsate(Qo)})),zt&&zt(Qo),It&&Qo.target===Qo.currentTarget&&va()&&Qo.key===" "&&!Qo.defaultPrevented&&It(Qo)}),Bo=mt;Bo==="button"&&Ln.href&&(Bo="a");var ss={};Bo==="button"?(ss.type=En,ss.disabled=vt):((Bo!=="a"||!Ln.href)&&(ss.role="button"),ss["aria-disabled"]=vt);var Us=useForkRef(ot,nt),Eo=useForkRef(Ar,wn),Do=useForkRef(Us,Eo),bo=react.exports.useState(!1),Vo=bo[0],Ts=bo[1];react.exports.useEffect(function(){Ts(!0)},[]);var xs=Vo&&!Et&&!vt;return react.exports.createElement(Bo,_extends$a({className:clsx(ft.root,pt,Jn&&[ft.focusVisible,Ot],vt&&ft.disabled),onBlur:Jr,onClick:It,onFocus:So,onKeyDown:Qr,onKeyUp:jo,onMouseDown:Pr,onMouseLeave:no,onMouseUp:Ir,onDragLeave:Nr,onTouchEnd:ao,onTouchMove:Xr,onTouchStart:ro,ref:Do,tabIndex:vt?-1:Sn},ss,Ln),ct,xs?react.exports.createElement(TouchRipple$1,_extends$a({ref:$n,center:ut},In)):null)});const ButtonBase$1=withStyles(styles$E,{name:"MuiButtonBase"})(ButtonBase);var styles$D=function et(tt){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:tt.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:tt.palette.action.active,transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shortest}),"&:hover":{backgroundColor:alpha(tt.palette.action.active,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:tt.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:tt.palette.primary.main,"&:hover":{backgroundColor:alpha(tt.palette.primary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:tt.palette.secondary.main,"&:hover":{backgroundColor:alpha(tt.palette.secondary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:tt.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}},IconButton$2=react.exports.forwardRef(function et(tt,nt){var rt=tt.edge,ot=rt===void 0?!1:rt,st=tt.children,ut=tt.classes,ct=tt.className,ft=tt.color,pt=ft===void 0?"default":ft,ht=tt.disabled,mt=ht===void 0?!1:ht,yt=tt.disableFocusRipple,vt=yt===void 0?!1:yt,Tt=tt.size,Et=Tt===void 0?"medium":Tt,xt=_objectWithoutProperties$3(tt,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return react.exports.createElement(ButtonBase$1,_extends$a({className:clsx(ut.root,ct,pt!=="default"&&ut["color".concat(capitalize(pt))],mt&&ut.disabled,Et==="small"&&ut["size".concat(capitalize(Et))],{start:ut.edgeStart,end:ut.edgeEnd}[ot]),centerRipple:!0,focusRipple:!vt,disabled:mt,ref:nt},xt),react.exports.createElement("span",{className:ut.label},st))});const IconButton$1$1=withStyles(styles$D,{name:"MuiIconButton"})(IconButton$2);var reactIs={exports:{}},reactIs_production_min={};/** @license React v17.0.2
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;b=x("react.element"),c=x("react.portal"),d=x("react.fragment"),e=x("react.strict_mode"),f=x("react.profiler"),g=x("react.provider"),h=x("react.context"),k=x("react.forward_ref"),l=x("react.suspense"),m=x("react.suspense_list"),n=x("react.memo"),p=x("react.lazy"),q=x("react.block"),r=x("react.server.block"),u=x("react.fundamental"),v=x("react.debug_trace_mode"),w=x("react.legacy_hidden")}function y(et){if(typeof et=="object"&&et!==null){var tt=et.$$typeof;switch(tt){case b:switch(et=et.type,et){case d:case f:case e:case l:case m:return et;default:switch(et=et&&et.$$typeof,et){case h:case k:case p:case n:case g:return et;default:return tt}}case c:return tt}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return!1};reactIs_production_min.isConcurrentMode=function(){return!1};reactIs_production_min.isContextConsumer=function(et){return y(et)===h};reactIs_production_min.isContextProvider=function(et){return y(et)===g};reactIs_production_min.isElement=function(et){return typeof et=="object"&&et!==null&&et.$$typeof===b};reactIs_production_min.isForwardRef=function(et){return y(et)===k};reactIs_production_min.isFragment=function(et){return y(et)===d};reactIs_production_min.isLazy=function(et){return y(et)===p};reactIs_production_min.isMemo=function(et){return y(et)===n};reactIs_production_min.isPortal=function(et){return y(et)===c};reactIs_production_min.isProfiler=function(et){return y(et)===f};reactIs_production_min.isStrictMode=function(et){return y(et)===e};reactIs_production_min.isSuspense=function(et){return y(et)===l};reactIs_production_min.isValidElementType=function(et){return typeof et=="string"||typeof et=="function"||et===d||et===f||et===v||et===e||et===l||et===m||et===w||typeof et=="object"&&et!==null&&(et.$$typeof===p||et.$$typeof===n||et.$$typeof===g||et.$$typeof===h||et.$$typeof===k||et.$$typeof===u||et.$$typeof===q||et[0]===r)};reactIs_production_min.typeOf=y;(function(et){et.exports=reactIs_production_min})(reactIs);var reflow=function et(tt){return tt.scrollTop};function getTransitionProps(et,tt){var nt=et.timeout,rt=et.style,ot=rt===void 0?{}:rt;return{duration:ot.transitionDuration||typeof nt=="number"?nt:nt[tt.mode]||0,delay:ot.transitionDelay}}var styles$C=function et(tt){return{root:{margin:0},body2:tt.typography.body2,body1:tt.typography.body1,caption:tt.typography.caption,button:tt.typography.button,h1:tt.typography.h1,h2:tt.typography.h2,h3:tt.typography.h3,h4:tt.typography.h4,h5:tt.typography.h5,h6:tt.typography.h6,subtitle1:tt.typography.subtitle1,subtitle2:tt.typography.subtitle2,overline:tt.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:tt.palette.primary.main},colorSecondary:{color:tt.palette.secondary.main},colorTextPrimary:{color:tt.palette.text.primary},colorTextSecondary:{color:tt.palette.text.secondary},colorError:{color:tt.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},defaultVariantMapping={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Typography=react.exports.forwardRef(function et(tt,nt){var rt=tt.align,ot=rt===void 0?"inherit":rt,st=tt.classes,ut=tt.className,ct=tt.color,ft=ct===void 0?"initial":ct,pt=tt.component,ht=tt.display,mt=ht===void 0?"initial":ht,yt=tt.gutterBottom,vt=yt===void 0?!1:yt,Tt=tt.noWrap,Et=Tt===void 0?!1:Tt,xt=tt.paragraph,At=xt===void 0?!1:xt,Ct=tt.variant,$t=Ct===void 0?"body1":Ct,Ot=tt.variantMapping,Rt=Ot===void 0?defaultVariantMapping:Ot,It=_objectWithoutProperties$3(tt,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),kt=pt||(At?"p":Rt[$t]||defaultVariantMapping[$t])||"span";return react.exports.createElement(kt,_extends$a({className:clsx(st.root,ut,$t!=="inherit"&&st[$t],ft!=="initial"&&st["color".concat(capitalize(ft))],Et&&st.noWrap,vt&&st.gutterBottom,At&&st.paragraph,ot!=="inherit"&&st["align".concat(capitalize(ot))],mt!=="initial"&&st["display".concat(capitalize(mt))]),ref:nt},It))});const Typography$1=withStyles(styles$C,{name:"MuiTypography"})(Typography);var styles$B=function et(tt){return{root:_extends$a({},tt.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:tt.shape.borderRadius,color:tt.palette.text.primary,transition:tt.transitions.create(["background-color","box-shadow","border"],{duration:tt.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:alpha(tt.palette.text.primary,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:tt.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:tt.palette.primary.main,"&:hover":{backgroundColor:alpha(tt.palette.primary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:tt.palette.secondary.main,"&:hover":{backgroundColor:alpha(tt.palette.secondary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat(tt.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(tt.palette.action.disabledBackground)}},outlinedPrimary:{color:tt.palette.primary.main,border:"1px solid ".concat(alpha(tt.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(tt.palette.primary.main),backgroundColor:alpha(tt.palette.primary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:tt.palette.secondary.main,border:"1px solid ".concat(alpha(tt.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(tt.palette.secondary.main),backgroundColor:alpha(tt.palette.secondary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(tt.palette.action.disabled)}},contained:{color:tt.palette.getContrastText(tt.palette.grey[300]),backgroundColor:tt.palette.grey[300],boxShadow:tt.shadows[2],"&:hover":{backgroundColor:tt.palette.grey.A100,boxShadow:tt.shadows[4],"@media (hover: none)":{boxShadow:tt.shadows[2],backgroundColor:tt.palette.grey[300]},"&$disabled":{backgroundColor:tt.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:tt.shadows[6]},"&:active":{boxShadow:tt.shadows[8]},"&$disabled":{color:tt.palette.action.disabled,boxShadow:tt.shadows[0],backgroundColor:tt.palette.action.disabledBackground}},containedPrimary:{color:tt.palette.primary.contrastText,backgroundColor:tt.palette.primary.main,"&:hover":{backgroundColor:tt.palette.primary.dark,"@media (hover: none)":{backgroundColor:tt.palette.primary.main}}},containedSecondary:{color:tt.palette.secondary.contrastText,backgroundColor:tt.palette.secondary.main,"&:hover":{backgroundColor:tt.palette.secondary.dark,"@media (hover: none)":{backgroundColor:tt.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:tt.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:tt.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:tt.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:tt.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:tt.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:tt.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}},Button$1=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.className,ut=tt.color,ct=ut===void 0?"default":ut,ft=tt.component,pt=ft===void 0?"button":ft,ht=tt.disabled,mt=ht===void 0?!1:ht,yt=tt.disableElevation,vt=yt===void 0?!1:yt,Tt=tt.disableFocusRipple,Et=Tt===void 0?!1:Tt,xt=tt.endIcon,At=tt.focusVisibleClassName,Ct=tt.fullWidth,$t=Ct===void 0?!1:Ct,Ot=tt.size,Rt=Ot===void 0?"medium":Ot,It=tt.startIcon,kt=tt.type,Mt=kt===void 0?"button":kt,Ft=tt.variant,zt=Ft===void 0?"text":Ft,Vt=_objectWithoutProperties$3(tt,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),Zt=It&&react.exports.createElement("span",{className:clsx(ot.startIcon,ot["iconSize".concat(capitalize(Rt))])},It),Ut=xt&&react.exports.createElement("span",{className:clsx(ot.endIcon,ot["iconSize".concat(capitalize(Rt))])},xt);return react.exports.createElement(ButtonBase$1,_extends$a({className:clsx(ot.root,ot[zt],st,ct==="inherit"?ot.colorInherit:ct!=="default"&&ot["".concat(zt).concat(capitalize(ct))],Rt!=="medium"&&[ot["".concat(zt,"Size").concat(capitalize(Rt))],ot["size".concat(capitalize(Rt))]],vt&&ot.disableElevation,mt&&ot.disabled,$t&&ot.fullWidth),component:pt,disabled:mt,focusRipple:!Et,focusVisibleClassName:clsx(ot.focusVisible,At),ref:nt,type:Mt},Vt),react.exports.createElement("span",{className:ot.label},Zt,rt,Ut))});const Button$1$1=withStyles(styles$B,{name:"MuiButton"})(Button$1);var FormControlContext=react.exports.createContext();function useFormControl$1(){return react.exports.useContext(FormControlContext)}const FormControlContext$1=FormControlContext;function useFormControl(){return react.exports.useContext(FormControlContext$1)}var styles$A={root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},SwitchBase=react.exports.forwardRef(function et(tt,nt){var rt=tt.autoFocus,ot=tt.checked,st=tt.checkedIcon,ut=tt.classes,ct=tt.className,ft=tt.defaultChecked,pt=tt.disabled,ht=tt.icon,mt=tt.id,yt=tt.inputProps,vt=tt.inputRef,Tt=tt.name,Et=tt.onBlur,xt=tt.onChange,At=tt.onFocus,Ct=tt.readOnly,$t=tt.required,Ot=tt.tabIndex,Rt=tt.type,It=tt.value,kt=_objectWithoutProperties$3(tt,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),Mt=useControlled({controlled:ot,default:Boolean(ft),name:"SwitchBase",state:"checked"}),Ft=_slicedToArray$1(Mt,2),zt=Ft[0],Vt=Ft[1],Zt=useFormControl(),Ut=function(Sn){At&&At(Sn),Zt&&Zt.onFocus&&Zt.onFocus(Sn)},Xt=function(Sn){Et&&Et(Sn),Zt&&Zt.onBlur&&Zt.onBlur(Sn)},Jt=function(Sn){var In=Sn.target.checked;Vt(In),xt&&xt(Sn,In)},gn=pt;Zt&&typeof gn>"u"&&(gn=Zt.disabled);var An=Rt==="checkbox"||Rt==="radio";return react.exports.createElement(IconButton$1$1,_extends$a({component:"span",className:clsx(ut.root,ct,zt&&ut.checked,gn&&ut.disabled),disabled:gn,tabIndex:null,role:void 0,onFocus:Ut,onBlur:Xt,ref:nt},kt),react.exports.createElement("input",_extends$a({autoFocus:rt,checked:ot,defaultChecked:ft,className:ut.input,disabled:gn,id:An&&mt,name:Tt,onChange:Jt,readOnly:Ct,ref:vt,required:$t,tabIndex:Ot,type:Rt,value:It},yt)),zt?st:ht)});const SwitchBase$1=withStyles(styles$A,{name:"PrivateSwitchBase"})(SwitchBase),CheckBoxOutlineBlankIcon=createSvgIcon(react.exports.createElement("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"})),CheckBoxIcon=createSvgIcon(react.exports.createElement("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"})),IndeterminateCheckBoxIcon=createSvgIcon(react.exports.createElement("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"}));var styles$z=function et(tt){return{root:{color:tt.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:tt.palette.primary.main,"&:hover":{backgroundColor:alpha(tt.palette.primary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:tt.palette.action.disabled}},colorSecondary:{"&$checked":{color:tt.palette.secondary.main,"&:hover":{backgroundColor:alpha(tt.palette.secondary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:tt.palette.action.disabled}}}},defaultCheckedIcon$1=react.exports.createElement(CheckBoxIcon,null),defaultIcon$1=react.exports.createElement(CheckBoxOutlineBlankIcon,null),defaultIndeterminateIcon=react.exports.createElement(IndeterminateCheckBoxIcon,null),Checkbox$1=react.exports.forwardRef(function et(tt,nt){var rt=tt.checkedIcon,ot=rt===void 0?defaultCheckedIcon$1:rt,st=tt.classes,ut=tt.color,ct=ut===void 0?"secondary":ut,ft=tt.icon,pt=ft===void 0?defaultIcon$1:ft,ht=tt.indeterminate,mt=ht===void 0?!1:ht,yt=tt.indeterminateIcon,vt=yt===void 0?defaultIndeterminateIcon:yt,Tt=tt.inputProps,Et=tt.size,xt=Et===void 0?"medium":Et,At=_objectWithoutProperties$3(tt,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),Ct=mt?vt:pt,$t=mt?vt:ot;return react.exports.createElement(SwitchBase$1,_extends$a({type:"checkbox",classes:{root:clsx(st.root,st["color".concat(capitalize(ct))],mt&&st.indeterminate),checked:st.checked,disabled:st.disabled},color:ct,inputProps:_extends$a({"data-indeterminate":mt},Tt),icon:react.exports.cloneElement(Ct,{fontSize:Ct.props.fontSize===void 0&&xt==="small"?xt:Ct.props.fontSize}),checkedIcon:react.exports.cloneElement($t,{fontSize:$t.props.fontSize===void 0&&xt==="small"?xt:$t.props.fontSize}),ref:nt},At))});const MuiCheckbox=withStyles(styles$z,{name:"MuiCheckbox"})(Checkbox$1),CancelIcon=createSvgIcon(react.exports.createElement("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"}));var styles$y=function et(tt){var nt=tt.palette.type==="light"?tt.palette.grey[300]:tt.palette.grey[700],rt=alpha(tt.palette.text.primary,.26);return{root:{fontFamily:tt.typography.fontFamily,fontSize:tt.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:tt.palette.getContrastText(nt),backgroundColor:nt,borderRadius:32/2,whiteSpace:"nowrap",transition:tt.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:tt.palette.type==="light"?tt.palette.grey[700]:tt.palette.grey[300],fontSize:tt.typography.pxToRem(12)},"& $avatarColorPrimary":{color:tt.palette.primary.contrastText,backgroundColor:tt.palette.primary.dark},"& $avatarColorSecondary":{color:tt.palette.secondary.contrastText,backgroundColor:tt.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:tt.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:tt.palette.primary.main,color:tt.palette.primary.contrastText},colorSecondary:{backgroundColor:tt.palette.secondary.main,color:tt.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:emphasize(nt,.08)},"&:active":{boxShadow:tt.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:emphasize(tt.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:emphasize(tt.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:emphasize(nt,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:emphasize(tt.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:emphasize(tt.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat(tt.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:alpha(tt.palette.text.primary,tt.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:tt.palette.primary.main,border:"1px solid ".concat(tt.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:alpha(tt.palette.primary.main,tt.palette.action.hoverOpacity)}},outlinedSecondary:{color:tt.palette.secondary.main,border:"1px solid ".concat(tt.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:alpha(tt.palette.secondary.main,tt.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:tt.palette.type==="light"?tt.palette.grey[700]:tt.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:rt,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:alpha(rt,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:alpha(tt.palette.primary.contrastText,.7),"&:hover, &:active":{color:tt.palette.primary.contrastText}},deleteIconColorSecondary:{color:alpha(tt.palette.secondary.contrastText,.7),"&:hover, &:active":{color:tt.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:alpha(tt.palette.primary.main,.7),"&:hover, &:active":{color:tt.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:alpha(tt.palette.secondary.main,.7),"&:hover, &:active":{color:tt.palette.secondary.main}}}};function isDeleteKeyboardEvent(et){return et.key==="Backspace"||et.key==="Delete"}var Chip$1=react.exports.forwardRef(function et(tt,nt){var rt=tt.avatar,ot=tt.classes,st=tt.className,ut=tt.clickable,ct=tt.color,ft=ct===void 0?"default":ct,pt=tt.component,ht=tt.deleteIcon,mt=tt.disabled,yt=mt===void 0?!1:mt,vt=tt.icon,Tt=tt.label,Et=tt.onClick,xt=tt.onDelete,At=tt.onKeyDown,Ct=tt.onKeyUp,$t=tt.size,Ot=$t===void 0?"medium":$t,Rt=tt.variant,It=Rt===void 0?"default":Rt,kt=_objectWithoutProperties$3(tt,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),Mt=react.exports.useRef(null),Ft=useForkRef(Mt,nt),zt=function(En){En.stopPropagation(),xt&&xt(En)},Vt=function(En){En.currentTarget===En.target&&isDeleteKeyboardEvent(En)&&En.preventDefault(),At&&At(En)},Zt=function(En){En.currentTarget===En.target&&(xt&&isDeleteKeyboardEvent(En)?xt(En):En.key==="Escape"&&Mt.current&&Mt.current.blur()),Ct&&Ct(En)},Ut=ut!==!1&&Et?!0:ut,Xt=Ot==="small",Jt=pt||(Ut?ButtonBase$1:"div"),gn=Jt===ButtonBase$1?{component:"div"}:{},An=null;if(xt){var sn=clsx(ft!=="default"&&(It==="default"?ot["deleteIconColor".concat(capitalize(ft))]:ot["deleteIconOutlinedColor".concat(capitalize(ft))]),Xt&&ot.deleteIconSmall);An=ht&&react.exports.isValidElement(ht)?react.exports.cloneElement(ht,{className:clsx(ht.props.className,ot.deleteIcon,sn),onClick:zt}):react.exports.createElement(CancelIcon,{className:clsx(ot.deleteIcon,sn),onClick:zt})}var Sn=null;rt&&react.exports.isValidElement(rt)&&(Sn=react.exports.cloneElement(rt,{className:clsx(ot.avatar,rt.props.className,Xt&&ot.avatarSmall,ft!=="default"&&ot["avatarColor".concat(capitalize(ft))])}));var In=null;return vt&&react.exports.isValidElement(vt)&&(In=react.exports.cloneElement(vt,{className:clsx(ot.icon,vt.props.className,Xt&&ot.iconSmall,ft!=="default"&&ot["iconColor".concat(capitalize(ft))])})),react.exports.createElement(Jt,_extends$a({role:Ut||xt?"button":void 0,className:clsx(ot.root,st,ft!=="default"&&[ot["color".concat(capitalize(ft))],Ut&&ot["clickableColor".concat(capitalize(ft))],xt&&ot["deletableColor".concat(capitalize(ft))]],It!=="default"&&[ot.outlined,{primary:ot.outlinedPrimary,secondary:ot.outlinedSecondary}[ft]],yt&&ot.disabled,Xt&&ot.sizeSmall,Ut&&ot.clickable,xt&&ot.deletable),"aria-disabled":yt?!0:void 0,tabIndex:Ut||xt?0:void 0,onClick:Et,onKeyDown:Vt,onKeyUp:Zt,ref:Ft},gn,kt),Sn||In,react.exports.createElement("span",{className:clsx(ot.label,Xt&&ot.labelSmall)},Tt),An)});const Chip$1$1=withStyles(styles$y,{name:"MuiChip"})(Chip$1);var SIZE=44,styles$x=function et(tt){return{root:{display:"inline-block"},static:{transition:tt.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:tt.transitions.create("transform")},colorPrimary:{color:tt.palette.primary.main},colorSecondary:{color:tt.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:tt.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:tt.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},CircularProgress=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.color,ut=st===void 0?"primary":st,ct=tt.disableShrink,ft=ct===void 0?!1:ct,pt=tt.size,ht=pt===void 0?40:pt,mt=tt.style,yt=tt.thickness,vt=yt===void 0?3.6:yt,Tt=tt.value,Et=Tt===void 0?0:Tt,xt=tt.variant,At=xt===void 0?"indeterminate":xt,Ct=_objectWithoutProperties$3(tt,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),$t={},Ot={},Rt={};if(At==="determinate"||At==="static"){var It=2*Math.PI*((SIZE-vt)/2);$t.strokeDasharray=It.toFixed(3),Rt["aria-valuenow"]=Math.round(Et),$t.strokeDashoffset="".concat(((100-Et)/100*It).toFixed(3),"px"),Ot.transform="rotate(-90deg)"}return react.exports.createElement("div",_extends$a({className:clsx(rt.root,ot,ut!=="inherit"&&rt["color".concat(capitalize(ut))],{determinate:rt.determinate,indeterminate:rt.indeterminate,static:rt.static}[At]),style:_extends$a({width:ht,height:ht},Ot,mt),ref:nt,role:"progressbar"},Rt,Ct),react.exports.createElement("svg",{className:rt.svg,viewBox:"".concat(SIZE/2," ").concat(SIZE/2," ").concat(SIZE," ").concat(SIZE)},react.exports.createElement("circle",{className:clsx(rt.circle,ft&&rt.circleDisableShrink,{determinate:rt.circleDeterminate,indeterminate:rt.circleIndeterminate,static:rt.circleStatic}[At]),style:$t,cx:SIZE,cy:SIZE,r:(SIZE-vt)/2,fill:"none",strokeWidth:vt})))});const CircularProgress$1=withStyles(styles$x,{name:"MuiCircularProgress",flip:!1})(CircularProgress);function getContainer$1(et){return et=typeof et=="function"?et():et,reactDom.exports.findDOMNode(et)}var useEnhancedEffect$5=typeof window<"u"?react.exports.useLayoutEffect:react.exports.useEffect,Portal$1=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.container,st=tt.disablePortal,ut=st===void 0?!1:st,ct=tt.onRendered,ft=react.exports.useState(null),pt=ft[0],ht=ft[1],mt=useForkRef(react.exports.isValidElement(rt)?rt.ref:null,nt);return useEnhancedEffect$5(function(){ut||ht(getContainer$1(ot)||document.body)},[ot,ut]),useEnhancedEffect$5(function(){if(pt&&!ut)return setRef(nt,pt),function(){setRef(nt,null)}},[nt,pt,ut]),useEnhancedEffect$5(function(){ct&&(pt||ut)&&ct()},[ct,pt,ut]),ut?react.exports.isValidElement(rt)?react.exports.cloneElement(rt,{ref:mt}):rt:pt&&reactDom.exports.createPortal(rt,pt)});const Portal$2=Portal$1;function getScrollbarSize$2(){var et=document.createElement("div");et.style.width="99px",et.style.height="99px",et.style.position="absolute",et.style.top="-9999px",et.style.overflow="scroll",document.body.appendChild(et);var tt=et.offsetWidth-et.clientWidth;return document.body.removeChild(et),tt}function isOverflowing(et){var tt=ownerDocument(et);return tt.body===et?ownerWindow(tt).innerWidth>tt.documentElement.clientWidth:et.scrollHeight>et.clientHeight}function ariaHidden(et,tt){tt?et.setAttribute("aria-hidden","true"):et.removeAttribute("aria-hidden")}function getPaddingRight(et){return parseInt(window.getComputedStyle(et)["padding-right"],10)||0}function ariaHiddenSiblings(et,tt,nt){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],ot=arguments.length>4?arguments[4]:void 0,st=[tt,nt].concat(_toConsumableArray$1(rt)),ut=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(et.children,function(ct){ct.nodeType===1&&st.indexOf(ct)===-1&&ut.indexOf(ct.tagName)===-1&&ariaHidden(ct,ot)})}function findIndexOf(et,tt){var nt=-1;return et.some(function(rt,ot){return tt(rt)?(nt=ot,!0):!1}),nt}function handleContainer(et,tt){var nt=[],rt=[],ot=et.container,st;if(!tt.disableScrollLock){if(isOverflowing(ot)){var ut=getScrollbarSize$2();nt.push({value:ot.style.paddingRight,key:"padding-right",el:ot}),ot.style["padding-right"]="".concat(getPaddingRight(ot)+ut,"px"),st=ownerDocument(ot).querySelectorAll(".mui-fixed"),[].forEach.call(st,function(ht){rt.push(ht.style.paddingRight),ht.style.paddingRight="".concat(getPaddingRight(ht)+ut,"px")})}var ct=ot.parentElement,ft=ct.nodeName==="HTML"&&window.getComputedStyle(ct)["overflow-y"]==="scroll"?ct:ot;nt.push({value:ft.style.overflow,key:"overflow",el:ft}),ft.style.overflow="hidden"}var pt=function(){st&&[].forEach.call(st,function(mt,yt){rt[yt]?mt.style.paddingRight=rt[yt]:mt.style.removeProperty("padding-right")}),nt.forEach(function(mt){var yt=mt.value,vt=mt.el,Tt=mt.key;yt?vt.style.setProperty(Tt,yt):vt.style.removeProperty(Tt)})};return pt}function getHiddenSiblings(et){var tt=[];return[].forEach.call(et.children,function(nt){nt.getAttribute&&nt.getAttribute("aria-hidden")==="true"&&tt.push(nt)}),tt}var ModalManager=function(){function et(){_classCallCheck$2(this,et),this.modals=[],this.containers=[]}return _createClass$2(et,[{key:"add",value:function(nt,rt){var ot=this.modals.indexOf(nt);if(ot!==-1)return ot;ot=this.modals.length,this.modals.push(nt),nt.modalRef&&ariaHidden(nt.modalRef,!1);var st=getHiddenSiblings(rt);ariaHiddenSiblings(rt,nt.mountNode,nt.modalRef,st,!0);var ut=findIndexOf(this.containers,function(ct){return ct.container===rt});return ut!==-1?(this.containers[ut].modals.push(nt),ot):(this.containers.push({modals:[nt],container:rt,restore:null,hiddenSiblingNodes:st}),ot)}},{key:"mount",value:function(nt,rt){var ot=findIndexOf(this.containers,function(ut){return ut.modals.indexOf(nt)!==-1}),st=this.containers[ot];st.restore||(st.restore=handleContainer(st,rt))}},{key:"remove",value:function(nt){var rt=this.modals.indexOf(nt);if(rt===-1)return rt;var ot=findIndexOf(this.containers,function(ct){return ct.modals.indexOf(nt)!==-1}),st=this.containers[ot];if(st.modals.splice(st.modals.indexOf(nt),1),this.modals.splice(rt,1),st.modals.length===0)st.restore&&st.restore(),nt.modalRef&&ariaHidden(nt.modalRef,!0),ariaHiddenSiblings(st.container,nt.mountNode,nt.modalRef,st.hiddenSiblingNodes,!1),this.containers.splice(ot,1);else{var ut=st.modals[st.modals.length-1];ut.modalRef&&ariaHidden(ut.modalRef,!1)}return rt}},{key:"isTopModal",value:function(nt){return this.modals.length>0&&this.modals[this.modals.length-1]===nt}}]),et}();function Unstable_TrapFocus(et){var tt=et.children,nt=et.disableAutoFocus,rt=nt===void 0?!1:nt,ot=et.disableEnforceFocus,st=ot===void 0?!1:ot,ut=et.disableRestoreFocus,ct=ut===void 0?!1:ut,ft=et.getDoc,pt=et.isEnabled,ht=et.open,mt=react.exports.useRef(),yt=react.exports.useRef(null),vt=react.exports.useRef(null),Tt=react.exports.useRef(),Et=react.exports.useRef(null),xt=react.exports.useCallback(function($t){Et.current=reactDom.exports.findDOMNode($t)},[]),At=useForkRef(tt.ref,xt),Ct=react.exports.useRef();return react.exports.useEffect(function(){Ct.current=ht},[ht]),!Ct.current&&ht&&typeof window<"u"&&(Tt.current=ft().activeElement),react.exports.useEffect(function(){if(!!ht){var $t=ownerDocument(Et.current);!rt&&Et.current&&!Et.current.contains($t.activeElement)&&(Et.current.hasAttribute("tabIndex")||Et.current.setAttribute("tabIndex",-1),Et.current.focus());var Ot=function(){var Mt=Et.current;if(Mt!==null){if(!$t.hasFocus()||st||!pt()||mt.current){mt.current=!1;return}Et.current&&!Et.current.contains($t.activeElement)&&Et.current.focus()}},Rt=function(Mt){st||!pt()||Mt.keyCode!==9||$t.activeElement===Et.current&&(mt.current=!0,Mt.shiftKey?vt.current.focus():yt.current.focus())};$t.addEventListener("focus",Ot,!0),$t.addEventListener("keydown",Rt,!0);var It=setInterval(function(){Ot()},50);return function(){clearInterval(It),$t.removeEventListener("focus",Ot,!0),$t.removeEventListener("keydown",Rt,!0),ct||(Tt.current&&Tt.current.focus&&Tt.current.focus(),Tt.current=null)}}},[rt,st,ct,pt,ht]),react.exports.createElement(react.exports.Fragment,null,react.exports.createElement("div",{tabIndex:0,ref:yt,"data-test":"sentinelStart"}),react.exports.cloneElement(tt,{ref:At}),react.exports.createElement("div",{tabIndex:0,ref:vt,"data-test":"sentinelEnd"}))}var styles$w={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},SimpleBackdrop=react.exports.forwardRef(function et(tt,nt){var rt=tt.invisible,ot=rt===void 0?!1:rt,st=tt.open,ut=_objectWithoutProperties$3(tt,["invisible","open"]);return st?react.exports.createElement("div",_extends$a({"aria-hidden":!0,ref:nt},ut,{style:_extends$a({},styles$w.root,ot?styles$w.invisible:{},ut.style)})):null});const SimpleBackdrop$1=SimpleBackdrop;function getContainer(et){return et=typeof et=="function"?et():et,reactDom.exports.findDOMNode(et)}function getHasTransition(et){return et.children?et.children.props.hasOwnProperty("in"):!1}var defaultManager=new ModalManager,styles$v=function et(tt){return{root:{position:"fixed",zIndex:tt.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}},Modal=react.exports.forwardRef(function et(tt,nt){var rt=useTheme$1(),ot=getThemeProps({name:"MuiModal",props:_extends$a({},tt),theme:rt}),st=ot.BackdropComponent,ut=st===void 0?SimpleBackdrop$1:st,ct=ot.BackdropProps,ft=ot.children,pt=ot.closeAfterTransition,ht=pt===void 0?!1:pt,mt=ot.container,yt=ot.disableAutoFocus,vt=yt===void 0?!1:yt,Tt=ot.disableBackdropClick,Et=Tt===void 0?!1:Tt,xt=ot.disableEnforceFocus,At=xt===void 0?!1:xt,Ct=ot.disableEscapeKeyDown,$t=Ct===void 0?!1:Ct,Ot=ot.disablePortal,Rt=Ot===void 0?!1:Ot,It=ot.disableRestoreFocus,kt=It===void 0?!1:It,Mt=ot.disableScrollLock,Ft=Mt===void 0?!1:Mt,zt=ot.hideBackdrop,Vt=zt===void 0?!1:zt,Zt=ot.keepMounted,Ut=Zt===void 0?!1:Zt,Xt=ot.manager,Jt=Xt===void 0?defaultManager:Xt,gn=ot.onBackdropClick,An=ot.onClose,sn=ot.onEscapeKeyDown,Sn=ot.onRendered,In=ot.open,_n=_objectWithoutProperties$3(ot,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),En=react.exports.useState(!0),Ln=En[0],wn=En[1],Dn=react.exports.useRef({}),$n=react.exports.useRef(null),Gn=react.exports.useRef(null),Jn=useForkRef(Gn,nt),zn=getHasTransition(ot),Qn=function(){return ownerDocument($n.current)},Bn=function(){return Dn.current.modalRef=Gn.current,Dn.current.mountNode=$n.current,Dn.current},jn=function(){Jt.mount(Bn(),{disableScrollLock:Ft}),Gn.current.scrollTop=0},Ar=useEventCallback(function(){var So=getContainer(mt)||Qn().body;Jt.add(Bn(),So),Gn.current&&jn()}),Er=react.exports.useCallback(function(){return Jt.isTopModal(Bn())},[Jt]),Pr=useEventCallback(function(So){$n.current=So,So&&(Sn&&Sn(),In&&Er()?jn():ariaHidden(Gn.current,!0))}),Nr=react.exports.useCallback(function(){Jt.remove(Bn())},[Jt]);if(react.exports.useEffect(function(){return function(){Nr()}},[Nr]),react.exports.useEffect(function(){In?Ar():(!zn||!ht)&&Nr()},[In,Nr,zn,ht,Ar]),!Ut&&!In&&(!zn||Ln))return null;var Ir=function(){wn(!1)},no=function(){wn(!0),ht&&Nr()},ro=function(va){va.target===va.currentTarget&&(gn&&gn(va),!Et&&An&&An(va,"backdropClick"))},ao=function(va){va.key!=="Escape"||!Er()||(sn&&sn(va),$t||(va.stopPropagation(),An&&An(va,"escapeKeyDown")))},Xr=styles$v(rt||{zIndex:zIndex$1}),Jr={};return ft.props.tabIndex===void 0&&(Jr.tabIndex=ft.props.tabIndex||"-1"),zn&&(Jr.onEnter=createChainedFunction(Ir,ft.props.onEnter),Jr.onExited=createChainedFunction(no,ft.props.onExited)),react.exports.createElement(Portal$2,{ref:Pr,container:mt,disablePortal:Rt},react.exports.createElement("div",_extends$a({ref:Jn,onKeyDown:ao,role:"presentation"},_n,{style:_extends$a({},Xr.root,!In&&Ln?Xr.hidden:{},_n.style)}),Vt?null:react.exports.createElement(ut,_extends$a({open:In,onClick:ro},ct)),react.exports.createElement(Unstable_TrapFocus,{disableEnforceFocus:At,disableAutoFocus:vt,disableRestoreFocus:kt,getDoc:Qn,isEnabled:Er,open:In},react.exports.cloneElement(ft,Jr))))});const Modal$1=Modal;function formControlState(et){var tt=et.props,nt=et.states,rt=et.muiFormControl;return nt.reduce(function(ot,st){return ot[st]=tt[st],rt&&typeof tt[st]>"u"&&(ot[st]=rt[st]),ot},{})}function getStyleValue(et,tt){return parseInt(et[tt],10)||0}var useEnhancedEffect$4=typeof window<"u"?react.exports.useLayoutEffect:react.exports.useEffect,styles$u={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}},TextareaAutosize$2=react.exports.forwardRef(function et(tt,nt){var rt=tt.onChange,ot=tt.rows,st=tt.rowsMax,ut=tt.rowsMin,ct=tt.maxRows,ft=tt.minRows,pt=ft===void 0?1:ft,ht=tt.style,mt=tt.value,yt=_objectWithoutProperties$3(tt,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),vt=ct||st,Tt=ot||ut||pt,Et=react.exports.useRef(mt!=null),xt=Et.current,At=react.exports.useRef(null),Ct=useForkRef(nt,At),$t=react.exports.useRef(null),Ot=react.exports.useRef(0),Rt=react.exports.useState({}),It=Rt[0],kt=Rt[1],Mt=react.exports.useCallback(function(){var zt=At.current,Vt=window.getComputedStyle(zt),Zt=$t.current;Zt.style.width=Vt.width,Zt.value=zt.value||tt.placeholder||"x",Zt.value.slice(-1)===`
`&&(Zt.value+=" ");var Ut=Vt["box-sizing"],Xt=getStyleValue(Vt,"padding-bottom")+getStyleValue(Vt,"padding-top"),Jt=getStyleValue(Vt,"border-bottom-width")+getStyleValue(Vt,"border-top-width"),gn=Zt.scrollHeight-Xt;Zt.value="x";var An=Zt.scrollHeight-Xt,sn=gn;Tt&&(sn=Math.max(Number(Tt)*An,sn)),vt&&(sn=Math.min(Number(vt)*An,sn)),sn=Math.max(sn,An);var Sn=sn+(Ut==="border-box"?Xt+Jt:0),In=Math.abs(sn-gn)<=1;kt(function(_n){return Ot.current<20&&(Sn>0&&Math.abs((_n.outerHeightStyle||0)-Sn)>1||_n.overflow!==In)?(Ot.current+=1,{overflow:In,outerHeightStyle:Sn}):_n})},[vt,Tt,tt.placeholder]);react.exports.useEffect(function(){var zt=debounce$2(function(){Ot.current=0,Mt()});return window.addEventListener("resize",zt),function(){zt.clear(),window.removeEventListener("resize",zt)}},[Mt]),useEnhancedEffect$4(function(){Mt()}),react.exports.useEffect(function(){Ot.current=0},[mt]);var Ft=function(Vt){Ot.current=0,xt||Mt(),rt&&rt(Vt)};return react.exports.createElement(react.exports.Fragment,null,react.exports.createElement("textarea",_extends$a({value:mt,onChange:Ft,ref:Ct,rows:Tt,style:_extends$a({height:It.outerHeightStyle,overflow:It.overflow?"hidden":null},ht)},yt)),react.exports.createElement("textarea",{"aria-hidden":!0,className:tt.className,readOnly:!0,ref:$t,tabIndex:-1,style:_extends$a({},styles$u.shadow,ht)}))});const TextareaAutosize$3=TextareaAutosize$2;function hasValue(et){return et!=null&&!(Array.isArray(et)&&et.length===0)}function isFilled(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return et&&(hasValue(et.value)&&et.value!==""||tt&&hasValue(et.defaultValue)&&et.defaultValue!=="")}function isAdornedStart(et){return et.startAdornment}var styles$t=function et(tt){var nt=tt.palette.type==="light",rt={color:"currentColor",opacity:nt?.42:.5,transition:tt.transitions.create("opacity",{duration:tt.transitions.duration.shorter})},ot={opacity:"0 !important"},st={opacity:nt?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:_extends$a({},tt.typography.body1,{color:tt.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:tt.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(8-2,"px 0 ").concat(8-1,"px"),"&$marginDense":{paddingTop:4-1}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(8-2,"px 0 ").concat(8-1,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":rt,"&::-moz-placeholder":rt,"&:-ms-input-placeholder":rt,"&::-ms-input-placeholder":rt,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":ot,"&::-moz-placeholder":ot,"&:-ms-input-placeholder":ot,"&::-ms-input-placeholder":ot,"&:focus::-webkit-input-placeholder":st,"&:focus::-moz-placeholder":st,"&:focus:-ms-input-placeholder":st,"&:focus::-ms-input-placeholder":st},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:4-1},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}},useEnhancedEffect$3=typeof window>"u"?react.exports.useEffect:react.exports.useLayoutEffect,InputBase=react.exports.forwardRef(function et(tt,nt){var rt=tt["aria-describedby"],ot=tt.autoComplete,st=tt.autoFocus,ut=tt.classes,ct=tt.className;tt.color;var ft=tt.defaultValue,pt=tt.disabled,ht=tt.endAdornment;tt.error;var mt=tt.fullWidth,yt=mt===void 0?!1:mt,vt=tt.id,Tt=tt.inputComponent,Et=Tt===void 0?"input":Tt,xt=tt.inputProps,At=xt===void 0?{}:xt,Ct=tt.inputRef;tt.margin;var $t=tt.multiline,Ot=$t===void 0?!1:$t,Rt=tt.name,It=tt.onBlur,kt=tt.onChange,Mt=tt.onClick,Ft=tt.onFocus,zt=tt.onKeyDown,Vt=tt.onKeyUp,Zt=tt.placeholder,Ut=tt.readOnly,Xt=tt.renderSuffix,Jt=tt.rows,gn=tt.rowsMax,An=tt.rowsMin,sn=tt.maxRows,Sn=tt.minRows,In=tt.startAdornment,_n=tt.type,En=_n===void 0?"text":_n,Ln=tt.value,wn=_objectWithoutProperties$3(tt,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),Dn=At.value!=null?At.value:Ln,$n=react.exports.useRef(Dn!=null),Gn=$n.current,Jn=react.exports.useRef(),zn=react.exports.useCallback(function(Bo){},[]),Qn=useForkRef(At.ref,zn),Bn=useForkRef(Ct,Qn),jn=useForkRef(Jn,Bn),Ar=react.exports.useState(!1),Er=Ar[0],Pr=Ar[1],Nr=useFormControl$1(),Ir=formControlState({props:tt,muiFormControl:Nr,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});Ir.focused=Nr?Nr.focused:Er,react.exports.useEffect(function(){!Nr&&pt&&Er&&(Pr(!1),It&&It())},[Nr,pt,Er,It]);var no=Nr&&Nr.onFilled,ro=Nr&&Nr.onEmpty,ao=react.exports.useCallback(function(Bo){isFilled(Bo)?no&&no():ro&&ro()},[no,ro]);useEnhancedEffect$3(function(){Gn&&ao({value:Dn})},[Dn,ao,Gn]);var Xr=function(ss){if(Ir.disabled){ss.stopPropagation();return}Ft&&Ft(ss),At.onFocus&&At.onFocus(ss),Nr&&Nr.onFocus?Nr.onFocus(ss):Pr(!0)},Jr=function(ss){It&&It(ss),At.onBlur&&At.onBlur(ss),Nr&&Nr.onBlur?Nr.onBlur(ss):Pr(!1)},So=function(ss){if(!Gn){var Us=ss.target||Jn.current;if(Us==null)throw new Error(formatMuiErrorMessage(1));ao({value:Us.value})}for(var Eo=arguments.length,Do=new Array(Eo>1?Eo-1:0),bo=1;bo<Eo;bo++)Do[bo-1]=arguments[bo];At.onChange&&At.onChange.apply(At,[ss].concat(Do)),kt&&kt.apply(void 0,[ss].concat(Do))};react.exports.useEffect(function(){ao(Jn.current)},[]);var va=function(ss){Jn.current&&ss.currentTarget===ss.target&&Jn.current.focus(),Mt&&Mt(ss)},$o=Et,Qr=_extends$a({},At,{ref:jn});typeof $o!="string"?Qr=_extends$a({inputRef:jn,type:En},Qr,{ref:null}):Ot?Jt&&!sn&&!Sn&&!gn&&!An?$o="textarea":(Qr=_extends$a({minRows:Jt||Sn,rowsMax:gn,maxRows:sn},Qr),$o=TextareaAutosize$3):Qr=_extends$a({type:En},Qr);var jo=function(ss){ao(ss.animationName==="mui-auto-fill-cancel"?Jn.current:{value:"x"})};return react.exports.useEffect(function(){Nr&&Nr.setAdornedStart(Boolean(In))},[Nr,In]),react.exports.createElement("div",_extends$a({className:clsx(ut.root,ut["color".concat(capitalize(Ir.color||"primary"))],ct,Ir.disabled&&ut.disabled,Ir.error&&ut.error,yt&&ut.fullWidth,Ir.focused&&ut.focused,Nr&&ut.formControl,Ot&&ut.multiline,In&&ut.adornedStart,ht&&ut.adornedEnd,Ir.margin==="dense"&&ut.marginDense),onClick:va,ref:nt},wn),In,react.exports.createElement(FormControlContext$1.Provider,{value:null},react.exports.createElement($o,_extends$a({"aria-invalid":Ir.error,"aria-describedby":rt,autoComplete:ot,autoFocus:st,defaultValue:ft,disabled:Ir.disabled,id:vt,onAnimationStart:jo,name:Rt,placeholder:Zt,readOnly:Ut,required:Ir.required,rows:Jt,value:Dn,onKeyDown:zt,onKeyUp:Vt},Qr,{className:clsx(ut.input,At.className,Ir.disabled&&ut.disabled,Ot&&ut.inputMultiline,Ir.hiddenLabel&&ut.inputHiddenLabel,In&&ut.inputAdornedStart,ht&&ut.inputAdornedEnd,En==="search"&&ut.inputTypeSearch,Ir.margin==="dense"&&ut.inputMarginDense),onBlur:Jr,onChange:So,onFocus:Xr}))),ht,Xt?Xt(_extends$a({},Ir,{startAdornment:In})):null)});const InputBase$1=withStyles(styles$t,{name:"MuiInputBase"})(InputBase);var styles$s=function et(tt){var nt=tt.palette.type==="light",rt=nt?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",ot=nt?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:ot,borderTopLeftRadius:tt.shape.borderRadius,borderTopRightRadius:tt.shape.borderRadius,transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),"&:hover":{backgroundColor:nt?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:ot}},"&$focused":{backgroundColor:nt?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:nt?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:tt.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(tt.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:tt.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(rt),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(tt.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:tt.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.type==="light"?null:"#fff",caretColor:tt.palette.type==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},FilledInput=react.exports.forwardRef(function et(tt,nt){var rt=tt.disableUnderline,ot=tt.classes,st=tt.fullWidth,ut=st===void 0?!1:st,ct=tt.inputComponent,ft=ct===void 0?"input":ct,pt=tt.multiline,ht=pt===void 0?!1:pt,mt=tt.type,yt=mt===void 0?"text":mt,vt=_objectWithoutProperties$3(tt,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return react.exports.createElement(InputBase$1,_extends$a({classes:_extends$a({},ot,{root:clsx(ot.root,!rt&&ot.underline),underline:null}),fullWidth:ut,inputComponent:ft,multiline:ht,ref:nt,type:yt},vt))});FilledInput.muiName="Input";const FilledInput$1=withStyles(styles$s,{name:"MuiFilledInput"})(FilledInput);var styles$r={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},FormControl=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.className,ut=tt.color,ct=ut===void 0?"primary":ut,ft=tt.component,pt=ft===void 0?"div":ft,ht=tt.disabled,mt=ht===void 0?!1:ht,yt=tt.error,vt=yt===void 0?!1:yt,Tt=tt.fullWidth,Et=Tt===void 0?!1:Tt,xt=tt.focused,At=tt.hiddenLabel,Ct=At===void 0?!1:At,$t=tt.margin,Ot=$t===void 0?"none":$t,Rt=tt.required,It=Rt===void 0?!1:Rt,kt=tt.size,Mt=tt.variant,Ft=Mt===void 0?"standard":Mt,zt=_objectWithoutProperties$3(tt,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),Vt=react.exports.useState(function(){var Dn=!1;return rt&&react.exports.Children.forEach(rt,function($n){if(!!isMuiElement($n,["Input","Select"])){var Gn=isMuiElement($n,["Select"])?$n.props.input:$n;Gn&&isAdornedStart(Gn.props)&&(Dn=!0)}}),Dn}),Zt=Vt[0],Ut=Vt[1],Xt=react.exports.useState(function(){var Dn=!1;return rt&&react.exports.Children.forEach(rt,function($n){!isMuiElement($n,["Input","Select"])||isFilled($n.props,!0)&&(Dn=!0)}),Dn}),Jt=Xt[0],gn=Xt[1],An=react.exports.useState(!1),sn=An[0],Sn=An[1],In=xt!==void 0?xt:sn;mt&&In&&Sn(!1);var _n,En=react.exports.useCallback(function(){gn(!0)},[]),Ln=react.exports.useCallback(function(){gn(!1)},[]),wn={adornedStart:Zt,setAdornedStart:Ut,color:ct,disabled:mt,error:vt,filled:Jt,focused:In,fullWidth:Et,hiddenLabel:Ct,margin:(kt==="small"?"dense":void 0)||Ot,onBlur:function(){Sn(!1)},onEmpty:Ln,onFilled:En,onFocus:function(){Sn(!0)},registerEffect:_n,required:It,variant:Ft};return react.exports.createElement(FormControlContext$1.Provider,{value:wn},react.exports.createElement(pt,_extends$a({className:clsx(ot.root,st,Ot!=="none"&&ot["margin".concat(capitalize(Ot))],Et&&ot.fullWidth),ref:nt},zt),rt))});const FormControl$1=withStyles(styles$r,{name:"MuiFormControl"})(FormControl);var styles$q=function et(tt){return{root:_extends$a({color:tt.palette.text.secondary},tt.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:tt.palette.text.disabled},"&$error":{color:tt.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}},FormHelperText=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.className,ut=tt.component,ct=ut===void 0?"p":ut;tt.disabled,tt.error,tt.filled,tt.focused,tt.margin,tt.required,tt.variant;var ft=_objectWithoutProperties$3(tt,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"]),pt=useFormControl(),ht=formControlState({props:tt,muiFormControl:pt,states:["variant","margin","disabled","error","filled","focused","required"]});return react.exports.createElement(ct,_extends$a({className:clsx(ot.root,(ht.variant==="filled"||ht.variant==="outlined")&&ot.contained,st,ht.disabled&&ot.disabled,ht.error&&ot.error,ht.filled&&ot.filled,ht.focused&&ot.focused,ht.required&&ot.required,ht.margin==="dense"&&ot.marginDense),ref:nt},ft),rt===" "?react.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):rt)});const FormHelperText$1=withStyles(styles$q,{name:"MuiFormHelperText"})(FormHelperText);var styles$p=function et(tt){return{root:_extends$a({color:tt.palette.text.secondary},tt.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:tt.palette.primary.main},"&$disabled":{color:tt.palette.text.disabled},"&$error":{color:tt.palette.error.main}}),colorSecondary:{"&$focused":{color:tt.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:tt.palette.error.main}}}},FormLabel=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.className;tt.color;var ut=tt.component,ct=ut===void 0?"label":ut;tt.disabled,tt.error,tt.filled,tt.focused,tt.required;var ft=_objectWithoutProperties$3(tt,["children","classes","className","color","component","disabled","error","filled","focused","required"]),pt=useFormControl(),ht=formControlState({props:tt,muiFormControl:pt,states:["color","required","focused","disabled","error","filled"]});return react.exports.createElement(ct,_extends$a({className:clsx(ot.root,ot["color".concat(capitalize(ht.color||"primary"))],st,ht.disabled&&ot.disabled,ht.error&&ot.error,ht.filled&&ot.filled,ht.focused&&ot.focused,ht.required&&ot.required),ref:nt},ft),rt,ht.required&&react.exports.createElement("span",{"aria-hidden":!0,className:clsx(ot.asterisk,ht.error&&ot.error)},"\u2009","*"))});const FormLabel$1=withStyles(styles$p,{name:"MuiFormLabel"})(FormLabel);function getScale(et){return"scale(".concat(et,", ").concat(Math.pow(et,2),")")}var styles$o={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},Grow=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.disableStrictModeCompat,st=ot===void 0?!1:ot,ut=tt.in,ct=tt.onEnter,ft=tt.onEntered,pt=tt.onEntering,ht=tt.onExit,mt=tt.onExited,yt=tt.onExiting,vt=tt.style,Tt=tt.timeout,Et=Tt===void 0?"auto":Tt,xt=tt.TransitionComponent,At=xt===void 0?Transition$3:xt,Ct=_objectWithoutProperties$3(tt,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),$t=react.exports.useRef(),Ot=react.exports.useRef(),Rt=useTheme(),It=Rt.unstable_strictMode&&!st,kt=react.exports.useRef(null),Mt=useForkRef(rt.ref,nt),Ft=useForkRef(It?kt:void 0,Mt),zt=function(Sn){return function(In,_n){if(Sn){var En=It?[kt.current,In]:[In,_n],Ln=_slicedToArray$1(En,2),wn=Ln[0],Dn=Ln[1];Dn===void 0?Sn(wn):Sn(wn,Dn)}}},Vt=zt(pt),Zt=zt(function(sn,Sn){reflow(sn);var In=getTransitionProps({style:vt,timeout:Et},{mode:"enter"}),_n=In.duration,En=In.delay,Ln;Et==="auto"?(Ln=Rt.transitions.getAutoHeightDuration(sn.clientHeight),Ot.current=Ln):Ln=_n,sn.style.transition=[Rt.transitions.create("opacity",{duration:Ln,delay:En}),Rt.transitions.create("transform",{duration:Ln*.666,delay:En})].join(","),ct&&ct(sn,Sn)}),Ut=zt(ft),Xt=zt(yt),Jt=zt(function(sn){var Sn=getTransitionProps({style:vt,timeout:Et},{mode:"exit"}),In=Sn.duration,_n=Sn.delay,En;Et==="auto"?(En=Rt.transitions.getAutoHeightDuration(sn.clientHeight),Ot.current=En):En=In,sn.style.transition=[Rt.transitions.create("opacity",{duration:En,delay:_n}),Rt.transitions.create("transform",{duration:En*.666,delay:_n||En*.333})].join(","),sn.style.opacity="0",sn.style.transform=getScale(.75),ht&&ht(sn)}),gn=zt(mt),An=function(Sn,In){var _n=It?Sn:In;Et==="auto"&&($t.current=setTimeout(_n,Ot.current||0))};return react.exports.useEffect(function(){return function(){clearTimeout($t.current)}},[]),react.exports.createElement(At,_extends$a({appear:!0,in:ut,nodeRef:It?kt:void 0,onEnter:Zt,onEntered:Ut,onEntering:Vt,onExit:Jt,onExited:gn,onExiting:Xt,addEndListener:An,timeout:Et==="auto"?null:Et},Ct),function(sn,Sn){return react.exports.cloneElement(rt,_extends$a({style:_extends$a({opacity:0,transform:getScale(.75),visibility:sn==="exited"&&!ut?"hidden":void 0},styles$o[sn],vt,rt.props.style),ref:Ft},Sn))})});Grow.muiSupportAuto=!0;const Grow$1=Grow;var styles$n=function et(tt){return{root:{userSelect:"none",fontSize:tt.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:tt.palette.primary.main},colorSecondary:{color:tt.palette.secondary.main},colorAction:{color:tt.palette.action.active},colorError:{color:tt.palette.error.main},colorDisabled:{color:tt.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:tt.typography.pxToRem(20)},fontSizeLarge:{fontSize:tt.typography.pxToRem(36)}}},Icon$2=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.color,ut=st===void 0?"inherit":st,ct=tt.component,ft=ct===void 0?"span":ct,pt=tt.fontSize,ht=pt===void 0?"medium":pt,mt=_objectWithoutProperties$3(tt,["classes","className","color","component","fontSize"]);return react.exports.createElement(ft,_extends$a({className:clsx("material-icons",rt.root,ot,ut!=="inherit"&&rt["color".concat(capitalize(ut))],ht!=="default"&&ht!=="medium"&&rt["fontSize".concat(capitalize(ht))]),"aria-hidden":!0,ref:nt},mt))});Icon$2.muiName="Icon";const Icon$1$1=withStyles(styles$n,{name:"MuiIcon"})(Icon$2);var styles$m=function et(tt){var nt=tt.palette.type==="light",rt=nt?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:tt.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(tt.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:tt.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(rt),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(tt.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(rt)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}},Input$2=react.exports.forwardRef(function et(tt,nt){var rt=tt.disableUnderline,ot=tt.classes,st=tt.fullWidth,ut=st===void 0?!1:st,ct=tt.inputComponent,ft=ct===void 0?"input":ct,pt=tt.multiline,ht=pt===void 0?!1:pt,mt=tt.type,yt=mt===void 0?"text":mt,vt=_objectWithoutProperties$3(tt,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return react.exports.createElement(InputBase$1,_extends$a({classes:_extends$a({},ot,{root:clsx(ot.root,!rt&&ot.underline),underline:null}),fullWidth:ut,inputComponent:ft,multiline:ht,ref:nt,type:yt},vt))});Input$2.muiName="Input";const Input$3=withStyles(styles$m,{name:"MuiInput"})(Input$2);var styles$l=function et(tt){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:tt.transitions.create(["color","transform"],{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}},InputLabel=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.disableAnimation,ut=st===void 0?!1:st;tt.margin;var ct=tt.shrink;tt.variant;var ft=_objectWithoutProperties$3(tt,["classes","className","disableAnimation","margin","shrink","variant"]),pt=useFormControl(),ht=ct;typeof ht>"u"&&pt&&(ht=pt.filled||pt.focused||pt.adornedStart);var mt=formControlState({props:tt,muiFormControl:pt,states:["margin","variant"]});return react.exports.createElement(FormLabel$1,_extends$a({"data-shrink":ht,className:clsx(rt.root,ot,pt&&rt.formControl,!ut&&rt.animated,ht&&rt.shrink,mt.margin==="dense"&&rt.marginDense,{filled:rt.filled,outlined:rt.outlined}[mt.variant]),classes:{focused:rt.focused,disabled:rt.disabled,error:rt.error,required:rt.required,asterisk:rt.asterisk},ref:nt},ft))});const InputLabel$1=withStyles(styles$l,{name:"MuiInputLabel"})(InputLabel);var ListContext=react.exports.createContext({});const ListContext$1=ListContext;var styles$k={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},List$2=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.className,ut=tt.component,ct=ut===void 0?"ul":ut,ft=tt.dense,pt=ft===void 0?!1:ft,ht=tt.disablePadding,mt=ht===void 0?!1:ht,yt=tt.subheader,vt=_objectWithoutProperties$3(tt,["children","classes","className","component","dense","disablePadding","subheader"]),Tt=react.exports.useMemo(function(){return{dense:pt}},[pt]);return react.exports.createElement(ListContext$1.Provider,{value:Tt},react.exports.createElement(ct,_extends$a({className:clsx(ot.root,st,pt&&ot.dense,!mt&&ot.padding,yt&&ot.subheader),ref:nt},vt),yt,rt))});const List$3=withStyles(styles$k,{name:"MuiList"})(List$2);var styles$j=function et(tt){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:tt.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:tt.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(tt.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:tt.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}},useEnhancedEffect$2=typeof window>"u"?react.exports.useEffect:react.exports.useLayoutEffect,ListItem=react.exports.forwardRef(function et(tt,nt){var rt=tt.alignItems,ot=rt===void 0?"center":rt,st=tt.autoFocus,ut=st===void 0?!1:st,ct=tt.button,ft=ct===void 0?!1:ct,pt=tt.children,ht=tt.classes,mt=tt.className,yt=tt.component,vt=tt.ContainerComponent,Tt=vt===void 0?"li":vt,Et=tt.ContainerProps;Et=Et===void 0?{}:Et;var xt=Et.className,At=_objectWithoutProperties$3(Et,["className"]),Ct=tt.dense,$t=Ct===void 0?!1:Ct,Ot=tt.disabled,Rt=Ot===void 0?!1:Ot,It=tt.disableGutters,kt=It===void 0?!1:It,Mt=tt.divider,Ft=Mt===void 0?!1:Mt,zt=tt.focusVisibleClassName,Vt=tt.selected,Zt=Vt===void 0?!1:Vt,Ut=_objectWithoutProperties$3(tt,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),Xt=react.exports.useContext(ListContext$1),Jt={dense:$t||Xt.dense||!1,alignItems:ot},gn=react.exports.useRef(null);useEnhancedEffect$2(function(){ut&&gn.current&&gn.current.focus()},[ut]);var An=react.exports.Children.toArray(pt),sn=An.length&&isMuiElement(An[An.length-1],["ListItemSecondaryAction"]),Sn=react.exports.useCallback(function(Ln){gn.current=reactDom.exports.findDOMNode(Ln)},[]),In=useForkRef(Sn,nt),_n=_extends$a({className:clsx(ht.root,mt,Jt.dense&&ht.dense,!kt&&ht.gutters,Ft&&ht.divider,Rt&&ht.disabled,ft&&ht.button,ot!=="center"&&ht.alignItemsFlexStart,sn&&ht.secondaryAction,Zt&&ht.selected),disabled:Rt},Ut),En=yt||"li";return ft&&(_n.component=yt||"div",_n.focusVisibleClassName=clsx(ht.focusVisible,zt),En=ButtonBase$1),sn?(En=!_n.component&&!yt?"div":En,Tt==="li"&&(En==="li"?En="div":_n.component==="li"&&(_n.component="div")),react.exports.createElement(ListContext$1.Provider,{value:Jt},react.exports.createElement(Tt,_extends$a({className:clsx(ht.container,xt),ref:In},At),react.exports.createElement(En,_n,An),An.pop()))):react.exports.createElement(ListContext$1.Provider,{value:Jt},react.exports.createElement(En,_extends$a({ref:In},_n),An))});const ListItem$1=withStyles(styles$j,{name:"MuiListItem"})(ListItem);var styles$i=function et(tt){return{root:{minWidth:56,color:tt.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}},ListItemIcon=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=_objectWithoutProperties$3(tt,["classes","className"]),ut=react.exports.useContext(ListContext$1);return react.exports.createElement("div",_extends$a({className:clsx(rt.root,ot,ut.alignItems==="flex-start"&&rt.alignItemsFlexStart),ref:nt},st))});const ListItemIcon$1=withStyles(styles$i,{name:"MuiListItemIcon"})(ListItemIcon);var styles$h={root:{position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"}},ListItemSecondaryAction=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=_objectWithoutProperties$3(tt,["classes","className"]);return react.exports.createElement("div",_extends$a({className:clsx(rt.root,ot),ref:nt},st))});ListItemSecondaryAction.muiName="ListItemSecondaryAction";const ListItemSecondaryAction$1=withStyles(styles$h,{name:"MuiListItemSecondaryAction"})(ListItemSecondaryAction);var styles$g={root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},ListItemText=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.className,ut=tt.disableTypography,ct=ut===void 0?!1:ut,ft=tt.inset,pt=ft===void 0?!1:ft,ht=tt.primary,mt=tt.primaryTypographyProps,yt=tt.secondary,vt=tt.secondaryTypographyProps,Tt=_objectWithoutProperties$3(tt,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),Et=react.exports.useContext(ListContext$1),xt=Et.dense,At=ht??rt;At!=null&&At.type!==Typography$1&&!ct&&(At=react.exports.createElement(Typography$1,_extends$a({variant:xt?"body2":"body1",className:ot.primary,component:"span",display:"block"},mt),At));var Ct=yt;return Ct!=null&&Ct.type!==Typography$1&&!ct&&(Ct=react.exports.createElement(Typography$1,_extends$a({variant:"body2",className:ot.secondary,color:"textSecondary",display:"block"},vt),Ct)),react.exports.createElement("div",_extends$a({className:clsx(ot.root,st,xt&&ot.dense,pt&&ot.inset,At&&Ct&&ot.multiline),ref:nt},Tt),At,Ct)});const ListItemText$1=withStyles(styles$g,{name:"MuiListItemText"})(ListItemText);var styles$f=function et(tt){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:tt.palette.text.secondary,fontFamily:tt.typography.fontFamily,fontWeight:tt.typography.fontWeightMedium,fontSize:tt.typography.pxToRem(14)},colorPrimary:{color:tt.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}},ListSubheader$1=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.color,ut=st===void 0?"default":st,ct=tt.component,ft=ct===void 0?"li":ct,pt=tt.disableGutters,ht=pt===void 0?!1:pt,mt=tt.disableSticky,yt=mt===void 0?!1:mt,vt=tt.inset,Tt=vt===void 0?!1:vt,Et=_objectWithoutProperties$3(tt,["classes","className","color","component","disableGutters","disableSticky","inset"]);return react.exports.createElement(ft,_extends$a({className:clsx(rt.root,ot,ut!=="default"&&rt["color".concat(capitalize(ut))],Tt&&rt.inset,!yt&&rt.sticky,!ht&&rt.gutters),ref:nt},Et))});const ListSubheader$1$1=withStyles(styles$f,{name:"MuiListSubheader"})(ListSubheader$1);function getOffsetTop(et,tt){var nt=0;return typeof tt=="number"?nt=tt:tt==="center"?nt=et.height/2:tt==="bottom"&&(nt=et.height),nt}function getOffsetLeft(et,tt){var nt=0;return typeof tt=="number"?nt=tt:tt==="center"?nt=et.width/2:tt==="right"&&(nt=et.width),nt}function getTransformOriginValue(et){return[et.horizontal,et.vertical].map(function(tt){return typeof tt=="number"?"".concat(tt,"px"):tt}).join(" ")}function getScrollParent$3(et,tt){for(var nt=tt,rt=0;nt&&nt!==et;)nt=nt.parentElement,rt+=nt.scrollTop;return rt}function getAnchorEl$1(et){return typeof et=="function"?et():et}var styles$e={root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},Popover=react.exports.forwardRef(function et(tt,nt){var rt=tt.action,ot=tt.anchorEl,st=tt.anchorOrigin,ut=st===void 0?{vertical:"top",horizontal:"left"}:st,ct=tt.anchorPosition,ft=tt.anchorReference,pt=ft===void 0?"anchorEl":ft,ht=tt.children,mt=tt.classes,yt=tt.className,vt=tt.container,Tt=tt.elevation,Et=Tt===void 0?8:Tt,xt=tt.getContentAnchorEl,At=tt.marginThreshold,Ct=At===void 0?16:At,$t=tt.onEnter,Ot=tt.onEntered,Rt=tt.onEntering,It=tt.onExit,kt=tt.onExited,Mt=tt.onExiting,Ft=tt.open,zt=tt.PaperProps,Vt=zt===void 0?{}:zt,Zt=tt.transformOrigin,Ut=Zt===void 0?{vertical:"top",horizontal:"left"}:Zt,Xt=tt.TransitionComponent,Jt=Xt===void 0?Grow$1:Xt,gn=tt.transitionDuration,An=gn===void 0?"auto":gn,sn=tt.TransitionProps,Sn=sn===void 0?{}:sn,In=_objectWithoutProperties$3(tt,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),_n=react.exports.useRef(),En=react.exports.useCallback(function(Bn){if(pt==="anchorPosition")return ct;var jn=getAnchorEl$1(ot),Ar=jn&&jn.nodeType===1?jn:ownerDocument(_n.current).body,Er=Ar.getBoundingClientRect(),Pr=Bn===0?ut.vertical:"center";return{top:Er.top+getOffsetTop(Er,Pr),left:Er.left+getOffsetLeft(Er,ut.horizontal)}},[ot,ut.horizontal,ut.vertical,ct,pt]),Ln=react.exports.useCallback(function(Bn){var jn=0;if(xt&&pt==="anchorEl"){var Ar=xt(Bn);if(Ar&&Bn.contains(Ar)){var Er=getScrollParent$3(Bn,Ar);jn=Ar.offsetTop+Ar.clientHeight/2-Er||0}}return jn},[ut.vertical,pt,xt]),wn=react.exports.useCallback(function(Bn){var jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return{vertical:getOffsetTop(Bn,Ut.vertical)+jn,horizontal:getOffsetLeft(Bn,Ut.horizontal)}},[Ut.horizontal,Ut.vertical]),Dn=react.exports.useCallback(function(Bn){var jn=Ln(Bn),Ar={width:Bn.offsetWidth,height:Bn.offsetHeight},Er=wn(Ar,jn);if(pt==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue(Er)};var Pr=En(jn),Nr=Pr.top-Er.vertical,Ir=Pr.left-Er.horizontal,no=Nr+Ar.height,ro=Ir+Ar.width,ao=ownerWindow(getAnchorEl$1(ot)),Xr=ao.innerHeight-Ct,Jr=ao.innerWidth-Ct;if(Nr<Ct){var So=Nr-Ct;Nr-=So,Er.vertical+=So}else if(no>Xr){var va=no-Xr;Nr-=va,Er.vertical+=va}if(Ir<Ct){var $o=Ir-Ct;Ir-=$o,Er.horizontal+=$o}else if(ro>Jr){var Qr=ro-Jr;Ir-=Qr,Er.horizontal+=Qr}return{top:"".concat(Math.round(Nr),"px"),left:"".concat(Math.round(Ir),"px"),transformOrigin:getTransformOriginValue(Er)}},[ot,pt,En,Ln,wn,Ct]),$n=react.exports.useCallback(function(){var Bn=_n.current;if(!!Bn){var jn=Dn(Bn);jn.top!==null&&(Bn.style.top=jn.top),jn.left!==null&&(Bn.style.left=jn.left),Bn.style.transformOrigin=jn.transformOrigin}},[Dn]),Gn=function(jn,Ar){Rt&&Rt(jn,Ar),$n()},Jn=react.exports.useCallback(function(Bn){_n.current=reactDom.exports.findDOMNode(Bn)},[]);react.exports.useEffect(function(){Ft&&$n()}),react.exports.useImperativeHandle(rt,function(){return Ft?{updatePosition:function(){$n()}}:null},[Ft,$n]),react.exports.useEffect(function(){if(!!Ft){var Bn=debounce$2(function(){$n()});return window.addEventListener("resize",Bn),function(){Bn.clear(),window.removeEventListener("resize",Bn)}}},[Ft,$n]);var zn=An;An==="auto"&&!Jt.muiSupportAuto&&(zn=void 0);var Qn=vt||(ot?ownerDocument(getAnchorEl$1(ot)).body:void 0);return react.exports.createElement(Modal$1,_extends$a({container:Qn,open:Ft,ref:nt,BackdropProps:{invisible:!0},className:clsx(mt.root,yt)},In),react.exports.createElement(Jt,_extends$a({appear:!0,in:Ft,onEnter:$t,onEntered:Ot,onExit:It,onExited:kt,onExiting:Mt,timeout:zn},Sn,{onEntering:createChainedFunction(Gn,Sn.onEntering)}),react.exports.createElement(Paper$1,_extends$a({elevation:Et,ref:Jn},Vt,{className:clsx(mt.paper,Vt.className)}),ht)))});const Popover$1=withStyles(styles$e,{name:"MuiPopover"})(Popover);function nextItem(et,tt,nt){return et===tt?et.firstChild:tt&&tt.nextElementSibling?tt.nextElementSibling:nt?null:et.firstChild}function previousItem(et,tt,nt){return et===tt?nt?et.firstChild:et.lastChild:tt&&tt.previousElementSibling?tt.previousElementSibling:nt?null:et.lastChild}function textCriteriaMatches(et,tt){if(tt===void 0)return!0;var nt=et.innerText;return nt===void 0&&(nt=et.textContent),nt=nt.trim().toLowerCase(),nt.length===0?!1:tt.repeating?nt[0]===tt.keys[0]:nt.indexOf(tt.keys.join(""))===0}function moveFocus(et,tt,nt,rt,ot,st){for(var ut=!1,ct=ot(et,tt,tt?nt:!1);ct;){if(ct===et.firstChild){if(ut)return;ut=!0}var ft=rt?!1:ct.disabled||ct.getAttribute("aria-disabled")==="true";if(!ct.hasAttribute("tabindex")||!textCriteriaMatches(ct,st)||ft)ct=ot(et,ct,nt);else{ct.focus();return}}}var useEnhancedEffect$1=typeof window>"u"?react.exports.useEffect:react.exports.useLayoutEffect,MenuList=react.exports.forwardRef(function et(tt,nt){var rt=tt.actions,ot=tt.autoFocus,st=ot===void 0?!1:ot,ut=tt.autoFocusItem,ct=ut===void 0?!1:ut,ft=tt.children,pt=tt.className,ht=tt.disabledItemsFocusable,mt=ht===void 0?!1:ht,yt=tt.disableListWrap,vt=yt===void 0?!1:yt,Tt=tt.onKeyDown,Et=tt.variant,xt=Et===void 0?"selectedMenu":Et,At=_objectWithoutProperties$3(tt,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),Ct=react.exports.useRef(null),$t=react.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect$1(function(){st&&Ct.current.focus()},[st]),react.exports.useImperativeHandle(rt,function(){return{adjustStyleForScrollbar:function(zt,Vt){var Zt=!Ct.current.style.width;if(zt.clientHeight<Ct.current.clientHeight&&Zt){var Ut="".concat(getScrollbarSize$2(),"px");Ct.current.style[Vt.direction==="rtl"?"paddingLeft":"paddingRight"]=Ut,Ct.current.style.width="calc(100% + ".concat(Ut,")")}return Ct.current}}},[]);var Ot=function(zt){var Vt=Ct.current,Zt=zt.key,Ut=ownerDocument(Vt).activeElement;if(Zt==="ArrowDown")zt.preventDefault(),moveFocus(Vt,Ut,vt,mt,nextItem);else if(Zt==="ArrowUp")zt.preventDefault(),moveFocus(Vt,Ut,vt,mt,previousItem);else if(Zt==="Home")zt.preventDefault(),moveFocus(Vt,null,vt,mt,nextItem);else if(Zt==="End")zt.preventDefault(),moveFocus(Vt,null,vt,mt,previousItem);else if(Zt.length===1){var Xt=$t.current,Jt=Zt.toLowerCase(),gn=performance.now();Xt.keys.length>0&&(gn-Xt.lastTime>500?(Xt.keys=[],Xt.repeating=!0,Xt.previousKeyMatched=!0):Xt.repeating&&Jt!==Xt.keys[0]&&(Xt.repeating=!1)),Xt.lastTime=gn,Xt.keys.push(Jt);var An=Ut&&!Xt.repeating&&textCriteriaMatches(Ut,Xt);Xt.previousKeyMatched&&(An||moveFocus(Vt,Ut,!1,mt,nextItem,Xt))?zt.preventDefault():Xt.previousKeyMatched=!1}Tt&&Tt(zt)},Rt=react.exports.useCallback(function(Ft){Ct.current=reactDom.exports.findDOMNode(Ft)},[]),It=useForkRef(Rt,nt),kt=-1;react.exports.Children.forEach(ft,function(Ft,zt){!react.exports.isValidElement(Ft)||Ft.props.disabled||(xt==="selectedMenu"&&Ft.props.selected||kt===-1)&&(kt=zt)});var Mt=react.exports.Children.map(ft,function(Ft,zt){if(zt===kt){var Vt={};return ct&&(Vt.autoFocus=!0),Ft.props.tabIndex===void 0&&xt==="selectedMenu"&&(Vt.tabIndex=0),react.exports.cloneElement(Ft,Vt)}return Ft});return react.exports.createElement(List$3,_extends$a({role:"menu",ref:It,className:pt,onKeyDown:Ot,tabIndex:st?0:-1},At),Mt)});const MenuList$1=MenuList;var RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},styles$d={paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},Menu$2=react.exports.forwardRef(function et(tt,nt){var rt=tt.autoFocus,ot=rt===void 0?!0:rt,st=tt.children,ut=tt.classes,ct=tt.disableAutoFocusItem,ft=ct===void 0?!1:ct,pt=tt.MenuListProps,ht=pt===void 0?{}:pt,mt=tt.onClose,yt=tt.onEntering,vt=tt.open,Tt=tt.PaperProps,Et=Tt===void 0?{}:Tt,xt=tt.PopoverClasses,At=tt.transitionDuration,Ct=At===void 0?"auto":At,$t=tt.TransitionProps;$t=$t===void 0?{}:$t;var Ot=$t.onEntering,Rt=_objectWithoutProperties$3($t,["onEntering"]),It=tt.variant,kt=It===void 0?"selectedMenu":It,Mt=_objectWithoutProperties$3(tt,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),Ft=useTheme(),zt=ot&&!ft&&vt,Vt=react.exports.useRef(null),Zt=react.exports.useRef(null),Ut=function(){return Zt.current},Xt=function(Sn,In){Vt.current&&Vt.current.adjustStyleForScrollbar(Sn,Ft),yt&&yt(Sn,In),Ot&&Ot(Sn,In)},Jt=function(Sn){Sn.key==="Tab"&&(Sn.preventDefault(),mt&&mt(Sn,"tabKeyDown"))},gn=-1;react.exports.Children.map(st,function(sn,Sn){!react.exports.isValidElement(sn)||sn.props.disabled||(kt!=="menu"&&sn.props.selected||gn===-1)&&(gn=Sn)});var An=react.exports.Children.map(st,function(sn,Sn){return Sn===gn?react.exports.cloneElement(sn,{ref:function(_n){Zt.current=reactDom.exports.findDOMNode(_n),setRef(sn.ref,_n)}}):sn});return react.exports.createElement(Popover$1,_extends$a({getContentAnchorEl:Ut,classes:xt,onClose:mt,TransitionProps:_extends$a({onEntering:Xt},Rt),anchorOrigin:Ft.direction==="rtl"?RTL_ORIGIN:LTR_ORIGIN,transformOrigin:Ft.direction==="rtl"?RTL_ORIGIN:LTR_ORIGIN,PaperProps:_extends$a({},Et,{classes:_extends$a({},Et.classes,{root:ut.paper})}),open:vt,ref:nt,transitionDuration:Ct},Mt),react.exports.createElement(MenuList$1,_extends$a({onKeyDown:Jt,actions:Vt,autoFocus:ot&&(gn===-1||ft),autoFocusItem:zt,variant:kt},ht,{className:clsx(ut.list,ht.className)}),An))});const Menu$1$1=withStyles(styles$d,{name:"MuiMenu"})(Menu$2);var styles$c=function et(tt){return{root:_extends$a({},tt.typography.body1,_defineProperty$d({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},tt.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:_extends$a({},tt.typography.body2,{minHeight:"auto"})}},MenuItem$3=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.component,ut=st===void 0?"li":st,ct=tt.disableGutters,ft=ct===void 0?!1:ct,pt=tt.ListItemClasses,ht=tt.role,mt=ht===void 0?"menuitem":ht,yt=tt.selected,vt=tt.tabIndex,Tt=_objectWithoutProperties$3(tt,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]),Et;return tt.disabled||(Et=vt!==void 0?vt:-1),react.exports.createElement(ListItem$1,_extends$a({button:!0,role:mt,tabIndex:Et,component:ut,selected:yt,disableGutters:ft,classes:_extends$a({dense:rt.dense},pt),className:clsx(rt.root,ot,yt&&rt.selected,!ft&&rt.gutters),ref:nt},Tt))});const MenuItem$2$1=withStyles(styles$c,{name:"MuiMenuItem"})(MenuItem$3);var NativeSelectInput=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.disabled,ut=tt.IconComponent,ct=tt.inputRef,ft=tt.variant,pt=ft===void 0?"standard":ft,ht=_objectWithoutProperties$3(tt,["classes","className","disabled","IconComponent","inputRef","variant"]);return react.exports.createElement(react.exports.Fragment,null,react.exports.createElement("select",_extends$a({className:clsx(rt.root,rt.select,rt[pt],ot,st&&rt.disabled),disabled:st,ref:ct||nt},ht)),tt.multiple?null:react.exports.createElement(ut,{className:clsx(rt.icon,rt["icon".concat(capitalize(pt))],st&&rt.disabled)}))});const NativeSelectInput$1=NativeSelectInput,ArrowDropDownIcon$1=createSvgIcon(react.exports.createElement("path",{d:"M7 10l5 5 5-5z"}));var styles$b=function et(tt){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:tt.palette.type==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:tt.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:tt.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:tt.palette.action.active,"&$disabled":{color:tt.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},defaultInput=react.exports.createElement(Input$3,null),NativeSelect=react.exports.forwardRef(function et(tt,nt){var rt=tt.children,ot=tt.classes,st=tt.IconComponent,ut=st===void 0?ArrowDropDownIcon$1:st,ct=tt.input,ft=ct===void 0?defaultInput:ct,pt=tt.inputProps;tt.variant;var ht=_objectWithoutProperties$3(tt,["children","classes","IconComponent","input","inputProps","variant"]),mt=useFormControl(),yt=formControlState({props:tt,muiFormControl:mt,states:["variant"]});return react.exports.cloneElement(ft,_extends$a({inputComponent:NativeSelectInput$1,inputProps:_extends$a({children:rt,classes:ot,IconComponent:ut,variant:yt.variant,type:void 0},pt,ft?ft.props.inputProps:{}),ref:nt},ht))});NativeSelect.muiName="Select";withStyles(styles$b,{name:"MuiNativeSelect"})(NativeSelect);var styles$a=function et(tt){return{root:{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"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:tt.transitions.create("width",{duration:150,easing:tt.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:tt.transitions.create("max-width",{duration:50,easing:tt.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:tt.transitions.create("max-width",{duration:100,easing:tt.transitions.easing.easeOut,delay:50})}}},NotchedOutline=react.exports.forwardRef(function et(tt,nt){tt.children;var rt=tt.classes,ot=tt.className,st=tt.label,ut=tt.labelWidth,ct=tt.notched,ft=tt.style,pt=_objectWithoutProperties$3(tt,["children","classes","className","label","labelWidth","notched","style"]),ht=useTheme(),mt=ht.direction==="rtl"?"right":"left";if(st!==void 0)return react.exports.createElement("fieldset",_extends$a({"aria-hidden":!0,className:clsx(rt.root,ot),ref:nt,style:ft},pt),react.exports.createElement("legend",{className:clsx(rt.legendLabelled,ct&&rt.legendNotched)},st?react.exports.createElement("span",null,st):react.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var yt=ut>0?ut*.75+8:.01;return react.exports.createElement("fieldset",_extends$a({"aria-hidden":!0,style:_extends$a(_defineProperty$d({},"padding".concat(capitalize(mt)),8),ft),className:clsx(rt.root,ot),ref:nt},pt),react.exports.createElement("legend",{className:rt.legend,style:{width:ct?yt:.01}},react.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))});const NotchedOutline$1=withStyles(styles$a,{name:"PrivateNotchedOutline"})(NotchedOutline);var styles$9=function et(tt){var nt=tt.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:tt.shape.borderRadius,"&:hover $notchedOutline":{borderColor:tt.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:nt}},"&$focused $notchedOutline":{borderColor:tt.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:tt.palette.error.main},"&$disabled $notchedOutline":{borderColor:tt.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:tt.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:nt},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:tt.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.type==="light"?null:"#fff",caretColor:tt.palette.type==="light"?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},OutlinedInput=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.fullWidth,st=ot===void 0?!1:ot,ut=tt.inputComponent,ct=ut===void 0?"input":ut,ft=tt.label,pt=tt.labelWidth,ht=pt===void 0?0:pt,mt=tt.multiline,yt=mt===void 0?!1:mt,vt=tt.notched,Tt=tt.type,Et=Tt===void 0?"text":Tt,xt=_objectWithoutProperties$3(tt,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return react.exports.createElement(InputBase$1,_extends$a({renderSuffix:function(Ct){return react.exports.createElement(NotchedOutline$1,{className:rt.notchedOutline,label:ft,labelWidth:ht,notched:typeof vt<"u"?vt:Boolean(Ct.startAdornment||Ct.filled||Ct.focused)})},classes:_extends$a({},rt,{root:clsx(rt.root,rt.underline),notchedOutline:null}),fullWidth:st,inputComponent:ct,multiline:yt,ref:nt,type:Et},xt))});OutlinedInput.muiName="Input";const OutlinedInput$1=withStyles(styles$9,{name:"MuiOutlinedInput"})(OutlinedInput);/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.16.1-lts
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */var isBrowser=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=function(){for(var et=["Edge","Trident","Firefox"],tt=0;tt<et.length;tt+=1)if(isBrowser&&navigator.userAgent.indexOf(et[tt])>=0)return 1;return 0}();function microtaskDebounce(et){var tt=!1;return function(){tt||(tt=!0,window.Promise.resolve().then(function(){tt=!1,et()}))}}function taskDebounce(et){var tt=!1;return function(){tt||(tt=!0,setTimeout(function(){tt=!1,et()},timeoutDuration))}}var supportsMicroTasks=isBrowser&&window.Promise,debounce$1=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$1(et){var tt={};return et&&tt.toString.call(et)==="[object Function]"}function getStyleComputedProperty(et,tt){if(et.nodeType!==1)return[];var nt=et.ownerDocument.defaultView,rt=nt.getComputedStyle(et,null);return tt?rt[tt]:rt}function getParentNode(et){return et.nodeName==="HTML"?et:et.parentNode||et.host}function getScrollParent$2(et){if(!et)return document.body;switch(et.nodeName){case"HTML":case"BODY":return et.ownerDocument.body;case"#document":return et.body}var tt=getStyleComputedProperty(et),nt=tt.overflow,rt=tt.overflowX,ot=tt.overflowY;return/(auto|scroll|overlay)/.test(nt+ot+rt)?et:getScrollParent$2(getParentNode(et))}function getReferenceNode(et){return et&&et.referenceNode?et.referenceNode:et}var isIE11=isBrowser&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser&&/MSIE 10/.test(navigator.userAgent);function isIE$1(et){return et===11?isIE11:et===10?isIE10:isIE11||isIE10}function getOffsetParent(et){if(!et)return document.documentElement;for(var tt=isIE$1(10)?document.body:null,nt=et.offsetParent||null;nt===tt&&et.nextElementSibling;)nt=(et=et.nextElementSibling).offsetParent;var rt=nt&&nt.nodeName;return!rt||rt==="BODY"||rt==="HTML"?et?et.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(nt.nodeName)!==-1&&getStyleComputedProperty(nt,"position")==="static"?getOffsetParent(nt):nt}function isOffsetContainer(et){var tt=et.nodeName;return tt==="BODY"?!1:tt==="HTML"||getOffsetParent(et.firstElementChild)===et}function getRoot(et){return et.parentNode!==null?getRoot(et.parentNode):et}function findCommonOffsetParent(et,tt){if(!et||!et.nodeType||!tt||!tt.nodeType)return document.documentElement;var nt=et.compareDocumentPosition(tt)&Node.DOCUMENT_POSITION_FOLLOWING,rt=nt?et:tt,ot=nt?tt:et,st=document.createRange();st.setStart(rt,0),st.setEnd(ot,0);var ut=st.commonAncestorContainer;if(et!==ut&&tt!==ut||rt.contains(ot))return isOffsetContainer(ut)?ut:getOffsetParent(ut);var ct=getRoot(et);return ct.host?findCommonOffsetParent(ct.host,tt):findCommonOffsetParent(et,getRoot(tt).host)}function getScroll(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",nt=tt==="top"?"scrollTop":"scrollLeft",rt=et.nodeName;if(rt==="BODY"||rt==="HTML"){var ot=et.ownerDocument.documentElement,st=et.ownerDocument.scrollingElement||ot;return st[nt]}return et[nt]}function includeScroll(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=getScroll(tt,"top"),ot=getScroll(tt,"left"),st=nt?-1:1;return et.top+=rt*st,et.bottom+=rt*st,et.left+=ot*st,et.right+=ot*st,et}function getBordersSize(et,tt){var nt=tt==="x"?"Left":"Top",rt=nt==="Left"?"Right":"Bottom";return parseFloat(et["border"+nt+"Width"])+parseFloat(et["border"+rt+"Width"])}function getSize(et,tt,nt,rt){return Math.max(tt["offset"+et],tt["scroll"+et],nt["client"+et],nt["offset"+et],nt["scroll"+et],isIE$1(10)?parseInt(nt["offset"+et])+parseInt(rt["margin"+(et==="Height"?"Top":"Left")])+parseInt(rt["margin"+(et==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(et){var tt=et.body,nt=et.documentElement,rt=isIE$1(10)&&getComputedStyle(nt);return{height:getSize("Height",tt,nt,rt),width:getSize("Width",tt,nt,rt)}}var classCallCheck=function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")},createClass=function(){function et(tt,nt){for(var rt=0;rt<nt.length;rt++){var ot=nt[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,nt,rt){return nt&&et(tt.prototype,nt),rt&&et(tt,rt),tt}}(),defineProperty=function(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et},_extends$7=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et};function getClientRect(et){return _extends$7({},et,{right:et.left+et.width,bottom:et.top+et.height})}function getBoundingClientRect(et){var tt={};try{if(isIE$1(10)){tt=et.getBoundingClientRect();var nt=getScroll(et,"top"),rt=getScroll(et,"left");tt.top+=nt,tt.left+=rt,tt.bottom+=nt,tt.right+=rt}else tt=et.getBoundingClientRect()}catch{}var ot={left:tt.left,top:tt.top,width:tt.right-tt.left,height:tt.bottom-tt.top},st=et.nodeName==="HTML"?getWindowSizes(et.ownerDocument):{},ut=st.width||et.clientWidth||ot.width,ct=st.height||et.clientHeight||ot.height,ft=et.offsetWidth-ut,pt=et.offsetHeight-ct;if(ft||pt){var ht=getStyleComputedProperty(et);ft-=getBordersSize(ht,"x"),pt-=getBordersSize(ht,"y"),ot.width-=ft,ot.height-=pt}return getClientRect(ot)}function getOffsetRectRelativeToArbitraryNode(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=isIE$1(10),ot=tt.nodeName==="HTML",st=getBoundingClientRect(et),ut=getBoundingClientRect(tt),ct=getScrollParent$2(et),ft=getStyleComputedProperty(tt),pt=parseFloat(ft.borderTopWidth),ht=parseFloat(ft.borderLeftWidth);nt&&ot&&(ut.top=Math.max(ut.top,0),ut.left=Math.max(ut.left,0));var mt=getClientRect({top:st.top-ut.top-pt,left:st.left-ut.left-ht,width:st.width,height:st.height});if(mt.marginTop=0,mt.marginLeft=0,!rt&&ot){var yt=parseFloat(ft.marginTop),vt=parseFloat(ft.marginLeft);mt.top-=pt-yt,mt.bottom-=pt-yt,mt.left-=ht-vt,mt.right-=ht-vt,mt.marginTop=yt,mt.marginLeft=vt}return(rt&&!nt?tt.contains(ct):tt===ct&&ct.nodeName!=="BODY")&&(mt=includeScroll(mt,tt)),mt}function getViewportOffsetRectRelativeToArtbitraryNode(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=et.ownerDocument.documentElement,rt=getOffsetRectRelativeToArbitraryNode(et,nt),ot=Math.max(nt.clientWidth,window.innerWidth||0),st=Math.max(nt.clientHeight,window.innerHeight||0),ut=tt?0:getScroll(nt),ct=tt?0:getScroll(nt,"left"),ft={top:ut-rt.top+rt.marginTop,left:ct-rt.left+rt.marginLeft,width:ot,height:st};return getClientRect(ft)}function isFixed(et){var tt=et.nodeName;if(tt==="BODY"||tt==="HTML")return!1;if(getStyleComputedProperty(et,"position")==="fixed")return!0;var nt=getParentNode(et);return nt?isFixed(nt):!1}function getFixedPositionOffsetParent(et){if(!et||!et.parentElement||isIE$1())return document.documentElement;for(var tt=et.parentElement;tt&&getStyleComputedProperty(tt,"transform")==="none";)tt=tt.parentElement;return tt||document.documentElement}function getBoundaries(et,tt,nt,rt){var ot=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,st={top:0,left:0},ut=ot?getFixedPositionOffsetParent(et):findCommonOffsetParent(et,getReferenceNode(tt));if(rt==="viewport")st=getViewportOffsetRectRelativeToArtbitraryNode(ut,ot);else{var ct=void 0;rt==="scrollParent"?(ct=getScrollParent$2(getParentNode(tt)),ct.nodeName==="BODY"&&(ct=et.ownerDocument.documentElement)):rt==="window"?ct=et.ownerDocument.documentElement:ct=rt;var ft=getOffsetRectRelativeToArbitraryNode(ct,ut,ot);if(ct.nodeName==="HTML"&&!isFixed(ut)){var pt=getWindowSizes(et.ownerDocument),ht=pt.height,mt=pt.width;st.top+=ft.top-ft.marginTop,st.bottom=ht+ft.top,st.left+=ft.left-ft.marginLeft,st.right=mt+ft.left}else st=ft}nt=nt||0;var yt=typeof nt=="number";return st.left+=yt?nt:nt.left||0,st.top+=yt?nt:nt.top||0,st.right-=yt?nt:nt.right||0,st.bottom-=yt?nt:nt.bottom||0,st}function getArea(et){var tt=et.width,nt=et.height;return tt*nt}function computeAutoPlacement(et,tt,nt,rt,ot){var st=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(et.indexOf("auto")===-1)return et;var ut=getBoundaries(nt,rt,st,ot),ct={top:{width:ut.width,height:tt.top-ut.top},right:{width:ut.right-tt.right,height:ut.height},bottom:{width:ut.width,height:ut.bottom-tt.bottom},left:{width:tt.left-ut.left,height:ut.height}},ft=Object.keys(ct).map(function(yt){return _extends$7({key:yt},ct[yt],{area:getArea(ct[yt])})}).sort(function(yt,vt){return vt.area-yt.area}),pt=ft.filter(function(yt){var vt=yt.width,Tt=yt.height;return vt>=nt.clientWidth&&Tt>=nt.clientHeight}),ht=pt.length>0?pt[0].key:ft[0].key,mt=et.split("-")[1];return ht+(mt?"-"+mt:"")}function getReferenceOffsets(et,tt,nt){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,ot=rt?getFixedPositionOffsetParent(tt):findCommonOffsetParent(tt,getReferenceNode(nt));return getOffsetRectRelativeToArbitraryNode(nt,ot,rt)}function getOuterSizes(et){var tt=et.ownerDocument.defaultView,nt=tt.getComputedStyle(et),rt=parseFloat(nt.marginTop||0)+parseFloat(nt.marginBottom||0),ot=parseFloat(nt.marginLeft||0)+parseFloat(nt.marginRight||0),st={width:et.offsetWidth+ot,height:et.offsetHeight+rt};return st}function getOppositePlacement(et){var tt={left:"right",right:"left",bottom:"top",top:"bottom"};return et.replace(/left|right|bottom|top/g,function(nt){return tt[nt]})}function getPopperOffsets(et,tt,nt){nt=nt.split("-")[0];var rt=getOuterSizes(et),ot={width:rt.width,height:rt.height},st=["right","left"].indexOf(nt)!==-1,ut=st?"top":"left",ct=st?"left":"top",ft=st?"height":"width",pt=st?"width":"height";return ot[ut]=tt[ut]+tt[ft]/2-rt[ft]/2,nt===ct?ot[ct]=tt[ct]-rt[pt]:ot[ct]=tt[getOppositePlacement(ct)],ot}function find(et,tt){return Array.prototype.find?et.find(tt):et.filter(tt)[0]}function findIndex$1(et,tt,nt){if(Array.prototype.findIndex)return et.findIndex(function(ot){return ot[tt]===nt});var rt=find(et,function(ot){return ot[tt]===nt});return et.indexOf(rt)}function runModifiers(et,tt,nt){var rt=nt===void 0?et:et.slice(0,findIndex$1(et,"name",nt));return rt.forEach(function(ot){ot.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var st=ot.function||ot.fn;ot.enabled&&isFunction$1(st)&&(tt.offsets.popper=getClientRect(tt.offsets.popper),tt.offsets.reference=getClientRect(tt.offsets.reference),tt=st(tt,ot))}),tt}function update(){if(!this.state.isDestroyed){var et={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};et.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),et.placement=computeAutoPlacement(this.options.placement,et.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),et.originalPlacement=et.placement,et.positionFixed=this.options.positionFixed,et.offsets.popper=getPopperOffsets(this.popper,et.offsets.reference,et.placement),et.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",et=runModifiers(this.modifiers,et),this.state.isCreated?this.options.onUpdate(et):(this.state.isCreated=!0,this.options.onCreate(et))}}function isModifierEnabled(et,tt){return et.some(function(nt){var rt=nt.name,ot=nt.enabled;return ot&&rt===tt})}function getSupportedPropertyName(et){for(var tt=[!1,"ms","Webkit","Moz","O"],nt=et.charAt(0).toUpperCase()+et.slice(1),rt=0;rt<tt.length;rt++){var ot=tt[rt],st=ot?""+ot+nt:et;if(typeof document.body.style[st]<"u")return st}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(et){var tt=et.ownerDocument;return tt?tt.defaultView:window}function attachToScrollParents(et,tt,nt,rt){var ot=et.nodeName==="BODY",st=ot?et.ownerDocument.defaultView:et;st.addEventListener(tt,nt,{passive:!0}),ot||attachToScrollParents(getScrollParent$2(st.parentNode),tt,nt,rt),rt.push(st)}function setupEventListeners(et,tt,nt,rt){nt.updateBound=rt,getWindow(et).addEventListener("resize",nt.updateBound,{passive:!0});var ot=getScrollParent$2(et);return attachToScrollParents(ot,"scroll",nt.updateBound,nt.scrollParents),nt.scrollElement=ot,nt.eventsEnabled=!0,nt}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(et,tt){return getWindow(et).removeEventListener("resize",tt.updateBound),tt.scrollParents.forEach(function(nt){nt.removeEventListener("scroll",tt.updateBound)}),tt.updateBound=null,tt.scrollParents=[],tt.scrollElement=null,tt.eventsEnabled=!1,tt}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(et){return et!==""&&!isNaN(parseFloat(et))&&isFinite(et)}function setStyles(et,tt){Object.keys(tt).forEach(function(nt){var rt="";["width","height","top","right","bottom","left"].indexOf(nt)!==-1&&isNumeric(tt[nt])&&(rt="px"),et.style[nt]=tt[nt]+rt})}function setAttributes(et,tt){Object.keys(tt).forEach(function(nt){var rt=tt[nt];rt!==!1?et.setAttribute(nt,tt[nt]):et.removeAttribute(nt)})}function applyStyle(et){return setStyles(et.instance.popper,et.styles),setAttributes(et.instance.popper,et.attributes),et.arrowElement&&Object.keys(et.arrowStyles).length&&setStyles(et.arrowElement,et.arrowStyles),et}function applyStyleOnLoad(et,tt,nt,rt,ot){var st=getReferenceOffsets(ot,tt,et,nt.positionFixed),ut=computeAutoPlacement(nt.placement,st,tt,et,nt.modifiers.flip.boundariesElement,nt.modifiers.flip.padding);return tt.setAttribute("x-placement",ut),setStyles(tt,{position:nt.positionFixed?"fixed":"absolute"}),nt}function getRoundedOffsets(et,tt){var nt=et.offsets,rt=nt.popper,ot=nt.reference,st=Math.round,ut=Math.floor,ct=function(At){return At},ft=st(ot.width),pt=st(rt.width),ht=["left","right"].indexOf(et.placement)!==-1,mt=et.placement.indexOf("-")!==-1,yt=ft%2===pt%2,vt=ft%2===1&&pt%2===1,Tt=tt?ht||mt||yt?st:ut:ct,Et=tt?st:ct;return{left:Tt(vt&&!mt&&tt?rt.left-1:rt.left),top:Et(rt.top),bottom:Et(rt.bottom),right:Tt(rt.right)}}var isFirefox$1=isBrowser&&/Firefox/i.test(navigator.userAgent);function computeStyle(et,tt){var nt=tt.x,rt=tt.y,ot=et.offsets.popper,st=find(et.instance.modifiers,function($t){return $t.name==="applyStyle"}).gpuAcceleration;st!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var ut=st!==void 0?st:tt.gpuAcceleration,ct=getOffsetParent(et.instance.popper),ft=getBoundingClientRect(ct),pt={position:ot.position},ht=getRoundedOffsets(et,window.devicePixelRatio<2||!isFirefox$1),mt=nt==="bottom"?"top":"bottom",yt=rt==="right"?"left":"right",vt=getSupportedPropertyName("transform"),Tt=void 0,Et=void 0;if(mt==="bottom"?ct.nodeName==="HTML"?Et=-ct.clientHeight+ht.bottom:Et=-ft.height+ht.bottom:Et=ht.top,yt==="right"?ct.nodeName==="HTML"?Tt=-ct.clientWidth+ht.right:Tt=-ft.width+ht.right:Tt=ht.left,ut&&vt)pt[vt]="translate3d("+Tt+"px, "+Et+"px, 0)",pt[mt]=0,pt[yt]=0,pt.willChange="transform";else{var xt=mt==="bottom"?-1:1,At=yt==="right"?-1:1;pt[mt]=Et*xt,pt[yt]=Tt*At,pt.willChange=mt+", "+yt}var Ct={"x-placement":et.placement};return et.attributes=_extends$7({},Ct,et.attributes),et.styles=_extends$7({},pt,et.styles),et.arrowStyles=_extends$7({},et.offsets.arrow,et.arrowStyles),et}function isModifierRequired(et,tt,nt){var rt=find(et,function(ct){var ft=ct.name;return ft===tt}),ot=!!rt&&et.some(function(ct){return ct.name===nt&&ct.enabled&&ct.order<rt.order});if(!ot){var st="`"+tt+"`",ut="`"+nt+"`";console.warn(ut+" modifier is required by "+st+" modifier in order to work, be sure to include it before "+st+"!")}return ot}function arrow(et,tt){var nt;if(!isModifierRequired(et.instance.modifiers,"arrow","keepTogether"))return et;var rt=tt.element;if(typeof rt=="string"){if(rt=et.instance.popper.querySelector(rt),!rt)return et}else if(!et.instance.popper.contains(rt))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),et;var ot=et.placement.split("-")[0],st=et.offsets,ut=st.popper,ct=st.reference,ft=["left","right"].indexOf(ot)!==-1,pt=ft?"height":"width",ht=ft?"Top":"Left",mt=ht.toLowerCase(),yt=ft?"left":"top",vt=ft?"bottom":"right",Tt=getOuterSizes(rt)[pt];ct[vt]-Tt<ut[mt]&&(et.offsets.popper[mt]-=ut[mt]-(ct[vt]-Tt)),ct[mt]+Tt>ut[vt]&&(et.offsets.popper[mt]+=ct[mt]+Tt-ut[vt]),et.offsets.popper=getClientRect(et.offsets.popper);var Et=ct[mt]+ct[pt]/2-Tt/2,xt=getStyleComputedProperty(et.instance.popper),At=parseFloat(xt["margin"+ht]),Ct=parseFloat(xt["border"+ht+"Width"]),$t=Et-et.offsets.popper[mt]-At-Ct;return $t=Math.max(Math.min(ut[pt]-Tt,$t),0),et.arrowElement=rt,et.offsets.arrow=(nt={},defineProperty(nt,mt,Math.round($t)),defineProperty(nt,yt,""),nt),et}function getOppositeVariation(et){return et==="end"?"start":et==="start"?"end":et}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements.slice(3);function clockwise(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=validPlacements.indexOf(et),rt=validPlacements.slice(nt+1).concat(validPlacements.slice(0,nt));return tt?rt.reverse():rt}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(et,tt){if(isModifierEnabled(et.instance.modifiers,"inner")||et.flipped&&et.placement===et.originalPlacement)return et;var nt=getBoundaries(et.instance.popper,et.instance.reference,tt.padding,tt.boundariesElement,et.positionFixed),rt=et.placement.split("-")[0],ot=getOppositePlacement(rt),st=et.placement.split("-")[1]||"",ut=[];switch(tt.behavior){case BEHAVIORS.FLIP:ut=[rt,ot];break;case BEHAVIORS.CLOCKWISE:ut=clockwise(rt);break;case BEHAVIORS.COUNTERCLOCKWISE:ut=clockwise(rt,!0);break;default:ut=tt.behavior}return ut.forEach(function(ct,ft){if(rt!==ct||ut.length===ft+1)return et;rt=et.placement.split("-")[0],ot=getOppositePlacement(rt);var pt=et.offsets.popper,ht=et.offsets.reference,mt=Math.floor,yt=rt==="left"&&mt(pt.right)>mt(ht.left)||rt==="right"&&mt(pt.left)<mt(ht.right)||rt==="top"&&mt(pt.bottom)>mt(ht.top)||rt==="bottom"&&mt(pt.top)<mt(ht.bottom),vt=mt(pt.left)<mt(nt.left),Tt=mt(pt.right)>mt(nt.right),Et=mt(pt.top)<mt(nt.top),xt=mt(pt.bottom)>mt(nt.bottom),At=rt==="left"&&vt||rt==="right"&&Tt||rt==="top"&&Et||rt==="bottom"&&xt,Ct=["top","bottom"].indexOf(rt)!==-1,$t=!!tt.flipVariations&&(Ct&&st==="start"&&vt||Ct&&st==="end"&&Tt||!Ct&&st==="start"&&Et||!Ct&&st==="end"&&xt),Ot=!!tt.flipVariationsByContent&&(Ct&&st==="start"&&Tt||Ct&&st==="end"&&vt||!Ct&&st==="start"&&xt||!Ct&&st==="end"&&Et),Rt=$t||Ot;(yt||At||Rt)&&(et.flipped=!0,(yt||At)&&(rt=ut[ft+1]),Rt&&(st=getOppositeVariation(st)),et.placement=rt+(st?"-"+st:""),et.offsets.popper=_extends$7({},et.offsets.popper,getPopperOffsets(et.instance.popper,et.offsets.reference,et.placement)),et=runModifiers(et.instance.modifiers,et,"flip"))}),et}function keepTogether(et){var tt=et.offsets,nt=tt.popper,rt=tt.reference,ot=et.placement.split("-")[0],st=Math.floor,ut=["top","bottom"].indexOf(ot)!==-1,ct=ut?"right":"bottom",ft=ut?"left":"top",pt=ut?"width":"height";return nt[ct]<st(rt[ft])&&(et.offsets.popper[ft]=st(rt[ft])-nt[pt]),nt[ft]>st(rt[ct])&&(et.offsets.popper[ft]=st(rt[ct])),et}function toValue(et,tt,nt,rt){var ot=et.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),st=+ot[1],ut=ot[2];if(!st)return et;if(ut.indexOf("%")===0){var ct=void 0;switch(ut){case"%p":ct=nt;break;case"%":case"%r":default:ct=rt}var ft=getClientRect(ct);return ft[tt]/100*st}else if(ut==="vh"||ut==="vw"){var pt=void 0;return ut==="vh"?pt=Math.max(document.documentElement.clientHeight,window.innerHeight||0):pt=Math.max(document.documentElement.clientWidth,window.innerWidth||0),pt/100*st}else return st}function parseOffset(et,tt,nt,rt){var ot=[0,0],st=["right","left"].indexOf(rt)!==-1,ut=et.split(/(\+|\-)/).map(function(ht){return ht.trim()}),ct=ut.indexOf(find(ut,function(ht){return ht.search(/,|\s/)!==-1}));ut[ct]&&ut[ct].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ft=/\s*,\s*|\s+/,pt=ct!==-1?[ut.slice(0,ct).concat([ut[ct].split(ft)[0]]),[ut[ct].split(ft)[1]].concat(ut.slice(ct+1))]:[ut];return pt=pt.map(function(ht,mt){var yt=(mt===1?!st:st)?"height":"width",vt=!1;return ht.reduce(function(Tt,Et){return Tt[Tt.length-1]===""&&["+","-"].indexOf(Et)!==-1?(Tt[Tt.length-1]=Et,vt=!0,Tt):vt?(Tt[Tt.length-1]+=Et,vt=!1,Tt):Tt.concat(Et)},[]).map(function(Tt){return toValue(Tt,yt,tt,nt)})}),pt.forEach(function(ht,mt){ht.forEach(function(yt,vt){isNumeric(yt)&&(ot[mt]+=yt*(ht[vt-1]==="-"?-1:1))})}),ot}function offset(et,tt){var nt=tt.offset,rt=et.placement,ot=et.offsets,st=ot.popper,ut=ot.reference,ct=rt.split("-")[0],ft=void 0;return isNumeric(+nt)?ft=[+nt,0]:ft=parseOffset(nt,st,ut,ct),ct==="left"?(st.top+=ft[0],st.left-=ft[1]):ct==="right"?(st.top+=ft[0],st.left+=ft[1]):ct==="top"?(st.left+=ft[0],st.top-=ft[1]):ct==="bottom"&&(st.left+=ft[0],st.top+=ft[1]),et.popper=st,et}function preventOverflow(et,tt){var nt=tt.boundariesElement||getOffsetParent(et.instance.popper);et.instance.reference===nt&&(nt=getOffsetParent(nt));var rt=getSupportedPropertyName("transform"),ot=et.instance.popper.style,st=ot.top,ut=ot.left,ct=ot[rt];ot.top="",ot.left="",ot[rt]="";var ft=getBoundaries(et.instance.popper,et.instance.reference,tt.padding,nt,et.positionFixed);ot.top=st,ot.left=ut,ot[rt]=ct,tt.boundaries=ft;var pt=tt.priority,ht=et.offsets.popper,mt={primary:function(vt){var Tt=ht[vt];return ht[vt]<ft[vt]&&!tt.escapeWithReference&&(Tt=Math.max(ht[vt],ft[vt])),defineProperty({},vt,Tt)},secondary:function(vt){var Tt=vt==="right"?"left":"top",Et=ht[Tt];return ht[vt]>ft[vt]&&!tt.escapeWithReference&&(Et=Math.min(ht[Tt],ft[vt]-(vt==="right"?ht.width:ht.height))),defineProperty({},Tt,Et)}};return pt.forEach(function(yt){var vt=["left","top"].indexOf(yt)!==-1?"primary":"secondary";ht=_extends$7({},ht,mt[vt](yt))}),et.offsets.popper=ht,et}function shift(et){var tt=et.placement,nt=tt.split("-")[0],rt=tt.split("-")[1];if(rt){var ot=et.offsets,st=ot.reference,ut=ot.popper,ct=["bottom","top"].indexOf(nt)!==-1,ft=ct?"left":"top",pt=ct?"width":"height",ht={start:defineProperty({},ft,st[ft]),end:defineProperty({},ft,st[ft]+st[pt]-ut[pt])};et.offsets.popper=_extends$7({},ut,ht[rt])}return et}function hide(et){if(!isModifierRequired(et.instance.modifiers,"hide","preventOverflow"))return et;var tt=et.offsets.reference,nt=find(et.instance.modifiers,function(rt){return rt.name==="preventOverflow"}).boundaries;if(tt.bottom<nt.top||tt.left>nt.right||tt.top>nt.bottom||tt.right<nt.left){if(et.hide===!0)return et;et.hide=!0,et.attributes["x-out-of-boundaries"]=""}else{if(et.hide===!1)return et;et.hide=!1,et.attributes["x-out-of-boundaries"]=!1}return et}function inner(et){var tt=et.placement,nt=tt.split("-")[0],rt=et.offsets,ot=rt.popper,st=rt.reference,ut=["left","right"].indexOf(nt)!==-1,ct=["top","left"].indexOf(nt)===-1;return ot[ut?"left":"top"]=st[nt]-(ct?ot[ut?"width":"height"]:0),et.placement=getOppositePlacement(tt),et.offsets.popper=getClientRect(ot),et}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function et(){},onUpdate:function et(){},modifiers},Popper$2=function(){function et(tt,nt){var rt=this,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,et),this.scheduleUpdate=function(){return requestAnimationFrame(rt.update)},this.update=debounce$1(this.update.bind(this)),this.options=_extends$7({},et.Defaults,ot),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=tt&&tt.jquery?tt[0]:tt,this.popper=nt&&nt.jquery?nt[0]:nt,this.options.modifiers={},Object.keys(_extends$7({},et.Defaults.modifiers,ot.modifiers)).forEach(function(ut){rt.options.modifiers[ut]=_extends$7({},et.Defaults.modifiers[ut]||{},ot.modifiers?ot.modifiers[ut]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(ut){return _extends$7({name:ut},rt.options.modifiers[ut])}).sort(function(ut,ct){return ut.order-ct.order}),this.modifiers.forEach(function(ut){ut.enabled&&isFunction$1(ut.onLoad)&&ut.onLoad(rt.reference,rt.popper,rt.options,ut,rt.state)}),this.update();var st=this.options.eventsEnabled;st&&this.enableEventListeners(),this.state.eventsEnabled=st}return createClass(et,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),et}();Popper$2.Utils=(typeof window<"u"?window:global).PopperUtils;Popper$2.placements=placements;Popper$2.Defaults=Defaults;const PopperJs=Popper$2;function flipPlacement(et,tt){var nt=tt&&tt.direction||"ltr";if(nt==="ltr")return et;switch(et){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 et}}function getAnchorEl(et){return typeof et=="function"?et():et}var useEnhancedEffect=typeof window<"u"?react.exports.useLayoutEffect:react.exports.useEffect,defaultPopperOptions={},Popper=react.exports.forwardRef(function et(tt,nt){var rt=tt.anchorEl,ot=tt.children,st=tt.container,ut=tt.disablePortal,ct=ut===void 0?!1:ut,ft=tt.keepMounted,pt=ft===void 0?!1:ft,ht=tt.modifiers,mt=tt.open,yt=tt.placement,vt=yt===void 0?"bottom":yt,Tt=tt.popperOptions,Et=Tt===void 0?defaultPopperOptions:Tt,xt=tt.popperRef,At=tt.style,Ct=tt.transition,$t=Ct===void 0?!1:Ct,Ot=_objectWithoutProperties$3(tt,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),Rt=react.exports.useRef(null),It=useForkRef(Rt,nt),kt=react.exports.useRef(null),Mt=useForkRef(kt,xt),Ft=react.exports.useRef(Mt);useEnhancedEffect(function(){Ft.current=Mt},[Mt]),react.exports.useImperativeHandle(xt,function(){return kt.current},[]);var zt=react.exports.useState(!0),Vt=zt[0],Zt=zt[1],Ut=useTheme$1(),Xt=flipPlacement(vt,Ut),Jt=react.exports.useState(Xt),gn=Jt[0],An=Jt[1];react.exports.useEffect(function(){kt.current&&kt.current.update()});var sn=react.exports.useCallback(function(){if(!(!Rt.current||!rt||!mt)){kt.current&&(kt.current.destroy(),Ft.current(null));var wn=function(Gn){An(Gn.placement)};getAnchorEl(rt);var Dn=new PopperJs(getAnchorEl(rt),Rt.current,_extends$a({placement:Xt},Et,{modifiers:_extends$a({},ct?{}:{preventOverflow:{boundariesElement:"window"}},ht,Et.modifiers),onCreate:createChainedFunction(wn,Et.onCreate),onUpdate:createChainedFunction(wn,Et.onUpdate)}));Ft.current(Dn)}},[rt,ct,ht,mt,Xt,Et]),Sn=react.exports.useCallback(function(wn){setRef(It,wn),sn()},[It,sn]),In=function(){Zt(!1)},_n=function(){!kt.current||(kt.current.destroy(),Ft.current(null))},En=function(){Zt(!0),_n()};if(react.exports.useEffect(function(){return function(){_n()}},[]),react.exports.useEffect(function(){!mt&&!$t&&_n()},[mt,$t]),!pt&&!mt&&(!$t||Vt))return null;var Ln={placement:gn};return $t&&(Ln.TransitionProps={in:mt,onEnter:In,onExited:En}),react.exports.createElement(Portal$2,{disablePortal:ct,container:st},react.exports.createElement("div",_extends$a({ref:Sn,role:"tooltip"},Ot,{style:_extends$a({position:"fixed",top:0,left:0,display:!mt&&pt&&!$t?"none":null},At)}),typeof ot=="function"?ot(Ln):ot))});const Popper$1=Popper,RadioButtonUncheckedIcon=createSvgIcon(react.exports.createElement("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"})),RadioButtonCheckedIcon=createSvgIcon(react.exports.createElement("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"}));var styles$8=function et(tt){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:tt.transitions.create("transform",{easing:tt.transitions.easing.easeOut,duration:tt.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:tt.transitions.create("transform",{easing:tt.transitions.easing.easeIn,duration:tt.transitions.duration.shortest})},checked:{}}};function RadioButtonIcon(et){var tt=et.checked,nt=et.classes,rt=et.fontSize;return react.exports.createElement("div",{className:clsx(nt.root,tt&&nt.checked)},react.exports.createElement(RadioButtonUncheckedIcon,{fontSize:rt}),react.exports.createElement(RadioButtonCheckedIcon,{fontSize:rt,className:nt.layer}))}const RadioButtonIcon$1=withStyles(styles$8,{name:"PrivateRadioButtonIcon"})(RadioButtonIcon);var RadioGroupContext=react.exports.createContext();const RadioGroupContext$1=RadioGroupContext;function useRadioGroup(){return react.exports.useContext(RadioGroupContext$1)}var styles$7=function et(tt){return{root:{color:tt.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:tt.palette.primary.main,"&:hover":{backgroundColor:alpha(tt.palette.primary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:tt.palette.action.disabled}},colorSecondary:{"&$checked":{color:tt.palette.secondary.main,"&:hover":{backgroundColor:alpha(tt.palette.secondary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:tt.palette.action.disabled}}}},defaultCheckedIcon=react.exports.createElement(RadioButtonIcon$1,{checked:!0}),defaultIcon=react.exports.createElement(RadioButtonIcon$1,null),Radio=react.exports.forwardRef(function et(tt,nt){var rt=tt.checked,ot=tt.classes,st=tt.color,ut=st===void 0?"secondary":st,ct=tt.name,ft=tt.onChange,pt=tt.size,ht=pt===void 0?"medium":pt,mt=_objectWithoutProperties$3(tt,["checked","classes","color","name","onChange","size"]),yt=useRadioGroup(),vt=rt,Tt=createChainedFunction(ft,yt&&yt.onChange),Et=ct;return yt&&(typeof vt>"u"&&(vt=yt.value===tt.value),typeof Et>"u"&&(Et=yt.name)),react.exports.createElement(SwitchBase$1,_extends$a({color:ut,type:"radio",icon:react.exports.cloneElement(defaultIcon,{fontSize:ht==="small"?"small":"medium"}),checkedIcon:react.exports.cloneElement(defaultCheckedIcon,{fontSize:ht==="small"?"small":"medium"}),classes:{root:clsx(ot.root,ot["color".concat(capitalize(ut))]),checked:ot.checked,disabled:ot.disabled},name:Et,checked:vt,onChange:Tt,ref:nt},mt))});const Radio$1=withStyles(styles$7,{name:"MuiRadio"})(Radio);function areEqualValues(et,tt){return _typeof$8(tt)==="object"&&tt!==null?et===tt:String(et)===String(tt)}function isEmpty(et){return et==null||typeof et=="string"&&!et.trim()}var SelectInput=react.exports.forwardRef(function et(tt,nt){var rt=tt["aria-label"],ot=tt.autoFocus,st=tt.autoWidth,ut=tt.children,ct=tt.classes,ft=tt.className,pt=tt.defaultValue,ht=tt.disabled,mt=tt.displayEmpty,yt=tt.IconComponent,vt=tt.inputRef,Tt=tt.labelId,Et=tt.MenuProps,xt=Et===void 0?{}:Et,At=tt.multiple,Ct=tt.name,$t=tt.onBlur,Ot=tt.onChange,Rt=tt.onClose,It=tt.onFocus,kt=tt.onOpen,Mt=tt.open,Ft=tt.readOnly,zt=tt.renderValue,Vt=tt.SelectDisplayProps,Zt=Vt===void 0?{}:Vt,Ut=tt.tabIndex;tt.type;var Xt=tt.value,Jt=tt.variant,gn=Jt===void 0?"standard":Jt,An=_objectWithoutProperties$3(tt,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),sn=useControlled({controlled:Xt,default:pt,name:"Select"}),Sn=_slicedToArray$1(sn,2),In=Sn[0],_n=Sn[1],En=react.exports.useRef(null),Ln=react.exports.useState(null),wn=Ln[0],Dn=Ln[1],$n=react.exports.useRef(Mt!=null),Gn=$n.current,Jn=react.exports.useState(),zn=Jn[0],Qn=Jn[1],Bn=react.exports.useState(!1),jn=Bn[0],Ar=Bn[1],Er=useForkRef(nt,vt);react.exports.useImperativeHandle(Er,function(){return{focus:function(){wn.focus()},node:En.current,value:In}},[wn,In]),react.exports.useEffect(function(){ot&&wn&&wn.focus()},[ot,wn]),react.exports.useEffect(function(){if(wn){var Do=ownerDocument(wn).getElementById(Tt);if(Do){var bo=function(){getSelection().isCollapsed&&wn.focus()};return Do.addEventListener("click",bo),function(){Do.removeEventListener("click",bo)}}}},[Tt,wn]);var Pr=function(bo,Vo){bo?kt&&kt(Vo):Rt&&Rt(Vo),Gn||(Qn(st?null:wn.clientWidth),Ar(bo))},Nr=function(bo){bo.button===0&&(bo.preventDefault(),wn.focus(),Pr(!0,bo))},Ir=function(bo){Pr(!1,bo)},no=react.exports.Children.toArray(ut),ro=function(bo){var Vo=no.map(function(xs){return xs.props.value}).indexOf(bo.target.value);if(Vo!==-1){var Ts=no[Vo];_n(Ts.props.value),Ot&&Ot(bo,Ts)}},ao=function(bo){return function(Vo){At||Pr(!1,Vo);var Ts;if(At){Ts=Array.isArray(In)?In.slice():[];var xs=In.indexOf(bo.props.value);xs===-1?Ts.push(bo.props.value):Ts.splice(xs,1)}else Ts=bo.props.value;bo.props.onClick&&bo.props.onClick(Vo),In!==Ts&&(_n(Ts),Ot&&(Vo.persist(),Object.defineProperty(Vo,"target",{writable:!0,value:{value:Ts,name:Ct}}),Ot(Vo,bo)))}},Xr=function(bo){if(!Ft){var Vo=[" ","ArrowUp","ArrowDown","Enter"];Vo.indexOf(bo.key)!==-1&&(bo.preventDefault(),Pr(!0,bo))}},Jr=wn!==null&&(Gn?Mt:jn),So=function(bo){!Jr&&$t&&(bo.persist(),Object.defineProperty(bo,"target",{writable:!0,value:{value:In,name:Ct}}),$t(bo))};delete An["aria-invalid"];var va,$o,Qr=[],jo=!1;(isFilled({value:In})||mt)&&(zt?va=zt(In):jo=!0);var Bo=no.map(function(Do){if(!react.exports.isValidElement(Do))return null;var bo;if(At){if(!Array.isArray(In))throw new Error(formatMuiErrorMessage(2));bo=In.some(function(Vo){return areEqualValues(Vo,Do.props.value)}),bo&&jo&&Qr.push(Do.props.children)}else bo=areEqualValues(In,Do.props.value),bo&&jo&&($o=Do.props.children);return react.exports.cloneElement(Do,{"aria-selected":bo?"true":void 0,onClick:ao(Do),onKeyUp:function(Ts){Ts.key===" "&&Ts.preventDefault(),Do.props.onKeyUp&&Do.props.onKeyUp(Ts)},role:"option",selected:bo,value:void 0,"data-value":Do.props.value})});jo&&(va=At?Qr.join(", "):$o);var ss=zn;!st&&Gn&&wn&&(ss=wn.clientWidth);var Us;typeof Ut<"u"?Us=Ut:Us=ht?null:0;var Eo=Zt.id||(Ct?"mui-component-select-".concat(Ct):void 0);return react.exports.createElement(react.exports.Fragment,null,react.exports.createElement("div",_extends$a({className:clsx(ct.root,ct.select,ct.selectMenu,ct[gn],ft,ht&&ct.disabled),ref:Dn,tabIndex:Us,role:"button","aria-disabled":ht?"true":void 0,"aria-expanded":Jr?"true":void 0,"aria-haspopup":"listbox","aria-label":rt,"aria-labelledby":[Tt,Eo].filter(Boolean).join(" ")||void 0,onKeyDown:Xr,onMouseDown:ht||Ft?null:Nr,onBlur:So,onFocus:It},Zt,{id:Eo}),isEmpty(va)?react.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):va),react.exports.createElement("input",_extends$a({value:Array.isArray(In)?In.join(","):In,name:Ct,ref:En,"aria-hidden":!0,onChange:ro,tabIndex:-1,className:ct.nativeInput,autoFocus:ot},An)),react.exports.createElement(yt,{className:clsx(ct.icon,ct["icon".concat(capitalize(gn))],Jr&&ct.iconOpen,ht&&ct.disabled)}),react.exports.createElement(Menu$1$1,_extends$a({id:"menu-".concat(Ct||""),anchorEl:wn,open:Jr,onClose:Ir},xt,{MenuListProps:_extends$a({"aria-labelledby":Tt,role:"listbox",disableListWrap:!0},xt.MenuListProps),PaperProps:_extends$a({},xt.PaperProps,{style:_extends$a({minWidth:ss},xt.PaperProps!=null?xt.PaperProps.style:null)})}),Bo))});const SelectInput$1=SelectInput;var styles$6=styles$b,_ref$1=react.exports.createElement(Input$3,null),_ref2$1=react.exports.createElement(FilledInput$1,null),Select=react.exports.forwardRef(function et(tt,nt){var rt=tt.autoWidth,ot=rt===void 0?!1:rt,st=tt.children,ut=tt.classes,ct=tt.displayEmpty,ft=ct===void 0?!1:ct,pt=tt.IconComponent,ht=pt===void 0?ArrowDropDownIcon$1:pt,mt=tt.id,yt=tt.input,vt=tt.inputProps,Tt=tt.label,Et=tt.labelId,xt=tt.labelWidth,At=xt===void 0?0:xt,Ct=tt.MenuProps,$t=tt.multiple,Ot=$t===void 0?!1:$t,Rt=tt.native,It=Rt===void 0?!1:Rt,kt=tt.onClose,Mt=tt.onOpen,Ft=tt.open,zt=tt.renderValue,Vt=tt.SelectDisplayProps,Zt=tt.variant,Ut=Zt===void 0?"standard":Zt,Xt=_objectWithoutProperties$3(tt,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),Jt=It?NativeSelectInput$1:SelectInput$1,gn=useFormControl(),An=formControlState({props:tt,muiFormControl:gn,states:["variant"]}),sn=An.variant||Ut,Sn=yt||{standard:_ref$1,outlined:react.exports.createElement(OutlinedInput$1,{label:Tt,labelWidth:At}),filled:_ref2$1}[sn];return react.exports.cloneElement(Sn,_extends$a({inputComponent:Jt,inputProps:_extends$a({children:st,IconComponent:ht,variant:sn,type:void 0,multiple:Ot},It?{id:mt}:{autoWidth:ot,displayEmpty:ft,labelId:Et,MenuProps:Ct,onClose:kt,onOpen:Mt,open:Ft,renderValue:zt,SelectDisplayProps:_extends$a({id:mt},Vt)},vt,{classes:vt?mergeClasses({baseClasses:ut,newClasses:vt.classes,Component:et}):ut},yt?yt.props.inputProps:{}),ref:nt},Xt))});Select.muiName="Select";const Select$1=withStyles(styles$6,{name:"MuiSelect"})(Select);var styles$5=function et(tt){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:_extends$a({zIndex:1},tt.typography.body2,{fontSize:tt.typography.pxToRem(12),lineHeight:1.2,transition:tt.transitions.create(["transform"],{duration:tt.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:tt.palette.primary.contrastText,transform:"rotate(45deg)"}}};function ValueLabel(et){var tt=et.children,nt=et.classes,rt=et.className,ot=et.open,st=et.value,ut=et.valueLabelDisplay;return ut==="off"?tt:react.exports.cloneElement(tt,{className:clsx(tt.props.className,(ot||ut==="on")&&nt.open,nt.thumb)},react.exports.createElement("span",{className:clsx(nt.offset,rt)},react.exports.createElement("span",{className:nt.circle},react.exports.createElement("span",{className:nt.label},st))))}const ValueLabel$1=withStyles(styles$5,{name:"PrivateValueLabel"})(ValueLabel);function asc(et,tt){return et-tt}function clamp$2(et,tt,nt){return Math.min(Math.max(tt,et),nt)}function findClosest(et,tt){var nt=et.reduce(function(ot,st,ut){var ct=Math.abs(tt-st);return ot===null||ct<ot.distance||ct===ot.distance?{distance:ct,index:ut}:ot},null),rt=nt.index;return rt}function trackFinger(et,tt){if(tt.current!==void 0&&et.changedTouches){for(var nt=0;nt<et.changedTouches.length;nt+=1){var rt=et.changedTouches[nt];if(rt.identifier===tt.current)return{x:rt.clientX,y:rt.clientY}}return!1}return{x:et.clientX,y:et.clientY}}function valueToPercent(et,tt,nt){return(et-tt)*100/(nt-tt)}function percentToValue(et,tt,nt){return(nt-tt)*et+tt}function getDecimalPrecision(et){if(Math.abs(et)<1){var tt=et.toExponential().split("e-"),nt=tt[0].split(".")[1];return(nt?nt.length:0)+parseInt(tt[1],10)}var rt=et.toString().split(".")[1];return rt?rt.length:0}function roundValueToStep(et,tt,nt){var rt=Math.round((et-nt)/tt)*tt+nt;return Number(rt.toFixed(getDecimalPrecision(tt)))}function setValueIndex(et){var tt=et.values,nt=et.source,rt=et.newValue,ot=et.index;if(tt[ot]===rt)return nt;var st=tt.slice();return st[ot]=rt,st}function focusThumb(et){var tt=et.sliderRef,nt=et.activeIndex,rt=et.setActive;(!tt.current.contains(document.activeElement)||Number(document.activeElement.getAttribute("data-index"))!==nt)&&tt.current.querySelector('[role="slider"][data-index="'.concat(nt,'"]')).focus(),rt&&rt(nt)}var axisProps={horizontal:{offset:function et(tt){return{left:"".concat(tt,"%")}},leap:function et(tt){return{width:"".concat(tt,"%")}}},"horizontal-reverse":{offset:function et(tt){return{right:"".concat(tt,"%")}},leap:function et(tt){return{width:"".concat(tt,"%")}}},vertical:{offset:function et(tt){return{bottom:"".concat(tt,"%")}},leap:function et(tt){return{height:"".concat(tt,"%")}}}},Identity=function et(tt){return tt},styles$4=function et(tt){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:tt.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:tt.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:tt.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:tt.palette.type==="light"?lighten(tt.palette.primary.main,.62):darken(tt.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:tt.transitions.create(["box-shadow"],{duration:tt.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(alpha(tt.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(alpha(tt.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(alpha(tt.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(alpha(tt.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:tt.palette.background.paper,opacity:.8},markLabel:_extends$a({},tt.typography.body2,{color:tt.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:tt.palette.text.primary}}},Slider=react.exports.forwardRef(function et(tt,nt){var rt=tt["aria-label"],ot=tt["aria-labelledby"],st=tt["aria-valuetext"],ut=tt.classes,ct=tt.className,ft=tt.color,pt=ft===void 0?"primary":ft,ht=tt.component,mt=ht===void 0?"span":ht,yt=tt.defaultValue,vt=tt.disabled,Tt=vt===void 0?!1:vt,Et=tt.getAriaLabel,xt=tt.getAriaValueText,At=tt.marks,Ct=At===void 0?!1:At,$t=tt.max,Ot=$t===void 0?100:$t,Rt=tt.min,It=Rt===void 0?0:Rt,kt=tt.name,Mt=tt.onChange,Ft=tt.onChangeCommitted,zt=tt.onMouseDown,Vt=tt.orientation,Zt=Vt===void 0?"horizontal":Vt,Ut=tt.scale,Xt=Ut===void 0?Identity:Ut,Jt=tt.step,gn=Jt===void 0?1:Jt,An=tt.ThumbComponent,sn=An===void 0?"span":An,Sn=tt.track,In=Sn===void 0?"normal":Sn,_n=tt.value,En=tt.ValueLabelComponent,Ln=En===void 0?ValueLabel$1:En,wn=tt.valueLabelDisplay,Dn=wn===void 0?"off":wn,$n=tt.valueLabelFormat,Gn=$n===void 0?Identity:$n,Jn=_objectWithoutProperties$3(tt,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),zn=useTheme(),Qn=react.exports.useRef(),Bn=react.exports.useState(-1),jn=Bn[0],Ar=Bn[1],Er=react.exports.useState(-1),Pr=Er[0],Nr=Er[1],Ir=useControlled({controlled:_n,default:yt,name:"Slider"}),no=_slicedToArray$1(Ir,2),ro=no[0],ao=no[1],Xr=Array.isArray(ro),Jr=Xr?ro.slice().sort(asc):[ro];Jr=Jr.map(function(io){return clamp$2(io,It,Ot)});var So=Ct===!0&&gn!==null?_toConsumableArray$1(Array(Math.floor((Ot-It)/gn)+1)).map(function(io,Hr){return{value:It+gn*Hr}}):Ct||[],va=useIsFocusVisible(),$o=va.isFocusVisible,Qr=va.onBlurVisible,jo=va.ref,Bo=react.exports.useState(-1),ss=Bo[0],Us=Bo[1],Eo=react.exports.useRef(),Do=useForkRef(jo,Eo),bo=useForkRef(nt,Do),Vo=useEventCallback(function(io){var Hr=Number(io.currentTarget.getAttribute("data-index"));$o(io)&&Us(Hr),Nr(Hr)}),Ts=useEventCallback(function(){ss!==-1&&(Us(-1),Qr()),Nr(-1)}),xs=useEventCallback(function(io){var Hr=Number(io.currentTarget.getAttribute("data-index"));Nr(Hr)}),Qo=useEventCallback(function(){Nr(-1)}),Gs=zn.direction==="rtl",Es=useEventCallback(function(io){var Hr=Number(io.currentTarget.getAttribute("data-index")),Lo=Jr[Hr],Ro=(Ot-It)/10,No=So.map(function(Sl){return Sl.value}),lr=No.indexOf(Lo),Ho,Cr=Gs?"ArrowLeft":"ArrowRight",Bs=Gs?"ArrowRight":"ArrowLeft";switch(io.key){case"Home":Ho=It;break;case"End":Ho=Ot;break;case"PageUp":gn&&(Ho=Lo+Ro);break;case"PageDown":gn&&(Ho=Lo-Ro);break;case Cr:case"ArrowUp":gn?Ho=Lo+gn:Ho=No[lr+1]||No[No.length-1];break;case Bs:case"ArrowDown":gn?Ho=Lo-gn:Ho=No[lr-1]||No[0];break;default:return}if(io.preventDefault(),gn&&(Ho=roundValueToStep(Ho,gn,It)),Ho=clamp$2(Ho,It,Ot),Xr){var Dl=Ho;Ho=setValueIndex({values:Jr,source:ro,newValue:Ho,index:Hr}).sort(asc),focusThumb({sliderRef:Eo,activeIndex:Ho.indexOf(Dl)})}ao(Ho),Us(Hr),Mt&&Mt(io,Ho),Ft&&Ft(io,Ho)}),Il=react.exports.useRef(),ws=Zt;Gs&&Zt!=="vertical"&&(ws+="-reverse");var vn=function(Hr){var Lo=Hr.finger,Ro=Hr.move,No=Ro===void 0?!1:Ro,lr=Hr.values,Ho=Hr.source,Cr=Eo.current,Bs=Cr.getBoundingClientRect(),Dl=Bs.width,Sl=Bs.height,Os=Bs.bottom,dl=Bs.left,As;ws.indexOf("vertical")===0?As=(Os-Lo.y)/Sl:As=(Lo.x-dl)/Dl,ws.indexOf("-reverse")!==-1&&(As=1-As);var ol;if(ol=percentToValue(As,It,Ot),gn)ol=roundValueToStep(ol,gn,It);else{var _l=So.map(function(Cs){return Cs.value}),Ul=findClosest(_l,ol);ol=_l[Ul]}ol=clamp$2(ol,It,Ot);var zo=0;if(Xr){No?zo=Il.current:zo=findClosest(lr,ol);var Zo=ol;ol=setValueIndex({values:lr,source:Ho,newValue:ol,index:zo}).sort(asc),zo=ol.indexOf(Zo),Il.current=zo}return{newValue:ol,activeIndex:zo}},Rn=useEventCallback(function(io){var Hr=trackFinger(io,Qn);if(!!Hr){var Lo=vn({finger:Hr,move:!0,values:Jr,source:ro}),Ro=Lo.newValue,No=Lo.activeIndex;focusThumb({sliderRef:Eo,activeIndex:No,setActive:Ar}),ao(Ro),Mt&&Mt(io,Ro)}}),Zr=useEventCallback(function(io){var Hr=trackFinger(io,Qn);if(!!Hr){var Lo=vn({finger:Hr,values:Jr,source:ro}),Ro=Lo.newValue;Ar(-1),io.type==="touchend"&&Nr(-1),Ft&&Ft(io,Ro),Qn.current=void 0;var No=ownerDocument(Eo.current);No.removeEventListener("mousemove",Rn),No.removeEventListener("mouseup",Zr),No.removeEventListener("touchmove",Rn),No.removeEventListener("touchend",Zr)}}),Wn=useEventCallback(function(io){io.preventDefault();var Hr=io.changedTouches[0];Hr!=null&&(Qn.current=Hr.identifier);var Lo=trackFinger(io,Qn),Ro=vn({finger:Lo,values:Jr,source:ro}),No=Ro.newValue,lr=Ro.activeIndex;focusThumb({sliderRef:Eo,activeIndex:lr,setActive:Ar}),ao(No),Mt&&Mt(io,No);var Ho=ownerDocument(Eo.current);Ho.addEventListener("touchmove",Rn),Ho.addEventListener("touchend",Zr)});react.exports.useEffect(function(){var io=Eo.current;io.addEventListener("touchstart",Wn);var Hr=ownerDocument(io);return function(){io.removeEventListener("touchstart",Wn),Hr.removeEventListener("mousemove",Rn),Hr.removeEventListener("mouseup",Zr),Hr.removeEventListener("touchmove",Rn),Hr.removeEventListener("touchend",Zr)}},[Zr,Rn,Wn]);var Kn=useEventCallback(function(io){zt&&zt(io),io.preventDefault();var Hr=trackFinger(io,Qn),Lo=vn({finger:Hr,values:Jr,source:ro}),Ro=Lo.newValue,No=Lo.activeIndex;focusThumb({sliderRef:Eo,activeIndex:No,setActive:Ar}),ao(Ro),Mt&&Mt(io,Ro);var lr=ownerDocument(Eo.current);lr.addEventListener("mousemove",Rn),lr.addEventListener("mouseup",Zr)}),Ur=valueToPercent(Xr?Jr[0]:It,It,Ot),Kr=valueToPercent(Jr[Jr.length-1],It,Ot)-Ur,Go=_extends$a({},axisProps[ws].offset(Ur),axisProps[ws].leap(Kr));return react.exports.createElement(mt,_extends$a({ref:bo,className:clsx(ut.root,ut["color".concat(capitalize(pt))],ct,Tt&&ut.disabled,So.length>0&&So.some(function(io){return io.label})&&ut.marked,In===!1&&ut.trackFalse,Zt==="vertical"&&ut.vertical,In==="inverted"&&ut.trackInverted),onMouseDown:Kn},Jn),react.exports.createElement("span",{className:ut.rail}),react.exports.createElement("span",{className:ut.track,style:Go}),react.exports.createElement("input",{value:Jr.join(","),name:kt,type:"hidden"}),So.map(function(io,Hr){var Lo=valueToPercent(io.value,It,Ot),Ro=axisProps[ws].offset(Lo),No;return In===!1?No=Jr.indexOf(io.value)!==-1:No=In==="normal"&&(Xr?io.value>=Jr[0]&&io.value<=Jr[Jr.length-1]:io.value<=Jr[0])||In==="inverted"&&(Xr?io.value<=Jr[0]||io.value>=Jr[Jr.length-1]:io.value>=Jr[0]),react.exports.createElement(react.exports.Fragment,{key:io.value},react.exports.createElement("span",{style:Ro,"data-index":Hr,className:clsx(ut.mark,No&&ut.markActive)}),io.label!=null?react.exports.createElement("span",{"aria-hidden":!0,"data-index":Hr,style:Ro,className:clsx(ut.markLabel,No&&ut.markLabelActive)},io.label):null)}),Jr.map(function(io,Hr){var Lo=valueToPercent(io,It,Ot),Ro=axisProps[ws].offset(Lo);return react.exports.createElement(Ln,{key:Hr,valueLabelFormat:Gn,valueLabelDisplay:Dn,className:ut.valueLabel,value:typeof Gn=="function"?Gn(Xt(io),Hr):Gn,index:Hr,open:Pr===Hr||jn===Hr||Dn==="on",disabled:Tt},react.exports.createElement(sn,{className:clsx(ut.thumb,ut["thumbColor".concat(capitalize(pt))],jn===Hr&&ut.active,Tt&&ut.disabled,ss===Hr&&ut.focusVisible),tabIndex:Tt?null:0,role:"slider",style:Ro,"data-index":Hr,"aria-label":Et?Et(Hr):rt,"aria-labelledby":ot,"aria-orientation":Zt,"aria-valuemax":Xt(Ot),"aria-valuemin":Xt(It),"aria-valuenow":Xt(io),"aria-valuetext":xt?xt(Xt(io),Hr):st,onKeyDown:Es,onFocus:Vo,onBlur:Ts,onMouseOver:xs,onMouseLeave:Qo}))}))});const Slider$1=withStyles(styles$4,{name:"MuiSlider"})(Slider);var styles$3=function et(tt){return{root:{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"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:tt.palette.type==="light"?tt.palette.grey[50]:tt.palette.grey[400],transition:tt.transitions.create(["left","transform"],{duration:tt.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:tt.palette.type==="light"?tt.palette.grey[400]:tt.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:tt.palette.type==="light"?.12:.1}},colorPrimary:{"&$checked":{color:tt.palette.primary.main,"&:hover":{backgroundColor:alpha(tt.palette.primary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:tt.palette.type==="light"?tt.palette.grey[400]:tt.palette.grey[800]},"&$checked + $track":{backgroundColor:tt.palette.primary.main},"&$disabled + $track":{backgroundColor:tt.palette.type==="light"?tt.palette.common.black:tt.palette.common.white}},colorSecondary:{"&$checked":{color:tt.palette.secondary.main,"&:hover":{backgroundColor:alpha(tt.palette.secondary.main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:tt.palette.type==="light"?tt.palette.grey[400]:tt.palette.grey[800]},"&$checked + $track":{backgroundColor:tt.palette.secondary.main},"&$disabled + $track":{backgroundColor:tt.palette.type==="light"?tt.palette.common.black:tt.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:tt.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:tt.transitions.create(["opacity","background-color"],{duration:tt.transitions.duration.shortest}),backgroundColor:tt.palette.type==="light"?tt.palette.common.black:tt.palette.common.white,opacity:tt.palette.type==="light"?.38:.3}}},Switch$1=react.exports.forwardRef(function et(tt,nt){var rt=tt.classes,ot=tt.className,st=tt.color,ut=st===void 0?"secondary":st,ct=tt.edge,ft=ct===void 0?!1:ct,pt=tt.size,ht=pt===void 0?"medium":pt,mt=_objectWithoutProperties$3(tt,["classes","className","color","edge","size"]),yt=react.exports.createElement("span",{className:rt.thumb});return react.exports.createElement("span",{className:clsx(rt.root,ot,{start:rt.edgeStart,end:rt.edgeEnd}[ft],ht==="small"&&rt["size".concat(capitalize(ht))])},react.exports.createElement(SwitchBase$1,_extends$a({type:"checkbox",icon:yt,checkedIcon:yt,classes:{root:clsx(rt.switchBase,rt["color".concat(capitalize(ut))]),input:rt.input,checked:rt.checked,disabled:rt.disabled},ref:nt},mt)),react.exports.createElement("span",{className:rt.track}))});const Switch$1$1=withStyles(styles$3,{name:"MuiSwitch"})(Switch$1);var variantComponent={standard:Input$3,filled:FilledInput$1,outlined:OutlinedInput$1},styles$2={root:{}},TextField=react.exports.forwardRef(function et(tt,nt){var rt=tt.autoComplete,ot=tt.autoFocus,st=ot===void 0?!1:ot,ut=tt.children,ct=tt.classes,ft=tt.className,pt=tt.color,ht=pt===void 0?"primary":pt,mt=tt.defaultValue,yt=tt.disabled,vt=yt===void 0?!1:yt,Tt=tt.error,Et=Tt===void 0?!1:Tt,xt=tt.FormHelperTextProps,At=tt.fullWidth,Ct=At===void 0?!1:At,$t=tt.helperText,Ot=tt.hiddenLabel,Rt=tt.id,It=tt.InputLabelProps,kt=tt.inputProps,Mt=tt.InputProps,Ft=tt.inputRef,zt=tt.label,Vt=tt.multiline,Zt=Vt===void 0?!1:Vt,Ut=tt.name,Xt=tt.onBlur,Jt=tt.onChange,gn=tt.onFocus,An=tt.placeholder,sn=tt.required,Sn=sn===void 0?!1:sn,In=tt.rows,_n=tt.rowsMax,En=tt.maxRows,Ln=tt.minRows,wn=tt.select,Dn=wn===void 0?!1:wn,$n=tt.SelectProps,Gn=tt.type,Jn=tt.value,zn=tt.variant,Qn=zn===void 0?"standard":zn,Bn=_objectWithoutProperties$3(tt,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","maxRows","minRows","select","SelectProps","type","value","variant"]),jn={};if(Qn==="outlined"&&(It&&typeof It.shrink<"u"&&(jn.notched=It.shrink),zt)){var Ar,Er=(Ar=It?.required)!==null&&Ar!==void 0?Ar:Sn;jn.label=react.exports.createElement(react.exports.Fragment,null,zt,Er&&"\xA0*")}Dn&&((!$n||!$n.native)&&(jn.id=void 0),jn["aria-describedby"]=void 0);var Pr=$t&&Rt?"".concat(Rt,"-helper-text"):void 0,Nr=zt&&Rt?"".concat(Rt,"-label"):void 0,Ir=variantComponent[Qn],no=react.exports.createElement(Ir,_extends$a({"aria-describedby":Pr,autoComplete:rt,autoFocus:st,defaultValue:mt,fullWidth:Ct,multiline:Zt,name:Ut,rows:In,rowsMax:_n,maxRows:En,minRows:Ln,type:Gn,value:Jn,id:Rt,inputRef:Ft,onBlur:Xt,onChange:Jt,onFocus:gn,placeholder:An,inputProps:kt},jn,Mt));return react.exports.createElement(FormControl$1,_extends$a({className:clsx(ct.root,ft),disabled:vt,error:Et,fullWidth:Ct,hiddenLabel:Ot,ref:nt,required:Sn,color:ht,variant:Qn},Bn),zt&&react.exports.createElement(InputLabel$1,_extends$a({htmlFor:Rt,id:Nr},It),zt),Dn?react.exports.createElement(Select$1,_extends$a({"aria-describedby":Pr,id:Rt,labelId:Nr,value:Jn,input:no},$n),ut):no,$t&&react.exports.createElement(FormHelperText$1,_extends$a({id:Pr},xt),$t))});const TextField$1=withStyles(styles$2,{name:"MuiTextField"})(TextField);function round(et){return Math.round(et*1e5)/1e5}function arrowGenerator(){return{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}}}var styles$1=function et(tt){return{popper:{zIndex:tt.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:arrowGenerator(),tooltip:{backgroundColor:alpha(tt.palette.grey[700],.9),borderRadius:tt.shape.borderRadius,color:tt.palette.common.white,fontFamily:tt.typography.fontFamily,padding:"4px 8px",fontSize:tt.typography.pxToRem(10),lineHeight:"".concat(round(14/10),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:tt.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:alpha(tt.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:tt.typography.pxToRem(14),lineHeight:"".concat(round(16/14),"em"),fontWeight:tt.typography.fontWeightRegular},tooltipPlacementLeft:_defineProperty$d({transformOrigin:"right center",margin:"0 24px "},tt.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:_defineProperty$d({transformOrigin:"left center",margin:"0 24px"},tt.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:_defineProperty$d({transformOrigin:"center bottom",margin:"24px 0"},tt.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:_defineProperty$d({transformOrigin:"center top",margin:"24px 0"},tt.breakpoints.up("sm"),{margin:"14px 0"})}},hystersisOpen=!1,hystersisTimer=null,Tooltip$1=react.exports.forwardRef(function et(tt,nt){var rt=tt.arrow,ot=rt===void 0?!1:rt,st=tt.children,ut=tt.classes,ct=tt.disableFocusListener,ft=ct===void 0?!1:ct,pt=tt.disableHoverListener,ht=pt===void 0?!1:pt,mt=tt.disableTouchListener,yt=mt===void 0?!1:mt,vt=tt.enterDelay,Tt=vt===void 0?100:vt,Et=tt.enterNextDelay,xt=Et===void 0?0:Et,At=tt.enterTouchDelay,Ct=At===void 0?700:At,$t=tt.id,Ot=tt.interactive,Rt=Ot===void 0?!1:Ot,It=tt.leaveDelay,kt=It===void 0?0:It,Mt=tt.leaveTouchDelay,Ft=Mt===void 0?1500:Mt,zt=tt.onClose,Vt=tt.onOpen,Zt=tt.open,Ut=tt.placement,Xt=Ut===void 0?"bottom":Ut,Jt=tt.PopperComponent,gn=Jt===void 0?Popper$1:Jt,An=tt.PopperProps,sn=tt.title,Sn=tt.TransitionComponent,In=Sn===void 0?Grow$1:Sn,_n=tt.TransitionProps,En=_objectWithoutProperties$3(tt,["arrow","children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"]),Ln=useTheme(),wn=react.exports.useState(),Dn=wn[0],$n=wn[1],Gn=react.exports.useState(null),Jn=Gn[0],zn=Gn[1],Qn=react.exports.useRef(!1),Bn=react.exports.useRef(),jn=react.exports.useRef(),Ar=react.exports.useRef(),Er=react.exports.useRef(),Pr=useControlled({controlled:Zt,default:!1,name:"Tooltip",state:"open"}),Nr=_slicedToArray$1(Pr,2),Ir=Nr[0],no=Nr[1],ro=Ir,ao=useId$1($t);react.exports.useEffect(function(){return function(){clearTimeout(Bn.current),clearTimeout(jn.current),clearTimeout(Ar.current),clearTimeout(Er.current)}},[]);var Xr=function(Kn){clearTimeout(hystersisTimer),hystersisOpen=!0,no(!0),Vt&&Vt(Kn)},Jr=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(Ur){var Kr=st.props;Ur.type==="mouseover"&&Kr.onMouseOver&&Kn&&Kr.onMouseOver(Ur),!(Qn.current&&Ur.type!=="touchstart")&&(Dn&&Dn.removeAttribute("title"),clearTimeout(jn.current),clearTimeout(Ar.current),Tt||hystersisOpen&&xt?(Ur.persist(),jn.current=setTimeout(function(){Xr(Ur)},hystersisOpen?xt:Tt)):Xr(Ur))}},So=useIsFocusVisible(),va=So.isFocusVisible,$o=So.onBlurVisible,Qr=So.ref,jo=react.exports.useState(!1),Bo=jo[0],ss=jo[1],Us=function(){Bo&&(ss(!1),$o())},Eo=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(Ur){Dn||$n(Ur.currentTarget),va(Ur)&&(ss(!0),Jr()(Ur));var Kr=st.props;Kr.onFocus&&Kn&&Kr.onFocus(Ur)}},Do=function(Kn){clearTimeout(hystersisTimer),hystersisTimer=setTimeout(function(){hystersisOpen=!1},800+kt),no(!1),zt&&zt(Kn),clearTimeout(Bn.current),Bn.current=setTimeout(function(){Qn.current=!1},Ln.transitions.duration.shortest)},bo=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(Ur){var Kr=st.props;Ur.type==="blur"&&(Kr.onBlur&&Kn&&Kr.onBlur(Ur),Us()),Ur.type==="mouseleave"&&Kr.onMouseLeave&&Ur.currentTarget===Dn&&Kr.onMouseLeave(Ur),clearTimeout(jn.current),clearTimeout(Ar.current),Ur.persist(),Ar.current=setTimeout(function(){Do(Ur)},kt)}},Vo=function(Kn){Qn.current=!0;var Ur=st.props;Ur.onTouchStart&&Ur.onTouchStart(Kn)},Ts=function(Kn){Vo(Kn),clearTimeout(Ar.current),clearTimeout(Bn.current),clearTimeout(Er.current),Kn.persist(),Er.current=setTimeout(function(){Jr()(Kn)},Ct)},xs=function(Kn){st.props.onTouchEnd&&st.props.onTouchEnd(Kn),clearTimeout(Er.current),clearTimeout(Ar.current),Kn.persist(),Ar.current=setTimeout(function(){Do(Kn)},Ft)},Qo=useForkRef($n,nt),Gs=useForkRef(Qr,Qo),Es=react.exports.useCallback(function(Wn){setRef(Gs,reactDom.exports.findDOMNode(Wn))},[Gs]),Il=useForkRef(st.ref,Es);sn===""&&(ro=!1);var ws=!ro&&!ht,vn=_extends$a({"aria-describedby":ro?ao:null,title:ws&&typeof sn=="string"?sn:null},En,st.props,{className:clsx(En.className,st.props.className),onTouchStart:Vo,ref:Il}),Rn={};yt||(vn.onTouchStart=Ts,vn.onTouchEnd=xs),ht||(vn.onMouseOver=Jr(),vn.onMouseLeave=bo(),Rt&&(Rn.onMouseOver=Jr(!1),Rn.onMouseLeave=bo(!1))),ft||(vn.onFocus=Eo(),vn.onBlur=bo(),Rt&&(Rn.onFocus=Eo(!1),Rn.onBlur=bo(!1)));var Zr=react.exports.useMemo(function(){return deepmerge({popperOptions:{modifiers:{arrow:{enabled:Boolean(Jn),element:Jn}}}},An)},[Jn,An]);return react.exports.createElement(react.exports.Fragment,null,react.exports.cloneElement(st,vn),react.exports.createElement(gn,_extends$a({className:clsx(ut.popper,Rt&&ut.popperInteractive,ot&&ut.popperArrow),placement:Xt,anchorEl:Dn,open:Dn?ro:!1,id:vn["aria-describedby"],transition:!0},Rn,Zr),function(Wn){var Kn=Wn.placement,Ur=Wn.TransitionProps;return react.exports.createElement(In,_extends$a({timeout:Ln.transitions.duration.shorter},Ur,_n),react.exports.createElement("div",{className:clsx(ut.tooltip,ut["tooltipPlacement".concat(capitalize(Kn.split("-")[0]))],Qn.current&&ut.touch,ot&&ut.tooltipArrow)},sn,ot?react.exports.createElement("span",{className:ut.arrow,ref:zn}):null))}))});const Tooltip$2=withStyles(styles$1,{name:"MuiTooltip",flip:!1})(Tooltip$1),ArrowDropDownIcon=createSvgIcon(react.exports.createElement("path",{d:"M7 10l5 5 5-5z"}));function stripDiacritics(et){return typeof et.normalize<"u"?et.normalize("NFD").replace(/[\u0300-\u036f]/g,""):et}function createFilterOptions(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},tt=et.ignoreAccents,nt=tt===void 0?!0:tt,rt=et.ignoreCase,ot=rt===void 0?!0:rt,st=et.limit,ut=et.matchFrom,ct=ut===void 0?"any":ut,ft=et.stringify,pt=et.trim,ht=pt===void 0?!1:pt;return function(mt,yt){var vt=yt.inputValue,Tt=yt.getOptionLabel,Et=ht?vt.trim():vt;ot&&(Et=Et.toLowerCase()),nt&&(Et=stripDiacritics(Et));var xt=mt.filter(function(At){var Ct=(ft||Tt)(At);return ot&&(Ct=Ct.toLowerCase()),nt&&(Ct=stripDiacritics(Ct)),ct==="start"?Ct.indexOf(Et)===0:Ct.indexOf(Et)>-1});return typeof st=="number"?xt.slice(0,st):xt}}function findIndex(et,tt){for(var nt=0;nt<et.length;nt+=1)if(tt(et[nt]))return nt;return-1}var defaultFilterOptions=createFilterOptions(),pageSize=5;function useAutocomplete(et){var tt=et.autoComplete,nt=tt===void 0?!1:tt,rt=et.autoHighlight,ot=rt===void 0?!1:rt,st=et.autoSelect,ut=st===void 0?!1:st,ct=et.blurOnSelect,ft=ct===void 0?!1:ct,pt=et.clearOnBlur,ht=pt===void 0?!et.freeSolo:pt,mt=et.clearOnEscape,yt=mt===void 0?!1:mt,vt=et.componentName,Tt=vt===void 0?"useAutocomplete":vt,Et=et.debug,xt=Et===void 0?!1:Et,At=et.defaultValue,Ct=At===void 0?et.multiple?[]:null:At,$t=et.disableClearable,Ot=$t===void 0?!1:$t,Rt=et.disableCloseOnSelect,It=Rt===void 0?!1:Rt,kt=et.disabledItemsFocusable,Mt=kt===void 0?!1:kt,Ft=et.disableListWrap,zt=Ft===void 0?!1:Ft,Vt=et.filterOptions,Zt=Vt===void 0?defaultFilterOptions:Vt,Ut=et.filterSelectedOptions,Xt=Ut===void 0?!1:Ut,Jt=et.freeSolo,gn=Jt===void 0?!1:Jt,An=et.getOptionDisabled,sn=et.getOptionLabel,Sn=sn===void 0?function(Yo){return Yo}:sn,In=et.getOptionSelected,_n=In===void 0?function(Yo,ko){return Yo===ko}:In,En=et.groupBy,Ln=et.handleHomeEndKeys,wn=Ln===void 0?!et.freeSolo:Ln,Dn=et.id,$n=et.includeInputInList,Gn=$n===void 0?!1:$n,Jn=et.inputValue,zn=et.multiple,Qn=zn===void 0?!1:zn,Bn=et.onChange,jn=et.onClose,Ar=et.onHighlightChange,Er=et.onInputChange,Pr=et.onOpen,Nr=et.open,Ir=et.openOnFocus,no=Ir===void 0?!1:Ir,ro=et.options,ao=et.selectOnFocus,Xr=ao===void 0?!et.freeSolo:ao,Jr=et.value,So=useId$1(Dn),va=Sn,$o=react.exports.useRef(!1),Qr=react.exports.useRef(!0),jo=react.exports.useRef(null),Bo=react.exports.useRef(null),ss=react.exports.useState(null),Us=ss[0],Eo=ss[1],Do=react.exports.useState(-1),bo=Do[0],Vo=Do[1],Ts=ot?0:-1,xs=react.exports.useRef(Ts),Qo=useControlled({controlled:Jr,default:Ct,name:Tt}),Gs=_slicedToArray$1(Qo,2),Es=Gs[0],Il=Gs[1],ws=useControlled({controlled:Jn,default:"",name:Tt,state:"inputValue"}),vn=_slicedToArray$1(ws,2),Rn=vn[0],Zr=vn[1],Wn=react.exports.useState(!1),Kn=Wn[0],Ur=Wn[1],Kr=useEventCallback(function(Yo,ko){var po;if(Qn)po="";else if(ko==null)po="";else{var qo=va(ko);po=typeof qo=="string"?qo:""}Rn!==po&&(Zr(po),Er&&Er(Yo,po,"reset"))});react.exports.useEffect(function(){Kr(null,Es)},[Es,Kr]);var Go=useControlled({controlled:Nr,default:!1,name:Tt,state:"open"}),io=_slicedToArray$1(Go,2),Hr=io[0],Lo=io[1],Ro=!Qn&&Es!=null&&Rn===va(Es),No=Hr,lr=No?Zt(ro.filter(function(Yo){return!(Xt&&(Qn?Es:[Es]).some(function(ko){return ko!==null&&_n(Yo,ko)}))}),{inputValue:Ro?"":Rn,getOptionLabel:va}):[],Ho=useEventCallback(function(Yo){Yo===-1?jo.current.focus():Us.querySelector('[data-tag-index="'.concat(Yo,'"]')).focus()});react.exports.useEffect(function(){Qn&&bo>Es.length-1&&(Vo(-1),Ho(-1))},[Es,Qn,bo,Ho]);function Cr(Yo,ko){if(!Bo.current||Yo===-1)return-1;for(var po=Yo;;){if(ko==="next"&&po===lr.length||ko==="previous"&&po===-1)return-1;var qo=Bo.current.querySelector('[data-option-index="'.concat(po,'"]')),Wl=Mt?!1:qo&&(qo.disabled||qo.getAttribute("aria-disabled")==="true");if(qo&&!qo.hasAttribute("tabindex")||Wl)po+=ko==="next"?1:-1;else return po}}var Bs=useEventCallback(function(Yo){var ko=Yo.event,po=Yo.index,qo=Yo.reason,Wl=qo===void 0?"auto":qo;if(xs.current=po,po===-1?jo.current.removeAttribute("aria-activedescendant"):jo.current.setAttribute("aria-activedescendant","".concat(So,"-option-").concat(po)),Ar&&Ar(ko,po===-1?null:lr[po],Wl),!!Bo.current){var Vl=Bo.current.querySelector("[data-focus]");Vl&&Vl.removeAttribute("data-focus");var Zs=Bo.current.parentElement.querySelector('[role="listbox"]');if(!!Zs){if(po===-1){Zs.scrollTop=0;return}var _d=Bo.current.querySelector('[data-option-index="'.concat(po,'"]'));if(!!_d&&(_d.setAttribute("data-focus","true"),Zs.scrollHeight>Zs.clientHeight&&Wl!=="mouse")){var vu=_d,Tp=Zs.clientHeight+Zs.scrollTop,P1=vu.offsetTop+vu.offsetHeight;P1>Tp?Zs.scrollTop=P1-Zs.clientHeight:vu.offsetTop-vu.offsetHeight*(En?1.3:0)<Zs.scrollTop&&(Zs.scrollTop=vu.offsetTop-vu.offsetHeight*(En?1.3:0))}}}}),Dl=useEventCallback(function(Yo){var ko=Yo.event,po=Yo.diff,qo=Yo.direction,Wl=qo===void 0?"next":qo,Vl=Yo.reason,Zs=Vl===void 0?"auto":Vl;if(!!No){var _d=function(){var Ep=lr.length-1;if(po==="reset")return Ts;if(po==="start")return 0;if(po==="end")return Ep;var Ap=xs.current+po;return Ap<0?Ap===-1&&Gn?-1:zt&&xs.current!==-1||Math.abs(po)>1?0:Ep:Ap>Ep?Ap===Ep+1&&Gn?-1:zt||Math.abs(po)>1?Ep:0:Ap},vu=Cr(_d(),Wl);if(Bs({index:vu,reason:Zs,event:ko}),nt&&po!=="reset")if(vu===-1)jo.current.value=Rn;else{var Tp=va(lr[vu]);jo.current.value=Tp;var P1=Tp.toLowerCase().indexOf(Rn.toLowerCase());P1===0&&Rn.length>0&&jo.current.setSelectionRange(Rn.length,Tp.length)}}}),Sl=react.exports.useCallback(function(){if(!!No){var Yo=Qn?Es[0]:Es;if(lr.length===0||Yo==null){Dl({diff:"reset"});return}if(!!Bo.current){if(!Xt&&Yo!=null){var ko=lr[xs.current];if(Qn&&ko&&findIndex(Es,function(qo){return _n(ko,qo)})!==-1)return;var po=findIndex(lr,function(qo){return _n(qo,Yo)});po===-1?Dl({diff:"reset"}):Bs({index:po});return}if(xs.current>=lr.length-1){Bs({index:lr.length-1});return}Bs({index:xs.current})}}},[lr.length===0,Qn?!1:Es,Xt,Dl,Bs,No,Rn,Qn]),Os=useEventCallback(function(Yo){setRef(Bo,Yo),Yo&&Sl()});react.exports.useEffect(function(){Sl()},[Sl]);var dl=function(ko){Hr||(Lo(!0),Pr&&Pr(ko))},As=function(ko,po){!Hr||(Lo(!1),jn&&jn(ko,po))},ol=function(ko,po,qo,Wl){Es!==po&&(Bn&&Bn(ko,po,qo,Wl),Il(po))},_l=react.exports.useRef(!1),Ul=function(ko,po){var qo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"select-option",Wl=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"options",Vl=qo,Zs=po;if(Qn){Zs=Array.isArray(Es)?Es.slice():[];var _d=findIndex(Zs,function(vu){return _n(po,vu)});_d===-1?Zs.push(po):Wl!=="freeSolo"&&(Zs.splice(_d,1),Vl="remove-option")}Kr(ko,Zs),ol(ko,Zs,Vl,{option:po}),It||As(ko,Vl),(ft===!0||ft==="touch"&&_l.current||ft==="mouse"&&!_l.current)&&jo.current.blur()};function zo(Yo,ko){if(Yo===-1)return-1;for(var po=Yo;;){if(ko==="next"&&po===Es.length||ko==="previous"&&po===-1)return-1;var qo=Us.querySelector('[data-tag-index="'.concat(po,'"]'));if(qo&&(!qo.hasAttribute("tabindex")||qo.disabled||qo.getAttribute("aria-disabled")==="true"))po+=ko==="next"?1:-1;else return po}}var Zo=function(ko,po){if(!!Qn){As(ko,"toggleInput");var qo=bo;bo===-1?Rn===""&&po==="previous"&&(qo=Es.length-1):(qo+=po==="next"?1:-1,qo<0&&(qo=0),qo===Es.length&&(qo=-1)),qo=zo(qo,po),Vo(qo),Ho(qo)}},Cs=function(ko){$o.current=!0,Zr(""),Er&&Er(ko,"","clear"),ol(ko,Qn?[]:null,"clear")},Rs=function(ko){return function(po){switch(bo!==-1&&["ArrowLeft","ArrowRight"].indexOf(po.key)===-1&&(Vo(-1),Ho(-1)),po.key){case"Home":No&&wn&&(po.preventDefault(),Dl({diff:"start",direction:"next",reason:"keyboard",event:po}));break;case"End":No&&wn&&(po.preventDefault(),Dl({diff:"end",direction:"previous",reason:"keyboard",event:po}));break;case"PageUp":po.preventDefault(),Dl({diff:-pageSize,direction:"previous",reason:"keyboard",event:po}),dl(po);break;case"PageDown":po.preventDefault(),Dl({diff:pageSize,direction:"next",reason:"keyboard",event:po}),dl(po);break;case"ArrowDown":po.preventDefault(),Dl({diff:1,direction:"next",reason:"keyboard",event:po}),dl(po);break;case"ArrowUp":po.preventDefault(),Dl({diff:-1,direction:"previous",reason:"keyboard",event:po}),dl(po);break;case"ArrowLeft":Zo(po,"previous");break;case"ArrowRight":Zo(po,"next");break;case"Enter":if(po.which===229)break;if(xs.current!==-1&&No){var qo=lr[xs.current],Wl=An?An(qo):!1;if(po.preventDefault(),Wl)return;Ul(po,qo,"select-option"),nt&&jo.current.setSelectionRange(jo.current.value.length,jo.current.value.length)}else gn&&Rn!==""&&Ro===!1&&(Qn&&po.preventDefault(),Ul(po,Rn,"create-option","freeSolo"));break;case"Escape":No?(po.preventDefault(),po.stopPropagation(),As(po,"escape")):yt&&(Rn!==""||Qn&&Es.length>0)&&(po.preventDefault(),po.stopPropagation(),Cs(po));break;case"Backspace":if(Qn&&Rn===""&&Es.length>0){var Vl=bo===-1?Es.length-1:bo,Zs=Es.slice();Zs.splice(Vl,1),ol(po,Zs,"remove-option",{option:Es[Vl]})}break}ko.onKeyDown&&ko.onKeyDown(po)}},Nl=function(ko){Ur(!0),no&&!$o.current&&dl(ko)},wu=function(ko){if(Bo.current!==null&&document.activeElement===Bo.current.parentElement){jo.current.focus();return}Ur(!1),Qr.current=!0,$o.current=!1,!(xt&&Rn!=="")&&(ut&&xs.current!==-1&&No?Ul(ko,lr[xs.current],"blur"):ut&&gn&&Rn!==""?Ul(ko,Rn,"blur","freeSolo"):ht&&Kr(ko,Es),As(ko,"blur"))},um=function(ko){var po=ko.target.value;Rn!==po&&(Zr(po),Er&&Er(ko,po,"input")),po===""?!Ot&&!Qn&&ol(ko,null,"clear"):dl(ko)},yu=function(ko){Bs({event:ko,index:Number(ko.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},Ou=function(){_l.current=!0},o1=function(ko){var po=Number(ko.currentTarget.getAttribute("data-option-index"));Ul(ko,lr[po],"select-option"),_l.current=!1},Ru=function(ko){return function(po){var qo=Es.slice();qo.splice(ko,1),ol(po,qo,"remove-option",{option:Es[ko]})}},Bm=function(ko){Hr?As(ko,"toggleInput"):dl(ko)},m0=function(ko){ko.target.getAttribute("id")!==So&&ko.preventDefault()},vp=function(){jo.current.focus(),Xr&&Qr.current&&jo.current.selectionEnd-jo.current.selectionStart===0&&jo.current.select(),Qr.current=!1},s1=function(ko){(Rn===""||!Hr)&&Bm(ko)},Wp=gn&&Rn.length>0;Wp=Wp||(Qn?Es.length>0:Es!==null);var bp=lr;return En&&(bp=lr.reduce(function(Yo,ko,po){var qo=En(ko);return Yo.length>0&&Yo[Yo.length-1].group===qo?Yo[Yo.length-1].options.push(ko):Yo.push({key:po,index:po,group:qo,options:[ko]}),Yo},[])),{getRootProps:function(){var ko=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return _extends$a({"aria-owns":No?"".concat(So,"-popup"):null,role:"combobox","aria-expanded":No},ko,{onKeyDown:Rs(ko),onMouseDown:m0,onClick:vp})},getInputLabelProps:function(){return{id:"".concat(So,"-label"),htmlFor:So}},getInputProps:function(){return{id:So,value:Rn,onBlur:wu,onFocus:Nl,onChange:um,onMouseDown:s1,"aria-activedescendant":No?"":null,"aria-autocomplete":nt?"both":"list","aria-controls":No?"".concat(So,"-popup"):null,autoComplete:"off",ref:jo,autoCapitalize:"none",spellCheck:"false"}},getClearProps:function(){return{tabIndex:-1,onClick:Cs}},getPopupIndicatorProps:function(){return{tabIndex:-1,onClick:Bm}},getTagProps:function(ko){var po=ko.index;return{key:po,"data-tag-index":po,tabIndex:-1,onDelete:Ru(po)}},getListboxProps:function(){return{role:"listbox",id:"".concat(So,"-popup"),"aria-labelledby":"".concat(So,"-label"),ref:Os,onMouseDown:function(po){po.preventDefault()}}},getOptionProps:function(ko){var po=ko.index,qo=ko.option,Wl=(Qn?Es:[Es]).some(function(Zs){return Zs!=null&&_n(qo,Zs)}),Vl=An?An(qo):!1;return{key:po,tabIndex:-1,role:"option",id:"".concat(So,"-option-").concat(po),onMouseOver:yu,onClick:o1,onTouchStart:Ou,"data-option-index":po,"aria-disabled":Vl,"aria-selected":Wl}},id:So,inputValue:Rn,value:Es,dirty:Wp,popupOpen:No,focused:Kn||bo!==-1,anchorEl:Us,setAnchorEl:Eo,focusedTag:bo,groupedOptions:bp}}var styles=function et(tt){var nt;return{root:{"&$focused $clearIndicatorDirty":{visibility:"visible"},"@media (pointer: fine)":{"&:hover $clearIndicatorDirty":{visibility:"visible"}}},fullWidth:{width:"100%"},focused:{},tag:{margin:3,maxWidth:"calc(100% - 6px)"},tagSizeSmall:{margin:2,maxWidth:"calc(100% - 4px)"},hasPopupIcon:{},hasClearIcon:{},inputRoot:{flexWrap:"wrap","$hasPopupIcon &, $hasClearIcon &":{paddingRight:26+4},"$hasPopupIcon$hasClearIcon &":{paddingRight:52+4},"& $input":{width:0,minWidth:30},'&[class*="MuiInput-root"]':{paddingBottom:1,"& $input":{padding:4},"& $input:first-child":{padding:"6px 0"}},'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]':{"& $input":{padding:"4px 4px 5px"},"& $input:first-child":{padding:"3px 0 6px"}},'&[class*="MuiOutlinedInput-root"]':{padding:9,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:26+4+9},"$hasPopupIcon$hasClearIcon &":{paddingRight:52+4+9},"& $input":{padding:"9.5px 4px"},"& $input:first-child":{paddingLeft:6},"& $endAdornment":{right:9}},'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]':{padding:6,"& $input":{padding:"4.5px 4px"}},'&[class*="MuiFilledInput-root"]':{paddingTop:19,paddingLeft:8,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:26+4+9},"$hasPopupIcon$hasClearIcon &":{paddingRight:52+4+9},"& $input":{padding:"9px 4px"},"& $endAdornment":{right:9}},'&[class*="MuiFilledInput-root"][class*="MuiFilledInput-marginDense"]':{paddingBottom:1,"& $input":{padding:"4.5px 4px"}}},input:{flexGrow:1,textOverflow:"ellipsis",opacity:0},inputFocused:{opacity:1},endAdornment:{position:"absolute",right:0,top:"calc(50% - 14px)"},clearIndicator:{marginRight:-2,padding:4,visibility:"hidden"},clearIndicatorDirty:{},popupIndicator:{padding:2,marginRight:-2},popupIndicatorOpen:{transform:"rotate(180deg)"},popper:{zIndex:tt.zIndex.modal},popperDisablePortal:{position:"absolute"},paper:_extends$a({},tt.typography.body1,{overflow:"hidden",margin:"4px 0"}),listbox:{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto"},loading:{color:tt.palette.text.secondary,padding:"14px 16px"},noOptions:{color:tt.palette.text.secondary,padding:"14px 16px"},option:(nt={minHeight:48,display:"flex",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16},_defineProperty$d(nt,tt.breakpoints.up("sm"),{minHeight:"auto"}),_defineProperty$d(nt,'&[aria-selected="true"]',{backgroundColor:tt.palette.action.selected}),_defineProperty$d(nt,'&[data-focus="true"]',{backgroundColor:tt.palette.action.hover}),_defineProperty$d(nt,"&:active",{backgroundColor:tt.palette.action.selected}),_defineProperty$d(nt,'&[aria-disabled="true"]',{opacity:tt.palette.action.disabledOpacity,pointerEvents:"none"}),nt),groupLabel:{backgroundColor:tt.palette.background.paper,top:-8},groupUl:{padding:0,"& $option":{paddingLeft:24}}}};function DisablePortal(et){et.anchorEl,et.open;var tt=_objectWithoutProperties$3(et,["anchorEl","open"]);return react.exports.createElement("div",tt)}var _ref=react.exports.createElement(CloseIcon,{fontSize:"small"}),_ref2=react.exports.createElement(ArrowDropDownIcon,null),Autocomplete$1=react.exports.forwardRef(function et(tt,nt){tt.autoComplete,tt.autoHighlight,tt.autoSelect,tt.blurOnSelect;var rt=tt.ChipProps,ot=tt.classes,st=tt.className,ut=tt.clearOnBlur;ut===void 0&&tt.freeSolo,tt.clearOnEscape;var ct=tt.clearText,ft=ct===void 0?"Clear":ct,pt=tt.closeIcon,ht=pt===void 0?_ref:pt,mt=tt.closeText,yt=mt===void 0?"Close":mt;tt.debug;var vt=tt.defaultValue;vt===void 0&&tt.multiple;var Tt=tt.disableClearable,Et=Tt===void 0?!1:Tt;tt.disableCloseOnSelect;var xt=tt.disabled,At=xt===void 0?!1:xt;tt.disabledItemsFocusable,tt.disableListWrap;var Ct=tt.disablePortal,$t=Ct===void 0?!1:Ct;tt.filterOptions,tt.filterSelectedOptions;var Ot=tt.forcePopupIcon,Rt=Ot===void 0?"auto":Ot,It=tt.freeSolo,kt=It===void 0?!1:It,Mt=tt.fullWidth,Ft=Mt===void 0?!1:Mt,zt=tt.getLimitTagsText,Vt=zt===void 0?function(No){return"+".concat(No)}:zt;tt.getOptionDisabled;var Zt=tt.getOptionLabel,Ut=Zt===void 0?function(No){return No}:Zt;tt.getOptionSelected;var Xt=tt.groupBy,Jt=tt.handleHomeEndKeys;Jt===void 0&&tt.freeSolo,tt.id,tt.includeInputInList,tt.inputValue;var gn=tt.limitTags,An=gn===void 0?-1:gn,sn=tt.ListboxComponent,Sn=sn===void 0?"ul":sn,In=tt.ListboxProps,_n=tt.loading,En=_n===void 0?!1:_n,Ln=tt.loadingText,wn=Ln===void 0?"Loading\u2026":Ln,Dn=tt.multiple,$n=Dn===void 0?!1:Dn,Gn=tt.noOptionsText,Jn=Gn===void 0?"No options":Gn;tt.onChange,tt.onClose,tt.onHighlightChange,tt.onInputChange,tt.onOpen,tt.open,tt.openOnFocus;var zn=tt.openText,Qn=zn===void 0?"Open":zn;tt.options;var Bn=tt.PaperComponent,jn=Bn===void 0?Paper$1:Bn,Ar=tt.PopperComponent,Er=Ar===void 0?Popper$1:Ar,Pr=tt.popupIcon,Nr=Pr===void 0?_ref2:Pr,Ir=tt.renderGroup,no=tt.renderInput,ro=tt.renderOption,ao=tt.renderTags,Xr=tt.selectOnFocus;Xr===void 0&&tt.freeSolo;var Jr=tt.size,So=Jr===void 0?"medium":Jr;tt.value;var va=_objectWithoutProperties$3(tt,["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","classes","className","clearOnBlur","clearOnEscape","clearText","closeIcon","closeText","debug","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","getOptionSelected","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","value"]),$o=$t?DisablePortal:Er,Qr=useAutocomplete(_extends$a({},tt,{componentName:"Autocomplete"})),jo=Qr.getRootProps,Bo=Qr.getInputProps,ss=Qr.getInputLabelProps,Us=Qr.getPopupIndicatorProps,Eo=Qr.getClearProps,Do=Qr.getTagProps,bo=Qr.getListboxProps,Vo=Qr.getOptionProps,Ts=Qr.value,xs=Qr.dirty,Qo=Qr.id,Gs=Qr.popupOpen,Es=Qr.focused,Il=Qr.focusedTag,ws=Qr.anchorEl,vn=Qr.setAnchorEl,Rn=Qr.inputValue,Zr=Qr.groupedOptions,Wn;if($n&&Ts.length>0){var Kn=function(lr){return _extends$a({className:clsx(ot.tag,So==="small"&&ot.tagSizeSmall),disabled:At},Do(lr))};ao?Wn=ao(Ts,Kn):Wn=Ts.map(function(No,lr){return react.exports.createElement(Chip$1$1,_extends$a({label:Ut(No),size:So},Kn({index:lr}),rt))})}if(An>-1&&Array.isArray(Wn)){var Ur=Wn.length-An;!Es&&Ur>0&&(Wn=Wn.splice(0,An),Wn.push(react.exports.createElement("span",{className:ot.tag,key:Wn.length},Vt(Ur))))}var Kr=function(lr){return react.exports.createElement("li",{key:lr.key},react.exports.createElement(ListSubheader$1$1,{className:ot.groupLabel,component:"div"},lr.group),react.exports.createElement("ul",{className:ot.groupUl},lr.children))},Go=Ir||Kr,io=ro||Ut,Hr=function(lr,Ho){var Cr=Vo({option:lr,index:Ho});return react.exports.createElement("li",_extends$a({},Cr,{className:ot.option}),io(lr,{selected:Cr["aria-selected"],inputValue:Rn}))},Lo=!Et&&!At,Ro=(!kt||Rt===!0)&&Rt!==!1;return react.exports.createElement(react.exports.Fragment,null,react.exports.createElement("div",_extends$a({ref:nt,className:clsx(ot.root,st,Es&&ot.focused,Ft&&ot.fullWidth,Lo&&ot.hasClearIcon,Ro&&ot.hasPopupIcon)},jo(va)),no({id:Qo,disabled:At,fullWidth:!0,size:So==="small"?"small":void 0,InputLabelProps:ss(),InputProps:{ref:vn,className:ot.inputRoot,startAdornment:Wn,endAdornment:react.exports.createElement("div",{className:ot.endAdornment},Lo?react.exports.createElement(IconButton$1$1,_extends$a({},Eo(),{"aria-label":ft,title:ft,className:clsx(ot.clearIndicator,xs&&ot.clearIndicatorDirty)}),ht):null,Ro?react.exports.createElement(IconButton$1$1,_extends$a({},Us(),{disabled:At,"aria-label":Gs?yt:Qn,title:Gs?yt:Qn,className:clsx(ot.popupIndicator,Gs&&ot.popupIndicatorOpen)}),Nr):null)},inputProps:_extends$a({className:clsx(ot.input,Il===-1&&ot.inputFocused),disabled:At},Bo())})),Gs&&ws?react.exports.createElement($o,{className:clsx(ot.popper,$t&&ot.popperDisablePortal),style:{width:ws?ws.clientWidth:null},role:"presentation",anchorEl:ws,open:!0},react.exports.createElement(jn,{className:ot.paper},En&&Zr.length===0?react.exports.createElement("div",{className:ot.loading},wn):null,Zr.length===0&&!kt&&!En?react.exports.createElement("div",{className:ot.noOptions},Jn):null,Zr.length>0?react.exports.createElement(Sn,_extends$a({className:ot.listbox},bo(),In),Zr.map(function(No,lr){return Xt?Go({key:No.key,group:No.group,children:No.options.map(function(Ho,Cr){return Hr(Ho,No.index+Cr)})}):Hr(No,lr)})):null)):null)});const Autocomplete$1$1=withStyles(styles,{name:"MuiAutocomplete"})(Autocomplete$1);var colorString$1={exports:{}},colorName$1={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,134,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,250,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],olive:[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,221],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]},simpleSwizzle={exports:{}},isArrayish$1=function et(tt){return!tt||typeof tt=="string"?!1:tt instanceof Array||Array.isArray(tt)||tt.length>=0&&(tt.splice instanceof Function||Object.getOwnPropertyDescriptor(tt,tt.length-1)&&tt.constructor.name!=="String")},isArrayish=isArrayish$1,concat=Array.prototype.concat,slice=Array.prototype.slice,swizzle$1=simpleSwizzle.exports=function et(tt){for(var nt=[],rt=0,ot=tt.length;rt<ot;rt++){var st=tt[rt];isArrayish(st)?nt=concat.call(nt,slice.call(st)):nt.push(st)}return nt};swizzle$1.wrap=function(et){return function(){return et(swizzle$1(arguments))}};var colorNames=colorName$1,swizzle=simpleSwizzle.exports,hasOwnProperty=Object.hasOwnProperty,reverseNames=Object.create(null);for(var name in colorNames)hasOwnProperty.call(colorNames,name)&&(reverseNames[colorNames[name]]=name);var cs=colorString$1.exports={to:{},get:{}};cs.get=function(et){var tt=et.substring(0,3).toLowerCase(),nt,rt;switch(tt){case"hsl":nt=cs.get.hsl(et),rt="hsl";break;case"hwb":nt=cs.get.hwb(et),rt="hwb";break;default:nt=cs.get.rgb(et),rt="rgb";break}return nt?{model:rt,value:nt}:null};cs.get.rgb=function(et){if(!et)return null;var tt=/^#([a-f0-9]{3,4})$/i,nt=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,rt=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ot=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,st=/^(\w+)$/,ut=[0,0,0,1],ct,ft,pt;if(ct=et.match(nt)){for(pt=ct[2],ct=ct[1],ft=0;ft<3;ft++){var ht=ft*2;ut[ft]=parseInt(ct.slice(ht,ht+2),16)}pt&&(ut[3]=parseInt(pt,16)/255)}else if(ct=et.match(tt)){for(ct=ct[1],pt=ct[3],ft=0;ft<3;ft++)ut[ft]=parseInt(ct[ft]+ct[ft],16);pt&&(ut[3]=parseInt(pt+pt,16)/255)}else if(ct=et.match(rt)){for(ft=0;ft<3;ft++)ut[ft]=parseInt(ct[ft+1],0);ct[4]&&(ct[5]?ut[3]=parseFloat(ct[4])*.01:ut[3]=parseFloat(ct[4]))}else if(ct=et.match(ot)){for(ft=0;ft<3;ft++)ut[ft]=Math.round(parseFloat(ct[ft+1])*2.55);ct[4]&&(ct[5]?ut[3]=parseFloat(ct[4])*.01:ut[3]=parseFloat(ct[4]))}else return(ct=et.match(st))?ct[1]==="transparent"?[0,0,0,0]:hasOwnProperty.call(colorNames,ct[1])?(ut=colorNames[ct[1]],ut[3]=1,ut):null:null;for(ft=0;ft<3;ft++)ut[ft]=clamp$1(ut[ft],0,255);return ut[3]=clamp$1(ut[3],0,1),ut};cs.get.hsl=function(et){if(!et)return null;var tt=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,nt=et.match(tt);if(nt){var rt=parseFloat(nt[4]),ot=(parseFloat(nt[1])%360+360)%360,st=clamp$1(parseFloat(nt[2]),0,100),ut=clamp$1(parseFloat(nt[3]),0,100),ct=clamp$1(isNaN(rt)?1:rt,0,1);return[ot,st,ut,ct]}return null};cs.get.hwb=function(et){if(!et)return null;var tt=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,nt=et.match(tt);if(nt){var rt=parseFloat(nt[4]),ot=(parseFloat(nt[1])%360+360)%360,st=clamp$1(parseFloat(nt[2]),0,100),ut=clamp$1(parseFloat(nt[3]),0,100),ct=clamp$1(isNaN(rt)?1:rt,0,1);return[ot,st,ut,ct]}return null};cs.to.hex=function(){var et=swizzle(arguments);return"#"+hexDouble(et[0])+hexDouble(et[1])+hexDouble(et[2])+(et[3]<1?hexDouble(Math.round(et[3]*255)):"")};cs.to.rgb=function(){var et=swizzle(arguments);return et.length<4||et[3]===1?"rgb("+Math.round(et[0])+", "+Math.round(et[1])+", "+Math.round(et[2])+")":"rgba("+Math.round(et[0])+", "+Math.round(et[1])+", "+Math.round(et[2])+", "+et[3]+")"};cs.to.rgb.percent=function(){var et=swizzle(arguments),tt=Math.round(et[0]/255*100),nt=Math.round(et[1]/255*100),rt=Math.round(et[2]/255*100);return et.length<4||et[3]===1?"rgb("+tt+"%, "+nt+"%, "+rt+"%)":"rgba("+tt+"%, "+nt+"%, "+rt+"%, "+et[3]+")"};cs.to.hsl=function(){var et=swizzle(arguments);return et.length<4||et[3]===1?"hsl("+et[0]+", "+et[1]+"%, "+et[2]+"%)":"hsla("+et[0]+", "+et[1]+"%, "+et[2]+"%, "+et[3]+")"};cs.to.hwb=function(){var et=swizzle(arguments),tt="";return et.length>=4&&et[3]!==1&&(tt=", "+et[3]),"hwb("+et[0]+", "+et[1]+"%, "+et[2]+"%"+tt+")"};cs.to.keyword=function(et){return reverseNames[et.slice(0,3)]};function clamp$1(et,tt,nt){return Math.min(Math.max(tt,et),nt)}function hexDouble(et){var tt=Math.round(et).toString(16).toUpperCase();return tt.length<2?"0"+tt:tt}var conversions$2={exports:{}},colorName={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,134,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,250,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],olive:[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,221],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]},cssKeywords=colorName,reverseKeywords={};for(var key in cssKeywords)cssKeywords.hasOwnProperty(key)&&(reverseKeywords[cssKeywords[key]]=key);var convert$2=conversions$2.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var model in convert$2)if(convert$2.hasOwnProperty(model)){if(!("channels"in convert$2[model]))throw new Error("missing channels property: "+model);if(!("labels"in convert$2[model]))throw new Error("missing channel labels property: "+model);if(convert$2[model].labels.length!==convert$2[model].channels)throw new Error("channel and label counts mismatch: "+model);var channels=convert$2[model].channels,labels=convert$2[model].labels;delete convert$2[model].channels,delete convert$2[model].labels,Object.defineProperty(convert$2[model],"channels",{value:channels}),Object.defineProperty(convert$2[model],"labels",{value:labels})}convert$2.rgb.hsl=function(et){var tt=et[0]/255,nt=et[1]/255,rt=et[2]/255,ot=Math.min(tt,nt,rt),st=Math.max(tt,nt,rt),ut=st-ot,ct,ft,pt;return st===ot?ct=0:tt===st?ct=(nt-rt)/ut:nt===st?ct=2+(rt-tt)/ut:rt===st&&(ct=4+(tt-nt)/ut),ct=Math.min(ct*60,360),ct<0&&(ct+=360),pt=(ot+st)/2,st===ot?ft=0:pt<=.5?ft=ut/(st+ot):ft=ut/(2-st-ot),[ct,ft*100,pt*100]};convert$2.rgb.hsv=function(et){var tt,nt,rt,ot,st,ut=et[0]/255,ct=et[1]/255,ft=et[2]/255,pt=Math.max(ut,ct,ft),ht=pt-Math.min(ut,ct,ft),mt=function(yt){return(pt-yt)/6/ht+1/2};return ht===0?ot=st=0:(st=ht/pt,tt=mt(ut),nt=mt(ct),rt=mt(ft),ut===pt?ot=rt-nt:ct===pt?ot=1/3+tt-rt:ft===pt&&(ot=2/3+nt-tt),ot<0?ot+=1:ot>1&&(ot-=1)),[ot*360,st*100,pt*100]};convert$2.rgb.hwb=function(et){var tt=et[0],nt=et[1],rt=et[2],ot=convert$2.rgb.hsl(et)[0],st=1/255*Math.min(tt,Math.min(nt,rt));return rt=1-1/255*Math.max(tt,Math.max(nt,rt)),[ot,st*100,rt*100]};convert$2.rgb.cmyk=function(et){var tt=et[0]/255,nt=et[1]/255,rt=et[2]/255,ot,st,ut,ct;return ct=Math.min(1-tt,1-nt,1-rt),ot=(1-tt-ct)/(1-ct)||0,st=(1-nt-ct)/(1-ct)||0,ut=(1-rt-ct)/(1-ct)||0,[ot*100,st*100,ut*100,ct*100]};function comparativeDistance(et,tt){return Math.pow(et[0]-tt[0],2)+Math.pow(et[1]-tt[1],2)+Math.pow(et[2]-tt[2],2)}convert$2.rgb.keyword=function(et){var tt=reverseKeywords[et];if(tt)return tt;var nt=1/0,rt;for(var ot in cssKeywords)if(cssKeywords.hasOwnProperty(ot)){var st=cssKeywords[ot],ut=comparativeDistance(et,st);ut<nt&&(nt=ut,rt=ot)}return rt};convert$2.keyword.rgb=function(et){return cssKeywords[et]};convert$2.rgb.xyz=function(et){var tt=et[0]/255,nt=et[1]/255,rt=et[2]/255;tt=tt>.04045?Math.pow((tt+.055)/1.055,2.4):tt/12.92,nt=nt>.04045?Math.pow((nt+.055)/1.055,2.4):nt/12.92,rt=rt>.04045?Math.pow((rt+.055)/1.055,2.4):rt/12.92;var ot=tt*.4124+nt*.3576+rt*.1805,st=tt*.2126+nt*.7152+rt*.0722,ut=tt*.0193+nt*.1192+rt*.9505;return[ot*100,st*100,ut*100]};convert$2.rgb.lab=function(et){var tt=convert$2.rgb.xyz(et),nt=tt[0],rt=tt[1],ot=tt[2],st,ut,ct;return nt/=95.047,rt/=100,ot/=108.883,nt=nt>.008856?Math.pow(nt,1/3):7.787*nt+16/116,rt=rt>.008856?Math.pow(rt,1/3):7.787*rt+16/116,ot=ot>.008856?Math.pow(ot,1/3):7.787*ot+16/116,st=116*rt-16,ut=500*(nt-rt),ct=200*(rt-ot),[st,ut,ct]};convert$2.hsl.rgb=function(et){var tt=et[0]/360,nt=et[1]/100,rt=et[2]/100,ot,st,ut,ct,ft;if(nt===0)return ft=rt*255,[ft,ft,ft];rt<.5?st=rt*(1+nt):st=rt+nt-rt*nt,ot=2*rt-st,ct=[0,0,0];for(var pt=0;pt<3;pt++)ut=tt+1/3*-(pt-1),ut<0&&ut++,ut>1&&ut--,6*ut<1?ft=ot+(st-ot)*6*ut:2*ut<1?ft=st:3*ut<2?ft=ot+(st-ot)*(2/3-ut)*6:ft=ot,ct[pt]=ft*255;return ct};convert$2.hsl.hsv=function(et){var tt=et[0],nt=et[1]/100,rt=et[2]/100,ot=nt,st=Math.max(rt,.01),ut,ct;return rt*=2,nt*=rt<=1?rt:2-rt,ot*=st<=1?st:2-st,ct=(rt+nt)/2,ut=rt===0?2*ot/(st+ot):2*nt/(rt+nt),[tt,ut*100,ct*100]};convert$2.hsv.rgb=function(et){var tt=et[0]/60,nt=et[1]/100,rt=et[2]/100,ot=Math.floor(tt)%6,st=tt-Math.floor(tt),ut=255*rt*(1-nt),ct=255*rt*(1-nt*st),ft=255*rt*(1-nt*(1-st));switch(rt*=255,ot){case 0:return[rt,ft,ut];case 1:return[ct,rt,ut];case 2:return[ut,rt,ft];case 3:return[ut,ct,rt];case 4:return[ft,ut,rt];case 5:return[rt,ut,ct]}};convert$2.hsv.hsl=function(et){var tt=et[0],nt=et[1]/100,rt=et[2]/100,ot=Math.max(rt,.01),st,ut,ct;return ct=(2-nt)*rt,st=(2-nt)*ot,ut=nt*ot,ut/=st<=1?st:2-st,ut=ut||0,ct/=2,[tt,ut*100,ct*100]};convert$2.hwb.rgb=function(et){var tt=et[0]/360,nt=et[1]/100,rt=et[2]/100,ot=nt+rt,st,ut,ct,ft;ot>1&&(nt/=ot,rt/=ot),st=Math.floor(6*tt),ut=1-rt,ct=6*tt-st,(st&1)!==0&&(ct=1-ct),ft=nt+ct*(ut-nt);var pt,ht,mt;switch(st){default:case 6:case 0:pt=ut,ht=ft,mt=nt;break;case 1:pt=ft,ht=ut,mt=nt;break;case 2:pt=nt,ht=ut,mt=ft;break;case 3:pt=nt,ht=ft,mt=ut;break;case 4:pt=ft,ht=nt,mt=ut;break;case 5:pt=ut,ht=nt,mt=ft;break}return[pt*255,ht*255,mt*255]};convert$2.cmyk.rgb=function(et){var tt=et[0]/100,nt=et[1]/100,rt=et[2]/100,ot=et[3]/100,st,ut,ct;return st=1-Math.min(1,tt*(1-ot)+ot),ut=1-Math.min(1,nt*(1-ot)+ot),ct=1-Math.min(1,rt*(1-ot)+ot),[st*255,ut*255,ct*255]};convert$2.xyz.rgb=function(et){var tt=et[0]/100,nt=et[1]/100,rt=et[2]/100,ot,st,ut;return ot=tt*3.2406+nt*-1.5372+rt*-.4986,st=tt*-.9689+nt*1.8758+rt*.0415,ut=tt*.0557+nt*-.204+rt*1.057,ot=ot>.0031308?1.055*Math.pow(ot,1/2.4)-.055:ot*12.92,st=st>.0031308?1.055*Math.pow(st,1/2.4)-.055:st*12.92,ut=ut>.0031308?1.055*Math.pow(ut,1/2.4)-.055:ut*12.92,ot=Math.min(Math.max(0,ot),1),st=Math.min(Math.max(0,st),1),ut=Math.min(Math.max(0,ut),1),[ot*255,st*255,ut*255]};convert$2.xyz.lab=function(et){var tt=et[0],nt=et[1],rt=et[2],ot,st,ut;return tt/=95.047,nt/=100,rt/=108.883,tt=tt>.008856?Math.pow(tt,1/3):7.787*tt+16/116,nt=nt>.008856?Math.pow(nt,1/3):7.787*nt+16/116,rt=rt>.008856?Math.pow(rt,1/3):7.787*rt+16/116,ot=116*nt-16,st=500*(tt-nt),ut=200*(nt-rt),[ot,st,ut]};convert$2.lab.xyz=function(et){var tt=et[0],nt=et[1],rt=et[2],ot,st,ut;st=(tt+16)/116,ot=nt/500+st,ut=st-rt/200;var ct=Math.pow(st,3),ft=Math.pow(ot,3),pt=Math.pow(ut,3);return st=ct>.008856?ct:(st-16/116)/7.787,ot=ft>.008856?ft:(ot-16/116)/7.787,ut=pt>.008856?pt:(ut-16/116)/7.787,ot*=95.047,st*=100,ut*=108.883,[ot,st,ut]};convert$2.lab.lch=function(et){var tt=et[0],nt=et[1],rt=et[2],ot,st,ut;return ot=Math.atan2(rt,nt),st=ot*360/2/Math.PI,st<0&&(st+=360),ut=Math.sqrt(nt*nt+rt*rt),[tt,ut,st]};convert$2.lch.lab=function(et){var tt=et[0],nt=et[1],rt=et[2],ot,st,ut;return ut=rt/360*2*Math.PI,ot=nt*Math.cos(ut),st=nt*Math.sin(ut),[tt,ot,st]};convert$2.rgb.ansi16=function(et){var tt=et[0],nt=et[1],rt=et[2],ot=1 in arguments?arguments[1]:convert$2.rgb.hsv(et)[2];if(ot=Math.round(ot/50),ot===0)return 30;var st=30+(Math.round(rt/255)<<2|Math.round(nt/255)<<1|Math.round(tt/255));return ot===2&&(st+=60),st};convert$2.hsv.ansi16=function(et){return convert$2.rgb.ansi16(convert$2.hsv.rgb(et),et[2])};convert$2.rgb.ansi256=function(et){var tt=et[0],nt=et[1],rt=et[2];if(tt===nt&&nt===rt)return tt<8?16:tt>248?231:Math.round((tt-8)/247*24)+232;var ot=16+36*Math.round(tt/255*5)+6*Math.round(nt/255*5)+Math.round(rt/255*5);return ot};convert$2.ansi16.rgb=function(et){var tt=et%10;if(tt===0||tt===7)return et>50&&(tt+=3.5),tt=tt/10.5*255,[tt,tt,tt];var nt=(~~(et>50)+1)*.5,rt=(tt&1)*nt*255,ot=(tt>>1&1)*nt*255,st=(tt>>2&1)*nt*255;return[rt,ot,st]};convert$2.ansi256.rgb=function(et){if(et>=232){var tt=(et-232)*10+8;return[tt,tt,tt]}et-=16;var nt,rt=Math.floor(et/36)/5*255,ot=Math.floor((nt=et%36)/6)/5*255,st=nt%6/5*255;return[rt,ot,st]};convert$2.rgb.hex=function(et){var tt=((Math.round(et[0])&255)<<16)+((Math.round(et[1])&255)<<8)+(Math.round(et[2])&255),nt=tt.toString(16).toUpperCase();return"000000".substring(nt.length)+nt};convert$2.hex.rgb=function(et){var tt=et.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!tt)return[0,0,0];var nt=tt[0];tt[0].length===3&&(nt=nt.split("").map(function(ct){return ct+ct}).join(""));var rt=parseInt(nt,16),ot=rt>>16&255,st=rt>>8&255,ut=rt&255;return[ot,st,ut]};convert$2.rgb.hcg=function(et){var tt=et[0]/255,nt=et[1]/255,rt=et[2]/255,ot=Math.max(Math.max(tt,nt),rt),st=Math.min(Math.min(tt,nt),rt),ut=ot-st,ct,ft;return ut<1?ct=st/(1-ut):ct=0,ut<=0?ft=0:ot===tt?ft=(nt-rt)/ut%6:ot===nt?ft=2+(rt-tt)/ut:ft=4+(tt-nt)/ut+4,ft/=6,ft%=1,[ft*360,ut*100,ct*100]};convert$2.hsl.hcg=function(et){var tt=et[1]/100,nt=et[2]/100,rt=1,ot=0;return nt<.5?rt=2*tt*nt:rt=2*tt*(1-nt),rt<1&&(ot=(nt-.5*rt)/(1-rt)),[et[0],rt*100,ot*100]};convert$2.hsv.hcg=function(et){var tt=et[1]/100,nt=et[2]/100,rt=tt*nt,ot=0;return rt<1&&(ot=(nt-rt)/(1-rt)),[et[0],rt*100,ot*100]};convert$2.hcg.rgb=function(et){var tt=et[0]/360,nt=et[1]/100,rt=et[2]/100;if(nt===0)return[rt*255,rt*255,rt*255];var ot=[0,0,0],st=tt%1*6,ut=st%1,ct=1-ut,ft=0;switch(Math.floor(st)){case 0:ot[0]=1,ot[1]=ut,ot[2]=0;break;case 1:ot[0]=ct,ot[1]=1,ot[2]=0;break;case 2:ot[0]=0,ot[1]=1,ot[2]=ut;break;case 3:ot[0]=0,ot[1]=ct,ot[2]=1;break;case 4:ot[0]=ut,ot[1]=0,ot[2]=1;break;default:ot[0]=1,ot[1]=0,ot[2]=ct}return ft=(1-nt)*rt,[(nt*ot[0]+ft)*255,(nt*ot[1]+ft)*255,(nt*ot[2]+ft)*255]};convert$2.hcg.hsv=function(et){var tt=et[1]/100,nt=et[2]/100,rt=tt+nt*(1-tt),ot=0;return rt>0&&(ot=tt/rt),[et[0],ot*100,rt*100]};convert$2.hcg.hsl=function(et){var tt=et[1]/100,nt=et[2]/100,rt=nt*(1-tt)+.5*tt,ot=0;return rt>0&&rt<.5?ot=tt/(2*rt):rt>=.5&&rt<1&&(ot=tt/(2*(1-rt))),[et[0],ot*100,rt*100]};convert$2.hcg.hwb=function(et){var tt=et[1]/100,nt=et[2]/100,rt=tt+nt*(1-tt);return[et[0],(rt-tt)*100,(1-rt)*100]};convert$2.hwb.hcg=function(et){var tt=et[1]/100,nt=et[2]/100,rt=1-nt,ot=rt-tt,st=0;return ot<1&&(st=(rt-ot)/(1-ot)),[et[0],ot*100,st*100]};convert$2.apple.rgb=function(et){return[et[0]/65535*255,et[1]/65535*255,et[2]/65535*255]};convert$2.rgb.apple=function(et){return[et[0]/255*65535,et[1]/255*65535,et[2]/255*65535]};convert$2.gray.rgb=function(et){return[et[0]/100*255,et[0]/100*255,et[0]/100*255]};convert$2.gray.hsl=convert$2.gray.hsv=function(et){return[0,0,et[0]]};convert$2.gray.hwb=function(et){return[0,100,et[0]]};convert$2.gray.cmyk=function(et){return[0,0,0,et[0]]};convert$2.gray.lab=function(et){return[et[0],0,0]};convert$2.gray.hex=function(et){var tt=Math.round(et[0]/100*255)&255,nt=(tt<<16)+(tt<<8)+tt,rt=nt.toString(16).toUpperCase();return"000000".substring(rt.length)+rt};convert$2.rgb.gray=function(et){var tt=(et[0]+et[1]+et[2])/3;return[tt/255*100]};var conversions$1=conversions$2.exports;function buildGraph(){for(var et={},tt=Object.keys(conversions$1),nt=tt.length,rt=0;rt<nt;rt++)et[tt[rt]]={distance:-1,parent:null};return et}function deriveBFS(et){var tt=buildGraph(),nt=[et];for(tt[et].distance=0;nt.length;)for(var rt=nt.pop(),ot=Object.keys(conversions$1[rt]),st=ot.length,ut=0;ut<st;ut++){var ct=ot[ut],ft=tt[ct];ft.distance===-1&&(ft.distance=tt[rt].distance+1,ft.parent=rt,nt.unshift(ct))}return tt}function link(et,tt){return function(nt){return tt(et(nt))}}function wrapConversion(et,tt){for(var nt=[tt[et].parent,et],rt=conversions$1[tt[et].parent][et],ot=tt[et].parent;tt[ot].parent;)nt.unshift(tt[ot].parent),rt=link(conversions$1[tt[ot].parent][ot],rt),ot=tt[ot].parent;return rt.conversion=nt,rt}var route$1=function(et){for(var tt=deriveBFS(et),nt={},rt=Object.keys(tt),ot=rt.length,st=0;st<ot;st++){var ut=rt[st],ct=tt[ut];ct.parent!==null&&(nt[ut]=wrapConversion(ut,tt))}return nt},conversions=conversions$2.exports,route=route$1,convert$1={},models=Object.keys(conversions);function wrapRaw(et){var tt=function(nt){return nt==null?nt:(arguments.length>1&&(nt=Array.prototype.slice.call(arguments)),et(nt))};return"conversion"in et&&(tt.conversion=et.conversion),tt}function wrapRounded(et){var tt=function(nt){if(nt==null)return nt;arguments.length>1&&(nt=Array.prototype.slice.call(arguments));var rt=et(nt);if(typeof rt=="object")for(var ot=rt.length,st=0;st<ot;st++)rt[st]=Math.round(rt[st]);return rt};return"conversion"in et&&(tt.conversion=et.conversion),tt}models.forEach(function(et){convert$1[et]={},Object.defineProperty(convert$1[et],"channels",{value:conversions[et].channels}),Object.defineProperty(convert$1[et],"labels",{value:conversions[et].labels});var tt=route(et),nt=Object.keys(tt);nt.forEach(function(rt){var ot=tt[rt];convert$1[et][rt]=wrapRounded(ot),convert$1[et][rt].raw=wrapRaw(ot)})});var colorConvert=convert$1,colorString=colorString$1.exports,convert=colorConvert,_slice=[].slice,skippedModels=["keyword","gray","hex"],hashedModelKeys={};Object.keys(convert).forEach(function(et){hashedModelKeys[_slice.call(convert[et].labels).sort().join("")]=et});var limiters={};function Color(et,tt){if(!(this instanceof Color))return new Color(et,tt);if(tt&&tt in skippedModels&&(tt=null),tt&&!(tt in convert))throw new Error("Unknown model: "+tt);var nt,rt;if(et==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(et instanceof Color)this.model=et.model,this.color=et.color.slice(),this.valpha=et.valpha;else if(typeof et=="string"){var ot=colorString.get(et);if(ot===null)throw new Error("Unable to parse color from string: "+et);this.model=ot.model,rt=convert[this.model].channels,this.color=ot.value.slice(0,rt),this.valpha=typeof ot.value[rt]=="number"?ot.value[rt]:1}else if(et.length){this.model=tt||"rgb",rt=convert[this.model].channels;var st=_slice.call(et,0,rt);this.color=zeroArray(st,rt),this.valpha=typeof et[rt]=="number"?et[rt]:1}else if(typeof et=="number")et&=16777215,this.model="rgb",this.color=[et>>16&255,et>>8&255,et&255],this.valpha=1;else{this.valpha=1;var ut=Object.keys(et);"alpha"in et&&(ut.splice(ut.indexOf("alpha"),1),this.valpha=typeof et.alpha=="number"?et.alpha:0);var ct=ut.sort().join("");if(!(ct in hashedModelKeys))throw new Error("Unable to parse color from object: "+JSON.stringify(et));this.model=hashedModelKeys[ct];var ft=convert[this.model].labels,pt=[];for(nt=0;nt<ft.length;nt++)pt.push(et[ft[nt]]);this.color=zeroArray(pt)}if(limiters[this.model])for(rt=convert[this.model].channels,nt=0;nt<rt;nt++){var ht=limiters[this.model][nt];ht&&(this.color[nt]=ht(this.color[nt]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Color.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(et){var tt=this.model in colorString.to?this:this.rgb();tt=tt.round(typeof et=="number"?et:1);var nt=tt.valpha===1?tt.color:tt.color.concat(this.valpha);return colorString.to[tt.model](nt)},percentString:function(et){var tt=this.rgb().round(typeof et=="number"?et:1),nt=tt.valpha===1?tt.color:tt.color.concat(this.valpha);return colorString.to.rgb.percent(nt)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var et={},tt=convert[this.model].channels,nt=convert[this.model].labels,rt=0;rt<tt;rt++)et[nt[rt]]=this.color[rt];return this.valpha!==1&&(et.alpha=this.valpha),et},unitArray:function(){var et=this.rgb().color;return et[0]/=255,et[1]/=255,et[2]/=255,this.valpha!==1&&et.push(this.valpha),et},unitObject:function(){var et=this.rgb().object();return et.r/=255,et.g/=255,et.b/=255,this.valpha!==1&&(et.alpha=this.valpha),et},round:function(et){return et=Math.max(et||0,0),new Color(this.color.map(roundToPlace(et)).concat(this.valpha),this.model)},alpha:function(et){return arguments.length?new Color(this.color.concat(Math.max(0,Math.min(1,et))),this.model):this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,function(et){return(et%360+360)%360}),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(100)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(100)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword:function(et){return arguments.length?new Color(et):convert[this.model].keyword(this.color)},hex:function(et){return arguments.length?new Color(et):colorString.to.hex(this.rgb().round().color)},rgbNumber:function(){var et=this.rgb().color;return(et[0]&255)<<16|(et[1]&255)<<8|et[2]&255},luminosity:function(){for(var et=this.rgb().color,tt=[],nt=0;nt<et.length;nt++){var rt=et[nt]/255;tt[nt]=rt<=.03928?rt/12.92:Math.pow((rt+.055)/1.055,2.4)}return .2126*tt[0]+.7152*tt[1]+.0722*tt[2]},contrast:function(et){var tt=this.luminosity(),nt=et.luminosity();return tt>nt?(tt+.05)/(nt+.05):(nt+.05)/(tt+.05)},level:function(et){var tt=this.contrast(et);return tt>=7.1?"AAA":tt>=4.5?"AA":""},isDark:function(){var et=this.rgb().color,tt=(et[0]*299+et[1]*587+et[2]*114)/1e3;return tt<128},isLight:function(){return!this.isDark()},negate:function(){for(var et=this.rgb(),tt=0;tt<3;tt++)et.color[tt]=255-et.color[tt];return et},lighten:function(et){var tt=this.hsl();return tt.color[2]+=tt.color[2]*et,tt},darken:function(et){var tt=this.hsl();return tt.color[2]-=tt.color[2]*et,tt},saturate:function(et){var tt=this.hsl();return tt.color[1]+=tt.color[1]*et,tt},desaturate:function(et){var tt=this.hsl();return tt.color[1]-=tt.color[1]*et,tt},whiten:function(et){var tt=this.hwb();return tt.color[1]+=tt.color[1]*et,tt},blacken:function(et){var tt=this.hwb();return tt.color[2]+=tt.color[2]*et,tt},grayscale:function(){var et=this.rgb().color,tt=et[0]*.3+et[1]*.59+et[2]*.11;return Color.rgb(tt,tt,tt)},fade:function(et){return this.alpha(this.valpha-this.valpha*et)},opaquer:function(et){return this.alpha(this.valpha+this.valpha*et)},rotate:function(et){var tt=this.hsl(),nt=tt.color[0];return nt=(nt+et)%360,nt=nt<0?360+nt:nt,tt.color[0]=nt,tt},mix:function(et,tt){if(!et||!et.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof et);var nt=et.rgb(),rt=this.rgb(),ot=tt===void 0?.5:tt,st=2*ot-1,ut=nt.alpha()-rt.alpha(),ct=((st*ut===-1?st:(st+ut)/(1+st*ut))+1)/2,ft=1-ct;return Color.rgb(ct*nt.red()+ft*rt.red(),ct*nt.green()+ft*rt.green(),ct*nt.blue()+ft*rt.blue(),nt.alpha()*ot+rt.alpha()*(1-ot))}};Object.keys(convert).forEach(function(et){if(skippedModels.indexOf(et)===-1){var tt=convert[et].channels;Color.prototype[et]=function(){if(this.model===et)return new Color(this);if(arguments.length)return new Color(arguments,et);var nt=typeof arguments[tt]=="number"?tt:this.valpha;return new Color(assertArray(convert[this.model][et].raw(this.color)).concat(nt),et)},Color[et]=function(nt){return typeof nt=="number"&&(nt=zeroArray(_slice.call(arguments),tt)),new Color(nt,et)}}});function roundTo(et,tt){return Number(et.toFixed(tt))}function roundToPlace(et){return function(tt){return roundTo(tt,et)}}function getset(et,tt,nt){return et=Array.isArray(et)?et:[et],et.forEach(function(rt){(limiters[rt]||(limiters[rt]=[]))[tt]=nt}),et=et[0],function(rt){var ot;return arguments.length?(nt&&(rt=nt(rt)),ot=this[et](),ot.color[tt]=rt,ot):(ot=this[et]().color[tt],nt&&(ot=nt(ot)),ot)}}function maxfn(et){return function(tt){return Math.max(0,Math.min(et,tt))}}function assertArray(et){return Array.isArray(et)?et:[et]}function zeroArray(et,tt){for(var nt=0;nt<tt;nt++)typeof et[nt]!="number"&&(et[nt]=0);return et}var color=Color;/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var __assign=function(){return __assign=Object.assign||function(tt){for(var nt,rt=1,ot=arguments.length;rt<ot;rt++){nt=arguments[rt];for(var st in nt)Object.prototype.hasOwnProperty.call(nt,st)&&(tt[st]=nt[st])}return tt},__assign.apply(this,arguments)};function __rest(et,tt){var nt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&tt.indexOf(rt)<0&&(nt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,rt=Object.getOwnPropertySymbols(et);ot<rt.length;ot++)tt.indexOf(rt[ot])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[ot])&&(nt[rt[ot]]=et[rt[ot]]);return nt}function __makeTemplateObject(et,tt){return Object.defineProperty?Object.defineProperty(et,"raw",{value:tt}):et.raw=tt,et}var whiteAlpha={50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha={50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},white="#FFFFFF",black="#000000",gray={50:"#f9f9f9",100:"#f4f4f4",200:"#eeeeee",300:"#e6e6e6",400:"#d2d2d2",500:"#aaaaaa",600:"#515457",700:"#363a3d",800:"#222222",900:"#1a1c1f"},linkedin={50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook={50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger={50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp={50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter={50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram={50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"},colors$1=__assign(__assign({},muColors),{transparent:"transparent",current:"currentColor",black,white,whiteAlpha,blackAlpha,gray,messenger,twitter,linkedin,whatsapp,facebook,telegram}),info="#03B7CE",deepTeal="#039cad",primaryBackground="rgba(46, 120, 199, 0.08)",textPrimary=gray[800],legacy$2={white,black,gray50:gray[50],gray100:gray[100],gray200:gray[200],gray300:gray[300],gray400:gray[400],gray500:gray[500],gray600:gray[600],gray700:gray[700],gray800:gray[800],gray900:gray[900],darkerGray:"#222222",textDisabled:gray[400],textSecondary:gray[600],textPrimary,disabled:gray[400],border:gray[400],divider:gray[200],backdrop:"rgba(0, 0, 0, 0.9)",hover:"rgba(0, 0, 0, 0.04)",selected:"rgba(0, 0, 0, 0.08)",hoverDark:"rgba(255, 255, 255, 0.08)",selectedHover:"#E5EBF1",error:"#de6680",errorBackground:"rgba(222, 102, 128, 0.08)",errorBorder:"rgba(222, 102, 128, 0.5)",errorDark:"#a93554",errorLight:"#ff97af",errorText:"#d53d5e",primary:"#2e78c7",primaryBackground,primaryBorder:"rgba(46, 120, 199, 0.5)",primaryDark:"#004d96",primaryLight:"#6ba6fa",primaryText:"#2e78c7",success:"#00B5A0",successBackground:"rgba(0, 181, 160, 0.08)",successBorder:"rgba(0, 181, 160, 0.5)",successDark:"#008472",successLight:"#5BE8D1",successText:"#008576",warning:"#F59174",warningBackground:"rgba(245, 145, 116, 0.08)",warningBorder:"rgba(245, 145, 116, 0.5)",warningDark:"#BF6248",warningLight:"#FFC2A3",warningText:"#DA3D10",info,infoBackground:"rgba(3, 182, 206, 0.08)",infoBorder:"rgba(3, 182, 206, 0.5)",infoDark:"#00879D",infoLight:"#61EAFF",infoText:"#028293",fontName:"Source Sans Pro",yellow:"#ffc933",gold:"#ffcc33",fullYellow:"#ffff00",red:"#de6680",darkRed:"#ff2514",teal:"#03B7CE",deepTeal,green:"#00B5A0",blue:"#2e78c7",deepBlue:"#00648f",heartColor:"#bd70a3",seaFoamGreen:"#7ed2bf",lightSeaFoamGreen:"#edf8f6",slateBlue:"#68abca",lightSlateBlue:"#e9f3f7",lightYellowOther:"#fff2cc",lightYellow:"#fffbec",goldenrod:"#daa300",fern:"#3ac26c",aqua:"#21bfa4",cerulean:"#37a0c7",orchid:"#a97ccd",lightBlue:"#ddedfc",mediumBlue:"#80b3f8",darkBlue:"#338dd8",linkHoverBlue:"#006c95",sky:"rgba(46, 120, 199, 0.08)",lightSky:"#f3fafd",accordionContentPadding:"25px 20px",transitionTime:"0.3s",actionAnimationTime:"0.3s",backgroundColorTransition:"background-color 0.3s linear",borderColorTransition:"border-color 0.3s linear",pillBorderRadius:"20px",tabletBreakpoint:"768px",tagPurple:"#e5d6ff",tagBerry:"#ffd6f0",tagRed:"#ffe0e0",tagPeach:"#ffe7cc",tagYellow:"#fde8ad",tagAcid:"#c9f5b5",tagGreen:"#c2f2da",tagTeal:"#c0f0ed",tagBlue:"#d6efff",tagMidnight:"#e0e4ff",tagLightBlue:"#ccf1db",galleryAdminPurple:"#bd9df4",commentYellow:"#FFE897",levelNavbarBoxShadow:`0 1px 3px rgba(0, 0, 0, 0.02),
0 1px 2px rgba(0, 0, 0, 0.12)`,level1BoxShadow:`0 1px 3px rgba(0, 0, 0, 0.12),
0 1px 2px rgba(0, 0, 0, 0.24)`,level2BoxShadow:`0 3px 6px rgba(0, 0, 0, 0.16),
0 3px 6px rgba(0, 0, 0, 0.23)`,level3BoxShadow:`0 10px 20px rgba(0, 0, 0, 0.19),
0 6px 6px rgba(0, 0, 0, 0.23)`,level3BoxShadowFaint:`0 10px 20px rgba(0, 0, 0, 0.07),
0 6px 6px rgba(0, 0, 0, 0.07)`,level4BoxShadow:`0 14px 28px rgba(0, 0, 0, 0.25),
0 10px 10px rgba(0, 0, 0, 0.22)`,level5BoxShadow:`0 19px 38px rgba(0, 0, 0, 0.30),
0 15px 12px rgba(0, 0, 0, 0.22)`,boxShadowButtonsCharts:"0px 1px 3px 0px rgba(54,58,61,0.12)",boxShadowButtonsChartsHover:"0px 3px 6px 0px rgba(54,58,61,0.12)",boxShadowModal:"0px 8px 16px 0px rgba(54,58,61,0.16)",boxShadowDropdown:"0px 4px 8px 0px rgba(54,58,61,0.12)",boxShadowSection:"1px 1px 20px 0px #e6e6e6",tabBoxShadow:"inset 0 -4px 25px -8px rgba(0, 0, 0, 0.2)",fontSizeStandard:"16px",lineHeightStandard:"24px",fontWeightStandard:"100",navbarHeight:"0px",pageHeaderButtonSpacing:"10px",standardSpacingUnit:"8px",spu:"8px",actionButtonFocusedColor:deepTeal,actionButtonFocusedFontColor:white,actionButtonFocusedBorderColor:deepTeal,actionButtonActiveColor:info,actionButtonActiveFontColor:white,actionButtonActiveBorderColor:info,actionButtonDefaultColor:gray[100],actionButtonDefaultFontColor:textPrimary,actionButtonDefaultBorderColor:"transparent",actionFocusedColor:primaryBackground,actionFocusedFontColor:textPrimary,actionActiveColor:primaryBackground,actionActiveFontColor:textPrimary,separatorBorder:"1px solid "+gray[400],searchNavHeight:"52px",galleryNavHeight:"52px",fancyPageSidebarWidth:"52px",mobileBarHeight:"52px",reportCoverHorizontalMargin:"28px",reportDraftBackgroundColor:"#fff8e3",reportFontSize:"18px",TABLET_WIDTH:1320,SMALL_TABLET_WIDTH:1e3,MOBILE_WIDTH:600},radii={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},SCALING_FACTOR=.25,factor=function(et){return typeof et=="string"?et:SCALING_FACTOR*et+"rem"},spacing$1=_default$9(factor),transitionProperty={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},transitionTimingFunction={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},transitionDuration={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},transition={property:transitionProperty,easing:transitionTimingFunction,duration:transitionDuration},typography={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem",xl5:"3rem",xl6:"3.75rem",xl7:"4.5rem",xl8:"6rem",xl9:"8rem"}},zIndices={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},foundations=__assign(__assign({zIndices,radii,legacy:legacy$2,colors:colors$1},typography),{spacing:spacing$1,transition}),styled=styled$1,css=Ce,InconsolataWoff="data:font/woff;base64, ",InconsolataWoff2="data:font/woff2;base64, ",SourceSansPro600Woff="data:font/woff;base64, ",SourceSansPro600Woff2="data:font/woff2;base64, ",SourceSansPro700Woff="data:font/woff;base64, ",SourceSansPro700Woff2="data:font/woff2;base64, ",SourceSansProItlatics700Woff="data:font/woff;base64, ",SourceSansProItlatics700Woff2="data:font/woff2;base64, ",SourceSansProItlatics400Woff="data:font/woff;base64, ",SourceSansProItlatics400Woff2="data:font/woff2;base64, ",SourceSansPro400Woff="data:font/woff;base64, ",SourceSansPro400Woff2="data:font/woff2;base64, ",SourceSansPro200Woff="data:font/woff;base64, ",SourceSansPro200Woff2="data:font/woff2;base64, ",SourceSansProItlatics200Woff="data:font/woff;base64, ",SourceSansProItlatics200Woff2="data:font/woff2;base64, ",SourceSansPro300Woff="data:font/woff;base64, ",SourceSansPro300Woff2="data:font/woff2;base64, ",SourceSansProItlatics300Woff="data:font/woff;base64, ",SourceSansProItlatics300Woff2="data:font/woff2;base64, ",SourceSerifProWoff="data:font/woff;base64, ",SourceSerifProWoff2="data:font/woff2;base64, ";We(templateObject_1$p||(templateObject_1$p=__makeTemplateObject([`
    /**********
    Onprem needs to work airgapped so we host the google fonts ourselves:

    To add a new font use: https://google-webfonts-helper.herokuapp.com
    Currently just supporting modern browsers.
    ***********/
    @font-face {
        font-family: 'Inconsolata';
        src: local(''),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    @font-face {
        font-family: 'Source Serif Pro';
        font-style: normal;
        font-weight: 400;
        src: local(''),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-200 - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 200;
        src: local('Source Sans Pro ExtraLight'), local('SourceSansPro-ExtraLight'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* source-sans-pro-300 - latin */
    @font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 300;
    src: local('Source Sans Pro Light'), local('SourceSansPro-Light'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-regular - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 400;
        src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-600 - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 600;
        src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-700 - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 700;
        src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    /* source-sans-pro-200italic - latin */
    @font-face {
    font-family: 'Source Sans Pro';
    font-style: italic;
    font-weight: 200;
    src: local('Source Sans Pro ExtraLight Italic'), local('SourceSansPro-ExtraLightItalic'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-300italic - latin */
    @font-face {
    font-family: 'Source Sans Pro';
    font-style: italic;
    font-weight: 300;
    src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-italic - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: italic;
        font-weight: 400;
        src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-700italic - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: italic;
        font-weight: 700;
        src: local('Source Sans Pro Bold Italic'), local('SourceSansPro-BoldItalic'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
`],[`
    /**********
    Onprem needs to work airgapped so we host the google fonts ourselves:

    To add a new font use: https://google-webfonts-helper.herokuapp.com
    Currently just supporting modern browsers.
    ***********/
    @font-face {
        font-family: 'Inconsolata';
        src: local(''),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    @font-face {
        font-family: 'Source Serif Pro';
        font-style: normal;
        font-weight: 400;
        src: local(''),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-200 - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 200;
        src: local('Source Sans Pro ExtraLight'), local('SourceSansPro-ExtraLight'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* source-sans-pro-300 - latin */
    @font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 300;
    src: local('Source Sans Pro Light'), local('SourceSansPro-Light'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-regular - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 400;
        src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-600 - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 600;
        src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-700 - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: normal;
        font-weight: 700;
        src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    /* source-sans-pro-200italic - latin */
    @font-face {
    font-family: 'Source Sans Pro';
    font-style: italic;
    font-weight: 200;
    src: local('Source Sans Pro ExtraLight Italic'), local('SourceSansPro-ExtraLightItalic'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-300italic - latin */
    @font-face {
    font-family: 'Source Sans Pro';
    font-style: italic;
    font-weight: 300;
    src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'),
            url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
            url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-italic - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: italic;
        font-weight: 400;
        src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    /* source-sans-pro-700italic - latin */
    @font-face {
        font-family: 'Source Sans Pro';
        font-style: italic;
        font-weight: 700;
        src: local('Source Sans Pro Bold Italic'), local('SourceSansPro-BoldItalic'),
                url(`,`) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
                url(`,`) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
`])),InconsolataWoff2,InconsolataWoff,SourceSerifProWoff2,SourceSerifProWoff,SourceSansPro200Woff2,SourceSansPro200Woff,SourceSansPro300Woff2,SourceSansPro300Woff,SourceSansPro400Woff2,SourceSansPro400Woff,SourceSansPro600Woff2,SourceSansPro600Woff,SourceSansPro700Woff2,SourceSansPro700Woff,SourceSansProItlatics200Woff2,SourceSansProItlatics200Woff,SourceSansProItlatics300Woff2,SourceSansProItlatics300Woff,SourceSansProItlatics400Woff2,SourceSansProItlatics400Woff,SourceSansProItlatics700Woff2,SourceSansProItlatics700Woff);var templateObject_1$p,MuiButton={root:{borderRadius:"3px",padding:"4px 12px",minWidth:"56px","&:hover":{backgroundColor:colors$1.blackAlpha[50]},"&:focus":{backgroundColor:colors$1.blackAlpha[50]},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},containedSizeSmall:{padding:"1px 8px"},containedSizeLarge:{padding:"7px 22px"},containedPrimary:{"&:focus":{backgroundColor:"#004D96"}},outlined:{padding:"3px 11px",border:"1px solid "+colors$1.blackAlpha[600]},outlinedPrimary:{"&:hover":{border:"1px solid rgba(46, 120, 199, 0.5)"},"&:focus":{backgroundColor:"rgba(46, 120, 199, 0.04)",border:"1px solid rgba(46, 120, 199, 0.5)"}},outlinedSizeSmall:{padding:"0 7px"},outlinedSizeLarge:{padding:"6px 20px"},outlinedSecondary:{border:"1px solid rgba(117, 117, 117, 0.5)","&:hover":{border:"1px solid "+colors$1.gray[500],backgroundColor:colors$1.blackAlpha[50]},"&:focus":{border:"1px solid "+colors$1.gray[500],backgroundColor:colors$1.blackAlpha[50]},"&.Mui-disabled":{border:"1px solid "+colors$1.gray[400]}},text:{padding:"3px 11px"},textPrimary:{color:"#2E78C7","&:hover":{backgroundColor:"rgba(46, 120, 199, 0.04)"},"&:focus":{backgroundColor:"rgba(46, 120, 199, 0.04)"}},textSizeSmall:{padding:"1px 8px"},textSizeLarge:{padding:"7px 22px"},iconSizeSmall:{"&> *:first-child":{fontSize:"1.12rem"}},endIcon:{marginLeft:"4px"},startIcon:{marginRight:"4px"}},MuiChip={root:{borderRadius:"3px",fontSize:"0.875rem",height:"28px"},iconSmall:{"&.MuiIcon-root":{fontSize:"1.25rem",width:"1.25rem",height:"1.25rem",lineHeight:"1.5rem"}},deleteIconSmall:{"&.MuiIcon-root":{fontSize:"1.35rem",width:"1.35rem",height:"1.35rem",lineHeight:"1.65rem"}},outlined:{color:"#363A3D"},outlinedSecondary:{color:"#363A3D"},colorSecondary:{color:"#fff"}},MuiInputBase={input:{height:spacing$1(5),padding:spacing$1(3,0),borderColor:colors$1.gray[400]},inputMarginDense:{paddingTop:spacing$1(2),paddingBottom:spacing$1(2)}},MuiInputLabel={formControl:{position:"relative",top:"auto",left:"auto",fontSize:"0.8125rem",marginBottom:"3px",transform:"none"},outlined:{transform:"none","&.MuiInputLabel-marginDense":{transform:"none"}},filled:{transform:"none","&.MuiInputLabel-marginDense":{transform:"none"}},marginDense:{transform:"none"}},palette={type:"light",common:{white:colors$1.white,black:colors$1.black},primary:{light:foundations.legacy.primaryLight,main:foundations.legacy.primary,dark:foundations.legacy.primaryDark,contrastText:colors$1.white},secondary:{light:colors$1.gray[400],main:colors$1.gray[600],dark:colors$1.gray[800],contrastText:colors$1.black},success:{light:foundations.legacy.successLight,main:foundations.legacy.success,dark:foundations.legacy.successDark,contrastText:colors$1.black},error:{light:foundations.legacy.error,main:foundations.legacy.error,dark:foundations.legacy.error,contrastText:colors$1.black},info:{light:foundations.legacy.infoLight,main:foundations.legacy.info,dark:foundations.legacy.infoDark,contrastText:colors$1.black},warning:{light:foundations.legacy.warningLight,main:foundations.legacy.warning,dark:foundations.legacy.warningDark,contrastText:colors$1.black},red:{light:foundations.colors.red[400],main:foundations.legacy.red[600],dark:foundations.legacy.red[800],contrastText:colors$1.black},text:{primary:colors$1.gray[800],secondary:colors$1[600],disabled:colors$1.gray[400]},grey:colors$1.gray},colors=foundations.colors,spacing=foundations.spacing,fontWeights=foundations.fontWeights;createTheme({spacing,palette,typography:{fontFamily:"Source Sans Pro",button:{fontFamily:"Source Sans Pro",textTransform:"none",letterSpacing:"none"}},props:{MuiButtonBase:{disableRipple:!0},MuiButton:{disableElevation:!0,disableRipple:!0},MuiTooltip:{arrow:!0},MuiButtonGroup:{disableElevation:!0,disableRipple:!0},MuiInputLabel:{disableAnimation:!0,shrink:!1},MuiOutlinedInput:{notched:!1},MuiFilledInput:{disableUnderline:!0},MuiPopover:{elevation:3},MuiSelect:{MenuProps:{getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}}},MuiIcon:{component:"i"}},overrides:__assign(__assign({MuiTooltip:{tooltip:{fontSize:spacing(3)},arrow:{width:spacing(4)}},MuiIconButton:{root:{color:colors.gray[800],padding:spacing(2),borderRadius:spacing(1),"&:focus":{backgroundColor:colors.blackAlpha[50]},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},colorPrimary:{color:foundations.legacy.primary,"&:hover":{backgroundColor:"rgba(46, 120, 199, 0.04)"},"&:focus":{backgroundColor:"rgba(46, 120, 199, 0.04)"}}}},{MuiAutocomplete:{option:{fontSize:"0.875rem"}}}),{MuiButton,MuiChip,MuiFormLabel:{root:{fontWeight:fontWeights.semibold,letterSpacing:foundations.letterSpacings.normal,color:colors.gray[800],"&.Mui-focused":{color:colors.gray[800]}}},MuiInputLabel,MuiInputBase,MuiOutlinedInput:{input:{padding:spacing(3,2)},inputMarginDense:{paddingTop:spacing(2),paddingBottom:spacing(2)},adornedStart:{paddingLeft:spacing(2)},adornedEnd:{paddingRight:spacing(2)},multiline:{padding:spacing(3,2)}},MuiFilledInput:{root:{borderBottomLeftRadius:spacing(1),borderBottomRightRadius:spacing(1),backgroundColor:colors.blackAlpha[50],"&:hover":{backgroundColor:colors.blackAlpha[200]}},input:{padding:spacing(3,2)},inputMarginDense:{paddingTop:"6px",paddingBottom:"6px"},adornedStart:{paddingLeft:"8px"},adornedEnd:{paddingRight:"8px"},multiline:{padding:"10px 8px"}},MuiInputAdornment:{positionStart:{marginRight:"4px"},positionEnd:{marginLeft:"0"}},MuiMenuItem:{root:{paddingTop:"0",paddingBottom:"0",lineHeight:spacing(10)},dense:{paddingTop:"0",paddingBottom:"0",lineHeight:spacing(8)}},MuiListSubheader:{root:{lineHeight:"2.5rem",fontSize:"0.8125rem"}},MuiListItemText:{root:{paddingRight:"8px"}},MuiListItemIcon:{root:{minWidth:spacing(10),color:"inherit"}},MuiListItemSecondaryAction:{root:{right:spacing(2)}},MuiCheckbox:{root:{"&:hover":{backgroundColor:"transparent"}}},MuiSwitch:{root:{padding:"7px"},thumb:{boxShadow:"0px 0px 1px -1px rgb(0 0 0 / 20%), 0px 0px 1px 0px rgb(0 0 0 / 20%), 0px 0px 3px 0px rgb(0 0 0 / 12%)"},switchBase:{"&:hover":{backgroundColor:"transparent"}},track:{borderRadius:"25px"},sizeSmall:{padding:"2px"}}})});function opposite$1(et){switch(et){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}var PointyTriangleWrapper$1=styled$1.div(templateObject_1$o||(templateObject_1$o=__makeTemplateObject([`
  position: fixed;
  z-index: 999;
  top: `,`px;
  left: `,`px;
  border: `,`px solid transparent;
  `,`: none;
  `,": ",`px solid
    `,`;
`],[`
  position: fixed;
  z-index: 999;
  top: `,`px;
  left: `,`px;
  border: `,`px solid transparent;
  `,`: none;
  `,": ",`px solid
    `,`;
`])),function(et){return et.top},function(et){return et.left},function(et){return et.size},function(et){return"border-"+opposite$1(et.direction)},function(et){return"border-"+et.direction},function(et){return et.size},function(et){return et.color?et.color:"rgb(34, 34, 34)"}),PointyTriangle$1=function(et){var tt=Math.min(Math.max(et.x,0),window.innerWidth),nt=Math.min(Math.max(et.y,0),window.innerHeight);switch(et.direction){case"top":tt-=et.size,nt-=et.size;break;case"bottom":tt-=et.size;break;case"left":tt-=et.size,nt-=et.size;break;case"right":nt-=et.size;break}var rt=Wt.createElement(PointyTriangleWrapper$1,{left:tt,top:nt,size:et.size,direction:et.direction,color:et.color});return et.noPortal?rt:ReactDOM.createPortal({content:rt},document.body)},templateObject_1$o,Wrapper$2$1=styled$1.div(templateObject_1$n||(templateObject_1$n=__makeTemplateObject([`
  position: fixed;
  pointer-events: auto;
  z-index: 2147483606;
  left: `,`px;
  top: `,`px;
  height: `,`px;
`],[`
  position: fixed;
  pointer-events: auto;
  z-index: 2147483606;
  left: `,`px;
  top: `,`px;
  height: `,`px;
`])),function(et){return et.left},function(et){return et.top},function(et){return et.height}),Scroller=styled$1.div(templateObject_2$c||(templateObject_2$c=__makeTemplateObject([`
  width: 100%;
  height: 100%;
  overflow: `,`;
  position: relative;

  /* Hide scrollbar */
  scrollbar-width: none; // firefox
  &::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
`],[`
  width: 100%;
  height: 100%;
  overflow: `,`;
  position: relative;

  /* Hide scrollbar */
  scrollbar-width: none; // firefox
  &::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
`])),function(et){return et.contentOverflows?"auto":"visible"}),templateObject_1$n,templateObject_2$c,VERTICAL_MARGIN=2,HORIZONTAL_MARGIN=16,WBPopup=Wt.forwardRef(function(et,tt){var nt=et.className,rt=et.style,ot=et.x,st=et.y,ut=et.direction,ct=et.elementToPosition,ft=et.noPortal,pt=et.scrollerRef,ht=et.maxHeight,mt=et.onScroll,yt=et.children,vt=ut??"bottom center",Tt=Wt.useState(null),Et=Tt[0],xt=Tt[1],At=Wt.useState(0),Ct=At[0],$t=At[1],Ot=Wt.useState(0),Rt=Ot[0],It=Ot[1],kt=Wt.useState(0),Mt=kt[0],Ft=kt[1],zt=Wt.useState(0),Vt=zt[0],Zt=zt[1],Ut=ht??window.innerHeight-2*VERTICAL_MARGIN;Wt.useLayoutEffect(function(){if(Et!=null){var gn=vt.split(" "),An=gn[0],sn=gn[1],Sn=ct?ct.offsetWidth:Et.offsetWidth,In=ct?ct.offsetHeight:Vt,_n=st;switch(ct&&(_n-=ct.offsetTop),An){case"top":_n-=In;break;case"center":_n-=In/2;break}var En=ot;switch(ct&&(En-=ct.offsetLeft),sn){case"left":En-=Sn;break;case"center":En-=Sn/2;break}var Ln=0;_n<VERTICAL_MARGIN&&(Ln=VERTICAL_MARGIN-_n);var wn=Math.max(VERTICAL_MARGIN,_n);It(wn),$t(Math.min(Vt-Ln,window.innerHeight-VERTICAL_MARGIN-wn,Ut)),Ln>Et.scrollTop&&Et.scrollTo({top:Ln}),Ft(Math.max(Math.min(En,window.innerWidth-HORIZONTAL_MARGIN-Et.offsetWidth),HORIZONTAL_MARGIN))}},[Et,ot,st,vt,ct,Ut,Vt]);var Xt=Wt.useCallback(function(gn){pt&&(typeof pt=="function"?pt(gn):pt.current=gn),xt(gn)},[pt]),Jt=Wt.createElement(Wrapper$2$1,{ref:tt,left:Mt,height:Math.max(Ct,0),top:Rt,className:nt,style:rt},Wt.createElement(Measure,{bounds:!0,onResize:function(gn){var An=gn.bounds;Zt(An?.height||0)}},function(gn){var An=gn.measureRef;return Wt.createElement(Scroller,{ref:Xt,contentOverflows:Vt>Ct,onScroll:function(sn){if(mt?.(sn),!(ht||Ct>=Ut))if(Rt===VERTICAL_MARGIN){var Sn=sn.currentTarget.scrollHeight-sn.currentTarget.offsetHeight,In=Math.min(Sn-sn.currentTarget.scrollTop,window.innerHeight-VERTICAL_MARGIN-Rt);$t(Ct+In),sn.currentTarget.scrollTo({top:sn.currentTarget.scrollHeight})}else{var In=Math.min(sn.currentTarget.scrollTop,Rt-VERTICAL_MARGIN);$t(Ct+In),It(Rt-In),sn.currentTarget.scrollTo({top:0})}}},Wt.createElement("div",{ref:An},yt))}));return ft?Jt:ReactDOM.createPortal(Jt,document.body)}),Wrapper$1$1=styled$1.div(templateObject_1$m||(templateObject_1$m=__makeTemplateObject([`
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.12));
  z-index: 2147483647;
`],[`
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.12));
  z-index: 2147483647;
`]))),templateObject_1$m;function getScrollParent$1(et){if(et==null)return null;var tt=window.getComputedStyle(et).overflowY,nt=tt!=="visible"&&tt!=="hidden";return nt&&et.scrollHeight>et.clientHeight?et:getScrollParent$1(et.parentElement)}var WBAnchoredPopup$1=Wt.forwardRef(function(et,tt){var nt=et.className,rt=et.direction,ot=rt===void 0?"bottom right":rt,st=et.triangleColor,ut=et.triangleSize,ct=ut===void 0?4:ut,ft=et.anchorElement,pt=et.children,ht=et.maxHeight,mt=et.onParentScroll,yt=mt===void 0?"follow":mt,vt=et.scrollerRef,Tt=et.onScroll,Et=Wt.useState(),xt=Et[0],At=Et[1],Ct=Wt.useState(null),$t=Ct[0],Ot=Ct[1];Wt.useEffect(function(){ft&&At(ft.getBoundingClientRect());var Xt=getScrollParent$1(ft);function Jt(){typeof yt=="function"&&yt(),ft&&yt==="follow"&&At(ft.getBoundingClientRect())}return Xt&&Xt.addEventListener("scroll",Jt),document.addEventListener("scroll",Jt),function(){Xt&&Xt.removeEventListener("scroll",Jt),document.removeEventListener("scroll",Jt)}},[ft,yt]),Wt.useEffect(function(){if(yt==="disable"&&$t)return bodyScrollLock_min.disableBodyScroll($t,{reserveScrollBarGap:!0}),function(){bodyScrollLock_min.enableBodyScroll($t)}},[yt,$t]);var Rt=0,It=0,kt=0,Mt=0;if(xt!=null){var Ft=ot.split(" "),zt=Ft[0],Vt=Ft[1];switch(zt){case"top":It=xt.top-ct,Mt=xt.top;break;case"center":It=xt.top+xt.height/2,Mt=xt.top+xt.height/2;break;case"bottom":It=xt.bottom+ct,Mt=xt.bottom;break}switch(Vt){case"left":zt==="center"?(Rt=xt.left-ct,kt=xt.left):(Rt=xt.left+xt.width,kt=xt.left+xt.width/2);break;case"center":Rt=xt.left+xt.width/2,kt=xt.left+xt.width/2;break;case"right":zt==="center"?(Rt=xt.right+ct,kt=xt.right):(Rt=xt.left,kt=xt.left+xt.width/2);break}}var Zt=Wt.useMemo(function(){for(var Xt=0,Jt=["top","bottom","left","right"];Xt<Jt.length;Xt++){var gn=Jt[Xt];if(ot.indexOf(gn)!==-1)return gn}return"bottom"},[ot]),Ut=Wt.useCallback(function(Xt){vt&&(typeof vt=="function"?vt(Xt):vt.current=Xt),Ot(Xt)},[vt]);return ReactDOM.createPortal(Wt.createElement(Wt.Fragment,null,Wt.createElement(Wrapper$1$1,null,ct>0&&Wt.createElement(PointyTriangle$1,{x:kt,y:Mt,size:ct,direction:Zt,color:st,noPortal:!0}),Wt.createElement(WBPopup,{className:nt,ref:tt,scrollerRef:Ut,x:Rt,y:It,maxHeight:ht,direction:ot,noPortal:!0,onScroll:Tt},pt))),document.body)}),Checkbox=styled(MuiCheckbox)(templateObject_1$l||(templateObject_1$l=__makeTemplateObject([`
  &.MuiCheckbox-colorPrimary.Mui-checked:hover,
  &.MuiCheckbox-colorSecondary.Mui-checked:hover {
    background-color: transparent;
  }
  background: `,`;
  &.Mui-disabled {
    cursor: not-allowed;
    pointer-events: auto;
    svg {
      path {
        fill: `,`;
      }
    }
  }
`],[`
  &.MuiCheckbox-colorPrimary.Mui-checked:hover,
  &.MuiCheckbox-colorSecondary.Mui-checked:hover {
    background-color: transparent;
  }
  background: `,`;
  &.Mui-disabled {
    cursor: not-allowed;
    pointer-events: auto;
    svg {
      path {
        fill: `,`;
      }
    }
  }
`])),function(et){return et.color},function(et){return et.theme.legacy.disabled}),templateObject_1$l,CheckboxIcon=function(et){return Wt.createElement(SvgIcon$1,__assign({},et),Wt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 4.3H5C4.6134 4.3 4.3 4.6134 4.3 5V19C4.3 19.3866 4.6134 19.7 5 19.7H19C19.3866 19.7 19.7 19.3866 19.7 19V5C19.7 4.6134 19.3866 4.3 19 4.3ZM5 3C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3H5Z"}))},CheckedIcon$1=function(et){return Wt.createElement(SvgIcon$1,__assign({},et),Wt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 3C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3H5ZM9.82507 17.0625L18.75 8.42575L17.2121 6.9375L9.82507 14.086L6.78791 11.1469L5.25 12.6351L9.82507 17.0625Z"}))},WBCheckbox=function(et){return Wt.createElement(Checkbox,__assign({icon:Wt.createElement(CheckboxIcon,null),checkedIcon:Wt.createElement(CheckedIcon$1,null)},et))},Icon$1=styled(Icon$1$1)(templateObject_1$k||(templateObject_1$k=__makeTemplateObject([`
  width: `,`;
`],[`
  width: `,`;
`])),function(et){return et.size==null?"inherit":typeof et.size=="number"?et.theme.spacing(et.size):et.size}),templateObject_1$k,WBIcon=react.exports.forwardRef(function(et,tt){var nt=et.name;et.offsetTop,et.forceVisible;var rt=et.className;et.size;var ot=et.useNewIconComponent,st=__rest(et,["name","offsetTop","forceVisible","className","size","useNewIconComponent"]);return ot?Wt.createElement(Icon$1,__assign({},st,{ref:tt,name:nt,className:classnames("wbic-ic-"+nt,rt)})):Wt.createElement("i",__assign({},st,{ref:tt,className:classnames("wbic-ic-"+nt,rt)}))}),Autocomplete=styled$1(Autocomplete$1$1)(templateObject_1$j||(templateObject_1$j=__makeTemplateObject([`
  .MuiAutocomplete-inputRoot {
    .MuiAutocomplete-input {
      min-height: 28px;
      padding: 6px 0;
    }
    &[class*='MuiInput-marginDense'] {
      .MuiAutocomplete-input {
        min-height: 22px;
      }
    }
  }
  .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root'],
  .MuiAutocomplete-inputRoot[class*='MuiFilledInput-root'] {
    padding: 3px;
    &[class*='MuiOutlinedInput-adornedStart'],
    &[class*='MuiFilledInput-adornedStart'] {
      .MuiAutocomplete-input {
        padding: 2px 0;
      }
    }
    .MuiAutocomplete-input {
      min-height: 30px;
      padding: 2px 6px;
    }
    .MuiInputAdornment-positionStart {
      margin-left: 6px;
    }
  }
  .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root'][class*='MuiOutlinedInput-marginDense'],
  .MuiAutocomplete-inputRoot[class*='MuiFilledInput-root'][class*='MuiFilledInput-marginDense'] {
    .MuiAutocomplete-tag {
      margin: 1px;
    }
    &[class*='MuiOutlinedInput-adornedStart'],
    &[class*='MuiFilledInput-adornedStart'] {
      .MuiAutocomplete-input {
        padding: 2px 0;
      }
    }
    .MuiAutocomplete-input {
      min-height: 22px;
    }
    .MuiAutocomplete-endAdornment {
      top: calc(50% - 16px);
      right: 4px;
      .MuiAutocomplete-clearIndicator {
        min-height: 32px;
      }
      .MuiAutocomplete-popupIndicator {
        margin-right: -4px;
      }
    }
  }
  `,`
`],[`
  .MuiAutocomplete-inputRoot {
    .MuiAutocomplete-input {
      min-height: 28px;
      padding: 6px 0;
    }
    &[class*='MuiInput-marginDense'] {
      .MuiAutocomplete-input {
        min-height: 22px;
      }
    }
  }
  .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root'],
  .MuiAutocomplete-inputRoot[class*='MuiFilledInput-root'] {
    padding: 3px;
    &[class*='MuiOutlinedInput-adornedStart'],
    &[class*='MuiFilledInput-adornedStart'] {
      .MuiAutocomplete-input {
        padding: 2px 0;
      }
    }
    .MuiAutocomplete-input {
      min-height: 30px;
      padding: 2px 6px;
    }
    .MuiInputAdornment-positionStart {
      margin-left: 6px;
    }
  }
  .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root'][class*='MuiOutlinedInput-marginDense'],
  .MuiAutocomplete-inputRoot[class*='MuiFilledInput-root'][class*='MuiFilledInput-marginDense'] {
    .MuiAutocomplete-tag {
      margin: 1px;
    }
    &[class*='MuiOutlinedInput-adornedStart'],
    &[class*='MuiFilledInput-adornedStart'] {
      .MuiAutocomplete-input {
        padding: 2px 0;
      }
    }
    .MuiAutocomplete-input {
      min-height: 22px;
    }
    .MuiAutocomplete-endAdornment {
      top: calc(50% - 16px);
      right: 4px;
      .MuiAutocomplete-clearIndicator {
        min-height: 32px;
      }
      .MuiAutocomplete-popupIndicator {
        margin-right: -4px;
      }
    }
  }
  `,`
`])),function(et){return et.multiple&&`
    .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root'],
    .MuiAutocomplete-inputRoot[class*='MuiFilledInput-root'],
    .MuiAutocomplete-inputRoot {
      .MuiAutocomplete-input {
        padding: 2px 6px;
      }
    }
    `}),Option$1=styled$1.div(templateObject_2$b||(templateObject_2$b=__makeTemplateObject([`
  display: flex;
  align-items: center;
  flex: 100%;
`],[`
  display: flex;
  align-items: center;
  flex: 100%;
`]))),OptionCheckbox=styled$1(WBCheckbox)(templateObject_3$7||(templateObject_3$7=__makeTemplateObject([`
  margin-right: 16px;
  padding: 0;
`],[`
  margin-right: 16px;
  padding: 0;
`]))),OptionIcon=styled$1(WBIcon)(templateObject_4$6||(templateObject_4$6=__makeTemplateObject([`
  margin-right: 16px;
  transform: translateY(-0.25rem);
`],[`
  margin-right: 16px;
  transform: translateY(-0.25rem);
`]))),Highlighted=styled$1.span(templateObject_5$3||(templateObject_5$3=__makeTemplateObject([`
  font-weight: `,`;
`],[`
  font-weight: `,`;
`])),function(et){return et.highlight?600:400}),SelectedCheck=styled$1(WBIcon)(templateObject_6$2||(templateObject_6$2=__makeTemplateObject([`
  margin-left: auto;
  transform: translateY(-0.25rem);
`],[`
  margin-left: auto;
  transform: translateY(-0.25rem);
`]))),templateObject_1$j,templateObject_2$b,templateObject_3$7,templateObject_4$6,templateObject_5$3,templateObject_6$2;Wt.forwardRef(function(et,tt){var nt=et.optionStartAction,rt=et.checkSelected,ot=__rest(et,["optionStartAction","checkSelected"]);return Wt.createElement(Autocomplete,__assign({},ot,{ref:tt,renderOption:function(st,ut){var ct=ut.inputValue,ft=ut.selected,pt=match(st,ct),ht=parse$1(st,pt);return Wt.createElement(Option$1,null,nt&&nt.type==="checkbox"&&Wt.createElement(OptionCheckbox,__assign({checked:ft},nt.checkboxProps)),nt&&nt.type==="icon"&&Wt.createElement(OptionIcon,__assign({size:"1rem",useNewIconComponent:!0},nt.iconProps)),Wt.createElement("div",null,ht.map(function(mt,yt){return Wt.createElement(Highlighted,{highlight:mt.highlight,key:yt},mt.text)})),ft&&rt&&Wt.createElement(SelectedCheck,{name:"check",size:"1rem",useNewIconComponent:!0}))}}))});var Wrapper$4=styled$1.div(templateObject_1$i||(templateObject_1$i=__makeTemplateObject([`
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
`],[`
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
`]))),Loading=styled$1(CircularProgress$1)(templateObject_2$a||(templateObject_2$a=__makeTemplateObject([""],[""]))),templateObject_1$i,templateObject_2$a,WBLoading=function(et){return Wt.createElement(Wrapper$4,null,Wt.createElement(Loading,__assign({size:"1rem"},et)))},ExtendedColors={error:legacy$2.error,success:legacy$2.success,info:legacy$2.info},borderColors={error:legacy$2.errorBorder,success:legacy$2.successBorder,info:legacy$2.infoBorder},textColors$1={error:legacy$2.errorText,success:legacy$2.successText,info:legacy$2.infoText},backgroundColors={primary:legacy$2.primaryBackground,secondary:legacy$2.selected,error:legacy$2.errorBackground,success:legacy$2.successBackground,info:legacy$2.infoBackground},darkColors={primary:legacy$2.primaryDark,secondary:foundations.colors.gray[700],error:legacy$2.errorDark,success:legacy$2.successDark,info:legacy$2.infoDark};function makeHoverColor(et){return color(et).darken(.2).rgb().string()}function isExtendedColor(et){return _$2.includes(["error","success","info"],et)}function isNamedColor$1(et){return _$2.includes(["error","success","info","primary","secondary"],et)}var Button=styled(Button$1$1)(templateObject_1$h||(templateObject_1$h=__makeTemplateObject([`
  .MuiIcon-root {
    line-height: 1;
  }
  &:not(.MuiButton-sizeSmall):not(.MuiButton-sizeLarge) {
    .MuiIcon-root {
      transform: translateY(-0.017rem);
    }
    .MuiButton-label {
      transform: translateY(-0.03rem);
    }
  }
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
`],[`
  .MuiIcon-root {
    line-height: 1;
  }
  &:not(.MuiButton-sizeSmall):not(.MuiButton-sizeLarge) {
    .MuiIcon-root {
      transform: translateY(-0.017rem);
    }
    .MuiButton-label {
      transform: translateY(-0.03rem);
    }
  }
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
  `,`
`])),function(et){return et.variant==="contained"&&isExtendedColor(et.color)&&`
    background: `+ExtendedColors[et.color]+`;
    color:`+et.theme.colors.black+`;
    &:hover, &:focus{
      background: `+makeHoverColor(ExtendedColors[et.color])+`;
    }
  `},function(et){return et.variant==="outlined"&&isExtendedColor(et.color)&&`
    border-color: `+borderColors[et.color]+`;
    color: `+textColors$1[et.color]+`;
    &:hover, &:focus{
      background: `+backgroundColors[et.color]+`;
    }
  `},function(et){return et.variant==="text"&&isExtendedColor(et.color)&&`
    color: `+textColors$1[et.color]+`;
    &:hover, &:focus{
      background:  `+backgroundColors[et.color]+`;
    }
  `},function(et){return(et.variant===void 0||et.variant==="text")&&isExtendedColor(et.color)&&`
    color: `+textColors$1[et.color]+`;
    &:hover, &:focus{
      background:  `+backgroundColors[et.color]+`;
    }
  `},function(et){return et.loading&&`
    pointer-events: none;
    .children,
    .MuiButton-startIcon,
    .MuiButton-endIcon {
      visibility: hidden;
    }`},function(et){return et.loading&&et.variant==="contained"&&isNamedColor$1(et.color)&&`
    background: `+darkColors[et.color]+`;
    .MuiCircularProgress-colorPrimary{
      color: `+et.theme.colors.white+`;
    }
  `},function(et){return et.loading&&et.variant==="outlined"&&isExtendedColor(et.color)&&`
    .MuiCircularProgress-colorPrimary{
      color: `+textColors$1[et.color]+`;
    }
  `},function(et){return et.active&&`
    background: `+legacy$2.primaryBackground+`;
    &:hover, &:focus{
      background-color: `+legacy$2.primaryBackground+`;
    }
  `},function(et){return et.active&&(et.variant===void 0||et.variant==="text")&&isNamedColor$1(et.color)&&`
    background: `+backgroundColors[et.color]+`;
    &:hover, &:focus{
      background: `+backgroundColors[et.color]+`;
    }
  `},function(et){return et.active&&et.variant==="contained"&&`
    background: `+legacy$2.primaryBackground+`;
    &:hover, &:focus{
      background-color: `+legacy$2.primaryBackground+`;
    }
  `},function(et){return et.active&&et.variant==="contained"&&isNamedColor$1(et.color)&&`
    background: `+darkColors[et.color]+`;
    &:hover, &:focus{
      background-color: `+darkColors[et.color]+`;
    }
    .children{
      color: `+et.theme.colors.white+`;
    }
  `},function(et){return et.active&&et.variant==="outlined"&&isNamedColor$1(et.color)&&`
    background: `+backgroundColors[et.color]+`;
    &:hover, &:focus{
      background: `+backgroundColors[et.color]+`;
    }
  `}),templateObject_1$h;Wt.forwardRef(function(et,tt){var nt=et.loading,rt=et.active,ot=et.children,st=et.color,ut=st===void 0?"default":st,ct=et.icon,ft=et.iconPos,pt=ft===void 0?"start":ft,ht=__rest(et,["loading","active","children","color","icon","iconPos"]);return ct&&(pt==="end"?ht.endIcon=Wt.createElement(WBIcon,{name:ct,useNewIconComponent:!0}):ht.startIcon=Wt.createElement(WBIcon,{name:ct,useNewIconComponent:!0})),Wt.createElement(Button,__assign({},ht,{ref:tt,color:ut,active:rt,loading:nt}),nt&&Wt.createElement(WBLoading,null),Wt.createElement("span",{className:"children"},ot))});var mainColors={error:legacy$2.error,success:legacy$2.success,info:legacy$2.info,warning:legacy$2.warning,default:legacy$2.gray300,primary:legacy$2.primary,secondary:legacy$2.gray600},textColors={error:legacy$2.errorText,success:legacy$2.successText,info:legacy$2.infoText,warning:legacy$2.warningText,default:legacy$2.gray800,primary:legacy$2.primaryText,secondary:legacy$2.gray800};function isNamedColor(et){return _$2.includes(["error","success","info","warning","default","primary","secondary"],et)}function isValidColor(et){var tt=colorString$1.exports.get(et);return tt!=null}function isLight(et){return isValidColor(et)?color(et).isLight():et}function textColor(et){if(!isValidColor(et))return et;var tt=color(et),nt=tt.contrast(color("white")),rt=4.5/nt*.19;return nt<4.5?tt.darken(rt).string():et}function hoverColor(et){if(!isValidColor(et))return et;var tt=color(et);return tt.darken(.2).rgb().string()}function outlinedHoverColor(et){if(!isValidColor(et))return et;var tt=color(et);return tt.alpha(.08).rgb().string()}function shadedBgColor(et){if(!isValidColor(et))return et;var tt=color(et);return tt.alpha(.3).rgb().string()}function shadedHoverColor(et){if(!isValidColor(et))return et;var tt=color(et);return tt.alpha(.45).rgb().string()}var Chip=styled$1(Chip$1$1)(templateObject_1$g||(templateObject_1$g=__makeTemplateObject([`
  .MuiChip-deleteIcon {
    color: inherit;
    opacity: 0.26;
    &:hover {
      opacity: 1;
    }
  }
  .MuiChip-icon {
    color: inherit;
  }

  `,`
  `,`
  `,`

  `,`
    `,`
  `,`
`],[`
  .MuiChip-deleteIcon {
    color: inherit;
    opacity: 0.26;
    &:hover {
      opacity: 1;
    }
  }
  .MuiChip-icon {
    color: inherit;
  }

  `,`
  `,`
  `,`

  `,`
    `,`
  `,`
`])),function(et){return isNamedColor(et.color)&&et.variant==="default"&&`
      background: `+mainColors[et.color]+`;
      &.MuiChip-clickable{
        &:hover, &:focus{
          background: `+hoverColor(mainColors[et.color])+`;
        }
      }
    `},function(et){return isNamedColor(et.color)&&et.variant==="outlined"&&"border-color: "+mainColors[et.color]+`;
      color: `+textColors[et.color]+`;
      &.MuiChip-clickable{
        &:hover, &:focus{
        background: `+outlinedHoverColor(mainColors[et.color])+`;
      }}`},function(et){return isNamedColor(et.color)&&et.variant==="shaded"&&`border-color:transparent;
      background-color: `+shadedBgColor(mainColors[et.color])+`;
      color: #000;
      &.MuiChip-clickable{
        &:hover, &:focus{
          background: `+shadedHoverColor(mainColors[et.color])+`;
        }
      }`},function(et){return!isNamedColor(et.color)&&et.variant==="default"&&`
      background: `+et.color+`;
      color: `+(isLight(et.color)?"#000":"#FFF")+`;
      &.MuiChip-clickable{
        &:hover, &:focus{
          background: `+hoverColor(et.color)+`;
        }
      }
    `},function(et){return!isNamedColor(et.color)&&et.variant==="outlined"&&`
    border-color: `+et.color+`;
    color: `+textColor(et.color)+`;
    &.MuiChip-clickable{
      &:hover, &:focus{
        background: `+outlinedHoverColor(et.color)+`;
      }
    }`},function(et){return!isNamedColor(et.color)&&et.variant==="shaded"&&`
    border:none;
    background-color: `+shadedBgColor(et.color)+`;
    color: #000;
    &.MuiChip-clickable{
      &:hover, &:focus{
        background: `+shadedHoverColor(et.color)+`;
      }
    }`}),templateObject_1$g;Wt.forwardRef(function(et,tt){var nt=et.color,rt=nt===void 0?"default":nt,ot=et.variant,st=ot===void 0?"default":ot,ut=et.iconName,ct=et.deleteIcon,ft=ct===void 0?Wt.createElement(WBIcon,{name:"remove-circle-fill",useNewIconComponent:!0}):ct,pt=__rest(et,["color","variant","iconName","deleteIcon"]);return ut&&(pt.icon=Wt.createElement(WBIcon,{name:ut,useNewIconComponent:!0})),Wt.createElement(Chip,__assign({},pt,{ref:tt,color:rt,variant:st,deleteIcon:ft}))});var theme={name:"Light Theme",palette:{type:"light",common:{white:"#FFFFFF",black:"#000000"},primary:{light:"#6BA6FA",main:"#2E78C7",dark:"#004D96",background:"rgba(46, 120, 199, 8%)",contrastText:"#fff"},secondary:{light:"#D2D2D2",main:"#757575",dark:"#363A3D",contrastText:"#000"},success:{light:"#5BE8D1",main:"#00B5A0",dark:"#008472",contrastText:"#000"},error:{light:"#de6680",main:"#de6680",dark:"#de6680",contrastText:"#000"},info:{light:"#61EAFF",main:"#03B7CE",dark:"#61EAFF",contrastText:"#000"},text:{primary:"#363A3D",secondary:"#757575",disabled:"##D2D2D2"},grey:{50:"#F9F9F9",100:"#F4F4F4",200:"#EEEEEE",300:"#E6E6E6",400:"#D2D2D2",500:"#AAAAAA",600:"#757575",700:"#515457",800:"#363A3D",900:"#1A1C1F"}},typography:{fontFamily:"Source Sans Pro",button:{fontFamily:"Source Sans Pro",textTransform:"none",letterSpacing:"none"}},props:{MuiButtonBase:{disableRipple:!0},MuiButton:{disableElevation:!0,disableRipple:!0},MuiTooltip:{arrow:!0},MuiButtonGroup:{disableElevation:!0,disableRipple:!0},MuiInputLabel:{disableAnimation:!0,shrink:!1},MuiOutlinedInput:{notched:!1},MuiFilledInput:{disableUnderline:!0},MuiPopover:{elevation:3},MuiCheckbox:{color:"primary"},MuiRadio:{color:"primary"}},overrides:{MuiTooltip:{tooltip:{fontSize:"0.75rem"},arrow:{width:"1em"}},MuiIconButton:{root:{color:"#363A3D",padding:"8px",borderRadius:"3px","&:focus":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},colorPrimary:{color:"#2E78C7","&:hover":{backgroundColor:"rgba(46, 120, 199, 0.04)"},"&:focus":{backgroundColor:"rgba(46, 120, 199, 0.04)"}}},MuiButton:{root:{borderRadius:"3px",padding:"4px 12px",minWidth:"56px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:focus":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},containedSizeSmall:{padding:"1px 8px"},containedSizeLarge:{padding:"7px 22px"},containedPrimary:{"&:focus":{backgroundColor:"#004D96"}},containedSecondary:{color:"#FFFFFF"},outlined:{padding:"3px 11px",border:"1px solid rgba(0, 0, 0, 0.5)"},outlinedPrimary:{"&:hover":{border:"1px solid rgba(46, 120, 199, 0.5)"},"&:focus":{backgroundColor:"rgba(46, 120, 199, 0.04)",border:"1px solid rgba(46, 120, 199, 0.5)"}},outlinedSizeSmall:{padding:"0 7px"},outlinedSizeLarge:{padding:"6px 20px"},outlinedSecondary:{border:"1px solid rgba(117, 117, 117, 0.5)","&:hover":{border:"1px solid #AAAAAA",backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:focus":{border:"1px solid #AAAAAA",backgroundColor:"rgba(0, 0, 0, 0.04)"},"&.Mui-disabled":{border:"1px solid #D2D2D2"}},text:{padding:"3px 11px"},textPrimary:{color:"#2E78C7","&:hover":{backgroundColor:"rgba(46, 120, 199, 0.04)"},"&:focus":{backgroundColor:"rgba(46, 120, 199, 0.04)"}},textSizeSmall:{padding:"1px 8px"},textSizeLarge:{padding:"7px 22px"},iconSizeSmall:{"&> *:first-child":{fontSize:"1.12rem"}},endIcon:{marginLeft:"4px"},startIcon:{marginRight:"4px"}},MuiFormLabel:{root:{fontWeight:"600",letterSpacing:"0",color:"#363A3D","&.Mui-focused":{color:"#363A3D"},"&.Mui-error":{color:"#D53D5E"}}},MuiFormHelperText:{root:{"&.Mui-error":{color:"#D53D5E"}}},MuiInput:{underline:{"&:before":{borderBottomColor:"#D2D2D2"},"&:after":{transition:"none",borderBottomWidth:"1px"},"&:hover:not(.Mui-disabled):before":{borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.46)"}}},MuiInputLabel:{formControl:{position:"relative",top:"auto",left:"auto",fontSize:"0.8125rem",marginBottom:"3px",transform:"none"},outlined:{transform:"none","&.MuiInputLabel-marginDense":{transform:"none"}},filled:{transform:"none","&.MuiInputLabel-marginDense":{transform:"none"}},marginDense:{transform:"none"}},MuiInputBase:{input:{height:"1.25rem",padding:"10px 0",borderColor:"#D2D2D2"},inputMarginDense:{paddingTop:"6px",paddingBottom:"6px"}},MuiOutlinedInput:{root:{"&:hover:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(0, 0, 0, 0.46)"}},notchedOutline:{borderColor:"#D2D2D2"},input:{padding:"10px 8px"},inputMarginDense:{paddingTop:"6px",paddingBottom:"6px"},adornedStart:{paddingLeft:"8px"},adornedEnd:{paddingRight:"8px"},multiline:{padding:"10px 8px","&.MuiOutlinedInput-marginDense":{padding:"8px"}}},MuiFilledInput:{root:{borderBottomLeftRadius:"3px",borderBottomRightRadius:"3px",backgroundColor:"rgba(0, 0, 0, 0.04)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.08)"}},input:{padding:"10px 8px"},inputMarginDense:{paddingTop:"6px",paddingBottom:"6px"},adornedStart:{paddingLeft:"8px"},adornedEnd:{paddingRight:"8px"},multiline:{padding:"10px 8px","&.MuiFilledInput-marginDense":{padding:"8px"}}},MuiInputAdornment:{positionStart:{marginRight:"4px"},positionEnd:{marginLeft:"0"}},MuiMenuItem:{root:{paddingTop:"0",paddingBottom:"0",lineHeight:"2.5rem"},dense:{paddingTop:"0",paddingBottom:"0",lineHeight:"2rem"}},MuiListSubheader:{root:{lineHeight:"2.5rem",fontSize:"0.8125rem"}},MuiListItemText:{root:{paddingRight:"8px"}},MuiListItemIcon:{root:{minWidth:"2.5rem",color:"inherit"}},MuiListItemSecondaryAction:{root:{right:"0.5rem"}},MuiCheckbox:{root:{"&:hover":{backgroundColor:"transparent"}}},MuiRadio:{root:{"&:hover":{backgroundColor:"transparent"}}},MuiSwitch:{root:{padding:"7px"},thumb:{boxShadow:"0px 0px 1px -1px rgb(0 0 0 / 20%), 0px 0px 1px 0px rgb(0 0 0 / 20%), 0px 0px 3px 0px rgb(0 0 0 / 12%)"},switchBase:{"&:hover":{backgroundColor:"transparent"}},track:{borderRadius:"25px"},sizeSmall:{padding:"2px"}},MuiSlider:{thumb:{width:"12px",height:"12px","&:hover":{boxShadow:"0px 0px 0px 4px rgb(46 120 199 / 100%), 0px 0px 1px -1px rgb(0 0 0 / 20%), 0px 0px 1px 0px rgb(0 0 0 / 20%), 0px 0px 3px 0px rgb(0 0 0 / 12%)"},"&.MuiSlider-active":{boxShadow:"none"},"&.Mui-focusVisible":{boxShadow:"0px 0px 0px 4px rgb(46 120 199 / 100%), 0px 0px 1px -1px rgb(0 0 0 / 20%), 0px 0px 1px 0px rgb(0 0 0 / 20%), 0px 0px 3px 0px rgb(0 0 0 / 12%)"}},rail:{height:"4px",borderRadius:"8px"},track:{height:"4px",borderRadius:"8px"},mark:{width:"2px",height:"2px",borderRadius:"50%",marginTop:"1px"}}}};createTheme(theme);var IconButton$1=styled(IconButton$1$1)(templateObject_5$2||(templateObject_5$2=__makeTemplateObject([`
  .children {
    line-height: 1rem;
  }
  `,`
  `,`
  `,` 
  `,`  
  `,`
  `,`
  `,`
  `,`
  `,`  
  `,` 
  `,` 
  `,`  
  `,`
  `,`
  `,`
  `,`
`],[`
  .children {
    line-height: 1rem;
  }
  `,`
  `,`
  `,` 
  `,`  
  `,`
  `,`
  `,`
  `,`
  `,`  
  `,` 
  `,` 
  `,`  
  `,`
  `,`
  `,`
  `,`
`])),function(et){return et.shape==="round"&&`
    border-radius: 50%;
  `},function(et){return et.active&&`
    background: `+theme.palette.primary.background+`;
    &:hover,
      &:focus {
        background: `+theme.palette.primary.background+`;
      }
  `},function(et){return et.variant==="default"&&et.color==="info"&&`
    color: `+legacy$2.infoText+`;
    &:hover,
      &:focus {
        background: `+legacy$2.infoBackground+`;
      }
      `},function(et){return et.variant==="contained"&&css(templateObject_1$f||(templateObject_1$f=__makeTemplateObject([`
      background: `,`;
      &:hover,
      &:focus {
        background: `,`;
      }
      &.Mui-disabled {
        &:hover,
        &:focus {
          background: transparent;
        }
      }
    `],[`
      background: `,`;
      &:hover,
      &:focus {
        background: `,`;
      }
      &.Mui-disabled {
        &:hover,
        &:focus {
          background: transparent;
        }
      }
    `])),legacy$2.gray300,legacy$2.gray400)},function(et){return et.variant==="contained"&&et.color==="info"&&`
    background: `+legacy$2.info+`;
    .children {
      color: `+legacy$2.white+`;
    }
    &:hover,
      &:focus {
        background: `+legacy$2.infoDark+`;
      }
    `},function(et){return et.variant==="contained"&&et.color==="primary"&&css(templateObject_2$9||(templateObject_2$9=__makeTemplateObject([`
      background: `,`;
      &:hover,
      &:focus {
        background: `,`;
      }
      .children {
        color: `,`;
      }
    `],[`
      background: `,`;
      &:hover,
      &:focus {
        background: `,`;
      }
      .children {
        color: `,`;
      }
    `])),legacy$2.primary,legacy$2.primaryDark,legacy$2.white)},function(et){return et.active&&et.variant==="contained"&&et.color==="primary"&&`
    background:  `+legacy$2.primaryDark+`;
    `},function(et){return et.variant==="outlined"&&css(templateObject_3$6||(templateObject_3$6=__makeTemplateObject([`
      padding: 7px;
      border: `,`;
      &.Mui-disabled {
        border: 1px solid `,`;
      }
    `],[`
      padding: 7px;
      border: `,`;
      &.Mui-disabled {
        border: 1px solid `,`;
      }
    `])),theme.overrides.MuiButton.outlined.border,legacy$2.gray400)},function(et){return et.variant==="outlined"&&et.color==="primary"&&css(templateObject_4$5||(templateObject_4$5=__makeTemplateObject([`
      border: 1px solid `,`;
      &:hover,
      &:focus {
        background: `,`;
      }
    `],[`
      border: 1px solid `,`;
      &:hover,
      &:focus {
        background: `,`;
      }
    `])),legacy$2.primaryBorder,legacy$2.primaryBackground)},function(et){return et.variant==="outlined"&&et.color==="secondary"&&`
      border: `+theme.overrides.MuiButton.outlinedSecondary.border+`;
      `},function(et){return et.variant==="outlined"&&et.color==="info"&&`
    border: 1px solid `+legacy$2.infoBorder+`;
    color: `+legacy$2.infoText+`;
    &:hover,
      &:focus {
        background: `+legacy$2.infoBackground+`;
      }
      `},function(et){return et.variant==="outlined"&&et.size==="small"&&`
    padding: 2px;
    `},function(et){return et.loading&&et.color==="info"&&et.variant==="contained"&&`
    background: `+legacy$2.infoDark+`;
    .MuiCircularProgress-colorPrimary{
      color: `+legacy$2.white+`;
    }
    `},function(et){return et.loading&&et.color==="primary"&&et.variant==="contained"&&`
    background: `+legacy$2.primaryDark+`;
    .MuiCircularProgress-colorPrimary{
      color: `+legacy$2.white+`;
    }
    `},function(et){return et.active&&et.variant==="contained"&&et.color==="info"&&`
    background: `+legacy$2.infoDark+`;
    .children{
      color:`+legacy$2.white+`;
    }
    `},function(et){return et.loading&&`
      pointer-events: none;
    .children{
      visibility: hidden;
    }
      `}),templateObject_1$f,templateObject_2$9,templateObject_3$6,templateObject_4$5,templateObject_5$2,WBIconButton=Wt.forwardRef(function(et,tt){var nt=et.loading,rt=et.variant,ot=rt===void 0?"default":rt,st=et.shape,ut=st===void 0?"default":st,ct=et.name,ft=ct===void 0?"search":ct,pt=__rest(et,["loading","variant","shape","name"]);return Wt.createElement(IconButton$1,__assign({},pt,{name:ft,ref:tt,shape:ut,loading:nt,variant:ot}),nt&&Wt.createElement(WBLoading,null),Wt.createElement("span",{className:"children"},Wt.createElement(WBIcon,{name:ft,useNewIconComponent:!0})))}),ListSubheader=styled$1(ListSubheader$1$1)(templateObject_1$e||(templateObject_1$e=__makeTemplateObject([`
  background-color: `,`;
`],[`
  background-color: `,`;
`])),legacy$2.white),templateObject_1$e;Wt.forwardRef(function(et,tt){return Wt.createElement(ListSubheader,__assign({},et,{ref:tt}))});var Content$3=styled$1.div.attrs(function(et){return{"data-test":et.dataTest||"wb-menu"}})(templateObject_1$d||(templateObject_1$d=__makeTemplateObject([`
  width: `,`;
  padding: 8px 0;
  background: `,`;
  border-radius: 6px;
  box-shadow: `,`;
`],[`
  width: `,`;
  padding: 8px 0;
  background: `,`;
  border-radius: 6px;
  box-shadow: `,`;
`])),function(et){return et.width?et.width+"px":"fit-content"},function(et){var tt;return(tt=et.backgroundColor)!==null&&tt!==void 0?tt:getBGForTheme$1(et.theme.main)},legacy$2.boxShadowDropdown),Item$2=styled$1.div(templateObject_2$8||(templateObject_2$8=__makeTemplateObject([`
  color: `,`;
  padding: 8px 16px 8px 16px;
  font-size: `,`px;
  line-height: `,`px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  word-break: break-word;
  background: `,`;
`],[`
  color: `,`;
  padding: 8px 16px 8px 16px;
  font-size: `,`px;
  line-height: `,`px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  word-break: break-word;
  background: `,`;
`])),function(et){return getTextForTheme$1(et.theme.main)},function(et){var tt;return(tt=et.fontSize)!==null&&tt!==void 0?tt:14},function(et){var tt;return(tt=et.lineHeight)!==null&&tt!==void 0?tt:16},function(et){return et.hovered?getHighlightForTheme$1(et.theme.main):"none"}),ItemIcon$1=styled$1(WBIcon)(templateObject_3$5||(templateObject_3$5=__makeTemplateObject([`
  margin-left: 8px;
  font-size: 16px;
  width: 16px;
  flex-shrink: 0;
`],[`
  margin-left: 8px;
  font-size: 16px;
  width: 16px;
  flex-shrink: 0;
`]))),THEME_COLORS$1={dark:{background:legacy$2.darkerGray,highlight:legacy$2.primary,text:legacy$2.white},light:{background:legacy$2.white,highlight:legacy$2.gray100,text:legacy$2.gray800}};function getBGForTheme$1(et){return THEME_COLORS$1[et].background}function getHighlightForTheme$1(et){return THEME_COLORS$1[et].highlight}function getTextForTheme$1(et){return THEME_COLORS$1[et].text}var templateObject_1$d,templateObject_2$8,templateObject_3$5;function getOptionDisplayName$1(et){var tt;return(tt=et.name)!==null&&tt!==void 0?tt:et.value}var scrollIntoView$1=function(et,tt){var nt=i(et,tt);return nt.forEach(function(rt){var ot=rt.el,st=rt.top,ut=rt.left;ot!==document.documentElement&&(ot.scrollTop=st,ot.scrollLeft=ut)}),nt},DEFAULT_OPTION_RENDERER$2=function(et){var tt,nt=et.option,rt=et.hovered,ot=et.selected,st=et.fontSize,ut=et.lineHeight;return Wt.createElement(Item$2,{"data-test":nt["data-test"],hovered:rt,fontSize:st,lineHeight:ut},getOptionDisplayName$1(nt),Wt.createElement(ItemIcon$1,{name:(tt=nt.icon)!==null&&tt!==void 0?tt:ot&&nt.icon!==null?"check":"blank"}))},WBMenu$1=Wt.forwardRef(function(et,tt){var nt,rt=et.className,ot=et.options,st=et.optionRenderer,ut=st===void 0?DEFAULT_OPTION_RENDERER$2:st,ct=et.width,ft=et.selected,pt=et.selectedRef,ht=et.theme,mt=ht===void 0?"dark":ht,yt=et.backgroundColor,vt=et.fontSize,Tt=et.lineHeight,Et=et.highlightFirst,xt=et.onSelect,At=et.onEsc,Ct=et.dataTest,$t=Wt.useCallback(function(){return Et&&ot.length>0?lodash$2.exports.findIndex(ot,function(Ut){return!Ut.disabled}):lodash$2.exports.findIndex(ot,function(Ut){return ft===Ut.value})},[Et,ot,ft]),Ot=ot.length;ot=lodash$2.exports.uniqBy(ot,function(Ut){return Ut.value}),ot.length!==Ot&&console.warn("Passed duplicate options into WBMenu");var Rt=Wt.useState($t()),It=Rt[0],kt=Rt[1],Mt=Wt.useRef((nt=ot[It])===null||nt===void 0?void 0:nt.value),Ft=Wt.useCallback(function(Ut){var Xt;kt(Ut),Mt.current=(Xt=ot[Ut])===null||Xt===void 0?void 0:Xt.value},[ot]);Wt.useEffect(function(){var Ut;(Mt.current==null||((Ut=ot[It])===null||Ut===void 0?void 0:Ut.value)!==Mt.current)&&Ft($t())},[$t,Ft,It,ot]);var zt=Wt.useRef(null);Wt.useEffect(function(){function Ut(Xt){var Jt,gn;if(Xt.keyCode===38){Xt.preventDefault();for(var An=!1,sn=It-1;sn>=-1;sn--){var Sn=(sn%ot.length+ot.length)%ot.length;if(!ot[Sn].disabled){Ft(Sn);var In=(Jt=zt.current)===null||Jt===void 0?void 0:Jt.children[Sn];In&&scrollIntoView$1(In,{scrollMode:"if-needed",block:"start"}),An=!0;break}}!An&&zt.current!=null&&scrollIntoView$1(zt.current,{scrollMode:"if-needed",block:"start"})}if(Xt.keyCode===40){Xt.preventDefault();for(var An=!1,sn=It+1;sn<=ot.length;sn++){var Sn=(sn%ot.length+ot.length)%ot.length;if(!ot[Sn].disabled){Ft(Sn);var In=(gn=zt.current)===null||gn===void 0?void 0:gn.children[Sn];In&&scrollIntoView$1(In,{scrollMode:"if-needed",block:"end"}),An=!0;break}}!An&&zt.current!=null&&scrollIntoView$1(zt.current,{scrollMode:"if-needed",block:"end"})}Xt.keyCode===13&&!Xt.shiftKey&&(Xt.preventDefault(),ot[It]&&xt?.(ot[It].value,{option:ot[It]})),Xt.keyCode===27&&(Xt.preventDefault(),At?.())}return document.addEventListener("keydown",Ut),function(){document.removeEventListener("keydown",Ut)}},[It,At,xt,ot,Ft]);var Vt=Wt.useCallback(function(Ut){tt&&(typeof tt=="function"?tt(Ut):tt.current=Ut),zt.current=Ut},[tt]),Zt=react.exports.useMemo(function(){return{main:mt}},[mt]);return Wt.createElement(Fe,{theme:Zt},Wt.createElement(Content$3,{ref:Vt,className:rt,width:ct,backgroundColor:yt,dataTest:Ct},ot.map(function(Ut,Xt){var Jt=ft===Ut.value,gn=It===Xt;return Wt.createElement("div",{key:Ut.value,"data-test":"wb-menu-item",ref:Jt?pt:void 0,onMouseEnter:function(){Ft(Xt)},style:Ut.disabled?{pointerEvents:"none"}:void 0,onMouseDown:function(An){An.preventDefault()},onClick:function(An){var sn;An.preventDefault(),An.stopPropagation(),(sn=Ut.onSelect)===null||sn===void 0||sn.call(Ut),xt?.(Ut.value,{option:Ut})}},Ut.render?Ut.render({hovered:gn,selected:Jt}):ut({option:Ut,hovered:gn,selected:Jt,fontSize:vt,lineHeight:Tt}))})))}),Switch=styled$1(Switch$1$1)(templateObject_1$c||(templateObject_1$c=__makeTemplateObject([`
  .MuiSwitch-switchBase.Mui-checked:hover {
    background-color: transparent;
  }
  .MuiSwitch-switchBase.Mui-checked:not(.Mui-disabled) + .MuiSwitch-track {
    opacity: 1;
  }
  .MuiSwitch-colorPrimary.Mui-checked.Mui-disabled + .MuiSwitch-track {
    background-color: `,`;
  }
  .MuiSwitch-switchBase.Mui-checked {
    .MuiSwitch-thumb {
      color: `,`;
    }
  }
  .MuiSwitch-switchBase.Mui-disabled {
    .MuiSwitch-thumb {
      box-shadow: none;
      background-color: `,`;
    }
    + .MuiSwitch-track {
      background-color: `,`;
    }
    &:hover {
      cursor: not-allowed;
      pointer-events: auto;
    }
  }
`],[`
  .MuiSwitch-switchBase.Mui-checked:hover {
    background-color: transparent;
  }
  .MuiSwitch-switchBase.Mui-checked:not(.Mui-disabled) + .MuiSwitch-track {
    opacity: 1;
  }
  .MuiSwitch-colorPrimary.Mui-checked.Mui-disabled + .MuiSwitch-track {
    background-color: `,`;
  }
  .MuiSwitch-switchBase.Mui-checked {
    .MuiSwitch-thumb {
      color: `,`;
    }
  }
  .MuiSwitch-switchBase.Mui-disabled {
    .MuiSwitch-thumb {
      box-shadow: none;
      background-color: `,`;
    }
    + .MuiSwitch-track {
      background-color: `,`;
    }
    &:hover {
      cursor: not-allowed;
      pointer-events: auto;
    }
  }
`])),legacy$2.primary,legacy$2.white,legacy$2.white,legacy$2.gray800),templateObject_1$c,WBSwitch=function(et){var tt=et.color,nt=tt===void 0?"primary":tt,rt=__rest(et,["color"]);return Wt.createElement(Switch,__assign({color:nt},rt))},MenuItem$1$1=styled$1(MenuItem$2$1)(templateObject_1$b||(templateObject_1$b=__makeTemplateObject([`
  .MuiListItemIcon-root {
    .MuiIconButton-root:not(.MuiCheckbox-root) {
      transform: translateX(-0.5rem);
    }
    .MuiCheckbox-root {
      padding: 0;
    }
    .MuiIcon-root {
      transform: translateY(-0.15rem);
    }
  }
  min-height: 2.5rem;
  &.MuiMenuItem-dense {
    min-height: 2rem;
  }
  @media (min-width: 600px) {
    min-height: 2.5rem;
    &.MuiMenuItem-dense {
      min-height: 2rem;
    }
  }
  + .MuiListItemSecondaryAction-root {
    `,`
  }
  &.MuiMenuItem-dense {
    .MuiTypography-body1 {
      font-size: inherit;
    }
    + .MuiListItemSecondaryAction-root {
      `,`
    }
  }
  `,`
  `,`
  `,`
  `,`
`],[`
  .MuiListItemIcon-root {
    .MuiIconButton-root:not(.MuiCheckbox-root) {
      transform: translateX(-0.5rem);
    }
    .MuiCheckbox-root {
      padding: 0;
    }
    .MuiIcon-root {
      transform: translateY(-0.15rem);
    }
  }
  min-height: 2.5rem;
  &.MuiMenuItem-dense {
    min-height: 2rem;
  }
  @media (min-width: 600px) {
    min-height: 2.5rem;
    &.MuiMenuItem-dense {
      min-height: 2rem;
    }
  }
  + .MuiListItemSecondaryAction-root {
    `,`
  }
  &.MuiMenuItem-dense {
    .MuiTypography-body1 {
      font-size: inherit;
    }
    + .MuiListItemSecondaryAction-root {
      `,`
    }
  }
  `,`
  `,`
  `,`
  `,`
`])),function(et){return et.$endAction&&et.$endAction.type==="icon"&&`
      .MuiIcon-root{
        padding: 0.5rem;
      }
    `},function(et){return et.$endAction&&et.$endAction.type==="icon"&&`
        min-height: 2rem;
        .MuiIcon-root {
          padding: 0.25rem 0.5rem;
          display:inline-block;
        }
      `},function(et){return et.$indent&&`
    padding-left:3.5rem;
  `},function(et){return et.$endAction&&et.$endAction.type==="text"&&`
    padding-right:1rem;
    + .MuiListItemSecondaryAction-root {
      .MuiIcon-root {
        padding: 0.25rem 0.5rem;
        display:inline-block;
      }
    }
  `},function(et){return et.$endAction&&et.$endAction.type==="switch"&&`
    + .MuiListItemSecondaryAction-root {
      .MuiSwitch-root {
        margin-right:0.5rem;
      }
    }
  `},function(et){return et.secondaryText&&`
    .MuiTypography-body1 + .MuiTypography-body2{
      margin-top:-2px;
    }`}),SecondaryAction=styled$1(ListItemSecondaryAction$1)(templateObject_2$7||(templateObject_2$7=__makeTemplateObject([""],[""]))),SecondaryActionText=styled$1(Typography$1)(templateObject_3$4||(templateObject_3$4=__makeTemplateObject([`
  max-width: 10rem;
  min-width: 3rem;
`],[`
  max-width: 10rem;
  min-width: 3rem;
`]))),PrimaryTextHasSecondaryEndText=styled$1(ListItemText$1)(templateObject_4$4||(templateObject_4$4=__makeTemplateObject([""],[""]))),templateObject_1$b,templateObject_2$7,templateObject_3$4,templateObject_4$4,WBMenuItem=Wt.forwardRef(function(et,tt){var nt=et.startAction,rt=et.endAction,ot=et.children,st=et.dense,ut=st===void 0?!0:st,ct=et.secondaryText,ft=et.indent,pt=__rest(et,["startAction","endAction","children","dense","secondaryText","indent"]),ht=Wt.createElement(Typography$1,{variant:"body2",color:"textSecondary",noWrap:!0},ct);return Wt.createElement(MenuItem$1$1,__assign({dense:ut,ref:tt},pt,{$endAction:rt,$indent:ft}),nt&&Wt.createElement(ListItemIcon$1,null,nt.type==="checkbox"&&Wt.createElement(WBCheckbox,__assign({},nt.checkboxProps)),nt.type==="icon"&&Wt.createElement(WBIcon,__assign({},nt.iconProps,{useNewIconComponent:!0}))),ct&&Wt.createElement(ListItemText$1,{secondary:ht},Wt.createElement(Typography$1,{noWrap:!0},ot)),!ct&&Wt.createElement(Wt.Fragment,null,rt&&rt.type==="text"?Wt.createElement(Wt.Fragment,null,Wt.createElement(PrimaryTextHasSecondaryEndText,null,Wt.createElement(Typography$1,{noWrap:!0},ot)),Wt.createElement(SecondaryActionText,{variant:"body2",color:"textSecondary",noWrap:!0},rt.value)):Wt.createElement(ListItemText$1,null,Wt.createElement(Typography$1,{noWrap:!0},ot))),rt&&Wt.createElement(SecondaryAction,null,rt.type==="button"&&Wt.createElement(WBIconButton,__assign({},rt.buttonProps)),rt.type==="checkbox"&&Wt.createElement(WBCheckbox,__assign({},rt.checkboxProps)),rt.type==="icon"&&Wt.createElement(WBIcon,__assign({},rt.iconProps,{useNewIconComponent:!0})),rt.type==="switch"&&Wt.createElement(WBSwitch,__assign({size:"small"},rt.switchProps))))}),Menu$1=styled$1(Menu$1$1)(templateObject_1$a||(templateObject_1$a=__makeTemplateObject([`
  `,`
`],[`
  `,`
`])),function(et){return et.$dark&&`

    `+NestedMenu+` {
        opacity: .3;
    }

    .MuiMenu-paper{
        background:`+legacy$2.gray900+`;
        color:`+legacy$2.white+`;
    }

    .MuiListItem-root.Mui-selected, .MuiListItem-root.Mui-selected:hover{
        background: `+legacy$2.primaryDark+`;
    }

    .MuiListSubheader-root{
        color:`+legacy$2.gray400+`;
        background-color:`+legacy$2.gray900+`;
    }
    .MuiTypography-colorTextSecondary{
        color:`+legacy$2.gray400+`;
    }
    .MuiListItem-button:hover{
        background: `+legacy$2.primary+`;
    }

    // Divider
    .MuiDivider-root{
        background-color:`+legacy$2.hoverDark+`;
    }

    // Icon Button
    .MuiIconButton-root{
        color:`+legacy$2.white+`;
        &.Mui-disabled{
            opacity:0.5;
        }
        &:not(.MuiCheckbox-root){
            &:hover, &:focus{
                background-color:`+legacy$2.hoverDark+`;
            }
        }
        &.MuiSwitch-switchBase{
            &:hover, &:focus{
                background-color:transparent;
            }
        }
    }

    // Checkbox
    .MuiCheckbox-root{
        &.Mui-checked{
            .MuiSvgIcon-root{
                path{
                    fill:`+legacy$2.primaryLight+`;
                }
            }
        }
        .MuiSvgIcon-root{
            path{
                fill:`+legacy$2.white+`;
            }
        }
    }
    .MuiCheckbox-root.Mui-disabled{
        opacity:0.3;
    }

    // Switch
    .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track{
        background-color:`+legacy$2.primaryLight+`;
    }
    .MuiSwitch-switchBase.Mui-disabled{
        opacity:0.2;  
        + .MuiSwitch-track{
            background-color:`+legacy$2.white+`;
        }
    }
    .MuiSwitch-track{
        background-color:`+legacy$2.gray500+`;
    }
`}),NestedMenu=styled$1(Menu$1)(templateObject_2$6||(templateObject_2$6=__makeTemplateObject([""],[""]))),templateObject_1$a,templateObject_2$6,WBNestedMenuContext=Wt.createContext({dark:!1}),WBMenuNew=Wt.forwardRef(function(et,tt){var nt=et.dark,rt=__rest(et,["dark"]),ot=Wt.useContext(WBNestedMenuContext).dark,st=nt??ot,ut=Wt.useMemo(function(){return{dark:st}},[st]);return Wt.createElement(WBNestedMenuContext.Provider,{value:ut},Wt.createElement(Menu$1,__assign({},rt,{ref:tt,$dark:st})))}),MenuItem$2=styled$1(WBMenuItem)(templateObject_1$9||(templateObject_1$9=__makeTemplateObject([""],[""]))),templateObject_1$9,TRANSPARENT="rgba(0,0,0,0)",useMenuItemStyles=makeStyles(function(et){return{root:function(tt){return{backgroundColor:tt.open?et.palette.action.hover:TRANSPARENT}}}});Wt.forwardRef(function et(tt,nt){var rt=tt.parentMenuOpen,ot=tt.label,st=tt.children,ut=tt.className,ct=tt.tabIndex,ft=tt.ContainerProps,pt=ft===void 0?{}:ft,ht=__rest(tt,["parentMenuOpen","label","children","className","tabIndex","ContainerProps"]),mt=pt.ref,yt=__rest(pt,["ref"]),vt=react.exports.useRef(null);react.exports.useImperativeHandle(nt,function(){return vt.current});var Tt=react.exports.useRef(null);react.exports.useImperativeHandle(mt,function(){return Tt.current});var Et=react.exports.useRef(null),xt=react.exports.useState(!1),At=xt[0],Ct=xt[1],$t=function(Vt){Ct(!0),yt?.onMouseEnter&&yt.onMouseEnter(Vt)},Ot=function(Vt){Ct(!1),yt?.onMouseLeave&&yt.onMouseLeave(Vt)},Rt=function(){for(var Vt,Zt,Ut,Xt,Jt=(Zt=(Vt=Tt.current)===null||Vt===void 0?void 0:Vt.ownerDocument)===null||Zt===void 0?void 0:Zt.activeElement,gn=(Xt=(Ut=Et.current)===null||Ut===void 0?void 0:Ut.children)!==null&&Xt!==void 0?Xt:[],An=0,sn=Array.from(gn);An<sn.length;An++){var Sn=sn[An];if(Sn===Jt)return!0}return!1},It=function(Vt){Vt.target===Tt.current&&Ct(!0),yt?.onFocus&&yt.onFocus(Vt)},kt=function(Vt){var Zt,Ut,Xt,Jt;if(Vt.key!=="Escape"){Rt()&&Vt.stopPropagation();var gn=(Ut=(Zt=Tt.current)===null||Zt===void 0?void 0:Zt.ownerDocument)===null||Ut===void 0?void 0:Ut.activeElement;if(Vt.key==="ArrowLeft"&&Rt()&&((Xt=Tt.current)===null||Xt===void 0||Xt.focus()),Vt.key==="ArrowRight"&&Vt.target===Tt.current&&Vt.target===gn){var An=(Jt=Et.current)===null||Jt===void 0?void 0:Jt.children[0];An?.focus()}}},Mt=At&&rt,Ft=useMenuItemStyles({open:Mt}),zt;return tt.disabled||(zt=ct!==void 0?ct:-1),Wt.createElement("div",__assign({},yt,{ref:Tt,onFocus:It,tabIndex:zt,onMouseEnter:$t,onMouseLeave:Ot,onKeyDown:kt,onClick:function(){Ct(!1)}}),Wt.createElement(MenuItem$2,__assign({},ht,{className:clsx(Ft.root,ut),ref:vt,endAction:{type:"icon",iconProps:{name:"next"}}}),ot),Wt.createElement(WBMenuNew,{style:{pointerEvents:"none"},anchorEl:vt.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},open:Mt,autoFocus:!1,disableAutoFocus:!0,disableEnforceFocus:!0,onClose:function(){Ct(!1)}},Wt.createElement("div",{ref:Et,style:{pointerEvents:"auto"}},st)))});function useOnMouseDownOutside(et,tt){Wt.useEffect(function(){function nt(rt){if(rt.target instanceof Element){for(var ot=0,st=Array.isArray(et)?et:[et];ot<st.length;ot++){var ut=st[ot];if(ut&&ut.contains(rt.target))return}tt(rt)}}return document.addEventListener("mousedown",nt),function(){document.removeEventListener("mousedown",nt)}},[et,tt])}var WBPopupTrigger=function(et){var tt=Wt.useState(!1),nt=tt[0],rt=tt[1],ot=Wt.useState(null),st=ot[0],ut=ot[1],ct=Wt.useState(null),ft=ct[0],pt=ct[1],ht=Wt.useCallback(function(){return rt(!1)},[]);useOnMouseDownOutside([st,ft],ht);var mt=Wt.useCallback(function(Tt){pt(Tt)},[]),yt=Wt.useCallback(function(){rt(!1)},[]),vt=Wt.useCallback(function(Tt){ut(Tt)},[]);return Wt.createElement(Wt.Fragment,null,et.children({anchorRef:mt,open:nt,setOpen:rt}),nt&&Wt.createElement(WBAnchoredPopup$1,{ref:vt,direction:et.direction,triangleColor:et.triangleColor,anchorElement:ft,onParentScroll:et.onParentScroll},et.popupContent({close:yt})))},WBPopupMenuTrigger=function(et){return Wt.createElement(WBPopupTrigger,{direction:et.direction,triangleColor:et.menuBackgroundColor,popupContent:function(tt){var nt=tt.close;return Wt.createElement(WBMenu$1,{className:"wb-menu-trigger-content",width:et.menuWidth,options:et.options,selected:et.selected,onSelect:function(rt,ot){var st;nt(),(st=et.onSelect)===null||st===void 0||st.call(et,rt,ot)},onEsc:nt,backgroundColor:et.menuBackgroundColor,theme:et.theme})}},et.children)};styled$1(Radio$1)(templateObject_2$5||(templateObject_2$5=__makeTemplateObject([`
  &.MuiRadio-colorPrimary.Mui-checked:hover,
  &.MuiRadio-colorSecondary.Mui-checked:hover {
    background-color: transparent;
  }
  background: `,`;
  &.Mui-disabled {
    cursor: not-allowed;
    pointer-events: auto;
    svg {
      path {
        fill: `,`;
      }
    }
  }
  `,`
`],[`
  &.MuiRadio-colorPrimary.Mui-checked:hover,
  &.MuiRadio-colorSecondary.Mui-checked:hover {
    background-color: transparent;
  }
  background: `,`;
  &.Mui-disabled {
    cursor: not-allowed;
    pointer-events: auto;
    svg {
      path {
        fill: `,`;
      }
    }
  }
  `,`
`])),function(et){return et.color},legacy$2.disabled,function(et){return et.size==="small"&&Ce(templateObject_1$8||(templateObject_1$8=__makeTemplateObject([`
      .MuiSvgIcon-root {
        font-size: 1.25rem;
      }
    `],[`
      .MuiSvgIcon-root {
        font-size: 1.25rem;
      }
    `])))});var templateObject_1$8,templateObject_2$5;styled$1(Slider$1)(templateObject_1$7||(templateObject_1$7=__makeTemplateObject([""],[""])));styled$1.p(templateObject_2$4||(templateObject_2$4=__makeTemplateObject([""],[""])));var templateObject_1$7,templateObject_2$4;styled$1.div(templateObject_1$6||(templateObject_1$6=__makeTemplateObject([`
  display: flex;
  align-items: center;
`],[`
  display: flex;
  align-items: center;
`])));styled$1(Typography$1)(templateObject_3$3||(templateObject_3$3=__makeTemplateObject([`
  white-space: nowrap;
  margin-right: 16px;
  `,`
`],[`
  white-space: nowrap;
  margin-right: 16px;
  `,`
`])),function(et){return et.$hideLegend&&Ce(templateObject_2$3||(templateObject_2$3=__makeTemplateObject([`
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    `],[`
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    `])))});styled$1(OutlinedInput$1)(templateObject_4$3||(templateObject_4$3=__makeTemplateObject([`
  margin-left: 16px;
  flex: none;
  width: `,`;
  &.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-width: 1px;
  }
`],[`
  margin-left: 16px;
  flex: none;
  width: `,`;
  &.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-width: 1px;
  }
`])),function(et){return et.$minInputWidth+"px"});var templateObject_1$6,templateObject_2$3,templateObject_3$3,templateObject_4$3,BlankInput$1=styled$1.input(templateObject_1$5||(templateObject_1$5=__makeTemplateObject([`
  border: none;
  width: 100%;
  padding: 4px 6px;
  height: 28px;
  font-family: `,`;
  min-width: 0;
  &:focus {
    outline: none;
    box-shadow: 0 0 3px 2px `,`;
  }
`],[`
  border: none;
  width: 100%;
  padding: 4px 6px;
  height: 28px;
  font-family: `,`;
  min-width: 0;
  &:focus {
    outline: none;
    box-shadow: 0 0 3px 2px `,`;
  }
`])),legacy$2.fontName,legacy$2.primary),AutoCompletingInput$1=function(et){var tt=Wt.useState(),nt=tt[0],rt=tt[1],ot=Wt.useRef(null),st=Wt.useRef(0);return Wt.useEffect(function(){rt(et.value)},[et.value]),Wt.createElement(BlankInput$1,{className:et.className,ref:ot,value:nt,onKeyDown:function(ut){var ct,ft;if(st.current=ut.keyCode,ut.keyCode===13){(ct=ot.current)===null||ct===void 0||ct.blur();return}if(ut.keyCode===27){(ft=ot.current)===null||ft===void 0||ft.blur();return}},onInput:function(ut){var ct=ut.currentTarget.value,ft=null;if(ct!=null&&ct.length>0)for(var pt=0,ht=et.options;pt<ht.length;pt++){var mt=ht[pt];if(mt.toString().slice(0,ct.length).toLowerCase()===ct.toLowerCase()){ft=mt;break}}ft==null||st.current===8?rt(ct):(rt(ft),window.setTimeout(function(){var yt;ct!=null&&ft!=null&&((yt=ot.current)===null||yt===void 0||yt.setSelectionRange(ct.length,ft.toString().length))}))},onFocus:function(ut){var ct,ft;(ct=ot.current)===null||ct===void 0||ct.select(),(ft=et.onFocus)===null||ft===void 0||ft.call(et,ut)},onBlur:function(ut){var ct;st.current!==27&&nt!=null&&et.options.indexOf(nt)!==-1?et.onSelect(nt):rt(et.value),(ct=et.onBlur)===null||ct===void 0||ct.call(et,ut)}})},templateObject_1$5,CaretWrapper$1=styled$1.div(templateObject_1$4||(templateObject_1$4=__makeTemplateObject([`
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-left: 1px solid transparent;
  position: relative;
  z-index: 0;
  &:hover {
    background: #e9e9e9 !important;
  }
`],[`
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-left: 1px solid transparent;
  position: relative;
  z-index: 0;
  &:hover {
    background: #e9e9e9 !important;
  }
`])));styled$1.div(templateObject_4$2||(templateObject_4$2=__makeTemplateObject([`
  border: 1px solid transparent;
  border-radius: 2px;
  width: 140px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  .wbic-ic-next {
    color: transparent;
    transform: rotate(90deg);
  }
  `,`
  `,`
`],[`
  border: 1px solid transparent;
  border-radius: 2px;
  width: 140px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  .wbic-ic-next {
    color: transparent;
    transform: rotate(90deg);
  }
  `,`
  `,`
`])),function(et){return et.inputFocused&&Ce(templateObject_2$2||(templateObject_2$2=__makeTemplateObject([`
      .wbic-ic-next {
        color: black;
      }
    `],[`
      .wbic-ic-next {
        color: black;
      }
    `])))},function(et){return!et.inputFocused&&Ce(templateObject_3$2||(templateObject_3$2=__makeTemplateObject([`
      &:hover {
        border: 1px solid `,`;
        `,` {
          background: #f1f1f1;
          border-left: 1px solid `,`;
        }
        .wbic-ic-next {
          color: black;
        }
      }
    `],[`
      &:hover {
        border: 1px solid `,`;
        `,` {
          background: #f1f1f1;
          border-left: 1px solid `,`;
        }
        .wbic-ic-next {
          color: black;
        }
      }
    `])),legacy$2.border,CaretWrapper$1,legacy$2.border)});styled$1.div(templateObject_5$1||(templateObject_5$1=__makeTemplateObject([`
  border: 1px solid transparent;
  border-radius: 2px;
  width: calc(100% + 12px);
  max-width: 140px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  cursor: pointer;
  outline: none;
  .wbic-ic-next {
    transform: rotate(90deg);
  }
  &:hover {
    .wbic-ic-next {
      color: black;
    }
  }
`],[`
  border: 1px solid transparent;
  border-radius: 2px;
  width: calc(100% + 12px);
  max-width: 140px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  cursor: pointer;
  outline: none;
  .wbic-ic-next {
    transform: rotate(90deg);
  }
  &:hover {
    .wbic-ic-next {
      color: black;
    }
  }
`])));styled$1.span(templateObject_6$1||(templateObject_6$1=__makeTemplateObject([`
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`],[`
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`])));styled$1(AutoCompletingInput$1)(templateObject_7$1||(templateObject_7$1=__makeTemplateObject([`
  position: relative;
  z-index: 1;
`],[`
  position: relative;
  z-index: 1;
`])));styled$1.div(templateObject_8$1||(templateObject_8$1=__makeTemplateObject([`
  border-top: 0.25em solid `,`;
  border-left: 0.25em solid transparent;
  border-right: 0.25em solid transparent;
  position: relative;
  top: 0.1em;
  margin-left: 0.2em;
`],[`
  border-top: 0.25em solid `,`;
  border-left: 0.25em solid transparent;
  border-right: 0.25em solid transparent;
  position: relative;
  top: 0.1em;
  margin-left: 0.2em;
`])),legacy$2.textPrimary);var templateObject_1$4,templateObject_2$2,templateObject_3$2,templateObject_4$2,templateObject_5$1,templateObject_6$1,templateObject_7$1,templateObject_8$1;styled$1.div(templateObject_1$3||(templateObject_1$3=__makeTemplateObject([`
  display: flex;
  flex-flow: row wrap;
  gap: 4px;
  margin-top: -4px;
  margin-bottom: -4px;
  margin-left: -2px;
`],[`
  display: flex;
  flex-flow: row wrap;
  gap: 4px;
  margin-top: -4px;
  margin-bottom: -4px;
  margin-left: -2px;
`])));var templateObject_1$3;styled$1.div(templateObject_1$2||(templateObject_1$2=__makeTemplateObject([`
  display: flex;
  align-items: center;
`],[`
  display: flex;
  align-items: center;
`])));styled$1(Typography$1)(templateObject_3$1||(templateObject_3$1=__makeTemplateObject([`
  white-space: nowrap;
  margin-right: 16px;
  `,`
`],[`
  white-space: nowrap;
  margin-right: 16px;
  `,`
`])),function(et){return et.$hideLegend&&Ce(templateObject_2$1||(templateObject_2$1=__makeTemplateObject([`
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    `],[`
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    `])))});styled$1(OutlinedInput$1)(templateObject_4$1||(templateObject_4$1=__makeTemplateObject([`
  margin-left: 16px;
  flex: none;
  &.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-width: 1px;
  }
`],[`
  margin-left: 16px;
  flex: none;
  &.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-width: 1px;
  }
`])));var templateObject_1$2,templateObject_2$1,templateObject_3$1,templateObject_4$1;styled(TextField$1)(templateObject_15||(templateObject_15=__makeTemplateObject([`
  // Base
  label[data-shrink='false']
    + .MuiInputBase-formControl
    .MuiInputBase-input::-webkit-input-placeholder {
    opacity: 1 !important;
    color: `,`;
  }
  label + .MuiInput-formControl {
    margin-top: 0;
  }

  `,`

  `,`


  `,`


  `,`
  

  // input is filled or outlined and has icon button at start
  `,`

  // input is filled or outlined and has icon button at end
  `,`

  // icon button is text variant so closer spacing
  `,`

  `,`

  `,`

  `,`

  `,`
  
  `,`
    .MuiSelect-select {
    min-height: 20px;
    &.MuiInputBase-inputMarginDense {
      min-height: 12px;
    }
    &:focus {
      background-color: transparent;
      border-color: 1px solid `,`;
    }
  }
  `,`;
  `,`
`],[`
  // Base
  label[data-shrink='false']
    + .MuiInputBase-formControl
    .MuiInputBase-input::-webkit-input-placeholder {
    opacity: 1 !important;
    color: `,`;
  }
  label + .MuiInput-formControl {
    margin-top: 0;
  }

  `,`

  `,`


  `,`


  `,`
  

  // input is filled or outlined and has icon button at start
  `,`

  // input is filled or outlined and has icon button at end
  `,`

  // icon button is text variant so closer spacing
  `,`

  `,`

  `,`

  `,`

  `,`
  
  `,`
    .MuiSelect-select {
    min-height: 20px;
    &.MuiInputBase-inputMarginDense {
      min-height: 12px;
    }
    &:focus {
      background-color: transparent;
      border-color: 1px solid `,`;
    }
  }
  `,`;
  `,`
`])),function(et){return et.theme.colors.gray[500]},function(et){return et.variant==="outlined"&&css(templateObject_1$1||(templateObject_1$1=__makeTemplateObject([`
      .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
        border-width: 1px;
      }
    `],[`
      .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
        border-width: 1px;
      }
    `])))},function(et){return(et.variant==="outlined"||et.variant==="filled")&&css(templateObject_2||(templateObject_2=__makeTemplateObject([`
      .MuiFormHelperText-root {
        margin-left: 0;
      }
    `],[`
      .MuiFormHelperText-root {
        margin-left: 0;
      }
    `])))},function(et){return et.variant==="filled"&&css(templateObject_3||(templateObject_3=__makeTemplateObject([`
      .MuiInputAdornment-filled.MuiInputAdornment-positionStart:not(.MuiInputAdornment-hiddenLabel) {
        margin-top: 0;
      }
    `],[`
      .MuiInputAdornment-filled.MuiInputAdornment-positionStart:not(.MuiInputAdornment-hiddenLabel) {
        margin-top: 0;
      }
    `])))},function(et){return et.size==="small"&&css(templateObject_4||(templateObject_4=__makeTemplateObject([`
      .MuiIconButton-root {
        padding: 4px;
      }
    `],[`
      .MuiIconButton-root {
        padding: 4px;
      }
    `])))},function(et){return et.startAction&&et.variant&&css(templateObject_5||(templateObject_5=__makeTemplateObject([`
      .MuiInputAdornment-positionStart {
        margin-right: 8px;
        .MuiIconButton-root {
          margin-left: -8px;
          border-top-right-radius: 0;
          border-bottom-right-radius: 0;
        }
      }
    `],[`
      .MuiInputAdornment-positionStart {
        margin-right: 8px;
        .MuiIconButton-root {
          margin-left: -8px;
          border-top-right-radius: 0;
          border-bottom-right-radius: 0;
        }
      }
    `])))},function(et){return et.endAction&&et.variant&&css(templateObject_6||(templateObject_6=__makeTemplateObject([`
      .MuiInputAdornment-positionEnd {
        margin-left: 8px;
        .MuiIconButton-root {
          margin-right: -8px;
          border-top-left-radius: 0;
          border-bottom-left-radius: 0;
        }
      }
    `],[`
      .MuiInputAdornment-positionEnd {
        margin-left: 8px;
        .MuiIconButton-root {
          margin-right: -8px;
          border-top-left-radius: 0;
          border-bottom-left-radius: 0;
        }
      }
    `])))},function(et){return et.startAction&&et.startAction.variant!=="contained"&&css(templateObject_7||(templateObject_7=__makeTemplateObject([`
      .MuiInputAdornment-positionStart {
        margin-right: 0;
      }
    `],[`
      .MuiInputAdornment-positionStart {
        margin-right: 0;
      }
    `])))},function(et){return et.prefix&&css(templateObject_8||(templateObject_8=__makeTemplateObject([`
      .MuiInputAdornment-positionStart {
        margin-right: 0;
      }
    `],[`
      .MuiInputAdornment-positionStart {
        margin-right: 0;
      }
    `])))},function(et){return et.suffix&&css(templateObject_9||(templateObject_9=__makeTemplateObject([`
      .MuiInputAdornment-positionEnd {
        margin-left: 0;
      }
    `],[`
      .MuiInputAdornment-positionEnd {
        margin-left: 0;
      }
    `])))},function(et){return et.hideLabel&&css(templateObject_10||(templateObject_10=__makeTemplateObject([`
      label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
      }
    `],[`
      label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
      }
    `])))},function(et){var tt;return et.inlineLabel&&css(templateObject_11||(templateObject_11=__makeTemplateObject([`
      display: flex;
      align-items: center;
      flex-flow: row nowrap;
      flex: 100%;
      label {
        padding-right: 8px;
        flex: 0 0 `,`;
      }
    `],[`
      display: flex;
      align-items: center;
      flex-flow: row nowrap;
      flex: 100%;
      label {
        padding-right: 8px;
        flex: 0 0 `,`;
      }
    `])),(tt=et.inlineLabelWidth)!==null&&tt!==void 0?tt:"auto")},function(et){return et.loading&&css(templateObject_12||(templateObject_12=__makeTemplateObject([`
      .MuiInputAdornment-root {
        position: relative;
        width: 2rem;
      }
    `],[`
      .MuiInputAdornment-root {
        position: relative;
        width: 2rem;
      }
    `])))},legacy$2.primary,function(et){var tt;return((tt=et.SelectProps)===null||tt===void 0?void 0:tt.disableUnderline)&&css(templateObject_13||(templateObject_13=__makeTemplateObject([`
      .MuiSelect-select.MuiSelect-select {
        min-width: 0;
        padding-right: 20px;
      }
    `],[`
      .MuiSelect-select.MuiSelect-select {
        min-width: 0;
        padding-right: 20px;
      }
    `])))},function(et){return et.inputFontSize&&css(templateObject_14||(templateObject_14=__makeTemplateObject([`
      .MuiInput-input {
        font-size: `,`;
      }
    `],[`
      .MuiInput-input {
        font-size: `,`;
      }
    `])),et.inputFontSize)});var templateObject_1$1,templateObject_2,templateObject_3,templateObject_4,templateObject_5,templateObject_6,templateObject_7,templateObject_8,templateObject_9,templateObject_10,templateObject_11,templateObject_12,templateObject_13,templateObject_14,templateObject_15;styled$1(Tooltip$2)(templateObject_1||(templateObject_1=__makeTemplateObject([""],[""])));var templateObject_1;const IconWrapper$1=styled$1.div`
  font-size: 1.5rem;
  margin-bottom: 4px;
`,PanelError=Wt.memo(({message:et,className:tt})=>Wt.createElement("div",{className:classnames("panel-error",tt)},Wt.createElement("div",null,Wt.createElement(IconWrapper$1,null,Wt.createElement(WBIcon,{name:"info"})),Wt.createElement("div",null,et))));function ID(et=9){return Math.random().toString(36).substr(2,et)}const INPUT_SLIDER_CLASS="input__slider",SliderInput=Wt.memo(({min:et,max:tt,step:nt,value:rt,sliderInPopup:ot,className:st,debounceTime:ut,trigger:ct,hasInput:ft,minLabel:pt,maxLabel:ht,ticks:mt,disabled:yt,strideLength:vt,allowGreaterThanMax:Tt,onChange:Et})=>{const[xt,At]=Wt.useState(rt??0),Ct=Wt.useMemo(()=>ID(10),[]),$t=Wt.useCallback(_$2.debounce(Mt=>{Et(Mt)},ut||1),[Et,ut]);Wt.useLayoutEffect(()=>()=>$t.flush(),[$t]);const Ot=Wt.useCallback(Mt=>{Mt==null||!_$2.isFinite(Mt)||(Mt>tt&&!Tt&&(Mt=tt),Mt<et&&(Mt=et),mt!=null&&(Mt=getClosestTick(mt,Mt)),At(Mt),$t(Mt))},[mt,et,tt,Tt,$t]);Wt.useEffect(()=>{rt!=null&&At(rt)},[rt]);const Rt=Wt.useMemo(()=>mt&&Wt.createElement("datalist",{id:Ct},mt.map((Mt,Ft)=>Wt.createElement("option",{key:Ft,value:Mt}))),[Ct,mt]),It=()=>Wt.createElement("div",{style:{display:"flex",alignItems:"center"}},pt&&Wt.createElement("label",{className:"min"},pt),Wt.createElement("input",{type:"range",disabled:yt??!1,min:et,max:tt,step:nt,value:xt,list:Ct,onInput:Mt=>{const Ft=parseFloat(Mt.currentTarget.value);Ot(Ft)},onChange:Mt=>{}}),ht&&Wt.createElement("label",{className:"max"},"\xA0",ht),Rt),kt=()=>Wt.createElement(NumberInput,{stepper:!0,strideLength:vt,disabled:yt??!1,min:et,max:Tt?void 0:tt,value:rt,ticks:mt,onChange:Ot});return Wt.createElement("div",{className:classnames("slider-input",st)},ot?Wt.createElement(Popup$1,{inverted:!0,size:"mini",className:INPUT_SLIDER_CLASS,hoverable:!0,position:"top center",trigger:Wt.createElement("span",null,ct??kt()),content:Wt.createElement("div",{className:"slider-input"},It())}):Wt.createElement(Wt.Fragment,null,It(),ct??(ft&&kt())))});function getClosestTick(et,tt){let nt=tt,rt=Number.MAX_VALUE;for(const ot of et){const st=Math.abs(ot-tt);if(st>=rt)break;nt=ot,rt=st}return nt}function useControllableState(et,tt,nt){const[rt,ot]=Wt.useState(et);if(tt!==void 0&&nt===void 0||tt===void 0&&nt!==void 0)throw new Error(`Error: controlledValue is ${tt} but setControlledValue is ${nt}. You must pass both or neither.`);return[tt??rt,nt??ot]}const{legacy:legacy$1}=foundations,Content$2=styled$1.div.attrs(et=>({"data-test":et.dataTest||"wb-menu"}))`
  width: ${et=>et.width?et.width+"px":"fit-content"};
  padding: 8px 0;
  background: ${et=>et.backgroundColor??getBGForTheme(et.theme.main)};
  border-radius: 6px;
  box-shadow: ${legacy$1.boxShadowDropdown};
`,Item$1=styled$1.div`
  color: ${et=>getTextForTheme(et.theme.main)};
  padding: 8px 16px 8px 16px;
  font-size: ${et=>et.fontSize??14}px;
  line-height: ${et=>et.lineHeight??16}px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  word-break: break-word;
  background: ${et=>et.hovered?getHighlightForTheme(et.theme.main):"none"};
`,ItemIcon=styled$1(WBIcon)`
  margin-left: 8px;
  font-size: 16px;
  width: 16px;
  flex-shrink: 0;
`,THEME_COLORS={dark:{background:legacy$1.darkerGray,highlight:legacy$1.primary,text:legacy$1.white},light:{background:legacy$1.white,highlight:legacy$1.gray100,text:legacy$1.gray800}};function getBGForTheme(et){return THEME_COLORS[et].background}function getHighlightForTheme(et){return THEME_COLORS[et].highlight}function getTextForTheme(et){return THEME_COLORS[et].text}function getOptionDisplayName(et){return et.name??et.value}const scrollIntoView=(et,tt)=>{const nt=i(et,tt);return nt.forEach(({el:rt,top:ot,left:st})=>{rt!==document.documentElement&&(rt.scrollTop=ot,rt.scrollLeft=st)}),nt},DEFAULT_OPTION_RENDERER$1=({option:et,hovered:tt,selected:nt,fontSize:rt,lineHeight:ot})=>Wt.createElement(Item$1,{"data-test":et["data-test"],hovered:tt,fontSize:rt,lineHeight:ot},getOptionDisplayName(et),Wt.createElement(ItemIcon,{name:et.icon??(nt&&et.icon!==null?"check":"blank")})),WBMenu=Wt.forwardRef(({className:et,options:tt,optionRenderer:nt=DEFAULT_OPTION_RENDERER$1,width:rt,selected:ot,selectedRef:st,theme:ut="dark",backgroundColor:ct,fontSize:ft,lineHeight:pt,highlightFirst:ht,highlighted:mt,onChangeHighlighted:yt,onSelect:vt,onEsc:Tt,dataTest:Et},xt)=>{const At=Wt.useCallback(()=>{let Vt=-1;return ht&&tt.length>0?Vt=tt.findIndex(Zt=>!Zt.disabled):Vt=tt.findIndex(Zt=>ot===Zt.value),Vt>=0?Vt:0},[ht,tt,ot]),Ct=tt.length;tt=lodash$2.exports.uniqBy(tt,Vt=>Vt.value),tt.length!==Ct&&console.warn("Passed duplicate options into WBMenu");const[$t,Ot]=useControllableState(tt[At()]?.value||null,mt,yt),Rt=react.exports.useMemo(()=>{if($t===null)return null;const Vt=tt.findIndex(Zt=>$t===Zt.value);return Vt>=0?Vt:null},[tt,$t]),It=Wt.useRef($t),kt=Wt.useCallback(Vt=>{const Zt=$t;Ot(Vt),It.current=Zt},[$t,Ot]),Mt=Wt.useRef(null);Wt.useEffect(()=>{function Vt(Zt){if(Zt.keyCode===38){Zt.preventDefault();let Ut=!1;for(let Xt=(Rt||At())-1;Xt>=-1;Xt--){const Jt=(Xt%tt.length+tt.length)%tt.length;if(!tt[Jt].disabled){kt(tt[Jt].value);const gn=Mt.current?.children[Jt];gn&&scrollIntoView(gn,{scrollMode:"if-needed",block:"start"}),Ut=!0;break}}!Ut&&Mt.current!=null&&scrollIntoView(Mt.current,{scrollMode:"if-needed",block:"start"})}if(Zt.keyCode===40){Zt.preventDefault();let Ut=!1;for(let Xt=(Rt||At())+1;Xt<=tt.length;Xt++){const Jt=(Xt%tt.length+tt.length)%tt.length;if(!tt[Jt].disabled){kt(tt[Jt].value);const gn=Mt.current?.children[Jt];gn&&scrollIntoView(gn,{scrollMode:"if-needed",block:"end"}),Ut=!0;break}}!Ut&&Mt.current!=null&&scrollIntoView(Mt.current,{scrollMode:"if-needed",block:"end"})}Zt.keyCode===13&&!Zt.shiftKey&&(Zt.preventDefault(),Rt!=null&&vt?.(tt[Rt].value,{option:tt[Rt]})),Zt.keyCode===27&&(Zt.preventDefault(),Tt?.())}return document.addEventListener("keydown",Vt),()=>{document.removeEventListener("keydown",Vt)}},[At,Rt,Tt,vt,tt,kt]);const Ft=Wt.useCallback(Vt=>{xt&&(typeof xt=="function"?xt(Vt):xt.current=Vt),Mt.current=Vt},[xt]),zt=react.exports.useMemo(()=>({main:ut}),[ut]);return Wt.createElement(Fe,{theme:zt},Wt.createElement(Content$2,{ref:Ft,className:et,width:rt,backgroundColor:ct,dataTest:Et},tt.map((Vt,Zt)=>{const Ut=ot===Vt.value,Xt=$t===Vt.value;return Wt.createElement("div",{key:Vt.value,"data-test":"wb-menu-item",ref:Ut?st:void 0,onMouseEnter:()=>{Ot(Vt.value)},style:Vt.disabled?{pointerEvents:"none"}:void 0,onMouseDown:Jt=>{Jt.preventDefault()},onClick:Jt=>{Jt.preventDefault(),Jt.stopPropagation(),Vt.onSelect?.(),vt?.(Vt.value,{option:Vt})}},Vt.render?Vt.render({hovered:Xt,selected:Ut}):nt({option:Vt,hovered:Xt,selected:Ut,fontSize:ft,lineHeight:pt}))})))});function colorN(et,tt,nt){const rt=color(tt[et%tt.length]);return rt.alpha(nt||rt.alpha()).rgb().string()}const COLORS16=["#E87B9F","#A12864","#DA4C4C","#F0B899","#E57439","#EDB732","#A0C75C","#479A5F","#87CEBF","#229487","#5BC5DB","#5387DD","#7D54B2","#C565C7","#A46750","#A1A9AD"],ROBIN16=[11,2,7,12,0,4,8,13,5,10,9,3,6,14,1,15].map(et=>COLORS16[et]),GLOBAL_COLORS={primary:color(primary),outline:color("rgb(219, 219, 219)"),linkBlue:color(primaryText),lightGray:color("#B3B3B0"),gray:color(textSecondary),background:gray50};function colorFromString(et){return color(et).rgb().array()}function hashString(et){return et.split("").reduce((tt,nt)=>(tt=(tt<<10)-tt+nt.charCodeAt(0),tt&tt),0)}function colorFromName(et,tt){const nt=Math.abs(hashString(et));return colorN(nt,COLORS16,tt)}const BlankInput=styled$1.input`
  border: none;
  width: 100%;
  padding: 4px 6px;
  height: 28px;
  font-family: ${fontName};
  min-width: 0;
  &:focus {
    outline: none;
    box-shadow: 0 0 3px 2px ${GLOBAL_COLORS.primary.toString()};
  }
`,AutoCompletingInput=et=>{const[tt,nt]=Wt.useState(),rt=Wt.useRef(null),ot=Wt.useRef(0);return Wt.useEffect(()=>{nt(et.value)},[et.value]),Wt.createElement(BlankInput,{className:et.className,ref:rt,value:tt,onKeyDown:st=>{if(ot.current=st.keyCode,st.keyCode===13){rt.current?.blur();return}if(st.keyCode===27){rt.current?.blur();return}},onInput:st=>{const ut=st.currentTarget.value;let ct=null;if(ut!=null&&ut.length>0){for(const ft of et.options)if(ft.toString().slice(0,ut.length).toLowerCase()===ut.toLowerCase()){ct=ft;break}}ct==null||ot.current===8?nt(ut):(nt(ct),window.setTimeout(()=>{ut!=null&&ct!=null&&rt.current?.setSelectionRange(ut.length,ct.toString().length)}))},onFocus:st=>{rt.current?.select(),et.onFocus?.(st)},onBlur:st=>{ot.current!==27&&tt!=null&&et.options.indexOf(tt)!==-1?et.onSelect(tt):nt(et.value),et.onBlur?.(st)}})},{legacy}=foundations,CaretWrapper=styled$1.div`
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-left: 1px solid transparent;
  position: relative;
  z-index: 0;
  &:hover {
    background: #e9e9e9 !important;
  }
`,TypeableWrapper=styled$1.div`
  border: 1px solid transparent;
  border-radius: 2px;
  width: 140px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  .wbic-ic-next {
    color: transparent;
    transform: rotate(90deg);
  }
  ${et=>et.inputFocused&&Ce`
      .wbic-ic-next {
        color: black;
      }
    `}
  ${et=>!et.inputFocused&&Ce`
      &:hover {
        border: 1px solid ${legacy.border};
        ${CaretWrapper} {
          background: #f1f1f1;
          border-left: 1px solid ${legacy.border};
        }
        .wbic-ic-next {
          color: black;
        }
      }
    `}
`,BasicWrapper=styled$1.div`
  border: 1px solid transparent;
  border-radius: 2px;
  width: calc(100% + 12px);
  max-width: 140px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  cursor: pointer;
  outline: none;
  .wbic-ic-next {
    transform: rotate(90deg);
  }
  &:hover {
    .wbic-ic-next {
      color: black;
    }
  }
`,DisplayedValue=styled$1.span`
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`,StyledAutoCompletingInput=styled$1(AutoCompletingInput)`
  position: relative;
  z-index: 1;
`,DropdownArrow=styled$1.div`
  border-top: 0.25em solid ${legacy.textPrimary};
  border-left: 0.25em solid transparent;
  border-right: 0.25em solid transparent;
  position: relative;
  top: 0.1em;
  margin-left: 0.2em;
`,WBSelect=et=>{const[tt,nt]=Wt.useState(),[rt,ot]=Wt.useState(!1),[st,ut]=Wt.useState(!1),[ct,ft]=Wt.useState(0),[pt,ht]=Wt.useState(null),[mt,yt]=Wt.useState(null),[vt,Tt]=Wt.useState(null),Et=Wt.useCallback(()=>{ot(!1)},[]),xt=Wt.useMemo(()=>[mt,vt],[mt,vt]);useOnMouseDownOutside$1(xt,Et);let At=0,Ct=0;tt!=null&&(At=tt.left,Ct=tt.top+tt.height/2);const $t=et.options.find(Rt=>Rt.value===et.value),Ot=et.displayedValue??($t==null?et.value:getOptionDisplayName($t));return Wt.createElement(Wt.Fragment,null,et.typeable?Wt.createElement(TypeableWrapper,{"data-test":et["data-test"],ref:Rt=>{Rt&&ft(Rt.offsetWidth)},open:rt&&!et.disabled,inputFocused:st&&!et.disabled,className:et.className,onMouseDown:Rt=>{nt(Rt.currentTarget.getBoundingClientRect())}},Wt.createElement(StyledAutoCompletingInput,{options:et.options.map(Rt=>getOptionDisplayName(Rt)),value:$t?.name,disabled:et.disabled,onSelect:Rt=>{const It=et.options.find(kt=>getOptionDisplayName(kt)===Rt);It!=null&&et.onSelect(It.value,{option:It})},onFocus:()=>ut(!0),onBlur:()=>ut(!1)}),Wt.createElement(CaretWrapper,{ref:Rt=>yt(Rt),onMouseDown:()=>ot(Rt=>!Rt)},Wt.createElement(WBIcon,{name:"next"}))):Wt.createElement(BasicWrapper,{"data-test":et["data-test"],ref:Rt=>{yt(Rt),Rt&&ft(Rt.offsetWidth)},tabIndex:et.disabled?void 0:0,onKeyDown:Rt=>{(Rt.keyCode===38||Rt.keyCode===40)&&(rt||(nt(Rt.currentTarget.getBoundingClientRect()),ot(!0)))},open:rt&&!et.disabled,onMouseDown:Rt=>{nt(Rt.currentTarget.getBoundingClientRect()),ot(It=>!It)},className:et.className},Wt.createElement(DisplayedValue,null,Ot),Wt.createElement(DropdownArrow,null)),rt&&!et.disabled&&Wt.createElement(WBPopup,{style:et.popupStyle,x:At,y:Ct,direction:"center right",ref:Rt=>Tt(Rt),elementToPosition:pt},Wt.createElement(WBMenu,{theme:et.menuTheme,backgroundColor:et.menuBackgroundColor,fontSize:et.menuFontSize,lineHeight:et.menuLineHeight,width:et.autoMenuWidth?void 0:et.menuWidth??ct,selected:et.value,options:et.options,onSelect:(Rt,It)=>{ot(!1),et.onSelect(Rt,It)},onEsc:()=>{ot(!1)},selectedRef:Rt=>ht(Rt)})))},Wrapper$3=styled$1.div`
  width: 100%;
  height: 100%;
  position: relative;
  .vega-embed {
    display: block;
    canvas {
      display: block;
    }
  }
  .panel-error {
    position: absolute;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    .slow-message {
      margin-top: calc(3.625rem + 2 * 36px);
    }
  }
  .vega-bindings {
    position: absolute;
    top: 0;
    left: 0;
    background: white;
    padding: 8px 12px;
    border: 1px solid ${GLOBAL_COLORS.outline.toString()};
    width: 100%;
    .vega-bind-name {
      display: inline-block;
      width: 120px;
    }
    .vega-bind input[type='range'] {
      width: 120px;
      margin-right: 4px;
      vertical-align: middle;
    }
    .vega-bind input[type='radio'] {
      margin-right: 4px;
    }
    .vega-bind-radio label {
      margin-right: 8px;
    }
    .vega-bind select {
      max-width: 200px;
    }
  }
  ${et=>!et.showBindings&&Ce`
      .vega-bindings {
        display: none;
      }
    `}
`,ToggleBindingsButton=styled$1(WBIcon)`
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  color: #666;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  &:hover {
    color: ${GLOBAL_COLORS.linkBlue.toString()};
    background: white;
  }
`;function Rasterize(et){Transform.call(this,[],et)}Rasterize.Definition={type:"Rasterize",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"color",type:"expr",required:!0},{name:"width",type:"number"},{name:"height",type:"number"},{name:"as",type:"string"}]};var prototype=inherits(Rasterize,Transform);prototype.transform=function(et,tt){if(!tt.source.length)return tt;var nt=tt.fork(tt.NO_SOURCE),rt=et.x,ot=et.y,st=et.color,ut=et.as||"image",ct=et.width,ft=et.height;nt.rem=this.value;const pt=[];let ht=0,mt=0;tt.visit(tt.SOURCE,function(Ct){const $t=rt(Ct),Ot=ot(Ct);$t>ht&&(ht=$t),Ot>mt&&(mt=Ot),pt.push(Ct)});const yt=ct||ht+1,vt=ft||mt+1,Tt=domCanvas(yt,vt),Et=Tt.getContext("2d"),xt=Et.getImageData(0,0,yt,vt),At=xt.data;return At[0]=255,At[1]=0,At[2]=0,At[3]=255,pt.forEach(Ct=>{const $t=rgb$1(st(Ct,et)),Ot=(ot(Ct)*yt+rt(Ct))*4;At[Ot]=$t.r,At[Ot+1]=$t.g,At[Ot+2]=$t.b,At[Ot+3]=255}),Et.putImageData(xt,0,0),nt.add.push({[ut]:Tt}),this.value=nt.source=nt.add,nt.modifies(ut)};const vegaSpecPatches=[patchScaleToNull];function patchScaleToNull(et){const tt=nt=>{for(const rt of Object.keys(nt)){const ot=nt[rt];if(rt==="scale"&&lodash$2.exports.isEmpty(ot))nt[rt]=null;else{if(ot===null)return;typeof ot=="object"&&tt(ot)}}};return fn(et,tt)}function patchWBVegaSpec(et){return vegaSpecPatches.reduce((tt,nt)=>nt(tt),et)}function printPDFInNewWindow(et,tt,nt,rt){const ot=window.open(et,tt,`width=${nt},height=${rt}`);ot!=null&&(ot.document.title=tt,ot.print())}transforms.rasterize=Rasterize;const INCOMPLETE_QUERY_MESSAGE="Expression parse error: please check field settings";function specHasWandbData(et){if(Array.isArray(et.data)){for(const tt of et.data)if(tt.name.includes("wandb"))return!0}else if(typeof et.data=="object"&&et.data?.name==="wandb")return!0;return!1}const dataIsSingle=et=>Array.isArray(et),dataIsMulti=et=>!dataIsSingle(et),CustomPanelRenderer=et=>{const{spec:tt,err:nt,loading:rt,slow:ot,data:st,panelExportRef:ut,innerKey:ct,showRunSelector:ft,viewableRunOptions:pt,viewedRun:ht,showStepSelector:mt,viewedStep:yt,viewableStepOptions:vt,panelConfig:Tt,setViewedRun:Et,setUserQuery:xt,setView:At,handleTooltip:Ct,signalListeners:$t,vegaRef:Ot,onNewView:Rt}=et,It=useDeepMemo(et.userSettings),[kt,Mt]=Wt.useState(),[Ft,zt]=Wt.useState(),[Vt,Zt]=Wt.useState(),[Ut,Xt]=Wt.useState(!1),Jt=react.exports.useRef(),gn=Wt.useCallback(Bn=>{Zt(Bn)},[]),An=Wt.useCallback(Bn=>{window.VIEW=Bn,Zt(void 0),zt(Bn),At?.(Bn),Rt?.(Bn)},[At,Rt]);Wt.useEffect(()=>{Ft&&kt&&Ft.resize()},[kt,Ft]);const sn=Wt.useMemo(()=>dataIsMulti(st)?(Ft?.setState({data:st}),st):!ht||!ft||ht&&ht===VIEW_ALL_RUNS?(Ft?.setState({data:{wandb:st}}),st):(Ft?.setState({data:{wandb:[]}}),Ft?.setState({data:{wandb:st.filter(Bn=>Bn.name===ht)}}),st.filter(Bn=>Bn.name===ht)),[st,ht,ft,Ft]),Sn=Wt.useCallback(Bn=>{if(!(Tt&&vt))return;const jn=updateQueryIndex(Tt.userQuery??defaultRunSetsQuery,vt[Bn]);xt&&xt(jn)},[Tt,xt,vt]);Wt.useEffect(()=>{ht&&Et&&Et(getDefaultViewedRun(ht,pt))},[pt,ht,Et]);const In=Wt.useCallback(()=>{const Bn=Jt.current?.querySelector(".vega-bindings");return Bn!=null&&vt!=null?ReactDOM.createPortal(Wt.createElement("div",null,Wt.createElement(SliderInput,{min:0,max:vt.length-1,onChange:Sn,step:1,value:vt.findIndex(jn=>jn===yt)}),"Step: ",yt),Bn):null},[Sn,vt,yt]),_n=Wt.useCallback(()=>{const Bn=Jt.current?.querySelector(".vega-bindings");return Bn!=null&&pt!=null?ReactDOM.createPortal(Wt.createElement(WBSelect,{options:pt.map(jn=>({name:jn,value:jn})),value:ht??VIEW_ALL_RUNS,onSelect:jn=>{Et&&typeof jn=="string"&&Et(jn)}}),Bn):null},[Et,pt,ht]),En=react.exports.useMemo(()=>{const Bn=parseSpecFields(tt),jn=injectFields(tt,Bn,It),Ar=patchWBVegaSpec(jn);return fn(Ar,Er=>{Er.autosize="fit"})},[tt,It]),Ln=react.exports.useMemo(()=>dataIsSingle(sn)?specHasWandbData(En)?{wandb:sn}:void 0:sn,[En,sn]);if(nt!=null)return Wt.createElement(Wrapper$3,null,Wt.createElement(PanelError,{className:"severe",message:nt}));if(lodash$2.exports.isEmpty(tt))return Wt.createElement(Wrapper$3,null,Wt.createElement(PanelError,{className:"severe",message:"Error: Unable to parse spec"}));const wn=async Bn=>{if(Ft!=null)try{const jn=await Ft.toImageURL("svg");clickDownloadLink(jn,`${Bn}.svg`)}catch(jn){alert(`Error while downloading: ${jn}`)}},Dn=async Bn=>{if(Ft!=null)try{const jn=await Ft.toImageURL("png");clickDownloadLink(jn,`${Bn}.png`)}catch(jn){alert(`Error while downloading: ${jn}`)}},$n=async Bn=>{if(Ft!=null)try{const jn=await Ft.toImageURL("svg");printPDFInNewWindow(jn,Bn,Ft.width(),Ft.height())}catch(jn){alert(`Error while downloading: ${jn}`)}};ut&&(ut.current={onDownloadPNG:Dn,onDownloadSVG:wn,onDownloadPDF:$n});const Gn=specHasBindings(tt)||ft&&pt!=null&&ht!=null||mt&&vt!=null&&yt!=null,Jn="Expression parse error";let zn=0,Qn=0;if(kt&&(zn=kt.width,Qn=kt.height,Ft)){const Bn=Ft.padding();zn-=Bn.left+Bn.right,Qn-=Bn.top+Bn.bottom}return Wt.createElement(Measure,{bounds:!0,innerRef:Bn=>{Bn!=null&&(Jt.current=Bn)},onResize:Bn=>{kt==null?Mt(Bn.bounds):setTimeout(()=>{Jt.current!=null&&(Jt.current.closest(".dimmer")!=null||Jt.current.closest(".custom-panel-editor")!=null||document.querySelector("body.dimmed")==null)&&Mt(Bn.bounds)},100)}},({measureRef:Bn})=>Wt.createElement(Wrapper$3,{ref:Bn,showBindings:Ut},ft&&Et&&ht&&pt&&_n(),mt&&vt&&yt!=null&&xt&&In(),(zn>0||Qn>0)&&Wt.createElement(Vega,{ref:Ot,key:ct,width:zn,height:Qn,spec:En,data:Ln,actions:!1,onError:gn,onNewView:An,tooltip:Ct,logLevel:Error$1,signalListeners:$t}),rt&&(ot?Wt.createElement(PanelError,{message:Wt.createElement(Wt.Fragment,null,Wt.createElement(WandbLoader,{name:"custom-panel-renderer-slow"}),Wt.createElement("div",{className:"slow-message"},"This chart is loading very slowly. Change your query to fetch less data."))}):Wt.createElement(WandbLoader,{name:"custom-panel-renderer"})),!rt&&st.length===0&&Wt.createElement(PanelError,{message:"No data available."}),Vt&&Wt.createElement(PanelError,{message:Vt.message.match(Jn)?INCOMPLETE_QUERY_MESSAGE:Vt.name+": "+Vt.message}),Gn&&Wt.createElement(ToggleBindingsButton,{name:Ut?"close":"configuration",onClick:()=>Xt(jn=>!jn)})))};function clickDownloadLink(et,tt){const nt=document.createElement("a");nt.setAttribute("href",et),nt.setAttribute("target","_blank"),nt.setAttribute("download",tt),nt.dispatchEvent(new MouseEvent("click"))}const useColorNode=et=>{const{frame:tt}=usePanelContext();return react.exports.useMemo(()=>tt.runColors==null||isVoidNode(tt.runColors)?voidNode():opMapEach({obj:et,mapFn:constFunction({row:withNamedTag("run","run","any")},({row:nt})=>opPick({obj:tt.runColors,key:opRunId({run:opGetRunTag({obj:nt})})}))}),[tt,et])},BAR_CHART$1={$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple bar chart",data:{name:"wandb"},title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{x:{field:"${field:value}",type:"quantitative",stack:null,axis:{title:null}},y:{field:"${field:label}",type:"nominal",axis:{title:null}},opacity:{value:.6}},background:"rgba(0,0,0,0)"},BAR_CHART_COLORED={$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple bar chart",data:{name:"wandb"},title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{x:{field:"${field:value}",type:"quantitative",stack:null,axis:{title:null}},y:{field:"${field:label}",type:"nominal",axis:{title:null}},color:{type:"nominal",field:"color",scale:{range:{field:"color"}},legend:!1},opacity:{value:1}},background:"rgba(0,0,0,0)"},PanelBarChart=et=>{const tt=et.input,nt=useColorNode(tt),rt=nt.nodeType!=="void",ot=useNodeValue(nt),st=useNodeValue(tt),ut=react.exports.useMemo(()=>st.result==null?[]:_$2.isArray(st.result)?st.result.map((ct,ft)=>{const pt={key:""+ft,value:ct??0};return rt&&(pt.color=ot?.result?.[ft]??"#94aecb"),pt}):Object.entries(st.result).map(([ct,ft])=>({key:ct,value:ft})),[st,ot,rt]);return st.loading||nt.nodeType!=="void"&&ot.loading?Wt.createElement(Panel2Loader,null):ut.length===0?Wt.createElement(Wt.Fragment,null):Wt.createElement(CustomPanelRenderer,{spec:rt?BAR_CHART_COLORED:BAR_CHART$1,loading:st.loading,slow:!1,data:ut,userSettings:{fieldSettings:{label:"key",value:"value",color:"color"},stringSettings:{title:""}}})},Spec$1e={id:"barchart",displayName:"Bar Chart",Component:PanelBarChart,inputType:inputType$1c,canFullscreen:!0,defaultFixedSize:{width:200,height:9/16*200}},inputType$1b={type:"bokeh-file"},Spec$1d={id:"bokeh-file",displayName:"Bokeh",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.8131cbd1.js"),[])),inputType:inputType$1b},inputType$1a={type:"union",members:["none","boolean"]},Spec$1c={id:"boolean",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.eda0952f.js"),[])),inputType:inputType$1a},inputType$19={type:"union",members:["date",{type:"timestamp",unit:"ms"}]},Spec$1b={id:"date",Component:Wt.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>Component$1),void 0)),inputType:inputType$19},inputType$18=ALL_DIR_TYPE,Spec$1a={id:"dir",displayName:"Directory",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.1d1e6e5c.js"),[])),inputType:inputType$18},inputType$17="any",PanelExpression=et=>Wt.createElement(Wt.Fragment,null),Spec$19={id:"Expression",Component:PanelExpression,inputType:inputType$17,hidden:!0};var heap$1={exports:{}},heap={exports:{}},hasRequiredHeap$1;function requireHeap$1(){return hasRequiredHeap$1||(hasRequiredHeap$1=1,function(et,tt){(function(){var nt,rt,ot,st,ut,ct,ft,pt,ht,mt,yt,vt,Tt,Et,xt;ot=Math.floor,mt=Math.min,rt=function(At,Ct){return At<Ct?-1:At>Ct?1:0},ht=function(At,Ct,$t,Ot,Rt){var It;if($t==null&&($t=0),Rt==null&&(Rt=rt),$t<0)throw new Error("lo must be non-negative");for(Ot==null&&(Ot=At.length);$t<Ot;)It=ot(($t+Ot)/2),Rt(Ct,At[It])<0?Ot=It:$t=It+1;return[].splice.apply(At,[$t,$t-$t].concat(Ct)),Ct},ct=function(At,Ct,$t){return $t==null&&($t=rt),At.push(Ct),Et(At,0,At.length-1,$t)},ut=function(At,Ct){var $t,Ot;return Ct==null&&(Ct=rt),$t=At.pop(),At.length?(Ot=At[0],At[0]=$t,xt(At,0,Ct)):Ot=$t,Ot},pt=function(At,Ct,$t){var Ot;return $t==null&&($t=rt),Ot=At[0],At[0]=Ct,xt(At,0,$t),Ot},ft=function(At,Ct,$t){var Ot;return $t==null&&($t=rt),At.length&&$t(At[0],Ct)<0&&(Ot=[At[0],Ct],Ct=Ot[0],At[0]=Ot[1],xt(At,0,$t)),Ct},st=function(At,Ct){var $t,Ot,Rt,It,kt,Mt;for(Ct==null&&(Ct=rt),It=function(){Mt=[];for(var Ft=0,zt=ot(At.length/2);0<=zt?Ft<zt:Ft>zt;0<=zt?Ft++:Ft--)Mt.push(Ft);return Mt}.apply(this).reverse(),kt=[],Ot=0,Rt=It.length;Ot<Rt;Ot++)$t=It[Ot],kt.push(xt(At,$t,Ct));return kt},Tt=function(At,Ct,$t){var Ot;if($t==null&&($t=rt),Ot=At.indexOf(Ct),Ot!==-1)return Et(At,0,Ot,$t),xt(At,Ot,$t)},yt=function(At,Ct,$t){var Ot,Rt,It,kt,Mt;if($t==null&&($t=rt),Rt=At.slice(0,Ct),!Rt.length)return Rt;for(st(Rt,$t),Mt=At.slice(Ct),It=0,kt=Mt.length;It<kt;It++)Ot=Mt[It],ft(Rt,Ot,$t);return Rt.sort($t).reverse()},vt=function(At,Ct,$t){var Ot,Rt,It,kt,Mt,Ft,zt,Vt,Zt;if($t==null&&($t=rt),Ct*10<=At.length){if(It=At.slice(0,Ct).sort($t),!It.length)return It;for(Rt=It[It.length-1],zt=At.slice(Ct),kt=0,Ft=zt.length;kt<Ft;kt++)Ot=zt[kt],$t(Ot,Rt)<0&&(ht(It,Ot,0,null,$t),It.pop(),Rt=It[It.length-1]);return It}for(st(At,$t),Zt=[],Mt=0,Vt=mt(Ct,At.length);0<=Vt?Mt<Vt:Mt>Vt;0<=Vt?++Mt:--Mt)Zt.push(ut(At,$t));return Zt},Et=function(At,Ct,$t,Ot){var Rt,It,kt;for(Ot==null&&(Ot=rt),Rt=At[$t];$t>Ct;){if(kt=$t-1>>1,It=At[kt],Ot(Rt,It)<0){At[$t]=It,$t=kt;continue}break}return At[$t]=Rt},xt=function(At,Ct,$t){var Ot,Rt,It,kt,Mt;for($t==null&&($t=rt),Rt=At.length,Mt=Ct,It=At[Ct],Ot=2*Ct+1;Ot<Rt;)kt=Ot+1,kt<Rt&&!($t(At[Ot],At[kt])<0)&&(Ot=kt),At[Ct]=At[Ot],Ct=Ot,Ot=2*Ct+1;return At[Ct]=It,Et(At,Mt,Ct,$t)},nt=function(){At.push=ct,At.pop=ut,At.replace=pt,At.pushpop=ft,At.heapify=st,At.updateItem=Tt,At.nlargest=yt,At.nsmallest=vt;function At(Ct){this.cmp=Ct??rt,this.nodes=[]}return At.prototype.push=function(Ct){return ct(this.nodes,Ct,this.cmp)},At.prototype.pop=function(){return ut(this.nodes,this.cmp)},At.prototype.peek=function(){return this.nodes[0]},At.prototype.contains=function(Ct){return this.nodes.indexOf(Ct)!==-1},At.prototype.replace=function(Ct){return pt(this.nodes,Ct,this.cmp)},At.prototype.pushpop=function(Ct){return ft(this.nodes,Ct,this.cmp)},At.prototype.heapify=function(){return st(this.nodes,this.cmp)},At.prototype.updateItem=function(Ct){return Tt(this.nodes,Ct,this.cmp)},At.prototype.clear=function(){return this.nodes=[]},At.prototype.empty=function(){return this.nodes.length===0},At.prototype.size=function(){return this.nodes.length},At.prototype.clone=function(){var Ct;return Ct=new At,Ct.nodes=this.nodes.slice(0),Ct},At.prototype.toArray=function(){return this.nodes.slice(0)},At.prototype.insert=At.prototype.push,At.prototype.top=At.prototype.peek,At.prototype.front=At.prototype.peek,At.prototype.has=At.prototype.contains,At.prototype.copy=At.prototype.clone,At}(),function(At,Ct){return et.exports=Ct()}(this,function(){return nt})}).call(commonjsGlobal$1)}(heap)),heap.exports}var hasRequiredHeap;function requireHeap(){return hasRequiredHeap||(hasRequiredHeap=1,function(et){et.exports=requireHeap$1()}(heap$1)),heap$1.exports}var cytoscape_cjs,hasRequiredCytoscape_cjs;function requireCytoscape_cjs(){if(hasRequiredCytoscape_cjs)return cytoscape_cjs;hasRequiredCytoscape_cjs=1;var et=debounce_1,tt=requireHeap(),nt=get_1,rt=set_1,ot=toPath_1;function st(_t){return _t&&typeof _t=="object"&&"default"in _t?_t:{default:_t}}var ut=st(et),ct=st(tt),ft=st(nt),pt=st(rt),ht=st(ot);function mt(_t){return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(bt){return typeof bt}:function(bt){return bt&&typeof Symbol=="function"&&bt.constructor===Symbol&&bt!==Symbol.prototype?"symbol":typeof bt},mt(_t)}function yt(_t,bt){if(!(_t instanceof bt))throw new TypeError("Cannot call a class as a function")}function vt(_t,bt){for(var St=0;St<bt.length;St++){var wt=bt[St];wt.enumerable=wt.enumerable||!1,wt.configurable=!0,"value"in wt&&(wt.writable=!0),Object.defineProperty(_t,wt.key,wt)}}function Tt(_t,bt,St){return bt&&vt(_t.prototype,bt),St&&vt(_t,St),Object.defineProperty(_t,"prototype",{writable:!1}),_t}function Et(_t,bt,St){return bt in _t?Object.defineProperty(_t,bt,{value:St,enumerable:!0,configurable:!0,writable:!0}):_t[bt]=St,_t}function xt(_t,bt){return At(_t)||Ct(_t,bt)||$t(_t,bt)||Rt()}function At(_t){if(Array.isArray(_t))return _t}function Ct(_t,bt){var St=_t==null?null:typeof Symbol<"u"&&_t[Symbol.iterator]||_t["@@iterator"];if(St!=null){var wt=[],Nt=!0,Pt=!1,Lt,Ht;try{for(St=St.call(_t);!(Nt=(Lt=St.next()).done)&&(wt.push(Lt.value),!(bt&&wt.length===bt));Nt=!0);}catch(qt){Pt=!0,Ht=qt}finally{try{!Nt&&St.return!=null&&St.return()}finally{if(Pt)throw Ht}}return wt}}function $t(_t,bt){if(!!_t){if(typeof _t=="string")return Ot(_t,bt);var St=Object.prototype.toString.call(_t).slice(8,-1);if(St==="Object"&&_t.constructor&&(St=_t.constructor.name),St==="Map"||St==="Set")return Array.from(_t);if(St==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(St))return Ot(_t,bt)}}function Ot(_t,bt){(bt==null||bt>_t.length)&&(bt=_t.length);for(var St=0,wt=new Array(bt);St<bt;St++)wt[St]=_t[St];return wt}function Rt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var It=typeof window>"u"?null:window,kt=It?It.navigator:null;It&&It.document;var Mt=mt(""),Ft=mt({}),zt=mt(function(){}),Vt=typeof HTMLElement>"u"?"undefined":mt(HTMLElement),Zt=function(bt){return bt&&bt.instanceString&&Xt(bt.instanceString)?bt.instanceString():null},Ut=function(bt){return bt!=null&&mt(bt)==Mt},Xt=function(bt){return bt!=null&&mt(bt)===zt},Jt=function(bt){return!_n(bt)&&(Array.isArray?Array.isArray(bt):bt!=null&&bt instanceof Array)},gn=function(bt){return bt!=null&&mt(bt)===Ft&&!Jt(bt)&&bt.constructor===Object},An=function(bt){return bt!=null&&mt(bt)===Ft},sn=function(bt){return bt!=null&&mt(bt)===mt(1)&&!isNaN(bt)},Sn=function(bt){return sn(bt)&&Math.floor(bt)===bt},In=function(bt){if(Vt!=="undefined")return bt!=null&&bt instanceof HTMLElement},_n=function(bt){return En(bt)||Ln(bt)},En=function(bt){return Zt(bt)==="collection"&&bt._private.single},Ln=function(bt){return Zt(bt)==="collection"&&!bt._private.single},wn=function(bt){return Zt(bt)==="core"},Dn=function(bt){return Zt(bt)==="stylesheet"},$n=function(bt){return Zt(bt)==="event"},Gn=function(bt){return bt==null?!0:!!(bt===""||bt.match(/^\s+$/))},Jn=function(bt){return typeof HTMLElement>"u"?!1:bt instanceof HTMLElement},zn=function(bt){return gn(bt)&&sn(bt.x1)&&sn(bt.x2)&&sn(bt.y1)&&sn(bt.y2)},Qn=function(bt){return An(bt)&&Xt(bt.then)},Bn=function(){return kt&&kt.userAgent.match(/msie|trident|edge/i)},jn=function(bt,St){St||(St=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var Pt=[],Lt=0;Lt<arguments.length;Lt++)Pt.push(arguments[Lt]);return Pt.join("$")});var wt=function Nt(){var Pt=this,Lt=arguments,Ht,qt=St.apply(Pt,Lt),Gt=Nt.cache;return(Ht=Gt[qt])||(Ht=Gt[qt]=bt.apply(Pt,Lt)),Ht};return wt.cache={},wt},Ar=jn(function(_t){return _t.replace(/([A-Z])/g,function(bt){return"-"+bt.toLowerCase()})}),Er=jn(function(_t){return _t.replace(/(-\w)/g,function(bt){return bt[1].toUpperCase()})}),Pr=jn(function(_t,bt){return _t+bt[0].toUpperCase()+bt.substring(1)},function(_t,bt){return _t+"$"+bt}),Nr=function(bt){return Gn(bt)?bt:bt.charAt(0).toUpperCase()+bt.substring(1)},Ir="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",no="rgb[a]?\\(("+Ir+"[%]?)\\s*,\\s*("+Ir+"[%]?)\\s*,\\s*("+Ir+"[%]?)(?:\\s*,\\s*("+Ir+"))?\\)",ro="rgb[a]?\\((?:"+Ir+"[%]?)\\s*,\\s*(?:"+Ir+"[%]?)\\s*,\\s*(?:"+Ir+"[%]?)(?:\\s*,\\s*(?:"+Ir+"))?\\)",ao="hsl[a]?\\(("+Ir+")\\s*,\\s*("+Ir+"[%])\\s*,\\s*("+Ir+"[%])(?:\\s*,\\s*("+Ir+"))?\\)",Xr="hsl[a]?\\((?:"+Ir+")\\s*,\\s*(?:"+Ir+"[%])\\s*,\\s*(?:"+Ir+"[%])(?:\\s*,\\s*(?:"+Ir+"))?\\)",Jr="\\#[0-9a-fA-F]{3}",So="\\#[0-9a-fA-F]{6}",va=function(bt,St){return bt<St?-1:bt>St?1:0},$o=function(bt,St){return-1*va(bt,St)},Qr=Object.assign!=null?Object.assign.bind(Object):function(_t){for(var bt=arguments,St=1;St<bt.length;St++){var wt=bt[St];if(wt!=null)for(var Nt=Object.keys(wt),Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt];_t[Lt]=wt[Lt]}}return _t},jo=function(bt){if(!(!(bt.length===4||bt.length===7)||bt[0]!=="#")){var St=bt.length===4,wt,Nt,Pt,Lt=16;return St?(wt=parseInt(bt[1]+bt[1],Lt),Nt=parseInt(bt[2]+bt[2],Lt),Pt=parseInt(bt[3]+bt[3],Lt)):(wt=parseInt(bt[1]+bt[2],Lt),Nt=parseInt(bt[3]+bt[4],Lt),Pt=parseInt(bt[5]+bt[6],Lt)),[wt,Nt,Pt]}},Bo=function(bt){var St,wt,Nt,Pt,Lt,Ht,qt,Gt;function Qt(bn,Nn,Pn){return Pn<0&&(Pn+=1),Pn>1&&(Pn-=1),Pn<1/6?bn+(Nn-bn)*6*Pn:Pn<1/2?Nn:Pn<2/3?bn+(Nn-bn)*(2/3-Pn)*6:bn}var hn=new RegExp("^"+ao+"$").exec(bt);if(hn){if(wt=parseInt(hn[1]),wt<0?wt=(360- -1*wt%360)%360:wt>360&&(wt=wt%360),wt/=360,Nt=parseFloat(hn[2]),Nt<0||Nt>100||(Nt=Nt/100,Pt=parseFloat(hn[3]),Pt<0||Pt>100)||(Pt=Pt/100,Lt=hn[4],Lt!==void 0&&(Lt=parseFloat(Lt),Lt<0||Lt>1)))return;if(Nt===0)Ht=qt=Gt=Math.round(Pt*255);else{var yn=Pt<.5?Pt*(1+Nt):Pt+Nt-Pt*Nt,xn=2*Pt-yn;Ht=Math.round(255*Qt(xn,yn,wt+1/3)),qt=Math.round(255*Qt(xn,yn,wt)),Gt=Math.round(255*Qt(xn,yn,wt-1/3))}St=[Ht,qt,Gt,Lt]}return St},ss=function(bt){var St,wt=new RegExp("^"+no+"$").exec(bt);if(wt){St=[];for(var Nt=[],Pt=1;Pt<=3;Pt++){var Lt=wt[Pt];if(Lt[Lt.length-1]==="%"&&(Nt[Pt]=!0),Lt=parseFloat(Lt),Nt[Pt]&&(Lt=Lt/100*255),Lt<0||Lt>255)return;St.push(Math.floor(Lt))}var Ht=Nt[1]||Nt[2]||Nt[3],qt=Nt[1]&&Nt[2]&&Nt[3];if(Ht&&!qt)return;var Gt=wt[4];if(Gt!==void 0){if(Gt=parseFloat(Gt),Gt<0||Gt>1)return;St.push(Gt)}}return St},Us=function(bt){return Do[bt.toLowerCase()]},Eo=function(bt){return(Jt(bt)?bt:null)||Us(bt)||jo(bt)||ss(bt)||Bo(bt)},Do={transparent:[0,0,0,0],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,134,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,250,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],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],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],olive:[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,221],powderblue:[176,224,230],purple:[128,0,128],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]},bo=function(bt){for(var St=bt.map,wt=bt.keys,Nt=wt.length,Pt=0;Pt<Nt;Pt++){var Lt=wt[Pt];if(gn(Lt))throw Error("Tried to set map with object key");Pt<wt.length-1?(St[Lt]==null&&(St[Lt]={}),St=St[Lt]):St[Lt]=bt.value}},Vo=function(bt){for(var St=bt.map,wt=bt.keys,Nt=wt.length,Pt=0;Pt<Nt;Pt++){var Lt=wt[Pt];if(gn(Lt))throw Error("Tried to get map with object key");if(St=St[Lt],St==null)return St}return St},Ts=It?It.performance:null,xs=Ts&&Ts.now?function(){return Ts.now()}:function(){return Date.now()},Qo=function(){if(It){if(It.requestAnimationFrame)return function(_t){It.requestAnimationFrame(_t)};if(It.mozRequestAnimationFrame)return function(_t){It.mozRequestAnimationFrame(_t)};if(It.webkitRequestAnimationFrame)return function(_t){It.webkitRequestAnimationFrame(_t)};if(It.msRequestAnimationFrame)return function(_t){It.msRequestAnimationFrame(_t)}}return function(_t){_t&&setTimeout(function(){_t(xs())},1e3/60)}}(),Gs=function(bt){return Qo(bt)},Es=xs,Il=9261,ws=65599,vn=5381,Rn=function(bt){for(var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Il,wt=St,Nt;Nt=bt.next(),!Nt.done;)wt=wt*ws+Nt.value|0;return wt},Zr=function(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Il;return St*ws+bt|0},Wn=function(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vn;return(St<<5)+St+bt|0},Kn=function(bt,St){return bt*2097152+St},Ur=function(bt){return bt[0]*2097152+bt[1]},Kr=function(bt,St){return[Zr(bt[0],St[0]),Wn(bt[1],St[1])]},Go=function(bt,St){var wt={value:0,done:!1},Nt=0,Pt=bt.length,Lt={next:function(){return Nt<Pt?wt.value=bt[Nt++]:wt.done=!0,wt}};return Rn(Lt,St)},io=function(bt,St){var wt={value:0,done:!1},Nt=0,Pt=bt.length,Lt={next:function(){return Nt<Pt?wt.value=bt.charCodeAt(Nt++):wt.done=!0,wt}};return Rn(Lt,St)},Hr=function(){return Lo(arguments)},Lo=function(bt){for(var St,wt=0;wt<bt.length;wt++){var Nt=bt[wt];wt===0?St=io(Nt):St=io(Nt,St)}return St},Ro=!0,No=console.warn!=null,lr=console.trace!=null,Ho=Number.MAX_SAFE_INTEGER||9007199254740991,Cr=function(){return!0},Bs=function(){return!1},Dl=function(){return 0},Sl=function(){},Os=function(bt){throw new Error(bt)},dl=function(bt){if(bt!==void 0)Ro=!!bt;else return Ro},As=function(bt){!dl()||(No?console.warn(bt):(console.log(bt),lr&&console.trace()))},ol=function(bt){return Qr({},bt)},_l=function(bt){return bt==null?bt:Jt(bt)?bt.slice():gn(bt)?ol(bt):bt},Ul=function(bt){return bt.slice()},zo=function(bt,St){for(St=bt="";bt++<36;St+=bt*51&52?(bt^15?8^Math.random()*(bt^20?16:4):4).toString(16):"-");return St},Zo={},Cs=function(){return Zo},Rs=function(bt){var St=Object.keys(bt);return function(wt){for(var Nt={},Pt=0;Pt<St.length;Pt++){var Lt=St[Pt],Ht=wt?.[Lt];Nt[Lt]=Ht===void 0?bt[Lt]:Ht}return Nt}},Nl=function(bt,St,wt){for(var Nt=bt.length-1;Nt>=0&&!(bt[Nt]===St&&(bt.splice(Nt,1),wt));Nt--);},wu=function(bt){bt.splice(0,bt.length)},um=function(bt,St){for(var wt=0;wt<St.length;wt++){var Nt=St[wt];bt.push(Nt)}},yu=function(bt,St,wt){return wt&&(St=Pr(wt,St)),bt[St]},Ou=function(bt,St,wt,Nt){wt&&(St=Pr(wt,St)),bt[St]=Nt},o1=function(){function _t(){yt(this,_t),this._obj={}}return Tt(_t,[{key:"set",value:function(St,wt){return this._obj[St]=wt,this}},{key:"delete",value:function(St){return this._obj[St]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(St){return this._obj[St]!==void 0}},{key:"get",value:function(St){return this._obj[St]}}]),_t}(),Ru=typeof Map<"u"?Map:o1,Bm="undefined",m0=function(){function _t(bt){if(yt(this,_t),this._obj=Object.create(null),this.size=0,bt!=null){var St;bt.instanceString!=null&&bt.instanceString()===this.instanceString()?St=bt.toArray():St=bt;for(var wt=0;wt<St.length;wt++)this.add(St[wt])}}return Tt(_t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(St){var wt=this._obj;wt[St]!==1&&(wt[St]=1,this.size++)}},{key:"delete",value:function(St){var wt=this._obj;wt[St]===1&&(wt[St]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(St){return this._obj[St]===1}},{key:"toArray",value:function(){var St=this;return Object.keys(this._obj).filter(function(wt){return St.has(wt)})}},{key:"forEach",value:function(St,wt){return this.toArray().forEach(St,wt)}}]),_t}(),vp=(typeof Set>"u"?"undefined":mt(Set))!==Bm?Set:m0,s1=function(bt,St){var wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(bt===void 0||St===void 0||!wn(bt)){Os("An element must have a core reference and parameters set");return}var Nt=St.group;if(Nt==null&&(St.data&&St.data.source!=null&&St.data.target!=null?Nt="edges":Nt="nodes"),Nt!=="nodes"&&Nt!=="edges"){Os("An element must be of type `nodes` or `edges`; you specified `"+Nt+"`");return}this.length=1,this[0]=this;var Pt=this._private={cy:bt,single:!0,data:St.data||{},position:St.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:Nt,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!St.selected,selectable:St.selectable===void 0?!0:!!St.selectable,locked:!!St.locked,grabbed:!1,grabbable:St.grabbable===void 0?!0:!!St.grabbable,pannable:St.pannable===void 0?Nt==="edges":!!St.pannable,active:!1,classes:new vp,animation:{current:[],queue:[]},rscratch:{},scratch:St.scratch||{},edges:[],children:[],parent:St.parent&&St.parent.isNode()?St.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(Pt.position.x==null&&(Pt.position.x=0),Pt.position.y==null&&(Pt.position.y=0),St.renderedPosition){var Lt=St.renderedPosition,Ht=bt.pan(),qt=bt.zoom();Pt.position={x:(Lt.x-Ht.x)/qt,y:(Lt.y-Ht.y)/qt}}var Gt=[];Jt(St.classes)?Gt=St.classes:Ut(St.classes)&&(Gt=St.classes.split(/\s+/));for(var Qt=0,hn=Gt.length;Qt<hn;Qt++){var yn=Gt[Qt];!yn||yn===""||Pt.classes.add(yn)}this.createEmitter();var xn=St.style||St.css;xn&&(As("Setting a `style` bypass at element creation should be done only when absolutely necessary.  Try to use the stylesheet instead."),this.style(xn)),(wt===void 0||wt)&&this.restore()},Wp=function(bt){return bt={bfs:bt.bfs||!bt.dfs,dfs:bt.dfs||!bt.bfs},function(wt,Nt,Pt){var Lt;gn(wt)&&!_n(wt)&&(Lt=wt,wt=Lt.roots||Lt.root,Nt=Lt.visit,Pt=Lt.directed),Pt=arguments.length===2&&!Xt(Nt)?Nt:Pt,Nt=Xt(Nt)?Nt:function(){};for(var Ht=this._private.cy,qt=wt=Ut(wt)?this.filter(wt):wt,Gt=[],Qt=[],hn={},yn={},xn={},bn=0,Nn,Pn=this.byGroup(),Fn=Pn.nodes,Un=Pn.edges,Hn=0;Hn<qt.length;Hn++){var nr=qt[Hn],mr=nr.id();nr.isNode()&&(Gt.unshift(nr),bt.bfs&&(xn[mr]=!0,Qt.push(nr)),yn[mr]=0)}for(var gr=function(){var Sr=bt.bfs?Gt.shift():Gt.pop(),yr=Sr.id();if(bt.dfs){if(xn[yr])return"continue";xn[yr]=!0,Qt.push(Sr)}var Fr=yn[yr],_r=hn[yr],Rr=_r!=null?_r.source():null,zr=_r!=null?_r.target():null,Vr=_r==null?void 0:Sr.same(Rr)?zr[0]:Rr[0],ga=void 0;if(ga=Nt(Sr,_r,Vr,bn++,Fr),ga===!0)return Nn=Sr,"break";if(ga===!1)return"break";for(var jr=Sr.connectedEdges().filter(function(so){return(!Pt||so.source().same(Sr))&&Un.has(so)}),_i=0;_i<jr.length;_i++){var co=jr[_i],mo=co.connectedNodes().filter(function(so){return!so.same(Sr)&&Fn.has(so)}),uo=mo.id();mo.length!==0&&!xn[uo]&&(mo=mo[0],Gt.push(mo),bt.bfs&&(xn[uo]=!0,Qt.push(mo)),hn[uo]=co,yn[uo]=yn[yr]+1)}};Gt.length!==0;){var rr=gr();if(rr!=="continue"&&rr==="break")break}for(var hr=Ht.collection(),ar=0;ar<Qt.length;ar++){var vr=Qt[ar],Tr=hn[vr.id()];Tr!=null&&hr.push(Tr),hr.push(vr)}return{path:Ht.collection(hr),found:Ht.collection(Nn)}}},bp={breadthFirstSearch:Wp({bfs:!0}),depthFirstSearch:Wp({dfs:!0})};bp.bfs=bp.breadthFirstSearch,bp.dfs=bp.depthFirstSearch;var Yo=Rs({root:null,weight:function(bt){return 1},directed:!1}),ko={dijkstra:function(bt){if(!gn(bt)){var St=arguments;bt={root:St[0],weight:St[1],directed:St[2]}}var wt=Yo(bt),Nt=wt.root,Pt=wt.weight,Lt=wt.directed,Ht=this,qt=Pt,Gt=Ut(Nt)?this.filter(Nt)[0]:Nt[0],Qt={},hn={},yn={},xn=this.byGroup(),bn=xn.nodes,Nn=xn.edges;Nn.unmergeBy(function(Fr){return Fr.isLoop()});for(var Pn=function(_r){return Qt[_r.id()]},Fn=function(_r,Rr){Qt[_r.id()]=Rr,Un.updateItem(_r)},Un=new ct.default(function(Fr,_r){return Pn(Fr)-Pn(_r)}),Hn=0;Hn<bn.length;Hn++){var nr=bn[Hn];Qt[nr.id()]=nr.same(Gt)?0:1/0,Un.push(nr)}for(var mr=function(_r,Rr){for(var zr=(Lt?_r.edgesTo(Rr):_r.edgesWith(Rr)).intersect(Nn),Vr=1/0,ga,jr=0;jr<zr.length;jr++){var _i=zr[jr],co=qt(_i);(co<Vr||!ga)&&(Vr=co,ga=_i)}return{edge:ga,dist:Vr}};Un.size()>0;){var gr=Un.pop(),rr=Pn(gr),hr=gr.id();if(yn[hr]=rr,rr!==1/0)for(var ar=gr.neighborhood().intersect(bn),vr=0;vr<ar.length;vr++){var Tr=ar[vr],dr=Tr.id(),Sr=mr(gr,Tr),yr=rr+Sr.dist;yr<Pn(Tr)&&(Fn(Tr,yr),hn[dr]={node:gr,edge:Sr.edge})}}return{distanceTo:function(_r){var Rr=Ut(_r)?bn.filter(_r)[0]:_r[0];return yn[Rr.id()]},pathTo:function(_r){var Rr=Ut(_r)?bn.filter(_r)[0]:_r[0],zr=[],Vr=Rr,ga=Vr.id();if(Rr.length>0)for(zr.unshift(Rr);hn[ga];){var jr=hn[ga];zr.unshift(jr.edge),zr.unshift(jr.node),Vr=jr.node,ga=Vr.id()}return Ht.spawn(zr)}}}},po={kruskal:function(bt){bt=bt||function(Hn){return 1};for(var St=this.byGroup(),wt=St.nodes,Nt=St.edges,Pt=wt.length,Lt=new Array(Pt),Ht=wt,qt=function(nr){for(var mr=0;mr<Lt.length;mr++){var gr=Lt[mr];if(gr.has(nr))return mr}},Gt=0;Gt<Pt;Gt++)Lt[Gt]=this.spawn(wt[Gt]);for(var Qt=Nt.sort(function(Hn,nr){return bt(Hn)-bt(nr)}),hn=0;hn<Qt.length;hn++){var yn=Qt[hn],xn=yn.source()[0],bn=yn.target()[0],Nn=qt(xn),Pn=qt(bn),Fn=Lt[Nn],Un=Lt[Pn];Nn!==Pn&&(Ht.merge(yn),Fn.merge(Un),Lt.splice(Pn,1))}return Ht}},qo=Rs({root:null,goal:null,weight:function(bt){return 1},heuristic:function(bt){return 0},directed:!1}),Wl={aStar:function(bt){var St=this.cy(),wt=qo(bt),Nt=wt.root,Pt=wt.goal,Lt=wt.heuristic,Ht=wt.directed,qt=wt.weight;Nt=St.collection(Nt)[0],Pt=St.collection(Pt)[0];var Gt=Nt.id(),Qt=Pt.id(),hn={},yn={},xn={},bn=new ct.default(function(ga,jr){return yn[ga.id()]-yn[jr.id()]}),Nn=new vp,Pn={},Fn={},Un=function(jr,_i){bn.push(jr),Nn.add(_i)},Hn,nr,mr=function(){Hn=bn.pop(),nr=Hn.id(),Nn.delete(nr)},gr=function(jr){return Nn.has(jr)};Un(Nt,Gt),hn[Gt]=0,yn[Gt]=Lt(Nt);for(var rr=0;bn.size()>0;){if(mr(),rr++,nr===Qt){for(var hr=[],ar=Pt,vr=Qt,Tr=Fn[vr];hr.unshift(ar),Tr!=null&&hr.unshift(Tr),ar=Pn[vr],ar!=null;)vr=ar.id(),Tr=Fn[vr];return{found:!0,distance:hn[nr],path:this.spawn(hr),steps:rr}}xn[nr]=!0;for(var dr=Hn._private.edges,Sr=0;Sr<dr.length;Sr++){var yr=dr[Sr];if(!!this.hasElementWithId(yr.id())&&!(Ht&&yr.data("source")!==nr)){var Fr=yr.source(),_r=yr.target(),Rr=Fr.id()!==nr?Fr:_r,zr=Rr.id();if(!!this.hasElementWithId(zr)&&!xn[zr]){var Vr=hn[nr]+qt(yr);if(!gr(zr)){hn[zr]=Vr,yn[zr]=Vr+Lt(Rr),Un(Rr,zr),Pn[zr]=Hn,Fn[zr]=yr;continue}Vr<hn[zr]&&(hn[zr]=Vr,yn[zr]=Vr+Lt(Rr),Pn[zr]=Hn,Fn[zr]=yr)}}}}return{found:!1,distance:void 0,path:void 0,steps:rr}}},Vl=Rs({weight:function(bt){return 1},directed:!1}),Zs={floydWarshall:function(bt){for(var St=this.cy(),wt=Vl(bt),Nt=wt.weight,Pt=wt.directed,Lt=Nt,Ht=this.byGroup(),qt=Ht.nodes,Gt=Ht.edges,Qt=qt.length,hn=Qt*Qt,yn=function(co){return qt.indexOf(co)},xn=function(co){return qt[co]},bn=new Array(hn),Nn=0;Nn<hn;Nn++){var Pn=Nn%Qt,Fn=(Nn-Pn)/Qt;Fn===Pn?bn[Nn]=0:bn[Nn]=1/0}for(var Un=new Array(hn),Hn=new Array(hn),nr=0;nr<Gt.length;nr++){var mr=Gt[nr],gr=mr.source()[0],rr=mr.target()[0];if(gr!==rr){var hr=yn(gr),ar=yn(rr),vr=hr*Qt+ar,Tr=Lt(mr);if(bn[vr]>Tr&&(bn[vr]=Tr,Un[vr]=ar,Hn[vr]=mr),!Pt){var dr=ar*Qt+hr;!Pt&&bn[dr]>Tr&&(bn[dr]=Tr,Un[dr]=hr,Hn[dr]=mr)}}}for(var Sr=0;Sr<Qt;Sr++)for(var yr=0;yr<Qt;yr++)for(var Fr=yr*Qt+Sr,_r=0;_r<Qt;_r++){var Rr=yr*Qt+_r,zr=Sr*Qt+_r;bn[Fr]+bn[zr]<bn[Rr]&&(bn[Rr]=bn[Fr]+bn[zr],Un[Rr]=Un[Fr])}var Vr=function(co){return(Ut(co)?St.filter(co):co)[0]},ga=function(co){return yn(Vr(co))},jr={distance:function(co,mo){var uo=ga(co),so=ga(mo);return bn[uo*Qt+so]},path:function(co,mo){var uo=ga(co),so=ga(mo),Br=xn(uo);if(uo===so)return Br.collection();if(Un[uo*Qt+so]==null)return St.collection();var fo=St.collection(),vo=uo,Io;for(fo.merge(Br);uo!==so;)vo=uo,uo=Un[uo*Qt+so],Io=Hn[vo*Qt+uo],fo.merge(Io),fo.merge(xn(uo));return fo}};return jr}},_d=Rs({weight:function(bt){return 1},directed:!1,root:null}),vu={bellmanFord:function(bt){var St=this,wt=_d(bt),Nt=wt.weight,Pt=wt.directed,Lt=wt.root,Ht=Nt,qt=this,Gt=this.cy(),Qt=this.byGroup(),hn=Qt.edges,yn=Qt.nodes,xn=yn.length,bn=new Ru,Nn=!1,Pn=[];Lt=Gt.collection(Lt)[0],hn.unmergeBy(function(Ao){return Ao.isLoop()});for(var Fn=hn.length,Un=function(Uo){var Ko=bn.get(Uo.id());return Ko||(Ko={},bn.set(Uo.id(),Ko)),Ko},Hn=function(Uo){return(Ut(Uo)?Gt.$(Uo):Uo)[0]},nr=function(Uo){return Un(Hn(Uo)).dist},mr=function(Uo){for(var Ko=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Lt,gs=Hn(Uo),zs=[],ys=gs;;){if(ys==null)return St.spawn();var Oo=Un(ys),ur=Oo.edge,Gr=Oo.pred;if(zs.unshift(ys[0]),ys.same(Ko)&&zs.length>0)break;ur!=null&&zs.unshift(ur),ys=Gr}return qt.spawn(zs)},gr=0;gr<xn;gr++){var rr=yn[gr],hr=Un(rr);rr.same(Lt)?hr.dist=0:hr.dist=1/0,hr.pred=null,hr.edge=null}for(var ar=!1,vr=function(Uo,Ko,gs,zs,ys,Oo){var ur=zs.dist+Oo;ur<ys.dist&&!gs.same(zs.edge)&&(ys.dist=ur,ys.pred=Uo,ys.edge=gs,ar=!0)},Tr=1;Tr<xn;Tr++){ar=!1;for(var dr=0;dr<Fn;dr++){var Sr=hn[dr],yr=Sr.source(),Fr=Sr.target(),_r=Ht(Sr),Rr=Un(yr),zr=Un(Fr);vr(yr,Fr,Sr,Rr,zr,_r),Pt||vr(Fr,yr,Sr,zr,Rr,_r)}if(!ar)break}if(ar)for(var Vr=[],ga=0;ga<Fn;ga++){var jr=hn[ga],_i=jr.source(),co=jr.target(),mo=Ht(jr),uo=Un(_i).dist,so=Un(co).dist;if(uo+mo<so||!Pt&&so+mo<uo)if(Nn||(As("Graph contains a negative weight cycle for Bellman-Ford"),Nn=!0),bt.findNegativeWeightCycles!==!1){var Br=[];uo+mo<so&&Br.push(_i),!Pt&&so+mo<uo&&Br.push(co);for(var fo=Br.length,vo=0;vo<fo;vo++){var Io=Br[vo],Fo=[Io];Fo.push(Un(Io).edge);for(var Is=Un(Io).pred;Fo.indexOf(Is)===-1;)Fo.push(Is),Fo.push(Un(Is).edge),Is=Un(Is).pred;Fo=Fo.slice(Fo.indexOf(Is));for(var Ss=Fo[0].id(),Wo=0,Po=2;Po<Fo.length;Po+=2)Fo[Po].id()<Ss&&(Ss=Fo[Po].id(),Wo=Po);Fo=Fo.slice(Wo).concat(Fo.slice(0,Wo)),Fo.push(Fo[0]);var ps=Fo.map(function(Ao){return Ao.id()}).join(",");Vr.indexOf(ps)===-1&&(Pn.push(qt.spawn(Fo)),Vr.push(ps))}}else break}return{distanceTo:nr,pathTo:mr,hasNegativeWeightCycle:Nn,negativeWeightCycles:Pn}}},Tp=Math.sqrt(2),P1=function(bt,St,wt){wt.length===0&&Os("Karger-Stein must be run on a connected (sub)graph");for(var Nt=wt[bt],Pt=Nt[1],Lt=Nt[2],Ht=St[Pt],qt=St[Lt],Gt=wt,Qt=Gt.length-1;Qt>=0;Qt--){var hn=Gt[Qt],yn=hn[1],xn=hn[2];(St[yn]===Ht&&St[xn]===qt||St[yn]===qt&&St[xn]===Ht)&&Gt.splice(Qt,1)}for(var bn=0;bn<Gt.length;bn++){var Nn=Gt[bn];Nn[1]===qt?(Gt[bn]=Nn.slice(),Gt[bn][1]=Ht):Nn[2]===qt&&(Gt[bn]=Nn.slice(),Gt[bn][2]=Ht)}for(var Pn=0;Pn<St.length;Pn++)St[Pn]===qt&&(St[Pn]=Ht);return Gt},cm=function(bt,St,wt,Nt){for(;wt>Nt;){var Pt=Math.floor(Math.random()*St.length);St=P1(Pt,bt,St),wt--}return St},Ep={kargerStein:function(){var bt=this,St=this.byGroup(),wt=St.nodes,Nt=St.edges;Nt.unmergeBy(function(zr){return zr.isLoop()});var Pt=wt.length,Lt=Nt.length,Ht=Math.ceil(Math.pow(Math.log(Pt)/Math.LN2,2)),qt=Math.floor(Pt/Tp);if(Pt<2){Os("At least 2 nodes are required for Karger-Stein algorithm");return}for(var Gt=[],Qt=0;Qt<Lt;Qt++){var hn=Nt[Qt];Gt.push([Qt,wt.indexOf(hn.source()),wt.indexOf(hn.target())])}for(var yn=1/0,xn=[],bn=new Array(Pt),Nn=new Array(Pt),Pn=new Array(Pt),Fn=function(Vr,ga){for(var jr=0;jr<Pt;jr++)ga[jr]=Vr[jr]},Un=0;Un<=Ht;Un++){for(var Hn=0;Hn<Pt;Hn++)Nn[Hn]=Hn;var nr=cm(Nn,Gt.slice(),Pt,qt),mr=nr.slice();Fn(Nn,Pn);var gr=cm(Nn,nr,qt,2),rr=cm(Pn,mr,qt,2);gr.length<=rr.length&&gr.length<yn?(yn=gr.length,xn=gr,Fn(Nn,bn)):rr.length<=gr.length&&rr.length<yn&&(yn=rr.length,xn=rr,Fn(Pn,bn))}for(var hr=this.spawn(xn.map(function(zr){return Nt[zr[0]]})),ar=this.spawn(),vr=this.spawn(),Tr=bn[0],dr=0;dr<bn.length;dr++){var Sr=bn[dr],yr=wt[dr];Sr===Tr?ar.merge(yr):vr.merge(yr)}var Fr=function(Vr){var ga=bt.spawn();return Vr.forEach(function(jr){ga.merge(jr),jr.connectedEdges().forEach(function(_i){bt.contains(_i)&&!hr.contains(_i)&&ga.merge(_i)})}),ga},_r=[Fr(ar),Fr(vr)],Rr={cut:hr,components:_r,partition1:ar,partition2:vr};return Rr}},Ap=function(bt){return{x:bt.x,y:bt.y}},_f=function(bt,St,wt){return{x:bt.x*St+wt.x,y:bt.y*St+wt.y}},uu=function(bt,St,wt){return{x:(bt.x-wt.x)/St,y:(bt.y-wt.y)/St}},Hp=function(bt){return{x:bt[0],y:bt[1]}},$v=function(bt){for(var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bt.length,Nt=1/0,Pt=St;Pt<wt;Pt++){var Lt=bt[Pt];isFinite(Lt)&&(Nt=Math.min(Lt,Nt))}return Nt},by=function(bt){for(var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bt.length,Nt=-1/0,Pt=St;Pt<wt;Pt++){var Lt=bt[Pt];isFinite(Lt)&&(Nt=Math.max(Lt,Nt))}return Nt},g0=function(bt){for(var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bt.length,Nt=0,Pt=0,Lt=St;Lt<wt;Lt++){var Ht=bt[Lt];isFinite(Ht)&&(Nt+=Ht,Pt++)}return Nt/Pt},Ty=function(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bt.length,Nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,Pt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,Lt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;Nt?bt=bt.slice(St,wt):(wt<bt.length&&bt.splice(wt,bt.length-wt),St>0&&bt.splice(0,St));for(var Ht=0,qt=bt.length-1;qt>=0;qt--){var Gt=bt[qt];Lt?isFinite(Gt)||(bt[qt]=-1/0,Ht++):bt.splice(qt,1)}Pt&&bt.sort(function(yn,xn){return yn-xn});var Qt=bt.length,hn=Math.floor(Qt/2);return Qt%2!==0?bt[hn+1+Ht]:(bt[hn-1+Ht]+bt[hn+Ht])/2},Ey=function(bt){return Math.PI*bt/180},zm=function(bt,St){return Math.atan2(St,bt)-Math.PI/2},v0=Math.log2||function(_t){return Math.log(_t)/Math.log(2)},dm=function(bt){return bt>0?1:bt<0?-1:0},xp=function(bt,St){return Math.sqrt(Up(bt,St))},Up=function(bt,St){var wt=St.x-bt.x,Nt=St.y-bt.y;return wt*wt+Nt*Nt},wv=function(bt){for(var St=bt.length,wt=0,Nt=0;Nt<St;Nt++)wt+=bt[Nt];for(var Pt=0;Pt<St;Pt++)bt[Pt]=bt[Pt]/wt;return bt},Wr=function(bt,St,wt,Nt){return(1-Nt)*(1-Nt)*bt+2*(1-Nt)*Nt*St+Nt*Nt*wt},ks=function(bt,St,wt,Nt){return{x:Wr(bt.x,St.x,wt.x,Nt),y:Wr(bt.y,St.y,wt.y,Nt)}},Jl=function(bt,St,wt,Nt){var Pt={x:St.x-bt.x,y:St.y-bt.y},Lt=xp(bt,St),Ht={x:Pt.x/Lt,y:Pt.y/Lt};return wt=wt??0,Nt=Nt??wt*Lt,{x:bt.x+Ht.x*Nt,y:bt.y+Ht.y*Nt}},M1=function(bt,St,wt){return Math.max(bt,Math.min(wt,St))},Iu=function(bt){if(bt==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(bt.x1!=null&&bt.y1!=null){if(bt.x2!=null&&bt.y2!=null&&bt.x2>=bt.x1&&bt.y2>=bt.y1)return{x1:bt.x1,y1:bt.y1,x2:bt.x2,y2:bt.y2,w:bt.x2-bt.x1,h:bt.y2-bt.y1};if(bt.w!=null&&bt.h!=null&&bt.w>=0&&bt.h>=0)return{x1:bt.x1,y1:bt.y1,x2:bt.x1+bt.w,y2:bt.y1+bt.h,w:bt.w,h:bt.h}}},Ay=function(bt){return{x1:bt.x1,x2:bt.x2,w:bt.w,y1:bt.y1,y2:bt.y2,h:bt.h}},Wm=function(bt){bt.x1=1/0,bt.y1=1/0,bt.x2=-1/0,bt.y2=-1/0,bt.w=0,bt.h=0},Bl=function(bt,St){bt.x1=Math.min(bt.x1,St.x1),bt.x2=Math.max(bt.x2,St.x2),bt.w=bt.x2-bt.x1,bt.y1=Math.min(bt.y1,St.y1),bt.y2=Math.max(bt.y2,St.y2),bt.h=bt.y2-bt.y1},gl=function(bt,St,wt){bt.x1=Math.min(bt.x1,St),bt.x2=Math.max(bt.x2,St),bt.w=bt.x2-bt.x1,bt.y1=Math.min(bt.y1,wt),bt.y2=Math.max(bt.y2,wt),bt.h=bt.y2-bt.y1},Qs=function(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return bt.x1-=St,bt.x2+=St,bt.y1-=St,bt.y2+=St,bt.w=bt.x2-bt.x1,bt.h=bt.y2-bt.y1,bt},b0=function(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],wt,Nt,Pt,Lt;if(St.length===1)wt=Nt=Pt=Lt=St[0];else if(St.length===2)wt=Pt=St[0],Lt=Nt=St[1];else if(St.length===4){var Ht=xt(St,4);wt=Ht[0],Nt=Ht[1],Pt=Ht[2],Lt=Ht[3]}return bt.x1-=Lt,bt.x2+=Nt,bt.y1-=wt,bt.y2+=Pt,bt.w=bt.x2-bt.x1,bt.h=bt.y2-bt.y1,bt},xy=function(bt,St){bt.x1=St.x1,bt.y1=St.y1,bt.x2=St.x2,bt.y2=St.y2,bt.w=bt.x2-bt.x1,bt.h=bt.y2-bt.y1},jm=function(bt,St){return!(bt.x1>St.x2||St.x1>bt.x2||bt.x2<St.x1||St.x2<bt.x1||bt.y2<St.y1||St.y2<bt.y1||bt.y1>St.y2||St.y1>bt.y2)},Cp=function(bt,St,wt){return bt.x1<=St&&St<=bt.x2&&bt.y1<=wt&&wt<=bt.y2},Hm=function(bt,St){return Cp(bt,St.x,St.y)},ds=function(bt,St){return Cp(bt,St.x1,St.y1)&&Cp(bt,St.x2,St.y2)},Sp=function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=Du(Pt,Lt),Gt=Pt/2,Qt=Lt/2,hn;{var yn=wt-Gt+qt-Ht,xn=Nt-Qt-Ht,bn=wt+Gt-qt+Ht,Nn=xn;if(hn=ql(bt,St,wt,Nt,yn,xn,bn,Nn,!1),hn.length>0)return hn}{var Pn=wt+Gt+Ht,Fn=Nt-Qt+qt-Ht,Un=Pn,Hn=Nt+Qt-qt+Ht;if(hn=ql(bt,St,wt,Nt,Pn,Fn,Un,Hn,!1),hn.length>0)return hn}{var nr=wt-Gt+qt-Ht,mr=Nt+Qt+Ht,gr=wt+Gt-qt+Ht,rr=mr;if(hn=ql(bt,St,wt,Nt,nr,mr,gr,rr,!1),hn.length>0)return hn}{var hr=wt-Gt-Ht,ar=Nt-Qt+qt-Ht,vr=hr,Tr=Nt+Qt-qt+Ht;if(hn=ql(bt,St,wt,Nt,hr,ar,vr,Tr,!1),hn.length>0)return hn}var dr;{var Sr=wt-Gt+qt,yr=Nt-Qt+qt;if(dr=Gl(bt,St,wt,Nt,Sr,yr,qt+Ht),dr.length>0&&dr[0]<=Sr&&dr[1]<=yr)return[dr[0],dr[1]]}{var Fr=wt+Gt-qt,_r=Nt-Qt+qt;if(dr=Gl(bt,St,wt,Nt,Fr,_r,qt+Ht),dr.length>0&&dr[0]>=Fr&&dr[1]<=_r)return[dr[0],dr[1]]}{var Rr=wt+Gt-qt,zr=Nt+Qt-qt;if(dr=Gl(bt,St,wt,Nt,Rr,zr,qt+Ht),dr.length>0&&dr[0]>=Rr&&dr[1]>=zr)return[dr[0],dr[1]]}{var Vr=wt-Gt+qt,ga=Nt+Qt-qt;if(dr=Gl(bt,St,wt,Nt,Vr,ga,qt+Ht),dr.length>0&&dr[0]<=Vr&&dr[1]>=ga)return[dr[0],dr[1]]}return[]},iu=function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=Ht,Gt=Math.min(wt,Pt),Qt=Math.max(wt,Pt),hn=Math.min(Nt,Lt),yn=Math.max(Nt,Lt);return Gt-qt<=bt&&bt<=Qt+qt&&hn-qt<=St&&St<=yn+qt},Pl=function(bt,St,wt,Nt,Pt,Lt,Ht,qt,Gt){var Qt={x1:Math.min(wt,Ht,Pt)-Gt,x2:Math.max(wt,Ht,Pt)+Gt,y1:Math.min(Nt,qt,Lt)-Gt,y2:Math.max(Nt,qt,Lt)+Gt};return!(bt<Qt.x1||bt>Qt.x2||St<Qt.y1||St>Qt.y2)},T0=function(bt,St,wt,Nt){wt-=Nt;var Pt=St*St-4*bt*wt;if(Pt<0)return[];var Lt=Math.sqrt(Pt),Ht=2*bt,qt=(-St+Lt)/Ht,Gt=(-St-Lt)/Ht;return[qt,Gt]},l1=function(bt,St,wt,Nt,Pt){var Lt=1e-5;bt===0&&(bt=Lt),St/=bt,wt/=bt,Nt/=bt;var Ht,qt,Gt,Qt,hn,yn,xn,bn;if(qt=(3*wt-St*St)/9,Gt=-(27*Nt)+St*(9*wt-2*(St*St)),Gt/=54,Ht=qt*qt*qt+Gt*Gt,Pt[1]=0,xn=St/3,Ht>0){hn=Gt+Math.sqrt(Ht),hn=hn<0?-Math.pow(-hn,1/3):Math.pow(hn,1/3),yn=Gt-Math.sqrt(Ht),yn=yn<0?-Math.pow(-yn,1/3):Math.pow(yn,1/3),Pt[0]=-xn+hn+yn,xn+=(hn+yn)/2,Pt[4]=Pt[2]=-xn,xn=Math.sqrt(3)*(-yn+hn)/2,Pt[3]=xn,Pt[5]=-xn;return}if(Pt[5]=Pt[3]=0,Ht===0){bn=Gt<0?-Math.pow(-Gt,1/3):Math.pow(Gt,1/3),Pt[0]=-xn+2*bn,Pt[4]=Pt[2]=-(bn+xn);return}qt=-qt,Qt=qt*qt*qt,Qt=Math.acos(Gt/Math.sqrt(Qt)),bn=2*Math.sqrt(qt),Pt[0]=-xn+bn*Math.cos(Qt/3),Pt[2]=-xn+bn*Math.cos((Qt+2*Math.PI)/3),Pt[4]=-xn+bn*Math.cos((Qt+4*Math.PI)/3)},Cy=function(bt,St,wt,Nt,Pt,Lt,Ht,qt){var Gt=1*wt*wt-4*wt*Pt+2*wt*Ht+4*Pt*Pt-4*Pt*Ht+Ht*Ht+Nt*Nt-4*Nt*Lt+2*Nt*qt+4*Lt*Lt-4*Lt*qt+qt*qt,Qt=1*9*wt*Pt-3*wt*wt-3*wt*Ht-6*Pt*Pt+3*Pt*Ht+9*Nt*Lt-3*Nt*Nt-3*Nt*qt-6*Lt*Lt+3*Lt*qt,hn=1*3*wt*wt-6*wt*Pt+wt*Ht-wt*bt+2*Pt*Pt+2*Pt*bt-Ht*bt+3*Nt*Nt-6*Nt*Lt+Nt*qt-Nt*St+2*Lt*Lt+2*Lt*St-qt*St,yn=1*wt*Pt-wt*wt+wt*bt-Pt*bt+Nt*Lt-Nt*Nt+Nt*St-Lt*St,xn=[];l1(Gt,Qt,hn,yn,xn);for(var bn=1e-7,Nn=[],Pn=0;Pn<6;Pn+=2)Math.abs(xn[Pn+1])<bn&&xn[Pn]>=0&&xn[Pn]<=1&&Nn.push(xn[Pn]);Nn.push(1),Nn.push(0);for(var Fn=-1,Un,Hn,nr,mr=0;mr<Nn.length;mr++)Un=Math.pow(1-Nn[mr],2)*wt+2*(1-Nn[mr])*Nn[mr]*Pt+Nn[mr]*Nn[mr]*Ht,Hn=Math.pow(1-Nn[mr],2)*Nt+2*(1-Nn[mr])*Nn[mr]*Lt+Nn[mr]*Nn[mr]*qt,nr=Math.pow(Un-bt,2)+Math.pow(Hn-St,2),Fn>=0?nr<Fn&&(Fn=nr):Fn=nr;return Fn},E0=function(bt,St,wt,Nt,Pt,Lt){var Ht=[bt-wt,St-Nt],qt=[Pt-wt,Lt-Nt],Gt=qt[0]*qt[0]+qt[1]*qt[1],Qt=Ht[0]*Ht[0]+Ht[1]*Ht[1],hn=Ht[0]*qt[0]+Ht[1]*qt[1],yn=hn*hn/Gt;return hn<0?Qt:yn>Gt?(bt-Pt)*(bt-Pt)+(St-Lt)*(St-Lt):Qt-yn},qs=function(bt,St,wt){for(var Nt,Pt,Lt,Ht,qt,Gt=0,Qt=0;Qt<wt.length/2;Qt++)if(Nt=wt[Qt*2],Pt=wt[Qt*2+1],Qt+1<wt.length/2?(Lt=wt[(Qt+1)*2],Ht=wt[(Qt+1)*2+1]):(Lt=wt[(Qt+1-wt.length/2)*2],Ht=wt[(Qt+1-wt.length/2)*2+1]),!(Nt==bt&&Lt==bt))if(Nt>=bt&&bt>=Lt||Nt<=bt&&bt<=Lt)qt=(bt-Nt)/(Lt-Nt)*(Ht-Pt)+Pt,qt>St&&Gt++;else continue;return Gt%2!==0},ep=function(bt,St,wt,Nt,Pt,Lt,Ht,qt,Gt){var Qt=new Array(wt.length),hn;qt[0]!=null?(hn=Math.atan(qt[1]/qt[0]),qt[0]<0?hn=hn+Math.PI/2:hn=-hn-Math.PI/2):hn=qt;for(var yn=Math.cos(-hn),xn=Math.sin(-hn),bn=0;bn<Qt.length/2;bn++)Qt[bn*2]=Lt/2*(wt[bn*2]*yn-wt[bn*2+1]*xn),Qt[bn*2+1]=Ht/2*(wt[bn*2+1]*yn+wt[bn*2]*xn),Qt[bn*2]+=Nt,Qt[bn*2+1]+=Pt;var Nn;if(Gt>0){var Pn=fm(Qt,-Gt);Nn=C0(Pn)}else Nn=Qt;return qs(bt,St,Nn)},A0=function(bt,St,wt,Nt,Pt,Lt,Ht){for(var qt=new Array(wt.length),Gt=Lt/2,Qt=Ht/2,hn=du(Lt,Ht),yn=hn*hn,xn=0;xn<wt.length/4;xn++){var bn=void 0,Nn=void 0;xn===0?bn=wt.length-2:bn=xn*4-2,Nn=xn*4+2;var Pn=Nt+Gt*wt[xn*4],Fn=Pt+Qt*wt[xn*4+1],Un=-wt[bn]*wt[Nn]-wt[bn+1]*wt[Nn+1],Hn=hn/Math.tan(Math.acos(Un)/2),nr=Pn-Hn*wt[bn],mr=Fn-Hn*wt[bn+1],gr=Pn+Hn*wt[Nn],rr=Fn+Hn*wt[Nn+1];qt[xn*4]=nr,qt[xn*4+1]=mr,qt[xn*4+2]=gr,qt[xn*4+3]=rr;var hr=wt[bn+1],ar=-wt[bn],vr=hr*wt[Nn]+ar*wt[Nn+1];vr<0&&(hr*=-1,ar*=-1);var Tr=nr+hr*hn,dr=mr+ar*hn,Sr=Math.pow(Tr-bt,2)+Math.pow(dr-St,2);if(Sr<=yn)return!0}return qs(bt,St,qt)},C0=function(bt){for(var St=new Array(bt.length/2),wt,Nt,Pt,Lt,Ht,qt,Gt,Qt,hn=0;hn<bt.length/4;hn++){wt=bt[hn*4],Nt=bt[hn*4+1],Pt=bt[hn*4+2],Lt=bt[hn*4+3],hn<bt.length/4-1?(Ht=bt[(hn+1)*4],qt=bt[(hn+1)*4+1],Gt=bt[(hn+1)*4+2],Qt=bt[(hn+1)*4+3]):(Ht=bt[0],qt=bt[1],Gt=bt[2],Qt=bt[3]);var yn=ql(wt,Nt,Pt,Lt,Ht,qt,Gt,Qt,!0);St[hn*2]=yn[0],St[hn*2+1]=yn[1]}return St},fm=function(bt,St){for(var wt=new Array(bt.length*2),Nt,Pt,Lt,Ht,qt=0;qt<bt.length/2;qt++){Nt=bt[qt*2],Pt=bt[qt*2+1],qt<bt.length/2-1?(Lt=bt[(qt+1)*2],Ht=bt[(qt+1)*2+1]):(Lt=bt[0],Ht=bt[1]);var Gt=Ht-Pt,Qt=-(Lt-Nt),hn=Math.sqrt(Gt*Gt+Qt*Qt),yn=Gt/hn,xn=Qt/hn;wt[qt*4]=Nt+yn*St,wt[qt*4+1]=Pt+xn*St,wt[qt*4+2]=Lt+yn*St,wt[qt*4+3]=Ht+xn*St}return wt},F1=function(bt,St,wt,Nt,Pt,Lt){var Ht=wt-bt,qt=Nt-St;Ht/=Pt,qt/=Lt;var Gt=Math.sqrt(Ht*Ht+qt*qt),Qt=Gt-1;if(Qt<0)return[];var hn=Qt/Gt;return[(wt-bt)*hn+bt,(Nt-St)*hn+St]},Js=function(bt,St,wt,Nt,Pt,Lt,Ht){return bt-=Pt,St-=Lt,bt/=wt/2+Ht,St/=Nt/2+Ht,bt*bt+St*St<=1},Gl=function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=[wt-bt,Nt-St],Gt=[bt-Pt,St-Lt],Qt=qt[0]*qt[0]+qt[1]*qt[1],hn=2*(Gt[0]*qt[0]+Gt[1]*qt[1]),yn=Gt[0]*Gt[0]+Gt[1]*Gt[1]-Ht*Ht,xn=hn*hn-4*Qt*yn;if(xn<0)return[];var bn=(-hn+Math.sqrt(xn))/(2*Qt),Nn=(-hn-Math.sqrt(xn))/(2*Qt),Pn=Math.min(bn,Nn),Fn=Math.max(bn,Nn),Un=[];if(Pn>=0&&Pn<=1&&Un.push(Pn),Fn>=0&&Fn<=1&&Un.push(Fn),Un.length===0)return[];var Hn=Un[0]*qt[0]+bt,nr=Un[0]*qt[1]+St;if(Un.length>1){if(Un[0]==Un[1])return[Hn,nr];var mr=Un[1]*qt[0]+bt,gr=Un[1]*qt[1]+St;return[Hn,nr,mr,gr]}else return[Hn,nr]},pm=function(bt,St,wt){return St<=bt&&bt<=wt||wt<=bt&&bt<=St?bt:bt<=St&&St<=wt||wt<=St&&St<=bt?St:wt},ql=function(bt,St,wt,Nt,Pt,Lt,Ht,qt,Gt){var Qt=bt-Pt,hn=wt-bt,yn=Ht-Pt,xn=St-Lt,bn=Nt-St,Nn=qt-Lt,Pn=yn*xn-Nn*Qt,Fn=hn*xn-bn*Qt,Un=Nn*hn-yn*bn;if(Un!==0){var Hn=Pn/Un,nr=Fn/Un,mr=.001,gr=0-mr,rr=1+mr;return gr<=Hn&&Hn<=rr&&gr<=nr&&nr<=rr?[bt+Hn*hn,St+Hn*bn]:Gt?[bt+Hn*hn,St+Hn*bn]:[]}else return Pn===0||Fn===0?pm(bt,wt,Ht)===Ht?[Ht,qt]:pm(bt,wt,Pt)===Pt?[Pt,Lt]:pm(Pt,Ht,wt)===wt?[wt,Nt]:[]:[]},cu=function(bt,St,wt,Nt,Pt,Lt,Ht,qt){var Gt=[],Qt,hn=new Array(wt.length),yn=!0;Lt==null&&(yn=!1);var xn;if(yn){for(var bn=0;bn<hn.length/2;bn++)hn[bn*2]=wt[bn*2]*Lt+Nt,hn[bn*2+1]=wt[bn*2+1]*Ht+Pt;if(qt>0){var Nn=fm(hn,-qt);xn=C0(Nn)}else xn=hn}else xn=wt;for(var Pn,Fn,Un,Hn,nr=0;nr<xn.length/2;nr++)Pn=xn[nr*2],Fn=xn[nr*2+1],nr<xn.length/2-1?(Un=xn[(nr+1)*2],Hn=xn[(nr+1)*2+1]):(Un=xn[0],Hn=xn[1]),Qt=ql(bt,St,Nt,Pt,Pn,Fn,Un,Hn),Qt.length!==0&&Gt.push(Qt[0],Qt[1]);return Gt},L1=function(bt,St,wt,Nt,Pt,Lt,Ht,qt){for(var Gt=[],Qt,hn=new Array(wt.length),yn=Lt/2,xn=Ht/2,bn=du(Lt,Ht),Nn=0;Nn<wt.length/4;Nn++){var Pn=void 0,Fn=void 0;Nn===0?Pn=wt.length-2:Pn=Nn*4-2,Fn=Nn*4+2;var Un=Nt+yn*wt[Nn*4],Hn=Pt+xn*wt[Nn*4+1],nr=-wt[Pn]*wt[Fn]-wt[Pn+1]*wt[Fn+1],mr=bn/Math.tan(Math.acos(nr)/2),gr=Un-mr*wt[Pn],rr=Hn-mr*wt[Pn+1],hr=Un+mr*wt[Fn],ar=Hn+mr*wt[Fn+1];Nn===0?(hn[wt.length-2]=gr,hn[wt.length-1]=rr):(hn[Nn*4-2]=gr,hn[Nn*4-1]=rr),hn[Nn*4]=hr,hn[Nn*4+1]=ar;var vr=wt[Pn+1],Tr=-wt[Pn],dr=vr*wt[Fn]+Tr*wt[Fn+1];dr<0&&(vr*=-1,Tr*=-1);var Sr=gr+vr*bn,yr=rr+Tr*bn;Qt=Gl(bt,St,Nt,Pt,Sr,yr,bn),Qt.length!==0&&Gt.push(Qt[0],Qt[1])}for(var Fr=0;Fr<hn.length/4;Fr++)Qt=ql(bt,St,Nt,Pt,hn[Fr*4],hn[Fr*4+1],hn[Fr*4+2],hn[Fr*4+3],!1),Qt.length!==0&&Gt.push(Qt[0],Qt[1]);if(Gt.length>2){for(var _r=[Gt[0],Gt[1]],Rr=Math.pow(_r[0]-bt,2)+Math.pow(_r[1]-St,2),zr=1;zr<Gt.length/2;zr++){var Vr=Math.pow(Gt[zr*2]-bt,2)+Math.pow(Gt[zr*2+1]-St,2);Vr<=Rr&&(_r[0]=Gt[zr*2],_r[1]=Gt[zr*2+1],Rr=Vr)}return _r}return Gt},tp=function(bt,St,wt){var Nt=[bt[0]-St[0],bt[1]-St[1]],Pt=Math.sqrt(Nt[0]*Nt[0]+Nt[1]*Nt[1]),Lt=(Pt-wt)/Pt;return Lt<0&&(Lt=1e-5),[St[0]+Lt*Nt[0],St[1]+Lt*Nt[1]]},xo=function(bt,St){var wt=$l(bt,St);return wt=bu(wt),wt},bu=function(bt){for(var St,wt,Nt=bt.length/2,Pt=1/0,Lt=1/0,Ht=-1/0,qt=-1/0,Gt=0;Gt<Nt;Gt++)St=bt[2*Gt],wt=bt[2*Gt+1],Pt=Math.min(Pt,St),Ht=Math.max(Ht,St),Lt=Math.min(Lt,wt),qt=Math.max(qt,wt);for(var Qt=2/(Ht-Pt),hn=2/(qt-Lt),yn=0;yn<Nt;yn++)St=bt[2*yn]=bt[2*yn]*Qt,wt=bt[2*yn+1]=bt[2*yn+1]*hn,Pt=Math.min(Pt,St),Ht=Math.max(Ht,St),Lt=Math.min(Lt,wt),qt=Math.max(qt,wt);if(Lt<-1)for(var xn=0;xn<Nt;xn++)wt=bt[2*xn+1]=bt[2*xn+1]+(-1-Lt);return bt},$l=function(bt,St){var wt=1/bt*2*Math.PI,Nt=bt%2===0?Math.PI/2+wt/2:Math.PI/2;Nt+=St;for(var Pt=new Array(bt*2),Lt,Ht=0;Ht<bt;Ht++)Lt=Ht*wt+Nt,Pt[2*Ht]=Math.cos(Lt),Pt[2*Ht+1]=Math.sin(-Lt);return Pt},Du=function(bt,St){return Math.min(bt/4,St/4,8)},du=function(bt,St){return Math.min(bt/10,St/10,8)},Vp=function(){return 8},Ol=function(bt,St,wt){return[bt-2*St+wt,2*(St-bt),bt]},Um=function(bt,St){return{heightOffset:Math.min(15,.05*St),widthOffset:Math.min(100,.25*bt),ctrlPtOffsetPct:.05}},Sy=Rs({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(bt){return 1}}),_y={pageRank:function(bt){for(var St=Sy(bt),wt=St.dampingFactor,Nt=St.precision,Pt=St.iterations,Lt=St.weight,Ht=this._private.cy,qt=this.byGroup(),Gt=qt.nodes,Qt=qt.edges,hn=Gt.length,yn=hn*hn,xn=Qt.length,bn=new Array(yn),Nn=new Array(hn),Pn=(1-wt)/hn,Fn=0;Fn<hn;Fn++){for(var Un=0;Un<hn;Un++){var Hn=Fn*hn+Un;bn[Hn]=0}Nn[Fn]=0}for(var nr=0;nr<xn;nr++){var mr=Qt[nr],gr=mr.data("source"),rr=mr.data("target");if(gr!==rr){var hr=Gt.indexOfId(gr),ar=Gt.indexOfId(rr),vr=Lt(mr),Tr=ar*hn+hr;bn[Tr]+=vr,Nn[hr]+=vr}}for(var dr=1/hn+Pn,Sr=0;Sr<hn;Sr++)if(Nn[Sr]===0)for(var yr=0;yr<hn;yr++){var Fr=yr*hn+Sr;bn[Fr]=dr}else for(var _r=0;_r<hn;_r++){var Rr=_r*hn+Sr;bn[Rr]=bn[Rr]/Nn[Sr]+Pn}for(var zr=new Array(hn),Vr=new Array(hn),ga,jr=0;jr<hn;jr++)zr[jr]=1;for(var _i=0;_i<Pt;_i++){for(var co=0;co<hn;co++)Vr[co]=0;for(var mo=0;mo<hn;mo++)for(var uo=0;uo<hn;uo++){var so=mo*hn+uo;Vr[mo]+=bn[so]*zr[uo]}wv(Vr),ga=zr,zr=Vr,Vr=ga;for(var Br=0,fo=0;fo<hn;fo++){var vo=ga[fo]-zr[fo];Br+=vo*vo}if(Br<Nt)break}var Io={rank:function(Is){return Is=Ht.collection(Is)[0],zr[Gt.indexOf(Is)]}};return Io}},S0=Rs({root:null,weight:function(bt){return 1},directed:!1,alpha:0}),_p={degreeCentralityNormalized:function(bt){bt=S0(bt);var St=this.cy(),wt=this.nodes(),Nt=wt.length;if(bt.directed){for(var Qt={},hn={},yn=0,xn=0,bn=0;bn<Nt;bn++){var Nn=wt[bn],Pn=Nn.id();bt.root=Nn;var Fn=this.degreeCentrality(bt);yn<Fn.indegree&&(yn=Fn.indegree),xn<Fn.outdegree&&(xn=Fn.outdegree),Qt[Pn]=Fn.indegree,hn[Pn]=Fn.outdegree}return{indegree:function(Hn){return yn==0?0:(Ut(Hn)&&(Hn=St.filter(Hn)),Qt[Hn.id()]/yn)},outdegree:function(Hn){return xn===0?0:(Ut(Hn)&&(Hn=St.filter(Hn)),hn[Hn.id()]/xn)}}}else{for(var Pt={},Lt=0,Ht=0;Ht<Nt;Ht++){var qt=wt[Ht];bt.root=qt;var Gt=this.degreeCentrality(bt);Lt<Gt.degree&&(Lt=Gt.degree),Pt[qt.id()]=Gt.degree}return{degree:function(Hn){return Lt===0?0:(Ut(Hn)&&(Hn=St.filter(Hn)),Pt[Hn.id()]/Lt)}}}},degreeCentrality:function(bt){bt=S0(bt);var St=this.cy(),wt=this,Nt=bt,Pt=Nt.root,Lt=Nt.weight,Ht=Nt.directed,qt=Nt.alpha;if(Pt=St.collection(Pt)[0],Ht){for(var xn=Pt.connectedEdges(),bn=xn.filter(function(gr){return gr.target().same(Pt)&&wt.has(gr)}),Nn=xn.filter(function(gr){return gr.source().same(Pt)&&wt.has(gr)}),Pn=bn.length,Fn=Nn.length,Un=0,Hn=0,nr=0;nr<bn.length;nr++)Un+=Lt(bn[nr]);for(var mr=0;mr<Nn.length;mr++)Hn+=Lt(Nn[mr]);return{indegree:Math.pow(Pn,1-qt)*Math.pow(Un,qt),outdegree:Math.pow(Fn,1-qt)*Math.pow(Hn,qt)}}else{for(var Gt=Pt.connectedEdges().intersection(wt),Qt=Gt.length,hn=0,yn=0;yn<Gt.length;yn++)hn+=Lt(Gt[yn]);return{degree:Math.pow(Qt,1-qt)*Math.pow(hn,qt)}}}};_p.dc=_p.degreeCentrality,_p.dcn=_p.degreeCentralityNormalised=_p.degreeCentralityNormalized;var u1=Rs({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),B1={closenessCentralityNormalized:function(bt){for(var St=u1(bt),wt=St.harmonic,Nt=St.weight,Pt=St.directed,Lt=this.cy(),Ht={},qt=0,Gt=this.nodes(),Qt=this.floydWarshall({weight:Nt,directed:Pt}),hn=0;hn<Gt.length;hn++){for(var yn=0,xn=Gt[hn],bn=0;bn<Gt.length;bn++)if(hn!==bn){var Nn=Qt.distance(xn,Gt[bn]);wt?yn+=1/Nn:yn+=Nn}wt||(yn=1/yn),qt<yn&&(qt=yn),Ht[xn.id()]=yn}return{closeness:function(Fn){return qt==0?0:(Ut(Fn)?Fn=Lt.filter(Fn)[0].id():Fn=Fn.id(),Ht[Fn]/qt)}}},closenessCentrality:function(bt){var St=u1(bt),wt=St.root,Nt=St.weight,Pt=St.directed,Lt=St.harmonic;wt=this.filter(wt)[0];for(var Ht=this.dijkstra({root:wt,weight:Nt,directed:Pt}),qt=0,Gt=this.nodes(),Qt=0;Qt<Gt.length;Qt++){var hn=Gt[Qt];if(!hn.same(wt)){var yn=Ht.distanceTo(hn);Lt?qt+=1/yn:qt+=yn}}return Lt?qt:1/qt}};B1.cc=B1.closenessCentrality,B1.ccn=B1.closenessCentralityNormalised=B1.closenessCentralityNormalized;var $y=Rs({weight:null,directed:!1}),Vm={betweennessCentrality:function(bt){for(var St=$y(bt),wt=St.directed,Nt=St.weight,Pt=Nt!=null,Lt=this.cy(),Ht=this.nodes(),qt={},Gt={},Qt=0,hn={set:function(Hn,nr){Gt[Hn]=nr,nr>Qt&&(Qt=nr)},get:function(Hn){return Gt[Hn]}},yn=0;yn<Ht.length;yn++){var xn=Ht[yn],bn=xn.id();wt?qt[bn]=xn.outgoers().nodes():qt[bn]=xn.openNeighborhood().nodes(),hn.set(bn,0)}for(var Nn=function(Hn){for(var nr=Ht[Hn].id(),mr=[],gr={},rr={},hr={},ar=new ct.default(function(uo,so){return hr[uo]-hr[so]}),vr=0;vr<Ht.length;vr++){var Tr=Ht[vr].id();gr[Tr]=[],rr[Tr]=0,hr[Tr]=1/0}for(rr[nr]=1,hr[nr]=0,ar.push(nr);!ar.empty();){var dr=ar.pop();if(mr.push(dr),Pt)for(var Sr=0;Sr<qt[dr].length;Sr++){var yr=qt[dr][Sr],Fr=Lt.getElementById(dr),_r=void 0;Fr.edgesTo(yr).length>0?_r=Fr.edgesTo(yr)[0]:_r=yr.edgesTo(Fr)[0];var Rr=Nt(_r);yr=yr.id(),hr[yr]>hr[dr]+Rr&&(hr[yr]=hr[dr]+Rr,ar.nodes.indexOf(yr)<0?ar.push(yr):ar.updateItem(yr),rr[yr]=0,gr[yr]=[]),hr[yr]==hr[dr]+Rr&&(rr[yr]=rr[yr]+rr[dr],gr[yr].push(dr))}else for(var zr=0;zr<qt[dr].length;zr++){var Vr=qt[dr][zr].id();hr[Vr]==1/0&&(ar.push(Vr),hr[Vr]=hr[dr]+1),hr[Vr]==hr[dr]+1&&(rr[Vr]=rr[Vr]+rr[dr],gr[Vr].push(dr))}}for(var ga={},jr=0;jr<Ht.length;jr++)ga[Ht[jr].id()]=0;for(;mr.length>0;){for(var _i=mr.pop(),co=0;co<gr[_i].length;co++){var mo=gr[_i][co];ga[mo]=ga[mo]+rr[mo]/rr[_i]*(1+ga[_i])}_i!=Ht[Hn].id()&&hn.set(_i,hn.get(_i)+ga[_i])}},Pn=0;Pn<Ht.length;Pn++)Nn(Pn);var Fn={betweenness:function(Hn){var nr=Lt.collection(Hn).id();return hn.get(nr)},betweennessNormalized:function(Hn){if(Qt==0)return 0;var nr=Lt.collection(Hn).id();return hn.get(nr)/Qt}};return Fn.betweennessNormalised=Fn.betweennessNormalized,Fn}};Vm.bc=Vm.betweennessCentrality;var _0=Rs({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(_t){return 1}]}),$0=function(bt){return _0(bt)},sp=function(bt,St){for(var wt=0,Nt=0;Nt<St.length;Nt++)wt+=St[Nt](bt);return wt},w0=function(bt,St,wt){for(var Nt=0;Nt<St;Nt++)bt[Nt*St+Nt]=wt},hm=function(bt,St){for(var wt,Nt=0;Nt<St;Nt++){wt=0;for(var Pt=0;Pt<St;Pt++)wt+=bt[Pt*St+Nt];for(var Lt=0;Lt<St;Lt++)bt[Lt*St+Nt]=bt[Lt*St+Nt]/wt}},O0=function(bt,St,wt){for(var Nt=new Array(wt*wt),Pt=0;Pt<wt;Pt++){for(var Lt=0;Lt<wt;Lt++)Nt[Pt*wt+Lt]=0;for(var Ht=0;Ht<wt;Ht++)for(var qt=0;qt<wt;qt++)Nt[Pt*wt+qt]+=bt[Pt*wt+Ht]*St[Ht*wt+qt]}return Nt},Gm=function(bt,St,wt){for(var Nt=bt.slice(0),Pt=1;Pt<wt;Pt++)bt=O0(bt,Nt,St);return bt},R0=function(bt,St,wt){for(var Nt=new Array(St*St),Pt=0;Pt<St*St;Pt++)Nt[Pt]=Math.pow(bt[Pt],wt);return hm(Nt,St),Nt},Nu=function(bt,St,wt,Nt){for(var Pt=0;Pt<wt;Pt++){var Lt=Math.round(bt[Pt]*Math.pow(10,Nt))/Math.pow(10,Nt),Ht=Math.round(St[Pt]*Math.pow(10,Nt))/Math.pow(10,Nt);if(Lt!==Ht)return!1}return!0},c1=function(bt,St,wt,Nt){for(var Pt=[],Lt=0;Lt<St;Lt++){for(var Ht=[],qt=0;qt<St;qt++)Math.round(bt[Lt*St+qt]*1e3)/1e3>0&&Ht.push(wt[qt]);Ht.length!==0&&Pt.push(Nt.collection(Ht))}return Pt},d1=function(bt,St){for(var wt=0;wt<bt.length;wt++)if(!St[wt]||bt[wt].id()!==St[wt].id())return!1;return!0},I0=function(bt){for(var St=0;St<bt.length;St++)for(var wt=0;wt<bt.length;wt++)St!=wt&&d1(bt[St],bt[wt])&&bt.splice(wt,1);return bt},D0=function(bt){for(var St=this.nodes(),wt=this.edges(),Nt=this.cy(),Pt=$0(bt),Lt={},Ht=0;Ht<St.length;Ht++)Lt[St[Ht].id()]=Ht;for(var qt=St.length,Gt=qt*qt,Qt=new Array(Gt),hn,yn=0;yn<Gt;yn++)Qt[yn]=0;for(var xn=0;xn<wt.length;xn++){var bn=wt[xn],Nn=Lt[bn.source().id()],Pn=Lt[bn.target().id()],Fn=sp(bn,Pt.attributes);Qt[Nn*qt+Pn]+=Fn,Qt[Pn*qt+Nn]+=Fn}w0(Qt,qt,Pt.multFactor),hm(Qt,qt);for(var Un=!0,Hn=0;Un&&Hn<Pt.maxIterations;)Un=!1,hn=Gm(Qt,qt,Pt.expandFactor),Qt=R0(hn,qt,Pt.inflateFactor),Nu(Qt,hn,Gt,4)||(Un=!0),Hn++;var nr=c1(Qt,qt,St,Nt);return nr=I0(nr),nr},Ov={markovClustering:D0,mcl:D0},wy=function(bt){return bt},$p=function(bt,St){return Math.abs(St-bt)},z1=function(bt,St,wt){return bt+$p(St,wt)},N0=function(bt,St,wt){return bt+Math.pow(wt-St,2)},Gp=function(bt){return Math.sqrt(bt)},k0=function(bt,St,wt){return Math.max(bt,$p(St,wt))},f1=function(bt,St,wt,Nt,Pt){for(var Lt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:wy,Ht=Nt,qt,Gt,Qt=0;Qt<bt;Qt++)qt=St(Qt),Gt=wt(Qt),Ht=Pt(Ht,qt,Gt);return Lt(Ht)},qp={euclidean:function(bt,St,wt){return bt>=2?f1(bt,St,wt,0,N0,Gp):f1(bt,St,wt,0,z1)},squaredEuclidean:function(bt,St,wt){return f1(bt,St,wt,0,N0)},manhattan:function(bt,St,wt){return f1(bt,St,wt,0,z1)},max:function(bt,St,wt){return f1(bt,St,wt,-1/0,k0)}};qp["squared-euclidean"]=qp.squaredEuclidean,qp.squaredeuclidean=qp.squaredEuclidean;function j1(_t,bt,St,wt,Nt,Pt){var Lt;return Xt(_t)?Lt=_t:Lt=qp[_t]||qp.euclidean,bt===0&&Xt(_t)?Lt(Nt,Pt):Lt(bt,St,wt,Nt,Pt)}var Kp=Rs({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),p1=function(bt){return Kp(bt)},h1=function(bt,St,wt,Nt,Pt){var Lt=Pt!=="kMedoids",Ht=Lt?function(hn){return wt[hn]}:function(hn){return Nt[hn](wt)},qt=function(yn){return Nt[yn](St)},Gt=wt,Qt=St;return j1(bt,Nt.length,Ht,qt,Gt,Qt)},P0=function(bt,St,wt){for(var Nt=wt.length,Pt=new Array(Nt),Lt=new Array(Nt),Ht=new Array(St),qt=null,Gt=0;Gt<Nt;Gt++)Pt[Gt]=bt.min(wt[Gt]).value,Lt[Gt]=bt.max(wt[Gt]).value;for(var Qt=0;Qt<St;Qt++){qt=[];for(var hn=0;hn<Nt;hn++)qt[hn]=Math.random()*(Lt[hn]-Pt[hn])+Pt[hn];Ht[Qt]=qt}return Ht},Oy=function(bt,St,wt,Nt,Pt){for(var Lt=1/0,Ht=0,qt=0;qt<St.length;qt++){var Gt=h1(wt,bt,St[qt],Nt,Pt);Gt<Lt&&(Lt=Gt,Ht=qt)}return Ht},m1=function(bt,St,wt){for(var Nt=[],Pt=null,Lt=0;Lt<St.length;Lt++)Pt=St[Lt],wt[Pt.id()]===bt&&Nt.push(Pt);return Nt},qu=function(bt,St,wt){return Math.abs(St-bt)<=wt},Ry=function(bt,St,wt){for(var Nt=0;Nt<bt.length;Nt++)for(var Pt=0;Pt<bt[Nt].length;Pt++){var Lt=Math.abs(bt[Nt][Pt]-St[Nt][Pt]);if(Lt>wt)return!1}return!0},Iy=function(bt,St,wt){for(var Nt=0;Nt<wt;Nt++)if(bt===St[Nt])return!0;return!1},M0=function(bt,St){var wt=new Array(St);if(bt.length<50)for(var Nt=0;Nt<St;Nt++){for(var Pt=bt[Math.floor(Math.random()*bt.length)];Iy(Pt,wt,Nt);)Pt=bt[Math.floor(Math.random()*bt.length)];wt[Nt]=Pt}else for(var Lt=0;Lt<St;Lt++)wt[Lt]=bt[Math.floor(Math.random()*bt.length)];return wt},Dy=function(bt,St,wt){for(var Nt=0,Pt=0;Pt<St.length;Pt++)Nt+=h1("manhattan",St[Pt],bt,wt,"kMedoids");return Nt},Yp=function(bt){var St=this.cy(),wt=this.nodes(),Nt=null,Pt=p1(bt),Lt=new Array(Pt.k),Ht={},qt;Pt.testMode?typeof Pt.testCentroids=="number"?(Pt.testCentroids,qt=P0(wt,Pt.k,Pt.attributes)):mt(Pt.testCentroids)==="object"?qt=Pt.testCentroids:qt=P0(wt,Pt.k,Pt.attributes):qt=P0(wt,Pt.k,Pt.attributes);for(var Gt=!0,Qt=0;Gt&&Qt<Pt.maxIterations;){for(var hn=0;hn<wt.length;hn++)Nt=wt[hn],Ht[Nt.id()]=Oy(Nt,qt,Pt.distance,Pt.attributes,"kMeans");Gt=!1;for(var yn=0;yn<Pt.k;yn++){var xn=m1(yn,wt,Ht);if(xn.length!==0){for(var bn=Pt.attributes.length,Nn=qt[yn],Pn=new Array(bn),Fn=new Array(bn),Un=0;Un<bn;Un++){Fn[Un]=0;for(var Hn=0;Hn<xn.length;Hn++)Nt=xn[Hn],Fn[Un]+=Pt.attributes[Un](Nt);Pn[Un]=Fn[Un]/xn.length,qu(Pn[Un],Nn[Un],Pt.sensitivityThreshold)||(Gt=!0)}qt[yn]=Pn,Lt[yn]=St.collection(xn)}}Qt++}return Lt},Ny=function(bt){var St=this.cy(),wt=this.nodes(),Nt=null,Pt=p1(bt),Lt=new Array(Pt.k),Ht,qt={},Gt,Qt=new Array(Pt.k);Pt.testMode?typeof Pt.testCentroids=="number"||(mt(Pt.testCentroids)==="object"?Ht=Pt.testCentroids:Ht=M0(wt,Pt.k)):Ht=M0(wt,Pt.k);for(var hn=!0,yn=0;hn&&yn<Pt.maxIterations;){for(var xn=0;xn<wt.length;xn++)Nt=wt[xn],qt[Nt.id()]=Oy(Nt,Ht,Pt.distance,Pt.attributes,"kMedoids");hn=!1;for(var bn=0;bn<Ht.length;bn++){var Nn=m1(bn,wt,qt);if(Nn.length!==0){Qt[bn]=Dy(Ht[bn],Nn,Pt.attributes);for(var Pn=0;Pn<Nn.length;Pn++)Gt=Dy(Nn[Pn],Nn,Pt.attributes),Gt<Qt[bn]&&(Qt[bn]=Gt,Ht[bn]=Nn[Pn],hn=!0);Lt[bn]=St.collection(Nn)}}yn++}return Lt},H1=function(bt,St,wt,Nt,Pt){for(var Lt,Ht,qt=0;qt<St.length;qt++)for(var Gt=0;Gt<bt.length;Gt++)Nt[qt][Gt]=Math.pow(wt[qt][Gt],Pt.m);for(var Qt=0;Qt<bt.length;Qt++)for(var hn=0;hn<Pt.attributes.length;hn++){Lt=0,Ht=0;for(var yn=0;yn<St.length;yn++)Lt+=Nt[yn][Qt]*Pt.attributes[hn](St[yn]),Ht+=Nt[yn][Qt];bt[Qt][hn]=Lt/Ht}},Dr=function(bt,St,wt,Nt,Pt){for(var Lt=0;Lt<bt.length;Lt++)St[Lt]=bt[Lt].slice();for(var Ht,qt,Gt,Qt=2/(Pt.m-1),hn=0;hn<wt.length;hn++)for(var yn=0;yn<Nt.length;yn++){Ht=0;for(var xn=0;xn<wt.length;xn++)qt=h1(Pt.distance,Nt[yn],wt[hn],Pt.attributes,"cmeans"),Gt=h1(Pt.distance,Nt[yn],wt[xn],Pt.attributes,"cmeans"),Ht+=Math.pow(qt/Gt,Qt);bt[yn][hn]=1/Ht}},eo=function(bt,St,wt,Nt){for(var Pt=new Array(wt.k),Lt=0;Lt<Pt.length;Lt++)Pt[Lt]=[];for(var Ht,qt,Gt=0;Gt<St.length;Gt++){Ht=-1/0,qt=-1;for(var Qt=0;Qt<St[0].length;Qt++)St[Gt][Qt]>Ht&&(Ht=St[Gt][Qt],qt=Qt);Pt[qt].push(bt[Gt])}for(var hn=0;hn<Pt.length;hn++)Pt[hn]=Nt.collection(Pt[hn]);return Pt},qr=function(bt){var St=this.cy(),wt=this.nodes(),Nt=p1(bt),Pt,Lt,Ht,qt,Gt;qt=new Array(wt.length);for(var Qt=0;Qt<wt.length;Qt++)qt[Qt]=new Array(Nt.k);Ht=new Array(wt.length);for(var hn=0;hn<wt.length;hn++)Ht[hn]=new Array(Nt.k);for(var yn=0;yn<wt.length;yn++){for(var xn=0,bn=0;bn<Nt.k;bn++)Ht[yn][bn]=Math.random(),xn+=Ht[yn][bn];for(var Nn=0;Nn<Nt.k;Nn++)Ht[yn][Nn]=Ht[yn][Nn]/xn}Lt=new Array(Nt.k);for(var Pn=0;Pn<Nt.k;Pn++)Lt[Pn]=new Array(Nt.attributes.length);Gt=new Array(wt.length);for(var Fn=0;Fn<wt.length;Fn++)Gt[Fn]=new Array(Nt.k);for(var Un=!0,Hn=0;Un&&Hn<Nt.maxIterations;)Un=!1,H1(Lt,wt,Ht,Gt,Nt),Dr(Ht,qt,Lt,wt,Nt),Ry(Ht,qt,Nt.sensitivityThreshold)||(Un=!0),Hn++;return Pt=eo(wt,Ht,Nt,St),{clusters:Pt,degreeOfMembership:Ht}},Jo={kMeans:Yp,kMedoids:Ny,fuzzyCMeans:qr,fcm:qr},Ps=Rs({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),Ys={single:"min",complete:"max"},Kl=function(bt){var St=Ps(bt),wt=Ys[St.linkage];return wt!=null&&(St.linkage=wt),St},sl=function(bt,St,wt,Nt,Pt){for(var Lt=0,Ht=1/0,qt,Gt=Pt.attributes,Qt=function(ar,vr){return j1(Pt.distance,Gt.length,function(Tr){return Gt[Tr](ar)},function(Tr){return Gt[Tr](vr)},ar,vr)},hn=0;hn<bt.length;hn++){var yn=bt[hn].key,xn=wt[yn][Nt[yn]];xn<Ht&&(Lt=yn,Ht=xn)}if(Pt.mode==="threshold"&&Ht>=Pt.threshold||Pt.mode==="dendrogram"&&bt.length===1)return!1;var bn=St[Lt],Nn=St[Nt[Lt]],Pn;Pt.mode==="dendrogram"?Pn={left:bn,right:Nn,key:bn.key}:Pn={value:bn.value.concat(Nn.value),key:bn.key},bt[bn.index]=Pn,bt.splice(Nn.index,1),St[bn.key]=Pn;for(var Fn=0;Fn<bt.length;Fn++){var Un=bt[Fn];bn.key===Un.key?qt=1/0:Pt.linkage==="min"?(qt=wt[bn.key][Un.key],wt[bn.key][Un.key]>wt[Nn.key][Un.key]&&(qt=wt[Nn.key][Un.key])):Pt.linkage==="max"?(qt=wt[bn.key][Un.key],wt[bn.key][Un.key]<wt[Nn.key][Un.key]&&(qt=wt[Nn.key][Un.key])):Pt.linkage==="mean"?qt=(wt[bn.key][Un.key]*bn.size+wt[Nn.key][Un.key]*Nn.size)/(bn.size+Nn.size):Pt.mode==="dendrogram"?qt=Qt(Un.value,bn.value):qt=Qt(Un.value[0],bn.value[0]),wt[bn.key][Un.key]=wt[Un.key][bn.key]=qt}for(var Hn=0;Hn<bt.length;Hn++){var nr=bt[Hn].key;if(Nt[nr]===bn.key||Nt[nr]===Nn.key){for(var mr=nr,gr=0;gr<bt.length;gr++){var rr=bt[gr].key;wt[nr][rr]<wt[nr][mr]&&(mr=rr)}Nt[nr]=mr}bt[Hn].index=Hn}return bn.key=Nn.key=bn.index=Nn.index=null,!0},Xp=function _t(bt,St,wt){!bt||(bt.value?St.push(bt.value):(bt.left&&_t(bt.left,St),bt.right&&_t(bt.right,St)))},Zp=function _t(bt,St){if(!bt)return"";if(bt.left&&bt.right){var wt=_t(bt.left,St),Nt=_t(bt.right,St),Pt=St.add({group:"nodes",data:{id:wt+","+Nt}});return St.add({group:"edges",data:{source:wt,target:Pt.id()}}),St.add({group:"edges",data:{source:Nt,target:Pt.id()}}),Pt.id()}else if(bt.value)return bt.value.id()},Ku=function _t(bt,St,wt){if(!bt)return[];var Nt=[],Pt=[],Lt=[];return St===0?(bt.left&&Xp(bt.left,Nt),bt.right&&Xp(bt.right,Pt),Lt=Nt.concat(Pt),[wt.collection(Lt)]):St===1?bt.value?[wt.collection(bt.value)]:(bt.left&&Xp(bt.left,Nt),bt.right&&Xp(bt.right,Pt),[wt.collection(Nt),wt.collection(Pt)]):bt.value?[wt.collection(bt.value)]:(bt.left&&(Nt=_t(bt.left,St-1,wt)),bt.right&&(Pt=_t(bt.right,St-1,wt)),Nt.concat(Pt))},Yu=function(bt){for(var St=this.cy(),wt=this.nodes(),Nt=Kl(bt),Pt=Nt.attributes,Lt=function(Hn,nr){return j1(Nt.distance,Pt.length,function(mr){return Pt[mr](Hn)},function(mr){return Pt[mr](nr)},Hn,nr)},Ht=[],qt=[],Gt=[],Qt=[],hn=0;hn<wt.length;hn++){var yn={value:Nt.mode==="dendrogram"?wt[hn]:[wt[hn]],key:hn,index:hn};Ht[hn]=yn,Qt[hn]=yn,qt[hn]=[],Gt[hn]=0}for(var xn=0;xn<Ht.length;xn++)for(var bn=0;bn<=xn;bn++){var Nn=void 0;Nt.mode==="dendrogram"?Nn=xn===bn?1/0:Lt(Ht[xn].value,Ht[bn].value):Nn=xn===bn?1/0:Lt(Ht[xn].value[0],Ht[bn].value[0]),qt[xn][bn]=Nn,qt[bn][xn]=Nn,Nn<qt[xn][Gt[xn]]&&(Gt[xn]=bn)}for(var Pn=sl(Ht,Qt,qt,Gt,Nt);Pn;)Pn=sl(Ht,Qt,qt,Gt,Nt);var Fn;return Nt.mode==="dendrogram"?(Fn=Ku(Ht[0],Nt.dendrogramDepth,St),Nt.addDendrogram&&Zp(Ht[0],St)):(Fn=new Array(Ht.length),Ht.forEach(function(Un,Hn){Un.key=Un.index=null,Fn[Hn]=St.collection(Un.value)})),Fn},ky={hierarchicalClustering:Yu,hca:Yu},U1=Rs({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),mm=function(bt){var St=bt.damping,wt=bt.preference;.5<=St&&St<1||Os("Damping must range on [0.5, 1).  Got: ".concat(St));var Nt=["median","mean","min","max"];return Nt.some(function(Pt){return Pt===wt})||sn(wt)||Os("Preference must be one of [".concat(Nt.map(function(Pt){return"'".concat(Pt,"'")}).join(", "),"] or a number.  Got: ").concat(wt)),U1(bt)},qm=function(bt,St,wt,Nt){var Pt=function(Ht,qt){return Nt[qt](Ht)};return-j1(bt,Nt.length,function(Lt){return Pt(St,Lt)},function(Lt){return Pt(wt,Lt)},St,wt)},El=function(bt,St){var wt=null;return St==="median"?wt=Ty(bt):St==="mean"?wt=g0(bt):St==="min"?wt=$v(bt):St==="max"?wt=by(bt):wt=St,wt},Py=function(bt,St,wt){for(var Nt=[],Pt=0;Pt<bt;Pt++)St[Pt*bt+Pt]+wt[Pt*bt+Pt]>0&&Nt.push(Pt);return Nt},gm=function(bt,St,wt){for(var Nt=[],Pt=0;Pt<bt;Pt++){for(var Lt=-1,Ht=-1/0,qt=0;qt<wt.length;qt++){var Gt=wt[qt];St[Pt*bt+Gt]>Ht&&(Lt=Gt,Ht=St[Pt*bt+Gt])}Lt>0&&Nt.push(Lt)}for(var Qt=0;Qt<wt.length;Qt++)Nt[wt[Qt]]=wt[Qt];return Nt},ym=function(bt,St,wt){for(var Nt=gm(bt,St,wt),Pt=0;Pt<wt.length;Pt++){for(var Lt=[],Ht=0;Ht<Nt.length;Ht++)Nt[Ht]===wt[Pt]&&Lt.push(Ht);for(var qt=-1,Gt=-1/0,Qt=0;Qt<Lt.length;Qt++){for(var hn=0,yn=0;yn<Lt.length;yn++)hn+=St[Lt[yn]*bt+Lt[Qt]];hn>Gt&&(qt=Qt,Gt=hn)}wt[Pt]=Lt[qt]}return Nt=gm(bt,St,wt),Nt},F0=function(bt){for(var St=this.cy(),wt=this.nodes(),Nt=mm(bt),Pt={},Lt=0;Lt<wt.length;Lt++)Pt[wt[Lt].id()]=Lt;var Ht,qt,Gt,Qt,hn,yn;Ht=wt.length,qt=Ht*Ht,Gt=new Array(qt);for(var xn=0;xn<qt;xn++)Gt[xn]=-1/0;for(var bn=0;bn<Ht;bn++)for(var Nn=0;Nn<Ht;Nn++)bn!==Nn&&(Gt[bn*Ht+Nn]=qm(Nt.distance,wt[bn],wt[Nn],Nt.attributes));Qt=El(Gt,Nt.preference);for(var Pn=0;Pn<Ht;Pn++)Gt[Pn*Ht+Pn]=Qt;hn=new Array(qt);for(var Fn=0;Fn<qt;Fn++)hn[Fn]=0;yn=new Array(qt);for(var Un=0;Un<qt;Un++)yn[Un]=0;for(var Hn=new Array(Ht),nr=new Array(Ht),mr=new Array(Ht),gr=0;gr<Ht;gr++)Hn[gr]=0,nr[gr]=0,mr[gr]=0;for(var rr=new Array(Ht*Nt.minIterations),hr=0;hr<rr.length;hr++)rr[hr]=0;var ar;for(ar=0;ar<Nt.maxIterations;ar++){for(var vr=0;vr<Ht;vr++){for(var Tr=-1/0,dr=-1/0,Sr=-1,yr=0,Fr=0;Fr<Ht;Fr++)Hn[Fr]=hn[vr*Ht+Fr],yr=yn[vr*Ht+Fr]+Gt[vr*Ht+Fr],yr>=Tr?(dr=Tr,Tr=yr,Sr=Fr):yr>dr&&(dr=yr);for(var _r=0;_r<Ht;_r++)hn[vr*Ht+_r]=(1-Nt.damping)*(Gt[vr*Ht+_r]-Tr)+Nt.damping*Hn[_r];hn[vr*Ht+Sr]=(1-Nt.damping)*(Gt[vr*Ht+Sr]-dr)+Nt.damping*Hn[Sr]}for(var Rr=0;Rr<Ht;Rr++){for(var zr=0,Vr=0;Vr<Ht;Vr++)Hn[Vr]=yn[Vr*Ht+Rr],nr[Vr]=Math.max(0,hn[Vr*Ht+Rr]),zr+=nr[Vr];zr-=nr[Rr],nr[Rr]=hn[Rr*Ht+Rr],zr+=nr[Rr];for(var ga=0;ga<Ht;ga++)yn[ga*Ht+Rr]=(1-Nt.damping)*Math.min(0,zr-nr[ga])+Nt.damping*Hn[ga];yn[Rr*Ht+Rr]=(1-Nt.damping)*(zr-nr[Rr])+Nt.damping*Hn[Rr]}for(var jr=0,_i=0;_i<Ht;_i++){var co=yn[_i*Ht+_i]+hn[_i*Ht+_i]>0?1:0;rr[ar%Nt.minIterations*Ht+_i]=co,jr+=co}if(jr>0&&(ar>=Nt.minIterations-1||ar==Nt.maxIterations-1)){for(var mo=0,uo=0;uo<Ht;uo++){mr[uo]=0;for(var so=0;so<Nt.minIterations;so++)mr[uo]+=rr[so*Ht+uo];(mr[uo]===0||mr[uo]===Nt.minIterations)&&mo++}if(mo===Ht)break}}for(var Br=Py(Ht,hn,yn),fo=ym(Ht,Gt,Br),vo={},Io=0;Io<Br.length;Io++)vo[Br[Io]]=[];for(var Fo=0;Fo<wt.length;Fo++){var Is=Pt[wt[Fo].id()],Ss=fo[Is];Ss!=null&&vo[Ss].push(wt[Fo])}for(var Wo=new Array(Br.length),Po=0;Po<Br.length;Po++)Wo[Po]=St.collection(vo[Br[Po]]);return Wo},My={affinityPropagation:F0,ap:F0},Fy=Rs({root:void 0,directed:!1}),V1={hierholzer:function(bt){if(!gn(bt)){var St=arguments;bt={root:St[0],directed:St[1]}}var wt=Fy(bt),Nt=wt.root,Pt=wt.directed,Lt=this,Ht=!1,qt,Gt,Qt;Nt&&(Qt=Ut(Nt)?this.filter(Nt)[0].id():Nt[0].id());var hn={},yn={};Pt?Lt.forEach(function(Un){var Hn=Un.id();if(Un.isNode()){var nr=Un.indegree(!0),mr=Un.outdegree(!0),gr=nr-mr,rr=mr-nr;gr==1?qt?Ht=!0:qt=Hn:rr==1?Gt?Ht=!0:Gt=Hn:(rr>1||gr>1)&&(Ht=!0),hn[Hn]=[],Un.outgoers().forEach(function(hr){hr.isEdge()&&hn[Hn].push(hr.id())})}else yn[Hn]=[void 0,Un.target().id()]}):Lt.forEach(function(Un){var Hn=Un.id();if(Un.isNode()){var nr=Un.degree(!0);nr%2&&(qt?Gt?Ht=!0:Gt=Hn:qt=Hn),hn[Hn]=[],Un.connectedEdges().forEach(function(mr){return hn[Hn].push(mr.id())})}else yn[Hn]=[Un.source().id(),Un.target().id()]});var xn={found:!1,trail:void 0};if(Ht)return xn;if(Gt&&qt)if(Pt){if(Qt&&Gt!=Qt)return xn;Qt=Gt}else{if(Qt&&Gt!=Qt&&qt!=Qt)return xn;Qt||(Qt=Gt)}else Qt||(Qt=Lt[0].id());var bn=function(Hn){for(var nr=Hn,mr=[Hn],gr,rr,hr;hn[nr].length;)gr=hn[nr].shift(),rr=yn[gr][0],hr=yn[gr][1],nr!=hr?(hn[hr]=hn[hr].filter(function(ar){return ar!=gr}),nr=hr):!Pt&&nr!=rr&&(hn[rr]=hn[rr].filter(function(ar){return ar!=gr}),nr=rr),mr.unshift(gr),mr.unshift(nr);return mr},Nn=[],Pn=[];for(Pn=bn(Qt);Pn.length!=1;)hn[Pn[0]].length==0?(Nn.unshift(Lt.getElementById(Pn.shift())),Nn.unshift(Lt.getElementById(Pn.shift()))):Pn=bn(Pn.shift()).concat(Pn);Nn.unshift(Lt.getElementById(Pn.shift()));for(var Fn in hn)if(hn[Fn].length)return xn;return xn.found=!0,xn.trail=this.spawn(Nn,!0),xn}},Hu=function(){var bt=this,St={},wt=0,Nt=0,Pt=[],Lt=[],Ht={},qt=function(yn,xn){for(var bn=Lt.length-1,Nn=[],Pn=bt.spawn();Lt[bn].x!=yn||Lt[bn].y!=xn;)Nn.push(Lt.pop().edge),bn--;Nn.push(Lt.pop().edge),Nn.forEach(function(Fn){var Un=Fn.connectedNodes().intersection(bt);Pn.merge(Fn),Un.forEach(function(Hn){var nr=Hn.id(),mr=Hn.connectedEdges().intersection(bt);Pn.merge(Hn),St[nr].cutVertex?Pn.merge(mr.filter(function(gr){return gr.isLoop()})):Pn.merge(mr)})}),Pt.push(Pn)},Gt=function hn(yn,xn,bn){yn===bn&&(Nt+=1),St[xn]={id:wt,low:wt++,cutVertex:!1};var Nn=bt.getElementById(xn).connectedEdges().intersection(bt);if(Nn.size()===0)Pt.push(bt.spawn(bt.getElementById(xn)));else{var Pn,Fn,Un,Hn;Nn.forEach(function(nr){Pn=nr.source().id(),Fn=nr.target().id(),Un=Pn===xn?Fn:Pn,Un!==bn&&(Hn=nr.id(),Ht[Hn]||(Ht[Hn]=!0,Lt.push({x:xn,y:Un,edge:nr})),Un in St?St[xn].low=Math.min(St[xn].low,St[Un].id):(hn(yn,Un,xn),St[xn].low=Math.min(St[xn].low,St[Un].low),St[xn].id<=St[Un].low&&(St[xn].cutVertex=!0,qt(xn,Un))))})}};bt.forEach(function(hn){if(hn.isNode()){var yn=hn.id();yn in St||(Nt=0,Gt(yn,yn),St[yn].cutVertex=Nt>1)}});var Qt=Object.keys(St).filter(function(hn){return St[hn].cutVertex}).map(function(hn){return bt.getElementById(hn)});return{cut:bt.spawn(Qt),components:Pt}},vm={hopcroftTarjanBiconnected:Hu,htbc:Hu,htb:Hu,hopcroftTarjanBiconnectedComponents:Hu},G1=function(){var bt=this,St={},wt=0,Nt=[],Pt=[],Lt=bt.spawn(bt),Ht=function qt(Gt){Pt.push(Gt),St[Gt]={index:wt,low:wt++,explored:!1};var Qt=bt.getElementById(Gt).connectedEdges().intersection(bt);if(Qt.forEach(function(Nn){var Pn=Nn.target().id();Pn!==Gt&&(Pn in St||qt(Pn),St[Pn].explored||(St[Gt].low=Math.min(St[Gt].low,St[Pn].low)))}),St[Gt].index===St[Gt].low){for(var hn=bt.spawn();;){var yn=Pt.pop();if(hn.merge(bt.getElementById(yn)),St[yn].low=St[Gt].index,St[yn].explored=!0,yn===Gt)break}var xn=hn.edgesWith(hn),bn=hn.merge(xn);Nt.push(bn),Lt=Lt.difference(bn)}};return bt.forEach(function(qt){if(qt.isNode()){var Gt=qt.id();Gt in St||Ht(Gt)}}),{cut:Lt,components:Nt}},bm={tarjanStronglyConnected:G1,tsc:G1,tscc:G1,tarjanStronglyConnectedComponents:G1},L0={};[bp,ko,po,Wl,Zs,vu,Ep,_y,_p,B1,Vm,Ov,Jo,ky,My,V1,vm,bm].forEach(function(_t){Qr(L0,_t)});/*!
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
Licensed under The MIT License (http://opensource.org/licenses/MIT)
*/var Tm=0,q1=1,Km=2,ku=function _t(bt){if(!(this instanceof _t))return new _t(bt);this.id="Thenable/1.0.7",this.state=Tm,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof bt=="function"&&bt.call(this,this.fulfill.bind(this),this.reject.bind(this))};ku.prototype={fulfill:function(bt){return Uu(this,q1,"fulfillValue",bt)},reject:function(bt){return Uu(this,Km,"rejectReason",bt)},then:function(bt,St){var wt=this,Nt=new ku;return wt.onFulfilled.push(By(bt,Nt,"fulfill")),wt.onRejected.push(By(St,Nt,"reject")),wp(wt),Nt.proxy}};var Uu=function(bt,St,wt,Nt){return bt.state===Tm&&(bt.state=St,bt[wt]=Nt,wp(bt)),bt},wp=function(bt){bt.state===q1?Ly(bt,"onFulfilled",bt.fulfillValue):bt.state===Km&&Ly(bt,"onRejected",bt.rejectReason)},Ly=function(bt,St,wt){if(bt[St].length!==0){var Nt=bt[St];bt[St]=[];var Pt=function(){for(var Ht=0;Ht<Nt.length;Ht++)Nt[Ht](wt)};typeof setImmediate=="function"?setImmediate(Pt):setTimeout(Pt,0)}},By=function(bt,St,wt){return function(Nt){if(typeof bt!="function")St[wt].call(St,Nt);else{var Pt;try{Pt=bt(Nt)}catch(Lt){St.reject(Lt);return}zy(St,Pt)}}},zy=function _t(bt,St){if(bt===St||bt.proxy===St){bt.reject(new TypeError("cannot resolve promise with itself"));return}var wt;if(mt(St)==="object"&&St!==null||typeof St=="function")try{wt=St.then}catch(Pt){bt.reject(Pt);return}if(typeof wt=="function"){var Nt=!1;try{wt.call(St,function(Pt){Nt||(Nt=!0,Pt===St?bt.reject(new TypeError("circular thenable chain")):_t(bt,Pt))},function(Pt){Nt||(Nt=!0,bt.reject(Pt))})}catch(Pt){Nt||bt.reject(Pt)}return}bt.fulfill(St)};ku.all=function(_t){return new ku(function(bt,St){for(var wt=new Array(_t.length),Nt=0,Pt=function(qt,Gt){wt[qt]=Gt,Nt++,Nt===_t.length&&bt(wt)},Lt=0;Lt<_t.length;Lt++)(function(Ht){var qt=_t[Ht],Gt=qt!=null&&qt.then!=null;if(Gt)qt.then(function(hn){Pt(Ht,hn)},function(hn){St(hn)});else{var Qt=qt;Pt(Ht,Qt)}})(Lt)})},ku.resolve=function(_t){return new ku(function(bt,St){bt(_t)})},ku.reject=function(_t){return new ku(function(bt,St){St(_t)})};var Op=typeof Promise<"u"?Promise:ku,g1=function(bt,St,wt){var Nt=wn(bt),Pt=!Nt,Lt=this._private=Qr({duration:1e3},St,wt);if(Lt.target=bt,Lt.style=Lt.style||Lt.css,Lt.started=!1,Lt.playing=!1,Lt.hooked=!1,Lt.applying=!1,Lt.progress=0,Lt.completes=[],Lt.frames=[],Lt.complete&&Xt(Lt.complete)&&Lt.completes.push(Lt.complete),Pt){var Ht=bt.position();Lt.startPosition=Lt.startPosition||{x:Ht.x,y:Ht.y},Lt.startStyle=Lt.startStyle||bt.cy().style().getAnimationStartStyle(bt,Lt.style)}if(Nt){var qt=bt.pan();Lt.startPan={x:qt.x,y:qt.y},Lt.startZoom=bt.zoom()}this.length=1,this[0]=this},lp=g1.prototype;Qr(lp,{instanceString:function(){return"animation"},hook:function(){var bt=this._private;if(!bt.hooked){var St,wt=bt.target._private.animation;bt.queue?St=wt.queue:St=wt.current,St.push(this),_n(bt.target)&&bt.target.cy().addToAnimationPool(bt.target),bt.hooked=!0}return this},play:function(){var bt=this._private;return bt.progress===1&&(bt.progress=0),bt.playing=!0,bt.started=!1,bt.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var bt=this._private;return bt.applying=!0,bt.started=!1,bt.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var bt=this._private;return bt.playing=!1,bt.started=!1,this},stop:function(){var bt=this._private;return bt.playing=!1,bt.started=!1,bt.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(bt){var St=this._private;return bt===void 0?St.progress*St.duration:this.progress(bt/St.duration)},progress:function(bt){var St=this._private,wt=St.playing;return bt===void 0?St.progress:(wt&&this.pause(),St.progress=bt,St.started=!1,wt&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var bt=this._private,St=bt.playing;St&&this.pause(),bt.progress=1-bt.progress,bt.started=!1;var wt=function(Gt,Qt){var hn=bt[Gt];hn!=null&&(bt[Gt]=bt[Qt],bt[Qt]=hn)};if(wt("zoom","startZoom"),wt("pan","startPan"),wt("position","startPosition"),bt.style)for(var Nt=0;Nt<bt.style.length;Nt++){var Pt=bt.style[Nt],Lt=Pt.name,Ht=bt.startStyle[Lt];bt.startStyle[Lt]=Pt,bt.style[Nt]=Ht}return St&&this.play(),this},promise:function(bt){var St=this._private,wt;switch(bt){case"frame":wt=St.frames;break;default:case"complete":case"completed":wt=St.completes}return new Op(function(Nt,Pt){wt.push(function(){Nt()})})}}),lp.complete=lp.completed,lp.run=lp.play,lp.running=lp.playing;var Rv={animated:function(){return function(){var St=this,wt=St.length!==void 0,Nt=wt?St:[St],Pt=this._private.cy||this;if(!Pt.styleEnabled())return!1;var Lt=Nt[0];if(Lt)return Lt._private.animation.current.length>0}},clearQueue:function(){return function(){var St=this,wt=St.length!==void 0,Nt=wt?St:[St],Pt=this._private.cy||this;if(!Pt.styleEnabled())return this;for(var Lt=0;Lt<Nt.length;Lt++){var Ht=Nt[Lt];Ht._private.animation.queue=[]}return this}},delay:function(){return function(St,wt){var Nt=this._private.cy||this;return Nt.styleEnabled()?this.animate({delay:St,duration:St,complete:wt}):this}},delayAnimation:function(){return function(St,wt){var Nt=this._private.cy||this;return Nt.styleEnabled()?this.animation({delay:St,duration:St,complete:wt}):this}},animation:function(){return function(St,wt){var Nt=this,Pt=Nt.length!==void 0,Lt=Pt?Nt:[Nt],Ht=this._private.cy||this,qt=!Pt,Gt=!qt;if(!Ht.styleEnabled())return this;var Qt=Ht.style();St=Qr({},St,wt);var hn=Object.keys(St).length===0;if(hn)return new g1(Lt[0],St);switch(St.duration===void 0&&(St.duration=400),St.duration){case"slow":St.duration=600;break;case"fast":St.duration=200;break}if(Gt&&(St.style=Qt.getPropsList(St.style||St.css),St.css=void 0),Gt&&St.renderedPosition!=null){var yn=St.renderedPosition,xn=Ht.pan(),bn=Ht.zoom();St.position=uu(yn,bn,xn)}if(qt&&St.panBy!=null){var Nn=St.panBy,Pn=Ht.pan();St.pan={x:Pn.x+Nn.x,y:Pn.y+Nn.y}}var Fn=St.center||St.centre;if(qt&&Fn!=null){var Un=Ht.getCenterPan(Fn.eles,St.zoom);Un!=null&&(St.pan=Un)}if(qt&&St.fit!=null){var Hn=St.fit,nr=Ht.getFitViewport(Hn.eles||Hn.boundingBox,Hn.padding);nr!=null&&(St.pan=nr.pan,St.zoom=nr.zoom)}if(qt&&gn(St.zoom)){var mr=Ht.getZoomedViewport(St.zoom);mr!=null?(mr.zoomed&&(St.zoom=mr.zoom),mr.panned&&(St.pan=mr.pan)):St.zoom=null}return new g1(Lt[0],St)}},animate:function(){return function(St,wt){var Nt=this,Pt=Nt.length!==void 0,Lt=Pt?Nt:[Nt],Ht=this._private.cy||this;if(!Ht.styleEnabled())return this;wt&&(St=Qr({},St,wt));for(var qt=0;qt<Lt.length;qt++){var Gt=Lt[qt],Qt=Gt.animated()&&(St.queue===void 0||St.queue),hn=Gt.animation(St,Qt?{queue:!0}:void 0);hn.play()}return this}},stop:function(){return function(St,wt){var Nt=this,Pt=Nt.length!==void 0,Lt=Pt?Nt:[Nt],Ht=this._private.cy||this;if(!Ht.styleEnabled())return this;for(var qt=0;qt<Lt.length;qt++){for(var Gt=Lt[qt],Qt=Gt._private,hn=Qt.animation.current,yn=0;yn<hn.length;yn++){var xn=hn[yn],bn=xn._private;wt&&(bn.duration=0)}St&&(Qt.animation.queue=[]),wt||(Qt.animation.current=[])}return Ht.notify("draw"),this}}},B0={data:function(bt){var St={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(Nt){},beforeSet:function(Nt,Pt){},onSet:function(Nt){},canSet:function(Nt){return!0}};return bt=Qr({},St,bt),function(Nt,Pt){var Lt=bt,Ht=this,qt=Ht.length!==void 0,Gt=qt?Ht:[Ht],Qt=qt?Ht[0]:Ht;if(Ut(Nt)){var hn=Nt.indexOf(".")!==-1,yn=hn&&ht.default(Nt);if(Lt.allowGetting&&Pt===void 0){var xn;return Qt&&(Lt.beforeGet(Qt),yn&&Qt._private[Lt.field][Nt]===void 0?xn=ft.default(Qt._private[Lt.field],yn):xn=Qt._private[Lt.field][Nt]),xn}else if(Lt.allowSetting&&Pt!==void 0){var bn=!Lt.immutableKeys[Nt];if(bn){var Nn=Et({},Nt,Pt);Lt.beforeSet(Ht,Nn);for(var Pn=0,Fn=Gt.length;Pn<Fn;Pn++){var Un=Gt[Pn];Lt.canSet(Un)&&(yn&&Qt._private[Lt.field][Nt]===void 0?pt.default(Un._private[Lt.field],yn,Pt):Un._private[Lt.field][Nt]=Pt)}Lt.updateStyle&&Ht.updateStyle(),Lt.onSet(Ht),Lt.settingTriggersEvent&&Ht[Lt.triggerFnName](Lt.settingEvent)}}}else if(Lt.allowSetting&&gn(Nt)){var Hn=Nt,nr,mr,gr=Object.keys(Hn);Lt.beforeSet(Ht,Hn);for(var rr=0;rr<gr.length;rr++){nr=gr[rr],mr=Hn[nr];var hr=!Lt.immutableKeys[nr];if(hr)for(var ar=0;ar<Gt.length;ar++){var vr=Gt[ar];Lt.canSet(vr)&&(vr._private[Lt.field][nr]=mr)}}Lt.updateStyle&&Ht.updateStyle(),Lt.onSet(Ht),Lt.settingTriggersEvent&&Ht[Lt.triggerFnName](Lt.settingEvent)}else if(Lt.allowBinding&&Xt(Nt)){var Tr=Nt;Ht.on(Lt.bindingEvent,Tr)}else if(Lt.allowGetting&&Nt===void 0){var dr;return Qt&&(Lt.beforeGet(Qt),dr=Qt._private[Lt.field]),dr}return Ht}},removeData:function(bt){var St={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return bt=Qr({},St,bt),function(Nt){var Pt=bt,Lt=this,Ht=Lt.length!==void 0,qt=Ht?Lt:[Lt];if(Ut(Nt)){for(var Gt=Nt.split(/\s+/),Qt=Gt.length,hn=0;hn<Qt;hn++){var yn=Gt[hn];if(!Gn(yn)){var xn=!Pt.immutableKeys[yn];if(xn)for(var bn=0,Nn=qt.length;bn<Nn;bn++)qt[bn]._private[Pt.field][yn]=void 0}}Pt.triggerEvent&&Lt[Pt.triggerFnName](Pt.event)}else if(Nt===void 0){for(var Pn=0,Fn=qt.length;Pn<Fn;Pn++)for(var Un=qt[Pn]._private[Pt.field],Hn=Object.keys(Un),nr=0;nr<Hn.length;nr++){var mr=Hn[nr],gr=!Pt.immutableKeys[mr];gr&&(Un[mr]=void 0)}Pt.triggerEvent&&Lt[Pt.triggerFnName](Pt.event)}return Lt}}},Iv={eventAliasesOn:function(bt){var St=bt;St.addListener=St.listen=St.bind=St.on,St.unlisten=St.unbind=St.off=St.removeListener,St.trigger=St.emit,St.pon=St.promiseOn=function(wt,Nt){var Pt=this,Lt=Array.prototype.slice.call(arguments,0);return new Op(function(Ht,qt){var Gt=function(xn){Pt.off.apply(Pt,hn),Ht(xn)},Qt=Lt.concat([Gt]),hn=Qt.concat([]);Pt.on.apply(Pt,Qt)})}}},yl={};[Rv,B0,Iv].forEach(function(_t){Qr(yl,_t)});var jl={animate:yl.animate(),animation:yl.animation(),animated:yl.animated(),clearQueue:yl.clearQueue(),delay:yl.delay(),delayAnimation:yl.delayAnimation(),stop:yl.stop()},Hl={classes:function(bt){var St=this;if(bt===void 0){var wt=[];return St[0]._private.classes.forEach(function(bn){return wt.push(bn)}),wt}else Jt(bt)||(bt=(bt||"").match(/\S+/g)||[]);for(var Nt=[],Pt=new vp(bt),Lt=0;Lt<St.length;Lt++){for(var Ht=St[Lt],qt=Ht._private,Gt=qt.classes,Qt=!1,hn=0;hn<bt.length;hn++){var yn=bt[hn],xn=Gt.has(yn);if(!xn){Qt=!0;break}}Qt||(Qt=Gt.size!==bt.length),Qt&&(qt.classes=Pt,Nt.push(Ht))}return Nt.length>0&&this.spawn(Nt).updateStyle().emit("class"),St},addClass:function(bt){return this.toggleClass(bt,!0)},hasClass:function(bt){var St=this[0];return St!=null&&St._private.classes.has(bt)},toggleClass:function(bt,St){Jt(bt)||(bt=bt.match(/\S+/g)||[]);for(var wt=this,Nt=St===void 0,Pt=[],Lt=0,Ht=wt.length;Lt<Ht;Lt++)for(var qt=wt[Lt],Gt=qt._private.classes,Qt=!1,hn=0;hn<bt.length;hn++){var yn=bt[hn],xn=Gt.has(yn),bn=!1;St||Nt&&!xn?(Gt.add(yn),bn=!0):(!St||Nt&&xn)&&(Gt.delete(yn),bn=!0),!Qt&&bn&&(Pt.push(qt),Qt=!0)}return Pt.length>0&&this.spawn(Pt).updateStyle().emit("class"),wt},removeClass:function(bt){return this.toggleClass(bt,!1)},flashClass:function(bt,St){var wt=this;if(St==null)St=250;else if(St===0)return wt;return wt.addClass(bt),setTimeout(function(){wt.removeClass(bt)},St),wt}};Hl.className=Hl.classNames=Hl.classes;var ll={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ir,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};ll.variable="(?:[\\w-.]|(?:\\\\"+ll.metaChar+"))+",ll.className="(?:[\\w-]|(?:\\\\"+ll.metaChar+"))+",ll.value=ll.string+"|"+ll.number,ll.id=ll.variable,function(){var _t,bt,St;for(_t=ll.comparatorOp.split("|"),St=0;St<_t.length;St++)bt=_t[St],ll.comparatorOp+="|@"+bt;for(_t=ll.comparatorOp.split("|"),St=0;St<_t.length;St++)bt=_t[St],!(bt.indexOf("!")>=0)&&bt!=="="&&(ll.comparatorOp+="|\\!"+bt)}();var Cl=function(){return{checks:[]}},rs={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},j0=[{selector:":selected",matches:function(bt){return bt.selected()}},{selector:":unselected",matches:function(bt){return!bt.selected()}},{selector:":selectable",matches:function(bt){return bt.selectable()}},{selector:":unselectable",matches:function(bt){return!bt.selectable()}},{selector:":locked",matches:function(bt){return bt.locked()}},{selector:":unlocked",matches:function(bt){return!bt.locked()}},{selector:":visible",matches:function(bt){return bt.visible()}},{selector:":hidden",matches:function(bt){return!bt.visible()}},{selector:":transparent",matches:function(bt){return bt.transparent()}},{selector:":grabbed",matches:function(bt){return bt.grabbed()}},{selector:":free",matches:function(bt){return!bt.grabbed()}},{selector:":removed",matches:function(bt){return bt.removed()}},{selector:":inside",matches:function(bt){return!bt.removed()}},{selector:":grabbable",matches:function(bt){return bt.grabbable()}},{selector:":ungrabbable",matches:function(bt){return!bt.grabbable()}},{selector:":animated",matches:function(bt){return bt.animated()}},{selector:":unanimated",matches:function(bt){return!bt.animated()}},{selector:":parent",matches:function(bt){return bt.isParent()}},{selector:":childless",matches:function(bt){return bt.isChildless()}},{selector:":child",matches:function(bt){return bt.isChild()}},{selector:":orphan",matches:function(bt){return bt.isOrphan()}},{selector:":nonorphan",matches:function(bt){return bt.isChild()}},{selector:":compound",matches:function(bt){return bt.isNode()?bt.isParent():bt.source().isParent()||bt.target().isParent()}},{selector:":loop",matches:function(bt){return bt.isLoop()}},{selector:":simple",matches:function(bt){return bt.isSimple()}},{selector:":active",matches:function(bt){return bt.active()}},{selector:":inactive",matches:function(bt){return!bt.active()}},{selector:":backgrounding",matches:function(bt){return bt.backgrounding()}},{selector:":nonbackgrounding",matches:function(bt){return!bt.backgrounding()}}].sort(function(_t,bt){return $o(_t.selector,bt.selector)}),Ym=function(){for(var _t={},bt,St=0;St<j0.length;St++)bt=j0[St],_t[bt.selector]=bt.matches;return _t}(),K1=function(bt,St){return Ym[bt](St)},H0="("+j0.map(function(_t){return _t.selector}).join("|")+")",Tu=function(bt){return bt.replace(new RegExp("\\\\("+ll.metaChar+")","g"),function(St,wt){return wt})},Pu=function(bt,St,wt){bt[bt.length-1]=wt},Qp=[{name:"group",query:!0,regex:"("+ll.group+")",populate:function(bt,St,wt){var Nt=xt(wt,1),Pt=Nt[0];St.checks.push({type:rs.GROUP,value:Pt==="*"?Pt:Pt+"s"})}},{name:"state",query:!0,regex:H0,populate:function(bt,St,wt){var Nt=xt(wt,1),Pt=Nt[0];St.checks.push({type:rs.STATE,value:Pt})}},{name:"id",query:!0,regex:"\\#("+ll.id+")",populate:function(bt,St,wt){var Nt=xt(wt,1),Pt=Nt[0];St.checks.push({type:rs.ID,value:Tu(Pt)})}},{name:"className",query:!0,regex:"\\.("+ll.className+")",populate:function(bt,St,wt){var Nt=xt(wt,1),Pt=Nt[0];St.checks.push({type:rs.CLASS,value:Tu(Pt)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+ll.variable+")\\s*\\]",populate:function(bt,St,wt){var Nt=xt(wt,1),Pt=Nt[0];St.checks.push({type:rs.DATA_EXIST,field:Tu(Pt)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+ll.variable+")\\s*("+ll.comparatorOp+")\\s*("+ll.value+")\\s*\\]",populate:function(bt,St,wt){var Nt=xt(wt,3),Pt=Nt[0],Lt=Nt[1],Ht=Nt[2],qt=new RegExp("^"+ll.string+"$").exec(Ht)!=null;qt?Ht=Ht.substring(1,Ht.length-1):Ht=parseFloat(Ht),St.checks.push({type:rs.DATA_COMPARE,field:Tu(Pt),operator:Lt,value:Ht})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+ll.boolOp+")\\s*("+ll.variable+")\\s*\\]",populate:function(bt,St,wt){var Nt=xt(wt,2),Pt=Nt[0],Lt=Nt[1];St.checks.push({type:rs.DATA_BOOL,field:Tu(Lt),operator:Pt})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+ll.meta+")\\s*("+ll.comparatorOp+")\\s*("+ll.number+")\\s*\\]\\]",populate:function(bt,St,wt){var Nt=xt(wt,3),Pt=Nt[0],Lt=Nt[1],Ht=Nt[2];St.checks.push({type:rs.META_COMPARE,field:Tu(Pt),operator:Lt,value:parseFloat(Ht)})}},{name:"nextQuery",separator:!0,regex:ll.separator,populate:function(bt,St){var wt=bt.currentSubject,Nt=bt.edgeCount,Pt=bt.compoundCount,Lt=bt[bt.length-1];wt!=null&&(Lt.subject=wt,bt.currentSubject=null),Lt.edgeCount=Nt,Lt.compoundCount=Pt,bt.edgeCount=0,bt.compoundCount=0;var Ht=bt[bt.length++]=Cl();return Ht}},{name:"directedEdge",separator:!0,regex:ll.directedEdge,populate:function(bt,St){if(bt.currentSubject==null){var wt=Cl(),Nt=St,Pt=Cl();return wt.checks.push({type:rs.DIRECTED_EDGE,source:Nt,target:Pt}),Pu(bt,St,wt),bt.edgeCount++,Pt}else{var Lt=Cl(),Ht=St,qt=Cl();return Lt.checks.push({type:rs.NODE_SOURCE,source:Ht,target:qt}),Pu(bt,St,Lt),bt.edgeCount++,qt}}},{name:"undirectedEdge",separator:!0,regex:ll.undirectedEdge,populate:function(bt,St){if(bt.currentSubject==null){var wt=Cl(),Nt=St,Pt=Cl();return wt.checks.push({type:rs.UNDIRECTED_EDGE,nodes:[Nt,Pt]}),Pu(bt,St,wt),bt.edgeCount++,Pt}else{var Lt=Cl(),Ht=St,qt=Cl();return Lt.checks.push({type:rs.NODE_NEIGHBOR,node:Ht,neighbor:qt}),Pu(bt,St,Lt),qt}}},{name:"child",separator:!0,regex:ll.child,populate:function(bt,St){if(bt.currentSubject==null){var wt=Cl(),Nt=Cl(),Pt=bt[bt.length-1];return wt.checks.push({type:rs.CHILD,parent:Pt,child:Nt}),Pu(bt,St,wt),bt.compoundCount++,Nt}else if(bt.currentSubject===St){var Lt=Cl(),Ht=bt[bt.length-1],qt=Cl(),Gt=Cl(),Qt=Cl(),hn=Cl();return Lt.checks.push({type:rs.COMPOUND_SPLIT,left:Ht,right:qt,subject:Gt}),Gt.checks=St.checks,St.checks=[{type:rs.TRUE}],hn.checks.push({type:rs.TRUE}),qt.checks.push({type:rs.PARENT,parent:hn,child:Qt}),Pu(bt,Ht,Lt),bt.currentSubject=Gt,bt.compoundCount++,Qt}else{var yn=Cl(),xn=Cl(),bn=[{type:rs.PARENT,parent:yn,child:xn}];return yn.checks=St.checks,St.checks=bn,bt.compoundCount++,xn}}},{name:"descendant",separator:!0,regex:ll.descendant,populate:function(bt,St){if(bt.currentSubject==null){var wt=Cl(),Nt=Cl(),Pt=bt[bt.length-1];return wt.checks.push({type:rs.DESCENDANT,ancestor:Pt,descendant:Nt}),Pu(bt,St,wt),bt.compoundCount++,Nt}else if(bt.currentSubject===St){var Lt=Cl(),Ht=bt[bt.length-1],qt=Cl(),Gt=Cl(),Qt=Cl(),hn=Cl();return Lt.checks.push({type:rs.COMPOUND_SPLIT,left:Ht,right:qt,subject:Gt}),Gt.checks=St.checks,St.checks=[{type:rs.TRUE}],hn.checks.push({type:rs.TRUE}),qt.checks.push({type:rs.ANCESTOR,ancestor:hn,descendant:Qt}),Pu(bt,Ht,Lt),bt.currentSubject=Gt,bt.compoundCount++,Qt}else{var yn=Cl(),xn=Cl(),bn=[{type:rs.ANCESTOR,ancestor:yn,descendant:xn}];return yn.checks=St.checks,St.checks=bn,bt.compoundCount++,xn}}},{name:"subject",modifier:!0,regex:ll.subject,populate:function(bt,St){if(bt.currentSubject!=null&&bt.currentSubject!==St)return As("Redefinition of subject in selector `"+bt.toString()+"`"),!1;bt.currentSubject=St;var wt=bt[bt.length-1],Nt=wt.checks[0],Pt=Nt==null?null:Nt.type;Pt===rs.DIRECTED_EDGE?Nt.type=rs.NODE_TARGET:Pt===rs.UNDIRECTED_EDGE&&(Nt.type=rs.NODE_NEIGHBOR,Nt.node=Nt.nodes[1],Nt.neighbor=Nt.nodes[0],Nt.nodes=null)}}];Qp.forEach(function(_t){return _t.regexObj=new RegExp("^"+_t.regex)});var Xm=function(bt){for(var St,wt,Nt,Pt=0;Pt<Qp.length;Pt++){var Lt=Qp[Pt],Ht=Lt.name,qt=bt.match(Lt.regexObj);if(qt!=null){wt=qt,St=Lt,Nt=Ht;var Gt=qt[0];bt=bt.substring(Gt.length);break}}return{expr:St,match:wt,name:Nt,remaining:bt}},Q1=function(bt){var St=bt.match(/^\s+/);if(St){var wt=St[0];bt=bt.substring(wt.length)}return bt},Dv=function(bt){var St=this,wt=St.inputText=bt,Nt=St[0]=Cl();for(St.length=1,wt=Q1(wt);;){var Pt=Xm(wt);if(Pt.expr==null)return As("The selector `"+bt+"`is invalid"),!1;var Lt=Pt.match.slice(1),Ht=Pt.expr.populate(St,Nt,Lt);if(Ht===!1)return!1;if(Ht!=null&&(Nt=Ht),wt=Pt.remaining,wt.match(/^\s*$/))break}var qt=St[St.length-1];St.currentSubject!=null&&(qt.subject=St.currentSubject),qt.edgeCount=St.edgeCount,qt.compoundCount=St.compoundCount;for(var Gt=0;Gt<St.length;Gt++){var Qt=St[Gt];if(Qt.compoundCount>0&&Qt.edgeCount>0)return As("The selector `"+bt+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(Qt.edgeCount>1)return As("The selector `"+bt+"` is invalid because it uses multiple edge selectors"),!1;Qt.edgeCount===1&&As("The selector `"+bt+"` is deprecated.  Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons.  Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},U0=function(){if(this.toStringCache!=null)return this.toStringCache;for(var bt=function(Qt){return Qt??""},St=function(Qt){return Ut(Qt)?'"'+Qt+'"':bt(Qt)},wt=function(Qt){return" "+Qt+" "},Nt=function(Qt,hn){var yn=Qt.type,xn=Qt.value;switch(yn){case rs.GROUP:{var bn=bt(xn);return bn.substring(0,bn.length-1)}case rs.DATA_COMPARE:{var Nn=Qt.field,Pn=Qt.operator;return"["+Nn+wt(bt(Pn))+St(xn)+"]"}case rs.DATA_BOOL:{var Fn=Qt.operator,Un=Qt.field;return"["+bt(Fn)+Un+"]"}case rs.DATA_EXIST:{var Hn=Qt.field;return"["+Hn+"]"}case rs.META_COMPARE:{var nr=Qt.operator,mr=Qt.field;return"[["+mr+wt(bt(nr))+St(xn)+"]]"}case rs.STATE:return xn;case rs.ID:return"#"+xn;case rs.CLASS:return"."+xn;case rs.PARENT:case rs.CHILD:return Pt(Qt.parent,hn)+wt(">")+Pt(Qt.child,hn);case rs.ANCESTOR:case rs.DESCENDANT:return Pt(Qt.ancestor,hn)+" "+Pt(Qt.descendant,hn);case rs.COMPOUND_SPLIT:{var gr=Pt(Qt.left,hn),rr=Pt(Qt.subject,hn),hr=Pt(Qt.right,hn);return gr+(gr.length>0?" ":"")+rr+hr}case rs.TRUE:return""}},Pt=function(Qt,hn){return Qt.checks.reduce(function(yn,xn,bn){return yn+(hn===Qt&&bn===0?"$":"")+Nt(xn,hn)},"")},Lt="",Ht=0;Ht<this.length;Ht++){var qt=this[Ht];Lt+=Pt(qt,qt.subject),this.length>1&&Ht<this.length-1&&(Lt+=", ")}return this.toStringCache=Lt,Lt},Nv={parse:Dv,toString:U0},Wy=function(bt,St,wt){var Nt,Pt=Ut(bt),Lt=sn(bt),Ht=Ut(wt),qt,Gt,Qt=!1,hn=!1,yn=!1;switch(St.indexOf("!")>=0&&(St=St.replace("!",""),hn=!0),St.indexOf("@")>=0&&(St=St.replace("@",""),Qt=!0),(Pt||Ht||Qt)&&(qt=!Pt&&!Lt?"":""+bt,Gt=""+wt),Qt&&(bt=qt=qt.toLowerCase(),wt=Gt=Gt.toLowerCase()),St){case"*=":Nt=qt.indexOf(Gt)>=0;break;case"$=":Nt=qt.indexOf(Gt,qt.length-Gt.length)>=0;break;case"^=":Nt=qt.indexOf(Gt)===0;break;case"=":Nt=bt===wt;break;case">":yn=!0,Nt=bt>wt;break;case">=":yn=!0,Nt=bt>=wt;break;case"<":yn=!0,Nt=bt<wt;break;case"<=":yn=!0,Nt=bt<=wt;break;default:Nt=!1;break}return hn&&(bt!=null||!yn)&&(Nt=!Nt),Nt},jy=function(bt,St){switch(St){case"?":return!!bt;case"!":return!bt;case"^":return bt===void 0}},Zm=function(bt){return bt!==void 0},Jp=function(bt,St){return bt.data(St)},Hy=function(bt,St){return bt[St]()},Tn=[],vl=function(bt,St){return bt.checks.every(function(wt){return Tn[wt.type](wt,St)})};Tn[rs.GROUP]=function(_t,bt){var St=_t.value;return St==="*"||St===bt.group()},Tn[rs.STATE]=function(_t,bt){var St=_t.value;return K1(St,bt)},Tn[rs.ID]=function(_t,bt){var St=_t.value;return bt.id()===St},Tn[rs.CLASS]=function(_t,bt){var St=_t.value;return bt.hasClass(St)},Tn[rs.META_COMPARE]=function(_t,bt){var St=_t.field,wt=_t.operator,Nt=_t.value;return Wy(Hy(bt,St),wt,Nt)},Tn[rs.DATA_COMPARE]=function(_t,bt){var St=_t.field,wt=_t.operator,Nt=_t.value;return Wy(Jp(bt,St),wt,Nt)},Tn[rs.DATA_BOOL]=function(_t,bt){var St=_t.field,wt=_t.operator;return jy(Jp(bt,St),wt)},Tn[rs.DATA_EXIST]=function(_t,bt){var St=_t.field;return _t.operator,Zm(Jp(bt,St))},Tn[rs.UNDIRECTED_EDGE]=function(_t,bt){var St=_t.nodes[0],wt=_t.nodes[1],Nt=bt.source(),Pt=bt.target();return vl(St,Nt)&&vl(wt,Pt)||vl(wt,Nt)&&vl(St,Pt)},Tn[rs.NODE_NEIGHBOR]=function(_t,bt){return vl(_t.node,bt)&&bt.neighborhood().some(function(St){return St.isNode()&&vl(_t.neighbor,St)})},Tn[rs.DIRECTED_EDGE]=function(_t,bt){return vl(_t.source,bt.source())&&vl(_t.target,bt.target())},Tn[rs.NODE_SOURCE]=function(_t,bt){return vl(_t.source,bt)&&bt.outgoers().some(function(St){return St.isNode()&&vl(_t.target,St)})},Tn[rs.NODE_TARGET]=function(_t,bt){return vl(_t.target,bt)&&bt.incomers().some(function(St){return St.isNode()&&vl(_t.source,St)})},Tn[rs.CHILD]=function(_t,bt){return vl(_t.child,bt)&&vl(_t.parent,bt.parent())},Tn[rs.PARENT]=function(_t,bt){return vl(_t.parent,bt)&&bt.children().some(function(St){return vl(_t.child,St)})},Tn[rs.DESCENDANT]=function(_t,bt){return vl(_t.descendant,bt)&&bt.ancestors().some(function(St){return vl(_t.ancestor,St)})},Tn[rs.ANCESTOR]=function(_t,bt){return vl(_t.ancestor,bt)&&bt.descendants().some(function(St){return vl(_t.descendant,St)})},Tn[rs.COMPOUND_SPLIT]=function(_t,bt){return vl(_t.subject,bt)&&vl(_t.left,bt)&&vl(_t.right,bt)},Tn[rs.TRUE]=function(){return!0},Tn[rs.COLLECTION]=function(_t,bt){var St=_t.value;return St.has(bt)},Tn[rs.FILTER]=function(_t,bt){var St=_t.value;return St(bt)};var J1=function(bt){var St=this;if(St.length===1&&St[0].checks.length===1&&St[0].checks[0].type===rs.ID)return bt.getElementById(St[0].checks[0].value).collection();var wt=function(Pt){for(var Lt=0;Lt<St.length;Lt++){var Ht=St[Lt];if(vl(Ht,Pt))return!0}return!1};return St.text()==null&&(wt=function(){return!0}),bt.filter(wt)},Mu=function(bt){for(var St=this,wt=0;wt<St.length;wt++){var Nt=St[wt];if(vl(Nt,bt))return!0}return!1},nl={matches:Mu,filter:J1},cp=function(bt){this.inputText=bt,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,bt==null||Ut(bt)&&bt.match(/^\s*$/)||(_n(bt)?this.addQuery({checks:[{type:rs.COLLECTION,value:bt.collection()}]}):Xt(bt)?this.addQuery({checks:[{type:rs.FILTER,value:bt}]}):Ut(bt)?this.parse(bt)||(this.invalid=!0):Os("A selector must be created from a string; found "))},Rp=cp.prototype;[Nv,nl].forEach(function(_t){return Qr(Rp,_t)}),Rp.text=function(){return this.inputText},Rp.size=function(){return this.length},Rp.eq=function(_t){return this[_t]},Rp.sameText=function(_t){return!this.invalid&&!_t.invalid&&this.text()===_t.text()},Rp.addQuery=function(_t){this[this.length++]=_t},Rp.selector=Rp.toString;var Ip={allAre:function(bt){var St=new cp(bt);return this.every(function(wt){return St.matches(wt)})},is:function(bt){var St=new cp(bt);return this.some(function(wt){return St.matches(wt)})},some:function(bt,St){for(var wt=0;wt<this.length;wt++){var Nt=St?bt.apply(St,[this[wt],wt,this]):bt(this[wt],wt,this);if(Nt)return!0}return!1},every:function(bt,St){for(var wt=0;wt<this.length;wt++){var Nt=St?bt.apply(St,[this[wt],wt,this]):bt(this[wt],wt,this);if(!Nt)return!1}return!0},same:function(bt){if(this===bt)return!0;bt=this.cy().collection(bt);var St=this.length,wt=bt.length;return St!==wt?!1:St===1?this[0]===bt[0]:this.every(function(Nt){return bt.hasElementWithId(Nt.id())})},anySame:function(bt){return bt=this.cy().collection(bt),this.some(function(St){return bt.hasElementWithId(St.id())})},allAreNeighbors:function(bt){bt=this.cy().collection(bt);var St=this.neighborhood();return bt.every(function(wt){return St.hasElementWithId(wt.id())})},contains:function(bt){bt=this.cy().collection(bt);var St=this;return bt.every(function(wt){return St.hasElementWithId(wt.id())})}};Ip.allAreNeighbours=Ip.allAreNeighbors,Ip.has=Ip.contains,Ip.equal=Ip.equals=Ip.same;var eu=function(bt,St){return function(Nt,Pt,Lt,Ht){var qt=Nt,Gt=this,Qt;if(qt==null?Qt="":_n(qt)&&qt.length===1&&(Qt=qt.id()),Gt.length===1&&Qt){var hn=Gt[0]._private,yn=hn.traversalCache=hn.traversalCache||{},xn=yn[St]=yn[St]||[],bn=io(Qt),Nn=xn[bn];return Nn||(xn[bn]=bt.call(Gt,Nt,Pt,Lt,Ht))}else return bt.call(Gt,Nt,Pt,Lt,Ht)}},v1={parent:function(bt){var St=[];if(this.length===1){var wt=this[0]._private.parent;if(wt)return wt}for(var Nt=0;Nt<this.length;Nt++){var Pt=this[Nt],Lt=Pt._private.parent;Lt&&St.push(Lt)}return this.spawn(St,!0).filter(bt)},parents:function(bt){for(var St=[],wt=this.parent();wt.nonempty();){for(var Nt=0;Nt<wt.length;Nt++){var Pt=wt[Nt];St.push(Pt)}wt=wt.parent()}return this.spawn(St,!0).filter(bt)},commonAncestors:function(bt){for(var St,wt=0;wt<this.length;wt++){var Nt=this[wt],Pt=Nt.parents();St=St||Pt,St=St.intersect(Pt)}return St.filter(bt)},orphans:function(bt){return this.stdFilter(function(St){return St.isOrphan()}).filter(bt)},nonorphans:function(bt){return this.stdFilter(function(St){return St.isChild()}).filter(bt)},children:eu(function(_t){for(var bt=[],St=0;St<this.length;St++)for(var wt=this[St],Nt=wt._private.children,Pt=0;Pt<Nt.length;Pt++)bt.push(Nt[Pt]);return this.spawn(bt,!0).filter(_t)},"children"),siblings:function(bt){return this.parent().children().not(this).filter(bt)},isParent:function(){var bt=this[0];if(bt)return bt.isNode()&&bt._private.children.length!==0},isChildless:function(){var bt=this[0];if(bt)return bt.isNode()&&bt._private.children.length===0},isChild:function(){var bt=this[0];if(bt)return bt.isNode()&&bt._private.parent!=null},isOrphan:function(){var bt=this[0];if(bt)return bt.isNode()&&bt._private.parent==null},descendants:function(bt){var St=[];function wt(Nt){for(var Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt];St.push(Lt),Lt.children().nonempty()&&wt(Lt.children())}}return wt(this.children()),this.spawn(St,!0).filter(bt)}};function Qm(_t,bt,St,wt){for(var Nt=[],Pt=new vp,Lt=_t.cy(),Ht=Lt.hasCompoundNodes(),qt=0;qt<_t.length;qt++){var Gt=_t[qt];St?Nt.push(Gt):Ht&&wt(Nt,Pt,Gt)}for(;Nt.length>0;){var Qt=Nt.shift();bt(Qt),Pt.add(Qt.id()),Ht&&wt(Nt,Pt,Qt)}return _t}function Em(_t,bt,St){if(St.isParent())for(var wt=St._private.children,Nt=0;Nt<wt.length;Nt++){var Pt=wt[Nt];bt.has(Pt.id())||_t.push(Pt)}}v1.forEachDown=function(_t){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Qm(this,_t,bt,Em)};function Uy(_t,bt,St){if(St.isChild()){var wt=St._private.parent;bt.has(wt.id())||_t.push(wt)}}v1.forEachUp=function(_t){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Qm(this,_t,bt,Uy)};function V0(_t,bt,St){Uy(_t,bt,St),Em(_t,bt,St)}v1.forEachUpAndDown=function(_t){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Qm(this,_t,bt,V0)},v1.ancestors=v1.parents;var Fu,Vy;Fu=Vy={data:yl.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:yl.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:yl.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:yl.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:yl.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:yl.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var bt=this[0];if(bt)return bt._private.data.id}},Fu.attr=Fu.data,Fu.removeAttr=Fu.removeData;var kv=Vy,Am={};function xm(_t){return function(bt){var St=this;if(bt===void 0&&(bt=!0),St.length!==0)if(St.isNode()&&!St.removed()){for(var wt=0,Nt=St[0],Pt=Nt._private.edges,Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt];!bt&&Ht.isLoop()||(wt+=_t(Nt,Ht))}return wt}else return}}Qr(Am,{degree:xm(function(_t,bt){return bt.source().same(bt.target())?2:1}),indegree:xm(function(_t,bt){return bt.target().same(_t)?1:0}),outdegree:xm(function(_t,bt){return bt.source().same(_t)?1:0})});function _h(_t,bt){return function(St){for(var wt,Nt=this.nodes(),Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt],Ht=Lt[_t](St);Ht!==void 0&&(wt===void 0||bt(Ht,wt))&&(wt=Ht)}return wt}}Qr(Am,{minDegree:_h("degree",function(_t,bt){return _t<bt}),maxDegree:_h("degree",function(_t,bt){return _t>bt}),minIndegree:_h("indegree",function(_t,bt){return _t<bt}),maxIndegree:_h("indegree",function(_t,bt){return _t>bt}),minOutdegree:_h("outdegree",function(_t,bt){return _t<bt}),maxOutdegree:_h("outdegree",function(_t,bt){return _t>bt})}),Qr(Am,{totalDegree:function(bt){for(var St=0,wt=this.nodes(),Nt=0;Nt<wt.length;Nt++)St+=wt[Nt].degree(bt);return St}});var Ql,Mn,jt=function(bt,St,wt){for(var Nt=0;Nt<bt.length;Nt++){var Pt=bt[Nt];if(!Pt.locked()){var Lt=Pt._private.position,Ht={x:St.x!=null?St.x-Lt.x:0,y:St.y!=null?St.y-Lt.y:0};Pt.isParent()&&!(Ht.x===0&&Ht.y===0)&&Pt.children().shift(Ht,wt),Pt.dirtyBoundingBoxCache()}}},Kt={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(bt){bt.updateCompoundBounds()},beforeSet:function(bt,St){jt(bt,St,!1)},onSet:function(bt){bt.dirtyCompoundBoundsCache()},canSet:function(bt){return!bt.locked()}};Ql=Mn={position:yl.data(Kt),silentPosition:yl.data(Qr({},Kt,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(bt,St){jt(bt,St,!0)},onSet:function(bt){bt.dirtyCompoundBoundsCache()}})),positions:function(bt,St){if(gn(bt))St?this.silentPosition(bt):this.position(bt);else if(Xt(bt)){var wt=bt,Nt=this.cy();Nt.startBatch();for(var Pt=0;Pt<this.length;Pt++){var Lt=this[Pt],Ht=void 0;(Ht=wt(Lt,Pt))&&(St?Lt.silentPosition(Ht):Lt.position(Ht))}Nt.endBatch()}return this},silentPositions:function(bt){return this.positions(bt,!0)},shift:function(bt,St,wt){var Nt;if(gn(bt)?(Nt={x:sn(bt.x)?bt.x:0,y:sn(bt.y)?bt.y:0},wt=St):Ut(bt)&&sn(St)&&(Nt={x:0,y:0},Nt[bt]=St),Nt!=null){var Pt=this.cy();Pt.startBatch();for(var Lt=0;Lt<this.length;Lt++){var Ht=this[Lt];if(!(Pt.hasCompoundNodes()&&Ht.isChild()&&Ht.ancestors().anySame(this))){var qt=Ht.position(),Gt={x:qt.x+Nt.x,y:qt.y+Nt.y};wt?Ht.silentPosition(Gt):Ht.position(Gt)}}Pt.endBatch()}return this},silentShift:function(bt,St){return gn(bt)?this.shift(bt,!0):Ut(bt)&&sn(St)&&this.shift(bt,St,!0),this},renderedPosition:function(bt,St){var wt=this[0],Nt=this.cy(),Pt=Nt.zoom(),Lt=Nt.pan(),Ht=gn(bt)?bt:void 0,qt=Ht!==void 0||St!==void 0&&Ut(bt);if(wt&&wt.isNode())if(qt)for(var Gt=0;Gt<this.length;Gt++){var Qt=this[Gt];St!==void 0?Qt.position(bt,(St-Lt[bt])/Pt):Ht!==void 0&&Qt.position(uu(Ht,Pt,Lt))}else{var hn=wt.position();return Ht=_f(hn,Pt,Lt),bt===void 0?Ht:Ht[bt]}else if(!qt)return;return this},relativePosition:function(bt,St){var wt=this[0],Nt=this.cy(),Pt=gn(bt)?bt:void 0,Lt=Pt!==void 0||St!==void 0&&Ut(bt),Ht=Nt.hasCompoundNodes();if(wt&&wt.isNode())if(Lt)for(var qt=0;qt<this.length;qt++){var Gt=this[qt],Qt=Ht?Gt.parent():null,hn=Qt&&Qt.length>0,yn=hn;hn&&(Qt=Qt[0]);var xn=yn?Qt.position():{x:0,y:0};St!==void 0?Gt.position(bt,St+xn[bt]):Pt!==void 0&&Gt.position({x:Pt.x+xn.x,y:Pt.y+xn.y})}else{var bn=wt.position(),Nn=Ht?wt.parent():null,Pn=Nn&&Nn.length>0,Fn=Pn;Pn&&(Nn=Nn[0]);var Un=Fn?Nn.position():{x:0,y:0};return Pt={x:bn.x-Un.x,y:bn.y-Un.y},bt===void 0?Pt:Pt[bt]}else if(!Lt)return;return this}},Ql.modelPosition=Ql.point=Ql.position,Ql.modelPositions=Ql.points=Ql.positions,Ql.renderedPoint=Ql.renderedPosition,Ql.relativePoint=Ql.relativePosition;var Yt=Mn,mn,Cn;mn=Cn={},Cn.renderedBoundingBox=function(_t){var bt=this.boundingBox(_t),St=this.cy(),wt=St.zoom(),Nt=St.pan(),Pt=bt.x1*wt+Nt.x,Lt=bt.x2*wt+Nt.x,Ht=bt.y1*wt+Nt.y,qt=bt.y2*wt+Nt.y;return{x1:Pt,x2:Lt,y1:Ht,y2:qt,w:Lt-Pt,h:qt-Ht}},Cn.dirtyCompoundBoundsCache=function(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,bt=this.cy();return!bt.styleEnabled()||!bt.hasCompoundNodes()?this:(this.forEachUp(function(St){if(St.isParent()){var wt=St._private;wt.compoundBoundsClean=!1,wt.bbCache=null,_t||St.emitAndNotify("bounds")}}),this)},Cn.updateCompoundBounds=function(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,bt=this.cy();if(!bt.styleEnabled()||!bt.hasCompoundNodes())return this;if(!_t&&bt.batching())return this;function St(Lt){if(!Lt.isParent())return;var Ht=Lt._private,qt=Lt.children(),Gt=Lt.pstyle("compound-sizing-wrt-labels").value==="include",Qt={width:{val:Lt.pstyle("min-width").pfValue,left:Lt.pstyle("min-width-bias-left"),right:Lt.pstyle("min-width-bias-right")},height:{val:Lt.pstyle("min-height").pfValue,top:Lt.pstyle("min-height-bias-top"),bottom:Lt.pstyle("min-height-bias-bottom")}},hn=qt.boundingBox({includeLabels:Gt,includeOverlays:!1,useCache:!1}),yn=Ht.position;(hn.w===0||hn.h===0)&&(hn={w:Lt.pstyle("width").pfValue,h:Lt.pstyle("height").pfValue},hn.x1=yn.x-hn.w/2,hn.x2=yn.x+hn.w/2,hn.y1=yn.y-hn.h/2,hn.y2=yn.y+hn.h/2);function xn(ar,vr,Tr){var dr=0,Sr=0,yr=vr+Tr;return ar>0&&yr>0&&(dr=vr/yr*ar,Sr=Tr/yr*ar),{biasDiff:dr,biasComplementDiff:Sr}}function bn(ar,vr,Tr,dr){if(Tr.units==="%")switch(dr){case"width":return ar>0?Tr.pfValue*ar:0;case"height":return vr>0?Tr.pfValue*vr:0;case"average":return ar>0&&vr>0?Tr.pfValue*(ar+vr)/2:0;case"min":return ar>0&&vr>0?ar>vr?Tr.pfValue*vr:Tr.pfValue*ar:0;case"max":return ar>0&&vr>0?ar>vr?Tr.pfValue*ar:Tr.pfValue*vr:0;default:return 0}else return Tr.units==="px"?Tr.pfValue:0}var Nn=Qt.width.left.value;Qt.width.left.units==="px"&&Qt.width.val>0&&(Nn=Nn*100/Qt.width.val);var Pn=Qt.width.right.value;Qt.width.right.units==="px"&&Qt.width.val>0&&(Pn=Pn*100/Qt.width.val);var Fn=Qt.height.top.value;Qt.height.top.units==="px"&&Qt.height.val>0&&(Fn=Fn*100/Qt.height.val);var Un=Qt.height.bottom.value;Qt.height.bottom.units==="px"&&Qt.height.val>0&&(Un=Un*100/Qt.height.val);var Hn=xn(Qt.width.val-hn.w,Nn,Pn),nr=Hn.biasDiff,mr=Hn.biasComplementDiff,gr=xn(Qt.height.val-hn.h,Fn,Un),rr=gr.biasDiff,hr=gr.biasComplementDiff;Ht.autoPadding=bn(hn.w,hn.h,Lt.pstyle("padding"),Lt.pstyle("padding-relative-to").value),Ht.autoWidth=Math.max(hn.w,Qt.width.val),yn.x=(-nr+hn.x1+hn.x2+mr)/2,Ht.autoHeight=Math.max(hn.h,Qt.height.val),yn.y=(-rr+hn.y1+hn.y2+hr)/2}for(var wt=0;wt<this.length;wt++){var Nt=this[wt],Pt=Nt._private;(!Pt.compoundBoundsClean||_t)&&(St(Nt),bt.batching()||(Pt.compoundBoundsClean=!0))}return this};var kn=function(bt){return bt===1/0||bt===-1/0?0:bt},qn=function(bt,St,wt,Nt,Pt){Nt-St===0||Pt-wt===0||St==null||wt==null||Nt==null||Pt==null||(bt.x1=St<bt.x1?St:bt.x1,bt.x2=Nt>bt.x2?Nt:bt.x2,bt.y1=wt<bt.y1?wt:bt.y1,bt.y2=Pt>bt.y2?Pt:bt.y2,bt.w=bt.x2-bt.x1,bt.h=bt.y2-bt.y1)},er=function(bt,St){return St==null?bt:qn(bt,St.x1,St.y1,St.x2,St.y2)},pr=function(bt,St,wt){return yu(bt,St,wt)},$r=function(bt,St,wt){if(!St.cy().headless()){var Nt=St._private,Pt=Nt.rstyle,Lt=Pt.arrowWidth/2,Ht=St.pstyle(wt+"-arrow-shape").value,qt,Gt;if(Ht!=="none"){wt==="source"?(qt=Pt.srcX,Gt=Pt.srcY):wt==="target"?(qt=Pt.tgtX,Gt=Pt.tgtY):(qt=Pt.midX,Gt=Pt.midY);var Qt=Nt.arrowBounds=Nt.arrowBounds||{},hn=Qt[wt]=Qt[wt]||{};hn.x1=qt-Lt,hn.y1=Gt-Lt,hn.x2=qt+Lt,hn.y2=Gt+Lt,hn.w=hn.x2-hn.x1,hn.h=hn.y2-hn.y1,Qs(hn,1),qn(bt,hn.x1,hn.y1,hn.x2,hn.y2)}}},Mr=function(bt,St,wt){if(!St.cy().headless()){var Nt;wt?Nt=wt+"-":Nt="";var Pt=St._private,Lt=Pt.rstyle,Ht=St.pstyle(Nt+"label").strValue;if(Ht){var qt=St.pstyle("text-halign"),Gt=St.pstyle("text-valign"),Qt=pr(Lt,"labelWidth",wt),hn=pr(Lt,"labelHeight",wt),yn=pr(Lt,"labelX",wt),xn=pr(Lt,"labelY",wt),bn=St.pstyle(Nt+"text-margin-x").pfValue,Nn=St.pstyle(Nt+"text-margin-y").pfValue,Pn=St.isEdge(),Fn=St.pstyle(Nt+"text-rotation"),Un=St.pstyle("text-outline-width").pfValue,Hn=St.pstyle("text-border-width").pfValue,nr=Hn/2,mr=St.pstyle("text-background-padding").pfValue,gr=2,rr=hn,hr=Qt,ar=hr/2,vr=rr/2,Tr,dr,Sr,yr;if(Pn)Tr=yn-ar,dr=yn+ar,Sr=xn-vr,yr=xn+vr;else{switch(qt.value){case"left":Tr=yn-hr,dr=yn;break;case"center":Tr=yn-ar,dr=yn+ar;break;case"right":Tr=yn,dr=yn+hr;break}switch(Gt.value){case"top":Sr=xn-rr,yr=xn;break;case"center":Sr=xn-vr,yr=xn+vr;break;case"bottom":Sr=xn,yr=xn+rr;break}}Tr+=bn-Math.max(Un,nr)-mr-gr,dr+=bn+Math.max(Un,nr)+mr+gr,Sr+=Nn-Math.max(Un,nr)-mr-gr,yr+=Nn+Math.max(Un,nr)+mr+gr;var Fr=wt||"main",_r=Pt.labelBounds,Rr=_r[Fr]=_r[Fr]||{};Rr.x1=Tr,Rr.y1=Sr,Rr.x2=dr,Rr.y2=yr,Rr.w=dr-Tr,Rr.h=yr-Sr;var zr=Pn&&Fn.strValue==="autorotate",Vr=Fn.pfValue!=null&&Fn.pfValue!==0;if(zr||Vr){var ga=zr?pr(Pt.rstyle,"labelAngle",wt):Fn.pfValue,jr=Math.cos(ga),_i=Math.sin(ga),co=(Tr+dr)/2,mo=(Sr+yr)/2;if(!Pn){switch(qt.value){case"left":co=dr;break;case"right":co=Tr;break}switch(Gt.value){case"top":mo=yr;break;case"bottom":mo=Sr;break}}var uo=function(Ss,Wo){return Ss=Ss-co,Wo=Wo-mo,{x:Ss*jr-Wo*_i+co,y:Ss*_i+Wo*jr+mo}},so=uo(Tr,Sr),Br=uo(Tr,yr),fo=uo(dr,Sr),vo=uo(dr,yr);Tr=Math.min(so.x,Br.x,fo.x,vo.x),dr=Math.max(so.x,Br.x,fo.x,vo.x),Sr=Math.min(so.y,Br.y,fo.y,vo.y),yr=Math.max(so.y,Br.y,fo.y,vo.y)}var Io=Fr+"Rot",Fo=_r[Io]=_r[Io]||{};Fo.x1=Tr,Fo.y1=Sr,Fo.x2=dr,Fo.y2=yr,Fo.w=dr-Tr,Fo.h=yr-Sr,qn(bt,Tr,Sr,dr,yr),qn(Pt.labelBounds.all,Tr,Sr,dr,yr)}return bt}},Yr=function(bt,St){var wt=bt._private.cy,Nt=wt.styleEnabled(),Pt=wt.headless(),Lt=Iu(),Ht=bt._private,qt=bt.isNode(),Gt=bt.isEdge(),Qt,hn,yn,xn,bn,Nn,Pn=Ht.rstyle,Fn=qt&&Nt?bt.pstyle("bounds-expansion").pfValue:[0],Un=function(ps){return ps.pstyle("display").value!=="none"},Hn=!Nt||Un(bt)&&(!Gt||Un(bt.source())&&Un(bt.target()));if(Hn){var nr=0,mr=0;Nt&&St.includeOverlays&&(nr=bt.pstyle("overlay-opacity").value,nr!==0&&(mr=bt.pstyle("overlay-padding").value));var gr=0,rr=0;Nt&&St.includeUnderlays&&(gr=bt.pstyle("underlay-opacity").value,gr!==0&&(rr=bt.pstyle("underlay-padding").value));var hr=Math.max(mr,rr),ar=0,vr=0;if(Nt&&(ar=bt.pstyle("width").pfValue,vr=ar/2),qt&&St.includeNodes){var Tr=bt.position();bn=Tr.x,Nn=Tr.y;var dr=bt.outerWidth(),Sr=dr/2,yr=bt.outerHeight(),Fr=yr/2;Qt=bn-Sr,hn=bn+Sr,yn=Nn-Fr,xn=Nn+Fr,qn(Lt,Qt,yn,hn,xn)}else if(Gt&&St.includeEdges)if(Nt&&!Pt){var _r=bt.pstyle("curve-style").strValue;if(Qt=Math.min(Pn.srcX,Pn.midX,Pn.tgtX),hn=Math.max(Pn.srcX,Pn.midX,Pn.tgtX),yn=Math.min(Pn.srcY,Pn.midY,Pn.tgtY),xn=Math.max(Pn.srcY,Pn.midY,Pn.tgtY),Qt-=vr,hn+=vr,yn-=vr,xn+=vr,qn(Lt,Qt,yn,hn,xn),_r==="haystack"){var Rr=Pn.haystackPts;if(Rr&&Rr.length===2){if(Qt=Rr[0].x,yn=Rr[0].y,hn=Rr[1].x,xn=Rr[1].y,Qt>hn){var zr=Qt;Qt=hn,hn=zr}if(yn>xn){var Vr=yn;yn=xn,xn=Vr}qn(Lt,Qt-vr,yn-vr,hn+vr,xn+vr)}}else if(_r==="bezier"||_r==="unbundled-bezier"||_r==="segments"||_r==="taxi"){var ga;switch(_r){case"bezier":case"unbundled-bezier":ga=Pn.bezierPts;break;case"segments":case"taxi":ga=Pn.linePts;break}if(ga!=null)for(var jr=0;jr<ga.length;jr++){var _i=ga[jr];Qt=_i.x-vr,hn=_i.x+vr,yn=_i.y-vr,xn=_i.y+vr,qn(Lt,Qt,yn,hn,xn)}}}else{var co=bt.source(),mo=co.position(),uo=bt.target(),so=uo.position();if(Qt=mo.x,hn=so.x,yn=mo.y,xn=so.y,Qt>hn){var Br=Qt;Qt=hn,hn=Br}if(yn>xn){var fo=yn;yn=xn,xn=fo}Qt-=vr,hn+=vr,yn-=vr,xn+=vr,qn(Lt,Qt,yn,hn,xn)}if(Nt&&St.includeEdges&&Gt&&($r(Lt,bt,"mid-source"),$r(Lt,bt,"mid-target"),$r(Lt,bt,"source"),$r(Lt,bt,"target")),Nt){var vo=bt.pstyle("ghost").value==="yes";if(vo){var Io=bt.pstyle("ghost-offset-x").pfValue,Fo=bt.pstyle("ghost-offset-y").pfValue;qn(Lt,Lt.x1+Io,Lt.y1+Fo,Lt.x2+Io,Lt.y2+Fo)}}var Is=Ht.bodyBounds=Ht.bodyBounds||{};xy(Is,Lt),b0(Is,Fn),Qs(Is,1),Nt&&(Qt=Lt.x1,hn=Lt.x2,yn=Lt.y1,xn=Lt.y2,qn(Lt,Qt-hr,yn-hr,hn+hr,xn+hr));var Ss=Ht.overlayBounds=Ht.overlayBounds||{};xy(Ss,Lt),b0(Ss,Fn),Qs(Ss,1);var Wo=Ht.labelBounds=Ht.labelBounds||{};Wo.all!=null?Wm(Wo.all):Wo.all=Iu(),Nt&&St.includeLabels&&(St.includeMainLabels&&Mr(Lt,bt,null),Gt&&(St.includeSourceLabels&&Mr(Lt,bt,"source"),St.includeTargetLabels&&Mr(Lt,bt,"target")))}return Lt.x1=kn(Lt.x1),Lt.y1=kn(Lt.y1),Lt.x2=kn(Lt.x2),Lt.y2=kn(Lt.y2),Lt.w=kn(Lt.x2-Lt.x1),Lt.h=kn(Lt.y2-Lt.y1),Lt.w>0&&Lt.h>0&&Hn&&(b0(Lt,Fn),Qs(Lt,1)),Lt},ho=function(bt){var St=0,wt=function(Lt){return(Lt?1:0)<<St++},Nt=0;return Nt+=wt(bt.incudeNodes),Nt+=wt(bt.includeEdges),Nt+=wt(bt.includeLabels),Nt+=wt(bt.includeMainLabels),Nt+=wt(bt.includeSourceLabels),Nt+=wt(bt.includeTargetLabels),Nt+=wt(bt.includeOverlays),Nt},wo=function(bt){if(bt.isEdge()){var St=bt.source().position(),wt=bt.target().position(),Nt=function(Lt){return Math.round(Lt)};return Go([Nt(St.x),Nt(St.y),Nt(wt.x),Nt(wt.y)])}else return 0},Mo=function(bt,St){var wt=bt._private,Nt,Pt=bt.isEdge(),Lt=St==null?Ms:ho(St),Ht=Lt===Ms,qt=wo(bt),Gt=wt.bbCachePosKey===qt,Qt=St.useCache&&Gt,hn=function(Nn){return Nn._private.bbCache==null||Nn._private.styleDirty},yn=!Qt||hn(bt)||Pt&&hn(bt.source())||hn(bt.target());if(yn?(Gt||bt.recalculateRenderedStyle(Qt),Nt=Yr(bt,os),wt.bbCache=Nt,wt.bbCachePosKey=qt):Nt=wt.bbCache,!Ht){var xn=bt.isNode();Nt=Iu(),(St.includeNodes&&xn||St.includeEdges&&!xn)&&(St.includeOverlays?er(Nt,wt.overlayBounds):er(Nt,wt.bodyBounds)),St.includeLabels&&(St.includeMainLabels&&(!Pt||St.includeSourceLabels&&St.includeTargetLabels)?er(Nt,wt.labelBounds.all):(St.includeMainLabels&&er(Nt,wt.labelBounds.mainRot),St.includeSourceLabels&&er(Nt,wt.labelBounds.sourceRot),St.includeTargetLabels&&er(Nt,wt.labelBounds.targetRot))),Nt.w=Nt.x2-Nt.x1,Nt.h=Nt.y2-Nt.y1}return Nt},os={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,useCache:!0},Ms=ho(os),Fs=Rs(os);Cn.boundingBox=function(_t){var bt;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(_t===void 0||_t.useCache===void 0||_t.useCache===!0))_t===void 0?_t=os:_t=Fs(_t),bt=Mo(this[0],_t);else{bt=Iu(),_t=_t||os;var St=Fs(_t),wt=this,Nt=wt.cy(),Pt=Nt.styleEnabled();if(Pt)for(var Lt=0;Lt<wt.length;Lt++){var Ht=wt[Lt],qt=Ht._private,Gt=wo(Ht),Qt=qt.bbCachePosKey===Gt,hn=St.useCache&&Qt&&!qt.styleDirty;Ht.recalculateRenderedStyle(hn)}this.updateCompoundBounds(!_t.useCache);for(var yn=0;yn<wt.length;yn++){var xn=wt[yn];er(bt,Mo(xn,St))}}return bt.x1=kn(bt.x1),bt.y1=kn(bt.y1),bt.x2=kn(bt.x2),bt.y2=kn(bt.y2),bt.w=kn(bt.x2-bt.x1),bt.h=kn(bt.y2-bt.y1),bt},Cn.dirtyBoundingBoxCache=function(){for(var _t=0;_t<this.length;_t++){var bt=this[_t]._private;bt.bbCache=null,bt.bbCachePosKey=null,bt.bodyBounds=null,bt.overlayBounds=null,bt.labelBounds.all=null,bt.labelBounds.source=null,bt.labelBounds.target=null,bt.labelBounds.main=null,bt.labelBounds.sourceRot=null,bt.labelBounds.targetRot=null,bt.labelBounds.mainRot=null,bt.arrowBounds.source=null,bt.arrowBounds.target=null,bt.arrowBounds["mid-source"]=null,bt.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},Cn.boundingBoxAt=function(_t){var bt=this.nodes(),St=this.cy(),wt=St.hasCompoundNodes(),Nt=St.collection();if(wt&&(Nt=bt.filter(function(Gt){return Gt.isParent()}),bt=bt.not(Nt)),gn(_t)){var Pt=_t;_t=function(){return Pt}}var Lt=function(Qt,hn){return Qt._private.bbAtOldPos=_t(Qt,hn)},Ht=function(Qt){return Qt._private.bbAtOldPos};St.startBatch(),bt.forEach(Lt).silentPositions(_t),wt&&(Nt.dirtyCompoundBoundsCache(),Nt.dirtyBoundingBoxCache(),Nt.updateCompoundBounds(!0));var qt=Ay(this.boundingBox({useCache:!1}));return bt.silentPositions(Ht),wt&&(Nt.dirtyCompoundBoundsCache(),Nt.dirtyBoundingBoxCache(),Nt.updateCompoundBounds(!0)),St.endBatch(),qt},mn.boundingbox=mn.bb=mn.boundingBox,mn.renderedBoundingbox=mn.renderedBoundingBox;var Ls=Cn,fl,ml;fl=ml={};var Rl=function(bt){bt.uppercaseName=Nr(bt.name),bt.autoName="auto"+bt.uppercaseName,bt.labelName="label"+bt.uppercaseName,bt.outerName="outer"+bt.uppercaseName,bt.uppercaseOuterName=Nr(bt.outerName),fl[bt.name]=function(){var wt=this[0],Nt=wt._private,Pt=Nt.cy,Lt=Pt._private.styleEnabled;if(wt)if(Lt){if(wt.isParent())return wt.updateCompoundBounds(),Nt[bt.autoName]||0;var Ht=wt.pstyle(bt.name);switch(Ht.strValue){case"label":return wt.recalculateRenderedStyle(),Nt.rstyle[bt.labelName]||0;default:return Ht.pfValue}}else return 1},fl["outer"+bt.uppercaseName]=function(){var wt=this[0],Nt=wt._private,Pt=Nt.cy,Lt=Pt._private.styleEnabled;if(wt)if(Lt){var Ht=wt[bt.name](),qt=wt.pstyle("border-width").pfValue,Gt=2*wt.padding();return Ht+qt+Gt}else return 1},fl["rendered"+bt.uppercaseName]=function(){var wt=this[0];if(wt){var Nt=wt[bt.name]();return Nt*this.cy().zoom()}},fl["rendered"+bt.uppercaseOuterName]=function(){var wt=this[0];if(wt){var Nt=wt[bt.outerName]();return Nt*this.cy().zoom()}}};Rl({name:"width"}),Rl({name:"height"}),ml.padding=function(){var _t=this[0],bt=_t._private;return _t.isParent()?(_t.updateCompoundBounds(),bt.autoPadding!==void 0?bt.autoPadding:_t.pstyle("padding").pfValue):_t.pstyle("padding").pfValue},ml.paddedHeight=function(){var _t=this[0];return _t.height()+2*_t.padding()},ml.paddedWidth=function(){var _t=this[0];return _t.width()+2*_t.padding()};var Ml=ml,Al=function(bt,St){if(bt.isEdge())return St(bt)},tu=function(bt,St){if(bt.isEdge()){var wt=bt.cy();return _f(St(bt),wt.zoom(),wt.pan())}},zl=function(bt,St){if(bt.isEdge()){var wt=bt.cy(),Nt=wt.pan(),Pt=wt.zoom();return St(bt).map(function(Lt){return _f(Lt,Pt,Nt)})}},Ks=function(bt){return bt.renderer().getControlPoints(bt)},Xu=function(bt){return bt.renderer().getSegmentPoints(bt)},Dp=function(bt){return bt.renderer().getSourceEndpoint(bt)},Zu=function(bt){return bt.renderer().getTargetEndpoint(bt)},Yl=function(bt){return bt.renderer().getEdgeMidpoint(bt)},fu={controlPoints:{get:Ks,mult:!0},segmentPoints:{get:Xu,mult:!0},sourceEndpoint:{get:Dp},targetEndpoint:{get:Zu},midpoint:{get:Yl}},dp=function(bt){return"rendered"+bt[0].toUpperCase()+bt.substr(1)},Gy=Object.keys(fu).reduce(function(_t,bt){var St=fu[bt],wt=dp(bt);return _t[bt]=function(){return Al(this,St.get)},St.mult?_t[wt]=function(){return zl(this,St.get)}:_t[wt]=function(){return tu(this,St.get)},_t},{}),Jm=Qr({},Yt,Ls,Ml,Gy);/*!
	Event object based on jQuery events, MIT license

	https://jquery.org/license/
	https://tldrlegal.com/license/mit-license
	https://github.com/jquery/jquery/blob/master/src/event.js
	*/var b1=function(bt,St){this.recycle(bt,St)};function np(){return!1}function kl(){return!0}b1.prototype={instanceString:function(){return"event"},recycle:function(bt,St){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=np,bt!=null&&bt.preventDefault?(this.type=bt.type,this.isDefaultPrevented=bt.defaultPrevented?kl:np):bt!=null&&bt.type?St=bt:this.type=bt,St!=null&&(this.originalEvent=St.originalEvent,this.type=St.type!=null?St.type:this.type,this.cy=St.cy,this.target=St.target,this.position=St.position,this.renderedPosition=St.renderedPosition,this.namespace=St.namespace,this.layout=St.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var wt=this.position,Nt=this.cy.zoom(),Pt=this.cy.pan();this.renderedPosition={x:wt.x*Nt+Pt.x,y:wt.y*Nt+Pt.y}}this.timeStamp=bt&&bt.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=kl;var bt=this.originalEvent;!bt||bt.preventDefault&&bt.preventDefault()},stopPropagation:function(){this.isPropagationStopped=kl;var bt=this.originalEvent;!bt||bt.stopPropagation&&bt.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=kl,this.stopPropagation()},isDefaultPrevented:np,isPropagationStopped:np,isImmediatePropagationStopped:np};var T1=/^([^.]+)(\.(?:[^.]+))?$/,Cm=".*",rp={qualifierCompare:function(bt,St){return bt===St},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(bt){return bt},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},e0=Object.keys(rp),n0={};function Qu(){for(var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n0,bt=arguments.length>1?arguments[1]:void 0,St=0;St<e0.length;St++){var wt=e0[St];this[wt]=_t[wt]||rp[wt]}this.context=bt||this.context,this.listeners=[],this.emitting=0}var fp=Qu.prototype,au=function(bt,St,wt,Nt,Pt,Lt,Ht){Xt(Nt)&&(Pt=Nt,Nt=null),Ht&&(Lt==null?Lt=Ht:Lt=Qr({},Lt,Ht));for(var qt=Jt(wt)?wt:wt.split(/\s+/),Gt=0;Gt<qt.length;Gt++){var Qt=qt[Gt];if(!Gn(Qt)){var hn=Qt.match(T1);if(hn){var yn=hn[1],xn=hn[2]?hn[2]:null,bn=St(bt,Qt,yn,xn,Nt,Pt,Lt);if(bn===!1)break}}}},Sm=function(bt,St){return bt.addEventFields(bt.context,St),new b1(St.type,St)},r0=function(bt,St,wt){if($n(wt)){St(bt,wt);return}else if(gn(wt)){St(bt,Sm(bt,wt));return}for(var Nt=Jt(wt)?wt:wt.split(/\s+/),Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt];if(!Gn(Lt)){var Ht=Lt.match(T1);if(Ht){var qt=Ht[1],Gt=Ht[2]?Ht[2]:null,Qt=Sm(bt,{type:qt,namespace:Gt,target:bt.context});St(bt,Qt)}}}};fp.on=fp.addListener=function(_t,bt,St,wt,Nt){return au(this,function(Pt,Lt,Ht,qt,Gt,Qt,hn){Xt(Qt)&&Pt.listeners.push({event:Lt,callback:Qt,type:Ht,namespace:qt,qualifier:Gt,conf:hn})},_t,bt,St,wt,Nt),this},fp.one=function(_t,bt,St,wt){return this.on(_t,bt,St,wt,{one:!0})},fp.removeListener=fp.off=function(_t,bt,St,wt){var Nt=this;this.emitting!==0&&(this.listeners=Ul(this.listeners));for(var Pt=this.listeners,Lt=function(Gt){var Qt=Pt[Gt];au(Nt,function(hn,yn,xn,bn,Nn,Pn){if((Qt.type===xn||_t==="*")&&(!bn&&Qt.namespace!==".*"||Qt.namespace===bn)&&(!Nn||hn.qualifierCompare(Qt.qualifier,Nn))&&(!Pn||Qt.callback===Pn))return Pt.splice(Gt,1),!1},_t,bt,St,wt)},Ht=Pt.length-1;Ht>=0;Ht--)Lt(Ht);return this},fp.removeAllListeners=function(){return this.removeListener("*")},fp.emit=fp.trigger=function(_t,bt,St){var wt=this.listeners,Nt=wt.length;return this.emitting++,Jt(bt)||(bt=[bt]),r0(this,function(Pt,Lt){St!=null&&(wt=[{event:Lt.event,type:Lt.type,namespace:Lt.namespace,callback:St}],Nt=wt.length);for(var Ht=function(Qt){var hn=wt[Qt];if(hn.type===Lt.type&&(!hn.namespace||hn.namespace===Lt.namespace||hn.namespace===Cm)&&Pt.eventMatches(Pt.context,hn,Lt)){var yn=[Lt];bt!=null&&um(yn,bt),Pt.beforeEmit(Pt.context,hn,Lt),hn.conf&&hn.conf.one&&(Pt.listeners=Pt.listeners.filter(function(Nn){return Nn!==hn}));var xn=Pt.callbackContext(Pt.context,hn,Lt),bn=hn.callback.apply(xn,yn);Pt.afterEmit(Pt.context,hn,Lt),bn===!1&&(Lt.stopPropagation(),Lt.preventDefault())}},qt=0;qt<Nt;qt++)Ht(qt);Pt.bubble(Pt.context)&&!Lt.isPropagationStopped()&&Pt.parent(Pt.context).emit(Lt,bt)},_t),this.emitting--,this};var f2={qualifierCompare:function(bt,St){return bt==null||St==null?bt==null&&St==null:bt.sameText(St)},eventMatches:function(bt,St,wt){var Nt=St.qualifier;return Nt!=null?bt!==wt.target&&En(wt.target)&&Nt.matches(wt.target):!0},addEventFields:function(bt,St){St.cy=bt.cy(),St.target=bt},callbackContext:function(bt,St,wt){return St.qualifier!=null?wt.target:bt},beforeEmit:function(bt,St){St.conf&&St.conf.once&&St.conf.onceCollection.removeListener(St.event,St.qualifier,St.callback)},bubble:function(){return!0},parent:function(bt){return bt.isChild()?bt.parent():bt.cy()}},qy=function(bt){return Ut(bt)?new cp(bt):bt},Ky={createEmitter:function(){for(var bt=0;bt<this.length;bt++){var St=this[bt],wt=St._private;wt.emitter||(wt.emitter=new Qu(f2,St))}return this},emitter:function(){return this._private.emitter},on:function(bt,St,wt){for(var Nt=qy(St),Pt=0;Pt<this.length;Pt++){var Lt=this[Pt];Lt.emitter().on(bt,Nt,wt)}return this},removeListener:function(bt,St,wt){for(var Nt=qy(St),Pt=0;Pt<this.length;Pt++){var Lt=this[Pt];Lt.emitter().removeListener(bt,Nt,wt)}return this},removeAllListeners:function(){for(var bt=0;bt<this.length;bt++){var St=this[bt];St.emitter().removeAllListeners()}return this},one:function(bt,St,wt){for(var Nt=qy(St),Pt=0;Pt<this.length;Pt++){var Lt=this[Pt];Lt.emitter().one(bt,Nt,wt)}return this},once:function(bt,St,wt){for(var Nt=qy(St),Pt=0;Pt<this.length;Pt++){var Lt=this[Pt];Lt.emitter().on(bt,Nt,wt,{once:!0,onceCollection:this})}},emit:function(bt,St){for(var wt=0;wt<this.length;wt++){var Nt=this[wt];Nt.emitter().emit(bt,St)}return this},emitAndNotify:function(bt,St){if(this.length!==0)return this.cy().notify(bt,this),this.emit(bt,St),this}};yl.eventAliasesOn(Ky);var lT={nodes:function(bt){return this.filter(function(St){return St.isNode()}).filter(bt)},edges:function(bt){return this.filter(function(St){return St.isEdge()}).filter(bt)},byGroup:function(){for(var bt=this.spawn(),St=this.spawn(),wt=0;wt<this.length;wt++){var Nt=this[wt];Nt.isNode()?bt.push(Nt):St.push(Nt)}return{nodes:bt,edges:St}},filter:function(bt,St){if(bt===void 0)return this;if(Ut(bt)||_n(bt))return new cp(bt).filter(this);if(Xt(bt)){for(var wt=this.spawn(),Nt=this,Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt],Ht=St?bt.apply(St,[Lt,Pt,Nt]):bt(Lt,Pt,Nt);Ht&&wt.push(Lt)}return wt}return this.spawn()},not:function(bt){if(bt){Ut(bt)&&(bt=this.filter(bt));for(var St=this.spawn(),wt=0;wt<this.length;wt++){var Nt=this[wt],Pt=bt.has(Nt);Pt||St.push(Nt)}return St}else return this},absoluteComplement:function(){var bt=this.cy();return bt.mutableElements().not(this)},intersect:function(bt){if(Ut(bt)){var St=bt;return this.filter(St)}for(var wt=this.spawn(),Nt=this,Pt=bt,Lt=this.length<bt.length,Ht=Lt?Nt:Pt,qt=Lt?Pt:Nt,Gt=0;Gt<Ht.length;Gt++){var Qt=Ht[Gt];qt.has(Qt)&&wt.push(Qt)}return wt},xor:function(bt){var St=this._private.cy;Ut(bt)&&(bt=St.$(bt));var wt=this.spawn(),Nt=this,Pt=bt,Lt=function(qt,Gt){for(var Qt=0;Qt<qt.length;Qt++){var hn=qt[Qt],yn=hn._private.data.id,xn=Gt.hasElementWithId(yn);xn||wt.push(hn)}};return Lt(Nt,Pt),Lt(Pt,Nt),wt},diff:function(bt){var St=this._private.cy;Ut(bt)&&(bt=St.$(bt));var wt=this.spawn(),Nt=this.spawn(),Pt=this.spawn(),Lt=this,Ht=bt,qt=function(Qt,hn,yn){for(var xn=0;xn<Qt.length;xn++){var bn=Qt[xn],Nn=bn._private.data.id,Pn=hn.hasElementWithId(Nn);Pn?Pt.merge(bn):yn.push(bn)}};return qt(Lt,Ht,wt),qt(Ht,Lt,Nt),{left:wt,right:Nt,both:Pt}},add:function(bt){var St=this._private.cy;if(!bt)return this;if(Ut(bt)){var wt=bt;bt=St.mutableElements().filter(wt)}for(var Nt=this.spawnSelf(),Pt=0;Pt<bt.length;Pt++){var Lt=bt[Pt],Ht=!this.has(Lt);Ht&&Nt.push(Lt)}return Nt},merge:function(bt){var St=this._private,wt=St.cy;if(!bt)return this;if(bt&&Ut(bt)){var Nt=bt;bt=wt.mutableElements().filter(Nt)}for(var Pt=St.map,Lt=0;Lt<bt.length;Lt++){var Ht=bt[Lt],qt=Ht._private.data.id,Gt=!Pt.has(qt);if(Gt){var Qt=this.length++;this[Qt]=Ht,Pt.set(qt,{ele:Ht,index:Qt})}}return this},unmergeAt:function(bt){var St=this[bt],wt=St.id(),Nt=this._private,Pt=Nt.map;this[bt]=void 0,Pt.delete(wt);var Lt=bt===this.length-1;if(this.length>1&&!Lt){var Ht=this.length-1,qt=this[Ht],Gt=qt._private.data.id;this[Ht]=void 0,this[bt]=qt,Pt.set(Gt,{ele:qt,index:bt})}return this.length--,this},unmergeOne:function(bt){bt=bt[0];var St=this._private,wt=bt._private.data.id,Nt=St.map,Pt=Nt.get(wt);if(!Pt)return this;var Lt=Pt.index;return this.unmergeAt(Lt),this},unmerge:function(bt){var St=this._private.cy;if(!bt)return this;if(bt&&Ut(bt)){var wt=bt;bt=St.mutableElements().filter(wt)}for(var Nt=0;Nt<bt.length;Nt++)this.unmergeOne(bt[Nt]);return this},unmergeBy:function(bt){for(var St=this.length-1;St>=0;St--){var wt=this[St];bt(wt)&&this.unmergeAt(St)}return this},map:function(bt,St){for(var wt=[],Nt=this,Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt],Ht=St?bt.apply(St,[Lt,Pt,Nt]):bt(Lt,Pt,Nt);wt.push(Ht)}return wt},reduce:function(bt,St){for(var wt=St,Nt=this,Pt=0;Pt<Nt.length;Pt++)wt=bt(wt,Nt[Pt],Pt,Nt);return wt},max:function(bt,St){for(var wt=-1/0,Nt,Pt=this,Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt],qt=St?bt.apply(St,[Ht,Lt,Pt]):bt(Ht,Lt,Pt);qt>wt&&(wt=qt,Nt=Ht)}return{value:wt,ele:Nt}},min:function(bt,St){for(var wt=1/0,Nt,Pt=this,Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt],qt=St?bt.apply(St,[Ht,Lt,Pt]):bt(Ht,Lt,Pt);qt<wt&&(wt=qt,Nt=Ht)}return{value:wt,ele:Nt}}},ul=lT;ul.u=ul["|"]=ul["+"]=ul.union=ul.or=ul.add,ul["\\"]=ul["!"]=ul["-"]=ul.difference=ul.relativeComplement=ul.subtract=ul.not,ul.n=ul["&"]=ul["."]=ul.and=ul.intersection=ul.intersect,ul["^"]=ul["(+)"]=ul["(-)"]=ul.symmetricDifference=ul.symdiff=ul.xor,ul.fnFilter=ul.filterFn=ul.stdFilter=ul.filter,ul.complement=ul.abscomp=ul.absoluteComplement;var uT={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var bt=this[0];if(bt)return bt._private.group}},cT=function(bt,St){var wt=bt.cy(),Nt=wt.hasCompoundNodes();function Pt(Qt){var hn=Qt.pstyle("z-compound-depth");return hn.value==="auto"?Nt?Qt.zDepth():0:hn.value==="bottom"?-1:hn.value==="top"?Ho:0}var Lt=Pt(bt)-Pt(St);if(Lt!==0)return Lt;function Ht(Qt){var hn=Qt.pstyle("z-index-compare");return hn.value==="auto"&&Qt.isNode()?1:0}var qt=Ht(bt)-Ht(St);if(qt!==0)return qt;var Gt=bt.pstyle("z-index").value-St.pstyle("z-index").value;return Gt!==0?Gt:bt.poolIndex()-St.poolIndex()},Yy={forEach:function(bt,St){if(Xt(bt))for(var wt=this.length,Nt=0;Nt<wt;Nt++){var Pt=this[Nt],Lt=St?bt.apply(St,[Pt,Nt,this]):bt(Pt,Nt,this);if(Lt===!1)break}return this},toArray:function(){for(var bt=[],St=0;St<this.length;St++)bt.push(this[St]);return bt},slice:function(bt,St){var wt=[],Nt=this.length;St==null&&(St=Nt),bt==null&&(bt=0),bt<0&&(bt=Nt+bt),St<0&&(St=Nt+St);for(var Pt=bt;Pt>=0&&Pt<St&&Pt<Nt;Pt++)wt.push(this[Pt]);return this.spawn(wt)},size:function(){return this.length},eq:function(bt){return this[bt]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(bt){if(!Xt(bt))return this;var St=this.toArray().sort(bt);return this.spawn(St)},sortByZIndex:function(){return this.sort(cT)},zDepth:function(){var bt=this[0];if(!!bt){var St=bt._private,wt=St.group;if(wt==="nodes"){var Nt=St.data.parent?bt.parents().size():0;return bt.isParent()?Nt:Ho-1}else{var Pt=St.source,Lt=St.target,Ht=Pt.zDepth(),qt=Lt.zDepth();return Math.max(Ht,qt,0)}}}};Yy.each=Yy.forEach;var G0=function(){var bt="undefined",St=(typeof Symbol>"u"?"undefined":mt(Symbol))!=bt&&mt(Symbol.iterator)!=bt;St&&(Yy[Symbol.iterator]=function(){var wt=this,Nt={value:void 0,done:!1},Pt=0,Lt=this.length;return Et({next:function(){return Pt<Lt?Nt.value=wt[Pt++]:(Nt.value=void 0,Nt.done=!0),Nt}},Symbol.iterator,function(){return this})})};G0();var p2=Rs({nodeDimensionsIncludeLabels:!1}),Xy={layoutDimensions:function(bt){bt=p2(bt);var St;if(!this.takesUpSpace())St={w:0,h:0};else if(bt.nodeDimensionsIncludeLabels){var wt=this.boundingBox();St={w:wt.w,h:wt.h}}else St={w:this.outerWidth(),h:this.outerHeight()};return(St.w===0||St.h===0)&&(St.w=St.h=1),St},layoutPositions:function(bt,St,wt){var Nt=this.nodes().filter(function(mr){return!mr.isParent()}),Pt=this.cy(),Lt=St.eles,Ht=function(gr){return gr.id()},qt=jn(wt,Ht);bt.emit({type:"layoutstart",layout:bt}),bt.animations=[];var Gt=function(gr,rr,hr){var ar={x:rr.x1+rr.w/2,y:rr.y1+rr.h/2},vr={x:(hr.x-ar.x)*gr,y:(hr.y-ar.y)*gr};return{x:ar.x+vr.x,y:ar.y+vr.y}},Qt=St.spacingFactor&&St.spacingFactor!==1,hn=function(){if(!Qt)return null;for(var gr=Iu(),rr=0;rr<Nt.length;rr++){var hr=Nt[rr],ar=qt(hr,rr);gl(gr,ar.x,ar.y)}return gr},yn=hn(),xn=jn(function(mr,gr){var rr=qt(mr,gr);if(Qt){var hr=Math.abs(St.spacingFactor);rr=Gt(hr,yn,rr)}return St.transform!=null&&(rr=St.transform(mr,rr)),rr},Ht);if(St.animate){for(var bn=0;bn<Nt.length;bn++){var Nn=Nt[bn],Pn=xn(Nn,bn),Fn=St.animateFilter==null||St.animateFilter(Nn,bn);if(Fn){var Un=Nn.animation({position:Pn,duration:St.animationDuration,easing:St.animationEasing});bt.animations.push(Un)}else Nn.position(Pn)}if(St.fit){var Hn=Pt.animation({fit:{boundingBox:Lt.boundingBoxAt(xn),padding:St.padding},duration:St.animationDuration,easing:St.animationEasing});bt.animations.push(Hn)}else if(St.zoom!==void 0&&St.pan!==void 0){var nr=Pt.animation({zoom:St.zoom,pan:St.pan,duration:St.animationDuration,easing:St.animationEasing});bt.animations.push(nr)}bt.animations.forEach(function(mr){return mr.play()}),bt.one("layoutready",St.ready),bt.emit({type:"layoutready",layout:bt}),Op.all(bt.animations.map(function(mr){return mr.promise()})).then(function(){bt.one("layoutstop",St.stop),bt.emit({type:"layoutstop",layout:bt})})}else Nt.positions(xn),St.fit&&Pt.fit(St.eles,St.padding),St.zoom!=null&&Pt.zoom(St.zoom),St.pan&&Pt.pan(St.pan),bt.one("layoutready",St.ready),bt.emit({type:"layoutready",layout:bt}),bt.one("layoutstop",St.stop),bt.emit({type:"layoutstop",layout:bt});return this},layout:function(bt){var St=this.cy();return St.makeLayout(Qr({},bt,{eles:this}))}};Xy.createLayout=Xy.makeLayout=Xy.layout;function Zy(_t,bt,St){var wt=St._private,Nt=wt.styleCache=wt.styleCache||[],Pt;return(Pt=Nt[_t])!=null||(Pt=Nt[_t]=bt(St)),Pt}function q0(_t,bt){return _t=io(_t),function(wt){return Zy(_t,bt,wt)}}function Qy(_t,bt){_t=io(_t);var St=function(Nt){return bt.call(Nt)};return function(){var Nt=this[0];if(Nt)return Zy(_t,St,Nt)}}var Eu={recalculateRenderedStyle:function(bt){var St=this.cy(),wt=St.renderer(),Nt=St.styleEnabled();return wt&&Nt&&wt.recalculateRenderedStyle(this,bt),this},dirtyStyleCache:function(){var bt=this.cy(),St=function(Pt){return Pt._private.styleCache=null};if(bt.hasCompoundNodes()){var wt;wt=this.spawnSelf().merge(this.descendants()).merge(this.parents()),wt.merge(wt.connectedEdges()),wt.forEach(St)}else this.forEach(function(Nt){St(Nt),Nt.connectedEdges().forEach(St)});return this},updateStyle:function(bt){var St=this._private.cy;if(!St.styleEnabled())return this;if(St.batching()){var wt=St._private.batchStyleEles;return wt.merge(this),this}var Nt=St.hasCompoundNodes(),Pt=this;bt=!!(bt||bt===void 0),Nt&&(Pt=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var Lt=Pt;return bt?Lt.emitAndNotify("style"):Lt.emit("style"),Pt.forEach(function(Ht){return Ht._private.styleDirty=!0}),this},cleanStyle:function(){var bt=this.cy();if(!!bt.styleEnabled())for(var St=0;St<this.length;St++){var wt=this[St];wt._private.styleDirty&&(wt._private.styleDirty=!1,bt.style().apply(wt))}},parsedStyle:function(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,wt=this[0],Nt=wt.cy();if(!!Nt.styleEnabled()&&wt){this.cleanStyle();var Pt=wt._private.style[bt];return Pt??(St?Nt.style().getDefaultProperty(bt):null)}},numericStyle:function(bt){var St=this[0];if(!!St.cy().styleEnabled()&&St){var wt=St.pstyle(bt);return wt.pfValue!==void 0?wt.pfValue:wt.value}},numericStyleUnits:function(bt){var St=this[0];if(!!St.cy().styleEnabled()&&St)return St.pstyle(bt).units},renderedStyle:function(bt){var St=this.cy();if(!St.styleEnabled())return this;var wt=this[0];if(wt)return St.style().getRenderedStyle(wt,bt)},style:function(bt,St){var wt=this.cy();if(!wt.styleEnabled())return this;var Nt=!1,Pt=wt.style();if(gn(bt)){var Lt=bt;Pt.applyBypass(this,Lt,Nt),this.emitAndNotify("style")}else if(Ut(bt))if(St===void 0){var Ht=this[0];return Ht?Pt.getStylePropertyValue(Ht,bt):void 0}else Pt.applyBypass(this,bt,St,Nt),this.emitAndNotify("style");else if(bt===void 0){var qt=this[0];return qt?Pt.getRawStyle(qt):void 0}return this},removeStyle:function(bt){var St=this.cy();if(!St.styleEnabled())return this;var wt=!1,Nt=St.style(),Pt=this;if(bt===void 0)for(var Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt];Nt.removeAllBypasses(Ht,wt)}else{bt=bt.split(/\s+/);for(var qt=0;qt<Pt.length;qt++){var Gt=Pt[qt];Nt.removeBypasses(Gt,bt,wt)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var bt=this.cy();if(!bt.styleEnabled())return 1;var St=bt.hasCompoundNodes(),wt=this[0];if(wt){var Nt=wt._private,Pt=wt.pstyle("opacity").value;if(!St)return Pt;var Lt=Nt.data.parent?wt.parents():null;if(Lt)for(var Ht=0;Ht<Lt.length;Ht++){var qt=Lt[Ht],Gt=qt.pstyle("opacity").value;Pt=Gt*Pt}return Pt}},transparent:function(){var bt=this.cy();if(!bt.styleEnabled())return!1;var St=this[0],wt=St.cy().hasCompoundNodes();if(St)return wt?St.effectiveOpacity()===0:St.pstyle("opacity").value===0},backgrounding:function(){var bt=this.cy();if(!bt.styleEnabled())return!1;var St=this[0];return!!St._private.backgrounding}};function Pv(_t,bt){var St=_t._private,wt=St.data.parent?_t.parents():null;if(wt)for(var Nt=0;Nt<wt.length;Nt++){var Pt=wt[Nt];if(!bt(Pt))return!1}return!0}function Jy(_t){var bt=_t.ok,St=_t.edgeOkViaNode||_t.ok,wt=_t.parentOk||_t.ok;return function(){var Nt=this.cy();if(!Nt.styleEnabled())return!0;var Pt=this[0],Lt=Nt.hasCompoundNodes();if(Pt){var Ht=Pt._private;if(!bt(Pt))return!1;if(Pt.isNode())return!Lt||Pv(Pt,wt);var qt=Ht.source,Gt=Ht.target;return St(qt)&&(!Lt||Pv(qt,St))&&(qt===Gt||St(Gt)&&(!Lt||Pv(Gt,St)))}}}var em=q0("eleTakesUpSpace",function(_t){return _t.pstyle("display").value==="element"&&_t.width()!==0&&(_t.isNode()?_t.height()!==0:!0)});Eu.takesUpSpace=Qy("takesUpSpace",Jy({ok:em}));var h2=q0("eleInteractive",function(_t){return _t.pstyle("events").value==="yes"&&_t.pstyle("visibility").value==="visible"&&em(_t)}),Mv=q0("parentInteractive",function(_t){return _t.pstyle("visibility").value==="visible"&&em(_t)});Eu.interactive=Qy("interactive",Jy({ok:h2,parentOk:Mv,edgeOkViaNode:em})),Eu.noninteractive=function(){var _t=this[0];if(_t)return!_t.interactive()};var dT=q0("eleVisible",function(_t){return _t.pstyle("visibility").value==="visible"&&_t.pstyle("opacity").pfValue!==0&&em(_t)}),fT=em;Eu.visible=Qy("visible",Jy({ok:dT,edgeOkViaNode:fT})),Eu.hidden=function(){var _t=this[0];if(_t)return!_t.visible()},Eu.isBundledBezier=Qy("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),Eu.bypass=Eu.css=Eu.style,Eu.renderedCss=Eu.renderedStyle,Eu.removeBypass=Eu.removeCss=Eu.removeStyle,Eu.pstyle=Eu.parsedStyle;var E1={};function K0(_t){return function(){var bt=arguments,St=[];if(bt.length===2){var wt=bt[0],Nt=bt[1];this.on(_t.event,wt,Nt)}else if(bt.length===1&&Xt(bt[0])){var Pt=bt[0];this.on(_t.event,Pt)}else if(bt.length===0||bt.length===1&&Jt(bt[0])){for(var Lt=bt.length===1?bt[0]:null,Ht=0;Ht<this.length;Ht++){var qt=this[Ht],Gt=!_t.ableField||qt._private[_t.ableField],Qt=qt._private[_t.field]!=_t.value;if(_t.overrideAble){var hn=_t.overrideAble(qt);if(hn!==void 0&&(Gt=hn,!hn))return this}Gt&&(qt._private[_t.field]=_t.value,Qt&&St.push(qt))}var yn=this.spawn(St);yn.updateStyle(),yn.emit(_t.event),Lt&&yn.emit(Lt)}return this}}function i0(_t){E1[_t.field]=function(){var bt=this[0];if(bt){if(_t.overrideField){var St=_t.overrideField(bt);if(St!==void 0)return St}return bt._private[_t.field]}},E1[_t.on]=K0({event:_t.on,field:_t.field,ableField:_t.ableField,overrideAble:_t.overrideAble,value:!0}),E1[_t.off]=K0({event:_t.off,field:_t.field,ableField:_t.ableField,overrideAble:_t.overrideAble,value:!1})}i0({field:"locked",overrideField:function(bt){return bt.cy().autolock()?!0:void 0},on:"lock",off:"unlock"}),i0({field:"grabbable",overrideField:function(bt){return bt.cy().autoungrabify()||bt.pannable()?!1:void 0},on:"grabify",off:"ungrabify"}),i0({field:"selected",ableField:"selectable",overrideAble:function(bt){return bt.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"}),i0({field:"selectable",overrideField:function(bt){return bt.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"}),E1.deselect=E1.unselect,E1.grabbed=function(){var _t=this[0];if(_t)return _t._private.grabbed},i0({field:"active",on:"activate",off:"unactivate"}),i0({field:"pannable",on:"panify",off:"unpanify"}),E1.inactive=function(){var _t=this[0];if(_t)return!_t._private.active};var Au={},Fv=function(bt){return function(wt){for(var Nt=this,Pt=[],Lt=0;Lt<Nt.length;Lt++){var Ht=Nt[Lt];if(!!Ht.isNode()){for(var qt=!1,Gt=Ht.connectedEdges(),Qt=0;Qt<Gt.length;Qt++){var hn=Gt[Qt],yn=hn.source(),xn=hn.target();if(bt.noIncomingEdges&&xn===Ht&&yn!==Ht||bt.noOutgoingEdges&&yn===Ht&&xn!==Ht){qt=!0;break}}qt||Pt.push(Ht)}}return this.spawn(Pt,!0).filter(wt)}},pT=function(bt){return function(St){for(var wt=this,Nt=[],Pt=0;Pt<wt.length;Pt++){var Lt=wt[Pt];if(!!Lt.isNode())for(var Ht=Lt.connectedEdges(),qt=0;qt<Ht.length;qt++){var Gt=Ht[qt],Qt=Gt.source(),hn=Gt.target();bt.outgoing&&Qt===Lt?(Nt.push(Gt),Nt.push(hn)):bt.incoming&&hn===Lt&&(Nt.push(Gt),Nt.push(Qt))}}return this.spawn(Nt,!0).filter(St)}},Lv=function(bt){return function(St){for(var wt=this,Nt=[],Pt={};;){var Lt=bt.outgoing?wt.outgoers():wt.incomers();if(Lt.length===0)break;for(var Ht=!1,qt=0;qt<Lt.length;qt++){var Gt=Lt[qt],Qt=Gt.id();Pt[Qt]||(Pt[Qt]=!0,Nt.push(Gt),Ht=!0)}if(!Ht)break;wt=Lt}return this.spawn(Nt,!0).filter(St)}};Au.clearTraversalCache=function(){for(var _t=0;_t<this.length;_t++)this[_t]._private.traversalCache=null},Qr(Au,{roots:Fv({noIncomingEdges:!0}),leaves:Fv({noOutgoingEdges:!0}),outgoers:eu(pT({outgoing:!0}),"outgoers"),successors:Lv({outgoing:!0}),incomers:eu(pT({incoming:!0}),"incomers"),predecessors:Lv({incoming:!0})}),Qr(Au,{neighborhood:eu(function(_t){for(var bt=[],St=this.nodes(),wt=0;wt<St.length;wt++)for(var Nt=St[wt],Pt=Nt.connectedEdges(),Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt],qt=Ht.source(),Gt=Ht.target(),Qt=Nt===qt?Gt:qt;Qt.length>0&&bt.push(Qt[0]),bt.push(Ht[0])}return this.spawn(bt,!0).filter(_t)},"neighborhood"),closedNeighborhood:function(bt){return this.neighborhood().add(this).filter(bt)},openNeighborhood:function(bt){return this.neighborhood(bt)}}),Au.neighbourhood=Au.neighborhood,Au.closedNeighbourhood=Au.closedNeighborhood,Au.openNeighbourhood=Au.openNeighborhood,Qr(Au,{source:eu(function(bt){var St=this[0],wt;return St&&(wt=St._private.source||St.cy().collection()),wt&&bt?wt.filter(bt):wt},"source"),target:eu(function(bt){var St=this[0],wt;return St&&(wt=St._private.target||St.cy().collection()),wt&&bt?wt.filter(bt):wt},"target"),sources:hT({attr:"source"}),targets:hT({attr:"target"})});function hT(_t){return function(St){for(var wt=[],Nt=0;Nt<this.length;Nt++){var Pt=this[Nt],Lt=Pt._private[_t.attr];Lt&&wt.push(Lt)}return this.spawn(wt,!0).filter(St)}}Qr(Au,{edgesWith:eu(ev(),"edgesWith"),edgesTo:eu(ev({thisIsSrc:!0}),"edgesTo")});function ev(_t){return function(St){var wt=[],Nt=this._private.cy,Pt=_t||{};Ut(St)&&(St=Nt.$(St));for(var Lt=0;Lt<St.length;Lt++)for(var Ht=St[Lt]._private.edges,qt=0;qt<Ht.length;qt++){var Gt=Ht[qt],Qt=Gt._private.data,hn=this.hasElementWithId(Qt.source)&&St.hasElementWithId(Qt.target),yn=St.hasElementWithId(Qt.source)&&this.hasElementWithId(Qt.target),xn=hn||yn;!xn||(Pt.thisIsSrc||Pt.thisIsTgt)&&(Pt.thisIsSrc&&!hn||Pt.thisIsTgt&&!yn)||wt.push(Gt)}return this.spawn(wt,!0)}}Qr(Au,{connectedEdges:eu(function(_t){for(var bt=[],St=this,wt=0;wt<St.length;wt++){var Nt=St[wt];if(!!Nt.isNode())for(var Pt=Nt._private.edges,Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt];bt.push(Ht)}}return this.spawn(bt,!0).filter(_t)},"connectedEdges"),connectedNodes:eu(function(_t){for(var bt=[],St=this,wt=0;wt<St.length;wt++){var Nt=St[wt];!Nt.isEdge()||(bt.push(Nt.source()[0]),bt.push(Nt.target()[0]))}return this.spawn(bt,!0).filter(_t)},"connectedNodes"),parallelEdges:eu(Bv(),"parallelEdges"),codirectedEdges:eu(Bv({codirected:!0}),"codirectedEdges")});function Bv(_t){var bt={codirected:!1};return _t=Qr({},bt,_t),function(wt){for(var Nt=[],Pt=this.edges(),Lt=_t,Ht=0;Ht<Pt.length;Ht++)for(var qt=Pt[Ht],Gt=qt._private,Qt=Gt.source,hn=Qt._private.data.id,yn=Gt.data.target,xn=Qt._private.edges,bn=0;bn<xn.length;bn++){var Nn=xn[bn],Pn=Nn._private.data,Fn=Pn.target,Un=Pn.source,Hn=Fn===yn&&Un===hn,nr=hn===Fn&&yn===Un;(Lt.codirected&&Hn||!Lt.codirected&&(Hn||nr))&&Nt.push(Nn)}return this.spawn(Nt,!0).filter(wt)}}Qr(Au,{components:function(bt){var St=this,wt=St.cy(),Nt=wt.collection(),Pt=bt==null?St.nodes():bt.nodes(),Lt=[];bt!=null&&Pt.empty()&&(Pt=bt.sources());var Ht=function(Qt,hn){Nt.merge(Qt),Pt.unmerge(Qt),hn.merge(Qt)};if(Pt.empty())return St.spawn();var qt=function(){var Qt=wt.collection();Lt.push(Qt);var hn=Pt[0];Ht(hn,Qt),St.bfs({directed:!1,roots:hn,visit:function(xn){return Ht(xn,Qt)}}),Qt.forEach(function(yn){yn.connectedEdges().forEach(function(xn){St.has(xn)&&Qt.has(xn.source())&&Qt.has(xn.target())&&Qt.merge(xn)})})};do qt();while(Pt.length>0);return Lt},component:function(){var bt=this[0];return bt.cy().mutableElements().components(bt)[0]}}),Au.componentsOf=Au.components;var ou=function(bt,St){var wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(bt===void 0){Os("A collection must have a reference to the core");return}var Pt=new Ru,Lt=!1;if(!St)St=[];else if(St.length>0&&gn(St[0])&&!En(St[0])){Lt=!0;for(var Ht=[],qt=new vp,Gt=0,Qt=St.length;Gt<Qt;Gt++){var hn=St[Gt];hn.data==null&&(hn.data={});var yn=hn.data;if(yn.id==null)yn.id=zo();else if(bt.hasElementWithId(yn.id)||qt.has(yn.id))continue;var xn=new s1(bt,hn,!1);Ht.push(xn),qt.add(yn.id)}St=Ht}this.length=0;for(var bn=0,Nn=St.length;bn<Nn;bn++){var Pn=St[bn][0];if(Pn!=null){var Fn=Pn._private.data.id;(!wt||!Pt.has(Fn))&&(wt&&Pt.set(Fn,{index:this.length,ele:Pn}),this[this.length]=Pn,this.length++)}}this._private={eles:this,cy:bt,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(Un){this.lazyMap=Un},rebuildMap:function(){for(var Hn=this.lazyMap=new Ru,nr=this.eles,mr=0;mr<nr.length;mr++){var gr=nr[mr];Hn.set(gr.id(),{index:mr,ele:gr})}}},wt&&(this._private.map=Pt),Lt&&!Nt&&this.restore()},Fl=s1.prototype=ou.prototype=Object.create(Array.prototype);Fl.instanceString=function(){return"collection"},Fl.spawn=function(_t,bt){return new ou(this.cy(),_t,bt)},Fl.spawnSelf=function(){return this.spawn(this)},Fl.cy=function(){return this._private.cy},Fl.renderer=function(){return this._private.cy.renderer()},Fl.element=function(){return this[0]},Fl.collection=function(){return Ln(this)?this:new ou(this._private.cy,[this])},Fl.unique=function(){return new ou(this._private.cy,this,!0)},Fl.hasElementWithId=function(_t){return _t=""+_t,this._private.map.has(_t)},Fl.getElementById=function(_t){_t=""+_t;var bt=this._private.cy,St=this._private.map.get(_t);return St?St.ele:new ou(bt)},Fl.$id=Fl.getElementById,Fl.poolIndex=function(){var _t=this._private.cy,bt=_t._private.elements,St=this[0]._private.data.id;return bt._private.map.get(St).index},Fl.indexOf=function(_t){var bt=_t[0]._private.data.id;return this._private.map.get(bt).index},Fl.indexOfId=function(_t){return _t=""+_t,this._private.map.get(_t).index},Fl.json=function(_t){var bt=this.element(),St=this.cy();if(bt==null&&_t)return this;if(bt!=null){var wt=bt._private;if(gn(_t)){if(St.startBatch(),_t.data){bt.data(_t.data);var Nt=wt.data;if(bt.isEdge()){var Pt=!1,Lt={},Ht=_t.data.source,qt=_t.data.target;Ht!=null&&Ht!=Nt.source&&(Lt.source=""+Ht,Pt=!0),qt!=null&&qt!=Nt.target&&(Lt.target=""+qt,Pt=!0),Pt&&(bt=bt.move(Lt))}else{var Gt="parent"in _t.data,Qt=_t.data.parent;Gt&&(Qt!=null||Nt.parent!=null)&&Qt!=Nt.parent&&(Qt===void 0&&(Qt=null),Qt!=null&&(Qt=""+Qt),bt=bt.move({parent:Qt}))}}_t.position&&bt.position(_t.position);var hn=function(Nn,Pn,Fn){var Un=_t[Nn];Un!=null&&Un!==wt[Nn]&&(Un?bt[Pn]():bt[Fn]())};return hn("removed","remove","restore"),hn("selected","select","unselect"),hn("selectable","selectify","unselectify"),hn("locked","lock","unlock"),hn("grabbable","grabify","ungrabify"),hn("pannable","panify","unpanify"),_t.classes!=null&&bt.classes(_t.classes),St.endBatch(),this}else if(_t===void 0){var yn={data:_l(wt.data),position:_l(wt.position),group:wt.group,removed:wt.removed,selected:wt.selected,selectable:wt.selectable,locked:wt.locked,grabbable:wt.grabbable,pannable:wt.pannable,classes:null};yn.classes="";var xn=0;return wt.classes.forEach(function(bn){return yn.classes+=xn++===0?bn:" "+bn}),yn}}},Fl.jsons=function(){for(var _t=[],bt=0;bt<this.length;bt++){var St=this[bt],wt=St.json();_t.push(wt)}return _t},Fl.clone=function(){for(var _t=this.cy(),bt=[],St=0;St<this.length;St++){var wt=this[St],Nt=wt.json(),Pt=new s1(_t,Nt,!1);bt.push(Pt)}return new ou(_t,bt)},Fl.copy=Fl.clone,Fl.restore=function(){for(var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,St=this,wt=St.cy(),Nt=wt._private,Pt=[],Lt=[],Ht,qt=0,Gt=St.length;qt<Gt;qt++){var Qt=St[qt];bt&&!Qt.removed()||(Qt.isNode()?Pt.push(Qt):Lt.push(Qt))}Ht=Pt.concat(Lt);var hn,yn=function(){Ht.splice(hn,1),hn--};for(hn=0;hn<Ht.length;hn++){var xn=Ht[hn],bn=xn._private,Nn=bn.data;if(xn.clearTraversalCache(),!(!bt&&!bn.removed)){if(Nn.id===void 0)Nn.id=zo();else if(sn(Nn.id))Nn.id=""+Nn.id;else if(Gn(Nn.id)||!Ut(Nn.id)){Os("Can not create element with invalid string ID `"+Nn.id+"`"),yn();continue}else if(wt.hasElementWithId(Nn.id)){Os("Can not create second element with ID `"+Nn.id+"`"),yn();continue}}var Pn=Nn.id;if(xn.isNode()){var Fn=bn.position;Fn.x==null&&(Fn.x=0),Fn.y==null&&(Fn.y=0)}if(xn.isEdge()){for(var Un=xn,Hn=["source","target"],nr=Hn.length,mr=!1,gr=0;gr<nr;gr++){var rr=Hn[gr],hr=Nn[rr];sn(hr)&&(hr=Nn[rr]=""+Nn[rr]),hr==null||hr===""?(Os("Can not create edge `"+Pn+"` with unspecified "+rr),mr=!0):wt.hasElementWithId(hr)||(Os("Can not create edge `"+Pn+"` with nonexistant "+rr+" `"+hr+"`"),mr=!0)}if(mr){yn();continue}var ar=wt.getElementById(Nn.source),vr=wt.getElementById(Nn.target);ar.same(vr)?ar._private.edges.push(Un):(ar._private.edges.push(Un),vr._private.edges.push(Un)),Un._private.source=ar,Un._private.target=vr}bn.map=new Ru,bn.map.set(Pn,{ele:xn,index:0}),bn.removed=!1,bt&&wt.addToPool(xn)}for(var Tr=0;Tr<Pt.length;Tr++){var dr=Pt[Tr],Sr=dr._private.data;sn(Sr.parent)&&(Sr.parent=""+Sr.parent);var yr=Sr.parent,Fr=yr!=null;if(Fr||dr._private.parent){var _r=dr._private.parent?wt.collection().merge(dr._private.parent):wt.getElementById(yr);if(_r.empty())Sr.parent=void 0;else if(_r[0].removed())As("Node added with missing parent, reference to parent removed"),Sr.parent=void 0,dr._private.parent=null;else{for(var Rr=!1,zr=_r;!zr.empty();){if(dr.same(zr)){Rr=!0,Sr.parent=void 0;break}zr=zr.parent()}Rr||(_r[0]._private.children.push(dr),dr._private.parent=_r[0],Nt.hasCompoundNodes=!0)}}}if(Ht.length>0){for(var Vr=Ht.length===St.length?St:new ou(wt,Ht),ga=0;ga<Vr.length;ga++){var jr=Vr[ga];jr.isNode()||(jr.parallelEdges().clearTraversalCache(),jr.source().clearTraversalCache(),jr.target().clearTraversalCache())}var _i;Nt.hasCompoundNodes?_i=wt.collection().merge(Vr).merge(Vr.connectedNodes()).merge(Vr.parent()):_i=Vr,_i.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(_t),_t?Vr.emitAndNotify("add"):bt&&Vr.emit("add")}return St},Fl.removed=function(){var _t=this[0];return _t&&_t._private.removed},Fl.inside=function(){var _t=this[0];return _t&&!_t._private.removed},Fl.remove=function(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,St=this,wt=[],Nt={},Pt=St._private.cy;function Lt(yr){for(var Fr=yr._private.edges,_r=0;_r<Fr.length;_r++)qt(Fr[_r])}function Ht(yr){for(var Fr=yr._private.children,_r=0;_r<Fr.length;_r++)qt(Fr[_r])}function qt(yr){var Fr=Nt[yr.id()];bt&&yr.removed()||Fr||(Nt[yr.id()]=!0,yr.isNode()?(wt.push(yr),Lt(yr),Ht(yr)):wt.unshift(yr))}for(var Gt=0,Qt=St.length;Gt<Qt;Gt++){var hn=St[Gt];qt(hn)}function yn(yr,Fr){var _r=yr._private.edges;Nl(_r,Fr),yr.clearTraversalCache()}function xn(yr){yr.clearTraversalCache()}var bn=[];bn.ids={};function Nn(yr,Fr){Fr=Fr[0],yr=yr[0];var _r=yr._private.children,Rr=yr.id();Nl(_r,Fr),Fr._private.parent=null,bn.ids[Rr]||(bn.ids[Rr]=!0,bn.push(yr))}St.dirtyCompoundBoundsCache(),bt&&Pt.removeFromPool(wt);for(var Pn=0;Pn<wt.length;Pn++){var Fn=wt[Pn];if(Fn.isEdge()){var Un=Fn.source()[0],Hn=Fn.target()[0];yn(Un,Fn),yn(Hn,Fn);for(var nr=Fn.parallelEdges(),mr=0;mr<nr.length;mr++){var gr=nr[mr];xn(gr),gr.isBundledBezier()&&gr.dirtyBoundingBoxCache()}}else{var rr=Fn.parent();rr.length!==0&&Nn(rr,Fn)}bt&&(Fn._private.removed=!0)}var hr=Pt._private.elements;Pt._private.hasCompoundNodes=!1;for(var ar=0;ar<hr.length;ar++){var vr=hr[ar];if(vr.isParent()){Pt._private.hasCompoundNodes=!0;break}}var Tr=new ou(this.cy(),wt);Tr.size()>0&&(_t?Tr.emitAndNotify("remove"):bt&&Tr.emit("remove"));for(var dr=0;dr<bn.length;dr++){var Sr=bn[dr];(!bt||!Sr.removed())&&Sr.updateStyle()}return Tr},Fl.move=function(_t){var bt=this._private.cy,St=this,wt=!1,Nt=!1,Pt=function(bn){return bn==null?bn:""+bn};if(_t.source!==void 0||_t.target!==void 0){var Lt=Pt(_t.source),Ht=Pt(_t.target),qt=Lt!=null&&bt.hasElementWithId(Lt),Gt=Ht!=null&&bt.hasElementWithId(Ht);(qt||Gt)&&(bt.batch(function(){St.remove(wt,Nt),St.emitAndNotify("moveout");for(var xn=0;xn<St.length;xn++){var bn=St[xn],Nn=bn._private.data;bn.isEdge()&&(qt&&(Nn.source=Lt),Gt&&(Nn.target=Ht))}St.restore(wt,Nt)}),St.emitAndNotify("move"))}else if(_t.parent!==void 0){var Qt=Pt(_t.parent),hn=Qt===null||bt.hasElementWithId(Qt);if(hn){var yn=Qt===null?void 0:Qt;bt.batch(function(){var xn=St.remove(wt,Nt);xn.emitAndNotify("moveout");for(var bn=0;bn<St.length;bn++){var Nn=St[bn],Pn=Nn._private.data;Nn.isNode()&&(Pn.parent=yn)}xn.restore(wt,Nt)}),St.emitAndNotify("move")}}return this},[L0,jl,Hl,Ip,v1,kv,Am,Jm,Ky,lT,uT,Yy,Xy,Eu,E1,Au].forEach(function(_t){Qr(Fl,_t)});var zv={add:function(bt){var St,wt=this;if(_n(bt)){var Nt=bt;if(Nt._private.cy===wt)St=Nt.restore();else{for(var Pt=[],Lt=0;Lt<Nt.length;Lt++){var Ht=Nt[Lt];Pt.push(Ht.json())}St=new ou(wt,Pt)}}else if(Jt(bt)){var qt=bt;St=new ou(wt,qt)}else if(gn(bt)&&(Jt(bt.nodes)||Jt(bt.edges))){for(var Gt=bt,Qt=[],hn=["nodes","edges"],yn=0,xn=hn.length;yn<xn;yn++){var bn=hn[yn],Nn=Gt[bn];if(Jt(Nn))for(var Pn=0,Fn=Nn.length;Pn<Fn;Pn++){var Un=Qr({group:bn},Nn[Pn]);Qt.push(Un)}}St=new ou(wt,Qt)}else{var Hn=bt;St=new s1(wt,Hn).collection()}return St},remove:function(bt){if(!_n(bt)){if(Ut(bt)){var St=bt;bt=this.$(St)}}return bt.remove()}};/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function rl(_t,bt,St,wt){var Nt=4,Pt=.001,Lt=1e-7,Ht=10,qt=11,Gt=1/(qt-1),Qt=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var hn=0;hn<4;++hn)if(typeof arguments[hn]!="number"||isNaN(arguments[hn])||!isFinite(arguments[hn]))return!1;_t=Math.min(_t,1),St=Math.min(St,1),_t=Math.max(_t,0),St=Math.max(St,0);var yn=Qt?new Float32Array(qt):new Array(qt);function xn(vr,Tr){return 1-3*Tr+3*vr}function bn(vr,Tr){return 3*Tr-6*vr}function Nn(vr){return 3*vr}function Pn(vr,Tr,dr){return((xn(Tr,dr)*vr+bn(Tr,dr))*vr+Nn(Tr))*vr}function Fn(vr,Tr,dr){return 3*xn(Tr,dr)*vr*vr+2*bn(Tr,dr)*vr+Nn(Tr)}function Un(vr,Tr){for(var dr=0;dr<Nt;++dr){var Sr=Fn(Tr,_t,St);if(Sr===0)return Tr;var yr=Pn(Tr,_t,St)-vr;Tr-=yr/Sr}return Tr}function Hn(){for(var vr=0;vr<qt;++vr)yn[vr]=Pn(vr*Gt,_t,St)}function nr(vr,Tr,dr){var Sr,yr,Fr=0;do yr=Tr+(dr-Tr)/2,Sr=Pn(yr,_t,St)-vr,Sr>0?dr=yr:Tr=yr;while(Math.abs(Sr)>Lt&&++Fr<Ht);return yr}function mr(vr){for(var Tr=0,dr=1,Sr=qt-1;dr!==Sr&&yn[dr]<=vr;++dr)Tr+=Gt;--dr;var yr=(vr-yn[dr])/(yn[dr+1]-yn[dr]),Fr=Tr+yr*Gt,_r=Fn(Fr,_t,St);return _r>=Pt?Un(vr,Fr):_r===0?Fr:nr(vr,Tr,Tr+Gt)}var gr=!1;function rr(){gr=!0,(_t!==bt||St!==wt)&&Hn()}var hr=function(Tr){return gr||rr(),_t===bt&&St===wt?Tr:Tr===0?0:Tr===1?1:Pn(mr(Tr),bt,wt)};hr.getControlPoints=function(){return[{x:_t,y:bt},{x:St,y:wt}]};var ar="generateBezier("+[_t,bt,St,wt]+")";return hr.toString=function(){return ar},hr}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var m2=function(){function _t(wt){return-wt.tension*wt.x-wt.friction*wt.v}function bt(wt,Nt,Pt){var Lt={x:wt.x+Pt.dx*Nt,v:wt.v+Pt.dv*Nt,tension:wt.tension,friction:wt.friction};return{dx:Lt.v,dv:_t(Lt)}}function St(wt,Nt){var Pt={dx:wt.v,dv:_t(wt)},Lt=bt(wt,Nt*.5,Pt),Ht=bt(wt,Nt*.5,Lt),qt=bt(wt,Nt,Ht),Gt=1/6*(Pt.dx+2*(Lt.dx+Ht.dx)+qt.dx),Qt=1/6*(Pt.dv+2*(Lt.dv+Ht.dv)+qt.dv);return wt.x=wt.x+Gt*Nt,wt.v=wt.v+Qt*Nt,wt}return function wt(Nt,Pt,Lt){var Ht={x:-1,v:0,tension:null,friction:null},qt=[0],Gt=0,Qt=1/1e4,hn=16/1e3,yn,xn,bn;for(Nt=parseFloat(Nt)||500,Pt=parseFloat(Pt)||20,Lt=Lt||null,Ht.tension=Nt,Ht.friction=Pt,yn=Lt!==null,yn?(Gt=wt(Nt,Pt),xn=Gt/Lt*hn):xn=hn;bn=St(bn||Ht,xn),qt.push(1+bn.x),Gt+=16,Math.abs(bn.x)>Qt&&Math.abs(bn.v)>Qt;);return yn?function(Nn){return qt[Nn*(qt.length-1)|0]}:Gt}}(),Ll=function(bt,St,wt,Nt){var Pt=rl(bt,St,wt,Nt);return function(Lt,Ht,qt){return Lt+(Ht-Lt)*Pt(qt)}},nm={linear:function(bt,St,wt){return bt+(St-bt)*wt},ease:Ll(.25,.1,.25,1),"ease-in":Ll(.42,0,1,1),"ease-out":Ll(0,0,.58,1),"ease-in-out":Ll(.42,0,.58,1),"ease-in-sine":Ll(.47,0,.745,.715),"ease-out-sine":Ll(.39,.575,.565,1),"ease-in-out-sine":Ll(.445,.05,.55,.95),"ease-in-quad":Ll(.55,.085,.68,.53),"ease-out-quad":Ll(.25,.46,.45,.94),"ease-in-out-quad":Ll(.455,.03,.515,.955),"ease-in-cubic":Ll(.55,.055,.675,.19),"ease-out-cubic":Ll(.215,.61,.355,1),"ease-in-out-cubic":Ll(.645,.045,.355,1),"ease-in-quart":Ll(.895,.03,.685,.22),"ease-out-quart":Ll(.165,.84,.44,1),"ease-in-out-quart":Ll(.77,0,.175,1),"ease-in-quint":Ll(.755,.05,.855,.06),"ease-out-quint":Ll(.23,1,.32,1),"ease-in-out-quint":Ll(.86,0,.07,1),"ease-in-expo":Ll(.95,.05,.795,.035),"ease-out-expo":Ll(.19,1,.22,1),"ease-in-out-expo":Ll(1,0,0,1),"ease-in-circ":Ll(.6,.04,.98,.335),"ease-out-circ":Ll(.075,.82,.165,1),"ease-in-out-circ":Ll(.785,.135,.15,.86),spring:function(bt,St,wt){if(wt===0)return nm.linear;var Nt=m2(bt,St,wt);return function(Pt,Lt,Ht){return Pt+(Lt-Pt)*Nt(Ht)}},"cubic-bezier":Ll};function Wv(_t,bt,St,wt,Nt){if(wt===1||bt===St)return St;var Pt=Nt(bt,St,wt);return _t==null||((_t.roundValue||_t.color)&&(Pt=Math.round(Pt)),_t.min!==void 0&&(Pt=Math.max(Pt,_t.min)),_t.max!==void 0&&(Pt=Math.min(Pt,_t.max))),Pt}function mT(_t,bt){return _t.pfValue!=null||_t.value!=null?_t.pfValue!=null&&(bt==null||bt.type.units!=="%")?_t.pfValue:_t.value:_t}function a0(_t,bt,St,wt,Nt){var Pt=Nt!=null?Nt.type:null;St<0?St=0:St>1&&(St=1);var Lt=mT(_t,Nt),Ht=mT(bt,Nt);if(sn(Lt)&&sn(Ht))return Wv(Pt,Lt,Ht,St,wt);if(Jt(Lt)&&Jt(Ht)){for(var qt=[],Gt=0;Gt<Ht.length;Gt++){var Qt=Lt[Gt],hn=Ht[Gt];if(Qt!=null&&hn!=null){var yn=Wv(Pt,Qt,hn,St,wt);qt.push(yn)}else qt.push(hn)}return qt}}function pp(_t,bt,St,wt){var Nt=!wt,Pt=_t._private,Lt=bt._private,Ht=Lt.easing,qt=Lt.startTime,Gt=wt?_t:_t.cy(),Qt=Gt.style();if(!Lt.easingImpl)if(Ht==null)Lt.easingImpl=nm.linear;else{var hn;if(Ut(Ht)){var yn=Qt.parse("transition-timing-function",Ht);hn=yn.value}else hn=Ht;var xn,bn;Ut(hn)?(xn=hn,bn=[]):(xn=hn[1],bn=hn.slice(2).map(function(Vr){return+Vr})),bn.length>0?(xn==="spring"&&bn.push(Lt.duration),Lt.easingImpl=nm[xn].apply(null,bn)):Lt.easingImpl=nm[xn]}var Nn=Lt.easingImpl,Pn;if(Lt.duration===0?Pn=1:Pn=(St-qt)/Lt.duration,Lt.applying&&(Pn=Lt.progress),Pn<0?Pn=0:Pn>1&&(Pn=1),Lt.delay==null){var Fn=Lt.startPosition,Un=Lt.position;if(Un&&Nt&&!_t.locked()){var Hn={};Q0(Fn.x,Un.x)&&(Hn.x=a0(Fn.x,Un.x,Pn,Nn)),Q0(Fn.y,Un.y)&&(Hn.y=a0(Fn.y,Un.y,Pn,Nn)),_t.position(Hn)}var nr=Lt.startPan,mr=Lt.pan,gr=Pt.pan,rr=mr!=null&&wt;rr&&(Q0(nr.x,mr.x)&&(gr.x=a0(nr.x,mr.x,Pn,Nn)),Q0(nr.y,mr.y)&&(gr.y=a0(nr.y,mr.y,Pn,Nn)),_t.emit("pan"));var hr=Lt.startZoom,ar=Lt.zoom,vr=ar!=null&&wt;vr&&(Q0(hr,ar)&&(Pt.zoom=M1(Pt.minZoom,a0(hr,ar,Pn,Nn),Pt.maxZoom)),_t.emit("zoom")),(rr||vr)&&_t.emit("viewport");var Tr=Lt.style;if(Tr&&Tr.length>0&&Nt){for(var dr=0;dr<Tr.length;dr++){var Sr=Tr[dr],yr=Sr.name,Fr=Sr,_r=Lt.startStyle[yr],Rr=Qt.properties[_r.name],zr=a0(_r,Fr,Pn,Nn,Rr);Qt.overrideBypass(_t,yr,zr)}_t.emit("style")}}return Lt.progress=Pn,Pn}function Q0(_t,bt){return _t==null||bt==null?!1:sn(_t)&&sn(bt)?!0:!!(_t&&bt)}function nv(_t,bt,St,wt){var Nt=bt._private;Nt.started=!0,Nt.startTime=St-Nt.progress*Nt.duration}function rv(_t,bt){var St=bt._private.aniEles,wt=[];function Nt(Qt,hn){var yn=Qt._private,xn=yn.animation.current,bn=yn.animation.queue,Nn=!1;if(xn.length===0){var Pn=bn.shift();Pn&&xn.push(Pn)}for(var Fn=function(gr){for(var rr=gr.length-1;rr>=0;rr--){var hr=gr[rr];hr()}gr.splice(0,gr.length)},Un=xn.length-1;Un>=0;Un--){var Hn=xn[Un],nr=Hn._private;if(nr.stopped){xn.splice(Un,1),nr.hooked=!1,nr.playing=!1,nr.started=!1,Fn(nr.frames);continue}!nr.playing&&!nr.applying||(nr.playing&&nr.applying&&(nr.applying=!1),nr.started||nv(Qt,Hn,_t),pp(Qt,Hn,_t,hn),nr.applying&&(nr.applying=!1),Fn(nr.frames),nr.step!=null&&nr.step(_t),Hn.completed()&&(xn.splice(Un,1),nr.hooked=!1,nr.playing=!1,nr.started=!1,Fn(nr.completes)),Nn=!0)}return!hn&&xn.length===0&&bn.length===0&&wt.push(Qt),Nn}for(var Pt=!1,Lt=0;Lt<St.length;Lt++){var Ht=St[Lt],qt=Nt(Ht);Pt=Pt||qt}var Gt=Nt(bt,!0);(Pt||Gt)&&(St.length>0?bt.notify("draw",St):bt.notify("draw")),St.unmerge(wt),bt.emit("step")}var gT={animate:yl.animate(),animation:yl.animation(),animated:yl.animated(),clearQueue:yl.clearQueue(),delay:yl.delay(),delayAnimation:yl.delayAnimation(),stop:yl.stop(),addToAnimationPool:function(bt){var St=this;!St.styleEnabled()||St._private.aniEles.merge(bt)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var bt=this;if(bt._private.animationsRunning=!0,!bt.styleEnabled())return;function St(){!bt._private.animationsRunning||Gs(function(Pt){rv(Pt,bt),St()})}var wt=bt.renderer();wt&&wt.beforeRender?wt.beforeRender(function(Pt,Lt){rv(Lt,bt)},wt.beforeRenderPriorities.animations):St()}},yT={qualifierCompare:function(bt,St){return bt==null||St==null?bt==null&&St==null:bt.sameText(St)},eventMatches:function(bt,St,wt){var Nt=St.qualifier;return Nt!=null?bt!==wt.target&&En(wt.target)&&Nt.matches(wt.target):!0},addEventFields:function(bt,St){St.cy=bt,St.target=bt},callbackContext:function(bt,St,wt){return St.qualifier!=null?wt.target:bt}},Lu=function(bt){return Ut(bt)?new cp(bt):bt},S1={createEmitter:function(){var bt=this._private;return bt.emitter||(bt.emitter=new Qu(yT,this)),this},emitter:function(){return this._private.emitter},on:function(bt,St,wt){return this.emitter().on(bt,Lu(St),wt),this},removeListener:function(bt,St,wt){return this.emitter().removeListener(bt,Lu(St),wt),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(bt,St,wt){return this.emitter().one(bt,Lu(St),wt),this},once:function(bt,St,wt){return this.emitter().one(bt,Lu(St),wt),this},emit:function(bt,St){return this.emitter().emit(bt,St),this},emitAndNotify:function(bt,St){return this.emit(bt),this.notify(bt,St),this}};yl.eventAliasesOn(S1);var J0={png:function(bt){var St=this._private.renderer;return bt=bt||{},St.png(bt)},jpg:function(bt){var St=this._private.renderer;return bt=bt||{},bt.bg=bt.bg||"#fff",St.jpg(bt)}};J0.jpeg=J0.jpg;var _g={layout:function(bt){var St=this;if(bt==null){Os("Layout options must be specified to make a layout");return}if(bt.name==null){Os("A `name` must be specified to make a layout");return}var wt=bt.name,Nt=St.extension("layout",wt);if(Nt==null){Os("No such layout `"+wt+"` found.  Did you forget to import it and `cytoscape.use()` it?");return}var Pt;Ut(bt.eles)?Pt=St.$(bt.eles):Pt=bt.eles!=null?bt.eles:St.$();var Lt=new Nt(Qr({},bt,{cy:St,eles:Pt}));return Lt}};_g.createLayout=_g.makeLayout=_g.layout;var iv={notify:function(bt,St){var wt=this._private;if(this.batching()){wt.batchNotifications=wt.batchNotifications||{};var Nt=wt.batchNotifications[bt]=wt.batchNotifications[bt]||this.collection();St!=null&&Nt.merge(St);return}if(!!wt.notificationsEnabled){var Pt=this.renderer();this.destroyed()||!Pt||Pt.notify(bt,St)}},notifications:function(bt){var St=this._private;return bt===void 0?St.notificationsEnabled:(St.notificationsEnabled=!!bt,this)},noNotifications:function(bt){this.notifications(!1),bt(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var bt=this._private;return bt.batchCount==null&&(bt.batchCount=0),bt.batchCount===0&&(bt.batchStyleEles=this.collection(),bt.batchNotifications={}),bt.batchCount++,this},endBatch:function(){var bt=this._private;if(bt.batchCount===0)return this;if(bt.batchCount--,bt.batchCount===0){bt.batchStyleEles.updateStyle();var St=this.renderer();Object.keys(bt.batchNotifications).forEach(function(wt){var Nt=bt.batchNotifications[wt];Nt.empty()?St.notify(wt):St.notify(wt,Nt)})}return this},batch:function(bt){return this.startBatch(),bt(),this.endBatch(),this},batchData:function(bt){var St=this;return this.batch(function(){for(var wt=Object.keys(bt),Nt=0;Nt<wt.length;Nt++){var Pt=wt[Nt],Lt=bt[Pt],Ht=St.getElementById(Pt);Ht.data(Lt)}})}},vT=Rs({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),ey={renderTo:function(bt,St,wt,Nt){var Pt=this._private.renderer;return Pt.renderTo(bt,St,wt,Nt),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(bt){var St=this,wt=St.extension("renderer",bt.name);if(wt==null){Os("Can not initialise: No such renderer `".concat(bt.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}bt.wheelSensitivity!==void 0&&As("You have set a custom wheel sensitivity.  This will make your app zoom unnaturally when using mainstream mice.  You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var Nt=vT(bt);Nt.cy=St,St._private.renderer=new wt(Nt),this.notify("init")},destroyRenderer:function(){var bt=this;bt.notify("destroy");var St=bt.container();if(St)for(St._cyreg=null;St.childNodes.length>0;)St.removeChild(St.childNodes[0]);bt._private.renderer=null,bt.mutableElements().forEach(function(wt){var Nt=wt._private;Nt.rscratch={},Nt.rstyle={},Nt.animation.current=[],Nt.animation.queue=[]})},onRender:function(bt){return this.on("render",bt)},offRender:function(bt){return this.off("render",bt)}};ey.invalidateDimensions=ey.resize;var ty={collection:function(bt,St){return Ut(bt)?this.$(bt):_n(bt)?bt.collection():Jt(bt)?(St||(St={}),new ou(this,bt,St.unique,St.removed)):new ou(this)},nodes:function(bt){var St=this.$(function(wt){return wt.isNode()});return bt?St.filter(bt):St},edges:function(bt){var St=this.$(function(wt){return wt.isEdge()});return bt?St.filter(bt):St},$:function(bt){var St=this._private.elements;return bt?St.filter(bt):St.spawnSelf()},mutableElements:function(){return this._private.elements}};ty.elements=ty.filter=ty.$;var pu={},_m="t",rm="f";pu.apply=function(_t){for(var bt=this,St=bt._private,wt=St.cy,Nt=wt.collection(),Pt=0;Pt<_t.length;Pt++){var Lt=_t[Pt],Ht=bt.getContextMeta(Lt);if(!Ht.empty){var qt=bt.getContextStyle(Ht),Gt=bt.applyContextStyle(Ht,qt,Lt);Lt._private.appliedInitStyle?bt.updateTransitions(Lt,Gt.diffProps):Lt._private.appliedInitStyle=!0;var Qt=bt.updateStyleHints(Lt);Qt&&Nt.push(Lt)}}return Nt},pu.getPropertiesDiff=function(_t,bt){var St=this,wt=St._private.propDiffs=St._private.propDiffs||{},Nt=_t+"-"+bt,Pt=wt[Nt];if(Pt)return Pt;for(var Lt=[],Ht={},qt=0;qt<St.length;qt++){var Gt=St[qt],Qt=_t[qt]===_m,hn=bt[qt]===_m,yn=Qt!==hn,xn=Gt.mappedProperties.length>0;if(yn||hn&&xn){var bn=void 0;yn&&xn||yn?bn=Gt.properties:xn&&(bn=Gt.mappedProperties);for(var Nn=0;Nn<bn.length;Nn++){for(var Pn=bn[Nn],Fn=Pn.name,Un=!1,Hn=qt+1;Hn<St.length;Hn++){var nr=St[Hn],mr=bt[Hn]===_m;if(!!mr&&(Un=nr.properties[Pn.name]!=null,Un))break}!Ht[Fn]&&!Un&&(Ht[Fn]=!0,Lt.push(Fn))}}}return wt[Nt]=Lt,Lt},pu.getContextMeta=function(_t){for(var bt=this,St="",wt,Nt=_t._private.styleCxtKey||"",Pt=0;Pt<bt.length;Pt++){var Lt=bt[Pt],Ht=Lt.selector&&Lt.selector.matches(_t);Ht?St+=_m:St+=rm}return wt=bt.getPropertiesDiff(Nt,St),_t._private.styleCxtKey=St,{key:St,diffPropNames:wt,empty:wt.length===0}},pu.getContextStyle=function(_t){var bt=_t.key,St=this,wt=this._private.contextStyles=this._private.contextStyles||{};if(wt[bt])return wt[bt];for(var Nt={_private:{key:bt}},Pt=0;Pt<St.length;Pt++){var Lt=St[Pt],Ht=bt[Pt]===_m;if(!!Ht)for(var qt=0;qt<Lt.properties.length;qt++){var Gt=Lt.properties[qt];Nt[Gt.name]=Gt}}return wt[bt]=Nt,Nt},pu.applyContextStyle=function(_t,bt,St){for(var wt=this,Nt=_t.diffPropNames,Pt={},Lt=wt.types,Ht=0;Ht<Nt.length;Ht++){var qt=Nt[Ht],Gt=bt[qt],Qt=St.pstyle(qt);if(!Gt)if(Qt)Qt.bypass?Gt={name:qt,deleteBypassed:!0}:Gt={name:qt,delete:!0};else continue;if(Qt!==Gt){if(Gt.mapped===Lt.fn&&Qt!=null&&Qt.mapping!=null&&Qt.mapping.value===Gt.value){var hn=Qt.mapping,yn=hn.fnValue=Gt.value(St);if(yn===hn.prevFnValue)continue}var xn=Pt[qt]={prev:Qt};wt.applyParsedProperty(St,Gt),xn.next=St.pstyle(qt),xn.next&&xn.next.bypass&&(xn.next=xn.next.bypassed)}}return{diffProps:Pt}},pu.updateStyleHints=function(_t){var bt=_t._private,St=this,wt=St.propertyGroupNames,Nt=St.propertyGroupKeys,Pt=function(Io,Fo,Is){return St.getPropertiesHash(Io,Fo,Is)},Lt=bt.styleKey;if(_t.removed())return!1;var Ht=bt.group==="nodes",qt=_t._private.style;wt=Object.keys(qt);for(var Gt=0;Gt<Nt.length;Gt++){var Qt=Nt[Gt];bt.styleKeys[Qt]=[Il,vn]}for(var hn=function(Io,Fo){return bt.styleKeys[Fo][0]=Zr(Io,bt.styleKeys[Fo][0])},yn=function(Io,Fo){return bt.styleKeys[Fo][1]=Wn(Io,bt.styleKeys[Fo][1])},xn=function(Io,Fo){hn(Io,Fo),yn(Io,Fo)},bn=function(Io,Fo){for(var Is=0;Is<Io.length;Is++){var Ss=Io.charCodeAt(Is);hn(Ss,Fo),yn(Ss,Fo)}},Nn=2e9,Pn=function(Io){return-128<Io&&Io<128&&Math.floor(Io)!==Io?Nn-(Io*1024|0):Io},Fn=0;Fn<wt.length;Fn++){var Un=wt[Fn],Hn=qt[Un];if(Hn!=null){var nr=this.properties[Un],mr=nr.type,gr=nr.groupKey,rr=void 0;nr.hashOverride!=null?rr=nr.hashOverride(_t,Hn):Hn.pfValue!=null&&(rr=Hn.pfValue);var hr=nr.enums==null?Hn.value:null,ar=rr!=null,vr=hr!=null,Tr=ar||vr,dr=Hn.units;if(mr.number&&Tr&&!mr.multiple){var Sr=ar?rr:hr;xn(Pn(Sr),gr),!ar&&dr!=null&&bn(dr,gr)}else bn(Hn.strValue,gr)}}for(var yr=[Il,vn],Fr=0;Fr<Nt.length;Fr++){var _r=Nt[Fr],Rr=bt.styleKeys[_r];yr[0]=Zr(Rr[0],yr[0]),yr[1]=Wn(Rr[1],yr[1])}bt.styleKey=Kn(yr[0],yr[1]);var zr=bt.styleKeys;bt.labelDimsKey=Ur(zr.labelDimensions);var Vr=Pt(_t,["label"],zr.labelDimensions);if(bt.labelKey=Ur(Vr),bt.labelStyleKey=Ur(Kr(zr.commonLabel,Vr)),!Ht){var ga=Pt(_t,["source-label"],zr.labelDimensions);bt.sourceLabelKey=Ur(ga),bt.sourceLabelStyleKey=Ur(Kr(zr.commonLabel,ga));var jr=Pt(_t,["target-label"],zr.labelDimensions);bt.targetLabelKey=Ur(jr),bt.targetLabelStyleKey=Ur(Kr(zr.commonLabel,jr))}if(Ht){var _i=bt.styleKeys,co=_i.nodeBody,mo=_i.nodeBorder,uo=_i.backgroundImage,so=_i.compound,Br=_i.pie,fo=[co,mo,uo,so,Br].filter(function(vo){return vo!=null}).reduce(Kr,[Il,vn]);bt.nodeKey=Ur(fo),bt.hasPie=Br!=null&&Br[0]!==Il&&Br[1]!==vn}return Lt!==bt.styleKey},pu.clearStyleHints=function(_t){var bt=_t._private;bt.styleCxtKey="",bt.styleKeys={},bt.styleKey=null,bt.labelKey=null,bt.labelStyleKey=null,bt.sourceLabelKey=null,bt.sourceLabelStyleKey=null,bt.targetLabelKey=null,bt.targetLabelStyleKey=null,bt.nodeKey=null,bt.hasPie=null},pu.applyParsedProperty=function(_t,bt){var St=this,wt=bt,Nt=_t._private.style,Pt,Lt=St.types,Ht=St.properties[wt.name].type,qt=wt.bypass,Gt=Nt[wt.name],Qt=Gt&&Gt.bypass,hn=_t._private,yn="mapping",xn=function(co){return co==null?null:co.pfValue!=null?co.pfValue:co.value},bn=function(){var co=xn(Gt),mo=xn(wt);St.checkTriggers(_t,wt.name,co,mo)};if(wt&&wt.name.substr(0,3)==="pie"&&As("The pie style properties are deprecated.  Create charts using background images instead."),bt.name==="curve-style"&&_t.isEdge()&&(bt.value!=="bezier"&&_t.isLoop()||bt.value==="haystack"&&(_t.source().isParent()||_t.target().isParent()))&&(wt=bt=this.parse(bt.name,"bezier",qt)),wt.delete)return Nt[wt.name]=void 0,bn(),!0;if(wt.deleteBypassed)return Gt?Gt.bypass?(Gt.bypassed=void 0,bn(),!0):!1:(bn(),!0);if(wt.deleteBypass)return Gt?Gt.bypass?(Nt[wt.name]=Gt.bypassed,bn(),!0):!1:(bn(),!0);var Nn=function(){As("Do not assign mappings to elements without corresponding data (i.e. ele `"+_t.id()+"` has no mapping for property `"+wt.name+"` with data field `"+wt.field+"`); try a `["+wt.field+"]` selector to limit scope to elements with `"+wt.field+"` defined")};switch(wt.mapped){case Lt.mapData:{for(var Pn=wt.field.split("."),Fn=hn.data,Un=0;Un<Pn.length&&Fn;Un++){var Hn=Pn[Un];Fn=Fn[Hn]}if(Fn==null)return Nn(),!1;var nr;if(sn(Fn)){var mr=wt.fieldMax-wt.fieldMin;mr===0?nr=0:nr=(Fn-wt.fieldMin)/mr}else return As("Do not use continuous mappers without specifying numeric data (i.e. `"+wt.field+": "+Fn+"` for `"+_t.id()+"` is non-numeric)"),!1;if(nr<0?nr=0:nr>1&&(nr=1),Ht.color){var gr=wt.valueMin[0],rr=wt.valueMax[0],hr=wt.valueMin[1],ar=wt.valueMax[1],vr=wt.valueMin[2],Tr=wt.valueMax[2],dr=wt.valueMin[3]==null?1:wt.valueMin[3],Sr=wt.valueMax[3]==null?1:wt.valueMax[3],yr=[Math.round(gr+(rr-gr)*nr),Math.round(hr+(ar-hr)*nr),Math.round(vr+(Tr-vr)*nr),Math.round(dr+(Sr-dr)*nr)];Pt={bypass:wt.bypass,name:wt.name,value:yr,strValue:"rgb("+yr[0]+", "+yr[1]+", "+yr[2]+")"}}else if(Ht.number){var Fr=wt.valueMin+(wt.valueMax-wt.valueMin)*nr;Pt=this.parse(wt.name,Fr,wt.bypass,yn)}else return!1;if(!Pt)return Nn(),!1;Pt.mapping=wt,wt=Pt;break}case Lt.data:{for(var _r=wt.field.split("."),Rr=hn.data,zr=0;zr<_r.length&&Rr;zr++){var Vr=_r[zr];Rr=Rr[Vr]}if(Rr!=null&&(Pt=this.parse(wt.name,Rr,wt.bypass,yn)),!Pt)return Nn(),!1;Pt.mapping=wt,wt=Pt;break}case Lt.fn:{var ga=wt.value,jr=wt.fnValue!=null?wt.fnValue:ga(_t);if(wt.prevFnValue=jr,jr==null)return As("Custom function mappers may not return null (i.e. `"+wt.name+"` for ele `"+_t.id()+"` is null)"),!1;if(Pt=this.parse(wt.name,jr,wt.bypass,yn),!Pt)return As("Custom function mappers may not return invalid values for the property type (i.e. `"+wt.name+"` for ele `"+_t.id()+"` is invalid)"),!1;Pt.mapping=_l(wt),wt=Pt;break}case void 0:break;default:return!1}return qt?(Qt?wt.bypassed=Gt.bypassed:wt.bypassed=Gt,Nt[wt.name]=wt):Qt?Gt.bypassed=wt:Nt[wt.name]=wt,bn(),!0},pu.cleanElements=function(_t,bt){for(var St=0;St<_t.length;St++){var wt=_t[St];if(this.clearStyleHints(wt),wt.dirtyCompoundBoundsCache(),wt.dirtyBoundingBoxCache(),!bt)wt._private.style={};else for(var Nt=wt._private.style,Pt=Object.keys(Nt),Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt],qt=Nt[Ht];qt!=null&&(qt.bypass?qt.bypassed=null:Nt[Ht]=null)}}},pu.update=function(){var _t=this._private.cy,bt=_t.mutableElements();bt.updateStyle()},pu.updateTransitions=function(_t,bt){var St=this,wt=_t._private,Nt=_t.pstyle("transition-property").value,Pt=_t.pstyle("transition-duration").pfValue,Lt=_t.pstyle("transition-delay").pfValue;if(Nt.length>0&&Pt>0){for(var Ht={},qt=!1,Gt=0;Gt<Nt.length;Gt++){var Qt=Nt[Gt],hn=_t.pstyle(Qt),yn=bt[Qt];if(!!yn){var xn=yn.prev,bn=xn,Nn=yn.next!=null?yn.next:hn,Pn=!1,Fn=void 0,Un=1e-6;!bn||(sn(bn.pfValue)&&sn(Nn.pfValue)?(Pn=Nn.pfValue-bn.pfValue,Fn=bn.pfValue+Un*Pn):sn(bn.value)&&sn(Nn.value)?(Pn=Nn.value-bn.value,Fn=bn.value+Un*Pn):Jt(bn.value)&&Jt(Nn.value)&&(Pn=bn.value[0]!==Nn.value[0]||bn.value[1]!==Nn.value[1]||bn.value[2]!==Nn.value[2],Fn=bn.strValue),Pn&&(Ht[Qt]=Nn.strValue,this.applyBypass(_t,Qt,Fn),qt=!0))}}if(!qt)return;wt.transitioning=!0,new Op(function(Hn){Lt>0?_t.delayAnimation(Lt).play().promise().then(Hn):Hn()}).then(function(){return _t.animation({style:Ht,duration:Pt,easing:_t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){St.removeBypasses(_t,Nt),_t.emitAndNotify("style"),wt.transitioning=!1})}else wt.transitioning&&(this.removeBypasses(_t,Nt),_t.emitAndNotify("style"),wt.transitioning=!1)},pu.checkTrigger=function(_t,bt,St,wt,Nt,Pt){var Lt=this.properties[bt],Ht=Nt(Lt);Ht!=null&&Ht(St,wt)&&Pt(Lt)},pu.checkZOrderTrigger=function(_t,bt,St,wt){var Nt=this;this.checkTrigger(_t,bt,St,wt,function(Pt){return Pt.triggersZOrder},function(){Nt._private.cy.notify("zorder",_t)})},pu.checkBoundsTrigger=function(_t,bt,St,wt){this.checkTrigger(_t,bt,St,wt,function(Nt){return Nt.triggersBounds},function(Nt){_t.dirtyCompoundBoundsCache(),_t.dirtyBoundingBoxCache(),Nt.triggersBoundsOfParallelBeziers&&(bt==="curve-style"&&(St==="bezier"||wt==="bezier")||bt==="display"&&(St==="none"||wt==="none"))&&_t.parallelEdges().forEach(function(Pt){Pt.isBundledBezier()&&Pt.dirtyBoundingBoxCache()})})},pu.checkTriggers=function(_t,bt,St,wt){_t.dirtyStyleCache(),this.checkZOrderTrigger(_t,bt,St,wt),this.checkBoundsTrigger(_t,bt,St,wt)};var ny={};ny.applyBypass=function(_t,bt,St,wt){var Nt=this,Pt=[],Lt=!0;if(bt==="*"||bt==="**"){if(St!==void 0)for(var Ht=0;Ht<Nt.properties.length;Ht++){var qt=Nt.properties[Ht],Gt=qt.name,Qt=this.parse(Gt,St,!0);Qt&&Pt.push(Qt)}}else if(Ut(bt)){var hn=this.parse(bt,St,!0);hn&&Pt.push(hn)}else if(gn(bt)){var yn=bt;wt=St;for(var xn=Object.keys(yn),bn=0;bn<xn.length;bn++){var Nn=xn[bn],Pn=yn[Nn];if(Pn===void 0&&(Pn=yn[Er(Nn)]),Pn!==void 0){var Fn=this.parse(Nn,Pn,!0);Fn&&Pt.push(Fn)}}}else return!1;if(Pt.length===0)return!1;for(var Un=!1,Hn=0;Hn<_t.length;Hn++){for(var nr=_t[Hn],mr={},gr=void 0,rr=0;rr<Pt.length;rr++){var hr=Pt[rr];if(wt){var ar=nr.pstyle(hr.name);gr=mr[hr.name]={prev:ar}}Un=this.applyParsedProperty(nr,_l(hr))||Un,wt&&(gr.next=nr.pstyle(hr.name))}Un&&this.updateStyleHints(nr),wt&&this.updateTransitions(nr,mr,Lt)}return Un},ny.overrideBypass=function(_t,bt,St){bt=Ar(bt);for(var wt=0;wt<_t.length;wt++){var Nt=_t[wt],Pt=Nt._private.style[bt],Lt=this.properties[bt].type,Ht=Lt.color,qt=Lt.mutiple,Gt=Pt?Pt.pfValue!=null?Pt.pfValue:Pt.value:null;!Pt||!Pt.bypass?this.applyBypass(Nt,bt,St):(Pt.value=St,Pt.pfValue!=null&&(Pt.pfValue=St),Ht?Pt.strValue="rgb("+St.join(",")+")":qt?Pt.strValue=St.join(" "):Pt.strValue=""+St,this.updateStyleHints(Nt)),this.checkTriggers(Nt,bt,Gt,St)}},ny.removeAllBypasses=function(_t,bt){return this.removeBypasses(_t,this.propertyNames,bt)},ny.removeBypasses=function(_t,bt,St){for(var wt=!0,Nt=0;Nt<_t.length;Nt++){for(var Pt=_t[Nt],Lt={},Ht=0;Ht<bt.length;Ht++){var qt=bt[Ht],Gt=this.properties[qt],Qt=Pt.pstyle(Gt.name);if(!(!Qt||!Qt.bypass)){var hn="",yn=this.parse(qt,hn,!0),xn=Lt[Gt.name]={prev:Qt};this.applyParsedProperty(Pt,yn),xn.next=Pt.pstyle(Gt.name)}}this.updateStyleHints(Pt),St&&this.updateTransitions(Pt,Lt,wt)}};var e1={};e1.getEmSizeInPixels=function(){var _t=this.containerCss("font-size");return _t!=null?parseFloat(_t):1},e1.containerCss=function(_t){var bt=this._private.cy,St=bt.container();if(It&&St&&It.getComputedStyle)return It.getComputedStyle(St).getPropertyValue(_t)};var Np={};Np.getRenderedStyle=function(_t,bt){return bt?this.getStylePropertyValue(_t,bt,!0):this.getRawStyle(_t,!0)},Np.getRawStyle=function(_t,bt){var St=this;if(_t=_t[0],_t){for(var wt={},Nt=0;Nt<St.properties.length;Nt++){var Pt=St.properties[Nt],Lt=St.getStylePropertyValue(_t,Pt.name,bt);Lt!=null&&(wt[Pt.name]=Lt,wt[Er(Pt.name)]=Lt)}return wt}},Np.getIndexedStyle=function(_t,bt,St,wt){var Nt=_t.pstyle(bt)[St][wt];return Nt??_t.cy().style().getDefaultProperty(bt)[St][0]},Np.getStylePropertyValue=function(_t,bt,St){var wt=this;if(_t=_t[0],_t){var Nt=wt.properties[bt];Nt.alias&&(Nt=Nt.pointsTo);var Pt=Nt.type,Lt=_t.pstyle(Nt.name);if(Lt){var Ht=Lt.value,qt=Lt.units,Gt=Lt.strValue;if(St&&Pt.number&&Ht!=null&&sn(Ht)){var Qt=_t.cy().zoom(),hn=function(Pn){return Pn*Qt},yn=function(Pn,Fn){return hn(Pn)+Fn},xn=Jt(Ht),bn=xn?qt.every(function(Nn){return Nn!=null}):qt!=null;return bn?xn?Ht.map(function(Nn,Pn){return yn(Nn,qt[Pn])}).join(" "):yn(Ht,qt):xn?Ht.map(function(Nn){return Ut(Nn)?Nn:""+hn(Nn)}).join(" "):""+hn(Ht)}else if(Gt!=null)return Gt}return null}},Np.getAnimationStartStyle=function(_t,bt){for(var St={},wt=0;wt<bt.length;wt++){var Nt=bt[wt],Pt=Nt.name,Lt=_t.pstyle(Pt);Lt!==void 0&&(gn(Lt)?Lt=this.parse(Pt,Lt.strValue):Lt=this.parse(Pt,Lt)),Lt&&(St[Pt]=Lt)}return St},Np.getPropsList=function(_t){var bt=this,St=[],wt=_t,Nt=bt.properties;if(wt)for(var Pt=Object.keys(wt),Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt],qt=wt[Ht],Gt=Nt[Ht]||Nt[Ar(Ht)],Qt=this.parse(Gt.name,qt);Qt&&St.push(Qt)}return St},Np.getNonDefaultPropertiesHash=function(_t,bt,St){var wt=St.slice(),Nt,Pt,Lt,Ht,qt,Gt;for(qt=0;qt<bt.length;qt++)if(Nt=bt[qt],Pt=_t.pstyle(Nt,!1),Pt!=null)if(Pt.pfValue!=null)wt[0]=Zr(Ht,wt[0]),wt[1]=Wn(Ht,wt[1]);else for(Lt=Pt.strValue,Gt=0;Gt<Lt.length;Gt++)Ht=Lt.charCodeAt(Gt),wt[0]=Zr(Ht,wt[0]),wt[1]=Wn(Ht,wt[1]);return wt},Np.getPropertiesHash=Np.getNonDefaultPropertiesHash;var ry={};ry.appendFromJson=function(_t){for(var bt=this,St=0;St<_t.length;St++){var wt=_t[St],Nt=wt.selector,Pt=wt.style||wt.css,Lt=Object.keys(Pt);bt.selector(Nt);for(var Ht=0;Ht<Lt.length;Ht++){var qt=Lt[Ht],Gt=Pt[qt];bt.css(qt,Gt)}}return bt},ry.fromJson=function(_t){var bt=this;return bt.resetToDefault(),bt.appendFromJson(_t),bt},ry.json=function(){for(var _t=[],bt=this.defaultLength;bt<this.length;bt++){for(var St=this[bt],wt=St.selector,Nt=St.properties,Pt={},Lt=0;Lt<Nt.length;Lt++){var Ht=Nt[Lt];Pt[Ht.name]=Ht.strValue}_t.push({selector:wt?wt.toString():"core",style:Pt})}return _t};var iy={};iy.appendFromString=function(_t){var bt=this,St=this,wt=""+_t,Nt,Pt,Lt;wt=wt.replace(/[/][*](\s|.)+?[*][/]/g,"");function Ht(){wt.length>Nt.length?wt=wt.substr(Nt.length):wt=""}function qt(){Pt.length>Lt.length?Pt=Pt.substr(Lt.length):Pt=""}for(;;){var Gt=wt.match(/^\s*$/);if(Gt)break;var Qt=wt.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!Qt){As("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+wt);break}Nt=Qt[0];var hn=Qt[1];if(hn!=="core"){var yn=new cp(hn);if(yn.invalid){As("Skipping parsing of block: Invalid selector found in string stylesheet: "+hn),Ht();continue}}var xn=Qt[2],bn=!1;Pt=xn;for(var Nn=[];;){var Pn=Pt.match(/^\s*$/);if(Pn)break;var Fn=Pt.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!Fn){As("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+xn),bn=!0;break}Lt=Fn[0];var Un=Fn[1],Hn=Fn[2],nr=bt.properties[Un];if(!nr){As("Skipping property: Invalid property name in: "+Lt),qt();continue}var mr=St.parse(Un,Hn);if(!mr){As("Skipping property: Invalid property definition in: "+Lt),qt();continue}Nn.push({name:Un,val:Hn}),qt()}if(bn){Ht();break}St.selector(hn);for(var gr=0;gr<Nn.length;gr++){var rr=Nn[gr];St.css(rr.name,rr.val)}Ht()}return St},iy.fromString=function(_t){var bt=this;return bt.resetToDefault(),bt.appendFromString(_t),bt};var xu={};(function(){var _t=Ir,bt=ro,St=Xr,wt=Jr,Nt=So,Pt=function(fo){return"^"+fo+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},Lt=function(fo){var vo=_t+"|\\w+|"+bt+"|"+St+"|"+wt+"|"+Nt;return"^"+fo+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+_t+")\\s*\\,\\s*("+_t+")\\s*,\\s*("+vo+")\\s*\\,\\s*("+vo+")\\)$"},Ht=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];xu.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:Pt("data")},layoutData:{mapping:!0,regex:Pt("layoutData")},scratch:{mapping:!0,regex:Pt("scratch")},mapData:{mapping:!0,regex:Lt("mapData")},mapLayoutData:{mapping:!0,regex:Lt("mapLayoutData")},mapScratch:{mapping:!0,regex:Lt("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:Ht,singleRegexMatchValue:!0},urls:{regexes:Ht,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(fo,vo){switch(fo.length){case 2:return vo[0]!=="deg"&&vo[0]!=="rad"&&vo[1]!=="deg"&&vo[1]!=="rad";case 1:return Ut(fo[0])||vo[0]==="deg"||vo[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+_t+")\\s*,\\s*("+_t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+_t+")\\s*,\\s*("+_t+")\\s*,\\s*("+_t+")\\s*,\\s*("+_t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(fo){var vo=fo.length;return vo===1||vo===2||vo===4}}};var qt={zeroNonZero:function(fo,vo){return(fo==null||vo==null)&&fo!==vo||fo==0&&vo!=0?!0:fo!=0&&vo==0},any:function(fo,vo){return fo!=vo},emptyNonEmpty:function(fo,vo){var Io=Gn(fo),Fo=Gn(vo);return Io&&!Fo||!Io&&Fo}},Gt=xu.types,Qt=[{name:"label",type:Gt.text,triggersBounds:qt.any,triggersZOrder:qt.emptyNonEmpty},{name:"text-rotation",type:Gt.textRotation,triggersBounds:qt.any},{name:"text-margin-x",type:Gt.bidirectionalSize,triggersBounds:qt.any},{name:"text-margin-y",type:Gt.bidirectionalSize,triggersBounds:qt.any}],hn=[{name:"source-label",type:Gt.text,triggersBounds:qt.any},{name:"source-text-rotation",type:Gt.textRotation,triggersBounds:qt.any},{name:"source-text-margin-x",type:Gt.bidirectionalSize,triggersBounds:qt.any},{name:"source-text-margin-y",type:Gt.bidirectionalSize,triggersBounds:qt.any},{name:"source-text-offset",type:Gt.size,triggersBounds:qt.any}],yn=[{name:"target-label",type:Gt.text,triggersBounds:qt.any},{name:"target-text-rotation",type:Gt.textRotation,triggersBounds:qt.any},{name:"target-text-margin-x",type:Gt.bidirectionalSize,triggersBounds:qt.any},{name:"target-text-margin-y",type:Gt.bidirectionalSize,triggersBounds:qt.any},{name:"target-text-offset",type:Gt.size,triggersBounds:qt.any}],xn=[{name:"font-family",type:Gt.fontFamily,triggersBounds:qt.any},{name:"font-style",type:Gt.fontStyle,triggersBounds:qt.any},{name:"font-weight",type:Gt.fontWeight,triggersBounds:qt.any},{name:"font-size",type:Gt.size,triggersBounds:qt.any},{name:"text-transform",type:Gt.textTransform,triggersBounds:qt.any},{name:"text-wrap",type:Gt.textWrap,triggersBounds:qt.any},{name:"text-overflow-wrap",type:Gt.textOverflowWrap,triggersBounds:qt.any},{name:"text-max-width",type:Gt.size,triggersBounds:qt.any},{name:"text-outline-width",type:Gt.size,triggersBounds:qt.any},{name:"line-height",type:Gt.positiveNumber,triggersBounds:qt.any}],bn=[{name:"text-valign",type:Gt.valign,triggersBounds:qt.any},{name:"text-halign",type:Gt.halign,triggersBounds:qt.any},{name:"color",type:Gt.color},{name:"text-outline-color",type:Gt.color},{name:"text-outline-opacity",type:Gt.zeroOneNumber},{name:"text-background-color",type:Gt.color},{name:"text-background-opacity",type:Gt.zeroOneNumber},{name:"text-background-padding",type:Gt.size,triggersBounds:qt.any},{name:"text-border-opacity",type:Gt.zeroOneNumber},{name:"text-border-color",type:Gt.color},{name:"text-border-width",type:Gt.size,triggersBounds:qt.any},{name:"text-border-style",type:Gt.borderStyle,triggersBounds:qt.any},{name:"text-background-shape",type:Gt.textBackgroundShape,triggersBounds:qt.any},{name:"text-justification",type:Gt.justification}],Nn=[{name:"events",type:Gt.bool},{name:"text-events",type:Gt.bool}],Pn=[{name:"display",type:Gt.display,triggersZOrder:qt.any,triggersBounds:qt.any,triggersBoundsOfParallelBeziers:!0},{name:"visibility",type:Gt.visibility,triggersZOrder:qt.any},{name:"opacity",type:Gt.zeroOneNumber,triggersZOrder:qt.zeroNonZero},{name:"text-opacity",type:Gt.zeroOneNumber},{name:"min-zoomed-font-size",type:Gt.size},{name:"z-compound-depth",type:Gt.zCompoundDepth,triggersZOrder:qt.any},{name:"z-index-compare",type:Gt.zIndexCompare,triggersZOrder:qt.any},{name:"z-index",type:Gt.nonNegativeInt,triggersZOrder:qt.any}],Fn=[{name:"overlay-padding",type:Gt.size,triggersBounds:qt.any},{name:"overlay-color",type:Gt.color},{name:"overlay-opacity",type:Gt.zeroOneNumber,triggersBounds:qt.zeroNonZero},{name:"overlay-shape",type:Gt.overlayShape,triggersBounds:qt.any}],Un=[{name:"underlay-padding",type:Gt.size,triggersBounds:qt.any},{name:"underlay-color",type:Gt.color},{name:"underlay-opacity",type:Gt.zeroOneNumber,triggersBounds:qt.zeroNonZero},{name:"underlay-shape",type:Gt.overlayShape,triggersBounds:qt.any}],Hn=[{name:"transition-property",type:Gt.propList},{name:"transition-duration",type:Gt.time},{name:"transition-delay",type:Gt.time},{name:"transition-timing-function",type:Gt.easing}],nr=function(fo,vo){return vo.value==="label"?-fo.poolIndex():vo.pfValue},mr=[{name:"height",type:Gt.nodeSize,triggersBounds:qt.any,hashOverride:nr},{name:"width",type:Gt.nodeSize,triggersBounds:qt.any,hashOverride:nr},{name:"shape",type:Gt.nodeShape,triggersBounds:qt.any},{name:"shape-polygon-points",type:Gt.polygonPointList,triggersBounds:qt.any},{name:"background-color",type:Gt.color},{name:"background-fill",type:Gt.fill},{name:"background-opacity",type:Gt.zeroOneNumber},{name:"background-blacken",type:Gt.nOneOneNumber},{name:"background-gradient-stop-colors",type:Gt.colors},{name:"background-gradient-stop-positions",type:Gt.percentages},{name:"background-gradient-direction",type:Gt.gradientDirection},{name:"padding",type:Gt.sizeMaybePercent,triggersBounds:qt.any},{name:"padding-relative-to",type:Gt.paddingRelativeTo,triggersBounds:qt.any},{name:"bounds-expansion",type:Gt.boundsExpansion,triggersBounds:qt.any}],gr=[{name:"border-color",type:Gt.color},{name:"border-opacity",type:Gt.zeroOneNumber},{name:"border-width",type:Gt.size,triggersBounds:qt.any},{name:"border-style",type:Gt.borderStyle}],rr=[{name:"background-image",type:Gt.urls},{name:"background-image-crossorigin",type:Gt.bgCrossOrigin},{name:"background-image-opacity",type:Gt.zeroOneNumbers},{name:"background-image-containment",type:Gt.bgContainment},{name:"background-image-smoothing",type:Gt.bools},{name:"background-position-x",type:Gt.bgPos},{name:"background-position-y",type:Gt.bgPos},{name:"background-width-relative-to",type:Gt.bgRelativeTo},{name:"background-height-relative-to",type:Gt.bgRelativeTo},{name:"background-repeat",type:Gt.bgRepeat},{name:"background-fit",type:Gt.bgFit},{name:"background-clip",type:Gt.bgClip},{name:"background-width",type:Gt.bgWH},{name:"background-height",type:Gt.bgWH},{name:"background-offset-x",type:Gt.bgPos},{name:"background-offset-y",type:Gt.bgPos}],hr=[{name:"position",type:Gt.position,triggersBounds:qt.any},{name:"compound-sizing-wrt-labels",type:Gt.compoundIncludeLabels,triggersBounds:qt.any},{name:"min-width",type:Gt.size,triggersBounds:qt.any},{name:"min-width-bias-left",type:Gt.sizeMaybePercent,triggersBounds:qt.any},{name:"min-width-bias-right",type:Gt.sizeMaybePercent,triggersBounds:qt.any},{name:"min-height",type:Gt.size,triggersBounds:qt.any},{name:"min-height-bias-top",type:Gt.sizeMaybePercent,triggersBounds:qt.any},{name:"min-height-bias-bottom",type:Gt.sizeMaybePercent,triggersBounds:qt.any}],ar=[{name:"line-style",type:Gt.lineStyle},{name:"line-color",type:Gt.color},{name:"line-fill",type:Gt.fill},{name:"line-cap",type:Gt.lineCap},{name:"line-opacity",type:Gt.zeroOneNumber},{name:"line-dash-pattern",type:Gt.numbers},{name:"line-dash-offset",type:Gt.number},{name:"line-gradient-stop-colors",type:Gt.colors},{name:"line-gradient-stop-positions",type:Gt.percentages},{name:"curve-style",type:Gt.curveStyle,triggersBounds:qt.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:Gt.zeroOneNumber,triggersBounds:qt.any},{name:"source-endpoint",type:Gt.edgeEndpoint,triggersBounds:qt.any},{name:"target-endpoint",type:Gt.edgeEndpoint,triggersBounds:qt.any},{name:"control-point-step-size",type:Gt.size,triggersBounds:qt.any},{name:"control-point-distances",type:Gt.bidirectionalSizes,triggersBounds:qt.any},{name:"control-point-weights",type:Gt.numbers,triggersBounds:qt.any},{name:"segment-distances",type:Gt.bidirectionalSizes,triggersBounds:qt.any},{name:"segment-weights",type:Gt.numbers,triggersBounds:qt.any},{name:"taxi-turn",type:Gt.bidirectionalSizeMaybePercent,triggersBounds:qt.any},{name:"taxi-turn-min-distance",type:Gt.size,triggersBounds:qt.any},{name:"taxi-direction",type:Gt.axisDirection,triggersBounds:qt.any},{name:"edge-distances",type:Gt.edgeDistances,triggersBounds:qt.any},{name:"arrow-scale",type:Gt.positiveNumber,triggersBounds:qt.any},{name:"loop-direction",type:Gt.angle,triggersBounds:qt.any},{name:"loop-sweep",type:Gt.angle,triggersBounds:qt.any},{name:"source-distance-from-node",type:Gt.size,triggersBounds:qt.any},{name:"target-distance-from-node",type:Gt.size,triggersBounds:qt.any}],vr=[{name:"ghost",type:Gt.bool,triggersBounds:qt.any},{name:"ghost-offset-x",type:Gt.bidirectionalSize,triggersBounds:qt.any},{name:"ghost-offset-y",type:Gt.bidirectionalSize,triggersBounds:qt.any},{name:"ghost-opacity",type:Gt.zeroOneNumber}],Tr=[{name:"selection-box-color",type:Gt.color},{name:"selection-box-opacity",type:Gt.zeroOneNumber},{name:"selection-box-border-color",type:Gt.color},{name:"selection-box-border-width",type:Gt.size},{name:"active-bg-color",type:Gt.color},{name:"active-bg-opacity",type:Gt.zeroOneNumber},{name:"active-bg-size",type:Gt.size},{name:"outside-texture-bg-color",type:Gt.color},{name:"outside-texture-bg-opacity",type:Gt.zeroOneNumber}],dr=[];xu.pieBackgroundN=16,dr.push({name:"pie-size",type:Gt.sizeMaybePercent});for(var Sr=1;Sr<=xu.pieBackgroundN;Sr++)dr.push({name:"pie-"+Sr+"-background-color",type:Gt.color}),dr.push({name:"pie-"+Sr+"-background-size",type:Gt.percent}),dr.push({name:"pie-"+Sr+"-background-opacity",type:Gt.zeroOneNumber});var yr=[],Fr=xu.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:Gt.arrowShape,triggersBounds:qt.any},{name:"arrow-color",type:Gt.color},{name:"arrow-fill",type:Gt.arrowFill}].forEach(function(Br){Fr.forEach(function(fo){var vo=fo+"-"+Br.name,Io=Br.type,Fo=Br.triggersBounds;yr.push({name:vo,type:Io,triggersBounds:Fo})})},{});var _r=xu.properties=[].concat(Nn,Hn,Pn,Fn,Un,vr,bn,xn,Qt,hn,yn,mr,gr,rr,dr,hr,ar,yr,Tr),Rr=xu.propertyGroups={behavior:Nn,transition:Hn,visibility:Pn,overlay:Fn,underlay:Un,ghost:vr,commonLabel:bn,labelDimensions:xn,mainLabel:Qt,sourceLabel:hn,targetLabel:yn,nodeBody:mr,nodeBorder:gr,backgroundImage:rr,pie:dr,compound:hr,edgeLine:ar,edgeArrow:yr,core:Tr},zr=xu.propertyGroupNames={},Vr=xu.propertyGroupKeys=Object.keys(Rr);Vr.forEach(function(Br){zr[Br]=Rr[Br].map(function(fo){return fo.name}),Rr[Br].forEach(function(fo){return fo.groupKey=Br})});var ga=xu.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];xu.propertyNames=_r.map(function(Br){return Br.name});for(var jr=0;jr<_r.length;jr++){var _i=_r[jr];_r[_i.name]=_i}for(var co=0;co<ga.length;co++){var mo=ga[co],uo=_r[mo.pointsTo],so={name:mo.name,alias:!0,pointsTo:uo};_r.push(so),_r[mo.name]=so}})(),xu.getDefaultProperty=function(_t){return this.getDefaultProperties()[_t]},xu.getDefaultProperties=function(){var _t=this._private;if(_t.defaultProperties!=null)return _t.defaultProperties;for(var bt=Qr({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1,   1, -1,   1, 1,   -1, 1","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(qt,Gt){for(var Qt=1;Qt<=xu.pieBackgroundN;Qt++){var hn=Gt.name.replace("{{i}}",Qt),yn=Gt.value;qt[hn]=yn}return qt},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"taxi-turn":"50%","taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce(function(qt,Gt){return xu.arrowPrefixes.forEach(function(Qt){var hn=Qt+"-"+Gt.name,yn=Gt.value;qt[hn]=yn}),qt},{})),St={},wt=0;wt<this.properties.length;wt++){var Nt=this.properties[wt];if(!Nt.pointsTo){var Pt=Nt.name,Lt=bt[Pt],Ht=this.parse(Pt,Lt);St[Pt]=Ht}}return _t.defaultProperties=St,_t.defaultProperties},xu.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var av={};av.parse=function(_t,bt,St,wt){var Nt=this;if(Xt(bt))return Nt.parseImplWarn(_t,bt,St,wt);var Pt=wt==="mapping"||wt===!0||wt===!1||wt==null?"dontcare":wt,Lt=St?"t":"f",Ht=""+bt,qt=Hr(_t,Ht,Lt,Pt),Gt=Nt.propCache=Nt.propCache||[],Qt;return(Qt=Gt[qt])||(Qt=Gt[qt]=Nt.parseImplWarn(_t,bt,St,wt)),(St||wt==="mapping")&&(Qt=_l(Qt),Qt&&(Qt.value=_l(Qt.value))),Qt},av.parseImplWarn=function(_t,bt,St,wt){var Nt=this.parseImpl(_t,bt,St,wt);return!Nt&&bt!=null&&As("The style property `".concat(_t,": ").concat(bt,"` is invalid")),Nt&&(Nt.name==="width"||Nt.name==="height")&&bt==="label"&&As("The style value of `label` is deprecated for `"+Nt.name+"`"),Nt},av.parseImpl=function(_t,bt,St,wt){var Nt=this;_t=Ar(_t);var Pt=Nt.properties[_t],Lt=bt,Ht=Nt.types;if(!Pt||bt===void 0)return null;Pt.alias&&(Pt=Pt.pointsTo,_t=Pt.name);var qt=Ut(bt);qt&&(bt=bt.trim());var Gt=Pt.type;if(!Gt)return null;if(St&&(bt===""||bt===null))return{name:_t,value:bt,bypass:!0,deleteBypass:!0};if(Xt(bt))return{name:_t,value:bt,strValue:"fn",mapped:Ht.fn,bypass:St};var Qt,hn;if(!(!qt||wt||bt.length<7||bt[1]!=="a")){if(bt.length>=7&&bt[0]==="d"&&(Qt=new RegExp(Ht.data.regex).exec(bt))){if(St)return!1;var yn=Ht.data;return{name:_t,value:Qt,strValue:""+bt,mapped:yn,field:Qt[1],bypass:St}}else if(bt.length>=10&&bt[0]==="m"&&(hn=new RegExp(Ht.mapData.regex).exec(bt))){if(St||Gt.multiple)return!1;var xn=Ht.mapData;if(!(Gt.color||Gt.number))return!1;var bn=this.parse(_t,hn[4]);if(!bn||bn.mapped)return!1;var Nn=this.parse(_t,hn[5]);if(!Nn||Nn.mapped)return!1;if(bn.pfValue===Nn.pfValue||bn.strValue===Nn.strValue)return As("`"+_t+": "+bt+"` is not a valid mapper because the output range is zero; converting to `"+_t+": "+bn.strValue+"`"),this.parse(_t,bn.strValue);if(Gt.color){var Pn=bn.value,Fn=Nn.value,Un=Pn[0]===Fn[0]&&Pn[1]===Fn[1]&&Pn[2]===Fn[2]&&(Pn[3]===Fn[3]||(Pn[3]==null||Pn[3]===1)&&(Fn[3]==null||Fn[3]===1));if(Un)return!1}return{name:_t,value:hn,strValue:""+bt,mapped:xn,field:hn[1],fieldMin:parseFloat(hn[2]),fieldMax:parseFloat(hn[3]),valueMin:bn.value,valueMax:Nn.value,bypass:St}}}if(Gt.multiple&&wt!=="multiple"){var Hn;if(qt?Hn=bt.split(/\s+/):Jt(bt)?Hn=bt:Hn=[bt],Gt.evenMultiple&&Hn.length%2!==0)return null;for(var nr=[],mr=[],gr=[],rr="",hr=!1,ar=0;ar<Hn.length;ar++){var vr=Nt.parse(_t,Hn[ar],St,"multiple");hr=hr||Ut(vr.value),nr.push(vr.value),gr.push(vr.pfValue!=null?vr.pfValue:vr.value),mr.push(vr.units),rr+=(ar>0?" ":"")+vr.strValue}return Gt.validate&&!Gt.validate(nr,mr)?null:Gt.singleEnum&&hr?nr.length===1&&Ut(nr[0])?{name:_t,value:nr[0],strValue:nr[0],bypass:St}:null:{name:_t,value:nr,pfValue:gr,strValue:rr,bypass:St,units:mr}}var Tr=function(){for(var vo=0;vo<Gt.enums.length;vo++){var Io=Gt.enums[vo];if(Io===bt)return{name:_t,value:bt,strValue:""+bt,bypass:St}}return null};if(Gt.number){var dr,Sr="px";if(Gt.units&&(dr=Gt.units),Gt.implicitUnits&&(Sr=Gt.implicitUnits),!Gt.unitless)if(qt){var yr="px|em"+(Gt.allowPercent?"|\\%":"");dr&&(yr=dr);var Fr=bt.match("^("+Ir+")("+yr+")?$");Fr&&(bt=Fr[1],dr=Fr[2]||Sr)}else(!dr||Gt.implicitUnits)&&(dr=Sr);if(bt=parseFloat(bt),isNaN(bt)&&Gt.enums===void 0)return null;if(isNaN(bt)&&Gt.enums!==void 0)return bt=Lt,Tr();if(Gt.integer&&!Sn(bt)||Gt.min!==void 0&&(bt<Gt.min||Gt.strictMin&&bt===Gt.min)||Gt.max!==void 0&&(bt>Gt.max||Gt.strictMax&&bt===Gt.max))return null;var _r={name:_t,value:bt,strValue:""+bt+(dr||""),units:dr,bypass:St};return Gt.unitless||dr!=="px"&&dr!=="em"?_r.pfValue=bt:_r.pfValue=dr==="px"||!dr?bt:this.getEmSizeInPixels()*bt,(dr==="ms"||dr==="s")&&(_r.pfValue=dr==="ms"?bt:1e3*bt),(dr==="deg"||dr==="rad")&&(_r.pfValue=dr==="rad"?bt:Ey(bt)),dr==="%"&&(_r.pfValue=bt/100),_r}else if(Gt.propList){var Rr=[],zr=""+bt;if(zr!=="none"){for(var Vr=zr.split(/\s*,\s*|\s+/),ga=0;ga<Vr.length;ga++){var jr=Vr[ga].trim();Nt.properties[jr]?Rr.push(jr):As("`"+jr+"` is not a valid property name")}if(Rr.length===0)return null}return{name:_t,value:Rr,strValue:Rr.length===0?"none":Rr.join(" "),bypass:St}}else if(Gt.color){var _i=Eo(bt);return _i?{name:_t,value:_i,pfValue:_i,strValue:"rgb("+_i[0]+","+_i[1]+","+_i[2]+")",bypass:St}:null}else if(Gt.regex||Gt.regexes){if(Gt.enums){var co=Tr();if(co)return co}for(var mo=Gt.regexes?Gt.regexes:[Gt.regex],uo=0;uo<mo.length;uo++){var so=new RegExp(mo[uo]),Br=so.exec(bt);if(Br)return{name:_t,value:Gt.singleRegexMatchValue?Br[1]:Br,strValue:""+bt,bypass:St}}return null}else return Gt.string?{name:_t,value:""+bt,strValue:""+bt,bypass:St}:Gt.enums?Tr():null};var Bu=function _t(bt){if(!(this instanceof _t))return new _t(bt);if(!wn(bt)){Os("A style must have a core reference");return}this._private={cy:bt,coreStyle:{}},this.length=0,this.resetToDefault()},Cu=Bu.prototype;Cu.instanceString=function(){return"style"},Cu.clear=function(){for(var _t=this._private,bt=_t.cy,St=bt.elements(),wt=0;wt<this.length;wt++)this[wt]=void 0;return this.length=0,_t.contextStyles={},_t.propDiffs={},this.cleanElements(St,!0),St.forEach(function(Nt){var Pt=Nt[0]._private;Pt.styleDirty=!0,Pt.appliedInitStyle=!1}),this},Cu.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Cu.core=function(_t){return this._private.coreStyle[_t]||this.getDefaultProperty(_t)},Cu.selector=function(_t){var bt=_t==="core"?null:new cp(_t),St=this.length++;return this[St]={selector:bt,properties:[],mappedProperties:[],index:St},this},Cu.css=function(){var _t=this,bt=arguments;if(bt.length===1)for(var St=bt[0],wt=0;wt<_t.properties.length;wt++){var Nt=_t.properties[wt],Pt=St[Nt.name];Pt===void 0&&(Pt=St[Er(Nt.name)]),Pt!==void 0&&this.cssRule(Nt.name,Pt)}else bt.length===2&&this.cssRule(bt[0],bt[1]);return this},Cu.style=Cu.css,Cu.cssRule=function(_t,bt){var St=this.parse(_t,bt);if(St){var wt=this.length-1;this[wt].properties.push(St),this[wt].properties[St.name]=St,St.name.match(/pie-(\d+)-background-size/)&&St.value&&(this._private.hasPie=!0),St.mapped&&this[wt].mappedProperties.push(St);var Nt=!this[wt].selector;Nt&&(this._private.coreStyle[St.name]=St)}return this},Cu.append=function(_t){return Dn(_t)?_t.appendToStyle(this):Jt(_t)?this.appendFromJson(_t):Ut(_t)&&this.appendFromString(_t),this},Bu.fromJson=function(_t,bt){var St=new Bu(_t);return St.fromJson(bt),St},Bu.fromString=function(_t,bt){return new Bu(_t).fromString(bt)},[pu,ny,e1,Np,ry,iy,xu,av].forEach(function(_t){Qr(Cu,_t)}),Bu.types=Cu.types,Bu.properties=Cu.properties,Bu.propertyGroups=Cu.propertyGroups,Bu.propertyGroupNames=Cu.propertyGroupNames,Bu.propertyGroupKeys=Cu.propertyGroupKeys;var bT={style:function(bt){if(bt){var St=this.setStyle(bt);St.update()}return this._private.style},setStyle:function(bt){var St=this._private;return Dn(bt)?St.style=bt.generateStyle(this):Jt(bt)?St.style=Bu.fromJson(this,bt):Ut(bt)?St.style=Bu.fromString(this,bt):St.style=Bu(this),St.style},updateStyle:function(){this.mutableElements().updateStyle()}},g2="single",im={autolock:function(bt){if(bt!==void 0)this._private.autolock=!!bt;else return this._private.autolock;return this},autoungrabify:function(bt){if(bt!==void 0)this._private.autoungrabify=!!bt;else return this._private.autoungrabify;return this},autounselectify:function(bt){if(bt!==void 0)this._private.autounselectify=!!bt;else return this._private.autounselectify;return this},selectionType:function(bt){var St=this._private;if(St.selectionType==null&&(St.selectionType=g2),bt!==void 0)(bt==="additive"||bt==="single")&&(St.selectionType=bt);else return St.selectionType;return this},panningEnabled:function(bt){if(bt!==void 0)this._private.panningEnabled=!!bt;else return this._private.panningEnabled;return this},userPanningEnabled:function(bt){if(bt!==void 0)this._private.userPanningEnabled=!!bt;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(bt){if(bt!==void 0)this._private.zoomingEnabled=!!bt;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(bt){if(bt!==void 0)this._private.userZoomingEnabled=!!bt;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(bt){if(bt!==void 0)this._private.boxSelectionEnabled=!!bt;else return this._private.boxSelectionEnabled;return this},pan:function(){var bt=arguments,St=this._private.pan,wt,Nt,Pt,Lt,Ht;switch(bt.length){case 0:return St;case 1:if(Ut(bt[0]))return wt=bt[0],St[wt];if(gn(bt[0])){if(!this._private.panningEnabled)return this;Pt=bt[0],Lt=Pt.x,Ht=Pt.y,sn(Lt)&&(St.x=Lt),sn(Ht)&&(St.y=Ht),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;wt=bt[0],Nt=bt[1],(wt==="x"||wt==="y")&&sn(Nt)&&(St[wt]=Nt),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(bt,St){var wt=arguments,Nt=this._private.pan,Pt,Lt,Ht,qt,Gt;if(!this._private.panningEnabled)return this;switch(wt.length){case 1:gn(bt)&&(Ht=wt[0],qt=Ht.x,Gt=Ht.y,sn(qt)&&(Nt.x+=qt),sn(Gt)&&(Nt.y+=Gt),this.emit("pan viewport"));break;case 2:Pt=bt,Lt=St,(Pt==="x"||Pt==="y")&&sn(Lt)&&(Nt[Pt]+=Lt),this.emit("pan viewport");break}return this.notify("viewport"),this},fit:function(bt,St){var wt=this.getFitViewport(bt,St);if(wt){var Nt=this._private;Nt.zoom=wt.zoom,Nt.pan=wt.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(bt,St){if(sn(bt)&&St===void 0&&(St=bt,bt=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var wt;if(Ut(bt)){var Nt=bt;bt=this.$(Nt)}else if(zn(bt)){var Pt=bt;wt={x1:Pt.x1,y1:Pt.y1,x2:Pt.x2,y2:Pt.y2},wt.w=wt.x2-wt.x1,wt.h=wt.y2-wt.y1}else _n(bt)||(bt=this.mutableElements());if(!(_n(bt)&&bt.empty())){wt=wt||bt.boundingBox();var Lt=this.width(),Ht=this.height(),qt;if(St=sn(St)?St:0,!isNaN(Lt)&&!isNaN(Ht)&&Lt>0&&Ht>0&&!isNaN(wt.w)&&!isNaN(wt.h)&&wt.w>0&&wt.h>0){qt=Math.min((Lt-2*St)/wt.w,(Ht-2*St)/wt.h),qt=qt>this._private.maxZoom?this._private.maxZoom:qt,qt=qt<this._private.minZoom?this._private.minZoom:qt;var Gt={x:(Lt-qt*(wt.x1+wt.x2))/2,y:(Ht-qt*(wt.y1+wt.y2))/2};return{zoom:qt,pan:Gt}}}}},zoomRange:function(bt,St){var wt=this._private;if(St==null){var Nt=bt;bt=Nt.min,St=Nt.max}return sn(bt)&&sn(St)&&bt<=St?(wt.minZoom=bt,wt.maxZoom=St):sn(bt)&&St===void 0&&bt<=wt.maxZoom?wt.minZoom=bt:sn(St)&&bt===void 0&&St>=wt.minZoom&&(wt.maxZoom=St),this},minZoom:function(bt){return bt===void 0?this._private.minZoom:this.zoomRange({min:bt})},maxZoom:function(bt){return bt===void 0?this._private.maxZoom:this.zoomRange({max:bt})},getZoomedViewport:function(bt){var St=this._private,wt=St.pan,Nt=St.zoom,Pt,Lt,Ht=!1;if(St.zoomingEnabled||(Ht=!0),sn(bt)?Lt=bt:gn(bt)&&(Lt=bt.level,bt.position!=null?Pt=_f(bt.position,Nt,wt):bt.renderedPosition!=null&&(Pt=bt.renderedPosition),Pt!=null&&!St.panningEnabled&&(Ht=!0)),Lt=Lt>St.maxZoom?St.maxZoom:Lt,Lt=Lt<St.minZoom?St.minZoom:Lt,Ht||!sn(Lt)||Lt===Nt||Pt!=null&&(!sn(Pt.x)||!sn(Pt.y)))return null;if(Pt!=null){var qt=wt,Gt=Nt,Qt=Lt,hn={x:-Qt/Gt*(Pt.x-qt.x)+Pt.x,y:-Qt/Gt*(Pt.y-qt.y)+Pt.y};return{zoomed:!0,panned:!0,zoom:Qt,pan:hn}}else return{zoomed:!0,panned:!1,zoom:Lt,pan:wt}},zoom:function(bt){if(bt===void 0)return this._private.zoom;var St=this.getZoomedViewport(bt),wt=this._private;return St==null||!St.zoomed?this:(wt.zoom=St.zoom,St.panned&&(wt.pan.x=St.pan.x,wt.pan.y=St.pan.y),this.emit("zoom"+(St.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(bt){var St=this._private,wt=!0,Nt=!0,Pt=[],Lt=!1,Ht=!1;if(!bt)return this;if(sn(bt.zoom)||(wt=!1),gn(bt.pan)||(Nt=!1),!wt&&!Nt)return this;if(wt){var qt=bt.zoom;qt<St.minZoom||qt>St.maxZoom||!St.zoomingEnabled?Lt=!0:(St.zoom=qt,Pt.push("zoom"))}if(Nt&&(!Lt||!bt.cancelOnFailedZoom)&&St.panningEnabled){var Gt=bt.pan;sn(Gt.x)&&(St.pan.x=Gt.x,Ht=!1),sn(Gt.y)&&(St.pan.y=Gt.y,Ht=!1),Ht||Pt.push("pan")}return Pt.length>0&&(Pt.push("viewport"),this.emit(Pt.join(" ")),this.notify("viewport")),this},center:function(bt){var St=this.getCenterPan(bt);return St&&(this._private.pan=St,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(bt,St){if(!!this._private.panningEnabled){if(Ut(bt)){var wt=bt;bt=this.mutableElements().filter(wt)}else _n(bt)||(bt=this.mutableElements());if(bt.length!==0){var Nt=bt.boundingBox(),Pt=this.width(),Lt=this.height();St=St===void 0?this._private.zoom:St;var Ht={x:(Pt-St*(Nt.x1+Nt.x2))/2,y:(Lt-St*(Nt.y1+Nt.y2))/2};return Ht}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var bt=this._private,St=bt.container;return bt.sizeCache=bt.sizeCache||(St?function(){var wt=It.getComputedStyle(St),Nt=function(Lt){return parseFloat(wt.getPropertyValue(Lt))};return{width:St.clientWidth-Nt("padding-left")-Nt("padding-right"),height:St.clientHeight-Nt("padding-top")-Nt("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var bt=this._private.pan,St=this._private.zoom,wt=this.renderedExtent(),Nt={x1:(wt.x1-bt.x)/St,x2:(wt.x2-bt.x)/St,y1:(wt.y1-bt.y)/St,y2:(wt.y2-bt.y)/St};return Nt.w=Nt.x2-Nt.x1,Nt.h=Nt.y2-Nt.y1,Nt},renderedExtent:function(){var bt=this.width(),St=this.height();return{x1:0,y1:0,x2:bt,y2:St,w:bt,h:St}},multiClickDebounceTime:function(bt){if(bt)this._private.multiClickDebounceTime=bt;else return this._private.multiClickDebounceTime;return this}};im.centre=im.center,im.autolockNodes=im.autolock,im.autoungrabifyNodes=im.autoungrabify;var o0={data:yl.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:yl.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:yl.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:yl.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};o0.attr=o0.data,o0.removeAttr=o0.removeData;var hu=function(bt){var St=this;bt=Qr({},bt);var wt=bt.container;wt&&!In(wt)&&In(wt[0])&&(wt=wt[0]);var Nt=wt?wt._cyreg:null;Nt=Nt||{},Nt&&Nt.cy&&(Nt.cy.destroy(),Nt={});var Pt=Nt.readies=Nt.readies||[];wt&&(wt._cyreg=Nt),Nt.cy=St;var Lt=It!==void 0&&wt!==void 0&&!bt.headless,Ht=bt;Ht.layout=Qr({name:Lt?"grid":"null"},Ht.layout),Ht.renderer=Qr({name:Lt?"canvas":"null"},Ht.renderer);var qt=function(bn,Nn,Pn){return Nn!==void 0?Nn:Pn!==void 0?Pn:bn},Gt=this._private={container:wt,ready:!1,options:Ht,elements:new ou(this),listeners:[],aniEles:new ou(this),data:Ht.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:qt(!0,Ht.zoomingEnabled),userZoomingEnabled:qt(!0,Ht.userZoomingEnabled),panningEnabled:qt(!0,Ht.panningEnabled),userPanningEnabled:qt(!0,Ht.userPanningEnabled),boxSelectionEnabled:qt(!0,Ht.boxSelectionEnabled),autolock:qt(!1,Ht.autolock,Ht.autolockNodes),autoungrabify:qt(!1,Ht.autoungrabify,Ht.autoungrabifyNodes),autounselectify:qt(!1,Ht.autounselectify),styleEnabled:Ht.styleEnabled===void 0?Lt:Ht.styleEnabled,zoom:sn(Ht.zoom)?Ht.zoom:1,pan:{x:gn(Ht.pan)&&sn(Ht.pan.x)?Ht.pan.x:0,y:gn(Ht.pan)&&sn(Ht.pan.y)?Ht.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:qt(250,Ht.multiClickDebounceTime)};this.createEmitter(),this.selectionType(Ht.selectionType),this.zoomRange({min:Ht.minZoom,max:Ht.maxZoom});var Qt=function(bn,Nn){var Pn=bn.some(Qn);if(Pn)return Op.all(bn).then(Nn);Nn(bn)};Gt.styleEnabled&&St.setStyle([]);var hn=Qr({},Ht,Ht.renderer);St.initRenderer(hn);var yn=function(bn,Nn,Pn){St.notifications(!1);var Fn=St.mutableElements();Fn.length>0&&Fn.remove(),bn!=null&&(gn(bn)||Jt(bn))&&St.add(bn),St.one("layoutready",function(Hn){St.notifications(!0),St.emit(Hn),St.one("load",Nn),St.emitAndNotify("load")}).one("layoutstop",function(){St.one("done",Pn),St.emit("done")});var Un=Qr({},St._private.options.layout);Un.eles=St.elements(),St.layout(Un).run()};Qt([Ht.style,Ht.elements],function(xn){var bn=xn[0],Nn=xn[1];Gt.styleEnabled&&St.style().append(bn),yn(Nn,function(){St.startAnimationLoop(),Gt.ready=!0,Xt(Ht.ready)&&St.on("ready",Ht.ready);for(var Pn=0;Pn<Pt.length;Pn++){var Fn=Pt[Pn];St.on("ready",Fn)}Nt&&(Nt.readies=[]),St.emit("ready")},Ht.done)})},ip=hu.prototype;Qr(ip,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(bt){return this.isReady()?this.emitter().emit("ready",[],bt):this.on("ready",bt),this},destroy:function(){var bt=this;if(!bt.destroyed())return bt.stopAnimationLoop(),bt.destroyRenderer(),this.emit("destroy"),bt._private.destroyed=!0,bt},hasElementWithId:function(bt){return this._private.elements.hasElementWithId(bt)},getElementById:function(bt){return this._private.elements.getElementById(bt)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(bt){return this._private.elements.merge(bt),this},removeFromPool:function(bt){return this._private.elements.unmerge(bt),this},container:function(){return this._private.container||null},mount:function(bt){if(bt!=null){var St=this,wt=St._private,Nt=wt.options;return!In(bt)&&In(bt[0])&&(bt=bt[0]),St.stopAnimationLoop(),St.destroyRenderer(),wt.container=bt,wt.styleEnabled=!0,St.invalidateSize(),St.initRenderer(Qr({},Nt,Nt.renderer,{name:Nt.renderer.name==="null"?"canvas":Nt.renderer.name})),St.startAnimationLoop(),St.style(Nt.style),St.emit("mount"),St}},unmount:function(){var bt=this;return bt.stopAnimationLoop(),bt.destroyRenderer(),bt.initRenderer({name:"null"}),bt.emit("unmount"),bt},options:function(){return _l(this._private.options)},json:function(bt){var St=this,wt=St._private,Nt=St.mutableElements(),Pt=function(nr){return St.getElementById(nr.id())};if(gn(bt)){if(St.startBatch(),bt.elements){var Lt={},Ht=function(nr,mr){for(var gr=[],rr=[],hr=0;hr<nr.length;hr++){var ar=nr[hr];if(!ar.data.id){As("cy.json() cannot handle elements without an ID attribute");continue}var vr=""+ar.data.id,Tr=St.getElementById(vr);Lt[vr]=!0,Tr.length!==0?rr.push({ele:Tr,json:ar}):(mr&&(ar.group=mr),gr.push(ar))}St.add(gr);for(var dr=0;dr<rr.length;dr++){var Sr=rr[dr],yr=Sr.ele,Fr=Sr.json;yr.json(Fr)}};if(Jt(bt.elements))Ht(bt.elements);else for(var qt=["nodes","edges"],Gt=0;Gt<qt.length;Gt++){var Qt=qt[Gt],hn=bt.elements[Qt];Jt(hn)&&Ht(hn,Qt)}var yn=St.collection();Nt.filter(function(Hn){return!Lt[Hn.id()]}).forEach(function(Hn){Hn.isParent()?yn.merge(Hn):Hn.remove()}),yn.forEach(function(Hn){return Hn.children().move({parent:null})}),yn.forEach(function(Hn){return Pt(Hn).remove()})}bt.style&&St.style(bt.style),bt.zoom!=null&&bt.zoom!==wt.zoom&&St.zoom(bt.zoom),bt.pan&&(bt.pan.x!==wt.pan.x||bt.pan.y!==wt.pan.y)&&St.pan(bt.pan),bt.data&&St.data(bt.data);for(var xn=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],bn=0;bn<xn.length;bn++){var Nn=xn[bn];bt[Nn]!=null&&St[Nn](bt[Nn])}return St.endBatch(),this}else{var Pn=!!bt,Fn={};Pn?Fn.elements=this.elements().map(function(Hn){return Hn.json()}):(Fn.elements={},Nt.forEach(function(Hn){var nr=Hn.group();Fn.elements[nr]||(Fn.elements[nr]=[]),Fn.elements[nr].push(Hn.json())})),this._private.styleEnabled&&(Fn.style=St.style().json()),Fn.data=_l(St.data());var Un=wt.options;return Fn.zoomingEnabled=wt.zoomingEnabled,Fn.userZoomingEnabled=wt.userZoomingEnabled,Fn.zoom=wt.zoom,Fn.minZoom=wt.minZoom,Fn.maxZoom=wt.maxZoom,Fn.panningEnabled=wt.panningEnabled,Fn.userPanningEnabled=wt.userPanningEnabled,Fn.pan=_l(wt.pan),Fn.boxSelectionEnabled=wt.boxSelectionEnabled,Fn.renderer=_l(Un.renderer),Fn.hideEdgesOnViewport=Un.hideEdgesOnViewport,Fn.textureOnViewport=Un.textureOnViewport,Fn.wheelSensitivity=Un.wheelSensitivity,Fn.motionBlur=Un.motionBlur,Fn.multiClickDebounceTime=Un.multiClickDebounceTime,Fn}}}),ip.$id=ip.getElementById,[zv,gT,S1,J0,_g,iv,ey,ty,bT,im,o0].forEach(function(_t){Qr(ip,_t)});var y2={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(bt,St){return!0},ready:void 0,stop:void 0,transform:function(bt,St){return St}},v2={maximal:!1,acyclic:!1},_1=function(bt){return bt.scratch("breadthfirst")},$m=function(bt,St){return bt.scratch("breadthfirst",St)};function jv(_t){this.options=Qr({},y2,v2,_t)}jv.prototype.run=function(){var _t=this.options,bt=_t,St=_t.cy,wt=bt.eles,Nt=wt.nodes().filter(function(Wo){return!Wo.isParent()}),Pt=wt,Lt=bt.directed,Ht=bt.acyclic||bt.maximal||bt.maximalAdjustments>0,qt=Iu(bt.boundingBox?bt.boundingBox:{x1:0,y1:0,w:St.width(),h:St.height()}),Gt;if(_n(bt.roots))Gt=bt.roots;else if(Jt(bt.roots)){for(var Qt=[],hn=0;hn<bt.roots.length;hn++){var yn=bt.roots[hn],xn=St.getElementById(yn);Qt.push(xn)}Gt=St.collection(Qt)}else if(Ut(bt.roots))Gt=St.$(bt.roots);else if(Lt)Gt=Nt.roots();else{var bn=wt.components();Gt=St.collection();for(var Nn=function(Po){var ps=bn[Po],Ao=ps.maxDegree(!1),Uo=ps.filter(function(Ko){return Ko.degree(!1)===Ao});Gt=Gt.add(Uo)},Pn=0;Pn<bn.length;Pn++)Nn(Pn)}var Fn=[],Un={},Hn=function(Po,ps){Fn[ps]==null&&(Fn[ps]=[]);var Ao=Fn[ps].length;Fn[ps].push(Po),$m(Po,{index:Ao,depth:ps})},nr=function(Po,ps){var Ao=_1(Po),Uo=Ao.depth,Ko=Ao.index;Fn[Uo][Ko]=null,Hn(Po,ps)};Pt.bfs({roots:Gt,directed:bt.directed,visit:function(Po,ps,Ao,Uo,Ko){var gs=Po[0],zs=gs.id();Hn(gs,Ko),Un[zs]=!0}});for(var mr=[],gr=0;gr<Nt.length;gr++){var rr=Nt[gr];Un[rr.id()]||mr.push(rr)}var hr=function(Po){for(var ps=Fn[Po],Ao=0;Ao<ps.length;Ao++){var Uo=ps[Ao];if(Uo==null){ps.splice(Ao,1),Ao--;continue}$m(Uo,{depth:Po,index:Ao})}},ar=function(){for(var Po=0;Po<Fn.length;Po++)hr(Po)},vr=function(Po,ps){for(var Ao=_1(Po),Uo=Po.incomers().filter(function(Gr){return Gr.isNode()&&wt.has(Gr)}),Ko=-1,gs=Po.id(),zs=0;zs<Uo.length;zs++){var ys=Uo[zs],Oo=_1(ys);Ko=Math.max(Ko,Oo.depth)}if(Ao.depth<=Ko){if(!bt.acyclic&&ps[gs])return null;var ur=Ko+1;return nr(Po,ur),ps[gs]=ur,!0}return!1};if(Lt&&Ht){var Tr=[],dr={},Sr=function(Po){return Tr.push(Po)},yr=function(){return Tr.shift()};for(Nt.forEach(function(Wo){return Tr.push(Wo)});Tr.length>0;){var Fr=yr(),_r=vr(Fr,dr);if(_r)Fr.outgoers().filter(function(Wo){return Wo.isNode()&&wt.has(Wo)}).forEach(Sr);else if(_r===null){As("Detected double maximal shift for node `"+Fr.id()+"`.  Bailing maximal adjustment due to cycle.  Use `options.maximal: true` only on DAGs.");break}}}ar();var Rr=0;if(bt.avoidOverlap)for(var zr=0;zr<Nt.length;zr++){var Vr=Nt[zr],ga=Vr.layoutDimensions(bt),jr=ga.w,_i=ga.h;Rr=Math.max(Rr,jr,_i)}var co={},mo=function(Po){if(co[Po.id()])return co[Po.id()];for(var ps=_1(Po).depth,Ao=Po.neighborhood(),Uo=0,Ko=0,gs=0;gs<Ao.length;gs++){var zs=Ao[gs];if(!(zs.isEdge()||zs.isParent()||!Nt.has(zs))){var ys=_1(zs);if(ys!=null){var Oo=ys.index,ur=ys.depth;if(!(Oo==null||ur==null)){var Gr=Fn[ur].length;ur<ps&&(Uo+=Oo/Gr,Ko++)}}}}return Ko=Math.max(1,Ko),Uo=Uo/Ko,Ko===0&&(Uo=0),co[Po.id()]=Uo,Uo},uo=function(Po,ps){var Ao=mo(Po),Uo=mo(ps),Ko=Ao-Uo;return Ko===0?va(Po.id(),ps.id()):Ko};bt.depthSort!==void 0&&(uo=bt.depthSort);for(var so=0;so<Fn.length;so++)Fn[so].sort(uo),hr(so);for(var Br=[],fo=0;fo<mr.length;fo++)Br.push(mr[fo]);Fn.unshift(Br),ar();for(var vo=0,Io=0;Io<Fn.length;Io++)vo=Math.max(Fn[Io].length,vo);var Fo={x:qt.x1+qt.w/2,y:qt.x1+qt.h/2},Is=Fn.reduce(function(Wo,Po){return Math.max(Wo,Po.length)},0),Ss=function(Po){var ps=_1(Po),Ao=ps.depth,Uo=ps.index,Ko=Fn[Ao].length,gs=Math.max(qt.w/((bt.grid?Is:Ko)+1),Rr),zs=Math.max(qt.h/(Fn.length+1),Rr),ys=Math.min(qt.w/2/Fn.length,qt.h/2/Fn.length);if(ys=Math.max(ys,Rr),bt.circle){var ur=ys*Ao+ys-(Fn.length>0&&Fn[0].length<=3?ys/2:0),Gr=2*Math.PI/Fn[Ao].length*Uo;return Ao===0&&Fn[0].length===1&&(ur=1),{x:Fo.x+ur*Math.cos(Gr),y:Fo.y+ur*Math.sin(Gr)}}else{var Oo={x:Fo.x+(Uo+1-(Ko+1)/2)*gs,y:(Ao+1)*zs};return Oo}};return wt.nodes().layoutPositions(this,bt,Ss),this};var TT={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(bt,St){return!0},ready:void 0,stop:void 0,transform:function(bt,St){return St}};function ET(_t){this.options=Qr({},TT,_t)}ET.prototype.run=function(){var _t=this.options,bt=_t,St=_t.cy,wt=bt.eles,Nt=bt.counterclockwise!==void 0?!bt.counterclockwise:bt.clockwise,Pt=wt.nodes().not(":parent");bt.sort&&(Pt=Pt.sort(bt.sort));for(var Lt=Iu(bt.boundingBox?bt.boundingBox:{x1:0,y1:0,w:St.width(),h:St.height()}),Ht={x:Lt.x1+Lt.w/2,y:Lt.y1+Lt.h/2},qt=bt.sweep===void 0?2*Math.PI-2*Math.PI/Pt.length:bt.sweep,Gt=qt/Math.max(1,Pt.length-1),Qt,hn=0,yn=0;yn<Pt.length;yn++){var xn=Pt[yn],bn=xn.layoutDimensions(bt),Nn=bn.w,Pn=bn.h;hn=Math.max(hn,Nn,Pn)}if(sn(bt.radius)?Qt=bt.radius:Pt.length<=1?Qt=0:Qt=Math.min(Lt.h,Lt.w)/2-hn,Pt.length>1&&bt.avoidOverlap){hn*=1.75;var Fn=Math.cos(Gt)-Math.cos(0),Un=Math.sin(Gt)-Math.sin(0),Hn=Math.sqrt(hn*hn/(Fn*Fn+Un*Un));Qt=Math.max(Hn,Qt)}var nr=function(gr,rr){var hr=bt.startAngle+rr*Gt*(Nt?1:-1),ar=Qt*Math.cos(hr),vr=Qt*Math.sin(hr),Tr={x:Ht.x+ar,y:Ht.y+vr};return Tr};return wt.nodes().layoutPositions(this,bt,nr),this};var AT={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(bt){return bt.degree()},levelWidth:function(bt){return bt.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(bt,St){return!0},ready:void 0,stop:void 0,transform:function(bt,St){return St}};function wm(_t){this.options=Qr({},AT,_t)}wm.prototype.run=function(){for(var _t=this.options,bt=_t,St=bt.counterclockwise!==void 0?!bt.counterclockwise:bt.clockwise,wt=_t.cy,Nt=bt.eles,Pt=Nt.nodes().not(":parent"),Lt=Iu(bt.boundingBox?bt.boundingBox:{x1:0,y1:0,w:wt.width(),h:wt.height()}),Ht={x:Lt.x1+Lt.w/2,y:Lt.y1+Lt.h/2},qt=[],Gt=0,Qt=0;Qt<Pt.length;Qt++){var hn=Pt[Qt],yn=void 0;yn=bt.concentric(hn),qt.push({value:yn,node:hn}),hn._private.scratch.concentric=yn}Pt.updateStyle();for(var xn=0;xn<Pt.length;xn++){var bn=Pt[xn],Nn=bn.layoutDimensions(bt);Gt=Math.max(Gt,Nn.w,Nn.h)}qt.sort(function(Wo,Po){return Po.value-Wo.value});for(var Pn=bt.levelWidth(Pt),Fn=[[]],Un=Fn[0],Hn=0;Hn<qt.length;Hn++){var nr=qt[Hn];if(Un.length>0){var mr=Math.abs(Un[0].value-nr.value);mr>=Pn&&(Un=[],Fn.push(Un))}Un.push(nr)}var gr=Gt+bt.minNodeSpacing;if(!bt.avoidOverlap){var rr=Fn.length>0&&Fn[0].length>1,hr=Math.min(Lt.w,Lt.h)/2-gr,ar=hr/(Fn.length+rr?1:0);gr=Math.min(gr,ar)}for(var vr=0,Tr=0;Tr<Fn.length;Tr++){var dr=Fn[Tr],Sr=bt.sweep===void 0?2*Math.PI-2*Math.PI/dr.length:bt.sweep,yr=dr.dTheta=Sr/Math.max(1,dr.length-1);if(dr.length>1&&bt.avoidOverlap){var Fr=Math.cos(yr)-Math.cos(0),_r=Math.sin(yr)-Math.sin(0),Rr=Math.sqrt(gr*gr/(Fr*Fr+_r*_r));vr=Math.max(Rr,vr)}dr.r=vr,vr+=gr}if(bt.equidistant){for(var zr=0,Vr=0,ga=0;ga<Fn.length;ga++){var jr=Fn[ga],_i=jr.r-Vr;zr=Math.max(zr,_i)}Vr=0;for(var co=0;co<Fn.length;co++){var mo=Fn[co];co===0&&(Vr=mo.r),mo.r=Vr,Vr+=zr}}for(var uo={},so=0;so<Fn.length;so++)for(var Br=Fn[so],fo=Br.dTheta,vo=Br.r,Io=0;Io<Br.length;Io++){var Fo=Br[Io],Is=bt.startAngle+(St?1:-1)*fo*Io,Ss={x:Ht.x+vo*Math.cos(Is),y:Ht.y+vo*Math.sin(Is)};uo[Fo.node.id()]=Ss}return Nt.nodes().layoutPositions(this,bt,function(Wo){var Po=Wo.id();return uo[Po]}),this};var Om,b2={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(bt,St){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(bt){return 2048},nodeOverlap:4,idealEdgeLength:function(bt){return 32},edgeElasticity:function(bt){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function ay(_t){this.options=Qr({},b2,_t),this.options.layout=this}ay.prototype.run=function(){var _t=this.options,bt=_t.cy,St=this;St.stopped=!1,(_t.animate===!0||_t.animate===!1)&&St.emit({type:"layoutstart",layout:St}),_t.debug===!0?Om=!0:Om=!1;var wt=xT(bt,St,_t);Om&&sv(wt),_t.randomize&&Hv(wt);var Nt=Es(),Pt=function(){T2(wt,bt,_t),_t.fit===!0&&bt.fit(_t.padding)},Lt=function(yn){return!(St.stopped||yn>=_t.numIter||(ST(wt,_t),wt.temperature=wt.temperature*_t.coolingFactor,wt.temperature<_t.minTemp))},Ht=function(){if(_t.animate===!0||_t.animate===!1)Pt(),St.one("layoutstop",_t.stop),St.emit({type:"layoutstop",layout:St});else{var yn=_t.eles.nodes(),xn=oy(wt,_t,yn);yn.layoutPositions(St,_t,xn)}},qt=0,Gt=!0;if(_t.animate===!0){var Qt=function hn(){for(var yn=0;Gt&&yn<_t.refresh;)Gt=Lt(qt),qt++,yn++;if(!Gt)OT(wt,_t),Ht();else{var xn=Es();xn-Nt>=_t.animationThreshold&&Pt(),Gs(hn)}};Qt()}else{for(;Gt;)Gt=Lt(qt),qt++;OT(wt,_t),Ht()}return this},ay.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},ay.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var xT=function(bt,St,wt){for(var Nt=wt.eles.edges(),Pt=wt.eles.nodes(),Lt=Iu(wt.boundingBox?wt.boundingBox:{x1:0,y1:0,w:bt.width(),h:bt.height()}),Ht={isCompound:bt.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:Pt.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:Nt.size(),temperature:wt.initialTemp,clientWidth:Lt.w,clientHeight:Lt.h,boundingBox:Lt},qt=wt.eles.components(),Gt={},Qt=0;Qt<qt.length;Qt++)for(var hn=qt[Qt],yn=0;yn<hn.length;yn++){var xn=hn[yn];Gt[xn.id()]=Qt}for(var Qt=0;Qt<Ht.nodeSize;Qt++){var bn=Pt[Qt],Nn=bn.layoutDimensions(wt),Pn={};Pn.isLocked=bn.locked(),Pn.id=bn.data("id"),Pn.parentId=bn.data("parent"),Pn.cmptId=Gt[bn.id()],Pn.children=[],Pn.positionX=bn.position("x"),Pn.positionY=bn.position("y"),Pn.offsetX=0,Pn.offsetY=0,Pn.height=Nn.w,Pn.width=Nn.h,Pn.maxX=Pn.positionX+Pn.width/2,Pn.minX=Pn.positionX-Pn.width/2,Pn.maxY=Pn.positionY+Pn.height/2,Pn.minY=Pn.positionY-Pn.height/2,Pn.padLeft=parseFloat(bn.style("padding")),Pn.padRight=parseFloat(bn.style("padding")),Pn.padTop=parseFloat(bn.style("padding")),Pn.padBottom=parseFloat(bn.style("padding")),Pn.nodeRepulsion=Xt(wt.nodeRepulsion)?wt.nodeRepulsion(bn):wt.nodeRepulsion,Ht.layoutNodes.push(Pn),Ht.idToIndex[Pn.id]=Qt}for(var Fn=[],Un=0,Hn=-1,nr=[],Qt=0;Qt<Ht.nodeSize;Qt++){var bn=Ht.layoutNodes[Qt],mr=bn.parentId;mr!=null?Ht.layoutNodes[Ht.idToIndex[mr]].children.push(bn.id):(Fn[++Hn]=bn.id,nr.push(bn.id))}for(Ht.graphSet.push(nr);Un<=Hn;){var gr=Fn[Un++],rr=Ht.idToIndex[gr],xn=Ht.layoutNodes[rr],hr=xn.children;if(hr.length>0){Ht.graphSet.push(hr);for(var Qt=0;Qt<hr.length;Qt++)Fn[++Hn]=hr[Qt]}}for(var Qt=0;Qt<Ht.graphSet.length;Qt++)for(var ar=Ht.graphSet[Qt],yn=0;yn<ar.length;yn++){var vr=Ht.idToIndex[ar[yn]];Ht.indexToGraph[vr]=Qt}for(var Qt=0;Qt<Ht.edgeSize;Qt++){var Tr=Nt[Qt],dr={};dr.id=Tr.data("id"),dr.sourceId=Tr.data("source"),dr.targetId=Tr.data("target");var Sr=Xt(wt.idealEdgeLength)?wt.idealEdgeLength(Tr):wt.idealEdgeLength,yr=Xt(wt.edgeElasticity)?wt.edgeElasticity(Tr):wt.edgeElasticity,Fr=Ht.idToIndex[dr.sourceId],_r=Ht.idToIndex[dr.targetId],Rr=Ht.indexToGraph[Fr],zr=Ht.indexToGraph[_r];if(Rr!=zr){for(var Vr=ov(dr.sourceId,dr.targetId,Ht),ga=Ht.graphSet[Vr],jr=0,Pn=Ht.layoutNodes[Fr];ga.indexOf(Pn.id)===-1;)Pn=Ht.layoutNodes[Ht.idToIndex[Pn.parentId]],jr++;for(Pn=Ht.layoutNodes[_r];ga.indexOf(Pn.id)===-1;)Pn=Ht.layoutNodes[Ht.idToIndex[Pn.parentId]],jr++;Sr*=jr*wt.nestingFactor}dr.idealLength=Sr,dr.elasticity=yr,Ht.layoutEdges.push(dr)}return Ht},ov=function(bt,St,wt){var Nt=CT(bt,St,0,wt);return 2>Nt.count?0:Nt.graph},CT=function _t(bt,St,wt,Nt){var Pt=Nt.graphSet[wt];if(-1<Pt.indexOf(bt)&&-1<Pt.indexOf(St))return{count:2,graph:wt};for(var Lt=0,Ht=0;Ht<Pt.length;Ht++){var qt=Pt[Ht],Gt=Nt.idToIndex[qt],Qt=Nt.layoutNodes[Gt].children;if(Qt.length!==0){var hn=Nt.indexToGraph[Nt.idToIndex[Qt[0]]],yn=_t(bt,St,hn,Nt);if(yn.count!==0)if(yn.count===1){if(Lt++,Lt===2)break}else return yn}}return{count:Lt,graph:wt}},sv,Hv=function(bt,St){for(var wt=bt.clientWidth,Nt=bt.clientHeight,Pt=0;Pt<bt.nodeSize;Pt++){var Lt=bt.layoutNodes[Pt];Lt.children.length===0&&!Lt.isLocked&&(Lt.positionX=Math.random()*wt,Lt.positionY=Math.random()*Nt)}},oy=function(bt,St,wt){var Nt=bt.boundingBox,Pt={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return St.boundingBox&&(wt.forEach(function(Lt){var Ht=bt.layoutNodes[bt.idToIndex[Lt.data("id")]];Pt.x1=Math.min(Pt.x1,Ht.positionX),Pt.x2=Math.max(Pt.x2,Ht.positionX),Pt.y1=Math.min(Pt.y1,Ht.positionY),Pt.y2=Math.max(Pt.y2,Ht.positionY)}),Pt.w=Pt.x2-Pt.x1,Pt.h=Pt.y2-Pt.y1),function(Lt,Ht){var qt=bt.layoutNodes[bt.idToIndex[Lt.data("id")]];if(St.boundingBox){var Gt=(qt.positionX-Pt.x1)/Pt.w,Qt=(qt.positionY-Pt.y1)/Pt.h;return{x:Nt.x1+Gt*Nt.w,y:Nt.y1+Qt*Nt.h}}else return{x:qt.positionX,y:qt.positionY}}},T2=function(bt,St,wt){var Nt=wt.layout,Pt=wt.eles.nodes(),Lt=oy(bt,wt,Pt);Pt.positions(Lt),bt.ready!==!0&&(bt.ready=!0,Nt.one("layoutready",wt.ready),Nt.emit({type:"layoutready",layout:this}))},ST=function(bt,St,wt){lv(bt,St),$1(bt),_T(bt,St),$T(bt),x2(bt)},lv=function(bt,St){for(var wt=0;wt<bt.graphSet.length;wt++)for(var Nt=bt.graphSet[wt],Pt=Nt.length,Lt=0;Lt<Pt;Lt++)for(var Ht=bt.layoutNodes[bt.idToIndex[Nt[Lt]]],qt=Lt+1;qt<Pt;qt++){var Gt=bt.layoutNodes[bt.idToIndex[Nt[qt]]];Vv(Ht,Gt,bt,St)}},Uv=function(bt){return-bt+2*bt*Math.random()},Vv=function(bt,St,wt,Nt){var Pt=bt.cmptId,Lt=St.cmptId;if(!(Pt!==Lt&&!wt.isCompound)){var Ht=St.positionX-bt.positionX,qt=St.positionY-bt.positionY,Gt=1;Ht===0&&qt===0&&(Ht=Uv(Gt),qt=Uv(Gt));var Qt=E2(bt,St,Ht,qt);if(Qt>0)var hn=Nt.nodeOverlap*Qt,yn=Math.sqrt(Ht*Ht+qt*qt),xn=hn*Ht/yn,bn=hn*qt/yn;else var Nn=sy(bt,Ht,qt),Pn=sy(St,-1*Ht,-1*qt),Fn=Pn.x-Nn.x,Un=Pn.y-Nn.y,Hn=Fn*Fn+Un*Un,yn=Math.sqrt(Hn),hn=(bt.nodeRepulsion+St.nodeRepulsion)/Hn,xn=hn*Fn/yn,bn=hn*Un/yn;bt.isLocked||(bt.offsetX-=xn,bt.offsetY-=bn),St.isLocked||(St.offsetX+=xn,St.offsetY+=bn)}},E2=function(bt,St,wt,Nt){if(wt>0)var Pt=bt.maxX-St.minX;else var Pt=St.maxX-bt.minX;if(Nt>0)var Lt=bt.maxY-St.minY;else var Lt=St.maxY-bt.minY;return Pt>=0&&Lt>=0?Math.sqrt(Pt*Pt+Lt*Lt):0},sy=function(bt,St,wt){var Nt=bt.positionX,Pt=bt.positionY,Lt=bt.height||1,Ht=bt.width||1,qt=wt/St,Gt=Lt/Ht,Qt={};return St===0&&0<wt||St===0&&0>wt?(Qt.x=Nt,Qt.y=Pt+Lt/2,Qt):0<St&&-1*Gt<=qt&&qt<=Gt?(Qt.x=Nt+Ht/2,Qt.y=Pt+Ht*wt/2/St,Qt):0>St&&-1*Gt<=qt&&qt<=Gt?(Qt.x=Nt-Ht/2,Qt.y=Pt-Ht*wt/2/St,Qt):0<wt&&(qt<=-1*Gt||qt>=Gt)?(Qt.x=Nt+Lt*St/2/wt,Qt.y=Pt+Lt/2,Qt):(0>wt&&(qt<=-1*Gt||qt>=Gt)&&(Qt.x=Nt-Lt*St/2/wt,Qt.y=Pt-Lt/2),Qt)},$1=function(bt,St){for(var wt=0;wt<bt.edgeSize;wt++){var Nt=bt.layoutEdges[wt],Pt=bt.idToIndex[Nt.sourceId],Lt=bt.layoutNodes[Pt],Ht=bt.idToIndex[Nt.targetId],qt=bt.layoutNodes[Ht],Gt=qt.positionX-Lt.positionX,Qt=qt.positionY-Lt.positionY;if(!(Gt===0&&Qt===0)){var hn=sy(Lt,Gt,Qt),yn=sy(qt,-1*Gt,-1*Qt),xn=yn.x-hn.x,bn=yn.y-hn.y,Nn=Math.sqrt(xn*xn+bn*bn),Pn=Math.pow(Nt.idealLength-Nn,2)/Nt.elasticity;if(Nn!==0)var Fn=Pn*xn/Nn,Un=Pn*bn/Nn;else var Fn=0,Un=0;Lt.isLocked||(Lt.offsetX+=Fn,Lt.offsetY+=Un),qt.isLocked||(qt.offsetX-=Fn,qt.offsetY-=Un)}}},_T=function(bt,St){if(St.gravity!==0)for(var wt=1,Nt=0;Nt<bt.graphSet.length;Nt++){var Pt=bt.graphSet[Nt],Lt=Pt.length;if(Nt===0)var Ht=bt.clientHeight/2,qt=bt.clientWidth/2;else var Gt=bt.layoutNodes[bt.idToIndex[Pt[0]]],Qt=bt.layoutNodes[bt.idToIndex[Gt.parentId]],Ht=Qt.positionX,qt=Qt.positionY;for(var hn=0;hn<Lt;hn++){var yn=bt.layoutNodes[bt.idToIndex[Pt[hn]]];if(!yn.isLocked){var xn=Ht-yn.positionX,bn=qt-yn.positionY,Nn=Math.sqrt(xn*xn+bn*bn);if(Nn>wt){var Pn=St.gravity*xn/Nn,Fn=St.gravity*bn/Nn;yn.offsetX+=Pn,yn.offsetY+=Fn}}}}},$T=function(bt,St){var wt=[],Nt=0,Pt=-1;for(wt.push.apply(wt,bt.graphSet[0]),Pt+=bt.graphSet[0].length;Nt<=Pt;){var Lt=wt[Nt++],Ht=bt.idToIndex[Lt],qt=bt.layoutNodes[Ht],Gt=qt.children;if(0<Gt.length&&!qt.isLocked){for(var Qt=qt.offsetX,hn=qt.offsetY,yn=0;yn<Gt.length;yn++){var xn=bt.layoutNodes[bt.idToIndex[Gt[yn]]];xn.offsetX+=Qt,xn.offsetY+=hn,wt[++Pt]=Gt[yn]}qt.offsetX=0,qt.offsetY=0}}},x2=function(bt,St){for(var wt=0;wt<bt.nodeSize;wt++){var Nt=bt.layoutNodes[wt];0<Nt.children.length&&(Nt.maxX=void 0,Nt.minX=void 0,Nt.maxY=void 0,Nt.minY=void 0)}for(var wt=0;wt<bt.nodeSize;wt++){var Nt=bt.layoutNodes[wt];if(!(0<Nt.children.length||Nt.isLocked)){var Pt=wT(Nt.offsetX,Nt.offsetY,bt.temperature);Nt.positionX+=Pt.x,Nt.positionY+=Pt.y,Nt.offsetX=0,Nt.offsetY=0,Nt.minX=Nt.positionX-Nt.width,Nt.maxX=Nt.positionX+Nt.width,Nt.minY=Nt.positionY-Nt.height,Nt.maxY=Nt.positionY+Nt.height,S2(Nt,bt)}}for(var wt=0;wt<bt.nodeSize;wt++){var Nt=bt.layoutNodes[wt];0<Nt.children.length&&!Nt.isLocked&&(Nt.positionX=(Nt.maxX+Nt.minX)/2,Nt.positionY=(Nt.maxY+Nt.minY)/2,Nt.width=Nt.maxX-Nt.minX,Nt.height=Nt.maxY-Nt.minY)}},wT=function(bt,St,wt){var Nt=Math.sqrt(bt*bt+St*St);if(Nt>wt)var Pt={x:wt*bt/Nt,y:wt*St/Nt};else var Pt={x:bt,y:St};return Pt},S2=function _t(bt,St){var wt=bt.parentId;if(wt!=null){var Nt=St.layoutNodes[St.idToIndex[wt]],Pt=!1;if((Nt.maxX==null||bt.maxX+Nt.padRight>Nt.maxX)&&(Nt.maxX=bt.maxX+Nt.padRight,Pt=!0),(Nt.minX==null||bt.minX-Nt.padLeft<Nt.minX)&&(Nt.minX=bt.minX-Nt.padLeft,Pt=!0),(Nt.maxY==null||bt.maxY+Nt.padBottom>Nt.maxY)&&(Nt.maxY=bt.maxY+Nt.padBottom,Pt=!0),(Nt.minY==null||bt.minY-Nt.padTop<Nt.minY)&&(Nt.minY=bt.minY-Nt.padTop,Pt=!0),Pt)return _t(Nt,St)}},OT=function(bt,St){for(var wt=bt.layoutNodes,Nt=[],Pt=0;Pt<wt.length;Pt++){var Lt=wt[Pt],Ht=Lt.cmptId,qt=Nt[Ht]=Nt[Ht]||[];qt.push(Lt)}for(var Gt=0,Pt=0;Pt<Nt.length;Pt++){var Qt=Nt[Pt];if(!!Qt){Qt.x1=1/0,Qt.x2=-1/0,Qt.y1=1/0,Qt.y2=-1/0;for(var hn=0;hn<Qt.length;hn++){var yn=Qt[hn];Qt.x1=Math.min(Qt.x1,yn.positionX-yn.width/2),Qt.x2=Math.max(Qt.x2,yn.positionX+yn.width/2),Qt.y1=Math.min(Qt.y1,yn.positionY-yn.height/2),Qt.y2=Math.max(Qt.y2,yn.positionY+yn.height/2)}Qt.w=Qt.x2-Qt.x1,Qt.h=Qt.y2-Qt.y1,Gt+=Qt.w*Qt.h}}Nt.sort(function(Un,Hn){return Hn.w*Hn.h-Un.w*Un.h});for(var xn=0,bn=0,Nn=0,Pn=0,Fn=Math.sqrt(Gt)*bt.clientWidth/bt.clientHeight,Pt=0;Pt<Nt.length;Pt++){var Qt=Nt[Pt];if(!!Qt){for(var hn=0;hn<Qt.length;hn++){var yn=Qt[hn];yn.isLocked||(yn.positionX+=xn-Qt.x1,yn.positionY+=bn-Qt.y1)}xn+=Qt.w+St.componentSpacing,Nn+=Qt.w+St.componentSpacing,Pn=Math.max(Pn,Qt.h),Nn>Fn&&(bn+=Pn+St.componentSpacing,xn=0,Nn=0,Pn=0)}}},w1={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(bt){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(bt,St){return!0},ready:void 0,stop:void 0,transform:function(bt,St){return St}};function uv(_t){this.options=Qr({},w1,_t)}uv.prototype.run=function(){var _t=this.options,bt=_t,St=_t.cy,wt=bt.eles,Nt=wt.nodes().not(":parent");bt.sort&&(Nt=Nt.sort(bt.sort));var Pt=Iu(bt.boundingBox?bt.boundingBox:{x1:0,y1:0,w:St.width(),h:St.height()});if(Pt.h===0||Pt.w===0)wt.nodes().layoutPositions(this,bt,function(co){return{x:Pt.x1,y:Pt.y1}});else{var Lt=Nt.size(),Ht=Math.sqrt(Lt*Pt.h/Pt.w),qt=Math.round(Ht),Gt=Math.round(Pt.w/Pt.h*Ht),Qt=function(mo){if(mo==null)return Math.min(qt,Gt);var uo=Math.min(qt,Gt);uo==qt?qt=mo:Gt=mo},hn=function(mo){if(mo==null)return Math.max(qt,Gt);var uo=Math.max(qt,Gt);uo==qt?qt=mo:Gt=mo},yn=bt.rows,xn=bt.cols!=null?bt.cols:bt.columns;if(yn!=null&&xn!=null)qt=yn,Gt=xn;else if(yn!=null&&xn==null)qt=yn,Gt=Math.ceil(Lt/qt);else if(yn==null&&xn!=null)Gt=xn,qt=Math.ceil(Lt/Gt);else if(Gt*qt>Lt){var bn=Qt(),Nn=hn();(bn-1)*Nn>=Lt?Qt(bn-1):(Nn-1)*bn>=Lt&&hn(Nn-1)}else for(;Gt*qt<Lt;){var Pn=Qt(),Fn=hn();(Fn+1)*Pn>=Lt?hn(Fn+1):Qt(Pn+1)}var Un=Pt.w/Gt,Hn=Pt.h/qt;if(bt.condense&&(Un=0,Hn=0),bt.avoidOverlap)for(var nr=0;nr<Nt.length;nr++){var mr=Nt[nr],gr=mr._private.position;(gr.x==null||gr.y==null)&&(gr.x=0,gr.y=0);var rr=mr.layoutDimensions(bt),hr=bt.avoidOverlapPadding,ar=rr.w+hr,vr=rr.h+hr;Un=Math.max(Un,ar),Hn=Math.max(Hn,vr)}for(var Tr={},dr=function(mo,uo){return!!Tr["c-"+mo+"-"+uo]},Sr=function(mo,uo){Tr["c-"+mo+"-"+uo]=!0},yr=0,Fr=0,_r=function(){Fr++,Fr>=Gt&&(Fr=0,yr++)},Rr={},zr=0;zr<Nt.length;zr++){var Vr=Nt[zr],ga=bt.position(Vr);if(ga&&(ga.row!==void 0||ga.col!==void 0)){var jr={row:ga.row,col:ga.col};if(jr.col===void 0)for(jr.col=0;dr(jr.row,jr.col);)jr.col++;else if(jr.row===void 0)for(jr.row=0;dr(jr.row,jr.col);)jr.row++;Rr[Vr.id()]=jr,Sr(jr.row,jr.col)}}var _i=function(mo,uo){var so,Br;if(mo.locked()||mo.isParent())return!1;var fo=Rr[mo.id()];if(fo)so=fo.col*Un+Un/2+Pt.x1,Br=fo.row*Hn+Hn/2+Pt.y1;else{for(;dr(yr,Fr);)_r();so=Fr*Un+Un/2+Pt.x1,Br=yr*Hn+Hn/2+Pt.y1,Sr(yr,Fr),_r()}return{x:so,y:Br}};Nt.layoutPositions(this,bt,_i)}return this};var Gv={ready:function(){},stop:function(){}};function uy(_t){this.options=Qr({},Gv,_t)}uy.prototype.run=function(){var _t=this.options,bt=_t.eles,St=this;return _t.cy,St.emit("layoutstart"),bt.nodes().positions(function(){return{x:0,y:0}}),St.one("layoutready",_t.ready),St.emit("layoutready"),St.one("layoutstop",_t.stop),St.emit("layoutstop"),this},uy.prototype.stop=function(){return this};var cv={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(bt,St){return!0},ready:void 0,stop:void 0,transform:function(bt,St){return St}};function Rm(_t){this.options=Qr({},cv,_t)}Rm.prototype.run=function(){var _t=this.options,bt=_t.eles,St=bt.nodes(),wt=Xt(_t.positions);function Nt(Pt){if(_t.positions==null)return Ap(Pt.position());if(wt)return _t.positions(Pt);var Lt=_t.positions[Pt._private.data.id];return Lt??null}return St.layoutPositions(this,_t,function(Pt,Lt){var Ht=Nt(Pt);return Pt.locked()||Ht==null?!1:Ht}),this};var _s={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(bt,St){return!0},ready:void 0,stop:void 0,transform:function(bt,St){return St}};function cy(_t){this.options=Qr({},_s,_t)}cy.prototype.run=function(){var _t=this.options,bt=_t.cy,St=_t.eles,wt=Iu(_t.boundingBox?_t.boundingBox:{x1:0,y1:0,w:bt.width(),h:bt.height()}),Nt=function(Lt,Ht){return{x:wt.x1+Math.round(Math.random()*wt.w),y:wt.y1+Math.round(Math.random()*wt.h)}};return St.nodes().layoutPositions(this,_t,Nt),this};var qv=[{name:"breadthfirst",impl:jv},{name:"circle",impl:ET},{name:"concentric",impl:wm},{name:"cose",impl:ay},{name:"grid",impl:uv},{name:"null",impl:uy},{name:"preset",impl:Rm},{name:"random",impl:cy}];function am(_t){this.options=_t,this.notifications=0}var RT=function(){},dv=function(){throw new Error("A headless instance can not render images")};am.prototype={recalculateRenderedStyle:RT,notify:function(){this.notifications++},init:RT,isHeadless:function(){return!0},png:dv,jpg:dv};var fv={};fv.arrowShapeWidth=.3,fv.registerArrowShapes=function(){var _t=this.arrowShapes={},bt=this,St=function(Gt,Qt,hn,yn,xn,bn,Nn){var Pn=xn.x-hn/2-Nn,Fn=xn.x+hn/2+Nn,Un=xn.y-hn/2-Nn,Hn=xn.y+hn/2+Nn,nr=Pn<=Gt&&Gt<=Fn&&Un<=Qt&&Qt<=Hn;return nr},wt=function(Gt,Qt,hn,yn,xn){var bn=Gt*Math.cos(yn)-Qt*Math.sin(yn),Nn=Gt*Math.sin(yn)+Qt*Math.cos(yn),Pn=bn*hn,Fn=Nn*hn,Un=Pn+xn.x,Hn=Fn+xn.y;return{x:Un,y:Hn}},Nt=function(Gt,Qt,hn,yn){for(var xn=[],bn=0;bn<Gt.length;bn+=2){var Nn=Gt[bn],Pn=Gt[bn+1];xn.push(wt(Nn,Pn,Qt,hn,yn))}return xn},Pt=function(Gt){for(var Qt=[],hn=0;hn<Gt.length;hn++){var yn=Gt[hn];Qt.push(yn.x,yn.y)}return Qt},Lt=function(Gt){return Gt.pstyle("width").pfValue*Gt.pstyle("arrow-scale").pfValue*2},Ht=function(Gt,Qt){Ut(Qt)&&(Qt=_t[Qt]),_t[Gt]=Qr({name:Gt,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(yn,xn,bn,Nn,Pn,Fn){var Un=Pt(Nt(this.points,bn+2*Fn,Nn,Pn)),Hn=qs(yn,xn,Un);return Hn},roughCollide:St,draw:function(yn,xn,bn,Nn){var Pn=Nt(this.points,xn,bn,Nn);bt.arrowShapeImpl("polygon")(yn,Pn)},spacing:function(yn){return 0},gap:Lt},Qt)};Ht("none",{collide:Bs,roughCollide:Bs,draw:Sl,spacing:Dl,gap:Dl}),Ht("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),Ht("arrow","triangle"),Ht("triangle-backcurve",{points:_t.triangle.points,controlPoint:[0,-.15],roughCollide:St,draw:function(Gt,Qt,hn,yn,xn){var bn=Nt(this.points,Qt,hn,yn),Nn=this.controlPoint,Pn=wt(Nn[0],Nn[1],Qt,hn,yn);bt.arrowShapeImpl(this.name)(Gt,bn,Pn)},gap:function(Gt){return Lt(Gt)*.8}}),Ht("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(Gt,Qt,hn,yn,xn,bn,Nn){var Pn=Pt(Nt(this.points,hn+2*Nn,yn,xn)),Fn=Pt(Nt(this.pointsTee,hn+2*Nn,yn,xn)),Un=qs(Gt,Qt,Pn)||qs(Gt,Qt,Fn);return Un},draw:function(Gt,Qt,hn,yn,xn){var bn=Nt(this.points,Qt,hn,yn),Nn=Nt(this.pointsTee,Qt,hn,yn);bt.arrowShapeImpl(this.name)(Gt,bn,Nn)}}),Ht("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(Gt,Qt,hn,yn,xn,bn,Nn){var Pn=xn,Fn=Math.pow(Pn.x-Gt,2)+Math.pow(Pn.y-Qt,2)<=Math.pow((hn+2*Nn)*this.radius,2),Un=Pt(Nt(this.points,hn+2*Nn,yn,xn));return qs(Gt,Qt,Un)||Fn},draw:function(Gt,Qt,hn,yn,xn){var bn=Nt(this.pointsTr,Qt,hn,yn);bt.arrowShapeImpl(this.name)(Gt,bn,yn.x,yn.y,this.radius*Qt)},spacing:function(Gt){return bt.getArrowWidth(Gt.pstyle("width").pfValue,Gt.pstyle("arrow-scale").value)*this.radius}}),Ht("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(Gt,Qt){var hn=this.baseCrossLinePts.slice(),yn=Qt/Gt,xn=3,bn=5;return hn[xn]=hn[xn]-yn,hn[bn]=hn[bn]-yn,hn},collide:function(Gt,Qt,hn,yn,xn,bn,Nn){var Pn=Pt(Nt(this.points,hn+2*Nn,yn,xn)),Fn=Pt(Nt(this.crossLinePts(hn,bn),hn+2*Nn,yn,xn)),Un=qs(Gt,Qt,Pn)||qs(Gt,Qt,Fn);return Un},draw:function(Gt,Qt,hn,yn,xn){var bn=Nt(this.points,Qt,hn,yn),Nn=Nt(this.crossLinePts(Qt,xn),Qt,hn,yn);bt.arrowShapeImpl(this.name)(Gt,bn,Nn)}}),Ht("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(Gt){return Lt(Gt)*.525}}),Ht("circle",{radius:.15,collide:function(Gt,Qt,hn,yn,xn,bn,Nn){var Pn=xn,Fn=Math.pow(Pn.x-Gt,2)+Math.pow(Pn.y-Qt,2)<=Math.pow((hn+2*Nn)*this.radius,2);return Fn},draw:function(Gt,Qt,hn,yn,xn){bt.arrowShapeImpl(this.name)(Gt,yn.x,yn.y,this.radius*Qt)},spacing:function(Gt){return bt.getArrowWidth(Gt.pstyle("width").pfValue,Gt.pstyle("arrow-scale").value)*this.radius}}),Ht("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(Gt){return 1},gap:function(Gt){return 1}}),Ht("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),Ht("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(Gt){return Gt.pstyle("width").pfValue*Gt.pstyle("arrow-scale").value}}),Ht("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(Gt){return .95*Gt.pstyle("width").pfValue*Gt.pstyle("arrow-scale").value}})};var Xl={};Xl.projectIntoViewport=function(_t,bt){var St=this.cy,wt=this.findContainerClientCoords(),Nt=wt[0],Pt=wt[1],Lt=wt[4],Ht=St.pan(),qt=St.zoom(),Gt=((_t-Nt)/Lt-Ht.x)/qt,Qt=((bt-Pt)/Lt-Ht.y)/qt;return[Gt,Qt]},Xl.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var _t=this.container,bt=_t.getBoundingClientRect(),St=It.getComputedStyle(_t),wt=function(Fn){return parseFloat(St.getPropertyValue(Fn))},Nt={left:wt("padding-left"),right:wt("padding-right"),top:wt("padding-top"),bottom:wt("padding-bottom")},Pt={left:wt("border-left-width"),right:wt("border-right-width"),top:wt("border-top-width"),bottom:wt("border-bottom-width")},Lt=_t.clientWidth,Ht=_t.clientHeight,qt=Nt.left+Nt.right,Gt=Nt.top+Nt.bottom,Qt=Pt.left+Pt.right,hn=bt.width/(Lt+Qt),yn=Lt-qt,xn=Ht-Gt,bn=bt.left+Nt.left+Pt.left,Nn=bt.top+Nt.top+Pt.top;return this.containerBB=[bn,Nn,yn,xn,hn]},Xl.invalidateContainerClientCoordsCache=function(){this.containerBB=null},Xl.findNearestElement=function(_t,bt,St,wt){return this.findNearestElements(_t,bt,St,wt)[0]},Xl.findNearestElements=function(_t,bt,St,wt){var Nt=this,Pt=this,Lt=Pt.getCachedZSortedEles(),Ht=[],qt=Pt.cy.zoom(),Gt=Pt.cy.hasCompoundNodes(),Qt=(wt?24:8)/qt,hn=(wt?8:2)/qt,yn=(wt?8:2)/qt,xn=1/0,bn,Nn;St&&(Lt=Lt.interactive);function Pn(rr,hr){if(rr.isNode()){if(Nn)return;Nn=rr,Ht.push(rr)}if(rr.isEdge()&&(hr==null||hr<xn))if(bn){if(bn.pstyle("z-compound-depth").value===rr.pstyle("z-compound-depth").value&&bn.pstyle("z-compound-depth").value===rr.pstyle("z-compound-depth").value){for(var ar=0;ar<Ht.length;ar++)if(Ht[ar].isEdge()){Ht[ar]=rr,bn=rr,xn=hr??xn;break}}}else Ht.push(rr),bn=rr,xn=hr??xn}function Fn(rr){var hr=rr.outerWidth()+2*hn,ar=rr.outerHeight()+2*hn,vr=hr/2,Tr=ar/2,dr=rr.position();if(dr.x-vr<=_t&&_t<=dr.x+vr&&dr.y-Tr<=bt&&bt<=dr.y+Tr){var Sr=Pt.nodeShapes[Nt.getNodeShape(rr)];if(Sr.checkPoint(_t,bt,0,hr,ar,dr.x,dr.y))return Pn(rr,0),!0}}function Un(rr){var hr=rr._private,ar=hr.rscratch,vr=rr.pstyle("width").pfValue,Tr=rr.pstyle("arrow-scale").value,dr=vr/2+Qt,Sr=dr*dr,yr=dr*2,zr=hr.source,Vr=hr.target,Fr;if(ar.edgeType==="segments"||ar.edgeType==="straight"||ar.edgeType==="haystack"){for(var _r=ar.allpts,Rr=0;Rr+3<_r.length;Rr+=2)if(iu(_t,bt,_r[Rr],_r[Rr+1],_r[Rr+2],_r[Rr+3],yr)&&Sr>(Fr=E0(_t,bt,_r[Rr],_r[Rr+1],_r[Rr+2],_r[Rr+3])))return Pn(rr,Fr),!0}else if(ar.edgeType==="bezier"||ar.edgeType==="multibezier"||ar.edgeType==="self"||ar.edgeType==="compound"){for(var _r=ar.allpts,Rr=0;Rr+5<ar.allpts.length;Rr+=4)if(Pl(_t,bt,_r[Rr],_r[Rr+1],_r[Rr+2],_r[Rr+3],_r[Rr+4],_r[Rr+5],yr)&&Sr>(Fr=Cy(_t,bt,_r[Rr],_r[Rr+1],_r[Rr+2],_r[Rr+3],_r[Rr+4],_r[Rr+5])))return Pn(rr,Fr),!0}for(var zr=zr||hr.source,Vr=Vr||hr.target,ga=Nt.getArrowWidth(vr,Tr),jr=[{name:"source",x:ar.arrowStartX,y:ar.arrowStartY,angle:ar.srcArrowAngle},{name:"target",x:ar.arrowEndX,y:ar.arrowEndY,angle:ar.tgtArrowAngle},{name:"mid-source",x:ar.midX,y:ar.midY,angle:ar.midsrcArrowAngle},{name:"mid-target",x:ar.midX,y:ar.midY,angle:ar.midtgtArrowAngle}],Rr=0;Rr<jr.length;Rr++){var _i=jr[Rr],co=Pt.arrowShapes[rr.pstyle(_i.name+"-arrow-shape").value],mo=rr.pstyle("width").pfValue;if(co.roughCollide(_t,bt,ga,_i.angle,{x:_i.x,y:_i.y},mo,Qt)&&co.collide(_t,bt,ga,_i.angle,{x:_i.x,y:_i.y},mo,Qt))return Pn(rr),!0}Gt&&Ht.length>0&&(Fn(zr),Fn(Vr))}function Hn(rr,hr,ar){return yu(rr,hr,ar)}function nr(rr,hr){var ar=rr._private,vr=yn,Tr;hr?Tr=hr+"-":Tr="",rr.boundingBox();var dr=ar.labelBounds[hr||"main"],Sr=rr.pstyle(Tr+"label").value,yr=rr.pstyle("text-events").strValue==="yes";if(!(!yr||!Sr)){var Fr=Hn(ar.rscratch,"labelX",hr),_r=Hn(ar.rscratch,"labelY",hr),Rr=Hn(ar.rscratch,"labelAngle",hr),zr=rr.pstyle(Tr+"text-margin-x").pfValue,Vr=rr.pstyle(Tr+"text-margin-y").pfValue,ga=dr.x1-vr-zr,jr=dr.x2+vr-zr,_i=dr.y1-vr-Vr,co=dr.y2+vr-Vr;if(Rr){var mo=Math.cos(Rr),uo=Math.sin(Rr),so=function(Ss,Wo){return Ss=Ss-Fr,Wo=Wo-_r,{x:Ss*mo-Wo*uo+Fr,y:Ss*uo+Wo*mo+_r}},Br=so(ga,_i),fo=so(ga,co),vo=so(jr,_i),Io=so(jr,co),Fo=[Br.x+zr,Br.y+Vr,vo.x+zr,vo.y+Vr,Io.x+zr,Io.y+Vr,fo.x+zr,fo.y+Vr];if(qs(_t,bt,Fo))return Pn(rr),!0}else if(Cp(dr,_t,bt))return Pn(rr),!0}}for(var mr=Lt.length-1;mr>=0;mr--){var gr=Lt[mr];gr.isNode()?Fn(gr)||nr(gr):Un(gr)||nr(gr)||nr(gr,"source")||nr(gr,"target")}return Ht},Xl.getAllInBox=function(_t,bt,St,wt){var Nt=this.getCachedZSortedEles().interactive,Pt=[],Lt=Math.min(_t,St),Ht=Math.max(_t,St),qt=Math.min(bt,wt),Gt=Math.max(bt,wt);_t=Lt,St=Ht,bt=qt,wt=Gt;for(var Qt=Iu({x1:_t,y1:bt,x2:St,y2:wt}),hn=0;hn<Nt.length;hn++){var yn=Nt[hn];if(yn.isNode()){var xn=yn,bn=xn.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});jm(Qt,bn)&&!ds(bn,Qt)&&Pt.push(xn)}else{var Nn=yn,Pn=Nn._private,Fn=Pn.rscratch;if(Fn.startX!=null&&Fn.startY!=null&&!Cp(Qt,Fn.startX,Fn.startY)||Fn.endX!=null&&Fn.endY!=null&&!Cp(Qt,Fn.endX,Fn.endY))continue;if(Fn.edgeType==="bezier"||Fn.edgeType==="multibezier"||Fn.edgeType==="self"||Fn.edgeType==="compound"||Fn.edgeType==="segments"||Fn.edgeType==="haystack"){for(var Un=Pn.rstyle.bezierPts||Pn.rstyle.linePts||Pn.rstyle.haystackPts,Hn=!0,nr=0;nr<Un.length;nr++)if(!Hm(Qt,Un[nr])){Hn=!1;break}Hn&&Pt.push(Nn)}else(Fn.edgeType==="haystack"||Fn.edgeType==="straight")&&Pt.push(Nn)}}return Pt};var pv={};pv.calculateArrowAngles=function(_t){var bt=_t._private.rscratch,St=bt.edgeType==="haystack",wt=bt.edgeType==="bezier",Nt=bt.edgeType==="multibezier",Pt=bt.edgeType==="segments",Lt=bt.edgeType==="compound",Ht=bt.edgeType==="self",qt,Gt,Qt,hn,yn,xn,Fn,Un;if(St?(Qt=bt.haystackPts[0],hn=bt.haystackPts[1],yn=bt.haystackPts[2],xn=bt.haystackPts[3]):(Qt=bt.arrowStartX,hn=bt.arrowStartY,yn=bt.arrowEndX,xn=bt.arrowEndY),Fn=bt.midX,Un=bt.midY,Pt)qt=Qt-bt.segpts[0],Gt=hn-bt.segpts[1];else if(Nt||Lt||Ht||wt){var bn=bt.allpts,Nn=Wr(bn[0],bn[2],bn[4],.1),Pn=Wr(bn[1],bn[3],bn[5],.1);qt=Qt-Nn,Gt=hn-Pn}else qt=Qt-Fn,Gt=hn-Un;bt.srcArrowAngle=zm(qt,Gt);var Fn=bt.midX,Un=bt.midY;if(St&&(Fn=(Qt+yn)/2,Un=(hn+xn)/2),qt=yn-Qt,Gt=xn-hn,Pt){var bn=bt.allpts;if(bn.length/2%2===0){var Hn=bn.length/2,nr=Hn-2;qt=bn[Hn]-bn[nr],Gt=bn[Hn+1]-bn[nr+1]}else{var Hn=bn.length/2-1,nr=Hn-2,mr=Hn+2;qt=bn[Hn]-bn[nr],Gt=bn[Hn+1]-bn[nr+1]}}else if(Nt||Lt||Ht){var bn=bt.allpts,gr=bt.ctrlpts,rr,hr,ar,vr;if(gr.length/2%2===0){var Tr=bn.length/2-1,dr=Tr+2,Sr=dr+2;rr=Wr(bn[Tr],bn[dr],bn[Sr],0),hr=Wr(bn[Tr+1],bn[dr+1],bn[Sr+1],0),ar=Wr(bn[Tr],bn[dr],bn[Sr],1e-4),vr=Wr(bn[Tr+1],bn[dr+1],bn[Sr+1],1e-4)}else{var dr=bn.length/2-1,Tr=dr-2,Sr=dr+2;rr=Wr(bn[Tr],bn[dr],bn[Sr],.4999),hr=Wr(bn[Tr+1],bn[dr+1],bn[Sr+1],.4999),ar=Wr(bn[Tr],bn[dr],bn[Sr],.5),vr=Wr(bn[Tr+1],bn[dr+1],bn[Sr+1],.5)}qt=ar-rr,Gt=vr-hr}if(bt.midtgtArrowAngle=zm(qt,Gt),bt.midDispX=qt,bt.midDispY=Gt,qt*=-1,Gt*=-1,Pt){var bn=bt.allpts;if(bn.length/2%2!==0){var Hn=bn.length/2-1,mr=Hn+2;qt=-(bn[mr]-bn[Hn]),Gt=-(bn[mr+1]-bn[Hn+1])}}if(bt.midsrcArrowAngle=zm(qt,Gt),Pt)qt=yn-bt.segpts[bt.segpts.length-2],Gt=xn-bt.segpts[bt.segpts.length-1];else if(Nt||Lt||Ht||wt){var bn=bt.allpts,yr=bn.length,Nn=Wr(bn[yr-6],bn[yr-4],bn[yr-2],.9),Pn=Wr(bn[yr-5],bn[yr-3],bn[yr-1],.9);qt=yn-Nn,Gt=xn-Pn}else qt=yn-Fn,Gt=xn-Un;bt.tgtArrowAngle=zm(qt,Gt)},pv.getArrowWidth=pv.getArrowHeight=function(_t,bt){var St=this.arrowWidthCache=this.arrowWidthCache||{},wt=St[_t+", "+bt];return wt||(wt=Math.max(Math.pow(_t*13.37,.9),29)*bt,St[_t+", "+bt]=wt,wt)};var Vu={};Vu.findHaystackPoints=function(_t){for(var bt=0;bt<_t.length;bt++){var St=_t[bt],wt=St._private,Nt=wt.rscratch;if(!Nt.haystack){var Pt=Math.random()*2*Math.PI;Nt.source={x:Math.cos(Pt),y:Math.sin(Pt)},Pt=Math.random()*2*Math.PI,Nt.target={x:Math.cos(Pt),y:Math.sin(Pt)}}var Lt=wt.source,Ht=wt.target,qt=Lt.position(),Gt=Ht.position(),Qt=Lt.width(),hn=Ht.width(),yn=Lt.height(),xn=Ht.height(),bn=St.pstyle("haystack-radius").value,Nn=bn/2;Nt.haystackPts=Nt.allpts=[Nt.source.x*Qt*Nn+qt.x,Nt.source.y*yn*Nn+qt.y,Nt.target.x*hn*Nn+Gt.x,Nt.target.y*xn*Nn+Gt.y],Nt.midX=(Nt.allpts[0]+Nt.allpts[2])/2,Nt.midY=(Nt.allpts[1]+Nt.allpts[3])/2,Nt.edgeType="haystack",Nt.haystack=!0,this.storeEdgeProjections(St),this.calculateArrowAngles(St),this.recalculateEdgeLabelProjections(St),this.calculateLabelAngles(St)}},Vu.findSegmentsPoints=function(_t,bt){var St=_t._private.rscratch,wt=bt.posPts,Nt=bt.intersectionPts,Pt=bt.vectorNormInverse,Lt=_t.pstyle("edge-distances").value,Ht=_t.pstyle("segment-weights"),qt=_t.pstyle("segment-distances"),Gt=Math.min(Ht.pfValue.length,qt.pfValue.length);St.edgeType="segments",St.segpts=[];for(var Qt=0;Qt<Gt;Qt++){var hn=Ht.pfValue[Qt],yn=qt.pfValue[Qt],xn=1-hn,bn=hn,Nn=Lt==="node-position"?wt:Nt,Pn={x:Nn.x1*xn+Nn.x2*bn,y:Nn.y1*xn+Nn.y2*bn};St.segpts.push(Pn.x+Pt.x*yn,Pn.y+Pt.y*yn)}},Vu.findLoopPoints=function(_t,bt,St,wt){var Nt=_t._private.rscratch,Pt=bt.dirCounts,Lt=bt.srcPos,Ht=_t.pstyle("control-point-distances"),qt=Ht?Ht.pfValue[0]:void 0,Gt=_t.pstyle("loop-direction").pfValue,Qt=_t.pstyle("loop-sweep").pfValue,hn=_t.pstyle("control-point-step-size").pfValue;Nt.edgeType="self";var yn=St,xn=hn;wt&&(yn=0,xn=qt);var bn=Gt-Math.PI/2,Nn=bn-Qt/2,Pn=bn+Qt/2,Fn=String(Gt+"_"+Qt);yn=Pt[Fn]===void 0?Pt[Fn]=0:++Pt[Fn],Nt.ctrlpts=[Lt.x+Math.cos(Nn)*1.4*xn*(yn/3+1),Lt.y+Math.sin(Nn)*1.4*xn*(yn/3+1),Lt.x+Math.cos(Pn)*1.4*xn*(yn/3+1),Lt.y+Math.sin(Pn)*1.4*xn*(yn/3+1)]},Vu.findCompoundLoopPoints=function(_t,bt,St,wt){var Nt=_t._private.rscratch;Nt.edgeType="compound";var Pt=bt.srcPos,Lt=bt.tgtPos,Ht=bt.srcW,qt=bt.srcH,Gt=bt.tgtW,Qt=bt.tgtH,hn=_t.pstyle("control-point-step-size").pfValue,yn=_t.pstyle("control-point-distances"),xn=yn?yn.pfValue[0]:void 0,bn=St,Nn=hn;wt&&(bn=0,Nn=xn);var Pn=50,Fn={x:Pt.x-Ht/2,y:Pt.y-qt/2},Un={x:Lt.x-Gt/2,y:Lt.y-Qt/2},Hn={x:Math.min(Fn.x,Un.x),y:Math.min(Fn.y,Un.y)},nr=.5,mr=Math.max(nr,Math.log(Ht*.01)),gr=Math.max(nr,Math.log(Gt*.01));Nt.ctrlpts=[Hn.x,Hn.y-(1+Math.pow(Pn,1.12)/100)*Nn*(bn/3+1)*mr,Hn.x-(1+Math.pow(Pn,1.12)/100)*Nn*(bn/3+1)*gr,Hn.y]},Vu.findStraightEdgePoints=function(_t){_t._private.rscratch.edgeType="straight"},Vu.findBezierPoints=function(_t,bt,St,wt,Nt){var Pt=_t._private.rscratch,Lt=bt.vectorNormInverse,Ht=bt.posPts,qt=bt.intersectionPts,Gt=_t.pstyle("edge-distances").value,Qt=_t.pstyle("control-point-step-size").pfValue,hn=_t.pstyle("control-point-distances"),yn=_t.pstyle("control-point-weights"),xn=hn&&yn?Math.min(hn.value.length,yn.value.length):1,bn=hn?hn.pfValue[0]:void 0,Nn=yn.value[0],Pn=wt;Pt.edgeType=Pn?"multibezier":"bezier",Pt.ctrlpts=[];for(var Fn=0;Fn<xn;Fn++){var Un=(.5-bt.eles.length/2+St)*Qt*(Nt?-1:1),Hn=void 0,nr=dm(Un);Pn&&(bn=hn?hn.pfValue[Fn]:Qt,Nn=yn.value[Fn]),wt?Hn=bn:Hn=bn!==void 0?nr*bn:void 0;var mr=Hn!==void 0?Hn:Un,gr=1-Nn,rr=Nn,hr=Gt==="node-position"?Ht:qt,ar={x:hr.x1*gr+hr.x2*rr,y:hr.y1*gr+hr.y2*rr};Pt.ctrlpts.push(ar.x+Lt.x*mr,ar.y+Lt.y*mr)}},Vu.findTaxiPoints=function(_t,bt){var St=_t._private.rscratch;St.edgeType="segments";var wt="vertical",Nt="horizontal",Pt="leftward",Lt="rightward",Ht="downward",qt="upward",Gt="auto",Qt=bt.posPts,hn=bt.srcW,yn=bt.srcH,xn=bt.tgtW,bn=bt.tgtH,Nn=_t.pstyle("edge-distances").value,Pn=Nn!=="node-position",Fn=_t.pstyle("taxi-direction").value,Un=Fn,Hn=_t.pstyle("taxi-turn"),nr=Hn.units==="%",mr=Hn.pfValue,gr=mr<0,rr=_t.pstyle("taxi-turn-min-distance").pfValue,hr=Pn?(hn+xn)/2:0,ar=Pn?(yn+bn)/2:0,vr=Qt.x2-Qt.x1,Tr=Qt.y2-Qt.y1,dr=function(ls,il){return ls>0?Math.max(ls-il,0):Math.min(ls+il,0)},Sr=dr(vr,hr),yr=dr(Tr,ar),Fr=!1;Un===Gt?Fn=Math.abs(Sr)>Math.abs(yr)?Nt:wt:Un===qt||Un===Ht?(Fn=wt,Fr=!0):(Un===Pt||Un===Lt)&&(Fn=Nt,Fr=!0);var _r=Fn===wt,Rr=_r?yr:Sr,zr=_r?Tr:vr,Vr=dm(zr),ga=!1;!(Fr&&(nr||gr))&&(Un===Ht&&zr<0||Un===qt&&zr>0||Un===Pt&&zr>0||Un===Lt&&zr<0)&&(Vr*=-1,Rr=Vr*Math.abs(Rr),ga=!0);var jr;if(nr){var _i=mr<0?1+mr:mr;jr=_i*Rr}else{var co=mr<0?Rr:0;jr=co+mr*Vr}var mo=function(ls){return Math.abs(ls)<rr||Math.abs(ls)>=Math.abs(Rr)},uo=mo(jr),so=mo(Math.abs(Rr)-Math.abs(jr)),Br=uo||so;if(Br&&!ga)if(_r){var fo=Math.abs(zr)<=yn/2,vo=Math.abs(vr)<=xn/2;if(fo){var Io=(Qt.x1+Qt.x2)/2,Fo=Qt.y1,Is=Qt.y2;St.segpts=[Io,Fo,Io,Is]}else if(vo){var Ss=(Qt.y1+Qt.y2)/2,Wo=Qt.x1,Po=Qt.x2;St.segpts=[Wo,Ss,Po,Ss]}else St.segpts=[Qt.x1,Qt.y2]}else{var ps=Math.abs(zr)<=hn/2,Ao=Math.abs(Tr)<=bn/2;if(ps){var Uo=(Qt.y1+Qt.y2)/2,Ko=Qt.x1,gs=Qt.x2;St.segpts=[Ko,Uo,gs,Uo]}else if(Ao){var zs=(Qt.x1+Qt.x2)/2,ys=Qt.y1,Oo=Qt.y2;St.segpts=[zs,ys,zs,Oo]}else St.segpts=[Qt.x2,Qt.y1]}else if(_r){var ur=Qt.y1+jr+(Pn?yn/2*Vr:0),Gr=Qt.x1,Co=Qt.x2;St.segpts=[Gr,ur,Co,ur]}else{var lo=Qt.x1+jr+(Pn?hn/2*Vr:0),oo=Qt.y1,Ws=Qt.y2;St.segpts=[lo,oo,lo,Ws]}},Vu.tryToCorrectInvalidPoints=function(_t,bt){var St=_t._private.rscratch;if(St.edgeType==="bezier"){var wt=bt.srcPos,Nt=bt.tgtPos,Pt=bt.srcW,Lt=bt.srcH,Ht=bt.tgtW,qt=bt.tgtH,Gt=bt.srcShape,Qt=bt.tgtShape,hn=!sn(St.startX)||!sn(St.startY),yn=!sn(St.arrowStartX)||!sn(St.arrowStartY),xn=!sn(St.endX)||!sn(St.endY),bn=!sn(St.arrowEndX)||!sn(St.arrowEndY),Nn=3,Pn=this.getArrowWidth(_t.pstyle("width").pfValue,_t.pstyle("arrow-scale").value)*this.arrowShapeWidth,Fn=Nn*Pn,Un=xp({x:St.ctrlpts[0],y:St.ctrlpts[1]},{x:St.startX,y:St.startY}),Hn=Un<Fn,nr=xp({x:St.ctrlpts[0],y:St.ctrlpts[1]},{x:St.endX,y:St.endY}),mr=nr<Fn,gr=!1;if(hn||yn||Hn){gr=!0;var rr={x:St.ctrlpts[0]-wt.x,y:St.ctrlpts[1]-wt.y},hr=Math.sqrt(rr.x*rr.x+rr.y*rr.y),ar={x:rr.x/hr,y:rr.y/hr},vr=Math.max(Pt,Lt),Tr={x:St.ctrlpts[0]+ar.x*2*vr,y:St.ctrlpts[1]+ar.y*2*vr},dr=Gt.intersectLine(wt.x,wt.y,Pt,Lt,Tr.x,Tr.y,0);Hn?(St.ctrlpts[0]=St.ctrlpts[0]+ar.x*(Fn-Un),St.ctrlpts[1]=St.ctrlpts[1]+ar.y*(Fn-Un)):(St.ctrlpts[0]=dr[0]+ar.x*Fn,St.ctrlpts[1]=dr[1]+ar.y*Fn)}if(xn||bn||mr){gr=!0;var Sr={x:St.ctrlpts[0]-Nt.x,y:St.ctrlpts[1]-Nt.y},yr=Math.sqrt(Sr.x*Sr.x+Sr.y*Sr.y),Fr={x:Sr.x/yr,y:Sr.y/yr},_r=Math.max(Pt,Lt),Rr={x:St.ctrlpts[0]+Fr.x*2*_r,y:St.ctrlpts[1]+Fr.y*2*_r},zr=Qt.intersectLine(Nt.x,Nt.y,Ht,qt,Rr.x,Rr.y,0);mr?(St.ctrlpts[0]=St.ctrlpts[0]+Fr.x*(Fn-nr),St.ctrlpts[1]=St.ctrlpts[1]+Fr.y*(Fn-nr)):(St.ctrlpts[0]=zr[0]+Fr.x*Fn,St.ctrlpts[1]=zr[1]+Fr.y*Fn)}gr&&this.findEndpoints(_t)}},Vu.storeAllpts=function(_t){var bt=_t._private.rscratch;if(bt.edgeType==="multibezier"||bt.edgeType==="bezier"||bt.edgeType==="self"||bt.edgeType==="compound"){bt.allpts=[],bt.allpts.push(bt.startX,bt.startY);for(var St=0;St+1<bt.ctrlpts.length;St+=2)bt.allpts.push(bt.ctrlpts[St],bt.ctrlpts[St+1]),St+3<bt.ctrlpts.length&&bt.allpts.push((bt.ctrlpts[St]+bt.ctrlpts[St+2])/2,(bt.ctrlpts[St+1]+bt.ctrlpts[St+3])/2);bt.allpts.push(bt.endX,bt.endY);var wt,Nt;bt.ctrlpts.length/2%2===0?(wt=bt.allpts.length/2-1,bt.midX=bt.allpts[wt],bt.midY=bt.allpts[wt+1]):(wt=bt.allpts.length/2-3,Nt=.5,bt.midX=Wr(bt.allpts[wt],bt.allpts[wt+2],bt.allpts[wt+4],Nt),bt.midY=Wr(bt.allpts[wt+1],bt.allpts[wt+3],bt.allpts[wt+5],Nt))}else if(bt.edgeType==="straight")bt.allpts=[bt.startX,bt.startY,bt.endX,bt.endY],bt.midX=(bt.startX+bt.endX+bt.arrowStartX+bt.arrowEndX)/4,bt.midY=(bt.startY+bt.endY+bt.arrowStartY+bt.arrowEndY)/4;else if(bt.edgeType==="segments")if(bt.allpts=[],bt.allpts.push(bt.startX,bt.startY),bt.allpts.push.apply(bt.allpts,bt.segpts),bt.allpts.push(bt.endX,bt.endY),bt.segpts.length%4===0){var Pt=bt.segpts.length/2,Lt=Pt-2;bt.midX=(bt.segpts[Lt]+bt.segpts[Pt])/2,bt.midY=(bt.segpts[Lt+1]+bt.segpts[Pt+1])/2}else{var Ht=bt.segpts.length/2-1;bt.midX=bt.segpts[Ht],bt.midY=bt.segpts[Ht+1]}},Vu.checkForInvalidEdgeWarning=function(_t){var bt=_t[0]._private.rscratch;bt.nodesOverlap||sn(bt.startX)&&sn(bt.startY)&&sn(bt.endX)&&sn(bt.endY)?bt.loggedErr=!1:bt.loggedErr||(bt.loggedErr=!0,As("Edge `"+_t.id()+"` has invalid endpoints and so it is impossible to draw.  Adjust your edge style (e.g. control points) accordingly or use an alternative edge type.  This is expected behaviour when the source node and the target node overlap."))},Vu.findEdgeControlPoints=function(_t){var bt=this;if(!(!_t||_t.length===0)){for(var St=this,wt=St.cy,Nt=wt.hasCompoundNodes(),Pt={map:new Ru,get:function(rr){var hr=this.map.get(rr[0]);return hr!=null?hr.get(rr[1]):null},set:function(rr,hr){var ar=this.map.get(rr[0]);ar==null&&(ar=new Ru,this.map.set(rr[0],ar)),ar.set(rr[1],hr)}},Lt=[],Ht=[],qt=0;qt<_t.length;qt++){var Gt=_t[qt],Qt=Gt._private,hn=Gt.pstyle("curve-style").value;if(!(Gt.removed()||!Gt.takesUpSpace())){if(hn==="haystack"){Ht.push(Gt);continue}var yn=hn==="unbundled-bezier"||hn==="segments"||hn==="straight"||hn==="straight-triangle"||hn==="taxi",xn=hn==="unbundled-bezier"||hn==="bezier",bn=Qt.source,Nn=Qt.target,Pn=bn.poolIndex(),Fn=Nn.poolIndex(),Un=[Pn,Fn].sort(),Hn=Pt.get(Un);Hn==null&&(Hn={eles:[]},Pt.set(Un,Hn),Lt.push(Un)),Hn.eles.push(Gt),yn&&(Hn.hasUnbundled=!0),xn&&(Hn.hasBezier=!0)}}for(var nr=function(rr){var hr=Lt[rr],ar=Pt.get(hr),vr=void 0;if(!ar.hasUnbundled){var Tr=ar.eles[0].parallelEdges().filter(function(Oo){return Oo.isBundledBezier()});wu(ar.eles),Tr.forEach(function(Oo){return ar.eles.push(Oo)}),ar.eles.sort(function(Oo,ur){return Oo.poolIndex()-ur.poolIndex()})}var dr=ar.eles[0],Sr=dr.source(),yr=dr.target();if(Sr.poolIndex()>yr.poolIndex()){var Fr=Sr;Sr=yr,yr=Fr}var _r=ar.srcPos=Sr.position(),Rr=ar.tgtPos=yr.position(),zr=ar.srcW=Sr.outerWidth(),Vr=ar.srcH=Sr.outerHeight(),ga=ar.tgtW=yr.outerWidth(),jr=ar.tgtH=yr.outerHeight(),_i=ar.srcShape=St.nodeShapes[bt.getNodeShape(Sr)],co=ar.tgtShape=St.nodeShapes[bt.getNodeShape(yr)];ar.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var mo=0;mo<ar.eles.length;mo++){var uo=ar.eles[mo],so=uo[0]._private.rscratch,Br=uo.pstyle("curve-style").value,fo=Br==="unbundled-bezier"||Br==="segments"||Br==="taxi",vo=!Sr.same(uo.source());if(!ar.calculatedIntersection&&Sr!==yr&&(ar.hasBezier||ar.hasUnbundled)){ar.calculatedIntersection=!0;var Io=_i.intersectLine(_r.x,_r.y,zr,Vr,Rr.x,Rr.y,0),Fo=ar.srcIntn=Io,Is=co.intersectLine(Rr.x,Rr.y,ga,jr,_r.x,_r.y,0),Ss=ar.tgtIntn=Is,Wo=ar.intersectionPts={x1:Io[0],x2:Is[0],y1:Io[1],y2:Is[1]},Po=ar.posPts={x1:_r.x,x2:Rr.x,y1:_r.y,y2:Rr.y},ps=Is[1]-Io[1],Ao=Is[0]-Io[0],Uo=Math.sqrt(Ao*Ao+ps*ps),Ko=ar.vector={x:Ao,y:ps},gs=ar.vectorNorm={x:Ko.x/Uo,y:Ko.y/Uo},zs={x:-gs.y,y:gs.x};ar.nodesOverlap=!sn(Uo)||co.checkPoint(Io[0],Io[1],0,ga,jr,Rr.x,Rr.y)||_i.checkPoint(Is[0],Is[1],0,zr,Vr,_r.x,_r.y),ar.vectorNormInverse=zs,vr={nodesOverlap:ar.nodesOverlap,dirCounts:ar.dirCounts,calculatedIntersection:!0,hasBezier:ar.hasBezier,hasUnbundled:ar.hasUnbundled,eles:ar.eles,srcPos:Rr,tgtPos:_r,srcW:ga,srcH:jr,tgtW:zr,tgtH:Vr,srcIntn:Ss,tgtIntn:Fo,srcShape:co,tgtShape:_i,posPts:{x1:Po.x2,y1:Po.y2,x2:Po.x1,y2:Po.y1},intersectionPts:{x1:Wo.x2,y1:Wo.y2,x2:Wo.x1,y2:Wo.y1},vector:{x:-Ko.x,y:-Ko.y},vectorNorm:{x:-gs.x,y:-gs.y},vectorNormInverse:{x:-zs.x,y:-zs.y}}}var ys=vo?vr:ar;so.nodesOverlap=ys.nodesOverlap,so.srcIntn=ys.srcIntn,so.tgtIntn=ys.tgtIntn,Nt&&(Sr.isParent()||Sr.isChild()||yr.isParent()||yr.isChild())&&(Sr.parents().anySame(yr)||yr.parents().anySame(Sr)||Sr.same(yr)&&Sr.isParent())?bt.findCompoundLoopPoints(uo,ys,mo,fo):Sr===yr?bt.findLoopPoints(uo,ys,mo,fo):Br==="segments"?bt.findSegmentsPoints(uo,ys):Br==="taxi"?bt.findTaxiPoints(uo,ys):Br==="straight"||!fo&&ar.eles.length%2===1&&mo===Math.floor(ar.eles.length/2)?bt.findStraightEdgePoints(uo):bt.findBezierPoints(uo,ys,mo,fo,vo),bt.findEndpoints(uo),bt.tryToCorrectInvalidPoints(uo,ys),bt.checkForInvalidEdgeWarning(uo),bt.storeAllpts(uo),bt.storeEdgeProjections(uo),bt.calculateArrowAngles(uo),bt.recalculateEdgeLabelProjections(uo),bt.calculateLabelAngles(uo)}},mr=0;mr<Lt.length;mr++)nr(mr);this.findHaystackPoints(Ht)}};function Kv(_t){var bt=[];if(_t!=null){for(var St=0;St<_t.length;St+=2){var wt=_t[St],Nt=_t[St+1];bt.push({x:wt,y:Nt})}return bt}}Vu.getSegmentPoints=function(_t){var bt=_t[0]._private.rscratch,St=bt.edgeType;if(St==="segments")return this.recalculateRenderedStyle(_t),Kv(bt.segpts)},Vu.getControlPoints=function(_t){var bt=_t[0]._private.rscratch,St=bt.edgeType;if(St==="bezier"||St==="multibezier"||St==="self"||St==="compound")return this.recalculateRenderedStyle(_t),Kv(bt.ctrlpts)},Vu.getEdgeMidpoint=function(_t){var bt=_t[0]._private.rscratch;return this.recalculateRenderedStyle(_t),{x:bt.midX,y:bt.midY}};var dy={};dy.manualEndptToPx=function(_t,bt){var St=this,wt=_t.position(),Nt=_t.outerWidth(),Pt=_t.outerHeight();if(bt.value.length===2){var Lt=[bt.pfValue[0],bt.pfValue[1]];return bt.units[0]==="%"&&(Lt[0]=Lt[0]*Nt),bt.units[1]==="%"&&(Lt[1]=Lt[1]*Pt),Lt[0]+=wt.x,Lt[1]+=wt.y,Lt}else{var Ht=bt.pfValue[0];Ht=-Math.PI/2+Ht;var qt=2*Math.max(Nt,Pt),Gt=[wt.x+Math.cos(Ht)*qt,wt.y+Math.sin(Ht)*qt];return St.nodeShapes[this.getNodeShape(_t)].intersectLine(wt.x,wt.y,Nt,Pt,Gt[0],Gt[1],0)}},dy.findEndpoints=function(_t){var bt=this,St,wt=_t.source()[0],Nt=_t.target()[0],Pt=wt.position(),Lt=Nt.position(),Ht=_t.pstyle("target-arrow-shape").value,qt=_t.pstyle("source-arrow-shape").value,Gt=_t.pstyle("target-distance-from-node").pfValue,Qt=_t.pstyle("source-distance-from-node").pfValue,hn=_t.pstyle("curve-style").value,yn=_t._private.rscratch,xn=yn.edgeType,bn=hn==="taxi",Nn=xn==="self"||xn==="compound",Pn=xn==="bezier"||xn==="multibezier"||Nn,Fn=xn!=="bezier",Un=xn==="straight"||xn==="segments",Hn=xn==="segments",nr=Pn||Fn||Un,mr=Nn||bn,gr=_t.pstyle("source-endpoint"),rr=mr?"outside-to-node":gr.value,hr=_t.pstyle("target-endpoint"),ar=mr?"outside-to-node":hr.value;yn.srcManEndpt=gr,yn.tgtManEndpt=hr;var vr,Tr,dr,Sr;if(Pn){var yr=[yn.ctrlpts[0],yn.ctrlpts[1]],Fr=Fn?[yn.ctrlpts[yn.ctrlpts.length-2],yn.ctrlpts[yn.ctrlpts.length-1]]:yr;vr=Fr,Tr=yr}else if(Un){var _r=Hn?yn.segpts.slice(0,2):[Lt.x,Lt.y],Rr=Hn?yn.segpts.slice(yn.segpts.length-2):[Pt.x,Pt.y];vr=Rr,Tr=_r}if(ar==="inside-to-node")St=[Lt.x,Lt.y];else if(hr.units)St=this.manualEndptToPx(Nt,hr);else if(ar==="outside-to-line")St=yn.tgtIntn;else if(ar==="outside-to-node"||ar==="outside-to-node-or-label"?dr=vr:(ar==="outside-to-line"||ar==="outside-to-line-or-label")&&(dr=[Pt.x,Pt.y]),St=bt.nodeShapes[this.getNodeShape(Nt)].intersectLine(Lt.x,Lt.y,Nt.outerWidth(),Nt.outerHeight(),dr[0],dr[1],0),ar==="outside-to-node-or-label"||ar==="outside-to-line-or-label"){var zr=Nt._private.rscratch,Vr=zr.labelWidth,ga=zr.labelHeight,jr=zr.labelX,_i=zr.labelY,co=Vr/2,mo=ga/2,uo=Nt.pstyle("text-valign").value;uo==="top"?_i-=mo:uo==="bottom"&&(_i+=mo);var so=Nt.pstyle("text-halign").value;so==="left"?jr-=co:so==="right"&&(jr+=co);var Br=cu(dr[0],dr[1],[jr-co,_i-mo,jr+co,_i-mo,jr+co,_i+mo,jr-co,_i+mo],Lt.x,Lt.y);if(Br.length>0){var fo=Pt,vo=Up(fo,Hp(St)),Io=Up(fo,Hp(Br)),Fo=vo;if(Io<vo&&(St=Br,Fo=Io),Br.length>2){var Is=Up(fo,{x:Br[2],y:Br[3]});Is<Fo&&(St=[Br[2],Br[3]])}}}var Ss=tp(St,vr,bt.arrowShapes[Ht].spacing(_t)+Gt),Wo=tp(St,vr,bt.arrowShapes[Ht].gap(_t)+Gt);if(yn.endX=Wo[0],yn.endY=Wo[1],yn.arrowEndX=Ss[0],yn.arrowEndY=Ss[1],rr==="inside-to-node")St=[Pt.x,Pt.y];else if(gr.units)St=this.manualEndptToPx(wt,gr);else if(rr==="outside-to-line")St=yn.srcIntn;else if(rr==="outside-to-node"||rr==="outside-to-node-or-label"?Sr=Tr:(rr==="outside-to-line"||rr==="outside-to-line-or-label")&&(Sr=[Lt.x,Lt.y]),St=bt.nodeShapes[this.getNodeShape(wt)].intersectLine(Pt.x,Pt.y,wt.outerWidth(),wt.outerHeight(),Sr[0],Sr[1],0),rr==="outside-to-node-or-label"||rr==="outside-to-line-or-label"){var Po=wt._private.rscratch,ps=Po.labelWidth,Ao=Po.labelHeight,Uo=Po.labelX,Ko=Po.labelY,gs=ps/2,zs=Ao/2,ys=wt.pstyle("text-valign").value;ys==="top"?Ko-=zs:ys==="bottom"&&(Ko+=zs);var Oo=wt.pstyle("text-halign").value;Oo==="left"?Uo-=gs:Oo==="right"&&(Uo+=gs);var ur=cu(Sr[0],Sr[1],[Uo-gs,Ko-zs,Uo+gs,Ko-zs,Uo+gs,Ko+zs,Uo-gs,Ko+zs],Pt.x,Pt.y);if(ur.length>0){var Gr=Lt,Co=Up(Gr,Hp(St)),lo=Up(Gr,Hp(ur)),oo=Co;if(lo<Co&&(St=[ur[0],ur[1]],oo=lo),ur.length>2){var Ws=Up(Gr,{x:ur[2],y:ur[3]});Ws<oo&&(St=[ur[2],ur[3]])}}}var To=tp(St,Tr,bt.arrowShapes[qt].spacing(_t)+Qt),ls=tp(St,Tr,bt.arrowShapes[qt].gap(_t)+Qt);yn.startX=ls[0],yn.startY=ls[1],yn.arrowStartX=To[0],yn.arrowStartY=To[1],nr&&(!sn(yn.startX)||!sn(yn.startY)||!sn(yn.endX)||!sn(yn.endY)?yn.badLine=!0:yn.badLine=!1)},dy.getSourceEndpoint=function(_t){var bt=_t[0]._private.rscratch;switch(this.recalculateRenderedStyle(_t),bt.edgeType){case"haystack":return{x:bt.haystackPts[0],y:bt.haystackPts[1]};default:return{x:bt.arrowStartX,y:bt.arrowStartY}}},dy.getTargetEndpoint=function(_t){var bt=_t[0]._private.rscratch;switch(this.recalculateRenderedStyle(_t),bt.edgeType){case"haystack":return{x:bt.haystackPts[2],y:bt.haystackPts[3]};default:return{x:bt.arrowEndX,y:bt.arrowEndY}}};var hv={};function _2(_t,bt,St){for(var wt=function(Gt,Qt,hn,yn){return Wr(Gt,Qt,hn,yn)},Nt=bt._private,Pt=Nt.rstyle.bezierPts,Lt=0;Lt<_t.bezierProjPcts.length;Lt++){var Ht=_t.bezierProjPcts[Lt];Pt.push({x:wt(St[0],St[2],St[4],Ht),y:wt(St[1],St[3],St[5],Ht)})}}hv.storeEdgeProjections=function(_t){var bt=_t._private,St=bt.rscratch,wt=St.edgeType;if(bt.rstyle.bezierPts=null,bt.rstyle.linePts=null,bt.rstyle.haystackPts=null,wt==="multibezier"||wt==="bezier"||wt==="self"||wt==="compound"){bt.rstyle.bezierPts=[];for(var Nt=0;Nt+5<St.allpts.length;Nt+=4)_2(this,_t,St.allpts.slice(Nt,Nt+6))}else if(wt==="segments")for(var Pt=bt.rstyle.linePts=[],Nt=0;Nt+1<St.allpts.length;Nt+=2)Pt.push({x:St.allpts[Nt],y:St.allpts[Nt+1]});else if(wt==="haystack"){var Lt=St.haystackPts;bt.rstyle.haystackPts=[{x:Lt[0],y:Lt[1]},{x:Lt[2],y:Lt[3]}]}bt.rstyle.arrowWidth=this.getArrowWidth(_t.pstyle("width").pfValue,_t.pstyle("arrow-scale").value)*this.arrowShapeWidth},hv.recalculateEdgeProjections=function(_t){this.findEdgeControlPoints(_t)};var n1={};n1.recalculateNodeLabelProjection=function(_t){var bt=_t.pstyle("label").strValue;if(!Gn(bt)){var St,wt,Nt=_t._private,Pt=_t.width(),Lt=_t.height(),Ht=_t.padding(),qt=_t.position(),Gt=_t.pstyle("text-halign").strValue,Qt=_t.pstyle("text-valign").strValue,hn=Nt.rscratch,yn=Nt.rstyle;switch(Gt){case"left":St=qt.x-Pt/2-Ht;break;case"right":St=qt.x+Pt/2+Ht;break;default:St=qt.x}switch(Qt){case"top":wt=qt.y-Lt/2-Ht;break;case"bottom":wt=qt.y+Lt/2+Ht;break;default:wt=qt.y}hn.labelX=St,hn.labelY=wt,yn.labelX=St,yn.labelY=wt,this.calculateLabelAngles(_t),this.applyLabelDimensions(_t)}};var IT=function(bt,St){var wt=Math.atan(St/bt);return bt===0&&wt<0&&(wt=wt*-1),wt},r1=function(bt,St){var wt=St.x-bt.x,Nt=St.y-bt.y;return IT(wt,Nt)},Gu=function(bt,St,wt,Nt){var Pt=M1(0,Nt-.001,1),Lt=M1(0,Nt+.001,1),Ht=ks(bt,St,wt,Pt),qt=ks(bt,St,wt,Lt);return r1(Ht,qt)};n1.recalculateEdgeLabelProjections=function(_t){var bt,St=_t._private,wt=St.rscratch,Nt=this,Pt={mid:_t.pstyle("label").strValue,source:_t.pstyle("source-label").strValue,target:_t.pstyle("target-label").strValue};if(!!(Pt.mid||Pt.source||Pt.target)){bt={x:wt.midX,y:wt.midY};var Lt=function(hn,yn,xn){Ou(St.rscratch,hn,yn,xn),Ou(St.rstyle,hn,yn,xn)};Lt("labelX",null,bt.x),Lt("labelY",null,bt.y);var Ht=IT(wt.midDispX,wt.midDispY);Lt("labelAutoAngle",null,Ht);var qt=function Qt(){if(Qt.cache)return Qt.cache;for(var hn=[],yn=0;yn+5<wt.allpts.length;yn+=4){var xn={x:wt.allpts[yn],y:wt.allpts[yn+1]},bn={x:wt.allpts[yn+2],y:wt.allpts[yn+3]},Nn={x:wt.allpts[yn+4],y:wt.allpts[yn+5]};hn.push({p0:xn,p1:bn,p2:Nn,startDist:0,length:0,segments:[]})}var Pn=St.rstyle.bezierPts,Fn=Nt.bezierProjPcts.length;function Un(rr,hr,ar,vr,Tr){var dr=xp(hr,ar),Sr=rr.segments[rr.segments.length-1],yr={p0:hr,p1:ar,t0:vr,t1:Tr,startDist:Sr?Sr.startDist+Sr.length:0,length:dr};rr.segments.push(yr),rr.length+=dr}for(var Hn=0;Hn<hn.length;Hn++){var nr=hn[Hn],mr=hn[Hn-1];mr&&(nr.startDist=mr.startDist+mr.length),Un(nr,nr.p0,Pn[Hn*Fn],0,Nt.bezierProjPcts[0]);for(var gr=0;gr<Fn-1;gr++)Un(nr,Pn[Hn*Fn+gr],Pn[Hn*Fn+gr+1],Nt.bezierProjPcts[gr],Nt.bezierProjPcts[gr+1]);Un(nr,Pn[Hn*Fn+Fn-1],nr.p2,Nt.bezierProjPcts[Fn-1],1)}return Qt.cache=hn},Gt=function(hn){var yn,xn=hn==="source";if(!!Pt[hn]){var bn=_t.pstyle(hn+"-text-offset").pfValue;switch(wt.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var Nn=qt(),Pn,Fn=0,Un=0,Hn=0;Hn<Nn.length;Hn++){for(var nr=Nn[xn?Hn:Nn.length-1-Hn],mr=0;mr<nr.segments.length;mr++){var gr=nr.segments[xn?mr:nr.segments.length-1-mr],rr=Hn===Nn.length-1&&mr===nr.segments.length-1;if(Fn=Un,Un+=gr.length,Un>=bn||rr){Pn={cp:nr,segment:gr};break}}if(Pn)break}var hr=Pn.cp,ar=Pn.segment,vr=(bn-Fn)/ar.length,Tr=ar.t1-ar.t0,dr=xn?ar.t0+Tr*vr:ar.t1-Tr*vr;dr=M1(0,dr,1),bt=ks(hr.p0,hr.p1,hr.p2,dr),yn=Gu(hr.p0,hr.p1,hr.p2,dr);break}case"straight":case"segments":case"haystack":{for(var Sr=0,yr,Fr,_r,Rr,zr=wt.allpts.length,Vr=0;Vr+3<zr&&(xn?(_r={x:wt.allpts[Vr],y:wt.allpts[Vr+1]},Rr={x:wt.allpts[Vr+2],y:wt.allpts[Vr+3]}):(_r={x:wt.allpts[zr-2-Vr],y:wt.allpts[zr-1-Vr]},Rr={x:wt.allpts[zr-4-Vr],y:wt.allpts[zr-3-Vr]}),yr=xp(_r,Rr),Fr=Sr,Sr+=yr,!(Sr>=bn));Vr+=2);var ga=bn-Fr,jr=ga/yr;jr=M1(0,jr,1),bt=Jl(_r,Rr,jr),yn=r1(_r,Rr);break}}Lt("labelX",hn,bt.x),Lt("labelY",hn,bt.y),Lt("labelAutoAngle",hn,yn)}};Gt("source"),Gt("target"),this.applyLabelDimensions(_t)}},n1.applyLabelDimensions=function(_t){this.applyPrefixedLabelDimensions(_t),_t.isEdge()&&(this.applyPrefixedLabelDimensions(_t,"source"),this.applyPrefixedLabelDimensions(_t,"target"))},n1.applyPrefixedLabelDimensions=function(_t,bt){var St=_t._private,wt=this.getLabelText(_t,bt),Nt=this.calculateLabelDimensions(_t,wt),Pt=_t.pstyle("line-height").pfValue,Lt=_t.pstyle("text-wrap").strValue,Ht=yu(St.rscratch,"labelWrapCachedLines",bt)||[],qt=Lt!=="wrap"?1:Math.max(Ht.length,1),Gt=Nt.height/qt,Qt=Gt*Pt,hn=Nt.width,yn=Nt.height+(qt-1)*(Pt-1)*Gt;Ou(St.rstyle,"labelWidth",bt,hn),Ou(St.rscratch,"labelWidth",bt,hn),Ou(St.rstyle,"labelHeight",bt,yn),Ou(St.rscratch,"labelHeight",bt,yn),Ou(St.rscratch,"labelLineHeight",bt,Qt)},n1.getLabelText=function(_t,bt){var St=_t._private,wt=bt?bt+"-":"",Nt=_t.pstyle(wt+"label").strValue,Pt=_t.pstyle("text-transform").value,Lt=function(ga,jr){return jr?(Ou(St.rscratch,ga,bt,jr),jr):yu(St.rscratch,ga,bt)};if(!Nt)return"";Pt=="none"||(Pt=="uppercase"?Nt=Nt.toUpperCase():Pt=="lowercase"&&(Nt=Nt.toLowerCase()));var Ht=_t.pstyle("text-wrap").value;if(Ht==="wrap"){var qt=Lt("labelKey");if(qt!=null&&Lt("labelWrapKey")===qt)return Lt("labelWrapCachedText");for(var Gt="\u200B",Qt=Nt.split(`
`),hn=_t.pstyle("text-max-width").pfValue,yn=_t.pstyle("text-overflow-wrap").value,xn=yn==="anywhere",bn=[],Nn=/[\s\u200b]+/,Pn=xn?"":" ",Fn=0;Fn<Qt.length;Fn++){var Un=Qt[Fn],Hn=this.calculateLabelDimensions(_t,Un),nr=Hn.width;if(xn){var mr=Un.split("").join(Gt);Un=mr}if(nr>hn){for(var gr=Un.split(Nn),rr="",hr=0;hr<gr.length;hr++){var ar=gr[hr],vr=rr.length===0?ar:rr+Pn+ar,Tr=this.calculateLabelDimensions(_t,vr),dr=Tr.width;dr<=hn?rr+=ar+Pn:(rr&&bn.push(rr),rr=ar+Pn)}rr.match(/^[\s\u200b]+$/)||bn.push(rr)}else bn.push(Un)}Lt("labelWrapCachedLines",bn),Nt=Lt("labelWrapCachedText",bn.join(`
`)),Lt("labelWrapKey",qt)}else if(Ht==="ellipsis"){var Sr=_t.pstyle("text-max-width").pfValue,yr="",Fr="\u2026",_r=!1;if(this.calculateLabelDimensions(_t,Nt).width<Sr)return Nt;for(var Rr=0;Rr<Nt.length;Rr++){var zr=this.calculateLabelDimensions(_t,yr+Nt[Rr]+Fr).width;if(zr>Sr)break;yr+=Nt[Rr],Rr===Nt.length-1&&(_r=!0)}return _r||(yr+=Fr),yr}return Nt},n1.getLabelJustification=function(_t){var bt=_t.pstyle("text-justification").strValue,St=_t.pstyle("text-halign").strValue;if(bt==="auto")if(_t.isNode())switch(St){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return bt},n1.calculateLabelDimensions=function(_t,bt){var St=this,wt=io(bt,_t._private.labelDimsKey),Nt=St.labelDimCache||(St.labelDimCache=[]),Pt=Nt[wt];if(Pt!=null)return Pt;var Lt=0,Ht=_t.pstyle("font-style").strValue,qt=_t.pstyle("font-size").pfValue,Gt=_t.pstyle("font-family").strValue,Qt=_t.pstyle("font-weight").strValue,hn=this.labelCalcCanvas,yn=this.labelCalcCanvasContext;if(!hn){hn=this.labelCalcCanvas=document.createElement("canvas"),yn=this.labelCalcCanvasContext=hn.getContext("2d");var xn=hn.style;xn.position="absolute",xn.left="-9999px",xn.top="-9999px",xn.zIndex="-1",xn.visibility="hidden",xn.pointerEvents="none"}yn.font="".concat(Ht," ").concat(Qt," ").concat(qt,"px ").concat(Gt);for(var bn=0,Nn=0,Pn=bt.split(`
`),Fn=0;Fn<Pn.length;Fn++){var Un=Pn[Fn],Hn=yn.measureText(Un),nr=Math.ceil(Hn.width),mr=qt;bn=Math.max(nr,bn),Nn+=mr}return bn+=Lt,Nn+=Lt,Nt[wt]={width:bn,height:Nn}},n1.calculateLabelAngle=function(_t,bt){var St=_t._private,wt=St.rscratch,Nt=_t.isEdge(),Pt=bt?bt+"-":"",Lt=_t.pstyle(Pt+"text-rotation"),Ht=Lt.strValue;return Ht==="none"?0:Nt&&Ht==="autorotate"?wt.labelAutoAngle:Ht==="autorotate"?0:Lt.pfValue},n1.calculateLabelAngles=function(_t){var bt=this,St=_t.isEdge(),wt=_t._private,Nt=wt.rscratch;Nt.labelAngle=bt.calculateLabelAngle(_t),St&&(Nt.sourceLabelAngle=bt.calculateLabelAngle(_t,"source"),Nt.targetLabelAngle=bt.calculateLabelAngle(_t,"target"))};var mv={},DT=28,gv=!1;mv.getNodeShape=function(_t){var bt=this,St=_t.pstyle("shape").value;if(St==="cutrectangle"&&(_t.width()<DT||_t.height()<DT))return gv||(As("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),gv=!0),"rectangle";if(_t.isParent())return St==="rectangle"||St==="roundrectangle"||St==="round-rectangle"||St==="cutrectangle"||St==="cut-rectangle"||St==="barrel"?St:"rectangle";if(St==="polygon"){var wt=_t.pstyle("shape-polygon-points").value;return bt.nodeShapes.makePolygon(wt).name}return St};var yv={};yv.registerCalculationListeners=function(){var _t=this.cy,bt=_t.collection(),St=this,wt=function(Lt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(bt.merge(Lt),Ht)for(var qt=0;qt<Lt.length;qt++){var Gt=Lt[qt],Qt=Gt._private,hn=Qt.rstyle;hn.clean=!1,hn.cleanConnected=!1}};St.binder(_t).on("bounds.* dirty.*",function(Lt){var Ht=Lt.target;wt(Ht)}).on("style.* background.*",function(Lt){var Ht=Lt.target;wt(Ht,!1)});var Nt=function(Lt){if(Lt){var Ht=St.onUpdateEleCalcsFns;bt.cleanStyle();for(var qt=0;qt<bt.length;qt++){var Gt=bt[qt],Qt=Gt._private.rstyle;Gt.isNode()&&!Qt.cleanConnected&&(wt(Gt.connectedEdges()),Qt.cleanConnected=!0)}if(Ht)for(var hn=0;hn<Ht.length;hn++){var yn=Ht[hn];yn(Lt,bt)}St.recalculateRenderedStyle(bt),bt=_t.collection()}};St.flushRenderedStyleQueue=function(){Nt(!0)},St.beforeRender(Nt,St.beforeRenderPriorities.eleCalcs)},yv.onUpdateEleCalcs=function(_t){var bt=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];bt.push(_t)},yv.recalculateRenderedStyle=function(_t,bt){var St=function(nr){return nr._private.rstyle.cleanConnected},wt=[],Nt=[];if(!this.destroyed){bt===void 0&&(bt=!0);for(var Pt=0;Pt<_t.length;Pt++){var Lt=_t[Pt],Ht=Lt._private,qt=Ht.rstyle;Lt.isEdge()&&(!St(Lt.source())||!St(Lt.target()))&&(qt.clean=!1),!(bt&&qt.clean||Lt.removed())&&Lt.pstyle("display").value!=="none"&&(Ht.group==="nodes"?Nt.push(Lt):wt.push(Lt),qt.clean=!0)}for(var Gt=0;Gt<Nt.length;Gt++){var Qt=Nt[Gt],hn=Qt._private,yn=hn.rstyle,xn=Qt.position();this.recalculateNodeLabelProjection(Qt),yn.nodeX=xn.x,yn.nodeY=xn.y,yn.nodeW=Qt.pstyle("width").pfValue,yn.nodeH=Qt.pstyle("height").pfValue}this.recalculateEdgeProjections(wt);for(var bn=0;bn<wt.length;bn++){var Nn=wt[bn],Pn=Nn._private,Fn=Pn.rstyle,Un=Pn.rscratch;Fn.srcX=Un.arrowStartX,Fn.srcY=Un.arrowStartY,Fn.tgtX=Un.arrowEndX,Fn.tgtY=Un.arrowEndY,Fn.midX=Un.midX,Fn.midY=Un.midY,Fn.labelAngle=Un.labelAngle,Fn.sourceLabelAngle=Un.sourceLabelAngle,Fn.targetLabelAngle=Un.targetLabelAngle}}};var vv={};vv.updateCachedGrabbedEles=function(){var _t=this.cachedZSortedEles;if(!!_t){_t.drag=[],_t.nondrag=[];for(var bt=[],St=0;St<_t.length;St++){var wt=_t[St],Nt=wt._private.rscratch;wt.grabbed()&&!wt.isParent()?bt.push(wt):Nt.inDragLayer?_t.drag.push(wt):_t.nondrag.push(wt)}for(var St=0;St<bt.length;St++){var wt=bt[St];_t.drag.push(wt)}}},vv.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},vv.getCachedZSortedEles=function(_t){if(_t||!this.cachedZSortedEles){var bt=this.cy.mutableElements().toArray();bt.sort(cT),bt.interactive=bt.filter(function(St){return St.interactive()}),this.cachedZSortedEles=bt,this.updateCachedGrabbedEles()}else bt=this.cachedZSortedEles;return bt};var s0={};[Xl,pv,Vu,dy,hv,n1,mv,yv,vv].forEach(function(_t){Qr(s0,_t)});var Yv={};Yv.getCachedImage=function(_t,bt,St){var wt=this,Nt=wt.imageCache=wt.imageCache||{},Pt=Nt[_t];if(Pt)return Pt.image.complete||Pt.image.addEventListener("load",St),Pt.image;Pt=Nt[_t]=Nt[_t]||{};var Lt=Pt.image=new Image;Lt.addEventListener("load",St),Lt.addEventListener("error",function(){Lt.error=!0});var Ht="data:",qt=_t.substring(0,Ht.length).toLowerCase()===Ht;return qt||(bt=bt==="null"?null:bt,Lt.crossOrigin=bt),Lt.src=_t,Lt};var Im={};Im.registerBinding=function(_t,bt,St,wt){var Nt=Array.prototype.slice.apply(arguments,[1]),Pt=this.binder(_t);return Pt.on.apply(Pt,Nt)},Im.binder=function(_t){var bt=this,St=_t===window||_t===document||_t===document.body||Jn(_t);if(bt.supportsPassiveEvents==null){var wt=!1;try{var Nt=Object.defineProperty({},"passive",{get:function(){return wt=!0,!0}});window.addEventListener("test",null,Nt)}catch{}bt.supportsPassiveEvents=wt}var Pt=function(Ht,qt,Gt){var Qt=Array.prototype.slice.call(arguments);return St&&bt.supportsPassiveEvents&&(Qt[2]={capture:Gt??!1,passive:!1,once:!1}),bt.bindings.push({target:_t,args:Qt}),(_t.addEventListener||_t.on).apply(_t,Qt),this};return{on:Pt,addEventListener:Pt,addListener:Pt,bind:Pt}},Im.nodeIsDraggable=function(_t){return _t&&_t.isNode()&&!_t.locked()&&_t.grabbable()},Im.nodeIsGrabbable=function(_t){return this.nodeIsDraggable(_t)&&_t.interactive()},Im.load=function(){var _t=this,bt=function(ur){return ur.selected()},St=function(ur,Gr,Co,lo){ur==null&&(ur=_t.cy);for(var oo=0;oo<Gr.length;oo++){var Ws=Gr[oo];ur.emit({originalEvent:Co,type:Ws,position:lo})}},wt=function(ur){return ur.shiftKey||ur.metaKey||ur.ctrlKey},Nt=function(ur,Gr){var Co=!0;if(_t.cy.hasCompoundNodes()&&ur&&ur.pannable())for(var lo=0;Gr&&lo<Gr.length;lo++){var ur=Gr[lo];if(ur.isNode()&&ur.isParent()&&!ur.pannable()){Co=!1;break}}else Co=!0;return Co},Pt=function(ur){ur[0]._private.grabbed=!0},Lt=function(ur){ur[0]._private.grabbed=!1},Ht=function(ur){ur[0]._private.rscratch.inDragLayer=!0},qt=function(ur){ur[0]._private.rscratch.inDragLayer=!1},Gt=function(ur){ur[0]._private.rscratch.isGrabTarget=!0},Qt=function(ur){ur[0]._private.rscratch.isGrabTarget=!1},hn=function(ur,Gr){var Co=Gr.addToList,lo=Co.has(ur);!lo&&ur.grabbable()&&!ur.locked()&&(Co.merge(ur),Pt(ur))},yn=function(ur,Gr){if(!!ur.cy().hasCompoundNodes()&&!(Gr.inDragLayer==null&&Gr.addToList==null)){var Co=ur.descendants();Gr.inDragLayer&&(Co.forEach(Ht),Co.connectedEdges().forEach(Ht)),Gr.addToList&&hn(Co,Gr)}},xn=function(ur,Gr){Gr=Gr||{};var Co=ur.cy().hasCompoundNodes();Gr.inDragLayer&&(ur.forEach(Ht),ur.neighborhood().stdFilter(function(lo){return!Co||lo.isEdge()}).forEach(Ht)),Gr.addToList&&ur.forEach(function(lo){hn(lo,Gr)}),yn(ur,Gr),Pn(ur,{inDragLayer:Gr.inDragLayer}),_t.updateCachedGrabbedEles()},bn=xn,Nn=function(ur){!ur||(_t.getCachedZSortedEles().forEach(function(Gr){Lt(Gr),qt(Gr),Qt(Gr)}),_t.updateCachedGrabbedEles())},Pn=function(ur,Gr){if(!(Gr.inDragLayer==null&&Gr.addToList==null)&&!!ur.cy().hasCompoundNodes()){var Co=ur.ancestors().orphans();if(!Co.same(ur)){var lo=Co.descendants().spawnSelf().merge(Co).unmerge(ur).unmerge(ur.descendants()),oo=lo.connectedEdges();Gr.inDragLayer&&(oo.forEach(Ht),lo.forEach(Ht)),Gr.addToList&&lo.forEach(function(Ws){hn(Ws,Gr)})}}},Fn=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},Un=typeof MutationObserver<"u",Hn=typeof ResizeObserver<"u";Un?(_t.removeObserver=new MutationObserver(function(Oo){for(var ur=0;ur<Oo.length;ur++){var Gr=Oo[ur],Co=Gr.removedNodes;if(Co)for(var lo=0;lo<Co.length;lo++){var oo=Co[lo];if(oo===_t.container){_t.destroy();break}}}}),_t.container.parentNode&&_t.removeObserver.observe(_t.container.parentNode,{childList:!0})):_t.registerBinding(_t.container,"DOMNodeRemoved",function(Oo){_t.destroy()});var nr=ut.default(function(){_t.cy.resize()},100);Un&&(_t.styleObserver=new MutationObserver(nr),_t.styleObserver.observe(_t.container,{attributes:!0})),_t.registerBinding(window,"resize",nr),Hn&&(_t.resizeObserver=new ResizeObserver(nr),_t.resizeObserver.observe(_t.container));var mr=function(ur,Gr){for(;ur!=null;)Gr(ur),ur=ur.parentNode},gr=function(){_t.invalidateContainerClientCoordsCache()};mr(_t.container,function(Oo){_t.registerBinding(Oo,"transitionend",gr),_t.registerBinding(Oo,"animationend",gr),_t.registerBinding(Oo,"scroll",gr)}),_t.registerBinding(_t.container,"contextmenu",function(Oo){Oo.preventDefault()});var rr=function(){return _t.selection[4]!==0},hr=function(ur){for(var Gr=_t.findContainerClientCoords(),Co=Gr[0],lo=Gr[1],oo=Gr[2],Ws=Gr[3],To=ur.touches?ur.touches:[ur],ls=!1,il=0;il<To.length;il++){var $s=To[il];if(Co<=$s.clientX&&$s.clientX<=Co+oo&&lo<=$s.clientY&&$s.clientY<=lo+Ws){ls=!0;break}}if(!ls)return!1;for(var hs=_t.container,xl=ur.target,Hs=xl.parentNode,Xs=!1;Hs;){if(Hs===hs){Xs=!0;break}Hs=Hs.parentNode}return!!Xs};_t.registerBinding(_t.container,"mousedown",function(ur){if(!!hr(ur)){ur.preventDefault(),Fn(),_t.hoverData.capture=!0,_t.hoverData.which=ur.which;var Gr=_t.cy,Co=[ur.clientX,ur.clientY],lo=_t.projectIntoViewport(Co[0],Co[1]),oo=_t.selection,Ws=_t.findNearestElements(lo[0],lo[1],!0,!1),To=Ws[0],ls=_t.dragData.possibleDragElements;_t.hoverData.mdownPos=lo,_t.hoverData.mdownGPos=Co;var il=function(){_t.hoverData.tapholdCancelled=!1,clearTimeout(_t.hoverData.tapholdTimeout),_t.hoverData.tapholdTimeout=setTimeout(function(){if(!_t.hoverData.tapholdCancelled){var Zl=_t.hoverData.down;Zl?Zl.emit({originalEvent:ur,type:"taphold",position:{x:lo[0],y:lo[1]}}):Gr.emit({originalEvent:ur,type:"taphold",position:{x:lo[0],y:lo[1]}})}},_t.tapholdDuration)};if(ur.which==3){_t.hoverData.cxtStarted=!0;var $s={originalEvent:ur,type:"cxttapstart",position:{x:lo[0],y:lo[1]}};To?(To.activate(),To.emit($s),_t.hoverData.down=To):Gr.emit($s),_t.hoverData.downTime=new Date().getTime(),_t.hoverData.cxtDragged=!1}else if(ur.which==1){To&&To.activate();{if(To!=null&&_t.nodeIsGrabbable(To)){var hs=function(Zl){return{originalEvent:ur,type:Zl,position:{x:lo[0],y:lo[1]}}},xl=function(Zl){Zl.emit(hs("grab"))};if(Gt(To),!To.selected())ls=_t.dragData.possibleDragElements=Gr.collection(),bn(To,{addToList:ls}),To.emit(hs("grabon")).emit(hs("grab"));else{ls=_t.dragData.possibleDragElements=Gr.collection();var Hs=Gr.$(function(Xs){return Xs.isNode()&&Xs.selected()&&_t.nodeIsGrabbable(Xs)});xn(Hs,{addToList:ls}),To.emit(hs("grabon")),Hs.forEach(xl)}_t.redrawHint("eles",!0),_t.redrawHint("drag",!0)}_t.hoverData.down=To,_t.hoverData.downs=Ws,_t.hoverData.downTime=new Date().getTime()}St(To,["mousedown","tapstart","vmousedown"],ur,{x:lo[0],y:lo[1]}),To==null?(oo[4]=1,_t.data.bgActivePosistion={x:lo[0],y:lo[1]},_t.redrawHint("select",!0),_t.redraw()):To.pannable()&&(oo[4]=1),il()}oo[0]=oo[2]=lo[0],oo[1]=oo[3]=lo[1]}},!1),_t.registerBinding(window,"mousemove",function(ur){var Gr=_t.hoverData.capture;if(!(!Gr&&!hr(ur))){var Co=!1,lo=_t.cy,oo=lo.zoom(),Ws=[ur.clientX,ur.clientY],To=_t.projectIntoViewport(Ws[0],Ws[1]),ls=_t.hoverData.mdownPos,il=_t.hoverData.mdownGPos,$s=_t.selection,hs=null;!_t.hoverData.draggingEles&&!_t.hoverData.dragging&&!_t.hoverData.selecting&&(hs=_t.findNearestElement(To[0],To[1],!0,!1));var xl=_t.hoverData.last,Hs=_t.hoverData.down,Xs=[To[0]-$s[2],To[1]-$s[3]],Zl=_t.dragData.possibleDragElements,_u;if(il){var kp=Ws[0]-il[0],Pp=kp*kp,mu=Ws[1]-il[1],zu=mu*mu,$u=Pp+zu;_t.hoverData.isOverThresholdDrag=_u=$u>=_t.desktopTapThreshold2}var I1=wt(ur);_u&&(_t.hoverData.tapholdCancelled=!0);var D1=function(){var gu=_t.hoverData.dragDelta=_t.hoverData.dragDelta||[];gu.length===0?(gu.push(Xs[0]),gu.push(Xs[1])):(gu[0]+=Xs[0],gu[1]+=Xs[1])};Co=!0,St(hs,["mousemove","vmousemove","tapdrag"],ur,{x:To[0],y:To[1]});var N1=function(){_t.data.bgActivePosistion=void 0,_t.hoverData.selecting||lo.emit({originalEvent:ur,type:"boxstart",position:{x:To[0],y:To[1]}}),$s[4]=1,_t.hoverData.selecting=!0,_t.redrawHint("select",!0),_t.redraw()};if(_t.hoverData.which===3){if(_u){var su={originalEvent:ur,type:"cxtdrag",position:{x:To[0],y:To[1]}};Hs?Hs.emit(su):lo.emit(su),_t.hoverData.cxtDragged=!0,(!_t.hoverData.cxtOver||hs!==_t.hoverData.cxtOver)&&(_t.hoverData.cxtOver&&_t.hoverData.cxtOver.emit({originalEvent:ur,type:"cxtdragout",position:{x:To[0],y:To[1]}}),_t.hoverData.cxtOver=hs,hs&&hs.emit({originalEvent:ur,type:"cxtdragover",position:{x:To[0],y:To[1]}}))}}else if(_t.hoverData.dragging){if(Co=!0,lo.panningEnabled()&&lo.userPanningEnabled()){var Mp;if(_t.hoverData.justStartedPan){var Cv=_t.hoverData.mdownPos;Mp={x:(To[0]-Cv[0])*oo,y:(To[1]-Cv[1])*oo},_t.hoverData.justStartedPan=!1}else Mp={x:Xs[0]*oo,y:Xs[1]*oo};lo.panBy(Mp),lo.emit("dragpan"),_t.hoverData.dragged=!0}To=_t.projectIntoViewport(ur.clientX,ur.clientY)}else if($s[4]==1&&(Hs==null||Hs.pannable())){if(_u){if(!_t.hoverData.dragging&&lo.boxSelectionEnabled()&&(I1||!lo.panningEnabled()||!lo.userPanningEnabled()))N1();else if(!_t.hoverData.selecting&&lo.panningEnabled()&&lo.userPanningEnabled()){var Fm=Nt(Hs,_t.hoverData.downs);Fm&&(_t.hoverData.dragging=!0,_t.hoverData.justStartedPan=!0,$s[4]=0,_t.data.bgActivePosistion=Hp(ls),_t.redrawHint("select",!0),_t.redraw())}Hs&&Hs.pannable()&&Hs.active()&&Hs.unactivate()}}else{if(Hs&&Hs.pannable()&&Hs.active()&&Hs.unactivate(),(!Hs||!Hs.grabbed())&&hs!=xl&&(xl&&St(xl,["mouseout","tapdragout"],ur,{x:To[0],y:To[1]}),hs&&St(hs,["mouseover","tapdragover"],ur,{x:To[0],y:To[1]}),_t.hoverData.last=hs),Hs)if(_u){if(lo.boxSelectionEnabled()&&I1)Hs&&Hs.grabbed()&&(Nn(Zl),Hs.emit("freeon"),Zl.emit("free"),_t.dragData.didDrag&&(Hs.emit("dragfreeon"),Zl.emit("dragfree"))),N1();else if(Hs&&Hs.grabbed()&&_t.nodeIsDraggable(Hs)){var Ju=!_t.dragData.didDrag;Ju&&_t.redrawHint("eles",!0),_t.dragData.didDrag=!0,_t.hoverData.draggingEles||xn(Zl,{inDragLayer:!0});var Wu={x:0,y:0};if(sn(Xs[0])&&sn(Xs[1])&&(Wu.x+=Xs[0],Wu.y+=Xs[1],Ju)){var _c=_t.hoverData.dragDelta;_c&&sn(_c[0])&&sn(_c[1])&&(Wu.x+=_c[0],Wu.y+=_c[1])}_t.hoverData.draggingEles=!0,Zl.silentShift(Wu).emit("position drag"),_t.redrawHint("drag",!0),_t.redraw()}}else D1();Co=!0}if($s[2]=To[0],$s[3]=To[1],Co)return ur.stopPropagation&&ur.stopPropagation(),ur.preventDefault&&ur.preventDefault(),!1}},!1);var ar,vr,Tr;_t.registerBinding(window,"mouseup",function(ur){var Gr=_t.hoverData.capture;if(!!Gr){_t.hoverData.capture=!1;var Co=_t.cy,lo=_t.projectIntoViewport(ur.clientX,ur.clientY),oo=_t.selection,Ws=_t.findNearestElement(lo[0],lo[1],!0,!1),To=_t.dragData.possibleDragElements,ls=_t.hoverData.down,il=wt(ur);if(_t.data.bgActivePosistion&&(_t.redrawHint("select",!0),_t.redraw()),_t.hoverData.tapholdCancelled=!0,_t.data.bgActivePosistion=void 0,ls&&ls.unactivate(),_t.hoverData.which===3){var $s={originalEvent:ur,type:"cxttapend",position:{x:lo[0],y:lo[1]}};if(ls?ls.emit($s):Co.emit($s),!_t.hoverData.cxtDragged){var hs={originalEvent:ur,type:"cxttap",position:{x:lo[0],y:lo[1]}};ls?ls.emit(hs):Co.emit(hs)}_t.hoverData.cxtDragged=!1,_t.hoverData.which=null}else if(_t.hoverData.which===1){if(St(Ws,["mouseup","tapend","vmouseup"],ur,{x:lo[0],y:lo[1]}),!_t.dragData.didDrag&&!_t.hoverData.dragged&&!_t.hoverData.selecting&&!_t.hoverData.isOverThresholdDrag&&(St(ls,["click","tap","vclick"],ur,{x:lo[0],y:lo[1]}),vr=!1,ur.timeStamp-Tr<=Co.multiClickDebounceTime()?(ar&&clearTimeout(ar),vr=!0,Tr=null,St(ls,["dblclick","dbltap","vdblclick"],ur,{x:lo[0],y:lo[1]})):(ar=setTimeout(function(){vr||St(ls,["oneclick","onetap","voneclick"],ur,{x:lo[0],y:lo[1]})},Co.multiClickDebounceTime()),Tr=ur.timeStamp)),ls==null&&!_t.dragData.didDrag&&!_t.hoverData.selecting&&!_t.hoverData.dragged&&!wt(ur)&&(Co.$(bt).unselect(["tapunselect"]),To.length>0&&_t.redrawHint("eles",!0),_t.dragData.possibleDragElements=To=Co.collection()),Ws==ls&&!_t.dragData.didDrag&&!_t.hoverData.selecting&&Ws!=null&&Ws._private.selectable&&(_t.hoverData.dragging||(Co.selectionType()==="additive"||il?Ws.selected()?Ws.unselect(["tapunselect"]):Ws.select(["tapselect"]):il||(Co.$(bt).unmerge(Ws).unselect(["tapunselect"]),Ws.select(["tapselect"]))),_t.redrawHint("eles",!0)),_t.hoverData.selecting){var xl=Co.collection(_t.getAllInBox(oo[0],oo[1],oo[2],oo[3]));_t.redrawHint("select",!0),xl.length>0&&_t.redrawHint("eles",!0),Co.emit({type:"boxend",originalEvent:ur,position:{x:lo[0],y:lo[1]}});var Hs=function(_u){return _u.selectable()&&!_u.selected()};Co.selectionType()==="additive"||il||Co.$(bt).unmerge(xl).unselect(),xl.emit("box").stdFilter(Hs).select().emit("boxselect"),_t.redraw()}if(_t.hoverData.dragging&&(_t.hoverData.dragging=!1,_t.redrawHint("select",!0),_t.redrawHint("eles",!0),_t.redraw()),!oo[4]){_t.redrawHint("drag",!0),_t.redrawHint("eles",!0);var Xs=ls&&ls.grabbed();Nn(To),Xs&&(ls.emit("freeon"),To.emit("free"),_t.dragData.didDrag&&(ls.emit("dragfreeon"),To.emit("dragfree")))}}oo[4]=0,_t.hoverData.down=null,_t.hoverData.cxtStarted=!1,_t.hoverData.draggingEles=!1,_t.hoverData.selecting=!1,_t.hoverData.isOverThresholdDrag=!1,_t.dragData.didDrag=!1,_t.hoverData.dragged=!1,_t.hoverData.dragDelta=[],_t.hoverData.mdownPos=null,_t.hoverData.mdownGPos=null}},!1);var dr=function(ur){if(!_t.scrollingPage){var Gr=_t.cy,Co=Gr.zoom(),lo=Gr.pan(),oo=_t.projectIntoViewport(ur.clientX,ur.clientY),Ws=[oo[0]*Co+lo.x,oo[1]*Co+lo.y];if(_t.hoverData.draggingEles||_t.hoverData.dragging||_t.hoverData.cxtStarted||rr()){ur.preventDefault();return}if(Gr.panningEnabled()&&Gr.userPanningEnabled()&&Gr.zoomingEnabled()&&Gr.userZoomingEnabled()){ur.preventDefault(),_t.data.wheelZooming=!0,clearTimeout(_t.data.wheelTimeout),_t.data.wheelTimeout=setTimeout(function(){_t.data.wheelZooming=!1,_t.redrawHint("eles",!0),_t.redraw()},150);var To;ur.deltaY!=null?To=ur.deltaY/-250:ur.wheelDeltaY!=null?To=ur.wheelDeltaY/1e3:To=ur.wheelDelta/1e3,To=To*_t.wheelSensitivity;var ls=ur.deltaMode===1;ls&&(To*=33);var il=Gr.zoom()*Math.pow(10,To);ur.type==="gesturechange"&&(il=_t.gestureStartZoom*ur.scale),Gr.zoom({level:il,renderedPosition:{x:Ws[0],y:Ws[1]}}),Gr.emit(ur.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};_t.registerBinding(_t.container,"wheel",dr,!0),_t.registerBinding(window,"scroll",function(ur){_t.scrollingPage=!0,clearTimeout(_t.scrollingPageTimeout),_t.scrollingPageTimeout=setTimeout(function(){_t.scrollingPage=!1},250)},!0),_t.registerBinding(_t.container,"gesturestart",function(ur){_t.gestureStartZoom=_t.cy.zoom(),_t.hasTouchStarted||ur.preventDefault()},!0),_t.registerBinding(_t.container,"gesturechange",function(Oo){_t.hasTouchStarted||dr(Oo)},!0),_t.registerBinding(_t.container,"mouseout",function(ur){var Gr=_t.projectIntoViewport(ur.clientX,ur.clientY);_t.cy.emit({originalEvent:ur,type:"mouseout",position:{x:Gr[0],y:Gr[1]}})},!1),_t.registerBinding(_t.container,"mouseover",function(ur){var Gr=_t.projectIntoViewport(ur.clientX,ur.clientY);_t.cy.emit({originalEvent:ur,type:"mouseover",position:{x:Gr[0],y:Gr[1]}})},!1);var Sr,yr,Fr,_r,Rr,zr,Vr,ga,jr,_i,co,mo,uo,so=function(ur,Gr,Co,lo){return Math.sqrt((Co-ur)*(Co-ur)+(lo-Gr)*(lo-Gr))},Br=function(ur,Gr,Co,lo){return(Co-ur)*(Co-ur)+(lo-Gr)*(lo-Gr)},fo;_t.registerBinding(_t.container,"touchstart",fo=function(ur){if(_t.hasTouchStarted=!0,!!hr(ur)){Fn(),_t.touchData.capture=!0,_t.data.bgActivePosistion=void 0;var Gr=_t.cy,Co=_t.touchData.now,lo=_t.touchData.earlier;if(ur.touches[0]){var oo=_t.projectIntoViewport(ur.touches[0].clientX,ur.touches[0].clientY);Co[0]=oo[0],Co[1]=oo[1]}if(ur.touches[1]){var oo=_t.projectIntoViewport(ur.touches[1].clientX,ur.touches[1].clientY);Co[2]=oo[0],Co[3]=oo[1]}if(ur.touches[2]){var oo=_t.projectIntoViewport(ur.touches[2].clientX,ur.touches[2].clientY);Co[4]=oo[0],Co[5]=oo[1]}if(ur.touches[1]){_t.touchData.singleTouchMoved=!0,Nn(_t.dragData.touchDragEles);var Ws=_t.findContainerClientCoords();jr=Ws[0],_i=Ws[1],co=Ws[2],mo=Ws[3],Sr=ur.touches[0].clientX-jr,yr=ur.touches[0].clientY-_i,Fr=ur.touches[1].clientX-jr,_r=ur.touches[1].clientY-_i,uo=0<=Sr&&Sr<=co&&0<=Fr&&Fr<=co&&0<=yr&&yr<=mo&&0<=_r&&_r<=mo;var To=Gr.pan(),ls=Gr.zoom();Rr=so(Sr,yr,Fr,_r),zr=Br(Sr,yr,Fr,_r),Vr=[(Sr+Fr)/2,(yr+_r)/2],ga=[(Vr[0]-To.x)/ls,(Vr[1]-To.y)/ls];var il=200,$s=il*il;if(zr<$s&&!ur.touches[2]){var hs=_t.findNearestElement(Co[0],Co[1],!0,!0),xl=_t.findNearestElement(Co[2],Co[3],!0,!0);hs&&hs.isNode()?(hs.activate().emit({originalEvent:ur,type:"cxttapstart",position:{x:Co[0],y:Co[1]}}),_t.touchData.start=hs):xl&&xl.isNode()?(xl.activate().emit({originalEvent:ur,type:"cxttapstart",position:{x:Co[0],y:Co[1]}}),_t.touchData.start=xl):Gr.emit({originalEvent:ur,type:"cxttapstart",position:{x:Co[0],y:Co[1]}}),_t.touchData.start&&(_t.touchData.start._private.grabbed=!1),_t.touchData.cxt=!0,_t.touchData.cxtDragged=!1,_t.data.bgActivePosistion=void 0,_t.redraw();return}}if(ur.touches[2])Gr.boxSelectionEnabled()&&ur.preventDefault();else if(!ur.touches[1]){if(ur.touches[0]){var Hs=_t.findNearestElements(Co[0],Co[1],!0,!0),Xs=Hs[0];if(Xs!=null&&(Xs.activate(),_t.touchData.start=Xs,_t.touchData.starts=Hs,_t.nodeIsGrabbable(Xs))){var Zl=_t.dragData.touchDragEles=Gr.collection(),_u=null;_t.redrawHint("eles",!0),_t.redrawHint("drag",!0),Xs.selected()?(_u=Gr.$(function($u){return $u.selected()&&_t.nodeIsGrabbable($u)}),xn(_u,{addToList:Zl})):bn(Xs,{addToList:Zl}),Gt(Xs);var kp=function(I1){return{originalEvent:ur,type:I1,position:{x:Co[0],y:Co[1]}}};Xs.emit(kp("grabon")),_u?_u.forEach(function($u){$u.emit(kp("grab"))}):Xs.emit(kp("grab"))}St(Xs,["touchstart","tapstart","vmousedown"],ur,{x:Co[0],y:Co[1]}),Xs==null&&(_t.data.bgActivePosistion={x:oo[0],y:oo[1]},_t.redrawHint("select",!0),_t.redraw()),_t.touchData.singleTouchMoved=!1,_t.touchData.singleTouchStartTime=+new Date,clearTimeout(_t.touchData.tapholdTimeout),_t.touchData.tapholdTimeout=setTimeout(function(){_t.touchData.singleTouchMoved===!1&&!_t.pinching&&!_t.touchData.selecting&&St(_t.touchData.start,["taphold"],ur,{x:Co[0],y:Co[1]})},_t.tapholdDuration)}}if(ur.touches.length>=1){for(var Pp=_t.touchData.startPosition=[],mu=0;mu<Co.length;mu++)Pp[mu]=lo[mu]=Co[mu];var zu=ur.touches[0];_t.touchData.startGPosition=[zu.clientX,zu.clientY]}}},!1);var vo;_t.registerBinding(window,"touchmove",vo=function(ur){var Gr=_t.touchData.capture;if(!(!Gr&&!hr(ur))){var Co=_t.selection,lo=_t.cy,oo=_t.touchData.now,Ws=_t.touchData.earlier,To=lo.zoom();if(ur.touches[0]){var ls=_t.projectIntoViewport(ur.touches[0].clientX,ur.touches[0].clientY);oo[0]=ls[0],oo[1]=ls[1]}if(ur.touches[1]){var ls=_t.projectIntoViewport(ur.touches[1].clientX,ur.touches[1].clientY);oo[2]=ls[0],oo[3]=ls[1]}if(ur.touches[2]){var ls=_t.projectIntoViewport(ur.touches[2].clientX,ur.touches[2].clientY);oo[4]=ls[0],oo[5]=ls[1]}var il=_t.touchData.startGPosition,$s;if(Gr&&ur.touches[0]&&il){for(var hs=[],xl=0;xl<oo.length;xl++)hs[xl]=oo[xl]-Ws[xl];var Hs=ur.touches[0].clientX-il[0],Xs=Hs*Hs,Zl=ur.touches[0].clientY-il[1],_u=Zl*Zl,kp=Xs+_u;$s=kp>=_t.touchTapThreshold2}if(Gr&&_t.touchData.cxt){ur.preventDefault();var Pp=ur.touches[0].clientX-jr,mu=ur.touches[0].clientY-_i,zu=ur.touches[1].clientX-jr,$u=ur.touches[1].clientY-_i,I1=Br(Pp,mu,zu,$u),D1=I1/zr,N1=150,su=N1*N1,Mp=1.5,Cv=Mp*Mp;if(D1>=Cv||I1>=su){_t.touchData.cxt=!1,_t.data.bgActivePosistion=void 0,_t.redrawHint("select",!0);var Fm={originalEvent:ur,type:"cxttapend",position:{x:oo[0],y:oo[1]}};_t.touchData.start?(_t.touchData.start.unactivate().emit(Fm),_t.touchData.start=null):lo.emit(Fm)}}if(Gr&&_t.touchData.cxt){var Fm={originalEvent:ur,type:"cxtdrag",position:{x:oo[0],y:oo[1]}};_t.data.bgActivePosistion=void 0,_t.redrawHint("select",!0),_t.touchData.start?_t.touchData.start.emit(Fm):lo.emit(Fm),_t.touchData.start&&(_t.touchData.start._private.grabbed=!1),_t.touchData.cxtDragged=!0;var Ju=_t.findNearestElement(oo[0],oo[1],!0,!0);(!_t.touchData.cxtOver||Ju!==_t.touchData.cxtOver)&&(_t.touchData.cxtOver&&_t.touchData.cxtOver.emit({originalEvent:ur,type:"cxtdragout",position:{x:oo[0],y:oo[1]}}),_t.touchData.cxtOver=Ju,Ju&&Ju.emit({originalEvent:ur,type:"cxtdragover",position:{x:oo[0],y:oo[1]}}))}else if(Gr&&ur.touches[2]&&lo.boxSelectionEnabled())ur.preventDefault(),_t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,_t.touchData.selecting||lo.emit({originalEvent:ur,type:"boxstart",position:{x:oo[0],y:oo[1]}}),_t.touchData.selecting=!0,_t.touchData.didSelect=!0,Co[4]=1,!Co||Co.length===0||Co[0]===void 0?(Co[0]=(oo[0]+oo[2]+oo[4])/3,Co[1]=(oo[1]+oo[3]+oo[5])/3,Co[2]=(oo[0]+oo[2]+oo[4])/3+1,Co[3]=(oo[1]+oo[3]+oo[5])/3+1):(Co[2]=(oo[0]+oo[2]+oo[4])/3,Co[3]=(oo[1]+oo[3]+oo[5])/3),_t.redrawHint("select",!0),_t.redraw();else if(Gr&&ur.touches[1]&&!_t.touchData.didSelect&&lo.zoomingEnabled()&&lo.panningEnabled()&&lo.userZoomingEnabled()&&lo.userPanningEnabled()){ur.preventDefault(),_t.data.bgActivePosistion=void 0,_t.redrawHint("select",!0);var Wu=_t.dragData.touchDragEles;if(Wu){_t.redrawHint("drag",!0);for(var _c=0;_c<Wu.length;_c++){var yy=Wu[_c]._private;yy.grabbed=!1,yy.rscratch.inDragLayer=!1}}var gu=_t.touchData.start,Pp=ur.touches[0].clientX-jr,mu=ur.touches[0].clientY-_i,zu=ur.touches[1].clientX-jr,$u=ur.touches[1].clientY-_i,Vs=so(Pp,mu,zu,$u),a2=Vs/Rr;if(uo){var mp=Pp-Sr,s2=mu-yr,mE=zu-Fr,wl=$u-_r,gE=(mp+mE)/2,l2=(s2+wl)/2,sm=lo.zoom(),oT=sm*a2,Sv=lo.pan(),u2=ga[0]*sm+Sv.x,c2=ga[1]*sm+Sv.y,yE={x:-oT/sm*(u2-Sv.x-gE)+u2,y:-oT/sm*(c2-Sv.y-l2)+c2};if(gu&&gu.active()){var Wu=_t.dragData.touchDragEles;Nn(Wu),_t.redrawHint("drag",!0),_t.redrawHint("eles",!0),gu.unactivate().emit("freeon"),Wu.emit("free"),_t.dragData.didDrag&&(gu.emit("dragfreeon"),Wu.emit("dragfree"))}lo.viewport({zoom:oT,pan:yE,cancelOnFailedZoom:!0}),lo.emit("pinchzoom"),Rr=Vs,Sr=Pp,yr=mu,Fr=zu,_r=$u,_t.pinching=!0}if(ur.touches[0]){var ls=_t.projectIntoViewport(ur.touches[0].clientX,ur.touches[0].clientY);oo[0]=ls[0],oo[1]=ls[1]}if(ur.touches[1]){var ls=_t.projectIntoViewport(ur.touches[1].clientX,ur.touches[1].clientY);oo[2]=ls[0],oo[3]=ls[1]}if(ur.touches[2]){var ls=_t.projectIntoViewport(ur.touches[2].clientX,ur.touches[2].clientY);oo[4]=ls[0],oo[5]=ls[1]}}else if(ur.touches[0]&&!_t.touchData.didSelect){var Fp=_t.touchData.start,sT=_t.touchData.last,Ju;if(!_t.hoverData.draggingEles&&!_t.swipePanning&&(Ju=_t.findNearestElement(oo[0],oo[1],!0,!0)),Gr&&Fp!=null&&ur.preventDefault(),Gr&&Fp!=null&&_t.nodeIsDraggable(Fp))if($s){var Wu=_t.dragData.touchDragEles,d2=!_t.dragData.didDrag;d2&&xn(Wu,{inDragLayer:!0}),_t.dragData.didDrag=!0;var vy={x:0,y:0};if(sn(hs[0])&&sn(hs[1])&&(vy.x+=hs[0],vy.y+=hs[1],d2)){_t.redrawHint("eles",!0);var Lp=_t.touchData.dragDelta;Lp&&sn(Lp[0])&&sn(Lp[1])&&(vy.x+=Lp[0],vy.y+=Lp[1])}_t.hoverData.draggingEles=!0,Wu.silentShift(vy).emit("position drag"),_t.redrawHint("drag",!0),_t.touchData.startPosition[0]==Ws[0]&&_t.touchData.startPosition[1]==Ws[1]&&_t.redrawHint("eles",!0),_t.redraw()}else{var Lp=_t.touchData.dragDelta=_t.touchData.dragDelta||[];Lp.length===0?(Lp.push(hs[0]),Lp.push(hs[1])):(Lp[0]+=hs[0],Lp[1]+=hs[1])}if(St(Fp||Ju,["touchmove","tapdrag","vmousemove"],ur,{x:oo[0],y:oo[1]}),(!Fp||!Fp.grabbed())&&Ju!=sT&&(sT&&sT.emit({originalEvent:ur,type:"tapdragout",position:{x:oo[0],y:oo[1]}}),Ju&&Ju.emit({originalEvent:ur,type:"tapdragover",position:{x:oo[0],y:oo[1]}})),_t.touchData.last=Ju,Gr)for(var _c=0;_c<oo.length;_c++)oo[_c]&&_t.touchData.startPosition[_c]&&$s&&(_t.touchData.singleTouchMoved=!0);if(Gr&&(Fp==null||Fp.pannable())&&lo.panningEnabled()&&lo.userPanningEnabled()){var vE=Nt(Fp,_t.touchData.starts);vE&&(ur.preventDefault(),_t.data.bgActivePosistion||(_t.data.bgActivePosistion=Hp(_t.touchData.startPosition)),_t.swipePanning?(lo.panBy({x:hs[0]*To,y:hs[1]*To}),lo.emit("dragpan")):$s&&(_t.swipePanning=!0,lo.panBy({x:Hs*To,y:Zl*To}),lo.emit("dragpan"),Fp&&(Fp.unactivate(),_t.redrawHint("select",!0),_t.touchData.start=null)));var ls=_t.projectIntoViewport(ur.touches[0].clientX,ur.touches[0].clientY);oo[0]=ls[0],oo[1]=ls[1]}}for(var xl=0;xl<oo.length;xl++)Ws[xl]=oo[xl];Gr&&ur.touches.length>0&&!_t.hoverData.draggingEles&&!_t.swipePanning&&_t.data.bgActivePosistion!=null&&(_t.data.bgActivePosistion=void 0,_t.redrawHint("select",!0),_t.redraw())}},!1);var Io;_t.registerBinding(window,"touchcancel",Io=function(ur){var Gr=_t.touchData.start;_t.touchData.capture=!1,Gr&&Gr.unactivate()});var Fo,Is,Ss,Wo;if(_t.registerBinding(window,"touchend",Fo=function(ur){var Gr=_t.touchData.start,Co=_t.touchData.capture;if(Co)ur.touches.length===0&&(_t.touchData.capture=!1),ur.preventDefault();else return;var lo=_t.selection;_t.swipePanning=!1,_t.hoverData.draggingEles=!1;var oo=_t.cy,Ws=oo.zoom(),To=_t.touchData.now,ls=_t.touchData.earlier;if(ur.touches[0]){var il=_t.projectIntoViewport(ur.touches[0].clientX,ur.touches[0].clientY);To[0]=il[0],To[1]=il[1]}if(ur.touches[1]){var il=_t.projectIntoViewport(ur.touches[1].clientX,ur.touches[1].clientY);To[2]=il[0],To[3]=il[1]}if(ur.touches[2]){var il=_t.projectIntoViewport(ur.touches[2].clientX,ur.touches[2].clientY);To[4]=il[0],To[5]=il[1]}Gr&&Gr.unactivate();var $s;if(_t.touchData.cxt){if($s={originalEvent:ur,type:"cxttapend",position:{x:To[0],y:To[1]}},Gr?Gr.emit($s):oo.emit($s),!_t.touchData.cxtDragged){var hs={originalEvent:ur,type:"cxttap",position:{x:To[0],y:To[1]}};Gr?Gr.emit(hs):oo.emit(hs)}_t.touchData.start&&(_t.touchData.start._private.grabbed=!1),_t.touchData.cxt=!1,_t.touchData.start=null,_t.redraw();return}if(!ur.touches[2]&&oo.boxSelectionEnabled()&&_t.touchData.selecting){_t.touchData.selecting=!1;var xl=oo.collection(_t.getAllInBox(lo[0],lo[1],lo[2],lo[3]));lo[0]=void 0,lo[1]=void 0,lo[2]=void 0,lo[3]=void 0,lo[4]=0,_t.redrawHint("select",!0),oo.emit({type:"boxend",originalEvent:ur,position:{x:To[0],y:To[1]}});var Hs=function(su){return su.selectable()&&!su.selected()};xl.emit("box").stdFilter(Hs).select().emit("boxselect"),xl.nonempty()&&_t.redrawHint("eles",!0),_t.redraw()}if(Gr?.unactivate(),ur.touches[2])_t.data.bgActivePosistion=void 0,_t.redrawHint("select",!0);else if(!ur.touches[1]){if(!ur.touches[0]){if(!ur.touches[0]){_t.data.bgActivePosistion=void 0,_t.redrawHint("select",!0);var Xs=_t.dragData.touchDragEles;if(Gr!=null){var Zl=Gr._private.grabbed;Nn(Xs),_t.redrawHint("drag",!0),_t.redrawHint("eles",!0),Zl&&(Gr.emit("freeon"),Xs.emit("free"),_t.dragData.didDrag&&(Gr.emit("dragfreeon"),Xs.emit("dragfree"))),St(Gr,["touchend","tapend","vmouseup","tapdragout"],ur,{x:To[0],y:To[1]}),Gr.unactivate(),_t.touchData.start=null}else{var _u=_t.findNearestElement(To[0],To[1],!0,!0);St(_u,["touchend","tapend","vmouseup","tapdragout"],ur,{x:To[0],y:To[1]})}var kp=_t.touchData.startPosition[0]-To[0],Pp=kp*kp,mu=_t.touchData.startPosition[1]-To[1],zu=mu*mu,$u=Pp+zu,I1=$u*Ws*Ws;_t.touchData.singleTouchMoved||(Gr||oo.$(":selected").unselect(["tapunselect"]),St(Gr,["tap","vclick"],ur,{x:To[0],y:To[1]}),Is=!1,ur.timeStamp-Wo<=oo.multiClickDebounceTime()?(Ss&&clearTimeout(Ss),Is=!0,Wo=null,St(Gr,["dbltap","vdblclick"],ur,{x:To[0],y:To[1]})):(Ss=setTimeout(function(){Is||St(Gr,["onetap","voneclick"],ur,{x:To[0],y:To[1]})},oo.multiClickDebounceTime()),Wo=ur.timeStamp)),Gr!=null&&!_t.dragData.didDrag&&Gr._private.selectable&&I1<_t.touchTapThreshold2&&!_t.pinching&&(oo.selectionType()==="single"?(oo.$(bt).unmerge(Gr).unselect(["tapunselect"]),Gr.select(["tapselect"])):Gr.selected()?Gr.unselect(["tapunselect"]):Gr.select(["tapselect"]),_t.redrawHint("eles",!0)),_t.touchData.singleTouchMoved=!0}}}for(var D1=0;D1<To.length;D1++)ls[D1]=To[D1];_t.dragData.didDrag=!1,ur.touches.length===0&&(_t.touchData.dragDelta=[],_t.touchData.startPosition=null,_t.touchData.startGPosition=null,_t.touchData.didSelect=!1),ur.touches.length<2&&(ur.touches.length===1&&(_t.touchData.startGPosition=[ur.touches[0].clientX,ur.touches[0].clientY]),_t.pinching=!1,_t.redrawHint("eles",!0),_t.redraw())},!1),typeof TouchEvent>"u"){var Po=[],ps=function(ur){return{clientX:ur.clientX,clientY:ur.clientY,force:1,identifier:ur.pointerId,pageX:ur.pageX,pageY:ur.pageY,radiusX:ur.width/2,radiusY:ur.height/2,screenX:ur.screenX,screenY:ur.screenY,target:ur.target}},Ao=function(ur){return{event:ur,touch:ps(ur)}},Uo=function(ur){Po.push(Ao(ur))},Ko=function(ur){for(var Gr=0;Gr<Po.length;Gr++){var Co=Po[Gr];if(Co.event.pointerId===ur.pointerId){Po.splice(Gr,1);return}}},gs=function(ur){var Gr=Po.filter(function(Co){return Co.event.pointerId===ur.pointerId})[0];Gr.event=ur,Gr.touch=ps(ur)},zs=function(ur){ur.touches=Po.map(function(Gr){return Gr.touch})},ys=function(ur){return ur.pointerType==="mouse"||ur.pointerType===4};_t.registerBinding(_t.container,"pointerdown",function(Oo){ys(Oo)||(Oo.preventDefault(),Uo(Oo),zs(Oo),fo(Oo))}),_t.registerBinding(_t.container,"pointerup",function(Oo){ys(Oo)||(Ko(Oo),zs(Oo),Fo(Oo))}),_t.registerBinding(_t.container,"pointercancel",function(Oo){ys(Oo)||(Ko(Oo),zs(Oo),Io(Oo))}),_t.registerBinding(_t.container,"pointermove",function(Oo){ys(Oo)||(Oo.preventDefault(),gs(Oo),zs(Oo),vo(Oo))})}};var O1={};O1.generatePolygon=function(_t,bt){return this.nodeShapes[_t]={renderer:this,name:_t,points:bt,draw:function(wt,Nt,Pt,Lt,Ht){this.renderer.nodeShapeImpl("polygon",wt,Nt,Pt,Lt,Ht,this.points)},intersectLine:function(wt,Nt,Pt,Lt,Ht,qt,Gt){return cu(Ht,qt,this.points,wt,Nt,Pt/2,Lt/2,Gt)},checkPoint:function(wt,Nt,Pt,Lt,Ht,qt,Gt){return ep(wt,Nt,this.points,qt,Gt,Lt,Ht,[0,-1],Pt)}}},O1.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(bt,St,wt,Nt,Pt){this.renderer.nodeShapeImpl(this.name,bt,St,wt,Nt,Pt)},intersectLine:function(bt,St,wt,Nt,Pt,Lt,Ht){return F1(Pt,Lt,bt,St,wt/2+Ht,Nt/2+Ht)},checkPoint:function(bt,St,wt,Nt,Pt,Lt,Ht){return Js(bt,St,Nt,Pt,Lt,Ht,wt)}}},O1.generateRoundPolygon=function(_t,bt){for(var St=new Array(bt.length*2),wt=0;wt<bt.length/2;wt++){var Nt=wt*2,Pt=void 0;wt<bt.length/2-1?Pt=(wt+1)*2:Pt=0,St[wt*4]=bt[Nt],St[wt*4+1]=bt[Nt+1];var Lt=bt[Pt]-bt[Nt],Ht=bt[Pt+1]-bt[Nt+1],qt=Math.sqrt(Lt*Lt+Ht*Ht);St[wt*4+2]=Lt/qt,St[wt*4+3]=Ht/qt}return this.nodeShapes[_t]={renderer:this,name:_t,points:St,draw:function(Qt,hn,yn,xn,bn){this.renderer.nodeShapeImpl("round-polygon",Qt,hn,yn,xn,bn,this.points)},intersectLine:function(Qt,hn,yn,xn,bn,Nn,Pn){return L1(bn,Nn,this.points,Qt,hn,yn,xn)},checkPoint:function(Qt,hn,yn,xn,bn,Nn,Pn){return A0(Qt,hn,this.points,Nn,Pn,xn,bn)}}},O1.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:xo(4,0),draw:function(bt,St,wt,Nt,Pt){this.renderer.nodeShapeImpl(this.name,bt,St,wt,Nt,Pt)},intersectLine:function(bt,St,wt,Nt,Pt,Lt,Ht){return Sp(Pt,Lt,bt,St,wt,Nt,Ht)},checkPoint:function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=Du(Nt,Pt),Gt=qt*2;return!!(ep(bt,St,this.points,Lt,Ht,Nt,Pt-Gt,[0,-1],wt)||ep(bt,St,this.points,Lt,Ht,Nt-Gt,Pt,[0,-1],wt)||Js(bt,St,Gt,Gt,Lt-Nt/2+qt,Ht-Pt/2+qt,wt)||Js(bt,St,Gt,Gt,Lt+Nt/2-qt,Ht-Pt/2+qt,wt)||Js(bt,St,Gt,Gt,Lt+Nt/2-qt,Ht+Pt/2-qt,wt)||Js(bt,St,Gt,Gt,Lt-Nt/2+qt,Ht+Pt/2-qt,wt))}}},O1.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:Vp(),points:xo(4,0),draw:function(bt,St,wt,Nt,Pt){this.renderer.nodeShapeImpl(this.name,bt,St,wt,Nt,Pt)},generateCutTrianglePts:function(bt,St,wt,Nt){var Pt=this.cornerLength,Lt=St/2,Ht=bt/2,qt=wt-Ht,Gt=wt+Ht,Qt=Nt-Lt,hn=Nt+Lt;return{topLeft:[qt,Qt+Pt,qt+Pt,Qt,qt+Pt,Qt+Pt],topRight:[Gt-Pt,Qt,Gt,Qt+Pt,Gt-Pt,Qt+Pt],bottomRight:[Gt,hn-Pt,Gt-Pt,hn,Gt-Pt,hn-Pt],bottomLeft:[qt+Pt,hn,qt,hn-Pt,qt+Pt,hn-Pt]}},intersectLine:function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=this.generateCutTrianglePts(wt+2*Ht,Nt+2*Ht,bt,St),Gt=[].concat.apply([],[qt.topLeft.splice(0,4),qt.topRight.splice(0,4),qt.bottomRight.splice(0,4),qt.bottomLeft.splice(0,4)]);return cu(Pt,Lt,Gt,bt,St)},checkPoint:function(bt,St,wt,Nt,Pt,Lt,Ht){if(ep(bt,St,this.points,Lt,Ht,Nt,Pt-2*this.cornerLength,[0,-1],wt)||ep(bt,St,this.points,Lt,Ht,Nt-2*this.cornerLength,Pt,[0,-1],wt))return!0;var qt=this.generateCutTrianglePts(Nt,Pt,Lt,Ht);return qs(bt,St,qt.topLeft)||qs(bt,St,qt.topRight)||qs(bt,St,qt.bottomRight)||qs(bt,St,qt.bottomLeft)}}},O1.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:xo(4,0),draw:function(bt,St,wt,Nt,Pt){this.renderer.nodeShapeImpl(this.name,bt,St,wt,Nt,Pt)},intersectLine:function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=.15,Gt=.5,Qt=.85,hn=this.generateBarrelBezierPts(wt+2*Ht,Nt+2*Ht,bt,St),yn=function(Nn){var Pn=ks({x:Nn[0],y:Nn[1]},{x:Nn[2],y:Nn[3]},{x:Nn[4],y:Nn[5]},qt),Fn=ks({x:Nn[0],y:Nn[1]},{x:Nn[2],y:Nn[3]},{x:Nn[4],y:Nn[5]},Gt),Un=ks({x:Nn[0],y:Nn[1]},{x:Nn[2],y:Nn[3]},{x:Nn[4],y:Nn[5]},Qt);return[Nn[0],Nn[1],Pn.x,Pn.y,Fn.x,Fn.y,Un.x,Un.y,Nn[4],Nn[5]]},xn=[].concat(yn(hn.topLeft),yn(hn.topRight),yn(hn.bottomRight),yn(hn.bottomLeft));return cu(Pt,Lt,xn,bt,St)},generateBarrelBezierPts:function(bt,St,wt,Nt){var Pt=St/2,Lt=bt/2,Ht=wt-Lt,qt=wt+Lt,Gt=Nt-Pt,Qt=Nt+Pt,hn=Um(bt,St),yn=hn.heightOffset,xn=hn.widthOffset,bn=hn.ctrlPtOffsetPct*bt,Nn={topLeft:[Ht,Gt+yn,Ht+bn,Gt,Ht+xn,Gt],topRight:[qt-xn,Gt,qt-bn,Gt,qt,Gt+yn],bottomRight:[qt,Qt-yn,qt-bn,Qt,qt-xn,Qt],bottomLeft:[Ht+xn,Qt,Ht+bn,Qt,Ht,Qt-yn]};return Nn.topLeft.isTop=!0,Nn.topRight.isTop=!0,Nn.bottomLeft.isBottom=!0,Nn.bottomRight.isBottom=!0,Nn},checkPoint:function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=Um(Nt,Pt),Gt=qt.heightOffset,Qt=qt.widthOffset;if(ep(bt,St,this.points,Lt,Ht,Nt,Pt-2*Gt,[0,-1],wt)||ep(bt,St,this.points,Lt,Ht,Nt-2*Qt,Pt,[0,-1],wt))return!0;for(var hn=this.generateBarrelBezierPts(Nt,Pt,Lt,Ht),yn=function(rr,hr,ar){var vr=ar[4],Tr=ar[2],dr=ar[0],Sr=ar[5],yr=ar[1],Fr=Math.min(vr,dr),_r=Math.max(vr,dr),Rr=Math.min(Sr,yr),zr=Math.max(Sr,yr);if(Fr<=rr&&rr<=_r&&Rr<=hr&&hr<=zr){var Vr=Ol(vr,Tr,dr),ga=T0(Vr[0],Vr[1],Vr[2],rr),jr=ga.filter(function(_i){return 0<=_i&&_i<=1});if(jr.length>0)return jr[0]}return null},xn=Object.keys(hn),bn=0;bn<xn.length;bn++){var Nn=xn[bn],Pn=hn[Nn],Fn=yn(bt,St,Pn);if(Fn!=null){var Un=Pn[5],Hn=Pn[3],nr=Pn[1],mr=Wr(Un,Hn,nr,Fn);if(Pn.isTop&&mr<=St||Pn.isBottom&&St<=mr)return!0}}return!1}}},O1.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:xo(4,0),draw:function(bt,St,wt,Nt,Pt){this.renderer.nodeShapeImpl(this.name,bt,St,wt,Nt,Pt)},intersectLine:function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=bt-(wt/2+Ht),Gt=St-(Nt/2+Ht),Qt=Gt,hn=bt+(wt/2+Ht),yn=ql(Pt,Lt,bt,St,qt,Gt,hn,Qt,!1);return yn.length>0?yn:Sp(Pt,Lt,bt,St,wt,Nt,Ht)},checkPoint:function(bt,St,wt,Nt,Pt,Lt,Ht){var qt=Du(Nt,Pt),Gt=2*qt;if(ep(bt,St,this.points,Lt,Ht,Nt,Pt-Gt,[0,-1],wt)||ep(bt,St,this.points,Lt,Ht,Nt-Gt,Pt,[0,-1],wt))return!0;var Qt=Nt/2+2*wt,hn=Pt/2+2*wt,yn=[Lt-Qt,Ht-hn,Lt-Qt,Ht,Lt+Qt,Ht,Lt+Qt,Ht-hn];return!!(qs(bt,St,yn)||Js(bt,St,Gt,Gt,Lt+Nt/2-qt,Ht+Pt/2-qt,wt)||Js(bt,St,Gt,Gt,Lt-Nt/2+qt,Ht+Pt/2-qt,wt))}}},O1.registerNodeShapes=function(){var _t=this.nodeShapes={},bt=this;this.generateEllipse(),this.generatePolygon("triangle",xo(3,0)),this.generateRoundPolygon("round-triangle",xo(3,0)),this.generatePolygon("rectangle",xo(4,0)),_t.square=_t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var St=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",St),this.generateRoundPolygon("round-diamond",St)}this.generatePolygon("pentagon",xo(5,0)),this.generateRoundPolygon("round-pentagon",xo(5,0)),this.generatePolygon("hexagon",xo(6,0)),this.generateRoundPolygon("round-hexagon",xo(6,0)),this.generatePolygon("heptagon",xo(7,0)),this.generateRoundPolygon("round-heptagon",xo(7,0)),this.generatePolygon("octagon",xo(8,0)),this.generateRoundPolygon("round-octagon",xo(8,0));var wt=new Array(20);{var Nt=$l(5,0),Pt=$l(5,Math.PI/5),Lt=.5*(3-Math.sqrt(5));Lt*=1.57;for(var Ht=0;Ht<Pt.length/2;Ht++)Pt[Ht*2]*=Lt,Pt[Ht*2+1]*=Lt;for(var Ht=0;Ht<20/4;Ht++)wt[Ht*4]=Nt[Ht*2],wt[Ht*4+1]=Nt[Ht*2+1],wt[Ht*4+2]=Pt[Ht*2],wt[Ht*4+3]=Pt[Ht*2+1]}wt=bu(wt),this.generatePolygon("star",wt),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var qt=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",qt),this.generateRoundPolygon("round-tag",qt)}_t.makePolygon=function(Gt){var Qt=Gt.join("$"),hn="polygon-"+Qt,yn;return(yn=this[hn])?yn:bt.generatePolygon(hn,Gt)}};var fy={};fy.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},fy.redraw=function(_t){_t=_t||Cs();var bt=this;bt.averageRedrawTime===void 0&&(bt.averageRedrawTime=0),bt.lastRedrawTime===void 0&&(bt.lastRedrawTime=0),bt.lastDrawTime===void 0&&(bt.lastDrawTime=0),bt.requestedFrame=!0,bt.renderOptions=_t},fy.beforeRender=function(_t,bt){if(!this.destroyed){bt==null&&Os("Priority is not optional for beforeRender");var St=this.beforeRenderCallbacks;St.push({fn:_t,priority:bt}),St.sort(function(wt,Nt){return Nt.priority-wt.priority})}};var NT=function(bt,St,wt){for(var Nt=bt.beforeRenderCallbacks,Pt=0;Pt<Nt.length;Pt++)Nt[Pt].fn(St,wt)};fy.startRenderLoop=function(){var _t=this,bt=_t.cy;if(!_t.renderLoopStarted){_t.renderLoopStarted=!0;var St=function wt(Nt){if(!_t.destroyed){if(!bt.batching())if(_t.requestedFrame&&!_t.skipFrame){NT(_t,!0,Nt);var Pt=Es();_t.render(_t.renderOptions);var Lt=_t.lastDrawTime=Es();_t.averageRedrawTime===void 0&&(_t.averageRedrawTime=Lt-Pt),_t.redrawCount===void 0&&(_t.redrawCount=0),_t.redrawCount++,_t.redrawTotalTime===void 0&&(_t.redrawTotalTime=0);var Ht=Lt-Pt;_t.redrawTotalTime+=Ht,_t.lastRedrawTime=Ht,_t.averageRedrawTime=_t.averageRedrawTime/2+Ht/2,_t.requestedFrame=!1}else NT(_t,!1,Nt);_t.skipFrame=!1,Gs(wt)}};Gs(St)}};var $2=function(bt){this.init(bt)},Xv=$2,Dm=Xv.prototype;Dm.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],Dm.init=function(_t){var bt=this;bt.options=_t,bt.cy=_t.cy;var St=bt.container=_t.cy.container();if(It){var wt=It.document,Nt=wt.head,Pt="__________cytoscape_stylesheet",Lt="__________cytoscape_container",Ht=wt.getElementById(Pt)!=null;if(St.className.indexOf(Lt)<0&&(St.className=(St.className||"")+" "+Lt),!Ht){var qt=wt.createElement("style");qt.id=Pt,qt.textContent="."+Lt+" { position: relative; }",Nt.insertBefore(qt,Nt.children[0])}var Gt=It.getComputedStyle(St),Qt=Gt.getPropertyValue("position");Qt==="static"&&As("A Cytoscape container has style position:static and so can not use UI extensions properly")}bt.selection=[void 0,void 0,void 0,void 0,0],bt.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],bt.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},bt.dragData={possibleDragElements:[]},bt.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},bt.redraws=0,bt.showFps=_t.showFps,bt.debug=_t.debug,bt.hideEdgesOnViewport=_t.hideEdgesOnViewport,bt.textureOnViewport=_t.textureOnViewport,bt.wheelSensitivity=_t.wheelSensitivity,bt.motionBlurEnabled=_t.motionBlur,bt.forcedPixelRatio=sn(_t.pixelRatio)?_t.pixelRatio:null,bt.motionBlur=_t.motionBlur,bt.motionBlurOpacity=_t.motionBlurOpacity,bt.motionBlurTransparency=1-bt.motionBlurOpacity,bt.motionBlurPxRatio=1,bt.mbPxRBlurry=1,bt.minMbLowQualFrames=4,bt.fullQualityMb=!1,bt.clearedForMotionBlur=[],bt.desktopTapThreshold=_t.desktopTapThreshold,bt.desktopTapThreshold2=_t.desktopTapThreshold*_t.desktopTapThreshold,bt.touchTapThreshold=_t.touchTapThreshold,bt.touchTapThreshold2=_t.touchTapThreshold*_t.touchTapThreshold,bt.tapholdDuration=500,bt.bindings=[],bt.beforeRenderCallbacks=[],bt.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},bt.registerNodeShapes(),bt.registerArrowShapes(),bt.registerCalculationListeners()},Dm.notify=function(_t,bt){var St=this,wt=St.cy;if(!this.destroyed){if(_t==="init"){St.load();return}if(_t==="destroy"){St.destroy();return}(_t==="add"||_t==="remove"||_t==="move"&&wt.hasCompoundNodes()||_t==="load"||_t==="zorder"||_t==="mount")&&St.invalidateCachedZSortedEles(),_t==="viewport"&&St.redrawHint("select",!0),(_t==="load"||_t==="resize"||_t==="mount")&&(St.invalidateContainerClientCoordsCache(),St.matchCanvasSize(St.container)),St.redrawHint("eles",!0),St.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},Dm.destroy=function(){var _t=this;_t.destroyed=!0,_t.cy.stopAnimationLoop();for(var bt=0;bt<_t.bindings.length;bt++){var St=_t.bindings[bt],wt=St,Nt=wt.target;(Nt.off||Nt.removeEventListener).apply(Nt,wt.args)}if(_t.bindings=[],_t.beforeRenderCallbacks=[],_t.onUpdateEleCalcsFns=[],_t.removeObserver&&_t.removeObserver.disconnect(),_t.styleObserver&&_t.styleObserver.disconnect(),_t.resizeObserver&&_t.resizeObserver.disconnect(),_t.labelCalcDiv)try{document.body.removeChild(_t.labelCalcDiv)}catch{}},Dm.isHeadless=function(){return!1},[fv,s0,Yv,Im,O1,fy].forEach(function(_t){Qr(Dm,_t)});var Zv=1e3/60,bv={setupDequeueing:function(bt){return function(){var wt=this,Nt=this.renderer;if(!wt.dequeueingSetup){wt.dequeueingSetup=!0;var Pt=ut.default(function(){Nt.redrawHint("eles",!0),Nt.redrawHint("drag",!0),Nt.redraw()},bt.deqRedrawThreshold),Lt=function(Gt,Qt){var hn=Es(),yn=Nt.averageRedrawTime,xn=Nt.lastRedrawTime,bn=[],Nn=Nt.cy.extent(),Pn=Nt.getPixelRatio();for(Gt||Nt.flushRenderedStyleQueue();;){var Fn=Es(),Un=Fn-hn,Hn=Fn-Qt;if(xn<Zv){var nr=Zv-(Gt?yn:0);if(Hn>=bt.deqFastCost*nr)break}else if(Gt){if(Un>=bt.deqCost*xn||Un>=bt.deqAvgCost*yn)break}else if(Hn>=bt.deqNoDrawCost*Zv)break;var mr=bt.deq(wt,Pn,Nn);if(mr.length>0)for(var gr=0;gr<mr.length;gr++)bn.push(mr[gr]);else break}bn.length>0&&(bt.onDeqd(wt,bn),!Gt&&bt.shouldRedraw(wt,bn,Pn,Nn)&&Pt())},Ht=bt.priority||Sl;Nt.beforeRender(Lt,Ht(wt))}}}},kT=function(){function _t(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Bs;yt(this,_t),this.idsByKey=new Ru,this.keyForId=new Ru,this.cachesByLvl=new Ru,this.lvls=[],this.getKey=bt,this.doesEleInvalidateKey=St}return Tt(_t,[{key:"getIdsFor",value:function(St){St==null&&Os("Can not get id list for null key");var wt=this.idsByKey,Nt=this.idsByKey.get(St);return Nt||(Nt=new vp,wt.set(St,Nt)),Nt}},{key:"addIdForKey",value:function(St,wt){St!=null&&this.getIdsFor(St).add(wt)}},{key:"deleteIdForKey",value:function(St,wt){St!=null&&this.getIdsFor(St).delete(wt)}},{key:"getNumberOfIdsForKey",value:function(St){return St==null?0:this.getIdsFor(St).size}},{key:"updateKeyMappingFor",value:function(St){var wt=St.id(),Nt=this.keyForId.get(wt),Pt=this.getKey(St);this.deleteIdForKey(Nt,wt),this.addIdForKey(Pt,wt),this.keyForId.set(wt,Pt)}},{key:"deleteKeyMappingFor",value:function(St){var wt=St.id(),Nt=this.keyForId.get(wt);this.deleteIdForKey(Nt,wt),this.keyForId.delete(wt)}},{key:"keyHasChangedFor",value:function(St){var wt=St.id(),Nt=this.keyForId.get(wt),Pt=this.getKey(St);return Nt!==Pt}},{key:"isInvalid",value:function(St){return this.keyHasChangedFor(St)||this.doesEleInvalidateKey(St)}},{key:"getCachesAt",value:function(St){var wt=this.cachesByLvl,Nt=this.lvls,Pt=wt.get(St);return Pt||(Pt=new Ru,wt.set(St,Pt),Nt.push(St)),Pt}},{key:"getCache",value:function(St,wt){return this.getCachesAt(wt).get(St)}},{key:"get",value:function(St,wt){var Nt=this.getKey(St),Pt=this.getCache(Nt,wt);return Pt!=null&&this.updateKeyMappingFor(St),Pt}},{key:"getForCachedKey",value:function(St,wt){var Nt=this.keyForId.get(St.id()),Pt=this.getCache(Nt,wt);return Pt}},{key:"hasCache",value:function(St,wt){return this.getCachesAt(wt).has(St)}},{key:"has",value:function(St,wt){var Nt=this.getKey(St);return this.hasCache(Nt,wt)}},{key:"setCache",value:function(St,wt,Nt){Nt.key=St,this.getCachesAt(wt).set(St,Nt)}},{key:"set",value:function(St,wt,Nt){var Pt=this.getKey(St);this.setCache(Pt,wt,Nt),this.updateKeyMappingFor(St)}},{key:"deleteCache",value:function(St,wt){this.getCachesAt(wt).delete(St)}},{key:"delete",value:function(St,wt){var Nt=this.getKey(St);this.deleteCache(Nt,wt)}},{key:"invalidateKey",value:function(St){var wt=this;this.lvls.forEach(function(Nt){return wt.deleteCache(St,Nt)})}},{key:"invalidate",value:function(St){var wt=St.id(),Nt=this.keyForId.get(wt);this.deleteKeyMappingFor(St);var Pt=this.doesEleInvalidateKey(St);return Pt&&this.invalidateKey(Nt),Pt||this.getNumberOfIdsForKey(Nt)===0}}]),_t}(),l0=25,u0=50,hy=-4,Tv=3,Ev=7.99,PT=8,i1=1024,Nm=1024,w2=1024,MT=.2,O2=.8,R2=10,I2=.15,D2=.1,N2=.9,k2=.9,P2=100,M2=1,c0={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},F2=Rs({getKey:null,doesEleInvalidateKey:Bs,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Cr,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),my=function(bt,St){var wt=this;wt.renderer=bt,wt.onDequeues=[];var Nt=F2(St);Qr(wt,Nt),wt.lookup=new kT(Nt.getKey,Nt.doesEleInvalidateKey),wt.setupDequeueing()},nu=my.prototype;nu.reasons=c0,nu.getTextureQueue=function(_t){var bt=this;return bt.eleImgCaches=bt.eleImgCaches||{},bt.eleImgCaches[_t]=bt.eleImgCaches[_t]||[]},nu.getRetiredTextureQueue=function(_t){var bt=this,St=bt.eleImgCaches.retired=bt.eleImgCaches.retired||{},wt=St[_t]=St[_t]||[];return wt},nu.getElementQueue=function(){var _t=this,bt=_t.eleCacheQueue=_t.eleCacheQueue||new ct.default(function(St,wt){return wt.reqs-St.reqs});return bt},nu.getElementKeyToQueue=function(){var _t=this,bt=_t.eleKeyToCacheQueue=_t.eleKeyToCacheQueue||{};return bt},nu.getElement=function(_t,bt,St,wt,Nt){var Pt=this,Lt=this.renderer,Ht=Lt.cy.zoom(),qt=this.lookup;if(!bt||bt.w===0||bt.h===0||isNaN(bt.w)||isNaN(bt.h)||!_t.visible()||_t.removed()||!Pt.allowEdgeTxrCaching&&_t.isEdge()||!Pt.allowParentTxrCaching&&_t.isParent())return null;if(wt==null&&(wt=Math.ceil(v0(Ht*St))),wt<hy)wt=hy;else if(Ht>=Ev||wt>Tv)return null;var Gt=Math.pow(2,wt),Qt=bt.h*Gt,hn=bt.w*Gt,yn=Lt.eleTextBiggerThanMin(_t,Gt);if(!this.isVisible(_t,yn))return null;var xn=qt.get(_t,wt);if(xn&&xn.invalidated&&(xn.invalidated=!1,xn.texture.invalidatedWidth-=xn.width),xn)return xn;var bn;if(Qt<=l0?bn=l0:Qt<=u0?bn=u0:bn=Math.ceil(Qt/u0)*u0,Qt>w2||hn>Nm)return null;var Nn=Pt.getTextureQueue(bn),Pn=Nn[Nn.length-2],Fn=function(){return Pt.recycleTexture(bn,hn)||Pt.addTexture(bn,hn)};Pn||(Pn=Nn[Nn.length-1]),Pn||(Pn=Fn()),Pn.width-Pn.usedWidth<hn&&(Pn=Fn());for(var Un=function(_r){return _r&&_r.scaledLabelShown===yn},Hn=Nt&&Nt===c0.dequeue,nr=Nt&&Nt===c0.highQuality,mr=Nt&&Nt===c0.downscale,gr,rr=wt+1;rr<=Tv;rr++){var hr=qt.get(_t,rr);if(hr){gr=hr;break}}var ar=gr&&gr.level===wt+1?gr:null,vr=function(){Pn.context.drawImage(ar.texture.canvas,ar.x,0,ar.width,ar.height,Pn.usedWidth,0,hn,Qt)};if(Pn.context.setTransform(1,0,0,1,0,0),Pn.context.clearRect(Pn.usedWidth,0,hn,bn),Un(ar))vr();else if(Un(gr))if(nr){for(var Tr=gr.level;Tr>wt;Tr--)ar=Pt.getElement(_t,bt,St,Tr,c0.downscale);vr()}else return Pt.queueElement(_t,gr.level-1),gr;else{var dr;if(!Hn&&!nr&&!mr)for(var Sr=wt-1;Sr>=hy;Sr--){var yr=qt.get(_t,Sr);if(yr){dr=yr;break}}if(Un(dr))return Pt.queueElement(_t,wt),dr;Pn.context.translate(Pn.usedWidth,0),Pn.context.scale(Gt,Gt),this.drawElement(Pn.context,_t,bt,yn,!1),Pn.context.scale(1/Gt,1/Gt),Pn.context.translate(-Pn.usedWidth,0)}return xn={x:Pn.usedWidth,texture:Pn,level:wt,scale:Gt,width:hn,height:Qt,scaledLabelShown:yn},Pn.usedWidth+=Math.ceil(hn+PT),Pn.eleCaches.push(xn),qt.set(_t,wt,xn),Pt.checkTextureFullness(Pn),xn},nu.invalidateElements=function(_t){for(var bt=0;bt<_t.length;bt++)this.invalidateElement(_t[bt])},nu.invalidateElement=function(_t){var bt=this,St=bt.lookup,wt=[],Nt=St.isInvalid(_t);if(!!Nt){for(var Pt=hy;Pt<=Tv;Pt++){var Lt=St.getForCachedKey(_t,Pt);Lt&&wt.push(Lt)}var Ht=St.invalidate(_t);if(Ht)for(var qt=0;qt<wt.length;qt++){var Gt=wt[qt],Qt=Gt.texture;Qt.invalidatedWidth+=Gt.width,Gt.invalidated=!0,bt.checkTextureUtility(Qt)}bt.removeFromQueue(_t)}},nu.checkTextureUtility=function(_t){_t.invalidatedWidth>=MT*_t.width&&this.retireTexture(_t)},nu.checkTextureFullness=function(_t){var bt=this,St=bt.getTextureQueue(_t.height);_t.usedWidth/_t.width>O2&&_t.fullnessChecks>=R2?Nl(St,_t):_t.fullnessChecks++},nu.retireTexture=function(_t){var bt=this,St=_t.height,wt=bt.getTextureQueue(St),Nt=this.lookup;Nl(wt,_t),_t.retired=!0;for(var Pt=_t.eleCaches,Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt];Nt.deleteCache(Ht.key,Ht.level)}wu(Pt);var qt=bt.getRetiredTextureQueue(St);qt.push(_t)},nu.addTexture=function(_t,bt){var St=this,wt=St.getTextureQueue(_t),Nt={};return wt.push(Nt),Nt.eleCaches=[],Nt.height=_t,Nt.width=Math.max(i1,bt),Nt.usedWidth=0,Nt.invalidatedWidth=0,Nt.fullnessChecks=0,Nt.canvas=St.renderer.makeOffscreenCanvas(Nt.width,Nt.height),Nt.context=Nt.canvas.getContext("2d"),Nt},nu.recycleTexture=function(_t,bt){for(var St=this,wt=St.getTextureQueue(_t),Nt=St.getRetiredTextureQueue(_t),Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt];if(Lt.width>=bt)return Lt.retired=!1,Lt.usedWidth=0,Lt.invalidatedWidth=0,Lt.fullnessChecks=0,wu(Lt.eleCaches),Lt.context.setTransform(1,0,0,1,0,0),Lt.context.clearRect(0,0,Lt.width,Lt.height),Nl(Nt,Lt),wt.push(Lt),Lt}},nu.queueElement=function(_t,bt){var St=this,wt=St.getElementQueue(),Nt=St.getElementKeyToQueue(),Pt=this.getKey(_t),Lt=Nt[Pt];if(Lt)Lt.level=Math.max(Lt.level,bt),Lt.eles.merge(_t),Lt.reqs++,wt.updateItem(Lt);else{var Ht={eles:_t.spawn().merge(_t),level:bt,reqs:1,key:Pt};wt.push(Ht),Nt[Pt]=Ht}},nu.dequeue=function(_t){for(var bt=this,St=bt.getElementQueue(),wt=bt.getElementKeyToQueue(),Nt=[],Pt=bt.lookup,Lt=0;Lt<M2&&St.size()>0;Lt++){var Ht=St.pop(),qt=Ht.key,Gt=Ht.eles[0],Qt=Pt.hasCache(Gt,Ht.level);if(wt[qt]=null,Qt)continue;Nt.push(Ht);var hn=bt.getBoundingBox(Gt);bt.getElement(Gt,hn,_t,Ht.level,c0.dequeue)}return Nt},nu.removeFromQueue=function(_t){var bt=this,St=bt.getElementQueue(),wt=bt.getElementKeyToQueue(),Nt=this.getKey(_t),Pt=wt[Nt];Pt!=null&&(Pt.eles.length===1?(Pt.reqs=Ho,St.updateItem(Pt),St.pop(),wt[Nt]=null):Pt.eles.unmerge(_t))},nu.onDequeue=function(_t){this.onDequeues.push(_t)},nu.offDequeue=function(_t){Nl(this.onDequeues,_t)},nu.setupDequeueing=bv.setupDequeueing({deqRedrawThreshold:P2,deqCost:I2,deqAvgCost:D2,deqNoDrawCost:N2,deqFastCost:k2,deq:function(bt,St,wt){return bt.dequeue(St,wt)},onDeqd:function(bt,St){for(var wt=0;wt<bt.onDequeues.length;wt++){var Nt=bt.onDequeues[wt];Nt(St)}},shouldRedraw:function(bt,St,wt,Nt){for(var Pt=0;Pt<St.length;Pt++)for(var Lt=St[Pt].eles,Ht=0;Ht<Lt.length;Ht++){var qt=Lt[Ht].boundingBox();if(jm(qt,Nt))return!0}return!1},priority:function(bt){return bt.renderer.beforeRenderPriorities.eleTxrDeq}});var FT=1,d0=-4,Av=2,B2=3.99,z2=50,BT=50,W2=.15,j2=.1,H2=.9,U2=.9,V2=1,zT=250,hp=4e3*4e3,G2=!0,WT=function(bt){var St=this,wt=St.renderer=bt,Nt=wt.cy;St.layersByLevel={},St.firstGet=!0,St.lastInvalidationTime=Es()-2*zT,St.skipping=!1,St.eleTxrDeqs=Nt.collection(),St.scheduleElementRefinement=ut.default(function(){St.refineElementTextures(St.eleTxrDeqs),St.eleTxrDeqs.unmerge(St.eleTxrDeqs)},BT),wt.beforeRender(function(Lt,Ht){Ht-St.lastInvalidationTime<=zT?St.skipping=!0:St.skipping=!1},wt.beforeRenderPriorities.lyrTxrSkip);var Pt=function(Ht,qt){return qt.reqs-Ht.reqs};St.layersQueue=new ct.default(Pt),St.setupDequeueing()},Su=WT.prototype,Qv=0,q2=Math.pow(2,53)-1;Su.makeLayer=function(_t,bt){var St=Math.pow(2,bt),wt=Math.ceil(_t.w*St),Nt=Math.ceil(_t.h*St),Pt=this.renderer.makeOffscreenCanvas(wt,Nt),Lt={id:Qv=++Qv%q2,bb:_t,level:bt,width:wt,height:Nt,canvas:Pt,context:Pt.getContext("2d"),eles:[],elesQueue:[],reqs:0},Ht=Lt.context,qt=-Lt.bb.x1,Gt=-Lt.bb.y1;return Ht.scale(St,St),Ht.translate(qt,Gt),Lt},Su.getLayers=function(_t,bt,St){var wt=this,Nt=wt.renderer,Pt=Nt.cy,Lt=Pt.zoom(),Ht=wt.firstGet;if(wt.firstGet=!1,St==null){if(St=Math.ceil(v0(Lt*bt)),St<d0)St=d0;else if(Lt>=B2||St>Av)return null}wt.validateLayersElesOrdering(St,_t);var qt=wt.layersByLevel,Gt=Math.pow(2,St),Qt=qt[St]=qt[St]||[],hn,yn=wt.levelIsComplete(St,_t),xn,bn=function(){var vr=function(Fr){if(wt.validateLayersElesOrdering(Fr,_t),wt.levelIsComplete(Fr,_t))return xn=qt[Fr],!0},Tr=function(Fr){if(!xn)for(var _r=St+Fr;d0<=_r&&_r<=Av&&!vr(_r);_r+=Fr);};Tr(1),Tr(-1);for(var dr=Qt.length-1;dr>=0;dr--){var Sr=Qt[dr];Sr.invalid&&Nl(Qt,Sr)}};if(!yn)bn();else return Qt;var Nn=function(){if(!hn){hn=Iu();for(var vr=0;vr<_t.length;vr++)Bl(hn,_t[vr].boundingBox())}return hn},Pn=function(vr){vr=vr||{};var Tr=vr.after;Nn();var dr=hn.w*Gt*(hn.h*Gt);if(dr>hp)return null;var Sr=wt.makeLayer(hn,St);if(Tr!=null){var yr=Qt.indexOf(Tr)+1;Qt.splice(yr,0,Sr)}else(vr.insert===void 0||vr.insert)&&Qt.unshift(Sr);return Sr};if(wt.skipping&&!Ht)return null;for(var Fn=null,Un=_t.length/FT,Hn=!Ht,nr=0;nr<_t.length;nr++){var mr=_t[nr],gr=mr._private.rscratch,rr=gr.imgLayerCaches=gr.imgLayerCaches||{},hr=rr[St];if(hr){Fn=hr;continue}if((!Fn||Fn.eles.length>=Un||!ds(Fn.bb,mr.boundingBox()))&&(Fn=Pn({insert:!0,after:Fn}),!Fn))return null;xn||Hn?wt.queueLayer(Fn,mr):wt.drawEleInLayer(Fn,mr,St,bt),Fn.eles.push(mr),rr[St]=Fn}return xn||(Hn?null:Qt)},Su.getEleLevelForLayerLevel=function(_t,bt){return _t},Su.drawEleInLayer=function(_t,bt,St,wt){var Nt=this,Pt=this.renderer,Lt=_t.context,Ht=bt.boundingBox();Ht.w===0||Ht.h===0||!bt.visible()||(St=Nt.getEleLevelForLayerLevel(St,wt),Pt.setImgSmoothing(Lt,!1),Pt.drawCachedElement(Lt,bt,null,null,St,G2),Pt.setImgSmoothing(Lt,!0))},Su.levelIsComplete=function(_t,bt){var St=this,wt=St.layersByLevel[_t];if(!wt||wt.length===0)return!1;for(var Nt=0,Pt=0;Pt<wt.length;Pt++){var Lt=wt[Pt];if(Lt.reqs>0||Lt.invalid)return!1;Nt+=Lt.eles.length}return Nt===bt.length},Su.validateLayersElesOrdering=function(_t,bt){var St=this.layersByLevel[_t];if(!!St)for(var wt=0;wt<St.length;wt++){for(var Nt=St[wt],Pt=-1,Lt=0;Lt<bt.length;Lt++)if(Nt.eles[0]===bt[Lt]){Pt=Lt;break}if(Pt<0){this.invalidateLayer(Nt);continue}for(var Ht=Pt,Lt=0;Lt<Nt.eles.length;Lt++)if(Nt.eles[Lt]!==bt[Ht+Lt]){this.invalidateLayer(Nt);break}}},Su.updateElementsInLayers=function(_t,bt){for(var St=this,wt=En(_t[0]),Nt=0;Nt<_t.length;Nt++)for(var Pt=wt?null:_t[Nt],Lt=wt?_t[Nt]:_t[Nt].ele,Ht=Lt._private.rscratch,qt=Ht.imgLayerCaches=Ht.imgLayerCaches||{},Gt=d0;Gt<=Av;Gt++){var Qt=qt[Gt];!Qt||Pt&&St.getEleLevelForLayerLevel(Qt.level)!==Pt.level||bt(Qt,Lt,Pt)}},Su.haveLayers=function(){for(var _t=this,bt=!1,St=d0;St<=Av;St++){var wt=_t.layersByLevel[St];if(wt&&wt.length>0){bt=!0;break}}return bt},Su.invalidateElements=function(_t){var bt=this;_t.length!==0&&(bt.lastInvalidationTime=Es(),!(_t.length===0||!bt.haveLayers())&&bt.updateElementsInLayers(_t,function(wt,Nt,Pt){bt.invalidateLayer(wt)}))},Su.invalidateLayer=function(_t){if(this.lastInvalidationTime=Es(),!_t.invalid){var bt=_t.level,St=_t.eles,wt=this.layersByLevel[bt];Nl(wt,_t),_t.elesQueue=[],_t.invalid=!0,_t.replacement&&(_t.replacement.invalid=!0);for(var Nt=0;Nt<St.length;Nt++){var Pt=St[Nt]._private.rscratch.imgLayerCaches;Pt&&(Pt[bt]=null)}}},Su.refineElementTextures=function(_t){var bt=this;bt.updateElementsInLayers(_t,function(wt,Nt,Pt){var Lt=wt.replacement;if(Lt||(Lt=wt.replacement=bt.makeLayer(wt.bb,wt.level),Lt.replaces=wt,Lt.eles=wt.eles),!Lt.reqs)for(var Ht=0;Ht<Lt.eles.length;Ht++)bt.queueLayer(Lt,Lt.eles[Ht])})},Su.enqueueElementRefinement=function(_t){this.eleTxrDeqs.merge(_t),this.scheduleElementRefinement()},Su.queueLayer=function(_t,bt){var St=this,wt=St.layersQueue,Nt=_t.elesQueue,Pt=Nt.hasId=Nt.hasId||{};if(!_t.replacement){if(bt){if(Pt[bt.id()])return;Nt.push(bt),Pt[bt.id()]=!0}_t.reqs?(_t.reqs++,wt.updateItem(_t)):(_t.reqs=1,wt.push(_t))}},Su.dequeue=function(_t){for(var bt=this,St=bt.layersQueue,wt=[],Nt=0;Nt<V2&&St.size()!==0;){var Pt=St.peek();if(Pt.replacement){St.pop();continue}if(Pt.replaces&&Pt!==Pt.replaces.replacement){St.pop();continue}if(Pt.invalid){St.pop();continue}var Lt=Pt.elesQueue.shift();Lt&&(bt.drawEleInLayer(Pt,Lt,Pt.level,_t),Nt++),wt.length===0&&wt.push(!0),Pt.elesQueue.length===0&&(St.pop(),Pt.reqs=0,Pt.replaces&&bt.applyLayerReplacement(Pt),bt.requestRedraw())}return wt},Su.applyLayerReplacement=function(_t){var bt=this,St=bt.layersByLevel[_t.level],wt=_t.replaces,Nt=St.indexOf(wt);if(!(Nt<0||wt.invalid)){St[Nt]=_t;for(var Pt=0;Pt<_t.eles.length;Pt++){var Lt=_t.eles[Pt]._private,Ht=Lt.imgLayerCaches=Lt.imgLayerCaches||{};Ht&&(Ht[_t.level]=_t)}bt.requestRedraw()}},Su.requestRedraw=ut.default(function(){var _t=this.renderer;_t.redrawHint("eles",!0),_t.redrawHint("drag",!0),_t.redraw()},100),Su.setupDequeueing=bv.setupDequeueing({deqRedrawThreshold:z2,deqCost:W2,deqAvgCost:j2,deqNoDrawCost:H2,deqFastCost:U2,deq:function(bt,St){return bt.dequeue(St)},onDeqd:Sl,shouldRedraw:Cr,priority:function(bt){return bt.renderer.beforeRenderPriorities.lyrTxrDeq}});var jT={},HT;function K2(_t,bt){for(var St=0;St<bt.length;St++){var wt=bt[St];_t.lineTo(wt.x,wt.y)}}function Jv(_t,bt,St){for(var wt,Nt=0;Nt<bt.length;Nt++){var Pt=bt[Nt];Nt===0&&(wt=Pt),_t.lineTo(Pt.x,Pt.y)}_t.quadraticCurveTo(St.x,St.y,wt.x,wt.y)}function UT(_t,bt,St){_t.beginPath&&_t.beginPath();for(var wt=bt,Nt=0;Nt<wt.length;Nt++){var Pt=wt[Nt];_t.lineTo(Pt.x,Pt.y)}var Lt=St,Ht=St[0];_t.moveTo(Ht.x,Ht.y);for(var Nt=1;Nt<Lt.length;Nt++){var Pt=Lt[Nt];_t.lineTo(Pt.x,Pt.y)}_t.closePath&&_t.closePath()}function Q2(_t,bt,St,wt,Nt){_t.beginPath&&_t.beginPath(),_t.arc(St,wt,Nt,0,Math.PI*2,!1);var Pt=bt,Lt=Pt[0];_t.moveTo(Lt.x,Lt.y);for(var Ht=0;Ht<Pt.length;Ht++){var qt=Pt[Ht];_t.lineTo(qt.x,qt.y)}_t.closePath&&_t.closePath()}function J2(_t,bt,St,wt){_t.arc(bt,St,wt,0,Math.PI*2,!1)}jT.arrowShapeImpl=function(_t){return(HT||(HT={polygon:K2,"triangle-backcurve":Jv,"triangle-tee":UT,"circle-triangle":Q2,"triangle-cross":UT,circle:J2}))[_t]};var a1={};a1.drawElement=function(_t,bt,St,wt,Nt,Pt){var Lt=this;bt.isNode()?Lt.drawNode(_t,bt,St,wt,Nt,Pt):Lt.drawEdge(_t,bt,St,wt,Nt,Pt)},a1.drawElementOverlay=function(_t,bt){var St=this;bt.isNode()?St.drawNodeOverlay(_t,bt):St.drawEdgeOverlay(_t,bt)},a1.drawElementUnderlay=function(_t,bt){var St=this;bt.isNode()?St.drawNodeUnderlay(_t,bt):St.drawEdgeUnderlay(_t,bt)},a1.drawCachedElementPortion=function(_t,bt,St,wt,Nt,Pt,Lt,Ht){var qt=this,Gt=St.getBoundingBox(bt);if(!(Gt.w===0||Gt.h===0)){var Qt=St.getElement(bt,Gt,wt,Nt,Pt);if(Qt!=null){var hn=Ht(qt,bt);if(hn===0)return;var yn=Lt(qt,bt),xn=Gt.x1,bn=Gt.y1,Nn=Gt.w,Pn=Gt.h,Fn,Un,Hn,nr,mr;if(yn!==0){var gr=St.getRotationPoint(bt);Hn=gr.x,nr=gr.y,_t.translate(Hn,nr),_t.rotate(yn),mr=qt.getImgSmoothing(_t),mr||qt.setImgSmoothing(_t,!0);var rr=St.getRotationOffset(bt);Fn=rr.x,Un=rr.y}else Fn=xn,Un=bn;var hr;hn!==1&&(hr=_t.globalAlpha,_t.globalAlpha=hr*hn),_t.drawImage(Qt.texture.canvas,Qt.x,0,Qt.width,Qt.height,Fn,Un,Nn,Pn),hn!==1&&(_t.globalAlpha=hr),yn!==0&&(_t.rotate(-yn),_t.translate(-Hn,-nr),mr||qt.setImgSmoothing(_t,!1))}else St.drawElement(_t,bt)}};var eE=function(){return 0},tE=function(bt,St){return bt.getTextAngle(St,null)},nE=function(bt,St){return bt.getTextAngle(St,"source")},rE=function(bt,St){return bt.getTextAngle(St,"target")},iE=function(bt,St){return St.effectiveOpacity()},_b=function(bt,St){return St.pstyle("text-opacity").pfValue*St.effectiveOpacity()};a1.drawCachedElement=function(_t,bt,St,wt,Nt,Pt){var Lt=this,Ht=Lt.data,qt=Ht.eleTxrCache,Gt=Ht.lblTxrCache,Qt=Ht.slbTxrCache,hn=Ht.tlbTxrCache,yn=bt.boundingBox(),xn=Pt===!0?qt.reasons.highQuality:null;if(!(yn.w===0||yn.h===0||!bt.visible())&&(!wt||jm(yn,wt))){var bn=bt.isEdge(),Nn=bt.element()._private.rscratch.badLine;Lt.drawElementUnderlay(_t,bt),Lt.drawCachedElementPortion(_t,bt,qt,St,Nt,xn,eE,iE),(!bn||!Nn)&&Lt.drawCachedElementPortion(_t,bt,Gt,St,Nt,xn,tE,_b),bn&&!Nn&&(Lt.drawCachedElementPortion(_t,bt,Qt,St,Nt,xn,nE,_b),Lt.drawCachedElementPortion(_t,bt,hn,St,Nt,xn,rE,_b)),Lt.drawElementOverlay(_t,bt)}},a1.drawElements=function(_t,bt){for(var St=this,wt=0;wt<bt.length;wt++){var Nt=bt[wt];St.drawElement(_t,Nt)}},a1.drawCachedElements=function(_t,bt,St,wt){for(var Nt=this,Pt=0;Pt<bt.length;Pt++){var Lt=bt[Pt];Nt.drawCachedElement(_t,Lt,St,wt)}},a1.drawCachedNodes=function(_t,bt,St,wt){for(var Nt=this,Pt=0;Pt<bt.length;Pt++){var Lt=bt[Pt];!Lt.isNode()||Nt.drawCachedElement(_t,Lt,St,wt)}},a1.drawLayeredElements=function(_t,bt,St,wt){var Nt=this,Pt=Nt.data.lyrTxrCache.getLayers(bt,St);if(Pt)for(var Lt=0;Lt<Pt.length;Lt++){var Ht=Pt[Lt],qt=Ht.bb;qt.w===0||qt.h===0||_t.drawImage(Ht.canvas,qt.x1,qt.y1,qt.w,qt.h)}else Nt.drawCachedElements(_t,bt,St,wt)};var R1={};R1.drawEdge=function(_t,bt,St){var wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,Nt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,Pt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,Lt=this,Ht=bt._private.rscratch;if(!(Pt&&!bt.visible())&&!(Ht.badLine||Ht.allpts==null||isNaN(Ht.allpts[0]))){var qt;St&&(qt=St,_t.translate(-qt.x1,-qt.y1));var Gt=Pt?bt.pstyle("opacity").value:1,Qt=Pt?bt.pstyle("line-opacity").value:1,hn=bt.pstyle("curve-style").value,yn=bt.pstyle("line-style").value,xn=bt.pstyle("width").pfValue,bn=bt.pstyle("line-cap").value,Nn=Gt*Qt,Pn=Gt*Qt,Fn=function(){var dr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nn;hn==="straight-triangle"?(Lt.eleStrokeStyle(_t,bt,dr),Lt.drawEdgeTrianglePath(bt,_t,Ht.allpts)):(_t.lineWidth=xn,_t.lineCap=bn,Lt.eleStrokeStyle(_t,bt,dr),Lt.drawEdgePath(bt,_t,Ht.allpts,yn),_t.lineCap="butt")},Un=function(){!Nt||Lt.drawEdgeOverlay(_t,bt)},Hn=function(){!Nt||Lt.drawEdgeUnderlay(_t,bt)},nr=function(){var dr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pn;Lt.drawArrowheads(_t,bt,dr)},mr=function(){Lt.drawElementText(_t,bt,null,wt)};_t.lineJoin="round";var gr=bt.pstyle("ghost").value==="yes";if(gr){var rr=bt.pstyle("ghost-offset-x").pfValue,hr=bt.pstyle("ghost-offset-y").pfValue,ar=bt.pstyle("ghost-opacity").value,vr=Nn*ar;_t.translate(rr,hr),Fn(vr),nr(vr),_t.translate(-rr,-hr)}Hn(),Fn(),nr(),Un(),mr(),St&&_t.translate(qt.x1,qt.y1)}};var VT=function(bt){if(!["overlay","underlay"].includes(bt))throw new Error("Invalid state");return function(St,wt){if(!!wt.visible()){var Nt=wt.pstyle("".concat(bt,"-opacity")).value;if(Nt!==0){var Pt=this,Lt=Pt.usePaths(),Ht=wt._private.rscratch,qt=wt.pstyle("".concat(bt,"-padding")).pfValue,Gt=2*qt,Qt=wt.pstyle("".concat(bt,"-color")).value;St.lineWidth=Gt,Ht.edgeType==="self"&&!Lt?St.lineCap="butt":St.lineCap="round",Pt.colorStrokeStyle(St,Qt[0],Qt[1],Qt[2],Nt),Pt.drawEdgePath(wt,St,Ht.allpts,"solid")}}}};R1.drawEdgeOverlay=VT("overlay"),R1.drawEdgeUnderlay=VT("underlay"),R1.drawEdgePath=function(_t,bt,St,wt){var Nt=_t._private.rscratch,Pt=bt,Lt,Ht=!1,qt=this.usePaths(),Gt=_t.pstyle("line-dash-pattern").pfValue,Qt=_t.pstyle("line-dash-offset").pfValue;if(qt){var hn=St.join("$"),yn=Nt.pathCacheKey&&Nt.pathCacheKey===hn;yn?(Lt=bt=Nt.pathCache,Ht=!0):(Lt=bt=new Path2D,Nt.pathCacheKey=hn,Nt.pathCache=Lt)}if(Pt.setLineDash)switch(wt){case"dotted":Pt.setLineDash([1,1]);break;case"dashed":Pt.setLineDash(Gt),Pt.lineDashOffset=Qt;break;case"solid":Pt.setLineDash([]);break}if(!Ht&&!Nt.badLine)switch(bt.beginPath&&bt.beginPath(),bt.moveTo(St[0],St[1]),Nt.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var xn=2;xn+3<St.length;xn+=4)bt.quadraticCurveTo(St[xn],St[xn+1],St[xn+2],St[xn+3]);break;case"straight":case"segments":case"haystack":for(var bn=2;bn+1<St.length;bn+=2)bt.lineTo(St[bn],St[bn+1]);break}bt=Pt,qt?bt.stroke(Lt):bt.stroke(),bt.setLineDash&&bt.setLineDash([])},R1.drawEdgeTrianglePath=function(_t,bt,St){bt.fillStyle=bt.strokeStyle;for(var wt=_t.pstyle("width").pfValue,Nt=0;Nt+1<St.length;Nt+=2){var Pt=[St[Nt+2]-St[Nt],St[Nt+3]-St[Nt+1]],Lt=Math.sqrt(Pt[0]*Pt[0]+Pt[1]*Pt[1]),Ht=[Pt[1]/Lt,-Pt[0]/Lt],qt=[Ht[0]*wt/2,Ht[1]*wt/2];bt.beginPath(),bt.moveTo(St[Nt]-qt[0],St[Nt+1]-qt[1]),bt.lineTo(St[Nt]+qt[0],St[Nt+1]+qt[1]),bt.lineTo(St[Nt+2],St[Nt+3]),bt.closePath(),bt.fill()}},R1.drawArrowheads=function(_t,bt,St){var wt=bt._private.rscratch,Nt=wt.edgeType==="haystack";Nt||this.drawArrowhead(_t,bt,"source",wt.arrowStartX,wt.arrowStartY,wt.srcArrowAngle,St),this.drawArrowhead(_t,bt,"mid-target",wt.midX,wt.midY,wt.midtgtArrowAngle,St),this.drawArrowhead(_t,bt,"mid-source",wt.midX,wt.midY,wt.midsrcArrowAngle,St),Nt||this.drawArrowhead(_t,bt,"target",wt.arrowEndX,wt.arrowEndY,wt.tgtArrowAngle,St)},R1.drawArrowhead=function(_t,bt,St,wt,Nt,Pt,Lt){if(!(isNaN(wt)||wt==null||isNaN(Nt)||Nt==null||isNaN(Pt)||Pt==null)){var Ht=this,qt=bt.pstyle(St+"-arrow-shape").value;if(qt!=="none"){var Gt=bt.pstyle(St+"-arrow-fill").value==="hollow"?"both":"filled",Qt=bt.pstyle(St+"-arrow-fill").value,hn=bt.pstyle("width").pfValue,yn=bt.pstyle("opacity").value;Lt===void 0&&(Lt=yn);var xn=_t.globalCompositeOperation;(Lt!==1||Qt==="hollow")&&(_t.globalCompositeOperation="destination-out",Ht.colorFillStyle(_t,255,255,255,1),Ht.colorStrokeStyle(_t,255,255,255,1),Ht.drawArrowShape(bt,_t,Gt,hn,qt,wt,Nt,Pt),_t.globalCompositeOperation=xn);var bn=bt.pstyle(St+"-arrow-color").value;Ht.colorFillStyle(_t,bn[0],bn[1],bn[2],Lt),Ht.colorStrokeStyle(_t,bn[0],bn[1],bn[2],Lt),Ht.drawArrowShape(bt,_t,Qt,hn,qt,wt,Nt,Pt)}}},R1.drawArrowShape=function(_t,bt,St,wt,Nt,Pt,Lt,Ht){var qt=this,Gt=this.usePaths()&&Nt!=="triangle-cross",Qt=!1,hn,yn=bt,xn={x:Pt,y:Lt},bn=_t.pstyle("arrow-scale").value,Nn=this.getArrowWidth(wt,bn),Pn=qt.arrowShapes[Nt];if(Gt){var Fn=qt.arrowPathCache=qt.arrowPathCache||[],Un=io(Nt),Hn=Fn[Un];Hn!=null?(hn=bt=Hn,Qt=!0):(hn=bt=new Path2D,Fn[Un]=hn)}Qt||(bt.beginPath&&bt.beginPath(),Gt?Pn.draw(bt,1,0,{x:0,y:0},1):Pn.draw(bt,Nn,Ht,xn,wt),bt.closePath&&bt.closePath()),bt=yn,Gt&&(bt.translate(Pt,Lt),bt.rotate(Ht),bt.scale(Nn,Nn)),(St==="filled"||St==="both")&&(Gt?bt.fill(hn):bt.fill()),(St==="hollow"||St==="both")&&(bt.lineWidth=(Pn.matchEdgeWidth?wt:1)/(Gt?Nn:1),bt.lineJoin="miter",Gt?bt.stroke(hn):bt.stroke()),Gt&&(bt.scale(1/Nn,1/Nn),bt.rotate(-Ht),bt.translate(-Pt,-Lt))};var eT={};eT.safeDrawImage=function(_t,bt,St,wt,Nt,Pt,Lt,Ht,qt,Gt){if(!(Nt<=0||Pt<=0||qt<=0||Gt<=0))try{_t.drawImage(bt,St,wt,Nt,Pt,Lt,Ht,qt,Gt)}catch(Qt){As(Qt)}},eT.drawInscribedImage=function(_t,bt,St,wt,Nt){var Pt=this,Lt=St.position(),Ht=Lt.x,qt=Lt.y,Gt=St.cy().style(),Qt=Gt.getIndexedStyle.bind(Gt),hn=Qt(St,"background-fit","value",wt),yn=Qt(St,"background-repeat","value",wt),xn=St.width(),bn=St.height(),Nn=St.padding()*2,Pn=xn+(Qt(St,"background-width-relative-to","value",wt)==="inner"?0:Nn),Fn=bn+(Qt(St,"background-height-relative-to","value",wt)==="inner"?0:Nn),Un=St._private.rscratch,Hn=Qt(St,"background-clip","value",wt),nr=Hn==="node",mr=Qt(St,"background-image-opacity","value",wt)*Nt,gr=Qt(St,"background-image-smoothing","value",wt),rr=bt.width||bt.cachedW,hr=bt.height||bt.cachedH;(rr==null||hr==null)&&(document.body.appendChild(bt),rr=bt.cachedW=bt.width||bt.offsetWidth,hr=bt.cachedH=bt.height||bt.offsetHeight,document.body.removeChild(bt));var ar=rr,vr=hr;if(Qt(St,"background-width","value",wt)!=="auto"&&(Qt(St,"background-width","units",wt)==="%"?ar=Qt(St,"background-width","pfValue",wt)*Pn:ar=Qt(St,"background-width","pfValue",wt)),Qt(St,"background-height","value",wt)!=="auto"&&(Qt(St,"background-height","units",wt)==="%"?vr=Qt(St,"background-height","pfValue",wt)*Fn:vr=Qt(St,"background-height","pfValue",wt)),!(ar===0||vr===0)){if(hn==="contain"){var Tr=Math.min(Pn/ar,Fn/vr);ar*=Tr,vr*=Tr}else if(hn==="cover"){var Tr=Math.max(Pn/ar,Fn/vr);ar*=Tr,vr*=Tr}var dr=Ht-Pn/2,Sr=Qt(St,"background-position-x","units",wt),yr=Qt(St,"background-position-x","pfValue",wt);Sr==="%"?dr+=(Pn-ar)*yr:dr+=yr;var Fr=Qt(St,"background-offset-x","units",wt),_r=Qt(St,"background-offset-x","pfValue",wt);Fr==="%"?dr+=(Pn-ar)*_r:dr+=_r;var Rr=qt-Fn/2,zr=Qt(St,"background-position-y","units",wt),Vr=Qt(St,"background-position-y","pfValue",wt);zr==="%"?Rr+=(Fn-vr)*Vr:Rr+=Vr;var ga=Qt(St,"background-offset-y","units",wt),jr=Qt(St,"background-offset-y","pfValue",wt);ga==="%"?Rr+=(Fn-vr)*jr:Rr+=jr,Un.pathCache&&(dr-=Ht,Rr-=qt,Ht=0,qt=0);var _i=_t.globalAlpha;_t.globalAlpha=mr;var co=Pt.getImgSmoothing(_t),mo=!1;if(gr==="no"&&co?(Pt.setImgSmoothing(_t,!1),mo=!0):gr==="yes"&&!co&&(Pt.setImgSmoothing(_t,!0),mo=!0),yn==="no-repeat")nr&&(_t.save(),Un.pathCache?_t.clip(Un.pathCache):(Pt.nodeShapes[Pt.getNodeShape(St)].draw(_t,Ht,qt,Pn,Fn),_t.clip())),Pt.safeDrawImage(_t,bt,0,0,rr,hr,dr,Rr,ar,vr),nr&&_t.restore();else{var uo=_t.createPattern(bt,yn);_t.fillStyle=uo,Pt.nodeShapes[Pt.getNodeShape(St)].draw(_t,Ht,qt,Pn,Fn),_t.translate(dr,Rr),_t.fill(),_t.translate(-dr,-Rr)}_t.globalAlpha=_i,mo&&Pt.setImgSmoothing(_t,co)}};var km={};km.eleTextBiggerThanMin=function(_t,bt){if(!bt){var St=_t.cy().zoom(),wt=this.getPixelRatio(),Nt=Math.ceil(v0(St*wt));bt=Math.pow(2,Nt)}var Pt=_t.pstyle("font-size").pfValue*bt,Lt=_t.pstyle("min-zoomed-font-size").pfValue;return!(Pt<Lt)},km.drawElementText=function(_t,bt,St,wt,Nt){var Pt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,Lt=this;if(wt==null){if(Pt&&!Lt.eleTextBiggerThanMin(bt))return}else if(wt===!1)return;if(bt.isNode()){var Ht=bt.pstyle("label");if(!Ht||!Ht.value)return;var qt=Lt.getLabelJustification(bt);_t.textAlign=qt,_t.textBaseline="bottom"}else{var Gt=bt.element()._private.rscratch.badLine,Qt=bt.pstyle("label"),hn=bt.pstyle("source-label"),yn=bt.pstyle("target-label");if(Gt||(!Qt||!Qt.value)&&(!hn||!hn.value)&&(!yn||!yn.value))return;_t.textAlign="center",_t.textBaseline="bottom"}var xn=!St,bn;St&&(bn=St,_t.translate(-bn.x1,-bn.y1)),Nt==null?(Lt.drawText(_t,bt,null,xn,Pt),bt.isEdge()&&(Lt.drawText(_t,bt,"source",xn,Pt),Lt.drawText(_t,bt,"target",xn,Pt))):Lt.drawText(_t,bt,Nt,xn,Pt),St&&_t.translate(bn.x1,bn.y1)},km.getFontCache=function(_t){var bt;this.fontCaches=this.fontCaches||[];for(var St=0;St<this.fontCaches.length;St++)if(bt=this.fontCaches[St],bt.context===_t)return bt;return bt={context:_t},this.fontCaches.push(bt),bt},km.setupTextStyle=function(_t,bt){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,wt=bt.pstyle("font-style").strValue,Nt=bt.pstyle("font-size").pfValue+"px",Pt=bt.pstyle("font-family").strValue,Lt=bt.pstyle("font-weight").strValue,Ht=St?bt.effectiveOpacity()*bt.pstyle("text-opacity").value:1,qt=bt.pstyle("text-outline-opacity").value*Ht,Gt=bt.pstyle("color").value,Qt=bt.pstyle("text-outline-color").value;_t.font=wt+" "+Lt+" "+Nt+" "+Pt,_t.lineJoin="round",this.colorFillStyle(_t,Gt[0],Gt[1],Gt[2],Ht),this.colorStrokeStyle(_t,Qt[0],Qt[1],Qt[2],qt)};function aE(_t,bt,St,wt,Nt){var Pt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5;_t.beginPath(),_t.moveTo(bt+Pt,St),_t.lineTo(bt+wt-Pt,St),_t.quadraticCurveTo(bt+wt,St,bt+wt,St+Pt),_t.lineTo(bt+wt,St+Nt-Pt),_t.quadraticCurveTo(bt+wt,St+Nt,bt+wt-Pt,St+Nt),_t.lineTo(bt+Pt,St+Nt),_t.quadraticCurveTo(bt,St+Nt,bt,St+Nt-Pt),_t.lineTo(bt,St+Pt),_t.quadraticCurveTo(bt,St,bt+Pt,St),_t.closePath(),_t.fill()}km.getTextAngle=function(_t,bt){var St,wt=_t._private,Nt=wt.rscratch,Pt=bt?bt+"-":"",Lt=_t.pstyle(Pt+"text-rotation"),Ht=yu(Nt,"labelAngle",bt);return Lt.strValue==="autorotate"?St=_t.isEdge()?Ht:0:Lt.strValue==="none"?St=0:St=Lt.pfValue,St},km.drawText=function(_t,bt,St){var wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,Nt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,Pt=bt._private,Lt=Pt.rscratch,Ht=Nt?bt.effectiveOpacity():1;if(!(Nt&&(Ht===0||bt.pstyle("text-opacity").value===0))){St==="main"&&(St=null);var qt=yu(Lt,"labelX",St),Gt=yu(Lt,"labelY",St),Qt,hn,yn=this.getLabelText(bt,St);if(yn!=null&&yn!==""&&!isNaN(qt)&&!isNaN(Gt)){this.setupTextStyle(_t,bt,Nt);var xn=St?St+"-":"",bn=yu(Lt,"labelWidth",St),Nn=yu(Lt,"labelHeight",St),Pn=bt.pstyle(xn+"text-margin-x").pfValue,Fn=bt.pstyle(xn+"text-margin-y").pfValue,Un=bt.isEdge(),Hn=bt.pstyle("text-halign").value,nr=bt.pstyle("text-valign").value;Un&&(Hn="center",nr="center"),qt+=Pn,Gt+=Fn;var mr;switch(wt?mr=this.getTextAngle(bt,St):mr=0,mr!==0&&(Qt=qt,hn=Gt,_t.translate(Qt,hn),_t.rotate(mr),qt=0,Gt=0),nr){case"top":break;case"center":Gt+=Nn/2;break;case"bottom":Gt+=Nn;break}var gr=bt.pstyle("text-background-opacity").value,rr=bt.pstyle("text-border-opacity").value,hr=bt.pstyle("text-border-width").pfValue,ar=bt.pstyle("text-background-padding").pfValue;if(gr>0||hr>0&&rr>0){var vr=qt-ar;switch(Hn){case"left":vr-=bn;break;case"center":vr-=bn/2;break}var Tr=Gt-Nn-ar,dr=bn+2*ar,Sr=Nn+2*ar;if(gr>0){var yr=_t.fillStyle,Fr=bt.pstyle("text-background-color").value;_t.fillStyle="rgba("+Fr[0]+","+Fr[1]+","+Fr[2]+","+gr*Ht+")";var _r=bt.pstyle("text-background-shape").strValue;_r.indexOf("round")===0?aE(_t,vr,Tr,dr,Sr,2):_t.fillRect(vr,Tr,dr,Sr),_t.fillStyle=yr}if(hr>0&&rr>0){var Rr=_t.strokeStyle,zr=_t.lineWidth,Vr=bt.pstyle("text-border-color").value,ga=bt.pstyle("text-border-style").value;if(_t.strokeStyle="rgba("+Vr[0]+","+Vr[1]+","+Vr[2]+","+rr*Ht+")",_t.lineWidth=hr,_t.setLineDash)switch(ga){case"dotted":_t.setLineDash([1,1]);break;case"dashed":_t.setLineDash([4,2]);break;case"double":_t.lineWidth=hr/4,_t.setLineDash([]);break;case"solid":_t.setLineDash([]);break}if(_t.strokeRect(vr,Tr,dr,Sr),ga==="double"){var jr=hr/2;_t.strokeRect(vr+jr,Tr+jr,dr-jr*2,Sr-jr*2)}_t.setLineDash&&_t.setLineDash([]),_t.lineWidth=zr,_t.strokeStyle=Rr}}var _i=2*bt.pstyle("text-outline-width").pfValue;if(_i>0&&(_t.lineWidth=_i),bt.pstyle("text-wrap").value==="wrap"){var co=yu(Lt,"labelWrapCachedLines",St),mo=yu(Lt,"labelLineHeight",St),uo=bn/2,so=this.getLabelJustification(bt);switch(so==="auto"||(Hn==="left"?so==="left"?qt+=-bn:so==="center"&&(qt+=-uo):Hn==="center"?so==="left"?qt+=-uo:so==="right"&&(qt+=uo):Hn==="right"&&(so==="center"?qt+=uo:so==="right"&&(qt+=bn))),nr){case"top":Gt-=(co.length-1)*mo;break;case"center":case"bottom":Gt-=(co.length-1)*mo;break}for(var Br=0;Br<co.length;Br++)_i>0&&_t.strokeText(co[Br],qt,Gt),_t.fillText(co[Br],qt,Gt),Gt+=mo}else _i>0&&_t.strokeText(yn,qt,Gt),_t.fillText(yn,qt,Gt);mr!==0&&(_t.rotate(-mr),_t.translate(-Qt,-hn))}}};var f0={};f0.drawNode=function(_t,bt,St){var wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,Nt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,Pt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,Lt=this,Ht,qt,Gt=bt._private,Qt=Gt.rscratch,hn=bt.position();if(!(!sn(hn.x)||!sn(hn.y))&&!(Pt&&!bt.visible())){var yn=Pt?bt.effectiveOpacity():1,xn=Lt.usePaths(),bn,Nn=!1,Pn=bt.padding();Ht=bt.width()+2*Pn,qt=bt.height()+2*Pn;var Fn;St&&(Fn=St,_t.translate(-Fn.x1,-Fn.y1));for(var Un=bt.pstyle("background-image"),Hn=Un.value,nr=new Array(Hn.length),mr=new Array(Hn.length),gr=0,rr=0;rr<Hn.length;rr++){var hr=Hn[rr],ar=nr[rr]=hr!=null&&hr!=="none";if(ar){var vr=bt.cy().style().getIndexedStyle(bt,"background-image-crossorigin","value",rr);gr++,mr[rr]=Lt.getCachedImage(hr,vr,function(){Gt.backgroundTimestamp=Date.now(),bt.emitAndNotify("background")})}}var Tr=bt.pstyle("background-blacken").value,dr=bt.pstyle("border-width").pfValue,Sr=bt.pstyle("background-opacity").value*yn,yr=bt.pstyle("border-color").value,Fr=bt.pstyle("border-style").value,_r=bt.pstyle("border-opacity").value*yn;_t.lineJoin="miter";var Rr=function(){var Uo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Sr;Lt.eleFillStyle(_t,bt,Uo)},zr=function(){var Uo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_r;Lt.colorStrokeStyle(_t,yr[0],yr[1],yr[2],Uo)},Vr=bt.pstyle("shape").strValue,ga=bt.pstyle("shape-polygon-points").pfValue;if(xn){_t.translate(hn.x,hn.y);var jr=Lt.nodePathCache=Lt.nodePathCache||[],_i=Hr(Vr==="polygon"?Vr+","+ga.join(","):Vr,""+qt,""+Ht),co=jr[_i];co!=null?(bn=co,Nn=!0,Qt.pathCache=bn):(bn=new Path2D,jr[_i]=Qt.pathCache=bn)}var mo=function(){if(!Nn){var Uo=hn;xn&&(Uo={x:0,y:0}),Lt.nodeShapes[Lt.getNodeShape(bt)].draw(bn||_t,Uo.x,Uo.y,Ht,qt)}xn?_t.fill(bn):_t.fill()},uo=function(){for(var Uo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yn,Ko=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,gs=Gt.backgrounding,zs=0,ys=0;ys<mr.length;ys++){var Oo=bt.cy().style().getIndexedStyle(bt,"background-image-containment","value",ys);if(Ko&&Oo==="over"||!Ko&&Oo==="inside"){zs++;continue}nr[ys]&&mr[ys].complete&&!mr[ys].error&&(zs++,Lt.drawInscribedImage(_t,mr[ys],bt,ys,Uo))}Gt.backgrounding=zs!==gr,gs!==Gt.backgrounding&&bt.updateStyle(!1)},so=function(){var Uo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Ko=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yn;Lt.hasPie(bt)&&(Lt.drawPie(_t,bt,Ko),Uo&&(xn||Lt.nodeShapes[Lt.getNodeShape(bt)].draw(_t,hn.x,hn.y,Ht,qt)))},Br=function(){var Uo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yn,Ko=(Tr>0?Tr:-Tr)*Uo,gs=Tr>0?0:255;Tr!==0&&(Lt.colorFillStyle(_t,gs,gs,gs,Ko),xn?_t.fill(bn):_t.fill())},fo=function(){if(dr>0){if(_t.lineWidth=dr,_t.lineCap="butt",_t.setLineDash)switch(Fr){case"dotted":_t.setLineDash([1,1]);break;case"dashed":_t.setLineDash([4,2]);break;case"solid":case"double":_t.setLineDash([]);break}if(xn?_t.stroke(bn):_t.stroke(),Fr==="double"){_t.lineWidth=dr/3;var Uo=_t.globalCompositeOperation;_t.globalCompositeOperation="destination-out",xn?_t.stroke(bn):_t.stroke(),_t.globalCompositeOperation=Uo}_t.setLineDash&&_t.setLineDash([])}},vo=function(){Nt&&Lt.drawNodeOverlay(_t,bt,hn,Ht,qt)},Io=function(){Nt&&Lt.drawNodeUnderlay(_t,bt,hn,Ht,qt)},Fo=function(){Lt.drawElementText(_t,bt,null,wt)},Is=bt.pstyle("ghost").value==="yes";if(Is){var Ss=bt.pstyle("ghost-offset-x").pfValue,Wo=bt.pstyle("ghost-offset-y").pfValue,Po=bt.pstyle("ghost-opacity").value,ps=Po*yn;_t.translate(Ss,Wo),Rr(Po*Sr),mo(),uo(ps,!0),zr(Po*_r),fo(),so(Tr!==0||dr!==0),uo(ps,!1),Br(ps),_t.translate(-Ss,-Wo)}xn&&_t.translate(-hn.x,-hn.y),Io(),xn&&_t.translate(hn.x,hn.y),Rr(),mo(),uo(yn,!0),zr(),fo(),so(Tr!==0||dr!==0),uo(yn,!1),Br(),xn&&_t.translate(-hn.x,-hn.y),Fo(),vo(),St&&_t.translate(Fn.x1,Fn.y1)}};var qT=function(bt){if(!["overlay","underlay"].includes(bt))throw new Error("Invalid state");return function(St,wt,Nt,Pt,Lt){var Ht=this;if(!!wt.visible()){var qt=wt.pstyle("".concat(bt,"-padding")).pfValue,Gt=wt.pstyle("".concat(bt,"-opacity")).value,Qt=wt.pstyle("".concat(bt,"-color")).value,hn=wt.pstyle("".concat(bt,"-shape")).value;if(Gt>0){if(Nt=Nt||wt.position(),Pt==null||Lt==null){var yn=wt.padding();Pt=wt.width()+2*yn,Lt=wt.height()+2*yn}Ht.colorFillStyle(St,Qt[0],Qt[1],Qt[2],Gt),Ht.nodeShapes[hn].draw(St,Nt.x,Nt.y,Pt+qt*2,Lt+qt*2),St.fill()}}}};f0.drawNodeOverlay=qT("overlay"),f0.drawNodeUnderlay=qT("underlay"),f0.hasPie=function(_t){return _t=_t[0],_t._private.hasPie},f0.drawPie=function(_t,bt,St,wt){bt=bt[0],wt=wt||bt.position();var Nt=bt.cy().style(),Pt=bt.pstyle("pie-size"),Lt=wt.x,Ht=wt.y,qt=bt.width(),Gt=bt.height(),Qt=Math.min(qt,Gt)/2,hn=0,yn=this.usePaths();yn&&(Lt=0,Ht=0),Pt.units==="%"?Qt=Qt*Pt.pfValue:Pt.pfValue!==void 0&&(Qt=Pt.pfValue/2);for(var xn=1;xn<=Nt.pieBackgroundN;xn++){var bn=bt.pstyle("pie-"+xn+"-background-size").value,Nn=bt.pstyle("pie-"+xn+"-background-color").value,Pn=bt.pstyle("pie-"+xn+"-background-opacity").value*St,Fn=bn/100;Fn+hn>1&&(Fn=1-hn);var Un=1.5*Math.PI+2*Math.PI*hn,Hn=2*Math.PI*Fn,nr=Un+Hn;bn===0||hn>=1||hn+Fn>1||(_t.beginPath(),_t.moveTo(Lt,Ht),_t.arc(Lt,Ht,Qt,Un,nr),_t.closePath(),this.colorFillStyle(_t,Nn[0],Nn[1],Nn[2],Pn),_t.fill(),hn+=Fn)}};var ap={},oE=100;ap.getPixelRatio=function(){var _t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var bt=_t.backingStorePixelRatio||_t.webkitBackingStorePixelRatio||_t.mozBackingStorePixelRatio||_t.msBackingStorePixelRatio||_t.oBackingStorePixelRatio||_t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/bt},ap.paintCache=function(_t){for(var bt=this.paintCaches=this.paintCaches||[],St=!0,wt,Nt=0;Nt<bt.length;Nt++)if(wt=bt[Nt],wt.context===_t){St=!1;break}return St&&(wt={context:_t},bt.push(wt)),wt},ap.createGradientStyleFor=function(_t,bt,St,wt,Nt){var Pt,Lt=this.usePaths(),Ht=St.pstyle(bt+"-gradient-stop-colors").value,qt=St.pstyle(bt+"-gradient-stop-positions").pfValue;if(wt==="radial-gradient")if(St.isEdge()){var Gt=St.sourceEndpoint(),Qt=St.targetEndpoint(),hn=St.midpoint(),yn=xp(Gt,hn),xn=xp(Qt,hn);Pt=_t.createRadialGradient(hn.x,hn.y,0,hn.x,hn.y,Math.max(yn,xn))}else{var bn=Lt?{x:0,y:0}:St.position(),Nn=St.paddedWidth(),Pn=St.paddedHeight();Pt=_t.createRadialGradient(bn.x,bn.y,0,bn.x,bn.y,Math.max(Nn,Pn))}else if(St.isEdge()){var Fn=St.sourceEndpoint(),Un=St.targetEndpoint();Pt=_t.createLinearGradient(Fn.x,Fn.y,Un.x,Un.y)}else{var Hn=Lt?{x:0,y:0}:St.position(),nr=St.paddedWidth(),mr=St.paddedHeight(),gr=nr/2,rr=mr/2,hr=St.pstyle("background-gradient-direction").value;switch(hr){case"to-bottom":Pt=_t.createLinearGradient(Hn.x,Hn.y-rr,Hn.x,Hn.y+rr);break;case"to-top":Pt=_t.createLinearGradient(Hn.x,Hn.y+rr,Hn.x,Hn.y-rr);break;case"to-left":Pt=_t.createLinearGradient(Hn.x+gr,Hn.y,Hn.x-gr,Hn.y);break;case"to-right":Pt=_t.createLinearGradient(Hn.x-gr,Hn.y,Hn.x+gr,Hn.y);break;case"to-bottom-right":case"to-right-bottom":Pt=_t.createLinearGradient(Hn.x-gr,Hn.y-rr,Hn.x+gr,Hn.y+rr);break;case"to-top-right":case"to-right-top":Pt=_t.createLinearGradient(Hn.x-gr,Hn.y+rr,Hn.x+gr,Hn.y-rr);break;case"to-bottom-left":case"to-left-bottom":Pt=_t.createLinearGradient(Hn.x+gr,Hn.y-rr,Hn.x-gr,Hn.y+rr);break;case"to-top-left":case"to-left-top":Pt=_t.createLinearGradient(Hn.x+gr,Hn.y+rr,Hn.x-gr,Hn.y-rr);break}}if(!Pt)return null;for(var ar=qt.length===Ht.length,vr=Ht.length,Tr=0;Tr<vr;Tr++)Pt.addColorStop(ar?qt[Tr]:Tr/(vr-1),"rgba("+Ht[Tr][0]+","+Ht[Tr][1]+","+Ht[Tr][2]+","+Nt+")");return Pt},ap.gradientFillStyle=function(_t,bt,St,wt){var Nt=this.createGradientStyleFor(_t,"background",bt,St,wt);if(!Nt)return null;_t.fillStyle=Nt},ap.colorFillStyle=function(_t,bt,St,wt,Nt){_t.fillStyle="rgba("+bt+","+St+","+wt+","+Nt+")"},ap.eleFillStyle=function(_t,bt,St){var wt=bt.pstyle("background-fill").value;if(wt==="linear-gradient"||wt==="radial-gradient")this.gradientFillStyle(_t,bt,wt,St);else{var Nt=bt.pstyle("background-color").value;this.colorFillStyle(_t,Nt[0],Nt[1],Nt[2],St)}},ap.gradientStrokeStyle=function(_t,bt,St,wt){var Nt=this.createGradientStyleFor(_t,"line",bt,St,wt);if(!Nt)return null;_t.strokeStyle=Nt},ap.colorStrokeStyle=function(_t,bt,St,wt,Nt){_t.strokeStyle="rgba("+bt+","+St+","+wt+","+Nt+")"},ap.eleStrokeStyle=function(_t,bt,St){var wt=bt.pstyle("line-fill").value;if(wt==="linear-gradient"||wt==="radial-gradient")this.gradientStrokeStyle(_t,bt,wt,St);else{var Nt=bt.pstyle("line-color").value;this.colorStrokeStyle(_t,Nt[0],Nt[1],Nt[2],St)}},ap.matchCanvasSize=function(_t){var bt=this,St=bt.data,wt=bt.findContainerClientCoords(),Nt=wt[2],Pt=wt[3],Lt=bt.getPixelRatio(),Ht=bt.motionBlurPxRatio;(_t===bt.data.bufferCanvases[bt.MOTIONBLUR_BUFFER_NODE]||_t===bt.data.bufferCanvases[bt.MOTIONBLUR_BUFFER_DRAG])&&(Lt=Ht);var qt=Nt*Lt,Gt=Pt*Lt,Qt;if(!(qt===bt.canvasWidth&&Gt===bt.canvasHeight)){bt.fontCaches=null;var hn=St.canvasContainer;hn.style.width=Nt+"px",hn.style.height=Pt+"px";for(var yn=0;yn<bt.CANVAS_LAYERS;yn++)Qt=St.canvases[yn],Qt.width=qt,Qt.height=Gt,Qt.style.width=Nt+"px",Qt.style.height=Pt+"px";for(var yn=0;yn<bt.BUFFER_COUNT;yn++)Qt=St.bufferCanvases[yn],Qt.width=qt,Qt.height=Gt,Qt.style.width=Nt+"px",Qt.style.height=Pt+"px";bt.textureMult=1,Lt<=1&&(Qt=St.bufferCanvases[bt.TEXTURE_BUFFER],bt.textureMult=2,Qt.width=qt*bt.textureMult,Qt.height=Gt*bt.textureMult),bt.canvasWidth=qt,bt.canvasHeight=Gt}},ap.renderTo=function(_t,bt,St,wt){this.render({forcedContext:_t,forcedZoom:bt,forcedPan:St,drawAllLayers:!0,forcedPxRatio:wt})},ap.render=function(_t){_t=_t||Cs();var bt=_t.forcedContext,St=_t.drawAllLayers,wt=_t.drawOnlyNodeLayer,Nt=_t.forcedZoom,Pt=_t.forcedPan,Lt=this,Ht=_t.forcedPxRatio===void 0?this.getPixelRatio():_t.forcedPxRatio,qt=Lt.cy,Gt=Lt.data,Qt=Gt.canvasNeedsRedraw,hn=Lt.textureOnViewport&&!bt&&(Lt.pinching||Lt.hoverData.dragging||Lt.swipePanning||Lt.data.wheelZooming),yn=_t.motionBlur!==void 0?_t.motionBlur:Lt.motionBlur,xn=Lt.motionBlurPxRatio,bn=qt.hasCompoundNodes(),Nn=Lt.hoverData.draggingEles,Pn=!!(Lt.hoverData.selecting||Lt.touchData.selecting);yn=yn&&!bt&&Lt.motionBlurEnabled&&!Pn;var Fn=yn;bt||(Lt.prevPxRatio!==Ht&&(Lt.invalidateContainerClientCoordsCache(),Lt.matchCanvasSize(Lt.container),Lt.redrawHint("eles",!0),Lt.redrawHint("drag",!0)),Lt.prevPxRatio=Ht),!bt&&Lt.motionBlurTimeout&&clearTimeout(Lt.motionBlurTimeout),yn&&(Lt.mbFrames==null&&(Lt.mbFrames=0),Lt.mbFrames++,Lt.mbFrames<3&&(Fn=!1),Lt.mbFrames>Lt.minMbLowQualFrames&&(Lt.motionBlurPxRatio=Lt.mbPxRBlurry)),Lt.clearingMotionBlur&&(Lt.motionBlurPxRatio=1),Lt.textureDrawLastFrame&&!hn&&(Qt[Lt.NODE]=!0,Qt[Lt.SELECT_BOX]=!0);var Un=qt.style(),Hn=qt.zoom(),nr=Nt!==void 0?Nt:Hn,mr=qt.pan(),gr={x:mr.x,y:mr.y},rr={zoom:Hn,pan:{x:mr.x,y:mr.y}},hr=Lt.prevViewport,ar=hr===void 0||rr.zoom!==hr.zoom||rr.pan.x!==hr.pan.x||rr.pan.y!==hr.pan.y;!ar&&!(Nn&&!bn)&&(Lt.motionBlurPxRatio=1),Pt&&(gr=Pt),nr*=Ht,gr.x*=Ht,gr.y*=Ht;var vr=Lt.getCachedZSortedEles();function Tr(Wo,Po,ps,Ao,Uo){var Ko=Wo.globalCompositeOperation;Wo.globalCompositeOperation="destination-out",Lt.colorFillStyle(Wo,255,255,255,Lt.motionBlurTransparency),Wo.fillRect(Po,ps,Ao,Uo),Wo.globalCompositeOperation=Ko}function dr(Wo,Po){var ps,Ao,Uo,Ko;!Lt.clearingMotionBlur&&(Wo===Gt.bufferContexts[Lt.MOTIONBLUR_BUFFER_NODE]||Wo===Gt.bufferContexts[Lt.MOTIONBLUR_BUFFER_DRAG])?(ps={x:mr.x*xn,y:mr.y*xn},Ao=Hn*xn,Uo=Lt.canvasWidth*xn,Ko=Lt.canvasHeight*xn):(ps=gr,Ao=nr,Uo=Lt.canvasWidth,Ko=Lt.canvasHeight),Wo.setTransform(1,0,0,1,0,0),Po==="motionBlur"?Tr(Wo,0,0,Uo,Ko):!bt&&(Po===void 0||Po)&&Wo.clearRect(0,0,Uo,Ko),St||(Wo.translate(ps.x,ps.y),Wo.scale(Ao,Ao)),Pt&&Wo.translate(Pt.x,Pt.y),Nt&&Wo.scale(Nt,Nt)}if(hn||(Lt.textureDrawLastFrame=!1),hn){if(Lt.textureDrawLastFrame=!0,!Lt.textureCache){Lt.textureCache={},Lt.textureCache.bb=qt.mutableElements().boundingBox(),Lt.textureCache.texture=Lt.data.bufferCanvases[Lt.TEXTURE_BUFFER];var Sr=Lt.data.bufferContexts[Lt.TEXTURE_BUFFER];Sr.setTransform(1,0,0,1,0,0),Sr.clearRect(0,0,Lt.canvasWidth*Lt.textureMult,Lt.canvasHeight*Lt.textureMult),Lt.render({forcedContext:Sr,drawOnlyNodeLayer:!0,forcedPxRatio:Ht*Lt.textureMult});var rr=Lt.textureCache.viewport={zoom:qt.zoom(),pan:qt.pan(),width:Lt.canvasWidth,height:Lt.canvasHeight};rr.mpan={x:(0-rr.pan.x)/rr.zoom,y:(0-rr.pan.y)/rr.zoom}}Qt[Lt.DRAG]=!1,Qt[Lt.NODE]=!1;var yr=Gt.contexts[Lt.NODE],Fr=Lt.textureCache.texture,rr=Lt.textureCache.viewport;yr.setTransform(1,0,0,1,0,0),yn?Tr(yr,0,0,rr.width,rr.height):yr.clearRect(0,0,rr.width,rr.height);var _r=Un.core("outside-texture-bg-color").value,Rr=Un.core("outside-texture-bg-opacity").value;Lt.colorFillStyle(yr,_r[0],_r[1],_r[2],Rr),yr.fillRect(0,0,rr.width,rr.height);var Hn=qt.zoom();dr(yr,!1),yr.clearRect(rr.mpan.x,rr.mpan.y,rr.width/rr.zoom/Ht,rr.height/rr.zoom/Ht),yr.drawImage(Fr,rr.mpan.x,rr.mpan.y,rr.width/rr.zoom/Ht,rr.height/rr.zoom/Ht)}else Lt.textureOnViewport&&!bt&&(Lt.textureCache=null);var zr=qt.extent(),Vr=Lt.pinching||Lt.hoverData.dragging||Lt.swipePanning||Lt.data.wheelZooming||Lt.hoverData.draggingEles||Lt.cy.animated(),ga=Lt.hideEdgesOnViewport&&Vr,jr=[];if(jr[Lt.NODE]=!Qt[Lt.NODE]&&yn&&!Lt.clearedForMotionBlur[Lt.NODE]||Lt.clearingMotionBlur,jr[Lt.NODE]&&(Lt.clearedForMotionBlur[Lt.NODE]=!0),jr[Lt.DRAG]=!Qt[Lt.DRAG]&&yn&&!Lt.clearedForMotionBlur[Lt.DRAG]||Lt.clearingMotionBlur,jr[Lt.DRAG]&&(Lt.clearedForMotionBlur[Lt.DRAG]=!0),Qt[Lt.NODE]||St||wt||jr[Lt.NODE]){var _i=yn&&!jr[Lt.NODE]&&xn!==1,yr=bt||(_i?Lt.data.bufferContexts[Lt.MOTIONBLUR_BUFFER_NODE]:Gt.contexts[Lt.NODE]),co=yn&&!_i?"motionBlur":void 0;dr(yr,co),ga?Lt.drawCachedNodes(yr,vr.nondrag,Ht,zr):Lt.drawLayeredElements(yr,vr.nondrag,Ht,zr),Lt.debug&&Lt.drawDebugPoints(yr,vr.nondrag),!St&&!yn&&(Qt[Lt.NODE]=!1)}if(!wt&&(Qt[Lt.DRAG]||St||jr[Lt.DRAG])){var _i=yn&&!jr[Lt.DRAG]&&xn!==1,yr=bt||(_i?Lt.data.bufferContexts[Lt.MOTIONBLUR_BUFFER_DRAG]:Gt.contexts[Lt.DRAG]);dr(yr,yn&&!_i?"motionBlur":void 0),ga?Lt.drawCachedNodes(yr,vr.drag,Ht,zr):Lt.drawCachedElements(yr,vr.drag,Ht,zr),Lt.debug&&Lt.drawDebugPoints(yr,vr.drag),!St&&!yn&&(Qt[Lt.DRAG]=!1)}if(Lt.showFps||!wt&&Qt[Lt.SELECT_BOX]&&!St){var yr=bt||Gt.contexts[Lt.SELECT_BOX];if(dr(yr),Lt.selection[4]==1&&(Lt.hoverData.selecting||Lt.touchData.selecting)){var Hn=Lt.cy.zoom(),mo=Un.core("selection-box-border-width").value/Hn;yr.lineWidth=mo,yr.fillStyle="rgba("+Un.core("selection-box-color").value[0]+","+Un.core("selection-box-color").value[1]+","+Un.core("selection-box-color").value[2]+","+Un.core("selection-box-opacity").value+")",yr.fillRect(Lt.selection[0],Lt.selection[1],Lt.selection[2]-Lt.selection[0],Lt.selection[3]-Lt.selection[1]),mo>0&&(yr.strokeStyle="rgba("+Un.core("selection-box-border-color").value[0]+","+Un.core("selection-box-border-color").value[1]+","+Un.core("selection-box-border-color").value[2]+","+Un.core("selection-box-opacity").value+")",yr.strokeRect(Lt.selection[0],Lt.selection[1],Lt.selection[2]-Lt.selection[0],Lt.selection[3]-Lt.selection[1]))}if(Gt.bgActivePosistion&&!Lt.hoverData.selecting){var Hn=Lt.cy.zoom(),uo=Gt.bgActivePosistion;yr.fillStyle="rgba("+Un.core("active-bg-color").value[0]+","+Un.core("active-bg-color").value[1]+","+Un.core("active-bg-color").value[2]+","+Un.core("active-bg-opacity").value+")",yr.beginPath(),yr.arc(uo.x,uo.y,Un.core("active-bg-size").pfValue/Hn,0,2*Math.PI),yr.fill()}var so=Lt.lastRedrawTime;if(Lt.showFps&&so){so=Math.round(so);var Br=Math.round(1e3/so);yr.setTransform(1,0,0,1,0,0),yr.fillStyle="rgba(255, 0, 0, 0.75)",yr.strokeStyle="rgba(255, 0, 0, 0.75)",yr.lineWidth=1,yr.fillText("1 frame = "+so+" ms = "+Br+" fps",0,20);var fo=60;yr.strokeRect(0,30,250,20),yr.fillRect(0,30,250*Math.min(Br/fo,1),20)}St||(Qt[Lt.SELECT_BOX]=!1)}if(yn&&xn!==1){var vo=Gt.contexts[Lt.NODE],Io=Lt.data.bufferCanvases[Lt.MOTIONBLUR_BUFFER_NODE],Fo=Gt.contexts[Lt.DRAG],Is=Lt.data.bufferCanvases[Lt.MOTIONBLUR_BUFFER_DRAG],Ss=function(Po,ps,Ao){Po.setTransform(1,0,0,1,0,0),Ao||!Fn?Po.clearRect(0,0,Lt.canvasWidth,Lt.canvasHeight):Tr(Po,0,0,Lt.canvasWidth,Lt.canvasHeight);var Uo=xn;Po.drawImage(ps,0,0,Lt.canvasWidth*Uo,Lt.canvasHeight*Uo,0,0,Lt.canvasWidth,Lt.canvasHeight)};(Qt[Lt.NODE]||jr[Lt.NODE])&&(Ss(vo,Io,jr[Lt.NODE]),Qt[Lt.NODE]=!1),(Qt[Lt.DRAG]||jr[Lt.DRAG])&&(Ss(Fo,Is,jr[Lt.DRAG]),Qt[Lt.DRAG]=!1)}Lt.prevViewport=rr,Lt.clearingMotionBlur&&(Lt.clearingMotionBlur=!1,Lt.motionBlurCleared=!0,Lt.motionBlur=!0),yn&&(Lt.motionBlurTimeout=setTimeout(function(){Lt.motionBlurTimeout=null,Lt.clearedForMotionBlur[Lt.NODE]=!1,Lt.clearedForMotionBlur[Lt.DRAG]=!1,Lt.motionBlur=!1,Lt.clearingMotionBlur=!hn,Lt.mbFrames=0,Qt[Lt.NODE]=!0,Qt[Lt.DRAG]=!0,Lt.redraw()},oE)),bt||qt.emit("render")};var om={};om.drawPolygonPath=function(_t,bt,St,wt,Nt,Pt){var Lt=wt/2,Ht=Nt/2;_t.beginPath&&_t.beginPath(),_t.moveTo(bt+Lt*Pt[0],St+Ht*Pt[1]);for(var qt=1;qt<Pt.length/2;qt++)_t.lineTo(bt+Lt*Pt[qt*2],St+Ht*Pt[qt*2+1]);_t.closePath()},om.drawRoundPolygonPath=function(_t,bt,St,wt,Nt,Pt){var Lt=wt/2,Ht=Nt/2,qt=du(wt,Nt);_t.beginPath&&_t.beginPath();for(var Gt=0;Gt<Pt.length/4;Gt++){var Qt=void 0,hn=void 0;Gt===0?Qt=Pt.length-2:Qt=Gt*4-2,hn=Gt*4+2;var yn=bt+Lt*Pt[Gt*4],xn=St+Ht*Pt[Gt*4+1],bn=-Pt[Qt]*Pt[hn]-Pt[Qt+1]*Pt[hn+1],Nn=qt/Math.tan(Math.acos(bn)/2),Pn=yn-Nn*Pt[Qt],Fn=xn-Nn*Pt[Qt+1],Un=yn+Nn*Pt[hn],Hn=xn+Nn*Pt[hn+1];Gt===0?_t.moveTo(Pn,Fn):_t.lineTo(Pn,Fn),_t.arcTo(yn,xn,Un,Hn,qt)}_t.closePath()},om.drawRoundRectanglePath=function(_t,bt,St,wt,Nt){var Pt=wt/2,Lt=Nt/2,Ht=Du(wt,Nt);_t.beginPath&&_t.beginPath(),_t.moveTo(bt,St-Lt),_t.arcTo(bt+Pt,St-Lt,bt+Pt,St,Ht),_t.arcTo(bt+Pt,St+Lt,bt,St+Lt,Ht),_t.arcTo(bt-Pt,St+Lt,bt-Pt,St,Ht),_t.arcTo(bt-Pt,St-Lt,bt,St-Lt,Ht),_t.lineTo(bt,St-Lt),_t.closePath()},om.drawBottomRoundRectanglePath=function(_t,bt,St,wt,Nt){var Pt=wt/2,Lt=Nt/2,Ht=Du(wt,Nt);_t.beginPath&&_t.beginPath(),_t.moveTo(bt,St-Lt),_t.lineTo(bt+Pt,St-Lt),_t.lineTo(bt+Pt,St),_t.arcTo(bt+Pt,St+Lt,bt,St+Lt,Ht),_t.arcTo(bt-Pt,St+Lt,bt-Pt,St,Ht),_t.lineTo(bt-Pt,St-Lt),_t.lineTo(bt,St-Lt),_t.closePath()},om.drawCutRectanglePath=function(_t,bt,St,wt,Nt){var Pt=wt/2,Lt=Nt/2,Ht=Vp();_t.beginPath&&_t.beginPath(),_t.moveTo(bt-Pt+Ht,St-Lt),_t.lineTo(bt+Pt-Ht,St-Lt),_t.lineTo(bt+Pt,St-Lt+Ht),_t.lineTo(bt+Pt,St+Lt-Ht),_t.lineTo(bt+Pt-Ht,St+Lt),_t.lineTo(bt-Pt+Ht,St+Lt),_t.lineTo(bt-Pt,St+Lt-Ht),_t.lineTo(bt-Pt,St-Lt+Ht),_t.closePath()},om.drawBarrelPath=function(_t,bt,St,wt,Nt){var Pt=wt/2,Lt=Nt/2,Ht=bt-Pt,qt=bt+Pt,Gt=St-Lt,Qt=St+Lt,hn=Um(wt,Nt),yn=hn.widthOffset,xn=hn.heightOffset,bn=hn.ctrlPtOffsetPct*yn;_t.beginPath&&_t.beginPath(),_t.moveTo(Ht,Gt+xn),_t.lineTo(Ht,Qt-xn),_t.quadraticCurveTo(Ht+bn,Qt,Ht+yn,Qt),_t.lineTo(qt-yn,Qt),_t.quadraticCurveTo(qt-bn,Qt,qt,Qt-xn),_t.lineTo(qt,Gt+xn),_t.quadraticCurveTo(qt-bn,Gt,qt-yn,Gt),_t.lineTo(Ht+yn,Gt),_t.quadraticCurveTo(Ht+bn,Gt,Ht,Gt+xn),_t.closePath()};for(var xv=Math.sin(0),tT=Math.cos(0),nT={},rT={},KT=Math.PI/40,h0=0*Math.PI;h0<2*Math.PI;h0+=KT)nT[h0]=Math.sin(h0),rT[h0]=Math.cos(h0);om.drawEllipsePath=function(_t,bt,St,wt,Nt){if(_t.beginPath&&_t.beginPath(),_t.ellipse)_t.ellipse(bt,St,wt/2,Nt/2,0,0,2*Math.PI);else for(var Pt,Lt,Ht=wt/2,qt=Nt/2,Gt=0*Math.PI;Gt<2*Math.PI;Gt+=KT)Pt=bt-Ht*nT[Gt]*xv+Ht*rT[Gt]*tT,Lt=St+qt*rT[Gt]*xv+qt*nT[Gt]*tT,Gt===0?_t.moveTo(Pt,Lt):_t.lineTo(Pt,Lt);_t.closePath()};var gy={};gy.createBuffer=function(_t,bt){var St=document.createElement("canvas");return St.width=_t,St.height=bt,[St,St.getContext("2d")]},gy.bufferCanvasImage=function(_t){var bt=this.cy,St=bt.mutableElements(),wt=St.boundingBox(),Nt=this.findContainerClientCoords(),Pt=_t.full?Math.ceil(wt.w):Nt[2],Lt=_t.full?Math.ceil(wt.h):Nt[3],Ht=sn(_t.maxWidth)||sn(_t.maxHeight),qt=this.getPixelRatio(),Gt=1;if(_t.scale!==void 0)Pt*=_t.scale,Lt*=_t.scale,Gt=_t.scale;else if(Ht){var Qt=1/0,hn=1/0;sn(_t.maxWidth)&&(Qt=Gt*_t.maxWidth/Pt),sn(_t.maxHeight)&&(hn=Gt*_t.maxHeight/Lt),Gt=Math.min(Qt,hn),Pt*=Gt,Lt*=Gt}Ht||(Pt*=qt,Lt*=qt,Gt*=qt);var yn=document.createElement("canvas");yn.width=Pt,yn.height=Lt,yn.style.width=Pt+"px",yn.style.height=Lt+"px";var xn=yn.getContext("2d");if(Pt>0&&Lt>0){xn.clearRect(0,0,Pt,Lt),xn.globalCompositeOperation="source-over";var bn=this.getCachedZSortedEles();if(_t.full)xn.translate(-wt.x1*Gt,-wt.y1*Gt),xn.scale(Gt,Gt),this.drawElements(xn,bn),xn.scale(1/Gt,1/Gt),xn.translate(wt.x1*Gt,wt.y1*Gt);else{var Nn=bt.pan(),Pn={x:Nn.x*Gt,y:Nn.y*Gt};Gt*=bt.zoom(),xn.translate(Pn.x,Pn.y),xn.scale(Gt,Gt),this.drawElements(xn,bn),xn.scale(1/Gt,1/Gt),xn.translate(-Pn.x,-Pn.y)}_t.bg&&(xn.globalCompositeOperation="destination-over",xn.fillStyle=_t.bg,xn.rect(0,0,Pt,Lt),xn.fill())}return yn};function sE(_t,bt){for(var St=atob(_t),wt=new ArrayBuffer(St.length),Nt=new Uint8Array(wt),Pt=0;Pt<St.length;Pt++)Nt[Pt]=St.charCodeAt(Pt);return new Blob([wt],{type:bt})}function YT(_t){var bt=_t.indexOf(",");return _t.substr(bt+1)}function XT(_t,bt,St){var wt=function(){return bt.toDataURL(St,_t.quality)};switch(_t.output){case"blob-promise":return new Op(function(Nt,Pt){try{bt.toBlob(function(Lt){Lt!=null?Nt(Lt):Pt(new Error("`canvas.toBlob()` sent a null value in its callback"))},St,_t.quality)}catch(Lt){Pt(Lt)}});case"blob":return sE(YT(wt()),St);case"base64":return YT(wt());case"base64uri":default:return wt()}}gy.png=function(_t){return XT(_t,this.bufferCanvasImage(_t),"image/png")},gy.jpg=function(_t){return XT(_t,this.bufferCanvasImage(_t),"image/jpeg")};var iT={};iT.nodeShapeImpl=function(_t,bt,St,wt,Nt,Pt,Lt){switch(_t){case"ellipse":return this.drawEllipsePath(bt,St,wt,Nt,Pt);case"polygon":return this.drawPolygonPath(bt,St,wt,Nt,Pt,Lt);case"round-polygon":return this.drawRoundPolygonPath(bt,St,wt,Nt,Pt,Lt);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(bt,St,wt,Nt,Pt);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(bt,St,wt,Nt,Pt);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(bt,St,wt,Nt,Pt);case"barrel":return this.drawBarrelPath(bt,St,wt,Nt,Pt)}};var lE=ZT,pl=ZT.prototype;pl.CANVAS_LAYERS=3,pl.SELECT_BOX=0,pl.DRAG=1,pl.NODE=2,pl.BUFFER_COUNT=3,pl.TEXTURE_BUFFER=0,pl.MOTIONBLUR_BUFFER_NODE=1,pl.MOTIONBLUR_BUFFER_DRAG=2;function ZT(_t){var bt=this;bt.data={canvases:new Array(pl.CANVAS_LAYERS),contexts:new Array(pl.CANVAS_LAYERS),canvasNeedsRedraw:new Array(pl.CANVAS_LAYERS),bufferCanvases:new Array(pl.BUFFER_COUNT),bufferContexts:new Array(pl.CANVAS_LAYERS)};var St="-webkit-tap-highlight-color",wt="rgba(0,0,0,0)";bt.data.canvasContainer=document.createElement("div");var Nt=bt.data.canvasContainer.style;bt.data.canvasContainer.style[St]=wt,Nt.position="relative",Nt.zIndex="0",Nt.overflow="hidden";var Pt=_t.cy.container();Pt.appendChild(bt.data.canvasContainer),Pt.style[St]=wt;var Lt={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};Bn()&&(Lt["-ms-touch-action"]="none",Lt["touch-action"]="none");for(var Ht=0;Ht<pl.CANVAS_LAYERS;Ht++){var qt=bt.data.canvases[Ht]=document.createElement("canvas");bt.data.contexts[Ht]=qt.getContext("2d"),Object.keys(Lt).forEach(function(so){qt.style[so]=Lt[so]}),qt.style.position="absolute",qt.setAttribute("data-id","layer"+Ht),qt.style.zIndex=String(pl.CANVAS_LAYERS-Ht),bt.data.canvasContainer.appendChild(qt),bt.data.canvasNeedsRedraw[Ht]=!1}bt.data.topCanvas=bt.data.canvases[0],bt.data.canvases[pl.NODE].setAttribute("data-id","layer"+pl.NODE+"-node"),bt.data.canvases[pl.SELECT_BOX].setAttribute("data-id","layer"+pl.SELECT_BOX+"-selectbox"),bt.data.canvases[pl.DRAG].setAttribute("data-id","layer"+pl.DRAG+"-drag");for(var Ht=0;Ht<pl.BUFFER_COUNT;Ht++)bt.data.bufferCanvases[Ht]=document.createElement("canvas"),bt.data.bufferContexts[Ht]=bt.data.bufferCanvases[Ht].getContext("2d"),bt.data.bufferCanvases[Ht].style.position="absolute",bt.data.bufferCanvases[Ht].setAttribute("data-id","buffer"+Ht),bt.data.bufferCanvases[Ht].style.zIndex=String(-Ht-1),bt.data.bufferCanvases[Ht].style.visibility="hidden";bt.pathsEnabled=!0;var Gt=Iu(),Qt=function(Br){return{x:(Br.x1+Br.x2)/2,y:(Br.y1+Br.y2)/2}},hn=function(Br){return{x:-Br.w/2,y:-Br.h/2}},yn=function(Br){var fo=Br[0]._private,vo=fo.oldBackgroundTimestamp===fo.backgroundTimestamp;return!vo},xn=function(Br){return Br[0]._private.nodeKey},bn=function(Br){return Br[0]._private.labelStyleKey},Nn=function(Br){return Br[0]._private.sourceLabelStyleKey},Pn=function(Br){return Br[0]._private.targetLabelStyleKey},Fn=function(Br,fo,vo,Io,Fo){return bt.drawElement(Br,fo,vo,!1,!1,Fo)},Un=function(Br,fo,vo,Io,Fo){return bt.drawElementText(Br,fo,vo,Io,"main",Fo)},Hn=function(Br,fo,vo,Io,Fo){return bt.drawElementText(Br,fo,vo,Io,"source",Fo)},nr=function(Br,fo,vo,Io,Fo){return bt.drawElementText(Br,fo,vo,Io,"target",Fo)},mr=function(Br){return Br.boundingBox(),Br[0]._private.bodyBounds},gr=function(Br){return Br.boundingBox(),Br[0]._private.labelBounds.main||Gt},rr=function(Br){return Br.boundingBox(),Br[0]._private.labelBounds.source||Gt},hr=function(Br){return Br.boundingBox(),Br[0]._private.labelBounds.target||Gt},ar=function(Br,fo){return fo},vr=function(Br){return Qt(mr(Br))},Tr=function(Br,fo,vo){var Io=Br?Br+"-":"";return{x:fo.x+vo.pstyle(Io+"text-margin-x").pfValue,y:fo.y+vo.pstyle(Io+"text-margin-y").pfValue}},dr=function(Br,fo,vo){var Io=Br[0]._private.rscratch;return{x:Io[fo],y:Io[vo]}},Sr=function(Br){return Tr("",dr(Br,"labelX","labelY"),Br)},yr=function(Br){return Tr("source",dr(Br,"sourceLabelX","sourceLabelY"),Br)},Fr=function(Br){return Tr("target",dr(Br,"targetLabelX","targetLabelY"),Br)},_r=function(Br){return hn(mr(Br))},Rr=function(Br){return hn(rr(Br))},zr=function(Br){return hn(hr(Br))},Vr=function(Br){var fo=gr(Br),vo=hn(gr(Br));if(Br.isNode()){switch(Br.pstyle("text-halign").value){case"left":vo.x=-fo.w;break;case"right":vo.x=0;break}switch(Br.pstyle("text-valign").value){case"top":vo.y=-fo.h;break;case"bottom":vo.y=0;break}}return vo},ga=bt.data.eleTxrCache=new my(bt,{getKey:xn,doesEleInvalidateKey:yn,drawElement:Fn,getBoundingBox:mr,getRotationPoint:vr,getRotationOffset:_r,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),jr=bt.data.lblTxrCache=new my(bt,{getKey:bn,drawElement:Un,getBoundingBox:gr,getRotationPoint:Sr,getRotationOffset:Vr,isVisible:ar}),_i=bt.data.slbTxrCache=new my(bt,{getKey:Nn,drawElement:Hn,getBoundingBox:rr,getRotationPoint:yr,getRotationOffset:Rr,isVisible:ar}),co=bt.data.tlbTxrCache=new my(bt,{getKey:Pn,drawElement:nr,getBoundingBox:hr,getRotationPoint:Fr,getRotationOffset:zr,isVisible:ar}),mo=bt.data.lyrTxrCache=new WT(bt);bt.onUpdateEleCalcs(function(Br,fo){ga.invalidateElements(fo),jr.invalidateElements(fo),_i.invalidateElements(fo),co.invalidateElements(fo),mo.invalidateElements(fo);for(var vo=0;vo<fo.length;vo++){var Io=fo[vo]._private;Io.oldBackgroundTimestamp=Io.backgroundTimestamp}});var uo=function(Br){for(var fo=0;fo<Br.length;fo++)mo.enqueueElementRefinement(Br[fo].ele)};ga.onDequeue(uo),jr.onDequeue(uo),_i.onDequeue(uo),co.onDequeue(uo)}pl.redrawHint=function(_t,bt){var St=this;switch(_t){case"eles":St.data.canvasNeedsRedraw[pl.NODE]=bt;break;case"drag":St.data.canvasNeedsRedraw[pl.DRAG]=bt;break;case"select":St.data.canvasNeedsRedraw[pl.SELECT_BOX]=bt;break}};var uE=typeof Path2D<"u";pl.path2dEnabled=function(_t){if(_t===void 0)return this.pathsEnabled;this.pathsEnabled=!!_t},pl.usePaths=function(){return uE&&this.pathsEnabled},pl.setImgSmoothing=function(_t,bt){_t.imageSmoothingEnabled!=null?_t.imageSmoothingEnabled=bt:(_t.webkitImageSmoothingEnabled=bt,_t.mozImageSmoothingEnabled=bt,_t.msImageSmoothingEnabled=bt)},pl.getImgSmoothing=function(_t){return _t.imageSmoothingEnabled!=null?_t.imageSmoothingEnabled:_t.webkitImageSmoothingEnabled||_t.mozImageSmoothingEnabled||_t.msImageSmoothingEnabled},pl.makeOffscreenCanvas=function(_t,bt){var St;return(typeof OffscreenCanvas>"u"?"undefined":mt(OffscreenCanvas))!=="undefined"?St=new OffscreenCanvas(_t,bt):(St=document.createElement("canvas"),St.width=_t,St.height=bt),St},[jT,a1,R1,eT,km,f0,ap,om,gy,iT].forEach(function(_t){Qr(pl,_t)});var cE=[{name:"null",impl:am},{name:"base",impl:Xv},{name:"canvas",impl:lE}],dE=[{type:"layout",extensions:qv},{type:"renderer",extensions:cE}],QT={},JT={};function n2(_t,bt,St){var wt=St,Nt=function(hr){As("Can not register `"+bt+"` for `"+_t+"` since `"+hr+"` already exists in the prototype and can not be overridden")};if(_t==="core"){if(hu.prototype[bt])return Nt(bt);hu.prototype[bt]=St}else if(_t==="collection"){if(ou.prototype[bt])return Nt(bt);ou.prototype[bt]=St}else if(_t==="layout"){for(var Pt=function(hr){this.options=hr,St.call(this,hr),gn(this._private)||(this._private={}),this._private.cy=hr.cy,this._private.listeners=[],this.createEmitter()},Lt=Pt.prototype=Object.create(St.prototype),Ht=[],qt=0;qt<Ht.length;qt++){var Gt=Ht[qt];Lt[Gt]=Lt[Gt]||function(){return this}}Lt.start&&!Lt.run?Lt.run=function(){return this.start(),this}:!Lt.start&&Lt.run&&(Lt.start=function(){return this.run(),this});var Qt=St.prototype.stop;Lt.stop=function(){var rr=this.options;if(rr&&rr.animate){var hr=this.animations;if(hr)for(var ar=0;ar<hr.length;ar++)hr[ar].stop()}return Qt?Qt.call(this):this.emit("layoutstop"),this},Lt.destroy||(Lt.destroy=function(){return this}),Lt.cy=function(){return this._private.cy};var hn=function(hr){return hr._private.cy},yn={addEventFields:function(hr,ar){ar.layout=hr,ar.cy=hn(hr),ar.target=hr},bubble:function(){return!0},parent:function(hr){return hn(hr)}};Qr(Lt,{createEmitter:function(){return this._private.emitter=new Qu(yn,this),this},emitter:function(){return this._private.emitter},on:function(hr,ar){return this.emitter().on(hr,ar),this},one:function(hr,ar){return this.emitter().one(hr,ar),this},once:function(hr,ar){return this.emitter().one(hr,ar),this},removeListener:function(hr,ar){return this.emitter().removeListener(hr,ar),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(hr,ar){return this.emitter().emit(hr,ar),this}}),yl.eventAliasesOn(Lt),wt=Pt}else if(_t==="renderer"&&bt!=="null"&&bt!=="base"){var xn=r2("renderer","base"),bn=xn.prototype,Nn=St,Pn=St.prototype,Fn=function(){xn.apply(this,arguments),Nn.apply(this,arguments)},Un=Fn.prototype;for(var Hn in bn){var nr=bn[Hn],mr=Pn[Hn]!=null;if(mr)return Nt(Hn);Un[Hn]=nr}for(var gr in Pn)Un[gr]=Pn[gr];bn.clientFunctions.forEach(function(rr){Un[rr]=Un[rr]||function(){Os("Renderer does not implement `renderer."+rr+"()` on its prototype")}}),wt=Fn}else if(_t==="__proto__"||_t==="constructor"||_t==="prototype")return Os(_t+" is an illegal type to be registered, possibly lead to prototype pollutions");return bo({map:QT,keys:[_t,bt],value:wt})}function r2(_t,bt){return Vo({map:QT,keys:[_t,bt]})}function fE(_t,bt,St,wt,Nt){return bo({map:JT,keys:[_t,bt,St,wt],value:Nt})}function pE(_t,bt,St,wt){return Vo({map:JT,keys:[_t,bt,St,wt]})}var aT=function(){if(arguments.length===2)return r2.apply(null,arguments);if(arguments.length===3)return n2.apply(null,arguments);if(arguments.length===4)return pE.apply(null,arguments);if(arguments.length===5)return fE.apply(null,arguments);Os("Invalid extension access syntax")};hu.prototype.extension=aT,dE.forEach(function(_t){_t.extensions.forEach(function(bt){n2(_t.type,bt.name,bt.impl)})});var i2=function _t(){if(!(this instanceof _t))return new _t;this.length=0},Pm=i2.prototype;Pm.instanceString=function(){return"stylesheet"},Pm.selector=function(_t){var bt=this.length++;return this[bt]={selector:_t,properties:[]},this},Pm.css=function(_t,bt){var St=this.length-1;if(Ut(_t))this[St].properties.push({name:_t,value:bt});else if(gn(_t))for(var wt=_t,Nt=Object.keys(wt),Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt],Ht=wt[Lt];if(Ht!=null){var qt=Bu.properties[Lt]||Bu.properties[Er(Lt)];if(qt!=null){var Gt=qt.name,Qt=Ht;this[St].properties.push({name:Gt,value:Qt})}}}return this},Pm.style=Pm.css,Pm.generateStyle=function(_t){var bt=new Bu(_t);return this.appendToStyle(bt)},Pm.appendToStyle=function(_t){for(var bt=0;bt<this.length;bt++){var St=this[bt],wt=St.selector,Nt=St.properties;_t.selector(wt);for(var Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt];_t.css(Lt.name,Lt.value)}}return _t};var hE="3.25.0",Mm=function(bt){if(bt===void 0&&(bt={}),gn(bt))return new hu(bt);if(Ut(bt))return aT.apply(aT,arguments)};return Mm.use=function(_t){var bt=Array.prototype.slice.call(arguments,1);return bt.unshift(Mm),_t.apply(null,bt),this},Mm.warnings=function(_t){return dl(_t)},Mm.version=hE,Mm.stylesheet=Mm.Stylesheet=i2,cytoscape_cjs=Mm,cytoscape_cjs}var cytoscape_cjsExports=requireCytoscape_cjs(),cytoscapeDagre={exports:{}};function commonjsRequire(et){throw new Error('Could not dynamically require "'+et+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var dagre_min={exports:{}},hasRequiredDagre_min;function requireDagre_min(){return hasRequiredDagre_min||(hasRequiredDagre_min=1,function(et,tt){(function(nt){et.exports=nt()})(function(){return function(){function nt(rt,ot,st){function ut(pt,ht){if(!ot[pt]){if(!rt[pt]){var mt=typeof commonjsRequire=="function"&&commonjsRequire;if(!ht&&mt)return mt(pt,!0);if(ct)return ct(pt,!0);var yt=new Error("Cannot find module '"+pt+"'");throw yt.code="MODULE_NOT_FOUND",yt}var vt=ot[pt]={exports:{}};rt[pt][0].call(vt.exports,function(Tt){var Et=rt[pt][1][Tt];return ut(Et||Tt)},vt,vt.exports,nt,rt,ot,st)}return ot[pt].exports}for(var ct=typeof commonjsRequire=="function"&&commonjsRequire,ft=0;ft<st.length;ft++)ut(st[ft]);return ut}return nt}()({1:[function(nt,rt,ot){rt.exports={graphlib:nt("./lib/graphlib"),layout:nt("./lib/layout"),debug:nt("./lib/debug"),util:{time:nt("./lib/util").time,notime:nt("./lib/util").notime},version:nt("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./greedy-fas");rt.exports={run:ct,undo:pt};function ct(ht){var mt=ht.graph().acyclicer==="greedy"?ut(ht,yt(ht)):ft(ht);st.forEach(mt,function(vt){var Tt=ht.edge(vt);ht.removeEdge(vt),Tt.forwardName=vt.name,Tt.reversed=!0,ht.setEdge(vt.w,vt.v,Tt,st.uniqueId("rev"))});function yt(vt){return function(Tt){return vt.edge(Tt).weight}}}function ft(ht){var mt=[],yt={},vt={};function Tt(Et){st.has(vt,Et)||(vt[Et]=!0,yt[Et]=!0,st.forEach(ht.outEdges(Et),function(xt){st.has(yt,xt.w)?mt.push(xt):Tt(xt.w)}),delete yt[Et])}return st.forEach(ht.nodes(),Tt),mt}function pt(ht){st.forEach(ht.edges(),function(mt){var yt=ht.edge(mt);if(yt.reversed){ht.removeEdge(mt);var vt=yt.forwardName;delete yt.reversed,delete yt.forwardName,ht.setEdge(mt.w,mt.v,yt,vt)}})}},{"./greedy-fas":8,"./lodash":10}],3:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./util");rt.exports=ct;function ct(pt){function ht(mt){var yt=pt.children(mt),vt=pt.node(mt);if(yt.length&&st.forEach(yt,ht),st.has(vt,"minRank")){vt.borderLeft=[],vt.borderRight=[];for(var Tt=vt.minRank,Et=vt.maxRank+1;Tt<Et;++Tt)ft(pt,"borderLeft","_bl",mt,vt,Tt),ft(pt,"borderRight","_br",mt,vt,Tt)}}st.forEach(pt.children(),ht)}function ft(pt,ht,mt,yt,vt,Tt){var Et={width:0,height:0,rank:Tt,borderType:ht},xt=vt[ht][Tt-1],At=ut.addDummyNode(pt,"border",Et,mt);vt[ht][Tt]=At,pt.setParent(At,yt),xt&&pt.setEdge(xt,At,{weight:1})}},{"./lodash":10,"./util":29}],4:[function(nt,rt,ot){var st=nt("./lodash");rt.exports={adjust:ut,undo:ct};function ut(Tt){var Et=Tt.graph().rankdir.toLowerCase();(Et==="lr"||Et==="rl")&&ft(Tt)}function ct(Tt){var Et=Tt.graph().rankdir.toLowerCase();(Et==="bt"||Et==="rl")&&ht(Tt),(Et==="lr"||Et==="rl")&&(yt(Tt),ft(Tt))}function ft(Tt){st.forEach(Tt.nodes(),function(Et){pt(Tt.node(Et))}),st.forEach(Tt.edges(),function(Et){pt(Tt.edge(Et))})}function pt(Tt){var Et=Tt.width;Tt.width=Tt.height,Tt.height=Et}function ht(Tt){st.forEach(Tt.nodes(),function(Et){mt(Tt.node(Et))}),st.forEach(Tt.edges(),function(Et){var xt=Tt.edge(Et);st.forEach(xt.points,mt),st.has(xt,"y")&&mt(xt)})}function mt(Tt){Tt.y=-Tt.y}function yt(Tt){st.forEach(Tt.nodes(),function(Et){vt(Tt.node(Et))}),st.forEach(Tt.edges(),function(Et){var xt=Tt.edge(Et);st.forEach(xt.points,vt),st.has(xt,"x")&&vt(xt)})}function vt(Tt){var Et=Tt.x;Tt.x=Tt.y,Tt.y=Et}},{"./lodash":10}],5:[function(nt,rt,ot){rt.exports=st;function st(){var ft={};ft._next=ft._prev=ft,this._sentinel=ft}st.prototype.dequeue=function(){var ft=this._sentinel,pt=ft._prev;if(pt!==ft)return ut(pt),pt},st.prototype.enqueue=function(ft){var pt=this._sentinel;ft._prev&&ft._next&&ut(ft),ft._next=pt._next,pt._next._prev=ft,pt._next=ft,ft._prev=pt},st.prototype.toString=function(){for(var ft=[],pt=this._sentinel,ht=pt._prev;ht!==pt;)ft.push(JSON.stringify(ht,ct)),ht=ht._prev;return"["+ft.join(", ")+"]"};function ut(ft){ft._prev._next=ft._next,ft._next._prev=ft._prev,delete ft._next,delete ft._prev}function ct(ft,pt){if(ft!=="_next"&&ft!=="_prev")return pt}},{}],6:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./util"),ct=nt("./graphlib").Graph;rt.exports={debugOrdering:ft};function ft(pt){var ht=ut.buildLayerMatrix(pt),mt=new ct({compound:!0,multigraph:!0}).setGraph({});return st.forEach(pt.nodes(),function(yt){mt.setNode(yt,{label:yt}),mt.setParent(yt,"layer"+pt.node(yt).rank)}),st.forEach(pt.edges(),function(yt){mt.setEdge(yt.v,yt.w,{},yt.name)}),st.forEach(ht,function(yt,vt){var Tt="layer"+vt;mt.setNode(Tt,{rank:"same"}),st.reduce(yt,function(Et,xt){return mt.setEdge(Et,xt,{style:"invis"}),xt})}),mt}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(nt,rt,ot){var st;if(typeof nt=="function")try{st=nt("graphlib")}catch{}st||(st=window.graphlib),rt.exports=st},{graphlib:31}],8:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./graphlib").Graph,ct=nt("./data/list");rt.exports=pt;var ft=st.constant(1);function pt(Tt,Et){if(Tt.nodeCount()<=1)return[];var xt=yt(Tt,Et||ft),At=ht(xt.graph,xt.buckets,xt.zeroIdx);return st.flatten(st.map(At,function(Ct){return Tt.outEdges(Ct.v,Ct.w)}),!0)}function ht(Tt,Et,xt){for(var At=[],Ct=Et[Et.length-1],$t=Et[0],Ot;Tt.nodeCount();){for(;Ot=$t.dequeue();)mt(Tt,Et,xt,Ot);for(;Ot=Ct.dequeue();)mt(Tt,Et,xt,Ot);if(Tt.nodeCount()){for(var Rt=Et.length-2;Rt>0;--Rt)if(Ot=Et[Rt].dequeue(),Ot){At=At.concat(mt(Tt,Et,xt,Ot,!0));break}}}return At}function mt(Tt,Et,xt,At,Ct){var $t=Ct?[]:void 0;return st.forEach(Tt.inEdges(At.v),function(Ot){var Rt=Tt.edge(Ot),It=Tt.node(Ot.v);Ct&&$t.push({v:Ot.v,w:Ot.w}),It.out-=Rt,vt(Et,xt,It)}),st.forEach(Tt.outEdges(At.v),function(Ot){var Rt=Tt.edge(Ot),It=Ot.w,kt=Tt.node(It);kt.in-=Rt,vt(Et,xt,kt)}),Tt.removeNode(At.v),$t}function yt(Tt,Et){var xt=new ut,At=0,Ct=0;st.forEach(Tt.nodes(),function(Rt){xt.setNode(Rt,{v:Rt,in:0,out:0})}),st.forEach(Tt.edges(),function(Rt){var It=xt.edge(Rt.v,Rt.w)||0,kt=Et(Rt),Mt=It+kt;xt.setEdge(Rt.v,Rt.w,Mt),Ct=Math.max(Ct,xt.node(Rt.v).out+=kt),At=Math.max(At,xt.node(Rt.w).in+=kt)});var $t=st.range(Ct+At+3).map(function(){return new ct}),Ot=At+1;return st.forEach(xt.nodes(),function(Rt){vt($t,Ot,xt.node(Rt))}),{graph:xt,buckets:$t,zeroIdx:Ot}}function vt(Tt,Et,xt){xt.out?xt.in?Tt[xt.out-xt.in+Et].enqueue(xt):Tt[Tt.length-1].enqueue(xt):Tt[0].enqueue(xt)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./acyclic"),ct=nt("./normalize"),ft=nt("./rank"),pt=nt("./util").normalizeRanks,ht=nt("./parent-dummy-chains"),mt=nt("./util").removeEmptyRanks,yt=nt("./nesting-graph"),vt=nt("./add-border-segments"),Tt=nt("./coordinate-system"),Et=nt("./order"),xt=nt("./position"),At=nt("./util"),Ct=nt("./graphlib").Graph;rt.exports=$t;function $t(zn,Qn){var Bn=Qn&&Qn.debugTiming?At.time:At.notime;Bn("layout",function(){var jn=Bn("  buildLayoutGraph",function(){return Xt(zn)});Bn("  runLayout",function(){Ot(jn,Bn)}),Bn("  updateInputGraph",function(){Rt(zn,jn)})})}function Ot(zn,Qn){Qn("    makeSpaceForEdgeLabels",function(){Jt(zn)}),Qn("    removeSelfEdges",function(){wn(zn)}),Qn("    acyclic",function(){ut.run(zn)}),Qn("    nestingGraph.run",function(){yt.run(zn)}),Qn("    rank",function(){ft(At.asNonCompoundGraph(zn))}),Qn("    injectEdgeLabelProxies",function(){gn(zn)}),Qn("    removeEmptyRanks",function(){mt(zn)}),Qn("    nestingGraph.cleanup",function(){yt.cleanup(zn)}),Qn("    normalizeRanks",function(){pt(zn)}),Qn("    assignRankMinMax",function(){An(zn)}),Qn("    removeEdgeLabelProxies",function(){sn(zn)}),Qn("    normalize.run",function(){ct.run(zn)}),Qn("    parentDummyChains",function(){ht(zn)}),Qn("    addBorderSegments",function(){vt(zn)}),Qn("    order",function(){Et(zn)}),Qn("    insertSelfEdges",function(){Dn(zn)}),Qn("    adjustCoordinateSystem",function(){Tt.adjust(zn)}),Qn("    position",function(){xt(zn)}),Qn("    positionSelfEdges",function(){$n(zn)}),Qn("    removeBorderNodes",function(){Ln(zn)}),Qn("    normalize.undo",function(){ct.undo(zn)}),Qn("    fixupEdgeLabelCoords",function(){_n(zn)}),Qn("    undoCoordinateSystem",function(){Tt.undo(zn)}),Qn("    translateGraph",function(){Sn(zn)}),Qn("    assignNodeIntersects",function(){In(zn)}),Qn("    reversePoints",function(){En(zn)}),Qn("    acyclic.undo",function(){ut.undo(zn)})}function Rt(zn,Qn){st.forEach(zn.nodes(),function(Bn){var jn=zn.node(Bn),Ar=Qn.node(Bn);jn&&(jn.x=Ar.x,jn.y=Ar.y,Qn.children(Bn).length&&(jn.width=Ar.width,jn.height=Ar.height))}),st.forEach(zn.edges(),function(Bn){var jn=zn.edge(Bn),Ar=Qn.edge(Bn);jn.points=Ar.points,st.has(Ar,"x")&&(jn.x=Ar.x,jn.y=Ar.y)}),zn.graph().width=Qn.graph().width,zn.graph().height=Qn.graph().height}var It=["nodesep","edgesep","ranksep","marginx","marginy"],kt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Mt=["acyclicer","ranker","rankdir","align"],Ft=["width","height"],zt={width:0,height:0},Vt=["minlen","weight","width","height","labeloffset"],Zt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ut=["labelpos"];function Xt(zn){var Qn=new Ct({multigraph:!0,compound:!0}),Bn=Jn(zn.graph());return Qn.setGraph(st.merge({},kt,Gn(Bn,It),st.pick(Bn,Mt))),st.forEach(zn.nodes(),function(jn){var Ar=Jn(zn.node(jn));Qn.setNode(jn,st.defaults(Gn(Ar,Ft),zt)),Qn.setParent(jn,zn.parent(jn))}),st.forEach(zn.edges(),function(jn){var Ar=Jn(zn.edge(jn));Qn.setEdge(jn,st.merge({},Zt,Gn(Ar,Vt),st.pick(Ar,Ut)))}),Qn}function Jt(zn){var Qn=zn.graph();Qn.ranksep/=2,st.forEach(zn.edges(),function(Bn){var jn=zn.edge(Bn);jn.minlen*=2,jn.labelpos.toLowerCase()!=="c"&&(Qn.rankdir==="TB"||Qn.rankdir==="BT"?jn.width+=jn.labeloffset:jn.height+=jn.labeloffset)})}function gn(zn){st.forEach(zn.edges(),function(Qn){var Bn=zn.edge(Qn);if(Bn.width&&Bn.height){var jn=zn.node(Qn.v),Ar=zn.node(Qn.w),Er={rank:(Ar.rank-jn.rank)/2+jn.rank,e:Qn};At.addDummyNode(zn,"edge-proxy",Er,"_ep")}})}function An(zn){var Qn=0;st.forEach(zn.nodes(),function(Bn){var jn=zn.node(Bn);jn.borderTop&&(jn.minRank=zn.node(jn.borderTop).rank,jn.maxRank=zn.node(jn.borderBottom).rank,Qn=st.max(Qn,jn.maxRank))}),zn.graph().maxRank=Qn}function sn(zn){st.forEach(zn.nodes(),function(Qn){var Bn=zn.node(Qn);Bn.dummy==="edge-proxy"&&(zn.edge(Bn.e).labelRank=Bn.rank,zn.removeNode(Qn))})}function Sn(zn){var Qn=Number.POSITIVE_INFINITY,Bn=0,jn=Number.POSITIVE_INFINITY,Ar=0,Er=zn.graph(),Pr=Er.marginx||0,Nr=Er.marginy||0;function Ir(no){var ro=no.x,ao=no.y,Xr=no.width,Jr=no.height;Qn=Math.min(Qn,ro-Xr/2),Bn=Math.max(Bn,ro+Xr/2),jn=Math.min(jn,ao-Jr/2),Ar=Math.max(Ar,ao+Jr/2)}st.forEach(zn.nodes(),function(no){Ir(zn.node(no))}),st.forEach(zn.edges(),function(no){var ro=zn.edge(no);st.has(ro,"x")&&Ir(ro)}),Qn-=Pr,jn-=Nr,st.forEach(zn.nodes(),function(no){var ro=zn.node(no);ro.x-=Qn,ro.y-=jn}),st.forEach(zn.edges(),function(no){var ro=zn.edge(no);st.forEach(ro.points,function(ao){ao.x-=Qn,ao.y-=jn}),st.has(ro,"x")&&(ro.x-=Qn),st.has(ro,"y")&&(ro.y-=jn)}),Er.width=Bn-Qn+Pr,Er.height=Ar-jn+Nr}function In(zn){st.forEach(zn.edges(),function(Qn){var Bn=zn.edge(Qn),jn=zn.node(Qn.v),Ar=zn.node(Qn.w),Er,Pr;Bn.points?(Er=Bn.points[0],Pr=Bn.points[Bn.points.length-1]):(Bn.points=[],Er=Ar,Pr=jn),Bn.points.unshift(At.intersectRect(jn,Er)),Bn.points.push(At.intersectRect(Ar,Pr))})}function _n(zn){st.forEach(zn.edges(),function(Qn){var Bn=zn.edge(Qn);if(st.has(Bn,"x"))switch((Bn.labelpos==="l"||Bn.labelpos==="r")&&(Bn.width-=Bn.labeloffset),Bn.labelpos){case"l":Bn.x-=Bn.width/2+Bn.labeloffset;break;case"r":Bn.x+=Bn.width/2+Bn.labeloffset;break}})}function En(zn){st.forEach(zn.edges(),function(Qn){var Bn=zn.edge(Qn);Bn.reversed&&Bn.points.reverse()})}function Ln(zn){st.forEach(zn.nodes(),function(Qn){if(zn.children(Qn).length){var Bn=zn.node(Qn),jn=zn.node(Bn.borderTop),Ar=zn.node(Bn.borderBottom),Er=zn.node(st.last(Bn.borderLeft)),Pr=zn.node(st.last(Bn.borderRight));Bn.width=Math.abs(Pr.x-Er.x),Bn.height=Math.abs(Ar.y-jn.y),Bn.x=Er.x+Bn.width/2,Bn.y=jn.y+Bn.height/2}}),st.forEach(zn.nodes(),function(Qn){zn.node(Qn).dummy==="border"&&zn.removeNode(Qn)})}function wn(zn){st.forEach(zn.edges(),function(Qn){if(Qn.v===Qn.w){var Bn=zn.node(Qn.v);Bn.selfEdges||(Bn.selfEdges=[]),Bn.selfEdges.push({e:Qn,label:zn.edge(Qn)}),zn.removeEdge(Qn)}})}function Dn(zn){var Qn=At.buildLayerMatrix(zn);st.forEach(Qn,function(Bn){var jn=0;st.forEach(Bn,function(Ar,Er){var Pr=zn.node(Ar);Pr.order=Er+jn,st.forEach(Pr.selfEdges,function(Nr){At.addDummyNode(zn,"selfedge",{width:Nr.label.width,height:Nr.label.height,rank:Pr.rank,order:Er+ ++jn,e:Nr.e,label:Nr.label},"_se")}),delete Pr.selfEdges})})}function $n(zn){st.forEach(zn.nodes(),function(Qn){var Bn=zn.node(Qn);if(Bn.dummy==="selfedge"){var jn=zn.node(Bn.e.v),Ar=jn.x+jn.width/2,Er=jn.y,Pr=Bn.x-Ar,Nr=jn.height/2;zn.setEdge(Bn.e,Bn.label),zn.removeNode(Qn),Bn.label.points=[{x:Ar+2*Pr/3,y:Er-Nr},{x:Ar+5*Pr/6,y:Er-Nr},{x:Ar+Pr,y:Er},{x:Ar+5*Pr/6,y:Er+Nr},{x:Ar+2*Pr/3,y:Er+Nr}],Bn.label.x=Bn.x,Bn.label.y=Bn.y}})}function Gn(zn,Qn){return st.mapValues(st.pick(zn,Qn),Number)}function Jn(zn){var Qn={};return st.forEach(zn,function(Bn,jn){Qn[jn.toLowerCase()]=Bn}),Qn}},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(nt,rt,ot){var st;if(typeof nt=="function")try{st={cloneDeep:nt("lodash/cloneDeep"),constant:nt("lodash/constant"),defaults:nt("lodash/defaults"),each:nt("lodash/each"),filter:nt("lodash/filter"),find:nt("lodash/find"),flatten:nt("lodash/flatten"),forEach:nt("lodash/forEach"),forIn:nt("lodash/forIn"),has:nt("lodash/has"),isUndefined:nt("lodash/isUndefined"),last:nt("lodash/last"),map:nt("lodash/map"),mapValues:nt("lodash/mapValues"),max:nt("lodash/max"),merge:nt("lodash/merge"),min:nt("lodash/min"),minBy:nt("lodash/minBy"),now:nt("lodash/now"),pick:nt("lodash/pick"),range:nt("lodash/range"),reduce:nt("lodash/reduce"),sortBy:nt("lodash/sortBy"),uniqueId:nt("lodash/uniqueId"),values:nt("lodash/values"),zipObject:nt("lodash/zipObject")}}catch{}st||(st=window._),rt.exports=st},{"lodash/cloneDeep":227,"lodash/constant":228,"lodash/defaults":229,"lodash/each":230,"lodash/filter":232,"lodash/find":233,"lodash/flatten":235,"lodash/forEach":236,"lodash/forIn":237,"lodash/has":239,"lodash/isUndefined":258,"lodash/last":261,"lodash/map":262,"lodash/mapValues":263,"lodash/max":264,"lodash/merge":266,"lodash/min":267,"lodash/minBy":268,"lodash/now":270,"lodash/pick":271,"lodash/range":273,"lodash/reduce":274,"lodash/sortBy":276,"lodash/uniqueId":286,"lodash/values":287,"lodash/zipObject":288}],11:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./util");rt.exports={run:ct,cleanup:mt};function ct(yt){var vt=ut.addDummyNode(yt,"root",{},"_root"),Tt=pt(yt),Et=st.max(st.values(Tt))-1,xt=2*Et+1;yt.graph().nestingRoot=vt,st.forEach(yt.edges(),function(Ct){yt.edge(Ct).minlen*=xt});var At=ht(yt)+1;st.forEach(yt.children(),function(Ct){ft(yt,vt,xt,At,Et,Tt,Ct)}),yt.graph().nodeRankFactor=xt}function ft(yt,vt,Tt,Et,xt,At,Ct){var $t=yt.children(Ct);if(!$t.length){Ct!==vt&&yt.setEdge(vt,Ct,{weight:0,minlen:Tt});return}var Ot=ut.addBorderNode(yt,"_bt"),Rt=ut.addBorderNode(yt,"_bb"),It=yt.node(Ct);yt.setParent(Ot,Ct),It.borderTop=Ot,yt.setParent(Rt,Ct),It.borderBottom=Rt,st.forEach($t,function(kt){ft(yt,vt,Tt,Et,xt,At,kt);var Mt=yt.node(kt),Ft=Mt.borderTop?Mt.borderTop:kt,zt=Mt.borderBottom?Mt.borderBottom:kt,Vt=Mt.borderTop?Et:2*Et,Zt=Ft!==zt?1:xt-At[Ct]+1;yt.setEdge(Ot,Ft,{weight:Vt,minlen:Zt,nestingEdge:!0}),yt.setEdge(zt,Rt,{weight:Vt,minlen:Zt,nestingEdge:!0})}),yt.parent(Ct)||yt.setEdge(vt,Ot,{weight:0,minlen:xt+At[Ct]})}function pt(yt){var vt={};function Tt(Et,xt){var At=yt.children(Et);At&&At.length&&st.forEach(At,function(Ct){Tt(Ct,xt+1)}),vt[Et]=xt}return st.forEach(yt.children(),function(Et){Tt(Et,1)}),vt}function ht(yt){return st.reduce(yt.edges(),function(vt,Tt){return vt+yt.edge(Tt).weight},0)}function mt(yt){var vt=yt.graph();yt.removeNode(vt.nestingRoot),delete vt.nestingRoot,st.forEach(yt.edges(),function(Tt){var Et=yt.edge(Tt);Et.nestingEdge&&yt.removeEdge(Tt)})}},{"./lodash":10,"./util":29}],12:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./util");rt.exports={run:ct,undo:pt};function ct(ht){ht.graph().dummyChains=[],st.forEach(ht.edges(),function(mt){ft(ht,mt)})}function ft(ht,mt){var yt=mt.v,vt=ht.node(yt).rank,Tt=mt.w,Et=ht.node(Tt).rank,xt=mt.name,At=ht.edge(mt),Ct=At.labelRank;if(Et!==vt+1){ht.removeEdge(mt);var $t,Ot,Rt;for(Rt=0,++vt;vt<Et;++Rt,++vt)At.points=[],Ot={width:0,height:0,edgeLabel:At,edgeObj:mt,rank:vt},$t=ut.addDummyNode(ht,"edge",Ot,"_d"),vt===Ct&&(Ot.width=At.width,Ot.height=At.height,Ot.dummy="edge-label",Ot.labelpos=At.labelpos),ht.setEdge(yt,$t,{weight:At.weight},xt),Rt===0&&ht.graph().dummyChains.push($t),yt=$t;ht.setEdge(yt,Tt,{weight:At.weight},xt)}}function pt(ht){st.forEach(ht.graph().dummyChains,function(mt){var yt=ht.node(mt),vt=yt.edgeLabel,Tt;for(ht.setEdge(yt.edgeObj,vt);yt.dummy;)Tt=ht.successors(mt)[0],ht.removeNode(mt),vt.points.push({x:yt.x,y:yt.y}),yt.dummy==="edge-label"&&(vt.x=yt.x,vt.y=yt.y,vt.width=yt.width,vt.height=yt.height),mt=Tt,yt=ht.node(mt)})}},{"./lodash":10,"./util":29}],13:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(ct,ft,pt){var ht={},mt;st.forEach(pt,function(yt){for(var vt=ct.parent(yt),Tt,Et;vt;){if(Tt=ct.parent(vt),Tt?(Et=ht[Tt],ht[Tt]=vt):(Et=mt,mt=vt),Et&&Et!==vt){ft.setEdge(Et,vt);return}vt=Tt}})}},{"../lodash":10}],14:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(ct,ft){return st.map(ft,function(pt){var ht=ct.inEdges(pt);if(ht.length){var mt=st.reduce(ht,function(yt,vt){var Tt=ct.edge(vt),Et=ct.node(vt.v);return{sum:yt.sum+Tt.weight*Et.order,weight:yt.weight+Tt.weight}},{sum:0,weight:0});return{v:pt,barycenter:mt.sum/mt.weight,weight:mt.weight}}else return{v:pt}})}},{"../lodash":10}],15:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("../graphlib").Graph;rt.exports=ct;function ct(pt,ht,mt){var yt=ft(pt),vt=new ut({compound:!0}).setGraph({root:yt}).setDefaultNodeLabel(function(Tt){return pt.node(Tt)});return st.forEach(pt.nodes(),function(Tt){var Et=pt.node(Tt),xt=pt.parent(Tt);(Et.rank===ht||Et.minRank<=ht&&ht<=Et.maxRank)&&(vt.setNode(Tt),vt.setParent(Tt,xt||yt),st.forEach(pt[mt](Tt),function(At){var Ct=At.v===Tt?At.w:At.v,$t=vt.edge(Ct,Tt),Ot=st.isUndefined($t)?0:$t.weight;vt.setEdge(Ct,Tt,{weight:pt.edge(At).weight+Ot})}),st.has(Et,"minRank")&&vt.setNode(Tt,{borderLeft:Et.borderLeft[ht],borderRight:Et.borderRight[ht]}))}),vt}function ft(pt){for(var ht;pt.hasNode(ht=st.uniqueId("_root")););return ht}},{"../graphlib":7,"../lodash":10}],16:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(ft,pt){for(var ht=0,mt=1;mt<pt.length;++mt)ht+=ct(ft,pt[mt-1],pt[mt]);return ht}function ct(ft,pt,ht){for(var mt=st.zipObject(ht,st.map(ht,function(At,Ct){return Ct})),yt=st.flatten(st.map(pt,function(At){return st.sortBy(st.map(ft.outEdges(At),function(Ct){return{pos:mt[Ct.w],weight:ft.edge(Ct).weight}}),"pos")}),!0),vt=1;vt<ht.length;)vt<<=1;var Tt=2*vt-1;vt-=1;var Et=st.map(new Array(Tt),function(){return 0}),xt=0;return st.forEach(yt.forEach(function(At){var Ct=At.pos+vt;Et[Ct]+=At.weight;for(var $t=0;Ct>0;)Ct%2&&($t+=Et[Ct+1]),Ct=Ct-1>>1,Et[Ct]+=At.weight;xt+=At.weight*$t})),xt}},{"../lodash":10}],17:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("./init-order"),ct=nt("./cross-count"),ft=nt("./sort-subgraph"),pt=nt("./build-layer-graph"),ht=nt("./add-subgraph-constraints"),mt=nt("../graphlib").Graph,yt=nt("../util");rt.exports=vt;function vt(At){var Ct=yt.maxRank(At),$t=Tt(At,st.range(1,Ct+1),"inEdges"),Ot=Tt(At,st.range(Ct-1,-1,-1),"outEdges"),Rt=ut(At);xt(At,Rt);for(var It=Number.POSITIVE_INFINITY,kt,Mt=0,Ft=0;Ft<4;++Mt,++Ft){Et(Mt%2?$t:Ot,Mt%4>=2),Rt=yt.buildLayerMatrix(At);var zt=ct(At,Rt);zt<It&&(Ft=0,kt=st.cloneDeep(Rt),It=zt)}xt(At,kt)}function Tt(At,Ct,$t){return st.map(Ct,function(Ot){return pt(At,Ot,$t)})}function Et(At,Ct){var $t=new mt;st.forEach(At,function(Ot){var Rt=Ot.graph().root,It=ft(Ot,Rt,$t,Ct);st.forEach(It.vs,function(kt,Mt){Ot.node(kt).order=Mt}),ht(Ot,$t,It.vs)})}function xt(At,Ct){st.forEach(Ct,function($t){st.forEach($t,function(Ot,Rt){At.node(Ot).order=Rt})})}},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(ct){var ft={},pt=st.filter(ct.nodes(),function(Tt){return!ct.children(Tt).length}),ht=st.max(st.map(pt,function(Tt){return ct.node(Tt).rank})),mt=st.map(st.range(ht+1),function(){return[]});function yt(Tt){if(!st.has(ft,Tt)){ft[Tt]=!0;var Et=ct.node(Tt);mt[Et.rank].push(Tt),st.forEach(ct.successors(Tt),yt)}}var vt=st.sortBy(pt,function(Tt){return ct.node(Tt).rank});return st.forEach(vt,yt),mt}},{"../lodash":10}],19:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(pt,ht){var mt={};st.forEach(pt,function(vt,Tt){var Et=mt[vt.v]={indegree:0,in:[],out:[],vs:[vt.v],i:Tt};st.isUndefined(vt.barycenter)||(Et.barycenter=vt.barycenter,Et.weight=vt.weight)}),st.forEach(ht.edges(),function(vt){var Tt=mt[vt.v],Et=mt[vt.w];!st.isUndefined(Tt)&&!st.isUndefined(Et)&&(Et.indegree++,Tt.out.push(mt[vt.w]))});var yt=st.filter(mt,function(vt){return!vt.indegree});return ct(yt)}function ct(pt){var ht=[];function mt(Tt){return function(Et){Et.merged||(st.isUndefined(Et.barycenter)||st.isUndefined(Tt.barycenter)||Et.barycenter>=Tt.barycenter)&&ft(Tt,Et)}}function yt(Tt){return function(Et){Et.in.push(Tt),--Et.indegree===0&&pt.push(Et)}}for(;pt.length;){var vt=pt.pop();ht.push(vt),st.forEach(vt.in.reverse(),mt(vt)),st.forEach(vt.out,yt(vt))}return st.map(st.filter(ht,function(Tt){return!Tt.merged}),function(Tt){return st.pick(Tt,["vs","i","barycenter","weight"])})}function ft(pt,ht){var mt=0,yt=0;pt.weight&&(mt+=pt.barycenter*pt.weight,yt+=pt.weight),ht.weight&&(mt+=ht.barycenter*ht.weight,yt+=ht.weight),pt.vs=ht.vs.concat(pt.vs),pt.barycenter=mt/yt,pt.weight=yt,pt.i=Math.min(ht.i,pt.i),ht.merged=!0}},{"../lodash":10}],20:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("./barycenter"),ct=nt("./resolve-conflicts"),ft=nt("./sort");rt.exports=pt;function pt(yt,vt,Tt,Et){var xt=yt.children(vt),At=yt.node(vt),Ct=At?At.borderLeft:void 0,$t=At?At.borderRight:void 0,Ot={};Ct&&(xt=st.filter(xt,function(zt){return zt!==Ct&&zt!==$t}));var Rt=ut(yt,xt);st.forEach(Rt,function(zt){if(yt.children(zt.v).length){var Vt=pt(yt,zt.v,Tt,Et);Ot[zt.v]=Vt,st.has(Vt,"barycenter")&&mt(zt,Vt)}});var It=ct(Rt,Tt);ht(It,Ot);var kt=ft(It,Et);if(Ct&&(kt.vs=st.flatten([Ct,kt.vs,$t],!0),yt.predecessors(Ct).length)){var Mt=yt.node(yt.predecessors(Ct)[0]),Ft=yt.node(yt.predecessors($t)[0]);st.has(kt,"barycenter")||(kt.barycenter=0,kt.weight=0),kt.barycenter=(kt.barycenter*kt.weight+Mt.order+Ft.order)/(kt.weight+2),kt.weight+=2}return kt}function ht(yt,vt){st.forEach(yt,function(Tt){Tt.vs=st.flatten(Tt.vs.map(function(Et){return vt[Et]?vt[Et].vs:Et}),!0)})}function mt(yt,vt){st.isUndefined(yt.barycenter)?(yt.barycenter=vt.barycenter,yt.weight=vt.weight):(yt.barycenter=(yt.barycenter*yt.weight+vt.barycenter*vt.weight)/(yt.weight+vt.weight),yt.weight+=vt.weight)}},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("../util");rt.exports=ct;function ct(ht,mt){var yt=ut.partition(ht,function(Ot){return st.has(Ot,"barycenter")}),vt=yt.lhs,Tt=st.sortBy(yt.rhs,function(Ot){return-Ot.i}),Et=[],xt=0,At=0,Ct=0;vt.sort(pt(!!mt)),Ct=ft(Et,Tt,Ct),st.forEach(vt,function(Ot){Ct+=Ot.vs.length,Et.push(Ot.vs),xt+=Ot.barycenter*Ot.weight,At+=Ot.weight,Ct=ft(Et,Tt,Ct)});var $t={vs:st.flatten(Et,!0)};return At&&($t.barycenter=xt/At,$t.weight=At),$t}function ft(ht,mt,yt){for(var vt;mt.length&&(vt=st.last(mt)).i<=yt;)mt.pop(),ht.push(vt.vs),yt++;return yt}function pt(ht){return function(mt,yt){return mt.barycenter<yt.barycenter?-1:mt.barycenter>yt.barycenter?1:ht?yt.i-mt.i:mt.i-yt.i}}},{"../lodash":10,"../util":29}],22:[function(nt,rt,ot){var st=nt("./lodash");rt.exports=ut;function ut(pt){var ht=ft(pt);st.forEach(pt.graph().dummyChains,function(mt){for(var yt=pt.node(mt),vt=yt.edgeObj,Tt=ct(pt,ht,vt.v,vt.w),Et=Tt.path,xt=Tt.lca,At=0,Ct=Et[At],$t=!0;mt!==vt.w;){if(yt=pt.node(mt),$t){for(;(Ct=Et[At])!==xt&&pt.node(Ct).maxRank<yt.rank;)At++;Ct===xt&&($t=!1)}if(!$t){for(;At<Et.length-1&&pt.node(Ct=Et[At+1]).minRank<=yt.rank;)At++;Ct=Et[At]}pt.setParent(mt,Ct),mt=pt.successors(mt)[0]}})}function ct(pt,ht,mt,yt){var vt=[],Tt=[],Et=Math.min(ht[mt].low,ht[yt].low),xt=Math.max(ht[mt].lim,ht[yt].lim),At,Ct;At=mt;do At=pt.parent(At),vt.push(At);while(At&&(ht[At].low>Et||xt>ht[At].lim));for(Ct=At,At=yt;(At=pt.parent(At))!==Ct;)Tt.push(At);return{path:vt.concat(Tt.reverse()),lca:Ct}}function ft(pt){var ht={},mt=0;function yt(vt){var Tt=mt;st.forEach(pt.children(vt),yt),ht[vt]={low:Tt,lim:mt++}}return st.forEach(pt.children(),yt),ht}},{"./lodash":10}],23:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("../graphlib").Graph,ct=nt("../util");rt.exports={positionX:$t,findType1Conflicts:ft,findType2Conflicts:pt,addConflict:mt,hasConflict:yt,verticalAlignment:vt,horizontalCompaction:Tt,alignCoordinates:At,findSmallestWidthAlignment:xt,balance:Ct};function ft(It,kt){var Mt={};function Ft(zt,Vt){var Zt=0,Ut=0,Xt=zt.length,Jt=st.last(Vt);return st.forEach(Vt,function(gn,An){var sn=ht(It,gn),Sn=sn?It.node(sn).order:Xt;(sn||gn===Jt)&&(st.forEach(Vt.slice(Ut,An+1),function(In){st.forEach(It.predecessors(In),function(_n){var En=It.node(_n),Ln=En.order;(Ln<Zt||Sn<Ln)&&!(En.dummy&&It.node(In).dummy)&&mt(Mt,_n,In)})}),Ut=An+1,Zt=Sn)}),Vt}return st.reduce(kt,Ft),Mt}function pt(It,kt){var Mt={};function Ft(Vt,Zt,Ut,Xt,Jt){var gn;st.forEach(st.range(Zt,Ut),function(An){gn=Vt[An],It.node(gn).dummy&&st.forEach(It.predecessors(gn),function(sn){var Sn=It.node(sn);Sn.dummy&&(Sn.order<Xt||Sn.order>Jt)&&mt(Mt,sn,gn)})})}function zt(Vt,Zt){var Ut=-1,Xt,Jt=0;return st.forEach(Zt,function(gn,An){if(It.node(gn).dummy==="border"){var sn=It.predecessors(gn);sn.length&&(Xt=It.node(sn[0]).order,Ft(Zt,Jt,An,Ut,Xt),Jt=An,Ut=Xt)}Ft(Zt,Jt,Zt.length,Xt,Vt.length)}),Zt}return st.reduce(kt,zt),Mt}function ht(It,kt){if(It.node(kt).dummy)return st.find(It.predecessors(kt),function(Mt){return It.node(Mt).dummy})}function mt(It,kt,Mt){if(kt>Mt){var Ft=kt;kt=Mt,Mt=Ft}var zt=It[kt];zt||(It[kt]=zt={}),zt[Mt]=!0}function yt(It,kt,Mt){if(kt>Mt){var Ft=kt;kt=Mt,Mt=Ft}return st.has(It[kt],Mt)}function vt(It,kt,Mt,Ft){var zt={},Vt={},Zt={};return st.forEach(kt,function(Ut){st.forEach(Ut,function(Xt,Jt){zt[Xt]=Xt,Vt[Xt]=Xt,Zt[Xt]=Jt})}),st.forEach(kt,function(Ut){var Xt=-1;st.forEach(Ut,function(Jt){var gn=Ft(Jt);if(gn.length){gn=st.sortBy(gn,function(_n){return Zt[_n]});for(var An=(gn.length-1)/2,sn=Math.floor(An),Sn=Math.ceil(An);sn<=Sn;++sn){var In=gn[sn];Vt[Jt]===Jt&&Xt<Zt[In]&&!yt(Mt,Jt,In)&&(Vt[In]=Jt,Vt[Jt]=zt[Jt]=zt[In],Xt=Zt[In])}}})}),{root:zt,align:Vt}}function Tt(It,kt,Mt,Ft,zt){var Vt={},Zt=Et(It,kt,Mt,zt),Ut=zt?"borderLeft":"borderRight";function Xt(An,sn){for(var Sn=Zt.nodes(),In=Sn.pop(),_n={};In;)_n[In]?An(In):(_n[In]=!0,Sn.push(In),Sn=Sn.concat(sn(In))),In=Sn.pop()}function Jt(An){Vt[An]=Zt.inEdges(An).reduce(function(sn,Sn){return Math.max(sn,Vt[Sn.v]+Zt.edge(Sn))},0)}function gn(An){var sn=Zt.outEdges(An).reduce(function(In,_n){return Math.min(In,Vt[_n.w]-Zt.edge(_n))},Number.POSITIVE_INFINITY),Sn=It.node(An);sn!==Number.POSITIVE_INFINITY&&Sn.borderType!==Ut&&(Vt[An]=Math.max(Vt[An],sn))}return Xt(Jt,Zt.predecessors.bind(Zt)),Xt(gn,Zt.successors.bind(Zt)),st.forEach(Ft,function(An){Vt[An]=Vt[Mt[An]]}),Vt}function Et(It,kt,Mt,Ft){var zt=new ut,Vt=It.graph(),Zt=Ot(Vt.nodesep,Vt.edgesep,Ft);return st.forEach(kt,function(Ut){var Xt;st.forEach(Ut,function(Jt){var gn=Mt[Jt];if(zt.setNode(gn),Xt){var An=Mt[Xt],sn=zt.edge(An,gn);zt.setEdge(An,gn,Math.max(Zt(It,Jt,Xt),sn||0))}Xt=Jt})}),zt}function xt(It,kt){return st.minBy(st.values(kt),function(Mt){var Ft=Number.NEGATIVE_INFINITY,zt=Number.POSITIVE_INFINITY;return st.forIn(Mt,function(Vt,Zt){var Ut=Rt(It,Zt)/2;Ft=Math.max(Vt+Ut,Ft),zt=Math.min(Vt-Ut,zt)}),Ft-zt})}function At(It,kt){var Mt=st.values(kt),Ft=st.min(Mt),zt=st.max(Mt);st.forEach(["u","d"],function(Vt){st.forEach(["l","r"],function(Zt){var Ut=Vt+Zt,Xt=It[Ut],Jt;if(Xt!==kt){var gn=st.values(Xt);Jt=Zt==="l"?Ft-st.min(gn):zt-st.max(gn),Jt&&(It[Ut]=st.mapValues(Xt,function(An){return An+Jt}))}})})}function Ct(It,kt){return st.mapValues(It.ul,function(Mt,Ft){if(kt)return It[kt.toLowerCase()][Ft];var zt=st.sortBy(st.map(It,Ft));return(zt[1]+zt[2])/2})}function $t(It){var kt=ct.buildLayerMatrix(It),Mt=st.merge(ft(It,kt),pt(It,kt)),Ft={},zt;st.forEach(["u","d"],function(Zt){zt=Zt==="u"?kt:st.values(kt).reverse(),st.forEach(["l","r"],function(Ut){Ut==="r"&&(zt=st.map(zt,function(An){return st.values(An).reverse()}));var Xt=(Zt==="u"?It.predecessors:It.successors).bind(It),Jt=vt(It,zt,Mt,Xt),gn=Tt(It,zt,Jt.root,Jt.align,Ut==="r");Ut==="r"&&(gn=st.mapValues(gn,function(An){return-An})),Ft[Zt+Ut]=gn})});var Vt=xt(It,Ft);return At(Ft,Vt),Ct(Ft,It.graph().align)}function Ot(It,kt,Mt){return function(Ft,zt,Vt){var Zt=Ft.node(zt),Ut=Ft.node(Vt),Xt=0,Jt;if(Xt+=Zt.width/2,st.has(Zt,"labelpos"))switch(Zt.labelpos.toLowerCase()){case"l":Jt=-Zt.width/2;break;case"r":Jt=Zt.width/2;break}if(Jt&&(Xt+=Mt?Jt:-Jt),Jt=0,Xt+=(Zt.dummy?kt:It)/2,Xt+=(Ut.dummy?kt:It)/2,Xt+=Ut.width/2,st.has(Ut,"labelpos"))switch(Ut.labelpos.toLowerCase()){case"l":Jt=Ut.width/2;break;case"r":Jt=-Ut.width/2;break}return Jt&&(Xt+=Mt?Jt:-Jt),Jt=0,Xt}}function Rt(It,kt){return It.node(kt).width}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("../util"),ct=nt("./bk").positionX;rt.exports=ft;function ft(ht){ht=ut.asNonCompoundGraph(ht),pt(ht),st.forEach(ct(ht),function(mt,yt){ht.node(yt).x=mt})}function pt(ht){var mt=ut.buildLayerMatrix(ht),yt=ht.graph().ranksep,vt=0;st.forEach(mt,function(Tt){var Et=st.max(st.map(Tt,function(xt){return ht.node(xt).height}));st.forEach(Tt,function(xt){ht.node(xt).y=vt+Et/2}),vt+=Et+yt})}},{"../lodash":10,"../util":29,"./bk":23}],25:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("../graphlib").Graph,ct=nt("./util").slack;rt.exports=ft;function ft(yt){var vt=new ut({directed:!1}),Tt=yt.nodes()[0],Et=yt.nodeCount();vt.setNode(Tt,{});for(var xt,At;pt(vt,yt)<Et;)xt=ht(vt,yt),At=vt.hasNode(xt.v)?ct(yt,xt):-ct(yt,xt),mt(vt,yt,At);return vt}function pt(yt,vt){function Tt(Et){st.forEach(vt.nodeEdges(Et),function(xt){var At=xt.v,Ct=Et===At?xt.w:At;!yt.hasNode(Ct)&&!ct(vt,xt)&&(yt.setNode(Ct,{}),yt.setEdge(Et,Ct,{}),Tt(Ct))})}return st.forEach(yt.nodes(),Tt),yt.nodeCount()}function ht(yt,vt){return st.minBy(vt.edges(),function(Tt){if(yt.hasNode(Tt.v)!==yt.hasNode(Tt.w))return ct(vt,Tt)})}function mt(yt,vt,Tt){st.forEach(yt.nodes(),function(Et){vt.node(Et).rank+=Tt})}},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(nt,rt,ot){var st=nt("./util"),ut=st.longestPath,ct=nt("./feasible-tree"),ft=nt("./network-simplex");rt.exports=pt;function pt(vt){switch(vt.graph().ranker){case"network-simplex":yt(vt);break;case"tight-tree":mt(vt);break;case"longest-path":ht(vt);break;default:yt(vt)}}var ht=ut;function mt(vt){ut(vt),ct(vt)}function yt(vt){ft(vt)}},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("./feasible-tree"),ct=nt("./util").slack,ft=nt("./util").longestPath,pt=nt("../graphlib").alg.preorder,ht=nt("../graphlib").alg.postorder,mt=nt("../util").simplify;rt.exports=yt,yt.initLowLimValues=xt,yt.initCutValues=vt,yt.calcCutValue=Et,yt.leaveEdge=Ct,yt.enterEdge=$t,yt.exchangeEdges=Ot;function yt(Mt){Mt=mt(Mt),ft(Mt);var Ft=ut(Mt);xt(Ft),vt(Ft,Mt);for(var zt,Vt;zt=Ct(Ft);)Vt=$t(Ft,Mt,zt),Ot(Ft,Mt,zt,Vt)}function vt(Mt,Ft){var zt=ht(Mt,Mt.nodes());zt=zt.slice(0,zt.length-1),st.forEach(zt,function(Vt){Tt(Mt,Ft,Vt)})}function Tt(Mt,Ft,zt){var Vt=Mt.node(zt),Zt=Vt.parent;Mt.edge(zt,Zt).cutvalue=Et(Mt,Ft,zt)}function Et(Mt,Ft,zt){var Vt=Mt.node(zt),Zt=Vt.parent,Ut=!0,Xt=Ft.edge(zt,Zt),Jt=0;return Xt||(Ut=!1,Xt=Ft.edge(Zt,zt)),Jt=Xt.weight,st.forEach(Ft.nodeEdges(zt),function(gn){var An=gn.v===zt,sn=An?gn.w:gn.v;if(sn!==Zt){var Sn=An===Ut,In=Ft.edge(gn).weight;if(Jt+=Sn?In:-In,It(Mt,zt,sn)){var _n=Mt.edge(zt,sn).cutvalue;Jt+=Sn?-_n:_n}}}),Jt}function xt(Mt,Ft){arguments.length<2&&(Ft=Mt.nodes()[0]),At(Mt,{},1,Ft)}function At(Mt,Ft,zt,Vt,Zt){var Ut=zt,Xt=Mt.node(Vt);return Ft[Vt]=!0,st.forEach(Mt.neighbors(Vt),function(Jt){st.has(Ft,Jt)||(zt=At(Mt,Ft,zt,Jt,Vt))}),Xt.low=Ut,Xt.lim=zt++,Zt?Xt.parent=Zt:delete Xt.parent,zt}function Ct(Mt){return st.find(Mt.edges(),function(Ft){return Mt.edge(Ft).cutvalue<0})}function $t(Mt,Ft,zt){var Vt=zt.v,Zt=zt.w;Ft.hasEdge(Vt,Zt)||(Vt=zt.w,Zt=zt.v);var Ut=Mt.node(Vt),Xt=Mt.node(Zt),Jt=Ut,gn=!1;Ut.lim>Xt.lim&&(Jt=Xt,gn=!0);var An=st.filter(Ft.edges(),function(sn){return gn===kt(Mt,Mt.node(sn.v),Jt)&&gn!==kt(Mt,Mt.node(sn.w),Jt)});return st.minBy(An,function(sn){return ct(Ft,sn)})}function Ot(Mt,Ft,zt,Vt){var Zt=zt.v,Ut=zt.w;Mt.removeEdge(Zt,Ut),Mt.setEdge(Vt.v,Vt.w,{}),xt(Mt),vt(Mt,Ft),Rt(Mt,Ft)}function Rt(Mt,Ft){var zt=st.find(Mt.nodes(),function(Zt){return!Ft.node(Zt).parent}),Vt=pt(Mt,zt);Vt=Vt.slice(1),st.forEach(Vt,function(Zt){var Ut=Mt.node(Zt).parent,Xt=Ft.edge(Zt,Ut),Jt=!1;Xt||(Xt=Ft.edge(Ut,Zt),Jt=!0),Ft.node(Zt).rank=Ft.node(Ut).rank+(Jt?Xt.minlen:-Xt.minlen)})}function It(Mt,Ft,zt){return Mt.hasEdge(Ft,zt)}function kt(Mt,Ft,zt){return zt.low<=Ft.lim&&Ft.lim<=zt.lim}},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(nt,rt,ot){var st=nt("../lodash");rt.exports={longestPath:ut,slack:ct};function ut(ft){var pt={};function ht(mt){var yt=ft.node(mt);if(st.has(pt,mt))return yt.rank;pt[mt]=!0;var vt=st.min(st.map(ft.outEdges(mt),function(Tt){return ht(Tt.w)-ft.edge(Tt).minlen}));return(vt===Number.POSITIVE_INFINITY||vt===void 0||vt===null)&&(vt=0),yt.rank=vt}st.forEach(ft.sources(),ht)}function ct(ft,pt){return ft.node(pt.w).rank-ft.node(pt.v).rank-ft.edge(pt).minlen}},{"../lodash":10}],29:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./graphlib").Graph;rt.exports={addDummyNode:ct,simplify:ft,asNonCompoundGraph:pt,successorWeights:ht,predecessorWeights:mt,intersectRect:yt,buildLayerMatrix:vt,normalizeRanks:Tt,removeEmptyRanks:Et,addBorderNode:xt,maxRank:At,partition:Ct,time:$t,notime:Ot};function ct(Rt,It,kt,Mt){var Ft;do Ft=st.uniqueId(Mt);while(Rt.hasNode(Ft));return kt.dummy=It,Rt.setNode(Ft,kt),Ft}function ft(Rt){var It=new ut().setGraph(Rt.graph());return st.forEach(Rt.nodes(),function(kt){It.setNode(kt,Rt.node(kt))}),st.forEach(Rt.edges(),function(kt){var Mt=It.edge(kt.v,kt.w)||{weight:0,minlen:1},Ft=Rt.edge(kt);It.setEdge(kt.v,kt.w,{weight:Mt.weight+Ft.weight,minlen:Math.max(Mt.minlen,Ft.minlen)})}),It}function pt(Rt){var It=new ut({multigraph:Rt.isMultigraph()}).setGraph(Rt.graph());return st.forEach(Rt.nodes(),function(kt){Rt.children(kt).length||It.setNode(kt,Rt.node(kt))}),st.forEach(Rt.edges(),function(kt){It.setEdge(kt,Rt.edge(kt))}),It}function ht(Rt){var It=st.map(Rt.nodes(),function(kt){var Mt={};return st.forEach(Rt.outEdges(kt),function(Ft){Mt[Ft.w]=(Mt[Ft.w]||0)+Rt.edge(Ft).weight}),Mt});return st.zipObject(Rt.nodes(),It)}function mt(Rt){var It=st.map(Rt.nodes(),function(kt){var Mt={};return st.forEach(Rt.inEdges(kt),function(Ft){Mt[Ft.v]=(Mt[Ft.v]||0)+Rt.edge(Ft).weight}),Mt});return st.zipObject(Rt.nodes(),It)}function yt(Rt,It){var kt=Rt.x,Mt=Rt.y,Ft=It.x-kt,zt=It.y-Mt,Vt=Rt.width/2,Zt=Rt.height/2;if(!Ft&&!zt)throw new Error("Not possible to find intersection inside of the rectangle");var Ut,Xt;return Math.abs(zt)*Vt>Math.abs(Ft)*Zt?(zt<0&&(Zt=-Zt),Ut=Zt*Ft/zt,Xt=Zt):(Ft<0&&(Vt=-Vt),Ut=Vt,Xt=Vt*zt/Ft),{x:kt+Ut,y:Mt+Xt}}function vt(Rt){var It=st.map(st.range(At(Rt)+1),function(){return[]});return st.forEach(Rt.nodes(),function(kt){var Mt=Rt.node(kt),Ft=Mt.rank;st.isUndefined(Ft)||(It[Ft][Mt.order]=kt)}),It}function Tt(Rt){var It=st.min(st.map(Rt.nodes(),function(kt){return Rt.node(kt).rank}));st.forEach(Rt.nodes(),function(kt){var Mt=Rt.node(kt);st.has(Mt,"rank")&&(Mt.rank-=It)})}function Et(Rt){var It=st.min(st.map(Rt.nodes(),function(zt){return Rt.node(zt).rank})),kt=[];st.forEach(Rt.nodes(),function(zt){var Vt=Rt.node(zt).rank-It;kt[Vt]||(kt[Vt]=[]),kt[Vt].push(zt)});var Mt=0,Ft=Rt.graph().nodeRankFactor;st.forEach(kt,function(zt,Vt){st.isUndefined(zt)&&Vt%Ft!==0?--Mt:Mt&&st.forEach(zt,function(Zt){Rt.node(Zt).rank+=Mt})})}function xt(Rt,It,kt,Mt){var Ft={width:0,height:0};return arguments.length>=4&&(Ft.rank=kt,Ft.order=Mt),ct(Rt,"border",Ft,It)}function At(Rt){return st.max(st.map(Rt.nodes(),function(It){var kt=Rt.node(It).rank;if(!st.isUndefined(kt))return kt}))}function Ct(Rt,It){var kt={lhs:[],rhs:[]};return st.forEach(Rt,function(Mt){It(Mt)?kt.lhs.push(Mt):kt.rhs.push(Mt)}),kt}function $t(Rt,It){var kt=st.now();try{return It()}finally{console.log(Rt+" time: "+(st.now()-kt)+"ms")}}function Ot(Rt,It){return It()}},{"./graphlib":7,"./lodash":10}],30:[function(nt,rt,ot){rt.exports="0.8.5"},{}],31:[function(nt,rt,ot){var st=nt("./lib");rt.exports={Graph:st.Graph,json:nt("./lib/json"),alg:nt("./lib/alg"),version:st.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(ct){var ft={},pt=[],ht;function mt(yt){st.has(ft,yt)||(ft[yt]=!0,ht.push(yt),st.each(ct.successors(yt),mt),st.each(ct.predecessors(yt),mt))}return st.each(ct.nodes(),function(yt){ht=[],mt(yt),ht.length&&pt.push(ht)}),pt}},{"../lodash":49}],33:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(ft,pt,ht){st.isArray(pt)||(pt=[pt]);var mt=(ft.isDirected()?ft.successors:ft.neighbors).bind(ft),yt=[],vt={};return st.each(pt,function(Tt){if(!ft.hasNode(Tt))throw new Error("Graph does not have node: "+Tt);ct(ft,Tt,ht==="post",vt,mt,yt)}),yt}function ct(ft,pt,ht,mt,yt,vt){st.has(mt,pt)||(mt[pt]=!0,ht||vt.push(pt),st.each(yt(pt),function(Tt){ct(ft,Tt,ht,mt,yt,vt)}),ht&&vt.push(pt))}},{"../lodash":49}],34:[function(nt,rt,ot){var st=nt("./dijkstra"),ut=nt("../lodash");rt.exports=ct;function ct(ft,pt,ht){return ut.transform(ft.nodes(),function(mt,yt){mt[yt]=st(ft,yt,pt,ht)},{})}},{"../lodash":49,"./dijkstra":35}],35:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("../data/priority-queue");rt.exports=ft;var ct=st.constant(1);function ft(ht,mt,yt,vt){return pt(ht,String(mt),yt||ct,vt||function(Tt){return ht.outEdges(Tt)})}function pt(ht,mt,yt,vt){var Tt={},Et=new ut,xt,At,Ct=function($t){var Ot=$t.v!==xt?$t.v:$t.w,Rt=Tt[Ot],It=yt($t),kt=At.distance+It;if(It<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+$t+" Weight: "+It);kt<Rt.distance&&(Rt.distance=kt,Rt.predecessor=xt,Et.decrease(Ot,kt))};for(ht.nodes().forEach(function($t){var Ot=$t===mt?0:Number.POSITIVE_INFINITY;Tt[$t]={distance:Ot},Et.add($t,Ot)});Et.size()>0&&(xt=Et.removeMin(),At=Tt[xt],At.distance!==Number.POSITIVE_INFINITY);)vt(xt).forEach(Ct);return Tt}},{"../data/priority-queue":45,"../lodash":49}],36:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("./tarjan");rt.exports=ct;function ct(ft){return st.filter(ut(ft),function(pt){return pt.length>1||pt.length===1&&ft.hasEdge(pt[0],pt[0])})}},{"../lodash":49,"./tarjan":43}],37:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ct;var ut=st.constant(1);function ct(pt,ht,mt){return ft(pt,ht||ut,mt||function(yt){return pt.outEdges(yt)})}function ft(pt,ht,mt){var yt={},vt=pt.nodes();return vt.forEach(function(Tt){yt[Tt]={},yt[Tt][Tt]={distance:0},vt.forEach(function(Et){Tt!==Et&&(yt[Tt][Et]={distance:Number.POSITIVE_INFINITY})}),mt(Tt).forEach(function(Et){var xt=Et.v===Tt?Et.w:Et.v,At=ht(Et);yt[Tt][xt]={distance:At,predecessor:Tt}})}),vt.forEach(function(Tt){var Et=yt[Tt];vt.forEach(function(xt){var At=yt[xt];vt.forEach(function(Ct){var $t=At[Tt],Ot=Et[Ct],Rt=At[Ct],It=$t.distance+Ot.distance;It<Rt.distance&&(Rt.distance=It,Rt.predecessor=Ot.predecessor)})})}),yt}},{"../lodash":49}],38:[function(nt,rt,ot){rt.exports={components:nt("./components"),dijkstra:nt("./dijkstra"),dijkstraAll:nt("./dijkstra-all"),findCycles:nt("./find-cycles"),floydWarshall:nt("./floyd-warshall"),isAcyclic:nt("./is-acyclic"),postorder:nt("./postorder"),preorder:nt("./preorder"),prim:nt("./prim"),tarjan:nt("./tarjan"),topsort:nt("./topsort")}},{"./components":32,"./dijkstra":35,"./dijkstra-all":34,"./find-cycles":36,"./floyd-warshall":37,"./is-acyclic":39,"./postorder":40,"./preorder":41,"./prim":42,"./tarjan":43,"./topsort":44}],39:[function(nt,rt,ot){var st=nt("./topsort");rt.exports=ut;function ut(ct){try{st(ct)}catch(ft){if(ft instanceof st.CycleException)return!1;throw ft}return!0}},{"./topsort":44}],40:[function(nt,rt,ot){var st=nt("./dfs");rt.exports=ut;function ut(ct,ft){return st(ct,ft,"post")}},{"./dfs":33}],41:[function(nt,rt,ot){var st=nt("./dfs");rt.exports=ut;function ut(ct,ft){return st(ct,ft,"pre")}},{"./dfs":33}],42:[function(nt,rt,ot){var st=nt("../lodash"),ut=nt("../graph"),ct=nt("../data/priority-queue");rt.exports=ft;function ft(pt,ht){var mt=new ut,yt={},vt=new ct,Tt;function Et(At){var Ct=At.v===Tt?At.w:At.v,$t=vt.priority(Ct);if($t!==void 0){var Ot=ht(At);Ot<$t&&(yt[Ct]=Tt,vt.decrease(Ct,Ot))}}if(pt.nodeCount()===0)return mt;st.each(pt.nodes(),function(At){vt.add(At,Number.POSITIVE_INFINITY),mt.setNode(At)}),vt.decrease(pt.nodes()[0],0);for(var xt=!1;vt.size()>0;){if(Tt=vt.removeMin(),st.has(yt,Tt))mt.setEdge(Tt,yt[Tt]);else{if(xt)throw new Error("Input graph is not connected: "+pt);xt=!0}pt.nodeEdges(Tt).forEach(Et)}return mt}},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(ct){var ft=0,pt=[],ht={},mt=[];function yt(vt){var Tt=ht[vt]={onStack:!0,lowlink:ft,index:ft++};if(pt.push(vt),ct.successors(vt).forEach(function(At){st.has(ht,At)?ht[At].onStack&&(Tt.lowlink=Math.min(Tt.lowlink,ht[At].index)):(yt(At),Tt.lowlink=Math.min(Tt.lowlink,ht[At].lowlink))}),Tt.lowlink===Tt.index){var Et=[],xt;do xt=pt.pop(),ht[xt].onStack=!1,Et.push(xt);while(vt!==xt);mt.push(Et)}}return ct.nodes().forEach(function(vt){st.has(ht,vt)||yt(vt)}),mt}},{"../lodash":49}],44:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut,ut.CycleException=ct;function ut(ft){var pt={},ht={},mt=[];function yt(vt){if(st.has(ht,vt))throw new ct;st.has(pt,vt)||(ht[vt]=!0,pt[vt]=!0,st.each(ft.predecessors(vt),yt),delete ht[vt],mt.push(vt))}if(st.each(ft.sinks(),yt),st.size(pt)!==ft.nodeCount())throw new ct;return mt}function ct(){}ct.prototype=new Error},{"../lodash":49}],45:[function(nt,rt,ot){var st=nt("../lodash");rt.exports=ut;function ut(){this._arr=[],this._keyIndices={}}ut.prototype.size=function(){return this._arr.length},ut.prototype.keys=function(){return this._arr.map(function(ct){return ct.key})},ut.prototype.has=function(ct){return st.has(this._keyIndices,ct)},ut.prototype.priority=function(ct){var ft=this._keyIndices[ct];if(ft!==void 0)return this._arr[ft].priority},ut.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},ut.prototype.add=function(ct,ft){var pt=this._keyIndices;if(ct=String(ct),!st.has(pt,ct)){var ht=this._arr,mt=ht.length;return pt[ct]=mt,ht.push({key:ct,priority:ft}),this._decrease(mt),!0}return!1},ut.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var ct=this._arr.pop();return delete this._keyIndices[ct.key],this._heapify(0),ct.key},ut.prototype.decrease=function(ct,ft){var pt=this._keyIndices[ct];if(ft>this._arr[pt].priority)throw new Error("New priority is greater than current priority. Key: "+ct+" Old: "+this._arr[pt].priority+" New: "+ft);this._arr[pt].priority=ft,this._decrease(pt)},ut.prototype._heapify=function(ct){var ft=this._arr,pt=2*ct,ht=pt+1,mt=ct;pt<ft.length&&(mt=ft[pt].priority<ft[mt].priority?pt:mt,ht<ft.length&&(mt=ft[ht].priority<ft[mt].priority?ht:mt),mt!==ct&&(this._swap(ct,mt),this._heapify(mt)))},ut.prototype._decrease=function(ct){for(var ft=this._arr,pt=ft[ct].priority,ht;ct!==0&&(ht=ct>>1,!(ft[ht].priority<pt));)this._swap(ct,ht),ct=ht},ut.prototype._swap=function(ct,ft){var pt=this._arr,ht=this._keyIndices,mt=pt[ct],yt=pt[ft];pt[ct]=yt,pt[ft]=mt,ht[yt.key]=ct,ht[mt.key]=ft}},{"../lodash":49}],46:[function(nt,rt,ot){var st=nt("./lodash");rt.exports=pt;var ut="\0",ct="\0",ft="";function pt(Et){this._isDirected=st.has(Et,"directed")?Et.directed:!0,this._isMultigraph=st.has(Et,"multigraph")?Et.multigraph:!1,this._isCompound=st.has(Et,"compound")?Et.compound:!1,this._label=void 0,this._defaultNodeLabelFn=st.constant(void 0),this._defaultEdgeLabelFn=st.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[ct]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}pt.prototype._nodeCount=0,pt.prototype._edgeCount=0,pt.prototype.isDirected=function(){return this._isDirected},pt.prototype.isMultigraph=function(){return this._isMultigraph},pt.prototype.isCompound=function(){return this._isCompound},pt.prototype.setGraph=function(Et){return this._label=Et,this},pt.prototype.graph=function(){return this._label},pt.prototype.setDefaultNodeLabel=function(Et){return st.isFunction(Et)||(Et=st.constant(Et)),this._defaultNodeLabelFn=Et,this},pt.prototype.nodeCount=function(){return this._nodeCount},pt.prototype.nodes=function(){return st.keys(this._nodes)},pt.prototype.sources=function(){var Et=this;return st.filter(this.nodes(),function(xt){return st.isEmpty(Et._in[xt])})},pt.prototype.sinks=function(){var Et=this;return st.filter(this.nodes(),function(xt){return st.isEmpty(Et._out[xt])})},pt.prototype.setNodes=function(Et,xt){var At=arguments,Ct=this;return st.each(Et,function($t){At.length>1?Ct.setNode($t,xt):Ct.setNode($t)}),this},pt.prototype.setNode=function(Et,xt){return st.has(this._nodes,Et)?(arguments.length>1&&(this._nodes[Et]=xt),this):(this._nodes[Et]=arguments.length>1?xt:this._defaultNodeLabelFn(Et),this._isCompound&&(this._parent[Et]=ct,this._children[Et]={},this._children[ct][Et]=!0),this._in[Et]={},this._preds[Et]={},this._out[Et]={},this._sucs[Et]={},++this._nodeCount,this)},pt.prototype.node=function(Et){return this._nodes[Et]},pt.prototype.hasNode=function(Et){return st.has(this._nodes,Et)},pt.prototype.removeNode=function(Et){var xt=this;if(st.has(this._nodes,Et)){var At=function(Ct){xt.removeEdge(xt._edgeObjs[Ct])};delete this._nodes[Et],this._isCompound&&(this._removeFromParentsChildList(Et),delete this._parent[Et],st.each(this.children(Et),function(Ct){xt.setParent(Ct)}),delete this._children[Et]),st.each(st.keys(this._in[Et]),At),delete this._in[Et],delete this._preds[Et],st.each(st.keys(this._out[Et]),At),delete this._out[Et],delete this._sucs[Et],--this._nodeCount}return this},pt.prototype.setParent=function(Et,xt){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(st.isUndefined(xt))xt=ct;else{xt+="";for(var At=xt;!st.isUndefined(At);At=this.parent(At))if(At===Et)throw new Error("Setting "+xt+" as parent of "+Et+" would create a cycle");this.setNode(xt)}return this.setNode(Et),this._removeFromParentsChildList(Et),this._parent[Et]=xt,this._children[xt][Et]=!0,this},pt.prototype._removeFromParentsChildList=function(Et){delete this._children[this._parent[Et]][Et]},pt.prototype.parent=function(Et){if(this._isCompound){var xt=this._parent[Et];if(xt!==ct)return xt}},pt.prototype.children=function(Et){if(st.isUndefined(Et)&&(Et=ct),this._isCompound){var xt=this._children[Et];if(xt)return st.keys(xt)}else{if(Et===ct)return this.nodes();if(this.hasNode(Et))return[]}},pt.prototype.predecessors=function(Et){var xt=this._preds[Et];if(xt)return st.keys(xt)},pt.prototype.successors=function(Et){var xt=this._sucs[Et];if(xt)return st.keys(xt)},pt.prototype.neighbors=function(Et){var xt=this.predecessors(Et);if(xt)return st.union(xt,this.successors(Et))},pt.prototype.isLeaf=function(Et){var xt;return this.isDirected()?xt=this.successors(Et):xt=this.neighbors(Et),xt.length===0},pt.prototype.filterNodes=function(Et){var xt=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});xt.setGraph(this.graph());var At=this;st.each(this._nodes,function(Ot,Rt){Et(Rt)&&xt.setNode(Rt,Ot)}),st.each(this._edgeObjs,function(Ot){xt.hasNode(Ot.v)&&xt.hasNode(Ot.w)&&xt.setEdge(Ot,At.edge(Ot))});var Ct={};function $t(Ot){var Rt=At.parent(Ot);return Rt===void 0||xt.hasNode(Rt)?(Ct[Ot]=Rt,Rt):Rt in Ct?Ct[Rt]:$t(Rt)}return this._isCompound&&st.each(xt.nodes(),function(Ot){xt.setParent(Ot,$t(Ot))}),xt},pt.prototype.setDefaultEdgeLabel=function(Et){return st.isFunction(Et)||(Et=st.constant(Et)),this._defaultEdgeLabelFn=Et,this},pt.prototype.edgeCount=function(){return this._edgeCount},pt.prototype.edges=function(){return st.values(this._edgeObjs)},pt.prototype.setPath=function(Et,xt){var At=this,Ct=arguments;return st.reduce(Et,function($t,Ot){return Ct.length>1?At.setEdge($t,Ot,xt):At.setEdge($t,Ot),Ot}),this},pt.prototype.setEdge=function(){var Et,xt,At,Ct,$t=!1,Ot=arguments[0];typeof Ot=="object"&&Ot!==null&&"v"in Ot?(Et=Ot.v,xt=Ot.w,At=Ot.name,arguments.length===2&&(Ct=arguments[1],$t=!0)):(Et=Ot,xt=arguments[1],At=arguments[3],arguments.length>2&&(Ct=arguments[2],$t=!0)),Et=""+Et,xt=""+xt,st.isUndefined(At)||(At=""+At);var Rt=yt(this._isDirected,Et,xt,At);if(st.has(this._edgeLabels,Rt))return $t&&(this._edgeLabels[Rt]=Ct),this;if(!st.isUndefined(At)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(Et),this.setNode(xt),this._edgeLabels[Rt]=$t?Ct:this._defaultEdgeLabelFn(Et,xt,At);var It=vt(this._isDirected,Et,xt,At);return Et=It.v,xt=It.w,Object.freeze(It),this._edgeObjs[Rt]=It,ht(this._preds[xt],Et),ht(this._sucs[Et],xt),this._in[xt][Rt]=It,this._out[Et][Rt]=It,this._edgeCount++,this},pt.prototype.edge=function(Et,xt,At){var Ct=arguments.length===1?Tt(this._isDirected,arguments[0]):yt(this._isDirected,Et,xt,At);return this._edgeLabels[Ct]},pt.prototype.hasEdge=function(Et,xt,At){var Ct=arguments.length===1?Tt(this._isDirected,arguments[0]):yt(this._isDirected,Et,xt,At);return st.has(this._edgeLabels,Ct)},pt.prototype.removeEdge=function(Et,xt,At){var Ct=arguments.length===1?Tt(this._isDirected,arguments[0]):yt(this._isDirected,Et,xt,At),$t=this._edgeObjs[Ct];return $t&&(Et=$t.v,xt=$t.w,delete this._edgeLabels[Ct],delete this._edgeObjs[Ct],mt(this._preds[xt],Et),mt(this._sucs[Et],xt),delete this._in[xt][Ct],delete this._out[Et][Ct],this._edgeCount--),this},pt.prototype.inEdges=function(Et,xt){var At=this._in[Et];if(At){var Ct=st.values(At);return xt?st.filter(Ct,function($t){return $t.v===xt}):Ct}},pt.prototype.outEdges=function(Et,xt){var At=this._out[Et];if(At){var Ct=st.values(At);return xt?st.filter(Ct,function($t){return $t.w===xt}):Ct}},pt.prototype.nodeEdges=function(Et,xt){var At=this.inEdges(Et,xt);if(At)return At.concat(this.outEdges(Et,xt))};function ht(Et,xt){Et[xt]?Et[xt]++:Et[xt]=1}function mt(Et,xt){--Et[xt]||delete Et[xt]}function yt(Et,xt,At,Ct){var $t=""+xt,Ot=""+At;if(!Et&&$t>Ot){var Rt=$t;$t=Ot,Ot=Rt}return $t+ft+Ot+ft+(st.isUndefined(Ct)?ut:Ct)}function vt(Et,xt,At,Ct){var $t=""+xt,Ot=""+At;if(!Et&&$t>Ot){var Rt=$t;$t=Ot,Ot=Rt}var It={v:$t,w:Ot};return Ct&&(It.name=Ct),It}function Tt(Et,xt){return yt(Et,xt.v,xt.w,xt.name)}},{"./lodash":49}],47:[function(nt,rt,ot){rt.exports={Graph:nt("./graph"),version:nt("./version")}},{"./graph":46,"./version":50}],48:[function(nt,rt,ot){var st=nt("./lodash"),ut=nt("./graph");rt.exports={write:ct,read:ht};function ct(mt){var yt={options:{directed:mt.isDirected(),multigraph:mt.isMultigraph(),compound:mt.isCompound()},nodes:ft(mt),edges:pt(mt)};return st.isUndefined(mt.graph())||(yt.value=st.clone(mt.graph())),yt}function ft(mt){return st.map(mt.nodes(),function(yt){var vt=mt.node(yt),Tt=mt.parent(yt),Et={v:yt};return st.isUndefined(vt)||(Et.value=vt),st.isUndefined(Tt)||(Et.parent=Tt),Et})}function pt(mt){return st.map(mt.edges(),function(yt){var vt=mt.edge(yt),Tt={v:yt.v,w:yt.w};return st.isUndefined(yt.name)||(Tt.name=yt.name),st.isUndefined(vt)||(Tt.value=vt),Tt})}function ht(mt){var yt=new ut(mt.options).setGraph(mt.value);return st.each(mt.nodes,function(vt){yt.setNode(vt.v,vt.value),vt.parent&&yt.setParent(vt.v,vt.parent)}),st.each(mt.edges,function(vt){yt.setEdge({v:vt.v,w:vt.w,name:vt.name},vt.value)}),yt}},{"./graph":46,"./lodash":49}],49:[function(nt,rt,ot){var st;if(typeof nt=="function")try{st={clone:nt("lodash/clone"),constant:nt("lodash/constant"),each:nt("lodash/each"),filter:nt("lodash/filter"),has:nt("lodash/has"),isArray:nt("lodash/isArray"),isEmpty:nt("lodash/isEmpty"),isFunction:nt("lodash/isFunction"),isUndefined:nt("lodash/isUndefined"),keys:nt("lodash/keys"),map:nt("lodash/map"),reduce:nt("lodash/reduce"),size:nt("lodash/size"),transform:nt("lodash/transform"),union:nt("lodash/union"),values:nt("lodash/values")}}catch{}st||(st=window._),rt.exports=st},{"lodash/clone":226,"lodash/constant":228,"lodash/each":230,"lodash/filter":232,"lodash/has":239,"lodash/isArray":243,"lodash/isEmpty":247,"lodash/isFunction":248,"lodash/isUndefined":258,"lodash/keys":259,"lodash/map":262,"lodash/reduce":274,"lodash/size":275,"lodash/transform":284,"lodash/union":285,"lodash/values":287}],50:[function(nt,rt,ot){rt.exports="2.1.8"},{}],51:[function(nt,rt,ot){var st=nt("./_getNative"),ut=nt("./_root"),ct=st(ut,"DataView");rt.exports=ct},{"./_getNative":163,"./_root":208}],52:[function(nt,rt,ot){var st=nt("./_hashClear"),ut=nt("./_hashDelete"),ct=nt("./_hashGet"),ft=nt("./_hashHas"),pt=nt("./_hashSet");function ht(mt){var yt=-1,vt=mt==null?0:mt.length;for(this.clear();++yt<vt;){var Tt=mt[yt];this.set(Tt[0],Tt[1])}}ht.prototype.clear=st,ht.prototype.delete=ut,ht.prototype.get=ct,ht.prototype.has=ft,ht.prototype.set=pt,rt.exports=ht},{"./_hashClear":172,"./_hashDelete":173,"./_hashGet":174,"./_hashHas":175,"./_hashSet":176}],53:[function(nt,rt,ot){var st=nt("./_listCacheClear"),ut=nt("./_listCacheDelete"),ct=nt("./_listCacheGet"),ft=nt("./_listCacheHas"),pt=nt("./_listCacheSet");function ht(mt){var yt=-1,vt=mt==null?0:mt.length;for(this.clear();++yt<vt;){var Tt=mt[yt];this.set(Tt[0],Tt[1])}}ht.prototype.clear=st,ht.prototype.delete=ut,ht.prototype.get=ct,ht.prototype.has=ft,ht.prototype.set=pt,rt.exports=ht},{"./_listCacheClear":188,"./_listCacheDelete":189,"./_listCacheGet":190,"./_listCacheHas":191,"./_listCacheSet":192}],54:[function(nt,rt,ot){var st=nt("./_getNative"),ut=nt("./_root"),ct=st(ut,"Map");rt.exports=ct},{"./_getNative":163,"./_root":208}],55:[function(nt,rt,ot){var st=nt("./_mapCacheClear"),ut=nt("./_mapCacheDelete"),ct=nt("./_mapCacheGet"),ft=nt("./_mapCacheHas"),pt=nt("./_mapCacheSet");function ht(mt){var yt=-1,vt=mt==null?0:mt.length;for(this.clear();++yt<vt;){var Tt=mt[yt];this.set(Tt[0],Tt[1])}}ht.prototype.clear=st,ht.prototype.delete=ut,ht.prototype.get=ct,ht.prototype.has=ft,ht.prototype.set=pt,rt.exports=ht},{"./_mapCacheClear":193,"./_mapCacheDelete":194,"./_mapCacheGet":195,"./_mapCacheHas":196,"./_mapCacheSet":197}],56:[function(nt,rt,ot){var st=nt("./_getNative"),ut=nt("./_root"),ct=st(ut,"Promise");rt.exports=ct},{"./_getNative":163,"./_root":208}],57:[function(nt,rt,ot){var st=nt("./_getNative"),ut=nt("./_root"),ct=st(ut,"Set");rt.exports=ct},{"./_getNative":163,"./_root":208}],58:[function(nt,rt,ot){var st=nt("./_MapCache"),ut=nt("./_setCacheAdd"),ct=nt("./_setCacheHas");function ft(pt){var ht=-1,mt=pt==null?0:pt.length;for(this.__data__=new st;++ht<mt;)this.add(pt[ht])}ft.prototype.add=ft.prototype.push=ut,ft.prototype.has=ct,rt.exports=ft},{"./_MapCache":55,"./_setCacheAdd":210,"./_setCacheHas":211}],59:[function(nt,rt,ot){var st=nt("./_ListCache"),ut=nt("./_stackClear"),ct=nt("./_stackDelete"),ft=nt("./_stackGet"),pt=nt("./_stackHas"),ht=nt("./_stackSet");function mt(yt){var vt=this.__data__=new st(yt);this.size=vt.size}mt.prototype.clear=ut,mt.prototype.delete=ct,mt.prototype.get=ft,mt.prototype.has=pt,mt.prototype.set=ht,rt.exports=mt},{"./_ListCache":53,"./_stackClear":215,"./_stackDelete":216,"./_stackGet":217,"./_stackHas":218,"./_stackSet":219}],60:[function(nt,rt,ot){var st=nt("./_root"),ut=st.Symbol;rt.exports=ut},{"./_root":208}],61:[function(nt,rt,ot){var st=nt("./_root"),ut=st.Uint8Array;rt.exports=ut},{"./_root":208}],62:[function(nt,rt,ot){var st=nt("./_getNative"),ut=nt("./_root"),ct=st(ut,"WeakMap");rt.exports=ct},{"./_getNative":163,"./_root":208}],63:[function(nt,rt,ot){function st(ut,ct,ft){switch(ft.length){case 0:return ut.call(ct);case 1:return ut.call(ct,ft[0]);case 2:return ut.call(ct,ft[0],ft[1]);case 3:return ut.call(ct,ft[0],ft[1],ft[2])}return ut.apply(ct,ft)}rt.exports=st},{}],64:[function(nt,rt,ot){function st(ut,ct){for(var ft=-1,pt=ut==null?0:ut.length;++ft<pt&&ct(ut[ft],ft,ut)!==!1;);return ut}rt.exports=st},{}],65:[function(nt,rt,ot){function st(ut,ct){for(var ft=-1,pt=ut==null?0:ut.length,ht=0,mt=[];++ft<pt;){var yt=ut[ft];ct(yt,ft,ut)&&(mt[ht++]=yt)}return mt}rt.exports=st},{}],66:[function(nt,rt,ot){var st=nt("./_baseIndexOf");function ut(ct,ft){var pt=ct==null?0:ct.length;return!!pt&&st(ct,ft,0)>-1}rt.exports=ut},{"./_baseIndexOf":95}],67:[function(nt,rt,ot){function st(ut,ct,ft){for(var pt=-1,ht=ut==null?0:ut.length;++pt<ht;)if(ft(ct,ut[pt]))return!0;return!1}rt.exports=st},{}],68:[function(nt,rt,ot){var st=nt("./_baseTimes"),ut=nt("./isArguments"),ct=nt("./isArray"),ft=nt("./isBuffer"),pt=nt("./_isIndex"),ht=nt("./isTypedArray"),mt=Object.prototype,yt=mt.hasOwnProperty;function vt(Tt,Et){var xt=ct(Tt),At=!xt&&ut(Tt),Ct=!xt&&!At&&ft(Tt),$t=!xt&&!At&&!Ct&&ht(Tt),Ot=xt||At||Ct||$t,Rt=Ot?st(Tt.length,String):[],It=Rt.length;for(var kt in Tt)(Et||yt.call(Tt,kt))&&!(Ot&&(kt=="length"||Ct&&(kt=="offset"||kt=="parent")||$t&&(kt=="buffer"||kt=="byteLength"||kt=="byteOffset")||pt(kt,It)))&&Rt.push(kt);return Rt}rt.exports=vt},{"./_baseTimes":125,"./_isIndex":181,"./isArguments":242,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],69:[function(nt,rt,ot){function st(ut,ct){for(var ft=-1,pt=ut==null?0:ut.length,ht=Array(pt);++ft<pt;)ht[ft]=ct(ut[ft],ft,ut);return ht}rt.exports=st},{}],70:[function(nt,rt,ot){function st(ut,ct){for(var ft=-1,pt=ct.length,ht=ut.length;++ft<pt;)ut[ht+ft]=ct[ft];return ut}rt.exports=st},{}],71:[function(nt,rt,ot){function st(ut,ct,ft,pt){var ht=-1,mt=ut==null?0:ut.length;for(pt&&mt&&(ft=ut[++ht]);++ht<mt;)ft=ct(ft,ut[ht],ht,ut);return ft}rt.exports=st},{}],72:[function(nt,rt,ot){function st(ut,ct){for(var ft=-1,pt=ut==null?0:ut.length;++ft<pt;)if(ct(ut[ft],ft,ut))return!0;return!1}rt.exports=st},{}],73:[function(nt,rt,ot){var st=nt("./_baseProperty"),ut=st("length");rt.exports=ut},{"./_baseProperty":117}],74:[function(nt,rt,ot){var st=nt("./_baseAssignValue"),ut=nt("./eq");function ct(ft,pt,ht){(ht!==void 0&&!ut(ft[pt],ht)||ht===void 0&&!(pt in ft))&&st(ft,pt,ht)}rt.exports=ct},{"./_baseAssignValue":79,"./eq":231}],75:[function(nt,rt,ot){var st=nt("./_baseAssignValue"),ut=nt("./eq"),ct=Object.prototype,ft=ct.hasOwnProperty;function pt(ht,mt,yt){var vt=ht[mt];(!(ft.call(ht,mt)&&ut(vt,yt))||yt===void 0&&!(mt in ht))&&st(ht,mt,yt)}rt.exports=pt},{"./_baseAssignValue":79,"./eq":231}],76:[function(nt,rt,ot){var st=nt("./eq");function ut(ct,ft){for(var pt=ct.length;pt--;)if(st(ct[pt][0],ft))return pt;return-1}rt.exports=ut},{"./eq":231}],77:[function(nt,rt,ot){var st=nt("./_copyObject"),ut=nt("./keys");function ct(ft,pt){return ft&&st(pt,ut(pt),ft)}rt.exports=ct},{"./_copyObject":143,"./keys":259}],78:[function(nt,rt,ot){var st=nt("./_copyObject"),ut=nt("./keysIn");function ct(ft,pt){return ft&&st(pt,ut(pt),ft)}rt.exports=ct},{"./_copyObject":143,"./keysIn":260}],79:[function(nt,rt,ot){var st=nt("./_defineProperty");function ut(ct,ft,pt){ft=="__proto__"&&st?st(ct,ft,{configurable:!0,enumerable:!0,value:pt,writable:!0}):ct[ft]=pt}rt.exports=ut},{"./_defineProperty":153}],80:[function(nt,rt,ot){var st=nt("./_Stack"),ut=nt("./_arrayEach"),ct=nt("./_assignValue"),ft=nt("./_baseAssign"),pt=nt("./_baseAssignIn"),ht=nt("./_cloneBuffer"),mt=nt("./_copyArray"),yt=nt("./_copySymbols"),vt=nt("./_copySymbolsIn"),Tt=nt("./_getAllKeys"),Et=nt("./_getAllKeysIn"),xt=nt("./_getTag"),At=nt("./_initCloneArray"),Ct=nt("./_initCloneByTag"),$t=nt("./_initCloneObject"),Ot=nt("./isArray"),Rt=nt("./isBuffer"),It=nt("./isMap"),kt=nt("./isObject"),Mt=nt("./isSet"),Ft=nt("./keys"),zt=1,Vt=2,Zt=4,Ut="[object Arguments]",Xt="[object Array]",Jt="[object Boolean]",gn="[object Date]",An="[object Error]",sn="[object Function]",Sn="[object GeneratorFunction]",In="[object Map]",_n="[object Number]",En="[object Object]",Ln="[object RegExp]",wn="[object Set]",Dn="[object String]",$n="[object Symbol]",Gn="[object WeakMap]",Jn="[object ArrayBuffer]",zn="[object DataView]",Qn="[object Float32Array]",Bn="[object Float64Array]",jn="[object Int8Array]",Ar="[object Int16Array]",Er="[object Int32Array]",Pr="[object Uint8Array]",Nr="[object Uint8ClampedArray]",Ir="[object Uint16Array]",no="[object Uint32Array]",ro={};ro[Ut]=ro[Xt]=ro[Jn]=ro[zn]=ro[Jt]=ro[gn]=ro[Qn]=ro[Bn]=ro[jn]=ro[Ar]=ro[Er]=ro[In]=ro[_n]=ro[En]=ro[Ln]=ro[wn]=ro[Dn]=ro[$n]=ro[Pr]=ro[Nr]=ro[Ir]=ro[no]=!0,ro[An]=ro[sn]=ro[Gn]=!1;function ao(Xr,Jr,So,va,$o,Qr){var jo,Bo=Jr&zt,ss=Jr&Vt,Us=Jr&Zt;if(So&&(jo=$o?So(Xr,va,$o,Qr):So(Xr)),jo!==void 0)return jo;if(!kt(Xr))return Xr;var Eo=Ot(Xr);if(Eo){if(jo=At(Xr),!Bo)return mt(Xr,jo)}else{var Do=xt(Xr),bo=Do==sn||Do==Sn;if(Rt(Xr))return ht(Xr,Bo);if(Do==En||Do==Ut||bo&&!$o){if(jo=ss||bo?{}:$t(Xr),!Bo)return ss?vt(Xr,pt(jo,Xr)):yt(Xr,ft(jo,Xr))}else{if(!ro[Do])return $o?Xr:{};jo=Ct(Xr,Do,Bo)}}Qr||(Qr=new st);var Vo=Qr.get(Xr);if(Vo)return Vo;Qr.set(Xr,jo),Mt(Xr)?Xr.forEach(function(Qo){jo.add(ao(Qo,Jr,So,Qo,Xr,Qr))}):It(Xr)&&Xr.forEach(function(Qo,Gs){jo.set(Gs,ao(Qo,Jr,So,Gs,Xr,Qr))});var Ts=Us?ss?Et:Tt:ss?keysIn:Ft,xs=Eo?void 0:Ts(Xr);return ut(xs||Xr,function(Qo,Gs){xs&&(Gs=Qo,Qo=Xr[Gs]),ct(jo,Gs,ao(Qo,Jr,So,Gs,Xr,Qr))}),jo}rt.exports=ao},{"./_Stack":59,"./_arrayEach":64,"./_assignValue":75,"./_baseAssign":77,"./_baseAssignIn":78,"./_cloneBuffer":135,"./_copyArray":142,"./_copySymbols":144,"./_copySymbolsIn":145,"./_getAllKeys":159,"./_getAllKeysIn":160,"./_getTag":168,"./_initCloneArray":177,"./_initCloneByTag":178,"./_initCloneObject":179,"./isArray":243,"./isBuffer":246,"./isMap":250,"./isObject":251,"./isSet":254,"./keys":259}],81:[function(nt,rt,ot){var st=nt("./isObject"),ut=Object.create,ct=function(){function ft(){}return function(pt){if(!st(pt))return{};if(ut)return ut(pt);ft.prototype=pt;var ht=new ft;return ft.prototype=void 0,ht}}();rt.exports=ct},{"./isObject":251}],82:[function(nt,rt,ot){var st=nt("./_baseForOwn"),ut=nt("./_createBaseEach"),ct=ut(st);rt.exports=ct},{"./_baseForOwn":88,"./_createBaseEach":148}],83:[function(nt,rt,ot){var st=nt("./isSymbol");function ut(ct,ft,pt){for(var ht=-1,mt=ct.length;++ht<mt;){var yt=ct[ht],vt=ft(yt);if(vt!=null&&(Tt===void 0?vt===vt&&!st(vt):pt(vt,Tt)))var Tt=vt,Et=yt}return Et}rt.exports=ut},{"./isSymbol":256}],84:[function(nt,rt,ot){var st=nt("./_baseEach");function ut(ct,ft){var pt=[];return st(ct,function(ht,mt,yt){ft(ht,mt,yt)&&pt.push(ht)}),pt}rt.exports=ut},{"./_baseEach":82}],85:[function(nt,rt,ot){function st(ut,ct,ft,pt){for(var ht=ut.length,mt=ft+(pt?1:-1);pt?mt--:++mt<ht;)if(ct(ut[mt],mt,ut))return mt;return-1}rt.exports=st},{}],86:[function(nt,rt,ot){var st=nt("./_arrayPush"),ut=nt("./_isFlattenable");function ct(ft,pt,ht,mt,yt){var vt=-1,Tt=ft.length;for(ht||(ht=ut),yt||(yt=[]);++vt<Tt;){var Et=ft[vt];pt>0&&ht(Et)?pt>1?ct(Et,pt-1,ht,mt,yt):st(yt,Et):mt||(yt[yt.length]=Et)}return yt}rt.exports=ct},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(nt,rt,ot){var st=nt("./_createBaseFor"),ut=st();rt.exports=ut},{"./_createBaseFor":149}],88:[function(nt,rt,ot){var st=nt("./_baseFor"),ut=nt("./keys");function ct(ft,pt){return ft&&st(ft,pt,ut)}rt.exports=ct},{"./_baseFor":87,"./keys":259}],89:[function(nt,rt,ot){var st=nt("./_castPath"),ut=nt("./_toKey");function ct(ft,pt){pt=st(pt,ft);for(var ht=0,mt=pt.length;ft!=null&&ht<mt;)ft=ft[ut(pt[ht++])];return ht&&ht==mt?ft:void 0}rt.exports=ct},{"./_castPath":133,"./_toKey":223}],90:[function(nt,rt,ot){var st=nt("./_arrayPush"),ut=nt("./isArray");function ct(ft,pt,ht){var mt=pt(ft);return ut(ft)?mt:st(mt,ht(ft))}rt.exports=ct},{"./_arrayPush":70,"./isArray":243}],91:[function(nt,rt,ot){var st=nt("./_Symbol"),ut=nt("./_getRawTag"),ct=nt("./_objectToString"),ft="[object Null]",pt="[object Undefined]",ht=st?st.toStringTag:void 0;function mt(yt){return yt==null?yt===void 0?pt:ft:ht&&ht in Object(yt)?ut(yt):ct(yt)}rt.exports=mt},{"./_Symbol":60,"./_getRawTag":165,"./_objectToString":205}],92:[function(nt,rt,ot){function st(ut,ct){return ut>ct}rt.exports=st},{}],93:[function(nt,rt,ot){var st=Object.prototype,ut=st.hasOwnProperty;function ct(ft,pt){return ft!=null&&ut.call(ft,pt)}rt.exports=ct},{}],94:[function(nt,rt,ot){function st(ut,ct){return ut!=null&&ct in Object(ut)}rt.exports=st},{}],95:[function(nt,rt,ot){var st=nt("./_baseFindIndex"),ut=nt("./_baseIsNaN"),ct=nt("./_strictIndexOf");function ft(pt,ht,mt){return ht===ht?ct(pt,ht,mt):st(pt,ut,mt)}rt.exports=ft},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(nt,rt,ot){var st=nt("./_baseGetTag"),ut=nt("./isObjectLike"),ct="[object Arguments]";function ft(pt){return ut(pt)&&st(pt)==ct}rt.exports=ft},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(nt,rt,ot){var st=nt("./_baseIsEqualDeep"),ut=nt("./isObjectLike");function ct(ft,pt,ht,mt,yt){return ft===pt?!0:ft==null||pt==null||!ut(ft)&&!ut(pt)?ft!==ft&&pt!==pt:st(ft,pt,ht,mt,ct,yt)}rt.exports=ct},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(nt,rt,ot){var st=nt("./_Stack"),ut=nt("./_equalArrays"),ct=nt("./_equalByTag"),ft=nt("./_equalObjects"),pt=nt("./_getTag"),ht=nt("./isArray"),mt=nt("./isBuffer"),yt=nt("./isTypedArray"),vt=1,Tt="[object Arguments]",Et="[object Array]",xt="[object Object]",At=Object.prototype,Ct=At.hasOwnProperty;function $t(Ot,Rt,It,kt,Mt,Ft){var zt=ht(Ot),Vt=ht(Rt),Zt=zt?Et:pt(Ot),Ut=Vt?Et:pt(Rt);Zt=Zt==Tt?xt:Zt,Ut=Ut==Tt?xt:Ut;var Xt=Zt==xt,Jt=Ut==xt,gn=Zt==Ut;if(gn&&mt(Ot)){if(!mt(Rt))return!1;zt=!0,Xt=!1}if(gn&&!Xt)return Ft||(Ft=new st),zt||yt(Ot)?ut(Ot,Rt,It,kt,Mt,Ft):ct(Ot,Rt,Zt,It,kt,Mt,Ft);if(!(It&vt)){var An=Xt&&Ct.call(Ot,"__wrapped__"),sn=Jt&&Ct.call(Rt,"__wrapped__");if(An||sn){var Sn=An?Ot.value():Ot,In=sn?Rt.value():Rt;return Ft||(Ft=new st),Mt(Sn,In,It,kt,Ft)}}return gn?(Ft||(Ft=new st),ft(Ot,Rt,It,kt,Mt,Ft)):!1}rt.exports=$t},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(nt,rt,ot){var st=nt("./_getTag"),ut=nt("./isObjectLike"),ct="[object Map]";function ft(pt){return ut(pt)&&st(pt)==ct}rt.exports=ft},{"./_getTag":168,"./isObjectLike":252}],100:[function(nt,rt,ot){var st=nt("./_Stack"),ut=nt("./_baseIsEqual"),ct=1,ft=2;function pt(ht,mt,yt,vt){var Tt=yt.length,Et=Tt,xt=!vt;if(ht==null)return!Et;for(ht=Object(ht);Tt--;){var At=yt[Tt];if(xt&&At[2]?At[1]!==ht[At[0]]:!(At[0]in ht))return!1}for(;++Tt<Et;){At=yt[Tt];var Ct=At[0],$t=ht[Ct],Ot=At[1];if(xt&&At[2]){if($t===void 0&&!(Ct in ht))return!1}else{var Rt=new st;if(vt)var It=vt($t,Ot,Ct,ht,mt,Rt);if(!(It===void 0?ut(Ot,$t,ct|ft,vt,Rt):It))return!1}}return!0}rt.exports=pt},{"./_Stack":59,"./_baseIsEqual":97}],101:[function(nt,rt,ot){function st(ut){return ut!==ut}rt.exports=st},{}],102:[function(nt,rt,ot){var st=nt("./isFunction"),ut=nt("./_isMasked"),ct=nt("./isObject"),ft=nt("./_toSource"),pt=/[\\^$.*+?()[\]{}|]/g,ht=/^\[object .+?Constructor\]$/,mt=Function.prototype,yt=Object.prototype,vt=mt.toString,Tt=yt.hasOwnProperty,Et=RegExp("^"+vt.call(Tt).replace(pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xt(At){if(!ct(At)||ut(At))return!1;var Ct=st(At)?Et:ht;return Ct.test(ft(At))}rt.exports=xt},{"./_isMasked":185,"./_toSource":224,"./isFunction":248,"./isObject":251}],103:[function(nt,rt,ot){var st=nt("./_getTag"),ut=nt("./isObjectLike"),ct="[object Set]";function ft(pt){return ut(pt)&&st(pt)==ct}rt.exports=ft},{"./_getTag":168,"./isObjectLike":252}],104:[function(nt,rt,ot){var st=nt("./_baseGetTag"),ut=nt("./isLength"),ct=nt("./isObjectLike"),ft="[object Arguments]",pt="[object Array]",ht="[object Boolean]",mt="[object Date]",yt="[object Error]",vt="[object Function]",Tt="[object Map]",Et="[object Number]",xt="[object Object]",At="[object RegExp]",Ct="[object Set]",$t="[object String]",Ot="[object WeakMap]",Rt="[object ArrayBuffer]",It="[object DataView]",kt="[object Float32Array]",Mt="[object Float64Array]",Ft="[object Int8Array]",zt="[object Int16Array]",Vt="[object Int32Array]",Zt="[object Uint8Array]",Ut="[object Uint8ClampedArray]",Xt="[object Uint16Array]",Jt="[object Uint32Array]",gn={};gn[kt]=gn[Mt]=gn[Ft]=gn[zt]=gn[Vt]=gn[Zt]=gn[Ut]=gn[Xt]=gn[Jt]=!0,gn[ft]=gn[pt]=gn[Rt]=gn[ht]=gn[It]=gn[mt]=gn[yt]=gn[vt]=gn[Tt]=gn[Et]=gn[xt]=gn[At]=gn[Ct]=gn[$t]=gn[Ot]=!1;function An(sn){return ct(sn)&&ut(sn.length)&&!!gn[st(sn)]}rt.exports=An},{"./_baseGetTag":91,"./isLength":249,"./isObjectLike":252}],105:[function(nt,rt,ot){var st=nt("./_baseMatches"),ut=nt("./_baseMatchesProperty"),ct=nt("./identity"),ft=nt("./isArray"),pt=nt("./property");function ht(mt){return typeof mt=="function"?mt:mt==null?ct:typeof mt=="object"?ft(mt)?ut(mt[0],mt[1]):st(mt):pt(mt)}rt.exports=ht},{"./_baseMatches":110,"./_baseMatchesProperty":111,"./identity":241,"./isArray":243,"./property":272}],106:[function(nt,rt,ot){var st=nt("./_isPrototype"),ut=nt("./_nativeKeys"),ct=Object.prototype,ft=ct.hasOwnProperty;function pt(ht){if(!st(ht))return ut(ht);var mt=[];for(var yt in Object(ht))ft.call(ht,yt)&&yt!="constructor"&&mt.push(yt);return mt}rt.exports=pt},{"./_isPrototype":186,"./_nativeKeys":202}],107:[function(nt,rt,ot){var st=nt("./isObject"),ut=nt("./_isPrototype"),ct=nt("./_nativeKeysIn"),ft=Object.prototype,pt=ft.hasOwnProperty;function ht(mt){if(!st(mt))return ct(mt);var yt=ut(mt),vt=[];for(var Tt in mt)Tt=="constructor"&&(yt||!pt.call(mt,Tt))||vt.push(Tt);return vt}rt.exports=ht},{"./_isPrototype":186,"./_nativeKeysIn":203,"./isObject":251}],108:[function(nt,rt,ot){function st(ut,ct){return ut<ct}rt.exports=st},{}],109:[function(nt,rt,ot){var st=nt("./_baseEach"),ut=nt("./isArrayLike");function ct(ft,pt){var ht=-1,mt=ut(ft)?Array(ft.length):[];return st(ft,function(yt,vt,Tt){mt[++ht]=pt(yt,vt,Tt)}),mt}rt.exports=ct},{"./_baseEach":82,"./isArrayLike":244}],110:[function(nt,rt,ot){var st=nt("./_baseIsMatch"),ut=nt("./_getMatchData"),ct=nt("./_matchesStrictComparable");function ft(pt){var ht=ut(pt);return ht.length==1&&ht[0][2]?ct(ht[0][0],ht[0][1]):function(mt){return mt===pt||st(mt,pt,ht)}}rt.exports=ft},{"./_baseIsMatch":100,"./_getMatchData":162,"./_matchesStrictComparable":199}],111:[function(nt,rt,ot){var st=nt("./_baseIsEqual"),ut=nt("./get"),ct=nt("./hasIn"),ft=nt("./_isKey"),pt=nt("./_isStrictComparable"),ht=nt("./_matchesStrictComparable"),mt=nt("./_toKey"),yt=1,vt=2;function Tt(Et,xt){return ft(Et)&&pt(xt)?ht(mt(Et),xt):function(At){var Ct=ut(At,Et);return Ct===void 0&&Ct===xt?ct(At,Et):st(xt,Ct,yt|vt)}}rt.exports=Tt},{"./_baseIsEqual":97,"./_isKey":183,"./_isStrictComparable":187,"./_matchesStrictComparable":199,"./_toKey":223,"./get":238,"./hasIn":240}],112:[function(nt,rt,ot){var st=nt("./_Stack"),ut=nt("./_assignMergeValue"),ct=nt("./_baseFor"),ft=nt("./_baseMergeDeep"),pt=nt("./isObject"),ht=nt("./keysIn"),mt=nt("./_safeGet");function yt(vt,Tt,Et,xt,At){vt!==Tt&&ct(Tt,function(Ct,$t){if(At||(At=new st),pt(Ct))ft(vt,Tt,$t,Et,yt,xt,At);else{var Ot=xt?xt(mt(vt,$t),Ct,$t+"",vt,Tt,At):void 0;Ot===void 0&&(Ot=Ct),ut(vt,$t,Ot)}},ht)}rt.exports=yt},{"./_Stack":59,"./_assignMergeValue":74,"./_baseFor":87,"./_baseMergeDeep":113,"./_safeGet":209,"./isObject":251,"./keysIn":260}],113:[function(nt,rt,ot){var st=nt("./_assignMergeValue"),ut=nt("./_cloneBuffer"),ct=nt("./_cloneTypedArray"),ft=nt("./_copyArray"),pt=nt("./_initCloneObject"),ht=nt("./isArguments"),mt=nt("./isArray"),yt=nt("./isArrayLikeObject"),vt=nt("./isBuffer"),Tt=nt("./isFunction"),Et=nt("./isObject"),xt=nt("./isPlainObject"),At=nt("./isTypedArray"),Ct=nt("./_safeGet"),$t=nt("./toPlainObject");function Ot(Rt,It,kt,Mt,Ft,zt,Vt){var Zt=Ct(Rt,kt),Ut=Ct(It,kt),Xt=Vt.get(Ut);if(Xt){st(Rt,kt,Xt);return}var Jt=zt?zt(Zt,Ut,kt+"",Rt,It,Vt):void 0,gn=Jt===void 0;if(gn){var An=mt(Ut),sn=!An&&vt(Ut),Sn=!An&&!sn&&At(Ut);Jt=Ut,An||sn||Sn?mt(Zt)?Jt=Zt:yt(Zt)?Jt=ft(Zt):sn?(gn=!1,Jt=ut(Ut,!0)):Sn?(gn=!1,Jt=ct(Ut,!0)):Jt=[]:xt(Ut)||ht(Ut)?(Jt=Zt,ht(Zt)?Jt=$t(Zt):(!Et(Zt)||Tt(Zt))&&(Jt=pt(Ut))):gn=!1}gn&&(Vt.set(Ut,Jt),Ft(Jt,Ut,Mt,zt,Vt),Vt.delete(Ut)),st(Rt,kt,Jt)}rt.exports=Ot},{"./_assignMergeValue":74,"./_cloneBuffer":135,"./_cloneTypedArray":139,"./_copyArray":142,"./_initCloneObject":179,"./_safeGet":209,"./isArguments":242,"./isArray":243,"./isArrayLikeObject":245,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isPlainObject":253,"./isTypedArray":257,"./toPlainObject":282}],114:[function(nt,rt,ot){var st=nt("./_arrayMap"),ut=nt("./_baseIteratee"),ct=nt("./_baseMap"),ft=nt("./_baseSortBy"),pt=nt("./_baseUnary"),ht=nt("./_compareMultiple"),mt=nt("./identity");function yt(vt,Tt,Et){var xt=-1;Tt=st(Tt.length?Tt:[mt],pt(ut));var At=ct(vt,function(Ct,$t,Ot){var Rt=st(Tt,function(It){return It(Ct)});return{criteria:Rt,index:++xt,value:Ct}});return ft(At,function(Ct,$t){return ht(Ct,$t,Et)})}rt.exports=yt},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./_baseSortBy":124,"./_baseUnary":127,"./_compareMultiple":141,"./identity":241}],115:[function(nt,rt,ot){var st=nt("./_basePickBy"),ut=nt("./hasIn");function ct(ft,pt){return st(ft,pt,function(ht,mt){return ut(ft,mt)})}rt.exports=ct},{"./_basePickBy":116,"./hasIn":240}],116:[function(nt,rt,ot){var st=nt("./_baseGet"),ut=nt("./_baseSet"),ct=nt("./_castPath");function ft(pt,ht,mt){for(var yt=-1,vt=ht.length,Tt={};++yt<vt;){var Et=ht[yt],xt=st(pt,Et);mt(xt,Et)&&ut(Tt,ct(Et,pt),xt)}return Tt}rt.exports=ft},{"./_baseGet":89,"./_baseSet":122,"./_castPath":133}],117:[function(nt,rt,ot){function st(ut){return function(ct){return ct?.[ut]}}rt.exports=st},{}],118:[function(nt,rt,ot){var st=nt("./_baseGet");function ut(ct){return function(ft){return st(ft,ct)}}rt.exports=ut},{"./_baseGet":89}],119:[function(nt,rt,ot){var st=Math.ceil,ut=Math.max;function ct(ft,pt,ht,mt){for(var yt=-1,vt=ut(st((pt-ft)/(ht||1)),0),Tt=Array(vt);vt--;)Tt[mt?vt:++yt]=ft,ft+=ht;return Tt}rt.exports=ct},{}],120:[function(nt,rt,ot){function st(ut,ct,ft,pt,ht){return ht(ut,function(mt,yt,vt){ft=pt?(pt=!1,mt):ct(ft,mt,yt,vt)}),ft}rt.exports=st},{}],121:[function(nt,rt,ot){var st=nt("./identity"),ut=nt("./_overRest"),ct=nt("./_setToString");function ft(pt,ht){return ct(ut(pt,ht,st),pt+"")}rt.exports=ft},{"./_overRest":207,"./_setToString":213,"./identity":241}],122:[function(nt,rt,ot){var st=nt("./_assignValue"),ut=nt("./_castPath"),ct=nt("./_isIndex"),ft=nt("./isObject"),pt=nt("./_toKey");function ht(mt,yt,vt,Tt){if(!ft(mt))return mt;yt=ut(yt,mt);for(var Et=-1,xt=yt.length,At=xt-1,Ct=mt;Ct!=null&&++Et<xt;){var $t=pt(yt[Et]),Ot=vt;if(Et!=At){var Rt=Ct[$t];Ot=Tt?Tt(Rt,$t,Ct):void 0,Ot===void 0&&(Ot=ft(Rt)?Rt:ct(yt[Et+1])?[]:{})}st(Ct,$t,Ot),Ct=Ct[$t]}return mt}rt.exports=ht},{"./_assignValue":75,"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isObject":251}],123:[function(nt,rt,ot){var st=nt("./constant"),ut=nt("./_defineProperty"),ct=nt("./identity"),ft=ut?function(pt,ht){return ut(pt,"toString",{configurable:!0,enumerable:!1,value:st(ht),writable:!0})}:ct;rt.exports=ft},{"./_defineProperty":153,"./constant":228,"./identity":241}],124:[function(nt,rt,ot){function st(ut,ct){var ft=ut.length;for(ut.sort(ct);ft--;)ut[ft]=ut[ft].value;return ut}rt.exports=st},{}],125:[function(nt,rt,ot){function st(ut,ct){for(var ft=-1,pt=Array(ut);++ft<ut;)pt[ft]=ct(ft);return pt}rt.exports=st},{}],126:[function(nt,rt,ot){var st=nt("./_Symbol"),ut=nt("./_arrayMap"),ct=nt("./isArray"),ft=nt("./isSymbol"),pt=1/0,ht=st?st.prototype:void 0,mt=ht?ht.toString:void 0;function yt(vt){if(typeof vt=="string")return vt;if(ct(vt))return ut(vt,yt)+"";if(ft(vt))return mt?mt.call(vt):"";var Tt=vt+"";return Tt=="0"&&1/vt==-pt?"-0":Tt}rt.exports=yt},{"./_Symbol":60,"./_arrayMap":69,"./isArray":243,"./isSymbol":256}],127:[function(nt,rt,ot){function st(ut){return function(ct){return ut(ct)}}rt.exports=st},{}],128:[function(nt,rt,ot){var st=nt("./_SetCache"),ut=nt("./_arrayIncludes"),ct=nt("./_arrayIncludesWith"),ft=nt("./_cacheHas"),pt=nt("./_createSet"),ht=nt("./_setToArray"),mt=200;function yt(vt,Tt,Et){var xt=-1,At=ut,Ct=vt.length,$t=!0,Ot=[],Rt=Ot;if(Et)$t=!1,At=ct;else if(Ct>=mt){var It=Tt?null:pt(vt);if(It)return ht(It);$t=!1,At=ft,Rt=new st}else Rt=Tt?[]:Ot;e:for(;++xt<Ct;){var kt=vt[xt],Mt=Tt?Tt(kt):kt;if(kt=Et||kt!==0?kt:0,$t&&Mt===Mt){for(var Ft=Rt.length;Ft--;)if(Rt[Ft]===Mt)continue e;Tt&&Rt.push(Mt),Ot.push(kt)}else At(Rt,Mt,Et)||(Rt!==Ot&&Rt.push(Mt),Ot.push(kt))}return Ot}rt.exports=yt},{"./_SetCache":58,"./_arrayIncludes":66,"./_arrayIncludesWith":67,"./_cacheHas":131,"./_createSet":152,"./_setToArray":212}],129:[function(nt,rt,ot){var st=nt("./_arrayMap");function ut(ct,ft){return st(ft,function(pt){return ct[pt]})}rt.exports=ut},{"./_arrayMap":69}],130:[function(nt,rt,ot){function st(ut,ct,ft){for(var pt=-1,ht=ut.length,mt=ct.length,yt={};++pt<ht;){var vt=pt<mt?ct[pt]:void 0;ft(yt,ut[pt],vt)}return yt}rt.exports=st},{}],131:[function(nt,rt,ot){function st(ut,ct){return ut.has(ct)}rt.exports=st},{}],132:[function(nt,rt,ot){var st=nt("./identity");function ut(ct){return typeof ct=="function"?ct:st}rt.exports=ut},{"./identity":241}],133:[function(nt,rt,ot){var st=nt("./isArray"),ut=nt("./_isKey"),ct=nt("./_stringToPath"),ft=nt("./toString");function pt(ht,mt){return st(ht)?ht:ut(ht,mt)?[ht]:ct(ft(ht))}rt.exports=pt},{"./_isKey":183,"./_stringToPath":222,"./isArray":243,"./toString":283}],134:[function(nt,rt,ot){var st=nt("./_Uint8Array");function ut(ct){var ft=new ct.constructor(ct.byteLength);return new st(ft).set(new st(ct)),ft}rt.exports=ut},{"./_Uint8Array":61}],135:[function(nt,rt,ot){var st=nt("./_root"),ut=typeof ot=="object"&&ot&&!ot.nodeType&&ot,ct=ut&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,ft=ct&&ct.exports===ut,pt=ft?st.Buffer:void 0,ht=pt?pt.allocUnsafe:void 0;function mt(yt,vt){if(vt)return yt.slice();var Tt=yt.length,Et=ht?ht(Tt):new yt.constructor(Tt);return yt.copy(Et),Et}rt.exports=mt},{"./_root":208}],136:[function(nt,rt,ot){var st=nt("./_cloneArrayBuffer");function ut(ct,ft){var pt=ft?st(ct.buffer):ct.buffer;return new ct.constructor(pt,ct.byteOffset,ct.byteLength)}rt.exports=ut},{"./_cloneArrayBuffer":134}],137:[function(nt,rt,ot){var st=/\w*$/;function ut(ct){var ft=new ct.constructor(ct.source,st.exec(ct));return ft.lastIndex=ct.lastIndex,ft}rt.exports=ut},{}],138:[function(nt,rt,ot){var st=nt("./_Symbol"),ut=st?st.prototype:void 0,ct=ut?ut.valueOf:void 0;function ft(pt){return ct?Object(ct.call(pt)):{}}rt.exports=ft},{"./_Symbol":60}],139:[function(nt,rt,ot){var st=nt("./_cloneArrayBuffer");function ut(ct,ft){var pt=ft?st(ct.buffer):ct.buffer;return new ct.constructor(pt,ct.byteOffset,ct.length)}rt.exports=ut},{"./_cloneArrayBuffer":134}],140:[function(nt,rt,ot){var st=nt("./isSymbol");function ut(ct,ft){if(ct!==ft){var pt=ct!==void 0,ht=ct===null,mt=ct===ct,yt=st(ct),vt=ft!==void 0,Tt=ft===null,Et=ft===ft,xt=st(ft);if(!Tt&&!xt&&!yt&&ct>ft||yt&&vt&&Et&&!Tt&&!xt||ht&&vt&&Et||!pt&&Et||!mt)return 1;if(!ht&&!yt&&!xt&&ct<ft||xt&&pt&&mt&&!ht&&!yt||Tt&&pt&&mt||!vt&&mt||!Et)return-1}return 0}rt.exports=ut},{"./isSymbol":256}],141:[function(nt,rt,ot){var st=nt("./_compareAscending");function ut(ct,ft,pt){for(var ht=-1,mt=ct.criteria,yt=ft.criteria,vt=mt.length,Tt=pt.length;++ht<vt;){var Et=st(mt[ht],yt[ht]);if(Et){if(ht>=Tt)return Et;var xt=pt[ht];return Et*(xt=="desc"?-1:1)}}return ct.index-ft.index}rt.exports=ut},{"./_compareAscending":140}],142:[function(nt,rt,ot){function st(ut,ct){var ft=-1,pt=ut.length;for(ct||(ct=Array(pt));++ft<pt;)ct[ft]=ut[ft];return ct}rt.exports=st},{}],143:[function(nt,rt,ot){var st=nt("./_assignValue"),ut=nt("./_baseAssignValue");function ct(ft,pt,ht,mt){var yt=!ht;ht||(ht={});for(var vt=-1,Tt=pt.length;++vt<Tt;){var Et=pt[vt],xt=mt?mt(ht[Et],ft[Et],Et,ht,ft):void 0;xt===void 0&&(xt=ft[Et]),yt?ut(ht,Et,xt):st(ht,Et,xt)}return ht}rt.exports=ct},{"./_assignValue":75,"./_baseAssignValue":79}],144:[function(nt,rt,ot){var st=nt("./_copyObject"),ut=nt("./_getSymbols");function ct(ft,pt){return st(ft,ut(ft),pt)}rt.exports=ct},{"./_copyObject":143,"./_getSymbols":166}],145:[function(nt,rt,ot){var st=nt("./_copyObject"),ut=nt("./_getSymbolsIn");function ct(ft,pt){return st(ft,ut(ft),pt)}rt.exports=ct},{"./_copyObject":143,"./_getSymbolsIn":167}],146:[function(nt,rt,ot){var st=nt("./_root"),ut=st["__core-js_shared__"];rt.exports=ut},{"./_root":208}],147:[function(nt,rt,ot){var st=nt("./_baseRest"),ut=nt("./_isIterateeCall");function ct(ft){return st(function(pt,ht){var mt=-1,yt=ht.length,vt=yt>1?ht[yt-1]:void 0,Tt=yt>2?ht[2]:void 0;for(vt=ft.length>3&&typeof vt=="function"?(yt--,vt):void 0,Tt&&ut(ht[0],ht[1],Tt)&&(vt=yt<3?void 0:vt,yt=1),pt=Object(pt);++mt<yt;){var Et=ht[mt];Et&&ft(pt,Et,mt,vt)}return pt})}rt.exports=ct},{"./_baseRest":121,"./_isIterateeCall":182}],148:[function(nt,rt,ot){var st=nt("./isArrayLike");function ut(ct,ft){return function(pt,ht){if(pt==null)return pt;if(!st(pt))return ct(pt,ht);for(var mt=pt.length,yt=ft?mt:-1,vt=Object(pt);(ft?yt--:++yt<mt)&&ht(vt[yt],yt,vt)!==!1;);return pt}}rt.exports=ut},{"./isArrayLike":244}],149:[function(nt,rt,ot){function st(ut){return function(ct,ft,pt){for(var ht=-1,mt=Object(ct),yt=pt(ct),vt=yt.length;vt--;){var Tt=yt[ut?vt:++ht];if(ft(mt[Tt],Tt,mt)===!1)break}return ct}}rt.exports=st},{}],150:[function(nt,rt,ot){var st=nt("./_baseIteratee"),ut=nt("./isArrayLike"),ct=nt("./keys");function ft(pt){return function(ht,mt,yt){var vt=Object(ht);if(!ut(ht)){var Tt=st(mt,3);ht=ct(ht),mt=function(xt){return Tt(vt[xt],xt,vt)}}var Et=pt(ht,mt,yt);return Et>-1?vt[Tt?ht[Et]:Et]:void 0}}rt.exports=ft},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(nt,rt,ot){var st=nt("./_baseRange"),ut=nt("./_isIterateeCall"),ct=nt("./toFinite");function ft(pt){return function(ht,mt,yt){return yt&&typeof yt!="number"&&ut(ht,mt,yt)&&(mt=yt=void 0),ht=ct(ht),mt===void 0?(mt=ht,ht=0):mt=ct(mt),yt=yt===void 0?ht<mt?1:-1:ct(yt),st(ht,mt,yt,pt)}}rt.exports=ft},{"./_baseRange":119,"./_isIterateeCall":182,"./toFinite":279}],152:[function(nt,rt,ot){var st=nt("./_Set"),ut=nt("./noop"),ct=nt("./_setToArray"),ft=1/0,pt=st&&1/ct(new st([,-0]))[1]==ft?function(ht){return new st(ht)}:ut;rt.exports=pt},{"./_Set":57,"./_setToArray":212,"./noop":269}],153:[function(nt,rt,ot){var st=nt("./_getNative"),ut=function(){try{var ct=st(Object,"defineProperty");return ct({},"",{}),ct}catch{}}();rt.exports=ut},{"./_getNative":163}],154:[function(nt,rt,ot){var st=nt("./_SetCache"),ut=nt("./_arraySome"),ct=nt("./_cacheHas"),ft=1,pt=2;function ht(mt,yt,vt,Tt,Et,xt){var At=vt&ft,Ct=mt.length,$t=yt.length;if(Ct!=$t&&!(At&&$t>Ct))return!1;var Ot=xt.get(mt);if(Ot&&xt.get(yt))return Ot==yt;var Rt=-1,It=!0,kt=vt&pt?new st:void 0;for(xt.set(mt,yt),xt.set(yt,mt);++Rt<Ct;){var Mt=mt[Rt],Ft=yt[Rt];if(Tt)var zt=At?Tt(Ft,Mt,Rt,yt,mt,xt):Tt(Mt,Ft,Rt,mt,yt,xt);if(zt!==void 0){if(zt)continue;It=!1;break}if(kt){if(!ut(yt,function(Vt,Zt){if(!ct(kt,Zt)&&(Mt===Vt||Et(Mt,Vt,vt,Tt,xt)))return kt.push(Zt)})){It=!1;break}}else if(!(Mt===Ft||Et(Mt,Ft,vt,Tt,xt))){It=!1;break}}return xt.delete(mt),xt.delete(yt),It}rt.exports=ht},{"./_SetCache":58,"./_arraySome":72,"./_cacheHas":131}],155:[function(nt,rt,ot){var st=nt("./_Symbol"),ut=nt("./_Uint8Array"),ct=nt("./eq"),ft=nt("./_equalArrays"),pt=nt("./_mapToArray"),ht=nt("./_setToArray"),mt=1,yt=2,vt="[object Boolean]",Tt="[object Date]",Et="[object Error]",xt="[object Map]",At="[object Number]",Ct="[object RegExp]",$t="[object Set]",Ot="[object String]",Rt="[object Symbol]",It="[object ArrayBuffer]",kt="[object DataView]",Mt=st?st.prototype:void 0,Ft=Mt?Mt.valueOf:void 0;function zt(Vt,Zt,Ut,Xt,Jt,gn,An){switch(Ut){case kt:if(Vt.byteLength!=Zt.byteLength||Vt.byteOffset!=Zt.byteOffset)return!1;Vt=Vt.buffer,Zt=Zt.buffer;case It:return!(Vt.byteLength!=Zt.byteLength||!gn(new ut(Vt),new ut(Zt)));case vt:case Tt:case At:return ct(+Vt,+Zt);case Et:return Vt.name==Zt.name&&Vt.message==Zt.message;case Ct:case Ot:return Vt==Zt+"";case xt:var sn=pt;case $t:var Sn=Xt&mt;if(sn||(sn=ht),Vt.size!=Zt.size&&!Sn)return!1;var In=An.get(Vt);if(In)return In==Zt;Xt|=yt,An.set(Vt,Zt);var _n=ft(sn(Vt),sn(Zt),Xt,Jt,gn,An);return An.delete(Vt),_n;case Rt:if(Ft)return Ft.call(Vt)==Ft.call(Zt)}return!1}rt.exports=zt},{"./_Symbol":60,"./_Uint8Array":61,"./_equalArrays":154,"./_mapToArray":198,"./_setToArray":212,"./eq":231}],156:[function(nt,rt,ot){var st=nt("./_getAllKeys"),ut=1,ct=Object.prototype,ft=ct.hasOwnProperty;function pt(ht,mt,yt,vt,Tt,Et){var xt=yt&ut,At=st(ht),Ct=At.length,$t=st(mt),Ot=$t.length;if(Ct!=Ot&&!xt)return!1;for(var Rt=Ct;Rt--;){var It=At[Rt];if(!(xt?It in mt:ft.call(mt,It)))return!1}var kt=Et.get(ht);if(kt&&Et.get(mt))return kt==mt;var Mt=!0;Et.set(ht,mt),Et.set(mt,ht);for(var Ft=xt;++Rt<Ct;){It=At[Rt];var zt=ht[It],Vt=mt[It];if(vt)var Zt=xt?vt(Vt,zt,It,mt,ht,Et):vt(zt,Vt,It,ht,mt,Et);if(!(Zt===void 0?zt===Vt||Tt(zt,Vt,yt,vt,Et):Zt)){Mt=!1;break}Ft||(Ft=It=="constructor")}if(Mt&&!Ft){var Ut=ht.constructor,Xt=mt.constructor;Ut!=Xt&&"constructor"in ht&&"constructor"in mt&&!(typeof Ut=="function"&&Ut instanceof Ut&&typeof Xt=="function"&&Xt instanceof Xt)&&(Mt=!1)}return Et.delete(ht),Et.delete(mt),Mt}rt.exports=pt},{"./_getAllKeys":159}],157:[function(nt,rt,ot){var st=nt("./flatten"),ut=nt("./_overRest"),ct=nt("./_setToString");function ft(pt){return ct(ut(pt,void 0,st),pt+"")}rt.exports=ft},{"./_overRest":207,"./_setToString":213,"./flatten":235}],158:[function(nt,rt,ot){(function(st){var ut=typeof st=="object"&&st&&st.Object===Object&&st;rt.exports=ut}).call(this,typeof commonjsGlobal$1<"u"?commonjsGlobal$1:typeof self<"u"?self:typeof window<"u"?window:{})},{}],159:[function(nt,rt,ot){var st=nt("./_baseGetAllKeys"),ut=nt("./_getSymbols"),ct=nt("./keys");function ft(pt){return st(pt,ct,ut)}rt.exports=ft},{"./_baseGetAllKeys":90,"./_getSymbols":166,"./keys":259}],160:[function(nt,rt,ot){var st=nt("./_baseGetAllKeys"),ut=nt("./_getSymbolsIn"),ct=nt("./keysIn");function ft(pt){return st(pt,ct,ut)}rt.exports=ft},{"./_baseGetAllKeys":90,"./_getSymbolsIn":167,"./keysIn":260}],161:[function(nt,rt,ot){var st=nt("./_isKeyable");function ut(ct,ft){var pt=ct.__data__;return st(ft)?pt[typeof ft=="string"?"string":"hash"]:pt.map}rt.exports=ut},{"./_isKeyable":184}],162:[function(nt,rt,ot){var st=nt("./_isStrictComparable"),ut=nt("./keys");function ct(ft){for(var pt=ut(ft),ht=pt.length;ht--;){var mt=pt[ht],yt=ft[mt];pt[ht]=[mt,yt,st(yt)]}return pt}rt.exports=ct},{"./_isStrictComparable":187,"./keys":259}],163:[function(nt,rt,ot){var st=nt("./_baseIsNative"),ut=nt("./_getValue");function ct(ft,pt){var ht=ut(ft,pt);return st(ht)?ht:void 0}rt.exports=ct},{"./_baseIsNative":102,"./_getValue":169}],164:[function(nt,rt,ot){var st=nt("./_overArg"),ut=st(Object.getPrototypeOf,Object);rt.exports=ut},{"./_overArg":206}],165:[function(nt,rt,ot){var st=nt("./_Symbol"),ut=Object.prototype,ct=ut.hasOwnProperty,ft=ut.toString,pt=st?st.toStringTag:void 0;function ht(mt){var yt=ct.call(mt,pt),vt=mt[pt];try{mt[pt]=void 0;var Tt=!0}catch{}var Et=ft.call(mt);return Tt&&(yt?mt[pt]=vt:delete mt[pt]),Et}rt.exports=ht},{"./_Symbol":60}],166:[function(nt,rt,ot){var st=nt("./_arrayFilter"),ut=nt("./stubArray"),ct=Object.prototype,ft=ct.propertyIsEnumerable,pt=Object.getOwnPropertySymbols,ht=pt?function(mt){return mt==null?[]:(mt=Object(mt),st(pt(mt),function(yt){return ft.call(mt,yt)}))}:ut;rt.exports=ht},{"./_arrayFilter":65,"./stubArray":277}],167:[function(nt,rt,ot){var st=nt("./_arrayPush"),ut=nt("./_getPrototype"),ct=nt("./_getSymbols"),ft=nt("./stubArray"),pt=Object.getOwnPropertySymbols,ht=pt?function(mt){for(var yt=[];mt;)st(yt,ct(mt)),mt=ut(mt);return yt}:ft;rt.exports=ht},{"./_arrayPush":70,"./_getPrototype":164,"./_getSymbols":166,"./stubArray":277}],168:[function(nt,rt,ot){var st=nt("./_DataView"),ut=nt("./_Map"),ct=nt("./_Promise"),ft=nt("./_Set"),pt=nt("./_WeakMap"),ht=nt("./_baseGetTag"),mt=nt("./_toSource"),yt="[object Map]",vt="[object Object]",Tt="[object Promise]",Et="[object Set]",xt="[object WeakMap]",At="[object DataView]",Ct=mt(st),$t=mt(ut),Ot=mt(ct),Rt=mt(ft),It=mt(pt),kt=ht;(st&&kt(new st(new ArrayBuffer(1)))!=At||ut&&kt(new ut)!=yt||ct&&kt(ct.resolve())!=Tt||ft&&kt(new ft)!=Et||pt&&kt(new pt)!=xt)&&(kt=function(Mt){var Ft=ht(Mt),zt=Ft==vt?Mt.constructor:void 0,Vt=zt?mt(zt):"";if(Vt)switch(Vt){case Ct:return At;case $t:return yt;case Ot:return Tt;case Rt:return Et;case It:return xt}return Ft}),rt.exports=kt},{"./_DataView":51,"./_Map":54,"./_Promise":56,"./_Set":57,"./_WeakMap":62,"./_baseGetTag":91,"./_toSource":224}],169:[function(nt,rt,ot){function st(ut,ct){return ut?.[ct]}rt.exports=st},{}],170:[function(nt,rt,ot){var st=nt("./_castPath"),ut=nt("./isArguments"),ct=nt("./isArray"),ft=nt("./_isIndex"),pt=nt("./isLength"),ht=nt("./_toKey");function mt(yt,vt,Tt){vt=st(vt,yt);for(var Et=-1,xt=vt.length,At=!1;++Et<xt;){var Ct=ht(vt[Et]);if(!(At=yt!=null&&Tt(yt,Ct)))break;yt=yt[Ct]}return At||++Et!=xt?At:(xt=yt==null?0:yt.length,!!xt&&pt(xt)&&ft(Ct,xt)&&(ct(yt)||ut(yt)))}rt.exports=mt},{"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isArguments":242,"./isArray":243,"./isLength":249}],171:[function(nt,rt,ot){var st="\\ud800-\\udfff",ut="\\u0300-\\u036f",ct="\\ufe20-\\ufe2f",ft="\\u20d0-\\u20ff",pt=ut+ct+ft,ht="\\ufe0e\\ufe0f",mt="\\u200d",yt=RegExp("["+mt+st+pt+ht+"]");function vt(Tt){return yt.test(Tt)}rt.exports=vt},{}],172:[function(nt,rt,ot){var st=nt("./_nativeCreate");function ut(){this.__data__=st?st(null):{},this.size=0}rt.exports=ut},{"./_nativeCreate":201}],173:[function(nt,rt,ot){function st(ut){var ct=this.has(ut)&&delete this.__data__[ut];return this.size-=ct?1:0,ct}rt.exports=st},{}],174:[function(nt,rt,ot){var st=nt("./_nativeCreate"),ut="__lodash_hash_undefined__",ct=Object.prototype,ft=ct.hasOwnProperty;function pt(ht){var mt=this.__data__;if(st){var yt=mt[ht];return yt===ut?void 0:yt}return ft.call(mt,ht)?mt[ht]:void 0}rt.exports=pt},{"./_nativeCreate":201}],175:[function(nt,rt,ot){var st=nt("./_nativeCreate"),ut=Object.prototype,ct=ut.hasOwnProperty;function ft(pt){var ht=this.__data__;return st?ht[pt]!==void 0:ct.call(ht,pt)}rt.exports=ft},{"./_nativeCreate":201}],176:[function(nt,rt,ot){var st=nt("./_nativeCreate"),ut="__lodash_hash_undefined__";function ct(ft,pt){var ht=this.__data__;return this.size+=this.has(ft)?0:1,ht[ft]=st&&pt===void 0?ut:pt,this}rt.exports=ct},{"./_nativeCreate":201}],177:[function(nt,rt,ot){var st=Object.prototype,ut=st.hasOwnProperty;function ct(ft){var pt=ft.length,ht=new ft.constructor(pt);return pt&&typeof ft[0]=="string"&&ut.call(ft,"index")&&(ht.index=ft.index,ht.input=ft.input),ht}rt.exports=ct},{}],178:[function(nt,rt,ot){var st=nt("./_cloneArrayBuffer"),ut=nt("./_cloneDataView"),ct=nt("./_cloneRegExp"),ft=nt("./_cloneSymbol"),pt=nt("./_cloneTypedArray"),ht="[object Boolean]",mt="[object Date]",yt="[object Map]",vt="[object Number]",Tt="[object RegExp]",Et="[object Set]",xt="[object String]",At="[object Symbol]",Ct="[object ArrayBuffer]",$t="[object DataView]",Ot="[object Float32Array]",Rt="[object Float64Array]",It="[object Int8Array]",kt="[object Int16Array]",Mt="[object Int32Array]",Ft="[object Uint8Array]",zt="[object Uint8ClampedArray]",Vt="[object Uint16Array]",Zt="[object Uint32Array]";function Ut(Xt,Jt,gn){var An=Xt.constructor;switch(Jt){case Ct:return st(Xt);case ht:case mt:return new An(+Xt);case $t:return ut(Xt,gn);case Ot:case Rt:case It:case kt:case Mt:case Ft:case zt:case Vt:case Zt:return pt(Xt,gn);case yt:return new An;case vt:case xt:return new An(Xt);case Tt:return ct(Xt);case Et:return new An;case At:return ft(Xt)}}rt.exports=Ut},{"./_cloneArrayBuffer":134,"./_cloneDataView":136,"./_cloneRegExp":137,"./_cloneSymbol":138,"./_cloneTypedArray":139}],179:[function(nt,rt,ot){var st=nt("./_baseCreate"),ut=nt("./_getPrototype"),ct=nt("./_isPrototype");function ft(pt){return typeof pt.constructor=="function"&&!ct(pt)?st(ut(pt)):{}}rt.exports=ft},{"./_baseCreate":81,"./_getPrototype":164,"./_isPrototype":186}],180:[function(nt,rt,ot){var st=nt("./_Symbol"),ut=nt("./isArguments"),ct=nt("./isArray"),ft=st?st.isConcatSpreadable:void 0;function pt(ht){return ct(ht)||ut(ht)||!!(ft&&ht&&ht[ft])}rt.exports=pt},{"./_Symbol":60,"./isArguments":242,"./isArray":243}],181:[function(nt,rt,ot){var st=9007199254740991,ut=/^(?:0|[1-9]\d*)$/;function ct(ft,pt){var ht=typeof ft;return pt=pt??st,!!pt&&(ht=="number"||ht!="symbol"&&ut.test(ft))&&ft>-1&&ft%1==0&&ft<pt}rt.exports=ct},{}],182:[function(nt,rt,ot){var st=nt("./eq"),ut=nt("./isArrayLike"),ct=nt("./_isIndex"),ft=nt("./isObject");function pt(ht,mt,yt){if(!ft(yt))return!1;var vt=typeof mt;return(vt=="number"?ut(yt)&&ct(mt,yt.length):vt=="string"&&mt in yt)?st(yt[mt],ht):!1}rt.exports=pt},{"./_isIndex":181,"./eq":231,"./isArrayLike":244,"./isObject":251}],183:[function(nt,rt,ot){var st=nt("./isArray"),ut=nt("./isSymbol"),ct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ft=/^\w*$/;function pt(ht,mt){if(st(ht))return!1;var yt=typeof ht;return yt=="number"||yt=="symbol"||yt=="boolean"||ht==null||ut(ht)?!0:ft.test(ht)||!ct.test(ht)||mt!=null&&ht in Object(mt)}rt.exports=pt},{"./isArray":243,"./isSymbol":256}],184:[function(nt,rt,ot){function st(ut){var ct=typeof ut;return ct=="string"||ct=="number"||ct=="symbol"||ct=="boolean"?ut!=="__proto__":ut===null}rt.exports=st},{}],185:[function(nt,rt,ot){var st=nt("./_coreJsData"),ut=function(){var ft=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||"");return ft?"Symbol(src)_1."+ft:""}();function ct(ft){return!!ut&&ut in ft}rt.exports=ct},{"./_coreJsData":146}],186:[function(nt,rt,ot){var st=Object.prototype;function ut(ct){var ft=ct&&ct.constructor,pt=typeof ft=="function"&&ft.prototype||st;return ct===pt}rt.exports=ut},{}],187:[function(nt,rt,ot){var st=nt("./isObject");function ut(ct){return ct===ct&&!st(ct)}rt.exports=ut},{"./isObject":251}],188:[function(nt,rt,ot){function st(){this.__data__=[],this.size=0}rt.exports=st},{}],189:[function(nt,rt,ot){var st=nt("./_assocIndexOf"),ut=Array.prototype,ct=ut.splice;function ft(pt){var ht=this.__data__,mt=st(ht,pt);if(mt<0)return!1;var yt=ht.length-1;return mt==yt?ht.pop():ct.call(ht,mt,1),--this.size,!0}rt.exports=ft},{"./_assocIndexOf":76}],190:[function(nt,rt,ot){var st=nt("./_assocIndexOf");function ut(ct){var ft=this.__data__,pt=st(ft,ct);return pt<0?void 0:ft[pt][1]}rt.exports=ut},{"./_assocIndexOf":76}],191:[function(nt,rt,ot){var st=nt("./_assocIndexOf");function ut(ct){return st(this.__data__,ct)>-1}rt.exports=ut},{"./_assocIndexOf":76}],192:[function(nt,rt,ot){var st=nt("./_assocIndexOf");function ut(ct,ft){var pt=this.__data__,ht=st(pt,ct);return ht<0?(++this.size,pt.push([ct,ft])):pt[ht][1]=ft,this}rt.exports=ut},{"./_assocIndexOf":76}],193:[function(nt,rt,ot){var st=nt("./_Hash"),ut=nt("./_ListCache"),ct=nt("./_Map");function ft(){this.size=0,this.__data__={hash:new st,map:new(ct||ut),string:new st}}rt.exports=ft},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(nt,rt,ot){var st=nt("./_getMapData");function ut(ct){var ft=st(this,ct).delete(ct);return this.size-=ft?1:0,ft}rt.exports=ut},{"./_getMapData":161}],195:[function(nt,rt,ot){var st=nt("./_getMapData");function ut(ct){return st(this,ct).get(ct)}rt.exports=ut},{"./_getMapData":161}],196:[function(nt,rt,ot){var st=nt("./_getMapData");function ut(ct){return st(this,ct).has(ct)}rt.exports=ut},{"./_getMapData":161}],197:[function(nt,rt,ot){var st=nt("./_getMapData");function ut(ct,ft){var pt=st(this,ct),ht=pt.size;return pt.set(ct,ft),this.size+=pt.size==ht?0:1,this}rt.exports=ut},{"./_getMapData":161}],198:[function(nt,rt,ot){function st(ut){var ct=-1,ft=Array(ut.size);return ut.forEach(function(pt,ht){ft[++ct]=[ht,pt]}),ft}rt.exports=st},{}],199:[function(nt,rt,ot){function st(ut,ct){return function(ft){return ft==null?!1:ft[ut]===ct&&(ct!==void 0||ut in Object(ft))}}rt.exports=st},{}],200:[function(nt,rt,ot){var st=nt("./memoize"),ut=500;function ct(ft){var pt=st(ft,function(mt){return ht.size===ut&&ht.clear(),mt}),ht=pt.cache;return pt}rt.exports=ct},{"./memoize":265}],201:[function(nt,rt,ot){var st=nt("./_getNative"),ut=st(Object,"create");rt.exports=ut},{"./_getNative":163}],202:[function(nt,rt,ot){var st=nt("./_overArg"),ut=st(Object.keys,Object);rt.exports=ut},{"./_overArg":206}],203:[function(nt,rt,ot){function st(ut){var ct=[];if(ut!=null)for(var ft in Object(ut))ct.push(ft);return ct}rt.exports=st},{}],204:[function(nt,rt,ot){var st=nt("./_freeGlobal"),ut=typeof ot=="object"&&ot&&!ot.nodeType&&ot,ct=ut&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,ft=ct&&ct.exports===ut,pt=ft&&st.process,ht=function(){try{var mt=ct&&ct.require&&ct.require("util").types;return mt||pt&&pt.binding&&pt.binding("util")}catch{}}();rt.exports=ht},{"./_freeGlobal":158}],205:[function(nt,rt,ot){var st=Object.prototype,ut=st.toString;function ct(ft){return ut.call(ft)}rt.exports=ct},{}],206:[function(nt,rt,ot){function st(ut,ct){return function(ft){return ut(ct(ft))}}rt.exports=st},{}],207:[function(nt,rt,ot){var st=nt("./_apply"),ut=Math.max;function ct(ft,pt,ht){return pt=ut(pt===void 0?ft.length-1:pt,0),function(){for(var mt=arguments,yt=-1,vt=ut(mt.length-pt,0),Tt=Array(vt);++yt<vt;)Tt[yt]=mt[pt+yt];yt=-1;for(var Et=Array(pt+1);++yt<pt;)Et[yt]=mt[yt];return Et[pt]=ht(Tt),st(ft,this,Et)}}rt.exports=ct},{"./_apply":63}],208:[function(nt,rt,ot){var st=nt("./_freeGlobal"),ut=typeof self=="object"&&self&&self.Object===Object&&self,ct=st||ut||Function("return this")();rt.exports=ct},{"./_freeGlobal":158}],209:[function(nt,rt,ot){function st(ut,ct){if(!(ct==="constructor"&&typeof ut[ct]=="function")&&ct!="__proto__")return ut[ct]}rt.exports=st},{}],210:[function(nt,rt,ot){var st="__lodash_hash_undefined__";function ut(ct){return this.__data__.set(ct,st),this}rt.exports=ut},{}],211:[function(nt,rt,ot){function st(ut){return this.__data__.has(ut)}rt.exports=st},{}],212:[function(nt,rt,ot){function st(ut){var ct=-1,ft=Array(ut.size);return ut.forEach(function(pt){ft[++ct]=pt}),ft}rt.exports=st},{}],213:[function(nt,rt,ot){var st=nt("./_baseSetToString"),ut=nt("./_shortOut"),ct=ut(st);rt.exports=ct},{"./_baseSetToString":123,"./_shortOut":214}],214:[function(nt,rt,ot){var st=800,ut=16,ct=Date.now;function ft(pt){var ht=0,mt=0;return function(){var yt=ct(),vt=ut-(yt-mt);if(mt=yt,vt>0){if(++ht>=st)return arguments[0]}else ht=0;return pt.apply(void 0,arguments)}}rt.exports=ft},{}],215:[function(nt,rt,ot){var st=nt("./_ListCache");function ut(){this.__data__=new st,this.size=0}rt.exports=ut},{"./_ListCache":53}],216:[function(nt,rt,ot){function st(ut){var ct=this.__data__,ft=ct.delete(ut);return this.size=ct.size,ft}rt.exports=st},{}],217:[function(nt,rt,ot){function st(ut){return this.__data__.get(ut)}rt.exports=st},{}],218:[function(nt,rt,ot){function st(ut){return this.__data__.has(ut)}rt.exports=st},{}],219:[function(nt,rt,ot){var st=nt("./_ListCache"),ut=nt("./_Map"),ct=nt("./_MapCache"),ft=200;function pt(ht,mt){var yt=this.__data__;if(yt instanceof st){var vt=yt.__data__;if(!ut||vt.length<ft-1)return vt.push([ht,mt]),this.size=++yt.size,this;yt=this.__data__=new ct(vt)}return yt.set(ht,mt),this.size=yt.size,this}rt.exports=pt},{"./_ListCache":53,"./_Map":54,"./_MapCache":55}],220:[function(nt,rt,ot){function st(ut,ct,ft){for(var pt=ft-1,ht=ut.length;++pt<ht;)if(ut[pt]===ct)return pt;return-1}rt.exports=st},{}],221:[function(nt,rt,ot){var st=nt("./_asciiSize"),ut=nt("./_hasUnicode"),ct=nt("./_unicodeSize");function ft(pt){return ut(pt)?ct(pt):st(pt)}rt.exports=ft},{"./_asciiSize":73,"./_hasUnicode":171,"./_unicodeSize":225}],222:[function(nt,rt,ot){var st=nt("./_memoizeCapped"),ut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ct=/\\(\\)?/g,ft=st(function(pt){var ht=[];return pt.charCodeAt(0)===46&&ht.push(""),pt.replace(ut,function(mt,yt,vt,Tt){ht.push(vt?Tt.replace(ct,"$1"):yt||mt)}),ht});rt.exports=ft},{"./_memoizeCapped":200}],223:[function(nt,rt,ot){var st=nt("./isSymbol"),ut=1/0;function ct(ft){if(typeof ft=="string"||st(ft))return ft;var pt=ft+"";return pt=="0"&&1/ft==-ut?"-0":pt}rt.exports=ct},{"./isSymbol":256}],224:[function(nt,rt,ot){var st=Function.prototype,ut=st.toString;function ct(ft){if(ft!=null){try{return ut.call(ft)}catch{}try{return ft+""}catch{}}return""}rt.exports=ct},{}],225:[function(nt,rt,ot){var st="\\ud800-\\udfff",ut="\\u0300-\\u036f",ct="\\ufe20-\\ufe2f",ft="\\u20d0-\\u20ff",pt=ut+ct+ft,ht="\\ufe0e\\ufe0f",mt="["+st+"]",yt="["+pt+"]",vt="\\ud83c[\\udffb-\\udfff]",Tt="(?:"+yt+"|"+vt+")",Et="[^"+st+"]",xt="(?:\\ud83c[\\udde6-\\uddff]){2}",At="[\\ud800-\\udbff][\\udc00-\\udfff]",Ct="\\u200d",$t=Tt+"?",Ot="["+ht+"]?",Rt="(?:"+Ct+"(?:"+[Et,xt,At].join("|")+")"+Ot+$t+")*",It=Ot+$t+Rt,kt="(?:"+[Et+yt+"?",yt,xt,At,mt].join("|")+")",Mt=RegExp(vt+"(?="+vt+")|"+kt+It,"g");function Ft(zt){for(var Vt=Mt.lastIndex=0;Mt.test(zt);)++Vt;return Vt}rt.exports=Ft},{}],226:[function(nt,rt,ot){var st=nt("./_baseClone"),ut=4;function ct(ft){return st(ft,ut)}rt.exports=ct},{"./_baseClone":80}],227:[function(nt,rt,ot){var st=nt("./_baseClone"),ut=1,ct=4;function ft(pt){return st(pt,ut|ct)}rt.exports=ft},{"./_baseClone":80}],228:[function(nt,rt,ot){function st(ut){return function(){return ut}}rt.exports=st},{}],229:[function(nt,rt,ot){var st=nt("./_baseRest"),ut=nt("./eq"),ct=nt("./_isIterateeCall"),ft=nt("./keysIn"),pt=Object.prototype,ht=pt.hasOwnProperty,mt=st(function(yt,vt){yt=Object(yt);var Tt=-1,Et=vt.length,xt=Et>2?vt[2]:void 0;for(xt&&ct(vt[0],vt[1],xt)&&(Et=1);++Tt<Et;)for(var At=vt[Tt],Ct=ft(At),$t=-1,Ot=Ct.length;++$t<Ot;){var Rt=Ct[$t],It=yt[Rt];(It===void 0||ut(It,pt[Rt])&&!ht.call(yt,Rt))&&(yt[Rt]=At[Rt])}return yt});rt.exports=mt},{"./_baseRest":121,"./_isIterateeCall":182,"./eq":231,"./keysIn":260}],230:[function(nt,rt,ot){rt.exports=nt("./forEach")},{"./forEach":236}],231:[function(nt,rt,ot){function st(ut,ct){return ut===ct||ut!==ut&&ct!==ct}rt.exports=st},{}],232:[function(nt,rt,ot){var st=nt("./_arrayFilter"),ut=nt("./_baseFilter"),ct=nt("./_baseIteratee"),ft=nt("./isArray");function pt(ht,mt){var yt=ft(ht)?st:ut;return yt(ht,ct(mt,3))}rt.exports=pt},{"./_arrayFilter":65,"./_baseFilter":84,"./_baseIteratee":105,"./isArray":243}],233:[function(nt,rt,ot){var st=nt("./_createFind"),ut=nt("./findIndex"),ct=st(ut);rt.exports=ct},{"./_createFind":150,"./findIndex":234}],234:[function(nt,rt,ot){var st=nt("./_baseFindIndex"),ut=nt("./_baseIteratee"),ct=nt("./toInteger"),ft=Math.max;function pt(ht,mt,yt){var vt=ht==null?0:ht.length;if(!vt)return-1;var Tt=yt==null?0:ct(yt);return Tt<0&&(Tt=ft(vt+Tt,0)),st(ht,ut(mt,3),Tt)}rt.exports=pt},{"./_baseFindIndex":85,"./_baseIteratee":105,"./toInteger":280}],235:[function(nt,rt,ot){var st=nt("./_baseFlatten");function ut(ct){var ft=ct==null?0:ct.length;return ft?st(ct,1):[]}rt.exports=ut},{"./_baseFlatten":86}],236:[function(nt,rt,ot){var st=nt("./_arrayEach"),ut=nt("./_baseEach"),ct=nt("./_castFunction"),ft=nt("./isArray");function pt(ht,mt){var yt=ft(ht)?st:ut;return yt(ht,ct(mt))}rt.exports=pt},{"./_arrayEach":64,"./_baseEach":82,"./_castFunction":132,"./isArray":243}],237:[function(nt,rt,ot){var st=nt("./_baseFor"),ut=nt("./_castFunction"),ct=nt("./keysIn");function ft(pt,ht){return pt==null?pt:st(pt,ut(ht),ct)}rt.exports=ft},{"./_baseFor":87,"./_castFunction":132,"./keysIn":260}],238:[function(nt,rt,ot){var st=nt("./_baseGet");function ut(ct,ft,pt){var ht=ct==null?void 0:st(ct,ft);return ht===void 0?pt:ht}rt.exports=ut},{"./_baseGet":89}],239:[function(nt,rt,ot){var st=nt("./_baseHas"),ut=nt("./_hasPath");function ct(ft,pt){return ft!=null&&ut(ft,pt,st)}rt.exports=ct},{"./_baseHas":93,"./_hasPath":170}],240:[function(nt,rt,ot){var st=nt("./_baseHasIn"),ut=nt("./_hasPath");function ct(ft,pt){return ft!=null&&ut(ft,pt,st)}rt.exports=ct},{"./_baseHasIn":94,"./_hasPath":170}],241:[function(nt,rt,ot){function st(ut){return ut}rt.exports=st},{}],242:[function(nt,rt,ot){var st=nt("./_baseIsArguments"),ut=nt("./isObjectLike"),ct=Object.prototype,ft=ct.hasOwnProperty,pt=ct.propertyIsEnumerable,ht=st(function(){return arguments}())?st:function(mt){return ut(mt)&&ft.call(mt,"callee")&&!pt.call(mt,"callee")};rt.exports=ht},{"./_baseIsArguments":96,"./isObjectLike":252}],243:[function(nt,rt,ot){var st=Array.isArray;rt.exports=st},{}],244:[function(nt,rt,ot){var st=nt("./isFunction"),ut=nt("./isLength");function ct(ft){return ft!=null&&ut(ft.length)&&!st(ft)}rt.exports=ct},{"./isFunction":248,"./isLength":249}],245:[function(nt,rt,ot){var st=nt("./isArrayLike"),ut=nt("./isObjectLike");function ct(ft){return ut(ft)&&st(ft)}rt.exports=ct},{"./isArrayLike":244,"./isObjectLike":252}],246:[function(nt,rt,ot){var st=nt("./_root"),ut=nt("./stubFalse"),ct=typeof ot=="object"&&ot&&!ot.nodeType&&ot,ft=ct&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,pt=ft&&ft.exports===ct,ht=pt?st.Buffer:void 0,mt=ht?ht.isBuffer:void 0,yt=mt||ut;rt.exports=yt},{"./_root":208,"./stubFalse":278}],247:[function(nt,rt,ot){var st=nt("./_baseKeys"),ut=nt("./_getTag"),ct=nt("./isArguments"),ft=nt("./isArray"),pt=nt("./isArrayLike"),ht=nt("./isBuffer"),mt=nt("./_isPrototype"),yt=nt("./isTypedArray"),vt="[object Map]",Tt="[object Set]",Et=Object.prototype,xt=Et.hasOwnProperty;function At(Ct){if(Ct==null)return!0;if(pt(Ct)&&(ft(Ct)||typeof Ct=="string"||typeof Ct.splice=="function"||ht(Ct)||yt(Ct)||ct(Ct)))return!Ct.length;var $t=ut(Ct);if($t==vt||$t==Tt)return!Ct.size;if(mt(Ct))return!st(Ct).length;for(var Ot in Ct)if(xt.call(Ct,Ot))return!1;return!0}rt.exports=At},{"./_baseKeys":106,"./_getTag":168,"./_isPrototype":186,"./isArguments":242,"./isArray":243,"./isArrayLike":244,"./isBuffer":246,"./isTypedArray":257}],248:[function(nt,rt,ot){var st=nt("./_baseGetTag"),ut=nt("./isObject"),ct="[object AsyncFunction]",ft="[object Function]",pt="[object GeneratorFunction]",ht="[object Proxy]";function mt(yt){if(!ut(yt))return!1;var vt=st(yt);return vt==ft||vt==pt||vt==ct||vt==ht}rt.exports=mt},{"./_baseGetTag":91,"./isObject":251}],249:[function(nt,rt,ot){var st=9007199254740991;function ut(ct){return typeof ct=="number"&&ct>-1&&ct%1==0&&ct<=st}rt.exports=ut},{}],250:[function(nt,rt,ot){var st=nt("./_baseIsMap"),ut=nt("./_baseUnary"),ct=nt("./_nodeUtil"),ft=ct&&ct.isMap,pt=ft?ut(ft):st;rt.exports=pt},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(nt,rt,ot){function st(ut){var ct=typeof ut;return ut!=null&&(ct=="object"||ct=="function")}rt.exports=st},{}],252:[function(nt,rt,ot){function st(ut){return ut!=null&&typeof ut=="object"}rt.exports=st},{}],253:[function(nt,rt,ot){var st=nt("./_baseGetTag"),ut=nt("./_getPrototype"),ct=nt("./isObjectLike"),ft="[object Object]",pt=Function.prototype,ht=Object.prototype,mt=pt.toString,yt=ht.hasOwnProperty,vt=mt.call(Object);function Tt(Et){if(!ct(Et)||st(Et)!=ft)return!1;var xt=ut(Et);if(xt===null)return!0;var At=yt.call(xt,"constructor")&&xt.constructor;return typeof At=="function"&&At instanceof At&&mt.call(At)==vt}rt.exports=Tt},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(nt,rt,ot){var st=nt("./_baseIsSet"),ut=nt("./_baseUnary"),ct=nt("./_nodeUtil"),ft=ct&&ct.isSet,pt=ft?ut(ft):st;rt.exports=pt},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(nt,rt,ot){var st=nt("./_baseGetTag"),ut=nt("./isArray"),ct=nt("./isObjectLike"),ft="[object String]";function pt(ht){return typeof ht=="string"||!ut(ht)&&ct(ht)&&st(ht)==ft}rt.exports=pt},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(nt,rt,ot){var st=nt("./_baseGetTag"),ut=nt("./isObjectLike"),ct="[object Symbol]";function ft(pt){return typeof pt=="symbol"||ut(pt)&&st(pt)==ct}rt.exports=ft},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(nt,rt,ot){var st=nt("./_baseIsTypedArray"),ut=nt("./_baseUnary"),ct=nt("./_nodeUtil"),ft=ct&&ct.isTypedArray,pt=ft?ut(ft):st;rt.exports=pt},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(nt,rt,ot){function st(ut){return ut===void 0}rt.exports=st},{}],259:[function(nt,rt,ot){var st=nt("./_arrayLikeKeys"),ut=nt("./_baseKeys"),ct=nt("./isArrayLike");function ft(pt){return ct(pt)?st(pt):ut(pt)}rt.exports=ft},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(nt,rt,ot){var st=nt("./_arrayLikeKeys"),ut=nt("./_baseKeysIn"),ct=nt("./isArrayLike");function ft(pt){return ct(pt)?st(pt,!0):ut(pt)}rt.exports=ft},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(nt,rt,ot){function st(ut){var ct=ut==null?0:ut.length;return ct?ut[ct-1]:void 0}rt.exports=st},{}],262:[function(nt,rt,ot){var st=nt("./_arrayMap"),ut=nt("./_baseIteratee"),ct=nt("./_baseMap"),ft=nt("./isArray");function pt(ht,mt){var yt=ft(ht)?st:ct;return yt(ht,ut(mt,3))}rt.exports=pt},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(nt,rt,ot){var st=nt("./_baseAssignValue"),ut=nt("./_baseForOwn"),ct=nt("./_baseIteratee");function ft(pt,ht){var mt={};return ht=ct(ht,3),ut(pt,function(yt,vt,Tt){st(mt,vt,ht(yt,vt,Tt))}),mt}rt.exports=ft},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(nt,rt,ot){var st=nt("./_baseExtremum"),ut=nt("./_baseGt"),ct=nt("./identity");function ft(pt){return pt&&pt.length?st(pt,ct,ut):void 0}rt.exports=ft},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(nt,rt,ot){var st=nt("./_MapCache"),ut="Expected a function";function ct(ft,pt){if(typeof ft!="function"||pt!=null&&typeof pt!="function")throw new TypeError(ut);var ht=function(){var mt=arguments,yt=pt?pt.apply(this,mt):mt[0],vt=ht.cache;if(vt.has(yt))return vt.get(yt);var Tt=ft.apply(this,mt);return ht.cache=vt.set(yt,Tt)||vt,Tt};return ht.cache=new(ct.Cache||st),ht}ct.Cache=st,rt.exports=ct},{"./_MapCache":55}],266:[function(nt,rt,ot){var st=nt("./_baseMerge"),ut=nt("./_createAssigner"),ct=ut(function(ft,pt,ht){st(ft,pt,ht)});rt.exports=ct},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(nt,rt,ot){var st=nt("./_baseExtremum"),ut=nt("./_baseLt"),ct=nt("./identity");function ft(pt){return pt&&pt.length?st(pt,ct,ut):void 0}rt.exports=ft},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(nt,rt,ot){var st=nt("./_baseExtremum"),ut=nt("./_baseIteratee"),ct=nt("./_baseLt");function ft(pt,ht){return pt&&pt.length?st(pt,ut(ht,2),ct):void 0}rt.exports=ft},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(nt,rt,ot){function st(){}rt.exports=st},{}],270:[function(nt,rt,ot){var st=nt("./_root"),ut=function(){return st.Date.now()};rt.exports=ut},{"./_root":208}],271:[function(nt,rt,ot){var st=nt("./_basePick"),ut=nt("./_flatRest"),ct=ut(function(ft,pt){return ft==null?{}:st(ft,pt)});rt.exports=ct},{"./_basePick":115,"./_flatRest":157}],272:[function(nt,rt,ot){var st=nt("./_baseProperty"),ut=nt("./_basePropertyDeep"),ct=nt("./_isKey"),ft=nt("./_toKey");function pt(ht){return ct(ht)?st(ft(ht)):ut(ht)}rt.exports=pt},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(nt,rt,ot){var st=nt("./_createRange"),ut=st();rt.exports=ut},{"./_createRange":151}],274:[function(nt,rt,ot){var st=nt("./_arrayReduce"),ut=nt("./_baseEach"),ct=nt("./_baseIteratee"),ft=nt("./_baseReduce"),pt=nt("./isArray");function ht(mt,yt,vt){var Tt=pt(mt)?st:ft,Et=arguments.length<3;return Tt(mt,ct(yt,4),vt,Et,ut)}rt.exports=ht},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(nt,rt,ot){var st=nt("./_baseKeys"),ut=nt("./_getTag"),ct=nt("./isArrayLike"),ft=nt("./isString"),pt=nt("./_stringSize"),ht="[object Map]",mt="[object Set]";function yt(vt){if(vt==null)return 0;if(ct(vt))return ft(vt)?pt(vt):vt.length;var Tt=ut(vt);return Tt==ht||Tt==mt?vt.size:st(vt).length}rt.exports=yt},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(nt,rt,ot){var st=nt("./_baseFlatten"),ut=nt("./_baseOrderBy"),ct=nt("./_baseRest"),ft=nt("./_isIterateeCall"),pt=ct(function(ht,mt){if(ht==null)return[];var yt=mt.length;return yt>1&&ft(ht,mt[0],mt[1])?mt=[]:yt>2&&ft(mt[0],mt[1],mt[2])&&(mt=[mt[0]]),ut(ht,st(mt,1),[])});rt.exports=pt},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(nt,rt,ot){function st(){return[]}rt.exports=st},{}],278:[function(nt,rt,ot){function st(){return!1}rt.exports=st},{}],279:[function(nt,rt,ot){var st=nt("./toNumber"),ut=1/0,ct=17976931348623157e292;function ft(pt){if(!pt)return pt===0?pt:0;if(pt=st(pt),pt===ut||pt===-ut){var ht=pt<0?-1:1;return ht*ct}return pt===pt?pt:0}rt.exports=ft},{"./toNumber":281}],280:[function(nt,rt,ot){var st=nt("./toFinite");function ut(ct){var ft=st(ct),pt=ft%1;return ft===ft?pt?ft-pt:ft:0}rt.exports=ut},{"./toFinite":279}],281:[function(nt,rt,ot){var st=nt("./isObject"),ut=nt("./isSymbol"),ct=0/0,ft=/^\s+|\s+$/g,pt=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,mt=/^0o[0-7]+$/i,yt=parseInt;function vt(Tt){if(typeof Tt=="number")return Tt;if(ut(Tt))return ct;if(st(Tt)){var Et=typeof Tt.valueOf=="function"?Tt.valueOf():Tt;Tt=st(Et)?Et+"":Et}if(typeof Tt!="string")return Tt===0?Tt:+Tt;Tt=Tt.replace(ft,"");var xt=ht.test(Tt);return xt||mt.test(Tt)?yt(Tt.slice(2),xt?2:8):pt.test(Tt)?ct:+Tt}rt.exports=vt},{"./isObject":251,"./isSymbol":256}],282:[function(nt,rt,ot){var st=nt("./_copyObject"),ut=nt("./keysIn");function ct(ft){return st(ft,ut(ft))}rt.exports=ct},{"./_copyObject":143,"./keysIn":260}],283:[function(nt,rt,ot){var st=nt("./_baseToString");function ut(ct){return ct==null?"":st(ct)}rt.exports=ut},{"./_baseToString":126}],284:[function(nt,rt,ot){var st=nt("./_arrayEach"),ut=nt("./_baseCreate"),ct=nt("./_baseForOwn"),ft=nt("./_baseIteratee"),pt=nt("./_getPrototype"),ht=nt("./isArray"),mt=nt("./isBuffer"),yt=nt("./isFunction"),vt=nt("./isObject"),Tt=nt("./isTypedArray");function Et(xt,At,Ct){var $t=ht(xt),Ot=$t||mt(xt)||Tt(xt);if(At=ft(At,4),Ct==null){var Rt=xt&&xt.constructor;Ot?Ct=$t?new Rt:[]:vt(xt)?Ct=yt(Rt)?ut(pt(xt)):{}:Ct={}}return(Ot?st:ct)(xt,function(It,kt,Mt){return At(Ct,It,kt,Mt)}),Ct}rt.exports=Et},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(nt,rt,ot){var st=nt("./_baseFlatten"),ut=nt("./_baseRest"),ct=nt("./_baseUniq"),ft=nt("./isArrayLikeObject"),pt=ut(function(ht){return ct(st(ht,1,ft,!0))});rt.exports=pt},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(nt,rt,ot){var st=nt("./toString"),ut=0;function ct(ft){var pt=++ut;return st(ft)+pt}rt.exports=ct},{"./toString":283}],287:[function(nt,rt,ot){var st=nt("./_baseValues"),ut=nt("./keys");function ct(ft){return ft==null?[]:st(ft,ut(ft))}rt.exports=ct},{"./_baseValues":129,"./keys":259}],288:[function(nt,rt,ot){var st=nt("./_assignValue"),ut=nt("./_baseZipObject");function ct(ft,pt){return ut(ft||[],pt||[],st)}rt.exports=ct},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1)})}(dagre_min)),dagre_min.exports}(function(et,tt){(function(rt,ot){et.exports=ot(requireDagre_min())})(commonjsGlobal$1,function(nt){return function(rt){var ot={};function st(ut){if(ot[ut])return ot[ut].exports;var ct=ot[ut]={i:ut,l:!1,exports:{}};return rt[ut].call(ct.exports,ct,ct.exports,st),ct.l=!0,ct.exports}return st.m=rt,st.c=ot,st.d=function(ut,ct,ft){st.o(ut,ct)||Object.defineProperty(ut,ct,{enumerable:!0,get:ft})},st.r=function(ut){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ut,"__esModule",{value:!0})},st.t=function(ut,ct){if(ct&1&&(ut=st(ut)),ct&8||ct&4&&typeof ut=="object"&&ut&&ut.__esModule)return ut;var ft=Object.create(null);if(st.r(ft),Object.defineProperty(ft,"default",{enumerable:!0,value:ut}),ct&2&&typeof ut!="string")for(var pt in ut)st.d(ft,pt,function(ht){return ut[ht]}.bind(null,pt));return ft},st.n=function(ut){var ct=ut&&ut.__esModule?function(){return ut.default}:function(){return ut};return st.d(ct,"a",ct),ct},st.o=function(ut,ct){return Object.prototype.hasOwnProperty.call(ut,ct)},st.p="",st(st.s=0)}([function(rt,ot,st){var ut=st(1),ct=function(pt){!pt||pt("layout","dagre",ut)};typeof cytoscape<"u"&&ct(cytoscape),rt.exports=ct},function(rt,ot,st){function ut(yt){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ut=function(Tt){return typeof Tt}:ut=function(Tt){return Tt&&typeof Symbol=="function"&&Tt.constructor===Symbol&&Tt!==Symbol.prototype?"symbol":typeof Tt},ut(yt)}var ct=function(vt){return typeof vt=="function"},ft=st(2),pt=st(3),ht=st(4);function mt(yt){this.options=pt({},ft,yt)}mt.prototype.run=function(){var yt=this.options,vt=this,Tt=yt.cy,Et=yt.eles,xt=function(_n,En){return ct(En)?En.apply(_n,[_n]):En},At=yt.boundingBox||{x1:0,y1:0,w:Tt.width(),h:Tt.height()};At.x2===void 0&&(At.x2=At.x1+At.w),At.w===void 0&&(At.w=At.x2-At.x1),At.y2===void 0&&(At.y2=At.y1+At.h),At.h===void 0&&(At.h=At.y2-At.y1);var Ct=new ht.graphlib.Graph({multigraph:!0,compound:!0}),$t={},Ot=function(_n,En){En!=null&&($t[_n]=En)};Ot("nodesep",yt.nodeSep),Ot("edgesep",yt.edgeSep),Ot("ranksep",yt.rankSep),Ot("rankdir",yt.rankDir),Ot("align",yt.align),Ot("ranker",yt.ranker),Ot("acyclicer",yt.acyclicer),Ct.setGraph($t),Ct.setDefaultEdgeLabel(function(){return{}}),Ct.setDefaultNodeLabel(function(){return{}});var Rt=Et.nodes();ct(yt.sort)&&(Rt=Rt.sort(yt.sort));for(var It=0;It<Rt.length;It++){var kt=Rt[It],Mt=kt.layoutDimensions(yt);Ct.setNode(kt.id(),{width:Mt.w,height:Mt.h,name:kt.id()})}for(var Ft=0;Ft<Rt.length;Ft++){var zt=Rt[Ft];zt.isChild()&&Ct.setParent(zt.id(),zt.parent().id())}var Vt=Et.edges().stdFilter(function(In){return!In.source().isParent()&&!In.target().isParent()});ct(yt.sort)&&(Vt=Vt.sort(yt.sort));for(var Zt=0;Zt<Vt.length;Zt++){var Ut=Vt[Zt];Ct.setEdge(Ut.source().id(),Ut.target().id(),{minlen:xt(Ut,yt.minLen),weight:xt(Ut,yt.edgeWeight),name:Ut.id()},Ut.id())}ht.layout(Ct);for(var Xt=Ct.nodes(),Jt=0;Jt<Xt.length;Jt++){var gn=Xt[Jt],An=Ct.node(gn);Tt.getElementById(gn).scratch().dagre=An}var sn;yt.boundingBox?(sn={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},Rt.forEach(function(In){var _n=In.scratch().dagre;sn.x1=Math.min(sn.x1,_n.x),sn.x2=Math.max(sn.x2,_n.x),sn.y1=Math.min(sn.y1,_n.y),sn.y2=Math.max(sn.y2,_n.y)}),sn.w=sn.x2-sn.x1,sn.h=sn.y2-sn.y1):sn=At;var Sn=function(_n){if(yt.boundingBox){var En=sn.w===0?0:(_n.x-sn.x1)/sn.w,Ln=sn.h===0?0:(_n.y-sn.y1)/sn.h;return{x:At.x1+En*At.w,y:At.y1+Ln*At.h}}else return _n};return Rt.layoutPositions(vt,yt,function(In){In=ut(In)==="object"?In:this;var _n=In.scratch().dagre;return Sn({x:_n.x,y:_n.y})}),this},rt.exports=mt},function(rt,ot){var st={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,align:void 0,acyclicer:void 0,ranker:void 0,minLen:function(ct){return 1},edgeWeight:function(ct){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(ct,ft){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(ct,ft){return ft},ready:function(){},sort:void 0,stop:function(){}};rt.exports=st},function(rt,ot){rt.exports=Object.assign!=null?Object.assign.bind(Object):function(st){for(var ut=arguments.length,ct=new Array(ut>1?ut-1:0),ft=1;ft<ut;ft++)ct[ft-1]=arguments[ft];return ct.forEach(function(pt){Object.keys(pt).forEach(function(ht){return st[ht]=pt[ht]})}),st}},function(rt,ot){rt.exports=nt}])})})(cytoscapeDagre);const dagre=getDefaultExportFromCjs$1(cytoscapeDagre.exports);var reactCytoscape={exports:{}};(function(et,tt){(function(nt,rt){et.exports=rt(react.exports,reactDom.exports,propTypes$1.exports,requireCytoscape_cjs())})(window,function(nt,rt,ot,st){return function(ut){var ct={};function ft(pt){if(ct[pt])return ct[pt].exports;var ht=ct[pt]={i:pt,l:!1,exports:{}};return ut[pt].call(ht.exports,ht,ht.exports,ft),ht.l=!0,ht.exports}return ft.m=ut,ft.c=ct,ft.d=function(pt,ht,mt){ft.o(pt,ht)||Object.defineProperty(pt,ht,{enumerable:!0,get:mt})},ft.r=function(pt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(pt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(pt,"__esModule",{value:!0})},ft.t=function(pt,ht){if(1&ht&&(pt=ft(pt)),8&ht||4&ht&&typeof pt=="object"&&pt&&pt.__esModule)return pt;var mt=Object.create(null);if(ft.r(mt),Object.defineProperty(mt,"default",{enumerable:!0,value:pt}),2&ht&&typeof pt!="string")for(var yt in pt)ft.d(mt,yt,function(vt){return pt[vt]}.bind(null,yt));return mt},ft.n=function(pt){var ht=pt&&pt.__esModule?function(){return pt.default}:function(){return pt};return ft.d(ht,"a",ht),ht},ft.o=function(pt,ht){return Object.prototype.hasOwnProperty.call(pt,ht)},ft.p="",ft(ft.s=2)}([function(ut,ct,ft){Object.defineProperty(ct,"__esModule",{value:!0});var pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(yt){return typeof yt}:function(yt){return yt&&typeof Symbol=="function"&&yt.constructor===Symbol&&yt!==Symbol.prototype?"symbol":typeof yt},ht=pt({}),mt=function(yt,vt){return yt==null||vt==null};ct.hashDiff=function(yt,vt){return mt(yt,vt)||yt.hash()!==vt.hash()},ct.shallowObjDiff=function(yt,vt){if(mt(yt,vt)&&(yt!=null||vt!=null))return!0;if(yt===vt)return!1;if((yt===void 0?"undefined":pt(yt))!==ht||(vt===void 0?"undefined":pt(vt))!==ht)return yt!==vt;var Tt=Object.keys(yt),Et=Object.keys(vt),xt=function(At){return yt[At]!==vt[At]};return Tt.length!==Et.length||!(!Tt.some(xt)&&!Et.some(xt))}},function(ut,ct,ft){Object.defineProperty(ct,"__esModule",{value:!0}),ct.get=function(pt,ht){return pt!=null?pt[ht]:null},ct.toJson=function(pt){return pt},ct.forEach=function(pt,ht){return pt.forEach(ht)}},function(ut,ct,ft){ut.exports=ft(3).default},function(ut,ct,ft){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Ct($t,Ot){for(var Rt=0;Rt<Ot.length;Rt++){var It=Ot[Rt];It.enumerable=It.enumerable||!1,It.configurable=!0,"value"in It&&(It.writable=!0),Object.defineProperty($t,It.key,It)}}return function($t,Ot,Rt){return Ot&&Ct($t.prototype,Ot),Rt&&Ct($t,Rt),$t}}(),ht=xt(ft(4)),mt=xt(ft(5)),yt=ft(6),vt=ft(8),Tt=xt(ft(9)),Et=ft(10);function xt(Ct){return Ct&&Ct.__esModule?Ct:{default:Ct}}var At=function(Ct){function $t(Ot){(function(It,kt){if(!(It instanceof kt))throw new TypeError("Cannot call a class as a function")})(this,$t);var Rt=function(It,kt){if(!It)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!kt||typeof kt!="object"&&typeof kt!="function"?It:kt}(this,($t.__proto__||Object.getPrototypeOf($t)).call(this,Ot));return Rt.displayName="CytoscapeComponent",Rt}return function(Ot,Rt){if(typeof Rt!="function"&&Rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Rt);Ot.prototype=Object.create(Rt&&Rt.prototype,{constructor:{value:Ot,enumerable:!1,writable:!0,configurable:!0}}),Rt&&(Object.setPrototypeOf?Object.setPrototypeOf(Ot,Rt):Ot.__proto__=Rt)}($t,ht.default.Component),pt($t,null,[{key:"normalizeElements",value:function(Ot){if(Ot.length!=null)return Ot;var Rt=Ot.nodes,It=Ot.edges;return Rt==null&&(Rt=[]),It==null&&(It=[]),Rt.concat(It)}},{key:"propTypes",get:function(){return yt.types}},{key:"defaultProps",get:function(){return vt.defaults}}]),pt($t,[{key:"componentDidMount",value:function(){var Ot=mt.default.findDOMNode(this),Rt=this.props,It=Rt.global,kt=Rt.headless,Mt=Rt.styleEnabled,Ft=Rt.hideEdgesOnViewport,zt=Rt.textureOnViewport,Vt=Rt.motionBlur,Zt=Rt.motionBlurOpacity,Ut=Rt.wheelSensitivity,Xt=Rt.pixelRatio,Jt=this._cy=new Tt.default({container:Ot,headless:kt,styleEnabled:Mt,hideEdgesOnViewport:Ft,textureOnViewport:zt,motionBlur:Vt,motionBlurOpacity:Zt,wheelSensitivity:Ut,pixelRatio:Xt});It&&(window[It]=Jt),this.updateCytoscape(null,this.props)}},{key:"updateCytoscape",value:function(Ot,Rt){var It=this._cy,kt=Rt.diff,Mt=Rt.toJson,Ft=Rt.get,zt=Rt.forEach;(0,Et.patch)(It,Ot,Rt,kt,Mt,Ft,zt),Rt.cy!=null&&Rt.cy(It)}},{key:"componentDidUpdate",value:function(Ot){this.updateCytoscape(Ot,this.props)}},{key:"componentWillUnmount",value:function(){this._cy.destroy()}},{key:"render",value:function(){var Ot=this.props,Rt=Ot.id,It=Ot.className,kt=Ot.style;return ht.default.createElement("div",{id:Rt,className:It,style:kt})}}]),$t}();ct.default=At},function(ut,ct){ut.exports=nt},function(ut,ct){ut.exports=rt},function(ut,ct,ft){Object.defineProperty(ct,"__esModule",{value:!0}),ct.types=void 0;var pt=function(Ct){return Ct&&Ct.__esModule?Ct:{default:Ct}}(ft(7)),ht=pt.default.string,mt=pt.default.array,yt=pt.default.object,vt=pt.default.number,Tt=pt.default.bool,Et=pt.default.oneOfType,xt=pt.default.any,At=pt.default.func;ct.types={id:ht,className:ht,style:Et([ht,yt]),elements:Et([mt,xt]),stylesheet:Et([mt,xt]),layout:Et([yt,xt]),pan:Et([yt,xt]),zoom:vt,panningEnabled:Tt,userPanningEnabled:Tt,minZoom:vt,maxZoom:vt,zoomingEnabled:Tt,userZoomingEnabled:Tt,boxSelectionEnabled:Tt,autoungrabify:Tt,autolock:Tt,autounselectify:Tt,get:At,toJson:At,diff:At,forEach:At,cy:At,headless:Tt,styleEnabled:Tt,hideEdgesOnViewport:Tt,textureOnViewport:Tt,motionBlur:Tt,motionBlurOpacity:vt,wheelSensitivity:vt,pixelRatio:Et([ht,yt])}},function(ut,ct){ut.exports=ot},function(ut,ct,ft){Object.defineProperty(ct,"__esModule",{value:!0}),ct.defaults=ct.pan=ct.zoom=ct.stylesheet=ct.elements=ct.identity=void 0;var pt=ft(0),ht=ft(1),mt=(ct.identity=function(Et){return Et},ct.elements=[{data:{id:"a",label:"Example node A"}},{data:{id:"b",label:"Example node B"}},{data:{id:"e",source:"a",target:"b"}}]),yt=ct.stylesheet=[{selector:"node",style:{label:"data(label)"}}],vt=ct.zoom=1,Tt=ct.pan={x:0,y:0};ct.defaults={diff:pt.shallowObjDiff,get:ht.get,toJson:ht.toJson,forEach:ht.forEach,elements:mt,stylesheet:yt,zoom:vt,pan:Tt}},function(ut,ct){ut.exports=st},function(ut,ct,ft){Object.defineProperty(ct,"__esModule",{value:!0}),ct.patch=void 0;var pt=ft(1),ht=ft(0),mt=function(At,Ct,$t,Ot){return $t((0,pt.get)(At,Ot),(0,pt.get)(Ct,Ot))},yt=(ct.patch=function(At,Ct,$t,Ot,Rt,It,kt){At.batch(function(){(Ot===ht.shallowObjDiff||mt(Ct,$t,Ot,"elements"))&&Et(At,(0,pt.get)(Ct,"elements"),(0,pt.get)($t,"elements"),Rt,It,kt,Ot),mt(Ct,$t,Ot,"stylesheet")&&Tt(At,(0,pt.get)(Ct,"stylesheet"),(0,pt.get)($t,"stylesheet"),Rt),["zoom","minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","pan","panningEnabled","userPanningEnabled","boxSelectionEnabled","autoungrabify","autolock","autounselectify"].forEach(function(Mt){mt(Ct,$t,Ot,Mt)&&yt(At,Mt,(0,pt.get)(Ct,Mt),(0,pt.get)($t,Mt),Rt)})}),mt(Ct,$t,Ot,"layout")&&vt(At,(0,pt.get)(Ct,"layout"),(0,pt.get)($t,"layout"),Rt)},function(At,Ct,$t,Ot,Rt){At[Ct](Rt(Ot))}),vt=function(At,Ct,$t,Ot){var Rt=Ot($t);Rt!=null&&At.layout(Rt).run()},Tt=function(At,Ct,$t,Ot){var Rt=At.style();Rt?.fromJson(Ot($t)).update()},Et=function(At,Ct,$t,Ot,Rt,It,kt){var Mt=[],Ft=At.collection(),zt=[],Vt={},Zt={},Ut=function(Xt){return Rt(Rt(Xt,"data"),"id")};It($t,function(Xt){var Jt=Ut(Xt);Zt[Jt]=Xt}),Ct!=null&&It(Ct,function(Xt){var Jt=Ut(Xt);Vt[Jt]=Xt,function(gn){return Zt[gn]!=null}(Jt)||Ft.merge(At.getElementById(Jt))}),It($t,function(Xt){var Jt=Ut(Xt),gn=function(An){return Vt[An]}(Jt);(function(An){return Vt[An]!=null})(Jt)?zt.push({ele1:gn,ele2:Xt}):Mt.push(Ot(Xt))}),Ft.length>0&&At.remove(Ft),Mt.length>0&&At.add(Mt),zt.forEach(function(Xt){var Jt=Xt.ele1,gn=Xt.ele2;return xt(At,Jt,gn,Ot,Rt,kt)})},xt=function(At,Ct,$t,Ot,Rt,It){var kt=Rt(Rt($t,"data"),"id"),Mt=At.getElementById(kt),Ft={};["data","position","selected","selectable","locked","grabbable","classes"].forEach(function(Vt){var Zt=Rt($t,Vt);It(Zt,Rt(Ct,Vt))&&(Ft[Vt]=Ot(Zt))});var zt=Rt($t,"scratch");It(zt,Rt(Ct,"scratch"))&&Mt.scratch(Ot(zt)),Object.keys(Ft).length>0&&Mt.json(Ft)}}])})})(reactCytoscape);const CytoscapeComponent=getDefaultExportFromCjs$1(reactCytoscape.exports);function normGraphToCyto(et,tt,nt){const rt=[];for(const[ot,st]of et.ops){const ut=tt.getOpDef(ot.name).supportedEngines,ct=ut.size===0?"#000000":ut.size===1?ut.has("py")?"#f0ff00":ut.has("ts")?"#0000ff":"#000000":"#00ff00",ft=[],pt=nt&&isEditingNode(nt)&&nt?.nodeType==="output"&&nt.fromOp===ot;(ot===nt||pt)&&ft.push("highlight"),rt.push({data:{id:st,label:ot.name,type:"op"},style:{backgroundColor:ct},classes:ft});for(const ht of Object.keys(ot.inputs)){const mt=ot.inputs[ht];if(mt.nodeType==="output")rt.push({data:{id:`${st}-${ht}`,label:defaultLanguageBinding.printType(mt.type),source:et.ops.get(mt.fromOp),target:st}});else if(mt.nodeType==="const"){const yt=et.constNodes.get(mt),vt=["const"];nt===mt&&vt.push("highlight"),rt.push({data:{id:yt,label:mt.val,type:"const"},classes:vt}),rt.push({data:{id:`${st}-${ht}`,label:defaultLanguageBinding.printType(mt.type),source:yt,target:st}})}else if(mt.nodeType==="var"){const yt=et.varNodes.get(mt),vt=["var"];nt===mt&&vt.push("highlight"),rt.push({data:{id:yt,label:mt.varName,type:"var"},classes:vt}),rt.push({data:{id:`${st}-${ht}`,label:defaultLanguageBinding.printType(mt.type),source:yt,target:st}})}else if(mt.nodeType==="void"){const yt=et.voidNodes.get(mt),vt=["void"];nt===mt&&vt.push("highlight"),rt.push({data:{id:yt,label:"void",type:"void"},classes:vt}),rt.push({data:{id:`${st}-${ht}`,source:yt,target:st}})}}}return rt}cytoscape_cjsExports.use(dagre);let renderCount=0;const ComputeGraphViz=et=>{const{node:tt,highlightNodeOrOp:nt,width:rt,height:ot}=et,st=useWeaveContext(),ut=graphNorm(tt),ct=normGraphToCyto(ut,st.client.opStore,nt);return renderCount++,react.exports.createElement(CytoscapeComponent,{key:renderCount,maxZoom:1.5,elements:ct,style:{width:rt,height:ot},layout:{name:"dagre",rankDir:"LR",spacingFactor:.7,nodeDimensionsIncludeLabels:!0},stylesheet:[{selector:"node[label]",style:{label:"data(label)","font-size":"12px","text-wrap":"ellipsis","text-max-width":"300","text-margin-y":-4}},{selector:"node",style:{color:gray800,"background-color":"white","border-color":primary,"border-width":2,width:20,height:20}},{selector:"node.highlight",style:{"background-color":primary}},{selector:"node.const",style:{shape:"rectangle",width:30,height:10}},{selector:"node.var",style:{shape:"diamond",width:20,height:20}},{selector:"node.void",style:{shape:"triangle",width:20,height:20}},{selector:"edge[label]",style:{label:"data(label)",color:"#888","font-size":"12px","text-wrap":"ellipsis","text-max-width":"300","text-margin-y":10}},{selector:"edge",style:{width:2,"line-color":"#99ccdf","curve-style":"straight"}},{selector:"edge",style:{"target-arrow-shape":"triangle","target-arrow-color":"#99ccdf"}}]})},inputType$16="any",PanelExpressionGraph=et=>{const[tt,nt]=Wt.useState({width:400,height:400});return Wt.createElement(Measure,{bounds:!0,onResize:rt=>{rt.bounds!=null&&nt(rt.bounds)}},({measureRef:rt})=>Wt.createElement("div",{ref:rt,style:{height:"100%",width:"100%",overflow:"hidden"}},Wt.createElement(ComputeGraphViz,{node:et.input,width:tt.width,height:tt.height})))},Spec$18={id:"debug-expression-graph",Component:PanelExpressionGraph,inputType:inputType$16};var index$1=react.exports.useLayoutEffect,useLatest=function et(tt){var nt=react.exports.useRef(tt);return index$1(function(){nt.current=tt}),nt},updateRef=function et(tt,nt){if(typeof tt=="function"){tt(nt);return}tt.current=nt},useComposedRef=function et(tt,nt){var rt=react.exports.useRef();return react.exports.useCallback(function(ot){tt.current=ot,rt.current&&updateRef(rt.current,null),rt.current=nt,nt&&updateRef(nt,ot)},[nt])},HIDDEN_TEXTAREA_STYLE={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},forceHiddenStyles=function et(tt){Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(nt){tt.style.setProperty(nt,HIDDEN_TEXTAREA_STYLE[nt],"important")})},hiddenTextarea=null,getHeight=function et(tt,nt){var rt=tt.scrollHeight;return nt.sizingStyle.boxSizing==="border-box"?rt+nt.borderSize:rt-nt.paddingSize};function calculateNodeHeight(et,tt,nt,rt){nt===void 0&&(nt=1),rt===void 0&&(rt=1/0),hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),hiddenTextarea.setAttribute("tabindex","-1"),hiddenTextarea.setAttribute("aria-hidden","true"),forceHiddenStyles(hiddenTextarea)),hiddenTextarea.parentNode===null&&document.body.appendChild(hiddenTextarea);var ot=et.paddingSize,st=et.borderSize,ut=et.sizingStyle,ct=ut.boxSizing;Object.keys(ut).forEach(function(yt){var vt=yt;hiddenTextarea.style[vt]=ut[vt]}),forceHiddenStyles(hiddenTextarea),hiddenTextarea.value=tt;var ft=getHeight(hiddenTextarea,et);hiddenTextarea.value="x";var pt=hiddenTextarea.scrollHeight-ot,ht=pt*nt;ct==="border-box"&&(ht=ht+ot+st),ft=Math.max(ht,ft);var mt=pt*rt;return ct==="border-box"&&(mt=mt+ot+st),ft=Math.min(mt,ft),[ft,pt]}var noop$6=function et(){},pick=function et(tt,nt){return tt.reduce(function(rt,ot){return rt[ot]=nt[ot],rt},{})},SIZING_STYLE=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],isIE=!!document.documentElement.currentStyle,getSizingData=function et(tt){var nt=window.getComputedStyle(tt);if(nt===null)return null;var rt=pick(SIZING_STYLE,nt),ot=rt.boxSizing;if(ot==="")return null;isIE&&ot==="border-box"&&(rt.width=parseFloat(rt.width)+parseFloat(rt.borderRightWidth)+parseFloat(rt.borderLeftWidth)+parseFloat(rt.paddingRight)+parseFloat(rt.paddingLeft)+"px");var st=parseFloat(rt.paddingBottom)+parseFloat(rt.paddingTop),ut=parseFloat(rt.borderBottomWidth)+parseFloat(rt.borderTopWidth);return{sizingStyle:rt,paddingSize:st,borderSize:ut}},useWindowResizeListener=function et(tt){var nt=useLatest(tt);react.exports.useLayoutEffect(function(){var rt=function(st){nt.current(st)};return window.addEventListener("resize",rt),function(){window.removeEventListener("resize",rt)}},[])},TextareaAutosize=function et(tt,nt){var rt=tt.cacheMeasurements,ot=tt.maxRows,st=tt.minRows,ut=tt.onChange,ct=ut===void 0?noop$6:ut,ft=tt.onHeightChange,pt=ft===void 0?noop$6:ft,ht=_objectWithoutPropertiesLoose$7(tt,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),mt=ht.value!==void 0,yt=react.exports.useRef(null),vt=useComposedRef(yt,nt),Tt=react.exports.useRef(0),Et=react.exports.useRef(),xt=function(){var $t=yt.current,Ot=rt&&Et.current?Et.current:getSizingData($t);if(!!Ot){Et.current=Ot;var Rt=calculateNodeHeight(Ot,$t.value||$t.placeholder||"x",st,ot),It=Rt[0],kt=Rt[1];Tt.current!==It&&(Tt.current=It,$t.style.setProperty("height",It+"px","important"),pt(It,{rowHeight:kt}))}},At=function($t){mt||xt(),ct($t)};return react.exports.useLayoutEffect(xt),useWindowResizeListener(xt),react.exports.createElement("textarea",_extends$a({},ht,{onChange:At,ref:vt}))},index=react.exports.forwardRef(TextareaAutosize);const TextareaAutosize$1=index;function isAbsolute(et){return et.charAt(0)==="/"}function spliceOne(et,tt){for(var nt=tt,rt=nt+1,ot=et.length;rt<ot;nt+=1,rt+=1)et[nt]=et[rt];et.pop()}function resolvePathname(et,tt){tt===void 0&&(tt="");var nt=et&&et.split("/")||[],rt=tt&&tt.split("/")||[],ot=et&&isAbsolute(et),st=tt&&isAbsolute(tt),ut=ot||st;if(et&&isAbsolute(et)?rt=nt:nt.length&&(rt.pop(),rt=rt.concat(nt)),!rt.length)return"/";var ct;if(rt.length){var ft=rt[rt.length-1];ct=ft==="."||ft===".."||ft===""}else ct=!1;for(var pt=0,ht=rt.length;ht>=0;ht--){var mt=rt[ht];mt==="."?spliceOne(rt,ht):mt===".."?(spliceOne(rt,ht),pt++):pt&&(spliceOne(rt,ht),pt--)}if(!ut)for(;pt--;pt)rt.unshift("..");ut&&rt[0]!==""&&(!rt[0]||!isAbsolute(rt[0]))&&rt.unshift("");var yt=rt.join("/");return ct&&yt.substr(-1)!=="/"&&(yt+="/"),yt}var isProduction=!0,prefix="Invariant failed";function invariant(et,tt){if(!et){if(isProduction)throw new Error(prefix);var nt=typeof tt=="function"?tt():tt,rt=nt?"".concat(prefix,": ").concat(nt):prefix;throw new Error(rt)}}function addLeadingSlash$1(et){return et.charAt(0)==="/"?et:"/"+et}function stripLeadingSlash(et){return et.charAt(0)==="/"?et.substr(1):et}function hasBasename(et,tt){return et.toLowerCase().indexOf(tt.toLowerCase())===0&&"/?#".indexOf(et.charAt(tt.length))!==-1}function stripBasename$1(et,tt){return hasBasename(et,tt)?et.substr(tt.length):et}function stripTrailingSlash(et){return et.charAt(et.length-1)==="/"?et.slice(0,-1):et}function parsePath(et){var tt=et||"/",nt="",rt="",ot=tt.indexOf("#");ot!==-1&&(rt=tt.substr(ot),tt=tt.substr(0,ot));var st=tt.indexOf("?");return st!==-1&&(nt=tt.substr(st),tt=tt.substr(0,st)),{pathname:tt,search:nt==="?"?"":nt,hash:rt==="#"?"":rt}}function createPath(et){var tt=et.pathname,nt=et.search,rt=et.hash,ot=tt||"/";return nt&&nt!=="?"&&(ot+=nt.charAt(0)==="?"?nt:"?"+nt),rt&&rt!=="#"&&(ot+=rt.charAt(0)==="#"?rt:"#"+rt),ot}function createLocation(et,tt,nt,rt){var ot;typeof et=="string"?(ot=parsePath(et),ot.state=tt):(ot=_extends$a({},et),ot.pathname===void 0&&(ot.pathname=""),ot.search?ot.search.charAt(0)!=="?"&&(ot.search="?"+ot.search):ot.search="",ot.hash?ot.hash.charAt(0)!=="#"&&(ot.hash="#"+ot.hash):ot.hash="",tt!==void 0&&ot.state===void 0&&(ot.state=tt));try{ot.pathname=decodeURI(ot.pathname)}catch(st){throw st instanceof URIError?new URIError('Pathname "'+ot.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):st}return nt&&(ot.key=nt),rt?ot.pathname?ot.pathname.charAt(0)!=="/"&&(ot.pathname=resolvePathname(ot.pathname,rt.pathname)):ot.pathname=rt.pathname:ot.pathname||(ot.pathname="/"),ot}function createTransitionManager(){var et=null;function tt(ut){return et=ut,function(){et===ut&&(et=null)}}function nt(ut,ct,ft,pt){if(et!=null){var ht=typeof et=="function"?et(ut,ct):et;typeof ht=="string"?typeof ft=="function"?ft(ht,pt):pt(!0):pt(ht!==!1)}else pt(!0)}var rt=[];function ot(ut){var ct=!0;function ft(){ct&&ut.apply(void 0,arguments)}return rt.push(ft),function(){ct=!1,rt=rt.filter(function(pt){return pt!==ft})}}function st(){for(var ut=arguments.length,ct=new Array(ut),ft=0;ft<ut;ft++)ct[ft]=arguments[ft];rt.forEach(function(pt){return pt.apply(void 0,ct)})}return{setPrompt:tt,confirmTransitionTo:nt,appendListener:ot,notifyListeners:st}}var canUseDOM$1=!!(typeof window<"u"&&window.document&&window.document.createElement);function getConfirmation(et,tt){tt(window.confirm(et))}function supportsHistory(){var et=window.navigator.userAgent;return(et.indexOf("Android 2.")!==-1||et.indexOf("Android 4.0")!==-1)&&et.indexOf("Mobile Safari")!==-1&&et.indexOf("Chrome")===-1&&et.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function supportsPopStateOnHashChange(){return window.navigator.userAgent.indexOf("Trident")===-1}function supportsGoWithoutReloadUsingHash(){return window.navigator.userAgent.indexOf("Firefox")===-1}function isExtraneousPopstateEvent(et){return et.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var PopStateEvent="popstate",HashChangeEvent="hashchange";function getHistoryState(){try{return window.history.state||{}}catch{return{}}}function createBrowserHistory(et){et===void 0&&(et={}),canUseDOM$1||invariant(!1);var tt=window.history,nt=supportsHistory(),rt=!supportsPopStateOnHashChange(),ot=et,st=ot.forceRefresh,ut=st===void 0?!1:st,ct=ot.getUserConfirmation,ft=ct===void 0?getConfirmation:ct,pt=ot.keyLength,ht=pt===void 0?6:pt,mt=et.basename?stripTrailingSlash(addLeadingSlash$1(et.basename)):"";function yt(Sn){var In=Sn||{},_n=In.key,En=In.state,Ln=window.location,wn=Ln.pathname,Dn=Ln.search,$n=Ln.hash,Gn=wn+Dn+$n;return mt&&(Gn=stripBasename$1(Gn,mt)),createLocation(Gn,En,_n)}function vt(){return Math.random().toString(36).substr(2,ht)}var Tt=createTransitionManager();function Et(Sn){_extends$a(sn,Sn),sn.length=tt.length,Tt.notifyListeners(sn.location,sn.action)}function xt(Sn){isExtraneousPopstateEvent(Sn)||$t(yt(Sn.state))}function At(){$t(yt(getHistoryState()))}var Ct=!1;function $t(Sn){if(Ct)Ct=!1,Et();else{var In="POP";Tt.confirmTransitionTo(Sn,In,ft,function(_n){_n?Et({action:In,location:Sn}):Ot(Sn)})}}function Ot(Sn){var In=sn.location,_n=It.indexOf(In.key);_n===-1&&(_n=0);var En=It.indexOf(Sn.key);En===-1&&(En=0);var Ln=_n-En;Ln&&(Ct=!0,zt(Ln))}var Rt=yt(getHistoryState()),It=[Rt.key];function kt(Sn){return mt+createPath(Sn)}function Mt(Sn,In){var _n="PUSH",En=createLocation(Sn,In,vt(),sn.location);Tt.confirmTransitionTo(En,_n,ft,function(Ln){if(!!Ln){var wn=kt(En),Dn=En.key,$n=En.state;if(nt)if(tt.pushState({key:Dn,state:$n},null,wn),ut)window.location.href=wn;else{var Gn=It.indexOf(sn.location.key),Jn=It.slice(0,Gn+1);Jn.push(En.key),It=Jn,Et({action:_n,location:En})}else window.location.href=wn}})}function Ft(Sn,In){var _n="REPLACE",En=createLocation(Sn,In,vt(),sn.location);Tt.confirmTransitionTo(En,_n,ft,function(Ln){if(!!Ln){var wn=kt(En),Dn=En.key,$n=En.state;if(nt)if(tt.replaceState({key:Dn,state:$n},null,wn),ut)window.location.replace(wn);else{var Gn=It.indexOf(sn.location.key);Gn!==-1&&(It[Gn]=En.key),Et({action:_n,location:En})}else window.location.replace(wn)}})}function zt(Sn){tt.go(Sn)}function Vt(){zt(-1)}function Zt(){zt(1)}var Ut=0;function Xt(Sn){Ut+=Sn,Ut===1&&Sn===1?(window.addEventListener(PopStateEvent,xt),rt&&window.addEventListener(HashChangeEvent,At)):Ut===0&&(window.removeEventListener(PopStateEvent,xt),rt&&window.removeEventListener(HashChangeEvent,At))}var Jt=!1;function gn(Sn){Sn===void 0&&(Sn=!1);var In=Tt.setPrompt(Sn);return Jt||(Xt(1),Jt=!0),function(){return Jt&&(Jt=!1,Xt(-1)),In()}}function An(Sn){var In=Tt.appendListener(Sn);return Xt(1),function(){Xt(-1),In()}}var sn={length:tt.length,action:"POP",location:Rt,createHref:kt,push:Mt,replace:Ft,go:zt,goBack:Vt,goForward:Zt,block:gn,listen:An};return sn}var HashChangeEvent$1="hashchange",HashPathCoders={hashbang:{encodePath:function et(tt){return tt.charAt(0)==="!"?tt:"!/"+stripLeadingSlash(tt)},decodePath:function et(tt){return tt.charAt(0)==="!"?tt.substr(1):tt}},noslash:{encodePath:stripLeadingSlash,decodePath:addLeadingSlash$1},slash:{encodePath:addLeadingSlash$1,decodePath:addLeadingSlash$1}};function stripHash(et){var tt=et.indexOf("#");return tt===-1?et:et.slice(0,tt)}function getHashPath(){var et=window.location.href,tt=et.indexOf("#");return tt===-1?"":et.substring(tt+1)}function pushHashPath(et){window.location.hash=et}function replaceHashPath(et){window.location.replace(stripHash(window.location.href)+"#"+et)}function createHashHistory(et){et===void 0&&(et={}),canUseDOM$1||invariant(!1);var tt=window.history;supportsGoWithoutReloadUsingHash();var nt=et,rt=nt.getUserConfirmation,ot=rt===void 0?getConfirmation:rt,st=nt.hashType,ut=st===void 0?"slash":st,ct=et.basename?stripTrailingSlash(addLeadingSlash$1(et.basename)):"",ft=HashPathCoders[ut],pt=ft.encodePath,ht=ft.decodePath;function mt(){var In=ht(getHashPath());return ct&&(In=stripBasename$1(In,ct)),createLocation(In)}var yt=createTransitionManager();function vt(In){_extends$a(Sn,In),Sn.length=tt.length,yt.notifyListeners(Sn.location,Sn.action)}var Tt=!1,Et=null;function xt(In,_n){return In.pathname===_n.pathname&&In.search===_n.search&&In.hash===_n.hash}function At(){var In=getHashPath(),_n=pt(In);if(In!==_n)replaceHashPath(_n);else{var En=mt(),Ln=Sn.location;if(!Tt&&xt(Ln,En)||Et===createPath(En))return;Et=null,Ct(En)}}function Ct(In){if(Tt)Tt=!1,vt();else{var _n="POP";yt.confirmTransitionTo(In,_n,ot,function(En){En?vt({action:_n,location:In}):$t(In)})}}function $t(In){var _n=Sn.location,En=kt.lastIndexOf(createPath(_n));En===-1&&(En=0);var Ln=kt.lastIndexOf(createPath(In));Ln===-1&&(Ln=0);var wn=En-Ln;wn&&(Tt=!0,Vt(wn))}var Ot=getHashPath(),Rt=pt(Ot);Ot!==Rt&&replaceHashPath(Rt);var It=mt(),kt=[createPath(It)];function Mt(In){var _n=document.querySelector("base"),En="";return _n&&_n.getAttribute("href")&&(En=stripHash(window.location.href)),En+"#"+pt(ct+createPath(In))}function Ft(In,_n){var En="PUSH",Ln=createLocation(In,void 0,void 0,Sn.location);yt.confirmTransitionTo(Ln,En,ot,function(wn){if(!!wn){var Dn=createPath(Ln),$n=pt(ct+Dn),Gn=getHashPath()!==$n;if(Gn){Et=Dn,pushHashPath($n);var Jn=kt.lastIndexOf(createPath(Sn.location)),zn=kt.slice(0,Jn+1);zn.push(Dn),kt=zn,vt({action:En,location:Ln})}else vt()}})}function zt(In,_n){var En="REPLACE",Ln=createLocation(In,void 0,void 0,Sn.location);yt.confirmTransitionTo(Ln,En,ot,function(wn){if(!!wn){var Dn=createPath(Ln),$n=pt(ct+Dn),Gn=getHashPath()!==$n;Gn&&(Et=Dn,replaceHashPath($n));var Jn=kt.indexOf(createPath(Sn.location));Jn!==-1&&(kt[Jn]=Dn),vt({action:En,location:Ln})}})}function Vt(In){tt.go(In)}function Zt(){Vt(-1)}function Ut(){Vt(1)}var Xt=0;function Jt(In){Xt+=In,Xt===1&&In===1?window.addEventListener(HashChangeEvent$1,At):Xt===0&&window.removeEventListener(HashChangeEvent$1,At)}var gn=!1;function An(In){In===void 0&&(In=!1);var _n=yt.setPrompt(In);return gn||(Jt(1),gn=!0),function(){return gn&&(gn=!1,Jt(-1)),_n()}}function sn(In){var _n=yt.appendListener(In);return Jt(1),function(){Jt(-1),_n()}}var Sn={length:tt.length,action:"POP",location:It,createHref:Mt,push:Ft,replace:zt,go:Vt,goBack:Zt,goForward:Ut,block:An,listen:sn};return Sn}function clamp(et,tt,nt){return Math.min(Math.max(et,tt),nt)}function createMemoryHistory(et){et===void 0&&(et={});var tt=et,nt=tt.getUserConfirmation,rt=tt.initialEntries,ot=rt===void 0?["/"]:rt,st=tt.initialIndex,ut=st===void 0?0:st,ct=tt.keyLength,ft=ct===void 0?6:ct,pt=createTransitionManager();function ht(Mt){_extends$a(kt,Mt),kt.length=kt.entries.length,pt.notifyListeners(kt.location,kt.action)}function mt(){return Math.random().toString(36).substr(2,ft)}var yt=clamp(ut,0,ot.length-1),vt=ot.map(function(Mt){return typeof Mt=="string"?createLocation(Mt,void 0,mt()):createLocation(Mt,void 0,Mt.key||mt())}),Tt=createPath;function Et(Mt,Ft){var zt="PUSH",Vt=createLocation(Mt,Ft,mt(),kt.location);pt.confirmTransitionTo(Vt,zt,nt,function(Zt){if(!!Zt){var Ut=kt.index,Xt=Ut+1,Jt=kt.entries.slice(0);Jt.length>Xt?Jt.splice(Xt,Jt.length-Xt,Vt):Jt.push(Vt),ht({action:zt,location:Vt,index:Xt,entries:Jt})}})}function xt(Mt,Ft){var zt="REPLACE",Vt=createLocation(Mt,Ft,mt(),kt.location);pt.confirmTransitionTo(Vt,zt,nt,function(Zt){!Zt||(kt.entries[kt.index]=Vt,ht({action:zt,location:Vt}))})}function At(Mt){var Ft=clamp(kt.index+Mt,0,kt.entries.length-1),zt="POP",Vt=kt.entries[Ft];pt.confirmTransitionTo(Vt,zt,nt,function(Zt){Zt?ht({action:zt,location:Vt,index:Ft}):ht()})}function Ct(){At(-1)}function $t(){At(1)}function Ot(Mt){var Ft=kt.index+Mt;return Ft>=0&&Ft<kt.entries.length}function Rt(Mt){return Mt===void 0&&(Mt=!1),pt.setPrompt(Mt)}function It(Mt){return pt.appendListener(Mt)}var kt={length:vt.length,action:"POP",location:vt[yt],index:yt,entries:vt,createHref:Tt,push:Et,replace:xt,go:At,goBack:Ct,goForward:$t,canGo:Ot,block:Rt,listen:It};return kt}var pathToRegexp$1={exports:{}},isarray$1=Array.isArray||function(et){return Object.prototype.toString.call(et)=="[object Array]"},isarray=isarray$1;pathToRegexp$1.exports=pathToRegexp;pathToRegexp$1.exports.parse=parse;pathToRegexp$1.exports.compile=compile;pathToRegexp$1.exports.tokensToFunction=tokensToFunction;pathToRegexp$1.exports.tokensToRegExp=tokensToRegExp;var PATH_REGEXP=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function parse(et,tt){for(var nt=[],rt=0,ot=0,st="",ut=tt&&tt.delimiter||"/",ct;(ct=PATH_REGEXP.exec(et))!=null;){var ft=ct[0],pt=ct[1],ht=ct.index;if(st+=et.slice(ot,ht),ot=ht+ft.length,pt){st+=pt[1];continue}var mt=et[ot],yt=ct[2],vt=ct[3],Tt=ct[4],Et=ct[5],xt=ct[6],At=ct[7];st&&(nt.push(st),st="");var Ct=yt!=null&&mt!=null&&mt!==yt,$t=xt==="+"||xt==="*",Ot=xt==="?"||xt==="*",Rt=ct[2]||ut,It=Tt||Et;nt.push({name:vt||rt++,prefix:yt||"",delimiter:Rt,optional:Ot,repeat:$t,partial:Ct,asterisk:!!At,pattern:It?escapeGroup(It):At?".*":"[^"+escapeString(Rt)+"]+?"})}return ot<et.length&&(st+=et.substr(ot)),st&&nt.push(st),nt}function compile(et,tt){return tokensToFunction(parse(et,tt),tt)}function encodeURIComponentPretty(et){return encodeURI(et).replace(/[\/?#]/g,function(tt){return"%"+tt.charCodeAt(0).toString(16).toUpperCase()})}function encodeAsterisk(et){return encodeURI(et).replace(/[?#]/g,function(tt){return"%"+tt.charCodeAt(0).toString(16).toUpperCase()})}function tokensToFunction(et,tt){for(var nt=new Array(et.length),rt=0;rt<et.length;rt++)typeof et[rt]=="object"&&(nt[rt]=new RegExp("^(?:"+et[rt].pattern+")$",flags(tt)));return function(ot,st){for(var ut="",ct=ot||{},ft=st||{},pt=ft.pretty?encodeURIComponentPretty:encodeURIComponent,ht=0;ht<et.length;ht++){var mt=et[ht];if(typeof mt=="string"){ut+=mt;continue}var yt=ct[mt.name],vt;if(yt==null)if(mt.optional){mt.partial&&(ut+=mt.prefix);continue}else throw new TypeError('Expected "'+mt.name+'" to be defined');if(isarray(yt)){if(!mt.repeat)throw new TypeError('Expected "'+mt.name+'" to not repeat, but received `'+JSON.stringify(yt)+"`");if(yt.length===0){if(mt.optional)continue;throw new TypeError('Expected "'+mt.name+'" to not be empty')}for(var Tt=0;Tt<yt.length;Tt++){if(vt=pt(yt[Tt]),!nt[ht].test(vt))throw new TypeError('Expected all "'+mt.name+'" to match "'+mt.pattern+'", but received `'+JSON.stringify(vt)+"`");ut+=(Tt===0?mt.prefix:mt.delimiter)+vt}continue}if(vt=mt.asterisk?encodeAsterisk(yt):pt(yt),!nt[ht].test(vt))throw new TypeError('Expected "'+mt.name+'" to match "'+mt.pattern+'", but received "'+vt+'"');ut+=mt.prefix+vt}return ut}}function escapeString(et){return et.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function escapeGroup(et){return et.replace(/([=!:$\/()])/g,"\\$1")}function attachKeys(et,tt){return et.keys=tt,et}function flags(et){return et&&et.sensitive?"":"i"}function regexpToRegexp(et,tt){var nt=et.source.match(/\((?!\?)/g);if(nt)for(var rt=0;rt<nt.length;rt++)tt.push({name:rt,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return attachKeys(et,tt)}function arrayToRegexp(et,tt,nt){for(var rt=[],ot=0;ot<et.length;ot++)rt.push(pathToRegexp(et[ot],tt,nt).source);var st=new RegExp("(?:"+rt.join("|")+")",flags(nt));return attachKeys(st,tt)}function stringToRegexp(et,tt,nt){return tokensToRegExp(parse(et,nt),tt,nt)}function tokensToRegExp(et,tt,nt){isarray(tt)||(nt=tt||nt,tt=[]),nt=nt||{};for(var rt=nt.strict,ot=nt.end!==!1,st="",ut=0;ut<et.length;ut++){var ct=et[ut];if(typeof ct=="string")st+=escapeString(ct);else{var ft=escapeString(ct.prefix),pt="(?:"+ct.pattern+")";tt.push(ct),ct.repeat&&(pt+="(?:"+ft+pt+")*"),ct.optional?ct.partial?pt=ft+"("+pt+")?":pt="(?:"+ft+"("+pt+"))?":pt=ft+"("+pt+")",st+=pt}}var ht=escapeString(nt.delimiter||"/"),mt=st.slice(-ht.length)===ht;return rt||(st=(mt?st.slice(0,-ht.length):st)+"(?:"+ht+"(?=$))?"),ot?st+="$":st+=rt&&mt?"":"(?="+ht+"|$)",attachKeys(new RegExp("^"+st,flags(nt)),tt)}function pathToRegexp(et,tt,nt){return isarray(tt)||(nt=tt||nt,tt=[]),nt=nt||{},et instanceof RegExp?regexpToRegexp(et,tt):isarray(et)?arrayToRegexp(et,tt,nt):stringToRegexp(et,tt,nt)}var MAX_SIGNED_31_BIT_INT=1073741823,commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function getUniqueId(){var et="__global_unique_id__";return commonjsGlobal[et]=(commonjsGlobal[et]||0)+1}function objectIs(et,tt){return et===tt?et!==0||1/et===1/tt:et!==et&&tt!==tt}function createEventEmitter(et){var tt=[];return{on:function(rt){tt.push(rt)},off:function(rt){tt=tt.filter(function(ot){return ot!==rt})},get:function(){return et},set:function(rt,ot){et=rt,tt.forEach(function(st){return st(et,ot)})}}}function onlyChild(et){return Array.isArray(et)?et[0]:et}function createReactContext(et,tt){var nt,rt,ot="__create-react-context-"+getUniqueId()+"__",st=function(ct){_inheritsLoose$5(ft,ct);function ft(){for(var ht,mt=arguments.length,yt=new Array(mt),vt=0;vt<mt;vt++)yt[vt]=arguments[vt];return ht=ct.call.apply(ct,[this].concat(yt))||this,ht.emitter=createEventEmitter(ht.props.value),ht}var pt=ft.prototype;return pt.getChildContext=function(){var mt;return mt={},mt[ot]=this.emitter,mt},pt.componentWillReceiveProps=function(mt){if(this.props.value!==mt.value){var yt=this.props.value,vt=mt.value,Tt;objectIs(yt,vt)?Tt=0:(Tt=typeof tt=="function"?tt(yt,vt):MAX_SIGNED_31_BIT_INT,Tt|=0,Tt!==0&&this.emitter.set(mt.value,Tt))}},pt.render=function(){return this.props.children},ft}(Wt.Component);st.childContextTypes=(nt={},nt[ot]=propTypes$1.exports.object.isRequired,nt);var ut=function(ct){_inheritsLoose$5(ft,ct);function ft(){for(var ht,mt=arguments.length,yt=new Array(mt),vt=0;vt<mt;vt++)yt[vt]=arguments[vt];return ht=ct.call.apply(ct,[this].concat(yt))||this,ht.observedBits=void 0,ht.state={value:ht.getValue()},ht.onUpdate=function(Tt,Et){var xt=ht.observedBits|0;(xt&Et)!==0&&ht.setState({value:ht.getValue()})},ht}var pt=ft.prototype;return pt.componentWillReceiveProps=function(mt){var yt=mt.observedBits;this.observedBits=yt??MAX_SIGNED_31_BIT_INT},pt.componentDidMount=function(){this.context[ot]&&this.context[ot].on(this.onUpdate);var mt=this.props.observedBits;this.observedBits=mt??MAX_SIGNED_31_BIT_INT},pt.componentWillUnmount=function(){this.context[ot]&&this.context[ot].off(this.onUpdate)},pt.getValue=function(){return this.context[ot]?this.context[ot].get():et},pt.render=function(){return onlyChild(this.props.children)(this.state.value)},ft}(Wt.Component);return ut.contextTypes=(rt={},rt[ot]=propTypes$1.exports.object,rt),{Provider:st,Consumer:ut}}var createContext=Wt.createContext||createReactContext,createNamedContext=function et(tt){var nt=createContext();return nt.displayName=tt,nt},historyContext=createNamedContext("Router-History"),context=createNamedContext("Router"),Router=function(et){_inheritsLoose$5(tt,et),tt.computeRootMatch=function(ot){return{path:"/",url:"/",params:{},isExact:ot==="/"}};function tt(rt){var ot;return ot=et.call(this,rt)||this,ot.state={location:rt.history.location},ot._isMounted=!1,ot._pendingLocation=null,rt.staticContext||(ot.unlisten=rt.history.listen(function(st){ot._pendingLocation=st})),ot}var nt=tt.prototype;return nt.componentDidMount=function(){var ot=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(st){ot._isMounted&&ot.setState({location:st})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},nt.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},nt.render=function(){return Wt.createElement(context.Provider,{value:{history:this.props.history,location:this.state.location,match:tt.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},Wt.createElement(historyContext.Provider,{children:this.props.children||null,value:this.props.history}))},tt}(Wt.Component);Wt.Component;Wt.Component;var cache$1={},cacheLimit$1=1e4,cacheCount$1=0;function compilePath$1(et,tt){var nt=""+tt.end+tt.strict+tt.sensitive,rt=cache$1[nt]||(cache$1[nt]={});if(rt[et])return rt[et];var ot=[],st=pathToRegexp$1.exports(et,ot,tt),ut={regexp:st,keys:ot};return cacheCount$1<cacheLimit$1&&(rt[et]=ut,cacheCount$1++),ut}function matchPath(et,tt){tt===void 0&&(tt={}),(typeof tt=="string"||Array.isArray(tt))&&(tt={path:tt});var nt=tt,rt=nt.path,ot=nt.exact,st=ot===void 0?!1:ot,ut=nt.strict,ct=ut===void 0?!1:ut,ft=nt.sensitive,pt=ft===void 0?!1:ft,ht=[].concat(rt);return ht.reduce(function(mt,yt){if(!yt&&yt!=="")return null;if(mt)return mt;var vt=compilePath$1(yt,{end:st,strict:ct,sensitive:pt}),Tt=vt.regexp,Et=vt.keys,xt=Tt.exec(et);if(!xt)return null;var At=xt[0],Ct=xt.slice(1),$t=et===At;return st&&!$t?null:{path:yt,url:yt==="/"&&At===""?"/":At,isExact:$t,params:Et.reduce(function(Ot,Rt,It){return Ot[Rt.name]=Ct[It],Ot},{})}},null)}function isEmptyChildren(et){return Wt.Children.count(et)===0}Wt.Component;function addLeadingSlash(et){return et.charAt(0)==="/"?et:"/"+et}function addBasename(et,tt){return et?_extends$a({},tt,{pathname:addLeadingSlash(et)+tt.pathname}):tt}function stripBasename(et,tt){if(!et)return tt;var nt=addLeadingSlash(et);return tt.pathname.indexOf(nt)!==0?tt:_extends$a({},tt,{pathname:tt.pathname.substr(nt.length)})}function createURL(et){return typeof et=="string"?et:createPath(et)}function staticHandler(et){return function(){invariant(!1)}}function noop$5(){}Wt.Component;Wt.Component;Wt.useContext;Wt.Component;Wt.Component;var resolveToLocation=function et(tt,nt){return typeof tt=="function"?tt(nt):tt},normalizeToLocation=function et(tt,nt){return typeof tt=="string"?createLocation(tt,null,null,nt):tt},forwardRefShim=function et(tt){return tt},forwardRef=Wt.forwardRef;typeof forwardRef>"u"&&(forwardRef=forwardRefShim);function isModifiedEvent(et){return!!(et.metaKey||et.altKey||et.ctrlKey||et.shiftKey)}var LinkAnchor=forwardRef(function(et,tt){var nt=et.innerRef,rt=et.navigate,ot=et.onClick,st=_objectWithoutPropertiesLoose$7(et,["innerRef","navigate","onClick"]),ut=st.target,ct=_extends$a({},st,{onClick:function(pt){try{ot&&ot(pt)}catch(ht){throw pt.preventDefault(),ht}!pt.defaultPrevented&&pt.button===0&&(!ut||ut==="_self")&&!isModifiedEvent(pt)&&(pt.preventDefault(),rt())}});return forwardRefShim!==forwardRef?ct.ref=tt||nt:ct.ref=nt,Wt.createElement("a",ct)}),Link$2=forwardRef(function(et,tt){var nt=et.component,rt=nt===void 0?LinkAnchor:nt,ot=et.replace,st=et.to,ut=et.innerRef,ct=_objectWithoutPropertiesLoose$7(et,["component","replace","to","innerRef"]);return Wt.createElement(context.Consumer,null,function(ft){ft||invariant(!1);var pt=ft.history,ht=normalizeToLocation(resolveToLocation(st,ft.location),ft.location),mt=ht?pt.createHref(ht):"",yt=_extends$a({},ct,{href:mt,navigate:function(){var Tt=resolveToLocation(st,ft.location),Et=createPath(ft.location)===createPath(normalizeToLocation(Tt)),xt=ot||Et?pt.replace:pt.push;xt(Tt)}});return forwardRefShim!==forwardRef?yt.ref=tt||ut:yt.innerRef=ut,Wt.createElement(rt,yt)})}),forwardRefShim$1=function et(tt){return tt},forwardRef$1=Wt.forwardRef;typeof forwardRef$1>"u"&&(forwardRef$1=forwardRefShim$1);function joinClassnames(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];return tt.filter(function(rt){return rt}).join(" ")}var NavLink$1=forwardRef$1(function(et,tt){var nt=et["aria-current"],rt=nt===void 0?"page":nt,ot=et.activeClassName,st=ot===void 0?"active":ot,ut=et.activeStyle,ct=et.className,ft=et.exact,pt=et.isActive,ht=et.location,mt=et.sensitive,yt=et.strict,vt=et.style,Tt=et.to,Et=et.innerRef,xt=_objectWithoutPropertiesLoose$7(et,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Wt.createElement(context.Consumer,null,function(At){At||invariant(!1);var Ct=ht||At.location,$t=normalizeToLocation(resolveToLocation(Tt,Ct),Ct),Ot=$t.pathname,Rt=Ot&&Ot.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),It=Rt?matchPath(Ct.pathname,{path:Rt,exact:ft,sensitive:mt,strict:yt}):null,kt=!!(pt?pt(It,Ct):It),Mt=typeof ct=="function"?ct(kt):ct,Ft=typeof vt=="function"?vt(kt):vt;kt&&(Mt=joinClassnames(Mt,st),Ft=_extends$a({},Ft,ut));var zt=_extends$a({"aria-current":kt&&rt||null,className:Mt,style:Ft,to:$t},xt);return forwardRefShim$1!==forwardRef$1?zt.ref=tt||Et:zt.innerRef=Et,Wt.createElement(Link$2,zt)})});const URL_REGEXP=/https?:\/\/[^\s]+/g,MD_LINK_REGEXP=/\[[^\]]+\]\(https?:\/\/[^)\s]+\)/g;function linkify(et,tt){const nt=linkifyWithRegex(et,tt,MD_LINK_REGEXP,(rt,ot)=>{const st=rt.indexOf("]"),ut=rt.slice(1,st),ct=rt.slice(st+2,rt.length-1);return Wt.createElement("a",{key:`${ct}-${ot}`,href:ct,...tt},ut)});return _$2.flatten(nt.map(rt=>typeof rt!="string"?rt:linkifyWithRegex(rt,tt,URL_REGEXP,(ot,st)=>Wt.createElement("a",{key:`${ot}-${st}`,href:ot,...tt},ot))))}function linkifyWithRegex(et,tt,nt,rt){const ot=et.match(nt)??[],st=[et];return ot.forEach((ut,ct)=>{const ft=st.pop();if(ft==null||!_$2.isString(ft))throw new Error("Exception encountered when linkifying text.");const pt=ft.indexOf(ut),ht=pt+ut.length,mt=ft.slice(0,pt),yt=ft.slice(ht);_$2.isEmpty(mt)||st.push(mt),st.push(rt(ut,ct)),_$2.isEmpty(yt)||st.push(yt)}),st}const TargetBlank=Wt.memo(Wt.forwardRef(({children:et,...tt},nt)=>(tt.href!=null&&!(tt.href.indexOf("://")>0)&&(tt.href=getConfig().urlPrefixed(tt.href)),Wt.createElement("a",{target:"_blank",rel:"noopener noreferrer",...tt,ref:nt},et)))),Link$1=Wt.memo(Wt.forwardRef(({RRLinkComp:et=Link$2,newTab:tt=!0,children:nt,...rt},ot)=>{const{to:st}=rt;return typeof st=="string"&&(st.startsWith("http")||st.startsWith("//"))?tt?Wt.createElement(TargetBlank,{...rt,href:st,ref:ot},nt):Wt.createElement("a",{...rt,href:st,ref:ot},nt):Wt.createElement(et,{...rt,ref:ot},nt)})),NavLink=Wt.memo(et=>Wt.createElement(Link$1,{RRLinkComp:NavLink$1,...et})),LinkNoCrawl=Wt.memo(({LinkComp:et=Link$1,...tt})=>{const[nt,rt]=react.exports.useState(!1),ot=react.exports.useCallback(()=>rt(!0),[]);if(!nt){const{className:st,style:ut,children:ct}=tt;return Wt.createElement("a",{className:st,style:ut,"data-test":tt["data-test"],onMouseEnter:ot,onTouchStart:ot},ct)}return Wt.createElement(et,{...tt})});Wt.memo(et=>Wt.createElement(LinkNoCrawl,{LinkComp:NavLink,...et}));function removeUrlProtocolPrefix(et){return et.replace(/(^\w+:|^)\/\//,"")}const LegacyWBIconComp=Wt.forwardRef(({name:et,size:tt,rotated:nt,link:rt,className:ot,onClick:st,onMouseDown:ut,onMouseEnter:ct,onMouseLeave:ft,style:pt,"data-test":ht},mt)=>{let yt=`wbic-ic-${et}`;ot&&(yt+=" "+ot);const vt={size:tt,rotated:nt,link:rt,onClick:st,onMouseDown:ut,onMouseEnter:ct,onMouseLeave:ft,style:pt,"data-test":ht};return mt==null?Wt.createElement(Icon$4,{...vt,className:yt}):Wt.createElement(Ref$1,{innerRef:mt},Wt.createElement(Icon$4,{...vt,className:yt}))}),LegacyWBIcon=react.exports.memo(LegacyWBIconComp);class EditableField extends Wt.Component{constructor(){super(...arguments),this.state={editing:!1,origValue:this.props.value,currentValue:this.props.value},this.inputRef=Wt.createRef(),this.save=lodash$2.exports.debounce(tt=>{this.props.save&&this.props.save(tt)},500),this.startEditing=tt=>{if(!this.props.readOnly){if(this.props.overrideClick){this.props.overrideClick();return}tt.stopPropagation(),tt.preventDefault(),this.setState({editing:!0},()=>{(this.props.autoSelect==null||this.props.autoSelect)&&this.inputRef.current&&this.inputRef.current.select()})}},this.stopEditing=()=>{this.setState({editing:!1,origValue:this.state.currentValue}),this.save.flush()},this.cancelEditing=()=>{this.setState({editing:!1,currentValue:this.state.origValue}),this.save(this.state.origValue),this.save.flush()},this.onKeyDown=tt=>{if(tt.keyCode===27){this.cancelEditing();return}tt.keyCode===13&&this.stopEditing()},this.onKeyDownMultiline=tt=>{tt.keyCode===27&&this.cancelEditing(),tt.keyCode===13&&tt.shiftKey&&this.stopEditing()},this.updateValue=tt=>{this.setState({currentValue:tt}),this.save(tt)}}static getDerivedStateFromProps(tt,nt){return tt.updateValue?nt.editing?{origValue:tt.value}:{origValue:tt.value,currentValue:tt.value}:null}render(){const tt=`editable-field ${this.props.className||""} ${this.props.type==="url"?"url":""} ${this.props.readOnly?"read-only":""}`,nt=`field-content${this.state.currentValue?"":" placeholder"}`;if(this.props.readOnly&&!this.state.currentValue)return Wt.createElement(Wt.Fragment,null);let rt;if(this.state.editing)this.props.multiline?rt=Wt.createElement(Form$1,null,Wt.createElement(Form$1.TextArea,{autoFocus:!0,rows:"2",minRows:2,maxLength:this.props.maxLength,value:this.state.currentValue,onChange:ot=>this.updateValue(ot.currentTarget.value),onKeyDown:this.onKeyDownMultiline,placeholder:this.props.placeholder,onBlur:this.stopEditing,control:TextareaAutosize$1})):rt=Wt.createElement(Input$7,{type:this.props.type||"text",autoFocus:!0,value:this.state.currentValue,maxLength:this.props.maxLength,onChange:ot=>{let st=ot.currentTarget.value;this.props.type==="url"&&(st=removeUrlProtocolPrefix(st)),this.updateValue(st)},placeholder:this.props.placeholder,onKeyDown:this.onKeyDown,ref:this.inputRef,onBlur:this.stopEditing});else{let ot=this.props.displayValue||this.state.currentValue;this.props.type!=="url"&&!lodash$2.exports.isEmpty(ot)&&this.props.renderLinks&&(ot=linkify(ot,{onClick:ut=>ut.stopPropagation()}));const st=[];this.props.asHeader?st.push(Wt.createElement(Header$3,{key:nt,className:nt,as:this.props.asHeader},ot||this.props.placeholder)):st.push(Wt.createElement("span",{key:nt,className:nt},ot||this.props.placeholder)),this.props.type==="url"&&ot&&st.push(Wt.createElement(LegacyWBIcon,{key:"link-icon",className:"goto-link-icon",name:"launch",onClick:()=>{window.open("http://"+this.state.currentValue,"_blank","noopener")}})),this.props.showEditIcon&&st.push(Wt.createElement(LegacyWBIcon,{key:"edit-icon",name:"edit"})),rt=Wt.createElement(Wt.Fragment,null,st)}return Wt.createElement("div",{className:tt,onClick:this.state.editing?ot=>{ot.preventDefault(),ot.stopPropagation()}:ot=>this.startEditing(ot)},this.props.icon&&Wt.createElement(Icon$4,{className:`label-icon ${this.props.icon}`}),this.props.label&&Wt.createElement("label",null,this.props.label),rt)}}const Wrapper$2=styled$1.div`
  position: relative;
  display: inline-block;
  min-width: 20px;
  height: 20px;
`,InputWrapper$1=styled$1.div`
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
`,Input$1=styled$1.input`
  width: 100%;
  border: none;
  border-radius: 2px;

  &:focus {
    outline: 1px solid ${TEAL};
  }

  &.invalid:focus {
    outline: 1px solid ${RED};
  }
`,Ellipsis=styled$1.span`
  flex-shrink: 0;
`,InvisibleSizerSpan=styled$1.span`
  visibility: hidden;
  display: inline-block;
  padding: 0 2px;
`,ValidatingTextInput=({dataTest:et,onCommit:tt,validateInput:nt,initialValue:rt,maxWidth:ot,maxLength:st})=>{const[ut,ct]=react.exports.useState(rt??""),[ft,pt]=react.exports.useState(ut),[ht,mt]=react.exports.useState(!0),yt=react.exports.useRef(null),vt=react.exports.useRef(null),Tt=react.exports.useRef(null),[Et,xt]=react.exports.useState(!1),[At,Ct]=react.exports.useState(!1),$t=kt=>{if(st==null){pt(kt.target.value);return}pt(kt.target.value.slice(0,st))};react.exports.useEffect(()=>{mt(nt(ft))},[ft,nt]);const Ot=react.exports.useCallback(()=>{xt(!0)},[]),Rt=react.exports.useCallback(()=>{xt(!1),ft!==ut&&(ht?(ct(ft),tt(ft)):pt(ut))},[ft,ut,ht,tt]),It=kt=>{kt.key==="Enter"&&(kt.preventDefault(),vt.current?.blur())};return react.exports.useEffect(()=>{setTimeout(()=>{yt.current==null||Tt.current==null||Ct(Tt.current.offsetWidth>yt.current.offsetWidth)})}),Wt.createElement(Wrapper$2,{style:{maxWidth:ot},ref:yt},Wt.createElement(InputWrapper$1,null,Wt.createElement(Input$1,{ref:vt,className:ht?"":"invalid","data-test":et,value:ft,onChange:$t,onFocus:Ot,onBlur:Rt,onKeyDown:It}),!Et&&At&&Wt.createElement(Ellipsis,null,"...")),Wt.createElement(InvisibleSizerSpan,{ref:Tt},ft))},RESERVED_KEYWORDS=new Set(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]);function isValidVarName(et){return et.length<=255&&!RESERVED_KEYWORDS.has(et)&&/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(et)}const Tooltip=styled$1(Popup$1).attrs({basic:!0,mouseEnterDelay:500,popperModifiers:{preventOverflow:{boundariesElement:"viewport"}}})`
  && {
    color: ${Colors.WHITE};
    background: ${Colors.GRAY_800};
    border-color: ${Colors.GRAY_700};
    box-shadow: 0px 4px 6px ${hexToRGB(Colors.BLACK,.2)};
    font-size: 14px;
    line-height: 140%;
    max-width: 300px;
  }
`,Main=styled$1.div`
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
`,EditorBar=styled$1.div`
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
`;styled$1.div`
  padding-left: 4px;
  &:hover {
    cursor: pointer;
    background-color: ${gray200} !important;
  }
`;const BarButton=styled$1(Button$3)`
  margin-right: -5px !important;
  padding: 5px !important;
  background: none !important;
  border: none !important;
  transition-property: border, background-color !important;
  transition-duration: 0.2s !important;

  &:hover {
    background-color: ${gray200} !important;
  }
  & > i {
    margin: 0 !important;
  }
`;styled$1(Button$3)`
  margin-right: -5px !important;
  padding: 5px !important;
  background: none !important;
  border: none !important;
  transition-property: border, background-color !important;
  transition-duration: 0.2s !important;

  &:hover {
    background-color: ${gray200} !important;
  }
`;const rotate=Ue`
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
`;styled$1.div`
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;

  ${et=>et.lazySusan&&Ce`
      border-radius: 50%;
      animation: ${rotate} 20s linear infinite;
    `}
`;styled$1.div`
  flex: 1 1 auto;
  overflow: auto;
`;styled$1.div`
  flex: 0 0 350px;
  padding-left: 10px;
  margin-left: 10px;
  margin-top: 10px;
  border-left: 1px solid #eee;
`;styled$1.div`
  display: flex;
  flex-direction: column;
  height: 100%;
`;styled$1.div`
  flex: 1 1 auto;
  overflow-x: hide;
  overflow-y: visible;
`;styled$1.div`
  height: 100%;
  width: 100%;
`;styled$1.div`
  flex: 0 0 auto;
  height: 35px;
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
`;styled$1.div`
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
`;const PanelInteractContext=Wt.createContext(null);PanelInteractContext.displayName="PanelInteractContext";const PanelInteractContextProvider=Wt.memo(({children:et})=>{const[tt,nt]=react.exports.useState({selectedPath:[],editorSidebarOpen:!1,panelState:{}});return Wt.createElement(PanelInteractContext.Provider,{value:{state:tt,setState:nt}},et)});PanelInteractContextProvider.displayName="PanelInteractContextProvider";const usePanelInteractContext=()=>{const et=react.exports.useContext(PanelInteractContext);if(et==null)throw new Error("usePanelInteractContext must be used within a PanelInteractContextProvider");return et},usePanelInteractStateByPath=et=>{const{state:tt}=usePanelInteractContext(),nt=et.join(".");return tt.panelState[nt]},usePanelInputExprIsHighlightedByPath=et=>usePanelInteractStateByPath(et)?.highlightInputExpr===!0,usePanelIsHoveredByPath=et=>usePanelInteractStateByPath(et)?.hovered===!0,useGetPanelIsHoveredByGroupPath=et=>{const{state:tt}=usePanelInteractContext();return nt=>{const rt=[...et,nt].join(".");return tt.panelState[rt]?.hovered===!0}},useGetPanelIsHoveredInOutlineByGroupPath=et=>{const{state:tt}=usePanelInteractContext();return nt=>{const rt=[...et,nt].join(".");return tt.panelState[rt]?.hoveredInOutline===!0}},useSetPanelStateByPath=()=>{const{setState:et}=usePanelInteractContext();return react.exports.useCallback((tt,nt)=>{const rt=tt.join(".");et(ot=>({...ot,panelState:{...ot.panelState,[rt]:nt(ot.panelState[rt])}}))},[et])},useSetPanelInputExprIsHighlighted=()=>{const et=useSetPanelStateByPath();return react.exports.useCallback((tt,nt)=>{et(tt,rt=>({...rt,highlightInputExpr:nt}))},[et])},useSetPanelIsHovered=()=>{const et=useSetPanelStateByPath();return react.exports.useCallback((tt,nt)=>{et(tt,rt=>({...rt,hovered:nt}))},[et])},useSetPanelIsHoveredInOutline=()=>{const et=useSetPanelStateByPath();return react.exports.useCallback((tt,nt)=>{et(tt,rt=>({...rt,hoveredInOutline:nt}))},[et])},useSetInspectingPanel=()=>{const{setState:et}=usePanelInteractContext();return react.exports.useCallback(tt=>{et(nt=>({...nt,editorSidebarOpen:!0,selectedPath:tt}))},[et])},useSetInspectingChildPanel=()=>{const et=useSetInspectingPanel(),{path:tt}=usePanelContext();return react.exports.useCallback(nt=>{et(tt.concat([nt]))},[tt,et])},useCloseEditor=()=>{const{setState:et}=usePanelInteractContext();return react.exports.useCallback(()=>{et(tt=>({...tt,editorSidebarOpen:!1}))},[et])},useEditorIsOpen=()=>{const{state:et}=usePanelInteractContext();return et.editorSidebarOpen},useSelectedPath=()=>{const{state:et}=usePanelInteractContext();return et.selectedPath};function opposite(et){switch(et){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}const PointyTriangleWrapper=styled$1.div`
  position: fixed;
  z-index: 999;
  top: ${et=>et.top}px;
  left: ${et=>et.left}px;
  border: ${et=>et.size}px solid transparent;
  ${et=>"border-"+opposite(et.direction)}: none;
  ${et=>"border-"+et.direction}: ${et=>et.size}px solid
    ${et=>et.color?et.color:"rgb(34, 34, 34)"};
`,PointyTriangle=et=>{let tt=Math.min(Math.max(et.x,0),window.innerWidth),nt=Math.min(Math.max(et.y,0),window.innerHeight);switch(et.direction){case"top":tt-=et.size,nt-=et.size;break;case"bottom":tt-=et.size;break;case"left":tt-=et.size,nt-=et.size;break;case"right":nt-=et.size;break}const rt=Wt.createElement(PointyTriangleWrapper,{left:tt,top:nt,size:et.size,direction:et.direction,color:et.color});return et.noPortal?rt:ReactDOM.createPortal({content:rt},document.body)},Wrapper$1=styled$1.div`
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.12));
  z-index: 2147483647;
`;function getScrollParent(et){if(et==null)return null;const tt=window.getComputedStyle(et).overflowY;return tt!=="visible"&&tt!=="hidden"&&et.scrollHeight>et.clientHeight?et:getScrollParent(et.parentElement)}const WBAnchoredPopup=Wt.forwardRef(({className:et,direction:tt="bottom right",triangleColor:nt,triangleSize:rt=4,anchorElement:ot,children:st,maxHeight:ut,onParentScroll:ct="follow",scrollerRef:ft,onScroll:pt},ht)=>{const[mt,yt]=Wt.useState(),[vt,Tt]=Wt.useState(null),Et=react.exports.useCallback(()=>{ot&&yt(ot.getBoundingClientRect());const It=getScrollParent(ot);function kt(){typeof ct=="function"&&ct(),ot&&ct==="follow"&&yt(ot.getBoundingClientRect())}return It&&It.addEventListener("scroll",kt),document.addEventListener("scroll",kt),()=>{It&&It.removeEventListener("scroll",kt),document.removeEventListener("scroll",kt)}},[ot,ct]);Wt.useEffect(Et,[Et]),Wt.useEffect(()=>{if(ot){const It=new IntersectionObserver(Et);return It.observe(ot),()=>It.unobserve(ot)}},[ot,Et]),Wt.useEffect(()=>{if(ct==="disable"&&vt)return bodyScrollLock_min.disableBodyScroll(vt,{reserveScrollBarGap:!0}),()=>{bodyScrollLock_min.enableBodyScroll(vt)}},[ct,vt]);let xt=0,At=0,Ct=0,$t=0;if(mt!=null){const[It,kt]=tt.split(" ");switch(It){case"top":At=mt.top-rt,$t=mt.top;break;case"center":At=mt.top+mt.height/2,$t=mt.top+mt.height/2;break;case"bottom":At=mt.bottom+rt,$t=mt.bottom;break}switch(kt){case"left":It==="center"?(xt=mt.left-rt,Ct=mt.left):(xt=mt.left+mt.width,Ct=mt.left+mt.width/2);break;case"center":xt=mt.left+mt.width/2,Ct=mt.left+mt.width/2;break;case"right":It==="center"?(xt=mt.right+rt,Ct=mt.right):(xt=mt.left,Ct=mt.left+mt.width/2);break}}const Ot=Wt.useMemo(()=>{for(const It of["top","bottom","left","right"])if(tt.indexOf(It)!==-1)return It;return"bottom"},[tt]),Rt=Wt.useCallback(It=>{ft&&(typeof ft=="function"?ft(It):ft.current=It),Tt(It)},[ft]);return ReactDOM.createPortal(Wt.createElement(Wt.Fragment,null,Wt.createElement(Wrapper$1,null,rt>0&&Wt.createElement(PointyTriangle,{x:Ct,y:$t,size:rt,direction:Ot,color:nt,noPortal:!0}),Wt.createElement(WBPopup,{className:et,ref:ht,scrollerRef:Rt,x:xt,y:At,maxHeight:ut,direction:tt,noPortal:!0,onScroll:pt},st))),document.body)});WBAnchoredPopup.displayName="WBAnchoredPopup";const LoaderItem=styled$1.div`
  position: relative;
  height: 32px;
  min-width: 64px;
`,DisabledItem=styled$1.div`
  color: #bbb;
  padding: 8px 16px 8px 16px;
  font-size: 14px;
  line-height: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
`,DEFAULT_SORT_SCORE_FN=()=>0,WBQueryMenu=Wt.forwardRef(({options:et,scrollerElement:tt,scrollThreshold:nt=52,pageSize:rt=20,sortScoreFn:ot=DEFAULT_SORT_SCORE_FN,infiniteScroll:st,onResolvedOptions:ut,...ct},ft)=>{const[pt,ht]=Wt.useState(typeof et=="function"),[mt,yt]=Wt.useState([]),[vt,Tt]=Wt.useState(void 0),[Et,xt]=Wt.useState(null),At=Wt.useRef(null);Wt.useEffect(()=>()=>{At.current=null},[]),Wt.useEffect(()=>{if(typeof et=="function"){yt([]),ht(!0);const Rt=et({count:rt});At.current=Rt,Rt.then(It=>{Rt===At.current&&(Tt(It.nextPageCursor),yt(It.options),ut?.(It.options),ht(!1))})}else Array.isArray(et)&&(yt(st?et.slice(0,rt):et),ut?.(et))},[et,rt,ut,st]);let Ct=mt.slice();pt?Ct.push({value:-1,disabled:!0,render:()=>Wt.createElement(LoaderItem,null,Wt.createElement(Loader,{active:!0,size:"tiny"}))}):mt.length===0&&(Ct=[{value:-1,disabled:!0,render:()=>Wt.createElement(DisabledItem,null,"No matches")}]),st||mt.sort((Rt,It)=>{const kt=ot(Rt),Mt=ot(It);return kt!==Mt?Mt-kt:0});const $t=Wt.useCallback(()=>{if(typeof et=="function"){ht(!0);const Rt=et({cursor:vt,count:rt});At.current=Rt,Rt.then(It=>{Rt===At.current&&(yt(kt=>kt.concat(It.options)),Tt(It.nextPageCursor),ht(!1))})}else Array.isArray(et)&&yt(Rt=>et.slice(0,Rt.length+rt))},[rt,et,vt]);tt==null&&(tt=Et),Wt.useEffect(()=>{if(tt!=null){const Rt=()=>{const It=typeof et=="function"&&!pt&&vt==null||Array.isArray(et)&&mt.length===et.length;tt!=null&&st&&!It&&tt.scrollTop>tt.scrollHeight-tt.clientHeight-nt&&$t()};return tt.addEventListener("scroll",Rt),()=>{tt?.removeEventListener("scroll",Rt)}}},[tt,mt,st,$t,pt,nt,et,vt]);const Ot=Wt.useCallback(Rt=>{ft&&(typeof ft=="function"?ft(Rt):ft.current=Rt),xt(Rt)},[ft]);return Wt.createElement(WBMenu,{...ct,ref:Ot,options:Ct})}),SuggestionMenuPopup=styled$1(WBAnchoredPopup)`
  border-radius: 4px;
  transform: translateY(2px);
`,SuggestionPopupFlexWrapper=styled$1.div`
  display: flex;
  flex-direction: row;
  align-items: start;
`,SuggestionMenu=styled$1(WBQueryMenu)`
  flex: 0 0 auto;

  ${et=>Ce`
      max-height: ${et.$maxHeight}px;
    `}

  overflow-y: scroll;
  scrollbar-width: none; // firefox

  /* force the menu to draw over the context panel */
  z-index: 1;

  &::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
`,SuggestionContext=styled$1.div`
  flex: 0 0 auto;
  position: relative;
  left: -4px;
`,Option=styled$1.div`
  color: white;
  padding: 8px 16px 8px 16px;
  font-size: 14px;
  line-height: 16px;
  cursor: pointer;
  background: ${et=>et.hovered?GLOBAL_COLORS.primary.toString():"none"};
`,DEFAULT_OPTION_RENDERER=({option:et,hovered:tt})=>Wt.createElement(Option,{hovered:tt},et.name??et.value),WBSuggester=({className:et,matchWidth:tt,maxHeight:nt=248,options:rt,dataTest:ot,selected:st,onSelect:ut,children:ct,query:ft,onParentScroll:pt,open:ht,scrollThreshold:mt,pageSize:yt,optionRenderer:vt=DEFAULT_OPTION_RENDERER,infiniteScroll:Tt,sortScoreFn:Et,onResolvedOptions:xt,contextContent:At,highlighted:Ct,onChangeHighlighted:$t})=>{const Ot=Mt=>(Mt.name??Mt.value.toString()).startsWith(ft)?1:0,[Rt,It]=Wt.useState(null);let kt;return Array.isArray(rt)?kt=rt.filter(Mt=>(Mt.name??Mt.value)?.toString().toLowerCase().includes(ft.toLowerCase())):typeof rt=="function"&&(kt=Mt=>rt(ft,Mt)),Wt.createElement(Wt.Fragment,null,ct({inputRef:It}),kt!=null&&ht&&Wt.createElement(SuggestionMenuPopup,{className:et,direction:"bottom right",anchorElement:Rt,triangleSize:0,onParentScroll:pt},Wt.createElement(SuggestionPopupFlexWrapper,null,Wt.createElement(SuggestionMenu,{$maxHeight:nt,width:tt?Rt?.getBoundingClientRect().width:void 0,dataTest:ot,options:kt,highlighted:Ct,onChangeHighlighted:$t,highlightFirst:!0,selected:st,pageSize:yt,sortScoreFn:Et||Ot,scrollThreshold:mt,infiniteScroll:Tt,onSelect:(Mt,Ft)=>{ut(Mt,Ft)},optionRenderer:vt,onResolvedOptions:xt}),At&&Wt.createElement(SuggestionContext,{"data-test":"suggestion-context",onMouseDown:Mt=>Mt.preventDefault()},At))))},PanelNameEditor$1=et=>{const tt=Wt.useRef(null),[nt,rt]=Wt.useState(!1);return Wt.createElement(Wt.Fragment,null,Wt.createElement(PanelNameSpan,{"data-test-comp":"PanelNameEditor",spellCheck:"false"},Wt.createElement(WBSuggester,{options:et.autocompleteOptions,onSelect:ot=>{rt(!1),et.setValue(ot)},query:"",open:nt,onParentScroll:()=>rt(!1)},({inputRef:ot})=>Wt.createElement(InlineContentEditable,{innerRef:st=>{tt.current=st,ot(st)},value:et.value,disabled:et.disabled,onFocus:()=>{rt(!0)},onBlur:()=>rt(!1),onTempChange:st=>{rt(!0)},onChange:st=>{}}))))};function newColumnId(et){for(let tt=0;tt<1e3;tt++){const nt="col-"+tt.toString();if(!(nt in et.columns))return nt}throw new Error("Could not find a new column id")}function emptyTable(){return{autoColumns:!0,columns:{},columnNames:{},preFilterFunction:voidNode(),columnSelectFunctions:{},order:[],groupBy:[],sort:[],pageSize:10,page:0}}function initTableWithPickColumns(et,tt,nt){const rt=et.type;let ot=[],st=[];const ut=listObjectType(rt);let ct=emptyTable();const ft=getRowExampleNode(ct.preFilterFunction,ct.groupBy,ct.columnSelectFunctions,ct.columnNames,ct.order,ct.sort,et,tt);if(nt)ot=nt.map(pt=>({selectFn:opPick({obj:varNode(ft.type,"row"),key:constString(pt)}),keyName:pt}));else{isAssignableTo(nonNullable(ut),{type:"union",members:[typedDict({}),rootObject()]})&&(st=autoTableColumnExpressions(ft.type,ut));const pt=st.length>100?st.slice(0,100):st;pt.length===0?ct=addColumnToTable(ct,varNode(ft.type,"row")).table:ot=pt.map(ht=>({selectFn:ht,keyName:""}))}return ct=addColumnsToTable(ct,ot).table,ct}function isNDArrayLike(et){return et=nullableTaggableValue(et),isSimpleTypeShape(et)?!1:et.type==="ndarray"?!0:isListLike(et)?isNDArrayLike(listObjectType(et)):!1}const streamTableColumns=["timestamp","_client_id","_timestamp","_step"],monitoringColumns=["result_id","inputs","output","latency_ms","start_datetime","end_datetime","exception",...streamTableColumns],excludedStreamTableColumns=["_client_id","_timestamp","_step"],excludedMonitoringColumns=["timestamp",...excludedStreamTableColumns];function allPathsFromMonitoring(et){for(const tt of monitoringColumns)if(!et.find(nt=>nt.path[0]===tt))return!1;return!0}function allPathsFromStreamTable(et){for(const tt of streamTableColumns)if(!et.find(nt=>nt.path[0]===tt))return!1;return!0}function autoTableColumnExpressions(et,tt){let nt=allObjPaths(tt).filter(rt=>!isNDArrayLike(rt.type)&&!isAssignableTo(rt.type,"none"));return allPathsFromMonitoring(nt)?(nt=nt.filter(rt=>!excludedMonitoringColumns.includes(rt.path[0])),nt=nt.sort((rt,ot)=>{const st=monitoringColumns.indexOf(rt.path[0]),ut=monitoringColumns.indexOf(ot.path[0]);return st-ut})):allPathsFromStreamTable(nt)&&(nt=nt.filter(rt=>!excludedStreamTableColumns.includes(rt.path[0]))),nt.map(rt=>rt.path.map(escapeDots)).map(rt=>{let ot=varNode(et,"row"),st=[];for(const ut of rt)ut.startsWith("__object__")?(st.length>0&&(ot=opPick({obj:ot,key:constString(st.join("."))}),st=[]),ot=opObjGetAttr({self:ot,name:constString(ut.slice(10))})):st.push(ut);return st.length>0&&(ot=opPick({obj:ot,key:constString(st.join("."))})),ot})}function initTableFromTableType(et,tt){let nt=initTableWithPickColumns(et,tt);return nt=maybeAddCompareColumn(nt,et,tt),nt=setAutoColumns(nt,!0),{table:nt}}function maybeAddCompareColumn(et,tt,nt){if(tt.nodeType==="output"&&tt.fromOp.name==="joinAll"){const rt=opGetJoinedJoinObj({obj:varNode(getExampleRow(tt).type,"row")});rt.type!=="invalid"&&rt.type!=="none"&&(et=prependColumn(et,tt,nt),et=updateColumnSelect(et,et.order[0],rt),et=updateColumnName(et,et.order[0],"Joined On"),et=setAutoColumns(et,!0));let ot=[];if(tt.fromOp.inputs.joinFn.nodeType==="const"&&isFunction$b(tt.fromOp.inputs.joinFn.type)){const st=tt.fromOp.inputs.joinFn.val.fromOp;if(st.name==="pick"){const ut=st.inputs.key;ut.nodeType==="const"&&(ot=[ut.val])}else if(st.name==="none-coalesce"){let ut=st;for(;ut!=null;){const ct=ut.inputs.rhs;if(ct.nodeType==="output"&&ct.fromOp.name==="pick"){const pt=ct.fromOp.inputs.key;pt.nodeType==="const"&&ot.push(pt.val)}const ft=ut.inputs.lhs;if(ut=null,ft.nodeType==="output"&&ft.fromOp.name==="pick"){const pt=ft.fromOp.inputs.key;pt.nodeType==="const"&&ot.push(pt.val)}else ft.nodeType==="output"&&ft.fromOp.name==="none-coalesce"&&(ut=ft.fromOp)}}}ot=ot.flatMap(st=>{const ut=st.split(".");return ut.splice(1,0,"*"),[st,ut.join(".")]}),_$2.keys(et.columnSelectFunctions).filter(st=>{const ut=et.columnSelectFunctions[st];return ut.nodeType==="output"&&ut.fromOp.inputs.key?.nodeType==="const"?ot.includes(ut.fromOp.inputs.key.val):!1}).forEach(st=>{et=removeColumn(et,st)}),et=setAutoColumns(et,!0)}return et}function tableColumnsDiff(et,tt,nt){const rt=new Set,ot=new Set;for(const ct of Object.values(tt.columnSelectFunctions))rt.add(et.expToString(ct));if(nt!=null&&nt.columnNames!=null)for(const ct of Object.values(nt.columnSelectFunctions))ot.add(et.expToString(ct));const st=[];for(const[ct]of rt.entries())ot.has(ct)||st.push(ct);const ut=[];for(const[ct]of ot.entries())rt.has(ct)||ut.push(ct);return{addedCols:st,removedCols:ut}}function cleanObj(et){const tt={};for(const nt in et)et[nt]!==void 0&&(tt[nt]=et[nt]);return tt}function equalStates(et,tt){if(tt){if(et.order?.length!==tt.order?.length)return!1;if(!_$2.isEqual(et.sort.map(nt=>et.order.indexOf(nt.columnId)),tt.sort.map(nt=>tt.order.indexOf(nt.columnId)))||!_$2.isEqual(et.sort.map(nt=>nt.dir),tt.sort.map(nt=>nt.dir)))return!1;if(_$2.isEqual(et.groupBy.map(nt=>et.order.indexOf(nt)),tt.groupBy.map(nt=>tt.order.indexOf(nt))))if(_$2.isEqual(et.preFilterFunction,tt.preFilterFunction))for(let nt=0;nt<et.order.length;nt++){const rt=et.order[nt],ot=tt.order[nt];if(et.columnNames[rt]!==tt.columnNames[ot]||!_$2.isEqual(et.columnSelectFunctions[rt],tt.columnSelectFunctions[ot])||!_$2.isEqual(cleanObj(et.columns[rt]),cleanObj(tt.columns[ot])))return!1}else return!1;else return!1}else return!1;return!0}function appendEmptyColumn(et){const tt=newColumnId(et);return fn(et,nt=>{nt.columns[tt]={panelId:"",panelConfig:void 0},nt.columnNames[tt]="",nt.columnSelectFunctions[tt]=voidNode(),nt.order.push(tt)})}function prependColumn(et,tt,nt){const rt=newColumnId(et),ot=getRowExampleNode(et.preFilterFunction,et.groupBy,et.columnSelectFunctions,et.columnNames,et.order,et.sort,tt,nt);return fn(et,st=>{st.autoColumns=!1,st.columns[rt]={panelId:"",panelConfig:void 0},st.columnNames[rt]="",st.columnSelectFunctions[rt]=varNode(ot.type,"row"),st.order.unshift(rt)})}function setAutoColumns(et,tt){return fn(et,nt=>{nt.autoColumns=tt})}function updatePreFilter(et,tt){return fn(et,nt=>{nt.autoColumns=!1,nt.preFilterFunction=tt})}function updateColumnName(et,tt,nt){return fn(et,rt=>{rt.autoColumns=!1,rt.columnNames[tt]=nt})}function updateColumnSelect(et,tt,nt){return fn(et,rt=>{rt.autoColumns=!1,rt.columnSelectFunctions[tt]=nt})}function updateColumnPanelId(et,tt,nt){return fn(et,rt=>{rt.autoColumns=!1,rt.columns[tt].panelId=nt})}function updateColumnPanelConfig(et,tt,nt){return fn(et,rt=>{rt.columns[tt].panelConfig==null&&(rt.columns[tt].panelConfig={}),Object.assign(rt.columns[tt].panelConfig,nt)})}function enableGroupByCol(et,tt){return et=fn(et,nt=>{if(nt.autoColumns=!1,et.columns[tt]==null)throw new Error("invalid group by col id"+tt);et.groupBy.includes(tt)||nt.groupBy.push(tt)}),et=disableSort(et),et=enableSortByCol(et,et.groupBy[0],!0),et}function disableGroupByCol(et,tt){const nt=_$2.isArray(tt)?tt:[tt],rt=et.groupBy;return et=fn(et,ot=>{ot.autoColumns=!1;for(const st of nt){if(et.columns[st]==null)throw new Error("invalid group by col id"+st);if(!rt.includes(st))return;const ut=ot.groupBy.indexOf(st);ot.groupBy.splice(ut,1)}}),et.sort.find(ot=>ot.columnId===tt)!==void 0&&(et=disableSortByCol(et,tt)),et}function enableSortByCol(et,tt,nt){const rt=nt?"asc":"desc";if(et.columns[tt]==null)throw new Error("invalid sort by col id"+tt);let ot=null;for(let st=0;st<et.sort.length;st++)if(et.sort[st].columnId===tt){if(ot=st,et.sort[st].dir===rt)return et;break}return et=fn(et,st=>{st.autoColumns=!1;const ut={dir:rt,columnId:tt};ot==null?st.sort.push(ut):st.sort[ot]=ut}),et}function disableSortByCol(et,tt){return et=fn(et,nt=>{nt.autoColumns=!1,nt.sort=nt.sort.filter(rt=>rt.columnId!==tt)}),et}function disableSort(et){return et=fn(et,tt=>{tt.sort=[]}),et}function insertColumnRight(et,tt,nt,rt){const ot=et.order.indexOf(tt);if(ot===-1)throw new Error("invalid insert col id"+tt);const st=newColumnId(et),ut=getRowExampleNode(et.preFilterFunction,et.groupBy,et.columnSelectFunctions,et.columnNames,et.order,et.sort,nt,rt);return fn(et,ct=>{ct.autoColumns=!1,ct.columns[st]={panelId:"",panelConfig:{}},ct.columnNames[st]="",ct.columnSelectFunctions[st]=varNode(ut.type,"row"),ct.order.splice(ot+1,0,st)})}function insertColumnLeft(et,tt,nt,rt){const ot=et.order.indexOf(tt);if(ot===-1)throw new Error("invalid insert col id"+tt);const st=newColumnId(et),ut=getRowExampleNode(et.preFilterFunction,et.groupBy,et.columnSelectFunctions,et.columnNames,et.order,et.sort,nt,rt);return fn(et,ct=>{ct.autoColumns=!1,ct.columns[st]={panelId:"",panelConfig:{}},ct.columnNames[st]="",ct.columnSelectFunctions[st]=varNode(ut.type,"row"),ct.order.splice(ot,0,st)})}function removeColumn(et,tt){if(et.groupBy.includes(tt))return et;const nt=et.order.indexOf(tt);if(nt===-1)throw new Error("invalid remove col id"+tt);return fn(et,rt=>{rt.autoColumns=!1,delete rt.columns[tt],delete rt.columnNames[tt],delete rt.columnSelectFunctions[tt],rt.sort=rt.sort.filter(ot=>ot.columnId!==tt),rt.order.splice(nt,1)})}function removeColumnsToRight(et,tt){const nt=et.order.indexOf(tt);if(nt===-1)throw new Error("invalid remove col id"+tt);for(let rt=et.order.length-1;rt>nt;rt--)et=removeColumn(et,et.order[rt]);return et}function removeColumnsToLeft(et,tt){const nt=et.order.indexOf(tt);if(nt===-1)throw new Error("invalid remove col id"+tt);for(let rt=nt-1;rt>0;rt--)et=removeColumn(et,et.order[rt]);return et}function getRowFrame(et){return{row:getExampleRow(et),index:varNode("number","index")}}function getCellFrame(et,tt,nt,rt,ot){let st;return isGrouped(nt,rt)&&!nt.includes(ot)?st=getExampleRow(tt):st=getExampleRow(et),isList(et.type)?{row:st,index:varNode("number","index")}:{row:st,index:varNode("number","index")}}function isGrouped(et,tt){for(const nt of et)if(tt[nt].type!=="invalid")return!0;return!1}function getColumnRenderOrder(et){return et.order.filter(tt=>!et.groupBy.includes(tt))}function getExampleRow(et){return opIndex({arr:et,index:varNode("number","n")})}function getRowExampleNode(et,tt,nt,rt,ot,st,ut,ct){const ft=getRowsNode(et,tt,nt,rt,ot,st,ut,ct);return tt.length>0?getExampleRow(ft):getExampleRow(ut)}function getComparableDataFn(et,tt,nt,rt,ot,st){const ut=opIndex({arr:ot,index:varNode("number","n")});if(rt.length===0)throw new Error("Invalid sortBy value");const ct={};for(const ft of rt){const pt=et[ft.columnId];let ht=varNode(ut.type,"row");pt.nodeType!=="void"&&(nt.includes(ft.columnId)?ht=opPick({obj:opGroupGroupKey({obj:ht}),key:constString(getTableColumnName(tt,et,ft.columnId,st.client.opStore))}):ht=st.callFunction(pt,{row:ht})),ct[ft.columnId]=ht}return Object.keys(ct).length===0?voidNode():opArray(ct)}function getPagedRowsNode(et,tt,nt){let rt=opOffset({arr:nt,offset:constNumber(et*tt)});return rt=opLimit({arr:rt,limit:constNumber(et)}),rt}function groupDict(et,tt,nt,rt,ot){const st={};for(const ut of et)if(tt.includes(ut)){const ct=nt[ut];if(ct.type!=="invalid"){const ft=getTableColumnName(rt,nt,ut,ot);st[ft]=ct}}return st}function groupByNodeForRegularStyle(et,tt,nt,rt,ot,st){const ut=groupDict(et,tt,nt,rt,st);return ot=opGroupby({arr:ot,groupByFn:constFunction({row:getExampleRow(ot).type},ct=>opDict(ut))}),ot}function sortNodeForRegularStyle(et,tt,nt,rt,ot,st){const ut=getComparableDataFn(et,tt,nt,rt,ot,st);return ut.nodeType!=="void"&&(ot=opSort({arr:ot,compFn:constFunction({row:getExampleRow(ot).type},({row:ct})=>ut),columnDirs:constNodeUnsafe({type:"list",objectType:"string"},rt.map(ct=>ct.dir))})),ot}function getRowsNode(et,tt,nt,rt,ot,st,ut,ct){let ft=ut;return et.nodeType==="output"&&(ft=opFilter({arr:ft,filterFn:constFunction({row:getExampleRow(ft).type},pt=>et)})),tt.length>0&&(ft=groupByNodeForRegularStyle(ot,tt,nt,rt,ft,ct.client.opStore)),st.length>0&&(ft=sortNodeForRegularStyle(nt,rt,tt,st,ft,ct)),ft}function getTableColumnName(et,tt,nt,rt){const ot=et[nt]!==""?et[nt]:simpleNodeString$1(tt[nt],rt);if(ot==null)throw new Error("invalid table state");return ot}function resultTableNodeRegularStyle(et,tt,nt,rt,ot,st,ut){const ct={};for(const ft of et)if(!tt.includes(ft)){const pt=nt[ft];if(pt.type!=="invalid"){const ht=getTableColumnName(rt,nt,ft,ut);ct[ht]=pt}}return opMap({arr:ot,mapFn:constFunction({row:st.type,index:"number"},({row:ft,index:pt})=>opMerge({lhs:Object.keys(tt).length>0?opGroupGroupKey({obj:ft}):opDict({}),rhs:opDict({...ct,_index:pt})}))})}function getResultTableNode(et,tt,nt,rt,ot,st){if(!Object.values(tt).some(ct=>ct.type!=="invalid"))return constNodeUnsafe({type:"list",objectType:{type:"typedDict",propertyTypes:{}}},[]);const ut=getExampleRow(et);return resultTableNodeRegularStyle(ot,rt,tt,nt,et,ut,st)}function tableGetResultTableNode(et,tt,nt){const rt=getRowFrame(tt),ot=getRowsNode(et.preFilterFunction,et.groupBy,et.columnSelectFunctions,et.columnNames,et.order,et.sort,tt,nt),st=getResultTableNode(ot,et.columnSelectFunctions,et.columnNames,et.groupBy,et.order,nt.client.opStore);return{exampleInputFrame:rt,rowsNode:ot,resultNode:st}}function tableGetColumnVars(et,tt,nt){const rt=getRowsNode(et.preFilterFunction,et.groupBy,et.columnSelectFunctions,et.columnNames,et.order,et.sort,tt,nt);return{row:getExampleRow(rt)}}const getTableColType=(et,tt)=>{const nt=et.columnSelectFunctions[tt];return nt.type==="invalid"?"invalid":nt.type};function getCellValueNode(et,tt,nt){return nt.nodeType==="void"?nt:et.callFunction(nt,{row:tt})}function addColumnToTable(et,tt){et=appendEmptyColumn(et);const nt=et.order[et.order.length-1];return et=updateColumnSelect(et,nt,tt),{table:et,columnId:nt}}function addColumnsToTable(et,tt){const nt=[];return{table:fn(et,ot=>{ot.autoColumns=!1;for(const st of tt)nt.push(addColumnToDraft(ot,st.keyName,st.selectFn))}),columnIds:nt}}function addNamedColumnToTable(et,tt,nt,rt){et=appendEmptyColumn(et);const ot=et.order[et.order.length-1];return et=updateColumnSelect(et,ot,nt),et=updateColumnName(et,ot,tt),rt!=null&&(et=updateColumnPanelId(et,ot,rt.panelID),et=updateColumnPanelConfig(et,ot,rt.panelConfig)),et}const COLUMN_LIMIT=100;function addColumnToDraft(et,tt,nt){const rt=newColumnId(et);return et.order.push(rt),et.columns[rt]={panelId:"",panelConfig:void 0,originalKey:tt},et.columnNames[rt]=tt,et.columnSelectFunctions[rt]=nt,rt}function addColumns(et,tt){const nt=Object.entries(et.columnNames).reduce((rt,[ot,st])=>rt.set(st,ot),new Map);return et=fn(et,rt=>{for(const ot of tt){const st=ot.id??nt.get(ot.name);if(st==null){if(ot.selectFn==null)throw new Error(`select fn not provided for column named "${ot.name}"`);addColumnToDraft(rt,ot.name,ot.selectFn)}else rt.order.includes(st)||rt.order.push(st)}rt.autoColumns=!1}),et}function removeColumns(et,tt){return et=fn(et,nt=>{const rt=Object.entries(nt.columns).reduce((ot,[st,ut])=>(tt.some(ct=>ct.id===st)&&ot.push(st),ot),[]);nt.order=nt.order.filter(ot=>!rt.includes(ot)),nt.groupBy=nt.groupBy.filter(ot=>!rt.includes(ot)),nt.autoColumns=!1}),et}function moveBefore(et,tt,nt){if(tt.id==null)return et;const rt=et.order.findIndex(st=>st===tt.id),ot=et.order.findIndex(st=>st===nt.id);return rt!==-1&&ot!==-1?fn(et,st=>{st.order.splice(rt,1),st.order.splice(ot,0,tt.id),st.autoColumns=!1}):et}function moveToEnd(et,tt){const nt=et.order.findIndex(rt=>rt===tt.id);return nt!==-1?fn(et,rt=>{rt.order.push(rt.order.splice(nt,1)[0]),rt.autoColumns=!1}):et}const PanelBank="",PanelBankEditablePanel="",PANEL_BANK_PADDING=0,DEFAULT_PANEL_SIZE=64;function isPanel(et){return et!=null&&et.type==="panel"}var reactResizable={exports:{}},Resizable$2={},cjs={exports:{}},Draggable$1={};const require$$10=getAugmentedNamespace(clsx_m);var domFns={},shims={};Object.defineProperty(shims,"__esModule",{value:!0});shims.dontSetMe=dontSetMe;shims.findInArray=findInArray;shims.int=int;shims.isFunction=isFunction;shims.isNum=isNum;function findInArray(et,tt){for(var nt=0,rt=et.length;nt<rt;nt++)if(tt.apply(tt,[et[nt],nt,et]))return et[nt]}function isFunction(et){return typeof et=="function"||Object.prototype.toString.call(et)==="[object Function]"}function isNum(et){return typeof et=="number"&&!isNaN(et)}function int(et){return parseInt(et,10)}function dontSetMe(et,tt,nt){if(et[tt])return new Error("Invalid prop ".concat(tt," passed to ").concat(nt," - do not set this, set it on the child."))}var getPrefix$1={};Object.defineProperty(getPrefix$1,"__esModule",{value:!0});getPrefix$1.browserPrefixToKey=browserPrefixToKey;getPrefix$1.browserPrefixToStyle=browserPrefixToStyle;getPrefix$1.default=void 0;getPrefix$1.getPrefix=getPrefix;var prefixes=["Moz","Webkit","O","ms"];function getPrefix(){var et,tt,nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var rt=(et=window.document)===null||et===void 0||(tt=et.documentElement)===null||tt===void 0?void 0:tt.style;if(!rt||nt in rt)return"";for(var ot=0;ot<prefixes.length;ot++)if(browserPrefixToKey(nt,prefixes[ot])in rt)return prefixes[ot];return""}function browserPrefixToKey(et,tt){return tt?"".concat(tt).concat(kebabToTitleCase(et)):et}function browserPrefixToStyle(et,tt){return tt?"-".concat(tt.toLowerCase(),"-").concat(et):et}function kebabToTitleCase(et){for(var tt="",nt=!0,rt=0;rt<et.length;rt++)nt?(tt+=et[rt].toUpperCase(),nt=!1):et[rt]==="-"?nt=!0:tt+=et[rt];return tt}var _default$8=getPrefix();getPrefix$1.default=_default$8;function _typeof$3(et){return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof$3(et)}Object.defineProperty(domFns,"__esModule",{value:!0});domFns.addClassName=addClassName$1;domFns.addEvent=addEvent;domFns.addUserSelectStyles=addUserSelectStyles$1;domFns.createCSSTransform=createCSSTransform;domFns.createSVGTransform=createSVGTransform;domFns.getTouch=getTouch;domFns.getTouchIdentifier=getTouchIdentifier;domFns.getTranslation=getTranslation;domFns.innerHeight=innerHeight$1;domFns.innerWidth=innerWidth$1;domFns.matchesSelector=matchesSelector;domFns.matchesSelectorAndParentsTo=matchesSelectorAndParentsTo;domFns.offsetXYFromParent=offsetXYFromParent;domFns.outerHeight=outerHeight;domFns.outerWidth=outerWidth;domFns.removeClassName=removeClassName$1;domFns.removeEvent=removeEvent;domFns.removeUserSelectStyles=removeUserSelectStyles$1;var _shims$2=shims,_getPrefix=_interopRequireWildcard$6(getPrefix$1);function _getRequireWildcardCache$3(et){if(typeof WeakMap!="function")return null;var tt=new WeakMap,nt=new WeakMap;return(_getRequireWildcardCache$3=function(ot){return ot?nt:tt})(et)}function _interopRequireWildcard$6(et,tt){if(!tt&&et&&et.__esModule)return et;if(et===null||_typeof$3(et)!=="object"&&typeof et!="function")return{default:et};var nt=_getRequireWildcardCache$3(tt);if(nt&&nt.has(et))return nt.get(et);var rt={},ot=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var st in et)if(st!=="default"&&Object.prototype.hasOwnProperty.call(et,st)){var ut=ot?Object.getOwnPropertyDescriptor(et,st):null;ut&&(ut.get||ut.set)?Object.defineProperty(rt,st,ut):rt[st]=et[st]}return rt.default=et,nt&&nt.set(et,rt),rt}function ownKeys$9(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$9(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$9(Object(nt),!0).forEach(function(rt){_defineProperty$4(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$9(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}function _defineProperty$4(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}var matchesSelectorFunc="";function matchesSelector(et,tt){return matchesSelectorFunc||(matchesSelectorFunc=(0,_shims$2.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(nt){return(0,_shims$2.isFunction)(et[nt])})),(0,_shims$2.isFunction)(et[matchesSelectorFunc])?et[matchesSelectorFunc](tt):!1}function matchesSelectorAndParentsTo(et,tt,nt){var rt=et;do{if(matchesSelector(rt,tt))return!0;if(rt===nt)return!1;rt=rt.parentNode}while(rt);return!1}function addEvent(et,tt,nt,rt){if(!!et){var ot=_objectSpread$9({capture:!0},rt);et.addEventListener?et.addEventListener(tt,nt,ot):et.attachEvent?et.attachEvent("on"+tt,nt):et["on"+tt]=nt}}function removeEvent(et,tt,nt,rt){if(!!et){var ot=_objectSpread$9({capture:!0},rt);et.removeEventListener?et.removeEventListener(tt,nt,ot):et.detachEvent?et.detachEvent("on"+tt,nt):et["on"+tt]=null}}function outerHeight(et){var tt=et.clientHeight,nt=et.ownerDocument.defaultView.getComputedStyle(et);return tt+=(0,_shims$2.int)(nt.borderTopWidth),tt+=(0,_shims$2.int)(nt.borderBottomWidth),tt}function outerWidth(et){var tt=et.clientWidth,nt=et.ownerDocument.defaultView.getComputedStyle(et);return tt+=(0,_shims$2.int)(nt.borderLeftWidth),tt+=(0,_shims$2.int)(nt.borderRightWidth),tt}function innerHeight$1(et){var tt=et.clientHeight,nt=et.ownerDocument.defaultView.getComputedStyle(et);return tt-=(0,_shims$2.int)(nt.paddingTop),tt-=(0,_shims$2.int)(nt.paddingBottom),tt}function innerWidth$1(et){var tt=et.clientWidth,nt=et.ownerDocument.defaultView.getComputedStyle(et);return tt-=(0,_shims$2.int)(nt.paddingLeft),tt-=(0,_shims$2.int)(nt.paddingRight),tt}function offsetXYFromParent(et,tt,nt){var rt=tt===tt.ownerDocument.body,ot=rt?{left:0,top:0}:tt.getBoundingClientRect(),st=(et.clientX+tt.scrollLeft-ot.left)/nt,ut=(et.clientY+tt.scrollTop-ot.top)/nt;return{x:st,y:ut}}function createCSSTransform(et,tt){var nt=getTranslation(et,tt,"px");return _defineProperty$4({},(0,_getPrefix.browserPrefixToKey)("transform",_getPrefix.default),nt)}function createSVGTransform(et,tt){var nt=getTranslation(et,tt,"");return nt}function getTranslation(et,tt,nt){var rt=et.x,ot=et.y,st="translate(".concat(rt).concat(nt,",").concat(ot).concat(nt,")");if(tt){var ut="".concat(typeof tt.x=="string"?tt.x:tt.x+nt),ct="".concat(typeof tt.y=="string"?tt.y:tt.y+nt);st="translate(".concat(ut,", ").concat(ct,")")+st}return st}function getTouch(et,tt){return et.targetTouches&&(0,_shims$2.findInArray)(et.targetTouches,function(nt){return tt===nt.identifier})||et.changedTouches&&(0,_shims$2.findInArray)(et.changedTouches,function(nt){return tt===nt.identifier})}function getTouchIdentifier(et){if(et.targetTouches&&et.targetTouches[0])return et.targetTouches[0].identifier;if(et.changedTouches&&et.changedTouches[0])return et.changedTouches[0].identifier}function addUserSelectStyles$1(et){if(!!et){var tt=et.getElementById("react-draggable-style-el");tt||(tt=et.createElement("style"),tt.type="text/css",tt.id="react-draggable-style-el",tt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,tt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,et.getElementsByTagName("head")[0].appendChild(tt)),et.body&&addClassName$1(et.body,"react-draggable-transparent-selection")}}function removeUserSelectStyles$1(et){if(!!et)try{if(et.body&&removeClassName$1(et.body,"react-draggable-transparent-selection"),et.selection)et.selection.empty();else{var tt=(et.defaultView||window).getSelection();tt&&tt.type!=="Caret"&&tt.removeAllRanges()}}catch{}}function addClassName$1(et,tt){et.classList?et.classList.add(tt):et.className.match(new RegExp("(?:^|\\s)".concat(tt,"(?!\\S)")))||(et.className+=" ".concat(tt))}function removeClassName$1(et,tt){et.classList?et.classList.remove(tt):et.className=et.className.replace(new RegExp("(?:^|\\s)".concat(tt,"(?!\\S)"),"g"),"")}var positionFns={};Object.defineProperty(positionFns,"__esModule",{value:!0});positionFns.canDragX=canDragX;positionFns.canDragY=canDragY;positionFns.createCoreData=createCoreData;positionFns.createDraggableData=createDraggableData;positionFns.getBoundPosition=getBoundPosition;positionFns.getControlPosition=getControlPosition;positionFns.snapToGrid=snapToGrid;var _shims$1=shims,_domFns$1=domFns;function getBoundPosition(et,tt,nt){if(!et.props.bounds)return[tt,nt];var rt=et.props.bounds;rt=typeof rt=="string"?rt:cloneBounds(rt);var ot=findDOMNode(et);if(typeof rt=="string"){var st=ot.ownerDocument,ut=st.defaultView,ct;if(rt==="parent"?ct=ot.parentNode:ct=st.querySelector(rt),!(ct instanceof ut.HTMLElement))throw new Error('Bounds selector "'+rt+'" could not find an element.');var ft=ct,pt=ut.getComputedStyle(ot),ht=ut.getComputedStyle(ft);rt={left:-ot.offsetLeft+(0,_shims$1.int)(ht.paddingLeft)+(0,_shims$1.int)(pt.marginLeft),top:-ot.offsetTop+(0,_shims$1.int)(ht.paddingTop)+(0,_shims$1.int)(pt.marginTop),right:(0,_domFns$1.innerWidth)(ft)-(0,_domFns$1.outerWidth)(ot)-ot.offsetLeft+(0,_shims$1.int)(ht.paddingRight)-(0,_shims$1.int)(pt.marginRight),bottom:(0,_domFns$1.innerHeight)(ft)-(0,_domFns$1.outerHeight)(ot)-ot.offsetTop+(0,_shims$1.int)(ht.paddingBottom)-(0,_shims$1.int)(pt.marginBottom)}}return(0,_shims$1.isNum)(rt.right)&&(tt=Math.min(tt,rt.right)),(0,_shims$1.isNum)(rt.bottom)&&(nt=Math.min(nt,rt.bottom)),(0,_shims$1.isNum)(rt.left)&&(tt=Math.max(tt,rt.left)),(0,_shims$1.isNum)(rt.top)&&(nt=Math.max(nt,rt.top)),[tt,nt]}function snapToGrid(et,tt,nt){var rt=Math.round(tt/et[0])*et[0],ot=Math.round(nt/et[1])*et[1];return[rt,ot]}function canDragX(et){return et.props.axis==="both"||et.props.axis==="x"}function canDragY(et){return et.props.axis==="both"||et.props.axis==="y"}function getControlPosition(et,tt,nt){var rt=typeof tt=="number"?(0,_domFns$1.getTouch)(et,tt):null;if(typeof tt=="number"&&!rt)return null;var ot=findDOMNode(nt),st=nt.props.offsetParent||ot.offsetParent||ot.ownerDocument.body;return(0,_domFns$1.offsetXYFromParent)(rt||et,st,nt.props.scale)}function createCoreData(et,tt,nt){var rt=et.state,ot=!(0,_shims$1.isNum)(rt.lastX),st=findDOMNode(et);return ot?{node:st,deltaX:0,deltaY:0,lastX:tt,lastY:nt,x:tt,y:nt}:{node:st,deltaX:tt-rt.lastX,deltaY:nt-rt.lastY,lastX:rt.lastX,lastY:rt.lastY,x:tt,y:nt}}function createDraggableData(et,tt){var nt=et.props.scale;return{node:tt.node,x:et.state.x+tt.deltaX/nt,y:et.state.y+tt.deltaY/nt,deltaX:tt.deltaX/nt,deltaY:tt.deltaY/nt,lastX:et.state.x,lastY:et.state.y}}function cloneBounds(et){return{left:et.left,top:et.top,right:et.right,bottom:et.bottom}}function findDOMNode(et){var tt=et.findDOMNode();if(!tt)throw new Error("<DraggableCore>: Unmounted during event!");return tt}var DraggableCore$2={},log$1={};Object.defineProperty(log$1,"__esModule",{value:!0});log$1.default=log;function log(){}function _typeof$2(et){return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof$2(et)}Object.defineProperty(DraggableCore$2,"__esModule",{value:!0});DraggableCore$2.default=void 0;var React$2=_interopRequireWildcard$5(react.exports),_propTypes$7=_interopRequireDefault$c(propTypes$1.exports),_reactDom$1=_interopRequireDefault$c(reactDom.exports),_domFns=domFns,_positionFns=positionFns,_shims=shims,_log=_interopRequireDefault$c(log$1);function _interopRequireDefault$c(et){return et&&et.__esModule?et:{default:et}}function _getRequireWildcardCache$2(et){if(typeof WeakMap!="function")return null;var tt=new WeakMap,nt=new WeakMap;return(_getRequireWildcardCache$2=function(ot){return ot?nt:tt})(et)}function _interopRequireWildcard$5(et,tt){if(!tt&&et&&et.__esModule)return et;if(et===null||_typeof$2(et)!=="object"&&typeof et!="function")return{default:et};var nt=_getRequireWildcardCache$2(tt);if(nt&&nt.has(et))return nt.get(et);var rt={},ot=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var st in et)if(st!=="default"&&Object.prototype.hasOwnProperty.call(et,st)){var ut=ot?Object.getOwnPropertyDescriptor(et,st):null;ut&&(ut.get||ut.set)?Object.defineProperty(rt,st,ut):rt[st]=et[st]}return rt.default=et,nt&&nt.set(et,rt),rt}function _slicedToArray(et,tt){return _arrayWithHoles(et)||_iterableToArrayLimit(et,tt)||_unsupportedIterableToArray(et,tt)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(et,tt){if(!!et){if(typeof et=="string")return _arrayLikeToArray(et,tt);var nt=Object.prototype.toString.call(et).slice(8,-1);if(nt==="Object"&&et.constructor&&(nt=et.constructor.name),nt==="Map"||nt==="Set")return Array.from(et);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray(et,tt)}}function _arrayLikeToArray(et,tt){(tt==null||tt>et.length)&&(tt=et.length);for(var nt=0,rt=new Array(tt);nt<tt;nt++)rt[nt]=et[nt];return rt}function _iterableToArrayLimit(et,tt){var nt=et==null?null:typeof Symbol<"u"&&et[Symbol.iterator]||et["@@iterator"];if(nt!=null){var rt=[],ot=!0,st=!1,ut,ct;try{for(nt=nt.call(et);!(ot=(ut=nt.next()).done)&&(rt.push(ut.value),!(tt&&rt.length===tt));ot=!0);}catch(ft){st=!0,ct=ft}finally{try{!ot&&nt.return!=null&&nt.return()}finally{if(st)throw ct}}return rt}}function _arrayWithHoles(et){if(Array.isArray(et))return et}function _classCallCheck(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}function _defineProperties(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}function _createClass(et,tt,nt){return tt&&_defineProperties(et.prototype,tt),nt&&_defineProperties(et,nt),Object.defineProperty(et,"prototype",{writable:!1}),et}function _inherits(et,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),Object.defineProperty(et,"prototype",{writable:!1}),tt&&_setPrototypeOf$2(et,tt)}function _setPrototypeOf$2(et,tt){return _setPrototypeOf$2=Object.setPrototypeOf||function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$2(et,tt)}function _createSuper(et){var tt=_isNativeReflectConstruct();return function(){var rt=_getPrototypeOf(et),ot;if(tt){var st=_getPrototypeOf(this).constructor;ot=Reflect.construct(rt,arguments,st)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn(this,ot)}}function _possibleConstructorReturn(et,tt){if(tt&&(_typeof$2(tt)==="object"||typeof tt=="function"))return tt;if(tt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(et)}function _assertThisInitialized(et){if(et===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(et){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf(et)}function _defineProperty$3(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}var eventsFor$1={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},dragEventFor$1=eventsFor$1.mouse,DraggableCore$1=function(et){_inherits(nt,et);var tt=_createSuper(nt);function nt(){var rt;_classCallCheck(this,nt);for(var ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=tt.call.apply(tt,[this].concat(st)),_defineProperty$3(_assertThisInitialized(rt),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),_defineProperty$3(_assertThisInitialized(rt),"mounted",!1),_defineProperty$3(_assertThisInitialized(rt),"handleDragStart",function(ct){if(rt.props.onMouseDown(ct),!rt.props.allowAnyClick&&typeof ct.button=="number"&&ct.button!==0)return!1;var ft=rt.findDOMNode();if(!ft||!ft.ownerDocument||!ft.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var pt=ft.ownerDocument;if(!(rt.props.disabled||!(ct.target instanceof pt.defaultView.Node)||rt.props.handle&&!(0,_domFns.matchesSelectorAndParentsTo)(ct.target,rt.props.handle,ft)||rt.props.cancel&&(0,_domFns.matchesSelectorAndParentsTo)(ct.target,rt.props.cancel,ft))){ct.type==="touchstart"&&ct.preventDefault();var ht=(0,_domFns.getTouchIdentifier)(ct);rt.setState({touchIdentifier:ht});var mt=(0,_positionFns.getControlPosition)(ct,ht,_assertThisInitialized(rt));if(mt!=null){var yt=mt.x,vt=mt.y,Tt=(0,_positionFns.createCoreData)(_assertThisInitialized(rt),yt,vt);(0,_log.default)("DraggableCore: handleDragStart: %j",Tt),(0,_log.default)("calling",rt.props.onStart);var Et=rt.props.onStart(ct,Tt);Et===!1||rt.mounted===!1||(rt.props.enableUserSelectHack&&(0,_domFns.addUserSelectStyles)(pt),rt.setState({dragging:!0,lastX:yt,lastY:vt}),(0,_domFns.addEvent)(pt,dragEventFor$1.move,rt.handleDrag),(0,_domFns.addEvent)(pt,dragEventFor$1.stop,rt.handleDragStop))}}}),_defineProperty$3(_assertThisInitialized(rt),"handleDrag",function(ct){var ft=(0,_positionFns.getControlPosition)(ct,rt.state.touchIdentifier,_assertThisInitialized(rt));if(ft!=null){var pt=ft.x,ht=ft.y;if(Array.isArray(rt.props.grid)){var mt=pt-rt.state.lastX,yt=ht-rt.state.lastY,vt=(0,_positionFns.snapToGrid)(rt.props.grid,mt,yt),Tt=_slicedToArray(vt,2);if(mt=Tt[0],yt=Tt[1],!mt&&!yt)return;pt=rt.state.lastX+mt,ht=rt.state.lastY+yt}var Et=(0,_positionFns.createCoreData)(_assertThisInitialized(rt),pt,ht);(0,_log.default)("DraggableCore: handleDrag: %j",Et);var xt=rt.props.onDrag(ct,Et);if(xt===!1||rt.mounted===!1){try{rt.handleDragStop(new MouseEvent("mouseup"))}catch{var At=document.createEvent("MouseEvents");At.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),rt.handleDragStop(At)}return}rt.setState({lastX:pt,lastY:ht})}}),_defineProperty$3(_assertThisInitialized(rt),"handleDragStop",function(ct){if(!!rt.state.dragging){var ft=(0,_positionFns.getControlPosition)(ct,rt.state.touchIdentifier,_assertThisInitialized(rt));if(ft!=null){var pt=ft.x,ht=ft.y;if(Array.isArray(rt.props.grid)){var mt=pt-rt.state.lastX||0,yt=ht-rt.state.lastY||0,vt=(0,_positionFns.snapToGrid)(rt.props.grid,mt,yt),Tt=_slicedToArray(vt,2);mt=Tt[0],yt=Tt[1],pt=rt.state.lastX+mt,ht=rt.state.lastY+yt}var Et=(0,_positionFns.createCoreData)(_assertThisInitialized(rt),pt,ht),xt=rt.props.onStop(ct,Et);if(xt===!1||rt.mounted===!1)return!1;var At=rt.findDOMNode();At&&rt.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(At.ownerDocument),(0,_log.default)("DraggableCore: handleDragStop: %j",Et),rt.setState({dragging:!1,lastX:NaN,lastY:NaN}),At&&((0,_log.default)("DraggableCore: Removing handlers"),(0,_domFns.removeEvent)(At.ownerDocument,dragEventFor$1.move,rt.handleDrag),(0,_domFns.removeEvent)(At.ownerDocument,dragEventFor$1.stop,rt.handleDragStop))}}}),_defineProperty$3(_assertThisInitialized(rt),"onMouseDown",function(ct){return dragEventFor$1=eventsFor$1.mouse,rt.handleDragStart(ct)}),_defineProperty$3(_assertThisInitialized(rt),"onMouseUp",function(ct){return dragEventFor$1=eventsFor$1.mouse,rt.handleDragStop(ct)}),_defineProperty$3(_assertThisInitialized(rt),"onTouchStart",function(ct){return dragEventFor$1=eventsFor$1.touch,rt.handleDragStart(ct)}),_defineProperty$3(_assertThisInitialized(rt),"onTouchEnd",function(ct){return dragEventFor$1=eventsFor$1.touch,rt.handleDragStop(ct)}),rt}return _createClass(nt,[{key:"componentDidMount",value:function(){this.mounted=!0;var ot=this.findDOMNode();ot&&(0,_domFns.addEvent)(ot,eventsFor$1.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var ot=this.findDOMNode();if(ot){var st=ot.ownerDocument;(0,_domFns.removeEvent)(st,eventsFor$1.mouse.move,this.handleDrag),(0,_domFns.removeEvent)(st,eventsFor$1.touch.move,this.handleDrag),(0,_domFns.removeEvent)(st,eventsFor$1.mouse.stop,this.handleDragStop),(0,_domFns.removeEvent)(st,eventsFor$1.touch.stop,this.handleDragStop),(0,_domFns.removeEvent)(ot,eventsFor$1.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(st)}}},{key:"findDOMNode",value:function(){var ot,st,ut;return(ot=this.props)!==null&&ot!==void 0&&ot.nodeRef?(st=this.props)===null||st===void 0||(ut=st.nodeRef)===null||ut===void 0?void 0:ut.current:_reactDom$1.default.findDOMNode(this)}},{key:"render",value:function(){return React$2.cloneElement(React$2.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),nt}(React$2.Component);DraggableCore$2.default=DraggableCore$1;_defineProperty$3(DraggableCore$1,"displayName","DraggableCore");_defineProperty$3(DraggableCore$1,"propTypes",{allowAnyClick:_propTypes$7.default.bool,disabled:_propTypes$7.default.bool,enableUserSelectHack:_propTypes$7.default.bool,offsetParent:function et(tt,nt){if(tt[nt]&&tt[nt].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:_propTypes$7.default.arrayOf(_propTypes$7.default.number),handle:_propTypes$7.default.string,cancel:_propTypes$7.default.string,nodeRef:_propTypes$7.default.object,onStart:_propTypes$7.default.func,onDrag:_propTypes$7.default.func,onStop:_propTypes$7.default.func,onMouseDown:_propTypes$7.default.func,scale:_propTypes$7.default.number,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe});_defineProperty$3(DraggableCore$1,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function et(){},onDrag:function et(){},onStop:function et(){},onMouseDown:function et(){},scale:1});(function(et){function tt(En){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ln){return typeof Ln}:function(Ln){return Ln&&typeof Symbol=="function"&&Ln.constructor===Symbol&&Ln!==Symbol.prototype?"symbol":typeof Ln},tt(En)}Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"DraggableCore",{enumerable:!0,get:function(){return pt.default}}),et.default=void 0;var nt=Tt(react.exports),rt=yt(propTypes$1.exports),ot=yt(reactDom.exports),st=yt(require$$10),ut=domFns,ct=positionFns,ft=shims,pt=yt(DraggableCore$2),ht=yt(log$1),mt=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function yt(En){return En&&En.__esModule?En:{default:En}}function vt(En){if(typeof WeakMap!="function")return null;var Ln=new WeakMap,wn=new WeakMap;return(vt=function($n){return $n?wn:Ln})(En)}function Tt(En,Ln){if(!Ln&&En&&En.__esModule)return En;if(En===null||tt(En)!=="object"&&typeof En!="function")return{default:En};var wn=vt(Ln);if(wn&&wn.has(En))return wn.get(En);var Dn={},$n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Gn in En)if(Gn!=="default"&&Object.prototype.hasOwnProperty.call(En,Gn)){var Jn=$n?Object.getOwnPropertyDescriptor(En,Gn):null;Jn&&(Jn.get||Jn.set)?Object.defineProperty(Dn,Gn,Jn):Dn[Gn]=En[Gn]}return Dn.default=En,wn&&wn.set(En,Dn),Dn}function Et(){return Et=Object.assign||function(En){for(var Ln=1;Ln<arguments.length;Ln++){var wn=arguments[Ln];for(var Dn in wn)Object.prototype.hasOwnProperty.call(wn,Dn)&&(En[Dn]=wn[Dn])}return En},Et.apply(this,arguments)}function xt(En,Ln){if(En==null)return{};var wn=At(En,Ln),Dn,$n;if(Object.getOwnPropertySymbols){var Gn=Object.getOwnPropertySymbols(En);for($n=0;$n<Gn.length;$n++)Dn=Gn[$n],!(Ln.indexOf(Dn)>=0)&&(!Object.prototype.propertyIsEnumerable.call(En,Dn)||(wn[Dn]=En[Dn]))}return wn}function At(En,Ln){if(En==null)return{};var wn={},Dn=Object.keys(En),$n,Gn;for(Gn=0;Gn<Dn.length;Gn++)$n=Dn[Gn],!(Ln.indexOf($n)>=0)&&(wn[$n]=En[$n]);return wn}function Ct(En,Ln){var wn=Object.keys(En);if(Object.getOwnPropertySymbols){var Dn=Object.getOwnPropertySymbols(En);Ln&&(Dn=Dn.filter(function($n){return Object.getOwnPropertyDescriptor(En,$n).enumerable})),wn.push.apply(wn,Dn)}return wn}function $t(En){for(var Ln=1;Ln<arguments.length;Ln++){var wn=arguments[Ln]!=null?arguments[Ln]:{};Ln%2?Ct(Object(wn),!0).forEach(function(Dn){In(En,Dn,wn[Dn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(En,Object.getOwnPropertyDescriptors(wn)):Ct(Object(wn)).forEach(function(Dn){Object.defineProperty(En,Dn,Object.getOwnPropertyDescriptor(wn,Dn))})}return En}function Ot(En,Ln){return Ft(En)||Mt(En,Ln)||It(En,Ln)||Rt()}function Rt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function It(En,Ln){if(!!En){if(typeof En=="string")return kt(En,Ln);var wn=Object.prototype.toString.call(En).slice(8,-1);if(wn==="Object"&&En.constructor&&(wn=En.constructor.name),wn==="Map"||wn==="Set")return Array.from(En);if(wn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wn))return kt(En,Ln)}}function kt(En,Ln){(Ln==null||Ln>En.length)&&(Ln=En.length);for(var wn=0,Dn=new Array(Ln);wn<Ln;wn++)Dn[wn]=En[wn];return Dn}function Mt(En,Ln){var wn=En==null?null:typeof Symbol<"u"&&En[Symbol.iterator]||En["@@iterator"];if(wn!=null){var Dn=[],$n=!0,Gn=!1,Jn,zn;try{for(wn=wn.call(En);!($n=(Jn=wn.next()).done)&&(Dn.push(Jn.value),!(Ln&&Dn.length===Ln));$n=!0);}catch(Qn){Gn=!0,zn=Qn}finally{try{!$n&&wn.return!=null&&wn.return()}finally{if(Gn)throw zn}}return Dn}}function Ft(En){if(Array.isArray(En))return En}function zt(En,Ln){if(!(En instanceof Ln))throw new TypeError("Cannot call a class as a function")}function Vt(En,Ln){for(var wn=0;wn<Ln.length;wn++){var Dn=Ln[wn];Dn.enumerable=Dn.enumerable||!1,Dn.configurable=!0,"value"in Dn&&(Dn.writable=!0),Object.defineProperty(En,Dn.key,Dn)}}function Zt(En,Ln,wn){return Ln&&Vt(En.prototype,Ln),wn&&Vt(En,wn),Object.defineProperty(En,"prototype",{writable:!1}),En}function Ut(En,Ln){if(typeof Ln!="function"&&Ln!==null)throw new TypeError("Super expression must either be null or a function");En.prototype=Object.create(Ln&&Ln.prototype,{constructor:{value:En,writable:!0,configurable:!0}}),Object.defineProperty(En,"prototype",{writable:!1}),Ln&&Xt(En,Ln)}function Xt(En,Ln){return Xt=Object.setPrototypeOf||function(Dn,$n){return Dn.__proto__=$n,Dn},Xt(En,Ln)}function Jt(En){var Ln=sn();return function(){var Dn=Sn(En),$n;if(Ln){var Gn=Sn(this).constructor;$n=Reflect.construct(Dn,arguments,Gn)}else $n=Dn.apply(this,arguments);return gn(this,$n)}}function gn(En,Ln){if(Ln&&(tt(Ln)==="object"||typeof Ln=="function"))return Ln;if(Ln!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return An(En)}function An(En){if(En===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return En}function sn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sn(En){return Sn=Object.setPrototypeOf?Object.getPrototypeOf:function(wn){return wn.__proto__||Object.getPrototypeOf(wn)},Sn(En)}function In(En,Ln,wn){return Ln in En?Object.defineProperty(En,Ln,{value:wn,enumerable:!0,configurable:!0,writable:!0}):En[Ln]=wn,En}var _n=function(En){Ut(wn,En);var Ln=Jt(wn);function wn(Dn){var $n;return zt(this,wn),$n=Ln.call(this,Dn),In(An($n),"onDragStart",function(Gn,Jn){(0,ht.default)("Draggable: onDragStart: %j",Jn);var zn=$n.props.onStart(Gn,(0,ct.createDraggableData)(An($n),Jn));if(zn===!1)return!1;$n.setState({dragging:!0,dragged:!0})}),In(An($n),"onDrag",function(Gn,Jn){if(!$n.state.dragging)return!1;(0,ht.default)("Draggable: onDrag: %j",Jn);var zn=(0,ct.createDraggableData)(An($n),Jn),Qn={x:zn.x,y:zn.y};if($n.props.bounds){var Bn=Qn.x,jn=Qn.y;Qn.x+=$n.state.slackX,Qn.y+=$n.state.slackY;var Ar=(0,ct.getBoundPosition)(An($n),Qn.x,Qn.y),Er=Ot(Ar,2),Pr=Er[0],Nr=Er[1];Qn.x=Pr,Qn.y=Nr,Qn.slackX=$n.state.slackX+(Bn-Qn.x),Qn.slackY=$n.state.slackY+(jn-Qn.y),zn.x=Qn.x,zn.y=Qn.y,zn.deltaX=Qn.x-$n.state.x,zn.deltaY=Qn.y-$n.state.y}var Ir=$n.props.onDrag(Gn,zn);if(Ir===!1)return!1;$n.setState(Qn)}),In(An($n),"onDragStop",function(Gn,Jn){if(!$n.state.dragging)return!1;var zn=$n.props.onStop(Gn,(0,ct.createDraggableData)(An($n),Jn));if(zn===!1)return!1;(0,ht.default)("Draggable: onDragStop: %j",Jn);var Qn={dragging:!1,slackX:0,slackY:0},Bn=Boolean($n.props.position);if(Bn){var jn=$n.props.position,Ar=jn.x,Er=jn.y;Qn.x=Ar,Qn.y=Er}$n.setState(Qn)}),$n.state={dragging:!1,dragged:!1,x:Dn.position?Dn.position.x:Dn.defaultPosition.x,y:Dn.position?Dn.position.y:Dn.defaultPosition.y,prevPropsPosition:$t({},Dn.position),slackX:0,slackY:0,isElementSVG:!1},Dn.position&&!(Dn.onDrag||Dn.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),$n}return Zt(wn,[{key:"componentDidMount",value:function(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var $n,Gn,Jn;return($n=(Gn=this.props)===null||Gn===void 0||(Jn=Gn.nodeRef)===null||Jn===void 0?void 0:Jn.current)!==null&&$n!==void 0?$n:ot.default.findDOMNode(this)}},{key:"render",value:function(){var $n,Gn=this.props;Gn.axis,Gn.bounds;var Jn=Gn.children,zn=Gn.defaultPosition,Qn=Gn.defaultClassName,Bn=Gn.defaultClassNameDragging,jn=Gn.defaultClassNameDragged,Ar=Gn.position,Er=Gn.positionOffset;Gn.scale;var Pr=xt(Gn,mt),Nr={},Ir=null,no=Boolean(Ar),ro=!no||this.state.dragging,ao=Ar||zn,Xr={x:(0,ct.canDragX)(this)&&ro?this.state.x:ao.x,y:(0,ct.canDragY)(this)&&ro?this.state.y:ao.y};this.state.isElementSVG?Ir=(0,ut.createSVGTransform)(Xr,Er):Nr=(0,ut.createCSSTransform)(Xr,Er);var Jr=(0,st.default)(Jn.props.className||"",Qn,($n={},In($n,Bn,this.state.dragging),In($n,jn,this.state.dragged),$n));return nt.createElement(pt.default,Et({},Pr,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),nt.cloneElement(nt.Children.only(Jn),{className:Jr,style:$t($t({},Jn.props.style),Nr),transform:Ir}))}}],[{key:"getDerivedStateFromProps",value:function($n,Gn){var Jn=$n.position,zn=Gn.prevPropsPosition;return Jn&&(!zn||Jn.x!==zn.x||Jn.y!==zn.y)?((0,ht.default)("Draggable: getDerivedStateFromProps %j",{position:Jn,prevPropsPosition:zn}),{x:Jn.x,y:Jn.y,prevPropsPosition:$t({},Jn)}):null}}]),wn}(nt.Component);et.default=_n,In(_n,"displayName","Draggable"),In(_n,"propTypes",$t($t({},pt.default.propTypes),{},{axis:rt.default.oneOf(["both","x","y","none"]),bounds:rt.default.oneOfType([rt.default.shape({left:rt.default.number,right:rt.default.number,top:rt.default.number,bottom:rt.default.number}),rt.default.string,rt.default.oneOf([!1])]),defaultClassName:rt.default.string,defaultClassNameDragging:rt.default.string,defaultClassNameDragged:rt.default.string,defaultPosition:rt.default.shape({x:rt.default.number,y:rt.default.number}),positionOffset:rt.default.shape({x:rt.default.oneOfType([rt.default.number,rt.default.string]),y:rt.default.oneOfType([rt.default.number,rt.default.string])}),position:rt.default.shape({x:rt.default.number,y:rt.default.number}),className:ft.dontSetMe,style:ft.dontSetMe,transform:ft.dontSetMe})),In(_n,"defaultProps",$t($t({},pt.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))})(Draggable$1);var _require=Draggable$1,Draggable=_require.default,DraggableCore=_require.DraggableCore;cjs.exports=Draggable;cjs.exports.default=Draggable;cjs.exports.DraggableCore=DraggableCore;var utils$1={};utils$1.__esModule=!0;utils$1.cloneElement=cloneElement;var _react$8=_interopRequireDefault$b(react.exports);function _interopRequireDefault$b(et){return et&&et.__esModule?et:{default:et}}function ownKeys$8(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$8(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$8(Object(nt),!0).forEach(function(rt){_defineProperty$2(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$8(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}function _defineProperty$2(et,tt,nt){return tt=_toPropertyKey$2(tt),tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function _toPropertyKey$2(et){var tt=_toPrimitive$2(et,"string");return typeof tt=="symbol"?tt:String(tt)}function _toPrimitive$2(et,tt){if(typeof et!="object"||et===null)return et;var nt=et[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(et,tt||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(tt==="string"?String:Number)(et)}function cloneElement(et,tt){return tt.style&&et.props.style&&(tt.style=_objectSpread$8(_objectSpread$8({},et.props.style),tt.style)),tt.className&&et.props.className&&(tt.className=et.props.className+" "+tt.className),_react$8.default.cloneElement(et,tt)}var propTypes={};propTypes.__esModule=!0;propTypes.resizableProps=void 0;var _propTypes$6=_interopRequireDefault$a(propTypes$1.exports);function _interopRequireDefault$a(et){return et&&et.__esModule?et:{default:et}}var resizableProps={axis:_propTypes$6.default.oneOf(["both","x","y","none"]),className:_propTypes$6.default.string,children:_propTypes$6.default.element.isRequired,draggableOpts:_propTypes$6.default.shape({allowAnyClick:_propTypes$6.default.bool,cancel:_propTypes$6.default.string,children:_propTypes$6.default.node,disabled:_propTypes$6.default.bool,enableUserSelectHack:_propTypes$6.default.bool,offsetParent:_propTypes$6.default.node,grid:_propTypes$6.default.arrayOf(_propTypes$6.default.number),handle:_propTypes$6.default.string,nodeRef:_propTypes$6.default.object,onStart:_propTypes$6.default.func,onDrag:_propTypes$6.default.func,onStop:_propTypes$6.default.func,onMouseDown:_propTypes$6.default.func,scale:_propTypes$6.default.number}),height:function et(){for(var tt=arguments.length,nt=new Array(tt),rt=0;rt<tt;rt++)nt[rt]=arguments[rt];var ot=nt[0];if(ot.axis==="both"||ot.axis==="y"){var st;return(st=_propTypes$6.default.number).isRequired.apply(st,nt)}return _propTypes$6.default.number.apply(_propTypes$6.default,nt)},handle:_propTypes$6.default.oneOfType([_propTypes$6.default.node,_propTypes$6.default.func]),handleSize:_propTypes$6.default.arrayOf(_propTypes$6.default.number),lockAspectRatio:_propTypes$6.default.bool,maxConstraints:_propTypes$6.default.arrayOf(_propTypes$6.default.number),minConstraints:_propTypes$6.default.arrayOf(_propTypes$6.default.number),onResizeStop:_propTypes$6.default.func,onResizeStart:_propTypes$6.default.func,onResize:_propTypes$6.default.func,resizeHandles:_propTypes$6.default.arrayOf(_propTypes$6.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:_propTypes$6.default.number,width:function et(){for(var tt=arguments.length,nt=new Array(tt),rt=0;rt<tt;rt++)nt[rt]=arguments[rt];var ot=nt[0];if(ot.axis==="both"||ot.axis==="x"){var st;return(st=_propTypes$6.default.number).isRequired.apply(st,nt)}return _propTypes$6.default.number.apply(_propTypes$6.default,nt)}};propTypes.resizableProps=resizableProps;Resizable$2.__esModule=!0;Resizable$2.default=void 0;var React$1=_interopRequireWildcard$4(react.exports),_reactDraggable=cjs.exports,_utils=utils$1,_propTypes$5=propTypes,_excluded$1=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function _getRequireWildcardCache$1(et){if(typeof WeakMap!="function")return null;var tt=new WeakMap,nt=new WeakMap;return(_getRequireWildcardCache$1=function(ot){return ot?nt:tt})(et)}function _interopRequireWildcard$4(et,tt){if(!tt&&et&&et.__esModule)return et;if(et===null||typeof et!="object"&&typeof et!="function")return{default:et};var nt=_getRequireWildcardCache$1(tt);if(nt&&nt.has(et))return nt.get(et);var rt={},ot=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var st in et)if(st!=="default"&&Object.prototype.hasOwnProperty.call(et,st)){var ut=ot?Object.getOwnPropertyDescriptor(et,st):null;ut&&(ut.get||ut.set)?Object.defineProperty(rt,st,ut):rt[st]=et[st]}return rt.default=et,nt&&nt.set(et,rt),rt}function _extends$6(){return _extends$6=Object.assign?Object.assign.bind():function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$6.apply(this,arguments)}function _objectWithoutPropertiesLoose$3(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}function ownKeys$7(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$7(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$7(Object(nt),!0).forEach(function(rt){_defineProperty$1(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$7(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}function _defineProperty$1(et,tt,nt){return tt=_toPropertyKey$1(tt),tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function _toPropertyKey$1(et){var tt=_toPrimitive$1(et,"string");return typeof tt=="symbol"?tt:String(tt)}function _toPrimitive$1(et,tt){if(typeof et!="object"||et===null)return et;var nt=et[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(et,tt||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(tt==="string"?String:Number)(et)}function _inheritsLoose$4(et,tt){et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,_setPrototypeOf$1(et,tt)}function _setPrototypeOf$1(et,tt){return _setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$1(et,tt)}var Resizable$1=function(et){_inheritsLoose$4(tt,et);function tt(){for(var rt,ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=et.call.apply(et,[this].concat(st))||this,rt.handleRefs={},rt.lastHandleRect=null,rt.slack=null,rt}var nt=tt.prototype;return nt.componentWillUnmount=function(){this.resetData()},nt.resetData=function(){this.lastHandleRect=this.slack=null},nt.runConstraints=function(ot,st){var ut=this.props,ct=ut.minConstraints,ft=ut.maxConstraints,pt=ut.lockAspectRatio;if(!ct&&!ft&&!pt)return[ot,st];if(pt){var ht=this.props.width/this.props.height,mt=ot-this.props.width,yt=st-this.props.height;Math.abs(mt)>Math.abs(yt*ht)?st=ot/ht:ot=st*ht}var vt=ot,Tt=st,Et=this.slack||[0,0],xt=Et[0],At=Et[1];return ot+=xt,st+=At,ct&&(ot=Math.max(ct[0],ot),st=Math.max(ct[1],st)),ft&&(ot=Math.min(ft[0],ot),st=Math.min(ft[1],st)),this.slack=[xt+(vt-ot),At+(Tt-st)],[ot,st]},nt.resizeHandler=function(ot,st){var ut=this;return function(ct,ft){var pt=ft.node,ht=ft.deltaX,mt=ft.deltaY;ot==="onResizeStart"&&ut.resetData();var yt=(ut.props.axis==="both"||ut.props.axis==="x")&&st!=="n"&&st!=="s",vt=(ut.props.axis==="both"||ut.props.axis==="y")&&st!=="e"&&st!=="w";if(!(!yt&&!vt)){var Tt=st[0],Et=st[st.length-1],xt=pt.getBoundingClientRect();if(ut.lastHandleRect!=null){if(Et==="w"){var At=xt.left-ut.lastHandleRect.left;ht+=At}if(Tt==="n"){var Ct=xt.top-ut.lastHandleRect.top;mt+=Ct}}ut.lastHandleRect=xt,Et==="w"&&(ht=-ht),Tt==="n"&&(mt=-mt);var $t=ut.props.width+(yt?ht/ut.props.transformScale:0),Ot=ut.props.height+(vt?mt/ut.props.transformScale:0),Rt=ut.runConstraints($t,Ot);$t=Rt[0],Ot=Rt[1];var It=$t!==ut.props.width||Ot!==ut.props.height,kt=typeof ut.props[ot]=="function"?ut.props[ot]:null,Mt=ot==="onResize"&&!It;kt&&!Mt&&(ct.persist==null||ct.persist(),kt(ct,{node:pt,size:{width:$t,height:Ot},handle:st})),ot==="onResizeStop"&&ut.resetData()}}},nt.renderResizeHandle=function(ot,st){var ut=this.props.handle;if(!ut)return React$1.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+ot,ref:st});if(typeof ut=="function")return ut(ot,st);var ct=typeof ut.type=="string",ft=_objectSpread$7({ref:st},ct?{}:{handleAxis:ot});return React$1.cloneElement(ut,ft)},nt.render=function(){var ot=this,st=this.props,ut=st.children,ct=st.className,ft=st.draggableOpts;st.width,st.height,st.handle,st.handleSize,st.lockAspectRatio,st.axis,st.minConstraints,st.maxConstraints,st.onResize,st.onResizeStop,st.onResizeStart;var pt=st.resizeHandles;st.transformScale;var ht=_objectWithoutPropertiesLoose$3(st,_excluded$1);return(0,_utils.cloneElement)(ut,_objectSpread$7(_objectSpread$7({},ht),{},{className:(ct?ct+" ":"")+"react-resizable",children:[].concat(ut.props.children,pt.map(function(mt){var yt,vt=(yt=ot.handleRefs[mt])!=null?yt:ot.handleRefs[mt]=React$1.createRef();return React$1.createElement(_reactDraggable.DraggableCore,_extends$6({},ft,{nodeRef:vt,key:"resizableHandle-"+mt,onStop:ot.resizeHandler("onResizeStop",mt),onStart:ot.resizeHandler("onResizeStart",mt),onDrag:ot.resizeHandler("onResize",mt)}),ot.renderResizeHandle(mt,vt))}))}))},tt}(React$1.Component);Resizable$2.default=Resizable$1;Resizable$1.propTypes=_propTypes$5.resizableProps;Resizable$1.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var ResizableBox$1={};ResizableBox$1.__esModule=!0;ResizableBox$1.default=void 0;var React=_interopRequireWildcard$3(react.exports),_propTypes$4=_interopRequireDefault$9(propTypes$1.exports),_Resizable=_interopRequireDefault$9(Resizable$2),_propTypes2=propTypes,_excluded=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function _interopRequireDefault$9(et){return et&&et.__esModule?et:{default:et}}function _getRequireWildcardCache(et){if(typeof WeakMap!="function")return null;var tt=new WeakMap,nt=new WeakMap;return(_getRequireWildcardCache=function(ot){return ot?nt:tt})(et)}function _interopRequireWildcard$3(et,tt){if(!tt&&et&&et.__esModule)return et;if(et===null||typeof et!="object"&&typeof et!="function")return{default:et};var nt=_getRequireWildcardCache(tt);if(nt&&nt.has(et))return nt.get(et);var rt={},ot=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var st in et)if(st!=="default"&&Object.prototype.hasOwnProperty.call(et,st)){var ut=ot?Object.getOwnPropertyDescriptor(et,st):null;ut&&(ut.get||ut.set)?Object.defineProperty(rt,st,ut):rt[st]=et[st]}return rt.default=et,nt&&nt.set(et,rt),rt}function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$5.apply(this,arguments)}function ownKeys$6(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$6(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$6(Object(nt),!0).forEach(function(rt){_defineProperty(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$6(Object(nt)).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}function _defineProperty(et,tt,nt){return tt=_toPropertyKey(tt),tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function _toPropertyKey(et){var tt=_toPrimitive(et,"string");return typeof tt=="symbol"?tt:String(tt)}function _toPrimitive(et,tt){if(typeof et!="object"||et===null)return et;var nt=et[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(et,tt||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(tt==="string"?String:Number)(et)}function _objectWithoutPropertiesLoose$2(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}function _inheritsLoose$3(et,tt){et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,_setPrototypeOf(et,tt)}function _setPrototypeOf(et,tt){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf(et,tt)}var ResizableBox=function(et){_inheritsLoose$3(tt,et);function tt(){for(var rt,ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=et.call.apply(et,[this].concat(st))||this,rt.state={width:rt.props.width,height:rt.props.height,propsWidth:rt.props.width,propsHeight:rt.props.height},rt.onResize=function(ct,ft){var pt=ft.size;rt.props.onResize?(ct.persist==null||ct.persist(),rt.setState(pt,function(){return rt.props.onResize&&rt.props.onResize(ct,ft)})):rt.setState(pt)},rt}tt.getDerivedStateFromProps=function(ot,st){return st.propsWidth!==ot.width||st.propsHeight!==ot.height?{width:ot.width,height:ot.height,propsWidth:ot.width,propsHeight:ot.height}:null};var nt=tt.prototype;return nt.render=function(){var ot=this.props,st=ot.handle,ut=ot.handleSize;ot.onResize;var ct=ot.onResizeStart,ft=ot.onResizeStop,pt=ot.draggableOpts,ht=ot.minConstraints,mt=ot.maxConstraints,yt=ot.lockAspectRatio,vt=ot.axis;ot.width,ot.height;var Tt=ot.resizeHandles,Et=ot.style,xt=ot.transformScale,At=_objectWithoutPropertiesLoose$2(ot,_excluded);return React.createElement(_Resizable.default,{axis:vt,draggableOpts:pt,handle:st,handleSize:ut,height:this.state.height,lockAspectRatio:yt,maxConstraints:mt,minConstraints:ht,onResizeStart:ct,onResize:this.onResize,onResizeStop:ft,resizeHandles:Tt,transformScale:xt,width:this.state.width},React.createElement("div",_extends$5({},At,{style:_objectSpread$6(_objectSpread$6({},Et),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},tt}(React.Component);ResizableBox$1.default=ResizableBox;ResizableBox.propTypes=_objectSpread$6(_objectSpread$6({},_propTypes2.resizableProps),{},{children:_propTypes$4.default.element});reactResizable.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var Resizable=reactResizable.exports.Resizable=Resizable$2.default;reactResizable.exports.ResizableBox=ResizableBox$1.default;function scrollIntoBounds(et,tt,nt){et.top<tt&&window.scrollBy({top:et.top-tt,behavior:"smooth"}),et.bottom>window.innerHeight-nt&&window.scrollBy({top:et.bottom-(window.innerHeight-nt),behavior:"smooth"})}const flashFocus=(et,tt)=>{if(document.body.querySelector(".focuser"))return;const rt=et.getBoundingClientRect(),ot=tt?.minSpaceFromTop??0,st=tt?.minSpaceFromBottom??0;let ut=tt?.width??rt.width,ct=tt?.height??rt.height;const ft=tt?.padding??8;ut+=ft*2,ct+=ft*2;const pt=tt?.borderRadius??4,ht=tt?.offsetX??0,mt=tt?.offsetY??0,yt=tt?.popping??!1,vt=window.pageXOffset||document.documentElement.scrollLeft,Tt=window.pageYOffset||document.documentElement.scrollTop,Et=document.createElement("div");Et.className="focuser",Et.style.left=`${rt.left+ht-ft+vt}px`,Et.style.top=`${rt.top+mt-ft+Tt}px`,Et.style.width=`${ut}px`,Et.style.height=`${ct}px`,Et.style.borderRadius=`${pt}px`,document.body.appendChild(Et),scrollIntoBounds(rt,ot,st);const xt=()=>{Et.classList.add("fading-out"),window.setTimeout(()=>{document.body.contains(Et)&&document.body.removeChild(Et)},400),window.removeEventListener("mousedown",xt)};window.addEventListener("mousedown",xt);const At=()=>{Et.classList.add("popping"),et.removeEventListener("mousedown",At)};yt&&et.addEventListener("mousedown",At)},EmptyVisualizations=et=>Wt.createElement("div",null,"EMPTY"),EmptyPanelBankSectionWatermark=()=>Wt.createElement(EmptyVisualizations,{headerText:"No visualizations in this section.",helpText:Wt.createElement("div",{style:{display:"flex",alignItems:"center"}},Wt.createElement("div",{style:{marginRight:4}},Wt.createElement("span",{className:"hide-in-report"},"Drag a panel here, or "),Wt.createElement("span",{className:"add-vis-helper underline-dashed",onClick:et=>{const tt=(et.currentTarget.closest(".panel-bank__section")||et.currentTarget.closest(".report-section"))?.querySelector(".add-vis-button");tt&&flashFocus(tt,{minSpaceFromTop:60,padding:3,popping:!0})}},"add a visualization"),"."))});function panelOnActivePage(et,tt,nt){const rt=tt*nt;return et>=rt&&et<(tt+1)*nt}function getPagingParams({containerWidth:et,containerHeight:tt,panelCount:nt,flowConfig:rt}){const{gutterWidth:ot,rowsPerPage:st}=rt,{boxWidth:ut}=getBoxDimensions({containerWidth:et,containerHeight:tt,flowConfig:rt}),ct=Math.max(1,Math.floor(et/(ut+ot))),ft=ct*st,pt=Math.max(0,Math.ceil(nt/ft)-1);return{panelsPerRow:ct,panelsPerPage:ft,maxPage:pt}}function getBoxDimensions({containerWidth:et,containerHeight:tt,flowConfig:nt}){const{gutterWidth:rt,columnsPerPage:ot,rowsPerPage:st,snapToColumns:ut,boxWidth:ct}=nt,ft=getBoxDimension({containerPx:tt,gutterPx:rt,boxesPerDimension:st});return isMobile()?{boxWidth:et-2*rt,boxHeight:ft}:ut?{boxWidth:getBoxDimension({containerPx:et,gutterPx:rt,boxesPerDimension:ot}),boxHeight:ft}:{boxWidth:ct,boxHeight:ft}}function getBoxDimension({containerPx:et,gutterPx:tt,boxesPerDimension:nt}){return Math.floor((et-tt*(nt+1))/nt)}const getSnappedItemCount=({unsnappedPx:et,gutterPx:tt,containerPx:nt})=>{const rt=[...Array(12).keys()].map(st=>getBoxDimension({containerPx:nt,gutterPx:tt,boxesPerDimension:st+1}));let ot=0;return rt.forEach((st,ut)=>{Math.abs(et-st)<Math.abs(et-rt[ot])&&(ot=ut)}),ot+1},getSnappedDimension=({unsnappedPx:et,containerPx:tt,gutterPx:nt})=>{const rt=getSnappedItemCount({unsnappedPx:et,containerPx:tt,gutterPx:nt});return getBoxDimension({containerPx:tt,gutterPx:nt,boxesPerDimension:rt})};function isMobile(){return window.innerWidth<=852}var __spreadArray=globalThis&&globalThis.__spreadArray||function(et,tt,nt){if(nt||arguments.length===2)for(var rt=0,ot=tt.length,st;rt<ot;rt++)(st||!(rt in tt))&&(st||(st=Array.prototype.slice.call(tt,0,rt)),st[rt]=tt[rt]);return et.concat(st||Array.prototype.slice.call(tt))},BrowserInfo=function(){function et(tt,nt,rt){this.name=tt,this.version=nt,this.os=rt,this.type="browser"}return et}(),NodeInfo=function(){function et(tt){this.version=tt,this.type="node",this.name="node",this.os=process.platform}return et}(),SearchBotDeviceInfo=function(){function et(tt,nt,rt,ot){this.name=tt,this.version=nt,this.os=rt,this.bot=ot,this.type="bot-device"}return et}(),BotInfo=function(){function et(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return et}(),ReactNativeInfo=function(){function et(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return et}(),SEARCHBOX_UA_REGEX=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,SEARCHBOT_OS_REGEX=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,REQUIRED_VERSION_PARTS=3,userAgentRules=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",SEARCHBOX_UA_REGEX]],operatingSystemRules=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function detect(et){return et?parseUserAgent(et):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ReactNativeInfo:typeof navigator<"u"?parseUserAgent(navigator.userAgent):getNodeVersion()}function matchUserAgent(et){return et!==""&&userAgentRules.reduce(function(tt,nt){var rt=nt[0],ot=nt[1];if(tt)return tt;var st=ot.exec(et);return!!st&&[rt,st]},!1)}function parseUserAgent(et){var tt=matchUserAgent(et);if(!tt)return null;var nt=tt[0],rt=tt[1];if(nt==="searchbot")return new BotInfo;var ot=rt[1]&&rt[1].split(".").join("_").split("_").slice(0,3);ot?ot.length<REQUIRED_VERSION_PARTS&&(ot=__spreadArray(__spreadArray([],ot,!0),createVersionParts(REQUIRED_VERSION_PARTS-ot.length),!0)):ot=[];var st=ot.join("."),ut=detectOS(et),ct=SEARCHBOT_OS_REGEX.exec(et);return ct&&ct[1]?new SearchBotDeviceInfo(nt,st,ut,ct[1]):new BrowserInfo(nt,st,ut)}function detectOS(et){for(var tt=0,nt=operatingSystemRules.length;tt<nt;tt++){var rt=operatingSystemRules[tt],ot=rt[0],st=rt[1],ut=st.exec(et);if(ut)return ot}return null}function getNodeVersion(){var et=typeof process<"u"&&process.version;return et?new NodeInfo(process.version.slice(1)):null}function createVersionParts(et){for(var tt=[],nt=0;nt<et;nt++)tt.push("0");return tt}const browser$1=detect(),isFirefox=browser$1?.name==="firefox";browser$1?.name;function skipTransition(et,tt=0){const nt=et.style.transition;et.style.transition="none",window.setTimeout(()=>{et.style.transition=nt},tt)}const PanelBankFlowSectionInnerComp=({panelBankSectionConfigRef:et,panelBankWidth:tt,panelBankHeight:nt,activePanelRefs:rt,inactivePanelRefs:ot,updateFlowConfig:st,renderPanel:ut,flowConfig:ct,currentPage:ft,setCurrentPage:pt})=>{const[ht,mt]=react.exports.useState(null),{snapToColumns:yt,gutterWidth:vt,columnsPerPage:Tt,rowsPerPage:Et}=ct,xt=rt.length,{panelsPerPage:At,panelsPerRow:Ct,maxPage:$t}=getPagingParams({containerWidth:tt,containerHeight:nt,panelCount:xt,flowConfig:ct}),Ot=$t>0?32:0,Rt=nt-Ot;react.exports.useEffect(()=>{ft>$t&&pt($t)},[ft,$t,pt]);const It=ft*At,kt=isMobile(),{boxWidth:Mt,boxHeight:Ft}=getBoxDimensions({containerWidth:tt,containerHeight:Rt,flowConfig:ct}),[zt,Vt]=react.exports.useState({width:Mt,height:Ft}),Zt=rt.map((Dn,$n)=>panelOnActivePage($n,ft,At)?Dn:!1),Ut=react.exports.useCallback(Dn=>[vt+Dn%Ct*(Mt+vt),Math.floor(Dn/Ct)*(Ft+vt)],[Ft,Mt,vt,Ct]),Xt=rt.length+ot.length===0,Jt=react.exports.useCallback(Dn=>getSnappedItemCount({unsnappedPx:Dn,gutterPx:vt,containerPx:tt}),[vt,tt]),gn=react.exports.useCallback(Dn=>getSnappedItemCount({unsnappedPx:Dn,gutterPx:vt,containerPx:Rt}),[vt,Rt]),An=react.exports.useRef(ct);react.exports.useEffect(()=>{const Dn=An.current;An.current=ct,!_$2.isEqual(Dn,ct)&&setTimeout(()=>window.dispatchEvent(new Event("resize")),1)},[ct]);const sn=react.exports.useCallback(({unsnappedWidth:Dn})=>yt==null?Dn:getSnappedDimension({unsnappedPx:Dn,containerPx:tt,gutterPx:vt}),[vt,tt,yt]),Sn=react.exports.useCallback(({unsnappedHeight:Dn})=>yt==null?Dn:getSnappedDimension({unsnappedPx:Dn,containerPx:Rt,gutterPx:vt}),[vt,Rt,yt]),In=react.exports.useCallback((Dn,$n)=>{const Gn={columnsPerPage:Jt($n.size.width),rowsPerPage:gn($n.size.height),boxWidth:sn({unsnappedWidth:$n.size.width}),boxHeight:Sn({unsnappedHeight:$n.size.height})};st(Gn),Vt({width:Gn.boxWidth,height:Gn.boxHeight}),mt(null)},[Jt,gn,Sn,sn,st]),[_n,En]=react.exports.useState([Tt,Et]),Ln=react.exports.useCallback((Dn,$n)=>{Vt({width:$n.size.width,height:$n.size.height}),En([Jt($n.size.width),gn($n.size.height)])},[Jt,gn]),wn=react.exports.useMemo(()=>{if(kt||ht==null)return{display:"none"};const Dn=Ut(_$2.findIndex(Zt,{id:ht})%At);return{height:Sn({unsnappedHeight:zt.height}),width:sn({unsnappedWidth:zt.width}),transform:Dn==null?void 0:`translate(${Dn[0]+vt}px, ${Dn[1]}px) `}},[Ut,Sn,sn,vt,kt,At,Zt,ht,zt.height,zt.width]);return Wt.createElement(Wt.Fragment,null,Wt.createElement("div",{className:"resize-preview",style:wn},Wt.createElement("div",{className:"resize-preview-message"},Wt.createElement("h2",null,`${_n[0]} x ${_n[1]}`))),Wt.createElement("div",{className:`flow-section ${ht!=null?"resizing-panel":""}
          ${kt?"mobile":""}`,style:{height:Xt?DEFAULT_PANEL_SIZE:Rt+Ot}},Wt.createElement("div",{className:"flow-section__page",style:{height:Xt?DEFAULT_PANEL_SIZE:Rt}},Xt?Wt.createElement(EmptyPanelBankSectionWatermark,null):Wt.createElement("div",{style:{height:($t+1)*Rt,position:"relative",transform:`translateY(-${ft*Rt}px)`,transition:"transform 0.5s"}},Zt.map(Dn=>{if(!Dn)return null;const $n=Dn.id,Gn=ht===$n,Jn=_$2.findIndex(Zt,{id:$n}),zn=Ut(Jn);return Wt.createElement(Wt.Fragment,{key:$n},Wt.createElement(Resizable,{key:$n,className:classnames("panel-bank__panel",{"panel-bank__panel-small":Mt<300,resizing:Gn}),axis:kt?void 0:"both",width:zt.width,height:zt.height,minConstraints:[DEFAULT_PANEL_SIZE,DEFAULT_PANEL_SIZE],maxConstraints:[tt-2*vt,tt],onResize:Ln,onResizeStop:In,onResizeStart:()=>mt($n)},Wt.createElement("div",{key:$n,style:{width:Mt,height:Ft,...isFirefox?{left:zn[0],top:zn[1]}:{transform:`translate(${zn[0]}px, ${zn[1]}px)`}}},ut(Dn))))}))),$t>0&&Wt.createElement("div",{className:"flow-section__pagination"},Wt.createElement("div",{className:"pagination-controls"},Wt.createElement("div",{className:"pagination-count"},It+1,"-",Math.min(It+At,xt)," of"," ",xt),Wt.createElement(Button$3.Group,{className:"pagination-buttons"},Wt.createElement(Button$3,{disabled:ft===0,className:"page-up wb-icon-button",size:"tiny",onClick:()=>pt(ft-1)},Wt.createElement(DropTarget,{partRef:et,isValidDropTarget:Dn=>isPanel(Dn.dragRef),onDragEnter:()=>{pt(ft-1)}},Wt.createElement(LegacyWBIcon,{name:"previous"}))),Wt.createElement(Button$3,{disabled:ft===$t,className:"page-down wb-icon-button",size:"tiny",onClick:()=>pt(ft+1)},Wt.createElement(DropTarget,{partRef:et,isValidDropTarget:Dn=>isPanel(Dn.dragRef),onDragEnter:()=>{pt(ft+1)}},Wt.createElement(LegacyWBIcon,{name:"next"}))))))))};function actionSetFlowConfig(et,tt){return fn(et,nt=>{nt.flowConfig={...et.flowConfig,...tt}})}function useAction$1(et,tt){return react.exports.useCallback((...nt)=>{et(rt=>tt(rt,...nt))},[tt,et])}const PanelBankFlowSectionComp=et=>{const{panelBankSectionConfigRef:tt,updateConfig:nt}=et,{flowConfig:rt}=tt,ot=useAction$1(nt,actionSetFlowConfig),[st,ut]=react.exports.useState(0);return et.panelBankHeight===0?Wt.createElement(Wt.Fragment,null):Wt.createElement(PanelBankFlowSectionInnerComp,{...et,currentPage:st,setCurrentPage:ut,flowConfig:rt,updateFlowConfig:ot})},PanelBankFlowSection=PanelBankFlowSectionComp,GRID_COLUMN_COUNT=24,GRID_ROW_HEIGHT=32,GRID_CONTAINER_PADDING=[32,0],GRID_ITEM_MARGIN=[16,16],GRID_ITEM_DEFAULT_WIDTH=12,GRID_ITEM_DEFAULT_HEIGHT=6,FAT_GRID_ITEM_DEFAULT_WIDTH=16;function getLayoutItem(et,tt){for(let nt=0,rt=et.length;nt<rt;nt++)if(et[nt].id===tt)return et[nt]}function sortLayoutItems(et){return lodash$2.exports.cloneDeep(et).sort((tt,nt)=>tt.y>nt.y||tt.y===nt.y&&tt.x>nt.x?1:tt.y===nt.y&&tt.x===nt.x?0:-1)}function getFirstCollision(et,tt){for(let nt=0,rt=et.length;nt<rt;nt++)if(collides(et[nt],tt))return et[nt]}function collides(et,tt){return!(et.id===tt.id||lodash$2.exports.isNaN(et.x)||lodash$2.exports.isNaN(et.y)||lodash$2.exports.isNaN(et.w)||lodash$2.exports.isNaN(et.h)||lodash$2.exports.isNaN(tt.x)||lodash$2.exports.isNaN(tt.y)||lodash$2.exports.isNaN(tt.w)||lodash$2.exports.isNaN(tt.h)||et.x+et.w<=tt.x||et.x>=tt.x+tt.w||et.y+et.h<=tt.y||et.y>=tt.y+tt.h)}function compact(et,tt){const nt=[],rt=sortLayoutItems(et),ot=Array(et.length);for(let st=0,ut=rt.length;st<ut;st++){let ct=cloneLayoutItem(rt[st]);ct=compactItem(nt,ct,tt,rt),nt.push(ct),ot[lodash$2.exports.findIndex(et,{id:rt[st].id})]=ct,ct.moved=!1}return ot}function compactItem(et,tt,nt,rt){tt.y=Math.max(0,Math.min(bottom(et),tt.y));let ot=getFirstCollision(et,tt);for(;ot;)resolveCompactionCollision(rt,tt,ot.y+ot.h,"y"),ot=getFirstCollision(et,tt);return tt}function resolveCompactionCollision(et,tt,nt,rt){const st={x:"w",y:"h"}[rt];tt[rt]+=1;const ut=et.map(ct=>ct.id).indexOf(tt.id);for(let ct=ut+1;ct<et.length;ct++){const ft=et[ct];if(ft.y>tt.y+tt.h)break;collides(tt,ft)&&resolveCompactionCollision(et,ft,nt+tt[st],rt)}tt[rt]=nt}function bottom(et){let tt=0,nt;for(let rt=0,ot=et.length;rt<ot;rt++)nt=et[rt].y+et[rt].h,nt>tt&&(tt=nt);return tt}function cloneLayoutItem(et){return{w:et.w,h:et.h,x:et.x,y:et.y,id:et.id,moved:Boolean(et.moved)}}function findNextPanelLoc(et,tt,nt){tt=tt||GRID_COLUMN_COUNT,nt=nt||GRID_ITEM_DEFAULT_WIDTH;const rt=new Array(tt).fill(0);for(const ft of et){const pt=ft.y+ft.h;for(let ht=ft.x;ht<ft.x+ft.w;ht++)rt[ht]=Math.max(rt[ht],pt)}const ot=[];for(let ft=0;ft<tt-nt+1;ft++)ot.push(lodash$2.exports.max(rt.slice(ft,ft+nt)));let st=ot[0],ut=0;for(let ft=1;ft<ot.length;ft++)ot[ft]<st&&(st=ot[ft],ut=ft);return{x:ut,y:st}}function findNextFatPanelLoc(et){let tt=0;for(const nt of et){if(nt.x>=20||nt.x+nt.w<=4)continue;const rt=nt.y+nt.h;rt>tt&&(tt=rt)}return{y:tt,x:4}}function getNewGridItemLayout(et,tt){return tt?{...findNextFatPanelLoc(et),w:FAT_GRID_ITEM_DEFAULT_WIDTH,h:GRID_ITEM_DEFAULT_HEIGHT}:{...findNextPanelLoc(et,GRID_COLUMN_COUNT,GRID_ITEM_DEFAULT_WIDTH),w:GRID_ITEM_DEFAULT_WIDTH,h:GRID_ITEM_DEFAULT_HEIGHT}}function actionSetGridLayout(et,tt){return fn(et,nt=>{for(const rt of tt){const ot=et.panels.findIndex(st=>st.id===rt.id);ot>-1&&(nt.panels[ot].layout={x:rt.x,y:rt.y,w:rt.w,h:rt.h})}})}function useAction(et,tt){return react.exports.useCallback((...nt)=>{et(rt=>tt(rt,...nt))},[tt,et])}const PanelBankGridSection=et=>{const{updateConfig:tt}=et,nt=et.gridItemMargin||GRID_ITEM_MARGIN,rt=et.gridContainerPadding||GRID_CONTAINER_PADDING,ot=et.gridRowHeight||GRID_ROW_HEIGHT,st=et.panelBankSectionConfigRef.panels,ut=et.panelBankSectionConfigRef,ct=[];ut.panels.forEach((Bn,jn)=>{ct.push({...Bn.layout||getNewGridItemLayout(ct),id:st[jn].id})});const ft=useAction(tt,actionSetGridLayout),[pt,ht]=react.exports.useState({}),{dragRef:mt,dropRef:yt,dragData:vt,dragging:Tt}=react.exports.useContext(DragDropContext),[Et,xt]=Wt.useState(null),[At,Ct]=react.exports.useState(null),[$t,Ot]=react.exports.useState(null),Rt=react.exports.useMemo(()=>(et.panelBankWidth-nt[0]*(GRID_COLUMN_COUNT-1)-rt[0]*2)/GRID_COLUMN_COUNT,[rt,nt,et.panelBankWidth]),It=react.exports.useCallback(Bn=>et.showGridDots?Math.max(bottom(Bn),6):bottom(Bn),[et.showGridDots]),kt=react.exports.useCallback(Bn=>{const jn=It(Bn),Ar=et.hideEmptyWatermark?0:150;return Math.max(jn*ot+(jn-1)*nt[1]+rt[1]*2,Ar)},[It,rt,nt,ot,et.hideEmptyWatermark]),Mt=react.exports.useCallback((Bn,jn)=>({x:Math.max(Math.round((Bn-nt[0])/(Rt+nt[0])),0),y:Math.round((jn-nt[1])/(ot+nt[1]))}),[Rt,nt,ot]),Ft=react.exports.useCallback((Bn,jn=!0)=>{const Ar=(Bn+nt[0])/(Rt+nt[0]);return jn?Math.round(Ar):Ar},[Rt,nt]),zt=react.exports.useCallback((Bn,jn=!0)=>{const Ar=(Bn+nt[1])/(ot+nt[1]);return jn?Math.round(Ar):Ar},[nt,ot]),Vt=react.exports.useCallback(Bn=>({w:Ft(Bn.width),h:zt(Bn.height)}),[zt,Ft]),Zt=react.exports.useCallback((Bn,jn)=>({x:Math.round((Rt+nt[0])*Bn+rt[0]),y:Math.round((ot+nt[1])*jn+rt[1])}),[Rt,rt,nt,ot]),Ut=react.exports.useCallback(Bn=>({w:Math.round(Rt*Bn.w+Math.max(0,Bn.w-1)*nt[0]),h:Math.round(ot*Bn.h+Math.max(0,Bn.h-1)*nt[1])}),[Rt,nt,ot]),Xt=react.exports.useCallback((Bn,jn=!0)=>{const{x:Ar,y:Er}=Zt(Bn.x,Bn.y),Pr=Ut({w:Bn.w,h:Bn.h});return{width:Pr.w,height:Pr.h,...jn?{transform:`translate(${Ar}px, ${Er}px)`}:{left:Ar,top:Er}}},[Zt,Ut]),Jt=()=>{setTimeout(()=>window.dispatchEvent(new Event("resize")))},gn=Bn=>({w:Bn&&Bn.size&&Bn.size.w||GRID_ITEM_DEFAULT_WIDTH,h:Bn&&Bn.size&&Bn.size.h||GRID_ITEM_DEFAULT_HEIGHT}),An=(Bn,jn)=>{const Ar=jn.currentTarget.getBoundingClientRect(),Er=gn(vt),Pr=Ut(Er),Nr=Mt(jn.clientX-Ar.left-Pr.w/2,jn.clientY-Ar.top-60);lodash$2.exports.isEqual(Nr,vt&&vt.dragoverMouseCoords)||Bn.setDragData({...vt,dragoverMouseCoords:Nr})},sn=fn(ct,Bn=>{if(mt!=null&&Tt&&vt!=null&&vt.dragoverMouseCoords!=null){const jn=lodash$2.exports.findIndex(Bn,{id:mt.id});jn!==-1&&Bn.splice(jn,1)}}),Sn=vt!=null&&lodash$2.exports.isEqual(yt,et.panelBankSectionConfigRef),In=react.exports.useCallback((Bn=0)=>{if(At==null||$t==null)return null;const jn=Vt({width:At,height:$t});return jn.w=Math.min(jn.w,GRID_COLUMN_COUNT-Bn),{w:Math.max(jn.w,1),h:Math.max(jn.h,2)}},[Vt,$t,At]);let _n=fn(sn,Bn=>{if(Et!=null){const jn=lodash$2.exports.findIndex(Bn,{id:Et});if(jn!==-1){const Ar=Bn[jn],Er=In(Ar?.x);Er!=null&&(Bn[jn].w=Er.w,Bn[jn].h=Er.h)}}if(mt!=null&&Tt&&Sn&&vt!=null&&vt.dragoverMouseCoords!=null){const jn=gn(vt);Bn.push({x:Math.min(vt.dragoverMouseCoords.x,GRID_COLUMN_COUNT-jn.w),y:vt.dragoverMouseCoords.y,...jn,id:"drop-preview"})}});et.panelBankWidth<=768&&et.readOnly&&(_n=fn(_n,Bn=>{Bn.forEach(jn=>{jn.w=GRID_COLUMN_COUNT,jn.x=0})})),_n=compact(_n,GRID_COLUMN_COUNT);let En=null;const Ln=getLayoutItem(_n,"drop-preview");if(Ln){const Bn=Xt(Ln,!1);En=Wt.createElement("div",{key:"drop-preview",className:"drop-preview",style:{...Bn}})}_n.forEach(Bn=>{const jn=pt[Bn.id];if(jn==null||_n.find(Er=>Bn!==Er&&heightsIntersect(Bn,Er))!=null)return;const Ar=Bn.h;Bn.h=Math.ceil(zt(jn+32+6,!1)),_n.forEach(Er=>{Bn!==Er&&Er.y>Bn.y&&(Er.y+=Bn.h-Ar)})});const wn=It(_n),Dn=[];if(et.showGridDots)for(let Bn=0;Bn<=wn/2;Bn++)for(let jn=0;jn<13;jn++)Dn.push([et.panelBankWidth/12*jn,Bn*(ot-1)*2]);const $n=et.activePanelRefs.length+et.inactivePanelRefs.length===0,Gn=[],Jn=et.activePanelRefs.map(Bn=>Bn.id),[zn,Qn]=react.exports.useState(!1);return react.exports.useEffect(()=>{function Bn(){Qn(!1)}return window.addEventListener("mouseup",Bn),()=>window.removeEventListener("mouseup",Bn)},[]),Wt.createElement("div",{className:classnames("grid-section",{"resizing-panel":Et!=null,empty:$n})},Wt.createElement(DropTarget,{partRef:et.panelBankSectionConfigRef,style:{position:"relative",height:kt(_n)},onMouseDown:Bn=>{Bn.target===Bn.currentTarget&&Qn(!0)},onMouseUp:Bn=>{zn&&Bn.target===Bn.currentTarget&&et.onClickGrid?.()},onDragEnter:(Bn,jn)=>{An(Bn,jn)},onDragOver:An,onDrop:()=>{if(console.log("ON DROP",vt,mt),!vt||!mt)return;lodash$2.exports.isEqual(vt.fromSectionRef,et.panelBankSectionConfigRef)||et.movePanelBetweenSections(mt,vt.fromSectionRef,et.panelBankSectionConfigRef);const Bn=getLayoutItem(_n,"drop-preview");Bn&&(Bn.id=mt.id),ft(_n)}},En,$n&&!et.hideEmptyWatermark?Wt.createElement(EmptyPanelBankSectionWatermark,null):Wt.createElement(Wt.Fragment,null,Dn.map((Bn,jn)=>Wt.createElement("div",{className:"grid-dot",key:`dot-${jn}`,style:{left:Bn[0],top:Bn[1]}})),et.activePanelRefs.map((Bn,jn)=>{const Ar=Jn[jn];let Er=getLayoutItem(_n,Bn.id);Er==null&&(Er={w:0,h:0,x:0,y:0,id:""});const Pr=isPanel(mt)&&lodash$2.exports.isEqual(mt,Bn),Nr=Xt(Er,!isFirefox&&(!Pr||Tt)),Ir=et.readOnly?Xr=>ht(Jr=>({...Jr,[Bn.id]:Xr})):void 0,no=In(Er?.x),ro=Et!=null&&no!=null&&Et===Bn.id,ao=ro?{w:At,h:$t}:{w:Nr.width,h:Nr.height};return Wt.createElement(Resizable,{className:classnames("panel-bank__panel",`col-${Er.w}`,{[`panel-bank__panel-id__${Ar}`]:Ar!=null,"panel-bank__panel-small":Nr.width<300,resizing:ro,dragging:Pr&&Tt,"panel-highlight":Ar!=null&&Gn.includes(Ar)}),key:Bn.id,width:ao?.w??0,height:ao?.h??0,minConstraints:[Rt,ot],onResize:(Xr,Jr)=>{Ct(Jr.size.width),Ot(Jr.size.height),Jt()},onResizeStart:()=>{xt(Bn.id)},onResizeStop:()=>{setTimeout(()=>{xt(null),Ot(null),Ct(null),ft(_n)},1)}},Wt.createElement(DragSource,{style:Nr,partRef:Bn,onMouseUp:Xr=>{skipTransition(Xr.currentTarget,50)},data:{fromSectionRef:et.panelBankSectionConfigRef,size:{w:Er.w,h:Er.h}}},et.renderPanel(Bn,Ir)))}))))};function heightsIntersect(et,tt){const nt=tt.y<et.y?tt:et;return(nt===et?tt:et).y<nt.y+nt.h}const getCookie=et=>{const tt=getCookieStrs();for(const nt of tt){const rt=cookieStrToKeyVal(nt);if(rt!=null&&rt[0]===et)return rt[1]}return""},getCookieStrs=()=>decodeURIComponent(document.cookie).split(";").filter(tt=>tt!=="").map(tt=>tt.trim()),cookieStrToKeyVal=et=>{const tt=et.indexOf("=");if(tt<1)return console.log("Invalid cookie",et),null;const nt=et.slice(0,tt),rt=et.slice(tt+1);return[nt,rt]},{host}=window.location;host.includes("localhost");host.replace("app.","").replace("beta.wandb","wandb");const REMOTE_URI_PREFIX="wandb-artifact:///",LOCAL_URI_PREFIX="local-artifact:///",isRemoteURI=et=>et.startsWith(REMOTE_URI_PREFIX),isLocalURI=et=>et.startsWith(LOCAL_URI_PREFIX),inJupyterCell=()=>window.location.toString().includes("weave_jupyter"),useIsAuthenticated=()=>{const[et,tt]=react.exports.useState(void 0),nt=getCookie("anon_api_key");return react.exports.useEffect(()=>{const rt={};nt!=null&&nt!==""&&(rt["x-wandb-anonymous-auth-id"]=btoa(nt)),browser$4(getConfig().backendWeaveViewerUrl(),{credentials:"include",method:"POST",headers:{"Content-Type":"application/json",...rt}}).then(ot=>{if(ot.status!==200){tt(!1);return}else return ot.json()}).then(ot=>{const st=!!(ot?.authenticated??!1);tt(st)}).catch(ot=>{tt(!1)})},[nt]),et},isServedLocally=()=>window.location.hostname==="localhost"||window.location.hostname.endsWith("colab.googleusercontent.com"),uriFromNode=et=>{if(et.nodeType==="output"&&et.fromOp.name==="get"){const tt=et.fromOp.inputs.uri;if(tt.nodeType==="const"){const nt=tt.val;if(typeof nt=="string")return nt}}return null},branchPointIsRemote=et=>et?.original_uri.startsWith(REMOTE_URI_PREFIX)??!1,weaveTypeIsPanel=et=>isAssignableTo(et||"any",{type:"Panel"}),weaveTypeIsPanelGroup=et=>isAssignableTo(et||"any",{type:"Group"}),toArtifactSafeName=et=>et.replace(/[^a-zA-Z0-9]/g,"_"),entityNameFromRemoteURI=et=>{const tt=et.split(REMOTE_URI_PREFIX)[1].split("/");return{entity:tt[0],project:tt[1]}},determineURISource=(et,tt)=>tt!=null&&isRemoteURI(tt.original_uri)?entityNameFromRemoteURI(tt.original_uri):et!=null&&isRemoteURI(et)?entityNameFromRemoteURI(et):null,determineURIIdentifier=et=>{const tt=et?.split(":"),nt=tt?tt[tt.length-2].split("/"):null,rt=tt?tt[tt.length-1].split("/")[0]:null;return{name:nt?nt[nt.length-1]:null,version:rt}};function useScrollbarVisibility(){const[et,tt]=react.exports.useState(!1),nt=react.exports.useRef(null),rt=react.exports.useMemo(()=>_$2.throttle(()=>{tt(!0);const st=nt.current=window.setTimeout(()=>{nt.current===st&&tt(!1)},2e3)},300),[]),ot=react.exports.useCallback(st=>{const ut=st.nativeEvent.offsetX,ct=st.currentTarget.clientWidth;ut>ct&&rt()},[rt]);return{visible:et,onScroll:rt,onMouseMove:ot}}const WBButton=Wt.memo(({...et})=>Wt.createElement(ButtonStyled,{...et}));Wt.memo(({...et})=>Wt.createElement(ButtonLinkStyled,{...et}));const buttonStyles=Ce`
  &&& {
    display: inline-flex;
    align-items: center;

    line-height: 1.5em;
    font-weight: 600;
    border: none;
    border-radius: 0.25rem;
    margin: 0;

    transition: background-color 0.3s, color 0.3s;

    ${({variant:et="ghost"})=>et==="ghost"?Ce`
            &,
            &:active,
            &:focus {
              color: ${TEXT_PRIMARY_COLOR};
              background-color: transparent;
            }
            &:hover {
              color: ${TEAL};
              background-color: ${TEAL_TRANSPARENT_2};
            }
          `:et==="confirm"?Ce`
            &,
            &:active,
            &:focus {
              color: ${white$1};
              background-color: ${TEAL_LIGHT};
            }
            &:hover {
              background-color: ${TEAL_LIGHT_2};
            }
          `:et==="plain"&&Ce`
            &,
            &:active,
            &:focus {
              color: ${TEXT_PRIMARY_COLOR};
              background-color: ${GRAY_TRANSPARENT};
            }
            &:hover {
              color: ${TEAL};
              background-color: ${TEAL_TRANSPARENT_2};
            }
          `}

    ${({size:et="small"})=>et==="icon"?Ce`
            padding: 4px;
          `:et==="small"?Ce`
            padding: 4px 10px;
          `:et==="medium"&&Ce`
            padding: 8px 16px;
          `}
  }
`,ButtonStyled=styled$1(Button$3)`
  ${buttonStyles}
`,ButtonLinkStyled=styled$1(Link$1)`
  ${buttonStyles}
`,PBSection=et=>{const{config:tt,groupPath:nt,enableAddPanel:rt,updateConfig2:ot,handleAddPanel:st}=et,ut=useSelectedPath(),ct=useSetInspectingPanel(),ft=useGetPanelIsHoveredByGroupPath(nt??[]),pt=useGetPanelIsHoveredInOutlineByGroupPath(nt??[]),ht=useSetPanelIsHovered(),[mt,yt]=react.exports.useState(0),[vt,Tt]=react.exports.useState(0),Et=et.mode==="grid"?PanelBankGridSection:PanelBankFlowSection,xt=inJupyterCell(),{visible:At,onScroll:Ct,onMouseMove:$t}=useScrollbarVisibility(),Ot=react.exports.useRef(null),Rt=react.exports.useRef(null);return Wt.createElement(DragDropProvider,null,Wt.createElement("div",{className:"panel-bank",style:{height:"100%"}},Wt.createElement(Measure,{bounds:!0,onResize:It=>{yt(It.bounds?It.bounds.width-PANEL_BANK_PADDING*2:0),Tt(It.bounds?It.bounds.height-(Ot.current?.offsetHeight??0)-(Rt.current?.offsetHeight??0):0)}},({measureRef:It})=>Wt.createElement(Sections,{className:"panel-bank__sections",ref:It,scrollbarVisible:At,onScroll:Ct,onMouseMove:$t},Wt.createElement("div",{className:"panel-bank__section"},!xt&&nt!=null&&st!=null&&Wt.createElement(ActionBar,{ref:Ot},Wt.createElement(Tooltip,{position:"bottom right",trigger:Wt.createElement(IconButton$3,{onClick:()=>ct(nt)},Wt.createElement(IconPencilEdit,null))},"Open panel editor"),rt&&Wt.createElement(WBButton,{onClick:st},Wt.createElement(IconAddNew$2,{$marginRight:6}),"New panel")),Wt.createElement(Et,{panelBankWidth:mt,panelBankHeight:vt,panelBankSectionConfigRef:tt,updateConfig:ot,activePanelRefs:tt.panels,inactivePanelRefs:[],renderPanel:kt=>{const Mt=nt!=null?[...nt,kt.id]:null,Ft=Mt!=null&&lodash$2.exports.isEqual(Mt,ut),zt=nt!=null&&ft(kt.id),Vt=nt!=null&&pt(kt.id),Zt=Ft||Vt;return Wt.createElement(EditablePanel,{isHovered:zt,isFocused:Zt,className:"editable-panel",onMouseEnter:Mt!=null?()=>{ht(Mt,!0)}:void 0,onMouseLeave:Mt!=null?()=>{ht(Mt,!1)}:void 0},et.mode==="grid"&&Wt.createElement(DragHandle,{key:`draghandle-${kt.id}`,className:"draggable-handle",partRef:kt},Wt.createElement(LegacyWBIcon,{title:"",name:"handle"})),et.renderPanel(kt))},movePanelBetweenSections:()=>{console.log("MOVE BETWEEN SECTIONS")}}),st!=null&&!xt&&Wt.createElement(AddPanelBarContainer,{ref:Rt},Wt.createElement(AddPanelBar,{onClick:st},Wt.createElement(IconAddNew$2,null),"New panel")))))))},getSectionConfig=(et,tt)=>{const nt=tt??{id:"grid0",name:"Section 0",panels:[],isOpen:!0,flowConfig:{snapToColumns:!0,columnsPerPage:2,rowsPerPage:1,gutterWidth:0,boxWidth:64,boxHeight:64},type:"grid",sorted:0};return fn(nt,rt=>{lodash$2.exports.forEach(et,ot=>{nt.panels.findIndex(st=>st.id===ot)===-1&&rt.panels.push({id:ot,layout:getNewGridItemLayout(rt.panels.map(st=>st.layout),!1)})})})},Sections=styled$1.div`
  ${SCROLLBAR_STYLES}
`,ActionBar=styled$1.div`
  height: 48px;
  padding: 0 32px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
`,AddPanelBar=styled$1.div`
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 6px;
  background-color: ${GRAY_25};
  font-weight: 600;
  color: ${GRAY_500};
`,AddPanelBarContainer=styled$1.div`
  padding: 8px 32px 16px;

  transition: opacity 0.3s;
  &:not(:hover) {
    opacity: 0;
  }
`,IconAddNew$2=styled$1(IconAddNew$3)`
  width: 18px;
  height: 18px;
  margin-right: ${et=>et.$marginRight??8}px;
`,EditablePanel=styled$1.div`
  &&&&& {
    background-color: ${WHITE};
    width: 100%;
    height: 100%;

    padding: 8px;
    border: 1px solid ${GRAY_350};
    ${et=>et.isHovered&&Ce`
        border-color: ${GRAY_400};
        box-shadow: ${PANEL_HOVERED_SHADOW};
      `}
    ${et=>et.isFocused&&Ce`
        padding: 7px;
        border-width: 2px;
        border-color: ${BORDER_COLOR_FOCUSED};
      `}
  }
`,LayoutSections=et=>{const{sectionNames:tt}=et;return Wt.createElement(Wt.Fragment,null,tt.map((nt,rt)=>Wt.createElement("div",null,Wt.createElement("div",{style:{padding:4,backgroundColor:"#e8e8e8"}},nt),Wt.createElement("div",{style:{width:"100%",height:400}},et.renderPanel({id:nt})))))},Tabs=et=>{const{input:tt,activeIndex:nt,setActiveIndex:rt}=et,ot=useNodeValue(tt),st=react.exports.useMemo(()=>ot.result??["loading..."],[ot.result]);return Wt.createElement(TabsContainer,null,st.map((ut,ct)=>Wt.createElement(Tab,{key:ct,active:nt===ct,onClick:()=>rt(ct)},ut)))},LayoutTabs=et=>{const[tt,nt]=react.exports.useState(0);return Wt.createElement(Container$3,null,Wt.createElement(Tabs,{input:constStringList(et.tabNames),activeIndex:tt,setActiveIndex:nt}),Wt.createElement(Content$1,null,et.renderPanel({id:et.tabNames[tt]})))},Container$3=styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
`,Content$1=styled$1.div`
  flex: 1 1 auto;
  overflow: hidden;
`,TabsContainer=styled$1.div`
  position: relative;
  display: flex;
  width: 100%;
  overflow-x: auto;
  flex: 0 0 auto;
  margin-bottom: 12px;

  &:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background-color: ${GRAY_350};
  }
`,Tab=styled$1.div`
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  min-width: 50px;
  max-width: 100px;
  line-height: 32px;
  padding-bottom: 6px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 600;

  &:not(:first-child) {
    margin-left: 32px;
  }

  ${et=>et.active?Ce`
          &:after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 2px;
            background-color: ${TEAL};
          }
        `:Ce`
          &:not(:hover) {
            color: ${GRAY_500};
          }
        `}
`,panelIdAlternativeMapping={table:"tablePanel",number:"PanelNumber",string:"PanelString",boolean:"PanelBoolean",date:"PanelDate",barchart:"PanelBarchart","web-viz":"PanelWebViz","video-file":"PanelVideoFile","model-file":"PanelModelFile","id-count":"PanelIdCount",link:"PanelLink","run-overview":"PanelRunOverview",none:"PanelNone",artifactVersionAliases:"PanelArtifactVersionAliases",netron:"PanelNetron",object:"PanelObject","audio-file":"PanelAudioFile","string-histogram":"PanelStringHistogram",rawimage:"PanelRawimage","precomputed-histogram":"PanelPrecomputedHistogram","image-file-compare":"PanelImageFileCompare","molecule-file":"PanelMoleculeFile","multi-histogram":"PanelMultiHistogram","object3D-file":"PanelObject3DFile","run-color":"PanelRunColor","multi-string-histogram":"PanelMultiStringHistogram",dir:"PanelDir","id-compare-count":"PanelIdCompareCount",jupyter:"PanelJupyter","bokeh-file":"PanelBokehFile",ndarray:"PanelNdarray","id-compare":"PanelIdCompare",unknown:"PanelUnknown","image-file":"PanelImageFile","project-overview":"PanelProjectOverview",textdiff:"PanelTextdiff",type:"PanelType",text:"PanelText","string-compare":"PanelStringCompare","debug-expression-graph":"PanelDebugExpressionGraph",tracer:"PanelTracer"};function toWeaveType(et){if(et==null)return"none";if(et.domain!=null&&et.selection!=null)return{type:"Signals",_is_object:!0,domain:{..._$2.mapValues(et.domain,toWeaveType),type:"LazyAxisSelections",_is_object:!0},selection:{..._$2.mapValues(et.selection,toWeaveType),type:"AxisSelections",_is_object:!0}};if(et.dims!=null&&et.constants!=null)return{type:"Series",_is_object:!0,..._$2.mapValues(_$2.omit(et,["table","constants"]),toWeaveType),table:{type:"TableState",_is_object:!0,..._$2.mapValues(et.table,toWeaveType)},constants:{type:"PlotConstants",_is_object:!0,..._$2.mapValues(et.constants,toWeaveType)}};if(et.columns!=null&&et.columnNames!=null)return{type:"TableState",_is_object:!0,..._$2.mapValues(et,toWeaveType)};if(et.id!=null&&et.input_node!=null){let tt=et.id;(tt==null||tt==="")&&(tt="Auto"),panelIdAlternativeMapping[tt]!=null&&(tt=panelIdAlternativeMapping[tt]);let nt="none";return et.config!=null&&(nt={type:tt+"Config",_is_object:!0,..._$2.mapValues(et.config,toWeaveType)}),{type:tt,id:"string",_is_object:!0,vars:{type:"typedDict",propertyTypes:_$2.mapValues(et.vars,toWeaveType)},input_node:toWeaveType(et.input_node),config:nt,_renderAsPanel:toWeaveType(et.config?._renderAsPanel)}}else{if(et.nodeType!=null)return et.nodeType==="const"&&isFunctionType(et.type)?et.type:{type:"function",inputTypes:{},outputType:et.type};if(_$2.isArray(et))return{type:"list",objectType:et.length===0?"unknown":union$2(et.map(toWeaveType))};if(_$2.isObject(et))return"_type"in et?{type:et._type,..._$2.mapValues(_$2.omit(et,["_type"]),toWeaveType)}:{type:"typedDict",propertyTypes:_$2.mapValues(et,toWeaveType)};if(_$2.isString(et))return"string";if(_$2.isNumber(et))return"number";if(_$2.isBoolean(et))return"boolean"}throw new Error("Type conversion not implemeneted for value: "+et)}const LAYOUT_MODES=["horizontal","vertical","grid","flow","tab","section","layer"],PANEL_GROUP_DEFAULT_CONFIG=()=>({layoutMode:"vertical",equalSize:!0,showExpressions:!0,items:{},gridConfig:getSectionConfig([],void 0)}),inputType$15="any",Group$1=styled$1.div`
  ${et=>et.layered?Ce`
          width: 100%;
          height: 100%;
          position: relative;
        `:et.preferHorizontal?Ce`
          display: flex;
          height: 100%;
          flex-direction: row;
        `:Ce`
          display: flex;
          height: 100%;
          width: 100%;
          flex-direction: column;
        `}

  ${et=>et.isVarBar&&Ce`
      border-right: 1px solid ${GRAY_350};
      .edit-bar {
        border-bottom: none;
        border-top: 1px solid ${GRAY_350};
        padding-top: 12px;
        margin-bottom: 0;
      }
      > :first-child .edit-bar {
        border-top: none;
      }
    `}
          
  ${et=>et.compStyle}
`,GroupItem=styled$1.div`
  ${et=>et.layered?Ce`
          position: absolute;
          top: 0;
          right: 0;
          bottom: 0;
          left: 0;
        `:et.preferHorizontal?et.width?Ce`
            width: ${et.width};
          `:et.equalSize?Ce`
            flex: 1;
            width: 20px;
          `:Ce`
            flex-grow: 1;
            width: 20px;
          `:et.equalSize?Ce`
          flex: 1;
          width: 100%;
          height: 20px;
          margin-bottom 12px;
        `:Ce`
          /* flex: 1 1 100px; */
          width: 100%;
          margin-bottom: 12px;
        `}
`,fixChildData=et=>isGroupNode(et)?{...et,config:et.config==null?void 0:{...et.config,items:lodash$2.exports.mapValues(et.config.items,tt=>fixChildData(getFullChildPanel(tt)))}}:et;function dereferenceItemVars(et,tt){if(isChildPanelFullConfig(et)){const nt=pushFrame(tt,{input:et.input_node});return{...et,input_node:dereferenceAllVars(et.input_node,tt).node,config:et.config==null?void 0:lodash$2.exports.mapValues(et.config,rt=>dereferenceItemVars(rt,nt))}}else{if(isNodeOrVoidNode(et))return dereferenceAllVars(et,tt).node;if(lodash$2.exports.isArray(et))return lodash$2.exports.map(et,nt=>dereferenceItemVars(nt,tt));if(lodash$2.exports.isPlainObject(et))return lodash$2.exports.mapValues(et,nt=>dereferenceItemVars(nt,tt))}return et}function makeItemNode(et,tt,nt){let rt=getFullChildPanel(et);const ot=getPanelStacksForType(rt.input_node!=null?rt.input_node.type:"invalid",rt.id,{allowedPanels:nt}).curPanelId;if(ot==="Expression")return rt.input_node;rt={...rt,id:rt.input_node!=null?ot:rt.id,config:ot===rt.id?rt.config:void 0,_renderAsPanel:rt?.config?._renderAsPanel},rt=fixChildData(rt),rt=dereferenceItemVars(rt,tt);const st=toWeaveType(rt);return constNodeUnsafe(st,rt)}function getItemVars(et,tt,nt,rt){const ot=getFullChildPanel(tt);if(isGroupNode(ot)){const st=lodash$2.exports.mapValues(ot.config.items,ut=>makeItemNode(ut,nt,ot.config.allowedPanels));return st[et]=makeItemNode(ot,nt,rt),st}return{[et]:makeItemNode(ot,nt,rt)}}const addPanelToGroupConfig=(et,tt,nt,rt)=>{let ot="";return tt!=null&&(ot=tt[0]),fn(et,st=>{if(rt==null&&(rt={vars:{},id:ot,input_node:voidNode(),config:void 0}),st.items[nextPanelName(Object.keys(et.items),nt)]=rt,et.layoutMode==="flow"){const ut=et.gridConfig?.flowConfig.rowsPerPage??1,ct=et.gridConfig?.flowConfig.columnsPerPage??1;Object.keys(et.items).length===1&&ut===1&&ct===1&&(st.gridConfig.flowConfig.columnsPerPage=2)}})},usePanelGroupCommon=et=>{const tt=useUpdateConfig2(et),nt=react.exports.useCallback(()=>{tt(rt=>addPanelToGroupConfig(rt,et.config?.allowedPanels,et.config?.childNameBase))},[et.config?.allowedPanels,et.config?.childNameBase,tt]);return react.exports.useMemo(()=>({handleAddPanel:nt}),[nt])},PanelGroupConfigComponent=et=>{const{handleAddPanel:tt}=usePanelGroupCommon(et),nt=et.config??PANEL_GROUP_DEFAULT_CONFIG(),{updateConfig:rt,updateConfig2:ot}=et,{path:st,selectedPath:ut,stack:ct,dashboardConfigOptions:ft}=usePanelContext();let pt={};const ht=st.join("."),mt=ut?.join(".")??"",yt=ht.startsWith(mt),vt=lodash$2.exports.map(nt.items,(Tt,Et)=>{const xt=Wt.createElement(PanelContextProvider,{key:Et,newVars:pt},Wt.createElement(ChildPanelConfigComp,{allowedPanels:nt.allowedPanels,pathEl:""+Et,config:Tt,updateConfig:At=>rt(fn(nt,Ct=>{Ct.items[Et]=At})),updateConfig2:At=>{if(ot!=null)return ot(Ct=>{Ct=Ct??PANEL_GROUP_DEFAULT_CONFIG();const $t=getFullChildPanel(Ct?.items?.[Et]),Ot=At($t);return fn(Ct,Rt=>{Rt.items[Et]=Ot})})}}));return pt={...pt,...getItemVars(Et,Tt,pushFrame(ct,pt),nt.allowedPanels)},xt});return yt?Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigSection,{label:"Properties"},ft,Wt.createElement(ConfigOption,{label:"layout"},Wt.createElement(ModifiedDropdownConfigField,{options:LAYOUT_MODES.map(Tt=>({key:Tt,value:Tt,text:Tt})),value:nt.layoutMode,onChange:(Tt,{value:Et})=>rt({layoutMode:Et})})),Wt.createElement(ChildConfigContainer,null,vt)),Wt.createElement(ConfigSection,null,Wt.createElement(Button$3,{size:"mini",onClick:tt},"Add Child"))):Wt.createElement(Wt.Fragment,null,vt)},PanelGroupItem=({siblingVars:et,item:tt,name:nt,config:rt,updateConfig:ot,updateConfig2:st,handleSiblingVarEvent:ut})=>{const ct=react.exports.useCallback(mt=>ot(fn(rt,yt=>{yt.items[nt]=mt})),[rt,nt,ot]),ft=react.exports.useCallback(mt=>{if(st!=null)return st(yt=>{yt=yt??PANEL_GROUP_DEFAULT_CONFIG();const vt=getFullChildPanel(yt?.items?.[nt]),Tt=mt(vt);return fn(yt,Et=>{Et.items[nt]=Tt})})},[nt,st]),pt=react.exports.useCallback(mt=>{ot(fn(rt,yt=>{yt.items[mt]=yt.items[nt],delete yt.items[nt]}))},[rt,nt,ot]);let ht="off";return rt.layoutMode==="layer"||!rt.showExpressions?ht="off":rt.showExpressions==="titleBar"?ht="titleBar":ht="editable",Wt.createElement(PanelContextProvider,{newVars:et,handleVarEvent:ut},Wt.createElement(ChildPanel,{allowedPanels:rt.allowedPanels,pathEl:""+nt,config:tt,controlBar:ht,updateConfig:ct,updateConfig2:ft,updateName:pt}))},useSectionConfig=(et,tt)=>{const nt=react.exports.useMemo(()=>{const ot=et??PANEL_GROUP_DEFAULT_CONFIG();return getSectionConfig(Object.keys(ot.items),ot.gridConfig)},[et]),rt=react.exports.useCallback(ot=>tt(st=>{st=st??PANEL_GROUP_DEFAULT_CONFIG();const ut=getSectionConfig(Object.keys(st.items),st.gridConfig),ct=ot(ut);return fn(st,ft=>{ft.gridConfig=ct})}),[tt]);return{gridConfig:nt,updateGridConfig2:rt}},PanelGroup=et=>{const tt=et.config??PANEL_GROUP_DEFAULT_CONFIG(),{stack:nt,path:rt}=usePanelContext(),{updateConfig:ot}=et,st=useUpdateConfig2(et),{handleAddPanel:ut}=usePanelGroupCommon(et),ct=react.exports.useCallback((At,Ct)=>{console.log("HIGHLIGHT ITEM NAME",At),st($t=>fn($t,Ot=>{$t.items[At]!=null?(console.log("HIGHLIGHT DIRECT CHILD"),mutateEnsureItemIsFullChildPanel(Ot.items,At),Ct(Ot.items[At])):lodash$2.exports.forEach($t.items,(Rt,It)=>{const kt=getFullChildPanel(Rt);kt.id==="Group"&&kt.config.items[At]!=null&&(console.log("HIGHLIGHT GRAND CHILD"),mutateEnsureItemIsFullChildPanel(Ot.items,It),mutateEnsureItemIsFullChildPanel(Ot.items[It].config.items,At),Ct(Ot.items[It].config.items[At]))})}))},[st]),ft=(At,Ct)=>{if(At.items[Ct]!=null)return[Ct];for(const[$t,Ot]of Object.entries(At.items)){const Rt=getFullChildPanel(Ot);if(Rt.id==="Group"&&Rt.config.items[Ct]!=null)return[$t,Ct]}throw new Error("Could not find item path for "+Ct)},pt=useSetPanelInputExprIsHighlighted(),ht=react.exports.useCallback((At,Ct)=>{st($t=>{const Ot=rt.concat(ft($t,At));return pt(Ot,Ct),$t})},[rt,pt,st]),mt=react.exports.useCallback((At,Ct,$t)=>{console.log("PG2 handleSiblingVarEvent",At,Ct,$t),$t.id==="hover"?ht(At,!0):$t.id==="unhover"?ht(At,!1):$t.id==="mutate"&&ct(At,Ot=>{console.log("PG2 mutate input expr"),Ot.input_node=replaceChainRoot(Ot.input_node,$t.newRootNode)})},[ct,ht]),yt=react.exports.useMemo(()=>{let At={};const Ct={};return lodash$2.exports.forEach(tt.items,($t,Ot)=>{const Rt=Wt.createElement(PanelContextProvider,{newVars:At},Wt.createElement(PanelGroupItem,{siblingVars:At,handleSiblingVarEvent:mt,item:$t,name:Ot,config:tt,updateConfig:ot,updateConfig2:st}));Ct[Ot]=Rt,At={...At,...getItemVars(Ot,$t,pushFrame(nt,At),tt.allowedPanels)}}),Ct},[tt,mt,nt,ot,st]),{gridConfig:vt,updateGridConfig2:Tt}=useSectionConfig(et.config,st),Et=react.exports.useCallback(At=>yt[At.id],[yt]),xt=lodash$2.exports.isEqual(rt,["sidebar"]);if(tt.layoutMode==="grid"||tt.layoutMode==="flow")return Wt.createElement(PBSection,{mode:tt.layoutMode,config:vt,groupPath:rt,enableAddPanel:tt.enableAddPanel,updateConfig2:Tt,renderPanel:Et,handleAddPanel:tt.enableAddPanel?ut:void 0});if(tt.layoutMode==="tab"){const At=Object.keys(tt.items);return Wt.createElement("div",null,Wt.createElement(LayoutTabs,{tabNames:At,renderPanel:Et}))}if(tt.layoutMode==="section"){const At=Object.keys(tt.items);return Wt.createElement("div",null,Wt.createElement(LayoutSections,{sectionNames:At,renderPanel:Et}))}return Wt.createElement(Group$1,{className:"group",isVarBar:xt,layered:tt.layoutMode==="layer",preferHorizontal:tt.layoutMode==="horizontal",compStyle:tt.style},Object.entries(tt.items).map(([At,Ct])=>{const $t=getFullChildPanel(Ct).config;let Ot;return $t?.style!=null&&(Ot=$t.style.split(";").find(kt=>kt.includes("width"))?.split(":")[1]),tt.panelInfo?.[At]?.hidden?null:Wt.createElement(GroupItem,{key:At,width:Ot,layered:tt.layoutMode==="layer",preferHorizontal:tt.layoutMode==="horizontal",equalSize:tt.equalSize},yt[At])}),tt.enableAddPanel&&(xt?Wt.createElement(AddVarButton,{onClick:ut},"New variable",Wt.createElement(IconAddNew$1,null)):Wt.createElement(Button$3,{onClick:ut,size:"tiny"},"Add ",et.config?.childNameBase??"panel")))},PANEL_GROUP2_ID="Group",Spec$17={hidden:!0,id:PANEL_GROUP2_ID,initialize:(et,tt)=>PANEL_GROUP_DEFAULT_CONFIG(),Component:PanelGroup,ConfigComponent:PanelGroupConfigComponent,inputType:inputType$15},AddVarButton=styled$1.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  width: calc(100%);
  border-top: 1px solid ${GRAY_350};

  color: ${GRAY_500};
  &:hover {
    color: ${GRAY_800};
  }

  svg {
    width: 18px;
    height: 18px;
  }
`,IconAddNew$1=styled$1(IconAddNew$3)`
  width: 18px;
  height: 18px;
`,isGroupNode=et=>getFullChildPanel(et).id===PANEL_GROUP2_ID,STANDARD_PANEL_CHILD_KEYS={Each:["panel","layout"],EachColumn:["render"],FacetTabs:["panel"],Sections:["panel"]},isStandardPanel=et=>Object.keys(STANDARD_PANEL_CHILD_KEYS).includes(et),isTableStatePanel=et=>["table","Facet"].includes(et),getTableStatePanelChildren=et=>{if(et.id==="table"){const tt=Object.keys(et.config.tableState.columns);return lodash$2.exports.fromPairs(tt.map(nt=>[nt,childPanelFromTableState(et.config.tableState,nt)]))}else if(et.id==="Facet")return{select:childPanelFromTableState(et.config.table,et.config.dims.select)};return null},setTableStatePanelChild=(et,tt,nt)=>{if(et.id==="table")return fn(et,rt=>{rt.config.tableState.columnSelectFunctions[tt]=nt.input_node,rt.config.tableState.columns[tt]={panelId:nt.id,panelConfig:nt.config}});if(et.id==="Facet"){const rt=et.config.dims[tt];if(rt==null)throw new Error("cannot set table state panel child");return fn(et,ot=>{ot.config.table.columnSelectFunctions[rt]=nt.input_node,ot.config.table.columns[rt]={panelId:nt.id,panelConfig:nt.config}})}throw new Error("cannot set table state panel child")},panelChildren=et=>{const tt=et.id;return tt==="Group"?et.config.items:isStandardPanel(tt)?lodash$2.exports.fromPairs(STANDARD_PANEL_CHILD_KEYS[tt].map(nt=>[nt,getFullChildPanel(et.config[nt])])):isTableStatePanel(tt)?getTableStatePanelChildren(et):null};function getConfigForPath(et,tt){if(tt.length===0)return et;const nt=tt[0],rt=panelChildren(et);if(rt==null)throw new Error("Children not found");return getConfigForPath(rt[nt],tt.slice(1))}const nextPanelName=(et,tt)=>{tt=tt??"panel";for(let nt=0;nt<1e3;nt++){const rt=`${tt}${nt}`;if(!et.includes(rt))return rt}throw new Error("Could not find a unique panel name")},makePanel=(et,tt,nt)=>({vars:{},id:et,input_node:nt??voidNode(),config:tt}),makeGroup=(et,tt)=>makePanel("Group",{items:et,...tt}),getPath=(et,tt)=>{if(et=getFullChildPanel(et),tt.length===0)return et;const nt=tt[0];let rt;if(isGroupNode(et))rt=et.config.items[nt];else if(isStandardPanel(et.id))rt=et.config[nt];else if(isTableStatePanel(et.id)){const ot=getTableStatePanelChildren(et);ot!=null&&(rt=ot[nt])}if(rt==null)throw new Error("cannot get children for node");return getPath(rt,tt.slice(1))},setPath=(et,tt,nt)=>{const rt=getFullChildPanel(et);if(tt.length===0)return getFullChildPanel(nt);const ot=setPath(getPath(rt,[tt[0]]),tt.slice(1,tt.length),nt);if(isGroupNode(rt))return fn(rt,st=>{st.config.items[tt[0]]=ot});if(isStandardPanel(rt.id))return fn(rt,st=>{st.config[tt[0]]=ot});if(isTableStatePanel(rt.id))return setTableStatePanelChild(rt,tt[0],ot);throw new Error("cannot set path for node")},addChild=(et,tt,nt)=>{const rt=getPath(et,tt);if(!isGroupNode(rt))throw new Error("Cannot add child to non-group panel");return setPath(et,tt,{...rt,config:{...rt.config,items:{...rt.config.items,[nextPanelName(Object.keys(rt.config.items))]:nt}}})},mapPanels=(et,tt,nt)=>{const rt=getFullChildPanel(et);let ot=rt;if(isGroupNode(rt)){const st={};let ut={};for(const ct of Object.keys(rt.config.items)){const ft=rt.config.items[ct];st[ct]=mapPanels(rt.config.items[ct],pushFrame(tt,ut),nt);const pt=getItemVars(ct,ft,tt,void 0);ut={...ut,...pt}}ot={...rt,config:{...rt.config,items:st}}}else if(isStandardPanel(rt.id)){const st={};for(const ut of Object.keys(STANDARD_PANEL_CHILD_KEYS[rt.id]))st[ut]=mapPanels(rt.config[ut],tt,nt);ot={...rt,config:{...rt.config,...st}}}else isTableStatePanel(rt.id);return nt(ot,tt)},isDashboard=et=>{const tt=getFullChildPanel(et);return isGroupNode(tt)&&tt.config.items.main!=null&&tt.config.items.sidebar!=null},ensureDashboard=et=>{if(isDashboard(et))return et;let tt=et;const nt={layoutMode:"grid",showExpressions:!0,enableAddPanel:!0,gridConfig:{panels:[{id:"panel0",layout:{x:0,y:0,w:24,h:9}}]}},rt=getFullChildPanel(et);return isGroupNode(tt)?tt={...tt,config:{...tt.config,...nt}}:tt=makeGroup({panel0:rt},nt),makeGroup({sidebar:makeGroup({var0:{vars:{},input_node:voidNode(),id:"Expression",config:null}},{layoutMode:"vertical",equalSize:!1,style:"width:300px;",showExpressions:!0,allowedPanels:["Expression","Query","Slider","StringEditor","SelectEditor","DateRange"],enableAddPanel:!0,childNameBase:"var"}),main:tt},{layoutMode:"horizontal"})},ensureDashboardFromItems=(et,tt)=>{const nt={layoutMode:"grid",showExpressions:!0,enableAddPanel:!0,gridConfig:{panels:Object.entries(et).map(([st,ut],ct)=>({id:st,layout:{x:0,y:ct*10,w:24,h:9}}))}},rt=makeGroup(et,nt);Object.keys(tt).length===0&&(tt={var0:voidNode()});const ot=lodash$2.exports.mapValues(tt,(st,ut)=>getFullChildPanel({vars:{},input_node:st,id:"Expression",config:null}));return makeGroup({sidebar:makeGroup(ot,{layoutMode:"vertical",equalSize:!1,style:"width:300px;",showExpressions:!0,allowedPanels:["Expression","Query","Slider","StringEditor","SelectEditor","DateRange"],enableAddPanel:!0,childNameBase:"var"}),main:rt},{layoutMode:"horizontal"})},ensureSimpleDashboard=et=>makeGroup({panel0:getFullChildPanel(et)},{layoutMode:"vertical",showExpressions:!0,enableAddPanel:!0}),PopupMenuComp=({trigger:et,position:tt,items:nt=[],sections:rt=[],onOpen:ot,onClose:st,open:ut})=>{const ct=react.exports.useMemo(()=>{return[...nt,..._$2.flatten(rt.map(ft))];function ft(pt){return[{header:!0,key:pt.label,content:pt.label},...pt.items]}},[nt,rt]);return Wt.createElement(Popup,{basic:!0,on:"click",position:tt,popperModifiers:{preventOverflow:{boundariesElement:"viewport"}},trigger:et,onOpen:ot,onClose:st,open:ut,content:Wt.createElement(Menu,{compact:!0,size:"small",items:ct,secondary:!0,vertical:!0})})},PopupMenu=react.exports.memo(PopupMenuComp),Popup=styled$1(Popup$1)`
  &&& {
    padding: 0;
  }
`,Menu=styled$1(Menu$4)`
  &&&&& {
    padding: 6px;
    .item {
      display: flex;
      align-items: center;
      font-size: 16px;
      line-height: 24px;
      padding: 6px 8px;
      margin: 0;

      &:hover {
        background-color: ${GRAY_50};
      }
      &.header {
        font-weight: 600;
        cursor: auto;
        &:hover {
          background: none;
        }
      }

      svg {
        width: 18px;
        height: 18px;
        margin-right: 8px;
      }
    }
  }
`,Divider=styled$1.div`
  margin: 0 -15px;
  border: 0.5px solid ${MOON_250};
  width: 200%;
`,OutlineItemPopupMenuComp=({config:et,localConfig:tt,path:nt,updateConfig:rt,updateConfig2:ot,goBackToOutline:st,trigger:ut,onClose:ct,onOpen:ft,isOpen:pt})=>{const ht=react.exports.useCallback(xt=>{xt.stopPropagation(),rt(fn(et,At=>{let Ct=At;const $t=nt;for(;$t.length>1;){const Rt=$t.shift();if(Ct.id==="Group")Ct=Ct.config.items[Rt];else if(Ct.id==="LabeledItem")Ct=Ct.config[Rt];else throw new Error(`Outline delete failed: Cannot traverse config for panel id ${Ct.id}`)}const Ot=$t.shift();if(isGroupNode(Ct)){if(delete Ct.config.items[Ot],Ct.config?.gridConfig!=null){const Rt=Ct.config.gridConfig.panels.findIndex(It=>It.id===Ot);Ct.config.gridConfig.panels.splice(Rt,1)}}else if(Ct.id==="LabeledItem")delete Ct.config[Ot];else throw new Error(`Outline delete failed: Cannot traverse config for panel id ${Ct.id} (path = ${Ot})`)})),st?.()},[nt,et,rt,st]),mt=react.exports.useCallback(xt=>{ot(At=>{At=getFullChildPanel(At);const Ct=getPath(At,xt);if(!isGroupNode(Ct))throw new Error("Cannot unnest non-group panel");const $t=Object.keys(Ct.config.items);if($t.length===0)throw new Error("Cannot unnest empty group panel");return setPath(At,xt,Ct.config.items[$t[0]])}),st?.()},[ot,st]),yt=react.exports.useCallback(xt=>{ot(At=>{At=getFullChildPanel(At);const Ct=getPath(At,xt),$t=Ct.input_node,Ot=makePanel("Group",{items:{panel0:Ct,panel1:Ct},layoutMode:"vertical",equalSize:!0},$t);return setPath(At,xt,Ot)}),st?.()},[ot,st]),vt=react.exports.useCallback(xt=>{ot(At=>{At=getFullChildPanel(At);const Ct=getPath(At,xt);return addChild(At,xt.slice(0,-1),Ct)}),st?.()},[ot,st]),Tt=react.exports.useCallback(xt=>{ot(At=>{At=getFullChildPanel(At);const Ct=getPath(At,xt),$t=Ct.input_node,Ot=makePanel("Query",{tableState:emptyTable()},$t),Rt=callOpVeryUnsafe("Query-selected",{self:varNode("any","panel0")});let It=setPath(At,xt,{...Ct,input_node:Rt});return It=ensureDashboard(It),console.log("Query panel",Ot),It=addChild(It,["sidebar"],Ot),It})},[ot]),Et=react.exports.useMemo(()=>{const xt=[];return tt.id==="Group"&&xt.push({key:"unnest",content:"Replace with first child",icon:Wt.createElement(IconRetry,null),onClick:()=>mt(nt)}),xt.push({key:"duplicate",content:"Duplicate",icon:Wt.createElement(IconCopy,null),onClick:()=>vt(nt)}),xt.push({key:"split",content:"Split",icon:Wt.createElement(IconSplit,null),onClick:()=>yt(nt)}),nt.find(At=>At==="main")!=null&&nt.length>1&&xt.push({key:"queryBar",content:"Send to query bar",icon:Wt.createElement(IconBack,null),onClick:()=>Tt(nt)}),xt.push({key:"divider",content:Wt.createElement(Divider,null),disabled:!0}),xt.push({key:"delete",content:"Delete",icon:Wt.createElement(IconDelete,null),onClick:ht}),xt},[Tt,ht,yt,mt,vt,tt.id,nt]);return Wt.createElement(PopupMenu,{trigger:ut,position:"bottom right",items:Et,onClose:ct,onOpen:ft,open:pt})},OutlineItemPopupMenu=react.exports.memo(OutlineItemPopupMenuComp),PanelPanelContext=Wt.createContext({config:{vars:{},input_node:{nodeType:"void",type:"invalid"},id:"",config:void 0},updateConfig:()=>{},updateConfig2:()=>{}}),PanelPanelContextProvider=Wt.memo(({config:et,updateConfig:tt,updateConfig2:nt,children:rt})=>Wt.createElement(PanelPanelContext.Provider,{value:{config:et,updateConfig:tt,updateConfig2:nt}},rt)),usePanelPanelContext=()=>{const et=react.exports.useContext(PanelPanelContext);if(et==null)throw new Error("usePanelInteractContext must be used within a PanelInteractContextProvider");return et},allowPanel=et=>et.includes("projection")||et.includes("maybe")||!et.includes("."),isChildPanelFullConfig=et=>et!=null&&et.id!=null&&et.vars!=null&&et.input_node!=null,getFullChildPanel=et=>et==null?CHILD_PANEL_DEFAULT_CONFIG:isNodeOrVoidNode(et)?{...CHILD_PANEL_DEFAULT_CONFIG,input_node:et}:et,initPanelConfig=async(et,tt,nt,rt)=>{const ot=panelSpecById(tt);if(ot?.initialize!=null)return await ot.initialize(et,nt,rt)},initPanel=async(et,tt,nt,rt,ot)=>{tt=await et.refineNode(tt,ot);const{curPanelId:st}=getPanelStacksForType(tt.type,nt,{allowedPanels:rt,stackIdFilter:allowPanel});return st==null?{vars:{},input_node:voidNode(),id:"",config:void 0}:{vars:{},id:st,input_node:tt,config:await initPanelConfig(et,st,tt,ot)}},mutateEnsureItemIsFullChildPanel=(et,tt)=>{const nt=et[tt];nt==null?et[tt]=CHILD_PANEL_DEFAULT_CONFIG:isNodeOrVoidNode(nt)&&(et[tt]={...CHILD_PANEL_DEFAULT_CONFIG,input_node:nt})},childPanelFromTableState=(et,tt)=>({vars:{},input_node:et.columnSelectFunctions[tt],id:et.columns[tt].panelId,config:et.columns[tt].panelConfig}),CHILD_PANEL_DEFAULT_CONFIG={vars:{},input_node:voidNode(),id:"",config:void 0},useChildPanelConfig=et=>react.exports.useMemo(()=>getFullChildPanel(et),[et]),useChildPanelCommon=et=>{const{updateConfig:tt}=et,nt=useUpdateConfig2(et),rt=useChildPanelConfig(et.config),{id:ot,config:st}=rt;let{input_node:ut}=rt;const ct=useWeaveContext(),{stack:ft,path:pt}=usePanelContext();ut=useNodeWithServerType(ut).result;const{curPanelId:ht,stackIds:mt,handler:yt}=usePanelStacksForType(ut.type,ot,{allowedPanels:et.allowedPanels,stackIdFilter:allowPanel}),vt=react.exports.useMemo(()=>mt.map(Ut=>{const Xt=yt!=null&&Ut.displayName===getStackIdAndName(yt).displayName;return{text:Ut.displayName,value:Ut.id,key:Ut.id,active:Xt,selected:Xt}}),[yt,mt]),Tt=yt!=null?getStackIdAndName(yt).displayName:"",Et=react.exports.useCallback(async Ut=>{const{id:Xt,config:Jt}=await initPanel(ct,rt.input_node,Ut,et.allowedPanels,ft);tt({...rt,id:Xt,config:Jt})},[rt,et.allowedPanels,ft,tt,ct]),xt=react.exports.useCallback(async Ut=>{const{id:Xt,config:Jt}=await initPanel(ct,Ut,void 0,et.allowedPanels,ft);nt(gn=>({...gn,input_node:Ut,id:Xt,config:Jt}))},[et.allowedPanels,ft,nt,ct]),At=react.exports.useCallback(Ut=>{ct.expToString(Ut)!==ct.expToString(ut)&&(isAssignableTo(Ut.type,yt?.inputType??"invalid")?nt(Xt=>({...Xt,input_node:Ut})):ht==="Each"?nt(Xt=>({...Xt,input_node:Ut})):et.allowedPanels!=null&&ht==="Expression"?nt(Xt=>({...Xt,input_node:Ut,id:"Expression",config:void 0})):xt(Ut))},[ct,ut,yt?.inputType,ht,et.allowedPanels,nt,xt]);let Ct=react.exports.useCallback(Ut=>{let Xt;filterNodes(Ut,gn=>gn.nodeType==="var"&&gn.varName==="input").length===0?Xt=Ut:Xt=ct.callFunction(Ut,{input:ut}),(async()=>{try{const gn=await ct.refineNode(Xt,ft);At(gn)}catch(gn){return Promise.reject(gn)}return Promise.resolve()})().catch(gn=>{throw console.error("PanelExpression error",gn),new Error(gn)})},[ut,ct,ft,At]);et.passthroughUpdate&&(Ct=et.updateInput);const $t=react.exports.useCallback((Ut,Xt)=>{nt(Jt=>({...Jt,vars:{...Jt.vars,[Ut]:Xt}}))},[nt]),Ot=react.exports.useCallback(Ut=>{nt?.(Xt=>(Xt=getFullChildPanel(Xt),{...Xt,id:ht??"",config:{...Xt.config,...Ut(Xt.config)}}))},[nt,ht]),Rt=react.exports.useCallback(Ut=>tt({...rt,id:ht??"",config:{...rt.config,...Ut}}),[rt,tt,ht]),It=react.exports.useMemo(()=>({...rt.vars,input:ut}),[rt.vars,ut]),kt=react.exports.useMemo(()=>et.pathEl!=null?pt.concat([et.pathEl]):pt,[pt,et.pathEl]),Mt=usePanelInputExprIsHighlightedByPath(kt),Ft=useSetPanelInputExprIsHighlighted(),zt=react.exports.useCallback((Ut,Xt,Jt)=>{if(Ut==="input")Jt.id==="hover"?Ft(kt,!0):Jt.id==="unhover"?Ft(kt,!1):Jt.id==="mutate"&&At(replaceChainRoot(ut,Jt.newRootNode));else{if(rt.vars[Ut]==null)throw new Error("Received var event for var we don't have "+Ut);Jt.id==="mutate"&&$t(Ut,replaceChainRoot(rt.vars[Ut],Jt.newRootNode))}},[rt.vars,ut,kt,Ft,$t,At]),Vt=react.exports.useMemo(()=>varNode(ut.type,"input"),[ut.type]),Zt=useSetInspectingChildPanel();return react.exports.useMemo(()=>({curPanelId:ht,handler:yt,panelConfig:st,panelInputExpr:ut,panelInput:Vt,stackIds:mt,newVars:It,panelOptions:vt,curPanelName:Tt,inputHighlighted:Mt,updateExpression:At,handlePanelChange:Et,handleVarEvent:zt,updatePanelConfig:Rt,updatePanelConfig2:Ot,updatePanelInput:Ct,setInspectingPanel:Zt}),[ht,yt,st,ut,Vt,mt,It,vt,Tt,Mt,At,Et,zt,Rt,Ot,Ct,Zt])},ChildPanel=et=>{const{panelInput:tt,panelConfig:nt,handler:rt,curPanelId:ot,newVars:st,panelOptions:ut,panelInputExpr:ct,handlePanelChange:ft,handleVarEvent:pt,updateExpression:ht,updatePanelConfig:mt,updatePanelConfig2:yt,updatePanelInput:vt,setInspectingPanel:Tt}=useChildPanelCommon(et),{frame:Et}=usePanelContext(),xt=react.exports.useCallback(gn=>isValidVarName(gn)&&Et[gn]==null,[Et]),[At,Ct]=react.exports.useState(!1),[$t,Ot]=react.exports.useState(!1),[Rt,It]=react.exports.useState(!1),kt=react.exports.useCallback(()=>{It(!0)},[]),Mt=react.exports.useCallback(()=>{It(!1)},[]),{config:Ft,updateConfig:zt,updateConfig2:Vt}=usePanelPanelContext(),{path:Zt}=usePanelContext(),Ut=[...Zt,et.pathEl??""].filter(gn=>gn!=null&&gn!==""),{ref:Xt,width:Jt}=useElementWidth();return ot==null||rt==null?Wt.createElement("div",null,"No panel for type ",defaultLanguageBinding.printType(tt.type)):Wt.createElement(Main,{"data-weavepath":et.pathEl??"root",onMouseEnter:()=>Ct(!0),onMouseLeave:()=>Ct(!1)},(et.controlBar==="titleBar"||et.controlBar==="editable")&&Wt.createElement(EditorBar,null,Wt.createElement(EditorBarContent,{className:"edit-bar",ref:Xt},et.prefixHeader,et.pathEl!=null&&Wt.createElement(EditorPath,null,Wt.createElement(ValidatingTextInput,{dataTest:"panel-expression-path",onCommit:et.updateName??(()=>{}),validateInput:xt,initialValue:et.pathEl,maxWidth:Jt!=null?Jt/3:void 0,maxLength:24})," ",et.controlBar==="editable"&&"= "),et.controlBar==="editable"&&ot!=="Expression"&&ot!=="RootBrowser"&&Wt.createElement(PanelNameEditor$1,{value:ot??"",autocompleteOptions:ut,setValue:ft}),et.controlBar==="editable"?Wt.createElement(EditorExpression,{"data-test":"panel-expression-expression"},Wt.createElement(WeaveExpression,{expr:ct,setExpression:ht,noBox:!0,truncate:!Rt,onFocus:kt,onBlur:Mt})):Wt.createElement("div",{style:{width:"100%"}}),Wt.createElement(EditorIcons,{visible:At||$t},et.prefixButtons,Wt.createElement(Tooltip,{position:"top center",trigger:Wt.createElement(IconButton$3,{"data-test":"panel-config",onClick:()=>Tt(et.pathEl??"")},Wt.createElement(IconPencilEdit,null))},"Open panel editor"),Wt.createElement(OutlineItemPopupMenu,{config:Ft,localConfig:getConfigForPath(Ft,Ut),path:Ut,updateConfig:zt,updateConfig2:Vt,trigger:Wt.createElement(IconButton$3,null,Wt.createElement(IconOverflowHorizontal$1,null)),onOpen:()=>Ot(!0),onClose:()=>Ot(!1),isOpen:$t})))),Wt.createElement(PanelContainer,null,Wt.createElement(PanelContextProvider,{newVars:st,handleVarEvent:pt,newPath:et.pathEl},et.controlBar==="titleBar"&&isChildPanelFullConfig(et.config)&&ot==="Expression"?Wt.createElement("div",{style:{paddingLeft:16,paddingRight:16}},Wt.createElement(WeaveExpression,{expr:ct,setExpression:ht,noBox:!0,truncate:!Rt,onFocus:kt,onBlur:Mt})):Wt.createElement(Panel,{input:tt,panelSpec:rt,config:nt,updateConfig:mt,updateConfig2:yt,updateInput:vt}))))},NEW_INSPECTOR_IMPLEMENTED_FOR=new Set(["plot","histogram","row","Group","Each","EachColumn","Facet","FacetTabs","LabeledItem","Sections"]),ChildPanelConfigComp=et=>{const{newVars:tt,panelInputExpr:nt,panelInput:rt,panelConfig:ot,handler:st,curPanelId:ut,panelOptions:ct,handleVarEvent:ft,handlePanelChange:pt,updateExpression:ht,updatePanelConfig:mt,updatePanelConfig2:yt,updatePanelInput:vt}=useChildPanelCommon(et),Tt=react.exports.useMemo(()=>getFullChildPanel(et.config),[et.config]),Et=useSelectedPath(),{path:xt}=usePanelContext(),At=react.exports.useMemo(()=>["<root>",...xt,et.pathEl].filter(It=>It!=null).join("."),[xt,et.pathEl]),Ct=react.exports.useMemo(()=>(consoleLog(`selectedPath = ${JSON.stringify(Et)}`),Et.length===1&&Et[0]===""?"<root>":["<root>",...Et].join(".")),[Et]);if(!Ct.startsWith(At)&&!At.startsWith(Ct))return Wt.createElement(Wt.Fragment,null);const $t=At!=="<root>"&&At.startsWith(Ct),Ot=$t?Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Type"},Wt.createElement(ModifiedDropdownConfigField,{value:ut,options:ct,onChange:(Rt,{value:It})=>{typeof It=="string"&&It&&pt(It)}})),Wt.createElement(VariableEditor,{config:Tt,updateConfig:mt}),ut!=="Group"&&Wt.createElement(ConfigOption,{label:"Input",multiline:!0},Wt.createElement(PanelContextProvider,{newVars:Tt.vars,handleVarEvent:ft},Wt.createElement(ExpressionConfigField,{expr:nt,setExpression:ht})))):null;return ut==null||st==null?Wt.createElement(Wt.Fragment,null,Ot,Wt.createElement("div",null,"No panel for type ",defaultLanguageBinding.printType(rt.type))):Wt.createElement(Wt.Fragment,null,!NEW_INSPECTOR_IMPLEMENTED_FOR.has(st.id)&&Ot!=null&&Wt.createElement(ConfigSection,{label:"Properties"},Ot),Wt.createElement(PanelContextProvider,{newVars:tt,newPath:et.pathEl,handleVarEvent:ft,dashboardConfigOptions:Ot},Wt.createElement(PanelConfigEditor,{input:rt,panelSpec:st,config:ot,updateConfig:mt,updateConfig2:yt,updateInput:$t?et.updateInput:vt})))},nextVarName=et=>{for(let tt=0;tt<26;tt++){const nt=String.fromCharCode(97+tt);if(et[nt]==null)return nt}return ID$1()},MinimalEditableField=styled$1(EditableField)`
  margin: 0;
`,VariableEditor=({config:et,updateConfig:tt})=>{const rt={...{}};return Wt.createElement(ConfigOption,{label:"variables"},Wt.createElement("div",null,lodash$2.exports.map(et.vars,(ot,st)=>{const ut=Wt.createElement("div",{key:st,style:{display:"flex",alignItems:"center"}},Wt.createElement(MinimalEditableField,{value:st,placeholder:"var",save:ct=>{const ft={};for(const[pt,ht]of Object.entries(et.vars))pt===st?ft[ct]=ht:ft[pt]=ht;tt({...et,vars:ft})}}),Wt.createElement("div",{style:{marginRight:4,marginLeft:4}},"= "),Wt.createElement("div",{style:{flexGrow:1}},Wt.createElement(PanelContextProvider,{newVars:{...rt}},Wt.createElement(WeaveExpression,{expr:ot,noBox:!0,setExpression:ct=>tt({...et,vars:{...et.vars,[st]:ct}})}))));return rt[st]=ot,ut}),Wt.createElement("div",{style:{cursor:"pointer",color:linkHoverBlue},onClick:()=>tt({...et,vars:{...et.vars,[nextVarName(et.vars)]:voidNode()}})})))},VariableView=({newVars:et})=>{const tt=et,nt=useWeaveContext();return Wt.createElement(Wt.Fragment,null,lodash$2.exports.map(tt,(rt,ot)=>Wt.createElement(ConfigOption,{key:ot,label:lodash$2.exports.capitalize(ot)},nt.expToString(rt))))},useChildPanelProps=(et,tt)=>{const{config:nt,updateConfig2:rt}=et;if(nt==null)throw new Error("null config invalid for child panel");if(rt==null)throw new Error("null updateConfig2 invalid for child panel");const ot=react.exports.useCallback(ut=>rt(ct=>(console.log("1. NEW ITEM CONFIG",ut),{...ct,[tt]:ut})),[rt,tt]),st=react.exports.useCallback(ut=>{rt(ct=>{const ft=ut(ct[tt]);return console.log("NEW ITEM CONFIG",ft),{...ct,panel:ft}})},[rt,tt]);return{pathEl:tt,config:nt[tt],updateConfig:ot,updateConfig2:st}},EditorBarContent=styled$1.div`
  display: flex;
  align-items: flex-start;
  width: calc(100% + 16px);
  flex-shrink: 0;
  position: relative;
  left: -8px;
  padding: 0 16px 8px;
  border-bottom: 1px solid ${GRAY_350};
  line-height: 20px;
`,EditorPath=styled$1.div`
  white-space: nowrap;
  margin-right: 8px;

  input {
    font-family: inherit;
  }
`,EditorExpression=styled$1.div`
  flex-grow: 1;
  margin-left: 4px;
  overflow: hidden;
  &:hover {
    background-color: ${GRAY_50};
  }
`,EditorIcons=styled$1.div`
  height: 20px;
  display: flex;
  align-items: center;
  margin-left: 8px;
  visibility: ${et=>et.visible?"visible":"hidden"};
`,PanelContainer=styled$1.div`
  flex-grow: 1;
  overflow-y: auto;
`;function useElementWidth(){const[et,tt]=react.exports.useState(null),nt=react.exports.useRef(null);return react.exports.useLayoutEffect(()=>{if(nt.current==null)return;const rt=new ResizeObserver(ot=>{const st=ot[0];if(st==null)return;const ut=st.contentBoxSize[0].inlineSize;tt(ut)});return rt.observe(nt.current),()=>rt.disconnect()},[nt.current]),{ref:nt,width:et}}const inputType$14={type:"list",objectType:"any"};function defaultFacet(){let et=emptyTable();et=appendEmptyColumn(et);const tt=et.order[et.order.length-1];et=appendEmptyColumn(et);const nt=et.order[et.order.length-1];et=appendEmptyColumn(et);const rt=et.order[et.order.length-1];et=appendEmptyColumn(et);const ot=et.order[et.order.length-1];return et={...et,groupBy:[tt,nt]},et={...et,sort:[{columnId:tt,dir:"asc"},{columnId:nt,dir:"asc"}]},{table:et,dims:{x:tt,y:nt,select:rt,detail:ot},padding:0,manualSize:!1,cellSize:{w:200,h:20}}}const useConfig$3=et=>react.exports.useMemo(()=>et==null||et.dims==null||et.dims.select==null?defaultFacet():et,[et]),DimConfig=et=>{const tt=useWeaveContext(),{colId:nt,tableConfig:rt,input:ot,updateTableConfig:st}=et,ut=ot,ct=react.exports.useCallback(ht=>{st(updateColumnSelect(rt,nt,ht))},[st,rt,nt]),{rowsNode:ft}=react.exports.useMemo(()=>tableGetResultTableNode(rt,ut,tt),[rt,ut,tt]),pt=react.exports.useMemo(()=>getCellFrame(ut,ft,rt.groupBy,rt.columnSelectFunctions,nt),[nt,ut,ft,rt.columnSelectFunctions,rt.groupBy]);return Wt.createElement(PanelContextProvider,{newVars:pt},Wt.createElement(ExpressionConfigField,{expr:rt.columnSelectFunctions[nt],setExpression:ct}))},PanelFacetConfig=et=>{const{input:tt,updateConfig:nt,updateConfig2:rt}=et,ot=useWeaveContext(),{dashboardConfigOptions:st}=usePanelContext(),ut=useConfig$3(et.config),ct=react.exports.useCallback(Et=>{nt({...ut,...Et})},[ut,nt]),ft=ut.table,pt=react.exports.useCallback(Et=>ct({table:Et}),[ct]),ht=ft.columnSelectFunctions[ut.dims.select],mt=react.exports.useMemo(()=>{const Et=tableGetColumnVars(ft,tt,ot);return{...Et,facetItem:Et.row}},[tt,ft,ot]),yt=ft.columns[ut.dims.select],{stackIds:vt,curPanelId:Tt}=usePanelStacksForType(ht.type,yt.panelId,{excludeTable:!0});return console.log("PANEL INFO",ht.type,yt.panelId,vt,Tt),Wt.createElement(ConfigSection,{label:"Properties"},st,Wt.createElement(ConfigOption,{label:"x"},Wt.createElement(DimConfig,{dimName:"x",colId:ut.dims.x,input:tt,tableConfig:ft,updateTableConfig:pt})),Wt.createElement(ConfigOption,{label:"y"},Wt.createElement(DimConfig,{dimName:"y",colId:ut.dims.y,input:tt,tableConfig:ft,updateTableConfig:pt})),Wt.createElement(ChildConfigContainer,null,Wt.createElement(PanelContextProvider,{newVars:mt},Wt.createElement(ChildPanelConfigComp,{pathEl:"select",config:{vars:yt.panelVars??{},input_node:ut.table.columnSelectFunctions[ut.dims.select],id:yt.panelId,config:yt.panelConfig},updateConfig:Et=>{let xt=updateColumnPanelConfig(ft,ut.dims.select,Et.config);xt=updateColumnSelect(xt,ut.dims.select,Et.input_node),xt=updateColumnPanelId(xt,ut.dims.select,Et.id),pt(xt)},updateConfig2:Et=>{rt?.(xt=>{const At={vars:{},input_node:xt.table.columnSelectFunctions[xt.dims.select],id:xt.table.columns[xt.dims.select].panelId,config:xt.table.columns[xt.dims.select].panelConfig},Ct=Et(At);let $t=updateColumnPanelConfig(xt.table,ut.dims.select,Ct.config);return $t=updateColumnSelect($t,ut.dims.select,Ct.input_node),$t=updateColumnPanelId($t,ut.dims.select,Ct.id),{table:$t}})}}))))},Spec$16={id:"Facet",initialize:(et,tt)=>defaultFacet(),ConfigComponent:Wt.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>Component),void 0).then(et=>({default:et.PanelFacetConfig}))),Component:Wt.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>Component),void 0)),inputType:inputType$14,hidden:!0},inputType$13={type:"file",extension:"ipynb"},Spec$15={id:"jupyter",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.05eef7ed.js"),[])),inputType:inputType$13},inputType$12={type:"union",members:["md","markdown"].map(et=>({type:"file",extension:et}))},Spec$14={id:"markdown",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.119e9c8a.js"),[])),inputType:inputType$12},IMAGE_FILE_EXTENSIONS=["jpg","jpeg","png","tiff","tif","gif"],inputType$11={type:"union",members:IMAGE_FILE_EXTENSIONS.map(et=>({type:"file",extension:et}))},Spec$13={id:"rawimage",displayName:"Image",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.294baeb1.js"),[])),inputType:inputType$11},EXTENSION_INFO$1={log:"text",text:"text",txt:"text",markdown:"markdown",md:"markdown",patch:"diff",ipynb:"python",py:"python",yml:"yaml",yaml:"yaml",xml:"xml",html:"html",htm:"html",json:"json",css:"css",js:"js",sh:"sh"},inputType$10={type:"union",members:Object.keys(EXTENSION_INFO$1).map(et=>({type:"file",extension:et,wbObjectType:"none"}))},processTextForDisplay=(et,tt,nt,rt)=>{let ot=tt?.split?.(`
`),st=!1,ut=!1;if(et==="json"&&ot.length===1||ot.length===2&&ot[1]==="")try{const ct=JSON.parse(ot[0]);ot=JSON.stringify(ct,void 0,2)?.split?.(`
`)}catch{}if(et==="ipynb")try{const ct=JSON.parse(tt);let ft="";ct.cells.forEach(pt=>{ft+=`# %%
`,ft+=pt.source.join("")+`
`}),ot=ft.split(`
`)}catch{}return ot=ot.map(ct=>ct.length>nt?(st=!0,ct.slice(0,nt)+` ... (line truncated to ${nt} characters)`):ct),ot.length>rt&&(ut=!0,ot=[...ot.slice(0,rt),"...",`(truncated to ${rt} lines)`]),{text:ot.join(`
`),truncatedLineLength:st,truncatedTotalLines:ut}},Spec$12={id:"text",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.5f88040f.js"),[])),inputType:inputType$10},inputType$$={type:"union",members:Object.keys(EXTENSION_INFO$1).map(et=>({type:"list",objectType:{type:"file",extension:et,wbObjectType:"none"}}))},Spec$11={id:"textdiff",displayName:"File Diff",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.7bb513c3.js"),[])),inputType:inputType$$};function useExtentFromData(et){const tt=react.exports.useMemo(()=>opArray({0:opNumbersMin({numbers:et}),1:opNumbersMax({numbers:et})}),[et]),nt=useNodeValue(tt);return react.exports.useMemo(()=>nt.loading?[void 0,void 0]:nt.result,[nt])}function defaultConfig$2(){return{mode:"auto"}}const inputType$_={type:"list",objectType:{type:"union",members:["none","number"]}};function getBinConfig(et,tt){const nt=et.extent?.[0]??tt[0],rt=et.extent?.[1]??tt[1],ot=nt!=null&&rt!=null?[nt,rt]:void 0,st=(rt??1)-(nt??1),ut={extent:ot};return et.mode==="bin-size"?ut.step=et.binSize??st/10:et.mode==="num-bins"&&(ut.step=st/(et.nBins??10)),ut}function getVegaHistoSpec(et,tt,nt){return{$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple histogram",data:{name:"wandb"},title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{x:{bin:getBinConfig(et,nt),type:"quantitative",field:"${field:value}",axis:{title:null}},y:{aggregate:"count",stack:tt?!0:null,axis:{title:null}},...tt?{color:{type:"nominal",field:"color",legend:!1,scale:{range:{field:"color"}}}}:{},opacity:{value:tt?.7:1}},background:"rgba(0,0,0,0)",width:"container",height:"container",autosize:{type:"fit",contains:"content"}}}const PanelHistogram=et=>{const tt=et.config??defaultConfig$2(),nt=useColorNode(et.input),rt=useNodeValue(nt),ot=nt.nodeType!=="void",{ref:st,inView:ut}=useInView(),ct=useGatedValue(ut,mt=>mt),ft=useNodeValue(et.input),pt=react.exports.useMemo(()=>ft.loading||ot&&rt.loading?[]:ot?ft.result.map((mt,yt)=>({value:mt,color:rt.result[yt]??"#94aecb"})):ft.result.map(mt=>({value:mt})),[ft,ot,rt]),ht=useExtentFromData(et.input);return pt.length===0?Wt.createElement(Wt.Fragment,null,"-"):Wt.createElement("div",{ref:st,style:{width:"100%",height:"100%"}},!ft.loading&&ct?Wt.createElement(CustomPanelRenderer,{spec:getVegaHistoSpec(tt,ot,ht),loading:!1,slow:!1,data:pt,userSettings:{fieldSettings:{value:"value"},stringSettings:{title:""}}}):Wt.createElement("div",{style:{backgroundColor:"#eee",width:"100%",height:"100%"}}))},PanelHistogramConfig=et=>{const{updateConfig:tt}=et,{dashboardConfigOptions:nt}=usePanelContext(),rt=et.config??defaultConfig$2(),ot=[0,1],st=rt.mode==="auto"?Wt.createElement(Wt.Fragment,null):rt.mode==="bin-size"?Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Bin size"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,allowAdditions:!0,value:rt.binSize??"Auto",options:["Auto"].map(ut=>({key:ut,value:ut,text:ut})),onChange:(ut,{value:ct})=>{let ft=ct==="Auto"?void 0:Math.max(0,Number(ct));isNaN(ft??NaN)&&(ft=void 0),tt({binSize:ft})}}))):rt.mode==="num-bins"?Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Number of bins"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,allowAdditions:!0,value:rt.nBins??"Default",options:["Default",10,25,50,100,250,500].map(ut=>({key:ut,value:ut,text:ut})),onChange:(ut,{value:ct})=>{let ft=ct==="Default"?void 0:Math.round(Math.max(1,Math.min(1e3,Number(ct))));isNaN(ft??NaN)&&(ft=void 0),tt({nBins:ft})}}))):Wt.createElement(Wt.Fragment,null);return Wt.createElement(ConfigSection,{label:"Properties"},nt,Wt.createElement(ConfigOption,{label:"Bin mode"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,value:rt.mode??"auto",options:[["auto","Auto"],["bin-size","Bin size"],["num-bins","Number of bins"]].map(ut=>({key:ut[0],value:ut[0],text:ut[1]})),onChange:(ut,{value:ct})=>{tt({mode:ct})}})),st,Wt.createElement(ConfigOption,{label:"Min extent"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,allowAdditions:!0,value:rt.extent?.[0]??"Auto",options:["Auto",0].map(ut=>({key:ut,value:ut,text:ut})),onChange:(ut,{value:ct})=>{let ft=ct==="Auto"?void 0:Math.min(rt.extent?.[1]??1/0,Number(ct));isNaN(ft??NaN)&&(ft=void 0),tt({extent:[ft,rt.extent?.[0]]})}})),Wt.createElement(ConfigOption,{label:"Max extent"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,allowAdditions:!0,value:rt.extent?.[1]??"Auto",options:["Auto",Math.pow(10,Math.ceil(Math.log10(ot?.[1]??1)))].map(ut=>({key:ut,value:ut,text:ut})),onChange:(ut,{value:ct})=>{let ft=ct==="Auto"?void 0:Math.max(rt.extent?.[0]??-1/0,Number(ct));isNaN(ft??NaN)&&(ft=void 0),tt({extent:[rt.extent?.[0],ft]})}})))},Spec$10={id:"histogram",ConfigComponent:PanelHistogramConfig,Component:PanelHistogram,inputType:inputType$_,canFullscreen:!0},inputType$Z={type:"html-file"},Spec$$={id:"html-file",displayName:"Html",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.82651f4e.js"),[])),inputType:inputType$Z,canFullscreen:!0},inputType$Y={type:"dict",objectType:{type:"union",members:["none","id"]}},PanelIdCompare=et=>{const tt=useNodeValue(et.input);return tt.loading?Wt.createElement("div",null,"-"):Wt.createElement("div",null,Object.entries(tt.result).map(([nt,rt])=>Wt.createElement("div",{key:nt},nt,": ",rt==null?"none":""+rt)))},Spec$_={id:"id-compare",Component:PanelIdCompare,inputType:inputType$Y},inputType$X={type:"list",objectType:{type:"dict",objectType:{type:"union",members:["none","id"]}}},PanelIdCompareCount=et=>{const tt=useNodeValue(et.input);if(tt.loading)return Wt.createElement("div",null,"-");const nt={},rt=tt.result;if(rt.length>0){for(const ot of Object.keys(rt[0]))nt[ot]=0;for(const ot of rt)for(const st of Object.keys(ot))nt[st]+=ot[st]!=null?1:0}return Wt.createElement("div",null,lodash$2.exports.map(nt,(ot,st)=>Wt.createElement("div",{key:st},st,": ",ot," ids")))},Spec$Z={id:"id-compare-count",Component:PanelIdCompareCount,inputType:inputType$X},inputType$W={type:"list",objectType:{type:"union",members:["none","id"]}},PanelIdCount=et=>{const tt=opCount({arr:et.input}),nt=useNodeValue(tt);return nt.loading?Wt.createElement("div",null,"-"):Wt.createElement("div",null,nt.result," ids")},Spec$Y={id:"id-count",Component:PanelIdCount,inputType:inputType$W},HelpPopup=et=>{const tt=Wt.createElement(Popup$1,{inverted:!0,size:"mini",className:"help-popup-content",trigger:Wt.createElement(Icon$4,{name:"help circle",size:"small"}),content:et.helpText}),nt=et.docUrl!=null?Wt.createElement(TargetBlank,{href:et.docUrl},tt):tt;return Wt.createElement("span",{className:"help-popup"},nt)},ShowMoreContainerComp=et=>{const[tt,nt]=react.exports.useState(!1),ot={size:et.iconSize,onClick:()=>nt(!tt)};return Wt.createElement("div",{className:et.className??"",style:{display:"flex",maxWidth:600}},Wt.createElement(LegacyWBIcon,{...ot,name:"next",style:{cursor:"pointer",transform:tt?"rotate(90deg)":"rotate(0deg)"},className:"open show-more-container-toggle"}),Wt.createElement("div",{style:{maxHeight:tt?void 0:32,overflow:"hidden"}},et.children))},ShowMoreContainer=Wt.memo(ShowMoreContainerComp);function fuzzyMatchRegex(et){let tt="";for(let nt=0;nt<et.length;nt++)tt+=escapeRegExp(et.substring(nt,nt+1)),tt+=".*";return new RegExp(tt,"i")}function escapeRegExp(et){return et.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function indexMap(et){const tt={};return _$2.forEach(et,(nt,rt)=>{tt[nt]=tt[nt]||[],tt[nt].push(rt)}),tt}function longestCommonSubstring(et,tt){const nt={startString1:0,startString2:0,length:0},rt=indexMap(et);let ot=[];return _$2.forEach(tt,(st,ut)=>{let ct;const ft=[];(rt[st]||[]).forEach(ht=>{ct=(ht&&ot[ht-1]||0)+1,ct>nt.length&&(nt.length=ct,nt.startString1=ht-ct+1,nt.startString2=ut-ct+1),ft[ht]=ct}),ot=ft}),nt}function fuzzyMatchScore(et,tt){return longestCommonSubstring(et,tt).length}function fuzzyMatchWithMapping(et,tt,nt){if(!tt)return et;const ot=et.filter(ut=>nt(ut).match(fuzzyMatchRegex(tt))).map(ut=>({obj:ut,score:-1*fuzzyMatchScore(nt(ut),tt)})),st=_$2.sortBy(ot,["score"]);return preferExactMatch(st.map(ut=>ut.obj),tt,nt)}function fuzzyMatchSplit(et,tt){const nt=et.toLowerCase(),rt=tt.toLowerCase(),ot=[];let st=0;for(let ut=0;st<et.length&&ut<tt.length;){const ct=st;for(;st<et.length&&rt[ut]!==nt[st];st++);ot.push(et.substring(ct,st));const ft=st;for(;st<et.length&&rt[ut]===nt[st];st++,ut++);ot.push(et.substring(ft,st))}return st<et.length&&ot.push(et.substring(st)),ot}function fuzzyMatchHighlightPieces(et,tt={fontWeight:"bold"}){return et.length===1?et[0]:Wt.createElement(Wt.Fragment,null,et.map((nt,rt)=>rt%2?Wt.createElement("span",{key:rt,className:"fuzzy-match",style:tt},nt):Wt.createElement("span",{key:rt},nt)))}function fuzzyMatchHighlight(et,tt,nt={fontWeight:"bold"}){return fuzzyMatchHighlightPieces(fuzzyMatchSplit(et,tt),nt)}function preferExactMatch(et,tt,nt=rt=>typeof rt=="string"?rt:JSON.stringify(rt)){return _$2.sortBy(et,rt=>nt(rt).toLowerCase()===tt.toLowerCase()?0:1)}const styleOptions=[{key:"line",icon:"line-solid"},{key:"dotted",icon:"line-dot"},{key:"dashed",icon:"line-dash"}],ControlsBoxStyle=({box:et,updateBox:tt})=>{const nt=styleOptions.find(rt=>rt.key===et.lineStyle)||styleOptions[0];return Wt.createElement(Popup$1,{offset:-12,className:"control-box-popup",on:"click",trigger:Wt.createElement(LegacyWBIcon,{name:nt.icon,className:"control-box-picker"}),content:Wt.createElement(Button$3.Group,{className:"control-box-buttons"},styleOptions.map(rt=>Wt.createElement(Button$3,{key:rt.key,size:"tiny",active:rt.key===et.lineStyle,className:"wb-icon-button only-icon",onClick:()=>{tt({lineStyle:rt.key})}},Wt.createElement(LegacyWBIcon,{name:rt.icon}))))})},ControlsBox=({box:et,updateBox:tt})=>{if(et.type!=="box")throw new Error("Invalid box control.");return Wt.createElement(ControlsBoxStyle,{box:et,updateBox:tt})},AllClassToggle=styled$1.a`
  font-size: 13px;
`,Wrapper=styled$1.div`
  margin: 24px 0;
`,Header$2=styled$1.div`
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  flex-flow: row wrap;
  width: 100%;
  position: relative;
  padding-left: 24px;
`,ActionsWrapper=styled$1.div`
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
`,LabelToggleWrapper=styled$1.div`
  display: flex;
  width: 100%;
  align-items: center;
  margin-left: -5px;
  font-size: 14px;
`,TitleWrapper=styled$1.div`
  display: flex;
  align-items: center;
  min-height: 30px;
  margin-right: 16px;
`,VisibilityToggleWrapper=styled$1.div`
  position: absolute;
  top: 7px;
  left: 0;
`,SearchWrapper=styled$1.div`
  margin-left: -14px;
`,boxColor=et=>colorN(et,ROBIN16);function compare(et,tt,nt){return et==="gte"?tt>=nt:tt<=nt}const useAssetURLFromArtifact=(et,tt)=>{const nt=useNodeValue(et),rt=react.exports.useMemo(()=>nt.loading?voidNode():opArtifactVersionFile({artifactVersion:opAssetArtifactVersion({asset:et}),path:constString(nt.result.path)}),[et,nt]),{signedUrl:ot}=useSignedUrlWithExpiration(rt,tt?24*60*60*1e3:60*1e3);return{loading:nt.loading||ot==null,asset:nt.result,directUrl:ot}},useAssetContentFromArtifact=et=>{const tt=useNodeValue(et),nt=react.exports.useMemo(()=>opAssetArtifactVersion({asset:et}),[et]),rt=react.exports.useMemo(()=>tt.loading?voidNode():opFileContents({file:opArtifactVersionFile({artifactVersion:nt,path:constString(tt.result.path)})}),[nt,tt]),ot=useNodeValue(rt);return{loading:tt.loading||ot.loading,asset:tt.result,contents:ot.result}},useDirectUrlNodeWithExpiration=(et,tt)=>{const nt=react.exports.useRef(),rt=react.exports.useRef(),ot=react.exports.useRef();return react.exports.useMemo(()=>{const st=new MemoizedHasher,ut=Date.now();return(!(nt.current===et||et.nodeType!=="void"&&nt.current!=null&&st.typedNodeId(et)===st.typedNodeId(nt.current))||rt.current==null||ot.current==null||ut-ot.current>tt)&&(et.nodeType!=="void"?(nt.current=et,ot.current=ut,rt.current=opFileDirectUrlAsOf({file:et,asOf:constNumber(ut)})):rt.current=voidNode()),rt.current},[et,tt,nt,rt,ot])},useSignedUrlWithExpiration=(et,tt)=>{const[nt,rt]=react.exports.useState(null),ot=useDirectUrlNodeWithExpiration(et,tt),st=useNodeValue(ot);return react.exports.useEffect(()=>{(async()=>{if(st.result!=null){if(!st.result.includes("/artifactsV2/")){rt(st.result);return}const ft=await(await fetch(st.result+"?redirect=false",{credentials:"include",method:"GET",mode:"cors",headers:{"use-admin-privileges":"true"}})).json();if(ft.url!=null)rt(ft.url);else throw new Error("Failed to get signed URL")}})()},[st.result]),{signedUrl:nt,loading:st.loading}},DEFAULT_ALL_MASK_CONTROL={disabled:!1,opacity:.6},DEFAULT_CLASS_MASK_CONTROL={disabled:!1,opacity:1},DEFAULT_CLASS_COLOR=[0,0,0,0],DEFAULT_TILE_LAYOUT="ALL_STACKED",defaultHideImageState=et=>et!=null&&et!=="ALL_STACKED",CardImage=({image:et,imageFileNode:tt,masks:nt,boundingBoxes:rt,classSets:ot,boxControls:st,maskControls:ut,boxSliders:ct,hideImage:ft})=>{const pt=react.exports.useMemo(()=>opAssetFile({asset:tt}),[tt]),{signedUrl:ht}=useSignedUrlWithExpiration(pt,60*1e3),mt={position:"absolute",height:"100%",width:"100%"};return Wt.createElement("div",{"data-test":"card-image",style:{height:"100%",width:"100%",position:"relative"}},ht==null?Wt.createElement("div",null):Wt.createElement(Wt.Fragment,null,!ft&&Wt.createElement("img",{style:{...mt,objectFit:"contain"},alt:et.path,src:ht}),nt!=null&&ut?.map((yt,vt)=>{const Tt=nt[vt];if(yt!=null){const Et=(ot??{})[yt.classSetID];return Wt.createElement(SegmentationMaskFromCG,{key:vt,style:mt,filePath:Tt,mediaSize:{width:et.width,height:et.height},maskControls:yt,classSet:Et})}}),rt!=null&&st?.map((yt,vt)=>{if(yt!=null){const Tt=ot?.[yt.classSetID];return Wt.createElement(BoundingBoxes,{key:vt,style:mt,bboxControls:yt,boxData:rt[vt],mediaSize:{width:et.width,height:et.height},classSet:Tt,sliderControls:ct})}})))},drawImageData=(et,tt)=>{const nt=et.getContext("2d");if(nt==null)throw new Error("Can't get context in image render");nt.putImageData(tt,0,0)},drawSegmentation=(et,tt)=>{const{width:nt,height:rt}=et,ot=new ImageData(nt,rt);for(let st=0;st<nt;st++)for(let ut=0;ut<rt;ut++){const ct=st*4+ut*4*nt,ft=et.data[ct],pt=tt[ft]||DEFAULT_CLASS_COLOR,[ht,mt,yt,vt]=pt;ot.data[ct]=ht,ot.data[ct+1]=mt,ot.data[ct+2]=yt,ot.data[ct+3]=vt}return ot},OverlayCanvas=styled$1.canvas`
  width: 100%;
  height: 100%;
  object-fit: contain;
`,SegmentationCanvas=({segmentation:et,classState:tt,classOverlay:nt})=>{const rt=react.exports.useRef(null),{width:ot,height:st}=et,[ut,ct]=react.exports.useState();return react.exports.useEffect(()=>{const ft=nt.all??DEFAULT_ALL_MASK_CONTROL,pt=Object.fromEntries(lodash$2.exports.map(tt,({color:mt},yt)=>{const vt=nt[yt]??DEFAULT_CLASS_MASK_CONTROL,{disabled:Tt,opacity:Et}=vt,xt=ft.disabled||Tt,At=colorFromString(mt),Ct=xt?0:ft.opacity*Et*255,$t=[...At,Ct];return[yt,$t]})),ht=drawSegmentation(et,pt);ct(ht)},[et,tt,nt]),react.exports.useEffect(()=>{if(rt.current==null||ut==null)return;const ft=rt.current;drawImageData(ft,ut)},[ut]),Wt.createElement(OverlayCanvas,{width:ot,height:st,ref:rt})},SegmentationMaskLoader=({directUrl:et,classState:tt,classOverlay:nt,mediaSize:rt,style:ot})=>{const[st,ut]=react.exports.useState(),ct=Wt.useCallback(ft=>{const pt=document.createElement("canvas");pt.width=rt.width,pt.height=rt.height;const ht=pt.getContext("2d");if(ht==null)throw new Error("Can't get context in Segmentation Mask");const mt=new Image(rt.width,rt.height);mt.onload=()=>{ht?.drawImage(mt,0,0);const yt=ht.getImageData(0,0,rt.width,rt.height);ut(yt)},mt.crossOrigin="Anonymous",mt.src=ft},[rt.width,rt.height]);return react.exports.useEffect(()=>{et!=null&&ct(et)},[et,ct]),st==null?Wt.createElement("div",null):et==null?Wt.createElement("div",null,"missing"):Wt.createElement("div",{style:{...ot}},Wt.createElement(SegmentationCanvas,{segmentation:st,classState:tt,classOverlay:nt}))},SegmentationMaskFromCG=et=>{const{filePath:tt,classSet:nt,maskControls:rt}=et,{loadedFrom:ot,path:st}=tt,ut=react.exports.useMemo(()=>opArtifactVersionFile({artifactVersion:ot,path:constString(st)}),[ot,st]),{signedUrl:ct}=useSignedUrlWithExpiration(ut,60*1e3);return ct==null?Wt.createElement("div",null):Wt.createElement(SegmentationMaskLoader,{...et,directUrl:ct,classState:nt.classes,classOverlay:rt.classOverlayStates})},isBoundingBoxHidden=(et,tt,nt)=>{const{classOverlayStates:rt}=tt;if(rt.all?.disabled??DEFAULT_ALL_MASK_CONTROL.disabled)return!0;const{class_id:st}=et;return rt?.[st]?.disabled?!0:nt==null?!1:Object.keys(nt).some(ct=>{const ft=nt?.[ct];if(ft.value==null||(ft.disabled??!1))return!1;const pt=et.scores?.[ct];return pt==null?!1:!compare(ft.comparator??"gte",pt,ft.value)})},BoundingBoxesCanvas=({mediaSize:et,boxData:tt,bboxControls:nt,classStates:rt,sliderControls:ot})=>{const st=react.exports.useRef(null),{lineStyle:ut,classOverlayStates:ct}=nt;return react.exports.useEffect(()=>{if(st.current==null)return;const ft=st.current,pt={boxStyle:{lineStyle:ut??"line"},hideLabel:nt.hideLabels??!1};clearCanvas(ft);for(const ht of tt){const{class_id:mt}=ht;if(!isBoundingBoxHidden(ht,nt,ot)){const vt=boxColor(mt),Tt=rt?.[mt]?.name??`ID: ${ht.class_id}`;drawBox(ft,ht,Tt,et,vt,pt)}}},[ct,rt,ut,tt,nt,et,ot]),Wt.createElement(OverlayCanvas,{...et,ref:st})},BoundingBoxes=et=>Wt.createElement("div",{style:{...et.style}},Wt.createElement(BoundingBoxesCanvas,{...et,classStates:et.classSet?.classes})),clearCanvas=et=>{const tt=et.getContext("2d");if(!tt)throw new Error("Tried to clear canvas without context");tt.clearRect(0,0,et.width,et.height)},lineDashArray=et=>({line:[],dotted:[2,2],dashed:[12,6]})[et],drawBox=(et,tt,nt,rt,ot,st)=>{const ut=et.getContext("2d");if(ut==null)throw new Error("Canvas context not valid");let ct,ft,pt,ht;if("minX"in tt.position&&tt.position.minX!=null)ct=tt.position.maxX-tt.position.minX,ft=tt.position.maxY-tt.position.minY,pt=tt.position.minX,ht=tt.position.minY;else if("middle"in tt.position&&tt.position.middle!=null)ct=tt.position.width,ft=tt.position.height,pt=tt.position.middle[0]-ct/2,ht=tt.position.middle[1]-ft/2;else throw new Error(`Invalid position for bounding box: ${JSON.stringify(tt,null,2)}`);if(tt.domain!=="pixel"){const{width:vt,height:Tt}=rt;pt*=vt,ht*=Tt,ct*=vt,ft*=Tt}const yt=3;if(ut.lineWidth=yt,st?.boxStyle?.lineStyle!=null&&ut.setLineDash(lineDashArray(st.boxStyle.lineStyle)),ut.strokeStyle=ot,ut.strokeRect(pt,ht,ct,ft),!st?.hideLabel){const{box_caption:vt}=tt,Tt=14;ut.font="14px Arial";const Et=4,xt=vt??nt,At=ut.measureText(xt),Ct=At.width+pt>et.width?ct-At.width-Et:0;ut.fillStyle=ot,ut.fillRect(pt-yt/2+Ct,ht-Tt-2*Et,At.width+Et*2,Tt+2*Et),ut.fillStyle="white",ut.fillText(xt,pt+Et+Ct,ht-Et)}},ControlsMask=({mask:et,updateMask:tt,controls:nt,updateControls:rt})=>{const{tileLayout:ot=DEFAULT_TILE_LAYOUT}=nt,st=ot==="ALL_SPLIT",ut=defaultHideImageState(ot),ct=()=>{if(st){const pt=!(et.hideImage??ut);tt({...et,hideImage:pt})}else{const pt=!(nt.hideImage??ut);rt({...nt,hideImage:pt})}},ft=(st?et.hideImage:nt.hideImage)??ut;return Wt.createElement("span",null,Wt.createElement(WBIcon,{style:{fontSize:"1.1em",cursor:"pointer",verticalAlign:"middle",color:ft?"grey":"black"},onClick:ct,name:"panel-images"}))},Input=et=>{const{value:tt,...nt}=et;return react.exports.createElement(Input$7,{...nt,defaultValue:tt})},InputWrapper=styled$1.div`
  font-size: 13px;
  .ui.input {
    color: ${GLOBAL_COLORS.gray.toString()};
    > input {
      border: 0;
      background: transparent;
      color: $darkGray;
      &::-webkit-input-placeholder {
        color: ${GLOBAL_COLORS.gray.toString()};
      }
    }
    > i.icon {
      opacity: 1;
    }
  }
`,BoxConfidenceControl=({name:et,disabled:tt,onDisableChange:nt,value:rt,slideRange:ot,onSliderChange:st,comparator:ut,onOperatorChange:ct})=>{const ft=parseFloat(ot.min.toPrecision(3)),pt=parseFloat(ot.max.toPrecision(3));return Wt.createElement("div",{className:"confidence-slider__container"},Wt.createElement(Checkbox$2,{className:"confidence-slider__toggle",checked:!tt,onChange:nt}),Wt.createElement("div",{className:"confidence-slider__key"},et),Wt.createElement(Dropdown,{className:"confidence-slider__op",inline:!0,options:[{text:Wt.createElement("span",{className:"symbol"},"\u2265"),value:"gte",key:"gte"},{text:Wt.createElement("span",{className:"symbol"},"\u2264"),value:"lte",key:"lte"}],onChange:(ht,{value:mt})=>ct(mt),value:ut}),Wt.createElement(SliderInput,{className:"confidence-slider__value",sliderInPopup:!0,min:ft,max:pt,minLabel:ft.toString(),maxLabel:pt.toString(),step:(pt-ft)/100,value:rt,hasInput:!0,onChange:st}))},SearchInput=({value:et,onChange:tt})=>Wt.createElement(InputWrapper,null,Wt.createElement(Input,{icon:Wt.createElement(LegacyWBIcon,{style:{cursor:"pointer"},name:"search"}),iconPosition:"left",value:et,placeholder:"Search",onChange:(nt,{value:rt})=>tt(rt)})),VisibilityToggle=({disabled:et,onClick:tt})=>Wt.createElement(LegacyWBIcon,{style:{cursor:"pointer"},onClick:tt,name:et?"hide":"show"}),ClassToggle=et=>{const{name:tt,onClick:nt,disabled:rt}=et;return tt==="all"?Wt.createElement(VisibilityToggle,{disabled:rt,onClick:nt}):Wt.createElement("div",{onClick:nt,className:"mask-control__button",style:{userSelect:"none",margin:2,borderWidth:0,background:rt?gray500:et.color}},tt)},LabelToggle=et=>{const{onClick:tt,disabled:nt,children:rt}=et;return Wt.createElement(Wt.Fragment,null,Wt.createElement(VisibilityToggle,{disabled:nt,onClick:tt}),rt)},ControlTitle=styled$1.span`
  font-weight: 600;
`,ClassToggleWithSlider=et=>{const{opacity:tt,onOpacityChange:nt,...rt}=et;return Wt.createElement(SliderInput,{className:"panel-media__class-slider",sliderInPopup:!0,value:tt,min:0,minLabel:"0",max:1,maxLabel:"1",step:.01,onChange:nt,debounceTime:50,trigger:Wt.createElement(ClassToggle,{...rt})})},BoxSliderControls=({boxes:et,sliders:tt,updateSliders:nt})=>{const rt=react.exports.useMemo(()=>{const ot={};for(const st of Object.values(et))for(const ut of st)for(const ct of Object.entries(ut.scores??{})){const[ft,pt]=ct,ht=ot[ft];ot[ft]=ht==null?{min:pt,max:pt}:{min:Math.min(ht.min,pt),max:Math.max(ht.max,pt)}}return ot},[et]);return Wt.createElement("div",{className:"control-popup__item"},Object.entries(rt).map(([ot,st])=>{const ut=tt?.[ot]??{comparator:"gte",value:st.min},ct=mt=>{nt({[ot]:{...ut,...mt}})},ft=()=>ct({disabled:!ut.disabled}),pt=mt=>ct({comparator:mt}),ht=mt=>ct({value:mt});return Wt.createElement(BoxConfidenceControl,{key:ot,name:ot,...ut,slideRange:st,onDisableChange:ft,onOperatorChange:pt,onSliderChange:ht})}))},ClassToggles=({type:et,filterString:tt="",classStates:nt,classSet:rt,updateControl:ot})=>{const st=react.exports.useMemo(()=>fuzzyMatchRegex(tt),[tt]),ut=ft=>{const pt=rt.classes[ft]?.name;return pt!=null?String(pt).match(st):null},ct=Object.keys(nt).filter(ut);return Wt.createElement(ShowMoreContainer,null,ct.map(ft=>{const pt=nt[ft],ht=rt.classes[ft],{disabled:mt,opacity:yt}=pt,vt=()=>ot({classOverlayStates:{...nt,[ft]:{...pt,disabled:!mt}}}),Tt=Et=>ot({classOverlayStates:{...nt,[ft]:{...pt,opacity:Et}}});return et==="mask"?Wt.createElement(ClassToggleWithSlider,{key:ft,disabled:mt,name:ht.name,color:ht.color,opacity:yt,onOpacityChange:Tt,onClick:vt}):Wt.createElement(ClassToggle,{key:ft,disabled:mt,name:ht.name,color:ht.color,onClick:vt})}))},TileLayoutButtons=({tileLayout:et="ALL_STACKED",setLayoutType:tt,maskCount:nt})=>Wt.createElement("div",{style:{margin:24}},Wt.createElement(ButtonGroup,null,Wt.createElement(Button$3,{size:"tiny",icon:!0,className:classnames({"action-button--active":et==="ALL_STACKED"}),onClick:()=>tt("ALL_STACKED")},Wt.createElement(WBIcon,{name:"overlay-stack"})),Wt.createElement(Button$3,{size:"tiny",icon:!0,className:classnames({"action-button--active":et==="MASKS_NEXT_TO_IMAGE"}),onClick:()=>tt("MASKS_NEXT_TO_IMAGE")},Wt.createElement(WBIcon,{name:"overlay-2-column"})),nt>1&&Wt.createElement(Button$3,{size:"tiny",icon:!0,className:classnames({"action-button--active":et==="ALL_SPLIT"}),onClick:()=>tt("ALL_SPLIT")},Wt.createElement(WBIcon,{name:"overlay-3-column"}))),Wt.createElement("span",{style:{marginLeft:-5}},Wt.createElement(HelpPopup,{helpText:"Toggle the layout of the masks between: a stack of image and masks, masks adjacent to image, and all spread out"}))),ControlsImageOverlays=et=>{const{controls:tt,classSets:nt,updateControls:rt,boxes:ot}=et,{overlayControls:st,boxSliders:ut,tileLayout:ct=DEFAULT_TILE_LAYOUT}=tt??{},ft=(mt,yt)=>rt({...tt,overlayControls:{...tt?.overlayControls,[mt]:yt}}),pt=mt=>rt({...tt,tileLayout:mt});if(tt==null||nt==null)return Wt.createElement("div",null);const ht=Object.values(st??[]).filter(mt=>mt.type==="mask");return Wt.createElement("div",null,ot&&Wt.createElement(BoxSliderControls,{boxes:ot,updateSliders:mt=>rt({...tt,boxSliders:{...tt?.boxSliders??{},...mt}}),sliders:ut}),ht.length>0&&Wt.createElement(TileLayoutButtons,{tileLayout:ct,setLayoutType:pt,maskCount:ht.length}),lodash$2.exports.map(st,(mt,yt)=>{const{type:vt,name:Tt,classSetID:Et,classOverlayStates:xt,classSearch:At}=mt,Ct=nt[Et];if(Ct==null)return null;const $t=mt.classOverlayStates?.all??DEFAULT_ALL_MASK_CONTROL,Ot=Ft=>{const zt={...mt,...Ft};ft(yt,zt)},Rt=()=>{Ot({classOverlayStates:{...mt.classOverlayStates,all:{...$t,disabled:!$t.disabled}}})},It=Ft=>{Ot({classSearch:Ft})},kt=Ft=>{const zt={},Vt=Object.entries(mt.classOverlayStates);for(const[Zt,Ut]of Vt)Zt!=="all"&&(zt[Zt]={...Ut,disabled:Ft});Ot({classOverlayStates:{...xt,...zt}})},Mt=Ft=>{Ot({hideLabels:Ft})};return Wt.createElement(Wrapper,{key:yt},Wt.createElement(Header$2,null,Wt.createElement(VisibilityToggleWrapper,null,Wt.createElement(ClassToggle,{name:"all",disabled:$t.disabled,onClick:Rt})),Wt.createElement(TitleWrapper,null,Wt.createElement(ControlTitle,null,Tt," (",vt,")")),vt==="box"&&Wt.createElement(LabelToggleWrapper,null,Wt.createElement(LabelToggle,{disabled:mt.hideLabels??!1,onClick:()=>Mt(!mt.hideLabels)},"Labels")),Wt.createElement(SearchWrapper,null,Wt.createElement(SearchInput,{value:At,onChange:It})),Wt.createElement(ActionsWrapper,null,vt==="box"&&Wt.createElement(Wt.Fragment,null,Wt.createElement(ControlsBox,{box:mt,updateBox:Ot})),vt==="mask"&&Wt.createElement(ControlsMask,{controls:tt,updateControls:rt,mask:mt,updateMask:Ot}),Wt.createElement(AllClassToggle,{onClick:()=>kt(!0)},"None"),Wt.createElement(AllClassToggle,{onClick:()=>kt(!1)},"All"))),Wt.createElement(ClassToggles,{type:vt,filterString:At,classStates:xt,classSet:Ct,updateControl:Ot}))}))};function createBaseControls(et,tt,nt){const rt=Object.fromEntries(Object.keys(nt.classes).map(ot=>[ot,{opacity:1,disabled:!1}]));return{name:et,classSetID:tt,classOverlayStates:rt,classSearch:"",disabled:!1}}function createMaskControls(...et){return{...createBaseControls(...et),type:"mask"}}function createBoxControls(...et){return{...createBaseControls(...et),type:"box",lineStyle:"line"}}const defaultClassSetID="default",useImageControls=(et,tt)=>{const nt=react.exports.useMemo(()=>nullableTaggableStrip(et),[et]),rt=react.exports.useMemo(()=>{const ct=lodash$2.exports.mapValues(nt.classMap??{},(ft,pt)=>{const ht=parseInt(pt,10);return{color:isNaN(ht)?colorFromName(pt):colorN(ht,ROBIN16),name:ft}});return{[defaultClassSetID]:{classes:ct}}},[nt]),ot=react.exports.useMemo(()=>{const ct=nt.maskLayers??{};return lodash$2.exports.fromPairs(lodash$2.exports.keys(ct).map(ft=>{const pt="mask-"+ft;if(tt?.[pt]!=null)return[pt,tt[pt]];const ht=lodash$2.exports.pick(rt[defaultClassSetID].classes,...ct[ft]),mt=createMaskControls(pt,defaultClassSetID,{classes:ht});return[pt,mt]}))},[nt,rt,tt]),st=react.exports.useMemo(()=>{const ct=nt.boxLayers??{};return lodash$2.exports.fromPairs(lodash$2.exports.keys(ct).map(ft=>{const pt="box-"+ft;if(tt?.[pt]!=null)return[pt,tt[pt]];const ht=lodash$2.exports.pick(rt[defaultClassSetID].classes,...ct[ft]),mt=createBoxControls(pt,defaultClassSetID,{classes:ht});return[pt,mt]}))},[nt,rt,tt]),ut=react.exports.useMemo(()=>({...ot,...st}),[ot,st]);return{maskControls:ot,boxControls:st,controls:ut,classSets:rt}},inputType$V={type:"image-file"},PanelImageConfig=({config:et,updateConfig:tt,input:nt})=>{const{classSets:rt,controls:ot}=useImageControls(nt.type,et?.overlayControls),st=react.exports.useMemo(()=>ot===et?.overlayControls?et:{...et,overlayControls:ot},[et,ot]),ut=useWeaveContext(),ct=react.exports.useMemo(()=>replaceInputVariables(nt,ut.client.opStore),[nt,ut.client.opStore]),ft=useNodeValue(ct).result,pt=react.exports.useMemo(()=>{if(ft==null)return{};const ht=lodash$2.exports.isArray(ft)?ft:[ft];return Object.fromEntries(ht.reduce((mt,yt,vt)=>{const{boxes:Tt}=yt??{};return Tt==null?mt:mt.concat(Object.entries(Tt).map(([Et,xt])=>[`${vt}-${Et}`,xt]))},[]))},[ft]);return Wt.createElement(ControlsImageOverlays,{boxes:pt,controls:st,classSets:rt,updateControls:tt})},PanelImage=({config:et,input:tt})=>{const nt=tt,rt=useNodeValue(nt),ot=react.exports.useMemo(()=>opAssetArtifactVersion({asset:nt}),[nt]),st=rt.result,{maskControls:ut,boxControls:ct,classSets:ft}=useImageControls(nt.type,et?.overlayControls),{imageBoxes:pt,imageMasks:ht,boxControls:mt,maskControls:yt}=react.exports.useMemo(()=>{const At=st?.boxes!=null?lodash$2.exports.keys(st.boxes):[],Ct=st?.masks!=null?lodash$2.exports.keys(st.masks):[],$t=Object.values(ut),Ot=Object.values(ct),Rt=Ot.map(Ut=>Ut.name.slice(4)),It=$t.map(Ut=>Ut.name.slice(5)),kt=lodash$2.exports.intersection(At,Rt),Mt=lodash$2.exports.intersection(Ct,It),Ft=st?.boxes!=null?kt.map(Ut=>st.boxes[Ut]):void 0,zt=st?.masks!=null?Mt.map(Ut=>({loadedFrom:ot,path:st.masks[Ut]?.path})):void 0,Vt=Ot.filter(Ut=>kt.includes(Ut.name.slice(4))),Zt=$t.filter(Ut=>Mt.includes(Ut.name.slice(5)));return{imageBoxes:Ft,imageMasks:zt,boxControls:Vt,maskControls:Zt}},[st,ct,ut,ot]),{tileLayout:vt,hideImage:Tt}=et??{},Et=defaultHideImageState(vt),xt={path:st?.path,loadedFrom:ot,width:st?.width,height:st?.height};if(vt==="MASKS_NEXT_TO_IMAGE")return Wt.createElement("div",{style:{display:"flex",width:"100%",height:"100%"}},Wt.createElement(CardImage,{image:xt,imageFileNode:nt}),Wt.createElement(CardImage,{image:xt,imageFileNode:nt,boundingBoxes:pt,masks:ht,classSets:ft,boxSliders:et?.boxSliders,maskControls:yt,boxControls:mt,hideImage:Tt??Et}));if(vt==="ALL_SPLIT"){const At=yt.map($t=>[$t,mt.find(Ot=>Ot.name===$t.name)]),Ct=mt.filter($t=>yt.every(Ot=>$t.name!==Ot.name));return Wt.createElement("div",{style:{display:"flex",width:"100%",height:"100%"}},Wt.createElement(CardImage,{image:xt,imageFileNode:nt,boundingBoxes:pt,classSets:ft,boxSliders:et?.boxSliders,boxControls:Ct}),At.map(([$t,Ot],Rt)=>Wt.createElement(CardImage,{key:Rt,image:xt,imageFileNode:nt,boundingBoxes:pt,masks:ht?.slice(Rt,Rt+1),classSets:ft,boxSliders:et?.boxSliders,maskControls:$t?[$t]:void 0,boxControls:Ot?[Ot]:void 0,hideImage:$t.hideImage??Et})))}return Wt.createElement(CardImage,{image:xt,imageFileNode:nt,boundingBoxes:pt,masks:ht,classSets:ft,boxSliders:et?.boxSliders,maskControls:yt,boxControls:mt,hideImage:Tt??Et})},Spec$X={id:"image-file",displayName:"Image",ConfigComponent:PanelImageConfig,Component:PanelImage,inputType:inputType$V,canFullscreen:!0,defaultFixedSize:et=>{const{tileLayout:tt=DEFAULT_TILE_LAYOUT}=et??{};let nt=1;return tt==="MASKS_NEXT_TO_IMAGE"&&(nt=2),tt==="ALL_SPLIT"&&(nt=Object.values(et?.overlayControls??[]).filter(ot=>ot.type==="mask").length+1),{width:200*nt,height:9/16*200}}},inputType$U={type:"dict",objectType:{type:"image-file"}},PanelImageCompareConfig=({context:et,config:tt,updateConfig:nt})=>{if(et.classSets==null)throw new Error("Error: Class sets not loaded (PanelImageCompareConfig)");return Wt.createElement(ControlsImageOverlays,{controls:tt?.overlayControls,classSets:et.classSets,updateControls:nt})},PanelImageCompare=et=>Wt.createElement("div",null,"Image compare"),Spec$W={id:"image-file-compare",displayName:"Image Compare",ConfigComponent:PanelImageCompareConfig,Component:PanelImageCompare,inputType:inputType$U},inputType$T={type:"union",members:["none","link"]},MAX_DISPLAY_LENGTH$1=100,PanelLink=et=>{const tt=useNodeValue(et.input);if(tt.loading)return Wt.createElement("div",null,"-");const nt=tt.result?.name??"-",rt=tt.result?.url??"/",st=""+(nt.length>MAX_DISPLAY_LENGTH$1?nt.slice(0,MAX_DISPLAY_LENGTH$1)+"...":nt);return Wt.createElement(Link$1,{to:rt},st)},Spec$V={id:"link",Component:PanelLink,inputType:inputType$T};class NullResultErrorBoundary extends Wt.Component{constructor(){super(...arguments),this.state={isNullValue:!1}}static getDerivedStateFromError(tt){return tt instanceof NullResult?{isNullValue:!0}:{isNullValue:!1}}componentDidCatch(tt,nt){if(tt instanceof NullResult)this.setState({isNullValue:!0}),this.props.onErrorCapture?.();else throw tt}render(){return this.state.isNullValue?Wt.createElement("div",{"data-test-weave-id":"number",style:{width:"100%",height:"100%",overflowX:"hidden",overflowY:"auto",margin:"auto",textAlign:"center",wordBreak:"normal",display:"flex",flexDirection:"column",alignContent:"space-around",justifyContent:"space-around",alignItems:"center"}},"-"):this.props.children}}const useLatchingState=et=>{const[tt,nt]=Wt.useState(et),[rt,ot]=Wt.useState(!0),[st,ut]=Wt.useState(et),ct=Wt.useCallback(()=>{ut(et),ot(!1)},[et]);return Wt.useEffect(()=>{!rt&&et!==st&&et!==tt&&(nt(et),ot(!0))},[et,rt,nt,tt,st]),{value:tt,openLatch:ct}},useIdFromDeps=et=>react.exports.useMemo(()=>Math.random(),et),PanelMaybe=et=>{const{input:tt}=et,nt=react.exports.useMemo(()=>{let st=Spec$U.convert(tt.type);return st==null&&(st=tt.type),{...tt,type:st}},[tt]),{value:rt,openLatch:ot}=useLatchingState(useIdFromDeps([nt,et.child,et.config,et.context,et.loading,et.updateConfig,et.updateContext,et.updateInput]));return Wt.createElement(PanelContextProvider,{inPanelMaybe:!0},Wt.createElement(NullResultErrorBoundary,{key:rt,onErrorCapture:ot},Wt.createElement(PanelComp2,{input:nt,inputType:nt.type,loading:et.loading,panelSpec:et.child,configMode:!1,config:et.config,context:et.context,updateInput:et.updateInput,updateConfig:et.updateConfig,updateContext:et.updateContext})))},Spec$U={id:"maybe",displayName:"Maybe",Component:PanelMaybe,convert:et=>{let tt;return isTaggedValueLike(et)&&(tt=taggedValueTagType(et),et=taggedValueValueType(et)),!isUnion(et)||!isAssignableTo("none",et)?null:taggedValue(tt,nonNullableDeep(et))},defaultFixedSize:et=>et},RepresentationTypeValues=["default","axes","backbone","ball+stick","base","cartoon","contact","distance","helixorient","hyperball","label","licorice","line surface","ribbon","rocket","rope","spacefill","trace","tube","unitcell"];var commonjs={},ArrowKeyStepper$1={},interopRequireDefault={exports:{}};(function(et){function tt(nt){return nt&&nt.__esModule?nt:{default:nt}}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(interopRequireDefault);var ArrowKeyStepper={},interopRequireWildcard={exports:{}},_typeof$1={exports:{}};(function(et){function tt(nt){return et.exports=tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},et.exports.__esModule=!0,et.exports.default=et.exports,tt(nt)}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(_typeof$1);(function(et){var tt=_typeof$1.exports.default;function nt(ot){if(typeof WeakMap!="function")return null;var st=new WeakMap,ut=new WeakMap;return(nt=function(ft){return ft?ut:st})(ot)}function rt(ot,st){if(!st&&ot&&ot.__esModule)return ot;if(ot===null||tt(ot)!=="object"&&typeof ot!="function")return{default:ot};var ut=nt(st);if(ut&&ut.has(ot))return ut.get(ot);var ct={},ft=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in ot)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(ot,pt)){var ht=ft?Object.getOwnPropertyDescriptor(ot,pt):null;ht&&(ht.get||ht.set)?Object.defineProperty(ct,pt,ht):ct[pt]=ot[pt]}return ct.default=ot,ut&&ut.set(ot,ct),ct}et.exports=rt,et.exports.__esModule=!0,et.exports.default=et.exports})(interopRequireWildcard);const require$$3$1=getAugmentedNamespace(classCallCheck$2),require$$4=getAugmentedNamespace(createClass$2),require$$5=getAugmentedNamespace(possibleConstructorReturn),require$$6=getAugmentedNamespace(getPrototypeOf$1),require$$7=getAugmentedNamespace(assertThisInitialized),require$$8=getAugmentedNamespace(inherits$2),require$$2$2=getAugmentedNamespace(defineProperty$9);function componentWillMount(){var et=this.constructor.getDerivedStateFromProps(this.props,this.state);et!=null&&this.setState(et)}function componentWillReceiveProps(et){function tt(nt){var rt=this.constructor.getDerivedStateFromProps(et,nt);return rt??null}this.setState(tt.bind(this))}function componentWillUpdate(et,tt){try{var nt=this.props,rt=this.state;this.props=et,this.state=tt,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(nt,rt)}finally{this.props=nt,this.state=rt}}componentWillMount.__suppressDeprecationWarning=!0;componentWillReceiveProps.__suppressDeprecationWarning=!0;componentWillUpdate.__suppressDeprecationWarning=!0;function polyfill(et){var tt=et.prototype;if(!tt||!tt.isReactComponent)throw new Error("Can only polyfill class components");if(typeof et.getDerivedStateFromProps!="function"&&typeof tt.getSnapshotBeforeUpdate!="function")return et;var nt=null,rt=null,ot=null;if(typeof tt.componentWillMount=="function"?nt="componentWillMount":typeof tt.UNSAFE_componentWillMount=="function"&&(nt="UNSAFE_componentWillMount"),typeof tt.componentWillReceiveProps=="function"?rt="componentWillReceiveProps":typeof tt.UNSAFE_componentWillReceiveProps=="function"&&(rt="UNSAFE_componentWillReceiveProps"),typeof tt.componentWillUpdate=="function"?ot="componentWillUpdate":typeof tt.UNSAFE_componentWillUpdate=="function"&&(ot="UNSAFE_componentWillUpdate"),nt!==null||rt!==null||ot!==null){var st=et.displayName||et.name,ut=typeof et.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.

`+st+" uses "+ut+" but also contains the following legacy lifecycles:"+(nt!==null?`
  `+nt:"")+(rt!==null?`
  `+rt:"")+(ot!==null?`
  `+ot:"")+`

The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof et.getDerivedStateFromProps=="function"&&(tt.componentWillMount=componentWillMount,tt.componentWillReceiveProps=componentWillReceiveProps),typeof tt.getSnapshotBeforeUpdate=="function"){if(typeof tt.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");tt.componentWillUpdate=componentWillUpdate;var ct=tt.componentDidUpdate;tt.componentDidUpdate=function(pt,ht,mt){var yt=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:mt;ct.call(this,pt,ht,yt)}}return et}const reactLifecyclesCompat_es=Object.freeze(Object.defineProperty({__proto__:null,polyfill},Symbol.toStringTag,{value:"Module"})),require$$3=getAugmentedNamespace(reactLifecyclesCompat_es);var Grid$1={},Grid={};const require$$1$2=getAugmentedNamespace(_extends$b);var calculateSizeAndPositionDataAndUpdateScrollOffset={},hasRequiredCalculateSizeAndPositionDataAndUpdateScrollOffset;function requireCalculateSizeAndPositionDataAndUpdateScrollOffset(){return hasRequiredCalculateSizeAndPositionDataAndUpdateScrollOffset||(hasRequiredCalculateSizeAndPositionDataAndUpdateScrollOffset=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt;function tt(nt){var rt=nt.cellCount,ot=nt.cellSize,st=nt.computeMetadataCallback,ut=nt.computeMetadataCallbackProps,ct=nt.nextCellsCount,ft=nt.nextCellSize,pt=nt.nextScrollToIndex,ht=nt.scrollToIndex,mt=nt.updateScrollOffsetForScrollToIndex;(rt!==ct||(typeof ot=="number"||typeof ft=="number")&&ot!==ft)&&(st(ut),ht>=0&&ht===pt&&mt())}}(calculateSizeAndPositionDataAndUpdateScrollOffset)),calculateSizeAndPositionDataAndUpdateScrollOffset}var ScalingCellSizeAndPositionManager={};const require$$2$1=getAugmentedNamespace(objectWithoutProperties);var CellSizeAndPositionManager={},types$5={},hasRequiredTypes$5;function requireTypes$5(){if(hasRequiredTypes$5)return types$5;hasRequiredTypes$5=1;var et=interopRequireDefault.exports,tt=interopRequireWildcard.exports;Object.defineProperty(types$5,"__esModule",{value:!0}),types$5.bpfrpt_proptype_VisibleCellRange=types$5.bpfrpt_proptype_Alignment=types$5.bpfrpt_proptype_OverscanIndicesGetter=types$5.bpfrpt_proptype_OverscanIndices=types$5.bpfrpt_proptype_OverscanIndicesGetterParams=types$5.bpfrpt_proptype_RenderedSection=types$5.bpfrpt_proptype_ScrollbarPresenceChange=types$5.bpfrpt_proptype_Scroll=types$5.bpfrpt_proptype_NoContentRenderer=types$5.bpfrpt_proptype_CellSize=types$5.bpfrpt_proptype_CellSizeGetter=types$5.bpfrpt_proptype_CellRangeRenderer=types$5.bpfrpt_proptype_CellRangeRendererParams=types$5.bpfrpt_proptype_StyleCache=types$5.bpfrpt_proptype_CellCache=types$5.bpfrpt_proptype_CellRenderer=types$5.bpfrpt_proptype_CellRendererParams=types$5.bpfrpt_proptype_CellPosition=void 0,tt(react.exports),et(requireScalingCellSizeAndPositionManager()),et(propTypes$1.exports);var nt=null;types$5.bpfrpt_proptype_CellPosition=nt;var rt=null;types$5.bpfrpt_proptype_CellRendererParams=rt;var ot=null;types$5.bpfrpt_proptype_CellRenderer=ot;var st=null;types$5.bpfrpt_proptype_CellCache=st;var ut=null;types$5.bpfrpt_proptype_StyleCache=ut;var ct=null;types$5.bpfrpt_proptype_CellRangeRendererParams=ct;var ft=null;types$5.bpfrpt_proptype_CellRangeRenderer=ft;var pt=null;types$5.bpfrpt_proptype_CellSizeGetter=pt;var ht=null;types$5.bpfrpt_proptype_CellSize=ht;var mt=null;types$5.bpfrpt_proptype_NoContentRenderer=mt;var yt=null;types$5.bpfrpt_proptype_Scroll=yt;var vt=null;types$5.bpfrpt_proptype_ScrollbarPresenceChange=vt;var Tt=null;types$5.bpfrpt_proptype_RenderedSection=Tt;var Et=null;types$5.bpfrpt_proptype_OverscanIndicesGetterParams=Et;var xt=null;types$5.bpfrpt_proptype_OverscanIndices=xt;var At=null;types$5.bpfrpt_proptype_OverscanIndicesGetter=At;var Ct=null;types$5.bpfrpt_proptype_Alignment=Ct;var $t=null;return types$5.bpfrpt_proptype_VisibleCellRange=$t,types$5}var hasRequiredCellSizeAndPositionManager;function requireCellSizeAndPositionManager(){return hasRequiredCellSizeAndPositionManager||(hasRequiredCellSizeAndPositionManager=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var nt=tt(require$$3$1),rt=tt(require$$4),ot=tt(require$$2$2);requireTypes$5();var st=function(){function ut(ct){var ft=ct.cellCount,pt=ct.cellSizeGetter,ht=ct.estimatedCellSize;(0,nt.default)(this,ut),(0,ot.default)(this,"_cellSizeAndPositionData",{}),(0,ot.default)(this,"_lastMeasuredIndex",-1),(0,ot.default)(this,"_lastBatchedIndex",-1),(0,ot.default)(this,"_cellCount",void 0),(0,ot.default)(this,"_cellSizeGetter",void 0),(0,ot.default)(this,"_estimatedCellSize",void 0),this._cellSizeGetter=pt,this._cellCount=ft,this._estimatedCellSize=ht}return(0,rt.default)(ut,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(ft){var pt=ft.cellCount,ht=ft.estimatedCellSize,mt=ft.cellSizeGetter;this._cellCount=pt,this._estimatedCellSize=ht,this._cellSizeGetter=mt}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(ft){if(ft<0||ft>=this._cellCount)throw Error("Requested index ".concat(ft," is outside of range 0..").concat(this._cellCount));if(ft>this._lastMeasuredIndex)for(var pt=this.getSizeAndPositionOfLastMeasuredCell(),ht=pt.offset+pt.size,mt=this._lastMeasuredIndex+1;mt<=ft;mt++){var yt=this._cellSizeGetter({index:mt});if(yt===void 0||isNaN(yt))throw Error("Invalid size returned for cell ".concat(mt," of value ").concat(yt));yt===null?(this._cellSizeAndPositionData[mt]={offset:ht,size:0},this._lastBatchedIndex=ft):(this._cellSizeAndPositionData[mt]={offset:ht,size:yt},ht+=yt,this._lastMeasuredIndex=ft)}return this._cellSizeAndPositionData[ft]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var ft=this.getSizeAndPositionOfLastMeasuredCell(),pt=ft.offset+ft.size,ht=this._cellCount-this._lastMeasuredIndex-1,mt=ht*this._estimatedCellSize;return pt+mt}},{key:"getUpdatedOffsetForIndex",value:function(ft){var pt=ft.align,ht=pt===void 0?"auto":pt,mt=ft.containerSize,yt=ft.currentOffset,vt=ft.targetIndex;if(mt<=0)return 0;var Tt=this.getSizeAndPositionOfCell(vt),Et=Tt.offset,xt=Et-mt+Tt.size,At;switch(ht){case"start":At=Et;break;case"end":At=xt;break;case"center":At=Et-(mt-Tt.size)/2;break;default:At=Math.max(xt,Math.min(Et,yt));break}var Ct=this.getTotalSize();return Math.max(0,Math.min(Ct-mt,At))}},{key:"getVisibleCellRange",value:function(ft){var pt=ft.containerSize,ht=ft.offset,mt=this.getTotalSize();if(mt===0)return{};var yt=ht+pt,vt=this._findNearestCell(ht),Tt=this.getSizeAndPositionOfCell(vt);ht=Tt.offset+Tt.size;for(var Et=vt;ht<yt&&Et<this._cellCount-1;)Et++,ht+=this.getSizeAndPositionOfCell(Et).size;return{start:vt,stop:Et}}},{key:"resetCell",value:function(ft){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,ft-1)}},{key:"_binarySearch",value:function(ft,pt,ht){for(;pt<=ft;){var mt=pt+Math.floor((ft-pt)/2),yt=this.getSizeAndPositionOfCell(mt).offset;if(yt===ht)return mt;yt<ht?pt=mt+1:yt>ht&&(ft=mt-1)}return pt>0?pt-1:0}},{key:"_exponentialSearch",value:function(ft,pt){for(var ht=1;ft<this._cellCount&&this.getSizeAndPositionOfCell(ft).offset<pt;)ft+=ht,ht*=2;return this._binarySearch(Math.min(ft,this._cellCount-1),Math.floor(ft/2),pt)}},{key:"_findNearestCell",value:function(ft){if(isNaN(ft))throw Error("Invalid offset ".concat(ft," specified"));ft=Math.max(0,ft);var pt=this.getSizeAndPositionOfLastMeasuredCell(),ht=Math.max(0,this._lastMeasuredIndex);return pt.offset>=ft?this._binarySearch(ht,0,ft):this._exponentialSearch(ht,ft)}}]),ut}();et.default=st}(CellSizeAndPositionManager)),CellSizeAndPositionManager}var maxElementSize={},hasRequiredMaxElementSize;function requireMaxElementSize(){if(hasRequiredMaxElementSize)return maxElementSize;hasRequiredMaxElementSize=1,Object.defineProperty(maxElementSize,"__esModule",{value:!0}),maxElementSize.getMaxElementSize=void 0;var et=15e5,tt=16777100,nt=function(){return typeof window<"u"},rt=function(){return!!window.chrome},ot=function(){return nt()&&rt()?tt:et};return maxElementSize.getMaxElementSize=ot,maxElementSize}var hasRequiredScalingCellSizeAndPositionManager;function requireScalingCellSizeAndPositionManager(){return hasRequiredScalingCellSizeAndPositionManager||(hasRequiredScalingCellSizeAndPositionManager=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var nt=tt(require$$2$1),rt=tt(require$$3$1),ot=tt(require$$4),st=tt(require$$2$2),ut=tt(requireCellSizeAndPositionManager()),ct=requireMaxElementSize();requireTypes$5();var ft=function(){function pt(ht){var mt=ht.maxScrollSize,yt=mt===void 0?(0,ct.getMaxElementSize)():mt,vt=(0,nt.default)(ht,["maxScrollSize"]);(0,rt.default)(this,pt),(0,st.default)(this,"_cellSizeAndPositionManager",void 0),(0,st.default)(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new ut.default(vt),this._maxScrollSize=yt}return(0,ot.default)(pt,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(mt){this._cellSizeAndPositionManager.configure(mt)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(mt){var yt=mt.containerSize,vt=mt.offset,Tt=this._cellSizeAndPositionManager.getTotalSize(),Et=this.getTotalSize(),xt=this._getOffsetPercentage({containerSize:yt,offset:vt,totalSize:Et});return Math.round(xt*(Et-Tt))}},{key:"getSizeAndPositionOfCell",value:function(mt){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(mt)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(mt){var yt=mt.align,vt=yt===void 0?"auto":yt,Tt=mt.containerSize,Et=mt.currentOffset,xt=mt.targetIndex;Et=this._safeOffsetToOffset({containerSize:Tt,offset:Et});var At=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:vt,containerSize:Tt,currentOffset:Et,targetIndex:xt});return this._offsetToSafeOffset({containerSize:Tt,offset:At})}},{key:"getVisibleCellRange",value:function(mt){var yt=mt.containerSize,vt=mt.offset;return vt=this._safeOffsetToOffset({containerSize:yt,offset:vt}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:yt,offset:vt})}},{key:"resetCell",value:function(mt){this._cellSizeAndPositionManager.resetCell(mt)}},{key:"_getOffsetPercentage",value:function(mt){var yt=mt.containerSize,vt=mt.offset,Tt=mt.totalSize;return Tt<=yt?0:vt/(Tt-yt)}},{key:"_offsetToSafeOffset",value:function(mt){var yt=mt.containerSize,vt=mt.offset,Tt=this._cellSizeAndPositionManager.getTotalSize(),Et=this.getTotalSize();if(Tt===Et)return vt;var xt=this._getOffsetPercentage({containerSize:yt,offset:vt,totalSize:Tt});return Math.round(xt*(Et-yt))}},{key:"_safeOffsetToOffset",value:function(mt){var yt=mt.containerSize,vt=mt.offset,Tt=this._cellSizeAndPositionManager.getTotalSize(),Et=this.getTotalSize();if(Tt===Et)return vt;var xt=this._getOffsetPercentage({containerSize:yt,offset:vt,totalSize:Et});return Math.round(xt*(Tt-yt))}}]),pt}();et.default=ft}(ScalingCellSizeAndPositionManager)),ScalingCellSizeAndPositionManager}var createCallbackMemoizer={},hasRequiredCreateCallbackMemoizer;function requireCreateCallbackMemoizer(){return hasRequiredCreateCallbackMemoizer||(hasRequiredCreateCallbackMemoizer=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt;function tt(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,rt={};return function(ot){var st=ot.callback,ut=ot.indices,ct=Object.keys(ut),ft=!nt||ct.every(function(ht){var mt=ut[ht];return Array.isArray(mt)?mt.length>0:mt>=0}),pt=ct.length!==Object.keys(rt).length||ct.some(function(ht){var mt=rt[ht],yt=ut[ht];return Array.isArray(yt)?mt.join(",")!==yt.join(","):mt!==yt});rt=ut,ft&&pt&&st(ut)}}}(createCallbackMemoizer)),createCallbackMemoizer}var defaultOverscanIndicesGetter={},hasRequiredDefaultOverscanIndicesGetter;function requireDefaultOverscanIndicesGetter(){return hasRequiredDefaultOverscanIndicesGetter||(hasRequiredDefaultOverscanIndicesGetter=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=st,et.SCROLL_DIRECTION_VERTICAL=et.SCROLL_DIRECTION_HORIZONTAL=et.SCROLL_DIRECTION_FORWARD=et.SCROLL_DIRECTION_BACKWARD=void 0,requireTypes$5();var tt=-1;et.SCROLL_DIRECTION_BACKWARD=tt;var nt=1;et.SCROLL_DIRECTION_FORWARD=nt;var rt="horizontal";et.SCROLL_DIRECTION_HORIZONTAL=rt;var ot="vertical";et.SCROLL_DIRECTION_VERTICAL=ot;function st(ut){var ct=ut.cellCount,ft=ut.overscanCellsCount,pt=ut.scrollDirection,ht=ut.startIndex,mt=ut.stopIndex;return pt===nt?{overscanStartIndex:Math.max(0,ht),overscanStopIndex:Math.min(ct-1,mt+ft)}:{overscanStartIndex:Math.max(0,ht-ft),overscanStopIndex:Math.min(ct-1,mt)}}}(defaultOverscanIndicesGetter)),defaultOverscanIndicesGetter}var updateScrollIndexHelper={},hasRequiredUpdateScrollIndexHelper;function requireUpdateScrollIndexHelper(){return hasRequiredUpdateScrollIndexHelper||(hasRequiredUpdateScrollIndexHelper=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=nt,tt(requireScalingCellSizeAndPositionManager()),requireTypes$5();function nt(rt){var ot=rt.cellSize,st=rt.cellSizeAndPositionManager,ut=rt.previousCellsCount,ct=rt.previousCellSize,ft=rt.previousScrollToAlignment,pt=rt.previousScrollToIndex,ht=rt.previousSize,mt=rt.scrollOffset,yt=rt.scrollToAlignment,vt=rt.scrollToIndex,Tt=rt.size,Et=rt.sizeJustIncreasedFromZero,xt=rt.updateScrollIndexCallback,At=st.getCellCount(),Ct=vt>=0&&vt<At,$t=Tt!==ht||Et||!ct||typeof ot=="number"&&ot!==ct;Ct&&($t||yt!==ft||vt!==pt)?xt(vt):!Ct&&At>0&&(Tt<ht||At<ut)&&mt>st.getTotalSize()-Tt&&xt(At-1)}}(updateScrollIndexHelper)),updateScrollIndexHelper}var defaultCellRangeRenderer={},hasRequiredDefaultCellRangeRenderer;function requireDefaultCellRangeRenderer(){return hasRequiredDefaultCellRangeRenderer||(hasRequiredDefaultCellRangeRenderer=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt,requireTypes$5();function tt(nt){for(var rt=nt.cellCache,ot=nt.cellRenderer,st=nt.columnSizeAndPositionManager,ut=nt.columnStartIndex,ct=nt.columnStopIndex,ft=nt.deferredMeasurementCache,pt=nt.horizontalOffsetAdjustment,ht=nt.isScrolling,mt=nt.isScrollingOptOut,yt=nt.parent,vt=nt.rowSizeAndPositionManager,Tt=nt.rowStartIndex,Et=nt.rowStopIndex,xt=nt.styleCache,At=nt.verticalOffsetAdjustment,Ct=nt.visibleColumnIndices,$t=nt.visibleRowIndices,Ot=[],Rt=st.areOffsetsAdjusted()||vt.areOffsetsAdjusted(),It=!ht&&!Rt,kt=Tt;kt<=Et;kt++)for(var Mt=vt.getSizeAndPositionOfCell(kt),Ft=ut;Ft<=ct;Ft++){var zt=st.getSizeAndPositionOfCell(Ft),Vt=Ft>=Ct.start&&Ft<=Ct.stop&&kt>=$t.start&&kt<=$t.stop,Zt="".concat(kt,"-").concat(Ft),Ut=void 0;It&&xt[Zt]?Ut=xt[Zt]:ft&&!ft.has(kt,Ft)?Ut={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(Ut={height:Mt.size,left:zt.offset+pt,position:"absolute",top:Mt.offset+At,width:zt.size},xt[Zt]=Ut);var Xt={columnIndex:Ft,isScrolling:ht,isVisible:Vt,key:Zt,parent:yt,rowIndex:kt,style:Ut},Jt=void 0;(mt||ht)&&!pt&&!At?(rt[Zt]||(rt[Zt]=ot(Xt)),Jt=rt[Zt]):Jt=ot(Xt),!(Jt==null||Jt===!1)&&Ot.push(Jt)}return Ot}}(defaultCellRangeRenderer)),defaultCellRangeRenderer}const canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement);var size$1;function scrollbarSize$1(et){if((!size$1&&size$1!==0||et)&&canUseDOM){var tt=document.createElement("div");tt.style.position="absolute",tt.style.top="-9999px",tt.style.width="50px",tt.style.height="50px",tt.style.overflow="scroll",document.body.appendChild(tt),size$1=tt.offsetWidth-tt.clientWidth,document.body.removeChild(tt)}return size$1}const scrollbarSize$2=Object.freeze(Object.defineProperty({__proto__:null,default:scrollbarSize$1},Symbol.toStringTag,{value:"Module"})),require$$14=getAugmentedNamespace(scrollbarSize$2);var requestAnimationTimeout={},animationFrame={},hasRequiredAnimationFrame;function requireAnimationFrame(){if(hasRequiredAnimationFrame)return animationFrame;hasRequiredAnimationFrame=1,Object.defineProperty(animationFrame,"__esModule",{value:!0}),animationFrame.caf=animationFrame.raf=void 0;var et;typeof window<"u"?et=window:typeof self<"u"?et=self:et={};var tt=et.requestAnimationFrame||et.webkitRequestAnimationFrame||et.mozRequestAnimationFrame||et.oRequestAnimationFrame||et.msRequestAnimationFrame||function(st){return et.setTimeout(st,1e3/60)},nt=et.cancelAnimationFrame||et.webkitCancelAnimationFrame||et.mozCancelAnimationFrame||et.oCancelAnimationFrame||et.msCancelAnimationFrame||function(st){et.clearTimeout(st)},rt=tt;animationFrame.raf=rt;var ot=nt;return animationFrame.caf=ot,animationFrame}var hasRequiredRequestAnimationTimeout;function requireRequestAnimationTimeout(){if(hasRequiredRequestAnimationTimeout)return requestAnimationTimeout;hasRequiredRequestAnimationTimeout=1;var et=interopRequireDefault.exports;Object.defineProperty(requestAnimationTimeout,"__esModule",{value:!0}),requestAnimationTimeout.bpfrpt_proptype_AnimationTimeoutId=requestAnimationTimeout.requestAnimationTimeout=requestAnimationTimeout.cancelAnimationTimeout=void 0;var tt=requireAnimationFrame();et(propTypes$1.exports);var nt=null;requestAnimationTimeout.bpfrpt_proptype_AnimationTimeoutId=nt;var rt=function(ut){return(0,tt.caf)(ut.id)};requestAnimationTimeout.cancelAnimationTimeout=rt;var ot=function(ut,ct){var ft;Promise.resolve().then(function(){ft=Date.now()});var pt=function mt(){Date.now()-ft>=ct?ut.call():ht.id=(0,tt.raf)(mt)},ht={id:(0,tt.raf)(pt)};return ht};return requestAnimationTimeout.requestAnimationTimeout=ot,requestAnimationTimeout}var hasRequiredGrid;function requireGrid(){return hasRequiredGrid||(hasRequiredGrid=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=et.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=void 0;var rt=tt(require$$1$2),ot=tt(require$$3$1),st=tt(require$$4),ut=tt(require$$5),ct=tt(require$$6),ft=tt(require$$7),pt=tt(require$$8),ht=tt(require$$2$2),mt=nt(react.exports),yt=tt(require$$10),vt=tt(requireCalculateSizeAndPositionDataAndUpdateScrollOffset()),Tt=tt(requireScalingCellSizeAndPositionManager()),Et=tt(requireCreateCallbackMemoizer()),xt=nt(requireDefaultOverscanIndicesGetter()),At=tt(requireUpdateScrollIndexHelper()),Ct=tt(requireDefaultCellRangeRenderer()),$t=tt(require$$14),Ot=require$$3,Rt=requireRequestAnimationTimeout();requireTypes$5(),tt(propTypes$1.exports);var It,kt;function Mt(Jt,gn){var An=Object.keys(Jt);if(Object.getOwnPropertySymbols){var sn=Object.getOwnPropertySymbols(Jt);gn&&(sn=sn.filter(function(Sn){return Object.getOwnPropertyDescriptor(Jt,Sn).enumerable})),An.push.apply(An,sn)}return An}function Ft(Jt){for(var gn=1;gn<arguments.length;gn++){var An=arguments[gn]!=null?arguments[gn]:{};gn%2?Mt(An,!0).forEach(function(sn){(0,ht.default)(Jt,sn,An[sn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Jt,Object.getOwnPropertyDescriptors(An)):Mt(An).forEach(function(sn){Object.defineProperty(Jt,sn,Object.getOwnPropertyDescriptor(An,sn))})}return Jt}var zt=150;et.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=zt;var Vt={OBSERVED:"observed",REQUESTED:"requested"},Zt=function(){return null},Ut=(kt=It=function(Jt){(0,pt.default)(gn,Jt);function gn(An){var sn;(0,ot.default)(this,gn),sn=(0,ut.default)(this,(0,ct.default)(gn).call(this,An)),(0,ht.default)((0,ft.default)(sn),"_onGridRenderedMemoizer",(0,Et.default)()),(0,ht.default)((0,ft.default)(sn),"_onScrollMemoizer",(0,Et.default)(!1)),(0,ht.default)((0,ft.default)(sn),"_deferredInvalidateColumnIndex",null),(0,ht.default)((0,ft.default)(sn),"_deferredInvalidateRowIndex",null),(0,ht.default)((0,ft.default)(sn),"_recomputeScrollLeftFlag",!1),(0,ht.default)((0,ft.default)(sn),"_recomputeScrollTopFlag",!1),(0,ht.default)((0,ft.default)(sn),"_horizontalScrollBarSize",0),(0,ht.default)((0,ft.default)(sn),"_verticalScrollBarSize",0),(0,ht.default)((0,ft.default)(sn),"_scrollbarPresenceChanged",!1),(0,ht.default)((0,ft.default)(sn),"_scrollingContainer",void 0),(0,ht.default)((0,ft.default)(sn),"_childrenToDisplay",void 0),(0,ht.default)((0,ft.default)(sn),"_columnStartIndex",void 0),(0,ht.default)((0,ft.default)(sn),"_columnStopIndex",void 0),(0,ht.default)((0,ft.default)(sn),"_rowStartIndex",void 0),(0,ht.default)((0,ft.default)(sn),"_rowStopIndex",void 0),(0,ht.default)((0,ft.default)(sn),"_renderedColumnStartIndex",0),(0,ht.default)((0,ft.default)(sn),"_renderedColumnStopIndex",0),(0,ht.default)((0,ft.default)(sn),"_renderedRowStartIndex",0),(0,ht.default)((0,ft.default)(sn),"_renderedRowStopIndex",0),(0,ht.default)((0,ft.default)(sn),"_initialScrollTop",void 0),(0,ht.default)((0,ft.default)(sn),"_initialScrollLeft",void 0),(0,ht.default)((0,ft.default)(sn),"_disablePointerEventsTimeoutId",void 0),(0,ht.default)((0,ft.default)(sn),"_styleCache",{}),(0,ht.default)((0,ft.default)(sn),"_cellCache",{}),(0,ht.default)((0,ft.default)(sn),"_debounceScrollEndedCallback",function(){sn._disablePointerEventsTimeoutId=null,sn.setState({isScrolling:!1,needToResetStyleCache:!1})}),(0,ht.default)((0,ft.default)(sn),"_invokeOnGridRenderedHelper",function(){var _n=sn.props.onSectionRendered;sn._onGridRenderedMemoizer({callback:_n,indices:{columnOverscanStartIndex:sn._columnStartIndex,columnOverscanStopIndex:sn._columnStopIndex,columnStartIndex:sn._renderedColumnStartIndex,columnStopIndex:sn._renderedColumnStopIndex,rowOverscanStartIndex:sn._rowStartIndex,rowOverscanStopIndex:sn._rowStopIndex,rowStartIndex:sn._renderedRowStartIndex,rowStopIndex:sn._renderedRowStopIndex}})}),(0,ht.default)((0,ft.default)(sn),"_setScrollingContainerRef",function(_n){sn._scrollingContainer=_n}),(0,ht.default)((0,ft.default)(sn),"_onScroll",function(_n){_n.target===sn._scrollingContainer&&sn.handleScrollEvent(_n.target)});var Sn=new Tt.default({cellCount:An.columnCount,cellSizeGetter:function(En){return gn._wrapSizeGetter(An.columnWidth)(En)},estimatedCellSize:gn._getEstimatedColumnSize(An)}),In=new Tt.default({cellCount:An.rowCount,cellSizeGetter:function(En){return gn._wrapSizeGetter(An.rowHeight)(En)},estimatedCellSize:gn._getEstimatedRowSize(An)});return sn.state={instanceProps:{columnSizeAndPositionManager:Sn,rowSizeAndPositionManager:In,prevColumnWidth:An.columnWidth,prevRowHeight:An.rowHeight,prevColumnCount:An.columnCount,prevRowCount:An.rowCount,prevIsScrolling:An.isScrolling===!0,prevScrollToColumn:An.scrollToColumn,prevScrollToRow:An.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:xt.SCROLL_DIRECTION_FORWARD,scrollDirectionVertical:xt.SCROLL_DIRECTION_FORWARD,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},An.scrollToRow>0&&(sn._initialScrollTop=sn._getCalculatedScrollTop(An,sn.state)),An.scrollToColumn>0&&(sn._initialScrollLeft=sn._getCalculatedScrollLeft(An,sn.state)),sn}return(0,st.default)(gn,[{key:"getOffsetForCell",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Sn=sn.alignment,In=Sn===void 0?this.props.scrollToAlignment:Sn,_n=sn.columnIndex,En=_n===void 0?this.props.scrollToColumn:_n,Ln=sn.rowIndex,wn=Ln===void 0?this.props.scrollToRow:Ln,Dn=Ft({},this.props,{scrollToAlignment:In,scrollToColumn:En,scrollToRow:wn});return{scrollLeft:this._getCalculatedScrollLeft(Dn),scrollTop:this._getCalculatedScrollTop(Dn)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(sn){var Sn=sn.scrollLeft,In=Sn===void 0?0:Sn,_n=sn.scrollTop,En=_n===void 0?0:_n;if(!(En<0)){this._debounceScrollEnded();var Ln=this.props,wn=Ln.autoHeight,Dn=Ln.autoWidth,$n=Ln.height,Gn=Ln.width,Jn=this.state.instanceProps,zn=Jn.scrollbarSize,Qn=Jn.rowSizeAndPositionManager.getTotalSize(),Bn=Jn.columnSizeAndPositionManager.getTotalSize(),jn=Math.min(Math.max(0,Bn-Gn+zn),In),Ar=Math.min(Math.max(0,Qn-$n+zn),En);if(this.state.scrollLeft!==jn||this.state.scrollTop!==Ar){var Er=jn!==this.state.scrollLeft?jn>this.state.scrollLeft?xt.SCROLL_DIRECTION_FORWARD:xt.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionHorizontal,Pr=Ar!==this.state.scrollTop?Ar>this.state.scrollTop?xt.SCROLL_DIRECTION_FORWARD:xt.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionVertical,Nr={isScrolling:!0,scrollDirectionHorizontal:Er,scrollDirectionVertical:Pr,scrollPositionChangeReason:Vt.OBSERVED};wn||(Nr.scrollTop=Ar),Dn||(Nr.scrollLeft=jn),Nr.needToResetStyleCache=!1,this.setState(Nr)}this._invokeOnScrollMemoizer({scrollLeft:jn,scrollTop:Ar,totalColumnsWidth:Bn,totalRowsHeight:Qn})}}},{key:"invalidateCellSizeAfterRender",value:function(sn){var Sn=sn.columnIndex,In=sn.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,Sn):Sn,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,In):In}},{key:"measureAllCells",value:function(){var sn=this.props,Sn=sn.columnCount,In=sn.rowCount,_n=this.state.instanceProps;_n.columnSizeAndPositionManager.getSizeAndPositionOfCell(Sn-1),_n.rowSizeAndPositionManager.getSizeAndPositionOfCell(In-1)}},{key:"recomputeGridSize",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Sn=sn.columnIndex,In=Sn===void 0?0:Sn,_n=sn.rowIndex,En=_n===void 0?0:_n,Ln=this.props,wn=Ln.scrollToColumn,Dn=Ln.scrollToRow,$n=this.state.instanceProps;$n.columnSizeAndPositionManager.resetCell(In),$n.rowSizeAndPositionManager.resetCell(En),this._recomputeScrollLeftFlag=wn>=0&&(this.state.scrollDirectionHorizontal===xt.SCROLL_DIRECTION_FORWARD?In<=wn:In>=wn),this._recomputeScrollTopFlag=Dn>=0&&(this.state.scrollDirectionVertical===xt.SCROLL_DIRECTION_FORWARD?En<=Dn:En>=Dn),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(sn){var Sn=sn.columnIndex,In=sn.rowIndex,_n=this.props.columnCount,En=this.props;_n>1&&Sn!==void 0&&this._updateScrollLeftForScrollToColumn(Ft({},En,{scrollToColumn:Sn})),In!==void 0&&this._updateScrollTopForScrollToRow(Ft({},En,{scrollToRow:In}))}},{key:"componentDidMount",value:function(){var sn=this.props,Sn=sn.getScrollbarSize,In=sn.height,_n=sn.scrollLeft,En=sn.scrollToColumn,Ln=sn.scrollTop,wn=sn.scrollToRow,Dn=sn.width,$n=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),$n.scrollbarSizeMeasured||this.setState(function(zn){var Qn=Ft({},zn,{needToResetStyleCache:!1});return Qn.instanceProps.scrollbarSize=Sn(),Qn.instanceProps.scrollbarSizeMeasured=!0,Qn}),typeof _n=="number"&&_n>=0||typeof Ln=="number"&&Ln>=0){var Gn=gn._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:_n,scrollTop:Ln});Gn&&(Gn.needToResetStyleCache=!1,this.setState(Gn))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var Jn=In>0&&Dn>0;En>=0&&Jn&&this._updateScrollLeftForScrollToColumn(),wn>=0&&Jn&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:_n||0,scrollTop:Ln||0,totalColumnsWidth:$n.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:$n.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(sn,Sn){var In=this,_n=this.props,En=_n.autoHeight,Ln=_n.autoWidth,wn=_n.columnCount,Dn=_n.height,$n=_n.rowCount,Gn=_n.scrollToAlignment,Jn=_n.scrollToColumn,zn=_n.scrollToRow,Qn=_n.width,Bn=this.state,jn=Bn.scrollLeft,Ar=Bn.scrollPositionChangeReason,Er=Bn.scrollTop,Pr=Bn.instanceProps;this._handleInvalidatedGridSize();var Nr=wn>0&&sn.columnCount===0||$n>0&&sn.rowCount===0;Ar===Vt.REQUESTED&&(!Ln&&jn>=0&&(jn!==this._scrollingContainer.scrollLeft||Nr)&&(this._scrollingContainer.scrollLeft=jn),!En&&Er>=0&&(Er!==this._scrollingContainer.scrollTop||Nr)&&(this._scrollingContainer.scrollTop=Er));var Ir=(sn.width===0||sn.height===0)&&Dn>0&&Qn>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):(0,At.default)({cellSizeAndPositionManager:Pr.columnSizeAndPositionManager,previousCellsCount:sn.columnCount,previousCellSize:sn.columnWidth,previousScrollToAlignment:sn.scrollToAlignment,previousScrollToIndex:sn.scrollToColumn,previousSize:sn.width,scrollOffset:jn,scrollToAlignment:Gn,scrollToIndex:Jn,size:Qn,sizeJustIncreasedFromZero:Ir,updateScrollIndexCallback:function(){return In._updateScrollLeftForScrollToColumn(In.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):(0,At.default)({cellSizeAndPositionManager:Pr.rowSizeAndPositionManager,previousCellsCount:sn.rowCount,previousCellSize:sn.rowHeight,previousScrollToAlignment:sn.scrollToAlignment,previousScrollToIndex:sn.scrollToRow,previousSize:sn.height,scrollOffset:Er,scrollToAlignment:Gn,scrollToIndex:zn,size:Dn,sizeJustIncreasedFromZero:Ir,updateScrollIndexCallback:function(){return In._updateScrollTopForScrollToRow(In.props)}}),this._invokeOnGridRenderedHelper(),jn!==Sn.scrollLeft||Er!==Sn.scrollTop){var no=Pr.rowSizeAndPositionManager.getTotalSize(),ro=Pr.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:jn,scrollTop:Er,totalColumnsWidth:ro,totalRowsHeight:no})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&(0,Rt.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var sn=this.props,Sn=sn.autoContainerWidth,In=sn.autoHeight,_n=sn.autoWidth,En=sn.className,Ln=sn.containerProps,wn=sn.containerRole,Dn=sn.containerStyle,$n=sn.height,Gn=sn.id,Jn=sn.noContentRenderer,zn=sn.role,Qn=sn.style,Bn=sn.tabIndex,jn=sn.width,Ar=this.state,Er=Ar.instanceProps,Pr=Ar.needToResetStyleCache,Nr=this._isScrolling(),Ir={boxSizing:"border-box",direction:"ltr",height:In?"auto":$n,position:"relative",width:_n?"auto":jn,WebkitOverflowScrolling:"touch",willChange:"transform"};Pr&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var no=Er.columnSizeAndPositionManager.getTotalSize(),ro=Er.rowSizeAndPositionManager.getTotalSize(),ao=ro>$n?Er.scrollbarSize:0,Xr=no>jn?Er.scrollbarSize:0;(Xr!==this._horizontalScrollBarSize||ao!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=Xr,this._verticalScrollBarSize=ao,this._scrollbarPresenceChanged=!0),Ir.overflowX=no+ao<=jn?"hidden":"auto",Ir.overflowY=ro+Xr<=$n?"hidden":"auto";var Jr=this._childrenToDisplay,So=Jr.length===0&&$n>0&&jn>0;return mt.createElement("div",(0,rt.default)({ref:this._setScrollingContainerRef},Ln,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:(0,yt.default)("ReactVirtualized__Grid",En),id:Gn,onScroll:this._onScroll,role:zn,style:Ft({},Ir,{},Qn),tabIndex:Bn}),Jr.length>0&&mt.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:wn,style:Ft({width:Sn?"auto":no,height:ro,maxWidth:no,maxHeight:ro,overflow:"hidden",pointerEvents:Nr?"none":"",position:"relative"},Dn)},Jr),So&&Jn())}},{key:"_calculateChildrenToRender",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,In=sn.cellRenderer,_n=sn.cellRangeRenderer,En=sn.columnCount,Ln=sn.deferredMeasurementCache,wn=sn.height,Dn=sn.overscanColumnCount,$n=sn.overscanIndicesGetter,Gn=sn.overscanRowCount,Jn=sn.rowCount,zn=sn.width,Qn=sn.isScrollingOptOut,Bn=Sn.scrollDirectionHorizontal,jn=Sn.scrollDirectionVertical,Ar=Sn.instanceProps,Er=this._initialScrollTop>0?this._initialScrollTop:Sn.scrollTop,Pr=this._initialScrollLeft>0?this._initialScrollLeft:Sn.scrollLeft,Nr=this._isScrolling(sn,Sn);if(this._childrenToDisplay=[],wn>0&&zn>0){var Ir=Ar.columnSizeAndPositionManager.getVisibleCellRange({containerSize:zn,offset:Pr}),no=Ar.rowSizeAndPositionManager.getVisibleCellRange({containerSize:wn,offset:Er}),ro=Ar.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:zn,offset:Pr}),ao=Ar.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:wn,offset:Er});this._renderedColumnStartIndex=Ir.start,this._renderedColumnStopIndex=Ir.stop,this._renderedRowStartIndex=no.start,this._renderedRowStopIndex=no.stop;var Xr=$n({direction:"horizontal",cellCount:En,overscanCellsCount:Dn,scrollDirection:Bn,startIndex:typeof Ir.start=="number"?Ir.start:0,stopIndex:typeof Ir.stop=="number"?Ir.stop:-1}),Jr=$n({direction:"vertical",cellCount:Jn,overscanCellsCount:Gn,scrollDirection:jn,startIndex:typeof no.start=="number"?no.start:0,stopIndex:typeof no.stop=="number"?no.stop:-1}),So=Xr.overscanStartIndex,va=Xr.overscanStopIndex,$o=Jr.overscanStartIndex,Qr=Jr.overscanStopIndex;if(Ln){if(!Ln.hasFixedHeight()){for(var jo=$o;jo<=Qr;jo++)if(!Ln.has(jo,0)){So=0,va=En-1;break}}if(!Ln.hasFixedWidth()){for(var Bo=So;Bo<=va;Bo++)if(!Ln.has(0,Bo)){$o=0,Qr=Jn-1;break}}}this._childrenToDisplay=_n({cellCache:this._cellCache,cellRenderer:In,columnSizeAndPositionManager:Ar.columnSizeAndPositionManager,columnStartIndex:So,columnStopIndex:va,deferredMeasurementCache:Ln,horizontalOffsetAdjustment:ro,isScrolling:Nr,isScrollingOptOut:Qn,parent:this,rowSizeAndPositionManager:Ar.rowSizeAndPositionManager,rowStartIndex:$o,rowStopIndex:Qr,scrollLeft:Pr,scrollTop:Er,styleCache:this._styleCache,verticalOffsetAdjustment:ao,visibleColumnIndices:Ir,visibleRowIndices:no}),this._columnStartIndex=So,this._columnStopIndex=va,this._rowStartIndex=$o,this._rowStopIndex=Qr}}},{key:"_debounceScrollEnded",value:function(){var sn=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&(0,Rt.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=(0,Rt.requestAnimationTimeout)(this._debounceScrollEndedCallback,sn)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var sn=this._deferredInvalidateColumnIndex,Sn=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:sn,rowIndex:Sn})}}},{key:"_invokeOnScrollMemoizer",value:function(sn){var Sn=this,In=sn.scrollLeft,_n=sn.scrollTop,En=sn.totalColumnsWidth,Ln=sn.totalRowsHeight;this._onScrollMemoizer({callback:function(Dn){var $n=Dn.scrollLeft,Gn=Dn.scrollTop,Jn=Sn.props,zn=Jn.height,Qn=Jn.onScroll,Bn=Jn.width;Qn({clientHeight:zn,clientWidth:Bn,scrollHeight:Ln,scrollLeft:$n,scrollTop:Gn,scrollWidth:En})},indices:{scrollLeft:In,scrollTop:_n}})}},{key:"_isScrolling",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(sn,"isScrolling")?Boolean(sn.isScrolling):Boolean(Sn.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var sn=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,sn({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(sn){var Sn=sn.scrollLeft,In=sn.scrollTop,_n=gn._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:Sn,scrollTop:In});_n&&(_n.needToResetStyleCache=!1,this.setState(_n))}},{key:"_getCalculatedScrollLeft",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return gn._getCalculatedScrollLeft(sn,Sn)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,In=gn._getScrollLeftForScrollToColumnStateUpdate(sn,Sn);In&&(In.needToResetStyleCache=!1,this.setState(In))}},{key:"_getCalculatedScrollTop",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return gn._getCalculatedScrollTop(sn,Sn)}},{key:"_resetStyleCache",value:function(){var sn=this._styleCache,Sn=this._cellCache,In=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var _n=this._rowStartIndex;_n<=this._rowStopIndex;_n++)for(var En=this._columnStartIndex;En<=this._columnStopIndex;En++){var Ln="".concat(_n,"-").concat(En);this._styleCache[Ln]=sn[Ln],In&&(this._cellCache[Ln]=Sn[Ln])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,In=gn._getScrollTopForScrollToRowStateUpdate(sn,Sn);In&&(In.needToResetStyleCache=!1,this.setState(In))}}],[{key:"getDerivedStateFromProps",value:function(sn,Sn){var In={};sn.columnCount===0&&Sn.scrollLeft!==0||sn.rowCount===0&&Sn.scrollTop!==0?(In.scrollLeft=0,In.scrollTop=0):(sn.scrollLeft!==Sn.scrollLeft&&sn.scrollToColumn<0||sn.scrollTop!==Sn.scrollTop&&sn.scrollToRow<0)&&Object.assign(In,gn._getScrollToPositionStateUpdate({prevState:Sn,scrollLeft:sn.scrollLeft,scrollTop:sn.scrollTop}));var _n=Sn.instanceProps;In.needToResetStyleCache=!1,(sn.columnWidth!==_n.prevColumnWidth||sn.rowHeight!==_n.prevRowHeight)&&(In.needToResetStyleCache=!0),_n.columnSizeAndPositionManager.configure({cellCount:sn.columnCount,estimatedCellSize:gn._getEstimatedColumnSize(sn),cellSizeGetter:gn._wrapSizeGetter(sn.columnWidth)}),_n.rowSizeAndPositionManager.configure({cellCount:sn.rowCount,estimatedCellSize:gn._getEstimatedRowSize(sn),cellSizeGetter:gn._wrapSizeGetter(sn.rowHeight)}),(_n.prevColumnCount===0||_n.prevRowCount===0)&&(_n.prevColumnCount=0,_n.prevRowCount=0),sn.autoHeight&&sn.isScrolling===!1&&_n.prevIsScrolling===!0&&Object.assign(In,{isScrolling:!1});var En,Ln;return(0,vt.default)({cellCount:_n.prevColumnCount,cellSize:typeof _n.prevColumnWidth=="number"?_n.prevColumnWidth:null,computeMetadataCallback:function(){return _n.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:sn,nextCellsCount:sn.columnCount,nextCellSize:typeof sn.columnWidth=="number"?sn.columnWidth:null,nextScrollToIndex:sn.scrollToColumn,scrollToIndex:_n.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){En=gn._getScrollLeftForScrollToColumnStateUpdate(sn,Sn)}}),(0,vt.default)({cellCount:_n.prevRowCount,cellSize:typeof _n.prevRowHeight=="number"?_n.prevRowHeight:null,computeMetadataCallback:function(){return _n.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:sn,nextCellsCount:sn.rowCount,nextCellSize:typeof sn.rowHeight=="number"?sn.rowHeight:null,nextScrollToIndex:sn.scrollToRow,scrollToIndex:_n.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){Ln=gn._getScrollTopForScrollToRowStateUpdate(sn,Sn)}}),_n.prevColumnCount=sn.columnCount,_n.prevColumnWidth=sn.columnWidth,_n.prevIsScrolling=sn.isScrolling===!0,_n.prevRowCount=sn.rowCount,_n.prevRowHeight=sn.rowHeight,_n.prevScrollToColumn=sn.scrollToColumn,_n.prevScrollToRow=sn.scrollToRow,_n.scrollbarSize=sn.getScrollbarSize(),_n.scrollbarSize===void 0?(_n.scrollbarSizeMeasured=!1,_n.scrollbarSize=0):_n.scrollbarSizeMeasured=!0,In.instanceProps=_n,Ft({},In,{},En,{},Ln)}},{key:"_getEstimatedColumnSize",value:function(sn){return typeof sn.columnWidth=="number"?sn.columnWidth:sn.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(sn){return typeof sn.rowHeight=="number"?sn.rowHeight:sn.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(sn){var Sn=sn.prevState,In=sn.scrollLeft,_n=sn.scrollTop,En={scrollPositionChangeReason:Vt.REQUESTED};return typeof In=="number"&&In>=0&&(En.scrollDirectionHorizontal=In>Sn.scrollLeft?xt.SCROLL_DIRECTION_FORWARD:xt.SCROLL_DIRECTION_BACKWARD,En.scrollLeft=In),typeof _n=="number"&&_n>=0&&(En.scrollDirectionVertical=_n>Sn.scrollTop?xt.SCROLL_DIRECTION_FORWARD:xt.SCROLL_DIRECTION_BACKWARD,En.scrollTop=_n),typeof In=="number"&&In>=0&&In!==Sn.scrollLeft||typeof _n=="number"&&_n>=0&&_n!==Sn.scrollTop?En:{}}},{key:"_wrapSizeGetter",value:function(sn){return typeof sn=="function"?sn:function(){return sn}}},{key:"_getCalculatedScrollLeft",value:function(sn,Sn){var In=sn.columnCount,_n=sn.height,En=sn.scrollToAlignment,Ln=sn.scrollToColumn,wn=sn.width,Dn=Sn.scrollLeft,$n=Sn.instanceProps;if(In>0){var Gn=In-1,Jn=Ln<0?Gn:Math.min(Gn,Ln),zn=$n.rowSizeAndPositionManager.getTotalSize(),Qn=$n.scrollbarSizeMeasured&&zn>_n?$n.scrollbarSize:0;return $n.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:En,containerSize:wn-Qn,currentOffset:Dn,targetIndex:Jn})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(sn,Sn){var In=Sn.scrollLeft,_n=gn._getCalculatedScrollLeft(sn,Sn);return typeof _n=="number"&&_n>=0&&In!==_n?gn._getScrollToPositionStateUpdate({prevState:Sn,scrollLeft:_n,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(sn,Sn){var In=sn.height,_n=sn.rowCount,En=sn.scrollToAlignment,Ln=sn.scrollToRow,wn=sn.width,Dn=Sn.scrollTop,$n=Sn.instanceProps;if(_n>0){var Gn=_n-1,Jn=Ln<0?Gn:Math.min(Gn,Ln),zn=$n.columnSizeAndPositionManager.getTotalSize(),Qn=$n.scrollbarSizeMeasured&&zn>wn?$n.scrollbarSize:0;return $n.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:En,containerSize:In-Qn,currentOffset:Dn,targetIndex:Jn})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(sn,Sn){var In=Sn.scrollTop,_n=gn._getCalculatedScrollTop(sn,Sn);return typeof _n=="number"&&_n>=0&&In!==_n?gn._getScrollToPositionStateUpdate({prevState:Sn,scrollLeft:-1,scrollTop:_n}):{}}}]),gn}(mt.PureComponent),(0,ht.default)(It,"propTypes",null),kt);(0,ht.default)(Ut,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:Ct.default,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:$t.default,noContentRenderer:Zt,onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:xt.default,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:zt,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),(0,Ot.polyfill)(Ut);var Xt=Ut;et.default=Xt}(Grid)),Grid}var accessibilityOverscanIndicesGetter={},hasRequiredAccessibilityOverscanIndicesGetter;function requireAccessibilityOverscanIndicesGetter(){return hasRequiredAccessibilityOverscanIndicesGetter||(hasRequiredAccessibilityOverscanIndicesGetter=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=st,et.SCROLL_DIRECTION_VERTICAL=et.SCROLL_DIRECTION_HORIZONTAL=et.SCROLL_DIRECTION_FORWARD=et.SCROLL_DIRECTION_BACKWARD=void 0,requireTypes$5();var tt=-1;et.SCROLL_DIRECTION_BACKWARD=tt;var nt=1;et.SCROLL_DIRECTION_FORWARD=nt;var rt="horizontal";et.SCROLL_DIRECTION_HORIZONTAL=rt;var ot="vertical";et.SCROLL_DIRECTION_VERTICAL=ot;function st(ut){var ct=ut.cellCount,ft=ut.overscanCellsCount,pt=ut.scrollDirection,ht=ut.startIndex,mt=ut.stopIndex;return ft=Math.max(1,ft),pt===nt?{overscanStartIndex:Math.max(0,ht-1),overscanStopIndex:Math.min(ct-1,mt+ft)}:{overscanStartIndex:Math.max(0,ht-ft),overscanStopIndex:Math.min(ct-1,mt+1)}}}(accessibilityOverscanIndicesGetter)),accessibilityOverscanIndicesGetter}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"default",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"Grid",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"accessibilityOverscanIndicesGetter",{enumerable:!0,get:function(){return rt.default}}),Object.defineProperty(et,"defaultCellRangeRenderer",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(et,"defaultOverscanIndicesGetter",{enumerable:!0,get:function(){return st.default}}),Object.defineProperty(et,"bpfrpt_proptype_NoContentRenderer",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_NoContentRenderer}}),Object.defineProperty(et,"bpfrpt_proptype_Alignment",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_Alignment}}),Object.defineProperty(et,"bpfrpt_proptype_CellPosition",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_CellPosition}}),Object.defineProperty(et,"bpfrpt_proptype_CellSize",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_CellSize}}),Object.defineProperty(et,"bpfrpt_proptype_OverscanIndicesGetter",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_OverscanIndicesGetter}}),Object.defineProperty(et,"bpfrpt_proptype_RenderedSection",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_RenderedSection}}),Object.defineProperty(et,"bpfrpt_proptype_CellRendererParams",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_CellRendererParams}}),Object.defineProperty(et,"bpfrpt_proptype_Scroll",{enumerable:!0,get:function(){return ut.bpfrpt_proptype_Scroll}});var nt=tt(requireGrid()),rt=tt(requireAccessibilityOverscanIndicesGetter()),ot=tt(requireDefaultCellRangeRenderer()),st=tt(requireDefaultOverscanIndicesGetter()),ut=requireTypes$5()})(Grid$1);var types$4={},hasRequiredTypes$4;function requireTypes$4(){if(hasRequiredTypes$4)return types$4;hasRequiredTypes$4=1;var et=interopRequireDefault.exports;Object.defineProperty(types$4,"__esModule",{value:!0}),types$4.bpfrpt_proptype_ScrollIndices=void 0,et(propTypes$1.exports);var tt=null;return types$4.bpfrpt_proptype_ScrollIndices=tt,types$4}var hasRequiredArrowKeyStepper;function requireArrowKeyStepper(){return hasRequiredArrowKeyStepper||(hasRequiredArrowKeyStepper=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=tt(require$$3$1),ot=tt(require$$4),st=tt(require$$5),ut=tt(require$$6),ct=tt(require$$7),ft=tt(require$$8),pt=tt(require$$2$2),ht=nt(react.exports),mt=require$$3;requireTypes$4(),tt(propTypes$1.exports);var yt,vt;function Tt(Ct,$t){var Ot=Object.keys(Ct);if(Object.getOwnPropertySymbols){var Rt=Object.getOwnPropertySymbols(Ct);$t&&(Rt=Rt.filter(function(It){return Object.getOwnPropertyDescriptor(Ct,It).enumerable})),Ot.push.apply(Ot,Rt)}return Ot}function Et(Ct){for(var $t=1;$t<arguments.length;$t++){var Ot=arguments[$t]!=null?arguments[$t]:{};$t%2?Tt(Ot,!0).forEach(function(Rt){(0,pt.default)(Ct,Rt,Ot[Rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ct,Object.getOwnPropertyDescriptors(Ot)):Tt(Ot).forEach(function(Rt){Object.defineProperty(Ct,Rt,Object.getOwnPropertyDescriptor(Ot,Rt))})}return Ct}var xt=(vt=yt=function(Ct){(0,ft.default)($t,Ct);function $t(){var Ot,Rt;(0,rt.default)(this,$t);for(var It=arguments.length,kt=new Array(It),Mt=0;Mt<It;Mt++)kt[Mt]=arguments[Mt];return Rt=(0,st.default)(this,(Ot=(0,ut.default)($t)).call.apply(Ot,[this].concat(kt))),(0,pt.default)((0,ct.default)(Rt),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),(0,pt.default)((0,ct.default)(Rt),"_columnStartIndex",0),(0,pt.default)((0,ct.default)(Rt),"_columnStopIndex",0),(0,pt.default)((0,ct.default)(Rt),"_rowStartIndex",0),(0,pt.default)((0,ct.default)(Rt),"_rowStopIndex",0),(0,pt.default)((0,ct.default)(Rt),"_onKeyDown",function(Ft){var zt=Rt.props,Vt=zt.columnCount,Zt=zt.disabled,Ut=zt.mode,Xt=zt.rowCount;if(!Zt){var Jt=Rt._getScrollState(),gn=Jt.scrollToColumn,An=Jt.scrollToRow,sn=Rt._getScrollState(),Sn=sn.scrollToColumn,In=sn.scrollToRow;switch(Ft.key){case"ArrowDown":In=Math.min(Ut==="cells"?In+1:Rt._rowStopIndex+1,Xt-1);break;case"ArrowLeft":Sn=Math.max(Ut==="cells"?Sn-1:Rt._columnStartIndex-1,0);break;case"ArrowRight":Sn=Math.min(Ut==="cells"?Sn+1:Rt._columnStopIndex+1,Vt-1);break;case"ArrowUp":In=Math.max(Ut==="cells"?In-1:Rt._rowStartIndex-1,0);break}(Sn!==gn||In!==An)&&(Ft.preventDefault(),Rt._updateScrollState({scrollToColumn:Sn,scrollToRow:In}))}}),(0,pt.default)((0,ct.default)(Rt),"_onSectionRendered",function(Ft){var zt=Ft.columnStartIndex,Vt=Ft.columnStopIndex,Zt=Ft.rowStartIndex,Ut=Ft.rowStopIndex;Rt._columnStartIndex=zt,Rt._columnStopIndex=Vt,Rt._rowStartIndex=Zt,Rt._rowStopIndex=Ut}),Rt}return(0,ot.default)($t,[{key:"setScrollIndexes",value:function(Rt){var It=Rt.scrollToColumn,kt=Rt.scrollToRow;this.setState({scrollToRow:kt,scrollToColumn:It})}},{key:"render",value:function(){var Rt=this.props,It=Rt.className,kt=Rt.children,Mt=this._getScrollState(),Ft=Mt.scrollToColumn,zt=Mt.scrollToRow;return ht.createElement("div",{className:It,onKeyDown:this._onKeyDown},kt({onSectionRendered:this._onSectionRendered,scrollToColumn:Ft,scrollToRow:zt}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(Rt){var It=Rt.scrollToColumn,kt=Rt.scrollToRow,Mt=this.props,Ft=Mt.isControlled,zt=Mt.onScrollToChange;typeof zt=="function"&&zt({scrollToColumn:It,scrollToRow:kt}),Ft||this.setState({scrollToColumn:It,scrollToRow:kt})}}],[{key:"getDerivedStateFromProps",value:function(Rt,It){return Rt.isControlled?{}:Rt.scrollToColumn!==It.instanceProps.prevScrollToColumn||Rt.scrollToRow!==It.instanceProps.prevScrollToRow?Et({},It,{scrollToColumn:Rt.scrollToColumn,scrollToRow:Rt.scrollToRow,instanceProps:{prevScrollToColumn:Rt.scrollToColumn,prevScrollToRow:Rt.scrollToRow}}):{}}}]),$t}(ht.PureComponent),(0,pt.default)(yt,"propTypes",null),vt);(0,pt.default)(xt,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),(0,mt.polyfill)(xt);var At=xt;et.default=At}(ArrowKeyStepper)),ArrowKeyStepper}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"default",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"ArrowKeyStepper",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"bpfrpt_proptype_ScrollIndices",{enumerable:!0,get:function(){return rt.bpfrpt_proptype_ScrollIndices}});var nt=tt(requireArrowKeyStepper()),rt=requireTypes$4()})(ArrowKeyStepper$1);var AutoSizer$2={},AutoSizer$1={},detectElementResize={},hasRequiredDetectElementResize;function requireDetectElementResize(){return hasRequiredDetectElementResize||(hasRequiredDetectElementResize=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt;function tt(nt,rt){var ot;typeof rt<"u"?ot=rt:typeof window<"u"?ot=window:typeof self<"u"?ot=self:ot=commonjsGlobal$1;var st=typeof ot.document<"u"&&ot.document.attachEvent;if(!st){var ut=function(){var Ft=ot.requestAnimationFrame||ot.mozRequestAnimationFrame||ot.webkitRequestAnimationFrame||function(zt){return ot.setTimeout(zt,20)};return function(zt){return Ft(zt)}}(),ct=function(){var Ft=ot.cancelAnimationFrame||ot.mozCancelAnimationFrame||ot.webkitCancelAnimationFrame||ot.clearTimeout;return function(zt){return Ft(zt)}}(),ft=function(zt){var Vt=zt.__resizeTriggers__,Zt=Vt.firstElementChild,Ut=Vt.lastElementChild,Xt=Zt.firstElementChild;Ut.scrollLeft=Ut.scrollWidth,Ut.scrollTop=Ut.scrollHeight,Xt.style.width=Zt.offsetWidth+1+"px",Xt.style.height=Zt.offsetHeight+1+"px",Zt.scrollLeft=Zt.scrollWidth,Zt.scrollTop=Zt.scrollHeight},pt=function(zt){return zt.offsetWidth!=zt.__resizeLast__.width||zt.offsetHeight!=zt.__resizeLast__.height},ht=function(zt){if(!(zt.target.className&&typeof zt.target.className.indexOf=="function"&&zt.target.className.indexOf("contract-trigger")<0&&zt.target.className.indexOf("expand-trigger")<0)){var Vt=this;ft(this),this.__resizeRAF__&&ct(this.__resizeRAF__),this.__resizeRAF__=ut(function(){pt(Vt)&&(Vt.__resizeLast__.width=Vt.offsetWidth,Vt.__resizeLast__.height=Vt.offsetHeight,Vt.__resizeListeners__.forEach(function(Zt){Zt.call(Vt,zt)}))})}},mt=!1,yt="",vt="animationstart",Tt="Webkit Moz O ms".split(" "),Et="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),xt="";{var At=ot.document.createElement("fakeelement");if(At.style.animationName!==void 0&&(mt=!0),mt===!1){for(var Ct=0;Ct<Tt.length;Ct++)if(At.style[Tt[Ct]+"AnimationName"]!==void 0){xt=Tt[Ct],yt="-"+xt.toLowerCase()+"-",vt=Et[Ct],mt=!0;break}}}var $t="resizeanim",Ot="@"+yt+"keyframes "+$t+" { from { opacity: 0; } to { opacity: 0; } } ",Rt=yt+"animation: 1ms "+$t+"; "}var It=function(zt){if(!zt.getElementById("detectElementResize")){var Vt=(Ot||"")+".resize-triggers { "+(Rt||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',Zt=zt.head||zt.getElementsByTagName("head")[0],Ut=zt.createElement("style");Ut.id="detectElementResize",Ut.type="text/css",nt!=null&&Ut.setAttribute("nonce",nt),Ut.styleSheet?Ut.styleSheet.cssText=Vt:Ut.appendChild(zt.createTextNode(Vt)),Zt.appendChild(Ut)}},kt=function(zt,Vt){if(st)zt.attachEvent("onresize",Vt);else{if(!zt.__resizeTriggers__){var Zt=zt.ownerDocument,Ut=ot.getComputedStyle(zt);Ut&&Ut.position=="static"&&(zt.style.position="relative"),It(Zt),zt.__resizeLast__={},zt.__resizeListeners__=[],(zt.__resizeTriggers__=Zt.createElement("div")).className="resize-triggers";var Xt='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var Jt=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return Xt}});zt.__resizeTriggers__.innerHTML=Jt.createHTML("")}else zt.__resizeTriggers__.innerHTML=Xt;zt.appendChild(zt.__resizeTriggers__),ft(zt),zt.addEventListener("scroll",ht,!0),vt&&(zt.__resizeTriggers__.__animationListener__=function(An){An.animationName==$t&&ft(zt)},zt.__resizeTriggers__.addEventListener(vt,zt.__resizeTriggers__.__animationListener__))}zt.__resizeListeners__.push(Vt)}},Mt=function(zt,Vt){if(st)zt.detachEvent("onresize",Vt);else if(zt.__resizeListeners__.splice(zt.__resizeListeners__.indexOf(Vt),1),!zt.__resizeListeners__.length){zt.removeEventListener("scroll",ht,!0),zt.__resizeTriggers__.__animationListener__&&(zt.__resizeTriggers__.removeEventListener(vt,zt.__resizeTriggers__.__animationListener__),zt.__resizeTriggers__.__animationListener__=null);try{zt.__resizeTriggers__=!zt.removeChild(zt.__resizeTriggers__)}catch{}}};return{addResizeListener:kt,removeResizeListener:Mt}}}(detectElementResize)),detectElementResize}var hasRequiredAutoSizer;function requireAutoSizer(){return hasRequiredAutoSizer||(hasRequiredAutoSizer=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=tt(require$$3$1),ot=tt(require$$4),st=tt(require$$5),ut=tt(require$$6),ct=tt(require$$7),ft=tt(require$$8),pt=tt(require$$2$2),ht=nt(react.exports),mt=tt(requireDetectElementResize());tt(propTypes$1.exports);var yt,vt;function Tt(At,Ct){var $t=Object.keys(At);if(Object.getOwnPropertySymbols){var Ot=Object.getOwnPropertySymbols(At);Ct&&(Ot=Ot.filter(function(Rt){return Object.getOwnPropertyDescriptor(At,Rt).enumerable})),$t.push.apply($t,Ot)}return $t}function Et(At){for(var Ct=1;Ct<arguments.length;Ct++){var $t=arguments[Ct]!=null?arguments[Ct]:{};Ct%2?Tt($t,!0).forEach(function(Ot){(0,pt.default)(At,Ot,$t[Ot])}):Object.getOwnPropertyDescriptors?Object.defineProperties(At,Object.getOwnPropertyDescriptors($t)):Tt($t).forEach(function(Ot){Object.defineProperty(At,Ot,Object.getOwnPropertyDescriptor($t,Ot))})}return At}var xt=(vt=yt=function(At){(0,ft.default)(Ct,At);function Ct(){var $t,Ot;(0,rt.default)(this,Ct);for(var Rt=arguments.length,It=new Array(Rt),kt=0;kt<Rt;kt++)It[kt]=arguments[kt];return Ot=(0,st.default)(this,($t=(0,ut.default)(Ct)).call.apply($t,[this].concat(It))),(0,pt.default)((0,ct.default)(Ot),"state",{height:Ot.props.defaultHeight||0,width:Ot.props.defaultWidth||0}),(0,pt.default)((0,ct.default)(Ot),"_parentNode",void 0),(0,pt.default)((0,ct.default)(Ot),"_autoSizer",void 0),(0,pt.default)((0,ct.default)(Ot),"_window",void 0),(0,pt.default)((0,ct.default)(Ot),"_detectElementResize",void 0),(0,pt.default)((0,ct.default)(Ot),"_onResize",function(){var Mt=Ot.props,Ft=Mt.disableHeight,zt=Mt.disableWidth,Vt=Mt.onResize;if(Ot._parentNode){var Zt=Ot._parentNode.offsetHeight||0,Ut=Ot._parentNode.offsetWidth||0,Xt=Ot._window||window,Jt=Xt.getComputedStyle(Ot._parentNode)||{},gn=parseInt(Jt.paddingLeft,10)||0,An=parseInt(Jt.paddingRight,10)||0,sn=parseInt(Jt.paddingTop,10)||0,Sn=parseInt(Jt.paddingBottom,10)||0,In=Zt-sn-Sn,_n=Ut-gn-An;(!Ft&&Ot.state.height!==In||!zt&&Ot.state.width!==_n)&&(Ot.setState({height:Zt-sn-Sn,width:Ut-gn-An}),Vt({height:Zt,width:Ut}))}}),(0,pt.default)((0,ct.default)(Ot),"_setRef",function(Mt){Ot._autoSizer=Mt}),Ot}return(0,ot.default)(Ct,[{key:"componentDidMount",value:function(){var Ot=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=(0,mt.default)(Ot,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var Ot=this.props,Rt=Ot.children,It=Ot.className,kt=Ot.disableHeight,Mt=Ot.disableWidth,Ft=Ot.style,zt=this.state,Vt=zt.height,Zt=zt.width,Ut={overflow:"visible"},Xt={};return kt||(Ut.height=0,Xt.height=Vt),Mt||(Ut.width=0,Xt.width=Zt),ht.createElement("div",{className:It,ref:this._setRef,style:Et({},Ut,{},Ft)},Rt(Xt))}}]),Ct}(ht.Component),(0,pt.default)(yt,"propTypes",null),vt);et.default=xt,(0,pt.default)(xt,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}})}(AutoSizer$1)),AutoSizer$1}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"default",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"AutoSizer",{enumerable:!0,get:function(){return nt.default}});var nt=tt(requireAutoSizer())})(AutoSizer$2);var CellMeasurer$1={},CellMeasurer={},types$3={},hasRequiredTypes$3;function requireTypes$3(){if(hasRequiredTypes$3)return types$3;hasRequiredTypes$3=1;var et=interopRequireDefault.exports;Object.defineProperty(types$3,"__esModule",{value:!0}),types$3.bpfrpt_proptype_CellMeasureCache=void 0,et(propTypes$1.exports);var tt=null;return types$3.bpfrpt_proptype_CellMeasureCache=tt,types$3}var hasRequiredCellMeasurer;function requireCellMeasurer(){return hasRequiredCellMeasurer||(hasRequiredCellMeasurer=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=tt(require$$3$1),ot=tt(require$$4),st=tt(require$$5),ut=tt(require$$6),ct=tt(require$$7),ft=tt(require$$8),pt=tt(require$$2$2),ht=nt(react.exports),mt=reactDom.exports;requireTypes$3(),tt(propTypes$1.exports);var yt,vt,Tt=(vt=yt=function(Et){(0,ft.default)(xt,Et);function xt(){var At,Ct;(0,rt.default)(this,xt);for(var $t=arguments.length,Ot=new Array($t),Rt=0;Rt<$t;Rt++)Ot[Rt]=arguments[Rt];return Ct=(0,st.default)(this,(At=(0,ut.default)(xt)).call.apply(At,[this].concat(Ot))),(0,pt.default)((0,ct.default)(Ct),"_child",void 0),(0,pt.default)((0,ct.default)(Ct),"_measure",function(){var It=Ct.props,kt=It.cache,Mt=It.columnIndex,Ft=Mt===void 0?0:Mt,zt=It.parent,Vt=It.rowIndex,Zt=Vt===void 0?Ct.props.index||0:Vt,Ut=Ct._getCellMeasurements(),Xt=Ut.height,Jt=Ut.width;(Xt!==kt.getHeight(Zt,Ft)||Jt!==kt.getWidth(Zt,Ft))&&(kt.set(Zt,Ft,Jt,Xt),zt&&typeof zt.recomputeGridSize=="function"&&zt.recomputeGridSize({columnIndex:Ft,rowIndex:Zt}))}),(0,pt.default)((0,ct.default)(Ct),"_registerChild",function(It){It&&!(It instanceof Element)&&console.warn("CellMeasurer registerChild expects to be passed Element or null"),Ct._child=It,It&&Ct._maybeMeasureCell()}),Ct}return(0,ot.default)(xt,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var Ct=this.props.children;return typeof Ct=="function"?Ct({measure:this._measure,registerChild:this._registerChild}):Ct}},{key:"_getCellMeasurements",value:function(){var Ct=this.props.cache,$t=this._child||(0,mt.findDOMNode)(this);if($t&&$t.ownerDocument&&$t.ownerDocument.defaultView&&$t instanceof $t.ownerDocument.defaultView.HTMLElement){var Ot=$t.style.width,Rt=$t.style.height;Ct.hasFixedWidth()||($t.style.width="auto"),Ct.hasFixedHeight()||($t.style.height="auto");var It=Math.ceil($t.offsetHeight),kt=Math.ceil($t.offsetWidth);return Ot&&($t.style.width=Ot),Rt&&($t.style.height=Rt),{height:It,width:kt}}else return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var Ct=this.props,$t=Ct.cache,Ot=Ct.columnIndex,Rt=Ot===void 0?0:Ot,It=Ct.parent,kt=Ct.rowIndex,Mt=kt===void 0?this.props.index||0:kt;if(!$t.has(Mt,Rt)){var Ft=this._getCellMeasurements(),zt=Ft.height,Vt=Ft.width;$t.set(Mt,Rt,Vt,zt),It&&typeof It.invalidateCellSizeAfterRender=="function"&&It.invalidateCellSizeAfterRender({columnIndex:Rt,rowIndex:Mt})}}}]),xt}(ht.PureComponent),(0,pt.default)(yt,"propTypes",null),vt);et.default=Tt,(0,pt.default)(Tt,"__internalCellMeasurerFlag",!1)}(CellMeasurer)),CellMeasurer}var CellMeasurerCache={},hasRequiredCellMeasurerCache;function requireCellMeasurerCache(){return hasRequiredCellMeasurerCache||(hasRequiredCellMeasurerCache=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=et.DEFAULT_WIDTH=et.DEFAULT_HEIGHT=void 0;var nt=tt(require$$3$1),rt=tt(require$$4),ot=tt(require$$2$2);requireTypes$3();var st=30;et.DEFAULT_HEIGHT=st;var ut=100;et.DEFAULT_WIDTH=ut;var ct=function(){function pt(){var ht=this,mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,nt.default)(this,pt),(0,ot.default)(this,"_cellHeightCache",{}),(0,ot.default)(this,"_cellWidthCache",{}),(0,ot.default)(this,"_columnWidthCache",{}),(0,ot.default)(this,"_rowHeightCache",{}),(0,ot.default)(this,"_defaultHeight",void 0),(0,ot.default)(this,"_defaultWidth",void 0),(0,ot.default)(this,"_minHeight",void 0),(0,ot.default)(this,"_minWidth",void 0),(0,ot.default)(this,"_keyMapper",void 0),(0,ot.default)(this,"_hasFixedHeight",void 0),(0,ot.default)(this,"_hasFixedWidth",void 0),(0,ot.default)(this,"_columnCount",0),(0,ot.default)(this,"_rowCount",0),(0,ot.default)(this,"columnWidth",function($t){var Ot=$t.index,Rt=ht._keyMapper(0,Ot);return ht._columnWidthCache[Rt]!==void 0?ht._columnWidthCache[Rt]:ht._defaultWidth}),(0,ot.default)(this,"rowHeight",function($t){var Ot=$t.index,Rt=ht._keyMapper(Ot,0);return ht._rowHeightCache[Rt]!==void 0?ht._rowHeightCache[Rt]:ht._defaultHeight});var yt=mt.defaultHeight,vt=mt.defaultWidth,Tt=mt.fixedHeight,Et=mt.fixedWidth,xt=mt.keyMapper,At=mt.minHeight,Ct=mt.minWidth;this._hasFixedHeight=Tt===!0,this._hasFixedWidth=Et===!0,this._minHeight=At||0,this._minWidth=Ct||0,this._keyMapper=xt||ft,this._defaultHeight=Math.max(this._minHeight,typeof yt=="number"?yt:st),this._defaultWidth=Math.max(this._minWidth,typeof vt=="number"?vt:ut)}return(0,rt.default)(pt,[{key:"clear",value:function(mt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,vt=this._keyMapper(mt,yt);delete this._cellHeightCache[vt],delete this._cellWidthCache[vt],this._updateCachedColumnAndRowSizes(mt,yt)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(mt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var vt=this._keyMapper(mt,yt);return this._cellHeightCache[vt]!==void 0?Math.max(this._minHeight,this._cellHeightCache[vt]):this._defaultHeight}},{key:"getWidth",value:function(mt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var vt=this._keyMapper(mt,yt);return this._cellWidthCache[vt]!==void 0?Math.max(this._minWidth,this._cellWidthCache[vt]):this._defaultWidth}},{key:"has",value:function(mt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,vt=this._keyMapper(mt,yt);return this._cellHeightCache[vt]!==void 0}},{key:"set",value:function(mt,yt,vt,Tt){var Et=this._keyMapper(mt,yt);yt>=this._columnCount&&(this._columnCount=yt+1),mt>=this._rowCount&&(this._rowCount=mt+1),this._cellHeightCache[Et]=Tt,this._cellWidthCache[Et]=vt,this._updateCachedColumnAndRowSizes(mt,yt)}},{key:"_updateCachedColumnAndRowSizes",value:function(mt,yt){if(!this._hasFixedWidth){for(var vt=0,Tt=0;Tt<this._rowCount;Tt++)vt=Math.max(vt,this.getWidth(Tt,yt));var Et=this._keyMapper(0,yt);this._columnWidthCache[Et]=vt}if(!this._hasFixedHeight){for(var xt=0,At=0;At<this._columnCount;At++)xt=Math.max(xt,this.getHeight(mt,At));var Ct=this._keyMapper(mt,0);this._rowHeightCache[Ct]=xt}}},{key:"defaultHeight",get:function(){return this._defaultHeight}},{key:"defaultWidth",get:function(){return this._defaultWidth}}]),pt}();et.default=ct;function ft(pt,ht){return"".concat(pt,"-").concat(ht)}}(CellMeasurerCache)),CellMeasurerCache}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"CellMeasurer",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"CellMeasurerCache",{enumerable:!0,get:function(){return rt.default}}),et.default=void 0;var nt=tt(requireCellMeasurer()),rt=tt(requireCellMeasurerCache()),ot=nt.default;et.default=ot})(CellMeasurer$1);var Collection$1={},Collection={},CollectionView={},hasRequiredCollectionView;function requireCollectionView(){return hasRequiredCollectionView||(hasRequiredCollectionView=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=nt(require$$3$1),ot=nt(require$$4),st=nt(require$$5),ut=nt(require$$6),ct=nt(require$$7),ft=nt(require$$8),pt=nt(require$$2$2),ht=nt(require$$10);nt(propTypes$1.exports);var mt=tt(react.exports),yt=require$$3,vt=nt(requireCreateCallbackMemoizer()),Tt=nt(require$$14);function Et(Rt,It){var kt=Object.keys(Rt);if(Object.getOwnPropertySymbols){var Mt=Object.getOwnPropertySymbols(Rt);It&&(Mt=Mt.filter(function(Ft){return Object.getOwnPropertyDescriptor(Rt,Ft).enumerable})),kt.push.apply(kt,Mt)}return kt}function xt(Rt){for(var It=1;It<arguments.length;It++){var kt=arguments[It]!=null?arguments[It]:{};It%2?Et(kt,!0).forEach(function(Mt){(0,pt.default)(Rt,Mt,kt[Mt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rt,Object.getOwnPropertyDescriptors(kt)):Et(kt).forEach(function(Mt){Object.defineProperty(Rt,Mt,Object.getOwnPropertyDescriptor(kt,Mt))})}return Rt}var At=150,Ct={OBSERVED:"observed",REQUESTED:"requested"},$t=function(Rt){(0,ft.default)(It,Rt);function It(){var kt,Mt;(0,rt.default)(this,It);for(var Ft=arguments.length,zt=new Array(Ft),Vt=0;Vt<Ft;Vt++)zt[Vt]=arguments[Vt];return Mt=(0,st.default)(this,(kt=(0,ut.default)(It)).call.apply(kt,[this].concat(zt))),(0,pt.default)((0,ct.default)(Mt),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),(0,pt.default)((0,ct.default)(Mt),"_calculateSizeAndPositionDataOnNextUpdate",!1),(0,pt.default)((0,ct.default)(Mt),"_onSectionRenderedMemoizer",(0,vt.default)()),(0,pt.default)((0,ct.default)(Mt),"_onScrollMemoizer",(0,vt.default)(!1)),(0,pt.default)((0,ct.default)(Mt),"_invokeOnSectionRenderedHelper",function(){var Zt=Mt.props,Ut=Zt.cellLayoutManager,Xt=Zt.onSectionRendered;Mt._onSectionRenderedMemoizer({callback:Xt,indices:{indices:Ut.getLastRenderedIndices()}})}),(0,pt.default)((0,ct.default)(Mt),"_setScrollingContainerRef",function(Zt){Mt._scrollingContainer=Zt}),(0,pt.default)((0,ct.default)(Mt),"_updateScrollPositionForScrollToCell",function(){var Zt=Mt.props,Ut=Zt.cellLayoutManager,Xt=Zt.height,Jt=Zt.scrollToAlignment,gn=Zt.scrollToCell,An=Zt.width,sn=Mt.state,Sn=sn.scrollLeft,In=sn.scrollTop;if(gn>=0){var _n=Ut.getScrollPositionForCell({align:Jt,cellIndex:gn,height:Xt,scrollLeft:Sn,scrollTop:In,width:An});(_n.scrollLeft!==Sn||_n.scrollTop!==In)&&Mt._setScrollPosition(_n)}}),(0,pt.default)((0,ct.default)(Mt),"_onScroll",function(Zt){if(Zt.target===Mt._scrollingContainer){Mt._enablePointerEventsAfterDelay();var Ut=Mt.props,Xt=Ut.cellLayoutManager,Jt=Ut.height,gn=Ut.isScrollingChange,An=Ut.width,sn=Mt._scrollbarSize,Sn=Xt.getTotalSize(),In=Sn.height,_n=Sn.width,En=Math.max(0,Math.min(_n-An+sn,Zt.target.scrollLeft)),Ln=Math.max(0,Math.min(In-Jt+sn,Zt.target.scrollTop));if(Mt.state.scrollLeft!==En||Mt.state.scrollTop!==Ln){var wn=Zt.cancelable?Ct.OBSERVED:Ct.REQUESTED;Mt.state.isScrolling||gn(!0),Mt.setState({isScrolling:!0,scrollLeft:En,scrollPositionChangeReason:wn,scrollTop:Ln})}Mt._invokeOnScrollMemoizer({scrollLeft:En,scrollTop:Ln,totalWidth:_n,totalHeight:In})}}),Mt._scrollbarSize=(0,Tt.default)(),Mt._scrollbarSize===void 0?(Mt._scrollbarSizeMeasured=!1,Mt._scrollbarSize=0):Mt._scrollbarSizeMeasured=!0,Mt}return(0,ot.default)(It,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var Mt=this.props,Ft=Mt.cellLayoutManager,zt=Mt.scrollLeft,Vt=Mt.scrollToCell,Zt=Mt.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=(0,Tt.default)(),this._scrollbarSizeMeasured=!0,this.setState({})),Vt>=0?this._updateScrollPositionForScrollToCell():(zt>=0||Zt>=0)&&this._setScrollPosition({scrollLeft:zt,scrollTop:Zt}),this._invokeOnSectionRenderedHelper();var Ut=Ft.getTotalSize(),Xt=Ut.height,Jt=Ut.width;this._invokeOnScrollMemoizer({scrollLeft:zt||0,scrollTop:Zt||0,totalHeight:Xt,totalWidth:Jt})}},{key:"componentDidUpdate",value:function(Mt,Ft){var zt=this.props,Vt=zt.height,Zt=zt.scrollToAlignment,Ut=zt.scrollToCell,Xt=zt.width,Jt=this.state,gn=Jt.scrollLeft,An=Jt.scrollPositionChangeReason,sn=Jt.scrollTop;An===Ct.REQUESTED&&(gn>=0&&gn!==Ft.scrollLeft&&gn!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=gn),sn>=0&&sn!==Ft.scrollTop&&sn!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=sn)),(Vt!==Mt.height||Zt!==Mt.scrollToAlignment||Ut!==Mt.scrollToCell||Xt!==Mt.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var Mt=this.props,Ft=Mt.autoHeight,zt=Mt.cellCount,Vt=Mt.cellLayoutManager,Zt=Mt.className,Ut=Mt.height,Xt=Mt.horizontalOverscanSize,Jt=Mt.id,gn=Mt.noContentRenderer,An=Mt.style,sn=Mt.verticalOverscanSize,Sn=Mt.width,In=this.state,_n=In.isScrolling,En=In.scrollLeft,Ln=In.scrollTop;(this._lastRenderedCellCount!==zt||this._lastRenderedCellLayoutManager!==Vt||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=zt,this._lastRenderedCellLayoutManager=Vt,this._calculateSizeAndPositionDataOnNextUpdate=!1,Vt.calculateSizeAndPositionData());var wn=Vt.getTotalSize(),Dn=wn.height,$n=wn.width,Gn=Math.max(0,En-Xt),Jn=Math.max(0,Ln-sn),zn=Math.min($n,En+Sn+Xt),Qn=Math.min(Dn,Ln+Ut+sn),Bn=Ut>0&&Sn>0?Vt.cellRenderers({height:Qn-Jn,isScrolling:_n,width:zn-Gn,x:Gn,y:Jn}):[],jn={boxSizing:"border-box",direction:"ltr",height:Ft?"auto":Ut,position:"relative",WebkitOverflowScrolling:"touch",width:Sn,willChange:"transform"},Ar=Dn>Ut?this._scrollbarSize:0,Er=$n>Sn?this._scrollbarSize:0;return jn.overflowX=$n+Ar<=Sn?"hidden":"auto",jn.overflowY=Dn+Er<=Ut?"hidden":"auto",mt.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:(0,ht.default)("ReactVirtualized__Collection",Zt),id:Jt,onScroll:this._onScroll,role:"grid",style:xt({},jn,{},An),tabIndex:0},zt>0&&mt.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:Dn,maxHeight:Dn,maxWidth:$n,overflow:"hidden",pointerEvents:_n?"none":"",width:$n}},Bn),zt===0&&gn())}},{key:"_enablePointerEventsAfterDelay",value:function(){var Mt=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){var Ft=Mt.props.isScrollingChange;Ft(!1),Mt._disablePointerEventsTimeoutId=null,Mt.setState({isScrolling:!1})},At)}},{key:"_invokeOnScrollMemoizer",value:function(Mt){var Ft=this,zt=Mt.scrollLeft,Vt=Mt.scrollTop,Zt=Mt.totalHeight,Ut=Mt.totalWidth;this._onScrollMemoizer({callback:function(Jt){var gn=Jt.scrollLeft,An=Jt.scrollTop,sn=Ft.props,Sn=sn.height,In=sn.onScroll,_n=sn.width;In({clientHeight:Sn,clientWidth:_n,scrollHeight:Zt,scrollLeft:gn,scrollTop:An,scrollWidth:Ut})},indices:{scrollLeft:zt,scrollTop:Vt}})}},{key:"_setScrollPosition",value:function(Mt){var Ft=Mt.scrollLeft,zt=Mt.scrollTop,Vt={scrollPositionChangeReason:Ct.REQUESTED};Ft>=0&&(Vt.scrollLeft=Ft),zt>=0&&(Vt.scrollTop=zt),(Ft>=0&&Ft!==this.state.scrollLeft||zt>=0&&zt!==this.state.scrollTop)&&this.setState(Vt)}}],[{key:"getDerivedStateFromProps",value:function(Mt,Ft){return Mt.cellCount===0&&(Ft.scrollLeft!==0||Ft.scrollTop!==0)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:Ct.REQUESTED}:Mt.scrollLeft!==Ft.scrollLeft||Mt.scrollTop!==Ft.scrollTop?{scrollLeft:Mt.scrollLeft!=null?Mt.scrollLeft:Ft.scrollLeft,scrollTop:Mt.scrollTop!=null?Mt.scrollTop:Ft.scrollTop,scrollPositionChangeReason:Ct.REQUESTED}:null}}]),It}(mt.PureComponent);(0,pt.default)($t,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),$t.propTypes={},(0,yt.polyfill)($t);var Ot=$t;et.default=Ot}(CollectionView)),CollectionView}var calculateSizeAndPositionData={},SectionManager={},Section$1={},types$2={},hasRequiredTypes$2;function requireTypes$2(){if(hasRequiredTypes$2)return types$2;hasRequiredTypes$2=1;var et=interopRequireDefault.exports;Object.defineProperty(types$2,"__esModule",{value:!0}),types$2.bpfrpt_proptype_SizeInfo=types$2.bpfrpt_proptype_SizeAndPositionInfo=types$2.bpfrpt_proptype_ScrollPosition=types$2.bpfrpt_proptype_PositionInfo=types$2.bpfrpt_proptype_Index=void 0,et(propTypes$1.exports);var tt=null;types$2.bpfrpt_proptype_Index=tt;var nt=null;types$2.bpfrpt_proptype_PositionInfo=nt;var rt=null;types$2.bpfrpt_proptype_ScrollPosition=rt;var ot=null;types$2.bpfrpt_proptype_SizeAndPositionInfo=ot;var st=null;return types$2.bpfrpt_proptype_SizeInfo=st,types$2}var hasRequiredSection;function requireSection(){return hasRequiredSection||(hasRequiredSection=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var nt=tt(require$$3$1),rt=tt(require$$4);requireTypes$2();var ot=function(){function st(ut){var ct=ut.height,ft=ut.width,pt=ut.x,ht=ut.y;(0,nt.default)(this,st),this.height=ct,this.width=ft,this.x=pt,this.y=ht,this._indexMap={},this._indices=[]}return(0,rt.default)(st,[{key:"addCellIndex",value:function(ct){var ft=ct.index;this._indexMap[ft]||(this._indexMap[ft]=!0,this._indices.push(ft))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),st}();et.default=ot}(Section$1)),Section$1}var hasRequiredSectionManager;function requireSectionManager(){return hasRequiredSectionManager||(hasRequiredSectionManager=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var nt=tt(require$$3$1),rt=tt(require$$4),ot=tt(requireSection());requireTypes$2();var st=100,ut=function(){function ct(){var ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:st;(0,nt.default)(this,ct),this._sectionSize=ft,this._cellMetadata=[],this._sections={}}return(0,rt.default)(ct,[{key:"getCellIndices",value:function(pt){var ht=pt.height,mt=pt.width,yt=pt.x,vt=pt.y,Tt={};return this.getSections({height:ht,width:mt,x:yt,y:vt}).forEach(function(Et){return Et.getCellIndices().forEach(function(xt){Tt[xt]=xt})}),Object.keys(Tt).map(function(Et){return Tt[Et]})}},{key:"getCellMetadata",value:function(pt){var ht=pt.index;return this._cellMetadata[ht]}},{key:"getSections",value:function(pt){for(var ht=pt.height,mt=pt.width,yt=pt.x,vt=pt.y,Tt=Math.floor(yt/this._sectionSize),Et=Math.floor((yt+mt-1)/this._sectionSize),xt=Math.floor(vt/this._sectionSize),At=Math.floor((vt+ht-1)/this._sectionSize),Ct=[],$t=Tt;$t<=Et;$t++)for(var Ot=xt;Ot<=At;Ot++){var Rt="".concat($t,".").concat(Ot);this._sections[Rt]||(this._sections[Rt]=new ot.default({height:this._sectionSize,width:this._sectionSize,x:$t*this._sectionSize,y:Ot*this._sectionSize})),Ct.push(this._sections[Rt])}return Ct}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var pt=this;return Object.keys(this._sections).map(function(ht){return pt._sections[ht].toString()})}},{key:"registerCell",value:function(pt){var ht=pt.cellMetadatum,mt=pt.index;this._cellMetadata[mt]=ht,this.getSections(ht).forEach(function(yt){return yt.addCellIndex({index:mt})})}}]),ct}();et.default=ut}(SectionManager)),SectionManager}var hasRequiredCalculateSizeAndPositionData;function requireCalculateSizeAndPositionData(){return hasRequiredCalculateSizeAndPositionData||(hasRequiredCalculateSizeAndPositionData=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=rt;var nt=tt(requireSectionManager());function rt(ot){for(var st=ot.cellCount,ut=ot.cellSizeAndPositionGetter,ct=ot.sectionSize,ft=[],pt=new nt.default(ct),ht=0,mt=0,yt=0;yt<st;yt++){var vt=ut({index:yt});if(vt.height==null||isNaN(vt.height)||vt.width==null||isNaN(vt.width)||vt.x==null||isNaN(vt.x)||vt.y==null||isNaN(vt.y))throw Error("Invalid metadata returned for cell ".concat(yt,`:
        x:`).concat(vt.x,", y:").concat(vt.y,", width:").concat(vt.width,", height:").concat(vt.height));ht=Math.max(ht,vt.y+vt.height),mt=Math.max(mt,vt.x+vt.width),ft[yt]=vt,pt.registerCell({cellMetadatum:vt,index:yt})}return{cellMetadata:ft,height:ht,sectionManager:pt,width:mt}}}(calculateSizeAndPositionData)),calculateSizeAndPositionData}var getUpdatedOffsetForIndex={},hasRequiredGetUpdatedOffsetForIndex;function requireGetUpdatedOffsetForIndex(){return hasRequiredGetUpdatedOffsetForIndex||(hasRequiredGetUpdatedOffsetForIndex=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt;function tt(nt){var rt=nt.align,ot=rt===void 0?"auto":rt,st=nt.cellOffset,ut=nt.cellSize,ct=nt.containerSize,ft=nt.currentOffset,pt=st,ht=pt-ct+ut;switch(ot){case"start":return pt;case"end":return ht;case"center":return pt-(ct-ut)/2;default:return Math.max(ht,Math.min(pt,ft))}}}(getUpdatedOffsetForIndex)),getUpdatedOffsetForIndex}var hasRequiredCollection;function requireCollection(){return hasRequiredCollection||(hasRequiredCollection=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=nt(require$$1$2),ot=nt(require$$3$1),st=nt(require$$4),ut=nt(require$$5),ct=nt(require$$6),ft=nt(require$$7),pt=nt(require$$8),ht=nt(require$$2$2);nt(propTypes$1.exports);var mt=tt(react.exports),yt=nt(requireCollectionView()),vt=nt(requireCalculateSizeAndPositionData()),Tt=nt(requireGetUpdatedOffsetForIndex());requireTypes$2();var Et=function(At){(0,pt.default)(Ct,At);function Ct($t,Ot){var Rt;return(0,ot.default)(this,Ct),Rt=(0,ut.default)(this,(0,ct.default)(Ct).call(this,$t,Ot)),Rt._cellMetadata=[],Rt._lastRenderedCellIndices=[],Rt._cellCache=[],Rt._isScrollingChange=Rt._isScrollingChange.bind((0,ft.default)(Rt)),Rt._setCollectionViewRef=Rt._setCollectionViewRef.bind((0,ft.default)(Rt)),Rt}return(0,st.default)(Ct,[{key:"forceUpdate",value:function(){this._collectionView!==void 0&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var Ot=(0,rt.default)({},this.props);return mt.createElement(yt.default,(0,rt.default)({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},Ot))}},{key:"calculateSizeAndPositionData",value:function(){var Ot=this.props,Rt=Ot.cellCount,It=Ot.cellSizeAndPositionGetter,kt=Ot.sectionSize,Mt=(0,vt.default)({cellCount:Rt,cellSizeAndPositionGetter:It,sectionSize:kt});this._cellMetadata=Mt.cellMetadata,this._sectionManager=Mt.sectionManager,this._height=Mt.height,this._width=Mt.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(Ot){var Rt=Ot.align,It=Ot.cellIndex,kt=Ot.height,Mt=Ot.scrollLeft,Ft=Ot.scrollTop,zt=Ot.width,Vt=this.props.cellCount;if(It>=0&&It<Vt){var Zt=this._cellMetadata[It];Mt=(0,Tt.default)({align:Rt,cellOffset:Zt.x,cellSize:Zt.width,containerSize:zt,currentOffset:Mt,targetIndex:It}),Ft=(0,Tt.default)({align:Rt,cellOffset:Zt.y,cellSize:Zt.height,containerSize:kt,currentOffset:Ft,targetIndex:It})}return{scrollLeft:Mt,scrollTop:Ft}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(Ot){var Rt=this,It=Ot.height,kt=Ot.isScrolling,Mt=Ot.width,Ft=Ot.x,zt=Ot.y,Vt=this.props,Zt=Vt.cellGroupRenderer,Ut=Vt.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:It,width:Mt,x:Ft,y:zt}),Zt({cellCache:this._cellCache,cellRenderer:Ut,cellSizeAndPositionGetter:function(Jt){var gn=Jt.index;return Rt._sectionManager.getCellMetadata({index:gn})},indices:this._lastRenderedCellIndices,isScrolling:kt})}},{key:"_isScrollingChange",value:function(Ot){Ot||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(Ot){this._collectionView=Ot}}]),Ct}(mt.PureComponent);et.default=Et,(0,ht.default)(Et,"defaultProps",{"aria-label":"grid",cellGroupRenderer:xt}),Et.propTypes={};function xt(At){var Ct=At.cellCache,$t=At.cellRenderer,Ot=At.cellSizeAndPositionGetter,Rt=At.indices,It=At.isScrolling;return Rt.map(function(kt){var Mt=Ot({index:kt}),Ft={index:kt,isScrolling:It,key:kt,style:{height:Mt.height,left:Mt.x,position:"absolute",top:Mt.y,width:Mt.width}};return It?(kt in Ct||(Ct[kt]=$t(Ft)),Ct[kt]):$t(Ft)}).filter(function(kt){return!!kt})}}(Collection)),Collection}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"Collection",{enumerable:!0,get:function(){return nt.default}}),et.default=void 0;var nt=tt(requireCollection()),rt=nt.default;et.default=rt})(Collection$1);var ColumnSizer$1={},ColumnSizer={},hasRequiredColumnSizer;function requireColumnSizer(){return hasRequiredColumnSizer||(hasRequiredColumnSizer=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=nt(require$$3$1),ot=nt(require$$4),st=nt(require$$5),ut=nt(require$$6),ct=nt(require$$7),ft=nt(require$$8);nt(propTypes$1.exports);var pt=tt(react.exports),ht=function(mt){(0,ft.default)(yt,mt);function yt(vt,Tt){var Et;return(0,rt.default)(this,yt),Et=(0,st.default)(this,(0,ut.default)(yt).call(this,vt,Tt)),Et._registerChild=Et._registerChild.bind((0,ct.default)(Et)),Et}return(0,ot.default)(yt,[{key:"componentDidUpdate",value:function(Tt){var Et=this.props,xt=Et.columnMaxWidth,At=Et.columnMinWidth,Ct=Et.columnCount,$t=Et.width;(xt!==Tt.columnMaxWidth||At!==Tt.columnMinWidth||Ct!==Tt.columnCount||$t!==Tt.width)&&this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var Tt=this.props,Et=Tt.children,xt=Tt.columnMaxWidth,At=Tt.columnMinWidth,Ct=Tt.columnCount,$t=Tt.width,Ot=At||1,Rt=xt?Math.min(xt,$t):$t,It=$t/Ct;It=Math.max(Ot,It),It=Math.min(Rt,It),It=Math.floor(It);var kt=Math.min($t,It*Ct);return Et({adjustedWidth:kt,columnWidth:It,getColumnWidth:function(){return It},registerChild:this._registerChild})}},{key:"_registerChild",value:function(Tt){if(Tt&&typeof Tt.recomputeGridSize!="function")throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=Tt,this._registeredChild&&this._registeredChild.recomputeGridSize()}}]),yt}(pt.PureComponent);et.default=ht,ht.propTypes={}}(ColumnSizer)),ColumnSizer}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"ColumnSizer",{enumerable:!0,get:function(){return nt.default}}),et.default=void 0;var nt=tt(requireColumnSizer()),rt=nt.default;et.default=rt})(ColumnSizer$1);var InfiniteLoader$1={},InfiniteLoader={};const require$$2=getAugmentedNamespace(toConsumableArray);var hasRequiredInfiniteLoader;function requireInfiniteLoader(){return hasRequiredInfiniteLoader||(hasRequiredInfiniteLoader=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.isRangeVisible=Tt,et.scanForUnloadedRanges=Et,et.forceUpdateReactVirtualizedComponent=xt,et.default=void 0;var rt=nt(require$$2),ot=nt(require$$3$1),st=nt(require$$4),ut=nt(require$$5),ct=nt(require$$6),ft=nt(require$$7),pt=nt(require$$8),ht=nt(require$$2$2),mt=tt(react.exports);nt(propTypes$1.exports);var yt=nt(requireCreateCallbackMemoizer()),vt=function(At){(0,pt.default)(Ct,At);function Ct($t,Ot){var Rt;return(0,ot.default)(this,Ct),Rt=(0,ut.default)(this,(0,ct.default)(Ct).call(this,$t,Ot)),Rt._loadMoreRowsMemoizer=(0,yt.default)(),Rt._onRowsRendered=Rt._onRowsRendered.bind((0,ft.default)(Rt)),Rt._registerChild=Rt._registerChild.bind((0,ft.default)(Rt)),Rt}return(0,st.default)(Ct,[{key:"resetLoadMoreRowsCache",value:function(Ot){this._loadMoreRowsMemoizer=(0,yt.default)(),Ot&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){var Ot=this.props.children;return Ot({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(Ot){var Rt=this,It=this.props.loadMoreRows;Ot.forEach(function(kt){var Mt=It(kt);Mt&&Mt.then(function(){Tt({lastRenderedStartIndex:Rt._lastRenderedStartIndex,lastRenderedStopIndex:Rt._lastRenderedStopIndex,startIndex:kt.startIndex,stopIndex:kt.stopIndex})&&Rt._registeredChild&&xt(Rt._registeredChild,Rt._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(Ot){var Rt=Ot.startIndex,It=Ot.stopIndex;this._lastRenderedStartIndex=Rt,this._lastRenderedStopIndex=It,this._doStuff(Rt,It)}},{key:"_doStuff",value:function(Ot,Rt){var It,kt=this,Mt=this.props,Ft=Mt.isRowLoaded,zt=Mt.minimumBatchSize,Vt=Mt.rowCount,Zt=Mt.threshold,Ut=Et({isRowLoaded:Ft,minimumBatchSize:zt,rowCount:Vt,startIndex:Math.max(0,Ot-Zt),stopIndex:Math.min(Vt-1,Rt+Zt)}),Xt=(It=[]).concat.apply(It,(0,rt.default)(Ut.map(function(Jt){var gn=Jt.startIndex,An=Jt.stopIndex;return[gn,An]})));this._loadMoreRowsMemoizer({callback:function(){kt._loadUnloadedRanges(Ut)},indices:{squashedUnloadedRanges:Xt}})}},{key:"_registerChild",value:function(Ot){this._registeredChild=Ot}}]),Ct}(mt.PureComponent);et.default=vt,(0,ht.default)(vt,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),vt.propTypes={};function Tt(At){var Ct=At.lastRenderedStartIndex,$t=At.lastRenderedStopIndex,Ot=At.startIndex,Rt=At.stopIndex;return!(Ot>$t||Rt<Ct)}function Et(At){for(var Ct=At.isRowLoaded,$t=At.minimumBatchSize,Ot=At.rowCount,Rt=At.startIndex,It=At.stopIndex,kt=[],Mt=null,Ft=null,zt=Rt;zt<=It;zt++){var Vt=Ct({index:zt});Vt?Ft!==null&&(kt.push({startIndex:Mt,stopIndex:Ft}),Mt=Ft=null):(Ft=zt,Mt===null&&(Mt=zt))}if(Ft!==null){for(var Zt=Math.min(Math.max(Ft,Mt+$t-1),Ot-1),Ut=Ft+1;Ut<=Zt&&!Ct({index:Ut});Ut++)Ft=Ut;kt.push({startIndex:Mt,stopIndex:Ft})}if(kt.length)for(var Xt=kt[0];Xt.stopIndex-Xt.startIndex+1<$t&&Xt.startIndex>0;){var Jt=Xt.startIndex-1;if(!Ct({index:Jt}))Xt.startIndex=Jt;else break}return kt}function xt(At){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$t=typeof At.recomputeGridSize=="function"?At.recomputeGridSize:At.recomputeRowHeights;$t?$t.call(At,Ct):At.forceUpdate()}}(InfiniteLoader)),InfiniteLoader}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"InfiniteLoader",{enumerable:!0,get:function(){return nt.default}}),et.default=void 0;var nt=tt(requireInfiniteLoader()),rt=nt.default;et.default=rt})(InfiniteLoader$1);var List$1={},List={},types$1={},hasRequiredTypes$1;function requireTypes$1(){if(hasRequiredTypes$1)return types$1;hasRequiredTypes$1=1;var et=interopRequireDefault.exports,tt=interopRequireWildcard.exports;Object.defineProperty(types$1,"__esModule",{value:!0}),types$1.bpfrpt_proptype_Scroll=types$1.bpfrpt_proptype_RenderedRows=types$1.bpfrpt_proptype_RowRenderer=types$1.bpfrpt_proptype_RowRendererParams=void 0,tt(react.exports),et(propTypes$1.exports);var nt=null;types$1.bpfrpt_proptype_RowRendererParams=nt;var rt=null;types$1.bpfrpt_proptype_RowRenderer=rt;var ot=null;types$1.bpfrpt_proptype_RenderedRows=ot;var st=null;return types$1.bpfrpt_proptype_Scroll=st,types$1}var hasRequiredList;function requireList(){return hasRequiredList||(hasRequiredList=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=tt(require$$1$2),ot=tt(require$$3$1),st=tt(require$$4),ut=tt(require$$5),ct=tt(require$$6),ft=tt(require$$7),pt=tt(require$$8),ht=tt(require$$2$2),mt=nt(Grid$1),yt=nt(react.exports),vt=tt(require$$10);requireTypes$1(),tt(propTypes$1.exports);var Tt,Et,xt=(Et=Tt=function(At){(0,pt.default)(Ct,At);function Ct(){var $t,Ot;(0,ot.default)(this,Ct);for(var Rt=arguments.length,It=new Array(Rt),kt=0;kt<Rt;kt++)It[kt]=arguments[kt];return Ot=(0,ut.default)(this,($t=(0,ct.default)(Ct)).call.apply($t,[this].concat(It))),(0,ht.default)((0,ft.default)(Ot),"Grid",void 0),(0,ht.default)((0,ft.default)(Ot),"_cellRenderer",function(Mt){var Ft=Mt.parent,zt=Mt.rowIndex,Vt=Mt.style,Zt=Mt.isScrolling,Ut=Mt.isVisible,Xt=Mt.key,Jt=Ot.props.rowRenderer,gn=Object.getOwnPropertyDescriptor(Vt,"width");return gn&&gn.writable&&(Vt.width="100%"),Jt({index:zt,style:Vt,isScrolling:Zt,isVisible:Ut,key:Xt,parent:Ft})}),(0,ht.default)((0,ft.default)(Ot),"_setRef",function(Mt){Ot.Grid=Mt}),(0,ht.default)((0,ft.default)(Ot),"_onScroll",function(Mt){var Ft=Mt.clientHeight,zt=Mt.scrollHeight,Vt=Mt.scrollTop,Zt=Ot.props.onScroll;Zt({clientHeight:Ft,scrollHeight:zt,scrollTop:Vt})}),(0,ht.default)((0,ft.default)(Ot),"_onSectionRendered",function(Mt){var Ft=Mt.rowOverscanStartIndex,zt=Mt.rowOverscanStopIndex,Vt=Mt.rowStartIndex,Zt=Mt.rowStopIndex,Ut=Ot.props.onRowsRendered;Ut({overscanStartIndex:Ft,overscanStopIndex:zt,startIndex:Vt,stopIndex:Zt})}),Ot}return(0,st.default)(Ct,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(Ot){var Rt=Ot.alignment,It=Ot.index;if(this.Grid){var kt=this.Grid.getOffsetForCell({alignment:Rt,rowIndex:It,columnIndex:0}),Mt=kt.scrollTop;return Mt}return 0}},{key:"invalidateCellSizeAfterRender",value:function(Ot){var Rt=Ot.columnIndex,It=Ot.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:It,columnIndex:Rt})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Rt=Ot.columnIndex,It=Rt===void 0?0:Rt,kt=Ot.rowIndex,Mt=kt===void 0?0:kt;this.Grid&&this.Grid.recomputeGridSize({rowIndex:Mt,columnIndex:It})}},{key:"recomputeRowHeights",value:function(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:Ot,columnIndex:0})}},{key:"scrollToPosition",value:function(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:Ot})}},{key:"scrollToRow",value:function(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:Ot})}},{key:"render",value:function(){var Ot=this.props,Rt=Ot.className,It=Ot.noRowsRenderer,kt=Ot.scrollToIndex,Mt=Ot.width,Ft=(0,vt.default)("ReactVirtualized__List",Rt);return yt.createElement(mt.default,(0,rt.default)({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:Ft,columnWidth:Mt,columnCount:1,noContentRenderer:It,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:kt}))}}]),Ct}(yt.PureComponent),(0,ht.default)(Tt,"propTypes",null),Et);et.default=xt,(0,ht.default)(xt,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:mt.accessibilityOverscanIndicesGetter,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}})}(List)),List}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"default",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"List",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"bpfrpt_proptype_RowRendererParams",{enumerable:!0,get:function(){return rt.bpfrpt_proptype_RowRendererParams}});var nt=tt(requireList()),rt=requireTypes$1()})(List$1);var Masonry$1={},createCellPositioner={},Masonry={},PositionCache={};const require$$1$1=getAugmentedNamespace(slicedToArray);var intervalTree={},binarySearchBounds={},hasRequiredBinarySearchBounds;function requireBinarySearchBounds(){return hasRequiredBinarySearchBounds||(hasRequiredBinarySearchBounds=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;function tt(At,Ct,$t,Ot){for(var Rt=$t+1;Ct<=$t;){var It=Ct+$t>>>1,kt=At[It];kt>=Ot?(Rt=It,$t=It-1):Ct=It+1}return Rt}function nt(At,Ct,$t,Ot,Rt){for(var It=$t+1;Ct<=$t;){var kt=Ct+$t>>>1,Mt=At[kt];Rt(Mt,Ot)>=0?(It=kt,$t=kt-1):Ct=kt+1}return It}function rt(At,Ct,$t,Ot,Rt){return typeof $t=="function"?nt(At,Ot===void 0?0:Ot|0,Rt===void 0?At.length-1:Rt|0,Ct,$t):tt(At,$t===void 0?0:$t|0,Ot===void 0?At.length-1:Ot|0,Ct)}function ot(At,Ct,$t,Ot){for(var Rt=$t+1;Ct<=$t;){var It=Ct+$t>>>1,kt=At[It];kt>Ot?(Rt=It,$t=It-1):Ct=It+1}return Rt}function st(At,Ct,$t,Ot,Rt){for(var It=$t+1;Ct<=$t;){var kt=Ct+$t>>>1,Mt=At[kt];Rt(Mt,Ot)>0?(It=kt,$t=kt-1):Ct=kt+1}return It}function ut(At,Ct,$t,Ot,Rt){return typeof $t=="function"?st(At,Ot===void 0?0:Ot|0,Rt===void 0?At.length-1:Rt|0,Ct,$t):ot(At,$t===void 0?0:$t|0,Ot===void 0?At.length-1:Ot|0,Ct)}function ct(At,Ct,$t,Ot){for(var Rt=Ct-1;Ct<=$t;){var It=Ct+$t>>>1,kt=At[It];kt<Ot?(Rt=It,Ct=It+1):$t=It-1}return Rt}function ft(At,Ct,$t,Ot,Rt){for(var It=Ct-1;Ct<=$t;){var kt=Ct+$t>>>1,Mt=At[kt];Rt(Mt,Ot)<0?(It=kt,Ct=kt+1):$t=kt-1}return It}function pt(At,Ct,$t,Ot,Rt){return typeof $t=="function"?ft(At,Ot===void 0?0:Ot|0,Rt===void 0?At.length-1:Rt|0,Ct,$t):ct(At,$t===void 0?0:$t|0,Ot===void 0?At.length-1:Ot|0,Ct)}function ht(At,Ct,$t,Ot){for(var Rt=Ct-1;Ct<=$t;){var It=Ct+$t>>>1,kt=At[It];kt<=Ot?(Rt=It,Ct=It+1):$t=It-1}return Rt}function mt(At,Ct,$t,Ot,Rt){for(var It=Ct-1;Ct<=$t;){var kt=Ct+$t>>>1,Mt=At[kt];Rt(Mt,Ot)<=0?(It=kt,Ct=kt+1):$t=kt-1}return It}function yt(At,Ct,$t,Ot,Rt){return typeof $t=="function"?mt(At,Ot===void 0?0:Ot|0,Rt===void 0?At.length-1:Rt|0,Ct,$t):ht(At,$t===void 0?0:$t|0,Ot===void 0?At.length-1:Ot|0,Ct)}function vt(At,Ct,$t,Ot){for(;Ct<=$t;){var Rt=Ct+$t>>>1,It=At[Rt];if(It===Ot)return Rt;It<=Ot?Ct=Rt+1:$t=Rt-1}return-1}function Tt(At,Ct,$t,Ot,Rt){for(;Ct<=$t;){var It=Ct+$t>>>1,kt=At[It],Mt=Rt(kt,Ot);if(Mt===0)return It;Mt<=0?Ct=It+1:$t=It-1}return-1}function Et(At,Ct,$t,Ot,Rt){return typeof $t=="function"?Tt(At,Ot===void 0?0:Ot|0,Rt===void 0?At.length-1:Rt|0,Ct,$t):vt(At,$t===void 0?0:$t|0,Ot===void 0?At.length-1:Ot|0,Ct)}var xt={ge:rt,gt:ut,lt:pt,le:yt,eq:Et};et.default=xt}(binarySearchBounds)),binarySearchBounds}var hasRequiredIntervalTree;function requireIntervalTree(){return hasRequiredIntervalTree||(hasRequiredIntervalTree=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=Rt;var nt=tt(requireBinarySearchBounds()),rt=0,ot=1,st=2;function ut(It,kt,Mt,Ft,zt){this.mid=It,this.left=kt,this.right=Mt,this.leftPoints=Ft,this.rightPoints=zt,this.count=(kt?kt.count:0)+(Mt?Mt.count:0)+Ft.length}var ct=ut.prototype;function ft(It,kt){It.mid=kt.mid,It.left=kt.left,It.right=kt.right,It.leftPoints=kt.leftPoints,It.rightPoints=kt.rightPoints,It.count=kt.count}function pt(It,kt){var Mt=Ct(kt);It.mid=Mt.mid,It.left=Mt.left,It.right=Mt.right,It.leftPoints=Mt.leftPoints,It.rightPoints=Mt.rightPoints,It.count=Mt.count}function ht(It,kt){var Mt=It.intervals([]);Mt.push(kt),pt(It,Mt)}function mt(It,kt){var Mt=It.intervals([]),Ft=Mt.indexOf(kt);return Ft<0?rt:(Mt.splice(Ft,1),pt(It,Mt),ot)}ct.intervals=function(It){return It.push.apply(It,this.leftPoints),this.left&&this.left.intervals(It),this.right&&this.right.intervals(It),It},ct.insert=function(It){var kt=this.count-this.leftPoints.length;if(this.count+=1,It[1]<this.mid)this.left?4*(this.left.count+1)>3*(kt+1)?ht(this,It):this.left.insert(It):this.left=Ct([It]);else if(It[0]>this.mid)this.right?4*(this.right.count+1)>3*(kt+1)?ht(this,It):this.right.insert(It):this.right=Ct([It]);else{var Mt=nt.default.ge(this.leftPoints,It,xt),Ft=nt.default.ge(this.rightPoints,It,At);this.leftPoints.splice(Mt,0,It),this.rightPoints.splice(Ft,0,It)}},ct.remove=function(It){var kt=this.count-this.leftPoints;if(It[1]<this.mid){if(!this.left)return rt;var Mt=this.right?this.right.count:0;if(4*Mt>3*(kt-1))return mt(this,It);var Ft=this.left.remove(It);return Ft===st?(this.left=null,this.count-=1,ot):(Ft===ot&&(this.count-=1),Ft)}else if(It[0]>this.mid){if(!this.right)return rt;var zt=this.left?this.left.count:0;if(4*zt>3*(kt-1))return mt(this,It);var Ft=this.right.remove(It);return Ft===st?(this.right=null,this.count-=1,ot):(Ft===ot&&(this.count-=1),Ft)}else{if(this.count===1)return this.leftPoints[0]===It?st:rt;if(this.leftPoints.length===1&&this.leftPoints[0]===It){if(this.left&&this.right){for(var Vt=this,Zt=this.left;Zt.right;)Vt=Zt,Zt=Zt.right;if(Vt===this)Zt.right=this.right;else{var Ut=this.left,Ft=this.right;Vt.count-=Zt.count,Vt.right=Zt.left,Zt.left=Ut,Zt.right=Ft}ft(this,Zt),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?ft(this,this.left):ft(this,this.right);return ot}for(var Ut=nt.default.ge(this.leftPoints,It,xt);Ut<this.leftPoints.length&&this.leftPoints[Ut][0]===It[0];++Ut)if(this.leftPoints[Ut]===It){this.count-=1,this.leftPoints.splice(Ut,1);for(var Ft=nt.default.ge(this.rightPoints,It,At);Ft<this.rightPoints.length&&this.rightPoints[Ft][1]===It[1];++Ft)if(this.rightPoints[Ft]===It)return this.rightPoints.splice(Ft,1),ot}return rt}};function yt(It,kt,Mt){for(var Ft=0;Ft<It.length&&It[Ft][0]<=kt;++Ft){var zt=Mt(It[Ft]);if(zt)return zt}}function vt(It,kt,Mt){for(var Ft=It.length-1;Ft>=0&&It[Ft][1]>=kt;--Ft){var zt=Mt(It[Ft]);if(zt)return zt}}function Tt(It,kt){for(var Mt=0;Mt<It.length;++Mt){var Ft=kt(It[Mt]);if(Ft)return Ft}}ct.queryPoint=function(It,kt){if(It<this.mid){if(this.left){var Mt=this.left.queryPoint(It,kt);if(Mt)return Mt}return yt(this.leftPoints,It,kt)}else if(It>this.mid){if(this.right){var Mt=this.right.queryPoint(It,kt);if(Mt)return Mt}return vt(this.rightPoints,It,kt)}else return Tt(this.leftPoints,kt)},ct.queryInterval=function(It,kt,Mt){if(It<this.mid&&this.left){var Ft=this.left.queryInterval(It,kt,Mt);if(Ft)return Ft}if(kt>this.mid&&this.right){var Ft=this.right.queryInterval(It,kt,Mt);if(Ft)return Ft}return kt<this.mid?yt(this.leftPoints,kt,Mt):It>this.mid?vt(this.rightPoints,It,Mt):Tt(this.leftPoints,Mt)};function Et(It,kt){return It-kt}function xt(It,kt){var Mt=It[0]-kt[0];return Mt||It[1]-kt[1]}function At(It,kt){var Mt=It[1]-kt[1];return Mt||It[0]-kt[0]}function Ct(It){if(It.length===0)return null;for(var kt=[],Mt=0;Mt<It.length;++Mt)kt.push(It[Mt][0],It[Mt][1]);kt.sort(Et);for(var Ft=kt[kt.length>>1],zt=[],Vt=[],Zt=[],Mt=0;Mt<It.length;++Mt){var Ut=It[Mt];Ut[1]<Ft?zt.push(Ut):Ft<Ut[0]?Vt.push(Ut):Zt.push(Ut)}var Xt=Zt,Jt=Zt.slice();return Xt.sort(xt),Jt.sort(At),new ut(Ft,Ct(zt),Ct(Vt),Xt,Jt)}function $t(It){this.root=It}var Ot=$t.prototype;Ot.insert=function(It){this.root?this.root.insert(It):this.root=new ut(It[0],null,null,[It],[It])},Ot.remove=function(It){if(this.root){var kt=this.root.remove(It);return kt===st&&(this.root=null),kt!==rt}return!1},Ot.queryPoint=function(It,kt){if(this.root)return this.root.queryPoint(It,kt)},Ot.queryInterval=function(It,kt,Mt){if(It<=kt&&this.root)return this.root.queryInterval(It,kt,Mt)},Object.defineProperty(Ot,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Ot,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function Rt(It){return!It||It.length===0?new $t(null):new $t(Ct(It))}}(intervalTree)),intervalTree}var hasRequiredPositionCache;function requirePositionCache(){return hasRequiredPositionCache||(hasRequiredPositionCache=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var nt=tt(require$$1$1),rt=tt(require$$3$1),ot=tt(require$$4),st=tt(require$$2$2),ut=tt(requireIntervalTree()),ct=function(){function ft(){(0,rt.default)(this,ft),(0,st.default)(this,"_columnSizeMap",{}),(0,st.default)(this,"_intervalTree",(0,ut.default)()),(0,st.default)(this,"_leftMap",{})}return(0,ot.default)(ft,[{key:"estimateTotalHeight",value:function(ht,mt,yt){var vt=ht-this.count;return this.tallestColumnSize+Math.ceil(vt/mt)*yt}},{key:"range",value:function(ht,mt,yt){var vt=this;this._intervalTree.queryInterval(ht,ht+mt,function(Tt){var Et=(0,nt.default)(Tt,3),xt=Et[0];Et[1];var At=Et[2];return yt(At,vt._leftMap[At],xt)})}},{key:"setPosition",value:function(ht,mt,yt,vt){this._intervalTree.insert([yt,yt+vt,ht]),this._leftMap[ht]=mt;var Tt=this._columnSizeMap,Et=Tt[mt];Et===void 0?Tt[mt]=yt+vt:Tt[mt]=Math.max(Et,yt+vt)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var ht=this._columnSizeMap,mt=0;for(var yt in ht){var vt=ht[yt];mt=mt===0?vt:Math.min(mt,vt)}return mt}},{key:"tallestColumnSize",get:function(){var ht=this._columnSizeMap,mt=0;for(var yt in ht){var vt=ht[yt];mt=Math.max(mt,vt)}return mt}}]),ft}();et.default=ct}(PositionCache)),PositionCache}var hasRequiredMasonry;function requireMasonry(){return hasRequiredMasonry||(hasRequiredMasonry=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.bpfrpt_proptype_Positioner=et.bpfrpt_proptype_CellMeasurerCache=et.default=et.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=void 0;var rt=tt(require$$3$1),ot=tt(require$$4),st=tt(require$$5),ut=tt(require$$6),ct=tt(require$$7),ft=tt(require$$8),pt=tt(require$$2$2),ht=tt(require$$10),mt=nt(react.exports),yt=require$$3,vt=tt(requirePositionCache()),Tt=requireRequestAnimationTimeout();tt(propTypes$1.exports);var Et,xt;function At(Vt,Zt){var Ut=Object.keys(Vt);if(Object.getOwnPropertySymbols){var Xt=Object.getOwnPropertySymbols(Vt);Zt&&(Xt=Xt.filter(function(Jt){return Object.getOwnPropertyDescriptor(Vt,Jt).enumerable})),Ut.push.apply(Ut,Xt)}return Ut}function Ct(Vt){for(var Zt=1;Zt<arguments.length;Zt++){var Ut=arguments[Zt]!=null?arguments[Zt]:{};Zt%2?At(Ut,!0).forEach(function(Xt){(0,pt.default)(Vt,Xt,Ut[Xt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Vt,Object.getOwnPropertyDescriptors(Ut)):At(Ut).forEach(function(Xt){Object.defineProperty(Vt,Xt,Object.getOwnPropertyDescriptor(Ut,Xt))})}return Vt}var $t={},Ot=150;et.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=Ot;var Rt=(xt=Et=function(Vt){(0,ft.default)(Zt,Vt);function Zt(){var Ut,Xt;(0,rt.default)(this,Zt);for(var Jt=arguments.length,gn=new Array(Jt),An=0;An<Jt;An++)gn[An]=arguments[An];return Xt=(0,st.default)(this,(Ut=(0,ut.default)(Zt)).call.apply(Ut,[this].concat(gn))),(0,pt.default)((0,ct.default)(Xt),"state",{isScrolling:!1,scrollTop:0}),(0,pt.default)((0,ct.default)(Xt),"_debounceResetIsScrollingId",void 0),(0,pt.default)((0,ct.default)(Xt),"_invalidateOnUpdateStartIndex",null),(0,pt.default)((0,ct.default)(Xt),"_invalidateOnUpdateStopIndex",null),(0,pt.default)((0,ct.default)(Xt),"_positionCache",new vt.default),(0,pt.default)((0,ct.default)(Xt),"_startIndex",null),(0,pt.default)((0,ct.default)(Xt),"_startIndexMemoized",null),(0,pt.default)((0,ct.default)(Xt),"_stopIndex",null),(0,pt.default)((0,ct.default)(Xt),"_stopIndexMemoized",null),(0,pt.default)((0,ct.default)(Xt),"_debounceResetIsScrollingCallback",function(){Xt.setState({isScrolling:!1})}),(0,pt.default)((0,ct.default)(Xt),"_setScrollingContainerRef",function(sn){Xt._scrollingContainer=sn}),(0,pt.default)((0,ct.default)(Xt),"_onScroll",function(sn){var Sn=Xt.props.height,In=sn.currentTarget.scrollTop,_n=Math.min(Math.max(0,Xt._getEstimatedTotalHeight()-Sn),In);In===_n&&(Xt._debounceResetIsScrolling(),Xt.state.scrollTop!==_n&&Xt.setState({isScrolling:!0,scrollTop:_n}))}),Xt}return(0,ot.default)(Zt,[{key:"clearCellPositions",value:function(){this._positionCache=new vt.default,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(Xt){var Jt=Xt.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=Jt,this._invalidateOnUpdateStopIndex=Jt):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,Jt),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,Jt))}},{key:"recomputeCellPositions",value:function(){var Xt=this._positionCache.count-1;this._positionCache=new vt.default,this._populatePositionCache(0,Xt),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(Xt,Jt){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==Xt.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&(0,Tt.cancelAnimationTimeout)(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var Xt=this,Jt=this.props,gn=Jt.autoHeight,An=Jt.cellCount,sn=Jt.cellMeasurerCache,Sn=Jt.cellRenderer,In=Jt.className,_n=Jt.height,En=Jt.id,Ln=Jt.keyMapper,wn=Jt.overscanByPixels,Dn=Jt.role,$n=Jt.style,Gn=Jt.tabIndex,Jn=Jt.width,zn=Jt.rowDirection,Qn=this.state,Bn=Qn.isScrolling,jn=Qn.scrollTop,Ar=[],Er=this._getEstimatedTotalHeight(),Pr=this._positionCache.shortestColumnSize,Nr=this._positionCache.count,Ir=0,no;if(this._positionCache.range(Math.max(0,jn-wn),_n+wn*2,function(Xr,Jr,So){var va;typeof no>"u"?(Ir=Xr,no=Xr):(Ir=Math.min(Ir,Xr),no=Math.max(no,Xr)),Ar.push(Sn({index:Xr,isScrolling:Bn,key:Ln(Xr),parent:Xt,style:(va={height:sn.getHeight(Xr)},(0,pt.default)(va,zn==="ltr"?"left":"right",Jr),(0,pt.default)(va,"position","absolute"),(0,pt.default)(va,"top",So),(0,pt.default)(va,"width",sn.getWidth(Xr)),va)}))}),Pr<jn+_n+wn&&Nr<An)for(var ro=Math.min(An-Nr,Math.ceil((jn+_n+wn-Pr)/sn.defaultHeight*Jn/sn.defaultWidth)),ao=Nr;ao<Nr+ro;ao++)no=ao,Ar.push(Sn({index:ao,isScrolling:Bn,key:Ln(ao),parent:this,style:{width:sn.getWidth(ao)}}));return this._startIndex=Ir,this._stopIndex=no,mt.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:(0,ht.default)("ReactVirtualized__Masonry",In),id:En,onScroll:this._onScroll,role:Dn,style:Ct({boxSizing:"border-box",direction:"ltr",height:gn?"auto":_n,overflowX:"hidden",overflowY:Er<_n?"hidden":"auto",position:"relative",width:Jn,WebkitOverflowScrolling:"touch",willChange:"transform"},$n),tabIndex:Gn},mt.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:Er,maxWidth:"100%",maxHeight:Er,overflow:"hidden",pointerEvents:Bn?"none":"",position:"relative"}},Ar))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var Xt=this._invalidateOnUpdateStartIndex,Jt=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(Xt,Jt),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var Xt=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&(0,Tt.cancelAnimationTimeout)(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=(0,Tt.requestAnimationTimeout)(this._debounceResetIsScrollingCallback,Xt)}},{key:"_getEstimatedTotalHeight",value:function(){var Xt=this.props,Jt=Xt.cellCount,gn=Xt.cellMeasurerCache,An=Xt.width,sn=Math.max(1,Math.floor(An/gn.defaultWidth));return this._positionCache.estimateTotalHeight(Jt,sn,gn.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var Xt=this.props,Jt=Xt.height,gn=Xt.onScroll,An=this.state.scrollTop;this._onScrollMemoized!==An&&(gn({clientHeight:Jt,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:An}),this._onScrollMemoized=An)}},{key:"_invokeOnCellsRenderedCallback",value:function(){if(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex){var Xt=this.props.onCellsRendered;Xt({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex}}},{key:"_populatePositionCache",value:function(Xt,Jt){for(var gn=this.props,An=gn.cellMeasurerCache,sn=gn.cellPositioner,Sn=Xt;Sn<=Jt;Sn++){var In=sn(Sn),_n=In.left,En=In.top;this._positionCache.setPosition(Sn,_n,En,An.getHeight(Sn))}}}],[{key:"getDerivedStateFromProps",value:function(Xt,Jt){return Xt.scrollTop!==void 0&&Jt.scrollTop!==Xt.scrollTop?{isScrolling:!0,scrollTop:Xt.scrollTop}:null}}]),Zt}(mt.PureComponent),(0,pt.default)(Et,"propTypes",null),xt);(0,pt.default)(Rt,"defaultProps",{autoHeight:!1,keyMapper:It,onCellsRendered:kt,onScroll:kt,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:Ot,style:$t,tabIndex:0,rowDirection:"ltr"});function It(Vt){return Vt}function kt(){}var Mt=null;et.bpfrpt_proptype_CellMeasurerCache=Mt,(0,yt.polyfill)(Rt);var Ft=Rt;et.default=Ft;var zt=null;et.bpfrpt_proptype_Positioner=zt}(Masonry)),Masonry}var hasRequiredCreateCellPositioner;function requireCreateCellPositioner(){return hasRequiredCreateCellPositioner||(hasRequiredCreateCellPositioner=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt,requireMasonry();function tt(nt){var rt=nt.cellMeasurerCache,ot=nt.columnCount,st=nt.columnWidth,ut=nt.spacer,ct=ut===void 0?0:ut,ft;ht();function pt(yt){for(var vt=0,Tt=1;Tt<ft.length;Tt++)ft[Tt]<ft[vt]&&(vt=Tt);var Et=vt*(st+ct),xt=ft[vt]||0;return ft[vt]=xt+rt.getHeight(yt)+ct,{left:Et,top:xt}}function ht(){ft=[];for(var yt=0;yt<ot;yt++)ft[yt]=0}function mt(yt){ot=yt.columnCount,st=yt.columnWidth,ct=yt.spacer,ht()}return pt.reset=mt,pt}}(createCellPositioner)),createCellPositioner}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"createCellPositioner",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"Masonry",{enumerable:!0,get:function(){return rt.default}}),et.default=void 0;var nt=tt(requireCreateCellPositioner()),rt=tt(requireMasonry()),ot=rt.default;et.default=ot})(Masonry$1);var MultiGrid$1={},MultiGrid={},CellMeasurerCacheDecorator={},hasRequiredCellMeasurerCacheDecorator;function requireCellMeasurerCacheDecorator(){return hasRequiredCellMeasurerCacheDecorator||(hasRequiredCellMeasurerCacheDecorator=1,function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var nt=tt(require$$3$1),rt=tt(require$$4),ot=tt(require$$2$2),st=function(){function ut(){var ct=this,ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,nt.default)(this,ut),(0,ot.default)(this,"_cellMeasurerCache",void 0),(0,ot.default)(this,"_columnIndexOffset",void 0),(0,ot.default)(this,"_rowIndexOffset",void 0),(0,ot.default)(this,"columnWidth",function(Tt){var Et=Tt.index;ct._cellMeasurerCache.columnWidth({index:Et+ct._columnIndexOffset})}),(0,ot.default)(this,"rowHeight",function(Tt){var Et=Tt.index;ct._cellMeasurerCache.rowHeight({index:Et+ct._rowIndexOffset})});var pt=ft.cellMeasurerCache,ht=ft.columnIndexOffset,mt=ht===void 0?0:ht,yt=ft.rowIndexOffset,vt=yt===void 0?0:yt;this._cellMeasurerCache=pt,this._columnIndexOffset=mt,this._rowIndexOffset=vt}return(0,rt.default)(ut,[{key:"clear",value:function(ft,pt){this._cellMeasurerCache.clear(ft+this._rowIndexOffset,pt+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(ft){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(ft+this._rowIndexOffset,pt+this._columnIndexOffset)}},{key:"getWidth",value:function(ft){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(ft+this._rowIndexOffset,pt+this._columnIndexOffset)}},{key:"has",value:function(ft){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(ft+this._rowIndexOffset,pt+this._columnIndexOffset)}},{key:"set",value:function(ft,pt,ht,mt){this._cellMeasurerCache.set(ft+this._rowIndexOffset,pt+this._columnIndexOffset,ht,mt)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),ut}();et.default=st}(CellMeasurerCacheDecorator)),CellMeasurerCacheDecorator}var hasRequiredMultiGrid;function requireMultiGrid(){return hasRequiredMultiGrid||(hasRequiredMultiGrid=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=nt(require$$1$2),ot=nt(require$$2$1),st=nt(require$$3$1),ut=nt(require$$4),ct=nt(require$$5),ft=nt(require$$6),pt=nt(require$$7),ht=nt(require$$8),mt=nt(require$$2$2);nt(propTypes$1.exports);var yt=tt(react.exports),vt=require$$3,Tt=nt(requireCellMeasurerCacheDecorator()),Et=nt(Grid$1);function xt(Rt,It){var kt=Object.keys(Rt);if(Object.getOwnPropertySymbols){var Mt=Object.getOwnPropertySymbols(Rt);It&&(Mt=Mt.filter(function(Ft){return Object.getOwnPropertyDescriptor(Rt,Ft).enumerable})),kt.push.apply(kt,Mt)}return kt}function At(Rt){for(var It=1;It<arguments.length;It++){var kt=arguments[It]!=null?arguments[It]:{};It%2?xt(kt,!0).forEach(function(Mt){(0,mt.default)(Rt,Mt,kt[Mt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rt,Object.getOwnPropertyDescriptors(kt)):xt(kt).forEach(function(Mt){Object.defineProperty(Rt,Mt,Object.getOwnPropertyDescriptor(kt,Mt))})}return Rt}var Ct=20,$t=function(Rt){(0,ht.default)(It,Rt);function It(kt,Mt){var Ft;(0,st.default)(this,It),Ft=(0,ct.default)(this,(0,ft.default)(It).call(this,kt,Mt)),(0,mt.default)((0,pt.default)(Ft),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),(0,mt.default)((0,pt.default)(Ft),"_deferredInvalidateColumnIndex",null),(0,mt.default)((0,pt.default)(Ft),"_deferredInvalidateRowIndex",null),(0,mt.default)((0,pt.default)(Ft),"_bottomLeftGridRef",function(Ut){Ft._bottomLeftGrid=Ut}),(0,mt.default)((0,pt.default)(Ft),"_bottomRightGridRef",function(Ut){Ft._bottomRightGrid=Ut}),(0,mt.default)((0,pt.default)(Ft),"_cellRendererBottomLeftGrid",function(Ut){var Xt=Ut.rowIndex,Jt=(0,ot.default)(Ut,["rowIndex"]),gn=Ft.props,An=gn.cellRenderer,sn=gn.fixedRowCount,Sn=gn.rowCount;return Xt===Sn-sn?yt.createElement("div",{key:Jt.key,style:At({},Jt.style,{height:Ct})}):An(At({},Jt,{parent:(0,pt.default)(Ft),rowIndex:Xt+sn}))}),(0,mt.default)((0,pt.default)(Ft),"_cellRendererBottomRightGrid",function(Ut){var Xt=Ut.columnIndex,Jt=Ut.rowIndex,gn=(0,ot.default)(Ut,["columnIndex","rowIndex"]),An=Ft.props,sn=An.cellRenderer,Sn=An.fixedColumnCount,In=An.fixedRowCount;return sn(At({},gn,{columnIndex:Xt+Sn,parent:(0,pt.default)(Ft),rowIndex:Jt+In}))}),(0,mt.default)((0,pt.default)(Ft),"_cellRendererTopRightGrid",function(Ut){var Xt=Ut.columnIndex,Jt=(0,ot.default)(Ut,["columnIndex"]),gn=Ft.props,An=gn.cellRenderer,sn=gn.columnCount,Sn=gn.fixedColumnCount;return Xt===sn-Sn?yt.createElement("div",{key:Jt.key,style:At({},Jt.style,{width:Ct})}):An(At({},Jt,{columnIndex:Xt+Sn,parent:(0,pt.default)(Ft)}))}),(0,mt.default)((0,pt.default)(Ft),"_columnWidthRightGrid",function(Ut){var Xt=Ut.index,Jt=Ft.props,gn=Jt.columnCount,An=Jt.fixedColumnCount,sn=Jt.columnWidth,Sn=Ft.state,In=Sn.scrollbarSize,_n=Sn.showHorizontalScrollbar;return _n&&Xt===gn-An?In:typeof sn=="function"?sn({index:Xt+An}):sn}),(0,mt.default)((0,pt.default)(Ft),"_onScroll",function(Ut){var Xt=Ut.scrollLeft,Jt=Ut.scrollTop;Ft.setState({scrollLeft:Xt,scrollTop:Jt});var gn=Ft.props.onScroll;gn&&gn(Ut)}),(0,mt.default)((0,pt.default)(Ft),"_onScrollbarPresenceChange",function(Ut){var Xt=Ut.horizontal,Jt=Ut.size,gn=Ut.vertical,An=Ft.state,sn=An.showHorizontalScrollbar,Sn=An.showVerticalScrollbar;if(Xt!==sn||gn!==Sn){Ft.setState({scrollbarSize:Jt,showHorizontalScrollbar:Xt,showVerticalScrollbar:gn});var In=Ft.props.onScrollbarPresenceChange;typeof In=="function"&&In({horizontal:Xt,size:Jt,vertical:gn})}}),(0,mt.default)((0,pt.default)(Ft),"_onScrollLeft",function(Ut){var Xt=Ut.scrollLeft;Ft._onScroll({scrollLeft:Xt,scrollTop:Ft.state.scrollTop})}),(0,mt.default)((0,pt.default)(Ft),"_onScrollTop",function(Ut){var Xt=Ut.scrollTop;Ft._onScroll({scrollTop:Xt,scrollLeft:Ft.state.scrollLeft})}),(0,mt.default)((0,pt.default)(Ft),"_rowHeightBottomGrid",function(Ut){var Xt=Ut.index,Jt=Ft.props,gn=Jt.fixedRowCount,An=Jt.rowCount,sn=Jt.rowHeight,Sn=Ft.state,In=Sn.scrollbarSize,_n=Sn.showVerticalScrollbar;return _n&&Xt===An-gn?In:typeof sn=="function"?sn({index:Xt+gn}):sn}),(0,mt.default)((0,pt.default)(Ft),"_topLeftGridRef",function(Ut){Ft._topLeftGrid=Ut}),(0,mt.default)((0,pt.default)(Ft),"_topRightGridRef",function(Ut){Ft._topRightGrid=Ut});var zt=kt.deferredMeasurementCache,Vt=kt.fixedColumnCount,Zt=kt.fixedRowCount;return Ft._maybeCalculateCachedStyles(!0),zt&&(Ft._deferredMeasurementCacheBottomLeftGrid=Zt>0?new Tt.default({cellMeasurerCache:zt,columnIndexOffset:0,rowIndexOffset:Zt}):zt,Ft._deferredMeasurementCacheBottomRightGrid=Vt>0||Zt>0?new Tt.default({cellMeasurerCache:zt,columnIndexOffset:Vt,rowIndexOffset:Zt}):zt,Ft._deferredMeasurementCacheTopRightGrid=Vt>0?new Tt.default({cellMeasurerCache:zt,columnIndexOffset:Vt,rowIndexOffset:0}):zt),Ft}return(0,ut.default)(It,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ft=Mt.columnIndex,zt=Ft===void 0?0:Ft,Vt=Mt.rowIndex,Zt=Vt===void 0?0:Vt;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,zt):zt,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,Zt):Zt}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ft=Mt.columnIndex,zt=Ft===void 0?0:Ft,Vt=Mt.rowIndex,Zt=Vt===void 0?0:Vt,Ut=this.props,Xt=Ut.fixedColumnCount,Jt=Ut.fixedRowCount,gn=Math.max(0,zt-Xt),An=Math.max(0,Zt-Jt);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:zt,rowIndex:An}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:gn,rowIndex:An}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:zt,rowIndex:Zt}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:gn,rowIndex:Zt}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var Mt=this.props,Ft=Mt.scrollLeft,zt=Mt.scrollTop;if(Ft>0||zt>0){var Vt={};Ft>0&&(Vt.scrollLeft=Ft),zt>0&&(Vt.scrollTop=zt),this.setState(Vt)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var Mt=this.props,Ft=Mt.onScroll,zt=Mt.onSectionRendered;Mt.onScrollbarPresenceChange,Mt.scrollLeft;var Vt=Mt.scrollToColumn;Mt.scrollTop;var Zt=Mt.scrollToRow,Ut=(0,ot.default)(Mt,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var Xt=this.state,Jt=Xt.scrollLeft,gn=Xt.scrollTop;return yt.createElement("div",{style:this._containerOuterStyle},yt.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(Ut),this._renderTopRightGrid(At({},Ut,{onScroll:Ft,scrollLeft:Jt}))),yt.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(At({},Ut,{onScroll:Ft,scrollTop:gn})),this._renderBottomRightGrid(At({},Ut,{onScroll:Ft,onSectionRendered:zt,scrollLeft:Jt,scrollToColumn:Vt,scrollToRow:Zt,scrollTop:gn}))))}},{key:"_getBottomGridHeight",value:function(Mt){var Ft=Mt.height,zt=this._getTopGridHeight(Mt);return Ft-zt}},{key:"_getLeftGridWidth",value:function(Mt){var Ft=Mt.fixedColumnCount,zt=Mt.columnWidth;if(this._leftGridWidth==null)if(typeof zt=="function"){for(var Vt=0,Zt=0;Zt<Ft;Zt++)Vt+=zt({index:Zt});this._leftGridWidth=Vt}else this._leftGridWidth=zt*Ft;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(Mt){var Ft=Mt.width,zt=this._getLeftGridWidth(Mt);return Ft-zt}},{key:"_getTopGridHeight",value:function(Mt){var Ft=Mt.fixedRowCount,zt=Mt.rowHeight;if(this._topGridHeight==null)if(typeof zt=="function"){for(var Vt=0,Zt=0;Zt<Ft;Zt++)Vt+=zt({index:Zt});this._topGridHeight=Vt}else this._topGridHeight=zt*Ft;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var Mt=this._deferredInvalidateColumnIndex,Ft=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:Mt,rowIndex:Ft}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(Mt){var Ft=this.props,zt=Ft.columnWidth,Vt=Ft.enableFixedColumnScroll,Zt=Ft.enableFixedRowScroll,Ut=Ft.height,Xt=Ft.fixedColumnCount,Jt=Ft.fixedRowCount,gn=Ft.rowHeight,An=Ft.style,sn=Ft.styleBottomLeftGrid,Sn=Ft.styleBottomRightGrid,In=Ft.styleTopLeftGrid,_n=Ft.styleTopRightGrid,En=Ft.width,Ln=Mt||Ut!==this._lastRenderedHeight||En!==this._lastRenderedWidth,wn=Mt||zt!==this._lastRenderedColumnWidth||Xt!==this._lastRenderedFixedColumnCount,Dn=Mt||Jt!==this._lastRenderedFixedRowCount||gn!==this._lastRenderedRowHeight;(Mt||Ln||An!==this._lastRenderedStyle)&&(this._containerOuterStyle=At({height:Ut,overflow:"visible",width:En},An)),(Mt||Ln||Dn)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:En},this._containerBottomStyle={height:Ut-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:En}),(Mt||sn!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=At({left:0,overflowX:"hidden",overflowY:Vt?"auto":"hidden",position:"absolute"},sn)),(Mt||wn||Sn!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=At({left:this._getLeftGridWidth(this.props),position:"absolute"},Sn)),(Mt||In!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=At({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},In)),(Mt||wn||_n!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=At({left:this._getLeftGridWidth(this.props),overflowX:Zt?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},_n)),this._lastRenderedColumnWidth=zt,this._lastRenderedFixedColumnCount=Xt,this._lastRenderedFixedRowCount=Jt,this._lastRenderedHeight=Ut,this._lastRenderedRowHeight=gn,this._lastRenderedStyle=An,this._lastRenderedStyleBottomLeftGrid=sn,this._lastRenderedStyleBottomRightGrid=Sn,this._lastRenderedStyleTopLeftGrid=In,this._lastRenderedStyleTopRightGrid=_n,this._lastRenderedWidth=En}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(Mt){var Ft=Mt.enableFixedColumnScroll,zt=Mt.fixedColumnCount,Vt=Mt.fixedRowCount,Zt=Mt.rowCount,Ut=Mt.hideBottomLeftGridScrollbar,Xt=this.state.showVerticalScrollbar;if(!zt)return null;var Jt=Xt?1:0,gn=this._getBottomGridHeight(Mt),An=this._getLeftGridWidth(Mt),sn=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,Sn=Ut?An+sn:An,In=yt.createElement(Et.default,(0,rt.default)({},Mt,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:zt,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:gn,onScroll:Ft?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,Zt-Vt)+Jt,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:Sn}));return Ut?yt.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:At({},this._bottomLeftGridStyle,{height:gn,width:An,overflowY:"hidden"})},In):In}},{key:"_renderBottomRightGrid",value:function(Mt){var Ft=Mt.columnCount,zt=Mt.fixedColumnCount,Vt=Mt.fixedRowCount,Zt=Mt.rowCount,Ut=Mt.scrollToColumn,Xt=Mt.scrollToRow;return yt.createElement(Et.default,(0,rt.default)({},Mt,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,Ft-zt),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(Mt),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,Zt-Vt),rowHeight:this._rowHeightBottomGrid,scrollToColumn:Ut-zt,scrollToRow:Xt-Vt,style:this._bottomRightGridStyle,width:this._getRightGridWidth(Mt)}))}},{key:"_renderTopLeftGrid",value:function(Mt){var Ft=Mt.fixedColumnCount,zt=Mt.fixedRowCount;return!Ft||!zt?null:yt.createElement(Et.default,(0,rt.default)({},Mt,{className:this.props.classNameTopLeftGrid,columnCount:Ft,height:this._getTopGridHeight(Mt),ref:this._topLeftGridRef,rowCount:zt,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(Mt)}))}},{key:"_renderTopRightGrid",value:function(Mt){var Ft=Mt.columnCount,zt=Mt.enableFixedRowScroll,Vt=Mt.fixedColumnCount,Zt=Mt.fixedRowCount,Ut=Mt.scrollLeft,Xt=Mt.hideTopRightGridScrollbar,Jt=this.state,gn=Jt.showHorizontalScrollbar,An=Jt.scrollbarSize;if(!Zt)return null;var sn=gn?1:0,Sn=this._getTopGridHeight(Mt),In=this._getRightGridWidth(Mt),_n=gn?An:0,En=Sn,Ln=this._topRightGridStyle;Xt&&(En=Sn+_n,Ln=At({},this._topRightGridStyle,{left:0}));var wn=yt.createElement(Et.default,(0,rt.default)({},Mt,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,Ft-Vt)+sn,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:En,onScroll:zt?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:Zt,scrollLeft:Ut,style:Ln,tabIndex:null,width:In}));return Xt?yt.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:At({},this._topRightGridStyle,{height:Sn,width:In,overflowX:"hidden"})},wn):wn}}],[{key:"getDerivedStateFromProps",value:function(Mt,Ft){return Mt.scrollLeft!==Ft.scrollLeft||Mt.scrollTop!==Ft.scrollTop?{scrollLeft:Mt.scrollLeft!=null&&Mt.scrollLeft>=0?Mt.scrollLeft:Ft.scrollLeft,scrollTop:Mt.scrollTop!=null&&Mt.scrollTop>=0?Mt.scrollTop:Ft.scrollTop}:null}}]),It}(yt.PureComponent);(0,mt.default)($t,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),$t.propTypes={},(0,vt.polyfill)($t);var Ot=$t;et.default=Ot}(MultiGrid)),MultiGrid}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"MultiGrid",{enumerable:!0,get:function(){return nt.default}}),et.default=void 0;var nt=tt(requireMultiGrid()),rt=nt.default;et.default=rt})(MultiGrid$1);var ScrollSync$1={},ScrollSync={},hasRequiredScrollSync;function requireScrollSync(){return hasRequiredScrollSync||(hasRequiredScrollSync=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=nt(require$$3$1),ot=nt(require$$4),st=nt(require$$5),ut=nt(require$$6),ct=nt(require$$7),ft=nt(require$$8);nt(propTypes$1.exports);var pt=tt(react.exports),ht=function(mt){(0,ft.default)(yt,mt);function yt(vt,Tt){var Et;return(0,rt.default)(this,yt),Et=(0,st.default)(this,(0,ut.default)(yt).call(this,vt,Tt)),Et.state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},Et._onScroll=Et._onScroll.bind((0,ct.default)(Et)),Et}return(0,ot.default)(yt,[{key:"render",value:function(){var Tt=this.props.children,Et=this.state,xt=Et.clientHeight,At=Et.clientWidth,Ct=Et.scrollHeight,$t=Et.scrollLeft,Ot=Et.scrollTop,Rt=Et.scrollWidth;return Tt({clientHeight:xt,clientWidth:At,onScroll:this._onScroll,scrollHeight:Ct,scrollLeft:$t,scrollTop:Ot,scrollWidth:Rt})}},{key:"_onScroll",value:function(Tt){var Et=Tt.clientHeight,xt=Tt.clientWidth,At=Tt.scrollHeight,Ct=Tt.scrollLeft,$t=Tt.scrollTop,Ot=Tt.scrollWidth;this.setState({clientHeight:Et,clientWidth:xt,scrollHeight:At,scrollLeft:Ct,scrollTop:$t,scrollWidth:Ot})}}]),yt}(pt.PureComponent);et.default=ht,ht.propTypes={}}(ScrollSync)),ScrollSync}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"ScrollSync",{enumerable:!0,get:function(){return nt.default}}),et.default=void 0;var nt=tt(requireScrollSync()),rt=nt.default;et.default=rt})(ScrollSync$1);var Table$2={},createMultiSort={},hasRequiredCreateMultiSort;function requireCreateMultiSort(){return hasRequiredCreateMultiSort||(hasRequiredCreateMultiSort=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt;function tt(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=rt.defaultSortBy,st=rt.defaultSortDirection,ut=st===void 0?{}:st;if(!nt)throw Error('Required parameter "sortCallback" not specified');var ct=ot||[],ft={};ct.forEach(function(ht){ft[ht]=ut[ht]!==void 0?ut[ht]:"ASC"});function pt(ht){var mt=ht.defaultSortDirection,yt=ht.event,vt=ht.sortBy;if(yt.shiftKey)ft[vt]!==void 0?ft[vt]=ft[vt]==="ASC"?"DESC":"ASC":(ft[vt]=mt,ct.push(vt));else if(yt.ctrlKey||yt.metaKey){var Tt=ct.indexOf(vt);Tt>=0&&(ct.splice(Tt,1),delete ft[vt])}else{ct.length=0,ct.push(vt);var Et=Object.keys(ft);Et.forEach(function(xt){xt!==vt&&delete ft[xt]}),ft[vt]!==void 0?ft[vt]=ft[vt]==="ASC"?"DESC":"ASC":ft[vt]=mt}nt({sortBy:ct,sortDirection:ft})}return{sort:pt,sortBy:ct,sortDirection:ft}}}(createMultiSort)),createMultiSort}var defaultCellDataGetter={},types={},hasRequiredTypes;function requireTypes(){if(hasRequiredTypes)return types;hasRequiredTypes=1;var et=interopRequireDefault.exports;Object.defineProperty(types,"__esModule",{value:!0}),types.bpfrpt_proptype_RowRendererParams=types.bpfrpt_proptype_HeaderRendererParams=types.bpfrpt_proptype_HeaderRowRendererParams=types.bpfrpt_proptype_CellRendererParams=types.bpfrpt_proptype_CellDataGetterParams=void 0,et(propTypes$1.exports);var tt=null;types.bpfrpt_proptype_CellDataGetterParams=tt;var nt=null;types.bpfrpt_proptype_CellRendererParams=nt;var rt=null;types.bpfrpt_proptype_HeaderRowRendererParams=rt;var ot=null;types.bpfrpt_proptype_HeaderRendererParams=ot;var st=null;return types.bpfrpt_proptype_RowRendererParams=st,types}var hasRequiredDefaultCellDataGetter;function requireDefaultCellDataGetter(){return hasRequiredDefaultCellDataGetter||(hasRequiredDefaultCellDataGetter=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt,requireTypes();function tt(nt){var rt=nt.dataKey,ot=nt.rowData;return typeof ot.get=="function"?ot.get(rt):ot[rt]}}(defaultCellDataGetter)),defaultCellDataGetter}var defaultCellRenderer={},hasRequiredDefaultCellRenderer;function requireDefaultCellRenderer(){return hasRequiredDefaultCellRenderer||(hasRequiredDefaultCellRenderer=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt,requireTypes();function tt(nt){var rt=nt.cellData;return rt==null?"":String(rt)}}(defaultCellRenderer)),defaultCellRenderer}var defaultHeaderRowRenderer={},hasRequiredDefaultHeaderRowRenderer;function requireDefaultHeaderRowRenderer(){return hasRequiredDefaultHeaderRowRenderer||(hasRequiredDefaultHeaderRowRenderer=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=ot;var rt=nt(react.exports);requireTypes(),tt(propTypes$1.exports);function ot(st){var ut=st.className,ct=st.columns,ft=st.style;return rt.createElement("div",{className:ut,role:"row",style:ft},ct)}ot.propTypes=null}(defaultHeaderRowRenderer)),defaultHeaderRowRenderer}var defaultHeaderRenderer={},SortIndicator$1={},SortDirection={},hasRequiredSortDirection;function requireSortDirection(){return hasRequiredSortDirection||(hasRequiredSortDirection=1,function(et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var tt={ASC:"ASC",DESC:"DESC"},nt=tt;et.default=nt}(SortDirection)),SortDirection}var hasRequiredSortIndicator;function requireSortIndicator(){return hasRequiredSortIndicator||(hasRequiredSortIndicator=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=ut;var rt=nt(require$$10);nt(propTypes$1.exports);var ot=tt(react.exports),st=nt(requireSortDirection());function ut(ct){var ft=ct.sortDirection,pt=(0,rt.default)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":ft===st.default.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":ft===st.default.DESC});return ot.createElement("svg",{className:pt,width:18,height:18,viewBox:"0 0 24 24"},ft===st.default.ASC?ot.createElement("path",{d:"M7 14l5-5 5 5z"}):ot.createElement("path",{d:"M7 10l5 5 5-5z"}),ot.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}ut.propTypes={}}(SortIndicator$1)),SortIndicator$1}var hasRequiredDefaultHeaderRenderer;function requireDefaultHeaderRenderer(){return hasRequiredDefaultHeaderRenderer||(hasRequiredDefaultHeaderRenderer=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=st;var rt=nt(react.exports),ot=tt(requireSortIndicator());requireTypes(),tt(propTypes$1.exports);function st(ut){var ct=ut.dataKey,ft=ut.label,pt=ut.sortBy,ht=ut.sortDirection,mt=pt===ct,yt=[rt.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof ft=="string"?ft:null},ft)];return mt&&yt.push(rt.createElement(ot.default,{key:"SortIndicator",sortDirection:ht})),yt}st.propTypes=null}(defaultHeaderRenderer)),defaultHeaderRenderer}var defaultRowRenderer={},hasRequiredDefaultRowRenderer;function requireDefaultRowRenderer(){return hasRequiredDefaultRowRenderer||(hasRequiredDefaultRowRenderer=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=st;var rt=nt(require$$1$2),ot=tt(react.exports);requireTypes(),nt(propTypes$1.exports);function st(ut){var ct=ut.className,ft=ut.columns,pt=ut.index,ht=ut.key,mt=ut.onRowClick,yt=ut.onRowDoubleClick,vt=ut.onRowMouseOut,Tt=ut.onRowMouseOver,Et=ut.onRowRightClick,xt=ut.rowData,At=ut.style,Ct={"aria-rowindex":pt+1};return(mt||yt||vt||Tt||Et)&&(Ct["aria-label"]="row",Ct.tabIndex=0,mt&&(Ct.onClick=function($t){return mt({event:$t,index:pt,rowData:xt})}),yt&&(Ct.onDoubleClick=function($t){return yt({event:$t,index:pt,rowData:xt})}),vt&&(Ct.onMouseOut=function($t){return vt({event:$t,index:pt,rowData:xt})}),Tt&&(Ct.onMouseOver=function($t){return Tt({event:$t,index:pt,rowData:xt})}),Et&&(Ct.onContextMenu=function($t){return Et({event:$t,index:pt,rowData:xt})})),ot.createElement("div",(0,rt.default)({},Ct,{className:ct,key:ht,role:"row",style:At}),ft)}st.propTypes=null}(defaultRowRenderer)),defaultRowRenderer}var Column$1={},hasRequiredColumn;function requireColumn(){return hasRequiredColumn||(hasRequiredColumn=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=nt(require$$3$1),ot=nt(require$$5),st=nt(require$$6),ut=nt(require$$8),ct=nt(require$$2$2);nt(propTypes$1.exports);var ft=tt(react.exports),pt=nt(requireDefaultHeaderRenderer()),ht=nt(requireDefaultCellRenderer()),mt=nt(requireDefaultCellDataGetter()),yt=nt(requireSortDirection()),vt=function(Tt){(0,ut.default)(Et,Tt);function Et(){return(0,rt.default)(this,Et),(0,ot.default)(this,(0,st.default)(Et).apply(this,arguments))}return Et}(ft.Component);et.default=vt,(0,ct.default)(vt,"defaultProps",{cellDataGetter:mt.default,cellRenderer:ht.default,defaultSortDirection:yt.default.ASC,flexGrow:0,flexShrink:1,headerRenderer:pt.default,style:{}}),vt.propTypes={}}(Column$1)),Column$1}var Table$1={},hasRequiredTable;function requireTable(){return hasRequiredTable||(hasRequiredTable=1,function(et){var tt=interopRequireWildcard.exports,nt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var rt=nt(require$$1$2),ot=nt(require$$3$1),st=nt(require$$4),ut=nt(require$$5),ct=nt(require$$6),ft=nt(require$$7),pt=nt(require$$8),ht=nt(require$$2$2),mt=nt(require$$10);nt(requireColumn()),nt(propTypes$1.exports);var yt=tt(react.exports),vt=reactDom.exports,Tt=tt(Grid$1),Et=nt(requireDefaultRowRenderer()),xt=nt(requireDefaultHeaderRowRenderer()),At=nt(requireSortDirection());function Ct(Rt,It){var kt=Object.keys(Rt);if(Object.getOwnPropertySymbols){var Mt=Object.getOwnPropertySymbols(Rt);It&&(Mt=Mt.filter(function(Ft){return Object.getOwnPropertyDescriptor(Rt,Ft).enumerable})),kt.push.apply(kt,Mt)}return kt}function $t(Rt){for(var It=1;It<arguments.length;It++){var kt=arguments[It]!=null?arguments[It]:{};It%2?Ct(kt,!0).forEach(function(Mt){(0,ht.default)(Rt,Mt,kt[Mt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rt,Object.getOwnPropertyDescriptors(kt)):Ct(kt).forEach(function(Mt){Object.defineProperty(Rt,Mt,Object.getOwnPropertyDescriptor(kt,Mt))})}return Rt}var Ot=function(Rt){(0,pt.default)(It,Rt);function It(kt){var Mt;return(0,ot.default)(this,It),Mt=(0,ut.default)(this,(0,ct.default)(It).call(this,kt)),Mt.state={scrollbarWidth:0},Mt._createColumn=Mt._createColumn.bind((0,ft.default)(Mt)),Mt._createRow=Mt._createRow.bind((0,ft.default)(Mt)),Mt._onScroll=Mt._onScroll.bind((0,ft.default)(Mt)),Mt._onSectionRendered=Mt._onSectionRendered.bind((0,ft.default)(Mt)),Mt._setRef=Mt._setRef.bind((0,ft.default)(Mt)),Mt}return(0,st.default)(It,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(Mt){var Ft=Mt.alignment,zt=Mt.index;if(this.Grid){var Vt=this.Grid.getOffsetForCell({alignment:Ft,rowIndex:zt}),Zt=Vt.scrollTop;return Zt}return 0}},{key:"invalidateCellSizeAfterRender",value:function(Mt){var Ft=Mt.columnIndex,zt=Mt.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:zt,columnIndex:Ft})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ft=Mt.columnIndex,zt=Ft===void 0?0:Ft,Vt=Mt.rowIndex,Zt=Vt===void 0?0:Vt;this.Grid&&this.Grid.recomputeGridSize({rowIndex:Zt,columnIndex:zt})}},{key:"recomputeRowHeights",value:function(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:Mt})}},{key:"scrollToPosition",value:function(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:Mt})}},{key:"scrollToRow",value:function(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:Mt})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var Mt=(0,vt.findDOMNode)(this.Grid),Ft=Mt.clientWidth||0,zt=Mt.offsetWidth||0;return zt-Ft}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var Mt=this,Ft=this.props,zt=Ft.children,Vt=Ft.className,Zt=Ft.disableHeader,Ut=Ft.gridClassName,Xt=Ft.gridStyle,Jt=Ft.headerHeight,gn=Ft.headerRowRenderer,An=Ft.height,sn=Ft.id,Sn=Ft.noRowsRenderer,In=Ft.rowClassName,_n=Ft.rowStyle,En=Ft.scrollToIndex,Ln=Ft.style,wn=Ft.width,Dn=this.state.scrollbarWidth,$n=Zt?An:An-Jt,Gn=typeof In=="function"?In({index:-1}):In,Jn=typeof _n=="function"?_n({index:-1}):_n;return this._cachedColumnStyles=[],yt.Children.toArray(zt).forEach(function(zn,Qn){var Bn=Mt._getFlexStyleForColumn(zn,zn.props.style);Mt._cachedColumnStyles[Qn]=$t({overflow:"hidden"},Bn)}),yt.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":yt.Children.toArray(zt).length,"aria-rowcount":this.props.rowCount,className:(0,mt.default)("ReactVirtualized__Table",Vt),id:sn,role:"grid",style:Ln},!Zt&&gn({className:(0,mt.default)("ReactVirtualized__Table__headerRow",Gn),columns:this._getHeaderColumns(),style:$t({height:Jt,overflow:"hidden",paddingRight:Dn,width:wn},Jn)}),yt.createElement(Tt.default,(0,rt.default)({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:(0,mt.default)("ReactVirtualized__Table__Grid",Ut),cellRenderer:this._createRow,columnWidth:wn,columnCount:1,height:$n,id:void 0,noContentRenderer:Sn,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:Dn,scrollToRow:En,style:$t({},Xt,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(Mt){var Ft=Mt.column,zt=Mt.columnIndex,Vt=Mt.isScrolling,Zt=Mt.parent,Ut=Mt.rowData,Xt=Mt.rowIndex,Jt=this.props.onColumnClick,gn=Ft.props,An=gn.cellDataGetter,sn=gn.cellRenderer,Sn=gn.className,In=gn.columnData,_n=gn.dataKey,En=gn.id,Ln=An({columnData:In,dataKey:_n,rowData:Ut}),wn=sn({cellData:Ln,columnData:In,columnIndex:zt,dataKey:_n,isScrolling:Vt,parent:Zt,rowData:Ut,rowIndex:Xt}),Dn=function(zn){Jt&&Jt({columnData:In,dataKey:_n,event:zn})},$n=this._cachedColumnStyles[zt],Gn=typeof wn=="string"?wn:null;return yt.createElement("div",{"aria-colindex":zt+1,"aria-describedby":En,className:(0,mt.default)("ReactVirtualized__Table__rowColumn",Sn),key:"Row"+Xt+"-Col"+zt,onClick:Dn,role:"gridcell",style:$n,title:Gn},wn)}},{key:"_createHeader",value:function(Mt){var Ft=Mt.column,zt=Mt.index,Vt=this.props,Zt=Vt.headerClassName,Ut=Vt.headerStyle,Xt=Vt.onHeaderClick,Jt=Vt.sort,gn=Vt.sortBy,An=Vt.sortDirection,sn=Ft.props,Sn=sn.columnData,In=sn.dataKey,_n=sn.defaultSortDirection,En=sn.disableSort,Ln=sn.headerRenderer,wn=sn.id,Dn=sn.label,$n=!En&&Jt,Gn=(0,mt.default)("ReactVirtualized__Table__headerColumn",Zt,Ft.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:$n}),Jn=this._getFlexStyleForColumn(Ft,$t({},Ut,{},Ft.props.headerStyle)),zn=Ln({columnData:Sn,dataKey:In,disableSort:En,label:Dn,sortBy:gn,sortDirection:An}),Qn,Bn,jn,Ar,Er;if($n||Xt){var Pr=gn!==In,Nr=Pr?_n:An===At.default.DESC?At.default.ASC:At.default.DESC,Ir=function(ao){$n&&Jt({defaultSortDirection:_n,event:ao,sortBy:In,sortDirection:Nr}),Xt&&Xt({columnData:Sn,dataKey:In,event:ao})},no=function(ao){(ao.key==="Enter"||ao.key===" ")&&Ir(ao)};Er=Ft.props["aria-label"]||Dn||In,Ar="none",jn=0,Qn=Ir,Bn=no}return gn===In&&(Ar=An===At.default.ASC?"ascending":"descending"),yt.createElement("div",{"aria-label":Er,"aria-sort":Ar,className:Gn,id:wn,key:"Header-Col"+zt,onClick:Qn,onKeyDown:Bn,role:"columnheader",style:Jn,tabIndex:jn},zn)}},{key:"_createRow",value:function(Mt){var Ft=this,zt=Mt.rowIndex,Vt=Mt.isScrolling,Zt=Mt.key,Ut=Mt.parent,Xt=Mt.style,Jt=this.props,gn=Jt.children,An=Jt.onRowClick,sn=Jt.onRowDoubleClick,Sn=Jt.onRowRightClick,In=Jt.onRowMouseOver,_n=Jt.onRowMouseOut,En=Jt.rowClassName,Ln=Jt.rowGetter,wn=Jt.rowRenderer,Dn=Jt.rowStyle,$n=this.state.scrollbarWidth,Gn=typeof En=="function"?En({index:zt}):En,Jn=typeof Dn=="function"?Dn({index:zt}):Dn,zn=Ln({index:zt}),Qn=yt.Children.toArray(gn).map(function(Ar,Er){return Ft._createColumn({column:Ar,columnIndex:Er,isScrolling:Vt,parent:Ut,rowData:zn,rowIndex:zt,scrollbarWidth:$n})}),Bn=(0,mt.default)("ReactVirtualized__Table__row",Gn),jn=$t({},Xt,{height:this._getRowHeight(zt),overflow:"hidden",paddingRight:$n},Jn);return wn({className:Bn,columns:Qn,index:zt,isScrolling:Vt,key:Zt,onRowClick:An,onRowDoubleClick:sn,onRowRightClick:Sn,onRowMouseOver:In,onRowMouseOut:_n,rowData:zn,style:jn})}},{key:"_getFlexStyleForColumn",value:function(Mt){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},zt="".concat(Mt.props.flexGrow," ").concat(Mt.props.flexShrink," ").concat(Mt.props.width,"px"),Vt=$t({},Ft,{flex:zt,msFlex:zt,WebkitFlex:zt});return Mt.props.maxWidth&&(Vt.maxWidth=Mt.props.maxWidth),Mt.props.minWidth&&(Vt.minWidth=Mt.props.minWidth),Vt}},{key:"_getHeaderColumns",value:function(){var Mt=this,Ft=this.props,zt=Ft.children,Vt=Ft.disableHeader,Zt=Vt?[]:yt.Children.toArray(zt);return Zt.map(function(Ut,Xt){return Mt._createHeader({column:Ut,index:Xt})})}},{key:"_getRowHeight",value:function(Mt){var Ft=this.props.rowHeight;return typeof Ft=="function"?Ft({index:Mt}):Ft}},{key:"_onScroll",value:function(Mt){var Ft=Mt.clientHeight,zt=Mt.scrollHeight,Vt=Mt.scrollTop,Zt=this.props.onScroll;Zt({clientHeight:Ft,scrollHeight:zt,scrollTop:Vt})}},{key:"_onSectionRendered",value:function(Mt){var Ft=Mt.rowOverscanStartIndex,zt=Mt.rowOverscanStopIndex,Vt=Mt.rowStartIndex,Zt=Mt.rowStopIndex,Ut=this.props.onRowsRendered;Ut({overscanStartIndex:Ft,overscanStopIndex:zt,startIndex:Vt,stopIndex:Zt})}},{key:"_setRef",value:function(Mt){this.Grid=Mt}},{key:"_setScrollbarWidth",value:function(){var Mt=this.getScrollbarWidth();this.setState({scrollbarWidth:Mt})}}]),It}(yt.PureComponent);et.default=Ot,(0,ht.default)(Ot,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:Tt.accessibilityOverscanIndicesGetter,overscanRowCount:10,rowRenderer:Et.default,headerRowRenderer:xt.default,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),Ot.propTypes={}}(Table$1)),Table$1}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"createMultiSort",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"defaultCellDataGetter",{enumerable:!0,get:function(){return rt.default}}),Object.defineProperty(et,"defaultCellRenderer",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(et,"defaultHeaderRowRenderer",{enumerable:!0,get:function(){return st.default}}),Object.defineProperty(et,"defaultHeaderRenderer",{enumerable:!0,get:function(){return ut.default}}),Object.defineProperty(et,"defaultRowRenderer",{enumerable:!0,get:function(){return ct.default}}),Object.defineProperty(et,"Column",{enumerable:!0,get:function(){return ft.default}}),Object.defineProperty(et,"SortDirection",{enumerable:!0,get:function(){return pt.default}}),Object.defineProperty(et,"SortIndicator",{enumerable:!0,get:function(){return ht.default}}),Object.defineProperty(et,"Table",{enumerable:!0,get:function(){return mt.default}}),et.default=void 0;var nt=tt(requireCreateMultiSort()),rt=tt(requireDefaultCellDataGetter()),ot=tt(requireDefaultCellRenderer()),st=tt(requireDefaultHeaderRowRenderer()),ut=tt(requireDefaultHeaderRenderer()),ct=tt(requireDefaultRowRenderer()),ft=tt(requireColumn()),pt=tt(requireSortDirection()),ht=tt(requireSortIndicator()),mt=tt(requireTable()),yt=mt.default;et.default=yt})(Table$2);var WindowScroller$1={},WindowScroller={},onScroll={},hasRequiredOnScroll;function requireOnScroll(){if(hasRequiredOnScroll)return onScroll;hasRequiredOnScroll=1,Object.defineProperty(onScroll,"__esModule",{value:!0}),onScroll.registerScrollListener=ft,onScroll.unregisterScrollListener=pt;var et=requireRequestAnimationTimeout();requireWindowScroller();var tt=[],nt=null,rt=null;function ot(){rt&&(rt=null,document.body&&nt!=null&&(document.body.style.pointerEvents=nt),nt=null)}function st(){ot(),tt.forEach(function(ht){return ht.__resetIsScrolling()})}function ut(){rt&&(0,et.cancelAnimationTimeout)(rt);var ht=0;tt.forEach(function(mt){ht=Math.max(ht,mt.props.scrollingResetTimeInterval)}),rt=(0,et.requestAnimationTimeout)(st,ht)}function ct(ht){ht.currentTarget===window&&nt==null&&document.body&&(nt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ut(),tt.forEach(function(mt){mt.props.scrollElement===ht.currentTarget&&mt.__handleWindowScrollEvent()})}function ft(ht,mt){tt.some(function(yt){return yt.props.scrollElement===mt})||mt.addEventListener("scroll",ct),tt.push(ht)}function pt(ht,mt){tt=tt.filter(function(yt){return yt!==ht}),tt.length||(mt.removeEventListener("scroll",ct),rt&&((0,et.cancelAnimationTimeout)(rt),ot()))}return onScroll}var dimensions={},hasRequiredDimensions;function requireDimensions(){if(hasRequiredDimensions)return dimensions;hasRequiredDimensions=1,Object.defineProperty(dimensions,"__esModule",{value:!0}),dimensions.getDimensions=nt,dimensions.getPositionOffset=rt,dimensions.getScrollOffset=ot;var et=function(ut){return ut===window},tt=function(ut){return ut.getBoundingClientRect()};function nt(st,ut){if(st)if(et(st)){var ct=window,ft=ct.innerHeight,pt=ct.innerWidth;return{height:typeof ft=="number"?ft:0,width:typeof pt=="number"?pt:0}}else return tt(st);else return{height:ut.serverHeight,width:ut.serverWidth}}function rt(st,ut){if(et(ut)&&document.documentElement){var ct=document.documentElement,ft=tt(st),pt=tt(ct);return{top:ft.top-pt.top,left:ft.left-pt.left}}else{var ht=ot(ut),mt=tt(st),yt=tt(ut);return{top:mt.top+ht.top-yt.top,left:mt.left+ht.left-yt.left}}}function ot(st){return et(st)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:st.scrollTop,left:st.scrollLeft}}return dimensions}var hasRequiredWindowScroller;function requireWindowScroller(){return hasRequiredWindowScroller||(hasRequiredWindowScroller=1,function(et){var tt=interopRequireDefault.exports,nt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=et.IS_SCROLLING_TIMEOUT=void 0;var rt=tt(require$$3$1),ot=tt(require$$4),st=tt(require$$5),ut=tt(require$$6),ct=tt(require$$7),ft=tt(require$$8),pt=tt(require$$2$2),ht=nt(react.exports),mt=nt(reactDom.exports),yt=requireOnScroll(),vt=requireDimensions(),Tt=tt(requireDetectElementResize());tt(propTypes$1.exports);var Et,xt;function At(It,kt){var Mt=Object.keys(It);if(Object.getOwnPropertySymbols){var Ft=Object.getOwnPropertySymbols(It);kt&&(Ft=Ft.filter(function(zt){return Object.getOwnPropertyDescriptor(It,zt).enumerable})),Mt.push.apply(Mt,Ft)}return Mt}function Ct(It){for(var kt=1;kt<arguments.length;kt++){var Mt=arguments[kt]!=null?arguments[kt]:{};kt%2?At(Mt,!0).forEach(function(Ft){(0,pt.default)(It,Ft,Mt[Ft])}):Object.getOwnPropertyDescriptors?Object.defineProperties(It,Object.getOwnPropertyDescriptors(Mt)):At(Mt).forEach(function(Ft){Object.defineProperty(It,Ft,Object.getOwnPropertyDescriptor(Mt,Ft))})}return It}var $t=150;et.IS_SCROLLING_TIMEOUT=$t;var Ot=function(){return typeof window<"u"?window:void 0},Rt=(xt=Et=function(It){(0,ft.default)(kt,It);function kt(){var Mt,Ft;(0,rt.default)(this,kt);for(var zt=arguments.length,Vt=new Array(zt),Zt=0;Zt<zt;Zt++)Vt[Zt]=arguments[Zt];return Ft=(0,st.default)(this,(Mt=(0,ut.default)(kt)).call.apply(Mt,[this].concat(Vt))),(0,pt.default)((0,ct.default)(Ft),"_window",Ot()),(0,pt.default)((0,ct.default)(Ft),"_isMounted",!1),(0,pt.default)((0,ct.default)(Ft),"_positionFromTop",0),(0,pt.default)((0,ct.default)(Ft),"_positionFromLeft",0),(0,pt.default)((0,ct.default)(Ft),"_detectElementResize",void 0),(0,pt.default)((0,ct.default)(Ft),"_child",void 0),(0,pt.default)((0,ct.default)(Ft),"state",Ct({},(0,vt.getDimensions)(Ft.props.scrollElement,Ft.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),(0,pt.default)((0,ct.default)(Ft),"_registerChild",function(Ut){Ut&&!(Ut instanceof Element)&&console.warn("WindowScroller registerChild expects to be passed Element or null"),Ft._child=Ut,Ft.updatePosition()}),(0,pt.default)((0,ct.default)(Ft),"_onChildScroll",function(Ut){var Xt=Ut.scrollTop;if(Ft.state.scrollTop!==Xt){var Jt=Ft.props.scrollElement;Jt&&(typeof Jt.scrollTo=="function"?Jt.scrollTo(0,Xt+Ft._positionFromTop):Jt.scrollTop=Xt+Ft._positionFromTop)}}),(0,pt.default)((0,ct.default)(Ft),"_registerResizeListener",function(Ut){Ut===window?window.addEventListener("resize",Ft._onResize,!1):Ft._detectElementResize.addResizeListener(Ut,Ft._onResize)}),(0,pt.default)((0,ct.default)(Ft),"_unregisterResizeListener",function(Ut){Ut===window?window.removeEventListener("resize",Ft._onResize,!1):Ut&&Ft._detectElementResize.removeResizeListener(Ut,Ft._onResize)}),(0,pt.default)((0,ct.default)(Ft),"_onResize",function(){Ft.updatePosition()}),(0,pt.default)((0,ct.default)(Ft),"__handleWindowScrollEvent",function(){if(!!Ft._isMounted){var Ut=Ft.props.onScroll,Xt=Ft.props.scrollElement;if(Xt){var Jt=(0,vt.getScrollOffset)(Xt),gn=Math.max(0,Jt.left-Ft._positionFromLeft),An=Math.max(0,Jt.top-Ft._positionFromTop);Ft.setState({isScrolling:!0,scrollLeft:gn,scrollTop:An}),Ut({scrollLeft:gn,scrollTop:An})}}}),(0,pt.default)((0,ct.default)(Ft),"__resetIsScrolling",function(){Ft.setState({isScrolling:!1})}),Ft}return(0,ot.default)(kt,[{key:"updatePosition",value:function(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,zt=this.props.onResize,Vt=this.state,Zt=Vt.height,Ut=Vt.width,Xt=this._child||mt.findDOMNode(this);if(Xt instanceof Element&&Ft){var Jt=(0,vt.getPositionOffset)(Xt,Ft);this._positionFromTop=Jt.top,this._positionFromLeft=Jt.left}var gn=(0,vt.getDimensions)(Ft,this.props);(Zt!==gn.height||Ut!==gn.width)&&(this.setState({height:gn.height,width:gn.width}),zt({height:gn.height,width:gn.width}))}},{key:"componentDidMount",value:function(){var Ft=this.props.scrollElement;this._detectElementResize=(0,Tt.default)(),this.updatePosition(Ft),Ft&&((0,yt.registerScrollListener)(this,Ft),this._registerResizeListener(Ft)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(Ft,zt){var Vt=this.props.scrollElement,Zt=Ft.scrollElement;Zt!==Vt&&Zt!=null&&Vt!=null&&(this.updatePosition(Vt),(0,yt.unregisterScrollListener)(this,Zt),(0,yt.registerScrollListener)(this,Vt),this._unregisterResizeListener(Zt),this._registerResizeListener(Vt))}},{key:"componentWillUnmount",value:function(){var Ft=this.props.scrollElement;Ft&&((0,yt.unregisterScrollListener)(this,Ft),this._unregisterResizeListener(Ft)),this._isMounted=!1}},{key:"render",value:function(){var Ft=this.props.children,zt=this.state,Vt=zt.isScrolling,Zt=zt.scrollTop,Ut=zt.scrollLeft,Xt=zt.height,Jt=zt.width;return Ft({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:Xt,isScrolling:Vt,scrollLeft:Ut,scrollTop:Zt,width:Jt})}}]),kt}(ht.PureComponent),(0,pt.default)(Et,"propTypes",null),xt);et.default=Rt,(0,pt.default)(Rt,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:$t,scrollElement:Ot(),serverHeight:0,serverWidth:0})}(WindowScroller)),WindowScroller}(function(et){var tt=interopRequireWildcard.exports;Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"WindowScroller",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(et,"IS_SCROLLING_TIMEOUT",{enumerable:!0,get:function(){return nt.IS_SCROLLING_TIMEOUT}}),et.default=void 0;var nt=tt(requireWindowScroller()),rt=nt.default;et.default=rt})(WindowScroller$1);(function(et){Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"ArrowKeyStepper",{enumerable:!0,get:function(){return tt.ArrowKeyStepper}}),Object.defineProperty(et,"AutoSizer",{enumerable:!0,get:function(){return nt.AutoSizer}}),Object.defineProperty(et,"CellMeasurer",{enumerable:!0,get:function(){return rt.CellMeasurer}}),Object.defineProperty(et,"CellMeasurerCache",{enumerable:!0,get:function(){return rt.CellMeasurerCache}}),Object.defineProperty(et,"Collection",{enumerable:!0,get:function(){return ot.Collection}}),Object.defineProperty(et,"ColumnSizer",{enumerable:!0,get:function(){return st.ColumnSizer}}),Object.defineProperty(et,"accessibilityOverscanIndicesGetter",{enumerable:!0,get:function(){return ut.accessibilityOverscanIndicesGetter}}),Object.defineProperty(et,"defaultCellRangeRenderer",{enumerable:!0,get:function(){return ut.defaultCellRangeRenderer}}),Object.defineProperty(et,"defaultOverscanIndicesGetter",{enumerable:!0,get:function(){return ut.defaultOverscanIndicesGetter}}),Object.defineProperty(et,"Grid",{enumerable:!0,get:function(){return ut.Grid}}),Object.defineProperty(et,"InfiniteLoader",{enumerable:!0,get:function(){return ct.InfiniteLoader}}),Object.defineProperty(et,"List",{enumerable:!0,get:function(){return ft.List}}),Object.defineProperty(et,"createMasonryCellPositioner",{enumerable:!0,get:function(){return pt.createCellPositioner}}),Object.defineProperty(et,"Masonry",{enumerable:!0,get:function(){return pt.Masonry}}),Object.defineProperty(et,"MultiGrid",{enumerable:!0,get:function(){return ht.MultiGrid}}),Object.defineProperty(et,"ScrollSync",{enumerable:!0,get:function(){return mt.ScrollSync}}),Object.defineProperty(et,"createTableMultiSort",{enumerable:!0,get:function(){return yt.createMultiSort}}),Object.defineProperty(et,"defaultTableCellDataGetter",{enumerable:!0,get:function(){return yt.defaultCellDataGetter}}),Object.defineProperty(et,"defaultTableCellRenderer",{enumerable:!0,get:function(){return yt.defaultCellRenderer}}),Object.defineProperty(et,"defaultTableHeaderRenderer",{enumerable:!0,get:function(){return yt.defaultHeaderRenderer}}),Object.defineProperty(et,"defaultTableHeaderRowRenderer",{enumerable:!0,get:function(){return yt.defaultHeaderRowRenderer}}),Object.defineProperty(et,"defaultTableRowRenderer",{enumerable:!0,get:function(){return yt.defaultRowRenderer}}),Object.defineProperty(et,"Table",{enumerable:!0,get:function(){return yt.Table}}),Object.defineProperty(et,"Column",{enumerable:!0,get:function(){return yt.Column}}),Object.defineProperty(et,"SortDirection",{enumerable:!0,get:function(){return yt.SortDirection}}),Object.defineProperty(et,"SortIndicator",{enumerable:!0,get:function(){return yt.SortIndicator}}),Object.defineProperty(et,"WindowScroller",{enumerable:!0,get:function(){return vt.WindowScroller}});var tt=ArrowKeyStepper$1,nt=AutoSizer$2,rt=CellMeasurer$1,ot=Collection$1,st=ColumnSizer$1,ut=Grid$1,ct=InfiniteLoader$1,ft=List$1,pt=Masonry$1,ht=MultiGrid$1,mt=ScrollSync$1,yt=Table$2,vt=WindowScroller$1})(commonjs);function onNextExitFullscreen(et){const tt=(...nt)=>{!document.fullscreen&&!document.mozFullScreenElement&&!document.msFullscreenElement&&(et(...nt),document.removeEventListener("webkitfullscreenchange",tt),document.removeEventListener("mozfullscreenchange",tt),document.removeEventListener("fullscreenchange",tt),document.removeEventListener("MSFullscreenChange",tt))};document.addEventListener("webkitfullscreenchange",tt,!1),document.addEventListener("mozfullscreenchange",tt,!1),document.addEventListener("fullscreenchange",tt,!1),document.addEventListener("MSFullscreenChange",tt,!1)}const FlexContainer=styled$1.div`
  display: flex;
  justify-content: start;
  width: 100%;
  height: 100%;
`,inputType$S={type:"molecule-file"},PanelMolecule=et=>{const tt=et.input,nt=useAssetURLFromArtifact(tt),rt=!nt.loading&&nt.asset.path.endsWith(".pdb");return Wt.createElement("div",{style:{height:"100%",width:"100%",overflow:"hidden"}},nt.loading?Wt.createElement(WandbLoader,{name:"panel-molecule"}):rt?Wt.createElement(commonjs.AutoSizer,null,({width:ot,height:st})=>Wt.createElement("div",{style:{height:`${st}px`,width:`${ot}px`,overflow:"hidden"}},Wt.createElement(Molecule,{...et,width:ot,height:st,directUrl:nt.directUrl,representationType:et.config?.representationType??"default",extension:"pdb"}))):Wt.createElement("p",null,"Tried to render"," ",nt.asset.path?Wt.createElement("code",null,nt.asset.path):"this object",", but only .pdb files are currently supported."))},Molecule=et=>{const{width:tt,height:nt,directUrl:rt,representationType:ot,extension:st}=et,[ut,ct]=react.exports.useState();react.exports.useEffect(()=>{__vitePreload(()=>import("./nglviewerRender.a88c1781.js"),[]).then(ct)},[]);const ft=react.exports.useRef(null),[pt,ht]=react.exports.useState(),[mt,yt]=react.exports.useState(),[vt,Tt]=react.exports.useState(!1),[Et,xt]=react.exports.useState(null),[At,Ct]=react.exports.useState(!1),$t=react.exports.useCallback(()=>{if(Et!=null)try{Et.dispose()}catch{}ft.current!=null&&(ft.current.innerHTML=""),xt(null),Tt(!1)},[Et,xt,Tt,ft]);react.exports.useEffect($t,[ot]),react.exports.useEffect(()=>{if(ut!=null){const kt=rt;yt(void 0),fetch(kt).then(Mt=>Mt.blob()).then(Mt=>{if(kt===rt){const Ft=new File([Mt],"molecule."+st);ht(Ft),ut.moleculeScreenshot(Ft,{width:tt,height:nt},{representation:ot},st).then(zt=>{if(kt===rt){const Vt=window.URL.createObjectURL(zt);yt(Vt)}})}})}},[rt,ut,tt,nt,ot,st]);const Ot=react.exports.useCallback(()=>{if(Ct(!0),!vt&&ut!=null&&ft.current!=null&&pt!=null&&mt!=null){const kt=ut.moleculeStage(ft.current,pt,{width:tt,height:nt},{representation:ot},st);Tt(!0),xt(kt),ft.current.getElementsByTagName("canvas")[0].addEventListener("webglcontextlost",$t)}},[pt,ft,ut,tt,nt,ot,st,xt,vt,Tt,$t,Ct,mt]),Rt=react.exports.useCallback(()=>{Ct(!1)},[Ct]),It=react.exports.useCallback(()=>{if(ut!=null&&ft.current!=null&&pt!=null){$t();const kt=window.screen.width,Mt=window.screen.height,Ft=ut.moleculeStage(ft.current,pt,{width:kt,height:Mt},{representation:ot},st);onNextExitFullscreen(()=>{Ft?.dispose(),$t()});try{ft.current?.requestFullscreen?.()}catch(zt){throw new Error("Fullscreen request invalid: "+zt)}}},[pt,ft,ut,ot,st,$t]);return Wt.createElement(FlexContainer,null,Wt.createElement("div",{className:"media-card",style:{height:`${nt}px`,width:`${tt}px`,backgroundImage:`url(${mt})`,backgroundRepeat:"no-repeat",backgroundSize:"100% 100%"},onMouseEnter:Ot,onMouseLeave:Rt},At&&vt&&Wt.createElement("div",{style:{position:"absolute",top:"0px",right:"0px",padding:"10px",color:"#EEE",zIndex:1},onClick:It},Wt.createElement(Icon$4,{size:"large",link:!0,name:"expand arrows alternate"})),Wt.createElement("div",{className:"object3D-card-babylon",ref:ft}),!vt&&mt==null&&Wt.createElement(Placeholder$1,{style:{height:`${nt}px`,width:`${tt}px`}},Wt.createElement(PlaceholderImage,{square:!0}))))},PanelMoleculeConfig=et=>{const{config:tt,updateConfig:nt}=et,rt=react.exports.useCallback(ot=>{nt({...tt,representationType:ot})},[nt,tt]);return Wt.createElement(ConfigOption,{label:"Field Type"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,options:RepresentationTypeValues.map(ot=>({text:""+ot,value:""+ot})),value:tt?.representationType??"default",onChange:(ot,{value:st})=>rt(st)}))},Spec$T={id:"molecule-file",Component:PanelMolecule,ConfigComponent:PanelMoleculeConfig,inputType:inputType$S,displayName:"3D Object",defaultFixedSize:{width:242,height:242}},inputType$R={type:"list",objectType:{type:"union",members:["none",{type:"dict",objectType:{type:"union",members:["none","number"]}},{type:"list",maxLength:10,objectType:{type:"union",members:["none","number"]}}]}},HISTO_SPEC={$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple histogram",data:{name:"wandb"},title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{x:{bin:!0,type:"quantitative",field:"value",axis:{title:null}},color:{field:"name",title:null},y:{aggregate:"count",stack:null,axis:{title:null}},opacity:{value:.7},order:{field:"name"}},background:"rgba(0,0,0,0)"},HISTO_SPEC_COLORED={$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple histogram",data:{name:"wandb"},title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{x:{bin:!0,type:"quantitative",field:"value",axis:{title:null}},color:{type:"nominal",field:"color",legend:!1,scale:{range:{field:"color"}}},y:{aggregate:"count",stack:!0,axis:{title:null}},opacity:{value:1},order:{field:"name"}},background:"rgba(0,0,0,0)"},PanelMultiHistogram=et=>{const tt=useColorNode(et.input),nt=useNodeValue(tt),rt=tt.nodeType!=="void",ot=useNodeValue(et.input),st=react.exports.useMemo(()=>{const ut=ot?.result??[];if(ot.loading||nt.loading)return[];const ct=[];for(let ft=0;ft<ut.length;ft++){const pt=ut[ft];if(pt!=null)if(_$2.isArray(pt))pt.forEach((ht,mt)=>{ht!=null&&(rt?ct.push({name:nt.result[ft][mt]??"#94aecb",value:ht??0,color:nt.result[ft][mt]??"#94aecb"}):ct.push({name:""+mt,value:ht??0}))});else for(const[ht,mt]of Object.entries(pt))ct.push({name:ht,value:mt})}return ct},[ot,rt,nt]);return st.length===0?Wt.createElement(Wt.Fragment,null,"-"):Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(CustomPanelRenderer,{spec:rt?HISTO_SPEC_COLORED:HISTO_SPEC,loading:!1,slow:!1,data:st,userSettings:{fieldSettings:{},stringSettings:{title:""}}}))},Spec$S={id:"multi-histogram",displayName:"MultiHistogram",Component:PanelMultiHistogram,inputType:inputType$R,canFullscreen:!0},inputType$Q={type:"list",objectType:{type:"union",members:["none",{type:"dict",objectType:{type:"union",members:["none","string"]}},{type:"list",maxLength:10,objectType:{type:"union",members:["none","string"]}}]}},makeHistoSpec$1=(et,tt=100)=>({$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple histogram",data:{name:"wandb"},transform:[{aggregate:[{op:"count",as:"value_count"}],groupby:["name","value"]},{window:[{op:"row_number",as:"value_rank"}],sort:[{field:"value_count",order:"descending"}]},{filter:`datum.value_rank < ${tt}`}],title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{y:{type:"nominal",field:"value",axis:{title:null,labelLimit:et},sort:{field:"value_count",order:"descending"}},color:{field:"name",title:null},x:{field:"value_count",stack:null,type:"quantitative"},opacity:{value:.7},order:{field:"name"}},background:"rgba(0,0,0,0)"}),makeHistoSpecColored$1=(et,tt=100)=>({$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple histogram",data:{name:"wandb"},transform:[{aggregate:[{op:"count",as:"value_count"}],groupby:["name","value","color"]},{window:[{op:"row_number",as:"value_rank"}],sort:[{field:"value_count",order:"descending"}]},{filter:`datum.value_rank < ${tt}`}],title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{y:{type:"nominal",field:"value",axis:{title:null,labelLimit:et},sort:{field:"value_count",order:"descending"}},color:{type:"nominal",field:"color",legend:!1,scale:{range:{field:"color"}}},x:{field:"value_count",stack:!0,type:"quantitative"},opacity:{value:1},order:{field:"name"}},background:"rgba(0,0,0,0)"}),PanelMultiStringHistogram=et=>{const{ref:tt,inView:nt}=useInView(),rt=useGatedValue(nt,ot=>ot);return Wt.createElement("div",{ref:tt,style:{width:"100%",height:"100%"}},rt?Wt.createElement(commonjs.AutoSizer,{style:{width:"100%",height:"100%"}},({width:ot,height:st})=>Wt.createElement(PanelMultiStringHistogramInner,{...et,width:ot,height:st})):Wt.createElement("div",{style:{backgroundColor:"#eee",width:"100%",height:"100%"}}))},PanelMultiStringHistogramInner=et=>{const tt=Math.max(20,(et.width-50)/3),nt=Math.floor(Math.max(3,(et.height-35)/7)),rt=useColorNode(et.input),ot=useNodeValue(rt),st=rt.nodeType!=="void",ut=useNodeValue(et.input),ct=react.exports.useMemo(()=>{const pt=ut.result;if(ut.loading||st&&ot.loading)return[];const ht=[];for(let mt=0;mt<pt.length;mt++){const yt=pt[mt];if(yt!=null)if(_$2.isArray(yt))yt.forEach((vt,Tt)=>{vt!=null&&(st?ht.push({name:ot.result[mt][Tt]??"#94aecb",value:vt,color:ot.result[mt][Tt]??"#94aecb"}):ht.push({name:""+Tt,value:vt}))});else for(const[vt,Tt]of Object.entries(yt))ht.push({name:vt,value:Tt})}return ht},[ut.loading,ut.result,st,ot]),ft=react.exports.useMemo(()=>st?makeHistoSpecColored$1(tt,nt):makeHistoSpec$1(tt,nt),[tt,nt,st]);return Wt.createElement(CustomPanelRenderer,{spec:ft,loading:ut.loading,slow:!1,data:ct,userSettings:{fieldSettings:{},stringSettings:{title:""}}})},Spec$R={id:"multi-string-histogram",Component:PanelMultiStringHistogram,inputType:inputType$Q,canFullscreen:!0},inputType$P={type:"ndarray",serializationPath:{key:"",path:""},shape:[0]},PanelNDArray=et=>{if(useNodeValue(et.input).loading)return Wt.createElement("div",null,"-");const nt=nullableTaggableValue(et.input.type);return Wt.createElement("div",null,Wt.createElement("span",null,"ndarray("+nt.shape+") @"),Wt.createElement("br",null),Wt.createElement("span",null,nt.serializationPath.path+"["+nt.serializationPath.key+"]"))},Spec$Q={id:"ndarray",Component:PanelNDArray,inputType:inputType$P},EXTENSIONS=[];function register(et,tt){for(const nt of tt)EXTENSIONS.push(nt)}register("./onnx",[".onnx",".pb",".pbtxt",".prototxt"]);register("./mxnet",[".mar",".model",".params"]);register("./keras",[".h5",".hd5",".hdf5",".keras",".model"]);register("./coreml",[".mlmodel"]);register("./caffe",[".caffemodel",".pbtxt",".prototxt",".pt"]);register("./caffe2",[".pb",".pbtxt",".prototxt"]);register("./pytorch",[".pt",".pth",".pt1",".pkl",".h5",".t7",".model",".dms",".pth.tar",".ckpt",".bin"]);register("./torch",[".t7"]);register("./tflite",[".tflite",".lite",".tfl",".bin"]);register("./tf",[".pb",".meta",".pbtxt",".prototxt",".index",".ckpt"]);register("./sklearn",[".pkl",".joblib",".model"]);register("./cntk",[".model",".cntk",".cmf",".dnn"]);register("./paddle",[".paddle","__model__"]);register("./armnn",[".armnn"]);register("./bigdl",[".model",".bigdl"]);register("./darknet",[".cfg"]);register("./mnn",[".mnn"]);register("./ncnn",[".param",".bin",".cfg.ncnn",".weights.ncnn"]);register("./flux",[".bson"]);register("./chainer",[".npz",".h5",".hd5",".hdf5"]);const inputType$O={type:"union",members:EXTENSIONS.map(et=>({type:"file",extension:et.slice(1)}))},useDirectUrlToBlobUrl=et=>{const[tt,nt]=Wt.useState(null),[rt,ot]=Wt.useState(null);return Wt.useEffect(()=>{(async()=>{if(et!=null){const ct=await(await fetch(et)).blob(),ft=await ct.text();rt?.text!==ft&&ot({text:ft,blob:ct})}})()},[rt,et]),Wt.useEffect(()=>{rt?.blob!=null&&nt(URL.createObjectURL(rt?.blob))},[rt]),tt},PanelNetron=et=>{const tt=et.input,nt=nullableTaggableValue(tt.type),{signedUrl:rt,loading:ot}=useSignedUrlWithExpiration(tt,60*1e3),st=useDirectUrlToBlobUrl(rt??void 0);if(ot)return Wt.createElement(WandbLoader,{name:"panel-netron"});if(st==null)return Wt.createElement(Wt.Fragment,null);const ut="model."+(isFile$1(nt)&&nt.extension?nt.extension:"pt"),ct=window.thirdPartyAnalyticsOK?"&telemetry=1":"",{urlPrefixed:ft}=getConfig(),pt=ft(`/netron/index.html?url=${encodeURIComponent(st)}&identifier=${encodeURIComponent(ut)}${ct}`);return Wt.createElement("iframe",{style:{width:"100%",height:"100%",border:"none"},title:"Netron preview",src:pt})},Spec$P={id:"netron",Component:PanelNetron,inputType:inputType$O},inputType$N="none",PanelNone=et=>Wt.createElement("div",null,"-"),Spec$O={id:"none",Component:PanelNone,inputType:inputType$N};var prism={exports:{}};(function(et){var tt=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
 * Prism: Lightweight, robust, elegant syntax highlighting
 *
 * @license MIT <https://opensource.org/licenses/MIT>
 * @author Lea Verou <https://lea.verou.me>
 * @namespace
 * @public
 */var nt=function(rt){var ot=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,st=0,ut={},ct={manual:rt.Prism&&rt.Prism.manual,disableWorkerMessageHandler:rt.Prism&&rt.Prism.disableWorkerMessageHandler,util:{encode:function Ct($t){return $t instanceof ft?new ft($t.type,Ct($t.content),$t.alias):Array.isArray($t)?$t.map(Ct):$t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(Ct){return Object.prototype.toString.call(Ct).slice(8,-1)},objId:function(Ct){return Ct.__id||Object.defineProperty(Ct,"__id",{value:++st}),Ct.__id},clone:function Ct($t,Ot){Ot=Ot||{};var Rt,It;switch(ct.util.type($t)){case"Object":if(It=ct.util.objId($t),Ot[It])return Ot[It];Rt={},Ot[It]=Rt;for(var kt in $t)$t.hasOwnProperty(kt)&&(Rt[kt]=Ct($t[kt],Ot));return Rt;case"Array":return It=ct.util.objId($t),Ot[It]?Ot[It]:(Rt=[],Ot[It]=Rt,$t.forEach(function(Mt,Ft){Rt[Ft]=Ct(Mt,Ot)}),Rt);default:return $t}},getLanguage:function(Ct){for(;Ct;){var $t=ot.exec(Ct.className);if($t)return $t[1].toLowerCase();Ct=Ct.parentElement}return"none"},setLanguage:function(Ct,$t){Ct.className=Ct.className.replace(RegExp(ot,"gi"),""),Ct.classList.add("language-"+$t)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(Rt){var Ct=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(Rt.stack)||[])[1];if(Ct){var $t=document.getElementsByTagName("script");for(var Ot in $t)if($t[Ot].src==Ct)return $t[Ot]}return null}},isActive:function(Ct,$t,Ot){for(var Rt="no-"+$t;Ct;){var It=Ct.classList;if(It.contains($t))return!0;if(It.contains(Rt))return!1;Ct=Ct.parentElement}return!!Ot}},languages:{plain:ut,plaintext:ut,text:ut,txt:ut,extend:function(Ct,$t){var Ot=ct.util.clone(ct.languages[Ct]);for(var Rt in $t)Ot[Rt]=$t[Rt];return Ot},insertBefore:function(Ct,$t,Ot,Rt){Rt=Rt||ct.languages;var It=Rt[Ct],kt={};for(var Mt in It)if(It.hasOwnProperty(Mt)){if(Mt==$t)for(var Ft in Ot)Ot.hasOwnProperty(Ft)&&(kt[Ft]=Ot[Ft]);Ot.hasOwnProperty(Mt)||(kt[Mt]=It[Mt])}var zt=Rt[Ct];return Rt[Ct]=kt,ct.languages.DFS(ct.languages,function(Vt,Zt){Zt===zt&&Vt!=Ct&&(this[Vt]=kt)}),kt},DFS:function Ct($t,Ot,Rt,It){It=It||{};var kt=ct.util.objId;for(var Mt in $t)if($t.hasOwnProperty(Mt)){Ot.call($t,Mt,$t[Mt],Rt||Mt);var Ft=$t[Mt],zt=ct.util.type(Ft);zt==="Object"&&!It[kt(Ft)]?(It[kt(Ft)]=!0,Ct(Ft,Ot,null,It)):zt==="Array"&&!It[kt(Ft)]&&(It[kt(Ft)]=!0,Ct(Ft,Ot,Mt,It))}}},plugins:{},highlightAll:function(Ct,$t){ct.highlightAllUnder(document,Ct,$t)},highlightAllUnder:function(Ct,$t,Ot){var Rt={callback:Ot,container:Ct,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};ct.hooks.run("before-highlightall",Rt),Rt.elements=Array.prototype.slice.apply(Rt.container.querySelectorAll(Rt.selector)),ct.hooks.run("before-all-elements-highlight",Rt);for(var It=0,kt;kt=Rt.elements[It++];)ct.highlightElement(kt,$t===!0,Rt.callback)},highlightElement:function(Ct,$t,Ot){var Rt=ct.util.getLanguage(Ct),It=ct.languages[Rt];ct.util.setLanguage(Ct,Rt);var kt=Ct.parentElement;kt&&kt.nodeName.toLowerCase()==="pre"&&ct.util.setLanguage(kt,Rt);var Mt=Ct.textContent,Ft={element:Ct,language:Rt,grammar:It,code:Mt};function zt(Zt){Ft.highlightedCode=Zt,ct.hooks.run("before-insert",Ft),Ft.element.innerHTML=Ft.highlightedCode,ct.hooks.run("after-highlight",Ft),ct.hooks.run("complete",Ft),Ot&&Ot.call(Ft.element)}if(ct.hooks.run("before-sanity-check",Ft),kt=Ft.element.parentElement,kt&&kt.nodeName.toLowerCase()==="pre"&&!kt.hasAttribute("tabindex")&&kt.setAttribute("tabindex","0"),!Ft.code){ct.hooks.run("complete",Ft),Ot&&Ot.call(Ft.element);return}if(ct.hooks.run("before-highlight",Ft),!Ft.grammar){zt(ct.util.encode(Ft.code));return}if($t&&rt.Worker){var Vt=new Worker(ct.filename);Vt.onmessage=function(Zt){zt(Zt.data)},Vt.postMessage(JSON.stringify({language:Ft.language,code:Ft.code,immediateClose:!0}))}else zt(ct.highlight(Ft.code,Ft.grammar,Ft.language))},highlight:function(Ct,$t,Ot){var Rt={code:Ct,grammar:$t,language:Ot};if(ct.hooks.run("before-tokenize",Rt),!Rt.grammar)throw new Error('The language "'+Rt.language+'" has no grammar.');return Rt.tokens=ct.tokenize(Rt.code,Rt.grammar),ct.hooks.run("after-tokenize",Rt),ft.stringify(ct.util.encode(Rt.tokens),Rt.language)},tokenize:function(Ct,$t){var Ot=$t.rest;if(Ot){for(var Rt in Ot)$t[Rt]=Ot[Rt];delete $t.rest}var It=new mt;return yt(It,It.head,Ct),ht(Ct,It,$t,It.head,0),Tt(It)},hooks:{all:{},add:function(Ct,$t){var Ot=ct.hooks.all;Ot[Ct]=Ot[Ct]||[],Ot[Ct].push($t)},run:function(Ct,$t){var Ot=ct.hooks.all[Ct];if(!(!Ot||!Ot.length))for(var Rt=0,It;It=Ot[Rt++];)It($t)}},Token:ft};rt.Prism=ct;function ft(Ct,$t,Ot,Rt){this.type=Ct,this.content=$t,this.alias=Ot,this.length=(Rt||"").length|0}ft.stringify=function Ct($t,Ot){if(typeof $t=="string")return $t;if(Array.isArray($t)){var Rt="";return $t.forEach(function(zt){Rt+=Ct(zt,Ot)}),Rt}var It={type:$t.type,content:Ct($t.content,Ot),tag:"span",classes:["token",$t.type],attributes:{},language:Ot},kt=$t.alias;kt&&(Array.isArray(kt)?Array.prototype.push.apply(It.classes,kt):It.classes.push(kt)),ct.hooks.run("wrap",It);var Mt="";for(var Ft in It.attributes)Mt+=" "+Ft+'="'+(It.attributes[Ft]||"").replace(/"/g,"&quot;")+'"';return"<"+It.tag+' class="'+It.classes.join(" ")+'"'+Mt+">"+It.content+"</"+It.tag+">"};function pt(Ct,$t,Ot,Rt){Ct.lastIndex=$t;var It=Ct.exec(Ot);if(It&&Rt&&It[1]){var kt=It[1].length;It.index+=kt,It[0]=It[0].slice(kt)}return It}function ht(Ct,$t,Ot,Rt,It,kt){for(var Mt in Ot)if(!(!Ot.hasOwnProperty(Mt)||!Ot[Mt])){var Ft=Ot[Mt];Ft=Array.isArray(Ft)?Ft:[Ft];for(var zt=0;zt<Ft.length;++zt){if(kt&&kt.cause==Mt+","+zt)return;var Vt=Ft[zt],Zt=Vt.inside,Ut=!!Vt.lookbehind,Xt=!!Vt.greedy,Jt=Vt.alias;if(Xt&&!Vt.pattern.global){var gn=Vt.pattern.toString().match(/[imsuy]*$/)[0];Vt.pattern=RegExp(Vt.pattern.source,gn+"g")}for(var An=Vt.pattern||Vt,sn=Rt.next,Sn=It;sn!==$t.tail&&!(kt&&Sn>=kt.reach);Sn+=sn.value.length,sn=sn.next){var In=sn.value;if($t.length>Ct.length)return;if(!(In instanceof ft)){var _n=1,En;if(Xt){if(En=pt(An,Sn,Ct,Ut),!En||En.index>=Ct.length)break;var $n=En.index,Ln=En.index+En[0].length,wn=Sn;for(wn+=sn.value.length;$n>=wn;)sn=sn.next,wn+=sn.value.length;if(wn-=sn.value.length,Sn=wn,sn.value instanceof ft)continue;for(var Dn=sn;Dn!==$t.tail&&(wn<Ln||typeof Dn.value=="string");Dn=Dn.next)_n++,wn+=Dn.value.length;_n--,In=Ct.slice(Sn,wn),En.index-=Sn}else if(En=pt(An,0,In,Ut),!En)continue;var $n=En.index,Gn=En[0],Jn=In.slice(0,$n),zn=In.slice($n+Gn.length),Qn=Sn+In.length;kt&&Qn>kt.reach&&(kt.reach=Qn);var Bn=sn.prev;Jn&&(Bn=yt($t,Bn,Jn),Sn+=Jn.length),vt($t,Bn,_n);var jn=new ft(Mt,Zt?ct.tokenize(Gn,Zt):Gn,Jt,Gn);if(sn=yt($t,Bn,jn),zn&&yt($t,sn,zn),_n>1){var Ar={cause:Mt+","+zt,reach:Qn};ht(Ct,$t,Ot,sn.prev,Sn,Ar),kt&&Ar.reach>kt.reach&&(kt.reach=Ar.reach)}}}}}}function mt(){var Ct={value:null,prev:null,next:null},$t={value:null,prev:Ct,next:null};Ct.next=$t,this.head=Ct,this.tail=$t,this.length=0}function yt(Ct,$t,Ot){var Rt=$t.next,It={value:Ot,prev:$t,next:Rt};return $t.next=It,Rt.prev=It,Ct.length++,It}function vt(Ct,$t,Ot){for(var Rt=$t.next,It=0;It<Ot&&Rt!==Ct.tail;It++)Rt=Rt.next;$t.next=Rt,Rt.prev=$t,Ct.length-=It}function Tt(Ct){for(var $t=[],Ot=Ct.head.next;Ot!==Ct.tail;)$t.push(Ot.value),Ot=Ot.next;return $t}if(!rt.document)return rt.addEventListener&&(ct.disableWorkerMessageHandler||rt.addEventListener("message",function(Ct){var $t=JSON.parse(Ct.data),Ot=$t.language,Rt=$t.code,It=$t.immediateClose;rt.postMessage(ct.highlight(Rt,ct.languages[Ot],Ot)),It&&rt.close()},!1)),ct;var Et=ct.util.currentScript();Et&&(ct.filename=Et.src,Et.hasAttribute("data-manual")&&(ct.manual=!0));function xt(){ct.manual||ct.highlightAll()}if(!ct.manual){var At=document.readyState;At==="loading"||At==="interactive"&&Et&&Et.defer?document.addEventListener("DOMContentLoaded",xt):window.requestAnimationFrame?window.requestAnimationFrame(xt):window.setTimeout(xt,16)}return ct}(tt);et.exports&&(et.exports=nt),typeof commonjsGlobal$1<"u"&&(commonjsGlobal$1.Prism=nt),nt.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},nt.languages.markup.tag.inside["attr-value"].inside.entity=nt.languages.markup.entity,nt.languages.markup.doctype.inside["internal-subset"].inside=nt.languages.markup,nt.hooks.add("wrap",function(rt){rt.type==="entity"&&(rt.attributes.title=rt.content.replace(/&amp;/,"&"))}),Object.defineProperty(nt.languages.markup.tag,"addInlined",{value:function(ot,st){var ut={};ut["language-"+st]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:nt.languages[st]},ut.cdata=/^<!\[CDATA\[|\]\]>$/i;var ct={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:ut}};ct["language-"+st]={pattern:/[\s\S]+/,inside:nt.languages[st]};var ft={};ft[ot]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return ot}),"i"),lookbehind:!0,greedy:!0,inside:ct},nt.languages.insertBefore("markup","cdata",ft)}}),Object.defineProperty(nt.languages.markup.tag,"addAttribute",{value:function(rt,ot){nt.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+rt+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[ot,"language-"+ot],inside:nt.languages[ot]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),nt.languages.html=nt.languages.markup,nt.languages.mathml=nt.languages.markup,nt.languages.svg=nt.languages.markup,nt.languages.xml=nt.languages.extend("markup",{}),nt.languages.ssml=nt.languages.xml,nt.languages.atom=nt.languages.xml,nt.languages.rss=nt.languages.xml,function(rt){var ot=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;rt.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+ot.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+ot.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+ot.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+ot.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:ot,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},rt.languages.css.atrule.inside.rest=rt.languages.css;var st=rt.languages.markup;st&&(st.tag.addInlined("style","css"),st.tag.addAttribute("style","css"))}(nt),nt.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},nt.languages.javascript=nt.languages.extend("clike",{"class-name":[nt.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),nt.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,nt.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:nt.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:nt.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:nt.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:nt.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:nt.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),nt.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:nt.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),nt.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),nt.languages.markup&&(nt.languages.markup.tag.addInlined("script","javascript"),nt.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),nt.languages.js=nt.languages.javascript,function(){if(typeof nt>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var rt="Loading\u2026",ot=function(Et,xt){return"\u2716 Error "+Et+" while fetching file: "+xt},st="\u2716 Error: File does not exist or is empty",ut={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},ct="data-src-status",ft="loading",pt="loaded",ht="failed",mt="pre[data-src]:not(["+ct+'="'+pt+'"]):not(['+ct+'="'+ft+'"])';function yt(Et,xt,At){var Ct=new XMLHttpRequest;Ct.open("GET",Et,!0),Ct.onreadystatechange=function(){Ct.readyState==4&&(Ct.status<400&&Ct.responseText?xt(Ct.responseText):Ct.status>=400?At(ot(Ct.status,Ct.statusText)):At(st))},Ct.send(null)}function vt(Et){var xt=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(Et||"");if(xt){var At=Number(xt[1]),Ct=xt[2],$t=xt[3];return Ct?$t?[At,Number($t)]:[At,void 0]:[At,At]}}nt.hooks.add("before-highlightall",function(Et){Et.selector+=", "+mt}),nt.hooks.add("before-sanity-check",function(Et){var xt=Et.element;if(xt.matches(mt)){Et.code="",xt.setAttribute(ct,ft);var At=xt.appendChild(document.createElement("CODE"));At.textContent=rt;var Ct=xt.getAttribute("data-src"),$t=Et.language;if($t==="none"){var Ot=(/\.(\w+)$/.exec(Ct)||[,"none"])[1];$t=ut[Ot]||Ot}nt.util.setLanguage(At,$t),nt.util.setLanguage(xt,$t);var Rt=nt.plugins.autoloader;Rt&&Rt.loadLanguages($t),yt(Ct,function(It){xt.setAttribute(ct,pt);var kt=vt(xt.getAttribute("data-range"));if(kt){var Mt=It.split(/\r\n?|\n/g),Ft=kt[0],zt=kt[1]==null?Mt.length:kt[1];Ft<0&&(Ft+=Mt.length),Ft=Math.max(0,Math.min(Ft-1,Mt.length)),zt<0&&(zt+=Mt.length),zt=Math.max(0,Math.min(zt,Mt.length)),It=Mt.slice(Ft,zt).join(`
`),xt.hasAttribute("data-start")||xt.setAttribute("data-start",String(Ft+1))}At.textContent=It,nt.highlightElement(At)},function(It){xt.setAttribute(ct,ht),At.textContent=It})}}),nt.plugins.fileHighlight={highlight:function(xt){for(var At=(xt||document).querySelectorAll(mt),Ct=0,$t;$t=At[Ct++];)nt.highlightElement($t)}};var Tt=!1;nt.fileHighlight=function(){Tt||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),Tt=!0),nt.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(prism);const Prism$1=prism.exports;(function(et){var tt=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function nt(ht){return ht=ht.replace(/<inner>/g,function(){return tt}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+ht+")")}var rt=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,ot=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return rt}),st=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;et.languages.markdown=et.languages.extend("markup",{}),et.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:et.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+ot+st+"(?:"+ot+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+ot+st+")(?:"+ot+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(rt),inside:et.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+ot+")"+st+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+ot+"$"),inside:{"table-header":{pattern:RegExp(rt),alias:"important",inside:et.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:nt(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:nt(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:nt(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:nt(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(ht){["url","bold","italic","strike","code-snippet"].forEach(function(mt){ht!==mt&&(et.languages.markdown[ht].inside.content.inside[mt]=et.languages.markdown[mt])})}),et.hooks.add("after-tokenize",function(ht){if(ht.language!=="markdown"&&ht.language!=="md")return;function mt(yt){if(!(!yt||typeof yt=="string"))for(var vt=0,Tt=yt.length;vt<Tt;vt++){var Et=yt[vt];if(Et.type!=="code"){mt(Et.content);continue}var xt=Et.content[1],At=Et.content[3];if(xt&&At&&xt.type==="code-language"&&At.type==="code-block"&&typeof xt.content=="string"){var Ct=xt.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");Ct=(/[a-z][\w-]*/i.exec(Ct)||[""])[0].toLowerCase();var $t="language-"+Ct;At.alias?typeof At.alias=="string"?At.alias=[At.alias,$t]:At.alias.push($t):At.alias=[$t]}}}mt(ht.tokens)}),et.hooks.add("wrap",function(ht){if(ht.type==="code-block"){for(var mt="",yt=0,vt=ht.classes.length;yt<vt;yt++){var Tt=ht.classes[yt],Et=/language-(.+)/.exec(Tt);if(Et){mt=Et[1];break}}var xt=et.languages[mt];if(xt)ht.content=et.highlight(pt(ht.content),xt,mt);else if(mt&&mt!=="none"&&et.plugins.autoloader){var At="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);ht.attributes.id=At,et.plugins.autoloader.loadLanguages(mt,function(){var Ct=document.getElementById(At);Ct&&(Ct.innerHTML=et.highlight(Ct.textContent,et.languages[mt],mt))})}}});var ut=RegExp(et.languages.markup.tag.pattern.source,"gi"),ct={amp:"&",lt:"<",gt:">",quot:'"'},ft=String.fromCodePoint||String.fromCharCode;function pt(ht){var mt=ht.replace(ut,"");return mt=mt.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(yt,vt){if(vt=vt.toLowerCase(),vt[0]==="#"){var Tt;return vt[1]==="x"?Tt=parseInt(vt.slice(2),16):Tt=Number(vt.slice(1)),ft(Tt)}else{var Et=ct[vt];return Et||yt}}),mt}et.languages.md=et.languages.markdown})(Prism);const formatContent=async(et,tt)=>{if(!et||et.length===0)return"";if(tt){const nt=et.split(/#+/);return et=nt[0].length===0?"### "+nt[1]:nt[0],await generateHTML(et)}else return await generateHTML(et)},Markdown=({content:et,condensed:tt,onContentHeightChange:nt})=>{const rt=react.exports.useRef(null),[ot,st]=react.exports.useState('<div class="ui active loader"/>');react.exports.useEffect(()=>{let ft=!1;return formatContent(et,tt).then(pt=>{ft||st(pt)}),()=>{ft=!0}},[et,tt]),react.exports.useLayoutEffect(()=>{if(rt.current){const ft=rt.current.querySelectorAll("code");for(let pt=0;pt<ft.length;pt++)prism.exports.highlightElement(ft[pt])}},[ot]);const ut=react.exports.useRef(null),ct=react.exports.useCallback(()=>{const ft=rt.current?.offsetHeight;ft!=null&&ft!==ut.current&&(ut.current=ft,nt?.(ft))},[nt]);return react.exports.useEffect(()=>{if(rt.current==null||nt==null)return;window.addEventListener("resize",ct);const ft=rt.current.querySelectorAll("img");for(let pt=0;pt<ft.length;pt++)ft[pt].addEventListener("load",ct);return ct(),()=>{window.removeEventListener("resize",ct)}}),react.exports.useLayoutEffect(()=>{ct()},[ot,ct]),Wt.createElement("div",{ref:rt,className:"markdown-content"},Wt.createElement(Item$4.Description,{className:tt?"":"markdown",dangerouslySetInnerHTML:{__html:ot}}))};function isMarkdown(et){return et.startsWith("```")&&et.endsWith("```")&&et.length>=6}function displayValueNoBarChart(et){if(_$2.isString(et)&&et.length&&et[0]==="{"&&et[et.length-1]==="}")try{et=JSON.parse(et)}catch{}if(_$2.isNull(et)||_$2.isUndefined(et))return"-";if(typeof et=="number")if(_$2.isFinite(et)){if(_$2.isInteger(et))return et.toString();if(et<1&&et>-1){let tt=et.toPrecision(4);if(!tt.includes("e"))for(;tt[tt.length-1]==="0";)tt=tt.slice(0,tt.length-1);return tt}else return numeral(et).format("0.[000]")}else return et.toString();else return _$2.isString(et)?et.match(/^(http|https|s3|gs|ftp):/)?Wt.createElement("a",{href:et},et.substr(0,25)+"..."):isMarkdown(et)?Wt.createElement(Markdown,{condensed:!1,content:et.substring(3,et.length-3)}):et:et._type?et._type==="images"?"Image":et._type:JSON.stringify(et)}const inputType$M={type:"union",members:["none","number"]},PanelNumber$1=et=>{const tt=useNodeValue(et.input);return tt.loading?Wt.createElement(Panel2Loader,null):Wt.createElement("div",{"data-test-weave-id":"number",style:{width:"100%",height:"100%",overflowX:"hidden",overflowY:"auto",margin:"auto",textAlign:"center",wordBreak:"normal",display:"flex",flexDirection:"column",alignContent:"space-around",justifyContent:"space-around",alignItems:"center"}},tt.result==null?"-":displayValueNoBarChart(tt.result))},Spec$N={id:"number",Component:PanelNumber$1,inputType:inputType$M},Table=styled$1.table``,Row=styled$1.tr``,Key$1=styled$1.td`
  vertical-align: top;
  padding: 0 !important;
  color: ${gray500};
  width: 100px;
`,Val=styled$1.td`
  padding: 0 !important;
`,InputUpdateLink$1=styled$1.div`
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
`;function Diff(){}Diff.prototype={diff:function et(tt,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=rt.callback;typeof rt=="function"&&(ot=rt,rt={}),this.options=rt;var st=this;function ut(Et){return ot?(setTimeout(function(){ot(void 0,Et)},0),!0):Et}tt=this.castInput(tt),nt=this.castInput(nt),tt=this.removeEmpty(this.tokenize(tt)),nt=this.removeEmpty(this.tokenize(nt));var ct=nt.length,ft=tt.length,pt=1,ht=ct+ft;rt.maxEditLength&&(ht=Math.min(ht,rt.maxEditLength));var mt=[{newPos:-1,components:[]}],yt=this.extractCommon(mt[0],nt,tt,0);if(mt[0].newPos+1>=ct&&yt+1>=ft)return ut([{value:this.join(nt),count:nt.length}]);function vt(){for(var Et=-1*pt;Et<=pt;Et+=2){var xt=void 0,At=mt[Et-1],Ct=mt[Et+1],$t=(Ct?Ct.newPos:0)-Et;At&&(mt[Et-1]=void 0);var Ot=At&&At.newPos+1<ct,Rt=Ct&&0<=$t&&$t<ft;if(!Ot&&!Rt){mt[Et]=void 0;continue}if(!Ot||Rt&&At.newPos<Ct.newPos?(xt=clonePath(Ct),st.pushComponent(xt.components,void 0,!0)):(xt=At,xt.newPos++,st.pushComponent(xt.components,!0,void 0)),$t=st.extractCommon(xt,nt,tt,Et),xt.newPos+1>=ct&&$t+1>=ft)return ut(buildValues(st,xt.components,nt,tt,st.useLongestToken));mt[Et]=xt}pt++}if(ot)(function Et(){setTimeout(function(){if(pt>ht)return ot();vt()||Et()},0)})();else for(;pt<=ht;){var Tt=vt();if(Tt)return Tt}},pushComponent:function et(tt,nt,rt){var ot=tt[tt.length-1];ot&&ot.added===nt&&ot.removed===rt?tt[tt.length-1]={count:ot.count+1,added:nt,removed:rt}:tt.push({count:1,added:nt,removed:rt})},extractCommon:function et(tt,nt,rt,ot){for(var st=nt.length,ut=rt.length,ct=tt.newPos,ft=ct-ot,pt=0;ct+1<st&&ft+1<ut&&this.equals(nt[ct+1],rt[ft+1]);)ct++,ft++,pt++;return pt&&tt.components.push({count:pt}),tt.newPos=ct,ft},equals:function et(tt,nt){return this.options.comparator?this.options.comparator(tt,nt):tt===nt||this.options.ignoreCase&&tt.toLowerCase()===nt.toLowerCase()},removeEmpty:function et(tt){for(var nt=[],rt=0;rt<tt.length;rt++)tt[rt]&&nt.push(tt[rt]);return nt},castInput:function et(tt){return tt},tokenize:function et(tt){return tt.split("")},join:function et(tt){return tt.join("")}};function buildValues(et,tt,nt,rt,ot){for(var st=0,ut=tt.length,ct=0,ft=0;st<ut;st++){var pt=tt[st];if(pt.removed){if(pt.value=et.join(rt.slice(ft,ft+pt.count)),ft+=pt.count,st&&tt[st-1].added){var mt=tt[st-1];tt[st-1]=tt[st],tt[st]=mt}}else{if(!pt.added&&ot){var ht=nt.slice(ct,ct+pt.count);ht=ht.map(function(vt,Tt){var Et=rt[ft+Tt];return Et.length>vt.length?Et:vt}),pt.value=et.join(ht)}else pt.value=et.join(nt.slice(ct,ct+pt.count));ct+=pt.count,pt.added||(ft+=pt.count)}}var yt=tt[ut-1];return ut>1&&typeof yt.value=="string"&&(yt.added||yt.removed)&&et.equals("",yt.value)&&(tt[ut-2].value+=yt.value,tt.pop()),tt}function clonePath(et){return{newPos:et.newPos,components:et.components.slice(0)}}var characterDiff=new Diff;function diffChars(et,tt,nt){return characterDiff.diff(et,tt,nt)}function generateOptions(et,tt){if(typeof et=="function")tt.callback=et;else if(et)for(var nt in et)et.hasOwnProperty(nt)&&(tt[nt]=et[nt]);return tt}var extendedWordChars=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,reWhitespace=/\S/,wordDiff=new Diff;wordDiff.equals=function(et,tt){return this.options.ignoreCase&&(et=et.toLowerCase(),tt=tt.toLowerCase()),et===tt||this.options.ignoreWhitespace&&!reWhitespace.test(et)&&!reWhitespace.test(tt)};wordDiff.tokenize=function(et){for(var tt=et.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),nt=0;nt<tt.length-1;nt++)!tt[nt+1]&&tt[nt+2]&&extendedWordChars.test(tt[nt])&&extendedWordChars.test(tt[nt+2])&&(tt[nt]+=tt[nt+2],tt.splice(nt+1,2),nt--);return tt};function diffWords(et,tt,nt){return nt=generateOptions(nt,{ignoreWhitespace:!0}),wordDiff.diff(et,tt,nt)}var lineDiff=new Diff;lineDiff.tokenize=function(et){var tt=[],nt=et.split(/(\n|\r\n)/);nt[nt.length-1]||nt.pop();for(var rt=0;rt<nt.length;rt++){var ot=nt[rt];rt%2&&!this.options.newlineIsToken?tt[tt.length-1]+=ot:(this.options.ignoreWhitespace&&(ot=ot.trim()),tt.push(ot))}return tt};function diffLines(et,tt,nt){return lineDiff.diff(et,tt,nt)}var sentenceDiff=new Diff;sentenceDiff.tokenize=function(et){return et.split(/(\S.+?[.!?])(?=\s+|$)/)};var cssDiff=new Diff;cssDiff.tokenize=function(et){return et.split(/([{}:;,]|\s+)/)};function _typeof(et){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(tt){return typeof tt}:_typeof=function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof(et)}var objectPrototypeToString=Object.prototype.toString,jsonDiff=new Diff;jsonDiff.useLongestToken=!0;jsonDiff.tokenize=lineDiff.tokenize;jsonDiff.castInput=function(et){var tt=this.options,nt=tt.undefinedReplacement,rt=tt.stringifyReplacer,ot=rt===void 0?function(st,ut){return typeof ut>"u"?nt:ut}:rt;return typeof et=="string"?et:JSON.stringify(canonicalize(et,null,null,ot),ot,"  ")};jsonDiff.equals=function(et,tt){return Diff.prototype.equals.call(jsonDiff,et.replace(/,([\r\n])/g,"$1"),tt.replace(/,([\r\n])/g,"$1"))};function canonicalize(et,tt,nt,rt,ot){tt=tt||[],nt=nt||[],rt&&(et=rt(ot,et));var st;for(st=0;st<tt.length;st+=1)if(tt[st]===et)return nt[st];var ut;if(objectPrototypeToString.call(et)==="[object Array]"){for(tt.push(et),ut=new Array(et.length),nt.push(ut),st=0;st<et.length;st+=1)ut[st]=canonicalize(et[st],tt,nt,rt,ot);return tt.pop(),nt.pop(),ut}if(et&&et.toJSON&&(et=et.toJSON()),_typeof(et)==="object"&&et!==null){tt.push(et),ut={},nt.push(ut);var ct=[],ft;for(ft in et)et.hasOwnProperty(ft)&&ct.push(ft);for(ct.sort(),st=0;st<ct.length;st+=1)ft=ct[st],ut[ft]=canonicalize(et[ft],tt,nt,rt,ft);tt.pop(),nt.pop()}else ut=et;return ut}var arrayDiff=new Diff;arrayDiff.tokenize=function(et){return et.slice()};arrayDiff.join=arrayDiff.removeEmpty=function(et){return et};const StringContainer=styled$1.div`
  padding: 0px 1em;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  overflow-y: auto;
  text-align: left;
  // Hide scrollbars
  &::-webkit-scrollbar {
    display: none;
  }
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
`,StringItem=styled$1.div`
  margin: auto;
  width: 100%;
  /* padding: 4px; */
  margin: auto;
  max-height: 100%;
`,ConfigExpressionWrap=styled$1.div`
  padding: 0.65em;
  background: white;
  max-width: 20em;
`,PreformattedProportionalString=styled$1.pre`
  font-family: ${fontName};
  margin-top: 0.25em;
  margin-bottom: 0.25em;
  white-space: pre-wrap;
  line-height: 1.3em;
`,PreformattedMonoString=styled$1.pre`
  margin-top: 0.25em;
  margin-bottom: 0.25em;
  white-space: pre-wrap;
  line-height: 1.3em;
`;styled$1.div`
  padding-bottom: 0.5em;
  color: white;
  font-weight: 500;
  border-bottom: 1px solid gray;
  margin-bottom: 1em;
  &&& button {
    margin: 0px;
    padding: 2px 4px;
  }
`;var ToastContainer$2={},TransitionGroup={exports:{}},ChildMapping={};ChildMapping.__esModule=!0;ChildMapping.getChildMapping=getChildMapping;ChildMapping.mergeChildMappings=mergeChildMappings;ChildMapping.getInitialChildMapping=getInitialChildMapping;ChildMapping.getNextChildMapping=getNextChildMapping;var _react$7=react.exports;function getChildMapping(et,tt){var nt=function(st){return tt&&(0,_react$7.isValidElement)(st)?tt(st):st},rt=Object.create(null);return et&&_react$7.Children.map(et,function(ot){return ot}).forEach(function(ot){rt[ot.key]=nt(ot)}),rt}function mergeChildMappings(et,tt){et=et||{},tt=tt||{};function nt(ht){return ht in tt?tt[ht]:et[ht]}var rt=Object.create(null),ot=[];for(var st in et)st in tt?ot.length&&(rt[st]=ot,ot=[]):ot.push(st);var ut,ct={};for(var ft in tt){if(rt[ft])for(ut=0;ut<rt[ft].length;ut++){var pt=rt[ft][ut];ct[rt[ft][ut]]=nt(pt)}ct[ft]=nt(ft)}for(ut=0;ut<ot.length;ut++)ct[ot[ut]]=nt(ot[ut]);return ct}function getProp(et,tt,nt){return nt[tt]!=null?nt[tt]:et.props[tt]}function getInitialChildMapping(et,tt){return getChildMapping(et.children,function(nt){return(0,_react$7.cloneElement)(nt,{onExited:tt.bind(null,nt),in:!0,appear:getProp(nt,"appear",et),enter:getProp(nt,"enter",et),exit:getProp(nt,"exit",et)})})}function getNextChildMapping(et,tt,nt){var rt=getChildMapping(et.children),ot=mergeChildMappings(tt,rt);return Object.keys(ot).forEach(function(st){var ut=ot[st];if(!!(0,_react$7.isValidElement)(ut)){var ct=st in tt,ft=st in rt,pt=tt[st],ht=(0,_react$7.isValidElement)(pt)&&!pt.props.in;ft&&(!ct||ht)?ot[st]=(0,_react$7.cloneElement)(ut,{onExited:nt.bind(null,ut),in:!0,exit:getProp(ut,"exit",et),enter:getProp(ut,"enter",et)}):!ft&&ct&&!ht?ot[st]=(0,_react$7.cloneElement)(ut,{in:!1}):ft&&ct&&(0,_react$7.isValidElement)(pt)&&(ot[st]=(0,_react$7.cloneElement)(ut,{onExited:nt.bind(null,ut),in:pt.props.in,exit:getProp(ut,"exit",et),enter:getProp(ut,"enter",et)}))}}),ot}(function(et,tt){tt.__esModule=!0,tt.default=void 0;var nt=ut(propTypes$1.exports),rt=ut(react.exports),ot=require$$3,st=ChildMapping;function ut(Et){return Et&&Et.__esModule?Et:{default:Et}}function ct(Et,xt){if(Et==null)return{};var At={},Ct=Object.keys(Et),$t,Ot;for(Ot=0;Ot<Ct.length;Ot++)$t=Ct[Ot],!(xt.indexOf($t)>=0)&&(At[$t]=Et[$t]);return At}function ft(){return ft=Object.assign||function(Et){for(var xt=1;xt<arguments.length;xt++){var At=arguments[xt];for(var Ct in At)Object.prototype.hasOwnProperty.call(At,Ct)&&(Et[Ct]=At[Ct])}return Et},ft.apply(this,arguments)}function pt(Et,xt){Et.prototype=Object.create(xt.prototype),Et.prototype.constructor=Et,Et.__proto__=xt}function ht(Et){if(Et===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Et}var mt=Object.values||function(Et){return Object.keys(Et).map(function(xt){return Et[xt]})},yt={component:"div",childFactory:function(xt){return xt}},vt=function(Et){pt(xt,Et);function xt(Ct,$t){var Ot;Ot=Et.call(this,Ct,$t)||this;var Rt=Ot.handleExited.bind(ht(ht(Ot)));return Ot.state={handleExited:Rt,firstRender:!0},Ot}var At=xt.prototype;return At.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},At.componentDidMount=function(){this.appeared=!0,this.mounted=!0},At.componentWillUnmount=function(){this.mounted=!1},xt.getDerivedStateFromProps=function($t,Ot){var Rt=Ot.children,It=Ot.handleExited,kt=Ot.firstRender;return{children:kt?(0,st.getInitialChildMapping)($t,It):(0,st.getNextChildMapping)($t,Rt,It),firstRender:!1}},At.handleExited=function($t,Ot){var Rt=(0,st.getChildMapping)(this.props.children);$t.key in Rt||($t.props.onExited&&$t.props.onExited(Ot),this.mounted&&this.setState(function(It){var kt=ft({},It.children);return delete kt[$t.key],{children:kt}}))},At.render=function(){var $t=this.props,Ot=$t.component,Rt=$t.childFactory,It=ct($t,["component","childFactory"]),kt=mt(this.state.children).map(Rt);return delete It.appear,delete It.enter,delete It.exit,Ot===null?kt:rt.default.createElement(Ot,It,kt)},xt}(rt.default.Component);vt.childContextTypes={transitionGroup:nt.default.object.isRequired},vt.propTypes={},vt.defaultProps=yt;var Tt=(0,ot.polyfill)(vt);tt.default=Tt,et.exports=tt.default})(TransitionGroup,TransitionGroup.exports);var Toast$1={},ProgressBar$1={},constant={};constant.__esModule=!0;constant.ACTION=constant.TYPE=constant.POSITION=void 0;var 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"};constant.POSITION=POSITION;var TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};constant.TYPE=TYPE;var ACTION={SHOW:0,CLEAR:1,DID_MOUNT:2,WILL_UNMOUNT:3,ON_CHANGE:4};constant.ACTION=ACTION;var propValidator={};propValidator.__esModule=!0;propValidator.isValidDelay=isValidDelay;propValidator.objectValues=objectValues;propValidator.falseOrElement=propValidator.falseOrDelay=void 0;var _react$6=react.exports;function isValidDelay(et){return typeof et=="number"&&!isNaN(et)&&et>0}function objectValues(et){return Object.keys(et).map(function(tt){return et[tt]})}function withRequired(et){return et.isRequired=function(tt,nt,rt){var ot=tt[nt];if(typeof ot>"u")return new Error("The prop "+nt+` is marked as required in 
      `+rt+", but its value is undefined.");et(tt,nt,rt)},et}var falseOrDelay=withRequired(function(et,tt,nt){var rt=et[tt];return rt!==!1&&!isValidDelay(rt)?new Error(nt+" expect "+tt+` 
      to be a valid Number > 0 or equal to false. `+rt+" given."):null});propValidator.falseOrDelay=falseOrDelay;var falseOrElement=withRequired(function(et,tt,nt){var rt=et[tt];return rt!==!1&&!(0,_react$6.isValidElement)(rt)?new Error(nt+" expect "+tt+` 
      to be a valid react element or equal to false. `+rt+" given."):null});propValidator.falseOrElement=falseOrElement;ProgressBar$1.__esModule=!0;ProgressBar$1.default=void 0;var _react$5=_interopRequireDefault$8(react.exports),_propTypes$3=_interopRequireDefault$8(propTypes$1.exports),_classnames$2=_interopRequireDefault$8(classnames$1.exports),_constant$3=constant,_propValidator$2=propValidator;function _interopRequireDefault$8(et){return et&&et.__esModule?et:{default:et}}function _extends$4(){return _extends$4=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$4.apply(this,arguments)}function ProgressBar(et){var tt,nt=et.delay,rt=et.isRunning,ot=et.closeToast,st=et.type,ut=et.hide,ct=et.className,ft=et.style,pt=et.controlledProgress,ht=et.progress,mt=et.isProgressDone,yt=et.rtl,vt=_extends$4({},ft,{animationDuration:nt+"ms",animationPlayState:rt?"running":"paused",opacity:ut?0:1,transform:pt?"scaleX("+ht+")":null}),Tt=(0,_classnames$2.default)("Toastify__progress-bar",pt?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+st,{"Toastify__progress-bar--rtl":yt},ct),Et=(tt={},tt[pt&&mt?"onTransitionEnd":"onAnimationEnd"]=pt&&!mt?null:ot,tt);return _react$5.default.createElement("div",_extends$4({className:Tt,style:vt},Et))}ProgressBar.propTypes={delay:_propValidator$2.falseOrDelay.isRequired,isRunning:_propTypes$3.default.bool.isRequired,closeToast:_propTypes$3.default.func.isRequired,rtl:_propTypes$3.default.bool.isRequired,type:_propTypes$3.default.string,hide:_propTypes$3.default.bool,className:_propTypes$3.default.oneOfType([_propTypes$3.default.string,_propTypes$3.default.object]),progress:_propTypes$3.default.number,controlledProgress:_propTypes$3.default.bool,isProgressDone:_propTypes$3.default.bool};ProgressBar.defaultProps={type:_constant$3.TYPE.DEFAULT,hide:!1};var _default$7=ProgressBar;ProgressBar$1.default=_default$7;Toast$1.__esModule=!0;Toast$1.default=void 0;var _react$4=_interopRequireWildcard$2(react.exports),_propTypes$2=_interopRequireDefault$7(propTypes$1.exports),_classnames$1=_interopRequireDefault$7(classnames$1.exports),_ProgressBar=_interopRequireDefault$7(ProgressBar$1),_constant$2=constant,_propValidator$1=propValidator;function _interopRequireDefault$7(et){return et&&et.__esModule?et:{default:et}}function _interopRequireWildcard$2(et){if(et&&et.__esModule)return et;var tt={};if(et!=null){for(var nt in et)if(Object.prototype.hasOwnProperty.call(et,nt)){var rt=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(et,nt):{};rt.get||rt.set?Object.defineProperty(tt,nt,rt):tt[nt]=et[nt]}}return tt.default=et,tt}function _extends$3(){return _extends$3=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$3.apply(this,arguments)}function _inheritsLoose$2(et,tt){et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,et.__proto__=tt}function getX(et){return et.targetTouches&&et.targetTouches.length>=1?et.targetTouches[0].clientX:et.clientX}function getY(et){return et.targetTouches&&et.targetTouches.length>=1?et.targetTouches[0].clientY:et.clientY}var noop$4=function et(){},Toast=function(et){_inheritsLoose$2(tt,et);function tt(){for(var rt,ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=et.call.apply(et,[this].concat(st))||this,rt.state={isRunning:!0,preventExitTransition:!1},rt.flag={canCloseOnClick:!0,canDrag:!1},rt.drag={start:0,x:0,y:0,deltaX:0,removalDistance:0},rt.ref=null,rt.pauseToast=function(){rt.props.autoClose&&rt.setState({isRunning:!1})},rt.playToast=function(){rt.props.autoClose&&rt.setState({isRunning:!0})},rt.onDragStart=function(ct){rt.flag.canCloseOnClick=!0,rt.flag.canDrag=!0,rt.ref.style.transition="",rt.drag.start=rt.drag.x=getX(ct.nativeEvent),rt.drag.removalDistance=rt.ref.offsetWidth*(rt.props.draggablePercent/100)},rt.onDragMove=function(ct){rt.flag.canDrag&&(rt.state.isRunning&&rt.pauseToast(),rt.drag.x=getX(ct),rt.drag.deltaX=rt.drag.x-rt.drag.start,rt.drag.start!==rt.drag.x&&(rt.flag.canCloseOnClick=!1),rt.ref.style.transform="translateX("+rt.drag.deltaX+"px)",rt.ref.style.opacity=1-Math.abs(rt.drag.deltaX/rt.drag.removalDistance))},rt.onDragEnd=function(ct){if(rt.flag.canDrag){if(rt.flag.canDrag=!1,Math.abs(rt.drag.deltaX)>rt.drag.removalDistance){rt.setState({preventExitTransition:!0},rt.props.closeToast);return}rt.drag.y=getY(ct),rt.ref.style.transition="transform 0.2s, opacity 0.2s",rt.ref.style.transform="translateX(0)",rt.ref.style.opacity=1}},rt.onDragTransitionEnd=function(){var ct=rt.ref.getBoundingClientRect(),ft=ct.top,pt=ct.bottom,ht=ct.left,mt=ct.right;rt.props.pauseOnHover&&rt.drag.x>=ht&&rt.drag.x<=mt&&rt.drag.y>=ft&&rt.drag.y<=pt?rt.pauseToast():rt.playToast()},rt}var nt=tt.prototype;return nt.componentDidMount=function(){this.props.onOpen(this.props.children.props),this.props.draggable&&this.bindDragEvents(),this.props.pauseOnFocusLoss&&this.bindFocusEvents()},nt.componentDidUpdate=function(ot){ot.draggable!==this.props.draggable&&(this.props.draggable?this.bindDragEvents():this.unbindDragEvents()),ot.pauseOnFocusLoss!==this.props.pauseOnFocusLoss&&(this.props.pauseOnFocusLoss?this.bindFocusEvents():this.unbindFocusEvents())},nt.componentWillUnmount=function(){this.props.onClose(this.props.children.props),this.props.draggable&&this.unbindDragEvents(),this.props.pauseOnFocusLoss&&this.unbindFocusEvents()},nt.bindFocusEvents=function(){window.addEventListener("focus",this.playToast),window.addEventListener("blur",this.pauseToast)},nt.unbindFocusEvents=function(){window.removeEventListener("focus",this.playToast),window.removeEventListener("blur",this.pauseToast)},nt.bindDragEvents=function(){document.addEventListener("mousemove",this.onDragMove),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchmove",this.onDragMove),document.addEventListener("touchend",this.onDragEnd)},nt.unbindDragEvents=function(){document.removeEventListener("mousemove",this.onDragMove),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchmove",this.onDragMove),document.removeEventListener("touchend",this.onDragEnd)},nt.render=function(){var ot=this,st=this.props,ut=st.closeButton,ct=st.children,ft=st.autoClose,pt=st.pauseOnHover,ht=st.closeOnClick,mt=st.type,yt=st.hideProgressBar,vt=st.closeToast,Tt=st.transition,Et=st.position,xt=st.onExited,At=st.className,Ct=st.bodyClassName,$t=st.progressClassName,Ot=st.progressStyle,Rt=st.updateId,It=st.role,kt=st.progress,Mt=st.isProgressDone,Ft=st.rtl,zt={className:(0,_classnames$1.default)("Toastify__toast","Toastify__toast--"+mt,{"Toastify__toast--rtl":Ft},At)};ft&&pt&&(zt.onMouseEnter=this.pauseToast,zt.onMouseLeave=this.playToast),ht&&(zt.onClick=function(){return ot.flag.canCloseOnClick&&vt()});var Vt=parseFloat(kt)===kt;return _react$4.default.createElement(Tt,{in:this.props.in,appear:!0,unmountOnExit:!0,onExited:xt,position:Et,preventExitTransition:this.state.preventExitTransition},_react$4.default.createElement("div",_extends$3({},zt,{ref:function(Ut){return ot.ref=Ut},onMouseDown:this.onDragStart,onTouchStart:this.onDragStart,onTransitionEnd:this.onDragTransitionEnd}),_react$4.default.createElement("div",_extends$3({},this.props.in&&{role:It},{className:(0,_classnames$1.default)("Toastify__toast-body",Ct)}),ct),ut&&ut,(ft||Vt)&&_react$4.default.createElement(_ProgressBar.default,_extends$3({},Rt&&!Vt?{key:"pb-"+Rt}:{},{rtl:Ft,delay:ft,isRunning:this.state.isRunning,closeToast:vt,hide:yt,type:mt,style:Ot,className:$t,controlledProgress:Vt,isProgressDone:Mt,progress:kt}))))},tt}(_react$4.Component);Toast.propTypes={closeButton:_propValidator$1.falseOrElement.isRequired,autoClose:_propValidator$1.falseOrDelay.isRequired,children:_propTypes$2.default.node.isRequired,closeToast:_propTypes$2.default.func.isRequired,position:_propTypes$2.default.oneOf((0,_propValidator$1.objectValues)(_constant$2.POSITION)).isRequired,pauseOnHover:_propTypes$2.default.bool.isRequired,pauseOnFocusLoss:_propTypes$2.default.bool.isRequired,closeOnClick:_propTypes$2.default.bool.isRequired,transition:_propTypes$2.default.func.isRequired,rtl:_propTypes$2.default.bool.isRequired,hideProgressBar:_propTypes$2.default.bool.isRequired,draggable:_propTypes$2.default.bool.isRequired,draggablePercent:_propTypes$2.default.number.isRequired,in:_propTypes$2.default.bool,onExited:_propTypes$2.default.func,onOpen:_propTypes$2.default.func,onClose:_propTypes$2.default.func,type:_propTypes$2.default.oneOf((0,_propValidator$1.objectValues)(_constant$2.TYPE)),className:_propTypes$2.default.oneOfType([_propTypes$2.default.string,_propTypes$2.default.object]),bodyClassName:_propTypes$2.default.oneOfType([_propTypes$2.default.string,_propTypes$2.default.object]),progressClassName:_propTypes$2.default.oneOfType([_propTypes$2.default.string,_propTypes$2.default.object]),progressStyle:_propTypes$2.default.object,progress:_propTypes$2.default.number,isProgressDone:_propTypes$2.default.bool,updateId:_propTypes$2.default.oneOfType([_propTypes$2.default.string,_propTypes$2.default.number]),ariaLabel:_propTypes$2.default.string};Toast.defaultProps={type:_constant$2.TYPE.DEFAULT,in:!0,onOpen:noop$4,onClose:noop$4,className:null,bodyClassName:null,progressClassName:null,updateId:null,role:"alert"};var _default$6=Toast;Toast$1.default=_default$6;var CloseButton$1={};CloseButton$1.__esModule=!0;CloseButton$1.default=void 0;var _react$3=_interopRequireDefault$6(react.exports),_propTypes$1=_interopRequireDefault$6(propTypes$1.exports);function _interopRequireDefault$6(et){return et&&et.__esModule?et:{default:et}}function CloseButton(et){var tt=et.closeToast,nt=et.type,rt=et.ariaLabel;return _react$3.default.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+nt,type:"button",onClick:tt,"aria-label":rt},"\u2716")}CloseButton.propTypes={closeToast:_propTypes$1.default.func,arialLabel:_propTypes$1.default.string};CloseButton.defaultProps={ariaLabel:"close"};var _default$5=CloseButton;CloseButton$1.default=_default$5;var Transitions={},cssTransition={},Transition$1={};Transition$1.__esModule=!0;Transition$1.default=Transition$1.EXITING=Transition$1.ENTERED=Transition$1.ENTERING=Transition$1.EXITED=Transition$1.UNMOUNTED=void 0;var PropTypes=_interopRequireWildcard$1(propTypes$1.exports),_react$2=_interopRequireDefault$5(react.exports),_reactDom=_interopRequireDefault$5(reactDom.exports),_reactLifecyclesCompat=require$$3;function _interopRequireDefault$5(et){return et&&et.__esModule?et:{default:et}}function _interopRequireWildcard$1(et){if(et&&et.__esModule)return et;var tt={};if(et!=null){for(var nt in et)if(Object.prototype.hasOwnProperty.call(et,nt)){var rt=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(et,nt):{};rt.get||rt.set?Object.defineProperty(tt,nt,rt):tt[nt]=et[nt]}}return tt.default=et,tt}function _objectWithoutPropertiesLoose$1(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}function _inheritsLoose$1(et,tt){et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,et.__proto__=tt}var UNMOUNTED="unmounted";Transition$1.UNMOUNTED=UNMOUNTED;var EXITED="exited";Transition$1.EXITED=EXITED;var ENTERING="entering";Transition$1.ENTERING=ENTERING;var ENTERED="entered";Transition$1.ENTERED=ENTERED;var EXITING="exiting";Transition$1.EXITING=EXITING;var Transition=function(et){_inheritsLoose$1(tt,et);function tt(rt,ot){var st;st=et.call(this,rt,ot)||this;var ut=ot.transitionGroup,ct=ut&&!ut.isMounting?rt.enter:rt.appear,ft;return st.appearStatus=null,rt.in?ct?(ft=EXITED,st.appearStatus=ENTERING):ft=ENTERED:rt.unmountOnExit||rt.mountOnEnter?ft=UNMOUNTED:ft=EXITED,st.state={status:ft},st.nextCallback=null,st}var nt=tt.prototype;return nt.getChildContext=function(){return{transitionGroup:null}},tt.getDerivedStateFromProps=function(ot,st){var ut=ot.in;return ut&&st.status===UNMOUNTED?{status:EXITED}:null},nt.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},nt.componentDidUpdate=function(ot){var st=null;if(ot!==this.props){var ut=this.state.status;this.props.in?ut!==ENTERING&&ut!==ENTERED&&(st=ENTERING):(ut===ENTERING||ut===ENTERED)&&(st=EXITING)}this.updateStatus(!1,st)},nt.componentWillUnmount=function(){this.cancelNextCallback()},nt.getTimeouts=function(){var ot=this.props.timeout,st,ut,ct;return st=ut=ct=ot,ot!=null&&typeof ot!="number"&&(st=ot.exit,ut=ot.enter,ct=ot.appear!==void 0?ot.appear:ut),{exit:st,enter:ut,appear:ct}},nt.updateStatus=function(ot,st){if(ot===void 0&&(ot=!1),st!==null){this.cancelNextCallback();var ut=_reactDom.default.findDOMNode(this);st===ENTERING?this.performEnter(ut,ot):this.performExit(ut)}else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},nt.performEnter=function(ot,st){var ut=this,ct=this.props.enter,ft=this.context.transitionGroup?this.context.transitionGroup.isMounting:st,pt=this.getTimeouts(),ht=ft?pt.appear:pt.enter;if(!st&&!ct){this.safeSetState({status:ENTERED},function(){ut.props.onEntered(ot)});return}this.props.onEnter(ot,ft),this.safeSetState({status:ENTERING},function(){ut.props.onEntering(ot,ft),ut.onTransitionEnd(ot,ht,function(){ut.safeSetState({status:ENTERED},function(){ut.props.onEntered(ot,ft)})})})},nt.performExit=function(ot){var st=this,ut=this.props.exit,ct=this.getTimeouts();if(!ut){this.safeSetState({status:EXITED},function(){st.props.onExited(ot)});return}this.props.onExit(ot),this.safeSetState({status:EXITING},function(){st.props.onExiting(ot),st.onTransitionEnd(ot,ct.exit,function(){st.safeSetState({status:EXITED},function(){st.props.onExited(ot)})})})},nt.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},nt.safeSetState=function(ot,st){st=this.setNextCallback(st),this.setState(ot,st)},nt.setNextCallback=function(ot){var st=this,ut=!0;return this.nextCallback=function(ct){ut&&(ut=!1,st.nextCallback=null,ot(ct))},this.nextCallback.cancel=function(){ut=!1},this.nextCallback},nt.onTransitionEnd=function(ot,st,ut){this.setNextCallback(ut);var ct=st==null&&!this.props.addEndListener;if(!ot||ct){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(ot,this.nextCallback),st!=null&&setTimeout(this.nextCallback,st)},nt.render=function(){var ot=this.state.status;if(ot===UNMOUNTED)return null;var st=this.props,ut=st.children,ct=_objectWithoutPropertiesLoose$1(st,["children"]);if(delete ct.in,delete ct.mountOnEnter,delete ct.unmountOnExit,delete ct.appear,delete ct.enter,delete ct.exit,delete ct.timeout,delete ct.addEndListener,delete ct.onEnter,delete ct.onEntering,delete ct.onEntered,delete ct.onExit,delete ct.onExiting,delete ct.onExited,typeof ut=="function")return ut(ot,ct);var ft=_react$2.default.Children.only(ut);return _react$2.default.cloneElement(ft,ct)},tt}(_react$2.default.Component);Transition.contextTypes={transitionGroup:PropTypes.object};Transition.childContextTypes={transitionGroup:function et(){}};Transition.propTypes={};function noop$3(){}Transition.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$3,onEntering:noop$3,onEntered:noop$3,onExit:noop$3,onExiting:noop$3,onExited:noop$3};Transition.UNMOUNTED=0;Transition.EXITED=1;Transition.ENTERING=2;Transition.ENTERED=3;Transition.EXITING=4;var _default$4=(0,_reactLifecyclesCompat.polyfill)(Transition);Transition$1.default=_default$4;cssTransition.__esModule=!0;cssTransition.default=_default$3;var _react$1=_interopRequireDefault$4(react.exports),_Transition=_interopRequireDefault$4(Transition$1);function _interopRequireDefault$4(et){return et&&et.__esModule?et:{default:et}}function _extends$2(){return _extends$2=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$2.apply(this,arguments)}function _objectWithoutPropertiesLoose(et,tt){if(et==null)return{};var nt={},rt=Object.keys(et),ot,st;for(st=0;st<rt.length;st++)ot=rt[st],!(tt.indexOf(ot)>=0)&&(nt[ot]=et[ot]);return nt}var noop$2=function et(){};function _default$3(et){var tt=et.enter,nt=et.exit,rt=et.duration,ot=rt===void 0?750:rt,st=et.appendPosition,ut=st===void 0?!1:st;return function(ft){var pt=ft.children,ht=ft.position,mt=ft.preventExitTransition,yt=_objectWithoutPropertiesLoose(ft,["children","position","preventExitTransition"]),vt=ut?tt+"--"+ht:tt,Tt=ut?nt+"--"+ht:nt,Et,xt;Array.isArray(ot)&&ot.length===2?(Et=ot[0],xt=ot[1]):Et=xt=ot;var At=function(Rt){Rt.classList.add(vt),Rt.style.animationFillMode="forwards",Rt.style.animationDuration=Et*.001+"s"},Ct=function(Rt){Rt.classList.remove(vt),Rt.style.cssText=""},$t=function(Rt){Rt.classList.add(Tt),Rt.style.animationFillMode="forwards",Rt.style.animationDuration=xt*.001+"s"};return _react$1.default.createElement(_Transition.default,_extends$2({},yt,{timeout:mt?0:{enter:Et,exit:xt},onEnter:At,onEntered:Ct,onExit:mt?noop$2:$t}),pt)}}Transitions.__esModule=!0;Transitions.Flip=Transitions.Zoom=Transitions.Slide=Transitions.Bounce=void 0;var _cssTransition$1=_interopRequireDefault$3(cssTransition);function _interopRequireDefault$3(et){return et&&et.__esModule?et:{default:et}}var Bounce=(0,_cssTransition$1.default)({enter:"Toastify__bounce-enter",exit:"Toastify__bounce-exit",appendPosition:!0});Transitions.Bounce=Bounce;var Slide=(0,_cssTransition$1.default)({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit",duration:[450,750],appendPosition:!0});Transitions.Slide=Slide;var Zoom=(0,_cssTransition$1.default)({enter:"Toastify__zoom-enter",exit:"Toastify__zoom-exit"});Transitions.Zoom=Zoom;var Flip=(0,_cssTransition$1.default)({enter:"Toastify__flip-enter",exit:"Toastify__flip-exit"});Transitions.Flip=Flip;var eventManager$1={};eventManager$1.__esModule=!0;eventManager$1.default=void 0;var eventManager={list:new Map,on:function et(tt,nt){return this.list.has(tt)||this.list.set(tt,[]),this.list.get(tt).push(nt),this},off:function et(tt){return this.list.delete(tt),this},emit:function et(tt){for(var nt=arguments.length,rt=new Array(nt>1?nt-1:0),ot=1;ot<nt;ot++)rt[ot-1]=arguments[ot];return this.list.has(tt)?(this.list.get(tt).forEach(function(st){return setTimeout(function(){return st.call.apply(st,[null].concat(rt))},0)}),!0):!1}},_default$2=eventManager;eventManager$1.default=_default$2;ToastContainer$2.__esModule=!0;ToastContainer$2.default=void 0;var _react=_interopRequireWildcard(react.exports),_propTypes=_interopRequireDefault$2(propTypes$1.exports),_classnames=_interopRequireDefault$2(classnames$1.exports),_TransitionGroup=_interopRequireDefault$2(TransitionGroup.exports),_Toast=_interopRequireDefault$2(Toast$1),_CloseButton=_interopRequireDefault$2(CloseButton$1),_Transitions=Transitions,_constant$1=constant,_eventManager$1=_interopRequireDefault$2(eventManager$1),_propValidator=propValidator;function _interopRequireDefault$2(et){return et&&et.__esModule?et:{default:et}}function _interopRequireWildcard(et){if(et&&et.__esModule)return et;var tt={};if(et!=null){for(var nt in et)if(Object.prototype.hasOwnProperty.call(et,nt)){var rt=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(et,nt):{};rt.get||rt.set?Object.defineProperty(tt,nt,rt):tt[nt]=et[nt]}}return tt.default=et,tt}function _toConsumableArray(et){return _arrayWithoutHoles(et)||_iterableToArray(et)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(et){if(Symbol.iterator in Object(et)||Object.prototype.toString.call(et)==="[object Arguments]")return Array.from(et)}function _arrayWithoutHoles(et){if(Array.isArray(et)){for(var tt=0,nt=new Array(et.length);tt<et.length;tt++)nt[tt]=et[tt];return nt}}function _extends$1(){return _extends$1=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends$1.apply(this,arguments)}function _inheritsLoose(et,tt){et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,et.__proto__=tt}var ToastContainer$1=function(et){_inheritsLoose(tt,et);function tt(){for(var rt,ot=arguments.length,st=new Array(ot),ut=0;ut<ot;ut++)st[ut]=arguments[ut];return rt=et.call.apply(et,[this].concat(st))||this,rt.state={toast:[]},rt.toastKey=1,rt.collection={},rt.isToastActive=function(ct){return rt.state.toast.indexOf(ct)!==-1},rt}var nt=tt.prototype;return nt.componentDidMount=function(){var ot=this;_eventManager$1.default.on(_constant$1.ACTION.SHOW,function(st,ut){return ot.show(st,ut)}).on(_constant$1.ACTION.CLEAR,function(st){return st?ot.removeToast(st):ot.clear()}).emit(_constant$1.ACTION.DID_MOUNT,this)},nt.componentWillUnmount=function(){_eventManager$1.default.off(_constant$1.ACTION.SHOW).off(_constant$1.ACTION.CLEAR).emit(_constant$1.ACTION.WILL_UNMOUNT)},nt.removeToast=function(ot){this.setState({toast:this.state.toast.filter(function(st){return st!==ot})},this.dispatchChange)},nt.dispatchChange=function(){_eventManager$1.default.emit(_constant$1.ACTION.ON_CHANGE,this.state.toast.length)},nt.makeCloseButton=function(ot,st,ut){var ct=this,ft=this.props.closeButton;return((0,_react.isValidElement)(ot)||ot===!1)&&(ft=ot),ft===!1?!1:(0,_react.cloneElement)(ft,{closeToast:function(){return ct.removeToast(st)},type:ut})},nt.getAutoCloseDelay=function(ot){return ot===!1||(0,_propValidator.isValidDelay)(ot)?ot:this.props.autoClose},nt.canBeRendered=function(ot){return(0,_react.isValidElement)(ot)||typeof ot=="string"||typeof ot=="number"||typeof ot=="function"},nt.parseClassName=function(ot){return typeof ot=="string"?ot:ot!==null&&typeof ot=="object"&&"toString"in ot?ot.toString():null},nt.show=function(ot,st){var ut=this,ct;if(!this.canBeRendered(ot))throw new Error("The element you provided cannot be rendered. You provided an element of type "+typeof ot);var ft=st.toastId,pt=function(){return ut.removeToast(ft)},ht={id:ft,key:st.key||this.toastKey++,type:st.type,closeToast:pt,updateId:st.updateId,rtl:this.props.rtl,position:st.position||this.props.position,transition:st.transition||this.props.transition,className:this.parseClassName(st.className||this.props.toastClassName),bodyClassName:this.parseClassName(st.bodyClassName||this.props.bodyClassName),closeButton:this.makeCloseButton(st.closeButton,ft,st.type),pauseOnHover:typeof st.pauseOnHover=="boolean"?st.pauseOnHover:this.props.pauseOnHover,pauseOnFocusLoss:typeof st.pauseOnFocusLoss=="boolean"?st.pauseOnFocusLoss:this.props.pauseOnFocusLoss,draggable:typeof st.draggable=="boolean"?st.draggable:this.props.draggable,draggablePercent:typeof st.draggablePercent=="number"&&!isNaN(st.draggablePercent)?st.draggablePercent:this.props.draggablePercent,closeOnClick:typeof st.closeOnClick=="boolean"?st.closeOnClick:this.props.closeOnClick,progressClassName:this.parseClassName(st.progressClassName||this.props.progressClassName),progressStyle:this.props.progressStyle,autoClose:this.getAutoCloseDelay(st.autoClose),hideProgressBar:typeof st.hideProgressBar=="boolean"?st.hideProgressBar:this.props.hideProgressBar,progress:parseFloat(st.progress),isProgressDone:st.isProgressDone};typeof st.onOpen=="function"&&(ht.onOpen=st.onOpen),typeof st.onClose=="function"&&(ht.onClose=st.onClose),(0,_react.isValidElement)(ot)&&typeof ot.type!="string"&&typeof ot.type!="number"?ot=(0,_react.cloneElement)(ot,{closeToast:pt}):typeof ot=="function"&&(ot=ot({closeToast:pt})),this.collection=_extends$1({},this.collection,(ct={},ct[ft]={position:ht.position,options:ht,content:ot},ct)),this.setState({toast:(ht.updateId?_toConsumableArray(this.state.toast):_toConsumableArray(this.state.toast).concat([ft])).filter(function(mt){return mt!==st.staleToastId})},this.dispatchChange)},nt.makeToast=function(ot,st){return _react.default.createElement(_Toast.default,_extends$1({},st,{isDocumentHidden:this.state.isDocumentHidden,key:"toast-"+st.key}),ot)},nt.clear=function(){this.setState({toast:[]})},nt.renderToast=function(){var ot=this,st={},ut=this.props,ct=ut.className,ft=ut.style,pt=ut.newestOnTop,ht=pt?Object.keys(this.collection).reverse():Object.keys(this.collection);return ht.forEach(function(mt){var yt=ot.collection[mt],vt=yt.position,Tt=yt.options,Et=yt.content;st[vt]||(st[vt]=[]),ot.state.toast.indexOf(Tt.id)!==-1?st[vt].push(ot.makeToast(Et,Tt)):(st[vt].push(null),delete ot.collection[mt])}),Object.keys(st).map(function(mt){var yt=st[mt].length===1&&st[mt][0]===null,vt={className:(0,_classnames.default)("Toastify__toast-container","Toastify__toast-container--"+mt,{"Toastify__toast-container--rtl":ot.props.rtl},ot.parseClassName(ct)),style:yt?_extends$1({},ft,{pointerEvents:"none"}):_extends$1({},ft)};return _react.default.createElement(_TransitionGroup.default,_extends$1({},vt,{key:"container-"+mt}),st[mt])})},nt.render=function(){return _react.default.createElement("div",{className:"Toastify"},this.renderToast())},tt}(_react.Component);ToastContainer$1.propTypes={position:_propTypes.default.oneOf((0,_propValidator.objectValues)(_constant$1.POSITION)),autoClose:_propValidator.falseOrDelay,closeButton:_propValidator.falseOrElement,hideProgressBar:_propTypes.default.bool,pauseOnHover:_propTypes.default.bool,closeOnClick:_propTypes.default.bool,newestOnTop:_propTypes.default.bool,className:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.object]),style:_propTypes.default.object,toastClassName:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.object]),bodyClassName:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.object]),progressClassName:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.object]),progressStyle:_propTypes.default.object,transition:_propTypes.default.func,rtl:_propTypes.default.bool,draggable:_propTypes.default.bool,draggablePercent:_propTypes.default.number,pauseOnFocusLoss:_propTypes.default.bool};ToastContainer$1.defaultProps={position:_constant$1.POSITION.TOP_RIGHT,transition:_Transitions.Bounce,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:_react.default.createElement(_CloseButton.default,null),pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,className:null,style:null,toastClassName:null,bodyClassName:null,progressClassName:null,progressStyle:null};var _default$1=ToastContainer$1;ToastContainer$2.default=_default$1;var toast$3={};toast$3.__esModule=!0;toast$3.default=void 0;var _eventManager=_interopRequireDefault$1(eventManager$1),_constant=constant;function _interopRequireDefault$1(et){return et&&et.__esModule?et:{default:et}}function _extends(){return _extends=Object.assign||function(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt];for(var rt in nt)Object.prototype.hasOwnProperty.call(nt,rt)&&(et[rt]=nt[rt])}return et},_extends.apply(this,arguments)}var container=null,queue=[],noop$1=function et(){return!1};function mergeOptions(et,tt){return _extends({},et,{type:tt,toastId:getToastId(et)})}function generateToastId(){return(Math.random().toString(36)+Date.now().toString(36)).substr(2,10)}function getToastId(et){return et&&(typeof et.toastId=="string"||typeof et.toastId=="number"&&!isNaN(et.toastId))?et.toastId:generateToastId()}function emitEvent(et,tt){return container!==null?_eventManager.default.emit(_constant.ACTION.SHOW,et,tt):queue.push({action:_constant.ACTION.SHOW,content:et,options:tt}),tt.toastId}var toast$2=_extends(function(et,tt){return emitEvent(et,mergeOptions(tt,tt&&tt.type||_constant.TYPE.DEFAULT))},{success:function et(tt,nt){return emitEvent(tt,mergeOptions(nt,_constant.TYPE.SUCCESS))},info:function et(tt,nt){return emitEvent(tt,mergeOptions(nt,_constant.TYPE.INFO))},warn:function et(tt,nt){return emitEvent(tt,mergeOptions(nt,_constant.TYPE.WARNING))},warning:function et(tt,nt){return emitEvent(tt,mergeOptions(nt,_constant.TYPE.WARNING))},error:function et(tt,nt){return emitEvent(tt,mergeOptions(nt,_constant.TYPE.ERROR))},dismiss:function et(tt){return tt===void 0&&(tt=null),container&&_eventManager.default.emit(_constant.ACTION.CLEAR,tt)},isActive:noop$1,update:function et(tt,nt){setTimeout(function(){if(container&&typeof container.collection[tt]<"u"){var rt=container.collection[tt],ot=rt.options,st=rt.content,ut=_extends({},ot,nt,{toastId:nt.toastId||tt});!nt.toastId||nt.toastId===tt?ut.updateId=generateToastId():ut.staleToastId=tt;var ct=typeof ut.render<"u"?ut.render:st;delete ut.render,emitEvent(ct,ut)}},0)},done:function et(tt,nt){nt===void 0&&(nt=1),toast$2.update(tt,{progress:nt,isProgressDone:!0})},onChange:function et(tt){typeof tt=="function"&&_eventManager.default.on(_constant.ACTION.ON_CHANGE,tt)},POSITION:_constant.POSITION,TYPE:_constant.TYPE});_eventManager.default.on(_constant.ACTION.DID_MOUNT,function(et){container=et,toast$2.isActive=function(tt){return container.isToastActive(tt)},queue.forEach(function(tt){_eventManager.default.emit(tt.action,tt.content,tt.options)}),queue=[]}).on(_constant.ACTION.WILL_UNMOUNT,function(){container=null,toast$2.isActive=noop$1});var _default=toast$2;toast$3.default=_default;var _ToastContainer=_interopRequireDefault(ToastContainer$2),ToastContainer=_ToastContainer.default,_toast=_interopRequireDefault(toast$3),toast$1=_toast.default,_cssTransition=_interopRequireDefault(cssTransition);_cssTransition.default;function _interopRequireDefault(et){return et&&et.__esModule?et:{default:et}}Wt.memo(()=>Wt.createElement(ToastContainer,{position:toast$1.POSITION.TOP_RIGHT,hideProgressBar:!0,className:"toast-container",toastClassName:"toast",closeButton:react.exports.createElement(({closeToast:et})=>Wt.createElement(LegacyWBIcon,{name:"close",onClick:et,className:"close-toast"}))}));function toast(et,tt){toast$1(et,tt)}const HOVER_DELAY_MS=200,TT_MARGIN_PX=12,TriggerWrapper$1=styled$1.div`
  width: 100%;
  height: 100%;
  overflow: auto;

  // Hide scrollbars
  &::-webkit-scrollbar {
    display: none;
  }
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */

  &&&.tooltip-open > * {
    background-color: ${GOLD_LIGHT}29; /* 16% opacity */
  }
`,TooltipWrapper=styled$1.div`
  position: absolute;

  background: none;

  // So we have some extra margin around the popup menu's visible
  // area before it closes due to mouse leaving
  padding: ${et=>et.padding}px;
  left: ${et=>et.position.x}px;
  top: ${et=>et.position.y}px;
  transform: ${et=>{switch(et.position.anchor){case"topleft":return`translate(-${et.padding}px, -${et.padding}px)`;case"topright":return`translate(-100%, 0%) translate(${et.padding}px, -${et.padding}px)`;case"bottomleft":return`translate(0%, -100%) translate(-${et.padding}px, ${et.padding}px)`;case"bottomright":return`translate(-100%, -100%) translate(${et.padding}px, ${et.padding}px)`;default:return"none"}}};

  // The modal z-index is 2147483605, so this needs to be higher
  // for the tooltip to properly show in fullscreen mode.
  z-index: 2147483606;
`,TooltipFrame$1=styled$1.div`
  background: white;
  border-radius: 4px;
  border: 1px solid ${GRAY_350};
  box-shadow: 0px 8px 16px ${OBLIVION}1F;

  min-width: 300px;
  max-width: 45vw;
  max-height: 45vh;

  padding: 0px;

  display: flex;
  flex-direction: column;
  overflow: hidden;
`,TooltipHeaderText=styled$1.span`
  font-size: 16px;
  font-weight: 600;
  line-height: 22.4px;
`,TooltipButtons=styled$1.div`
  display: flex;
  flex-direction: row;
  align-items: center;

  &&& button {
    background-color: transparent;
    color: ${GRAY_800}:;
    width: 24px;
    height: 24px;
    border: none;
    margin: 4px;
    padding: 4px;

    svg {
      width: 16px;
      height: 16px;
      color: inherit;
      stroke-width: 1;
    }
  }

  &&& button.extra-button {
    font-size: 16px;
    font-weight: 600;
    line-height: 22.4px;
    width: fit-content;
    margin: 0px;
    margin-left: 24px;
    padding: 0px 4px;
    color: ${TEAL_DARK};
  }

  &&& button:hover {
    background-color: ${TEAL_TRANSPARENT_2};
    color: ${TEAL};
  }
`,TooltipHeader=styled$1.div`
  padding: 0px 16px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid ${GRAY_350};
`,TooltipBody$1=styled$1.div`
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  overflow-y: scroll;
  &&& pre {
    margin-top: 0px;
    margin-bottom: 0px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  &&& .markdown {
    font-size: 14px;
  }
`,POSITION_STRATEGIES=[et=>({anchor:"bottomleft",direction:"vertical",x:et.left+window.scrollX,y:et.top+window.scrollY}),et=>({anchor:"bottomright",direction:"vertical",x:et.right+window.scrollX,y:et.top+window.scrollY}),et=>({anchor:"topleft",direction:"vertical",x:et.left+window.scrollX,y:et.bottom+window.scrollY}),et=>({anchor:"topright",direction:"vertical",x:et.right+window.scrollX,y:et.bottom+window.scrollY}),et=>({anchor:"topleft",direction:"horizontal",x:et.right+window.scrollX,y:et.top+window.scrollY}),et=>({anchor:"bottomleft",direction:"horizontal",x:et.right+window.scrollX,y:et.bottom+window.scrollY}),et=>({anchor:"topright",direction:"horizontal",x:et.left+window.scrollX,y:et.top+window.scrollY}),et=>({anchor:"bottomright",direction:"horizontal",x:et.left+window.scrollX,y:et.bottom+window.scrollY})],calcTooltipRect=(et,tt)=>{const{width:nt,height:rt}=tt;switch(et.anchor){case"topleft":return new DOMRect(et.x,et.y,nt,rt);case"topright":return new DOMRect(et.x-nt,et.y,nt,rt);case"bottomleft":return new DOMRect(et.x,et.y-rt,nt,rt);case"bottomright":return new DOMRect(et.x-nt,et.y-rt,nt,rt);default:throw new Error("calcTooltipRect called without valid anchor")}},getTooltipPositionScore=(et,tt)=>{const nt=calcTooltipRect(et,tt),rt=new DOMRect(window.scrollX,window.scrollY,window.innerWidth,window.innerHeight),ot=Math.min(nt.right,rt.right)-Math.max(nt.left,rt.left),st=Math.min(nt.bottom,rt.bottom)-Math.max(nt.top,rt.top);return ot*st/(nt.width*nt.height)},getTooltipPosition=(et,tt)=>{const nt=POSITION_STRATEGIES.map(ot=>{const st=ot(et),ut=getTooltipPositionScore(st,tt);return{...st,score:ut}});return nt.reduce((ot,st)=>st.score>ot.score?st:ot,nt[0])},TooltipContent=({anchor:et,content:tt,close:nt,copy:rt,expand:ot,extraButton:st,contentHeight:ut,noHeader:ct=!1,padding:ft=TT_MARGIN_PX,positionNearMouse:pt=!1,lastMousePositionRef:ht,FrameComp:mt=TooltipFrame$1,BodyComp:yt=TooltipBody$1})=>{const[vt,Tt]=react.exports.useState(null),[Et,xt]=react.exports.useState(null);return react.exports.useLayoutEffect(()=>{if(Et==null||pt)return;const At=getTooltipPosition(et.getBoundingClientRect(),Et.getBoundingClientRect());Tt(At)},[pt,et,Et,ut]),react.exports.useEffect(()=>{if(!pt)return;const At=ht?.current;return At!=null&&Tt(addBufferToMouseBasedPosition(At)),document.addEventListener("mousemove",Ct),()=>{document.removeEventListener("mousemove",Ct)};function Ct($t){if(Et==null)return;const{x:Ot,y:Rt}=addBufferToMouseBasedPosition({x:$t.clientX,y:$t.clientY});Et.style.left=`${Ot}px`,Et.style.top=`${Rt}px`}},[pt,Et,ht]),ReactDOM.createPortal(Wt.createElement(Ref$1,{innerRef:xt},Wt.createElement(TooltipWrapper,{className:"weave-tooltip",position:vt??{x:-1e4,y:-1e4},padding:ft,onMouseLeave:nt},Wt.createElement(mt,null,!ct&&Wt.createElement(TooltipHeader,null,Wt.createElement(TooltipHeaderText,null,"String preview"),Wt.createElement(TooltipButtons,null,st&&Wt.createElement(Button$3,{className:"extra-button",size:"mini",compact:!0,onClick:st.callback},st.label),Wt.createElement(Button$3,{size:"mini",compact:!0,onClick:rt},Wt.createElement(IconCopy,null)),Wt.createElement(Button$3,{size:"mini",compact:!0,onClick:ot},Wt.createElement(IconFullScreenModeExpand,null)))),Wt.createElement(yt,null,tt)))),document.body)},TooltipTrigger=({children:et,content:tt,copyableContent:nt,extraButton:rt,triggerContentHeight:ot,showWithoutOverflow:st=!1,showInFullscreen:ut=!1,noHeader:ct=!1,padding:ft,positionNearMouse:pt=!1,TriggerWrapperComp:ht=TriggerWrapper$1,FrameComp:mt,BodyComp:yt})=>{const vt=react.exports.useRef(null),{isFullscreen:Tt,goFullscreen:Et}=react.exports.useContext(PanelFullscreenContext),[xt,At]=react.exports.useState(!1),[Ct,$t]=react.exports.useState(!1),[Ot,Rt]=react.exports.useState(!1),[It,kt]=react.exports.useState(null),Mt=It?.clientHeight??0,Ft=It?.clientWidth??0;react.exports.useEffect(()=>{if(It==null)return;const sn=Array.from(It.querySelectorAll("pre, div")).some(Sn=>(ot??0)>Mt||Sn.clientHeight>Mt||Sn.scrollHeight>Mt||Sn.clientWidth>Ft||Sn.scrollWidth>Ft);At(sn)},[It,Mt,Ft,tt,ot]);const zt=react.exports.useCallback(()=>{nt!=null&&(navigator.clipboard.writeText(nt),toast("Copied to clipboard",{type:"success"}))},[nt]),Vt=react.exports.useCallback(()=>{$t(!0)},[]),Zt=react.exports.useCallback(sn=>{if(vt.current!=null&&(clearTimeout(vt.current),vt.current=null),$t(!1),Ot){let Sn=sn.relatedTarget;for(;Sn!=null&&Sn.nodeName!=="BODY";){if(Sn.classList?.contains("weave-tooltip"))return;Sn=Sn.parentElement}Rt(!1)}},[Ot]),Ut=react.exports.useRef(void 0),Xt=react.exports.useCallback(sn=>{Ut.current={x:sn.clientX,y:sn.clientY},vt.current!=null&&(clearTimeout(vt.current),vt.current=null),vt.current=setTimeout(()=>{Ct&&Rt(!0)},HOVER_DELAY_MS)},[Ct]),Jt=react.exports.useCallback(()=>{Rt(!1)},[]),gn=react.exports.useCallback(()=>{Et(),Jt()},[Et,Jt]),An=(st||xt)&&(ut||!Tt)&&Ot&&It!=null;return Wt.createElement(Wt.Fragment,null,Wt.createElement(ht,{onMouseEnter:Vt,onMouseLeave:Zt,onMouseMove:Xt,ref:kt,className:An?"tooltip-open":""},et),An&&Wt.createElement(TooltipContent,{anchor:It,content:tt,contentHeight:ot,close:Jt,copy:zt,expand:gn,extraButton:rt,noHeader:ct,padding:ft,positionNearMouse:pt,lastMousePositionRef:Ut,FrameComp:mt,BodyComp:yt}))};function addBufferToMouseBasedPosition({x:et,y:tt,...nt}){return{...nt,x:et+window.scrollX+24,y:tt+window.scrollY}}const inputType$L={type:"union",members:["none","string","number","boolean","id"]},MAX_DISPLAY_LENGTH=100;function isURL(et){try{const tt=new URL(et);return!!(tt&&(tt.protocol==="http:"||tt.protocol==="https:"))}catch{return!1}}const defaultConfig$1=()=>({mode:"plaintext"}),defaultComparand=constString(""),PanelStringConfig=et=>{const tt=et.config??defaultConfig$1(),nt=et.updateConfig,rt=useWeaveContext(),ot=Wt.useCallback(ct=>{nt({...tt,mode:ct})},[tt,nt]),st=Wt.useCallback(ct=>{!rt.typeIsAssignableTo(ct.type,maybe("string"))||nt({...tt,diffComparand:ct})},[tt,nt,rt]),ut=Wt.useCallback(ct=>{nt({...tt,diffMode:ct})},[tt,nt]);return Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Mode"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,"data-test":"string_mode",multiple:!1,options:[{text:"Plain Text",value:"plaintext"},{text:"Markdown",value:"markdown"},{text:"Diff",value:"diff"}],value:tt.mode,onChange:(ct,{value:ft})=>{ot(ft)}})),tt.mode==="diff"&&Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Compare To"},Wt.createElement(ConfigExpressionWrap,null,Wt.createElement(ExpressionConfigField,{expr:et.config?.diffComparand??defaultComparand,setExpression:st}))),Wt.createElement(ConfigOption,{label:"Diff By"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,"data-test":"diff_mode",multiple:!1,options:[{text:"Characters",value:"chars"},{text:"Words",value:"words"},{text:"Lines",value:"lines"}],value:tt.diffMode??"chars",onChange:(ct,{value:ft})=>{ut(ft)}}))))},PanelString=et=>{const tt=et.config??defaultConfig$1(),nt=opArray({0:et.input,1:tt.diffComparand??et.input}),rt=useNodeValue(nt),ot=String(rt?.result?.[0]??"-"),st=String(rt?.result?.[1]??""),[ut,ct]=Wt.useState(0),ft=Wt.useMemo(()=>{if(tt.mode==="markdown"){const mt=Wt.createElement(Markdown,{condensed:!1,content:ot,onContentHeightChange:ct});return Wt.createElement(StringContainer,null,Wt.createElement(StringItem,null,Wt.createElement(TooltipTrigger,{copyableContent:ot,content:mt,triggerContentHeight:ut},mt)))}else if(tt.mode==="diff"){let mt=[];switch(tt.diffMode){case"lines":mt=diffLines(ot,st);break;case"words":mt=diffWords(ot,st);break;default:mt=diffChars(ot,st)}const yt=mt.map((Tt,Et)=>{const xt=Tt.added?GREEN:Tt.removed?RED:"inherit";return Wt.createElement("span",{style:{color:xt},key:Et},Tt.value)}),vt=Wt.createElement(PreformattedMonoString,null,yt);return Wt.createElement(StringContainer,null,Wt.createElement(StringItem,null,Wt.createElement(TooltipTrigger,{copyableContent:ot,content:vt},vt)))}const ht=Wt.createElement(PreformattedProportionalString,null,ot);return Wt.createElement(StringContainer,{"data-test-weave-id":"string"},Wt.createElement(StringItem,null,Wt.createElement(TooltipTrigger,{copyableContent:ot,content:ht},ht)))},[st,tt.diffMode,tt.mode,ut,ot]),pt=tt.mode==="plaintext"&&isURL(ot);if(rt.loading)return Wt.createElement(Panel2Loader,null);if(pt){const mt=""+(ot.length>MAX_DISPLAY_LENGTH?ot.slice(0,MAX_DISPLAY_LENGTH)+"...":ot);return Wt.createElement(TargetBlank,{href:ot},mt)}else return ft},Spec$M={id:"string",canFullscreen:!0,Component:PanelString,ConfigComponent:PanelStringConfig,inputType:inputType$L},PanelDate=et=>{const tt=useNodeValue(et.input);if(tt.loading)return Wt.createElement(Panel2Loader,null);if(tt.result==null)return Wt.createElement("div",null,"-");const nt=nullableTaggableValue(et.input.type);let rt=tt.result;!isSimpleTypeShape(nt)&&nt.type==="timestamp"&&(rt=hooks(rt).toDate());let ot=[hooks(rt).format("yyyy-MM-D HH:mm:ss")].join(" ");return et.config?.format!=null&&(ot=hooks(rt).format(et.config.format)),Wt.createElement(StringContainer,null,Wt.createElement(StringItem,null,ot))},Component$1=Object.freeze(Object.defineProperty({__proto__:null,default:PanelDate},Symbol.toStringTag,{value:"Module"})),inputType$K={type:"union",members:[{type:"typedDict",propertyTypes:{}},{type:"Object",_is_object:!0}]},PanelObjectConfig=et=>{const{config:tt,updateConfig:nt}=et,rt=react.exports.useCallback(ot=>{nt({...tt,propLimit:ot})},[nt,tt]);return Wt.createElement(ConfigOption,{label:"Field limit"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,allowAdditions:!0,options:[{text:"10",value:10},{text:"50",value:50},{text:"100",value:100},{text:"200",value:200},{text:"500",value:500},{text:"No limit",value:1/0}],value:tt?.propLimit??100,onChange:(ot,{value:st})=>{let ut=Math.max(1,Number(st));isNaN(ut)&&(ut=1),rt(ut)}}))},PanelObject=et=>{const{config:tt,updateConfig:nt}=et,rt=et.level??0,ot=useWeaveContext(),{updateInput:st}=et,ut=react.exports.useMemo(()=>varNode(et.input.type,"input"),[et.input.type]),{objPropTypes:ct,pickOrGetattr:ft}=react.exports.useMemo(()=>{if(isTypedDictLike(et.input.type))return{objPropTypes:typedDictPropertyTypes(et.input.type),pickOrGetattr:(At,Ct)=>opPick({obj:At,key:constString(Ct)})};if(isObjectTypeLike(et.input.type))return{objPropTypes:unionObjectTypeAttrTypes(et.input.type),pickOrGetattr:(At,Ct)=>opObjGetAttr({self:At,name:constString(Ct)})};throw new Error("Invalid input type")},[et.input.type]),pt=_$2.mapKeys(ct,(At,Ct)=>escapeDots(Ct)),ht=et.config?.propLimit??100,mt=react.exports.useMemo(()=>{const At=Object.keys(pt);return At.length>ht?At.slice(0,ht):At},[ht,pt]),yt=react.exports.useCallback((At,Ct)=>{if(Ct==null)return st?.(ft(ut,At));{const $t=ft(ut,At),Ot=ot.callFunction(Ct.path,{input:$t});return st?.(Ot)}},[ut,ft,st,ot]),vt=react.exports.useMemo(()=>mt.map(At=>Wt.createElement(Row,{key:At},Wt.createElement(Key$1,null,Wt.createElement(InputUpdateLink$1,{onClick:()=>yt(At,null)},At)),Wt.createElement(Val,null,isAssignableTo(pt[At],Spec$M.inputType)?Wt.createElement(PanelString,{input:ft(et.input,At),context:et.context,updateContext:et.updateContext,updateConfig:()=>{}}):isAssignableTo(pt[At],Spec$N.inputType)?Wt.createElement(PanelNumber$1,{input:ft(et.input,At),context:et.context,updateContext:et.updateContext,updateConfig:()=>{}}):isAssignableTo(pt[At],Spec$1b.inputType)?Wt.createElement(PanelDate,{input:ft(et.input,At),context:et.context,updateContext:et.updateContext,updateConfig:()=>{}}):isAssignableTo(pt[At],Spec$L.inputType)?Wt.createElement(PanelObject,{input:ft(et.input,At),level:rt+1,config:et.config?.children?.[At],context:et.context,updateContext:et.updateContext,updateConfig:Ct=>et.updateConfig({...et.config,children:{...et.config?.children,[At]:Ct}}),updateInput:Ct=>yt(At,Ct)}):Wt.createElement("div",null,defaultLanguageBinding.printType(pt[At],!0))))),[mt,rt,ft,pt,et,yt]),Tt=!isObjectType(et.input.type)||rt===0,Et=et.config?.expanded??Tt,xt=react.exports.useCallback(()=>{nt({...tt,expanded:!Et})},[nt,tt,Et]);return Wt.createElement(Table,null,isObjectType(et.input.type)&&Wt.createElement("div",{style:{display:"flex",alignItems:"center"},onClick:()=>xt()},Wt.createElement(Icon$4,{size:"mini",name:`chevron ${Et?"down":"right"}`}),et.input.type.type),Et&&Wt.createElement("tbody",null,vt))},Spec$L={id:"object",Component:PanelObject,ConfigComponent:PanelObjectConfig,inputType:inputType$K};var Scalar=function(){function et(){}return et.WithinEpsilon=function(tt,nt,rt){rt===void 0&&(rt=1401298e-51);var ot=tt-nt;return-rt<=ot&&ot<=rt},et.ToHex=function(tt){var nt=tt.toString(16);return tt<=15?("0"+nt).toUpperCase():nt.toUpperCase()},et.Sign=function(tt){return tt=+tt,tt===0||isNaN(tt)?tt:tt>0?1:-1},et.Clamp=function(tt,nt,rt){return nt===void 0&&(nt=0),rt===void 0&&(rt=1),Math.min(rt,Math.max(nt,tt))},et.Log2=function(tt){return Math.log(tt)*Math.LOG2E},et.Repeat=function(tt,nt){return tt-Math.floor(tt/nt)*nt},et.Normalize=function(tt,nt,rt){return(tt-nt)/(rt-nt)},et.Denormalize=function(tt,nt,rt){return tt*(rt-nt)+nt},et.DeltaAngle=function(tt,nt){var rt=et.Repeat(nt-tt,360);return rt>180&&(rt-=360),rt},et.PingPong=function(tt,nt){var rt=et.Repeat(tt,nt*2);return nt-Math.abs(rt-nt)},et.SmoothStep=function(tt,nt,rt){var ot=et.Clamp(rt);return ot=-2*ot*ot*ot+3*ot*ot,nt*ot+tt*(1-ot)},et.MoveTowards=function(tt,nt,rt){var ot=0;return Math.abs(nt-tt)<=rt?ot=nt:ot=tt+et.Sign(nt-tt)*rt,ot},et.MoveTowardsAngle=function(tt,nt,rt){var ot=et.DeltaAngle(tt,nt),st=0;return-rt<ot&&ot<rt?st=nt:(nt=tt+ot,st=et.MoveTowards(tt,nt,rt)),st},et.Lerp=function(tt,nt,rt){return tt+(nt-tt)*rt},et.LerpAngle=function(tt,nt,rt){var ot=et.Repeat(nt-tt,360);return ot>180&&(ot-=360),tt+ot*et.Clamp(rt)},et.InverseLerp=function(tt,nt,rt){var ot=0;return tt!=nt?ot=et.Clamp((rt-tt)/(nt-tt)):ot=0,ot},et.Hermite=function(tt,nt,rt,ot,st){var ut=st*st,ct=st*ut,ft=2*ct-3*ut+1,pt=-2*ct+3*ut,ht=ct-2*ut+st,mt=ct-ut;return tt*ft+rt*pt+nt*ht+ot*mt},et.RandomRange=function(tt,nt){return tt===nt?tt:Math.random()*(nt-tt)+tt},et.RangeToPercent=function(tt,nt,rt){return(tt-nt)/(rt-nt)},et.PercentToRange=function(tt,nt,rt){return(rt-nt)*tt+nt},et.NormalizeRadians=function(tt){return tt-=et.TwoPi*Math.floor((tt+Math.PI)/et.TwoPi),tt},et.TwoPi=Math.PI*2,et}(),ToGammaSpace=1/2.2,ToLinearSpace=2.2,Epsilon=.001,ArrayTools=function(){function et(){}return et.BuildArray=function(tt,nt){for(var rt=[],ot=0;ot<tt;++ot)rt.push(nt());return rt},et}(),_TypeStore=function(){function et(){}return et.GetClass=function(tt){return this.RegisteredTypes&&this.RegisteredTypes[tt]?this.RegisteredTypes[tt]:null},et.RegisteredTypes={},et}(),PerformanceConfigurator=function(){function et(){}return et.SetMatrixPrecision=function(tt){if(et.MatrixTrackPrecisionChange=!1,tt&&!et.MatrixUse64Bits&&et.MatrixTrackedMatrices)for(var nt=0;nt<et.MatrixTrackedMatrices.length;++nt){var rt=et.MatrixTrackedMatrices[nt],ot=rt._m;rt._m=new Array(16);for(var st=0;st<16;++st)rt._m[st]=ot[st]}et.MatrixUse64Bits=tt,et.MatrixCurrentType=et.MatrixUse64Bits?Array:Float32Array,et.MatrixTrackedMatrices=null},et.MatrixUse64Bits=!1,et.MatrixTrackPrecisionChange=!0,et.MatrixCurrentType=Float32Array,et.MatrixTrackedMatrices=[],et}(),Vector2=function(){function et(tt,nt){tt===void 0&&(tt=0),nt===void 0&&(nt=0),this.x=tt,this.y=nt}return et.prototype.toString=function(){return"{X: "+this.x+" Y: "+this.y+"}"},et.prototype.getClassName=function(){return"Vector2"},et.prototype.getHashCode=function(){var tt=this.x|0;return tt=tt*397^(this.y|0),tt},et.prototype.toArray=function(tt,nt){return nt===void 0&&(nt=0),tt[nt]=this.x,tt[nt+1]=this.y,this},et.prototype.fromArray=function(tt,nt){return nt===void 0&&(nt=0),et.FromArrayToRef(tt,nt,this),this},et.prototype.asArray=function(){var tt=new Array;return this.toArray(tt,0),tt},et.prototype.copyFrom=function(tt){return this.x=tt.x,this.y=tt.y,this},et.prototype.copyFromFloats=function(tt,nt){return this.x=tt,this.y=nt,this},et.prototype.set=function(tt,nt){return this.copyFromFloats(tt,nt)},et.prototype.add=function(tt){return new et(this.x+tt.x,this.y+tt.y)},et.prototype.addToRef=function(tt,nt){return nt.x=this.x+tt.x,nt.y=this.y+tt.y,this},et.prototype.addInPlace=function(tt){return this.x+=tt.x,this.y+=tt.y,this},et.prototype.addVector3=function(tt){return new et(this.x+tt.x,this.y+tt.y)},et.prototype.subtract=function(tt){return new et(this.x-tt.x,this.y-tt.y)},et.prototype.subtractToRef=function(tt,nt){return nt.x=this.x-tt.x,nt.y=this.y-tt.y,this},et.prototype.subtractInPlace=function(tt){return this.x-=tt.x,this.y-=tt.y,this},et.prototype.multiplyInPlace=function(tt){return this.x*=tt.x,this.y*=tt.y,this},et.prototype.multiply=function(tt){return new et(this.x*tt.x,this.y*tt.y)},et.prototype.multiplyToRef=function(tt,nt){return nt.x=this.x*tt.x,nt.y=this.y*tt.y,this},et.prototype.multiplyByFloats=function(tt,nt){return new et(this.x*tt,this.y*nt)},et.prototype.divide=function(tt){return new et(this.x/tt.x,this.y/tt.y)},et.prototype.divideToRef=function(tt,nt){return nt.x=this.x/tt.x,nt.y=this.y/tt.y,this},et.prototype.divideInPlace=function(tt){return this.divideToRef(tt,this)},et.prototype.negate=function(){return new et(-this.x,-this.y)},et.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this},et.prototype.negateToRef=function(tt){return tt.copyFromFloats(this.x*-1,this.y*-1)},et.prototype.scaleInPlace=function(tt){return this.x*=tt,this.y*=tt,this},et.prototype.scale=function(tt){var nt=new et(0,0);return this.scaleToRef(tt,nt),nt},et.prototype.scaleToRef=function(tt,nt){return nt.x=this.x*tt,nt.y=this.y*tt,this},et.prototype.scaleAndAddToRef=function(tt,nt){return nt.x+=this.x*tt,nt.y+=this.y*tt,this},et.prototype.equals=function(tt){return tt&&this.x===tt.x&&this.y===tt.y},et.prototype.equalsWithEpsilon=function(tt,nt){return nt===void 0&&(nt=Epsilon),tt&&Scalar.WithinEpsilon(this.x,tt.x,nt)&&Scalar.WithinEpsilon(this.y,tt.y,nt)},et.prototype.floor=function(){return new et(Math.floor(this.x),Math.floor(this.y))},et.prototype.fract=function(){return new et(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},et.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},et.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},et.prototype.normalize=function(){var tt=this.length();return tt===0?this:(this.x/=tt,this.y/=tt,this)},et.prototype.clone=function(){return new et(this.x,this.y)},et.Zero=function(){return new et(0,0)},et.One=function(){return new et(1,1)},et.FromArray=function(tt,nt){return nt===void 0&&(nt=0),new et(tt[nt],tt[nt+1])},et.FromArrayToRef=function(tt,nt,rt){rt.x=tt[nt],rt.y=tt[nt+1]},et.CatmullRom=function(tt,nt,rt,ot,st){var ut=st*st,ct=st*ut,ft=.5*(2*nt.x+(-tt.x+rt.x)*st+(2*tt.x-5*nt.x+4*rt.x-ot.x)*ut+(-tt.x+3*nt.x-3*rt.x+ot.x)*ct),pt=.5*(2*nt.y+(-tt.y+rt.y)*st+(2*tt.y-5*nt.y+4*rt.y-ot.y)*ut+(-tt.y+3*nt.y-3*rt.y+ot.y)*ct);return new et(ft,pt)},et.Clamp=function(tt,nt,rt){var ot=tt.x;ot=ot>rt.x?rt.x:ot,ot=ot<nt.x?nt.x:ot;var st=tt.y;return st=st>rt.y?rt.y:st,st=st<nt.y?nt.y:st,new et(ot,st)},et.Hermite=function(tt,nt,rt,ot,st){var ut=st*st,ct=st*ut,ft=2*ct-3*ut+1,pt=-2*ct+3*ut,ht=ct-2*ut+st,mt=ct-ut,yt=tt.x*ft+rt.x*pt+nt.x*ht+ot.x*mt,vt=tt.y*ft+rt.y*pt+nt.y*ht+ot.y*mt;return new et(yt,vt)},et.Lerp=function(tt,nt,rt){var ot=tt.x+(nt.x-tt.x)*rt,st=tt.y+(nt.y-tt.y)*rt;return new et(ot,st)},et.Dot=function(tt,nt){return tt.x*nt.x+tt.y*nt.y},et.Normalize=function(tt){var nt=tt.clone();return nt.normalize(),nt},et.Minimize=function(tt,nt){var rt=tt.x<nt.x?tt.x:nt.x,ot=tt.y<nt.y?tt.y:nt.y;return new et(rt,ot)},et.Maximize=function(tt,nt){var rt=tt.x>nt.x?tt.x:nt.x,ot=tt.y>nt.y?tt.y:nt.y;return new et(rt,ot)},et.Transform=function(tt,nt){var rt=et.Zero();return et.TransformToRef(tt,nt,rt),rt},et.TransformToRef=function(tt,nt,rt){var ot=nt.m,st=tt.x*ot[0]+tt.y*ot[4]+ot[12],ut=tt.x*ot[1]+tt.y*ot[5]+ot[13];rt.x=st,rt.y=ut},et.PointInTriangle=function(tt,nt,rt,ot){var st=.5*(-rt.y*ot.x+nt.y*(-rt.x+ot.x)+nt.x*(rt.y-ot.y)+rt.x*ot.y),ut=st<0?-1:1,ct=(nt.y*ot.x-nt.x*ot.y+(ot.y-nt.y)*tt.x+(nt.x-ot.x)*tt.y)*ut,ft=(nt.x*rt.y-nt.y*rt.x+(nt.y-rt.y)*tt.x+(rt.x-nt.x)*tt.y)*ut;return ct>0&&ft>0&&ct+ft<2*st*ut},et.Distance=function(tt,nt){return Math.sqrt(et.DistanceSquared(tt,nt))},et.DistanceSquared=function(tt,nt){var rt=tt.x-nt.x,ot=tt.y-nt.y;return rt*rt+ot*ot},et.Center=function(tt,nt){var rt=tt.add(nt);return rt.scaleInPlace(.5),rt},et.DistanceOfPointFromSegment=function(tt,nt,rt){var ot=et.DistanceSquared(nt,rt);if(ot===0)return et.Distance(tt,nt);var st=rt.subtract(nt),ut=Math.max(0,Math.min(1,et.Dot(tt.subtract(nt),st)/ot)),ct=nt.add(st.multiplyByFloats(ut,ut));return et.Distance(tt,ct)},et}(),Vector3=function(){function et(tt,nt,rt){tt===void 0&&(tt=0),nt===void 0&&(nt=0),rt===void 0&&(rt=0),this._isDirty=!0,this._x=tt,this._y=nt,this._z=rt}return Object.defineProperty(et.prototype,"x",{get:function(){return this._x},set:function(tt){this._x=tt,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"y",{get:function(){return this._y},set:function(tt){this._y=tt,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"z",{get:function(){return this._z},set:function(tt){this._z=tt,this._isDirty=!0},enumerable:!1,configurable:!0}),et.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+"}"},et.prototype.getClassName=function(){return"Vector3"},et.prototype.getHashCode=function(){var tt=this._x|0;return tt=tt*397^(this._y|0),tt=tt*397^(this._z|0),tt},et.prototype.asArray=function(){var tt=[];return this.toArray(tt,0),tt},et.prototype.toArray=function(tt,nt){return nt===void 0&&(nt=0),tt[nt]=this._x,tt[nt+1]=this._y,tt[nt+2]=this._z,this},et.prototype.fromArray=function(tt,nt){return nt===void 0&&(nt=0),et.FromArrayToRef(tt,nt,this),this},et.prototype.toQuaternion=function(){return Quaternion.RotationYawPitchRoll(this._y,this._x,this._z)},et.prototype.addInPlace=function(tt){return this.addInPlaceFromFloats(tt._x,tt._y,tt._z)},et.prototype.addInPlaceFromFloats=function(tt,nt,rt){return this.x+=tt,this.y+=nt,this.z+=rt,this},et.prototype.add=function(tt){return new et(this._x+tt._x,this._y+tt._y,this._z+tt._z)},et.prototype.addToRef=function(tt,nt){return nt.copyFromFloats(this._x+tt._x,this._y+tt._y,this._z+tt._z)},et.prototype.subtractInPlace=function(tt){return this.x-=tt._x,this.y-=tt._y,this.z-=tt._z,this},et.prototype.subtract=function(tt){return new et(this._x-tt._x,this._y-tt._y,this._z-tt._z)},et.prototype.subtractToRef=function(tt,nt){return this.subtractFromFloatsToRef(tt._x,tt._y,tt._z,nt)},et.prototype.subtractFromFloats=function(tt,nt,rt){return new et(this._x-tt,this._y-nt,this._z-rt)},et.prototype.subtractFromFloatsToRef=function(tt,nt,rt,ot){return ot.copyFromFloats(this._x-tt,this._y-nt,this._z-rt)},et.prototype.negate=function(){return new et(-this._x,-this._y,-this._z)},et.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},et.prototype.negateToRef=function(tt){return tt.copyFromFloats(this._x*-1,this._y*-1,this._z*-1)},et.prototype.scaleInPlace=function(tt){return this.x*=tt,this.y*=tt,this.z*=tt,this},et.prototype.scale=function(tt){return new et(this._x*tt,this._y*tt,this._z*tt)},et.prototype.scaleToRef=function(tt,nt){return nt.copyFromFloats(this._x*tt,this._y*tt,this._z*tt)},et.prototype.scaleAndAddToRef=function(tt,nt){return nt.addInPlaceFromFloats(this._x*tt,this._y*tt,this._z*tt)},et.prototype.projectOnPlane=function(tt,nt){var rt=et.Zero();return this.projectOnPlaneToRef(tt,nt,rt),rt},et.prototype.projectOnPlaneToRef=function(tt,nt,rt){var ot=tt.normal,st=tt.d,ut=MathTmp.Vector3[0];this.subtractToRef(nt,ut),ut.normalize();var ct=et.Dot(ut,ot),ft=-(et.Dot(nt,ot)+st)/ct,pt=ut.scaleInPlace(ft);nt.addToRef(pt,rt)},et.prototype.equals=function(tt){return tt&&this._x===tt._x&&this._y===tt._y&&this._z===tt._z},et.prototype.equalsWithEpsilon=function(tt,nt){return nt===void 0&&(nt=Epsilon),tt&&Scalar.WithinEpsilon(this._x,tt._x,nt)&&Scalar.WithinEpsilon(this._y,tt._y,nt)&&Scalar.WithinEpsilon(this._z,tt._z,nt)},et.prototype.equalsToFloats=function(tt,nt,rt){return this._x===tt&&this._y===nt&&this._z===rt},et.prototype.multiplyInPlace=function(tt){return this.x*=tt._x,this.y*=tt._y,this.z*=tt._z,this},et.prototype.multiply=function(tt){return this.multiplyByFloats(tt._x,tt._y,tt._z)},et.prototype.multiplyToRef=function(tt,nt){return nt.copyFromFloats(this._x*tt._x,this._y*tt._y,this._z*tt._z)},et.prototype.multiplyByFloats=function(tt,nt,rt){return new et(this._x*tt,this._y*nt,this._z*rt)},et.prototype.divide=function(tt){return new et(this._x/tt._x,this._y/tt._y,this._z/tt._z)},et.prototype.divideToRef=function(tt,nt){return nt.copyFromFloats(this._x/tt._x,this._y/tt._y,this._z/tt._z)},et.prototype.divideInPlace=function(tt){return this.divideToRef(tt,this)},et.prototype.minimizeInPlace=function(tt){return this.minimizeInPlaceFromFloats(tt._x,tt._y,tt._z)},et.prototype.maximizeInPlace=function(tt){return this.maximizeInPlaceFromFloats(tt._x,tt._y,tt._z)},et.prototype.minimizeInPlaceFromFloats=function(tt,nt,rt){return tt<this._x&&(this.x=tt),nt<this._y&&(this.y=nt),rt<this._z&&(this.z=rt),this},et.prototype.maximizeInPlaceFromFloats=function(tt,nt,rt){return tt>this._x&&(this.x=tt),nt>this._y&&(this.y=nt),rt>this._z&&(this.z=rt),this},et.prototype.isNonUniformWithinEpsilon=function(tt){var nt=Math.abs(this._x),rt=Math.abs(this._y);if(!Scalar.WithinEpsilon(nt,rt,tt))return!0;var ot=Math.abs(this._z);return!Scalar.WithinEpsilon(nt,ot,tt)||!Scalar.WithinEpsilon(rt,ot,tt)},Object.defineProperty(et.prototype,"isNonUniform",{get:function(){var tt=Math.abs(this._x),nt=Math.abs(this._y);if(tt!==nt)return!0;var rt=Math.abs(this._z);return tt!==rt},enumerable:!1,configurable:!0}),et.prototype.floor=function(){return new et(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},et.prototype.fract=function(){return new et(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},et.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},et.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},et.prototype.normalize=function(){return this.normalizeFromLength(this.length())},et.prototype.reorderInPlace=function(tt){var nt=this;return tt=tt.toLowerCase(),tt==="xyz"?this:(MathTmp.Vector3[0].copyFrom(this),["x","y","z"].forEach(function(rt,ot){nt[rt]=MathTmp.Vector3[0][tt[ot]]}),this)},et.prototype.rotateByQuaternionToRef=function(tt,nt){return tt.toRotationMatrix(MathTmp.Matrix[0]),et.TransformCoordinatesToRef(this,MathTmp.Matrix[0],nt),nt},et.prototype.rotateByQuaternionAroundPointToRef=function(tt,nt,rt){return this.subtractToRef(nt,MathTmp.Vector3[0]),MathTmp.Vector3[0].rotateByQuaternionToRef(tt,MathTmp.Vector3[0]),nt.addToRef(MathTmp.Vector3[0],rt),rt},et.prototype.cross=function(tt){return et.Cross(this,tt)},et.prototype.normalizeFromLength=function(tt){return tt===0||tt===1?this:this.scaleInPlace(1/tt)},et.prototype.normalizeToNew=function(){var tt=new et(0,0,0);return this.normalizeToRef(tt),tt},et.prototype.normalizeToRef=function(tt){var nt=this.length();return nt===0||nt===1?tt.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/nt,tt)},et.prototype.clone=function(){return new et(this._x,this._y,this._z)},et.prototype.copyFrom=function(tt){return this.copyFromFloats(tt._x,tt._y,tt._z)},et.prototype.copyFromFloats=function(tt,nt,rt){return this.x=tt,this.y=nt,this.z=rt,this},et.prototype.set=function(tt,nt,rt){return this.copyFromFloats(tt,nt,rt)},et.prototype.setAll=function(tt){return this.x=this.y=this.z=tt,this},et.GetClipFactor=function(tt,nt,rt,ot){var st=et.Dot(tt,rt)-ot,ut=et.Dot(nt,rt)-ot,ct=st/(st-ut);return ct},et.GetAngleBetweenVectors=function(tt,nt,rt){var ot=tt.normalizeToRef(MathTmp.Vector3[1]),st=nt.normalizeToRef(MathTmp.Vector3[2]),ut=et.Dot(ot,st),ct=MathTmp.Vector3[3];return et.CrossToRef(ot,st,ct),et.Dot(ct,rt)>0?Math.acos(ut):-Math.acos(ut)},et.FromArray=function(tt,nt){return nt===void 0&&(nt=0),new et(tt[nt],tt[nt+1],tt[nt+2])},et.FromFloatArray=function(tt,nt){return et.FromArray(tt,nt)},et.FromArrayToRef=function(tt,nt,rt){rt.x=tt[nt],rt.y=tt[nt+1],rt.z=tt[nt+2]},et.FromFloatArrayToRef=function(tt,nt,rt){return et.FromArrayToRef(tt,nt,rt)},et.FromFloatsToRef=function(tt,nt,rt,ot){ot.copyFromFloats(tt,nt,rt)},et.Zero=function(){return new et(0,0,0)},et.One=function(){return new et(1,1,1)},et.Up=function(){return new et(0,1,0)},Object.defineProperty(et,"UpReadOnly",{get:function(){return et._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(et,"ZeroReadOnly",{get:function(){return et._ZeroReadOnly},enumerable:!1,configurable:!0}),et.Down=function(){return new et(0,-1,0)},et.Forward=function(tt){return tt===void 0&&(tt=!1),new et(0,0,tt?-1:1)},et.Backward=function(tt){return tt===void 0&&(tt=!1),new et(0,0,tt?1:-1)},et.Right=function(){return new et(1,0,0)},et.Left=function(){return new et(-1,0,0)},et.TransformCoordinates=function(tt,nt){var rt=et.Zero();return et.TransformCoordinatesToRef(tt,nt,rt),rt},et.TransformCoordinatesToRef=function(tt,nt,rt){et.TransformCoordinatesFromFloatsToRef(tt._x,tt._y,tt._z,nt,rt)},et.TransformCoordinatesFromFloatsToRef=function(tt,nt,rt,ot,st){var ut=ot.m,ct=tt*ut[0]+nt*ut[4]+rt*ut[8]+ut[12],ft=tt*ut[1]+nt*ut[5]+rt*ut[9]+ut[13],pt=tt*ut[2]+nt*ut[6]+rt*ut[10]+ut[14],ht=1/(tt*ut[3]+nt*ut[7]+rt*ut[11]+ut[15]);st.x=ct*ht,st.y=ft*ht,st.z=pt*ht},et.TransformNormal=function(tt,nt){var rt=et.Zero();return et.TransformNormalToRef(tt,nt,rt),rt},et.TransformNormalToRef=function(tt,nt,rt){this.TransformNormalFromFloatsToRef(tt._x,tt._y,tt._z,nt,rt)},et.TransformNormalFromFloatsToRef=function(tt,nt,rt,ot,st){var ut=ot.m;st.x=tt*ut[0]+nt*ut[4]+rt*ut[8],st.y=tt*ut[1]+nt*ut[5]+rt*ut[9],st.z=tt*ut[2]+nt*ut[6]+rt*ut[10]},et.CatmullRom=function(tt,nt,rt,ot,st){var ut=st*st,ct=st*ut,ft=.5*(2*nt._x+(-tt._x+rt._x)*st+(2*tt._x-5*nt._x+4*rt._x-ot._x)*ut+(-tt._x+3*nt._x-3*rt._x+ot._x)*ct),pt=.5*(2*nt._y+(-tt._y+rt._y)*st+(2*tt._y-5*nt._y+4*rt._y-ot._y)*ut+(-tt._y+3*nt._y-3*rt._y+ot._y)*ct),ht=.5*(2*nt._z+(-tt._z+rt._z)*st+(2*tt._z-5*nt._z+4*rt._z-ot._z)*ut+(-tt._z+3*nt._z-3*rt._z+ot._z)*ct);return new et(ft,pt,ht)},et.Clamp=function(tt,nt,rt){var ot=new et;return et.ClampToRef(tt,nt,rt,ot),ot},et.ClampToRef=function(tt,nt,rt,ot){var st=tt._x;st=st>rt._x?rt._x:st,st=st<nt._x?nt._x:st;var ut=tt._y;ut=ut>rt._y?rt._y:ut,ut=ut<nt._y?nt._y:ut;var ct=tt._z;ct=ct>rt._z?rt._z:ct,ct=ct<nt._z?nt._z:ct,ot.copyFromFloats(st,ut,ct)},et.CheckExtends=function(tt,nt,rt){nt.minimizeInPlace(tt),rt.maximizeInPlace(tt)},et.Hermite=function(tt,nt,rt,ot,st){var ut=st*st,ct=st*ut,ft=2*ct-3*ut+1,pt=-2*ct+3*ut,ht=ct-2*ut+st,mt=ct-ut,yt=tt._x*ft+rt._x*pt+nt._x*ht+ot._x*mt,vt=tt._y*ft+rt._y*pt+nt._y*ht+ot._y*mt,Tt=tt._z*ft+rt._z*pt+nt._z*ht+ot._z*mt;return new et(yt,vt,Tt)},et.Lerp=function(tt,nt,rt){var ot=new et(0,0,0);return et.LerpToRef(tt,nt,rt,ot),ot},et.LerpToRef=function(tt,nt,rt,ot){ot.x=tt._x+(nt._x-tt._x)*rt,ot.y=tt._y+(nt._y-tt._y)*rt,ot.z=tt._z+(nt._z-tt._z)*rt},et.Dot=function(tt,nt){return tt._x*nt._x+tt._y*nt._y+tt._z*nt._z},et.Cross=function(tt,nt){var rt=et.Zero();return et.CrossToRef(tt,nt,rt),rt},et.CrossToRef=function(tt,nt,rt){var ot=tt._y*nt._z-tt._z*nt._y,st=tt._z*nt._x-tt._x*nt._z,ut=tt._x*nt._y-tt._y*nt._x;rt.copyFromFloats(ot,st,ut)},et.Normalize=function(tt){var nt=et.Zero();return et.NormalizeToRef(tt,nt),nt},et.NormalizeToRef=function(tt,nt){tt.normalizeToRef(nt)},et.Project=function(tt,nt,rt,ot){var st=new et;return et.ProjectToRef(tt,nt,rt,ot,st),st},et.ProjectToRef=function(tt,nt,rt,ot,st){var ut=ot.width,ct=ot.height,ft=ot.x,pt=ot.y,ht=MathTmp.Matrix[1];Matrix.FromValuesToRef(ut/2,0,0,0,0,-ct/2,0,0,0,0,.5,0,ft+ut/2,ct/2+pt,.5,1,ht);var mt=MathTmp.Matrix[0];return nt.multiplyToRef(rt,mt),mt.multiplyToRef(ht,mt),et.TransformCoordinatesToRef(tt,mt,st),st},et._UnprojectFromInvertedMatrixToRef=function(tt,nt,rt){et.TransformCoordinatesToRef(tt,nt,rt);var ot=nt.m,st=tt._x*ot[3]+tt._y*ot[7]+tt._z*ot[11]+ot[15];Scalar.WithinEpsilon(st,1)&&rt.scaleInPlace(1/st)},et.UnprojectFromTransform=function(tt,nt,rt,ot,st){var ut=MathTmp.Matrix[0];ot.multiplyToRef(st,ut),ut.invert(),tt.x=tt._x/nt*2-1,tt.y=-(tt._y/rt*2-1);var ct=new et;return et._UnprojectFromInvertedMatrixToRef(tt,ut,ct),ct},et.Unproject=function(tt,nt,rt,ot,st,ut){var ct=et.Zero();return et.UnprojectToRef(tt,nt,rt,ot,st,ut,ct),ct},et.UnprojectToRef=function(tt,nt,rt,ot,st,ut,ct){et.UnprojectFloatsToRef(tt._x,tt._y,tt._z,nt,rt,ot,st,ut,ct)},et.UnprojectFloatsToRef=function(tt,nt,rt,ot,st,ut,ct,ft,pt){var ht=MathTmp.Matrix[0];ut.multiplyToRef(ct,ht),ht.multiplyToRef(ft,ht),ht.invert();var mt=MathTmp.Vector3[0];mt.x=tt/ot*2-1,mt.y=-(nt/st*2-1),mt.z=2*rt-1,et._UnprojectFromInvertedMatrixToRef(mt,ht,pt)},et.Minimize=function(tt,nt){var rt=tt.clone();return rt.minimizeInPlace(nt),rt},et.Maximize=function(tt,nt){var rt=tt.clone();return rt.maximizeInPlace(nt),rt},et.Distance=function(tt,nt){return Math.sqrt(et.DistanceSquared(tt,nt))},et.DistanceSquared=function(tt,nt){var rt=tt._x-nt._x,ot=tt._y-nt._y,st=tt._z-nt._z;return rt*rt+ot*ot+st*st},et.Center=function(tt,nt){var rt=tt.add(nt);return rt.scaleInPlace(.5),rt},et.RotationFromAxis=function(tt,nt,rt){var ot=et.Zero();return et.RotationFromAxisToRef(tt,nt,rt,ot),ot},et.RotationFromAxisToRef=function(tt,nt,rt,ot){var st=MathTmp.Quaternion[0];Quaternion.RotationQuaternionFromAxisToRef(tt,nt,rt,st),st.toEulerAnglesToRef(ot)},et._UpReadOnly=et.Up(),et._ZeroReadOnly=et.Zero(),et}(),Vector4=function(){function et(tt,nt,rt,ot){this.x=tt,this.y=nt,this.z=rt,this.w=ot}return et.prototype.toString=function(){return"{X: "+this.x+" Y:"+this.y+" Z:"+this.z+" W:"+this.w+"}"},et.prototype.getClassName=function(){return"Vector4"},et.prototype.getHashCode=function(){var tt=this.x|0;return tt=tt*397^(this.y|0),tt=tt*397^(this.z|0),tt=tt*397^(this.w|0),tt},et.prototype.asArray=function(){var tt=new Array;return this.toArray(tt,0),tt},et.prototype.toArray=function(tt,nt){return nt===void 0&&(nt=0),tt[nt]=this.x,tt[nt+1]=this.y,tt[nt+2]=this.z,tt[nt+3]=this.w,this},et.prototype.fromArray=function(tt,nt){return nt===void 0&&(nt=0),et.FromArrayToRef(tt,nt,this),this},et.prototype.addInPlace=function(tt){return this.x+=tt.x,this.y+=tt.y,this.z+=tt.z,this.w+=tt.w,this},et.prototype.add=function(tt){return new et(this.x+tt.x,this.y+tt.y,this.z+tt.z,this.w+tt.w)},et.prototype.addToRef=function(tt,nt){return nt.x=this.x+tt.x,nt.y=this.y+tt.y,nt.z=this.z+tt.z,nt.w=this.w+tt.w,this},et.prototype.subtractInPlace=function(tt){return this.x-=tt.x,this.y-=tt.y,this.z-=tt.z,this.w-=tt.w,this},et.prototype.subtract=function(tt){return new et(this.x-tt.x,this.y-tt.y,this.z-tt.z,this.w-tt.w)},et.prototype.subtractToRef=function(tt,nt){return nt.x=this.x-tt.x,nt.y=this.y-tt.y,nt.z=this.z-tt.z,nt.w=this.w-tt.w,this},et.prototype.subtractFromFloats=function(tt,nt,rt,ot){return new et(this.x-tt,this.y-nt,this.z-rt,this.w-ot)},et.prototype.subtractFromFloatsToRef=function(tt,nt,rt,ot,st){return st.x=this.x-tt,st.y=this.y-nt,st.z=this.z-rt,st.w=this.w-ot,this},et.prototype.negate=function(){return new et(-this.x,-this.y,-this.z,-this.w)},et.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.w*=-1,this},et.prototype.negateToRef=function(tt){return tt.copyFromFloats(this.x*-1,this.y*-1,this.z*-1,this.w*-1)},et.prototype.scaleInPlace=function(tt){return this.x*=tt,this.y*=tt,this.z*=tt,this.w*=tt,this},et.prototype.scale=function(tt){return new et(this.x*tt,this.y*tt,this.z*tt,this.w*tt)},et.prototype.scaleToRef=function(tt,nt){return nt.x=this.x*tt,nt.y=this.y*tt,nt.z=this.z*tt,nt.w=this.w*tt,this},et.prototype.scaleAndAddToRef=function(tt,nt){return nt.x+=this.x*tt,nt.y+=this.y*tt,nt.z+=this.z*tt,nt.w+=this.w*tt,this},et.prototype.equals=function(tt){return tt&&this.x===tt.x&&this.y===tt.y&&this.z===tt.z&&this.w===tt.w},et.prototype.equalsWithEpsilon=function(tt,nt){return nt===void 0&&(nt=Epsilon),tt&&Scalar.WithinEpsilon(this.x,tt.x,nt)&&Scalar.WithinEpsilon(this.y,tt.y,nt)&&Scalar.WithinEpsilon(this.z,tt.z,nt)&&Scalar.WithinEpsilon(this.w,tt.w,nt)},et.prototype.equalsToFloats=function(tt,nt,rt,ot){return this.x===tt&&this.y===nt&&this.z===rt&&this.w===ot},et.prototype.multiplyInPlace=function(tt){return this.x*=tt.x,this.y*=tt.y,this.z*=tt.z,this.w*=tt.w,this},et.prototype.multiply=function(tt){return new et(this.x*tt.x,this.y*tt.y,this.z*tt.z,this.w*tt.w)},et.prototype.multiplyToRef=function(tt,nt){return nt.x=this.x*tt.x,nt.y=this.y*tt.y,nt.z=this.z*tt.z,nt.w=this.w*tt.w,this},et.prototype.multiplyByFloats=function(tt,nt,rt,ot){return new et(this.x*tt,this.y*nt,this.z*rt,this.w*ot)},et.prototype.divide=function(tt){return new et(this.x/tt.x,this.y/tt.y,this.z/tt.z,this.w/tt.w)},et.prototype.divideToRef=function(tt,nt){return nt.x=this.x/tt.x,nt.y=this.y/tt.y,nt.z=this.z/tt.z,nt.w=this.w/tt.w,this},et.prototype.divideInPlace=function(tt){return this.divideToRef(tt,this)},et.prototype.minimizeInPlace=function(tt){return tt.x<this.x&&(this.x=tt.x),tt.y<this.y&&(this.y=tt.y),tt.z<this.z&&(this.z=tt.z),tt.w<this.w&&(this.w=tt.w),this},et.prototype.maximizeInPlace=function(tt){return tt.x>this.x&&(this.x=tt.x),tt.y>this.y&&(this.y=tt.y),tt.z>this.z&&(this.z=tt.z),tt.w>this.w&&(this.w=tt.w),this},et.prototype.floor=function(){return new et(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},et.prototype.fract=function(){return new et(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},et.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},et.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},et.prototype.normalize=function(){var tt=this.length();return tt===0?this:this.scaleInPlace(1/tt)},et.prototype.toVector3=function(){return new Vector3(this.x,this.y,this.z)},et.prototype.clone=function(){return new et(this.x,this.y,this.z,this.w)},et.prototype.copyFrom=function(tt){return this.x=tt.x,this.y=tt.y,this.z=tt.z,this.w=tt.w,this},et.prototype.copyFromFloats=function(tt,nt,rt,ot){return this.x=tt,this.y=nt,this.z=rt,this.w=ot,this},et.prototype.set=function(tt,nt,rt,ot){return this.copyFromFloats(tt,nt,rt,ot)},et.prototype.setAll=function(tt){return this.x=this.y=this.z=this.w=tt,this},et.FromArray=function(tt,nt){return nt||(nt=0),new et(tt[nt],tt[nt+1],tt[nt+2],tt[nt+3])},et.FromArrayToRef=function(tt,nt,rt){rt.x=tt[nt],rt.y=tt[nt+1],rt.z=tt[nt+2],rt.w=tt[nt+3]},et.FromFloatArrayToRef=function(tt,nt,rt){et.FromArrayToRef(tt,nt,rt)},et.FromFloatsToRef=function(tt,nt,rt,ot,st){st.x=tt,st.y=nt,st.z=rt,st.w=ot},et.Zero=function(){return new et(0,0,0,0)},et.One=function(){return new et(1,1,1,1)},et.Normalize=function(tt){var nt=et.Zero();return et.NormalizeToRef(tt,nt),nt},et.NormalizeToRef=function(tt,nt){nt.copyFrom(tt),nt.normalize()},et.Minimize=function(tt,nt){var rt=tt.clone();return rt.minimizeInPlace(nt),rt},et.Maximize=function(tt,nt){var rt=tt.clone();return rt.maximizeInPlace(nt),rt},et.Distance=function(tt,nt){return Math.sqrt(et.DistanceSquared(tt,nt))},et.DistanceSquared=function(tt,nt){var rt=tt.x-nt.x,ot=tt.y-nt.y,st=tt.z-nt.z,ut=tt.w-nt.w;return rt*rt+ot*ot+st*st+ut*ut},et.Center=function(tt,nt){var rt=tt.add(nt);return rt.scaleInPlace(.5),rt},et.TransformNormal=function(tt,nt){var rt=et.Zero();return et.TransformNormalToRef(tt,nt,rt),rt},et.TransformNormalToRef=function(tt,nt,rt){var ot=nt.m,st=tt.x*ot[0]+tt.y*ot[4]+tt.z*ot[8],ut=tt.x*ot[1]+tt.y*ot[5]+tt.z*ot[9],ct=tt.x*ot[2]+tt.y*ot[6]+tt.z*ot[10];rt.x=st,rt.y=ut,rt.z=ct,rt.w=tt.w},et.TransformNormalFromFloatsToRef=function(tt,nt,rt,ot,st,ut){var ct=st.m;ut.x=tt*ct[0]+nt*ct[4]+rt*ct[8],ut.y=tt*ct[1]+nt*ct[5]+rt*ct[9],ut.z=tt*ct[2]+nt*ct[6]+rt*ct[10],ut.w=ot},et.FromVector3=function(tt,nt){return nt===void 0&&(nt=0),new et(tt._x,tt._y,tt._z,nt)},et}(),Quaternion=function(){function et(tt,nt,rt,ot){tt===void 0&&(tt=0),nt===void 0&&(nt=0),rt===void 0&&(rt=0),ot===void 0&&(ot=1),this._isDirty=!0,this._x=tt,this._y=nt,this._z=rt,this._w=ot}return Object.defineProperty(et.prototype,"x",{get:function(){return this._x},set:function(tt){this._x=tt,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"y",{get:function(){return this._y},set:function(tt){this._y=tt,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"z",{get:function(){return this._z},set:function(tt){this._z=tt,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"w",{get:function(){return this._w},set:function(tt){this._w=tt,this._isDirty=!0},enumerable:!1,configurable:!0}),et.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+" W:"+this._w+"}"},et.prototype.getClassName=function(){return"Quaternion"},et.prototype.getHashCode=function(){var tt=this._x|0;return tt=tt*397^(this._y|0),tt=tt*397^(this._z|0),tt=tt*397^(this._w|0),tt},et.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},et.prototype.equals=function(tt){return tt&&this._x===tt._x&&this._y===tt._y&&this._z===tt._z&&this._w===tt._w},et.prototype.equalsWithEpsilon=function(tt,nt){return nt===void 0&&(nt=Epsilon),tt&&Scalar.WithinEpsilon(this._x,tt._x,nt)&&Scalar.WithinEpsilon(this._y,tt._y,nt)&&Scalar.WithinEpsilon(this._z,tt._z,nt)&&Scalar.WithinEpsilon(this._w,tt._w,nt)},et.prototype.clone=function(){return new et(this._x,this._y,this._z,this._w)},et.prototype.copyFrom=function(tt){return this.x=tt._x,this.y=tt._y,this.z=tt._z,this.w=tt._w,this},et.prototype.copyFromFloats=function(tt,nt,rt,ot){return this.x=tt,this.y=nt,this.z=rt,this.w=ot,this},et.prototype.set=function(tt,nt,rt,ot){return this.copyFromFloats(tt,nt,rt,ot)},et.prototype.add=function(tt){return new et(this._x+tt._x,this._y+tt._y,this._z+tt._z,this._w+tt._w)},et.prototype.addInPlace=function(tt){return this._x+=tt._x,this._y+=tt._y,this._z+=tt._z,this._w+=tt._w,this},et.prototype.subtract=function(tt){return new et(this._x-tt._x,this._y-tt._y,this._z-tt._z,this._w-tt._w)},et.prototype.scale=function(tt){return new et(this._x*tt,this._y*tt,this._z*tt,this._w*tt)},et.prototype.scaleToRef=function(tt,nt){return nt.x=this._x*tt,nt.y=this._y*tt,nt.z=this._z*tt,nt.w=this._w*tt,this},et.prototype.scaleInPlace=function(tt){return this.x*=tt,this.y*=tt,this.z*=tt,this.w*=tt,this},et.prototype.scaleAndAddToRef=function(tt,nt){return nt.x+=this._x*tt,nt.y+=this._y*tt,nt.z+=this._z*tt,nt.w+=this._w*tt,this},et.prototype.multiply=function(tt){var nt=new et(0,0,0,1);return this.multiplyToRef(tt,nt),nt},et.prototype.multiplyToRef=function(tt,nt){var rt=this._x*tt._w+this._y*tt._z-this._z*tt._y+this._w*tt._x,ot=-this._x*tt._z+this._y*tt._w+this._z*tt._x+this._w*tt._y,st=this._x*tt._y-this._y*tt._x+this._z*tt._w+this._w*tt._z,ut=-this._x*tt._x-this._y*tt._y-this._z*tt._z+this._w*tt._w;return nt.copyFromFloats(rt,ot,st,ut),this},et.prototype.multiplyInPlace=function(tt){return this.multiplyToRef(tt,this),this},et.prototype.conjugateToRef=function(tt){return tt.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},et.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},et.prototype.conjugate=function(){var tt=new et(-this._x,-this._y,-this._z,this._w);return tt},et.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},et.prototype.normalize=function(){var tt=this.length();if(tt===0)return this;var nt=1/tt;return this.x*=nt,this.y*=nt,this.z*=nt,this.w*=nt,this},et.prototype.toEulerAngles=function(tt){var nt=Vector3.Zero();return this.toEulerAnglesToRef(nt),nt},et.prototype.toEulerAnglesToRef=function(tt){var nt=this._z,rt=this._x,ot=this._y,st=this._w,ut=st*st,ct=nt*nt,ft=rt*rt,pt=ot*ot,ht=ot*nt-rt*st,mt=.4999999;return ht<-mt?(tt.y=2*Math.atan2(ot,st),tt.x=Math.PI/2,tt.z=0):ht>mt?(tt.y=2*Math.atan2(ot,st),tt.x=-Math.PI/2,tt.z=0):(tt.z=Math.atan2(2*(rt*ot+nt*st),-ct-ft+pt+ut),tt.x=Math.asin(-2*(nt*ot-rt*st)),tt.y=Math.atan2(2*(nt*rt+ot*st),ct-ft-pt+ut)),this},et.prototype.toRotationMatrix=function(tt){return Matrix.FromQuaternionToRef(this,tt),this},et.prototype.fromRotationMatrix=function(tt){return et.FromRotationMatrixToRef(tt,this),this},et.FromRotationMatrix=function(tt){var nt=new et;return et.FromRotationMatrixToRef(tt,nt),nt},et.FromRotationMatrixToRef=function(tt,nt){var rt=tt.m,ot=rt[0],st=rt[4],ut=rt[8],ct=rt[1],ft=rt[5],pt=rt[9],ht=rt[2],mt=rt[6],yt=rt[10],vt=ot+ft+yt,Tt;vt>0?(Tt=.5/Math.sqrt(vt+1),nt.w=.25/Tt,nt.x=(mt-pt)*Tt,nt.y=(ut-ht)*Tt,nt.z=(ct-st)*Tt):ot>ft&&ot>yt?(Tt=2*Math.sqrt(1+ot-ft-yt),nt.w=(mt-pt)/Tt,nt.x=.25*Tt,nt.y=(st+ct)/Tt,nt.z=(ut+ht)/Tt):ft>yt?(Tt=2*Math.sqrt(1+ft-ot-yt),nt.w=(ut-ht)/Tt,nt.x=(st+ct)/Tt,nt.y=.25*Tt,nt.z=(pt+mt)/Tt):(Tt=2*Math.sqrt(1+yt-ot-ft),nt.w=(ct-st)/Tt,nt.x=(ut+ht)/Tt,nt.y=(pt+mt)/Tt,nt.z=.25*Tt)},et.Dot=function(tt,nt){return tt._x*nt._x+tt._y*nt._y+tt._z*nt._z+tt._w*nt._w},et.AreClose=function(tt,nt){var rt=et.Dot(tt,nt);return rt>=0},et.Zero=function(){return new et(0,0,0,0)},et.Inverse=function(tt){return new et(-tt._x,-tt._y,-tt._z,tt._w)},et.InverseToRef=function(tt,nt){return nt.set(-tt._x,-tt._y,-tt._z,tt._w),nt},et.Identity=function(){return new et(0,0,0,1)},et.IsIdentity=function(tt){return tt&&tt._x===0&&tt._y===0&&tt._z===0&&tt._w===1},et.RotationAxis=function(tt,nt){return et.RotationAxisToRef(tt,nt,new et)},et.RotationAxisToRef=function(tt,nt,rt){var ot=Math.sin(nt/2);return tt.normalize(),rt.w=Math.cos(nt/2),rt.x=tt._x*ot,rt.y=tt._y*ot,rt.z=tt._z*ot,rt},et.FromArray=function(tt,nt){return nt||(nt=0),new et(tt[nt],tt[nt+1],tt[nt+2],tt[nt+3])},et.FromArrayToRef=function(tt,nt,rt){rt.x=tt[nt],rt.y=tt[nt+1],rt.z=tt[nt+2],rt.w=tt[nt+3]},et.FromEulerAngles=function(tt,nt,rt){var ot=new et;return et.RotationYawPitchRollToRef(nt,tt,rt,ot),ot},et.FromEulerAnglesToRef=function(tt,nt,rt,ot){return et.RotationYawPitchRollToRef(nt,tt,rt,ot),ot},et.FromEulerVector=function(tt){var nt=new et;return et.RotationYawPitchRollToRef(tt._y,tt._x,tt._z,nt),nt},et.FromEulerVectorToRef=function(tt,nt){return et.RotationYawPitchRollToRef(tt._y,tt._x,tt._z,nt),nt},et.RotationYawPitchRoll=function(tt,nt,rt){var ot=new et;return et.RotationYawPitchRollToRef(tt,nt,rt,ot),ot},et.RotationYawPitchRollToRef=function(tt,nt,rt,ot){var st=rt*.5,ut=nt*.5,ct=tt*.5,ft=Math.sin(st),pt=Math.cos(st),ht=Math.sin(ut),mt=Math.cos(ut),yt=Math.sin(ct),vt=Math.cos(ct);ot.x=vt*ht*pt+yt*mt*ft,ot.y=yt*mt*pt-vt*ht*ft,ot.z=vt*mt*ft-yt*ht*pt,ot.w=vt*mt*pt+yt*ht*ft},et.RotationAlphaBetaGamma=function(tt,nt,rt){var ot=new et;return et.RotationAlphaBetaGammaToRef(tt,nt,rt,ot),ot},et.RotationAlphaBetaGammaToRef=function(tt,nt,rt,ot){var st=(rt+tt)*.5,ut=(rt-tt)*.5,ct=nt*.5;ot.x=Math.cos(ut)*Math.sin(ct),ot.y=Math.sin(ut)*Math.sin(ct),ot.z=Math.sin(st)*Math.cos(ct),ot.w=Math.cos(st)*Math.cos(ct)},et.RotationQuaternionFromAxis=function(tt,nt,rt){var ot=new et(0,0,0,0);return et.RotationQuaternionFromAxisToRef(tt,nt,rt,ot),ot},et.RotationQuaternionFromAxisToRef=function(tt,nt,rt,ot){var st=MathTmp.Matrix[0];Matrix.FromXYZAxesToRef(tt.normalize(),nt.normalize(),rt.normalize(),st),et.FromRotationMatrixToRef(st,ot)},et.Slerp=function(tt,nt,rt){var ot=et.Identity();return et.SlerpToRef(tt,nt,rt,ot),ot},et.SlerpToRef=function(tt,nt,rt,ot){var st,ut,ct=tt._x*nt._x+tt._y*nt._y+tt._z*nt._z+tt._w*nt._w,ft=!1;if(ct<0&&(ft=!0,ct=-ct),ct>.999999)ut=1-rt,st=ft?-rt:rt;else{var pt=Math.acos(ct),ht=1/Math.sin(pt);ut=Math.sin((1-rt)*pt)*ht,st=ft?-Math.sin(rt*pt)*ht:Math.sin(rt*pt)*ht}ot.x=ut*tt._x+st*nt._x,ot.y=ut*tt._y+st*nt._y,ot.z=ut*tt._z+st*nt._z,ot.w=ut*tt._w+st*nt._w},et.Hermite=function(tt,nt,rt,ot,st){var ut=st*st,ct=st*ut,ft=2*ct-3*ut+1,pt=-2*ct+3*ut,ht=ct-2*ut+st,mt=ct-ut,yt=tt._x*ft+rt._x*pt+nt._x*ht+ot._x*mt,vt=tt._y*ft+rt._y*pt+nt._y*ht+ot._y*mt,Tt=tt._z*ft+rt._z*pt+nt._z*ht+ot._z*mt,Et=tt._w*ft+rt._w*pt+nt._w*ht+ot._w*mt;return new et(yt,vt,Tt,Et)},et}(),Matrix=function(){function et(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,PerformanceConfigurator.MatrixTrackPrecisionChange&&PerformanceConfigurator.MatrixTrackedMatrices.push(this),this._m=new PerformanceConfigurator.MatrixCurrentType(16),this._updateIdentityStatus(!1)}return Object.defineProperty(et,"Use64Bits",{get:function(){return PerformanceConfigurator.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),et.prototype._markAsUpdated=function(){this.updateFlag=et._updateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},et.prototype._updateIdentityStatus=function(tt,nt,rt,ot){nt===void 0&&(nt=!1),rt===void 0&&(rt=!1),ot===void 0&&(ot=!0),this.updateFlag=et._updateFlagSeed++,this._isIdentity=tt,this._isIdentity3x2=tt||rt,this._isIdentityDirty=this._isIdentity?!1:nt,this._isIdentity3x2Dirty=this._isIdentity3x2?!1:ot},et.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var tt=this._m;this._isIdentity=tt[0]===1&&tt[1]===0&&tt[2]===0&&tt[3]===0&&tt[4]===0&&tt[5]===1&&tt[6]===0&&tt[7]===0&&tt[8]===0&&tt[9]===0&&tt[10]===1&&tt[11]===0&&tt[12]===0&&tt[13]===0&&tt[14]===0&&tt[15]===1}return this._isIdentity},et.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,this._m[0]!==1||this._m[5]!==1||this._m[15]!==1?this._isIdentity3x2=!1:this._m[1]!==0||this._m[2]!==0||this._m[3]!==0||this._m[4]!==0||this._m[6]!==0||this._m[7]!==0||this._m[8]!==0||this._m[9]!==0||this._m[10]!==0||this._m[11]!==0||this._m[12]!==0||this._m[13]!==0||this._m[14]!==0?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},et.prototype.determinant=function(){if(this._isIdentity===!0)return 1;var tt=this._m,nt=tt[0],rt=tt[1],ot=tt[2],st=tt[3],ut=tt[4],ct=tt[5],ft=tt[6],pt=tt[7],ht=tt[8],mt=tt[9],yt=tt[10],vt=tt[11],Tt=tt[12],Et=tt[13],xt=tt[14],At=tt[15],Ct=yt*At-xt*vt,$t=mt*At-Et*vt,Ot=mt*xt-Et*yt,Rt=ht*At-Tt*vt,It=ht*xt-yt*Tt,kt=ht*Et-Tt*mt,Mt=+(ct*Ct-ft*$t+pt*Ot),Ft=-(ut*Ct-ft*Rt+pt*It),zt=+(ut*$t-ct*Rt+pt*kt),Vt=-(ut*Ot-ct*It+ft*kt);return nt*Mt+rt*Ft+ot*zt+st*Vt},et.prototype.toArray=function(){return this._m},et.prototype.asArray=function(){return this._m},et.prototype.invert=function(){return this.invertToRef(this),this},et.prototype.reset=function(){return et.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},et.prototype.add=function(tt){var nt=new et;return this.addToRef(tt,nt),nt},et.prototype.addToRef=function(tt,nt){for(var rt=this._m,ot=nt._m,st=tt.m,ut=0;ut<16;ut++)ot[ut]=rt[ut]+st[ut];return nt._markAsUpdated(),this},et.prototype.addToSelf=function(tt){for(var nt=this._m,rt=tt.m,ot=0;ot<16;ot++)nt[ot]+=rt[ot];return this._markAsUpdated(),this},et.prototype.invertToRef=function(tt){if(this._isIdentity===!0)return et.IdentityToRef(tt),this;var nt=this._m,rt=nt[0],ot=nt[1],st=nt[2],ut=nt[3],ct=nt[4],ft=nt[5],pt=nt[6],ht=nt[7],mt=nt[8],yt=nt[9],vt=nt[10],Tt=nt[11],Et=nt[12],xt=nt[13],At=nt[14],Ct=nt[15],$t=vt*Ct-At*Tt,Ot=yt*Ct-xt*Tt,Rt=yt*At-xt*vt,It=mt*Ct-Et*Tt,kt=mt*At-vt*Et,Mt=mt*xt-Et*yt,Ft=+(ft*$t-pt*Ot+ht*Rt),zt=-(ct*$t-pt*It+ht*kt),Vt=+(ct*Ot-ft*It+ht*Mt),Zt=-(ct*Rt-ft*kt+pt*Mt),Ut=rt*Ft+ot*zt+st*Vt+ut*Zt;if(Ut===0)return tt.copyFrom(this),this;var Xt=1/Ut,Jt=pt*Ct-At*ht,gn=ft*Ct-xt*ht,An=ft*At-xt*pt,sn=ct*Ct-Et*ht,Sn=ct*At-Et*pt,In=ct*xt-Et*ft,_n=pt*Tt-vt*ht,En=ft*Tt-yt*ht,Ln=ft*vt-yt*pt,wn=ct*Tt-mt*ht,Dn=ct*vt-mt*pt,$n=ct*yt-mt*ft,Gn=-(ot*$t-st*Ot+ut*Rt),Jn=+(rt*$t-st*It+ut*kt),zn=-(rt*Ot-ot*It+ut*Mt),Qn=+(rt*Rt-ot*kt+st*Mt),Bn=+(ot*Jt-st*gn+ut*An),jn=-(rt*Jt-st*sn+ut*Sn),Ar=+(rt*gn-ot*sn+ut*In),Er=-(rt*An-ot*Sn+st*In),Pr=-(ot*_n-st*En+ut*Ln),Nr=+(rt*_n-st*wn+ut*Dn),Ir=-(rt*En-ot*wn+ut*$n),no=+(rt*Ln-ot*Dn+st*$n);return et.FromValuesToRef(Ft*Xt,Gn*Xt,Bn*Xt,Pr*Xt,zt*Xt,Jn*Xt,jn*Xt,Nr*Xt,Vt*Xt,zn*Xt,Ar*Xt,Ir*Xt,Zt*Xt,Qn*Xt,Er*Xt,no*Xt,tt),this},et.prototype.addAtIndex=function(tt,nt){return this._m[tt]+=nt,this._markAsUpdated(),this},et.prototype.multiplyAtIndex=function(tt,nt){return this._m[tt]*=nt,this._markAsUpdated(),this},et.prototype.setTranslationFromFloats=function(tt,nt,rt){return this._m[12]=tt,this._m[13]=nt,this._m[14]=rt,this._markAsUpdated(),this},et.prototype.addTranslationFromFloats=function(tt,nt,rt){return this._m[12]+=tt,this._m[13]+=nt,this._m[14]+=rt,this._markAsUpdated(),this},et.prototype.setTranslation=function(tt){return this.setTranslationFromFloats(tt._x,tt._y,tt._z)},et.prototype.getTranslation=function(){return new Vector3(this._m[12],this._m[13],this._m[14])},et.prototype.getTranslationToRef=function(tt){return tt.x=this._m[12],tt.y=this._m[13],tt.z=this._m[14],this},et.prototype.removeRotationAndScaling=function(){var tt=this.m;return et.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,tt[12],tt[13],tt[14],tt[15],this),this._updateIdentityStatus(tt[12]===0&&tt[13]===0&&tt[14]===0&&tt[15]===1),this},et.prototype.multiply=function(tt){var nt=new et;return this.multiplyToRef(tt,nt),nt},et.prototype.copyFrom=function(tt){tt.copyToArray(this._m);var nt=tt;return this._updateIdentityStatus(nt._isIdentity,nt._isIdentityDirty,nt._isIdentity3x2,nt._isIdentity3x2Dirty),this},et.prototype.copyToArray=function(tt,nt){nt===void 0&&(nt=0);var rt=this._m;return tt[nt]=rt[0],tt[nt+1]=rt[1],tt[nt+2]=rt[2],tt[nt+3]=rt[3],tt[nt+4]=rt[4],tt[nt+5]=rt[5],tt[nt+6]=rt[6],tt[nt+7]=rt[7],tt[nt+8]=rt[8],tt[nt+9]=rt[9],tt[nt+10]=rt[10],tt[nt+11]=rt[11],tt[nt+12]=rt[12],tt[nt+13]=rt[13],tt[nt+14]=rt[14],tt[nt+15]=rt[15],this},et.prototype.multiplyToRef=function(tt,nt){return this._isIdentity?(nt.copyFrom(tt),this):tt._isIdentity?(nt.copyFrom(this),this):(this.multiplyToArray(tt,nt._m,0),nt._markAsUpdated(),this)},et.prototype.multiplyToArray=function(tt,nt,rt){var ot=this._m,st=tt.m,ut=ot[0],ct=ot[1],ft=ot[2],pt=ot[3],ht=ot[4],mt=ot[5],yt=ot[6],vt=ot[7],Tt=ot[8],Et=ot[9],xt=ot[10],At=ot[11],Ct=ot[12],$t=ot[13],Ot=ot[14],Rt=ot[15],It=st[0],kt=st[1],Mt=st[2],Ft=st[3],zt=st[4],Vt=st[5],Zt=st[6],Ut=st[7],Xt=st[8],Jt=st[9],gn=st[10],An=st[11],sn=st[12],Sn=st[13],In=st[14],_n=st[15];return nt[rt]=ut*It+ct*zt+ft*Xt+pt*sn,nt[rt+1]=ut*kt+ct*Vt+ft*Jt+pt*Sn,nt[rt+2]=ut*Mt+ct*Zt+ft*gn+pt*In,nt[rt+3]=ut*Ft+ct*Ut+ft*An+pt*_n,nt[rt+4]=ht*It+mt*zt+yt*Xt+vt*sn,nt[rt+5]=ht*kt+mt*Vt+yt*Jt+vt*Sn,nt[rt+6]=ht*Mt+mt*Zt+yt*gn+vt*In,nt[rt+7]=ht*Ft+mt*Ut+yt*An+vt*_n,nt[rt+8]=Tt*It+Et*zt+xt*Xt+At*sn,nt[rt+9]=Tt*kt+Et*Vt+xt*Jt+At*Sn,nt[rt+10]=Tt*Mt+Et*Zt+xt*gn+At*In,nt[rt+11]=Tt*Ft+Et*Ut+xt*An+At*_n,nt[rt+12]=Ct*It+$t*zt+Ot*Xt+Rt*sn,nt[rt+13]=Ct*kt+$t*Vt+Ot*Jt+Rt*Sn,nt[rt+14]=Ct*Mt+$t*Zt+Ot*gn+Rt*In,nt[rt+15]=Ct*Ft+$t*Ut+Ot*An+Rt*_n,this},et.prototype.equals=function(tt){var nt=tt;if(!nt)return!1;if((this._isIdentity||nt._isIdentity)&&!this._isIdentityDirty&&!nt._isIdentityDirty)return this._isIdentity&&nt._isIdentity;var rt=this.m,ot=nt.m;return rt[0]===ot[0]&&rt[1]===ot[1]&&rt[2]===ot[2]&&rt[3]===ot[3]&&rt[4]===ot[4]&&rt[5]===ot[5]&&rt[6]===ot[6]&&rt[7]===ot[7]&&rt[8]===ot[8]&&rt[9]===ot[9]&&rt[10]===ot[10]&&rt[11]===ot[11]&&rt[12]===ot[12]&&rt[13]===ot[13]&&rt[14]===ot[14]&&rt[15]===ot[15]},et.prototype.clone=function(){var tt=new et;return tt.copyFrom(this),tt},et.prototype.getClassName=function(){return"Matrix"},et.prototype.getHashCode=function(){for(var tt=this._m[0]|0,nt=1;nt<16;nt++)tt=tt*397^(this._m[nt]|0);return tt},et.prototype.decompose=function(tt,nt,rt){if(this._isIdentity)return rt&&rt.setAll(0),tt&&tt.setAll(1),nt&&nt.copyFromFloats(0,0,0,1),!0;var ot=this._m;if(rt&&rt.copyFromFloats(ot[12],ot[13],ot[14]),tt=tt||MathTmp.Vector3[0],tt.x=Math.sqrt(ot[0]*ot[0]+ot[1]*ot[1]+ot[2]*ot[2]),tt.y=Math.sqrt(ot[4]*ot[4]+ot[5]*ot[5]+ot[6]*ot[6]),tt.z=Math.sqrt(ot[8]*ot[8]+ot[9]*ot[9]+ot[10]*ot[10]),this.determinant()<=0&&(tt.y*=-1),tt._x===0||tt._y===0||tt._z===0)return nt&&nt.copyFromFloats(0,0,0,1),!1;if(nt){var st=1/tt._x,ut=1/tt._y,ct=1/tt._z;et.FromValuesToRef(ot[0]*st,ot[1]*st,ot[2]*st,0,ot[4]*ut,ot[5]*ut,ot[6]*ut,0,ot[8]*ct,ot[9]*ct,ot[10]*ct,0,0,0,0,1,MathTmp.Matrix[0]),Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0],nt)}return!0},et.prototype.getRow=function(tt){if(tt<0||tt>3)return null;var nt=tt*4;return new Vector4(this._m[nt+0],this._m[nt+1],this._m[nt+2],this._m[nt+3])},et.prototype.setRow=function(tt,nt){return this.setRowFromFloats(tt,nt.x,nt.y,nt.z,nt.w)},et.prototype.transpose=function(){return et.Transpose(this)},et.prototype.transposeToRef=function(tt){return et.TransposeToRef(this,tt),this},et.prototype.setRowFromFloats=function(tt,nt,rt,ot,st){if(tt<0||tt>3)return this;var ut=tt*4;return this._m[ut+0]=nt,this._m[ut+1]=rt,this._m[ut+2]=ot,this._m[ut+3]=st,this._markAsUpdated(),this},et.prototype.scale=function(tt){var nt=new et;return this.scaleToRef(tt,nt),nt},et.prototype.scaleToRef=function(tt,nt){for(var rt=0;rt<16;rt++)nt._m[rt]=this._m[rt]*tt;return nt._markAsUpdated(),this},et.prototype.scaleAndAddToRef=function(tt,nt){for(var rt=0;rt<16;rt++)nt._m[rt]+=this._m[rt]*tt;return nt._markAsUpdated(),this},et.prototype.toNormalMatrix=function(tt){var nt=MathTmp.Matrix[0];this.invertToRef(nt),nt.transposeToRef(tt);var rt=tt._m;et.FromValuesToRef(rt[0],rt[1],rt[2],0,rt[4],rt[5],rt[6],0,rt[8],rt[9],rt[10],0,0,0,0,1,tt)},et.prototype.getRotationMatrix=function(){var tt=new et;return this.getRotationMatrixToRef(tt),tt},et.prototype.getRotationMatrixToRef=function(tt){var nt=MathTmp.Vector3[0];if(!this.decompose(nt))return et.IdentityToRef(tt),this;var rt=this._m,ot=1/nt._x,st=1/nt._y,ut=1/nt._z;return et.FromValuesToRef(rt[0]*ot,rt[1]*ot,rt[2]*ot,0,rt[4]*st,rt[5]*st,rt[6]*st,0,rt[8]*ut,rt[9]*ut,rt[10]*ut,0,0,0,0,1,tt),this},et.prototype.toggleModelMatrixHandInPlace=function(){var tt=this._m;tt[2]*=-1,tt[6]*=-1,tt[8]*=-1,tt[9]*=-1,tt[14]*=-1,this._markAsUpdated()},et.prototype.toggleProjectionMatrixHandInPlace=function(){var tt=this._m;tt[8]*=-1,tt[9]*=-1,tt[10]*=-1,tt[11]*=-1,this._markAsUpdated()},et.FromArray=function(tt,nt){nt===void 0&&(nt=0);var rt=new et;return et.FromArrayToRef(tt,nt,rt),rt},et.FromArrayToRef=function(tt,nt,rt){for(var ot=0;ot<16;ot++)rt._m[ot]=tt[ot+nt];rt._markAsUpdated()},et.FromFloat32ArrayToRefScaled=function(tt,nt,rt,ot){for(var st=0;st<16;st++)ot._m[st]=tt[st+nt]*rt;ot._markAsUpdated()},Object.defineProperty(et,"IdentityReadOnly",{get:function(){return et._identityReadOnly},enumerable:!1,configurable:!0}),et.FromValuesToRef=function(tt,nt,rt,ot,st,ut,ct,ft,pt,ht,mt,yt,vt,Tt,Et,xt,At){var Ct=At._m;Ct[0]=tt,Ct[1]=nt,Ct[2]=rt,Ct[3]=ot,Ct[4]=st,Ct[5]=ut,Ct[6]=ct,Ct[7]=ft,Ct[8]=pt,Ct[9]=ht,Ct[10]=mt,Ct[11]=yt,Ct[12]=vt,Ct[13]=Tt,Ct[14]=Et,Ct[15]=xt,At._markAsUpdated()},et.FromValues=function(tt,nt,rt,ot,st,ut,ct,ft,pt,ht,mt,yt,vt,Tt,Et,xt){var At=new et,Ct=At._m;return Ct[0]=tt,Ct[1]=nt,Ct[2]=rt,Ct[3]=ot,Ct[4]=st,Ct[5]=ut,Ct[6]=ct,Ct[7]=ft,Ct[8]=pt,Ct[9]=ht,Ct[10]=mt,Ct[11]=yt,Ct[12]=vt,Ct[13]=Tt,Ct[14]=Et,Ct[15]=xt,At._markAsUpdated(),At},et.Compose=function(tt,nt,rt){var ot=new et;return et.ComposeToRef(tt,nt,rt,ot),ot},et.ComposeToRef=function(tt,nt,rt,ot){var st=ot._m,ut=nt._x,ct=nt._y,ft=nt._z,pt=nt._w,ht=ut+ut,mt=ct+ct,yt=ft+ft,vt=ut*ht,Tt=ut*mt,Et=ut*yt,xt=ct*mt,At=ct*yt,Ct=ft*yt,$t=pt*ht,Ot=pt*mt,Rt=pt*yt,It=tt._x,kt=tt._y,Mt=tt._z;st[0]=(1-(xt+Ct))*It,st[1]=(Tt+Rt)*It,st[2]=(Et-Ot)*It,st[3]=0,st[4]=(Tt-Rt)*kt,st[5]=(1-(vt+Ct))*kt,st[6]=(At+$t)*kt,st[7]=0,st[8]=(Et+Ot)*Mt,st[9]=(At-$t)*Mt,st[10]=(1-(vt+xt))*Mt,st[11]=0,st[12]=rt._x,st[13]=rt._y,st[14]=rt._z,st[15]=1,ot._markAsUpdated()},et.Identity=function(){var tt=et.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return tt._updateIdentityStatus(!0),tt},et.IdentityToRef=function(tt){et.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,tt),tt._updateIdentityStatus(!0)},et.Zero=function(){var tt=et.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return tt._updateIdentityStatus(!1),tt},et.RotationX=function(tt){var nt=new et;return et.RotationXToRef(tt,nt),nt},et.Invert=function(tt){var nt=new et;return tt.invertToRef(nt),nt},et.RotationXToRef=function(tt,nt){var rt=Math.sin(tt),ot=Math.cos(tt);et.FromValuesToRef(1,0,0,0,0,ot,rt,0,0,-rt,ot,0,0,0,0,1,nt),nt._updateIdentityStatus(ot===1&&rt===0)},et.RotationY=function(tt){var nt=new et;return et.RotationYToRef(tt,nt),nt},et.RotationYToRef=function(tt,nt){var rt=Math.sin(tt),ot=Math.cos(tt);et.FromValuesToRef(ot,0,-rt,0,0,1,0,0,rt,0,ot,0,0,0,0,1,nt),nt._updateIdentityStatus(ot===1&&rt===0)},et.RotationZ=function(tt){var nt=new et;return et.RotationZToRef(tt,nt),nt},et.RotationZToRef=function(tt,nt){var rt=Math.sin(tt),ot=Math.cos(tt);et.FromValuesToRef(ot,rt,0,0,-rt,ot,0,0,0,0,1,0,0,0,0,1,nt),nt._updateIdentityStatus(ot===1&&rt===0)},et.RotationAxis=function(tt,nt){var rt=new et;return et.RotationAxisToRef(tt,nt,rt),rt},et.RotationAxisToRef=function(tt,nt,rt){var ot=Math.sin(-nt),st=Math.cos(-nt),ut=1-st;tt.normalize();var ct=rt._m;ct[0]=tt._x*tt._x*ut+st,ct[1]=tt._x*tt._y*ut-tt._z*ot,ct[2]=tt._x*tt._z*ut+tt._y*ot,ct[3]=0,ct[4]=tt._y*tt._x*ut+tt._z*ot,ct[5]=tt._y*tt._y*ut+st,ct[6]=tt._y*tt._z*ut-tt._x*ot,ct[7]=0,ct[8]=tt._z*tt._x*ut-tt._y*ot,ct[9]=tt._z*tt._y*ut+tt._x*ot,ct[10]=tt._z*tt._z*ut+st,ct[11]=0,ct[12]=0,ct[13]=0,ct[14]=0,ct[15]=1,rt._markAsUpdated()},et.RotationAlignToRef=function(tt,nt,rt){var ot=Vector3.Cross(nt,tt),st=Vector3.Dot(nt,tt),ut=1/(1+st),ct=rt._m;ct[0]=ot._x*ot._x*ut+st,ct[1]=ot._y*ot._x*ut-ot._z,ct[2]=ot._z*ot._x*ut+ot._y,ct[3]=0,ct[4]=ot._x*ot._y*ut+ot._z,ct[5]=ot._y*ot._y*ut+st,ct[6]=ot._z*ot._y*ut-ot._x,ct[7]=0,ct[8]=ot._x*ot._z*ut-ot._y,ct[9]=ot._y*ot._z*ut+ot._x,ct[10]=ot._z*ot._z*ut+st,ct[11]=0,ct[12]=0,ct[13]=0,ct[14]=0,ct[15]=1,rt._markAsUpdated()},et.RotationYawPitchRoll=function(tt,nt,rt){var ot=new et;return et.RotationYawPitchRollToRef(tt,nt,rt,ot),ot},et.RotationYawPitchRollToRef=function(tt,nt,rt,ot){Quaternion.RotationYawPitchRollToRef(tt,nt,rt,MathTmp.Quaternion[0]),MathTmp.Quaternion[0].toRotationMatrix(ot)},et.Scaling=function(tt,nt,rt){var ot=new et;return et.ScalingToRef(tt,nt,rt,ot),ot},et.ScalingToRef=function(tt,nt,rt,ot){et.FromValuesToRef(tt,0,0,0,0,nt,0,0,0,0,rt,0,0,0,0,1,ot),ot._updateIdentityStatus(tt===1&&nt===1&&rt===1)},et.Translation=function(tt,nt,rt){var ot=new et;return et.TranslationToRef(tt,nt,rt,ot),ot},et.TranslationToRef=function(tt,nt,rt,ot){et.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,tt,nt,rt,1,ot),ot._updateIdentityStatus(tt===0&&nt===0&&rt===0)},et.Lerp=function(tt,nt,rt){var ot=new et;return et.LerpToRef(tt,nt,rt,ot),ot},et.LerpToRef=function(tt,nt,rt,ot){for(var st=ot._m,ut=tt.m,ct=nt.m,ft=0;ft<16;ft++)st[ft]=ut[ft]*(1-rt)+ct[ft]*rt;ot._markAsUpdated()},et.DecomposeLerp=function(tt,nt,rt){var ot=new et;return et.DecomposeLerpToRef(tt,nt,rt,ot),ot},et.DecomposeLerpToRef=function(tt,nt,rt,ot){var st=MathTmp.Vector3[0],ut=MathTmp.Quaternion[0],ct=MathTmp.Vector3[1];tt.decompose(st,ut,ct);var ft=MathTmp.Vector3[2],pt=MathTmp.Quaternion[1],ht=MathTmp.Vector3[3];nt.decompose(ft,pt,ht);var mt=MathTmp.Vector3[4];Vector3.LerpToRef(st,ft,rt,mt);var yt=MathTmp.Quaternion[2];Quaternion.SlerpToRef(ut,pt,rt,yt);var vt=MathTmp.Vector3[5];Vector3.LerpToRef(ct,ht,rt,vt),et.ComposeToRef(mt,yt,vt,ot)},et.LookAtLH=function(tt,nt,rt){var ot=new et;return et.LookAtLHToRef(tt,nt,rt,ot),ot},et.LookAtLHToRef=function(tt,nt,rt,ot){var st=MathTmp.Vector3[0],ut=MathTmp.Vector3[1],ct=MathTmp.Vector3[2];nt.subtractToRef(tt,ct),ct.normalize(),Vector3.CrossToRef(rt,ct,st);var ft=st.lengthSquared();ft===0?st.x=1:st.normalizeFromLength(Math.sqrt(ft)),Vector3.CrossToRef(ct,st,ut),ut.normalize();var pt=-Vector3.Dot(st,tt),ht=-Vector3.Dot(ut,tt),mt=-Vector3.Dot(ct,tt);et.FromValuesToRef(st._x,ut._x,ct._x,0,st._y,ut._y,ct._y,0,st._z,ut._z,ct._z,0,pt,ht,mt,1,ot)},et.LookAtRH=function(tt,nt,rt){var ot=new et;return et.LookAtRHToRef(tt,nt,rt,ot),ot},et.LookAtRHToRef=function(tt,nt,rt,ot){var st=MathTmp.Vector3[0],ut=MathTmp.Vector3[1],ct=MathTmp.Vector3[2];tt.subtractToRef(nt,ct),ct.normalize(),Vector3.CrossToRef(rt,ct,st);var ft=st.lengthSquared();ft===0?st.x=1:st.normalizeFromLength(Math.sqrt(ft)),Vector3.CrossToRef(ct,st,ut),ut.normalize();var pt=-Vector3.Dot(st,tt),ht=-Vector3.Dot(ut,tt),mt=-Vector3.Dot(ct,tt);et.FromValuesToRef(st._x,ut._x,ct._x,0,st._y,ut._y,ct._y,0,st._z,ut._z,ct._z,0,pt,ht,mt,1,ot)},et.OrthoLH=function(tt,nt,rt,ot){var st=new et;return et.OrthoLHToRef(tt,nt,rt,ot,st),st},et.OrthoLHToRef=function(tt,nt,rt,ot,st){var ut=rt,ct=ot,ft=2/tt,pt=2/nt,ht=2/(ct-ut),mt=-(ct+ut)/(ct-ut);et.FromValuesToRef(ft,0,0,0,0,pt,0,0,0,0,ht,0,0,0,mt,1,st),st._updateIdentityStatus(ft===1&&pt===1&&ht===1&&mt===0)},et.OrthoOffCenterLH=function(tt,nt,rt,ot,st,ut){var ct=new et;return et.OrthoOffCenterLHToRef(tt,nt,rt,ot,st,ut,ct),ct},et.OrthoOffCenterLHToRef=function(tt,nt,rt,ot,st,ut,ct){var ft=st,pt=ut,ht=2/(nt-tt),mt=2/(ot-rt),yt=2/(pt-ft),vt=-(pt+ft)/(pt-ft),Tt=(tt+nt)/(tt-nt),Et=(ot+rt)/(rt-ot);et.FromValuesToRef(ht,0,0,0,0,mt,0,0,0,0,yt,0,Tt,Et,vt,1,ct),ct._markAsUpdated()},et.OrthoOffCenterRH=function(tt,nt,rt,ot,st,ut){var ct=new et;return et.OrthoOffCenterRHToRef(tt,nt,rt,ot,st,ut,ct),ct},et.OrthoOffCenterRHToRef=function(tt,nt,rt,ot,st,ut,ct){et.OrthoOffCenterLHToRef(tt,nt,rt,ot,st,ut,ct),ct._m[10]*=-1},et.PerspectiveLH=function(tt,nt,rt,ot){var st=new et,ut=rt,ct=ot,ft=2*ut/tt,pt=2*ut/nt,ht=(ct+ut)/(ct-ut),mt=-2*ct*ut/(ct-ut);return et.FromValuesToRef(ft,0,0,0,0,pt,0,0,0,0,ht,1,0,0,mt,0,st),st._updateIdentityStatus(!1),st},et.PerspectiveFovLH=function(tt,nt,rt,ot){var st=new et;return et.PerspectiveFovLHToRef(tt,nt,rt,ot,st),st},et.PerspectiveFovLHToRef=function(tt,nt,rt,ot,st,ut){ut===void 0&&(ut=!0);var ct=rt,ft=ot,pt=1/Math.tan(tt*.5),ht=ut?pt/nt:pt,mt=ut?pt:pt*nt,yt=(ft+ct)/(ft-ct),vt=-2*ft*ct/(ft-ct);et.FromValuesToRef(ht,0,0,0,0,mt,0,0,0,0,yt,1,0,0,vt,0,st),st._updateIdentityStatus(!1)},et.PerspectiveFovReverseLHToRef=function(tt,nt,rt,ot,st,ut){ut===void 0&&(ut=!0);var ct=1/Math.tan(tt*.5),ft=ut?ct/nt:ct,pt=ut?ct:ct*nt;et.FromValuesToRef(ft,0,0,0,0,pt,0,0,0,0,-rt,1,0,0,1,0,st),st._updateIdentityStatus(!1)},et.PerspectiveFovRH=function(tt,nt,rt,ot){var st=new et;return et.PerspectiveFovRHToRef(tt,nt,rt,ot,st),st},et.PerspectiveFovRHToRef=function(tt,nt,rt,ot,st,ut){ut===void 0&&(ut=!0);var ct=rt,ft=ot,pt=1/Math.tan(tt*.5),ht=ut?pt/nt:pt,mt=ut?pt:pt*nt,yt=-(ft+ct)/(ft-ct),vt=-2*ft*ct/(ft-ct);et.FromValuesToRef(ht,0,0,0,0,mt,0,0,0,0,yt,-1,0,0,vt,0,st),st._updateIdentityStatus(!1)},et.PerspectiveFovReverseRHToRef=function(tt,nt,rt,ot,st,ut){ut===void 0&&(ut=!0);var ct=1/Math.tan(tt*.5),ft=ut?ct/nt:ct,pt=ut?ct:ct*nt;et.FromValuesToRef(ft,0,0,0,0,pt,0,0,0,0,-rt,-1,0,0,-1,0,st),st._updateIdentityStatus(!1)},et.PerspectiveFovWebVRToRef=function(tt,nt,rt,ot,st){st===void 0&&(st=!1);var ut=st?-1:1,ct=Math.tan(tt.upDegrees*Math.PI/180),ft=Math.tan(tt.downDegrees*Math.PI/180),pt=Math.tan(tt.leftDegrees*Math.PI/180),ht=Math.tan(tt.rightDegrees*Math.PI/180),mt=2/(pt+ht),yt=2/(ct+ft),vt=ot._m;vt[0]=mt,vt[1]=vt[2]=vt[3]=vt[4]=0,vt[5]=yt,vt[6]=vt[7]=0,vt[8]=(pt-ht)*mt*.5,vt[9]=-((ct-ft)*yt*.5),vt[10]=-rt/(nt-rt),vt[11]=1*ut,vt[12]=vt[13]=vt[15]=0,vt[14]=-(2*rt*nt)/(rt-nt),ot._markAsUpdated()},et.GetFinalMatrix=function(tt,nt,rt,ot,st,ut){var ct=tt.width,ft=tt.height,pt=tt.x,ht=tt.y,mt=et.FromValues(ct/2,0,0,0,0,-ft/2,0,0,0,0,ut-st,0,pt+ct/2,ft/2+ht,st,1),yt=MathTmp.Matrix[0];return nt.multiplyToRef(rt,yt),yt.multiplyToRef(ot,yt),yt.multiply(mt)},et.GetAsMatrix2x2=function(tt){var nt=tt.m,rt=[nt[0],nt[1],nt[4],nt[5]];return PerformanceConfigurator.MatrixUse64Bits?rt:new Float32Array(rt)},et.GetAsMatrix3x3=function(tt){var nt=tt.m,rt=[nt[0],nt[1],nt[2],nt[4],nt[5],nt[6],nt[8],nt[9],nt[10]];return PerformanceConfigurator.MatrixUse64Bits?rt:new Float32Array(rt)},et.Transpose=function(tt){var nt=new et;return et.TransposeToRef(tt,nt),nt},et.TransposeToRef=function(tt,nt){var rt=nt._m,ot=tt.m;rt[0]=ot[0],rt[1]=ot[4],rt[2]=ot[8],rt[3]=ot[12],rt[4]=ot[1],rt[5]=ot[5],rt[6]=ot[9],rt[7]=ot[13],rt[8]=ot[2],rt[9]=ot[6],rt[10]=ot[10],rt[11]=ot[14],rt[12]=ot[3],rt[13]=ot[7],rt[14]=ot[11],rt[15]=ot[15],nt._updateIdentityStatus(tt._isIdentity,tt._isIdentityDirty)},et.Reflection=function(tt){var nt=new et;return et.ReflectionToRef(tt,nt),nt},et.ReflectionToRef=function(tt,nt){tt.normalize();var rt=tt.normal.x,ot=tt.normal.y,st=tt.normal.z,ut=-2*rt,ct=-2*ot,ft=-2*st;et.FromValuesToRef(ut*rt+1,ct*rt,ft*rt,0,ut*ot,ct*ot+1,ft*ot,0,ut*st,ct*st,ft*st+1,0,ut*tt.d,ct*tt.d,ft*tt.d,1,nt)},et.FromXYZAxesToRef=function(tt,nt,rt,ot){et.FromValuesToRef(tt._x,tt._y,tt._z,0,nt._x,nt._y,nt._z,0,rt._x,rt._y,rt._z,0,0,0,0,1,ot)},et.FromQuaternionToRef=function(tt,nt){var rt=tt._x*tt._x,ot=tt._y*tt._y,st=tt._z*tt._z,ut=tt._x*tt._y,ct=tt._z*tt._w,ft=tt._z*tt._x,pt=tt._y*tt._w,ht=tt._y*tt._z,mt=tt._x*tt._w;nt._m[0]=1-2*(ot+st),nt._m[1]=2*(ut+ct),nt._m[2]=2*(ft-pt),nt._m[3]=0,nt._m[4]=2*(ut-ct),nt._m[5]=1-2*(st+rt),nt._m[6]=2*(ht+mt),nt._m[7]=0,nt._m[8]=2*(ft+pt),nt._m[9]=2*(ht-mt),nt._m[10]=1-2*(ot+rt),nt._m[11]=0,nt._m[12]=0,nt._m[13]=0,nt._m[14]=0,nt._m[15]=1,nt._markAsUpdated()},et._updateFlagSeed=0,et._identityReadOnly=et.Identity(),et}(),MathTmp=function(){function et(){}return et.Vector3=ArrayTools.BuildArray(6,Vector3.Zero),et.Matrix=ArrayTools.BuildArray(2,Matrix.Identity),et.Quaternion=ArrayTools.BuildArray(3,Quaternion.Zero),et}(),TmpVectors=function(){function et(){}return et.Vector2=ArrayTools.BuildArray(3,Vector2.Zero),et.Vector3=ArrayTools.BuildArray(13,Vector3.Zero),et.Vector4=ArrayTools.BuildArray(3,Vector4.Zero),et.Quaternion=ArrayTools.BuildArray(2,Quaternion.Zero),et.Matrix=ArrayTools.BuildArray(8,Matrix.Identity),et}();_TypeStore.RegisteredTypes["BABYLON.Vector2"]=Vector2;_TypeStore.RegisteredTypes["BABYLON.Vector3"]=Vector3;_TypeStore.RegisteredTypes["BABYLON.Vector4"]=Vector4;_TypeStore.RegisteredTypes["BABYLON.Matrix"]=Matrix;const MAX_POINTS=3e5,DEFAULT_POINT_COLOR=[230,112,23],MaxAlphaValue=1,loadPointCloud=et=>{let tt;try{tt=JSON.parse(et)}catch(nt){const rt=nt instanceof Error?nt.message:"unknown";throw console.log("Received error while parsing JSON:",nt),new Error("Invalid point cloud JSON, parse error was: "+rt)}if(tt.type!=="lidar/beta"&&!_$2.isArray(tt))throw new Error("Unsupported format, must be a list of points or a scene type.");return{points:handlePoints(tt),vectors:tt.type==="lidar/beta"&&tt.vectors||[],boxes:handleBoxes(tt)}},getVertexCompatiblePositionsAndColors=et=>{const tt=[],nt=[];for(const rt of et){let ot;rt.color?ot=rt.color:rt.category?ot=colorMap[rt.category]:ot=DEFAULT_POINT_COLOR,nt.push(rt.position[0],rt.position[1],rt.position[2]),tt.push(ot[0]/255,ot[1]/255,ot[2]/255,MaxAlphaValue)}return{positions:nt,colors:tt}},handlePoints=et=>(et.type==="lidar/beta"?et.points||[]:et).slice(-MAX_POINTS).map(rt=>{const[ot,st,ut,ct,ft,pt]=rt,ht=[ot,st,ut],mt=ct;return ct!==void 0&&ft!==void 0&&pt!==void 0?{position:ht,color:[ct,ft,pt]}:mt&&Number.isInteger(mt)?{position:ht,category:mt}:mt&&mt>=0&&mt<=0?{position:ht,color:[255*mt,255*mt,255*mt]}:{position:ht,color:DEFAULT_POINT_COLOR}}),handleBoxes=et=>(et.type==="lidar/beta"&&et.boxes||[]).map(nt=>{const{corners:rt,color:ot,label:st,score:ut}=nt,ct=cornersToEdges(rt.map(ft=>new Vector3(...ft)));if(rt==null)throw new Error("Box must have corners");if(rt.length!==8)throw new Error("Box must have 8 corners");return{edges:ct,label:st,color:ot,score:ut}});function cornersToEdges(et){const tt=new Set(et),nt=[],rt=et[0],ot=[];for(const ft of combinations(_$2.drop(et),3,3))if(areOrthogonal(rt,ft[0],ft[1],ft[2])){nt.push([rt,ft[0]]),nt.push([rt,ft[1]]),nt.push([rt,ft[2]]),ot.push(ft[0]),ot.push(ft[1]),ot.push(ft[2]),tt.delete(rt),tt.delete(ft[0]),tt.delete(ft[1]),tt.delete(ft[2]);break}if(ot.length!==3)throw new Error("Provided corners do not form a box");const st=Array.from(tt),ut=_$2.sortBy(st,ft=>-Vector3.Distance(rt,ft))[0];tt.delete(ut);const ct=Array.from(tt);nt.push([ut,ct[0]]),nt.push([ut,ct[1]]),nt.push([ut,ct[2]]);for(const ft of ot)if(areOrthogonal(ft,rt,ct[0],ct[1]))nt.push([ft,ct[0]]),nt.push([ft,ct[1]]);else if(areOrthogonal(ft,rt,ct[1],ct[2]))nt.push([ft,ct[1]]),nt.push([ft,ct[2]]);else if(areOrthogonal(ft,rt,ct[0],ct[2]))nt.push([ft,ct[0]]),nt.push([ft,ct[2]]);else throw new Error("Provided corners do not form a box");return nt}function combinations(et,tt,nt){tt=tt||1,nt=nt<et.length?nt:et.length;const rt=(st,ut,ct,ft)=>{if(st===0){ct.length>0&&(ft[ft.length]=ct);return}for(let pt=0;pt<ut.length;pt++)rt(st-1,ut.slice(pt+1),ct.concat([ut[pt]]),ot)},ot=[];for(let st=tt;st<et.length;st++)rt(st,et,[],ot);return et.length===nt&&ot.push(et),ot}function areOrthogonal(et,tt,nt,rt){const ot=et.subtract(tt),st=et.subtract(nt),ut=et.subtract(rt);return!!(nearZero(Vector3.Dot(ot,st))&&nearZero(Vector3.Dot(ot,ut))&&nearZero(Vector3.Dot(st,ut)))}const epsilon=.003;function nearZero(et){return Math.abs(et)<epsilon}const colorMap={0:[21,128,114],1:[55,126,184],2:[102,166,30],3:[12,216,237],4:[152,78,162],5:[0,210,213],6:[255,127,0],7:[175,141,0],8:[127,128,205],9:[179,233,0],10:[196,46,96],11:[166,86,40],12:[247,129,191],13:[144,211,199],14:[190,186,218],15:[251,128,114]},inputType$J={type:"object3D-file"},PanelObject3D=et=>{const tt=et.input,nt=useAssetURLFromArtifact(tt),rt=!nt.loading&&nt.asset.path.endsWith(".pts.json");return Wt.createElement("div",null,nt.loading?Wt.createElement(WandbLoader,{name:"panel-object-3d"}):rt?Wt.createElement(PointCloud,{width:350,height:350,directUrl:nt.directUrl}):Wt.createElement("p",null,"Tried to render"," ",nt.asset.path?Wt.createElement("code",null,nt.asset.path):"this object",", but only point clouds are currently supported in Artifacts"))},PointCloud=et=>{const{width:tt,height:nt,directUrl:rt}=et,ot=react.exports.useRef(null),[st,ut]=react.exports.useState(null),[ct,ft]=react.exports.useState(),[pt,ht]=react.exports.useState();react.exports.useEffect(()=>{__vitePreload(()=>import("./render_babylon.21f8c887.js"),[]).then(ht)},[]);const[mt,yt]=react.exports.useState();react.exports.useEffect(()=>{fetch(rt).then(Et=>Et.text()).then(Et=>{try{yt(loadPointCloud(Et))}catch(xt){xt instanceof Error&&ut(xt),console.error(xt);return}})},[rt]),react.exports.useEffect(()=>{if(!(!ot.current||!pt||!mt))try{const Tt=pt.renderJsonPoints(mt,{fullscreen:!1,width:tt,height:nt},et.controls?.cameraControl);return pt.renderScreenshot(Tt).then(ft),Tt.cleanup}catch(Tt){Tt instanceof Error&&ut(Tt),console.error(Tt);return}},[pt,tt,nt,mt,et.controls]);const vt=Wt.useCallback(()=>{let Tt;return(async()=>{if(pt&&ot.current&&mt){const xt=ot.current,At=pt.renderJsonPoints(mt,{domElement:xt,fullscreen:!0});pt.renderFullscreen(At),Tt=At.cleanup}})(),Tt},[mt,pt]);return st!=null?Wt.createElement("div",{className:"card3d"},"Error: ",st.message):Wt.createElement(FlexContainer,null,Wt.createElement("div",{className:"media-card"},Wt.createElement("div",{className:"object3D-card-babylon",ref:ot}),ct?Wt.createElement(Wt.Fragment,null,Wt.createElement("img",{alt:"point-cloud-card",src:ct,width:"100%",height:"100%"}),Wt.createElement("div",{className:"media-card__fullscreen",onClick:vt},Wt.createElement(Icon$4,{size:"large",link:!0,className:"media-card__fullscreen-button",name:"expand arrows alternate"}))):Wt.createElement(Placeholder$1,{style:{width:"100%",height:"100%"}},Wt.createElement(PlaceholderImage,{square:!0}))))},Spec$K={id:"object3D-file",Component:PanelObject3D,inputType:inputType$J,displayName:"3D Object"},ActivityDashboardContext=Wt.createContext({startDate:new Date,endDate:new Date,userFilter:[],pageSize:0,frame:{},safeLoad:!1}),HighlightedIcon=Wt.memo(({className:et,onClick:tt,onMouseEnter:nt,onMouseLeave:rt,children:ot})=>Wt.createElement("div",{className:classnames("wb-highlighted-icon",et),onClick:tt,onMouseEnter:nt,onMouseLeave:rt},ot)),PopupDropdownComp=et=>{const tt=()=>{},{position:nt,className:rt,options:ot,sections:st,on:ut="click",MenuComponent:ct=Dropdown.Menu,onOpen:ft=tt,onClose:pt=tt}=et,[ht,mt]=react.exports.useState(!1),yt=react.exports.useCallback(()=>{mt(!0),ft()},[mt,ft]),vt=react.exports.useCallback(()=>{mt(!1),pt()},[mt,pt]),Tt=react.exports.useMemo(()=>({preventOverflow:{enabled:!1},flip:{enabled:!1}}),[]),Et=react.exports.useCallback((At,Ct)=>react.exports.createElement(Dropdown.Item,{key:Ct,...At,onClick:$t=>{At.onClick?.($t),vt()}}),[vt]),xt=react.exports.useMemo(()=>react.exports.createElement("div",{onClick:vt},react.exports.createElement(Dropdown,{open:!0,icon:null},react.exports.createElement(ct,null,ot?.map(Et),st?.map((At,Ct)=>react.exports.createElement(react.exports.Fragment,{key:Ct},Ct>0&&react.exports.createElement("div",{style:{margin:"8px 16px",height:1,background:gray400}}),At.map(Et)))))),[vt,Et,ot,st,ct]);return react.exports.createElement(Popup$1,{basic:!0,position:nt??"bottom left",...lodash$2.exports.omit(et,"options"),className:"popup-dropdown "+(rt||""),on:ut,hoverable:!0,popperModifiers:Tt,content:xt,onOpen:yt,open:ht,onClose:vt})},PopupDropdown=react.exports.memo(PopupDropdownComp),RepoInsightsDashboardContext=Wt.createContext({startDate:new Date,endDate:new Date,pageSize:0,repoName:"",frame:{}});function calculatePosition(et,tt,nt,rt){let ot=et.clientX+nt;ot+tt.width>window.innerWidth&&(ot=+et.clientX-nt-tt.width);let st=et.clientY+rt;return st+tt.height>window.innerHeight&&(st=+et.clientY-rt-tt.height),{x:ot,y:st}}function recordWeavePanelEvent(et,tt){const nt={};nt.action=et,tt&&Object.assign(nt,tt),window.analytics?.track("Weave Panel Event",nt)}function makeEventRecorder(et){return(tt,nt)=>recordWeavePanelEvent(et+"."+tt,nt)}const recordEvent$4=makeEventRecorder("Table");function useUpdatePanelConfig(et,tt,nt){return react.exports.useCallback(rt=>(recordEvent$4("UPDATE_PANEL_CONFIG"),et(updateColumnPanelConfig(tt,nt,rt))),[nt,tt,et])}function argsEqual(et,tt){return tt==null||et.length!==tt.length?!1:et.every((nt,rt)=>tt[rt]===nt)}function makePromiseUsable(et){return(...tt)=>{const nt=useDeepMemo$1(tt),rt=Wt.useRef(),[ot,st]=Wt.useState();return argsEqual(nt,rt.current)||(rt.current=nt,et(...nt).then(ut=>{argsEqual(nt,rt.current)&&st({resultFromArgs:nt,result:ut})})),Wt.useMemo(()=>ot==null||!argsEqual(nt,ot.resultFromArgs)?{loading:!0,result:void 0}:{loading:!1,result:ot.result},[nt,ot])}}function vectorizePromiseFn(et){return(...nt)=>Promise.all(nt[0].map(rt=>et(rt,...nt.slice(1))))}const refineExpression=async(et,tt,nt)=>await nt.refineNode(et,tt),refineExpressions=vectorizePromiseFn(refineExpression);async function refineTableStateExpressions(et,tt,nt,rt){const ot=getRowsNode(et.preFilterFunction,et.groupBy,et.columnSelectFunctions,et.columnNames,et.order,et.sort,tt,rt),st=et.order.filter(Et=>!et.groupBy.includes(Et)),ut=et.groupBy.map(Et=>et.columnSelectFunctions[Et]),ct=st.map(Et=>et.columnSelectFunctions[Et]),ft=et.groupBy.length>0?getCellFrame(tt,ot,et.groupBy,et.columnSelectFunctions,et.groupBy[0]):{},pt=pushFrame(nt,ft),ht=st.length>0?getCellFrame(tt,ot,et.groupBy,et.columnSelectFunctions,st[0]):{},mt=pushFrame(nt,ht),yt=await refineExpressions(Object.values(ut),pt,rt),vt=await refineExpressions(Object.values(ct),mt,rt),Tt={};return et.groupBy.forEach((Et,xt)=>Tt[Et]=yt[xt]),st.forEach((Et,xt)=>Tt[Et]=vt[xt]),{...et,columnSelectFunctions:{...et.columnSelectFunctions,...Tt}}}const refineTableStatesExpressions=vectorizePromiseFn(refineTableStateExpressions),useTableStateWithRefinedExpressions=makePromiseUsable(refineTableStateExpressions),useTableStatesWithRefinedExpressions=makePromiseUsable(refineTableStatesExpressions),makeMigrator=(et,tt=1,nt)=>{const rt=st=>{let ut="configVersion"in st?st.configVersion:1;if(ut<tt){if(nt==null)throw new Error(`Need to provide a migration function for version ${ut}`);st={...nt(st),configVersion:tt},ut=tt}if(ut===tt)return{...et(st),configVersion:tt+1};if(ut===tt+1)return st;throw new Error(`Unknown config version: ${ut}, known up to ${tt+1}`)};return{migrate:rt,add:st=>makeMigrator(st,tt+1,rt)}},POINT_SHAPES$2=["circle","square","cross","diamond","triangle-up","triangle-down","triangle-right","triangle-left"],PLOT_DIMS_UI$1=["x","y","label","tooltip","mark"],DIM_NAME_MAP$5={pointSize:"Size",pointShape:"Shape",x:"X Dim",y:"Y Dim",label:"Label",color:"Color",mark:"Mark",tooltip:"Tooltip"},DEFAULT_POINT_SIZE$1=100;function migrate$d(et){let tt;const rt=((ot,st)=>{const ut={pointSize:ot.pointSize||"",pointShape:ot.pointShape||""};if(!ot.pointSize){const ct=addColumnToTable(st,constNumber(DEFAULT_POINT_SIZE$1));st=ct.table,ut.pointSize=ct.columnId,st=updateColumnName(st,ct.columnId,"pointSize")}if(!ot.pointShape){const ct=addColumnToTable(st,constString("circle"));st=ct.table,ut.pointShape=ct.columnId,st=updateColumnName(st,ct.columnId,"pointShape")}return{dims:{...ot,...ut},table:st}})(et.dims,et.table);return rt.mark=et.mark,tt={series:[rt],axisSettings:et.axisSettings,legendSettings:et.legendSettings,configVersion:2,vegaOverlay:et.vegaOverlay,title:et.title,configOptionsExpanded:PLOT_DIMS_UI$1.reduce((ot,st)=>(ot[st]=!1,ot),{})},(tt.axisSettings==null||tt.axisSettings.x==null||tt.axisSettings.y==null)&&(tt={...tt,axisSettings:{x:{},y:{}}}),(tt.legendSettings==null||tt.legendSettings.color==null)&&(tt={...tt,legendSettings:{color:{}}}),tt}function migrate$c(et){return{...et,configVersion:3,series:et.series.map(tt=>({...tt,mark:tt.mark??null}))}}const DIM_NAME_MAP$4={...DIM_NAME_MAP$5,lineShape:"Style"};function migrate$b(et){return{...et,configVersion:4,series:et.series.map(tt=>({...tt,lineShape:"solid"}))}}const DIM_NAME_MAP$3={...DIM_NAME_MAP$4,lineStyle:"Style"};function migrate$a(et){return{...et,configVersion:5,series:et.series.map(tt=>({table:tt.table,dims:tt.dims,constants:{mark:tt.mark,lineStyle:tt.lineShape,pointShape:"circle"},uiState:{pointShape:"expression"}}))}}const POINT_SHAPES$1=[...POINT_SHAPES$2,"series"],DIM_NAME_MAP$2={...DIM_NAME_MAP$3,label:"Color"};function migrate$9(et){return{...et,configVersion:6,series:et.series.map(tt=>({table:tt.table,dims:tt.dims,uiState:{...tt.uiState,label:"expression"},constants:{...tt.constants,label:"series"}}))}}const MARK_OPTIONS$2=["point","bar","boxplot","line"],MARK_OPTIONS$1=[...MARK_OPTIONS$2,"area"],DIM_NAME_MAP$1={...DIM_NAME_MAP$2,y2:"Y2 Dim"},migrate$8=et=>({...et,configVersion:7,series:et.series.map(tt=>{const nt=appendEmptyColumn(tt.table),rt=nt.order[nt.order.length-1];return{...tt,table:nt,dims:{...tt.dims,y2:rt}}})}),migrate$7=et=>({...et,configVersion:8,axisSettings:{...et.axisSettings,color:et.axisSettings.color??{}}}),LINE_SHAPE_OPTIONS=["solid","dashed","dotted","dot-dashed","short-dashed","series"],migrate$6=et=>({...et,configVersion:9}),VERSION$1=10,SCALE_TYPES$1=["linear","log"],DEFAULT_SCALE_TYPE$1="linear",migrate$5=et=>({...et,configVersion:VERSION$1}),VERSION=11,migrate$4=et=>({...et,configVersion:VERSION,signals:{domain:{},selection:{}},series:et.series.map(tt=>({..._$2.omitBy(tt,(nt,rt)=>rt==="name"),seriesName:tt.name}))}),LAZY_PATHS$1=["signals.domain.x","signals.domain.y"],DEFAULT_LAZY_PATH_VALUES$1={"signals.domain.x":null,"signals.domain.y":null},migrate$3=et=>({...et,configVersion:12,signals:{...et.signals,domain:{x:constNode({type:"union",members:[{type:"list",objectType:"any"},"none"]},et.signals.domain.x??null),y:constNode({type:"union",members:[{type:"list",objectType:"any"},"none"]},et.signals.domain.y??null)}}}),migrate$2=et=>({...et,configVersion:13,signals:{...et.signals,domain:{x:isConstNode(et.signals.domain.x)?constNode(toWeaveType(et.signals.domain.x.val),et.signals.domain.x.val):et.signals.domain.x,y:isConstNode(et.signals.domain.y)?constNode(toWeaveType(et.signals.domain.y.val),et.signals.domain.y.val):et.signals.domain.y}}}),migrate$1=et=>({...et,axisSettings:["x","y","color"].reduce((tt,nt)=>{const rt=et.axisSettings[nt];return _$2.set(tt,nt,_$2.mapKeys(rt,(ot,st)=>st==="type"?"scaleType":st)),tt},{}),configVersion:14}),PLOT_DIMS_UI=PLOT_DIMS_UI$1,MARK_OPTIONS=MARK_OPTIONS$1,DEFAULT_POINT_SIZE=DEFAULT_POINT_SIZE$1,DIM_NAME_MAP=DIM_NAME_MAP$1,POINT_SHAPES=POINT_SHAPES$1,LINE_SHAPES=LINE_SHAPE_OPTIONS,SCALE_TYPES=SCALE_TYPES$1,DEFAULT_SCALE_TYPE=DEFAULT_SCALE_TYPE$1,LAZY_PATHS=LAZY_PATHS$1,DEFAULT_LAZY_PATH_VALUES=DEFAULT_LAZY_PATH_VALUES$1,{migrate}=makeMigrator(migrate$d).add(migrate$c).add(migrate$b).add(migrate$a).add(migrate$9).add(migrate$8).add(migrate$7).add(migrate$6).add(migrate$5).add(migrate$4).add(migrate$3).add(migrate$2).add(migrate$1);var _a;function isGroup(et){return et.type==="group"}function isDropdown(et){return et.type==="optionSelect"}function isTopLevelDimension(et){return PLOT_DIMS_UI.includes(et)}function isWeaveExpression(et){return et.type==="weaveExpression"}function isDropdownWithExpression(et){return et.type==="dropdownWithExpression"}class DimensionLike{constructor(tt,nt,rt,ot){this[_a]=!0,this.type=tt,this.name=nt,this.series=rt,this.weave=ot}withSeries(tt){return fn(this,nt=>{nt.series=tt})}isVoid(){return _$2.isEqual(this.state().compareValue,this.defaultState().compareValue)}equals(tt,nt=!1){return this.type===tt.type&&this.name===tt.name&&(_$2.isEqual(this.state().compareValue,tt.state().compareValue)||nt&&(this.isVoid()||tt.isVoid()))}}_a=L;const EXPRESSION_DIM_NAMES=["x","y","color","label","tooltip","pointSize","pointShape","y2"];class MultiFieldDimension extends DimensionLike{constructor(tt,nt,rt,ot){super("group",tt,nt,rt),this.dimensions=ot}static dimStateFromState(tt,nt){const rt=nt.map(st=>st.value),ot=JSON.stringify(tt.reduce((st,ut,ct)=>(st[ut.name]=nt[ct].compareValue,st),{}));return{value:rt,compareValue:ot}}isVoid(){return this.activeDimensions().every(tt=>tt.isVoid())}defaultState(){return MultiFieldDimension.dimStateFromState(this.activeDimensions(),this.activeDimensions().map(tt=>tt.defaultState()))}state(){return MultiFieldDimension.dimStateFromState(this.activeDimensions(),this.activeDimensions().map(tt=>tt.state()))}primaryDimension(){return this.dimensions[this.name]}imputeThisSeriesWithDefaultState(){let tt=this.series;return Object.values(this.dimensions).forEach(nt=>{nt&&(tt=nt.withSeries(tt).imputeThisSeriesWithDefaultState())}),tt}imputeOtherSeriesWithThisState(tt){return this.activeDimensions().forEach(nt=>{tt=nt.imputeOtherSeriesWithThisState(tt)}),tt}}class YDimensionWithConditionalY2 extends MultiFieldDimension{constructor(tt,nt,rt){const ot=new WeaveExpressionDimension("y",tt,nt),st=new WeaveExpressionDimension("y2",tt,nt),ut={y:ot,y2:st};super("y",tt,nt,ut),this.markDimension=rt,this.dimensions=ut}activeDimensions(){const tt=[this.dimensions.y];return this.markDimension.state().value==="area"&&tt.push(this.dimensions.y2),tt}}class DropDownDimension extends DimensionLike{constructor(tt,nt,rt,ot,st){super("optionSelect",tt,nt,rt),this.options=ot,this.name=tt,this.defaultOption=st}imputeThisSeriesWithDefaultState(){return fn(this.series,tt=>{tt.constants[this.name]=this.defaultOption.value})}imputeOtherSeriesWithThisState(tt){return fn(tt,nt=>{nt.constants[this.name]=this.state().value})}defaultState(){return{value:this.defaultOption.value,compareValue:this.defaultOption.text}}state(){const tt=this.series.constants[this.name],nt=this.options.find(rt=>rt.value===tt);return{value:tt,compareValue:nt?nt.text:""}}}const lineStyleOptions=LINE_SHAPES.map(et=>({key:et,value:et,text:et==="series"?"Encode from series":et,representableAsExpression:et!=="series"})),markOptions=[{key:"auto",value:null,text:"auto"},...MARK_OPTIONS.map(et=>({key:et,value:et,text:et}))],pointShapeOptions=POINT_SHAPES.map(et=>({key:et,value:et,text:et==="series"?"Encode from series":et,representableAsExpression:et!=="series"})),labelOptions=["series"].map(et=>({key:et,value:et,text:et==="series"?"Encode from series":et}));class DropdownWithExpressionDimension extends DimensionLike{constructor(tt,nt,rt,ot,st,ut="dropdown"){super("dropdownWithExpression",tt,nt,st),this.name=tt,this.defaultMode=ut,this.expressionDim=rt,this.dropdownDim=ot}mode(){return this.series.uiState[this.name]}state(){const tt=this.mode(),nt=tt==="dropdown"?this.dropdownDim.state():this.expressionDim.state(),rt=JSON.stringify({mode:tt,compareValue:nt.compareValue});return{value:{mode:tt,value:nt.value},compareValue:rt}}defaultState(){const tt=this.defaultMode==="dropdown"?this.dropdownDim.defaultState():this.expressionDim.defaultState(),nt=JSON.stringify({mode:this.defaultMode,compareValue:tt.compareValue});return{value:{mode:this.defaultMode,value:tt.value},compareValue:nt}}imputeThisSeriesWithDefaultState(){const{value:{mode:tt}}=this.defaultState(),nt=fn(this,rt=>{rt.series.uiState[this.name]=tt});return tt==="dropdown"?nt.dropdownDim.imputeThisSeriesWithDefaultState():nt.expressionDim.imputeThisSeriesWithDefaultState()}imputeOtherSeriesWithThisState(tt){const nt=this.mode(),rt=nt==="dropdown"?this.dropdownDim.imputeOtherSeriesWithThisState(tt):this.expressionDim.imputeOtherSeriesWithThisState(tt);return fn(rt,ot=>{ot.uiState[this.name]=nt})}}const topLevelMarkDimensionConstructor=(et,tt)=>new DropDownDimension("mark",et,tt,markOptions,markOptions[0]);class MarkDimensionGroup extends MultiFieldDimension{constructor(tt,nt){const rt=new WeaveExpressionDimension("pointShape",tt,nt),ot=new DropDownDimension("pointShape",tt,nt,pointShapeOptions,pointShapeOptions[0]),st={mark:topLevelMarkDimensionConstructor(tt,nt),pointSize:new WeaveExpressionDimension("pointSize",tt,nt),pointShape:new DropdownWithExpressionDimension("pointShape",tt,rt,ot,nt,"expression"),lineStyle:new DropDownDimension("lineStyle",tt,nt,lineStyleOptions,lineStyleOptions[0])};super("mark",tt,nt,st)}activeDimensions(){const tt=this.dimensions;return tt.mark&&tt.pointShape&&tt.pointSize&&tt.lineStyle?tt.mark.state().value==="point"?[tt.mark,tt.pointShape,tt.pointSize]:tt.mark.state().value==="line"?[tt.mark,tt.lineStyle]:[tt.mark]:[]}}class WeaveExpressionDimension extends DimensionLike{constructor(tt,nt,rt){super("weaveExpression",tt,nt,rt),this.name=tt}static updateSeriesWithState(tt,nt,rt){return fn(tt,ot=>{const st=ot.dims[rt],ut=nt.value;ot.table=updateColumnSelect(ot.table,st,ut)})}imputeThisSeriesWithDefaultState(){return WeaveExpressionDimension.updateSeriesWithState(this.series,this.defaultState(),this.name)}imputeOtherSeriesWithThisState(tt){return WeaveExpressionDimension.updateSeriesWithState(tt,this.state(),this.name)}defaultState(){return{compareValue:"",value:voidNode()}}state(){const tt=this.series.dims[this.name],nt=this.series.table.columnSelectFunctions[tt];return{compareValue:this.weave.expToString(nt),value:nt}}}const dimConstructors={x:(et,tt)=>new WeaveExpressionDimension("x",et,tt),y:(et,tt)=>{const nt=topLevelMarkDimensionConstructor(et,tt);return new YDimensionWithConditionalY2(et,tt,nt)},tooltip:(et,tt)=>new WeaveExpressionDimension("tooltip",et,tt),label:(et,tt)=>{const nt=new WeaveExpressionDimension("label",et,tt),rt=new DropDownDimension("label",et,tt,labelOptions,labelOptions[0]);return new DropdownWithExpressionDimension("label",et,nt,rt,tt,"dropdown")},mark:(et,tt)=>new MarkDimensionGroup(et,tt)};function addSeriesFromSeries(et,tt,nt,rt){const ot=dimConstructors[nt],ut=ot(tt,rt).imputeThisSeriesWithDefaultState();return fn(et,ct=>{ct.series.push(ut),ct.configOptionsExpanded[nt]=!0})}function removeManySeries(et,tt){return fn(et,rt=>{let ot=[...rt.series];tt.forEach(st=>{let ut=-1;for(let ct=0;ct<ot.length;ct++){const ft=ot[ct];if(_$2.isEqual(ft,st)){ut=ct;break}}ut!==-1&&(ot=ot.slice(0,ut).concat(ot.slice(ut+1)))}),rt.series=ot,rt.configOptionsExpanded=ot.length===1?_$2.mapValues(rt.configOptionsExpanded,()=>!1):rt.configOptionsExpanded})}function removeSeries(et,tt){return removeManySeries(et,[tt])}function isDimShared(et,tt,nt){return et.length>1&&et.every(rt=>{const ot=et[0],st=dimConstructors[tt],ut=st(ot,nt),ct=st(rt,nt);return ut.equals(ct)})}function removeRedundantSeries(et,tt){const nt=[],rt=(ot,st)=>PLOT_DIMS_UI.every(ut=>{const ct=dimConstructors[ut](ot,tt),ft=dimConstructors[ut](st,tt);return ct.equals(ft,!0)});return et.series.reduce((ot,st)=>{let ut=!1;for(const ct of ot)if(rt(ct,st)){nt.push(st),ut=!0;break}return ut||ot.push(st),ot},[]),removeManySeries(et,nt)}function makeDimensionShared(et,tt,nt,rt){return et.series.length>1?fn(et,ot=>{const st=dimConstructors[nt](tt,rt);ot.series=ot.series.map(ut=>st.imputeOtherSeriesWithThisState(ut)),ot.configOptionsExpanded[nt]=!1}):et}function collapseRedundantDimensions(et,tt){return et.series.length>1?fn(et,nt=>{PLOT_DIMS_UI.forEach(rt=>{const ot={},st=[],ut=dimConstructors[rt](nt.series[0],tt).defaultState().compareValue;nt.series.forEach(ft=>{const pt=dimConstructors[rt],ht=pt(ft,tt),mt=ht.state();mt.compareValue in ot||(ot[mt.compareValue]=ht,st.push(mt.compareValue))});let ct;if(Object.keys(ot).length===1)ct=ot[st[0]];else if(Object.keys(ot).length===2&&ut in ot){const ft=st.find(pt=>pt!==ut);ct=ot[ft]}else return;nt.series=nt.series.map(ft=>ct.imputeOtherSeriesWithThisState(ft)),nt.configOptionsExpanded[rt]=!1})}):et}function condensePlotConfig(et,tt){return collapseRedundantDimensions(removeRedundantSeries(et,tt),tt)}const fixKeyForVega=et=>et.replace(/[.[\]\\(),]/g,"");function dimNames(et,tt,nt){return tt=_$2.omitBy(tt,(rt,ot)=>ot.startsWith("_")),_$2.mapValues(tt,rt=>fixKeyForVega(getTableColumnName(et.columnNames,et.columnSelectFunctions,rt,nt.client.opStore)))}function dimNamesRaw(et,tt,nt){return tt=_$2.omitBy(tt,(rt,ot)=>ot.startsWith("_")),_$2.mapValues(tt,rt=>getTableColumnName(et.columnNames,et.columnSelectFunctions,rt,nt.client.opStore))}function isValidConfig(et){if(et.series)for(const tt of["x","y"]){const nt=et.series.reduce((st,ut)=>(st.push({table:ut.table,columnId:ut.dims[tt]}),st),[]),rt=nt[0];if(!nt.every(st=>{const ut=st.table.columnSelectFunctions[st.columnId],ct=rt.table.columnSelectFunctions[rt.columnId];return isAssignableTo(ut.type,ct.type)}))return{valid:!1,reason:`Series ${tt} dimension types do not match`}}return{valid:!0,reason:""}}function defaultPlotCommon(et,tt){const nt=getExampleRow(et);let rt=emptyTable();rt=appendEmptyColumn(rt);const ot=rt.order[rt.order.length-1];rt=appendEmptyColumn(rt);const st=rt.order[rt.order.length-1];rt=appendEmptyColumn(rt);const ut=rt.order[rt.order.length-1];rt=appendEmptyColumn(rt);const ct=rt.order[rt.order.length-1];rt=appendEmptyColumn(rt);const ft=rt.order[rt.order.length-1];rt=appendEmptyColumn(rt);const pt=rt.order[rt.order.length-1];rt=appendEmptyColumn(rt);const ht=rt.order[rt.order.length-1],mt={x:{},y:{},color:{}},yt={color:{}};let vt=!1;const Tt=resolveVar(tt,"runColors");if(Tt!=null&&Tt.closure.value.nodeType==="const"&&Object.keys(Tt.closure.value.val).length>1&&(isAssignableTo(nt.type,withNamedTag("run","run","any"))?(rt=updateColumnSelect(rt,ct,opGetRunTag({obj:varNode(nt.type,"row")})),vt=!0):isAssignableTo(nt.type,"run")&&(rt=updateColumnSelect(rt,ct,varNode(nt.type,"row")),vt=!0)),isAssignableTo(nt.type,typedDict({}))){const At=allObjPaths(nullableTaggableValue(nt.type));let Ct=null,$t=null,Ot=null,Rt=null;for(const It of At)isAssignableTo(It.type,{type:"timestamp",unit:"ms"})&&(Ct=It.path.join(".")),isAssignableTo(It.type,maybe("number"))?Ct==null?Ct=It.path.join("."):$t==null&&($t=It.path.join(".")):isAssignableTo(It.type,maybe("string"))?Ot==null&&It.path.indexOf("runname")===-1&&(Ot=It.path.join(".")):Rt==null&&isAssignableTo(It.type,maybe(union$2([{type:"image-file"},{type:"video-file"},{type:"audio-file"},{type:"html-file"},{type:"bokeh-file"},{type:"object3D-file"},{type:"molecule-file"}])))&&(Rt=It.path.join("."));Ct!=null&&$t!=null&&(rt=updateColumnSelect(rt,ot,opPick({obj:varNode(nt.type,"row"),key:constString(Ct)})),rt=updateColumnSelect(rt,st,opPick({obj:varNode(nt.type,"row"),key:constString($t)})),rt=updateColumnSelect(rt,pt,constNumber(DEFAULT_POINT_SIZE)),rt=updateColumnSelect(rt,ht,constString("circle")),Ot!=null&&!vt&&(rt=updateColumnSelect(rt,ct,opPick({obj:varNode(nt.type,"row"),key:constString(Ot)}))),Rt!=null&&(rt=updateColumnSelect(rt,ft,opPick({obj:varNode(nt.type,"row"),key:constString(Rt)}))))}const Et=resolveVar(tt,"domain");return isAssignableTo(et.type,list$1(maybe("number")))&&(Et!=null?(rt=updateColumnSelect(rt,ot,opNumberBin({in:varNode(nt.type,"row"),binFn:opNumbersBinEqual({arr:varNode(list$1("number"),"domain"),bins:constNumber(10)})})),rt={...rt,groupBy:[ot]},rt=updateColumnSelect(rt,st,opCount({arr:varNode(list$1(nt.type),"row")})),mt.x={noTitle:!0},mt.y={noTitle:!0},yt.color={noLegend:!0}):isAssignableTo(et.type,list$1(taggedValue(typedDict({run:"run"}),maybe("number"))))&&(rt=updateColumnSelect(rt,st,opRunName({run:opGetRunTag({obj:varNode(nt.type,"row")})})),rt=updateColumnSelect(rt,ot,varNode(nt.type,"row")))),isAssignableTo(et.type,list$1(maybe("string")))&&Et!=null&&(rt=updateColumnSelect(rt,st,varNode(nt.type,"row")),rt={...rt,groupBy:[st]},rt=updateColumnSelect(rt,ot,opCount({arr:varNode(list$1(nt.type),"row")})),mt.x={noTitle:!0},mt.y={noTitle:!0},yt.color={noLegend:!0}),isAssignableTo(et.type,dict(maybe("number")))&&Et!=null&&(rt=updateColumnSelect(rt,st,varNode("string","key")),rt=updateColumnSelect(rt,ot,varNode(nt.type,"row")),mt.x={noTitle:!0},mt.y={noTitle:!0},yt.color={noLegend:!0}),isAssignableTo(et.type,dict(list$1(maybe("number"))))&&Et!=null&&(rt=updateColumnSelect(rt,st,varNode("string","key")),rt=updateColumnSelect(rt,ot,varNode(nt.type,"row")),rt=updateColumnSelect(rt,ut,varNode("string","key")),mt.x={noTitle:!0},mt.y={noTitle:!0},yt.color={noLegend:!0}),{configVersion:1,axisSettings:mt,legendSettings:yt,dims:{x:ot,y:st,color:ut,label:ct,tooltip:ft,pointSize:pt,pointShape:ht},table:rt}}function defaultPlot(et,tt){const nt=defaultPlotCommon(et,tt),rt=migrate(nt);return fn(rt,ot=>{ot.series.forEach(st=>{st.uiState.pointShape="dropdown"})})}function defaultConcretePlot(et,tt){const nt=migrate(defaultPlotCommon(et,tt));return LAZY_PATHS.forEach(rt=>{setThroughArray(nt,rt.split("."),DEFAULT_LAZY_PATH_VALUES[rt],!0)}),nt}function defaultSeriesName(et,tt){if(et.seriesName!=null)return et.seriesName;const nt=et.dims.y,rt=et.table.columnSelectFunctions[nt];return isVoidNode(rt)?"string":fixKeyForVega(getTableColumnName(et.table.columnNames,et.table.columnSelectFunctions,et.dims.y,tt.client.opStore))}const defaultAxisLabel=(et,tt,nt)=>{const rt=new Set(et.filter(ot=>{const st=ot.dims[tt],ut=ot.table.columnSelectFunctions[st];return!isVoidNode(ut)}).map(ot=>{const st=ot.dims[tt];return fixKeyForVega(getTableColumnName(ot.table.columnNames,ot.table.columnSelectFunctions,st,nt.client.opStore))}));return Array.from(rt).join(", ")},isEmptyConfig=et=>et==null||Object.keys(et).length===0,hasVersion=et=>et?.configVersion!=null,assumePropsConfigIsUnmarkedV1=et=>et!=null&&!isEmptyConfig(et)&&!et.configVersion&&et.dims!=null,panelPlotDefaultConfig=(et,tt,nt)=>{if(assumePropsConfigIsUnmarkedV1(tt)){const rt=fn(tt,ot=>{ot.configVersion=1});return migrate(rt)}else return hasVersion(tt)?migrate(tt):defaultPlot(et,nt)};function getDimTypes(et,tt){const nt=_$2.pick(et,EXPRESSION_DIM_NAMES);return _$2.mapValues(nt,rt=>getTableColType(tt,rt))}function getAxisType(et,tt,nt){let{table:rt}=et;nt&&(rt=nt);const{dims:ot}=et,st=getDimTypes(ot,rt);return isAssignableTo(st[tt],oneOrMany(maybe("number")))||isAssignableTo(st[tt],maybe(numberBin))?"quantitative":isAssignableTo(st[tt],oneOrMany(maybe("string")))||isAssignableTo(st[tt],oneOrMany(maybe("boolean")))?"nominal":isAssignableTo(st[tt],oneOrMany(maybe("date")))||isAssignableTo(st[tt],oneOrMany(maybe({type:"timestamp",unit:"ms"})))||isAssignableTo(st[tt],maybe(timestampBin))?"temporal":null}function isValidDomainForAxisType(et,tt){return tt==null&&et!=null?!1:et==null?!0:selectionIsContinuous(et)}function selectionIsContinuous(et){return et.length===2&&et.map(tt=>typeof tt=="number").every(Boolean)}function selectionIsDiscrete(et){return et.length>0&&et.map(tt=>typeof tt=="string").every(Boolean)}function selectionContainsValue(et,tt){return selectionIsContinuous(et)?(typeof tt=="string"&&(tt=Date.parse(tt)),tt<=et[1]&&tt>=et[0]):et.includes(tt)}function setThroughArray(et,tt,nt,rt=!0){if(tt.length===0)return et;const[ot,...st]=tt;return ot==="#"?Array.isArray(et)&&et.forEach((ut,ct)=>{setThroughArray(ut,st,rt?nt:nt[ct],rt)}):st.length===0?et[ot]=nt:typeof et[ot]=="object"&&et[ot]!==null&&setThroughArray(et[ot],st,nt,rt),et}function getThroughArray(et,tt){if(tt.length===0||et==null)return et;const[nt,...rt]=tt;if(nt==="#")return Array.isArray(et)?et.map(ot=>getThroughArray(ot,rt)):void 0;try{return getThroughArray(et[nt],rt)}catch{return}}const IconWrapper=styled$1.div`
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: ${et=>et.isActive?et.isDarkMode?hexToRGB(TEAL,.16):hexToRGB(TEAL,.1):et.isDarkMode?GRAY_880:WHITE};

  &:hover {
    background-color: ${et=>et.isDarkMode?GRAY_840:GRAY_50};
  }
`,Icon=styled$1.div`
  width: 18px;
  height: 18px;f
  background-color: ${et=>et.isActive?et.isDarkMode?TEAL_LIGHT2:TEAL_DARK:et.isDarkMode?GRAY_600:GRAY_500};
`,IconComponent=({isDarkMode:et,isActive:tt,onClick:nt,name:rt})=>Wt.createElement(IconWrapper,{isDarkMode:et,isActive:tt,onClick:nt},Wt.createElement(Icon,{isDarkMode:et,isActive:tt},Wt.createElement(LegacyWBIcon,{name:rt,className:`wbic-${rt}`}))),Group=styled$1.div`
  display: flex;
  padding: 4px;
  background-color: ${et=>et.isDarkMode?GRAY_880:WHITE};
  border: 1px solid
    ${et=>et.isDarkMode?GRAY_800:GRAY_350};
  border-radius: 4px;
`,GroupComponent=({children:et,isDarkMode:tt})=>Wt.createElement(Group,{isDarkMode:tt},et),PanelPlotRadioButtons=({currentValue:et,setMode:tt})=>{const nt=react.exports.useMemo(()=>[{mode:"zoom",iconName:"icon-zoom-in-tool"},{mode:"select",iconName:"icon-select-move-tool"}],[]);return Wt.createElement(GroupComponent,{isDarkMode:!1},nt.map(({iconName:rt},ot)=>Wt.createElement(IconComponent,{key:rt,isActive:et===nt[ot].mode,isDarkMode:!1,onClick:()=>{const st=nt[ot].mode;et!==st&&(console.log("SETTING BRUSH MODE",et,"=>",st),tt(st))},name:rt})))},recordEvent$3=makeEventRecorder("Plot"),DOMAIN_DATAFETCH_EXTRA_EXTENT=2,defaultFontStyleDict={titleFont:"Source Sans Pro",titleFontWeight:"normal",titleColor:gray900,labelFont:"Source Sans Pro",labelFontWeight:"normal",labelColor:gray900,labelSeparation:5};function useIsOrgDashboard(){return Object.keys(react.exports.useContext(ActivityDashboardContext).frame).length>0}function useIsRepoInsightsDashboard(){return Object.keys(react.exports.useContext(RepoInsightsDashboardContext).frame).length>0}function useIsDashboard(){const et=useIsOrgDashboard(),tt=useIsRepoInsightsDashboard();return et||tt}const useConfig$2=(et,tt)=>{const{stack:nt}=usePanelContext(),rt=useWeaveContext(),ot=react.exports.useMemo(()=>panelPlotDefaultConfig(et,tt,nt),[tt,et,nt]),st=react.exports.useMemo(()=>fn(ot,ht=>{ht.series.forEach(mt=>{["pointShape","pointSize"].forEach(yt=>{mt.table.columnNames[mt.dims[yt]]===yt&&(mt.table=updateColumnName(mt.table,mt.dims[yt],""))})})}),[ot]),ut=react.exports.useMemo(()=>st.series.map(ht=>ht.table),[st.series]),ct=useTableStatesWithRefinedExpressions(ut,et,nt,rt),ft=react.exports.useMemo(()=>ct.loading?ot:fn(ot,ht=>{ht.series.forEach((mt,yt)=>{mt.table=ct.result[yt]})}),[ct,ot]);return react.exports.useMemo(()=>({config:ft,isRefining:ct.loading}),[ft,ct.loading])},inputType$I=GeneralTableLikeType,PanelPlotConfig=et=>{const{input:tt}=et,nt=react.exports.useMemo(()=>normalizeTableLike(tt),[tt]),rt=useNodeWithServerType(nt),ot=react.exports.useMemo(()=>({...et,input:rt.result}),[et,rt.result]),st=Wt.createElement(Panel2Loader,null);return rt.loading?st:rt.result.nodeType==="void"?Wt.createElement(Wt.Fragment,null):Wt.createElement(PanelPlotConfigInner,{...ot})},stringHashCode=et=>{let tt=0;if(et.length===0)return tt;for(let nt=0;nt<et.length;nt++){const rt=et.charCodeAt(nt);tt=(tt<<5)-tt+rt,tt|=0}return tt},ensureValidSignals=et=>fn(et,tt=>["x","y"].forEach(nt=>{["domain","selection"].forEach(rt=>{isValidDomainForAxisType(tt.signals[rt][nt],getAxisType(tt.series[0],nt))||(tt.signals[rt][nt]=void 0)})})),useConcreteConfig=(et,tt,nt,rt)=>{const ot=react.exports.useMemo(()=>opDict(LAZY_PATHS.reduce((ft,pt)=>{let ht=getThroughArray(et,pt.split("."));return _$2.isArray(ht)&&(ht=opArray(ht.reduce((mt,yt,vt)=>(mt[vt]=yt,mt),{}))),ht==null&&(ht=constNone()),ft[pt]=ht,ft},{})),[et]),st=useNodeValue(ot,{callSite:"PanelPlot.concreteConfig."+rt}),ut=st.result,ct=st.loading;return react.exports.useMemo(()=>{let ft=!1,pt;return ct?(pt=defaultConcretePlot(constNode(list$1(typedDict({})),[]),nt),ft=!0):pt=fn(et,ht=>{LAZY_PATHS.forEach(mt=>{setThroughArray(ht,mt.split("."),ut[mt],!1)})}),{config:pt,loading:ft}},[ut,ct,et,nt])},PanelPlotConfigInner=et=>{const{input:tt,updateConfig:nt}=et,rt=tt,ot=useWeaveContext(),{frame:st,stack:ut,dashboardConfigOptions:ct}=usePanelContext(),{config:ft}=useConfig$2(rt,et.config),pt=react.exports.useCallback(Ft=>{nt(Ft?{...ft,...Ft}:defaultPlot(tt,ut))},[ft,nt,tt,ut]),ht=react.exports.useCallback(()=>{pt(void 0)},[pt]),mt=react.exports.useCallback(()=>{const Ft=condensePlotConfig(ft,ot);pt(Ft)},[ot,ft,pt]),yt=react.exports.useMemo(()=>Wt.createElement(Wt.Fragment,null,["X Axis Label","Y Axis Label","Color Legend Label"].map(Ft=>{const zt=Ft.split(" ")[0].toLowerCase();return Wt.createElement(ConfigOption,{key:Ft,label:Ft},Wt.createElement(TextInputConfigField,{dataTest:`${Ft}-label`,value:ft.axisSettings[zt].title,label:"",onChange:(Vt,{value:Zt})=>{const Ut=fn(ft,Xt=>{_$2.set(Xt,`axisSettings.${zt}.title`,Zt)});pt(Ut)}}))}),ft.series.map((Ft,zt)=>{const Vt=`Series ${zt+1} Name`;return Wt.createElement(ConfigOption,{key:Vt,label:ft.series.length>1?Vt:"Series"},Wt.createElement(TextInputConfigField,{dataTest:`${Vt}-label`,value:Ft.seriesName,label:"",onChange:(Zt,{value:Ut})=>{pt(fn(ft,Xt=>{Xt.series[zt].seriesName=Ut}))}}))})),[ft,pt]),vt=react.exports.useMemo(()=>{const Ft=ft.series[0];return Wt.createElement(Wt.Fragment,null,PLOT_DIMS_UI.map(zt=>{const Vt=isDimShared(ft.series,zt,ot),Zt=ft.configOptionsExpanded[zt],Ut=dimConstructors[zt](Ft,ot),Xt=Vt&&!Zt;return Xt?Wt.createElement(ConfigDimComponent,{key:zt,input:tt,config:ft,updateConfig:pt,indentation:0,isShared:Xt,dimension:Ut}):Wt.createElement(Wt.Fragment,{key:zt},ft.series.map((Jt,gn)=>{const An=dimConstructors[zt](Jt,ot);return Wt.createElement(ConfigDimComponent,{key:`${zt}-${gn}`,input:tt,config:ft,updateConfig:pt,indentation:0,isShared:Xt,dimension:An})}))}))},[ft,ot,tt,pt]),Tt=useWeaveDashUiEnable(),Et=useVegaReadyTables(ft.series,st),{xScaleConfigEnabled:xt,yScaleConfigEnabled:At}=react.exports.useMemo(()=>{return{xScaleConfigEnabled:Ft("x"),yScaleConfigEnabled:Ft("y")};function Ft(zt){return ft.series.some((Vt,Zt)=>{const Ut=Et[Zt],Xt=getDimTypes(Vt.dims,Ut);return isAssignableTo(Xt[zt],maybe("number"))})}},[ft.series,Et]),Ct=xt||At,$t=react.exports.useMemo(()=>Wt.createElement(Wt.Fragment,null,xt&&Wt.createElement(ScaleConfigOption,{config:ft,updateConfig:pt,axis:"x"}),At&&Wt.createElement(ScaleConfigOption,{config:ft,updateConfig:pt,axis:"y"})),[ft,pt,xt,At]),[Ot,Rt]=react.exports.useState(0),It=react.exports.useMemo(()=>{if(Tt)return Wt.createElement(LayoutTabs,{tabNames:["Data","Labels"],renderPanel:({id:zt})=>{if(zt==="Data")return vt;if(zt==="Labels")return yt;throw new Error("Invalid tab id")}});const Ft=[{menuItem:"Data",render:()=>vt},{menuItem:"Labels",render:()=>yt},...Ct?[{menuItem:"Scale",render:()=>$t}]:[]];return Wt.createElement(Tab$2,{menu:{secondary:!0,pointing:!0},panes:Ft,onTabChange:(zt,{activeIndex:Vt})=>{Rt(Vt)},activeIndex:Ot})},[Tt,Ct,Ot,vt,yt,$t]),kt=react.exports.useMemo(()=>Wt.createElement(Wt.Fragment,null,Wt.createElement(Button$3,{size:"mini",onClick:ht},"Reset & Automate Plot"),Wt.createElement(Button$3,{size:"mini",onClick:mt},"Condense")),[ht,mt]),Mt=react.exports.useMemo(()=>{const Ft=ft.series[0].table,zt=tableGetResultTableNode(Ft,tt,ot).rowsNode;return getCellFrame(tt,zt,Ft.groupBy,Ft.columnSelectFunctions,ft.series[0].dims.x)},[ft.series,tt,ot]);return react.exports.useMemo(()=>Tt?Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigSection,{label:"Properties"},ct,Wt.createElement(VariableView,{newVars:Mt}),vt),Wt.createElement(ConfigSection,{label:"Labels"},yt),Wt.createElement(ConfigSection,{label:"Scale"},$t)):Wt.createElement(Wt.Fragment,null,It,Ot===0&&kt),[Tt,ct,Mt,vt,yt,$t,It,Ot,kt])},SCALE_TYPE_OPTIONS=SCALE_TYPES.map(et=>({text:_$2.capitalize(et),value:et})),SCALE_TYPE_SPECIFIC_PROPS={log:{scaleProp:"base",default:10,min:0}},ScaleConfigOptionComp=({updateConfig:et,config:tt,axis:nt})=>{const rt=ut("scaleType")??DEFAULT_SCALE_TYPE,ot=SCALE_TYPE_SPECIFIC_PROPS[rt],st=ot!=null?ut(ot.scaleProp)??ot.default:void 0;return Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:`${nt.toUpperCase()} Axis Scale`},Wt.createElement(ModifiedDropdownConfigField,{options:SCALE_TYPE_OPTIONS,value:rt,onChange:(pt,{value:ht})=>{ct("scaleType",ht)}})),ot!=null&&Wt.createElement(ConfigOption,{label:`${nt.toUpperCase()} ${_$2.capitalize(rt)} ${_$2.capitalize(ot.scaleProp)}`},Wt.createElement(NumberInputConfigField,{min:ot.min,max:ot.max,value:st,onChange:pt=>{pt!=null&&ct(ot.scaleProp,pt)}})));function ut(pt){return _$2.get(tt,ft(pt))}function ct(pt,ht){const mt=fn(tt,yt=>{_$2.set(yt,ft(pt),ht)});et(mt)}function ft(pt){return`axisSettings.${nt}.scale.${pt}`}},ScaleConfigOption=react.exports.memo(ScaleConfigOptionComp),useLoader=()=>Wt.createElement(Panel2Loader,null),stringIsColorLike=et=>et.match("^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$")!=null||et.startsWith("rgb(")&&et.endsWith(")")||et.startsWith("hsl(")&&et.endsWith(")"),ConfigDimLabel=et=>Wt.createElement("div",{style:{paddingLeft:10*et.indentation}},Wt.createElement(ConfigOption,{label:DIM_NAME_MAP[et.dimension.name]+(et.isShared||et.config.series.length===1?"":` ${et.config.series.indexOf(et.dimension.series)+1}`),"data-test":`${et.dimension.name}-dim-config`,postfixComponent:et.postfixComponent},et.children)),WeaveExpressionDimConfig=et=>{const{config:tt,input:nt,updateConfig:rt,series:ot}=et,st=react.exports.useMemo(()=>ot.map(yt=>tt.series.indexOf(yt)),[ot,tt.series]),ut=react.exports.useCallback(yt=>{const vt=fn(tt,Tt=>{st.forEach(Et=>{const xt=Tt.series[Et];xt.table=updateColumnSelect(xt.table,xt.dims[et.dimName],yt)})});rt(vt)},[tt,et.dimName,st,rt]),ct=useWeaveContext(),ft=react.exports.useMemo(()=>ot.map(yt=>yt.table),[ot]),pt=react.exports.useMemo(()=>ot.map(yt=>tableGetResultTableNode(yt.table,nt,ct).rowsNode),[ot,nt,ct]),ht=react.exports.useMemo(()=>ot.map(yt=>yt.dims[et.dimName]),[ot,et.dimName]),mt=react.exports.useMemo(()=>pt.map((yt,vt)=>{const Tt=ft[vt],Et=ht[vt];return getCellFrame(nt,yt,Tt.groupBy,Tt.columnSelectFunctions,Et)}),[pt,nt,ft,ht]);return Wt.createElement(PanelContextProvider,{newVars:mt[0]},Wt.createElement(ExpressionConfigField,{expr:ft[0].columnSelectFunctions[ht[0]],setExpression:ut}))},ConfigDimComponent=et=>{const{updateConfig:tt,config:nt,dimension:rt,isShared:ot,indentation:st,input:ut,extraOptions:ct}=et,ft=useWeaveContext(),pt=useWeaveDashUiEnable(),ht=react.exports.useCallback((At,Ct)=>{const $t=nt.series.length>1?{text:"Remove series",icon:"wbic-ic-delete",onClick:()=>{tt(removeSeries(nt,At))}}:null,Ot={text:"Add series from this series",icon:"wbic-ic-plus",onClick:()=>{const It=addSeriesFromSeries(nt,At,Ct,ft);tt(It)}},Rt=nt.series.length>1?{text:"Collapse dimension",icon:"wbic-ic-collapse",onClick:()=>{tt(makeDimensionShared(nt,At,Ct,ft))}}:null;return[$t,Ot,Rt]},[nt,tt,ft]),mt=react.exports.useCallback(At=>[nt.series.length>1?{text:"Expand dimension",icon:"wbic-ic-expand",onClick:()=>{const $t=fn(nt,Ot=>{Ot.configOptionsExpanded[At]=!0});tt($t)}}:null],[nt,tt]),yt=react.exports.useMemo(()=>{if(!isDropdownWithExpression(rt))return[null];const At=$t=>{const Ot=$t.dropdownDim.options,Rt=$t.expressionDim.state().value,It=Rt.nodeType==="const";return Ot.some(kt=>It&&_$2.isEqual(kt.value,Rt.val)&&kt.representableAsExpression)},Ct=($t,Ot)=>{const Rt=fn(nt,It=>{(ot?It.series:_$2.compact([It.series.find(Mt=>_$2.isEqual(Mt,$t.series))])).forEach(Mt=>Ot(Mt,$t))});tt(Rt)};return[[{text:"Input method",icon:null,disabled:!0},{text:"Select via dropdown",icon:pt?rt.mode()==="dropdown"?Wt.createElement(IconCheckmark,null):Wt.createElement(IconBlank,null):"wbic-ic-list",active:rt.mode()==="dropdown",onClick:()=>{Ct(rt,($t,Ot)=>{if($t.uiState[Ot.name]==="expression"){$t.uiState[Ot.name]="dropdown";const Rt=Ot.expressionDim.state().value;At(Ot)&&($t.constants[Ot.name]=Rt.val)}})}},{text:"Enter a Weave Expression",icon:pt?rt.mode()==="expression"?Wt.createElement(IconCheckmark,null):Wt.createElement(IconBlank,null):"wbic-ic-xaxis",active:rt.mode()==="expression",onClick:()=>{Ct(rt,($t,Ot)=>{if($t.uiState[Ot.name]==="dropdown"&&($t.uiState[Ot.name]="expression",At(Ot))){const Rt=$t.dims[Ot.name];$t.table=updateColumnSelect($t.table,Rt,constString($t.constants[Ot.name]))}})}}]]},[nt,tt,ot,rt,pt]),vt=react.exports.useCallback(At=>ot?mt(At):ht(rt.series,At),[mt,ht,rt.series,ot]),Tt=react.exports.useMemo(()=>_$2.compact([...isTopLevelDimension(rt.name)?vt(rt.name):[],...yt,...ct||[]]),[rt,yt,vt,ct]),Et=react.exports.useMemo(()=>{if(Tt.length===0)return;if(!pt)return Wt.createElement(PopupDropdown,{position:"left center",trigger:Wt.createElement("div",null,Wt.createElement(HighlightedIcon,null,Wt.createElement(LegacyWBIcon,{name:"overflow"}))),options:Tt.filter(kt=>!Array.isArray(kt)),sections:Tt.filter(kt=>Array.isArray(kt))});const At=Tt.filter(kt=>!Array.isArray(kt)),Ct=Tt.filter(kt=>Array.isArray(kt)),$t=At.map(Rt),Ot=Ct.map(kt=>({label:kt[0].text,items:kt.slice(1).map(Rt)}));return Wt.createElement(PopupMenu,{position:"bottom left",trigger:Wt.createElement(ConfigDimMenuButton,null,Wt.createElement(IconOverflowHorizontal$1,null)),items:$t,sections:Ot});function Rt({text:kt,icon:Mt,onClick:Ft}){return{key:kt,content:kt,icon:It(Mt),onClick:Ft}}function It(kt){if(typeof kt!="string")return kt;switch(kt){case"wbic-ic-delete":return Wt.createElement(IconDelete,null);case"wbic-ic-plus":return Wt.createElement(IconAddNew$3,null);case"wbic-ic-collapse":return Wt.createElement(IconMinimizeMode,null);case"wbic-ic-expand":return Wt.createElement(IconFullScreenModeExpand,null);case null:return null;default:return Wt.createElement(IconWeave$1,null)}}},[Tt,pt]),xt=react.exports.useCallback(At=>{const Ct=At?enableGroupByCol:disableGroupByCol;let $t=Ct(nt.series[0].table,nt.series[0].dims[rt.name]);rt.name==="label"&&($t=Ct($t,nt.series[0].dims.color));const Ot=fn(nt,Rt=>{Rt.series[0].table=$t});tt(Ot)},[nt,rt.name,tt]);if(isDropdownWithExpression(rt))return Wt.createElement(ConfigDimComponent,{...et,dimension:rt.mode()==="expression"?rt.expressionDim:rt.dropdownDim,extraOptions:yt});if(isGroup(rt)){const At=rt.primaryDimension();return Wt.createElement(Wt.Fragment,null,rt.activeDimensions().map(Ct=>{const $t=Ct.equals(At);return Wt.createElement(ConfigDimComponent,{...et,key:Ct.name,indentation:$t?st:st+1,dimension:Ct})}))}else if(isDropdown(rt)){const At=rt.name;return Wt.createElement(ConfigDimLabel,{...et,postfixComponent:Et},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,placeholder:rt.defaultState().compareValue,value:rt.state().value,options:rt.options,onChange:(Ct,{value:$t})=>{const Ot=fn(nt.series,Rt=>{Rt.forEach(It=>{(ot||_$2.isEqual(It,rt.series))&&(It.constants[At]=$t)})});tt({series:Ot})}}))}else if(isWeaveExpression(rt))return Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigDimLabel,{...et,postfixComponent:Et},Wt.createElement(WeaveExpressionDimConfig,{dimName:rt.name,input:ut,config:nt,updateConfig:tt,series:ot?nt.series:[rt.series]})),pt&&Wt.createElement(ConfigOption,{label:`Group by ${rt.name}`},Wt.createElement(Checkbox$2,{checked:nt.series[0].table.groupBy.includes(nt.series[0].dims[rt.name]),onChange:(At,{checked:Ct})=>xt(Ct??!1)})));return Wt.createElement(Wt.Fragment,null)},useVegaReadyTables=(et,tt)=>react.exports.useMemo(()=>{const nt=et.map(ot=>ot.table),rt=et.map(ot=>ot.dims);return nt.map((ot,st)=>{const ut=rt[st],ct=ot.columnSelectFunctions[ut.label];if(ct.nodeType!=="void"){const ft=getTableColType(ot,ut.label);if(tt.runColors!=null){if(isAssignableTo(ft,maybe("run"))){let pt=updateColumnSelect(ot,ut.color,opPick({obj:varNode(tt.runColors.type,"runColors"),key:opRunId({run:ct})}));return pt=updateColumnSelect(pt,ut.label,opRunName({run:ct})),pt}else if(ct.nodeType==="output"&&ct.fromOp.name==="run-name")return updateColumnSelect(ot,ut.color,opPick({obj:varNode(tt.runColors.type,"runColors"),key:opRunId({run:ct.fromOp.inputs.run})}))}if(isAssignableTo(ft,oneOrMany(maybe(union$2(["number","string","boolean"])))))return updateColumnSelect(ot,ut.color,ct)}return ot})},[et,tt.runColors]);function fixKeyForVegaTable(et,tt,nt){return fixKeyForVega(getTableColumnName(tt.columnNames,tt.columnSelectFunctions,et,nt))}function filterTableNodeToContinuousSelection(et,tt,nt,rt,ot){return opFilter({arr:et,filterFn:constFunction({row:listObjectType(et.type)},({row:st})=>{const ut=escapeDots(getTableColumnName(nt.columnNames,nt.columnSelectFunctions,tt,ot));let ct=opPick({obj:st,key:constString(ut)});const ft=rt[1]-rt[0];return isAssignableTo(ct.type,maybe(timestampBin))?opAnd({lhs:opNumberGreaterEqual({lhs:opDateToNumber({date:opPick({obj:ct,key:constString("start")})}),rhs:constNumber(rt[0]-DOMAIN_DATAFETCH_EXTRA_EXTENT*ft)}),rhs:opNumberLessEqual({lhs:opDateToNumber({date:opPick({obj:ct,key:constString("stop")})}),rhs:constNumber(rt[1]+DOMAIN_DATAFETCH_EXTRA_EXTENT*ft)})}):isAssignableTo(ct.type,maybe(numberBin))?opAnd({lhs:opNumberGreaterEqual({lhs:opPick({obj:ct,key:constString("start")}),rhs:constNumber(rt[0]-DOMAIN_DATAFETCH_EXTRA_EXTENT*ft)}),rhs:opNumberLessEqual({lhs:opPick({obj:ct,key:constString("stop")}),rhs:constNumber(rt[1]+DOMAIN_DATAFETCH_EXTRA_EXTENT*ft)})}):(isAssignableTo(ct.type,maybe({type:"timestamp",unit:"ms"}))&&(ct=opDateToNumber({date:ct})),opAnd({lhs:opNumberGreaterEqual({lhs:ct,rhs:constNumber(rt[0]-DOMAIN_DATAFETCH_EXTRA_EXTENT*ft)}),rhs:opNumberLessEqual({lhs:ct,rhs:constNumber(rt[1]+DOMAIN_DATAFETCH_EXTRA_EXTENT*ft)})}))})})}function filterTableNodeToDiscreteSelection(et,tt,nt,rt,ot){return opFilter({arr:et,filterFn:constFunction({row:listObjectType(et.type)},({row:st})=>{const ut=escapeDots(getTableColumnName(nt.columnNames,nt.columnSelectFunctions,tt,ot)),ct=opPick({obj:st,key:constString(ut)}),ft=constStringList(rt);return opContains({arr:ft,element:ct})})})}function filterTableNodeToSelection(et,tt,nt,rt,ot){const st=getAxisType(nt,rt),ut=tt[rt],{table:ct,dims:ft}=nt,pt=ft[rt];if(ut){if(st==="quantitative"||st==="temporal")return filterTableNodeToContinuousSelection(et,pt,ct,ut,ot);if(st==="nominal"||st==="ordinal")return filterTableNodeToDiscreteSelection(et,pt,ct,ut,ot);throw new Error("Invalid domain type")}return et}function getMark(et,tt,nt){if(et.constants.mark)return et.constants.mark;let rt="point";const ot=listObjectType(tt.type),st=getDimTypes(et.dims,nt);if(ot!=null&&ot!=="invalid"){if(!isTypedDict(ot))throw new Error("Invalid plot data type");isAssignableTo(st.x,maybe("number"))&&isAssignableTo(st.y,maybe("number"))?rt="point":isAssignableTo(st.x,union$2(["none","string","date",numberBin,timestampBin]))&&isAssignableTo(st.y,maybe("number"))||isAssignableTo(st.x,maybe("number"))&&isAssignableTo(st.y,union$2(["string","date"]))?rt="bar":isAssignableTo(st.x,list$1(maybe("number")))&&isAssignableTo(st.y,union$2(["string","number"]))||isAssignableTo(st.y,list$1(maybe("number")))&&isAssignableTo(st.x,union$2(["string","number"]))?rt="boxplot":isAssignableTo(st.x,list$1("number"))&&isAssignableTo(st.y,list$1("number"))&&(rt="line")}return rt}function getColorAxisType(et,tt){let nt;const rt=getDimTypes(et.dims,tt);return rt.color!=null&&(isAssignableTo(rt.color,oneOrMany(maybe("number")))?nt="quantitative":isAssignableTo(rt.color,oneOrMany(maybe(union$2(["string","boolean"]))))&&(nt="nominal")),nt}function getAxisTimeUnit(et){return et?"yearweek":"yearmonth"}const PanelPlot2Inner=et=>{const tt=useWeaveContext(),{input:nt,updateConfig:rt,updateConfig2:ot}=et,[st,ut]=react.exports.useState("zoom"),ct=react.exports.useRef(st);ct.current=st;const ft=useIsOrgDashboard();react.exports.useEffect(()=>{recordEvent$3("VIEW")},[]);const pt=useIsDashboard(),{frame:ht,stack:mt}=usePanelContext(),{config:yt,isRefining:vt}=useConfig$2(nt,et.config),Tt=useId(),{config:Et,loading:xt}=useConcreteConfig(yt,nt,mt,Tt.toString()),At=react.exports.useCallback(Kn=>{rt(Kn?{...yt,...Kn}:defaultPlot(nt,mt))},[yt,rt,nt,mt]),Ct=nt,$t=react.exports.useCallback(Kn=>ot(Kn),[ot]),Ot=react.exports.useRef($t);Ot.current=$t;const Rt=react.exports.useRef(At);Rt.current=At;const It=react.exports.useMemo(()=>ensureValidSignals(Et),[Et]),kt=react.exports.useRef(yt);kt.current=yt;const Mt=react.exports.useRef(It);Mt.current=It,react.exports.useEffect(()=>{yt.configVersion!==et.config?.configVersion&&At(yt)},[yt,et.config,At]);const Ft=useVegaReadyTables(yt.series,ht),zt=react.exports.useMemo(()=>Ft.map((Kn,Ur)=>dimNames(Kn,yt.series[Ur].dims,tt)),[yt.series,Ft,tt]),Vt=react.exports.useMemo(()=>Ft.map(Kn=>opUnnest({arr:tableGetResultTableNode(Kn,Ct,tt).resultNode})),[Ft,Ct,tt]),Zt=useWeaveDashUiEnable(),Ut=react.exports.useMemo(()=>{const Kn={},Ur=Ft.reduce((Kr,Go,io)=>{let Hr=Vt[io];if(Zt){const Lo=yt.series[io],Ro=getMark(Lo,Hr,Lo.table);["bar","line","point","area"].includes(Ro)&&["x"].forEach(Ho=>{Hr=filterTableNodeToSelection(Hr,It.signals.domain,Lo,Ho,tt.client.opStore)});const No=getAxisType(It.series[0],"x"),lr=getAxisType(It.series[0],"y");(No==="nominal"||lr==="nominal")&&(Hr=opLimit({arr:Hr,limit:constNumber(50)}))}return Kr[io]=Hr,Kr},Kn);return opArray(Ur)},[Ft,Vt,Zt,yt.series,It.series,It.signals.domain,tt.client.opStore]),Xt=react.exports.useRef(Ut),Jt=Ut!==Xt.current;Xt.current=Ut;const gn=useNodeValue(Ut,{callSite:"PanelPlot.flatResultNode."+Tt,skip:vt||xt}),An=react.exports.useCallback(Kn=>Ur=>{const Kr=kt.current.signals.domain[Kn];tt.expToString(Ur)!==tt.expToString(Kr)&&$t(Go=>({...Go,signals:{...Go.signals,domain:{...Go.signals.domain,[Kn]:Ur}}}))},[$t,tt]),sn=react.exports.useMemo(()=>An("x"),[An]),Sn=react.exports.useMemo(()=>An("y"),[An]),In=react.exports.useMemo(()=>({x:sn,y:Sn}),[sn,Sn]),_n=react.exports.useRef(In);_n.current=In;const En=useMutation(yt.signals.domain.x,"set",sn,!1),Ln=useMutation(yt.signals.domain.y,"set",Sn,!1),wn=react.exports.useMemo(()=>({x:En,y:Ln}),[En,Ln]),Dn=react.exports.useRef(wn);Dn.current=wn;const $n=react.exports.useMemo(()=>gn.loading||xt||vt,[gn.loading,xt,vt]),Gn=react.exports.useMemo(()=>$n?[]:gn.result,[gn,$n]),Jn=react.exports.useMemo(()=>It==null||$n?!1:It.series.map((Kn,Ur)=>getMark(Kn,Vt[Ur],Ft[Ur])).some(Kn=>Kn==="line"),[It,$n,Vt,Ft]),zn=react.exports.useMemo(()=>Gn.map((Kn,Ur)=>Kn.map((Kr,Go)=>_$2.set(_$2.set(_$2.mapKeys(Kr,(io,Hr)=>fixKeyForVega(Hr)),"_seriesIndex",Ur),"_rowIndex",Go))),[Gn]);function Qn(Kn){return _$2.mapKeys(_$2.omitBy(Kn,_$2.isNil),(Ur,Kr)=>Kr==="scaleType"?"type":Kr)}const Bn=react.exports.useMemo(()=>{const Kn={domain:[],range:[]},Ur=new Set,Kr=Go=>{const io={solid:[1,0],dashed:[4,2],"short-dashed":[2,1],dotted:[1,1],"dot-dashed":[1,2,4,2]};if(Go!=="series")return Ur.add(Go),io[Go];Ur.size===LINE_SHAPES.length-1&&Ur.clear();for(const Hr of LINE_SHAPES)if(Hr!=="series"&&!Ur.has(Hr))return Ur.add(Hr),io[Hr];return io.solid};return zn.filter((Go,io)=>getMark(It.series[io],Vt[io],Ft[io])==="line").forEach((Go,io)=>{Kn.domain.push(defaultSeriesName(It.series[io],tt)),Kn.range.push(Kr(It.series[io].constants.lineStyle))}),Kn},[tt,It.series,zn,Vt,Ft]),jn=react.exports.useMemo(()=>zn.map((Kn,Ur)=>Kn.some(Kr=>stringIsColorLike(String(Kr[zt[Ur].color])))),[zn,zt]),[Ar,Er]=react.exports.useState(!0),Pr=react.exports.useRef(Ar);Pr.current=Ar;const Nr=react.exports.useRef(Er);Nr.current=Er;const Ir=react.exports.useMemo(()=>zn.flat(),[zn]),no=react.exports.useMemo(()=>Ir.filter(Kn=>{const Ur=It.series[Kn._seriesIndex];return getMark(Ur,Vt[Kn._seriesIndex],Ft[Kn._seriesIndex])==="line"}),[Ir,It.series,Vt,Ft]),ro=react.exports.useMemo(()=>{const Kn=zt.map(Ur=>_$2.invert(Ur));return no.map(Ur=>_$2.mapKeys(Ur,(Kr,Go)=>["_rowIndex","_seriesIndex"].includes(Go)?Go:Kn[Ur._seriesIndex][Go]))},[no,zt]);let ao=react.exports.useMemo(()=>{const Kn=It.series.length>1;return _$2.mapValues(_$2.groupBy(no,Ur=>Ur[zt[Ur._seriesIndex].x]),Ur=>{const Kr={},Go={},{nodeValue:io,nodeType:Hr}=Ur.reduce((Lo,Ro)=>{const{nodeValue:No,nodeType:lr}=Lo,Ho=listObjectType(Vt[Ro._seriesIndex].type);if(!isTypedDict(Ho))throw new Error("expected typed dict");const Cr=_$2.mapValues(_$2.mapKeys(Ho.propertyTypes,(Zo,Cs)=>fixKeyForVega(Cs)),(Zo,Cs)=>Zo&&isTaggedValue(Zo)?taggedValueValueType(Zo):Zo),Bs=It.series[Ro._seriesIndex],Dl=defaultSeriesName(Bs,tt),Sl=zt[Ro._seriesIndex].x,Os=Ro[Sl],dl=zt[Ro._seriesIndex].y,As=Ro[dl];let ol=!1;if(["x","y"].forEach(Zo=>{const Cs=It.signals.domain[Zo];Cs&&(selectionContainsValue(Cs,Zo==="x"?Os:As)||(ol=!0))}),ol)return Lo;No[Sl]=Os,lr[Sl]=Cr[Sl];const _l=Ft[Ro._seriesIndex].columnSelectFunctions[Bs.dims.tooltip],Ul=Ro[zt[Ro._seriesIndex].label],zo=Kn?`${Dl}${Ul!=null?", "+Ul:""}`:Ul||Dl;return isVoidNode(_l)?(No[zo]=Ro[zt[Ro._seriesIndex].y],lr[zo]=Cr[zt[Ro._seriesIndex].y]):(No[zo]=Ro[zt[Ro._seriesIndex].tooltip],lr[zo]=Cr[zt[Ro._seriesIndex].tooltip]),{nodeValue:No,nodeType:lr}},{nodeValue:Kr,nodeType:Go});return constNodeUnsafe(typedDict(Hr),io)})},[It.series,no,zt,Vt,tt,Ft,It.signals.domain]);const Xr=react.exports.useMemo(()=>{const Kn=["x","y"].map(Kr=>{if(Vt.map((Ro,No)=>{const lr=yt.series[No],Ho=lr.table.columnSelectFunctions[lr.dims[Kr]];return filterNodes(Ho,Cr=>Cr.nodeType==="output"&&(Cr.fromOp.name==="count"||Cr.fromOp.name.endsWith("sum"))).length>0}).includes(!0))return;const io=Vt.reduce((Ro,No,lr)=>{const Ho=dimNamesRaw(yt.series[lr].table,yt.series[lr].dims,tt)[Kr],Bs=withoutTags(listObjectType(No.type)).propertyTypes[Ho];return Bs!=null&&Ro.push(Bs),Ro},[]),Hr=_$2.uniqBy(io,JSON.stringify);let Lo="invalid";if(!(Hr.length>2)){{if(Hr.length===2&&!Hr.includes("invalid"))return;Hr.length===2?Hr.forEach(Ro=>{Ro!=="invalid"&&(Lo=Ro)}):Lo=Hr.values().next().value}if(Lo!=null){if(isAssignableTo(Lo,oneOrMany(maybe("number")))||isAssignableTo(Lo,oneOrMany(maybe(numberBin))))return"quantitative";if(isAssignableTo(Lo,oneOrMany(maybe({type:"timestamp"})))||isAssignableTo(Lo,oneOrMany(maybe(timestampBin))))return"temporal"}}}),Ur={};return Kn[0]!=null&&(Ur.x=Kn[0]),Kn[1]!=null&&(Ur.y=Kn[1]),Ur},[Vt,yt.series,tt]);ao=react.exports.useMemo(()=>Xr.x!=="temporal"?ao:_$2.mapKeys(ao,(Kn,Ur)=>Date.parse(Ur)),[Xr.x,ao]);const Jr=react.exports.useMemo(()=>It.signals.domain.x?{scale:{domain:It.signals.domain.x}}:{},[It.signals.domain.x]),So=react.exports.useMemo(()=>It.signals.domain.y?{scale:{domain:It.signals.domain.y}}:{},[It.signals.domain.y]),[va,$o]=react.exports.useState(),Qr=react.exports.useRef(Jn);Qr.current=Jn;const jo=react.exports.useRef(va);jo.current=va;const Bo=react.exports.useRef($o);Bo.current=$o;const ss=react.exports.useRef(!0),Us=react.exports.useMemo(()=>{const Kn=zn.map((Ro,No)=>{const lr=Ft[No],Ho=It.series[No],Cr=_$2.omitBy(Ho.dims,(Cs,Rs)=>Rs.startsWith("_")),Bs=getDimTypes(Cr,lr),Dl=jn[No],Sl=listObjectType(Vt[No].type);if(!isTypedDict(Sl))throw new Error("Invalid plot data type");const Os=getAxisType(It.series[0],"x"),dl=getAxisType(It.series[0],"y"),As=getAxisTimeUnit(pt),ol=getAxisTimeUnit(pt),_l=getColorAxisType(Ho,lr),Ul=getMark(Ho,Vt[No],lr),zo=_$2.merge(_$2.cloneDeep(PLOT_TEMPLATE),ft?_$2.cloneDeep(ORG_DASHBOARD_TEMPLATE_OVERLAY):{},It?.vegaOverlay??{});zo.data={name:`wandb-${No}`},zo.name=`Layer${No+1}`,zo.transform=[];const Zo=Cs=>fixKeyForVegaTable(Cs,lr,tt.client.opStore);if(Os!=null){const Cs=Zo(Cr.x);isAssignableTo(Bs.x,maybe(numberBin))||isAssignableTo(Bs.x,maybe(timestampBin))?Ul==="bar"?(zo.encoding.x={field:Cs+".start",type:Os},zo.encoding.x2={field:Cs+".stop",type:Os}):(zo.transform.push({calculate:`0.5 * (datum['${Cs}'].stop + datum['${Cs}'].start)`,as:`${Cs}_center`}),zo.encoding.x={field:`${Cs}_center`,type:Os}):zo.encoding.x={field:Cs,type:Os,...Jr},Os==="temporal"&&As&&pt&&(zo.encoding.x.timeUnit=As)}if(zo.mark.type=Ul,zo.mark.clip=!0,dl!=null){const Cs=Zo(Cr.y);if(isAssignableTo(Bs.y,maybe(numberBin))&&zo.mark.type!=="area")zo.encoding.y={field:Cs+".start",type:dl},zo.encoding.y2={field:Cs+".stop",type:dl};else if(zo.mark.type==="area"&&isAssignableTo(Bs.y2,Bs.y)){const Rs=Zo(Cr.y2);zo.encoding.y={field:Cs,type:dl},zo.encoding.y2={field:Rs,type:dl},zo.mark.opacity=.2}else zo.encoding.y={field:Cs,type:dl},dl==="temporal"&&ol&&(zo.encoding.y.timeUnit=ol)}if(_l!=null&&Ho.uiState.label==="expression"?(zo.encoding.color={field:Zo(Cr.color),type:_l},lr.columnSelectFunctions[Cr.label].type!=="invalid"&&(zo.encoding.color.field=Zo(Cr.label),Dl&&(zo.encoding.color.scale={range:{field:Zo(Cr.color)}}))):Ho.uiState.label==="dropdown"&&(zo.encoding.color={datum:defaultSeriesName(Ho,tt),title:"series",legend:{...defaultFontStyleDict}}),zo.mark.type==="point"){if(zo.mark.filled=!0,Cr.pointSize&&!isAssignableTo(Bs.pointSize,"invalid")){const Cs=Zo(Cr.pointSize);let Rs=!1;const Nl=new Set;if(isAssignableTo(Bs.pointSize,"number")){for(const wu of Ro)Nl.add(wu[Cs]);Nl.size<=1&&(Rs=!0)}Rs?zo.mark.size=Nl.values().next().value:(zo.encoding.size={field:Zo(Cr.pointSize),legend:{...defaultFontStyleDict}},isAssignableTo(Bs.pointSize,maybe("number"))&&(zo.encoding.size.type="quantitative"))}if(Cr.pointShape&&!isAssignableTo(Bs.pointShape,"invalid")&&Ho.uiState.pointShape==="expression"){const Cs=Zo(Cr.pointShape),Rs=!(isAssignableTo(Bs.pointShape,"string")&&Ro.every(Nl=>POINT_SHAPES.includes(Nl[Cs])));zo.encoding.shape={legend:{...defaultFontStyleDict},field:Zo(Cr.pointShape)},Rs||(zo.encoding.shape.scale=null)}Ho.uiState.pointShape==="dropdown"&&(Ho.constants.pointShape!=="series"?zo.mark.shape=Ho.constants.pointShape:zo.encoding.shape={legend:{...defaultFontStyleDict},datum:defaultSeriesName(Ho,tt),title:"series"})}if(zo.mark.type==="line"){const Cs={mark:{type:"line"},encoding:{strokeDash:{datum:defaultSeriesName(Ho,tt),legend:{...defaultFontStyleDict},title:"series",scale:Bn}}};zo.mark={...zo.mark,...Cs.mark},zo.encoding.strokeDash=Cs.encoding.strokeDash}return zo.mark.type==="boxplot"&&!zo.encoding.tooltip&&(zo.mark="boxplot",zo.encoding.tooltip={field:getTableColumnName(lr.columnNames,lr.columnSelectFunctions,Cr.tooltip??Cr.y,tt.client.opStore)}),zo.mark.type==="bar"&&(zo.encoding.x2!=null&&zo.encoding.y2==null?zo.encoding.y.aggregate="sum":zo.encoding.y2!=null&&zo.encoding.x2==null&&(zo.encoding.x.aggregate="sum")),zo.encoding.tooltip||(zo.transform=[{calculate:"datum",as:"__row"}],zo.encoding.tooltip={field:"__row"}),zo.encoding.y||(zo.encoding.y={}),_$2.isEmpty(So)||(zo.encoding.y=_$2.merge(zo.encoding.y??{},So)),zo.name=`Series-${No}`,zo}),Ur=Kn.filter(Ro=>Ro.mark.type==="line"),Kr=Kn.filter(Ro=>Ro.mark.type!=="line");if(Kn.length===0)return Kn;const Go={x:Jr,y:So,color:{scale:null,name:stringHashCode(JSON.stringify(va?.map(Ro=>({domain:Ro.domain(),range:Ro.range(),type:Ro.type}))??"")),type:"ordinal"}},io=Kn.reduce((Ro,No)=>(["x","y","color"].forEach(lr=>{No.encoding[lr]&&!Ro[lr]&&(Ro[lr]={field:lr,type:No.encoding[lr].type,legend:!1,...Go[lr]})}),Ro),{}),Hr={data:{name:`wandb-${It.series.length}`},encoding:_$2.pick(io,["x"]),layer:[{encoding:_$2.pick(io,["y","color"]),layer:[{transform:[{filter:{param:"hover",empty:!1}}],mark:"point"}]},{transform:[{pivot:"color",value:"y",groupby:["x"]}],mark:"rule",encoding:{opacity:{condition:{value:.3,param:"hover",empty:!1},value:0},tooltip:{field:"x"}},params:[{name:"hover",select:{type:"point",fields:["x"],nearest:!0,on:"mouseover[event.buttons === 0]",clear:"mouseout"}}]}]};let Lo=[];return pt||(Lo=[{transform:[{filter:"false"}],data:{name:`wandb-${It.series.length}`},encoding:_$2.pick(io,["x","y"]),mark:"point",params:[{name:"brush",select:{type:"interval",encodings:Object.keys(Xr)}}]}]),[...Ur,...Jn?[Hr]:[],...Kr,...Lo]},[tt,Bn,zn,Ft,jn,Vt,ft,It.series,It?.vegaOverlay,pt,Jn,Xr,Jr,So,va]);react.exports.useEffect(()=>{Jt&&(ss.current=!0)},[Jt]);const Eo=react.exports.useMemo(()=>{const Kn={};zn.forEach((Kr,Go)=>{Kn[`wandb-${Go}`]=Kr.filter(io=>{if(Us[Go].mark?.type==="line"&&(io[zt[Go].x]==null||io[zt[Go].y]==null))return!1;for(const Hr of["x","y"])if(It.axisSettings[Hr].scale?.scaleType==="log"&&io[zt[Go][Hr]]<=0)return!1;return!0})});const Ur=ro.filter(Kr=>{for(const Go of["x","y"]){const io=It.signals.domain[Go];if(io&&!selectionContainsValue(io,Kr[Go]))return!1}return!0});return va&&Ur.forEach(Kr=>{if(Kr.label!=null){const Go=va?.[Kr._seriesIndex];Go&&(Kr.color=Go(Kr.label))}}),(Jn||!pt)&&(Kn[`wandb-${It.series.length}`]=Ur),Kn},[Jn,pt,zn,zt,Us,ro,It.axisSettings,It.series,It.signals.domain,va]),Do=react.exports.useMemo(()=>{const Kn={layer:Us},Ur=It.axisSettings,Kr=It.legendSettings;return Kn.encoding={x:{axis:{}},y:{axis:{}},color:{axis:{}}},Us.some(Go=>Go.encoding?.x!=null)&&(["x","y","color"].forEach(Go=>{Kn.encoding[Go]={},Kn.encoding[Go].axis={}}),Kn.encoding.x.axis=pt?{format:"%m/%d/%y",grid:!1,...defaultFontStyleDict}:{...defaultFontStyleDict}),Ur.x.scale!=null&&(Kn.encoding.x.scale=Qn(Ur.x.scale)),Ur.x.noTitle?Kn.encoding.x.axis.title=null:Kn.encoding.x.axis.title=Ur.x.title??defaultAxisLabel(It.series,"x",tt),Ur.x.noLabels&&(Kn.encoding.x.axis.labels=!1),Ur.x.noTicks&&(Kn.encoding.x.axis.ticks=!1),Ur.x.noTitle&&Ur.x.noLabels&&Ur.x.noTicks&&(Kn.encoding.x.axis=!1),Kn.encoding.y!=null&&(Kn.encoding.y.axis={...defaultFontStyleDict},Ur.y.scale!=null&&(Kn.encoding.y.scale=Qn(Ur.y.scale)),Ur.y.noTitle?Kn.encoding.y.axis.title=null:Kn.encoding.y.axis.title=Ur.y.title??defaultAxisLabel(It.series,"y",tt),Ur.y.noLabels&&(Kn.encoding.y.axis.labels=!1),Ur.y.noTicks&&(Kn.encoding.y.axis.ticks=!1),Ur.y.noTitle&&Ur.y.noLabels&&Ur.y.noTicks&&(Kn.encoding.y.axis=!1)),Kn.encoding.color!=null&&(Ur?.color?.scale!=null&&(Kn.encoding.color.scale=Qn(Ur.color.scale)),Ur.color&&Ur.color.noTitle?Kn.encoding.color.title=null:Kn.encoding.color.title=Ur.color?.title??defaultAxisLabel(It.series,"label",tt),Kr.color.noLegend?Kn.encoding.color.legend=!1:Kn.encoding.color.legend||(Kn.encoding.color.legend={...defaultFontStyleDict})),Kn},[tt,It.series,pt,Us,It.axisSettings,It.legendSettings]),bo=react.exports.useCallback(Kn=>{if(Kn!==void 0)return yt.series[Kn]},[yt.series]),Vo=react.exports.useRef(null),Ts=react.exports.useCallback(Kn=>{let Ur=Kn;const Kr={unit:`layer_${It.series.length+(Jn?1:0)}`,fields:[]};["x","y"].forEach(io=>{const Hr=It.signals.selection[io];Hr&&(Ur=Ur.signal(`brush_${io}`,Hr),Kr.fields.push({field:io,channel:io,type:selectionIsContinuous(Hr)?"R":"E"}))}),Kr.fields.length>0&&(Ur=Ur.data("brush_store",Kr)),Ur.run();let Go=!0;try{Kn.signal("unit")}catch{Go=!1}Go&&Kn.addSignalListener("unit",(io,Hr)=>{const Lo=Qr.current,Ro=Mt.current,No=Bo.current,lr=ss.current;if(Lo&&lr){const Ho=Ro.series.map((Cr,Bs)=>{try{return Kn.scale(`Series_${Bs}_color`)}catch{return Kn.scale("color")}});No(Ho),ss.current=!1}}),Kn.addEventListener("mouseup",async()=>{const io=ct.current,Hr=Ot.current,Lo=Dn.current,Ro=Mt.current,No=Nr.current,lr="brush",Ho="brush_store",Cr=Kn.getState({signals:Sl=>Sl===lr,data:Sl=>!!Sl&&Sl.includes(Ho)}),Bs=Cr?.signals[lr],Dl=Cr?.data[Ho];_$2.isEmpty(Bs)?_$2.isEmpty(Dl)&&!(_$2.isEmpty(Ro.signals.selection.x)&&_$2.isEmpty(Ro.signals.selection.y))&&Hr(Sl=>fn(Sl,Os=>{["x","y"].forEach(dl=>{Os.signals.selection[dl]=void 0})})):(io==="zoom"?"domain":"selection")==="domain"?Object.keys(Xr).forEach(Os=>{const dl=Bs[Os],As=Ro.signals.domain[Os];let ol;Xr[Os]==="temporal"?ol=constNode({type:"list",objectType:{type:"timestamp"}},dl):ol=constNode(toWeaveType(dl),dl),_$2.isEqual(As,dl)||Lo[Os]({val:ol}),Hr(_l=>fn(_l,Ul=>{Ul.signals.selection[Os]=void 0}))}):Hr(Os=>fn(Os,dl=>{["x","y"].forEach(As=>{const ol=Bs[As];dl.signals.selection[As]=ol})})),setTimeout(()=>{No(!0)},600)}),Kn.addEventListener("dblclick",async()=>{const io=kt.current,Hr=Dn.current;["x","y"].some(Lo=>{const Ro=io.signals.domain[Lo];return!(isConstNode(Ro)&&Ro.type==="none")})&&["x","y"].forEach(Lo=>{Hr[Lo]({val:constNode("none",null)})})}),Kn.addEventListener("mousedown",async()=>{const io=Nr.current;io(!1)})},[It.series.length,It.signals.selection,Jn,Xr]),[xs,Qo]=react.exports.useState({x:void 0,y:void 0,value:void 0}),Gs=react.exports.useMemo(()=>xs.value!=null&&xs.value._seriesIndex==null?bo(0):bo(xs.value?._seriesIndex),[bo,xs.value]),Es=react.exports.useMemo(()=>{if(Gs)return yt.series.indexOf(Gs)},[yt.series,Gs]),Il=react.exports.useCallback((Kn,Ur,Kr,Go)=>{let{x:io,y:Hr}={};if(Go==null)Qo({x:void 0,y:void 0,value:void 0});else{try{calculatePosition(Ur,Vo.current?.getBoundingClientRect(),10,10)}catch{Qo({x:void 0,y:void 0,value:void 0});return}io=Ur.x+10,Hr=Ur.y+10,Qo({x:io,y:Hr,value:Go})}},[Qo]),ws=react.exports.useMemo(()=>xs.value!=null&&!_$2.isPlainObject(xs.value),[xs]),vn=react.exports.useMemo(()=>{if(ws)return ao[xs.value]??voidNode();const Kn=xs.value?._seriesIndex,Ur=xs.value?._rowIndex,Kr=yt.series[Kn];if(Kn==null||Ur==null)return voidNode();const Go=opIndex({arr:Vt[Kn],index:constNumber(Ur)}),io=Ft[Kn].columnSelectFunctions[Kr.dims.tooltip];return io.nodeType==="void"||io.type==="invalid"?Go:opPick({obj:Go,key:constString(escapeDots(getTableColumnName(Kr.table.columnNames,Kr.table.columnSelectFunctions,Kr.dims.tooltip,tt.client.opStore)))})},[yt.series,xs.value,Vt,Ft,tt.client.opStore,ao,ws]),Rn=react.exports.useMemo(()=>getPanelStacksForType(vn.type,void 0,{excludeTable:!0,excludePlot:!0,excludeBarChart:!0}).handler,[vn]),Zr=react.exports.useMemo(()=>{const Kn=Go=>{};if(ws)return Kn;const Ur=xs.value?._seriesIndex,Kr=xs.value?._rowIndex;return Ur==null||Kr==null?Kn:Go=>{const io=fn(yt.series,Hr=>{const Lo=Hr[Ur];Lo.table=updateColumnPanelConfig(Lo.table,Lo.dims.tooltip,Go)});return At({series:io})}},[yt.series,At,ws,xs]),Wn=Wt.createElement(Panel2Loader,null);return Wt.createElement("div",{"data-test":"panel-plot-2-wrapper",style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",position:"relative",alignItems:"flex-start"},className:$n?"loading":""},$n?Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wn):Wt.createElement(Wt.Fragment,null,Zt&&Wt.createElement("div",{style:{position:"absolute",bottom:"10px",right:"10px",zIndex:1}},Wt.createElement(PanelPlotRadioButtons,{currentValue:st,setMode:ut})),Wt.createElement("div",{"data-test-weave-id":"plot",style:{width:"100%",height:"100%"}},Ar&&Wt.createElement(Portal,null,Wt.createElement("div",{ref:Vo,style:{position:"fixed",visibility:xs.x==null?"hidden":"visible",borderRadius:2,padding:4,top:xs.y,left:xs.x,zIndex:2147483605+9e3,background:"#fff",boxShadow:"1px 1px 4px rgba(0, 0, 0, 0.2)",...getPanelStackDims(Rn,vn.type,yt)}},vn.nodeType!=="void"&&Rn&&Wt.createElement(PanelComp2,{input:vn,inputType:vn.type,loading:!1,panelSpec:Rn,configMode:!1,context:et.context,config:yt.series[Es??0].table.columns[yt.series[Es??0].dims.tooltip].panelConfig,updateConfig:Zr,updateContext:et.updateContext}))),Wt.createElement(CustomPanelRenderer,{spec:Do,loading:!1,slow:!1,data:Eo,userSettings:{fieldSettings:{title:yt.title},stringSettings:{title:""}},handleTooltip:Il,onNewView:Ts}))))},PanelPlot2=et=>{const{input:tt}=et,nt=react.exports.useMemo(()=>normalizeTableLike(tt),[tt]),rt=useNodeWithServerType(nt),ot=react.exports.useMemo(()=>({...et,input:rt.result}),[et,rt.result]),st=useLoader();return rt.loading?Wt.createElement("div",{style:{height:"100%",width:"100%"}},st):rt.result.nodeType==="void"?Wt.createElement("div",{style:{height:"100%",width:"100"}}):Wt.createElement("div",{style:{height:"100%",width:"100%"}},Wt.createElement(PanelPlot2Inner,{...ot}))},Portal=et=>{const tt=react.exports.useRef(document.createElement("div"));return react.exports.useEffect(()=>{const nt=tt.current;return document.body.appendChild(nt),()=>{document.body.removeChild(nt)}},[]),ReactDOM.createPortal(et.children,tt.current)},Spec$J={id:"plot",initialize:async(et,tt,nt)=>{if(tt.nodeType==="void")throw new Error("Plot input node is null");const rt=await et.refineNode(normalizeTableLike(tt),nt);return panelPlotDefaultConfig(rt,void 0,nt)},ConfigComponent:PanelPlotConfig,Component:PanelPlot2,inputType:inputType$I,defaultFixedSize:{width:200,height:9/16*200},isValid:et=>isValidConfig(et).valid},PLOT_TEMPLATE={$schema:"https://vega.github.io/schema/vega-lite/v4.json",data:{name:"wandb"},padding:1,title:"${field:title}",mark:{},params:[],encoding:{}},ORG_DASHBOARD_TEMPLATE_OVERLAY={config:{legend:{disable:!0},axis:{title:null},style:{cell:{stroke:"transparent"}}}},ConfigDimMenuButton=styled$1(IconButton$3).attrs({small:!0})`
  margin-left: 4px;
`,IconBlank=styled$1.svg`
  width: 18px;
  height: 18px;
`,inputType$H={type:"union",members:["histogram","none"]};function getPrecomputedHistogramSpec(et){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:"A simple histogram",data:{name:"wandb"},title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{x:{type:"quantitative",field:"${field:start}",axis:{title:null}},x2:{field:"${field:end}"},y:{type:"quantitative",field:"${field:count}",axis:{title:null}},...et?{color:{type:"nominal",field:"color",legend:!1,scale:{range:{field:"color"}}}}:{},opacity:{value:et?.7:1}},background:"rgba(0,0,0,0)",width:"container",height:"container",autosize:{type:"fit",contains:"content"}}}const PanelPrecomputedHistogram=et=>{const tt=useColorNode(et.input),nt=useNodeValue(tt),rt=tt.nodeType!=="void",{ref:ot,inView:st}=useInView(),ut=useGatedValue(st,pt=>pt),ct=useNodeValue(et.input),ft=react.exports.useMemo(()=>ct.loading||rt&&nt.loading||ct.result==null?[]:rt?ct.result.values.map((pt,ht)=>({count:pt,start:ct.result.bins[ht],end:ct.result.bins[ht+1],color:nt.result[ht]??"#94aecb"})):ct.result.values.map((pt,ht)=>({count:pt,start:ct.result.bins[ht],end:ct.result.bins[ht+1]})),[ct,rt,nt]);return ct.loading?Wt.createElement(Panel2Loader,null):ft.length===0?Wt.createElement(Wt.Fragment,null,"-"):Wt.createElement("div",{ref:ot,style:{width:"100%",height:"100%"}},!ct.loading&&ut?Wt.createElement(CustomPanelRenderer,{spec:getPrecomputedHistogramSpec(rt),loading:!1,slow:!1,data:ft,userSettings:{fieldSettings:{count:"count",start:"start",end:"end"},stringSettings:{title:""}}}):Wt.createElement("div",{style:{backgroundColor:"#eee",width:"100%",height:"100%"}}))},Spec$I={id:"precomputed-histogram",Component:PanelPrecomputedHistogram,inputType:inputType$H,canFullscreen:!0},getValidColumns=et=>{const tt=nullableTaggableValue(listObjectType(et));let nt=[],rt=[];if(isAssignableTo(tt,typedDict({}))){const ot=allObjPaths(tt);nt=ot.filter(st=>isAssignableTo(nonNullable(st.type),list$1("number"))).map(st=>st.path.join(".")),rt=ot.filter(st=>isAssignableTo(nonNullable(st.type),"number")).map(st=>st.path.join("."))}return{validEmbeddingColumns:nt,validNumericColumns:rt}},processConfig=(et,tt)=>{const{validEmbeddingColumns:nt,validNumericColumns:rt}=getValidColumns(tt.type),ot=et?.projectionAlgorithm??"pca",st=et?.inputCardinality??(nt.length>0?"single":"multiple");let ut=et?.inputColumnNames??[];return st==="single"?(ut.length>=1&&nt.indexOf(ut[0])===-1&&(ut=[]),ut.length===0&&nt.length>0&&(ut=[nt[0]])):(ut.length>0&&lodash$2.exports.some(ut,ct=>rt.indexOf(ct)===-1)&&(ut=[]),ut.length===0&&rt.length>0&&(ut=rt)),{projectionAlgorithm:ot,inputCardinality:st,inputColumnNames:ut,algorithmOptions:{pca:{},tsne:{perplexity:et?.algorithmOptions?.tsne?.perplexity??30,learningRate:et?.algorithmOptions?.tsne?.learningRate??10,iterations:et?.algorithmOptions?.tsne?.iterations??25},umap:{neighbors:et?.algorithmOptions?.umap?.neighbors??15,minDist:et?.algorithmOptions?.umap?.minDist??.1,spread:et?.algorithmOptions?.umap?.spread??1}}}},MIN_ITER=500,ALGO_OPTIONS=[{text:"PCA",value:"pca"},{text:"t-SNE",value:"tsne"},{text:"UMAP",value:"umap"}],FIELD_TYPE_OPTIONS=[{value:"single",text:"Single Embedding Column"},{value:"multiple",text:"Many Numeric Columns"}],PanelProjectionConverter=et=>{throw new Error("PanelProjectionConverter: cannot be rendered directly")},PanelProjectionConverterConfig=et=>isTableTypeLike(et.input.type)?Wt.createElement(PanelProjectionConverterTableConfig,{...et}):Wt.createElement(PanelProjectionConverterConfigInner,{...et}),PanelProjectionConverterTableConfig=et=>{const{input:tt}=et,nt=react.exports.useMemo(()=>normalizeTableLike(tt),[tt]),rt=useNodeWithServerType(nt);return rt.loading?Wt.createElement(Wt.Fragment,null):rt.result.nodeType==="void"?Wt.createElement(Wt.Fragment,null,"Input node returned void type"):Wt.createElement(PanelProjectionConverterConfigInner,{...et,input:rt.result})},PanelProjectionConverterConfigInner=et=>{const{input:tt,config:nt,updateConfig:rt}=et,ot=react.exports.useMemo(()=>{let mt=processConfig(nt,tt);return mt.projectionAlgorithm==="tsne"&&mt?.algorithmOptions?.tsne?.iterations<MIN_ITER&&(mt=fn(mt,yt=>{yt.algorithmOptions.tsne.iterations=MIN_ITER})),mt},[nt,tt]),{validEmbeddingColumns:st,validNumericColumns:ut}=react.exports.useMemo(()=>getValidColumns(tt.type),[tt]),ct=react.exports.useMemo(()=>(ot.inputCardinality==="multiple"?ut:st).map(mt=>({value:mt,text:mt})),[ot.inputCardinality,ut,st]),ft=react.exports.useMemo(()=>ot.inputCardinality==="multiple"?ot.inputColumnNames:ot.inputColumnNames.length>0?ot.inputColumnNames[0]:void 0,[ot]),pt=react.exports.useCallback(mt=>{const yt=Array.isArray(mt)?mt:[mt];return vt=>{const Tt={};let Et=Tt;yt.forEach((xt,At)=>{At===yt.length-1?Et[xt]=vt:(At===0?Et[xt]={...(nt??{})[xt]??{}}:Et[xt]={...Et[xt]??{}},Et=Et[xt])}),rt(Tt)}},[nt,rt]),ht=react.exports.useCallback(mt=>(yt,vt)=>{pt(mt)(vt.value)},[pt]);return Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Algo"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,scrolling:!0,multiple:!1,options:ALGO_OPTIONS,value:ot.projectionAlgorithm,onChange:ht("projectionAlgorithm")})),ot.projectionAlgorithm==="tsne"&&Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Perplexity"},Wt.createElement(NumberInputConfigField,{min:0,max:1e3,stepper:!0,strideLength:1,value:ot?.algorithmOptions?.tsne?.perplexity,onChange:pt(["algorithmOptions","tsne","perplexity"])})),Wt.createElement(ConfigOption,{label:"Learning Rate"},Wt.createElement(NumberInputConfigField,{min:0,stepper:!0,strideLength:1,max:5e3,value:ot?.algorithmOptions?.tsne?.learningRate,onChange:pt(["algorithmOptions","tsne","learningRate"])})),Wt.createElement(ConfigOption,{label:"Iterations"},Wt.createElement(NumberInputConfigField,{min:500,max:1e3,stepper:!0,strideLength:1,value:ot?.algorithmOptions?.tsne?.iterations,onChange:pt(["algorithmOptions","tsne","iterations"])}))),ot.projectionAlgorithm==="umap"&&Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"Neighbors"},Wt.createElement(NumberInputConfigField,{min:0,max:1e3,stepper:!0,strideLength:1,value:ot?.algorithmOptions?.umap?.neighbors,onChange:pt(["algorithmOptions","umap","neighbors"])})),Wt.createElement(ConfigOption,{label:"Min Dist"},Wt.createElement(NumberInputConfigField,{min:0,max:1e3,stepper:!0,strideLength:1,value:ot?.algorithmOptions?.umap?.minDist,onChange:pt(["algorithmOptions","umap","minDist"])})),Wt.createElement(ConfigOption,{label:"Spread"},Wt.createElement(NumberInputConfigField,{min:0,max:1e3,stepper:!0,strideLength:1,value:ot?.algorithmOptions?.umap?.spread,onChange:pt(["algorithmOptions","umap","spread"])}))),Wt.createElement(ConfigOption,{label:"Field Type"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,scrolling:!0,multiple:!1,options:FIELD_TYPE_OPTIONS,value:ot.inputCardinality,onChange:ht("inputCardinality")})),Wt.createElement(ConfigOption,{label:`Field${ot.inputCardinality==="multiple"?"s":""}`},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,scrolling:!0,multiple:ot.inputCardinality==="multiple",options:ct,value:ft,onChange:ht("inputColumnNames")})))},outputType=et=>{let tt=et;return isTableTypeLike(et)&&(tt=list$1(typedDict({}))),list$1(typedDict({source:listObjectType(tt),projection:list$1("number")}),listMinLength(tt),listMaxLength(tt))},equivalentTransform=async(et,tt,nt)=>{let rt=et;if(isTableTypeLike(et.type)&&(rt=await nt(rt),rt=normalizeTableLike(rt),rt=await nt(rt)),!isListLike(rt.type)||!isTypedDictLike(listObjectType(rt.type)))return constNodeUnsafe(list$1(typedDict({projection:typedDict({x:"number",y:"number"}),source:"none"})),[]);const ot=processConfig(tt,rt);return opTable2DProjection({table:rt,projectionAlgorithm:constString(ot.projectionAlgorithm),inputCardinality:constString(ot.inputCardinality),inputColumnNames:constStringList(ot.inputColumnNames),algorithmOptions:constNodeUnsafe(typedDict({tsne:{type:"typedDict",propertyTypes:{perplexity:"number",learningRate:"number",iterations:"number"}},pca:{type:"typedDict",propertyTypes:{}},umap:{type:"typedDict",propertyTypes:{neighbors:"number",minDist:"number",spread:"number"}}}),ot.algorithmOptions)})},ProjectableType={type:"list",objectType:{type:"typedDict",propertyTypes:{}}},inputType$G={type:"union",members:[ProjectableType,ConvertibleToDataTableType]},Spec$H={id:"projection",displayName:"2D Projection",Component:PanelProjectionConverter,ConfigComponent:PanelProjectionConverterConfig,inputType:inputType$G,outputType,equivalentTransform};registerPanelFunction(Spec$H.id,Spec$H.inputType,Spec$H.equivalentTransform);var TableRow$2={},utils={};const require$$1=getAugmentedNamespace(_typeof$9);var hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var et=interopRequireDefault.exports;Object.defineProperty(utils,"__esModule",{value:!0}),utils.renderElement=ut,utils.normalizeColumns=ct,utils.isObjectEqual=ft,utils.callOrReturn=pt,utils.hasChildren=ht,utils.unflatten=mt,utils.flattenOnKeys=yt,utils.cloneArray=vt,utils.noop=Tt,utils.toString=Et,utils.getValue=At,utils.getScrollbarSize=Rt,utils.addClassName=It,utils.removeClassName=kt,utils.getEstimatedTotalRowsHeight=Mt,utils.throttle=utils.debounce=void 0;var tt=et(require$$1),nt=et(require$$2$2),rt=et(react.exports);function ot(Ft,zt){var Vt=Object.keys(Ft);if(Object.getOwnPropertySymbols){var Zt=Object.getOwnPropertySymbols(Ft);zt&&(Zt=Zt.filter(function(Ut){return Object.getOwnPropertyDescriptor(Ft,Ut).enumerable})),Vt.push.apply(Vt,Zt)}return Vt}function st(Ft){for(var zt=1;zt<arguments.length;zt++){var Vt=arguments[zt]!=null?arguments[zt]:{};zt%2?ot(Vt,!0).forEach(function(Zt){(0,nt.default)(Ft,Zt,Vt[Zt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ft,Object.getOwnPropertyDescriptors(Vt)):ot(Vt).forEach(function(Zt){Object.defineProperty(Ft,Zt,Object.getOwnPropertyDescriptor(Vt,Zt))})}return Ft}function ut(Ft,zt){return rt.default.isValidElement(Ft)?zt?rt.default.cloneElement(Ft,zt):Ft:typeof Ft=="function"?Ft.prototype&&Ft.prototype.isReactComponent?rt.default.createElement(Ft,zt):Ft.defaultProps?Ft(st({},Ft.defaultProps,{},zt)):Ft(zt):null}function ct(Ft){var zt=[];return rt.default.Children.forEach(Ft,function(Vt){if(rt.default.isValidElement(Vt)&&Vt.key){var Zt=st({},Vt.props,{key:Vt.key});zt.push(Zt)}}),zt}function ft(Ft,zt){var Vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(Ft===zt||Ft===null&&zt===null)return!0;if(Ft===null||zt===null||(0,tt.default)(Ft)!=="object"||(0,tt.default)(zt)!=="object")return!1;var Zt=Object.keys(Ft),Ut=Object.keys(zt);if(Zt.length!==Ut.length)return!1;for(var Xt=0;Xt<Zt.length;Xt++){var Jt=Zt[Xt];if(!(Jt==="_owner"&&Ft.$$typeof)){var gn=Ft[Jt],An=zt[Jt],sn=(0,tt.default)(gn);if(sn!==(0,tt.default)(An))return!1;if(!(sn==="function"&&Vt)){if(sn==="object"){if(ft(gn,An,Vt))continue;return!1}if(gn!==An)return!1}}}return!0}function pt(Ft){for(var zt=arguments.length,Vt=new Array(zt>1?zt-1:0),Zt=1;Zt<zt;Zt++)Vt[Zt-1]=arguments[Zt];return typeof Ft=="function"?Ft.apply(void 0,Vt):Ft}function ht(Ft){return Array.isArray(Ft.children)&&Ft.children.length>0}function mt(Ft){for(var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,Vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"id",Zt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"parentId",Ut=[],Xt={},Jt=Ft.length,gn=0;gn<Jt;gn++){var An=st({},Ft[gn]),sn=An[Vt],Sn=An[Zt];Array.isArray(An.children)?Xt[sn]=An.children.concat(Xt[sn]||[]):Xt[sn]||(Xt[sn]=[]),An.children=Xt[sn],Sn!==void 0&&Sn!==zt?(Xt[Sn]||(Xt[Sn]=[]),Xt[Sn].push(An)):Ut.push(An)}return Ut}function yt(Ft,zt){var Vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Zt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"id";if(!zt||!zt.length)return Ft;var Ut=[],Xt=new Set;zt.forEach(function(An){return Xt.add(An)});var Jt=[].concat(Ft);Jt.forEach(function(An){return Vt[An[Zt]]=0});for(var gn=function(){var sn=Jt.shift();Ut.push(sn),Xt.has(sn[Zt])&&Array.isArray(sn.children)&&sn.children.length>0&&(Jt=[].concat(sn.children,Jt),sn.children.forEach(function(Sn){return Vt[Sn[Zt]]=Vt[sn[Zt]]+1}))};Jt.length>0;)gn();return Ut}function vt(Ft){return Array.isArray(Ft)?[].concat(Ft):[]}function Tt(){}function Et(Ft){return typeof Ft=="string"?Ft:Ft==null?"":Ft.toString?Ft.toString():""}function xt(Ft){for(var zt=Ft.split("."),Vt=[],Zt=0;Zt<zt.length;Zt++){for(var Ut=zt[Zt];Ut[Ut.length-1]==="\\"&&zt[Zt+1]!==void 0;)Ut=Ut.slice(0,-1)+".",Ut+=zt[++Zt];Vt.push(Ut)}return Vt}function At(Ft,zt,Vt){if(Ft===null||(0,tt.default)(Ft)!=="object"||typeof zt!="string")return Vt;for(var Zt=xt(zt),Ut=0;Ut<Zt.length;Ut++){if(!Object.prototype.propertyIsEnumerable.call(Ft,Zt[Ut]))return Vt;if(Ft=Ft[Zt[Ut]],Ft==null){if(Ut!==Zt.length-1)return Vt;break}}return Ft}var Ct=function(zt){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Zt;return function(){for(var Ut=this,Xt=arguments.length,Jt=new Array(Xt),gn=0;gn<Xt;gn++)Jt[gn]=arguments[gn];clearTimeout(Zt),Zt=setTimeout(function(){return zt.apply(Ut,Jt)},Vt)}};utils.debounce=Ct;var $t=function(zt,Vt){var Zt,Ut,Xt;return function(){var Jt=this,gn=arguments;Zt?(clearTimeout(Ut),Ut=setTimeout(function(){Date.now()-Xt>=Vt&&(zt.apply(Jt,gn),Xt=Date.now())},Math.max(Vt-(Date.now()-Xt),0))):(zt.apply(Jt,gn),Xt=Date.now(),Zt=!0)}};utils.throttle=$t;var Ot;function Rt(Ft){if((!Ot&&Ot!==0||Ft)&&typeof window<"u"&&window.document&&window.document.createElement){var zt=document.createElement("div");zt.style.position="absolute",zt.style.top="-9999px",zt.style.width="50px",zt.style.height="50px",zt.style.overflow="scroll",document.body.appendChild(zt),Ot=zt.offsetWidth-zt.clientWidth,document.body.removeChild(zt)}return Ot}function It(Ft,zt){Ft.classList?Ft.classList.add(zt):Ft.className.match(new RegExp("(?:^|\\s)".concat(zt,"(?!\\S)")))||(Ft.className+=" ".concat(zt))}function kt(Ft,zt){Ft.classList?Ft.classList.remove(zt):Ft.className=Ft.className.replace(new RegExp("(?:^|\\s)".concat(zt,"(?!\\S)"),"g"),"")}function Mt(Ft,zt){return typeof zt=="function"?Ft.reduce(function(Vt,Zt,Ut){return Vt+zt({rowData:Zt,rowIndex:Ut})},0):Ft.length*zt}return utils}(function(et){var tt=interopRequireDefault.exports;Object.defineProperty(et,"__esModule",{value:!0}),et.default=void 0;var nt=tt(require$$1$2),rt=tt(require$$2$1),ot=tt(require$$3$1),st=tt(require$$4),ut=tt(require$$5),ct=tt(require$$6),ft=tt(require$$7),pt=tt(require$$8),ht=tt(react.exports),mt=tt(propTypes$1.exports),yt=requireUtils(),vt=function(Et){(0,pt.default)(xt,Et);function xt(At){var Ct;return(0,ot.default)(this,xt),Ct=(0,ut.default)(this,(0,ct.default)(xt).call(this,At)),Ct.state={measured:!1},Ct._setRef=Ct._setRef.bind((0,ft.default)(Ct)),Ct._handleExpand=Ct._handleExpand.bind((0,ft.default)(Ct)),Ct}return(0,st.default)(xt,[{key:"componentDidMount",value:function(){this.props.estimatedRowHeight&&this.props.rowIndex>=0&&this._measureHeight(!0)}},{key:"componentDidUpdate",value:function(Ct,$t){var Ot=this;this.props.estimatedRowHeight&&this.props.rowIndex>=0&&!this.props.getIsResetting()&&this.state.measured&&$t.measured&&this.setState({measured:!1},function(){return Ot._measureHeight()})}},{key:"render",value:function(){var Ct=this.props,$t=Ct.isScrolling,Ot=Ct.className,Rt=Ct.style,It=Ct.columns,kt=Ct.rowIndex,Mt=Ct.rowData,Ft=Ct.expandColumnKey,zt=Ct.depth,Vt=Ct.rowEventHandlers,Zt=Ct.estimatedRowHeight,Ut=Ct.rowRenderer,Xt=Ct.cellRenderer,Jt=Ct.expandIconRenderer,gn=Ct.tagName;Ct.rowKey,Ct.getIsResetting,Ct.onRowHover,Ct.onRowExpand,Ct.onRowHeightChange;var An=(0,rt.default)(Ct,["isScrolling","className","style","columns","rowIndex","rowData","expandColumnKey","depth","rowEventHandlers","estimatedRowHeight","rowRenderer","cellRenderer","expandIconRenderer","tagName","rowKey","getIsResetting","onRowHover","onRowExpand","onRowHeightChange"]),sn=Jt({rowData:Mt,rowIndex:kt,depth:zt,onExpand:this._handleExpand}),Sn=It.map(function(En,Ln){return Xt({isScrolling:$t,columns:It,column:En,columnIndex:Ln,rowData:Mt,rowIndex:kt,expandIcon:En.key===Ft&&sn})});Ut&&(Sn=(0,yt.renderElement)(Ut,{isScrolling:$t,cells:Sn,columns:It,rowData:Mt,rowIndex:kt,depth:zt}));var In=this._getEventHandlers(Vt);if(Zt&&kt>=0){Rt.height;var _n=(0,rt.default)(Rt,["height"]);return ht.default.createElement(gn,(0,nt.default)({},An,{ref:this._setRef,className:Ot,style:this.state.measured?Rt:_n},this.state.measured&&In),Sn)}return ht.default.createElement(gn,(0,nt.default)({},An,{className:Ot,style:Rt},In),Sn)}},{key:"_setRef",value:function(Ct){this.ref=Ct}},{key:"_handleExpand",value:function(Ct){var $t=this.props,Ot=$t.onRowExpand,Rt=$t.rowData,It=$t.rowIndex,kt=$t.rowKey;Ot&&Ot({expanded:Ct,rowData:Rt,rowIndex:It,rowKey:kt})}},{key:"_measureHeight",value:function(Ct){if(!!this.ref){var $t=this.props,Ot=$t.style,Rt=$t.rowKey,It=$t.onRowHeightChange,kt=$t.rowIndex,Mt=$t.columns,Ft=this.ref.getBoundingClientRect().height;this.setState({measured:!0},function(){(Ct||Ft!==Ot.height)&&It(Rt,Ft,kt,Mt[0]&&!Mt[0].__placeholder__&&Mt[0].frozen)})}}},{key:"_getEventHandlers",value:function(){var Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$t=this.props,Ot=$t.rowData,Rt=$t.rowIndex,It=$t.rowKey,kt=$t.onRowHover,Mt={};if(Object.keys(Ct).forEach(function(Vt){var Zt=Ct[Vt];typeof Zt=="function"&&(Mt[Vt]=function(Ut){Zt({rowData:Ot,rowIndex:Rt,rowKey:It,event:Ut})})}),kt){var Ft=Mt.onMouseEnter;Mt.onMouseEnter=function(Vt){kt({hovered:!0,rowData:Ot,rowIndex:Rt,rowKey:It,event:Vt}),Ft&&Ft(Vt)};var zt=Mt.onMouseLeave;Mt.onMouseLeave=function(Vt){kt({hovered:!1,rowData:Ot,rowIndex:Rt,rowKey:It,event:Vt}),zt&&zt(Vt)}}return Mt}}]),xt}(ht.default.PureComponent);vt.defaultProps={tagName:"div"},vt.propTypes={isScrolling:mt.default.bool,className:mt.default.string,style:mt.default.object,columns:mt.default.arrayOf(mt.default.object).isRequired,rowData:mt.default.object.isRequired,rowIndex:mt.default.number.isRequired,rowKey:mt.default.oneOfType([mt.default.string,mt.default.number]),expandColumnKey:mt.default.string,depth:mt.default.number,rowEventHandlers:mt.default.object,rowRenderer:mt.default.oneOfType([mt.default.func,mt.default.element]),cellRenderer:mt.default.func,expandIconRenderer:mt.default.func,estimatedRowHeight:mt.default.oneOfType([mt.default.number,mt.default.func]),getIsResetting:mt.default.func,onRowHover:mt.default.func,onRowExpand:mt.default.func,onRowHeightChange:mt.default.func,tagName:mt.default.elementType};var Tt=vt;et.default=Tt})(TableRow$2);const saveTableAsCSV=et=>saveTextAsCSV(tableToCSV(et),getExportFilename()),getExportFilename=()=>`wandb_export_${hooks().toISOString(!0)}.csv`,tableToCSV=({cols:et,data:tt})=>[et.map(String).map(escape$1).join(","),...tt.map(nt=>et.map(rt=>escape$1(String(nt[rt]))).join(","))].join(`
`),escape$1=et=>`"${et.replace(/"/g,'""')}"`;function saveTextAsCSV(et,tt){let nt="";const rt=tt.split(".");rt.length>1&&(nt=`text/${rt[rt.length-1]}`);const ot=new Blob([et],{type:nt});if(window.navigator.msSaveOrOpenBlob){window.navigator.msSaveOrOpenBlob(ot,tt);return}const st=document.createElement("a"),ut=URL.createObjectURL(ot);st.href=ut,st.download=tt,document.body.appendChild(st),st.click(),setTimeout(()=>{document.body.removeChild(st),window.URL.revokeObjectURL(ut)})}var safeIsNaN$1=Number.isNaN||function et(tt){return typeof tt=="number"&&tt!==tt};function isEqual$1(et,tt){return!!(et===tt||safeIsNaN$1(et)&&safeIsNaN$1(tt))}function areInputsEqual$1(et,tt){if(et.length!==tt.length)return!1;for(var nt=0;nt<et.length;nt++)if(!isEqual$1(et[nt],tt[nt]))return!1;return!0}function memoizeOne$1(et,tt){tt===void 0&&(tt=areInputsEqual$1);var nt,rt=[],ot,st=!1;function ut(){for(var ct=[],ft=0;ft<arguments.length;ft++)ct[ft]=arguments[ft];return st&&nt===this&&tt(ct,rt)||(ot=et.apply(this,ct),st=!0,nt=this,rt=ct),ot}return ut}var safeIsNaN=Number.isNaN||function et(tt){return typeof tt=="number"&&tt!==tt};function isEqual(et,tt){return!!(et===tt||safeIsNaN(et)&&safeIsNaN(tt))}function areInputsEqual(et,tt){if(et.length!==tt.length)return!1;for(var nt=0;nt<et.length;nt++)if(!isEqual(et[nt],tt[nt]))return!1;return!0}function memoizeOne(et,tt){tt===void 0&&(tt=areInputsEqual);var nt,rt=[],ot,st=!1;function ut(){for(var ct=[],ft=0;ft<arguments.length;ft++)ct[ft]=arguments[ft];return st&&nt===this&&tt(ct,rt)||(ot=et.apply(this,ct),st=!0,nt=this,rt=ct),ot}return ut}var hasNativePerformanceNow=typeof performance=="object"&&typeof performance.now=="function",now=hasNativePerformanceNow?function(){return performance.now()}:function(){return Date.now()};function cancelTimeout(et){cancelAnimationFrame(et.id)}function requestTimeout(et,tt){var nt=now();function rt(){now()-nt>=tt?et.call(null):ot.id=requestAnimationFrame(rt)}var ot={id:requestAnimationFrame(rt)};return ot}var size=-1;function getScrollbarSize$1(et){if(et===void 0&&(et=!1),size===-1||et){var tt=document.createElement("div"),nt=tt.style;nt.width="50px",nt.height="50px",nt.overflow="scroll",document.body.appendChild(tt),size=tt.offsetWidth-tt.clientWidth,document.body.removeChild(tt)}return size}var cachedRTLResult=null;function getRTLOffsetType(et){if(et===void 0&&(et=!1),cachedRTLResult===null||et){var tt=document.createElement("div"),nt=tt.style;nt.width="50px",nt.height="50px",nt.overflow="scroll",nt.direction="rtl";var rt=document.createElement("div"),ot=rt.style;return ot.width="100px",ot.height="100px",tt.appendChild(rt),document.body.appendChild(tt),tt.scrollLeft>0?cachedRTLResult="positive-descending":(tt.scrollLeft=1,tt.scrollLeft===0?cachedRTLResult="negative":cachedRTLResult="positive-ascending"),document.body.removeChild(tt),cachedRTLResult}return cachedRTLResult}var IS_SCROLLING_DEBOUNCE_INTERVAL=150,defaultItemKey=function et(tt){var nt=tt.columnIndex;tt.data;var rt=tt.rowIndex;return rt+":"+nt};function createGridComponent(et){var tt,nt=et.getColumnOffset,rt=et.getColumnStartIndexForOffset,ot=et.getColumnStopIndexForStartIndex,st=et.getColumnWidth,ut=et.getEstimatedTotalHeight,ct=et.getEstimatedTotalWidth,ft=et.getOffsetForColumnAndAlignment,pt=et.getOffsetForRowAndAlignment,ht=et.getRowHeight,mt=et.getRowOffset,yt=et.getRowStartIndexForOffset,vt=et.getRowStopIndexForStartIndex,Tt=et.initInstanceProps,Et=et.shouldResetStyleCacheOnItemSizeChange,xt=et.validateProps;return tt=function(At){_inheritsLoose$5(Ct,At);function Ct(Ot){var Rt;return Rt=At.call(this,Ot)||this,Rt._instanceProps=Tt(Rt.props,_assertThisInitialized$2(Rt)),Rt._resetIsScrollingTimeoutId=null,Rt._outerRef=void 0,Rt.state={instance:_assertThisInitialized$2(Rt),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:typeof Rt.props.initialScrollLeft=="number"?Rt.props.initialScrollLeft:0,scrollTop:typeof Rt.props.initialScrollTop=="number"?Rt.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},Rt._callOnItemsRendered=void 0,Rt._callOnItemsRendered=memoizeOne(function(It,kt,Mt,Ft,zt,Vt,Zt,Ut){return Rt.props.onItemsRendered({overscanColumnStartIndex:It,overscanColumnStopIndex:kt,overscanRowStartIndex:Mt,overscanRowStopIndex:Ft,visibleColumnStartIndex:zt,visibleColumnStopIndex:Vt,visibleRowStartIndex:Zt,visibleRowStopIndex:Ut})}),Rt._callOnScroll=void 0,Rt._callOnScroll=memoizeOne(function(It,kt,Mt,Ft,zt){return Rt.props.onScroll({horizontalScrollDirection:Mt,scrollLeft:It,scrollTop:kt,verticalScrollDirection:Ft,scrollUpdateWasRequested:zt})}),Rt._getItemStyle=void 0,Rt._getItemStyle=function(It,kt){var Mt=Rt.props,Ft=Mt.columnWidth,zt=Mt.direction,Vt=Mt.rowHeight,Zt=Rt._getItemStyleCache(Et&&Ft,Et&&zt,Et&&Vt),Ut=It+":"+kt,Xt;if(Zt.hasOwnProperty(Ut))Xt=Zt[Ut];else{var Jt=nt(Rt.props,kt,Rt._instanceProps),gn=zt==="rtl";Zt[Ut]=Xt={position:"absolute",left:gn?void 0:Jt,right:gn?Jt:void 0,top:mt(Rt.props,It,Rt._instanceProps),height:ht(Rt.props,It,Rt._instanceProps),width:st(Rt.props,kt,Rt._instanceProps)}}return Xt},Rt._getItemStyleCache=void 0,Rt._getItemStyleCache=memoizeOne(function(It,kt,Mt){return{}}),Rt._onScroll=function(It){var kt=It.currentTarget,Mt=kt.clientHeight,Ft=kt.clientWidth,zt=kt.scrollLeft,Vt=kt.scrollTop,Zt=kt.scrollHeight,Ut=kt.scrollWidth;Rt.setState(function(Xt){if(Xt.scrollLeft===zt&&Xt.scrollTop===Vt)return null;var Jt=Rt.props.direction,gn=zt;if(Jt==="rtl")switch(getRTLOffsetType()){case"negative":gn=-zt;break;case"positive-descending":gn=Ut-Ft-zt;break}gn=Math.max(0,Math.min(gn,Ut-Ft));var An=Math.max(0,Math.min(Vt,Zt-Mt));return{isScrolling:!0,horizontalScrollDirection:Xt.scrollLeft<zt?"forward":"backward",scrollLeft:gn,scrollTop:An,verticalScrollDirection:Xt.scrollTop<Vt?"forward":"backward",scrollUpdateWasRequested:!1}},Rt._resetIsScrollingDebounced)},Rt._outerRefSetter=function(It){var kt=Rt.props.outerRef;Rt._outerRef=It,typeof kt=="function"?kt(It):kt!=null&&typeof kt=="object"&&kt.hasOwnProperty("current")&&(kt.current=It)},Rt._resetIsScrollingDebounced=function(){Rt._resetIsScrollingTimeoutId!==null&&cancelTimeout(Rt._resetIsScrollingTimeoutId),Rt._resetIsScrollingTimeoutId=requestTimeout(Rt._resetIsScrolling,IS_SCROLLING_DEBOUNCE_INTERVAL)},Rt._resetIsScrolling=function(){Rt._resetIsScrollingTimeoutId=null,Rt.setState({isScrolling:!1},function(){Rt._getItemStyleCache(-1)})},Rt}Ct.getDerivedStateFromProps=function(Rt,It){return validateSharedProps(Rt,It),xt(Rt),null};var $t=Ct.prototype;return $t.scrollTo=function(Rt){var It=Rt.scrollLeft,kt=Rt.scrollTop;It!==void 0&&(It=Math.max(0,It)),kt!==void 0&&(kt=Math.max(0,kt)),this.setState(function(Mt){return It===void 0&&(It=Mt.scrollLeft),kt===void 0&&(kt=Mt.scrollTop),Mt.scrollLeft===It&&Mt.scrollTop===kt?null:{horizontalScrollDirection:Mt.scrollLeft<It?"forward":"backward",scrollLeft:It,scrollTop:kt,scrollUpdateWasRequested:!0,verticalScrollDirection:Mt.scrollTop<kt?"forward":"backward"}},this._resetIsScrollingDebounced)},$t.scrollToItem=function(Rt){var It=Rt.align,kt=It===void 0?"auto":It,Mt=Rt.columnIndex,Ft=Rt.rowIndex,zt=this.props,Vt=zt.columnCount,Zt=zt.height,Ut=zt.rowCount,Xt=zt.width,Jt=this.state,gn=Jt.scrollLeft,An=Jt.scrollTop,sn=getScrollbarSize$1();Mt!==void 0&&(Mt=Math.max(0,Math.min(Mt,Vt-1))),Ft!==void 0&&(Ft=Math.max(0,Math.min(Ft,Ut-1)));var Sn=ut(this.props,this._instanceProps),In=ct(this.props,this._instanceProps),_n=In>Xt?sn:0,En=Sn>Zt?sn:0;this.scrollTo({scrollLeft:Mt!==void 0?ft(this.props,Mt,kt,gn,this._instanceProps,En):gn,scrollTop:Ft!==void 0?pt(this.props,Ft,kt,An,this._instanceProps,_n):An})},$t.componentDidMount=function(){var Rt=this.props,It=Rt.initialScrollLeft,kt=Rt.initialScrollTop;if(this._outerRef!=null){var Mt=this._outerRef;typeof It=="number"&&(Mt.scrollLeft=It),typeof kt=="number"&&(Mt.scrollTop=kt)}this._callPropsCallbacks()},$t.componentDidUpdate=function(){var Rt=this.props.direction,It=this.state,kt=It.scrollLeft,Mt=It.scrollTop,Ft=It.scrollUpdateWasRequested;if(Ft&&this._outerRef!=null){var zt=this._outerRef;if(Rt==="rtl")switch(getRTLOffsetType()){case"negative":zt.scrollLeft=-kt;break;case"positive-ascending":zt.scrollLeft=kt;break;default:var Vt=zt.clientWidth,Zt=zt.scrollWidth;zt.scrollLeft=Zt-Vt-kt;break}else zt.scrollLeft=Math.max(0,kt);zt.scrollTop=Math.max(0,Mt)}this._callPropsCallbacks()},$t.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&cancelTimeout(this._resetIsScrollingTimeoutId)},$t.render=function(){var Rt=this.props,It=Rt.children,kt=Rt.className,Mt=Rt.columnCount,Ft=Rt.direction,zt=Rt.height,Vt=Rt.innerRef,Zt=Rt.innerElementType,Ut=Rt.innerTagName,Xt=Rt.itemData,Jt=Rt.itemKey,gn=Jt===void 0?defaultItemKey:Jt,An=Rt.outerElementType,sn=Rt.outerTagName,Sn=Rt.rowCount,In=Rt.style,_n=Rt.useIsScrolling,En=Rt.width,Ln=this.state.isScrolling,wn=this._getHorizontalRangeToRender(),Dn=wn[0],$n=wn[1],Gn=this._getVerticalRangeToRender(),Jn=Gn[0],zn=Gn[1],Qn=[];if(Mt>0&&Sn)for(var Bn=Jn;Bn<=zn;Bn++)for(var jn=Dn;jn<=$n;jn++)Qn.push(react.exports.createElement(It,{columnIndex:jn,data:Xt,isScrolling:_n?Ln:void 0,key:gn({columnIndex:jn,data:Xt,rowIndex:Bn}),rowIndex:Bn,style:this._getItemStyle(Bn,jn)}));var Ar=ut(this.props,this._instanceProps),Er=ct(this.props,this._instanceProps);return react.exports.createElement(An||sn||"div",{className:kt,onScroll:this._onScroll,ref:this._outerRefSetter,style:_extends$a({position:"relative",height:zt,width:En,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:Ft},In)},react.exports.createElement(Zt||Ut||"div",{children:Qn,ref:Vt,style:{height:Ar,pointerEvents:Ln?"none":void 0,width:Er}}))},$t._callPropsCallbacks=function(){var Rt=this.props,It=Rt.columnCount,kt=Rt.onItemsRendered,Mt=Rt.onScroll,Ft=Rt.rowCount;if(typeof kt=="function"&&It>0&&Ft>0){var zt=this._getHorizontalRangeToRender(),Vt=zt[0],Zt=zt[1],Ut=zt[2],Xt=zt[3],Jt=this._getVerticalRangeToRender(),gn=Jt[0],An=Jt[1],sn=Jt[2],Sn=Jt[3];this._callOnItemsRendered(Vt,Zt,gn,An,Ut,Xt,sn,Sn)}if(typeof Mt=="function"){var In=this.state,_n=In.horizontalScrollDirection,En=In.scrollLeft,Ln=In.scrollTop,wn=In.scrollUpdateWasRequested,Dn=In.verticalScrollDirection;this._callOnScroll(En,Ln,_n,Dn,wn)}},$t._getHorizontalRangeToRender=function(){var Rt=this.props,It=Rt.columnCount,kt=Rt.overscanColumnCount,Mt=Rt.overscanColumnsCount,Ft=Rt.overscanCount,zt=Rt.rowCount,Vt=this.state,Zt=Vt.horizontalScrollDirection,Ut=Vt.isScrolling,Xt=Vt.scrollLeft,Jt=kt||Mt||Ft||1;if(It===0||zt===0)return[0,0,0,0];var gn=rt(this.props,Xt,this._instanceProps),An=ot(this.props,gn,Xt,this._instanceProps),sn=!Ut||Zt==="backward"?Math.max(1,Jt):1,Sn=!Ut||Zt==="forward"?Math.max(1,Jt):1;return[Math.max(0,gn-sn),Math.max(0,Math.min(It-1,An+Sn)),gn,An]},$t._getVerticalRangeToRender=function(){var Rt=this.props,It=Rt.columnCount,kt=Rt.overscanCount,Mt=Rt.overscanRowCount,Ft=Rt.overscanRowsCount,zt=Rt.rowCount,Vt=this.state,Zt=Vt.isScrolling,Ut=Vt.verticalScrollDirection,Xt=Vt.scrollTop,Jt=Mt||Ft||kt||1;if(It===0||zt===0)return[0,0,0,0];var gn=yt(this.props,Xt,this._instanceProps),An=vt(this.props,gn,Xt,this._instanceProps),sn=!Zt||Ut==="backward"?Math.max(1,Jt):1,Sn=!Zt||Ut==="forward"?Math.max(1,Jt):1;return[Math.max(0,gn-sn),Math.max(0,Math.min(zt-1,An+Sn)),gn,An]},Ct}(react.exports.PureComponent),tt.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},tt}var validateSharedProps=function et(tt,nt){tt.children,tt.direction,tt.height,tt.innerTagName,tt.outerTagName,tt.overscanColumnsCount,tt.overscanCount,tt.overscanRowsCount,tt.width,nt.instance},DEFAULT_ESTIMATED_ITEM_SIZE=50,getEstimatedTotalHeight=function et(tt,nt){var rt=tt.rowCount,ot=nt.rowMetadataMap,st=nt.estimatedRowHeight,ut=nt.lastMeasuredRowIndex,ct=0;if(ut>=rt&&(ut=rt-1),ut>=0){var ft=ot[ut];ct=ft.offset+ft.size}var pt=rt-ut-1,ht=pt*st;return ct+ht},getEstimatedTotalWidth=function et(tt,nt){var rt=tt.columnCount,ot=nt.columnMetadataMap,st=nt.estimatedColumnWidth,ut=nt.lastMeasuredColumnIndex,ct=0;if(ut>=rt&&(ut=rt-1),ut>=0){var ft=ot[ut];ct=ft.offset+ft.size}var pt=rt-ut-1,ht=pt*st;return ct+ht},getItemMetadata=function et(tt,nt,rt,ot){var st,ut,ct;if(tt==="column"?(st=ot.columnMetadataMap,ut=nt.columnWidth,ct=ot.lastMeasuredColumnIndex):(st=ot.rowMetadataMap,ut=nt.rowHeight,ct=ot.lastMeasuredRowIndex),rt>ct){var ft=0;if(ct>=0){var pt=st[ct];ft=pt.offset+pt.size}for(var ht=ct+1;ht<=rt;ht++){var mt=ut(ht);st[ht]={offset:ft,size:mt},ft+=mt}tt==="column"?ot.lastMeasuredColumnIndex=rt:ot.lastMeasuredRowIndex=rt}return st[rt]},findNearestItem=function et(tt,nt,rt,ot){var st,ut;tt==="column"?(st=rt.columnMetadataMap,ut=rt.lastMeasuredColumnIndex):(st=rt.rowMetadataMap,ut=rt.lastMeasuredRowIndex);var ct=ut>0?st[ut].offset:0;return ct>=ot?findNearestItemBinarySearch(tt,nt,rt,ut,0,ot):findNearestItemExponentialSearch(tt,nt,rt,Math.max(0,ut),ot)},findNearestItemBinarySearch=function et(tt,nt,rt,ot,st,ut){for(;st<=ot;){var ct=st+Math.floor((ot-st)/2),ft=getItemMetadata(tt,nt,ct,rt).offset;if(ft===ut)return ct;ft<ut?st=ct+1:ft>ut&&(ot=ct-1)}return st>0?st-1:0},findNearestItemExponentialSearch=function et(tt,nt,rt,ot,st){for(var ut=tt==="column"?nt.columnCount:nt.rowCount,ct=1;ot<ut&&getItemMetadata(tt,nt,ot,rt).offset<st;)ot+=ct,ct*=2;return findNearestItemBinarySearch(tt,nt,rt,Math.min(ot,ut-1),Math.floor(ot/2),st)},getOffsetForIndexAndAlignment=function et(tt,nt,rt,ot,st,ut,ct){var ft=tt==="column"?nt.width:nt.height,pt=getItemMetadata(tt,nt,rt,ut),ht=tt==="column"?getEstimatedTotalWidth(nt,ut):getEstimatedTotalHeight(nt,ut),mt=Math.max(0,Math.min(ht-ft,pt.offset)),yt=Math.max(0,pt.offset-ft+ct+pt.size);switch(ot==="smart"&&(st>=yt-ft&&st<=mt+ft?ot="auto":ot="center"),ot){case"start":return mt;case"end":return yt;case"center":return Math.round(yt+(mt-yt)/2);case"auto":default:return st>=yt&&st<=mt?st:yt>mt||st<yt?yt:mt}},VariableSizeGrid=createGridComponent({getColumnOffset:function et(tt,nt,rt){return getItemMetadata("column",tt,nt,rt).offset},getColumnStartIndexForOffset:function et(tt,nt,rt){return findNearestItem("column",tt,rt,nt)},getColumnStopIndexForStartIndex:function et(tt,nt,rt,ot){for(var st=tt.columnCount,ut=tt.width,ct=getItemMetadata("column",tt,nt,ot),ft=rt+ut,pt=ct.offset+ct.size,ht=nt;ht<st-1&&pt<ft;)ht++,pt+=getItemMetadata("column",tt,ht,ot).size;return ht},getColumnWidth:function et(tt,nt,rt){return rt.columnMetadataMap[nt].size},getEstimatedTotalHeight,getEstimatedTotalWidth,getOffsetForColumnAndAlignment:function et(tt,nt,rt,ot,st,ut){return getOffsetForIndexAndAlignment("column",tt,nt,rt,ot,st,ut)},getOffsetForRowAndAlignment:function et(tt,nt,rt,ot,st,ut){return getOffsetForIndexAndAlignment("row",tt,nt,rt,ot,st,ut)},getRowOffset:function et(tt,nt,rt){return getItemMetadata("row",tt,nt,rt).offset},getRowHeight:function et(tt,nt,rt){return rt.rowMetadataMap[nt].size},getRowStartIndexForOffset:function et(tt,nt,rt){return findNearestItem("row",tt,rt,nt)},getRowStopIndexForStartIndex:function et(tt,nt,rt,ot){for(var st=tt.rowCount,ut=tt.height,ct=getItemMetadata("row",tt,nt,ot),ft=rt+ut,pt=ct.offset+ct.size,ht=nt;ht<st-1&&pt<ft;)ht++,pt+=getItemMetadata("row",tt,ht,ot).size;return ht},initInstanceProps:function et(tt,nt){var rt=tt,ot=rt.estimatedColumnWidth,st=rt.estimatedRowHeight,ut={columnMetadataMap:{},estimatedColumnWidth:ot||DEFAULT_ESTIMATED_ITEM_SIZE,estimatedRowHeight:st||DEFAULT_ESTIMATED_ITEM_SIZE,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return nt.resetAfterColumnIndex=function(ct,ft){ft===void 0&&(ft=!0),nt.resetAfterIndices({columnIndex:ct,shouldForceUpdate:ft})},nt.resetAfterRowIndex=function(ct,ft){ft===void 0&&(ft=!0),nt.resetAfterIndices({rowIndex:ct,shouldForceUpdate:ft})},nt.resetAfterIndices=function(ct){var ft=ct.columnIndex,pt=ct.rowIndex,ht=ct.shouldForceUpdate,mt=ht===void 0?!0:ht;typeof ft=="number"&&(ut.lastMeasuredColumnIndex=Math.min(ut.lastMeasuredColumnIndex,ft-1)),typeof pt=="number"&&(ut.lastMeasuredRowIndex=Math.min(ut.lastMeasuredRowIndex,pt-1)),nt._getItemStyleCache(-1),mt&&nt.forceUpdate()},ut},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function et(tt){tt.columnWidth,tt.rowHeight}}),FixedSizeGrid=createGridComponent({getColumnOffset:function et(tt,nt){var rt=tt.columnWidth;return nt*rt},getColumnWidth:function et(tt,nt){var rt=tt.columnWidth;return rt},getRowOffset:function et(tt,nt){var rt=tt.rowHeight;return nt*rt},getRowHeight:function et(tt,nt){var rt=tt.rowHeight;return rt},getEstimatedTotalHeight:function et(tt){var nt=tt.rowCount,rt=tt.rowHeight;return rt*nt},getEstimatedTotalWidth:function et(tt){var nt=tt.columnCount,rt=tt.columnWidth;return rt*nt},getOffsetForColumnAndAlignment:function et(tt,nt,rt,ot,st,ut){var ct=tt.columnCount,ft=tt.columnWidth,pt=tt.width,ht=Math.max(0,ct*ft-pt),mt=Math.min(ht,nt*ft),yt=Math.max(0,nt*ft-pt+ut+ft);switch(rt==="smart"&&(ot>=yt-pt&&ot<=mt+pt?rt="auto":rt="center"),rt){case"start":return mt;case"end":return yt;case"center":var vt=Math.round(yt+(mt-yt)/2);return vt<Math.ceil(pt/2)?0:vt>ht+Math.floor(pt/2)?ht:vt;case"auto":default:return ot>=yt&&ot<=mt?ot:yt>mt||ot<yt?yt:mt}},getOffsetForRowAndAlignment:function et(tt,nt,rt,ot,st,ut){var ct=tt.rowHeight,ft=tt.height,pt=tt.rowCount,ht=Math.max(0,pt*ct-ft),mt=Math.min(ht,nt*ct),yt=Math.max(0,nt*ct-ft+ut+ct);switch(rt==="smart"&&(ot>=yt-ft&&ot<=mt+ft?rt="auto":rt="center"),rt){case"start":return mt;case"end":return yt;case"center":var vt=Math.round(yt+(mt-yt)/2);return vt<Math.ceil(ft/2)?0:vt>ht+Math.floor(ft/2)?ht:vt;case"auto":default:return ot>=yt&&ot<=mt?ot:yt>mt||ot<yt?yt:mt}},getColumnStartIndexForOffset:function et(tt,nt){var rt=tt.columnWidth,ot=tt.columnCount;return Math.max(0,Math.min(ot-1,Math.floor(nt/rt)))},getColumnStopIndexForStartIndex:function et(tt,nt,rt){var ot=tt.columnWidth,st=tt.columnCount,ut=tt.width,ct=nt*ot,ft=Math.ceil((ut+rt-ct)/ot);return Math.max(0,Math.min(st-1,nt+ft-1))},getRowStartIndexForOffset:function et(tt,nt){var rt=tt.rowHeight,ot=tt.rowCount;return Math.max(0,Math.min(ot-1,Math.floor(nt/rt)))},getRowStopIndexForStartIndex:function et(tt,nt,rt){var ot=tt.rowHeight,st=tt.rowCount,ut=tt.height,ct=nt*ot,ft=Math.ceil((ut+rt-ct)/ot);return Math.max(0,Math.min(st-1,nt+ft-1))},initInstanceProps:function et(tt){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function et(tt){tt.columnWidth,tt.rowHeight}}),TableHeader=function(et){_inheritsLoose$5(tt,et);function tt(rt){var ot;return ot=et.call(this,rt)||this,ot.renderHeaderRow=ot.renderHeaderRow.bind(_assertThisInitialized$2(ot)),ot.renderFrozenRow=ot.renderFrozenRow.bind(_assertThisInitialized$2(ot)),ot._setRef=ot._setRef.bind(_assertThisInitialized$2(ot)),ot}var nt=tt.prototype;return nt.scrollTo=function(ot){var st=this;requestAnimationFrame(function(){st.headerRef&&(st.headerRef.scrollLeft=ot)})},nt.renderHeaderRow=function(ot,st){var ut=this.props,ct=ut.columns,ft=ut.headerRenderer;if(ot<=0)return null;var pt={width:"100%",height:ot};return ft({style:pt,columns:ct,headerIndex:st})},nt.renderFrozenRow=function(ot,st){var ut=this.props,ct=ut.columns,ft=ut.rowHeight,pt=ut.rowRenderer,ht={width:"100%",height:ft},mt=-st-1;return pt({style:ht,columns:ct,rowData:ot,rowIndex:mt})},nt.render=function(){var ot=this.props,st=ot.className,ut=ot.width,ct=ot.height,ft=ot.rowWidth,pt=ot.headerHeight,ht=ot.frozenData;if(ct<=0)return null;var mt={width:ut,height:ct,position:"relative",overflow:"hidden"},yt={width:ft,height:ct},vt=Array.isArray(pt)?pt:[pt];return Wt.createElement("div",{role:"grid",ref:this._setRef,className:st,style:mt},Wt.createElement("div",{role:"rowgroup",style:yt},vt.map(this.renderHeaderRow),ht.map(this.renderFrozenRow)))},nt._setRef=function(ot){this.headerRef=ot},tt}(Wt.PureComponent);TableHeader.propTypes={className:propTypes$1.exports.string,width:propTypes$1.exports.number.isRequired,height:propTypes$1.exports.number.isRequired,headerHeight:propTypes$1.exports.oneOfType([propTypes$1.exports.number,propTypes$1.exports.arrayOf(propTypes$1.exports.number)]).isRequired,rowWidth:propTypes$1.exports.number.isRequired,rowHeight:propTypes$1.exports.number.isRequired,columns:propTypes$1.exports.arrayOf(propTypes$1.exports.object).isRequired,data:propTypes$1.exports.array.isRequired,frozenData:propTypes$1.exports.array,headerRenderer:propTypes$1.exports.func.isRequired,rowRenderer:propTypes$1.exports.func.isRequired};function ownKeys$5(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$5(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$5(nt,!0).forEach(function(rt){_defineProperty$d(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$5(nt).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}function renderElement(et,tt){return Wt.isValidElement(et)?tt?Wt.cloneElement(et,tt):et:typeof et=="function"?et.prototype&&et.prototype.isReactComponent?Wt.createElement(et,tt):et.defaultProps?et(_objectSpread$5({},et.defaultProps,{},tt)):et(tt):null}function normalizeColumns(et){var tt=[];return Wt.Children.forEach(et,function(nt){if(Wt.isValidElement(nt)&&nt.key){var rt=_objectSpread$5({},nt.props,{key:nt.key});tt.push(rt)}}),tt}function isObjectEqual(et,tt,nt){if(nt===void 0&&(nt=!0),et===tt||et===null&&tt===null)return!0;if(et===null||tt===null||typeof et!="object"||typeof tt!="object")return!1;var rt=Object.keys(et),ot=Object.keys(tt);if(rt.length!==ot.length)return!1;for(var st=0;st<rt.length;st++){var ut=rt[st];if(!(ut==="_owner"&&et.$$typeof)){var ct=et[ut],ft=tt[ut],pt=typeof ct;if(pt!==typeof ft)return!1;if(!(pt==="function"&&nt)){if(pt==="object"){if(isObjectEqual(ct,ft,nt))continue;return!1}if(ct!==ft)return!1}}}return!0}function callOrReturn(et){for(var tt=arguments.length,nt=new Array(tt>1?tt-1:0),rt=1;rt<tt;rt++)nt[rt-1]=arguments[rt];return typeof et=="function"?et.apply(void 0,nt):et}function hasChildren(et){return Array.isArray(et.children)&&et.children.length>0}function flattenOnKeys(et,tt,nt,rt){if(nt===void 0&&(nt={}),rt===void 0&&(rt="id"),!tt||!tt.length)return et;var ot=[],st=new Set;tt.forEach(function(ft){return st.add(ft)});var ut=[].concat(et);ut.forEach(function(ft){return nt[ft[rt]]=0});for(var ct=function(){var pt=ut.shift();ot.push(pt),st.has(pt[rt])&&Array.isArray(pt.children)&&pt.children.length>0&&(ut=[].concat(pt.children,ut),pt.children.forEach(function(ht){return nt[ht[rt]]=nt[pt[rt]]+1}))};ut.length>0;)ct();return ot}function cloneArray(et){return Array.isArray(et)?[].concat(et):[]}function noop(){}function toString(et){return typeof et=="string"?et:et==null?"":et.toString?et.toString():""}function getPathSegments(et){for(var tt=et.split("."),nt=[],rt=0;rt<tt.length;rt++){for(var ot=tt[rt];ot[ot.length-1]==="\\"&&tt[rt+1]!==void 0;)ot=ot.slice(0,-1)+".",ot+=tt[++rt];nt.push(ot)}return nt}function getValue(et,tt,nt){if(et===null||typeof et!="object"||typeof tt!="string")return nt;for(var rt=getPathSegments(tt),ot=0;ot<rt.length;ot++){if(!Object.prototype.propertyIsEnumerable.call(et,rt[ot]))return nt;if(et=et[rt[ot]],et==null){if(ot!==rt.length-1)return nt;break}}return et}var debounce=function et(tt,nt){nt===void 0&&(nt=0);var rt;return function(){for(var ot=this,st=arguments.length,ut=new Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];clearTimeout(rt),rt=setTimeout(function(){return tt.apply(ot,ut)},nt)}},throttle=function et(tt,nt){var rt,ot,st;return function(){var ut=this,ct=arguments;rt?(clearTimeout(ot),ot=setTimeout(function(){Date.now()-st>=nt&&(tt.apply(ut,ct),st=Date.now())},Math.max(nt-(Date.now()-st),0))):(tt.apply(ut,ct),st=Date.now(),rt=!0)}},scrollbarSize;function getScrollbarSize(et){if((!scrollbarSize&&scrollbarSize!==0||et)&&typeof window<"u"&&window.document&&window.document.createElement){var tt=document.createElement("div");tt.style.position="absolute",tt.style.top="-9999px",tt.style.width="50px",tt.style.height="50px",tt.style.overflow="scroll",document.body.appendChild(tt),scrollbarSize=tt.offsetWidth-tt.clientWidth,document.body.removeChild(tt)}return scrollbarSize}function addClassName(et,tt){et.classList?et.classList.add(tt):et.className.match(new RegExp("(?:^|\\s)"+tt+"(?!\\S)"))||(et.className+=" "+tt)}function removeClassName(et,tt){et.classList?et.classList.remove(tt):et.className=et.className.replace(new RegExp("(?:^|\\s)"+tt+"(?!\\S)","g"),"")}function getEstimatedTotalRowsHeight(et,tt){return typeof tt=="function"?et.reduce(function(nt,rt,ot){return nt+tt({rowData:rt,rowIndex:ot})},0):et.length*tt}function ownKeys$4(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$4(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$4(nt,!0).forEach(function(rt){_defineProperty$d(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$4(nt).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var GridTable=function(et){_inheritsLoose$5(tt,et);function tt(rt){var ot;return ot=et.call(this,rt)||this,ot._setHeaderRef=ot._setHeaderRef.bind(_assertThisInitialized$2(ot)),ot._setBodyRef=ot._setBodyRef.bind(_assertThisInitialized$2(ot)),ot._setInnerRef=ot._setInnerRef.bind(_assertThisInitialized$2(ot)),ot._itemKey=ot._itemKey.bind(_assertThisInitialized$2(ot)),ot._getBodyWidth=ot._getBodyWidth.bind(_assertThisInitialized$2(ot)),ot._handleItemsRendered=ot._handleItemsRendered.bind(_assertThisInitialized$2(ot)),ot._resetColumnWidthCache=memoizeOne$1(function(st){!ot.props.estimatedRowHeight||ot.bodyRef&&ot.bodyRef.resetAfterColumnIndex(0,!1)}),ot._getEstimatedTotalRowsHeight=memoizeOne$1(getEstimatedTotalRowsHeight),ot.renderRow=ot.renderRow.bind(_assertThisInitialized$2(ot)),ot}var nt=tt.prototype;return nt.resetAfterRowIndex=function(ot,st){ot===void 0&&(ot=0),!!this.props.estimatedRowHeight&&this.bodyRef&&this.bodyRef.resetAfterRowIndex(ot,st)},nt.forceUpdateTable=function(){this.headerRef&&this.headerRef.forceUpdate(),this.bodyRef&&this.bodyRef.forceUpdate()},nt.scrollToPosition=function(ot){this.headerRef&&this.headerRef.scrollTo(ot.scrollLeft),this.bodyRef&&this.bodyRef.scrollTo(ot)},nt.scrollToTop=function(ot){this.bodyRef&&this.bodyRef.scrollTo({scrollTop:ot})},nt.scrollToLeft=function(ot){this.headerRef&&this.headerRef.scrollTo(ot),this.bodyRef&&this.bodyRef.scrollToPosition({scrollLeft:ot})},nt.scrollToRow=function(ot,st){ot===void 0&&(ot=0),st===void 0&&(st="auto"),this.bodyRef&&this.bodyRef.scrollToItem({rowIndex:ot,align:st})},nt.getTotalRowsHeight=function(){var ot=this.props,st=ot.data,ut=ot.rowHeight,ct=ot.estimatedRowHeight;return ct?this.innerRef&&this.innerRef.clientHeight||this._getEstimatedTotalRowsHeight(st,ct):st.length*ut},nt.renderRow=function(ot){var st=this.props,ut=st.data,ct=st.columns,ft=st.rowRenderer,pt=ut[ot.rowIndex];return ft(_objectSpread$4({},ot,{columns:ct,rowData:pt}))},nt.render=function(){var ot=this.props,st=ot.containerStyle,ut=ot.classPrefix,ct=ot.className,ft=ot.data,pt=ot.frozenData,ht=ot.width,mt=ot.height,yt=ot.rowHeight,vt=ot.estimatedRowHeight,Tt=ot.getRowHeight,Et=ot.headerWidth,xt=ot.bodyWidth,At=ot.useIsScrolling,Ct=ot.onScroll,$t=ot.hoveredRowKey,Ot=ot.overscanRowCount;ot.style,ot.onScrollbarPresenceChange;var Rt=_objectWithoutPropertiesLoose$7(ot,["containerStyle","classPrefix","className","data","frozenData","width","height","rowHeight","estimatedRowHeight","getRowHeight","headerWidth","bodyWidth","useIsScrolling","onScroll","hoveredRowKey","overscanRowCount","style","onScrollbarPresenceChange"]),It=this._getHeaderHeight(),kt=pt.length,Mt=yt*kt,Ft=classnames(ut+"__table",ct),zt=st?{style:st}:null,Vt=vt?VariableSizeGrid:FixedSizeGrid;return this._resetColumnWidthCache(xt),Wt.createElement("div",_extends$a({role:"table",className:Ft},zt),Wt.createElement(Vt,_extends$a({},Rt,{className:ut+"__body",ref:this._setBodyRef,innerRef:this._setInnerRef,itemKey:this._itemKey,data:ft,frozenData:pt,width:ht,height:Math.max(mt-It-Mt,0),rowHeight:vt?Tt:yt,estimatedRowHeight:typeof vt=="function"?void 0:vt,rowCount:ft.length,overscanRowCount:Ot,columnWidth:vt?this._getBodyWidth:xt,columnCount:1,overscanColumnCount:0,useIsScrolling:At,hoveredRowKey:$t,onScroll:Ct,onItemsRendered:this._handleItemsRendered,children:this.renderRow})),It+Mt>0&&Wt.createElement(TableHeader,_extends$a({},Rt,{className:ut+"__header",ref:this._setHeaderRef,data:ft,frozenData:pt,width:ht,height:Math.min(It+Mt,mt),rowWidth:Et,rowHeight:yt,headerHeight:this.props.headerHeight,headerRenderer:this.props.headerRenderer,rowRenderer:this.props.rowRenderer,hoveredRowKey:kt>0?$t:null})))},nt._setHeaderRef=function(ot){this.headerRef=ot},nt._setBodyRef=function(ot){this.bodyRef=ot},nt._setInnerRef=function(ot){this.innerRef=ot},nt._itemKey=function(ot){var st=ot.rowIndex,ut=this.props,ct=ut.data,ft=ut.rowKey;return ct[st][ft]},nt._getHeaderHeight=function(){var ot=this.props.headerHeight;return Array.isArray(ot)?ot.reduce(function(st,ut){return st+ut},0):ot},nt._getBodyWidth=function(){return this.props.bodyWidth},nt._handleItemsRendered=function(ot){var st=ot.overscanRowStartIndex,ut=ot.overscanRowStopIndex,ct=ot.visibleRowStartIndex,ft=ot.visibleRowStopIndex;this.props.onRowsRendered({overscanStartIndex:st,overscanStopIndex:ut,startIndex:ct,stopIndex:ft})},tt}(Wt.PureComponent);GridTable.propTypes={containerStyle:propTypes$1.exports.object,classPrefix:propTypes$1.exports.string,className:propTypes$1.exports.string,width:propTypes$1.exports.number.isRequired,height:propTypes$1.exports.number.isRequired,headerHeight:propTypes$1.exports.oneOfType([propTypes$1.exports.number,propTypes$1.exports.arrayOf(propTypes$1.exports.number)]).isRequired,headerWidth:propTypes$1.exports.number.isRequired,bodyWidth:propTypes$1.exports.number.isRequired,rowHeight:propTypes$1.exports.number.isRequired,estimatedRowHeight:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.number]),getRowHeight:propTypes$1.exports.func,columns:propTypes$1.exports.arrayOf(propTypes$1.exports.object).isRequired,data:propTypes$1.exports.array.isRequired,frozenData:propTypes$1.exports.array,rowKey:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.number]).isRequired,useIsScrolling:propTypes$1.exports.bool,overscanRowCount:propTypes$1.exports.number,hoveredRowKey:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.number]),style:propTypes$1.exports.object,onScrollbarPresenceChange:propTypes$1.exports.func,onScroll:propTypes$1.exports.func,onRowsRendered:propTypes$1.exports.func,headerRenderer:propTypes$1.exports.func.isRequired,rowRenderer:propTypes$1.exports.func.isRequired};var TableHeaderRow=function et(tt){var nt=tt.className,rt=tt.style,ot=tt.columns,st=tt.headerIndex,ut=tt.cellRenderer,ct=tt.headerRenderer,ft=tt.expandColumnKey,pt=tt.expandIcon,ht=tt.tagName,mt=_objectWithoutPropertiesLoose$7(tt,["className","style","columns","headerIndex","cellRenderer","headerRenderer","expandColumnKey","expandIcon","tagName"]),yt=ot.map(function(vt,Tt){return ut({columns:ot,column:vt,columnIndex:Tt,headerIndex:st,expandIcon:vt.key===ft&&Wt.createElement(pt,null)})});return ct&&(yt=renderElement(ct,{cells:yt,columns:ot,headerIndex:st})),Wt.createElement(ht,_extends$a({},mt,{className:nt,style:rt}),yt)};TableHeaderRow.defaultProps={tagName:"div"};TableHeaderRow.propTypes={isScrolling:propTypes$1.exports.bool,className:propTypes$1.exports.string,style:propTypes$1.exports.object,columns:propTypes$1.exports.arrayOf(propTypes$1.exports.object).isRequired,headerIndex:propTypes$1.exports.number,cellRenderer:propTypes$1.exports.func,headerRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),expandColumnKey:propTypes$1.exports.string,expandIcon:propTypes$1.exports.func,tagName:propTypes$1.exports.elementType};var TableRow$1=function(et){_inheritsLoose$5(tt,et);function tt(rt){var ot;return ot=et.call(this,rt)||this,ot.state={measured:!1},ot._setRef=ot._setRef.bind(_assertThisInitialized$2(ot)),ot._handleExpand=ot._handleExpand.bind(_assertThisInitialized$2(ot)),ot}var nt=tt.prototype;return nt.componentDidMount=function(){this.props.estimatedRowHeight&&this.props.rowIndex>=0&&this._measureHeight(!0)},nt.componentDidUpdate=function(ot,st){var ut=this;this.props.estimatedRowHeight&&this.props.rowIndex>=0&&!this.props.getIsResetting()&&this.state.measured&&st.measured&&this.setState({measured:!1},function(){return ut._measureHeight()})},nt.render=function(){var ot=this.props,st=ot.isScrolling,ut=ot.className,ct=ot.style,ft=ot.columns,pt=ot.rowIndex,ht=ot.rowData,mt=ot.expandColumnKey,yt=ot.depth,vt=ot.rowEventHandlers,Tt=ot.estimatedRowHeight,Et=ot.rowRenderer,xt=ot.cellRenderer,At=ot.expandIconRenderer,Ct=ot.tagName;ot.rowKey,ot.getIsResetting,ot.onRowHover,ot.onRowExpand,ot.onRowHeightChange;var $t=_objectWithoutPropertiesLoose$7(ot,["isScrolling","className","style","columns","rowIndex","rowData","expandColumnKey","depth","rowEventHandlers","estimatedRowHeight","rowRenderer","cellRenderer","expandIconRenderer","tagName","rowKey","getIsResetting","onRowHover","onRowExpand","onRowHeightChange"]),Ot=At({rowData:ht,rowIndex:pt,depth:yt,onExpand:this._handleExpand}),Rt=ft.map(function(Mt,Ft){return xt({isScrolling:st,columns:ft,column:Mt,columnIndex:Ft,rowData:ht,rowIndex:pt,expandIcon:Mt.key===mt&&Ot})});Et&&(Rt=renderElement(Et,{isScrolling:st,cells:Rt,columns:ft,rowData:ht,rowIndex:pt,depth:yt}));var It=this._getEventHandlers(vt);if(Tt&&pt>=0){ct.height;var kt=_objectWithoutPropertiesLoose$7(ct,["height"]);return Wt.createElement(Ct,_extends$a({},$t,{ref:this._setRef,className:ut,style:this.state.measured?ct:kt},this.state.measured&&It),Rt)}return Wt.createElement(Ct,_extends$a({},$t,{className:ut,style:ct},It),Rt)},nt._setRef=function(ot){this.ref=ot},nt._handleExpand=function(ot){var st=this.props,ut=st.onRowExpand,ct=st.rowData,ft=st.rowIndex,pt=st.rowKey;ut&&ut({expanded:ot,rowData:ct,rowIndex:ft,rowKey:pt})},nt._measureHeight=function(ot){if(!!this.ref){var st=this.props,ut=st.style,ct=st.rowKey,ft=st.onRowHeightChange,pt=st.rowIndex,ht=st.columns,mt=this.ref.getBoundingClientRect().height;this.setState({measured:!0},function(){(ot||mt!==ut.height)&&ft(ct,mt,pt,ht[0]&&!ht[0].__placeholder__&&ht[0].frozen)})}},nt._getEventHandlers=function(ot){ot===void 0&&(ot={});var st=this.props,ut=st.rowData,ct=st.rowIndex,ft=st.rowKey,pt=st.onRowHover,ht={};if(Object.keys(ot).forEach(function(vt){var Tt=ot[vt];typeof Tt=="function"&&(ht[vt]=function(Et){Tt({rowData:ut,rowIndex:ct,rowKey:ft,event:Et})})}),pt){var mt=ht.onMouseEnter;ht.onMouseEnter=function(vt){pt({hovered:!0,rowData:ut,rowIndex:ct,rowKey:ft,event:vt}),mt&&mt(vt)};var yt=ht.onMouseLeave;ht.onMouseLeave=function(vt){pt({hovered:!1,rowData:ut,rowIndex:ct,rowKey:ft,event:vt}),yt&&yt(vt)}}return ht},tt}(Wt.PureComponent);TableRow$1.defaultProps={tagName:"div"};TableRow$1.propTypes={isScrolling:propTypes$1.exports.bool,className:propTypes$1.exports.string,style:propTypes$1.exports.object,columns:propTypes$1.exports.arrayOf(propTypes$1.exports.object).isRequired,rowData:propTypes$1.exports.object.isRequired,rowIndex:propTypes$1.exports.number.isRequired,rowKey:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.number]),expandColumnKey:propTypes$1.exports.string,depth:propTypes$1.exports.number,rowEventHandlers:propTypes$1.exports.object,rowRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),cellRenderer:propTypes$1.exports.func,expandIconRenderer:propTypes$1.exports.func,estimatedRowHeight:propTypes$1.exports.oneOfType([propTypes$1.exports.number,propTypes$1.exports.func]),getIsResetting:propTypes$1.exports.func,onRowHover:propTypes$1.exports.func,onRowExpand:propTypes$1.exports.func,onRowHeightChange:propTypes$1.exports.func,tagName:propTypes$1.exports.elementType};var TableHeaderCell=function et(tt){var nt=tt.className,rt=tt.column;return tt.columnIndex,Wt.createElement("div",{className:nt},rt.title)};TableHeaderCell.propTypes={className:propTypes$1.exports.string,column:propTypes$1.exports.object,columnIndex:propTypes$1.exports.number};var TableCell=function et(tt){var nt=tt.className,rt=tt.cellData;return tt.column,tt.columnIndex,tt.rowData,tt.rowIndex,Wt.createElement("div",{className:nt},Wt.isValidElement(rt)?rt:toString(rt))};TableCell.propTypes={className:propTypes$1.exports.string,cellData:propTypes$1.exports.any,column:propTypes$1.exports.object,columnIndex:propTypes$1.exports.number,rowData:propTypes$1.exports.object,rowIndex:propTypes$1.exports.number};var Alignment={LEFT:"left",CENTER:"center",RIGHT:"right"},FrozenDirection={LEFT:"left",RIGHT:"right",DEFAULT:!0,NONE:!1},Column=function(et){_inheritsLoose$5(tt,et);function tt(){return et.apply(this,arguments)||this}return tt}(Wt.Component);Column.propTypes={className:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.func]),headerClassName:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.func]),style:propTypes$1.exports.object,title:propTypes$1.exports.node,dataKey:propTypes$1.exports.string,dataGetter:propTypes$1.exports.func,align:propTypes$1.exports.oneOf(["left","center","right"]),flexGrow:propTypes$1.exports.number,flexShrink:propTypes$1.exports.number,width:propTypes$1.exports.number.isRequired,maxWidth:propTypes$1.exports.number,minWidth:propTypes$1.exports.number,frozen:propTypes$1.exports.oneOf(["left","right",!0,!1]),hidden:propTypes$1.exports.bool,resizable:propTypes$1.exports.bool,sortable:propTypes$1.exports.bool,cellRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),headerRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element])};Column.Alignment=Alignment;Column.FrozenDirection=FrozenDirection;var SortOrder={ASC:"asc",DESC:"desc"},ExpandIcon=function(et){_inheritsLoose$5(tt,et);function tt(rt){var ot;return ot=et.call(this,rt)||this,ot._handleClick=ot._handleClick.bind(_assertThisInitialized$2(ot)),ot}var nt=tt.prototype;return nt.render=function(){var ot=this.props,st=ot.expandable,ut=ot.expanded,ct=ot.indentSize,ft=ot.depth,pt=ot.onExpand,ht=_objectWithoutPropertiesLoose$7(ot,["expandable","expanded","indentSize","depth","onExpand"]);if(!st&&ct===0)return null;var mt=classnames("BaseTable__expand-icon",{"BaseTable__expand-icon--expanded":ut});return Wt.createElement("div",_extends$a({},ht,{className:mt,onClick:st&&pt?this._handleClick:null,style:{fontFamily:"initial",cursor:"pointer",userSelect:"none",width:"16px",minWidth:"16px",height:"16px",lineHeight:"16px",fontSize:"16px",textAlign:"center",transition:"transform 0.15s ease-out",transform:"rotate("+(st&&ut?90:0)+"deg)",marginLeft:ft*ct}}),st&&"\u25B8")},nt._handleClick=function(ot){ot.stopPropagation(),ot.preventDefault();var st=this.props,ut=st.onExpand,ct=st.expanded;ut(!ct)},tt}(Wt.PureComponent);ExpandIcon.defaultProps={depth:0,indentSize:16};ExpandIcon.propTypes={expandable:propTypes$1.exports.bool,expanded:propTypes$1.exports.bool,indentSize:propTypes$1.exports.number,depth:propTypes$1.exports.number,onExpand:propTypes$1.exports.func};function ownKeys$3(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$3(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$3(nt,!0).forEach(function(rt){_defineProperty$d(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$3(nt).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var SortIndicator=function et(tt){var nt=tt.sortOrder,rt=tt.className,ot=tt.style,st=classnames("BaseTable__sort-indicator",rt,{"BaseTable__sort-indicator--descending":nt===SortOrder.DESC});return Wt.createElement("div",{className:st,style:_objectSpread$3({userSelect:"none",width:"16px",height:"16px",lineHeight:"16px",textAlign:"center"},ot)},nt===SortOrder.DESC?"\u2193":"\u2191")};SortIndicator.propTypes={sortOrder:propTypes$1.exports.oneOf([SortOrder.ASC,SortOrder.DESC]),className:propTypes$1.exports.string,style:propTypes$1.exports.object};function ownKeys$2(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$2(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$2(nt,!0).forEach(function(rt){_defineProperty$d(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$2(nt).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var INVALID_VALUE=null;function addUserSelectStyles(et){if(!!et){var tt=et.getElementById("react-draggable-style-el");tt||(tt=et.createElement("style"),tt.type="text/css",tt.id="react-draggable-style-el",tt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,tt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,et.getElementsByTagName("head")[0].appendChild(tt)),et.body&&addClassName(et.body,"react-draggable-transparent-selection")}}function removeUserSelectStyles(et){if(!!et)try{if(et.body&&removeClassName(et.body,"react-draggable-transparent-selection"),et.selection)et.selection.empty();else{var tt=(et.defaultView||window).getSelection();tt&&tt.type!=="Caret"&&tt.removeAllRanges()}}catch{}}var eventsFor={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},dragEventFor=eventsFor.mouse,ColumnResizer=function(et){_inheritsLoose$5(tt,et);function tt(rt){var ot;return ot=et.call(this,rt)||this,ot.isDragging=!1,ot.lastX=INVALID_VALUE,ot.width=0,ot._setHandleRef=ot._setHandleRef.bind(_assertThisInitialized$2(ot)),ot._handleClick=ot._handleClick.bind(_assertThisInitialized$2(ot)),ot._handleMouseDown=ot._handleMouseDown.bind(_assertThisInitialized$2(ot)),ot._handleMouseUp=ot._handleMouseUp.bind(_assertThisInitialized$2(ot)),ot._handleTouchStart=ot._handleTouchStart.bind(_assertThisInitialized$2(ot)),ot._handleTouchEnd=ot._handleTouchEnd.bind(_assertThisInitialized$2(ot)),ot._handleDragStart=ot._handleDragStart.bind(_assertThisInitialized$2(ot)),ot._handleDragStop=ot._handleDragStop.bind(_assertThisInitialized$2(ot)),ot._handleDrag=ot._handleDrag.bind(_assertThisInitialized$2(ot)),ot}var nt=tt.prototype;return nt.componentWillUnmount=function(){if(this.handleRef){var ot=this.handleRef.ownerDocument;ot.removeEventListener(eventsFor.mouse.move,this._handleDrag),ot.removeEventListener(eventsFor.mouse.stop,this._handleDragStop),ot.removeEventListener(eventsFor.touch.move,this._handleDrag),ot.removeEventListener(eventsFor.touch.stop,this._handleDragStop),removeUserSelectStyles(ot)}},nt.render=function(){var ot=this.props,st=ot.style;ot.column,ot.onResizeStart,ot.onResize,ot.onResizeStop,ot.minWidth;var ut=_objectWithoutPropertiesLoose$7(ot,["style","column","onResizeStart","onResize","onResizeStop","minWidth"]);return Wt.createElement("div",_extends$a({},ut,{ref:this._setHandleRef,onClick:this._handleClick,onMouseDown:this._handleMouseDown,onMouseUp:this._handleMouseUp,onTouchStart:this._handleTouchStart,onTouchEnd:this._handleTouchEnd,style:_objectSpread$2({userSelect:"none",touchAction:"none",position:"absolute",top:0,bottom:0,right:0,cursor:"col-resize"},st)}))},nt._setHandleRef=function(ot){this.handleRef=ot},nt._handleClick=function(ot){ot.stopPropagation()},nt._handleMouseDown=function(ot){dragEventFor=eventsFor.mouse,this._handleDragStart(ot)},nt._handleMouseUp=function(ot){dragEventFor=eventsFor.mouse,this._handleDragStop(ot)},nt._handleTouchStart=function(ot){dragEventFor=eventsFor.touch,this._handleDragStart(ot)},nt._handleTouchEnd=function(ot){dragEventFor=eventsFor.touch,this._handleDragStop(ot)},nt._handleDragStart=function(ot){if(!(typeof ot.button=="number"&&ot.button!==0)){this.isDragging=!0,this.lastX=INVALID_VALUE,this.width=this.props.column.width,this.props.onResizeStart(this.props.column);var st=this.handleRef.ownerDocument;addUserSelectStyles(st),st.addEventListener(dragEventFor.move,this._handleDrag),st.addEventListener(dragEventFor.stop,this._handleDragStop)}},nt._handleDragStop=function(ot){if(!!this.isDragging){this.isDragging=!1,this.props.onResizeStop(this.props.column);var st=this.handleRef.ownerDocument;removeUserSelectStyles(st),st.removeEventListener(dragEventFor.move,this._handleDrag),st.removeEventListener(dragEventFor.stop,this._handleDragStop)}},nt._handleDrag=function(ot){var st=ot.clientX;ot.type===eventsFor.touch.move&&(ot.preventDefault(),ot.targetTouches&&ot.targetTouches[0]&&(st=ot.targetTouches[0].clientX));var ut=this.handleRef.offsetParent,ct=ut.getBoundingClientRect(),ft=st+ut.scrollLeft-ct.left;if(this.lastX===INVALID_VALUE){this.lastX=ft;return}var pt=this.props,ht=pt.column,mt=pt.minWidth,yt=ht.width,vt=ht.maxWidth,Tt=ht.minWidth,Et=Tt===void 0?mt:Tt,xt=ft-this.lastX;if(!!xt){this.width=this.width+xt,this.lastX=ft;var At=this.width;vt&&At>vt?At=vt:At<Et&&(At=Et),At!==yt&&this.props.onResize(ht,At)}},tt}(Wt.PureComponent);ColumnResizer.defaultProps={onResizeStart:noop,onResize:noop,onResizeStop:noop,minWidth:30};ColumnResizer.propTypes={style:propTypes$1.exports.object,column:propTypes$1.exports.object,onResizeStart:propTypes$1.exports.func,onResize:propTypes$1.exports.func,onResizeStop:propTypes$1.exports.func,minWidth:propTypes$1.exports.number};function ownKeys$1(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$1(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$1(nt,!0).forEach(function(rt){_defineProperty$d(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys$1(nt).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var ColumnManager=function(){function et(nt,rt){this._origColumns=[],this.reset(nt,rt)}var tt=et.prototype;return tt._cache=function(rt,ot){return rt in this._cached?this._cached[rt]:(this._cached[rt]=ot(),this._cached[rt])},tt.reset=function(rt,ot){var st=this;this._columns=rt.map(function(ut){var ct=ut.width;if(ut.resizable){var ft=st._origColumns.findIndex(function(pt){return pt.key===ut.key});ft>=0&&st._origColumns[ft].width===ut.width&&(ct=st._columns[ft].width)}return _objectSpread$1({},ut,{width:ct})}),this._origColumns=rt,this._fixed=ot,this._cached={},this._columnStyles=this.recomputeColumnStyles()},tt.resetCache=function(){this._cached={}},tt.getOriginalColumns=function(){return this._origColumns},tt.getColumns=function(){return this._columns},tt.getVisibleColumns=function(){var rt=this;return this._cache("visibleColumns",function(){return rt._columns.filter(function(ot){return!ot.hidden})})},tt.hasFrozenColumns=function(){var rt=this;return this._cache("hasFrozenColumns",function(){return rt._fixed&&rt.getVisibleColumns().some(function(ot){return!!ot.frozen})})},tt.hasLeftFrozenColumns=function(){var rt=this;return this._cache("hasLeftFrozenColumns",function(){return rt._fixed&&rt.getVisibleColumns().some(function(ot){return ot.frozen===FrozenDirection.LEFT||ot.frozen===!0})})},tt.hasRightFrozenColumns=function(){var rt=this;return this._cache("hasRightFrozenColumns",function(){return rt._fixed&&rt.getVisibleColumns().some(function(ot){return ot.frozen===FrozenDirection.RIGHT})})},tt.getMainColumns=function(){var rt=this;return this._cache("mainColumns",function(){var ot=rt.getVisibleColumns();if(!rt.hasFrozenColumns())return ot;var st=[];return rt.getLeftFrozenColumns().forEach(function(ut){var ct;st.push(_objectSpread$1({},ut,(ct={},ct[et.PlaceholderKey]=!0,ct)))}),rt.getVisibleColumns().forEach(function(ut){ut.frozen||st.push(ut)}),rt.getRightFrozenColumns().forEach(function(ut){var ct;st.push(_objectSpread$1({},ut,(ct={},ct[et.PlaceholderKey]=!0,ct)))}),st})},tt.getLeftFrozenColumns=function(){var rt=this;return this._cache("leftFrozenColumns",function(){return rt._fixed?rt.getVisibleColumns().filter(function(ot){return ot.frozen===FrozenDirection.LEFT||ot.frozen===!0}):[]})},tt.getRightFrozenColumns=function(){var rt=this;return this._cache("rightFrozenColumns",function(){return rt._fixed?rt.getVisibleColumns().filter(function(ot){return ot.frozen===FrozenDirection.RIGHT}):[]})},tt.getColumn=function(rt){var ot=this._columns.findIndex(function(st){return st.key===rt});return this._columns[ot]},tt.getColumnsWidth=function(){var rt=this;return this._cache("columnsWidth",function(){return rt.recomputeColumnsWidth(rt.getVisibleColumns())})},tt.getLeftFrozenColumnsWidth=function(){var rt=this;return this._cache("leftFrozenColumnsWidth",function(){return rt.recomputeColumnsWidth(rt.getLeftFrozenColumns())})},tt.getRightFrozenColumnsWidth=function(){var rt=this;return this._cache("rightFrozenColumnsWidth",function(){return rt.recomputeColumnsWidth(rt.getRightFrozenColumns())})},tt.recomputeColumnsWidth=function(rt){return rt.reduce(function(ot,st){return ot+st.width},0)},tt.setColumnWidth=function(rt,ot){var st=this.getColumn(rt);st.width=ot,this._cached={},this._columnStyles[st.key]=this.recomputeColumnStyle(st)},tt.getColumnStyle=function(rt){return this._columnStyles[rt]},tt.getColumnStyles=function(){return this._columnStyles},tt.recomputeColumnStyle=function(rt){var ot=0,st=0;this._fixed||(ot=typeof rt.flexGrow=="number"?rt.flexGrow:0,st=typeof rt.flexShrink=="number"?rt.flexShrink:1);var ut=ot+" "+st+" auto",ct=_objectSpread$1({},rt.style,{flex:ut,msFlex:ut,WebkitFlex:ut,width:rt.width,overflow:"hidden"});return!this._fixed&&rt.maxWidth&&(ct.maxWidth=rt.maxWidth),!this._fixed&&rt.minWidth&&(ct.minWidth=rt.minWidth),ct},tt.recomputeColumnStyles=function(){var rt=this;return this._columns.reduce(function(ot,st){return ot[st.key]=rt.recomputeColumnStyle(st),ot},{})},et}();ColumnManager.PlaceholderKey="__placeholder__";function ownKeys(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(et,ot).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread(et){for(var tt=1;tt<arguments.length;tt++){var nt=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys(nt,!0).forEach(function(rt){_defineProperty$d(et,rt,nt[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):ownKeys(nt).forEach(function(rt){Object.defineProperty(et,rt,Object.getOwnPropertyDescriptor(nt,rt))})}return et}var getColumns=memoizeOne$1(function(et,tt){return et||normalizeColumns(tt)}),getContainerStyle=function et(tt,nt,rt){return{width:tt,maxWidth:nt,height:rt,overflow:"hidden"}},DEFAULT_COMPONENTS={TableCell,TableHeaderCell,ExpandIcon,SortIndicator},RESIZE_THROTTLE_WAIT=50,EMPTY_ARRAY=[],BaseTable=function(et){_inheritsLoose$5(tt,et);function tt(rt){var ot;ot=et.call(this,rt)||this;var st=rt.columns,ut=rt.children,ct=rt.defaultExpandedRowKeys;return ot.state={scrollbarSize:0,hoveredRowKey:null,resizingKey:null,resizingWidth:0,expandedRowKeys:cloneArray(ct)},ot.columnManager=new ColumnManager(getColumns(st,ut),rt.fixed),ot._setContainerRef=ot._setContainerRef.bind(_assertThisInitialized$2(ot)),ot._setMainTableRef=ot._setMainTableRef.bind(_assertThisInitialized$2(ot)),ot._setLeftTableRef=ot._setLeftTableRef.bind(_assertThisInitialized$2(ot)),ot._setRightTableRef=ot._setRightTableRef.bind(_assertThisInitialized$2(ot)),ot.renderExpandIcon=ot.renderExpandIcon.bind(_assertThisInitialized$2(ot)),ot.renderRow=ot.renderRow.bind(_assertThisInitialized$2(ot)),ot.renderRowCell=ot.renderRowCell.bind(_assertThisInitialized$2(ot)),ot.renderHeader=ot.renderHeader.bind(_assertThisInitialized$2(ot)),ot.renderHeaderCell=ot.renderHeaderCell.bind(_assertThisInitialized$2(ot)),ot._handleScroll=ot._handleScroll.bind(_assertThisInitialized$2(ot)),ot._handleVerticalScroll=ot._handleVerticalScroll.bind(_assertThisInitialized$2(ot)),ot._handleRowsRendered=ot._handleRowsRendered.bind(_assertThisInitialized$2(ot)),ot._handleRowHover=ot._handleRowHover.bind(_assertThisInitialized$2(ot)),ot._handleRowExpand=ot._handleRowExpand.bind(_assertThisInitialized$2(ot)),ot._handleColumnResize=throttle(ot._handleColumnResize.bind(_assertThisInitialized$2(ot)),RESIZE_THROTTLE_WAIT),ot._handleColumnResizeStart=ot._handleColumnResizeStart.bind(_assertThisInitialized$2(ot)),ot._handleColumnResizeStop=ot._handleColumnResizeStop.bind(_assertThisInitialized$2(ot)),ot._handleColumnSort=ot._handleColumnSort.bind(_assertThisInitialized$2(ot)),ot._handleFrozenRowHeightChange=ot._handleFrozenRowHeightChange.bind(_assertThisInitialized$2(ot)),ot._handleRowHeightChange=ot._handleRowHeightChange.bind(_assertThisInitialized$2(ot)),ot._getLeftTableContainerStyle=memoizeOne$1(getContainerStyle),ot._getRightTableContainerStyle=memoizeOne$1(getContainerStyle),ot._flattenOnKeys=memoizeOne$1(function(ft,pt,ht){return ot._depthMap={},flattenOnKeys(ft,pt,ot._depthMap,ht)}),ot._resetColumnManager=memoizeOne$1(function(ft,pt){ot.columnManager.reset(ft,pt),ot.props.estimatedRowHeight&&pt&&(ot.columnManager.hasLeftFrozenColumns()||(ot._leftRowHeightMap={}),ot.columnManager.hasRightFrozenColumns()||(ot._rightRowHeightMap={}))},function(ft,pt){return isObjectEqual(ft,pt,ot.props.ignoreFunctionInColumnCompare)}),ot._isResetting=!1,ot._resetIndex=null,ot._rowHeightMap={},ot._rowHeightMapBuffer={},ot._mainRowHeightMap={},ot._leftRowHeightMap={},ot._rightRowHeightMap={},ot._getEstimatedTotalRowsHeight=memoizeOne$1(getEstimatedTotalRowsHeight),ot._getRowHeight=ot._getRowHeight.bind(_assertThisInitialized$2(ot)),ot._updateRowHeights=debounce(function(){ot._isResetting=!0,ot._rowHeightMap=_objectSpread({},ot._rowHeightMap,{},ot._rowHeightMapBuffer),ot.resetAfterRowIndex(ot._resetIndex,!1),ot._rowHeightMapBuffer={},ot._resetIndex=null,ot.forceUpdateTable(),ot.forceUpdate(),ot._isResetting=!1},0),ot._scroll={scrollLeft:0,scrollTop:0},ot._scrollHeight=0,ot._lastScannedRowIndex=-1,ot._hasDataChangedSinceEndReached=!0,ot._data=rt.data,ot._depthMap={},ot._horizontalScrollbarSize=0,ot._verticalScrollbarSize=0,ot._scrollbarPresenceChanged=!1,ot}var nt=tt.prototype;return nt.getDOMNode=function(){return this.tableNode},nt.getColumnManager=function(){return this.columnManager},nt.getExpandedRowKeys=function(){var ot=this.props.expandedRowKeys;return ot!==void 0?ot||EMPTY_ARRAY:this.state.expandedRowKeys},nt.getExpandedState=function(){return{expandedData:this._data,expandedRowKeys:this.getExpandedRowKeys(),expandedDepthMap:this._depthMap}},nt.getTotalRowsHeight=function(){var ot=this.props,st=ot.rowHeight,ut=ot.estimatedRowHeight;return ut?this.table?this.table.getTotalRowsHeight():this._getEstimatedTotalRowsHeight(this._data,ut):this._data.length*st},nt.getTotalColumnsWidth=function(){return this.columnManager.getColumnsWidth()},nt.forceUpdateTable=function(){this.table&&this.table.forceUpdateTable(),this.leftTable&&this.leftTable.forceUpdateTable(),this.rightTable&&this.rightTable.forceUpdateTable()},nt.resetAfterRowIndex=function(ot,st){ot===void 0&&(ot=0),st===void 0&&(st=!0),this.props.estimatedRowHeight&&(this.table&&this.table.resetAfterRowIndex(ot,st),this.leftTable&&this.leftTable.resetAfterRowIndex(ot,st),this.rightTable&&this.rightTable.resetAfterRowIndex(ot,st))},nt.resetRowHeightCache=function(){!this.props.estimatedRowHeight||(this._resetIndex=null,this._rowHeightMapBuffer={},this._rowHeightMap={},this._mainRowHeightMap={},this._leftRowHeightMap={},this._rightRowHeightMap={})},nt.scrollToPosition=function(ot){this._scroll=ot,this.table&&this.table.scrollToPosition(ot),this.leftTable&&this.leftTable.scrollToTop(ot.scrollTop),this.rightTable&&this.rightTable.scrollToTop(ot.scrollTop)},nt.scrollToTop=function(ot){this._scroll.scrollTop=ot,this.table&&this.table.scrollToPosition(this._scroll),this.leftTable&&this.leftTable.scrollToTop(ot),this.rightTable&&this.rightTable.scrollToTop(ot)},nt.scrollToLeft=function(ot){this._scroll.scrollLeft=ot,this.table&&this.table.scrollToPosition(this._scroll)},nt.scrollToRow=function(ot,st){ot===void 0&&(ot=0),st===void 0&&(st="auto"),this.table&&this.table.scrollToRow(ot,st),this.leftTable&&this.leftTable.scrollToRow(ot,st),this.rightTable&&this.rightTable.scrollToRow(ot,st)},nt.setExpandedRowKeys=function(ot){this.props.expandedRowKeys===void 0&&this.setState({expandedRowKeys:cloneArray(ot)})},nt.renderExpandIcon=function(ot){var st=ot.rowData,ut=ot.rowIndex,ct=ot.depth,ft=ot.onExpand,pt=this.props,ht=pt.rowKey,mt=pt.expandColumnKey,yt=pt.expandIconProps;if(!mt)return null;var vt=ut>=0&&hasChildren(st),Tt=ut>=0&&this.getExpandedRowKeys().indexOf(st[ht])>=0,Et=callOrReturn(yt,{rowData:st,rowIndex:ut,depth:ct,expandable:vt,expanded:Tt}),xt=this._getComponent("ExpandIcon");return Wt.createElement(xt,_extends$a({depth:ct,expandable:vt,expanded:Tt},Et,{onExpand:ft}))},nt.renderRow=function(ot){var st,ut=ot.isScrolling,ct=ot.columns,ft=ot.rowData,pt=ot.rowIndex,ht=ot.style,mt=this.props,yt=mt.rowClassName,vt=mt.rowRenderer,Tt=mt.rowEventHandlers,Et=mt.expandColumnKey,xt=mt.estimatedRowHeight,At=callOrReturn(yt,{columns:ct,rowData:ft,rowIndex:pt}),Ct=callOrReturn(this.props.rowProps,{columns:ct,rowData:ft,rowIndex:pt}),$t=ft[this.props.rowKey],Ot=this._depthMap[$t]||0,Rt=classnames(this._prefixClass("row"),At,(st={},st[this._prefixClass("row--depth-"+Ot)]=!!Et&&pt>=0,st[this._prefixClass("row--expanded")]=!!Et&&this.getExpandedRowKeys().indexOf($t)>=0,st[this._prefixClass("row--hovered")]=!ut&&$t===this.state.hoveredRowKey,st[this._prefixClass("row--frozen")]=Ot===0&&pt<0,st[this._prefixClass("row--customized")]=vt,st)),It=this.columnManager.hasFrozenColumns(),kt=_objectSpread({},Ct,{role:"row",key:"row-"+$t,isScrolling:ut,className:Rt,style:ht,columns:ct,rowIndex:pt,rowData:ft,rowKey:$t,expandColumnKey:Et,depth:Ot,rowEventHandlers:Tt,rowRenderer:vt,estimatedRowHeight:pt>=0?xt:void 0,getIsResetting:this._getIsResetting,cellRenderer:this.renderRowCell,expandIconRenderer:this.renderExpandIcon,onRowExpand:this._handleRowExpand,onRowHover:It?this._handleRowHover:null,onRowHeightChange:It?this._handleFrozenRowHeightChange:this._handleRowHeightChange});return Wt.createElement(TableRow$1,kt)},nt.renderRowCell=function(ot){var st,ut=ot.isScrolling,ct=ot.columns,ft=ot.column,pt=ot.columnIndex,ht=ot.rowData,mt=ot.rowIndex,yt=ot.expandIcon;if(ft[ColumnManager.PlaceholderKey])return Wt.createElement("div",{key:"row-"+ht[this.props.rowKey]+"-cell-"+ft.key+"-placeholder",className:this._prefixClass("row-cell-placeholder"),style:this.columnManager.getColumnStyle(ft.key)});var vt=ft.className,Tt=ft.dataKey,Et=ft.dataGetter,xt=ft.cellRenderer,At=this._getComponent("TableCell"),Ct=Et?Et({columns:ct,column:ft,columnIndex:pt,rowData:ht,rowIndex:mt}):getValue(ht,Tt),$t={isScrolling:ut,cellData:Ct,columns:ct,column:ft,columnIndex:pt,rowData:ht,rowIndex:mt,container:this},Ot=renderElement(xt||Wt.createElement(At,{className:this._prefixClass("row-cell-text")}),$t),Rt=callOrReturn(vt,{cellData:Ct,columns:ct,column:ft,columnIndex:pt,rowData:ht,rowIndex:mt}),It=classnames(this._prefixClass("row-cell"),Rt,(st={},st[this._prefixClass("row-cell--align-center")]=ft.align===Alignment.CENTER,st[this._prefixClass("row-cell--align-right")]=ft.align===Alignment.RIGHT,st)),kt=callOrReturn(this.props.cellProps,{columns:ct,column:ft,columnIndex:pt,rowData:ht,rowIndex:mt}),Mt=kt||{},Ft=Mt.tagName,zt=_objectWithoutPropertiesLoose$7(Mt,["tagName"]),Vt=Ft||"div";return Wt.createElement(Vt,_extends$a({role:"gridcell",key:"row-"+ht[this.props.rowKey]+"-cell-"+ft.key},zt,{className:It,style:this.columnManager.getColumnStyle(ft.key)}),yt,Ot)},nt.renderHeader=function(ot){var st,ut=ot.columns,ct=ot.headerIndex,ft=ot.style,pt=this.props,ht=pt.headerClassName,mt=pt.headerRenderer,yt=callOrReturn(ht,{columns:ut,headerIndex:ct}),vt=callOrReturn(this.props.headerProps,{columns:ut,headerIndex:ct}),Tt=classnames(this._prefixClass("header-row"),yt,(st={},st[this._prefixClass("header-row--resizing")]=!!this.state.resizingKey,st[this._prefixClass("header-row--customized")]=mt,st)),Et=_objectSpread({},vt,{role:"row",key:"header-"+ct,className:Tt,style:ft,columns:ut,headerIndex:ct,headerRenderer:mt,cellRenderer:this.renderHeaderCell,expandColumnKey:this.props.expandColumnKey,expandIcon:this._getComponent("ExpandIcon")});return Wt.createElement(TableHeaderRow,Et)},nt.renderHeaderCell=function(ot){var st,ut,ct=ot.columns,ft=ot.column,pt=ot.columnIndex,ht=ot.headerIndex,mt=ot.expandIcon;if(ft[ColumnManager.PlaceholderKey])return Wt.createElement("div",{key:"header-"+ht+"-cell-"+ft.key+"-placeholder",className:this._prefixClass("header-cell-placeholder"),style:this.columnManager.getColumnStyle(ft.key)});var yt=ft.headerClassName,vt=ft.headerRenderer,Tt=this.props,Et=Tt.sortBy,xt=Tt.sortState,At=Tt.headerCellProps,Ct=this._getComponent("TableHeaderCell"),$t=this._getComponent("SortIndicator"),Ot={columns:ct,column:ft,columnIndex:pt,headerIndex:ht,container:this},Rt=renderElement(vt||Wt.createElement(Ct,{className:this._prefixClass("header-cell-text")}),Ot),It,kt;if(xt){var Mt=xt[ft.key];It=Mt===SortOrder.ASC||Mt===SortOrder.DESC,kt=It?Mt:SortOrder.ASC}else It=ft.key===Et.key,kt=It?Et.order:SortOrder.ASC;var Ft=callOrReturn(yt,{columns:ct,column:ft,columnIndex:pt,headerIndex:ht}),zt=classnames(this._prefixClass("header-cell"),Ft,(st={},st[this._prefixClass("header-cell--align-center")]=ft.align===Alignment.CENTER,st[this._prefixClass("header-cell--align-right")]=ft.align===Alignment.RIGHT,st[this._prefixClass("header-cell--sortable")]=ft.sortable,st[this._prefixClass("header-cell--sorting")]=It,st[this._prefixClass("header-cell--resizing")]=ft.key===this.state.resizingKey,st)),Vt=callOrReturn(At,{columns:ct,column:ft,columnIndex:pt,headerIndex:ht}),Zt=Vt||{},Ut=Zt.tagName,Xt=_objectWithoutPropertiesLoose$7(Zt,["tagName"]),Jt=Ut||"div";return Wt.createElement(Jt,_extends$a({role:"gridcell",key:"header-"+ht+"-cell-"+ft.key,onClick:ft.sortable?this._handleColumnSort:null},Xt,{className:zt,style:this.columnManager.getColumnStyle(ft.key),"data-key":ft.key}),mt,Rt,ft.sortable&&Wt.createElement($t,{sorting:It,sortOrder:kt,className:classnames(this._prefixClass("sort-indicator"),(ut={},ut[this._prefixClass("sort-indicator--descending")]=kt===SortOrder.DESC,ut))}),ft.resizable&&Wt.createElement(ColumnResizer,{className:this._prefixClass("column-resizer"),column:ft,onResizeStart:this._handleColumnResizeStart,onResizeStop:this._handleColumnResizeStop,onResize:this._handleColumnResize}))},nt.renderMainTable=function(){var ot=this.props,st=ot.width,ut=ot.headerHeight,ct=ot.rowHeight,ft=ot.fixed,pt=ot.estimatedRowHeight,ht=_objectWithoutPropertiesLoose$7(ot,["width","headerHeight","rowHeight","fixed","estimatedRowHeight"]),mt=this._getTableHeight(),yt=st-this._verticalScrollbarSize;if(ft){var vt=this.columnManager.getColumnsWidth();yt=Math.max(Math.round(vt),yt)}return Wt.createElement(GridTable,_extends$a({},ht,this.state,{className:this._prefixClass("table-main"),ref:this._setMainTableRef,data:this._data,columns:this.columnManager.getMainColumns(),width:st,height:mt,headerHeight:ut,rowHeight:ct,estimatedRowHeight:pt,getRowHeight:pt?this._getRowHeight:void 0,headerWidth:yt+(ft?this._verticalScrollbarSize:0),bodyWidth:yt,headerRenderer:this.renderHeader,rowRenderer:this.renderRow,onScroll:this._handleScroll,onRowsRendered:this._handleRowsRendered}))},nt.renderLeftTable=function(){if(!this.columnManager.hasLeftFrozenColumns())return null;var ot=this.props,st=ot.width,ut=ot.headerHeight,ct=ot.rowHeight,ft=ot.estimatedRowHeight,pt=_objectWithoutPropertiesLoose$7(ot,["width","headerHeight","rowHeight","estimatedRowHeight"]),ht=this._getFrozenContainerHeight(),mt=this._verticalScrollbarSize||20,yt=this.columnManager.getLeftFrozenColumnsWidth();return Wt.createElement(GridTable,_extends$a({},pt,this.state,{containerStyle:this._getLeftTableContainerStyle(yt,st,ht),className:this._prefixClass("table-frozen-left"),ref:this._setLeftTableRef,data:this._data,columns:this.columnManager.getLeftFrozenColumns(),initialScrollTop:this._scroll.scrollTop,width:yt+mt,height:ht,headerHeight:ut,rowHeight:ct,estimatedRowHeight:ft,getRowHeight:ft?this._getRowHeight:void 0,headerWidth:yt+mt,bodyWidth:yt+mt,headerRenderer:this.renderHeader,rowRenderer:this.renderRow,onScroll:this._handleVerticalScroll,onRowsRendered:noop}))},nt.renderRightTable=function(){if(!this.columnManager.hasRightFrozenColumns())return null;var ot=this.props,st=ot.width,ut=ot.headerHeight,ct=ot.rowHeight,ft=ot.estimatedRowHeight,pt=_objectWithoutPropertiesLoose$7(ot,["width","headerHeight","rowHeight","estimatedRowHeight"]),ht=this._getFrozenContainerHeight(),mt=this.columnManager.getRightFrozenColumnsWidth(),yt=this._verticalScrollbarSize;return Wt.createElement(GridTable,_extends$a({},pt,this.state,{containerStyle:this._getLeftTableContainerStyle(mt+yt,st,ht),className:this._prefixClass("table-frozen-right"),ref:this._setRightTableRef,data:this._data,columns:this.columnManager.getRightFrozenColumns(),initialScrollTop:this._scroll.scrollTop,width:mt+yt,height:ht,headerHeight:ut,rowHeight:ct,estimatedRowHeight:ft,getRowHeight:ft?this._getRowHeight:void 0,headerWidth:mt+yt,bodyWidth:mt,headerRenderer:this.renderHeader,rowRenderer:this.renderRow,onScroll:this._handleVerticalScroll,onRowsRendered:noop}))},nt.renderResizingLine=function(){var ot=this.props,st=ot.width,ut=ot.fixed,ct=this.state.resizingKey;if(!ut||!ct)return null;var ft=this.columnManager.getMainColumns(),pt=ft.findIndex(function(At){return At.key===ct}),ht=ft[pt],mt=ht.width,yt=ht.frozen,vt=this.columnManager.recomputeColumnsWidth(ft.slice(0,pt)),Tt=vt+mt;if(!yt)Tt-=this._scroll.scrollLeft;else if(yt===FrozenDirection.RIGHT){var Et=this.columnManager.recomputeColumnsWidth(ft.slice(pt+1));Et+mt>st-this._verticalScrollbarSize?Tt=mt:Tt=st-this._verticalScrollbarSize-Et}var xt={left:Tt,height:this._getTableHeight()-this._horizontalScrollbarSize};return Wt.createElement("div",{className:this._prefixClass("resizing-line"),style:xt})},nt.renderFooter=function(){var ot=this.props,st=ot.footerHeight,ut=ot.footerRenderer;return st===0?null:Wt.createElement("div",{className:this._prefixClass("footer"),style:{height:st}},renderElement(ut))},nt.renderEmptyLayer=function(){var ot=this.props,st=ot.data,ut=ot.frozenData,ct=ot.footerHeight,ft=ot.emptyRenderer;if(st&&st.length||ut&&ut.length)return null;var pt=this._getHeaderHeight();return Wt.createElement("div",{className:this._prefixClass("empty-layer"),style:{top:pt,bottom:ct}},renderElement(ft))},nt.renderOverlay=function(){var ot=this.props.overlayRenderer;return Wt.createElement("div",{className:this._prefixClass("overlay")},!!ot&&renderElement(ot))},nt.render=function(){var ot,st=this.props,ut=st.columns,ct=st.children,ft=st.width,pt=st.fixed,ht=st.data,mt=st.frozenData,yt=st.expandColumnKey,vt=st.disabled,Tt=st.className,Et=st.style,xt=st.footerHeight,At=st.classPrefix,Ct=st.estimatedRowHeight;this._resetColumnManager(getColumns(ut,ct),pt);var $t=yt?this._flattenOnKeys(ht,this.getExpandedRowKeys(),this.props.rowKey):ht;this._data!==$t&&(this.resetAfterRowIndex(0,!1),this._data=$t),this._calcScrollbarSizes(),this._totalRowsHeight=this.getTotalRowsHeight();var Ot=_objectSpread({},Et,{width:ft,height:this._getTableHeight()+xt,position:"relative"}),Rt=classnames(At,Tt,(ot={},ot[At+"--fixed"]=pt,ot[At+"--expandable"]=!!yt,ot[At+"--empty"]=ht.length===0,ot[At+"--has-frozen-rows"]=mt.length>0,ot[At+"--has-frozen-columns"]=this.columnManager.hasFrozenColumns(),ot[At+"--disabled"]=vt,ot[At+"--dynamic"]=!!Ct,ot));return Wt.createElement("div",{ref:this._setContainerRef,className:Rt,style:Ot},this.renderFooter(),this.renderMainTable(),this.renderLeftTable(),this.renderRightTable(),this.renderResizingLine(),this.renderEmptyLayer(),this.renderOverlay())},nt.componentDidMount=function(){var ot=this.props.getScrollbarSize();ot>0&&this.setState({scrollbarSize:ot})},nt.componentDidUpdate=function(ot,st){var ut=this.props,ct=ut.data,ft=ut.height,pt=ut.maxHeight,ht=ut.estimatedRowHeight;ct!==ot.data&&(this._lastScannedRowIndex=-1,this._hasDataChangedSinceEndReached=!0),(pt!==ot.maxHeight||ft!==ot.height)&&this._maybeCallOnEndReached(),this._maybeScrollbarPresenceChange(),ht&&this.getTotalRowsHeight()!==this._totalRowsHeight&&this.forceUpdate()},nt._prefixClass=function(ot){return this.props.classPrefix+"__"+ot},nt._setContainerRef=function(ot){this.tableNode=ot},nt._setMainTableRef=function(ot){this.table=ot},nt._setLeftTableRef=function(ot){this.leftTable=ot},nt._setRightTableRef=function(ot){this.rightTable=ot},nt._getComponent=function(ot){return this.props.components&&this.props.components[ot]?this.props.components[ot]:DEFAULT_COMPONENTS[ot]},nt._getRowHeight=function(ot){var st=this.props,ut=st.estimatedRowHeight,ct=st.rowKey;return this._rowHeightMap[this._data[ot][ct]]||callOrReturn(ut,{rowData:this._data[ot],rowIndex:ot})},nt._getIsResetting=function(){return this._isResetting},nt._getHeaderHeight=function(){var ot=this.props.headerHeight;return Array.isArray(ot)?ot.reduce(function(st,ut){return st+ut},0):ot},nt._getFrozenRowsHeight=function(){var ot=this.props,st=ot.frozenData,ut=ot.rowHeight;return st.length*ut},nt._getTableHeight=function(){var ot=this.props,st=ot.height,ut=ot.maxHeight,ct=ot.footerHeight,ft=st-ct;if(ut>0){var pt=this._getFrozenRowsHeight(),ht=this.getTotalRowsHeight(),mt=this._getHeaderHeight(),yt=mt+pt+ht+this._horizontalScrollbarSize;ft=Math.min(yt,ut-ct)}return ft},nt._getBodyHeight=function(){return this._getTableHeight()-this._getHeaderHeight()-this._getFrozenRowsHeight()},nt._getFrozenContainerHeight=function(){var ot=this.props.maxHeight,st=this._getTableHeight()-(this._data.length>0?this._horizontalScrollbarSize:0);if(ot>0)return st;var ut=this.getTotalRowsHeight()+this._getHeaderHeight()+this._getFrozenRowsHeight();return Math.min(st,ut)},nt._calcScrollbarSizes=function(){var ot=this.props,st=ot.fixed,ut=ot.width,ct=this.state.scrollbarSize,ft=this.getTotalRowsHeight(),pt=this.getTotalColumnsWidth(),ht=this._horizontalScrollbarSize,mt=this._verticalScrollbarSize;ct===0?(this._horizontalScrollbarSize=0,this._verticalScrollbarSize=0):!st||pt<=ut-ct?(this._horizontalScrollbarSize=0,this._verticalScrollbarSize=ft>this._getBodyHeight()?ct:0):pt>ut?(this._horizontalScrollbarSize=ct,this._verticalScrollbarSize=ft>this._getBodyHeight()-this._horizontalScrollbarSize?ct:0):(this._horizontalScrollbarSize=0,this._verticalScrollbarSize=0,ft>this._getBodyHeight()&&(this._horizontalScrollbarSize=ct,this._verticalScrollbarSize=ct)),(ht!==this._horizontalScrollbarSize||mt!==this._verticalScrollbarSize)&&(this._scrollbarPresenceChanged=!0)},nt._maybeScrollbarPresenceChange=function(){if(this._scrollbarPresenceChanged){var ot=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,ot({size:this.state.scrollbarSize,horizontal:this._horizontalScrollbarSize>0,vertical:this._verticalScrollbarSize>0})}},nt._maybeCallOnEndReached=function(){var ot=this.props,st=ot.onEndReached,ut=ot.onEndReachedThreshold,ct=this._scroll.scrollTop,ft=this.getTotalRowsHeight(),pt=this._getBodyHeight();if(!(!st||!pt||!ft)){var ht=ft-ct-pt+this._horizontalScrollbarSize;this._lastScannedRowIndex>=0&&ht<=ut&&(this._hasDataChangedSinceEndReached||ft!==this._scrollHeight)&&(this._hasDataChangedSinceEndReached=!1,this._scrollHeight=ft,st({distanceFromEnd:ht}))}},nt._handleScroll=function(ot){var st=this._scroll.scrollTop;this.scrollToPosition(ot),this.props.onScroll(ot),ot.scrollTop>st&&this._maybeCallOnEndReached()},nt._handleVerticalScroll=function(ot){var st=ot.scrollTop,ut=this._scroll.scrollTop;st!==ut&&this.scrollToTop(st),st>ut&&this._maybeCallOnEndReached()},nt._handleRowsRendered=function(ot){this.props.onRowsRendered(ot),ot.overscanStopIndex>this._lastScannedRowIndex&&(this._lastScannedRowIndex=ot.overscanStopIndex,this._maybeCallOnEndReached())},nt._handleRowHover=function(ot){var st=ot.hovered,ut=ot.rowKey;this.setState({hoveredRowKey:st?ut:null})},nt._handleRowExpand=function(ot){var st=ot.expanded,ut=ot.rowData,ct=ot.rowIndex,ft=ot.rowKey,pt=cloneArray(this.getExpandedRowKeys());if(st)!pt.indexOf(ft)>=0&&pt.push(ft);else{var ht=pt.indexOf(ft);ht>-1&&pt.splice(ht,1)}this.props.expandedRowKeys===void 0&&this.setState({expandedRowKeys:pt}),this.props.onRowExpand({expanded:st,rowData:ut,rowIndex:ct,rowKey:ft}),this.props.onExpandedRowsChange(pt)},nt._handleColumnResize=function(ot,st){var ut=ot.key;this.columnManager.setColumnWidth(ut,st),this.setState({resizingWidth:st});var ct=this.columnManager.getColumn(ut);this.props.onColumnResize({column:ct,width:st})},nt._handleColumnResizeStart=function(ot){var st=ot.key;this.setState({resizingKey:st})},nt._handleColumnResizeStop=function(){var ot=this.state,st=ot.resizingKey,ut=ot.resizingWidth;if(this.setState({resizingKey:null,resizingWidth:0}),!(!st||!ut)){var ct=this.columnManager.getColumn(st);this.props.onColumnResizeEnd({column:ct,width:ut})}},nt._handleColumnSort=function(ot){var st=ot.currentTarget.dataset.key,ut=this.props,ct=ut.sortBy,ft=ut.sortState,pt=ut.onColumnSort,ht=SortOrder.ASC;ft?ht=ft[st]===SortOrder.ASC?SortOrder.DESC:SortOrder.ASC:st===ct.key&&(ht=ct.order===SortOrder.ASC?SortOrder.DESC:SortOrder.ASC);var mt=this.columnManager.getColumn(st);pt({column:mt,key:st,order:ht})},nt._handleFrozenRowHeightChange=function(ot,st,ut,ct){ct?ct===FrozenDirection.RIGHT?this._rightRowHeightMap[ot]=st:this._leftRowHeightMap[ot]=st:this._mainRowHeightMap[ot]=st;var ft=Math.max(this._mainRowHeightMap[ot]||0,this._leftRowHeightMap[ot]||0,this._rightRowHeightMap[ot]||0);this._rowHeightMap[ot]!==ft&&this._handleRowHeightChange(ot,ft,ut)},nt._handleRowHeightChange=function(ot,st,ut){this._resetIndex===null?this._resetIndex=ut:this._resetIndex>ut&&(this._resetIndex=ut),this._rowHeightMapBuffer[ot]=st,this._updateRowHeights()},tt}(Wt.PureComponent);BaseTable.Column=Column;BaseTable.PlaceholderKey=ColumnManager.PlaceholderKey;BaseTable.defaultProps={classPrefix:"BaseTable",rowKey:"id",data:[],frozenData:[],fixed:!1,headerHeight:50,rowHeight:50,footerHeight:0,defaultExpandedRowKeys:[],sortBy:{},useIsScrolling:!1,overscanRowCount:1,onEndReachedThreshold:500,getScrollbarSize,ignoreFunctionInColumnCompare:!0,onScroll:noop,onRowsRendered:noop,onScrollbarPresenceChange:noop,onRowExpand:noop,onExpandedRowsChange:noop,onColumnSort:noop,onColumnResize:noop,onColumnResizeEnd:noop};BaseTable.propTypes={classPrefix:propTypes$1.exports.string,className:propTypes$1.exports.string,style:propTypes$1.exports.object,children:propTypes$1.exports.node,columns:propTypes$1.exports.arrayOf(propTypes$1.exports.shape(Column.propTypes)),data:propTypes$1.exports.array.isRequired,frozenData:propTypes$1.exports.array,rowKey:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.number]).isRequired,width:propTypes$1.exports.number.isRequired,height:propTypes$1.exports.number,maxHeight:propTypes$1.exports.number,rowHeight:propTypes$1.exports.number,estimatedRowHeight:propTypes$1.exports.oneOfType([propTypes$1.exports.number,propTypes$1.exports.func]),headerHeight:propTypes$1.exports.oneOfType([propTypes$1.exports.number,propTypes$1.exports.arrayOf(propTypes$1.exports.number)]).isRequired,footerHeight:propTypes$1.exports.number,fixed:propTypes$1.exports.bool,disabled:propTypes$1.exports.bool,overlayRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),emptyRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),footerRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),headerRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),rowRenderer:propTypes$1.exports.oneOfType([propTypes$1.exports.func,propTypes$1.exports.element]),headerClassName:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.func]),rowClassName:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.func]),headerProps:propTypes$1.exports.oneOfType([propTypes$1.exports.object,propTypes$1.exports.func]),headerCellProps:propTypes$1.exports.oneOfType([propTypes$1.exports.object,propTypes$1.exports.func]),rowProps:propTypes$1.exports.oneOfType([propTypes$1.exports.object,propTypes$1.exports.func]),cellProps:propTypes$1.exports.oneOfType([propTypes$1.exports.object,propTypes$1.exports.func]),expandIconProps:propTypes$1.exports.oneOfType([propTypes$1.exports.object,propTypes$1.exports.func]),expandColumnKey:propTypes$1.exports.string,defaultExpandedRowKeys:propTypes$1.exports.arrayOf(propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.number])),expandedRowKeys:propTypes$1.exports.arrayOf(propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.number])),onRowExpand:propTypes$1.exports.func,onExpandedRowsChange:propTypes$1.exports.func,sortBy:propTypes$1.exports.shape({key:propTypes$1.exports.string,order:propTypes$1.exports.oneOf([SortOrder.ASC,SortOrder.DESC])}),sortState:propTypes$1.exports.object,onColumnSort:propTypes$1.exports.func,onColumnResize:propTypes$1.exports.func,onColumnResizeEnd:propTypes$1.exports.func,useIsScrolling:propTypes$1.exports.bool,overscanRowCount:propTypes$1.exports.number,getScrollbarSize:propTypes$1.exports.func,onScroll:propTypes$1.exports.func,onEndReached:propTypes$1.exports.func,onEndReachedThreshold:propTypes$1.exports.number,onRowsRendered:propTypes$1.exports.func,onScrollbarPresenceChange:propTypes$1.exports.func,rowEventHandlers:propTypes$1.exports.object,ignoreFunctionInColumnCompare:propTypes$1.exports.bool,components:propTypes$1.exports.shape({TableCell:propTypes$1.exports.elementType,TableHeaderCell:propTypes$1.exports.elementType,ExpandIcon:propTypes$1.exports.elementType,SortIndicator:propTypes$1.exports.elementType})};let windowObject;typeof window<"u"?windowObject=window:typeof self<"u"?windowObject=self:windowObject=global;let cancelFrame=null,requestFrame=null;const TIMEOUT_DURATION=20,clearTimeoutFn=windowObject.clearTimeout,setTimeoutFn=windowObject.setTimeout,cancelAnimationFrameFn=windowObject.cancelAnimationFrame||windowObject.mozCancelAnimationFrame||windowObject.webkitCancelAnimationFrame,requestAnimationFrameFn=windowObject.requestAnimationFrame||windowObject.mozRequestAnimationFrame||windowObject.webkitRequestAnimationFrame;cancelAnimationFrameFn==null||requestAnimationFrameFn==null?(cancelFrame=clearTimeoutFn,requestFrame=function(tt){return setTimeoutFn(tt,TIMEOUT_DURATION)}):(cancelFrame=function([tt,nt]){cancelAnimationFrameFn(tt),clearTimeoutFn(nt)},requestFrame=function(tt){const nt=requestAnimationFrameFn(function(){clearTimeoutFn(rt),tt()}),rt=setTimeoutFn(function(){cancelAnimationFrameFn(nt),tt()},TIMEOUT_DURATION);return[nt,rt]});function createDetectElementResize(et){let tt,nt,rt,ot,st,ut,ct;const ft=typeof document<"u"&&document.attachEvent;if(!ft){ut=function(At){const Ct=At.__resizeTriggers__,$t=Ct.firstElementChild,Ot=Ct.lastElementChild,Rt=$t.firstElementChild;Ot.scrollLeft=Ot.scrollWidth,Ot.scrollTop=Ot.scrollHeight,Rt.style.width=$t.offsetWidth+1+"px",Rt.style.height=$t.offsetHeight+1+"px",$t.scrollLeft=$t.scrollWidth,$t.scrollTop=$t.scrollHeight},st=function(At){return At.offsetWidth!==At.__resizeLast__.width||At.offsetHeight!==At.__resizeLast__.height},ct=function(At){if(At.target.className&&typeof At.target.className.indexOf=="function"&&At.target.className.indexOf("contract-trigger")<0&&At.target.className.indexOf("expand-trigger")<0)return;const Ct=this;ut(this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){st(Ct)&&(Ct.__resizeLast__.width=Ct.offsetWidth,Ct.__resizeLast__.height=Ct.offsetHeight,Ct.__resizeListeners__.forEach(function(Rt){Rt.call(Ct,At)}))})};let yt=!1,vt="";rt="animationstart";const Tt="Webkit Moz O ms".split(" ");let Et="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),xt="";{const At=document.createElement("fakeelement");if(At.style.animationName!==void 0&&(yt=!0),yt===!1){for(let Ct=0;Ct<Tt.length;Ct++)if(At.style[Tt[Ct]+"AnimationName"]!==void 0){xt=Tt[Ct],vt="-"+xt.toLowerCase()+"-",rt=Et[Ct],yt=!0;break}}}nt="resizeanim",tt="@"+vt+"keyframes "+nt+" { from { opacity: 0; } to { opacity: 0; } } ",ot=vt+"animation: 1ms "+nt+"; "}const pt=function(yt){if(!yt.getElementById("detectElementResize")){const vt=(tt||"")+".resize-triggers { "+(ot||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',Tt=yt.head||yt.getElementsByTagName("head")[0],Et=yt.createElement("style");Et.id="detectElementResize",Et.type="text/css",et!=null&&Et.setAttribute("nonce",et),Et.styleSheet?Et.styleSheet.cssText=vt:Et.appendChild(yt.createTextNode(vt)),Tt.appendChild(Et)}};return{addResizeListener:function(yt,vt){if(ft)yt.attachEvent("onresize",vt);else{if(!yt.__resizeTriggers__){const Tt=yt.ownerDocument,Et=windowObject.getComputedStyle(yt);Et&&Et.position==="static"&&(yt.style.position="relative"),pt(Tt),yt.__resizeLast__={},yt.__resizeListeners__=[],(yt.__resizeTriggers__=Tt.createElement("div")).className="resize-triggers";const xt=Tt.createElement("div");xt.className="expand-trigger",xt.appendChild(Tt.createElement("div"));const At=Tt.createElement("div");At.className="contract-trigger",yt.__resizeTriggers__.appendChild(xt),yt.__resizeTriggers__.appendChild(At),yt.appendChild(yt.__resizeTriggers__),ut(yt),yt.addEventListener("scroll",ct,!0),rt&&(yt.__resizeTriggers__.__animationListener__=function($t){$t.animationName===nt&&ut(yt)},yt.__resizeTriggers__.addEventListener(rt,yt.__resizeTriggers__.__animationListener__))}yt.__resizeListeners__.push(vt)}},removeResizeListener:function(yt,vt){if(ft)yt.detachEvent("onresize",vt);else if(yt.__resizeListeners__.splice(yt.__resizeListeners__.indexOf(vt),1),!yt.__resizeListeners__.length){yt.removeEventListener("scroll",ct,!0),yt.__resizeTriggers__.__animationListener__&&(yt.__resizeTriggers__.removeEventListener(rt,yt.__resizeTriggers__.__animationListener__),yt.__resizeTriggers__.__animationListener__=null);try{yt.__resizeTriggers__=!yt.removeChild(yt.__resizeTriggers__)}catch{}}}}}class AutoSizer extends react.exports.Component{constructor(...tt){super(...tt),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._onResize=()=>{const{disableHeight:nt,disableWidth:rt,onResize:ot}=this.props;if(this._parentNode){var st,ut,ct,ft;const pt=window.getComputedStyle(this._parentNode)||{},ht=parseFloat((st=pt.paddingLeft)!==null&&st!==void 0?st:"0"),mt=parseFloat((ut=pt.paddingRight)!==null&&ut!==void 0?ut:"0"),yt=parseFloat((ct=pt.paddingTop)!==null&&ct!==void 0?ct:"0"),vt=parseFloat((ft=pt.paddingBottom)!==null&&ft!==void 0?ft:"0"),Tt=this._parentNode.getBoundingClientRect(),Et=Tt.height-yt-vt,xt=Tt.width-ht-mt,At=this._parentNode.offsetHeight-yt-vt,Ct=this._parentNode.offsetWidth-ht-mt;(!nt&&(this.state.height!==At||this.state.scaledHeight!==Et)||!rt&&(this.state.width!==Ct||this.state.scaledWidth!==xt))&&(this.setState({height:At,width:Ct,scaledHeight:Et,scaledWidth:xt}),typeof ot=="function"&&ot({height:At,scaledHeight:Et,scaledWidth:xt,width:Ct}))}},this._setRef=nt=>{this._autoSizer=nt}}componentDidMount(){const{nonce:tt}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=createDetectElementResize(tt),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:tt,defaultHeight:nt,defaultWidth:rt,disableHeight:ot=!1,disableWidth:st=!1,nonce:ut,onResize:ct,style:ft={},tagName:pt="div",...ht}=this.props,{height:mt,scaledHeight:yt,scaledWidth:vt,width:Tt}=this.state,Et={overflow:"visible"},xt={};let At=!1;return ot||(mt===0&&(At=!0),Et.height=0,xt.height=mt,xt.scaledHeight=yt),st||(Tt===0&&(At=!0),Et.width=0,xt.width=Tt,xt.scaledWidth=vt),react.exports.createElement(pt,{ref:this._setRef,style:{...Et,...ft},...ht},!At&&tt(xt))}}propTypes$1.exports.string,propTypes$1.exports.number,propTypes$1.exports.number,propTypes$1.exports.func.isRequired,propTypes$1.exports.func;class WeaveActionsContextImpl{constructor(tt=[]){this.actions=tt}withNewActions(tt){return new WeaveActionsContextImpl(this.actions.concat(tt))}}const emptyActionsContext=new WeaveActionsContextImpl,WeaveActionsContext=Wt.createContext(emptyActionsContext);WeaveActionsContext.displayName="WeaveActionsContext";const useWeaveActionContext=()=>Wt.useContext(WeaveActionsContext),WeaveActionContextProvider=({newActions:et,children:tt})=>{const rt=Wt.useContext(WeaveActionsContext).withNewActions(et);return Wt.createElement(WeaveActionsContext.Provider,{value:rt},tt)},MenuWrapper=styled$1.div`
  position: fixed;

  // So we have some extra margin around the popup
  // menu's visible area before it closes due to
  // mouse leaving
  padding: 8px;
  left: ${et=>et.position.x-8}px;
  top: ${et=>et.position.y-8}px;
  z-index: 20001;
  max-width: 300px;

  // Expression
  &&& pre {
    overflow-wrap: break-word;
    white-space: pre-wrap;
  }

  // Section headers
  &&& h4 {
    font-weight: 600;
    font-size: 1.1em;
    margin-block-end: 0.2em;
  }

  // Detail
  &&& p {
    font-family: monospace;
    margin-left: 2.2em;
  }

  &&& i.icon {
    font-size: 1em;
  }
`,MiniExpression=styled$1.pre``,SmallCheckbox=styled$1(Checkbox$2)`
  &&& {
    transform: scale(0.6);
    margin-left: -1.4em;
  }
`;let lastDetailedSetting=!1;const ActionsContent=({anchor:et,actions:tt,input:nt,stack:rt,close:ot})=>{const st=useWeaveContext(),[ut,ct]=Wt.useState(lastDetailedSetting),[ft,pt]=Wt.useState(null),[ht,mt]=Wt.useState([]);Wt.useEffect(()=>{(async()=>{mt(await Promise.all(tt.map(async At=>({label:typeof At.name=="function"?await At.name(nt,rt):At.name,description:typeof At.detail=="function"?await At.detail(nt,rt):At.detail,action:At}))))})()},[tt,rt,nt]);const yt=Wt.useMemo(()=>{let xt=st.expToString(nt,null);return!ut&&xt.length>40&&(xt="..."+xt.slice(-40)),xt},[st,nt,ut]),vt=Wt.useMemo(()=>st.typeToString(nt.type,!ut),[st,nt,ut]),[Tt,Et]=Wt.useState(null);return Wt.useEffect(()=>{const{right:xt,bottom:At}=et.getBoundingClientRect(),Ct=Tt?.getBoundingClientRect();if(!Ct)return;const{width:$t,height:Ot}=Ct;let Rt=xt,It=At;Rt>window.innerWidth-$t&&(Rt=xt-$t),It>window.innerHeight-Ot&&(It=At-Ot),pt({x:Rt,y:It})},[et,Tt]),ReactDOM.createPortal(Wt.createElement(MenuWrapper,{position:ft??{x:-1e4,y:-1e4},onMouseLeave:ot},Wt.createElement(Ref$1,{innerRef:Et},Wt.createElement(Menu$4,{vertical:!0,fluid:!0,size:"mini"},Wt.createElement(Menu$4.Item,{fitted:"vertically",position:"right"},Wt.createElement(SmallCheckbox,{toggle:!0,checked:ut,label:"Detailed",onChange:xt=>{lastDetailedSetting=!ut,ct(lastDetailedSetting)}})),Wt.createElement(Menu$4.Item,null,Wt.createElement(Menu$4.Header,null,"Expression"),Wt.createElement(MiniExpression,null,yt)),Wt.createElement(Menu$4.Item,null,Wt.createElement(Menu$4.Header,null,"Type"),Wt.createElement(MiniExpression,null,vt)),Wt.createElement(Menu$4.Item,{fitted:"horizontally"},Wt.createElement(Menu$4.Header,{style:{paddingLeft:"1em"}},"Actions"),ht.length>0?ht.map((xt,At)=>Wt.createElement(Menu$4.Item,{name:xt.label,key:At,onMouseEnter:()=>xt.action.onHoverStart?.(nt,rt),onMouseLeave:()=>xt.action.onHoverEnd?.(nt,rt),onClick:()=>{xt.action.doAction(nt,rt),ot()}},Wt.createElement(Header$3,{as:"h4"},Wt.createElement(Icon$4,{name:xt.action.icon??"bolt"}),xt.label),xt.description!=null?Wt.createElement("p",null,Wt.createElement("em",null,xt.description)):null)):Wt.createElement(Menu$4.Item,{disabled:!0},"No actions available"))))),document.body)},InnerTriggerWrapper=styled$1.div`
  cursor: context-menu;
  width: 100%;
  height: 100%;
`,TriggerWrapper=({onClick:et,children:tt})=>Wt.createElement(InnerTriggerWrapper,{onClick:et},tt),ActionsTrigger=({input:et,extraActions:tt,children:nt})=>{const rt=useWeaveActionContext(),{stack:ot}=usePanelContext(),st=Wt.useMemo(()=>rt.actions.concat(tt??[]).filter(vt=>vt.isAvailable(et,ot)),[rt.actions,tt,et,ot]),[ut,ct]=Wt.useState(!1),ft=Wt.useCallback(()=>{ct(!1)},[]),[pt,ht]=Wt.useState(null),mt=Wt.useCallback(yt=>{yt.stopPropagation(),ht({getBoundingClientRect:()=>({left:yt.clientX,top:yt.clientY,right:yt.clientX+1,bottom:yt.clientY+1,x:yt.clientX,y:yt.clientY,height:0,width:0,toJSON(){throw new Error("Not implemented")}})}),ct(!ut)},[ut]);return Wt.createElement(Wt.Fragment,null,Wt.createElement(TriggerWrapper,{onClick:mt},nt),ut&&pt!=null&&Wt.createElement(ActionsContent,{actions:st,input:et,stack:ot,anchor:pt,close:ft}))};styled$1.div`
  padding: 16px;
`;styled$1.div`
  margin-bottom: 8px;
  font-weight: 600;
`;const FilterControls=styled$1.div`
  width: 100%;
  position: absolute;
  z-index: 9;
  background: white;
  border-bottom: 2px solid #bbb;
  padding: 5px;
  top: 30px;
  display: flex;
  flex-direction: column;
`,ControlFilter=Wt.memo(({filterFunction:et,setFilterFunction:tt})=>{const nt=useWeaveContext(),[rt,ot]=react.exports.useState(et),st=nt.nodeIsExecutable(rt)&&(rt.nodeType==="void"||isAssignableTo(rt.type,maybe("boolean"))),ut=react.exports.useCallback(()=>{nt.nodeIsExecutable(rt)&&st?tt(rt):ot(et)},[et,tt,rt,st,nt]),ct=react.exports.useMemo(()=>et.nodeType==="void"&&rt.nodeType==="void"||et===rt,[et,rt]),ft=react.exports.useMemo(()=>et.nodeType!=="void",[et.nodeType]);return Wt.createElement(FilterControls,null,Wt.createElement("div",{style:{flex:"1 1 auto",paddingBottom:"5px"}},Wt.createElement(WeaveExpression,{expr:rt,setExpression:ot,onMount:focusEditor,liveUpdate:!0})),Wt.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},Wt.createElement("div",null,Wt.createElement(Button$3,{"data-test":"filter-apply",disabled:!st,onClick:ut,size:"mini",primary:!ct||void 0},ct?"Close":"Apply"),!ct&&Wt.createElement(Button$3,{onClick:()=>{tt(et)},size:"mini"},"Discard Changes")),Wt.createElement("div",null,ft&&Wt.createElement(Button$3,{"data-test":"filter-remove",onClick:()=>{tt(voidNode())},size:"mini",color:"red"},"Remove Filter"))))}),ControlWrapper$1=styled$1.div`
  position: relative;
  width: 100%;
  height: 100%;
  /* ${({hovering:et})=>Ce`
    border: ${et?"1px solid #eee":"none"};
    padding: ${et?"0px":"1px"};
  `} */
`,ControlWrapperBar=styled$1.div`
  position: absolute;
  visibility: ${et=>et.hovering?"visible":"hidden"};
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
`,ControlWrapperContent=styled$1.div`
  height: 100%;
  ${({canFullscreen:et})=>et&&Ce`
      overflow: hidden;
    `}
`,IconButton=styled$1.span`
  width: 22px;
  height: 20px;
  color: #3b3f42;
  background-color: #b3b3b3;
  margin-left: 5px;
  margin-top: 5px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: initial;
  i {
    margin: 0;
  }
`,FullscreenButton=styled$1(LegacyWBIcon).attrs({name:"fullscreen",role:"button",tabindex:0})``,DevQueryIcon=styled$1(Icon$4).attrs({name:"chart area"})``;styled$1.div`
  max-height: 400;
  max-width: 1200;
  overflow: auto;
  font-size: 14;
  white-space: nowrap;
`;styled$1.span`
  font-weight: bold;
`;const gradient=Ue`
  {
    0%   { background-position: 0 0; }
    100% { background-position: -200% 0; }
  }
`,Panel2SizeBoundary=styled$1.div`
  width: 100%;
  height: 100%;
`;styled$1.div`
  height: calc(90vh - 73px);
  width: calc(90vw - 73px);
  position: relative;
  overflow: hidden;
  display: flex;
  justifycontent: stretch;
  alignitems: stretch;
`;styled$1.div`
  flex: 1 1 auto;
`;styled$1.div`
  flex: 1 1 auto;
`;const Panel2LoaderStyle=styled$1.div`
  background: repeating-linear-gradient(to right, #fff 0%, #ddd 50%, #fff 100%);
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  background-size: 200% auto;
  background-position: 0 100%;
  animation: ${gradient} 2s infinite;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
  border-radius: 0.3em;
  margin: 3px 0px 0px 3px;
`,GrowToParent=styled$1.div`
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
`;GrowToParent.displayName="GrowToParent";styled$1(Modal$3.Content)`
  height: calc(90vh - 73px);
  width: calc(90vw - 73px);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: stretch;
  alignitems: stretch;
`;const ColumnHeader$1=styled$1.div`
  display: flex;
  align-items: stretch;
  white-space: nowrap;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  .column-actions-trigger {
    visibility: hidden;
  }
  :hover .column-controls {
    box-shadow: -4px 0px 4px 4px rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.75);
  }
  :hover .column-actions-trigger {
    visibility: visible;
  }
  .column-actions-trigger:hover {
    color: ${primary};
  }
`,ColumnName=styled$1.div`
  cursor: pointer;
  padding: 4px;
  flex: 1 1 auto;
  :hover {
    color: ${primary};
  }
  overflow: hidden;
  text-align: center;
`,ColumnNameText=styled$1.span`
  width: 100%;
  height: 100%;
  text-align: center;
`,IndexColumnVal=styled$1.div`
  width: 100%;
  height: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  :hover {
    color: ${primary};
    background-color: #eee;
  }
`,IndexColumnText=styled$1.div`
  text-align: center;
  flex: 1 1 auto;
  height: 20px;
  display: flex;
  align-content: space-around;
  justify-content: space-around;
  align-items: center;
  font-weight: 600;
`;styled$1.div`
  flex: 0 0 auto;
  width: 100%;
  height: 2px;
  background-color: #eee;
  cursor: pointer;
  :hover {
    cursor: row-resize;
    background-color: rgb(51, 153, 255);
  }
  :highlight {
    position: absolute;
    background: rgb(51, 153, 255);
  }
`;styled$1(WBIcon)`
  cursor: pointer;
  color: ${primary};
  :hover {
    background-color: #eee;
    border-radius: 2px;
  }
`;const ColumnAction=styled$1.div`
  cursor: pointer;
  padding: 5px 0px 0px 0px;
  flex: 0 0 auto;
  height: 100%;
  box-shadow: -4px 0px 4px 4px white;
  background: white;
  font-size: 20px;
`,TableAction=styled$1.div`
  cursor: pointer;
  padding: 5px 4px 0px 9px;
  flex: 0 0 auto;
  height: 100%;
  width: 100%;
  color: ${et=>et.highlight?"white":"inherit"};
  background-color: ${et=>et.highlight?"rgb(3, 183, 206)":"inherit"};
  :hover {
    color: ${primary};
    background-color: ${et=>et.highlight?"rgb(3, 183, 206)":"#eee"};
  }
  box-shadow: #f8f8f8 -2px 0px 8px 4px;
`,EllipsisIcon=styled$1(WBIcon)`
  width: 100%;
  height: 100%;
  padding-top: 4px;
`,TableIcon=styled$1(WBIcon)`
  cursor: pointer;
  padding: 2px 0px 0px 0px;
  :hover {
    color: ${primary};
    background-color: ${et=>et.highlight?"rgb(3, 183, 206)":"#eee"};
    border-radius: 2px;
  }
`,TableActionText=styled$1.span`
  cursor: pointer;
  margin-left: 10px;
  padding: 2px 0px 0px 0px;
  :hover {
    color: ${primary};
    background-color: #eee;
    border-radius: 2px;
  }
`,ControlIcon=styled$1(WBIcon)`
  cursor: pointer;
  color: ${primary};
  margin: auto;
`;styled$1(WBIcon)`
  cursor: pointer;
  color: #afafaf;
  :hover {
    background-color: #eee;
    border-radius: 2px;
  }
`;const ColumnEditorSection=styled$1.div`
  margin-bottom: 24px;
`,ColumnEditorSectionLabel=styled$1.div`
  margin-bottom: 8px;
  font-weight: 600;
`,ColumnEditorColumnName=styled$1.div`
  display: flex;
  align-items: center;
  color: ${gray500};
`,ColumnEditorFieldLabel=styled$1.div`
  margin-right: 8px;
`,AssignmentWrapper=styled$1.div`
  display: flex;
  align-items: center;
`,PanelNameEditor=styled$1.div`
  margin-bottom: 12px;
`,PanelSettings=styled$1.div`
  padding: 8px 24px;
  background-color: #f6f6f6;
  border-radius: 4px;
  // min-width: 600px;
  :empty {
    padding: 0;
  }
  overflow: visible;
  // max-height: 300px;
`;styled$1.div`
  scrollbar-width: thin;
  overflow: auto;
  &::-webkit-scrollbar {
    width: 6px;
  }
  &::-webkit-scrollbar-thumb {
    background-color: #eee;
  }
  width: 100%;
  height: 100%;
`;const TableActions=(et,tt,nt)=>{function rt(ot){return et.typeIsAssignableTo(ot.type,maybe("string"))||et.typeIsAssignableTo(ot.type,maybe("number"))||et.typeIsAssignableTo(ot.type,maybe("boolean"))}return[{name:"Filter: Only this value",icon:"filter",detail:async(ot,st)=>{const ut=await et.client.query(et.dereferenceAllVars(ot,st)),ct=isVoidNode(tt)?"":"...AND ";return typeof ut=="boolean"?`${ct}${ut?"":"!"}${et.expToString(ot,null)}`:`${ct}${et.expToString(ot,null)} == ${JSON.stringify(ut)}`},isAvailable:rt,doAction:async(ot,st)=>{const ut=await et.client.query(et.dereferenceAllVars(ot,st));let ct=constBoolean(!0);et.typeIsAssignableTo(ot.type,maybe("boolean"))?ut?ct=ot:ct=opNot({bool:ot}):et.typeIsAssignableTo(ot.type,maybe("number"))?ct=opNumberEqual({lhs:ot,rhs:ut===null?constNone():constNumber(ut)}):et.typeIsAssignableTo(ot.type,maybe("string"))&&(ct=opStringEqual({lhs:ot,rhs:ut===null?constNone():constString(ut)})),isVoidNode(tt)?nt(ct):nt(opAnd({lhs:tt,rhs:ct}))}},{name:"Filter: Exclude this value",icon:"filter",detail:async(ot,st)=>{const ut=await et.client.query(et.dereferenceAllVars(ot,st)),ct=isVoidNode(tt)?"":"...AND ";return typeof ut=="boolean"?`${ct}${ut?"!":""}${et.expToString(ot,null)}`:`${ct}${et.expToString(ot,null)} != ${JSON.stringify(ut)}`},isAvailable:rt,doAction:async(ot,st)=>{const ut=await et.client.query(et.dereferenceAllVars(ot,st));let ct=constBoolean(!0);et.typeIsAssignableTo(ot.type,maybe("boolean"))?ut?ct=opNot({bool:ot}):ct=ot:et.typeIsAssignableTo(ot.type,maybe("number"))?ct=opNumberNotEqual({lhs:ot,rhs:ut===null?constNone():constNumber(ut)}):et.typeIsAssignableTo(ot.type,maybe("string"))&&(ct=opStringNotEqual({lhs:ot,rhs:ut===null?constNone():constString(ut)})),isVoidNode(tt)?nt(ct):nt(opAnd({lhs:tt,rhs:ct}))}}]},recordEvent$2=makeEventRecorder("Table"),Cell=({table:et,inputNode:tt,rowNode:nt,selectFunction:rt,panelId:ot,colId:st,config:ut,panelContext:ct,updateTableState:ft,updatePanelContext:pt,updateInput:ht,simpleTable:mt})=>{const yt=useWeaveContext(),{actions:vt}=useWeaveFeaturesContext(),Tt=useUpdatePanelConfig(ft,et,st),Et=rt,{handler:xt,curPanelId:At}=usePanelStacksForType(Et.type,ot,{excludeTable:!0,excludePlot:!0}),[Ct,$t]=useWhenOnScreenAfterNewValueDebounced(Et),Ot=react.exports.useCallback(It=>{if(rt.nodeType==="void")throw new Error("Invalid cell selection function (void)");if(filterNodes(It,Ft=>Ft.nodeType==="var"&&Ft.varName==="input").length===0){ht?.(It);return}const kt=yt.callFunction(It,{input:rt});(async()=>{recordEvent$2("UPDATE_COLUMN_EXPRESSION_VIA_CELL");try{ft(updateColumnSelect(et,st,kt))}catch(Ft){return Promise.reject(Ft)}return Promise.resolve()})().catch(Ft=>{throw console.error("PanelTable error",Ft),new Error(Ft)})},[st,rt,et,ft,ht,yt]),Rt=react.exports.useMemo(()=>({domain:yt.callFunction(rt,{row:tt}),row:nt,input:rt}),[rt,tt,nt,yt]);return Wt.createElement("div",{ref:Ct,"data-test-should-render":$t,style:{width:"100%",height:"100%"}},At==null?Wt.createElement("div",null,"-"):$t&&rt.nodeType!=="void"&&Et.nodeType!=="void"&&xt!=null&&Wt.createElement(PanelContextProvider,{newVars:Rt},vt&&!mt?Wt.createElement(ActionsTrigger,{input:rt},Wt.createElement(PanelComp2,{input:Et,inputType:rt.type,loading:!1,panelSpec:xt,configMode:!1,context:ct,config:ut,updateConfig:Tt,updateContext:pt,updateInput:Ot})):Wt.createElement(PanelComp2,{input:Et,inputType:rt.type,loading:!1,panelSpec:xt,configMode:!1,context:ct,config:ut,updateConfig:Tt,updateContext:pt,updateInput:Ot})))},Value$1=({table:et,valueNode:tt,config:nt,panelContext:rt,colId:ot,updateTableState:st,updatePanelContext:ut})=>{const{actions:ct}=useWeaveFeaturesContext(),ft=useUpdatePanelConfig(st,et,ot),{handler:pt,curPanelId:ht}=usePanelStacksForType(tt.type,"",{excludeTable:!0,excludePlot:!0});return Wt.createElement(Wt.Fragment,null,ht==null?Wt.createElement("div",null,"No panel for type ",defaultLanguageBinding.printType(tt.type)):pt!=null&&(ct?Wt.createElement(ActionsTrigger,{input:tt},Wt.createElement(PanelComp2,{input:tt,inputType:tt.type,loading:!1,panelSpec:pt,configMode:!1,context:rt,config:nt,updateConfig:ft,updateContext:ut})):Wt.createElement(PanelComp2,{input:tt,inputType:tt.type,loading:!1,panelSpec:pt,configMode:!1,context:rt,config:nt,updateConfig:ft,updateContext:ut})))},withIgnoreBlockedClicks=et=>(nt,rt)=>{if(!(nt.target!=null&&nt.target.closest(".block-popup-clicks")!=null))return et(nt,rt)},ExpressionView$1=styled$1.span``,ArgsView=({args:et})=>{const tt=Object.keys(et),nt=Object.values(et);return react.exports.createElement(react.exports.Fragment,null,"(",nt.map((rt,ot)=>react.exports.createElement("span",{key:ot},react.exports.createElement(NodeView,{node:rt}),ot<tt.length-1&&react.exports.createElement("span",{style:{pointerEvents:"none"}},",\xA0"))),")")},OpView=({op:et})=>{const{client:tt}=useWeaveContext(),nt=useExpNode(),rt=Object.keys(et.inputs),ot=Object.values(et.inputs);if(isBinaryOp(et,tt.opStore)){const st=opNeedsParens(et,nt,tt.opStore);return react.exports.createElement("span",null,st&&"(",react.exports.createElement(NodeView,{node:ot[0]})," ",opSymbol(et,tt.opStore)," ",react.exports.createElement(NodeView,{node:ot[1]}),st&&")")}if(isGetAttr(et,tt.opStore)){const st=ot[0],ut=ot[1];return st.nodeType==="var"&&ut.nodeType==="const"?react.exports.createElement("span",null,ut.val):react.exports.createElement("span",null,react.exports.createElement(NodeView,{node:ot[0]}),".",react.exports.createElement(NodeView,{node:ot[1]}))}if(isBracketsOp(et,tt.opStore)){const st=ot[0],ut=ot[1];return st.nodeType==="var"&&ut.nodeType==="const"?react.exports.createElement("span",null,ut.val):react.exports.createElement("span",null,react.exports.createElement(NodeView,{node:ot[0]}),"[",react.exports.createElement(NodeView,{node:ot[1]}),"]")}if(isDotChainedOp(et,tt.opStore)){const st=ot[0];return react.exports.createElement("span",null,st.nodeType!=="var"&&react.exports.createElement(react.exports.Fragment,null,react.exports.createElement(NodeView,{node:ot[0]}),"."),opDisplayName(et,tt.opStore),rt.length>1&&react.exports.createElement(ArgsView,{args:lodash$2.exports.pickBy(et.inputs,(ut,ct)=>ct!==rt[0])}))}return react.exports.createElement("span",null,opDisplayName(et,tt.opStore),react.exports.createElement(ArgsView,{args:et.inputs}))},OutputNodeView=({node:et})=>react.exports.createElement(OpView,{op:et.fromOp}),ConstNodeView=({node:et})=>isConstNodeWithType(et,"string")?react.exports.createElement("span",null,`"${et.val}"`):isConstNodeWithType(et,"number")?react.exports.createElement("span",null,et.val.toString()):isConstNodeWithType(et,{type:"function",inputTypes:{},outputType:"any"})?react.exports.createElement(ExpressionView,{node:et.val}):isConstNodeWithType(et,"none")?react.exports.createElement("span",null,"None"):react.exports.createElement("div",null,"?"),NodeView=({node:et})=>react.exports.createElement(ExpressionView$1,null,et.nodeType==="var"?et.varName:et.nodeType==="output"?react.exports.createElement(OutputNodeView,{node:et}):et.nodeType==="const"?react.exports.createElement(ConstNodeView,{node:et}):react.exports.createElement(react.exports.Fragment,null)),ExpressionViewContext=react.exports.createContext({});function useExpNode(){const{exp:et}=react.exports.useContext(ExpressionViewContext);if(!et)throw new Error("ExpressionViewContext uninitialized");return et}const ExpressionView=({node:et})=>react.exports.createElement(ExpressionViewContext.Provider,{value:{exp:et}},react.exports.createElement(NodeView,{node:et})),simpleArgsString=(et,tt)=>"("+Object.values(et).map(nt=>simpleNodeString(nt,tt)).join(", ")+")",simpleOpString=(et,tt)=>{const nt=Object.keys(et.inputs),rt=Object.values(et.inputs);if(isBinaryOp(et,tt))return`${simpleNodeString(rt[0],tt)} ${opSymbol(et,tt)} ${simpleNodeString(rt[1],tt)}`;if(isBracketsOp(et,tt)){const ot=rt[0],st=rt[1];return ot.nodeType==="var"&&st.nodeType==="const"?st.val:`${simpleNodeString(ot,tt)}[${simpleNodeString(st,tt)}]`}return isDotChainedOp(et,tt)?`${rt[0].nodeType==="var"?"":simpleNodeString(rt[0],tt)}${opDisplayName(et,tt)}${nt.length>1?simpleArgsString(lodash$2.exports.pickBy(et.inputs,(ut,ct)=>ct!==nt[0]),tt):""}`:`${opDisplayName(et,tt)} ${simpleArgsString(et.inputs,tt)} `},simpleNodeString=(et,tt)=>et.nodeType==="var"?et.varName:et.nodeType==="output"?simpleOpString(et.fromOp,tt):et.nodeType==="const"?et.type==="number"?et.val.toString():et.type==="string"?et.val:"?":"-",stripTag=et=>isTaggedValue(et)?taggedValueValueType(et):et,typeShapesMatch=(et,tt)=>{if(et=stripTag(et),tt=stripTag(tt),isList(et)||isList(tt))return!isList(et)||!isList(tt)?!1:typeShapesMatch(listObjectType(et),listObjectType(tt));if(isTypedDict(et)||isTypedDict(tt)){if(!isTypedDict(et)||!isTypedDict(tt))return!1;for(const nt of Object.keys(tt.propertyTypes)){const rt=tt.propertyTypes[nt],ot=et.propertyTypes[nt];if(ot===void 0||!typeShapesMatch(ot,rt))return!1}}return!0},nodeIsValidList=et=>et!=null&&et.nodeType!=="void"&&isListLike(et.type)&&listObjectType(et.type)!=="invalid";function useLoadOnce(et){const[tt,nt]=react.exports.useState(!1);return react.exports.useEffect(()=>{et&&!tt&&nt(!0)},[tt,et]),{hasLoadedOnce:tt}}const useAutomatedTableState=(et,tt,nt)=>{const{table:rt}=react.exports.useMemo(()=>initTableFromTableType(et,nt),[et,nt]),ot=tableColumnsDiff(nt,rt,tt),st=ot.addedCols.length>0||ot.removedCols.length>0,ut=tt?.columnNames==null||tt?.autoColumns===!0&&st?rt:tt;let{stack:ct}=usePanelContext();({node:et,stack:ct}=useRefEqualExpr(et,ct));const{loading:ft,result:pt}=useTableStateWithRefinedExpressions(ut,et,ct,nt),{hasLoadedOnce:ht}=useLoadOnce(ft),mt=react.exports.useMemo(()=>tt==null||equalStates(rt,tt),[rt,tt]);return Wt.useMemo(()=>({loading:ft,hasLoadedOnce:ht,tableState:pt,autoTable:rt,tableIsDefault:mt}),[ft,ht,pt,rt,mt])},useRowsNode=(et,tt,nt)=>react.exports.useMemo(()=>getRowsNode(tt.preFilterFunction,tt.groupBy,tt.columnSelectFunctions,tt.columnNames,tt.order,tt.sort,opIndexCheckpoint({arr:et}),nt),[tt.preFilterFunction,tt.groupBy,tt.columnSelectFunctions,tt.columnNames,tt.order,tt.sort,et,nt]),useUpdateConfigKey=(et,tt)=>react.exports.useCallback(nt=>{tt({[et]:nt})},[tt,et]),useBaseTableColumnDefinitions=(et,tt,nt)=>react.exports.useMemo(()=>{const rt=new MemoizedHasher;return _$2.fromPairs(_$2.map(et,ot=>{const st={id:ot,name:getTableColumnName(tt.columnNames,tt.columnSelectFunctions,ot,nt),selectFn:tt.columnSelectFunctions[ot],isGrouped:tt.groupBy.includes(ot),sortDirection:tt.sort.find(ct=>ct.columnId===ot)?.dir,panelId:tt.columns[ot].panelId,panelConfig:tt.columns[ot].panelConfig,key:""};let ut="";return ut+=`${st.id}`,ut+=`-${st.name}`,ut+=`-${st.selectFn.nodeType==="void"?"v":rt.typedNodeId(st.selectFn)}`,ut+=`-${st.isGrouped}`,ut+=`-${st.sortDirection??"_"}`,ut+=`-${st.panelId}`,st.key=ut,[ot,st]}))},[et,tt.columnNames,tt.columnSelectFunctions,tt.groupBy,tt.sort,tt.columns,nt]),useOrderedColumns=(et,tt)=>react.exports.useMemo(()=>{const nt=getColumnRenderOrder(et),rt=nt.filter(st=>!tt.includes(st)),ot=nt.filter(st=>tt.includes(st));return et.groupBy.concat(ot).concat(rt)},[et,tt]),getTableMeasurements=et=>{const{height:tt,width:nt,orderedColumns:rt,columnWidths:ot,rowHeight:st,numberOfHeaders:ut,headerHeight:ct,footerHeight:ft,totalRowCount:pt,indexOffset:ht,baseColumnWidth:mt,rowControlsWidth:yt,numPinnedRows:vt}=et,Tt=nt<_$2.sum(rt.map(Mt=>ot[Mt]??mt))+yt,Et=14,xt=tt-ut*ct-ft-(Tt?Et:0),At=Math.max(1,Math.floor(xt/st)),Ct=pt==null?At:Math.min(At,pt+vt),$t=Math.floor(xt/Math.max(Ct,1)),Ot=0,Rt=pt==null?1e7:Math.min(pt-Ct+vt),It=Math.max(Ot,Math.min(ht,Rt)),kt=Ct-vt;return{adaptiveRowHeight:$t,adjustedIndexOffset:It,numVisibleRows:kt,rowsPerPage:Ct}},useBaseTableData=(et,tt,nt,rt,ot,st)=>{ot=react.exports.useMemo(()=>st!=null?ot.filter(ht=>ht<st):[],[ot,st]);const ut=react.exports.useMemo(()=>ot.slice(0,Math.min(Math.max(0,nt-1),ot.length)),[ot,nt]),ct=nt-ut.length,ft=react.exports.useMemo(()=>{const ht=new MemoizedHasher;return _$2.range(ct).map(mt=>{const yt=opIndex({arr:et,index:constNumber(rt+mt)});return{id:ht.typedNodeId(yt),rowNode:yt,isPinned:!1}})},[et,ct,rt]),pt=react.exports.useMemo(()=>{const ht=new MemoizedHasher;return ut.map(mt=>{const yt=opIndex({arr:tt,index:constNumber(mt)});return{id:ht.typedNodeId(yt),rowNode:yt,isPinned:!0}})},[tt,ut]);return{unpinnedData:ft,pinnedData:pt}},recordEvent$1=makeEventRecorder("Table"),STYLE_POPUP_CLASS="control-box-popup",makeMenuItemDivider=et=>({value:et,disabled:!0,render:()=>Wt.createElement("div",{style:{marginRight:12,marginLeft:12,borderBottom:"1px solid #888"}})}),makeSortingMenuItems=(et,tt,nt)=>{const rt=et.sort.find(st=>st.columnId===tt)?.dir,ot=[makeMenuItemDivider("sort-div")];return rt!=="asc"&&ot.push({value:"sort-asc",name:"Sort Asc",icon:"up-arrow",onSelect:async()=>{recordEvent$1("UPDATE_COLUMN_SORT_ASC");const st=enableSortByCol(disableSort(et),tt,!0);nt(st)}}),rt!==void 0&&ot.push({value:"sort-remove",name:"Remove Sort",icon:"delete",onSelect:async()=>{recordEvent$1("REMOVE_COLUMN_SORT");const st=disableSortByCol(et,tt);nt(st)}}),rt!=="desc"&&ot.push({value:"sort-desc",name:"Sort Desc",icon:"down-arrow",onSelect:async()=>{recordEvent$1("UPDATE_COLUMN_SORT_DESC");const st=enableSortByCol(disableSort(et),tt,!1);nt(st)}}),ot},ColumnHeader=({isGroupCol:et,tableState:tt,inputArrayNode:nt,rowsNode:rt,columnName:ot,selectFunction:st,colId:ut,panelId:ct,config:ft,panelContext:pt,updatePanelContext:ht,updateTableState:mt,isPinned:yt,setColumnPinState:vt,simpleTable:Tt})=>{const Et=useWeaveContext(),[xt,At]=react.exports.useState(!1),[Ct,$t]=react.exports.useState(st),[Ot,Rt]=react.exports.useState(ot),[It,kt]=react.exports.useState(ct),[Mt,Ft]=react.exports.useState(ft),zt=enableGroupByCol,Vt=disableGroupByCol,Zt=react.exports.useCallback(()=>{let Dn=tt;if(Ot!==ot&&(recordEvent$1("UPDATE_COLUMN_NAME"),Dn=updateColumnName(Dn,ut,Ot)),Et.nodeIsExecutable(Ct)&&Ct.type!=="invalid"){let $n=!1;Ct!==st&&(Dn=updateColumnSelect(Dn,ut,Ct),$n=!0),It!==ct&&(Dn=updateColumnPanelId(Dn,ut,It),$n=!0),Mt!==ft&&(Dn=updateColumnPanelConfig(Dn,ut,Mt),$n=!0),$n&&recordEvent$1("UPDATE_COLUMN_PANEL")}Dn!==tt&&mt(Dn)},[tt,ut,Ot,Ct,It,Mt,mt,ot,ft,ct,st,Et]),Ut=react.exports.useCallback(()=>{At(!0),$t(st),Rt(ot),kt(ct),Ft(ft)},[st,ot,ct,ft]),Xt=react.exports.useMemo(()=>getCellFrame(nt,rt,tt.groupBy,tt.columnSelectFunctions,ut),[ut,nt,rt,tt.columnSelectFunctions,tt.groupBy]),Jt=react.exports.useCallback(()=>{const Dn=Vt(tt,ut);recordEvent$1("UNGROUP"),mt(Dn)},[tt,ut,Vt,mt]),gn=react.exports.useMemo(()=>Et.nodeIsExecutable(Ct)&&!isVoidNode(Xt.row)?getCellValueNode(Et,Xt.row,Ct):voidNode(),[Xt.row,Ct,Et]),{handler:An,stackIds:sn,curPanelId:Sn}=usePanelStacksForType(Ct.type,It,{excludeTable:!0,excludePlot:!0});let In=stripTag(Ct.type);et||(In=isListLike(In)?stripTag(listObjectType(Ct.type)):In);const _n=react.exports.useMemo(()=>{let Dn=[];return Dn.push({value:"settings",name:"Column settings",icon:"configuration",onSelect:()=>Ut()}),!et&&canGroupType(In)?Dn.push({value:"group",name:"Group by",icon:"group-runs",onSelect:()=>{const $n=zt(tt,ut);recordEvent$1("GROUP"),mt($n)}}):et&&Dn.push({value:"ungroup",name:"Ungroup",icon:"group-runs",onSelect:Jt}),canSortType(Ct.type)&&(Dn=Dn.concat(makeSortingMenuItems(tt,ut,mt))),et||(Dn.length>0&&Dn.push(makeMenuItemDivider("insert-div")),Dn=Dn.concat([{value:"insert-right",name:"Insert 1 right",icon:"next",onSelect:()=>{const $n=insertColumnRight(tt,ut,nt,Et);recordEvent$1("INSERT_COLUMN"),mt($n)}},{value:"insert-left",name:"Insert 1 left",icon:"previous",onSelect:()=>{const $n=insertColumnLeft(tt,ut,nt,Et);recordEvent$1("INSERT_COLUMN"),mt($n)}},makeMenuItemDivider("pin-div"),{value:"pin",name:yt?"Unpin":"Pin",icon:"pin",onSelect:()=>{recordEvent$1("PIN_COLUMN"),vt(!yt)}},makeMenuItemDivider("remove-div"),{value:"remove",name:"Remove",icon:"delete",onSelect:()=>{const $n=removeColumn(tt,ut);recordEvent$1("REMOVE_COLUMN"),mt($n)}},{value:"remove-all-right",name:"Remove all right",icon:"next",onSelect:()=>{const $n=removeColumnsToRight(tt,ut);recordEvent$1("REMOVE_COLUMNS_TO_RIGHT"),mt($n)}},{value:"remove-all-left",name:"Remove all left",icon:"previous",onSelect:()=>{const $n=removeColumnsToLeft(tt,ut);recordEvent$1("REMOVE_COLUMNS_TO_LEFT"),mt($n)}}])),Dn},[Jt,In,ut,et,zt,nt,tt,mt,Ct.type,Ut,yt,vt,Et]),En=tt.sort.find(Dn=>Dn.columnId===ut)?.dir!=null,Ln=20*(1+(En?1:0)+(yt?1:0)),wn=react.exports.useMemo(()=>({...Xt,domain:Et.callFunction(st,{row:nt}),row:Xt.row}),[Xt,Et,st,nt]);return Wt.createElement(ColumnHeader$1,{"data-test":"column-header"},Tt?Ot!==""?Wt.createElement(ColumnNameText,null,Ot):Wt.createElement(ExpressionView,{frame:Xt,node:Ct}):Wt.createElement(Popup$1,{basic:!0,className:"wb-table-action-popup",on:"click",open:xt,position:"bottom left",onOpen:Ut,onClose:(Dn,$n)=>{const Gn=[INPUT_SLIDER_CLASS,STYLE_POPUP_CLASS,SUGGESTION_OPTION_CLASS].map(zn=>"."+zn).join(", ");Dn.target.closest(Gn)!=null||withIgnoreBlockedClicks(()=>{Zt(),At(!1)})(Dn,$n)},trigger:Wt.createElement(ColumnName,{style:{marginRight:`-${Ln}px`},onClick:()=>At(!xt)},Ot!==""?Wt.createElement(ColumnNameText,null,Ot):Wt.createElement(ExpressionView,{frame:Xt,node:Ct})),content:xt&&Wt.createElement("div",null,Wt.createElement(ColumnEditorSection,null,Wt.createElement(ColumnEditorSectionLabel,null,"Cell expression"),Wt.createElement(AssignmentWrapper,null,Wt.createElement("div",{style:{width:"100%"}},Wt.createElement(PanelContextProvider,{newVars:Xt},Wt.createElement(WeaveExpression,{expr:Ct,setExpression:$t,onMount:focusEditor,liveUpdate:!0})))),Wt.createElement(ColumnEditorColumnName,null,Wt.createElement(ColumnEditorFieldLabel,null,"Column name:"),Wt.createElement(EditableField,{value:Ot,placeholder:simpleNodeString(Ct,Et.client.opStore),save:Rt}))),Wt.createElement(ColumnEditorSection,null,Wt.createElement(ColumnEditorSectionLabel,null,"Panel"),Wt.createElement(PanelNameEditor,null,Wt.createElement(ModifiedDropdown,{selection:!0,search:!0,options:sn.map(Dn=>({text:Dn.displayName,value:Dn.id})),value:Sn,onChange:(Dn,{value:$n})=>kt($n)})),st.nodeType!=="void"&&gn.nodeType!=="void"&&An!=null&&Wt.createElement(PanelSettings,null,Wt.createElement(PanelContextProvider,{newVars:wn},Wt.createElement(PanelComp2,{input:gn,inputType:Ct.type,loading:!1,panelSpec:An,configMode:!0,context:pt,config:Mt,updateConfig:Dn=>Ft({...Mt,...Dn}),updateContext:ht})))))}),!Tt&&Wt.createElement(WBPopupMenuTrigger,{options:_n},({anchorRef:Dn,setOpen:$n,open:Gn})=>Wt.createElement(ColumnAction,{className:"column-controls"},yt&&Wt.createElement(PinnedIndicator,{unpin:()=>vt(!1)}),et&&Wt.createElement(ControlIcon,{name:"group-runs",onClick:Jn=>{recordEvent$1("REMOVE_COLUMN_GROUPING"),Jt()}}),En&&Wt.createElement(SortStateToggle,{tableState:tt,colId:ut,updateTableState:mt}),Wt.createElement(EllipsisIcon,{ref:Dn,"data-test":"column-options",name:"overflow",className:"column-actions-trigger",onClick:()=>$n(Jn=>!Jn)}))))},SortStateToggle=({updateTableState:et,tableState:tt,colId:nt})=>{const rt=tt.sort.find(ot=>ot.columnId===nt)?.dir;return rt&&rt==="desc"?Wt.createElement(ControlIcon,{name:"down-arrow",onClick:async ot=>{recordEvent$1("REMOVE_COLUMN_SORT"),et(disableSortByCol(tt,nt))}}):rt&&rt==="asc"?Wt.createElement(ControlIcon,{name:"up-arrow",onClick:async ot=>{recordEvent$1("UPDATE_COLUMN_SORT_DESC"),et(enableSortByCol(disableSort(tt),nt,!1))}}):Wt.createElement(Wt.Fragment,null)},PinnedIndicator=({unpin:et})=>Wt.createElement(ControlIcon,{name:"pin",onClick:async()=>{recordEvent$1("PIN_COLUMN"),et()}}),FuzzyMatcher={match:fuzzyMatchWithMapping,highlight:fuzzyMatchHighlight},ExactMatcher={match(et,tt,nt){return tt?et.filter(rt=>nt(rt).indexOf(tt)!==-1).sort((rt,ot)=>nt(rt).localeCompare(nt(ot))):et},highlight(et,tt,nt){const rt=et.indexOf(tt);if(rt===-1)return react.exports.createElement("span",null,et);const ot=rt,st=rt+tt.length;return renderHighlightSpans(et,ot,st,nt)}},RegexMatcher={match(et,tt,nt){if(!tt)return et;let rt=null;try{rt=new RegExp(tt)}catch{return[]}return et.filter(ot=>nt(ot).match(rt)!=null).sort((ot,st)=>nt(ot).localeCompare(nt(st)))},highlight(et,tt,nt){const rt=et.match(new RegExp(tt));if(rt==null||rt.length===0)return react.exports.createElement("span",null,et);const ot=rt[0],st=et.indexOf(ot),ut=st+ot.length;return renderHighlightSpans(et,st,ut,nt)}};function renderHighlightSpans(et,tt,nt,rt){return react.exports.createElement(react.exports.Fragment,null,react.exports.createElement("span",{key:0},et.substring(0,tt)),react.exports.createElement("span",{key:1,className:"fuzzy-match",style:rt},et.substring(tt,nt)),react.exports.createElement("span",{key:2},et.substring(nt)))}const matchers={fuzzy:FuzzyMatcher,exact:ExactMatcher,regex:RegexMatcher};function dynamicMatchWithMapping(et,tt,nt,rt){return matchers[et].match(tt,nt,rt)}function dynamicMatchHighlight(et,tt,nt,rt={fontWeight:"bold"}){return matchers[et].highlight(tt,nt,rt)}const ColumnSearchInput=styled$1(Input$7)`
  width: 100%;
  margin-left: 5px;
  & > input {
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #d2d2d2 !important;
  }
`,ColumnSelectorField=Wt.memo(({disabled:et,colName:tt,colId:nt,icon:rt,config:ot,dragging:st,searchQuery:ut,searchMode:ct,onDragStart:ft,onDragEnd:pt,onClick:ht,onDrop:mt})=>{const[yt,vt]=react.exports.useState(0),Tt=react.exports.useRef(null),Et=react.exports.useCallback(()=>{vt(Ct=>Ct+1)},[]),xt=react.exports.useCallback(Ct=>{vt($t=>$t-1)},[]),At=!!ot.columns[tt];return Wt.createElement(List$5.Item,{key:tt,ref:Tt,className:"column-field-wrapper"+(st?" dragging":"")+(At&&yt!==0?" drop":"")+(et?" disabled":""),onDragEnter:Et,onDragLeave:xt,onDragEnd:pt,onDragOver:Ct=>{Ct.preventDefault()},onDrop:()=>{vt(0),mt({name:tt,id:nt})}},Wt.createElement("div",{className:"column-field",draggable:!et,onDragStart:ft,onClick:ht},Wt.createElement(Icon$4,{className:`section-icon wbic-ic-${rt??"metadata"}`}),Wt.createElement("span",{className:"column-name"},dynamicMatchHighlight(ct,tt,ut))))}),ColumnSelectorListContainer=Wt.memo(({onDrop:et,visibleColumns:tt,children:nt})=>{const[rt,ot]=react.exports.useState(!1),st=react.exports.useRef(null);return Wt.createElement("div",{ref:st,className:"column-list-container"+(rt?" dragover":"")+(tt?" visible-container":" hidden-container"),onDragStart:()=>{ot(!0)},onDragEnter:ut=>{ot(!0)},onDragLeave:ut=>{st.current.contains(ut.relatedTarget)||ot(!1)},onDragOver:ut=>{ut.preventDefault()},onDrop:ut=>{(ut.target===st.current||ut.target.parentNode===st.current)&&et(),ot(!1)}},nt)}),MAX_COLUMNS_SHOWN=100,ColumnSelector=Wt.memo(({inputNode:et,tableState:tt,update:nt})=>{const rt=useWeaveContext(),ot=initTableWithPickColumns(et,rt),st=react.exports.useMemo(()=>{const Vt={};for(const Zt of ot.order)Vt[getTableColumnName(ot.columnNames,ot.columnSelectFunctions,Zt,rt.client.opStore)]=Zt;return Vt},[ot,rt.client.opStore]),ut=Object.keys(st),[ct,ft]=react.exports.useState(),[pt,ht]=Wt.useState(null),mt=react.exports.useCallback(()=>{ft(void 0)},[]),yt=react.exports.useCallback(Vt=>{nt(Vt)},[nt]),vt=react.exports.useCallback((Vt,Zt)=>{let Ut=lodash$2.exports.cloneDeep(tt);ct&&(Zt?(Ut=addColumns(Ut,[ct]),Ut=moveBefore(Ut,ct,Vt)):Ut=removeColumns(Ut,[ct])),yt(Ut)},[tt,ct,yt]),Tt=react.exports.useCallback(Vt=>{let Zt=lodash$2.exports.cloneDeep(tt);ct&&(Vt?(Zt=addColumns(Zt,[ct]),Zt=moveToEnd(Zt,ct),window.setTimeout(()=>{pt&&pt.scrollTo({top:pt.scrollHeight})})):Zt=removeColumns(Zt,[ct])),yt(Zt)},[tt,ct,yt,pt]),Et=react.exports.useCallback(Vt=>{yt(addColumns(tt,[Vt]))},[tt,yt]),xt=react.exports.useCallback(Vt=>{yt(removeColumns(tt,[Vt]))},[tt,yt]),At=react.exports.useCallback(Vt=>{yt(addColumns(tt,Vt))},[tt,yt]),Ct=react.exports.useCallback(Vt=>{yt(removeColumns(tt,Vt))},[tt,yt]),[$t,Ot]=react.exports.useState(""),[Rt,It]=react.exports.useState("fuzzy"),kt=react.exports.useCallback(Vt=>dynamicMatchWithMapping(Rt,Vt,$t,Zt=>Zt.name),[$t,Rt]),Mt=Wt.useMemo(()=>{const Vt=new Set(tt.order);return new Set(Object.entries(tt.columns).reduce((Zt,[Ut,Xt])=>{const Jt=Xt.originalKey;return Jt!=null&&Vt.has(Ut)&&Zt.push(Jt),Zt},[]))},[tt.columns,tt.order]),Ft=Wt.useMemo(()=>kt(ut.filter(Vt=>!Mt.has(Vt)).map(Vt=>{const Zt=st[Vt];return{name:Vt,selectFn:ot.columnSelectFunctions[Zt]}})),[kt,ut,Mt,st,ot.columnSelectFunctions]),zt=Wt.useMemo(()=>kt(tt.order.map(Vt=>({name:getTableColumnName(tt.columnNames,tt.columnSelectFunctions,Vt,rt.client.opStore),id:Vt}))).sort((Vt,Zt)=>tt.groupBy.includes(Zt.id)?1:0-(tt.groupBy.includes(Vt.id)?1:0)),[kt,tt.order,tt.columnNames,tt.columnSelectFunctions,tt.groupBy,rt.client.opStore]);return Wt.createElement(Grid$2,{className:"table-editor"},ut.length>COLUMN_LIMIT&&Wt.createElement(Grid$2.Row,null,Wt.createElement(Grid$2.Column,null,Wt.createElement("div",{style:{fontStyle:"italic"}},Wt.createElement(Icon$4,{name:"warning sign",style:{marginRight:"5px"}}),`Showing more than ${COLUMN_LIMIT} columns may affect responsiveness.`))),Wt.createElement(Grid$2.Row,null,Wt.createElement(Grid$2.Column,null,Wt.createElement("div",{style:{display:"flex"}},Wt.createElement(Dropdown,{compact:!0,selection:!0,options:[{text:"Fuzzy",value:"fuzzy"},{text:"Exact",value:"exact"},{text:"RegExp",value:"regex"}],value:Rt,onChange:(Vt,{value:Zt})=>It(Zt)}),Wt.createElement(ColumnSearchInput,{size:"small",icon:"search",placeholder:"Search columns",loading:!1,onChange:(Vt,{value:Zt})=>Ot(Zt)})))),Wt.createElement(Grid$2.Row,null,Wt.createElement(Grid$2.Column,{width:8},Wt.createElement(ColumnSelectorListContainer,{visibleColumns:!1,onDrop:()=>Tt(!1)},Wt.createElement("h5",null,"Available Columns",Wt.createElement("span",{className:"count-tag"},Ft.length)),Wt.createElement("div",{className:"items-scroll-list"},Ft.slice(0,100).map(Vt=>Wt.createElement(ColumnSelectorField,{key:Vt.name,disabled:!1,colName:Vt.name,colId:Vt.id,config:tt,onDragStart:Zt=>{Zt.dataTransfer.setData("text",""),ft(Vt)},onDragEnd:()=>mt,onDrop:Zt=>vt(Zt,!1),dragging:Vt===ct,searchQuery:$t,searchMode:Rt,onClick:()=>Et(Vt)})),Ft.length>=MAX_COLUMNS_SHOWN&&Wt.createElement(List$5.Item,{className:"hint-text"},`Limited to ${MAX_COLUMNS_SHOWN} results. Use search to find other columns.`)),Wt.createElement(Button$3,{className:"right tiny wb-icon-button",onClick:()=>At(Ft)},Wt.createElement(LegacyWBIcon,{name:"next"}),"Add all"))),Wt.createElement(Grid$2.Column,{width:8},Wt.createElement(ColumnSelectorListContainer,{visibleColumns:!0,onDrop:()=>Tt(!0)},Wt.createElement("h5",null,"Displayed Columns",Wt.createElement("span",{className:"count-tag"},zt.length),tt.order.length===COLUMN_LIMIT&&Wt.createElement("span",{className:"column-limit-msg"},"Column limit reached")),Wt.createElement("div",{className:"items-scroll-list",ref:Vt=>ht(Vt)},zt.slice(0,100).map((Vt,Zt)=>Wt.createElement(ColumnSelectorField,{key:Zt,disabled:!1,colName:Vt.name,colId:Vt.id,icon:tt.columns[Vt.id].originalKey==null?"sparkles":tt.groupBy.includes(Vt.id)?"group":"metadata",config:tt,onDragStart:Ut=>{Ut.dataTransfer.setData("text",""),ft(Vt)},onDragEnd:()=>mt,onDrop:Ut=>vt(Ut,!0),dragging:Vt===ct,searchQuery:$t,searchMode:Rt,onClick:()=>xt(Vt)})),zt.length>=MAX_COLUMNS_SHOWN&&Wt.createElement(List$5.Item,{className:"hint-text"},`Limited to ${MAX_COLUMNS_SHOWN} results. Use search to find other columns.`)),Wt.createElement(Button$3,{className:"tiny wb-icon-button",onClick:()=>Ct(zt)},Wt.createElement(LegacyWBIcon,{name:"previous"}),"Remove all")))))});var RowSize=(et=>(et[et.Small=1]="Small",et[et.Medium=2]="Medium",et[et.Large=3]="Large",et[et.XLarge=4]="XLarge",et))(RowSize||{});const TABLE_CONFIG_DEFAULTS={rowSize:2},tableStateKeys=["autoColumns","columns","preFilterFunction","columnNames","columnSelectFunctions","order","groupBy","sort","pageSize","page"],defaultObj={},defaultArr=[],migrateConfig=(et,tt)=>{let nt=et||{};if(nt?.combinedTableConfig!=null&&nt?.table==null&&(nt={...lodash$2.exports.omit(nt,["combinedTableConfig"]),tableState:lodash$2.exports.pick(nt.combinedTableConfig,tableStateKeys)}),nt!=null&&nt.tableState==null&&nt.tableStateInputType==null&&nt.order!=null&&(nt={...lodash$2.exports.omit(nt,tableStateKeys),tableState:lodash$2.exports.pick(nt,tableStateKeys)},(nt.tableState.order??[]).length>0)){let ot;(nt.tableState.groupBy??[]).length>0?ot=nt.tableState.columnSelectFunctions[nt.tableState.groupBy[0]]:ot=nt.tableState.columnSelectFunctions[nt.tableState.order[0]];const st=findChainedAncestor(ot,ut=>ut.nodeType==="var"&&ut.varName==="row",()=>!0);st!=null&&(nt.tableStateInputType=list$1(st.type))}nt.rowSize==null&&(nt===et?nt={...nt,rowSize:TABLE_CONFIG_DEFAULTS.rowSize}:nt.rowSize=TABLE_CONFIG_DEFAULTS.rowSize),nt.indexOffset==null&&(nt===et?nt={...nt,indexOffset:0}:nt.indexOffset=0),nt.columnWidths==null&&(nt===et?nt={...nt,columnWidths:defaultObj}:nt.columnWidths=defaultObj),nt.pinnedRows==null&&(nt===et?nt={...nt,pinnedRows:defaultObj}:nt.pinnedRows=defaultObj),nt.pinnedColumns==null&&(nt===et?nt={...nt,pinnedColumns:defaultArr}:nt.pinnedColumns=defaultArr);const rt=typeSafeTableState(nt,tt?.type);return rt!==nt.tableState&&(nt===et?nt={...nt,tableState:rt}:nt.tableState=rt),nt},typeSafeTableState=(et,tt)=>{if(et?.tableStateInputType==null||tt==null||typeShapesMatch(tt,et.tableStateInputType))return et?.tableState},useUpdateConfigRespectingTableType=(et,tt)=>react.exports.useCallback(nt=>(nt.tableState!=null&&tt!=null&&(nt.tableStateInputType=tt.type),et(nt)),[tt,et]),getTableConfig=(et,tt,nt)=>{const rt=migrateConfig(tt,et),st=rt?.tableStateInputType!=null&&!typeShapesMatch(et.type,rt?.tableStateInputType)?void 0:rt?.tableState,{table:ut}=initTableFromTableType(et,nt),ct=tableColumnsDiff(nt,ut,st),ft=ct.addedCols.length>0||ct.removedCols.length>0,pt=st?.columnNames==null||st?.autoColumns===!0&&ft?ut:st;return{...rt,tableState:pt}},Link=styled$1.a.attrs(et=>({className:`night-aware ${et.className??""}`}))`
  font-weight: 600;
  color: ${TEAL_600};
  .night-mode & {
    color: ${TEAL_450};
  }
  &:hover {
    color: ${TEAL_550};
  }
  .night-mode &:hover {
    color: ${TEAL_400};
  }
`;Link.displayName="Link";const recordEvent=makeEventRecorder("Table"),inputType$F=GeneralTableLikeType,baseColumnWidth=95,minColumnWidth=30,rowControlsWidth=30,numberOfHeaders=1,headerHeight=30,footerHeight=25,rowHeightSettings={[RowSize.Small]:30,[RowSize.Medium]:60,[RowSize.Large]:120,[RowSize.XLarge]:240},nextRowSize={[RowSize.Small]:RowSize.Medium,[RowSize.Medium]:RowSize.Large,[RowSize.Large]:RowSize.XLarge,[RowSize.XLarge]:RowSize.Small},rowSizeIconName={[RowSize.Small]:"rows",[RowSize.Medium]:"table",[RowSize.Large]:"table-collapsed",[RowSize.XLarge]:"fullscreen"},PanelTable=et=>{const{input:tt,config:nt,updateConfig:rt}=et,ot=react.exports.useMemo(()=>normalizeTableLike(tt),[tt]),st=useNodeWithServerType(ot),ut=st.loading?void 0:st.result,ct=react.exports.useMemo(()=>migrateConfig(nt,ut),[nt,ut]),ft=useUpdateConfigRespectingTableType(rt,ut);return st.loading?Wt.createElement(Panel2Loader,null):ut&&isAssignableTo(ut.type,"none")?Wt.createElement("div",null,"-"):nodeIsValidList(ut)?Wt.createElement(GrowToParent,{"data-test":"panel-table-2-wrapper"},Wt.createElement(AutoSizer,{style:{width:"100%",height:"100%",overflow:"hidden"}},({height:pt,width:ht})=>Wt.createElement(PanelTableInnerConfigSetter,{...et,config:ct,updateConfig:ft,input:ut,height:pt,width:ht}))):(console.warn("PanelTable returning empty state because of Invalid input type: ",ut),Wt.createElement(Wt.Fragment,null,"Panel table error. See console"))},PanelTableInnerConfigSetter=et=>{const tt=useWeaveContext(),{input:nt,updateConfig:rt,config:ot}=et,{tableState:st,autoTable:ut,hasLoadedOnce:ct}=useAutomatedTableState(nt,ot.tableState,tt),ft=Wt.useCallback(yt=>{yt.tableState==null&&ot.tableState==null&&st!=null?rt({...yt,tableState:{...st,autoColumns:!1}}):rt(yt)},[ot.tableState,st,rt]),pt=Wt.useMemo(()=>({...ot,tableState:st??ut}),[ot,st,ut]),[ht,mt]=Wt.useState(!1);return ct?Wt.createElement(PanelTableInner,{...et,config:pt,autoTable:ut,updateConfig:ft,showColumnSelect:ht,setShowColumnSelect:mt}):Wt.createElement(Panel2Loader,null)},PanelTableInner=et=>{react.exports.useEffect(()=>{recordEvent("VIEW")},[]);const tt=useWeaveContext(),{input:nt,updateConfig:rt,updateContext:ot,height:st,width:ut,config:ct,autoTable:ft,showColumnSelect:pt,setShowColumnSelect:ht}=et,mt=ct.tableState;if(mt==null)throw new Error("PanelTableInner received null tableState");const yt=et.rowActions,vt=useUpdateConfigKey("indexOffset",rt),Tt=useUpdateConfigKey("tableState",rt),Et=useUpdateConfigKey("rowSize",rt),xt=useUpdateConfigKey("columnWidths",rt),At=react.exports.useCallback((Eo,Do)=>{xt({...ct.columnWidths,[Eo]:Do})},[xt,ct.columnWidths]),Ct=react.exports.useCallback(Eo=>{const Do={};mt.order.forEach(bo=>{Do[bo]=Eo}),xt(Do)},[xt,mt.order]),$t=react.exports.useCallback((Eo,Do)=>{const bo=ct.pinnedColumns||[];rt(Do?{pinnedColumns:bo.includes(Eo)?bo:[...bo,Eo]}:{pinnedColumns:bo.filter(Vo=>Vo!==Eo)})},[ct.pinnedColumns,rt]),Ot=react.exports.useCallback(Eo=>{rt({tableState:Eo})},[rt]),Rt=react.exports.useCallback(()=>{rt({tableState:ft,tableStateInputType:void 0,rowSize:TABLE_CONFIG_DEFAULTS.rowSize,indexOffset:0,columnWidths:{},pinnedRows:{},pinnedColumns:[]})},[rt,ft]),[It,kt]=Wt.useState(!1),Mt=react.exports.useMemo(()=>(mt.groupBy??[]).join(","),[mt.groupBy]),Ft=react.exports.useMemo(()=>((ct.pinnedRows??{})[Mt]??[]).filter(Eo=>Eo!=null),[ct.pinnedRows,Mt]),zt=react.exports.useCallback((Eo,Do)=>{const bo=ct.pinnedRows??{};if(Do){const Vo={pinnedRows:{...bo,[Mt]:Ft.includes(Eo)?Ft:[...Ft,Eo]}};rt(Vo)}else rt({pinnedRows:{...bo,[Mt]:Ft.filter(Vo=>Vo!==Eo)}})},[ct.pinnedRows,Mt,Ft,rt]),Vt=react.exports.useCallback(Eo=>{rt({activeRowForGrouping:{...ct.activeRowForGrouping,[Mt]:Eo}})},[Mt,ct.activeRowForGrouping,rt]),Zt=ct.activeRowForGrouping?.[Mt]??-1,Ut=useRowsNode(nt,mt,tt),{frame:Xt}=usePanelContext(),Jt=react.exports.useMemo(()=>{const Eo=getExampleRow(Ut).type;return Xt.runColors!=null&&isAssignableTo(Eo,taggedValue(typedDict({run:"run"}),"any"))?opGetRunTag({obj:varNode(Eo,"row")}):null},[Ut,Xt]),gn=useNodeValue(react.exports.useMemo(()=>opCount({arr:Ut}),[Ut])),An=gn.loading?void 0:gn.result,sn=useOrderedColumns(mt,ct.pinnedColumns),Sn=isOutputNode(et.input)?et.input:void 0,_n=(mt.groupBy.length>0||Sn?.fromOp.name==="joinAll"?2:1)*rowHeightSettings[ct.rowSize],{adaptiveRowHeight:En,adjustedIndexOffset:Ln,numVisibleRows:wn,rowsPerPage:Dn}=getTableMeasurements({height:st,width:ut,orderedColumns:sn,columnWidths:ct.columnWidths,rowHeight:_n,numberOfHeaders,headerHeight,footerHeight,totalRowCount:An,baseColumnWidth,rowControlsWidth:rowControlsWidth*(yt!=null&&yt.length>0?2:1),indexOffset:ct.indexOffset,numPinnedRows:Ft.length}),$n=useBaseTableColumnDefinitions(sn,mt,tt.client.opStore),Gn=react.exports.useMemo(()=>({...mt,page:0,sort:[],preFilterFunction:voidNode()}),[mt]),Jn=useRowsNode(nt,Gn,tt),zn=useNodeValue(react.exports.useMemo(()=>opCount({arr:Jn}),[Jn])),Qn=zn.loading?void 0:zn.result,{unpinnedData:Bn,pinnedData:jn}=useBaseTableData(Ut,Jn,Dn,Ln,Ft,Qn),Ar=react.exports.useCallback(()=>{downloadCSV(Ut,mt,tt)},[Ut,mt,tt]),Er=react.exports.useCallback((Eo,{headerIndex:Do})=>Wt.createElement(ColumnHeader,{isGroupCol:$n[Eo].isGrouped,tableState:mt,inputArrayNode:nt,rowsNode:Ut,columnName:mt.columnNames[Eo],selectFunction:mt.columnSelectFunctions[Eo],colId:Eo,panelId:mt.columns[Eo].panelId,config:mt.columns[Eo].panelConfig,panelContext:et.context,updatePanelContext:ot,updateTableState:Tt,isPinned:ct.pinnedColumns?.includes(Eo),setColumnPinState:bo=>{$t(Eo,bo)},simpleTable:et.config.simpleTable}),[$n,mt,nt,Ut,et.context,et.config.simpleTable,ot,Tt,ct.pinnedColumns,$t]),Pr=react.exports.useCallback((Eo,{rowData:Do})=>{const bo=Do.rowNode,Vo=$n[Eo];return Vo.isGrouped?Wt.createElement(GrowToParent,null,Wt.createElement(Value$1,{table:mt,colId:Eo,valueNode:opPick({obj:opGroupGroupKey({obj:bo}),key:constString(escapeDots(Vo.name))}),config:{},updateTableState:Tt,panelContext:et.context,updatePanelContext:ot})):Wt.createElement(GrowToParent,null,Wt.createElement(Cell,{table:mt,colId:Eo,inputNode:nt,rowNode:bo,selectFunction:Vo.selectFn,panelId:Vo.panelId,config:Vo.panelConfig,panelContext:et.context,updateTableState:Tt,updatePanelContext:ot,updateInput:et.updateInput,simpleTable:et.config.simpleTable}))},[$n,mt,Tt,et.context,et.updateInput,et.config.simpleTable,ot,nt]),[Nr,Ir]=react.exports.useState(!1),no=mt.preFilterFunction.nodeType==="output",ro=mt.groupBy.length>0,ao=react.exports.useMemo(()=>{const Eo=_$2.map(sn,Do=>{const bo=$n[Do],Vo=bo.isGrouped||ct.pinnedColumns.includes(Do);return{colId:Do,key:bo.key,frozen:Vo?"left":!1,style:{padding:"0px"},width:ct.columnWidths[Do]??baseColumnWidth,minWidth:minColumnWidth,flexGrow:1,flexShrink:0,resizable:!0,cellRenderer:Ts=>Pr(Do,Ts),headerRenderer:Ts=>Er(Do,Ts)}});if(Eo.unshift({colId:"__controls__",key:"controls",width:rowControlsWidth,frozen:"left",flexGrow:0,flexShrink:0,style:{padding:"0px"},deps:{rowSize:ct.rowSize,adjustedIndexOffset:Ln,pinedRows:ct.pinnedRows,filterOpen:It,isFiltered:no,isGrouped:ro},cellRenderer:({columnIndex:Do,rowIndex:bo,rowData:Vo})=>ro?Wt.createElement(IndexColumnVal,null,Wt.createElement(IndexColumnText,null,bo+1)):Wt.createElement(IndexCell,{runNode:Jt,rowNode:Vo.rowNode,setRowAsPinned:Ts=>{et.config.simpleTable||(Nr?zt(Ts,!Vo.isPinned):Vt(Ts))},activeRowIndex:Zt,simpleTable:et.config.simpleTable}),headerRenderer:({headerIndex:Do})=>et.config.simpleTable?null:Wt.createElement(TableAction,{"data-test":"table-filter-button",highlight:no??!1,onClick:()=>{kt(!It)}},Wt.createElement(TableIcon,{name:"filter",highlight:no===!1?void 0:!0}))}),yt!=null&&yt.length>0&&Eo.unshift({colId:"__actions__",key:"actions",width:rowControlsWidth,frozen:"right",flexGrow:0,flexShrink:0,style:{padding:"0px"},deps:{rowSize:ct.rowSize,adjustedIndexOffset:Ln,pinedRows:ct.pinnedRows,filterOpen:It,isFiltered:no,isGrouped:ro},cellRenderer:({columnIndex:Do,rowIndex:bo,rowData:Vo})=>ro?null:Wt.createElement(ActionCell$1,{items:yt,rowNode:Vo.rowNode,rowIndex:bo})}),ut!=null){let Do=0,bo=0;if(Eo.forEach(Vo=>{Do+=Vo.width,Vo.resizable&&ct.columnWidths[Vo.colId]==null&&(bo+=Vo.width-(Vo.minWidth??0))}),Do<ut){const Vo=(ut-Do)/bo;Eo.forEach(Ts=>{Ts.resizable&&ct.columnWidths[Ts.colId]==null&&(Ts.width=Math.floor(Ts.width+(Ts.width-(Ts.minWidth??0))*Vo))})}}return Eo},[sn,ct.rowSize,ct.pinnedRows,ct.pinnedColumns,ct.columnWidths,Ln,It,no,ro,yt,ut,$n,Pr,Er,Jt,Zt,et.config.simpleTable,Nr,zt,Vt]),Xr=react.exports.useRef(null),Jr=react.exports.useCallback(()=>{const Eo=Math.max(1,wn),Do=nextRowSize[ct.rowSize];return Wt.createElement("div",{style:{height:"100%",width:"100%",display:"flex",padding:"2px 9px",justifyContent:"space-between"}},!et.config.simpleTable&&Wt.createElement("div",{style:{flex:"0 0 auto"}},Wt.createElement(TableIcon,{style:{padding:"4px 5px 0px"},name:rowSizeIconName[Do],onClick:()=>{Et(Do)}})),Wt.createElement("div",{style:{flex:"1 0 auto",display:"flex",justifyContent:"center"}},Wt.createElement("div",{style:{flex:"0 0 auto"}},Wt.createElement(TableIcon,{style:{padding:"4px 5px 0px"},name:"left-arrow",onClick:()=>{vt(0)}}),Wt.createElement(TableIcon,{style:{padding:"4px 5px 0px"},name:"chevron-left",onClick:()=>{vt(Ln-Eo)}}),Wt.createElement("input",{"data-test":"table-pagination-index-input",ref:Xr,style:{width:"50px",textAlign:"center"},placeholder:String(Ln+1),type:"number",onBlurCapture:bo=>{const Vo=Xr.current==null?Ln:Xr.current.value===""?0:parseInt(Xr.current.value,10);vt(Vo-1),Xr.current!=null&&(Xr.current.value="")},onKeyUpCapture:bo=>{bo.key==="Enter"&&Xr.current?.blur()}}),Wt.createElement("span",{style:{lineHeight:"20px"}},"\xA0-"," ",Ln+Eo-1+1," ","of"," ",gn.loading?"many":gn.result-0),Wt.createElement(TableIcon,{style:{padding:"4px 5px 0px"},name:"chevron-right",onClick:()=>{vt(Ln+Eo)}}),Wt.createElement(TableIcon,{style:{padding:"4px 5px 0px"},name:"right-arrow",onClick:()=>{vt(gn.result-Eo)}}))),!et.config.simpleTable&&Wt.createElement("div",{style:{flex:"0 0 auto"}},Wt.createElement(TableActionText,{onClick:()=>{Ar()}},"Export as CSV"),Wt.createElement(Modal$3,{className:"small",trigger:Wt.createElement(TableActionText,{"data-test":"select-columns",onClick:()=>{recordEvent("SELECT_COLUMNS"),ht(!0)}},"Columns..."),open:pt,onClose:()=>ht(!1)},Wt.createElement(Modal$3.Content,null,Wt.createElement(ColumnSelector,{inputNode:et.input,tableState:mt,update:Ot})),Wt.createElement(Modal$3.Actions,null,Wt.createElement(Button$3,{"data-test":"close-column-select",primary:!0,onClick:()=>ht(!1)},"Close"))),Wt.createElement(TableActionText,{"data-test":"auto-columns",onClick:()=>{recordEvent("RESET_TABLE"),Rt()}},"Reset Table")))},[et.input,wn,ct.rowSize,et.config.simpleTable,Ln,gn.loading,gn.result,pt,mt,Ot,Et,vt,Ar,ht,Rt]),So=react.exports.useRef(null),va=react.exports.useCallback(Eo=>{Eo.key==="Shift"&&Ir(!0)},[Ir]),$o=react.exports.useCallback(Eo=>{Eo.key==="Shift"&&Ir(!1)},[]);react.exports.useEffect(()=>(window.addEventListener("keydown",va),window.addEventListener("keyup",$o),()=>{window.removeEventListener("keydown",va),window.removeEventListener("keyup",$o)}));const Qr=react.exports.useCallback(({column:Eo,width:Do})=>{et.config.simpleTable||(Nr?Ct(Do):At(Eo.colId,Do))},[et.config.simpleTable,Nr,Ct,At]),jo=react.exports.useCallback(Eo=>(mt.preFilterFunction!==Eo&&recordEvent("UPDATE_FILTER_EXPRESSION"),kt(!1),Tt(updatePreFilter(mt,Eo))),[mt,kt,Tt]),Bo=react.exports.useMemo(()=>getRowFrame(nt),[nt]),ss=react.exports.useMemo(()=>TableActions(tt,mt.preFilterFunction,jo),[tt,mt.preFilterFunction,jo]),Us=Wt.createElement(BaseTable,{ignoreFunctionInColumnCompare:!1,ref:So,onColumnResizeEnd:Qr,fixed:!0,width:ut,height:st,columns:ao,data:Bn,frozenData:jn,rowProps:({rowIndex:Eo})=>({"data-test-row-index":Eo}),rowHeight:En,headerHeight,footerRenderer:Jr,footerHeight});return Wt.createElement(GrowToParent,{"data-test-weave-id":"table","data-test-row-count":Bn.length},It&&Wt.createElement(PanelContextProvider,{newVars:Bo},Wt.createElement(ControlFilter,{filterFunction:mt.preFilterFunction,setFilterFunction:jo})),Bn.length===0&&Wt.createElement("div",{style:{textAlign:"center",position:"absolute",width:"100%",height:`${st-footerHeight-headerHeight-En*jn.length}px`,overflow:"auto",top:`${headerHeight+En*jn.length}px`,zIndex:8,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"stretch"}},Wt.createElement("div",{style:{flex:"0 0 auto",paddingBottom:"8px",color:MOON_500}},"No rows to display"),mt.preFilterFunction?.nodeType==="output"&&Wt.createElement("div",{style:{flex:"0 0 auto"}},Wt.createElement(Link,{onClick:()=>{Tt(updatePreFilter(mt,voidNode()))}},"Clear filters"))),et.config.simpleTable?Us:Wt.createElement(WeaveActionContextProvider,{newActions:ss},Us))},IndexCell=et=>{const{frame:tt}=usePanelContext(),nt=useWeaveContext();if(et.runNode!=null&&(tt.runColors==null||isVoidNode(tt.runColors)))throw new Error("IndexCell got unusable runColors in frame but runNode is non-null");const rt=et.runNode!=null?opPick({obj:tt.runColors,key:opRunId({run:nt.callFunction(et.runNode,{row:et.rowNode})})}):constString("inherit"),ot=et.runNode!=null?opRunName({run:nt.callFunction(et.runNode,{row:et.rowNode})}):constString(""),st=useNodeValue(rt),ut=useNodeValue(ot),ct=useNodeValue(opGetIndexCheckpointTag({obj:et.rowNode}));return ct.loading?Wt.createElement(IndexColumnVal,null):Wt.createElement(IndexColumnVal,{onClick:()=>{et.simpleTable||et.setRowAsPinned(ct.result)}},Wt.createElement(IndexColumnText,{style:{color:st.loading?"inherit":st.result,...ct.result!=null&&ct.result===et.activeRowIndex?{fontWeight:"bold",backgroundColor:"#d4d4d4"}:{}}},et.simpleTable?Wt.createElement("span",null,ct.result+1):Wt.createElement(Popup$1,{popperModifiers:{preventOverflow:{boundariesElement:"offsetParent"}},position:"top center",popperDependencies:[ct.result,ut.result],content:ut.result??"",trigger:Wt.createElement("span",null,ct.result+1)})))},ActionCell$1=et=>{const[tt,nt]=react.exports.useState(!1),rt=react.exports.useMemo(()=>et.items.map((ot,st)=>({...ot,onClick:()=>{ot.onClick(et.rowNode,et.rowIndex)}})),[et.items,et.rowIndex,et.rowNode]);return Wt.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},onMouseOver:()=>nt(!0),onMouseLeave:()=>nt(!1)},Wt.createElement("div",{style:{cursor:"pointer",flex:"0 0 auto"}},Wt.createElement(Popup$1,{basic:!0,hoverable:!0,style:{padding:0},on:"click",position:"bottom left",trigger:Wt.createElement("div",null,tt&&Wt.createElement(Icon$4,{name:"ellipsis horizontal",size:"small"})),content:Wt.createElement(Menu$4,{compact:!0,size:"small",items:rt,secondary:!0,vertical:!0})})))},downloadCSV=async(et,tt,nt)=>{const rt=makeCsvFriendlyTableState(tt),ot=applyTableStateToRowsNode(et,rt,nt),st=await nt.client.query(ot);saveTableAsCSV({cols:st?.length>0?Object.keys(st[0]):[],data:st})},makeCsvFriendlyTableState=et=>{const tt=nullableOneOrMany(union$2(["number","string","boolean","id","date",{type:"timestamp",unit:"ms"}])),nt=nullableOneOrMany(union$2([{type:"file"}])),rt=Object.keys(et.columns);for(const ot of rt){const st=et.columnSelectFunctions[ot];isAssignableTo(st.type,"none")||(isAssignableTo(st.type,nt)?et=updateColumnSelect(et,ot,opFilePath({file:st})):isAssignableTo(st.type,mediaAssetArgTypes.asset)?et=updateColumnSelect(et,ot,opFilePath({file:opAssetFile({asset:st})})):isAssignableTo(st.type,tt)||(et=removeColumn(et,ot)))}return et},applyTableStateToRowsNode=(et,tt,nt)=>{const rt=[...tt.groupBy,...tt.order.filter(ot=>tt.groupBy.indexOf(ot)===-1)];return opMap({arr:et,mapFn:constFunction({row:opIndex({arr:et,index:constNumber(0)}).type},({row:ot})=>opDict(_$2.fromPairs(_$2.map(rt,st=>{const ut=escapeDots(getTableColumnName(tt.columnNames,tt.columnSelectFunctions,st,nt.client.opStore));let ct;return tt.groupBy.indexOf(st)>-1?ct=opPick({obj:opGroupGroupKey({obj:ot}),key:constString(ut)}):ct=getCellValueNode(nt,ot,tt.columnSelectFunctions[st]),[ut,ct]}))))})},TableSpec={id:"table",initialize:async(et,tt,nt)=>{if(tt.nodeType==="void")throw new Error("Table input node is null");const rt=await et.refineNode(normalizeTableLike(tt),nt);return getTableConfig(rt,void 0,et)},Component:PanelTable,inputType:inputType$F,equivalentTransform:async(et,tt,nt,rt)=>{const ot=new WeaveApp(rt),st=await nt(normalizeTableLike(et)),ct=getTableConfig(st,tt,ot).tableState,ft=getRowsNode(ct.preFilterFunction,ct.groupBy,ct.columnSelectFunctions,ct.columnNames,ct.order,ct.sort,st,ot);return applyTableStateToRowsNode(ft,ct,ot)}};registerPanelFunction(TableSpec.id,TableSpec.inputType,TableSpec.equivalentTransform);const useCopiedVariableName=(et,tt,nt)=>{const{frame:rt}=usePanelContext();nt||(nt=`input_${Object.keys(rt).length}`);const ot=react.exports.useMemo(()=>_$2.filter(expressionVariables(et),ut=>ut.varName===tt).length>0,[et,tt]);return{newExpr:react.exports.useMemo(()=>{if(ot){const ut=_$2.cloneDeep(et);return _$2.filter(expressionVariables(ut),ct=>ct.varName===tt).map(ct=>ct.varName=nt),ut}return et},[et,ot,nt,tt]),newFrame:ot?{[nt]:rt[tt]}:{}}},useNewPanelFromRootQueryCallback=()=>{const et=useRefreshAllNodes(),{stack:tt,triggerExpressionEvent:nt}=usePanelContext(),{client:rt}=useClientContext();return react.exports.useCallback(async(st,ut,ct,ft)=>{if(rt){const pt=opGet({uri:constString(`local-artifact:///${st}:latest/obj`)}),ht=dereferenceAllVars(pt,tt).node,{rootArgs:mt,mutationStyle:yt,rootType:vt}=absoluteTargetMutation(ht),Tt=makeMutation(pt,"set",et,tt,nt,ht,yt,mt,vt,rt,ft);let Et=ensureSimpleDashboard;ct&&(Et=ensureDashboard);const xt=Et(ut);await Tt({val:constNodeUnsafe(toWeaveType(xt),xt)}),ft&&ft(pt)}},[rt,et,tt,nt])},useNewDashFromItems=()=>{const et=useRefreshAllNodes(),{stack:tt,triggerExpressionEvent:nt}=usePanelContext(),{client:rt}=useClientContext();return react.exports.useCallback(async(st,ut,ct,ft)=>{if(rt){const pt=opGet({uri:constString(`local-artifact:///${st}:latest/obj`)}),ht=dereferenceAllVars(pt,tt).node,{rootArgs:mt,mutationStyle:yt,rootType:vt}=absoluteTargetMutation(ht),Tt=makeMutation(pt,"set",et,tt,nt,ht,yt,mt,vt,rt,ft),Et=ensureDashboardFromItems(ut,ct);await Tt({val:constNodeUnsafe(toWeaveType(Et),Et)}),ft&&ft(pt)}},[rt,et,tt,nt])},ensureStringNode=et=>typeof et=="string"?constString(et):et,opStringConcat=(...et)=>{let tt=ensureStringNode(et[0]);for(let nt=1;nt<et.length;nt++)tt=opStringAdd({lhs:tt,rhs:ensureStringNode(et[nt])});return tt},opFilterArtifactsToWeaveObjects=(et,tt=!1)=>opFilter({arr:et,filterFn:constFunction({row:"artifact"},({row:nt})=>opBooleanEqual({lhs:opPick({obj:opArtifactVersionMetadata({artifactVersion:opArtifactMembershipArtifactVersion({artifactMembership:opArtifactMembershipForAlias({artifact:nt,aliasName:constString("latest")})})}),key:constString("_weave_meta.is_panel")}),rhs:constBoolean(tt)}))}),opLatestLocalArtifacts=()=>opMap({arr:callOpVeryUnsafe("op-local_artifacts",{},{type:"list",objectType:{type:"FilesystemArtifact"}}),mapFn:constFunction({row:{type:"FilesystemArtifact"}},({row:et})=>callOpVeryUnsafe("FilesystemArtifact-getLatestVersion",{artifact:et},{type:"FilesystemArtifact"}))}),opFilterFilesystemArtifactsToWeaveObjects=(et,tt=!1)=>opFilter({arr:et,filterFn:constFunction({row:"FilesystemArtifact"},({row:nt})=>{const rt=callOpVeryUnsafe("FilesystemArtifact-metadata",{self:nt},{type:"typedDict",propertyTypes:{}}),ot=opBooleanEqual({lhs:opPick({obj:rt,key:constString("_weave_meta.is_weave_obj")}),rhs:constBoolean(!0)}),st=opBooleanEqual({lhs:opPick({obj:rt,key:constString("_weave_meta.is_panel")}),rhs:constBoolean(tt)});return opAnd({lhs:ot,rhs:st})})}),getLocalArtifactDataNode=et=>opFilterFilesystemArtifactsToWeaveObjects(opLatestLocalArtifacts(),et),opObjectsToName=et=>opMap({arr:et,mapFn:constFunction({row:{type:"FilesystemArtifact"}},({row:tt})=>{const nt=callOpVeryUnsafe("FilesystemArtifact-artifactName",{artifact:tt},"string"),rt=callOpVeryUnsafe("FilesystemArtifact-artifactVersion",{artifact:tt},"string");return opStringConcat(nt,":",rt)})}),opObjectNameToURI=et=>opStringConcat("local-artifact:///",et,"/obj"),getLocalArtifactDataTableState=(et,tt,nt)=>{let rt=emptyTable();const ot=getRowExampleNode(rt.preFilterFunction,rt.groupBy,rt.columnSelectFunctions,rt.columnNames,rt.order,rt.sort,et,nt),st=varNode(ot.type,"row");return rt=addNamedColumnToTable(rt,tt,st,{panelID:"weavelink",panelConfig:{to:opGet({uri:varNode("string","uri_str")}),vars:{uri_str:opObjectNameToURI(varNode(ot.type,"input"))}}}),rt},makeTableState$2=(et,tt)=>{let nt=emptyTable();const rt=getRowExampleNode(nt.preFilterFunction,nt.groupBy,nt.columnSelectFunctions,nt.columnNames,nt.order,nt.sort,constNode(list$1("string"),[]),et),ot=varNode(rt.type,"row");return nt=addNamedColumnToTable(nt,"Dashboard Name",ot,{panelID:"weavelink",panelConfig:{to:opGet({uri:varNode("string","uri_str")}),vars:{uri_str:opStringConcat("wandb-artifact:///",opEntityName({entity:opProjectEntity({project:tt})}),"/",opProjectName({project:tt}),"/",varNode("string","input"),":latest","/obj")}}}),nt},artifactsNodeToDisplayNameNode=et=>opMap({arr:et,mapFn:constFunction({row:"artifact"},({row:tt})=>opArtifactName({artifact:tt}))}),getDataNode$1=et=>{const tt=opFilterArtifactsToWeaveObjects(opProjectArtifacts({project:et}),!0);return artifactsNodeToDisplayNameNode(tt)},ProjectDashboardsTable=et=>{const tt=useWeaveContext(),{newExpr:nt,newFrame:rt}=useCopiedVariableName(et.input,"input"),ot=react.exports.useMemo(()=>getDataNode$1(nt),[nt]),st=react.exports.useMemo(()=>makeTableState$2(tt,nt),[nt,tt]),ut=useConfigChild("tableConfig",et.config,et.updateConfig,react.exports.useMemo(()=>({simpleTable:!0,tableState:st}),[st]));return Wt.createElement(PanelContextProvider,{newVars:rt},Wt.createElement(PanelTable,{input:ot,config:ut.config,updateConfig:ut.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput}))},PANEL_CARD_DEFAULT_CONFIG={title:voidNode(),subtitle:"",content:[{name:"first tab",content:void 0}]},inputType$E="invalid",Card=styled$1.div`
  display: flex;
  height: 100%;
`,CardHeader=styled$1.div`
  min-width: 200px;
  padding: 16px;
  border-right: 1px solid ${border$1};
`,CardTitle=styled$1.div`
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 16px;
`,CardSubtitle=styled$1.div`
  font-size: 16px;
  font-weight: normal;
`,CardTabs=styled$1.div``,CardTab=styled$1.div`
  cursor: pointer;
  margin-bottom: 4px;
  text-align: left;
  ${et=>et.active&&Ce`
      color: ${primary};
      border-right: 2px solid ${primary};
      margin-right: -16px;
    `}
`,CardContent=styled$1.div`
  overflow: auto;
  flex-grow: 1;
  padding: 16px;
`,PanelCardConfigEditor=et=>{const tt=et.config??PANEL_CARD_DEFAULT_CONFIG,{updateConfig:nt}=et;return Wt.createElement(ConfigOption,{label:"Title"},Wt.createElement(ExpressionConfigField,{expr:tt.title,setExpression:rt=>nt({...tt,title:rt})}))},PanelCard=et=>{const tt=et.config??PANEL_CARD_DEFAULT_CONFIG,{updateConfig:nt}=et,rt=tt.content[0],[ot,st]=react.exports.useState(rt.name),ut=tt.content.findIndex(pt=>pt.name===ot),ct=useNodeValue(tt.title);if(ut===-1)throw new Error("invalid PanelCard configuration");const ft=tt.content[ut];return Wt.createElement(Card,{"data-test-weave-id":"Card"},Wt.createElement(CardHeader,null,Wt.createElement(CardTitle,null,ct.result,Wt.createElement(CardSubtitle,null,tt.subtitle)),Wt.createElement(CardTabs,null,tt.content.map(pt=>Wt.createElement(CardTab,{key:pt.name,active:ot===pt.name,onClick:()=>st(pt.name)},pt.name)))),Wt.createElement(CardContent,null,Wt.createElement(ChildPanel,{passthroughUpdate:!0,config:ft.content,updateConfig:pt=>nt(fn(tt,ht=>{ht.content[ut].content=pt})),updateInput:et.updateInput})))},Spec$G={hidden:!0,id:"Card",Component:PanelCard,ConfigComponent:PanelCardConfigEditor,inputType:inputType$E},useUniqueTypeNames$1=et=>{const tt=opUnique({arr:opArtifactTypeName({artifactType:opArtifactType({artifact:opFilterArtifactsToWeaveObjects(opProjectArtifacts({project:et}))})})});return useNodeValue(tt).result??[]},getDataNode=(et,tt)=>{const nt=opFilterArtifactsToWeaveObjects(opArtifactTypeArtifacts({artifactType:opProjectArtifactType({project:et,artifactType:constString(tt)})}));return artifactsNodeToDisplayNameNode(nt)},ProjectObjectsTable=et=>{const tt=useWeaveContext(),nt=useUniqueTypeNames$1(et.input),{newExpr:rt,newFrame:ot}=useCopiedVariableName(et.input,"input"),st=react.exports.useMemo(()=>makeTableState$2(tt,rt),[rt,tt]),ut=useNewPanelFromRootQueryCallback(),ct=react.exports.useCallback(pt=>{const ht=et.updateInput;ht!=null&&(et.isRoot?ut("dashboard-temp-view",pt,!1,yt=>{ht(yt)}):ht(pt))},[ut,et]),ft=useConfigChild("cardConfig",et.config,et.updateConfig,react.exports.useMemo(()=>({title:constString("Objects"),subtitle:"",content:nt.map(pt=>({name:pt,content:{vars:{},input_node:getDataNode(rt,pt),id:"table",config:{simpleTable:!0,tableState:st}}}))}),[rt,st,nt]));return nt.length===0?Wt.createElement(Wt.Fragment,null):Wt.createElement(PanelContextProvider,{newVars:ot},Wt.createElement(PanelCard,{input:voidNode(),config:ft.config,updateConfig:ft.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:ct}))},inputType$D="project",useProjectObjectsExist=()=>!0,useProjectDashboardsExist=()=>!0,usePanelById=et=>react.exports.useMemo(()=>PanelSpecs().find(tt=>tt.id===et),[et]),PanelProjectOverviewNew=et=>{const tt=useProjectObjectsExist(),nt=useProjectDashboardsExist(),rt=useConfigChild("dashboardsTab",et.config,et.updateConfig),ot=useConfigChild("objectsTab",et.config,et.updateConfig),st=useConfigChild("runsTab",et.config,et.updateConfig),ut=useConfigChild("runsTab",et.config,et.updateConfig),ct=react.exports.useMemo(()=>{const yt=[];return et.isRoot&&nt&&yt.push("Dashboards"),yt.push("Objects"),et.isRoot||(yt.push("Runs"),yt.push("Artifacts")),yt},[nt,tt,et.isRoot]),ft=usePanelById("ProjectRunsTable"),pt=react.exports.useMemo(()=>opProjectRuns({project:et.input}),[et.input]),ht=usePanelById("ProjectArtifactsTable"),mt=react.exports.useMemo(()=>opProjectArtifacts({project:et.input}),[et.input]);return Wt.createElement(LayoutTabs,{tabNames:ct,renderPanel:({id:yt})=>yt==="Dashboards"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(ProjectDashboardsTable,{input:et.input,config:rt.config,updateConfig:rt.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput})):yt==="Objects"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(ProjectObjectsTable,{input:et.input,config:ot.config,updateConfig:ot.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput,isRoot:et.isRoot})):yt==="Runs"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},ft&&Wt.createElement(PanelComp2,{input:pt,inputType:pt.type,panelSpec:ft,config:st.config,updateConfig:st.updateConfig,updateInput:et.updateInput,updateContext:et.updateContext,configMode:!1,context:et.context})):yt==="Artifacts"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},ht&&Wt.createElement(PanelComp2,{input:mt,inputType:mt.type,panelSpec:ht,config:ut.config,updateConfig:ut.updateConfig,updateInput:et.updateInput,updateContext:et.updateContext,configMode:!1,context:et.context})):Wt.createElement(Wt.Fragment,null)})},PanelProjectOverviewSimple=et=>{const tt=et.input,nt=opProjectName({project:tt}),rt=opProjectRuns({project:tt}),ot=opCount({arr:rt}),st=opProjectArtifacts({project:tt}),ut=opCount({arr:st});let ct=emptyTable();ct=appendEmptyColumn(ct);const ft=ct.order[ct.order.length-1];ct=updateColumnSelect(ct,ft,opRunJobtype({run:varNode("run","row")})),ct={...ct,groupBy:[ft]},ct=appendEmptyColumn(ct);const pt=ct.order[ct.order.length-1];ct=updateColumnSelect(ct,pt,opCount({arr:varNode({type:"list",objectType:"run"},"row")}));let ht=emptyTable();ht=appendEmptyColumn(ht);const mt=ht.order[ht.order.length-1];ht=updateColumnSelect(ht,mt,opArtifactTypeName({artifactType:opArtifactType({artifact:varNode("artifact","row")})})),ht={...ht,groupBy:[mt]},ht=appendEmptyColumn(ht);const yt=ht.order[ht.order.length-1];ht=updateColumnSelect(ht,yt,opCount({arr:varNode({type:"list",objectType:"artifact"},"row")}));const vt=useNodeValue(nt),Tt=useNodeValue(ot),Et=useNodeValue(ut);if(vt.loading||Tt.loading||Et.loading)return Wt.createElement("div",null,"-");const xt=varNode(et.input.type,"input");return Wt.createElement(Table,null,Wt.createElement(Row,null,Wt.createElement(Key$1,null,Wt.createElement(InputUpdateLink$1,{onClick:()=>et.updateInput?.(opProjectRuns({project:xt}))},"Runs")),Wt.createElement(Val,null,Wt.createElement(PanelNumber$1,{input:ot,context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(Row,null,Wt.createElement(Key$1,null,Wt.createElement(InputUpdateLink$1,{onClick:()=>et.updateInput?.(opProjectArtifacts({project:xt}))},"Artifacts")),Wt.createElement(Val,null,Wt.createElement(PanelNumber$1,{input:ut,context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))))},PanelProjectOverview=et=>useWeaveDashUiEnable()?Wt.createElement(PanelProjectOverviewNew,{...et}):Wt.createElement(PanelProjectOverviewSimple,{...et}),Spec$F={id:"project-overview",Component:PanelProjectOverview,inputType:inputType$D},inputType$C="any",PanelAnyObj=et=>{let tt=useNodeValue(et.input);return tt=useGatedValue(tt,()=>!tt.loading),tt.loading?Wt.createElement(Panel2Loader,null):Wt.createElement("pre",{style:{fontSize:10,lineHeight:1.3}},JSON.stringify(tt.result,void 0,2))},Spec$E={hidden:!0,id:"any-obj",Component:PanelAnyObj,inputType:inputType$C},inputType$B={type:"union",members:["none","number"]},PanelColor=et=>{const tt=useNodeValue(et.input),nt=color(linkHoverBlue).fade(.3),rt=tt.result==null?color("white"):nt.fade(1-tt.result);return Wt.createElement("div",{"data-test-weave-id":"Color",style:{width:"100%",height:"100%",overflowX:"hidden",overflowY:"auto",margin:"auto",textAlign:"center",wordBreak:"normal",display:"flex",flexDirection:"column",alignContent:"space-around",justifyContent:"space-around",alignItems:"center",backgroundColor:rt.rgb().string()}})},Spec$D={id:"Color",Component:PanelColor,inputType:inputType$B},PANEL_EACH_COLUMN_DEFAULT_CONFIG={layoutMode:"flow",render:varNode("any","column")},inputType$A={type:"list",objectType:{type:"typedDict",propertyTypes:{}}};styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  // align-items: flex-start;
  flex-wrap: wrap;
  align-content: flex-start;
`;styled$1.div`
  // flex-grow: 1;
  position: ${et=>et.position??"static"};
  top: ${et=>et.top!=null?et.top+"px":void 0};
  left: ${et=>et.left!=null?et.left+"px":void 0};
  width: ${et=>et.width!=null?et.width+"px":"50px"};
  height: ${et=>et.height!=null?et.height+"px":"50px"};
`;const usePbLayoutConfig$1=(et,tt,nt)=>{const rt=react.exports.useMemo(()=>getSectionConfig(et,(tt??PANEL_EACH_COLUMN_DEFAULT_CONFIG).pbLayoutConfig),[tt,et]),ot=react.exports.useCallback(st=>nt(ut=>{ut=ut??PANEL_EACH_COLUMN_DEFAULT_CONFIG;const ct=getSectionConfig(et,ut.pbLayoutConfig),ft=st(ct);return fn(ut,pt=>{pt.pbLayoutConfig=ft})}),[et,nt]);return{pbLayoutConfig:rt,updatePbLayoutConfig2:ot}},usePanelEachColumnCommon=et=>{const tt=useUpdateConfig2(et),nt=react.exports.useCallback(ot=>tt(st=>({...st,render:ot})),[tt]),rt=react.exports.useCallback(ot=>{tt(st=>{const ut=ot(st.render);return{...st,render:ut}})},[tt]);return react.exports.useMemo(()=>({updateChildPanelConfig:nt,updateChildPanelConfig2:rt,updateConfig2:tt}),[nt,rt,tt])},PanelEachColumnConfigComp=et=>{const tt=et.config??PANEL_EACH_COLUMN_DEFAULT_CONFIG,{updateChildPanelConfig:nt,updateChildPanelConfig2:rt}=usePanelEachColumnCommon(et),{dashboardConfigOptions:ot}=usePanelContext(),st=react.exports.useMemo(()=>({columnName:varNode("string","<string>"),column:opPick({obj:et.input,key:varNode("string","columnName")})}),[et.input]);return Wt.createElement(ConfigSection,{label:"Properties"},ot,Wt.createElement(VariableView,{newVars:st}),Wt.createElement(ChildConfigContainer,null,Wt.createElement(PanelContextProvider,{newVars:st},Wt.createElement(ChildPanelConfigComp,{pathEl:"render",config:tt.render,updateConfig:nt,updateConfig2:rt}))))},tableColumnTypes=et=>{if(!isListLike(et))throw new Error("Expected list type");const tt=listObjectType(et);if(!isTypedDictLike(tt))throw new Error("Expected typed dict type");return typedDictPropertyTypes(tt)},PanelEachColumn=et=>{const tt=et.config??PANEL_EACH_COLUMN_DEFAULT_CONFIG,{updateChildPanelConfig:nt,updateChildPanelConfig2:rt,updateConfig2:ot}=usePanelEachColumnCommon(et),st=react.exports.useMemo(()=>tableColumnTypes(et.input.type),[et.input.type]),ut=Object.keys(st),[ct,ft]=react.exports.useState(voidNode()),pt=react.exports.useMemo(()=>{const yt={};return ut.filter(vt=>vt.includes(ct.nodeType==="const"&&ct.type==="string"?ct.val:"")).forEach((vt,Tt)=>{const Et=constString(vt),xt=opPick({obj:et.input,key:Et});yt[vt]=Wt.createElement(PanelContextProvider,{newVars:{columnName:Et,column:xt}},Wt.createElement("div",{style:{display:"flex",flexDirection:"column",height:"100%"}},Wt.createElement("div",{style:{whiteSpace:"nowrap",textOverflow:"ellipsis"}},vt),Wt.createElement("div",{style:{flexGrow:1}},Wt.createElement(ChildPanel,{key:Tt,config:tt.render,updateConfig:nt,updateConfig2:rt}))))}),yt},[ut,ct,et.input,tt.render,nt,rt]),{pbLayoutConfig:ht,updatePbLayoutConfig2:mt}=usePbLayoutConfig$1(Object.keys(pt),tt,ot);return Wt.createElement("div",null,Wt.createElement(WeaveExpression,{expr:ct,setExpression:ft}),Wt.createElement(PBSection,{mode:"flow",config:ht,updateConfig2:mt,renderPanel:yt=>pt[yt.id]}))},Spec$C={id:"EachColumn",initialize:(et,tt)=>PANEL_EACH_COLUMN_DEFAULT_CONFIG,ConfigComponent:PanelEachColumnConfigComp,Component:PanelEachColumn,inputType:inputType$A,hidden:!0},PANEL_FACET_TABS_DEFAULT_CONFIG={tab:voidNode(),panel:{id:"Auto",input_node:varNode({type:"list",objectType:"any"},"item"),config:void 0,vars:{}}},inputType$z={type:"list",objectType:"any"},usePanelFacetTabsCommon=et=>{const tt=et.config??PANEL_FACET_TABS_DEFAULT_CONFIG,nt=react.exports.useMemo(()=>(console.log("LIST OBJECT TYPE",et.input.type),listObjectType(et.input.type)),[et.input.type]),rt=useUpdateConfig2(et),ot=react.exports.useCallback(ct=>rt(ft=>(ft=ft??PANEL_FACET_TABS_DEFAULT_CONFIG,{...ft,tab:ct})),[rt]),st=react.exports.useCallback(ct=>rt(ft=>(ft=ft??PANEL_FACET_TABS_DEFAULT_CONFIG,{...ft,panel:ct})),[rt]),ut=react.exports.useCallback(ct=>{rt(ft=>{ft=ft??PANEL_FACET_TABS_DEFAULT_CONFIG;const pt=ct(ft.panel);return{...ft,panel:pt}})},[rt]);return react.exports.useMemo(()=>({itemType:nt,config:tt,updateConfig2:rt,updateTabExpr:ot,updateChildPanelConfig:st,updateChildPanelConfig2:ut}),[nt,tt,rt,ot,st,ut])},PanelFacetTabsConfigComp=et=>{const{config:tt,updateChildPanelConfig:nt,updateChildPanelConfig2:rt,updateTabExpr:ot,itemType:st}=usePanelFacetTabsCommon(et),{dashboardConfigOptions:ut}=usePanelContext(),ct=react.exports.useMemo(()=>({row:varNode(st,"row")}),[st]),ft=react.exports.useMemo(()=>({item:varNode(et.input.type,"item")}),[et.input.type]);return Wt.createElement(ConfigSection,{label:"Properties"},ut,Wt.createElement(ConfigOption,{label:"tab"},Wt.createElement(PanelContextProvider,{newVars:ct},Wt.createElement(ExpressionConfigField,{expr:tt.tab,setExpression:ot}))),Wt.createElement(ChildConfigContainer,null,Wt.createElement(PanelContextProvider,{newVars:ft},Wt.createElement(ChildPanelConfigComp,{pathEl:"panel",config:tt.panel,updateConfig:nt,updateConfig2:rt}))))},PanelFacetTabs=et=>{const{config:tt,itemType:nt}=usePanelFacetTabsCommon(et),rt=react.exports.useMemo(()=>opGroupby({arr:et.input,groupByFn:constFunction({row:nt,index:"number"},({row:pt,index:ht})=>tt.tab.nodeType==="void"?ht:tt.tab)}),[tt.tab,nt,et.input]),ot=useEach(rt),st=react.exports.useMemo(()=>opGroupGroupKey({obj:rt}),[rt]),[ut,ct]=react.exports.useState(0),ft=react.exports.useMemo(()=>({item:ot.result[ut]??voidNode()}),[ut,ot.result]);return Wt.createElement("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},Wt.createElement("div",null,Wt.createElement(Tabs,{input:st,activeIndex:ut,setActiveIndex:ct})),Wt.createElement("div",{style:{flexGrow:1}},Wt.createElement(PanelContextProvider,{newVars:ft},Wt.createElement(ChildPanel,{config:tt.panel,updateConfig:()=>console.log("Tab child updateConfig not implemented"),updateConfig2:()=>console.log("Tab child updateConfig2 not implemented")}))))},Spec$B={id:"FacetTabs",ConfigComponent:PanelFacetTabsConfigComp,Component:PanelFacetTabs,inputType:inputType$z,hidden:!0},inputType$y={type:"function",inputTypes:{},outputType:"any"},PanelFunctionEditor=et=>{const tt=et.input,nt=useNodeValue(tt),rt=nt.loading?constFunction({},()=>voidNode()):nt.result,ot=useMutation(tt,"set");if(!isFunctionLiteral(rt))throw new Error("Expected function literal");const st=rt.type.inputTypes,ut=react.exports.useCallback(ft=>{console.log("SET VAL NEW VAL",ft),ot({val:constNodeUnsafe("any",constNodeUnsafe({type:"function",inputTypes:st,outputType:ft.type},ft))})},[ot,st]),ct=react.exports.useMemo(()=>lodash$2.exports.mapValues(st,(ft,pt)=>varNode(ft,pt)),[st]);return nt.loading?Wt.createElement("div",null,"Loading..."):Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(PanelContextProvider,{newVars:ct},Wt.createElement(WeaveExpression,{expr:rt.val,setExpression:ut,noBox:!0})))},Spec$A={hidden:!0,id:"FunctionEditor",Component:PanelFunctionEditor,inputType:inputType$y},inputType$x={type:"gpt3_fine_tune_type"},KeyValTable$2=styled$1.div``,KeyValTableRow$1=styled$1.div`
  display: flex;
  align-items: flex-start;
`,KeyValTableKey$1=styled$1.div`
  color: ${gray500};
  width: 100px;
`,KeyValTableVal$1=styled$1.div`
  flex-grow: 1;
`,PanelGpt3Model=et=>{const[tt,nt]=react.exports.useState(et.config?.inputString??""),rt=react.exports.useMemo(()=>et.config?.inputString==null?voidNode():callOpVeryUnsafe("pick",{obj:callOpVeryUnsafe("index",{arr:callOpVeryUnsafe("pick",{obj:callOpVeryUnsafe("gpt3model-complete",{self:callOpVeryUnsafe("gpt3finetune-model",{self:et.input}),prompt:constString(et.config?.inputString)}),key:constString("choices")}),index:constNumber(0)}),key:constString("text")}),[et.config,et.input]),ot=useNodeValue(rt);return Wt.createElement(KeyValTable$2,null,Wt.createElement(KeyValTableRow$1,{style:{display:"flex",alignItems:"center"}},Wt.createElement(KeyValTableKey$1,{style:{marginBottom:6,marginRight:6}},"Prompt"),Wt.createElement(KeyValTableVal$1,null,Wt.createElement(Input$3,{value:tt,onChange:st=>nt(st.target.value),onKeyDown:st=>{st.key==="Enter"&&et.updateConfig({inputString:tt})}}))),Wt.createElement(KeyValTableRow$1,{style:{display:"flex",alignItems:"center"}},Wt.createElement(KeyValTableKey$1,{style:{marginTop:18,marginBottom:6}},"Completion"),Wt.createElement(KeyValTableVal$1,null,ot.loading?"loading...":ot.result)))},Spec$z={id:"openai-gpt3-finetune-result",Component:PanelGpt3Model,inputType:inputType$x},PANEL_LABELED_ITEM_DEFAULT_CONFIG={label:""},inputType$w="invalid",LabeledItem=styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
`,LabeledItemLabel=styled$1.div`
  text-transform: uppercase;
  font-size: 14px;
  color: ${textSecondary};
`,LabeledItemContent=styled$1.div`
  & div {
    // align-items: flex-start !important;
    // text-align: left !important;
  }
  flex-grow: 1;
  width: 100%;
  ${et=>et.height&&Ce`
      height: ${et.height}px;
    `}
`,PanelLabeledItemConfigComponent=et=>{const tt=et.config??PANEL_LABELED_ITEM_DEFAULT_CONFIG,{updateConfig:nt}=et,rt=react.exports.useCallback(pt=>nt({...tt,item:pt}),[tt,nt]),{path:ot,selectedPath:st,dashboardConfigOptions:ut}=usePanelContext(),ct=ot.join("."),ft=st?.join(".")??"";return ct===ft?Wt.createElement(ConfigSection,{label:"Properties"},ut,Wt.createElement(ConfigOption,{label:"Label"},Wt.createElement(TextInputConfigField,{dataTest:"label",value:tt.label??"",label:"",onChange:(pt,{value:ht})=>{nt({label:ht})}}))):Wt.createElement(ChildPanelConfigComp,{pathEl:"item",config:tt.item,updateConfig:rt})},PanelLabeledItem=et=>{const tt=et.config??PANEL_LABELED_ITEM_DEFAULT_CONFIG,{updateConfig:nt}=et,rt=react.exports.useCallback(ot=>nt({...tt,item:ot}),[tt,nt]);return Wt.createElement(LabeledItem,null,Wt.createElement(LabeledItemLabel,null,tt.label),Wt.createElement(LabeledItemContent,{height:tt.height},Wt.createElement(ChildPanel,{pathEl:"item",config:tt.item,updateConfig:rt})))},Spec$y={hidden:!0,id:"LabeledItem",ConfigComponent:PanelLabeledItemConfigComponent,Component:PanelLabeledItem,inputType:inputType$w},PANEL_EACH_DEFAULT_CONFIG={pbConfig:getSectionConfig([],void 0),panel:{id:"Auto",input_node:varNode("any","item"),config:void 0,vars:{}}},inputType$v={type:"list",objectType:"any"},usePbLayoutConfig=(et,tt,nt)=>{const rt=react.exports.useMemo(()=>getSectionConfig(et,tt?.pbConfig),[tt,et]),ot=react.exports.useCallback(st=>nt(ut=>{const ct=getSectionConfig(et,ut.pbConfig),ft=st(ct);return{...ut,pbConfig:ft}}),[et,nt]);return{pbLayoutConfig:rt,updatePbLayoutConfig2:ot}},usePanelEachCommon=et=>{et={...et,config:et.config==null?PANEL_EACH_DEFAULT_CONFIG:et.config};const tt=useChildPanelProps(et,"panel");return react.exports.useMemo(()=>({childPanelPanelProps:tt}),[tt])},PanelEachConfigComp=et=>{const{childPanelPanelProps:tt}=usePanelEachCommon(et),{dashboardConfigOptions:nt}=usePanelContext(),rt=opIndex({arr:et.input,index:varNode("number","itemIndex")}),ot=react.exports.useMemo(()=>({item:rt}),[rt]);return Wt.createElement(ConfigSection,{label:"Properties"},nt,Wt.createElement(ChildConfigContainer,null,Wt.createElement(PanelContextProvider,{newVars:ot},Wt.createElement(ChildPanelConfigComp,{...tt}))))},PanelEachItem=et=>{const{childPanelPanelProps:tt}=usePanelEachCommon(et),{itemIndex:nt}=et,rt=opIndex({arr:et.input,index:constNumber(nt)}),ot=react.exports.useMemo(()=>({item:rt}),[rt]);return Wt.createElement(PanelContextProvider,{newVars:ot},Wt.createElement(ChildPanel,{...tt,passthroughUpdate:!0,updateInput:et.updateInput}))},PanelEach=et=>{const{config:tt}=et,nt=useUpdateConfig2(et),rt=react.exports.useMemo(()=>opCount({arr:et.input}),[et.input]),st=useNodeValue(rt).result??10,ut=react.exports.useMemo(()=>[...Array(st).keys()].map(pt=>pt.toString()),[st]),{pbLayoutConfig:ct,updatePbLayoutConfig2:ft}=usePbLayoutConfig(ut,tt,nt);return Wt.createElement(PBSection,{mode:"flow",config:ct,updateConfig2:ft,renderPanel:pt=>Wt.createElement(PanelEachItem,{...et,itemIndex:parseInt(pt.id,10)})})},Spec$x={id:"Each",initialize:async(et,tt,nt)=>{const rt=opIndex({arr:tt,index:varNode("number","itemIndex")}),{id:ot,config:st}=await initPanel(et,rt,void 0,void 0,nt);return console.log("childPanelConfig",ot,st),{pbConfig:getSectionConfig([],void 0),panel:{id:ot,input_node:varNode("any","item"),config:st,vars:{}}}},ConfigComponent:PanelEachConfigComp,Component:PanelEach,inputType:inputType$v,hidden:!0},inputType$u={type:"pil_image"},PanelNewImage=et=>{const tt=callOpVeryUnsafe("pil_image-image_bytes",{self:et.input}),nt=useNodeValue(tt);if(nt.loading)return Wt.createElement(Panel2Loader,null);const rt=nt.result,ot=new Uint8Array(rt.length/2);for(let ut=0;ut<rt.length;ut+=2)ot[ut/2]=parseInt(rt.substring(ut,ut+2),16);const st=window.URL.createObjectURL(new Blob([ot],{type:"image/png"}));return Wt.createElement("div",{"data-test-weave-id":"pil-image",style:{display:"flex",justifyContent:"center",width:"100%",height:"100%"}},Wt.createElement("img",{style:{objectFit:"contain",width:"100%",height:"100%"},src:st,alt:"panel-im"}))},Spec$w={id:"pil-image",canFullscreen:!0,Component:PanelNewImage,inputType:inputType$u,defaultFixedSize:et=>({width:200,height:9/16*200})},inputType$t={type:"list",objectType:"any"},Picker=styled$1.div``,Item=styled$1.div`
  display: flex;
  align-items: center;
  cursor: pointer;
`,Label=styled$1.div`
  margin-right: 8px;
`,Value=styled$1.div`
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,MenuItem$1=styled$1.div`
  cursor: pointer;
  padding-left: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  &:hover {
    background-color: #eee;
  }
`,objValueType=et=>{let tt=listObjectType(et);return isTaggedValueLike(tt)&&(tt=taggedValueValueType(tt)),tt},PanelObjectPicker=et=>{const{config:tt,updateConfig:nt}=et,[rt,ot]=react.exports.useState(!1),st=react.exports.useMemo(()=>opLimit({arr:opOffset({arr:et.input,offset:constNumber(0)}),limit:constNumber(10)}),[et.input]),ut=useEach(st),ct=react.exports.useCallback(pt=>{nt({choice:pt})},[nt]);let ft=pt=>pt;return objValueType(et.input.type)==="run"&&(ft=pt=>isVoidNode(pt)?constString("-"):opRunName({run:pt})),Wt.createElement(Picker,null,Wt.createElement(Item,{onClick:()=>ot(!rt)},Wt.createElement(Icon$4,{onClick:pt=>console.log("bla"),size:"mini",name:`chevron ${rt?"down":"right"}`}),Wt.createElement(Label,null,et.config?.label,": "),Wt.createElement(Value,null,Wt.createElement(ChildPanel,{config:{vars:{},input_node:ft(tt?.choice??voidNode()),id:"",config:{}},updateConfig:pt=>console.warn("DROPPING CONFIG IN PANEL OBJECT PICKER")}))),rt&&Wt.createElement("div",null,ut.result.map(pt=>Wt.createElement(MenuItem$1,{onClick:()=>ct(pt)},Wt.createElement(ChildPanel,{config:{vars:{},input_node:ft(pt),id:"",config:void 0},updateConfig:ht=>console.warn("DROPPING CONFIG IN PANEL OBJECT PICKER")})))))},Spec$v={hidden:!0,id:"ObjectPicker",Component:PanelObjectPicker,inputType:inputType$t},OutlineItem=styled$1.div``,OutlineItemMenuButton=styled$1(IconButton$3).attrs({small:!0})`
  flex-shrink: 0;
  margin: 0 8px 0 4px;
`,OutlineItemTitle=styled$1.div`
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: ${et=>et.level*11+8}px;
  line-height: 130%;

  &:hover {
    background-color: ${GRAY_50};
  }
  ${et=>et.panelIsHovered&&Ce`
      background-color: ${GRAY_50};
    `}

  &:not(:hover) ${OutlineItemMenuButton} {
    visibility: hidden;
  }
`,OutlineItemToggle=styled$1.div`
  flex-shrink: 0;
  display: flex;
  width: 18px;
  margin-right: 4px;
  cursor: pointer;
  transform: rotate(${et=>et.expanded?0:-90}deg);

  color: ${GRAY_500};
  &:hover {
    color: ${GRAY_600};
    background-color: ${GRAY_50};
  }
`,OutlineItemIcon=styled$1.div`
  flex-shrink: 0;
  display: flex;
  margin-right: 8px;
`,OutlineItemName=styled$1.div`
  flex-shrink: 0;
  max-width: 100px;
  overflow-wrap: break-word;
`,OutlineItemPanelID=styled$1.div`
  color: ${GRAY_500};
  font-size: 15px;
  font-family: 'Inconsolata', monospace;
  margin-left: 10px;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,iconStyles$1=Ce`
  height: 18px;
  width: 18px;
`,IconCaret=styled$1(IconCaret$1)`
  ${iconStyles$1}
`,IconOverflowHorizontal=styled$1(IconOverflowHorizontal$1)`
  ${iconStyles$1}
`,IconWeave=styled$1(IconWeave$1)`
  ${iconStyles$1}
`,OutlinePanel=et=>{const{name:tt,localConfig:nt,selected:rt,setSelected:ot,path:st,config:ut,updateConfig:ct,updateConfig2:ft,level:pt=0,setInspectingRoot:ht}=et,mt=usePanelIsHoveredByPath(st),yt=useSetPanelIsHoveredInOutline(),vt=getPanelStacksForType(nt?.input_node?.type??"invalid",nt?.id).curPanelId,Tt=panelChildren(nt),[Et,xt]=react.exports.useState(!0),[At,Ct]=react.exports.useState(!1),$t=react.exports.useCallback(()=>{Tt!=null&&xt(Ot=>!Ot)},[Tt]);return Wt.createElement(OutlineItem,null,Wt.createElement(OutlineItemTitle,{level:pt,panelIsHovered:mt,onClick:()=>{lodash$2.exports.isEqual(st,[])?ht(!0):ot(st),yt(st,!1)},onMouseEnter:()=>{yt(st,!0)},onMouseLeave:()=>{yt(st,!1)}},Wt.createElement(OutlineItemToggle,{expanded:Et,onClick:Ot=>{Ot.stopPropagation(),$t()}},Tt!=null&&Wt.createElement(IconCaret,null)),Wt.createElement(OutlineItemIcon,null,Wt.createElement(IconWeave,null)),Wt.createElement(OutlineItemName,null,tt),Wt.createElement(OutlineItemPanelID,null,vt),st.length>0&&Wt.createElement(OutlineItemPopupMenu,{config:ut,localConfig:nt,path:st,updateConfig:ct,updateConfig2:ft,trigger:Wt.createElement(OutlineItemMenuButton,{onClick:Ot=>Ot.stopPropagation()},Wt.createElement(IconOverflowHorizontal,null)),isOpen:At,onOpen:()=>Ct(!0),onClose:()=>Ct(!1)})),Et&&Tt!=null&&lodash$2.exports.map(Tt,(Ot,Rt)=>Wt.createElement(OutlinePanel,{key:Rt,name:Rt,config:et.config,localConfig:Ot,updateConfig:et.updateConfig,updateConfig2:et.updateConfig2,selected:rt,setSelected:ot,path:[...st,Rt],level:pt+1,setInspectingRoot:ht})))},Outline=et=>Wt.createElement(OutlineContainer,null,Wt.createElement(OutlinePanel,{name:"root",config:et.config,updateConfig:et.updateConfig,updateConfig2:et.updateConfig2,localConfig:et.config,selected:et.selected,setSelected:et.setSelected,path:[],setInspectingRoot:et.setInspectingRoot})),OutlineContainer=styled$1.div`
  padding: 8px 0;
`,PanelRenderedConfigContext=Wt.createContext(null);PanelRenderedConfigContext.displayName="PanelRenderedConfigContext";const PanelRenderedConfigContextProvider=Wt.memo(({children:et})=>{const[tt,nt]=react.exports.useState({panelConfig:{}});return Wt.createElement(PanelRenderedConfigContext.Provider,{value:{state:tt,setState:nt}},et)});PanelRenderedConfigContextProvider.displayName="PanelRenderedConfigContextProvider";const usePanelRenderedConfigContext=()=>{const et=react.exports.useContext(PanelRenderedConfigContext);if(et==null)throw new Error("usePanelRenderedConfigContext must be used within a PanelInteractContextProvider");return et},useSetPanelRenderedConfigByPath=()=>{const{setState:et}=usePanelRenderedConfigContext();return react.exports.useCallback((tt,nt)=>{const rt=tt.join(".");et(ot=>({...ot,panelConfig:{...ot.panelConfig,[rt]:nt}}))},[et])},useSetPanelRenderedConfig=et=>{const tt=useSetPanelRenderedConfigByPath(),{path:nt}=usePanelContext();react.exports.useEffect(()=>{tt(nt,et)},[et,nt,tt])},Container$2=styled$1.div`
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
`,Header$1=styled$1.div`
  padding: 12px 0;
  border-bottom: 1px solid ${GRAY_350};
`,HeaderTop=styled$1.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 0 ${et=>et.lessLeftPad?8:12}px;
`,HeaderTopLeft=styled$1.div`
  display: flex;
  align-items: center;
  ${et=>et.canGoBack&&Ce`
      color: ${GRAY_500};
      cursor: pointer;
    `}
`,HeaderTopRight=styled$1.div`
  display: flex;
  align-items: center;
`,HeaderTopText=styled$1.div`
  font-weight: 600;
`,HeaderTitle=styled$1.div`
  font-family: 'Inconsolata', monospace;
  font-size: 18px;
  font-weight: 600;
  margin-top: 8px;
  padding: 0 12px;
`,Body=styled$1.div`
  flex-grow: 1;
  overflow-x: hidden;
  overflow-y: auto;
  ${SCROLLBAR_STYLES}
`,inputType$s={type:"Panel"},useUpdateConfigForPanelNode=(et,tt)=>{const nt=useWeaveContext(),rt=react.exports.useCallback(ut=>{nt.expToString(et)!==nt.expToString(ut)&&tt&&tt(ut)},[et,tt,nt]),ot=useMutation(et,"set",rt);return react.exports.useCallback(ut=>{const ct=fixChildData(getFullChildPanel(ut));ot({val:constNodeUnsafe(toWeaveType(ct),ct)})},[ot])},usePanelPanelCommon=et=>{const tt=useWeaveContext(),{updateInput:nt}=et,rt=useUpdateConfig2(et),ot=useNodeValue(et.input),st=useSelectedPath(),ut=useSetInspectingPanel(),ct=et.config,ft=ct==null,{stack:pt}=usePanelContext(),ht=rt;react.exports.useEffect(()=>{if(ft&&!ot.loading){(async()=>{const xt=getFullChildPanel(ot.result);ht(()=>xt)})();return}},[ft,ot.loading,ot.result,ht,pt,tt]),useSetPanelRenderedConfig(ct);const mt=useUpdateConfigForPanelNode(et.input,nt),yt=react.exports.useCallback(Tt=>{consoleLog("PANEL PANEL CONFIG UPDATE TYPE",toWeaveType(Tt)),ht(Et=>({...Et,...Tt})),mt(Tt)},[ht,mt]),vt=react.exports.useCallback(Tt=>{ht(Et=>{if(Et==null)throw new Error("Cannot update config before it is loaded");const xt=Tt(Et),At=fn(Et,Ct=>{for(const $t of Object.keys(xt))Ct[$t]=xt[$t]});return mt(At),At})},[ht,mt]);return{loading:ft,panelConfig:ct,selectedPanel:st,setSelectedPanel:ut,panelUpdateConfig:yt,panelUpdateConfig2:vt}},PanelPanelConfig=et=>{const{loading:tt,panelConfig:nt,selectedPanel:rt,setSelectedPanel:ot,panelUpdateConfig:st,panelUpdateConfig2:ut}=usePanelPanelCommon(et),ct=useCloseEditor(),{visible:ft,onScroll:pt,onMouseMove:ht}=useScrollbarVisibility(),[mt,yt]=react.exports.useState(!1),[vt,Tt]=react.exports.useState(!1),Et=react.exports.useMemo(()=>rt.filter(Ct=>Ct).length===0,[rt]),xt=react.exports.useMemo(()=>Et&&!mt,[Et,mt]),At=react.exports.useCallback(()=>{ot([""]),yt(!1)},[ot]);if(tt)return Wt.createElement(Panel2Loader,null);if(nt==null)throw new Error("Panel config is null after loading");return xt?Wt.createElement(Container$2,null,Wt.createElement(Header$1,null,Wt.createElement(HeaderTop,null,Wt.createElement(HeaderTopLeft,null,Wt.createElement(HeaderTopText,null,"Outline")),Wt.createElement(HeaderTopRight,null,Wt.createElement(IconButton$3,{onClick:ct},Wt.createElement(IconClose,null))))),Wt.createElement(Outline,{config:nt,updateConfig:st,updateConfig2:ut,setSelected:ot,selected:rt,setInspectingRoot:yt})):Wt.createElement(Container$2,null,Wt.createElement(Header$1,null,Wt.createElement(HeaderTop,{lessLeftPad:!0},Wt.createElement(HeaderTopLeft,{canGoBack:!0,onClick:At},Wt.createElement(IconButton$3,null,Wt.createElement(IconBack,null)),Wt.createElement(HeaderTopText,null,"Outline")),Wt.createElement(HeaderTopRight,null,!Et&&Wt.createElement(OutlineItemPopupMenu,{config:nt,localConfig:getConfigForPath(nt,rt),path:rt,updateConfig:st,updateConfig2:ut,goBackToOutline:At,trigger:Wt.createElement(IconButton$3,null,Wt.createElement(IconOverflowHorizontal$1,null)),isOpen:vt,onOpen:()=>Tt(!0),onClose:()=>Tt(!1)}),Wt.createElement(IconButton$3,{onClick:ct},Wt.createElement(IconClose,null)))),!Et&&Wt.createElement(HeaderTitle,null,_$2.last(rt))),Wt.createElement(Body,{scrollbarVisible:ft,onScroll:pt,onMouseMove:ht},Wt.createElement(PanelContextProvider,{newVars:{},selectedPath:rt},Wt.createElement(ChildPanelConfigComp,{config:nt,updateConfig:st,updateConfig2:ut}))))},PanelPanel=et=>{const{loading:tt,panelConfig:nt,panelUpdateConfig:rt,panelUpdateConfig2:ot}=usePanelPanelCommon(et);if(tt)return Wt.createElement(Panel2Loader,null);if(nt==null)throw new Error("Panel config is null after loading");return Wt.createElement("div",{style:{width:"100%",height:"100%",overflowX:"hidden",overflowY:"hidden",margin:"auto",display:"flex",flexDirection:"column",alignContent:"space-around",justifyContent:"space-around"}},Wt.createElement(PanelPanelContextProvider,{config:nt,updateConfig:rt,updateConfig2:ot},Wt.createElement(ChildPanel,{config:nt,updateConfig:rt,updateConfig2:ot})))},Spec$u={id:"panel",ConfigComponent:PanelPanelConfig,Component:PanelPanel,inputType:inputType$s},inputType$r={type:"Plotly"},Spec$t={id:"PanelPlotly",Component:Wt.lazy(()=>__vitePreload(()=>import("./Component.ada993b5.js"),[])),inputType:inputType$r},inputType$q={type:"list",objectType:{type:"union",members:["unknown","string","none"]}},PanelSelectEditorConfigComponent=et=>{const tt=et.config,nt=useUpdateConfig2(et),rt=react.exports.useCallback(ot=>{nt(st=>({...st,choices:ot}))},[nt]);return Wt.createElement(ConfigSection,{label:"Properties"},Wt.createElement(ConfigOption,{label:"choices"},Wt.createElement(ExpressionConfigField,{expr:tt.choices,setExpression:rt})))},PanelSelectEditor=et=>{const tt=et.config,nt=react.exports.useMemo(()=>tt.choices.nodeType==="void"?voidNode():opUnique({arr:tt.choices}),[tt.choices]),rt=useNodeValue(nt),ot=react.exports.useMemo(()=>rt.result??[],[rt]),st=et.input,ut=useNodeValue(st),ct=react.exports.useMemo(()=>ut.result??[],[ut]),ft=useMutation(st,"set"),pt=react.exports.useCallback(ht=>{if(ct.includes(ht)){let mt=ct.filter(yt=>yt!==ht);isNullable(listObjectType(tt.choices.type))&&(mt=mt.map(yt=>({_val:yt,_union_id:1}))),ft({val:constNodeUnsafe(tt.choices.type,mt)});return}else{let mt=[...ct,ht];isNullable(listObjectType(tt.choices.type))&&(mt=mt.map(yt=>({_val:yt,_union_id:1}))),ft({val:constNodeUnsafe(tt.choices.type,mt)});return}},[ct,tt.choices.type,ft]);return Wt.createElement("div",{style:{paddingLeft:16}},ot.map((ht,mt)=>Wt.createElement("div",{key:mt,style:{display:"flex",alignItems:"center"}},Wt.createElement(Checkbox$2,{checked:ct.includes(ht),onChange:yt=>pt(ht),style:{marginRight:8}}),ht)))},Spec$s={hidden:!0,initialize:()=>({choices:voidNode()}),id:"SelectEditor",ConfigComponent:PanelSelectEditorConfigComponent,Component:PanelSelectEditor,inputType:inputType$q},inputType$p={type:"list",objectType:"any"};function defaultPanelQuery(){let et=emptyTable();et=appendEmptyColumn(et);const tt=et.order[et.order.length-1],nt={[tt]:"text"};return et={...et,columnNames:nt},{tableState:et,pinnedRows:{},conditions:[],dims:{text:tt}}}const EDITOR_SPECS={SelectEditor:{panelId:Spec$s.id,initEditor(et){return{vars:{},id:Spec$s.id,input_node:constNodeUnsafe({type:"list",objectType:"string"},[]),config:{choices:et}}},toFilterClause(et,tt){if(tt.input_node.nodeType!=="const")throw new Error("SelectEditor requires const input");const nt=tt.input_node.val;if(nt.length===0)return voidNode();let rt=opStringEqual({lhs:et,rhs:constString(nt[0])});for(let ot=1;ot<nt.length;ot++)rt=opOr({lhs:rt,rhs:opStringEqual({lhs:et,rhs:constString(nt[ot])})});return rt}}},conditionEditorsForType=et=>isAssignableTo(et,list$1(maybe("string")))?[EDITOR_SPECS.SelectEditor]:[],toFilterExpression=(et,tt,nt)=>{const rt=nt.conditions.map(ot=>{const st=mapNodes(ot.expression,ct=>{if(ct.nodeType==="var"&&ct.varName==="queryInput")return varNode(listObjectType(tt.type),"row");if(ct.nodeType==="output"){const ft=et.client.opStore.getOpDef(ct.fromOp.name),pt=typeof ft.outputType=="function"?ft.outputType(ct.fromOp.inputs):ft.outputType;return{...ct,type:pt}}return ct}),ut=EDITOR_SPECS[ot.editor.id];return ut==null?voidNode():ut.toFilterClause(st,ot.editor)});return console.log("CLAUSES",rt),rt[0]??voidNode()},usePanelQueryConditionCommon=et=>{const{condition:tt,input:nt}=et,rt=useWeaveContext(),ot=useUpdateConfig2(et),st=react.exports.useMemo(()=>({queryInput:varNode(et.input.type,"input")}),[et.input.type]),ut=react.exports.useCallback(pt=>{ot(ht=>{const mt=[...ht.conditions];mt[et.index]={...ht.conditions[et.index],...pt};const yt={...ht,conditions:mt},vt=toFilterExpression(rt,nt,yt),Tt=updatePreFilter(yt.tableState,vt);return{...yt,tableState:Tt}})},[nt,et.index,ot,rt]),ct=react.exports.useCallback(async pt=>{ut({expression:pt});const ht=conditionEditorsForType(pt.type);if(console.log("UPDATE COND",pt,ht),ht.find(yt=>yt.panelId===tt.editor.id)==null)if(ht.length>0){const vt=ht[0].initEditor(pt);ut({editor:vt})}else ut({editor:{vars:{},input_node:voidNode(),id:"Expression",config:void 0}})},[tt.editor.id,ut]),ft=react.exports.useCallback(pt=>{ut({editor:pt})},[ut]);return react.exports.useMemo(()=>({newVars:st,condition:tt,updateConditionExpr:ct,updateEditorConfig:ft}),[tt,st,ct,ft])},PanelQueryConditionConfigComponent=et=>{const{newVars:tt,condition:nt,updateConditionExpr:rt,updateEditorConfig:ot}=usePanelQueryConditionCommon(et);return Wt.createElement(Wt.Fragment,null,Wt.createElement(PanelContextProvider,{newVars:tt},Wt.createElement(ConfigOption,{label:"expr"},Wt.createElement(ExpressionConfigField,{expr:nt.expression,setExpression:rt})),Wt.createElement(ChildConfigContainer,null,Wt.createElement(ChildPanelConfigComp,{config:nt.editor,updateConfig:ot}))))},PanelQueryConditionComponent=et=>{const{newVars:tt,condition:nt,updateEditorConfig:rt}=usePanelQueryConditionCommon(et);return console.log("CONDITION EDITOR",nt.editor),Wt.createElement("div",{style:{height:"100%"}},Wt.createElement(ExpressionView,{node:nt.expression}),Wt.createElement("div",{style:{maxHeight:300,overflow:"auto"}},Wt.createElement(PanelContextProvider,{newVars:tt},Wt.createElement(ChildPanel,{config:nt.editor,updateConfig:rt}))))},PanelQueryConfigComponent=et=>{const tt=useUpdateConfig2(et),nt=et.config,rt=react.exports.useCallback(()=>{tt(ot=>({...ot,conditions:[...ot.conditions,{expression:voidNode(),editor:{vars:{},input_node:voidNode(),id:"Expression",config:void 0}}]}))},[tt]);return Wt.createElement(ConfigSection,{label:"Conditions"},nt.conditions.map((ot,st)=>Wt.createElement(PanelQueryConditionConfigComponent,{key:st,...et,condition:ot,index:st})),Wt.createElement(Button$3,{size:"mini",onClick:rt},"Add Condition"))},PanelQuery=et=>{const tt=et.config;return Wt.createElement("div",{style:{height:"100%",paddingLeft:16,display:"flex",flexDirection:"column"}},tt.conditions.map((nt,rt)=>Wt.createElement(PanelQueryConditionComponent,{key:rt,...et,condition:nt,index:rt})))},Spec$r={hidden:!0,id:"Query",initialize:defaultPanelQuery,ConfigComponent:PanelQueryConfigComponent,Component:PanelQuery,inputType:inputType$p},inputType$o={type:"Ref",objectType:"any"},PanelRef=et=>{const tt=useNodeValue(et.input);if(tt.loading)return Wt.createElement(Panel2Loader,null);if(tt.result==null)return Wt.createElement("div",null,"-");const rt=new URL(tt.result).pathname.split("/"),ot=rt[rt.length-2];return Wt.createElement("div",{style:{width:"100%",height:"100%",overflowX:"hidden",overflowY:"auto",wordBreak:"normal",display:"flex",flexDirection:"column"}},ot)},Spec$q={id:"Ref",Component:PanelRef,inputType:inputType$o},inputType$n={type:"run-type",_output:"any"},PanelRun=et=>{const tt=react.exports.useRef(null),[nt,rt]=react.exports.useState("log");let ot=useValue(et.input);ot=useGatedValue(ot,()=>!ot.loading);const st=ot.refresh,ut=react.exports.useMemo(()=>{if(ot.loading||ot.result._state._val==="running")return voidNode();const ht=callOpVeryUnsafe("run-output",{self:et.input});return ht.type=et.input.type._output,ht},[ot.loading,ot.result,et.input]),{handler:ct}=usePanelStacksForType(et.input.type._output,void 0,{}),ft=react.exports.useCallback(()=>{tt.current!=null&&(console.log("on scroll",tt),tt.current.scrollTop=tt.current.scrollHeight)},[]);if(react.exports.useEffect(()=>{if(ft(),!ot.loading&&ot.result._state._val!=="finished"){const ht=setInterval(()=>st(),5e3);return()=>clearInterval(ht)}},[ft,ot.loading,ot.result,st]),ot.loading)return Wt.createElement(Panel2Loader,null);const pt=ot.result;return Wt.createElement("div",null,Wt.createElement("div",null,"State: ",pt._state._val),Wt.createElement("div",{style:{display:"flex",marginBottom:8}},Wt.createElement("div",{onClick:()=>rt("log"),style:{cursor:"pointer",marginRight:8,borderBottom:nt==="log"?"1px solid black":void 0}},"Log"),Wt.createElement("div",{onClick:()=>rt("output"),style:{cursor:"pointer",borderBottom:nt==="output"?"1px solid black":void 0}},"Output")),nt==="output"?ut.nodeType!=="void"&&ct!=null?Wt.createElement("div",null,ct.id,Wt.createElement("div",{style:{border:"1px solid #eee",padding:6},onScroll:ft},Wt.createElement(PanelComp2,{input:ut,inputType:ut.type,loading:!1,panelSpec:ct,configMode:!1,context:et.context,config:et.config?.panelConfig,updateConfig:ht=>et.updateConfig({panelConfig:ht}),updateContext:()=>{}}))):Wt.createElement("div",null,"No panel"):Wt.createElement("div",null,Wt.createElement("div",{ref:tt,style:{height:200,border:"1px solid #eee",overflow:"auto"}},pt._prints.map(ht=>Wt.createElement("div",{style:{fontFamily:"monospace",fontSize:12,lineHeight:1.4}},ht)))))},Spec$p={id:"run",Component:PanelRun,inputType:inputType$n},PANEL_SECTIONS_DEFAULT_CONFIG={section:voidNode(),panel:{id:"Auto",input_node:varNode({type:"list",objectType:"any"},"item"),config:void 0,vars:{}}},inputType$m={type:"list",objectType:"any"},usePanelSectionsCommon=et=>{const tt=et.config??PANEL_SECTIONS_DEFAULT_CONFIG,nt=react.exports.useMemo(()=>listObjectType(et.input.type),[et.input.type]),rt=useUpdateConfig2(et),ot=react.exports.useCallback(ct=>{rt(ft=>(ft=ft??PANEL_SECTIONS_DEFAULT_CONFIG,{...ft,section:ct}))},[rt]),st=react.exports.useCallback(ct=>rt(ft=>(ft=ft??PANEL_SECTIONS_DEFAULT_CONFIG,{...ft,panel:ct})),[rt]),ut=react.exports.useCallback(ct=>{rt(ft=>{ft=ft??PANEL_SECTIONS_DEFAULT_CONFIG;const pt=ct(ft.panel);return{...ft,panel:pt}})},[rt]);return react.exports.useMemo(()=>({itemType:nt,config:tt,updateConfig2:rt,updateSectionExpr:ot,updateChildPanelConfig:st,updateChildPanelConfig2:ut}),[nt,tt,rt,ot,st,ut])},PanelSectionsConfigComp=et=>{const{config:tt,updateChildPanelConfig:nt,updateChildPanelConfig2:rt,updateSectionExpr:ot,itemType:st}=usePanelSectionsCommon(et),{dashboardConfigOptions:ut}=usePanelContext(),ct=react.exports.useMemo(()=>({row:varNode(st,"row")}),[st]),ft=react.exports.useMemo(()=>({item:varNode(et.input.type,"item")}),[et.input.type]);return Wt.createElement(ConfigSection,{label:"Properties"},ut,Wt.createElement(ConfigOption,{label:"section"},Wt.createElement(PanelContextProvider,{newVars:ct},Wt.createElement(ExpressionConfigField,{expr:tt.section,setExpression:ot}))),Wt.createElement(ChildConfigContainer,null,Wt.createElement(PanelContextProvider,{newVars:ft},Wt.createElement(ChildPanelConfigComp,{pathEl:"panel",config:tt.panel,updateConfig:nt,updateConfig2:rt}))))},Section=et=>{const{input:tt,config:nt}=et,rt=react.exports.useMemo(()=>opGroupGroupKey({obj:tt}),[tt]),st=useNodeValue(rt).result??"",ut=react.exports.useMemo(()=>({item:tt}),[tt]);return Wt.createElement("div",{style:{display:"flex",flexDirection:"column",height:400}},Wt.createElement("div",{style:{whiteSpace:"nowrap",textOverflow:"ellipsis"}},st),Wt.createElement("div",{style:{flexGrow:1}},Wt.createElement(PanelContextProvider,{newVars:ut},Wt.createElement(ChildPanel,{config:nt.panel,updateConfig:()=>console.log("Section child updateConfig not implemented"),updateConfig2:()=>console.log("Section child updateConfig2 not implemented")}))))},PanelSections=et=>{const{config:tt,itemType:nt}=usePanelSectionsCommon(et),rt=react.exports.useMemo(()=>opGroupby({arr:et.input,groupByFn:constFunction({row:nt,index:"number"},({row:st,index:ut})=>tt.section.nodeType==="void"?ut:tt.section)}),[tt.section,nt,et.input]),ot=useEach(rt);return Wt.createElement("div",{style:{width:"100%",height:"100%"}},ot.result.map((st,ut)=>Wt.createElement(Section,{key:ut,input:st,config:tt})))},Spec$o={id:"Sections",ConfigComponent:PanelSectionsConfigComp,Component:PanelSections,inputType:inputType$m,hidden:!0},inputType$l="number",useConfig$1=et=>react.exports.useMemo(()=>et??{min:constNumber(0),max:constNumber(1),step:constNumber(.01)},[et]),PanelSliderConfig2=et=>{const{updateConfig:tt}=et,nt=useWeaveContext(),rt=useConfig$1(et.config),ot=react.exports.useCallback(st=>{tt({...rt,...st})},[rt,tt]);return Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(ConfigOption,{label:"min"},Wt.createElement(WeaveExpression,{expr:rt?.min??voidNode(),setExpression:st=>{!nt.typeIsAssignableTo(st.type,"number")||ot({min:st})},noBox:!0})),Wt.createElement(ConfigOption,{label:"max"},Wt.createElement(WeaveExpression,{expr:rt?.max??voidNode(),setExpression:st=>{!nt.typeIsAssignableTo(st.type,"number")||ot({max:st})},noBox:!0})),Wt.createElement(ConfigOption,{label:"step"},Wt.createElement(WeaveExpression,{expr:rt?.step??voidNode(),setExpression:st=>{!nt.typeIsAssignableTo(st.type,"number")||ot({step:st})},noBox:!0})))},PanelSlider=et=>{const tt=useConfig$1(et.config),nt=useNodeValue(tt.min??voidNode()).result??0,rt=useNodeValue(tt.max??voidNode()).result??1,ot=useNodeValue(tt.step??voidNode()).result??.01,st=et.input,ut=useNodeValue(st),ct=ut.result??0,ft=useMutation(st,"set"),pt=react.exports.useCallback(ht=>ft({val:constNumber(ht)}),[ft]);return Wt.createElement("div",{style:{width:"100%",height:"100%",overflowX:"hidden",overflowY:"auto",margin:"auto",textAlign:"center",wordBreak:"normal",display:"flex",flexDirection:"column",alignContent:"space-around",justifyContent:"space-around",alignItems:"center"}},Wt.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"}},Wt.createElement(SliderInput,{"data-test-weave-id":"slider",min:nt,max:rt,step:ot,value:ut.result,debounceTime:100,onChange:pt}),Wt.createElement("div",{style:{marginLeft:12}},ct.toFixed(2))))},Spec$n={id:"Slider",ConfigComponent:PanelSliderConfig2,Component:PanelSlider,inputType:inputType$l,hidden:!0},inputType$k="string",PanelStringEditor=et=>{const tt=et.input,nt=useNodeValue(tt),rt=useMutation(tt,"set"),ot=react.exports.useCallback(ct=>rt({val:constString(ct)}),[rt]),st=String(nt.result==null?"-":nt.result),ut=react.exports.useMemo(()=>st.includes(`
`),[st]);return nt.loading?Wt.createElement(Panel2Loader,null):Wt.createElement(StringContainer,null,Wt.createElement(StringItem,null,Wt.createElement(EditableField,{value:st,placeholder:"-",multiline:ut,save:ot})))},Spec$m={hidden:!1,id:"StringEditor",Component:PanelStringEditor,inputType:inputType$k},SECONDS_IN_MINUTE=60,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,SECONDS_IN_HOUR=MINUTES_IN_HOUR*SECONDS_IN_MINUTE,SECONDS_IN_DAY=HOURS_IN_DAY*SECONDS_IN_HOUR;function monthRoundedTime(et){const st=Math.floor(et/2592e3),ut=Math.floor(et%2592e3/86400),ct=Math.floor(et%86400/3600),ft=Math.floor(et%3600/60),pt=Math.floor(et%60),ht=st>0?st+"mo ":"",mt=ut>0?ut+"d ":"",yt=ct>0?ct+"h ":"",vt=ft>0?ft+"m ":"",Tt=pt>=0?pt+"s":"";return ht+mt+yt+vt+Tt}function formatDurationWithColons(et=0){return getDurationSegments(et,"minutes").map(({value:nt})=>formatDurationSegmentValue(nt)).join(":")}function getDurationSegments(et,tt="seconds"){const nt=Math.floor(et/SECONDS_IN_DAY),rt=Math.floor(et%SECONDS_IN_DAY/SECONDS_IN_HOUR),ot=Math.floor(et%SECONDS_IN_HOUR/SECONDS_IN_MINUTE),st=et%SECONDS_IN_MINUTE,ut=[{type:"days",value:nt},{type:"hours",value:rt},{type:"minutes",value:ot},{type:"seconds",value:st}];for(;ut[0].value===0&&ut[0].type!==tt;)ut.shift();return ut}function formatDurationSegmentValue(et){const tt=String(Math.ceil(et));return tt.length<2?"0"+tt:tt}const inputType$j={type:"union",members:["none",{type:"list",objectType:{type:"union",members:["none",{type:"timestamp"}]}}]};function deltaStringToSeconds(et){const tt={mo:2592e3,d:86400,h:3600,m:60,s:1};let nt=0;const rt=/(\d+)(mo|d|h|m|s)/g;let ot;const st={};for(;(ot=rt.exec(et))!==null;){const ut=parseInt(ot[1],10),ct=ot[2];if(tt[ct]==null||ut<0||st[ct])return null;st[ct]=!0,nt+=ut*(tt[ct]||0)}return rt.lastIndex==null?null:nt*1e3}const DateEditor=et=>{const{timestamp:tt}=et,nt=et.allowDelta&&et.deltaFromOffset!=null,rt=tt==null?"none":new Date(tt).toLocaleString();return Wt.createElement(ValidatingTextInput,{key:rt,initialValue:rt,dataTest:"",onCommit:ot=>{if(!isNaN(new Date(ot).getTime()))et.onCommit(new Date(ot).getTime());else if(nt&&et.deltaFromOffset!=null){const st=deltaStringToSeconds(ot);if(st!=null){const ut=et.deltaDirection==="up"?et.deltaFromOffset+st:et.deltaFromOffset-st;et.onCommit(ut);return}}},validateInput:ot=>!!(!isNaN(new Date(ot).getTime())||nt&&deltaStringToSeconds(ot)!=null)})};function initializedPanelDateRange(){return{domain:voidNode()}}const PanelDateRangeConfigComponent=et=>{const tt=useUpdateConfig2(et),nt=et.config,rt=react.exports.useCallback(async ot=>{tt(st=>({...st,domain:ot}))},[tt]);return Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:"domain"},Wt.createElement(ExpressionConfigField,{expr:nt.domain,setExpression:rt})))},PanelDateRange=et=>{const tt=et.config,nt=et.input,rt=useNodeValue(nt),ot=useMutation(nt,"set"),st=react.exports.useMemo(()=>tt.domain.nodeType==="void"?voidNode():opNumbersMin({numbers:tt.domain}),[tt.domain]),ut=react.exports.useMemo(()=>tt.domain.nodeType==="void"?voidNode():opNumbersMax({numbers:tt.domain}),[tt.domain]),ct=useNodeValue(st),ft=useNodeValue(ut),{start:pt,end:ht}=react.exports.useMemo(()=>rt.result!=null?{start:rt.result[0],end:rt.result[1]}:{start:ct.result,end:ft.result},[ft.result,ct.result,rt.result]),mt=react.exports.useCallback(Tt=>{ot({val:constTimestampList([Tt,ht])})},[ht,ot]),yt=react.exports.useCallback(Tt=>{ot({val:constTimestampList([pt,Tt])})},[ot,pt]),vt=react.exports.useMemo(()=>ht==null||pt==null?null:ht-pt,[ht,pt]);return Wt.createElement("div",{style:{height:"100%",paddingLeft:16,display:"flex",flexDirection:"column"}},Wt.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%"}},Wt.createElement("div",{style:{width:40}},"start"),Wt.createElement(DateEditor,{timestamp:pt,onCommit:mt,allowDelta:!0,deltaDirection:"down",deltaFromOffset:ht})),Wt.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%"}},Wt.createElement("div",{style:{width:40}},"end"),Wt.createElement(DateEditor,{timestamp:ht,onCommit:yt,allowDelta:!0,deltaDirection:"up",deltaFromOffset:pt})),vt!=null&&Wt.createElement("div",null,"duration ",monthRoundedTime(vt/1e3)))},Spec$l={hidden:!0,id:"DateRange",initialize:initializedPanelDateRange,ConfigComponent:PanelDateRangeConfigComponent,Component:PanelDateRange,inputType:inputType$j},inputType$i={type:"list",objectType:{type:"union",members:["none","string"]}},define2DTable=(et,tt)=>{const{label:nt,value:rt,source:ot}=et;let st=emptyTable(),ut;({table:st,columnId:ut}=addColumnToTable(st,nt)),{table:st}=addColumnToTable(st,rt),st=fn(st,ft=>{ft.groupBy=[ut]});const{resultNode:ct}=tableGetResultTableNode(st,ot,tt);return{resultNode:ct,table:st,sourceNode:ot}},PanelStringHistogramWeave=et=>{const{ref:tt,inView:nt}=useInView(),rt=useGatedValue(nt,ot=>ot);return Wt.createElement("div",{ref:tt,style:{width:"100%",height:"100%"}},rt?Wt.createElement(commonjs.AutoSizer,{style:{width:"100%",height:"100%"}},({width:ot,height:st})=>Wt.createElement(PanelStringHistogramInner$1,{...et,width:ot,height:st})):Wt.createElement("div",{style:{backgroundColor:"#eee",width:"100%",height:"100%"}}))},BAR_CHART={$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple bar chart",data:{name:"wandb"},title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{x:{field:"${field:value}",type:"quantitative",stack:null,axis:{title:null}},y:{field:"${field:label}",type:"nominal",axis:{title:null}},opacity:{value:.6}},background:"rgba(0,0,0,0)"},PanelStringHistogramInner$1=et=>{const tt=useWeaveContext(),nt=define2DTable({label:varNode("any","row"),value:opCount({arr:varNode("any","row")}),source:et.input},tt),rt=useNodeValue(nt.resultNode);return rt.loading?Wt.createElement(Panel2Loader,null):Wt.createElement(CustomPanelRenderer,{spec:BAR_CHART,loading:rt.loading,slow:!1,data:rt.result,userSettings:{fieldSettings:{label:"row",value:"count"},stringSettings:{title:""}}})},Spec$k={hidden:!0,id:"string-histogram-weave",Component:PanelStringHistogramWeave,inputType:inputType$i,canFullscreen:!0},MonacoEditor=Wt.lazy(async()=>(await __vitePreload(()=>import("./bootstrap.2756c780.js").then(et=>et.b),["assets/bootstrap.2756c780.js","assets/bootstrap.fc5c8d94.css"]),await __vitePreload(()=>import("./index.46ef92e5.js"),[]))),EditorLoading=({height:et})=>Wt.createElement("div",{style:{height:et||400}},Wt.createElement(Loader,null,"Loading editor")),Editor=et=>{const{onChange:tt,height:nt,onMount:rt,options:ot,theme:st,language:ut,...ct}=et,[ft,pt]=react.exports.useState(et.value||"");return react.exports.useEffect(()=>{pt(et.value||"")},[et.value]),Wt.createElement("div",{className:et.className??"",style:{minWidth:400}},Wt.createElement(Wt.Suspense,{fallback:Wt.createElement(EditorLoading,{height:nt})},Wt.createElement(MonacoEditor,{height:nt||600,...ct,defaultLanguage:ut,value:ft,onChange:(ht,mt)=>{pt(ht||""),tt&&tt(ht||"",mt)},theme:st,onMount:rt,options:Object.assign({autoClosingBrackets:"never",autoClosingQuotes:"never",automaticLayout:!0,cursorBlinking:"smooth",folding:!0,lineNumbersMinChars:4,minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"on"},ot||{})})))},EXTENSION_INFO={log:"text",text:"text",txt:"text",markdown:"markdown",md:"markdown",patch:"diff",ipynb:"python",py:"python",yml:"yaml",yaml:"yaml",xml:"xml",html:"html",htm:"html",json:"json",css:"css",js:"js",sh:"sh"},inputType$h={type:"union",members:Object.keys(EXTENSION_INFO).map(et=>({type:"file",extension:et,wbObjectType:"none"}))},PanelTextEditor=et=>{const tt=react.exports.useMemo(()=>opFileContents({file:et.input}),[et.input]),rt=useNodeValue(tt).result,ot=useMutation(tt,"string-set"),st=useNodeValue(et.input);return st.loading?Wt.createElement(Panel2Loader,null):(console.log("FULL STR",st.result),Wt.createElement(Editor,{language:"python",value:rt,onChange:ut=>{console.log("onChange",ut),ot({val:constString(ut)})}}))},Spec$j={hidden:!0,id:"text-editor",Component:PanelTextEditor,inputType:inputType$h},PANEL_WEAVE_LINK_DEFAULT_CONFIG={to:voidNode(),vars:{}},inputType$g="any",WeaveLink=styled$1.div`
  width: 100%;
  height: 100%;
  cursor: pointer;
`,PanelWeaveLink=et=>{const tt=et.config??PANEL_WEAVE_LINK_DEFAULT_CONFIG,{input:nt,updateInput:rt}=et,ot=react.exports.useCallback(Et=>{console.warn("Attempt to update child panel config in PanelWeave link: not yet supported")},[]),st=useWeaveContext(),{frame:ut}=usePanelContext(),ct=react.exports.useMemo(()=>st.callFunction(tt.to,ut),[tt.to,ut,st]),ft=react.exports.useMemo(()=>({...tt.vars,input:nt}),[nt,tt.vars]),pt=react.exports.useMemo(()=>lodash$2.exports.fromPairs(lodash$2.exports.uniqBy(expressionVariables(ct),Et=>Et.varName).map(Et=>[Et.varName,Et])),[ct]),ht=react.exports.useMemo(()=>opDict(pt),[pt]),mt=st.callFunction(ht,ft),yt=useNodeValue(mt),vt=react.exports.useMemo(()=>yt.loading?voidNode():st.callFunction(ct,lodash$2.exports.mapValues(yt.result,(Et,xt)=>constNodeUnsafe(taggableValue(pt[xt].type),Et))),[ct,pt,yt.loading,yt.result,st]),Tt=react.exports.useCallback(()=>{rt!=null&&vt.nodeType!=="void"&&rt(vt)},[rt,vt]);return Wt.createElement(WeaveLink,{onClick:Tt,title:vt.nodeType!=="void"?st.expToString(vt):void 0},Wt.createElement(ChildPanel,{config:nt,updateConfig:ot}))},Spec$i={hidden:!0,id:"weavelink",Component:PanelWeaveLink,inputType:inputType$g},weavePythonPanelSpecs=()=>[Spec$p,Spec$E,Spec$z,Spec$m,Spec$j,Spec$s,Spec$l,Spec$u,Spec$n,Spec$q,Spec$v,Spec$r,Spec$A,Spec$w,Spec$k,Spec$y,Spec$C,Spec$17,Spec$G,Spec$i,Spec$t,Spec$D,Spec$x,Spec$B,Spec$o],ControlBar=styled$1.div`
  height: 1.7em;
  border-top: 1px solid #ddd;
  background-color: #f8f8f8;
  display: flex;
  justify-content: space-betwee;
`,ArrowIcon=styled$1(WBIcon)`
  cursor: pointer;
  height: 100%;
  padding: 4px 0px 0px 0px;
  :hover {
    color: ${primary};
    background-color: #eee;
    border-radius: 2px;
  }
  flex: 0 0 auto;
`,PageControls=({rowsNode:et,pageSize:tt,page:nt,setPage:rt})=>{const ot=react.exports.useMemo(()=>opCount({arr:et}),[et]),st=useNodeValue(ot),ut=tt*nt;let ct=ut+tt;const ft=st.result;ct>ft&&(ct=ft),react.exports.useEffect(()=>{ut>ft&&rt(0)},[et,ut,ft,rt]);const pt=nt===0,ht=ct===ft,mt=ut+1===ct,yt=react.exports.useCallback(()=>{pt||rt(nt-1)},[nt,rt,pt]),vt=react.exports.useCallback(()=>{ht||rt(nt+1)},[nt,rt,ht]);return st.loading||st.result<2?Wt.createElement(Wt.Fragment,null):Wt.createElement(ControlBar,null,Wt.createElement(ArrowIcon,{name:"previous",onClick:yt}),Wt.createElement("span",{style:{flex:"1 1 auto",textAlign:"center"}},ut+1,!mt&&`-${ct}`," of ",ft," "),Wt.createElement(ArrowIcon,{name:"next",onClick:vt}))};function defaultConfig(et,tt){if(et=nullableTaggableValue(et),!isListLike(et))throw new Error(`Invalid panel row input type: ${et}`);let nt=3;listMaxLength(et)===2&&(nt=2);const rt=getStackIdAndName(tt).id;return(tt.id==="id"||rt.endsWith("plot")||rt.endsWith("table")||rt.endsWith("histogram")||rt.endsWith("barchart"))&&(nt=1),{pageSize:nt,vertical:!1,filterEmpty:!0,childConfig:void 0}}const useConfig=(et,tt,nt)=>react.exports.useMemo(()=>lodash$2.exports.defaults({...nt},defaultConfig(et,tt)),[nt,et,tt]),PanelRowConfigComp=et=>{const{updateConfig:tt}=et,{dashboardConfigOptions:nt}=usePanelContext(),rt=useConfig(et.input.type,et.child,et.config),{pageSize:ot,vertical:st,filterEmpty:ut}=rt,ct=react.exports.useMemo(()=>rt.childConfig??{},[rt.childConfig]),ft=Spec$h.convert(et.inputType??et.input.type);if(ft==null)throw new Error("Invalid (null) pane row config input type");const pt=react.exports.useCallback(mt=>tt({...rt,childConfig:{...ct,...mt}}),[tt,rt,ct]),ht=react.exports.useMemo(()=>opIndex({arr:et.input,index:varNode("number","n")}),[et.input]);return Wt.createElement(ConfigSection,{label:"Properties"},nt,Wt.createElement(ConfigOption,{label:"Page size"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,allowAdditions:!0,value:ot??3,options:[1,2,3,5,10].map(mt=>({key:mt,value:mt,text:mt})),onChange:(mt,{value:yt})=>{let vt=Math.max(1,Math.min(100,Number(yt)));isNaN(vt)&&(vt=1),tt({pageSize:vt})}})),Wt.createElement(ConfigOption,{label:"Vertical"},Wt.createElement(Checkbox$2,{checked:st??!1,onChange:(mt,{checked:yt})=>tt({vertical:!!yt})})),Wt.createElement(ConfigOption,{label:"Filter Nulls"},Wt.createElement(Checkbox$2,{checked:ut??!0,onChange:(mt,{checked:yt})=>tt({filterEmpty:!!yt})})),Wt.createElement(PanelComp2,{input:ht,inputType:ft,loading:et.loading,panelSpec:et.child,configMode:!0,config:ct,context:et.context,updateConfig:pt,updateContext:et.updateContext}))},PanelRow=et=>{const{input:tt,updateConfig:nt,child:rt}=et,ot=useConfig(et.input.type,rt,et.config);let st=tt;ot.filterEmpty&&(st=opDropNa({arr:st}));const[ut,ct]=react.exports.useState(0),{pageSize:ft,vertical:pt}=ot,ht=react.exports.useMemo(()=>ot.childConfig??{},[ot.childConfig]),mt=react.exports.useCallback(Et=>nt({...ot,childConfig:{...ht,...Et}}),[nt,ot,ht]),yt=react.exports.useMemo(()=>getPagedRowsNode(ft,ut,st),[ft,ut,st]),vt=useEach(yt,ft),Tt=vt.result;return useGatedValue(Wt.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",padding:"2px"}},Wt.createElement("div",{style:{height:"0px",width:"100%",display:"flex",justifyContent:"space-evenly",flexDirection:pt?"column":"row",gap:"4px",flex:"1 1 auto"}},lodash$2.exports.range(ft).map(Et=>{const xt=Tt[Et];return xt==null?Wt.createElement("div",{key:Et,style:{flex:"1 1 auto"}}):Wt.createElement("div",{key:Et,style:{overflowX:"auto",flex:"1 1 50px",height:"100%"}},Wt.createElement(PanelComp2,{input:xt,inputType:xt.type,loading:et.loading,panelSpec:et.child,configMode:!1,config:ht,context:et.context,updateConfig:mt,updateContext:et.updateContext,updateInput:et.updateInput}))})),(st.type.length==null||st.type.length>ft)&&Wt.createElement("div",{style:{flex:"0 0 auto",maxHeight:"27px"}},Wt.createElement(PageControls,{rowsNode:st,page:ut,pageSize:ft,setPage:ct}))),Et=>!vt.loading)},Spec$h={id:"row",displayName:"List",ConfigComponent:PanelRowConfigComp,Component:PanelRow,canFullscreen:!0,convert:et=>{let tt=!1;if(isNullable(et)&&(et=nonNullable(et),tt=!0),et=taggableValue(et),isNullable(et)&&(et=nonNullable(et),tt=!0),isListLike(et)){let nt=listObjectType(et);return tt&&(nt=maybe(nt)),nt}return null},defaultFixedSize:(et,tt,nt)=>nt.vertical?{width:et.width!=null?et.width+40:void 0,height:et.height!=null?et.height*(listLength(tt)??3)+20:void 0}:{width:et.width!=null?et.width*(listLength(tt)??3)+20:void 0,height:et.height!=null?et.height+40:void 0}},inputType$f="run",PanelRunColor=et=>{const{frame:tt}=usePanelContext();if(tt.runColors==null||isVoidNode(tt.runColors))throw new Error("PanelRunColor received unusable runColors variable in frame");const nt=opPick({obj:tt.runColors,key:opRunId({run:et.input})}),rt=useNodeValue(nt);return rt.loading?Wt.createElement(Panel2Loader,null):Wt.createElement("div",{style:{width:"100%",height:"100%",textAlign:"center",display:"flex",alignContent:"center",justifyContent:"center",alignItems:"center"}},Wt.createElement(Icon$4,{style:{opacity:1,color:rt.result,height:"1.5em",margin:0,padding:0},name:"circle"}))},Spec$g={id:"run-color",hidden:!0,Component:PanelRunColor,inputType:inputType$f},inputType$e="type",PanelType=et=>{const tt=useNodeValue(et.input);return tt.loading||tt.result==null?Wt.createElement("div",null,"-"):Wt.createElement("div",{style:{whiteSpace:"nowrap"}},defaultLanguageBinding.printType(tt.result,!0))},Spec$f={id:"type",Component:PanelType,inputType:inputType$e},SelectPanel=({inputNode:et,selectFunction:tt,vars:nt,panelId:rt,config:ot,panelContext:st,updateConfig:ut,updatePanelContext:ct})=>{const{handler:ft,curPanelId:pt}=usePanelStacksForType(tt.type,rt,{excludeTable:!0});return pt==null||ft==null?Wt.createElement("div",null,"No panel for type ",defaultLanguageBinding.printType(tt.type)):Wt.createElement(PanelContextProvider,{newVars:{...nt,row:et}},Wt.createElement(PanelComp2,{input:tt,inputType:tt.type,loading:!1,panelSpec:ft,configMode:!1,context:st,config:ot,updateConfig2:()=>console.log("DROPPED UPDATE CONFIG2"),updateConfig:ut,updateContext:ct}))},PanelFacetFlexMode=et=>{const{input:tt}=et,nt=tt,rt=useWeaveContext(),ot=react.exports.useMemo(()=>et.config==null||et.config.dims==null||et.config.dims.select==null?defaultFacet():et.config,[et.config]),{table:st,dims:ut,cellSize:ct}=ot,[ft,pt]=react.exports.useState(ct),ht=getTableColumnName(st.columnNames,st.columnSelectFunctions,ut.x,rt.client.opStore),{rowsNode:mt}=react.exports.useMemo(()=>tableGetResultTableNode(st,nt,rt),[st,nt,rt]),yt=useEach(mt),vt=react.exports.useMemo(()=>yt.loading?[]:yt.result,[yt.loading,yt.result]),Tt=st.columnSelectFunctions[ut.select];if(Tt.nodeType==="void"||Tt.type==="invalid")throw new Error("Invalid panel cell function");return useGatedValue(Wt.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},vt.map((Et,xt)=>{const At=opPick({obj:opGroupGroupKey({obj:Et}),key:constString(ht)}),Ct=Wt.createElement("div",{key:xt,style:{display:"flex",marginRight:ot.padding}},Wt.createElement("div",{style:{display:"flex",marginRight:4}},taggableValue(At.type)==="type"?Wt.createElement(PanelType,{input:At,context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}):Wt.createElement(PanelString,{input:At,context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}),":"),Wt.createElement(SelectPanel,{inputNode:Et,selectFunction:Tt,vars:st.columns[ut.select].panelVars??{},panelId:st.columns[ut.select].panelId,config:st.columns[ut.select].panelConfig,panelContext:et.context,updateConfig:$t=>et.updateConfig({table:updateColumnPanelConfig(st,ut.select,$t)}),updatePanelContext:et.updateContext}));return ot.manualSize?Wt.createElement(Resizable,{key:xt,width:ct.w,height:ct.h,onResize:($t,Ot)=>{pt({w:Ot.size.width,h:Ot.size.height})},onResizeStop:()=>et.updateConfig({cellSize:ft})},Wt.createElement("div",{style:{width:ot.cellSize.w,height:ot.cellSize.h}},Ct)):Ct})),Et=>!yt.loading)},PanelFacetGridMode=et=>{const{input:tt}=et,nt=tt,rt=useWeaveContext(),ot=react.exports.useMemo(()=>et.config==null||et.config.dims==null||et.config.dims.select==null?defaultFacet():et.config,[et.config]),{table:st,dims:ut,cellSize:ct}=ot,[ft,pt]=react.exports.useState(ct),ht=st.columnSelectFunctions[ut.select],{rowsNode:mt}=react.exports.useMemo(()=>tableGetResultTableNode(st,nt,rt),[st,nt,rt]),yt=react.exports.useMemo(()=>opMap({arr:mt,mapFn:constFunction({row:getExampleRow(mt).type},({row:kt})=>rt.callFunction(ht,{row:kt}))}),[mt,ht,rt]),vt=react.exports.useMemo(()=>({domain:yt}),[yt]),Tt=opMap({arr:mt,mapFn:constFunction({row:getExampleRow(mt).type},({row:kt})=>opGroupGroupKey({obj:kt}))}),Et=useNodeValue(Tt),xt=useEach(mt),At=getTableColumnName(st.columnNames,st.columnSelectFunctions,ut.x,rt.client.opStore),Ct=getTableColumnName(st.columnNames,st.columnSelectFunctions,ut.y,rt.client.opStore),$t=react.exports.useMemo(()=>Et.loading?[]:Et.result,[Et.loading,Et.result]),{xPos:Ot,yPos:Rt}=react.exports.useMemo(()=>{const kt=[],Mt=[];$t.forEach(Ut=>{const Xt=Ut[At];kt.push(Xt);const Jt=Ut[Ct];Mt.push(Jt)});let Ft=lodash$2.exports.uniqBy(kt,Ut=>Ut instanceof Date?Ut.getTime():Ut);const zt=st.sort.find(Ut=>Ut.columnId===ut.x);zt!=null&&(Ft=Ft.sort((Ut,Xt)=>compareItems(Ut,Xt)*(zt.dir==="asc"?1:-1)));let Vt=lodash$2.exports.uniqBy(Mt,Ut=>Ut instanceof Date?Ut.getTime():Ut);const Zt=st.sort.find(Ut=>Ut.columnId===ut.y);return Zt!=null&&(Vt=Vt.sort((Ut,Xt)=>compareItems(Ut,Xt)*(Zt.dir==="asc"?1:-1))),{xPos:lodash$2.exports.fromPairs(Ft.map((Ut,Xt)=>[Ut,Xt])),yPos:lodash$2.exports.fromPairs(Vt.map((Ut,Xt)=>[Ut,Xt]))}},[ut.x,ut.y,$t,st.sort,At,Ct]),It=react.exports.useMemo(()=>xt.loading?[]:xt.result,[xt.loading,xt.result]);return useGatedValue(Wt.createElement("div",{style:{display:"inline-block",marginLeft:"auto",marginRight:"auto"}},Wt.createElement("div",{style:{display:"grid",gridTemplateColumns:140,gridTemplateRows:24,gridAutoColumns:ot.cellSize.w,gridAutoRows:ot.cellSize.h}},Object.keys(Ot).map(kt=>Wt.createElement("div",{key:"col-"+kt,style:{gridColumnStart:Ot[kt]+2,gridRowStart:1,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontSize:10}},kt)),Object.keys(Rt).map(kt=>Wt.createElement("div",{key:"row-"+kt,style:{gridRowStart:Rt[kt]+2,gridColumnStart:1,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontSize:12}},kt)),It.map((kt,Mt)=>{const Ft=$t[Mt];if(Ft==null)return Wt.createElement("div",null,"-");const zt=Ft[At],Vt=Ft[Ct],Zt=zt===ot.selectedCell?.x&&ot.selectedCell?.y===Vt;return Wt.createElement(Resizable,{key:"cell-"+Ot[zt]+"-"+Rt[Vt],width:ct.w,height:ct.h,onResize:(Ut,Xt)=>{pt({w:Xt.size.width,h:Xt.size.height})},onResizeStop:()=>et.updateConfig({cellSize:ft})},Wt.createElement("div",{style:{width:ot.cellSize.w,height:ot.cellSize.h,gridColumnStart:Ot[zt]+2,gridRowStart:Rt[Vt]+2,border:Zt?`1px solid ${linkHoverBlue}`:void 0},onClick:()=>et.updateConfig({selectedCell:{x:zt,y:Vt}})},Wt.createElement(PanelContextProvider,{newVars:vt},Wt.createElement(SelectPanel,{inputNode:kt,selectFunction:ht,vars:st.columns[ut.select].panelVars??{},panelId:st.columns[ut.select].panelId,config:st.columns[ut.select].panelConfig,panelContext:et.context,updateConfig:Ut=>et.updateConfig({table:updateColumnPanelConfig(st,ut.select,Ut)}),updatePanelContext:et.updateContext}))))}))),kt=>!xt.loading)},PanelFacet=et=>{const tt=useConfig$3(et.config),{table:nt,dims:rt}=tt,ot=nt.columnSelectFunctions[rt.x].type!=="invalid",st=panelSpecById(nt.columns[rt.select].panelId),ut=nt.columnSelectFunctions[rt.select].type!=="invalid"||st!=null&&(st.inputType==="invalid"||st.inputType==="any"),ct=nt.columnSelectFunctions[rt.y].type!=="invalid";return ot?ut?ct?Wt.createElement(PanelFacetGridMode,{...et}):Wt.createElement(PanelFacetFlexMode,{...et}):Wt.createElement("div",null,"cell must be configured"):Wt.createElement("div",null,"x must be configured")},Component=Object.freeze(Object.defineProperty({__proto__:null,default:PanelFacet,PanelFacetConfig},Symbol.toStringTag,{value:"Module"})),PanelObjectOverview=et=>{const tt=opObjectKeyTypes({obj:et.input}),nt=getExampleRow(tt);let rt=defaultFacet();return rt={...rt,table:updateColumnSelect(rt.table,rt.dims.x,opPick({obj:varNode(nt.type,"row"),key:constString("type")}))},rt={...rt,table:updateColumnSelect(rt.table,rt.dims.select,opCount({arr:varNode(et.input.type,"row")}))},rt={...rt,padding:4},Wt.createElement(PanelFacet,{input:tt,context:et.context,updateContext:et.updateContext,config:rt,updateConfig:()=>console.log("HELLO")})},inputType$d="run",KeyValTable$1=styled$1.div``,KeyValTableRow=styled$1.div`
  display: flex;
  align-items: flex-start;
`,KeyValTableKey=styled$1.div`
  color: ${gray500};
  width: 100px;
`,KeyValTableVal=styled$1.div`
  flex-grow: 1;
`,InputUpdateLink=styled$1.div`
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
`,PanelRunOverview=et=>{const tt=et.input,nt=varNode(et.input.type,"input");return Wt.createElement(KeyValTable$1,null,Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunName({run:nt}))},"Name")),Wt.createElement(KeyValTableVal,null,Wt.createElement(PanelString,{input:opRunName({run:tt}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunProject({run:nt}))},"Project")),Wt.createElement(KeyValTableVal,null,Wt.createElement(PanelString,{input:opProjectName({project:opRunProject({run:tt})}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunJobtype({run:nt}))},"Job type")),Wt.createElement(KeyValTableVal,null,Wt.createElement(PanelString,{input:opRunJobtype({run:tt}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunCreatedAt({run:nt}))},"Created")),Wt.createElement(KeyValTableVal,null,Wt.createElement(PanelDate,{input:opRunCreatedAt({run:tt}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunHeartbeatAt({run:nt}))},"Heartbeat")),Wt.createElement(KeyValTableVal,null,Wt.createElement(PanelDate,{input:opRunHeartbeatAt({run:tt}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunConfig({run:nt}))},"Config")),Wt.createElement(KeyValTableVal,null,Wt.createElement(PanelObjectOverview,{input:opRunConfig({run:tt}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunSummary({run:nt}))},"Summary")),Wt.createElement(KeyValTableVal,null,Wt.createElement(PanelObjectOverview,{input:opRunSummary({run:tt}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))),Wt.createElement(KeyValTableRow,null,Wt.createElement(KeyValTableKey,null,Wt.createElement(InputUpdateLink,{onClick:()=>et.updateInput?.(opRunHistory({run:nt}))},"History")),Wt.createElement(KeyValTableVal,null,Wt.createElement("div",{style:{display:"flex"}},Wt.createElement("div",{style:{marginRight:4}},Wt.createElement(PanelNumber$1,{input:opCount({arr:opRunHistory({run:tt})}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")})," "),"rows logged"),Wt.createElement(PanelObjectOverview,{input:opIndex({arr:opRunHistory({run:tt}),index:constNumber(0)}),context:et.context,updateContext:et.updateContext,updateConfig:()=>console.log("HELLO")}))))},Spec$e={id:"run-overview",Component:PanelRunOverview,inputType:inputType$d},CUSTOM_TABLE_TYPE={type:"file",wbObjectType:{type:"table",columnTypes:{}}},inputType$c={type:"list",objectType:{type:"union",members:["none","run"]}},PanelRunsTable=et=>{throw new Error("PanelRunsTable: Cannot be rendered directly")},getKeysFromInputType=(et,tt)=>{if(et!=null&&isAssignableTo(et,list$1(typedDict({})))){const nt=typedDictPropertyTypes(listObjectType(et)),rt=Object.keys(nt).filter(st=>isAssignableTo(nt[st],maybe(CUSTOM_TABLE_TYPE))).sort(),ot=rt.length>0&&tt?.summaryKey!=null&&rt.indexOf(tt?.summaryKey)!==-1?tt.summaryKey:rt?.[0]??"";return{tableKeys:rt,value:ot}}return{tableKeys:[],value:""}},PanelRunsTableConfig=et=>{const tt=opRunSummary({run:et.input}),nt=useNodeWithServerType(tt),{tableKeys:rt,value:ot}=getKeysFromInputType(nt.result?.type,et.config),st=rt.map(ft=>({text:ft,value:ft})),ut=et.updateConfig,ct=Wt.useCallback(ft=>{ut({summaryKey:ft})},[ut]);return Wt.createElement(ConfigOption,{label:"Table"},Wt.createElement(ModifiedDropdownConfigField,{selection:!0,"data-test":"compare_method",scrolling:!0,multiple:!1,options:st,value:ot,onChange:(ft,pt)=>{ct(pt.value)}}))},Spec$d={id:"runs-table",displayName:"Run Tables",Component:PanelRunsTable,ConfigComponent:PanelRunsTableConfig,inputType:inputType$c,outputType:()=>({type:"list",objectType:{type:"list",objectType:{type:"typedDict",propertyTypes:{}}}}),equivalentTransform:async(et,tt,nt)=>{const rt=list$1(list$1(typedDict({}))),ot=constNodeUnsafe(rt,[]),st=opRunSummary({run:et}),ut=await nt(st),{value:ct}=getKeysFromInputType(ut.type,tt),ft=opPick({obj:st,key:constString(ct??"")}),pt=await nt(ft);if(isAssignableTo(pt.type,list$1("any"))){const ht=opDropNa({arr:pt}),mt=normalizeTableLike(ht),yt=await nt(mt);if(isAssignableTo(yt.type,rt))return yt}return ot}};registerPanelFunction(Spec$d.id,Spec$d.inputType,Spec$d.equivalentTransform);const inputType$b={type:"union",members:[{type:"pytorch-model-file"}]},dummyObj={},dummyFn=et=>{},PanelSavedModelFileMarkdown=et=>{const tt=opAssetFile({asset:et.input}),nt=useNodeWithServerType(tt);return nt.loading?Wt.createElement(Wt.Fragment,null):Wt.createElement(Spec$P.Component,{input:nt.result,context:dummyObj,updateContext:dummyFn,updateConfig:dummyFn})},Spec$c={id:"model-file",Component:PanelSavedModelFileMarkdown,inputType:inputType$b},inputType$a={type:"union",members:[{type:"dict",objectType:{type:"union",members:["none","string"]}},{type:"list",maxLength:25,objectType:{type:"union",members:["none","string"]}}]},PanelStringCompare=et=>{const tt=et.input,nt=useNodeValue(tt),rt=react.exports.useMemo(()=>nt.loading?[]:_$2.isArray(nt.result)?nt.result.map((st,ut)=>({key:""+ut,value:""+(st??"")})):Object.entries(nt.result??{}).map(([st,ut])=>({key:st,value:""+ut})),[nt]),ot=react.exports.useMemo(()=>rt.map(({key:st,value:ut})=>`${st}: ${ut??"-"}`).join(`
`),[rt]);return rt.length?Wt.createElement(TooltipTrigger,{copyableContent:ot,content:Wt.createElement(PreformattedProportionalString,null,ot)},Wt.createElement(StringContainer,{style:{whiteSpace:"pre-line",lineHeight:"1.25em"}},Wt.createElement(StringItem,null,ot))):Wt.createElement("div",null,"-")},Spec$b={id:"string-compare",Component:PanelStringCompare,inputType:inputType$a},inputType$9={type:"list",objectType:{type:"union",members:["none","string"]}},makeHistoSpec=(et,tt=100)=>({$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple histogram",data:{name:"wandb"},transform:[{aggregate:[{op:"count",as:"value_count"}],groupby:["value"]},{window:[{op:"row_number",as:"value_rank"}],sort:[{field:"value_count",order:"descending"}]},{filter:`datum.value_rank < ${tt}`}],title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{y:{type:"nominal",field:"value",axis:{title:null,labelLimit:et},sort:{field:"value_count",order:"descending"}},x:{field:"value_count",type:"quantitative"},opacity:{value:.7}},background:"rgba(0,0,0,0)"}),makeHistoSpecColored=(et,tt=100)=>({$schema:"https://vega.github.io/schema/vega-lite/v4.json",description:"A simple histogram",data:{name:"wandb"},transform:[{aggregate:[{op:"count",as:"value_count"}],groupby:["value","color"]},{window:[{op:"row_number",as:"value_rank"}],sort:[{field:"value_count",order:"descending"}]},{filter:`datum.value_rank < ${tt}`}],title:"${string:title}",mark:{type:"bar",tooltip:{content:"data"}},encoding:{y:{type:"nominal",field:"value",axis:{title:null,labelLimit:et},sort:{field:"value_count",order:"descending"}},x:{field:"value_count",type:"quantitative"},color:{type:"nominal",field:"color",legend:!1,scale:{range:{field:"color"}}},opacity:{value:1}},background:"rgba(0,0,0,0)"}),PanelStringHistogram=et=>{const{ref:tt,inView:nt}=useInView(),rt=useGatedValue(nt,ot=>ot);return Wt.createElement("div",{ref:tt,style:{width:"100%",height:"100%"}},rt?Wt.createElement(commonjs.AutoSizer,{style:{width:"100%",height:"100%"}},({width:ot,height:st})=>Wt.createElement(PanelStringHistogramInner,{...et,width:ot,height:st})):Wt.createElement("div",{style:{backgroundColor:"#eee",width:"100%",height:"100%"}}))},PanelStringHistogramInner=et=>{const tt=Math.max(20,(et.width-50)/3),nt=Math.floor(Math.max(3,(et.height-35)/7)),rt=useColorNode(et.input),ot=useNodeValue(rt),st=rt.nodeType!=="void",ut=useNodeValue(et.input),ct=react.exports.useMemo(()=>ut.loading||st&&ot.loading?[]:st?ut.result.map((pt,ht)=>({value:pt,color:ot.result[ht]??"#94aecb"})):ut.result.map(pt=>({value:pt})),[ut,st,ot]),ft=react.exports.useMemo(()=>st?makeHistoSpecColored(tt,nt):makeHistoSpec(tt,nt),[tt,nt,st]);return useGatedValue(Wt.createElement(Wt.Fragment,null,ut.loading?Wt.createElement(Panel2Loader,null):Wt.createElement(CustomPanelRenderer,{spec:ft,loading:!1,slow:!1,data:ct,userSettings:{fieldSettings:{},stringSettings:{title:""}}})),pt=>!ut.loading)},Spec$a={id:"string-histogram",Component:PanelStringHistogram,inputType:inputType$9,canFullscreen:!0},inputType$8={type:"union",members:[{type:"file",extension:"trace"},{type:"file",extension:"trace.json"}]},PanelTrace=et=>{const tt=et.input,{signedUrl:nt}=useSignedUrlWithExpiration(tt,60*1e3);if(nt==null)return Wt.createElement(WandbLoader,{name:"panel-trace"});const rt=(et.context.path??["trace"])[0],{urlPrefixed:ot}=getConfig();return Wt.createElement("iframe",{style:{width:"100%",height:"98%",border:"none"},title:"Trace viewer",src:ot(`/trace/index.html?url=${encodeURIComponent(nt)}&identifier=${encodeURIComponent(rt)}`)})},Spec$9={id:"tracer",Component:PanelTrace,inputType:inputType$8},chainColor="#F59B1414",chainTextColor="#C77905",toolColor="#9CC74818",toolTextColor="#669432",agentColor="#0096AD14",agentTextColor="#0096AD",llmColor="#CD5BF016",llmTextColor="#9E36C2",promptColor="#9278EB18",promptTextColor="#775CD1",MinimalTooltip=({children:et,text:tt,lengthLimit:nt})=>{const rt=nt??100;return tt.length<rt?Wt.createElement(Wt.Fragment,null,et):Wt.createElement(TooltipTrigger,{copyableContent:tt,content:Wt.createElement("pre",null,tt)},et)},LCTDetailView=styled$1.div`
  flex: 1 1 auto;
  height: 50%;
`,LCTTableSection=styled$1.div`
  flex: 1 1 auto;
  height: 50%;
`,LCTWrapper=styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
`,SimpleTabs=styled$1(Tab$2)`
  display: flex;
  flex-direction: column;
  border-top: none;
  height: 100%;
  width: 100%;
  overflow: hidden;
  flex: 1 1 50px;
  .ui.tabular.menu {
    background-color: #fff;
    flex: 0 0 39px;
    padding: 0px;
    border-top: none;
    font-size: 16px;
    min-height: fit-content;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    &::-webkit-scrollbar {
      display: none;
    }
    > .item {
      position: relative;
      opacity: 0.95;
      transition: none;
      background-color: none;
      border: none;
      .icon {
        margin-top: 4px;
      }
      /* If there's an ellispis menu, make it fit nicely */
      > .dropdown.icon > i.icon {
        width: auto;
        margin-left: 24px;
        margin-right: 0;
      }
      border-bottom: 2px solid transparent;
    }
    > .item,
    > .active.item {
      margin-bottom: 0;
      /* color: @gray700; */
      cursor: pointer;
      font-weight: normal;
      padding: 12px 16px 11px;
      margin-right: 10px;
      background: none;
      .label {
        /* color: @gray500; */
        background-color: white;
        font-size: 18px;
        margin-left: 8px;
        padding: 1px 3px;
      }
    }
    > .active.item {
      color: black;
      border-bottom: 2px solid #2e78c7;
    }
  }
`,TabWrapper=styled$1.div`
  height: 100%;
  width: 100%;
  flex: 1 1 50px;
  overflow: hidden;
  padding-top: 16px;
  background-color: #fff;
`,ConstrainedTextField=styled$1.div`
  max-height: 100px;
  overflow-y: auto;
`,ModelWrapper=styled$1.div`
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #fff;
`,ModelComponentHeader=styled$1.div`
  font-weight: bold;
  background-color: ${et=>et.backgroundColor};
  color: ${et=>et.color};
  width: 100%;
  line-height: 26px;
  text-align: left;
  padding: 2px 8px;
  border-radius: 4px;
  margin: 2px 0;
  font-size: 14px;
`,KVTValue=styled$1.div`
  width: 100%;
  text-align: left;
  flex: 1 1 auto;
`,KVTKey=styled$1.div`
  width: ${et=>et.isArrayItem?"25px":"150px"};
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
  font-weight: bold;
  text-align: left;
`,KVTRow=styled$1.div`
  display: flex;
  flex-direction: row;
  align-items: left;
  justify-content: left;
  width: 100%;
`,KVTCollapseButton=styled$1.div`
  cursor: pointer;
  position: relative;
  top: -29px;
  left: calc(100% - 30px);
  height: 0px;
  color: #8f8f8fa6;
`,KVTHeader=styled$1.div`
  cursor: ${et=>et.canBeCollapsed?"pointer":"default"};
  width: 100%;
`,KVTWrapper=styled$1.div`
  width: 100%;
`;styled$1.div`
  display: flex;
  flex-direction: row;
  gap: 2px;
`;styled$1.div`
  /* display: flex;
  flex-direction: row; */
`;const SpanElementHeader=styled$1.div`
  border: ${et=>et.hasError?et.isSelected?"1px solid red":"1px dashed red":et.isSelected?"1px solid black":"1px solid white"};
  background-color: ${et=>et.backgroundColor};
  color: ${et=>et.color};
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: bold;
  line-height: 26px;
  text-align: left;
  border-radius: 4px;
  font-size: 14px;
`,SpanElementInner=styled$1.div`
  padding: 2px 8px;
  display: flex;
  justify-content: space-between;
`,SpanParentConnector=styled$1.div`
  background-color: ${et=>et.backgroundColor};
`,SpanDetailTable=styled$1.table`
  width: 100%;
`,DurationLabel=styled$1.div`
  color: #8f8f8fa6;
`,SpanDetailHeader=styled$1.div`
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-color: #f6f6f6;
  color: black;
  font-weight: bold;
  line-height: 26px;
  text-align: left;
  padding: 2px 8px;
  border-radius: 4px;
  margin: 2px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
`,SpanDetailWrapper=styled$1.div`
  width: 100%;
  height: 100%;
  overflow: auto;
`,KVDetailValueText=styled$1.div`
  max-height: 100px;
  overflow-y: auto;
`,KVDetailValueTD=styled$1.td`
  padding: 0.2em;
`,KVDetailKeyTD=styled$1.td`
  padding: 0.2em;
  font-weight: bold;
  width: 120px;
`,TraceDetailWrapper=styled$1.div`
  width: 100%;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 0.2em;
  overflow-y: auto;
  padding: 6px;
`,TraceTimelineElementWrapper=styled$1.div`
  width: 100%;
  flex: 0 0 auto;
`,TraceWrapper=styled$1.div`
  width: 100%;
  height: 100%;
  font-size: 14px;
  display: flex;
  flex-direction: ${et=>et.split==="vertical"?"row":"column"};
  justify-content: space-between;
`,TraceTimelineWrapper=styled$1.div`
  height: 100%;
  width: 100%;
  position: relative;
`,TraceDetail=styled$1.div`
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
`,TraceTimeline=styled$1.div`
  height: 100%;
  position: relative;
  overflow: auto;
`,TraceTimelineScale=styled$1.div`
  height: 100%;
  position: relative;
`,SpanDetailIOSectionHeaderTd=styled$1.td`
  font-weight: bold;
  border-bottom: 1px solid #eee;
  padding-top: 1em;
  padding-bottom: 0.2em;
`,SpanDetailSectionHeaderTd=styled$1.td`
  font-weight: bold;
  border-bottom: 2px solid #eee;
  padding-top: 1em;
  padding-bottom: 0.2em;
`,TipOverlay=styled$1.div`
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: ${BLACK_TRANSPARENT_2};
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  color: ${WHITE};
  font-size: 20px;
  pointer-events: none;

  transition: opacity 0.2s;
  opacity: ${et=>et.visible?1:0};
`,inputType$7={type:"wb_trace_tree"},PanelTraceTreeModel=et=>{const tt=useNodeValue(et.input),nt=react.exports.useMemo(()=>{try{return JSON.parse(tt.result?.model_dict_dumps??"{}")}catch(rt){return console.log(rt),{}}},[tt.result]);return tt.loading?Wt.createElement(Loader,null):nt==null?Wt.createElement("div",null):Wt.createElement(ModelWrapper,null,Wt.createElement(GeneralObjectRenderer,{data:nt}))},isModelComponent=et=>et&&et._kind,getSafeEntriesFromObject=et=>Object.entries(et).filter(([tt,nt])=>nt!=null&&tt[0]!=="_"&&!["verbose"].includes(tt)).sort(([tt,nt],[rt,ot])=>tt<rt?-1:1),GeneralObjectRenderer=et=>{if(et.data==null)return Wt.createElement("div",null,"-");if(typeof et.data=="string")return Wt.createElement(MinimalTooltip,{text:""+et.data},Wt.createElement(ConstrainedTextField,null,et.data));if(typeof et.data=="number")return Wt.createElement("div",null,et.data);if(typeof et.data=="boolean")return Wt.createElement("div",null,""+et.data);if(Array.isArray(et.data))return Wt.createElement(KeyValTable,{isArray:!0,nonCollapsibleContent:et.data.map((tt,nt)=>({key:""+nt,keyContent:Wt.createElement("div",{style:{fontWeight:"bold"}},nt),valueContent:Wt.createElement(GeneralObjectRenderer,{data:tt})}))});if(typeof et.data=="object"){let tt=null;if(isModelComponent(et.data)){const st=et.data._kind;let ut=null,ct="#eee",ft="#111";const pt=st.toLowerCase();pt.includes("chain")?(ut=Wt.createElement(ChainSVG,null),ct=chainColor,ft=chainTextColor):pt.includes("agent")||pt.includes("react")?(ut=Wt.createElement(AgentSVG,null),ct=agentColor,ft=agentTextColor):pt.includes("prompt")?(ut=Wt.createElement(PromptSVG,null),ct=promptColor,ft=promptTextColor):(pt.includes("llm")||pt.includes("openai"))&&(ut=Wt.createElement(LLMSVG,null),ct=llmColor,ft=llmTextColor),tt=Wt.createElement(ModelComponentHeader,{backgroundColor:ct,color:ft},ut,st)}const nt=getSafeEntriesFromObject(et.data),rt=nt.filter(([st,ut])=>st==="allowed_tools"||isModelComponent(ut)||st==="chains"),ot=nt.filter(([st,ut])=>st!=="allowed_tools"&&!isModelComponent(ut)&&st!=="chains");return Wt.createElement(KeyValTable,{header:tt,collapsibleContent:ot.map(([st,ut],ct)=>({key:st,valueContent:Wt.createElement(GeneralObjectRenderer,{data:ut})})),nonCollapsibleContent:rt.map(([st,ut],ct)=>st==="allowed_tools"?{key:st,valueContent:Wt.createElement(ModelComponentHeader,{backgroundColor:toolColor,color:toolTextColor},Wt.createElement(ToolSVG,null)," ",(ut??[]).join(", "))}:{key:st,valueContent:Wt.createElement(GeneralObjectRenderer,{data:ut})})})}return Wt.createElement("div",null,JSON.stringify(et.data))},KeyValTable=et=>{const tt=et.collapsibleContent!=null&&et.collapsibleContent.length>0&&et.header!=null,[nt,rt]=Wt.useState(tt);return Wt.createElement(KVTWrapper,null,Wt.createElement(KVTHeader,{canBeCollapsed:tt,onClick:()=>{rt(!nt)}},et.header),tt&&Wt.createElement(KVTCollapseButton,{onClick:()=>{rt(!nt)}},nt?Wt.createElement(NextSVG,null):Wt.createElement(DownSVG,null)),!nt&&Wt.createElement(KVTContents,{contents:et.collapsibleContent}),Wt.createElement(KVTContents,{isArrayItem:et.isArray,contents:et.nonCollapsibleContent}))},KVTContents=et=>Wt.createElement(Wt.Fragment,null,(et.contents??[]).map(({key:tt,valueContent:nt})=>Wt.createElement(KVTRow,{key:tt},Wt.createElement(MinimalTooltip,{text:tt,lengthLimit:15},Wt.createElement(KVTKey,{isArrayItem:!!et.isArrayItem},tt)),Wt.createElement(KVTValue,null,nt)))),Spec$8={id:"wb_trace_tree-modelViewer",canFullscreen:!0,Component:PanelTraceTreeModel,inputType:inputType$7};function useTipOverlay(){const[et,tt]=react.exports.useState(!1),nt=react.exports.useRef(null),rt=react.exports.useCallback(()=>{tt(!0);const ot=nt.current=window.setTimeout(()=>{nt.current===ot&&tt(!1)},1e3)},[]);return{tipOverlay:Wt.createElement(TipOverlay,{visible:et},"Click and drag to pan"),showTipOverlay:rt}}const SCALE_DELTA_MULTIPLIER=.001;function useTimelineZoomAndPan({onHittingMinZoom:et}){const[tt,nt,rt]=useStateWithRef(1),{cursor:ot,updateCursor:st}=useTimelineCursor(),ut=react.exports.useRef(null),ct=react.exports.useRef(null);return react.exports.useEffect(()=>{const ft=ut.current;if(ft==null)return;let pt=!1;function ht(Tt){const{deltaX:Et,deltaY:xt}=Tt;if(Math.abs(Et)>Math.abs(xt)||(Tt.preventDefault(),ct.current!=null))return;const At=1-xt*SCALE_DELTA_MULTIPLIER;if(At<1&&rt.current===1){et?.();return}const Ct=Math.max(rt.current*At,1);$t(),nt(Ct);function $t(){if(ft==null||Ct===rt.current)return;const Ot=Tt.clientX-ft.getBoundingClientRect().x,Rt=ft.scrollLeft+Ot,It=Ct/rt.current,kt=Rt*It;ct.current=kt-Ot}}function mt(){pt=!0,st(pt)}function yt(){pt=!1,st(pt)}function vt(Tt){!pt||ft?.scrollBy(-Tt.movementX,-Tt.movementY)}return ft.addEventListener("wheel",ht,{passive:!1}),ft.addEventListener("mousedown",mt),document.addEventListener("mouseup",yt),document.addEventListener("mousemove",vt),()=>{ft.removeEventListener("wheel",ht),ft.removeEventListener("mousedown",mt),document.removeEventListener("mouseup",yt),document.removeEventListener("mousemove",vt)}},[nt,rt,st,et]),react.exports.useLayoutEffect(()=>{ct.current!=null&&(ut.current?.scrollTo({left:ct.current}),ct.current=null)},[tt]),{timelineRef:ut,timelineStyle:{userSelect:"none",cursor:ot},scale:tt}}function useTimelineCursor(){const[et,tt]=react.exports.useState("grab"),nt=react.exports.useCallback(rt=>{tt(rt?"grabbing":"grab")},[]);return{cursor:et,updateCursor:nt}}function layoutSpan(et,tt,nt){const rt=et.start_time_ms??0,ot=et.end_time_ms??rt+1,st=et.child_spans??[];if(st.length===0)return{...et,xStartFrac:(rt+tt)/nt,xWidthFrac:(ot-rt)/nt,yLevel:0,yHeight:1,child_spans:void 0};let ut=0,ct=Number.MAX_VALUE,ft=1;const ht=lodash$2.exports.sortBy(st,yt=>yt.start_time_ms??0).reverse().map(yt=>{const vt=layoutSpan(yt,tt,nt),Tt=vt.start_time_ms??0,Et=vt.end_time_ms??Tt+1;return Et>ct?ut+=ft:ut=0,ct=Tt,ft=vt.yHeight,{...vt,xUnit:(Tt+tt)/nt,xUnitWidth:(Et-Tt)/nt,yLevel:ut}}),mt=(lodash$2.exports.max(ht.map(yt=>yt.yHeight))??1)+1;return{...et,xStartFrac:(rt+tt)/nt,xWidthFrac:(ot-rt)/nt,yLevel:0,yHeight:mt,child_spans:ht}}function makeYAbsolute(et,tt=0){return{...et,parentYLevel:tt-1,yLevel:et.yLevel+tt,child_spans:et.child_spans?.map(nt=>makeYAbsolute(nt,et.yLevel+tt+1))}}function layoutTree(et){const tt=et.start_time_ms??0,nt=et.end_time_ms??tt+1,rt=layoutSpan(et,-tt,nt-tt);return makeYAbsolute(rt)}const flatToTrees=et=>{const tt=[],nt=[],rt={};return et.forEach(ot=>{rt[ot.span_id]={name:ot.name,start_time_ms:ot.start_time_ms,end_time_ms:ot.end_time_ms,attributes:ot.attributes,child_spans:[]}}),et.forEach(ot=>{ot.parent_id===""?tt.push(rt[ot.span_id]):rt[ot.parent_id]==null?nt.push(rt[ot.span_id]):rt[ot.parent_id].child_spans?.push(rt[ot.span_id])}),tt},treesToFlat=et=>{const tt=et;let nt=0;for(;nt<tt.length;){const rt=tt[nt];rt.child_spans?.length&&tt.splice(nt+1,0,...rt.child_spans),nt++}return tt},unifyRoots=et=>{const tt=lodash$2.exports.min(et.map(rt=>rt.start_time_ms??0))??0,nt=lodash$2.exports.max(et.map(rt=>rt.end_time_ms??rt.start_time_ms??0))??tt+1;return{name:"root",start_time_ms:tt,end_time_ms:nt,child_spans:et}},inputType$6={type:"wb_trace_tree"};function getSpanKindStyle(et){switch(et){case"CHAIN":return{color:chainColor,textColor:chainTextColor,label:"Chain",icon:Wt.createElement(ChainSVG,null)};case"AGENT":return{color:agentColor,textColor:agentTextColor,label:"Agent",icon:Wt.createElement(AgentSVG,null)};case"TOOL":return{color:toolColor,textColor:toolTextColor,label:"Tool",icon:Wt.createElement(ToolSVG,null)};case"LLM":return{color:llmColor,textColor:llmTextColor,label:"LLM",icon:Wt.createElement(LLMSVG,null)};default:return{color:"#f3f3f3",textColor:"#494848",label:"Span",icon:Wt.createElement(Wt.Fragment,null)}}}const PanelTraceTreeTrace=et=>{const tt=useNodeValue(et.input),[nt,rt]=Wt.useState(null);return Wt.useEffect(()=>{if(tt.result)try{const ot=JSON.parse(tt.result.root_span_dumps);rt(ot)}catch(ot){console.log(ot)}},[tt.result]),tt.loading?Wt.createElement(Loader,null):nt==null?Wt.createElement("div",null):Wt.createElement(TraceTreeSpanViewer,{span:nt})},TraceTreeSpanViewer=et=>{const{isFullscreen:tt}=Wt.useContext(PanelFullscreenContext),nt=tt?"horizontal":"vertical",rt=et.span,{tipOverlay:ot,showTipOverlay:st}=useTipOverlay(),ut=react.exports.useMemo(()=>layoutTree(rt),[rt]),ct=react.exports.useMemo(()=>treesToFlat([ut]),[ut]),{timelineRef:ft,timelineStyle:pt,scale:ht}=useTimelineZoomAndPan({onHittingMinZoom:st}),[mt,yt]=useUpdatingState(ut);return Wt.createElement(TraceWrapper,{split:nt},Wt.createElement(TraceTimelineWrapper,null,Wt.createElement(TraceTimeline,{ref:ft,style:{...pt},onClick:vt=>{vt.stopPropagation()}},Wt.createElement(TraceTimelineScale,{style:{width:`${(ht??1)*100}%`}},Wt.createElement(SpanElements,{spans:ct,setSelectedSpan:yt,selectedSpan:mt}))),ot),mt&&Wt.createElement(TraceDetail,null,Wt.createElement(SpanTreeDetail,{span:mt})))},getSpanIdentifier=et=>et.name??et._name??et.span_kind??"Unknown",getSpanDuration=et=>et.end_time_ms&&et.start_time_ms?et.end_time_ms-et.start_time_ms:null,TooltipTriggerWrapper=styled$1.div`
  position: relative;

  &&&.tooltip-open:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: ${hexToRGB(BLACK,.04)};
    pointer-events: none;
  }
`,TooltipFrame=styled$1.div`
  padding: 4px 8px;
  background-color: ${WHITE};
  border: 1px solid ${GRAY_200};
`,TooltipBody=styled$1.div`
  font-family: 'Inconsolata';
  font-size: 12px;
  line-height: 140%;
  white-space: nowrap;
`,TooltipLine=styled$1.div`
  ${et=>et.bold&&"font-weight: 600;"}
  ${et=>et.red&&`color: ${RED_DARK};`}
`,SpanElement=({span:et,selectedSpan:tt,setSelectedSpan:nt})=>{const rt=getSpanIdentifier(et),ot=getSpanDuration(et),st=et.status_code==="ERROR",ut=tt===et,ct=getSpanKindStyle(et.span_kind),ft=et.attributes?.execution_order??null,pt=react.exports.useMemo(()=>Wt.createElement(Wt.Fragment,null,Wt.createElement(TooltipLine,{bold:!0},rt),Wt.createElement(TooltipLine,null,ct.label),st&&Wt.createElement(TooltipLine,{red:!0},"Error"),ot!=null&&Wt.createElement(TooltipLine,{red:st},parseFloat(ot.toFixed(3)),"ms")),[rt,ct.label,st,ot]);return Wt.createElement(Wt.Fragment,null,Wt.createElement(TraceTimelineElementWrapper,{style:{position:"absolute",left:`${et.xStartFrac*100}%`,width:`${et.xWidthFrac*100}%`,top:et.yLevel*32,height:et.yHeight*32}},Wt.createElement(TooltipTrigger,{content:pt,showWithoutOverflow:!0,showInFullscreen:!0,noHeader:!0,padding:0,positionNearMouse:!0,TriggerWrapperComp:TooltipTriggerWrapper,FrameComp:TooltipFrame,BodyComp:TooltipBody},Wt.createElement(SpanElementHeader,{hasError:st,isSelected:ut,backgroundColor:ct.color,color:ct.textColor,onClick:ht=>{ht.stopPropagation(),nt(ut?null:et)}},Wt.createElement(SpanElementInner,null,Wt.createElement("div",null,ft!=null?`${ft}: `:"",ct.icon,rt),ot!=null&&Wt.createElement(DurationLabel,null,parseFloat(ot.toFixed(3)),"ms"))))),et.yLevel>et.parentYLevel+1&&Wt.createElement(SpanParentConnector,{className:et.name,backgroundColor:ct.color,style:{position:"absolute",left:`${et.xStartFrac*100}%`,width:2,height:(et.yLevel-et.parentYLevel-1)*32,top:(et.parentYLevel+1)*32,bottom:et.yLevel*32}}))},SpanElementsInner=({spans:et,selectedSpan:tt,setSelectedSpan:nt})=>Wt.createElement(Wt.Fragment,null,et.map((rt,ot)=>Wt.createElement(SpanElement,{key:ot,span:rt,setSelectedSpan:nt,selectedSpan:tt}))),SpanElements=Wt.memo(SpanElementsInner),SpanTreeDetail=et=>{const{span:tt}=et,nt=getSpanKindStyle(tt.span_kind),rt=getSpanIdentifier(tt),ot=getSpanDuration(tt);return Wt.createElement(TraceDetailWrapper,null,Wt.createElement(SpanDetailWrapper,null,Wt.createElement(SpanDetailHeader,null,Wt.createElement("span",null,Wt.createElement("span",{style:{color:nt.textColor}},nt.icon),rt),ot!=null&&Wt.createElement(DurationLabel,null,ot,"ms")),Wt.createElement(SpanDetailTable,null,Wt.createElement("tbody",null,tt.status_message!=null&&Wt.createElement(DetailKeyValueRow,{style:{color:tt.status_code==="ERROR"?"#EB1C45":void 0},label:"Status Message",value:tt.status_message}),tt.results!=null&&Wt.createElement(Wt.Fragment,null,tt.results.map((st,ut)=>Wt.createElement(Wt.Fragment,{key:ut},Wt.createElement("tr",null,Wt.createElement(SpanDetailSectionHeaderTd,{colSpan:2},"Result Set ",ut+1)),st.inputs!=null&&Wt.createElement(Wt.Fragment,null,Wt.createElement("tr",null,Wt.createElement(SpanDetailIOSectionHeaderTd,{colSpan:2},"Inputs")),Object.entries(st.inputs).map(([ct,ft],pt)=>Wt.createElement(DetailKeyValueRow,{key:pt,label:ct,value:ft}))),st.outputs!=null&&Wt.createElement(Wt.Fragment,null,Wt.createElement("tr",null,Wt.createElement(SpanDetailIOSectionHeaderTd,{colSpan:2},"Outputs")),Object.entries(st.outputs).map(([ct,ft],pt)=>Wt.createElement(DetailKeyValueRow,{key:pt,label:ct,value:ft})))))),Wt.createElement("tr",null,Wt.createElement(SpanDetailSectionHeaderTd,{colSpan:2},"Metadata")),tt.span_id!=null&&Wt.createElement(DetailKeyValueRow,{label:"ID",value:tt.span_id}),tt.span_kind!=null&&Wt.createElement(DetailKeyValueRow,{label:"Kind",value:tt.span_kind}),tt.status_code!=null&&Wt.createElement(DetailKeyValueRow,{label:"Status",value:tt.status_code}),tt.start_time_ms!=null&&Wt.createElement(DetailKeyValueRow,{label:"Start Time",value:""+new Date(tt.start_time_ms)}),tt.end_time_ms!=null&&Wt.createElement(DetailKeyValueRow,{label:"End Time",value:""+new Date(tt.end_time_ms)}),tt.child_spans!=null&&tt.child_spans.length>0&&Wt.createElement(DetailKeyValueRow,{label:"Child Spans",value:tt.child_spans.length}),tt.attributes!=null&&Object.entries(tt.attributes).map(([st,ut],ct)=>Wt.createElement(DetailKeyValueRow,{key:ct,label:st,value:ut}))))))},safeValue=et=>typeof et=="string"?et:JSON.stringify(et,null,2),DetailKeyValueRow=et=>{const{label:tt,value:nt}=et,rt=safeValue(nt);return Wt.createElement("tr",{style:et.style},Wt.createElement(KVDetailKeyTD,null,""+tt),Wt.createElement(KVDetailValueTD,null,Wt.createElement(MinimalTooltip,{text:rt},Wt.createElement(KVDetailValueText,null,rt))))},Spec$7={id:"wb_trace_tree-traceViewer",canFullscreen:!0,Component:PanelTraceTreeTrace,inputType:inputType$6},inputType$5={type:"list",objectType:{type:"union",members:[{type:"wb_trace_tree"},"none"]}},hardCodedConfig={pinnedRows:{"":[]}},makeTableState$1=(et,tt)=>{const nt={};let rt=emptyTable();const ot=getRowExampleNode(rt.preFilterFunction,rt.groupBy,rt.columnSelectFunctions,rt.columnNames,rt.order,rt.sort,et,tt),st=varNode(ot.type,"row");return rt=addNamedColumnToTable(rt,"Success",opPick({obj:st,key:constString("isSuccess")})),nt[rt.order[rt.order.length-1]]=70,rt=addNamedColumnToTable(rt,"",opPick({obj:st,key:constString("startTime")})),nt[rt.order[rt.order.length-1]]=0,rt=enableSortByCol(rt,rt.order[rt.order.length-1],!1),rt=addNamedColumnToTable(rt,"Timestamp",opNumberToTimestamp({val:opPick({obj:st,key:constString("startTime")})})),nt[rt.order[rt.order.length-1]]=175,rt=addNamedColumnToTable(rt,"Input",opPick({obj:st,key:constString("formattedInput")}),{panelID:"string",panelConfig:{mode:"markdown"}}),rt=addNamedColumnToTable(rt,"Output",opPick({obj:st,key:constString("formattedOutput")}),{panelID:"string",panelConfig:{mode:"markdown"}}),rt=addNamedColumnToTable(rt,"Chain",opPick({obj:st,key:constString("formattedChain")}),{panelID:"string",panelConfig:{mode:"markdown"}}),nt[rt.order[rt.order.length-1]]=100,rt=addNamedColumnToTable(rt,"Error",opPick({obj:st,key:constString("error")})),nt[rt.order[rt.order.length-1]]=100,rt=addNamedColumnToTable(rt,"Model ID",opPick({obj:st,key:constString("modelHash")})),nt[rt.order[rt.order.length-1]]=75,{ts:rt,columnWidths:nt}},PanelTraceTreeTraceTableViewer=et=>{const[tt,nt]=Wt.useState(null),[rt,ot]=Wt.useState(0),st=useNodeValue(opCount({arr:et.input})),ut=opSort({arr:et.input,compFn:constFunction({row:listObjectType(et.input.type)},({row:Mt})=>opArray({a:opWBTraceTreeStartTime({trace_tree:Mt})})),columnDirs:opArray({a:constString("asc")})}),ct=opWBTraceTreeSummary({trace_tree:ut}),ft=opIndex({arr:ct,index:constNumber(tt??0)}),pt=opIndex({arr:ut,index:constNumber(tt??0)}),ht=pt,mt=pt,yt=opPick({obj:ft,key:constString("modelHash")}),vt=useNodeValue(yt),Tt=useWeaveContext(),{ts:Et,columnWidths:xt}=react.exports.useMemo(()=>makeTableState$1(ct,Tt),[ct,Tt]),[At,Ct]=useConfig$4(),[$t,Ot]=useConfig$4(),[Rt,It]=useConfig$4({tableState:Et,columnWidths:xt,rowSize:1,...hardCodedConfig}),kt=react.exports.useCallback(Mt=>{const Ft=Mt.pinnedRows!=null&&""in Mt.pinnedRows?Mt.pinnedRows[""]:[],zt=Mt.activeRowForGrouping!=null&&""in Mt.activeRowForGrouping?Mt.activeRowForGrouping[""]:0;Ft.length>0&&(Mt.pinnedRows[""]=[]),zt!==tt&&nt(zt),It({...Mt,...hardCodedConfig})},[tt,It]);return react.exports.useEffect(()=>{!st.loading&&st.result>0&&tt===null&&kt({activeRowForGrouping:{"":st.result-1}})},[st.loading,st.result,tt,kt]),Wt.createElement(LCTWrapper,null,Wt.createElement(LCTTableSection,null,Wt.createElement(SimpleTabs,{panes:[{menuItem:{key:"traces",content:"All Traces"},render:()=>Wt.createElement(TabWrapper,null,Wt.createElement(PanelTable,{input:ct,config:Rt,context:dummyProps.context,updateContext:dummyProps.updateContext,updateConfig:kt}))}]})),Wt.createElement(LCTDetailView,null,tt!=null&&Wt.createElement(SimpleTabs,{activeIndex:rt,onTabChange:(Mt,Ft)=>{ot(Ft?.activeIndex??0)},panes:[{menuItem:{key:"trace",content:`Trace Timeline (#${tt+1})`},render:()=>Wt.createElement(TabWrapper,null,Wt.createElement(PanelComp2,{panelSpec:Spec$7,input:mt,inputType:mt.type,config:$t,configMode:!1,context:dummyProps.context,updateContext:dummyProps.updateContext,updateConfig:Ot}))},vt.result&&{menuItem:{key:"model",content:`Model Architecture (ID: ${vt.result})`},render:()=>Wt.createElement(TabWrapper,null,Wt.createElement(PanelTraceTreeModel,{input:ht,config:At,context:dummyProps.context,updateContext:dummyProps.updateContext,updateConfig:Ct}))}]})))},Spec$6={id:"wb_trace_tree-traceDebugger",displayName:"LLM Trace Debugger",Component:PanelTraceTreeTraceTableViewer,inputType:inputType$5},inputType$4={type:"list",objectType:{type:"typedDict",propertyTypes:{trace_id:{type:"union",members:["string","none"]},span_id:{type:"union",members:["string","none"]},parent_id:{type:"union",members:["string","none"]},name:{type:"union",members:["string","none"]},start_time_ms:{type:"union",members:["number","none"]},end_time_ms:{type:"union",members:["number","none"]},attributes:{type:"union",members:[{type:"typedDict",propertyTypes:{}},"none"]}}}},PanelTraceRender=et=>{const tt=react.exports.useMemo(()=>{const ot=opLimit({arr:et.input,limit:constNumber(1e4)});return opMap({arr:ot,mapFn:constFunction({row:listObjectType(et.input.type),index:"number"},({row:st,index:ut})=>opDict({name:opPick({obj:st,key:constString("name")}),start_time_ms:opPick({obj:st,key:constString("start_time_ms")}),end_time_ms:opPick({obj:st,key:constString("end_time_ms")}),trace_id:opPick({obj:st,key:constString("trace_id")}),span_id:opPick({obj:st,key:constString("span_id")}),parent_id:opPick({obj:st,key:constString("parent_id")})}))})},[et.input]),nt=useNodeValue(tt),rt=react.exports.useMemo(()=>nt.loading?null:unifyRoots(flatToTrees(nt.result)),[nt.loading,nt.result]);return rt==null?Wt.createElement(Loader,null):Wt.createElement(TraceTreeSpanViewer,{span:rt})},Spec$5={id:"Trace",canFullscreen:!0,Component:PanelTraceRender,inputType:inputType$4},inputType$3="unknown",PanelNumber=et=>{const tt=useNodeValue(et.input);return tt.loading?Wt.createElement("div",null,"-"):Wt.createElement("div",{style:{maxWidth:200,overflow:"auto"}},Wt.createElement("pre",null,JSON.stringify(tt.result,void 0,2)))},Spec$4={id:"unknown",Component:PanelNumber,inputType:inputType$3},VideoViewer=et=>{const{videoFilename:tt,videoSrc:nt,refreshTimestamp:rt,headerElement:ot,footerElement:st,failedLoadElement:ut,mediaFailedToLoad:ct,setDomLoadFailed:ft,autoPlay:pt,muted:ht}=et,mt=react.exports.useRef(null),[yt,vt]=react.exports.useState(),[Tt,Et]=react.exports.useState(),[xt,At]=react.exports.useState(!1),[Ct,$t]=react.exports.useState(!1),[Ot,Rt]=react.exports.useState(0),It=react.exports.useRef(null),[kt,Mt]=react.exports.useState(null);react.exports.useLayoutEffect(()=>()=>Mt(null),[nt]);const Ft=react.exports.useCallback(()=>{ft?.(!0);const Sn=mt.current?.error;Sn!=null&&Mt(getMediaErrorMessage(Sn))},[ft]),zt=tt||nt,Vt=yt||et.width,Zt=Tt||et.height,Ut=Wt.useCallback(()=>{if(mt.current==null)return;const Sn=mt.current.currentTime;mt.current.src=nt,mt.current.currentTime=Sn},[nt]);react.exports.useEffect(()=>{Ut()},[Ut,rt]),react.exports.useEffect(()=>{if(mt.current&&(mt.current.muted=ht??!0,pt&&mt.current.paused))try{mt.current.play()}catch{}},[ht,pt]),react.exports.useLayoutEffect(()=>{It.current&&Rt(It.current.getBoundingClientRect().height)},void 0);const Xt=Sn=>{const In=Sn.target;let _n,En;if(In.videoWidth){const Ln=In;_n=Ln.videoWidth,En=Ln.videoHeight}else{const Ln=In;_n=Ln.naturalWidth,En=Ln.naturalHeight}vt(_n),Et(En),$t(!0)};let Jt;(!Ct||ct)&&(Jt={maxWidth:0,maxHeight:0});const gn={width:"100%",height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",justifyContent:"stretch",alignItems:"stretch",boxShadow:"none"},An={cursor:"pointer",overflow:"hidden",...Jt,objectFit:"contain",width:"100%",height:"100%"},sn=Wt.createElement(Wt.Fragment,null,!Ct&&Wt.createElement(Placeholder$1,{style:{width:Vt,height:Zt}},Wt.createElement(Placeholder$1.Image,null)),ct?ut:Wt.createElement(Wt.Fragment,null,zt.match(/.gif$/)?Wt.createElement("img",{src:nt,alt:zt,style:An,onLoad:Xt,onError:Ft}):Wt.createElement("div",{className:"video-container",ref:It,style:An},Ot>0&&Wt.createElement("div",{className:`video-card__play-btn__${xt?"visible":"hidden"}`,style:{margin:Ot*.03,width:Ot*.2,height:Ot*.2}},Wt.createElement("i",{className:"play icon",style:{fontSize:Ot*.1,paddingLeft:Ot*.02}})),Wt.createElement("video",{autoPlay:pt??!1,ref:mt,loop:!0,muted:!0,onClick:Sn=>{const In=Sn.target;In.paused?(In.play(),At(!1)):(In.pause(),At(!0))},onLoadedData:Xt,onError:Ft,src:nt}))));return Wt.createElement(Card$1,{className:"video-card content-card",style:gn},ot,kt!=null?Wt.createElement(PanelError,{message:Wt.createElement("div",{style:{width:Vt,height:Zt}},kt)}):sn,st)};function getMediaErrorMessage({code:et,message:tt}){return et===MediaError.MEDIA_ERR_ABORTED?`Fetching video was aborted: ${tt}`:et===MediaError.MEDIA_ERR_NETWORK?`Error fetching video over the network: ${tt}`:et===MediaError.MEDIA_ERR_DECODE?`Error decoding video: ${tt}`:et===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED?"This video's codec is not supported by your browser. Please try another browser to view your logged video, or log it using a different codec.":`Error displaying video: ${tt}`}const inputType$2={type:"video-file"},PanelVideoConfigComponent=et=>{const{config:tt,updateConfig:nt}=et,{autoPlay:rt,muted:ot}=tt??{};return Wt.createElement(Wt.Fragment,null,Wt.createElement(ConfigOption,{label:""},Wt.createElement(Popup$1,{content:"NOTE: Some browsers disallow autoplay on videos with audio.",position:"left center",trigger:Wt.createElement(Checkbox$2,{checked:rt??!1,onChange:(st,{checked:ut})=>nt({autoPlay:!!ut}),label:"Autoplay",help:"Automatically play the video when it loads"})})),Wt.createElement(ConfigOption,{label:""},Wt.createElement(Checkbox$2,{checked:ot??!0,onChange:(st,{checked:ut})=>nt({muted:!!ut}),label:"Muted",help:"Mute the video"})))},PanelVideo=et=>{const{input:tt,config:nt}=et,{autoPlay:rt,muted:ot}=nt??{},st=useAssetURLFromArtifact(tt);return st.loading?Wt.createElement("div",null):st.asset==null||st.directUrl==null?Wt.createElement("div",null,"No Video"):Wt.createElement(VideoViewer,{videoFilename:st.asset.path,videoSrc:st.directUrl,width:st.asset.width,height:st.asset.height,autoPlay:rt,muted:ot})},Spec$3={id:"video-file",displayName:"Video",Component:PanelVideo,ConfigComponent:PanelVideoConfigComponent,inputType:inputType$2,canFullscreen:!0,defaultFixedSize:{width:100,height:3/4*100}},PanelWBObject=et=>{const tt=opFileMedia({file:et.input}),nt=Spec$2.convert(et.inputType??et.input.type);if(nt==null)throw new Error("Invalid (null) PanelWBObject input type");return Wt.createElement(PanelComp2,{inputType:nt,input:tt,loading:et.loading,panelSpec:et.child,configMode:!1,config:et.config,context:et.context,updateConfig:et.updateConfig,updateContext:et.updateContext})},Spec$2={id:"object-file",Component:PanelWBObject,convert:et=>isFileLike(et)?fileWbObjectType(et)??null:null},inputType$1={type:"file",extension:"bag"},PanelWebViz=et=>{const tt=et.input,nt=opFileDirectUrl({file:tt}),rt=useNodeValue(nt);if(rt.loading)return Wt.createElement(WandbLoader,{name:"panel-web-viz"});const ot=rt.result;if(ot==null)return Wt.createElement(Wt.Fragment,null);const st=window.thirdPartyAnalyticsOK?"&telemetry=1":"",{urlPrefixed:ut}=getConfig();return Wt.createElement("iframe",{style:{width:"100%",height:"100%",border:"none"},title:"WebViz preview",src:ut(`/webviz/index.html?remote-bag-url=${encodeURIComponent(ot)}${st}`)})},Spec$1={id:"web-viz",Component:PanelWebViz,inputType:inputType$1};let panelSpecs=[];const initSpecs=()=>{panelSpecs.length===0&&(panelSpecs=[Spec$19,Spec$_,Spec$Z,Spec$Y,Spec$f,Spec$1b,Spec$1c,TableSpec,Spec$J,Spec$16,Spec$N,Spec$1e,Spec$10,Spec$I,Spec$S,Spec$M,Spec$b,Spec$a,Spec$R,Spec$O,Spec$4,Spec$V,Spec$L,Spec$F,Spec$e,Spec$g,Spec$X,Spec$W,Spec$15,Spec$13,Spec$14,Spec$11,Spec$12,Spec$P,Spec$9,Spec$1,Spec$3,Spec$1f,Spec$$,Spec$1d,Spec$K,Spec$T,Spec$c,Spec$1a,Spec$Q,Spec$1g,Spec$6,Spec$7,Spec$8,Spec$5,Spec$18].concat(weavePythonPanelSpecs()))},PanelSpecs=()=>(initSpecs(),[...panelSpecs]),registerPanel=et=>{initSpecs();const tt=panelSpecs.findIndex(nt=>nt.id===et.id);tt===-1?panelSpecs.push(et):panelSpecs[tt]=et};let converterSpecs=[];const ConverterSpecs=()=>converterSpecs.length>0?converterSpecs:converterSpecs=[Spec$h,Spec$2,Spec$U,toConvertSpec(Spec$1h),toConvertSpec(Spec$H),toConvertSpec(Spec$d)],getTypeHandlerStacksInternal=et=>{const tt=_getTypeHandlerStacks(et,PanelSpecs(),ConverterSpecs(),isAssignableTo);return lodash$2.exports.sortBy(tt,nt=>nt.id.startsWith("execute")?0:1)},typeHandlerCache={},getTypeHandlerStacks=et=>{const tt=JSON.stringify(et);let nt=typeHandlerCache[tt];return nt!=null||(nt=lodash$2.exports.uniqBy(getTypeHandlerStacksInternal(et),rt=>getStackIdAndName(rt).id),typeHandlerCache[tt]=nt),nt};function scoreHandlerStack(et,tt){const nt=getStackIdAndName(tt);let rt=0;return nt.id.startsWith(Spec$1h.id)&&(rt+=10),nt.id.endsWith("-file")&&(rt+=10),nt.id.startsWith("row")&&!isMediaTypeLike(listObjectType(nullableTaggableValue(et)))&&(rt-=5),nt.id.indexOf("row.row")>-1&&(rt-=10),!isWithChild(tt)&&isAssignableTo({type:"list",objectType:"any"},panelSpecById(tt.id).inputType)&&isListLike(et)&&!isTypedDictLike(nullableTaggableValue(listObjectType(nullableTaggableValue(et))))&&(rt-=10),(isAssignableTo("invalid",tt.inputType)||isAssignableTo(list$1("invalid"),tt.inputType))&&tt.id!=="table"&&!nt.id.endsWith("plot")&&(rt-=15),tt.inputType==="any"&&(rt-=50),nt.id.indexOf("Facet")>-1&&(rt-=10),(nt.id.includes("Expression")||nt.id.includes("Auto")||nt.id.includes("object")||nt.id.includes("any-obj")||nt.id.includes("debug-expression-graph"))&&(rt-=50),rt}function stackHasHiddenPanel(et){return et.hidden?!0:isWithChild(et)?stackHasHiddenPanel(et.child):!1}function getPanelStacksForType(et,tt,nt={}){let rt=getTypeHandlerStacks(et);const ot=nt.allowedPanels;ot!=null?rt=rt.filter(mt=>ot.includes(getStackIdAndName(mt).id)):(rt=rt.filter(mt=>getStackIdAndName(mt).id===tt||!stackHasHiddenPanel(mt)),nt.excludeTable&&(rt=rt.filter(mt=>!getStackIdAndName(mt).id.endsWith("table")&&!getStackIdAndName(mt).id.includes("wb_trace_tree-"))),nt.excludeMultiTable&&(rt=rt.filter(mt=>!getStackIdAndName(mt).id.startsWith(Spec$1h.id))),nt.excludePlot&&(rt=rt.filter(mt=>!getStackIdAndName(mt).id.endsWith("plot"))),nt.excludeBarChart&&(rt=rt.filter(mt=>!getStackIdAndName(mt).id.endsWith("barchart"))),nt.showDebug||(rt=rt.filter(mt=>getStackIdAndName(mt).id.indexOf("debug")===-1)),nt.stackIdFilter!=null&&(rt=rt.filter(mt=>nt.stackIdFilter(getStackIdAndName(mt).id))),rt=rt.filter(mt=>getStackIdAndName(mt).id.indexOf("projection")===-1||getStackIdAndName(mt).id.endsWith("plot")),rt=rt.sort((mt,yt)=>scoreHandlerStack(et,yt)-scoreHandlerStack(et,mt)));const st=rt.map(getStackIdAndName),ut=st.findIndex(mt=>mt.id===tt);let ct=-1;tt!=null&&tt!==""&&(ct=st.findIndex(mt=>mt.id.endsWith(tt)),ct===-1&&(ct=st.findIndex(mt=>mt.id.split(".")[0]===tt.split(".")[0])));let ft;if(ut!==-1)ft=tt;else if(ct!==-1)ft=st[ct].id;else if(st.length>0){const mt=rt.filter(yt=>!getStackIdAndName(yt).id.includes("Group"));mt.length>0&&(ft=getStackIdAndName(mt[0]).id)}ft==="Group"&&tt!=="Group"&&(ft="Expression");const pt=st.findIndex(mt=>mt.id===ft),ht=pt!==-1?rt[pt]:void 0;return{curPanelId:ft,stackIds:st,handler:ht}}function usePanelStacksForType(et,tt,nt={}){return nt=useDeepMemo$1(nt),react.exports.useMemo(()=>getPanelStacksForType(et,tt,{...nt,excludePlot:nt.excludePlot,excludeMultiTable:nt.excludeMultiTable||nt.excludeTable}),[et,tt,nt])}function getPanelStackDims(et,tt,nt){if(et==null)return{width:void 0,height:void 0};if(isWithChild(et)){const ct=getPanelStackDims(et.child,et.convert(tt),nt);return et.defaultFixedSize!=null?et.defaultFixedSize(ct,tt,nt):{width:void 0,height:void 0}}const{defaultFixedSize:rt}=et,ot=typeof rt=="function"?rt(nt):rt,{height:st,width:ut}=ot??{};return{height:st,width:ut}}function panelSpecById(et){return PanelSpecs().find(tt=>tt.id===et)}const PanelExportUpdaterContext=Wt.createContext({addPanel:()=>{}});Wt.memo(({addPanel:et,children:tt})=>{const nt=react.exports.useMemo(()=>et??(ot=>console.log("Add panel not implemented")),[et]),rt=react.exports.useMemo(()=>({addPanel:nt}),[nt]);return Wt.createElement(PanelExportUpdaterContext.Provider,{value:rt},tt)});const WeaveMessageWrapper=styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  padding: 32px;
  align-items: center;
  align-content: space-around;
  justify-content: space-around;
`,WeaveMessageBody=styled$1.div`
  background: ${errorBackground};
  max-width: 50%;
  padding: 16px;
  > div:not(:last-child) {
    margin-bottom: 8px;
  }
`,WeaveMessage=({children:et})=>Wt.createElement(WeaveMessageWrapper,null,Wt.createElement(WeaveMessageBody,null,et));class PanelCompErrorBoundary extends Wt.Component{static getDerivedStateFromError(tt){return tt instanceof InvalidGraph?{hasError:!0,customMessage:`Evaluation error: ${tt.message}`}:{hasError:!0}}constructor(tt){super(tt),this.state={hasError:!1}}componentDidCatch(tt,nt){if(tt instanceof NullResult&&this.props.inPanelMaybe)throw tt;if(tt instanceof InvalidGraph){this.props.onInvalidGraph?.(tt.node);return}}componentDidUpdate(tt){tt.children!==this.props.children&&this.state.hasError&&this.setState({hasError:!1,customMessage:void 0})}render(){return this.state.hasError?Wt.createElement(WeaveMessage,null,this.state.customMessage||"Something went wrong. Check the javascript console."):this.props.children}}const PanelCompContext=Wt.createContext({panelPath:[]});PanelCompContext.displayName="PanelCompContext";const PanelFullscreenContext=Wt.createContext({isFullscreen:!1,goFullscreen:()=>{}});PanelFullscreenContext.displayName="PanelFullscreenContext";const PanelComp2Component=et=>{const tt=react.exports.useContext(PanelCompContext);return Wt.createElement(PanelCompContext.Provider,{value:{panelPath:tt.panelPath.concat(et.panelSpec.id)}},Wt.createElement(PanelComp2Inner,{...et}))},PanelComp2=Wt.memo(PanelComp2Component);function useUpdateConfig2(et){const{config:tt,updateConfig:nt}=et;let{updateConfig2:rt}=et;return rt==null&&(rt=react.exports.useCallback(ot=>{nt(ot(tt))},[tt,nt])),rt}const PanelComp2Inner=et=>{const tt=useWeaveDashUiEnable(),{panelSpec:nt,configMode:rt}=et,ot=useUpdateConfig2(et);let st=react.exports.useMemo(()=>nt==null?Wt.createElement(Wt.Fragment,null):et.loading?Wt.createElement(Panel2Loader,null):isWithChild(nt)?isTransform(nt)?rt?Wt.createElement(ConfigTransformerComp,{...et}):Wt.createElement(RenderTransformerComp,{...et}):rt?nt.ConfigComponent!=null?Wt.createElement(nt.ConfigComponent,{...et,child:nt.child,updateConfig2:ot}):Wt.createElement(PanelComp2,{...et,panelSpec:nt.child}):Wt.createElement(nt.Component,{...et,child:nt.child,updateConfig2:ot}):rt?nt.ConfigComponent!=null?Wt.createElement(nt.ConfigComponent,{...et,updateConfig2:ot}):Wt.createElement(Wt.Fragment,null):Wt.createElement(nt.Component,{...et,updateConfig2:ot}),[nt,et,rt,ot]);const{inPanelMaybe:ut}=usePanelContext();return st=react.exports.useMemo(()=>tt?Wt.createElement(PanelCompErrorBoundary,{inPanelMaybe:ut},st):st,[tt,ut,st]),et.input.nodeType==="void"?Wt.createElement(Panel2SizeBoundary,null,Wt.createElement(Wt.Suspense,{fallback:Wt.createElement(Panel2Loader,null)},st)):Wt.createElement(Panel2SizeBoundary,null,Wt.createElement(ControlWrapper,{panelProps:et},Wt.createElement(Wt.Suspense,{fallback:Wt.createElement(Panel2Loader,null)},st)))},useSplitTransformerConfigs=(et,tt)=>{et=react.exports.useMemo(()=>et??{},[et]);const nt=useDeepMemo$1(_$2.omit(et,"childConfig")),rt=react.exports.useMemo(()=>et.childConfig??{},[et.childConfig]),ot=react.exports.useCallback(ut=>tt({...ut,childConfig:rt}),[tt,rt]),st=react.exports.useCallback(ut=>tt({...et,childConfig:{...rt,...ut}}),[tt,et,rt]);return{baseConfig:nt,updateBaseConfig:ot,childConfig:rt,updateChildConfig:st}},useTransformerChild=(et,tt,nt)=>{const rt=tt.child,ot=react.exports.useMemo(()=>callOpVeryUnsafe(panelIdToPanelOpName(tt.id),{input:et,config:constNodeUnsafe("any",nt)}),[tt.id,nt,et]),{loading:st,result:ut}=useExpandedNode(ot);return{loading:st,childInputNode:ut,childPanelSpec:rt}},ConfigTransformerComp=et=>{const{panelSpec:tt,updateConfig:nt,config:rt}=et,ot=useUpdateConfig2(et),{baseConfig:st,updateBaseConfig:ut,childConfig:ct,updateChildConfig:ft}=useSplitTransformerConfigs(rt,nt),{loading:pt,childInputNode:ht,childPanelSpec:mt}=useTransformerChild(et.input,tt,st);return Wt.createElement(Wt.Fragment,null,tt.ConfigComponent!=null&&Wt.createElement(tt.ConfigComponent,{...et,config:st,child:mt,updateConfig:ut,updateConfig2:ot}),Wt.createElement(PanelComp2,{...et,input:ht,loading:pt,inputType:ht.type,config:ct,updateConfig:ft,panelSpec:mt}))},RenderTransformerComp=et=>{const{panelSpec:tt,updateConfig:nt,config:rt}=et,{baseConfig:ot,childConfig:st,updateChildConfig:ut}=useSplitTransformerConfigs(rt,nt),{loading:ct,childInputNode:ft,childPanelSpec:pt}=useTransformerChild(et.input,tt,ot);return Wt.createElement(PanelComp2,{...et,input:ft,loading:ct,inputType:ft.type,config:st,updateConfig:ut,panelSpec:pt})},shouldEnableFullscreen=_$2.memoize((et,tt,nt,rt)=>{if(!tt||rt)return!1;let ot=et.slice(0,-1).reverse();const st=ot.findIndex(ut=>ut==="table");return st!==-1&&(ot=ot.slice(0,st+1)),!(ot.some(ut=>ut==="row")&&!nt)},(et,tt,nt,rt)=>`${et.join(":")}|${rt}|${tt}|${nt}`),ControlWrapper=({panelProps:et,children:tt})=>{const nt=useWeaveFeaturesContext().betaFeatures["weave-devpopup"],rt=react.exports.useContext(PanelFullscreenContext),{isFullscreen:ot}=rt,{panelPath:st}=react.exports.useContext(PanelCompContext),[ut,ct]=react.exports.useState(!1),[ft,pt]=react.exports.useState(!1),ht=react.exports.useRef(null),mt=react.exports.useCallback(()=>{const It=window.setTimeout(()=>{ht.current===It&&pt(!0)},HOVER_DELAY_MS);ht.current=It},[]),yt=react.exports.useCallback(()=>{pt(!1),ht.current=null},[]),vt=et.panelSpec.ConfigComponent,Tt=shouldEnableFullscreen(st,et.panelSpec.canFullscreen??!1,ot,et.configMode),Et=nt&&!et.configMode,xt=!et.noPanelControls&&(Tt||Et),[At,Ct]=react.exports.useState(et.config),$t=react.exports.useCallback(It=>{Ct({...At,...It})},[Ct,At]),Ot=react.exports.useCallback(()=>{At!==et.config&&et.updateConfig(At),ct(!1)},[At,et]),Rt=react.exports.useMemo(()=>Tt?()=>{ct(!0)}:rt.goFullscreen,[Tt,rt.goFullscreen]);return xt||ut?Wt.createElement(ControlWrapper$1,{hovering:ft,onMouseEnter:()=>{mt()},onMouseLeave:()=>{yt()},canFullscreen:Tt},Wt.createElement(ControlWrapperBar,{hovering:ft},Et&&Wt.createElement(DevQueryPopup,{panelProps:et}),Tt&&Wt.createElement(IconButton,{"data-test":"panel-fullscreen-button",onClick:It=>{It.stopPropagation(),ct(!0),pt(!1)},style:{cursor:"pointer"}},Wt.createElement(FullscreenButton,null))),Wt.createElement(ControlWrapperContent,{canFullscreen:Tt},Wt.createElement(Modal$3,{open:ut,size:"fullscreen",onClose:Ot,onOpen:()=>ct(!0)},Wt.createElement(Modal$3.Content,{style:{height:"calc(90vh - 73px)",overflow:"hidden",display:"flex"}},Wt.createElement("div",{style:{flex:"1 1 auto",marginRight:"30px"}},Wt.createElement(PanelFullscreenContext.Provider,{value:{isFullscreen:ut,goFullscreen:Rt}},Wt.createElement(PanelComp2,{...et,noPanelControls:!0,config:At,updateConfig:$t}))),vt!=null&&Wt.createElement("div",{style:{flex:"0 0 300px"}},Wt.createElement(PanelComp2,{...et,noPanelControls:!0,configMode:!0,config:At,updateConfig:$t}))),Wt.createElement(Modal$3.Actions,null,Wt.createElement(Button$3,{"data-test":"panel-fullscreen-modal-close-button",onClick:Ot},"Close"))),Wt.createElement(PanelFullscreenContext.Provider,{value:{isFullscreen:ut,goFullscreen:Rt}},tt))):Wt.createElement(ControlWrapper$1,{hovering:!1},Wt.createElement(PanelFullscreenContext.Provider,{value:{isFullscreen:ot,goFullscreen:Rt}},tt))},DevQueryPopupContent=et=>{const tt=useWeaveContext(),[nt,rt]=react.exports.useState("string"),{panelProps:ot}=et,{addPanel:st}=react.exports.useContext(PanelExportUpdaterContext),ut=useSimplifiedNode(ot.input),ct=ut.loading?voidNode():ut.result;return Wt.createElement("div",{style:{maxHeight:600,maxWidth:600,overflow:"auto",fontSize:14,whiteSpace:"nowrap"}},Wt.createElement("div",null,Wt.createElement("span",null,Wt.createElement("span",{style:{fontWeight:"bold",marginRight:8}},"Query"),Wt.createElement("span",{style:{cursor:"pointer",borderBottom:nt==="string"?"1px solid #888":void 0},onClick:()=>rt("string")},"string")," | ",Wt.createElement("span",{style:{cursor:"pointer",borderBottom:nt==="dag"?"1px solid #888":void 0},onClick:()=>rt("dag")},"dag"))," ",ct!=null?nt==="string"?Wt.createElement("pre",{style:{fontSize:12}},tt.expToString(ct)):Wt.createElement(ComputeGraphViz,{node:ct,width:600,height:300}):Wt.createElement("span",null,"TODO: Node not available")),Wt.createElement("div",{onClick:()=>copyToClipboard(defaultLanguageBinding.printType(ot.input.type,!1))},Wt.createElement("span",{style:{fontWeight:"bold"}},"Input type")," ",Wt.createElement("pre",{style:{fontSize:12}},defaultLanguageBinding.printType(ot.input.type))),Wt.createElement("div",null,Wt.createElement("span",{style:{fontWeight:"bold"}},"Panel")," ",ot.panelSpec.id),ot.config!=null&&Wt.createElement("div",null,Wt.createElement("span",{style:{fontWeight:"bold"}},"Config")," ",JSON.stringify(ot.config,void 0,2)),Wt.createElement(Button$3,{style:{marginTop:16,padding:"4px 8px"},onClick:()=>{st({node:ct,panelId:getStackIdAndName(ot.panelSpec).id,config:ot.config})}},"New query"))},DevQueryPopup=et=>{const[tt,nt]=react.exports.useState(!1),{panelProps:rt}=et;return Wt.createElement(Popup$1,{trigger:Wt.createElement("span",null,Wt.createElement(IconButton,null,Wt.createElement(DevQueryIcon,{style:{transform:"translateY(-4px)"}}))),open:tt,onOpen:()=>nt(!0),onClose:()=>nt(!1),hoverable:!0,content:tt&&Wt.createElement(DevQueryPopupContent,{panelProps:rt})})},Panel2Loader=()=>Wt.createElement(Panel2LoaderStyle,{"data-test":"loader"}),Panel=et=>{const tt=react.exports.useMemo(()=>typeof et.panelSpec=="string"?panelSpecById(et.panelSpec):et.panelSpec,[et.panelSpec]),nt=PanelComp2;return Wt.createElement(nt,{input:et.input,panelSpec:tt,configMode:!1,config:et.config,updateConfig:et.updateConfig,updateConfig2:et.updateConfig2,updateInput:et.updateInput})},PanelConfigEditor=et=>{const tt=react.exports.useMemo(()=>typeof et.panelSpec=="string"?panelSpecById(et.panelSpec):et.panelSpec,[et.panelSpec]),nt=PanelComp2;return Wt.createElement(nt,{input:et.input,panelSpec:tt,configMode:!0,config:et.config,updateConfig:et.updateConfig,updateConfig2:et.updateConfig2,updateInput:et.updateInput})};class ReactCGEventTracker{constructor(){this.useNodeValue=0,this.cgEventTracker=GlobalCGEventTracker}reset(){this.useNodeValue=0,this.cgEventTracker.reset()}summary(){const tt=this.cgEventTracker.summary(),nt=tt._1_nodeSubscriptions.toRouted.toRemoteCache+tt._1_nodeSubscriptions.toRouted.toBasicClientLocal+tt._1_nodeSubscriptions.toEcosystem.toRemoteCache+tt._1_nodeSubscriptions.toProduction.toBasicClientLocal;return{_0_useNodeValue:{resolvedWithCache:this.useNodeValue-nt,toNodeSubscriptions:nt},...tt}}}const GlobalCGReactTracker=new ReactCGEventTracker,useClientContext=()=>react.exports.useContext(ClientContext);class NullResult{constructor(tt){this.node=tt}}class InvalidGraph{constructor(tt,nt){this.message=tt,this.node=nt}}const clientEval=(et,tt)=>{if(et.nodeType==="var"){const ot=resolveVar(tt,et.varName);if(ot?.closure.value.nodeType==="var"&&ot.closure.value.varName==="__boundVar__"||!ot)return et;const{closure:st}=ot;return clientEval(st.value,st.stack)}else if(et.nodeType==="const"&&isFunctionType(et.type)){let ot=tt;for(const[ut,ct]of Object.entries(et.type.inputTypes))ot=pushFrame(ot,{[ut]:varNode(ct,"__boundVar__")});const st=clientEval(et.val,ot);return{...et,val:st}}else if(et.nodeType!=="output")return et;const{name:nt}=et.fromOp,rt=_$2.mapValues(et.fromOp.inputs,ot=>clientEval(ot,tt));if(_$2.map(rt,ot=>isConstNode(ot)&&!isFunction$b(ot.type)).every(ot=>ot)){const ot=_$2.mapValues(rt,st=>st.val);if(nt==="execute"){const st=clientEval(ot.node,tt);return isConstNode(st)?st:{...et,fromOp:{name:et.fromOp.name,inputs:{node:constNodeUnsafe({type:"function",inputTypes:{},outputType:st.type},st)}}}}else if(nt==="Object-__getattr__"||nt==="pick"||nt==="index"||nt==="dict"||nt==="list"||nt==="timestamp"){let st=callResolverSimple(nt,ot,et.fromOp);return st!=null&&st.nodeType!=null&&(st=clientEval(st,tt)),constNodeUnsafe(et.type,st)}}return{...et,fromOp:{...et.fromOp,inputs:rt}}},errorToText=et=>et instanceof Error?et.message+`

Stack:
`+et.stack:typeof et=="string"?et:typeof et=="object"&&et!=null&&et.message!=null&&et.traceback!=null&&_$2.isArray(et.traceback)?et.message+`

Traceback:
`+et.traceback.join(`
`):typeof et=="object"&&et!=null&&et.message!=null&&et.stack!=null?et.message+`

Stack:
`+et.stack:"";let useNodeValueId=0;const useId=()=>react.exports.useRef(useNodeValueId++).current,useNodeValue=(et,tt)=>{const nt=tt?.memoCacheId??0,rt=tt?.callSite,ot=tt?.skip,st=useWeaveDashUiEnable(),ut=useWeaveContext(),ct=react.exports.useContext(PanelCompContext),pt=useClientContext().client,{stack:ht,inPanelMaybe:mt}=usePanelContext();et=react.exports.useMemo(()=>dereferenceAllVars(et,ht).node,[et,ht]),et=useRefEqualWithoutTypes(et),et=react.exports.useMemo(()=>st?clientEval(et,ht):et,[st,et,ht]),GlobalCGReactTracker.useNodeValue++,et=useDeepMemo$1({node:et,memoCacheId:nt}).node;const[yt,vt]=react.exports.useState(),[Tt,Et]=react.exports.useState({node:voidNode(),value:void 0});react.exports.useEffect(()=>{if(!isWeaveDebugEnabled())return;let At=ut.expToString(et);At.length>100&&(At=At.slice(0,40)+"..."+At.slice(-40)),console.debug(`[Weave] [${(performance.now()/1e3).toFixed(3)}s] ${ct.panelPath.join(".")}.useNodeValue: ${At}`)},[]),react.exports.useEffect(()=>{if(ot)return;if(isConstNode(et)){Et({node:et,value:et.val});return}const At=getUnresolvedVarNodes(et);if(At.length>0)throw new InvalidGraph(`Unknown variable${At.length>1?"s":""} ${At.join(", ")}.`,et);if(isVoidNode(et))return;{if(pt==null)throw new Error("client not initialized!");rt!=null&&console.log("useNodeValue subscribe",rt,et);const $t=pt.subscribe(et).subscribe(Ot=>{rt!=null&&console.log("useNodeValue resolve",rt,et),Et({node:et,value:Ot})},Ot=>{vt(Ot)});return()=>$t.unsubscribe()}},[pt,et,nt,rt,ot]);const xt=react.exports.useMemo(()=>{if(yt!=null){const Ct="Node execution failed (useNodeValue): "+errorToText(yt);throw console.error(Ct),new Error(Ct)}return isConstNode(et)?{loading:!1,result:et.val}:{loading:Tt.node.nodeType==="void"||et!==Tt.node,result:Tt.value}},[yt,et,Tt.node,Tt.value]);if(!xt.loading&&mt&&xt.result==null)throw new NullResult(Tt.node);return xt},useNodeValueExecutor=()=>{const tt=useClientContext().client;if(tt==null)throw new Error("client not initialized!");return react.exports.useCallback(async nt=>new Promise((rt,ot)=>{if(isVoidNode(nt))return rt(null);{const ut=tt.subscribe(nt).subscribe(ct=>{ut.unsubscribe(),rt(ct)},ct=>{ut.unsubscribe(),ot(ct)})}}),[tt])},useValue=et=>{const tt=useRefreshAllNodes(),[nt,rt]=react.exports.useState(0),ot=react.exports.useCallback(()=>{tt(),rt(ut=>ut+1)},[tt,rt]),st=useNodeValue(et,{memoCacheId:nt});return react.exports.useMemo(()=>({...st,refresh:ot}),[st,ot])},absoluteTargetMutation=et=>{const tt=getChainRootConstructor(et),nt={};return tt!=null&&tt.nodeType==="output"&&tt.fromOp.name==="get"&&isConstNode(tt.fromOp.inputs.uri)?{rootArgs:nt,mutationStyle:"serverRef",rootType:tt.type}:{rootArgs:nt,mutationStyle:"clientRef",rootType:et.type}},makeCallAction=(et,tt,nt,rt,ot,st,ut,ct,ft,pt,ht=!0)=>(mt,yt)=>{if(st==="invalid"){console.warn("Mutation attempted for invalid target",tt);return}const vt=At=>{if(!(At==null&&ht)){if(st==="clientRef"){let Ct=constNodeUnsafe(toWeaveType(At),At);et==="set"&&isConstructor(tt)&&isList(yt.val.type)&&isTimestamp(yt.val.type.objectType)&&(Ct=opList({a:opTimestamp({timestampISO:constString(new Date(Ct.val[0]).toISOString())}),b:opTimestamp({timestampISO:constString(new Date(Ct.val[1]).toISOString())})})),getChainRootVar(nt)!=null?ot(nt,{id:"mutate",newRootNode:Ct},"chain","root"):pt?.(Ct)}else if(st==="serverRef"){if(typeof At!="string"||!At.includes("://"))throw new Error("Unexpected mutation result");const Ct={nodeType:"output",type:ct,fromOp:{name:"get",inputs:{uri:constString(At)}}};getChainRootVar(nt)!=null?ot(nt,{id:"mutate",newRootNode:Ct},"chain","root"):pt?.(Ct)}}return ft(),!0};if(et==="set"&&st==="clientRef"&&yt.val.nodeType==="const"){const At=clientSet(tt,yt.val.val);if(At.ok)return vt(At.value)}const Tt=constNodeUnsafe(toWeaveType(tt),tt),Et=constNodeUnsafe(toWeaveType(ut),ut),xt=callOpVeryUnsafe(et,{self:Tt,...yt,root_args:Et});return mt.action(xt).then(vt)},makeMutation=(et,tt,nt,rt,ot,st,ut,ct,ft,pt,ht)=>{const mt=makeCallAction(tt,st,et,rt,ot,ut,ct,ft,nt,ht);return yt=>mt(pt,yt)},useMakeMutation=()=>{const et=useRefreshAllNodes(),{stack:tt,triggerExpressionEvent:nt}=usePanelContext(),{client:rt}=useClientContext();return react.exports.useCallback(async(ot,st,ut,ct)=>{if(rt){const ft=dereferenceAllVars(ot,tt).node,{rootArgs:pt,mutationStyle:ht,rootType:mt}=absoluteTargetMutation(ft);await makeMutation(ot,st,et,tt,nt,ft,ht,pt,mt,rt,ct)(ut)}},[rt,et,tt,nt])},useMutation=(et,tt,nt,rt=!0)=>{const ot=useRefreshAllNodes(),{stack:st,triggerExpressionEvent:ut}=usePanelContext(),ct=react.exports.useMemo(()=>dereferenceAllVars(et,st).node,[et,st]),{rootArgs:ft,mutationStyle:pt,rootType:ht}=react.exports.useMemo(()=>absoluteTargetMutation(ct),[ct]),mt=react.exports.useMemo(()=>makeCallAction(tt,ct,et,st,ut,pt,ft,ht,ot,nt,rt),[ct,tt,st,nt,pt,ot,ft,ht,et,ut,rt]);return useClientBound(mt)},useRefreshAllNodes=()=>{const tt=useClientContext().client;return react.exports.useCallback(async()=>{tt!=null&&await tt.refreshAll()},[tt])},useClientBound=et=>{const tt=useClientContext().client;if(tt==null)throw new Error("CG context not initialized");return react.exports.useCallback((...nt)=>et(tt,...nt),[tt,et])},useEach=(et,tt=10)=>{const nt=react.exports.useMemo(()=>opCount({arr:et}),[et]),{result:rt}=useNodeValue(nt);return react.exports.useMemo(()=>({loading:!1,result:_$2.range(rt??tt).map(st=>opIndex({arr:et,index:constNumber(st)}))}),[rt,tt,et])},useSimplifiedNode=et=>{et=useDeepMemo$1(et);const tt=useClientContext(),[nt,rt]=react.exports.useState({loading:!0});return react.exports.useEffect(()=>{rt({loading:!0}),(async()=>{const st=await simplify(tt.client,et);rt({loading:!1,result:st})})()},[tt.client,et]),nt},useRefEqualExpr=(et,tt)=>{const{node:nt,usedStack:rt}=dereferenceAllVars(et,tt),ot=useDeepMemo$1(et),st=useDeepMemo$1(nt),ut=useDeepMemo$1(rt);return react.exports.useMemo(()=>({node:ot,dereffedNode:st,stack:ut}),[st,ot,ut])},useRefEqualWithoutTypes=et=>{const tt=(nt,rt)=>{if(rt==null)return!1;if(nt.nodeType==="void"&&rt.nodeType==="void")return!0;if(nt.nodeType==="var"&&rt.nodeType==="var")return nt.varName===rt.varName;if(nt.nodeType==="const"&&rt.nodeType==="const")return isNodeOrVoidNode(nt.val)&&isNodeOrVoidNode(rt.val)?tt(nt.val,rt.val):nt.val===rt.val;if(nt.nodeType==="output"&&rt.nodeType==="output"){if(nt.fromOp.name!==rt.fromOp.name)return!1;const ot=Object.keys(nt.fromOp.inputs),st=Object.keys(rt.fromOp.inputs);if(ot.length!==st.length)return!1;for(const ut of ot)if(!tt(nt.fromOp.inputs[ut],rt.fromOp.inputs[ut]))return!1;return!0}return!1};return useDeepMemo$1(et,tt)},useNodeWithServerType=(et,tt)=>{const nt=usePanelContext().stack;if(tt!=null)for(const[mt,yt]of Object.entries(tt))nt.splice(0,0,{name:mt,value:yt});const[rt,ot]=react.exports.useState();let st;({node:et,dereffedNode:st}=useRefEqualExpr(et,nt)),et=useRefEqualWithoutTypes(et),st=useRefEqualWithoutTypes(st);const[ut,ct]=react.exports.useState({node:voidNode(),value:void 0}),ft=useWeaveContext(),pt=react.exports.useRef(null);return react.exports.useEffect(()=>{let mt=!0;if(et.nodeType==="const"&&ct({node:et,value:et}),et.nodeType==="void")return;const yt=ft.refineNode(st,[]).then(vt=>{pt.current===yt&&mt&&ct({node:et,value:{...et,type:vt.type}})}).catch(vt=>ot(vt));return pt.current=yt,()=>{mt=!1}},[ft,et,st]),react.exports.useMemo(()=>{if(rt!=null){const mt="Node execution failed (useNodeWithServerType): "+errorToText(rt);throw console.error(mt),new Error(mt)}return{loading:et!==ut.node,result:et===ut.node?ut.value:et}},[ut,et,rt])},useExpandedNode=et=>{const[tt,nt]=react.exports.useState(),{stack:rt}=usePanelContext();let ot;({node:et,dereffedNode:ot}=useRefEqualExpr(et,rt)),et=useDeepMemo$1(et);const[st,ut]=react.exports.useState({node:voidNode(),value:void 0}),ct=useClientContext();return react.exports.useEffect(()=>{let pt=!0;if(et.nodeType==="output")return expandAll(ct.client,ot,[]).then(ht=>{pt&&ut({node:et,value:ht})}).catch(ht=>nt(ht)),()=>{pt=!1}},[ct,et,ot]),react.exports.useMemo(()=>{if(tt!=null)throw console.error("useExpanded error",tt),new Error(tt);return{loading:et.nodeType!=="output"?!1:et!==st.node,result:et.nodeType!=="output"?et:et===st.node?st.value:et}},[st,et,tt])},INITIALIZE_OP_SUFFIX="-initialize",RENDER_OP_SUFFIX="-render",RENDER_CONFIG_OP_SUFFIX="-render_config",useUserPanelVars=(et,tt,nt,rt=!1)=>{const{updateConfig:ot,updateConfig2:st}=et,ut=react.exports.useRef(!0),{stack:ct}=usePanelContext(),ft=react.exports.useMemo(()=>makeItemNode({id:tt,input_node:et.input,config:et.config,vars:{}},ct,void 0),[tt,et.config,et.input,ct]),pt=`${tt}${nt==="render"?RENDER_OP_SUFFIX:RENDER_CONFIG_OP_SUFFIX}`,ht=nt==="render"?"_renderAsPanel":"_configRenderAsPanel",mt=react.exports.useMemo(()=>({self:ft}),[ft]),yt=react.exports.useCallback((Ct,$t,Ot)=>{if(console.log("HANDLE USER PANEL VAR EVENT",Ct,Ot),Ot.id==="mutate"&&Ct==="self"){st?.(()=>Ot.newRootNode.val.config);return}},[st]),vt=react.exports.useMemo(()=>{const Ct={self:constNodeUnsafe(functionType({},ft.type),varNode(ft.type,"self"))};return!rt&&et.config?.[ht]==null?callOpVeryUnsafe(pt,Ct):voidNode()},[ft,et.config,ht,pt,rt]);console.log("CALLED RENDER",vt);let Tt=useNodeValue(vt);Tt=useGatedValue(Tt,Ct=>!Ct.loading),Tt.loading||(ut.current=!1);const Et=react.exports.useMemo(()=>et.config?.[ht]??(Tt.loading?{id:"",input_node:voidNode(),config:void 0}:{id:Tt.result.id,input_node:Tt.result.input_node,config:Tt.result.config}),[et.config,ht,Tt]),xt=react.exports.useCallback(Ct=>{ot({[ht]:{id:Et.id,input_node:Et.input_node,config:{...Et.config,...Ct}}})},[ot,ht,Et.id,Et.input_node,Et.config]),At=react.exports.useCallback(Ct=>{st?.($t=>{const Ot=$t[ht]??{id:Tt.result.id,input_node:Tt.result.input_node,config:Tt.result.config};return{[ht]:{id:Ot.id,input_node:Ot.input_node,config:{...Ot.config,...Ct($t[ht])}}}})},[ht,Tt.result,st]);return react.exports.useMemo(()=>({renderAsPanel:Et,panelVars:mt,handleVarEvent:yt,updatePanelConfig:xt,updatePanelConfig2:At,modified:et.config?.[ht]!=null,inputNode:Et.input_node,loading:ut.current}),[Et,mt,yt,xt,At,et.config,ht])},isPanelType=et=>et.input_node!=null&&isFunction$b(et.input_node),registerUserPanel=(et,tt,nt,rt)=>{const ot=Object.keys(tt.input_types),ut=Object.values(tt.input_types)[0];if(!isPanelType(ut))return;const ft=ut.input_node.outputType;if(ot[1]!=null&&ot[1]!=="config")return;const pt=nt==null?void 0:yt=>{console.log("RENDER CONFIG COMP",yt);const{panelVars:vt,handleVarEvent:Tt,renderAsPanel:Et,updatePanelConfig:xt,updatePanelConfig2:At,loading:Ct,inputNode:$t}=useUserPanelVars(yt,et,"config",!1);return console.log("RENDER CONFIG COMP",yt),Ct?Wt.createElement(Panel2Loader,null):(console.log("CONFIG RENDER AS PANEL",Et),Wt.createElement(PanelContextProvider,{newVars:vt,handleVarEvent:Tt},Wt.createElement(Panel,{panelSpec:Et.id,input:$t,config:Et.config,updateConfig:xt,updateConfig2:At,updateInput:yt.updateInput})))},ht=yt=>{const{panelVars:vt,handleVarEvent:Tt,renderAsPanel:Et,updatePanelConfig:xt,updatePanelConfig2:At,loading:Ct,inputNode:$t}=useUserPanelVars(yt,et,"render",!1);return Ct?Wt.createElement(Panel2Loader,null):(console.log("RENDER AS PANEL",Et),Wt.createElement(PanelContextProvider,{newVars:vt,handleVarEvent:Tt},Wt.createElement(Panel,{panelSpec:Et.id,input:$t,config:Et.config,updateConfig:xt,updateConfig2:At,updateInput:yt.updateInput})))};let mt;rt!=null&&(mt=async(yt,vt,Tt)=>{const Et=callOpVeryUnsafe(rt.name,{self:makeItemNode({id:et,input_node:vt,config:void 0,vars:{}},Tt,void 0)});return await yt.client.query(Et)}),registerPanel({id:et,initialize:mt,ConfigComponent:pt,Component:ht,inputType:ft})},loadWeaveObjects=()=>loadRemoteOpStore(getConfig().backendWeaveOpsUrl()).then(({remoteOpStore:et,userPanelOps:tt})=>{const nt={},rt={},ot={};for(const st of tt)st.name.endsWith(RENDER_CONFIG_OP_SUFFIX)?rt[st.name.slice(0,st.name.length-RENDER_CONFIG_OP_SUFFIX.length)]=st:st.name.endsWith(RENDER_OP_SUFFIX)?nt[st.name.slice(0,st.name.length-RENDER_OP_SUFFIX.length)]=st:nt[st.name]=st;for(const st of Object.values(et.allOps()))st.name.endsWith(INITIALIZE_OP_SUFFIX)&&(ot[st.name.slice(0,st.name.length-INITIALIZE_OP_SUFFIX.length)]=st);for(const[st,ut]of Object.entries(nt))registerUserPanel(st,ut,rt[st],ot[st]);return et}),memoedLoadWeaveObject=lodash$2.exports.memoize(loadWeaveObjects),useLoadWeaveObjects=et=>{const[tt,nt]=Wt.useState(!0),[rt,ot]=Wt.useState(null);return Wt.useEffect(()=>{et||memoedLoadWeaveObject().then(st=>{ot(st),nt(!1)})},[et]),tt||rt==null?{loading:!0,remoteOpStore:rt}:{loading:tt,remoteOpStore:rt}};let activeAutomationId;function timeout(et){return new Promise(tt=>setTimeout(tt,et))}function serverUrl(){return new URL(getConfig().backendWeaveExecutionUrl()).origin}async function getCommands(et,tt){return fetch(`${serverUrl()}/__weave/automate/${et}/commands_after/${tt}`)}async function sendStatus(et,tt){await fetch(`${serverUrl()}/__weave/automate/${et}/set_status`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tt)})}async function sendStatusOk(et){sendStatus(et,{status:0,message:"ok"})}async function sendStatusError(et,tt){sendStatus(et,{status:1,message:tt})}const useWeaveAutomation=automationId=>{const{loading,remoteOpStore}=useLoadWeaveObjects();react.exports.useEffect(()=>{if(loading||automationId==null)return;activeAutomationId=automationId;let shouldRun=!0,seenCommands=0;const run=async()=>{for(await timeout(1e3);shouldRun;){const rawResponse=await getCommands(automationId,seenCommands);if(rawResponse.status!==200){console.log("Weave automation protocol error: ",rawResponse);break}const response=await rawResponse.json(),serverCommands=response.commands;seenCommands+=response.commands.length;for(const serverCommand of serverCommands){if(console.log("Weave automation. New command:",serverCommand),serverCommand.command==="run_js")try{eval(serverCommand.js)}catch(et){console.log("Weave automation. Error:",et),await sendStatusError(automationId,et.stack.toString()),shouldRun=!1;break}else if(serverCommand.command==="end"){shouldRun=!1,await sendStatusOk(automationId);break}else{const et="Unhandle automation command: "+serverCommand;console.error(et),await sendStatusError(automationId,et),shouldRun=!1;break}await timeout(1e3)}await timeout(1e3)}console.log("Weave automation. Exited automation loop.")};return run(),()=>{shouldRun=!1}},[automationId,loading,remoteOpStore])},onAppError=et=>{activeAutomationId!=null&&sendStatusError(activeAutomationId,et)},useUserName=et=>{const tt=react.exports.useMemo(()=>et?opUserUsername({user:opRootViewer({})}):constNone(),[et]);return useNodeValue(tt)},useUserEntities=et=>{const tt=react.exports.useMemo(()=>et?opEntityName({entity:opUserEntities({entity:opRootViewer({})})}):constNode(list$1("string"),[]),[et]),nt=useNodeValue(tt);return react.exports.useMemo(()=>({result:nt.result??[],loading:nt.loading}),[nt.loading,nt.result])},useProjectsForEntityWithWeaveObject=et=>{const tt=opEntityProjects({entity:opRootEntity({entityName:constString(et)})}),nt=opMap({arr:tt,mapFn:constFunction({row:"project"},({row:ot})=>opDict({name:opProjectName({project:ot}),updatedAt:opProjectUpdatedAt({project:ot}),num_boards:opProjectBoardCount({project:ot}),num_stream_tables:opProjectRunStreamCount({project:ot}),num_logged_tables:opProjectLoggedTableCount({project:ot})}))}),rt=useNodeValue(nt);return react.exports.useMemo(()=>({result:(rt.result??[]).filter(st=>st.num_boards+st.num_logged_tables+st.num_stream_tables>0),loading:rt.loading}),[rt.loading,rt.result])},useProjectAssetCount=(et,tt)=>{const nt=opRootProject({entityName:constString(et),projectName:constString(tt)}),rt=opDict({boardCount:opProjectBoardCount({project:nt}),runStreamCount:opProjectRunStreamCount({project:nt}),loggedTableCount:opProjectLoggedTableCount({project:nt})}),ot=useNodeValue(rt);return react.exports.useMemo(()=>({result:ot.result??{boardCount:0,runStreamCount:0,loggedTableCount:0},loading:ot.loading}),[ot.loading,ot.result])},opProjectBoardCount=({project:et})=>opCount({arr:opProjectBoardArtifacts({project:et})}),opProjectRunStreamCount=({project:et})=>opCount({arr:opProjectRunStreamArtifacts({project:et})}),opProjectLoggedTableCount=({project:et})=>opCount({arr:opProjectRunLoggedTableArtifacts({project:et})}),projectBoardsNode=(et,tt)=>{const nt=opRootProject({entityName:constString(et),projectName:constString(tt)});return opProjectBoardArtifacts({project:nt})},opProjectBoardArtifacts=({project:et})=>{let tt;{const nt=opProjectArtifactType({project:et,artifactType:constString("Group")});tt=opArtifactTypeArtifacts({artifactType:nt})}return opFilterArtifactsToWeaveObjects(tt,!0)},projectTablesNode=(et,tt)=>{const nt=opRootProject({entityName:constString(et),projectName:constString(tt)});return opProjectRunStreamArtifacts({project:nt})},opProjectRunStreamArtifacts=({project:et})=>{const tt=opProjectArtifactType({project:et,artifactType:constString("stream_table")}),nt=opArtifactTypeArtifacts({artifactType:tt});return opFilterArtifactsToWeaveObjects(nt,!1)},projectRunLoggedTablesNode=(et,tt)=>{const nt=opRootProject({entityName:constString(et),projectName:constString(tt)});return opProjectRunLoggedTableArtifacts({project:nt})},opProjectRunLoggedTableArtifacts=({project:et})=>{const tt=opProjectArtifactType({project:et,artifactType:constString("run_table")});return opArtifactTypeArtifacts({artifactType:tt})},opArtifactsBasicMetadata=({artifacts:et})=>opMap({arr:et,mapFn:constFunction({row:"artifact"},({row:tt})=>{const nt=opArtifactMembershipArtifactVersion({artifactMembership:opArtifactMembershipForAlias({artifact:tt,aliasName:constString("latest")})});return opDict({name:opArtifactName({artifact:tt}),createdByUserName:opUserName({user:opRunUser({run:opArtifactVersionCreatedBy({artifactVersion:nt})})}),createdAt:opArtifactCreatedAt({artifact:tt}),updatedAt:opArtifactVersionCreatedAt({artifactVersion:nt})})})}),useProjectBoards=(et,tt)=>{const nt=projectBoardsNode(et,tt),rt=opArtifactsBasicMetadata({artifacts:nt}),ot=useNodeValue(rt);return react.exports.useMemo(()=>({result:ot.result??[],loading:ot.loading}),[ot.loading,ot.result])},useProjectRunStreams=(et,tt)=>{const nt=projectTablesNode(et,tt),rt=opArtifactsBasicMetadata({artifacts:nt}),ot=useNodeValue(rt);return react.exports.useMemo(()=>({result:ot.result??[],loading:ot.loading}),[ot.loading,ot.result])},useProjectRunLoggedTables=(et,tt)=>{const nt=projectRunLoggedTablesNode(et,tt),rt=opArtifactsBasicMetadata({artifacts:nt}),ot=useNodeValue(rt);return react.exports.useMemo(()=>({result:ot.result??[],loading:ot.loading}),[ot.loading,ot.result])},useLocalDashboards=()=>{const et=getLocalArtifactDataNode(!0),tt=opMap({arr:et,mapFn:constFunction({row:{type:"FilesystemArtifact"}},({row:rt})=>{const ot=callOpVeryUnsafe("FilesystemArtifact-artifactName",{artifact:rt},"string"),st=callOpVeryUnsafe("FilesystemArtifact-artifactVersion",{artifact:rt},"string"),ut=callOpVeryUnsafe("FilesystemArtifact-createdAt",{artifact:rt},"string");return opDict({name:ot,version:st,createdAt:ut})})}),nt=useNodeValue(tt);return react.exports.useMemo(()=>({result:nt.result??[],loading:nt.loading}),[nt.loading,nt.result])},debugStyle=`
  
`,VStack=styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  ${debugStyle}
`,HStack=styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  ${debugStyle}
`,Space=styled$1.div`
  height: 100%;
  width: 100%;
  overflow: hidden;
  flex: 1 1 auto;
  ${debugStyle}
`,Block=styled$1.div`
  flex: 0 0 auto;
  ${debugStyle}
`,VSpace=styled$1.div`
  height: 100%;
  width: 100%;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  ${debugStyle}
`,HSpace=styled$1.div`
  height: 100%;
  width: 100%;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  ${debugStyle}
`,VBlock=styled$1.div`
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  ${debugStyle}
`,HBlock=styled$1.div`
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  ${debugStyle}
`,AnimationWrapper=styled$1.div`
  @keyframes logo-animation {
    0%,
    100%,
    70% {
      transform: scale(1) rotate(0);
      opacity: 0.6;
    }
    7.5%,
    8% {
      transform: scale(0.75) rotate(0);
      opacity: 0.8;
    }
    25%,
    47.5% {
      transform: scale(1) rotate(180deg);
      opacity: 0.6;
    }
    55%,
    55.5% {
      transform: scale(0.75) rotate(180deg);
      opacity: 0.8;
    }
  }

  opacity: 0.6;
  animation: 4s ease-out infinite logo-animation;
`,WeaveAnimatedLoader=et=>{const tt=et.style??{};return Wt.createElement(AnimationWrapper,{style:tt},Wt.createElement(IconWeaveLogoGray,{style:{width:"100%",height:"100%"}}))},TableRow=styled$1.tr`
  background-color: ${et=>et.$highlighted?"#f8f9fa":""};
`,CenterTable=styled$1.table`
  width: 100%;
  border: none;
  border-collapse: collapse;

  td {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  td:first-child {
    padding-left: 12px;
  }

  tr {
    border-bottom: 1px solid #dadee3;
    color: #2b3038;
  }

  /* This whole bit is to keep borders with sticky! */
  thead {
    position: sticky;
    top: 0;

    tr {
      border-top: none;
      border-bottom: none;
    }
    &:after,
    &:before {
      content: '';
      position: absolute;
      left: 0;
      width: 100%;
    }
    &:after {
      bottom: 0;
      border-bottom: 1px solid #dadee3;
    }
  }
  /*End sticky with border fix  */

  thead {
    tr {
      text-transform: uppercase;
      height: 48px;
      background-color: #f5f6f7;
      color: #8e949e;
      font-size: 14px;
      font-weight: 600;
    }
  }
  tbody {
    font-size: 16px;
    tr {
      height: 64px;

      &:hover {
        cursor: pointer;
        background-color: #f8f9fa;
      }
    }
    tr > td:first-child {
      font-weight: 600;
    }
  }
`,CenterTableActionCellAction=styled$1(HBlock)`
  padding: 0px 12px;
  border-radius: 4px;
  height: 36px;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  cursor: pointer;
  &:hover {
    background-color: #f5f6f7;
  }
`,CenterTableActionCellContents=styled$1(VStack)`
  align-items: center;
  justify-content: center;
`,CenterTableActionCellIcon$1=styled$1(VStack)`
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  border-radius: 4px;
  &:hover {
    background-color: #a9edf252;
    color: #038194;
  }
`,CenterSpaceTableSpace=styled$1(Space)`
  overflow: auto;
`,CenterSpaceControls=styled$1(HBlock)`
  gap: 8px;
`,CenterSpaceTitle=styled$1(HBlock)`
  font-size: 24px;
  font-weight: 600;
  padding: 12px 8px;
`,CenterSpaceHeader=styled$1(VBlock)`
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid #dadee3;
`,CenterBrowser=et=>{const[tt,nt]=react.exports.useState(""),[rt,ot]=react.exports.useState({}),st=react.exports.useMemo(()=>{if(et.loading)return[];const yt=et.allowSearch||tt===""||tt==null,vt=Object.values(rt).filter(Tt=>Tt!=null&&Tt!=="");return!yt&&!vt?et.data:et.data.filter(Tt=>{const Et=!yt||Object.values(Tt).some(At=>(At??"").toString().toLowerCase().includes(tt.toLowerCase())),xt=!vt||_$2.every(Object.entries(rt).map(([At,Ct],$t)=>Ct==null||Ct===""||At in Tt&&Tt[At]===Ct));return Et&&xt})},[rt,et.allowSearch,et.data,et.loading,tt]),ut=react.exports.useMemo(()=>Object.entries(et.filters??{}).map(([yt,vt],Tt)=>{const Et=_$2.uniq(et.data.map(xt=>xt[yt]));return{placeholder:vt.placeholder,options:Et.map(xt=>({key:xt,text:xt,value:xt})),onChange:xt=>{ot(At=>{const Ct={...At};return Ct[yt]=xt,Ct})}}}),[et.data,et.filters]),ct=et.allowSearch||Object.keys(et.filters??{}).length>0,ft=(et.actions??[]).flatMap(yt=>yt),pt=ft.length>0?ft[0]:void 0,ht=react.exports.useMemo(()=>et.columns!=null?et.columns:Object.keys(et.data[0]??{}).filter(yt=>!yt.startsWith("_")),[et.columns,et.data]),mt=ft.length>1;return Wt.createElement(Wt.Fragment,null,Wt.createElement(CenterSpaceHeader,null,Wt.createElement(CenterSpaceTitle,null,Wt.createElement("span",{style:{color:"#8E949E"}},(et.breadcrumbs??[]).map((yt,vt)=>{const Tt={};return yt.onClick&&(Tt.cursor="pointer"),Wt.createElement(Wt.Fragment,{key:yt.key},Wt.createElement("span",{style:Tt,onClick:yt.onClick},yt.text),Wt.createElement("span",{style:{margin:"0px 10px"}},"/"))})),et.title),ct&&Wt.createElement(CenterSpaceControls,null,et.allowSearch&&Wt.createElement(Input$7,{style:{width:"100%"},icon:"search",iconPosition:"left",placeholder:"Search",onChange:yt=>{nt(yt.target.value)}}),ut.map((yt,vt)=>Wt.createElement(Dropdown,{key:vt,style:{boxShadow:"none"},selection:!0,clearable:!0,placeholder:yt.placeholder,options:yt.options,onChange:(Tt,Et)=>{yt.onChange(Et.value)}})))),Wt.createElement(CenterSpaceTableSpace,null,Wt.createElement(CenterTable,null,Wt.createElement("thead",null,Wt.createElement("tr",null,ht.map(yt=>Wt.createElement("td",{key:yt},yt)),mt&&Wt.createElement("td",{style:{width:"64px"}}))),Wt.createElement("tbody",null,st.map((yt,vt)=>Wt.createElement(TableRow,{key:yt._id,onClick:()=>pt?.onClick(yt,vt),$highlighted:et.selectedRowId===yt._id},ht.map(Tt=>Wt.createElement("td",{key:Tt},yt[Tt])),mt&&Wt.createElement("td",null,Wt.createElement(ActionCell,{row:yt,actions:et.actions})))))),(et.data.length===0||et.loading)&&Wt.createElement(VStack,{style:{alignItems:"center",justifyContent:"center",gap:"16px",color:"#8e949e"}},et.loading?Wt.createElement(WeaveAnimatedLoader,{style:{height:"64px",width:"64px"}}):Wt.createElement(IconWeaveLogoGray,{style:{height:"64px",width:"64px"}}),Wt.createElement("div",null,et.loading?"":et.noDataCTA))))},ActionCell=et=>{const[tt,nt]=react.exports.useState(!1);return Wt.createElement(CenterTableActionCellContents,null,Wt.createElement(Popup$1,{onClose:()=>nt(!1),onOpen:()=>nt(!0),open:tt,style:{padding:"6px 6px"},content:Wt.createElement(VStack,{onClick:rt=>{rt.stopPropagation()}},et.actions?.flatMap((rt,ot)=>{const st=rt.map((ut,ct)=>Wt.createElement(CenterTableActionCellAction,{key:""+ot+"_"+ct,onClick:ft=>{nt(!1),ft.stopPropagation(),ut.onClick(et.row,ot)}},Wt.createElement(ut.icon,null),ut.label));return ot<et.actions.length-1&&st.push(Wt.createElement(Divider$1,{key:"d"+ot,style:{margin:"6px 0px"}})),st})),basic:!0,on:"click",trigger:Wt.createElement(CenterTableActionCellIcon$1,{onClick:rt=>{rt.stopPropagation()}},Wt.createElement(IconOverflowHorizontal$1,null))}))},Scaler=et=>{const tt=Math.max(Math.min(et.scale,1),0),nt=100/tt,rt=100*(1-tt)/2;return Wt.createElement("div",{style:{width:`${nt}%`,height:`${nt}%`,translate:`-${rt}% -${rt}%`,scale:`${tt}`}},Wt.createElement("div",{style:{width:"100%",height:"100%"}},et.children))},Unclickable=et=>Wt.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},onClick:tt=>{tt.preventDefault(),tt.stopPropagation()}},Wt.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",zIndex:999,...et.style??{}},onClick:tt=>{tt.preventDefault(),tt.stopPropagation()}}),et.children),PreviewNode=et=>{const tt=react.exports.useMemo(()=>`${window.location.origin}/?previewMode=true&exp=${encodeURIComponent(et.inputExpr)}`,[et.inputExpr]);return Wt.createElement("div",{style:{width:"100%",height:"200px",border:"2px solid #DADEE3",borderRadius:"6px",overflow:"hidden"}},Wt.createElement(Unclickable,{style:{backgroundColor:"#d2d2d21a"}},Wt.createElement(Scaler,{scale:.4},Wt.createElement("iframe",{title:"Asset Preview",src:tt,style:{width:"100%",height:"100%",border:"none"}}))))},CenterSpace$1=styled$1(VSpace)`
  border: 1px solid #dadee3;
  box-shadow: 0px 8px 16px 0px #0e10140a;
  border-top-left-radius: 12px;
`,CenterTableActionCellIcon=styled$1(VStack)`
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  border-radius: 4px;
  &:hover {
    background-color: #a9edf252;
    color: #038194;
  }
`,HomePreviewSidebarTemplate=et=>Wt.createElement(CenterSpace$1,null,Wt.createElement(HBlock,{style:{height:"70px",alignContent:"center",justifyContent:"center",alignItems:"center",gap:"12px",padding:"0px 24px"}},Wt.createElement(VSpace,{style:{justifyContent:"center",fontSize:"20px",fontWeight:600}},et.title),Wt.createElement(CenterTableActionCellIcon,null,Wt.createElement(IconClose,{style:{cursor:"pointer"},onClick:tt=>{tt.stopPropagation(),et.setPreviewNode(void 0)}}))),Wt.createElement(VSpace,{style:{overflow:"auto",padding:"0px 24px"}},et.children),(et.primaryAction||et.secondaryAction)&&Wt.createElement(HBlock,{style:{borderTop:"1px solid #dadee3",padding:"12px",gap:"12px"}},et.primaryAction&&Wt.createElement(WBButton,{variant:"confirm",onClick:et.primaryAction.onClick,fluid:!0},Wt.createElement(HStack,{style:{alignItems:"center",justifyContent:"center",gap:"8px"}},Wt.createElement(et.primaryAction.icon,null),et.primaryAction.label)),et.secondaryAction&&Wt.createElement(WBButton,{onClick:et.secondaryAction.onClick,fluid:!0},Wt.createElement(HStack,{style:{alignItems:"center",justifyContent:"center",gap:"8px"}},Wt.createElement(et.secondaryAction.icon,null),et.secondaryAction.label)))),HomeExpressionPreviewParts=({expr:et})=>{const nt=useWeaveContext().expToString(et);return Wt.createElement(VStack,{style:{gap:"16px"}},Wt.createElement(VBlock,{style:{gap:"8px"}},Wt.createElement("span",{style:{color:"#2B3038",fontWeight:600}},"Preview"),Wt.createElement(Block,null,Wt.createElement(PreviewNode,{inputExpr:nt}))),Wt.createElement(VBlock,{style:{gap:"8px"}},Wt.createElement("span",{style:{color:"#2B3038",fontWeight:600}},"Expression"),Wt.createElement(Block,null,Wt.createElement(WeaveExpression,{expr:et,onMount:()=>{},onFocus:()=>{},onBlur:()=>{},frozen:!0}))))},HomeBoardPreview=({expr:et,name:tt,setPreviewNode:nt,navigateToExpression:rt})=>Wt.createElement(HomePreviewSidebarTemplate,{title:tt,setPreviewNode:nt,primaryAction:{icon:IconOpenNewTab,label:"Open board",onClick:()=>{rt(et)}}},Wt.createElement(HomeExpressionPreviewParts,{expr:et})),useMakeLocalBoardFromNode=()=>{const et=useMakeSimpleSetMutation();return react.exports.useCallback((tt,nt,rt,ot,st=constNone())=>{ot||(ot="board-"+hooks().format("YY_MM_DD_hh_mm_ss")),et(`local-artifact:///${ot}:latest/obj`,callOpVeryUnsafe(tt,{input_node:nt,config:st},"any"),rt)},[et])},useMakeSimpleSetMutation=()=>{const et=useRefreshAllNodes(),{stack:tt,triggerExpressionEvent:nt}=usePanelContext(),{client:rt}=useClientContext();return react.exports.useCallback(async(ot,st,ut)=>{if(rt){const ct=opGet({uri:constString(ot)}),ft=dereferenceAllVars(ct,tt).node,{rootArgs:pt,mutationStyle:ht,rootType:mt}=absoluteTargetMutation(ft);await makeMutation(ct,"set",et,tt,nt,ft,ht,pt,mt,rt,ut)({val:st})}},[rt,et,tt,nt])},SvgIconMagicWandStar=et=>react.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...et},react.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5207 12.8021C20.9606 12.7414 21.7812 11.1304 20.9837 9.93L19.8382 8.20591C19.7819 8.12119 19.7653 8.01617 19.7926 7.91819L20.3487 5.92439C20.736 4.53619 19.4574 3.25793 18.0693 3.64548L16.0756 4.20211C15.9776 4.22946 15.8726 4.21284 15.7879 4.15657L14.0635 3.01153C12.8629 2.21429 11.2521 3.03529 11.1917 4.47521L11.1051 6.54331C11.1008 6.64494 11.0525 6.73968 10.9728 6.80289L9.35098 8.08902C8.22175 8.98449 8.5048 10.7702 9.85559 11.2725L11.1758 11.7635L3.46967 19.4697C3.17678 19.7626 3.17678 20.2374 3.46967 20.5303C3.76256 20.8232 4.23744 20.8232 4.53033 20.5303L12.2347 12.826L12.7237 14.1399C13.2264 15.4906 15.0121 15.7732 15.9073 14.6438L17.1931 13.0216C17.2563 12.9419 17.351 12.8936 17.4526 12.8893L19.5207 12.8021ZM12.6852 10.7731C12.5712 10.6987 12.4484 10.6364 12.3186 10.5881L10.3785 9.86661C10.1229 9.77156 10.0694 9.43374 10.283 9.26432L11.9048 7.97819C12.3261 7.64412 12.5812 7.14331 12.6037 6.60613L12.6904 4.53803C12.7019 4.26562 13.0066 4.11029 13.2337 4.26112L14.9581 5.40616C15.406 5.70358 15.9611 5.79143 16.479 5.64685L18.4726 5.09023C18.7353 5.01691 18.9772 5.25874 18.9039 5.52137L18.3478 7.51517C18.2033 8.03306 18.2913 8.58817 18.5888 9.03599L19.7343 10.7601C19.8852 10.9872 19.7299 11.292 19.4575 11.3034L17.3894 11.3906C16.8522 11.4133 16.3515 11.6685 16.0175 12.0899L14.7318 13.712C14.5624 13.9257 14.2246 13.8723 14.1295 13.6167L13.4075 11.6768C13.3603 11.5501 13.2999 11.4301 13.2278 11.3185C13.1961 11.1907 13.1303 11.0696 13.0303 10.9697C12.9314 10.8707 12.8116 10.8052 12.6852 10.7731Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M5.5 3.25C5.91421 3.25 6.25 3.58579 6.25 4V4.75H7C7.41421 4.75 7.75 5.08579 7.75 5.5C7.75 5.91421 7.41421 6.25 7 6.25H6.25V7C6.25 7.41421 5.91421 7.75 5.5 7.75C5.08579 7.75 4.75 7.41421 4.75 7V6.25H4C3.58579 6.25 3.25 5.91421 3.25 5.5C3.25 5.08579 3.58579 4.75 4 4.75H4.75V4C4.75 3.58579 5.08579 3.25 5.5 3.25Z",fill:"currentColor"}),react.exports.createElement("path",{d:"M19.25 17C19.25 16.5858 18.9142 16.25 18.5 16.25C18.0858 16.25 17.75 16.5858 17.75 17V17.75H17C16.5858 17.75 16.25 18.0858 16.25 18.5C16.25 18.9142 16.5858 19.25 17 19.25H17.75V20C17.75 20.4142 18.0858 20.75 18.5 20.75C18.9142 20.75 19.25 20.4142 19.25 20V19.25H20C20.4142 19.25 20.75 18.9142 20.75 18.5C20.75 18.0858 20.4142 17.75 20 17.75H19.25V17Z",fill:"currentColor"})),updateIconProps=et=>({width:20,height:20,...et}),IconMagicWandStar=et=>Wt.createElement(SvgIconMagicWandStar,{...updateIconProps(et)}),CenterEntityBrowser=et=>{const[tt,nt]=react.exports.useState(),rt=react.exports.useCallback(ot=>{nt(ot),et.setPreviewNode(void 0)},[et,nt]);return tt==null?Wt.createElement(CenterEntityBrowserInner,{...et,setSelectedProjectName:rt}):Wt.createElement(CenterProjectBrowser,{...et,projectName:tt,setSelectedProjectName:rt})},CenterEntityBrowserInner=et=>{const tt=et.entityName,nt=useProjectsForEntityWithWeaveObject(et.entityName),rt=react.exports.useMemo(()=>[...nt.result].sort((ct,ft)=>ft.updatedAt-ct.updatedAt).map(ct=>({_id:ct.name,project:ct.name,boards:(ct.num_boards??0)>0?ct.num_boards:null,tables:ct.num_stream_tables+ct.num_logged_tables>0?ct.num_stream_tables+ct.num_logged_tables:null,"updated at":hooks.utc(ct.updatedAt).calendar()})),[nt.result]),ot=react.exports.useMemo(()=>[[{icon:IconDown$2,label:"Browse project",onClick:ut=>{et.setSelectedProjectName(ut._id)}}],[{icon:IconOpenNewTab,label:"View in Weights and Biases",onClick:ut=>{const ct=`https://wandb.ai/${et.entityName}/${ut.project}/overview`;window.open(ct,"_blank")}}]],[et]),st=nt.loading;return Wt.createElement(CenterBrowser,{allowSearch:!0,noDataCTA:`No projects with Weave assets found for entity: ${et.entityName}`,columns:["project","boards","tables","updated at"],loading:st,title:tt,data:rt,actions:ot})},CenterProjectBrowser=et=>{const[tt,nt]=react.exports.useState(),rt=react.exports.useCallback(ut=>{nt(ut),et.setPreviewNode(void 0)},[et,nt]),ot=opIsNone({val:opRootProject({entityName:constString(et.entityName),projectName:constString(et.projectName)})}),st=useNodeValue(ot);return react.exports.useEffect(()=>{!st.loading&&st.result&&et.setSelectedProjectName(void 0)},[st.loading,st.result,et]),tt==null?Wt.createElement(CenterProjectBrowserInner,{...et,setSelectedAssetType:rt}):tt==="boards"?Wt.createElement(CenterProjectBoardsBrowser,{...et,setSelectedAssetType:rt}):tt==="tables"?Wt.createElement(CenterProjectTablesBrowser,{...et,setSelectedAssetType:rt}):Wt.createElement(Wt.Fragment,null,"Not implemented")},CenterProjectBrowserInner=et=>{const tt=et.projectName,nt=useProjectAssetCount(et.entityName,et.projectName),rt=react.exports.useMemo(()=>[{_id:"boards","asset type":"Boards",count:nt.result.boardCount??0},{_id:"tables","asset type":"Tables",count:(nt.result.loggedTableCount??0)+(nt.result.runStreamCount??0)}],[nt.result.boardCount,nt.result.loggedTableCount,nt.result.runStreamCount]),ot=react.exports.useMemo(()=>[[{icon:IconDown$2,label:"Browse asset type",onClick:st=>{et.setSelectedAssetType(st._id)}}]],[et]);return Wt.createElement(CenterBrowser,{title:tt,loading:nt.loading,breadcrumbs:[{key:"entity",text:et.entityName,onClick:()=>{et.setSelectedProjectName(void 0)}}],data:rt,actions:ot,columns:["asset type","count"]})},rowToExpression$1=(et,tt,nt)=>{const rt=`wandb-artifact:///${et}/${tt}/${nt}:latest/obj`;return opGet({uri:constString(rt)})},CenterProjectBoardsBrowser=et=>{const tt="Boards",[nt,rt]=react.exports.useState(),ot=useProjectBoards(et.entityName,et.projectName),st=react.exports.useMemo(()=>ot.result.map(ct=>({_id:ct.name,name:ct.name,"updated at":hooks.utc(ct.updatedAt).calendar(),"created at":hooks.utc(ct.createdAt).calendar(),"created by":ct.createdByUserName})),[ot]),ut=react.exports.useMemo(()=>[[{icon:IconInfo,label:"Board details",onClick:ct=>{rt(ct._id);const ft=rowToExpression$1(et.entityName,et.projectName,ct._id),pt=Wt.createElement(HomeBoardPreview,{expr:ft,name:ct.name,setPreviewNode:et.setPreviewNode,navigateToExpression:et.navigateToExpression});et.setPreviewNode(pt)}}],[{icon:IconOpenNewTab,label:"Open Board",onClick:ct=>{et.navigateToExpression(rowToExpression$1(et.entityName,et.projectName,ct._id))}}]],[et,rt]);return Wt.createElement(CenterBrowser,{allowSearch:!0,title:tt,selectedRowId:nt,noDataCTA:`No Weave boards found for project: ${et.entityName}/${et.projectName}`,breadcrumbs:[{key:"entity",text:et.entityName,onClick:()=>{et.setSelectedProjectName(void 0),et.setSelectedAssetType(void 0)}},{key:"project",text:et.projectName,onClick:()=>{et.setSelectedAssetType(void 0)}}],loading:ot.loading,columns:["name","updated at","created at","created by"],data:st,actions:ut})},tableRowToNode=(et,tt,nt,rt)=>{let ot;if(et==="Stream Table"){const st=`wandb-artifact:///${tt}/${nt}/${rt}:latest/obj`,ut=opGet({uri:constString(st)});ut.type={type:"stream_table"},ot=callOpVeryUnsafe("stream_table-rows",{self:ut})}else{const st=rt.split("-",3),ut=st[st.length-1]+".table.json";ot=opTableRows({table:opFileTable({file:opArtifactVersionFile({artifactVersion:opArtifactMembershipArtifactVersion({artifactMembership:opArtifactMembershipForAlias({artifact:opProjectArtifact({project:opRootProject({entityName:constString(tt),projectName:constString(nt)}),artifactName:constString(rt)}),aliasName:constString("latest")})}),path:constString(ut)})})})}return ot},CenterProjectTablesBrowser=et=>{const tt=useWeaveContext(),nt="Tables",[rt,ot]=react.exports.useState(),st=useProjectRunStreams(et.entityName,et.projectName),ut=useProjectRunLoggedTables(et.entityName,et.projectName),ct=st.loading||ut.loading,ft=react.exports.useMemo(()=>{if(ct)return[];const Tt=st.result.map(At=>({_id:At.name,_updatedAt:At.updatedAt,name:At.name,kind:"Stream Table","updated at":hooks.utc(At.updatedAt).calendar(),"created at":hooks.utc(At.createdAt).calendar(),"created by":At.createdByUserName})),Et=ut.result.map(At=>({_id:At.name,_updatedAt:At.updatedAt,name:At.name,kind:"Logged Table","updated at":hooks.utc(At.updatedAt).calendar(),"created at":hooks.utc(At.createdAt).calendar(),"created by":At.createdByUserName})),xt=[...Tt,...Et];return xt.sort((At,Ct)=>Ct._updatedAt-At._updatedAt),xt},[ct,ut.result,st.result]),[pt,ht]=react.exports.useState(!1),mt=useNewDashFromItems(),yt=useMakeLocalBoardFromNode(),vt=react.exports.useMemo(()=>[[{icon:IconInfo,label:"Table details",onClick:Tt=>{ot(Tt._id);const Et=tableRowToNode(Tt.kind,et.entityName,et.projectName,Tt._id),xt=Wt.createElement(HomePreviewSidebarTemplate,{title:Tt.name,setPreviewNode:et.setPreviewNode,primaryAction:{icon:IconAddNew$3,label:"Seed new board",onClick:()=>{const At="dashboard-"+hooks().format("YY_MM_DD_hh_mm_ss");mt(At,{panel0:getFullChildPanel(varNode(Et.type,"var0"))},{var0:Et},Ct=>{et.navigateToExpression(Ct)})}},secondaryAction:{icon:IconOpenNewTab,label:"Open Table",onClick:()=>{et.navigateToExpression(Et)}}},Wt.createElement(HomeExpressionPreviewParts,{expr:Et}));et.setPreviewNode(xt)}}],[{icon:IconAddNew$3,label:"Seed new board",onClick:Tt=>{const Et=tableRowToNode(Tt.kind,et.entityName,et.projectName,Tt._id);ht(!0),yt("py_board-seed_board",Et,xt=>{ht(!1),et.navigateToExpression(xt)})}},{icon:IconMagicWandStar,label:"Seed auto board",onClick:Tt=>{const Et=tableRowToNode(Tt.kind,et.entityName,et.projectName,Tt._id);ht(!0),yt("py_board-seed_autoboard",Et,xt=>{ht(!1),et.navigateToExpression(xt)})}},{icon:IconOpenNewTab,label:"Open Table",onClick:Tt=>{et.navigateToExpression(tableRowToNode(Tt.kind,et.entityName,et.projectName,Tt._id))}}],[{icon:IconCopy,label:"Copy Weave expression",onClick:Tt=>{const Et=tableRowToNode(Tt.kind,et.entityName,et.projectName,Tt._id),xt=tt.expToString(Et);navigator.clipboard.writeText(xt).then(()=>{})}}]],[yt,mt,et,tt]);return Wt.createElement(Wt.Fragment,null,pt&&Wt.createElement(WandbLoader,null),Wt.createElement(CenterBrowser,{allowSearch:!0,title:nt,selectedRowId:rt,noDataCTA:`No Weave tables found for project: ${et.entityName}/${et.projectName}`,breadcrumbs:[{key:"entity",text:et.entityName,onClick:()=>{et.setSelectedProjectName(void 0),et.setSelectedAssetType(void 0)}},{key:"project",text:et.projectName,onClick:()=>{et.setSelectedAssetType(void 0)}}],loading:ct,filters:{kind:{placeholder:"All table kinds"}},columns:["name","kind","updated at","created at","created by"],data:ft,actions:vt}))},LeftNavItemBlock=styled$1(HBlock)`
  margin: 0px 0px 0px 12px;
  padding: 0px 0px 0px 12px;
  border-radius: 4px;
  height: 36px;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  cursor: pointer;
  &:hover {
    background-color: #f5f6f7;
  }
`,LeftNav=et=>Wt.createElement(VBlock,{style:{width:"300px",paddingTop:"0px",overflowY:"auto"}},et.sections.map((tt,nt)=>Wt.createElement(LeftNavSection,{key:nt,...tt}))),LeftNavSection=et=>Wt.createElement(VBlock,{style:{marginBottom:"16px"}},Wt.createElement(HBlock,{style:{textTransform:"uppercase",padding:"10px 24px",fontSize:"14px",position:"sticky",backgroundColor:"#fff",top:0}},et.title),Wt.createElement(VBlock,null,et.items.map((tt,nt)=>Wt.createElement(LeftNavItem,{key:nt,...tt})))),LeftNavItem=et=>Wt.createElement(LeftNavItemBlock,{style:{backgroundColor:et.active?"#A9EDF252":"",color:et.active?"#038194":"",fontWeight:et.active?600:""},onClick:et.onClick},Wt.createElement(et.icon,null),et.label),HomeTopBar=et=>{const tt=hooks().format("YY_MM_DD_hh_mm_ss"),nt=et.inJupyter,rt=tt,[ot]=react.exports.useState(""),st=useWeaveContext(),ut="dashboard-"+(ot===""?rt:ot),ct=useNewPanelFromRootQueryCallback(),{urlPrefixed:ft}=getConfig(),pt=react.exports.useCallback(()=>{ct(ut,voidNode(),!0,ht=>{if(nt){const mt=st.expToString(ht).replace(/\n+/g,"").replace(/\s+/g,"");window.open(ft(`?exp=${encodeURIComponent(mt)}`),"_blank")}else et.navigateToExpression(ht)})},[nt,ct,ut,et,ft,st]);return Wt.createElement(TopBar,null,Wt.createElement(TopBarLeft,null,Wt.createElement(WeaveLogo$1,null),"Weave"),Wt.createElement(TopBarRight,null,Wt.createElement(WBButton,{variant:"confirm",onClick:pt},Wt.createElement(IconAddNew,null),"New board")))},TopBar=styled$1.div`
  height: 64px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
`,TopBarLeft=styled$1.div`
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
`,TopBarRight=styled$1.div`
  display: flex;
  align-items: center;
`,WeaveLogo$1=styled$1(IconWeaveLogo)`
  width: 32px;
  height: 32px;
  margin-right: 12px;
`,IconAddNew=styled$1(IconAddNew$3)`
  width: 18px;
  height: 18px;
  margin-right: 6px;
`,rowToExpression=et=>{const tt=`local-artifact:///${et.name}:${et["latest version id"]}/obj`;return opGet({uri:constString(tt)})},CenterLocalBrowser=et=>{const tt=useLocalDashboards(),[nt,rt]=react.exports.useState(),ot=react.exports.useMemo(()=>tt.result.sort(ut=>-ut.createdAt).map(ut=>({_id:ut.name,name:ut.name,"latest version id":ut.version,"updated at":hooks(ut.createdAt).calendar()})),[tt]),st=react.exports.useMemo(()=>[[{icon:IconInfo,label:"Board details",onClick:ut=>{rt(ut._id);const ct=rowToExpression(ut),ft=Wt.createElement(HomeBoardPreview,{expr:ct,name:ut.name,setPreviewNode:et.setPreviewNode,navigateToExpression:et.navigateToExpression});et.setPreviewNode(ft)}}],[{icon:IconOpenNewTab,label:"Open Board",onClick:ut=>{et.navigateToExpression(rowToExpression(ut))}}]],[et]);return Wt.createElement(CenterBrowser,{allowSearch:!0,title:"Local Boards",selectedRowId:nt,noDataCTA:"No Local Weave boards found.",loading:tt.loading,columns:["name","latest version id","updated at"],data:ot,actions:st})},CenterSpace=styled$1(VSpace)`
  border: 1px solid #dadee3;
  box-shadow: 0px 8px 16px 0px #0e10140a;
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
`,HomeComp=et=>{const[tt,nt]=react.exports.useState(),rt=react.exports.useCallback(Et=>{nt(void 0),et.updateConfig({vars:{},input_node:Et,id:"",config:void 0})},[et]),ot=isServedLocally(),st=useIsAuthenticated(),ut=useUserEntities(st),ct=useUserName(st),[ft,pt]=react.exports.useState(void 0),ht=react.exports.useMemo(()=>[],[ft?.browserType,ft?.rootId]),mt=react.exports.useMemo(()=>ut.result.length===0?[]:[{title:"Weights & Biases",items:ut.result.sort((Et,xt)=>Et===ct.result?-1:xt===ct.result?1:Et<xt?-1:Et>xt?1:0).map(Et=>({icon:Et===ct.result?IconUserProfilePersonal:IconUsersTeam,label:Et,active:ft?.browserType==="wandb"&&ft?.rootId===Et,onClick:()=>{pt({browserType:"wandb",rootId:Et}),nt(void 0)}}))}],[ft?.browserType,ft?.rootId,ut.result,ct.result]),yt=react.exports.useMemo(()=>ot?[{title:"Drafts",items:[{icon:IconLaptopLocalComputer,label:"On this machine",active:ft?.browserType==="drafts"&&ft?.rootId==="local",onClick:()=>{pt({browserType:"drafts",rootId:"local"}),nt(void 0)}}]}]:[],[ft?.browserType,ft?.rootId,ot]),vt=react.exports.useMemo(()=>[...ht,...mt,...yt],[yt,ht,mt]),Tt=ct.loading||st===void 0;return react.exports.useEffect(()=>{!Tt&&ft==null&&(st&&ct.result!=null?pt({browserType:"wandb",rootId:ct.result}):ot?pt({browserType:"drafts",rootId:"local"}):console.warn("Unable to determine root"))},[ft,st,ot,Tt,ct.loading,ct.result]),Wt.createElement(VStack,null,Wt.createElement(Block,null,Wt.createElement(HomeTopBar,{inJupyter:et.inJupyter,navigateToExpression:rt})),Wt.createElement(HSpace,{style:{gap:"12px"}},Wt.createElement(LeftNav,{sections:vt}),!Tt&&Wt.createElement(CenterSpace,null,ft?.browserType==="recent"?Wt.createElement(Placeholder,null):ft?.browserType==="wandb"?Wt.createElement(CenterEntityBrowser,{navigateToExpression:rt,setPreviewNode:nt,entityName:ft?.rootId}):ft?.browserType==="drafts"&&ft?.rootId==="local"?Wt.createElement(CenterLocalBrowser,{navigateToExpression:rt,setPreviewNode:nt}):Wt.createElement(Placeholder,null)),Wt.createElement(Block,{style:{width:tt!=null?"450px":"0px"}},tt)))},Placeholder=et=>Wt.createElement(VStack,{style:{alignContent:"center",alignItems:"center",justifyContent:"center"}},Wt.createElement(IconWeaveLogo,{style:{width:"200px",height:"200px"}})),Home=react.exports.memo(HomeComp),KeyboardShortcutComp=({keys:et,lightMode:tt,className:nt})=>Wt.createElement(Keys,{className:nt},et.map((rt,ot)=>Wt.createElement(Key,{key:ot,lightMode:tt},rt))),KeyboardShortcut=react.exports.memo(KeyboardShortcutComp),Keys=styled$1.div`
  display: inline-flex;
`,Key=styled$1.div`
  display: inline-block;
  padding: 2px 6px;
  color: ${et=>et.lightMode?GRAY_500:GRAY_350};
  background-color: ${et=>et.lightMode?hexToRGB(GRAY_900,.04):hexToRGB(MOONBEAM,.1)};
  border-radius: 3px;

  &:not(:first-child) {
    margin-left: 1px;
  }
`,browser=detect();browser?.name;browser?.name;const isMac=navigator.platform?.startsWith("Mac")??navigator.userAgent.includes("Mac"),useBranchPointFromURIString=et=>{const tt=react.exports.useMemo(()=>et==null||!isLocalURI(et)?constNone():callOpVeryUnsafe("Ref-branch_point",{ref:callOpVeryUnsafe("ref",{uri:constString(et)},{type:"FilesystemArtifactRef"})},maybe(typedDict({}))),[et]),nt=useNodeValue(tt);return nt.loading?null:nt.result},usePreviousVersionFromURIString=et=>{const tt=react.exports.useMemo(()=>et==null||!isLocalURI(et)?constNone():callOpVeryUnsafe("FilesystemArtifact-previousURI",{artifact:callOpVeryUnsafe("FilesystemArtifact-rootFromURI",{uri:constString(et)},{type:"FilesystemArtifact"})},{type:"string"}),[et]),nt=useNodeValue(tt);return nt.loading?null:nt.result},useGetCodeFromURI=et=>{const nt=useClientContext().client;if(nt==null)throw new Error("client not initialized!");return react.exports.useCallback(()=>{const rt=et==null?constNone():callOpVeryUnsafe("__internal__-generateCodeForObject",{uri:callOpVeryUnsafe("get",{uri:constString(et)},"any")},"string");return nt.query(rt)},[nt,et])},useCopyCodeFromURI=et=>{const tt=useGetCodeFromURI(et),[nt,rt]=react.exports.useState("ready"),ot=react.exports.useCallback(()=>(rt("loading"),tt().then(st=>navigator.clipboard.writeText(st)).then(()=>{rt("success")}).catch(st=>{rt("error"),console.error(st)}).finally(()=>{setTimeout(()=>{rt("ready")},750)})),[tt]);return{copyStatus:nt,onCopy:ot}},actionsRequiringAuthentication=new Set(["commit","publish_as","publish_new","rename_remote"]),persistenceActions={local_untracked:{storeAction:"save",renameAction:"publish_as"},local_saved_no_remote:{storeAction:"publish_new",renameAction:"rename_local"},local_uncommitted_with_remote:{storeAction:"commit",renameAction:"publish_as"},local_published:{storeAction:null,renameAction:null},cloud_untracked:{storeAction:null,renameAction:"publish_as"},cloud_saved_no_remote:{storeAction:"publish_new",renameAction:"publish_as"},cloud_uncommitted_with_remote:{storeAction:"commit",renameAction:"publish_as"},cloud_published:{storeAction:null,renameAction:null}},stateFromURI=(et,tt)=>{const nt=isServedLocally();let rt="untracked";et==null?rt="untracked":isRemoteURI(et)?rt="published":isLocalURI(et)&&(tt?rt="local_with_remote":rt="local_no_remote");let ot;if(nt)switch(rt){case"untracked":ot="local_untracked";break;case"local_no_remote":ot="local_saved_no_remote";break;case"local_with_remote":ot="local_uncommitted_with_remote";break;case"published":ot="local_published";break;default:throw new Error(`Unexpected form: ${rt}`)}else switch(rt){case"untracked":ot="cloud_untracked";break;case"local_no_remote":ot="cloud_saved_no_remote";break;case"local_with_remote":ot="cloud_uncommitted_with_remote";break;case"published":ot="cloud_published";break;default:throw new Error(`Unexpected form: ${rt}`)}return ot},getAvailableActions=(et,tt)=>{const nt=persistenceActions[et];return tt?nt:{storeAction:nt.storeAction!=null&&actionsRequiringAuthentication.has(nt.storeAction)?null:nt.storeAction,renameAction:nt.renameAction!=null&&actionsRequiringAuthentication.has(nt.renameAction)?null:nt.renameAction}},useStateMachine=(et,tt,nt)=>{const rt=uriFromNode(et),ot=stateFromURI(rt,nt),st=useNodeValueExecutor(),ut=useMakeMutation(),[ct,ft]=react.exports.useState(!1),pt=react.exports.useCallback(async(ht,mt,yt)=>{if(ft(!0),mt=mt||{},persistenceActions[ot].storeAction!==ht&&persistenceActions[ot].renameAction!==ht)throw new Error(`Invalid action: ${ht}`);if(ht==="save"){const vt=callOpVeryUnsafe("save_to_uri",{obj:et,name:mt.name!=null?constString(mt.name):constNone()},maybe("string")),Tt=await st(vt);if(Tt==null)throw new Error("Failed to save");tt(opGet({uri:constString(Tt)}))}else if(ht==="rename_local"){const vt=toArtifactSafeName(mt.name);await ut(et,"rename_artifact",{name:constString(vt)}),tt(opGet({uri:constString(`local-artifact:///${vt}:latest/obj`)}))}else if(ht==="publish_as"||ht==="publish_new")await ut(et,"publish_artifact",{artifact_name:mt.name!=null?constString(toArtifactSafeName(mt.name)):constNone(),project_name:constString("weave")},vt=>{tt(vt)});else if(ht==="commit")await ut(et,"merge",{},vt=>{tt(vt)});else throw new Error(`Not implemented yet: ${ht}`);ft(!1),yt&&yt()},[st,et,ut,ot,tt]);return{nodeState:ot,takeAction:pt,acting:ct}},CustomPopover=styled$1(Popover$1)`
  .MuiPaper-root {
    box-shadow: 0px 16px 32px 0px rgba(14, 16, 20, 0.16);
  }
`,PersistenceLabel=styled$1.div`
  color: #76787a;
`,PersistenceControlsWrapper=styled$1.div`
  flex: 1 1 30px;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
`,HEADER_HEIGHT=48,MainHeaderWrapper=styled$1.div`
  position: relative;
  flex: 0 0 ${HEADER_HEIGHT}px;
  height: ${HEADER_HEIGHT}px;
  overflow: hidden;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  background-color: ${WHITE};
  border-bottom: 1px solid ${GRAY_350};
  font-size: 15px;
`,iconStyles=Ce`
  color: ${GRAY_500};
  width: 18px;
  height: 18px;
`,IconUp=styled$1(IconUp$1)`
  ${iconStyles}
`,IconDown=styled$1(IconDown$2)`
  ${iconStyles}
`,controlsStyles=Ce`
  &:hover {
    ${IconUp}, ${IconDown} {
      color: ${GRAY_800};
    }
  }
`,HeaderCenterControlsPrimary=styled$1.span`
  font-weight: 600;
`,HeaderCenterControlsSecondary=styled$1.span`
  color: ${GRAY_500};
`,HeaderCenterControls=styled$1.div`
  ${controlsStyles}
  flex: 0 1 auto;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  font-size: 16px;
`,CustomMenu=styled$1.div`
  padding: 8px 0;
  ${et=>et.width!=null&&Ce`
      width: ${et.width}px;
    `}
`,MenuItem=styled$1.div`
  display: flex;
  flex-direction: row;
  justify-content: left;
  align-items: center;
  padding: 4px 16px 4px ${et=>et.noIcon?18:16}px;
  gap: 10px;
  font-size: 15px;

  ${et=>et.disabled?Ce`
          color: ${GRAY_500};
        `:Ce`
          cursor: pointer;
          &:hover {
            background-color: #f5f5f5;
          }
        `}
`,MenuIcon=styled$1.div`
  width: 18px;
  height: 18px;
  svg {
    width: 100%;
    height: 100%;
  }
`,MenuText=styled$1.div`
  flex-grow: 1;
`,MenuShortcut=styled$1(KeyboardShortcut).attrs({lightMode:!0})``,MenuDivider=styled$1.div`
  height: 1px;
  margin: 6px 0;
  background-color: ${GRAY_350};
`,HeaderLeftControls=styled$1.div`
  ${controlsStyles}
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 1 1 30px;
`,WeaveLogo=styled$1(IconWeaveLogo)`
  width: 32px;
  height: 32px;
  transform: rotate(${et=>et.open?180:0}deg);
  transition: transform 0.3s ease-out;
`,PersistenceManager=et=>{const tt=uriFromNode(et.inputNode),nt=useBranchPointFromURIString(tt),rt=branchPointIsRemote(nt),{nodeState:ot,takeAction:st,acting:ut}=useStateMachine(et.inputNode,et.updateNode,rt),ct=useIsAuthenticated(),ft=react.exports.useMemo(()=>getAvailableActions(ot,ct??!1),[ot,ct]),pt=react.exports.useRef(null);return Wt.createElement(MainHeaderWrapper,{ref:pt},Wt.createElement(HeaderLogoControls,{inputNode:et.inputNode,inputConfig:et.inputConfig,updateNode:et.updateNode,headerEl:pt.current,goHome:et.goHome}),tt&&Wt.createElement(HeaderFileControls,{inputNode:et.inputNode,updateNode:et.updateNode,headerEl:pt.current,maybeURI:tt,branchPoint:nt,renameAction:ft.renameAction,takeAction:st,goHome:et.goHome}),Wt.createElement(HeaderPersistenceControls,{storeAction:ft.storeAction,acting:ut,takeAction:st,nodeState:ot}))},persistenceStateToLabel={local_untracked:"Unsaved changes",local_saved_no_remote:"Saved",local_uncommitted_with_remote:"Uncommitted changes",local_published:"Published",cloud_untracked:"Unsaved changes",cloud_saved_no_remote:"Not published",cloud_uncommitted_with_remote:"Uncommitted changes",cloud_published:"Published"},persistenceActionToLabel={save:"Make object",commit:"Commit",rename_local:"Rename",publish_as:"Publish As",publish_new:"Publish",rename_remote:"Rename"},HeaderPersistenceControls=({storeAction:et,acting:tt,takeAction:nt,nodeState:rt})=>Wt.createElement(PersistenceControlsWrapper,null,tt?Wt.createElement(WBButton,{loading:!0,variant:"confirm"},"Working"):et?Wt.createElement(Wt.Fragment,null,Wt.createElement(PersistenceLabel,null,persistenceStateToLabel[rt]),Wt.createElement(WBButton,{variant:"confirm",onClick:()=>{nt(et)}},persistenceActionToLabel[et])):Wt.createElement(WBButton,{disabled:!0,variant:"plain"},persistenceStateToLabel[rt])),HeaderFileControls=({inputNode:et,goHome:tt,headerEl:nt,maybeURI:rt,branchPoint:ot,renameAction:st,takeAction:ut,updateNode:ct})=>{const[ft,pt]=react.exports.useState(!1),[ht,mt]=react.exports.useState(!1),yt=rt!=null&&isLocalURI(rt),vt=determineURISource(rt,ot),{name:Tt,version:Et}=determineURIIdentifier(rt),[xt,At]=react.exports.useState(null),Ct=Boolean(xt),$t=useMakeMutation(),Ot=react.exports.useCallback(async()=>{yt&&(await $t(et,"delete_artifact",{}),tt?.())},[tt,et,yt,$t]),It=!!(usePreviousVersionFromURIString(rt)&&rt),kt=useMutation(et,"undo_artifact",ct),Mt=react.exports.useCallback(()=>{kt({})},[kt]),Ft=!1,zt=react.exports.useCallback(()=>{},[]),Vt=useNodeWithServerType(et).result?.type,Zt=weaveTypeIsPanel(Vt||"any");react.exports.useEffect(()=>{function sn(Sn){if(!(isMac&&!Sn.metaKey||!isMac&&!Sn.ctrlKey)){if(Sn.key==="z"&&It){Mt();return}if(Sn.key==="y"&&Ft){zt();return}}}return document.addEventListener("keydown",sn),()=>{document.removeEventListener("keydown",sn)}},[It,Mt,Ft,zt]);const Ut=(Zt?"dashboard":"object")+"-"+hooks().format("YY_MM_DD_hh_mm_ss"),Xt=useNewPanelFromRootQueryCallback(),Jt=react.exports.useCallback(()=>{const sn=Zt?voidNode():et;Xt(Ut,sn,!0,Sn=>{ct(Sn)})},[et,Zt,Xt,Ut,ct]),gn=!1;react.exports.useCallback(()=>{},[]);const{onCopy:An}=useCopyCodeFromURI(rt);return Wt.createElement(Wt.Fragment,null,Wt.createElement(HeaderCenterControls,null,vt&&Wt.createElement(HeaderCenterControlsSecondary,{onClick:()=>{At(nt)}},vt.entity,"/",vt.project,"/"),Wt.createElement(HeaderCenterControlsPrimary,{onClick:()=>{At(nt)}},Tt),Ct?Wt.createElement(IconUp,{onClick:()=>{At(null)}}):Wt.createElement(IconDown,{onClick:()=>{At(nt)}})),Wt.createElement(CustomPopover,{open:Ct,anchorEl:xt,onClose:()=>At(null),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},Wt.createElement(CustomMenu,{width:242},Et&&Wt.createElement(MenuItem,{disabled:!0,noIcon:!0},Wt.createElement(MenuText,null,"Version (",yt?"Local":"W&B","): ",Et)),(st||It||Ft)&&Wt.createElement(MenuDivider,null),st&&Wt.createElement(MenuItem,{onClick:()=>{At(null),pt(!0)}},Wt.createElement(MenuIcon,null,Wt.createElement(IconPencilEdit,null)),Wt.createElement(MenuText,null,"Rename")),It&&Wt.createElement(MenuItem,{onClick:()=>{At(null),Mt()}},Wt.createElement(MenuIcon,null,Wt.createElement(IconUndo,null)),Wt.createElement(MenuText,null,"Undo"),Wt.createElement(MenuShortcut,{keys:[isMac?"Cmd":"Ctrl","Z"]})),Ft,Wt.createElement(MenuDivider,null),rt&&Wt.createElement(MenuItem,{onClick:()=>{An().finally(()=>At(null))}},Wt.createElement(MenuIcon,null,Wt.createElement(IconCopy,null)),Wt.createElement(MenuText,null,"Copy Code")),Wt.createElement(MenuDivider,null),Wt.createElement(MenuItem,{onClick:()=>{At(null),Jt()}},Wt.createElement(MenuIcon,null,Wt.createElement(IconAddNew$3,null)),Wt.createElement(MenuText,null,"New board")),gn,yt&&Wt.createElement(Wt.Fragment,null,Wt.createElement(MenuDivider,null),Wt.createElement(MenuItem,{onClick:()=>{At(null),Ot()}},Wt.createElement(MenuIcon,null,Wt.createElement(IconDelete,null)),Wt.createElement(MenuText,null,"Delete"))))),st&&Wt.createElement(RenameActionModal,{currName:Tt??"",acting:ht,actionName:st,open:ft,onClose:()=>pt(!1),onRename:sn=>{mt(!0),ut(st,{name:sn},()=>{mt(!1),pt(!1)})}}))},HeaderLogoControls=({inputNode:et,headerEl:tt,goHome:nt,updateNode:rt,inputConfig:ot})=>{const[st,ut]=react.exports.useState(null),ct=Boolean(st),ft=useNodeWithServerType(et).result?.type,pt=weaveTypeIsPanel(ft||"any"),ht=weaveTypeIsPanelGroup(ft),mt=react.exports.useMemo(()=>{if(ht){const At=ot?.config;return At==null||ht&&"sidebar"in At.items&&"main"in At.items?null:_$2.mapValues(At.items,getFullChildPanel)}else return pt?{panel0:getFullChildPanel(ot)}:{panel0:getFullChildPanel(et)}},[ot,et,ht,pt]),{processedSeedItems:yt,vars:vt}=react.exports.useMemo(()=>{const At={},Ct=new Set,$t=_$2.mapValues(mt,(Rt,It)=>mapPanels(Rt,[],(kt,Mt)=>{const{input_node:Ft}=kt,zt=mapNodes(Ft,Vt=>{if(isOutputNode(Vt)&&Vt.fromOp.name==="get"){const Zt=Vt.fromOp.inputs.uri;if(Zt!=null&&isConstNode(Zt)){const Ut=Zt.val;if(Ut!=null&&typeof Ut=="string"){if(!(Ut in At)){const Xt=Ut.split(":")[1].split("/");let Jt=Xt[Xt.length-1];Jt=Jt.replace(/[^a-z0-9_]/gi,"_"),/^[a-z]/i.test(Jt)||(Jt="v_"+Jt);let gn=0,An=Jt+"_"+gn;for(;Ct.has(An);)gn++,An=Jt+"_"+gn;Ct.add(An),At[Ut]={name:An,node:Vt}}return varNode(Vt.type,At[Ut].name)}}}return Vt});return{...kt,input_node:zt}})),Ot=_$2.fromPairs(Object.entries(At).map(([Rt,{name:It,node:kt}])=>[It,kt]));return{processedSeedItems:$t,vars:Ot}},[mt]),Tt="dashboard-"+hooks().format("YY_MM_DD_hh_mm_ss"),Et=useNewDashFromItems(),xt=react.exports.useCallback(()=>{yt&&Et(Tt,yt,vt,At=>{rt(At)})},[Et,Tt,yt,vt,rt]);return Wt.createElement(Wt.Fragment,null,Wt.createElement(HeaderLeftControls,{onClick:At=>{ut(tt)}},Wt.createElement(WeaveLogo,{open:st!=null}),ct?Wt.createElement(IconUp,null):Wt.createElement(IconDown,null)),Wt.createElement(CustomPopover,{open:ct,anchorEl:st,onClose:()=>ut(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"}},Wt.createElement(CustomMenu,null,mt!=null&&Wt.createElement(MenuItem,{onClick:()=>{ut(null),xt()}},Wt.createElement(MenuIcon,null,Wt.createElement(IconAddNew$3,null)),Wt.createElement(MenuText,null,"Seed new board")),Wt.createElement(MenuItem,{onClick:()=>{ut(null),nt?.()}},Wt.createElement(MenuIcon,null,Wt.createElement(IconBack,null)),Wt.createElement(MenuText,null,"Back to home")),Wt.createElement(MenuItem,{onClick:()=>{ut(null),window.open("https://github.com/wandb/weave","_blank")}},Wt.createElement(MenuIcon,null,Wt.createElement(IconDocs,null)),Wt.createElement(MenuText,null,"Weave documentation")),Wt.createElement(MenuDivider,null),Wt.createElement(MenuItem,{disabled:!0},Wt.createElement(MenuText,null,"Weave 0.0.6",Wt.createElement("br",null),"by Weights & Biases")))))},RenameActionModal=et=>{const[tt,nt]=react.exports.useState(et.currName||"");return Wt.createElement(Modal$3,{open:et.open,size:"mini",content:Wt.createElement("div",{style:{padding:24,display:"flex",flexDirection:"column"},onKeyUp:rt=>{rt.key==="Enter"&&et.onRename(tt)}},Wt.createElement("div",{style:{marginBottom:24,fontWeight:"bold"}},"Name"),Wt.createElement(Input$7,{style:{marginBottom:24},value:tt,onChange:(rt,{value:ot})=>nt(ot)}),Wt.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},et.acting?Wt.createElement("div",null,"Working..."):Wt.createElement(Wt.Fragment,null,Wt.createElement(Button$3,{onClick:()=>et.onClose()},"Cancel"),Wt.createElement(Button$3,{primary:!0,disabled:tt.length<5,onClick:()=>et.onRename(tt)},persistenceActionToLabel[et.actionName]))))})},Inspector=({active:et,children:tt})=>Wt.createElement(Container$1,{active:et,"data-test":"weave-sidebar"},Wt.createElement(Content,null,tt)),WIDTH_PX=328,Container$1=styled$1.div`
  flex-shrink: 0;
  font-size: 15px;
  overflow: hidden;
  border-left: ${et=>et.active?"1px solid #e5e5e5":"none"};
  // Alternative to the border:
  /* 
  z-index: 1;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); 
  */
  width: ${et=>et.active?WIDTH_PX:0}px;
  transition: width 0.3s;
`,Content=styled$1.div`
  width: ${WIDTH_PX}px;
  height: 100%;
`,JupyterControlsHelpText=styled$1.div`
  width: max-content;
  position: absolute;
  top: 50px;
  border-radius: 4px;
  right: 48px;
  // transform: translate(-50%, 0);
  text-align: center;
  color: #fff;
  background-color: #1d1f24;
  padding: 10px 12px;
  font-size: 14px;
  opacity: 0.8;

  transition: display 0.3s ease-in-out;

  visibility: ${et=>et.active?"":"hidden"};
  opacity: ${et=>et.active?.8:0};
  transition: visibility 0s, opacity 0.3s ease-in-out;
`,JupyterControlsMain=styled$1.div`
  position: absolute;
  top: 50%;
  right: ${et=>et.reveal?"-0px":"-60px"};
  transition: right 0.3s ease-in-out;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  transform: translate(0, -50%);
  width: 40px;
  background-color: white;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 8px 0px 0px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  gap: 8px;
  padding: 8px 0px;
  z-index: 100;
`,JupyterControlsIcon=styled$1.div`
  width: 25px;
  height: 25px;
  padding: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.1s ease-in-out;
  border-radius: 4px;
  &:hover {
    background: #0096ad1a;
    color: #0096ad;
  }
`,usePoorMansLocation=()=>{const[et,tt]=react.exports.useState(window.location.toString());return react.exports.useEffect(()=>{const nt=setInterval(()=>{window.location.toString()!==et&&tt(window.location.toString())},250);return()=>{clearInterval(nt)}},[et]),window.location},PagePanel=et=>{const tt=useWeaveContext(),nt=usePoorMansLocation(),rt=new URLSearchParams(nt.search),ot=rt.get("fullScreen")!=null,st=rt.get("moarFullScreen")!=null,ut=rt.get("previewMode")!=null,ct=rt.get("exp"),ft=rt.get("expNode"),pt=rt.get("panelId")??"",ht=rt.get("automationId");let mt=rt.get("panelConfig")??void 0;const[yt,vt]=react.exports.useState(!0);mt!=null&&(mt=JSON.parse(mt));const Tt=inJupyterCell(),Et=useIsAuthenticated(),xt=isServedLocally(),At=react.exports.useCallback(Ut=>{const Xt=tt.expToString(Ut);if(Xt===ct)return;const Jt=new URLSearchParams(window.location.search);Jt.set("exp",Xt),Xt.startsWith("get")&&ct?.startsWith("get")?window.history.replaceState(null,"",`${window.location.pathname}?${Jt}`):window.history.pushState(null,"",`${window.location.pathname}?${Jt}`)},[ct,tt]),[Ct,$t]=react.exports.useState(CHILD_PANEL_DEFAULT_CONFIG),Ot=react.exports.useCallback(Ut=>{$t(Xt=>({...Xt,...Ut})),Ut.input_node!=null&&At(Ut.input_node)},[$t,At]),Rt=react.exports.useCallback(Ut=>{$t(Xt=>{const Jt=Ut(Xt);return Jt.input_node!=null&&At(Jt.input_node),fn(Xt,An=>{for(const sn of Object.keys(Jt))An[sn]=Jt[sn]})})},[$t,At]),[It,kt]=react.exports.useState(0),Mt=react.exports.useCallback(Ut=>{Ot({input_node:Ut}),kt(Xt=>Xt+1)},[Ot]);useWeaveAutomation(ht),react.exports.useEffect(()=>{vt(!0),ct!=null?tt.expression(ct,[]).then(Ut=>{Ot({input_node:Ut.expr,id:pt,config:mt}),vt(!1)}):ft!=null?(Ot({input_node:JSON.parse(ft),id:pt,config:mt}),vt(!1)):(Ot({input_node:voidNode(),id:pt,config:mt}),vt(!1))},[ct,It]);const[,Ft]=Wt.useState(tt.client.isPolling()),zt=Wt.useCallback(Ut=>{Ft(Ut)},[]);Wt.useEffect(()=>(tt.client.addOnPollingChangeListener(zt),()=>{tt.client.removeOnPollingChangeListener(zt)}),[tt,zt]);const Vt=Wt.useCallback(()=>{Ot({vars:{},input_node:voidNode(),id:"",config:void 0})},[Ot]),Zt=Et===!1&&xt===!1;return react.exports.useEffect(()=>{if(Zt){const Xt=`${window.location.origin.replace("//weave.","//api.")}/oidc/login?${new URLSearchParams({redirect_to:window.location.href}).toString()}`;window.location.replace(Xt)}},[Et,xt,Zt]),yt||Et===void 0?Wt.createElement(WandbLoader,{name:"page-panel-loader"}):Zt?Wt.createElement(WandbLoader,{name:"page-panel-loader"}):Wt.createElement(Fe,{theme:themes$1.light},Wt.createElement(PanelRenderedConfigContextProvider,null,Wt.createElement(PanelInteractContextProvider,null,Wt.createElement(WeaveRoot,{className:"weave-root",fullScreen:ot},Ct.input_node.nodeType==="void"?Wt.createElement(Home,{updateConfig:Ot,inJupyter:Tt}):Wt.createElement("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},(!Tt||st)&&!ut&&Wt.createElement(PersistenceManager,{inputNode:Ct.input_node,inputConfig:Ct.config,updateNode:Mt,goHome:Vt}),Wt.createElement(PageContent,{config:Ct,previewMode:ut,updateConfig:Ot,updateConfig2:Rt,goHome:Vt}))))))},PageContent=et=>{const{config:tt,updateConfig:nt,updateConfig2:rt,goHome:ot}=et,st=useWeaveContext(),ut=useEditorIsOpen(),ct=inJupyterCell(),{urlPrefixed:ft}=getConfig(),pt=useNodeWithServerType(tt.input_node),ht=weaveTypeIsPanel(pt.result?.type||{type:"Panel"}),mt=weaveTypeIsPanelGroup(pt.result?.type),yt=uriFromNode(tt.input_node),{onCopy:vt}=useCopyCodeFromURI(yt),[Tt,Et]=react.exports.useState(!1),xt=60,At=react.exports.useRef(null),Ct=react.exports.useCallback(Ot=>{if(ct){const Rt=Ot.clientX;(At.current?.offsetWidth||985)-Rt<xt?Et(!0):Et(!1)}},[ct]),$t=react.exports.useCallback(()=>{const Ot=st.expToString(tt.input_node).replace(/\n+/g,"").replace(/\s+/g,"");window.open(ft(`/?exp=${encodeURIComponent(Ot)}`),"_blank")},[tt.input_node,ft,st]);return Wt.createElement(PageContentContainer,{ref:At,onMouseLeave:Ot=>Et(!1),onMouseMove:Ct},Wt.createElement("div",{style:{flex:"1 1 auto",overflow:"hidden"}},Wt.createElement(ChildPanel,{controlBar:!ht&&!et.previewMode?"editable":"off",prefixHeader:ct?Wt.createElement(Icon$4,{style:{cursor:"pointer",color:"#555"},name:"home",onClick:ot}):Wt.createElement(Wt.Fragment,null),prefixButtons:Wt.createElement(Wt.Fragment,null,ct&&Wt.createElement(Wt.Fragment,null,Wt.createElement(BarButton,{onClick:$t},Wt.createElement(Icon$4,{name:"external square alternate"})),yt&&Wt.createElement(BarButton,{onClick:()=>{vt()}},Wt.createElement(Icon$4,{name:"copy"})))),config:tt,updateConfig:nt,updateConfig2:rt})),Wt.createElement(Inspector,{active:ut},Wt.createElement(ChildPanelConfigComp,{config:tt,updateConfig:nt,updateConfig2:rt})),ct&&Wt.createElement(JupyterPageControls,{...et,reveal:Tt&&!ut,goHome:ot,openNewTab:$t,maybeUri:yt,isGroup:mt,isPanel:ht,updateConfig2:rt}))},JupyterPageControls=et=>{const[tt,nt]=react.exports.useState(""),{copyStatus:rt,onCopy:ot}=useCopyCodeFromURI(et.maybeUri),st=useSetInspectingPanel(),ut=useCloseEditor(),ct=useEditorIsOpen(),ft=react.exports.useCallback(mt=>{et.updateConfig2(yt=>({...yt,input_node:mt}))},[et]),pt=useUpdateConfigForPanelNode(et.config.input_node,ft),ht=react.exports.useCallback(()=>{et.isPanel&&et.updateConfig2(mt=>{let yt;return et.isGroup?yt={...mt.config,config:addPanelToGroupConfig(mt.config.config,[""],"panel")}:yt={config:addPanelToGroupConfig(addPanelToGroupConfig(PANEL_GROUP_DEFAULT_CONFIG(),void 0,"panel",mt.config),[""],"panel"),id:"Group",input_node:{nodeType:"void",type:"invalid"},vars:{}},pt(yt),{...mt,config:yt}})},[et,pt]);return Wt.createElement(JupyterControlsMain,{reveal:et.reveal,onMouseLeave:mt=>{nt("")}},Wt.createElement(JupyterControlsHelpText,{active:tt!==""},tt),et.isPanel&&Wt.createElement(JupyterControlsIcon,{onClick:ht,onMouseEnter:mt=>{nt("Add new panel")},onMouseLeave:mt=>{nt("")}},Wt.createElement(IconAddNew$3,null)),ct?Wt.createElement(JupyterControlsIcon,{onClick:()=>{ut(),nt("Edit configuration")},onMouseEnter:mt=>{nt("Close configuration editor")},onMouseLeave:mt=>{nt("")}},Wt.createElement(IconClose,null)):Wt.createElement(JupyterControlsIcon,{onClick:()=>{st([""]),nt("Close configuration editor")},onMouseEnter:mt=>{nt("Edit configuration")},onMouseLeave:mt=>{nt("")}},Wt.createElement(IconPencilEdit,null)),Wt.createElement(JupyterControlsIcon,{onClick:ot,onMouseEnter:mt=>{nt("Copy code")},onMouseLeave:mt=>{nt("")}},rt==="loading"?Wt.createElement(IconLoading,null):rt==="success"?Wt.createElement(IconCheckmark,null):Wt.createElement(IconCopy,null)),Wt.createElement(JupyterControlsIcon,{onClick:et.openNewTab,onMouseEnter:mt=>{nt("Open in new tab")},onMouseLeave:mt=>{nt("")}},Wt.createElement(IconOpenNewTab,null)),Wt.createElement(JupyterControlsIcon,{onClick:et.goHome,onMouseEnter:mt=>{nt("Go home")},onMouseLeave:mt=>{nt("")}},Wt.createElement(IconHome,null)))},WeaveRoot=styled$1.div`
  position: ${et=>et.fullScreen?"fixed":"absolute"};
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: ${WHITE};
  color: ${TEXT_PRIMARY_COLOR};
`,PageContentContainer=styled$1.div`
  flex: 1 1 300px;
  overflow: hidden;
  display: flex;
`,FrameVariablesTable=et=>{const tt=useWeaveContext(),nt=usePanelContext();return Wt.createElement("ul",null,_$2.keys(nt.frame).map(rt=>{const ot=nt.frame[rt];return ot.nodeType==="void"||ot.nodeType==="var"||isAssignableTo(ot.type,{type:"Group"})||isAssignableTo(ot.type,{type:"Panel"})?null:Wt.createElement("li",{key:rt,onClick:()=>{et.updateInput?.(varNode(ot.type,rt))}},rt,":",tt.typeToString(ot.type))}))},useOnDeleteCallback=()=>{const et=useNodeValueExecutor(),tt=useMakeMutation();return(nt,rt)=>{et(opObjectNameToURI(nt)).then(ot=>{const st=opGet({uri:constString(ot)});tt(st,"delete_artifact",{})})}},LocalDashboardsTable=et=>{const tt=useWeaveContext(),nt=react.exports.useMemo(()=>opObjectsToName(getLocalArtifactDataNode(!0)),[]),rt=react.exports.useMemo(()=>getLocalArtifactDataTableState(nt,"Dashboard Name",tt),[nt,tt]),ot=useConfigChild("tableConfig",et.config,et.updateConfig,react.exports.useMemo(()=>({simpleTable:!0,tableState:rt}),[rt])),st=useOnDeleteCallback(),[ut,ct]=react.exports.useState(!1),[ft,pt]=react.exports.useState(""),ht=useNodeValueExecutor(),mt=useMakeMutation(),yt=react.exports.useCallback((Et,xt)=>{ht(Et).then(At=>{pt(At),ct(!0)})},[ht]),vt=react.exports.useCallback(Et=>{mt(opGet({uri:constString(`local-artifact:///${ft}/obj`)}),"rename_artifact",{name:constString(Et)}).then(()=>{pt(""),ct(!1)})},[ft,mt]),Tt=react.exports.useMemo(()=>[{key:"delete",content:"Delete",icon:"trash",onClick:st},{key:"rename",content:"Rename",icon:"pencil",onClick:yt}],[st,yt]);return Wt.createElement(Wt.Fragment,null,Wt.createElement(RenameDashboardModal,{key:ft,open:ut,onClose:()=>ct(!1),onRename:vt,curName:ft}),Wt.createElement(PanelTable,{input:nt,config:ot.config,updateConfig:ot.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput,rowActions:Tt}))},RenameDashboardModal=et=>{const[tt,nt]=react.exports.useState(et.curName);return Wt.createElement(Modal$3,{open:et.open,size:"mini",content:Wt.createElement("div",{style:{padding:24,display:"flex",flexDirection:"column"},onKeyUp:rt=>{rt.key==="Enter"&&et.onRename(tt)}},Wt.createElement("div",{style:{marginBottom:24,fontWeight:"bold"}},"Rename"),Wt.createElement(Input$7,{style:{marginBottom:24},value:tt,onChange:(rt,{value:ot})=>nt(ot)}),Wt.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},Wt.createElement(Button$3,{onClick:()=>et.onClose()},"Cancel"),Wt.createElement(Button$3,{primary:!0,onClick:()=>et.onRename(tt)},"Rename")))})},useLocalObjectsExist=()=>{const et=react.exports.useMemo(()=>getLocalArtifactDataNode(!1),[]);return useUniqueTypeNames(et).length>0},useUniqueTypeNames=et=>{const tt=opUnique({arr:opDropNa({arr:opMap({arr:et,mapFn:constFunction({row:{type:"FilesystemArtifact"}},({row:nt})=>opTypeName({type:callOpVeryUnsafe("FilesystemArtifact-weaveType",{artifact:nt},"type")}))})})});return(useNodeValue(tt).result??[]).filter(nt=>nt!=="OpDef")},applyTypeFilter=(et,tt)=>opFilter({arr:et,filterFn:constFunction({row:{type:"FilesystemArtifact"}},({row:nt})=>opStringEqual({lhs:opTypeName({type:callOpVeryUnsafe("FilesystemArtifact-weaveType",{artifact:nt},"type")}),rhs:constString(tt)}))}),LocalObjectsTable=et=>{const tt=useWeaveContext(),nt=react.exports.useMemo(()=>getLocalArtifactDataNode(!1),[]),rt=react.exports.useMemo(()=>getLocalArtifactDataTableState(nt,"Object Name",tt),[nt,tt]),ot=useNewPanelFromRootQueryCallback(),st=react.exports.useCallback(ft=>{const pt=et.updateInput;pt!=null&&(et.isRoot?ot("dashboard-temp-view",ft,!1,mt=>{pt(mt)}):pt(ft))},[ot,et]),ut=useUniqueTypeNames(nt),ct=useConfigChild("cardConfig",et.config,et.updateConfig,react.exports.useMemo(()=>({title:constString("Local Objects"),subtitle:"",content:ut.map(ft=>({name:ft,content:{vars:{},input_node:opObjectsToName(applyTypeFilter(nt,ft)),id:"table",config:{simpleTable:!0,tableState:rt}}}))}),[nt,rt,ut]));return ut.length===0?Wt.createElement(Wt.Fragment,null):Wt.createElement(PanelCard,{input:voidNode(),config:ct.config,updateConfig:ct.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:st})},makeTableState=(et,tt,nt)=>{let rt=emptyTable();const ot=getRowExampleNode(rt.preFilterFunction,rt.groupBy,rt.columnSelectFunctions,rt.columnNames,rt.order,rt.sort,et,tt),st=varNode(ot.type,"row");return rt=addNamedColumnToTable(rt,"Project Name",st,{panelID:"weavelink",panelConfig:{to:opRootProject({entityName:constString(nt),projectName:varNode("string","input")}),vars:{}}}),rt},ViewerProjectsTable=et=>{const tt=useWeaveContext(),nt=react.exports.useMemo(()=>opEntityName({entity:opUserEntities({user:opRootViewer({})})}),[]),rt=useNodeValue(nt),ot=react.exports.useMemo(()=>rt.result??[],[rt.result]),st=useConfigChild("cardConfig",et.config,et.updateConfig,react.exports.useMemo(()=>({title:constString(""),subtitle:"Entity:",content:ot.map(ut=>{const ct=opProjectName({project:opSort({arr:opEntityProjects({entity:opRootEntity({entityName:constString(ut)})}),compFn:constFunction({row:"project"},({row:ft})=>opArray({a:opProjectUpdatedAt({project:ft})})),columnDirs:opArray({a:constString("desc")})})});return{name:ut,content:{vars:{},input_node:ct,id:"table",config:{simpleTable:!0,tableState:makeTableState(ct,tt,ut)}}}})}),[ot,tt]));return ot.length===0?Wt.createElement(Wt.Fragment,null):Wt.createElement(PanelCard,{input:voidNode(),config:st.config,updateConfig:st.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput})},HIDE_VARIABLES_TAB=!0,inputType="invalid",PanelRootBrowser=et=>{const tt=isServedLocally(),nt=useLocalObjectsExist(),rt=useIsAuthenticated(),ot=usePanelContext(),st=react.exports.useMemo(()=>_$2.keys(ot.frame).length>0,[ot.frame]),ut=useConfigChild("localDashboardsTab",et.config,et.updateConfig),ct=useConfigChild("variablesTab",et.config,et.updateConfig),ft=useConfigChild("objectsTab",et.config,et.updateConfig),pt=useConfigChild("projectsTab",et.config,et.updateConfig),ht=useConfigChild("projectScopeTab",et.config,et.updateConfig),mt=react.exports.useMemo(()=>{const Et=[];return tt&&(et.isRoot&&Et.push("Dashboards"),nt&&Et.push("Objects")),rt&&Et.push("W&B Projects"),st&&!HIDE_VARIABLES_TAB&&Et.push("Variables"),Et},[tt,nt,et.isRoot,rt,st]),[yt,vt]=react.exports.useState(void 0),Tt=react.exports.useCallback(Et=>{if(et.isRoot&&isOutputNode(Et)&&Et.fromOp.name==="root-project"){const xt=Et.fromOp.inputs.entityName,At=Et.fromOp.inputs.projectName;if(isConstNode(xt)&&isConstNode(At)){vt({entityName:xt.val,projectName:At.val});return}}et.updateInput?.(Et)},[et]);return yt?Wt.createElement("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},Wt.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}},Wt.createElement("div",{style:{padding:10,fontSize:20,fontWeight:"bold"}},"Project:\xA0",yt.entityName,"/",yt.projectName),Wt.createElement(Icon$4,{onClick:()=>{vt(void 0)},style:{lineHeight:"1.2rem",color:"#999",cursor:"pointer"},name:"cancel"})),Wt.createElement(PanelProjectOverview,{input:opRootProject({entityName:constString(yt.entityName),projectName:constString(yt.projectName)}),config:ht.config,updateConfig:ht.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput,isRoot:et.isRoot})):Wt.createElement(Container,null,et.isRoot&&Wt.createElement(Header,null,tt?"Local Weave Data":"Weave Data"),Wt.createElement(LayoutTabs,{tabNames:mt,renderPanel:({id:Et})=>Et==="Dashboards"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(LocalDashboardsTable,{input:voidNode(),config:ut.config,updateConfig:ut.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput})):Et==="Variables"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(FrameVariablesTable,{input:voidNode(),config:ct.config,updateConfig:ct.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput})):Et==="Objects"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(LocalObjectsTable,{input:voidNode(),config:ft.config,updateConfig:ft.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:et.updateInput,isRoot:et.isRoot})):Et==="W&B Projects"?Wt.createElement("div",{style:{width:"100%",height:"100%"}},Wt.createElement(ViewerProjectsTable,{input:voidNode(),config:pt.config,updateConfig:pt.updateConfig,context:et.context,updateContext:et.updateContext,updateInput:Tt})):Wt.createElement(Wt.Fragment,null)}))},Spec={id:"RootBrowser",Component:PanelRootBrowser,inputType},Container=styled$1.div`
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
`,Header=styled$1.div`
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 600;
`,ComputeGraphContextProviderFromClient=Wt.memo(({client:et,children:tt})=>{const nt=react.exports.useMemo(()=>({client:et}),[et]),[rt,ot]=react.exports.useState(!1);return react.exports.useEffect(()=>{const st=nt.client.loadingObservable().subscribe(ot);return()=>st.unsubscribe()},[nt]),Wt.createElement("div",{"data-test":"compute-graph-provider","data-test-num-shadow-server-requests-counter":GlobalCGEventTracker.shadowServerRequests,className:rt?"loading cg-executing":""},Wt.createElement(ClientContext.Provider,{value:nt},tt))});ComputeGraphContextProviderFromClient.displayName="ComputeGraphContextProviderFromClient";const useRemoteEcosystemClient=(et=!1,tt)=>{const{loading:nt,remoteOpStore:rt}=useLoadWeaveObjects();return react.exports.useMemo(()=>nt||rt==null?null:createRemoteClient(getConfig().backendWeaveExecutionUrl(),tt,et,makeEcosystemMixedOpStore(StaticOpStore.getInstance(),rt),getCookie("anon_api_key"),(ot,st)=>window.fetch(ot,st)),[et,rt,tt,nt])},RemoteEcosystemComputeGraphContextProvider=Wt.memo(({isAdmin:et,tokenFunc:tt,children:nt})=>{const rt=react.exports.useMemo(()=>tt??(async()=>{}),[tt]),ot=useRemoteEcosystemClient(!!et,rt);return ot==null?Wt.createElement(Wt.Fragment,null):Wt.createElement(ComputeGraphContextProviderFromClient,{client:ot,children:nt})});RemoteEcosystemComputeGraphContextProvider.displayName="RemoteEcosystemComputeGraphContextProvider";const UNHIDE_PANELS=[Spec$17,Spec$C,Spec$19,Spec,Spec$16,Spec$x,Spec$n,Spec$s],NotebookComputeGraphContextProvider=Wt.memo(({children:et})=>{const tt=react.exports.useMemo(()=>({actions:!0,fullscreenMode:!0,dashUi:!0,betaFeatures:{"weave-python-ecosystem":!0,"weave-devpopup":!1}}),[]);TABLE_CONFIG_DEFAULTS.rowSize=RowSize.Small;for(const nt of UNHIDE_PANELS)nt.hidden=!1;return Wt.createElement(WeaveFeaturesContext.Provider,{value:tt},Wt.createElement(RemoteEcosystemComputeGraphContextProvider,null,et))});NotebookComputeGraphContextProvider.displayName="NotebookComputeGraphContextProvider";class ErrorBoundary extends Wt.Component{static getDerivedStateFromError(tt){return{hasError:!0}}constructor(tt){super(tt),this.state={hasError:!1}}componentDidCatch(tt,nt){onAppError("Error: "+tt.stack+`
React Component Stack: `+nt.componentStack)}render(){return this.state.hasError?Wt.createElement(WeaveMessage,null,"Something went wrong. Check the javascript console."):this.props.children}}ReactDOM.render(Wt.createElement(Wt.Suspense,{fallback:"loading"},Wt.createElement(ErrorBoundary,null,Wt.createElement(NotebookComputeGraphContextProvider,null,Wt.createElement(PagePanel,null)))),document.getElementById("root"));export{isNil$1 as $,_possibleConstructorReturn$2 as A,Button$3 as B,Ce as C,_getPrototypeOf$2 as D,_defineProperty$d as E,invoke_1 as F,_assertThisInitialized$2 as G,keyboardKey_1 as H,_createClass$2 as I,createShorthandFactory as J,_objectSpread$g as K,Label$4 as L,MenuItem$4 as M,getUnhandledProps$1 as N,Menu$4 as O,Panel2Loader as P,_extends$a as Q,AutoControlledComponent as R,StringContainer as S,isNil_1 as T,getElementType as U,useKeyOnly as V,Wt as W,useTextAlignProp as X,useVerticalAlignProp as Y,useWidthProp as Z,_$2 as _,classnames as a,Icon$4 as a0,useValueAndKey as a1,useKeyOrValueAndKey as a2,opDirAsW0Dict as a3,opFileDir as a4,constFunction as a5,numeral as a6,extension$1 as a7,opDirOpen as a8,constString as a9,ToGammaSpace as aA,ArrayTools as aB,Matrix as aC,Quaternion as aD,Vector3 as aE,Vector2 as aF,TmpVectors as aG,Vector4 as aH,Epsilon as aI,getVertexCompatiblePositionsAndColors as aJ,clamp$5 as aK,useUpdateConfig2 as aL,callOpVeryUnsafe as aM,constNodeUnsafe as aN,toWeaveType as aO,__vitePreload as aP,ID as aa,prism as ab,usePanelSettings as ac,Editor as ad,generateHTML as ae,opFileContents as af,Markdown as ag,opFileDirectUrl as ah,opFileSize as ai,Segment as aj,Prism$1 as ak,processTextForDisplay as al,EXTENSION_INFO$1 as am,stylis_min as an,unitlessKeys as ao,propTypes$1 as ap,classnames$1 as aq,applyOpToOneOrMany as ar,nullableTaggableValue as as,listObjectType as at,isFile$1 as au,WandbLoader as av,PerformanceConfigurator as aw,_TypeStore as ax,Scalar as ay,ToLinearSpace as az,WBIcon as b,commonjsGlobal$1 as c,getDefaultExportFromCjs$1 as d,darkBlue as e,Card$1 as f,getAugmentedNamespace as g,formatDurationWithColons as h,LegacyWBIcon as i,useAssetURLFromArtifact as j,commonjs as k,lodash$2 as l,useAssetContentFromArtifact as m,StringItem as n,opArtifactAliasAlias as o,primary as p,_isIterateeCall as q,react as r,styled$1 as s,toFinite_1 as t,useNodeValue as u,map_1 as v,white$1 as w,_toConsumableArray$1 as x,_inherits$2 as y,_classCallCheck$2 as z};
//# sourceMappingURL=index.16929924.js.map
